PageSourceSearch

https://ds-storytelling-blogpost-fire-tool.netlify.app/assets/index-BFmQHhrD.js

js ds-storytelling-blogpost-fire-tool.netlify.app collected 2026-10-03 10:40:08 UTC 2,239,546 bytes, 3,573 lines download raw bytes

vendor: 4,338 bytes, lines 1-9
1var Iee=Object.defineProperty;var $R=t=>{throw TypeError(t)};var Oee=(t,e,n)=>e in t?Iee(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var re=(t,e,n)=>Oee(t,typeof e!="symbol"?e+"":e,n),z3=(t,e,n)=>e.has(t)||$R("Cannot "+n);var qe=(t,e,n)=>(z3(t,e,"read from private field"),n?n.call(t):e.get(t)),tn=(t,e,n)=>e.has(t)?$R("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),Ft=(t,e,n,r)=>(z3(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),zi=(t,e,n)=>(z3(t,e,"access private method"),n);var eb=(t,e,n,r)=>({set _(i){Ft(t,e,i,n)},get _(){return qe(t,e,r)}});(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();var Yi=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function fn(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function hW(t){if(Object.prototype.hasOwnProperty.call(t,"__esModule"))return t;var e=t.default;if(typeof e=="function"){var n=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var i=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return t[r]}})}),n}var j3={exports:{}},l1={},V3={exports:{}},nn={};/**
2 * @license React
3 * react.production.min.js
4 *
5 * Copyright (c) Facebook, Inc. and its affiliates.
6 *
7 * This source code is licensed under the MIT license found in the
8 * LICENSE file in the root directory of this source tree.
9 */var HR;function Mee(){if(HR)return nn;HR=1;var t=Symbol.for("react.element"),e=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),o=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),c=Symbol.for("react.memo"),u=Symbol.for("react.lazy"),h=Symbol.iterator;function d(D){return D===null||typeof D!="object"?null:(D=h&&D[h]||D["@@iterator"],typeof D=="function"?D:null)}var m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},y=Object.assign,v={};function b(D,$,he){this.props=D,this.context=$,this.refs=v,this.updater=he||m}b.prototype.isReactComponent={},b.prototype.setState=function(D,$){if(typeof D!="object"&&typeof D!="function"&&D!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,D,$,"setState")},b.prototype.forceUpdate=function(D){this.updater.enqueueForceUpdate(this,D,"forceUpdate")};function x(){}x.prototype=b.prototype;function T(D,$,he){this.props=D,this.context=$,this.refs=v,this.updater=he||m}var E=T.prototype=new x;E.constructor=T,y(E,b.prototype),E.isPureReactComponent=!0;var C=Array.isArray,I=Object.prototype.hasOwnProperty,O={current:null},N={key:!0,ref:!0,__self:!0,__source:!0};function U(D,$,he){var Se,fe={},$e=null,Ze=null;if($!=null)for(Se in $.ref!==void 0&&(Ze=$.ref),$.key!==void 0&&($e=""+$.key),$)I.call($,Se)&&!N.hasOwnProperty(Se)&&(fe[Se]=$[Se]);var ce=arguments.length-2;if(ce===1)fe.children=he;else if(1<ce){for(var me=Array(ce),de=0;de<ce;de++)me[de]=arguments[de+2];fe.children=me}if(D&&D.defaultProps)for(Se in ce=D.defaultProps,ce)fe[Se]===void 0&&(fe[Se]=ce[Se]);return{$$typeof:t,type:D,key:$e,ref:Ze,props:fe,_owner:O.current}}function F(D,$){return{$$typeof:t,type:D.type,key:$,ref:D.ref,props:D.props,_owner:D._owner}}
vendor: 10,340 bytes, lines 9-33
9function H(D){return typeof D=="object"&&D!==null&&D.$$typeof===t}function W(D){var $={"=":"=0",":":"=2"};return"$"+D.replace(/[=:]/g,function(he){return $[he]})}var z=/\/+/g;function V(D,$){return typeof D=="object"&&D!==null&&D.key!=null?W(""+D.key):$.toString(36)}function M(D,$,he,Se,fe){var $e=typeof D;($e==="undefined"||$e==="boolean")&&(D=null);var Ze=!1;if(D===null)Ze=!0;else switch($e){case"string":case"number":Ze=!0;break;case"object":switch(D.$$typeof){case t:case e:Ze=!0}}if(Ze)return Ze=D,fe=fe(Ze),D=Se===""?"."+V(Ze,0):Se,C(fe)?(he="",D!=null&&(he=D.replace(z,"$&/")+"/"),M(fe,$,he,"",function(de){return de})):fe!=null&&(H(fe)&&(fe=F(fe,he+(!fe.key||Ze&&Ze.key===fe.key?"":(""+fe.key).replace(z,"$&/")+"/")+D)),$.push(fe)),1;if(Ze=0,Se=Se===""?".":Se+":",C(D))for(var ce=0;ce<D.length;ce++){$e=D[ce];var me=Se+V($e,ce);Ze+=M($e,$,he,me,fe)}else if(me=d(D),typeof me=="function")for(D=me.call(D),ce=0;!($e=D.next()).done;)$e=$e.value,me=Se+V($e,ce++),Ze+=M($e,$,he,me,fe);else if($e==="object")throw $=String(D),Error("Objects are not valid as a React child (found: "+($==="[object Object]"?"object with keys {"+Object.keys(D).join(", ")+"}":$)+"). If you meant to render a collection of children, use an array instead.");return Ze}function K(D,$,he){if(D==null)return D;var Se=[],fe=0;return M(D,Se,"","",function($e){return $.call(he,$e,fe++)}),Se}function j(D){if(D._status===-1){var $=D._result;$=$(),$.then(function(he){(D._status===0||D._status===-1)&&(D._status=1,D._result=he)},function(he){(D._status===0||D._status===-1)&&(D._status=2,D._result=he)}),D._status===-1&&(D._status=0,D._result=$)}if(D._status===1)return D._result.default;throw D._result}var q={current:null},Y={transition:null},X={ReactCurrentDispatcher:q,ReactCurrentBatchConfig:Y,ReactCurrentOwner:O};function te(){throw Error("act(...) is not supported in production builds of React.")}return nn.Children={map:K,forEach:function(D,$,he){K(D,function(){$.apply(this,arguments)},he)},count:function(D){var $=0;return K(D,function(){$++}),$},toArray:function(D){return K(D,function($){return $})||[]},only:function(D){if(!H(D))throw Error("React.Children.only expected to receive a single React element child.");return D}},nn.Component=b,nn.Fragment=n,nn.Profiler=i,nn.PureComponent=T,nn.StrictMode=r,nn.Suspense=l,nn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=X,nn.act=te,nn.cloneElement=function(D,$,he){if(D==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+D+".");var Se=y({},D.props),fe=D.key,$e=D.ref,Ze=D._owner;if($!=null){if($.ref!==void 0&&($e=$.ref,Ze=O.current),$.key!==void 0&&(fe=""+$.key),D.type&&D.type.defaultProps)var ce=D.type.defaultProps;for(me in $)I.call($,me)&&!N.hasOwnProperty(me)&&(Se[me]=$[me]===void 0&&ce!==void 0?ce[me]:$[me])}var me=arguments.length-2;if(me===1)Se.children=he;else if(1<me){ce=Array(me);for(var de=0;de<me;de++)ce[de]=arguments[de+2];Se.children=ce}return{$$typeof:t,type:D.type,key:fe,ref:$e,props:Se,_owner:Ze}},nn.createContext=function(D){return D={$$typeof:o,_currentValue:D,_currentValue2:D,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},D.Provider={$$typeof:s,_context:D},D.Consumer=D},nn.createElement=U,nn.createFactory=function(D){var $=U.bind(null,D);return $.type=D,$},nn.createRef=function(){return{current:null}},nn.forwardRef=function(D){return{$$typeof:a,render:D}},nn.isValidElement=H,nn.lazy=function(D){return{$$typeof:u,_payload:{_status:-1,_result:D},_init:j}},nn.memo=function(D,$){return{$$typeof:c,type:D,compare:$===void 0?null:$}},nn.startTransition=function(D){var $=Y.transition;Y.transition={};try{D()}finally{Y.transition=$}},nn.unstable_act=te,nn.useCallback=function(D,$){return q.current.useCallback(D,$)},nn.useContext=function(D){return q.current.useContext(D)},nn.useDebugValue=function(){},nn.useDeferredValue=function(D){return q.current.useDeferredValue(D)},nn.useEffect=function(D,$){return q.current.useEffect(D,$)},nn.useId=function(){return q.current.useId()},nn.useImperativeHandle=function(D,$,he){return q.current.useImperativeHandle(D,$,he)},nn.useInsertionEffect=function(D,$){return q.current.useInsertionEffect(D,$)},nn.useLayoutEffect=function(D,$){return q.current.useLayoutEffect(D,$)},nn.useMemo=function(D,$){return q.current.useMemo(D,$)},nn.useReducer=function(D,$,he){return q.current.useReducer(D,$,he)},nn.useRef=function(D){return q.current.useRef(D)},nn.useState=function(D){return q.current.useState(D)},nn.useSyncExternalStore=function(D,$,he){return q.current.useSyncExternalStore(D,$,he)},nn.useTransition=function(){return q.current.useTransition()},nn.version="18.3.1",nn}var qR;function my(){return qR||(qR=1,V3.exports=Mee()),V3.exports}/**
10 * @license React
11 * react-jsx-runtime.production.min.js
12 *
13 * Copyright (c) Facebook, Inc. and its affiliates.
14 *
15 * This source code is licensed under the MIT license found in the
16 * LICENSE file in the root directory of this source tree.
17 */var QR;function Ree(){if(QR)return l1;QR=1;var t=my(),e=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,i=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function o(a,l,c){var u,h={},d=null,m=null;c!==void 0&&(d=""+c),l.key!==void 0&&(d=""+l.key),l.ref!==void 0&&(m=l.ref);for(u in l)r.call(l,u)&&!s.hasOwnProperty(u)&&(h[u]=l[u]);if(a&&a.defaultProps)for(u in l=a.defaultProps,l)h[u]===void 0&&(h[u]=l[u]);return{$$typeof:e,type:a,key:d,ref:m,props:h,_owner:i.current}}return l1.Fragment=n,l1.jsx=o,l1.jsxs=o,l1}var XR;function kee(){return XR||(XR=1,j3.exports=Ree()),j3.exports}var Q=kee(),tb={},W3={exports:{}},Os={},$3={exports:{}},H3={};/**
18 * @license React
19 * scheduler.production.min.js
20 *
21 * Copyright (c) Facebook, Inc. and its affiliates.
22 *
23 * This source code is licensed under the MIT license found in the
24 * LICENSE file in the root directory of this source tree.
25 */var YR;function Nee(){return YR||(YR=1,(function(t){function e(Y,X){var te=Y.length;Y.push(X);e:for(;0<te;){var D=te-1>>>1,$=Y[D];if(0<i($,X))Y[D]=X,Y[te]=$,te=D;else break e}}function n(Y){return Y.length===0?null:Y[0]}function r(Y){if(Y.length===0)return null;var X=Y[0],te=Y.pop();if(te!==X){Y[0]=te;e:for(var D=0,$=Y.length,he=$>>>1;D<he;){var Se=2*(D+1)-1,fe=Y[Se],$e=Se+1,Ze=Y[$e];if(0>i(fe,te))$e<$&&0>i(Ze,fe)?(Y[D]=Ze,Y[$e]=te,D=$e):(Y[D]=fe,Y[Se]=te,D=Se);else if($e<$&&0>i(Ze,te))Y[D]=Ze,Y[$e]=te,D=$e;else break e}}return X}function i(Y,X){var te=Y.sortIndex-X.sortIndex;return te!==0?te:Y.id-X.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;t.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();t.unstable_now=function(){return o.now()-a}}var l=[],c=[],u=1,h=null,d=3,m=!1,y=!1,v=!1,b=typeof setTimeout=="function"?setTimeout:null,x=typeof clearTimeout=="function"?clearTimeout:null,T=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function E(Y){for(var X=n(c);X!==null;){if(X.callback===null)r(c);else if(X.startTime<=Y)r(c),X.sortIndex=X.expirationTime,e(l,X);else break;X=n(c)}}function C(Y){if(v=!1,E(Y),!y)if(n(l)!==null)y=!0,j(I);else{var X=n(c);X!==null&&q(C,X.startTime-Y)}}function I(Y,X){y=!1,v&&(v=!1,x(U),U=-1),m=!0;var te=d;try{for(E(X),h=n(l);h!==null&&(!(h.expirationTime>X)||Y&&!W());){var D=h.callback;if(typeof D=="function"){h.callback=null,d=h.priorityLevel;var $=D(h.expirationTime<=X);X=t.unstable_now(),typeof $=="function"?h.callback=$:h===n(l)&&r(l),E(X)}else r(l);h=n(l)}if(h!==null)var he=!0;else{var Se=n(c);Se!==null&&q(C,Se.startTime-X),he=!1}return he}finally{h=null,d=te,m=!1}}var O=!1,N=null,U=-1,F=5,H=-1;function W(){return!(t.unstable_now()-H<F)}function z(){if(N!==null){var Y=t.unstable_now();H=Y;var X=!0;try{X=N(!0,Y)}finally{X?V():(O=!1,N=null)}}else O=!1}var V;if(typeof T=="function")V=function(){T(z)};else if(typeof MessageChannel<"u"){var M=new MessageChannel,K=M.port2;M.port1.onmessage=z,V=function(){K.postMessage(null)}}else V=function(){b(z,0)};function j(Y){N=Y,O||(O=!0,V())}function q(Y,X){U=b(function(){Y(t.unstable_now())},X)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(Y){Y.callback=null},t.unstable_continueExecution=function(){y||m||(y=!0,j(I))},t.unstable_forceFrameRate=function(Y){0>Y||125<Y?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):F=0<Y?Math.floor(1e3/Y):5},t.unstable_getCurrentPriorityLevel=function(){return d},t.unstable_getFirstCallbackNode=function(){return n(l)},t.unstable_next=function(Y){switch(d){case 1:case 2:case 3:var X=3;break;default:X=d}var te=d;d=X;try{return Y()}finally{d=te}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(Y,X){switch(Y){case 1:case 2:case 3:case 4:case 5:break;default:Y=3}var te=d;d=Y;try{return X()}finally{d=te}},t.unstable_scheduleCallback=function(Y,X,te){var D=t.unstable_now();switch(typeof te=="object"&&te!==null?(te=te.delay,te=typeof te=="number"&&0<te?D+te:D):te=D,Y){case 1:var $=-1;break;case 2:$=250;break;case 5:$=1073741823;break;case 4:$=1e4;break;default:$=5e3}return $=te+$,Y={id:u++,callback:X,priorityLevel:Y,startTime:te,expirationTime:$,sortIndex:-1},te>D?(Y.sortIndex=te,e(c,Y),n(l)===null&&Y===n(c)&&(v?(x(U),U=-1):v=!0,q(C,te-D))):(Y.sortIndex=$,e(l,Y),y||m||(y=!0,j(I))),Y},t.unstable_shouldYield=W,t.unstable_wrapCallback=function(Y){var X=d;return function(){var te=d;d=X;try{return Y.apply(this,arguments)}finally{d=te}}}})(H3)),H3}var KR;function Dee(){return KR||(KR=1,$3.exports=Nee()),$3.exports}/**
26 * @license React
27 * react-dom.production.min.js
28 *
29 * Copyright (c) Facebook, Inc. and its affiliates.
30 *
31 * This source code is licensed under the MIT license found in the
32 * LICENSE file in the root directory of this source tree.
33 */var GR;function Bee(){if(GR)return Os;GR=1;var t=my(),e=Dee();function n(f){for(var p="https://reactjs.org/docs/error-decoder.html?invariant="+f,
vendor: 14,861 bytes, lines 33-37
33w=1;w<arguments.length;w++)p+="&args[]="+encodeURIComponent(arguments[w]);return"Minified React error #"+f+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,i={};function s(f,p){o(f,p),o(f+"Capture",p)}function o(f,p){for(i[f]=p,f=0;f<p.length;f++)r.add(p[f])}var a=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),l=Object.prototype.hasOwnProperty,c=/^[: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]*$/,u={},h={};function d(f){return l.call(h,f)?!0:l.call(u,f)?!1:c.test(f)?h[f]=!0:(u[f]=!0,!1)}function m(f,p,w,S){if(w!==null&&w.type===0)return!1;switch(typeof p){case"function":case"symbol":return!0;case"boolean":return S?!1:w!==null?!w.acceptsBooleans:(f=f.toLowerCase().slice(0,5),f!=="data-"&&f!=="aria-");default:return!1}}function y(f,p,w,S){if(p===null||typeof p>"u"||m(f,p,w,S))return!0;if(S)return!1;if(w!==null)switch(w.type){case 3:return!p;case 4:return p===!1;case 5:return isNaN(p);case 6:return isNaN(p)||1>p}return!1}function v(f,p,w,S,R,B,ee){this.acceptsBooleans=p===2||p===3||p===4,this.attributeName=S,this.attributeNamespace=R,this.mustUseProperty=w,this.propertyName=f,this.type=p,this.sanitizeURL=B,this.removeEmptyString=ee}var b={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(f){b[f]=new v(f,0,!1,f,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(f){var p=f[0];b[p]=new v(p,1,!1,f[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(f){b[f]=new v(f,2,!1,f.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(f){b[f]=new v(f,2,!1,f,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(f){b[f]=new v(f,3,!1,f.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(f){b[f]=new v(f,3,!0,f,null,!1,!1)}),["capture","download"].forEach(function(f){b[f]=new v(f,4,!1,f,null,!1,!1)}),["cols","rows","size","span"].forEach(function(f){b[f]=new v(f,6,!1,f,null,!1,!1)}),["rowSpan","start"].forEach(function(f){b[f]=new v(f,5,!1,f.toLowerCase(),null,!1,!1)});var x=/[\-:]([a-z])/g;function T(f){return f[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(f){var p=f.replace(x,T);b[p]=new v(p,1,!1,f,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(f){var p=f.replace(x,T);b[p]=new v(p,1,!1,f,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(f){var p=f.replace(x,T);b[p]=new v(p,1,!1,f,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(f){b[f]=new v(f,1,!1,f.toLowerCase(),null,!1,!1)}),b.xlinkHref=new v("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(f){b[f]=new v(f,1,!1,f.toLowerCase(),null,!0,!0)});function E(f,p,w,S){var R=b.hasOwnProperty(p)?b[p]:null;(R!==null?R.type!==0:S||!(2<p.length)||p[0]!=="o"&&p[0]!=="O"||p[1]!=="n"&&p[1]!=="N")&&(y(p,w,R,S)&&(w=null),S||R===null?d(p)&&(w===null?f.removeAttribute(p):f.setAttribute(p,""+w)):R.mustUseProperty?f[R.propertyName]=w===null?R.type===3?!1:"":w:(p=R.attributeName,S=R.attributeNamespace,w===null?f.removeAttribute(p):(R=R.type,w=R===3||R===4&&w===!0?"":""+w,S?f.setAttributeNS(S,p,w):f.setAttribute(p,w))))}var C=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,I=Symbol.for("react.element"),O=Symbol.for("react.portal"),N=Symbol.for("react.fragment"),U=Symbol.for("react.strict_mode"),F=Symbol.for("react.profiler"),H=Symbol.for("react.provider"),W=Symbol.for("react.context"),z=Symbol.for("react.forward_ref"),V=Symbol.for("react.suspense"),M=Symbol.for("react.suspense_list"),K=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),q=Symbol.for("react.offscreen"),Y=Symbol.iterator;function X(f){return f===null||typeof f!="object"?null:(f=Y&&f[Y]||f["@@iterator"],typeof f=="function"?f:null)}var te=Object.assign,D;function $(f){if(D===void 0)try{throw Error()}catch(w){var p=w.stack.trim().match(/\n( *(at )?)/);D=p&&p[1]||""}return`
34`+D+f}var he=!1;function Se(f,p){if(!f||he)return"";he=!0;var w=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(p)if(p=function(){throw Error()},Object.defineProperty(p.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(p,[])}catch(He){var S=He}Reflect.construct(f,[],p)}else{try{p.call()}catch(He){S=He}f.call(p.prototype)}else{try{throw Error()}catch(He){S=He}f()}}catch(He){if(He&&S&&typeof He.stack=="string"){for(var R=He.stack.split(`
35`),B=S.stack.split(`
36`),ee=R.length-1,_e=B.length-1;1<=ee&&0<=_e&&R[ee]!==B[_e];)_e--;for(;1<=ee&&0<=_e;ee--,_e--)if(R[ee]!==B[_e]){if(ee!==1||_e!==1)do if(ee--,_e--,0>_e||R[ee]!==B[_e]){var Pe=`
37`+R[ee].replace(" at new "," at ");return f.displayName&&Pe.includes("<anonymous>")&&(Pe=Pe.replace("<anonymous>",f.displayName)),Pe}while(1<=ee&&0<=_e);break}}}finally{he=!1,Error.prepareStackTrace=w}return(f=f?f.displayName||f.name:"")?$(f):""}function fe(f){switch(f.tag){case 5:return $(f.type);case 16:return $("Lazy");case 13:return $("Suspense");case 19:return $("SuspenseList");case 0:case 2:case 15:return f=Se(f.type,!1),f;case 11:return f=Se(f.type.render,!1),f;case 1:return f=Se(f.type,!0),f;default:return""}}function $e(f){if(f==null)return null;if(typeof f=="function")return f.displayName||f.name||null;if(typeof f=="string")return f;switch(f){case N:return"Fragment";case O:return"Portal";case F:return"Profiler";case U:return"StrictMode";case V:return"Suspense";case M:return"SuspenseList"}if(typeof f=="object")switch(f.$$typeof){case W:return(f.displayName||"Context")+".Consumer";case H:return(f._context.displayName||"Context")+".Provider";case z:var p=f.render;return f=f.displayName,f||(f=p.displayName||p.name||"",f=f!==""?"ForwardRef("+f+")":"ForwardRef"),f;case K:return p=f.displayName||null,p!==null?p:$e(f.type)||"Memo";case j:p=f._payload,f=f._init;try{return $e(f(p))}catch{}}return null}function Ze(f){var p=f.type;switch(f.tag){case 24:return"Cache";case 9:return(p.displayName||"Context")+".Consumer";case 10:return(p._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return f=p.render,f=f.displayName||f.name||"",p.displayName||(f!==""?"ForwardRef("+f+")":"ForwardRef");case 7:return"Fragment";case 5:return p;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return $e(p);case 8:return p===U?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof p=="function")return p.displayName||p.name||null;if(typeof p=="string")return p}return null}function ce(f){switch(typeof f){case"boolean":case"number":case"string":case"undefined":return f;case"object":return f;default:return""}}function me(f){var p=f.type;return(f=f.nodeName)&&f.toLowerCase()==="input"&&(p==="checkbox"||p==="radio")}function de(f){var p=me(f)?"checked":"value",w=Object.getOwnPropertyDescriptor(f.constructor.prototype,p),S=""+f[p];if(!f.hasOwnProperty(p)&&typeof w<"u"&&typeof w.get=="function"&&typeof w.set=="function"){var R=w.get,B=w.set;return Object.defineProperty(f,p,{configurable:!0,get:function(){return R.call(this)},set:function(ee){S=""+ee,B.call(this,ee)}}),Object.defineProperty(f,p,{enumerable:w.enumerable}),{getValue:function(){return S},setValue:function(ee){S=""+ee},stopTracking:function(){f._valueTracker=null,delete f[p]}}}}function ye(f){f._valueTracker||(f._valueTracker=de(f))}function ve(f){if(!f)return!1;var p=f._valueTracker;if(!p)return!0;var w=p.getValue(),S="";return f&&(S=me(f)?f.checked?"true":"false":f.value),f=S,f!==w?(p.setValue(f),!0):!1}function ue(f){if(f=f||(typeof document<"u"?document:void 0),typeof f>"u")return null;try{return f.activeElement||f.body}catch{return f.body}}function k(f,p){var w=p.checked;return te({},p,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:w??f._wrapperState.initialChecked})}function ie(f,p){var w=p.defaultValue==null?"":p.defaultValue,S=p.checked!=null?p.checked:p.defaultChecked;w=ce(p.value!=null?p.value:w),f._wrapperState={initialChecked:S,initialValue:w,controlled:p.type==="checkbox"||p.type==="radio"?p.checked!=null:p.value!=null}}function ne(f,p){p=p.checked,p!=null&&E(f,"checked",p,!1)}function Z(f,p){ne(f,p);var w=ce(p.value),S=p.type;if(w!=null)S==="number"?(w===0&&f.value===""||f.value!=w)&&(f.value=""+w):f.value!==""+w&&(f.value=""+w);else if(S==="submit"||S==="reset"){f.removeAttribute("value");return}p.hasOwnProperty("value")?le(f,p.type,w):p.hasOwnProperty("defaultValue")&&le(f,p.type,ce(p.defaultValue)),p.checked==null&&p.defaultChecked!=null&&(f.defaultChecked=!!p.defaultChecked)}function J(f,p,w){if(p.hasOwnProperty("value")||p.hasOwnProperty("defaultValue")){var S=p.type;if(!(S!=="submit"&&S!=="reset"||p.value!==void 0&&p.value!==null))return;p=""+f._wrapperState.initialValue,w||p===f.value||(f.value=p),f.defaultValue=p}w=f.name,w!==""&&(f.name=""),f.defaultChecked=!!f._wrapperState.initialChecked,w!==""&&(f.name=w)}function le(f,p,w){(p!=="number"||ue(f.ownerDocument)!==f)&&(w==null?f.defaultValue=""+f._wrapperState.initialValue:f.defaultValue!==""+w&&(f.defaultValue=""+w))}var pe=Array.isArray;function Te(f,p,w,S){if(f=f.options,p){p={};for(var R=0;R<w.length;R++)p["$"+w[R]]=!0;for(w=0;w<f.length;w++)R=p.hasOwnProperty("$"+f[w].value),f[w].selected!==R&&(f[w].selected=R),R&&S&&(f[w].defaultSelected=!0)}else{for(w=""+ce(w),p=null,R=0;R<f.length;R++){if(f[R].value===w){f[R].selected=!0,S&&(f[R].defaultSelected=!0);return}p!==null||f[R].disabled||(p=f[R])}p!==null&&(p.selected=!0)}}function we(f,p){if(p.dangerouslySetInnerHTML!=null)throw Error(n(91));return te({},p,{value:void 0,defaultValue:void 0,children:""+f._wrapperState.initialValue})}function Qe(f,p){var w=p.value;if(w==null){if(w=p.children,p=p.defaultValue,w!=null){if(p!=null)throw Error(n(92));if(pe(w)){if(1<w.length)throw Error(n(93));w=w[0]}p=w}p==null&&(p=""),w=p}f._wrapperState={initialValue:ce(w)}}function nt(f,p){var w=ce(p.value),S=ce(p.defaultValue);w!=null&&(w=""+w,w!==f.value&&(f.value=w),p.defaultValue==null&&f.defaultValue!==w&&(f.defaultValue=w)),S!=null&&(f.defaultValue=""+S)}function Xe(f){var p=f.textContent;p===f._wrapperState.initialValue&&p!==""&&p!==null&&(f.value=p)}function ft(f){switch(f){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function It(f,p){return f==null||f==="http://www.w3.org/1999/xhtml"?ft(p):f==="http://www.w3.org/2000/svg"&&p==="foreignObject"?"http://www.w3.org/1999/xhtml":f}var gt,Yt=(function(f){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(p,w,S,R){MSApp.execUnsafeLocalFunction(function(){return f(p,w,S,R)})}:f})(function(f,p){if(f.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in f)f.innerHTML=p;else{for(gt=gt||document.createElement("div"),gt.innerHTML="<svg>"+p.valueOf().toString()+"</svg>",p=gt.firstChild;f.firstChild;)f.removeChild(f.firstChild);for(;p.firstChild;)f.appendChild(p.firstChild)}});function en(f,p){if(p){var w=f.firstChild;if(w&&w===f.lastChild&&w.nodeType===3){w.nodeValue=p;return}}f.textContent=p}var _t={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Mt=["Webkit","ms","Moz","O"];Object.keys(_t).forEach(function(f){Mt.forEach(function(p){p=p+f.charAt(0).toUpperCase()+f.substring(1),_t[p]=_t[f]})});function ht(f,p,w){return p==null||typeof p=="boolean"||p===""?"":w||typeof p!="number"||p===0||_t.hasOwnProperty(f)&&_t[f]?(""+p).trim():p+"px"}function $t(f,p){f=f.style;for(var w in p)if(p.hasOwnProperty(w)){var S=w.indexOf("--")===0,R=ht(w,p[w],S);w==="float"&&(w="cssFloat"),S?f.setProperty(w,R):f[w]=R}}var Zn=te({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function on(f,p){if(p){if(Zn[f]&&(p.children!=null||p.dangerouslySetInnerHTML!=null))throw Error(n(137,f));if(p.dangerouslySetInnerHTML!=null){if(p.children!=null)throw Error(n(60));if(typeof p.dangerouslySetInnerHTML!="object"||!("__html"in p.dangerouslySetInnerHTML))throw Error(n(61))}if(p.style!=null&&typeof p.style!="object")throw Error(n(62))}}function Ut(f,p){if(f.indexOf("-")===-1)return typeof p.is=="str
37ing";switch(f){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Ct=null;function rr(f){return f=f.target||f.srcElement||window,f.correspondingUseElement&&(f=f.correspondingUseElement),f.nodeType===3?f.parentNode:f}var di=null,Sr=null,yr=null;function Dn(f){if(f=Jr(f)){if(typeof di!="function")throw Error(n(280));var p=f.stateNode;p&&(p=np(p),di(f.stateNode,f.type,p))}}function cr(f){Sr?yr?yr.push(f):yr=[f]:Sr=f}function lo(){if(Sr){var f=Sr,p=yr;if(yr=Sr=null,Dn(f),p)for(f=0;f<p.length;f++)Dn(p[f])}}function vn(f,p){return f(p)}function Br(){}var Da=!1;function Ho(f,p,w){if(Da)return f(p,w);Da=!0;try{return vn(f,p,w)}finally{Da=!1,(Sr!==null||yr!==null)&&(Br(),lo())}}function pi(f,p){var w=f.stateNode;if(w===null)return null;var S=np(w);if(S===null)return null;w=S[p];e:switch(p){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(S=!S.disabled)||(f=f.type,S=!(f==="button"||f==="input"||f==="select"||f==="textarea")),f=!S;break e;default:f=!1}if(f)return null;if(w&&typeof w!="function")throw Error(n(231,p,typeof w));return w}var Bs=!1;if(a)try{var ur={};Object.defineProperty(ur,"passive",{get:function(){Bs=!0}}),window.addEventListener("test",ur,ur),window.removeEventListener("test",ur,ur)}catch{Bs=!1}function Ls(f,p,w,S,R,B,ee,_e,Pe){var He=Array.prototype.slice.call(arguments,3);try{p.apply(w,He)}catch(ot){this.onError(ot)}}var ds=!1,Fs=null,Us=!1,Ba=null,La={onError:function(f){ds=!0,Fs=f}};function Ul(f,p,w,S,R,B,ee,_e,Pe){ds=!1,Fs=null,Ls.apply(La,arguments)}function wf(f,p,w,S,R,B,ee,_e,Pe){if(Ul.apply(this,arguments),ds){if(ds){var He=Fs;ds=!1,Fs=null}else throw Error(n(198));Us||(Us=!0,Ba=He)}}function zs(f){var p=f,w=f;if(f.alternate)for(;p.return;)p=p.return;else{f=p;do p=f,(p.flags&4098)!==0&&(w=p.return),f=p.return;while(f)}return p.tag===3?w:null}function Ht(f){if(f.tag===13){var p=f.memoizedState;if(p===null&&(f=f.alternate,f!==null&&(p=f.memoizedState)),p!==null)return p.dehydrated}return null}function gn(f){if(zs(f)!==f)throw Error(n(188))}function Bn(f){var p=f.alternate;if(!p){if(p=zs(f),p===null)throw Error(n(188));return p!==f?null:f}for(var w=f,S=p;;){var R=w.return;if(R===null)break;var B=R.alternate;if(B===null){if(S=R.return,S!==null){w=S;continue}break}if(R.child===B.child){for(B=R.child;B;){if(B===w)return gn(R),f;if(B===S)return gn(R),p;B=B.sibling}throw Error(n(188))}if(w.return!==S.return)w=R,S=B;else{for(var ee=!1,_e=R.child;_e;){if(_e===w){ee=!0,w=R,S=B;break}if(_e===S){ee=!0,S=R,w=B;break}_e=_e.sibling}if(!ee){for(_e=B.child;_e;){if(_e===w){ee=!0,w=B,S=R;break}if(_e===S){ee=!0,S=B,w=R;break}_e=_e.sibling}if(!ee)throw Error(n(189))}}if(w.alternate!==S)throw Error(n(190))}if(w.tag!==3)throw Error(n(188));return w.stateNode.current===w?f:p}function Lr(f){return f=Bn(f),f!==null?Fr(f):null}function Fr(f){if(f.tag===5||f.tag===6)return f;for(f=f.child;f!==null;){var p=Fr(f);if(p!==null)return p;f=f.sibling}return null}var Fa=e.unstable_scheduleCallback,zl=e.unstable_cancelCallback,qo=e.unstable_shouldYield,Td=e.unstable_requestPaint,Pn=e.unstable_now,Hm=e.unstable_getCurrentPriorityLevel,xf=e.unstable_ImmediatePriority,Cd=e.unstable_UserBlockingPriority,Ua=e.unstable_NormalPriority,Pd=e.unstable_LowPriority,Af=e.unstable_IdlePriority,Wc=null,ps=null;function qm(f){if(ps&&typeof ps.onCommitFiberRoot=="function")try{ps.onCommitFiberRoot(Wc,f,void 0,(f.current.flags&128)===128)}catch{}}var Gi=Math.clz32?Math.clz32:Md,Id=Math.log,Od=Math.LN2;function Md(f){return f>>>=0,f===0?32:31-(Id(f)/Od|0)|0}var za=64,$c=4194304;function ja(f){switch(f&-f){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return f&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return f&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return f}}function Qo(f,p){var w=f.pendingLanes;if(w===0)return 0;var S=0,R=f.suspendedLanes,B=f.pingedLanes,ee=w&268435455;if(ee!==0){var _e=ee&~R;_e!==0?S=ja(_e):(B&=ee,B!==0&&(S=ja(B)))}else ee=w&~R,ee!==0?S=ja(ee):B!==0&&(S=ja(B));if(S===0)return 0;if(p!==0&&p!==S&&(p&R)===0&&(R=S&-S,B=p&-p,R>=B||R===16&&(B&4194240)!==0))return p;if((S&4)!==0&&(S|=w&16),p=f.entangledLanes,p!==0)for(f=f.entanglements,p&=S;0<p;)w=31-Gi(p),R=1<<w,S|=f[w],p&=~R;return S}function Rd(f,p){switch(f){case 1:case 2:case 4:return p+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return p+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Qm(f,p){for(var w=f.suspendedLanes,S=f.pingedLanes,R=f.expirationTimes,B=f.pendingLanes;0<B;){var ee=31-Gi(B),_e=1<<ee,Pe=R[ee];Pe===-1?((_e&w)===0||(_e&S)!==0)&&(R[ee]=Rd(_e,p)):Pe<=p&&(f.expiredLanes|=_e),B&=~_e}}function Hc(f){return f=f.pendingLanes&-1073741825,f!==0?f:f&1073741824?1073741824:0}function Ef(){var f=za;return za<<=1,(za&4194240)===0&&(za=64),f}function jl(f){for(var p=[],w=0;31>w;w++)p.push(f);return p}function Vl(f,p,w){f.pendingLanes|=p,p!==536870912&&(f.suspendedLanes=0,f.pingedLanes=0),f=f.eventTimes,p=31-Gi(p),f[p]=w}function kd(f,p){var w=f.pendingLanes&~p;f.pendingLanes=p,f.suspendedLanes=0,f.pingedLanes=0,f.expiredLanes&=p,f.mutableReadLanes&=p,f.entangledLanes&=p,p=f.entanglements;var S=f.eventTimes;for(f=f.expirationTimes;0<w;){var R=31-Gi(w),B=1<<R;p[R]=0,S[R]=-1,f[R]=-1,w&=~B}}function Wl(f,p){var w=f.entangledLanes|=p;for(f=f.entanglements;w;){var S=31-Gi(w),R=1<<S;R&p|f[S]&p&&(f[S]|=p),w&=~R}}var an=0;function Xo(f){return f&=-f,1<f?4<f?(f&268435455)!==0?16:536870912:4:1}var Sf,qc,Nd,Tf,Cf,Qc=!1,$l=[],co=null,uo=null,fo=null,Va=new Map,Hl=new Map,ho=[],Xm="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Dd(f,p){switch(f){case"focusin":case"focusout":co=null;break;case"dragenter":case"dragleave":uo=null;break;case"mouseover":case"mouseout":fo=null;break;case"pointerover":case"pointerout":Va.delete(p.pointerId);break;case"gotpointercapture":case"lostpointercapture":Hl.delete(p.pointerId)}}function Yo(f,p,w,S,R,B){return f===null||f.nativeEvent!==B?(f={blockedOn:p,domEventName:w,eventSystemFlags:S,nativeEvent:B,targetContainers:[R]},p!==null&&(p=Jr(p),p!==null&&qc(p)),f):(f.eventSystemFlags|=S,p=f.targetContainers,R!==null&&p.indexOf(R)===-1&&p.push(R),f)}function Bd(f,p,w,S,R){switch(p){case"focusin":return co=Yo(co,f,p,w,S,R),!0;case"dragenter":return uo=Yo(uo,f,p,w,S,R),!0;case"mouseover":return fo=Yo(fo,f,p,w,S,R),!0;case"pointerover":var B=R.pointerId;return Va.set(B,Yo(Va.get(B)||null,f,p,w,S,R)),!0;case"gotpointercapture":return B=R.pointerId,Hl.set(B,Yo(Hl.get(B)||null,f,p,w,S,R)),!0}return!1}function Ld(f){var p=vo(f.target);if(p!==null){var w=zs(p);if(w!==null){if(p=w.tag,p===13){if(p=Ht(w),p!==null){f.blockedOn=p,Cf(f.priority,function(){Nd(w)});return}}else if(p===3&&w.stateNode.current.memoizedState.isDehydrated){f.blockedOn=w.tag===3?w.stateNode.containerInfo:null;return}}}f.blockedOn=null}function Fe(f){if(f.blockedOn!==null)return!1;for(var p=f.targetContainers;0<p.length;){var w=ql(f.domEventName,f.eventSystemFlags,p[0],f.nativeEvent);if(w===null){w=f.nativeEvent;var S=new w.constructor(w.type,w);Ct=S,w.target.dispatchEvent(S),Ct=null}else return p=Jr(w),p!==null&&qc(p),f.blockedOn=w,!1;p.shift()}return!0}function be(f,p,w){Fe(f)&&w.delete(p)}function Ce(){Qc=!1,co!==null&&Fe(co)&&(co=null),uo!==null&&Fe(uo)&&(uo=null),fo!==null&&Fe(fo)&&(fo=null),Va.forEac
vendor: 14,145 bytes, line 37
37h(be),Hl.forEach(be)}function Ve(f,p){f.blockedOn===p&&(f.blockedOn=null,Qc||(Qc=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,Ce)))}function Ye(f){function p(R){return Ve(R,f)}if(0<$l.length){Ve($l[0],f);for(var w=1;w<$l.length;w++){var S=$l[w];S.blockedOn===f&&(S.blockedOn=null)}}for(co!==null&&Ve(co,f),uo!==null&&Ve(uo,f),fo!==null&&Ve(fo,f),Va.forEach(p),Hl.forEach(p),w=0;w<ho.length;w++)S=ho[w],S.blockedOn===f&&(S.blockedOn=null);for(;0<ho.length&&(w=ho[0],w.blockedOn===null);)Ld(w),w.blockedOn===null&&ho.shift()}var Vt=C.ReactCurrentBatchConfig,Ln=!0;function Kr(f,p,w,S){var R=an,B=Vt.transition;Vt.transition=null;try{an=1,Pf(f,p,w,S)}finally{an=R,Vt.transition=B}}function Xc(f,p,w,S){var R=an,B=Vt.transition;Vt.transition=null;try{an=4,Pf(f,p,w,S)}finally{an=R,Vt.transition=B}}function Pf(f,p,w,S){if(Ln){var R=ql(f,p,w,S);if(R===null)f0(f,p,S,Yc,w),Dd(f,S);else if(Bd(R,f,p,w,S))S.stopPropagation();else if(Dd(f,S),p&4&&-1<Xm.indexOf(f)){for(;R!==null;){var B=Jr(R);if(B!==null&&Sf(B),B=ql(f,p,w,S),B===null&&f0(f,p,S,Yc,w),B===R)break;R=B}R!==null&&S.stopPropagation()}else f0(f,p,S,null,w)}}var Yc=null;function ql(f,p,w,S){if(Yc=null,f=rr(S),f=vo(f),f!==null)if(p=zs(f),p===null)f=null;else if(w=p.tag,w===13){if(f=Ht(p),f!==null)return f;f=null}else if(w===3){if(p.stateNode.current.memoizedState.isDehydrated)return p.tag===3?p.stateNode.containerInfo:null;f=null}else p!==f&&(f=null);return Yc=f,null}function If(f){switch(f){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Hm()){case xf:return 1;case Cd:return 4;case Ua:case Pd:return 16;case Af:return 536870912;default:return 16}default:return 16}}var Tn=null,Wa=null,po=null;function Ym(){if(po)return po;var f,p=Wa,w=p.length,S,R="value"in Tn?Tn.value:Tn.textContent,B=R.length;for(f=0;f<w&&p[f]===R[f];f++);var ee=w-f;for(S=1;S<=ee&&p[w-S]===R[B-S];S++);return po=R.slice(f,1<S?1-S:void 0)}function Kc(f){var p=f.keyCode;return"charCode"in f?(f=f.charCode,f===0&&p===13&&(f=13)):f=p,f===10&&(f=13),32<=f||f===13?f:0}function gi(){return!0}function Km(){return!1}function Ri(f){function p(w,S,R,B,ee){this._reactName=w,this._targetInst=R,this.type=S,this.nativeEvent=B,this.target=ee,this.currentTarget=null;for(var _e in f)f.hasOwnProperty(_e)&&(w=f[_e],this[_e]=w?w(B):B[_e]);return this.isDefaultPrevented=(B.defaultPrevented!=null?B.defaultPrevented:B.returnValue===!1)?gi:Km,this.isPropagationStopped=Km,this}return te(p.prototype,{preventDefault:function(){this.defaultPrevented=!0;var w=this.nativeEvent;w&&(w.preventDefault?w.preventDefault():typeof w.returnValue!="unknown"&&(w.returnValue=!1),this.isDefaultPrevented=gi)},stopPropagation:function(){var w=this.nativeEvent;w&&(w.stopPropagation?w.stopPropagation():typeof w.cancelBubble!="unknown"&&(w.cancelBubble=!0),this.isPropagationStopped=gi)},persist:function(){},isPersistent:gi}),p}var Ql={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(f){return f.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Fd=Ri(Ql),Gc=te({},Ql,{view:0,detail:0}),Wy=Ri(Gc),mi,Gm,Gr,Ud=te({},Gc,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:n0,button:0,buttons:0,relatedTarget:function(f){return f.relatedTarget===void 0?f.fromElement===f.srcElement?f.toElement:f.fromElement:f.relatedTarget},movementX:function(f){return"movementX"in f?f.movementX:(f!==Gr&&(Gr&&f.type==="mousemove"?(mi=f.screenX-Gr.screenX,Gm=f.screenY-Gr.screenY):Gm=mi=0,Gr=f),mi)},movementY:function(f){return"movementY"in f?f.movementY:Gm}}),Zm=Ri(Ud),$a=te({},Ud,{dataTransfer:0}),zd=Ri($a),Jm=te({},Gc,{relatedTarget:0}),In=Ri(Jm),Ha=te({},Ql,{animationName:0,elapsedTime:0,pseudoElement:0}),e0=Ri(Ha),YA=te({},Ql,{clipboardData:function(f){return"clipboardData"in f?f.clipboardData:window.clipboardData}}),t0=Ri(YA),KA=te({},Ql,{data:0}),$y=Ri(KA),GA={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Hy={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},jd={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Zc(f){var p=this.nativeEvent;return p.getModifierState?p.getModifierState(f):(f=jd[f])?!!p[f]:!1}function n0(){return Zc}var qy=te({},Gc,{key:function(f){if(f.key){var p=GA[f.key]||f.key;if(p!=="Unidentified")return p}return f.type==="keypress"?(f=Kc(f),f===13?"Enter":String.fromCharCode(f)):f.type==="keydown"||f.type==="keyup"?Hy[f.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:n0,charCode:function(f){return f.type==="keypress"?Kc(f):0},keyCode:function(f){return f.type==="keydown"||f.type==="keyup"?f.keyCode:0},which:function(f){return f.type==="keypress"?Kc(f):f.type==="keydown"||f.type==="keyup"?f.keyCode:0}}),Qy=Ri(qy),r0=te({},Ud,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Vd=Ri(r0),Xy=te({},Gc,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:n0}),ZA=Ri(Xy),i0=te({},Ql,{propertyName:0,elapsedTime:0,pseudoElement:0}),s0=Ri(i0),JA=te({},Ud,{deltaX:function(f){return"deltaX"in f?f.deltaX:"wheelDeltaX"in f?-f.wheelDeltaX:0},deltaY:function(f){return"deltaY"in f?f.deltaY:"wheelDeltaY"in f?-f.wheelDeltaY:"wheelDelta"in f?-f.wheelDelta:0},deltaZ:0,deltaMode:0}),Yy=Ri(JA),Zi=[9,13,27,32],Of=a&&"CompositionEvent"in window,Ko=null;a&&"documentMode"in document&&(Ko=document.documentMode);var Ky=a&&"TextEvent"in window&&!Ko,o0=a&&(!Of||Ko&&8<Ko&&11>=Ko),Gy=" ",Zy=!1;function Jy(f,p){switch(f){case"keyup":return Zi.indexOf(p.keyCode)!==-1;case"keydown":return p.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function e2(f){return f=f.detail,typeof f=="object"&&"data"in f?f.data:null}var Jc=!1;function eu(f,p){switch(f){case"compositionend":return e2(p);case"keypress":return p.which!==32?null:(Zy=!0,Gy);case"textInput":return f=p.data,f===Gy&&Zy?null:f;default:return null}}function e3(f,p){if(Jc)return f==="compositionend"||!Of&&Jy(f,p)?(f=Ym(),po=Wa=Tn=null,Jc=!1,f):null;switch(f){case"paste":return null;case"keypress":if(!(p.ctrlKey||p.altKey||p.metaKey)||p.ctrlKey&&p.altKey){if(p.char&&1<p.char.length)return p.char;if(p.which)return String.fromCharCode(p.which)}return null;case"compositionend":return o0&&p.locale!=="ko"?null:p.data;default:return null}}var t3={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Wd(f){var p=f&&f.nodeName&&f.nodeName.toLowerCase();return p==="input"?!!t3[f.type]:p==="textarea"}function a0(f,p,w,S){cr(S),p=Zd(p,"onChange"),0<p.length&&(w=new Fd("onChange","change",null,w,S),f.push({event:w,listeners:p}))}var gs=null,qa=null;function n3(f){a2(f,0)}function $d(f){var p=qt(f);if(ve(p))return f}function r3(f,p){if(f==="change")return p}var Xl=!1;if(a){var Ji;if(a){var Hd="oninput"in document;if(!Hd){var t2=document.createElement("div");t2.setAttribute("oninput","return;"),Hd=typeof t2.oninput=="function"}Ji=Hd}else Ji=!1;Xl=Ji&&(!document.documentMode||9<document.documentMode)}function n2(){gs&&(gs.detachEvent("onpropertychange",r2),qa=gs=null)}function r2(f){if(f.propertyName==="value"&&$d(qa)){var p=[];a0(p,qa,f,rr(f)),Ho(n3,p)}}function i3(f,p,w){f==="focusin"?(n2(),gs=p,qa=w,gs.attachEvent("onpropertychange",r2)):f==="focusout"&&n2()}function s3(f){if(f==="selectionchange"||f==="keyup"||f==="keydown")return $d(qa)}function tu(f,p){if(f==="click")return $d(p)}function Ne(f,p){if(f==="input"||f==="change")return $d(p)}function Ke(f,p){return f===p&&(f!==0||1/f===1/p)||f!==f&&p!==p}var We=typeof Object.is=="function"?Object.is:Ke;function vt(f,p){if(We(f,p))return!0;if(typeof f!="object"||f===null||typeof p!="object"||p===null)return!1;var w=Object.keys(f),S=Object.keys(p);if(w.length!==S.length)return!1;for(S=0;S<w.length;S++){var R=w[S];if(!l.call(p,R)||!We(f[R],p[R]))return!1}return!0}function zt(f){for(;f&&f.firstChild;)f=f.firstChild;return f}function hn(f,p){var w=zt(f);f=0;for(var S;w;){if(w.nodeType===3){if(S=f+w.textContent.length,f<=p&&S>=p)return{node:w,offset:p-f};f=S}e:{for(;w;){if(w.nextSibling){w=w.nextSibling;break e}w=w.parentNode}w=void 0}w=zt(w)}}function fr(f,p){return f&&p?f===p?!0:f&&f.nodeType===3?!1:p&&p.nodeType===3?fr(f,p.parentNode):"contains"in f?f.contains(p):f.compareDocumentPosition?!!(f.compareDocumentPosition(p)&16):!1:!1}function wn(){for(var f=window,p=ue();p instanceof f.HTMLIFrameElement;){try{var w=typeof p.contentWindow.location.href=="string"}catch{w=!1}if(w)f=p.contentWindow;else break;p=ue(f.document)}return p}function Mf(f){var p=f&&f.nodeName&&f.nodeName.toLowerCase();return p&&(p==="input"&&(f.type==="text"||f.type==="search"||f.type==="tel"||f.type==="url"||f.type==="password")||p==="textarea"||f.contentEditable==="true")}function o3(f){var p=wn(),w=f.focusedElem,S=f.selectionRange;if(p!==w&&w&&w.ownerDocument&&fr(w.ownerDocument.documentElement,w)){if(S!==null&&Mf(w)){if(p=S.start,f=S.end,f===void 0&&(f=p),"selectionStart"in w)w.selectionStart=p,w.selectionEnd=Math.min(f,w.value.length);else if(f=(p=w.ownerDocument||document)&&p.defaultView||window,f.getSelection){f=f.getSelection();var R=w.textContent.length,B=Math.min(S.start,R);S=S.end===void 0?B:Math.min(S.end,R),!f.extend&&B>S&&(R=S,S=B,B=R),R=hn(w,B);var ee=hn(w,S);R&&ee&&(f.rangeCount!==1||f.anchorNode!==R.node||f.anchorOffset!==R.offset||f.focusNode!==ee.node||f.focusOffset!==ee.offset)&&(p=p.createRange(),p.setStart(R.node,R.offset),f.removeAllRanges(),B>S?(f.addRange(p),f.extend(ee.node,ee.offset)):(p.setEnd(ee.node,ee.offset),f.addRange(p)))}}for(p=[],f=w;f=f.parentNode;)f.nodeType===1&&p.push({element:f,left:f.scrollLeft,top:f.scrollTop});for(typeof w.focus=="function"&&w.focus(),w=0;w<p.length;w++)f=p[w],f.element.scrollLeft=f.left,f.element.scrollTop=f.top}}var ms=a&&"documentMode"in document&&11>=document.documentMode,Go=null,l0=null,go=null,nu=!1;function Rf(f,p,w){var S=w.window===w?w.document:w.nodeType===9?w:w.ownerDocument;nu||Go==null||Go!==ue(S)||(S=Go,"selectionStart"in S&&Mf(S)?S={start:S.selectionStart,end:S.selectionEnd}:(S=(S.ownerDocument&&S.ownerDocument.defaultView||window).getSelection(),S={anchorNode:S.anchorNode,anchorOffset:S.anchorOffset,focusNode:S.focusNode,focusOffset:S.focusOffset}),go&&vt(go,S)||(go=S,S=Zd(l0,"onSelect"),0<S.length&&(p=new Fd("onSelect","select",null,p,w),f.push({event:p,listeners:S}),p.target=Go)))}function dn(f,p){var w={};return w[f.toLowerCase()]=p.toLowerCase(),w["Webkit"+f]="webkit"+p,w["Moz"+f]="moz"+p,w}var ru={animationend:dn("Animation","AnimationEnd"),animationiteration:dn("Animation","AnimationIteration"),animationstart:dn("Animation","AnimationStart"),transitionend:dn("Transition","TransitionEnd")},qd={},kf={};a&&(kf=document.createElement("div").style,"AnimationEvent"in window||(delete ru.animationend.animation,delete ru.animationiteration.animation,delete ru.animationstart.animation),"TransitionEvent"in window||delete ru.transitionend.transition);function Qd(f){if(qd[f])return qd[f];if(!ru[f])return f;var p=ru[f],w;for(w in p)if(p.hasOwnProperty(w)&&w in kf)return qd[f]=p[w];return f}var i2=Qd("animationend"),s2=Qd("animationiteration"),Nf=Qd("animationstart"),Zo=Qd("transitionend"),Df=new Map,c0="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function js(f,p){Df.set(f,p),s(p,[f])}for(var Xd=0;Xd<c0.length;Xd++){var Yd=c0[Xd],Kd=Yd.toLowerCase(),o2=Yd[0].toUpperCase()+Yd.slice(1);js(Kd,"on"+o2)}js(i2,"onAnimationEnd"),js(s2,"onAnimationIteration"),js(Nf,"onAnimationStart"),js("dblclick","onDoubleClick"),js("focusin","onFocus"),js("focusout","onBlur"),js(Zo,"onTransitionEnd"),o("onMouseEnter",["mouseout","mouseover"]),o("onMouseLeave",["mouseout","mouseover"]),o("onPointerEnter",["pointerout","pointerover"]),o("onPointerLeave",["pointerout","pointerover"]),s("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),s("onSelect","focusout contextmenu dragend focu
37sin keydown keyup mousedown mouseup selectionchange".split(" ")),s("onBeforeInput",["compositionend","keypress","textInput","paste"]),s("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),s("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),s("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Jo="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Yl=new Set("cancel close invalid load scroll toggle".split(" ").concat(Jo));function Bf(f,p,w){var S=f.type||"unknown-event";f.currentTarget=w,wf(S,p,void 0,f),f.currentTarget=null}function a2(f,p){p=(p&4)!==0;for(var w=0;w<f.length;w++){var S=f[w],R=S.event;S=S.listeners;e:{var B=void 0;if(p)for(var ee=S.length-1;0<=ee;ee--){var _e=S[ee],Pe=_e.instance,He=_e.currentTarget;if(_e=_e.listener,Pe!==B&&R.isPropagationStopped())break e;Bf(R,_e,He),B=Pe}else for(ee=0;ee<S.length;ee++){if(_e=S[ee],Pe=_e.instance,He=_e.currentTarget,_e=_e.listener,Pe!==B&&R.isPropagationStopped())break e;Bf(R,_e,He),B=Pe}}}if(Us)throw f=Ba,Us=!1,Ba=null,f}function Fn(f,p){var w=p[tp];w===void 0&&(w=p[tp]=new Set);var S=f+"__bubble";w.has(S)||(Gd(p,f,2,!1),w.add(S))}function u0(f,p,w){var S=0;p&&(S|=4),Gd(w,f,S,p)}var Kl="_reactListening"+Math.random().toString(36).slice(2);function Qa(f){if(!f[Kl]){f[Kl]=!0,r.forEach(function(w){w!=="selectionchange"&&(Yl.has(w)||u0(w,!1,f),u0(w,!0,f))});var p=f.nodeType===9?f:f.ownerDocument;p===null||p[Kl]||(p[Kl]=!0,u0("selectionchange",!1,p))}}function Gd(f,p,w,S){switch(If(p)){case 1:var R=Kr;break;case 4:R=Xc;break;default:R=Pf}w=R.bind(null,p,w,f),R=void 0,!Bs||p!=="touchstart"&&p!=="touchmove"&&p!=="wheel"||(R=!0),S?R!==void 0?f.addEventListener(p,w,{capture:!0,passive:R}):f.addEventListener(p,w,!0):R!==void 0?f.addEventListener(p,w,{passive:R}):f.addEventListener(p,w,!1)}function f0(f,p,w,S,R){var B=S;if((p&1)===0&&(p&2)===0&&S!==null)e:for(;;){if(S===null)return;var ee=S.tag;if(ee===3||ee===4){var _e=S.stateNode.containerInfo;if(_e===R||_e.nodeType===8&&_e.parentNode===R)break;if(ee===4)for(ee=S.return;ee!==null;){var Pe=ee.tag;if((Pe===3||Pe===4)&&(Pe=ee.stateNode.containerInfo,Pe===R||Pe.nodeType===8&&Pe.parentNode===R))return;ee=ee.return}for(;_e!==null;){if(ee=vo(_e),ee===null)return;if(Pe=ee.tag,Pe===5||Pe===6){S=B=ee;continue e}_e=_e.parentNode}}S=S.return}Ho(function(){var He=B,ot=rr(w),lt=[];e:{var st=Df.get(f);if(st!==void 0){var yt=Fd,xt=f;switch(f){case"keypress":if(Kc(w)===0)break e;case"keydown":case"keyup":yt=Qy;break;case"focusin":xt="focus",yt=In;break;case"focusout":xt="blur",yt=In;break;case"beforeblur":case"afterblur":yt=In;break;case"click":if(w.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":yt=Zm;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":yt=zd;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":yt=ZA;break;case i2:case s2:case Nf:yt=e0;break;case Zo:yt=s0;break;case"scroll":yt=Wy;break;case"wheel":yt=Yy;break;case"copy":case"cut":case"paste":yt=t0;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":yt=Vd}var St=(p&4)!==0,sr=!St&&f==="scroll",Ue=St?st!==null?st+"Capture":null:st;St=[];for(var Oe=He,je;Oe!==null;){je=Oe;var ct=je.stateNode;if(je.tag===5&&ct!==null&&(je=ct,Ue!==null&&(ct=pi(Oe,Ue),ct!=null&&St.push(iu(Oe,ct,je)))),sr)break;Oe=Oe.return}0<St.length&&(st=new yt(st,xt,null,w,ot),lt.push({event:st,listeners:St}))}}if((p&7)===0){e:{if(st=f==="mouseover"||f==="pointerover",yt=f==="mouseout"||f==="pointerout",st&&w!==Ct&&(xt=w.relatedTarget||w.fromElement)&&(vo(xt)||xt[es]))break e;if((yt||st)&&(st=ot.window===ot?ot:(st=ot.ownerDocument)?st.defaultView||st.parentWindow:window,yt?(xt=w.relatedTarget||w.toElement,yt=He,xt=xt?vo(xt):null,xt!==null&&(sr=zs(xt),xt!==sr||xt.tag!==5&&xt.tag!==6)&&(xt=null)):(yt=null,xt=He),yt!==xt)){if(St=Zm,ct="onMouseLeave",Ue="onMouseEnter",Oe="mouse",(f==="pointerout"||f==="pointerover")&&(St=Vd,ct="onPointerLeave",Ue="onPointerEnter",Oe="pointer"),sr=yt==null?st:qt(yt),je=xt==null?st:qt(xt),st=ne
vendor: 8,212 bytes, lines 37-38
37w St(ct,Oe+"leave",yt,w,ot),st.target=sr,st.relatedTarget=je,ct=null,vo(ot)===He&&(St=new St(Ue,Oe+"enter",xt,w,ot),St.target=je,St.relatedTarget=sr,ct=St),sr=ct,yt&&xt)t:{for(St=yt,Ue=xt,Oe=0,je=St;je;je=su(je))Oe++;for(je=0,ct=Ue;ct;ct=su(ct))je++;for(;0<Oe-je;)St=su(St),Oe--;for(;0<je-Oe;)Ue=su(Ue),je--;for(;Oe--;){if(St===Ue||Ue!==null&&St===Ue.alternate)break t;St=su(St),Ue=su(Ue)}St=null}else St=null;yt!==null&&hr(lt,st,yt,St,!1),xt!==null&&sr!==null&&hr(lt,sr,xt,St,!0)}}e:{if(st=He?qt(He):window,yt=st.nodeName&&st.nodeName.toLowerCase(),yt==="select"||yt==="input"&&st.type==="file")var Tt=r3;else if(Wd(st))if(Xl)Tt=Ne;else{Tt=s3;var Rt=i3}else(yt=st.nodeName)&&yt.toLowerCase()==="input"&&(st.type==="checkbox"||st.type==="radio")&&(Tt=tu);if(Tt&&(Tt=Tt(f,He))){a0(lt,Tt,w,ot);break e}Rt&&Rt(f,st,He),f==="focusout"&&(Rt=st._wrapperState)&&Rt.controlled&&st.type==="number"&&le(st,"number",st.value)}switch(Rt=He?qt(He):window,f){case"focusin":(Wd(Rt)||Rt.contentEditable==="true")&&(Go=Rt,l0=He,go=null);break;case"focusout":go=l0=Go=null;break;case"mousedown":nu=!0;break;case"contextmenu":case"mouseup":case"dragend":nu=!1,Rf(lt,w,ot);break;case"selectionchange":if(ms)break;case"keydown":case"keyup":Rf(lt,w,ot)}var Ot;if(Of)e:{switch(f){case"compositionstart":var Nt="onCompositionStart";break e;case"compositionend":Nt="onCompositionEnd";break e;case"compositionupdate":Nt="onCompositionUpdate";break e}Nt=void 0}else Jc?Jy(f,w)&&(Nt="onCompositionEnd"):f==="keydown"&&w.keyCode===229&&(Nt="onCompositionStart");Nt&&(o0&&w.locale!=="ko"&&(Jc||Nt!=="onCompositionStart"?Nt==="onCompositionEnd"&&Jc&&(Ot=Ym()):(Tn=ot,Wa="value"in Tn?Tn.value:Tn.textContent,Jc=!0)),Rt=Zd(He,Nt),0<Rt.length&&(Nt=new $y(Nt,f,null,w,ot),lt.push({event:Nt,listeners:Rt}),Ot?Nt.data=Ot:(Ot=e2(w),Ot!==null&&(Nt.data=Ot)))),(Ot=Ky?eu(f,w):e3(f,w))&&(He=Zd(He,"onBeforeInput"),0<He.length&&(ot=new $y("onBeforeInput","beforeinput",null,w,ot),lt.push({event:ot,listeners:He}),ot.data=Ot))}a2(lt,p)})}function iu(f,p,w){return{instance:f,listener:p,currentTarget:w}}function Zd(f,p){for(var w=p+"Capture",S=[];f!==null;){var R=f,B=R.stateNode;R.tag===5&&B!==null&&(R=B,B=pi(f,w),B!=null&&S.unshift(iu(f,B,R)),B=pi(f,p),B!=null&&S.push(iu(f,B,R))),f=f.return}return S}function su(f){if(f===null)return null;do f=f.return;while(f&&f.tag!==5);return f||null}function hr(f,p,w,S,R){for(var B=p._reactName,ee=[];w!==null&&w!==S;){var _e=w,Pe=_e.alternate,He=_e.stateNode;if(Pe!==null&&Pe===S)break;_e.tag===5&&He!==null&&(_e=He,R?(Pe=pi(w,B),Pe!=null&&ee.unshift(iu(w,Pe,_e))):R||(Pe=pi(w,B),Pe!=null&&ee.push(iu(w,Pe,_e)))),w=w.return}ee.length!==0&&f.push({event:p,listeners:ee})}var Zr=/\r\n?/g,a3=/\u0000|\uFFFD/g;function l2(f){return(typeof f=="string"?f:""+f).replace(Zr,`
38`).replace(a3,"")}function Lf(f,p,w){if(p=l2(p),l2(f)!==p&&w)throw Error(n(425))}function Jd(){}var Ff=null,Gl=null;function Uf(f,p){return f==="textarea"||f==="noscript"||typeof p.children=="string"||typeof p.children=="number"||typeof p.dangerouslySetInnerHTML=="object"&&p.dangerouslySetInnerHTML!==null&&p.dangerouslySetInnerHTML.__html!=null}var Xa=typeof setTimeout=="function"?setTimeout:void 0,zf=typeof clearTimeout=="function"?clearTimeout:void 0,ou=typeof Promise=="function"?Promise:void 0,ep=typeof queueMicrotask=="function"?queueMicrotask:typeof ou<"u"?function(f){return ou.resolve(null).then(f).catch(au)}:Xa;function au(f){setTimeout(function(){throw f})}function h0(f,p){var w=p,S=0;do{var R=w.nextSibling;if(f.removeChild(w),R&&R.nodeType===8)if(w=R.data,w==="/$"){if(S===0){f.removeChild(R),Ye(p);return}S--}else w!=="$"&&w!=="$?"&&w!=="$!"||S++;w=R}while(w);Ye(p)}function Ya(f){for(;f!=null;f=f.nextSibling){var p=f.nodeType;if(p===1||p===3)break;if(p===8){if(p=f.data,p==="$"||p==="$!"||p==="$?")break;if(p==="/$")return null}}return f}function c2(f){f=f.previousSibling;for(var p=0;f;){if(f.nodeType===8){var w=f.data;if(w==="$"||w==="$!"||w==="$?"){if(p===0)return f;p--}else w==="/$"&&p++}f=f.previousSibling}return null}var lu=Math.random().toString(36).slice(2),mo="__reactFiber$"+lu,Ka="__reactProps$"+lu,es="__reactContainer$"+lu,tp="__reactEvents$"+lu,se="__reactListeners$"+lu,cu="__reactHandles$"+lu;function vo(f){var p=f[mo];if(p)return p;for(var w=f.parentNode;w;){if(p=w[es]||w[mo]){if(w=p.alternate,p.child!==null||w!==null&&w.child!==null)for(f=c2(f);f!==null;){if(w=f[mo])return w;f=c2(f)}return p}f=w,w=f.parentNode}return null}function Jr(f){return f=f[mo]||f[es],!f||f.tag!==5&&f.tag!==6&&f.tag!==13&&f.tag!==3?null:f}function qt(f){if(f.tag===5||f.tag===6)return f.stateNode;throw Error(n(33))}function np(f){return f[Ka]||null}var d0=[],uu=-1;function ki(f){return{current:f}}function Un(f){0>uu||(f.current=d0[uu],d0[uu]=null,uu--)}function On(f,p){uu++,d0[uu]=f.current,f.current=p}var Ga={},ei=ki(Ga),Ni=ki(!1),vi=Ga;function fu(f,p){var w=f.type.contextTypes;if(!w)return Ga;var S=f.stateNode;if(S&&S.__reactInternalMemoizedUnmaskedChildContext===p)return S.__reactInternalMemoizedMaskedChildContext;var R={},B;for(B in w)R[B]=p[B];return S&&(f=f.stateNode,f.__reactInternalMemoizedUnmaskedChildContext=p,f.__reactInternalMemoizedMaskedChildContext=R),R}function Di(f){return f=f.childContextTypes,f!=null}function rp(){Un(Ni),Un(ei)}function u2(f,p,w){if(ei.current!==Ga)throw Error(n(168));On(ei,p),On(Ni,w)}function f2(f,p,w){var S=f.stateNode;if(p=p.childContextTypes,typeof S.getChildContext!="function")return w;S=S.getChildContext();for(var R in S)if(!(R in p))throw Error(n(108,Ze(f)||"Unknown",R));return te({},w,S)}function vs(f){return f=(f=f.stateNode)&&f.__reactInternalMemoizedMergedChildContext||Ga,vi=ei.current,On(ei,f),On(Ni,Ni.current),!0}function h2(f,p,w){var S=f.stateNode;if(!S)throw Error(n(169));w?(f=f2(f,p,vi),S.__reactInternalMemoizedMergedChildContext=f,Un(Ni),Un(ei),On(ei,f)):Un(Ni),On(Ni,w)}var ea=null,ip=!1,p0=!1;function d2(f){ea===null?ea=[f]:ea.push(f)}function Zl(f){ip=!0,d2(f)}function Za(){if(!p0&&ea!==null){p0=!0;var f=0,p=an;try{var w=ea;for(an=1;f<w.length;f++){var S=w[f];do S=S(!0);while(S!==null)}ea=null,ip=!1}catch(R){throw ea!==null&&(ea=ea.slice(f+1)),Fa(xf,Za),R}finally{an=p,p0=!1}}return null}var hu=[],ti=0,sp=null,op=0,ys=[],bs=0,Jl=null,yo=1,bo="";function ec(f,p){hu[ti++]=op,hu[ti++]=sp,sp=f,op=p}function p2(f,p,w){ys[bs++]=yo,ys[bs++]=bo,ys[bs++]=Jl,Jl=f;var S=yo;f=bo;var R=32-Gi(S)-1;S&=~(1<<R),w+=1;var B=32-Gi(p)+R;if(30<B){var ee=R-R%5;B=(S&(1<<ee)-1).toString(32),S>>=ee,R-=ee,yo=1<<32-Gi(p)+R|w<<R|S,bo=B+f}else yo=1<<B|w<<R|S,bo=f}function jf(f){f.return!==null&&(ec(f,1),p2(f,1,0))}function tc(f){for(;f===sp;)sp=hu[--ti],hu[ti]=null,op=hu[--ti],hu[ti]=null;for(;f===Jl;)Jl=ys[--bs],ys[bs]=null,bo=ys[--bs],ys[bs]=null,yo=ys[--bs],ys[bs]=null}var ni=null,ts=null,zn=!1,Vs=null;function _o(f,p){var w=Ts(5,null,null,0);w.elementType="DELETED",w.stateNode=p,w.return=f,p=f.deletions,p===null?(f.deletions=[w],f.flags|=16):p.push(w)}function ap(f,p){switch(f.tag){case 5:var w=f.type;return p=p.nodeType!==1||w.toLowerCase()!==p.nodeName.toLowerCase()?null:p,p!==null?(f.stateNode=p,ni=f,ts=Ya(p.firstChild),!0):!1;case 6:return p=f.pendingProps===""||p.nodeType!==3?null:p,p!==null?(f.stateNode=p,ni=f,ts=null,!0):!1;case 13:return p=p.nodeType!==8?null:p,p!==null?(w=Jl!==null?{id:yo,overflow:bo}:null,f.memoizedState={dehydrated:p,treeContext:w,retryLane:1073741824},w=Ts(18,null,null,0),w.stateNode=p,w.return=f,f.child=w,ni=f,ts=null,!0):!1;default:return!1}}function ta(f){return(f.mode&1)!==0&&(f.flags&128)===0}function Bi(f){if(zn){var p=ts;if(p){var w=p;if(!ap(f,p)){if(ta(f))throw Error(n(418));p=Ya(w.nextSibling);var S=ni;p&&ap(f,p)?_o(S,w):(f.flags=f.flags&-4097|2,zn=!1,ni=f)}}else{if(ta(f))throw Error(n(418));f.flags=f.flags&-4097|2,zn=!1,ni=f}}}function g2(f){for(f=f.return;f!==null&&f.tag!==5&&f.tag!==3&&f.tag!==13;)f=f.return;ni=f}function Vf(f){if(f!==ni)return!1;if(!zn)return g2(f),zn=!0,!1;var p;if((p=f.tag!==3)&&!(p=f.tag!==5)&&(p=f.type,p=p!=="head"&&p!=="body"&&!Uf(f.type,f.memoizedProps)),p&&(p=ts)){if(ta(f))throw g0(),Error(n(418));for(;p;)_o(f,p),p=Ya(p.nextSibling)}if(g2(f),f.tag===13){if(f=f.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(n(317));e:{for(f=f.nextSibling,p=0;f;
vendor: 4,799 bytes, line 38
38){if(f.nodeType===8){var w=f.data;if(w==="/$"){if(p===0){ts=Ya(f.nextSibling);break e}p--}else w!=="$"&&w!=="$!"&&w!=="$?"||p++}f=f.nextSibling}ts=null}}else ts=ni?Ya(f.stateNode.nextSibling):null;return!0}function g0(){for(var f=ts;f;)f=Ya(f.nextSibling)}function wo(){ts=ni=null,zn=!1}function xo(f){Vs===null?Vs=[f]:Vs.push(f)}var m2=C.ReactCurrentBatchConfig;function Wf(f,p,w){if(f=w.ref,f!==null&&typeof f!="function"&&typeof f!="object"){if(w._owner){if(w=w._owner,w){if(w.tag!==1)throw Error(n(309));var S=w.stateNode}if(!S)throw Error(n(147,f));var R=S,B=""+f;return p!==null&&p.ref!==null&&typeof p.ref=="function"&&p.ref._stringRef===B?p.ref:(p=function(ee){var _e=R.refs;ee===null?delete _e[B]:_e[B]=ee},p._stringRef=B,p)}if(typeof f!="string")throw Error(n(284));if(!w._owner)throw Error(n(290,f))}return f}function nc(f,p){throw f=Object.prototype.toString.call(p),Error(n(31,f==="[object Object]"?"object with keys {"+Object.keys(p).join(", ")+"}":f))}function v2(f){var p=f._init;return p(f._payload)}function m0(f){function p(Ue,Oe){if(f){var je=Ue.deletions;je===null?(Ue.deletions=[Oe],Ue.flags|=16):je.push(Oe)}}function w(Ue,Oe){if(!f)return null;for(;Oe!==null;)p(Ue,Oe),Oe=Oe.sibling;return null}function S(Ue,Oe){for(Ue=new Map;Oe!==null;)Oe.key!==null?Ue.set(Oe.key,Oe):Ue.set(Oe.index,Oe),Oe=Oe.sibling;return Ue}function R(Ue,Oe){return Ue=Ys(Ue,Oe),Ue.index=0,Ue.sibling=null,Ue}function B(Ue,Oe,je){return Ue.index=je,f?(je=Ue.alternate,je!==null?(je=je.index,je<Oe?(Ue.flags|=2,Oe):je):(Ue.flags|=2,Oe)):(Ue.flags|=1048576,Oe)}function ee(Ue){return f&&Ue.alternate===null&&(Ue.flags|=2),Ue}function _e(Ue,Oe,je,ct){return Oe===null||Oe.tag!==6?(Oe=n1(je,Ue.mode,ct),Oe.return=Ue,Oe):(Oe=R(Oe,je),Oe.return=Ue,Oe)}function Pe(Ue,Oe,je,ct){var Tt=je.type;return Tt===N?ot(Ue,Oe,je.props.children,ct,je.key):Oe!==null&&(Oe.elementType===Tt||typeof Tt=="object"&&Tt!==null&&Tt.$$typeof===j&&v2(Tt)===Oe.type)?(ct=R(Oe,je.props),ct.ref=Wf(Ue,Oe,je),ct.return=Ue,ct):(ct=Vp(je.type,je.key,je.props,null,Ue.mode,ct),ct.ref=Wf(Ue,Oe,je),ct.return=Ue,ct)}function He(Ue,Oe,je,ct){return Oe===null||Oe.tag!==4||Oe.stateNode.containerInfo!==je.containerInfo||Oe.stateNode.implementation!==je.implementation?(Oe=r1(je,Ue.mode,ct),Oe.return=Ue,Oe):(Oe=R(Oe,je.children||[]),Oe.return=Ue,Oe)}function ot(Ue,Oe,je,ct,Tt){return Oe===null||Oe.tag!==7?(Oe=dc(je,Ue.mode,ct,Tt),Oe.return=Ue,Oe):(Oe=R(Oe,je),Oe.return=Ue,Oe)}function lt(Ue,Oe,je){if(typeof Oe=="string"&&Oe!==""||typeof Oe=="number")return Oe=n1(""+Oe,Ue.mode,je),Oe.return=Ue,Oe;if(typeof Oe=="object"&&Oe!==null){switch(Oe.$$typeof){case I:return je=Vp(Oe.type,Oe.key,Oe.props,null,Ue.mode,je),je.ref=Wf(Ue,null,Oe),je.return=Ue,je;case O:return Oe=r1(Oe,Ue.mode,je),Oe.return=Ue,Oe;case j:var ct=Oe._init;return lt(Ue,ct(Oe._payload),je)}if(pe(Oe)||X(Oe))return Oe=dc(Oe,Ue.mode,je,null),Oe.return=Ue,Oe;nc(Ue,Oe)}return null}function st(Ue,Oe,je,ct){var Tt=Oe!==null?Oe.key:null;if(typeof je=="string"&&je!==""||typeof je=="number")return Tt!==null?null:_e(Ue,Oe,""+je,ct);if(typeof je=="object"&&je!==null){switch(je.$$typeof){case I:return je.key===Tt?Pe(Ue,Oe,je,ct):null;case O:return je.key===Tt?He(Ue,Oe,je,ct):null;case j:return Tt=je._init,st(Ue,Oe,Tt(je._payload),ct)}if(pe(je)||X(je))return Tt!==null?null:ot(Ue,Oe,je,ct,null);nc(Ue,je)}return null}function yt(Ue,Oe,je,ct,Tt){if(typeof ct=="string"&&ct!==""||typeof ct=="number")return Ue=Ue.get(je)||null,_e(Oe,Ue,""+ct,Tt);if(typeof ct=="object"&&ct!==null){switch(ct.$$typeof){case I:return Ue=Ue.get(ct.key===null?je:ct.key)||null,Pe(Oe,Ue,ct,Tt);case O:return Ue=Ue.get(ct.key===null?je:ct.key)||null,He(Oe,Ue,ct,Tt);case j:var Rt=ct._init;return yt(Ue,Oe,je,Rt(ct._payload),Tt)}if(pe(ct)||X(ct))return Ue=Ue.get(je)||null,ot(Oe,Ue,ct,Tt,null);nc(Oe,ct)}return null}function xt(Ue,Oe,je,ct){for(var Tt=null,Rt=null,Ot=Oe,Nt=Oe=0,Pr=null;Ot!==null&&Nt<je.length;Nt++){Ot.index>Nt?(Pr=Ot,Ot=null):Pr=Ot.sibling;var pn=st(Ue,Ot,je[Nt],ct);if(pn===null){Ot===null&&(Ot=Pr);break}f&&Ot&&pn.alternate===null&&p(Ue,Ot),Oe=B(pn,Oe,Nt),Rt===null?Tt=pn:Rt.sibling=pn,Rt=pn,Ot=Pr}if(Nt===je.length)return w(Ue,Ot),zn&&ec(Ue,Nt),Tt;if(Ot===null){for(;Nt<je.length;Nt++)Ot=lt(Ue,je[Nt],ct),Ot!==null&&(Oe=B(Ot,Oe,Nt),Rt===null?Tt=Ot:Rt.sibling=Ot,Rt=Ot);return zn&&ec(Ue,Nt),Tt}for(Ot=S(Ue,Ot);Nt<je.length;Nt++)Pr=yt(Ot,Ue,Nt,je[Nt],ct),Pr!==null&&(f&&Pr.alternate!==null&&Ot.delete(Pr.key===null?Nt:Pr.key),Oe=B(Pr,Oe,Nt),Rt===null?Tt=Pr:Rt.sibling=Pr,Rt=Pr);return f&&Ot.forEach(function(ul){return p(Ue,ul)}),zn&&ec(Ue,Nt),Tt}function St(Ue,Oe,je,ct){var Tt=X(je);if(typeof Tt!="function")throw Error(n(150));if(je=Tt.call(je),je==null)throw Error(n(151));for(var Rt=Tt=null,Ot=Oe,Nt=Oe=0,Pr=null,pn=je.next();Ot!==null&&!pn.done;Nt++,pn=je.next()){Ot.index>
vendor: 6,173 bytes, line 38
38Nt?(Pr=Ot,Ot=null):Pr=Ot.sibling;var ul=st(Ue,Ot,pn.value,ct);if(ul===null){Ot===null&&(Ot=Pr);break}f&&Ot&&ul.alternate===null&&p(Ue,Ot),Oe=B(ul,Oe,Nt),Rt===null?Tt=ul:Rt.sibling=ul,Rt=ul,Ot=Pr}if(pn.done)return w(Ue,Ot),zn&&ec(Ue,Nt),Tt;if(Ot===null){for(;!pn.done;Nt++,pn=je.next())pn=lt(Ue,pn.value,ct),pn!==null&&(Oe=B(pn,Oe,Nt),Rt===null?Tt=pn:Rt.sibling=pn,Rt=pn);return zn&&ec(Ue,Nt),Tt}for(Ot=S(Ue,Ot);!pn.done;Nt++,pn=je.next())pn=yt(Ot,Ue,Nt,pn.value,ct),pn!==null&&(f&&pn.alternate!==null&&Ot.delete(pn.key===null?Nt:pn.key),Oe=B(pn,Oe,Nt),Rt===null?Tt=pn:Rt.sibling=pn,Rt=pn);return f&&Ot.forEach(function(P3){return p(Ue,P3)}),zn&&ec(Ue,Nt),Tt}function sr(Ue,Oe,je,ct){if(typeof je=="object"&&je!==null&&je.type===N&&je.key===null&&(je=je.props.children),typeof je=="object"&&je!==null){switch(je.$$typeof){case I:e:{for(var Tt=je.key,Rt=Oe;Rt!==null;){if(Rt.key===Tt){if(Tt=je.type,Tt===N){if(Rt.tag===7){w(Ue,Rt.sibling),Oe=R(Rt,je.props.children),Oe.return=Ue,Ue=Oe;break e}}else if(Rt.elementType===Tt||typeof Tt=="object"&&Tt!==null&&Tt.$$typeof===j&&v2(Tt)===Rt.type){w(Ue,Rt.sibling),Oe=R(Rt,je.props),Oe.ref=Wf(Ue,Rt,je),Oe.return=Ue,Ue=Oe;break e}w(Ue,Rt);break}else p(Ue,Rt);Rt=Rt.sibling}je.type===N?(Oe=dc(je.props.children,Ue.mode,ct,je.key),Oe.return=Ue,Ue=Oe):(ct=Vp(je.type,je.key,je.props,null,Ue.mode,ct),ct.ref=Wf(Ue,Oe,je),ct.return=Ue,Ue=ct)}return ee(Ue);case O:e:{for(Rt=je.key;Oe!==null;){if(Oe.key===Rt)if(Oe.tag===4&&Oe.stateNode.containerInfo===je.containerInfo&&Oe.stateNode.implementation===je.implementation){w(Ue,Oe.sibling),Oe=R(Oe,je.children||[]),Oe.return=Ue,Ue=Oe;break e}else{w(Ue,Oe);break}else p(Ue,Oe);Oe=Oe.sibling}Oe=r1(je,Ue.mode,ct),Oe.return=Ue,Ue=Oe}return ee(Ue);case j:return Rt=je._init,sr(Ue,Oe,Rt(je._payload),ct)}if(pe(je))return xt(Ue,Oe,je,ct);if(X(je))return St(Ue,Oe,je,ct);nc(Ue,je)}return typeof je=="string"&&je!==""||typeof je=="number"?(je=""+je,Oe!==null&&Oe.tag===6?(w(Ue,Oe.sibling),Oe=R(Oe,je),Oe.return=Ue,Ue=Oe):(w(Ue,Oe),Oe=n1(je,Ue.mode,ct),Oe.return=Ue,Ue=Oe),ee(Ue)):w(Ue,Oe)}return sr}var Jn=m0(!0),lp=m0(!1),$f=ki(null),ns=null,Ja=null,du=null;function na(){du=Ja=ns=null}function cp(f){var p=$f.current;Un($f),f._currentValue=p}function Ur(f,p,w){for(;f!==null;){var S=f.alternate;if((f.childLanes&p)!==p?(f.childLanes|=p,S!==null&&(S.childLanes|=p)):S!==null&&(S.childLanes&p)!==p&&(S.childLanes|=p),f===w)break;f=f.return}}function el(f,p){ns=f,du=Ja=null,f=f.dependencies,f!==null&&f.firstContext!==null&&((f.lanes&p)!==0&&(bi=!0),f.firstContext=null)}function _s(f){var p=f._currentValue;if(du!==f)if(f={context:f,memoizedValue:p,next:null},Ja===null){if(ns===null)throw Error(n(308));Ja=f,ns.dependencies={lanes:0,firstContext:f}}else Ja=Ja.next=f;return p}var rc=null;function v0(f){rc===null?rc=[f]:rc.push(f)}function up(f,p,w,S){var R=p.interleaved;return R===null?(w.next=w,v0(p)):(w.next=R.next,R.next=w),p.interleaved=w,ra(f,S)}function ra(f,p){f.lanes|=p;var w=f.alternate;for(w!==null&&(w.lanes|=p),w=f,f=f.return;f!==null;)f.childLanes|=p,w=f.alternate,w!==null&&(w.childLanes|=p),w=f,f=f.return;return w.tag===3?w.stateNode:null}var ws=!1;function fp(f){f.updateQueue={baseState:f.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function y2(f,p){f=f.updateQueue,p.updateQueue===f&&(p.updateQueue={baseState:f.baseState,firstBaseUpdate:f.firstBaseUpdate,lastBaseUpdate:f.lastBaseUpdate,shared:f.shared,effects:f.effects})}function ia(f,p){return{eventTime:f,lane:p,tag:0,payload:null,callback:null,next:null}}function xs(f,p,w){var S=f.updateQueue;if(S===null)return null;if(S=S.shared,(ln&2)!==0){var R=S.pending;return R===null?p.next=p:(p.next=R.next,R.next=p),S.pending=p,ra(f,w)}return R=S.interleaved,R===null?(p.next=p,v0(S)):(p.next=R.next,R.next=p),S.interleaved=p,ra(f,w)}function hp(f,p,w){if(p=p.updateQueue,p!==null&&(p=p.shared,(w&4194240)!==0)){var S=p.lanes;S&=f.pendingLanes,w|=S,p.lanes=w,Wl(f,w)}}function b2(f,p){var w=f.updateQueue,S=f.alternate;if(S!==null&&(S=S.updateQueue,w===S)){var R=null,B=null;if(w=w.firstBaseUpdate,w!==null){do{var ee={eventTime:w.eventTime,lane:w.lane,tag:w.tag,payload:w.payload,callback:w.callback,next:null};B===null?R=B=ee:B=B.next=ee,w=w.next}while(w!==null);B===null?R=B=p:B=B.next=p}else R=B=p;w={baseState:S.baseState,firstBaseUpdate:R,lastBaseUpdate:B,shared:S.shared,effects:S.effects},f.updateQueue=w;return}f=w.lastBaseUpdate,f===null?w.firstBaseUpdate=p:f.next=p,w.lastBaseUpdate=p}function pu(f,p,w,S){var R=f.updateQueue;ws=!1;var B=R.firstBaseUpdate,ee=R.lastBaseUpdate,_e=R.shared.pending;if(_e!==null){R.shared.pending=null;var Pe=_e,He=Pe.next;Pe.next=null,ee===null?B=He:ee.next=He,ee=Pe;var ot=f.alternate;ot!==null&&(ot=ot.updateQueue,_e=ot.lastBaseUpdate,_e!==ee&&(_e===null?ot.firstBaseUpdate=He:_e.next=He,ot.lastBaseUpdate=Pe))}if(B!==null){var lt=R.baseState;ee=0,ot=He=Pe=null,_e=B;do{var st=_e.lane,yt=_e.eventTime;if((S&st)===st){ot!==null&&(ot=ot.next={eventTime:yt,lane:0,tag:_e.tag,payload:_e.payload,callback:_e.callback,next:null});e:{var xt=f,St=_e;switch(st=p,yt=w,St.tag){case 1:if(xt=St.payload,typeof xt=="function"){lt=xt.call(yt,lt,st);break e}lt=xt;break e;case 3:xt.flags=xt.flags&-65537|128;case 0:if(xt=St.payload,st=typeof xt=="function"?xt.call(yt,lt,st):xt,st==null)break e;lt=te({},lt,st);break e;case 2:ws=!0}}_e.callback!==null&&_e.lane!==0&&(f.flags|=64,st=R.effects,st===null?R.effects=[_e]:st.push(_e))}else yt={eventTime:yt,lane:st,tag:_e.tag,payload:_e.payload,callback:_e.callback,next:null},ot===null?(He=ot=yt,Pe=lt):ot=ot.next=yt,ee|=st;if(_e=_e.next,_e===null){if(_e=R.shared.pending,_e===null)break;st=_e,_e=st.next,st.next=null,R.lastBaseUpdate=st,R.shared.pending=null}}while(!0);if(ot===null&&(Pe=lt),R.baseState=Pe,R.firstBaseUpdate=He,R.lastBaseUpdate=ot,p=R.shared.interleaved,p!==null){R=p;do ee|=R.lane,R=R.next;while(R!==p)}else B===null&&(R.shared.lanes=0);sl|=ee,f.lanes=ee,f.memoizedState=lt}}function y0(f,p,w){if(f=p.effects,p.effects=null,f!==null)for(p=0;p<f.length;p++){var S=f[p],R=S.callback;if(R!==null){if(S.callback=null,S=w,typeof R!="function")throw Error(n(191,R));
vendor: 7,325 bytes, line 38
38R.call(S)}}}var Hf={},Ao=ki(Hf),qf=ki(Hf),gu=ki(Hf);function sa(f){if(f===Hf)throw Error(n(174));return f}function b0(f,p){switch(On(gu,p),On(qf,f),On(Ao,Hf),f=p.nodeType,f){case 9:case 11:p=(p=p.documentElement)?p.namespaceURI:It(null,"");break;default:f=f===8?p.parentNode:p,p=f.namespaceURI||null,f=f.tagName,p=It(p,f)}Un(Ao),On(Ao,p)}function tl(){Un(Ao),Un(qf),Un(gu)}function _0(f){sa(gu.current);var p=sa(Ao.current),w=It(p,f.type);p!==w&&(On(qf,f),On(Ao,w))}function dp(f){qf.current===f&&(Un(Ao),Un(qf))}var $n=ki(0);function ic(f){for(var p=f;p!==null;){if(p.tag===13){var w=p.memoizedState;if(w!==null&&(w=w.dehydrated,w===null||w.data==="$?"||w.data==="$!"))return p}else if(p.tag===19&&p.memoizedProps.revealOrder!==void 0){if((p.flags&128)!==0)return p}else if(p.child!==null){p.child.return=p,p=p.child;continue}if(p===f)break;for(;p.sibling===null;){if(p.return===null||p.return===f)return null;p=p.return}p.sibling.return=p.return,p=p.sibling}return null}var w0=[];function pp(){for(var f=0;f<w0.length;f++)w0[f]._workInProgressVersionPrimary=null;w0.length=0}var Qf=C.ReactCurrentDispatcher,x0=C.ReactCurrentBatchConfig,nl=0,Xn=null,ir=null,br=null,mu=!1,Xf=!1,sc=0,Kt=0;function ri(){throw Error(n(321))}function A0(f,p){if(p===null)return!1;for(var w=0;w<p.length&&w<f.length;w++)if(!We(f[w],p[w]))return!1;return!0}function oc(f,p,w,S,R,B){if(nl=B,Xn=p,p.memoizedState=null,p.updateQueue=null,p.lanes=0,Qf.current=f===null||f.memoizedState===null?c3:wp,f=w(S,R),Xf){B=0;do{if(Xf=!1,sc=0,25<=B)throw Error(n(301));B+=1,br=ir=null,p.updateQueue=null,Qf.current=_u,f=w(S,R)}while(Xf)}if(Qf.current=_p,p=ir!==null&&ir.next!==null,nl=0,br=ir=Xn=null,mu=!1,p)throw Error(n(300));return f}function gp(){var f=sc!==0;return sc=0,f}function Eo(){var f={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return br===null?Xn.memoizedState=br=f:br=br.next=f,br}function As(){if(ir===null){var f=Xn.alternate;f=f!==null?f.memoizedState:null}else f=ir.next;var p=br===null?Xn.memoizedState:br.next;if(p!==null)br=p,ir=f;else{if(f===null)throw Error(n(310));ir=f,f={memoizedState:ir.memoizedState,baseState:ir.baseState,baseQueue:ir.baseQueue,queue:ir.queue,next:null},br===null?Xn.memoizedState=br=f:br=br.next=f}return br}function ii(f,p){return typeof p=="function"?p(f):p}function E0(f){var p=As(),w=p.queue;if(w===null)throw Error(n(311));w.lastRenderedReducer=f;var S=ir,R=S.baseQueue,B=w.pending;if(B!==null){if(R!==null){var ee=R.next;R.next=B.next,B.next=ee}S.baseQueue=R=B,w.pending=null}if(R!==null){B=R.next,S=S.baseState;var _e=ee=null,Pe=null,He=B;do{var ot=He.lane;if((nl&ot)===ot)Pe!==null&&(Pe=Pe.next={lane:0,action:He.action,hasEagerState:He.hasEagerState,eagerState:He.eagerState,next:null}),S=He.hasEagerState?He.eagerState:f(S,He.action);else{var lt={lane:ot,action:He.action,hasEagerState:He.hasEagerState,eagerState:He.eagerState,next:null};Pe===null?(_e=Pe=lt,ee=S):Pe=Pe.next=lt,Xn.lanes|=ot,sl|=ot}He=He.next}while(He!==null&&He!==B);Pe===null?ee=S:Pe.next=_e,We(S,p.memoizedState)||(bi=!0),p.memoizedState=S,p.baseState=ee,p.baseQueue=Pe,w.lastRenderedState=S}if(f=w.interleaved,f!==null){R=f;do B=R.lane,Xn.lanes|=B,sl|=B,R=R.next;while(R!==f)}else R===null&&(w.lanes=0);return[p.memoizedState,w.dispatch]}function vu(f){var p=As(),w=p.queue;if(w===null)throw Error(n(311));w.lastRenderedReducer=f;var S=w.dispatch,R=w.pending,B=p.memoizedState;if(R!==null){w.pending=null;var ee=R=R.next;do B=f(B,ee.action),ee=ee.next;while(ee!==R);We(B,p.memoizedState)||(bi=!0),p.memoizedState=B,p.baseQueue===null&&(p.baseState=B),w.lastRenderedState=B}return[B,S]}function mp(){}function S0(f,p){var w=Xn,S=As(),R=p(),B=!We(S.memoizedState,R);if(B&&(S.memoizedState=R,bi=!0),S=S.queue,So(oa.bind(null,w,S,f),[f]),S.getSnapshot!==p||B||br!==null&&br.memoizedState.tag&1){if(w.flags|=2048,yu(9,Li.bind(null,w,S,R,p),void 0,null),Cr===null)throw Error(n(349));(nl&30)!==0||T0(w,p,R)}return R}function T0(f,p,w){f.flags|=16384,f={getSnapshot:p,value:w},p=Xn.updateQueue,p===null?(p={lastEffect:null,stores:null},Xn.updateQueue=p,p.stores=[f]):(w=p.stores,w===null?p.stores=[f]:w.push(f))}function Li(f,p,w,S){p.value=w,p.getSnapshot=S,vp(p)&&C0(f)}function oa(f,p,w){return w(function(){vp(p)&&C0(f)})}function vp(f){var p=f.getSnapshot;f=f.value;try{var w=p();return!We(f,w)}catch{return!0}}function C0(f){var p=ra(f,1);p!==null&&Xs(p,f,1,-1)}function Yf(f){var p=Eo();return typeof f=="function"&&(f=f()),p.memoizedState=p.baseState=f,f={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ii,lastRenderedState:f},p.queue=f,f=f.dispatch=S2.bind(null,Xn,f),[p.memoizedState,f]}function yu(f,p,w,S){return f={tag:f,create:p,destroy:w,deps:S,next:null},p=Xn.updateQueue,p===null?(p={lastEffect:null,stores:null},Xn.updateQueue=p,p.lastEffect=f.next=f):(w=p.lastEffect,w===null?p.lastEffect=f.next=f:(S=w.next,w.next=f,f.next=S,p.lastEffect=f)),f}function yp(){return As().memoizedState}function Kf(f,p,w,S){var R=Eo();Xn.flags|=f,R.memoizedState=yu(1|p,w,void 0,S===void 0?null:S)}function bu(f,p,w,S){var R=As();S=S===void 0?null:S;var B=void 0;if(ir!==null){var ee=ir.memoizedState;if(B=ee.destroy,S!==null&&A0(S,ee.deps)){R.memoizedState=yu(p,w,B,S);return}}Xn.flags|=f,R.memoizedState=yu(1|p,w,B,S)}function bp(f,p){return Kf(8390656,8,f,p)}function So(f,p){return bu(2048,8,f,p)}function _2(f,p){return bu(4,2,f,p)}function aa(f,p){return bu(4,4,f,p)}function P0(f,p){if(typeof p=="function")return f=f(),p(f),function(){p(null)};if(p!=null)return f=f(),p.current=f,function(){p.current=null}}function I0(f,p,w){return w=w!=null?w.concat([f]):null,bu(4,4,P0.bind(null,p,f),w)}function Gf(){}function w2(f,p){var w=As();p=p===void 0?null:p;var S=w.memoizedState;return S!==null&&p!==null&&A0(p,S[1])?S[0]:(w.memoizedState=[f,p],f)}function x2(f,p){var w=As();p=p===void 0?null:p;var S=w.memoizedState;return S!==null&&p!==null&&A0(p,S[1])?S[0]:(f=f(),w.memoizedState=[f,p],f)}function A2(f,p,w){return(nl&21)===0?(f.baseState&&(f.baseState=!1,bi=!0),f.memoizedState=w):(We(w,p)||(w=Ef(),Xn.lanes|=w,sl|=w,f.baseState=!0),p)}function E2(f,p){var w=an;an=w!==0&&4>w?w:4,f(!0);var S=x0.transition;x0.transition={};try{f(!1),p()}finally{an=w,x0.transition=S}}function O0(){return As().memoizedState}function l3(f,p,w){var S=ll(f);if(w={lane:S,action:w,hasEagerState:!1,eagerState:null,next:null},M0(f))yi(p,w);else if(w=up(f,p,w,S),w!==null){var R=xi();Xs(w,f,S,R),Ws(w,p,S)}}function S2(f,p,w){var S=ll(f),R={lane:S,action:w,hasEagerState:!1,eagerState:null,next:null};if(M0(f))yi(p,R);else{var B=f.alternate;if(f.lanes===0&&(B===null||B.lanes===0)&&(B=p.lastRenderedReducer,B!==null))try{var ee=p.lastRenderedState,_e=B(ee,w);if(R.hasEagerState=!0,R.eagerState=_e,We(_e,ee)){var Pe=p.interleaved;Pe===null?(R.next=R,v0(p)):(R.next=Pe.next,Pe.next=R),p.interleaved=R;return}}catch{}finally{}w=up(f,p,R,S),w!==null&&(R=xi(),Xs(w,f,S,R),Ws(w,p,S))}}function M0(f){var p=f.alternate;return f===Xn||p!==null&&p===Xn}function yi(f,p){Xf=mu=!0;var w=f.pending;w===null?p.next=p:(p.next=w.next,w.next=p),f.pending=p}function Ws(f,p,w){if((w&4194240)!==0){var S=p.lanes;S&=f.pendingLanes,w|=S,p.lanes=w,Wl(f,w)}}var _p={readContext:_s,useCallback:ri,useContext:ri,useEffect:ri,useImperativeHandle:ri,useInsertionEffect:ri,useLayoutEffect:ri,useMemo:ri,useReducer:ri,useRef
vendor: 8,300 bytes, lines 38-40
38:ri,useState:ri,useDebugValue:ri,useDeferredValue:ri,useTransition:ri,useMutableSource:ri,useSyncExternalStore:ri,useId:ri,unstable_isNewReconciler:!1},c3={readContext:_s,useCallback:function(f,p){return Eo().memoizedState=[f,p===void 0?null:p],f},useContext:_s,useEffect:bp,useImperativeHandle:function(f,p,w){return w=w!=null?w.concat([f]):null,Kf(4194308,4,P0.bind(null,p,f),w)},useLayoutEffect:function(f,p){return Kf(4194308,4,f,p)},useInsertionEffect:function(f,p){return Kf(4,2,f,p)},useMemo:function(f,p){var w=Eo();return p=p===void 0?null:p,f=f(),w.memoizedState=[f,p],f},useReducer:function(f,p,w){var S=Eo();return p=w!==void 0?w(p):p,S.memoizedState=S.baseState=p,f={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:f,lastRenderedState:p},S.queue=f,f=f.dispatch=l3.bind(null,Xn,f),[S.memoizedState,f]},useRef:function(f){var p=Eo();return f={current:f},p.memoizedState=f},useState:Yf,useDebugValue:Gf,useDeferredValue:function(f){return Eo().memoizedState=f},useTransition:function(){var f=Yf(!1),p=f[0];return f=E2.bind(null,f[1]),Eo().memoizedState=f,[p,f]},useMutableSource:function(){},useSyncExternalStore:function(f,p,w){var S=Xn,R=Eo();if(zn){if(w===void 0)throw Error(n(407));w=w()}else{if(w=p(),Cr===null)throw Error(n(349));(nl&30)!==0||T0(S,p,w)}R.memoizedState=w;var B={value:w,getSnapshot:p};return R.queue=B,bp(oa.bind(null,S,B,f),[f]),S.flags|=2048,yu(9,Li.bind(null,S,B,w,p),void 0,null),w},useId:function(){var f=Eo(),p=Cr.identifierPrefix;if(zn){var w=bo,S=yo;w=(S&~(1<<32-Gi(S)-1)).toString(32)+w,p=":"+p+"R"+w,w=sc++,0<w&&(p+="H"+w.toString(32)),p+=":"}else w=Kt++,p=":"+p+"r"+w.toString(32)+":";return f.memoizedState=p},unstable_isNewReconciler:!1},wp={readContext:_s,useCallback:w2,useContext:_s,useEffect:So,useImperativeHandle:I0,useInsertionEffect:_2,useLayoutEffect:aa,useMemo:x2,useReducer:E0,useRef:yp,useState:function(){return E0(ii)},useDebugValue:Gf,useDeferredValue:function(f){var p=As();return A2(p,ir.memoizedState,f)},useTransition:function(){var f=E0(ii)[0],p=As().memoizedState;return[f,p]},useMutableSource:mp,useSyncExternalStore:S0,useId:O0,unstable_isNewReconciler:!1},_u={readContext:_s,useCallback:w2,useContext:_s,useEffect:So,useImperativeHandle:I0,useInsertionEffect:_2,useLayoutEffect:aa,useMemo:x2,useReducer:vu,useRef:yp,useState:function(){return vu(ii)},useDebugValue:Gf,useDeferredValue:function(f){var p=As();return ir===null?p.memoizedState=f:A2(p,ir.memoizedState,f)},useTransition:function(){var f=vu(ii)[0],p=As().memoizedState;return[f,p]},useMutableSource:mp,useSyncExternalStore:S0,useId:O0,unstable_isNewReconciler:!1};function Es(f,p){if(f&&f.defaultProps){p=te({},p),f=f.defaultProps;for(var w in f)p[w]===void 0&&(p[w]=f[w]);return p}return p}function xp(f,p,w,S){p=f.memoizedState,w=w(S,p),w=w==null?p:te({},p,w),f.memoizedState=w,f.lanes===0&&(f.updateQueue.baseState=w)}var Ap={isMounted:function(f){return(f=f._reactInternals)?zs(f)===f:!1},enqueueSetState:function(f,p,w){f=f._reactInternals;var S=xi(),R=ll(f),B=ia(S,R);B.payload=p,w!=null&&(B.callback=w),p=xs(f,B,R),p!==null&&(Xs(p,f,R,S),hp(p,f,R))},enqueueReplaceState:function(f,p,w){f=f._reactInternals;var S=xi(),R=ll(f),B=ia(S,R);B.tag=1,B.payload=p,w!=null&&(B.callback=w),p=xs(f,B,R),p!==null&&(Xs(p,f,R,S),hp(p,f,R))},enqueueForceUpdate:function(f,p){f=f._reactInternals;var w=xi(),S=ll(f),R=ia(w,S);R.tag=2,p!=null&&(R.callback=p),p=xs(f,R,S),p!==null&&(Xs(p,f,S,w),hp(p,f,S))}};function R0(f,p,w,S,R,B,ee){return f=f.stateNode,typeof f.shouldComponentUpdate=="function"?f.shouldComponentUpdate(S,B,ee):p.prototype&&p.prototype.isPureReactComponent?!vt(w,S)||!vt(R,B):!0}function ac(f,p,w){var S=!1,R=Ga,B=p.contextType;return typeof B=="object"&&B!==null?B=_s(B):(R=Di(p)?vi:ei.current,S=p.contextTypes,B=(S=S!=null)?fu(f,R):Ga),p=new p(w,B),f.memoizedState=p.state!==null&&p.state!==void 0?p.state:null,p.updater=Ap,f.stateNode=p,p._reactInternals=f,S&&(f=f.stateNode,f.__reactInternalMemoizedUnmaskedChildContext=R,f.__reactInternalMemoizedMaskedChildContext=B),p}function wu(f,p,w,S){f=p.state,typeof p.componentWillReceiveProps=="function"&&p.componentWillReceiveProps(w,S),typeof p.UNSAFE_componentWillReceiveProps=="function"&&p.UNSAFE_componentWillReceiveProps(w,S),p.state!==f&&Ap.enqueueReplaceState(p,p.state,null)}function k0(f,p,w,S){var R=f.stateNode;R.props=w,R.state=f.memoizedState,R.refs={},fp(f);var B=p.contextType;typeof B=="object"&&B!==null?R.context=_s(B):(B=Di(p)?vi:ei.current,R.context=fu(f,B)),R.state=f.memoizedState,B=p.getDerivedStateFromProps,typeof B=="function"&&(xp(f,p,B,w),R.state=f.memoizedState),typeof p.getDerivedStateFromProps=="function"||typeof R.getSnapshotBeforeUpdate=="function"||typeof R.UNSAFE_componentWillMount!="function"&&typeof R.componentWillMount!="function"||(p=R.state,typeof R.componentWillMount=="function"&&R.componentWillMount(),typeof R.UNSAFE_componentWillMount=="function"&&R.UNSAFE_componentWillMount(),p!==R.state&&Ap.enqueueReplaceState(R,R.state,null),pu(f,w,R,S),R.state=f.memoizedState),typeof R.componentDidMount=="function"&&(f.flags|=4194308)}function lc(f,p){try{var w="",S=p;do w+=fe(S),S=S.return;while(S);var R=w}catch(B){R=`
39Error generating stack: `+B.message+`
40`+B.stack}return{value:f,source:p,stack:R,digest:null}}function Ep(f,p,w){return{value:f,source:null,stack:w??null,digest:p??null}}function xu(f,p){try{console.error(p.value)}catch(w){setTimeout(function(){throw w})}}var T2=typeof WeakMap=="function"?WeakMap:Map;function Zf(f,p,w){w=ia(-1,w),w.tag=3,w.payload={element:null};var S=p.value;return w.callback=function(){Dp||(Dp=!0,Y0=S),xu(f,p)},w}function Sp(f,p,w){w=ia(-1,w),w.tag=3;var S=f.type.getDerivedStateFromError;if(typeof S=="function"){var R=p.value;w.payload=function(){return S(R)},w.callback=function(){xu(f,p)}}var B=f.stateNode;return B!==null&&typeof B.componentDidCatch=="function"&&(w.callback=function(){xu(f,p),typeof S!="function"&&(ol===null?ol=new Set([this]):ol.add(this));var ee=p.stack;this.componentDidCatch(p.value,{componentStack:ee!==null?ee:""})}),w}function Jf(f,p,w){var S=f.pingCache;if(S===null){S=f.pingCache=new T2;var R=new Set;S.set(p,R)}else R=S.get(p),R===void 0&&(R=new Set,S.set(p,R));R.has(w)||(R.add(w),f=v3.bind(null,f,p,w),p.then(f,f))}function C2(f){do{var p;if((p=f.tag===13)&&(p=f.memoizedState,p=p!==null?p.dehydrated!==null:!0),p)return f;f=f.return}while(f!==null);return null}function N0(f,p,w,S,R){return(f.mode&1)===0?(f===p?f.flags|=65536:(f.flags|=128,w.flags|=131072,w.flags&=-52805,w.tag===1&&(w.alternate===null?w.tag=17:(p=ia(-1,1),p.tag=2,xs(w,p,1))),w.lanes|=1),f):(f.flags|=65536,f.lanes=R,f)}var Tp=C.ReactCurrentOwner,bi=!1;function zr(f,p,w,S){p.child=f===null?lp(p,null,w,S):Jn(p,f.child,w,S)}function P2(f,p,w,S,R){w=w.render;var B=p.ref;return el(p,R),S=oc(f,p,w,S,B,R),w=gp(),f!==null&&!bi?(p.updateQueue=f.updateQueue,p.flags&=-2053,f.lanes&=~R,$s(f,p,R)):(zn&&w&&jf(p),p.flags|=1,zr(f,p,S,R),p.child)}function D0(f,p,w,S,R){if(f===null){var B=w.type;return typeof B=="function"&&!jp(B)&&B.defaultProps===void 0&&w.compare===null&&w.defaultProps===void 0?(p.tag=15,p.type=B,To(f,p,B,S,R)):(f=Vp(w.type,null,S,p,p.mode,R),f.ref=p.ref,f.return=p,p.child=f)}if(B=f.child,(f.lanes&R)===0){var ee=B.memoizedProps;if(w=w.compare,w=w!==null?w:vt,w(ee,S)&&f.ref===p.ref)return $s(f,p,R)}return p.flags|=1,f=Ys(B,S),f.ref=p.ref,f.return=p,p.child=f}function To(f,p,w,S,R){if(f!==null){var B=f.memoizedProps;if(vt(B,S)&&f.ref===p.ref)if(bi=!1,p.pendingProps=S=B,(f.lanes&R)!==0)(f.flags&131072)!==0&&(bi=!0);else return p.lanes=f.lanes,$s(f,p,R)}return F0(f,p,w,S,R)}function B0(f,p,w){var S=p.pendingProps,R=S.children,B=f!==null?f.memoizedState:null;if(S.mode==="hidden")if((p.mode&1)===0)p.memoizedState={baseLanes:0,cachePool:null,transitions:null},On(Tu,is),is|=w;else{if((w&1073741824)===0)return f=B!==null?B.baseLanes|w:w,p.lanes=p.childLanes=1073741824,p.memoizedState={baseLanes:f,cachePool:null,transitions:null},p.updateQueue=null,On(Tu,is),is|=f,null;p.memoizedState={baseLanes:0,cachePool:null,transitions:null},S=B!==null?B.baseLanes:w,On(Tu,is),is|=S}else B!==null?(S=B.baseLanes|w,p.memoizedState=null):S=w,On(Tu,is),is|=S;return zr(f,p,R,w),p.child}function L0(f,p){var w=p.ref;(f===null&&w!==null||f!==null&&f.ref!==w)&&(p.flags|=512,p.flags|=2097152)}
vendor: 13,980 bytes, line 40
40function F0(f,p,w,S,R){var B=Di(w)?vi:ei.current;return B=fu(p,B),el(p,R),w=oc(f,p,w,S,B,R),S=gp(),f!==null&&!bi?(p.updateQueue=f.updateQueue,p.flags&=-2053,f.lanes&=~R,$s(f,p,R)):(zn&&S&&jf(p),p.flags|=1,zr(f,p,w,R),p.child)}function U0(f,p,w,S,R){if(Di(w)){var B=!0;vs(p)}else B=!1;if(el(p,R),p.stateNode===null)Pp(f,p),ac(p,w,S),k0(p,w,S,R),S=!0;else if(f===null){var ee=p.stateNode,_e=p.memoizedProps;ee.props=_e;var Pe=ee.context,He=w.contextType;typeof He=="object"&&He!==null?He=_s(He):(He=Di(w)?vi:ei.current,He=fu(p,He));var ot=w.getDerivedStateFromProps,lt=typeof ot=="function"||typeof ee.getSnapshotBeforeUpdate=="function";lt||typeof ee.UNSAFE_componentWillReceiveProps!="function"&&typeof ee.componentWillReceiveProps!="function"||(_e!==S||Pe!==He)&&wu(p,ee,S,He),ws=!1;var st=p.memoizedState;ee.state=st,pu(p,S,ee,R),Pe=p.memoizedState,_e!==S||st!==Pe||Ni.current||ws?(typeof ot=="function"&&(xp(p,w,ot,S),Pe=p.memoizedState),(_e=ws||R0(p,w,_e,S,st,Pe,He))?(lt||typeof ee.UNSAFE_componentWillMount!="function"&&typeof ee.componentWillMount!="function"||(typeof ee.componentWillMount=="function"&&ee.componentWillMount(),typeof ee.UNSAFE_componentWillMount=="function"&&ee.UNSAFE_componentWillMount()),typeof ee.componentDidMount=="function"&&(p.flags|=4194308)):(typeof ee.componentDidMount=="function"&&(p.flags|=4194308),p.memoizedProps=S,p.memoizedState=Pe),ee.props=S,ee.state=Pe,ee.context=He,S=_e):(typeof ee.componentDidMount=="function"&&(p.flags|=4194308),S=!1)}else{ee=p.stateNode,y2(f,p),_e=p.memoizedProps,He=p.type===p.elementType?_e:Es(p.type,_e),ee.props=He,lt=p.pendingProps,st=ee.context,Pe=w.contextType,typeof Pe=="object"&&Pe!==null?Pe=_s(Pe):(Pe=Di(w)?vi:ei.current,Pe=fu(p,Pe));var yt=w.getDerivedStateFromProps;(ot=typeof yt=="function"||typeof ee.getSnapshotBeforeUpdate=="function")||typeof ee.UNSAFE_componentWillReceiveProps!="function"&&typeof ee.componentWillReceiveProps!="function"||(_e!==lt||st!==Pe)&&wu(p,ee,S,Pe),ws=!1,st=p.memoizedState,ee.state=st,pu(p,S,ee,R);var xt=p.memoizedState;_e!==lt||st!==xt||Ni.current||ws?(typeof yt=="function"&&(xp(p,w,yt,S),xt=p.memoizedState),(He=ws||R0(p,w,He,S,st,xt,Pe)||!1)?(ot||typeof ee.UNSAFE_componentWillUpdate!="function"&&typeof ee.componentWillUpdate!="function"||(typeof ee.componentWillUpdate=="function"&&ee.componentWillUpdate(S,xt,Pe),typeof ee.UNSAFE_componentWillUpdate=="function"&&ee.UNSAFE_componentWillUpdate(S,xt,Pe)),typeof ee.componentDidUpdate=="function"&&(p.flags|=4),typeof ee.getSnapshotBeforeUpdate=="function"&&(p.flags|=1024)):(typeof ee.componentDidUpdate!="function"||_e===f.memoizedProps&&st===f.memoizedState||(p.flags|=4),typeof ee.getSnapshotBeforeUpdate!="function"||_e===f.memoizedProps&&st===f.memoizedState||(p.flags|=1024),p.memoizedProps=S,p.memoizedState=xt),ee.props=S,ee.state=xt,ee.context=Pe,S=He):(typeof ee.componentDidUpdate!="function"||_e===f.memoizedProps&&st===f.memoizedState||(p.flags|=4),typeof ee.getSnapshotBeforeUpdate!="function"||_e===f.memoizedProps&&st===f.memoizedState||(p.flags|=1024),S=!1)}return z0(f,p,w,S,B,R)}function z0(f,p,w,S,R,B){L0(f,p);var ee=(p.flags&128)!==0;if(!S&&!ee)return R&&h2(p,w,!1),$s(f,p,B);S=p.stateNode,Tp.current=p;var _e=ee&&typeof w.getDerivedStateFromError!="function"?null:S.render();return p.flags|=1,f!==null&&ee?(p.child=Jn(p,f.child,null,B),p.child=Jn(p,null,_e,B)):zr(f,p,_e,B),p.memoizedState=S.state,R&&h2(p,w,!0),p.child}function I2(f){var p=f.stateNode;p.pendingContext?u2(f,p.pendingContext,p.pendingContext!==p.context):p.context&&u2(f,p.context,!1),b0(f,p.containerInfo)}function Co(f,p,w,S,R){return wo(),xo(R),p.flags|=256,zr(f,p,w,S),p.child}var eh={dehydrated:null,treeContext:null,retryLane:0};function th(f){return{baseLanes:f,cachePool:null,transitions:null}}function Cp(f,p,w){var S=p.pendingProps,R=$n.current,B=!1,ee=(p.flags&128)!==0,_e;if((_e=ee)||(_e=f!==null&&f.memoizedState===null?!1:(R&2)!==0),_e?(B=!0,p.flags&=-129):(f===null||f.memoizedState!==null)&&(R|=1),On($n,R&1),f===null)return Bi(p),f=p.memoizedState,f!==null&&(f=f.dehydrated,f!==null)?((p.mode&1)===0?p.lanes=1:f.data==="$!"?p.lanes=8:p.lanes=1073741824,null):(ee=S.children,f=S.fallback,B?(S=p.mode,B=p.child,ee={mode:"hidden",children:ee},(S&1)===0&&B!==null?(B.childLanes=0,B.pendingProps=ee):B=Wp(ee,S,0,null),f=dc(f,S,w,null),B.return=p,f.return=p,B.sibling=f,p.child=B,p.child.memoizedState=th(w),p.memoizedState=eh,f):Au(p,ee));if(R=f.memoizedState,R!==null&&(_e=R.dehydrated,_e!==null))return kt(f,p,ee,S,_e,R,w);if(B){B=S.fallback,ee=p.mode,R=f.child,_e=R.sibling;var Pe={mode:"hidden",children:S.children};return(ee&1)===0&&p.child!==R?(S=p.child,S.childLanes=0,S.pendingProps=Pe,p.deletions=null):(S=Ys(R,Pe),S.subtreeFlags=R.subtreeFlags&14680064),_e!==null?B=Ys(_e,B):(B=dc(B,ee,w,null),B.flags|=2),B.return=p,S.return=p,S.sibling=B,p.child=S,S=B,B=p.child,ee=f.child.memoizedState,ee=ee===null?th(w):{baseLanes:ee.baseLanes|w,cachePool:null,transitions:ee.transitions},B.memoizedState=ee,B.childLanes=f.childLanes&~w,p.memoizedState=eh,S}return B=f.child,f=B.sibling,S=Ys(B,{mode:"visible",children:S.children}),(p.mode&1)===0&&(S.lanes=w),S.return=p,S.sibling=null,f!==null&&(w=p.deletions,w===null?(p.deletions=[f],p.flags|=16):w.push(f)),p.child=S,p.memoizedState=null,S}function Au(f,p){return p=Wp({mode:"visible",children:p},f.mode,0,null),p.return=f,f.child=p}function la(f,p,w,S){return S!==null&&xo(S),Jn(p,f.child,null,w),f=Au(p,p.pendingProps.children),f.flags|=2,p.memoizedState=null,f}function kt(f,p,w,S,R,B,ee){if(w)return p.flags&256?(p.flags&=-257,S=Ep(Error(n(422))),la(f,p,ee,S)):p.memoizedState!==null?(p.child=f.child,p.flags|=128,null):(B=S.fallback,R=p.mode,S=Wp({mode:"visible",children:S.children},R,0,null),B=dc(B,R,ee,null),B.flags|=2,S.return=p,B.return=p,S.sibling=B,p.child=S,(p.mode&1)!==0&&Jn(p,f.child,null,ee),p.child.memoizedState=th(ee),p.memoizedState=eh,B);if((p.mode&1)===0)return la(f,p,ee,null);if(R.data==="$!"){if(S=R.nextSibling&&R.nextSibling.dataset,S)var _e=S.dgst;return S=_e,B=Error(n(419)),S=Ep(B,S,void 0),la(f,p,ee,S)}if(_e=(ee&f.childLanes)!==0,bi||_e){if(S=Cr,S!==null){switch(ee&-ee){case 4:R=2;break;case 16:R=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:R=32;break;case 536870912:R=268435456;break;default:R=0}R=(R&(S.suspendedLanes|ee))!==0?0:R,R!==0&&R!==B.retryLane&&(B.retryLane=R,ra(f,R),Xs(S,f,R,-1))}return t1(),S=Ep(Error(n(421))),la(f,p,ee,S)}return R.data==="$?"?(p.flags|=128,p.child=f.child,p=y3.bind(null,f),R._reactRetry=p,null):(f=B.treeContext,ts=Ya(R.nextSibling),ni=p,zn=!0,Vs=null,f!==null&&(ys[bs++]=yo,ys[bs++]=bo,ys[bs++]=Jl,yo=f.id,bo=f.overflow,Jl=p),p=Au(p,S.children),p.flags|=4096,p)}function nh(f,p,w){f.lanes|=p;var S=f.alternate;S!==null&&(S.lanes|=p),Ur(f.return,p,w)}function rh(f,p,w,S,R){var B=f.memoizedState;B===null?f.memoizedState={isBackwards:p,rendering:null,renderingStartTime:0,last:S,tail:w,tailMode:R}:(B.isBackwards=p,B.rendering=null,B.renderingStartTime=0,B.last=S,B.tail=w,B.tailMode=R)}function rl(f,p,w){var S=p.pendingProps,R=S.revealOrder,B=S.tail;if(zr(f,p,S.children,w),S=$n.current,(S&2)!==0)S=S&1|2,p.flags|=128;else{if(f!==null&&(f.flags&128)!==0)e:for(f=p.child;f!==null;){if(f.tag===13)f.memoizedState!==null&&nh(f,w,p);else if(f.tag===19)nh(f,w,p);else if(f.child!==null){f.child.return=f,f=f.child;continue}if(f===p)break e;for(;f.sibling===null;){if(f.return===null||f.return===p)break e;f=f.return}f.sibling.return=f.return,f=f.sibling}S&=1}if(On($n,S),(p.mode&1)===0)p.memoizedState=null;else switch(R){case"forwards":for(w=p.child,R=null;w!==null;)f=w.alternate,f!==null&&ic(f)===null&&(R=w),w=w.sibling;w=R,w===null?(R=p.child,p.child=null):(R=w.sibling,w.sibling=null),rh(p,!1,R,w,B);break;case"backwards":for(w=null,R=p.child,p.child=null;R!==null;){if(f=R.alternate,f!==null&&ic(f)===null){p.child=R;break}f=R.sibling,R.sibling=w,w=R,R=f}rh(p,!0,w,null,B);break;case"together":rh(p,!1,null,null,void 0);break;default:p.memoizedState=null}return p.child}function Pp(f,p){(p.mode&1)===0&&f!==null&&(f.alternate=null,p.alternate=null,p.flags|=2)}function $s(f,p,w){if(f!==null&&(p.dependencies=f.dependencies),sl|=p.lanes,(w&p.childLanes)===0)return null;if(f!==null&&p.child!==f.child)throw Error(n(153));if(p.child!==null){for(f=p.child,w=Ys(f,f.pendingProps),p.child=w,w.return=p;f.sibling!==null;)f=f.sibling,w=w.sibling=Ys(f,f.pendingProps),w.return=p;w.sibling=null}return p.child}function O2(f,p,w){switch(p.tag){case 3:I2(p),wo();break;case 5:_0(p);break;case 1:Di(p.type)&&vs(p);break;case 4:b0(p,p.stateNode.containerInfo);break;case 10:var S=p.type._context,R=p.memoizedProps.value;On($f,S._currentValue),S._currentValue=R;break;case 13:if(S=p.memoizedState,S!==null)return S.dehydrated!==null?(On($n,$n.current&1),p.flags|=128,null):(w&p.child.childLanes)!==0?Cp(f,p,w):(On($n,$n.current&1),f=$s(f,p,w),f!==null?f.sibling:null);On($n,$n.current&1);break;case 19:if(S=(w&p.childLanes)!==0,(f.flags&128)!==0){if(S)return rl(f,p,w);p.flags|=128}if(R=p.memoizedState,R!==null&&(R.rendering=null,R.tail=null,R.lastEffect=null),On($n,$n.current),S)break;return null;case 22:case 23:return p.lanes=0,B0(f,p,w)}return $s(f,p,w)}var jr,j0,M2,V0;jr=function(f,p){for(var w=p.child;w!==null;){if(w.tag===5||w.tag===6)f.appendChild(w.stateNode);else if(w.tag!==4&&w.child!==null){w.child.return=w,w=w.child;continue}if(w===p)break;for(;w.sibling===null;){if(w.return===null||w.return===p)return;w=w.return}w.sibling.return=w.return,w=w.sibling}},j0=function(){},M2=function(f,p,w,S){var R=f.memoizedProps;if(R!==S){f=p.stateNode,sa(Ao.current);var B=null;switch(w){case"input":R=k(f,R),S=k(f,S),B=[];break;case"select":R=te({},R,{value:void 0}),S=te({},S,{value:void 0}),B=[];break;case"textarea":R=we(f,R),S=we(f,S),B=[];break;default:typeof R.onClick!="function"&&typeof S.onClick=="function"&&(f.onclick=Jd)}on(w,S);var ee;w=null;for(He in R)if(!S.hasOwnProperty(He)&&R.hasOwnProperty(He)&&R[He]!=null)if(He==="style"){var _e=R[He];for(ee in _e)_e.hasOwnProperty(ee)&&(w||(w={}),w[ee]="")}else He!=="dangerouslySetInnerHTML"&&He!=="children"&&He!=="suppressContentEditableWarning"&&He!=="suppressHydrationWarning"&&He!=="autoFocus"&&(i.hasOwnProperty(He)?B||(B=[]):(B=B||[]).push(He,null));for(He in S){var Pe=S[He];if(_e=R!=null?R[He]:void 0,S.hasOwnProperty(He)&&Pe!==_e&&(Pe!=null||_e!=null))if(He==="style")if(_e){for(ee in _e)!_e.hasOwnProperty(ee)||Pe&&Pe.hasOwnProperty(ee)||(w||(w={}),w[ee]="");for(ee in Pe)Pe.hasOwnProperty(ee)&&_e[ee]!==Pe[ee]&&(w||(w={}),w[ee]=Pe[ee])}else w||(B||(B=[]),B.push(He,w)),w=Pe;else He==="dangerouslySetInnerHTML"?(Pe=Pe?Pe.__html:void 0,_e=_e?_e.__html:void 0,Pe!=null&&_e!==Pe&&(B=B||[]).push(He,Pe)):He==="children"?typeof Pe!="string"&&typeof Pe!="number"||(B=B||[]).push(He,""+Pe):He!=="suppressContentEditableWarning"&&He!=="suppressHydrationWarning"&&(i.hasOwnProperty(He)?(Pe!=null&&He==="onScroll"&&Fn("scroll",f),B||_e===Pe||(B=[])):(B=B||[]).push(He,Pe))}w&&(B=B||[]).push("style",w);var He=B;(p.updateQueue=He)&&(p.flags|=4)}},V0=function(f,p,w,S){w!==S&&(p.flags|=4)};function ih(f,p){if(!zn)switch(f.tailMode){case"hidden":p=f.tail;for(var w=null;p!==null;)p.alternate!==null&&(w=p),p=p.sibling;w===null?f.tail=null:w.sibling=null;break;case"collapsed":w=f.tail;for(var S=null;w!==null;)w.alternate!==null&&(S=w),w=w.sibling;S===null?p||f.tail===null?f.tail=null:f.tail.sibling=null:S.sibling=null}}function Vr(f){var p=f.alternate!==null&&f.alternate.child===f.child,w=0,S=0;if(p)for(var R=f.child;R!==null;)w|=R.lanes|R.childLanes,S|=R.subtreeFlags&14680064,S|=R.flags&14680064,R.return=f,R=R.sibling;else for(R=f.child;R!==null;)w|=R.lanes|R.childLanes,S|=R.subtreeFlags,S|=R.flags,R.return=f,R=R.sibling;return f.subtreeFlags|=S,f.childLanes=w,p}function u3(f,p,w){var S=p.pendingProps;switch(tc(p),p.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Vr(p),null;case 1:return Di(p.type)&&rp(),Vr(p),null;case 3:return S=p.stateNode,tl(),Un(Ni),Un(ei),pp(),S.pendingContext&&(S.context=S.pendingContext,S.pendingContext=null),(f===null||f.child===null)&&(Vf(p)?p.flags|=4:f===null||f.memoizedState.isDehydrated&&(p.flags&256)===0||(p.flags|=1024,Vs!==null&&(Z0(Vs),Vs=null))),j0(f,p),Vr(p),null;case 5:dp(p);var R=sa(gu.current);if(w=p.type,f!==null&&p.stateNode!=null)M2(f,p,w,S,R),f.ref!==p.ref&&(p.flags|=512,p.flags|=2097152);else{if(!S){if(p.stateNode===null)throw Error(n(166));return Vr(p),null}if(f=sa(Ao.current),Vf(p)){S=p.stateNode,w=p.type;var B=p.memoizedProps;switch(S[mo]=p,S[Ka]=B,f=(p.mode&1)!==0,w){case"dialog":Fn("cancel",S),Fn("close",S);break;case"iframe":case"object":case"embed":Fn("load",S);break;case"video":case"audio":for(R=0;R<Jo.length;R++)Fn(Jo[R],S);break;case"source":Fn("error",S);break;case"img":case"image":case"link":Fn("error",S),Fn("load",S);break;case"details":Fn("toggle",S);break;case"input":ie(S,B),Fn("invalid",S);break;case"select":S._wrapperState={wasMultiple:!!B.multiple},Fn("invalid",S);break;case"textarea":Qe(S,B),Fn("invalid",S)}on(w,B),R=null;for(var ee in B)if(B.hasOwnProperty(ee)){var _e=B[ee];ee==="children"?typeof _e=="string"?S.textContent!==_e&&(B.suppressHydrationWarning!==!0&&Lf(S.textContent,_e,f),R=["children",_e]):typeof _e=="number"&&S.textContent!==""+_e&&(B.suppressHydrationWarning!==!0&&Lf(S.textContent,_e,f),R=["children",""+_e]):i.hasOwnProperty(ee)&&_e!=null&&ee==="onScroll"&&Fn("scroll",S)}switch(w){case"input":ye(S),J(S,B,!0);break;case"textarea":ye(S),Xe(S);break;case"select":case"option":break;default:typeof B.onClick=="function"&&(S.onclick=Jd)}S=R,p.updateQueue=S,S!==null&&(p.flags|=4)}else{ee=R.nodeType===9?R:R.ownerDocument,f==="http://www.w3.org/1999/xhtml"&&(f=ft(w)),f==="http://www.w3.org/1999/xhtml"?w==="script"?(f=ee.createElement("div"),f.innerHTML="<script><\/script>
40",f=f.removeChild(f.firstChild)):typeof S.is=="string"?f=ee.createElement(w,{is:S.is}):(f=ee.createElement(w),w==="select"&&(ee=f,S.multiple?ee.multiple=!0:S.size&&(ee.size=S.size))):f=ee.createElementNS(f,w),f[mo]=p,f[Ka]=S,jr(f,p,!1,!1),p.stateNode=f;e:{switch(ee=Ut(w,S),w){case"dialog":Fn("cancel",f),Fn("close",f),R=S;break;case"iframe":case"object":case"embed":Fn("load",f),R=S;break;case"video":case"audio":for(R=0;R<Jo.length;R++)Fn(Jo[R],f);R=S;break;case"source":Fn("error",f),R=S;break;case"img":case"image":case"link":Fn("error",f),Fn("load",f),R=S;break;case"details":Fn("toggle",f),R=S;break;case"input":ie(f,S),R=k(f,S),Fn("invalid",f);break;case"option":R=S;break;case"select":f._wrapperState={wasMultiple:!!S.multiple},R=te({},S,{value:void 0}),Fn("invalid",f);break;case"textarea":Qe(f,S),R=we(f,S),Fn("invalid",f);break;default:R=S}on(w,R),_e=R;for(B in _e)if(_e.hasOwnProperty(B)){var Pe=_e[B];B==="style"?$t(f,Pe):B==="dangerouslySetInnerHTML"?(Pe=Pe?Pe.__html:void 0,Pe!=null&&Yt(f,Pe)):B==="children"?typeof Pe=="string"?(w!=="textarea"||Pe!=="")&&en(f,Pe):typeof Pe=="number"&&en(f,""+Pe):B!=="suppressContentEditableWarning"&&B!=="suppressHydrationWarning"&&B!=="autoFocus"&&(i.hasOwnProperty(B)?Pe!=null&&B==="onScroll"&&Fn("scroll",f):Pe!=null&&E(f,B,Pe,ee))}switch(w){case"input":ye(f),J(f,S,!1);break;case"textarea":ye(f),Xe(f);break;case"option":S.value!=null&&f.setAttribute("value",""+ce(S.value));break;case"select":f.multiple=!!S.multiple,B=S.value,B!=null?Te(f,!!S.multiple,B,!1):S.defaultValue!=null&&Te(f,!!S.multiple,S.defaultValue,!0);break;default:typeof R.onClick=="function"&&(f.onclick=Jd)}switch(w){case"button":case"input":case"select":case"textarea":S=!!S.autoFocus;break e;case"img":S=!0;break e;default:S=!1}}S&&(p.flags|=4)}p.ref!==null&&(p.flags|=512,p.flags|=2097152)}return Vr(p),null;case 6:if(f&&p.stateNode!=null)V0(f,p,f.memoizedProps,S);else{if(typeof S!="string"&&p.stateNode===null)throw Error(n(166));if(w=sa(gu.current),sa(Ao.current),Vf(p)){if(S=p.stateNode,w=p.memoizedProps,S[mo]=p,(B=S.nodeValue!==w)&&(f=ni,f!==null))switch(f.tag){case 3:Lf(S.nodeValue,w,(f.mode&1)!==0);break;case 5:f.memoizedProps.suppressHydrationWarning!==!0&&Lf(S.nodeValue,w,(f.mode&1)!==0)}B&&(p.flags|=4)}else S=(w.nodeType===9?w:w.ownerDocument).createTextNode(S),S[mo]=p,p.stateNode=S}return Vr(p),null;case 13:if(Un($n),S=p.memoizedState,f===null||f.memoizedState!==null&&f.memoizedState.dehydrated!==null){if(zn&&ts!==null&&(p.mode&1)!==0&&(p.flags&128)===0)g0(),wo(),p.flags|=98560,B=!1;else if(B=Vf(p),S!==null&&S.dehydrated!==null){if(f===null){if(!B)throw Error(n(318));if(B=p.memoizedState,B=B!==null?B.dehydrated:null,!B)throw Error(n(317));B[mo]=p}else wo(),(p.flags&128)===0&&(p.memoizedState=null),p.flags|=4;Vr(p),B=!1}else Vs!==null&&(Z0(Vs),Vs=null),B=!0;if(!B)return p.flags&65536?p:null}return(p.flags&128)!==0?(p.lanes=w,p):(S=S!==null,S!==(f!==null&&f.memoizedState!==null)&&S&&(p.child.flags|=8192,(p.mode&1)!==0&&(f===null||($n.current&1)!==0?_r===0&&(_r=3):t1())),p.updateQueue!==null&&(p.flags|=4),Vr(p),null);case 4:return tl(),j0(f,p),f===null&&Qa(p.stateNode.containerInfo),Vr(p),null;case 10:return cp(p.type._context),Vr(p),null;case 17:return Di(p.type)&&rp(),Vr(p),null;case 19:if(Un($n),B=p.memoizedState,B===null)return Vr(p),null;if(S=(p.flags&128)!==0,ee=B.rendering,ee===null)if(S)ih(B,!1);else{if(_r!==0||f!==null&&(f.flags&128)!==0)for(f=p.child;f!==null;){if(ee=ic(f),ee!==null){for(p.flags|=128,ih(B,!1),S=ee.updateQueue,S!==null&&(p.updateQueue=S,p.flags|=4),p.subtreeFlags=0,S=w,w=p.child;w!==null;)B=w,f=S,B.flags&=14680066,ee=B.alternate,ee===null?(B.childLanes=0,B.lanes=f,B.child=null,B.subtreeFlags=0,B.memoizedProps=null,B.memoizedState=null,B.updateQueue=null,B.dependencies=null,B.stateNode=null):(B.childLanes=ee.childLanes,B.lanes=ee.lanes,B.child=ee.child,B.subtreeFlags=0,B.deletions=null,B.memoizedProps=ee.memoizedProps,B.memoizedState=ee.memoizedState,B.updateQueue=ee.updateQueue,B.type=ee.type,f=ee.dependencies,B.dependencies=f===null?null:{lanes:f.lanes,firstContext:f.firstContext}),w=w.sibling;return On($n,$n.current&1|2),p.child}f=f.sibling}B.tail!==null&&Pn()>cc&&(p.flags|=128,S=!0,ih(B,!1),p.lanes=4194304)}else{if(!S)if(f=ic(ee),f!==null){if(p.flags|=128,S=!0,w=f.updateQueue,w!==null&&(p.updateQueue=w,p.flags|=4),ih(B,!0),B.tail===null&&B.tailMode==="hidden"&&!ee.alternate&&!zn)return Vr(p),null}else 2*Pn()-B.renderingStartTime>cc&&w!==1073741824&&(p.flags|=128,S=!0,ih(B,!1),p.lanes=4194304);B.isBackwards?(ee.sibling=p.child,p.child=ee):(w=B.last,w!==null?w.sibling=ee:p.child=ee,B.last=ee)}return B.tail!==null?(p=B.tail,B.rendering=p,B.tail=p.sibling,B.renderingStartTime=Pn(),p.sibling=null,w=$n.current,On($n,S?w&1|2:w&1),p):(Vr(p),null);case 22:case 23:return e1(),S=p.memoizedState!==null,f!==null&&f.memoizedState!==null!==S&&(p.flags|=8192),S&&(p.mode&1)!==0?(is&1073741824)!==0&&(Vr(p),p.subtreeFlags&6&&(p.flags|=8192)):Vr(p),null;case 24:return null;case 25:return null}throw Error(n(156,p.tag))}function f3(f,p){switch(tc(p),p.tag){case 1:return Di(p.type)&&rp(),f=p.flags,f&65536?(p.flags=f&-65537|128,p):null;case 3:return tl(),Un(Ni),Un(ei),pp(),f=p.flags,(f&65536)!==0&&(f&128)===0?(p.flags=f&-65537|128,p):null;case 5:return dp(p),null;case 13:if(Un($n),f=p.memoizedState,f!==null&&f.dehydrated!==null){if(p.alternate===null)throw Error(n(340));wo()}return f=p.flags,f&65536?(p.flags=f&-65537|128,p):null;case 19:return Un($n),null;case 4:return tl(),null;case 10:return cp(p.type._context),null;case 22:case 23:return e1(),null;case 24:return null;default:return null}}var Ip=!1,Hn=!1,_i=typeof WeakSet=="function"?WeakSet:Set,bt=null;function Eu(f,p){var w=f.ref;if(w!==null)if(typeof w=="function")try{w(null)}catch(S){Yn(f,p,S)}else w.current=null}function sh(f,p,w){try{w()}catch(S){Yn(f,p,S)}}var R2=!1;function h3(f,p){if(Ff=Ln,f=wn(),Mf(f)){if("selectionStart"in f)var w={start:f.selectionStart,end:f.selectionEnd};else e:{w=(w=f.ownerDocument)&&w.defaultView||window;var S=w.getSelection&&w.getSelection();if(S&&S.rangeCount!==0){w=S.anchorNode;var R=S.anchorOffset,B=S.focusNode;S=S.focusOffset;try{w.nodeType,B.nodeType}catch{w=null;break e}var ee=0,_e=-1,Pe=-1,He=0,ot=0,lt=f,st=null;t:for(;;){for(var yt;lt!==w||R!==0&&lt.nodeType!==3||(_e=ee+R),lt!==B||S!==0&&lt.nodeType!==3||(Pe=ee+S),lt.nodeType===3&&(ee+=lt.nodeValue.length),(yt=lt.firstChild)!==null;)st=lt,lt=yt;for(;;){if(lt===f)break t;if(st===w&&++He===R&&(_e=ee),st===B&&++ot===S&&(Pe=ee),(yt=lt.nextSibling)!==null)break;lt=st,st=lt.parentNode}lt=yt}w=_e===-1||Pe===-1?null:{start:_e,end:Pe}}else w=null}w=w||{start:0,end:0}}else w=null;for(Gl={focusedElem:f,selectionRange:w},Ln=!1,bt=p;bt!==null;)if(p=bt,f=p.child,(p.subtreeFlags&1028)!==0&&f!==null)f.return=p,bt=f;else for(;bt!==null;){p=bt;try{var xt=p.alternate;if((p.flags&1024)!==0)switch(p.tag){case 0:case 11:case 15:break;case 1:if(xt!==null){var St=xt.memoizedProps,sr=xt.memoizedState,Ue=p.stateNode,Oe=Ue.getSnapshotBeforeUpdate(p.elementType===p.type?St:Es(p.type,St),sr);Ue.__reactInternalSnapshotBeforeUpdate=Oe}break;case 3:var je=p.stateNode.containerInfo;je.nodeType===1?je.textContent="":je.nodeType===9&&je.documentElement&&je.removeChild(je.documentElement);break;
vendor: 18,216 bytes, line 40
40case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(ct){Yn(p,p.return,ct)}if(f=p.sibling,f!==null){f.return=p.return,bt=f;break}bt=p.return}return xt=R2,R2=!1,xt}function ca(f,p,w){var S=p.updateQueue;if(S=S!==null?S.lastEffect:null,S!==null){var R=S=S.next;do{if((R.tag&f)===f){var B=R.destroy;R.destroy=void 0,B!==void 0&&sh(p,w,B)}R=R.next}while(R!==S)}}function oh(f,p){if(p=p.updateQueue,p=p!==null?p.lastEffect:null,p!==null){var w=p=p.next;do{if((w.tag&f)===f){var S=w.create;w.destroy=S()}w=w.next}while(w!==p)}}function Op(f){var p=f.ref;if(p!==null){var w=f.stateNode;switch(f.tag){case 5:f=w;break;default:f=w}typeof p=="function"?p(f):p.current=f}}function k2(f){var p=f.alternate;p!==null&&(f.alternate=null,k2(p)),f.child=null,f.deletions=null,f.sibling=null,f.tag===5&&(p=f.stateNode,p!==null&&(delete p[mo],delete p[Ka],delete p[tp],delete p[se],delete p[cu])),f.stateNode=null,f.return=null,f.dependencies=null,f.memoizedProps=null,f.memoizedState=null,f.pendingProps=null,f.stateNode=null,f.updateQueue=null}function N2(f){return f.tag===5||f.tag===3||f.tag===4}function D2(f){e:for(;;){for(;f.sibling===null;){if(f.return===null||N2(f.return))return null;f=f.return}for(f.sibling.return=f.return,f=f.sibling;f.tag!==5&&f.tag!==6&&f.tag!==18;){if(f.flags&2||f.child===null||f.tag===4)continue e;f.child.return=f,f=f.child}if(!(f.flags&2))return f.stateNode}}function W0(f,p,w){var S=f.tag;if(S===5||S===6)f=f.stateNode,p?w.nodeType===8?w.parentNode.insertBefore(f,p):w.insertBefore(f,p):(w.nodeType===8?(p=w.parentNode,p.insertBefore(f,w)):(p=w,p.appendChild(f)),w=w._reactRootContainer,w!=null||p.onclick!==null||(p.onclick=Jd));else if(S!==4&&(f=f.child,f!==null))for(W0(f,p,w),f=f.sibling;f!==null;)W0(f,p,w),f=f.sibling}function Mp(f,p,w){var S=f.tag;if(S===5||S===6)f=f.stateNode,p?w.insertBefore(f,p):w.appendChild(f);else if(S!==4&&(f=f.child,f!==null))for(Mp(f,p,w),f=f.sibling;f!==null;)Mp(f,p,w),f=f.sibling}var Tr=null,Hs=!1;function Po(f,p,w){for(w=w.child;w!==null;)$0(f,p,w),w=w.sibling}function $0(f,p,w){if(ps&&typeof ps.onCommitFiberUnmount=="function")try{ps.onCommitFiberUnmount(Wc,w)}catch{}switch(w.tag){case 5:Hn||Eu(w,p);case 6:var S=Tr,R=Hs;Tr=null,Po(f,p,w),Tr=S,Hs=R,Tr!==null&&(Hs?(f=Tr,w=w.stateNode,f.nodeType===8?f.parentNode.removeChild(w):f.removeChild(w)):Tr.removeChild(w.stateNode));break;case 18:Tr!==null&&(Hs?(f=Tr,w=w.stateNode,f.nodeType===8?h0(f.parentNode,w):f.nodeType===1&&h0(f,w),Ye(f)):h0(Tr,w.stateNode));break;case 4:S=Tr,R=Hs,Tr=w.stateNode.containerInfo,Hs=!0,Po(f,p,w),Tr=S,Hs=R;break;case 0:case 11:case 14:case 15:if(!Hn&&(S=w.updateQueue,S!==null&&(S=S.lastEffect,S!==null))){R=S=S.next;do{var B=R,ee=B.destroy;B=B.tag,ee!==void 0&&((B&2)!==0||(B&4)!==0)&&sh(w,p,ee),R=R.next}while(R!==S)}Po(f,p,w);break;case 1:if(!Hn&&(Eu(w,p),S=w.stateNode,typeof S.componentWillUnmount=="function"))try{S.props=w.memoizedProps,S.state=w.memoizedState,S.componentWillUnmount()}catch(_e){Yn(w,p,_e)}Po(f,p,w);break;case 21:Po(f,p,w);break;case 22:w.mode&1?(Hn=(S=Hn)||w.memoizedState!==null,Po(f,p,w),Hn=S):Po(f,p,w);break;default:Po(f,p,w)}}function Su(f){var p=f.updateQueue;if(p!==null){f.updateQueue=null;var w=f.stateNode;w===null&&(w=f.stateNode=new _i),p.forEach(function(S){var R=b3.bind(null,f,S);w.has(S)||(w.add(S),S.then(R,R))})}}function rs(f,p){var w=p.deletions;if(w!==null)for(var S=0;S<w.length;S++){var R=w[S];try{var B=f,ee=p,_e=ee;e:for(;_e!==null;){switch(_e.tag){case 5:Tr=_e.stateNode,Hs=!1;break e;case 3:Tr=_e.stateNode.containerInfo,Hs=!0;break e;case 4:Tr=_e.stateNode.containerInfo,Hs=!0;break e}_e=_e.return}if(Tr===null)throw Error(n(160));$0(B,ee,R),Tr=null,Hs=!1;var Pe=R.alternate;Pe!==null&&(Pe.return=null),R.return=null}catch(He){Yn(R,p,He)}}if(p.subtreeFlags&12854)for(p=p.child;p!==null;)H0(p,f),p=p.sibling}function H0(f,p){var w=f.alternate,S=f.flags;switch(f.tag){case 0:case 11:case 14:case 15:if(rs(p,f),qs(f),S&4){try{ca(3,f,f.return),oh(3,f)}catch(St){Yn(f,f.return,St)}try{ca(5,f,f.return)}catch(St){Yn(f,f.return,St)}}break;case 1:rs(p,f),qs(f),S&512&&w!==null&&Eu(w,w.return);break;case 5:if(rs(p,f),qs(f),S&512&&w!==null&&Eu(w,w.return),f.flags&32){var R=f.stateNode;try{en(R,"")}catch(St){Yn(f,f.return,St)}}if(S&4&&(R=f.stateNode,R!=null)){var B=f.memoizedProps,ee=w!==null?w.memoizedProps:B,_e=f.type,Pe=f.updateQueue;if(f.updateQueue=null,Pe!==null)try{_e==="input"&&B.type==="radio"&&B.name!=null&&ne(R,B),Ut(_e,ee);var He=Ut(_e,B);for(ee=0;ee<Pe.length;ee+=2){var ot=Pe[ee],lt=Pe[ee+1];ot==="style"?$t(R,lt):ot==="dangerouslySetInnerHTML"?Yt(R,lt):ot==="children"?en(R,lt):E(R,ot,lt,He)}switch(_e){case"input":Z(R,B);break;case"textarea":nt(R,B);break;case"select":var st=R._wrapperState.wasMultiple;R._wrapperState.wasMultiple=!!B.multiple;var yt=B.value;yt!=null?Te(R,!!B.multiple,yt,!1):st!==!!B.multiple&&(B.defaultValue!=null?Te(R,!!B.multiple,B.defaultValue,!0):Te(R,!!B.multiple,B.multiple?[]:"",!1))}R[Ka]=B}catch(St){Yn(f,f.return,St)}}break;case 6:if(rs(p,f),qs(f),S&4){if(f.stateNode===null)throw Error(n(162));R=f.stateNode,B=f.memoizedProps;try{R.nodeValue=B}catch(St){Yn(f,f.return,St)}}break;case 3:if(rs(p,f),qs(f),S&4&&w!==null&&w.memoizedState.isDehydrated)try{Ye(p.containerInfo)}catch(St){Yn(f,f.return,St)}break;case 4:rs(p,f),qs(f);break;case 13:rs(p,f),qs(f),R=f.child,R.flags&8192&&(B=R.memoizedState!==null,R.stateNode.isHidden=B,!B||R.alternate!==null&&R.alternate.memoizedState!==null||(X0=Pn())),S&4&&Su(f);break;case 22:if(ot=w!==null&&w.memoizedState!==null,f.mode&1?(Hn=(He=Hn)||ot,rs(p,f),Hn=He):rs(p,f),qs(f),S&8192){if(He=f.memoizedState!==null,(f.stateNode.isHidden=He)&&!ot&&(f.mode&1)!==0)for(bt=f,ot=f.child;ot!==null;){for(lt=bt=ot;bt!==null;){switch(st=bt,yt=st.child,st.tag){case 0:case 11:case 14:case 15:ca(4,st,st.return);break;case 1:Eu(st,st.return);var xt=st.stateNode;if(typeof xt.componentWillUnmount=="function"){S=st,w=st.return;try{p=S,xt.props=p.memoizedProps,xt.state=p.memoizedState,xt.componentWillUnmount()}catch(St){Yn(S,w,St)}}break;case 5:Eu(st,st.return);break;case 22:if(st.memoizedState!==null){il(lt);continue}}yt!==null?(yt.return=st,bt=yt):il(lt)}ot=ot.sibling}e:for(ot=null,lt=f;;){if(lt.tag===5){if(ot===null){ot=lt;try{R=lt.stateNode,He?(B=R.style,typeof B.setProperty=="function"?B.setProperty("display","none","important"):B.display="none"):(_e=lt.stateNode,Pe=lt.memoizedProps.style,ee=Pe!=null&&Pe.hasOwnProperty("display")?Pe.display:null,_e.style.display=ht("display",ee))}catch(St){Yn(f,f.return,St)}}}else if(lt.tag===6){if(ot===null)try{lt.stateNode.nodeValue=He?"":lt.memoizedProps}catch(St){Yn(f,f.return,St)}}else if((lt.tag!==22&&lt.tag!==23||lt.memoizedState===null||lt===f)&&lt.child!==null){lt.child.return=lt,lt=lt.child;continue}if(lt===f)break e;for(;lt.sibling===null;){if(lt.return===null||lt.return===f)break e;ot===lt&&(ot=null),lt=lt.return}ot===lt&&(ot=null),lt.sibling.return=lt.return,lt=lt.sibling}}break;case 19:rs(p,f),qs(f),S&4&&Su(f);break;case 21:break;default:rs(p,f),qs(f)}}function qs(f){var p=f.flags;if(p&2){try{e:{for(var w=f.return;w!==null;){if(N2(w)){var S=w;break e}w=w.return}throw Error(n(160))}switch(S.tag){case 5:var R=S.stateNode;S.flags&32&&(en(R,""),S.flags&=-33);var B=D2(f);Mp(f,B,R);break;case 3:case 4:var ee=S.stateNode.containerInfo,_e=D2(f);W0(f,_e,ee);break;default:throw Error(n(161))}}catch(Pe){Yn(f,f.return,Pe)}f.flags&=-3}p&4096&&(f.flags&=-4097)}function Rp(f,p,w){bt=f,q0(f)}function q0(f,p,w){for(var S=(f.mode&1)!==0;bt!==null;){var R=bt,B=R.child;if(R.tag===22&&S){var ee=R.memoizedState!==null||Ip;if(!ee){var _e=R.alternate,Pe=_e!==null&&_e.memoizedState!==null||Hn;_e=Ip;var He=Hn;if(Ip=ee,(Hn=Pe)&&!He)for(bt=R;bt!==null;)ee=bt,Pe=ee.child,ee.tag===22&&ee.memoizedState!==null?B2(R):Pe!==null?(Pe.return=ee,bt=Pe):B2(R);for(;B!==null;)bt=B,q0(B),B=B.sibling;bt=R,Ip=_e,Hn=He}Qs(f)}else(R.subtreeFlags&8772)!==0&&B!==null?(B.return=R,bt=B):Qs(f)}}function Qs(f){for(;bt!==null;){var p=bt;if((p.flags&8772)!==0){var w=p.alternate;try{if((p.flags&8772)!==0)switch(p.tag){case 0:case 11:case 15:Hn||oh(5,p);break;case 1:var S=p.stateNode;if(p.flags&4&&!Hn)if(w===null)S.componentDidMount();else{var R=p.elementType===p.type?w.memoizedProps:Es(p.type,w.memoizedProps);S.componentDidUpdate(R,w.memoizedState,S.__reactInternalSnapshotBeforeUpdate)}var B=p.updateQueue;B!==null&&y0(p,B,S);break;case 3:var ee=p.updateQueue;if(ee!==null){if(w=null,p.child!==null)switch(p.child.tag){case 5:w=p.child.stateNode;break;case 1:w=p.child.stateNode}y0(p,ee,w)}break;case 5:var _e=p.stateNode;if(w===null&&p.flags&4){w=_e;var Pe=p.memoizedProps;switch(p.type){case"button":case"input":case"select":case"textarea":Pe.autoFocus&&w.focus();break;case"img":Pe.src&&(w.src=Pe.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(p.memoizedState===null){var He=p.alternate;if(He!==null){var ot=He.memoizedState;if(ot!==null){var lt=ot.dehydrated;lt!==null&&Ye(lt)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}Hn||p.flags&512&&Op(p)}catch(st){Yn(p,p.return,st)}}if(p===f){bt=null;break}if(w=p.sibling,w!==null){w.return=p.return,bt=w;break}bt=p.return}}function il(f){for(;bt!==null;){var p=bt;if(p===f){bt=null;break}var w=p.sibling;if(w!==null){w.return=p.return,bt=w;break}bt=p.return}}function B2(f){for(;bt!==null;){var p=bt;try{switch(p.tag){case 0:case 11:case 15:var w=p.return;try{oh(4,p)}catch(Pe){Yn(p,w,Pe)}break;case 1:var S=p.stateNode;if(typeof S.componentDidMount=="function"){var R=p.return;try{S.componentDidMount()}catch(Pe){Yn(p,R,Pe)}}var B=p.return;try{Op(p)}catch(Pe){Yn(p,B,Pe)}break;case 5:var ee=p.return;try{Op(p)}catch(Pe){Yn(p,ee,Pe)}}}catch(Pe){Yn(p,p.return,Pe)}if(p===f){bt=null;break}var _e=p.sibling;if(_e!==null){_e.return=p.return,bt=_e;break}bt=p.return}}var L2=Math.ceil,kp=C.ReactCurrentDispatcher,Q0=C.ReactCurrentOwner,Ss=C.ReactCurrentBatchConfig,ln=0,Cr=null,dr=null,Wr=0,is=0,Tu=ki(0),_r=0,ah=null,sl=0,lh=0,Np=0,ch=null,Fi=null,X0=0,cc=1/0,ua=null,Dp=!1,Y0=null,ol=null,Bp=!1,al=null,wi=0,uh=0,K0=null,Lp=-1,fh=0;function xi(){return(ln&6)!==0?Pn():Lp!==-1?Lp:Lp=Pn()}function ll(f){return(f.mode&1)===0?1:(ln&2)!==0&&Wr!==0?Wr&-Wr:m2.transition!==null?(fh===0&&(fh=Ef()),fh):(f=an,f!==0||(f=window.event,f=f===void 0?16:If(f.type)),f)}function Xs(f,p,w,S){if(50<uh)throw uh=0,K0=null,Error(n(185));Vl(f,w,S),((ln&2)===0||f!==Cr)&&(f===Cr&&((ln&2)===0&&(lh|=w),_r===4&&cl(f,Wr)),Ui(f,S),w===1&&ln===0&&(p.mode&1)===0&&(cc=Pn()+500,ip&&Za()))}function Ui(f,p){var w=f.callbackNode;Qm(f,p);var S=Qo(f,f===Cr?Wr:0);if(S===0)w!==null&&zl(w),f.callbackNode=null,f.callbackPriority=0;else if(p=S&-S,f.callbackPriority!==p){if(w!=null&&zl(w),p===1)f.tag===0?Zl(F2.bind(null,f)):d2(F2.bind(null,f)),ep(function(){(ln&6)===0&&Za()}),w=null;else{switch(Xo(S)){case 1:w=xf;break;case 4:w=Cd;break;case 16:w=Ua;break;case 536870912:w=Af;break;default:w=Ua}w=H2(w,Fp.bind(null,f))}f.callbackPriority=p,f.callbackNode=w}}function Fp(f,p){if(Lp=-1,fh=0,(ln&6)!==0)throw Error(n(327));var w=f.callbackNode;if(Cu()&&f.callbackNode!==w)return null;var S=Qo(f,f===Cr?Wr:0);if(S===0)return null;if((S&30)!==0||(S&f.expiredLanes)!==0||p)p=Up(f,S);else{p=S;var R=ln;ln|=2;var B=z2();(Cr!==f||Wr!==p)&&(ua=null,cc=Pn()+500,fc(f,p));do try{g3();break}catch(_e){U2(f,_e)}while(!0);na(),kp.current=B,ln=R,dr!==null?p=0:(Cr=null,Wr=0,p=_r)}if(p!==0){if(p===2&&(R=Hc(f),R!==0&&(S=R,p=G0(f,R))),p===1)throw w=ah,fc(f,0),cl(f,S),Ui(f,Pn()),w;if(p===6)cl(f,S);else{if(R=f.current.alternate,(S&30)===0&&!d3(R)&&(p=Up(f,S),p===2&&(B=Hc(f),B!==0&&(S=B,p=G0(f,B))),p===1))throw w=ah,fc(f,0),cl(f,S),Ui(f,Pn()),w;switch(f.finishedWork=R,f.finishedLanes=S,p){case 0:case 1:throw Error(n(345));case 2:hc(f,Fi,ua);break;case 3:if(cl(f,S),(S&130023424)===S&&(p=X0+500-Pn(),10<p)){if(Qo(f,0)!==0)break;if(R=f.suspendedLanes,(R&S)!==S){xi(),f.pingedLanes|=f.suspendedLanes&R;break}f.timeoutHandle=Xa(hc.bind(null,f,Fi,ua),p);break}hc(f,Fi,ua);break;case 4:if(cl(f,S),(S&4194240)===S)break;for(p=f.eventTimes,R=-1;0<S;){var ee=31-Gi(S);B=1<<ee,ee=p[ee],ee>R&&(R=ee),S&=~B}if(S=R,S=Pn()-S,S=(120>S?120:480>S?480:1080>S?1080:1920>S?1920:3e3>S?3e3:4320>S?4320:1960*L2(S/1960))-S,10<S){f.timeoutHandle=Xa(hc.bind(null,f,Fi,ua),S);break}hc(f,Fi,ua);break;case 5:hc(f,Fi,ua);break;default:throw Error(n(329))}}}return Ui(f,Pn()),f.callbackNode===w?Fp.bind(null,f):null}function G0(f,p){var w=ch;return f.current.memoizedState.isDehydrated&&(fc(f,p).flags|=256),f=Up(f,p),f!==2&&(p=Fi,Fi=w,p!==null&&Z0(p)),f}function Z0(f){Fi===null?Fi=f:Fi.push.apply(Fi,f)}function d3(f){for(var p=f;;){if(p.flags&16384){var w=p.updateQueue;if(w!==null&&(w=w.stores,w!==null))for(var S=0;S<w.length;S++){var R=w[S],B=R.getSnapshot;R=R.value;try{if(!We(B(),R))return!1}catch{return!1}}}if(w=p.child,p.subtreeFlags&16384&&w!==null)w.return=p,p=w;else{if(p===f)break;for(;p.sibling===null;){if(p.return===null||p.return===f)return!0;p=p.return}p.sibling.return=p.return,p=p.sibling}}return!0}function cl(f,p){for(p&=~Np,p&=~lh,f.suspendedLanes|=p,f.pingedLanes&=~p,f=f.expirationTimes;0<p;){var w=31-Gi(p),S=1<<w;f[w]=-1,p&=~S}}function F2(f){if((ln&6)!==0)throw Error(n(327));Cu();var p=Qo(f,0);if((p&1)===0)return Ui(f,Pn()),null;var w=Up(f,p);if(f.tag!==0&&w===2){var S=Hc(f);S!==0&&(p=S,w=G0(f,S))}if(w===1)throw w=ah,fc(f,0),cl(f,p),Ui(f,Pn()),w;if(w===6)throw Error(n(345));return f.finishedWork=f.current.alternate,f.finishedLanes=p,hc(f,Fi,ua),Ui(f,Pn()),null}function J0(f,p){var w=ln;ln|=1;try{return f(p)}finally{ln=w,ln===0&&(cc=Pn()+500,ip&&Za())}}function uc(f){al!==null&&al.tag===0&&(ln&6)===0&&Cu();var p=ln;ln|=1;var w=Ss.transition,S=an;try{if(Ss.transition=null,an=1,f)return f()}finally{an=S,Ss.transition=w,ln=p,(ln&6)===0&&Za()}}function e1(){is=Tu.current,Un(Tu)}function fc(f,p){f.finishedWork=null,f.finishedLanes=0;var w=f.timeoutHandle;if(w!==-1&&(f.timeoutHandle=-1,zf(w)),dr!==null)for(w=dr.return;w!==null;){var S=w;switch(tc(S),S.tag){case 1:S=S.type.childContextTypes,S!=null&&rp();break;case 3:tl(),Un(Ni),Un(ei),pp();break;case 5:dp(S);break;case 4:tl();break;case 13:Un($n);break;case 19:Un($n);break;case 10:cp(S.type._context);break;case 22:case 23:e1()}w=w.return}if(Cr=f,dr=f=Ys(f.current,null),Wr=is=p,_r=0,ah=null,Np=lh=sl=0,Fi=ch=null,rc!==null){for(p=0;p<rc.length;p++)if(w=rc[p],S=w.interleaved,S!==null){w.interleaved=null;var R=S.next,B=w.pending;if(B!==null){var ee=B.next;B.next=R,S.next=ee}w.pending=S}rc=null}return f}function U2(f,p){do{var w=dr;try{if(na(),Qf.current=_p,mu){for(var S=Xn.memoizedState;S!==null;){var R=S.queue;R!==null&&(R.pending=null),S=S.next}mu=!1}if(nl=0,br=ir=Xn=null,Xf=!1,sc=0,Q0.current=null,w===null||w.return===null){_r=1,ah=p,dr=null;break}e:{var B=f,ee=w.return,_e=w,Pe=p;if(p=Wr,_e.flags|=32768,Pe!==null&&typeof Pe=="object"&&typeof Pe.then=="function"){var He=Pe,ot=_e,lt=ot.tag;if((ot.mode&1)===0&&(lt===0||lt===11||lt===15)){var st=ot.alternate;st?(ot.updateQueue=st.updateQueue,ot.memoizedState=st.memoizedState,ot.lanes=st.lanes):(ot.updateQueue=null,ot.memoizedState=null)}var yt=C2(ee);if(yt!==null){yt.flags&=-257,N0(yt,ee,_e,B,p),yt.mode&1&&Jf(B,He,p),p=yt,Pe=He;var xt=p.updateQueue;if(xt===null){var St=new Set;St.add(Pe),p.updateQueue=St}else xt.add(Pe);break e}else{if((p&1)===0){Jf(B,He,p),t1();break e}Pe=Error(n(426))}}else if(zn&&_e.mode&1){var sr=C2(ee);if(sr!==null){(sr.flags&65536)===0&&(sr.flags|=256),N0(sr,ee,_e,B,p),xo(lc(Pe,_e));break e}}B=Pe=lc(Pe,_e),_r!==4&&(_r=2),ch===null?ch=[B]:ch.push(B),B=ee;do{switch(B.tag){case 3:B.flags|=65536,p&=-p,B.lanes|=p;var Ue=Zf(B,Pe,p);b2(B,Ue);break e;case 1:_e=Pe;var Oe=B.type,je=B.stateNode;if((B.flags&128)===0&&(typeof Oe.getDerivedStateFromError=="function"||je!==null&&typeof je.componentDidCatch=="function"&&(ol===null||!ol.has(je)))){B.flags|=65536,p&=-p,B.lanes|=p;var ct=Sp(B,_e,p);b2(B,ct);break e}}B=B.return}while(B!==null)}V2(w)}catch(Tt){p=Tt,dr===w&&w!==null&&(dr=w=w.return);continue}break}while(!0)}function z2(){var f=kp.current;return kp.current=_p,f===null?_p:f}function t1(){(_r===0||_r===3||_r===2)&&(_r=4),Cr===null||(sl&268435455)===0&&(lh&268435455)===0||cl(Cr,Wr)}function Up(f,p){var w=ln;ln|=2;var S=z2();(Cr!==f||Wr!==p)&&(ua=null,fc(f,p));do try{p3();break}catch(R){U2(f,R)}while(!0);if(na(),ln=w,kp.current=S,dr!==null)throw Error(n(261));return Cr=null,Wr=0,_r}function p3(){for(;dr!==null;)j2(dr)}function g3(){for(;dr!==null&&!qo();)j2(dr)}function j2(f){var p=$2(f.alternate,f,is);f.memoizedProps=f.pendingProps,p===null?V2(f):dr=p,Q0.current=null}function V2(f){var p=f;do{var w=p.alternate;if(f=p.return,(p.flags&32768)===0){if(w=u3(w,p,is),w!==null){dr=w;return}}else{if(w=f3(w,p),w!==null){w.flags&=32767,dr=w;return}if(f!==null)f.flags|=32768,f.subtreeFlags=0,f.deletions=null;else{_r=6,dr=null;return}}if(p=p.sibling,p!==null){dr=p;return}dr=p=f}while(p!==null);_r===0&&(_r=5)}function hc(f,p,w){var S=an,R=Ss.transition;try{Ss.transition=null,an=1,m3(f,p,w,S)}finally{Ss.transition=R,an=S}return null}function m3(f,p,w,S){do Cu();while(al!==null);if((ln&6)!==0)throw Error(n(327));w=f.finishedWork;var R=f.finishedLanes;if(w===null)return null;if(f.finishedWork=null,f.finishedLanes=0,w===f.current)throw Error(n(177));f.callbackNode=null,f.callbackPriority=0;var B=w.lanes|w.childLanes;if(kd(f,B),f===Cr&&(dr=Cr=null,Wr=0),(w.subtreeFlags&2064)===0&&(w.flags&2064)===0||Bp||(Bp=!0,H2(Ua,function(){return Cu(),null})),B=(w.flags&15990)!==0,(w.subtreeFlags&15990)!==0||B){B=Ss.transition,Ss.transition=null;var ee=an;an=1;var _e=ln;ln|=4,Q0.current=null,h3(f,w),H0(w,f),o3(Gl),Ln=!!Ff,Gl=Ff=null,f.current=w,Rp(w),Td(),ln=_e,an=ee,Ss.transition=B}else f.current=w;if(Bp&&(Bp=!1,al=f,wi=R),B=f.pendingLanes,B===0&&(ol=null),qm(w.stateNode),Ui(f,Pn()),p!==null)for(S=f.onRecoverableError,w=0;w<p.length;w++)R=p[w],S(R.value,{componentStack:R.stack,digest:R.digest});if(Dp)throw Dp=!1,f=Y0,Y0=null,f;return(wi&1)!==0&&f.tag!==0&&Cu(),B=f.pendingLanes,(B&1)!==0?f===K0?uh++:(uh=0,K0=f):uh=0,Za(),null}function Cu(){if(al!==null){var f=Xo(wi),p=Ss.transition,w=an;try{if(Ss.transition=null,an=16>f?16:f,al===null)var S=!1;else{if(f=al,al=null,wi=0,(ln&6)!==0)throw Error(n(331));var R=ln;for(ln|=4,bt=f.current;bt!==null;){var B=bt,ee=B.child;
vendor: 6,442 bytes, line 40
40if((bt.flags&16)!==0){var _e=B.deletions;if(_e!==null){for(var Pe=0;Pe<_e.length;Pe++){var He=_e[Pe];for(bt=He;bt!==null;){var ot=bt;switch(ot.tag){case 0:case 11:case 15:ca(8,ot,B)}var lt=ot.child;if(lt!==null)lt.return=ot,bt=lt;else for(;bt!==null;){ot=bt;var st=ot.sibling,yt=ot.return;if(k2(ot),ot===He){bt=null;break}if(st!==null){st.return=yt,bt=st;break}bt=yt}}}var xt=B.alternate;if(xt!==null){var St=xt.child;if(St!==null){xt.child=null;do{var sr=St.sibling;St.sibling=null,St=sr}while(St!==null)}}bt=B}}if((B.subtreeFlags&2064)!==0&&ee!==null)ee.return=B,bt=ee;else e:for(;bt!==null;){if(B=bt,(B.flags&2048)!==0)switch(B.tag){case 0:case 11:case 15:ca(9,B,B.return)}var Ue=B.sibling;if(Ue!==null){Ue.return=B.return,bt=Ue;break e}bt=B.return}}var Oe=f.current;for(bt=Oe;bt!==null;){ee=bt;var je=ee.child;if((ee.subtreeFlags&2064)!==0&&je!==null)je.return=ee,bt=je;else e:for(ee=Oe;bt!==null;){if(_e=bt,(_e.flags&2048)!==0)try{switch(_e.tag){case 0:case 11:case 15:oh(9,_e)}}catch(Tt){Yn(_e,_e.return,Tt)}if(_e===ee){bt=null;break e}var ct=_e.sibling;if(ct!==null){ct.return=_e.return,bt=ct;break e}bt=_e.return}}if(ln=R,Za(),ps&&typeof ps.onPostCommitFiberRoot=="function")try{ps.onPostCommitFiberRoot(Wc,f)}catch{}S=!0}return S}finally{an=w,Ss.transition=p}}return!1}function zp(f,p,w){p=lc(w,p),p=Zf(f,p,1),f=xs(f,p,1),p=xi(),f!==null&&(Vl(f,1,p),Ui(f,p))}function Yn(f,p,w){if(f.tag===3)zp(f,f,w);else for(;p!==null;){if(p.tag===3){zp(p,f,w);break}else if(p.tag===1){var S=p.stateNode;if(typeof p.type.getDerivedStateFromError=="function"||typeof S.componentDidCatch=="function"&&(ol===null||!ol.has(S))){f=lc(w,f),f=Sp(p,f,1),p=xs(p,f,1),f=xi(),p!==null&&(Vl(p,1,f),Ui(p,f));break}}p=p.return}}function v3(f,p,w){var S=f.pingCache;S!==null&&S.delete(p),p=xi(),f.pingedLanes|=f.suspendedLanes&w,Cr===f&&(Wr&w)===w&&(_r===4||_r===3&&(Wr&130023424)===Wr&&500>Pn()-X0?fc(f,0):Np|=w),Ui(f,p)}function W2(f,p){p===0&&((f.mode&1)===0?p=1:(p=$c,$c<<=1,($c&130023424)===0&&($c=4194304)));var w=xi();f=ra(f,p),f!==null&&(Vl(f,p,w),Ui(f,w))}function y3(f){var p=f.memoizedState,w=0;p!==null&&(w=p.retryLane),W2(f,w)}function b3(f,p){var w=0;switch(f.tag){case 13:var S=f.stateNode,R=f.memoizedState;R!==null&&(w=R.retryLane);break;case 19:S=f.stateNode;break;default:throw Error(n(314))}S!==null&&S.delete(p),W2(f,w)}var $2;$2=function(f,p,w){if(f!==null)if(f.memoizedProps!==p.pendingProps||Ni.current)bi=!0;else{if((f.lanes&w)===0&&(p.flags&128)===0)return bi=!1,O2(f,p,w);bi=(f.flags&131072)!==0}else bi=!1,zn&&(p.flags&1048576)!==0&&p2(p,op,p.index);switch(p.lanes=0,p.tag){case 2:var S=p.type;Pp(f,p),f=p.pendingProps;var R=fu(p,ei.current);el(p,w),R=oc(null,p,S,f,R,w);var B=gp();return p.flags|=1,typeof R=="object"&&R!==null&&typeof R.render=="function"&&R.$$typeof===void 0?(p.tag=1,p.memoizedState=null,p.updateQueue=null,Di(S)?(B=!0,vs(p)):B=!1,p.memoizedState=R.state!==null&&R.state!==void 0?R.state:null,fp(p),R.updater=Ap,p.stateNode=R,R._reactInternals=p,k0(p,S,f,w),p=z0(null,p,S,!0,B,w)):(p.tag=0,zn&&B&&jf(p),zr(null,p,R,w),p=p.child),p;case 16:S=p.elementType;e:{switch(Pp(f,p),f=p.pendingProps,R=S._init,S=R(S._payload),p.type=S,R=p.tag=w3(S),f=Es(S,f),R){case 0:p=F0(null,p,S,f,w);break e;case 1:p=U0(null,p,S,f,w);break e;case 11:p=P2(null,p,S,f,w);break e;case 14:p=D0(null,p,S,Es(S.type,f),w);break e}throw Error(n(306,S,""))}return p;case 0:return S=p.type,R=p.pendingProps,R=p.elementType===S?R:Es(S,R),F0(f,p,S,R,w);case 1:return S=p.type,R=p.pendingProps,R=p.elementType===S?R:Es(S,R),U0(f,p,S,R,w);case 3:e:{if(I2(p),f===null)throw Error(n(387));S=p.pendingProps,B=p.memoizedState,R=B.element,y2(f,p),pu(p,S,null,w);var ee=p.memoizedState;if(S=ee.element,B.isDehydrated)if(B={element:S,isDehydrated:!1,cache:ee.cache,pendingSuspenseBoundaries:ee.pendingSuspenseBoundaries,transitions:ee.transitions},p.updateQueue.baseState=B,p.memoizedState=B,p.flags&256){R=lc(Error(n(423)),p),p=Co(f,p,S,w,R);break e}else if(S!==R){R=lc(Error(n(424)),p),p=Co(f,p,S,w,R);break e}else for(ts=Ya(p.stateNode.containerInfo.firstChild),ni=p,zn=!0,Vs=null,w=lp(p,null,S,w),p.child=w;w;)w.flags=w.flags&-3|4096,w=w.sibling;else{if(wo(),S===R){p=$s(f,p,w);break e}zr(f,p,S,w)}p=p.child}return p;case 5:return _0(p),f===null&&Bi(p),S=p.type,R=p.pendingProps,B=f!==null?f.memoizedProps:null,ee=R.children,Uf(S,R)?ee=null:B!==null&&Uf(S,B)&&(p.flags|=32),L0(f,p),zr(f,p,ee,w),p.child;case 6:return f===null&&Bi(p),null;case 13:return Cp(f,p,w);case 4:return b0(p,p.stateNode.containerInfo),S=p.pendingProps,f===null?p.child=Jn(p,null,S,w):zr(f,p,S,w),p.child;case 11:return S=p.type,R=p.pendingProps,R=p.elementType===S?R:Es(S,R),P2(f,p,S,R,w);case 7:return zr(f,p,p.pendingProps,w),p.child;case 8:return zr(f,p,p.pendingProps.children,w),p.child;case 12:return zr(f,p,p.pendingProps.children,w),p.child;case 10:e:{if(S=p.type._context,R=p.pendingProps,B=p.memoizedProps,ee=R.value,On($f,S._currentValue),S._currentValue=ee,B!==null)if(We(B.value,ee)){if(B.children===R.children&&!Ni.current){p=$s(f,p,w);break e}}else for(B=p.child,B!==null&&(B.return=p);B!==null;){var _e=B.dependencies;if(_e!==null){ee=B.child;for(var Pe=_e.firstContext;Pe!==null;){if(Pe.context===S){if(B.tag===1){Pe=ia(-1,w&-w),Pe.tag=2;var He=B.updateQueue;if(He!==null){He=He.shared;var ot=He.pending;ot===null?Pe.next=Pe:(Pe.next=ot.next,ot.next=Pe),He.pending=Pe}}B.lanes|=w,Pe=B.alternate,Pe!==null&&(Pe.lanes|=w),Ur(B.return,w,p),_e.lanes|=w;break}Pe=Pe.next}}else if(B.tag===10)ee=B.type===p.type?null:B.child;else if(B.tag===18){if(ee=B.return,ee===null)throw Error(n(341));ee.lanes|=w,_e=ee.alternate,_e!==null&&(_e.lanes|=w),Ur(ee,w,p),ee=B.sibling}else ee=B.child;if(ee!==null)ee.return=B;else for(ee=B;ee!==null;){if(ee===p){ee=null;break}if(B=ee.sibling,B!==null){B.return=ee.return,ee=B;break}ee=ee.return}B=ee}zr(f,p,R.children,w),p=p.child}return p;case 9:return R=p.type,S=p.pendingProps.children,el(p,w),R=_s(R),S=S(R),p.flags|=1,zr(f,p,S,w),p.child;case 14:return S=p.type,R=Es(S,p.pendingProps),R=Es(S.type,R),D0(f,p,S,R,w);case 15:return To(f,p,p.type,p.pendingProps,w);case 17:return S=p.type,R=p.pendingProps,R=p.elementType===S?R:Es(S,R),Pp(f,p),p.tag=1,Di(S)?(f=!0,vs(p)):f=!1,el(p,w),ac(p,S,R),k0(p,S,R,w),z0(null,p,S,!0,f,w);case 19:return rl(f,p,w);case 22:return B0(f,p,w)}throw Error(n(156,p.tag))};function H2(f,p){return Fa(f,p)}function _3(f,p,w,S){this.tag=f,this.key=w,this.sibling=this.child=this.return=this.stateNode=this.t
vendor: 7,601 bytes, line 40
40ype=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=p,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=S,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ts(f,p,w,S){return new _3(f,p,w,S)}function jp(f){return f=f.prototype,!(!f||!f.isReactComponent)}function w3(f){if(typeof f=="function")return jp(f)?1:0;if(f!=null){if(f=f.$$typeof,f===z)return 11;if(f===K)return 14}return 2}function Ys(f,p){var w=f.alternate;return w===null?(w=Ts(f.tag,p,f.key,f.mode),w.elementType=f.elementType,w.type=f.type,w.stateNode=f.stateNode,w.alternate=f,f.alternate=w):(w.pendingProps=p,w.type=f.type,w.flags=0,w.subtreeFlags=0,w.deletions=null),w.flags=f.flags&14680064,w.childLanes=f.childLanes,w.lanes=f.lanes,w.child=f.child,w.memoizedProps=f.memoizedProps,w.memoizedState=f.memoizedState,w.updateQueue=f.updateQueue,p=f.dependencies,w.dependencies=p===null?null:{lanes:p.lanes,firstContext:p.firstContext},w.sibling=f.sibling,w.index=f.index,w.ref=f.ref,w}function Vp(f,p,w,S,R,B){var ee=2;if(S=f,typeof f=="function")jp(f)&&(ee=1);else if(typeof f=="string")ee=5;else e:switch(f){case N:return dc(w.children,R,B,p);case U:ee=8,R|=8;break;case F:return f=Ts(12,w,p,R|2),f.elementType=F,f.lanes=B,f;case V:return f=Ts(13,w,p,R),f.elementType=V,f.lanes=B,f;case M:return f=Ts(19,w,p,R),f.elementType=M,f.lanes=B,f;case q:return Wp(w,R,B,p);default:if(typeof f=="object"&&f!==null)switch(f.$$typeof){case H:ee=10;break e;case W:ee=9;break e;case z:ee=11;break e;case K:ee=14;break e;case j:ee=16,S=null;break e}throw Error(n(130,f==null?f:typeof f,""))}return p=Ts(ee,w,p,R),p.elementType=f,p.type=S,p.lanes=B,p}function dc(f,p,w,S){return f=Ts(7,f,S,p),f.lanes=w,f}function Wp(f,p,w,S){return f=Ts(22,f,S,p),f.elementType=q,f.lanes=w,f.stateNode={isHidden:!1},f}function n1(f,p,w){return f=Ts(6,f,null,p),f.lanes=w,f}function r1(f,p,w){return p=Ts(4,f.children!==null?f.children:[],f.key,p),p.lanes=w,p.stateNode={containerInfo:f.containerInfo,pendingChildren:null,implementation:f.implementation},p}function x3(f,p,w,S,R){this.tag=p,this.containerInfo=f,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=jl(0),this.expirationTimes=jl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=jl(0),this.identifierPrefix=S,this.onRecoverableError=R,this.mutableSourceEagerHydrationData=null}function i1(f,p,w,S,R,B,ee,_e,Pe){return f=new x3(f,p,w,_e,Pe),p===1?(p=1,B===!0&&(p|=8)):p=0,B=Ts(3,null,null,p),f.current=B,B.stateNode=f,B.memoizedState={element:S,isDehydrated:w,cache:null,transitions:null,pendingSuspenseBoundaries:null},fp(B),f}function A3(f,p,w){var S=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:O,key:S==null?null:""+S,children:f,containerInfo:p,implementation:w}}function q2(f){if(!f)return Ga;f=f._reactInternals;e:{if(zs(f)!==f||f.tag!==1)throw Error(n(170));var p=f;do{switch(p.tag){case 3:p=p.stateNode.context;break e;case 1:if(Di(p.type)){p=p.stateNode.__reactInternalMemoizedMergedChildContext;break e}}p=p.return}while(p!==null);throw Error(n(171))}if(f.tag===1){var w=f.type;if(Di(w))return f2(f,w,p)}return p}function Q2(f,p,w,S,R,B,ee,_e,Pe){return f=i1(w,S,!0,f,R,B,ee,_e,Pe),f.context=q2(null),w=f.current,S=xi(),R=ll(w),B=ia(S,R),B.callback=p??null,xs(w,B,R),f.current.lanes=R,Vl(f,R,S),Ui(f,S),f}function $p(f,p,w,S){var R=p.current,B=xi(),ee=ll(R);return w=q2(w),p.context===null?p.context=w:p.pendingContext=w,p=ia(B,ee),p.payload={element:f},S=S===void 0?null:S,S!==null&&(p.callback=S),f=xs(R,p,ee),f!==null&&(Xs(f,R,ee,B),hp(f,R,ee)),ee}function Hp(f){if(f=f.current,!f.child)return null;switch(f.child.tag){case 5:return f.child.stateNode;default:return f.child.stateNode}}function X2(f,p){if(f=f.memoizedState,f!==null&&f.dehydrated!==null){var w=f.retryLane;f.retryLane=w!==0&&w<p?w:p}}function s1(f,p){X2(f,p),(f=f.alternate)&&X2(f,p)}function E3(){return null}var Y2=typeof reportError=="function"?reportError:function(f){console.error(f)};function qp(f){this._internalRoot=f}hh.prototype.render=qp.prototype.render=function(f){var p=this._internalRoot;if(p===null)throw Error(n(409));$p(f,p,null,null)},hh.prototype.unmount=qp.prototype.unmount=function(){var f=this._internalRoot;if(f!==null){this._internalRoot=null;var p=f.containerInfo;uc(function(){$p(null,f,null,null)}),p[es]=null}};function hh(f){this._internalRoot=f}hh.prototype.unstable_scheduleHydration=function(f){if(f){var p=Tf();f={blockedOn:null,target:f,priority:p};for(var w=0;w<ho.length&&p!==0&&p<ho[w].priority;w++);ho.splice(w,0,f),w===0&&Ld(f)}};function o1(f){return!(!f||f.nodeType!==1&&f.nodeType!==9&&f.nodeType!==11)}function Qp(f){return!(!f||f.nodeType!==1&&f.nodeType!==9&&f.nodeType!==11&&(f.nodeType!==8||f.nodeValue!==" react-mount-point-unstable "))}function K2(){}function S3(f,p,w,S,R){if(R){if(typeof S=="function"){var B=S;S=function(){var He=Hp(ee);B.call(He)}}var ee=Q2(p,S,f,0,null,!1,!1,"",K2);return f._reactRootContainer=ee,f[es]=ee.current,Qa(f.nodeType===8?f.parentNode:f),uc(),ee}for(;R=f.lastChild;)f.removeChild(R);if(typeof S=="function"){var _e=S;S=function(){var He=Hp(Pe);_e.call(He)}}var Pe=i1(f,0,!1,null,null,!1,!1,"",K2);return f._reactRootContainer=Pe,f[es]=Pe.current,Qa(f.nodeType===8?f.parentNode:f),uc(function(){$p(p,Pe,w,S)}),Pe}function pc(f,p,w,S,R){var B=w._reactRootContainer;if(B){var ee=B;if(typeof R=="function"){var _e=R;R=function(){var Pe=Hp(ee);_e.call(Pe)}}$p(p,ee,f,R)}else ee=S3(w,p,f,R,S);return Hp(ee)}Sf=function(f){switch(f.tag){case 3:var p=f.stateNode;if(p.current.memoizedState.isDehydrated){var w=ja(p.pendingLanes);w!==0&&(Wl(p,w|1),Ui(p,Pn()),(ln&6)===0&&(cc=Pn()+500,Za()))}break;case 13:uc(function(){var S=ra(f,1);if(S!==null){var R=xi();Xs(S,f,1,R)}}),s1(f,1)}},qc=function(f){if(f.tag===13){var p=ra(f,134217728);if(p!==null){var w=xi();Xs(p,f,134217728,w)}s1(f,134217728)}},Nd=function(f){if(f.tag===13){var p=ll(f),w=ra(f,p);if(w!==null){var S=xi();Xs(w,f,p,S)}s1(f,p)}},Tf=function(){return an},Cf=function(f,p){var w=an;try{return an=f,p()}finally{an=w}},di=function(f,p,w){switch(p){case"input":if(Z(f,w),p=w.name,w.type==="radio"&&p!=null){for(w=f;w.parentNode;)w=w.parentNode;for(w=w.querySelectorAll("input[name="+JSON.stringify(""+p)+'][type="radio"]'),p=0;p<w.length;p++){var S=w[p];if(S!==f&&S.form===f.form){var R=np(S);if(!R)throw Error(n(90));ve(S),Z(S,R)}}}break;case"textarea":nt(f,w);break;case"select":p=w.value,p!=null&&Te(f,!!w.multiple,p,!1)}},vn=J0,Br=uc;var T3={usingClientEntryPoint:!1,Events:[Jr,qt,np,cr,lo,J0]},dh={findFiberByHostInstance:vo,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},C3={bundleType:dh.bundleType,version:dh.version,rendererPackageName:dh.rendererPackageName,rendererConfig:dh.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:C.ReactCurrentDispatcher,findHostInstanceByFiber:function(f){return f=Lr(f),f===null?null:f.stateNode},findFiberByHostInstance:dh.findFiberByHostInstance||E3,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};
40if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Xp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Xp.isDisabled&&Xp.supportsFiber)try{Wc=Xp.inject(C3),ps=Xp}catch{}}return Os.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=T3,Os.createPortal=function(f,p){var w=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!o1(p))throw Error(n(200));return A3(f,p,null,w)},Os.createRoot=function(f,p){if(!o1(f))throw Error(n(299));var w=!1,S="",R=Y2;return p!=null&&(p.unstable_strictMode===!0&&(w=!0),p.identifierPrefix!==void 0&&(S=p.identifierPrefix),p.onRecoverableError!==void 0&&(R=p.onRecoverableError)),p=i1(f,1,!1,null,null,w,!1,S,R),f[es]=p.current,Qa(f.nodeType===8?f.parentNode:f),new qp(p)},Os.findDOMNode=function(f){if(f==null)return null;if(f.nodeType===1)return f;var p=f._reactInternals;if(p===void 0)throw typeof f.render=="function"?Error(n(188)):(f=Object.keys(f).join(","),Error(n(268,f)));return f=Lr(p),f=f===null?null:f.stateNode,f},Os.flushSync=function(f){return uc(f)},Os.hydrate=function(f,p,w){if(!Qp(p))throw Error(n(200));return pc(null,f,p,!0,w)},Os.hydrateRoot=function(f,p,w){if(!o1(f))throw Error(n(405));var S=w!=null&&w.hydratedSources||null,R=!1,B="",ee=Y2;if(w!=null&&(w.unstable_strictMode===!0&&(R=!0),w.identifierPrefix!==void 0&&(B=w.identifierPrefix),w.onRecoverableError!==void 0&&(ee=w.onRecoverableError)),p=Q2(p,null,f,1,w??null,R,!1,B,ee),f[es]=p.current,Qa(f),S)for(f=0;f<S.length;f++)w=S[f],R=w._getVersion,R=R(w._source),p.mutableSourceEagerHydrationData==null?p.mutableSourceEagerHydrationData=[w,R]:p.mutableSourceEagerHydrationData.push(w,R);return new hh(p)},Os.render=function(f,p,w){if(!Qp(p))throw Error(n(200));return pc(null,f,p,!1,w)},Os.unmountComponentAtNode=function(f){if(!Qp(f))throw Error(n(40));return f._reactRootContainer?(uc(function(){pc(null,null,f,!1,function(){f._reactRootContainer=null,f[es]=null})}),!0):!1},Os.unstable_batchedUpdates=J0,Os.unstable_renderSubtreeIntoContainer=function(f,p,w,S){if(!Qp(w))throw Error(n(200));if(f==null||f._reactInternals===void 0)throw Error(n(38));return pc(f,p,w,!1,S)},Os.version="18.3.1-next-f1338f8080-20240426",Os}var ZR;function dW(){if(ZR)return W3.exports;ZR=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),W3.exports=Bee(),W3.exports}var JR;function Lee(){if(JR)return tb;JR=1;var t=dW();return tb.createRoot=t.createRoot,tb.hydrateRoot=t.hydrateRoot,tb}var Fee=Lee(),A=my();const Me=fn(A);var Vx=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Wx=typeof window>"u"||"Deno"in globalThis;function ya(){}function Uee(t,e){return typeof t=="function"?t(e):t}function zee(t){return typeof t=="number"&&t>=0&&t!==1/0}function jee(t,e){return Math.max(t+(e||0)-Date.now(),0)}function H5(t,e){return typeof t=="function"?t(e):t}function Vee(t,e){return typeof t=="function"?t(e):t}function ek(t,e){const{type:n="all",exact:r,fetchStatus:i,predicate:s,queryKey:o,stale:a}=t;if(o){if(r){if(e.queryHash!==WO(o,e.options))return!1}else if(!vv(e.queryKey,o))return!1}if(n!=="all"){const l=e.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof a=="boolean"&&e.isStale()!==a||i&&i!==e.state.fetchStatus||s&&!s(e))}function tk(t,e){const{exact:n,status:r,predicate:i,mutationKey:s}=t;if(s){if(!e.options.mutationKey)return!1;if(n){if(mv(e.options.mutationKey)!==mv(s))return!1}else if(!vv(e.options.mutationKey,s))return!1}return!(r&&e.state.status!==r||i&&!i(e))}function WO(t,e){return((e==null?void 0:e.queryKeyHashFn)||mv)(t)}function mv(t){return JSON.stringify(t,(e,n)=>q5(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function vv(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?Object.keys(e).every(n=>vv(t[n],e[n])):!1}function pW(t,e){if(t===e)return t;const n=nk(t)&&nk(e);if(n||q5(t)&&q5(e)){const r=n?t:Object.keys(t),i=r.length,s=n?e:Object.keys(e),o=s.length,a=n?[]:{},l=new Set(r);let c=0;for(let u=0;u<o;u++){const h=n?u:s[u];
vendor: 8,425 bytes, line 40
40(!n&&l.has(h)||n)&&t[h]===void 0&&e[h]===void 0?(a[h]=void 0,c++):(a[h]=pW(t[h],e[h]),a[h]===t[h]&&t[h]!==void 0&&c++)}return i===o&&c===i?t:a}return e}function nk(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function q5(t){if(!rk(t))return!1;const e=t.constructor;if(e===void 0)return!0;const n=e.prototype;return!(!rk(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function rk(t){return Object.prototype.toString.call(t)==="[object Object]"}function Wee(t){return new Promise(e=>{setTimeout(e,t)})}function $ee(t,e,n){return typeof n.structuralSharing=="function"?n.structuralSharing(t,e):n.structuralSharing!==!1?pW(t,e):e}function Hee(t,e,n=0){const r=[...t,e];return n&&r.length>n?r.slice(1):r}function qee(t,e,n=0){const r=[e,...t];return n&&r.length>n?r.slice(0,-1):r}var $O=Symbol();function gW(t,e){return!t.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!t.queryFn||t.queryFn===$O?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}var Dh,Wu,Fg,rW,Qee=(rW=class extends Vx{constructor(){super();tn(this,Dh);tn(this,Wu);tn(this,Fg);Ft(this,Fg,e=>{if(!Wx&&window.addEventListener){const n=()=>e();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){qe(this,Wu)||this.setEventListener(qe(this,Fg))}onUnsubscribe(){var e;this.hasListeners()||((e=qe(this,Wu))==null||e.call(this),Ft(this,Wu,void 0))}setEventListener(e){var n;Ft(this,Fg,e),(n=qe(this,Wu))==null||n.call(this),Ft(this,Wu,e(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(e){qe(this,Dh)!==e&&(Ft(this,Dh,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(n=>{n(e)})}isFocused(){var e;return typeof qe(this,Dh)=="boolean"?qe(this,Dh):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},Dh=new WeakMap,Wu=new WeakMap,Fg=new WeakMap,rW),mW=new Qee,Ug,$u,zg,iW,Xee=(iW=class extends Vx{constructor(){super();tn(this,Ug,!0);tn(this,$u);tn(this,zg);Ft(this,zg,e=>{if(!Wx&&window.addEventListener){const n=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){qe(this,$u)||this.setEventListener(qe(this,zg))}onUnsubscribe(){var e;this.hasListeners()||((e=qe(this,$u))==null||e.call(this),Ft(this,$u,void 0))}setEventListener(e){var n;Ft(this,zg,e),(n=qe(this,$u))==null||n.call(this),Ft(this,$u,e(this.setOnline.bind(this)))}setOnline(e){qe(this,Ug)!==e&&(Ft(this,Ug,e),this.listeners.forEach(r=>{r(e)}))}isOnline(){return qe(this,Ug)}},Ug=new WeakMap,$u=new WeakMap,zg=new WeakMap,iW),k_=new Xee;function Yee(){let t,e;const n=new Promise((i,s)=>{t=i,e=s});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),t(i)},n.reject=i=>{r({status:"rejected",reason:i}),e(i)},n}function Kee(t){return Math.min(1e3*2**t,3e4)}function vW(t){return(t??"online")==="online"?k_.isOnline():!0}var yW=class extends Error{constructor(t){super("CancelledError"),this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}};function bW(t){let e=!1,n=0,r;const i=Yee(),s=()=>i.status!=="pending",o=v=>{var b;s()||(d(new yW(v)),(b=t.abort)==null||b.call(t))},a=()=>{e=!0},l=()=>{e=!1},c=()=>mW.isFocused()&&(t.networkMode==="always"||k_.isOnline())&&t.canRun(),u=()=>vW(t.networkMode)&&t.canRun(),h=v=>{s()||(r==null||r(),i.resolve(v))},d=v=>{s()||(r==null||r(),i.reject(v))},m=()=>new Promise(v=>{var b;r=x=>{(s()||c())&&v(x)},(b=t.onPause)==null||b.call(t)}).then(()=>{var v;r=void 0,s()||(v=t.onContinue)==null||v.call(t)}),y=()=>{if(s())return;let v;const b=n===0?t.initialPromise:void 0;try{v=b??t.fn()}catch(x){v=Promise.reject(x)}Promise.resolve(v).then(h).catch(x=>{var O;if(s())return;const T=t.retry??(Wx?0:3),E=t.retryDelay??Kee,C=typeof E=="function"?E(n,x):E,I=T===!0||typeof T=="number"&&n<T||typeof T=="function"&&T(n,x);if(e||!I){d(x);return}n++,(O=t.onFail)==null||O.call(t,n,x),Wee(C).then(()=>c()?void 0:m()).then(()=>{e?d(x):y()})})};return{promise:i,status:()=>i.status,cancel:o,continue:()=>(r==null||r(),i),cancelRetry:a,continueRetry:l,canStart:u,start:()=>(u()?y():m().then(y),i)}}var Gee=t=>setTimeout(t,0);function Zee(){let t=[],e=0,n=a=>{a()},r=a=>{a()},i=Gee;const s=a=>{e?t.push(a):i(()=>{n(a)})},o=()=>{const a=t;t=[],a.length&&i(()=>{r(()=>{a.forEach(l=>{n(l)})})})};return{batch:a=>{let l;e++;try{l=a()}finally{e--,e||o()}return l},batchCalls:a=>(...l)=>{s(()=>{a(...l)})},schedule:s,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{i=a}}}var ls=Zee(),Bh,sW,_W=(sW=class{constructor(){tn(this,Bh)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),zee(this.gcTime)&&Ft(this,Bh,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(Wx?1/0:300*1e3))}clearGcTimeout(){qe(this,Bh)&&(clearTimeout(qe(this,Bh)),Ft(this,Bh,void 0))}},Bh=new WeakMap,sW),jg,Vg,Do,Lh,ai,py,Fh,ba,_c,oW,Jee=(oW=class extends _W{constructor(e){super();tn(this,ba);tn(this,jg);tn(this,Vg);tn(this,Do);tn(this,Lh);tn(this,ai);tn(this,py);tn(this,Fh);Ft(this,Fh,!1),Ft(this,py,e.defaultOptions),this.setOptions(e.options),this.observers=[],Ft(this,Lh,e.client),Ft(this,Do,qe(this,Lh).getQueryCache()),this.queryKey=e.queryKey,this.queryHash=e.queryHash,Ft(this,jg,tte(this.options)),this.state=e.state??qe(this,jg),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var e;return(e=qe(this,ai))==null?void 0:e.promise}setOptions(e){this.options={...qe(this,py),...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&qe(this,Do).remove(this)}setData(e,n){const r=$ee(this.state.data,e,this.options);return zi(this,ba,_c).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(e,n){zi(this,ba,_c).call(this,{type:"setState",state:e,setStateOptions:n})}cancel(e){var r,i;const n=(r=qe(this,ai))==null?void 0:r.promise;return(i=qe(this,ai))==null||i.cancel(e),n?n.then(ya).catch(ya):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(qe(this,jg))}isActive(){return this.observers.some(e=>Vee(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===$O||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>H5(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!jee(this.state.dataUpdatedAt,e)}onFocus(){var n;const e=this.observers.find(r=>r.shouldFetchOnWindowFocus());e==null||e.refetch({cancelRefetch:!1}),(n=qe(this,ai))==null||n.continue()}onOnline(){var n;const e=this.observers.find(r=>r.shouldFetchOnReconnect());e==null||e.refetch({cancelRefetch:!1}),(n=qe(this,ai))==null||n.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),qe(this,Do).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(n=>n!==e),this.observers.length||(qe(this,ai)&&(qe(this,Fh)?qe(this,ai).cancel({revert:!0}):qe(this,ai).cancelRetry()),this.scheduleGc()),qe(this,Do).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||zi(this,ba,_c).call(this,{type:"invalidate"})}async fetch(e,n){var l,c,u,h,d,m,y,v,b,x,T,E;if(this.state.fetchStatus!=="idle"&&((l=qe(this,ai))==null?void 0:l.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(qe(this,ai))return qe(this,ai).continueRetry(),qe(this,ai).promise}if(e&&this.setOptions(e),!this.options.queryFn){const C=this.observers.find(I=>I.options.queryFn);C&&this.setOptions(C.options)}const r=new AbortController,i=C=>{Object.defineProperty(C,"signal",{enumerable:!0,get:()=>(Ft(this,Fh,!0),r.signal)}
40)},s=()=>{const C=gW(this.options,n),O=(()=>{const N={client:qe(this,Lh),queryKey:this.queryKey,meta:this.meta};return i(N),N})();return Ft(this,Fh,!1),this.options.persister?this.options.persister(C,O,this):C(O)},a=(()=>{const C={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:qe(this,Lh),state:this.state,fetchFn:s};return i(C),C})();(c=this.options.behavior)==null||c.onFetch(a,this),Ft(this,Vg,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=a.fetchOptions)==null?void 0:u.meta))&&zi(this,ba,_c).call(this,{type:"fetch",meta:(h=a.fetchOptions)==null?void 0:h.meta}),Ft(this,ai,bW({initialPromise:n==null?void 0:n.initialPromise,fn:a.fetchFn,abort:r.abort.bind(r),onFail:(C,I)=>{zi(this,ba,_c).call(this,{type:"failed",failureCount:C,error:I})},onPause:()=>{zi(this,ba,_c).call(this,{type:"pause"})},onContinue:()=>{zi(this,ba,_c).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0}));try{const C=await qe(this,ai).start();if(C===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(C),(m=(d=qe(this,Do).config).onSuccess)==null||m.call(d,C,this),(v=(y=qe(this,Do).config).onSettled)==null||v.call(y,C,this.state.error,this),C}catch(C){if(C instanceof yW){if(C.silent)return qe(this,ai).promise;if(C.revert){if(this.setState({...qe(this,Vg),fetchStatus:"idle"}),this.state.data===void 0)throw C;return this.state.data}}throw zi(this,ba,_c).call(this,{type:"error",error:C}),(x=(b=qe(this,Do).config).onError)==null||x.call(b,C,this),(E=(T=qe(this,Do).config).onSettled)==null||E.call(T,this.state.data,C,this),C}finally{this.scheduleGc()}}},jg=new WeakMap,Vg=new WeakMap,Do=new WeakMap,Lh=new WeakMap,ai=new WeakMap,py=new WeakMap,Fh=new WeakMap,ba=new WeakSet,_c=function(e){const n=r=>{switch(e.type){case"failed":return{...r,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...ete(r.data,this.options),fetchMeta:e.meta??null};case"success":const i={...r,data:e.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return Ft(this,Vg,e.manual?i:void 0),i;case"error":const s=e.error;return{...r,error:s,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...e.state}}};this.state=n(this.state),ls.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),qe(this,Do).notify({query:this,type:"updated",action:e})})},oW);function ete(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:vW(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function tte(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,n=e!==void 0,r=n?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var vl,aW,nte=(aW=class extends Vx{constructor(e={}){super();tn(this,vl);this.config=e,Ft(this,vl,new Map)}build(e,n,r){const i=n.queryKey,s=n.queryHash??WO(i,n);let o=this.get(s);return o||(o=new Jee({client:e,queryKey:i,queryHash:s,options:e.defaultQueryOptions(n),state:r,defaultOptions:e.getQueryDefaults(i)}),this.add(o)),o}add(e){qe(this,vl).has(e.queryHash)||(qe(this,vl).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const n=qe(this,vl).get(e.queryHash);n&&(e.destroy(),n===e&&qe(this,vl).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){ls.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return qe(this,vl).get(e)}getAll(){return[...qe(this,vl).values()]}find(e){const n={exact:!0,...e};return this.getAll().find(r=>ek(n,r))}findAll(e={}){const n=this.getAll();return Object.keys(e).length>0?n.filter(r=>ek(e,r)):n}notify(e){ls.batch(()=>
vendor: 4,781 bytes, line 40
40{this.listeners.forEach(n=>{n(e)})})}onFocus(){ls.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){ls.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},vl=new WeakMap,aW),yl,as,Uh,bl,Bu,lW,rte=(lW=class extends _W{constructor(e){super();tn(this,bl);tn(this,yl);tn(this,as);tn(this,Uh);this.mutationId=e.mutationId,Ft(this,as,e.mutationCache),Ft(this,yl,[]),this.state=e.state||ite(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){qe(this,yl).includes(e)||(qe(this,yl).push(e),this.clearGcTimeout(),qe(this,as).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){Ft(this,yl,qe(this,yl).filter(n=>n!==e)),this.scheduleGc(),qe(this,as).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){qe(this,yl).length||(this.state.status==="pending"?this.scheduleGc():qe(this,as).remove(this))}continue(){var e;return((e=qe(this,Uh))==null?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var s,o,a,l,c,u,h,d,m,y,v,b,x,T,E,C,I,O,N,U;const n=()=>{zi(this,bl,Bu).call(this,{type:"continue"})};Ft(this,Uh,bW({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(new Error("No mutationFn found")),onFail:(F,H)=>{zi(this,bl,Bu).call(this,{type:"failed",failureCount:F,error:H})},onPause:()=>{zi(this,bl,Bu).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>qe(this,as).canRun(this)}));const r=this.state.status==="pending",i=!qe(this,Uh).canStart();try{if(r)n();else{zi(this,bl,Bu).call(this,{type:"pending",variables:e,isPaused:i}),await((o=(s=qe(this,as).config).onMutate)==null?void 0:o.call(s,e,this));const H=await((l=(a=this.options).onMutate)==null?void 0:l.call(a,e));H!==this.state.context&&zi(this,bl,Bu).call(this,{type:"pending",context:H,variables:e,isPaused:i})}const F=await qe(this,Uh).start();return await((u=(c=qe(this,as).config).onSuccess)==null?void 0:u.call(c,F,e,this.state.context,this)),await((d=(h=this.options).onSuccess)==null?void 0:d.call(h,F,e,this.state.context)),await((y=(m=qe(this,as).config).onSettled)==null?void 0:y.call(m,F,null,this.state.variables,this.state.context,this)),await((b=(v=this.options).onSettled)==null?void 0:b.call(v,F,null,e,this.state.context)),zi(this,bl,Bu).call(this,{type:"success",data:F}),F}catch(F){try{throw await((T=(x=qe(this,as).config).onError)==null?void 0:T.call(x,F,e,this.state.context,this)),await((C=(E=this.options).onError)==null?void 0:C.call(E,F,e,this.state.context)),await((O=(I=qe(this,as).config).onSettled)==null?void 0:O.call(I,void 0,F,this.state.variables,this.state.context,this)),await((U=(N=this.options).onSettled)==null?void 0:U.call(N,void 0,F,e,this.state.context)),F}finally{zi(this,bl,Bu).call(this,{type:"error",error:F})}}finally{qe(this,as).runNext(this)}}},yl=new WeakMap,as=new WeakMap,Uh=new WeakMap,bl=new WeakSet,Bu=function(e){const n=r=>{switch(e.type){case"failed":return{...r,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...r,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:e.error,failureCount:r.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=n(this.state),ls.batch(()=>{qe(this,yl).forEach(r=>{r.onMutationUpdate(e)}),qe(this,as).notify({mutation:this,type:"updated",action:e})})},lW);function ite(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Ac,_a,gy,cW,ste=(cW=class extends Vx{constructor(e={}){super();tn(this,Ac);tn(this,_a);tn(this,gy);this.config=e,Ft(this,Ac,new Set),Ft(this,_a,new Map),Ft(this,gy,0)}build(e,n,r){const i=new rte({mutationCache:this,mutationId:++eb(this,gy)._,options:e.defaultMutationOptions(n),state:r});return this.add(i),i}add(e){qe(this,Ac).add(e);const n=nb(e);if(typeof n=="string"){const r=qe(this,_a).get(n);r?r.push(e):qe(this,_a).set(n,[e])}this.notify({type:"added",mutation:e})}remove(e){if(qe(this,Ac).delete(e)){const n=nb(e);if(typeof n=="string"){const r=qe(this,_a).get(n);if(r)if(r.length>1){const i=r.indexOf(e);i!==-1&&r.splice(i,1)}else r[0]===e&&qe(this,_a).delete(n)}}this.notify({type:"removed",mutation:e})}canRun(e){const n=nb(e);if(typeof n=="string"){const r=qe(this,_a).get(n),i=r==null?void 0:r.find(s=>
40s.state.status==="pending");return!i||i===e}else return!0}runNext(e){var r;const n=nb(e);if(typeof n=="string"){const i=(r=qe(this,_a).get(n))==null?void 0:r.find(s=>s!==e&&s.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){ls.batch(()=>{qe(this,Ac).forEach(e=>{this.notify({type:"removed",mutation:e})}),qe(this,Ac).clear(),qe(this,_a).clear()})}getAll(){return Array.from(qe(this,Ac))}find(e){const n={exact:!0,...e};return this.getAll().find(r=>tk(n,r))}findAll(e={}){return this.getAll().filter(n=>tk(e,n))}notify(e){ls.batch(()=>{this.listeners.forEach(n=>{n(e)})})}resumePausedMutations(){const e=this.getAll().filter(n=>n.state.isPaused);return ls.batch(()=>Promise.all(e.map(n=>n.continue().catch(ya))))}},Ac=new WeakMap,_a=new WeakMap,gy=new WeakMap,cW);function nb(t){var e;return(e=t.options.scope)==null?void 0:e.id}function ik(t){return{onFetch:(e,n)=>{var u,h,d,m,y;const r=e.options,i=(d=(h=(u=e.fetchOptions)==null?void 0:u.meta)==null?void 0:h.fetchMore)==null?void 0:d.direction,s=((m=e.state.data)==null?void 0:m.pages)||[],o=((y=e.state.data)==null?void 0:y.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const c=async()=>{let v=!1;const b=E=>{Object.defineProperty(E,"signal",{enumerable:!0,get:()=>(e.signal.aborted?v=!0:e.signal.addEventListener("abort",()=>{v=!0}),e.signal)})},x=gW(e.options,e.fetchOptions),T=async(E,C,I)=>
vendor: 6,027 bytes, line 40
40{if(v)return Promise.reject();if(C==null&&E.pages.length)return Promise.resolve(E);const N=(()=>{const W={client:e.client,queryKey:e.queryKey,pageParam:C,direction:I?"backward":"forward",meta:e.options.meta};return b(W),W})(),U=await x(N),{maxPages:F}=e.options,H=I?qee:Hee;return{pages:H(E.pages,U,F),pageParams:H(E.pageParams,C,F)}};if(i&&s.length){const E=i==="backward",C=E?ote:sk,I={pages:s,pageParams:o},O=C(r,I);a=await T(I,O,E)}else{const E=t??s.length;do{const C=l===0?o[0]??r.initialPageParam:sk(r,a);if(l>0&&C==null)break;a=await T(a,C),l++}while(l<E)}return a};e.options.persister?e.fetchFn=()=>{var v,b;return(b=(v=e.options).persister)==null?void 0:b.call(v,c,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},n)}:e.fetchFn=c}}}function sk(t,{pages:e,pageParams:n}){const r=e.length-1;return e.length>0?t.getNextPageParam(e[r],e,n[r],n):void 0}function ote(t,{pages:e,pageParams:n}){var r;return e.length>0?(r=t.getPreviousPageParam)==null?void 0:r.call(t,e[0],e,n[0],n):void 0}var mr,Hu,qu,Wg,$g,Qu,Hg,qg,uW,ate=(uW=class{constructor(t={}){tn(this,mr);tn(this,Hu);tn(this,qu);tn(this,Wg);tn(this,$g);tn(this,Qu);tn(this,Hg);tn(this,qg);Ft(this,mr,t.queryCache||new nte),Ft(this,Hu,t.mutationCache||new ste),Ft(this,qu,t.defaultOptions||{}),Ft(this,Wg,new Map),Ft(this,$g,new Map),Ft(this,Qu,0)}mount(){eb(this,Qu)._++,qe(this,Qu)===1&&(Ft(this,Hg,mW.subscribe(async t=>{t&&(await this.resumePausedMutations(),qe(this,mr).onFocus())})),Ft(this,qg,k_.subscribe(async t=>{t&&(await this.resumePausedMutations(),qe(this,mr).onOnline())})))}unmount(){var t,e;eb(this,Qu)._--,qe(this,Qu)===0&&((t=qe(this,Hg))==null||t.call(this),Ft(this,Hg,void 0),(e=qe(this,qg))==null||e.call(this),Ft(this,qg,void 0))}isFetching(t){return qe(this,mr).findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return qe(this,Hu).findAll({...t,status:"pending"}).length}getQueryData(t){var n;const e=this.defaultQueryOptions({queryKey:t});return(n=qe(this,mr).get(e.queryHash))==null?void 0:n.state.data}ensureQueryData(t){const e=this.defaultQueryOptions(t),n=qe(this,mr).build(this,e),r=n.state.data;return r===void 0?this.fetchQuery(t):(t.revalidateIfStale&&n.isStaleByTime(H5(e.staleTime,n))&&this.prefetchQuery(e),Promise.resolve(r))}getQueriesData(t){return qe(this,mr).findAll(t).map(({queryKey:e,state:n})=>{const r=n.data;return[e,r]})}setQueryData(t,e,n){const r=this.defaultQueryOptions({queryKey:t}),i=qe(this,mr).get(r.queryHash),s=i==null?void 0:i.state.data,o=Uee(e,s);if(o!==void 0)return qe(this,mr).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(t,e,n){return ls.batch(()=>qe(this,mr).findAll(t).map(({queryKey:r})=>[r,this.setQueryData(r,e,n)]))}getQueryState(t){var n;const e=this.defaultQueryOptions({queryKey:t});return(n=qe(this,mr).get(e.queryHash))==null?void 0:n.state}removeQueries(t){const e=qe(this,mr);ls.batch(()=>{e.findAll(t).forEach(n=>{e.remove(n)})})}resetQueries(t,e){const n=qe(this,mr);return ls.batch(()=>(n.findAll(t).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...t},e)))}cancelQueries(t,e={}){const n={revert:!0,...e},r=ls.batch(()=>qe(this,mr).findAll(t).map(i=>i.cancel(n)));return Promise.all(r).then(ya).catch(ya)}invalidateQueries(t,e={}){return ls.batch(()=>(qe(this,mr).findAll(t).forEach(n=>{n.invalidate()}),(t==null?void 0:t.refetchType)==="none"?Promise.resolve():this.refetchQueries({...t,type:(t==null?void 0:t.refetchType)??(t==null?void 0:t.type)??"active"},e)))}refetchQueries(t,e={}){const n={...e,cancelRefetch:e.cancelRefetch??!0},r=ls.batch(()=>qe(this,mr).findAll(t).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let s=i.fetch(void 0,n);return n.throwOnError||(s=s.catch(ya)),i.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(ya)}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const n=qe(this,mr).build(this,e);return n.isStaleByTime(H5(e.staleTime,n))?n.fetch(e):Promise.resolve(n.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(ya).catch(ya)}fetchInfiniteQuery(t){return t.behavior=ik(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(ya).catch(ya)}ensureInfiniteQueryData(t){return t.behavior=ik(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return k_.isOnline()?qe(this,Hu).resumePausedMutations():Promise.resolve()}getQueryCache(){return qe(this,mr)}getMutationCache(){return qe(this,Hu)}getDefaultOptions(){return qe(this,qu)}setDefaultOptions(t){Ft(this,qu,t)}setQueryDefaults(t,e){qe(this,Wg).set(mv(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...qe(this,Wg).values()],n={};return e.forEach(r=>{vv(t,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(t,e){qe(this,$g).set(mv(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...qe(this,$g).values()],n={};return e.forEach(r=>{vv(t,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(t){if(t._defaulted)return t;const e={...qe(this,qu).queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=WO(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===$O&&(e.enabled=!1),e}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...qe(this,qu).mutations,...(t==null?void 0:t.mutationKey)&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){qe(this,mr).clear(),qe(this,Hu).clear()}},mr=new WeakMap,Hu=new WeakMap,qu=new WeakMap,Wg=new WeakMap,$g=new WeakMap,Qu=new WeakMap,Hg=new WeakMap,qg=new WeakMap,uW),lte=A.createContext(void 0),cte=({client:t,children:e})=>(A.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),Q.jsx(lte.Provider,{value:t,children:e}));const ok=t=>{let e;const n=new Set,r=(c,u)=>{const h=typeof c=="function"?c(e):c;if(!Object.is(h,e)){const d=e;e=u??(typeof h!="object"||h===null)?h:Object.assign({}
40,e,h),n.forEach(m=>m(e,d))}},i=()=>e,a={setState:r,getState:i,getInitialState:()=>l,subscribe:c=>(n.add(c),()=>n.delete(c))},l=e=t(r,i,a);return a},ute=(t=>t?ok(t):ok),fte=t=>t;function hte(t,e=fte){const n=Me.useSyncExternalStore(t.subscribe,Me.useCallback(()=>e(t.getState()),[t,e]),Me.useCallback(()=>e(t.getInitialState()),[t,e]));return Me.useDebugValue(n),n}const dte=t=>{const e=ute(t),n=r=>hte(e,r);return Object.assign(n,e),n},pte=(t=>dte),wW=3600*1e3,vy=24*wW,gte=7*vy,mte=30*vy,vte=90*vy,yte=180*vy,bte=365*vy,Q5=[{label:"12 hours",value:12*wW},{label:"1 week",value:gte},{label:"1 month",value:mte},{label:"3 months",value:vte},{label:"6 months",value:yte},{label:"12 months",value:bte}],xW=t=>{const e=new Date(t);return e.setHours(0,0,0,0),e},_te=()=>{const t=new Date;return xW(new Date(t.getFullYear(),0,1))},wte=()=>xW(new Date),AW=()=>{const t=new Date;return t.setHours(23,59,59,999),t},xte=(t,e)=>{const n=e||AW(),r=new Date(n);return r.setMonth(r.getMonth()-t),r.setHours(0,0,0,0),r},Ate=t=>xte(2,t),Ete=t=>{const e=AW();return{start:Ate(e),end:e}},Ste=t=>({viewMode:"explorer",isPlaying:!1,playbackSpeed:1,windLayerType:null,show3DMap:!1,showPerimeterNrt:!0,showFireline:!1,showNewFirepix:!1,timeRange:{start:_te(),end:wte()},timeMarker:new Date,selectedDuration:Q5[2],setViewMode:e=>t({viewMode:e}),setTimeRange:e=>t({timeRange:e}),togglePlay:()=>t(e=>({isPlaying:!e.isPlaying})),setPlaybackSpeed:e=>t({playbackSpeed:e}),toggle3DMap:()=>t(e=>({show3DMap:!e.show3DMap})),setWindLayerType:e=>t({windLayerType:e}),setShowPerimeterNrt:e=>t({showPerimeterNrt:e}),setShowFireline:e=>t({showFireline:e}),setShowNewFirepix:e=>t({showNewFirepix:e}),setTimeMarker:e=>t({timeMarker:e}),setSelectedDuration:e=>t({selectedDuration:e})});function N_(t,e){if(!t)throw new Error(e||"loader assertion failed.")}const HO=!!(typeof process!="object"||String(process)!=="[object process]"||process.browser),ak=typeof process<"u"&&process.version&&/v([0-9]*)/.exec(process.version);ak&&parseFloat(ak[1]);const rb=globalThis,Gp=globalThis.process||{},Tte=globalThis.navigator||{};function EW(t){var r,i;if(typeof window<"u"&&((r=window.process)==null?void 0:r.type)==="renderer"||typeof process<"u"&&((i=process.versions)!=null&&i.electron))return!0;const n=typeof navigator<"u"&&navigator.userAgent;return!!(n&&n.indexOf("Electron")>=0)}function ud(){return!(typeof process=="object"&&String(process)==="[object process]"&&!(process!=null&&process.browser))||EW()}function Cte(t){return ud()?EW()?"Electron":(Tte.userAgent||"").indexOf("Edge")>-1?"Edge":globalThis.chrome?"Chrome":globalThis.safari?"Safari":globalThis.mozInnerScreenX?"Firefox":"Unknown":"Node"}const SW="4.1.0";function Pte(t){try{const e=window[t],n="__storage_test__";return e.setItem(n,n),e.removeItem(n),e}catch{return null}}class Ite{constructor(e,n,r="sessionStorage"){this.storage=Pte(r),this.id=e,this.config=n,this._loadConfiguration()}getConfiguration(){return this.config}setConfiguration(e){if(Object.assign(this.config,e),this.storage){const n=JSON.stringify(this.config);this.storage.setItem(this.id,n)}}_loadConfiguration(){let e={};if(this.storage){const n=this.storage.getItem(this.id);e=n?JSON.parse(n):{}}return Object.assign(this.config,e),this}}function Ote(t){let e;return t<10?e=`${t.toFixed(2)}ms`:t<100?e=`${t.toFixed(1)}ms`:t<1e3?e=`${t.toFixed(0)}ms`:e=`${(t/1e3).toFixed(2)}s`,e}function Mte(t,e=8){const n=Math.max(e-t.length,0);return`${" ".repeat(n)}${t}`}var D_;(function(t){t[t.BLACK=30]="BLACK",t[t.RED=31]="RED",t[t.GREEN=32]="GREEN",t[t.YELLOW=33]="YELLOW",t[t.BLUE=34]="BLUE",t[t.MAGENTA=35]="MAGENTA",t[t.CYAN=36]="CYAN",t[t.WHITE=37]="WHITE",t[t.BRIGHT_BLACK=90]="BRIGHT_BLACK",t[t.BRIGHT_RED=91]="BRIGHT_RED",t[t.BRIGHT_GREEN=92]="BRIGHT_GREEN",t[t.BRIGHT_YELLOW=93]="BRIGHT_YELLOW",t[t.BRIGHT_BLUE=94]="BRIGHT_BLUE",t[t.BRIGHT_MAGENTA=95]="BRIGHT_MAGENTA",t[t.BRIGHT_CYAN=96]="BRIGHT_CYAN",t[t.BRIGHT_WHITE=97]="BRIGHT_WHITE"})(D_||(D_={}));const Rte=10;function lk(t){return typeof t!="string"?t:(t=t.toUpperCase(),D_[t]||D_.WHITE)}function kte(t,e,n){return!ud&&typeof t=="string"&&(e&&(t=`\x1B[${lk(e)}m${t}\x1B[39m`),n&&(t=`\x1B[${lk(n)+Rte}m${t}\x1B[49m`)),t}function Nte(t,e=["constructor"]){const n=Object.getPrototypeOf(t),r=Object.getOwnPropertyNames(n),i=t;for(const s of r){const o=i[s];typeof o=="function"&&(e.find(a=>s===a)||(i[s]=o.bind(t)))}}function qO(t,e){if(!t)throw new Error("Assertion failed")}function Zp(){var e,n,r;let t;if(ud()&&rb.performance)t=(n=(e=rb==null?void 0:rb.performance)==null?void 0:e.now)==null?void 0:n.call(e);else if("hrtime"in Gp){const i=(r=Gp==null?void 0:Gp.hrtime)==null?void 0:r.call(Gp);t=i[0]*1e3+i[1]/1e6}else t=Date.now();return t}const Jp={debug:ud()&&console.debug||console.log,log:console.log,info:console.info,warn:console.warn,error:console.error},Dte={enabled:!0,level:0};function eg(){}const ck={},uk={once:!0};class yy{constructor({id:e}={id:""}){this.VERSION=SW,this._startTs=Zp(),this._deltaTs=Zp(),this.userData={},this.LOG_THROTTLE_TIMEOUT=0,this.id=e,this.userData={},this._storage=new Ite(`__probe-${this.id}__`,Dte),this.timeStamp(`${this.id}
vendor: 37,798 bytes, lines 40-68
40 started`),Nte(this),Object.seal(this)}set level(e){this.setLevel(e)}get level(){return this.getLevel()}isEnabled(){return this._storage.config.enabled}getLevel(){return this._storage.config.level}getTotal(){return Number((Zp()-this._startTs).toPrecision(10))}getDelta(){return Number((Zp()-this._deltaTs).toPrecision(10))}set priority(e){this.level=e}get priority(){return this.level}getPriority(){return this.level}enable(e=!0){return this._storage.setConfiguration({enabled:e}),this}setLevel(e){return this._storage.setConfiguration({level:e}),this}get(e){return this._storage.config[e]}set(e,n){this._storage.setConfiguration({[e]:n})}settings(){console.table?console.table(this._storage.config):console.log(this._storage.config)}assert(e,n){if(!e)throw new Error(n||"Assertion failed")}warn(e){return this._getLogFunction(0,e,Jp.warn,arguments,uk)}error(e){return this._getLogFunction(0,e,Jp.error,arguments)}deprecated(e,n){return this.warn(`\`${e}\` is deprecated and will be removed in a later version. Use \`${n}\` instead`)}removed(e,n){return this.error(`\`${e}\` has been removed. Use \`${n}\` instead`)}probe(e,n){return this._getLogFunction(e,n,Jp.log,arguments,{time:!0,once:!0})}log(e,n){return this._getLogFunction(e,n,Jp.debug,arguments)}info(e,n){return this._getLogFunction(e,n,console.info,arguments)}once(e,n){return this._getLogFunction(e,n,Jp.debug||Jp.info,arguments,uk)}table(e,n,r){return n?this._getLogFunction(e,n,console.table||eg,r&&[r],{tag:Lte(n)}):eg}time(e,n){return this._getLogFunction(e,n,console.time?console.time:console.info)}timeEnd(e,n){return this._getLogFunction(e,n,console.timeEnd?console.timeEnd:console.info)}timeStamp(e,n){return this._getLogFunction(e,n,console.timeStamp||eg)}group(e,n,r={collapsed:!1}){const i=fk({logLevel:e,message:n,opts:r}),{collapsed:s}=r;return i.method=(s?console.groupCollapsed:console.group)||console.info,this._getLogFunction(i)}groupCollapsed(e,n,r={}){return this.group(e,n,Object.assign({},r,{collapsed:!0}))}groupEnd(e){return this._getLogFunction(e,"",console.groupEnd||eg)}withGroup(e,n,r){this.group(e,n)();try{r()}finally{this.groupEnd(e)()}}trace(){console.trace&&console.trace()}_shouldLog(e){return this.isEnabled()&&this.getLevel()>=TW(e)}_getLogFunction(e,n,r,i,s){if(this._shouldLog(e)){s=fk({logLevel:e,message:n,args:i,opts:s}),r=r||s.method,qO(r),s.total=this.getTotal(),s.delta=this.getDelta(),this._deltaTs=Zp();const o=s.tag||s.message;if(s.once&&o)if(!ck[o])ck[o]=Zp();else return eg;return n=Bte(this.id,s.message,s),r.bind(console,n,...s.args)}return eg}}yy.VERSION=SW;function TW(t){if(!t)return 0;let e;switch(typeof t){case"number":e=t;break;case"object":e=t.logLevel||t.priority||0;break;default:return 0}return qO(Number.isFinite(e)&&e>=0),e}function fk(t){const{logLevel:e,message:n}=t;t.logLevel=TW(e);const r=t.args?Array.from(t.args):[];for(;r.length&&r.shift()!==n;);switch(typeof e){case"string":case"function":n!==void 0&&r.unshift(n),t.message=e;break;case"object":Object.assign(t,e);break}typeof t.message=="function"&&(t.message=t.message());const i=typeof t.message;return qO(i==="string"||i==="object"),Object.assign(t,{args:r},t.opts)}function Bte(t,e,n){if(typeof e=="string"){const r=n.time?Mte(Ote(n.total)):"";e=n.time?`${t}: ${r}  ${e}`:`${t}: ${e}`,e=kte(e,n.color,n.background)}return e}function Lte(t){for(const e in t)for(const n in t[e])return n||"untitled";return"empty"}const q3="4.3.3",Fte=q3[0]>="0"&&q3[0]<="9"?`v${q3}`:"";function Ute(){const t=new yy({id:"loaders.gl"});return globalThis.loaders=globalThis.loaders||{},globalThis.loaders.log=t,globalThis.loaders.version=Fte,globalThis.probe=globalThis.probe||{},globalThis.probe.loaders=t,t}const zte=Ute();function jte(t,e){return CW(t||{},e)}function CW(t,e,n=0){if(n>3)return e;const r={...t};for(const[i,s]of Object.entries(e))s&&typeof s=="object"&&!Array.isArray(s)?r[i]=CW(r[i]||{},e[i],n+1):r[i]=e[i];return r}const Vte="latest";function Wte(){var t;return(t=globalThis._loadersgl_)!=null&&t.version||(globalThis._loadersgl_=globalThis._loadersgl_||{},globalThis._loadersgl_.version="4.3.3"),globalThis._loadersgl_.version}const $te=Wte();function of(t,e){if(!t)throw new Error(e||"loaders.gl assertion failed.")}const jh=typeof process!="object"||String(process)!=="[object process]"||process.browser,Hte=typeof window<"u"&&typeof window.orientation<"u",hk=typeof process<"u"&&process.version&&/v([0-9]*)/.exec(process.version);hk&&parseFloat(hk[1]);class qte{constructor(e,n){re(this,"name");re(this,"workerThread");re(this,"isRunning",!0);re(this,"result");re(this,"_resolve",()=>{});re(this,"_reject",()=>{});this.name=e,this.workerThread=n,this.result=new Promise((r,i)=>{this._resolve=r,this._reject=i})}postMessage(e,n){this.workerThread.postMessage({source:"loaders.gl",type:e,payload:n})}done(e){of(this.isRunning),this.isRunning=!1,this._resolve(e)}error(e){of(this.isRunning),this.isRunning=!1,this._reject(e)}}class Q3{terminate(){}}const X3=new Map;function Qte(t){of(t.source&&!t.url||!t.source&&t.url);let e=X3.get(t.source||t.url);return e||(t.url&&(e=Xte(t.url),X3.set(t.url,e)),t.source&&(e=PW(t.source),X3.set(t.source,e))),of(e),e}function Xte(t){if(!t.startsWith("http"))return t;const e=Yte(t);return PW(e)}function PW(t){const e=new Blob([t],{type:"application/javascript"});return URL.createObjectURL(e)}function Yte(t){return`try {
41  importScripts('${t}');
42} catch (error) {
43  console.error(error);
44  throw error;
45}`}function IW(t,e=!0,n){const r=n||new Set;if(t){if(dk(t))r.add(t);else if(dk(t.buffer))r.add(t.buffer);else if(!ArrayBuffer.isView(t)){if(e&&typeof t=="object")for(const i in t)IW(t[i],e,r)}}return n===void 0?Array.from(r):[]}function dk(t){return t?t instanceof ArrayBuffer||typeof MessagePort<"u"&&t instanceof MessagePort||typeof ImageBitmap<"u"&&t instanceof ImageBitmap||typeof OffscreenCanvas<"u"&&t instanceof OffscreenCanvas:!1}const Y3=()=>{};class X5{constructor(e){re(this,"name");re(this,"source");re(this,"url");re(this,"terminated",!1);re(this,"worker");re(this,"onMessage");re(this,"onError");re(this,"_loadableURL","");const{name:n,source:r,url:i}=e;of(r||i),this.name=n,this.source=r,this.url=i,this.onMessage=Y3,this.onError=s=>console.log(s),this.worker=jh?this._createBrowserWorker():this._createNodeWorker()}static isSupported(){return typeof Worker<"u"&&jh||typeof Q3<"u"&&!jh}destroy(){this.onMessage=Y3,this.onError=Y3,this.worker.terminate(),this.terminated=!0}get isRunning(){return!!this.onMessage}postMessage(e,n){n=n||IW(e),this.worker.postMessage(e,n)}_getErrorFromErrorEvent(e){let n="Failed to load ";return n+=`worker ${this.name} from ${this.url}. `,e.message&&(n+=`${e.message} in `),e.lineno&&(n+=`:${e.lineno}:${e.colno}`),new Error(n)}_createBrowserWorker(){this._loadableURL=Qte({source:this.source,url:this.url});const e=new Worker(this._loadableURL,{name:this.name});return e.onmessage=n=>{n.data?this.onMessage(n.data):this.onError(new Error("No data received"))},e.onerror=n=>{this.onError(this._getErrorFromErrorEvent(n)),this.terminated=!0},e.onmessageerror=n=>console.error(n),e}_createNodeWorker(){let e;if(this.url){const r=this.url.includes(":/")||this.url.startsWith("/")?this.url:`./${this.url}`;e=new Q3(r,{eval:!1})}else if(this.source)e=new Q3(this.source,{eval:!0});else throw new Error("no worker");return e.on("message",n=>{this.onMessage(n)}),e.on("error",n=>{this.onError(n)}),e.on("exit",n=>{}),e}}class Kte{constructor(e){re(this,"name","unnamed");re(this,"source");re(this,"url");re(this,"maxConcurrency",1);re(this,"maxMobileConcurrency",1);re(this,"onDebug",()=>{});re(this,"reuseWorkers",!0);re(this,"props",{});re(this,"jobQueue",[]);re(this,"idleQueue",[]);re(this,"count",0);re(this,"isDestroyed",!1);this.source=e.source,this.url=e.url,this.setProps(e)}static isSupported(){return X5.isSupported()}destroy(){this.idleQueue.forEach(e=>e.destroy()),this.isDestroyed=!0}setProps(e){this.props={...this.props,...e},e.name!==void 0&&(this.name=e.name),e.maxConcurrency!==void 0&&(this.maxConcurrency=e.maxConcurrency),e.maxMobileConcurrency!==void 0&&(this.maxMobileConcurrency=e.maxMobileConcurrency),e.reuseWorkers!==void 0&&(this.reuseWorkers=e.reuseWorkers),e.onDebug!==void 0&&(this.onDebug=e.onDebug)}async startJob(e,n=(i,s,o)=>i.done(o),r=(i,s)=>i.error(s)){const i=new Promise(s=>(this.jobQueue.push({name:e,onMessage:n,onError:r,onStart:s}),this));return this._startQueuedJob(),await i}async _startQueuedJob(){if(!this.jobQueue.length)return;const e=this._getAvailableWorker();if(!e)return;const n=this.jobQueue.shift();if(n){this.onDebug({message:"Starting job",name:n.name,workerThread:e,backlog:this.jobQueue.length});const r=new qte(n.name,e);e.onMessage=i=>n.onMessage(r,i.type,i.payload),e.onError=i=>n.onError(r,i),n.onStart(r);try{await r.result}catch(i){console.error(`Worker exception: ${i}`)}finally{this.returnWorkerToQueue(e)}}}returnWorkerToQueue(e){!jh||this.isDestroyed||!this.reuseWorkers||this.count>this._getMaxConcurrency()?(e.destroy(),this.count--):this.idleQueue.push(e),this.isDestroyed||this._startQueuedJob()}_getAvailableWorker(){if(this.idleQueue.length>0)return this.idleQueue.shift()||null;if(this.count<this._getMaxConcurrency()){this.count++;const e=`${this.name.toLowerCase()} (#${this.count} of ${this.maxConcurrency})`;return new X5({name:e,source:this.source,url:this.url})}return null}_getMaxConcurrency(){return Hte?this.maxMobileConcurrency:this.maxConcurrency}}const Gte={maxConcurrency:3,maxMobileConcurrency:1,reuseWorkers:!0,onDebug:()=>{}},Uu=class Uu{constructor(e){re(this,"props");re(this,"workerPools",new Map);this.props={...Gte},this.setProps(e),this.workerPools=new Map}static isSupported(){return X5.isSupported()}static getWorkerFarm(e={}){return Uu._workerFarm=Uu._workerFarm||new Uu({}),Uu._workerFarm.setProps(e),Uu._workerFarm}destroy(){for(const e of this.workerPools.values())e.destroy();this.workerPools=new Map}setProps(e){this.props={...this.props,...e};for(const n of this.workerPools.values())n.setProps(this._getWorkerPoolProps())}getWorkerPool(e){const{name:n,source:r,url:i}=e;let s=this.workerPools.get(n);return s||(s=new Kte({name:n,source:r,url:i}),s.setProps(this._getWorkerPoolProps()),this.workerPools.set(n,s)),s}_getWorkerPoolProps(){return{maxConcurrency:this.props.maxConcurrency,maxMobileConcurrency:this.props.maxMobileConcurrency,reuseWorkers:this.props.reuseWorkers,onDebug:this.props.onDebug}}};re(Uu,"_workerFarm");let B_=Uu;function Zte(t,e={}){const n=e[t.id]||{},r=jh?`${t.id}-worker.js`:`${t.id}-worker-node.js`;let i=n.workerUrl;if(!i&&t.id==="compression"&&(i=e.workerUrl),e._workerType==="test"&&(jh?i=`modules/${t.module}/dist/${r}`:i=`modules/${t.module}/src/workers/${t.id}-worker-node.ts`),!i){let s=t.version;s==="latest"&&(s=Vte);const o=s?`@${s}`:"";i=`https://unpkg.com/@loaders.gl/${t.module}${o}/dist/${r}`}return of(i),i}function Jte(t,e=$te){of(t,"no worker provided");const n=t.version;return!(!e||!n)}function ene(t,e){return!B_.isSupported()||!jh&&!(e!=null&&e._nodeWorkers)?!1:t.worker&&(e==null?void 0:e.worker)}async function tne(t,e,n,r,i){const s=t.id,o=Zte(t,n),l=B_.getWorkerFarm(n).getWorkerPool({name:s,url:o});n=JSON.parse(JSON.stringify(n)),r=JSON.parse(JSON.stringify(r||{}));const c=await l.startJob("process-on-worker",nne.bind(null,i));return c.postMessage("process",{input:e,options:n,context:r}),await(await c.result).result}async function nne(t,e,n,r){switch(n){case"done":e.done(r);break;case"error":e.error(new Error(r.error));break;case"process":const{id:i,input:s,options:o}=r;try{const a=await t(s,o);e.postMessage("done",{id:i,result:a})}catch(a){const l=a instanceof Error?a.message:"unknown error";e.postMessage("error",{id:i,error:l})}break;default:console.warn(`parse-with-worker unknown message ${n}`)}}function rne(t,e,n){if(n=n||t.byteLength,t.byteLength<n||e.byteLength<n)return!1;const r=new Uint8Array(t),i=new Uint8Array(e);for(let s=0;s<r.length;++s)if(r[s]!==i[s])return!1;return!0}function ine(...t){return sne(t)}function sne(t){const e=t.map(s=>s instanceof ArrayBuffer?new Uint8Array(s):s),n=e.reduce((s,o)=>s+o.byteLength,0),r=new Uint8Array(n);let i=0;for(const s of e)r.set(s,i),i+=s.byteLength;return r.buffer}async function one(t){const e=[];for await(const n of t)e.push(n);return ine(...e)}function pk(){let t;if(typeof window<"u"&&window.performance)t=window.performance.now();else if(typeof process<"u"&&process.hrtime){const e=process.hrtime();t=e[0]*1e3+e[1]/1e6}else t=Date.now();return t}class gk{constructor(e,n){this.sampleSize=1,this.time=0,this.count=0,this.samples=0,this.lastTiming=0,this.lastSampleTime=0,this.lastSampleCount=0,this._count=0,this._time=0,this._samples=0,this._startTime=0,this._timerPending=!1,this.name=e,this.type=n,this.reset()}reset(){return this.time=0,this.count=0,this.samples=0,this.lastTiming=0,this.lastSampleTime=0,this.lastSampleCount=0,this._count=0,this._time=0,this._samples=0,this._startTime=0,this._timerPending=!1,this}setSampleSize(e){return this.sampleSize=e,this}incrementCount(){return this.addCount(1),this}decrementCount(){return this.subtractCount(1),this}addCount(e){return this._count+=e,this._samples++,this._checkSampling(),this}subtractCount(e){return this._count-=e,this._samples++,this._checkSampling(),this}addTime(e){return this._time+=e,this.lastTiming=e,this._samples++,this._checkSampling(),this}timeStart(){return this._startTime=pk(),this._timerPending=!0,this}timeEnd(){return this._timerPending?(this.addTime(pk()-this._startTime),this._timerPending=!1,this._checkSampling(),this):this}getSampleAverageCount(){return this.sampleSize>0?this.lastSampleCount/this.sampleSize:0}getSampleAverageTime(){return this.sampleSize>0?this.lastSampleTime/this.sampleSize:0}getSampleHz(){return this.lastSampleTime>0?this.sampleSize/(this.lastSampleTime/1e3):0}getAverageCount(){return this.samples>0?this.count/this.samples:0}getAverageTime(){return this.samples>0?this.time/this.samples:0}getHz(){return this.time>0?this.samples/(this.time/1e3):0}_checkSampling(){this._samples===this.sampleSize&&(this.lastSampleTime=this._time,this.lastSampleCount=this._count,this.count+=this._count,this.time+=this._time,this.samples+=this._samples,this._time=0,this._count=0,this._samples=0)}}class by{constructor(e){this.stats={},this.id=e.id,this.stats={},this._initializeStats(e.stats),Object.seal(this)}get(e,n="count"){return this._getOrCreate({name:e,type:n})}get size(){return Object.keys(this.stats).length}reset(){for(const e of Object.values(this.stats))e.reset();return this}forEach(e){for(const n of Object.values(this.stats))e(n)}getTable(){const e={};return this.forEach(n=>{e[n.name]={time:n.time||0,count:n.count||0,average:n.getAverageTime()||0,hz:n.getHz()||0}}),e}_initializeStats(e=[]){e.forEach(n=>this._getOrCreate(n))}_getOrCreate(e){const{name:n,type:r}=e;let i=this.stats[n];return i||(e instanceof gk?i=e:i=new gk(n,r),this.stats[n]=i),i}}const ane="Queued Requests",lne="Active Requests",cne="Cancelled Requests",une="Queued Requests Ever",fne="Active Requests Ever",hne={id:"request-scheduler",throttleRequests:!0,maxRequests:6,debounceTime:0};class dne{constructor(e={}){re(this,"props");re(this,"stats");re(this,"activeRequestCount",0);re(this,"requestQueue",[]);re(this,"requestMap",new Map);re(this,"updateTimer",null);this.props={...hne,...e},this.stats=new by({id:this.props.id}),this.stats.get(ane),this.stats.get(lne),this.stats.get(cne),this.stats.get(une),this.stats.get(fne)}scheduleRequest(e,n=()=>0){if(!this.props.throttleRequests)return Promise.resolve({done:()=>{}});if(this.requestMap.has(e))return this.requestMap.get(e);const r={handle:e,priority:0,getPriority:n},i=new Promise(s=>(r.resolve=s,r));return this.requestQueue.push(r),this.requestMap.set(e,i),this._issueNewRequests(),i}_issueRequest(e){const{handle:n,resolve:r}=e;let i=!1;const s=()=>{i||(i=!0,this.requestMap.delete(n),this.activeRequestCount--,this._issueNewRequests())};return this.activeRequestCount++,r?r({done:s}):Promise.resolve({done:s})}_issueNewRequests(){this.updateTimer!==null&&clearTimeout(this.updateTimer),this.updateTimer=setTimeout(()=>this._issueNewRequestsAsync(),this.props.debounceTime)}_issueNewRequestsAsync(){this.updateTimer!==null&&clearTimeout(this.updateTimer),this.updateTimer=null;const e=Math.max(this.props.maxRequests-this.activeRequestCount,0);if(e!==0){this._updateAllRequests();for(let n=0;n<e;++n){const r=this.requestQueue.shift();r&&this._issueRequest(r)}}}_updateAllRequests(){const e=this.requestQueue;for(let n=0;n<e.length;++n){const r=e[n];this._updateRequest(r)||(e.splice(n,1),this.requestMap.delete(r.handle),n--)}e.sort((n,r)=>n.priority-r.priority)}_updateRequest(e){return e.priority=e.getPriority(e.handle),e.priority<0?(e.resolve(null),!1):!0}}let pne="";const mk={};function gne(t){for(const e in mk)if(t.startsWith(e)){const n=mk[e];t=t.replace(e,n)}return!t.startsWith("http://")&&!t.startsWith("https://")&&(t=`${pne}${t}`),t}function mne(t){return t&&typeof t=="object"&&t.isBuffer}function OW(t){if(mne(t))return t;if(t instanceof ArrayBuffer)return t;if(ArrayBuffer.isView(t))return t.byteOffset===0&&t.byteLength===t.buffer.byteLength?t.buffer:t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength);if(typeof t=="string"){const e=t;return new TextEncoder().encode(e).buffer}if(t&&typeof t=="object"&&t._toArrayBuffer)return t._toArrayBuffer();throw new Error("toArrayBuffer")}function MW(t){const e=t?t.lastIndexOf("/"):-1;return e>=0?t.substr(e+1):""}function vne(t){const e=t?t.lastIndexOf("/"):-1;return e>=0?t.substr(0,e):""}const yne=t=>typeof t=="boolean",K1=t=>typeof t=="function",_y=t=>t!==null&&typeof t=="object",vk=t=>_y(t)&&t.constructor==={}.constructor,bne=t=>!!t&&typeof t[Symbol.iterator]=="function",_ne=t=>t&&typeof t[Symbol.asyncIterator]=="function",fd=t=>typeof Response<"u"&&t instanceof Response||t&&t.arrayBuffer&&t.text&&t.json,hd=t=>typeof Blob<"u"&&t instanceof Blob,wne=t=>t&&typeof t=="object"&&t.isBuffer,xne=t=>typeof ReadableStream<"u"&&t instanceof ReadableStream||_y(t)&&K1(t.tee)&&K1(t.cancel)&&K1(t.getReader),Ane=t=>_y(t)&&K1(t.read)&&K1(t.pipe)&&yne(t.readable),RW=t=>xne(t)||Ane(t);class Ene extends Error{constructor(n,r){super(n);re(this,"reason");re(this,"url");re(this,"response");this.reason=r.reason,this.url=r.url,this.response=r.response}}const Sne=/^data:([-\w.]+\/[-\w.+]+)(;|,)/,Tne=/^([-\w.]+\/[-\w.+]+)/;function yk(t,e){return t.toLowerCase()===e.toLowerCase()}function Cne(t){const e=Tne.exec(t);return e?e[1]:t}function bk(t){const e=Sne.exec(t);return e?e[1]:""}const kW=/\?.*/;function Pne(t){const e=t.match(kW);return e&&e[0]}function QO(t){return t.replace(kW,"")}function Ine(t){if(t.length<50)return t;const e=t.slice(t.length-15);return`${t.substr(0,32)}...${e}`}function $x(t){return fd(t)?t.url:hd(t)?t.name||"":typeof t=="string"?t:""}function XO(t){if(fd(t)){const e=t,n=e.headers.get("content-type")||"",r=QO(e.url);return Cne(n)||bk(r)}return hd(t)?t.type||"":typeof t=="string"?bk(t):""}function One(t){return fd(t)?t.headers["content-length"]||-1:hd(t)?t.size:typeof t=="string"?t.length:t instanceof ArrayBuffer||ArrayBuffer.isView(t)?t.byteLength:-1}async function NW(t){if(fd(t))return t;const e={},n=One(t);n>=0&&(e["content-length"]=String(n));const r=$x(t),i=XO(t);i&&(e["content-type"]=i);const s=await kne(t);s&&(e["x-first-bytes"]=s),typeof t=="string"&&(t=new TextEncoder().encode(t));const o=new Response(t,{headers:e});return Object.defineProperty(o,"url",{value:r}),o}async function Mne(t){if(!t.ok)throw await Rne(t)}async function Rne(t){const e=Ine(t.url);let n=`Failed to fetch resource (${t.status}) ${t.statusText}: ${e}`;n=n.length>100?`${n.slice(0,100)}...`:n;const r={reason:t.statusText,url:t.url,response:t};try{const i=t.headers.get("Content-Type");r.reason=!t.bodyUsed&&(i!=null&&i.includes("application/json"))?await t.json():await t.text()}catch{}return new Ene(n,r)}async function kne(t){if(typeof t=="string")return`data:,${t.slice(0,5)}`;if(t instanceof Blob){const n=t.slice(0,5);return await new Promise(r=>{const i=new FileReader;i.onload=s=>{var o;return r((o=s==null?void 0:s.target)==null?void 0:o.result)},i.readAsDataURL(n)})}if(t instanceof ArrayBuffer){const n=t.slice(0,5);return`data:base64,${Nne(n)}`}return null}function Nne(t){let e="";const n=new Uint8Array(t);for(let r=0;r<n.byteLength;r++)e+=String.fromCharCode(n[r]);return btoa(e)}function Dne(t){return!Bne(t)&&!Lne(t)}function Bne(t){return t.startsWith("http:")||t.startsWith("https:")}function Lne(t){return t.startsWith("data:")}async function _k(t,e){var n,r;if(typeof t=="string"){const i=gne(t);return Dne(i)&&(n=globalThis.loaders)!=null&&n.fetchNode?(r=globalThis.loaders)==null?void 0:r.fetchNode(i,e):await fetch(i,e)}return await NW(t)}const wk=new yy({id:"loaders.gl"});class Fne{log(){return()=>{}}info(){return()=>{}}warn(){return()=>{}}error(){return()=>{}}}class Une{constructor(){re(this,"console");this.console=console}log(...e){return this.console.log.bind(this.console,...e)}info(...e){return this.console.info.bind(this.console,...e)}warn(...e){return this.console.warn.bind(this.console,...e)}error(...e){return this.console.error.bind(this.console,...e)}}const DW={fetch:null,mimeType:void 0,nothrow:!1,log:new Une,useLocalLibraries:!1,CDN:"https://unpkg.com/@loaders.gl",worker:!0,maxConcurrency:3,maxMobileConcurrency:1,reuseWorkers:HO,_nodeWorkers:!1,_workerType:"",limit:0,_limitMB:0,batchSize:"auto",batchDebounceMs:0,metadata:!1,transforms:[]},zne={throws:"nothrow",dataType:"(no longer used)",uri:"baseUri",method:"fetch.method",headers:"fetch.headers",body:"fetch.body",mode:"fetch.mode",credentials:"fetch.credentials",cache:"fetch.cache",redirect:"fetch.redirect",referrer:"fetch.referrer",referrerPolicy:"fetch.referrerPolicy",integrity:"fetch.integrity",keepalive:"fetch.keepalive",signal:"fetch.signal"};function BW(){globalThis.loaders=globalThis.loaders||{};const{loaders:t}=globalThis;return t._state||(t._state={}),t._state}function LW(){const t=BW();return t.globalOptions=t.globalOptions||{...DW},t.globalOptions}function jne(t,e,n,r){return n=n||[],n=Array.isArray(n)?n:[n],Vne(t,n),$ne(e,t,r)}function Vne(t,e){xk(t,null,DW,zne,e);for(const n of e){const r=t&&t[n.id]||{},i=n.options&&n.options[n.id]||{},s=n.deprecatedOptions&&n.deprecatedOptions[n.id]||{};xk(r,n.id,i,s,e)}}function xk(t,e,n,r,i){const s=e||"Top level",o=e?`${e}.`:"";for(const a in t){const l=!e&&_y(t[a]),c=a==="baseUri"&&!e,u=a==="workerUrl"&&e;if(!(a in n)&&!c&&!u){if(a in r)wk.warn(`${s} loader option '${o}${a}' no longer supported, use '${r[a]}'`)();else if(!l){const h=Wne(a,i);wk.warn(`${s} loader option '${o}${a}' not recognized. ${h}`)()}}}}function Wne(t,e){const n=t.toLowerCase();let r="";for(const i of e)for(const s in i.options){if(t===s)return`Did you mean '${i.id}.${s}'?`;const o=s.toLowerCase();(n.startsWith(o)||o.startsWith(n))&&(r=r||`Did you mean '${i.id}.${s}'?`)}return r}function $ne(t,e,n){const i={...t.options||{}};return Hne(i,n),i.log===null&&(i.log=new Fne),Ak(i,LW()),Ak(i,e),i}function Ak(t,e){for(const n in e)if(n in e){const r=e[n];vk(r)&&vk(t[n])?t[n]={...t[n],...e[n]}:t[n]=e[n]}}function Hne(t,e){e&&!("baseUri"in t)&&(t.baseUri=e)}function YO(t){return t?(Array.isArray(t)&&(t=t[0]),Array.isArray(t==null?void 0:t.extensions)):!1}function KO(t){N_(t,"null loader"),N_(YO(t),"invalid loader");let e;return Array.isArray(t)&&(e=t[1],t=t[0],t={...t,options:{...t.options,...e}}),(t!=null&&t.parseTextSync||t!=null&&t.parseText)&&(t.text=!0),t.text||(t.binary=!0),t}const FW=()=>{const t=BW();return t.loaderRegistry=t.loaderRegistry||[],t.loaderRegistry};function qne(t){const e=FW();t=Array.isArray(t)?t:[t];for(const n of t){const r=KO(n);e.find(i=>r===i)||e.unshift(r)}}function Qne(){return FW()}const Xne=/\.([^.]+)$/;async function Yne(t,e=[],n,r){if(!UW(t))return null;let i=Ek(t,e,{...n,nothrow:!0},r);if(i)return i;if(hd(t)&&(t=await t.slice(0,10).arrayBuffer(),i=Ek(t,e,n,r)),!i&&!(n!=null&&n.nothrow))throw new Error(zW(t));return i}function Ek(t,e=[],n,r){if(!UW(t))return null;if(e&&!Array.isArray(e))return KO(e);let i=[];e&&(i=i.concat(e)),n!=null&&n.ignoreRegisteredLoaders||i.push(...Qne()),Gne(i);const s=Kne(t,i,n,r);if(!s&&!(n!=null&&n.nothrow))throw new Error(zW(t));return s}function Kne(t,e,n,r){const i=$x(t),s=XO(t),o=QO(i)||(r==null?void 0:r.url);let a=null,l="";return n!=null&&n.mimeType&&(a=K3(e,n==null?void 0:n.mimeType),l=`match forced by supplied MIME type ${n==null?void 0:n.mimeType}`),a=a||Zne(e,o),l=l||(a?`matched url ${o}`:""),a=a||K3(e,s),l=l||(a?`matched MIME type ${s}`:""),a=a||ere(e,t),l=l||(a?`matched initial data ${jW(t)}`:""),n!=null&&n.fallbackMimeType&&(a=a||K3(e,n==null?void 0:n.fallbackMimeType),l=l||(a?`matched fallback MIME type ${s}`:"")),l&&zte.log(1,`selectLoader selected ${a==null?void 0:a.name}: ${l}.`),a}function UW(t){return!(t instanceof Response&&t.status===204)}function zW(t){const e=$x(t),n=XO(t);let r="No valid loader found (";r+=e?`${MW(e)}, `:"no url provided, ",r+=`MIME type: ${n?`"${n}"`:"not provided"}, `;const i=t?jW(t):"";return r+=i?` first bytes: "${i}"`:"first bytes: not available",r+=")",r}function Gne(t){for(const e of t)KO(e)}function Zne(t,e){const n=e&&Xne.exec(e),r=n&&n[1];return r?Jne(t,r):null}function Jne(t,e){e=e.toLowerCase();for(const n of t)for(const r of n.extensions)if(r.toLowerCase()===e)return n;return null}function K3(t,e){var n;for(const r of t)if((n=r.mimeTypes)!=null&&n.some(i=>yk(e,i))||yk(e,`application/x.${r.id}`))return r;return null}function ere(t,e){if(!e)return null;for(const n of t)if(typeof e=="string"){if(tre(e,n))return n}else if(ArrayBuffer.isView(e)){if(Sk(e.buffer,e.byteOffset,n))return n}else if(e instanceof ArrayBuffer&&Sk(e,0,n))return n;return null}function tre(t,e){return e.testText?e.testText(t):(Array.isArray(e.tests)?e.tests:[e.tests]).some(r=>t.startsWith(r))}function Sk(t,e,n){return(Array.isArray(n.tests)?n.tests:[n.tests]).some(i=>nre(t,e,n,i))}function nre(t,e,n,r){if(r instanceof ArrayBuffer)return rne(r,t,r.byteLength);switch(typeof r){case"function":return r(t);case"string":const i=Y5(t,e,r.length);return r===i;default:return!1}}function jW(t,e=5){return typeof t=="string"?t.slice(0,e):ArrayBuffer.isView(t)?Y5(t.buffer,t.byteOffset,e):t instanceof ArrayBuffer?Y5(t,0,e):""}function Y5(t,e,n){if(t.byteLength<e+n)return"";const r=new DataView(t);let i="";for(let s=0;s<n;s++)i+=String.fromCharCode(r.getUint8(e+s));return i}const rre=256*1024;function*ire(t,e){const n=(e==null?void 0:e.chunkSize)||rre;let r=0;const i=new TextEncoder;for(;r<t.length;){const s=Math.min(t.length-r,n),o=t.slice(r,r+s);r+=s,yield i.encode(o)}}const sre=256*1024;function*ore(t,e={}){const{chunkSize:n=sre}=e;let r=0;for(;r<t.byteLength;){const i=Math.min(t.byteLength-r,n),s=new ArrayBuffer(i),o=new Uint8Array(t,r,i);new Uint8Array(s).set(o),r+=i,yield s}}const are=1024*1024;async function*lre(t,e){const n=(e==null?void 0:e.chunkSize)||are;let r=0;for(;r<t.size;){const i=r+n,s=await t.slice(r,i).arrayBuffer();r=i,yield s}}function Tk(t,e){return HO?cre(t,e):ure(t)}async function*cre(t,e){const n=t.getReader();let r;try{for(;;){const i=r||n.read();e!=null&&e._streamReadAhead&&(r=n.read());const{done:s,value:o}=await i;if(s)return;yield OW(o)}}catch{n.releaseLock()}}async function*ure(t,e){for await(const n of t)yield OW(n)}function fre(t,e){if(typeof t=="string")return ire(t,e);if(t instanceof ArrayBuffer)return ore(t,e);if(hd(t))return lre(t,e);if(RW(t))return Tk(t,e);if(fd(t))return Tk(t.body,e);throw new Error("makeIterator")}const VW="Cannot convert supplied data type";function hre(t,e,n){if(e.text&&typeof t=="string")return t;if(wne(t)&&(t=t.buffer),t instanceof ArrayBuffer){const r=t;return e.text&&!e.binary?new TextDecoder("utf8").decode(r):r}if(ArrayBuffer.isView(t)){if(e.text&&!e.binary)return new TextDecoder("utf8").decode(t);let r=t.buffer;const i=t.byteLength||t.length;return(t.byteOffset!==0||i!==r.byteLength)&&(r=r.slice(t.byteOffset,t.byteOffset+i)),r}throw new Error(VW)}async function dre(t,e,n){const r=t instanceof ArrayBuffer||ArrayBuffer.isView(t);if(typeof t=="string"||r)return hre(t,e);if(hd(t)&&(t=await NW(t)),fd(t)){const i=t;return await Mne(i),e.binary?await i.arrayBuffer():await i.text()}if(RW(t)&&(t=fre(t,n)),bne(t)||_ne(t))return one(t);throw new Error(VW)}function WW(t,e){const n=LW(),r=t||n;return typeof r.fetch=="function"?r.fetch:_y(r.fetch)?i=>_k(i,r.fetch):e!=null&&e.fetch?e==null?void 0:e.fetch:_k}function pre(t,e,n){if(n)return n;const r={fetch:WW(e,t),...t};if(r.url){const i=QO(r.url);r.baseUrl=i,r.queryString=Pne(r.url),r.filename=MW(i),r.baseUrl=vne(i)}return Array.isArray(r.loaders)||(r.loaders=null),r}function gre(t,e){if(t&&!Array.isArray(t))return t;let n;if(t&&(n=Array.isArray(t)?t:[t]),e&&e.loaders){const r=Array.isArray(e.loaders)?e.loaders:[e.loaders];n=n?[...n,...r]:r}return n&&n.length?n:void 0}async function L_(t,e,n,r){e&&!Array.isArray(e)&&!YO(e)&&(r=void 0,n=e,e=void 0),t=await t,n=n||{};const i=$x(t),o=gre(e,r),a=await Yne(t,o,n);return a?(n=jne(n,a,o,i),r=pre({url:i,_parse:L_,loaders:o},n,r||null),await mre(a,t,n,r)):null}async function mre(t,e,n,r){if(Jte(t),n=jte(t.options,n),fd(e)){const s=e,{ok:o,redirected:a,status:l,statusText:c,type:u,url:h}=s,d=Object.fromEntries(s.headers.entries());r.response={headers:d,ok:o,redirected:a,status:l,statusText:c,type:u,url:h}}e=await dre(e,t,n);const i=t;if(i.parseTextSync&&typeof e=="string")return i.parseTextSync(e,n,r);if(ene(t,n))return await tne(t,e,n,r,L_);if(i.parseText&&typeof e=="string")return await i.parseText(e,n,r);if(i.parse)return await i.parse(e,n,r);throw of(!i.parseSync),new Error(`${t.id} loader - no parser found and worker is disabled`)}function vre(t){let e=1/0,n=1/0,r=1/0,i=-1/0,s=-1/0,o=-1/0;const a=t.POSITION?t.POSITION.value:[],l=a&&a.length;for(let c=0;c<l;c+=3){const u=a[c],h=a[c+1],d=a[c+2];e=u<e?u:e,n=h<n?h:n,r=d<r?d:r,i=u>i?u:i,s=h>s?h:s,o=d>o?d:o}return[[e,n,r],[i,s,o]]}async function F_(t,e,n,r){let i,s;!Array.isArray(e)&&!YO(e)?(i=[],s=e):(i=e,s=n);const o=WW(s);let a=t;return typeof t=="string"&&(a=await o(t)),hd(t)&&(a=await o(t)),Array.isArray(i)?await L_(a,i,s):await L_(a,i,s)}const yre="4.3.3";var fW;const bre=(fW=globalThis.loaders)==null?void 0:fW.parseImageNode,K5=typeof Image<"u",G5=typeof ImageBitmap<"u",_re=!!bre,Z5=HO?!0:_re;function wre(t){switch(t){case"auto":return G5||K5||Z5;case"imagebitmap":return G5;case"image":return K5;case"data":return Z5;default:throw new Error(`@loaders.gl/images: image ${t} not supported in this environment`)}}function xre(){if(G5)return"imagebitmap";if(K5)return"image";if(Z5)return"data";throw new Error("Install '@loaders.gl/polyfills' to parse images under Node.js")}function Are(t){const e=Sre(t);if(!e)throw new Error("Not an image");return e}function Ere(t){switch(Are(t)){case"data":return t;case"image":case"imagebitmap":const e=document.createElement("canvas"),n=e.getContext("2d");if(!n)throw new Error("getImageData");return e.width=t.width,e.height=t.height,n.drawImage(t,0,0),n.getImageData(0,0,t.width,t.height);default:throw new Error("getImageData")}}function Sre(t){return typeof ImageBitmap<"u"&&t instanceof ImageBitmap?"imagebitmap":typeof Image<"u"&&t instanceof Image?"image":t&&typeof t=="object"&&t.data&&t.width&&t.height?"data":null}const Tre=/^data:image\/svg\+xml/,Cre=/\.svg((\?|#).*)?$/;function GO(t){return t&&(Tre.test(t)||Cre.test(t))}function Pre(t,e){if(GO(e)){let r=new TextDecoder().decode(t);try{typeof unescape=="function"&&typeof encodeURIComponent=="function"&&(r=unescape(encodeURIComponent(r)))}catch(s){throw new Error(s.message)}return`data:image/svg+xml;base64,${btoa(r)}`}return $W(t,e)}function $W(t,e){if(GO(e))throw new Error("SVG cannot be parsed directly to imagebitmap");return new Blob([new Uint8Array(t)])}async function HW(t,e,n){const r=Pre(t,n),i=self.URL||self.webkitURL,s=typeof r!="string"&&i.createObjectURL(r);try{return await Ire(s||r,e)}finally{s&&i.revokeObjectURL(s)}}async function Ire(t,e){const n=new Image;return n.src=t,e.image&&e.image.decode&&n.decode?(await n.decode(),n):await new Promise((r,i)=>{try{n.onload=()=>r(n),n.onerror=s=>{const o=s instanceof Error?s.message:"error";i(new Error(o))}}catch(s){i(s)}})}const Ore={};let Ck=!0;async function Mre(t,e,n){let r;GO(n)?r=await HW(t,e,n):r=$W(t,n);const i=e&&e.imagebitmap;return await Rre(r,i)}async function Rre(t,e=null){if((kre(e)||!Ck)&&(e=null),e)try{return await createImageBitmap(t,e)}catch(n){console.warn(n),Ck=!1}return await createImageBitmap(t)}function kre(t){for(const e in t||Ore)return!1;return!0}function Nre(t){return!Fre(t,"ftyp",4)||(t[8]&96)===0?null:Dre(t)}function Dre(t){switch(Bre(t,8,12).replace("\0"," ").trim()){case"avif":case"avis":return{extension:"avif",mimeType:"image/avif"};default:return null}}function Bre(t,e,n){return String.fromCharCode(...t.slice(e,n))}function Lre(t){return[...t].map(e=>e.charCodeAt(0))}function Fre(t,e,n=0){const r=Lre(e);for(let i=0;i<r.length;++i)if(r[i]!==t[i+n])return!1;return!0}const _l=!1,G1=!0;function qW(t){const e=wy(t);return zre(e)||Wre(e)||jre(e)||Vre(e)||Ure(e)}function Ure(t){const e=new Uint8Array(t instanceof DataView?t.buffer:t),n=Nre(e);return n?{mimeType:n.mimeType,width:0,height:0}:null}function zre(t){const e=wy(t);return e.byteLength>=24&&e.getUint32(0,_l)===2303741511?{mimeType:"image/png",width:e.getUint32(16,_l),height:e.getUint32(20,_l)}:null}function jre(t){const e=wy(t);return e.byteLength>=10&&e.getUint32(0,_l)===1195984440?{mimeType:"image/gif",width:e.getUint16(6,G1),height:e.getUint16(8,G1)}:null}function Vre(t){const e=wy(t);return e.byteLength>=14&&e.getUint16(0,_l)===16973&&e.getUint32(2,G1)===e.byteLength?{mimeType:"image/bmp",width:e.getUint32(18,G1),height:e.getUint32(22,G1)}:null}function Wre(t){const e=wy(t);if(!(e.byteLength>=3&&e.getUint16(0,_l)===65496&&e.getUint8(2)===255))return null;const{tableMarkers:r,sofMarkers:i}=$re();let s=2;for(;s+9<e.byteLength;){const o=e.getUint16(s,_l);if(i.has(o))return{mimeType:"image/jpeg",height:e.getUint16(s+5,_l),width:e.getUint16(s+7,_l)};if(!r.has(o))return null;s+=2,s+=e.getUint16(s,_l)}return null}function $re(){const t=new Set([65499,65476,65484,65501,65534]);for(let n=65504;n<65520;++n)t.add(n);return{tableMarkers:t,sofMarkers:new Set([65472,65473,65474,65475,65477,65478,65479,65481,65482,65483,65485,65486,65487,65502])}}function wy(t){if(t instanceof DataView)return t;if(ArrayBuffer.isView(t))return new DataView(t.buffer);if(t instanceof ArrayBuffer)return new DataView(t);throw new Error("toDataView")}async function Hre(t,e){var i;const{mimeType:n}=qW(t)||{},r=(i=globalThis.loaders)==null?void 0:i.parseImageNode;return N_(r),await r(t,n)}async function qre(t,e,n){e=e||{};const i=(e.image||{}).type||"auto",{url:s}=n||{},o=Qre(i);let a;switch(o){case"imagebitmap":a=await Mre(t,e,s);break;case"image":a=await HW(t,e,s);break;case"data":a=await Hre(t);break;default:N_(!1)}return i==="data"&&(a=Ere(a)),a}function Qre(t){switch(t){case"auto":case"data":return xre();default:return wre(t),t}}const Xre=["png","jpg","jpeg","gif","webp","bmp","ico","svg","avif"],Yre=["image/png","image/jpeg","image/gif","image/webp","image/avif","image/bmp","image/vnd.microsoft.icon","image/svg+xml"],Kre={image:{type:"auto",decode:!0}},Gre={dataType:null,batchType:null,id:"image",module:"images",name:"Images",version:yre,mimeTypes:Yre,extensions:Xre,parse:qre,tests:[t=>!!qW(new DataView(t))],options:Kre},Zt=new yy({id:"deck"});let J5={};function Zre(t){J5=t}function $i(t,e,n,r){Zt.level>0&&J5[t]&&J5[t].call(null,e,n,r)}function Jre(t){const e=t[0],n=t[t.length-1];return e==="{"&&n==="}"||e==="["&&n==="]"}const eie={dataType:null,batchType:null,id:"JSON",name:"JSON",module:"",version:"",options:{},extensions:["json","geojson"],mimeTypes:["application/json","application/geo+json"],testText:Jre,parseTextSync:JSON.parse};function tie(){const t="9.1.14",e=globalThis.deck&&globalThis.deck.VERSION;if(e&&e!==t)throw new Error(`deck.gl - multiple versions detected: ${e} vs ${t}`);return e||(Zt.log(1,`deck.gl ${t}`)(),globalThis.deck={...globalThis.deck,VERSION:t,version:t,log:Zt,_registerLoggers:Zre},qne([eie,[Gre,{imagebitmap:{premultiplyAlpha:"none"}}]])),t}const nie=tie();function ZO(t,e){if(!t)throw new Error(e||"shadertools: assertion failed.")}const G3={number:{type:"number",validate(t,e){return Number.isFinite(t)&&typeof e=="object"&&(e.max===void 0||t<=e.max)&&(e.min===void 0||t>=e.min)}},array:{type:"array",validate(t,e){return Array.isArray(t)||ArrayBuffer.isView(t)}}};function rie(t){const e={};for(const[n,r]of Object.entries(t))e[n]=iie(r);return e}function iie(t){let e=Pk(t);if(e!=="object")return{value:t,...G3[e],type:e};if(typeof t=="object")return t?t.type!==void 0?{...t,...G3[t.type],type:t.type}:t.value===void 0?{type:"object",value:t}:(e=Pk(t.value),{...t,...G3[e],type:e}):{type:"object",value:null};throw new Error("props")}function Pk(t){return Array.isArray(t)||ArrayBuffer.isView(t)?"array":typeof t}const sie=`#ifdef MODULE_LOGDEPTH
46  logdepth_adjustPosition(gl_Position);
47#endif
48`,oie=`#ifdef MODULE_MATERIAL
49  fragColor = material_filterColor(fragColor);
50#endif
51
52#ifdef MODULE_LIGHTING
53  fragColor = lighting_filterColor(fragColor);
54#endif
55
56#ifdef MODULE_FOG
57  fragColor = fog_filterColor(fragColor);
58#endif
59
60#ifdef MODULE_PICKING
61  fragColor = picking_filterHighlightColor(fragColor);
62  fragColor = picking_filterPickingColor(fragColor);
63#endif
64
65#ifdef MODULE_LOGDEPTH
66  logdepth_setFragDepth();
67#endif
68`,aie={vertex:sie,fragment:oie},Ik=/void\s+main\s*\([^)]*\)\s*\{\n?/,Ok=/}\n?[^{}]*$/,Z3=[],l_="__LUMA_INJECT_DECLARATIONS__";function lie(t){const e={vertex:{},fragment:{}};for(const n in t){let r=t[n];const i=cie(n);typeof r=="string"&&(r={order:0,injection:r}),e[i][n]=r}return e}function cie(t){const e=t.slice(0,2);switch(e){case"vs":return"vertex";
68case"fs":return"fragment";default:throw new Error(e)}}function U_(t,e,n,r=!1){const i=e==="vertex";for(const s in n){const o=n[s];o.sort((l,c)=>l.order-c.order),Z3.length=o.length;for(let l=0,c=o.length;l<c;++l)Z3[l]=o[l].injection;const a=`${Z3.join(`
69`)}
70`;switch(s){case"vs:#decl":i&&(t=t.replace(l_,a));break;case"vs:#main-start":i&&(t=t.replace(Ik,l=>l+a));break;case"vs:#main-end":i&&(t=t.replace(Ok,l=>a+l));break;case"fs:#decl":i||(t=t.replace(l_,a));break;case"fs:#main-start":i||(t=t.replace(Ik,l=>l+a));break;case"fs:#main-end":i||(t=t.replace(Ok,l=>a+l));break;default:t=t.replace(s,l=>l+a)}}return t=t.replace(l_,""),r&&(t=t.replace(/\}\s*$/,s=>s+aie[e])),t}function z_(t){t.map(e=>uie(e))}function uie(t){if(t.instance)return;z_(t.dependencies||[]);const{propTypes:e={},deprecations:n=[],inject:r={}}=t,i={normalizedInjections:lie(r),parsedDeprecations:fie(n)};e&&(i.propValidators=rie(e)),t.instance=i;let s={};e&&(s=Object.entries(e).reduce((o,[a,l])=>{const c=l==null?void 0:l.value;return c&&(o[a]=c),o},{})),t.defaultUniforms={...t.defaultUniforms,...s}}function QW(t,e,n){var r;(r=t.deprecations)==null||r.forEach(i=>{var s;(s=i.regex)!=null&&s.test(e)&&(i.deprecated?n.deprecated(i.old,i.new)():n.removed(i.old,i.new)())})}function fie(t){return t.forEach(e=>{switch(e.type){case"function":e.regex=new RegExp(`\\b${e.old}\\(`);break;default:e.regex=new RegExp(`${e.type} ${e.old};`)}}),t}function JO(t){z_(t);const e={},n={};XW({modules:t,level:0,moduleMap:e,moduleDepth:n});const r=Object.keys(n).sort((i,s)=>n[s]-n[i]).map(i=>e[i]);return z_(r),r}function XW(t){const{modules:e,level:n,moduleMap:r,moduleDepth:i}=t;if(n>=5)throw new Error("Possible loop in shader dependency graph");for(const s of e)r[s.name]=s,(i[s.name]===void 0||i[s.name]<n)&&(i[s.name]=n);for(const s of e)s.dependencies&&XW({modules:s.dependencies,level:n+1,moduleMap:r,moduleDepth:i})}function hie(t){switch(t==null?void 0:t.gpu.toLowerCase()){case"apple":return`#define APPLE_GPU
71// Apple optimizes away the calculation necessary for emulated fp64
72#define LUMA_FP64_CODE_ELIMINATION_WORKAROUND 1
73#define LUMA_FP32_TAN_PRECISION_WORKAROUND 1
74// Intel GPU doesn't have full 32 bits precision in same cases, causes overflow
75#define LUMA_FP64_HIGH_BITS_OVERFLOW_WORKAROUND 1
76`;case"nvidia":return`#define NVIDIA_GPU
77// Nvidia optimizes away the calculation necessary for emulated fp64
78#define LUMA_FP64_CODE_ELIMINATION_WORKAROUND 1
79`;case"intel":return`#define INTEL_GPU
80// Intel optimizes away the calculation necessary for emulated fp64
81#define LUMA_FP64_CODE_ELIMINATION_WORKAROUND 1
82// Intel's built-in 'tan' function doesn't have acceptable precision
83#define LUMA_FP32_TAN_PRECISION_WORKAROUND 1
84// Intel GPU doesn't have full 32 bits precision in same cases, causes overflow
85#define LUMA_FP64_HIGH_BITS_OVERFLOW_WORKAROUND 1
86`;case"amd":return`#define AMD_GPU
87`;default:return`#define DEFAULT_GPU
88// Prevent driver from optimizing away the calculation necessary for emulated fp64
89#define LUMA_FP64_CODE_ELIMINATION_WORKAROUND 1
90// Headless Chrome's software shader 'tan' function doesn't have acceptable precision
91#define LUMA_FP32_TAN_PRECISION_WORKAROUND 1
92// If the GPU doesn't have full 32 bits precision, will causes overflow
93#define LUMA_FP64_HIGH_BITS_OVERFLOW_WORKAROUND 1
94`}}function die(t,e){var r;if(Number(((r=t.match(/^#version[ \t]+(\d+)/m))==null?void 0:r[1])||100)!==300)throw new Error("luma.gl v9 only supports GLSL 3.00 shader sources");switch(e){case"vertex":return t=Mk(t,pie),t;case"fragment":return t=Mk(t,gie),t;default:throw new Error(e)}}const YW=[[/^(#version[ \t]+(100|300[ \t]+es))?[ \t]*\n/,`#version 300 es
95`],[/\btexture(2D|2DProj|Cube)Lod(EXT)?\(/g,"textureLod("],[/\btexture(2D|2DProj|Cube)(EXT)?\(/g,"texture("]],pie=[...YW,[eP("attribute"),"in $1"],[eP("varying"),"out $1"]],gie=[...YW,[eP("varying"),"in $1"]];function Mk(t,e){for(const[n,r]of e)t=t.replace(n,r);return t}function eP(t){return new RegExp(`\\b${t}[ \\t]+(\\w+[ \\t]+\\w+(\\[\\w+\\])?;)`,"g")}function KW(t,e){let n="";for(const r in t){const i=t[r];if(n+=`void ${i.signature} {
96`,i.header&&(n+=`  ${i.header}`),e[r]){const s=e[r];s.sort((o,a)=>o.order-a.order);for(const o of s)n+=`  ${o.injection}
97`}i.footer&&(n+=`  ${i.footer}`),n+=`}
98`}return n}function GW(t){const e={vertex:{},fragment:{}};for(const n of t){let r,i;
98typeof n!="string"?(r=n,i=r.hook):(r={},i=n),i=i.trim();const[s,o]=i.split(":"),a=i.replace(/\(.+/,""),l=Object.assign(r,{signature:o});switch(s){case"vs":e.vertex[a]=l;break;case"fs":e.fragment[a]=l;break;default:throw new Error(s)}}return e}function mie(t,e){return{name:vie(t,e),language:"glsl",version:yie(t)}}function vie(t,e="unnamed"){const r=/#define[^\S\r\n]*SHADER_NAME[^\S\r\n]*([A-Za-z0-9_-]+)\s*/.exec(t);return r?r[1]:e}function yie(t){let e=100;const n=t.match(/[^\s]+/g);if(n&&n.length>=2&&n[0]==="#version"){const r=parseInt(n[1],10);Number.isFinite(r)&&(e=r)}if(e!==100&&e!==300)throw new Error(`Invalid GLSL version ${e}`);return e}const ZW=`
99
100${l_}
101`,bie=`precision highp float;
102`;function _ie(t){const e=JO(t.modules||[]);return{source:xie(t.platformInfo,{...t,source:t.source,stage:"vertex",modules:e}),getUniforms:JW(e)}}function wie(t){const{vs:e,fs:n}=t,r=JO(t.modules||[]);return{vs:Rk(t.platformInfo,{...t,source:e,stage:"vertex",modules:r}),fs:Rk(t.platformInfo,{...t,source:n,stage:"fragment",modules:r}),getUniforms:JW(r)}}function xie(t,e){var v;const{source:n,stage:r,modules:i,hookFunctions:s=[],inject:o={},log:a}=e;ZO(typeof n=="string","shader source must be a string");const l=n;let c="";const u=GW(s),h={},d={},m={};for(const b in o){const x=typeof o[b]=="string"?{injection:o[b],order:0}:o[b],T=/^(v|f)s:(#)?([\w-]+)$/.exec(b);if(T){const E=T[2],C=T[3];E?C==="decl"?d[b]=[x]:m[b]=[x]:h[b]=[x]}else m[b]=[x]}const y=i;for(const b of y){a&&QW(b,l,a);const x=e$(b,"wgsl");c+=x;const T=((v=b.injections)==null?void 0:v[r])||{};for(const E in T){const C=/^(v|f)s:#([\w-]+)$/.exec(E);if(C){const O=C[2]==="decl"?d:m;O[E]=O[E]||[],O[E].push(T[E])}else h[E]=h[E]||[],h[E].push(T[E])}}return c+=ZW,c=U_(c,r,d),c+=KW(u[r],h),c+=l,c=U_(c,r,m),c}function Rk(t,e){var N;const{id:n,source:r,stage:i,language:s="glsl",modules:o,defines:a={},hookFunctions:l=[],inject:c={},prologue:u=!0,log:h}=e;ZO(typeof r=="string","shader source must be a string");const d=s==="glsl"?mie(r).version:-1,m=t.shaderLanguageVersion,y=d===100?"#version 100":"#version 300 es",b=r.split(`
103`).slice(1).join(`
104`),x={};o.forEach(U=>{Object.assign(x,U.defines)}),Object.assign(x,a);let T="";switch(s){case"wgsl":break;case"glsl":T=u?`${y}
105
106// ----- PROLOGUE -------------------------
107${Aie({id:n,source:r,stage:i})}
108${`#define SHADER_TYPE_${i.toUpperCase()}`}
109
110${hie(t)}
111${i==="fragment"?bie:""}
112
113// ----- APPLICATION DEFINES -------------------------
114
115${Eie(x)}
116
117`:`${y}
118`;break}const E=GW(l),C={},I={},O={};for(const U in c){const F=typeof c[U]=="string"?{injection:c[U],order:0}:c[U],H=/^(v|f)s:(#)?([\w-]+)$/.exec(U);if(H){const W=H[2],z=H[3];W?z==="decl"?I[U]=[F]:O[U]=[F]:C[U]=[F]}else O[U]=[F]}for(const U of o){h&&QW(U,b,h);const F=e$(U,i);T+=F;const H=((N=U.instance)==null?void 0:N.normalizedInjections[i])||{};for(const W in H){const z=/^(v|f)s:#([\w-]+)$/.exec(W);if(z){const M=z[2]==="decl"?I:O;M[W]=M[W]||[],M[W].push(H[W])}else C[W]=C[W]||[],C[W].push(H[W])}}return T+="// ----- MAIN SHADER SOURCE -------------------------",T+=ZW,T=U_(T,i,I),T+=KW(E[i],C),T+=b,T=U_(T,i,O),s==="glsl"&&d!==m&&(T=die(T,i)),T.trim()}function JW(t){return function(n){var i;const r={};for(const s of t){const o=(i=s.getUniforms)==null?void 0:i.call(s,n,r);Object.assign(r,o)}return r}}function Aie(t){const{id:e,source:n,stage:r}=t;return e&&n.indexOf("SHADER_NAME")===-1?`
119#define SHADER_NAME ${e}_${r}`:""}function Eie(t={}){let e="";for(const n in t){const r=t[n];(r||Number.isFinite(r))&&(e+=`#define ${n.toUpperCase()} ${t[n]}
120`)}return e}function e$(t,e){let n;switch(e){case"vertex":n=t.vs||"";break;case"fragment":n=t.fs||"";break;case"wgsl":n=t.source||"";break;default:ZO(!1)}if(!t.name)throw new Error("Shader module must have a name");const r=t.name.toUpperCase().replace(/[^0-9a-z]/gi,"_");let i=`// ----- MODULE ${t.name} ---------------
121
122`;return e!=="wgsl"&&(i+=`#define MODULE_${r}
123`),i+=`${n}
124`,i}const Sie=/^\s*\#\s*ifdef\s*([a-zA-Z_]+)\s*$/,Tie=/^\s*\#\s*endif\s*$/;function Cie(t,e){var o;const n=t.split(`
125`),r=[];let i=!0,s=null;for(const a of n){const l=a.match(Sie),c=a.match(Tie);l?(s=l[1],i=!!((o=e==null?void 0:e.defines)!=null&&o[s])):c?i=!0:i&&r.push(a)}return r.join(`
126`)}const Ph=class Ph{constructor(){re(this,"_hookFunctions",[]);re(this,"_defaultModules",[])}static getDefaultShaderAssembler(){return Ph.defaultShaderAssembler=Ph.defaultShaderAssembler||new Ph,Ph.defaultShaderAssembler}addDefaultModule(e){this._defaultModules.find(n=>n.name===(typeof e=="string"?e:e.name))||this._defaultModules.push(e)}removeDefaultModule(e){const n=typeof e=="string"?e:e.name;this._defaultModules=this._defaultModules.filter(r=>r.name!==n)}addShaderHook(e,n){n&&(e=Object.assign(n,{hook:e})),this._hookFunctions.push(e)}assembleWGSLShader(e){const n=this._getModuleList(e.modules),r=this._hookFunctions,{source:i,getUniforms:s}=_ie({...e,source:e.source,modules:n,hookFunctions:r});return{source:e.platformInfo.shaderLanguage==="wgsl"?Cie(i):i,getUniforms:s,modules:n}}assembleGLSLShaderPair(e){const n=this._getModuleList(e.modules),r=this._hookFunctions;return{...wie({...e,vs:e.vs,fs:e.fs,modules:n,hookFunctions:r}),modules:n}}_getModuleList(e=[]){const n=new Array(this._defaultModules.length+e.length),r={};let i=0;for(let s=0,o=this._defaultModules.length;s<o;++s){const a=this._defaultModules[s],l=a.name;n[i++]=a,r[l]=!0}for(let s=0,o=e.length;s<o;++s){const a=e[s],l=a.name;r[l]||(n[i++]=a,r[l]=!0)}return n.length=i,z_(n),n}};re(Ph,"defaultShaderAssembler");let j_=Ph;const Pie=`out vec4 transform_output;
127void main() {
128  transform_output = vec4(0);
129}`,Iie=`#version 300 es
130${Pie}`;function Oie(t){const{input:e,inputChannels:n,output:r}={};if(!e)return Iie;if(!n)throw new Error("inputChannels");const i=Mie(n),s=Rie(e,n);return`#version 300 es
131in ${i} ${e};
132out vec4 ${r};
133void main() {
134  ${r} = ${s};
135}`}function Mie(t){switch(t){case 1:return"float";case 2:return"vec2";case 3:return"vec3";case 4:return"vec4";default:throw new Error(`invalid channels: ${t}`)}}function Rie(t,e){switch(e){case 1:return`vec4(${t}, 0.0, 0.0, 1.0)`;case 2:return`vec4(${t}, 0.0, 1.0)`;case 3:return`vec4(${t}
135, 1.0)`;case 4:return t;default:throw new Error(`invalid channels: ${e}`)}}class kie{constructor(){re(this,"stats",new Map)}getStats(e){return this.get(e)}get(e){return this.stats.has(e)||this.stats.set(e,new by({id:e})),this.stats.get(e)}}const t$=new kie,ut=new yy({id:"luma.gl"}),J3={};function Hx(t="id"){J3[t]=J3[t]||1;const e=J3[t]++;return`${t}-${e}`}var $5;let Nn=($5=class{constructor(e,n,r){re(this,"id");re(this,"props");re(this,"userData",{});re(this,"_device");re(this,"destroyed",!1);re(this,"allocatedBytes",0);re(this,"_attachedResources",new Set);if(!e)throw new Error("no device");this._device=e,this.props=Nie(n,r);const i=this.props.id!=="undefined"?this.props.id:Hx(this[Symbol.toStringTag]);this.props.id=i,this.id=i,this.userData=this.props.userData||{},this.addStats()}toString(){return`${this[Symbol.toStringTag]||this.constructor.name}:"${this.id}"`}destroy(){this.destroyResource()}delete(){return this.destroy(),this}getProps(){return this.props}attachResource(e){this._attachedResources.add(e)}detachResource(e){this._attachedResources.delete(e)}destroyAttachedResource(e){this._attachedResources.delete(e)&&e.destroy()}destroyAttachedResources(){for(const e of Object.values(this._attachedResources))e.destroy();this._attachedResources=new Set}destroyResource(){this.destroyAttachedResources(),this.removeStats(),this.destroyed=!0}removeStats(){const e=this._device.statsManager.getStats("Resource Counts"),n=this[Symbol.toStringTag];e.get(`${n}s Active`).decrementCount()}trackAllocatedMemory(e,n=this[Symbol.toStringTag]){const r=this._device.statsManager.getStats("Resource Counts");r.get("GPU Memory").addCount(e),r.get(`${n} Memory`).addCount(e),this.allocatedBytes=e}trackDeallocatedMemory(e=this[Symbol.toStringTag]){const n=this._device.statsManager.getStats("Resource Counts");n.get("GPU Memory").subtractCount(this.allocatedBytes),n.get(`${e} Memory`).subtractCount(this.allocatedBytes),this.allocatedBytes=0}addStats(){const e=this._device.statsManager.getStats("Resource Counts"),n=this[Symbol.toStringTag];e.get("Resources Created").incrementCount(),e.get(`${n}s Created`).incrementCount(),e.get(`${n}s Active`).incrementCount()}},re($5,"defaultProps",{id:"undefined",handle:void 0,userData:void 0}),$5);function Nie(t,e){const n={...e};for(const r in t)t[r]!==void 0&&(n[r]=t[r]);return n}var Or;let lr=(Or=class extends Nn{constructor(n,r){const i={...r};(r.usage||0)&Or.INDEX&&!r.indexType&&(r.data instanceof Uint32Array?i.indexType="uint32":r.data instanceof Uint16Array&&(i.indexType="uint16")),delete i.data;super(n,i,Or.defaultProps);re(this,"usage");re(this,"indexType");re(this,"updateTimestamp");re(this,"debugData",new ArrayBuffer(0));this.usage=i.usage||0,this.indexType=i.indexType,this.updateTimestamp=n.incrementTimestamp()}get[Symbol.toStringTag](){return"Buffer"}clone(n){return this.device.createBuffer({...this.props,...n})}readSyncWebGL(n,r){throw new Error("not implemented")}_setDebugData(n,r,i){const s=ArrayBuffer.isView(n)?n.buffer:n,o=Math.min(n?n.byteLength:i,Or.DEBUG_DATA_MAX_LENGTH);s===null?this.debugData=new ArrayBuffer(o):r===0&&i===s.byteLength?this.debugData=s.slice(0,o):this.debugData=s.slice(r,r+o)}},re(Or,"defaultProps",{...Nn.defaultProps,usage:0,byteLength:0,byteOffset:0,data:null,indexType:"uint16",mappedAtCreation:!1}),re(Or,"MAP_READ",1),re(Or,"MAP_WRITE",2),re(Or,"COPY_SRC",4),re(Or,"COPY_DST",8),re(Or,"INDEX",16),re(Or,"VERTEX",32),re(Or,"UNIFORM",64),re(Or,"STORAGE",128),re(Or,"INDIRECT",256),re(Or,"QUERY_RESOLVE",512),re(Or,"DEBUG_DATA_MAX_LENGTH",32),Or);function n$(t){const e=kk[t],n=Die(e),r=t.includes("norm"),i=!r&&!t.startsWith("float"),s=t.startsWith("s");return{dataType:kk[t],byteLength:n,integer:i,signed:s,normalized:r}}function Die(t){return Bie[t]}const kk={uint8:"uint8",sint8:"sint8",unorm8:"uint8",snorm8:"sint8",uint16:"uint16",sint16:"sint16",unorm16:"uint16",snorm16:"sint16",float16:"float16",float32:"float32",uint32:"uint32",sint32:"sint32"},Bie={uint8:1,sint8:1,uint16:2,sint16:2,float16:2,float32:4,uint32:4,sint32:4},ji="texture-compression-bc",Mn="texture-compression-astc",fl="texture-compression-etc2",Lie="texture-compression-etc1-webgl",ib="texture-compression-pvrtc-webgl",eE="texture-compression-atc-webgl",sb="float32-renderable-webgl",tE="float16-renderable-webgl",Fie="rgb9e5ufloat-renderable-webgl",nE="snorm8-renderable-webgl",c1="norm16-renderable-webgl",rE="snorm16-renderable-webgl",ob="float32-filterable",Nk="float16-filterable-webgl";function r$(t){const e=Uie[t];if(!e)throw new Error(`Unsupported texture format ${t}`);return e}const Uie={r8unorm:{},r8snorm:{render:nE},r8uint:{},r8sint:{},rg8unorm:{},rg8snorm:{render:nE},rg8uint:{},rg8sint:{},r16uint:{},r16sint:{},r16float:{render:tE,filter:"float16-filterable-webgl"},"r16unorm-webgl":{f:c1},"r16snorm-webgl":{f:rE},"rgba4unorm-webgl":{channels:"rgba",bitsPerChannel:[4,4,4,4],packed:!0},"rgb565unorm-webgl":{channels:"rgb",bitsPerChannel:[5,6,5,0],packed:!0},"rgb5a1unorm-webgl":{channels:"rgba",bitsPerChannel:[5,5,5,1],packed:!0},"rgb8unorm-webgl":{},"rgb8snorm-webgl":{},rgba8unorm:{},"rgba8unorm-srgb":{},rgba8snorm:{render:nE},rgba8uint:{},rgba8sint:{},bgra8unorm:{},"bgra8unorm-srgb":{},rg16uint:{},rg16sint:{},rg16float:{render:tE,filter:Nk},"rg16unorm-webgl":{render:c1},"rg16snorm-webgl":{render:rE},r32uint:{},r32sint:{},r32float:{render:sb,filter:ob},rgb9e5ufloat:{channels:"rgb",packed:!0,render:Fie},rg11b10ufloat:{channels:"rgb",bitsPerChannel:[11,11,10,0],packed:!0,p:1,render:sb},rgb10a2unorm:{channels:"rgba",bitsPerChannel:[10,10,10,2],packed:!0,p:1},"rgb10a2uint-webgl":{channels:"rgba",bitsPerChannel:[10,10,10,2],packed:!0,p:1,wgpu:!1},"rgb16unorm-webgl":{f:c1},"rgb16snorm-webgl":{f:c1},rg32uint:{},rg32sint:{},rg32float:{render:!1,filter:ob},rgba16uint:{},rgba16sint:{},rgba16float:{render:tE,filter:Nk},"rgba16unorm-webgl":{render:c1},"rgba16snorm-webgl":{render:rE},"rgb32float-webgl":{render:sb,filter:ob},rgba32uint:{},rgba32sint:{},rgba32float:{render:sb,filter:ob},stencil8:{attachment:"stencil",bitsPerChannel:[8,0,0,0],dataType:"uint8"},depth16unorm:{attachment:"depth",bitsPerChannel:[16,0,0,0],dataType:"uint16"},depth24plus:{attachment:"depth",bitsPerChannel:[24,0,0,0],dataType:"uint32"},depth32float:{attachment:"depth",bitsPerChannel:[32,0,0,0],dataType:"float32"},"depth24plus-stencil8":{attachment:"depth-stencil",bitsPerChannel:[24,8,0,0],packed:!0},"depth32float-stencil8":{attachment:"depth-stencil",bitsPerChannel:[32,8,0,0],packed:!0}
135,"bc1-rgb-unorm-webgl":{f:ji},"bc1-rgb-unorm-srgb-webgl":{f:ji},"bc1-rgba-unorm":{f:ji},"bc1-rgba-unorm-srgb":{f:ji},"bc2-rgba-unorm":{f:ji},"bc2-rgba-unorm-srgb":{f:ji},"bc3-rgba-unorm":{f:ji},"bc3-rgba-unorm-srgb":{f:ji},"bc4-r-unorm":{f:ji},"bc4-r-snorm":{f:ji},"bc5-rg-unorm":{f:ji},"bc5-rg-snorm":{f:ji},"bc6h-rgb-ufloat":{f:ji},"bc6h-rgb-float":{f:ji},"bc7-rgba-unorm":{f:ji},"bc7-rgba-unorm-srgb":{f:ji},"etc2-rgb8unorm":{f:fl},"etc2-rgb8unorm-srgb":{f:fl},"etc2-rgb8a1unorm":{f:fl},"etc2-rgb8a1unorm-srgb":{f:fl},"etc2-rgba8unorm":{f:fl},"etc2-rgba8unorm-srgb":{f:fl},"eac-r11unorm":{f:fl},"eac-r11snorm":{f:fl},"eac-rg11unorm":{f:fl},"eac-rg11snorm":{f:fl},"astc-4x4-unorm":{f:Mn},"astc-4x4-unorm-srgb":{f:Mn},"astc-5x4-unorm":{f:Mn},"astc-5x4-unorm-srgb":{f:Mn},"astc-5x5-unorm":{f:Mn},"astc-5x5-unorm-srgb":{f:Mn},"astc-6x5-unorm":{f:Mn},"astc-6x5-unorm-srgb":{f:Mn},"astc-6x6-unorm":{f:Mn},"astc-6x6-unorm-srgb":{f:Mn},"astc-8x5-unorm":{f:Mn},"astc-8x5-unorm-srgb":{f:Mn},"astc-8x6-unorm":{f:Mn},"astc-8x6-unorm-srgb":{f:Mn},"astc-8x8-unorm":{f:Mn},"astc-8x8-unorm-srgb":{f:Mn},"astc-10x5-unorm":{f:Mn},"astc-10x5-unorm-srgb":{f:Mn},"astc-10x6-unorm":{f:Mn},"astc-10x6-unorm-srgb":{f:Mn},"astc-10x8-unorm":{f:Mn},"astc-10x8-unorm-srgb":{f:Mn},"astc-10x10-unorm":{f:Mn},"astc-10x10-unorm-srgb":{f:Mn},"astc-12x10-unorm":{f:Mn},"astc-12x10-unorm-srgb":{f:Mn},"astc-12x12-unorm":{f:Mn},"astc-12x12-unorm-srgb":{f:Mn},"pvrtc-rgb4unorm-webgl":{f:ib},"pvrtc-rgba4unorm-webgl":{f:ib},"pvrtc-rbg2unorm-webgl":{f:ib},"pvrtc-rgba2unorm-webgl":{f:ib},"etc1-rbg-unorm-webgl":{f:Lie},"atc-rgb-unorm-webgl":{f:eE},"atc-rgba-unorm-webgl":{f:eE},"atc-rgbai-unorm-webgl":{f:eE}},zie=["bc1","bc2","bc3","bc4","bc5","bc6","bc7","etc1","etc2","eac","atc","astc","pvrtc"],jie=/^(r|rg|rgb|rgba|bgra)([0-9]*)([a-z]*)(-srgb)?(-webgl)?$/;function i$(t){return zie.some(e=>t.startsWith(e))}function eM(t){let e=Vie(t);if(i$(t)){e.channels="rgb",e.components=3,e.bytesPerPixel=1,e.srgb=!1,e.compressed=!0;const r=Wie(t);r&&(e.blockWidth=r.blockWidth,e.blockHeight=r.blockHeight)}const n=jie.exec(t);if(n){const[,r,i,s,o,a]=n,l=`${s}${i}`,c=n$(l),u=c.byteLength*8,h=r.length,d=[u,h>=2?u:0,h>=3?u:0,h>=4?u:0];e={format:t,attachment:e.attachment,dataType:c.dataType,components:h,channels:r,integer:c.integer,signed:c.signed,normalized:c.normalized,bitsPerChannel:d,bytesPerPixel:c.byteLength*r.length,packed:e.packed,srgb:e.srgb},a==="-webgl"&&(e.webgl=!0),o==="-srgb"&&(e.srgb=!0)}return t.endsWith("-webgl")&&(e.webgl=!0),t.endsWith("-srgb")&&(e.srgb=!0),e}function Vie(t){var s;const e=r$(t),n=e.bytesPerPixel||1,r=e.bitsPerChannel||[8,8,8,8];return delete e.bitsPerChannel,delete e.bytesPerPixel,delete e.f,delete e.render,delete e.filter,delete e.blend,delete e.store,{...e,format:t,attachment:e.attachment||"color",channels:e.channels||"r",components:e.components||((s=e.channels)==null?void 0:s.length)||1,bytesPerPixel:n,bitsPerChannel:r,dataType:e.dataType||"uint8",srgb:e.srgb??!1,packed:e.packed??!1,webgl:e.webgl??!1,integer:e.integer??!1,signed:e.signed??!1,normalized:e.normalized??!1,compressed:e.compressed??!1}}function Wie(t){const n=/.*-(\d+)x(\d+)-.*/.exec(t);if(n){const[,r,i]=n;return{blockWidth:Number(r),blockHeight:Number(i)}}return null}function $ie(t){const e=r$(t),n={format:t,create:e.f??!0,render:e.render??!0,filter:e.filter??!0,blend:e.blend??!0,store:e.store??!0},r=eM(t),i=t.startsWith("depth")||t.startsWith("stencil"),s=r==null?void 0:r.signed,o=r==null?void 0:r.integer,a=r==null?void 0:r.webgl;return n.render&&(n.render=!s),n.filter&&(n.filter=!i&&!s&&!o&&!a),n}class Hie{}class qie{constructor(e=[],n){re(this,"features");re(this,"disabledFeatures");this.features=new Set(e),this.disabledFeatures=n||{}}*[Symbol.iterator](){yield*this.features}has(e){var n;return!((n=this.disabledFeatures)!=null&&n[e])&&this.features.has(e)}}const Cx=class Cx{constructor(e){re(this,"id");re(this,"props");re(this,"userData",{});re(this,"statsManager",t$);re(this,"timestamp",0);re(this,"_reused",!1);re(this,"_lumaData",{});this.props={...Cx.defaultProps,...e},this.id=this.props.id||Hx(this[Symbol.toStringTag].toLowerCase())}get[Symbol.toStringTag](){return"Device"}getTextureFormatCapabilities(e){const n=$ie(e),r=o=>
135(typeof o=="string"?this.features.has(o):o)??!0,i=r(n.create),s={format:e,create:i,render:i&&r(n.render),filter:i&&r(n.filter),blend:i&&r(n.blend),store:i&&r(n.store)};return this._getDeviceSpecificTextureFormatCapabilities(s)}isTextureFormatSupported(e,n){return this.getTextureFormatCapabilities(e).create}isTextureFormatFilterable(e){return this.getTextureFormatCapabilities(e).filter}isTextureFormatRenderable(e){return this.getTextureFormatCapabilities(e).render}isTextureFormatCompressed(e){return i$(e)}loseDevice(){return!1}reportError(e){this.props.onError(e)}getDefaultCanvasContext(){if(!this.canvasContext)throw new Error("Device has no default CanvasContext. See props.createCanvasContext");return this.canvasContext}createCommandEncoder(e={}){throw new Error("not implemented")}incrementTimestamp(){return this.timestamp++}onError(e){this.props.onError(e)}getCanvasContext(){return this.getDefaultCanvasContext()}readPixelsToArrayWebGL(e,n){throw new Error("not implemented")}readPixelsToBufferWebGL(e,n){throw new Error("not implemented")}setParametersWebGL(e){throw new Error("not implemented")}getParametersWebGL(e){throw new Error("not implemented")}withParametersWebGL(e,n){throw new Error("not implemented")}clearWebGL(e){throw new Error("not implemented")}resetWebGL(){throw new Error("not implemented")}static _getCanvasContextProps(e){return e.createCanvasContext===!0?{}:e.createCanvasContext}_normalizeBufferProps(e){(e instanceof ArrayBuffer||ArrayBuffer.isView(e))&&(e={data:e});const n={...e};return(e.usage||0)&lr.INDEX&&!e.indexType&&(e.data instanceof Uint32Array?n.indexType="uint32":e.data instanceof Uint16Array?n.indexType="uint16":ut.warn("indices buffer content must be of integer type")()),n}};re(Cx,"defaultProps",{id:null,powerPreference:"high-performance",failIfMajorPerformanceCaveat:!1,createCanvasContext:void 0,onError:e=>ut.error(e.message)(),_reuseDevices:!1,_requestMaxLimits:!0,_factoryDestroyPolicy:"unused",_initializeFeatures:!0,_disabledFeatures:{"compilation-status-async-webgl":!0},_resourceDefaults:{},webgl:{},debug:ut.get("debug")||void 0,debugShaders:ut.get("debug-shaders")||void 0,debugFramebuffers:!!ut.get("debug-framebuffers"),debugWebGL:!!ut.get("debug-webgl"),debugSpectorJS:void 0,debugSpectorJSUrl:void 0,_handle:void 0});let tf=Cx;
135const Qie=ud()&&typeof document<"u",Xie=()=>Qie&&document.readyState==="complete",Yie="set luma.log.level=1 (or higher) to trace rendering",Dk="No matching device found. Ensure `@luma.gl/webgl` and/or `@luma.gl/webgpu` modules are imported.",zu=class zu{constructor(){re(this,"stats",t$);re(this,"log",ut);re(this,"VERSION","9.1.9");re(this,"spector");re(this,"preregisteredAdapters",new Map);if(globalThis.luma){if(globalThis.luma.VERSION!==this.VERSION)throw ut.error(`Found luma.gl ${globalThis.luma.VERSION} while initialzing ${this.VERSION}`)(),ut.error("'yarn why @luma.gl/core' can help identify the source of the conflict")(),new Error("luma.gl - multiple versions detected: see console log");ut.error("This version of luma.gl has already been initialized")()}ut.log(1,`${this.VERSION} - ${Yie}`)(),globalThis.luma=this}registerAdapters(e){for(const n of e)this.preregisteredAdapters.set(n.type,n)}getSupportedAdapters(e=[]){const n=this.getAdapterMap(e);return Array.from(n).map(([,r])=>r).filter(r=>{var i;return(i=r.isSupported)==null?void 0:i.call(r)}).map(r=>r.type)}getBestAvailableAdapter(e=[]){var r,i,s,o;const n=this.getAdapterMap(e);return(i=(r=n.get("webgpu"))==null?void 0:r.isSupported)!=null&&i.call(r)?"webgpu":(o=(s=n.get("webgl"))==null?void 0:s.isSupported)!=null&&o.call(s)?"webgl":null}setDefaultDeviceProps(e){Object.assign(zu.defaultProps,e)}async createDevice(e={}){var a;e={...zu.defaultProps,...e},e.waitForPageLoad&&await zu.pageLoaded;const n=this.getAdapterMap(e.adapters);let r=e.type||"";r==="best-available"&&(r=this.getBestAvailableAdapter(e.adapters)||r);const s=(this.getAdapterMap(e.adapters)||n).get(r),o=await((a=s==null?void 0:s.create)==null?void 0:a.call(s,e));if(o)return o;throw new Error(Dk)}async attachDevice(e){var o;const n=this.getAdapterMap(e.adapters);let r="";e.handle instanceof WebGL2RenderingContext&&(r="webgl"),e.createCanvasContext&&await zu.pageLoaded,e.handle===null&&(r="unknown");const i=n.get(r),s=await((o=i==null?void 0:i.attach)==null?void 0:o.call(i,null));if(s)return s;throw new Error(Dk)}enforceWebGL2(e=!0,n=[]){var s;const i=this.getAdapterMap(n).get("webgl");i||ut.warn("enforceWebGL2: webgl adapter not found")(),(s=i==null?void 0:i.enforceWebGL2)==null||s.call(i,e)}getAdapterMap(e=[]){const n=new Map(this.preregisteredAdapters);for(const r of e)n.set(r.type,r);return n}registerDevices(e){ut.warn("luma.registerDevices() is deprecated, use luma.registerAdapters() instead");for(const n of e){const r=n.adapter;r&&this.preregisteredAdapters.set(r.type,r)}}};re(zu,"defaultProps",{...tf.defaultProps,type:"best-available",adapters:void 0,waitForPageLoad:!0}),re(zu,"pageLoaded",Kie().then(()=>{ut.probe(2,"DOM is loaded")()}));let tP=zu;const nP=new tP;function Kie(){return Xie()||typeof window>"u"?Promise.resolve():new Promise(t=>{window.addEventListener("load",()=>t())})}class Gie{}const Px=class Px{constructor(e){re(this,"id");re(this,"props");re(this,"canvas");re(this,"htmlCanvas");re(this,"offscreenCanvas");re(this,"type");re(this,"width",1);re(this,"height",1);re(this,"resizeObserver");re(this,"_canvasSizeInfo",{clientWidth:0,clientHeight:0,devicePixelRatio:1});if(this.props={...Px.defaultProps,...e},e=this.props,!ud()){this.id="node-canvas-context",this.type="node",this.width=this.props.width,this.height=this.props.height,this.canvas=null;return}if(e.canvas)typeof e.canvas=="string"?this.canvas=Jie(e.canvas):this.canvas=e.canvas;else{const n=ese(e),r=Zie((e==null?void 0:e.container)||null);r.insertBefore(n,r.firstChild),this.canvas=n,e!=null&&e.visible||(this.canvas.style.visibility="hidden")}this.canvas instanceof HTMLCanvasElement?(this.id=this.canvas.id,this.type="html-canvas",this.htmlCanvas=this.canvas):(this.id="offscreen-canvas",this.type="offscreen-canvas",this.offscreenCanvas=this.canvas),this.canvas instanceof HTMLCanvasElement&&e.autoResize&&(this.resizeObserver=new ResizeObserver(n=>{for(const r of n)r.target===this.canvas&&this.update()}),this.resizeObserver.observe(this.canvas))}toString(){return`${this[Symbol.toStringTag]}(${this.id})`}getDevicePixelRatio(e){return typeof OffscreenCanvas<"u"&&this.canvas instanceof OffscreenCanvas||(e=e===void 0?this.props.useDevicePixels:e,!e||e<=0)?1:e===!0?typeof window<"u"&&window.devicePixelRatio||1:e}getPixelSize(){switch(this.type){case"node":return[this.width,this.height];case"offscreen-canvas":return[this.canvas.width,this.canvas.height];case"html-canvas":const e=this.getDevicePixelRatio(),n=this.canvas;return n.parentElement?[n.clientWidth*e,n.clientHeight*e]:[this.canvas.width,this.canvas.height];
135default:throw new Error(this.type)}}getAspect(){const[e,n]=this.getPixelSize();return e/n}cssToDeviceRatio(){var e;try{const[n]=this.getDrawingBufferSize(),r=this._canvasSizeInfo.clientWidth||((e=this.htmlCanvas)==null?void 0:e.clientWidth);return r?n/r:1}catch{return 1}}cssToDevicePixels(e,n=!0){const r=this.cssToDeviceRatio(),[i,s]=this.getDrawingBufferSize();return tse(e,r,i,s,n)}setDevicePixelRatio(e,n={}){if(!this.htmlCanvas)return;let r="width"in n?n.width:this.htmlCanvas.clientWidth,i="height"in n?n.height:this.htmlCanvas.clientHeight;(!r||!i)&&(ut.log(1,"Canvas clientWidth/clientHeight is 0")(),e=1,r=this.htmlCanvas.width||1,i=this.htmlCanvas.height||1);const s=this._canvasSizeInfo;if(s.clientWidth!==r||s.clientHeight!==i||s.devicePixelRatio!==e){let o=e;const a=Math.floor(r*o),l=Math.floor(i*o);if(this.htmlCanvas.width=a,this.htmlCanvas.height=l,this.device.gl){const[u,h]=this.getDrawingBufferSize();(u!==a||h!==l)&&(o=Math.min(u/r,h/i),this.htmlCanvas.width=Math.floor(r*o),this.htmlCanvas.height=Math.floor(i*o),ut.warn("Device pixel ratio clamped")()),this._canvasSizeInfo.clientWidth=r,this._canvasSizeInfo.clientHeight=i,this._canvasSizeInfo.devicePixelRatio=e}}}getDrawingBufferSize(){const e=this.device.gl;return e?[e.drawingBufferWidth,e.drawingBufferHeight]:this.getPixelSize()}_setAutoCreatedCanvasId(e){var n;((n=this.htmlCanvas)==null?void 0:n.id)==="lumagl-auto-created-canvas"&&(this.htmlCanvas.id=e)}};re(Px,"defaultProps",{canvas:null,width:800,height:600,useDevicePixels:!0,autoResize:!0,container:null,visible:!0,alphaMode:"opaque",colorSpace:"srgb"});let rP=Px;function Zie(t){if(typeof t=="string"){const e=document.getElementById(t);if(!e)throw new Error(`${t} is not an HTML element`);return e}else if(t)return t;return document.body}function Jie(t){const e=document.getElementById(t);if(!(e instanceof HTMLCanvasElement))throw new Error("Object is not a canvas element");return e}function ese(t){const{width:e,height:n}=t,r=document.createElement("canvas");return r.id=Hx("lumagl-auto-created-canvas"),r.width=e||1,r.height=n||1,r.style.width=Number.isFinite(e)?`${e}px`:"100%",r.style.height=Number.isFinite(n)?`${n}px`:"100%",r}function tse(t,e,n,r,i){const s=t,o=Bk(s[0],e,n);let a=Lk(s[1],e,r,i),l=Bk(s[0]+1,e,n);const c=l===n-1?l:l-1;l=Lk(s[1]+1,e,r,i);let u;return i?(l=l===0?l:l+1,u=a,a=l):u=l===r-1?l:l-1,{x:o,y:a,width:Math.max(c-o+1,1),height:Math.max(u-a+1,1)}}function Bk(t,e,n){return Math.min(Math.round(t*e),n-1)}function Lk(t,e,n,r){return r?Math.max(0,n-1-Math.round(t*e)):Math.min(Math.round(t*e),n-1)}const Ai=class Ai extends Nn{constructor(n,r){r=Ai.normalizeProps(n,r);super(n,r,Ai.defaultProps);re(this,"dimension");re(this,"format");re(this,"width");re(this,"height");re(this,"depth");re(this,"mipLevels");re(this,"updateTimestamp");if(this.dimension=this.props.dimension,this.format=this.props.format,this.width=this.props.width,this.height=this.props.height,this.depth=this.props.depth,this.props.width===void 0||this.props.height===void 0){const i=Ai.getTextureDataSize(this.props.data);this.width=(i==null?void 0:i.width)||1,this.height=(i==null?void 0:i.height)||1}this.props.mipmaps&&this.props.mipLevels===void 0&&(this.props.mipLevels="pyramid"),this.mipLevels=this.props.mipLevels==="pyramid"?Ai.getMipLevelCount(this.width,this.height):this.props.mipLevels||1,this.updateTimestamp=n.incrementTimestamp()}get[Symbol.toStringTag](){return"Texture"}toString(){return`Texture(${this.id},${this.format},${this.width}x${this.height})`}clone(n){return this.device.createTexture({...this.props,...n})}static isExternalImage(n){return typeof ImageData<"u"&&n instanceof ImageData||typeof ImageBitmap<"u"&&n instanceof ImageBitmap||typeof HTMLImageElement<"u"&&n instanceof HTMLImageElement||typeof HTMLVideoElement<"u"&&n instanceof HTMLVideoElement||typeof VideoFrame<"u"&&n instanceof VideoFrame||typeof HTMLCanvasElement<"u"&&n instanceof HTMLCanvasElement||typeof OffscreenCanvas<"u"&&n instanceof OffscreenCanvas}static getExternalImageSize(n){if(typeof ImageData<"u"&&n instanceof ImageData||typeof ImageBitmap<"u"&&n instanceof ImageBitmap||typeof HTMLCanvasElement<"u"&&n instanceof HTMLCanvasElement||typeof OffscreenCanvas<"u"&&n instanceof OffscreenCanvas)return{width:n.width,height:n.height};if(typeof HTMLImageElement<"u"&&n instanceof HTMLImageElement)return{width:n.naturalWi
135dth,height:n.naturalHeight};if(typeof HTMLVideoElement<"u"&&n instanceof HTMLVideoElement)return{width:n.videoWidth,height:n.videoHeight};if(typeof VideoFrame<"u"&&n instanceof VideoFrame)return{width:n.displayWidth,height:n.displayHeight};throw new Error("Unknown image type")}static isTextureLevelData(n){const r=n==null?void 0:n.data;return ArrayBuffer.isView(r)}static getTextureDataSize(n){if(!n||ArrayBuffer.isView(n))return null;if(Array.isArray(n))return Ai.getTextureDataSize(n[0]);if(Ai.isExternalImage(n))return Ai.getExternalImageSize(n);if(n&&typeof n=="object"&&n.constructor===Object){const i=Object.values(n)[0];return{width:i.width,height:i.height}}throw new Error("texture size deduction failed")}static normalizeTextureData(n,r){let i;return ArrayBuffer.isView(n)?i=[{data:n,width:r.width,height:r.height}]:Array.isArray(n)?i=n:i=[n],i}static getMipLevelCount(n,r){return Math.floor(Math.log2(Math.max(n,r)))+1}static getCubeFaceDepth(n){switch(n){case"+X":return 0;case"-X":return 1;case"+Y":return 2;case"-Y":return 3;case"+Z":return 4;case"-Z":return 5;default:throw new Error(n)}}static normalizeProps(n,r){var l,c;const i={...r},s=((c=(l=n==null?void 0:n.props)==null?void 0:l._resourceDefaults)==null?void 0:c.texture)||{};Object.assign(i,s);const{width:o,height:a}=i;return typeof o=="number"&&(i.width=Math.max(1,Math.ceil(o))),typeof a=="number"&&(i.height=Math.max(1,Math.ceil(a))),i}};re(Ai,"COPY_SRC",1),re(Ai,"COPY_DST",2),re(Ai,"TEXTURE",4),re(Ai,"STORAGE",8),re(Ai,"RENDER_ATTACHMENT",16),re(Ai,"CubeFaces",["+X","-X","+Y","-Y","+Z","-Z"]),re(Ai,"defaultProps",{...Nn.defaultProps,data:null,dimension:"2d",format:"rgba8unorm",width:void 0,height:void 0,depth:1,mipmaps:!1,compressed:!1,usage:0,mipLevels:void 0,samples:void 0,sampler:{},view:void 0,flipY:void 0}),re(Ai,"defaultCopyExternalImageOptions",{image:void 0,sourceX:0,sourceY:0,width:void 0,height:void 0,depth:1,mipLevel:0,x:0,y:0,z:0,aspect:"all",colorSpace:"srgb",premultipliedAlpha:!1,flipY:!1});let ar=Ai;const Ix=class Ix extends Nn{get[Symbol.toStringTag](){return"TextureView"}constructor(e,n){super(e,n,Ix.defaultProps)}};re(Ix,"defaultProps",{...Nn.defaultProps,format:void 0,dimension:void 0,aspect:"all",baseMipLevel:0,mipLevelCount:void 0,baseArrayLayer:0,arrayLayerCount:void 0});let V_=Ix;function nse(t,e,n){let r="";const i=e.split(/\r?\n/),s=t.slice().sort((o,a)=>o.lineNum-a.lineNum);switch((n==null?void 0:n.showSourceCode)||"no"){case"all":let o=0;for(let a=1;a<=i.length;a++)for(r+=s$(i[a-1],a,n);s.length>o&&s[o].lineNum===a;){const l=s[o++];r+=Fk(l,i,l.lineNum,{...n,inlineSource:!1})}return r;case"issues":case"no":for(const a of t)r+=Fk(a,i,a.lineNum,{inlineSource:(n==null?void 0:n.showSourceCode)!=="no"});return r}}function Fk(t,e,n,r){if(r!=null&&r.inlineSource){const s=rse(e,n),o=t.linePos>0?`${" ".repeat(t.linePos+5)}^^^
136`:"";return`
137${s}${o}${t.type.toUpperCase()}: ${t.message}
138
139`}const i=t.type==="error"?"red":"#8B4000";return r!=null&&r.html?`<div class='luma-compiler-log-error' style="color:${i};"><b> ${t.type.toUpperCase()}: ${t.message}</b></div>`:`${t.type.toUpperCase()}: ${t.message}`}function rse(t,e,n){let r="";for(let i=e-2;i<=e;i++){const s=t[i-1];s!==void 0&&(r+=s$(s,e,n))}return r}function s$(t,e,n){const r=n!=null&&n.html?sse(t):t;return`${ise(String(e),4)}: ${r}${n!=null&&n.html?"<br/>":`
140`}`}function ise(t,e){let n="";for(let r=t.length;r<e;++r)n+=" ";return n+t}function sse(t){return t.replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;").replaceAll('"',"&quot;").replaceAll("'","&#039;")}const Ox=class Ox extends Nn{constructor(n,r){r={...r,debugShaders:r.debugShaders||n.props.debugShaders||"errors"};super(n,{id:ose(r),...r},Ox.defaultProps);re(this,"stage");re(this,"source");re(this,"compilationStatus","pending");this.stage=this.props.stage,this.source=this.props.source}get[Symbol.toStringTag](){return"Shader"}getCompilationInfoSync(){return null}getTranslatedSource(){return null}async debugShader(){const n=this.props.debugShaders;switch(n){case"never":return;case"errors":if(this.compilationStatus==="success")return;break}const r=await this.getCompilationInfo();n==="warnings"&&(r==null?void 0:r.length)===0||this._displayShaderLog(r)}_displayShaderLog(n){var c;if(typeof document>"u"||!(document!=null&&document.createElement))return;const r=o$(this.source),i=`${this.stage} ${r}`;let s=nse(n,this.source,{showSourceCode:"all",html:!0});const o=this.getTranslatedSource();o&&(s+=`<br /><br /><h1>Translated Source</h1><br /><br /><code style="user-select:text;"><pre>${o}</pre></code>`);const a=document.createElement("Button");a.innerHTML=`
141<h1>Shader Compilation Error in ${i}</h1><br /><br />
142<code style="user-select:text;"><pre>
143${s}
144</pre></code>`,a.style.top="10px",a.style.left="10px",a.style.position="absolute",a.style.zIndex="9999",a.style.width="100%",a.style.textAlign="left",document.body.appendChild(a),(c=document.getElementsByClassName("luma-compiler-log-error")[0])==null||c.scrollIntoView(),a.onclick=()=>{const u=`data:text/plain,${encodeURIComponent(this.source)}`;navigator.clipboard.writeText(u)}}};re(Ox,"defaultProps",{...Nn.defaultProps,language:"auto",stage:void 0,source:"",sourceMap:null,entryPoint:"main",debugShaders:void 0});let W_=Ox;function ose(t){return o$(t.source)||t.id||Hx(`unnamed ${t.stage}-shader`)}function o$(t,e="unnamed"){const r=/#define[\s*]SHADER_NAME[\s*]([A-Za-z0-9_-]+)[\s*]/.exec(t);return r?r[1]:e}const pv=class pv extends Nn{get[Symbol.toStringTag](){return"Sampler"}constructor(e,n){n=pv.normalizeProps(e,n),super(e,n,pv.defaultProps)}static normalizeProps(e,n){var s,o;const r=((o=(s=e==null?void 0:e.props)==null?void 0:s._resourceDefaults)==null?void 0:o.sampler)||{};return{...n,...r}}};re(pv,"defaultProps",{...Nn.defaultProps,type:"color-sampler",addressModeU:"clamp-to-edge",addressModeV:"clamp-to-edge",addressModeW:"clamp-to-edge",magFilter:"nearest",minFilter:"nearest",mipmapFilter:"none",lodMinClamp:0,lodMaxClamp:32,compare:"less-equal",maxAnisotropy:1});let $_=pv;const Mx=class Mx extends Nn{constructor(n,r={}){super(n,r,Mx.defaultProps);re(this,"width");re(this,"height");this.width=this.props.width,this.height=this.props.height}get[Symbol.toStringTag](){return"Framebuffer"}clone(n){const r=this.colorAttachments.map(s=>s.texture.clone(n)),i=this.depthStencilAttachment&&this.depthStencilAttachment.texture.clone(n);return this.device.createFramebuffer({...this.props,colorAttachments:r,depthStencilAttachment:i})}resize(n){let r=!n;if(n){const[i,s]=Array.isArray(n)?n:[n.width,n.height];r=r||s!==this.height||i!==this.width,this.width=i,this.height=s}r&&(ut.log(2,`Resizing framebuffer ${this.id} to ${this.width}x${this.height}`)(),this.resizeAttachments(this.width,this.height))}autoCreateAttachmentTextures(){if(this.props.colorAttachments.length===0&&!this.props.depthStencilAttachment)throw new Error("Framebuffer has noattachments");this.colorAttachments=this.props.colorAttachments.map((r,i)=>{if(typeof r=="string"){const s=this.createColorTexture(r,i);return this.attachResource(s),s.view}return r instanceof ar?r.view:r});const n=this.props.depthStencilAttachment;if(n)if(typeof n=="string"){const r=this.createDepthStencilTexture(n);this.attachResource(r),this.depthStencilAttachment=r.view}else n instanceof ar?this.depthStencilAttachment=n.view:this.depthStencilAttachment=n}createColorTexture(n,r){return this.device.createTexture({id:`${this.id}-color-attachment-${r}`,usage:ar.RENDER_ATTACHMENT,format:n,width:this.width,height:this.height,sampler:{magFilter:"linear",minFilter:"linear"}})}createDepthStencilTexture(n){return this.device.createTexture({id:`${this.id}-depth-stencil-attachment`,usage:ar.RENDER_ATTACHMENT,format:n,width:this.width,height:this.height,mipmaps:!1})}resizeAttachments(n,r){for(let i=0;i<this.colorAttachments.length;++i)if(this.colorAttachments[i]){const s=this.colorAttachments[i].texture.clone({width:n,height:r});this.destroyAttachedResource(this.colorAttachments[i]),this.colorAttachments[i]=s.view,this.attachResource(s.view)}if(this.depthStencilAttachment){const i=this.depthStencilAttachment.texture.clone({width:n,height:r});this.destroyAttachedResource(this.depthStencilAttachment),this.depthStencilAttachment=i.view,this.attachResource(i)}this.updateAttachments()}};re(Mx,"defaultProps",{...Nn.defaultProps,width:1,height:1,colorAttachments:[],depthStencilAttachment:null});let H_=Mx;const Rx=class Rx extends Nn{constructor(n,r){super(n,r,Rx.defaultProps);re(this,"shaderLayout");re(this,"bufferLayout");
144re(this,"linkStatus","pending");re(this,"hash","");this.shaderLayout=this.props.shaderLayout,this.bufferLayout=this.props.bufferLayout||[]}get[Symbol.toStringTag](){return"RenderPipeline"}setUniformsWebGL(n){throw new Error("Use uniform blocks")}};re(Rx,"defaultProps",{...Nn.defaultProps,vs:null,vertexEntryPoint:"vertexMain",vsConstants:{},fs:null,fragmentEntryPoint:"fragmentMain",fsConstants:{},shaderLayout:null,bufferLayout:[],topology:"triangle-list",parameters:{},bindings:{},uniforms:{}});let Yg=Rx;const va=class va extends Nn{get[Symbol.toStringTag](){return"RenderPass"}constructor(e,n){n=va.normalizeProps(e,n),super(e,n,va.defaultProps)}static normalizeProps(e,n){var s;return{...(s=e.props._resourceDefaults)==null?void 0:s.renderPass,...n}}};re(va,"defaultClearColor",[0,0,0,1]),re(va,"defaultClearDepth",1),re(va,"defaultClearStencil",0),re(va,"defaultProps",{...Nn.defaultProps,framebuffer:null,parameters:void 0,clearColor:va.defaultClearColor,clearColors:void 0,clearDepth:va.defaultClearDepth,clearStencil:va.defaultClearStencil,depthReadOnly:!1,stencilReadOnly:!1,discard:!1,occlusionQuerySet:void 0,timestampQuerySet:void 0,beginTimestampIndex:void 0,endTimestampIndex:void 0});let iP=va;const kx=class kx extends Nn{constructor(n,r){super(n,r,kx.defaultProps);re(this,"hash","");re(this,"shaderLayout");this.shaderLayout=r.shaderLayout}get[Symbol.toStringTag](){return"ComputePipeline"}};re(kx,"defaultProps",{...Nn.defaultProps,shader:void 0,entryPoint:void 0,constants:{},shaderLayout:void 0});let q_=kx;const Nx=class Nx extends Nn{get[Symbol.toStringTag](){return"CommandEncoder"}constructor(e,n){super(e,n,Nx.defaultProps)}};re(Nx,"defaultProps",{...Nn.defaultProps,measureExecutionTime:void 0});let sP=Nx;const Dx=class Dx extends Nn{get[Symbol.toStringTag](){return"CommandBuffer"}constructor(e,n){super(e,n,Dx.defaultProps)}};re(Dx,"defaultProps",{...Nn.defaultProps});let oP=Dx;function ase(t){const[e,n]=cse[t],r=e==="i32"||e==="u32",i=e!=="u32",s=use[e]*n,o=lse(e,n);return{dataType:e,components:n,defaultVertexFormat:o,byteLength:s,integer:r,signed:i}}function lse(t,e){let n;switch(t){case"f32":n="float32";break;case"i32":n="sint32";break;case"u32":n="uint32";break;case"f16":return e<=2?"float16x2":"float16x4"}return e===1?n:`${n}x${e}`}const cse={f32:["f32",1],"vec2<f32>":["f32",2],"vec3<f32>":["f32",3],"vec4<f32>":["f32",4],f16:["f16",1],"vec2<f16>":["f16",2],"vec3<f16>":["f16",3],"vec4<f16>":["f16",4],i32:["i32",1],"vec2<i32>":["i32",2],"vec3<i32>":["i32",3],"vec4<i32>":["i32",4],u32:["u32",1],"vec2<u32>":["u32",2],"vec3<u32>":["u32",3],"vec4<u32>":["u32",4]},use={f32:4,f16:2,i32:4,u32:4};function a$(t){let e;t.endsWith("-webgl")&&(t.replace("-webgl",""),e=!0);const[n,r]=t.split("x"),i=n,s=r?parseInt(r):1,o=n$(i),a={type:i,components:s,byteLength:o.byteLength*s,integer:o.integer,signed:o.signed,normalized:o.normalized};return e&&(a.webglOnly=!0),a}function l$(t,e){const n={};for(const r of t.attributes){const i=hse(t,e,r.name);i&&(n[r.name]=i)}return n}function fse(t,e,n=16){const r=l$(t,e),i=new Array(n).fill(null);for(const s of Object.values(r))i[s.location]=s;return i}function hse(t,e,n){const r=dse(t,n),i=pse(e,n);if(!r)return null;const s=ase(r.type),o=(i==null?void 0:i.vertexFormat)||s.defaultVertexFormat,a=a$(o);return{attributeName:(i==null?void 0:i.attributeName)||r.name,bufferName:(i==null?void 0:i.bufferName)||r.name,location:r.location,shaderType:r.type,shaderDataType:s.dataType,shaderComponents:s.components,vertexFormat:o,bufferDataType:a.type,bufferComponents:a.components,normalized:a.normalized,integer:s.integer,stepMode:(i==null?void 0:i.stepMode)||r.stepMode||"vertex",byteOffset:(i==null?void 0:i.byteOffset)||0,byteStride:(i==null?void 0:i.byteStride)||0}}function dse(t,e){const n=t.attributes.find(r=>r.name===e);return n||ut.warn(`shader layout attribute "${e}" not present in shader`),n||null}function pse(t,e){gse(t);let n=mse(t,e);return n||(n=vse(t,e),n)?n:(ut.warn(`layout for attribute "${e}" not present in buffer layout`),null)}function gse(t){for(const e of t)(e.attributes&&e.format||!e.attributes&&!e.format)&&ut.warn(`BufferLayout ${name} must have either 'attributes' or 'format' field`)}function mse(t,e){for(const n of t)if(n.format&&n.name===e)return{attributeName:n.name,bufferName:e,stepMode:n.stepMode,vertexFormat:n.format,byteOffset:0,byteStride:n.byteStride||0};return null}function vse(t,e){var n;for(const r of t){let i=r.byteStride;if(typeof r.byteStride!="number")for(const o of r.attributes||[]){const a=a$(o.format);i+=a.byteLength}const s=(n=r.attributes)==null?void 0:n.find(o=>o.attribute===e);if(s)return{attributeName:s.attribute,bufferName:r.name,stepMode:r.stepMode,vertexFormat:s.format,byteOffset:s.byteOffset,byteStride:i}
144}return null}const Bx=class Bx extends Nn{constructor(n,r){super(n,r,Bx.defaultProps);re(this,"maxVertexAttributes");re(this,"attributeInfos");re(this,"indexBuffer",null);re(this,"attributes");this.maxVertexAttributes=n.limits.maxVertexAttributes,this.attributes=new Array(this.maxVertexAttributes).fill(null);const{shaderLayout:i,bufferLayout:s}=r.renderPipeline||{};if(!i||!s)throw new Error("VertexArray");this.attributeInfos=fse(i,s,this.maxVertexAttributes)}get[Symbol.toStringTag](){return"VertexArray"}setConstantWebGL(n,r){this.device.reportError(new Error("constant attributes not supported"))}};re(Bx,"defaultProps",{...Nn.defaultProps,renderPipeline:null});let aP=Bx;const Lx=class Lx extends Nn{get[Symbol.toStringTag](){return"TransformFeedback"}constructor(e,n){super(e,n,Lx.defaultProps)}};re(Lx,"defaultProps",{...Nn.defaultProps,layout:void 0,buffers:{}});let lP=Lx;const Fx=class Fx extends Nn{get[Symbol.toStringTag](){return"QuerySet"}constructor(e,n){super(e,n,Fx.defaultProps)}};re(Fx,"defaultProps",{...Nn.defaultProps,type:void 0,count:void 0});let cP=Fx;const yse={f32:{type:"f32",components:1},i32:{type:"i32",components:1},u32:{type:"u32",components:1},"vec2<f32>":{type:"f32",components:2},"vec3<f32>":{type:"f32",components:3},"vec4<f32>":{type:"f32",components:4},"vec2<i32>":{type:"i32",components:2},"vec3<i32>":{type:"i32",components:3},"vec4<i32>":{type:"i32",components:4},"vec2<u32>":{type:"u32",components:2},"vec3<u32>":{type:"u32",components:3},"vec4<u32>":{type:"u32",components:4},"mat2x2<f32>":{type:"f32",components:4},"mat2x3<f32>":{type:"f32",components:6},"mat2x4<f32>":{type:"f32",components:8},"mat3x2<f32>":{type:"f32",components:6},"mat3x3<f32>":{type:"f32",components:9},"mat3x4<f32>":{type:"f32",components:12},"mat4x2<f32>":{type:"f32",components:8},"mat4x3<f32>":{type:"f32",components:12},"mat4x4<f32>":{type:"f32",components:16}};function bse(t){return yse[t]}function _se(t,e){switch(e){case 1:return t;case 2:return t+t%2;default:return t+(4-t%4)%4}}let ab;function c$(t){return(!ab||ab.byteLength<t)&&(ab=new ArrayBuffer(t)),ab}function wse(t,e){const n=c$(t.BYTES_PER_ELEMENT*e);return new t(n,0,e)}function xse(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function Q_(t){return Array.isArray(t)?t.length===0||typeof t[0]=="number":xse(t)}const Uk=1024;class Ase{constructor(e){re(this,"layout",{});re(this,"byteLength");let n=0;for(const[i,s]of Object.entries(e)){const o=bse(s),{type:a,components:l}=o;n=_se(n,l);const c=n;n+=l,this.layout[i]={type:a,size:l,offset:c}}n+=(4-n%4)%4;const r=n*4;this.byteLength=Math.max(r,Uk)}getData(e){const n=Math.max(this.byteLength,Uk),r=c$(n),i={i32:new Int32Array(r),u32:new Uint32Array(r),f32:new Float32Array(r),f16:new Uint16Array(r)};for(const[s,o]of Object.entries(e)){const a=this.layout[s];if(!a){ut.warn(`Supplied uniform value ${s} not present in uniform block layout`)();continue}const{type:l,size:c,offset:u}=a,h=i[l];if(c===1){if(typeof o!="number"&&typeof o!="boolean"){ut.warn(`Supplied value for single component uniform ${s} is not a number: ${o}`)();continue}h[u]=Number(o)}else{if(!Q_(o)){ut.warn(`Supplied value for multi component / array uniform ${s} is not a numeric array: ${o}`)();continue}h.set(o,u)}}return new Uint8Array(r)}has(e){return!!this.layout[e]}get(e){return this.layout[e]}}function Ese(t,e,n=16){if(t!==e)return!1;const r=t,i=e;if(!Q_(r))return!1;if(Q_(i)&&r.length===i.length){for(let s=0;s<r.length;++s)if(i[s]!==r[s])return!1}return!0}function Sse(t){return Q_(t)?t.slice():t}class Tse{constructor(e){re(this,"name");re(this,"uniforms",{});re(this,"modifiedUniforms",{});re(this,"modified",!0);re(this,"bindingLayout",{});re(this,"needsRedraw","initialized");var n;if(this.name=(e==null?void 0:e.name)||"unnamed",e!=null&&e.name&&(e!=null&&e.shaderLayout)){const r=(n=e==null?void 0:e.shaderLayout.bindings)==null?void 0:n.find(s=>s.type==="uniform"&&s.name===(e==null?void 0:e.name));if(!r)throw new Error(e==null?void 0:e.name);const i=r;for(const s of i.uniforms||[])this.bindingLayout[s.name]=s}}setUniforms(e){for(const[n,r]of Object.entries(e))this._setUniform(n,r),this.needsRedraw||this.setNeedsRedraw(`${this.name}.${n}=${r}`)}setNeedsRedraw(e){this.needsRedraw=this.needsRedraw||e}getAllUniforms(){return this.modifiedUniforms={},this.needsRedraw=!1,this.uniforms||{}}_setUniform(e,n){Ese(this.uniforms[e],n)||(this.uniforms[e]=Sse(n),this.modifiedUniforms[e]=!0,this.modified=!0)}}class Cse{constructor(e){re(this,"uniformBlocks",new Map);re(this,"uniformBufferLayouts",new Map);re(this,"uniformBuffers",new Map);for(const[n,r]of Object.entries(e)){const i=n,s=new Ase(r.uniformTypes||{});this.uniformBufferLayouts.set(i,s);const o=new Tse({name:n});o.setUniforms(r.defaultUniforms||{}),this.uniformBlocks.set(i,o)}}destroy(){for(const e of this.uniformBuffers.values())e.destroy()}setUniforms(e){var n;for(const[r,i]of Object.entries(e))(n=this.uniformBlocks.get(r))==null||n.setUniforms(i);this.updateUniformBuffers()}getUniformBufferByteLength(e){var n;return((n=this.uniformBufferLayouts.get(e))==null?void 0:n.byteLength)||0}getUniformBufferData(e){var r,i;const n=((r=this.uniformBlocks.get(e))==null?void 0:r.getAllUniforms())||{};return(i=this.uniformBufferLayouts.get(e))==null?void 0:i.getData(n)}createUniformBuffer(e,n,r){r&&this.setUniforms(r);const i=this.getUniformBufferByteLength(n),s=e.createBuffer({usage:lr.UNIFORM|lr.COPY_DST,byteLength:i}),o=this.getUniformBufferData(n);return s.write(o),s}getManagedUniformBuffer(e,n){if(!this.uniformBuffers.get(n)){const r=this.getUniformBufferByteLength(n),i=e.createBuffer({usage:lr.UNIFORM|lr.COPY_DST,byteLength:r});this.uniformBuffers.set(n,i)}return this.uniformBuffers.get(n)}updateUniformBuffers(){let e=!1;for(const n of this.uniformBlocks.keys()){const r=this.updateUniformBuffer(n);e||(e=r)}return e&&ut.log(3,`UniformStore.updateUniformBuffers(): ${e}`)(),e}updateUniformBuffer(e){var s;const n=this.uniformBlocks.get(e);let r=this.uniformBuffers.get(e),i=!1;if(r&&(n!=null&&n.needsRedraw)){i||(i=n.needsRedraw);const o=this.getUniformBufferData(e);r=this.uniformBuffers.get(e),r==null||r.write(o);const a=(s=this.uniformBlocks.get(e))==null?void 0:s.getAllUniforms();ut.log(4,`Writing to uniform buffer ${String(e)}`,o,a)()}return i}}function u$(t){const e=ArrayBuffer.isView(t)?t.constructor:t;switch(e){case Float32Array:return"float32";case Uint16Array:return"uint16";case Uint32Array:return"uint32";case Uint8Array:case Uint8ClampedArray:return"uint8";case Int8Array:return"sint8";case Int16Array:return"sint16";case Int32Array:return"sint32";default:throw new Error(e.constructor.name)}}function f$(t){switch(t){case"float32":return Float32Array;case"uint32":return Uint32Array;case"sint32":return Int32Array;case"uint16":case"unorm16":return Uint16Array;case"sint16":case"snorm16":return Int16Array;case"uint8":case"unorm8":return Uint8Array;case"sint8":case"snorm8":return Int8Array;default:throw new Error(t)}}function Pse(t,e,n){if(!e||e>4)throw new Error(`size ${e}`);const r=e;let i=u$(t);if(i==="uint8"&&n&&r===1)return"unorm8-webgl";if(i==="uint8"&&n&&r===3)return"unorm8x3-webgl";if(i==="uint8"||i==="sint8"){if(r===1||r===3)throw new Error(`size: ${e}`);return n&&(i=i.replace("int","norm")),`${i}x${r}`}if(i==="uint16"||i==="sint16"){if(r===1||r===3)throw new Error(`size: ${e}`);return n&&(i=i.replace("int","norm")),`${i}x${r}`}
144return r===1?i:`${i}x${r}`}class iE{constructor(e){re(this,"bufferLayouts");this.bufferLayouts=e}getBufferLayout(e){return this.bufferLayouts.find(n=>n.name===e)||null}getAttributeNamesForBuffer(e){var n;return e.attributes?(n=e.attributes)==null?void 0:n.map(r=>r.attribute):[e.name]}mergeBufferLayouts(e,n){const r=[...e];for(const i of n){const s=r.findIndex(o=>o.name===i.name);s<0?r.push(i):r[s]=i}return r}getBufferIndex(e){const n=this.bufferLayouts.findIndex(r=>r.name===e);return n===-1&&ut.warn(`BufferLayout: Missing buffer for "${e}".`)(),n}}function Ise(t,e){const n=Object.fromEntries(t.attributes.map(i=>[i.name,i.location])),r=e.slice();return r.sort((i,s)=>{const o=i.attributes?i.attributes.map(u=>u.attribute):[i.name],a=s.attributes?s.attributes.map(u=>u.attribute):[s.name],l=Math.min(...o.map(u=>n[u])),c=Math.min(...a.map(u=>n[u]));return l-c}),r}let Uo=class{constructor(e,n){this.name=e,this.attributes=n,this.size=0}get isArray(){return!1}get isStruct(){return!1}get isTemplate(){return!1}get isPointer(){return!1}getTypeName(){return this.name}};class zk{constructor(e,n,r){this.name=e,this.type=n,this.attributes=r,this.offset=0,this.size=0}get isArray(){return this.type.isArray}get isStruct(){return this.type.isStruct}get isTemplate(){return this.type.isTemplate}get align(){return this.type.isStruct?this.type.align:0}get members(){return this.type.isStruct?this.type.members:null}get format(){return this.type.isArray||this.type.isTemplate?this.type.format:null}get count(){return this.type.isArray?this.type.count:0}get stride(){return this.type.isArray?this.type.stride:this.size}}let Ku=class extends Uo{constructor(e,n){super(e,n),this.members=[],this.align=0,this.startLine=-1,this.endLine=-1,this.inUse=!1}get isStruct(){return!0}},nf=class extends Uo{constructor(e,n){super(e,n),this.count=0,this.stride=0}get isArray(){return!0}getTypeName(){return`array<${this.format.getTypeName()}, ${this.count}>`}},uP=class extends Uo{constructor(e,n,r){super(e,r),this.format=n}get isPointer(){return!0}getTypeName(){return`&${this.format.getTypeName()}`}},Yh=class extends Uo{constructor(e,n,r,i){super(e,r),this.format=n,this.access=i}get isTemplate(){return!0}getTypeName(){let e=this.name;if(this.format!==null){if(e==="vec2"||e==="vec3"||e==="vec4"||e==="mat2x2"||e==="mat2x3"||e==="mat2x4"||e==="mat3x2"||e==="mat3x3"||e==="mat3x4"||e==="mat4x2"||e==="mat4x3"||e==="mat4x4"){if(this.format.name==="f32")return e+="f",e;if(this.format.name==="i32")return e+="i",e;if(this.format.name==="u32")return e+="u",e;if(this.format.name==="bool")return e+="b",e;if(this.format.name==="f16")return e+="h",e}e+=`<${this.format.name}>`}else if(e==="vec2"||e==="vec3"||e==="vec4")return e;return e}};var Lu;(t=>{t[t.Uniform=0]="Uniform",t[t.Storage=1]="Storage",t[t.Texture=2]="Texture",t[t.Sampler=3]="Sampler",t[t.StorageTexture=4]="StorageTexture"})(Lu||(Lu={}));let lb=class{constructor(e,n,r,i,s,o,a){this.name=e,this.type=n,this.group=r,this.binding=i,this.attributes=s,this.resourceType=o,this.access=a}get isArray(){return this.type.isArray}get isStruct(){return this.type.isStruct}get isTemplate(){return this.type.isTemplate}get size(){return this.type.size}get align(){return this.type.isStruct?this.type.align:0}get members(){return this.type.isStruct?this.type.members:null}get format(){return this.type.isArray||this.type.isTemplate?this.type.format:null}get count(){return this.type.isArray?this.type.count:0}get stride(){return this.type.isArray?this.type.stride:this.size}},Ose=class{constructor(e,n){this.name=e,this.type=n}},Mse=class{constructor(e,n,r,i){this.name=e,this.type=n,this.locationType=r,this.location=i,this.interpolation=null}},jk=class{constructor(e,n,r,i){this.name=e,this.type=n,this.locationType=r,this.location=i}},Rse=class{constructor(e,n,r,i){this.name=e,this.type=n,this.attributes=r,this.id=i}},kse=class{constructor(e,n,r){this.name=e,this.type=n,this.attributes=r}},Nse=class{constructor(e,n=null,r){this.stage=null,this.inputs=[],this.outputs=[],this.arguments=[],this.returnType=null,this.resources=[],this.overrides=[],this.startLine=-1,this.endLine=-1,this.inUse=!1,this.calls=new Set,this.name=e,this.stage=n,this.attributes=r}},Dse=class{constructor(){this.vertex=[],this.fragment=[],this.compute=[]}};function Bse(t){var e=(32768&t)>>15,n=(31744&t)>>10,r=1023&t;return n==0?(e?-1:1)*Math.pow(2,-14)*(r/Math.pow(2,10)):n==31?r?NaN:1/0*(e?-1:1):(e?-1:1)*Math.pow(2,n-15)*(1+r/Math.pow(2,10))}const h$=new Float32Array(1),Lse=new Int32Array(h$.buffer),Vi=new Uint16Array(1);function Fse(t){h$[0]=t;const e=Lse[0],n=e>>31&1;let r=e>>23&255,i=8388607&e;if(r===255)return Vi[0]=n<<15|31744|(i!==0?512:0),Vi[0];if(r===0){if(i===0)return Vi[0]=n<<15,Vi[0];i|=8388608;let s=113;for(;!(8388608&i);)i<<=1,s--;return r=127-s,i&=8388607,r>0?(i=(i>>126-r)+(i>>127-r&1),Vi[0]=n<<15|r<<10|i>>13,Vi[0]):(Vi[0]=n<<15,Vi[0])}return r=r-127+15,r>=31?(Vi[0]=n<<15|31744,Vi[0]):r<=0?r<-10?(Vi[0]=n<<15,Vi[0]):(i=(8388608|i)>>1-r,Vi[0]=n<<15|i>>13,Vi[0]):(i>>=13,Vi[0]=n<<15|r<<10|i,Vi[0])}const tM=new Uint32Array(1),d$=new Float32Array(tM.buffer,0,1);function Vk(t){const e=112+(t>>6&31)<<23|(63&t)<<17;return tM[0]=e,d$[0]}function Use(t,e,n,r,i,s,o,a,l){const c=r*(o>>=i)*(s>>=i)+n*o+e*a;switch(l){case"r8unorm":return[yn(t,c,"8unorm",1)[0]];case"r8snorm":return[yn(t,c,"8snorm",1)[0]];case"r8uint":return[yn(t,c,"8uint",1)[0]];case"r8sint":return[yn(t,c,"8sint",1)[0]];case"rg8unorm":{const u=yn(t,c,"8unorm",2);return[u[0],u[1]]}case"rg8snorm":{const u=yn(t,c,"8snorm",2);return[u[0],u[1]]}case"rg8uint":{const u=yn(t,c,"8uint",2);return[u[0],u[1]]}case"rg8sint":{const u=yn(t,c,"8sint",2);return[u[0],u[1]]}case"rgba8unorm-srgb":case"rgba8unorm":{const u=yn(t,c,"8unorm",4);return[u[0],u[1],u[2],u[3]]}case"rgba8snorm":{const u=yn(t,c,"8snorm",4);return[u[0],u[1],u[2],u[3]]}case"rgba8uint":{const u=yn(t,c,"8uint",4);return[u[0],u[1],u[2],u[3]]}case"rgba8sint":{const u=yn(t,c,"8sint",4);return[u[0],u[1],u[2],u[3]]}case"bgra8unorm-srgb":case"bgra8unorm":{const u=yn(t,c,"8unorm",4);return[u[2],u[1],u[0],u[3]]}case"r16uint":return[yn(t,c,"16uint",1)[0]];case"r16sint":return[yn(t,c,"16sint",1)[0]];case"r16float":return[yn(t,c,"16float",1)[0]];case"rg16uint":{const u=yn(t,c,"16uint",2);return[u[0],u[1]]}case"rg16sint":{const u=yn(t,c,"16sint",2);return[u[0],u[1]]}case"rg16float":{const u=yn(t,c,"16float",2);return[u[0],u[1]]}case"rgba16uint":{const u=yn(t,c,"16uint",4);return[u[0],u[1],u[2],u[3]]}case"rgba16sint":{const u=yn(t,c,"16sint",4);return[u[0],u[1],u[2],u[3]]}case"rgba16float":{const u=yn(t,c,"16float",4);return[u[0],u[1],u[2],u[3]]}case"r32uint":return[yn(t,c,"32uint",1)[0]];case"r32sint":return[yn(t,c,"32sint",1)[0]];case"depth16unorm":case"depth24plus":case"depth24plus-stencil8":case"depth32float":case"depth32float-stencil8":case"r32float":return[yn(t,c,"32float",1)[0]];case"rg32uint":{const u=yn(t,c,"32uint",2);return[u[0],u[1]]}case"rg32sint":{const u=yn(t,c,"32sint",2);return[u[0],u[1]]}case"rg32float":{const u=yn(t,c,"32float",2);return[u[0],u[1]]}case"rgba32uint":{const u=yn(t,c,"32uint",4);return[u[0],u[1],u[2],u[3]]}case"rgba32sint":{const u=yn(t,c,"32sint",4);return[u[0],u[1],u[2],u[3]]}case"rgba32float":{const u=yn(t,c,"32float",4);return[u[0],u[1],u[2],u[3]]}case"rg11b10ufloat":{const u=new Uint32Array(t.buffer,c,1)[0],h=(4192256&u)>>11,d=(4290772992&u)>>22;return[Vk(2047&u),Vk(h),(function(m){const y=112+(m>>5&31)<<23|(31&m)<<18;return tM[0]=y,d$[0]})(d),1]}}return null}function yn(t,e,n,r){const i=[0,0,0,0];for(let s=0;s<r;++s)switch(n){case"8unorm":i[s]=t[e]/255,e++;break;case"8snorm":i[s]=t[e]/255*2-1,e++;break;case"8uint":i[s]=t[e],e++;break;case"8sint":i[s]=t[e]-127,e++;break;case"16uint":i[s]=t[e]|t[e+1]<<8,e+=2;break;case"16sint":i[s]=(t[e]|t[e+1]<<8)-32768,e+=2;break;case"16float":i[s]=Bse(t[e]|t[e+1]<<8),e+=2;break;case"32uint":case"32sint":i[s]=t[e]|t[e+1]<<8|t[e+2]<<16|t[e+3]<<24,e+=4;break;case"32float":i[s]=new Float32Array(t.buffer,e,1)[0],e+=4}return i}function An(t,e,n,r,i){for(let s=0;s<r;++s)switch(n){case"8unorm":t[e]=255*i[s],e++;break;case"8snorm":t[e]=.5*(i[s]+1)*255,e++;break;case"8uint":t[e]=i[s],e++;break;case"8sint":t[e]=i[s]+127,e++;break;case"16uint":new Uint16Array(t.buffer,e,1)[0]=i[s],e+=2;break;case"16sint":new Int16Array(t.buffer,e,1)[0]=i[s],e+=2;break;case"16float":{const o=Fse(i[s]);new Uint16Array(t.buffer,e,1)[0]=o,e+=2;break}case"32uint":new Uint32Array(t.buffer,e,1)[0]=i[s],e+=4;break;case"32sint":new Int32Array(t.buffer,e,1)[0]=i[s],e+=4;break;case"32float":new Float32Array(t.buffer,e,1)[0]=i[s],e+=4}return i}const sE={r8unorm:{bytesPerBlock:1,blockWidth:1,blockHeight:1,isCompressed:!1,channels:1},r8snorm:{bytesPerBlock:1,blockWidth:1,blockHeight:1,isCompressed:!1,channels:1},r8uint:{bytesPerBlock:1,blockWidth:1,blockHeight:1,isCompressed:!1,channels:1},r8sint:{bytesPerBlock:1,blockWidth:1,blockHeight:1,isCompressed:!1,channels:1},rg8unorm:{bytesPerBlock:2,blockWidth:1,blockHeight:1,isCompressed:!1,channels:2},rg8snorm:{bytesPerBlock:2,blockWidth:1,blockHeight:1,isCompressed:!1,channels:2},rg8uint:{bytesPerBlock:2,blockWidth:1,blockHeight:1,isCompressed:!1,channels:2},rg8sint:{bytesPerBlock:2,blockWidth:1,blockHeight:1,isCompressed:!1,channels:2},rgba8unorm:{bytesPerBlock:4,blockWidth:1,blockHeight:1,isCompressed:!1,channels:4},"rgba8unorm-srgb":{bytesPerBlock:4,blockWidth:1,blockHeight:1,isCompressed:!1,channels:4},rgba8snorm:{bytesPerBlock:4,blockWidth:1,blockHeight:1,isCompressed:!1,channels:4},rgba8uint:{bytesPerBlock:4,blockWidth:1,blockHeight:1,isCompressed:!1,channels:4},rgba8sint:{bytesPerBlock:4,blockWidth:1,blockHeight:1,isCompressed:!1,channels:4},bgra8unorm:{bytesPerBlock:4,blockWidth:1,blockHeight:1,isCompressed:!1,channels:4},"bgra8unorm-srgb":{bytesPerBlock:4,blockWidth:1,blockHeight:1,isCompressed:!1,channels:4},r16uint:{bytesPerBlock:2,blockWidth:1,blockHeight:1,isCompressed:!1,channels:1},r16sint:{bytesPerBlock:2,blockWidth:1,blockHeight:1,isCompressed:!1,channels:1},r16float:{bytesPerBlock:2,blockWidth:1,blockHeight:1,isCompressed:!1,channels:1},rg16uint:{bytesPerBlock:4,blockWidth:1,blockHeight:1,isCompressed:!1,channels:2},rg16sint:{bytesPerBlock:4,blockWidth:1,blockHeight:1,isCompressed:!1,channels:2},rg16float:{bytesPerBlock:4,blockWidth:1,blockHeight:1,isCompressed:!1,channels:2},rgba16uint:{bytesPerBlock:8,blockWidth:1,blockHeight:1,isCompressed:!1,channels:4},rgba16sint:{bytesPerBlock:8,blockWidth:1,blockHeight:1,isCompressed:!1,channels:4},rgba16float:{bytesPerBlock:8,blockWidth:1,blockHeight:1,isCompressed:!1,channels:4},r32uint:{bytesPerBlock:4,blockWidth:1,blockHeight:1,isCompressed:!1,channels:1},r32sint:{bytesPerBlock:4,blockWidth:1,blockHeight:1,isCompressed:!1,channels:1},r32float:{bytesPerBlock:4,blockWidth:1,blockHeight:1,isCompressed:!1,channels:1},rg32uint:{bytesPerBlock:8,blockWidth:1,blockHeight:1,isCompressed:!1,channels:2},rg32sint:{bytesPerBlock:8,blockWidth:1,blockHeight:1,isCompressed:!1,channels:2},rg32float:{bytesPerBlock:8,blockWidth:1,blockHeight:1,isCompressed:!1,channels:2},rgba32uint:{bytesPerBlock:16,blockWidth:1,blockHeight:1,isCompressed:!1,channels:4},rgba32sint:{bytesPerBlock:16,blockWidth:1,blockHeight:1,isCompressed:!1,channels:4},rgba32float:{bytesPerBlock:16,blockWidth:1,blockHeight:1,isCompressed:!1,channels:4},rgb10a2uint:{bytesPerBlock:4,blockWidth:1,blockHeight:1,isCompressed:!1,channels:4},rgb10a2unorm:{bytesPerBlock:4,blockWidth:1,blockHeight:1,isCompressed:!1,channels:4},rg11b10ufloat:{bytesPerBlock:4,blockWidth:1,blockHeight:1,isCompressed:!1,channels:4},stencil8:{bytesPerBlock:1,blockWidth:1,blockHeight:1,isCompressed:!1,isDepthStencil:!0,hasDepth:!1,hasStencil:!0,channels:1},depth16unorm:{bytesPerBlock:2,blockWidth:1,blockHeight:1,isCompressed:!1,isDepthStencil:!0,hasDepth:!0,hasStencil:!1,channels:1},depth24plus:{bytesPerBlock:4,blockWidth:1,blockHeight:1,isCompressed:!1,isDepthStencil:!0,hasDepth:!0,hasStencil:!1,depthOnlyFormat:"depth32float",channels:1},"depth24plus-stencil8":{bytesPerBlock:8,blockWidth:1,blockHeight:1,isCompressed:!1,isDepthStencil:!0,hasDepth:!0,hasStencil:!0,depthOnlyFormat:"depth32float",channels:1},depth32float:{bytesPerBlock:4,blockWidth:1,blockHeight:1,isCompressed:!1,isDepthStencil:!0,hasDepth:!0,hasStencil:!1,channels:1},"depth32float-stencil8":{bytesPerBlock:8,blockWidth:1,blockHeight:1,isCompressed:!1,isDepthStencil:!0,hasDepth:!0,hasStencil:!0,stencilOnlyFormat:"depth32float",channels:1},rgb9e5ufloat:{bytesPerBlock:4,blockWidth:1,blockHeight:1,isCompressed:!1,channels:4},"bc1-rgba-unorm":{bytesPerBlock:8,blockWidth:4,blockHeight:4,isCompressed:!0,channels:4},"bc1-rgba-unorm-srgb":{bytesPerBlock:8,blockWidth:4,blockHeight:4,isCompressed:!0,channels:4},"bc2-rgba-unorm":{bytesPerBlock:16,blockWidth:4,blockHeight:4,isCompressed:!0,channels:4},"bc2-rgba-unorm-srgb":{bytesPerBlock:16,blockWidth:4,blockHeight:4,isCompressed:!0,channels:4},"bc3-rgba-unorm":{bytesPerBlock:16,blockWidth:4,blockHeight:4,isCompressed:!0,channels:4},"bc3-rgba-unorm-srgb":{bytesPerBlock:16,blockWidth:4,blockHeight:4,isCompressed:!0,channels:4},"bc4-r-unorm":{bytesPerBlock:8,blockWidth:4,blockHeight:4,isCompressed:!0,channels:1},"bc4-r-snorm":{bytesPerBlock:8,blockWidth:4,blockHeight:4,isCompressed:!0,channels:1},"bc5-rg-unorm":{bytesPerBlock:16,blockWidth:4,blockHeight:4,isCompressed:!0,channels:2},"bc5-rg-snorm":{bytesPerBlock:16,blockWidth:4,blockHeight:4,isCompressed:!0,channels:2},"bc6h-rgb-ufloat":{bytesPerBlock:16,blockWidth:4,blockHeight:4,isCompressed:!0,channels:4},"bc6h-rgb-float":{bytesPerBlock:16,blockWidth:4,blockHeight:4,isCompressed:!0,channels:4},"bc7-rgba-unorm":{bytesPerBlock:16,blockWidth:4,blockHeight:4,isCompressed:!0,channels:4},"bc7-rgba-unorm-srgb":{bytesPerBlock:16,blockWidth:4,blockHeight:4,isCompressed:!0,channels:4},"etc2-rgb8unorm":{bytesPerBlock:8,blockWidth:4,blockHeight:4,isCompressed:!0,channels:4},"etc2-rgb8unorm-srgb":{bytesPerBlock:8,blockWidth:4,blockHeight:4,isCompressed:!0,channels:4},"etc2-rgb8a1unorm":{bytesPerBlock:8,blockWidth:4,blockHeight:4,isCompressed:!0,channels:4},"etc2-rgb8a1unorm-srgb":{bytesPerBlock:8,blockWidth:4,blockHeight:4,isCompressed:!0,channels:4},"etc2-rgba8unorm":{bytesPerBlock:16,blockWidth:4,blockHeight:4,isCompressed:!0,channels:4},"etc2-rgba8unorm-srgb":{bytesPerBlock:16,blockWidth:4,blockHeight:4,isCompressed:!0,channels:4},"eac-r11unorm":{bytesPerBlock:8,blockWidth:1,blockHeight:1,isCompressed:!0,channels:1},"eac-r11snorm":{bytesPerBlock:8,blockWidth:1,blockHeight:1,isCompressed:!0,channels:1},"eac-rg11unorm":{bytesPerBlock:16,blockWidth:1,blockHeight:1,isCompressed:!0,channels:2},"eac-rg11snorm":{bytesPerBlock:16,blockWidth:1,blockHeight:1,isCompressed:!0,channels:2},"astc-4x4-unorm":{bytesPerBlock:16,blockWidth:4,blockHeight:4,isCompressed:!0,channels:4},"astc-4x4-unorm-srgb":{bytesPerBlock:16,blockWidth:4,blockHeight:4,isCompressed:!0,channels:4},"astc-5x4-unorm":{bytesPerBlock:16,blockWidth:5,blockHeight:4,isCompressed:!0,channels:4},"astc-5x4-unorm-srgb":{bytesPerBlock:16,blockWidth:5,blockHeight:4,isCompressed:!0,channels:4},"astc-5x5-unorm":{bytesPerBlock:16,blockWidth:5,blockHeight:5,isCompressed:!0,channels:4},"astc-5x5-unorm-srgb":{bytesPerBlock:16,blockWidth:5,blockHeight:5,isCompressed:!0,channels:4},"astc-6x5-unorm":{bytesPerBlock:16,blockWidth:6,blockHeight:5,isCompressed:!0,channels:4},"astc-6x5-unorm-srgb":{bytesPerBlock:16,blockWidth:6,blockHeight:5,isCompressed:!0,channels:4},"astc-6x6-unorm":{bytesPerBlock:16,blockWidth:6,blockHeight:6,isCompressed:!0,channels:4},"astc-6x6-unorm-srgb":{bytesPerBlock:16,blockWidth:6,blockHeight:6,isCompressed:!0,channels:4},"astc-8x5-unorm":{bytesPerBlock:16,blockWidth:8,blockHeight:5,isCompressed:!0,channels:4},"astc-8x5-unorm-srgb":{bytesPerBlock:16,blockWidth:8,blockHeight:5,isCompressed:!0,channels:4},"astc-8x6-unorm":{bytesPerBlock:16,blockWidth:8,blockHeight:6,isCompressed:!0,channels:4},"astc-8x6-unorm-srgb":{bytesPerBlock:16,blockWidth:8,blockHeight:6,isCompressed:!0,channels:4},"astc-8x8-unorm":{bytesPerBlock:16,blockWidth:8,blockHeight:8,isCompressed:!0,channels:4},"astc-8x8-unorm-srgb":{bytesPerBlock:16,blockWidth:8,blockHeight:8,isCompressed:!0,channels:4},"astc-10x5-unorm":{bytesPerBlock:16,blockWidth:10,blockHeight:5,isCompressed:!0,channels:4},"astc-10x5-unorm-srgb":{bytesPerBlock:16,blockWidth:10,blockHeight:5,isCompressed:!0,channels:4},"astc-10x6-unorm":{
144bytesPerBlock:16,blockWidth:10,blockHeight:6,isCompressed:!0,channels:4},"astc-10x6-unorm-srgb":{bytesPerBlock:16,blockWidth:10,blockHeight:6,isCompressed:!0,channels:4},"astc-10x8-unorm":{bytesPerBlock:16,blockWidth:10,blockHeight:8,isCompressed:!0,channels:4},"astc-10x8-unorm-srgb":{bytesPerBlock:16,blockWidth:10,blockHeight:8,isCompressed:!0,channels:4},"astc-10x10-unorm":{bytesPerBlock:16,blockWidth:10,blockHeight:10,isCompressed:!0,channels:4},"astc-10x10-unorm-srgb":{bytesPerBlock:16,blockWidth:10,blockHeight:10,isCompressed:!0,channels:4},"astc-12x10-unorm":{bytesPerBlock:16,blockWidth:12,blockHeight:10,isCompressed:!0,channels:4},"astc-12x10-unorm-srgb":{bytesPerBlock:16,blockWidth:12,blockHeight:10,isCompressed:!0,channels:4},"astc-12x12-unorm":{bytesPerBlock:16,blockWidth:12,blockHeight:12,isCompressed:!0,channels:4},"astc-12x12-unorm-srgb":{bytesPerBlock:16,blockWidth:12,blockHeight:12,isCompressed:!0,channels:4}};let Dl=class p${constructor(){this.id=p$._id++,this.line=0}get isAstNode(){return!0}get astNodeType(){return""}search(e){e(this)}searchBlock(e,n){if(e){n(X_.instance);for(const r of e)r instanceof Array?this.searchBlock(r,n):r.search(n);n(Y_.instance)}}constEvaluate(e,n){throw new Error("Cannot evaluate node")}constEvaluateString(e){return this.constEvaluate(e).toString()}};Dl._id=0;let X_=class extends Dl{};X_.instance=new X_;let Y_=class extends Dl{};Y_.instance=new Y_;const g$=new Set(["all","all","any","select","arrayLength","abs","acos","acosh","asin","asinh","atan","atanh","atan2","ceil","clamp","cos","cosh","countLeadingZeros","countOneBits","countTrailingZeros","cross","degrees","determinant","distance","dot","dot4U8Packed","dot4I8Packed","exp","exp2","extractBits","faceForward","firstLeadingBit","firstTrailingBit","floor","fma","fract","frexp","insertBits","inverseSqrt","ldexp","length","log","log2","max","min","mix","modf","normalize","pow","quantizeToF16","radians","reflect","refract","reverseBits","round","saturate","sign","sin","sinh","smoothStep","sqrt","step","tan","tanh","transpose","trunc","dpdx","dpdxCoarse","dpdxFine","dpdy","dpdyCoarse","dpdyFine","fwidth","fwidthCoarse","fwidthFine","textureDimensions","textureGather","textureGatherCompare","textureLoad","textureNumLayers","textureNumLevels","textureNumSamples","textureSample","textureSampleBias","textureSampleCompare","textureSampleCompareLevel","textureSampleGrad","textureSampleLevel","textureSampleBaseClampToEdge","textureStore","atomicLoad","atomicStore","atomicAdd","atomicSub","atomicMax","atomicMin","atomicAnd","atomicOr","atomicXor","atomicExchange","atomicCompareExchangeWeak","pack4x8snorm","pack4x8unorm","pack4xI8","pack4xU8","pack4x8Clamp","pack4xU8Clamp","pack2x16snorm","pack2x16unorm","pack2x16float","unpack4x8snorm","unpack4x8unorm","unpack4xI8","unpack4xU8","unpack2x16snorm","unpack2x16unorm","unpack2x16float","storageBarrier","textureBarrier","workgroupBarrier","workgroupUniformLoad","subgroupAdd","subgroupExclusiveAdd","subgroupInclusiveAdd","subgroupAll","subgroupAnd","subgroupAny","subgroupBallot","subgroupBroadcast","subgroupBroadcastFirst","subgroupElect","subgroupMax","subgroupMin","subgroupMul","subgroupExclusiveMul","subgroupInclusiveMul","subgroupOr","subgroupShuffle","subgroupShuffleDown","subgroupShuffleUp","subgroupShuffleXor","subgroupXor","quadBroadcast","quadSwapDiagonal","quadSwapX","quadSwapY"]);let tr=class extends Dl{constructor(){super()}},yv=class extends tr{constructor(e,n,r,i,s,o){super(),this.calls=new Set,this.name=e,this.args=n,this.returnType=r,this.body=i,this.startLine=s,this.endLine=o}get astNodeType(){return"function"}search(e){if(this.attributes)for(const n of this.attributes)e(n);e(this);for(const n of this.args)e(n);this.searchBlock(this.body,e)}},zse=class extends tr{constructor(e){super(),this.expression=e}get astNodeType(){return"staticAssert"}search(e){this.expression.search(e)}},m$=class extends tr{constructor(e,n){super(),this.condition=e,this.body=n}get astNodeType(){return"while"}search(e){this.condition.search(e),this.searchBlock(this.body,e)}},fP=class extends tr{constructor(e,n){super(),this.body=e,this.loopId=n}get astNodeType(){return"continuing"}search(e){this.searchBlock(this.body,e)}},v$=class extends tr{constructor(e,n,r,i){super(),this.init=e,this.condition=n,this.increment=r,this.body=i}get astNodeType(){return"for"}search(e){var n,r,i;(n=this.init)===null||n===void 0||n.search(e),(r=this.condition)===null||r===void 0||r.search(e),(i=this.increment)===null||i===void 0||i.search(e),this.searchBlock(this.body,e)}},Ec=class extends tr{constructor(e,n,r,i,s){super(),this.attributes=null,this.name=e,this.type=n,this.storage=r,this.access=i,this.value=s}get astNodeType(){return"var"}search(e){var n;e(this),(n=this.value)===null||n===void 0||n.search(e)}},nM=class extends tr{constructor(e,n,r){super(),this.attributes=null,this.name=e,this.type=n,this.value=r}get astNodeType(){return"override"}search(e){var n;(n=this.value)===null||n===void 0||n.search(e)}};class Z1 extends tr{constructor(e,n,r,i,s){super(),this.attributes=null,this.name=e,this.type=n,this.storage=r,this.access=i,this.value=s}get astNodeType(){return"let"}search(e){var n;e(this),(n=this.value)===null||n===void 0||n.search(e)}}let c_=class extends tr{constructor(e,n,r,i,s){super(),this.attributes=null,this.name=e,this.type=n,this.storage=r,this.access=i,this.value=s}get astNodeType(){return"const"}constEvaluate(e,n){return this.value.constEvaluate(e,n)}search(e){var n;e(this),(n=this.value)===null||n===void 0||n.search(e)}};var pg,M1,ze,Re;(t=>{t.increment="++",t.decrement="--"})(pg||(pg={})),(t=>{t.parse=function(e){const n=e;if(n=="parse")throw new Error("Invalid value for IncrementOperator");return t[n]}})(pg||(pg={}));let y$=class extends tr{constructor(e,n){super(),this.operator=e,this.variable=n}get astNodeType(){return"increment"}search(e){this.variable.search(e)}};(t=>{t.assign="=",t.addAssign="+=",t.subtractAssin="-=",t.multiplyAssign="*=",t.divideAssign="/=",t.moduloAssign="%=",t.andAssign="&=",t.orAssign="|=",t.xorAssign="^=",t.shiftLeftAssign="<<=",t.shiftRightAssign=">>="})(M1||(M1={})),(t=>{t.parse=function(e){const n=e;if(n=="parse")throw new Error("Invalid value for AssignOperator");return n}})(M1||(M1={}));let b$=class extends tr{constructor(e,n,r){super(),this.operator=e,this.variable=n,this.value=r}get astNodeType(){return"assign"}search(e){this.variable.search(e),this.value.search(e)}},rM=class extends tr{constructor(e,n){super(),this.name=e,this.args=n}get astNodeType(){return"call"}isBuiltin(){return g$.has(this.name)}search(e){for(const n of this.args)n.search(e);e(this)}},_$=class extends tr{constructor(e,n){super(),this.body=e,this.continuing=n}get astNodeType(){return"loop"}search(e){var n;this.searchBlock(this.body,e),(n=this.continuing)===null||n===void 0||n.search(e)}};class w$ extends tr{constructor(e,n){super(),this.condition=e,this.cases=n}get astNodeType(){return"switch"}search(e){e(this);for(const n of this.cases)n.search(e)}}class x$ extends tr{constructor(e,n,r,i){super(),this.condition=e,this.body=n,this.elseif=r,this.else=i}get astNodeType(){return"if"}search(e){this.condition.search(e),this.searchBlock(this.body,e),this.searchBlock(this.elseif,e),this.searchBlock(this.else,e)}}let A$=class extends tr{constructor(e){super(),this.value=e}get astNodeType(){return"return"}search(e){var n;(n=this.value)===null||n===void 0||n.search(e)}};
144class jse extends tr{constructor(e){super(),this.name=e}get astNodeType(){return"enable"}}let Vse=class extends tr{constructor(e){super(),this.extensions=e}get astNodeType(){return"requires"}};class E$ extends tr{constructor(e,n){super(),this.severity=e,this.rule=n}get astNodeType(){return"diagnostic"}}class iM extends tr{constructor(e,n){super(),this.name=e,this.type=n}get astNodeType(){return"alias"}}class Wse extends tr{constructor(){super()}get astNodeType(){return"discard"}}class S$ extends tr{constructor(){super(),this.condition=null,this.loopId=-1}get astNodeType(){return"break"}}let T$=class extends tr{constructor(){super(),this.loopId=-1}get astNodeType(){return"continue"}},rt=class u_ extends tr{constructor(e){super(),this.attributes=null,this.name=e}get astNodeType(){return"type"}get isStruct(){return!1}get isArray(){return!1}static maxFormatType(e){let n=e[0];if(n.name==="f32")return n;for(let r=1;r<e.length;++r){const i=u_._priority.get(n.name);u_._priority.get(e[r].name)<i&&(n=e[r])}return n.name==="x32"?u_.i32:n}getTypeName(){return this.name}};rt.x32=new rt("x32"),rt.f32=new rt("f32"),rt.i32=new rt("i32"),rt.u32=new rt("u32"),rt.f16=new rt("f16"),rt.bool=new rt("bool"),rt.void=new rt("void"),rt._priority=new Map([["f32",0],["f16",1],["u32",2],["i32",3],["x32",3]]);class Wk extends rt{constructor(e){super(e)}}class xc extends rt{constructor(e,n,r,i){super(e),this.members=n,this.startLine=r,this.endLine=i}get astNodeType(){return"struct"}get isStruct(){return!0}getMemberIndex(e){for(let n=0;n<this.members.length;n++)if(this.members[n].name==e)return n;return-1}search(e){for(const n of this.members)e(n)}}let Be=class extends rt{constructor(e,n,r){super(e),this.format=n,this.access=r}get astNodeType(){return"template"}getTypeName(){let e=this.name;if(this.format!==null){if(e==="vec2"||e==="vec3"||e==="vec4"||e==="mat2x2"||e==="mat2x3"||e==="mat2x4"||e==="mat3x2"||e==="mat3x3"||e==="mat3x4"||e==="mat4x2"||e==="mat4x3"||e==="mat4x4"){if(this.format.name==="f32")return e+="f",e;if(this.format.name==="i32")return e+="i",e;if(this.format.name==="u32")return e+="u",e;if(this.format.name==="bool")return e+="b",e;if(this.format.name==="f16")return e+="h",e}e+=`<${this.format.name}>`}else if(e==="vec2"||e==="vec3"||e==="vec4")return e;return e}};Be.vec2f=new Be("vec2",rt.f32,null),Be.vec3f=new Be("vec3",rt.f32,null),Be.vec4f=new Be("vec4",rt.f32,null),Be.vec2i=new Be("vec2",rt.i32,null),Be.vec3i=new Be("vec3",rt.i32,null),Be.vec4i=new Be("vec4",rt.i32,null),Be.vec2u=new Be("vec2",rt.u32,null),Be.vec3u=new Be("vec3",rt.u32,null),Be.vec4u=new Be("vec4",rt.u32,null),Be.vec2h=new Be("vec2",rt.f16,null),Be.vec3h=new Be("vec3",rt.f16,null),Be.vec4h=new Be("vec4",rt.f16,null),Be.vec2b=new Be("vec2",rt.bool,null),Be.vec3b=new Be("vec3",rt.bool,null),Be.vec4b=new Be("vec4",rt.bool,null),Be.mat2x2f=new Be("mat2x2",rt.f32,null),Be.mat2x3f=new Be("mat2x3",rt.f32,null),Be.mat2x4f=new Be("mat2x4",rt.f32,null),Be.mat3x2f=new Be("mat3x2",rt.f32,null),Be.mat3x3f=new Be("mat3x3",rt.f32,null),Be.mat3x4f=new Be("mat3x4",rt.f32,null),Be.mat4x2f=new Be("mat4x2",rt.f32,null),Be.mat4x3f=new Be("mat4x3",rt.f32,null),Be.mat4x4f=new Be("mat4x4",rt.f32,null),Be.mat2x2h=new Be("mat2x2",rt.f16,null),Be.mat2x3h=new Be("mat2x3",rt.f16,null),Be.mat2x4h=new Be("mat2x4",rt.f16,null),Be.mat3x2h=new Be("mat3x2",rt.f16,null),Be.mat3x3h=new Be("mat3x3",rt.f16,null),Be.mat3x4h=new Be("mat3x4",rt.f16,null),Be.mat4x2h=new Be("mat4x2",rt.f16,null),Be.mat4x3h=new Be("mat4x3",rt.f16,null),Be.mat4x4h=new Be("mat4x4",rt.f16,null),Be.mat2x2i=new Be("mat2x2",rt.i32,null),Be.mat2x3i=new Be("mat2x3",rt.i32,null),Be.mat2x4i=new Be("mat2x4",rt.i32,null),Be.mat3x2i=new Be("mat3x2",rt.i32,null),Be.mat3x3i=new Be("mat3x3",rt.i32,null),Be.mat3x4i=new Be("mat3x4",rt.i32,null),Be.mat4x2i=new Be("mat4x2",rt.i32,null),Be.mat4x3i=new Be("mat4x3",rt.i32,null),Be.mat4x4i=new Be("mat4x4",rt.i32,null),Be.mat2x2u=new Be("mat2x2",rt.u32,null),Be.mat2x3u=new Be("mat2x3",rt.u32,null),Be.mat2x4u=new Be("mat2x4",rt.u32,null),Be.mat3x2u=new Be("mat3x2",rt.u32,null),Be.mat3x3u=new Be("mat3x3",rt.u32,null),Be.mat3x4u=new Be("mat3x4",rt.u32,null),Be.mat4x2u=new Be("mat4x2",rt.u32,null),Be.mat4x3u=new Be("mat4x3",rt.u32,null),Be.mat4x4u=new Be("mat4x4",rt.u32,null);let f_=class extends rt{constructor(e,n,r,i){super(e),this.storage=n,this.type=r,this.access=i}get astNodeType(){return"pointer"}},J1=class extends rt{constructor(e,n,r,i){super(e),this.attributes=n,this.format=r,this.count=i}get astNodeType(){return"array"}get isArray(){return!0}},R1=class extends rt{constructor(e,n,r){super(e),this.format=n,this.access=r}get astNodeType(){return"sampler"}},Ma=class extends Dl{constructor(){super(),this.postfix=null}},Kh=class extends Ma{constructor(e){super(),this.value=e}
144get astNodeType(){return"stringExpr"}toString(){return this.value}constEvaluateString(){return this.value}},ml=class extends Ma{constructor(e,n){super(),this.type=e,this.args=n}get astNodeType(){return"createExpr"}search(e){if(e(this),this.args)for(const n of this.args)n.search(e)}constEvaluate(e,n){return n&&(n[0]=this.type),e.evalExpression(this,e.context)}},sM=class extends Ma{constructor(e,n){super(),this.cachedReturnValue=null,this.name=e,this.args=n}get astNodeType(){return"callExpr"}setCachedReturnValue(e){this.cachedReturnValue=e}get isBuiltin(){return g$.has(this.name)}constEvaluate(e,n){return e.evalExpression(this,e.context)}search(e){for(const n of this.args)n.search(e);e(this)}},ro=class extends Ma{constructor(e){super(),this.name=e}get astNodeType(){return"varExpr"}search(e){e(this),this.postfix&&this.postfix.search(e)}constEvaluate(e,n){return e.evalExpression(this,e.context)}},C$=class extends Ma{constructor(e,n){super(),this.name=e,this.initializer=n}get astNodeType(){return"constExpr"}constEvaluate(e,n){if(this.initializer){const r=e.evalExpression(this.initializer,e.context);return r!==null&&this.postfix?r.getSubData(e,this.postfix,e.context):r}return null}search(e){this.initializer.search(e)}},qr=class extends Ma{constructor(e,n){super(),this.value=e,this.type=n}get astNodeType(){return"literalExpr"}constEvaluate(e,n){return n!==void 0&&(n[0]=this.type),this.value}get isScalar(){return this.value instanceof De}get isVector(){return this.value instanceof ge||this.value instanceof jt}get scalarValue(){return this.value instanceof De?this.value.value:(console.error("Value is not scalar."),0)}get vectorValue(){return this.value instanceof ge||this.value instanceof jt?this.value.data:(console.error("Value is not a vector or matrix."),new Float32Array(0))}},P$=class extends Ma{constructor(e,n){super(),this.type=e,this.value=n}get astNodeType(){return"bitcastExpr"}search(e){this.value.search(e)}},Kg=class extends Ma{constructor(e){super(),this.index=e}search(e){this.index.search(e)}},I$=class extends Ma{constructor(){super()}},kr=class extends I${constructor(e,n){super(),this.operator=e,this.right=n}get astNodeType(){return"unaryOp"}constEvaluate(e,n){return e.evalExpression(this,e.context)}search(e){this.right.search(e)}},ga=class extends I${constructor(e,n,r){super(),this.operator=e,this.left=n,this.right=r}get astNodeType(){return"binaryOp"}_getPromotedType(e,n){return e.name===n.name?e:e.name==="f32"||n.name==="f32"?rt.f32:e.name==="u32"||n.name==="u32"?rt.u32:rt.i32}constEvaluate(e,n){return e.evalExpression(this,e.context)}search(e){this.left.search(e),this.right.search(e)}},O$=class extends Dl{constructor(e){super(),this.body=e}search(e){e(this),this.searchBlock(this.body,e)}},h_=class extends Ma{constructor(){super()}get astNodeType(){return"default"}},M$=class extends O${constructor(e,n){super(n),this.selectors=e}get astNodeType(){return"case"}search(e){this.searchBlock(this.body,e)}},R$=class extends O${constructor(e){super(e)}get astNodeType(){return"default"}search(e){this.searchBlock(this.body,e)}},$k=class extends Dl{constructor(e,n,r){super(),this.name=e,this.type=n,this.attributes=r}get astNodeType(){return"argument"}};class $se extends Dl{constructor(e,n){super(),this.condition=e,this.body=n}get astNodeType(){return"elseif"}search(e){this.condition.search(e),this.searchBlock(this.body,e)}}let Hk=class extends Dl{constructor(e,n,r){super(),this.name=e,this.type=n,this.attributes=r}get astNodeType(){return"member"}},k$=class extends Dl{constructor(e,n){super(),this.name=e,this.value=n}get astNodeType(){return"attribute"}},Ol=class N${constructor(e,n){this.parent=null,this.typeInfo=e,this.parent=n,this.id=N$._id++}clone(){throw`Clone: Not implemented for ${this.constructor.name}`}setDataValue(e,n,r,i){console.error(`SetDataValue: Not implemented for ${this.constructor.name}`)}getSubData(e,n,r){return console.error(`GetDataValue: Not implemented for ${this.constructor.name}`),null}toString(){return`<${this.typeInfo.getTypeName()}>`}};Ol._id=0;let hP=class extends Ol{constructor(){super(new Uo("void",null),null)}toString(){return"void"}};hP.void=new hP;let tg=class extends Ol{constructor(e){super(new uP("pointer",e.typeInfo,null),null),this.reference=e}clone(){return this}setDataValue(e,n,r,i){this.reference.setDataValue(e,n,r,i)}getSubData(e,n,r){return n?this.reference.getSubData(e,n,r):this}toString(){return`&${this.reference.toString()}`}},De=class k1 extends Ol{constructor(e,n,r=null){super(n,r),e instanceof Int32Array||e instanceof Uint32Array||e instanceof Float32Array?this.data=e:this.t
144ypeInfo.name==="x32"?e-Math.floor(e)!==0?this.data=new Float32Array([e]):this.data=e>=0?new Uint32Array([e]):new Int32Array([e]):this.typeInfo.name==="i32"||this.typeInfo.name==="bool"?this.data=new Int32Array([e]):this.typeInfo.name==="u32"?this.data=new Uint32Array([e]):this.typeInfo.name==="f32"||this.typeInfo.name==="f16"?this.data=new Float32Array([e]):console.error("ScalarData2: Invalid type",n)}clone(){if(this.data instanceof Float32Array)return new k1(new Float32Array(this.data),this.typeInfo,null);if(this.data instanceof Int32Array)return new k1(new Int32Array(this.data),this.typeInfo,null);if(this.data instanceof Uint32Array)return new k1(new Uint32Array(this.data),this.typeInfo,null);throw"ScalarData: Invalid data type"}get value(){return this.data[0]}set value(e){this.data[0]=e}setDataValue(e,n,r,i){if(r)return void console.error("SetDataValue: Scalar data does not support postfix",r);if(!(n instanceof k1))return void console.error("SetDataValue: Invalid value",n);let s=n.data[0];this.typeInfo.name==="i32"||this.typeInfo.name==="u32"?s=Math.floor(s):this.typeInfo.name==="bool"&&(s=s?1:0),this.data[0]=s}getSubData(e,n,r){return n?(console.error("getSubData: Scalar data does not support postfix",n),null):this}toString(){return`${this.value}`}};function Hse(t,e,n){const r=e.length;return r===2?n==="f32"?new ge(new Float32Array(e),t.getTypeInfo("vec2f")):n==="i32"||n==="bool"?new ge(new Int32Array(e),t.getTypeInfo("vec2i")):n==="u32"?new ge(new Uint32Array(e),t.getTypeInfo("vec2u")):n==="f16"?new ge(new Float32Array(e),t.getTypeInfo("vec2h")):(console.error(`getSubData: Unknown format ${n}`),null):r===3?n==="f32"?new ge(new Float32Array(e),t.getTypeInfo("vec3f")):n==="i32"||n==="bool"?new ge(new Int32Array(e),t.getTypeInfo("vec3i")):n==="u32"?new ge(new Uint32Array(e),t.getTypeInfo("vec3u")):n==="f16"?new ge(new Float32Array(e),t.getTypeInfo("vec3h")):(console.error(`getSubData: Unknown format ${n}`),null):r===4?n==="f32"?new ge(new Float32Array(e),t.getTypeInfo("vec4f")):n==="i32"||n==="bool"?new ge(new Int32Array(e),t.getTypeInfo("vec4i")):n==="u32"?new ge(new Uint32Array(e),t.getTypeInfo("vec4u")):n==="f16"?new ge(new Float32Array(e),t.getTypeInfo("vec4h")):(console.error(`getSubData: Unknown format ${n}`),null):(console.error(`getSubData: Invalid vector size ${e.length}`),null)}let ge=class N1 extends Ol{constructor(e,n,r=null){if(super(n,r),e instanceof Float32Array||e instanceof Uint32Array||e instanceof Int32Array)this.data=e;else{const i=this.typeInfo.name;i==="vec2f"||i==="vec3f"||i==="vec4f"?this.data=new Float32Array(e):i==="vec2i"||i==="vec3i"||i==="vec4i"?this.data=new Int32Array(e):i==="vec2u"||i==="vec3u"||i==="vec4u"?this.data=new Uint32Array(e):i==="vec2h"||i==="vec3h"||i==="vec4h"?this.data=new Float32Array(e):i==="vec2b"||i==="vec3b"||i==="vec4b"?this.data=new Int32Array(e):i==="vec2"||i==="vec3"||i==="vec4"?this.data=new Float32Array(e):console.error(`VectorData: Invalid type ${i}`)}}clone(){if(this.data instanceof Float32Array)return new N1(new Float32Array(this.data),this.typeInfo,null);if(this.data instanceof Int32Array)return new N1(new Int32Array(this.data),this.typeInfo,null);if(this.data instanceof Uint32Array)return new N1(new Uint32Array(this.data),this.typeInfo,null);throw"VectorData: Invalid data type"}setDataValue(e,n,r,i){r instanceof Kh?console.error("TODO: Set vector postfix"):n instanceof N1?this.data=n.data:console.error("SetDataValue: Invalid value",n)}getSubData(e,n,r){if(n===null)return this;let i=e.getTypeInfo("f32");if(this.typeInfo instanceof Yh)i=this.typeInfo.format||i;else{const o=this.typeInfo.name;o==="vec2f"||o==="vec3f"||o==="vec4f"?i=e.getTypeInfo("f32"):o==="vec2i"||o==="vec3i"||o==="vec4i"?i=e.getTypeInfo("i32"):o==="vec2b"||o==="vec3b"||o==="vec4b"?i=e.getTypeInfo("bool"):o==="vec2u"||o==="vec3u"||o==="vec4u"?i=e.getTypeInfo("u32"):o==="vec2h"||o==="vec3h"||o==="vec4h"?i=e.getTypeInfo("f16"):console.error(`GetSubData: Unknown type ${o}`)}let s=this;for(;n!==null&&s!==null;){if(n instanceof Kg){const o=n.index;let a=-1;if(o instanceof qr){if(!(o.value instanceof De))return console.error(`GetSubData: Invalid array index ${o.value}`),null;a=o.value.value}else{const l=e.evalExpression(o,r);if(!(l instanceof De))return console.error("GetSubData: Unknown index type",o),null;a=l.value}if(a<0||a>=s.data.length)return console.error("GetSubData: Index out of range",a),null;if(s.data instanceof Float32Array){const l=new Float32Array(s.data.buffer,s.data.byteOffset+4*a,1);
144return new De(l,i)}if(s.data instanceof Int32Array){const l=new Int32Array(s.data.buffer,s.data.byteOffset+4*a,1);return new De(l,i)}if(s.data instanceof Uint32Array){const l=new Uint32Array(s.data.buffer,s.data.byteOffset+4*a,1);return new De(l,i)}throw"GetSubData: Invalid data type"}if(!(n instanceof Kh))return console.error("GetSubData: Unknown postfix",n),null;{const o=n.value.toLowerCase();if(o.length===1){let l=0;if(o==="x"||o==="r")l=0;else if(o==="y"||o==="g")l=1;else if(o==="z"||o==="b")l=2;else{if(o!=="w"&&o!=="a")return console.error(`GetSubData: Unknown member ${o}`),null;l=3}if(this.data instanceof Float32Array){let c=new Float32Array(this.data.buffer,this.data.byteOffset+4*l,1);return new De(c,i,this)}if(this.data instanceof Int32Array){let c=new Int32Array(this.data.buffer,this.data.byteOffset+4*l,1);return new De(c,i,this)}if(this.data instanceof Uint32Array){let c=new Uint32Array(this.data.buffer,this.data.byteOffset+4*l,1);return new De(c,i,this)}}const a=[];for(const l of o)l==="x"||l==="r"?a.push(this.data[0]):l==="y"||l==="g"?a.push(this.data[1]):l==="z"||l==="b"?a.push(this.data[2]):l==="w"||l==="a"?a.push(this.data[3]):console.error(`GetDataValue: Unknown member ${l}`);s=Hse(e,a,i.name)}n=n.postfix}return s}toString(){let e=`${this.data[0]}`;for(let n=1;n<this.data.length;++n)e+=`, ${this.data[n]}`;return e}},jt=class dP extends Ol{constructor(e,n,r=null){super(n,r),e instanceof Float32Array?this.data=e:this.data=new Float32Array(e)}clone(){return new dP(new Float32Array(this.data),this.typeInfo,null)}setDataValue(e,n,r,i){r instanceof Kh?console.error("TODO: Set matrix postfix"):n instanceof dP?this.data=n.data:console.error("SetDataValue: Invalid value",n)}getSubData(e,n,r){if(n===null)return this;const i=this.typeInfo.name;if(e.getTypeInfo("f32"),this.typeInfo instanceof Yh)this.typeInfo.format;else if(i.endsWith("f"))e.getTypeInfo("f32");else if(i.endsWith("i"))e.getTypeInfo("i32");else if(i.endsWith("u"))e.getTypeInfo("u32");else{if(!i.endsWith("h"))return console.error(`GetDataValue: Unknown type ${i}`),null;e.getTypeInfo("f16")}if(n instanceof Kg){const s=n.index;let o=-1;if(s instanceof qr){if(!(s.value instanceof De))return console.error(`GetDataValue: Invalid array index ${s.value}`),null;o=s.value.value}else{const c=e.evalExpression(s,r);if(!(c instanceof De))return console.error("GetDataValue: Unknown index type",s),null;o=c.value}if(o<0||o>=this.data.length)return console.error("GetDataValue: Index out of range",o),null;const a=i.endsWith("h")?"h":"f";let l;if(i==="mat2x2"||i==="mat2x2f"||i==="mat2x2h"||i==="mat3x2"||i==="mat3x2f"||i==="mat3x2h"||i==="mat4x2"||i==="mat4x2f"||i==="mat4x2h")l=new ge(new Float32Array(this.data.buffer,this.data.byteOffset+2*o*4,2),e.getTypeInfo(`vec2${a}`));else if(i==="mat2x3"||i==="mat2x3f"||i==="mat2x3h"||i==="mat3x3"||i==="mat3x3f"||i==="mat3x3h"||i==="mat4x3"||i==="mat4x3f"||i==="mat4x3h")l=new ge(new Float32Array(this.data.buffer,this.data.byteOffset+3*o*4,3),e.getTypeInfo(`vec3${a}`));else{if(i!=="mat2x4"&&i!=="mat2x4f"&&i!=="mat2x4h"&&i!=="mat3x4"&&i!=="mat3x4f"&&i!=="mat3x4h"&&i!=="mat4x4"&&i!=="mat4x4f"&&i!=="mat4x4h")return console.error(`GetDataValue: Unknown type ${i}`),null;l=new ge(new Float32Array(this.data.buffer,this.data.byteOffset+4*o*4,4),e.getTypeInfo(`vec4${a}`))}return n.postfix?l.getSubData(e,n.postfix,r):l}return console.error("GetDataValue: Invalid postfix",n),null}toString(){let e=`${this.data[0]}`;for(let n=1;n<this.data.length;++n)e+=`, ${this.data[n]}`;return e}},li=class d_ extends Ol{constructor(e,n,r=0,i=null){super(n,i),this.buffer=e instanceof ArrayBuffer?e:e.buffer,this.offset=r}clone(){const e=new Uint8Array(new Uint8Array(this.buffer,this.offset,this.typeInfo.size));return new d_(e.buffer,this.typeInfo,0,null)}setDataValue(e,n,r,i){if(n===null)return void console.log("setDataValue: NULL data.");let s=this.offset,o=this.typeInfo;for(;r;){if(r instanceof Kg)if(o instanceof nf){const a=r.index;if(a instanceof qr){if(!(a.value instanceof De))return void console.error(`SetDataValue: Invalid index type ${a.value}`);s+=a.value.value*o.stride}else{const l=e.evalExpression(a,i);if(!(l instanceof De))return void console.error("SetDataValue: Unknown index type",a);s+=l.value*o.stride}o=o.format}else console.error(`SetDataValue: Type ${o.getTypeName()} is not an array`);else{if(!(r instanceof Kh))return void console.error("SetDataValue: Unknown postfix type",r);{const a=r.value;if(o instanceof Ku){let l=!1;for(const c of o.members)if(c.name===a){s+=c.offset,o=c.type,l=!0;break}if(!l)return void console.error(`SetDataValue: Member ${a} not found`)}else if(o instanceof Uo){const l=o.getTypeName();let c=0;if(a==="x"||a==="r")c=0;else if(a==="y"||a==="g")c=1;else if(a==="z"||a==="b")c=2;else{if(a!=="w"&&a!=="a")return void console.error(`SetDataValue: Unknown member ${a}`);c=3}if(!(n instanceof De))return void console.error("SetDataValue: Invalid value",n);const u=n.value;return l==="vec2f"?void(new Float32Array(this.buffer,s,2)[c]=u):l==="vec3f"?void(new Float32Array(this.buffer,s,3)[c]=u):l==="vec4f"?void(new Float32Array(this.buffer,s,4)[c]=u):l==="vec2i"?void(new Int32Array(this.buffer,s,2)[c]=u):l==="vec3i"?void(new Int32Array(this.buffer,s,3)[c]=u):l==="vec4i"?void(new Int32Array(this.buffer,s,4)[c]=u):l==="vec2u"?void(new Uint32Array(this.buffer,s,2)[c]=u):l==="vec3u"?void(new Uint32Array(this.buffer,s,3)[c]=u):l==="vec4u"?void(new Uint32Array(this.buffer,s,4)[c]=u):void console.error(`SetDataValue: Type ${l} is not a struct`)}}}r=r.postfix}this.setData(e,n,o,s,i)}setData(e,n,r,i,s){const o=r.getTypeName();if(o!=="f32"&&o!=="f16")if(o!=="i32"&&o!=="atomic<i32>"&&o!=="x32")if(o!=="u32"&&o!=="atomic<u32>")if(o!=="bool"){if(o==="vec2f"||o==="vec2h"){const a=new Float32Array(this.buffer,i,2);return void(n instanceof ge?(a[0]=n.data[0],a[1]=n.data[1]):(a[0]=n[0],a[1]=n[1]))}if(o==="vec3f"||o==="vec3h"){const a=new Float32Array(this.buffer,i,3);return void(n instanceof ge?(a[0]=n.data[0],a[1]=n.data[1],a[2]=n.data[2]):(a[0]=n[0],a[1]=n[1],a[2]=n[2]))}if(o==="vec4f"||o==="vec4h"){const a=new Float32Array(this.buffer,i,4);return void(n instanceof ge?(a[0]=n.data[0],a[1]=n.data[1],a[2]=n.data[2],a[3]=n.data[3]):(a[0]=n[0],a[1]=n[1],a[2]=n[2],a[3]=n[3]))}if(o==="vec2i"){const a=new Int32Array(this.buffer,i,2);return void(n instanceof ge?(a[0]=n.data[0],a[1]=n.data[1]):(a[0]=n[0],a[1]=n[1]))}if(o==="vec3i"){const a=new Int32Array(this.buffer,i,3);return void(n instanceof ge?(a[0]=n.data[0],a[1]=n.data[1],a[2]=n.data[2]):(a[0]=n[0],a[1]=n[1],a[2]=n[2]))}if(o==="vec4i"){const a=new Int32Array(this.buffer,i,4);return void(n instanceof ge?(a[0]=n.data[0],a[1]=n.data[1],a[2]=n.data[2],a[3]=n.data[3]):(a[0]=n[0],a[1]=n[1],a[2]=n[2],a[3]=n[3]))}if(o==="vec2u"){const a=new Uint32Array(this.buffer,i,2);return void(n instanceof ge?(a[0]=n.data[0],a[1]=n.data[1]):(a[0]=n[0],a[1]=n[1]))}if(o==="vec3u"){const a=new Uint32Array(this.buffer,i,3);return void(n instanceof ge?(a[0]=n.data[0],a[1]=n.data[1],a[2]=n.data[2]):(a[0]=n[0],a[1]=n[1],a[2]=n[2]))}if(o==="vec4u"){const a=new Uint32Array(this.buffer,i,4);return void(n instanceof ge?(a[0]=n.data[0],a[1]=n.data[1],a[2]=n.data[2],a[3]=n.data[3]):(a[0]=n[0],a[1]=n[1],a[2]=n[2],a[3]=n[3]))}if(o==="vec2b"){const a=new Uint32Array(this.buffer,i,2);return void(n instanceof ge?(a[0]=n.data[0],a[1]=n.data[1]):(a[0]=n[0],a[1]=n[1]))}if(o==="vec3b"){const a=new Uint32Array(this.buffer,i,3);return void(n instanceof ge?(a[0]=n.data[0],a[1]=n.data[1],a[2]=n.data[2]):(a[0]=n[0],a[1]=n[1],a[2]=n[2]))}if(o==="vec4b"){const a=new Uint32Array(this.buffer,i,4);return void(n instanceof ge?(a[0]=n.data[0],a[1]=n.data[1],a[2]=n.data[2],a[3]=n.data[3]):(a[0]=n[0],a[1]=n[1],a[2]=n[2],a[3]=n[3]))}if(o==="mat2x2f"||o==="mat2x2h"){const a=new Float32Array(this.buffer,i,4);return void(n instanceof jt?(a[0]=n.data[0],a[1]=n.data[1],a[2]=n.data[2],a[3]=n.data[3]):(a[0]=n[0],a[1]=n[1],a[2]=n[2],a[3]=n[3]))}if(o==="mat2x3f"||o==="mat2x3h"){const a=new Float32Array(this.buffer,i,6);return void(n instanceof jt?(a[0]=n.data[0],a[1]=n.data[1],a[2]=n.data[2],a[3]=n.data[3],a[4]=n.data[4],a[5]=n.data[5]):(a[0]=n[0],a[1]=n[1],a[2]=n[2],a[3]=n[3],a[4]=n[4],a[5]=n[5]))}if(o==="mat2x4f"||o==="mat2x4h"){const a=new Float32Array(this.buffer,i,8);return void(n instanceof jt?(a[0]=n.data[0],a[1]=n.data[1],a[2]=n.data[2],a[3]=n.data[3],a[4]=n.data[4],a[5]=n.data[5],a[6]=n.data[6],a[7]=n.data[7]):(a[0]=n[0],a[1]=n[1],a[2]=n[2],a[3]=n[3],a[4]=n[4],a[5]=n[5],a[6]=n[6],a[7]=n[7]))}if(o==="mat3x2f"||o==="mat3x2h"){const a=new Float32Array(this.buffer,i,6);return void(n instanceof jt?(a[0]=n.data[0],a[1]=n.data[1],a[2]=n.data[2],a[3]=n.data[3],a[4]=n.data[4],a[5]=n.data[5]):(a[0]=n[0],a[1]=n[1],a[2]=n[2],a[3]=n[3],a[4]=n[4],a[5]=n[5]))}if(o==="mat3x3f"||o==="mat3x3h"){const a=new Float32Array(this.buffer,i,9);return void(n instanceof jt?(a[0]=n.data[0],a[1]=n.data[1],a[2]=n.data[2],a[3]=n.data[3],a[4]=n.data[4],a[5]=n.data[5],a[6]=n.data[6],a[7]=n.data[7],a[8]=n.data[8]):(a[0]=n[0],a[1]=n[1],a[2]=n[2],a[3]=n[3],a[4]=n[4],a[5]=n[5],a[6]=n[6],a[7]=n[7],a[8]=n[8]))}if(o==="mat3x4f"||o==="mat3x4h"){const a=new Float32Array(this.buffer,i,12);return void(n instanceof jt?(a[0]=n.data[0],a[1]=n.data[1],a[2]=n.data[2],a[3]=n.data[3],a[4]=n.data[4],a[5]=n.data[5],a[6]=n.data[6],a[7]=n.data[7],a[8]=n.data[8],a[9]=n.data[9],a[10]=n.data[10],a[11]=n.data[11]):(a[0]=n[0],a[1]=n[1],a[2]=n[2],a[3]=n[3],a[4]=n[4],a[5]=n[5],a[6]=n[6],a[7]=n[7],a[8]=n[8],a[9]=n[9],a[10]=n[10],a[11]=n[11]))}if(o==="mat4x2f"||o==="mat4x2h"){const a=new Float32Array(this.buffer,i,8);return void(n instanceof jt?(a[0]=n.data[0],a[1]=n.data[1],a[2]=n.data[2],a[3]=n.data[3],a[4]=n.data[4],a[5]=n.data[5],a[6]=n.data[6],a[7]=n.data[7]):(a[0]=n[0],a[1]=n[1],a[2]=n[2],a[3]=n[3],a[4]=n[4],a[5]=n[5],a[6]=n[6],a[7]=n[7]))}if(o==="mat4x3f"||o==="mat4x3h"){const a=new Float32Array(this.buffer,i,12);return void(n instanceof jt?(a[0]=n.data[0],a[1]=n.data[1],a[2]=n.data[2],a[3]=n.data[3],a[4]=n.data[4],a[5]=n.data[5],a[6]=n.data[6],a[7]=n.data[7],a[8]=n.data[8],a[9]=n.data[9],a[10]=n.data[10],a[11]=n.data[11]):(a[0]=n[0],a[1]=n[1],a[2]=n[2],a[3]=n[3],a[4]=n[4],a[5]=n[5],a[6]=n[6],a[7]=n[7],a[8]=n[8],a[9]=n[9],a[10]=n[10],a[11]=n[11]))}if(o==="mat4x4f"||o==="mat4x4h"){const a=new Float32Array(this.buffer,i,16);return void(n instanceof jt?(a[0]=n.data[0],a[1]=n.data[1],a[2]=n.data[2],a[3]=n.data[3],a[4]=n.data[4],a[5]=n.data[5],a[6]=n.data[6],a[7]=n.data[7],a[8]=n.data[8],a[9]=n.data[9],a[10]=n.data[10],a[11]=n.data[11],a[12]=n.data[12],a[13]=n.data[13],a[14]=n.data[14],a[15]=n.data[15]):(a[0]=n[0],a[1]=n[1],a[2]=n[2],a[3]=n[3],a[4]=n[4],a[5]=n[5],a[6]=n[6],a[7]=n[7],a[8]=n[8],a[9]=n[9],a[10]=n[10],a[11]=n[11],a[12]=n[12],a[13]=n[13],a[14]=n[14],a[15]=n[15]))}if(n instanceof d_){if(r===n.typeInfo)return void new Uint8Array(this.buffer,i,n.buffer.byteLength).set(new Uint8Array(n.buffer));console.error("SetDataValue: Type mismatch",o,n.typeInfo.getTypeName())}else console.error(`SetData: Unknown type ${o}`)}else n instanceof De&&(new Int32Array(this.buffer,i,1)[0]=n.value);else n instanceof De&&(new Uint32Array(this.buffer,i,1)[0]=n.value);else n instanceof De&&(new Int32Array(this.buffer,i,1)[0]=n.value);else n instanceof De&&(new Float32Array(this.buffer,i,1)[0]=n.value)}getSubData(e,n,r){var i,s,o;if(n===null)return this;let a=this.offset,l=this.typeInfo;for(;n;){if(n instanceof Kg){const u=n.index,h=u instanceof Ma?e.evalExpression(u,r):u;let d=0;if(h instanceof De?d=h.value:typeof h=="number"?d=h:console.error("GetDataValue: Invalid index type",u),l instanceof nf)a+=d*l.stride,l=l.format;else{const m=l.getTypeName();m==="mat4x4"||m==="mat4x4f"||m==="mat4x4h"?(a+=16*d,l=e.getTypeInfo("vec4f")):console.error(`getDataValue: Type ${l.getTypeName()} is not an array`)}}else{if(!(n instanceof Kh))return console.error("GetDataValue: Unknown postfix type",n),null;{const u=n.value;if(l instanceof Ku){let h=!1;for(const d of l.members)if(d.name===u){a+=d.offset,l=d.type,h=!0;break}if(!h)return console.error(`GetDataValue: Member ${u} not found`),null}else if(l instanceof Uo){const h=l.getTypeName();if(h==="vec2f"||h==="vec3f"||h==="vec4f"||h==="vec2i"||h==="vec3i"||h==="vec4i"||h==="vec2u"||h==="vec3u"||h==="vec4u"||h==="vec2b"||h==="vec3b"||h==="vec4b"||h==="vec2h"||h==="vec3h"||h==="vec4h"||h==="vec2"||h==="vec3"||h==="vec4"){if(u.length>0&&u.length<5){let d="f";const m=[];for(let y=0;y<u.length;++y){const v=u[y].toLowerCase();let b=0;if(v==="x"||v==="r")b=0;else if(v==="y"||v==="g")b=1;else if(v==="z"||v==="b")b=2;else{if(v!=="w"&&v!=="a")return console.error(`Unknown member ${u}`),null;b=3}if(u.length===1){if(h.endsWith("f"))return this.buffer.byteLength<a+4*b+4?(console.log("Insufficient buffer data"),null):new De(new Float32Array(this.buffer,a+4*b,1),e.getTypeInfo("f32"),this);if(h.endsWith("h"))return new De(new Float32Array(this.buffer,a+4*b,1),e.getTypeInfo("f16"),this);if(h.endsWith("i"))return new De(new Int32Array(this.buffer,a+4*b,1),e.getTypeInfo("i32"),this);if(h.endsWith("b"))return new De(new Int32Array(this.buffer,a+4*b,1),e.getTypeInfo("bool"),this);if(h.endsWith("u"))return new De(new Uint32Array(this.buffer,a+4*b,1),e.getTypeInfo("i32"),this)}if(h==="vec2f")m.push(new Float32Array(this.buffer,a,2)[b]);else if(h==="vec3f"){if(a+12>=this.buffer.byteLength)return console.log("Insufficient buffer data"),null;const x=new Float32Array(this.buffer,a,3);m.push(x[b])}else if(h==="vec4f")m.push(new Float32Array(this.buffer,a,4)[b]);else if(h==="vec2i")d="i",m.push(new Int32Array(this.buffer,a,2)[b]);else if(h==="vec3i")d="i",m.push(new Int32Array(this.buffer,a,3)[b]);else if(h==="vec4i")d="i",m.push(new Int32Array(this.buffer,a,4)[b]);else if(h==="vec2u"){d="u";const x=new Uint32Array(this.buffer,a,2);m.push(x[b])}else h==="vec3u"?(d="u",m.push(new Uint32Array(this.buffer,a,3)[b])):h==="vec4u"&&(d="u",m.push(new Uint32Array(this.buffer,a,4)[b]))}return m.length===2?l=e.getTypeInfo(`vec2${d}`):m.length===3?l=e.getTypeInfo(`vec3${d}`):m.length===4?l=e.getTypeInfo(`vec4${d}`):console.error(`GetDataValue: Invalid vector length ${m.length}`),new ge(m,l,null)}return console.error(`GetDataValue: Unknown member ${u}`),null}return console.error(`GetDataValue: Type ${h} is not a struct`),null}}}n=n.postfix}const c=l.getTypeName();return c==="f32"?new De(new Float32Array(this.buffer,a,1),l,this):c==="i32"?new De(new Int32Array(this.buffer,a,1),l,this):c==="u32"?new De(new Uint32Array(this.buffer,a,1),l,this):c==="vec2f"?new ge(new Float32Array(this.buffer,a,2),l,this):c==="vec3f"?new ge(new Float32Array(this.buffer,a,3),l,this):c==="vec4f"?new ge(new Float32Array(this.buffer,a,4),l,this):c==="vec2i"?new ge(new Int32Array(this.buffer,a,2),l,this):c==="vec3i"?new ge(new Int32Array(this.buffer,a,3),l,this):c==="vec4i"?new ge(new Int32Array(this.buffer,a,4),l,this):c==="vec2u"?new ge(new 
144Uint32Array(this.buffer,a,2),l,this):c==="vec3u"?new ge(new Uint32Array(this.buffer,a,3),l,this):c==="vec4u"?new ge(new Uint32Array(this.buffer,a,4),l,this):l instanceof Yh&&l.name==="atomic"?((i=l.format)===null||i===void 0?void 0:i.name)==="u32"?new De(new Uint32Array(this.buffer,a,1)[0],l.format,this):((s=l.format)===null||s===void 0?void 0:s.name)==="i32"?new De(new Int32Array(this.buffer,a,1)[0],l.format,this):(console.error(`GetDataValue: Invalid atomic format ${(o=l.format)===null||o===void 0?void 0:o.name}`),null):new d_(this.buffer,l,a,this)}toString(){let e="";if(this.typeInfo instanceof nf)if(this.typeInfo.format.name==="f32"){const n=new Float32Array(this.buffer,this.offset);e=`[${n[0]}`;for(let r=1;r<n.length;++r)e+=`, ${n[r]}`}else if(this.typeInfo.format.name==="i32"){const n=new Int32Array(this.buffer,this.offset);e=`[${n[0]}`;for(let r=1;r<n.length;++r)e+=`, ${n[r]}`}else if(this.typeInfo.format.name==="u32"){const n=new Uint32Array(this.buffer,this.offset);e=`[${n[0]}`;for(let r=1;r<n.length;++r)e+=`, ${n[r]}`}else if(this.typeInfo.format.name==="vec2f"){const n=new Float32Array(this.buffer,this.offset);e=`[${n[0]}, ${n[1]}]`;for(let r=1;r<n.length/2;++r)e+=`, [${n[2*r]}, ${n[2*r+1]}]`}else if(this.typeInfo.format.name==="vec3f"){const n=new Float32Array(this.buffer,this.offset);e=`[${n[0]}, ${n[1]}, ${n[2]}]`;for(let r=4;r<n.length;r+=4)e+=`, [${n[r]}, ${n[r+1]}, ${n[r+2]}]`}else if(this.typeInfo.format.name==="vec4f"){const n=new Float32Array(this.buffer,this.offset);e=`[${n[0]}, ${n[1]}, ${n[2]}, ${n[3]}]`;for(let r=4;r<n.length;r+=4)e+=`, [${n[r]}, ${n[r+1]}, ${n[r+2]}, ${n[r+3]}]`}else e="[...]";else this.typeInfo instanceof Ku?e+="{...}":e="[...]";return e}},_h=class D$ extends Ol{constructor(e,n,r,i){super(n,null),this.data=e,this.descriptor=r,this.view=i}clone(){return new D$(this.data,this.typeInfo,this.descriptor,this.view)}get width(){var e,n;const r=this.descriptor.size;return r instanceof Array&&r.length>0?(e=r[0])!==null&&e!==void 0?e:0:r instanceof Object&&(n=r.width)!==null&&n!==void 0?n:0}get height(){var e,n;const r=this.descriptor.size;return r instanceof Array&&r.length>1?(e=r[1])!==null&&e!==void 0?e:0:r instanceof Object&&(n=r.height)!==null&&n!==void 0?n:0}get depthOrArrayLayers(){var e,n;const r=this.descriptor.size;return r instanceof Array&&r.length>2?(e=r[2])!==null&&e!==void 0?e:0:r instanceof Object&&(n=r.depthOrArrayLayers)!==null&&n!==void 0?n:0}get format(){var e;return this.descriptor&&(e=this.descriptor.format)!==null&&e!==void 0?e:"rgba8unorm"}get sampleCount(){var e;return this.descriptor&&(e=this.descriptor.sampleCount)!==null&&e!==void 0?e:1}get mipLevelCount(){var e;return this.descriptor&&(e=this.descriptor.mipLevelCount)!==null&&e!==void 0?e:1}get dimension(){var e;return this.descriptor&&(e=this.descriptor.dimension)!==null&&e!==void 0?e:"2d"}getMipLevelSize(e){if(e>=this.mipLevelCount)return[0,0,0];const n=[this.width,this.height,this.depthOrArrayLayers];for(let r=0;r<n.length;++r)n[r]=Math.max(1,n[r]>>e);return n}get texelByteSize(){const e=this.format,n=sE[e];return n?n.isDepthStencil?4:n.bytesPerBlock:0}get bytesPerRow(){return this.width*this.texelByteSize}get isDepthStencil(){const e=this.format,n=sE[e];return!!n&&n.isDepthStencil}getGpuSize(){const e=this.format,n=sE[e],r=this.width;if(!e||r<=0||!n)return-1;const i=this.height,s=this.depthOrArrayLayers,o=this.dimension;return r/n.blockWidth*(o==="1d"?1:i/n.blockHeight)*n.bytesPerBlock*s}getPixel(e,n,r=0,i=0){const s=this.texelByteSize,o=this.bytesPerRow,a=this.height,l=this.data[i];return Use(new Uint8Array(l),e,n,r,i,a,o,s,this.format)}setPixel(e,n,r,i,s){const o=this.texelByteSize,a=this.bytesPerRow,l=this.height,c=this.data[i];(function(u,h,d,m,y,v,b,x,T,E){const C=m*(b>>=y)*(v>>=y)+d*b+h*x;switch(T){case"r8unorm":return void An(u,C,"8unorm",1,E);case"r8snorm":return void An(u,C,"8snorm",1,E);case"r8uint":return void An(u,C,"8uint",1,E);case"r8sint":return void An(u,C,"8sint",1,E);case"rg8unorm":return void An(u,C,"8unorm",2,E);case"rg8snorm":return void An(u,C,"8snorm",2,E);case"rg8uint":return void An(u,C,"8uint",2,E);case"rg8sint":return void An(u,C,"8sint",2,E);case"rgba8unorm-srgb":case"rgba8unorm":case"bgra8unorm-srgb":case"bgra8unorm":return void An(u,C,"8unorm",4,E
144);case"rgba8snorm":return void An(u,C,"8snorm",4,E);case"rgba8uint":return void An(u,C,"8uint",4,E);case"rgba8sint":return void An(u,C,"8sint",4,E);case"r16uint":return void An(u,C,"16uint",1,E);case"r16sint":return void An(u,C,"16sint",1,E);case"r16float":return void An(u,C,"16float",1,E);case"rg16uint":return void An(u,C,"16uint",2,E);case"rg16sint":return void An(u,C,"16sint",2,E);case"rg16float":return void An(u,C,"16float",2,E);case"rgba16uint":return void An(u,C,"16uint",4,E);case"rgba16sint":return void An(u,C,"16sint",4,E);case"rgba16float":return void An(u,C,"16float",4,E);case"r32uint":return void An(u,C,"32uint",1,E);case"r32sint":return void An(u,C,"32sint",1,E);case"depth16unorm":case"depth24plus":case"depth24plus-stencil8":case"depth32float":case"depth32float-stencil8":case"r32float":return void An(u,C,"32float",1,E);case"rg32uint":return void An(u,C,"32uint",2,E);case"rg32sint":return void An(u,C,"32sint",2,E);case"rg32float":return void An(u,C,"32float",2,E);case"rgba32uint":return void An(u,C,"32uint",4,E);case"rgba32sint":return void An(u,C,"32sint",4,E);case"rgba32float":return void An(u,C,"32float",4,E);case"rg11b10ufloat":console.error("TODO: rg11b10ufloat not supported for writing")}})(new Uint8Array(c),e,n,r,i,l,a,o,this.format,s)}};(t=>{t[t.token=0]="token",t[t.keyword=1]="keyword",t[t.reserved=2]="reserved"})(Re||(Re={}));let ke=class{constructor(e,n,r){this.name=e,this.type=n,this.rule=r}toString(){return this.name}},ae=class{};ze=ae,ae.none=new ke("",Re.reserved,""),ae.eof=new ke("EOF",Re.token,""),ae.reserved={asm:new ke("asm",Re.reserved,"asm"),bf16:new ke("bf16",Re.reserved,"bf16"),do:new ke("do",Re.reserved,"do"),enum:new ke("enum",Re.reserved,"enum"),f16:new ke("f16",Re.reserved,"f16"),f64:new ke("f64",Re.reserved,"f64"),handle:new ke("handle",Re.reserved,"handle"),i8:new ke("i8",Re.reserved,"i8"),i16:new ke("i16",Re.reserved,"i16"),i64:new ke("i64",Re.reserved,"i64"),mat:new ke("mat",Re.reserved,"mat"),premerge:new ke("premerge",Re.reserved,"premerge"),regardless:new ke("regardless",Re.reserved,"regardless"),typedef:new ke("typedef",Re.reserved,"typedef"),u8:new ke("u8",Re.reserved,"u8"),u16:new ke("u16",Re.reserved,"u16"),u64:new ke("u64",Re.reserved,"u64"),unless:new ke("unless",Re.reserved,"unless"),using:new ke("using",Re.reserved,"using"),vec:new ke("vec",Re.reserved,"vec"),void:new ke("void",Re.reserved,"void")},ae.keywords={array:new ke("array",Re.keyword,"array"),atomic:new ke("atomic",Re.keyword,"atomic"),bool:new ke("bool",Re.keyword,"bool"),f32:new ke("f32",Re.keyword,"f32"),i32:new ke("i32",Re.keyword,"i32"),mat2x2:new ke("mat2x2",Re.keyword,"mat2x2"),mat2x3:new ke("mat2x3",Re.keyword,"mat2x3"),mat2x4:new ke("mat2x4",Re.keyword,"mat2x4"),mat3x2:new ke("mat3x2",Re.keyword,"mat3x2"),mat3x3:new ke("mat3x3",Re.keyword,"mat3x3"),mat3x4:new ke("mat3x4",Re.keyword,"mat3x4"),mat4x2:new ke("mat4x2",Re.keyword,"mat4x2"),mat4x3:new ke("mat4x3",Re.keyword,"mat4x3"),mat4x4:new ke("mat4x4",Re.keyword,"mat4x4"),ptr:new ke("ptr",Re.keyword,"ptr"),sampler:new ke("sampler",Re.keyword,"sampler"),sampler_comparison:new ke("sampler_comparison",Re.keyword,"sampler_comparison"),struct:new ke("struct",Re.keyword,"struct"),texture_1d:new ke("texture_1d",Re.keyword,"texture_1d"),texture_2d:new ke("texture_2d",Re.keyword,"texture_2d"),texture_2d_array:new ke("texture_2d_array",Re.keyword,"texture_2d_array"),texture_3d:new ke("texture_3d",Re.keyword,"texture_3d"),texture_cube:new ke("texture_cube",Re.keyword,"texture_cube"),texture_cube_array:new ke("texture_cube_array",Re.keyword,"texture_cube_array"),texture_multisampled_2d:new ke("texture_multisampled_2d",Re.keyword,"texture_multisampled_2d"),texture_storage_1d:new ke("texture_storage_1d",Re.keyword,"texture_storage_1d"),texture_storage_2d:new ke("texture_storage_2d",Re.keyword,"texture_storage_2d"),texture_storage_2d_array:new ke("texture_storage_2d_array",Re.keyword,"texture_storage_2d_array"),texture_storage_3d:new ke("texture_storage_3d",Re.ke
144yword,"texture_storage_3d"),texture_depth_2d:new ke("texture_depth_2d",Re.keyword,"texture_depth_2d"),texture_depth_2d_array:new ke("texture_depth_2d_array",Re.keyword,"texture_depth_2d_array"),texture_depth_cube:new ke("texture_depth_cube",Re.keyword,"texture_depth_cube"),texture_depth_cube_array:new ke("texture_depth_cube_array",Re.keyword,"texture_depth_cube_array"),texture_depth_multisampled_2d:new ke("texture_depth_multisampled_2d",Re.keyword,"texture_depth_multisampled_2d"),texture_external:new ke("texture_external",Re.keyword,"texture_external"),u32:new ke("u32",Re.keyword,"u32"),vec2:new ke("vec2",Re.keyword,"vec2"),vec3:new ke("vec3",Re.keyword,"vec3"),vec4:new ke("vec4",Re.keyword,"vec4"),bitcast:new ke("bitcast",Re.keyword,"bitcast"),block:new ke("block",Re.keyword,"block"),break:new ke("break",Re.keyword,"break"),case:new ke("case",Re.keyword,"case"),continue:new ke("continue",Re.keyword,"continue"),continuing:new ke("continuing",Re.keyword,"continuing"),default:new ke("default",Re.keyword,"default"),diagnostic:new ke("diagnostic",Re.keyword,"diagnostic"),discard:new ke("discard",Re.ke
vendor: 9,328 bytes, line 144
144yword,"discard"),else:new ke("else",Re.keyword,"else"),enable:new ke("enable",Re.keyword,"enable"),fallthrough:new ke("fallthrough",Re.keyword,"fallthrough"),false:new ke("false",Re.keyword,"false"),fn:new ke("fn",Re.keyword,"fn"),for:new ke("for",Re.keyword,"for"),function:new ke("function",Re.keyword,"function"),if:new ke("if",Re.keyword,"if"),let:new ke("let",Re.keyword,"let"),const:new ke("const",Re.keyword,"const"),loop:new ke("loop",Re.keyword,"loop"),while:new ke("while",Re.keyword,"while"),private:new ke("private",Re.keyword,"private"),read:new ke("read",Re.keyword,"read"),read_write:new ke("read_write",Re.keyword,"read_write"),return:new ke("return",Re.keyword,"return"),requires:new ke("requires",Re.keyword,"requires"),storage:new ke("storage",Re.keyword,"storage"),switch:new ke("switch",Re.keyword,"switch"),true:new ke("true",Re.keyword,"true"),alias:new ke("alias",Re.keyword,"alias"),type:new ke("type",Re.keyword,"type"),uniform:new ke("uniform",Re.keyword,"uniform"),var:new ke("var",Re.keyword,"var"),override:new ke("override",Re.keyword,"override"),workgroup:new ke("workgroup",Re.keyword,"workgroup"),write:new ke("write",Re.keyword,"write"),r8unorm:new ke("r8unorm",Re.keyword,"r8unorm"),r8snorm:new ke("r8snorm",Re.keyword,"r8snorm"),r8uint:new ke("r8uint",Re.keyword,"r8uint"),r8sint:new ke("r8sint",Re.keyword,"r8sint"),r16uint:new ke("r16uint",Re.keyword,"r16uint"),r16sint:new ke("r16sint",Re.keyword,"r16sint"),r16float:new ke("r16float",Re.keyword,"r16float"),rg8unorm:new ke("rg8unorm",Re.keyword,"rg8unorm"),rg8snorm:new ke("rg8snorm",Re.keyword,"rg8snorm"),rg8uint:new ke("rg8uint",Re.keyword,"rg8uint"),rg8sint:new ke("rg8sint",Re.keyword,"rg8sint"),r32uint:new ke("r32uint",Re.keyword,"r32uint"),r32sint:new ke("r32sint",Re.keyword,"r32sint"),r32float:new ke("r32float",Re.keyword,"r32float"),rg16uint:new ke("rg16uint",Re.keyword,"rg16uint"),rg16sint:new ke("rg16sint",Re.keyword,"rg16sint"),rg16float:new ke("rg16float",Re.keyword,"rg16float"),rgba8unorm:new ke("rgba8unorm",Re.keyword,"rgba8unorm"),rgba8unorm_srgb:new ke("rgba8unorm_srgb",Re.keyword,"rgba8unorm_srgb"),rgba8snorm:new ke("rgba8snorm",Re.keyword,"rgba8snorm"),rgba8uint:new ke("rgba8uint",Re.keyword,"rgba8uint"),rgba8sint:new ke("rgba8sint",Re.keyword,"rgba8sint"),bgra8unorm:new ke("bgra8unorm",Re.keyword,"bgra8unorm"),bgra8unorm_srgb:new ke("bgra8unorm_srgb",Re.keyword,"bgra8unorm_srgb"),rgb10a2unorm:new ke("rgb10a2unorm",Re.keyword,"rgb10a2unorm"),rg11b10float:new ke("rg11b10float",Re.keyword,"rg11b10float"),rg32uint:new ke("rg32uint",Re.keyword,"rg32uint"),rg32sint:new ke("rg32sint",Re.keyword,"rg32sint"),rg32float:new ke("rg32float",Re.keyword,"rg32float"),rgba16uint:new ke("rgba16uint",Re.keyword,"rgba16uint"),rgba16sint:new ke("rgba16sint",Re.keyword,"rgba16sint"),rgba16float:new ke("rgba16float",Re.keyword,"rgba16float"),rgba32uint:new ke("rgba32uint",Re.keyword,"rgba32uint"),rgba32sint:new ke("rgba32sint",Re.keyword,"rgba32sint"),rgba32float:new ke("rgba32float",Re.keyword,"rgba32float"),static_assert:new ke("static_assert",Re.keyword,"static_assert")},ae.tokens={decimal_float_literal:new ke("decimal_float_literal",Re.token,/((-?[0-9]*\.[0-9]+|-?[0-9]+\.[0-9]*)((e|E)(\+|-)?[0-9]+)?[fh]?)|(-?[0-9]+(e|E)(\+|-)?[0-9]+[fh]?)|(-?[0-9]+[fh])/),hex_float_literal:new ke("hex_float_literal",Re.token,/-?0x((([0-9a-fA-F]*\.[0-9a-fA-F]+|[0-9a-fA-F]+\.[0-9a-fA-F]*)((p|P)(\+|-)?[0-9]+[fh]?)?)|([0-9a-fA-F]+(p|P)(\+|-)?[0-9]+[fh]?))/),int_literal:new ke("int_literal",Re.token,/-?0x[0-9a-fA-F]+|0i?|-?[1-9][0-9]*i?/),uint_literal:new ke("uint_literal",Re.token,/0x[0-9a-fA-F]+u|0u|[1-9][0-9]*u/),name:new ke("name",Re.token,/([_\p{XID_Start}][\p{XID_Continue}]+)|([\p{XID_Start}])/u),ident:new ke("ident",Re.token,/[_a-zA-Z][0-9a-zA-Z_]*/),and:new ke("and",Re.token,"&"),and_and:new ke("and_and",Re.token,"&&"),arrow:new ke("arrow ",Re.token,"->"),attr:new ke("attr",Re.token,"@"),forward_slash:new ke("forward_slash",Re.token,"/"),bang:new ke("bang",Re.token,"!"),bracket_left:new ke("bracket_left",Re.token,"["),bracket_right:new ke("bracket_right",Re.token,"]"),brace_left:new ke("brace_left",Re.token,"{"),brace_right:new ke("brace_right",Re.token,"}"),colon:new ke("colon",Re.token,":"),comma:new ke("comma",Re.token,","),equal:new ke("equal",Re.token,"="),equal_equal:new ke("equal_equal",Re.token,"=="),not_equal:new ke("not_equal",Re.token,"!="),greater_than:new ke("greater_than",Re.token,">"),greater_than_equal:new ke("greater_than_equal",Re.token,">="),shift_right:new ke("shift_right",Re.token,">>"),less_than:new ke("less_than",Re.token,"<"),less_than_equal:new ke("less_than_equal",Re.token,"<="),shift_left:new ke("shift_left",Re.token,"<<"),modulo:new ke("modulo",Re.token,"%"),minus:new ke("minus",Re.token,"-"),minus_minus:new ke("minus_minus",Re.token,"--"),period:new ke("period",Re.token,"."),plus:new ke("plus",Re.token,"+"),plus_plus:new ke("plus_plus",Re.token,"++"),or:new ke("or",Re.token,"|"),or_or:new ke("or_or",Re.token,"||"),paren_left:new ke("paren_left",Re.token,"("),paren_right:new ke("paren_right",Re.token,")"),semicolon:new ke("semicolon",Re.token,";"),star:new ke("star",Re.token,"*"),tilde:new ke("tilde",Re.token,"~"),underscore:new ke("underscore",Re.token,"_"),xor:new ke("xor",Re.token,"^"),plus_equal:new ke("plus_equal",Re.token,"+="),minus_equal:new ke("minus_equal",Re.token,"-="),times_equal:new ke("times_equal",Re.token,"*="),division_equal:new ke("division_equal",Re.token,"/="),modulo_equal:new ke("modulo_equal",Re.token,"%="),and_equal:new ke("and_equal",Re.token,"&="),or_equal:new ke("or_equal",Re.token,"|="),xor_equal:new ke("xor_equal",Re.token,"^="),shift_right_equal:new ke("shift_right_equal",Re.token,">>="),shift_left_equal:new ke("shift_left_equal",Re.token,"<<=")},ae.simpleTokens={"@":ze.tokens.attr,"{":ze.tokens.brace_left,"}":ze.tokens.brace_right,":":ze.tokens.colon,",":ze.tokens.comma,"(":ze.tokens.paren_left,")":ze.tokens.paren_right,";":ze.tokens.semicolon},ae.literalTokens={"&":ze.tokens.and,"&&":ze.tokens.and_and,"->":ze.tokens.arrow,"/":ze.tokens.forward_slash,"!":ze.tokens.bang,"[":ze.tokens.bracket_left,"]":ze.tokens.bracket_right,"=":ze.tokens.equal,"==":ze.tokens.equal_equal,"!=":ze.tokens.not_equal,">":ze.tokens.greater_than,">=":ze.tokens.greater_than_equal,">>":ze.tokens.shift_right,"<":ze.tokens.less_than,"<=":ze.tokens.less_than_equal,"<<":ze.tokens.shift_left,"%":ze.tokens.modulo,"-":ze.tokens.minus,"--":ze.tokens.minus_minus,".":ze.tokens.period,"+":ze.tokens.plus,"++":ze.tokens.plus_plus,"|":ze.tokens.or,"||":ze.tokens.or_or,"*":ze.tokens.star,"~":ze.tokens.tilde,_:ze.tokens.underscore,"^":ze.tokens.xor,"+=":ze.tokens.plus_equal,"-=":ze.tokens.minus_equal,"*=":ze.tokens.times_equal,"/=":ze.tokens.division_equal,"%=":ze.tokens.modulo_equal,"&=":ze.tokens.and_equal,"|=":ze.tokens.or_equal,"^=":ze.tokens.xor_equal,">>=":ze.tokens.shift_right_equal,"<<=":ze.tokens.shift_left_equal},ae.regexTokens={decimal_float_literal:ze.tokens.decimal_float_literal,hex_float_literal:ze.tokens.hex_float_literal,int_literal:ze.tokens.int_literal,uint_literal:ze.tokens.uint_literal,ident:ze.tokens.ident},ae.storage_class=[ze.keywords.function,ze.keywords.private,ze.keywords.workgroup,ze.keywords.uniform,ze.keywords.storage],ae.access_mode=[ze.keywords.read,ze.keywords.write,ze.keywords.read_write],ae.sampler_type=[ze.keywords.sampler,ze.keywords.sampler_comparison],ae.sampled_texture_type=[ze.keywords.texture_1d,ze.keywords.texture_2d,ze.keywords.texture_2d_array,ze.keywords.texture_3d,ze.keywords.texture_cube,ze.keywords.texture_cube_array],ae.multisampled_texture_type=[ze.keywords.texture_multisampled_2d],ae.storage_texture_type=[ze.keywords.texture_storage_1d,ze.keywords.texture_storage_2d,ze.keywords.texture_storage_2d_array,ze.keywords.texture_storage_3d],ae.depth_texture_type=[ze.keywords.texture_depth_2d,ze.keywords.texture_depth_2d_array,ze.keywords.texture_depth_cube,ze.keywords.texture_depth_cube_array,ze.keywords.texture_depth_multisampled_2d],ae.texture_external_type=[ze.keywords.texture_external],ae.any_texture_type=[...ze.sampled_texture_type,...ze.multisampled_texture_type,...ze.storage_texture_type,...ze.depth_texture_type,...ze.texture_external_type],ae.texel_format=[ze.keywords.r8unorm,ze.keywords.r8snorm,ze.keywords.r8uint,ze.keywords.r8sint,ze.keywords.r16uint,ze.keywords.r16sint,ze.keywords.r16float,ze.keywords.rg8unorm,ze.keywords.rg8snorm,ze.keywords.rg8uint,ze.keywords.rg8sint,ze.keywords.r32uint,ze.keywords.r32sint,ze.keywords.r32float,ze.keywords.rg16uint,ze.keywords.rg16sint,ze.keywords.rg16float,ze.keywords.rgba8unorm,ze.keywords.rgba8unorm_srgb,ze.keywords.rgba8snorm,ze.keywords.rgba8uint,ze.keywords.rgba8sint,ze.keywords.bgra8unorm,ze.keywords.bgra8unorm_srgb,ze.keywords.rgb10a2unorm,ze.keywords.rg11b10float,ze.keywords.rg32uint,ze.keywords.rg32sint,ze.keywords.rg32float,ze.keywords.rgba16uint,ze.keywords.rgba16sint,ze.keywords.rgba16float,ze.keywords.rgba32uint,ze.keywords.rgba32sint,ze.keywords.rgba32float],ae.const_literal=[ze.tokens.int_literal,ze.tokens.uint_literal,ze.tokens.decimal_float_literal,ze.tokens.hex_float_literal,ze.keywords.true,ze.keywords.false],ae.literal_or_ident=[ze.tokens.ident,ze.tokens.int_literal,ze.tokens.uint_literal,ze.tokens.decimal_float_literal,ze.tokens.hex_float_literal,ze.tokens.name],ae.element_c
vendor: 4,515 bytes, lines 144-148
144ount_expression=[ze.tokens.int_literal,ze.tokens.uint_literal,ze.tokens.ident],ae.template_types=[ze.keywords.vec2,ze.keywords.vec3,ze.keywords.vec4,ze.keywords.mat2x2,ze.keywords.mat2x3,ze.keywords.mat2x4,ze.keywords.mat3x2,ze.keywords.mat3x3,ze.keywords.mat3x4,ze.keywords.mat4x2,ze.keywords.mat4x3,ze.keywords.mat4x4,ze.keywords.atomic,ze.keywords.bitcast,...ze.any_texture_type],ae.attribute_name=[ze.tokens.ident,ze.keywords.block,ze.keywords.diagnostic],ae.assignment_operators=[ze.tokens.equal,ze.tokens.plus_equal,ze.tokens.minus_equal,ze.tokens.times_equal,ze.tokens.division_equal,ze.tokens.modulo_equal,ze.tokens.and_equal,ze.tokens.or_equal,ze.tokens.xor_equal,ze.tokens.shift_right_equal,ze.tokens.shift_left_equal],ae.increment_operators=[ze.tokens.plus_plus,ze.tokens.minus_minus];let qk=class{constructor(e,n,r,i,s){this.type=e,this.lexeme=n,this.line=r,this.start=i,this.end=s}toString(){return this.lexeme}isTemplateType(){return ae.template_types.indexOf(this.type)!=-1}isArrayType(){return this.type==ae.keywords.array}isArrayOrTemplateType(){return this.isArrayType()||this.isTemplateType()}},qse=class{constructor(e){this._tokens=[],this._start=0,this._current=0,this._line=1,this._source=e??""}scanTokens(){for(;!this._isAtEnd();)if(this._start=this._current,!this.scanToken())throw`Invalid syntax at line ${this._line}`;return this._tokens.push(new qk(ae.eof,"",this._line,this._current,this._current)),this._tokens}scanToken(){let e=this._advance();if(e==`
145`)return this._line++,!0;if(this._isWhitespace(e))return!0;if(e=="/"){if(this._peekAhead()=="/"){for(;e!=`
146`;){if(this._isAtEnd())return!0;e=this._advance()}return this._line++,!0}if(this._peekAhead()=="*"){this._advance();let o=1;for(;o>0;){if(this._isAtEnd())return!0;if(e=this._advance(),e==`
147`)this._line++;else if(e=="*"){if(this._peekAhead()=="/"&&(this._advance(),o--,o==0))return!0}else e=="/"&&this._peekAhead()=="*"&&(this._advance(),o++)}return!0}}const n=ae.simpleTokens[e];if(n)return this._addToken(n),!0;let r=ae.none;const i=this._isAlpha(e),s=e==="_";if(this._isAlphaNumeric(e)){let o=this._peekAhead();for(;this._isAlphaNumeric(o);)e+=this._advance(),o=this._peekAhead()}if(i){const o=ae.keywords[e];if(o)return this._addToken(o),!0}if(i||s)return this._addToken(ae.tokens.ident),!0;for(;;){let o=this._findType(e);const a=this._peekAhead();if(e=="-"&&this._tokens.length>0){if(a=="=")return this._current++,e+=a,this._addToken(ae.tokens.minus_equal),!0;if(a=="-")return this._current++,e+=a,this._addToken(ae.tokens.minus_minus),!0;const l=this._tokens.length-1;if((ae.literal_or_ident.indexOf(this._tokens[l].type)!=-1||this._tokens[l].type==ae.tokens.paren_right)&&a!=">")return this._addToken(o),!0}if(e==">"&&(a==">"||a=="=")){let l=!1,c=this._tokens.length-1;for(let u=0;u<5&&c>=0&&ae.assignment_operators.indexOf(this._tokens[c].type)===-1;++u,--c)if(this._tokens[c].type===ae.tokens.less_than){c>0&&this._tokens[c-1].isArrayOrTemplateType()&&(l=!0);break}if(l)return this._addToken(o),!0}if(o===ae.none){let l=e,c=0;const u=2;for(let h=0;h<u;++h)if(l+=this._peekAhead(h),o=this._findType(l),o!==ae.none){c=h;break}if(o===ae.none)return r!==ae.none&&(this._current--,this._addToken(r),!0);e=l,this._current+=c+1}if(r=o,this._isAtEnd())break;e+=this._advance()}return r!==ae.none&&(this._addToken(r),!0)}_findType(e){for(const r in ae.regexTokens){const i=ae.regexTokens[r];if(this._match(e,i.rule))return i}return ae.literalTokens[e]||ae.none}_match(e,n){const r=n.exec(e);return r&&r.index==0&&r[0]==e}_isAtEnd(){return this._current>=this._source.length}_isAlpha(e){return!this._isNumeric(e)&&!this._isWhitespace(e)&&e!=="_"&&e!=="."&&e!=="("&&e!==")"&&e!=="["&&e!=="]"&&e!=="{"&&e!=="}"&&e!==","&&e!==";"&&e!==":"&&e!=="="&&e!=="!"&&e!=="<"&&e!==">"&&e!=="+"&&e!=="-"&&e!=="*"&&e!=="/"&&e!=="%"&&e!=="&"&&e!=="|"&&e!=="^"&&e!=="~"&&e!=="@"&&e!=="#"&&e!=="?"&&e!=="'"&&e!=="`"&&e!=='"'&&e!=="\\"&&e!==`
148`&&e!=="\r"&&e!=="	"&&e!=="\0"}_isNumeric(e){return e>="0"&&e<="9"}_isAlphaNumeric(e){return this._isAlpha(e)||this._isNumeric(e)||e==="_"}_isWhitespace(e){return e==" "||e=="	"||e=="\r"}_advance(e=0){let n=this._source[this._current];return e=e||0,e++,this._current+=e,n}_peekAhead(e=0){return e=e||0,this._current+e>=this._source.length?"\0":this._source[this._current+e]}_addToken(e){const n=this._source.substring(this._start,this._current);this._tokens.push(new qk(e,n,this._line,this._start,this._current))}};function pt(t){return Array.isArray(t)||(t==null?void 0:t.buffer)instanceof ArrayBuffer}
148const K_=new Float32Array(1),Qse=new Uint32Array(K_.buffer),Xse=new Uint32Array(K_.buffer),G_=new Int32Array(1),Yse=new Float32Array(G_.buffer),Kse=new Uint32Array(G_.buffer),Z_=new Uint32Array(1),Gse=new Float32Array(Z_.buffer),Zse=new Int32Array(Z_.buffer);function Qk(t,e,n){if(e===n)return t;if(e==="f32"){if(n==="i32"||n==="x32")return K_[0]=t,Qse[0];if(n==="u32")return K_[0]=t,Xse[0]}else if(e==="i32"||e==="x32"){if(n==="f32")return G_[0]=t,Yse[0];if(n==="u32")return G_[0]=t,Kse[0]}else if(e==="u32"){if(n==="f32")return Z_[0]=t,Gse[0];if(n==="i32"||n==="x32")return Z_[0]=t,Zse[0]}return console.error(`Unsupported cast from ${e} to ${n}`),t}let Jse=class{constructor(e){this.resources=null,this.inUse=!1,this.info=null,this.node=e}},cb=class{constructor(e,n){this.align=e,this.size=n}},ev=class D1{constructor(){this.uniforms=[],this.storage=[],this.textures=[],this.samplers=[],this.aliases=[],this.overrides=[],this.structs=[],this.entry=new Dse,this.functions=[],this._types=new Map,this._functions=new Map}_isStorageTexture(e){return e.name=="texture_storage_1d"||e.name=="texture_storage_2d"||e.name=="texture_storage_2d_array"||e.name=="texture_storage_3d"}updateAST(e){for(const n of e)n instanceof yv&&this._functions.set(n.name,new Jse(n));for(const n of e)if(n instanceof xc){const r=this.getTypeInfo(n,null);r instanceof Ku&&this.structs.push(r)}for(const n of e)if(n instanceof iM)this.aliases.push(this._getAliasInfo(n));else{if(n instanceof nM){const r=n,i=this._getAttributeNum(r.attributes,"id",0),s=r.type!=null?this.getTypeInfo(r.type,r.attributes):null;this.overrides.push(new Rse(r.name,s,r.attributes,i));continue}if(this._isUniformVar(n)){const r=n,i=this._getAttributeNum(r.attributes,"group",0),s=this._getAttributeNum(r.attributes,"binding",0),o=this.getTypeInfo(r.type,r.attributes),a=new lb(r.name,o,i,s,r.attributes,Lu.Uniform,r.access);a.access||(a.access="read"),this.uniforms.push(a);continue}if(this._isStorageVar(n)){const r=n,i=this._getAttributeNum(r.attributes,"group",0),s=this._getAttributeNum(r.attributes,"binding",0),o=this.getTypeInfo(r.type,r.attributes),a=this._isStorageTexture(o),l=new lb(r.name,o,i,s,r.attributes,a?Lu.StorageTexture:Lu.Storage,r.access);l.access||(l.access="read"),this.storage.push(l);continue}if(this._isTextureVar(n)){const r=n,i=this._getAttributeNum(r.attributes,"group",0),s=this._getAttributeNum(r.attributes,"binding",0),o=this.getTypeInfo(r.type,r.attributes),a=this._isStorageTexture(o),l=new lb(r.name,o,i,s,r.attributes,a?Lu.StorageTexture:Lu.Texture,r.access);l.access||(l.access="read"),a?this.storage.push(l):this.textures.push(l);continue}if(this._isSamplerVar(n)){const r=n,i=this._getAttributeNum(r.attributes,"group",0),s=this._getAttributeNum(r.attributes,"binding",0),o=this.getTypeInfo(r.type,r.attributes),a=new lb(r.name,o,i,s,r.attributes,Lu.Sampler,r.access);this.samplers.push(a);continue}}for(const n of e)if(n instanceof yv){const r=this._getAttribute(n,"vertex"),i=this._getAttribute(n,"fragment"),s=this._getAttribute(n,"compute"),o=r||i||s,a=new Nse(n.name,o==null?void 0:o.name,n.attributes);a.attributes=n.attributes,a.startLine=n.startLine,a.endLine=n.endLine,this.functions.push(a),this._functions.get(n.name).info=a,o&&(this._functions.get(n.name).inUse=!0,a.inUse=!0,a.resources=this._findResources(n,!!o),a.inputs=this._getInputs(n.args),a.outputs=this._getOutputs(n.returnType),this.entry[o.name].push(a)),a.arguments=n.args.map(l=>new kse(l.name,this.getTypeInfo(l.type,l.attributes),l.attributes)),a.returnType=n.returnType?this.getTypeInfo(n.returnType,n.attributes):null;continue}for(const n of this._functions.values())n.info&&(n.info.inUse=n.inUse,this._addCalls(n.node,n.info.calls));for(const n of this._functions.values())n.node.search(r=>{var i,s,o;if(r instanceof k$){if(r.value)if(pt(r.value))for(const a of r.value)for(const l of this.overrides)a===l.name&&((i=n.info)===null||i===void 0||i.overrides.push(l));else for(const a of this.overrides)r.value===a.name&&((s=n.info)===null||s===void 0||s.overrides.push(a))}else if(r instanceof ro)for(const a of this.overrides)r.name===a.name&&((o=n.info)===null||o===void 0||o.overrides.push(a))});for(const n of this.uniforms)this._markStructsInUse(n.type);for(const n of this.storage)this._markStructsInUse(n.type)}getFunctionInfo(e){for(const n of this.functions)if(n.name==e)return n;return null}getStructInfo(e){for(const n of this.structs)if(n.name==e)return n;return null}getOverrideInfo(e){for(const n of this.overrides)if(n.name==e)return n;return null}_markStructsInUse(e){if(e)if(e.isStruct){if(e.inUse=!0,e.members)for(const n of e.members)this._markStructsInUse(n.type)}else if(e.isArray)this._markStructsInUse(e.format);else if(e.isTemplate)e.format&&this._markStructsInUse(e.format);else{const n=this._getAlias(e.name);n&&this._markStructsInUse(n)}}_addCalls(e,n){var r;for(const i of e.calls){const s=(r=this._functions.get(i.name))===null||r===void 0?void 0:r.info;s&&n.add(s)}}findResource(e,n,r){if(r){for(const i of this.entry.compute)if(i.name===r){for(const s of i.resources)if(s.group==e&&s.binding==n)return s}for(const i of this.entry.vertex)if(i.name===r){for(const s of i.resources)if(s.group==e&&s.binding==n)return s}for(const i of this.entry.fragment)if(i.name===r){for(const s of i.resources)if(s.group==e&&s.binding==n)return s}}for(const i of this.uniforms)if(i.group==e&&i.binding==n)return i;for(const i of this.storage)if(i.group==e&&i.binding==n)return i;for(const i of this.textures)if(i.group==e&&i.binding==n)return i;for(const i of this.samplers)if(i.group==e&&i.binding==n)return i;return null}_findResource(e){for(const n of this.uniforms)if(n.name==e)return n;for(const n of this.storage)if(n.name==e)return n;for(const n of this.textures)if(n.name==e)return n;for(const n of this.samplers)if(n.name==e)return n;return null}_markStructsFromAST(e){const n=this.getTypeInfo(e,null);this._markStructsInUse(n)}_findResources(e,n){const r=[],i=this,s=[];return e.search(o=>{if(o instanceof X_)s.push({});else if(o instanceof Y_)s.pop();else if(o instanceof Ec){const a=o;n&&a.type!==null&&this._markStructsFromAST(a.type),s.length>0&&(s[s.length-1][a.name]=a)}else if(o instanceof ml){const a=o;n&&a.type!==null&&this._markStructsFromAST(a.type)}else if(o instanceof Z1){const a=o;n&&a.type!==null&&this._markStructsFromAST(a.type),s.length>0&&(s[s.length-1][a.name]=a)}else if(o instanceof ro){const a=o;if(s.length>0&&s[s.length-1][a.name])return;const l=i._findResource(a.name);l&&r.push(l)}else if(o instanceof sM){const a=o,l=i._functions.get(a.name);l&&(n&&(l.inUse=!0),e.calls.add(l.node),l.resources===null&&(l.resources=i._findResources(l.node,n)),r.push(...l.resources))}else if(o instanceof rM){const a=o,l=i._functions.get(a.name);l&&(n&&(l.inUse=!0),e.calls.add(l.node),l.resources===null&&(l.resources=i._findResources(l.node,n)),r.push(...l.resources))}}),[...new Map(r.map(o=>[o.name,o])).values()]}getBindGroups(){const e=[];function n(r,i){r>=e.length&&(e.length=r+1),e[r]===void 0&&(e[r]=[]),i>=e[r].length&&(e[r].length=i+1)}for(const r of this.uniforms)n(r.group,r.binding),e[r.group][r.binding]=r;for(const r of this.storage)n(r.group,r.binding),e[r.group][r.binding]=r;for(const r of this.textures)n(r.group,r.binding),e[r.group][r.binding]=r;for(const r of this.samplers)n(r.group,r.binding),e[r.group][r.binding]=r;return e}_getOutputs(e,n=void 0){if(n===void 0&&(n=[]),e instanceof xc)this._getStructOutputs(e,n);else{const r=this._getOutputInfo(e);r!==null&&n.push(r)}return n}_getStructOutputs(e,n){for(const r of e.members)if(r.type instanceof xc)this._getStructOutputs(r.type,n);else{const i=this._getAttribute(r,"location")||this._getAttribute(r,"builtin");if(i!==null){const s=this.getTypeInfo(r.type,r.type.attributes),o=this._parseInt(i.value),a=new jk(r.name,s,i.name,o);n.push(a)}}}_getOutputInfo(e){const n=this._getAttribute(e,"location")||this._getAttribute(e,"builtin");if(n!==null){const r=this.getTypeInfo(e,e.attributes),i=this._parseInt(n.value);return new jk("",r,n.name,i)}return null}
vendor: 4,319 bytes, line 148
148_getInputs(e,n=void 0){n===void 0&&(n=[]);for(const r of e)if(r.type instanceof xc)this._getStructInputs(r.type,n);else{const i=this._getInputInfo(r);i!==null&&n.push(i)}return n}_getStructInputs(e,n){for(const r of e.members)if(r.type instanceof xc)this._getStructInputs(r.type,n);else{const i=this._getInputInfo(r);i!==null&&n.push(i)}}_getInputInfo(e){const n=this._getAttribute(e,"location")||this._getAttribute(e,"builtin");if(n!==null){const r=this._getAttribute(e,"interpolation"),i=this.getTypeInfo(e.type,e.attributes),s=this._parseInt(n.value),o=new Mse(e.name,i,n.name,s);return r!==null&&(o.interpolation=this._parseString(r.value)),o}return null}_parseString(e){return e instanceof Array&&(e=e[0]),e}_parseInt(e){e instanceof Array&&(e=e[0]);const n=parseInt(e);return isNaN(n)?e:n}_getAlias(e){for(const n of this.aliases)if(n.name==e)return n.type;return null}_getAliasInfo(e){return new Ose(e.name,this.getTypeInfo(e.type,null))}getTypeInfoByName(e){for(const n of this.structs)if(n.name==e)return n;for(const n of this.aliases)if(n.name==e)return n.type;return null}getTypeInfo(e,n=null){if(this._types.has(e))return this._types.get(e);if(e instanceof f_){const i=e.type?this.getTypeInfo(e.type,e.attributes):null,s=new uP(e.name,i,n);return this._types.set(e,s),this._updateTypeInfo(s),s}if(e instanceof J1){const i=e,s=i.format?this.getTypeInfo(i.format,i.attributes):null,o=new nf(i.name,n);return o.format=s,o.count=i.count,this._types.set(e,o),this._updateTypeInfo(o),o}if(e instanceof xc){const i=e,s=new Ku(i.name,n);s.startLine=i.startLine,s.endLine=i.endLine;for(const o of i.members){const a=this.getTypeInfo(o.type,o.attributes);s.members.push(new zk(o.name,a,o.attributes))}return this._types.set(e,s),this._updateTypeInfo(s),s}if(e instanceof R1){const i=e,s=i.format instanceof rt,o=i.format?s?this.getTypeInfo(i.format,null):new Uo(i.format,null):null,a=new Yh(i.name,o,n,i.access);return this._types.set(e,a),this._updateTypeInfo(a),a}if(e instanceof Be){const i=e,s=i.format?this.getTypeInfo(i.format,null):null,o=new Yh(i.name,s,n,i.access);return this._types.set(e,o),this._updateTypeInfo(o),o}const r=new Uo(e.name,n);return this._types.set(e,r),this._updateTypeInfo(r),r}_updateTypeInfo(e){var n,r,i;const s=this._getTypeSize(e);if(e.size=(n=s==null?void 0:s.size)!==null&&n!==void 0?n:0,e instanceof nf&&e.format){const o=this._getTypeSize(e.format);e.stride=Math.max((r=o==null?void 0:o.size)!==null&&r!==void 0?r:0,(i=o==null?void 0:o.align)!==null&&i!==void 0?i:0),this._updateTypeInfo(e.format)}e instanceof uP&&this._updateTypeInfo(e.format),e instanceof Ku&&this._updateStructInfo(e)}_updateStructInfo(e){var n;let r=0,i=0,s=0,o=0;for(let a=0,l=e.members.length;a<l;++a){const c=e.members[a],u=this._getTypeSize(c);if(!u)continue;(n=this._getAlias(c.type.name))!==null&&n!==void 0||c.type;const h=u.align,d=u.size;r=this._roundUp(h,r+i),i=d,s=r,o=Math.max(o,h),c.offset=r,c.size=d,this._updateTypeInfo(c.type)}e.size=this._roundUp(o,s+i),e.align=o}_getTypeSize(e){var n,r;if(e==null)return null;const i=this._getAttributeNum(e.attributes,"size",0),s=this._getAttributeNum(e.attributes,"align",0);if(e instanceof zk&&(e=e.type),e instanceof Uo){const o=this._getAlias(e.name);o!==null&&(e=o)}{const o=D1._typeInfo[e.name];if(o!==void 0){const a=((n=e.format)===null||n===void 0?void 0:n.name)==="f16"?2:1;return new cb(Math.max(s,o.align/a),Math.max(i,o.size/a))}}{const o=D1._typeInfo[e.name.substring(0,e.name.length-1)];if(o){const a=e.name[e.name.length-1]==="h"?2:1;return new cb(Math.max(s,o.align/a),Math.max(i,o.size/a))}}if(e instanceof nf){let o=e,a=8,l=8;const c=this._getTypeSize(o.format);return c!==null&&(l=c.size,a=c.align),l=o.count*this._getAttributeNum((r=e==null?void 0:e.attributes)!==null&&r!==void 0?r:null,"stride",this._roundUp(a,l)),i&&(l=i),new cb(Math.max(s,a),Math.max(i,l))}if(e instanceof Ku){let o=0,a=0,l=0,c=0,u=0;for(const h of e.members){const d=this._getTypeSize(h.type);d!==null&&(o=Math.max(d.align,o),l=this._roundUp(d.align,l+c),c=d.size,u=l)}return a=this._roundUp(o,u+c),new cb(Math.max(s,o),Math.max(i,a))}return null}_isUniformVar(e){return e instanceof Ec&&e.storage=="uniform"}_isStorageVar(e){return e instanceof Ec&&e.storage=="storage"}_isTextureVar(e){return e instanceof Ec&&e.type!==null&&D1._textureTypes.indexOf(e.type.n
148ame)!=-1}_isSamplerVar(e){return e instanceof Ec&&e.type!==null&&D1._samplerTypes.indexOf(e.type.name)!=-1}_getAttribute(e,n){const r=e;if(!r||!r.attributes)return null;const i=r.attributes;for(let s of i)if(s.name==n)return s;return null}_getAttributeNum(e,n,r){if(e===null)return r;for(let i of e)if(i.name==n){let s=i!==null&&i.value!==null?i.value:r;return s instanceof Array&&(s=s[0]),typeof s=="number"?s:typeof s=="string"?parseInt(s):r}return r}_roundUp(e,n){return Math.ceil(n/e)*e}};ev._typeInfo={f16:{align:2,size:2},i32:{align:4,size:4},u32:{align:4,size:4},f32:{align:4,size:4},atomic:{align:4,size:4},vec2:{align:8,size:8},vec3:{align:16,size:12},vec4:{align:16,size:16},mat2x2:{align:8,size:16},mat3x2:{align:8,size:24},mat4x2:{align:8,size:32},mat2x3:{align:16,size:32},mat3x3:{align:16,size:48},mat4x3:{align:16,size:64},mat2x4:{align:16,size:32},mat3x4:{align:16,size:48},mat4x4:{align:16,size:64}},ev._textureTypes=ae.any_texture_type.map(t=>t.name),ev._samplerTypes=ae.sampler_type.map(t=>t.name);let oM=0,eoe=class B${constructor(e,n,r){this.id=oM++,this.name=e,this.value=n,this.node=r}clone(){return new B$(this.name,this.value,this.node)}},toe=class L${constructor(e){this.id=oM++,this.name=e.name,this.node=e}clone(){return new L$(this.node)}},noe=class F${constructor(e){this.parent=null,this.variables=new Map,this.functions=new Map,this.currentFunctionName="",this.id=oM++,e&&(this.parent=e,this.currentFunctionName=e.currentFunctionName)}getVariable(e){var n;return this.variables.has(e)?(n=this.variables.get(e))!==null&&n!==void 0?n:null:this.parent?this.parent.getVariable(e):null}getFunction(e){var n;return this.functions.has(e)?(n=this.functions.get(e))!==null&&n!==void 0?n:null:this.parent?this.parent.getFunction(e):null}createVariable(e,n,r){this.variables.set(e,new eoe(e,n,r??null))}setVariable(e,n,r){const i=this.getVariable(e);i!==null?i.value=n:this.createVariable(e,n,r)}getVariableValue(e){var n;const r=this.getVariable(e);return(n=r==null?void 0:r.value)!==null&&n!==void 0?n:null}clone(){return new F$(this)}},roe=class{evalExpression(e,n){return null}getTypeInfo(e){return null}getVariableName(e,n){return""}},ioe=class{constructor(e){this.exec=e}getTypeInfo(e){return this.exec.getTypeInfo(e)}All(e,n){const r=this.exec.evalExpression(e.args[0],n);let i=!0;if(r instanceof ge)return r.data.forEach(s=>{s||(i=!1)}),new De(i?1:0,this.getTypeInfo("bool"));throw new Error(`All() expects a vector argument. Line ${e.line}`)}Any(e,n){const r=this.exec.evalExpression(e.args[0],n);if(r instanceof ge){const i=r.data.some(s=>s);return new De(i?1:0,this.getTypeInfo("bool"))}throw new Error(`Any() expects a vector argument. Line ${e.line}`)}Select(e,n){const r=this.exec.evalExpression(e.args[2],n);if(!(r instanceof De))throw new Error(`Select() expects a bool condition. Line ${e.line}`);return r.value?this.exec.evalExpression(e.args[1],n):this.exec.evalExpression(e.args[0],n)}ArrayLength(e,n){let r=e.args[0];r instanceof kr&&(r=r.right);const i=this.exec.evalExpression(r,n);if(i instanceof li&&i.typeInfo.size===0){const s=i.typeInfo,o=i.buffer.byteLength/s.stride;return new De(o,this.getTypeInfo("u32"))}return new De(i.typeInfo.size,this.getTypeInfo("u32"))}Abs(e,n){const r=this.exec.evalExpression(e.args[0],n);if(r instanceof ge)return new ge(r.data.map(s=>Math.abs(s)),r.typeInfo);const i=r;return new De(Math.abs(i.value),i.typeInfo)}Acos(e,n){const r=this.exec.evalExpression(e.args[0],n);if(r instanceof ge)return new ge(r.data.map(s=>Math.acos(s)),r.typeInfo);const i=r;return new De(Math.acos(i.value),r.typeInfo)}Acosh(e,n){const r=this.exec.evalExpression(e.args[0],n);if(r instanceof ge)return new ge(r.data.map(s=>Math.acosh(s)),r.typeInfo);const i=r;return new De(Math.acosh(i.value),r.typeInfo)}Asin(e,n){const r=this.exec.evalExpression(e.args[0],n);if(r instanceof ge)return new ge(r.data.map(s=>Math.asin(s)),r.typeInfo);const i=r;return new De(Math.asin(i.value),r.typeInfo)}Asinh(e,n){const r=this.exec.evalExpression(e.args[0],n);if(r instanceof ge)return new ge(r.data.map(s=>Math.asinh(s)),r.typeInfo);const i=r;return new De(Math.asinh(i.value),r.typeInfo)}Atan(e,n){const r=this.exec.evalExpression(e.args[0],n);if(r instanceof ge)return new ge(r.data.map(s=>Math.atan(s)),r.typeInfo);const i=r;return new De(Math.atan(i.value),r.typeInfo)}Atanh(e,n){const r=this.exec.evalExpression(e.args[0],n);if(r instanceof ge)return new ge(r.data.map(s=>Math.atanh(s)),r.typeInfo);const i=r;return new De(Math.atanh(i.value),r.typeInfo)}Atan2(e,n){const r=this.exec.evalExpression(e.args[0],n),i=this.exec.evalExpression(e.args[1],n);if(r instanceof ge&&i instanceof ge)return new ge(r.data.map((a,l)=>Math.atan2(a,i.data[l])),r.typeInfo);const s=r,o=i;return new De(Math.atan2(s.value,o.value),r.typeInfo)}Ceil(e,n){const r=this.exec.evalExpression(e.args[0],n);if(r instanceof ge)return new ge(r.data.map(s=>Math.ceil(s)),r.typeInfo);const i=r;return new De(Math.ceil(i.value),r.typeInfo)}_clamp(e,n,r){return Math.min(Math.max(e,n),r)}Clamp(e,n){const r=this.exec.evalExpression(e.args[0],n),i=this.exec.evalExpression(e.args[1],n),s=this.exec.evalExpression(e.args[2],n);if(r instanceof ge&&i instanceof ge&&s instanceof ge)return new ge(r.data.map((c,u)=>this._clamp(c,i.data[u],s.data[u])),r.typeInfo);const o=r,a=i,l=s;return new De(this._clamp(o.value,a.value,l.value),r.typeInfo)}Cos(e,n){const r=this.exec.evalExpression(e.args[0],n);if(r instanceof ge)return new ge(r.data.map(s=>Math.cos(s)),r.typeInfo);const i=r;return new De(Math.cos(i.value),r.typeInfo)}Cosh(e,n){const r=this.exec.evalExpression(e.args[0],n);if(r instanceof ge)return new ge(r.data.map(s=>Math.cosh(s)),r.typeInfo);const i=r;return new De(Math.cos(i.value),r.typeInfo)}CountLeadingZeros(e,n){const r=this.exec.evalExpression(e.args[0],n);if(r instanceof ge)return new ge(r.data.map(s=>Math.clz32(s)),r.typeInfo);const i=r;return new De(Math.clz32(i.value),r.typeInfo)}_countOneBits(e){let n=0;for(;e!==0;)1&e&&n++,e>>=1;return n}
148CountOneBits(e,n){const r=this.exec.evalExpression(e.args[0],n);if(r instanceof ge)return new ge(r.data.map(s=>this._countOneBits(s)),r.typeInfo);const i=r;return new De(this._countOneBits(i.value),r.typeInfo)}_countTrailingZeros(e){if(e===0)return 32;let n=0;for(;!(1&e);)e>>=1,n++;return n}CountTrailingZeros(e,n){const r=this.exec.evalExpression(e.args[0],n);if(r instanceof ge)return new ge(r.data.map(s=>this._countTrailingZeros(s)),r.typeInfo);const i=r;return new De(this._countTrailingZeros(i.value),r.typeInfo)}Cross(e,n){const r=this.exec.evalExpression(e.args[0],n),i=this.exec.evalExpression(e.args[1],n);if(r instanceof ge&&i instanceof ge){if(r.data.length!==3||i.data.length!==3)return console.error(`Cross() expects 3D vectors. Line ${e.line}`),null;const s=r.data,o=i.data;return new ge([s[1]*o[2]-o[1]*s[2],s[2]*o[0]-o[2]*s[0],s[0]*o[1]-o[0]*s[1]],r.typeInfo)}return console.error(`Cross() expects vector arguments. Line ${e.line}`),null}Degrees(e,n){const r=this.exec.evalExpression(e.args[0],n),i=180/Math.PI;return r instanceof ge?new ge(r.data.map(s=>s*i),r.typeInfo):new De(r.value*i,this.getTypeInfo("f32"))}Determinant(e,n){const r=this.exec.evalExpression(e.args[0],n);if(r instanceof jt){const i=r.data,s=r.typeInfo.getTypeName(),o=s.endsWith("h")?this.getTypeInfo("f16"):this.getTypeInfo("f32");if(s==="mat2x2"||s==="mat2x2f"||s==="mat2x2h")return new De(i[0]*i[3]-i[1]*i[2],o);if(s==="mat2x3"||s==="mat2x3f"||s==="mat2x3h")return new De(i[0]*(i[4]*i[8]-i[5]*i[7])-i[1]*(i[3]*i[8]-i[5]*i[6])+i[2]*(i[3]*i[7]-i[4]*i[6]),o);if(s==="mat2x4"||s==="mat2x4f"||s==="mat2x4h")console.error(`TODO: Determinant for ${s}`);else if(s==="mat3x2"||s==="mat3x2f"||s==="mat3x2h")console.error(`TODO: Determinant for ${s}`);else{if(s==="mat3x3"||s==="mat3x3f"||s==="mat3x3h")return new De(i[0]*(i[4]*i[8]-i[5]*i[7])-i[1]*(i[3]*i[8]-i[5]*i[6])+i[2]*(i[3]*i[7]-i[4]*i[6]),o);s==="mat3x4"||s==="mat3x4f"||s==="mat3x4h"||s==="mat4x2"||s==="mat4x2f"||s==="mat4x2h"||s==="mat4x3"||s==="mat4x3f"||s==="mat4x3h"?console.error(`TODO: Determinant for ${s}`):s!=="mat4x4"&&s!=="mat4x4f"&&s!=="mat4x4h"||console.error(`TODO: Determinant for ${s}`)}}return console.error(`Determinant expects a matrix argument. Line ${e.line}`),null}Distance(e,n){const r=this.exec.evalExpression(e.args[0],n),i=this.exec.evalExpression(e.args[1],n);if(r instanceof ge&&i instanceof ge){let a=0;for(let l=0;l<r.data.length;++l)a+=(r.data[l]-i.data[l])*(r.data[l]-i.data[l]);return new De(Math.sqrt(a),this.getTypeInfo("f32"))}const s=r,o=i;return new De(Math.abs(s.value-o.value),r.typeInfo)}_dot(e,n){let r=0;for(let i=0;i<e.length;++i)r+=n[i]*e[i];return r}Dot(e,n){const r=this.exec.evalExpression(e.args[0],n),i=this.exec.evalExpression(e.args[1],n);return r instanceof ge&&i instanceof ge?new De(this._dot(r.data,i.data),this.getTypeInfo("f32")):(console.error(`Dot() expects vector arguments. Line ${e.line}`),null)}Dot4U8Packed(e,n){return console.error(`TODO: dot4U8Packed. Line ${e.line}`),null}Dot4I8Packed(e,n){return console.error(`TODO: dot4I8Packed. Line ${e.line}`),null}
148Exp(e,n){const r=this.exec.evalExpression(e.args[0],n);if(r instanceof ge)return new ge(r.data.map(s=>Math.exp(s)),r.typeInfo);const i=r;return new De(Math.exp(i.value),r.typeInfo)}Exp2(e,n){const r=this.exec.evalExpression(e.args[0],n);if(r instanceof ge)return new ge(r.data.map(s=>Math.pow(2,s)),r.typeInfo);const i=r;return new De(Math.pow(2,i.value),r.typeInfo)}ExtractBits(e,n){const r=this.exec.evalExpression(e.args[0],n),i=this.exec.evalExpression(e.args[1],n),s=this.exec.evalExpression(e.args[2],n);if(i.typeInfo.name!=="u32"&&i.typeInfo.name!=="x32")return console.error(`ExtractBits() expects an i32 offset argument. Line ${e.line}`),null;if(s.typeInfo.name!=="u32"&&s.typeInfo.name!=="x32")return console.error(`ExtractBits() expects an i32 count argument. Line ${e.line}`),null;const o=i.value,a=s.value;if(r instanceof ge)return new ge(r.data.map(c=>c>>o&(1<<a)-1),r.typeInfo);if(r.typeInfo.name!=="i32"&&r.typeInfo.name!=="x32")return console.error(`ExtractBits() expects an i32 argument. Line ${e.line}`),null;const l=r.value;return new De(l>>o&(1<<a)-1,this.getTypeInfo("i32"))}FaceForward(e,n){const r=this.exec.evalExpression(e.args[0],n),i=this.exec.evalExpression(e.args[1],n),s=this.exec.evalExpression(e.args[2],n);if(r instanceof ge&&i instanceof ge&&s instanceof ge){const o=this._dot(i.data,s.data);return new ge(o<0?Array.from(r.data):r.data.map(a=>-a),r.typeInfo)}return console.error(`FaceForward() expects vector arguments. Line ${e.line}`),null}_firstLeadingBit(e){return e===0?-1:31-Math.clz32(e)}FirstLeadingBit(e,n){const r=this.exec.evalExpression(e.args[0],n);if(r instanceof ge)return new ge(r.data.map(s=>this._firstLeadingBit(s)),r.typeInfo);const i=r;return new De(this._firstLeadingBit(i.value),r.typeInfo)}_firstTrailingBit(e){return e===0?-1:Math.log2(e&-e)}FirstTrailingBit(e,n){const r=this.exec.evalExpression(e.args[0],n);if(r instanceof ge)return new ge(r.data.map(s=>this._firstTrailingBit(s)),r.typeInfo);const i=r;return new De(this._firstTrailingBit(i.value),r.typeInfo)}Floor(e,n){const r=this.exec.evalExpression(e.args[0],n);if(r instanceof ge)return new ge(r.data.map(s=>Math.floor(s)),r.typeInfo);const i=r;return new De(Math.floor(i.value),r.typeInfo)}Fma(e,n){const r=this.exec.evalExpression(e.args[0],n),i=this.exec.evalExpression(e.args[1],n),s=this.exec.evalExpression(e.args[2],n);if(r instanceof ge&&i instanceof ge&&s instanceof ge)return r.data.length!==i.data.length||r.data.length!==s.data.length?(console.error(`Fma() expects vectors of the same length. Line ${e.line}`),null):new ge(r.data.map((c,u)=>c*i.data[u]+s.data[u]),r.typeInfo);const o=r,a=i,l=s;return new De(o.value*a.value+l.value,o.typeInfo)}Fract(e,n){const r=this.exec.evalExpression(e.args[0],n);if(r instanceof ge)return new ge(r.data.map(s=>s-Math.floor(s)),r.typeInfo);const i=r;return new De(i.value-Math.floor(i.value),r.typeInfo)}Frexp(e,n){return console.error(`TODO: frexp. Line ${e.line}`),null}InsertBits(e,n){const r=this.exec.evalExpression(e.args[0],n),i=this.exec.evalExpression(e.args[1],n),s=this.exec.evalExpression(e.args[2],n),o=this.exec.evalExpression(e.args[3],n);if(s.typeInfo.name!=="u32"&&s.typeInfo.name!=="x32")return console.error(`InsertBits() expects an i32 offset argument. Line ${e.line}`),null;const a=s.value,l=(1<<o.value)-1<<a,c=~l;if(r instanceof ge&&i instanceof ge)return new ge(r.data.map((d,m)=>d&c|i.data[m]<<a&l),r.typeInfo);const u=r.value,h=i.value;return new De(u&c|h<<a&l,r.typeInfo)}InverseSqrt(e,n){const r=this.exec.evalExpression(e.args[0],n);if(r instanceof ge)return new ge(r.data.map(s=>1/Math.sqrt(s)),r.typeInfo);const i=r;return new De(1/Math.sqrt(i.value),r.typeInfo)}Ldexp(e,n){return console.error(`TODO: ldexp. Line ${e.line}`),null}Length(e,n){const r=this.exec.evalExpression(e.args[0],n);if(r instanceof ge){let s=0;return r.data.forEach(o=>{s+=o*o}),new De(Math.sqrt(s),this.getTypeInfo("f32"))}const i=r;return new De(Math.abs(i.value),r.typeInfo)}Log(e,n){const r=this.exec.evalExpression(e.args[0],n);if(r instanceof ge)return new ge(r.data.map(s=>Math.log(s)),r.typeInfo);const i=r;return new De(Math.log(i.value),r.typeInfo)}Log2(e,n){const r=this.exec.evalExpression(e.args[0],n);if(r instanceof ge)return new ge(r.data.map(s=>Math.log2(s)),r.typeInfo);const i=r;return new De(Math.log2(i.value),r.typeInfo)}Max(e,n){const r=this.exec.evalExpression(e.args[0],n),i=this.exec.evalExpression(e.args[1],n);if(r instanceof ge&&i instanceof ge)return new ge(r.data.map((a,l)=>Math.max(a,i.data[l])),r.typeInfo);const s=r,o=i;return new De(Math.max(s.value,o.value),r.typeInfo)}Min(e,n){const r=this.exec.evalExpression(e.args[0],n),i=this.exec.evalExpression(e.args[1],n);if(r instanceof ge&&i instanceof ge)return new ge(r.data.map((a,l)=>Math.min(a,i.data[l])),r.typeInfo);const s=r,o=i;return new De(Math.min(s.value,o.value),r.typeInfo)}
148Mix(e,n){const r=this.exec.evalExpression(e.args[0],n),i=this.exec.evalExpression(e.args[1],n),s=this.exec.evalExpression(e.args[2],n);if(r instanceof ge&&i instanceof ge&&s instanceof ge)return new ge(r.data.map((l,c)=>r.data[c]*(1-s.data[c])+i.data[c]*s.data[c]),r.typeInfo);const o=i,a=s;return new De(r.value*(1-a.value)+o.value*a.value,r.typeInfo)}Modf(e,n){const r=this.exec.evalExpression(e.args[0],n),i=this.exec.evalExpression(e.args[1],n);if(r instanceof ge&&i instanceof ge)return new ge(r.data.map((o,a)=>o%i.data[a]),r.typeInfo);const s=i;return new De(r.value%s.value,r.typeInfo)}Normalize(e,n){const r=this.exec.evalExpression(e.args[0],n);if(r instanceof ge){const i=this.Length(e,n).value;return new ge(r.data.map(s=>s/i),r.typeInfo)}return console.error(`Normalize() expects a vector argument. Line ${e.line}`),null}Pow(e,n){const r=this.exec.evalExpression(e.args[0],n),i=this.exec.evalExpression(e.args[1],n);if(r instanceof ge&&i instanceof ge)return new ge(r.data.map((a,l)=>Math.pow(a,i.data[l])),r.typeInfo);const s=r,o=i;return new De(Math.pow(s.value,o.value),r.typeInfo)}QuantizeToF16(e,n){const r=this.exec.evalExpression(e.args[0],n);return r instanceof ge?new ge(r.data.map(i=>i),r.typeInfo):new De(r.value,r.typeInfo)}Radians(e,n){const r=this.exec.evalExpression(e.args[0],n);return r instanceof ge?new ge(r.data.map(i=>i*Math.PI/180),r.typeInfo):new De(r.value*Math.PI/180,this.getTypeInfo("f32"))}Reflect(e,n){let r=this.exec.evalExpression(e.args[0],n),i=this.exec.evalExpression(e.args[1],n);if(r instanceof ge&&i instanceof ge){const s=this._dot(r.data,i.data);return new ge(r.data.map((o,a)=>o-2*s*i.data[a]),r.typeInfo)}return console.error(`Reflect() expects vector arguments. Line ${e.line}`),null}Refract(e,n){let r=this.exec.evalExpression(e.args[0],n),i=this.exec.evalExpression(e.args[1],n),s=this.exec.evalExpression(e.args[2],n);if(r instanceof ge&&i instanceof ge&&s instanceof De){const o=this._dot(i.data,r.data);return new ge(r.data.map((a,l)=>{const c=1-s.value*s.value*(1-o*o);if(c<0)return 0;const u=Math.sqrt(c);return s.value*a-(s.value*o+u)*i.data[l]}),r.typeInfo)}return console.error(`Refract() expects vector arguments and a scalar argument. Line ${e.line}`),null}ReverseBits(e,n){return console.error(`TODO: reverseBits. Line ${e.line}`),null}Round(e,n){const r=this.exec.evalExpression(e.args[0],n);if(r instanceof ge)return new ge(r.data.map(s=>Math.round(s)),r.typeInfo);const i=r;return new De(Math.round(i.value),r.typeInfo)}Saturate(e,n){const r=this.exec.evalExpression(e.args[0],n);if(r instanceof ge)return new ge(r.data.map(s=>Math.min(Math.max(s,0),1)),r.typeInfo);const i=r;return new De(Math.min(Math.max(i.value,0),1),r.typeInfo)}Sign(e,n){const r=this.exec.evalExpression(e.args[0],n);if(r instanceof ge)return new ge(r.data.map(s=>Math.sign(s)),r.typeInfo);const i=r;return new De(Math.sign(i.value),r.typeInfo)}Sin(e,n){const r=this.exec.evalExpression(e.args[0],n);if(r instanceof ge)return new ge(r.data.map(s=>Math.sin(s)),r.typeInfo);const i=r;return new De(Math.sin(i.value),r.typeInfo)}Sinh(e,n){const r=this.exec.evalExpression(e.args[0],n);if(r instanceof ge)return new ge(r.data.map(s=>Math.sinh(s)),r.typeInfo);const i=r;return new De(Math.sinh(i.value),r.typeInfo)}_smoothstep(e,n,r){const i=Math.min(Math.max((r-e)/(n-e),0),1);return i*i*(3-2*i)}SmoothStep(e,n){const r=this.exec.evalExpression(e.args[0],n),i=this.exec.evalExpression(e.args[1],n),s=this.exec.evalExpression(e.args[2],n);if(s instanceof ge&&r instanceof ge&&i instanceof ge)return new ge(s.data.map((c,u)=>this._smoothstep(r.data[u],i.data[u],c)),s.typeInfo);const o=r,a=i,l=s;return new De(this._smoothstep(o.value,a.value,l.value),s.typeInfo)}Sqrt(e,n){const r=this.exec.evalExpression(e.args[0],n);if(r instanceof ge)return new ge(r.data.map(s=>Math.sqrt(s)),r.typeInfo);const i=r;return new De(Math.sqrt(i.value),r.typeInfo)}Step(e,n){const r=this.exec.evalExpression(e.args[0],n),i=this.exec.evalExpression(e.args[1],n);if(i instanceof ge&&r instanceof ge)return new ge(i.data.map((o,a)=>o<r.data[a]?0:1),i.typeInfo);const s=r;return new De(i.value<s.value?0:1,s.typeInfo)}Tan(e,n){const r=this.exec.evalExpression(e.args[0],n);if(r instanceof ge)return new ge(r.data.map(s=>Math.tan(s)),r.typeInfo);const i=r;return new De(Math.tan(i.value),r.typeInfo)}Tanh(e,n){const r=this.exec.evalExpression(e.args[0],n);if(r instanceof ge)return new ge(r.data.map(s=>Math.tanh(s)),r.typeInfo);const i=r;return new De(Math.tanh(i.value),r.typeInfo)}_getTransposeType(e){const n=e.getTypeName();return n==="mat2x2f"||n==="mat2x2h"?e:n==="mat2x3f"?this.getTypeInfo("mat3x2f"):n==="mat2x3h"?this.getTypeInfo("mat3x2h"):n==="mat2x4f"?this.getTypeInfo("mat4x2f"):n==="mat2x4h"?this.getTypeInfo("mat4x2h"):n==="mat3x2f"?this.getTypeInfo("mat2x3f"):n==="mat3x2h"?this.getTypeInfo("mat2x3h"):n==="mat3x3f"||n==="mat3x3h"?e:n==="mat3x4f"?this.getTypeInfo("mat4x3f"):n==="mat3x4h"?this.getTypeInfo("mat4x3h"):n==="mat4x2f"?this.getTypeInfo("mat2x4f"):n==="mat4x2h"?this.getTypeInfo("mat2x4h"):n==="mat4x3f"?this.getTypeInfo("mat3x4f"):n==="mat4x3h"?this.getTypeInfo("mat3x4h"):(n==="mat4x4f"||n==="mat4x4h"||console.error(`Invalid matrix type ${n}`),e)}Transpose(e,n){const r=this.exec.evalExpression(e.args[0],n);if(!(r instanceof jt))return console.error(`Transpose() expects a matrix argument. Line ${e.line}`),null;const i=this._getTransposeType(r.typeInfo);if(r.typeInfo.name==="mat2x2"||r.typeInfo.name==="mat2x2f"||r.typeInfo.name==="mat2x2h"){const s=r.data;return new jt([s[0],s[2],s[1],s[3]],i)}if(r.typeInfo.name==="mat2x3"||r.typeInfo.name==="mat2x3f"||r.typeInfo.name==="mat2x3h"){const s=r.data;return new jt([s[0],s[3],s[6],s[1],s[4],s[7]],i)}if(r.typeInfo.name==="mat2x4"||r.typeInfo.name==="mat2x4f"||r.typeInfo.name==="mat2x4h"){const s=r.data;return new jt([s[0],s[4],s[8],s[12],s[1],s[5],s[9],s[13]],i)}if(r.typeInfo.name==="mat3x2"||r.typeInfo.name==="mat3x2f"||r.typeInfo.name==="mat3x2h"){const s=r.data;return new jt([s[0],s[3],s[1],s[4],s[2],s[5]],i)}if(r.typeInfo.name==="mat3x3"||r.typeInfo.name==="mat3x3f"||r.typeInfo.name==="mat3x3h"){const s=r.data;return new jt([s[0],s[3],s[6],s[1],s[4],s[7],s[2],s[5],s[8]],i)}if(r.typeInfo.name==="mat3x4"||r.typeInfo.name==="mat3x4f"||r.typeInfo.name==="mat3x4h"){const s=r.data;return new jt([s[0],s[4],s[8],s[12],s[1],s[5],s[9],s[13],s[2],s[6],s[10],s[14]],i)}if(r.typeInfo.name==="mat4x2"||r.typeInfo.name==="mat4x2f"||r.typeInfo.name==="mat4x2h"){const s=r.data;return new jt([s[0],s[4],s[1],s[5],s[2],s[6]],i)}if(r.typeInfo.name==="mat4x3"||r.typeInfo.name==="mat4x3f"||r.typeInfo.name==="mat4x3h"){const s=r.data;return new jt([s[0],s[4],s[8],s[1],s[5],s[9],s[2],s[6],s[10]],i)}if(r.typeInfo.name==="mat4x4"||r.typeInfo.name==="mat4x4f"||r.typeInfo.name==="mat4x4h"){const s=r.data;return new jt([s[0],s[4],s[8],s[12],s[1],s[5],s[9],s[13],s[2],s[6],s[10],s[14],s[3],s[7],s[11],s[15]],i)}return console.error(`Invalid matrix type ${r.typeInfo.name}`),null}Trunc(e,n){const r=this.exec.evalExpression(e.args[0],n);if(r instanceof ge)return new ge(r.data.map(s=>Math.trunc(s)),r.typeInfo);const i=r;return new De(Math.trunc(i.value),r.typeInfo)}Dpdx(e,n){return console.error(`TODO: dpdx. Line ${e.line}`),null}DpdxCoarse(e,n){return console.error(`TODO: dpdxCoarse. Line ${e.line}`),null}DpdxFine(e,n){return console.error("TODO: dpdxFine"),null}Dpdy(e,n){return console.error("TODO: dpdy"),null}DpdyCoarse(e,n){return console.error("TODO: dpdyCoarse"),null}DpdyFine(e,n){return console.error("TODO: dpdyFine"),null}Fwidth(e,n){return console.error("TODO: fwidth"),null}FwidthCoarse(e,n){return console.error("TODO: fwidthCoarse"),null}FwidthFine(e,n){return console.error("TODO: fwidthFine"),null}TextureDimensions(e,n){const r=e.args[0],i=e.args.length>1?this.exec.evalExpression(e.args[1],n).value:0;if(r instanceof ro){const s=r.name,o=n.getVariableValue(s);if(o instanceof _h){if(i<0||i>=o.mipLevelCount)return console.error(`Invalid mip level for textureDimensions. Line ${e.line}`),null;const a=o.getMipLevelSize(i),l=o.dimension;return l==="1d"?new De(a[0],this.getTypeInfo("u32")):l==="3d"?new ge(a,this.getTypeInfo("vec3u")):l==="2d"?new ge(a.slice(0,2),this.getTypeInfo("vec2u")):(console.error(`Invalid texture dimension ${l} not found. Line ${e.line}`),null)}return console.error(`Texture ${s} not found. Line ${e.line}`),null}return console.error(`Invalid texture argument for textureDimensions. Line ${e.line}`),null}TextureGather(e,n){return console.error("TODO: textureGather"),null}TextureGatherCompare(e,n){return console.error("TODO: textureGatherCompare"),null}TextureLoad(e,n){const r=e.args[0],i=this.exec.evalExpression(e.args[1],n),s=e.args.length>2?this.exec.evalExpression(e.args[2],n).value:0;if(!(i instanceof ge)||i.data.length!==2)return console.error(`Invalid UV argument for textureLoad. Line ${e.line}`),null;if(r instanceof ro){const o=r.name,a=n.getVariableValue(o);if(a instanceof _h){const l=Math.floor(i.data[0]),c=Math.floor(i.data[1]);if(l<0||l>=a.width||c<0||c>=a.height)return console.error(`Texture ${o} out of bounds. Line ${e.line}`),null;const u=a.getPixel(l,c,0,s);return u===null?(console.error(`Invalid texture format for textureLoad. Line ${e.line}`),null):new ge(u,this.getTypeInfo("vec4f"))}return console.error(`Texture ${o} not found. Line ${e.line}`),null}return console.error(`Invalid texture argument for textureLoad. Line ${e.line}`),null}TextureNumLayers(e,n){const r=e.args[0];if(r instanceof ro){const i=r.name,s=n.getVariableValue(i);return s instanceof _h?new De(s.depthOrArrayLayers,this.getTypeInfo("u32")):(console.error(`Texture ${i} not found. Line ${e.line}`),null)}return console.error(`Invalid texture argument for textureNumLayers. Line ${e.line}`),null}TextureNumLevels(e,n){const r=e.args[0];if(r instanceof ro){const i=r.name,s=n.getVariableValue(i);return s instanceof _h?new De(s.mipLevelCount,this.getTypeInfo("u32")):(console.error(`Texture ${i} not found. Line ${e.line}`),null)}return console.error(`Invalid texture argument for textureNumLevels. Line ${e.line}`),null}TextureNumSamples(e,n){const r=e.args[0];if(r instanceof ro){const i=r.name,s=n.getVariableValue(i);return s instanceof _h?new De(s.sampleCount,this.getTypeInfo("u32")):(console.error(`Texture ${i} not found. Line ${e.line}`),null)}return console.error(`Invalid texture argument for textureNumSamples. Line ${e.line}`),null}TextureSample(e,n){return console.error("TODO: textureSample"),null}TextureSampleBias(e,n){return console.error("TODO: textureSampleBias"),null}TextureSampleCompare(e,n){return console.error("TODO: textureSampleCompare"),null}TextureSampleCompareLevel(e,n){return console.error("TODO: textureSampleCompareLevel"),null}
148TextureSampleGrad(e,n){return console.error("TODO: textureSampleGrad"),null}TextureSampleLevel(e,n){return console.error("TODO: textureSampleLevel"),null}TextureSampleBaseClampToEdge(e,n){return console.error("TODO: textureSampleBaseClampToEdge"),null}TextureStore(e,n){const r=e.args[0],i=this.exec.evalExpression(e.args[1],n),s=e.args.length===4?this.exec.evalExpression(e.args[2],n).value:0,o=e.args.length===4?this.exec.evalExpression(e.args[3],n).data:this.exec.evalExpression(e.args[2],n).data;if(o.length!==4)return console.error(`Invalid value argument for textureStore. Line ${e.line}`),null;if(!(i instanceof ge)||i.data.length!==2)return console.error(`Invalid UV argument for textureStore. Line ${e.line}`),null;if(r instanceof ro){const a=r.name,l=n.getVariableValue(a);if(l instanceof _h){const c=l.getMipLevelSize(0),u=Math.floor(i.data[0]),h=Math.floor(i.data[1]);return u<0||u>=c[0]||h<0||h>=c[1]?(console.error(`Texture ${a} out of bounds. Line ${e.line}`),null):(l.setPixel(u,h,0,s,Array.from(o)),null)}return console.error(`Texture ${a} not found. Line ${e.line}`),null}return console.error(`Invalid texture argument for textureStore. Line ${e.line}`),null}AtomicLoad(e,n){let r=e.args[0];r instanceof kr&&(r=r.right);const i=this.exec.getVariableName(r,n);return n.getVariable(i).value.getSubData(this.exec,r.postfix,n)}AtomicStore(e,n){let r=e.args[0];r instanceof kr&&(r=r.right);const i=this.exec.getVariableName(r,n),s=n.getVariable(i);let o=e.args[1];const a=this.exec.evalExpression(o,n),l=s.value.getSubData(this.exec,r.postfix,n);return l instanceof De&&a instanceof De&&(l.value=a.value),s.value instanceof li&&s.value.setDataValue(this.exec,l,r.postfix,n),null}AtomicAdd(e,n){let r=e.args[0];r instanceof kr&&(r=r.right);const i=this.exec.getVariableName(r,n),s=n.getVariable(i);let o=e.args[1];const a=this.exec.evalExpression(o,n),l=s.value.getSubData(this.exec,r.postfix,n),c=new De(l.value,l.typeInfo);return l instanceof De&&a instanceof De&&(l.value+=a.value),s.value instanceof li&&s.value.setDataValue(this.exec,l,r.postfix,n),c}AtomicSub(e,n){let r=e.args[0];r instanceof kr&&(r=r.right);const i=this.exec.getVariableName(r,n),s=n.getVariable(i);let o=e.args[1];const a=this.exec.evalExpression(o,n),l=s.value.getSubData(this.exec,r.postfix,n),c=new De(l.value,l.typeInfo);return l instanceof De&&a instanceof De&&(l.value-=a.value),s.value instanceof li&&s.value.setDataValue(this.exec,l,r.postfix,n),c}AtomicMax(e,n){let r=e.args[0];r instanceof kr&&(r=r.right);const i=this.exec.getVariableName(r,n),s=n.getVariable(i);let o=e.args[1];const a=this.exec.evalExpression(o,n),l=s.value.getSubData(this.exec,r.postfix,n),c=new De(l.value,l.typeInfo);return l instanceof De&&a instanceof De&&(l.value=Math.max(l.value,a.value)),s.value instanceof li&&s.value.setDataValue(this.exec,l,r.postfix,n),c}AtomicMin(e,n){let r=e.args[0];r instanceof kr&&(r=r.right);const i=this.exec.getVariableName(r,n),s=n.getVariable(i);let o=e.args[1];const a=this.exec.evalExpression(o,n),l=s.value.getSubData(this.exec,r.postfix,n),c=new De(l.value,l.typeInfo);return l instanceof De&&a instanceof De&&(l.value=Math.min(l.value,a.value)),s.value instanceof li&&s.value.setDataValue(this.exec,l,r.postfix,n),c}AtomicAnd(e,n){let r=e.args[0];r instanceof kr&&(r=r.right);const i=this.exec.getVariableName(r,n),s=n.getVariable(i);let o=e.args[1];const a=this.exec.evalExpression(o,n),l=s.value.getSubData(this.exec,r.postfix,n),c=new De(l.value,l.typeInfo);return l instanceof De&&a instanceof De&&(l.value=l.value&a.value),s.value instanceof li&&s.value.setDataValue(this.exec,l,r.postfix,n),c}AtomicOr(e,n){let r=e.args[0];r instanceof kr&&(r=r.right);const i=this.exec.getVariableName(r,n),s=n.getVariable(i);let o=e.args[1];const a=this.exec.evalExpression(o,n),l=s.value.getSubData(this.exec,r.postfix,n),c=new De(l.value,l.typeInfo);return l instanceof De&&a instanceof De&&(l.value=l.value|a.value),s.value instanceof li&&s.value.setDataValue(this.exec,l,r.postfix,n),c}AtomicXor(e,n){let r=e.args[0];r instanceof kr&&(r=r.right);const i=this.exec.getVariableName(r,n),s=n.getVariable(i);let o=e.args[1];const a=this.exec.evalExpression(o,n),l=s.value.getSubData(this.exec,r.postfix,n),c=new De(l.value,l.typeInfo);return l instanceof De&&a instanceof De&&(l.value=l.value^a.value),s.value instanceof li&&s.value.setDataValue(this.exec,l,r.postfix,n),c}AtomicExchange(e,n){let r=e.args[0];r instanceof kr&&(r=r.right);const i=this.exec.getVariableName(r,n),s=n.getVariable(i);let o=e.args[1];const a=this.exec.evalExpression(o,n),l=s.value.getSubData(this.exec,r.postfix,n),c=new De(l.value,l.typeInfo);return l instanceof De&&a instanceof De&&(l.value=a.value),s.value instanceof li&&s.value.setDataValue(this.exec,l,r.postfix,n),c}AtomicCompareExchangeWeak(e,n){return console.error("TODO: atomicCompareExchangeWeak"),null}Pack4x8snorm(e,n){return console.error("TODO: pack4x8snorm"),null}Pack4x8unorm(e,n){return console.error("TODO: pack4x8unorm"),null}Pack4xI8(e,n){return console.error("TODO: pack4xI8"),null}Pack4xU8(e,n){return console.error("TODO: pack4xU8"),null}Pack4x8Clamp(e,n){return console.error("TODO: pack4x8Clamp"),null}Pack4xU8Clamp(e,n){return console.error("TODO: pack4xU8Clamp"),null}Pack2x16snorm(e,n){return console.error("TODO: pack2x16snorm"),null}Pack2x16unorm(e,n){return console.error("TODO: pack2x16unorm"),null}Pack2x16float(e,n){return console.error("TODO: pack2x16float"),null}Unpack4x8snorm(e,n){return console.error("TODO: unpack4x8snorm"),null}Unpack4x8unorm(e,n){return console.error("TODO: unpack4x8unorm"),null}Unpack4xI8(e,n){return console.error("TODO: unpack4xI8"),null}Unpack4xU8(e,n){return console.error("TODO: unpack4xU8"),null}Unpack2x16snorm(e,n){return console.error("TODO: unpack2x16snorm"),null}Unpack2x16unorm(e,n){return console.error("TODO: unpack2x16unorm"),null}Unpack2x16float(e,n){return console.error("TODO: unpack2x16float"),null}StorageBarrier(e,n){return null}TextureBarrier(e,n){return null}WorkgroupBarrier(e,n){return null}WorkgroupUniformLoad(e,n){return null}SubgroupAdd(e,n){return console.error("TODO: subgroupAdd"),null}SubgroupExclusiveAdd(e,n){return console.error("TODO: subgroupExclusiveAdd"),null}SubgroupInclusiveAdd(e,n){return console.error("TODO: subgroupInclusiveAdd"),null}SubgroupAll(e,n){return console.error("TODO: subgroupAll"),null}SubgroupAnd(e,n){return console.error("TODO: subgroupAnd"),null}SubgroupAny(e,n){return console.error("TODO: subgroupAny"),null}SubgroupBallot(e,n){return console.error("TODO: subgroupBallot"),null}SubgroupBroadcast(e,n){return console.error("TODO: subgroupBroadcast"),null}SubgroupBroadcastFirst(e,n){return console.error("TODO: subgroupBroadcastFirst"),null}SubgroupElect(e,n){return console.error("TODO: subgroupElect"),null}SubgroupMax(e,n){return console.error("TODO: subgroupMax"),null}SubgroupMin(e,n){return console.error("TODO: subgroupMin"),null}SubgroupMul(e,n){return console.error("TODO: subgroupMul"),null}SubgroupExclusiveMul(e,n){return console.error("TODO: subgroupExclusiveMul"),null}SubgroupInclusiveMul(e,n){return console.error("TODO: subgroupInclusiveMul"),null}SubgroupOr(e,n){return console.error("TODO: subgroupOr"),null}SubgroupShuffle(e,n){return console.error("TODO: subgroupShuffle"),null}SubgroupShuffleDown(e,n){return console.error("TODO: subgroupShuffleDown"),null}
148SubgroupShuffleUp(e,n){return console.error("TODO: subgroupShuffleUp"),null}SubgroupShuffleXor(e,n){return console.error("TODO: subgroupShuffleXor"),null}SubgroupXor(e,n){return console.error("TODO: subgroupXor"),null}QuadBroadcast(e,n){return console.error("TODO: quadBroadcast"),null}QuadSwapDiagonal(e,n){return console.error("TODO: quadSwapDiagonal"),null}QuadSwapX(e,n){return console.error("TODO: quadSwapX"),null}QuadSwapY(e,n){return console.error("TODO: quadSwapY"),null}};const oE={vec2:2,vec2f:2,vec2i:2,vec2u:2,vec2b:2,vec2h:2,vec3:3,vec3f:3,vec3i:3,vec3u:3,vec3b:3,vec3h:3,vec4:4,vec4f:4,vec4i:4,vec4u:4,vec4b:4,vec4h:4},os={mat2x2:[2,2,4],mat2x2f:[2,2,4],mat2x2h:[2,2,4],mat2x3:[2,3,6],mat2x3f:[2,3,6],mat2x3h:[2,3,6],mat2x4:[2,4,8],mat2x4f:[2,4,8],mat2x4h:[2,4,8],mat3x2:[3,2,6],mat3x2f:[3,2,6],mat3x2h:[3,2,6],mat3x3:[3,3,9],mat3x3f:[3,3,9],mat3x3h:[3,3,9],mat3x4:[3,4,12],mat3x4f:[3,4,12],mat3x4h:[3,4,12],mat4x2:[4,2,8],mat4x2f:[4,2,8],mat4x2h:[4,2,8],mat4x3:[4,3,12],mat4x3f:[4,3,12],mat4x3h:[4,3,12],mat4x4:[4,4,16],mat4x4f:[4,4,16],mat4x4h:[4,4,16]};let p_=class ko extends roe{constructor(e,n){var r;super(),this.ast=e??[],this.reflection=new ev,this.reflection.updateAST(this.ast),this.context=(r=n==null?void 0:n.clone())!==null&&r!==void 0?r:new noe,this.builtins=new ioe(this),this.typeInfo={bool:this.getTypeInfo(rt.bool),i32:this.getTypeInfo(rt.i32),u32:this.getTypeInfo(rt.u32),f32:this.getTypeInfo(rt.f32),f16:this.getTypeInfo(rt.f16),vec2f:this.getTypeInfo(Be.vec2f),vec2u:this.getTypeInfo(Be.vec2u),vec2i:this.getTypeInfo(Be.vec2i),vec2h:this.getTypeInfo(Be.vec2h),vec3f:this.getTypeInfo(Be.vec3f),vec3u:this.getTypeInfo(Be.vec3u),vec3i:this.getTypeInfo(Be.vec3i),vec3h:this.getTypeInfo(Be.vec3h),vec4f:this.getTypeInfo(Be.vec4f),vec4u:this.getTypeInfo(Be.vec4u),vec4i:this.getTypeInfo(Be.vec4i),vec4h:this.getTypeInfo(Be.vec4h),mat2x2f:this.getTypeInfo(Be.mat2x2f),mat2x3f:this.getTypeInfo(Be.mat2x3f),mat2x4f:this.getTypeInfo(Be.mat2x4f),mat3x2f:this.getTypeInfo(Be.mat3x2f),mat3x3f:this.getTypeInfo(Be.mat3x3f),mat3x4f:this.getTypeInfo(Be.mat3x4f),mat4x2f:this.getTypeInfo(Be.mat4x2f),mat4x3f:this.getTypeInfo(Be.mat4x3f),mat4x4f:this.getTypeInfo(Be.mat4x4f)}}getVariableValue(e){var n,r;const i=(r=(n=this.context.getVariable(e))===null||n===void 0?void 0:n.value)!==null&&r!==void 0?r:null;if(i===null)return null;if(i instanceof De)return i.value;if(i instanceof ge||i instanceof jt)return Array.from(i.data);if(i instanceof li&&i.typeInfo instanceof nf){if(i.typeInfo.format.name==="u32")return Array.from(new Uint32Array(i.buffer,i.offset,i.typeInfo.count));if(i.typeInfo.format.name==="i32")return Array.from(new Int32Array(i.buffer,i.offset,i.typeInfo.count));if(i.typeInfo.format.name==="f32")return Array.from(new Float32Array(i.buffer,i.offset,i.typeInfo.count))}return console.error(`Unsupported return variable type ${i.typeInfo.name}`),null}execute(e){(e=e??{}).constants&&this._setOverrides(e.constants,this.context),this._execStatements(this.ast,this.context)}dispatchWorkgroups(e,n,r,i){const s=this.context.clone();(i=i??{}).constants&&this._setOverrides(i.constants,s),this._execStatements(this.ast,s);const o=s.getFunction(e);if(!o)return void console.error(`Function ${e} not found`);if(typeof n=="number")n=[n,1,1];else{if(n.length===0)return void console.error("Invalid dispatch count");n.length===1?n=[n[0],1,1]:n.length===2?n=[n[0],n[1],1]:n.length>3&&(n=[n[0],n[1],n[2]])}const a=n[0],l=n[1],c=n[2],u=this.getTypeInfo("vec3u");s.setVariable("@num_workgroups",new ge(n,u));const h=this.reflection.getFunctionInfo(e);h===null&&console.error(`Function ${e} not found in reflection data`);for(const d in r)for(const m in r[d]){const y=r[d][m];
148s.variables.forEach(v=>{var b;const x=v.node;if(x!=null&&x.attributes){let T=null,E=null;for(const C of x.attributes)C.name==="binding"?T=C.value:C.name==="group"&&(E=C.value);if(m==T&&d==E){let C=!1;for(const I of h.resources)if(I.name===v.name&&I.group===parseInt(d)&&I.binding===parseInt(m)){C=!0;break}if(C)if(y.texture!==void 0&&y.descriptor!==void 0){const I=new _h(y.texture,this.getTypeInfo(x.type),y.descriptor,(b=y.texture.view)!==null&&b!==void 0?b:null);v.value=I}else y.uniform!==void 0?v.value=new li(y.uniform,this.getTypeInfo(x.type)):v.value=new li(y,this.getTypeInfo(x.type))}}})}for(let d=0;d<c;++d)for(let m=0;m<l;++m)for(let y=0;y<a;++y)s.setVariable("@workgroup_id",new ge([y,m,d],this.getTypeInfo("vec3u"))),this._dispatchWorkgroup(o,[y,m,d],s)}execStatement(e,n){if(e instanceof A$)return this.evalExpression(e.value,n);if(e instanceof S$){if(e.condition){const r=this.evalExpression(e.condition,n);if(!(r instanceof De))throw new Error("Invalid break-if condition");if(!r.value)return null}return ko._breakObj}if(e instanceof T$)return ko._continueObj;if(e instanceof Z1)this._let(e,n);else if(e instanceof Ec)this._var(e,n);else if(e instanceof c_)this._const(e,n);else if(e instanceof yv)this._function(e,n);else{if(e instanceof x$)return this._if(e,n);if(e instanceof w$)return this._switch(e,n);if(e instanceof v$)return this._for(e,n);if(e instanceof m$)return this._while(e,n);if(e instanceof _$)return this._loop(e,n);if(e instanceof fP){const r=n.clone();return r.currentFunctionName=n.currentFunctionName,this._execStatements(e.body,r)}if(e instanceof b$)this._assign(e,n);else if(e instanceof y$)this._increment(e,n);else{if(e instanceof xc)return null;if(e instanceof nM){const r=e.name;n.getVariable(r)===null&&n.setVariable(r,new De(0,this.getTypeInfo("u32")))}else if(e instanceof rM)this._call(e,n);else{if(e instanceof E$||e instanceof iM)return null;console.error("Invalid statement type.",e,`Line ${e.line}`)}}}return null}evalExpression(e,n){return e instanceof ga?this._evalBinaryOp(e,n):e instanceof qr?this._evalLiteral(e,n):e instanceof ro?this._evalVariable(e,n):e instanceof sM?this._evalCall(e,n):e instanceof ml?this._evalCreate(e,n):e instanceof C$?this._evalConst(e,n):e instanceof P$?this._evalBitcast(e,n):e instanceof kr?this._evalUnaryOp(e,n):(console.error("Invalid expression type",e,`Line ${e.line}`),null)}getTypeInfo(e){var n;if(e instanceof rt){const i=this.reflection.getTypeInfo(e);if(i!==null)return i}let r=(n=this.typeInfo[e])!==null&&n!==void 0?n:null;return r!==null||(r=this.reflection.getTypeInfoByName(e)),r}_setOverrides(e,n){for(const r in e){const i=e[r],s=this.reflection.getOverrideInfo(r);s!==null?(s.type===null&&(s.type=this.getTypeInfo("u32")),s.type.name==="u32"||s.type.name==="i32"||s.type.name==="f32"||s.type.name==="f16"?n.setVariable(r,new De(i,s.type)):s.type.name==="bool"?n.setVariable(r,new De(i?1:0,s.type)):s.type.name==="vec2"||s.type.name==="vec3"||s.type.name==="vec4"||s.type.name==="vec2f"||s.type.name==="vec3f"||s.type.name==="vec4f"||s.type.name==="vec2i"||s.type.name==="vec3i"||s.type.name==="vec4i"||s.type.name==="vec2u"||s.type.name==="vec3u"||s.type.name==="vec4u"||s.type.name==="vec2h"||s.type.name==="vec3h"||s.type.name==="vec4h"?n.setVariable(r,new ge(i,s.type)):console.error(`Invalid constant type for ${r}`)):console.error(`Override ${r} does not exist in the shader.`)}}_dispatchWorkgroup(e,n,r){const i=[1,1,1];for(const u of e.node.attributes)if(u.name==="workgroup_size"){if(u.value.length>0){const h=r.getVariableValue(u.value[0]);i[0]=h instanceof De?h.value:parseInt(u.value[0])}if(u.value.length>1){const h=r.getVariableValue(u.value[1]);i[1]=h instanceof De?h.value:parseInt(u.value[1])}if(u.value.length>2){const h=r.getVariableValue(u.value[2]);i[2]=h instanceof De?h.value:parseInt(u.value[2])}}const s=this.getTypeInfo("vec3u"),o=this.getTypeInfo("u32");r.setVariable("@workgroup_size",new ge(i,s));const a=i[0],l=i[1],c=i[2];for(let u=0,h=0;u<c;++u)for(let d=0;d<l;++d)for(let m=0;m<a;++m,++h){const y=[m,d,u],v=[m+n[0]*i[0],d+n[1]*i[1],u+n[2]*i[2]];r.setVariable("@local_invocation_id",new ge(y,s)),r.setVariable("@global_invocation_id",new ge(v,s)),r.setVariable("@local_invocation_index",new De(h,o)),this._dispatchExec(e,r)}}_dispatchExec(e,n){for(const r of e.node.args)for(const i of r.attributes)if(i.name==="builtin"){const s=`@${i.value}`,o=n.getVariable(s);o!==void 0&&n.variables.set(r.name,o)}this._execStatements(e.node.body,n)}getVariableName(e,n){for(;e instanceof kr;)e=e.right;return e instanceof ro?e.name:(console.error("Unknown variable type",e,"Line",e.line),null)}_execStatements(e,n){for(const r of e){if(r instanceof Array){const s=n.clone(),o=this._execStatements(r,s);if(o)return o;continue}
148const i=this.execStatement(r,n);if(i)return i}return null}_call(e,n){const r=n.clone();r.currentFunctionName=e.name;const i=n.getFunction(e.name);if(i){for(let s=0;s<i.node.args.length;++s){const o=i.node.args[s],a=this.evalExpression(e.args[s],r);r.setVariable(o.name,a,o)}this._execStatements(i.node.body,r)}else e.isBuiltin?this._callBuiltinFunction(e,r):this.getTypeInfo(e.name)&&this._evalCreate(e,n)}_increment(e,n){const r=this.getVariableName(e.variable,n),i=n.getVariable(r);i?e.operator==="++"?i.value instanceof De?i.value.value++:console.error(`Variable ${r} is not a scalar. Line ${e.line}`):e.operator==="--"?i.value instanceof De?i.value.value--:console.error(`Variable ${r} is not a scalar. Line ${e.line}`):console.error(`Unknown increment operator ${e.operator}. Line ${e.line}`):console.error(`Variable ${r} not found. Line ${e.line}`)}_getVariableData(e,n){if(e instanceof ro){const r=this.getVariableName(e,n),i=n.getVariable(r);return i===null?(console.error(`Variable ${r} not found. Line ${e.line}`),null):i.value.getSubData(this,e.postfix,n)}if(e instanceof kr){if(e.operator==="*"){const r=this._getVariableData(e.right,n);return r instanceof tg?r.reference.getSubData(this,e.postfix,n):(console.error(`Variable ${e.right} is not a pointer. Line ${e.line}`),null)}if(e.operator==="&"){const r=this._getVariableData(e.right,n);return new tg(r)}}return null}_assign(e,n){let r=null,i="<var>",s=null;if(e.variable instanceof kr){const l=this._getVariableData(e.variable,n),c=this.evalExpression(e.value,n),u=e.operator;if(u==="="){if(l instanceof De||l instanceof ge||l instanceof jt){if(c instanceof De||c instanceof ge||c instanceof jt&&l.data.length===c.data.length)return void l.data.set(c.data);console.error(`Invalid assignment. Line ${e.line}`)}else if(l instanceof li&&c instanceof li&&l.buffer.byteLength-l.offset>=c.buffer.byteLength-c.offset)return void(l.buffer.byteLength%4==0?new Uint32Array(l.buffer,l.offset,l.typeInfo.size/4).set(new Uint32Array(c.buffer,c.offset,c.typeInfo.size/4)):new Uint8Array(l.buffer,l.offset,l.typeInfo.size).set(new Uint8Array(c.buffer,c.offset,c.typeInfo.size)));return console.error(`Invalid assignment. Line ${e.line}`),null}if(u==="+=")return l instanceof De||l instanceof ge||l instanceof jt?c instanceof De||c instanceof ge||c instanceof jt?void l.data.set(c.data.map((h,d)=>l.data[d]+h)):void console.error(`Invalid assignment . Line ${e.line}`):void console.error(`Invalid assignment. Line ${e.line}`);if(u==="-=")return(l instanceof De||l instanceof ge||l instanceof jt)&&(c instanceof De||c instanceof ge||c instanceof jt)?void l.data.set(c.data.map((h,d)=>l.data[d]-h)):void console.error(`Invalid assignment. Line ${e.line}`)}if(e.variable instanceof kr){if(e.variable.operator==="*"){i=this.getVariableName(e.variable.right,n);const l=n.getVariable(i);if(!(l&&l.value instanceof tg))return void console.error(`Variable ${i} is not a pointer. Line ${e.line}`);r=l.value.reference;let c=e.variable.postfix;if(!c){let u=e.variable.right;for(;u instanceof kr;){if(u.postfix){c=u.postfix;break}u=u.right}}c&&(r=r.getSubData(this,c,n))}}else{s=e.variable.postfix,i=this.getVariableName(e.variable,n);const l=n.getVariable(i);if(l===null)return void console.error(`Variable ${i} not found. Line ${e.line}`);r=l.value}if(r instanceof tg&&(r=r.reference),r===null)return void console.error(`Variable ${i} not found. Line ${e.line}`);const o=this.evalExpression(e.value,n),a=e.operator;if(a!=="="){const l=r.getSubData(this,s,n);if(l instanceof ge&&o instanceof De){const c=l.data,u=o.value;if(a==="+=")for(let h=0;h<c.length;++h)c[h]+=u;else if(a==="-=")for(let h=0;h<c.length;++h)c[h]-=u;else if(a==="*=")for(let h=0;h<c.length;++h)c[h]*=u;else if(a==="/=")for(let h=0;h<c.length;++h)c[h]/=u;else if(a==="%=")for(let h=0;h<c.length;++h)c[h]%=u;else if(a==="&=")for(let h=0;h<c.length;++h)c[h]&=u;else if(a==="|=")for(let h=0;h<c.length;++h)c[h]|=u;else if(a==="^=")for(let h=0;h<c.length;++h)c[h]^=u;else if(a==="<<=")for(let h=0;h<c.length;++h)c[h]<<=u;else if(a===">>=")for(let h=0;h<c.length;++h)c[h]>>=u;else console.error(`Invalid operator ${a}. Line ${e.line}`)}else if(l instanceof ge&&o instanceof ge){const c=l.data,u=o.data;if(c.length!==u.length)return void console.error(`Vector length mismatch. Line ${e.line}`);if(a==="+=")for(let h=0;h<c.length;++h)c[h]+=u[h];else if(a==="-=")for(let h=0;h<c.length;++h)c[h]-=u[h];else if(a==="*=")for(let h=0;h<c.length;++h)c[h]*=u[h];else if(a==="/=")for(let h=0;h<c.length;++h)c[h]/=u[h];else if(a==="%=")for(let h=0;h<c.length;++h)c[h]%=u[h];else if(a==="&=")for(let h=0;h<c.length;++h)c[h]&=u[h];else if(a==="|=")for(let h=0;h<c.length;++h)c[h]|=u[h];else if(a==="^=")for(let h=0;h<c.length;++h)c[h]^=u[h];else if(a==="<<=")for(let h=0;h<c.length;++h)c[h]<<=u[h];else if(a===">>=")for(let h=0;h<c.length;++h)c[h]>>=u[h];else console.error(`Invalid operator ${a}. Line ${e.line}`)}else{if(!(l instanceof De&&o instanceof De))return void console.error(`Invalid type for ${e.operator} operator. Line ${e.line}`);a==="+="?l.value+=o.value:a==="-="?l.value-=o.value:a==="*="?l.value*=o.value:a==="/="?l.value/=o.value:a==="%="?l.value%=o.value:a==="&="?l.value&=o.value:a==="|="?l.value|=o.value:a==="^="?l.value^=o.value:a==="<<="?l.value<<=o.value:a===">>="?l.value>>=o.value:console.error(`Invalid operator ${a}. Line ${e.line}`)}return void(r instanceof li&&r.setDataValue(this,l,s,n))}if(r instanceof li)r.setDataValue(this,o,s,n);else if(s){if(!(r instanceof ge||r instanceof jt))return void console.error(`Variable ${i} is not a vector or matrix. Line ${e.line}`);if(s instanceof Kg){const l=this.evalExpression(s.index,n).value;if(r instanceof ge){if(!(o instanceof De))return void console.error(`Invalid assignment to ${i}. Line ${e.line}`);r.data[l]=o.value}else{if(!(r instanceof jt))return void console.error(`Invalid assignment to ${i}. Line ${e.line}`);{const c=this.evalExpression(s.index,n).value;if(c<0)return void console.error(`Invalid assignment to ${i}. Line ${e.line}`);if(!(o instanceof ge))return void console.error(`Invalid assignment to ${i}. Line ${e.line}`);{const u=r.typeInfo.getTypeName();if(u==="mat2x2"||u==="mat2x2f"||u==="mat2x2h"){if(!(c<2&&o.data.length===2))return void console.error(`Invalid assignment to ${i}. Line ${e.line}`);r.data[2*c]=o.data[0],r.data[2*c+1]=o.data[1]}else if(u==="mat2x3"||u==="mat2x3f"||u==="mat2x3h"){if(!(c<2&&o.data.length===3))return void console.error(`Invalid assignment to ${i}. Line ${e.line}`);r.data[3*c]=o.data[0],r.data[3*c+1]=o.data[1],r.data[3*c+2]=o.data[2]}else if(u==="mat2x4"||u==="mat2x4f"||u==="mat2x4h"){if(!(c<2&&o.data.length===4))return void console.error(`Invalid assignment to ${i}. Line ${e.line}`);r.data[4*c]=o.data[0],r.data[4*c+1]=o.data[1],r.data[4*c+2]=o.data[2],r.data[4*c+3]=o.data[3]}else if(u==="mat3x2"||u==="mat3x2f"||u==="mat3x2h"){if(!(c<3&&o.data.length===2))return void console.error(`Invalid assignment to ${i}. Line ${e.line}`);r.data[2*c]=o.data[0],r.data[2*c+1]=o.data[1]}else if(u==="mat3x3"||u==="mat3x3f"||u==="mat3x3h"){if(!(c<3&&o.data.length===3))return void console.error(`Invalid assignment to ${i}. Line ${e.line}`);r.data[3*c]=o.data[0],r.data[3*c+1]=o.data[1],r.data[3*c+2]=o.data[2]}else if(u==="mat3x4"||u==="mat3x4f"||u==="mat3x4h"){if(!(c<3&&o.data.length===4))return void console.error(`Invalid assignment to ${i}. Line ${e.line}`);r.data[4*c]=o.data[0],r.data[4*c+1]=o.data[1],r.data[4*c+2]=o.data[2],r.data[4*c+3]=o.data[3]}else if(u==="mat4x2"||u==="mat4x2f"||u==="mat4x2h"){if(!(c<4&&o.data.length===2))return void console.error(`Invalid assignment to ${i}. Line ${e.line}`);r.data[2*c]=o.data[0],r.data[2*c+1]=o.data[1]}else if(u==="mat4x3"||u==="mat4x3f"||u==="mat4x3h"){if(!(c<4&&o.data.length===3))return void console.error(`Invalid assignment to ${i}. Line ${e.line}`);r.data[3*c]=o.data[0],r.data[3*c+1]=o.data[1],r.data[3*c+2]=o.data[2]}else{if(u!=="mat4x4"&&u!=="mat4x4f"&&u!=="mat4x4h")return void console.error(`Invalid assignment to ${i}. Line ${e.line}`);if(!(c<4&&o.data.length===4))return void console.error(`Invalid assignment to ${i}. Line ${e.line}`);r.data[4*c]=o.data[0],r.data[4*c+1]=o.data[1],r.data[4*c+2]=o.data[2],r.data[4*c+3]=o.data[3]}}}}}else if(s instanceof Kh){const l=s.value;if(!(r instanceof ge))return void console.error(`Invalid assignment to ${l}
148. Variable ${i} is not a vector. Line ${e.line}`);if(o instanceof De){if(l.length>1)return void console.error(`Invalid assignment to ${l} for variable ${i}. Line ${e.line}`);if(l==="x")r.data[0]=o.value;else if(l==="y"){if(r.data.length<2)return void console.error(`Invalid assignment to ${l} for variable ${i}. Line ${e.line}`);r.data[1]=o.value}else if(l==="z"){if(r.data.length<3)return void console.error(`Invalid assignment to ${l} for variable ${i}. Line ${e.line}`);r.data[2]=o.value}else if(l==="w"){if(r.data.length<4)return void console.error(`Invalid assignment to ${l} for variable ${i}. Line ${e.line}`);r.data[3]=o.value}}else{if(!(o instanceof ge))return void console.error(`Invalid assignment to ${i}. Line ${e.line}`);if(l.length!==o.data.length)return void console.error(`Invalid assignment to ${l} for variable ${i}. Line ${e.line}`);for(let c=0;c<l.length;++c){const u=l[c];if(u==="x"||u==="r")r.data[0]=o.data[c];else if(u==="y"||u==="g"){if(o.data.length<2)return void console.error(`Invalid assignment to ${u} for variable ${i}. Line ${e.line}`);r.data[1]=o.data[c]}else if(u==="z"||u==="b"){if(o.data.length<3)return void console.error(`Invalid assignment to ${u} for variable ${i}. Line ${e.line}`);r.data[2]=o.data[c]}else{if(u!=="w"&&u!=="a")return void console.error(`Invalid assignment to ${u} for variable ${i}. Line ${e.line}`);if(o.data.length<4)return void console.error(`Invalid assignment to ${u} for variable ${i}. Line ${e.line}`);r.data[3]=o.data[c]}}}}}else r instanceof De&&o instanceof De?r.value=o.value:r instanceof ge&&o instanceof ge||r instanceof jt&&o instanceof jt?r.data.set(o.data):console.error(`Invalid assignment to ${i}. Line ${e.line}`)}_function(e,n){const r=new toe(e);n.functions.set(e.name,r)}_const(e,n){let r=null;e.value!==null&&(r=this.evalExpression(e.value,n)),n.createVariable(e.name,r,e)}_let(e,n){let r=null;if(e.value!==null){if(r=this.evalExpression(e.value,n),r===null)return void console.error(`Invalid value for variable ${e.name}. Line ${e.line}`);e.value instanceof kr||(r=r.clone())}else{const i=e.type.name;if(i==="f32"||i==="i32"||i==="u32"||i==="bool"||i==="f16"||i==="vec2"||i==="vec3"||i==="vec4"||i==="vec2f"||i==="vec3f"||i==="vec4f"||i==="vec2i"||i==="vec3i"||i==="vec4i"||i==="vec2u"||i==="vec3u"||i==="vec4u"||i==="vec2h"||i==="vec3h"||i==="vec4h"||i==="vec2b"||i==="vec3b"||i==="vec4b"||i==="mat2x2"||i==="mat2x3"||i==="mat2x4"||i==="mat3x2"||i==="mat3x3"||i==="mat3x4"||i==="mat4x2"||i==="mat4x3"||i==="mat4x4"||i==="mat2x2f"||i==="mat2x3f"||i==="mat2x4f"||i==="mat3x2f"||i==="mat3x3f"||i==="mat3x4f"||i==="mat4x2f"||i==="mat4x3f"||i==="mat4x4f"||i==="mat2x2h"||i==="mat2x3h"||i==="mat2x4h"||i==="mat3x2h"||i==="mat3x3h"||i==="mat3x4h"||i==="mat4x2h"||i==="mat4x3h"||i==="mat4x4h"||i==="array"){const s=new ml(e.type,[]);r=this._evalCreate(s,n)}}n.createVariable(e.name,r,e)}_var(e,n){let r=null;if(e.value!==null){if(r=this.evalExpression(e.value,n),r===null)return void console.error(`Invalid value for variable ${e.name}. Line ${e.line}`);e.value instanceof kr||(r=r.clone())}else{if(e.type===null)return void console.error(`Variable ${e.name} has no type. Line ${e.line}`);const i=e.type.name;if(i==="f32"||i==="i32"||i==="u32"||i==="bool"||i==="f16"||i==="vec2"||i==="vec3"||i==="vec4"||i==="vec2f"||i==="vec3f"||i==="vec4f"||i==="vec2i"||i==="vec3i"||i==="vec4i"||i==="vec2u"||i==="vec3u"||i==="vec4u"||i==="vec2h"||i==="vec3h"||i==="vec4h"||i==="vec2b"||i==="vec3b"||i==="vec4b"||i==="mat2x2"||i==="mat2x3"||i==="mat2x4"||i==="mat3x2"||i==="mat3x3"||i==="mat3x4"||i==="mat4x2"||i==="mat4x3"||i==="mat4x4"||i==="mat2x2f"||i==="mat2x3f"||i==="mat2x4f"||i==="mat3x2f"||i==="mat3x3f"||i==="mat3x4f"||i==="mat4x2f"||i==="mat4x3f"||i==="mat4x4f"||i==="mat2x2h"||i==="mat2x3h"||i==="mat2x4h"||i==="mat3x2h"||i==="mat3x3h"||i==="mat3x4h"||i==="mat4x2h"||i==="mat4x3h"||i==="mat4x4h"||e.type instanceof J1||e.type instanceof xc||e.type instanceof Be){const s=new ml(e.type,[]);r=this._evalCreate(s,n)}}n.createVariable(e.name,r,e)}_switch(e,n){n=n.clone();const r=this.evalExpression(e.condition,n);if(!(r instanceof De))return console.error(`Invalid if condition. Line ${e.line}`),null;let i=null;for(const s of e.cases)if(s instanceof M$)for(const o of s.selectors){if
148(o instanceof h_){i=s;continue}const a=this.evalExpression(o,n);if(!(a instanceof De))return console.error(`Invalid case selector. Line ${e.line}`),null;if(a.value===r.value)return this._execStatements(s.body,n)}else s instanceof R$&&(i=s);return i?this._execStatements(i.body,n):null}_if(e,n){n=n.clone();const r=this.evalExpression(e.condition,n);if(!(r instanceof De))return console.error(`Invalid if condition. Line ${e.line}`),null;if(r.value)return this._execStatements(e.body,n);for(const i of e.elseif){const s=this.evalExpression(i.condition,n);if(!(s instanceof De))return console.error(`Invalid if condition. Line ${e.line}`),null;if(s.value)return this._execStatements(i.body,n)}return e.else?this._execStatements(e.else,n):null}_getScalarValue(e){return e instanceof De?e.value:(console.error("Expected scalar value.",e),0)}_for(e,n){for(n=n.clone(),this.execStatement(e.init,n);this._getScalarValue(this.evalExpression(e.condition,n));){const r=this._execStatements(e.body,n);if(r===ko._breakObj)break;if(r!==null&&r!==ko._continueObj)return r;this.execStatement(e.increment,n)}return null}_loop(e,n){for(n=n.clone();;){const r=this._execStatements(e.body,n);if(r===ko._breakObj)break;if(r===ko._continueObj){if(e.continuing&&this._execStatements(e.continuing.body,n)===ko._breakObj)break}else if(r!==null)return r}return null}_while(e,n){for(n=n.clone();this._getScalarValue(this.evalExpression(e.condition,n));){const r=this._execStatements(e.body,n);if(r===ko._breakObj)break;if(r!==ko._continueObj&&r!==null)return r}return null}_evalBitcast(e,n){const r=this.evalExpression(e.value,n),i=e.type;if(r instanceof De){const s=Qk(r.value,r.typeInfo.name,i.name);return new De(s,this.getTypeInfo(i))}if(r instanceof ge){const s=r.typeInfo.getTypeName();let o="";if(s.endsWith("f"))o="f32";else if(s.endsWith("i"))o="i32";else if(s.endsWith("u"))o="u32";else if(s.endsWith("b"))o="bool";else{if(!s.endsWith("h"))return console.error(`Unknown vector type ${s}. Line ${e.line}`),null;o="f16"}const a=i.getTypeName();let l="";if(a.endsWith("f"))l="f32";else if(a.endsWith("i"))l="i32";else if(a.endsWith("u"))l="u32";else if(a.endsWith("b"))l="bool";else{if(!a.endsWith("h"))return console.error(`Unknown vector type ${l}. Line ${e.line}`),null;l="f16"}const c=(function(u,h,d){if(h===d)return u;const m=new Array(u.length);for(let y=0;y<u.length;y++)m[y]=Qk(u[y],h,d);return m})(Array.from(r.data),o,l);return new ge(c,this.getTypeInfo(i))}return console.error(`TODO: bitcast for ${r.typeInfo.name}. Line ${e.line}`),null}_evalConst(e,n){return n.getVariableValue(e.name).clone().getSubData(this,e.postfix,n)}_evalCreate(e,n){var r;if(e instanceof ml){if(e.type===null)return hP.void;switch(e.type.getTypeName()){case"bool":case"i32":case"u32":case"f32":case"f16":return this._callConstructorValue(e,n);case"vec2":case"vec3":case"vec4":case"vec2f":case"vec3f":case"vec4f":case"vec2h":case"vec3h":case"vec4h":case"vec2i":case"vec3i":case"vec4i":case"vec2u":case"vec3u":case"vec4u":case"vec2b":case"vec3b":case"vec4b":return this._callConstructorVec(e,n);case"mat2x2":case"mat2x2f":case"mat2x2h":case"mat2x3":case"mat2x3f":case"mat2x3h":case"mat2x4":case"mat2x4f":case"mat2x4h":case"mat3x2":case"mat3x2f":case"mat3x2h":case"mat3x3":case"mat3x3f":case"mat3x3h":case"mat3x4":case"mat3x4f":case"mat3x4h":case"mat4x2":case"mat4x2f":case"mat4x2h":case"mat4x3":case"mat4x3f":case"mat4x3h":case"mat4x4":case"mat4x4f":case"mat4x4h":return this._callConstructorMatrix(e,n)}}const i=e instanceof ml?e.type.name:e.name,s=e instanceof ml?this.getTypeInfo(e.type):this.getTypeInfo(e.name);if(s===null)return console.error(`Unknown type ${i}. Line ${e.line}`),null;if(s.size===0)return null;const o=new li(new ArrayBuffer(s.size),s,0);if(s instanceof Ku){if(e.args)for(let a=0;a<e.args.length;++a){const l=s.members[a],c=e.args[a],u=this.evalExpression(c,n);o.setData(this,u,l.type,l.offset,n)}}else if(s instanceof nf){let a=0;if(e.args)for(let l=0;l<e.args.length;++l){const c=e.args[l],u=this.evalExpression(c,n);s.format===null&&(((r=u.typeInfo)===null||r===void 0?void 0:r.name)==="x32"?s.format=this.getTypeInfo("i32"):s.format=u.typeInfo),o.setData(this,u,s.format,a,n),a+=s.stride}}else console.error(`Unknown type "${i}". Line ${e.line}`);return e instanceof ml?o.getSubData(this,e.postfix,n):o}_evalLiteral(e,n){const r=this.getTypeInfo(e.type),i=r.name;return i==="x32"||i==="u32"||i==="f32"||i==="f16"||i==="i32"||i==="bool"?new De(e.scalarValue,r):i==="vec2"||i==="vec3"||i==="vec4"||i==="vec2f"||i==="vec3f"||i==="vec4f"||i==="vec2h"||i==="vec3h"||i==="vec4h"||i==="vec2i"||i==="vec3i"||i==="vec4i"||i==="vec2u"||i==="vec3u"||i==="vec4u"?this._callConstructorVec(e,n):i==="mat2x2"||i==="mat2x3"||i==="mat2x4"||i==="mat3x2"||i==="mat3x3"||i==="mat3x4"||i==="mat4x2"||i==="mat4x3"||i==="mat4x4"||i==="mat2x2f"||i==="mat2x3f"||i==="mat2x4f"||i==="mat3x2f"||i==="mat3x3f"||i==="mat3x4f"||i==="mat4x2f"||i==="mat4x3f"||i==="mat4x4f"||i==="mat2x2h"||i==="mat2x3h"||i==="mat2x4h"||i==="mat3x2h"||i==="mat3x3h"||i==="mat3x4h"||i==="mat4x2h"||i==="mat4x3h"||i==="mat4x4h"?this._callConstructorMatrix(e,n):e.value}_evalVariable(e,n){const r=n.getVariableValue(e.name);return r===null?r:r.getSubData(this,e.postfix,n)}_maxFormatTypeInfo(e){let n=e[0];if(n.name==="f32")return n;for(let r=1;r<e.length;++r){const i=ko._priority.get(n.name);ko._priority.get(e[r].name)<i&&(n=e[r])}return n.name==="x32"?this.getTypeInfo("i32"):n}_evalUnaryOp(e,n){const r=this.evalExpression(e.right,n);if(e.operator==="&")return new tg(r);if(e.operator==="*")return r instanceof tg?r.reference.getSubData(this,e.postfix,n):(console.error(`Invalid dereference. Line ${e.line}`),null);const i=r instanceof De?r.value:r instanceof ge?Array.from(r.data):null;switch(e.operator){case"+":{if(pt(i)){const a=i.map((l,c)=>+l);return new ge(a,r.typeInfo)}const s=i,o=this._maxFormatTypeInfo([r.typeInfo,r.typeInfo]);return new De(+s,o)}case"-":{if(pt(i)){const a=i.map((l,c)=>-l);return new ge(a,r.typeInfo)}const s=i,o=this._maxFormatTypeInfo([r.typeInfo,r.typeInfo]);return new De(-s,o)}case"!":{if(pt(i)){const a=i.map((l,c)=>l?0:1);return new ge(a,r.typeInfo)}const s=i,o=this._maxFormatTypeInfo([r.typeInfo,r.typeInfo]);return new De(s?0:1,o)}case"~":{if(pt(i)){const a=i.map((l,c)=>~l);return new ge(a,r.typeInfo)}const s=i,o=this._maxFormatTypeInfo([r.typeInfo,r.typeInfo]);return new De(~s,o)}}return console.error(`Invalid unary operator ${e.operator}. Line ${e.line}`),null}_evalBinaryOp(e,n){const r=this.evalExpression(e.left,n),i=this.evalExpression(e.right,n),s=r instanceof De?r.value:r instanceof ge||r instanceof jt?Array.from(r.data):null,o=i instanceof De?i.value:i instanceof ge||i instanceof jt?Array.from(i.data):null;switch(e.operator){case"+":{if(pt(s)&&pt(o)){const u=s,h=o;if(u.length!==h.length)return console.error(`Vector length mismatch. Line ${e.line}.`),null;const d=u.map((m,y)=>m+h[y]);return new ge(d,r.typeInfo)}if(pt(s)){const u=o,h=s.map((d,m)=>d+u);return new ge(h,r.typeInfo)}if(pt(o)){const u=s,h=o.map((d,m)=>u+d);return new ge(h,i.typeInfo)}const a=s,l=o,c=this._maxFormatTypeInfo([r.typeInfo,i.typeInfo]);return new De(a+l,c)}case"-":{if(pt(s)&&pt(o)){const u=s,h=o;if(u.length!==h.length)return console.error(`Vector length mismatch. Line ${e.line}.`),null;const d=u.map((m,y)=>m-h[y]);return new ge(d,r.typeInfo)}if(pt(s)){const u=o,h=s.map((d,m)=>d-u);return new ge(h,r.typeInfo)}if(pt(o)){const u=s,h=o.map((d,m)=>u-d);return new ge(h,i.typeInfo)}const a=s,l=o,c=this._maxFormatTypeInfo([r.typeInfo,i.typeInfo]);return new De(a-l,c)}case"*":{if(pt(s)&&pt(o)){const u=s,h=o;if(r instanceof jt&&i instanceof jt){const d=(function(b,x,T,E){if(os[x.name]===void 0||os[E.name]===void 0)return null;const C=os[x.name][0],I=os[x.name][1],O=os[E.name][0];if(C!==os[E.name][1])return null;const N=new Array(O*I);for(let U=0;U<I;U++)for(let F=0;F<O;F++){let H=0;for(let W=0;W<C;W++)H+=b[W*I+U]*T[F*C+W];N[U*O+F]=H}return N})(u,r.typeInfo,h,i.typeInfo);if(d===null)return console.error(`Matrix multiplication failed. Line ${e.line}.`),null;const m=os[i.typeInfo.name][0],y=os[r.typeInfo.name][1],v=this.getTypeInfo(`mat${m}x${y}f`);return new jt(d,v)}if(r instanceof jt&&i instanceof ge){const d=(function(m,y,v,b){if(os[y.name]===void 0||oE[b.name]===void 0)return null;const x=os[y.name][0],T=os[y.name][1];if(x!==v.length)return null;const E=new Array(T);for(let C=0;C<T;C++){let I=0;for(let O=0;O<x;O++)I+=m[O*T+C]*v[O];E[C]=I}return E})(u,r.typeInfo,h,i.typeInfo);return d===null?(console.error(`Matrix vector multiplication failed. Line ${e.line}.`),null):new ge(d,i.typeInfo)}if(r instanceof ge&&i instanceof jt){const d=(function(m,y,v,b){if(oE[y.name]===void 0||os[b.n
148ame]===void 0)return null;const x=os[b.name][0],T=os[b.name][1];if(T!==m.length)return null;const E=[];for(let C=0;C<x;C++){let I=0;for(let O=0;O<T;O++)I+=m[O]*v[O*x+C];E[C]=I}return E})(u,r.typeInfo,h,i.typeInfo);return d===null?(console.error(`Matrix vector multiplication failed. Line ${e.line}.`),null):new ge(d,r.typeInfo)}{if(u.length!==h.length)return console.error(`Vector length mismatch. Line ${e.line}.`),null;const d=u.map((m,y)=>m*h[y]);return new ge(d,r.typeInfo)}}if(pt(s)){const u=o,h=s.map((d,m)=>d*u);return r instanceof jt?new jt(h,r.typeInfo):new ge(h,r.typeInfo)}if(pt(o)){const u=s,h=o.map((d,m)=>u*d);return i instanceof jt?new jt(h,i.typeInfo):new ge(h,i.typeInfo)}const a=s,l=o,c=this._maxFormatTypeInfo([r.typeInfo,i.typeInfo]);return new De(a*l,c)}case"%":{if(pt(s)&&pt(o)){const u=s,h=o;if(u.length!==h.length)return console.error(`Vector length mismatch. Line ${e.line}.`),null;const d=u.map((m,y)=>m%h[y]);return new ge(d,r.typeInfo)}if(pt(s)){const u=o,h=s.map((d,m)=>d%u);return new ge(h,r.typeInfo)}if(pt(o)){const u=s,h=o.map((d,m)=>u%d);return new ge(h,i.typeInfo)}const a=s,l=o,c=this._maxFormatTypeInfo([r.typeInfo,i.typeInfo]);return new De(a%l,c)}case"/":{if(pt(s)&&pt(o)){const u=s,h=o;if(u.length!==h.length)return console.error(`Vector length mismatch. Line ${e.line}.`),null;const d=u.map((m,y)=>m/h[y]);return new ge(d,r.typeInfo)}if(pt(s)){const u=o,h=s.map((d,m)=>d/u);return new ge(h,r.typeInfo)}if(pt(o)){const u=s,h=o.map((d,m)=>u/d);return new ge(h,i.typeInfo)}const a=s,l=o,c=this._maxFormatTypeInfo([r.typeInfo,i.typeInfo]);return new De(a/l,c)}case"&":{if(pt(s)&&pt(o)){const u=s,h=o;if(u.length!==h.length)return console.error(`Vector length mismatch. Line ${e.line}.`),null;const d=u.map((m,y)=>m&h[y]);return new ge(d,r.typeInfo)}if(pt(s)){const u=o,h=s.map((d,m)=>d&u);return new ge(h,r.typeInfo)}if(pt(o)){const u=s,h=o.map((d,m)=>u&d);return new ge(h,i.typeInfo)}const a=s,l=o,c=this._maxFormatTypeInfo([r.typeInfo,i.typeInfo]);return new De(a&l,c)}case"|":{if(pt(s)&&pt(o)){const u=s,h=o;if(u.length!==h.length)return console.error(`Vector length mismatch. Line ${e.line}.`),null;const d=u.map((m,y)=>m|h[y]);return new ge(d,r.typeInfo)}if(pt(s)){const u=o,h=s.map((d,m)=>d|u);return new ge(h,r.typeInfo)}if(pt(o)){const u=s,h=o.map((d,m)=>u|d);return new ge(h,i.typeInfo)}const a=s,l=o,c=this._maxFormatTypeInfo([r.typeInfo,i.typeInfo]);return new De(a|l,c)}case"^":{if(pt(s)&&pt(o)){const u=s,h=o;if(u.length!==h.length)return console.error(`Vector length mismatch. Line ${e.line}.`),null;const d=u.map((m,y)=>m^h[y]);return new ge(d,r.typeInfo)}if(pt(s)){const u=o,h=s.map((d,m)=>d^u);return new ge(h,r.typeInfo)}if(pt(o)){const u=s,h=o.map((d,m)=>u^d);return new ge(h,i.typeInfo)}const a=s,l=o,c=this._maxFormatTypeInfo([r.typeInfo,i.typeInfo]);return new De(a^l,c)}case"<<":{if(pt(s)&&pt(o)){const u=s,h=o;if(u.length!==h.length)return console.error(`Vector length mismatch. Line ${e.line}.`),null;const d=u.map((m,y)=>m<<h[y]);return new ge(d,r.typeInfo)}if(pt(s)){const u=o,h=s.map((d,m)=>d<<u);return new ge(h,r.typeInfo)}if(pt(o)){const u=s,h=o.map((d,m)=>u<<d);return new ge(h,i.typeInfo)}const a=s,l=o,c=this._maxFormatTypeInfo([r.typeInfo,i.typeInfo]);return new De(a<<l,c)}case">>":{if(pt(s)&&pt(o)){const u=s,h=o;if(u.length!==h.length)return console.error(`Vector length mismatch. Line ${e.line}.`),null;const d=u.map((m,y)=>m>>h[y]);return new ge(d,r.typeInfo)}if(pt(s)){const u=o,h=s.map((d,m)=>d>>u);return new ge(h,r.typeInfo)}if(pt(o)){const u=s,h=o.map((d,m)=>u>>d);return new ge(h,i.typeInfo)}const a=s,l=o,c=this._maxFormatTypeInfo([r.typeInfo,i.typeInfo]);return new De(a>>l,c)}case">":if(pt(s)&&pt(o)){const a=s,l=o;if(a.length!==l.length)return console.error(`Vector length mismatch. Line ${e.line}.`),null;const c=a.map((u,h)=>u>l[h]?1:0);return new ge(c,r.typeInfo)}if(pt(s)){const a=o,l=s.map((c,u)=>c>a?1:0);return new ge(l,r.typeInfo)}if(pt(o)){const a=s,l=o.map((c,u)=>a>c?1:0);return new ge(l,i.typeInfo)}return new De(s>o?1:0,this.getTypeInfo("bool"));case"<":if(pt(s)&&pt(o)){const a=s,l=o;if(a.length!==l.length)return console.error(`Vector length mismatch. Line ${e.line}.`),null;const c=a.map((u,h)=>u<l[h]?1:0);return new ge(c,r.typeInfo)}if(pt(s)){const a=o,l=s.map((c,u)=>c<a?1:0);return new ge(l,r.typeInfo)}if(pt(o)){const a=s,l=o.map((c,u)=>a<c?1:0);return new ge(l,i.typeInfo)}return new De(s<o?1:0,this.getTypeInfo("bool"));case"==":if(pt(s)&&pt(o)){const a=s,l=o;if(a.length!==l.length)return console.error(`Vector length mismatch. Line ${e.line}.`),null;const c=a.map((u,h)=>u===l[h]?1:0);return new ge(c,r.typeInfo)}if(pt(s)){const a=o,l=s.map((c,u)=>c==a?1:0);return new ge(l,r.typeInfo)}if(pt(o)){const a=s,l=o.map((c,u)=>a==c?1:0);return new ge(l,i.typeInfo)}return new De(s===o?1:0,this.getTypeInfo("bool"));case"!=":if(pt(s)&&pt(o)){const a=s,l=o;if(a.length!==l.length)return console.error(`Vector length mismatch. Line ${e.line}.`),null;const c=a.map((u,h)=>u!==l[h]?1:0);return new ge(c,r.typeInfo)}if(pt(s)){const a=o,l=s.map((c,u)=>c!==a?1:0);return new ge(l,r.typeInfo)}if(pt(o)){const a=s,l=o.map((c,u)=>a!==c?1:0);return new ge(l,i.typeInfo)}return new De(s!==o?1:0,this.getTypeInfo("bool"));case">=":if(pt(s)&&pt(o)){const a=s,l=o;if(a.length!==l.length)return console.error(`Vector length mismatch. Line ${e.line}.`),null;const c=a.map((u,h)=>u>=l[h]?1:0);return new ge(c,r.typeInfo)}if(pt(s)){const a=o,l=s.map((c,u)=>c>=a?1:0);return new ge(l,r.typeInfo)}if(pt(o)){const a=s,l=o.map((c,u)=>a>=c?1:0);return new ge(l,i.typeInfo)}return new De(s>=o?1:0,this.getTypeInfo("bool"));case"<=":if(pt(s)&&pt(o)){const a=s,l=o;if(a.length!==l.length)return console.error(`Vector length mismatch. Line ${e.line}.`),null;const c=a.map((u,h)=>u<=l[h]?1:0);return new ge(c,r.typeInfo)}if(pt(s)){const a=o,l=s.map((c,u)=>c<=a?1:0);return new ge(l,r.typeInfo)}if(pt(o)){const a=s,l=o.map((c,u)=>a<=c?1:0);return new ge(l,i.typeInfo)}return new De(s<=o?1:0,this.getTypeInfo("bool"));case"&&":if(pt(s)&&pt(o)){const a=s,l=o;if(a.length!==l.length)return console.error(`Vector length mismatch. Line ${e.line}.`),null;const c=a.map((u,h)=>u&&l[h]?1:0);return new ge(c,r.typeInfo)}if(pt(s)){const a=o,l=s.map((c,u)=>c&&a?1:0);return new ge(l,r.typeInfo)}if(pt(o)){const a=s,l=o.map((c,u)=>a&&c?1:0);return new ge(l,i.typeInfo)}return new De(s&&o?1:0,this.getTypeInfo("bool"));case"||":if(pt(s)&&pt(o)){const a=s,l=o;if(a.length!==l.length)return console.error(`Vector length mismatch. Line ${e.line}.`),null;const c=a.map((u,h)=>u||l[h]?1:0);return new ge(c,r.typeInfo)}if(pt(s)){const a=o,l=s.map((c,u)=>c||a?1:0);return new ge(l,r.typeInfo)}if(pt(o)){const a=s,l=o.map((c,u)=>a||c?1:0);return new ge(l,i.typeInfo)}return new De(s||o?1:0,this.getTypeInfo("bool"))}return console.error(`Unknown operator ${e.operator}. Line ${e.line}`),null}
148_evalCall(e,n){if(e.cachedReturnValue!==null)return e.cachedReturnValue;const r=n.clone();r.currentFunctionName=e.name;const i=n.getFunction(e.name);if(!i)return e.isBuiltin?this._callBuiltinFunction(e,r):this.getTypeInfo(e.name)?this._evalCreate(e,n):(console.error(`Unknown function "${e.name}". Line ${e.line}`),null);for(let s=0;s<i.node.args.length;++s){const o=i.node.args[s],a=this.evalExpression(e.args[s],r);r.createVariable(o.name,a,o)}return this._execStatements(i.node.body,r)}_callBuiltinFunction(e,n){switch(e.name){case"all":return this.builtins.All(e,n);case"any":return this.builtins.Any(e,n);case"select":return this.builtins.Select(e,n);case"arrayLength":return this.builtins.ArrayLength(e,n);case"abs":return this.builtins.Abs(e,n);case"acos":return this.builtins.Acos(e,n);case"acosh":return this.builtins.Acosh(e,n);case"asin":return this.builtins.Asin(e,n);case"asinh":return this.builtins.Asinh(e,n);case"atan":return this.builtins.Atan(e,n);case"atanh":return this.builtins.Atanh(e,n);case"atan2":return this.builtins.Atan2(e,n);case"ceil":return this.builtins.Ceil(e,n);case"clamp":return this.builtins.Clamp(e,n);case"cos":return this.builtins.Cos(e,n);case"cosh":return this.builtins.Cosh(e,n);case"countLeadingZeros":return this.builtins.CountLeadingZeros(e,n);case"countOneBits":return this.builtins.CountOneBits(e,n);case"countTrailingZeros":return this.builtins.CountTrailingZeros(e,n);case"cross":return this.builtins.Cross(e,n);case"degrees":return this.builtins.Degrees(e,n);case"determinant":return this.builtins.Determinant(e,n);case"distance":return this.builtins.Distance(e,n);case"dot":return this.builtins.Dot(e,n);case"dot4U8Packed":return this.builtins.Dot4U8Packed(e,n);case"dot4I8Packed":return this.builtins.Dot4I8Packed(e,n);case"exp":return this.builtins.Exp(e,n);case"exp2":return this.builtins.Exp2(e,n);case"extractBits":return this.builtins.ExtractBits(e,n);case"faceForward":return this.builtins.FaceForward(e,n);case"firstLeadingBit":return this.builtins.FirstLeadingBit(e,n);case"firstTrailingBit":return this.builtins.FirstTrailingBit(e,n);case"floor":return this.builtins.Floor(e,n);case"fma":return this.builtins.Fma(e,n);case"fract":return this.builtins.Fract(e,n);case"frexp":return this.builtins.Frexp(e,n);case"insertBits":return this.builtins.InsertBits(e,n);case"inverseSqrt":return this.builtins.InverseSqrt(e,n);case"ldexp":return this.builtins.Ldexp(e,n);case"length":return this.builtins.Length(e,n);case"log":return this.builtins.Log(e,n);case"log2":return this.builtins.Log2(e,n);case"max":return this.builtins.Max(e,n);case"min":return this.builtins.Min(e,n);case"mix":return this.builtins.Mix(e,n);case"modf":return this.builtins.Modf(e,n);case"normalize":return this.builtins.Normalize(e,n);case"pow":return this.builtins.Pow(e,n);case"quantizeToF16":return this.builtins.QuantizeToF16(e,n);case"radians":return this.builtins.Radians(e,n);case"reflect":return this.builtins.Reflect(e,n);case"refract":return this.builtins.Refract(e,n);case"reverseBits":return this.builtins.ReverseBits(e,n);case"round":return this.builtins.Round(e,n);case"saturate":return this.builtins.Saturate(e,n);case"sign":return this.builtins.Sign(e,n);case"sin":return this.builtins.Sin(e,n);case"sinh":return this.builtins.Sinh(e,n);case"smoothstep":return this.builtins.SmoothStep(e,n);case"sqrt":return this.builtins.Sqrt(e,n);case"step":return this.builtins.Step(e,n);case"tan":return this.builtins.Tan(e,n);case"tanh":return this.builtins.Tanh(e,n);case"transpose":return this.builtins.Transpose(e,n);case"trunc":return this.builtins.Trunc(e,n);case"dpdx":return this.builtins.Dpdx(e,n);case"dpdxCoarse":return this.builtins.DpdxCoarse(e,n);case"dpdxFine":return this.builtins.DpdxFine(e,n);case"dpdy":return this.builtins.Dpdy(e,n);case"dpdyCoarse":return this.builtins.DpdyCoarse(e,n);case"dpdyFine":return this.builtins.DpdyFine(e,n);case"fwidth":return this.builtins.Fwidth(e,n);case"fwidthCoarse":return this.builtins.FwidthCoarse(e,n);case"fwidthFine":return this.builtins.FwidthFine(e,n);case"textureDimensions":return this.builtins.TextureDimensions(e,n);case"textureGather":return this.builtins.TextureGather(e,n);case"textureGatherCompare":return this.builtins.TextureGatherCompare(e,n);case"textureLoad":return this.builtins.TextureLoad(e,n);case"textureNumLayers":return this.builtins.TextureNumLayers(e,n);case"textureNumLevels":return this.builtins.TextureNumLevels(e,n);case"textureNumSamples":return this.builtins.TextureNumSamples(e,n);case"textureSample":return this.builtins.TextureSample(e,n);case"textureSampleBias":return this.builtins.TextureSampleBias(e,n);case"textureSampleCompare":return this.builtins.TextureSampleCompare(e,n);case"textureSampleCompareLevel":return this.builtins.TextureSampleCompareLevel(e,n);case"textureSampleGrad":return this.builtins.TextureSampleGrad(e,n
148);case"textureSampleLevel":return this.builtins.TextureSampleLevel(e,n);case"textureSampleBaseClampToEdge":return this.builtins.TextureSampleBaseClampToEdge(e,n);case"textureStore":return this.builtins.TextureStore(e,n);case"atomicLoad":return this.builtins.AtomicLoad(e,n);case"atomicStore":return this.builtins.AtomicStore(e,n);case"atomicAdd":return this.builtins.AtomicAdd(e,n);case"atomicSub":return this.builtins.AtomicSub(e,n);case"atomicMax":return this.builtins.AtomicMax(e,n);case"atomicMin":return this.builtins.AtomicMin(e,n);case"atomicAnd":return this.builtins.AtomicAnd(e,n);case"atomicOr":return this.builtins.AtomicOr(e,n);case"atomicXor":return this.builtins.AtomicXor(e,n);case"atomicExchange":return this.builtins.AtomicExchange(e,n);case"atomicCompareExchangeWeak":return this.builtins.AtomicCompareExchangeWeak(e,n);case"pack4x8snorm":return this.builtins.Pack4x8snorm(e,n);case"pack4x8unorm":return this.builtins.Pack4x8unorm(e,n);case"pack4xI8":return this.builtins.Pack4xI8(e,n);case"pack4xU8":return this.builtins.Pack4xU8(e,n);case"pack4x8Clamp":return this.builtins.Pack4x8Clamp(e,n);case"pack4xU8Clamp":return this.builtins.Pack4xU8Clamp(e,n);case"pack2x16snorm":return this.builtins.Pack2x16snorm(e,n);case"pack2x16unorm":return this.builtins.Pack2x16unorm(e,n);case"pack2x16float":return this.builtins.Pack2x16float(e,n);case"unpack4x8snorm":return this.builtins.Unpack4x8snorm(e,n);case"unpack4x8unorm":return this.builtins.Unpack4x8unorm(e,n);case"unpack4xI8":return this.builtins.Unpack4xI8(e,n);case"unpack4xU8":return this.builtins.Unpack4xU8(e,n);case"unpack2x16snorm":return this.builtins.Unpack2x16snorm(e,n);case"unpack2x16unorm":return this.builtins.Unpack2x16unorm(e,n);case"unpack2x16float":return this.builtins.Unpack2x16float(e,n);case"storageBarrier":return this.builtins.StorageBarrier(e,n);case"textureBarrier":return this.builtins.TextureBarrier(e,n);case"workgroupBarrier":return this.builtins.WorkgroupBarrier(e,n);case"workgroupUniformLoad":return this.builtins.WorkgroupUniformLoad(e,n);case"subgroupAdd":return this.builtins.SubgroupAdd(e,n);case"subgroupExclusiveAdd":return this.builtins.SubgroupExclusiveAdd(e,n);case"subgroupInclusiveAdd":return this.builtins.SubgroupInclusiveAdd(e,n);case"subgroupAll":return this.builtins.SubgroupAll(e,n);case"subgroupAnd":return this.builtins.SubgroupAnd(e,n);case"subgroupAny":return this.builtins.SubgroupAny(e,n);case"subgroupBallot":return this.builtins.SubgroupBallot(e,n);case"subgroupBroadcast":return this.builtins.SubgroupBroadcast(e,n);case"subgroupBroadcastFirst":return this.builtins.SubgroupBroadcastFirst(e,n);case"subgroupElect":return this.builtins.SubgroupElect(e,n);case"subgroupMax":return this.builtins.SubgroupMax(e,n);case"subgroupMin":return this.builtins.SubgroupMin(e,n);case"subgroupMul":return this.builtins.SubgroupMul(e,n);case"subgroupExclusiveMul":return this.builtins.SubgroupExclusiveMul(e,n);case"subgroupInclusiveMul":return this.builtins.SubgroupInclusiveMul(e,n);case"subgroupOr":return this.builtins.SubgroupOr(e,n);case"subgroupShuffle":return this.builtins.SubgroupShuffle(e,n);case"subgroupShuffleDown":return this.builtins.SubgroupShuffleDown(e,n);case"subgroupShuffleUp":return this.builtins.SubgroupShuffleUp(e,n);case"subgroupShuffleXor":return this.builtins.SubgroupShuffleXor(e,n);case"subgroupXor":return this.builtins.SubgroupXor(e,n);case"quadBroadcast":return this.builtins.QuadBroadcast(e,n);case"quadSwapDiagonal":return this.builtins.QuadSwapDiagonal(e,n);case"quadSwapX":return this.builtins.QuadSwapX(e,n);case"quadSwapY":return this.builtins.QuadSwapY(e,n)}const r=n.getFunction(e.name);if(r){const i=n.clone();for(let s=0;s<r.node.args.length;++s){const o=r.node.args[s],a=this.evalExpression(e.args[s],i);i.setVariable(o.name,a,o)}return this._execStatements(r.node.body,i)}return null}_callConstructorValue(e,n){if(!e.args||e.args.length===0)return new De(0,this.getTypeInfo(e.type));const r=this.evalExpression(e.args[0],n);return r.typeInfo=this.getTypeInfo(e.type),r.getSubData(this,e.postfix,n).clone()}_callConstructorVec(e,n){const r=this.getTypeInfo(e.type),i=e.type.getTypeName(),s=oE[i];if(s===void 0)return console.error(`Invalid vec constructor ${i}. Line ${e.line}`),null;const o=[];if(e instanceof qr)if(e.isVector){const a=e.vectorValue;for(const l of a)o.push(l)}else o.push(e.scalarValue);else if(e.args)for(const a of e.args){const l=this.evalExpression(a,n);if(l instanceof ge){const c=l.data;for(let u=0;u<c.length;++u){let h=c[u];o.push(h)}}else if(l instanceof De){let c=l.value;o.push(c)}}if(e.type instanceof Be&&e.type.format===null&&(e.type.format=Be.f32),o.length===0){const a=new Array(s).fill(0);
148return new ge(a,r).getSubData(this,e.postfix,n)}if(o.length===1)for(;o.length<s;)o.push(o[0]);return o.length<s?(console.error(`Invalid vec constructor. Line ${e.line}`),null):new ge(o.length>s?o.slice(0,s):o,r).getSubData(this,e.postfix,n)}_callConstructorMatrix(e,n){const r=this.getTypeInfo(e.type),i=e.type.getTypeName(),s=os[i];if(s===void 0)return console.error(`Invalid matrix constructor ${i}. Line ${e.line}`),null;const o=[];if(e instanceof qr)if(e.isVector){const a=e.vectorValue;for(const l of a)o.push(l)}else o.push(e.scalarValue);else if(e.args)for(const a of e.args){const l=this.evalExpression(a,n);l instanceof ge?o.push(...l.data):l instanceof De?o.push(l.value):l instanceof jt&&o.push(...l.data)}if(r instanceof Yh&&r.format===null&&(r.format=this.getTypeInfo("f32")),o.length===0){const a=new Array(s[2]).fill(0);return new jt(a,r).getSubData(this,e.postfix,n)}return o.length!==s[2]?(console.error(`Invalid matrix constructor. Line ${e.line}`),null):new jt(o,r).getSubData(this,e.postfix,n)}};p_._breakObj=new Ol(new Uo("BREAK",null),null),p_._continueObj=new Ol(new Uo("CONTINUE",null),null),p_._priority=new Map([["f32",0],["f16",1],["u32",2],["i32",3],["x32",3]]);let soe=class{constructor(){this.constants=new Map,this.aliases=new Map,this.structs=new Map}},ooe=class{constructor(){this._tokens=[],this._current=0,this._currentLine=1,this._deferArrayCountEval=[],this._currentLoop=[],this._context=new soe,this._exec=new p_,this._forwardTypeCount=0}parse(e){this._initialize(e),this._deferArrayCountEval.length=0;const n=[];for(;!this._isAtEnd();){const r=this._global_decl_or_directive();if(!r)break;n.push(r)}if(this._deferArrayCountEval.length>0){for(const r of this._deferArrayCountEval){const i=r.arrayType,s=r.countNode;if(s instanceof ro){const o=s.name,a=this._context.constants.get(o);if(a)try{const l=a.constEvaluate(this._exec);i.count=l}catch{}}}this._deferArrayCountEval.length=0}if(this._forwardTypeCount>0)for(const r of n)r.search(i=>{i instanceof Hk||i instanceof f_?i.type=this._forwardType(i.type):i instanceof J1?i.format=this._forwardType(i.format):i instanceof Ec||i instanceof Z1||i instanceof c_?i.type=this._forwardType(i.type):i instanceof yv?i.returnType=this._forwardType(i.returnType):i instanceof $k&&(i.type=this._forwardType(i.type))});return n}_forwardType(e){if(e instanceof Wk){const n=this._getType(e.name);if(n)return n}else e instanceof f_?e.type=this._forwardType(e.type):e instanceof J1&&(e.format=this._forwardType(e.format));return e}_initialize(e){if(e)if(typeof e=="string"){const n=new qse(e);this._tokens=n.scanTokens()}else this._tokens=e;else this._tokens=[];this._current=0}_updateNode(e,n){return e.line=n??this._currentLine,e}_error(e,n){return{token:e,message:n,toString:()=>`${n}`}}_isAtEnd(){return this._current>=this._tokens.length||this._peek().type==ae.eof}_match(e){if(e instanceof ke)return!!this._check(e)&&(this._advance(),!0);for(let n=0,r=e.length;n<r;++n){const i=e[n];if(this._check(i))return this._advance(),!0}return!1}_consume(e,n){if(this._check(e))return this._advance();throw this._error(this._peek(),`${n}. Line:${this._currentLine}`)}_check(e){if(this._isAtEnd())return!1;const n=this._peek();if(e instanceof Array){const r=n.type;let i=!1;for(const s of e){if(r===s)return!0;s===ae.tokens.name&&(i=!0)}if(i){const s=ae.tokens.name.rule.exec(n.lexeme);if(s&&s.index==0&&s[0]==n.lexeme)return!0}return!1}if(n.type===e)return!0;if(e===ae.tokens.name){const r=ae.tokens.name.rule.exec(n.lexeme);return r&&r.index==0&&r[0]==n.lexeme}return!1}_advance(){var e,n;return this._currentLine=(n=(e=this._peek())===null||e===void 0?void 0:e.line)!==null&&n!==void 0?n:-1,this._isAtEnd()||this._current++,this._previous()}_peek(){return this._tokens[this._current]}_previous(){return this._tokens[this._current-1]}_global_decl_or_directive(){for(;this._match(ae.tokens.semicolon)&&!this._isAtEnd(););if(this._match(ae.keywords.alias)){const n=this._type_alias();return this._consume(ae.tokens.semicolon,"Expected ';'"),this._exec.reflection.updateAST([n]),n}if(this._match(ae.keywords.diagnostic)){const n=this._diagnostic();return this._consume(ae.tokens.semicolon,"Expected ';'"),this._exec.reflection.updateAST([n]),n}if(this._match(ae.keywords.requires)){const n=this._requires_directive();return this._consume(ae.tokens.semicolon,"Expected ';'"),this._exec.reflection.updateAST([n]),n}if(this._match(ae.keywords.enable)){const n=this._enable_directive();return this._consume(ae.tokens.semicolon,"Expected ';'"),this._exec.reflection.updateAST([n]),n}const e=this._attribute();if(this._check(ae.keywords.var)){const n=this._global_variable_decl();return n!=null&&(n.attributes=e),this._consume(ae.tokens.semicolon,"Expected ';'."),this._exec.reflection.updateAST([n]),n}if(this._check(ae.keywords.override)){const n=this._override_variable_decl();return n!=null&&(n.attributes=e),this._consume(ae.tokens.semicolon,"Expected ';'."),this._exec.reflection.updateAST([n]),n}if(this._check(ae.keywords.let)){const n=this._global_let_decl();return n!=null&&(n.attributes=e),this._consume(ae.tokens.semicolon,"Expected ';'."),this._exec.reflection.updateAST([n]),n}if(this._check(ae.keywords.const)){const n=this._global_const_decl();return n!=null&&(n.attributes=e),this._consume(ae.tokens.semicolon,"Expected ';'."),this._exec.reflection.updateAST([n]),n}if(this._check(ae.keywords.struct)){const n=this._struct_decl();return n!=null&&(n.attributes=e),this._exec.reflection.updateAST([n]),n}if(this._check(ae.keywords.fn)){const n=this._function_decl();return n!=null&&(n.attributes=e),this._exec.reflection.updateAST([n]),n}return null}
148_function_decl(){if(!this._match(ae.keywords.fn))return null;const e=this._currentLine,n=this._consume(ae.tokens.ident,"Expected function name.").toString();this._consume(ae.tokens.paren_left,"Expected '(' for function arguments.");const r=[];if(!this._check(ae.tokens.paren_right))do{if(this._check(ae.tokens.paren_right))break;const a=this._attribute(),l=this._consume(ae.tokens.name,"Expected argument name.").toString();this._consume(ae.tokens.colon,"Expected ':' for argument type.");const c=this._attribute(),u=this._type_decl();u!=null&&(u.attributes=c,r.push(this._updateNode(new $k(l,u,a))))}while(this._match(ae.tokens.comma));this._consume(ae.tokens.paren_right,"Expected ')' after function arguments.");let i=null;if(this._match(ae.tokens.arrow)){const a=this._attribute();i=this._type_decl(),i!=null&&(i.attributes=a)}const s=this._compound_statement(),o=this._currentLine;return this._updateNode(new yv(n,r,i,s,e,o),e)}_compound_statement(){const e=[];for(this._consume(ae.tokens.brace_left,"Expected '{' for block.");!this._check(ae.tokens.brace_right);){const n=this._statement();n!==null&&e.push(n)}return this._consume(ae.tokens.brace_right,"Expected '}' for block."),e}_statement(){for(;this._match(ae.tokens.semicolon)&&!this._isAtEnd(););if(this._check(ae.tokens.attr)&&this._attribute(),this._check(ae.keywords.if))return this._if_statement();if(this._check(ae.keywords.switch))return this._switch_statement();if(this._check(ae.keywords.loop))return this._loop_statement();if(this._check(ae.keywords.for))return this._for_statement();if(this._check(ae.keywords.while))return this._while_statement();if(this._check(ae.keywords.continuing))return this._continuing_statement();if(this._check(ae.keywords.static_assert))return this._static_assert_statement();if(this._check(ae.tokens.brace_left))return this._compound_statement();let e=null;if(this._check(ae.keywords.return))e=this._return_statement();else if(this._check([ae.keywords.var,ae.keywords.let,ae.keywords.const]))e=this._variable_statement();else if(this._match(ae.keywords.discard))e=this._updateNode(new Wse);else if(this._match(ae.keywords.break)){const n=this._updateNode(new S$);if(this._currentLoop.length>0){const r=this._currentLoop[this._currentLoop.length-1];n.loopId=r.id}e=n,this._check(ae.keywords.if)&&(this._advance(),n.condition=this._optional_paren_expression())}else if(this._match(ae.keywords.continue)){const n=this._updateNode(new T$);if(!(this._currentLoop.length>0))throw this._error(this._peek(),`Continue statement must be inside a loop. Line: ${n.line}`);{const r=this._currentLoop[this._currentLoop.length-1];n.loopId=r.id}e=n}else e=this._increment_decrement_statement()||this._func_call_statement()||this._assignment_statement();return e!=null&&this._consume(ae.tokens.semicolon,"Expected ';' after statement."),e}_static_assert_statement(){if(!this._match(ae.keywords.static_assert))return null;const e=this._currentLine,n=this._optional_paren_expression();return this._updateNode(new zse(n),e)}_while_statement(){if(!this._match(ae.keywords.while))return null;const e=this._updateNode(new m$(null,null));return this._currentLoop.push(e),e.condition=this._optional_paren_expression(),this._check(ae.tokens.attr)&&this._attribute(),e.body=this._compound_statement(),this._currentLoop.pop(),e}_continuing_statement(){const e=this._currentLoop.length>0?this._currentLoop[this._currentLoop.length-1].id:-1;if(!this._match(ae.keywords.continuing))return null;const n=this._currentLine,r=this._compound_statement();return this._updateNode(new fP(r,e),n)}_for_statement(){if(!this._match(ae.keywords.for))return null;this._consume(ae.tokens.paren_left,"Expected '('.");const e=this._updateNode(new v$(null,null,null,null));return this._currentLoop.push(e),e.init=this._check(ae.tokens.semicolon)?null:this._for_init(),this._consume(ae.tokens.semicolon,"Expected ';'."),e.condition=this._check(ae.tokens.semicolon)?null:this._short_circuit_or_expression(),this._consume(ae.tokens.semicolon,"Expected ';'."),e.increment=this._check(ae.tokens.paren_right)?null:this._for_increment(),this._consume(ae.tokens.paren_right,"Expected ')'."),this._check(ae.tokens.attr)&&this._attribute(),e.body=this._compound_statement
148(),this._currentLoop.pop(),e}_for_init(){return this._variable_statement()||this._func_call_statement()||this._assignment_statement()}_for_increment(){return this._func_call_statement()||this._increment_decrement_statement()||this._assignment_statement()}_variable_statement(){if(this._check(ae.keywords.var)){const e=this._variable_decl();if(e===null)throw this._error(this._peek(),"Variable declaration expected.");let n=null;return this._match(ae.tokens.equal)&&(n=this._short_circuit_or_expression()),this._updateNode(new Ec(e.name,e.type,e.storage,e.access,n),e.line)}if(this._match(ae.keywords.let)){const e=this._currentLine,n=this._consume(ae.tokens.name,"Expected name for let.").toString();let r=null;if(this._match(ae.tokens.colon)){const s=this._attribute();r=this._type_decl(),r!=null&&(r.attributes=s)}this._consume(ae.tokens.equal,"Expected '=' for let.");const i=this._short_circuit_or_expression();return this._updateNode(new Z1(n,r,null,null,i),e)}if(this._match(ae.keywords.const)){const e=this._currentLine,n=this._consume(ae.tokens.name,"Expected name for const.").toString();let r=null;if(this._match(ae.tokens.colon)){const s=this._attribute();r=this._type_decl(),r!=null&&(r.attributes=s)}this._consume(ae.tokens.equal,"Expected '=' for const.");const i=this._short_circuit_or_expression();return r===null&&i instanceof qr&&(r=i.type),this._updateNode(new c_(n,r,null,null,i),e)}return null}_increment_decrement_statement(){const e=this._current,n=this._unary_expression();if(n==null)return null;if(!this._check(ae.increment_operators))return this._current=e,null;const r=this._consume(ae.increment_operators,"Expected increment operator");return this._updateNode(new y$(r.type===ae.tokens.plus_plus?pg.increment:pg.decrement,n))}_assignment_statement(){let e=null;const n=this._currentLine;if(this._check(ae.tokens.brace_right))return null;let r=this._match(ae.tokens.underscore);if(r||(e=this._unary_expression()),!r&&e==null)return null;const i=this._consume(ae.assignment_operators,"Expected assignment operator."),s=this._short_circuit_or_expression();return this._updateNode(new b$(M1.parse(i.lexeme),e,s),n)}_func_call_statement(){if(!this._check(ae.tokens.ident))return null;const e=this._currentLine,n=this._current,r=this._consume(ae.tokens.ident,"Expected function name."),i=this._argument_expression_list();return i===null?(this._current=n,null):this._updateNode(new rM(r.lexeme,i),e)}_loop_statement(){if(!this._match(ae.keywords.loop))return null;this._check(ae.tokens.attr)&&this._attribute(),this._consume(ae.tokens.brace_left,"Expected '{' for loop.");const e=this._updateNode(new _$([],null));this._currentLoop.push(e);let n=this._statement();for(;n!==null;){if(Array.isArray(n))for(let r of n)e.body.push(r);else e.body.push(n);if(n instanceof fP){e.continuing=n;break}n=this._statement()}return this._currentLoop.pop(),this._consume(ae.tokens.brace_right,"Expected '}' for loop."),e}_switch_statement(){if(!this._match(ae.keywords.switch))return null;const e=this._updateNode(new w$(null,[]));if(this._currentLoop.push(e),e.condition=this._optional_paren_expression(),this._check(ae.tokens.attr)&&this._attribute(),this._consume(ae.tokens.brace_left,"Expected '{' for switch."),e.cases=this._switch_body(),e.cases==null||e.cases.length==0)throw this._error(this._previous(),"Expected 'case' or 'default'.");return this._consume(ae.tokens.brace_right,"Expected '}' for switch."),this._currentLoop.pop(),e}_switch_body(){const e=[];let n=!1;for(;this._check([ae.keywords.default,ae.keywords.case]);){if(this._match(ae.keywords.case)){const r=this._case_selectors();for(const s of r)if(s instanceof h_){if(n)throw this._error(this._previous(),"Multiple default cases in switch statement.");n=!0;break}this._match(ae.tokens.colon),this._check(ae.tokens.attr)&&this._attribute(),this._consume(ae.tokens.brace_left,"Exected '{' for switch case.");const i=this._case_body();this._consume(ae.tokens.brace_right,"Exected '}' for switch case."),e.push(this._updateNode(new M$(r,i)))}if(this._match(ae.keywords.default)){if(n)throw this._error(this._previous(),"Multiple default cases in switch statement.");this._match(ae.tokens.colon),this._check(ae.tokens.attr)&&this._attribute(),this._consume(ae.tokens.brace_left,"Exected '{' for switch default.");const r=this._case_body();this._consume(ae.tokens.brace_right,"Exected '}' for switch default."),e.push(this._updateNode(new R$(r)))}}return e}_case_selectors(){const e=[];for(this._match(ae.keywords.default)?e.push(this._updateNode(new h_)):e.push(this._shift_expression());this._match(ae.tokens.comma);)this._match(ae.keywords.default)?e.push(this._updateNode(new h_)):e.push(this._shift_expression());return e}_case_body(){if(this._match(ae.keywords.fallthrough))return this._consume(ae.tokens.semicolon,"Expected ';'"),[];
148let e=this._statement();if(e==null)return[];e instanceof Array||(e=[e]);const n=this._case_body();return n.length==0?e:[...e,n[0]]}_if_statement(){if(!this._match(ae.keywords.if))return null;const e=this._currentLine,n=this._optional_paren_expression();this._check(ae.tokens.attr)&&this._attribute();const r=this._compound_statement();let i=[];this._match_elseif()&&(this._check(ae.tokens.attr)&&this._attribute(),i=this._elseif_statement(i));let s=null;return this._match(ae.keywords.else)&&(this._check(ae.tokens.attr)&&this._attribute(),s=this._compound_statement()),this._updateNode(new x$(n,r,i,s),e)}_match_elseif(){return this._tokens[this._current].type===ae.keywords.else&&this._tokens[this._current+1].type===ae.keywords.if&&(this._advance(),this._advance(),!0)}_elseif_statement(e=[]){const n=this._optional_paren_expression(),r=this._compound_statement();return e.push(this._updateNode(new $se(n,r))),this._match_elseif()&&(this._check(ae.tokens.attr)&&this._attribute(),this._elseif_statement(e)),e}_return_statement(){if(!this._match(ae.keywords.return))return null;const e=this._short_circuit_or_expression();return this._updateNode(new A$(e))}_short_circuit_or_expression(){let e=this._short_circuit_and_expr();for(;this._match(ae.tokens.or_or);)e=this._updateNode(new ga(this._previous().toString(),e,this._short_circuit_and_expr()));return e}_short_circuit_and_expr(){let e=this._inclusive_or_expression();for(;this._match(ae.tokens.and_and);)e=this._updateNode(new ga(this._previous().toString(),e,this._inclusive_or_expression()));return e}_inclusive_or_expression(){let e=this._exclusive_or_expression();for(;this._match(ae.tokens.or);)e=this._updateNode(new ga(this._previous().toString(),e,this._exclusive_or_expression()));return e}_exclusive_or_expression(){let e=this._and_expression();for(;this._match(ae.tokens.xor);)e=this._updateNode(new ga(this._previous().toString(),e,this._and_expression()));return e}_and_expression(){let e=this._equality_expression();for(;this._match(ae.tokens.and);)e=this._updateNode(new ga(this._previous().toString(),e,this._equality_expression()));return e}_equality_expression(){const e=this._relational_expression();return this._match([ae.tokens.equal_equal,ae.tokens.not_equal])?this._updateNode(new ga(this._previous().toString(),e,this._relational_expression())):e}_relational_expression(){let e=this._shift_expression();for(;this._match([ae.tokens.less_than,ae.tokens.greater_than,ae.tokens.less_than_equal,ae.tokens.greater_than_equal]);)e=this._updateNode(new ga(this._previous().toString(),e,this._shift_expression()));return e}_shift_expression(){let e=this._additive_expression();for(;this._match([ae.tokens.shift_left,ae.tokens.shift_right]);)e=this._updateNode(new ga(this._previous().toString(),e,this._additive_expression()));return e}_additive_expression(){let e=this._multiplicative_expression();for(;this._match([ae.tokens.plus,ae.tokens.minus]);)e=this._updateNode(new ga(this._previous().toString(),e,this._multiplicative_expression()));return e}_multiplicative_expression(){let e=this._unary_expression();for(;this._match([ae.tokens.star,ae.tokens.forward_slash,ae.tokens.modulo]);)e=this._updateNode(new ga(this._previous().toString(),e,this._unary_expression()));return e}_unary_expression(){return this._match([ae.tokens.minus,ae.tokens.bang,ae.tokens.tilde,ae.tokens.star,ae.tokens.and])?this._updateNode(new kr(this._previous().toString(),this._unary_expression())):this._singular_expression()}_singular_expression(){const e=this._primary_expression(),n=this._postfix_expression();return n&&(e.postfix=n),e}_postfix_expression(){if(this._match(ae.tokens.bracket_left)){const e=this._short_circuit_or_expression();this._consume(ae.tokens.bracket_right,"Expected ']'.");const n=this._updateNode(new Kg(e)),r=this._postfix_expression();return r&&(n.postfix=r),n}if(this._match(ae.tokens.period)){const e=this._consume(ae.tokens.name,"Expected member name."),n=this._postfix_expression(),r=this._updateNode(new Kh(e.lexeme));return n&&(r.postfix=n),r}return null}_getStruct(e){return this._context.aliases.has(e)?this._context.aliases.get(e).type:this._context.structs.has(e)?this._context.structs.get(e):null}_getType(e){const n=this._getStruct(e);
148if(n!==null)return n;switch(e){case"void":return rt.void;case"bool":return rt.bool;case"i32":return rt.i32;case"u32":return rt.u32;case"f32":return rt.f32;case"f16":return rt.f16;case"vec2f":return Be.vec2f;case"vec3f":return Be.vec3f;case"vec4f":return Be.vec4f;case"vec2i":return Be.vec2i;case"vec3i":return Be.vec3i;case"vec4i":return Be.vec4i;case"vec2u":return Be.vec2u;case"vec3u":return Be.vec3u;case"vec4u":return Be.vec4u;case"vec2h":return Be.vec2h;case"vec3h":return Be.vec3h;case"vec4h":return Be.vec4h;case"mat2x2f":return Be.mat2x2f;case"mat2x3f":return Be.mat2x3f;case"mat2x4f":return Be.mat2x4f;case"mat3x2f":return Be.mat3x2f;case"mat3x3f":return Be.mat3x3f;case"mat3x4f":return Be.mat3x4f;case"mat4x2f":return Be.mat4x2f;case"mat4x3f":return Be.mat4x3f;case"mat4x4f":return Be.mat4x4f;case"mat2x2h":return Be.mat2x2h;case"mat2x3h":return Be.mat2x3h;case"mat2x4h":return Be.mat2x4h;case"mat3x2h":return Be.mat3x2h;case"mat3x3h":return Be.mat3x3h;case"mat3x4h":return Be.mat3x4h;case"mat4x2h":return Be.mat4x2h;case"mat4x3h":return Be.mat4x3h;case"mat4x4h":return Be.mat4x4h;case"mat2x2i":return Be.mat2x2i;case"mat2x3i":return Be.mat2x3i;case"mat2x4i":return Be.mat2x4i;case"mat3x2i":return Be.mat3x2i;case"mat3x3i":return Be.mat3x3i;case"mat3x4i":return Be.mat3x4i;case"mat4x2i":return Be.mat4x2i;case"mat4x3i":return Be.mat4x3i;case"mat4x4i":return Be.mat4x4i;case"mat2x2u":return Be.mat2x2u;case"mat2x3u":return Be.mat2x3u;case"mat2x4u":return Be.mat2x4u;case"mat3x2u":return Be.mat3x2u;case"mat3x3u":return Be.mat3x3u;case"mat3x4u":return Be.mat3x4u;case"mat4x2u":return Be.mat4x2u;case"mat4x3u":return Be.mat4x3u;case"mat4x4u":return Be.mat4x4u}return null}_validateTypeRange(e,n){if(n.name==="i32"){if(e<-2147483648||e>2147483647)throw this._error(this._previous(),`Value out of range for i32: ${e}. Line: ${this._currentLine}.`)}else if(n.name==="u32"&&(e<0||e>4294967295))throw this._error(this._previous(),`Value out of range for u32: ${e}. Line: ${this._currentLine}.`)}_primary_expression(){if(this._match(ae.tokens.ident)){const r=this._previous().toString();if(this._check(ae.tokens.paren_left)){const i=this._argument_expression_list(),s=this._getType(r);return s!==null?this._updateNode(new ml(s,i)):this._updateNode(new sM(r,i))}if(this._context.constants.has(r)){const i=this._context.constants.get(r);return this._updateNode(new C$(r,i.value))}return this._updateNode(new ro(r))}if(this._match(ae.tokens.int_literal)){const r=this._previous().toString();let i=r.endsWith("i")||r.endsWith("i")?rt.i32:r.endsWith("u")||r.endsWith("U")?rt.u32:rt.x32;const s=parseInt(r);return this._validateTypeRange(s,i),this._updateNode(new qr(new De(s,this._exec.getTypeInfo(i)),i))}if(this._match(ae.tokens.uint_literal)){const r=parseInt(this._previous().toString());return this._validateTypeRange(r,rt.u32),this._updateNode(new qr(new De(r,this._exec.getTypeInfo(rt.u32)),rt.u32))}if(this._match([ae.tokens.decimal_float_literal,ae.tokens.hex_float_literal])){let r=this._previous().toString(),i=r.endsWith("h");i&&(r=r.substring(0,r.length-1));const s=parseFloat(r);this._validateTypeRange(s,i?rt.f16:rt.f32);const o=i?rt.f16:rt.f32;return this._updateNode(new qr(new De(s,this._exec.getTypeInfo(o)),o))}if(this._match([ae.keywords.true,ae.keywords.false])){let r=this._previous().toString()===ae.keywords.true.rule;return this._updateNode(new qr(new De(r?1:0,this._exec.getTypeInfo(rt.bool)),rt.bool))}if(this._check(ae.tokens.paren_left))return this._paren_expression();if(this._match(ae.keywords.bitcast)){this._consume(ae.tokens.less_than,"Expected '<'.");const r=this._type_decl();this._consume(ae.tokens.greater_than,"Expected '>'.");const i=this._paren_expression();return this._updateNode(new P$(r,i))}const e=this._type_decl(),n=this._argument_expression_list();return this._updateNode(new ml(e,n))}_argument_expression_list(){if(!this._match(ae.tokens.paren_left))return null;const e=[];do{if(this._check(ae.tokens.paren_right))break;const n=this._short_circuit_or_expression();e.push(n)}while(this._match(ae.tokens.comma));return this._consume(ae.tokens.paren_right,"Expected ')' for agument list"),e}_optional_paren_expression(){this._match(ae.tokens.paren_left);const e=this._short_circuit_or_expression();return this._match(ae.tokens.paren_right),e}_paren_expression(){this._consume(ae.tokens.paren_left,"Expected '('.");const e=this._short_circuit_or_expression();return this._consume(ae.tokens.paren_right,"Expected ')'."),e}
148_struct_decl(){if(!this._match(ae.keywords.struct))return null;const e=this._currentLine,n=this._consume(ae.tokens.ident,"Expected name for struct.").toString();this._consume(ae.tokens.brace_left,"Expected '{' for struct body.");const r=[];for(;!this._check(ae.tokens.brace_right);){const o=this._attribute(),a=this._consume(ae.tokens.name,"Expected variable name.").toString();this._consume(ae.tokens.colon,"Expected ':' for struct member type.");const l=this._attribute(),c=this._type_decl();c!=null&&(c.attributes=l),this._check(ae.tokens.brace_right)?this._match(ae.tokens.comma):this._consume(ae.tokens.comma,"Expected ',' for struct member."),r.push(this._updateNode(new Hk(a,c,o)))}this._consume(ae.tokens.brace_right,"Expected '}' after struct body.");const i=this._currentLine,s=this._updateNode(new xc(n,r,e,i),e);return this._context.structs.set(n,s),s}_global_variable_decl(){const e=this._variable_decl();if(!e)return null;if(this._match(ae.tokens.equal)){const n=this._const_expression();e.value=n}if(e.type!==null&&e.value instanceof qr){if(e.value.type.name!=="x32"&&e.type.getTypeName()!==e.value.type.getTypeName())throw this._error(this._peek(),`Invalid cast from ${e.value.type.name} to ${e.type.name}. Line:${this._currentLine}`);e.value.isScalar&&this._validateTypeRange(e.value.scalarValue,e.type),e.value.type=e.type}else e.type===null&&e.value instanceof qr&&(e.type=e.value.type.name==="x32"?rt.i32:e.value.type,e.value.isScalar&&this._validateTypeRange(e.value.scalarValue,e.type));return e}_override_variable_decl(){const e=this._override_decl();return e&&this._match(ae.tokens.equal)&&(e.value=this._const_expression()),e}_global_const_decl(){var e;if(!this._match(ae.keywords.const))return null;const n=this._consume(ae.tokens.name,"Expected variable name"),r=this._currentLine;let i=null;if(this._match(ae.tokens.colon)){const l=this._attribute();i=this._type_decl(),i!=null&&(i.attributes=l)}let s=null;this._consume(ae.tokens.equal,"const declarations require an assignment");const o=this._short_circuit_or_expression();try{let l=[rt.f32],c=o.constEvaluate(this._exec,l);c instanceof De&&this._validateTypeRange(c.value,l[0]),l[0]instanceof Be&&l[0].format===null&&c.typeInfo instanceof Yh&&c.typeInfo.format!==null&&(c.t
148ypeInfo.format.name==="f16"?l[0].format=rt.f16:c.typeInfo.format.name==="f32"?l[0].format=rt.f32:c.typeInfo.format.name==="i32"?l[0].format=rt.i32:c.typeInfo.format.name==="u32"?l[0].format=rt.u32:c.typeInfo.format.name==="bool"?l[0].format=rt.bool:console.error(`TODO: impelement template format type ${c.typeInfo.format.name}`)),s=this._updateNode(new qr(c,l[0])),this._exec.context.setVariable(n.toString(),c)}catch{s=o}if(i!==null&&s instanceof qr){if(s.type.name!=="x32"&&i.getTypeName()!==s.type.getTypeName())throw this._error(this._peek(),`Invalid cast from ${s.type.name} to ${i.name}. Line:${this._currentLine}`);s.type=i,s.isScalar&&this._validateTypeRange(s.scalarValue,s.type)}else i===null&&s instanceof qr&&(i=(e=s==null?void 0:s.type)!==null&&e!==void 0?e:rt.f32,i===rt.x32&&(i=rt.i32));const a=this._updateNode(new c_(n.toString(),i,"","",s),r);return this._context.constants.set(a.name,a),a}_global_let_decl(){if(!this._match(ae.keywords.let))return null;const e=this._currentLine,n=this._consume(ae.tokens.name,"Expected variable name");let r=null;if(this._match(ae.tokens.colon)){const s=this._attribute();r=this._type_decl(),r!=null&&(r.attributes=s)}let i=null;if(this._match(ae.tokens.equal)&&(i=this._const_expression()),r!==null&&i instanceof qr){if(i.type.name!=="x32"&&r.getTypeName()!==i.type.getTypeName())throw this._error(this._peek(),`Invalid cast from ${i.type.name} to ${r.name}. Line:${this._currentLine}`);i.type=r}else r===null&&i instanceof qr&&(r=i.type.name==="x32"?rt.i32:i.type);return i instanceof qr&&i.isScalar&&this._validateTypeRange(i.scalarValue,r),this._updateNode(new Z1(n.toString(),r,"","",i),e)}_const_expression(){return this._short_circuit_or_expression()}_variable_decl(){if(!this._match(ae.keywords.var))return null;const e=this._currentLine;let n="",r="";this._match(ae.tokens.less_than)&&(n=this._consume(ae.storage_class,"Expected storage_class.").toString(),this._match(ae.tokens.comma)&&(r=this._consume(ae.access_mode,"Expected access_mode.").toString()),this._consume(ae.tokens.greater_than,"Expected '>'."));const i=this._consume(ae.tokens.name,"Expected variable name");let s=null;if(this._match(ae.tokens.colon)){const o=this._attribute();s=this._type_decl(),s!=null&&(s.attributes=o)}return this._updateNode(new Ec(i.toString(),s,n,r,null),e)}_override_decl(){if(!this._match(ae.keywords.override))return null;const e=this._consume(ae.tokens.name,"Expected variable name");let n=null;if(this._match(ae.tokens.colon)){const r=this._attribute();n=this._type_decl(),n!=null&&(n.attributes=r)}return this._updateNode(new nM(e.toString(),n,null))}_diagnostic(){this._consume(ae.tokens.paren_left,"Expected '('");const e=this._consume(ae.tokens.ident,"Expected severity control name.");this._consume(ae.tokens.comma,"Expected ','");let n=this._consume(ae.tokens.ident,"Expected diagnostic rule name.").toString();return this._match(ae.tokens.period)&&(n+=`.${this._consume(ae.tokens.ident,"Expected diagnostic message.").toString()}`),this._consume(ae.tokens.paren_right,"Expected ')'"),this._updateNode(new E$(e.toString(),n))}_enable_directive(){const e=this._consume(ae.tokens.ident,"identity expected.");return this._updateNode(new jse(e.toString()))}_requires_directive(){const e=[this._consume(ae.tokens.ident,"identity expected.").toString()];for(;this._match(ae.tokens.comma);){const n=this._consume(ae.tokens.ident,"identity expected.");e.push(n.toString())}return this._updateNode(new Vse(e))}_type_alias(){const e=this._consume(ae.tokens.ident,"identity expected.");this._consume(ae.tokens.equal,"Expected '=' for type alias.");let n=this._type_decl();if(n===null)throw this._error(this._peek(),"Expected Type for Alias.");this._context.aliases.has(n.name)&&(n=this._context.aliases.get(n.name).type);const r=this._updateNode(new iM(e.toString(),n));return this._context.aliases.set(r.name,r),r}_type_decl(){if(this._check([ae.tokens.ident,...ae.texel_format,ae.keywords.bool,ae.keywords.f32,ae.keywords.i32,ae.keywords.u32])){const r=this._advance().toString();if(this._context.structs.has(r))return this._context.structs.get(r);if(this._context.aliases.has(r))return this._context.aliases.get(r).type;if(!this._getType(r)){const i=this._updateNode(new Wk(r));return this._forwardTypeCount++,i}return this._updateNode(new rt(r))}let e=this._texture_sampler_types();if(e)return e;if(this._check(ae.template_types)){let r=this._advance().toString(),i=null,s=null;return this._match(ae.tokens.less_than)&&(i=this._type_decl(),s=null,this._match(ae.tokens.comma)&&(s=this._consume(ae.access_mode,"Expected access_mode for pointer").toString()),this._consume(ae.tokens.greater_than,"Expected '>' for type.")),this._updateNode(new Be(r,i,s))}if(this._match(ae.keywords.ptr)){let r=this._previous().toString();this._consume(ae.tokens.less_than,"Expected '<' for pointer.");const i=this._consume(ae.storage_class,"Expected storage_class for pointer");this._consume(ae.tokens.comma,"Expected ',' for pointer.");const s=this._type_decl();let o=null;return this._match(ae.tokens.comma)&&(o=this._consume(ae.access_mode,"Expected access_mode for pointer").toString()),this._consume(ae.tokens.greater_than,"Expected '>' for pointer."),this._updateNode(new f_(r,i.toString(),s,o))}const n=this._attribute();if(this._match(ae.keywords.array)){let r=null,i=-1;const s=this._previous();let o=null;if(this._match(ae.tokens.less_than)){r=this._type_decl(),this._context.aliases.has(r.name)&&(r=this._context.aliases.get(r.name).type);let l="";if(this._match(ae.tokens.comma)){o=this._shift_expression();try{l=o.constEvaluate(this._exec).toString(),o=null}catch{l="1"}}this._consume(ae.tokens.greater_than,"Expected '>' for array."),i=l?parseInt(l):0}const a=this._updateNode(new J1(s.toString(),n,r,i));return o&&this._deferArrayCountEval.push({arrayType:a,countNode:o}),a}return null}_texture_sampler_types(){if(this._match(ae.sampler_type))return this._updateNode(new R1(this._previous().toString(),null,null));if(this._match(ae.depth_texture_type))return this._updateNode(new R1(this._previous().toString(),null,null));if(this._match(ae.sampled_texture_type)||this._match(ae.multisampled_texture_type)){const e=this._previous();this._consume(ae.tokens.less_than,"Expected '<' for sampler type.");const n=this._type_decl();return this._consume(ae.tokens.greater_than,"Expected '>' for sampler type."),this._updateNode(new R1(e.toString(),n,null))}if(this._match(ae.storage_texture_type)){const e=this._previous();this._consume(ae.tokens.less_than,"Expected '<' for sampler type.");const n=this._consume(ae.texel_format,"Invalid texel format.").toString();this._consume(ae.tokens.comma,"Expected ',' after texel format.");const r=this._consume(ae.access_mode,"Expected access mode for storage texture type.").toString();return this._consume(ae.tokens.greater_than,"Expected '>' for sampler type."),this._updateNode(new R1(e.toString(),n,r))}return null}_attribute(){let e=[];for(;this._match(ae.tokens.attr);){const n=this._consume(ae.attribute_name,"Expected attribute name"),r=this._updateNode(new k$(n.toString(),null));if(this._match(ae.tokens.paren_left)){if(r.value=this._consume(ae.literal_or_ident,"Expected attribute value").toString(),this._check(ae.tokens.comma)){this._advance();do{const i=this._consume(ae.literal_or_ident,"Expected attribute value").toString();r.value instanceof Array||(r.value=[r.value]),r.value.push(i)}while(this._match(ae.tokens.comma))}this._consume(ae.tokens.paren_right,"Expected ')'")}e.push(r)}return e.length==0?null:e}},aoe=class extends ev{constructor(e){super(),e&&this.update(e)}update(e){const n=new ooe().parse(e);this.updateAST(n)}};function loe(t){var s;const e={attributes:[],bindings:[]};let n;try{n=coe(t)}catch(o){return ut.error(o.message)(),e}for(const o of n.uniforms){const a=[];for(const l of((s=o.type)==null?void 0:s.members)||[])a.push({name:l.name,type:Xk(l.type)});e.bindings.push({type:"uniform",name:o.name,group:o.group,location:o.binding,members:a})}for(const o of n.textures)e.bindings.push({type:"texture",name:o.name,group:o.group,location:o.binding});for(const o of n.samplers)e.bindings.push({type:"sampler",name:o.name,group:o.group,location:o.binding});const r=n.entry.vertex[0],i=(r==null?void 0:r.inputs.length)||0;for(let o=0;o<i;o++){const a=r.inputs[o];if(a.locationType==="location"){const l=Xk(a.type);e.attributes.push({name:a.name,location:Number(a.location),type:l})}}return e}function Xk(t){return t.format?`${t.name}<${t.format.name}>`:t.name}function coe(t){try{return new aoe(t)}catch(e){if(e instanceof Error)throw e;let n="WGSL parse error";throw typeof e=="object"&&(e!=null&&e.message)&&(n+=`: ${e.message} `),typeof e=="object"&&(e!=null&&e.token)&&(n+=e.token.line||""),new Error(n,{cause:e})}}const uoe={EPSILON:1e-12,debug:!1,precision:4,printTypes:!1,printDegrees:!1,printRowMajor:!0,_cartographicRadians:!1};globalThis.mathgl=globalThis.mathgl||{config:{...uoe}};const ks=globalThis.mathgl.config;function foe(t,{precision:e=ks.precision}={}){return t=hoe(t),`${parseFloat(t.toPrecision(e))}`}function Gh(t){return Array.isArray(t)||ArrayBuffer.isView(t)&&!(t instanceof DataView)}function wl(t,e,n){return poe(t,r=>Math.max(e,Math.min(n,r)))}function Sl(t,e,n){return Gh(t)?t.map((r,i)=>Sl(r,e[i],n)):n*e+(1-n)*t}function Tl(t,e,n){const r=ks.EPSILON;try{if(t===e)return!0;
vendor: 34,502 bytes, lines 148-167
148if(Gh(t)&&Gh(e)){if(t.length!==e.length)return!1;for(let i=0;i<t.length;++i)if(!Tl(t[i],e[i]))return!1;return!0}return t&&t.equals?t.equals(e):e&&e.equals?e.equals(t):typeof t=="number"&&typeof e=="number"?Math.abs(t-e)<=ks.EPSILON*Math.max(1,Math.abs(t),Math.abs(e)):!1}finally{ks.EPSILON=r}}function hoe(t){return Math.round(t/ks.EPSILON)*ks.EPSILON}function doe(t){return t.clone?t.clone():new Array(t.length)}function poe(t,e,n){if(Gh(t)){const r=t;n=n||doe(r);for(let i=0;i<n.length&&i<r.length;++i){const s=typeof t=="number"?t:t[i];n[i]=e(s,i,n)}return n}return e(t)}class aM extends Array{clone(){return new this.constructor().copy(this)}fromArray(e,n=0){for(let r=0;r<this.ELEMENTS;++r)this[r]=e[r+n];return this.check()}toArray(e=[],n=0){for(let r=0;r<this.ELEMENTS;++r)e[n+r]=this[r];return e}toObject(e){return e}from(e){return Array.isArray(e)?this.copy(e):this.fromObject(e)}to(e){return e===this?this:Gh(e)?this.toArray(e):this.toObject(e)}toTarget(e){return e?this.to(e):this}toFloat32Array(){return new Float32Array(this)}toString(){return this.formatString(ks)}formatString(e){let n="";for(let r=0;r<this.ELEMENTS;++r)n+=(r>0?", ":"")+foe(this[r],e);return`${e.printTypes?this.constructor.name:""}[${n}]`}equals(e){if(!e||this.length!==e.length)return!1;for(let n=0;n<this.ELEMENTS;++n)if(!Tl(this[n],e[n]))return!1;return!0}exactEquals(e){if(!e||this.length!==e.length)return!1;for(let n=0;n<this.ELEMENTS;++n)if(this[n]!==e[n])return!1;return!0}negate(){for(let e=0;e<this.ELEMENTS;++e)this[e]=-this[e];return this.check()}lerp(e,n,r){if(r===void 0)return this.lerp(this,e,n);for(let i=0;i<this.ELEMENTS;++i){const s=e[i],o=typeof n=="number"?n:n[i];this[i]=s+r*(o-s)}return this.check()}min(e){for(let n=0;n<this.ELEMENTS;++n)this[n]=Math.min(e[n],this[n]);return this.check()}max(e){for(let n=0;n<this.ELEMENTS;++n)this[n]=Math.max(e[n],this[n]);return this.check()}clamp(e,n){for(let r=0;r<this.ELEMENTS;++r)this[r]=Math.min(Math.max(this[r],e[r]),n[r]);return this.check()}add(...e){for(const n of e)for(let r=0;r<this.ELEMENTS;++r)this[r]+=n[r];return this.check()}subtract(...e){for(const n of e)for(let r=0;r<this.ELEMENTS;++r)this[r]-=n[r];return this.check()}scale(e){if(typeof e=="number")for(let n=0;n<this.ELEMENTS;++n)this[n]*=e;else for(let n=0;n<this.ELEMENTS&&n<e.length;++n)this[n]*=e[n];return this.check()}multiplyByScalar(e){for(let n=0;n<this.ELEMENTS;++n)this[n]*=e;return this.check()}check(){if(ks.debug&&!this.validate())throw new Error(`math.gl: ${this.constructor.name} some fields set to invalid numbers'`);return this}validate(){let e=this.length===this.ELEMENTS;for(let n=0;n<this.ELEMENTS;++n)e=e&&Number.isFinite(this[n]);return e}sub(e){return this.subtract(e)}setScalar(e){for(let n=0;n<this.ELEMENTS;++n)this[n]=e;return this.check()}addScalar(e){for(let n=0;n<this.ELEMENTS;++n)this[n]+=e;return this.check()}subScalar(e){return this.addScalar(-e)}multiplyScalar(e){for(let n=0;n<this.ELEMENTS;++n)this[n]*=e;return this.check()}divideScalar(e){return this.multiplyByScalar(1/e)}clampScalar(e,n){for(let r=0;r<this.ELEMENTS;++r)this[r]=Math.min(Math.max(this[r],e),n);return this.check()}get elements(){return this}}function goe(t,e){if(t.length!==e)return!1;for(let n=0;n<t.length;++n)if(!Number.isFinite(t[n]))return!1;return!0}function Vn(t){if(!Number.isFinite(t))throw new Error(`Invalid number ${JSON.stringify(t)}`);return t}function tv(t,e,n=""){if(ks.debug&&!goe(t,e))throw new Error(`math.gl: ${n} some fields set to invalid numbers'`);return t}function bv(t,e){if(!t)throw new Error(`math.gl assertion ${e}`)}class U$ extends aM{get x(){return this[0]}set x(e){this[0]=Vn(e)}get y(){return this[1]}set y(e){this[1]=Vn(e)}len(){return Math.sqrt(this.lengthSquared())}magnitude(){return this.len()}lengthSquared(){let e=0;for(let n=0;n<this.ELEMENTS;++n)e+=this[n]*this[n];return e}magnitudeSquared(){return this.lengthSquared()}distance(e){return Math.sqrt(this.distanceSquared(e))}distanceSquared(e){let n=0;for(let r=0;r<this.ELEMENTS;++r){const i=this[r]-e[r];n+=i*i}return Vn(n)}dot(e){let n=0;for(let r=0;r<this.ELEMENTS;++r)n+=this[r]*e[r];return Vn(n)}normalize(){const e=this.magnitude();if(e!==0)for(let n=0;n<this.ELEMENTS;++n)this[n]/=e;return this.check()}multiply(...e){for(const n of e)for(let r=0;r<this.ELEMENTS;++r)this[r]*=n[r];return this.check()}divide(...e){for(const n of e)for(let r=0;r<this.ELEMENTS;++r)this[r]/=n[r];return this.check()}lengthSq(){return this.lengthSquared()}distanceTo(e){return this.distance(e)}distanceToSquared(e){return this.distanceSquared(e)}getComponent(e){return bv(e>=0&&e<this.ELEMENTS,"index is out of range"),Vn(this[e])}setComponent(e,n){return bv(e>=0&&e<this.ELEMENTS,"index is out of range"),this[e]=n,this.check()}addVectors(e,n){return this.copy(e).add(n)}subVectors(e,n){return this.copy(e).subtract(n)}multiplyVectors(e,n){return this.copy(e).multiply(n)}addScaledVector(e,n){return this.add(new this.constructor(e).multiplyScalar(n))}}const nv=1e-6;let Ia=typeof Float32Array<"u"?Float32Array:Array;function moe(){const t=new Ia(2);return Ia!=Float32Array&&(t[0]=0,t[1]=0),t}function _v(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t}function voe(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t}function yoe(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t}function boe(t){const e=t[0],n=t[1];return Math.sqrt(e*e+n*n)}function z$(t,e){return t[0]=-e[0],t[1]=-e[1],t}function j$(t,e,n,r){const i=e[0],s=e[1];return t[0]=i+r*(n[0]-i),t[1]=s+r*(n[1]-s),t}function _oe(t,e,n){const r=e[0],i=e[1];return t[0]=n[0]*r+n[3]*i+n[6],t[1]=n[1]*r+n[4]*i+n[7],t}function woe(t,e,n){const r=e[0],i=e[1];return t[0]=n[0]*r+n[4]*i+n[12],t[1]=n[1]*r+n[5]*i+n[13],t}const xoe=voe;(function(){const t=moe();return function(e,n,r,i,s,o){let a,l;for(n||(n=2),r||(r=0),i?l=Math.min(i*n+r,e.length):l=e.length,a=r;a<l;a+=n)t[0]=e[a],t[1]=e[a+1],s(t,t,o),e[a]=t[0],e[a+1]=t[1];return e}})();function Aoe(t,e,n){const r=e[0],i=e[1],s=n[3]*r+n[7]*i||1;return t[0]=(n[0]*r+n[4]*i)/s,t[1]=(n[1]*r+n[5]*i)/s,t}function V$(t,e,n){const r=e[0],i=e[1],s=e[2],o=n[3]*r+n[7]*i+n[11]*s||1;return t[0]=(n[0]*r+n[4]*i+n[8]*s)/o,t[1]=(n[1]*r+n[5]*i+n[9]*s)/o,t[2]=(n[2]*r+n[6]*i+n[10]*s)/o,t}function Eoe(t,e,n){const r=e[0],i=e[1];return t[0]=n[0]*r+n[2]*i,t[1]=n[1]*r+n[3]*i,t[2]=e[2],t}function Soe(t,e,n){const r=e[0],i=e[1];return t[0]=n[0]*r+n[2]*i,t[1]=n[1]*r+n[3]*i,t[2]=e[2],t[3]=e[3],t}function W$(t,e,n){const r=e[0],i=e[1],s=e[2];return t[0]=n[0]*r+n[3]*i+n[6]*s,t[1]=n[1]*r+n[4]*i+n[7]*s,t[2]=n[2]*r+n[5]*i+n[8]*s,t[3]=e[3],t}function $$(){const t=new Ia(3);return Ia!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function Toe(t){const e=t[0],n=t[1],r=t[2];return Math.sqrt(e*e+n*n+r*r)}function Yk(t,e,n){const r=new Ia(3);return r[0]=t,r[1]=e,r[2]=n,r}function Coe(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function Poe(t,e){const n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2];return Math.sqrt(n*n+r*r+i*i)}function Ioe(t){const e=t[0],n=t[1],r=t[2];return e*e+n*n+r*r}function Ooe(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t}function Moe(t,e){const n=e[0],r=e[1],i=e[2];let s=n*n+r*r+i*i;return s>0&&(s=1/Math.sqrt(s)),t[0]=e[0]*s,t[1]=e[1]*s,t[2]=e[2]*s,t}function H$(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function g_(t,e,n){const r=e[0],i=e[1],s=e[2],o=n[0],a=n[1],l=n[2];return t[0]=i*l-s*a,t[1]=s*o-r*l,t[2]=r*a-i*o,t}function Roe(t,e,n,r){const i=e[0],s=e[1],o=e[2];return t[0]=i+r*(n[0]-i),t[1]=s+r*(n[1]-s),t[2]=o+r*(n[2]-o),t}function lM(t,e,n){const r=e[0],i=e[1],s=e[2];let o=n[3]*r+n[7]*i+n[11]*s+n[15];return o=o||1,t[0]=(n[0]*r+n[4]*i+n[8]*s+n[12])/o,t[1]=(n[1]*r+n[5]*i+n[9]*s+n[13])/o,t[2]=(n[2]*r+n[6]*i+n[10]*s+n[14])/o,t}function q$(t,e,n){const r=e[0],i=e[1],s=e[2];return t[0]=r*n[0]+i*n[3]+s*n[6],t[1]=r*n[1]+i*n[4]+s*n[7],t[2]=r*n[2]+i*n[5]+s*n[8],t}function Q$(t,e,n){const r=n[0],i=n[1],s=n[2],o=n[3],a=e[0],l=e[1],c=e[2];let u=i*c-s*l,h=s*a-r*c,d=r*l-i*a,m=i*d-s*h,y=s*u-r*d,v=r*h-i*u;const b=o*2;return u*=b,h*=b,d*=b,m*=2,y*=2,v*=2,t[0]=a+u+m,t[1]=l+h+y,t[2]=c+d+v,t}function koe(t,e,n,r){const i=[],s=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],s[0]=i[0],s[1]=i[1]*Math.cos(r)-i[2]*Math.sin(r),s[2]=i[1]*Math.sin(r)+i[2]*Math.cos(r),t[0]=s[0]+n[0],t[1]=s[1]+n[1],t[2]=s[2]+n[2],t}function Noe(t,e,n,r){const i=[],s=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],s[0]=i[2]*Math.sin(r)+i[0]*Math.cos(r),s[1]=i[1],s[2]=i[2]*Math.cos(r)-i[0]*Math.sin(r),t[0]=s[0]+n[0],t[1]=s[1]+n[1],t[2]=s[2]+n[2],t}function Doe(t,e,n,r){const i=[],s=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],s[0]=i[0]*Math.cos(r)-i[1]*Math.sin(r),s[1]=i[0]*Math.sin(r)+i[1]*Math.cos(r),s[2]=i[2],t[0]=s[0]+n[0],t[1]=s[1]+n[1],t[2]=s[2]+n[2],t}function Boe(t,e){const n=t[0],r=t[1],i=t[2],s=e[0],o=e[1],a=e[2],l=Math.sqrt((n*n+r*r+i*i)*(s*s+o*o+a*a)),c=l&&H$(t,e)/l;return Math.acos(Math.min(Math.max(c,-1),1))}const X$=Coe,Loe=Poe,Y$=Toe,aE=Ioe;(function(){const t=$$();return function(e,n,r,i,s,o){let a,l;for(n||(n=3),r||(r=0),i?l=Math.min(i*n+r,e.length):l=e.length,a=r;a<l;a+=n)t[0]=e[a],t[1]=e[a+1],t[2]=e[a+2],s(t,t,o),e[a]=t[0],e[a+1]=t[1],e[a+2]=t[2];return e}})();const lE=[0,0,0];let ub;class At extends U${static get ZERO(){return ub||(ub=new At(0,0,0),Object.freeze(ub)),ub}constructor(e=0,n=0,r=0){super(-0,-0,-0),arguments.length===1&&Gh(e)?this.copy(e):(ks.debug&&(Vn(e),Vn(n),Vn(r)),this[0]=e,this[1]=n,this[2]=r)}set(e,n,r){return this[0]=e,this[1]=n,this[2]=r,this.check()}copy(e){return this[0]=e[0],this[1]=e[1],this[2]=e[2],this.check()}fromObject(e){return ks.debug&&(Vn(e.x),Vn(e.y),Vn(e.z)),this[0]=e.x,this[1]=e.y,this[2]=e.z,this.check()}toObject(e){return e.x=this[0],e.y=this[1],e.z=this[2],e}get ELEMENTS(){return 3}get z(){return this[2]}set z(e){this[2]=Vn(e)}angle(e){return Boe(this,e)}cross(e){return g_(this,this,e),this.check()}rotateX({radians:e,origin:n=lE}){return koe(this,this,n,e),this.check()}rotateY({radians:e,origin:n=lE}){return Noe(this,this,n,e),this.check()}rotateZ({radians:e,origin:n=lE}){return Doe(this,this,n,e),this.check()}transform(e){return this.transformAsPoint(e)}transformAsPoint(e){return lM(this,this,e),this.check()}transformAsVector(e){return V$(this,this,e),this.check()}transformByMatrix3(e){return q$(this,this,e),this.check()}transformByMatrix2(e){return Eoe(this,this,e),this.check()}transformByQuaternion(e){return Q$(this,this,e),this.check()}}let fb;class cM extends U${static get ZERO(){return fb||(fb=new cM(0,0,0,0),Object.freeze(fb)),fb}constructor(e=0,n=0,r=0,i=0){super(-0,-0,-0,-0),Gh(e)&&arguments.length===1?this.copy(e):(ks.debug&&(Vn(e),Vn(n),Vn(r),Vn(i)),this[0]=e,this[1]=n,this[2]=r,this[3]=i)}set(e,n,r,i){return this[0]=e,this[1]=n,this[2]=r,this[3]=i,this.check()}copy(e){return this[0]=e[0],this[1]=e[1],this[2]=e[2],this[3]=e[3],this.check()}fromObject(e){return ks.debug&&(Vn(e.x),Vn(e.y),Vn(e.z),Vn(e.w)),this[0]=e.x,this[1]=e.y,this[2]=e.z,this[3]=e.w,this}toObject(e){return e.x=this[0],e.y=this[1],e.z=this[2],e.w=this[3],e}get ELEMENTS(){return 4}get z(){return this[2]}set z(e){this[2]=Vn(e)}get w(){return this[3]}set w(e){this[3]=Vn(e)}transform(e){return lM(this,this,e),this.check()}transformByMatrix3(e){return W$(this,this,e),this.check()}transformByMatrix2(e){return Soe(this,this,e),this.check()}transformByQuaternion(e){return Q$(this,this,e),this.check()}applyMatrix4(e){return e.transform(this,this),this}}class K$ extends aM{toString(){let e="[";if(ks.printRowMajor){e+="row-major:";for(let n=0;n<this.RANK;++n)for(let r=0;r<this.RANK;++r)e+=` ${this[r*this.RANK+n]}`}else{e+="column-major:";for(let n=0;n<this.ELEMENTS;++n)e+=` ${this[n]}`}return e+="]",e}getElementIndex(e,n){return n*this.RANK+e}getElement(e,n){return this[n*this.RANK+e]}setElement(e,n,r){return this[n*this.RANK+e]=Vn(r),this}getColumn(e,n=new Array(this.RANK).fill(-0)){const r=e*this.RANK;for(let i=0;i<this.RANK;++i)n[i]=this[r+i];return n}setColumn(e,n){const r=e*this.RANK;for(let i=0;i<this.RANK;++i)this[r+i]=n[i];return this}}function Foe(){const t=new Ia(9);return Ia!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t}function Uoe(t,e){if(t===e){const n=e[1],r=e[2],i=e[5];t[1]=e[3],t[2]=e[6],t[3]=n,t[5]=e[7],t[6]=r,t[7]=i}else t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8];return t}function zoe(t,e){const n=e[0],r=e[1],i=e[2],s=e[3],o=e[4],a=e[5],l=e[6],c=e[7],u=e[8],h=u*o-a*c,d=-u*s+a*l,m=c*s-o*l;let y=n*h+r*d+i*m;return y?(y=1/y,t[0]=h*y,t[1]=(-u*r+i*c)*y,t[2]=(a*r-i*o)*y,t[3]=d*y,t[4]=(u*n-i*l)*y,t[5]=(-a*n+i*s)*y,t[6]=m*y,t[7]=(-c*n+r*l)*y,t[8]=(o*n-r*s)*y,t):null}function joe(t){const e=t[0],n=t[1],r=t[2],i=t[3],s=t[4],o=t[5],a=t[6],l=t[7],c=t[8];return e*(c*s-o*l)+n*(-c*i+o*a)+r*(l*i-s*a)}function Kk(t,e,n){const r=e[0],i=e[1],s=e[2],o=e[3],a=e[4],l=e[5],c=e[6],u=e[7],h=e[8],d=n[0],m=n[1],y=n[2],v=n[3],b=n[4],x=n[5],T=n[6],E=n[7],C=n[8];return t[0]=d*r+m*o+y*c,t[1]=d*i+m*a+y*u,t[2]=d*s+m*l+y*h,t[3]=v*r+b*o+x*c,t[4]=v*i+b*a+x*u,t[5]=v*s+b*l+x*h,t[6]=T*r+E*o+C*c,t[7]=T*i+E*a+C*u,t[8]=T*s+E*l+C*h,t}function Voe(t,e,n){const r=e[0],i=e[1],s=e[2],o=e[3],a=e[4],l=e[5],c=e[6],u=e[7],h=e[8],d=n[0],m=n[1];return t[0]=r,t[1]=i,t[2]=s,t[3]=o,t[4]=a,t[5]=l,t[6]=d*r+m*o+c,t[7]=d*i+m*a+u,t[8]=d*s+m*l+h,t}function Woe(t,e,n){const r=e[0],i=e[1],s=e[2],o=e[3],a=e[4],l=e[5],c=e[6],u=e[7],h=e[8],d=Math.sin(n),m=Math.cos(n);return t[0]=m*r+d*o,t[1]=m*i+d*a,t[2]=m*s+d*l,t[3]=m*o-d*r,t[4]=m*a-d*i,t[5]=m*l-d*s,t[6]=c,t[7]=u,t[8]=h,t}function Gk(t,e,n){const r=n[0],i=n[1];return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=i*e[3],t[4]=i*e[4],t[5]=i*e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t}function $oe(t,e){const n=e[0],r=e[1],i=e[2],s=e[3],o=n+n,a=r+r,l=i+i,c=n*o,u=r*o,h=r*a,d=i*o,m=i*a,y=i*l,v=s*o,b=s*a,x=s*l;return t[0]=1-h-y,t[3]=u-x,t[6]=d+b,t[1]=u+x,t[4]=1-c-y,t[7]=m-v,t[2]=d-b,t[5]=m+v,t[8]=1-c-h,t}var pP;(function(t){t[t.COL0ROW0=0]="COL0ROW0",t[t.COL0ROW1=1]="COL0ROW1",t[t.COL0ROW2=2]="COL0ROW2",t[t.COL1ROW0=3]="COL1ROW0",t[t.COL1ROW1=4]="COL1ROW1",t[t.COL1ROW2=5]="COL1ROW2",t[t.COL2ROW0=6]="COL2ROW0",t[t.COL2ROW1=7]="COL2ROW1",t[t.COL2ROW2=8]="COL2ROW2"})(pP||(pP={}));const Hoe=Object.freeze([1,0,0,0,1,0,0,0,1]);class Pi extends K${static get IDENTITY(){return Qoe()}static get ZERO(){return qoe()}get ELEMENTS(){return 9}get RANK(){return 3}get INDICES(){return pP}constructor(e,...n){super(-0,-0,-0,-0,-0,-0,-0,-0,-0),arguments.length===1&&Array.isArray(e)?this.copy(e):n.length>0?this.copy([e,...n]):this.identity()}copy(e){return this[0]=e[0],this[1]=e[1],this[2]=e[2],this[3]=e[3],this[4]=e[4],this[5]=e[5],this[6]=e[6],this[7]=e[7],this[8]=e[8],this.check()}identity(){return this.copy(Hoe)}fromObject(e){return this.check()}fromQuaternion(e){return $oe(this,e),this.check()}set(e,n,r,i,s,o,a,l,c){return this[0]=e,this[1]=n,this[2]=r,this[3]=i,this[4]=s,this[5]=o,this[6]=a,this[7]=l,this[8]=c,this.check()}setRowMajor(e,n,r,i,s,o,a,l,c){return this[0]=e,this[1]=i,this[2]=a,this[3]=n,this[4]=s,this[5]=l,this[6]=r,this[7]=o,this[8]=c,this.check()}determinant(){return joe(this)}transpose(){return Uoe(this,this),this.check()}invert(){return zoe(this,this),this.check()}multiplyLeft(e){return Kk(this,e,this),this.check()}multiplyRight(e){return Kk(this,this,e),this.check()}rotate(e){return Woe(this,this,e),this.check()}scale(e){return Array.isArray(e)?Gk(this,this,e):Gk(this,this,[e,e]),this.check()}translate(e){return Voe(this,this,e),this.check()}transform(e,n){let r;switch(e.length){case 2:r=_oe(n||[-0,-0],e,this);break;case 3:r=q$(n||[-0,-0,-0],e,this);break;case 4:r=W$(n||[-0,-0,-0,-0],e,this);break;default:throw new Error("Illegal vector")}return tv(r,e.length),r}transformVector(e,n){return this.transform(e,n)}transformVector2(e,n){return this.transform(e,n)}transformVector3(e,n){return this.transform(e,n)}}let hb,db=null;function qoe(){return hb||(hb=new Pi([0,0,0,0,0,0,0,0,0]),Object.freeze(hb)),hb}function Qoe(){return db||(db=new Pi,Object.freeze(db)),db}function Xoe(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function Yoe(t,e){if(t===e){const n=e[1],r=e[2],i=e[3],s=e[6],o=e[7],a=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=n,t[6]=e[9],t[7]=e[13],t[8]=r,t[9]=s,t[11]=e[14],t[12]=i,t[13]=o,t[14]=a}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15];return t}function gP(t,e){const n=e[0],r=e[1],i=e[2],s=e[3],o=e[4],a=e[5],l=e[6],c=e[7],u=e[8],h=e[9],d=e[10],m=e[11],y=e[12],v=e[13],b=e[14],x=e[15],T=n*a-r*o,E=n*l-i*o,C=n*c-s*o,I=r*l-i*a,O=r*c-s*a,N=i*c-s*l,U=u*v-h*y,F=u*b-d*y,H=u*x-m*y,W=h*b-d*v,z=h*x-m*v,V=d*x-m*b;let M=T*V-E*z+C*W+I*H-O*F+N*U;return M?(M=1/M,t[0]=(a*V-l*z+c*W)*M,t[1]=(i*z-r*V-s*W)*M,t[2]=(v*N-b*O+x*I)*M,t[3]=(d*O-h*N-m*I)*M,t[4]=(l*H-o*V-c*F)*M,t[5]=(n*V-i*H+s*F)*M,t[6]=(b*C-y*N-x*E)*M,t[7]=(u*N-d*C+m*E)*M,t[8]=(o*z-a*H+c*U)*M,t[9]=(r*H-n*z-s*U)*M,t[10]=(y*O-v*C+x*T)*M,t[11]=(h*C-u*O-m*T)*M,t[12]=(a*F-o*W-l*U)*M,t[13]=(n*W-r*F+i*U)*M,t[14]=(v*E-y*I-b*T)*M,t[15]=(u*I-h*E+d*T)*M,t):null}function Koe(t){const e=t[0],n=t[1],r=t[2],i=t[3],s=t[4],o=t[5],a=t[6],l=t[7],c=t[8],u=t[9],h=t[10],d=t[11],m=t[12],y=t[13],v=t[14],b=t[15],x=e*o-n*s,T=e*a-r*s,E=n*a-r*o,C=c*y-u*m,I=c*v-h*m,O=u*v-h*y,N=e*O-n*I+r*C,U=s*O-o*I+a*C,F=c*E-u*T+h*x,H=m*E-y*T+v*x;return l*N-i*U+b*F-d*H}function Vh(t,e,n){const r=e[0],i=e[1],s=e[2],o=e[3],a=e[4],l=e[5],c=e[6],u=e[7],h=e[8],d=e[9],m=e[10],y=e[11],v=e[12],b=e[13],x=e[14],T=e[15];let E=n[0],C=n[1],I=n[2],O=n[3];return t[0]=E*r+C*a+I*h+O*v,t[1]=E*i+C*l+I*d+O*b,t[2]=E*s+C*c+I*m+O*x,t[3]=E*o+C*u+I*y+O*T,E=n[4],C=n[5],I=n[6],O=n[7],t[4]=E*r+C*a+I*h+O*v,t[5]=E*i+C*l+I*d+O*b,t[6]=E*s+C*c+I*m+O*x,t[7]=E*o+C*u+I*y+O*T,E=n[8],C=n[9],I=n[10],O=n[11],t[8]=E*r+C*a+I*h+O*v,t[9]=E*i+C*l+I*d+O*b,t[10]=E*s+C*c+I*m+O*x,t[11]=E*o+C*u+I*y+O*T,E=n[12],C=n[13],I=n[14],O=n[15],t[12]=E*r+C*a+I*h+O*v,t[13]=E*i+C*l+I*d+O*b,t[14]=E*s+C*c+I*m+O*x,t[15]=E*o+C*u+I*y+O*T,t}function J_(t,e,n){const r=n[0],i=n[1],s=n[2];let o,a,l,c,u,h,d,m,y,v,b,x;return e===t?(t[12]=e[0]*r+e[4]*i+e[8]*s+e[12],t[13]=e[1]*r+e[5]*i+e[9]*s+e[13],t[14]=e[2]*r+e[6]*i+e[10]*s+e[14],t[15]=e[3]*r+e[7]*i+e[11]*s+e[15]):(o=e[0],a=e[1],l=e[2],c=e[3],u=e[4],h=e[5],d=e[6],m=e[7],y=e[8],v=e[9],b=e[10],x=e[11],t[0]=o,t[1]=a,t[2]=l,t[3]=c,t[4]=u,t[5]=h,t[6]=d,t[7]=m,t[8]=y,t[9]=v,t[10]=b,t[11]=x,t[12]=o*r+u*i+y*s+e[12],t[13]=a*r+h*i+v*s+e[13],t[14]=l*r+d*i+b*s+e[14],t[15]=c*r+m*i+x*s+e[15]),t}function uM(t,e,n){const r=n[0],i=n[1],s=n[2];return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*s,t[9]=e[9]*s,t[10]=e[10]*s,t[11]=e[11]*s,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function Goe(t,e,n,r){let i=r[0],s=r[1],o=r[2],a=Math.sqrt(i*i+s*s+o*o),l,c,u,h,d,m,y,v,b,x,T,E,C,I,O,N,U,F,H,W,z,V,M,K;return a<nv?null:(a=1/a,i*=a,s*=a,o*=a,c=Math.sin(n),l=Math.cos(n),u=1-l,h=e[0],d=e[1],m=e[2],y=e[3],v=e[4],b=e[5],x=e[6],T=e[7],E=e[8],C=e[9],I=e[10],O=e[11],N=i*i*u+l,U=s*i*u+o*c,F=o*i*u-s*c,H=i*s*u-o*c,W=s*s*u+l,z=o*s*u+i*c,V=i*o*u+s*c,M=s*o*u-i*c,K=o*o*u+l,t[0]=h*N+v*U+E*F,t[1]=d*N+b*U+C*F,t[2]=m*N+x*U+I*F,t[3]=y*N+T*U+O*F,t[4]=h*H+v*W+E*z,t[5]=d*H+b*W+C*z,t[6]=m*H+x*W+I*z,t[7]=y*H+T*W+O*z,t[8]=h*V+v*M+E*K,t[9]=d*V+b*M+C*K,t[10]=m*V+x*M+I*K,t[11]=y*V+T*M+O*K,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)}function G$(t,e,n){const r=Math.sin(n),i=Math.cos(n),s=e[4],o=e[5],a=e[6],l=e[7],c=e[8],u=e[9],h=e[10],d=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=s*i+c*r,t[5]=o*i+u*r,t[6]=a*i+h*r,t[7]=l*i+d*r,t[8]=c*i-s*r,t[9]=u*i-o*r,t[10]=h*i-a*r,t[11]=d*i-l*r,t}function Zoe(t,e,n){const r=Math.sin(n),i=Math.cos(n),s=e[0],o=e[1],a=e[2],l=e[3],c=e[8],u=e[9],h=e[10],d=e[11];return e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=s*i-c*r,t[1]=o*i-u*r,t[2]=a*i-h*r,t[3]=l*i-d*r,t[8]=s*r+c*i,t[9]=o*r+u*i,t[10]=a*r+h*i,t[11]=l*r+d*i,t}function Z$(t,e,n){const r=Math.sin(n),i=Math.cos(n),s=e[0],o=e[1],a=e[2],l=e[3],c=e[4],u=e[5],h=e[6],d=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=s*i+c*r,t[1]=o*i+u*r,t[2]=a*i+h*r,t[3]=l*i+d*r,t[4]=c*i-s*r,t[5]=u*i-o*r,t[6]=h*i-a*r,t[7]=d*i-l*r,t}function Joe(t,e){const n=e[0],r=e[1],i=e[2],s=e[4],o=e[5],a=e[6],l=e[8],c=e[9],u=e[10];return t[0]=Math.sqrt(n*n+r*r+i*i),t[1]=Math.sqrt(s*s+o*o+a*a),t[2]=Math.sqrt(l*l+c*c+u*u),t}function eae(t,e){const n=e[0],r=e[1],i=e[2],s=e[3],o=n+n,a=r+r,l=i+i,c=n*o,u=r*o,h=r*a,d=i*o,m=i*a,y=i*l,v=s*o,b=s*a,x=s*l;return t[0]=1-h-y,t[1]=u+x,t[2]=d-b,t[3]=0,t[4]=u-x,t[5]=1-c-y,t[6]=m+v,t[7]=0,t[8]=d+b,t[9]=m-v,t[10]=1-c-h,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function tae(t,e,n,r,i,s,o){const a=1/(n-e),l=1/(i-r),c=1/(s-o);return t[0]=s*2*a,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=s*2*l,t[6]=0,t[7]=0,t[8]=(n+e)*a,t[9]=(i+r)*l,t[10]=(o+s)*c,t[11]=-1,t[12]=0,t[13]=0,t[14]=o*s*2*c,t[15]=0,t}function nae(t,e,n,r,i){const s=1/Math.tan(e/2);if(t[0]=s/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=s,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,i!=null&&i!==1/0){const o=1/(r-i);t[10]=(i+r)*o,t[14]=2*i*r*o}else t[10]=-1,t[14]=-2*r;return t}const rae=nae;function iae(t,e,n,r,i,s,o){const a=1/(e-n),l=1/(r-i),c=1/(s-o);return t[0]=-2*a,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*c,t[11]=0,t[12]=(e+n)*a,t[13]=(i+r)*l,t[14]=(o+s)*c,t[15]=1,t}const sae=iae;function oae(t,e,n,r){let i,s,o,a,l,c,u,h,d,m;const y=e[0],v=e[1],b=e[2],x=r[0],T=r[1],E=r[2],C=n[0],I=n[1],O=n[2];return Math.abs(y-C)<nv&&Math.abs(v-I)<nv&&Math.abs(b-O)<nv?Xoe(t):(h=y-C,d=v-I,m=b-O,i=1/Math.sqrt(h*h+d*d+m*m),h*=i,d*=i,m*=i,s=T*m-E*d,o=E*h-x*m,a=x*d-T*h,i=Math.sqrt(s*s+o*o+a*a),i?(i=1/i,s*=i,o*=i,a*=i):(s=0,o=0,a=0),l=d*a-m*o,c=m*s-h*a,u=h*o-d*s,i=Math.sqrt(l*l+c*c+u*u),i?(i=1/i,l*=i,c*=i,u*=i):(l=0,c=0,u=0),t[0]=s,t[1]=l,t[2]=h,t[3]=0,t[4]=o,t[5]=c,t[6]=d,t[7]=0,t[8]=a,t[9]=u,t[10]=m,t[11]=0,t[12]=-(s*y+o*v+a*b),t[13]=-(l*y+c*v+u*b),t[14]=-(h*y+d*v+m*b),t[15]=1,t)}function aae(){const t=new Ia(4);return Ia!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t}function lae(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t}function fM(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t}function cae(t){const e=t[0],n=t[1],r=t[2],i=t[3];return Math.sqrt(e*e+n*n+r*r+i*i)}function uae(t){const e=t[0],n=t[1],r=t[2],i=t[3];return e*e+n*n+r*r+i*i}function fae(t,e){const n=e[0],r=e[1],i=e[2],s=e[3];let o=n*n+r*r+i*i+s*s;return o>0&&(o=1/Math.sqrt(o)),t[0]=n*o,t[1]=r*o,t[2]=i*o,t[3]=s*o,t}function hae(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]}function dae(t,e,n,r){const i=e[0],s=e[1],o=e[2],a=e[3];return t[0]=i+r*(n[0]-i),t[1]=s+r*(n[1]-s),t[2]=o+r*(n[2]-o),t[3]=a+r*(n[3]-a),t}function Rm(t,e,n){const r=e[0],i=e[1],s=e[2],o=e[3];return t[0]=n[0]*r+n[4]*i+n[8]*s+n[12]*o,t[1]=n[1]*r+n[5]*i+n[9]*s+n[13]*o,t[2]=n[2]*r+n[6]*i+n[10]*s+n[14]*o,t[3]=n[3]*r+n[7]*i+n[11]*s+n[15]*o,t}function pae(t,e,n){const r=e[0],i=e[1],s=e[2],o=n[0],a=n[1],l=n[2],c=n[3],u=c*r+a*s-l*i,h=c*i+l*r-o*s,d=c*s+o*i-a*r,m=-o*r-a*i-l*s;return t[0]=u*c+m*-o+h*-l-d*-a,t[1]=h*c+m*-a+d*-o-u*-l,t[2]=d*c+m*-l+u*-a-h*-o,t[3]=e[3],t}(function(){const t=aae();return function(e,n,r,i,s,o){let a,l;for(n||(n=4),r||(r=0),i?l=Math.min(i*n+r,e.length):l=e.length,a=r;a<l;a+=n)t[0]=e[a],t[1]=e[a+1],t[2]=e[a+2],t[3]=e[a+3],s(t,t,o),e[a]=t[0],e[a+1]=t[1],e[a+2]=t[2],e[a+3]=t[3];return e}})();var mP;(function(t){t[t.COL0ROW0=0]="COL0ROW0",t[t.COL0ROW1=1]="COL0ROW1",t[t.COL0ROW2=2]="COL0ROW2",t[t.COL0ROW3=3]="COL0ROW3",t[t.COL1ROW0=4]="COL1ROW0",t[t.COL1ROW1=5]="COL1ROW1",t[t.COL1ROW2=6]="COL1ROW2",t[t.COL1ROW3=7]="COL1ROW3",t[t.COL2ROW0=8]="COL2ROW0",t[t.COL2ROW1=9]="COL2ROW1",t[t.COL2ROW2=10]="COL2ROW2",t[t.COL2ROW3=11]="COL2ROW3",t[t.COL3ROW0=12]="COL3ROW0",t[t.COL3ROW1=13]="COL3ROW1",t[t.COL3ROW2=14]="COL3ROW2",t[t.COL3ROW3=15]="COL3ROW3"})(mP||(mP={}));const gae=45*Math.PI/180,mae=1,cE=.1,uE=500,vae=Object.freeze([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]);class fi extends K${static get IDENTITY(){return bae()}static get ZERO(){return yae()}get ELEMENTS(){return 16}get RANK(){return 4}get INDICES(){return mP}constructor(e){super(-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0),arguments.length===1&&Array.isArray(e)?this.copy(e):this.identity()}copy(e){return this[0]=e[0],this[1]=e[1],this[2]=e[2],this[3]=e[3],this[4]=e[4],this[5]=e[5],this[6]=e[6],this[7]=e[7],this[8]=e[8],this[9]=e[9],this[10]=e[10],this[11]=e[11],this[12]=e[12],this[13]=e[13],this[14]=e[14],this[15]=e[15],this.check()}set(e,n,r,i,s,o,a,l,c,u,h,d,m,y,v,b){return this[0]=e,this[1]=n,this[2]=r,this[3]=i,this[4]=s,this[5]=o,this[6]=a,this[7]=l,this[8]=c,this[9]=u,this[10]=h,this[11]=d,this[12]=m,this[13]=y,this[14]=v,this[15]=b,this.check()}setRowMajor(e,n,r,i,s,o,a,l,c,u,h,d,m,y,v,b){return this[0]=e,this[1]=s,this[2]=c,this[3]=m,this[4]=n,this[5]=o,this[6]=u,this[7]=y,this[8]=r,this[9]=a,this[10]=h,this[11]=v,this[12]=i,this[13]=l,this[14]=d,this[15]=b,this.check()}toRowMajor(e){return e[0]=this[0],e[1]=this[4],e[2]=this[8],e[3]=this[12],e[4]=this[1],e[5]=this[5],e[6]=this[9],e[7]=this[13],e[8]=this[2],e[9]=this[6],e[10]=this[10],e[11]=this[14],e[12]=this[3],e[13]=this[7],e[14]=this[11],e[15]=this[15],e}identity(){return this.copy(vae)}fromObject(e){return this.check()}fromQuaternion(e){return eae(this,e),this.check()}frustum(e){const{left:n,right:r,bottom:i,top:s,near:o=cE,far:a=uE}=e;return a===1/0?_ae(this,n,r,i,s,o):tae(this,n,r,i,s,o,a),this.check()}lookAt(e){const{eye:n,center:r=[0,0,0],up:i=[0,1,0]}=e;return oae(this,n,r,i),this.check()}ortho(e){const{left:n,right:r,bottom:i,top:s,near:o=cE,far:a=uE}=e;return sae(this,n,r,i,s,o,a),this.check()}orthographic(e){const{fovy:n=gae,aspect:r=mae,focalDistance:i=1,near:s=cE,far:o=uE}=e;Zk(n);const a=n/2,l=i*Math.tan(a),c=l*r;return this.ortho({left:-c,right:c,bottom:-l,top:l,near:s,far:o})}perspective(e){const{fovy:n=45*Math.PI/180,aspect:r=1,near:i=.1,far:s=500}=e;return Zk(n),rae(this,n,r,i,s),this.check()}determinant(){return Koe(this)}getScale(e=[-0,-0,-0]){return e[0]=Math.sqrt(this[0]*this[0]+this[1]*this[1]+this[2]*this[2]),e[1]=Math.sqrt(this[4]*this[4]+this[5]*this[5]+this[6]*this[6]),e[2]=Math.sqrt(this[8]*this[8]+this[9]*this[9]+this[10]*this[10]),e}getTranslation(e=[-0,-0,-0]){return e[0]=this[12],e[1]=this[13],e[2]=this[14],e}getRotation(e,n){e=e||[-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0],n=n||[-0,-0,-0];const r=this.getScale(n),i=1/r[0],s=1/r[1],o=1/r[2];return e[0]=this[0]*i,e[1]=this[1]*s,e[2]=this[2]*o,e[3]=0,e[4]=this[4]*i,e[5]=this[5]*s,e[6]=this[6]*o,e[7]=0,e[8]=this[8]*i,e[9]=this[9]*s,e[10]=this[10]*o,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}getRotationMatrix3(e,n){e=e||[-0,-0,-0,-0,-0,-0,-0,-0,-0],n=n||[-0,-0,-0];const r=this.getScale(n),i=1/r[0],s=1/r[1],o=1/r[2];return e[0]=this[0]*i,e[1]=this[1]*s,e[2]=this[2]*o,e[3]=this[4]*i,e[4]=this[5]*s,e[5]=this[6]*o,e[6]=this[8]*i,e[7]=this[9]*s,e[8]=this[10]*o,e}transpose(){return Yoe(this,this),this.check()}invert(){return gP(this,this),this.check()}multiplyLeft(e){return Vh(this,e,this),this.check()}multiplyRight(e){return Vh(this,this,e),this.check()}rotateX(e){return G$(this,this,e),this.check()}rotateY(e){return Zoe(this,this,e),this.check()}rotateZ(e){return Z$(this,this,e),this.check()}rotateXYZ(e){return this.rotateX(e[0]).rotateY(e[1]).rotateZ(e[2])}rotateAxis(e,n){return Goe(this,this,e,n),this.check()}scale(e){return uM(this,this,Array.isArray(e)?e:[e,e,e]),this.check()}translate(e){return J_(this,this,e),this.check()}transform(e,n){return e.length===4?(n=Rm(n||[-0,-0,-0,-0],e,this),tv(n,4),n):this.transformAsPoint(e,n)}transformAsPoint(e,n){const{length:r}=e;let i;switch(r){case 2:i=woe(n||[-0,-0],e,this);break;case 3:i=lM(n||[-0,-0,-0],e,this);break;default:throw new Error("Illegal vector")}return tv(i,e.length),i}transformAsVector(e,n){let r;switch(e.length){case 2:r=Aoe(n||[-0,-0],e,this);break;case 3:r=V$(n||[-0,-0,-0],e,this);break;default:throw new Error("Illegal vector")}return tv(r,e.length),r}transformPoint(e,n){return this.transformAsPoint(e,n)}transformVector(e,n){return this.transformAsPoint(e,n)}transformDirection(e,n){return this.transformAsVector(e,n)}makeRotationX(e){return this.identity().rotateX(e)}makeTranslation(e,n,r){return this.identity().translate([e,n,r])}}let pb,gb;function yae(){return pb||(pb=new fi([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),Object.freeze(pb)),pb}function bae(){return gb||(gb=new fi,Object.freeze(gb)),gb}function Zk(t){if(t>Math.PI*2)throw Error("expected radians")}function _ae(t,e,n,r,i,s){const o=2*s/(n-e),a=2*s/(i-r),l=(n+e)/(n-e),c=(i+r)/(i-r),u=-1,h=-1,d=-2*s;return t[0]=o,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=l,t[9]=c,t[10]=u,t[11]=h,t[12]=0,t[13]=0,t[14]=d,t[15]=0,t}function Jk(){const t=new Ia(4);return Ia!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}function wae(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t}function J$(t,e,n){n=n*.5;const r=Math.sin(n);return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=Math.cos(n),t}function e8(t,e,n){const r=e[0],i=e[1],s=e[2],o=e[3],a=n[0],l=n[1],c=n[2],u=n[3];return t[0]=r*u+o*a+i*c-s*l,t[1]=i*u+o*l+s*a-r*c,t[2]=s*u+o*c+r*l-i*a,t[3]=o*u-r*a-i*l-s*c,t}function xae(t,e,n){n*=.5;const r=e[0],i=e[1],s=e[2],o=e[3],a=Math.sin(n),l=Math.cos(n);return t[0]=r*l+o*a,t[1]=i*l+s*a,t[2]=s*l-i*a,t[3]=o*l-r*a,t}function Aae(t,e,n){n*=.5;const r=e[0],i=e[1],s=e[2],o=e[3],a=Math.sin(n),l=Math.cos(n);return t[0]=r*l-s*a,t[1]=i*l+o*a,t[2]=s*l+r*a,t[3]=o*l-i*a,t}function Eae(t,e,n){n*=.5;const r=e[0],i=e[1],s=e[2],o=e[3],a=Math.sin(n),l=Math.cos(n);return t[0]=r*l+i*a,t[1]=i*l-r*a,t[2]=s*l+o*a,t[3]=o*l-s*a,t}function Sae(t,e){const n=e[0],r=e[1],i=e[2];return t[0]=n,t[1]=r,t[2]=i,t[3]=Math.sqrt(Math.abs(1-n*n-r*r-i*i)),t}function m_(t,e,n,r){const i=e[0],s=e[1],o=e[2],a=e[3];let l=n[0],c=n[1],u=n[2],h=n[3],d,m,y,v,b;return d=i*l+s*c+o*u+a*h,d<0&&(d=-d,l=-l,c=-c,u=-u,h=-h),1-d>nv?(m=Math.acos(d),b=Math.sin(m),y=Math.sin((1-r)*m)/b,v=Math.sin(r*m)/b):(y=1-r,v=r),t[0]=y*i+v*l,t[1]=y*s+v*c,t[2]=y*o+v*u,t[3]=y*a+v*h,t}function Tae(t,e){const n=e[0],r=e[1],i=e[2],s=e[3],o=n*n+r*r+i*i+s*s,a=o?1/o:0;return t[0]=-n*a,t[1]=-r*a,t[2]=-i*a,t[3]=s*a,t}function Cae(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=e[3],t}function eH(t,e){const n=e[0]+e[4]+e[8];let r;if(n>0)r=Math.sqrt(n+1),t[3]=.5*r,r=.5/r,t[0]=(e[5]-e[7])*r,t[1]=(e[6]-e[2])*r,t[2]=(e[1]-e[3])*r;else{let i=0;e[4]>e[0]&&(i=1),e[8]>e[i*3+i]&&(i=2);const s=(i+1)%3,o=(i+2)%3;r=Math.sqrt(e[i*3+i]-e[s*3+s]-e[o*3+o]+1),t[i]=.5*r,r=.5/r,t[3]=(e[s*3+o]-e[o*3+s])*r,t[s]=(e[s*3+i]+e[i*3+s])*r,t[o]=(e[o*3+i]+e[i*3+o])*r}return t}const Pae=lae,Iae=fM,Oae=hae,Mae=dae,Rae=cae,kae=uae,tH=fae,Nae=(function(){const t=$$(),e=Yk(1,0,0),n=Yk(0,1,0);return function(r,i,s){const o=H$(i,s);return o<-.999999?(g_(t,e,i),Y$(t)<1e-6&&g_(t,n,i),Moe(t,t),J$(r,t,Math.PI),r):o>.999999?(r[0]=0,r[1]=0,r[2]=0,r[3]=1,r):(g_(t,i,s),r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=1+o,tH(r,r))}})();(function(){const t=Jk(),e=Jk();return function(n,r,i,s,o,a){return m_(t,r,o,a),m_(e,i,s,a),m_(n,t,e,2*a*(1-a)),n}})();(function(){const t=Foe();return function(e,n,r,i){return t[0]=r[0],t[3]=r[1],t[6]=r[2],t[1]=i[0],t[4]=i[1],t[7]=i[2],t[2]=-n[0],t[5]=-n[1],t[8]=-n[2],tH(e,eH(e,t))}})();const Dae=[0,0,0,1];class t8 extends aM{constructor(e=0,n=0,r=0,i=1){super(-0,-0,-0,-0),Array.isArray(e)&&arguments.length===1?this.copy(e):this.set(e,n,r,i)}copy(e){return this[0]=e[0],this[1]=e[1],this[2]=e[2],this[3]=e[3],this.check()}set(e,n,r,i){return this[0]=e,this[1]=n,this[2]=r,this[3]=i,this.check()}fromObject(e){return this[0]=e.x,this[1]=e.y,this[2]=e.z,this[3]=e.w,this.check()}fromMatrix3(e){return eH(this,e),this.check()}fromAxisRotation(e,n){return J$(this,e,n),this.check()}identity(){return wae(this),this.check()}setAxisAngle(e,n){return this.fromAxisRotation(e,n)}get ELEMENTS(){return 4}get x(){return this[0]}set x(e){this[0]=Vn(e)}get y(){return this[1]}set y(e){this[1]=Vn(e)}get z(){return this[2]}set z(e){this[2]=Vn(e)}get w(){return this[3]}set w(e){this[3]=Vn(e)}len(){return Rae(this)}lengthSquared(){return kae(this)}dot(e){return Oae(this,e)}rotationTo(e,n){return Nae(this,e,n),this.check()}add(e){return Pae(this,this,e),this.check()}calculateW(){return Sae(this,this),this.check()}conjugate(){return Cae(this,this),this.check()}invert(){return Tae(this,this),this.check()}lerp(e,n,r){return r===void 0?this.lerp(this,e,n):(Mae(this,e,n,r),this.check())}multiplyRight(e){return e8(this,this,e),this.check()}multiplyLeft(e){return e8(this,e,this),this.check()}normalize(){const e=this.len(),n=e>0?1/e:0;return this[0]=this[0]*n,this[1]=this[1]*n,this[2]=this[2]*n,this[3]=this[3]*n,e===0&&(this[3]=1),this.check()}rotateX(e){return xae(this,this,e),this.check()}rotateY(e){return Aae(this,this,e),this.check()}rotateZ(e){return Eae(this,this,e),this.check()}scale(e){return Iae(this,this,e),this.check()}slerp(e,n,r){let i,s,o;switch(arguments.length){case 1:({start:i=Dae,target:s,ratio:o}=e);break;case 2:i=this,s=e,o=n;break;default:i=e,s=n,o=r}return m_(this,i,s,o),this.check()}transformVector4(e,n=new cM){return pae(n,e,this),tv(n,4)}lengthSq(){return this.lengthSquared()}setFromAxisAngle(e,n){return this.setAxisAngle(e,n)}premultiply(e){return this.multiplyLeft(e)}multiply(e){return this.multiplyRight(e)}}const Bae=1e-15,Lae=1e-20;function nH(t,e=[],n=0){const r=Math.fround(t),i=t-r;return e[n]=r,e[n+1]=i,e}function Fae(t){return t-Math.fround(t)}function Uae(t){const e=new Float32Array(32);for(let n=0;n<4;++n)for(let r=0;r<4;++r){const i=n*4+r;nH(t[r*4+n],e,i*2)}return e}const zae=`#ifdef LUMA_FP32_TAN_PRECISION_WORKAROUND
149
150// All these functions are for substituting tan() function from Intel GPU only
151const float TWO_PI = 6.2831854820251465;
152const float PI_2 = 1.5707963705062866;
153const float PI_16 = 0.1963495463132858;
154
155const float SIN_TABLE_0 = 0.19509032368659973;
156const float SIN_TABLE_1 = 0.3826834261417389;
157const float SIN_TABLE_2 = 0.5555702447891235;
158const float SIN_TABLE_3 = 0.7071067690849304;
159
160const float COS_TABLE_0 = 0.9807852506637573;
161const float COS_TABLE_1 = 0.9238795042037964;
162const float COS_TABLE_2 = 0.8314695954322815;
163const float COS_TABLE_3 = 0.7071067690849304;
164
165const float INVERSE_FACTORIAL_3 = 1.666666716337204e-01; // 1/3!
166const float INVERSE_FACTORIAL_5 = 8.333333767950535e-03; // 1/5!
167const float INVERSE_FACTORIAL_7 = 1.9841270113829523e-04; // 1/7!
168const float INVERSE_FACTORIAL_9 = 2.75573188446287533e-06; // 1/9!
169
170float sin_taylor_fp32(float a) {
171  float r, s, t, x;
172
173  if (a == 0.0) {
174    return 0.0;
175  }
176
177  x = -a * a;
178  s = a;
179  r = a;
180
181  r = r * x;
182  t = r * INVERSE_FACTORIAL_3;
183  s = s + t;
184
185  r = r * x;
186  t = r * INVERSE_FACTORIAL_5;
187  s = s + t;
188
189  r = r * x;
190  t = r * INVERSE_FACTORIAL_7;
191  s = s + t;
192
193  r = r * x;
194  t = r * INVERSE_FACTORIAL_9;
195  s = s + t;
196
197  return s;
198}
199
200void sincos_taylor_fp32(float a, out float sin_t, out float cos_t) {
201  if (a == 0.0) {
202    sin_t = 0.0;
203    cos_t = 1.0;
204  }
205  sin_t = sin_taylor_fp32(a);
206  cos_t = sqrt(1.0 - sin_t * sin_t);
207}
208
209float tan_taylor_fp32(float a) {
210    float sin_a;
211    float cos_a;
212
213    if (a == 0.0) {
214        return 0.0;
215    }
216
217    // 2pi range reduction
218    float z = floor(a / TWO_PI);
219    float r = a - TWO_PI * z;
220
221    float t;
222    float q = floor(r / PI_2 + 0.5);
223    int j = int(q);
224
225    if (j < -2 || j > 2) {
226        return 1.0 / 0.0;
227    }
228
229    t = r - PI_2 * q;
230
231    q = floor(t / PI_16 + 0.5);
232    int k = int(q);
233    int abs_k = int(abs(float(k)));
234
235    if (abs_k > 4) {
236        return 1.0 / 0.0;
237    } else {
238        t = t - PI_16 * q;
239    }
240
241    float u = 0.0;
242    float v = 0.0;
243
244    float sin_t, cos_t;
245    float s, c;
246    sincos_taylor_fp32(t, sin_t, cos_t);
247
248    if (k == 0) {
249        s = sin_t;
250        c = cos_t;
251    } else {
252        if (abs(float(abs_k) - 1.0) < 0.5) {
253            u = COS_TABLE_0;
254            v = SIN_TABLE_0;
255        } else if (abs(float(abs_k) - 2.0) < 0.5) {
256            u = COS_TABLE_1;
257            v = SIN_TABLE_1;
258        } else if (abs(float(abs_k) - 3.0) < 0.5) {
259            u = COS_TABLE_2;
260            v = SIN_TABLE_2;
261        } else if (abs(float(abs_k) - 4.0) < 0.5) {
262            u = COS_TABLE_3;
263            v = SIN_TABLE_3;
264        }
265        if (k > 0) {
266            s = u * sin_t + v * cos_t;
267            c = u * cos_t - v * sin_t;
268        } else {
269            s = u * sin_t - v * cos_t;
270            c = u * cos_t + v * sin_t;
271        }
272    }
273
274    if (j == 0) {
275        sin_a = s;
276        cos_a = c;
277    } else if (j == 1) {
278        sin_a = c;
279        cos_a = -s;
280    } else if (j == -1) {
281        sin_a = -c;
282        cos_a = s;
283    } else {
284        sin_a = -s;
285        cos_a = -c;
286    }
287    return sin_a / cos_a;
288}
289#endif
290
291float tan_fp32(float a) {
292#ifdef LUMA_FP32_TAN_PRECISION_WORKAROUND
293  return tan_taylor_fp32(a);
294#else
295  return tan(a);
296#endif
297}
298`,jae={name:"fp32",vs:zae},Vae=`
299uniform fp64arithmeticUniforms {
300  uniform float ONE;
301} fp64;
302
303/*
304About LUMA_FP64_CODE_ELIMINATION_WORKAROUND
305
306The purpose of this workaround is to prevent shader compilers from
307optimizing away necessary arithmetic operations by swapping their sequences
308or transform the equation to some 'equivalent' form.
309
310The method is to multiply an artifical variable, ONE, which will be known to
311the compiler to be 1 only at runtime. The whole expression is then represented
312as a polynomial with respective to ONE. In the coefficients of all terms, only one a
313and one b should appear
314
315err = (a + b) * ONE^6 - a * ONE^5 - (a + b) * ONE^4 + a * ONE^3 - b - (a + b) * ONE^2 + a * ONE
316*/
317
318// Divide float number to high and low floats to extend fraction bits
319vec2 split(float a) {
320  const float SPLIT = 4097.0;
321  float t = a * SPLIT;
322#if defined(LUMA_FP64_CODE_ELIMINATION_WORKAROUND)
323  float a_hi = t * fp64.ONE - (t - a);
324  float a_lo = a * fp64.ONE - a_hi;
325#else
326  float a_hi = t - (t - a);
327  float a_lo = a - a_hi;
328#endif
329  return vec2(a_hi, a_lo);
330}
331
332// Divide float number again when high float uses too many fraction bits
333vec2 split2(vec2 a) {
334  vec2 b = split(a.x);
335  b.y += a.y;
336  return b;
337}
338
339// Special sum operation when a > b
340vec2 quickTwoSum(float a, float b) {
341#if defined(LUMA_FP64_CODE_ELIMINATION_WORKAROUND)
342  float sum = (a + b) * fp64.ONE;
343  float err = b - (sum - a) * fp64.ONE;
344#else
345  float sum = a + b;
346  float err = b - (sum - a);
347#endif
348  return vec2(sum, err);
349}
350
351// General sum operation
352vec2 twoSum(float a, float b) {
353  float s = (a + b);
354#if defined(LUMA_FP64_CODE_ELIMINATION_WORKAROUND)
355  float v = (s * fp64.ONE - a) * fp64.ONE;
356  float err = (a - (s - v) * fp64.ONE) * fp64.ONE * fp64.ONE * fp64.ONE + (b - v);
357#else
358  float v = s - a;
359  float err = (a - (s - v)) + (b - v);
360#endif
361  return vec2(s, err);
362}
363
364vec2 twoSub(float a, float b) {
365  float s = (a - b);
366#if defined(LUMA_FP64_CODE_ELIMINATION_WORKAROUND)
367  float v = (s * fp64.ONE - a) * fp64.ONE;
368  float err = (a - (s - v) * fp64.ONE) * fp64.ONE * fp64.ONE * fp64.ONE - (b + v);
369#else
370  float v = s - a;
371  float err = (a - (s - v)) - (b + v);
372#endif
373  return vec2(s, err);
374}
375
376vec2 twoSqr(float a) {
377  float prod = a * a;
378  vec2 a_fp64 = split(a);
379#if defined(LUMA_FP64_CODE_ELIMINATION_WORKAROUND)
380  float err = ((a_fp64.x * a_fp64.x - prod) * fp64.ONE + 2.0 * a_fp64.x *
381    a_fp64.y * fp64.ONE * fp64.ONE) + a_fp64.y * a_fp64.y * fp64.ONE * fp64.ONE * fp64.ONE;
382#else
383  float err = ((a_fp64.x * a_fp64.x - prod) + 2.0 * a_fp64.x * a_fp64.y) + a_fp64.y * a_fp64.y;
384#endif
385  return vec2(prod, err);
386}
387
388vec2 twoProd(float a, float b) {
389  float prod = a * b;
390  vec2 a_fp64 = split(a);
391  vec2 b_fp64 = split(b);
392  float err = ((a_fp64.x * b_fp64.x - prod) + a_fp64.x * b_fp64.y +
393    a_fp64.y * b_fp64.x) + a_fp64.y * b_fp64.y;
394  return vec2(prod, err);
395}
396
397vec2 sum_fp64(vec2 a, vec2 b) {
398  vec2 s, t;
399  s = twoSum(a.x, b.x);
400  t = twoSum(a.y, b.y);
401  s.y += t.x;
402  s = quickTwoSum(s.x, s.y);
403  s.y += t.y;
404  s = quickTwoSum(s.x, s.y);
405  return s;
406}
407
408vec2 sub_fp64(vec2 a, vec2 b) {
409  vec2 s, t;
410  s = twoSub(a.x, b.x);
411  t = twoSub(a.y, b.y);
412  s.y += t.x;
413  s = quickTwoSum(s.x, s.y);
414  s.y += t.y;
415  s = quickTwoSum(s.x, s.y);
416  return s;
417}
418
419vec2 mul_fp64(vec2 a, vec2 b) {
420  vec2 prod = twoProd(a.x, b.x);
421  // y component is for the error
422  prod.y += a.x * b.y;
423#if defined(LUMA_FP64_HIGH_BITS_OVERFLOW_WORKAROUND)
424  prod = split2(prod);
425#endif
426  prod = quickTwoSum(prod.x, prod.y);
427  prod.y += a.y * b.x;
428#if defined(LUMA_FP64_HIGH_BITS_OVERFLOW_WORKAROUND)
429  prod = split2(prod);
430#endif
431  prod = quickTwoSum(prod.x, prod.y);
432  return prod;
433}
434
435vec2 div_fp64(vec2 a, vec2 b) {
436  float xn = 1.0 / b.x;
437#if defined(LUMA_FP64_HIGH_BITS_OVERFLOW_WORKAROUND)
438  vec2 yn = mul_fp64(a, vec2(xn, 0));
439#else
440  vec2 yn = a * xn;
441#endif
442  float diff = (sub_fp64(a, mul_fp64(b, yn))).x;
443  vec2 prod = twoProd(xn, diff);
444  return sum_fp64(yn, prod);
445}
446
447vec2 sqrt_fp64(vec2 a) {
448  if (a.x == 0.0 && a.y == 0.0) return vec2(0.0, 0.0);
449  if (a.x < 0.0) return vec2(0.0 / 0.0, 0.0 / 0.0);
450
451  float x = 1.0 / sqrt(a.x);
452  float yn = a.x * x;
453#if defined(LUMA_FP64_CODE_ELIMINATION_WORKAROUND)
454  vec2 yn_sqr = twoSqr(yn) * fp64.ONE;
455#else
456  vec2 yn_sqr = twoSqr(yn);
457#endif
458  float diff = sub_fp64(a, yn_sqr).x;
459  vec2 prod = twoProd(x * 0.5, diff);
460#if defined(LUMA_FP64_HIGH_BITS_OVERFLOW_WORKAROUND)
461  return sum_fp64(split(yn), prod);
462#else
463  return sum_fp64(vec2(yn, 0.0), prod);
464#endif
465}
466`,Wae={ONE:1},$ae={name:"fp64arithmetic",vs:Vae,defaultUniforms:Wae,uniformTypes:{ONE:"f32"},fp64ify:nH,fp64LowPart:Fae,fp64ifyMatrix4:Uae},Hae=[0,1,1,1],qae=`uniform pickingUniforms {
467  float isActive;
468  float isAttribute;
469  float isHighlightActive;
470  float useFloatColors;
471  vec3 highlightedObjectColor;
472  vec4 highlightColor;
473} picking;
474
475out vec4 picking_vRGBcolor_Avalid;
476
477// Normalize unsigned byte color to 0-1 range
478vec3 picking_normalizeColor(vec3 color) {
479  return picking.useFloatColors > 0.5 ? color : color / 255.0;
480}
481
482// Normalize unsigned byte color to 0-1 range
483vec4 picking_normalizeColor(vec4 color) {
484  return picking.useFloatColors > 0.5 ? color : color / 255.0;
485}
486
487bool picking_isColorZero(vec3 color) {
488  return dot(color, vec3(1.0)) < 0.00001;
489}
490
491bool picking_isColorValid(vec3 color) {
492  return dot(color, vec3(1.0)) > 0.00001;
493}
494
495// Check if this vertex is highlighted 
496bool isVertexHighlighted(vec3 vertexColor) {
497  vec3 highlightedObjectColor = picking_normalizeColor(picking.highlightedObjectColor);
498  return
499    bool(picking.isHighlightActive) && picking_isColorZero(abs(vertexColor - highlightedObjectColor));
500}
501
502// Set the current picking color
503void picking_setPickingColor(vec3 pickingColor) {
504  pickingColor = picking_normalizeColor(pickingColor);
505
506  if (bool(picking.isActive)) {
507    // Use alpha as the validity flag. If pickingColor is [0, 0, 0] fragment is non-pickable
508    picking_vRGBcolor_Avalid.a = float(picking_isColorValid(pickingColor));
509
510    if (!bool(picking.isAttribute)) {
511      // Stores the picking color so that the fragment shader can render it during picking
512      picking_vRGBcolor_Avalid.rgb = pickingColor;
513    }
514  } else {
515    // Do the comparison with selected item color in vertex shader as it should mean fewer compares
516    picking_vRGBcolor_Avalid.a = float(isVertexHighlighted(pickingColor));
517  }
518}
519
520void picking_setPickingAttribute(float value) {
521  if (bool(picking.isAttribute)) {
522    picking_vRGBcolor_Avalid.r = value;
523  }
524}
525
526void picking_setPickingAttribute(vec2 value) {
527  if (bool(picking.isAttribute)) {
528    picking_vRGBcolor_Avalid.rg = value;
529  }
530}
531
532void picking_setPickingAttribute(vec3 value) {
533  if (bool(picking.isAttribute)) {
534    picking_vRGBcolor_Avalid.rgb = value;
535  }
536}
537`,Qae=`uniform pickingUniforms {
538  float isActive;
539  float isAttribute;
540  float isHighlightActive;
541  float useFloatColors;
542  vec3 highlightedObjectColor;
543  vec4 highlightColor;
544} picking;
545
546in vec4 picking_vRGBcolor_Avalid;
547
548/*
549 * Returns highlight color if this item is selected.
550 */
551vec4 picking_filterHighlightColor(vec4 color) {
552  // If we are still picking, we don't highlight
553  if (picking.isActive > 0.5) {
554    return color;
555  }
556
557  bool selected = bool(picking_vRGBcolor_Avalid.a);
558
559  if (selected) {
560    // Blend in highlight color based on its alpha value
561    float highLightAlpha = picking.highlightColor.a;
562    float blendedAlpha = highLightAlpha + color.a * (1.0 - highLightAlpha);
563    float highLightRatio = highLightAlpha / blendedAlpha;
564
565    vec3 blendedRGB = mix(color.rgb, picking.highlightColor.rgb, highLightRatio);
566    return vec4(blendedRGB, blendedAlpha);
567  } else {
568    return color;
569  }
570}
571
572/*
573 * Returns picking color if picking enabled else unmodified argument.
574 */
575vec4 picking_filterPickingColor(vec4 color) {
576  if (bool(picking.isActive)) {
577    if (picking_vRGBcolor_Avalid.a == 0.0) {
578      discard;
579    }
580    return picking_vRGBcolor_Avalid;
581  }
582  return color;
583}
584
585/*
586 * Returns picking color if picking is enabled if not
587 * highlight color if this item is selected, otherwise unmodified argument.
588 */
589vec4 picking_filterColor(vec4 color) {
590  vec4 highlightColor = picking_filterHighlightColor(color);
591  return picking_filterPickingColor(highlightColor);
592}
593`,n8={props:{},uniforms:{},name:"picking",uniformTypes:{isActive:"f32",isAttribute:"f32",isHighlightActive:"f32",useFloatColors:"f32",highlightedObjectColor:"vec3<f32>",highlightColor:"vec4<f32>"},defaultUniforms:{isActive:!1,isAttribute:!1,isHighlightActive:!1,useFloatColors:!0,highlightedObjectColor:[0,0,0],highlightColor:Hae},vs:qae,fs:Qae,getUniforms:Xae};function Xae(t={},e){const n={};if(t.highlightedObjectColor!==void 0)if(t.highlightedObjectColor===null)n.isHighlightActive=!1;else{n.isHighlightActive=!0;const r=t.highlightedObjectColor.slice(0,3);n.highlightedObjectColor=r}if(t.highlightColor){const r=Array.from(t.highlightColor,i=>i/255);Number.isFinite(r[3])||(r[3]=1),n.highlightColor=r}return t.isActive!==void 0&&(n.isActive=!!t.isActive,n.isAttribute=!!t.isAttribute),t.useFloatColors!==void 0&&(n.useFloatColors=!!t.useFloatColors),n}const r8=`precision highp int;
594
595// #if (defined(SHADER_TYPE_FRAGMENT) && defined(LIGHTING_FRAGMENT)) || (defined(SHADER_TYPE_VERTEX) && defined(LIGHTING_VERTEX))
596struct AmbientLight {
597  vec3 color;
598};
599
600struct PointLight {
601  vec3 color;
602  vec3 position;
603  vec3 attenuation; // 2nd order x:Constant-y:Linear-z:Exponential
604};
605
606struct DirectionalLight {
607  vec3 color;
608  vec3 direction;
609};
610
611uniform lightingUniforms {
612  int enabled;
613  int lightType;
614
615  int directionalLightCount;
616  int pointLightCount;
617
618  vec3 ambientColor;
619
620  vec3 lightColor0;
621  vec3 lightPosition0;
622  vec3 lightDirection0;
623  vec3 lightAttenuation0;
624
625  vec3 lightColor1;
626  vec3 lightPosition1;
627  vec3 lightDirection1;
628  vec3 lightAttenuation1;
629
630  vec3 lightColor2;
631  vec3 lightPosition2;
632  vec3 lightDirection2;
633  vec3 lightAttenuation2;
634} lighting;
635
636PointLight lighting_getPointLight(int index) {
637  switch (index) {
638    case 0:
639      return PointLight(lighting.lightColor0, lighting.lightPosition0, lighting.lightAttenuation0);
640    case 1:
641      return PointLight(lighting.lightColor1, lighting.lightPosition1, lighting.lightAttenuation1);
642    case 2:
643    default:  
644      return PointLight(lighting.lightColor2, lighting.lightPosition2, lighting.lightAttenuation2);
645  }
646}
647
648DirectionalLight lighting_getDirectionalLight(int index) {
649  switch (index) {
650    case 0:
651      return DirectionalLight(lighting.lightColor0, lighting.lightDirection0);
652    case 1:
653      return DirectionalLight(lighting.lightColor1, lighting.lightDirection1);
654    case 2:
655    default:   
656      return DirectionalLight(lighting.lightColor2, lighting.lightDirection2);
657  }
658} 
659
660float getPointLightAttenuation(PointLight pointLight, float distance) {
661  return pointLight.attenuation.x
662       + pointLight.attenuation.y * distance
663       + pointLight.attenuation.z * distance * distance;
664}
665
666// #endif
667`,Yae=`// #if (defined(SHADER_TYPE_FRAGMENT) && defined(LIGHTING_FRAGMENT)) || (defined(SHADER_TYPE_VERTEX) && defined(LIGHTING_VERTEX))
668struct AmbientLight {
669  color: vec3<f32>,
670};
671
672struct PointLight {
673  color: vec3<f32>,
674  position: vec3<f32>,
675  attenuation: vec3<f32>, // 2nd order x:Constant-y:Linear-z:Exponential
676};
677
678struct DirectionalLight {
679  color: vec3<f32>,
680  direction: vec3<f32>,
681};
682
683struct lightingUniforms {
684  enabled: i32,
685  pointLightCount: i32,
686  directionalLightCount: i32,
687
688  ambientColor: vec3<f32>,
689
690  // TODO - support multiple lights by uncommenting arrays below
691  lightType: i32,
692  lightColor: vec3<f32>,
693  lightDirection: vec3<f32>,
694  lightPosition: vec3<f32>,
695  lightAttenuation: vec3<f32>,
696
697  // AmbientLight ambientLight;
698  // PointLight pointLight[MAX_LIGHTS];
699  // DirectionalLight directionalLight[MAX_LIGHTS];
700};
701
702// Binding 0:1 is reserved for lighting (Note: could go into separate bind group as it is stable across draw calls)
703@binding(1) @group(0) var<uniform> lighting : lightingUniforms;
704
705fn lighting_getPointLight(index: i32) -> PointLight {
706  return PointLight(lighting.lightColor, lighting.lightPosition, lighting.lightAttenuation);
707}
708
709fn lighting_getDirectionalLight(index: i32) -> DirectionalLight {
710  return DirectionalLight(lighting.lightColor, lighting.lightDirection);
711} 
712
713fn getPointLightAttenuation(pointLight: PointLight, distance: f32) -> f32 {
714  return pointLight.attenuation.x
715       + pointLight.attenuation.y * distance
716       + pointLight.attenuation.z * distance * distance;
717}
718`,rH=3,Kae=255;var wv;(function(t){t[t.POINT=0]="POINT",t[t.DIRECTIONAL=1]="DIRECTIONAL"})(wv||(wv={}));const rv={props:{},uniforms:{},name:"lighting",defines:{MAX_LIGHTS:rH},uniformTypes:{enabled:"i32",lightType:"i32",directionalLightCount:"i32",pointLightCount:"i32",ambientLightColor:"vec3<f32>",lightColor0:"vec3<f32>",lightPosition0:"vec3<f32>",lightDirection0:"vec3<f32>",lightAttenuation0:"vec3<f32>",lightColor1:"vec3<f32>",lightPosition1:"vec3<f32>",lightDirection1:"vec3<f32>",lightAttenuation1:"vec3<f32>",lightColor2:"vec3<f32>",lightPosition2:"vec3<f32>",lightDirection2:"vec3<f32>",lightAttenuation2:"vec3<f32>"},defaultUniforms:{enabled:1,lightType:wv.POINT,directionalLightCount:0,pointLightCount:0,ambientLightColor:[.1,.1,.1],lightColor0:[1,1,1],lightPosition0:[1,1,2],lightDirection0:[1,1,1],lightAttenuation0:[1,0,0],lightColor1:[1,1,1],lightPosition1:[1,1,2],lightDirection1:[1,1,1],lightAttenuation1:[1,0,0],lightColor2:[1,1,1],lightPosition2:[1,1,2],lightDirection2:[1,1,1],lightAttenuation2:[1,0,0]},source:Yae,vs:r8,fs:r8,getUniforms:Gae};function Gae(t,e={}){if(t=t&&{...t},!t)return{...rv.defaultUniforms};t.lights&&(t={...t,...Jae(t.lights),lights:void 0});const{ambientLight:n,pointLights:r,directionalLights:i}=t||{};if(!(n||r&&r.length>0||i&&i.length>0))return{...rv.defaultUniforms,enabled:0};const o={...rv.defaultUniforms,...e,...Zae({ambientLight:n,pointLights:r,directionalLights:i})};return t.enabled!==void 0&&(o.enabled=t.enabled?1:0),o}function Zae({ambientLight:t,pointLights:e=[],directionalLights:n=[]}){const r={};r.ambientLightColor=fE(t);let i=0;for(const s of e){r.lightType=wv.POINT;const o=i;r[`lightColor${o}`]=fE(s),r[`lightPosition${o}`]=s.position,r[`lightAttenuation${o}`]=s.attenuation||[1,0,0],i++}for(const s of n){r.lightType=wv.DIRECTIONAL;const o=i;r[`lightColor${o}`]=fE(s),r[`lightDirection${o}`]=s.direction,i++}return i>rH&&ut.warn("MAX_LIGHTS exceeded")(),r.directionalLightCount=n.length,r.pointLightCount=e.length,r}function Jae(t){var n,r;const e={pointLights:[],directionalLights:[]};for(const i of t||[])switch(i.type){case"ambient":e.ambientLight=i;break;case"directional":(n=e.directionalLights)==null||n.push(i);break;case"point":(r=e.pointLights)==null||r.push(i);break}return e}function fE(t={}){const{color:e=[0,0,0],intensity:n=1}=t;return e.map(r=>r*n/Kae)}const iH=`uniform phongMaterialUniforms {
719  uniform float ambient;
720  uniform float diffuse;
721  uniform float shininess;
722  uniform vec3  specularColor;
723} material;
724`,sH=`uniform phongMaterialUniforms {
725  uniform float ambient;
726  uniform float diffuse;
727  uniform float shininess;
728  uniform vec3  specularColor;
729} material;
730
731vec3 lighting_getLightColor(vec3 surfaceColor, vec3 light_direction, vec3 view_direction, vec3 normal_worldspace, vec3 color) {
732  vec3 halfway_direction = normalize(light_direction + view_direction);
733  float lambertian = dot(light_direction, normal_worldspace);
734  float specular = 0.0;
735  if (lambertian > 0.0) {
736    float specular_angle = max(dot(normal_worldspace, halfway_direction), 0.0);
737    specular = pow(specular_angle, material.shininess);
738  }
739  lambertian = max(lambertian, 0.0);
740  return (lambertian * material.diffuse * surfaceColor + specular * material.specularColor) * color;
741}
742
743vec3 lighting_getLightColor(vec3 surfaceColor, vec3 cameraPosition, vec3 position_worldspace, vec3 normal_worldspace) {
744  vec3 lightColor = surfaceColor;
745
746  if (lighting.enabled == 0) {
747    return lightColor;
748  }
749
750  vec3 view_direction = normalize(cameraPosition - position_worldspace);
751  lightColor = material.ambient * surfaceColor * lighting.ambientColor;
752
753  for (int i = 0; i < lighting.pointLightCount; i++) {
754    PointLight pointLight = lighting_getPointLight(i);
755    vec3 light_position_worldspace = pointLight.position;
756    vec3 light_direction = normalize(light_position_worldspace - position_worldspace);
757    float light_attenuation = getPointLightAttenuation(pointLight, distance(light_position_worldspace, position_worldspace));
758    lightColor += lighting_getLightColor(surfaceColor, light_direction, view_direction, normal_worldspace, pointLight.color / light_attenuation);
759  }
760
761  int totalLights = min(MAX_LIGHTS, lighting.pointLightCount + lighting.directionalLightCount);
762  for (int i = lighting.pointLightCount; i < totalLights; i++) {
763    DirectionalLight directionalLight = lighting_getDirectionalLight(i);
764    lightColor += lighting_getLightColor(surfaceColor, -directionalLight.direction, view_direction, normal_worldspace, directionalLight.color);
765  }
766  
767  return lightColor;
768}
769`,oH=`struct phongMaterialUniforms {
770  ambient: f32,
771  diffuse: f32,
772  shininess: f32,
773  specularColor: vec3<f32>,
774};
775
776@binding(2) @group(0) var<uniform> phongMaterial : phongMaterialUniforms;
777
778fn lighting_getLightColor(surfaceColor: vec3<f32>, light_direction: vec3<f32>, view_direction: vec3<f32>, normal_worldspace: vec3<f32>, color: vec3<f32>) -> vec3<f32> {
779  let halfway_direction: vec3<f32> = normalize(light_direction + view_direction);
780  var lambertian: f32 = dot(light_direction, normal_worldspace);
781  var specular: f32 = 0.0;
782  if (lambertian > 0.0) {
783    let specular_angle = max(dot(normal_worldspace, halfway_direction), 0.0);
784    specular = pow(specular_angle, phongMaterial.shininess);
785  }
786  lambertian = max(lambertian, 0.0);
787  return (lambertian * phongMaterial.diffuse * surfaceColor + specular * phongMaterial.specularColor) * color;
788}
789
790fn lighting_getLightColor2(surfaceColor: vec3<f32>, cameraPosition: vec3<f32>, position_worldspace: vec3<f32>, normal_worldspace: vec3<f32>) -> vec3<f32> {
791  var lightColor: vec3<f32> = surfaceColor;
792
793  if (lighting.enabled == 0) {
794    return lightColor;
795  }
796
797  let view_direction: vec3<f32> = normalize(cameraPosition - position_worldspace);
798  lightColor = phongMaterial.ambient * surfaceColor * lighting.ambientColor;
799
800  if (lighting.lightType == 0) {
801    let pointLight: PointLight  = lighting_getPointLight(0);
802    let light_position_worldspace: vec3<f32> = pointLight.position;
803    let light_direction: vec3<f32> = normalize(light_position_worldspace - position_worldspace);
804    lightColor += lighting_getLightColor(surfaceColor, light_direction, view_direction, normal_worldspace, pointLight.color);
805  } else if (lighting.lightType == 1) {
806    var directionalLight: DirectionalLight = lighting_getDirectionalLight(0);
807    lightColor += lighting_getLightColor(surfaceColor, -directionalLight.direction, view_direction, normal_worldspace, directionalLight.color);
808  }
809  
810  return lightColor;
811  /*
812  for (int i = 0; i < MAX_LIGHTS; i++) {
813    if (i >= lighting.pointLightCount) {
814      break;
815    }
816    PointLight pointLight = lighting.pointLight[i];
817    vec3 light_position_worldspace = pointLight.position;
818    vec3 light_direction = normalize(light_position_worldspace - position_worldspace);
819    lightColor += lighting_getLightColor(surfaceColor, light_direction, view_direction, normal_worldspace, pointLight.color);
820  }
821
822  for (int i = 0; i < MAX_LIGHTS; i++) {
823    if (i >= lighting.directionalLightCount) {
824      break;
825    }
826    DirectionalLight directionalLight = lighting.directionalLight[i];
827    lightColor += lighting_getLightColor(surfaceColor, -directionalLight.direction, view_direction, normal_worldspace, directionalLight.color);
828  }
829  */
830}
831
832fn lighting_getSpecularLightColor(cameraPosition: vec3<f32>, position_worldspace: vec3<f32>, normal_worldspace: vec3<f32>) -> vec3<f32>{
833  var lightColor = vec3<f32>(0, 0, 0);
834  let surfaceColor = vec3<f32>(0, 0, 0);
835
836  if (lighting.enabled == 0) {
837    let view_direction = normalize(cameraPosition - position_worldspace);
838
839    switch (lighting.lightType) {
840      case 0, default: {
841        let pointLight: PointLight = lighting_getPointLight(0);
842        let light_position_worldspace: vec3<f32> = pointLight.position;
843        let light_direction: vec3<f32> = normalize(light_position_worldspace - position_worldspace);
844        lightColor += lighting_getLightColor(surfaceColor, light_direction, view_direction, normal_worldspace, pointLight.color);
845      }
846      case 1: {
847        let directionalLight: DirectionalLight = lighting_getDirectionalLight(0);
848        lightColor += lighting_getLightColor(surfaceColor, -directionalLight.direction, view_direction, normal_worldspace, directionalLight.color);
849      }
850    }
851  }
852  return lightColor;
853}
854`,aH={props:{},name:"gouraudMaterial",vs:sH.replace("phongMaterial","gouraudMaterial"),fs:iH.replace("phongMaterial","gouraudMaterial"),source:oH.replaceAll("phongMaterial","gouraudMaterial"),defines:{LIGHTING_VERTEX:1},dependencies:[rv],uniformTypes:{ambient:"f32",diffuse:"f32",shininess:"f32",specularColor:"vec3<f32>"},defaultUniforms:{ambient:.35,diffuse:.6,shininess:32,specularColor:[.15,.15,.15]},getUniforms(t){const e={...t};return e.specularColor&&(e.specularColor=e.specularColor.map(n=>n/255)),{...aH.defaultUniforms,...e}}}
vendor: 11,592 bytes, lines 854-912
854,lH={name:"phongMaterial",dependencies:[rv],source:oH,vs:iH,fs:sH,defines:{LIGHTING_FRAGMENT:1},uniformTypes:{ambient:"f32",diffuse:"f32",shininess:"f32",specularColor:"vec3<f32>"},defaultUniforms:{ambient:.35,diffuse:.6,shininess:32,specularColor:[.15,.15,.15]},getUniforms(t){const e={...t};return e.specularColor&&(e.specularColor=e.specularColor.map(n=>n/255)),{...lH.defaultUniforms,...e}}},i8=`uniform layerUniforms {
855  uniform float opacity;
856} layer;
857`,ele={name:"layer",vs:i8,fs:i8,getUniforms:t=>({opacity:Math.pow(t.opacity,1/2.2)}),uniformTypes:{opacity:"f32"}},tle=`const SMOOTH_EDGE_RADIUS: f32 = 0.5;
858
859struct VertexGeometry {
860  position: vec4<f32>,
861  worldPosition: vec3<f32>,
862  worldPositionAlt: vec3<f32>,
863  normal: vec3<f32>,
864  uv: vec2<f32>,
865  pickingColor: vec3<f32>,
866};
867
868var<private> geometry_: VertexGeometry = VertexGeometry(
869  vec4<f32>(0.0, 0.0, 1.0, 0.0),
870  vec3<f32>(0.0, 0.0, 0.0),
871  vec3<f32>(0.0, 0.0, 0.0),
872  vec3<f32>(0.0, 0.0, 0.0),
873  vec2<f32>(0.0, 0.0),
874  vec3<f32>(0.0, 0.0, 0.0)
875);
876
877struct FragmentGeometry {
878  uv: vec2<f32>,
879};
880
881var<private> fragmentGeometry: FragmentGeometry;
882
883fn smoothedge(edge: f32, x: f32) -> f32 {
884  return smoothstep(edge - SMOOTH_EDGE_RADIUS, edge + SMOOTH_EDGE_RADIUS, x);
885}
886`,cH="#define SMOOTH_EDGE_RADIUS 0.5",nle=`${cH}
887
888struct VertexGeometry {
889  vec4 position;
890  vec3 worldPosition;
891  vec3 worldPositionAlt;
892  vec3 normal;
893  vec2 uv;
894  vec3 pickingColor;
895} geometry = VertexGeometry(
896  vec4(0.0, 0.0, 1.0, 0.0),
897  vec3(0.0),
898  vec3(0.0),
899  vec3(0.0),
900  vec2(0.0),
901  vec3(0.0)
902);
903`,rle=`${cH}
904
905struct FragmentGeometry {
906  vec2 uv;
907} geometry;
908
909float smoothedge(float edge, float x) {
910  return smoothstep(edge - SMOOTH_EDGE_RADIUS, edge + SMOOTH_EDGE_RADIUS, x);
911}
912`,uH={name:"geometry",source:tle,vs:nle,fs:rle},ile=25;var Nr;(function(t){t[t.Start=1]="Start",t[t.Move=2]="Move",t[t.End=4]="End",t[t.Cancel=8]="Cancel"})(Nr||(Nr={}));var Qr;(function(t){t[t.None=0]="None",t[t.Left=1]="Left",t[t.Right=2]="Right",t[t.Up=4]="Up",t[t.Down=8]="Down",t[t.Horizontal=3]="Horizontal",t[t.Vertical=12]="Vertical",t[t.All=15]="All"})(Qr||(Qr={}));var Xt;(function(t){t[t.Possible=1]="Possible",t[t.Began=2]="Began",t[t.Changed=4]="Changed",t[t.Ended=8]="Ended",t[t.Recognized=8]="Recognized",t[t.Cancelled=16]="Cancelled",t[t.Failed=32]="Failed"})(Xt||(Xt={}));const sle="compute",ole="auto",vP="manipulation",v_="none",yP="pan-x",bP="pan-y";function ale(t){if(t.includes(v_))return v_;const e=t.includes(yP),n=t.includes(bP);return e&&n?v_:e||n?e?yP:bP:t.includes(vP)?vP:ole}class lle{constructor(e,n){this.actions="",this.manager=e,this.set(n)}set(e){e===sle&&(e=this.compute()),this.manager.element&&(this.manager.element.style.touchAction=e,this.actions=e)}update(){this.set(this.manager.options.touchAction)}compute(){let e=[];for(const n of this.manager.recognizers)n.options.enable&&(e=e.concat(n.getTouchAction()));return ale(e.join(" "))}}function ew(t){return t.trim().split(/\s+/g)}function hE(t,e,n){if(t)for(const r of ew(e))t.addEventListener(r,n,!1)}function dE(t,e,n){if(t)for(const r of ew(e))t.removeEventListener(r,n,!1)}function s8(t){return(t.ownerDocument||t).defaultView}function cle(t,e){let n=t;for(;n;){if(n===e)return!0;n=n.parentNode}return!1}function fH(t){const e=t.length;if(e===1)return{x:Math.round(t[0].clientX),y:Math.round(t[0].clientY)};let n=0,r=0,i=0;for(;i<e;)n+=t[i].clientX,r+=t[i].clientY,i++;return{x:Math.round(n/e),y:Math.round(r/e)}}function o8(t){const e=[];let n=0;for(;n<t.pointers.length;)e[n]={clientX:Math.round(t.pointers[n].clientX),clientY:Math.round(t.pointers[n].clientY)},n++;return{timeStamp:Date.now(),pointers:e,center:fH(e),deltaX:t.deltaX,deltaY:t.deltaY}}function hH(t,e){const n=e.x-t.x,r=e.y-t.y;return Math.sqrt(n*n+r*r)}function a8(t,e){const n=e.clientX-t.clientX,r=e.clientY-t.clientY;return Math.sqrt(n*n+r*r)}function ule(t,e){const n=e.x-t.x,r=e.y-t.y;return Math.atan2(r,n)*180/Math.PI}function l8(t,e){const n=e.clientX-t.clientX,r=e.clientY-t.clientY;return Math.atan2(r,n)*180/Math.PI}function dH(t,e){return t===e?Qr.None:Math.abs(t)>=Math.abs(e)?t<0?Qr.Left:Qr.Right:e<0?Qr.Up:Qr.Down}function fle(t,e){const n=e.center;let r=t.offsetDelta,i=t.prevDelta;const s=t.prevInput;return(e.eventType===Nr.Start||(s==null?void 0:s.eventType)===Nr.End)&&(i=t.prevDelta={x:(s==null?void 0:s.deltaX)||0,y:(s==null?void 0:s.deltaY)||0},r=t.offsetDelta={x:n.x,y:n.y}),{deltaX:i.x+(n.x-r.x),deltaY:i.y+(n.y-r.y)}}function pH(t,e,n){return{x:e/t||0,y:n/t||0}}function hle(t,e){return a8(e[0],e[1])/a8(t[0],t[1])}function dle(t,e){return l8(e[1],e[0])-l8(t[1],t[0])}function ple(t,e){const n=t.lastInterval||e,r=e.timeStamp-n.timeStamp;let i,s,o,a;if(e.eventType!==Nr.Cancel&&(r>ile||n.velocity===void 0)){const l=e.deltaX-n.deltaX,c=e.deltaY-n.deltaY,u=pH(r,l,c);s=u.x,o=u.y,i=Math.abs(u.x)>Math.abs(u.y)?u.x:u.y,a=dH(l,c),t.lastInterval=e}else i=n.velocity,s=n.velocityX,o=n.velocityY,a=n.direction;e.velocity=i,e.velocityX=s,e.velocityY=o,e.direction=a}function gle(t,e){const{session:n}=t,{pointers:r}=e,{length:i}=r;n.firstInput||(n.firstInput=o8(e)),i>1&&!n.firstMultiple?n.firstMultiple=o8(e):i===1&&(n.firstMultiple=!1);const{firstInput:s,firstMultiple:o}=n,a=o?o.center:s.center,l=e.center=fH(r);e.timeStamp=Date.now(),e.deltaTime=e.timeStamp-s.timeStamp,e.angle=ule(a,l),e.distance=hH(a,l);const{deltaX:c,deltaY:u}=fle(n,e);e.deltaX=c,e.deltaY=u,e.offsetDirection=dH(e.deltaX,e.deltaY);const h=pH(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=h.x,e.overallVelocityY=h.y,e.overallVelocity=Math.abs(h.x)>Math.abs(h.y)?h.x:h.y,e.scale=o?hle(o.pointers,r):1,e.rotation=o?dle(o.pointers,r):0,e.maxPointers=n.prevInput?e.pointers.length>n.prevInput.maxPointers?e.pointers.length:n.prevInput.maxPointers:e.pointers.length;let d=t.element;return cle(e.srcEvent.target,d)&&(d=e.srcEvent.target),e.target=d,ple(n,e),e}function mle(t,e,n){const r=n.pointers.length,i=n.changedPointers.length,s=e&Nr.Start&&r-i===0,o=e&(Nr.End|Nr.Cancel)&&r-i===0;n.isFirst=!!s,n.isFinal=!!o,s&&(t.session={}),n.eventType=e;const a=gle(t,n);t.emit("hammer.input",a),t.recognize(a),t.session.prevInput=a}let vle=class{constructor(e){this.evEl="",this.evWin="",this.evTarget="",this.domHandler=n=>{this.manager.options.enable&&this.handler(n)},this.manager=e,this.element=e.element,this.target=e.options.inputTarget||e.element}callback(e,n){mle(this.manager,e,n)}init(){hE(this.element,this.evEl,this.domHandler),hE(this.target,this.evTarget,this.domHandler),hE(s8(this.element),this.evWin,this.domHandler)}destroy(){dE(this.element,this.evEl,this.domHandler),dE(this.target,this.evTarget,this.domHandler),dE(s8(this.element),this.evWin,this.domHandler)}};const yle={pointerdown:Nr.Start,pointermove:Nr.Move,pointerup:Nr.End,pointercancel:Nr.Cancel,pointerout:Nr.Cancel},ble="pointerdown",_le="pointermove pointerup pointercancel";class wle extends vle{constructor(e){super(e),this.evEl=ble,this.evWin=_le,this.store=this.manager.session.pointerEvents=[],this.init()}handler(e){const{store:n}=this;let r=!1;const i=yle[e.type],s=e.pointerType,o=s==="touch";let a=n.findIndex(l=>l.pointerId===e.pointerId);i&Nr.Start&&(e.buttons||o)?a<0&&(n.push(e),a=n.length-1):i&(Nr.End|Nr.Cancel)&&(r=!0),!(a<0)&&(n[a]=e,this.callback(i,{pointers:n,changedPointers:[e],eventType:i,pointerType:s,srcEvent:e}),r&&n.splice(a,1))}}const xle=["","webkit","Moz","MS","ms","o"];function Ale(t,e){const n=e[0].toUpperCase()+e.slice(1);for(const r of xle){const i=r?r+n:e;if(i in t)return i}}const Ele=1,c8=2,u8={touchAction:"compute",enable:!0,inputTarget:null,cssProps:{userSelect:"none",userDrag:"none",touchCallout:"none",tapHighlightColor:"rgba(0,0,0,0)"}};class Sle{constructor(e,n){this.options={...u8,...n,cssProps:{...u8.cssProps,...n.cssProps},inputTarget:n.inputTarget||e},this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=e,this.input=new wle(this),this.touchAction=new lle(this,this.options.touchAction),this.toggleCssProps(!0)}set(e){return Object.assign(this.options,e),e.touchAction&&this.touchAction.update(),e.inputTarget&&(this.input.destroy(),this.input.target=e.inputTarget,this.input.init()),this}stop(e){this.session.stopped=e?c8:Ele}recognize(e){const{session:n}=this;if(n.stopped)return;this.session.prevented&&e.srcEvent.preventDefault();let r;const{recognizers:i}=this;let{curRecognizer:s}=n;(!s||s&&s.state&Xt.Recognized)&&(s=n.curRecognizer=null);let o=0;for(;o<i.length;)r=i[o],n.stopped!==c8&&(!s||r===s||r.canRecognizeWith(s))?r.recognize(e):r.reset(),!s&&r.state&(Xt.Began|Xt.Changed|Xt.Ended)&&(s=n.curRecognizer=r),o++}get(e){const{recognizers:n}=this;for(let r=0;r<n.length;r++)if(n[r].options.event===e)return n[r];return null}add(e){if(Array.isArray(e)){for(const r of e)this.add(r);return this}const n=this.get(e.options.event);return n&&this.remove(n),this.recognizers.push(e),e.manager=this,this.touchAction.update(),e}remove(e){if(Array.isArray(e)){for(const r of e)this.remove(r);return this}const n=typeof e=="string"?this.get(e):e;if(n){const{recognizers:r}=this,i=r.indexOf(n);i!==-1&&(r.splice(i,1),this.touchAction.update())}return this}on(e,n){if(!e||!n)return;const{handlers:r}=this;for(const i of ew(e))r[i]=r[i]||[],r[i].push(n)}off(e,n){if(!e)return;const{handlers:r}=this;for(const i of ew(e))n?r[i]&&r[i].splice(r[i].indexOf(n),1):delete r[i]}emit(e,n){const r=this.handlers[e]&&this.handlers[e].slice();if(!r||!r.length)return;const i=n;i.type=e,i.preventDefault=function(){n.srcEvent.preventDefault()};let s=0;for(;s<r.length;)r[s](i),s++}destroy(){this.toggleCssProps(!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}toggleCssProps(e){const{element:n}=this;if(n){for(const[r,i]of Object.entries(this.options.cssProps)){const s=Ale(n.style,r);e?(this.oldCssProps[s]=n.style[s],n.style[s]=i):n.style[s]=this.oldCssProps[s]||""}e||(this.oldCssProps={})}}}let Tle=1;function Cle(){return Tle++}function f8(t){return t&Xt.Cancelled?"cancel":t&Xt.Ended?"end":t&Xt.Changed?"move":t&Xt.Began?"start":""}class gH{constructor(e){this.options=e,this.id=Cle(),this.state=Xt.Possible,this.simultaneous={},this.requireFail=[]}set(e){return Object.assign(this.options,e),this.manager.touchAction.update(),this}recognizeWith(e){if(Array.isArray(e)){for(const i of e)this.recognizeWith(i);return this}let n;if(typeof e=="string"){if(n=this.manager.get(e),!n)throw new Error(`Cannot find recognizer ${e}`)}else n=e;const{simultaneous:r}=this;return r[n.id]||(r[n.id]=n,n.recognizeWith(this)),this}dropRecognizeWith(e){if(Array.isArray(e)){for(const r of e)this.dropRecognizeWith(r);return this}let n;return typeof e=="string"?n=this.manager.get(e):n=e,n&&delete this.simultaneous[n.id],this}requireFailure(e){if(Array.isArray(e)){for(const i of e)this.requireFailure(i);return this}let n;if(typeof e=="string"){if(n=this.manager.get(e),!n)throw new Error(`Cannot find recognizer ${e}`)}else n=e;const{requireFail:r}=this;return r.indexOf(n)===-1&&(r.push(n),n.requireFailure(this)),this}dropRequireFailure(e){if(Array.isArray(e)){for(const r of e)this.dropRequireFailure(r);return this}let n;if(typeof e=="string"?n=this.manager.get(e):n=e,n){const r=this.requireFail.indexOf(n);r>-1&&this.requireFail.splice(r,1)}return this}hasRequireFailures(){return!!this.requireFail.find(e=>e.options.enable)}canRecognizeWith(e){return!!this.simultaneous[e.id]}emit(e){if(!e)return;const{state:n}=this;n<Xt.Ended&&this.manager.emit(this.options.event+f8(n),e),this.manager.emit(this.options.event,e),e.additionalEvent&&this.manager.emit(e.additionalEvent,e),n>=Xt.Ended&&this.manager.emit(this.options.event+f8(n),e)}
912tryEmit(e){this.canEmit()?this.emit(e):this.state=Xt.Failed}canEmit(){let e=0;for(;e<this.requireFail.length;){if(!(this.requireFail[e].state&(Xt.Failed|Xt.Possible)))return!1;e++}return!0}recognize(e){const n={...e};if(!this.options.enable){this.reset(),this.state=Xt.Failed;return}this.state&(Xt.Recognized|Xt.Cancelled|Xt.Failed)&&(this.state=Xt.Possible),this.state=this.process(n),this.state&(Xt.Began|Xt.Changed|Xt.Ended|Xt.Cancelled)&&this.tryEmit(n)}getEventNames(){return[this.options.event]}reset(){}}class mH extends gH{attrTest(e){const n=this.options.pointers;return n===0||e.pointers.length===n}process(e){const{state:n}=this,{eventType:r}=e,i=n&(Xt.Began|Xt.Changed),s=this.attrTest(e);return i&&(r&Nr.Cancel||!s)?n|Xt.Cancelled:i||s?r&Nr.End?n|Xt.Ended:n&Xt.Began?n|Xt.Changed:Xt.Began:Xt.Failed}}class h8 extends gH{constructor(e={}){super({enable:!0,event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10,...e}),this.pTime=null,this.pCenter=null,this._timer=null,this._input=null,this.count=0}getTouchAction(){return[vP]}process(e){const{options:n}=this,r=e.pointers.length===n.pointers,i=e.distance<n.threshold,s=e.deltaTime<n.time;if(this.reset(),e.eventType&Nr.Start&&this.count===0)return this.failTimeout();if(i&&s&&r){if(e.eventType!==Nr.End)return this.failTimeout();const o=this.pTime?e.timeStamp-this.pTime<n.interval:!0,a=!this.pCenter||hH(this.pCenter,e.center)<n.posThreshold;if(this.pTime=e.timeStamp,this.pCenter=e.center,!a||!o?this.count=1:this.count+=1,this._input=e,this.count%n.taps===0)return this.hasRequireFailures()?(this._timer=setTimeout(()=>{this.state=Xt.Recognized,this.tryEmit(this._input)},n.interval),Xt.Began):Xt.Recognized}return Xt.Failed}failTimeout(){return this._timer=setTimeout(()=>{this.state=Xt.Failed},this.options.interval),Xt.Failed}reset(){clearTimeout(this._timer)}emit(e){this.state===Xt.Recognized&&(e.tapCount=this.count,this.manager.emit(this.options.event,e))}}const Ple=["","start","move","end","cancel","up","down","left","right"];class d8 extends mH{constructor(e={}){super({enable:!0,pointers:1,event:"pan",threshold:10,direction:Qr.All,...e}),this.pX=null,this.pY=null}getTouchAction(){const{options:{direction:e}}=this,n=[];return e&Qr.Horizontal&&n.push(bP),e&Qr.Vertical&&n.push(yP),n}getEventNames(){return Ple.map(e=>this.options.event+e)}directionTest(e){const{options:n}=this;let r=!0,{distance:i}=e,{direction:s}=e;const o=e.deltaX,a=e.deltaY;return s&n.direction||(n.direction&Qr.Horizontal?(s=o===0?Qr.None:o<0?Qr.Left:Qr.Right,r=o!==this.pX,i=Math.abs(e.deltaX)):(s=a===0?Qr.None:a<0?Qr.Up:Qr.Down,r=a!==this.pY,i=Math.abs(e.deltaY))),e.direction=s,r&&i>n.threshold&&!!(s&n.direction)}attrTest(e){return super.attrTest(e)&&(!!(this.state&Xt.Began)||!(this.state&Xt.Began)&&this.directionTest(e))}emit(e){this.pX=e.deltaX,this.pY=e.deltaY;const n=Qr[e.direction].toLowerCase();n&&(e.additionalEvent=this.options.event+n),super.emit(e)}}const Ile=["","start","move","end","cancel","in","out"];class Ole extends mH{constructor(e={}){super({enable:!0,event:"pinch",threshold:0,pointers:2,...e})}getTouchAction(){return[v_]}getEventNames(){return Ile.map(e=>this.options.event+e)}attrTest(e){return super.attrTest(e)&&(Math.abs(e.scale-1)>this.options.threshold||!!(this.state&Xt.Began))}emit(e){if(e.scale!==1){const n=e.scale<1?"in":"out";e.additionalEvent=this.options.event+n}super.emit(e)}}class qx{constructor(e,n,r){this.element=e,this.callback=n,this.options=r}}const Mle=typeof navigator<"u"&&navigator.userAgent?navigator.userAgent.toLowerCase():"",Rle=Mle.indexOf("firefox")!==-1,p8=4.000244140625,kle=40,Nle=.25;class Dle extends qx{constructor(e,n,r){super(e,n,{enable:!0,...r}),this.handleEvent=i=>{if(!this.options.enable)return;let s=i.deltaY;globalThis.WheelEvent&&(Rle&&i.deltaMode===globalThis.WheelEvent.DOM_DELTA_PIXEL&&(s/=globalThis.devicePixelRatio),i.deltaMode===globalThis.WheelEvent.DOM_DELTA_LINE&&(s*=kle)),s!==0&&s%p8===0&&(s=Math.floor(s/p8)),i.shiftKey&&s&&(s=s*Nle),this.callback({type:"wheel",center:{x:i.clientX,y:i.clientY},delta:-s,srcEvent:i,pointerType:"mouse",target:i.target})},e.addEventListener("wheel",this.handleEvent,{passive:!1})}destroy(){this.element.removeEventListener("wheel",this.handleEvent)}enableEventType(e,n){e==="wheel"&&(this.options.enable=n)}}const g8=["mousedown","mousemove","mouseup","mouseover","mouseout","mouseleave"];class Ble extends qx{constructor(e,n,r){super(e,n,{enable:!0,...r}),this.handleEvent=s=>{this.handleOverEvent(s),this.handleOutEvent(s),this.handleEnterEvent(s),this.handleLeaveEvent(s),this.handleMoveEvent(s)},this.pressed=!1;const{enable:i}=this.options;this.enableMoveEvent=i,this.enableLeaveEvent=i,this.enableEnterEvent=i,this.enableOutEvent=i,this.enableOverEvent=i,g8.forEach(s=>e.addEventListener(s,this.handleEvent))}
912destroy(){g8.forEach(e=>this.element.removeEventListener(e,this.handleEvent))}enableEventType(e,n){switch(e){case"pointermove":this.enableMoveEvent=n;break;case"pointerover":this.enableOverEvent=n;break;case"pointerout":this.enableOutEvent=n;break;case"pointerenter":this.enableEnterEvent=n;break;case"pointerleave":this.enableLeaveEvent=n;break}}handleOverEvent(e){this.enableOverEvent&&e.type==="mouseover"&&this._emit("pointerover",e)}handleOutEvent(e){this.enableOutEvent&&e.type==="mouseout"&&this._emit("pointerout",e)}handleEnterEvent(e){this.enableEnterEvent&&e.type==="mouseenter"&&this._emit("pointerenter",e)}handleLeaveEvent(e){this.enableLeaveEvent&&e.type==="mouseleave"&&this._emit("pointerleave",e)}handleMoveEvent(e){if(this.enableMoveEvent)switch(e.type){case"mousedown":e.button>=0&&(this.pressed=!0);break;case"mousemove":e.buttons===0&&(this.pressed=!1),this.pressed||this._emit("pointermove",e);break;case"mouseup":this.pressed=!1;break}}_emit(e,n){this.callback({type:e,center:{x:n.clientX,y:n.clientY},srcEvent:n,pointerType:"mouse",target:n.target})}}const m8=["keydown","keyup"];class Lle extends qx{constructor(e,n,r){super(e,n,{enable:!0,tabIndex:0,...r}),this.handleEvent=i=>{const s=i.target||i.srcElement;s.tagName==="INPUT"&&s.type==="text"||s.tagName==="TEXTAREA"||(this.enableDownEvent&&i.type==="keydown"&&this.callback({type:"keydown",srcEvent:i,key:i.key,target:i.target}),this.enableUpEvent&&i.type==="keyup"&&this.callback({type:"keyup",srcEvent:i,key:i.key,target:i.target}))},this.enableDownEvent=this.options.enable,this.enableUpEvent=this.options.enable,e.tabIndex=this.options.tabIndex,e.style.outline="none",m8.forEach(i=>e.addEventListener(i,this.handleEvent))}destroy(){m8.forEach(e=>this.element.removeEventListener(e,this.handleEvent))}enableEventType(e,n){e==="keydown"&&(this.enableDownEvent=n),e==="keyup"&&(this.enableUpEvent=n)}}class Fle extends qx{constructor(e,n,r){super(e,n,r),this.handleEvent=i=>{this.options.enable&&this.callback({type:"contextmenu",center:{x:i.clientX,y:i.clientY},srcEvent:i,pointerType:"mouse",target:i.target})},e.addEventListener("contextmenu",this.handleEvent)}destroy(){this.element.removeEventListener("contextmenu",this.handleEvent)}enableEventType(e,n){e==="contextmenu"&&(this.options.enable=n)}}const v8=1,_P=2,y8=4,Ule={pointerdown:v8,pointermove:_P,pointerup:y8,mousedown:v8,mousemove:_P,mouseup:y8},zle=0,jle=1,Vle=2,Wle=1,$le=2,Hle=4;function qle(t){const e=Ule[t.srcEvent.type];if(!e)return null;const{buttons:n,button:r}=t.srcEvent;let i=!1,s=!1,o=!1;return e===_P?(i=!!(n&Wle),s=!!(n&Hle),o=!!(n&$le)):(i=r===zle,s=r===jle,o=r===Vle),{leftButton:i,middleButton:s,rightButton:o}}function Qle(t,e){const n=t.center;if(!n)return null;const r=e.getBoundingClientRect(),i=r.width/e.offsetWidth||1,s=r.height/e.offsetHeight||1,o={x:(n.x-r.left-e.clientLeft)/i,y:(n.y-r.top-e.clientTop)/s};return{center:n,offsetCenter:o}}const Xle={srcElement:"root",priority:0};class Yle{constructor(e,n){this.handleEvent=r=>{if(this.isEmpty())return;const i=this._normalizeEvent(r);let s=r.srcEvent.target;for(;s&&s!==i.rootElement;){if(this._emit(i,s),i.handled)return;s=s.parentNode}this._emit(i,"root")},this.eventManager=e,this.recognizerName=n,this.handlers=[],this.handlersByElement=new Map,this._active=!1}isEmpty(){return!this._active}add(e,n,r,i=!1,s=!1){const{handlers:o,handlersByElement:a}=this,l={...Xle,...r};let c=a.get(l.srcElement);c||(c=[],a.set(l.srcElement,c));const u={type:e,handler:n,srcElement:l.srcElement,priority:l.priority};i&&(u.once=!0),s&&(u.passive=!0),o.push(u),this._active=this._active||!u.passive;let h=c.length-1;for(;h>=0&&!(c[h].priority>=u.priority);)h--;c.splice(h+1,0,u)}remove(e,n){const{handlers:r,handlersByElement:i}=this;for(let s=r.length-1;s>=0;s--){const o=r[s];if(o.type===e&&o.handler===n){r.splice(s,1);const a=i.get(o.srcElement);a.splice(a.indexOf(o),1),a.length===0&&i.delete(o.srcElement)}}this._active=r.some(s=>!s.passive)}_emit(e,n){const r=this.handlersByElement.get(n);if(r){let i=!1;const s=()=>{e.handled=!0},o=()=>{e.handled=!0,i=!0},a=[];for(let l=0;l<r.length;l++){const{type:c,handler:u,once:h}=r[l];if(u({...e,type:c,stopPropagation:s,stopImmediatePropagation:o}),h&&a.push(r[l]),i)break}for(let l=0;l<a.length;l++){const{type:c,handler:u}=a[l];this.remove(c,u)}}}_normalizeEvent(e){const n=this.eventManager.getElement();return{...e,...qle(e),...Qle(e,n),preventDefault:()=>{e.srcEvent.preventDefault()},stopImmediatePropagation:null,stopPropagation:null,handled:!1,rootElement:n}}}function Kle(t){if("recognizer"in t)return t;let e;const n=Array.isArray(t)?[...t]:[t];if(typeof n[0]=="function"){const r=n.shift(),i=n.shift()||{};e=new r(i)}else e=n.shift();return{recognizer:e,recognizeWith:typeof n[0]=="string"?[n[0]]:n[0],requireFailure:typeof n[1]=="string"?[n[1]]:n[1]}}class Gle{constructor(e=null,n={}){if(this._onBasicInput=r=>{this.manager.emit(r.srcEvent.type,r)},this._onOtherEvent=r=>{this.manager.emit(r.type,r)},this.options={recognizers:[],events:{},touchAction:"compute",tabIndex:0,cssProps:{},...n},this.events=new Map,this.element=e,!!e){this.manager=new Sle(e,this.options);for(const r of this.options.recognizers){const{recognizer:i,recognizeWith:s,requireFailure:o}=Kle(r);this.manager.add(i),s&&i.recognizeWith(s),o&&i.requireFailure(o)}this.manager.on("hammer.input",this._onBasicInput),this.wheelInput=new Dle(e,this._onOtherEvent,{enable:!1}),this.moveInput=new Ble(e,this._onOtherEvent,{enable:!1}
vendor: 12,038 bytes, lines 912-1103
912),this.keyInput=new Lle(e,this._onOtherEvent,{enable:!1,tabIndex:n.tabIndex}),this.contextmenuInput=new Fle(e,this._onOtherEvent,{enable:!1}),this.on(this.options.events)}}getElement(){return this.element}destroy(){this.element&&(this.wheelInput.destroy(),this.moveInput.destroy(),this.keyInput.destroy(),this.contextmenuInput.destroy(),this.manager.destroy())}on(e,n,r){this._addEventHandler(e,n,r,!1)}once(e,n,r){this._addEventHandler(e,n,r,!0)}watch(e,n,r){this._addEventHandler(e,n,r,!1,!0)}off(e,n){this._removeEventHandler(e,n)}_toggleRecognizer(e,n){var s,o,a,l;const{manager:r}=this;if(!r)return;const i=r.get(e);i&&(i.set({enable:n}),r.touchAction.update()),(s=this.wheelInput)==null||s.enableEventType(e,n),(o=this.moveInput)==null||o.enableEventType(e,n),(a=this.keyInput)==null||a.enableEventType(e,n),(l=this.contextmenuInput)==null||l.enableEventType(e,n)}_addEventHandler(e,n,r,i,s){if(typeof e!="string"){r=n;for(const[c,u]of Object.entries(e))this._addEventHandler(c,u,r,i,s);return}const{manager:o,events:a}=this;if(!o)return;let l=a.get(e);if(!l){const c=this._getRecognizerName(e)||e;l=new Yle(this,c),a.set(e,l),o&&o.on(e,l.handleEvent)}l.add(e,n,r,i,s),l.isEmpty()||this._toggleRecognizer(l.recognizerName,!0)}_removeEventHandler(e,n){if(typeof e!="string"){for(const[s,o]of Object.entries(e))this._removeEventHandler(s,o);return}const{events:r}=this,i=r.get(e);if(i&&(i.remove(e,n),i.isEmpty())){const{recognizerName:s}=i;let o=!1;for(const a of r.values())if(a.recognizerName===s&&!a.isEmpty()){o=!0;break}o||this._toggleRecognizer(s,!1)}}_getRecognizerName(e){var n;return(n=this.manager.recognizers.find(r=>r.getEventNames().includes(e)))==null?void 0:n.options.event}}const Wt={DEFAULT:-1,LNGLAT:1,METER_OFFSETS:2,LNGLAT_OFFSETS:3,CARTESIAN:0};Object.defineProperty(Wt,"IDENTITY",{get:()=>(Zt.deprecated("COORDINATE_SYSTEM.IDENTITY","COORDINATE_SYSTEM.CARTESIAN")(),0)});const so={WEB_MERCATOR:1,GLOBE:2,WEB_MERCATOR_AUTO_OFFSET:4,IDENTITY:0},Ml={common:0,meters:1,pixels:2},wP={click:"onClick",dblclick:"onClick",panstart:"onDragStart",panmove:"onDrag",panend:"onDragEnd"},b8={multipan:[d8,{threshold:10,direction:Qr.Vertical,pointers:2}],pinch:[Ole,{},null,["multipan"]],pan:[d8,{threshold:1},["pinch"],["multipan"]],dblclick:[h8,{event:"dblclick",taps:2}],click:[h8,{event:"click"},null,["dblclick"]]};function Zle(t,e){if(t===e)return!0;if(Array.isArray(t)){const n=t.length;if(!e||e.length!==n)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}return!1}function xy(t){let e={},n;return r=>{for(const i in r)if(!Zle(r[i],e[i])){n=t(r),e=r;break}return n}}const _8=[0,0,0,0],Jle=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0],vH=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],ece=[0,0,0],yH=[0,0,0],tce=xy(ice);function bH(t,e,n=yH){n.length<3&&(n=[n[0],n[1],0]);let r=n,i,s=!0;switch(e===Wt.LNGLAT_OFFSETS||e===Wt.METER_OFFSETS?i=n:i=t.isGeospatial?[Math.fround(t.longitude),Math.fround(t.latitude),0]:null,t.projectionMode){case so.WEB_MERCATOR:(e===Wt.LNGLAT||e===Wt.CARTESIAN)&&(i=[0,0,0],s=!1);break;case so.WEB_MERCATOR_AUTO_OFFSET:e===Wt.LNGLAT?r=i:e===Wt.CARTESIAN&&(r=[Math.fround(t.center[0]),Math.fround(t.center[1]),0],i=t.unprojectPosition(r),r[0]-=n[0],r[1]-=n[1],r[2]-=n[2]);break;case so.IDENTITY:r=t.position.map(Math.fround),r[2]=r[2]||0;break;case so.GLOBE:s=!1,i=null;break;default:s=!1}return{geospatialOrigin:i,shaderCoordinateOrigin:r,offsetMode:s}}function nce(t,e,n){const{viewMatrixUncentered:r,projectionMatrix:i}=t;let{viewMatrix:s,viewProjectionMatrix:o}=t,a=_8,l=_8,c=t.cameraPosition;const{geospatialOrigin:u,shaderCoordinateOrigin:h,offsetMode:d}=bH(t,e,n);return d&&(l=t.projectPosition(u||h),c=[c[0]-l[0],c[1]-l[1],c[2]-l[2]],l[3]=1,a=Rm([],l,o),s=r||s,o=Vh([],i,s),o=Vh([],o,Jle)),{viewMatrix:s,viewProjectionMatrix:o,projectionCenter:a,originCommon:l,cameraPosCommon:c,shaderCoordinateOrigin:h,geospatialOrigin:u}}function rce({viewport:t,devicePixelRatio:e=1,modelMatrix:n=null,coordinateSystem:r=Wt.DEFAULT,coordinateOrigin:i=yH,autoWrapLongitude:s=!1}){r===Wt.DEFAULT&&(r=t.isGeospatial?Wt.LNGLAT:Wt.CARTESIAN);const o=tce({viewport:t,devicePixelRatio:e,coordinateSystem:r,coordinateOrigin:i});return o.wrapLongitude=s,o.modelMatrix=n||vH,o}function ice({viewport:t,devicePixelRatio:e,coordinateSystem:n,coordinateOrigin:r}){const{projectionCenter:i,viewProjectionMatrix:s,originCommon:o,cameraPosCommon:a,shaderCoordinateOrigin:l,geospatialOrigin:c}=nce(t,n,r),u=t.getDistanceScales(),h=[t.width*e,t.height*e],d=Rm([],[0,0,-t.focalDistance,1],t.projectionMatrix)[3]||1,m={coordinateSystem:n,projectionMode:t.projectionMode,coordinateOrigin:l,commonOrigin:o.slice(0,3),center:i,pseudoMeters:!!t._pseudoMeters,viewportSize:h,devicePixelRatio:e,focalDistance:d,commonUnitsPerMeter:u.unitsPerMeter,commonUnitsPerWorldUnit:u.unitsPerMeter,commonUnitsPerWorldUnit2:ece,scale:t.scale,wrapLongitude:!1,viewProjectionMatrix:s,modelMatrix:vH,cameraPosition:a};if(c){const y=t.getDistanceScales(c);switch(n){case Wt.METER_OFFSETS:m.commonUnitsPerWorldUnit=y.unitsPerMeter,m.commonUnitsPerWorldUnit2=y.unitsPerMeter2;break;case Wt.LNGLAT:case Wt.LNGLAT_OFFSETS:t._pseudoMeters||(m.commonUnitsPerMeter=y.unitsPerMeter),m.commonUnitsPerWorldUnit=y.unitsPerDegree,m.commonUnitsPerWorldUnit2=y.unitsPerDegree2;break;case Wt.CARTESIAN:m.commonUnitsPerWorldUnit=[1,1,y.unitsPerMeter[2]],m.commonUnitsPerWorldUnit2=[0,0,y.unitsPerMeter2[2]];break}}return m}const sce=Object.keys(Wt).map(t=>`const COORDINATE_SYSTEM_${t}: i32 = ${Wt[t]};`).join(""),oce=Object.keys(so).map(t=>`const PROJECTION_MODE_${t}: i32 = ${so[t]};`).join(""),ace=Object.keys(Ml).map(t=>`const UNIT_${t.toUpperCase()}: i32 = ${Ml[t]};`).join(""),lce=`${sce}
913${oce}
914${ace}
915
916const TILE_SIZE: f32 = 512.0;
917const PI: f32 = 3.1415926536;
918const WORLD_SCALE: f32 = TILE_SIZE / (PI * 2.0);
919const ZERO_64_LOW: vec3<f32> = vec3<f32>(0.0, 0.0, 0.0);
920const EARTH_RADIUS: f32 = 6370972.0; // meters
921const GLOBE_RADIUS: f32 = 256.0;
922
923// -----------------------------------------------------------------------------
924// Uniform block (converted from GLSL uniform block)
925// -----------------------------------------------------------------------------
926struct ProjectUniforms {
927  wrapLongitude: i32,
928  coordinateSystem: i32,
929  commonUnitsPerMeter: vec3<f32>,
930  projectionMode: i32,
931  scale: f32,
932  commonUnitsPerWorldUnit: vec3<f32>,
933  commonUnitsPerWorldUnit2: vec3<f32>,
934  center: vec4<f32>,
935  modelMatrix: mat4x4<f32>,
936  viewProjectionMatrix: mat4x4<f32>,
937  viewportSize: vec2<f32>,
938  devicePixelRatio: f32,
939  focalDistance: f32,
940  cameraPosition: vec3<f32>,
941  coordinateOrigin: vec3<f32>,
942  commonOrigin: vec3<f32>,
943  pseudoMeters: i32,
944};
945
946@group(0) @binding(0)
947var<uniform> project: ProjectUniforms;
948
949// -----------------------------------------------------------------------------
950// Geometry data
951// (In your GLSL code, "geometry" was assumed to be available globally. In WGSL,
952// you might supply this via vertex attributes or a uniform. Here we define a
953// uniform struct for demonstration.)
954// -----------------------------------------------------------------------------
955
956// Structure to carry additional geometry data used by deck.gl filters.
957struct Geometry {
958  worldPosition: vec3<f32>,
959  worldPositionAlt: vec3<f32>,
960  position: vec4<f32>,
961  uv: vec2<f32>,
962  pickingColor: vec3<f32>,
963};
964
965// @group(0) @binding(1)
966var<private> geometry: Geometry;
967`,cce=`${lce}
968
969// -----------------------------------------------------------------------------
970// Functions
971// -----------------------------------------------------------------------------
972
973// Returns an adjustment factor for commonUnitsPerMeter
974fn _project_size_at_latitude(lat: f32) -> f32 {
975  let y = clamp(lat, -89.9, 89.9);
976  return 1.0 / cos(radians(y));
977}
978
979// Overloaded version: scales a value in meters at a given latitude.
980fn _project_size_at_latitude_m(meters: f32, lat: f32) -> f32 {
981  return meters * project.commonUnitsPerMeter.z * _project_size_at_latitude(lat);
982}
983
984// Computes a non-linear scale factor based on geometry.
985// (Note: This function relies on "geometry" being provided.)
986fn project_size() -> f32 {
987  if (project.projectionMode == PROJECTION_MODE_WEB_MERCATOR &&
988      project.coordinateSystem == COORDINATE_SYSTEM_LNGLAT &&
989      project.pseudoMeters == 0) {
990    if (geometry.position.w == 0.0) {
991      return _project_size_at_latitude(geometry.worldPosition.y);
992    }
993    let y: f32 = geometry.position.y / TILE_SIZE * 2.0 - 1.0;
994    let y2 = y * y;
995    let y4 = y2 * y2;
996    let y6 = y4 * y2;
997    return 1.0 + 4.9348 * y2 + 4.0587 * y4 + 1.5642 * y6;
998  }
999  return 1.0;
1000}
1001
1002// Overloads to scale offsets (meters to world units)
1003fn project_size_float(meters: f32) -> f32 {
1004  return meters * project.commonUnitsPerMeter.z * project_size();
1005}
1006
1007fn project_size_vec2(meters: vec2<f32>) -> vec2<f32> {
1008  return meters * project.commonUnitsPerMeter.xy * project_size();
1009}
1010
1011fn project_size_vec3(meters: vec3<f32>) -> vec3<f32> {
1012  return meters * project.commonUnitsPerMeter * project_size();
1013}
1014
1015fn project_size_vec4(meters: vec4<f32>) -> vec4<f32> {
1016  return vec4<f32>(meters.xyz * project.commonUnitsPerMeter, meters.w);
1017}
1018
1019// Returns a rotation matrix aligning the z‑axis with the given up vector.
1020fn project_get_orientation_matrix(up: vec3<f32>) -> mat3x3<f32> {
1021  let uz = normalize(up);
1022  let ux = select(
1023    vec3<f32>(1.0, 0.0, 0.0),
1024    normalize(vec3<f32>(uz.y, -uz.x, 0.0)),
1025    abs(uz.z) == 1.0
1026  );
1027  let uy = cross(uz, ux);
1028  return mat3x3<f32>(ux, uy, uz);
1029}
1030
1031// Since WGSL does not support "out" parameters, we return a struct.
1032struct RotationResult {
1033  needsRotation: bool,
1034  transform: mat3x3<f32>,
1035};
1036
1037fn project_needs_rotation(commonPosition: vec3<f32>) -> RotationResult {
1038  if (project.projectionMode == PROJECTION_MODE_GLOBE) {
1039    return RotationResult(true, project_get_orientation_matrix(commonPosition));
1040  } else {
1041    return RotationResult(false, mat3x3<f32>());  // identity alternative if needed
1042  };
1043}
1044
1045// Projects a normal vector from the current coordinate system to world space.
1046fn project_normal(vector: vec3<f32>) -> vec3<f32> {
1047  let normal_modelspace = project.modelMatrix * vec4<f32>(vector, 0.0);
1048  var n = normalize(normal_modelspace.xyz * project.commonUnitsPerMeter);
1049  let rotResult = project_needs_rotation(geometry.position.xyz);
1050  if (rotResult.needsRotation) {
1051    n = rotResult.transform * n;
1052  }
1053  return n;
1054}
1055
1056// Applies a scale offset based on y-offset (dy)
1057fn project_offset_(offset: vec4<f32>) -> vec4<f32> {
1058  let dy: f32 = offset.y;
1059  let commonUnitsPerWorldUnit = project.commonUnitsPerWorldUnit + project.commonUnitsPerWorldUnit2 * dy;
1060  return vec4<f32>(offset.xyz * commonUnitsPerWorldUnit, offset.w);
1061}
1062
1063// Projects lng/lat coordinates to a unit tile [0,1]
1064fn project_mercator_(lnglat: vec2<f32>) -> vec2<f32> {
1065  var x = lnglat.x;
1066  if (project.wrapLongitude != 0) {
1067    x = ((x + 180.0) % 360.0) - 180.0;
1068  }
1069  let y = clamp(lnglat.y, -89.9, 89.9);
1070  return vec2<f32>(
1071    radians(x) + PI,
1072    PI + log(tan(PI * 0.25 + radians(y) * 0.5))
1073  ) * WORLD_SCALE;
1074}
1075
1076// Projects lng/lat/z coordinates for a globe projection.
1077fn project_globe_(lnglatz: vec3<f32>) -> vec3<f32> {
1078  let lambda = radians(lnglatz.x);
1079  let phi = radians(lnglatz.y);
1080  let cosPhi = cos(phi);
1081  let D = (lnglatz.z / EARTH_RADIUS + 1.0) * GLOBE_RADIUS;
1082  return vec3<f32>(
1083    sin(lambda) * cosPhi,
1084    -cos(lambda) * cosPhi,
1085    sin(phi)
1086  ) * D;
1087}
1088
1089// Projects positions (with an optional 64-bit low part) from the input
1090// coordinate system to the common space.
1091fn project_position_vec4_f64(position: vec4<f32>, position64Low: vec3<f32>) -> vec4<f32> {
1092  var position_world = project.modelMatrix * position;
1093
1094  // Work around for a Mac+NVIDIA bug:
1095  if (project.projectionMode == PROJECTION_MODE_WEB_MERCATOR) {
1096    if (project.coordinateSystem == COORDINATE_SYSTEM_LNGLAT) {
1097      return vec4<f32>(
1098        project_mercator_(position_world.xy),
1099        _project_size_at_latitude_m(position_world.z, position_world.y),
1100        position_world.w
1101      );
1102    }
1103    if (project.coordinateSystem == COORDINATE_SYSTEM_CARTESIAN) {
1104      position_world = vec4f(position_world.xyz + project.coordinateOrigin, position_world.w);
1105    }
1106  }
1107  if (project.projectionMode == PROJECTION_MODE_GLOBE) {
1108    if (project.coordinateSystem == COORDINATE_SYSTEM_LNGLAT) {
1109      return vec4<f32>(
1110        project_globe_(position_world.xyz),
1111        position_world.w
1112      );
1113    }
1114  }
1115  if (project.projectionMode == PROJECTION_MODE_WEB_MERCATOR_AUTO_OFFSET) {
1116    if (project.coordinateSystem == COORDINATE_SYSTEM_LNGLAT) {
1117      if (abs(position_world.y - project.coordinateOrigin.y) > 0.25) {
1118        return vec4<f32>(
1119          project_mercator_(position_world.xy) - project.commonOrigin.xy,
1120          project_size_float(position_world.z),
1121          position_world.w
1122        );
1123      }
1124    }
1125  }
1126  if (project.projectionMode == PROJECTION_MODE_IDENTITY ||
1127      (project.projectionMode == PROJECTION_MODE_WEB_MERCATOR_AUTO_OFFSET &&
1128       (project.coordinateSystem == COORDINATE_SYSTEM_LNGLAT ||
1129        project.coordinateSystem == COORDINATE_SYSTEM_CARTESIAN))) {
1130    position_world = vec4f(position_world.xyz - project.coordinateOrigin, position_world.w);
1131  }
1132
1133  return project_offset_(position_world) +
1134         project_offset_(project.modelMatrix * vec4<f32>(position64Low, 0.0));
1135}
1136
1137// Overloaded versions for different input types.
1138fn project_position_vec4_f32(position: vec4<f32>) -> vec4<f32> {
1139  return project_position_vec4_f64(position, ZERO_64_LOW);
1140}
1141
1142fn project_position_vec3_f64(position: vec3<f32>, position64Low: vec3<f32>) -> vec3<f32> {
1143  let projected_position = project_position_vec4_f64(vec4<f32>(position, 1.0), position64Low);
1144  return projected_position.xyz;
1145}
1146
1147fn project_position_vec3_f32(position: vec3<f32>) -> vec3<f32> {
1148  let projected_position = project_position_vec4_f64(vec4<f32>(position, 1.0), ZERO_64_LOW);
1149  return projected_position.xyz;
1150}
1151
1152fn project_position_vec2_f32(position: vec2<f32>) -> vec2<f32> {
1153  let projected_position = project_position_vec4_f64(vec4<f32>(position, 0.0, 1.0), ZERO_64_LOW);
1154  return projected_position.xy;
1155}
1156
1157// Transforms a common space position to clip space.
1158fn project_common_position_to_clipspace_with_projection(position: vec4<f32>, viewProjectionMatrix: mat4x4<f32>, center: vec4<f32>) -> vec4<f32> {
1159  return viewProjectionMatrix * position + center;
1160}
1161
1162// Uses the project viewProjectionMatrix and center.
1163fn project_common_position_to_clipspace(position: vec4<f32>) -> vec4<f32> {
1164  return project_common_position_to_clipspace_with_projection(position, project.viewProjectionMatrix, project.center);
1165}
1166
1167// Returns a clip space offset corresponding to a given number of screen pixels.
1168fn project_pixel_size_to_clipspace(pixels: vec2<f32>) -> vec2<f32> {
1169  let offset = pixels / project.viewportSize * project.devicePixelRatio * 2.0;
1170  return offset * project.focalDistance;
1171}
1172
1173fn project_meter_size_to_pixel(meters: f32) -> f32 {
1174  return project_size_float(meters) * project.scale;
1175}
1176
1177fn project_unit_size_to_pixel(size: f32, unit: i32) -> f32 {
1178  if (unit == UNIT_METERS) {
1179    return project_meter_size_to_pixel(size);
1180  } else if (unit == UNIT_COMMON) {
1181    return size * project.scale;
1182  }
1183  // UNIT_PIXELS: no scaling applied.
1184  return size;
1185}
1186
1187fn project_pixel_size_float(pixels: f32) -> f32 {
1188  return pixels / project.scale;
1189}
1190
1191fn project_pixel_size_vec2(pixels: vec2<f32>) -> vec2<f32> {
1192  return pixels / project.scale;
1193}
1194`,uce=Object.keys(Wt).map(t=>`const int COORDINATE_SYSTEM_${t} = ${Wt[t]};`).join(""),fce=Object.keys(so).map(t=>`const int PROJECTION_MODE_${t} = ${so[t]};`).join(""),hce=Object.keys(Ml).map(t=>`const int UNIT_${t.toUpperCase()} = ${Ml[t]};`).join(""),dce=`${uce}
1195${fce}
1196${hce}
vendor: 5,730 bytes, lines 1197-1373
1197uniform projectUniforms {
1198bool wrapLongitude;
1199int coordinateSystem;
1200vec3 commonUnitsPerMeter;
1201int projectionMode;
1202float scale;
1203vec3 commonUnitsPerWorldUnit;
1204vec3 commonUnitsPerWorldUnit2;
1205vec4 center;
1206mat4 modelMatrix;
1207mat4 viewProjectionMatrix;
1208vec2 viewportSize;
1209float devicePixelRatio;
1210float focalDistance;
1211vec3 cameraPosition;
1212vec3 coordinateOrigin;
1213vec3 commonOrigin;
1214bool pseudoMeters;
1215} project;
1216const float TILE_SIZE = 512.0;
1217const float PI = 3.1415926536;
1218const float WORLD_SCALE = TILE_SIZE / (PI * 2.0);
1219const vec3 ZERO_64_LOW = vec3(0.0);
1220const float EARTH_RADIUS = 6370972.0;
1221const float GLOBE_RADIUS = 256.0;
1222float project_size_at_latitude(float lat) {
1223float y = clamp(lat, -89.9, 89.9);
1224return 1.0 / cos(radians(y));
1225}
1226float project_size() {
1227if (project.projectionMode == PROJECTION_MODE_WEB_MERCATOR &&
1228project.coordinateSystem == COORDINATE_SYSTEM_LNGLAT &&
1229project.pseudoMeters == false) {
1230if (geometry.position.w == 0.0) {
1231return project_size_at_latitude(geometry.worldPosition.y);
1232}
1233float y = geometry.position.y / TILE_SIZE * 2.0 - 1.0;
1234float y2 = y * y;
1235float y4 = y2 * y2;
1236float y6 = y4 * y2;
1237return 1.0 + 4.9348 * y2 + 4.0587 * y4 + 1.5642 * y6;
1238}
1239return 1.0;
1240}
1241float project_size_at_latitude(float meters, float lat) {
1242return meters * project.commonUnitsPerMeter.z * project_size_at_latitude(lat);
1243}
1244float project_size(float meters) {
1245return meters * project.commonUnitsPerMeter.z * project_size();
1246}
1247vec2 project_size(vec2 meters) {
1248return meters * project.commonUnitsPerMeter.xy * project_size();
1249}
1250vec3 project_size(vec3 meters) {
1251return meters * project.commonUnitsPerMeter * project_size();
1252}
1253vec4 project_size(vec4 meters) {
1254return vec4(meters.xyz * project.commonUnitsPerMeter, meters.w);
1255}
1256mat3 project_get_orientation_matrix(vec3 up) {
1257vec3 uz = normalize(up);
1258vec3 ux = abs(uz.z) == 1.0 ? vec3(1.0, 0.0, 0.0) : normalize(vec3(uz.y, -uz.x, 0));
1259vec3 uy = cross(uz, ux);
1260return mat3(ux, uy, uz);
1261}
1262bool project_needs_rotation(vec3 commonPosition, out mat3 transform) {
1263if (project.projectionMode == PROJECTION_MODE_GLOBE) {
1264transform = project_get_orientation_matrix(commonPosition);
1265return true;
1266}
1267return false;
1268}
1269vec3 project_normal(vec3 vector) {
1270vec4 normal_modelspace = project.modelMatrix * vec4(vector, 0.0);
1271vec3 n = normalize(normal_modelspace.xyz * project.commonUnitsPerMeter);
1272mat3 rotation;
1273if (project_needs_rotation(geometry.position.xyz, rotation)) {
1274n = rotation * n;
1275}
1276return n;
1277}
1278vec4 project_offset_(vec4 offset) {
1279float dy = offset.y;
1280vec3 commonUnitsPerWorldUnit = project.commonUnitsPerWorldUnit + project.commonUnitsPerWorldUnit2 * dy;
1281return vec4(offset.xyz * commonUnitsPerWorldUnit, offset.w);
1282}
1283vec2 project_mercator_(vec2 lnglat) {
1284float x = lnglat.x;
1285if (project.wrapLongitude) {
1286x = mod(x + 180., 360.0) - 180.;
1287}
1288float y = clamp(lnglat.y, -89.9, 89.9);
1289return vec2(
1290radians(x) + PI,
1291PI + log(tan_fp32(PI * 0.25 + radians(y) * 0.5))
1292) * WORLD_SCALE;
1293}
1294vec3 project_globe_(vec3 lnglatz) {
1295float lambda = radians(lnglatz.x);
1296float phi = radians(lnglatz.y);
1297float cosPhi = cos(phi);
1298float D = (lnglatz.z / EARTH_RADIUS + 1.0) * GLOBE_RADIUS;
1299return vec3(
1300sin(lambda) * cosPhi,
1301-cos(lambda) * cosPhi,
1302sin(phi)
1303) * D;
1304}
1305vec4 project_position(vec4 position, vec3 position64Low) {
1306vec4 position_world = project.modelMatrix * position;
1307if (project.projectionMode == PROJECTION_MODE_WEB_MERCATOR) {
1308if (project.coordinateSystem == COORDINATE_SYSTEM_LNGLAT) {
1309return vec4(
1310project_mercator_(position_world.xy),
1311project_size_at_latitude(position_world.z, position_world.y),
1312position_world.w
1313);
1314}
1315if (project.coordinateSystem == COORDINATE_SYSTEM_CARTESIAN) {
1316position_world.xyz += project.coordinateOrigin;
1317}
1318}
1319if (project.projectionMode == PROJECTION_MODE_GLOBE) {
1320if (project.coordinateSystem == COORDINATE_SYSTEM_LNGLAT) {
1321return vec4(
1322project_globe_(position_world.xyz),
1323position_world.w
1324);
1325}
1326}
1327if (project.projectionMode == PROJECTION_MODE_WEB_MERCATOR_AUTO_OFFSET) {
1328if (project.coordinateSystem == COORDINATE_SYSTEM_LNGLAT) {
1329if (abs(position_world.y - project.coordinateOrigin.y) > 0.25) {
1330return vec4(
1331project_mercator_(position_world.xy) - project.commonOrigin.xy,
1332project_size(position_world.z),
1333position_world.w
1334);
1335}
1336}
1337}
1338if (project.projectionMode == PROJECTION_MODE_IDENTITY ||
1339(project.projectionMode == PROJECTION_MODE_WEB_MERCATOR_AUTO_OFFSET &&
1340(project.coordinateSystem == COORDINATE_SYSTEM_LNGLAT ||
1341project.coordinateSystem == COORDINATE_SYSTEM_CARTESIAN))) {
1342position_world.xyz -= project.coordinateOrigin;
1343}
1344return project_offset_(position_world) + project_offset_(project.modelMatrix * vec4(position64Low, 0.0));
1345}
1346vec4 project_position(vec4 position) {
1347return project_position(position, ZERO_64_LOW);
1348}
1349vec3 project_position(vec3 position, vec3 position64Low) {
1350vec4 projected_position = project_position(vec4(position, 1.0), position64Low);
1351return projected_position.xyz;
1352}
1353vec3 project_position(vec3 position) {
1354vec4 projected_position = project_position(vec4(position, 1.0), ZERO_64_LOW);
1355return projected_position.xyz;
1356}
1357vec2 project_position(vec2 position) {
1358vec4 projected_position = project_position(vec4(position, 0.0, 1.0), ZERO_64_LOW);
1359return projected_position.xy;
1360}
1361vec4 project_common_position_to_clipspace(vec4 position, mat4 viewProjectionMatrix, vec4 center) {
1362return viewProjectionMatrix * position + center;
1363}
1364vec4 project_common_position_to_clipspace(vec4 position) {
1365return project_common_position_to_clipspace(position, project.viewProjectionMatrix, project.center);
1366}
1367vec2 project_pixel_size_to_clipspace(vec2 pixels) {
1368vec2 offset = pixels / project.viewportSize * project.devicePixelRatio * 2.0;
1369return offset * project.focalDistance;
1370}
1371float project_size_to_pixel(float meters) {
1372return project_size(meters) * project.scale;
1373}
1374float project_size_to_pixel(float size, int unit) {
1375if (unit == UNIT_METERS) return project_size_to_pixel(size);
1376if (unit == UNIT_COMMON) return size * project.scale;
1377return size;
1378}
1379float project_pixel_size(float pixels) {
1380return pixels / project.scale;
1381}
1382vec2 project_pixel_size(vec2 pixels) {
1383return pixels / project.scale;
1384}
1385`,pce={};function gce(t=pce){return"viewport"in t?rce(t):{}}const Gg={name:"project",dependencies:[jae,uH],source:cce,vs:dce,getUniforms:gce,uniformTypes:{wrapLongitude:"f32",coordinateSystem:"i32",commonUnitsPerMeter:"vec3<f32>",projectionMode:"i32",scale:"f32",commonUnitsPerWorldUnit:"vec3<f32>",commonUnitsPerWorldUnit2:"vec3<f32>",center:"vec4<f32>",modelMatrix:"mat4x4<f32>",viewProjectionMatrix:"mat4x4<f32>",viewportSize:"vec2<f32>",devicePixelRatio:"f32",focalDistance:"f32",cameraPosition:"vec3<f32>",coordinateOrigin:"vec3<f32>",commonOrigin:"vec3<f32>",pseudoMeters:"f32"}},mce=`// Define a structure to hold both the clip-space position and the common position.
1386struct ProjectResult {
1387  clipPosition: vec4<f32>,
1388  commonPosition: vec4<f32>,
1389};
1390
1391// This function mimics the GLSL version with the 'out' parameter by returning both values.
1392fn project_position_to_clipspace_and_commonspace(
1393    position: vec3<f32>,
1394    position64Low: vec3<f32>,
1395    offset: vec3<f32>
1396) -> ProjectResult {
1397  // Compute the projected position.
1398  let projectedPosition: vec3<f32> = project_position_vec3_f64(position, position64Low);
1399
1400  // Start with the provided offset.
1401  var finalOffset: vec3<f32> = offset;
1402
1403  // Get whether a rotation is needed and the rotation matrix.
1404  let rotationResult = project_needs_rotation(projectedPosition);
1405
1406  // If rotation is needed, update the offset.
1407  if (rotationResult.needsRotation) {
1408    finalOffset = rotationResult.transform * offset;
1409  }
1410
1411  // Compute the common position.
1412  let commonPosition: vec4<f32> = vec4<f32>(projectedPosition + finalOffset, 1.0);
1413
1414  // Convert to clip-space.
1415  let clipPosition: vec4<f32> = project_common_position_to_clipspace(commonPosition);
1416
1417  return ProjectResult(clipPosition, commonPosition);
1418}
1419
1420// A convenience overload that returns only the clip-space position.
1421fn project_position_to_clipspace(
1422    position: vec3<f32>,
1423    position64Low: vec3<f32>,
1424    offset: vec3<f32>
1425) -> vec4<f32> {
1426  return project_position_to_clipspace_and_commonspace(position, position64Low, offset).clipPosition;
1427}
1428`,vce=`vec4 project_position_to_clipspace(
1429  vec3 position, vec3 position64Low, vec3 offset, out vec4 commonPosition
1430) {
1431  vec3 projectedPosition = project_position(position, position64Low);
1432  mat3 rotation;
1433  if (project_needs_rotation(projectedPosition, rotation)) {
1434    // offset is specified as ENU
1435    // when in globe projection, rotate offset so that the ground alighs with the surface of the globe
1436    offset = rotation * offset;
1437  }
1438  commonPosition = vec4(projectedPosition + offset, 1.0);
1439  return project_common_position_to_clipspace(commonPosition);
1440}
1441
1442vec4 project_position_to_clipspace(
1443  vec3 position, vec3 position64Low, vec3 offset
1444) {
1445  vec4 commonPosition;
1446  return project_position_to_clipspace(position, position64Low, offset, commonPosition);
1447}
1448`,uf={name:"project32",dependencies:[Gg],source:mce,vs:vce};function yce(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function Og(t,e){const n=Rm([],e,t);return fM(n,n,1/n[3]),n}function w8(t,e){const n=t%e;return n<0?e+n:n}function bce(t,e,n){return n*e+(1-n)*t}function xP(t,e,n){return t<e?e:t>n?n:t}function _ce(t){return Math.log(t)*Math.LOG2E}const hM=Math.log2||_ce;function Dc(t,e){if(!t)throw new Error(e||"@math.gl/web-mercator: assertion failed.")}const Ea=Math.PI,_H=Ea/4,zo=Ea/180,AP=180/Ea,Zg=512,tw=4003e4,gg=85.051129,wce=1.5;function x8(t){return Math.pow(2,t)}function wH(t){return hM(t)}function Rl(t){const[e,n]=t;Dc(Number.isFinite(e)),Dc(Number.isFinite(n)&&n>=-90&&n<=90,"invalid latitude");const r=e*zo,i=n*zo,s=Zg*(r+Ea)/(2*Ea),o=Zg*(Ea+Math.log(Math.tan(_H+i*.5)))/(2*Ea);return[s,o]}function Zh(t){const[e,n]=t,r=e/Zg*(2*Ea)-Ea,i=2*(Math.atan(Math.exp(n/Zg*(2*Ea)-Ea))-_H);return[r*AP,i*AP]}function xce(t){const{latitude:e}=t;Dc(Number.isFinite(e));const n=Math.cos(e*zo);return wH(tw*n)-9}function pE(t){const e=Math.cos(t*zo);return Zg/tw/e}function EP(t){const{latitude:e,longitude:n,highPrecision:r=!1}=t;Dc(Number.isFinite(e)&&Number.isFinite(n));const i=Zg,s=Math.cos(e*zo),o=i/360,a=o/s,l=i/tw/s,c={unitsPerMeter:[l,l,l],metersPerUnit:[1/l,1/l,1/l],unitsPerDegree:[o,a,l],degreesPerUnit:[1/o,1/a,1/l]};if(r){const u=zo*Math.tan(e*zo)/s,h=o*u/2,d=i/tw*u,m=d/a*l;c.unitsPerDegree2=[0,h,d],c.unitsPerMeter2=[m,0,m]}return c}function xH(t,e){const[n,r,i]=t,[s,o,a]=e,{unitsPerMeter:l,unitsPerMeter2:c}=EP({longitude:n,latitude:r,highPrecision:!0}),u=Rl(t);u[0]+=s*(l[0]+c[0]*o),u[1]+=o*(l[1]+c[1]*o);const h=Zh(u),d=(i||0)+(a||0);return Number.isFinite(i)||Number.isFinite(a)?[h[0],h[1],d]:h}function Ace(t){const{height:e,pitch:n,bearing:r,altitude:i,scale:s,center:o}=t,a=yce();J_(a,a,[0,0,-i]),G$(a,a,-n*zo),Z$(a,a,r*zo);const l=s/e;return uM(a,a,[l,l,l]),o&&J_(a,a,Ooe([],o)),a}function Ece(t){const{width:e,height:n,altitude:r,pitch:i=0,offset:s,center:o,scale:a,nearZMultiplier:l=1,farZMultiplier:c=1}=t;let{fovy:u=xv(wce)}=t;r!==void 0&&(u=xv(r));const h=u*zo,d=i*zo,m=dM(u);let y=m;o&&(y+=o[2]*a/Math.cos(d)/n);const v=h*(.5+(s?s[1]:0)/n),b=Math.sin(v)*y/Math.sin(xP(Math.PI/2-d-v,.01,Math.PI-.01)),x=Math.sin(d)*b+y,T=y*10,E=Math.min(x*c,T);return{fov:h,aspect:e/n,focalDistance:m,near:l,far:E}}function xv(t){return 2*Math.atan(.5/t)*AP}function dM(t){return .5/Math.tan(.5*t*zo)}function AH(t,e){const[n,r,i=0]=t;return Dc(Number.isFinite(n)&&Number.isFinite(r)&&Number.isFinite(i)),Og(e,[n,r,i,1])}function Qx(t,e,n=0){const[r,i,s]=t;if(Dc(Number.isFinite(r)&&Number.isFinite(i),"invalid pixel coordinate"),Number.isFinite(s))return Og(e,[r,i,s,1]);const o=Og(e,[r,i,0,1]),a=Og(e,[r,i,1,1]),l=o[2],c=a[2],u=l===c?0:((n||0)-l)/(c-l);return j$([],o,a,u)}function Sce(t){const{width:e,height:n,bounds:r,minExtent:i=0,maxZoom:s=24,offset:o=[0,0]}=t,[[a,l],[c,u]]=r,h=Tce(t.padding),d=Rl([a,xP(u,-gg,gg)]),m=Rl([c,xP(l,-gg,gg)]),y=[Math.max(Math.abs(m[0]-d[0]),i),Math.max(Math.abs(m[1]-d[1]),i)],v=[e-h.left-h.right-Math.abs(o[0])*2,n-h.top-h.bottom-Math.abs(o[1])*2];Dc(v[0]>0&&v[1]>0);const b=v[0]/y[0],x=v[1]/y[1],T=(h.right-h.left)/2/b,E=(h.top-h.bottom)/2/x,C=[(m[0]+d[0])/2+T,(m[1]+d[1])/2+E],I=Zh(C),O=Math.min(s,hM(Math.abs(Math.min(b,x))));return Dc(Number.isFinite(O)),{longitude:I[0],latitude:I[1],zoom:O}}function Tce(t=0){return typeof t=="number"?{top:t,bottom:t,left:t,right:t}:(Dc(Number.isFinite(t.top)&&Number.isFinite(t.bottom)&&Number.isFinite(t.left)&&Number.isFinite(t.right)),t)}const A8=Math.PI/180;function Cce(t,e=0){const{width:n,height:r,unproject:i}=t,s={targetZ:e},o=i([0,r],s),a=i([n,r],s);let l,c;const u=t.fovy?.5*t.fovy*A8:Math.atan(.5/t.altitude),h=(90-t.pitch)*A8;return u>h-.01?(l=E8(t,0,e),c=E8(t,n,e)):(l=i([0,0],s),c=i([n,0],s)),[o,a,c,l]}function E8(t,e,n){const{pixelUnprojectionMatrix:r}=t,i=Og(r,[e,0,1,1]),s=Og(r,[e,t.height,1,1]),a=(n*t.distanceScales.unitsPerMeter[2]-i[2])/(s[2]-i[2]),l=j$([],i,s,a),c=Zh(l);return c.push(n),c}const S8=512;function Pce(t){const{width:e,height:n,pitch:r=0}=t;let{longitude:i,latitude:s,zoom:o,bearing:a=0}=t;(i<-180||i>180)&&(i=w8(i+180,360)-180),(a<-180||a>180)&&(a=w8(a+180,360)-180);const l=hM(n/S8);if(o<=l)o=l,s=0;else{const c=n/2/Math.pow(2,o),u=Zh([0,c])[1];if(s<u)s=u;else{const h=Zh([0,S8-c])[1];s>h&&(s=h)}}return{width:e,height:n,longitude:i,latitude:s,zoom:o,pitch:r,bearing:a}}const EH=.01,Ice=["longitude","latitude","zoom"],SH={curve:1.414,speed:1.2};function Oce(t,e,n,r){const{startZoom:i,startCenterXY:s,uDelta:o,w0:a,u1:l,S:c,rho:u,rho2:h,r0:d}=TH(t,e,r);
1448if(l<EH){const C={};for(const I of Ice){const O=t[I],N=e[I];C[I]=bce(O,N,n)}return C}const m=n*c,y=Math.cosh(d)/Math.cosh(d+u*m),v=a*((Math.cosh(d)*Math.tanh(d+u*m)-Math.sinh(d))/h)/l,b=1/y,x=i+wH(b),T=yoe([],o,v);_v(T,T,s);const E=Zh(T);return{longitude:E[0],latitude:E[1],zoom:x}}function Mce(t,e,n){const r={...SH,...n},{screenSpeed:i,speed:s,maxDuration:o}=r,{S:a,rho:l}=TH(t,e,r),c=1e3*a;let u;return Number.isFinite(i)?u=c/(i/l):u=c/s,Number.isFinite(o)&&u>o?0:u}function TH(t,e,n){n=Object.assign({},SH,n);const r=n.curve,i=t.zoom,s=[t.longitude,t.latitude],o=x8(i),a=e.zoom,l=[e.longitude,e.latitude],c=x8(a-i),u=Rl(s),h=Rl(l),d=xoe([],h,u),m=Math.max(t.width,t.height),y=m/c,v=boe(d)*o,b=Math.max(v,EH),x=r*r,T=(y*y-m*m+x*x*b*b)/(2*m*x*b),E=(y*y-m*m-x*x*b*b)/(2*y*x*b),C=Math.log(Math.sqrt(T*T+1)-T),I=Math.log(Math.sqrt(E*E+1)-E),O=(I-C)/r;return{startZoom:i,startCenterXY:u,uDelta:d,w0:m,u1:v,S:O,rho:r,rho2:x,r0:C,r1:I}}const CH=`
1449uniform shadowUniforms {
1450  bool drawShadowMap;
1451  bool useShadowMap;
1452  vec4 color;
1453  highp int lightId;
1454  float lightCount;
1455  mat4 viewProjectionMatrix0;
1456  mat4 viewProjectionMatrix1;
1457  vec4 projectCenter0;
1458  vec4 projectCenter1;
1459} shadow;
1460`,Rce=`
1461const int max_lights = 2;
1462
1463out vec3 shadow_vPosition[max_lights];
1464
1465vec4 shadow_setVertexPosition(vec4 position_commonspace) {
1466  mat4 viewProjectionMatrices[max_lights];
1467  viewProjectionMatrices[0] = shadow.viewProjectionMatrix0;
1468  viewProjectionMatrices[1] = shadow.viewProjectionMatrix1;
1469  vec4 projectCenters[max_lights];
1470  projectCenters[0] = shadow.projectCenter0;
1471  projectCenters[1] = shadow.projectCenter1;
1472
1473  if (shadow.drawShadowMap) {
1474    return project_common_position_to_clipspace(position_commonspace, viewProjectionMatrices[shadow.lightId], projectCenters[shadow.lightId]);
1475  }
1476  if (shadow.useShadowMap) {
1477    for (int i = 0; i < max_lights; i++) {
1478      if(i < int(shadow.lightCount)) {
1479        vec4 shadowMap_position = project_common_position_to_clipspace(position_commonspace, viewProjectionMatrices[i], projectCenters[i]);
1480        shadow_vPosition[i] = (shadowMap_position.xyz / shadowMap_position.w + 1.0) / 2.0;
1481      }
1482    }
1483  }
1484  return gl_Position;
1485}
1486`,kce=`
1487${CH}
1488${Rce}
1489`,Nce=`
1490const int max_lights = 2;
1491uniform sampler2D shadow_uShadowMap0;
1492uniform sampler2D shadow_uShadowMap1;
1493
1494in vec3 shadow_vPosition[max_lights];
1495
1496const vec4 bitPackShift = vec4(1.0, 255.0, 65025.0, 16581375.0);
1497const vec4 bitUnpackShift = 1.0 / bitPackShift;
1498const vec4 bitMask = vec4(1.0 / 255.0, 1.0 / 255.0, 1.0 / 255.0,  0.0);
1499
1500float shadow_getShadowWeight(vec3 position, sampler2D shadowMap) {
1501  vec4 rgbaDepth = texture(shadowMap, position.xy);
1502
1503  float z = dot(rgbaDepth, bitUnpackShift);
1504  return smoothstep(0.001, 0.01, position.z - z);
1505}
1506
1507vec4 shadow_filterShadowColor(vec4 color) {
1508  if (shadow.drawShadowMap) {
1509    vec4 rgbaDepth = fract(gl_FragCoord.z * bitPackShift);
1510    rgbaDepth -= rgbaDepth.gbaa * bitMask;
1511    return rgbaDepth;
1512  }
1513  if (shadow.useShadowMap) {
1514    float shadowAlpha = 0.0;
1515    shadowAlpha += shadow_getShadowWeight(shadow_vPosition[0], shadow_uShadowMap0);
1516    if(shadow.lightCount > 1.0) {
1517      shadowAlpha += shadow_getShadowWeight(shadow_vPosition[1], shadow_uShadowMap1);
1518    }
1519    shadowAlpha *= shadow.color.a / shadow.lightCount;
1520    float blendedAlpha = shadowAlpha + color.a * (1.0 - shadowAlpha);
1521
1522    return vec4(
1523      mix(color.rgb, shadow.color.rgb, shadowAlpha / blendedAlpha),
1524      blendedAlpha
1525    );
1526  }
1527  return color;
1528}
1529`,Dce=`
1530${CH}
1531${Nce}
1532`,Bce=xy(jce),Lce=xy(Vce),Fce=[0,0,0,1],Uce=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0];function zce(t,e){const[n,r,i]=t,s=Qx([n,r,i],e);return Number.isFinite(i)?s:[s[0],s[1],0]}function jce({viewport:t,center:e}){return new fi(t.viewProjectionMatrix).invert().transform(e)}function Vce({viewport:t,shadowMatrices:e}){const n=[],r=t.pixelUnprojectionMatrix,i=t.isGeospatial?void 0:1,s=[[0,0,i],[t.width,0,i],[0,t.height,i],[t.width,t.height,i],[0,0,-1],[t.width,0,-1],[0,t.height,-1],[t.width,t.height,-1]].map(o=>zce(o,r));for(const o of e){const a=o.clone().translate(new At(t.center).negate()),l=s.map(u=>a.transform(u)),c=new fi().ortho({left:Math.min(...l.map(u=>u[0])),right:Math.max(...l.map(u=>u[0])),bottom:Math.min(...l.map(u=>u[1])),top:Math.max(...l.map(u=>u[1])),near:Math.min(...l.map(u=>-u[2])),far:Math.max(...l.map(u=>-u[2]))});n.push(c.multiplyRight(o))}return n}function Wce(t){const{shadowEnabled:e=!0,project:n}=t;if(!e||!n||!t.shadowMatrices||!t.shadowMatrices.length)return{drawShadowMap:!1,useShadowMap:!1,shadow_uShadowMap0:t.dummyShadowMap,shadow_uShadowMap1:t.dummyShadowMap};const r=Gg.getUniforms(n),i=Bce({viewport:n.viewport,center:r.center}),s=[],o=Lce({shadowMatrices:t.shadowMatrices,viewport:n.viewport}).slice();for(let l=0;l<t.shadowMatrices.length;l++){const c=o[l],u=c.clone().translate(new At(n.viewport.center).negate());
vendor: 5,700 bytes, lines 1532-1547
1532r.coordinateSystem===Wt.LNGLAT&&r.projectionMode===so.WEB_MERCATOR?(o[l]=u,s[l]=i):(o[l]=c.clone().multiplyRight(Uce),s[l]=u.transform(i))}const a={drawShadowMap:!!t.drawToShadowMap,useShadowMap:t.shadowMaps?t.shadowMaps.length>0:!1,color:t.shadowColor||Fce,lightId:t.shadowLightId||0,lightCount:t.shadowMatrices.length,shadow_uShadowMap0:t.dummyShadowMap,shadow_uShadowMap1:t.dummyShadowMap};for(let l=0;l<o.length;l++)a[`viewProjectionMatrix${l}`]=o[l],a[`projectCenter${l}`]=s[l];for(let l=0;l<2;l++)a[`shadow_uShadowMap${l}`]=t.shadowMaps&&t.shadowMaps[l]||t.dummyShadowMap;return a}const T8={name:"shadow",dependencies:[Gg],vs:kce,fs:Dce,inject:{"vs:DECKGL_FILTER_GL_POSITION":`
1533    position = shadow_setVertexPosition(geometry.position);
1534    `,"fs:DECKGL_FILTER_COLOR":`
1535    color = shadow_filterShadowColor(color);
1536    `},getUniforms:Wce,uniformTypes:{drawShadowMap:"f32",useShadowMap:"f32",color:"vec4<f32>",lightId:"i32",lightCount:"f32",viewProjectionMatrix0:"mat4x4<f32>",viewProjectionMatrix1:"mat4x4<f32>",projectCenter0:"vec4<f32>",projectCenter1:"vec4<f32>"}},ff={...n8,defaultUniforms:{...n8.defaultUniforms,useFloatColors:!1},inject:{"vs:DECKGL_FILTER_GL_POSITION":`
1537    // for picking depth values
1538    picking_setPickingAttribute(position.z / position.w);
1539  `,"vs:DECKGL_FILTER_COLOR":`
1540  picking_setPickingColor(geometry.pickingColor);
1541  `,"fs:DECKGL_FILTER_COLOR":{order:99,injection:`
1542  // use highlight color if this fragment belongs to the selected object.
1543  color = picking_filterHighlightColor(color);
1544
1545  // use picking color if rendering to picking FBO.
1546  color = picking_filterPickingColor(color);
1547    `}}},$ce=[uH],Hce=["vs:DECKGL_FILTER_SIZE(inout vec3 size, VertexGeometry geometry)","vs:DECKGL_FILTER_GL_POSITION(inout vec4 position, VertexGeometry geometry)","vs:DECKGL_FILTER_COLOR(inout vec4 color, VertexGeometry geometry)","fs:DECKGL_FILTER_COLOR(inout vec4 color, FragmentGeometry geometry)"],qce=[];function Qce(t){const e=j_.getDefaultShaderAssembler();for(const r of $ce)e.addDefaultModule(r);const n=t==="glsl"?Hce:qce;for(const r of n)e.addShaderHook(r);return e}const Xce=[255,255,255],Yce=1;let Kce=0;class Gce{constructor(e={}){this.type="ambient";const{color:n=Xce}=e,{intensity:r=Yce}=e;this.id=e.id||`ambient-${Kce++}`,this.color=n,this.intensity=r}}const Zce=[255,255,255],Jce=1,eue=[0,0,-1];let tue=0;class C8{constructor(e={}){this.type="directional";const{color:n=Zce}=e,{intensity:r=Jce}=e,{direction:i=eue}=e,{_shadow:s=!1}=e;this.id=e.id||`directional-${tue++}`,this.color=n,this.intensity=r,this.type="directional",this.direction=new At(i).normalize().toArray(),this.shadow=s}getProjectedLight(e){return this}}class nue{constructor(e,n={id:"pass"}){const{id:r}=n;this.id=r,this.device=e,this.props={...n}}setProps(e){Object.assign(this.props,e)}render(e){}cleanup(){}}class Ay extends nue{constructor(){super(...arguments),this._lastRenderIndex=-1}render(e){const[n,r]=this.device.canvasContext.getDrawingBufferSize(),i=e.clearCanvas??!0,s=e.clearColor??(i?[0,0,0,0]:!1),o=i?1:!1,a=i?0:!1,l=e.colorMask??15,c={viewport:[0,0,n,r]};e.colorMask&&(c.colorMask=l),e.scissorRect&&(c.scissorRect=e.scissorRect);const u=this.device.beginRenderPass({framebuffer:e.target,parameters:c,clearColor:s,clearDepth:o,clearStencil:a});try{return this._drawLayers(u,e)}finally{u.end(),this.device.submit()}}_drawLayers(e,n){const{target:r,shaderModuleProps:i,viewports:s,views:o,onViewportActive:a,clearStack:l=!0}=n;n.pass=n.pass||"unknown",l&&(this._lastRenderIndex=-1);const c=[];for(const u of s){const h=o&&o[u.id];a==null||a(u);const d=this._getDrawLayerParams(u,n),m=u.subViewports||[u];for(const y of m){const v=this._drawLayersInViewport(e,{target:r,shaderModuleProps:i,viewport:y,view:h,pass:n.pass,layers:n.layers},d);c.push(v)}}return c}_getDrawLayerParams(e,{layers:n,pass:r,isPicking:i=!1,layerFilter:s,cullRect:o,effects:a,shaderModuleProps:l},c=!1){var y;const u=[],h=PH(this._lastRenderIndex+1),d={layer:n[0],viewport:e,isPicking:i,renderPass:r,cullRect:o},m={};for(let v=0;v<n.length;v++){const b=n[v],x=this._shouldDrawLayer(b,d,s,m),T={shouldDrawLayer:x};x&&!c&&(T.shouldDrawLayer=!0,T.layerRenderIndex=h(b,x),T.shaderModuleProps=this._getShaderModuleProps(b,a,r,l),T.layerParameters={...(y=b.context.deck)==null?void 0:y.props.parameters,...this.getLayerParameters(b,v,e)}),u[v]=T}return u}_drawLayersInViewport(e,{layers:n,shaderModuleProps:r,pass:i,target:s,viewport:o,view:a},l){const c=rue(this.device,{shaderModuleProps:r,target:s,viewport:o});if(a&&a.props.clear){const h=a.props.clear===!0?{color:!0,depth:!0}:a.props.clear;this.device.beginRenderPass({framebuffer:s,parameters:{viewport:c,scissorRect:c},clearColor:h.color?[0,0,0,0]:!1,clearDepth:h.depth?1:!1}).end()}const u={totalCount:n.length,visibleCount:0,compositeCount:0,pickableCount:0};e.setParameters({viewport:c});for(let h=0;h<n.length;h++){const d=n[h],m=l[h],{shouldDrawLayer:y}=m;if(y&&d.props.pickable&&u.pickableCount++,d.isComposite&&u.compositeCount++,d.isDrawable&&m.shouldDrawLayer){const{layerRenderIndex:v,shaderModuleProps:b,layerParameters:x}=m;u.visibleCount++,this._lastRenderIndex=Math.max(this._lastRenderIndex,v),b.project&&(b.project.viewport=o),d.context.renderPass=e;try{d._drawLayer({renderPass:e,shaderModuleProps:b,uniforms:{layerIndex:v},parameters:x})}catch(T){d.raiseError(T,`drawing ${d} to ${i}`)}}}return u}shouldDrawLayer(e){return!0}getShaderModuleProps(e,n,r){return null}getLayerParameters(e,n,r){return e.props.parameters}_shouldDrawLayer(e,n,r,i){if(!(e.props.visible&&this.shouldDrawLayer(e)))return!1;n.layer=e;let o=e.parent;for(;o;){if(!o.props.visible||!o.filterSubLayer(n))return!1;n.layer=o,o=o.parent}if(r){const a=n.layer.id;
1547if(a in i||(i[a]=r(n)),!i[a])return!1}return e.activateViewport(n.viewport),!0}_getShaderModuleProps(e,n,r,i){var l,c;const s=this.device.canvasContext.cssToDeviceRatio(),o=((l=e.internalState)==null?void 0:l.propsInTransition)||e.props,a={layer:o,picking:{isActive:!1},project:{viewport:e.context.viewport,devicePixelRatio:s,modelMatrix:o.modelMatrix,coordinateSystem:o.coordinateSystem,coordinateOrigin:o.coordinateOrigin,autoWrapLongitude:e.wrapLongitude}};if(n)for(const u of n)P8(a,(c=u.getShaderModuleProps)==null?void 0:c.call(u,e,a));return P8(a,this.getShaderModuleProps(e,n,a),i)}}function PH(t=0,e={}){const n={},r=(i,s)=>{const o=i.props._offset,a=i.id,l=i.parent&&i.parent.id;let c;if(l&&!(l in e)&&r(i.parent,!1),l in n){const u=n[l]=n[l]||PH(e[l],e);c=u(i,s),n[a]=u}else Number.isFinite(o)?(c=o+(e[l]||0),n[a]=null):c=t;return s&&c>=t&&(t=c+1),e[a]=c,c};return r}function rue(t,{shaderModuleProps:e,target:n,viewport:r}){var l;const i=((l=e==null?void 0:e.project)==null?void 0:l.devicePixelRatio)??t.canvasContext.cssToDeviceRatio(),[,s]=t.canvasContext.getDrawingBufferSize(),o=n?n.height:s,a=r;return[a.x*i,o-(a.y+a.height)*i,a.width*i,a.height*i]}function P8(t,...e){for(const n of e)if(n)for(const r in n)t[r]?Object.assign(t[r],n[r]):t[r]=n[r];return t}class iue extends Ay{constructor(e,n){super(e,n);const r=e.createTexture({format:"rgba8unorm",width:1,height:1,sampler:{minFilter:"linear",magFilter:"linear",addressModeU:"clamp-to-edge",addressModeV:"clamp-to-edge"},mipmaps:!0}),i=e.createTexture({format:"depth16unorm",width:1,height:1,mipmaps:!1});this.fbo=e.createFramebuffer({id:"shadowmap",width:1,height:1,colorAttachments:[r],depthStencilAttachment:i})}delete(){this.fbo&&(this.fbo.destroy(),this.fbo=null)}getShadowMap(){return this.fbo.colorAttachments[0].texture}render(e){const n=this.fbo,r=this.device.canvasContext.cssToDeviceRatio(),i=e.viewports[0],s=i.width*r,o=i.height*r,a=[1,1,1,1];(s!==n.width||o!==n.height)&&n.resize({width:s,height:o}),super.render({...e,clearColor:a,target:n,pass:"shadow"})}getLayerParameters(e,n,r){return{...e.props.parameters,blend:!1,depthWriteEnabled:!0,depthCompare:"less-equal"}}shouldDrawLayer(e){return e.props.shadowEnabled!==!1}getShaderModuleProps(e,n,r){return{shadow:{project:r.project,drawToShadowMap:!0}}}}const sue={color:[255,255,255],intensity:1},I8=[{color:[255,255,255],intensity:1,direction:[-1,3,-1]},{color:[255,255,255],intensity:.9,direction:[1,-8,-2.5]}],oue=[0,0,0,200/255];class IH{constructor(e={}){this.id="lighting-effect",this.shadowColor=oue,this.shadow=!1,this.directionalLights=[],this.pointLights=[],this.shadowPasses=[],this.dummyShadowMap=null,this.setProps(e)}setup(e){this.context=e;const{device:n,deck:r}=e;this.shadow&&!this.dummyShadowMap&&(this._createShadowPasses(n),r._addDefaultShaderModule(T8),this.dummyShadowMap=n.createTexture({width:1,height:1}))}setProps(e){this.ambientLight=void 0,this.directionalLights=[],this.pointLights=[];for(const n in e){const r=e[n];switch(r.type){case"ambient":this.ambientLight=r;break;case"directional":this.directionalLights.push(r);break;case"point":this.pointLights.push(r);break}}this._applyDefaultLights(),this.shadow=this.directionalLights.some(n=>n.shadow),this.context&&this.setup(this.context),this.props=e}preRender({layers:e,layerFilter:n,viewports:r,onViewportActive:i,views:s}){if(this.shadow){this.shadowMatrices=this._calculateMatrices();for(let o=0;o<this.shadowPasses.length;o++)this.shadowPasses[o].render({layers:e,layerFilter:n,viewports:r,onViewportActive:i,views:s,shaderModuleProps:{shadow:{shadowLightId:o,dummyShadowMap:this.dummyShadowMap,shadowMatrices:this.shadowMatrices}}})}}getShaderModuleProps(e,n){const r=this.shadow?{project:n.project,shadowMaps:this.shadowPasses.map(o=>o.getShadowMap()),dummyShadowMap:this.dummyShadowMap,shadowColor:this.shadowColor,shadowMatrices:this.shadowMatrices}:{},i={enabled:!0,ambientLight:this.ambientLight,directionalLights:this.directionalLights.map(o=>o.getProjectedLight({layer:e})),pointLights:this.pointLights.map(o=>o.getProjectedLight({layer:e}))},s=e.props.material;return{shadow:r,lighting:i,phongMaterial:s,gouraudMaterial:s}}cleanup(e){for(const n of this.shadowPasses)n.delete();this.shadowPasses.length=0,this.dummyShadowMap&&(this.dummyShadowMap.destroy(),this.dummyShadowMap=null,e.deck._removeDefaultShaderModule(T8))}_calculateMatrices(){const e=[];for(const n of this.directionalLights){const r=new fi().lookAt({eye:new At(n.direction).negate()});e.push(r)}return e}_createShadowPasses(e){for(let n=0;n<this.directionalLights.length;n++){const r=new iue(e);this.shadowPasses[n]=r}}_applyDefaultLights(){const{ambientLight:e,pointLights:n,directionalLights:r}=this;!e&&n.length===0&&r.length===0&&(this.ambientLight=new Gce(sue),this.directionalLights.push(new C8(I8[0]),new C8(I8[1])))}}class aue{constructor(e={}){this._pool=[],this.opts={overAlloc:2,poolSize:100},this.setOptions(e)}setOptions(e){Object.assign(this.opts,e)}allocate(e,n,{size:r=1,type:i,padding:s=0,copy:o=!1,initialize:a=!1,maxCount:l}){const c=i||e&&e.constructor||Float32Array,u=n*r+s;if(ArrayBuffer.isView(e)){if(u<=e.length)return e;if(u*e.BYTES_PER_ELEMENT<=e.buffer.byteLength)return new c(e.buffer,0,u)}let h=1/0;l&&(h=l*r+s);const d=this._allocate(c,u,a,h);return e&&o?d.set(e):a||d.fill(0,0,4),this._release(e),d}release(e){this._release(e)}_allocate(e,n,r,i){let s=Math.max(Math.ceil(n*this.opts.overAlloc),1);s>i&&(s=i);const o=this._pool,a=e.BYTES_PER_ELEMENT*s,l=o.findIndex(c=>c.byteLength>=a);if(l>=0){const c=new e(o.splice(l,1)[0],0,s);return r&&c.fill(0),c}return new e(s)}_release(e){if(!ArrayBuffer.isView(e))return;const n=this._pool,{buffer:r}=e,{byteLength:i}=r,s=n.findIndex(o=>o.byteLength>=i);s<0?n.push(r):(s>0||n.length<this.opts.poolSize)&&n.splice(s,0,r),n.length>this.opts.poolSize&&n.shift()}}const Jg=new aue;function B1(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function lue(t){return[t[12],t[13],t[14]]}function cue(t){return{left:ng(t[3]+t[0],t[7]+t[4],t[11]+t[8],t[15]+t[12]),right:ng(t[3]-t[0],t[7]-t[4],t[11]-t[8],t[15]-t[12]),bottom:ng(t[3]+t[1],t[7]+t[5],t[11]+t[9],t[15]+t[13]),top:ng(t[3]-t[1],t[7]-t[5],t[11]-t[9],t[15]-t[13]),near:ng(t[3]+t[2],t[7]+t[6],t[11]+t[10
vendor: 11,929 bytes, line 1547
1547],t[15]+t[14]),far:ng(t[3]-t[2],t[7]-t[6],t[11]-t[10],t[15]-t[14])}}const O8=new At;function ng(t,e,n,r){O8.set(t,e,n);const i=O8.len();return{distance:r/i,normal:new At(-t/i,-e/i,-n/i)}}function uue(t){return t-Math.fround(t)}let u1;function gE(t,e){const{size:n=1,startIndex:r=0}=e,i=e.endIndex!==void 0?e.endIndex:t.length,s=(i-r)/n;u1=Jg.allocate(u1,s,{type:Float32Array,size:n*2});let o=r,a=0;for(;o<i;){for(let l=0;l<n;l++){const c=t[o++];u1[a+l]=c,u1[a+l+n]=uue(c)}a+=n*2}return u1.subarray(0,s*n*2)}function fue(t){let e=null,n=!1;for(const r of t)r&&(e?(n||(e=[[e[0][0],e[0][1]],[e[1][0],e[1][1]]],n=!0),e[0][0]=Math.min(e[0][0],r[0][0]),e[0][1]=Math.min(e[0][1],r[0][1]),e[1][0]=Math.max(e[1][0],r[1][0]),e[1][1]=Math.max(e[1][1],r[1][1])):e=r);return e}const hue=Math.PI/180,due=B1(),M8=[0,0,0],pue={unitsPerMeter:[1,1,1],metersPerUnit:[1,1,1]};function gue({width:t,height:e,orthographic:n,fovyRadians:r,focalDistance:i,padding:s,near:o,far:a}){const l=t/e,c=n?new fi().orthographic({fovy:r,aspect:l,focalDistance:i,near:o,far:a}):new fi().perspective({fovy:r,aspect:l,near:o,far:a});if(s){const{left:u=0,right:h=0,top:d=0,bottom:m=0}=s,y=wl((u+t-h)/2,0,t)-t/2,v=wl((d+e-m)/2,0,e)-e/2;c[8]-=y*2/t,c[9]+=v*2/e}return c}class dd{constructor(e={}){this._frustumPlanes={},this.id=e.id||this.constructor.displayName||"viewport",this.x=e.x||0,this.y=e.y||0,this.width=e.width||1,this.height=e.height||1,this.zoom=e.zoom||0,this.padding=e.padding,this.distanceScales=e.distanceScales||pue,this.focalDistance=e.focalDistance||1,this.position=e.position||M8,this.modelMatrix=e.modelMatrix||null;const{longitude:n,latitude:r}=e;this.isGeospatial=Number.isFinite(r)&&Number.isFinite(n),this._initProps(e),this._initMatrices(e),this.equals=this.equals.bind(this),this.project=this.project.bind(this),this.unproject=this.unproject.bind(this),this.projectPosition=this.projectPosition.bind(this),this.unprojectPosition=this.unprojectPosition.bind(this),this.projectFlat=this.projectFlat.bind(this),this.unprojectFlat=this.unprojectFlat.bind(this)}get subViewports(){return null}get metersPerPixel(){return this.distanceScales.metersPerUnit[2]/this.scale}get projectionMode(){return this.isGeospatial?this.zoom<12?so.WEB_MERCATOR:so.WEB_MERCATOR_AUTO_OFFSET:so.IDENTITY}equals(e){return e instanceof dd?this===e?!0:e.width===this.width&&e.height===this.height&&e.scale===this.scale&&Tl(e.projectionMatrix,this.projectionMatrix)&&Tl(e.viewMatrix,this.viewMatrix):!1}project(e,{topLeft:n=!0}={}){const r=this.projectPosition(e),i=AH(r,this.pixelProjectionMatrix),[s,o]=i,a=n?o:this.height-o;return e.length===2?[s,a]:[s,a,i[2]]}unproject(e,{topLeft:n=!0,targetZ:r}={}){const[i,s,o]=e,a=n?s:this.height-s,l=r&&r*this.distanceScales.unitsPerMeter[2],c=Qx([i,a,o],this.pixelUnprojectionMatrix,l),[u,h,d]=this.unprojectPosition(c);return Number.isFinite(o)?[u,h,d]:Number.isFinite(r)?[u,h,r]:[u,h]}projectPosition(e){const[n,r]=this.projectFlat(e),i=(e[2]||0)*this.distanceScales.unitsPerMeter[2];return[n,r,i]}unprojectPosition(e){const[n,r]=this.unprojectFlat(e),i=(e[2]||0)*this.distanceScales.metersPerUnit[2];return[n,r,i]}projectFlat(e){if(this.isGeospatial){const n=Rl(e);return n[1]=wl(n[1],-318,830),n}return e}unprojectFlat(e){return this.isGeospatial?Zh(e):e}getBounds(e={}){const n={targetZ:e.z||0},r=this.unproject([0,0],n),i=this.unproject([this.width,0],n),s=this.unproject([0,this.height],n),o=this.unproject([this.width,this.height],n);return[Math.min(r[0],i[0],s[0],o[0]),Math.min(r[1],i[1],s[1],o[1]),Math.max(r[0],i[0],s[0],o[0]),Math.max(r[1],i[1],s[1],o[1])]}getDistanceScales(e){return e&&this.isGeospatial?EP({longitude:e[0],latitude:e[1],highPrecision:!0}):this.distanceScales}containsPixel({x:e,y:n,width:r=1,height:i=1}){return e<this.x+this.width&&this.x<e+r&&n<this.y+this.height&&this.y<n+i}getFrustumPlanes(){return this._frustumPlanes.near?this._frustumPlanes:(Object.assign(this._frustumPlanes,cue(this.viewProjectionMatrix)),this._frustumPlanes)}panByPosition(e,n){return null}_initProps(e){const n=e.longitude,r=e.latitude;this.isGeospatial&&(Number.isFinite(e.zoom)||(this.zoom=xce({latitude:r})+Math.log2(this.focalDistance)),this.distanceScales=e.distanceScales||EP({latitude:r,longitude:n}));const i=Math.pow(2,this.zoom);this.scale=i;const{position:s,modelMatrix:o}=e;let a=M8;if(s&&(a=o?new fi(o).transformAsVector(s,[]):s),this.isGeospatial){const l=this.projectPosition([n,r,0]);this.center=new At(a).scale(this.distanceScales.unitsPerMeter).add(l)}else this.center=this.projectPosition(a)}_initMatrices(e){const{viewMatrix:n=due,projectionMatrix:r=null,orthographic:i=!1,fovyRadians:s,fovy:o=75,near:a=.1,far:l=1e3,padding:c=null,focalDistance:u=1}=e;this.viewMatrixUncentered=n,this.viewMatrix=new fi().multiplyRight(n).translate(new At(this.center).negate()),this.projectionMatrix=r||gue({width:this.width,height:this.height,orthographic:i,fovyRadians:s||o*hue,focalDistance:u,padding:c,near:a,far:l});const h=B1();Vh(h,h,this.projectionMatrix),Vh(h,h,this.viewMatrix),this.viewProjectionMatrix=h,this.viewMatrixInverse=gP([],this.viewMatrix)||this.viewMatrix,this.cameraPosition=lue(this.viewMatrixInverse);const d=B1(),m=B1();uM(d,d,[this.width/2,-this.height/2,1]),J_(d,d,[1,-1,0]),Vh(m,d,this.viewProjectionMatrix),this.pixelProjectionMatrix=m,this.pixelUnprojectionMatrix=gP(B1(),this.pixelProjectionMatrix),this.pixelUnprojectionMatrix||Zt.warn("Pixel project matrix not invertible")()}}dd.displayName="Viewport";class ao extends dd{constructor(e={}){const{latitude:n=0,longitude:r=0,zoom:i=0,pitch:s=0,bearing:o=0,nearZMultiplier:a=.1,farZMultiplier:l=1.01,nearZ:c,farZ:u,orthographic:h=!1,projectionMatrix:d,repeat:m=!1,worldOffset:y=0,position:v,padding:b,legacyMeterSizes:x=!1}=e;let{width:T,height:E,altitude:C=1.5}=e;const I=Math.pow(2,i);T=T||1,E=E||1;let O,N=null;if(d)C=d[5]/2,O=xv(C);else{e.fovy?(O=e.fovy,C=dM(O)):O=xv(C);let F;if(b){const{top:H=0,bottom:W=0}=b;F=[0,wl((H+E-W)/2,0,E)-E/2]}N=Ece({width:T,height:E,scale:I,center:v&&[0,0,v[2]*pE(n)],offset:F,pitch:s,fovy:O,nearZMultiplier:a,farZMultiplier:l}),Number.isFinite(c)&&(N.near=c),Number.isFinite(u)&&(N.far=u)}let U=Ace({height:E,pitch:s,bearing:o,scale:I,altitude:C});y&&(U=new fi().translate([512*y,0,0]).multiplyLeft(U)),super({...e,width:T,height:E,viewMatrix:U,longitude:r,latitude:n,zoom:i,...N,fovy:O,focalDistance:C}),this.latitude=n,this.longitude=r,this.zoom=i,this.pitch=s,this.bearing=o,this.altitude=C,this.fovy=O,this.orthographic=h,this._subViewports=m?[]:null,this._pseudoMeters=x,Object.freeze(this)}get subViewports(){if(this._subViewports&&!this._subViewports.length){const e=this.getBounds(),n=Math.floor((e[0]+180)/360),r=Math.ceil((e[2]-180)/360);for(let i=n;i<=r;i++){const s=i?new ao({...this,worldOffset:i}):this;this._subViewports.push(s)}}return this._subViewports}projectPosition(e){if(this._pseudoMeters)return super.projectPosition(e);const[n,r]=this.projectFlat(e),i=(e[2]||0)*pE(e[1]);return[n,r,i]}unprojectPosition(e){if(this._pseudoMeters)return super.unprojectPosition(e);const[n,r]=this.unprojectFlat(e),i=(e[2]||0)/pE(r);return[n,r,i]}addMetersToLngLat(e,n){return xH(e,n)}panByPosition(e,n){const r=Qx(n,this.pixelUnprojectionMatrix),i=this.projectFlat(e),s=_v([],i,z$([],r)),o=_v([],this.center,s),[a,l]=this.unprojectFlat(o);return{longitude:a,latitude:l}}getBounds(e={}){const n=Cce(this,e.z||0);return[Math.min(n[0][0],n[1][0],n[2][0],n[3][0]),Math.min(n[0][1],n[1][1],n[2][1],n[3][1]),Math.max(n[0][0],n[1][0],n[2][0],n[3][0]),Math.max(n[0][1],n[1][1],n[2][1],n[3][1])]}fitBounds(e,n={}){const{width:r,height:i}=this,{longitude:s,latitude:o,zoom:a}=Sce({width:r,height:i,bounds:e,...n});return new ao({width:r,height:i,longitude:s,latitude:o,zoom:a})}}ao.displayName="WebMercatorViewport";const R8=[0,0,0];function mE(t,e,n=!1){const r=e.projectPosition(t);if(n&&e instanceof ao){const[i,s,o=0]=t,a=e.getDistanceScales([i,s]);r[2]=o*a.unitsPerMeter[2]}return r}function mue(t){const{viewport:e,modelMatrix:n,coordinateOrigin:r}=t;let{coordinateSystem:i,fromCoordinateSystem:s,fromCoordinateOrigin:o}=t;return i===Wt.DEFAULT&&(i=e.isGeospatial?Wt.LNGLAT:Wt.CARTESIAN),s===void 0&&(s=i),o===void 0&&(o=r),{viewport:e,coordinateSystem:i,coordinateOrigin:r,modelMatrix:n,fromCoordinateSystem:s,fromCoordinateOrigin:o}}function OH(t,{viewport:e,modelMatrix:n,coordinateSystem:r,coordinateOrigin:i,offsetMode:s}){let[o,a,l=0]=t;switch(n&&([o,a,l]=Rm([],[o,a,l,1],n)),r){case Wt.LNGLAT:return mE([o,a,l],e,s);case Wt.LNGLAT_OFFSETS:return mE([o+i[0],a+i[1],l+(i[2]||0)],e,s);case Wt.METER_OFFSETS:return mE(xH(i,[o,a,l]),e,s);case Wt.CARTESIAN:default:return e.isGeospatial?[o+i[0],a+i[1],l+i[2]]:e.projectPosition([o,a,l])}}function vue(t,e){const{viewport:n,coordinateSystem:r,coordinateOrigin:i,modelMatrix:s,fromCoordinateSystem:o,fromCoordinateOrigin:a}=mue(e),{autoOffset:l=!0}=e,{geospatialOrigin:c=R8,shaderCoordinateOrigin:u=R8,offsetMode:h=!1}=l?bH(n,r,i):{},d=OH(t,{viewport:n,modelMatrix:s,coordinateSystem:o,coordinateOrigin:a,offsetMode:h});if(h){const m=n.projectPosition(c||u);X$(d,d,m)}return d}let yue=1,bue=1;class MH{constructor(){re(this,"time",0);re(this,"channels",new Map);re(this,"animations",new Map);re(this,"playing",!1);re(this,"lastEngineTime",-1)}addChannel(e){const{delay:n=0,duration:r=Number.POSITIVE_INFINITY,rate:i=1,repeat:s=1}=e,o=yue++,a={time:0,delay:n,duration:r,rate:i,repeat:s};return this._setChannelTime(a,this.time),this.channels.set(o,a),o}removeChannel(e){this.channels.delete(e);for(const[n,r]of this.animations)r.channel===e&&this.detachAnimation(n)}isFinished(e){const n=this.channels.get(e);return n===void 0?!1:this.time>=n.delay+n.duration*n.repeat}getTime(e){if(e===void 0)return this.time;const n=this.channels.get(e);return n===void 0?-1:n.time}setTime(e){this.time=Math.max(0,e);const n=this.channels.values();for(const i of n)this._setChannelTime(i,this.time);const r=this.animations.values();for(const i of r){const{animation:s,channel:o}=i;s.setTime(this.getTime(o))}}play(){this.playing=!0}pause(){this.playing=!1,this.lastEngineTime=-1}reset(){this.setTime(0)}attachAnimation(e,n){const r=bue++;return this.animations.set(r,{animation:e,channel:n}),e.setTime(this.getTime(n)),r}detachAnimation(e){this.animations.delete(e)}update(e){this.playing&&(this.lastEngineTime===-1&&(this.lastEngineTime=e),this.setTime(this.time+(e-this.lastEngineTime)),this.lastEngineTime=e)}_setChannelTime(e,n){const r=n-e.delay,i=e.duration*e.repeat;r>=i?e.time=e.duration*e.rate:(e.time=Math.max(0,r)%e.duration,e.time*=e.rate)}}function _ue(t){return typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame(t):setTimeout(t,1e3/60)}function wue(t){return typeof window<"u"&&window.cancelAnimationFrame?window.cancelAnimationFrame(t):clearTimeout(t)}let xue=0;const Aue={device:null,onAddHTML:()=>"",onInitialize:async()=>null,onRender:()=>{},onFinalize:()=>{},onError:t=>console.error(t),stats:nP.stats.get(`animation-loop-${xue++}`),useDevicePixels:!0,autoResizeViewport:!1,autoResizeDrawingBuffer:!1};class Eue{constructor(e){re(this,"device",null);re(this,"canvas",null);re(this,"props");re(this,"animationProps",null);re(this,"timeline",null);re(this,"stats");re(this,"cpuTime");re(this,"gpuTime");re(this,"frameRate");re(this,"display");re(this,"needsRedraw","initialized");re(this,"_initialized",!1);re(this,"_running",!1);re(this,"_animationFrameId",null);re(this,"_nextFramePromise",null);re(this,"_resolveNextFrame",null);re(this,"_cpuStartTime",0);re(this,"_error",null);if(this.props={...Aue,...e},e=this.props,!e.device)throw new Error("No device provided");const{useDevicePixels:n=!0}=this.props;this.stats=e.stats||new by({id:"animation-loop-stats"}),this.cpuTime=this.stats.get("CPU Time"),this.gpuTime=this.stats.get("GPU Time"),this.frameRate=this.stats.get("Frame Rate"),this.setProps({autoResizeViewport:e.autoResizeViewport,autoResizeDrawingBuffer:e.autoResizeDrawingBuffer,useDevicePixels:n}
1547),this.start=this.start.bind(this),this.stop=this.stop.bind(this),this._onMousemove=this._onMousemove.bind(this),this._onMouseleave=this._onMouseleave.bind(this)}destroy(){this.stop(),this._setDisplay(null)}delete(){this.destroy()}setError(e){var r,i;if(this.props.onError(e),this._error=Error(),((i=(r=this.device)==null?void 0:r.canvasContext)==null?void 0:i.canvas)instanceof HTMLCanvasElement){const s=document.createElement("h1");s.innerHTML=e.message,s.style.position="absolute",s.style.top="20%",s.style.left="10px",s.style.color="black",s.style.backgroundColor="red",document.body.appendChild(s)}}setNeedsRedraw(e){return this.needsRedraw=this.needsRedraw||e,this}setProps(e){return"autoResizeViewport"in e&&(this.props.autoResizeViewport=e.autoResizeViewport||!1),"autoResizeDrawingBuffer"in e&&(this.props.autoResizeDrawingBuffer=e.autoResizeDrawingBuffer||!1),"useDevicePixels"in e&&(this.props.useDevicePixels=e.useDevicePixels||!1),this}async start(){if(this._running)return this;this._running=!0;try{let e;return this._initialized||(this._initialized=!0,await this._initDevice(),this._initialize(),await this.props.onInitialize(this._getAnimationProps())),this._running?(e!==!1&&(this._cancelAnimationFrame(),this._requestAnimationFrame()),this):null}catch(e){const n=e instanceof Error?e:new Error("Unknown error");throw this.props.onError(n),n}}stop(){return this._running&&(this.animationProps&&!this._error&&this.props.onFinalize(this.animationProps),this._cancelAnimationFrame(),this._nextFramePromise=null,this._resolveNextFrame=null,this._running=!1),this}redraw(){var e;return(e=this.device)!=null&&e.isLost||this._error?this:(this._beginFrameTimers(),this._setupFrame(),this._updateAnimationProps(),this._renderFrame(this._getAnimationProps()),this._clearNeedsRedraw(),this._resolveNextFrame&&(this._resolveNextFrame(this),this._nextFramePromise=null,this._resolveNextFrame=null),this._endFrameTimers(),this)}attachTimeline(e){return this.timeline=e,this.timeline}detachTimeline(){this.timeline=null}waitForRender(){return this.setNeedsRedraw("waitForRender"),this._nextFramePromise||(this._nextFramePromise=new Promise(e=>{this._resolveNextFrame=e})),this._nextFramePromise}async toDataURL(){if(this.setNeedsRedraw("toDataURL"),await this.waitForRender(),this.canvas instanceof HTMLCanvasElement)return this.canvas.toDataURL();throw new Error("OffscreenCanvas")}_initialize(){this._startEventHandling(),this._initializeAnimationProps(),this._updateAnimationProps(),this._resizeCanvasDrawingBuffer(),this._resizeViewport()}_setDisplay(e){this.display&&(this.display.destroy(),this.display.animationLoop=null),e&&(e.animationLoop=this),this.display=e}_requestAnimationFrame(){this._running&&(this._animationFrameId=_ue(this._animationFrame.bind(this)))}_cancelAnimationFrame(){this._animationFrameId!==null&&(wue(this._animationFrameId),this._animationFrameId=null)}_animationFrame(){this._running&&(this.redraw(),this._requestAnimationFrame())}_renderFrame(e){var n;if(this.display){this.display._renderFrame(e);return}this.props.onRender(this._getAnimationProps()),(n=this.device)==null||n.submit()}_clearNeedsRedraw(){this.needsRedraw=!1}_setupFrame(){this._resizeCanvasDrawingBuffer(),this._resizeViewport()}_initializeAnimationProps(){var n,r;const e=(r=(n=this.device)==null?void 0:n.canvasContext)==null?void 0:r.canvas;if(!this.device||!e)throw new Error("loop");this.animationProps={animationLoop:this,device:this.device,canvas:e,timeline:this.timeline,useDevicePixels:this.props.useDevicePixels,needsRedraw:!1,width:1,height:1,aspect:1,time:0,startTime:Date.now(),engineTime:0,tick:0,tock:0,_mousePosition:null}}_getAnimationProps(){if(!this.animationProps)throw new Error("animationProps");return this.animationProps}_updateAnimationProps(){if(!this.animationProps)return;const{width:e,height:n,aspect:r}=this._getSizeAndAspect();(e!==this.animationProps.width||n!==this.animationProps.height)&&this.setNeedsRedraw("drawing buffer resized"),r!==this.animationProps.aspect&&this.setNeedsRedraw("drawing buffer aspect changed"),this.animationProps.width=e,this.animationProps.height=n,this.animationProps.aspect=r,this.animationProps.needsRedraw=this.needsRedraw,this.animationProps.engineTime=Date.now()-this.animationProps.startTime,this.timeline&&this.timeline.update(this.animationProps.engineTime),this.animationProps.tick=Math.floor(this.animationProps.time/1e3*60),this.animationProps.tock++,this.animationProps.time=this.timeline?this.timeline.getTime():this.animationProps.engineTime}async _initDevice(){var e;if(this.device=await this.props.device,!this.device)throw new Error("No device provided");this.canvas=((e=this.device.canvasContext)==null?void 0:e.canvas)||null}_createInfoDiv(){if(this.canvas&&this.props.onAddHTML){const e=document.createElement("div");document.body.appendChild(e),e.style.position="relative";const n=document.createElement("div");n.style.position="absolute",n.style.left="10px",n.style.bottom="10px",n.style.width="300px",n.style.background="white",this.canvas instanceof HTMLCanvasElement&&e.appendChild(this.canvas),e.appendChild(n);const r=this.props.onAddHTML(n);r&&(n.innerHTML=r)}}_getSizeAndAspect(){var s,o,a,l;if(!this.device)return{width:1,height:1,aspect:1};const[e,n]=((o=(s=this.device)==null?void 0:s.canvasContext)==null?void 0:o.getPixelSize())||[1,1];let r=1;const i=(l=(a=this.device)==null?void 0:a.canvasContext)==null?void 0:l.canvas;return i&&i.clientHeight?r=i.clientWidth/i.clientHeight:e>0&&n>0&&(r=e/n),{width:e,height:n,aspect:r}}_resizeViewport(){this.props.autoResizeViewport&&this.device.gl&&this.device.gl.viewport(0,0,this.device.gl.drawingBufferWidth,this.device.gl.drawingBufferHeight)}_resizeCanvasDrawingBuffer(){var e,n;this.props.autoResizeDrawingBuffer&&((n=(e=this.device)==null?void 0:e.canvasContext)==null||n.resize({useDevicePixels:this.props.useDevicePixels}))}_beginFrameTimers(){this.frameRate.timeEnd(),this.frameRate.timeStart(),this.cpuTime.timeStart()}_endFrameTimers(){this.cpuTime.timeEnd()}_startEventHandling(){this.canvas&&(this.canvas.addEventListener("mousemove",this._onMousemove.bind(this)),this.canvas.addEventListener("mouseleave",this._onMouseleave.bind(this)))}_onMousemove(e){e instanceof MouseEvent&&(this._getAnimationProps()._mousePosition=[e.offsetX,e.offsetY])}_onMouseleave(e){this._getAnimationProps()._mousePosition=null}}const vE={};function Xx(t="id"){vE[t]=vE[t]||1;const e=vE[t]++;return`${t}-${e}`}class k8{constructor(e){re(this,"id");re(this,"userData",{});re(this,"topology");re(this,"bufferLayout",[]);re(this,"vertexCount");re(this,"indices");re(this,"attributes");if(this.id=e.id||Xx("geometry"),this.topology=e.topology,this.indices=e.indices||null,this.attributes=e.attributes,this.vertexCount=e.vertexCount,this.bufferLayout=e.bufferLayout||[],this.indices&&!(this.indices.usage&lr.INDEX))throw new Error("Index buffer must have INDEX usage")}destroy(){var e;(e=this.indices)==null||e.destroy();for(const n of Object.values(this.attributes))n.destroy()}getVertexCount(){return this.vertexCount}getAttributes(){return this.attributes}getIndexes(){return this.indices||null}_calculateVertexCount(e){return e.byteLength/12}}function Sue(t,e){if(e instanceof k8)return e;const n=Tue(t,e),{attributes:r,bufferLayout:i}=Cue(t,e);return new k8({topology:e.topology||"triangle-list",bufferLayout:i,vertexCount:e.vertexCount,indices:n,attributes:r})}function Tue(t,e){if(!e.indices)return;const n=e.indices.value;return t.createBuffer({usage:lr.INDEX,data:n})}function Cue(t,e){const n=[],r={};for(const[s,o]of Object.entries(e.attributes)){let a=s;switch(s){case"POSITION":a="positions";break;case"NORMAL":a="normals";break;case"TEXCOORD_0":a="texCoords";break;case"COLOR_0":a="colors";break}if(o){r[a]=t.createBuffer({data:o.value,id:`${s}-buffer`});const{value:l,size:c,normalized:u}=o;n.push({name:a,format:Pse(l,c,u)})}}const i=e._calculateVertexCount(e.attributes,e.indices);return{attributes:r,bufferLayout:n,vertexCount:i}}const Ux=class Ux{constructor(e){re(this,"device");re(this,"destroyPolicy");re(this,"_hashCounter",0);re(this,"_hashes",{});re(this,"_renderPipelineCache",{});re(this,"_computePipelineCache",{});this.device=e,this.destroyPolicy=e.props._factoryDestroyPolicy}static getDefaultPipelineFactory(e){return e._lumaData.defaultPipelineFactory=e._lumaData.defaultPipelineFactory||new Ux(e),e._lumaData.defaultPipelineFactory}createRenderPipeline(e){const n={...Yg.defaultProps,...e},r=this._hashRenderPipeline(n);if(!this._renderPipelineCache[r]){const i=this.device.createRenderPipeline({...n,id:n.id?`${n.id}-cached`:void 0});i.hash=r,this._renderPipelineCache[r]={pipeline:i,useCount:0}}return this._renderPipelineCache[r].useCount++,this._renderPipelineCache[r].pipeline}createComputePipeline(e){const n={...q_.defaultProps,...e},r=this._hashComputePipeline(n);if(!this._computePipelineCache[r]){const i=this.device.createComputePipeline({...n,id:n.id?`${n.id}-cached`:void 0});i.hash=r,this._computePipelineCache[r]={pipeline:i,useCount:0}}return this._computePipelineCache[r].useCount++,this._computePipelineCache[r].pipeline}
1547release(e){const n=e.hash,r=e instanceof q_?this._computePipelineCache:this._renderPipelineCache;r[n].useCount--,r[n].useCount===0&&this.destroyPolicy==="unused"&&(r[n].pipeline.destroy(),delete r[n])}_hashComputePipeline(e){return`${this._getHash(e.shader.source)}`}_hashRenderPipeline(e){const n=e.vs?this._getHash(e.vs.source):0,r=e.fs?this._getHash(e.fs.source):0,i="-",s=this._getHash(JSON.stringify(e.bufferLayout));switch(this.device.type){case"webgl":return`${n}/${r}V${i}BL${s}`;default:const o=this._getHash(JSON.stringify(e.parameters));return`${n}/${r}V${i}T${e.topology}P${o}BL${s}`}}_getHash(e){return this._hashes[e]===void 0&&(this._hashes[e]=this._hashCounter++),this._hashes[e]}};re(Ux,"defaultProps",{...Yg.defaultProps});let SP=Ux;const zx=class zx{constructor(e){re(this,"device");re(this,"destroyPolicy");re(this,"_cache",{});this.device=e,this.destroyPolicy=e.props._factoryDestroyPolicy}static getDefaultShaderFactory(e){var n;return(n=e._lumaData).defaultShaderFactory||(n.defaultShaderFactory=new zx(e)),e._lumaData.defaultShaderFactory}createShader(e){const n=this._hashShader(e);let r=this._cache[n];if(!r){const i=this.device.createShader({...e,id:e.id?`${e.id}-cached`:void 0});this._cache[n]=r={shader:i,useCount:0}}return r.useCount++,r.shader}release(e){const n=this._hashShader(e),r=this._cache[n];r&&(r.useCount--,r.useCount===0&&this.destroyPolicy==="unused"&&(delete this._cache[n],r.shader.destroy()))}_hashShader(e){return`${e.stage}:${e.source}`}};re(zx,"defaultProps",{...W_.defaultProps});let TP=zx;function Pue(t,e){var i;const n={},r="Values";if(t.attributes.length===0&&!((i=t.varyings)!=null&&i.length))return{"No attributes or varyings":{[r]:"N/A"}};for(const s of t.attributes)if(s){const o=`${s.location} ${s.name}: ${s.type}`;n[`in ${o}`]={[r]:s.stepMode||"vertex"}}for(const s of t.varyings||[]){const o=`${s.location} ${s.name}`;n[`out ${o}`]={[r]:JSON.stringify(s)}}return n}let oi=null,gh=null;function Iue(t,{id:e,minimap:n,opaque:r,top:i="0",left:s="0",rgbaScale:o=1}){oi||(oi=document.createElement("canvas"),oi.id=e,oi.title=e,oi.style.zIndex="100",oi.style.position="absolute",oi.style.top=i,oi.style.left=s,oi.style.border="blue 5px solid",oi.style.transform="scaleY(-1)",document.body.appendChild(oi),gh=oi.getContext("2d")),(oi.width!==t.width||oi.height!==t.height)&&(oi.width=t.width/2,oi.height=t.height/2,oi.style.width="400px",oi.style.height="400px");const a=t.device.readPixelsToArrayWebGL(t),l=gh==null?void 0:gh.createImageData(t.width,t.height);if(l){for(let u=0;u<a.length;u+=4)l.data[0+u+0]=a[u+0]*o,l.data[0+u+1]=a[u+1]*o,l.data[0+u+2]=a[u+2]*o,l.data[0+u+3]=r?255:a[u+3]*o;gh==null||gh.putImageData(l,0,0)}}function CP(t,e,n){if(t===e)return!0;if(!n||!t||!e)return!1;if(Array.isArray(t)){if(!Array.isArray(e)||t.length!==e.length)return!1;for(let r=0;r<t.length;r++)if(!CP(t[r],e[r],n-1))return!1;return!0}if(Array.isArray(e))return!1;if(typeof t=="object"&&typeof e=="object"){const r=Object.keys(t),i=Object.keys(e);if(r.length!==i.length)return!1;for(const s of r)if(!e.hasOwnProperty(s)||!CP(t[s],e[s],n-1))return!1;return!0}return!1}function Oue(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function Mue(t){return Array.isArray(t)?t.length===0||typeof t[0]=="number":!1}function RH(t){return Oue(t)||Mue(t)}function Rue(t){return RH(t)||typeof t=="number"||typeof t=="boolean"}function kH(t){const e={bindings:{},uniforms:{}};return Object.keys(t).forEach(n=>{const r=t[n];Rue(r)?e.uniforms[n]=r:e.bindings[n]=r}),e}class kue{constructor(e,n){re(this,"options",{disableWarnings:!1});re(this,"modules");re(this,"moduleUniforms");re(this,"moduleBindings");Object.assign(this.options,n);const r=JO(Object.values(e).filter(i=>i.dependencies));for(const i of r)e[i.name]=i;ut.log(1,"Creating ShaderInputs with modules",Object.keys(e))(),this.modules=e,this.moduleUniforms={},this.moduleBindings={};for(const[i,s]of Object.entries(e))this._addModule(s),s.name&&i!==s.name&&!this.options.disableWarnings&&ut.warn(`Module name: ${i} vs ${s.name}`)()}destroy(){}setProps(e){var n;for(const r of Object.keys(e)){const i=r,s=e[i]||{},o=this.modules[i];if(!o){this.options.disableWarnings||ut.warn(`Module ${r} not found`)();continue}const a=this.moduleUniforms[i],l=this.moduleBindings[i],c=((n=o.getUniforms)==null?void 0:n.call(o,s,a))||s,{uniforms:u,bindings:h}=kH(c);this.moduleUniforms[i]={...a,...u},this.moduleBindings[i]={...l,...h}}}getModules(){return Object.values(this.modules)}getUniformValues(){return this.moduleUniforms}getBindingValues(){const e={};
1547for(const n of Object.values(this.moduleBindings))Object.assign(e,n);return e}getDebugTable(){var n;const e={};for(const[r,i]of Object.entries(this.moduleUniforms))for(const[s,o]of Object.entries(i))e[`${r}.${s}`]={type:(n=this.modules[r].uniformTypes)==null?void 0:n[s],value:String(o)};return e}_addModule(e){const n=e.name;this.moduleUniforms[n]=e.defaultUniforms||{},this.moduleBindings[n]={}}}let Nue="";async function Due(t,e){const n=new Image;return n.crossOrigin="anonymous",n.src=t.startsWith("http")?t:Nue+t,await n.decode(),e?await createImageBitmap(n,e):await createImageBitmap(n)}class yE{constructor(e,n){re(this,"device");re(this,"id");re(this,"texture");re(this,"sampler");re(this,"view");re(this,"ready");re(this,"isReady",!1);re(this,"destroyed",!1);re(this,"resolveReady",()=>{});re(this,"rejectReady",()=>{});this.device=e,this.id=n.id||Xx("async-texture"),typeof(n==null?void 0:n.data)=="string"&&n.dimension==="2d"&&(n={...n,data:Due(n.data)}),this.ready=new Promise((r,i)=>{this.resolveReady=()=>{this.isReady=!0,r()},this.rejectReady=i}),this.initAsync(n)}get[Symbol.toStringTag](){return"AsyncTexture"}toString(){return`AsyncTexture:"${this.id}"(${this.isReady?"ready":"loading"})`}async initAsync(e){const n=e.data;let r;try{r=await NH(n)}catch(s){this.rejectReady(s)}if(this.destroyed)return;const i={...e,data:r};this.texture=this.device.createTexture(i),this.sampler=this.texture.sampler,this.view=this.texture.view,this.isReady=!0,this.resolveReady()}destroy(){this.texture&&(this.texture.destroy(),this.texture=null),this.destroyed=!0}resize(e){if(!this.isReady)throw new Error("Cannot resize texture before it is ready");if(e.width===this.texture.width&&e.height===this.texture.height)return!1;if(this.texture){const n=this.texture;this.texture=n.clone(e),n.destroy()}return!0}}async function NH(t){if(t=await t,Array.isArray(t))return await Promise.all(t.map(NH));if(t&&typeof t=="object"&&t.constructor===Object){const e=t,n=await Promise.all(Object.values(e)),r=Object.keys(e),i={};for(let s=0;s<r.length;s++)i[r[s]]=n[s];return i}return t}const mh=2,Bue=1e4,jx=class jx{constructor(e,n){re(this,"device");re(this,"id");re(this,"source");re(this,"vs");re(this,"fs");re(this,"pipelineFactory");re(this,"shaderFactory");re(this,"userData",{});re(this,"parameters");re(this,"topology");re(this,"bufferLayout");re(this,"isInstanced");re(this,"instanceCount",0);re(this,"vertexCount");re(this,"indexBuffer",null);re(this,"bufferAttributes",{});re(this,"constantAttributes",{});re(this,"bindings",{});re(this,"uniforms",{});re(this,"vertexArray");re(this,"transformFeedback",null);re(this,"pipeline");re(this,"shaderInputs");re(this,"_uniformStore");re(this,"_attributeInfos",{});re(this,"_gpuGeometry",null);re(this,"_getModuleUniforms");re(this,"props");re(this,"_pipelineNeedsUpdate","newly created");re(this,"_needsRedraw","initializing");re(this,"_destroyed",!1);re(this,"_lastDrawTimestamp",-1);re(this,"_lastLogTime",0);re(this,"_logOpen",!1);re(this,"_drawCount",0);var l,c,u,h;this.props={...jx.defaultProps,...n},n=this.props,this.id=n.id||Xx("model"),this.device=e,Object.assign(this.userData,n.userData);const r=Object.fromEntries(((l=this.props.modules)==null?void 0:l.map(d=>[d.name,d]))||[]),i=n.shaderInputs||new kue(r,{disableWarnings:this.props.disableWarnings});this.setShaderInputs(i);const s=Fue(e),o=(((c=this.props.modules)==null?void 0:c.length)>0?this.props.modules:(u=this.shaderInputs)==null?void 0:u.getModules())||[];if(this.device.type==="webgpu"&&this.props.source){const{source:d,getUniforms:m}=this.props.shaderAssembler.assembleWGSLShader({platformInfo:s,...this.props,modules:o});this.source=d,this._getModuleUniforms=m,(h=this.props).shaderLayout||(h.shaderLayout=loe(this.source))}else{const{vs:d,fs:m,getUniforms:y}=this.props.shaderAssembler.assembleGLSLShaderPair({platformInfo:s,...this.props,modules:o});this.vs=d,this.fs=m,this._getModuleUniforms=y}this.vertexCount=this.props.vertexCount,this.instanceCount=this.props.instanceCount,this.topology=this.props.topology,this.bufferLayout=this.props.bufferLayout,this.parameters=this.props.parameters,n.geometry&&this.setGeometry(n.geometry),this.pipelineFactory=n.pipelineFactory||SP.getDefaultPipelineFactory(this.device),this.shaderFactory=n.shaderFactory||TP.getDefaultShaderFactory(this.device),this.pipeline=this._updatePipeline(),this.vertexArray=e.createVertexArray({renderPipeline:this.pipeline}),this._gpuGeometry&&this._setGeometryAttributes(this._gpuGeometry),"isInstanced"in n&&(this.isInstanced=n.isInstanced),n.instanceCount&&this.setInstanceCount(n.instanceCount),n.vertexCount&&this.setVertexCount(n.vertexCount),n.indexBuffer&&this.setIndexBuffer(n.indexBuffer),n.attributes&&this.setAttributes(n.attributes),n.constantAttributes&&this.setConstantAttributes(n.constantAttributes),n.bindings&&this.setBindings(n.bindings),n.uniforms&&this.setUniformsWebGL(n.uniforms),n.moduleSettings&&this.updateModuleSettingsWebGL(n.moduleSettings),n.transformFeedback&&(this.transformFeedback=n.transformFeedback),Object.seal(this)}get[Symbol.toStringTag](){return"Model"}toString(){return`Model(${this.id})`}destroy(){var e;this._destroyed||(this.pipelineFactory.release(this.pipeline),this.shaderFactory.release(this.pipeline.vs),this.pipeline.fs&&this.shaderFactory.release(this.pipeline.fs),this._uniformStore.destroy(),(e=this._gpuGeometry)==null||e.destroy(),this._destroyed=!0)}needsRedraw(){this._getBindingsUpdateTimestamp()>this._lastDrawTimestamp&&this.setNeedsRedraw("contents of bound textures or buffers updated");const e=this._needsRedraw;return this._needsRedraw=!1,e}setNeedsRedraw(e){this._needsRedraw||(this._needsRedraw=e)}predraw(){this.updateShaderInputs(),this.pipeline=this._updatePipeline()}draw(e){const n=this._areBindingsLoading();if(n)return ut.info(mh,`>>> DRAWING ABORTED ${this.id}: ${n} not loaded`)(),!1;try{e.pushDebugGroup(`${this}.predraw(${e})`),this.predraw()}finally{e.popDebugGroup()}let r;try{e.pushDebugGroup(`${this}.draw(${e})`),this._logDrawCallStart(),this.pipeline=this._updatePipeline();const i=this._getBindings();this.pipeline.setBindings(i,{disableWarnings:this.props.disableWarnings}),PP(this.uniforms)||this.pipeline.setUniformsWebGL(this.uniforms);const{indexBuffer:s}=this.vertexArray,o=s?s.byteLength/(s.indexType==="uint32"?4:2):void 0;r=this.pipeline.draw({renderPass:e,vertexArray:this.vertexArray,isInstanced:this.isInstanced,vertexCount:this.vertexCount,instanceCount:this.instanceCount,indexCount:o,transformFeedback:this.transformFeedback||void 0,parameters:this.parameters,topology:this.topology})}finally{e.popDebugGroup(),this._logDrawCallEnd()}return this._logFramebuffer(e),r?(this._lastDrawTimestamp=this.device.timestamp,this._needsRedraw=!1):this._needsRedraw="waiting for resource initialization",r}setGeometry(e){var r;(r=this._gpuGeometry)==null||r.destroy();const n=e&&Sue(this.device,e);if(n){this.setTopology(n.topology||"triangle-list");const i=new iE(this.bufferLayout);this.bufferLayout=i.mergeBufferLayouts(n.bufferLayout,this.bufferLayout),this.vertexArray&&this._setGeometryAttributes(n)}this._gpuGeometry=n}setTopology(e){e!==this.topology&&(this.topology=e,this._setPipelineNeedsUpdate("topology"))}setBufferLayout(e){const n=new iE(this.bufferLayout);this.bufferLayout=this._gpuGeometry?n.mergeBufferLayouts(e,this._gpuGeometry.bufferLayout):e,this._setPipelineNeedsUpdate("bufferLayout"),this.pipeline=this._updatePipeline(),this.vertexArray=this.device.createVertexArray({renderPipeline:this.pipeline}),this._gpuGeometry&&this._setGeometryAttributes(this._gpuGeometry)}setParameters(e){CP(e,this.parameters,2)||(this.parameters=e,this._setPipelineNeedsUpdate("parameters"))}setInstanceCount(e){this.instanceCount=e,this.isInstanced===void 0&&e>0&&(this.isInstanced=!0),this.setNeedsRedraw("instanceCount")}setVertexCount(e){this.vertexCount=e,this.setNeedsRedraw("vertexCount")}setShaderInputs(e){this.shaderInputs=e,this._uniformStore=new Cse(this.shaderInputs.modules);for(const[n,r]of Object.entries(this.shaderInputs.modules))if(Lue(r)){const i=this._uniformStore.getManagedUniformBuffer(this.device,n
1547);this.bindings[`${n}Uniforms`]=i}this.setNeedsRedraw("shaderInputs")}updateShaderInputs(){this._uniformStore.setUniforms(this.shaderInputs.getUniformValues()),this.setBindings(this.shaderInputs.getBindingValues()),this.setNeedsRedraw("shaderInputs")}setBindings(e){Object.assign(this.bindings,e),this.setNeedsRedraw("bindings")}setTransformFeedback(e){this.transformFeedback=e,this.setNeedsRedraw("transformFeedback")}setIndexBuffer(e){this.vertexArray.setIndexBuffer(e),this.setNeedsRedraw("indexBuffer")}setAttributes(e,n){const r=(n==null?void 0:n.disableWarnings)??this.props.disableWarnings;e.indices&&ut.warn(`Model:${this.id} setAttributes() - indexBuffer should be set using setIndexBuffer()`)(),this.bufferLayout=Ise(this.pipeline.shaderLayout,this.bufferLayout);const i=new iE(this.bufferLayout);for(const[s,o]of Object.entries(e)){const a=i.getBufferLayout(s);if(!a){r||ut.warn(`Model(${this.id}): Missing layout for buffer "${s}".`)();continue}const l=i.getAttributeNamesForBuffer(a);let c=!1;for(const u of l){const h=this._attributeInfos[u];if(h){const d=this.device.type==="webgpu"?i.getBufferIndex(h.bufferName):h.location;this.vertexArray.setBuffer(d,o),c=!0}}!c&&!r&&ut.warn(`Model(${this.id}): Ignoring buffer "${o.id}" for unknown attribute "${s}"`)()}this.setNeedsRedraw("attributes")}setConstantAttributes(e,n){for(const[r,i]of Object.entries(e)){const s=this._attributeInfos[r];s?this.vertexArray.setConstantWebGL(s.location,i):((n==null?void 0:n.disableWarnings)??this.props.disableWarnings)||ut.warn(`Model "${this.id}: Ignoring constant supplied for unknown attribute "${r}"`)()}this.setNeedsRedraw("constants")}setUniforms(e){this.setUniformsWebGL(e)}setUniformsWebGL(e){PP(e)||(this.pipeline.setUniformsWebGL(e),Object.assign(this.uniforms,e)),this.setNeedsRedraw("uniforms")}updateModuleSettingsWebGL(e){const{bindings:n,uniforms:r}=kH(this._getModuleUniforms(e));Object.assign(this.bindings,n),Object.assign(this.uniforms,r),this.setNeedsRedraw("moduleSettings")}_areBindingsLoading(){for(const e of Object.values(this.bindings))if(e instanceof yE&&!e.isReady)return e.id;return!1}_getBindings(){const e={};for(const[n,r]of Object.entries(this.bindings))r instanceof yE?r.isReady&&(e[n]=r.texture):e[n]=r;return e}_getBindingsUpdateTimestamp(){let e=0;for(const n of Object.values(this.bindings))n instanceof V_?e=Math.max(e,n.texture.updateTimestamp):n instanceof lr||n instanceof ar?e=Math.max(e,n.updateTimestamp):n instanceof yE?e=n.texture?Math.max(e,n.texture.updateTimestamp):1/0:n instanceof $_||(e=Math.max(e,n.buffer.updateTimestamp));return e}_setGeometryAttributes(e){const n={...e.attributes};for(const[r]of Object.entries(n))!this.pipeline.shaderLayout.attributes.find(i=>i.name===r)&&r!=="positions"&&delete n[r];this.vertexCount=e.vertexCount,this.setIndexBuffer(e.indices||null),this.setAttributes(e.attributes,{disableWarnings:!0}),this.setAttributes(n,{disableWarnings:this.props.disableWarnings}),this.setNeedsRedraw("geometry attributes")}_setPipelineNeedsUpdate(e){this._pipelineNeedsUpdate||(this._pipelineNeedsUpdate=e),this.setNeedsRedraw(e)}_updatePipeline(){if(this._pipelineNeedsUpdate){let e=null,n=null;this.pipeline&&(ut.log(1,`Model ${this.id}: Recreating pipeline because "${this._pipelineNeedsUpdate}".`)(),e=this.pipeline.vs,n=this.pipeline.fs),this._pipelineNeedsUpdate=!1;const r=this.shaderFactory.createShader({id:`${this.id}-vertex`,stage:"vertex",source:this.source||this.vs,debugShaders:this.props.debugShaders});let i=null;this.source?i=r:this.fs&&(i=this.shaderFactory.createShader({id:`${this.id}-fragment`,stage:"fragment",source:this.source||this.fs,debugShaders:this.props.debugShaders})),this.pipeline=this.pipelineFactory.createRenderPipeline({...this.props,bufferLayout:this.bufferLayout,topology:this.topology,parameters:this.parameters,bindings:this._getBindings(),vs:r,fs:i}),this._attributeInfos=l$(this.pipeline.shaderLayout,this.bufferLayout),e&&this.shaderFactory.release(e),n&&this.shaderFactory.release(n)}return this.pipeline}_logDrawCallStart(){const e=ut.level>3?0:Bue;
1547ut.level<2||Date.now()-this._lastLogTime<e||(this._lastLogTime=Date.now(),this._logOpen=!0,ut.group(mh,`>>> DRAWING MODEL ${this.id}`,{collapsed:ut.level<=2})())}_logDrawCallEnd(){if(this._logOpen){const e=Pue(this.pipeline.shaderLayout,this.id);ut.table(mh,e)();const n=this.shaderInputs.getDebugTable();for(const[i,s]of Object.entries(this.uniforms))n[i]={value:s};ut.table(mh,n)();const r=this._getAttributeDebugTable();ut.table(mh,this._attributeInfos)(),ut.table(mh,r)(),ut.groupEnd(mh)(),this._logOpen=!1}}_logFramebuffer(e){const n=this.device.props.debugFramebuffers;if(this._drawCount++,!n)return;const r=e.props.framebuffer;r&&Iue(r,{id:r.id,minimap:!0})}_getAttributeDebugTable(){const e={};for(const[n,r]of Object.entries(this._attributeInfos)){const i=this.vertexArray.attributes[r.location];e[r.location]={name:n,type:r.shaderType,values:i?this._getBufferOrConstantValues(i,r.bufferDataType):"null"}}if(this.vertexArray.indexBuffer){const{indexBuffer:n}=this.vertexArray,r=n.indexType==="uint32"?new Uint32Array(n.debugData):new Uint16Array(n.debugData);e.indices={name:"indices",type:n.indexType,values:r.toString()}}return e}_getBufferOrConstantValues(e,n){const r=f$(n);return(e instanceof lr?new r(e.debugData):e).toString()}};re(jx,"defaultProps",{...Yg.defaultProps,source:void 0,vs:null,fs:null,id:"unnamed",handle:void 0,userData:{},defines:{},modules:[],moduleSettings:void 0,geometry:null,indexBuffer:null,attributes:{},constantAttributes:{},varyings:[],isInstanced:void 0,instanceCount:0,vertexCount:0,shaderInputs:void 0,pipelineFactory:void 0,shaderFactory:void 0,transformFeedback:void 0,shaderAssembler:j_.getDefaultShaderAssembler(),debugShaders:void 0,disableWarnings:void 0});let us=jx;function Lue(t){return!!(t.uniformTypes&&!PP(t.uniformTypes))}function Fue(t){return{type:t.type,shaderLanguage:t.info.shadingLanguage,shaderLanguageVersion:t.info.shadingLanguageVersion,gpu:t.info.gpu,features:t.features}}function PP(t){for(const e in t)return!1;return!0}const gv=class gv{constructor(e,n=gv.defaultProps){re(this,"device");re(this,"model");re(this,"transformFeedback");if(!gv.isSupported(e))throw new Error("BufferTransform not yet implemented on WebGPU");this.device=e,this.model=new us(this.device,{id:n.id||"buffer-transform-model",fs:n.fs||Oie(),topology:n.topology||"point-list",varyings:n.outputs||n.varyings,...n}),this.transformFeedback=this.device.createTransformFeedback({layout:this.model.pipeline.shaderLayout,buffers:n.feedbackBuffers}),this.model.setTransformFeedback(this.transformFeedback),Object.seal(this)}static isSupported(e){var n;return((n=e==null?void 0:e.info)==null?void 0:n.type)==="webgl"}destroy(){this.model&&this.model.destroy()}delete(){this.destroy()}run(e){e!=null&&e.inputBuffers&&this.model.setAttributes(e.inputBuffers),e!=null&&e.outputBuffers&&this.transformFeedback.setBuffers(e.outputBuffers);const n=this.device.beginRenderPass(e);this.model.draw(n),n.end()}getBuffer(e){return this.transformFeedback.getBuffer(e)}readAsync(e){const n=this.getBuffer(e);if(!n)throw new Error("BufferTransform#getBuffer");if(n instanceof lr)return n.readAsync();const{buffer:r,byteOffset:i=0,byteLength:s=r.byteLength}=n;return r.readAsync(i,s)}};re(gv,"defaultProps",{...us.defaultProps,outputs:void 0,feedbackBuffers:void 0});let em=gv;class Cl{constructor(e){re(this,"id");re(this,"topology");re(this,"vertexCount");re(this,"indices");re(this,"attributes");re(this,"userData",{});const{attributes:n={},indices:r=null,vertexCount:i=null}=e;this.id=e.id||Xx("geometry"),this.topology=e.topology,r&&(this.indices=ArrayBuffer.isView(r)?{value:r,size:1}:r),this.attributes={};for(const[s,o]of Object.entries(n)){const a=ArrayBuffer.isView(o)?{value:o}:o;if(!ArrayBuffer.isView(a.value))throw new Error(`${this._print(s)}: must be typed array or object with value as typed array`);if((s==="POSITION"||s==="positions")&&!a.size&&(a.size=3),s==="indices"){if(this.indices)throw new Error("Multiple indices detected");this.indices=a}else this.attributes[s]=a}this.indices&&this.indices.isIndexed!==void 0&&(this.indices=Object.assign({},this.indices),delete this.indices.isIndexed),this.vertexCount=i||this._calculateVertexCount(this.attributes,this.indices)}getVertexCount(){return this.vertexCount}getAttributes(){return this.indices?{indices:this.indices,...this.attributes}:this.attributes}_print(e){return`Geometry ${this.id} attribute ${e}`}_setAttributes(e,n){return this}_calculateVertexCount(e,n){if(n)return n.value.length;let r=1/0;for(const i of Object.values(e)){const{value:s,size:o,constant:a}=i;!a&&s&&o!==void 0&&o>=1&&(r=Math.min(r,s.length/o))}return r}}const Uue={blendColorOperation:"add",blendColorSrcFactor:"one",blendColorDstFactor:"zero",blendAlphaOperation:"add",blendAlphaSrcFactor:"
1547constant-alpha",blendAlphaDstFactor:"zero"};class pM extends Ay{constructor(){super(...arguments),this._colorEncoderState=null}render(e){return"pickingFBO"in e?this._drawPickingBuffer(e):super.render(e)}_drawPickingBuffer({layers:e,layerFilter:n,views:r,viewports:i,onViewportActive:s,pickingFBO:o,deviceRect:{x:a,y:l,width:c,height:u},cullRect:h,effects:d,pass:m="picking",pickZ:y,shaderModuleProps:v}){this.pickZ=y;const b=this._resetColorEncoder(y),x=[a,l,c,u],T=super.render({target:o,layers:e,layerFilter:n,views:r,viewports:i,onViewportActive:s,cullRect:h,effects:d==null?void 0:d.filter(C=>C.useInPicking),pass:m,isPicking:!0,shaderModuleProps:v,clearColor:[0,0,0,0],colorMask:15,scissorRect:x});return this._colorEncoderState=null,{decodePickingColor:b&&jue.bind(null,b),stats:T}}shouldDrawLayer(e){const{pickable:n,operation:r}=e.props;return n&&r.includes("draw")||r.includes("terrain")||r.includes("mask")}getShaderModuleProps(e,n,r){return{picking:{isActive:1,isAttribute:this.pickZ},lighting:{enabled:!1}}}getLayerParameters(e,n,r){const i={...e.props.parameters},{pickable:s,operation:o}=e.props;return!this._colorEncoderState||o.includes("terrain")?i.blend=!1:s&&o.includes("draw")&&(Object.assign(i,Uue),i.blend=!0,i.blendColor=zue(this._colorEncoderState,e,r)),i}_resetColorEncoder(e){return this._colorEncoderState=e?null:{byLayer:new Map,byAlpha:[]},this._colorEncoderState}}function zue(t,e,n){const{byLayer:r,byAlpha:i}=t;let s,o=r.get(e);return o?(o.viewports.push(n),s=o.a):(s=r.size+1,s<=255?(o={a:s,layer:e,viewports:[n]},r.set(e,o),i[s]=o):(Zt.warn("Too many pickable layers, only picking the first 255")(),s=0)),[0,0,0,s/255]}function jue(t,e){const n=t.byAlpha[e[3]];return n&&{pickedLayer:n.layer,pickedViewports:n.viewports,pickedObjectIndex:n.layer.decodePickingColor(e)}}const hg={NO_STATE:"Awaiting state",MATCHED:"Matched. State transferred from previous layer",INITIALIZED:"Initialized",AWAITING_GC:"Discarded. Awaiting garbage collection",AWAITING_FINALIZATION:"No longer matched. Awaiting garbage collection",FINALIZED:"Finalized! Awaiting garbage collection"},nw=Symbol.for("component"),rf=Symbol.for("propTypes"),bE=Symbol.for("deprecatedProps"),Mg=Symbol.for("asyncPropDefaults"),Jh=Symbol.for("asyncPropOriginal"),Gu=Symbol.for("asyncPropResolved");function Yx(t,e=()=>!0){return Array.isArray(t)?DH(t,e,[]):e(t)?[t]:[]}function DH(t,e,n){let r=-1;for(;++r<t.length;){const i=t[r];Array.isArray(i)?DH(i,e,n):e(i)&&n.push(i)}return n}function Vue({target:t,source:e,start:n=0,count:r=1}){const i=e.length,s=r*i;let o=0;for(let a=n;o<i;o++)t[a++]=e[o];for(;o<s;)o<s-o?(t.copyWithin(n+o,n,n+o),o*=2):(t.copyWithin(n+o,n,n+s-o),o=s);return t}class Wue{constructor(e,n,r){this._loadCount=0,this._subscribers=new Set,this.id=e,this.context=r,this.setData(n)}subscribe(e){this._subscribers.add(e)}unsubscribe(e){this._subscribers.delete(e)}inUse(){return this._subscribers.size>0}delete(){}getData(){return this.isLoaded?this._error?Promise.reject(this._error):this._content:this._loader.then(()=>this.getData())}setData(e,n){if(e===this._data&&!n)return;this._data=e;const r=++this._loadCount;let i=e;typeof e=="string"&&(i=F_(e)),i instanceof Promise?(this.isLoaded=!1,this._loader=i.then(s=>{this._loadCount===r&&(this.isLoaded=!0,this._error=void 0,this._content=s)}).catch(s=>{this._loadCount===r&&(this.isLoaded=!0,this._error=s||!0)})):(this.isLoaded=!0,this._error=void 0,this._content=e);for(const s of this._subscribers)s.onChange(this.getData())}}class $ue{constructor(e){var n;this.protocol=e.protocol||"resource://",this._context={device:e.device,gl:(n=e.device)==null?void 0:n.gl,resourceManager:this},this._resources={},this._consumers={},this._pruneRequest=null}contains(e){return e.startsWith(this.protocol)?!0:e in this._resources}add({resourceId:e,data:n,forceUpdate:r=!1,persistent:i=!0}){let s=this._resources[e];s?s.setData(n,r):(s=new Wue(e,n,this._context),this._resources[e]=s),s.persistent=i}remove(e){const n=this._resources[e];n&&(n.delete(),delete this._resources[e])}unsubscribe({consumerId:e}){const n=this._consumers[e];if(n){for(const r in n){const i=n[r],s=this._resources[i.resourceId];s&&s.unsubscribe(i)}delete this._consumers[e],this.prune()}}subscribe({resourceId:e,onChange:n,consumerId:r,requestId:i="default"}){const{_resources:s,protocol:o}=this;e.startsWith(o)&&(e=e.replace(o,""),s[e]||this.add({resourceId:e,data:null,persistent:!1}));const a=s[e];if(this._track(r,i,a,n),a)return a.getData()}prune(){this._pruneRequest||(this._pruneRequest=setTimeout(()=>this._prune(),0))}finalize(){for(const e in this._resources)this._resources[e].delete()}_track(e,n,r,i){const s=this._consumers,o=s[e]=s[e]||{};let a=o[n];const l=a&&a.resourceId&&this._resources[a.resourceId];l&&(l.unsubscribe(a),this.prune()),r&&(a?(a.onChange=i,a.resourceId=r.id):a={onChange:i,resourceId:r.id},o[n]=a,r.subscribe(a))}_prune(){this._pruneRequest=null;for(const e of Object.keys(this._resources)){const n=this._resources[e];!n.persistent&&!n.inUse()&&(n.delete(),delete this._resources[e])}}}const Hue="layerManager.setLayers",que="layerManager.activateViewport";class Que{constructor(e,n){var a;this._lastRenderedLayers=[],this._needsRedraw=!1,this._needsUpdate=!1,this._nextLayers=null,this._debug=!1,this._defaultShaderModulesChanged=!1,this.activateViewport=l=>{$i(que,this,l),l&&(this.context.viewport=l)};const{deck:r,stats:i,viewport:s,timeline:o}=n||{};this.layers=[],this.resourceManager=new $ue({device:e,protocol:"deck://"}),this.context={mousePosition:null,userData:{},layerManager:this,device:e,gl:e==null?void 0:e.gl,deck:r,shaderAssembler:Qce(((a=e==null?void 0:e.info)==null?void 0:a.shadingLanguage)||"glsl"),defaultShaderModules:[ele],renderPass:void 0,stats:i||new by({id:"deck.gl"}),viewport:s||new dd({id:"DEFAULT-INITIAL-VIEWPORT"}),timeline:o||new MH,resourceManager:this.resourceManager,onError:void 0},Object.seal(this)}finalize(){this.resourceManager.finalize();for(const e of this.layers)this._finalizeLayer(e)}needsRedraw(e={clearRedrawFlags:!1}){let n=this._needsRedraw;e.clearRedrawFlags&&(this._needsRedraw=!1);for(const r of this.layers){const i=r.getNeedsRedraw(e);n=n||i}return n}needsUpdate(){return this._nextLayers&&this._nextLayers!==this._lastRenderedLayers?"layers changed":this._defaultShaderModulesChanged?"shader modules changed":this._needsUpdate}setNeedsRedraw(e){this._needsRedraw=this._needsRedraw||e}setNeedsUpdate(e){this._needsUpdate=this._needsUpdate||e}getLayers({layerIds:e}={}){return e?this.layers.filter(n=>e.find(r=>n.id.indexOf(r)===0)):this.layers}setProps(e){"debug"in e&&(this._debug=e.debug),"userData"in e&&(this.context.userData=e.userData),"layers"in e&&(this._nextLayers=e.layers
vendor: 38,789 bytes, line 1547
1547),"onError"in e&&(this.context.onError=e.onError)}setLayers(e,n){$i(Hue,this,n,e),this._lastRenderedLayers=e;const r=Yx(e,Boolean);for(const i of r)i.context=this.context;this._updateLayers(this.layers,r)}updateLayers(){const e=this.needsUpdate();e&&(this.setNeedsRedraw(`updating layers: ${e}`),this.setLayers(this._nextLayers||this._lastRenderedLayers,e)),this._nextLayers=null}addDefaultShaderModule(e){const{defaultShaderModules:n}=this.context;n.find(r=>r.name===e.name)||(n.push(e),this._defaultShaderModulesChanged=!0)}removeDefaultShaderModule(e){const{defaultShaderModules:n}=this.context,r=n.findIndex(i=>i.name===e.name);r>=0&&(n.splice(r,1),this._defaultShaderModulesChanged=!0)}_handleError(e,n,r){r.raiseError(n,`${e} of ${r}`)}_updateLayers(e,n){const r={};for(const o of e)r[o.id]?Zt.warn(`Multiple old layers with same id ${o.id}`)():r[o.id]=o;if(this._defaultShaderModulesChanged){for(const o of e)o.setNeedsUpdate(),o.setChangeFlags({extensionsChanged:!0});this._defaultShaderModulesChanged=!1}const i=[];this._updateSublayersRecursively(n,r,i),this._finalizeOldLayers(r);let s=!1;for(const o of i)if(o.hasUniformTransition()){s=`Uniform transition in ${o}`;break}this._needsUpdate=s,this.layers=i}_updateSublayersRecursively(e,n,r){for(const i of e){i.context=this.context;const s=n[i.id];s===null&&Zt.warn(`Multiple new layers with same id ${i.id}`)(),n[i.id]=null;let o=null;try{this._debug&&s!==i&&i.validateProps(),s?(this._transferLayerState(s,i),this._updateLayer(i)):this._initializeLayer(i),r.push(i),o=i.isComposite?i.getSubLayers():null}catch(a){this._handleError("matching",a,i)}o&&this._updateSublayersRecursively(o,n,r)}}_finalizeOldLayers(e){for(const n in e){const r=e[n];r&&this._finalizeLayer(r)}}_initializeLayer(e){try{e._initialize(),e.lifecycle=hg.INITIALIZED}catch(n){this._handleError("initialization",n,e)}}_transferLayerState(e,n){n._transferState(e),n.lifecycle=hg.MATCHED,n!==e&&(e.lifecycle=hg.AWAITING_GC)}_updateLayer(e){try{e._update()}catch(n){this._handleError("update",n,e)}}_finalizeLayer(e){this._needsRedraw=this._needsRedraw||`finalized ${e}`,e.lifecycle=hg.AWAITING_FINALIZATION;try{e._finalize(),e.lifecycle=hg.FINALIZED}catch(n){this._handleError("finalization",n,e)}}}function Ii(t,e,n){if(t===e)return!0;if(!n||!t||!e)return!1;if(Array.isArray(t)){if(!Array.isArray(e)||t.length!==e.length)return!1;for(let r=0;r<t.length;r++)if(!Ii(t[r],e[r],n-1))return!1;return!0}if(Array.isArray(e))return!1;if(typeof t=="object"&&typeof e=="object"){const r=Object.keys(t),i=Object.keys(e);if(r.length!==i.length)return!1;for(const s of r)if(!e.hasOwnProperty(s)||!Ii(t[s],e[s],n-1))return!1;return!0}return!1}class Xue{constructor(e){this.views=[],this.width=100,this.height=100,this.viewState={},this.controllers={},this.timeline=e.timeline,this._viewports=[],this._viewportMap={},this._isUpdating=!1,this._needsRedraw="First render",this._needsUpdate="Initialize",this._eventManager=e.eventManager,this._eventCallbacks={onViewStateChange:e.onViewStateChange,onInteractionStateChange:e.onInteractionStateChange},Object.seal(this),this.setProps(e)}finalize(){for(const e in this.controllers){const n=this.controllers[e];n&&n.finalize()}this.controllers={}}needsRedraw(e={clearRedrawFlags:!1}){const n=this._needsRedraw;return e.clearRedrawFlags&&(this._needsRedraw=!1),n}setNeedsUpdate(e){this._needsUpdate=this._needsUpdate||e,this._needsRedraw=this._needsRedraw||e}updateViewStates(){for(const e in this.controllers){const n=this.controllers[e];n&&n.updateTransition()}}getViewports(e){return e?this._viewports.filter(n=>n.containsPixel(e)):this._viewports}getViews(){const e={};return this.views.forEach(n=>{e[n.id]=n}),e}getView(e){return this.views.find(n=>n.id===e)}getViewState(e){const n=typeof e=="string"?this.getView(e):e,r=n&&this.viewState[n.getViewStateId()]||this.viewState;return n?n.filterViewState(r):r}getViewport(e){return this._viewportMap[e]}unproject(e,n){const r=this.getViewports(),i={x:e[0],y:e[1]};for(let s=r.length-1;s>=0;--s){const o=r[s];if(o.containsPixel(i)){const a=e.slice();return a[0]-=o.x,a[1]-=o.y,o.unproject(a,n)}}return null}setProps(e){e.views&&this._setViews(e.views),e.viewState&&this._setViewState(e.viewState),("width"in e||"height"in e)&&this._setSize(e.width,e.height),this._isUpdating||this._update()}_update(){this._isUpdating=!0,this._needsUpdate&&(this._needsUpdate=!1,this._rebuildViewports()),this._needsUpdate&&(this._needsUpdate=!1,this._rebuildViewports()),this._isUpdating=!1}_setSize(e,n){(e!==this.width||n!==this.height)&&(this.width=e,this.height=n,this.setNeedsUpdate("Size changed"))}_setViews(e){e=Yx(e,Boolean),this._diffViews(e,this.views)&&this.setNeedsUpdate("views changed"),this.views=e}_setViewState(e){e?(!Ii(e,this.viewState,3)&&this.setNeedsUpdate("viewState changed"),this.viewState=e):Zt.warn("missing `viewState` or `initialViewState`")()}_createController(e,n){const r=n.type;return new r({timeline:this.timeline,eventManager:this._eventManager,onViewStateChange:this._eventCallbacks.onViewStateChange,onStateChange:this._eventCallbacks.onInteractionStateChange,makeViewport:s=>{var o;return(o=this.getView(e.id))==null?void 0:o.makeViewport({viewState:s,width:this.width,height:this.height})}})}_updateController(e,n,r,i){const s=e.controller;if(s&&r){const o={...n,...s,id:e.id,x:r.x,y:r.y,width:r.width,height:r.height};return(!i||i.constructor!==s.type)&&(i=this._createController(e,o)),i&&i.setProps(o),i}return null}_rebuildViewports(){const{views:e}=this,n=this.controllers;this._viewports=[],this.controllers={};let r=!1;for(let i=e.length;i--;){const s=e[i],o=this.getViewState(s),a=s.makeViewport({viewState:o,width:this.width,height:this.height});let l=n[s.id];const c=!!s.controller;c&&!l&&(r=!0),(r||!c)&&l&&(l.finalize(),l=null),this.controllers[s.id]=this._updateController(s,o,a,l),a&&this._viewports.unshift(a)}for(const i in n){const s=n[i];s&&!this.controllers[i]&&s.finalize()}this._buildViewportMap()}_buildViewportMap(){this._viewportMap={},this._viewports.forEach(e=>{e.id&&(this._viewportMap[e.id]=this._viewportMap[e.id]||e)})}_diffViews(e,n){return e.length!==n.length?!0:e.some((r,i)=>!e[i].equals(n[i]))}}const Yue=/([0-9]+\.?[0-9]*)(%|px)/;function Iu(t){switch(typeof t){case"number":return{position:t,relative:!1};case"string":const e=Yue.exec(t);if(e&&e.length>=3){const n=e[2]==="%",r=parseFloat(e[1]);return{position:n?r/100:r,relative:n}}default:throw new Error(`Could not parse position string ${t}`)}}function Ou(t,e){return t.relative?Math.round(t.position*e):t.position}class tm{constructor(e){const{id:n,x:r=0,y:i=0,width:s="100%",height:o="100%",padding:a=null}=e;this.id=n||this.constructor.displayName||"view",this.props={...e,id:this.id},this._x=Iu(r),this._y=Iu(i),this._width=Iu(s),this._height=Iu(o),this._padding=a&&{left:Iu(a.left||0),right:Iu(a.right||0),top:Iu(a.top||0),bottom:Iu(a.bottom||0)},this.equals=this.equals.bind(this),Object.seal(this)}equals(e){return this===e?!0:this.constructor===e.constructor&&Ii(this.props,e.props,2)}makeViewport({width:e,height:n,viewState:r}){r=this.filterViewState(r);const i=this.getDimensions({width:e,height:n});if(!i.height||!i.width)return null;const s=this.getViewportType(r);return new s({...r,...this.props,...i})}getViewStateId(){const{viewState:e}=this.props;return typeof e=="string"?e:(e==null?void 0:e.id)||this.id}filterViewState(e){if(this.props.viewState&&typeof this.props.viewState=="object"){if(!this.props.viewState.id)return this.props.viewState;const n={...e};for(const r in this.props.viewState)r!=="id"&&(n[r]=this.props.viewState[r]);return n}return e}getDimensions({width:e,height:n}){const r={x:Ou(this._x,e),y:Ou(this._y,n),width:Ou(this._width,e),height:Ou(this._height,n)};return this._padding&&(r.padding={left:Ou(this._padding.left,e),top:Ou(this._padding.top,n),right:Ou(this._padding.right,e),bottom:Ou(this._padding.bottom,n)}),r}get controller(){const e=this.props.controller;return e?e===!0?{type:this.ControllerType}:typeof e=="function"?{type:e}:{type:this.ControllerType,...e}:null}}class Kx{constructor(e){this._inProgress=!1,this._handle=null,this.time=0,this.settings={duration:0},this._timeline=e}get inProgress(){return this._inProgress}start(e){var n,r;this.cancel(),this.settings=e,this._inProgress=!0,(r=(n=this.settings).onStart)==null||r.call(n,this)}end(){var e,n;this._inProgress&&(this._timeline.removeChannel(this._handle),this._handle=null,this._inProgress=!1,(n=(e=this.settings).onEnd)==null||n.call(e,this))}cancel(){var e,n;this._inProgress&&((n=(e=this.settings).onInterrupt)==null||n.call(e,this),this._timeline.removeChannel(this._handle),this._handle=null,this._inProgress=!1)}update(){var e,n;if(!this._inProgress)return!1;if(this._handle===null){const{_timeline:r,settings:i}=this;this._handle=r.addChannel({delay:r.getTime(),duration:i.duration})}return this.time=this._timeline.getTime(this._handle),this._onUpdate(),(n=(e=this.settings).onUpdate)==null||n.call(e,this),this._timeline.isFinished(this._handle)&&this.end(),!0}_onUpdate(){}}const N8=()=>{},IP={BREAK:1,SNAP_TO_END:2,IGNORE:3},Kue=t=>t,Gue=IP.BREAK;class Zue{constructor(e){this._onTransitionUpdate=n=>{const{time:r,settings:{interpolator:i,startProps:s,endProps:o,duration:a,easing:l}}=n,c=l(r/a),u=i.interpolateProps(s,o,c);this.propsInTransition=this.getControllerState({...this.props,...u}).getViewportProps(),this.onViewStateChange({viewState:this.propsInTransition,oldViewState:this.props})},this.getControllerState=e.getControllerState,this.propsInTransition=null,this.transition=new Kx(e.timeline),this.onViewStateChange=e.onViewStateChange||N8,this.onStateChange=e.onStateChange||N8}finalize(){this.transition.cancel()}getViewportInTransition(){return this.propsInTransition}processViewStateChange(e){let n=!1;const r=this.props;if(this.props=e,!r||this._shouldIgnoreViewportChange(r,e))return!1;if(this._isTransitionEnabled(e)){let i=r;if(this.transition.inProgress){const{interruption:s,endProps:o}=this.transition.settings;i={...r,...s===IP.SNAP_TO_END?o:this.propsInTransition||r}}this._triggerTransition(i,e),n=!0}else this.transition.cancel();return n}updateTransition(){this.transition.update()}_isTransitionEnabled(e){const{transitionDuration:n,transitionInterpolator:r}=e;return(n>0||n==="auto")&&!!r}_isUpdateDueToCurrentTransition(e){return this.transition.inProgress&&this.propsInTransition?this.transition.settings.interpolator.arePropsEqual(e,this.propsInTransition):!1}_shouldIgnoreViewportChange(e,n){return this.transition.inProgress?this.transition.settings.interruption===IP.IGNORE||this._isUpdateDueToCurrentTransition(n):this._isTransitionEnabled(n)?n.transitionInterpolator.arePropsEqual(e,n):!0}_triggerTransition(e,n){const r=this.getControllerState(e),i=this.getControllerState(n).shortestPathFrom(r),s=n.transitionInterpolator,o=s.getDuration?s.getDuration(e,n):n.transitionDuration;if(o===0)return;const a=s.initializeProps(e,i);this.propsInTransition={};const l={duration:o,easing:n.transitionEasing||Kue,interpolator:s,interruption:n.transitionInterruption||Gue,startProps:a.start,endProps:a.end,onStart:n.onTransitionStart,onUpdate:this._onTransitionUpdate,onInterrupt:this._onTransitionEnd(n.onTransitionInterrupt),onEnd:this._onTransitionEnd(n.onTransitionEnd)};this.transition.start(l),this.onStateChange({inTransition:!0}),this.updateTransition()}_onTransitionEnd(e){return n=>{this.propsInTransition=null,this.onStateChange({inTransition:!1,isZooming:!1,isPanning:!1,isRotating:!1}),e==null||e(n)}}}function Ti(t,e){if(!t)throw new Error(e||"deck.gl: assertion failed.")}class BH{constructor(e){const{compare:n,extract:r,required:i}=e;this._propsToCompare=n,this._propsToExtract=r||n,this._requiredProps=i}arePropsEqual(e,n){for(const r of this._propsToCompare)if(!(r in e)||!(r in n)||!Tl(e[r],n[r]))return!1;return!0}initializeProps(e,n){const r={},i={};for(const s of this._propsToExtract)(s in e||s in n)&&(r[s]=e[s],i[s]=n[s]);return this._checkRequiredProps(r),this._checkRequiredProps(i),{start:r,end:i}}getDuration(e,n){return n.transitionDuration}_checkRequiredProps(e){this._requiredProps&&this._requiredProps.forEach(n=>{const r=e[n];Ti(Number.isFinite(r)||Array.isArray(r),`${n} is required for transition`)})}}const Jue=["longitude","latitude","zoom","bearing","pitch"],efe=["longitude","latitude","zoom"];class gM extends BH{constructor(e={}){const n=Array.isArray(e)?e:e.transitionProps,r=Array.isArray(e)?{}:e;r.transitionProps=Array.isArray(n)?{compare:n,required:n}:n||{compare:Jue,required:efe},super(r.transitionProps),this.opts=r}initializeProps(e,n){const r=super.initializeProps(e,n),{makeViewport:i,around:s}=this.opts;if(i&&s){const o=i(e),a=i(n),l=o.unproject(s);r.start.around=s,Object.assign(r.end,{around:a.project(l),aroundPosition:l,width:n.width,height:n.height})}return r}interpolateProps(e,n,r){const i={};for(const s of this._propsToExtract)i[s]=Sl(e[s]||0,n[s]||0,r);if(n.aroundPosition&&this.opts.makeViewport){const s=this.opts.makeViewport({...n,...i});Object.assign(i,s.panByPosition(n.aroundPosition,Sl(e.around,n.around,r)))}return i}}const Mu={transitionDuration:0},tfe=300,mb=t=>1-(1-t)*(1-t),rg={WHEEL:["wheel"],PAN:["panstart","panmove","panend"],PINCH:["pinchstart","pinchmove","pinchend"],MULTI_PAN:["multipanstart","multipanmove","multipanend"],DOUBLE_CLICK:["dblclick"],KEYBOARD:["keydown"]},vh={};class nfe{constructor(e){this.state={},this._events={},this._interactionState={isDragging:!1},this._customEvents=[],this._eventStartBlocked=null,this._panMove=!1,this.invertPan=!1,this.dragMode="rotate",this.inertia=0,this.scrollZoom=!0,this.dragPan=!0,this.dragRotate=!0,this.doubleClickZoom=!0,this.touchZoom=!0,this.touchRotate=!1,this.keyboard=!0,this.transitionManager=new Zue({...e,getControllerState:n=>new this.ControllerState(n),onViewStateChange:this._onTransition.bind(this),onStateChange:this._setInteractionState.bind(this)}),this.handleEvent=this.handleEvent.bind(this),this.eventManager=e.eventManager,this.onViewStateChange=e.onViewStateChange||(()=>{}),this.onStateChange=e.onStateChange||(()=>{}),this.makeViewport=e.makeViewport}set events(e){this.toggleEvents(this._customEvents,!1),this.toggleEvents(e,!0),this._customEvents=e,this.props&&this.setProps(this.props)}finalize(){var e;for(const n in this._events)this._events[n]&&((e=this.eventManager)==null||e.off(n,this.handleEvent));this.transitionManager.finalize()}handleEvent(e){this._controllerState=void 0;const n=this._eventStartBlocked;switch(e.type){case"panstart":return n?!1:this._onPanStart(e);case"panmove":return this._onPan(e);case"panend":return this._onPanEnd(e);case"pinchstart":return n?!1:this._onPinchStart(e);case"pinchmove":return this._onPinch(e);case"pinchend":return this._onPinchEnd(e);case"multipanstart":return n?!1:this._onMultiPanStart(e);case"multipanmove":return this._onMultiPan(e);case"multipanend":return this._onMultiPanEnd(e);case"dblclick":return this._onDoubleClick(e);case"wheel":return this._onWheel(e);case"keydown":return this._onKeyDown(e);default:return!1}}get controllerState(){return this._controllerState=this._controllerState||new this.ControllerState({makeViewport:this.makeViewport,...this.props,...this.state}),this._controllerState}getCenter(e){const{x:n,y:r}=this.props,{offsetCenter:i}=e;return[i.x-n,i.y-r]}isPointInBounds(e,n){const{width:r,height:i}=this.props;if(n&&n.handled)return!1;const s=e[0]>=0&&e[0]<=r&&e[1]>=0&&e[1]<=i;return s&&n&&n.stopPropagation(),s}isFunctionKeyPressed(e){const{srcEvent:n}=e;return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}isDragging(){return this._interactionState.isDragging||!1}blockEvents(e){const n=setTimeout(()=>{this._eventStartBlocked===n&&(this._eventStartBlocked=null)},e);this._eventStartBlocked=n}setProps(e){e.dragMode&&(this.dragMode=e.dragMode),this.props=e,"transitionInterpolator"in e||(e.transitionInterpolator=this._getTransitionProps().transitionInterpolator),this.transitionManager.processViewStateChange(e);const{inertia:n}=e;this.inertia=Number.isFinite(n)?n:n===!0?tfe:0;const{scrollZoom:r=!0,dragPan:i=!0,dragRotate:s=!0,doubleClickZoom:o=!0,touchZoom:a=!0,touchRotate:l=!1,keyboard:c=!0}=e,u=!!this.onViewStateChange;this.toggleEvents(rg.WHEEL,u&&r),this.toggleEvents(rg.PAN,u),this.toggleEvents(rg.PINCH,u&&(a||l)),this.toggleEvents(rg.MULTI_PAN,u&&l),this.toggleEvents(rg.DOUBLE_CLICK,u&&o),this.toggleEvents(rg.KEYBOARD,u&&c),this.scrollZoom=r,this.dragPan=i,this.dragRotate=s,this.doubleClickZoom=o,this.touchZoom=a,this.touchRotate=l,this.keyboard=c}updateTransition(){this.transitionManager.updateTransition()}toggleEvents(e,n){this.eventManager&&e.forEach(r=>{this._events[r]!==n&&(this._events[r]=n,n?this.eventManager.on(r,this.handleEvent):this.eventManager.off(r,this.handleEvent))})}updateViewport(e,n=null,r={}){const i={...e.getViewportProps(),...n},s=this.controllerState!==e;if(this.state=e.getState(),this._setInteractionState(r),s){const o=this.controllerState&&this.controllerState.getViewportProps();this.onViewStateChange&&this.onViewStateChange({viewState:i,interactionState:this._interactionState,oldViewState:o,viewId:this.props.id})}}_onTransition(e){this.onViewStateChange({...e,interactionState:this._interactionState,viewId:this.props.id})}_setInteractionState(e){Object.assign(this._interactionState,e),this.onStateChange(this._interactionState)}_onPanStart(e){const n=this.getCenter(e);if(!this.isPointInBounds(n,e))return!1;let r=this.isFunctionKeyPressed(e)||e.rightButton||!1;(this.invertPan||this.dragMode==="pan")&&(r=!r);const i=this.controllerState[r?"panStart":"rotateStart"]({pos:n});return this._panMove=r,this.updateViewport(i,Mu,{isDragging:!0}),!0}_onPan(e){return this.isDragging()?this._panMove?this._onPanMove(e):this._onPanRotate(e):!1}_onPanEnd(e){return this.isDragging()?this._panMove?this._onPanMoveEnd(e):this._onPanRotateEnd(e):!1}_onPanMove(e){if(!this.dragPan)return!1;const n=this.getCenter(e),r=this.controllerState.pan({pos:n});return this.updateViewport(r,Mu,{isDragging:!0,isPanning:!0}),!0}_onPanMoveEnd(e){const{inertia:n}=this;if(this.dragPan&&n&&e.velocity){const r=this.getCenter(e),i=[r[0]+e.velocityX*n/2,r[1]+e.velocityY*n/2],s=this.controllerState.pan({pos:i}).panEnd();this.updateViewport(s,{...this._getTransitionProps(),transitionDuration:n,transitionEasing:mb},{isDragging:!1,isPanning:!0})}else{const r=this.controllerState.panEnd();this.updateViewport(r,null,{isDragging:!1,isPanning:!1})}return!0}_onPanRotate(e){if(!this.dragRotate)return!1;const n=this.getCenter(e),r=this.controllerState.rotate({pos:n});return this.updateViewport(r,Mu,{isDragging:!0,isRotating:!0}),!0}_onPanRotateEnd(e){const{inertia:n}=this;if(this.dragRotate&&n&&e.velocity){const r=this.getCenter(e),i=[r[0]+e.velocityX*n/2,r[1]+e.velocityY*n/2],s=this.controllerState.rotate({pos:i}).rotateEnd();this.updateViewport(s,{...this._getTransitionProps(),transitionDuration:n,transitionEasing:mb},{isDragging:!1,isRotating:!0})}else{const r=this.controllerState.rotateEnd();this.updateViewport(r,null,{isDragging:!1,isRotating:!1})}return!0}_onWheel(e){if(!this.scrollZoom)return!1;const n=this.getCenter(e);if(!this.isPointInBounds(n,e))return!1;e.srcEvent.preventDefault();const{speed:r=.01,smooth:i=!1}=this.scrollZoom===!0?{}:this.scrollZoom,{delta:s}=e;let o=2/(1+Math.exp(-Math.abs(s*r)));s<0&&o!==0&&(o=1/o);const a=this.controllerState.zoom({pos:n,scale:o});return this.updateViewport(a,{...this._getTransitionProps({around:n}),transitionDuration:i?250:1},{isZooming:!0,isPanning:!0}),!0}_onMultiPanStart(e){const n=this.getCenter(e);if(!this.isPointInBounds(n,e))return!1;const r=this.controllerState.rotateStart({pos:n});return this.updateViewport(r,Mu,{isDragging:!0}),!0}_onMultiPan(e){if(!this.touchRotate||!this.isDragging())return!1;const n=this.getCenter(e);n[0]-=e.deltaX;const r=this.controllerState.rotate({pos:n});return this.updateViewport(r,Mu,{isDragging:!0,isRotating:!0}),!0}_onMultiPanEnd(e){if(!this.isDragging())return!1;const{inertia:n}=this;if(this.touchRotate&&n&&e.velocityY){const r=this.getCenter(e),i=[r[0],r[1]+=e.velocityY*n/2],s=this.controllerState.rotate({pos:i});this.updateViewport(s,{...this._getTransitionProps(),transitionDuration:n,transitionEasing:mb},{isDragging:!1,isRotating:!0}),this.blockEvents(n)}else{const r=this.controllerState.rotateEnd();this.updateViewport(r,null,{isDragging:!1,isRotating:!1})}return!0}_onPinchStart(e){const n=this.getCenter(e);if(!this.isPointInBounds(n,e))return!1;const r=this.controllerState.zoomStart({pos:n}).rotateStart({pos:n});return vh._startPinchRotation=e.rotation,vh._lastPinchEvent=e,this.updateViewport(r,Mu,{isDragging:!0}),!0}_onPinch(e){if(!this.touchZoom&&!this.touchRotate||!this.isDragging())return!1;let n=this.controllerState;if(this.touchZoom){const{scale:r}=e,i=this.getCenter(e);n=n.zoom({pos:i,scale:r})}if(this.touchRotate){const{rotation:r}=e;n=n.rotate({deltaAngleX:vh._startPinchRotation-r})}return this.updateViewport(n,Mu,{isDragging:!0,isPanning:this.touchZoom,isZooming:this.touchZoom,isRotating:this.touchRotate}),vh._lastPinchEvent=e,!0}_onPinchEnd(e){if(!this.isDragging())return!1;const{inertia:n}=this,{_lastPinchEvent:r}=vh;if(this.touchZoom&&n&&r&&e.scale!==r.scale){const i=this.getCenter(e);let s=this.controllerState.rotateEnd();const o=Math.log2(e.scale),a=(o-Math.log2(r.scale))/(e.deltaTime-r.deltaTime),l=Math.pow(2,o+a*n/2);s=s.zoom({pos:i,scale:l}).zoomEnd(),this.updateViewport(s,{...this._getTransitionProps({around:i}),transitionDuration:n,transitionEasing:mb},{isDragging:!1,isPanning:this.touchZoom,isZooming:this.touchZoom,isRotating:!1}),this.blockEvents(n)}else{const i=this.controllerState.zoomEnd().rotateEnd();this.updateViewport(i,null,{isDragging:!1,isPanning:!1,isZooming:!1,isRotating:!1})}return vh._startPinchRotation=null,vh._lastPinchEvent=null,!0}_onDoubleClick(e){if(!this.doubleClickZoom)return!1;const n=this.getCenter(e);if(!this.isPointInBounds(n,e))return!1;const r=this.isFunctionKeyPressed(e),i=this.controllerState.zoom({pos:n,scale:r?.5:2});return this.updateViewport(i,this._getTransitionProps({around:n}),{isZooming:!0,isPanning:!0}),this.blockEvents(100),!0}_onKeyDown(e){if(!this.keyboard)return!1;const n=this.isFunctionKeyPressed(e),{zoomSpeed:r,moveSpeed:i,rotateSpeedX:s,rotateSpeedY:o}=this.keyboard===!0?{}:this.keyboard,{controllerState:a}=this;let l;const c={};switch(e.srcEvent.code){case"Minus":l=n?a.zoomOut(r).zoomOut(r):a.zoomOut(r),c.isZooming=!0;break;case"Equal":l=n?a.zoomIn(r).zoomIn(r):a.zoomIn(r),c.isZooming=!0;break;case"ArrowLeft":n?(l=a.rotateLeft(s),c.isRotating=!0):(l=a.moveLeft(i),c.isPanning=!0);break;case"ArrowRight":n?(l=a.rotateRight(s),c.isRotating=!0):(l=a.moveRight(i),c.isPanning=!0);break;case"ArrowUp":n?(l=a.rotateUp(o),c.isRotating=!0):(l=a.moveUp(i),c.isPanning=!0);break;case"ArrowDown":n?(l=a.rotateDown(o),c.isRotating=!0):(l=a.moveDown(i),c.isPanning=!0);break;default:return!1}return this.updateViewport(l,this._getTransitionProps(),c),!0}_getTransitionProps(e){const{transition:n}=this;return!n||!n.transitionInterpolator?Mu:e?{...n,transitionInterpolator:new gM({...e,...n.transitionInterpolator.opts,makeViewport:this.controllerState.makeViewport})}:n}}class rfe{constructor(e,n){this._viewportProps=this.applyConstraints(e),this._state=n}getViewportProps(){return this._viewportProps}getState(){return this._state}}const D8=5,ife=1.2;class sfe extends rfe{constructor(e){const{width:n,height:r,latitude:i,longitude:s,zoom:o,bearing:a=0,pitch:l=0,altitude:c=1.5,position:u=[0,0,0],maxZoom:h=20,minZoom:d=0,maxPitch:m=60,minPitch:y=0,startPanLngLat:v,startZoomLngLat:b,startRotatePos:x,startBearing:T,startPitch:E,startZoom:C,normalize:I=!0}=e;Ti(Number.isFinite(s)),Ti(Number.isFinite(i)),Ti(Number.isFinite(o)),super({width:n,height:r,latitude:i,longitude:s,zoom:o,bearing:a,pitch:l,altitude:c,maxZoom:h,minZoom:d,maxPitch:m,minPitch:y,normalize:I,position:u},{startPanLngLat:v,startZoomLngLat:b,startRotatePos:x,startBearing:T,startPitch:E,startZoom:C}),this.makeViewport=e.makeViewport}panStart({pos:e}){return this._getUpdatedState({startPanLngLat:this._unproject(e)})}pan({pos:e,startPos:n}){const r=this.getState().startPanLngLat||this._unproject(n);if(!r)return this;const s=this.makeViewport(this.getViewportProps()).panByPosition(r,e);return this._getUpdatedState(s)}panEnd(){return this._getUpdatedState({startPanLngLat:null})}rotateStart({pos:e}){return this._getUpdatedState({startRotatePos:e,startBearing:this.getViewportProps().bearing,startPitch:this.getViewportProps().pitch})}rotate({pos:e,deltaAngleX:n=0,deltaAngleY:r=0}){const{startRotatePos:i,startBearing:s,startPitch:o}=this.getState();if(!i||s===void 0||o===void 0)return this;let a;return e?a=this._getNewRotation(e,i,o,s):a={bearing:s+n,pitch:o+r},this._getUpdatedState(a)}rotateEnd(){return this._getUpdatedState({startBearing:null,startPitch:null})}zoomStart({pos:e}){return this._getUpdatedState({startZoomLngLat:this._unproject(e),startZoom:this.getViewportProps().zoom})}zoom({pos:e,startPos:n,scale:r}){let{startZoom:i,startZoomLngLat:s}=this.getState();if(s||(i=this.getViewportProps().zoom,s=this._unproject(n)||this._unproject(e)),!s)return this;const{maxZoom:o,minZoom:a}=this.getViewportProps();let l=i+Math.log2(r);l=wl(l,a,o);const c=this.makeViewport({...this.getViewportProps(),zoom:l});return this._getUpdatedState({zoom:l,...c.panByPosition(s,e)})}zoomEnd(){return this._getUpdatedState({startZoomLngLat:null,startZoom:null})}zoomIn(e=2){return this._zoomFromCenter(e)}zoomOut(e=2){return this._zoomFromCenter(1/e)}moveLeft(e=100){return this._panFromCenter([e,0])}moveRight(e=100){return this._panFromCenter([-e,0])}moveUp(e=100){return this._panFromCenter([0,e])}moveDown(e=100){return this._panFromCenter([0,-e])}rotateLeft(e=15){return this._getUpdatedState({bearing:this.getViewportProps().bearing-e})}rotateRight(e=15){return this._getUpdatedState({bearing:this.getViewportProps().bearing+e})}rotateUp(e=10){return this._getUpdatedState({pitch:this.getViewportProps().pitch+e})}rotateDown(e=10){return this._getUpdatedState({pitch:this.getViewportProps().pitch-e})}shortestPathFrom(e){const n=e.getViewportProps(),r={...this.getViewportProps()},{bearing:i,longitude:s}=r;return Math.abs(i-n.bearing)>180&&(r.bearing=i<0?i+360:i-360),Math.abs(s-n.longitude)>180&&(r.longitude=s<0?s+360:s-360),r}applyConstraints(e){const{maxZoom:n,minZoom:r,zoom:i}=e;e.zoom=wl(i,r,n);const{maxPitch:s,minPitch:o,pitch:a}=e;e.pitch=wl(a,o,s);const{normalize:l=!0}=e;return l&&Object.assign(e,Pce(e)),e}_zoomFromCenter(e){const{width:n,height:r}=this.getViewportProps();return this.zoom({pos:[n/2,r/2],scale:e})}_panFromCenter(e){const{width:n,height:r}=this.getViewportProps();return this.pan({startPos:[n/2,r/2],pos:[n/2+e[0],r/2+e[1]]})}_getUpdatedState(e){return new this.constructor({makeViewport:this.makeViewport,...this.getViewportProps(),...this.getState(),...e})}_unproject(e){const n=this.makeViewport(this.getViewportProps());return e&&n.unproject(e)}_getNewRotation(e,n,r,i){const s=e[0]-n[0],o=e[1]-n[1],a=e[1],l=n[1],{width:c,height:u}=this.getViewportProps(),h=s/c;let d=0;o>0?Math.abs(u-l)>D8&&(d=o/(l-u)*ife):o<0&&l>D8&&(d=1-a/l),d=wl(d,-1,1);const{minPitch:m,maxPitch:y}=this.getViewportProps(),v=i+180*h;let b=r;return d>0?b=r+d*(y-r):d<0&&(b=r-d*(m-r)),{pitch:b,bearing:v}}}class ofe extends nfe{constructor(){super(...arguments),this.ControllerState=sfe,this.transition={transitionDuration:300,transitionInterpolator:new gM({transitionProps:{compare:["longitude","latitude","zoom","bearing","pitch","position"],required:["longitude","latitude","zoom"]}})},this.dragMode="pan"}setProps(e){e.position=e.position||[0,0,0];const n=this.props;super.setProps(e),(!n||n.height!==e.height)&&this.updateViewport(new this.ControllerState({makeViewport:this.makeViewport,...e,...this.state}))}}let LH=class extends tm{constructor(e={}){super(e)}getViewportType(){return ao}get ControllerType(){return ofe}};LH.displayName="MapView";const afe=new IH;function lfe(t,e){const n=t.order??1/0,r=e.order??1/0;return n-r}class cfe{constructor(e){this._resolvedEffects=[],this._defaultEffects=[],this.effects=[],this._context=e,this._needsRedraw="Initial render",this._setEffects([])}addDefaultEffect(e){const n=this._defaultEffects;if(!n.find(r=>r.id===e.id)){const r=n.findIndex(i=>lfe(i,e)>0);r<0?n.push(e):n.splice(r,0,e),e.setup(this._context),this._setEffects(this.effects)}}setProps(e){"effects"in e&&(Ii(e.effects,this.effects,1)||this._setEffects(e.effects))}needsRedraw(e={clearRedrawFlags:!1}){const n=this._needsRedraw;return e.clearRedrawFlags&&(this._needsRedraw=!1),n}getEffects(){return this._resolvedEffects}_setEffects(e){const n={};for(const i of this.effects)n[i.id]=i;const r=[];for(const i of e){const s=n[i.id];let o=i;s&&s!==i?s.setProps?(s.setProps(i.props),o=s):s.cleanup(this._context):s||i.setup(this._context),r.push(o),delete n[i.id]}for(const i in n)n[i].cleanup(this._context);this.effects=r,this._resolvedEffects=r.concat(this._defaultEffects),e.some(i=>i instanceof IH)||this._resolvedEffects.push(afe),this._needsRedraw="effects changed"}finalize(){for(const e of this._resolvedEffects)e.cleanup(this._context);this.effects.length=0,this._resolvedEffects.length=0,this._defaultEffects.length=0}}class ufe extends Ay{shouldDrawLayer(e){const{operation:n}=e.props;return n.includes("draw")||n.includes("terrain")}}const ffe="deckRenderer.renderLayers";class hfe{constructor(e){this.device=e,this.layerFilter=null,this.drawPickingColors=!1,this.drawLayersPass=new ufe(e),this.pickLayersPass=new pM(e),this.renderCount=0,this._needsRedraw="Initial render",this.renderBuffers=[],this.lastPostProcessEffect=null}setProps(e){this.layerFilter!==e.layerFilter&&(this.layerFilter=e.layerFilter,this._needsRedraw="layerFilter changed"),this.drawPickingColors!==e.drawPickingColors&&(this.drawPickingColors=e.drawPickingColors,this._needsRedraw="drawPickingColors changed")}renderLayers(e){if(!e.viewports.length)return;const n=this.drawPickingColors?this.pickLayersPass:this.drawLayersPass,r={layerFilter:this.layerFilter,isPicking:this.drawPickingColors,...e};r.effects&&this._preRender(r.effects,r);const i=this.lastPostProcessEffect?this.renderBuffers[0]:r.target;this.lastPostProcessEffect&&(r.clearColor=[0,0,0,0],r.clearCanvas=!0);const s=n.render({...r,target:i});r.effects&&this._postRender(r.effects,r),this.renderCount++,$i(ffe,this,s,e)}needsRedraw(e={clearRedrawFlags:!1}){const n=this._needsRedraw;return e.clearRedrawFlags&&(this._needsRedraw=!1),n}finalize(){const{renderBuffers:e}=this;for(const n of e)n.delete();e.length=0}_preRender(e,n){this.lastPostProcessEffect=null,n.preRenderStats=n.preRenderStats||{};for(const r of e)n.preRenderStats[r.id]=r.preRender(n),r.postRender&&(this.lastPostProcessEffect=r.id);this.lastPostProcessEffect&&this._resizeRenderBuffers()}_resizeRenderBuffers(){const{renderBuffers:e}=this,n=this.device.canvasContext.getDrawingBufferSize();e.length===0&&[0,1].map(r=>{const i=this.device.createTexture({sampler:{minFilter:"linear",magFilter:"linear"}});e.push(this.device.createFramebuffer({id:`deck-renderbuffer-${r}`,colorAttachments:[i]}))});for(const r of e)r.resize(n)}_postRender(e,n){const{renderBuffers:r}=this,i={...n,inputBuffer:r[0],swapBuffer:r[1]};for(const s of e)if(s.postRender){i.target=s.id===this.lastPostProcessEffect?n.target:void 0;const o=s.postRender(i);i.inputBuffer=o,i.swapBuffer=o===r[0]?r[1]:r[0]}}}const dfe={pickedColor:null,pickedObjectIndex:-1};function pfe({pickedColors:t,decodePickingColor:e,deviceX:n,deviceY:r,deviceRadius:i,deviceRect:s}){const{x:o,y:a,width:l,height:c}=s;let u=i*i,h=-1,d=0;for(let m=0;m<c;m++){const y=m+a-r,v=y*y;if(v>u)d+=4*l;else for(let b=0;b<l;b++){if(t[d+3]-1>=0){const T=b+o-n,E=T*T+v;E<=u&&(u=E,h=d)}d+=4}}if(h>=0){const m=t.slice(h,h+4),y=e(m);if(y){const v=Math.floor(h/4/l),b=h/4-v*l;return{...y,pickedColor:m,pickedX:o+b,pickedY:a+v}}Zt.error("Picked non-existent layer. Is picking buffer corrupt?")()}return dfe}function gfe({pickedColors:t,decodePickingColor:e}){const n=new Map;if(t){for(let r=0;r<t.length;r+=4)if(t[r+3]-1>=0){const s=t.slice(r,r+4),o=s.join(",");if(!n.has(o)){const a=e(s);a?n.set(o,{...a,color:s}):Zt.error("Picked non-existent layer. Is picking buffer corrupt?")()}}}return Array.from(n.values())}function FH({pickInfo:t,viewports:e,pixelRatio:n,x:r,y:i,z:s}){let o=e[0];e.length>1&&(o=vfe((t==null?void 0:t.pickedViewports)||e,{x:r,y:i}));let a;if(o){const l=[r-o.x,i-o.y];s!==void 0&&(l[2]=s),a=o.unproject(l)}return{color:null,layer:null,viewport:o,index:-1,picked:!1,x:r,y:i,pixel:[r,i],coordinate:a,devicePixel:t&&"pickedX"in t?[t.pickedX,t.pickedY]:void 0,pixelRatio:n}}function mfe(t){const{pickInfo:e,lastPickedInfo:n,mode:r,layers:i}=t,{pickedColor:s,pickedLayer:o,pickedObjectIndex:a}=e,l=o?[o]:[];if(r==="hover"){const h=n.index,d=n.layerId,m=o?o.props.id:null;if(m!==d||a!==h){if(m!==d){const y=i.find(v=>v.props.id===d);y&&l.unshift(y)}n.layerId=m,n.index=a,n.info=null}}const c=FH(t),u=new Map;return u.set(null,c),l.forEach(h=>{let d={...c};h===o&&(d.color=s,d.index=a,d.picked=!0),d=UH({layer:h,info:d,mode:r});const m=d.layer;h===o&&r==="hover"&&(n.info=d),u.set(m.id,d),r==="hover"&&m.updateAutoHighlight(d)}),u}function UH({layer:t,info:e,mode:n}){for(;t&&e;){const r=e.layer||null;e.sourceLayer=r,e.layer=t,e=t.getPickingInfo({info:e,mode:n,sourceLayer:r}),t=t.parent}return e}function vfe(t,e){for(let n=t.length-1;n>=0;n--){const r=t[n];if(r.containsPixel(e))return r}return t[0]}class yfe{constructor(e){this._pickable=!0,this.device=e,this.pickLayersPass=new pM(e),this.lastPickedInfo={index:-1,layerId:null,info:null}}setProps(e){"layerFilter"in e&&(this.layerFilter=e.layerFilter),"_pickable"in e&&(this._pickable=e._pickable)}finalize(){this.pickingFBO&&this.pickingFBO.destroy(),this.depthFBO&&this.depthFBO.destroy()}pickObject(e){return this._pickClosestObject(e)}pickObjects(e){return this._pickVisibleObjects(e)}getLastPickedObject({x:e,y:n,layers:r,viewports:i},s=this.lastPickedInfo.info){const o=s&&s.layer&&s.layer.id,a=s&&s.viewport&&s.viewport.id,l=o?r.find(d=>d.id===o):null,c=a&&i.find(d=>d.id===a)||i[0],u=c&&c.unproject([e-c.x,n-c.y]);return{...s,...{x:e,y:n,viewport:c,coordinate:u,layer:l}}}_resizeBuffer(){var n,r;if(!this.pickingFBO&&(this.pickingFBO=this.device.createFramebuffer({colorAttachments:["rgba8unorm"],depthStencilAttachment:"depth16unorm"}),this.device.isTextureFormatRenderable("rgba32float"))){const i=this.device.createFramebuffer({colorAttachments:["rgba32float"],depthStencilAttachment:"depth16unorm"});this.depthFBO=i}const{canvas:e}=this.device.getDefaultCanvasContext();(n=this.pickingFBO)==null||n.resize({width:e.width,height:e.height}),(r=this.depthFBO)==null||r.resize({width:e.width,height:e.height})}_getPickable(e){if(this._pickable===!1)return null;const n=e.filter(r=>this.pickLayersPass.shouldDrawLayer(r)&&!r.isComposite);return n.length?n:null}_pickClosestObject({layers:e,views:n,viewports:r,x:i,y:s,radius:o=0,depth:a=1,mode:l="query",unproject3D:c,onViewportActive:u,effects:h}){const d=this.device.canvasContext.cssToDeviceRatio(),m=this._getPickable(e);if(!m||r.length===0)return{result:[],emptyInfo:FH({viewports:r,x:i,y:s,pixelRatio:d})};this._resizeBuffer();const y=this.device.canvasContext.cssToDevicePixels([i,s],!0),v=[y.x+Math.floor(y.width/2),y.y+Math.floor(y.height/2)],b=Math.round(o*d),{width:x,height:T}=this.pickingFBO,E=this._getPickingRect({deviceX:v[0],deviceY:v[1],deviceRadius:b,deviceWidth:x,deviceHeight:T}),C={x:i-o,y:s-o,width:o*2+1,height:o*2+1};let I;const O=[],N=new Set;for(let U=0;U<a;U++){let F;if(E){const W=this._drawAndSample({layers:m,views:n,viewports:r,onViewportActive:u,deviceRect:E,cullRect:C,effects:h,pass:`picking:${l}`});F=pfe({...W,deviceX:v[0],deviceY:v[1],deviceRadius:b,deviceRect:E})}else F={pickedColor:null,pickedObjectIndex:-1};let H;if(F.pickedLayer&&c&&this.depthFBO){const{pickedColors:W}=this._drawAndSample({layers:[F.pickedLayer],views:n,viewports:r,onViewportActive:u,deviceRect:{x:F.pickedX,y:F.pickedY,width:1,height:1},cullRect:C,effects:h,pass:`picking:${l}:z`},!0);W[3]&&(H=W[0])}F.pickedLayer&&U+1<a&&(N.add(F.pickedLayer),F.pickedLayer.disablePickingIndex(F.pickedObjectIndex)),I=mfe({pickInfo:F,lastPickedInfo:this.lastPickedInfo,mode:l,layers:m,viewports:r,x:i,y:s,z:H,pixelRatio:d});for(const W of I.values())W.layer&&O.push(W);if(!F.pickedColor)break}for(const U of N)U.restorePickingColors();return{result:O,emptyInfo:I.get(null)}}_pickVisibleObjects({layers:e,views:n,viewports:r,x:i,y:s,width:o=1,height:a=1,mode:l="query",maxObjects:c=null,onViewportActive:u,effects:h}){const d=this._getPickable(e);if(!d||r.length===0)return[];this._resizeBuffer();const m=this.device.canvasContext.cssToDeviceRatio(),y=this.device.canvasContext.cssToDevicePixels([i,s],!0),v=y.x,b=y.y+y.height,x=this.device.canvasContext.cssToDevicePixels([i+o,s+a],!0),T=x.x+x.width,E=x.y,C={x:v,y:E,width:T-v,height:b-E},I=this._drawAndSample({layers:d,views:n,viewports:r,onViewportActive:u,deviceRect:C,cullRect:{x:i,y:s,width:o,height:a},effects:h,pass:`picking:${l}`}),O=gfe(I),N=new Map,U=[],F=Number.isFinite(c);for(let H=0;H<O.length&&!(F&&U.length>=c);H++){const W=O[H];let z={color:W.pickedColor,layer:null,index:W.pickedObjectIndex,picked:!0,x:i,y:s,pixelRatio:m};z=UH({layer:W.pickedLayer,info:z,mode:l});const V=z.layer.id;N.has(V)||N.set(V,new Set);const M=N.get(V),K=z.object??z.index;M.has(K)||(M.add(K),U.push(z))}return U}_drawAndSample({layers:e,views:n,viewports:r,onViewportActive:i,deviceRect:s,cullRect:o,effects:a,pass:l},c=!1){const u=c?this.depthFBO:this.pickingFBO,h={layers:e,layerFilter:this.layerFilter,views:n,viewports:r,onViewportActive:i,pickingFBO:u,deviceRect:s,cullRect:o,effects:a,pass:l,pickZ:c,preRenderStats:{},isPicking:!0};for(const T of a)T.useInPicking&&(h.preRenderStats[T.id]=T.preRender(h));const{decodePickingColor:d}=this.pickLayersPass.render(h),{x:m,y,width:v,height:b}=s,x=new(c?Float32Array:Uint8Array)(v*b*4);return this.device.readPixelsToArrayWebGL(u,{sourceX:m,sourceY:y,sourceWidth:v,sourceHeight:b,target:x}),{pickedColors:x,decodePickingColor:d}}_getPickingRect({deviceX:e,deviceY:n,deviceRadius:r,deviceWidth:i,deviceHeight:s}){const o=Math.max(0,e-r),a=Math.max(0,n-r),l=Math.min(i,e+r+1)-o,c=Math.min(s,n+r+1)-a;return l<=0||c<=0?null:{x:o,y:a,width:l,height:c}}}const bfe={"top-left":{top:0,left:0},"top-right":{top:0,right:0},"bottom-left":{bottom:0,left:0},"bottom-right":{bottom:0,right:0},fill:{top:0,left:0,bottom:0,right:0}},_fe="top-left",B8="__root";class wfe{constructor({deck:e,parentElement:n}){this.defaultWidgets=[],this.widgets=[],this.resolvedWidgets=[],this.containers={},this.lastViewports={},this.deck=e,this.parentElement=n}getWidgets(){return this.resolvedWidgets}setProps(e){e.widgets&&!Ii(e.widgets,this.widgets,1)&&this._setWi
1547dgets(e.widgets)}finalize(){for(const e of this.getWidgets())this._remove(e);this.defaultWidgets.length=0,this.resolvedWidgets.length=0;for(const e in this.containers)this.containers[e].remove()}addDefault(e){this.defaultWidgets.find(n=>n.id===e.id)||(this._add(e),this.defaultWidgets.push(e),this._setWidgets(this.widgets))}_setWidgets(e){const n={};for(const r of this.resolvedWidgets)n[r.id]=r;this.resolvedWidgets.length=0;for(const r of this.defaultWidgets)n[r.id]=null,this.resolvedWidgets.push(r);for(let r of e){const i=n[r.id];i?i.viewId!==r.viewId||i.placement!==r.placement?(this._remove(i),this._add(r)):r!==i&&(i.setProps(r.props),r=i):this._add(r),n[r.id]=null,this.resolvedWidgets.push(r)}for(const r in n){const i=n[r];i&&this._remove(i)}this.widgets=e}_add(e){const{viewId:n=null,placement:r=_fe}=e,i=e.onAdd({deck:this.deck,viewId:n});i&&this._getContainer(n,r).append(i),e._element=i}_remove(e){var n;(n=e.onRemove)==null||n.call(e),e._element&&e._element.remove(),e._element=void 0}_getContainer(e,n){var o;const r=e||B8;let i=this.containers[r];i||(i=document.createElement("div"),i.style.pointerEvents="none",i.style.position="absolute",i.style.overflow="hidden",(o=this.parentElement)==null||o.append(i),this.containers[r]=i);let s=i.querySelector(`.${n}`);return s||(s=document.createElement("div"),s.className=n,s.style.position="absolute",s.style.zIndex="2",Object.assign(s.style,bfe[n]),i.append(s)),s}_updateContainers(){const e=this.deck.width,n=this.deck.height;for(const r in this.containers){const i=this.lastViewports[r]||null,s=r===B8||i,o=this.containers[r];s?(o.style.display="block",o.style.left=`${i?i.x:0}px`,o.style.top=`${i?i.y:0}px`,o.style.width=`${i?i.width:e}px`,o.style.height=`${i?i.height:n}px`):o.style.display="none"}}onRedraw({viewports:e,layers:n}){var i,s;const r=e.reduce((o,a)=>(o[a.id]=a,o),{});for(const o of this.getWidgets()){const{viewId:a}=o;if(a){const l=r[a];l&&(o.onViewportChange&&o.onViewportChange(l),(i=o.onRedraw)==null||i.call(o,{viewports:[l],layers:n}))}else{if(o.onViewportChange)for(const l of e)o.onViewportChange(l);(s=o.onRedraw)==null||s.call(o,{viewports:e,layers:n})}}this.lastViewports=r,this._updateContainers()}onHover(e,n){var r,i;for(const s of this.getWidgets()){const{viewId:o}=s;(!o||o===((r=e.viewport)==null?void 0:r.id))&&((i=s.onHover)==null||i.call(s,e,n))}}onEvent(e,n){var i,s;const r=wP[n.type];if(r)for(const o of this.getWidgets()){const{viewId:a}=o;(!a||a===((i=e.viewport)==null?void 0:i.id))&&((s=o[r])==null||s.call(o,e,n))}}}const xfe={zIndex:"1",position:"absolute",pointerEvents:"none",color:"#a0a7b4",backgroundColor:"#29323c",padding:"10px",top:"0",left:"0",display:"none"};let Afe=class{constructor(){this.id="default-tooltip",this.placement="fill",this.props={},this.isVisible=!1}onAdd({deck:e}){const n=document.createElement("div");return n.className="deck-tooltip",Object.assign(n.style,xfe),this.deck=e,this.element=n,n}onRemove(){this.deck=void 0,this.element=void 0}setProps(){}onViewportChange(e){var n;this.isVisible&&e.id===((n=this.lastViewport)==null?void 0:n.id)&&e!==this.lastViewport&&this.setTooltip(null)}onHover(e){const{deck:n}=this,r=n&&n.props.getTooltip;if(!r)return;const i=r(e);this.lastViewport=e.viewport,this.setTooltip(i,e.x,e.y)}setTooltip(e,n,r){const i=this.element;if(i){if(typeof e=="string")i.innerText=e;else if(e)e.text&&(i.innerText=e.text),e.html&&(i.innerHTML=e.html),e.className&&(i.className=e.className);else{this.isVisible=!1,i.style.display="none";return}this.isVisible=!0,i.style.display="block",i.style.transform=`translate(${n}px, ${r}px)`,e&&typeof e=="object"&&"style"in e&&Object.assign(i.style,e.style)}}};var mg;(
vendor: 32,708 bytes, line 1547
1547function(t){t[t.DEPTH_BUFFER_BIT=256]="DEPTH_BUFFER_BIT",t[t.STENCIL_BUFFER_BIT=1024]="STENCIL_BUFFER_BIT",t[t.COLOR_BUFFER_BIT=16384]="COLOR_BUFFER_BIT",t[t.POINTS=0]="POINTS",t[t.LINES=1]="LINES",t[t.LINE_LOOP=2]="LINE_LOOP",t[t.LINE_STRIP=3]="LINE_STRIP",t[t.TRIANGLES=4]="TRIANGLES",t[t.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",t[t.TRIANGLE_FAN=6]="TRIANGLE_FAN",t[t.ZERO=0]="ZERO",t[t.ONE=1]="ONE",t[t.SRC_COLOR=768]="SRC_COLOR",t[t.ONE_MINUS_SRC_COLOR=769]="ONE_MINUS_SRC_COLOR",t[t.SRC_ALPHA=770]="SRC_ALPHA",t[t.ONE_MINUS_SRC_ALPHA=771]="ONE_MINUS_SRC_ALPHA",t[t.DST_ALPHA=772]="DST_ALPHA",t[t.ONE_MINUS_DST_ALPHA=773]="ONE_MINUS_DST_ALPHA",t[t.DST_COLOR=774]="DST_COLOR",t[t.ONE_MINUS_DST_COLOR=775]="ONE_MINUS_DST_COLOR",t[t.SRC_ALPHA_SATURATE=776]="SRC_ALPHA_SATURATE",t[t.CONSTANT_COLOR=32769]="CONSTANT_COLOR",t[t.ONE_MINUS_CONSTANT_COLOR=32770]="ONE_MINUS_CONSTANT_COLOR",t[t.CONSTANT_ALPHA=32771]="CONSTANT_ALPHA",t[t.ONE_MINUS_CONSTANT_ALPHA=32772]="ONE_MINUS_CONSTANT_ALPHA",t[t.FUNC_ADD=32774]="FUNC_ADD",t[t.FUNC_SUBTRACT=32778]="FUNC_SUBTRACT",t[t.FUNC_REVERSE_SUBTRACT=32779]="FUNC_REVERSE_SUBTRACT",t[t.BLEND_EQUATION=32777]="BLEND_EQUATION",t[t.BLEND_EQUATION_RGB=32777]="BLEND_EQUATION_RGB",t[t.BLEND_EQUATION_ALPHA=34877]="BLEND_EQUATION_ALPHA",t[t.BLEND_DST_RGB=32968]="BLEND_DST_RGB",t[t.BLEND_SRC_RGB=32969]="BLEND_SRC_RGB",t[t.BLEND_DST_ALPHA=32970]="BLEND_DST_ALPHA",t[t.BLEND_SRC_ALPHA=32971]="BLEND_SRC_ALPHA",t[t.BLEND_COLOR=32773]="BLEND_COLOR",t[t.ARRAY_BUFFER_BINDING=34964]="ARRAY_BUFFER_BINDING",t[t.ELEMENT_ARRAY_BUFFER_BINDING=34965]="ELEMENT_ARRAY_BUFFER_BINDING",t[t.LINE_WIDTH=2849]="LINE_WIDTH",t[t.ALIASED_POINT_SIZE_RANGE=33901]="ALIASED_POINT_SIZE_RANGE",t[t.ALIASED_LINE_WIDTH_RANGE=33902]="ALIASED_LINE_WIDTH_RANGE",t[t.CULL_FACE_MODE=2885]="CULL_FACE_MODE",t[t.FRONT_FACE=2886]="FRONT_FACE",t[t.DEPTH_RANGE=2928]="DEPTH_RANGE",t[t.DEPTH_WRITEMASK=2930]="DEPTH_WRITEMASK",t[t.DEPTH_CLEAR_VALUE=2931]="DEPTH_CLEAR_VALUE",t[t.DEPTH_FUNC=2932]="DEPTH_FUNC",t[t.STENCIL_CLEAR_VALUE=2961]="STENCIL_CLEAR_VALUE",t[t.STENCIL_FUNC=2962]="STENCIL_FUNC",t[t.STENCIL_FAIL=2964]="STENCIL_FAIL",t[t.STENCIL_PASS_DEPTH_FAIL=2965]="STENCIL_PASS_DEPTH_FAIL",t[t.STENCIL_PASS_DEPTH_PASS=2966]="STENCIL_PASS_DEPTH_PASS",t[t.STENCIL_REF=2967]="STENCIL_REF",t[t.STENCIL_VALUE_MASK=2963]="STENCIL_VALUE_MASK",t[t.STENCIL_WRITEMASK=2968]="STENCIL_WRITEMASK",t[t.STENCIL_BACK_FUNC=34816]="STENCIL_BACK_FUNC",t[t.STENCIL_BACK_FAIL=34817]="STENCIL_BACK_FAIL",t[t.STENCIL_BACK_PASS_DEPTH_FAIL=34818]="STENCIL_BACK_PASS_DEPTH_FAIL",t[t.STENCIL_BACK_PASS_DEPTH_PASS=34819]="STENCIL_BACK_PASS_DEPTH_PASS",t[t.STENCIL_BACK_REF=36003]="STENCIL_BACK_REF",t[t.STENCIL_BACK_VALUE_MASK=36004]="STENCIL_BACK_VALUE_MASK",t[t.STENCIL_BACK_WRITEMASK=36005]="STENCIL_BACK_WRITEMASK",t[t.VIEWPORT=2978]="VIEWPORT",t[t.SCISSOR_BOX=3088]="SCISSOR_BOX",t[t.COLOR_CLEAR_VALUE=3106]="COLOR_CLEAR_VALUE",t[t.COLOR_WRITEMASK=3107]="COLOR_WRITEMASK",t[t.UNPACK_ALIGNMENT=3317]="UNPACK_ALIGNMENT",t[t.PACK_ALIGNMENT=3333]="PACK_ALIGNMENT",t[t.MAX_TEXTURE_SIZE=3379]="MAX_TEXTURE_SIZE",t[t.MAX_VIEWPORT_DIMS=3386]="MAX_VIEWPORT_DIMS",t[t.SUBPIXEL_BITS=3408]="SUBPIXEL_BITS",t[t.RED_BITS=3410]="RED_BITS",t[t.GREEN_BITS=3411]="GREEN_BITS",t[t.BLUE_BITS=3412]="BLUE_BITS",t[t.ALPHA_BITS=3413]="ALPHA_BITS",t[t.DEPTH_BITS=3414]="DEPTH_BITS",t[t.STENCIL_BITS=3415]="STENCIL_BITS",t[t.POLYGON_OFFSET_UNITS=10752]="POLYGON_OFFSET_UNITS",t[t.POLYGON_OFFSET_FACTOR=32824]="POLYGON_OFFSET_FACTOR",t[t.TEXTURE_BINDING_2D=32873]="TEXTURE_BINDING_2D",t[t.SAMPLE_BUFFERS=32936]="SAMPLE_BUFFERS",t[t.SAMPLES=32937]="SAMPLES",t[t.SAMPLE_COVERAGE_VALUE=32938]="SAMPLE_COVERAGE_VALUE",t[t.SAMPLE_COVERAGE_INVERT=32939]="SAMPLE_COVERAGE_INVERT",t[t.COMPRESSED_TEXTURE_FORMATS=34467]="COMPRESSED_TEXTURE_FORMATS",t[t.VENDOR=7936]="VENDOR",t[t.RENDERER=7937]="RENDERER",t[t.VERSION=7938]="VERSION",t[t.IMPLEMENTATION_COLOR_READ_TYPE=35738]="IMPLEMENTATION_COLOR_READ_TYPE",t[t.IMPLEMENTATION_COLOR_READ_FORMAT=35739]="IMPLEMENTATION_COLOR_READ_FORMAT",t[t.BROWSER_DEFAULT_WEBGL=37444]="BROWSER_DEFAULT_WEBGL",t[t.STATIC_DRAW=35044]="STATIC_DRAW",t[t.STREAM_DRAW=35040]="STREAM_DRAW",t[t.DYNAMIC_DRAW=35048]="DYNAMIC_DRAW",t[t.ARRAY_BUFFER=34962]="ARRAY_BUFFER",t[t.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",t[t.BUFFER_SIZE=34660]="BUFFER_SIZE",t[t.BUFFER_USAGE=34661]="BUFFER_USAGE",t[t.CURRENT_VERTEX_ATTRIB=34342]="CURRENT_VERTEX_ATTRIB",t[t.VERTEX_ATTRIB_ARRAY_ENABLED=34338]="VERTEX_ATTRIB_ARRAY_ENABLED",t[t.VERTEX_ATTRIB_ARRAY_SIZE=34339]="VERTEX_ATTRIB_ARRAY_SIZE",t[t.VERTEX_ATTRIB_ARRAY_STRIDE=34340]="VERTEX_ATTRIB_ARRAY_STRIDE",t[t.VERTEX_ATTRIB_ARRAY_TYPE=34341]="VERTEX_ATTRIB_ARRAY_TYPE",t[t.VERTEX_ATTRIB_ARRAY_NORMALIZED=34922]="VERTEX_ATTRIB_ARRAY_NORMALIZED",t[t.VERTEX_ATTRIB_ARRAY_POINTER=34373]="VERTEX_ATTRIB_ARRAY_POINTER",t[t.VERTEX_ATTRIB_ARRAY_BUFFER_BINDING=34975]="VERTEX_ATTRIB_ARRAY_BUFFER_BINDING",t[t.CULL_FACE=2884]="CULL_FACE",t[t.FRONT=1028]="FRONT",t[t.BACK=1029]="BACK",t[t.FRONT_AND_BACK=1032]="FRONT_AND_BACK",t[t.BLEND=3042]="BLEND",t[t.DEPTH_TEST=2929]="DEPTH_TEST",t[t.DITHER=3024]="DITHER",t[t.POLYGON_OFFSET_FILL=32823]="POLYGON_OFFSET_FILL",t[t.SAMPLE_ALPHA_TO_COVERAGE=32926]="SAMPLE_ALPHA_TO_COVERAGE",t[t.SAMPLE_COVERAGE=32928]="SAMPLE_COVERAGE",t[t.SCISSOR_TEST=3089]="SCISSOR_TEST",t[t.STENCIL_TEST=2960]="STENCIL_TEST",t[t.NO_ERROR=0]="NO_ERROR",t[t.INVALID_ENUM=1280]="INVALID_ENUM",t[t.INVALID_VALUE=1281]="INVALID_VALUE",t[t.INVALID_OPERATION=1282]="INVALID_OPERATION",t[t.OUT_OF_MEMORY=1285]="OUT_OF_MEMORY",t[t.CONTEXT_LOST_WEBGL=37442]="CONTEXT_LOST_WEBGL",t[t.CW=2304]="CW",t[t.CCW=2305]="CCW",t[t.DONT_CARE=4352]="DONT_CARE",t[t.FASTEST=4353]="FASTEST",t[t.NICEST=4354]="NICEST",t[t.GENERATE_MIPMAP_HINT=33170]="GENERATE_MIPMAP_HINT",t[t.BYTE=5120]="BYTE",t[t.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",t[t.SHORT=5122]="SHORT",t[t.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",t[t.INT=5124]="INT",t[t.UNSIGNED_INT=5125]="UNSIGNED_INT",t[t.FLOAT=5126]="FLOAT",t[t.DOUBLE=5130]="DOUBLE",t[t.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",t[t.ALPHA=6406]="ALPHA",t[t.RGB=6407]="RGB",t[t.RGBA=6408]="RGBA",t[t.LUMINANCE=6409]="LUMINANCE",t[t.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",t[t.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",t[t.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",t[t.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",t[t.FRAGMENT_SHADER=35632]="FRAGMENT_SHADER",t[t.VERTEX_SHADER=35633]="VERTEX_SHADER",t[t.COMPILE_STATUS=35713]="COMPILE_STATUS",t[t.DELETE_STATUS=35712]="DELETE_STATUS",t[t.LINK_STATUS=35714]="LINK_STATUS",t[t.VALIDATE_STATUS=35715]="VALIDATE_STATUS",t[t.ATTACHED_SHADERS=35717]="ATTACHED_SHADERS",t[t.ACTIVE_ATTRIBUTES=35721]="ACTIVE_ATTRIBUTES",t[t.ACTIVE_UNIFORMS=35718]="ACTIVE_UNIFORMS",t[t.MAX_VERTEX_ATTRIBS=34921]="MAX_VERTEX_ATTRIBS",t[t.MAX_VERTEX_UNIFORM_VECTORS=36347]="MAX_VERTEX_UNIFORM_VECTORS",t[t.MAX_VARYING_VECTORS=36348]="MAX_VARYING_VECTORS",t[t.MAX_COMBINED_TEXTURE_IMAGE_UNITS=35661]="MAX_COMBINED_TEXTURE_IMAGE_UNITS",t[t.MAX_VERTEX_TEXTURE_IMAGE_UNITS=35660]="MAX_VERTEX_TEXTURE_IMAGE_UNITS",t[t.MAX_TEXTURE_IMAGE_UNITS=34930]="MAX_TEXTURE_IMAGE_UNITS",t[t.MAX_FRAGMENT_UNIFORM_VECTORS=36349]="MAX_FRAGMENT_UNIFORM_VECTORS",t[t.SHADER_TYPE=35663]="SHADER_TYPE",t[t.SHADING_LANGUAGE_VERSION=35724]="SHADING_LANGUAGE_VERSION",t[t.CURRENT_PROGRAM=35725]="CURRENT_PROGRAM",t[t.NEVER=512]="NEVER",t[t.LESS=513]="LESS",t[t.EQUAL=514]="EQUAL",t[t.LEQUAL=515]="LEQUAL",t[t.GREATER=516]="GREATER",t[t.NOTEQUAL=517]="NOTEQUAL",t[t.GEQUAL=518]="GEQUAL",t[t.ALWAYS=519]="ALWAYS",t[t.KEEP=7680]="KEEP",t[t.REPLACE=7681]="REPLACE",t[t.INCR=7682]="INCR",t[t.DECR=7683]="DECR",t[t.INVERT=5386]="INVERT",t[t.INCR_WRAP=34055]="INCR_WRAP",t[t.DECR_WRAP=34056]="DECR_WRAP",t[t.NEAREST=9728]="NEAREST",t[t.LINEAR=9729]="LINEAR",t[t.NEAREST_MIPMAP_NEAREST=9984]="NEAREST_MIPMAP_NEAREST",t[t.LINEAR_MIPMAP_NEAREST=9985]="LINEAR_MIPMAP_NEAREST",t[t.NEAREST_MIPMAP_LINEAR=9986]="NEAREST_MIPMAP_LINEAR",t[t.LINEAR_MIPMAP_LINEAR=9987]="LINEAR_MIPMAP_LINEAR",t[t.TEXTURE_MAG_FILTER=10240]="TEXTURE_MAG_FILTER",t[t.TEXTURE_MIN_FILTER=10241]="TEXTURE_MIN_FILTER",t[t.TEXTURE_WRAP_S=10242]="TEXTURE_WRAP_S",t[t.TEXTURE_WRAP_T=10243]="TEXTURE_WRAP_T",t[t.TEXTURE_2D=3553]="TEXTURE_2D",t[t.TEXTURE=5890]="TEXTURE",t[t.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",t[t.TEXTURE_BINDING_CUBE_MAP=34068]="TEXTURE_BINDING_CUBE_MAP",t[t.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",t[t.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",t[t.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",t[t.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",t[t.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",t[t.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z",t[t.MAX_CUBE_MAP_TEXTURE_SIZE=34076]="MAX_CUBE_MAP_TEXTURE_SIZE",t[t.TEXTURE0=33984]="TEXTURE0",t[t.ACTIVE_TEXTURE=34016]="ACTIVE_TEXTURE",t[t.REPEAT=10497]="REPEAT",t[t.CLAMP_TO_EDGE=33071]="CLAMP_TO_EDGE",t[t.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT",t[t.TEXTURE_WIDTH=4096]="TEXTURE_WIDTH",t[t.TEXTURE_HEIGHT=4097]="TEXTURE_HEIGHT",t[t.FLOAT_VEC2=35664]="FLOAT_VEC2",t[t.FLOAT_VEC3=35665]="FLOAT_VEC3",t[t.FLOAT_VEC4=35666]="FLOAT_VEC4",t[t.INT_VEC2=35667]="INT_VEC2",t[t.INT_VEC3=35668]="INT_VEC3",t[t.INT_VEC4=35669]="INT_VEC4",t[t.BOOL=35670]="BOOL",t[t.BOOL_VEC2=35671]="BOOL_VEC2",t[t.BOOL_VEC3=35672]="BOOL_VEC3",t[t.BOOL_VEC4=35673]="BOOL_VEC4",t[t.FLOAT_MAT2=35674]="FLOAT_MAT2",t[t.FLOAT_MAT3=35675]="FLOAT_MAT3",t[t.FLOAT_MAT4=35676]="FLOAT_MAT4",t[t.SAMPLER_2D=35678]="SAMPLER_2D",t[t.SAMPLER_CUBE=35680]="SAMPLER_CUBE",t[t.LOW_FLOAT=36336]="LOW_FLOAT",t[t.MEDIUM_FLOAT=36337]="MEDIUM_FLOAT",t[t.HIGH_FLOAT=36338]="HIGH_FLOAT",t[t.LOW_INT=36339]="LOW_INT",t[t.MEDIUM_INT=36340]="MEDIUM_INT",t[t.HIGH_INT=36341]="HIGH_INT",t[t.FRAMEBUFFER=36160]="FRAMEBUFFER",t[t.RENDERBUFFER=36161]="RENDERBUFFER",t[t.RGBA4=32854]="RGBA4",t[t.RGB5_A1=32855]="RGB5_A1",t[t.RGB565=36194]="RGB565",t[t.DEPTH_COMPONENT16=33189]="DEPTH_COMPONENT16",t[t.STENCIL_INDEX=6401]="STENCIL_INDEX",t[t.STENCIL_INDEX8=36168]="STENCIL_INDEX8",t[t.DEPTH_STENCIL=34041]="DEPTH_STENCIL",t[t.RENDERBUFFER_WIDTH=36162]="RENDERBUFFER_WIDTH",t[t.RENDERBUFFER_HEIGHT=36163]="RENDERBUFFER_HEIGHT",t[t.RENDERBUFFER_INTERNAL_FORMAT=36164]="RENDERBUFFER_INTERNAL_FORMAT",t[t.RENDERBUFFER_RED_SIZE=36176]="RENDERBUFFER_RED_SIZE",t[t.RENDERBUFFER_GREEN_SIZE=36177]="RENDERBUFFER_GREEN_SIZE",t[t.RENDERBUFFER_BLUE_SIZE=36178]="RENDERBUFFER_BLUE_SIZE",t[t.RENDERBUFFER_ALPHA_SIZE=36179]="RENDERBUFFER_ALPHA_SIZE",t[t.RENDERBUFFER_DEPTH_SIZE=36180]="RENDERBUFFER_DEPTH_SIZE",t[t.RENDERBUFFER_STENCIL_SIZE=36181]="RENDERBUFFER_STENCIL_SIZE",t[t.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE=36048]="FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE",t[t.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME=36049]="FRAMEBUFFER_ATTACHMENT_OBJECT_NAME",t[t.FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL=36050]="FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL",t[t.FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE=36051]="FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE",t[t.COLOR_ATTACHMENT0=36064]="COLOR_ATTACHMENT0",t[t.DEPTH_ATTACHMENT=36096]="DEPTH_ATTACHMENT",t[t.STENCIL_ATTACHMENT=36128]="STENCIL_ATTACHMENT",t[t.DEPTH_STENCIL_ATTACHMENT=33306]="DEPTH_STENCIL_ATTACHMENT",t[t.NONE=0]="NONE",t[t.FRAMEBUFFER_COMPLETE=36053]="FRAMEBUFFER_COMPLETE",t[t.FRAMEBUFFER_INCOMPLETE_ATTACHMENT=36054]="FRAMEBUFFER_INCOMPLETE_ATTACHMENT",t[t.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT=36055]="FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT",t[t.FRAMEBUFFER_INCOMPLETE_DIMENSIONS=36057]="FRAMEBUFFER_INCOMPLETE_DIMENSIONS",t[t.FRAMEBUFFER_UNSUPPORTED=36061]="FRAMEBUFFER_UNSUPPORTED",t[t.FRAMEBUFFER_BINDING=36006]="FRAMEBUFFER_BINDING",t[t.RENDERBUFFER_BINDING=36007]="RENDERBUFFER_BINDING",t[t.READ_FRAMEBUFFER=36008]="READ_FRAMEBUFFER",t[t.DRAW_FRAMEBUFFER=36009]="DRAW_FRAMEBUFFER",t[t.MAX_RENDERBUFFER_SIZE=34024]="MAX_RENDERBUFFER_SIZE",t[t.INVALID_FRAMEBUFFER_OPERATION=1286]="INVALID_FRAMEBUFFER_OPERATION",t[t.UNPACK_FLIP_Y_WEBGL=37440]="UNPACK_FLIP_Y_WEBGL",t[t.UNPACK_PREMULTIPLY_ALPHA_WEBGL=37441]="UNPACK_PREMULTIPLY_ALPHA_WEBGL",t[t.UNPACK_COLORSPACE_CONVERSION_WEBGL=37443]="UNPACK_COLORSPACE_CONVERSION_WEBGL",t[t.READ_BUFFER=3074]="READ_BUFFER",t[t.UNPACK_ROW_LENGTH=3314]="UNPACK_ROW_LENGTH",t[t.UNPACK_SKIP_ROWS=3315]="UNPACK_SKIP_ROWS",t[t.UNPACK_SKIP_PIXELS=3316]="UNPACK_SKIP_PIXELS",t[t.PACK_ROW_LENGTH=3330]="PACK_ROW_LENGTH",t[t.PACK_SKIP_ROWS=3331]="PACK_SKIP_ROWS",t[t.PACK_SKIP_PIXELS=3332]="PACK_SKIP_PIXELS",t[t.TEXTURE_BINDING_3D=32874]="TEXTURE_BINDING_3D",t[t.UNPACK_SKIP_IMAGES=32877]="UNPACK_SKIP_IMAGES",t[t.UNPACK_IMAGE_HEIGHT=32878]="UNPACK_IMAGE_HEIGHT",t[t.MAX_3D_TEXTURE_SIZE=32883]="MAX_3D_TEXTURE_SIZE",t[t.MAX_ELEMENTS_VERTICES=33e3]="MAX_ELEMENTS_VERTICES",t[t.MAX_ELEMENTS_INDICES=33001]="MAX_ELEMENTS_INDICES",t[t.MAX_TEXTURE_LOD_BIAS=34045]="MAX_TEXTURE_LOD_BIAS",t[t.MAX_FRAGMENT_UNIFORM_COMPONENTS=35657]="MAX_FRAGMENT_UNIFORM_COMPONENTS",t[t.MAX_VERTEX_UNIFORM_COMPONENTS=35658]="MAX_VERTEX_UNIFORM_COMPONENTS",t[t.MAX_ARRAY_TEXTURE_LAYERS=35071]="MAX_ARRAY_TEXTURE_LAYERS",t[t.MIN_PROGRAM_TEXEL_OFFSET=35076]="MIN_PROGRAM_TEXEL_OFFSET",t[t.MAX_PROGRAM_TEXEL_OFFSET=35077]="MAX_PROGRAM_TEXEL_OFFSET",t[t.MAX_VARYING_COMPONENTS=35659]="MAX_VARYING_COMPONENTS",t[t.FRAGMENT_SHADER_DERIVATIVE_HINT=35723]="FRAGMENT_SHADER_DERIVATIVE_HINT",t[t.RASTERIZER_DISCARD=35977]="RASTERIZER_DISCARD",t[t.VERTEX_ARRAY_BINDING=34229]="VERTEX_ARRAY_BINDING",t[t.MAX_VERTEX_OUTPUT_COMPONENTS=37154]="MAX_VERTEX_OUTPUT_COMPONENTS",t[t.MAX_FRAGMENT_INPUT_COMPONENTS=37157]="MAX_FRAGMENT_INPUT_COMPONENTS",t[t.MAX_SERVER_WAIT_TIMEOUT=37137]="MAX_SERVER_WAIT_TIMEOUT",t[t.MAX_ELEMENT_INDEX=36203]="MAX_ELEMENT_INDEX",t[t.RED=6403]="RED",t[t.RGB8=32849]="RGB8",t[t.RGBA8=32856]="RGBA8",t[t.RGB10_A2=32857]="RGB10_A2",t[t.TEXTURE_3D=32879]="TEXTURE_3D",t[t.TEXTURE_WRAP_R=32882]="TEXTURE_WRAP_R",t[t.TEXTURE_MIN_LOD=33082]="TEXTURE_MIN_LOD",t[t.TEXTURE_MAX_LOD=33083]="TEXTURE_MAX_LOD",t[t.TEXTURE_BASE_LEVEL=33084]="TEXTURE_BASE_LEVEL",t[t.TEXTURE_MAX_LEVEL=33085]="TEXTURE_MAX_LEVEL",t[t.TEXTURE_COMPARE_MODE=34892]="TEXTURE_COMPARE_MODE",t[t.TEXTURE_COMPARE_FUNC=34893]="TEXTURE_COMPARE_FUNC",t[t.SRGB=35904]="SRGB",t[t.SRGB8=35905]="SRGB8",t[t.SRGB8_ALPHA8=35907]="SRGB8_ALPHA8",t[t.COMPARE_REF_TO_TEXTURE=34894]="COMPARE_REF_TO_TEXTURE",t[t.RGBA32F=34836]="RGBA32F",t[t.RGB32F=34837]="RGB32F",t[t.RGBA16F=34842]="RGBA16F",t[t.RGB16F=34843]="RGB16F",t[t.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY",t[t.TEXTURE_BINDING_2D_ARRAY=35869]="TEXTURE_BINDING_2D_ARRAY",t[t.R11F_G11F_B10F=35898]="R11F_G11F_B10F",t[t.RGB9_E5=35901]="RGB9_E5",t[t.RGBA32UI=36208]="RGBA32UI",t[t.RGB32UI=36209]="RGB32UI",t[t.RGBA16UI=36214]="RGBA16UI",t[t.RGB16UI=36215]="RGB16UI",t[t.RGBA8UI=36220]="RGBA8UI",t[t.RGB8UI=36221]="RGB8UI",t[t.RGBA32I=36226]="RGBA32I",t[t.RGB32I=36227]="RGB32I",t[t.RGBA16I=36232]="RGBA16I",t[t.RGB16I=36233]="RGB16I",t[t.RGBA8I=36238]="RGBA8I",t[t.RGB8I=36239]="RGB8I",t[t.RED_INTEGER=36244]="RED_INTEGER",t[t.RGB_INTEGER=36248]="RGB_INTEGER",t[t.RGBA_INTEGER=36249]="RGBA_INTEGER",t[t.R8=33321]="R8",t[t.RG8=33323]="RG8",t[t.R16F=33325]="R16F",t[t.R32F=33326]="R32F",t[t.RG16F=33327]="RG16F",t[t.RG32F=33328]="RG32F",t[t.R8I=33329]="R8I",t[t.R8UI=33330]="R8UI",t[t.R16I=33331]="R16I",t[t.R16UI=33332]="R16UI",t[t.R32I=33333]="R32I",t[t.R32UI=33334]="R32UI",t[t.RG8I=33335]="RG8I",t[t.RG8UI=33336]="RG8UI",t[t.RG16I=33337]="RG16I",t[t.RG16UI=33338]="RG16UI",t[t.RG32I=33339]="RG32I",t[t.RG32UI=33340]="RG32UI",t[t.R8_SNORM=36756]="R8_SNORM",t[t.RG8_SNORM=36757]="RG8_SNORM",t[t.RGB8_SNORM=36758]="RGB8_SNORM",t[t.RGBA8_SNORM=36759]="RGBA8_SNORM",t[t.RGB10_A2UI=36975]="RGB10_A2UI",t[t.TEXTURE_IMMUTABLE_FORMAT=37167]="TEXTURE_IMMUTABLE_FORMAT",t[t.TEXTURE_IMMUTABLE_LEVELS=33503]="TEXTURE_IMMUTABLE_LEVELS",t[t.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",t[t.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",t[t.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",t[t.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV",t[t.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",t[t.HALF_FLOAT=5131]="HALF_FLOAT",t[t.RG=33319]="RG",t[t.RG_INTEGER=33320]="RG_INTEGER",t[t.INT_2_10_10_10_REV=36255]="INT_2_10_10_10_REV",t[t.CURRENT_QUERY=34917]="CURRENT_QUERY",t[t.QUERY_RESULT=34918]="QUERY_RESULT",t[t.QUERY_RESULT_AVAILABLE=34919]="QUERY_RESULT_AVAILABLE",t[t.ANY_SAMPLES_PASSED=35887]="ANY_SAMPLES_PASSED",t[t.ANY_SAMPLES_PASSED_CONSERVATIVE=36202]="ANY_SAMPLES_PASSED_CONSERVATIVE",t[t.MAX_DRAW_BUFFERS=34852]="MAX_DRAW_BUFFERS",t[t.DRAW_BUFFER0=34853]="DRAW_BUFFER0",t[t.DRAW_BUFFER1=34854]="DRAW_BUFFER1",t[t.DRAW_BUFFER2=34855]="DRAW_BUFFER2",t[t.DRAW_BUFFER3=34856]="DRAW_BUFFER3",t[t.DRAW_BUFFER4=34857]="DRAW_BUFFER4",t[t.DRAW_BUFFER5=34858]="DRAW_BUFFER5",t[t.DRAW_BUFFER6=34859]="DRAW_BUFFER6",t[t.DRAW_BUFFER7=34860]="DRAW_BUFFER7",t[t.DRAW_BUFFER8=34861]="DRAW_BUFFER8",t[t.DRAW_BUFFER9=34862]="DRAW_BUFFER9",t[t.DRAW_BUFFER10=34863]="DRAW_BUFFER10",t[t.DRAW_BUFFER11=34864]="DRAW_BUFFER11",t[t.DRAW_BUFFER12=34865]="DRAW_BUFFER12",t[t.DRAW_BUFFER13=34866]="DRAW_BUFFER13",t[t.DRAW_BUFFER14=34867]="DRAW_BUFFER14",t[t.DRAW_BUFFER15=34868]="DRAW_BUFFER15",t[t.MAX_COLOR_ATTACHMENTS=36063]="MAX_COLOR_ATTACHMENTS",t[t.COLOR_ATTACHMENT1=36065]="COLOR_ATTACHMENT1",t[t.COLOR_ATTACHMENT2=36066]="COLOR_ATTACHMENT2",t[t.COLOR_ATTACHMENT3=36067]="COLOR_ATTACHMENT3",t[t.COLOR_ATTACHMENT4=36068]="COLOR_ATTACHMENT4",t[t.COLOR_ATTACHMENT5=36069]="COLOR_ATTACHMENT5",t[t.COLOR_ATTACHMENT6=36070]="COLOR_ATTACHMENT6",t[t.COLOR_ATTACHMENT7=36071]="COLOR_ATTACHMENT7",t[t.COLOR_ATTACHMENT8=36072]="COLOR_ATTACHMENT8",t[t.COLOR_ATTACHMENT9=36073]="COLOR_ATTACHMENT9",t[t.COLOR_ATTACHMENT10=36074]="COLOR_ATTACHMENT10",t[t.COLOR_ATTACHMENT11=36075]="COLOR_ATTACHMENT11",t[t.COLOR_ATTACHMENT12=36076]="COLOR_ATTACHMENT12",t[t.COLOR_ATTACHMENT13=36077]="COLOR_ATTACHMENT13",t[t.COLOR_ATTACHMENT14=36078]="COLOR_ATTACHMENT14",t[t.COLOR_ATTACHMENT15=36079]="COLOR_ATTACHMENT15",t[t.SAMPLER_3D=35679]="SAMPLER_3D",t[t.SAMPLER_2D_SHADOW=35682]="SAMPLER_2D_SHADOW",t[t.SAMPLER_2D_ARRAY=36289]="SAMPLER_2D_ARRAY",t[t.SAMPLER_2D_ARRAY_SHADOW=36292]="SAMPLER_2D_ARRAY_SHADOW",t[t.SAMPLER_CUBE_SHADOW=36293]="SAMPLER_CUBE_SHADOW",t[t.INT_SAMPLER_2D=36298]="INT_SAMPLER_2D",t[t.INT_SAMPLER_3D=36299]="INT_SAMPLER_3D",t[t.INT_SAMPLER_CUBE=36300]="INT_SAMPLER_CUBE",t[t.INT_SAMPLER_2D_ARRAY=36303]="INT_SAMPLER_2D_ARRAY",t[t.UNSIGNED_INT_SAMPLER_2D=36306]="UNSIGNED_INT_SAMPLER_2D",t[t.UNSIGNED_INT_SAMPLER_3D=36307]="UNSIGNED_INT_SAMPLER_3D",t[t.UNSIGNED_INT_SAMPLER_CUBE=36308]="UNSIGNED_INT_SAMPLER_CUBE",t[t.UNSIGNED_INT_SAMPLER_2D_ARRAY=36311]="UNSIGNED_INT_SAMPLER_2D_ARRAY",t[t.MAX_SAMPLES=36183]="MAX_SAMPLES",t[t.SAMPLER_BINDING=35097]="SAMPLER_BINDING",t[t.PIXEL_PACK_BUFFER=35051]="PIXEL_PACK_BUFFER",t[t.PIXEL_UNPACK_BUFFER=35052]="PIXEL_UNPACK_BUFFER",t[t.PIXEL_PACK_BUFFER_BINDING=35053]="PIXEL_PACK_BUFFER_BINDING",t[t.PIXEL_UNPACK_BUFFER_BINDING=35055]="PIXEL_UNPACK_BUFFER_BINDING",t[t.COPY_READ_BUFFER=36662]="COPY_READ_BUFFER",t[t.COPY_WRITE_BUFFER=36663]="COPY_WRITE_BUFFER",t[t.COPY_READ_BUFFER_BINDING=36662]="COPY_READ_BUFFER_BINDING",t[t.COPY_WRITE_BUFFER_BINDING=36663]="COPY_WRITE_BUFFER_BINDING",t[t.FLOAT_MAT2x3=35685]="FLOAT_MAT2x3",t[t.FLOAT_MAT2x4=35686]="FLOAT_MAT2x4",t[t.FLOAT_MAT3x2=35687]="FLOAT_MAT3x2",t[t.FLOAT_MAT3x4=35688]="FLOAT_MAT3x4",t[t.FLOAT_MAT4x2=35689]="FLOAT_MAT4x2",t[t.FLOAT_MAT4x3=35690]="FLOAT_MAT4x3",t[t.UNSIGNED_INT_VEC2=36294]="UNSIGNED_INT_VEC2",t[t.UNSIGNED_INT_VEC3=36295]="UNSIGNED_INT_VEC3",t[t.UNSIGNED_INT_VEC4=36296]="UNSIGNED_INT_VEC4",t[t.UNSIGNED_NORMALIZED=35863]="UNSIGNED_NORMALIZED",t[t.SIGNED_NORMALIZED=36764]="SIGNED_NORMALIZED",t[t.VERTEX_ATTRIB_ARRAY_INTEGER=35069]="VERTEX_ATTRIB_ARRAY_INTEGER",t[t.VERTEX_ATTRIB_ARRAY_DIVISOR=35070]="VERTEX_ATTRIB_ARRAY_DIVISOR",t[t.TRANSFORM_FEEDBACK_BUFFER_MODE=35967]="TRANSFORM_FEEDBACK_BUFFER_MODE",t[t.MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS=35968]="MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS",t[t.TRANSFORM_FEEDBACK_VARYINGS=35971]="TRANSFORM_FEEDBACK_VARYINGS",t[t.TRANSFORM_FEEDBACK_BUFFER_START=35972]="TRANSFORM_FEEDBACK_BUFFER_START",t[t.TRANSFORM_FEEDBACK_BUFFER_SIZE=35973]="TRANSFORM_FEEDBACK_BUFFER_SIZE",t[t.TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN=35976]="TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN",t[t.MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS=35978]="MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS",t[t.MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS=35979]="MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS",t[t.INTERLEAVED_ATTRIBS=35980]="INTERLEAVED_ATTRIBS",t[t.SEPARATE_ATTRIBS=35981]="SEPARATE_ATTRIBS",t[t.TRANSFORM_FEEDBACK_BUFFER=35982]="TRANSFORM_FEEDBACK_BUFFER",t[t.TRANSFORM_FEEDBACK_BUFFER_BINDING=35983]="TRANSFORM_FEEDBACK_BUFFER_BINDING",t[t.TRANSFORM_FEEDBACK=36386]="TRANSFORM_FEEDBACK",t[t.TRANSFORM_FEEDBACK_PAUSED=36387]="TRANSFORM_FEEDBACK_PAUSED",t[t.TRANSFORM_FEEDBACK_ACTIVE=36388]="TRANSFORM_FEEDBACK_ACTIVE",t[t.TRANSFORM_FEEDBACK_BINDING=36389]="TRANSFORM_FEEDBACK_BINDING",t[t.FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING=33296]="FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING",t[t.FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE=33297]="FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE",t[t.FRAMEBUFFER_ATTACHMENT_RED_SIZE=33298]="FRAMEBUFFER_ATTACHMENT_RED_SIZE",t[t.FRAMEBUFFER_ATTACHMENT_GREEN_SIZE=33299]="FRAMEBUFFER_ATTACHMENT_GREEN_SIZE",t[t.FRAMEBUFFER_ATTACHMENT_BLUE_SIZE=33300]="FRAMEBUFFER_ATTACHMENT_BLUE_SIZE",t[t.FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE=33301]="FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE",t[t.FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE=33302]="FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE",t[t.FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE=33303]="FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE",t[t.FRAMEBUFFER_DEFAULT=33304]="FRAMEBUFFER_DEFAULT",t[t.DEPTH24_STENCIL8=35056]="DEPTH24_STENCIL8",t[t.DRAW_FRAMEBUFFER_BINDING=36006]="DRAW_FRAMEBUFFER_BINDING",t[t.READ_FRAMEBUFFER_BINDING=36010]="READ_FRAMEBUFFER_BINDING",t[t.RENDERBUFFER_SAMPLES=36011]="RENDERBUFFER_SAMPLES",t[t.FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER=36052]="FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER",t[t.FRAMEBUFFER_INCOMPLETE_MULTISAMPLE=36182]="FRAMEBUFFER_INCOMPLETE_MULTISAMPLE",t[t.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER",t[t.UNIFORM_BUFFER_BINDING=35368]="UNIFORM_BUFFER_BINDING",t[t.UNIFORM_BUFFER_START=35369]="UNIFORM_BUFFER_START",t[t.UNIFORM_BUFFER_SIZE=35370]="UNIFORM_BUFFER_SIZE",t[t.MAX_VERTEX_UNIFORM_BLOCKS=35371]="MAX_VERTEX_UNIFORM_BLOCKS",t[t.MAX_FRAGMENT_UNIFORM_BLOCKS=35373]="MAX_FRAGMENT_UNIFORM_BLOCKS",t[t.MAX_COMBINED_UNIFORM_BLOCKS=35374]="MAX_COMBINED_UNIFORM_BLOCKS",t[t.MAX_UNIFORM_BUFFER_BINDINGS=35375]="MAX_UNIFORM_BUFFER_BINDINGS",t[t.MAX_UNIFORM_BLOCK_SIZE=35376]="MAX_UNIFORM_BLOCK_SIZE",t[t.MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS=35377]="MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS",t[t.MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS=35379]="MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS",t[t.UNIFORM_BUFFER_OFFSET_ALIGNMENT=35380]="UNIFORM_BUFFER_OFFSET_ALIGNMENT",t[t.ACTIVE_UNIFORM_BLOCKS=35382]="ACTIVE_UNIFORM_BLOCKS",t[t.UNIFORM_TYPE=35383]="UNIFORM_TYPE",t[t.UNIFORM_SIZE=35384]="UNIFORM_SIZE",t[t.UNIFORM_BLOCK_INDEX=35386]="UNIFORM_BLOCK_INDEX",t[t.UNIFORM_OFFSET=35387]="UNIFORM_OFFSET",t[t.UNIFORM_ARRAY_STRIDE=35388]="UNIFORM_ARRAY_STRIDE",t[t.UNIFORM_MATRIX_STRIDE=35389]="UNIFORM_MATRIX_STRIDE",t[t.UNIFORM_IS_ROW_MAJOR=35390]="UNIFORM_IS_ROW_MAJOR",t[t.UNIFORM_BLOCK_BINDING=35391]="UNIFORM_BLOCK_BINDING",t[t.UNIFORM_BLOCK_DATA_SIZE=35392]="UNIFORM_BLOCK_DATA_SIZE",t[t.UNIFORM_BLOCK_ACTIVE_UNIFORMS=35394]="UNIFORM_BLOCK_ACTIVE_UNIFORMS",t[t.UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES=35395]="UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES",t[t.UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER=35396]="UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER",t[t.UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER=35398]="UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER",t[t.OBJECT_TYPE=37138]="OBJECT_TYPE",t[t.SYNC_CONDITION=37139]="SYNC_CONDITION",t[t.SYNC_STATUS=37140]="SYNC_STATUS",t[t.SYNC_FLAGS=37141]="SYNC_FLAGS",t[t.SYNC_FENCE=37142]="SYNC_FENCE",t[t.SYNC_GPU_COMMANDS_COMPLETE=37143]="SYNC_GPU_COMMANDS_COMPLETE",t[t.UNSIGNALED=37144]="UNSIGNALED",t[t.SIGNALED=37145]="SIGNALED",t[t.ALREADY_SIGNALED=37146]="ALREADY_SIGNALED",t[t.TIMEOUT_EXPIRED=37147]="TIMEOUT_EXPIRED",t[t.CONDITION_SATISFIED=37148]="CONDITION_SATISFIED",t[t.WAIT_FAILED=37149]="WAIT_FAILED",t[t.SYNC_FLUSH_COMMANDS_BIT=1]="SYNC_FLUSH_COMMANDS_BIT",t[t.COLOR=6144]="COLOR",t[t.DEPTH=6145]="DEPTH",t[t.STENCIL=6146]="STENCIL",t[t.MIN=32775]="MIN",t[t.MAX=32776]="MAX",t[t.DEPTH_COMPONENT24=33190]="DEPTH_COMPONENT24",t[t.STREAM_READ=35041]="STREAM_READ",t[t.STREAM_COPY=35042]="STREAM_COPY",t[t.STATIC_READ=35045]="STATIC_READ",t[t.STATIC_COPY=35046]="STATIC_COPY",t[t.DYNAMIC_READ=35049]="DYNAMIC_READ",t[t.DYNAMIC_COPY=35050]="DYNAMIC_COPY",t[t.DEPTH_COMPONENT32F=36012]="DEPTH_COMPONENT32F",t[t.DEPTH32F_STENCIL8=36013]="DEPTH32F_STENCIL8",t[t.INVALID_INDEX=4294967295]="INVALID_INDEX",t[t.TIMEOUT_IGNORED=-1]="TIMEOUT_IGNORED",t[t.MAX_CLIENT_WAIT_TIMEOUT_WEBGL=37447]="MAX_CLIENT_WAIT_TIMEOUT_WEBGL",t[t.UNMASKED_VENDOR_WEBGL=37445]="UNMASKED_VENDOR_WEBGL",t[t.UNMASKED_RENDERER_WEBGL=37446]="UNMASKED_RENDERER_WEBGL",t[t.MAX_TEXTURE_MAX_ANISOTROPY_EXT=34047]="MAX_TEXTURE_MAX_ANISOTROPY_EXT",t[t.TEXTURE_MAX_ANISOTROPY_EXT=34046]="TEXTURE_MAX_ANISOTROPY_EXT",t[t.R16_EXT=33322]="R16_EXT",t[t.RG16_EXT=33324]="RG16_EXT",t[t.RGB16_EXT=32852]="RGB16_EXT",t[t.RGBA16_EXT=32859]="RGBA16_EXT",t[t.R16_SNORM_EXT=36760]="R16_SNORM_EXT",t[t.RG16_SNORM_EXT=36761]="RG16_SNORM_EXT",t[t.RGB16_SNORM_EXT=36762]="RGB16_SNORM_EXT",t[t.RGBA16_SNORM_EXT=36763]="RGBA16_SNORM_EXT",t[t.COMPRESSED_RGB_S3TC_DXT1_EXT=33776]="COMPRESSED_RGB_S3TC_DXT1_EXT",t[t.COMPRESSED_RGBA_S3TC_DXT1_EXT=33777]="COMPRESSED_RGBA_S3TC_DXT1_EXT",t[t.COMPRESSED_RGBA_S3TC_DXT3_EXT=33778]="COMPRESSED_RGBA_S3TC_DXT3_EXT",t[t.COMPRESSED_RGBA_S3TC_DXT5_EXT=33779]="COMPRESSED_RGBA_S3TC_DXT5_EXT",t[t.COMPRESSED_SRGB_S3TC_DXT1_EXT=35916]="COMPRESSED_SRGB_S3TC_DXT1_EXT",t[t.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT=35917]="COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT",t[t.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT=35918]="COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT",t[t.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT=35919]="COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT",t[t.COMPRESSED_RED_RGTC1_EXT=36283]="COMPRESSED_RED_RGTC1_EXT",t[t.COMPRESSED_SIGNED_RED_RGTC1_EXT=36284]="COMPRESSED_SIGNED_RED_RGTC1_EXT",t[t.COMPRESSED_RED_GREEN_RGTC2_EXT=36285]="COMPRESSED_RED_GREEN_RGTC2_EXT",t[t.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT=36286]="COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT",t[t.COMPRESSED_RGBA_BPTC_UNORM_EXT=36492]="COMPRESSED_RGBA_BPTC_UNORM_EXT",t[t.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT=36493]="COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT",t[t.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT=36494]="COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT",t[t.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT=36495]="COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT",t[t.COMPRESSED_R11_EAC=37488]="COMPRESSED_R11_EAC",t[t.COMPRESSED_SIGNED_R11_EAC=37489]="COMPRESSED_SIGNED_R11_EAC",t[t.COMPRESSED_RG11_EAC=37490]="COMPRESSED_RG11_EAC",t[t.COMPRESSED_SIGNED_RG11_EAC=37491]="COMPRESSED_SIGNED_RG11_EAC",t[t.COMPRESSED_RGB8_ETC2=37492]="COMPRESSED_RGB8_ETC2",t[t.COMPRESSED_RGBA8_ETC2_EAC=37493]="COMPRESSED_RGBA8_ETC2_EAC",t[t.COMPRESSED_SRGB8_ETC2=37494]="COMPRESSED_SRGB8_ETC2",t[t.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC=37495]="COMPRESSED_SRGB8_ALPHA8_ETC2_EAC",t[t.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2=37496]="COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2",t[t.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2=37497]="COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2",t[t.COMPRESSED_RGB_PVRTC_4BPPV1_IMG=35840]="COMPRESSED_RGB_PVRTC_4BPPV1_IMG",t[t.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG=35842]="COMPRESSED_RGBA_PVRTC_4BPPV1_IMG",t[t.COMPRESSED_RGB_PVRTC_2BPPV1_IMG=35841]="COMPRESSED_RGB_PVRTC_2BPPV1_IMG",t[t.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG=35843]="COMPRESSED_RGBA_PVRTC_2BPPV1_IMG",t[t.COMPRESSED_RGB_ETC1_WEBGL=36196]="COMPRESSED_RGB_ETC1_WEBGL",t[t.COMPRESSED_RGB_ATC_WEBGL=35986]="COMPRESSED_RGB_ATC_WEBGL",t[t.COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL=35986]="COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL",t[t.COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL=34798]="COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL",t[t.COMPRESSED_RGBA_ASTC_4x4_KHR=37808]="COMPRESSED_RGBA_ASTC_4x4_KHR",t[t.COMPRESSED_RGBA_ASTC_5x4_KHR=37809]="COMPRESSED_RGBA_ASTC_5x4_KHR",t[t.COMPRESSED_RGBA_ASTC_5x5_KHR=37810]="COMPRESSED_RGBA_ASTC_5x5_KHR",t[t.COMPRESSED_RGBA_ASTC_6x5_KHR=37811]="COMPRESSED_RGBA_ASTC_6x5_KHR",t[t.COMPRESSED_RGBA_ASTC_6x6_KHR=37812]="COMPRESSED_RGBA_ASTC_6x6_KHR",t[t.COMPRESSED_RGBA_ASTC_8x5_KHR=37813]="COMPRESSED_RGBA_ASTC_8x5_KHR",t[t.COMPRESSED_RGBA_ASTC_8x6_KHR=37814]="COMPRESSED_RGBA_ASTC_8x6_KHR",t[t.COMPRESSED_RGBA_ASTC_8x8_KHR=37815]="COMPRESSED_RGBA_ASTC_8x8_KHR",t[t.COMPRESSED_RGBA_ASTC_10x5_KHR=37816]="COMPRESSED_RGBA_ASTC_10x5_KHR",t[t.COMPRESSED_RGBA_ASTC_10x6_KHR=37817]="COMPRESSED_RGBA_ASTC_10x6_KHR",t[t.COMPRESSED_RGBA_ASTC_10x8_KHR=37818]="COMPRESSED_RGBA_ASTC_10x8_KHR",t[t.COMPRESSED_RGBA_ASTC_10x10_KHR=37819]="COMPRESSED_RGBA_ASTC_10x10_KHR",t[t.COMPRESSED_RGBA_ASTC_12x10_KHR=37820]="COMPRESSED_RGBA_ASTC_12x10_KHR",t[t.COMPRESSED_RGBA_ASTC_12x12_KHR=37821]="COMPRESSED_RGBA_ASTC_12x12_KHR",t[t.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR=37840]="COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR",t[t.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR=37841]="COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR",t[t.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR=37842]="COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR",t[t.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR=37843]="COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR",t[t.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR=37844]="COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR",t[t.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR=37845]="COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR",t[t.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR=37846]="COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR",t[t.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR=37847]="COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR",t[t.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR=37848]="COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR",t[t.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR=37849]="COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR",t[t.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR=37850]="COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR",t[t.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR=37851]="COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR",t[t.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR=37852]="COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR",t[t.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR=37853]="COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR",t[t.QUERY_COUNTER_BITS_EXT=34916]="QUERY_COUNTER_BITS_EXT",t[t.CURRENT_QUERY_EXT=34917]="CURRENT_QUERY_EXT",t[t.QUERY_RESULT_EXT=34918]="QUERY_RESULT_EXT",t[t.QUERY_RESULT_AVAILABLE_EXT=34919]="QUERY_RESULT_AVAILABLE_EXT",t[t.TIME_ELAPSED_EXT=35007]="TIME_ELAPSED_EXT",t[t.TIMESTAMP_EXT=36392]="TIMESTAMP_EXT",t[t.GPU_DISJOINT_EXT=36795]="GPU_DISJOINT_EXT",t[t.COMPLETION_STATUS_KHR=37297]="COMPLETION_STATUS_KHR",t[t.DEPTH_CLAMP_EXT=34383]="DEPTH_CLAMP_EXT",t[t.FIRST_VERTEX_CONVENTION_WEBGL=36429]="FIRST_VERTEX_CONVENTION_WEBGL",t[t.LAST_VERTEX_CONVENTION_WEBGL=36430]="LAST_VERTEX_CONVENTION_WEBGL",t[t.PROVOKING_VERTEX_WEBL=36431]="PROVOKING_VERTEX_WEBL",t[t.POLYGON_MODE_WEBGL=2880]="POLYGON_MODE_WEBGL",t[t.POLYGON_OFFSET_LINE_WEBGL=10754]="POLYGON_OFFSET_LINE_WEBGL",t[t.LINE_WEBGL=6913]="LINE_WEBGL",t[t.FILL_WEBGL=6914]="FILL_WEBGL",t[t.MAX_CLIP_DISTANCES_WEBGL=3378]="MAX_CLIP_DISTANCES_WEBGL",t[t.MAX_CULL_DISTANCES_WEBGL=33529]="MAX_CULL_DISTANCES_WEBGL",t[t.MAX_COMBINED_CLIP_AND_CULL_DISTANCES_WEBGL=33530]="MAX_COMBINED_CLIP_AND_CULL_DISTANCES_WEBGL",t[t.CLIP_DISTANCE0_WEBGL=12288]="CLIP_DISTANCE0_WEBGL",t[t.CLIP_DISTANCE1_WEBGL=12289]="CLIP_DISTANCE1_WEBGL",t[t.CLIP_DISTANCE2_WEBGL=12290]="CLIP_DISTANCE2_WEBGL",t[t.CLIP_DISTANCE3_WEBGL=12291]="CLIP_DISTANCE3_WEBGL",t[t.CLIP_DISTANCE4_WEBGL=12292]="CLIP_DISTANCE4_WEBGL",t[t.CLIP_DISTANCE5_WEBGL=12293]="CLIP_DISTANCE5_WEBGL",t[t.CLIP_DISTANCE6_WEBGL=12294]="CLIP_DISTANCE6_WEBGL",t[t.CLIP_DISTANCE7_WEBGL=12295]="CLIP_DISTANCE7_WEBGL",t[t.POLYGON_OFFSET_CLAMP_EXT=36379]="POLYGON_OFFSET_CLAMP_EXT",t[t.LOWER_LEFT_EXT=36001]="LOWER_LEFT_EXT",t[t.UPPER_LEFT_EXT=36002]="UPPER_LEFT_EXT",t[t.NEGATIVE_ONE_TO_ONE_EXT=37726]="NEGATIVE_ONE_TO_ONE_EXT",t[t.ZERO_TO_ONE_EXT=37727]="ZERO_TO_ONE_EXT",t[t.CLIP_ORIGIN_EXT=37724]="CLIP_ORIGIN_EXT",t[t.CLIP_DEPTH_MODE_EXT=37725]="CLIP_DEPTH_MODE_EXT",t[t.SRC1_COLOR_WEBGL=35065]="SRC1_COLOR_WEBGL",t[t.SRC1_ALPHA_WEBGL=34185]="SRC1_ALPHA_WEBGL",t[t.ONE_MINUS_SRC1_COLOR_WEBGL=35066]="ONE_MINUS_SRC1_COLOR_WEBGL",t[t.ONE_MINUS_SRC1_ALPHA_WEBGL=35067]="ONE_MINUS_SRC1_ALPHA_WEBGL",t[t.MAX_DUAL_SOURCE_DRAW_BUFFERS_WEBGL=35068]="MAX_DUAL_SOURCE_DRAW_BUFFERS_WEBGL",t[t.MIRROR_CLAMP_TO_EDGE_EXT=34627]="MIRROR_CLAMP_TO_EDGE_EXT"}
vendor: 8,102 bytes, line 1547
1547)(mg||(mg={}));const mM={3042:!1,32773:new Float32Array([0,0,0,0]),32777:32774,34877:32774,32969:1,32968:0,32971:1,32970:0,3106:new Float32Array([0,0,0,0]),3107:[!0,!0,!0,!0],2884:!1,2885:1029,2929:!1,2931:1,2932:513,2928:new Float32Array([0,1]),2930:!0,3024:!0,35725:null,36006:null,36007:null,34229:null,34964:null,2886:2305,33170:4352,2849:1,32823:!1,32824:0,10752:0,32926:!1,32928:!1,32938:1,32939:!1,3089:!1,3088:new Int32Array([0,0,1024,1024]),2960:!1,2961:0,2968:4294967295,36005:4294967295,2962:519,2967:0,2963:4294967295,34816:519,36003:0,36004:4294967295,2964:7680,2965:7680,2966:7680,34817:7680,34818:7680,34819:7680,2978:[0,0,1024,1024],36389:null,36662:null,36663:null,35053:null,35055:null,35723:4352,36010:null,35977:!1,3333:4,3317:4,37440:!1,37441:!1,37443:37444,3330:0,3332:0,3331:0,3314:0,32878:0,3316:0,3315:0,32877:0},Ir=(t,e,n)=>e?t.enable(n):t.disable(n),L8=(t,e,n)=>t.hint(n,e),Js=(t,e,n)=>t.pixelStorei(n,e),F8=(t,e,n)=>{const r=n===36006?36009:36008;return t.bindFramebuffer(r,e)},f1=(t,e,n)=>{const i={34964:34962,36662:36662,36663:36663,35053:35051,35055:35052}[n];t.bindBuffer(i,e)};function _E(t){return Array.isArray(t)||ArrayBuffer.isView(t)&&!(t instanceof DataView)}const Efe={3042:Ir,32773:(t,e)=>t.blendColor(...e),32777:"blendEquation",34877:"blendEquation",32969:"blendFunc",32968:"blendFunc",32971:"blendFunc",32970:"blendFunc",3106:(t,e)=>t.clearColor(...e),3107:(t,e)=>t.colorMask(...e),2884:Ir,2885:(t,e)=>t.cullFace(e),2929:Ir,2931:(t,e)=>t.clearDepth(e),2932:(t,e)=>t.depthFunc(e),2928:(t,e)=>t.depthRange(...e),2930:(t,e)=>t.depthMask(e),3024:Ir,35723:L8,35725:(t,e)=>t.useProgram(e),36007:(t,e)=>t.bindRenderbuffer(36161,e),36389:(t,e)=>{var n;return(n=t.bindTransformFeedback)==null?void 0:n.call(t,36386,e)},34229:(t,e)=>t.bindVertexArray(e),36006:F8,36010:F8,34964:f1,36662:f1,36663:f1,35053:f1,35055:f1,2886:(t,e)=>t.frontFace(e),33170:L8,2849:(t,e)=>t.lineWidth(e),32823:Ir,32824:"polygonOffset",10752:"polygonOffset",35977:Ir,32926:Ir,32928:Ir,32938:"sampleCoverage",32939:"sampleCoverage",3089:Ir,3088:(t,e)=>t.scissor(...e),2960:Ir,2961:(t,e)=>t.clearStencil(e),2968:(t,e)=>t.stencilMaskSeparate(1028,e),36005:(t,e)=>t.stencilMaskSeparate(1029,e),2962:"stencilFuncFront",2967:"stencilFuncFront",2963:"stencilFuncFront",34816:"stencilFuncBack",36003:"stencilFuncBack",36004:"stencilFuncBack",2964:"stencilOpFront",2965:"stencilOpFront",2966:"stencilOpFront",34817:"stencilOpBack",34818:"stencilOpBack",34819:"stencilOpBack",2978:(t,e)=>t.viewport(...e),34383:Ir,10754:Ir,12288:Ir,12289:Ir,12290:Ir,12291:Ir,12292:Ir,12293:Ir,12294:Ir,12295:Ir,3333:Js,3317:Js,37440:Js,37441:Js,37443:Js,3330:Js,3332:Js,3331:Js,3314:Js,32878:Js,3316:Js,3315:Js,32877:Js,framebuffer:(t,e)=>{const n=e&&"handle"in e?e.handle:e;return t.bindFramebuffer(36160,n)},blend:(t,e)=>e?t.enable(3042):t.disable(3042),blendColor:(t,e)=>t.blendColor(...e),blendEquation:(t,e)=>{const n=typeof e=="number"?[e,e]:e;t.blendEquationSeparate(...n)},blendFunc:(t,e)=>{const n=(e==null?void 0:e.length)===2?[...e,...e]:e;t.blendFuncSeparate(...n)},clearColor:(t,e)=>t.clearColor(...e),clearDepth:(t,e)=>t.clearDepth(e),clearStencil:(t,e)=>t.clearStencil(e),colorMask:(t,e)=>t.colorMask(...e),cull:(t,e)=>e?t.enable(2884):t.disable(2884),cullFace:(t,e)=>t.cullFace(e),depthTest:(t,e)=>e?t.enable(2929):t.disable(2929),depthFunc:(t,e)=>t.depthFunc(e),depthMask:(t,e)=>t.depthMask(e),depthRange:(t,e)=>t.depthRange(...e),dither:(t,e)=>e?t.enable(3024):t.disable(3024),derivativeHint:(t,e)=>{t.hint(35723,e)},frontFace:(t,e)=>t.frontFace(e),mipmapHint:(t,e)=>t.hint(33170,e),lineWidth:(t,e)=>t.lineWidth(e),polygonOffsetFill:(t,e)=>e?t.enable(32823):t.disable(32823),polygonOffset:(t,e)=>t.polygonOffset(...e),sampleCoverage:(t,e)=>t.sampleCoverage(e[0],e[1]||!1),scissorTest:(t,e)=>e?t.enable(3089):t.disable(3089),scissor:(t,e)=>t.scissor(...e),stencilTest:(t,e)=>e?t.enable(2960):t.disable(2960),stencilMask:(t,e)=>{e=_E(e)?e:[e,e];const[n,r]=e;t.stencilMaskSeparate(1028,n),t.stencilMaskSeparate(1029,r)},stencilFunc:(t,e)=>{e=_E(e)&&e.length===3?[...e,...e]:e;const[n,r,i,s,o,a]=e;t.stencilFuncSeparate(1028,n,r,i),t.stencilFuncSeparate(1029,s,o,a)},stencilOp:(t,e)=>{e=_E(e)&&e.length===3?[...e,...e]:e;const[n,r,i,s,o,a]=e;t.stencilOpSeparate(1028,n,r,i),t.stencilOpSeparate(1029,s,o,a)},viewport:(t,e)=>t.viewport(...e)};function gr(t,e,n){return e[t]!==void 0?e[t]:n[t]}const Sfe={blendEquation:(t,e,n)=>t.blendEquationSeparate(gr(32777,e,n),gr(34877,e,n)),blendFunc:(t,e,n)=>t.blendFuncSeparate(gr(32969,e,n),gr(32968,e,n),gr(32971,e,n),gr(32970,e,n)),polygonOffset:(t,e,n)=>t.polygonOffset(gr(32824,e,n),gr(10752,e,n)),sampleCoverage:(t,e,n)=>t.sampleCoverage(gr(32938,e,n),gr(32939,e,n)),stencilFuncFront:(t,e,n)=>t.stencilFuncSeparate(1028,gr(2962,e,n),gr(2967,e,n),gr(2963,e,n)),stencilFuncBack:(t,e,n)=>t.stencilFuncSeparate(1029,gr(34816,e,n),gr(36003,e,n),gr(36004,e,n)),stencilOpFront:(t,e,n)=>t.stencilOpSeparate(1028,gr(2964,e,n),gr(2965,e,n),gr(2966,e,n)),stencilOpBack:(t,e,n)=>t.stencilOpSeparate(1029,gr(34817,e,n),gr(34818,e,n),gr(34819,e,n))},U8={enable:(t,e)=>t({[e]:!0}),disable:(t,e)=>t({[e]:!1}),pixelStorei:(t,e,n)=>t({[e]:n}),hint:(t,e,n)=>t({[e]:n}),useProgram:(t,e)=>t({35725:e}),bindRenderbuffer:(t,e,n)=>t({36007:n}),bindTransformFeedback:(t,e,n)=>t({36389:n}),bindVertexArray:(t,e)=>t({34229:e}),bindFramebuffer:(t,e,n)=>{switch(e){case 36160:return t({36006:n,36010:n});case 36009:return t({36006:n});case 36008:return t({36010:n});default:return null}},bindBuffer:(t,e,n)=>{const r={34962:[34964],36662:[36662],36663:[36663],35051:[35053],35052:[35055]}[e];return r?t({[r]:n}):{valueChanged:!0}},blendColor:(t,e,n,r,i)=>t({32773:new Float32Array([e,n,r,i])}),blendEquation:(t,e)=>t({32777:e,34877:e}),blendEquationSeparate:(t,e,n)=>t({32777:e,34877:n}),blendFunc:(t,e,n)=>t({32969:e,32968:n,32971:e,32970:n}),blendFuncSeparate:(t,e,n,r,i)=>t({32969:e,32968:n,32971:r,32970:i}),clearColor:(t,e,n,r,i)=>t({3106:new Float32Array([e,n,r,i])}),clearDepth:(t,e)=>t({2931:e}),clearStencil:(t,e)=>t({2961:e}),colorMask:(t,e,n,r,i)=>t({3107:[e,n,r,i]}),cullFace:(t,e)=>t({2885:e}),depthFunc:(t,e)=>t({2932:e}),depthRange:(t,e,n)=>t({2928:new Float32Array([e,n])}),depthMask:(t,e)=>t({2930:e}),frontFace:(t,e)=>t({2886:e}),lineWidth:(t,e)=>t({2849:e}),polygonOffset:(t,e,n)=>t({32824:e,10752:n}),sampleCoverage:(t,e,n)=>t({32938:e,32939:n}),scissor:(t,e,n,r,i)=>t({3088:new Int32Array([e,n,r,i])}),stencilMask:(t,e)=>t({2968:e,36005:e}),stencilMaskSeparate:(t,e,n)=>t({[e===1028?2968:36005]:n}),stencilFunc:(t,e,n,r)=>t({2962:e,2967:n,2963:r,34816:e,36003:n,36004:r}),stencilFuncSeparate:(t,e,n,r,i)=>t({[e===1028?2962:34816]:n,[e===1028?2967:36003]:r,[e===1028?2963:36004]:i}),stencilOp:(t,e,n,r)=>t({2964:e,2965:n,2966:r,34817:e,34818:n,34819:r}),stencilOpSeparate:(t,e,n,r,i)=>t({[e===1028?2964:34817]:n,[e===1028?2965:34818]:r,[e===1028?2966:34819]:i}),viewport:(t,e,n,r,i)=>t({2978:[e,n,r,i]})},hl=(t,e)=>t.isEnabled(e),z8={3042:hl,2884:hl,2929:hl,3024:hl,32823:hl,32926:hl,32928:hl,3089:hl,2960:hl,35977:hl},Tfe=new Set([34016,36388,36387,35983,35368,34965,35739,35738,3074,34853,34854,34855,34856,34857,34858,34859,34860,34861,34862,34863,34864,34865,34866,34867,34868,35097,32873,35869,32874,34068]);function km(t,e){if(Pfe(e))return;const n={};for(const i in e){const s=Number(i),o=Efe[i];o&&(typeof o=="string"?n[o]=!0:o(t,e[i],s))}const r=t.state&&t.state.cache;if(r)for(const i in n){const s=Sfe[i];s(t,e,r)}}function zH(t,e=mM){if(typeof e=="number"){const i=e,s=z8[i];return s?s(t,i):t.getParameter(i)}const n=Array.isArray(e)?e:Object.keys(e),r={};for(const i of n){const s=z8[i];r[i]=s?s(t,Number(i)):t.getParameter(Number(i))}return r}function Cfe(t){km(t,mM)}function Pfe(t){for(const e in t)return!1;return!0}function Ife(t,e){if(t===e)return!0;const n=Array.isArray(t)||ArrayBuffer.isView(t),r=Array.isArray(e)||ArrayBuffer.isView(e);if(n&&r&&t.length===e.length){for(let i=0;i<t.length;++i)if(t[i]!==e[i])return!1;return!0}return!1}class Wh{constructor(e,n){re(this,"gl");re(this,"program",null);re(this,"stateStack",[]);re(this,"enable",!0);
1547re(this,"cache",null);re(this,"log");re(this,"initialized",!1);this.gl=e,this.log=(n==null?void 0:n.log)||(()=>{}),this._updateCache=this._updateCache.bind(this),Object.seal(this)}static get(e){return e.state}push(e={}){this.stateStack.push({})}pop(){const e=this.stateStack[this.stateStack.length-1];km(this.gl,e),this.stateStack.pop()}trackState(e,n){if(this.cache=n.copyState?zH(e):Object.assign({},mM),this.initialized)throw new Error("WebGLStateTracker");this.initialized=!0,this.gl.state=this,Mfe(e);for(const r in U8){const i=U8[r];Ofe(e,r,i)}j8(e,"getParameter"),j8(e,"isEnabled")}_updateCache(e){let n=!1,r;const i=this.stateStack.length>0?this.stateStack[this.stateStack.length-1]:null;for(const s in e){const o=e[s],a=this.cache[s];Ife(o,a)||(n=!0,r=a,i&&!(s in i)&&(i[s]=a),this.cache[s]=o)}return{valueChanged:n,oldValue:r}}}function j8(t,e){const n=t[e].bind(t);t[e]=function(i){if(i===void 0||Tfe.has(i))return n(i);const s=Wh.get(t);return i in s.cache||(s.cache[i]=n(i)),s.enable?s.cache[i]:n(i)},Object.defineProperty(t[e],"name",{value:`${e}-from-cache`,configurable:!1})}function Ofe(t,e,n){if(!t[e])return;const r=t[e].bind(t);t[e]=function(...s){const o=Wh.get(t),{valueChanged:a,oldValue:l}=n(o._updateCache,...s);return a&&r(...s),l},Object.defineProperty(t[e],"name",{value:`${e}-to-cache`,configurable:!1})}function Mfe(t){const e=t.useProgram.bind(t);t.useProgram=function(r){const i=Wh.get(t);i.program!==r&&(e(r),i.program=r)}}function Rfe(t,e,n){let r="";const i={preserveDrawingBuffer:!0,...n};let s=null;if(s||(s=t.getContext("webgl2",i)),i.failIfMajorPerformanceCaveat&&(r||(r="Only software GPU is available. Set `failIfMajorPerformanceCaveat: false` to allow.")),!s&&!n.failIfMajorPerformanceCaveat&&(i.failIfMajorPerformanceCaveat=!1,s=t.getContext("webgl2",i),s.luma||(s.luma={}),s.luma.softwareRenderer=!0),s||(s=t.getContext("webgl",{}),s&&(s=null,r||(r="Your browser only supports WebGL1"))),!s)throw r||(r="Your browser does not support WebGL"),new Error(`Failed to create WebGL context: ${r}`);const{onContextLost:o,onContextRestored:a}=e;return t.addEventListener("webglcontextlost",l=>o(l),!1),t.addEventListener("webglcontextrestored",l=>a(l),!1),s.luma||(s.luma={}),s}function nm(t,e,n){return n[e]===void 0&&(n[e]=t.getExtension(e)||null),n[e]}function kfe(t,e){const n=t.getParameter(7936),r=t.getParameter(7937);nm(t,"WEBGL_debug_renderer_info",e);const i=e.WEBGL_debug_renderer_info,s=t.getParameter(i?i.UNMASKED_VENDOR_WEBGL:7936),o=t.getParameter(i?i.UNMASKED_RENDERER_WEBGL:7937),a=s||n,l=o||r,c=t.getParameter(7938),u=jH(a,l),h=Nfe(a,l),d=Dfe(a,l);return{type:"webgl",gpu:u,gpuType:d,gpuBackend:h,vendor:a,renderer:l,version:c,shadingLanguage:"glsl",shadingLanguageVersion:300}}function jH(t,e){return/NVIDIA/i.exec(t)||/NVIDIA/i.exec(e)?"nvidia":/INTEL/i.exec(t)||/INTEL/i.exec(e)?"intel":/Apple/i.exec(t)||/Apple/i.exec(e)?"apple":/AMD/i.exec(t)||/AMD/i.exec(e)||/ATI/i.exec(t)||/ATI/i.exec(e)?"amd":/SwiftShader/i.exec(t)||/SwiftShader/i.exec(e)?"software":"unknown"}function Nfe(t,e){return/Metal/i.exec(t)||/Metal/i.exec(e)?"metal":/ANGLE/i.exec(t)||/ANGLE/i.exec(e)?"opengl":"unknown"}function Dfe(t,e){if(/SwiftShader/i.exec(t)||/SwiftShader/i.exec(e))return"cpu";switch(jH(t,e)){case"intel":return"integrated";case"software":return"cpu";case"unknown":return"unknown";default:return"discrete"}}function VH(t){switch(t){case"uint8":return 5121;case"sint8":return 5120;case"unorm8":return 5121;case"snorm8":return 5120;case"uint16":return 5123;case"sint16":return 5122;case"unorm16":return 5123;case"snorm16":return 5122;case"uint32":return 5125;case"sint32":return 5124;case"float16":return 5131;case"float32":return 5126}throw new Error(String(t))}const L1="WEBGL_compressed_texture_s3tc",F1="WEBGL_compressed_texture_s3tc_srgb",vg="EXT_texture_compression_rgtc",yg="EXT_texture_compression_bptc",Bfe="WEBGL_compressed_texture_etc",Lfe="WEBGL_compressed_texture_astc",Ffe="WEBGL_compressed_texture_etc1",Ufe="WEBGL_compressed_texture_pvrtc",zfe="WEBGL_compressed_texture_atc",V8="EXT_texture_norm16",W8="EXT_render_snorm",jfe="EXT_color_buffer_float",vM={"float32-renderable-webgl":["EXT_color_buffer_float"],"float16-renderable-webgl":["EXT_color_buffer_half_float"],"rgb9e5ufloat-renderable-webgl":["WEBGL_render_shared_exponent"],"snorm8-renderable-webgl":[W8],"norm16-renderable-webgl":[V8],"snorm16-renderable-webgl":[V8,W8],"float32-filterable":["OES_texture_float_linear"],"float16-filterable-webgl":["OES_texture_half_float_linear"],"texture-filterable-anisotropic-webgl":["EXT_texture_filter_anisotropic"],"texture-blend-float-webgl":["EXT_float_blend"],"texture-compression-bc":[L1,F1,vg,yg],"texture-compression-bc5-webgl":[vg],"texture-compression-bc7-webgl":[yg],"texture-compression-etc2":[Bfe],"texture-compression-astc":[Lfe],"texture-compression-etc1-webgl":[Ffe],"texture-compression-pvrtc-webgl":[Ufe],"texture-compression-atc-webgl":[zfe]};function Vfe(t){return t in vM}function Wfe(t,e,n){return(vM[e]||[]).every(i=>nm(t,i,n))}const yM={r8unorm:{gl:33321,rb:!0},r8snorm:{gl:36756},r8uint:{gl:33330,rb:!0},r8sint:{gl:33329,rb:!0},rg8unorm:{gl:33323,rb:!0},rg8snorm:{gl:36757},rg8uint:{gl:33336,rb:!0},rg8sint:{gl:33335,rb:!0},r16uint:{gl:33332,rb:!0},r16sint:{gl:33331,rb:!0},r16float:{gl:33325,rb:!0},"r16unorm-webgl":{gl:33322,rb:!0},"r16snorm-webgl":{gl:36760},"rgba4unorm-webgl":{gl:32854,rb:!0},"rgb565unorm-webgl":{gl:36194,rb:!0},"rgb5a1unorm-webgl":{gl:32855,rb:!0},"rgb8unorm-webgl":{gl:32849},"rgb8snorm-webgl":{gl:36758},rgba8unorm:{gl:32856},"rgba8unorm-srgb":{gl:35907},rgba8snorm:{gl:36759},rgba8uint:{gl:36220},rgba8sint:{gl:36238},bgra8unorm:{},"bgra8unorm-srgb":{},rg16uint:{gl:33338},rg16sint:{gl:33337},rg16float:{gl:33327,rb:!0},"rg16unorm-webgl":{gl:33324},"rg16snorm-webgl":{gl:36761},r32uint:{gl:33334,rb:!0},r32sint:{gl:33333,rb:!0},r32float:{gl:33326},rgb9e5ufloat:{gl:35901},rg11b10ufloat:{gl:35898,rb:!0}
1547,rgb10a2unorm:{gl:32857,rb:!0},"rgb10a2uint-webgl":{gl:36975,rb:!0},"rgb16unorm-webgl":{gl:32852},"rgb16snorm-webgl":{gl:36762},rg32uint:{gl:33340,rb:!0},rg32sint:{gl:33339,rb:!0},rg32float:{gl:33328,rb:!0},rgba16uint:{gl:36214,rb:!0},rgba16sint:{gl:36232,rb:!0},rgba16float:{gl:34842},"rgba16unorm-webgl":{gl:32859,rb:!0},"rgba16snorm-webgl":{gl:36763},"rgb32float-webgl":{gl:34837,x:jfe,dataFormat:6407,types:[5126]},rgba32uint:{gl:36208,rb:!0},rgba32sint:{gl:36226,rb:!0},rgba32float:{gl:34836,rb:!0},stencil8:{gl:36168,rb:!0},depth16unorm:{gl:33189,dataFormat:6402,types:[5123],rb:!0},depth24plus:{gl:33190,dataFormat:6402,types:[5125]},depth32float:{gl:36012,dataFormat:6402,types:[5126],rb:!0},"depth24plus-stencil8":{gl:35056,rb:!0,depthTexture:!0,dataFormat:34041,types:[34042]},"depth32float-stencil8":{gl:36013,dataFormat:34041,types:[36269],rb:!0},"bc1-rgb-unorm-webgl":{gl:33776,x:L1},"bc1-rgb-unorm-srgb-webgl":{gl:35916,x:F1},"bc1-rgba-unorm":{gl:33777,x:L1},"bc1-rgba-unorm-srgb":{gl:35916,x:F1},"bc2-rgba-unorm":{gl:33778,x:L1},"bc2-rgba-unorm-srgb":{gl:35918,x:F1},"bc3-rgba-unorm":{gl:33779,x:L1},"bc3-rgba-unorm-srgb":{gl:35919,x:F1},"bc4-r-unorm":{gl:36283,x:vg},"bc4-r-snorm":{gl:36284,x:vg},"bc5-rg-unorm":{gl:36285,x:vg},"bc5-rg-snorm":{gl:36286,x:vg},"bc6h-rgb-ufloat":{gl:36495,x:yg},"bc6h-rgb-float":{gl:36494,x:yg},"bc7-rgba-unorm":{gl:36492,x:yg},"bc7-rgba-unorm-srgb":{gl:36493,x:yg},"etc2-rgb8unorm":{gl:37492},"etc2-rgb8unorm-srgb":{gl:37494},"etc2-rgb8a1unorm":{gl:37496},"etc2-rgb8a1unorm-srgb":{gl:37497},"etc2-rgba8unorm":{gl:37493},"etc2-rgba8unorm-srgb":{gl:37495},"eac-r11unorm":{gl:37488},"eac-r11snorm":{gl:37489},"eac-rg11unorm":{gl:37490},"eac-rg11snorm":{gl:37491},"astc-4x4-unorm":{gl:37808},"astc-4x4-unorm-srgb":{gl:37840},"astc-5x4-unorm":{gl:37809},"astc-5x4-unorm-srgb":{gl:37841},"astc-5x5-unorm":{gl:37810},"astc-5x5-unorm-srgb":{gl:37842},"astc-6x5-unorm":{gl:37811},"astc-6x5-unorm-srgb":{gl:37843},"astc-6x6-unorm":{gl:37812},"astc-6x6-unorm-srgb":{gl:37844},"astc-8x5-unorm":{gl:37813},"astc-8x5-unorm-srgb":{gl:37845},"astc-8x6-unorm":{gl:37814},"astc-8x6-unorm-srgb":{gl:37846},"astc-8x8-unorm":{gl:37815},"astc-8x8-unorm-srgb":{gl:37847},"astc-10x5-unorm":{gl:37819},"astc-10x5-unorm-srgb":{gl:37851},"astc-10x6-unorm":{gl:37817},"astc-10x6-unorm-srgb":{gl:37849},"astc-10x8-unorm":{gl:37818},"astc-10x8-unorm-srgb":{gl:37850},"astc-10x10-unorm":{gl:37819},"astc-10x10-unorm-srgb":{gl:37851},"astc-12x10-unorm":{gl:37820},"astc-12x10-unorm-srgb":{gl:37852},"astc-12x12-unorm":{gl:37821},"astc-12x12-unorm-srgb":{gl:37853},"pvrtc-rgb4unorm-webgl":{gl:35840},"pvrtc-rgba4unorm-webgl":{gl:35842},"pvrtc-rbg2unorm-webgl":{gl:35841},"pvrtc-rgba2unorm-webgl":{gl:35843},"etc1-rbg-unorm-webgl":{gl:36196},"atc-rgb-unorm-webgl":{gl:35986},"atc-rgba-unorm-webgl":{gl:35986},"atc-rgbai-unorm-webgl":{gl:34798}};function $fe(t,e,n){let r=e.create;const i=yM[e.format];return(i==null?void 0:i.gl)===void 0&&(r=!1),i!=null&&i.x&&(r=r&&!!nm(t,i.x,n)),{format:e.format,create:r&&e.create,render:r&&e.render,filter:r&&e.filter,blend:r&&e.blend,store:r&&e.store}}function WH(t){var i;const e=yM[t],n=Qfe(t),r=eM(t);return{internalFormat:n,format:(e==null?void 0:e.dataFormat)||qfe(r.channels,r.integer,r.normalized,n),type:r.dataType?VH(r.dataType):((i=e==null?void 0:e.types)==null?void 0:i[0])||5121,compressed:r.compressed||!1}}function Hfe(t){switch(eM(t).attachment){case"depth":return 36096;case"stencil":return 36128;case"depth-stencil":return 33306;default:throw new Error(`Not a depth stencil format: ${t}`)}}function qfe(t,e,n,r){if(r===6408||r===6407)return r;switch(t){case"r":return e&&!n?36244:6403;case"rg":return e&&!n?33320:33319;case"rgb":return e&&!n?36248:6407;case"rgba":return e&&!n?36249:6408;case"bgra":throw new Error("bgra pixels not supported by WebGL");default:return 6408}}function Qfe(t){const e=yM[t],n=e==null?void 0:e.gl;if(n===void 0)throw new Error(`Unsupported texture format ${t}`);return n}const $8={"depth-clip-control":"EXT_depth_clamp","timer-query-webgl":"EXT_disjoint_timer_query_webgl2","compilation-status-async-webgl":"KHR_parallel_shader_compile","polygon-mode-webgl":"WEBGL_polygon_mode","provoking-vertex-webgl":"WEBGL_provoking_vertex","shader-clip-cull-distance-webgl":"WEBGL_clip_cull_distance","shader-noperspective-interpolation-webgl":"NV_shader_noperspective_interpolation","shader-conservative-depth-webgl":"EXT_conservative_depth"};class Xfe extends qie{constructor(n,r,i){super([],i);re(this,"gl");re(this,"extensions");re(this,"testedFeatures",new Set);this.gl=n,this.extensions=r,nm(n,"EXT_color_buffer_float",r)}*[Symbol.iterator](){const n=this.getFeatures();for(const r of n)this.has(r)&&(yield r);return[]}has(n){var r;return(r=this.disabledFeatures)!=null&&r[n]?!1:(this.testedFeatures.has(n)||(this.testedFeatures.add(n),Vfe(n)&&Wfe(this.gl,n,this.extensions)&&this.features.add(n),this.getWebGLFeature(n)&&this.features.add(n)),this.features.has(n))}initializeFeatures(){const n=this.getFeatures().filter(r=>r!=="polygon-mode-webgl");for(const r of n)this.has(r)}getFeatures(){return[...Object.keys($8),...Object.keys(vM)]}getWebGLFeature(n){const r=$8[n];return typeof r=="string"?!!nm(this.gl,r,this.extensions):!!r}}class Yfe extends Hie{constructor(n){super();re(this,"gl");re(this,"limits",{});this.gl=n}get maxTextureDimension1D(){return 0}get maxTextureDimension2D(){return this.getParameter(3379)}get maxTextureDimension3D(){return this.getParameter(32883)}get maxTextureArrayLayers(){return this.getParameter(35071)}get maxBindGroups(){return 0}get maxDynamicUniformBuffersPerPipelineLayout(){return 0}get maxDynamicStorageBuffersPerPipelineLayout(){return 0}get maxSampledTexturesPerShaderStage(){return this.getParameter(35660)}get maxSamplersPerShaderStage(){return this.getParameter(35661)}get maxStorageBuffersPerShaderStage(){return 0}get maxStorageTexturesPerShaderStage(){return 0}get maxUniformBuffersPerShaderStage(){return this.getParameter(35375)}get maxUniformBufferBindingSize(){return this.getParameter(35376)}get maxStorageBufferBindingSize(){return 0}get minUniformBufferOffsetAlignment(){return this.getParameter(35380)}get minStorageBufferOffsetAlignment(){return 0}get maxVertexBuffers(){return 16}get maxVertexAttributes(){return this.getParameter(34921)}get maxVertexBufferArrayStride(){return 2048}get maxInterStageShaderComponents(){return this.getParameter(35659)}get maxComputeWorkgroupStorageSize(){return 0}get maxComputeInvocationsPerWorkgroup(){return 0}get maxComputeWorkgroupSizeX(){return 0}get maxComputeWorkgroupSizeY(){return 0}get maxComputeWorkgroupSizeZ(){return 0}get maxComputeWorkgroupsPerDimension(){return 0}getParameter(n){return this.limits[n]===void 0&&(this.limits[n]=this.gl.getParameter(n)),this.limits[n]||0}}class iv extends H_{constructor(n,r){super(n,r);re(this,"device");re(this,"gl");re(this,"handle");re(this,"colorAttachments",[]);re(this,"depthStencilAttachment",null);const i=r.handle===null;this.device=n,this.gl=n.gl,this.handle=this.props.handle||i?this.props.handle:this.gl.createFramebuffer(),i||(n.setSpectorMetadata(this.handle,{id:this.props.id,props:this.props}),this.autoCreateAttachmentTextures(),this.updateAttachments())}destroy(){super.destroy(),!this.destroyed&&this.handle!==null&&this.gl.deleteFramebuffer(this.handle)}updateAttachments(){const n=this.gl.bindFramebuffer(36160,this.handle);for(let r=0;r<this.colorAttachments.length;++r){const i=this.colorAttachments[r];if(i){const s=36064+r;this._attachTextureView(s,i)}}if(this.depthStencilAttachment){const r=Hfe(this.depthStencilAttachment.props.format);this._attachTextureView(r,this.depthStencilAttachment)}if(this.device.props.debug){const r=this.gl.checkFramebufferStatus(36160);if(r!==36053)throw new Error(`Framebuffer ${Gfe(r)}`)}this.gl.bindFramebuffer(36160,n)}_attachTextureView(n,r){const{gl:i}=this.device,{texture:s}=r,o=r.props.baseMipLevel,a=r.props.baseArrayLayer;switch(i.bindTexture(s.glTarget,s.handle),s.glTarget){case 35866:case 32879:i.framebufferTextureLayer(36160,n,s.handle,o,a);break;case 34067:const l=Kfe(a);i.framebufferTexture2D(36160,n,l,s.handle,o);break;case 3553:i.framebufferTexture2D(36160,n,3553,s.handle,o);break;default:throw new Error("Illegal texture type")}i.bindTexture(s.glTarget,null)}}function Kfe(t){return t<34069?t+34069:t}function Gfe(t){switch(t){case 36053:return"success";case 36054:return"Mismatched attachments";case 36055:return"No attachments";case 36057:return"Height/width mismatch";case 36061:return"Unsupported or split attachments";case 36182:return"Samples mismatch";default:return`${t}`}}class Zfe extends rP{constructor(n,r){super(r);re(this,"device");re(this,"format","rgba8unorm");re(this,"depthStencilFormat","depth24plus");re(this,"presentationSize");re(this,"_framebuffer",null);this.device=n,this.presentationSize=[-1,-1],this._setAutoCreatedCanvasId(`${this.device.id}-canvas`),this.update()}get[Symbol.toStringTag](){return"WebGLCanvasContext"}getCurrentFramebuffer(){return this.update(),this._framebuffer=this._framebuffer||new iv(this.device,{handle:null}),this._framebuffer}update(){const n=this.getPixelSize();(n[0]!==this.presentationSize[0]||n[1]!==this.presentationSize[1])&&(this.presentationSize=n,this.resize())}resize(n){if(this.device.gl&&this.canvas){const r=this.getDevicePixelRatio(n==null?void 0:n.useDevicePixels);this.setDevicePixelRatio(r,n);return}}commit(){}}async function $H(t,e){const n=document.getElementsByTagName("head")[0];if(!n)throw new Error("loadScript");const r=document.createElement("script");return r.setAttribute("type","text/javascript"),r.setAttribute("src",t),new Promise((i,s)=>{r.onload=i,r.onerror=o=>s(new Error(`Unable to load script '${t}': ${o}`)),n.appendChild(r)})}const Jfe=1;let jn=null,H8=!1;const bM={debugSpectorJS:ut.get("debug-spectorjs"),debugSpectorJSUrl:"https://cdn.jsdelivr.net/npm/[email protected]/dist/spector.bundle.js",gl:void 0};async function ehe(t){if(!globalThis.SPECTOR)try{await $H(t.debugSpectorJSUrl||bM.debugSpectorJSUrl)}catch(e){ut.warn(String(e))}}function the(t){var e;if(t={...bM,...t},!t.debugSpectorJS)return null;if(!jn&&globalThis.SPECTOR&&!((e=globalThis.luma)!=null&&e.spector)){ut.probe(Jfe,"SPECTOR foun
1547d and initialized. Start with `luma.spector.displayUI()`")();const{Spector:n}=globalThis.SPECTOR;jn=new n,globalThis.luma&&(globalThis.luma.spector=jn)}if(!jn)return null;if(H8||(H8=!0,jn.spyCanvases(),jn==null||jn.onCaptureStarted.add(n=>ut.info("Spector capture started:",n)()),jn==null||jn.onCapture.add(n=>{ut.info("Spector capture complete:",n)(),jn==null||jn.getResultUI(),jn==null||jn.resultView.display(),jn==null||jn.resultView.addCapture(n)})),t.gl){const n=t.gl,r=n.device;jn==null||jn.startCapture(t.gl,500),n.device=r,new Promise(i=>setTimeout(i,2e3)).then(i=>{ut.info("Spector capture stopped after 2 seconds")(),jn==null||jn.stopCapture()})}return jn}const nhe="https://unpkg.com/[email protected]/index.js";function HH(t){return t.luma=t.luma||{},t.luma}async function rhe(){ud()&&!globalThis.WebGLDebugUtils&&(globalThis.global=globalThis.global||globalThis,globalThis.global.module={},await $H(nhe))}function ihe(t,e={}){return e.debugWebGL||e.traceWebGL?ohe(t,e):she(t)}function she(t){const e=HH(t);return e.realContext?e.realContext:t}function ohe(t,e){if(!globalThis.WebGLDebugUtils)return ut.warn("webgl-debug not loaded")(),t;const n=HH(t);if(n.debugContext)return n.debugContext;globalThis.WebGLDebugUtils.init({...mg,...t});const r=globalThis.WebGLDebugUtils.makeDebugContext(t,ahe.bind(null,e),lhe.bind(null,e));for(const o in mg)!(o in r)&&typeof mg[o]=="number"&&(r[o]=mg[o]);class i{}Object.setPrototypeOf(r,Object.getPrototypeOf(t)),Object.setPrototypeOf(i,r);const s=Object.create(i);return n.realContext=t,n.debugContext=s,s.debug=!0,s}function q8(t,e){e=Array.from(e).map(r=>r===void 0?"undefined":r);let n=globalThis.WebGLDebugUtils.glFunctionArgsToString(t,e);return n=`${n.slice(0,100)}${n.length>100?"...":""}`,`gl.${t}(${n})`}function ahe(t,e,n,r){r=Array.from(r).map(a=>a===void 0?"undefined":a);const i=globalThis.WebGLDebugUtils.glEnumToString(e),s=globalThis.WebGLDebugUtils.glFunctionArgsToString(n,r),o=`${i} in gl.${n}(${s})`;ut.error(o)();debugger}function lhe(t,e,n){let r="";ut.level>=1&&(r=q8(e,n),t.traceWebGL&&ut.log(1,r)());for(const i of n)if(i===void 0){r=r||q8(e,n);debugger}}const wE={};function che(t="id"){wE[t]=wE[t]||1;const e=wE[t]++;return`${t}-${e}`}class sv extends lr{constructor(n,r={}){super(n,r);re(this,"device");re(this,"gl");re(this,"handle");re(this,"glTarget");re(this,"glUsage");re(this,"glIndexType",5123);re(this,"byteLength");re(this,"bytesUsed");this.device=n,this.gl=this.device.gl;const i=typeof r=="object"?r.handle:void 0;this.handle=i||this.gl.createBuffer(),n.setSpectorMetadata(this.handle,{...this.props,data:typeof this.props.data}),this.glTarget=uhe(this.props.usage),this.glUsage=fhe(this.props.usage),this.glIndexType=this.props.indexType==="uint32"?5125:5123,r.data?this._initWithData(r.data,r.byteOffset,r.byteLength):this._initWithByteLength(r.byteLength||0)}_initWithData(n,r=0,i=n.byteLength+r){const s=this.glTarget;this.gl.bindBuffer(s,this.handle),this.gl.bufferData(s,i,this.glUsage),this.gl.bufferSubData(s,r,n),this.gl.bindBuffer(s,null),this.bytesUsed=i,this.byteLength=i,this._setDebugData(n,r,i),this.trackAllocatedMemory(i)}_initWithByteLength(n){let r=n;n===0&&(r=new Float32Array(0));const i=this.glTarget;return this.gl.bindBuffer(i,this.handle),this.gl.bufferData(i,r,this.glUsage),this.gl.bindBuffer(i,null),this.bytesUsed=n,this.byteLength=n,this._setDebugData(null,0,n),this.trackAllocatedMemory(n),this}destroy(){!this.destroyed&&this.handle&&(this.removeStats(),this.trackDeallocatedMemory(),this.gl.deleteBuffer(this.handle),this.destroyed=!0,this.handle=null)}write(n,r=0){this.gl.bindBuffer(36663,this.handle),this.gl.bufferSubData(36663,r,n),this.gl.bindBuffer(36663,null),this._setDebugData(n,r,n.byteLength)}async readAsync(n=0,r){return this.readSyncWebGL(n,r)}readSyncWebGL(n=0,r){r=r??this.byteLength-n;const i=new Uint8Array(r),s=0;return this.gl.bindBuffer(36662,this.handle),this.gl.getBufferSubData(36662,n,i,s,r),this.gl.bindBuffer(36662,null),this._setDebugData(i,n,r),i}}function uhe(t){return t&lr.INDEX?34963:t&lr.VERTEX?34962:t&lr.UNIFORM?35345:34962}function fhe(t){return t&lr.INDEX||t&lr.VERTEX?35044:t&lr.UNIFORM?35048:35044}function hhe(t){const e=t.split(/\r?\n/),n=[];for(const r of e){if(r.length<=1)continue;const i=r.split(":");if(i.length===2){const[h,d]=i;n.push({message:d.trim(),type:Q8(h),lineNum:0,linePos:0});continue}const[s,o,a,...l]=i;let c=parseInt(a,10);isNaN(c)&&(c=0);let u=parseInt(o,10);isNaN(u)&&(u=0),n.push({message:l.join(":").trim(),type:Q8(s),lineNum:c,linePos:u})}return n}function Q8(t){const e=["warning","error","info"],n=t.toLowerCase();return e.includes(n)?n:"info"}class dhe extends W_{constructor(n,r){super(n,r);re(this,"device");re(this,"handle");switch(this.device=n,this.props.stage){case"vertex":this.handle=this.props.handle||this.device.gl.createShader(35633);break;case"fragment":this.handle=this.props.handle||this.device.gl.createShader(35632);break;default:throw new Error(this.props.stage)}this._compile(this.source)}destroy(){this.handle&&(this.removeStats(),this.device.gl.deleteShader(this.handle),this.destroyed=!0)}get asyncCompilationStatus(){return this._waitForCompilationComplete().then(()=>this.compilationStatus)}async getCompilationInfo(){return await this._waitForCompilationComplete(),this.getCompilationInfoSync()}getCompilationInfoSync(){const n=this.device.gl.getShaderInfoLog(this.handle);return n?hhe(n):[]}getTranslatedSource(){const r=this.device.getExtension("WEBGL_debug_shaders").WEBGL_debug_shaders;return(r==null?void 0:r.getTranslatedShaderSource(this.handle))||null}async _compile(n){n=n.startsWith("#version ")?n:`#version 300 es
1548${n}`;const{gl:r}=this.device;if(r.shaderSource(this.handle,n),r.compileShader(this.handle),!this.device.props.debug){this.compilationStatus="pending";return}if(!this.device.features.has("compilation-status-async-webgl")){if(this._getCompilationStatus(),this.debugShader(),this.compilationStatus==="error")throw new Error(`GLSL compilation errors in ${this.props.stage} shader ${this.props.id}`);return}ut.once(1,"Shader compilation is asynchronous")(),await this._waitForCompilationComplete(),ut.info(2,`Shader ${this.id} - async compilation complete: ${this.compilationStatus}`)(),this._getCompilationStatus(),this.debugShader()}async _waitForCompilationComplete(){const n=async s=>await new Promise(o=>setTimeout(o,s));if(!this.device.features.has("compilation-status-async-webgl")){await n(10);return}const{gl:i}=this.device;for(;;){if(i.getShaderParameter(this.handle,37297))return;await n(10)}}_getCompilationStatus(){this.compilationStatus=this.device.gl.getShaderParameter(this.handle,35713)?"success":"error"}}function phe(t,e,n,r){if(yhe(e))return r(t);const i=t;i.pushState();try{return ghe(t,e),km(i.gl,n),r(t)}finally{i.popState()}}function ghe(t,e){const n=t,{gl:r}=n;if(e.cullMode)switch(e.cullMode){case"none":r.disable(2884);break;case"front":r.enable(2884),r.cullFace(1028);break;case"back":r.enable(2884),r.cullFace(1029);break}if(e.frontFace&&r.frontFace($h("frontFace",e.frontFace,{ccw:2305,cw:2304})),e.unclippedDepth&&t.features.has("depth-clip-control")&&r.enable(34383),e.depthBias!==void 0&&(r.enable(32823),r.polygonOffset(e.depthBias,e.depthBiasSlopeScale||0)),e.provokingVertex&&t.features.has("provoking-vertex-webgl")){const s=n.getExtension("WEBGL_provoking_vertex").WEBGL_provoking_vertex,o=$h("provokingVertex",e.provokingVertex,{first:36429,last:36430});s==null||s.provokingVertexWEBGL(o)}if((e.polygonMode||e.polygonOffsetLine)&&t.features.has("polygon-mode-webgl")){if(e.polygonMode){const s=n.getExtension("WEBGL_polygon_mode").WEBGL_polygon_mode,o=$h("polygonMode",e.polygonMode,{fill:6914,line:6913});s==null||s.polygonModeWEBGL(1028,o),s==null||s.polygonModeWEBGL(1029,o)}e.polygonOffsetLine&&r.enable(10754)}
vendor: 5,204 bytes, line 1548
1548if(t.features.has("shader-clip-cull-distance-webgl")&&(e.clipDistance0&&r.enable(12288),e.clipDistance1&&r.enable(12289),e.clipDistance2&&r.enable(12290),e.clipDistance3&&r.enable(12291),e.clipDistance4&&r.enable(12292),e.clipDistance5&&r.enable(12293),e.clipDistance6&&r.enable(12294),e.clipDistance7&&r.enable(12295)),e.depthWriteEnabled!==void 0&&r.depthMask(vhe("depthWriteEnabled",e.depthWriteEnabled)),e.depthCompare&&(e.depthCompare!=="always"?r.enable(2929):r.disable(2929),r.depthFunc(OP("depthCompare",e.depthCompare))),e.stencilWriteMask){const i=e.stencilWriteMask;r.stencilMaskSeparate(1028,i),r.stencilMaskSeparate(1029,i)}if(e.stencilReadMask&&ut.warn("stencilReadMask not supported under WebGL"),e.stencilCompare){const i=e.stencilReadMask||4294967295,s=OP("depthCompare",e.stencilCompare);e.stencilCompare!=="always"?r.enable(2960):r.disable(2960),r.stencilFuncSeparate(1028,s,0,i),r.stencilFuncSeparate(1029,s,0,i)}if(e.stencilPassOperation&&e.stencilFailOperation&&e.stencilDepthFailOperation){const i=xE("stencilPassOperation",e.stencilPassOperation),s=xE("stencilFailOperation",e.stencilFailOperation),o=xE("stencilDepthFailOperation",e.stencilDepthFailOperation);r.stencilOpSeparate(1028,s,o,i),r.stencilOpSeparate(1029,s,o,i)}switch(e.blend){case!0:r.enable(3042);break;case!1:r.disable(3042);break}if(e.blendColorOperation||e.blendAlphaOperation){const i=X8("blendColorOperation",e.blendColorOperation||"add"),s=X8("blendAlphaOperation",e.blendAlphaOperation||"add");r.blendEquationSeparate(i,s);const o=vb("blendColorSrcFactor",e.blendColorSrcFactor||"one"),a=vb("blendColorDstFactor",e.blendColorDstFactor||"zero"),l=vb("blendAlphaSrcFactor",e.blendAlphaSrcFactor||"one"),c=vb("blendAlphaDstFactor",e.blendAlphaDstFactor||"zero");r.blendFuncSeparate(o,a,l,c)}}function OP(t,e){return $h(t,e,{never:512,less:513,equal:514,"less-equal":515,greater:516,"not-equal":517,"greater-equal":518,always:519})}function xE(t,e){return $h(t,e,{keep:7680,zero:0,replace:7681,invert:5386,"increment-clamp":7682,"decrement-clamp":7683,"increment-wrap":34055,"decrement-wrap":34056})}function X8(t,e){return $h(t,e,{add:32774,subtract:32778,"reverse-subtract":32779,min:32775,max:32776})}function vb(t,e){return $h(t,e,{one:1,zero:0,"src-color":768,"one-minus-src-color":769,"dst-color":774,"one-minus-dst-color":775,"src-alpha":770,"one-minus-src-alpha":771,"dst-alpha":772,"one-minus-dst-alpha":773,"src-alpha-saturated":776,"constant-color":32769,"one-minus-constant-color":32770,"constant-alpha":32771,"one-minus-constant-alpha":32772})}function mhe(t,e){return`Illegal parameter ${e} for ${t}`}function $h(t,e,n){if(!(e in n))throw new Error(mhe(t,e));return n[e]}function vhe(t,e){return e}function yhe(t){let e=!0;for(const n in t){e=!1;break}return e}function qH(t){const e={};return t.addressModeU&&(e[10242]=AE(t.addressModeU)),t.addressModeV&&(e[10243]=AE(t.addressModeV)),t.addressModeW&&(e[32882]=AE(t.addressModeW)),t.magFilter&&(e[10240]=MP(t.magFilter)),(t.minFilter||t.mipmapFilter)&&(e[10241]=bhe(t.minFilter||"linear",t.mipmapFilter)),t.lodMinClamp!==void 0&&(e[33082]=t.lodMinClamp),t.lodMaxClamp!==void 0&&(e[33083]=t.lodMaxClamp),t.type==="comparison-sampler"&&(e[34892]=34894),t.compare&&(e[34893]=OP("compare",t.compare)),t.maxAnisotropy&&(e[34046]=t.maxAnisotropy),e}function AE(t){switch(t){case"clamp-to-edge":return 33071;case"repeat":return 10497;case"mirror-repeat":return 33648}}function MP(t){switch(t){case"nearest":return 9728;case"linear":return 9729}}function bhe(t,e="none"){if(!e)return MP(t);switch(e){case"none":return MP(t);case"nearest":return t==="nearest"?9984:9986;case"linear":return t==="nearest"?9985:9987}}class RP extends $_{constructor(n,r){super(n,r);re(this,"device");re(this,"handle");re(this,"parameters");this.device=n,this.parameters=qH(r),this.handle=this.handle||this.device.gl.createSampler(),this._setSamplerParameters(this.parameters)}destroy(){this.handle&&(this.device.gl.deleteSampler(this.handle),this.handle=void 0)}toString(){return`Sampler(${this.id},${JSON.stringify(this.props)})`}_setSamplerParameters(n){for(const[r,i]of Object.entries(n)){const s=Number(r);switch(s){case 33082:case 33083:this.device.gl.samplerParameterf(this.handle,s,i);break;default:this.device.gl.samplerParameteri(this.handle,s,i);break}}}}class bg extends V_{constructor(n,r){super(n,{...ar.defaultProps,...r});re(this,"device");re(this,"gl");re(this,"handle");re(this,"texture");this.device=n,this.gl=this.device.gl,this.handle=null,this.texture=r.texture}}const _he="Failed to deduce GL constant from typed array";function whe(t){switch(ArrayBuffer.isView(t)?t.constructor:t){case Float32Array:return 5126;case Uint16Array:return 5123;case Uint32Array:return 5125;case Uint8Array:return 5121;case Uint8ClampedArray:return 5121;case Int8Array:return 5120;case Int16Array:return 5122;case Int32Array:return 5124;default:throw new Error(_he)}}function xhe(t,e){const{clamped:n=!0}=e||{};switch(t){case 5126:return Float32Array;case 5123:case 33635:case 32819:case 32820:return Uint16Array;case 5125:return Uint32Array;case 5121:return n?Uint8ClampedArray:Uint8Array;case 5120:return Int8Array;case 5122:return Int16Array;case 5124:return Int32Array;
1548default:throw new Error("Failed to deduce typed array type from GL constant")}}function QH(t){switch(t){case 6406:case 33326:case 6403:case 36244:return 1;case 33339:case 33340:case 33328:case 33320:case 33319:return 2;case 6407:case 36248:case 34837:return 3;case 6408:case 36249:case 34836:return 4;default:return 0}}function Ahe(t){switch(t){case 5121:return 1;case 33635:case 32819:case 32820:return 2;case 5126:return 4;default:return 0}}function rw(t,e,n){if(Ehe(e))return n(t);const{nocatch:r=!0}=e,i=Wh.get(t);i.push(),km(t,e);let s;if(r)s=n(t),i.pop();else try{s=n(t)}finally{i.pop()}return s}function Ehe(t){for(const e in t)return!1;return!0}function She(t,e,n){const{dimension:r,width:i,height:s,depth:o=0}=n,{glInternalFormat:a}=n,l=n.glTarget;switch(r){case"2d-array":case"3d":t.texStorage3D(l,e,a,i,s,o);break;default:t.texStorage2D(l,e,a,i,s)}}function Y8(t,e,n,r){const{width:i,height:s}=r,{dimension:o,depth:a=0,mipLevel:l=0}=r,{x:c=0,y:u=0,z:h=0}=r,{glFormat:d,glType:m}=r,y=XH(r.glTarget,o,a),v=r.flipY?{37440:!0}:{};rw(t,v,()=>{switch(o){case"2d-array":case"3d":t.bindTexture(y,e),t.texSubImage3D(y,l,c,u,h,i,s,a,d,m,n),t.bindTexture(y,null);break;case"2d":case"cube":t.bindTexture(y,e),t.texSubImage2D(y,l,c,u,i,s,d,m,n),t.bindTexture(y,null);break;default:throw new Error(o)}})}function K8(t,e,n){const{dimension:r,width:i,height:s,depth:o=0,mipLevel:a=0,byteOffset:l=0}=n,{x:c=0,y:u=0,z:h=0}=n,{glFormat:d,glType:m,compressed:y}=n,v=XH(n.glTarget,r,o);switch(r){case"2d-array":case"3d":y?t.compressedTexSubImage3D(v,a,c,u,h,i,s,o,d,e,l):t.texSubImage3D(v,a,c,u,h,i,s,o,d,m,e,l);break;case"2d":case"cube":y?t.compressedTexSubImage2D(v,a,c,u,i,s,d,e,l):t.texSubImage2D(v,a,c,u,i,s,d,m,e,l);break;default:throw new Error(r)}}function The(t){switch(t){case"1d":break;case"2d":return 3553;case"3d":return 32879;case"cube":return 34067;case"2d-array":return 35866}throw new Error(t)}function XH(t,e,n){return e==="cube"?34069+n:t}function Che(t,e){var x;const{sourceX:n=0,sourceY:r=0,sourceAttachment:i=0}=e||{};let{target:s=null,sourceWidth:o,sourceHeight:a,sourceDepth:l,sourceFormat:c,sourceType:u}=e||{};const{framebuffer:h,deleteFramebuffer:d}=YH(t),{gl:m,handle:y}=h;o||(o=h.width),a||(a=h.height);const v=(x=h.colorAttachments[i])==null?void 0:x.texture;if(!v)throw new Error(`Invalid framebuffer attachment ${i}`);l=(v==null?void 0:v.depth)||1,c||(c=(v==null?void 0:v.glFormat)||6408),u||(u=(v==null?void 0:v.glType)||5121),s=Ohe(s,u,c,o,a),u=u||whe(s);const b=m.bindFramebuffer(36160,y);return m.readBuffer(36064+i),m.readPixels(n,r,o,a,c,u,s),m.readBuffer(36064),m.bindFramebuffer(36160,b||null),d&&h.destroy(),s}function Phe(t,e){const{target:n,sourceX:r=0,sourceY:i=0,sourceFormat:s=6408,targetByteOffset:o=0}=e||{};let{sourceWidth:a,sourceHeight:l,sourceType:c}=e||{};const{framebuffer:u,deleteFramebuffer:h}=YH(t);a=a||u.width,l=l||u.height;const d=u;c=c||5121;let m=n;if(!m){const v=QH(s),b=Ahe(c),x=o+a*l*v*b;m=d.device.createBuffer({byteLength:x})}const y=t.device.createCommandEncoder();return y.copyTextureToBuffer({sourceTexture:t,width:a,height:l,origin:[r,i],destinationBuffer:m,byteOffset:o}),y.destroy(),h&&u.destroy(),m}function YH(t){return t instanceof H_?{framebuffer:t,deleteFramebuffer:!1}:{framebuffer:Ihe(t),deleteFramebuffer:!0}}function Ihe(t,e){const{device:n,width:r,height:i,id:s}=t;return n.createFramebuffer({...e,id:`framebuffer-for-${s}`,width:r,height:i,colorAttachments:[t]})}function Ohe(t,e,n,r,i,s){if(t)return t;e||(e=5121);const o=xhe(e,{clamped:!1}),a=QH(n);return new o(r*i*a)}class ov extends ar{constructor(n,r){super(n,r);re(this,"device");re(this,"gl");re(this,"handle");re(this,"sampler");re(this,"view");re(this,"mipmaps");re(this,"compressed");re(this,"glTarget");re(this,"glFormat");re(this,"glType");re(this,"glInternalFormat");re(this,"textureUnit",0);const i={...this.props};i.data=r.data,this.device=n,this.gl=this.device.gl,this.glTarget=The(this.props.dimension);const s=WH(this.props.format);this.glInternalFormat=s.internalFormat,this.glFormat=s.format,this.glType=s.type,this.compressed=s.compressed,this.mipmaps=!!this.props.mipmaps,this._initialize(i),Object.seal(this)}_initialize(n){this.handle=this.props.handle||this.gl.createTexture(),this.device.setSpectorMetadata(this.handle,{...this.props,data:n.data});let{width:r,height:i}=n;if(!r||!i){const s=ar.getTextureDataSize(n.data);r=(s==null?void 0:s.width)||1,i=(s==null?void 0:s.height)||1}if(this.width=r,this.height=i,this.depth=n.depth,this.setSampler(n.sampler),this.view=new bg(this.device,{...this.props,texture:this}),this.bind(),She(this.gl,this.mipLevels,this),n.data)switch(n.dimension){case"1d":this.setTexture1DData(n.data);break;case"2d":this.setTexture2DData(n.data);break;case"3d":this.setTexture3DData(n.data);break;case"cube":this.setTextureCubeData(n.data);break;case"2d-array":this.setTextureArrayData(n.data);break;case"cube-array":this.setTextureCubeArrayData(n.data);break;default:throw new Error(n.dimension)}this.mipmaps&&this.generateMipmap()}destroy(){this.handle&&(this.gl.deleteTexture(this.handle),this.removeStats(),this.trackDeallocatedMemory("Texture"),this.destroyed=!0)}createView(n){return new bg(this.device,{...n,texture:this})}setSampler(n={}){let r;n instanceof RP?(this.sampler=n,r=n.props):(this.sampler=new RP(this.device,n
1548),r=n);const i=qH(r);this._setSamplerParameters(i)}generateMipmap(n){if(!(!(this.device.isTextureFormatRenderable(this.props.format)&&this.device.isTextureFormatFilterable(this.props.format))&&(ut.warn(`${this} is not renderable or filterable, may not be able to generate mipmaps`)(),!(n!=null&&n.force))))try{this.gl.bindTexture(this.glTarget,this.handle),this.gl.generateMipmap(this.glTarget)}catch(i){ut.warn(`Error generating mipmap for ${this}: ${i.message}`)()}finally{this.gl.bindTexture(this.glTarget,null)}}copyExternalImage(n){const r=ar.getExternalImageSize(n.image),i={...ar.defaultCopyExternalImageOptions,...r,...n},{image:s,depth:o,mipLevel:a,x:l,y:c,z:u,flipY:h}=i;let{width:d,height:m}=i;const{dimension:y,glTarget:v,glFormat:b,glInternalFormat:x,glType:T}=this;if(d=Math.min(d,this.width-l),m=Math.min(m,this.height-c),n.sourceX||n.sourceY)throw new Error("WebGL does not support sourceX/sourceY)");return Y8(this.device.gl,this.handle,s,{dimension:y,mipLevel:a,x:l,y:c,z:u,width:d,height:m,depth:o,glFormat:b,glType:T,glTarget:v,flipY:h}),{width:i.width,height:i.height}}setTexture1DData(n){throw new Error("setTexture1DData not supported in WebGL.")}setTexture2DData(n,r=0){this.bind();const i=ar.normalizeTextureData(n,this);i.length>1&&this.props.mipmaps!==!1&&ut.warn(`Texture ${this.id} mipmap and multiple LODs.`)();for(let s=0;s<i.length;s++){const o=i[s];this._setMipLevel(r,s,o)}this.unbind()}setTexture3DData(n){if(this.props.dimension!=="3d")throw new Error(this.id);ArrayBuffer.isView(n)&&(this.bind(),K8(this.device.gl,n,this),this.unbind())}setTextureCubeData(n,r=0){if(this.props.dimension!=="cube")throw new Error(this.id);for(const i of ar.CubeFaces)this.setTextureCubeFaceData(n[i],i)}setTextureArrayData(n){throw this.props.dimension!=="2d-array"?new Error(this.id):new Error("setTextureArrayData not implemented.")}setTextureCubeArrayData(n){throw new Error("setTextureCubeArrayData not supported in WebGL2.")}setTextureCubeFaceData(n,r,i=0){Array.isArray(n)&&n.length>1&&this.props.mipmaps!==!1&&ut.warn(`${this.id} has mipmap and multiple LODs.`)();const s=ar.CubeFaces.indexOf(r);this.setTexture2DData(n,s)}update(){throw new Error("Texture.update() not implemented. Use ExternalTexture")}setImageDataForFace(n){const{face:r,width:i,height:s,pixels:o,data:a,format:l=6408,type:c=5121}=n,{gl:u}=this,h=o||a;this.bind(),h instanceof Promise?h.then(d=>this.setImageDataForFace(Object.assign({},n,{face:r,data:d,pixels:d}))):this.width||this.height?u.texImage2D(r,0,l,i,s,0,l,c,h):u.texImage2D(r,0,l,l,c,h)}_getImageDataMap(n){for(let r=0;r<ar.CubeFaces.length;++r){const i=ar.CubeFaces[r];n[i]&&(n[34069+r]=n[i],delete n[i])}return n}_setSamplerParameters(n){ut.log(1,`${this.id} sampler parameters`,this.device.getGLKeys(n))(),this.gl.bindTexture(this.glTarget,this.handle);for(const[r,i]of Object.entries(n)){const s=Number(r),o=i;switch(s){case 33082:case 33083:this.gl.texParameterf(this.glTarget,s,o);break;case 10241:this.gl.texParameteri(this.glTarget,s,o);break;case 10242:case 10243:this.gl.texParameteri(this.glTarget,s,o);break;case 34046:this.device.features.has("texture-filterable-anisotropic-webgl")&&this.gl.texParameteri(this.glTarget,s,o);break;default:this.gl.texParameteri(this.glTarget,s,o);break}}this.gl.bindTexture(this.glTarget,null)}_setMipLevel(n,r,i,s=this.glTarget){if(ar.isExternalImage(i)){Y8(this.device.gl,this.handle,i,{...this,depth:n,mipLevel:r,glTarget:s,flipY:this.props.flipY});return}if(ar.isTextureLevelData(i)){K8(this.device.gl,i.data,{...this,depth:n,mipLevel:r,glTarget:s});return}throw new Error("Texture: invalid image data")}getActiveUnit(){return this.gl.getParameter(34016)-33984}bind(n){const{gl:r}=this;return n!==void 0&&(this.textureUnit=n,r.activeTexture(33984+n)),r.bindTexture(this.glTarget,this.handle),n}unbind(n){const{gl:r}=this;return n!==void 0&&(this.textureUnit=n,r.activeTexture(33984+n)),r.bindTexture(this.glTarget,null),n}}const Mhe=[1,2,4,8];class Rhe extends iP{constructor(n,r){var o;super(n,r);re(this,"device");re(this,"glParameters");this.device=n;let i;if(!((o=r==null?void 0:r.parameters)!=null&&o.viewport))if(r!=null&&r.framebuffer){const{width:a,height:l}=r.framebuffer;i=[0,0,a,l]}else{const[a,l]=n.getCanvasContext().getDrawingBufferSize();i=[0,0,a,l]}this.device.pushState(),this.setParameters({viewport:i,...this.props.parameters});const s=this.props.framebuffer;if(s!=null&&s.handle)if(this.props.framebuffer){const a=this.props.framebuffer.colorAttachments.map((l,c)=>36064+c);this.device.gl.drawBuffers(a)}else this.device.gl.drawBuffers([1029]);this.clear()}end(){this.device.popState()}pushDebugGroup(n){}popDebugGroup(){}insertDebugMarker(n){}setParameters(n={}){const r={...this.glParameters};r.framebuffer=this.props.framebuffer||null,this.props.depthReadOnly&&(r.depthMask=!this.props.depthReadOnly),r.stencilMask=this.props.stencilReadOnly?0:1,r[35977]=this.props.discard,n.viewport&&(n.viewport.length>=6?(r.viewport=n.viewport.slice(0,4),r.depthRange=[n.viewport[4],n.viewport[5]]):r.viewport=n.viewport),n.scissorRect&&(r.scissorTest=!0,r.scissor=n.scissorRect),n.blendConstant&&(r.blendColor=n.blendConstant),n.stencilReference&&(console.warn("RenderPassParameters.stencilReference not yet implemented in WebGL"),n[2967]=n.stencilReference),n.colorMask&&(r.colorMask=Mhe.map(i=>!!(i&n.colorMask))),this.glParameters=r,km(this.device.gl,r)}beginOcclusionQuery(n){const r=this.props.occlusionQuerySet;r==null||r.beginOcclusionQuery()}endOcclusionQuery(){const n=this.props.occlusionQuerySet;n==null||n.endOcclusionQuery()}clear(){const n={...this.glParameters};let r=0;
1548this.props.clearColors&&this.props.clearColors.forEach((i,s)=>{i&&this.clearColorBuffer(s,i)}),this.props.clearColor!==!1&&this.props.clearColors===void 0&&(r|=16384,n.clearColor=this.props.clearColor),this.props.clearDepth!==!1&&(r|=256,n.clearDepth=this.props.clearDepth),this.props.clearStencil!==!1&&(r|=1024,n.clearStencil=this.props.clearStencil),r!==0&&rw(this.device.gl,n,()=>{this.device.gl.clear(r)})}clearColorBuffer(n=0,r=[0,0,0,0]){rw(this.device.gl,{framebuffer:this.props.framebuffer},()=>{switch(r.constructor){case Int8Array:case Int16Array:case Int32Array:this.device.gl.clearBufferiv(6144,n,r);break;case Uint8Array:case Uint8ClampedArray:case Uint16Array:case Uint32Array:this.device.gl.clearBufferuiv(6144,n,r);break;case Float32Array:this.device.gl.clearBufferfv(6144,n,r);break;default:throw new Error("clearColorBuffer: color must be typed array")}})}}function khe(t){return Nhe.includes(t)}const Nhe=[35678,35680,35679,35682,36289,36292,36293,36298,36299,36300,36303,36306,36307,36308,36311],KH={5126:[5126,1,"float","f32","float32"],35664:[5126,2,"vec2","vec2<f32>","float32x2"],35665:[5126,3,"vec3","vec3<f32>","float32x3"],35666:[5126,4,"vec4","vec4<f32>","float32x4"],5124:[5124,1,"int","i32","sint32"],35667:[5124,2,"ivec2","vec2<i32>","sint32x2"],35668:[5124,3,"ivec3","vec3<i32>","sint32x3"],35669:[5124,4,"ivec4","vec4<i32>","sint32x4"],5125:[5125,1,"uint","u32","uint32"],36294:[5125,2,"uvec2","vec2<u32>","uint32x2"],36295:[5125,3,"uvec3","vec3<u32>","uint32x3"],36296:[5125,4,"uvec4","vec4<u32>","uint32x4"],35670:[5126,1,"bool","f32","float32"],35671:[5126,2,"bvec2","vec2<f32>","float32x2"],35672:[5126,3,"bvec3","vec3<f32>","float32x3"],35673:[5126,4,"bvec4","vec4<f32>","float32x4"],35674:[5126,8,"mat2","mat2x2<f32>"],35685:[5126,8,"mat2x3","mat2x3<f32>"],35686:[5126,8,"mat2x4","mat2x4<f32>"],35687:[5126,12,"mat3x2","mat3x2<f32>"],35675:[5126,12,"mat3","mat3x3<f32>"],35688:[5126,12,"mat3x4","mat3x4<f32>"],35689:[5126,16,"mat4x2","mat4x2<f32>"],35690:[5126,16,"mat4x3","mat4x3<f32>"],35676:[5126,16,"mat4","mat4x4<f32>"]};function GH(t){const e=KH[t];if(!e)throw new Error("uniform");const[n,r,,i]=e;return{format:i,components:r,glType:n}}function Dhe(t){const e=KH[t];if(!e)throw new Error("attribute");const[,n,,r,i]=e;return{attributeType:r,vertexFormat:i,components:n}}function Bhe(t,e){const n={attributes:[],bindings:[]};n.attributes=Lhe(t,e);const r=zhe(t,e);for(const a of r){const l=a.uniforms.map(c=>({name:c.name,format:c.format,byteOffset:c.byteOffset,byteStride:c.byteStride,arrayLength:c.arrayLength}));n.bindings.push({type:"uniform",name:a.name,group:0,location:a.location,visibility:(a.vertex?1:0)&(a.fragment?2:0),minBindingSize:a.byteLength,uniforms:l})}const i=Uhe(t,e);let s=0;for(const a of i)if(khe(a.type)){const{viewDimension:l,sampleType:c}=Vhe(a.type);n.bindings.push({type:"texture",name:a.name,group:0,location:s,viewDimension:l,sampleType:c}),a.textureUnit=s,s+=1}i.length&&(n.uniforms=i);const o=Fhe(t,e);return o!=null&&o.length&&(n.varyings=o),n}function Lhe(t,e){const n=[],r=t.getProgramParameter(e,35721);for(let i=0;i<r;i++){const s=t.getActiveAttrib(e,i);if(!s)throw new Error("activeInfo");const{name:o,type:a}=s,l=t.getAttribLocation(e,o);if(l>=0){const{attributeType:c}=Dhe(a),u=/instance/i.test(o)?"instance":"vertex";n.push({name:o,location:l,stepMode:u,type:c})}}return n.sort((i,s)=>i.location-s.location),n}function Fhe(t,e){const n=[],r=t.getProgramParameter(e,35971);for(let i=0;i<r;i++){const s=t.getTransformFeedbackVarying(e,i);if(!s)throw new Error("activeInfo");const{name:o,type:a,size:l}=s,{glType:c,components:u}=GH(a),h={location:i,name:o,type:c,size:l*u};n.push(h)}return n.sort((i,s)=>i.location-s.location),n}function Uhe(t,e){const n=[],r=t.getProgramParameter(e,35718);for(let i=0;i<r;i++){const s=t.getActiveUniform(e,i);if(!s)throw new Error("activeInfo");const{name:o,size:a,type:l}=s,{name:c,isArray:u}=Whe(o);let h=t.getUniformLocation(e,c);const d={location:h,name:c,size:a,type:l,isArray:u};
vendor: 16,048 bytes, line 1548
1548if(n.push(d),d.size>1)for(let m=0;m<d.size;m++){const y=`${c}[${m}]`;h=t.getUniformLocation(e,y);const v={...d,name:y,location:h};n.push(v)}}return n}function zhe(t,e){const n=(s,o)=>t.getActiveUniformBlockParameter(e,s,o),r=[],i=t.getProgramParameter(e,35382);for(let s=0;s<i;s++){const o={name:t.getActiveUniformBlockName(e,s)||"",location:n(s,35391),byteLength:n(s,35392),vertex:n(s,35396),fragment:n(s,35398),uniformCount:n(s,35394),uniforms:[]},a=n(s,35395)||[],l=t.getActiveUniforms(e,a,35383),c=t.getActiveUniforms(e,a,35384),u=t.getActiveUniforms(e,a,35387),h=t.getActiveUniforms(e,a,35388);for(let d=0;d<o.uniformCount;++d){const m=t.getActiveUniform(e,a[d]);if(!m)throw new Error("activeInfo");o.uniforms.push({name:m.name,format:GH(l[d]).format,type:l[d],arrayLength:c[d],byteOffset:u[d],byteStride:h[d]})}r.push(o)}return r.sort((s,o)=>s.location-o.location),r}const jhe={35678:["2d","float"],35680:["cube","float"],35679:["3d","float"],35682:["3d","depth"],36289:["2d-array","float"],36292:["2d-array","depth"],36293:["cube","float"],36298:["2d","sint"],36299:["3d","sint"],36300:["cube","sint"],36303:["2d-array","uint"],36306:["2d","uint"],36307:["3d","uint"],36308:["cube","uint"],36311:["2d-array","uint"]};function Vhe(t){const e=jhe[t];if(!e)throw new Error("sampler");const[n,r]=e;return{viewDimension:n,sampleType:r}}function Whe(t){if(t[t.length-1]!=="]")return{name:t,length:1,isArray:!1};const n=/([^[]*)(\[[0-9]+\])?/.exec(t);if(!n||n.length<2)throw new Error(`Failed to parse GLSL uniform name ${t}`);return{name:n[1],length:n[2]?1:0,isArray:!!n[2]}}function $he(t,e,n,r){const i=t;let s=r;s===!0&&(s=1),s===!1&&(s=0);const o=typeof s=="number"?[s]:s;switch(n){case 35678:case 35680:case 35679:case 35682:case 36289:case 36292:case 36293:case 36298:case 36299:case 36300:case 36303:case 36306:case 36307:case 36308:case 36311:if(typeof r!="number")throw new Error("samplers must be set to integers");return t.uniform1i(e,r);case 5126:return t.uniform1fv(e,o);case 35664:return t.uniform2fv(e,o);case 35665:return t.uniform3fv(e,o);case 35666:return t.uniform4fv(e,o);case 5124:return t.uniform1iv(e,o);case 35667:return t.uniform2iv(e,o);case 35668:return t.uniform3iv(e,o);case 35669:return t.uniform4iv(e,o);case 35670:return t.uniform1iv(e,o);case 35671:return t.uniform2iv(e,o);case 35672:return t.uniform3iv(e,o);case 35673:return t.uniform4iv(e,o);case 5125:return i.uniform1uiv(e,o,1);case 36294:return i.uniform2uiv(e,o,2);case 36295:return i.uniform3uiv(e,o,3);case 36296:return i.uniform4uiv(e,o,4);case 35674:return t.uniformMatrix2fv(e,!1,o);case 35675:return t.uniformMatrix3fv(e,!1,o);case 35676:return t.uniformMatrix4fv(e,!1,o);case 35685:return i.uniformMatrix2x3fv(e,!1,o);case 35686:return i.uniformMatrix2x4fv(e,!1,o);case 35687:return i.uniformMatrix3x2fv(e,!1,o);case 35688:return i.uniformMatrix3x4fv(e,!1,o);case 35689:return i.uniformMatrix4x2fv(e,!1,o);case 35690:return i.uniformMatrix4x3fv(e,!1,o)}throw new Error("Illegal uniform")}function Hhe(t){return RH(t)!==null||typeof t=="number"||typeof t=="boolean"}function qhe(t){const e={bindings:{},uniforms:{}};return Object.keys(t).forEach(n=>{const r=t[n];Hhe(r)?e.uniforms[n]=r:e.bindings[n]=r}),e}function Qhe(t){switch(t){case"point-list":return 0;case"line-list":return 1;case"line-strip":return 3;case"triangle-list":return 4;case"triangle-strip":return 5;default:throw new Error(t)}}function Xhe(t){switch(t){case"point-list":return 0;case"line-list":return 1;case"line-strip":return 1;case"triangle-list":return 4;case"triangle-strip":return 4;default:throw new Error(t)}}const G8=4;class Yhe extends Yg{constructor(n,r){super(n,r);re(this,"device");re(this,"handle");re(this,"vs");re(this,"fs");re(this,"introspectedLayout");re(this,"uniforms",{});re(this,"bindings",{});re(this,"varyings",null);re(this,"_uniformCount",0);re(this,"_uniformSetters",{});this.device=n,this.handle=this.props.handle||this.device.gl.createProgram(),this.device.setSpectorMetadata(this.handle,{id:this.props.id}),this.vs=r.vs,this.fs=r.fs;const{varyings:i,bufferMode:s=35981}=r;i&&i.length>0&&(this.varyings=i,this.device.gl.transformFeedbackVaryings(this.handle,i,s)),this._linkShaders(),ut.time(1,`RenderPipeline ${this.id} - shaderLayout introspection`)(),this.introspectedLayout=Bhe(this.device.gl,this.handle),ut.timeEnd(1,`RenderPipeline ${this.id} - shaderLayout introspection`)(),this.shaderLayout=Khe(this.introspectedLayout,r.shaderLayout)}destroy(){this.handle&&(this.device.gl.deleteProgram(this.handle),this.destroyed=!0)}setBindings(n,r){for(const[i,s]of Object.entries(n)){const o=this.shaderLayout.bindings.find(a=>a.name===i)||this.shaderLayout.bindings.find(a=>a.name===`${i}Uniforms`);if(!o){const a=this.shaderLayout.bindings.map(l=>`"${l.name}"`).join(", ");r!=null&&r.disableWarnings||ut.warn(`No binding "${i}" in render pipeline "${this.id}", expected one of ${a}`,s)();continue}switch(s||ut.warn(`Unsetting binding "${i}" in render pipeline "${this.id}"`)(),o.type){case"uniform":if(!(s instanceof sv)&&!(s.buffer instanceof sv))throw new Error("buffer value");break;case"texture":if(!(s instanceof bg||s instanceof ov||s instanceof iv))throw new Error("texture value");break;case"sampler":ut.warn(`Ignoring sampler ${i}`)();break;default:throw new Error(o.type)}this.bindings[i]=s}}draw(n){var b;const{renderPass:r,parameters:i=this.props.parameters,topology:s=this.props.topology,vertexArray:o,vertexCount:a,instanceCount:l,isInstanced:c=!1,firstVertex:u=0,transformFeedback:h}=n,d=Qhe(s),m=!!o.indexBuffer,y=(b=o.indexBuffer)==null?void 0:b.glIndexType;if(this.linkStatus!=="success")return ut.info(2,`RenderPipeline:${this.id}.draw() aborted - waiting for shader linking`)(),!1;if(!this._areTexturesRenderable())return ut.info(2,`RenderPipeline:${this.id}.draw() aborted - textures not yet loaded`)(),!1;this.device.gl.useProgram(this.handle),o.bindBeforeRender(r),h&&h.begin(this.props.topology),this._applyBindings(),this._applyUniforms();const v=r;return phe(this.device,i,v.glParameters,()=>{m&&c?this.device.gl.drawElementsInstanced(d,a||0,y,u,l||0):m?this.device.gl.drawElements(d,a||0,y,u):c?this.device.gl.drawArraysInstanced(d,u,a||0,l||0):this.device.gl.drawArrays(d,u,a||0),h&&h.end()}),o.unbindAfterRender(r),!0}setUniformsWebGL(n){const{bindings:r}=qhe(n);Object.keys(r).forEach(i=>{ut.warn(`Unsupported value "${JSON.stringify(r[i])}" used in setUniforms() for key ${i}. Use setBindings() instead?`)()}),Object.assign(this.uniforms,n)}async _linkShaders(){const{gl:n}=this.device;if(n.attachShader(this.handle,this.vs.handle),n.attachShader(this.handle,this.fs.handle),ut.time(G8,`linkProgram for ${this.id}`)(),n.linkProgram(this.handle),ut.timeEnd(G8,`linkProgram for ${this.id}`)(),ut.level,!this.device.features.has("compilation-status-async-webgl")){const i=this._getLinkStatus();this._reportLinkStatus(i);return}ut.once(1,"RenderPipeline linking is asynchronous")(),await this._waitForLinkComplete(),ut.info(2,`RenderPipeline ${this.id} - async linking complete: ${this.linkStatus}`)();const r=this._getLinkStatus();this._reportLinkStatus(r)}async _reportLinkStatus(n){var r;switch(n){case"success":return;default:switch(this.vs.compilationStatus){case"error":throw this.vs.debugShader(),new Error(`Error during compilation of shader ${this.vs.id}`);case"pending":this.vs.asyncCompilationStatus.then(()=>this.vs.debugShader());break}switch((r=this.fs)==null?void 0:r.compilationStatus){case"error":throw this.fs.debugShader(),new Error(`Error during compilation of shader ${this.fs.id}`);case"pending":this.fs.asyncCompilationStatus.then(()=>this.fs.debugShader());break}const i=this.device.gl.getProgramInfoLog(this.handle);throw new Error(`Error during ${n}: ${i}`)}}_getLinkStatus(){const{gl:n}=this.device;return n.getProgramParameter(this.handle,35714)?(n.validateProgram(this.handle),n.getProgramParameter(this.handle,35715)?(this.linkStatus="success","success"):(this.linkStatus="error","validation")):(this.linkStatus="error","linking")}async _waitForLinkComplete(){const n=async s=>await new Promise(o=>setTimeout(o,s));if(!this.device.features.has("compilation-status-async-webgl")){await n(10);return}const{gl:i}=this.device;for(;;){if(i.getProgramParameter(this.handle,37297))return;await n(10)}}_areTexturesRenderable(){let n=!0;for(const r of this.shaderLayout.bindings)!this.bindings[r.name]&&!this.bindings[r.name.replace(/Uniforms$/,"")]&&(ut.warn(`Binding ${r.name} not found in ${this.id}`)(),n=!1);return n}_applyBindings(){if(this.linkStatus!=="success")return;const{gl:n}=this.device;n.useProgram(this.handle);let r=0,i=0;for(const s of this.shaderLayout.bindings){const o=this.bindings[s.name]||this.bindings[s.name.replace(/Uniforms$/,"")];if(!o)throw new Error(`No value for binding ${s.name} in ${this.id}`);switch(s.type){case"uniform":const{name:a}=s,l=n.getUniformBlockIndex(this.handle,a);if(l===4294967295)throw new Error(`Invalid uniform block name ${a}`);n.uniformBlockBinding(this.handle,i,l),o instanceof sv?n.bindBufferBase(35345,i,o.handle):n.bindBufferRange(35345,i,o.buffer.handle,o.offset||0,o.size||o.buffer.byteLength-o.offset),i+=1;break;case"texture":if(!(o instanceof bg||o instanceof ov||o instanceof iv))throw new Error("texture");let c;if(o instanceof bg)c=o.texture;else if(o instanceof ov)c=o;else if(o instanceof iv&&o.colorAttachments[0]instanceof bg)ut.warn("Passing framebuffer in texture binding may be deprecated. Use fbo.colorAttachments[0] instead")(),c=o.colorAttachments[0].texture;else throw new Error("No texture");n.activeTexture(33984+r),n.bindTexture(c.glTarget,c.handle),r+=1;break;case"sampler":break;case"storage":case"read-only-storage":throw new Error(`binding type '${s.type}' not supported in WebGL`)}}}_applyUniforms(){for(const n of this.shaderLayout.uniforms||[]){const{name:r,location:i,type:s,textureUnit:o}=n,a=this.uniforms[r]??o;a!==void 0&&$he(this.device.gl,i,s,a)}}}function Khe(t,e){const n={...t,attributes:t.attributes.map(r=>({...r}))};for(const r of(e==null?void 0:e.attributes)||[]){const i=n.attributes.find(s=>s.name===r.name);i?(i.type=r.type||i.type,i.stepMode=r.stepMode||i.stepMode):ut.warn(`shader layout attribute ${r.name} not present in shader`)}return n}class Ghe extends oP{constructor(n){super(n,{});re(this,"device");re(this,"commands",[]);this.device=n}submitCommands(n=this.commands){for(const r of n)switch(r.name){case"copy-buffer-to-buffer":Zhe(this.device,r.options);break;case"copy-buffer-to-texture":Jhe(this.device,r.options);break;case"copy-texture-to-buffer":ede(this.device,r.options);break;case"copy-texture-to-texture":tde(this.device,r.options);break;default:throw new Error(r.name)}}}function Zhe(t,e){const n=e.sourceBuffer,r=e.destinationBuffer;t.gl.bindBuffer(36662,n.handle),t.gl.bindBuffer(36663,r.handle),t.gl.copyBufferSubData(36662,36663,e.sourceOffset??0,e.destinationOffset??0,e.size),t.gl.bindBuffer(36662,null),t.gl.bindBuffer(36663,null)}function Jhe(t,e){throw new Error("Not implemented")}function ede(t,e){const{sourceTexture:n,mipLevel:r=0,aspect:i="all",width:s=e.sourceTexture.width,height:o=e.sourceTexture.height,depthOrArrayLayers:a=0,origin:l=[0,0],destinationBuffer:c,byteOffset:u=0,bytesPerRow:h,rowsPerImage:d}=e;if(i!=="all")throw new Error("aspect not supported in WebGL");if(r!==0||a!==0||h||d)throw new Error("not implemented");const{framebuffer:m,destroyFramebuffer:y}=ZH(n);let v;try{const b=c,x=s||m.width,T=o||m.height,E=WH(m.colorAttachments[0].texture.props.format),C=E.format,I=E.type;t.gl.bindBuffer(35051,b.handle),v=t.gl.bindFramebuffer(36160,m.handle),t.gl.readPixels(l[0],l[1],x,T,C,I,u)}finally{t.gl.bindBuffer(35051,null),v!==void 0&&t.gl.bindFramebuffer(36160,v),y&&m.destroy()}}function tde(t,e){const{sourceTexture:n,destinationMipLevel:r=0,origin:i=[0,0],destinationOrigin:s=[0,0],destinationTexture:o}=e;let{width:a=e.destinationTexture.width,height:l=e.destinationTexture.height}=e;const{framebuffer:c,destroyFramebuffer:u}=ZH(n),[h,d]=i,[m,y,v]=s,b=t.gl.bindFramebuffer(36160,c.handle);let x=null,T;if(o instanceof ov)x=o,a=Number.isFinite(a)?a:x.width,l=Number.isFinite(l)?l:x.height,x.bind(0),T=x.glTarget;else throw new Error("invalid destination");switch(T){case 3553:case 34067:t.gl.copyTexSubImage2D(T,r,m,y,h,d,a,l);break;case 35866:case 32879:t.gl.copyTexSubImage3D(T,r,m,y,v,h,d,a,l);break}x&&x.unbind(),t.gl.bindFramebuffer(36160,b),u&&c.destroy()}function ZH(t){if(t instanceof ar){const{width:e,height:n,id:r}=t;return{framebuffer:t.device.createFramebuffer({id:`framebuffer-for-${r}`,width:e,height:n,colorAttachments:[t]}),destroyFramebuffer:!0}}return{framebuffer:t,destroyFramebuffer:!1}}class nde extends sP{constructor(n,r){super(n,r);re(this,"device");re(this,"commandBuffer");this.device=n,this.commandBuffer=new Ghe(n)}destroy(){}finish(){this.commandBuffer.submitCommands()}copyBufferToBuffer(n){this.commandBuffer.commands.push({name:"copy-buffer-to-buffer",options:n})}copyBufferToTexture(n){this.commandBuffer.commands.push({name:"copy-buffer-to-texture",options:n})}copyTextureToBuffer(n){this.commandBuffer.commands.push({name:"copy-texture-to-buffer",options:n})}copyTextureToTexture(n){this.commandBuffer.commands.push({name:"copy-texture-to-texture",options:n})}pushDebugGroup(n){}popDebugGroup(){}insertDebugMarker(n){}resolveQuerySet(n,r,i){}}function rde(t){const{target:e,source:n,start:r=0,count:i=1}=t,s=n.length,o=i*s;let a=0;for(let l=r;a<s;a++)e[l++]=n[a];for(;a<o;)a<o-a?(e.copyWithin(r+a,r,r+a),a*=2):(e.copyWithin(r+a,r,r+o-a),a=o);return t.target}class _M extends aP{constructor(n,r){super(n,r);re(this,"device");re(this,"handle");re(this,"buffer",null);re(this,"bufferValue",null);this.device=n,this.handle=this.device.gl.createVertexArray()}get[Symbol.toStringTag](){return"VertexArray"}static isConstantAttributeZeroSupported(n){return Cte()==="Chrome"}destroy(){var n;super.destroy(),this.buffer&&((n=this.buffer)==null||n.destroy()),this.handle&&(this.device.gl.deleteVertexArray(this.handle),this.handle=void 0)}setIndexBuffer(n){const r=n;if(r&&r.glTarget!==34963)throw new Error("Use .setBuffer()");this.device.gl.bindVertexArray(this.handle),this.device.gl.bindBuffer(34963,r?r.handle:null),this.indexBuffer=r,this.device.gl.bindVertexArray(null)}setBuffer(n,r){const i=r;if(i.glTarget===34963)throw new Error("Use .setIndexBuffer()");const{size:s,type:o,stride:a,offset:l,normalized:c,integer:u,divisor:h}=this._getAccessor(n);this.device.gl.bindVertexArray(this.handle),this.device.gl.bindBuffer(34962,i.handle),u?this.device.gl.vertexAttribIPointer(n,s,o,a,l):this.device.gl.vertexAttribPointer(n,s,o,c,a,l),this.device.gl.bindBuffer(34962,null),this.device.gl.enableVertexAttribArray(n),this.device.gl.vertexAttribDivisor(n,h||0),this.attributes[n]=i,this.device.gl.bindVertexArray(null)}setConstantWebGL(n,r){this._enable(n,!1),this.attributes[n]=r}bindBeforeRender(){this.device.gl.bindVertexArray(this.handle),this._applyConstantAttributes()}unbindAfterRender(){this.device.gl.bindVertexArray(null)}_applyConstantAttributes(){for(let n=0;n<this.maxVertexAttributes;++n){const r=this.attributes[n];ArrayBuffer.isView(r)&&this.device.setConstantAttributeWebGL(n,r)}}_getAccessor(n){const r=this.attributeInfos[n];if(!r)throw new Error(`Unknown attribute location ${n}`);const i=VH(r.bufferDataType);return{size:r.bufferComponents,type:i,stride:r.byteStride,offset:r.byteOffset,normalized:r.normalized,integer:r.integer,divisor:r.stepMode==="instance"?1:0}}_enable(n,r=!0){const s=_M.isConstantAttributeZeroSupported(this.device)||n!==0;(r||s)&&(n=Number(n),this.device.gl.bindVertexArray(this.handle),r?this.device.gl.enableVertexAttribArray(n):this.device.gl.disableVertexAttribArray(n),this.device.gl.bindVertexArray(null))}getConstantBuffer(n,r){const i=ide(r),s=i.byteLength*n,o=i.length*n;if(this.buffer&&s!==this.buffer.byteLength)throw new Error(`Buffer size is immutable, byte length ${s} !== ${this.buffer.byteLength}.`);let a=!this.buffer;if(this.buffer=this.buffer||this.device.createBuffer({byteLength:s}),a=a||!sde(i,this.bufferValue),a){const l=wse(r.constructor,o);
1548rde({target:l,source:i,start:0,count:o}),this.buffer.write(l),this.bufferValue=r}return this.buffer}}function ide(t){return Array.isArray(t)?new Float32Array(t):t}function sde(t,e){if(!t||!e||t.length!==e.length||t.constructor!==e.constructor)return!1;for(let n=0;n<t.length;++n)if(t[n]!==e[n])return!1;return!0}class ode extends lP{constructor(n,r){super(n,r);re(this,"device");re(this,"gl");re(this,"handle");re(this,"layout");re(this,"buffers",{});re(this,"unusedBuffers",{});re(this,"bindOnUse",!0);re(this,"_bound",!1);this.device=n,this.gl=n.gl,this.handle=this.props.handle||this.gl.createTransformFeedback(),this.layout=this.props.layout,r.buffers&&this.setBuffers(r.buffers),Object.seal(this)}destroy(){this.gl.deleteTransformFeedback(this.handle),super.destroy()}begin(n="point-list"){this.gl.bindTransformFeedback(36386,this.handle),this.bindOnUse&&this._bindBuffers(),this.gl.beginTransformFeedback(Xhe(n))}end(){this.gl.endTransformFeedback(),this.bindOnUse&&this._unbindBuffers(),this.gl.bindTransformFeedback(36386,null)}setBuffers(n){this.buffers={},this.unusedBuffers={},this.bind(()=>{for(const r in n)this.setBuffer(r,n[r])})}setBuffer(n,r){const i=this._getVaryingIndex(n),{buffer:s,byteLength:o,byteOffset:a}=this._getBufferRange(r);if(i<0){this.unusedBuffers[n]=s,ut.warn(`${this.id} unusedBuffers varying buffer ${n}`)();return}this.buffers[i]={buffer:s,byteLength:o,byteOffset:a},this.bindOnUse||this._bindBuffer(i,s,a,o)}getBuffer(n){if(Z8(n))return this.buffers[n]||null;const r=this._getVaryingIndex(n);return r>=0?this.buffers[r]:null}bind(n=this.handle){if(typeof n!="function")return this.gl.bindTransformFeedback(36386,n),this;let r;return this._bound?r=n():(this.gl.bindTransformFeedback(36386,this.handle),this._bound=!0,r=n(),this._bound=!1,this.gl.bindTransformFeedback(36386,null)),r}unbind(){this.bind(null)}_getBufferRange(n){if(n instanceof sv)return{buffer:n,byteOffset:0,byteLength:n.byteLength};const{buffer:r,byteOffset:i=0,byteLength:s=n.buffer.byteLength}=n;return{buffer:r,byteOffset:i,byteLength:s}}_getVaryingIndex(n){if(Z8(n))return Number(n);for(const r of this.layout.varyings)if(n===r.name)return r.location;return-1}_bindBuffers(){for(const n in this.buffers){const{buffer:r,byteLength:i,byteOffset:s}=this._getBufferRange(this.buffers[n]);this._bindBuffer(Number(n),r,s,i)}}_unbindBuffers(){for(const n in this.buffers)this.gl.bindBufferBase(35982,Number(n),null)}_bindBuffer(n,r,i=0,s){const o=r&&r.handle;!o||s===void 0?this.gl.bindBufferBase(35982,n,o):this.gl.bindBufferRange(35982,n,o,i,s)}}function Z8(t){return typeof t=="number"?Number.isInteger(t):/^\d+$/.test(t)}class ade extends cP{constructor(n,r){super(n,r);re(this,"device");re(this,"handle");re(this,"target",null);re(this,"_queryPending",!1);re(this,"_pollingPromise",null);if(this.device=n,r.count>1)throw new Error("WebGL QuerySet can only have one value");this.handle=this.device.gl.createQuery(),Object.seal(this)}get[Symbol.toStringTag](){return"Query"}destroy(){this.device.gl.deleteQuery(this.handle)}beginTimestampQuery(){return this._begin(35007)}endTimestampQuery(){this._end()}beginOcclusionQuery(n){return this._begin(n!=null&&n.conservative?36202:35887)}endOcclusionQuery(){this._end()}beginTransformFeedbackQuery(){return this._begin(35976)}endTransformFeedbackQuery(){this._end()}async resolveQuery(){return[await this.pollQuery()]}_begin(n){this._queryPending||(this.target=n,this.device.gl.beginQuery(this.target,this.handle))}_end(){this._queryPending||this.target&&(this.device.gl.endQuery(this.target),this.target=null,this._queryPending=!0)}isResultAvailable(){if(!this._queryPending)return!1;const n=this.device.gl.getQueryParameter(this.handle,34919);return n&&(this._queryPending=!1),n}isTimerDisjoint(){return this.device.gl.getParameter(36795)}getResult(){return this.device.gl.getQueryParameter(this.handle,34918)}getTimerMilliseconds(){return this.getResult()/1e6}pollQuery(n=Number.POSITIVE_INFINITY){if(this._pollingPromise)return this._pollingPromise;let r=0;return this._pollingPromise=new Promise((i,s)=>{const o=()=>{this.isResultAvailable()?(i(this.getResult()),this._pollingPromise=null):r++>n?(s("Timed out"),this._pollingPromise=null):requestAnimationFrame(o)};requestAnimationFrame(o)}),this._pollingPromise}}class _g extends tf{constructor(n){var h,d;super({...n,id:n.id||che("webgl-device")});re(this,"type","webgl");re(this,"handle");re(this,"features");re(this,"limits");re(this,"info");re(this,"canvasContext");re(this,"lost");re(this,"_resolveContextLost");re(this,"gl");re(this,"debug",!1);re(this,"_canvasSizeInfo",{clientWidth:0,clientHeight:0,devicePixelRatio:1});re(this,"_extensions",{});re(this,"_polyfilled",!1);re(this,"spectorJS");re(this,"renderPass",null);re(this,"_constants");const r=tf._getCanvasContextProps(n);if(!r)throw new Error("WebGLDevice requires props.createCanvasContext to be set");let i=(d=(h=r.canvas)==null?void 0:h.gl)==null?void 0:d.device;if(i)throw new Error(`WebGL context already attached to device ${i.id}`);this.canvasContext=new Zfe(this,r),this.lost=new Promise(m=>{this._resolveContextLost=m});const s={...n.webgl};r.alphaMode==="premultiplied"&&(s.premultipliedAlpha=!0),n.powerPreference!==void 0&&(s.powerPreference=n.powerPreference);const a=this.props._handle||Rfe(this.canvasContext.canvas,{onContextLost:m=>{var y;return(y=this._resolveContextLost)==null?void 0:y.call(this,{reason:"destroyed",message:"Entered sleep mode, or too many apps or browser tabs are using the GPU."})},onContextRestored:m=>console.log("WebGL context restored")},s);if(!a)throw new Error("WebGL context creation failed");if(i=a.device,i){if(n._reuseDevices)return ut.log(1,`Not creating a new Device, instead returning a reference to Device ${i.id} already attached to WebGL context`,i)(),i._reused=!0,i;throw new Error(`WebGL context already attached to device ${i.id}`)}this.handle=a,this.gl=a,this.spectorJS=the({...this.props,gl:this.handle}),this.gl.device=this,this.gl._version=2,this.info=kfe(this.gl,this._extensions),this.limits=new Yfe(this.gl),this.features=new Xfe(this.gl,this._extensions,this.props._disabledFeatures),this.props._initializeFeatures&&this.features.initializeFeatures(),r.autoResize!==!1&&this.canvasContext.resize(),new Wh(this.gl,{log:(...m)=>ut.log(1,...m)()}).trackState(this.gl,{copyState:!1});const c=n.debugWebGL||n.debug,u=n.debugWebGL;c&&(this.gl=ihe(this.gl,{debugWebGL:c,traceWebGL:u}),ut.warn("WebGL debug mode activated. Performance reduced.")(),n.debugWebGL&&(ut.level=Math.max(ut.level,1)))}destroy(){!this.props._reuseDevices&&!this._reused&&delete this.gl.device}get isLost(){return this.gl.isContextLost()}createCanvasContext(n){throw new Error("WebGL only supports a single canvas")}createBuffer(n){const r=this._normalizeBufferProps(n);return new sv(this,r)}createTexture(n){return new ov(this,n)}createExternalTexture(n){throw new Error("createExternalTexture() not implemented")}createSampler(n){return new RP(this,n)}createShader(n){return new dhe(this,n)}createFramebuffer(n){return new iv(this,n)}createVertexArray(n){return new _M(this,n)}createTransformFeedback(n){return new ode(this,n)}createQuerySet(n){return new ade(this,n)}createRenderPipeline(n){return new Yhe(this,n)}beginRenderPass(n){return new Rhe(this,n)}createComputePipeline(n){throw new Error("ComputePipeline not supported in WebGL")}beginComputePass(n){throw new Error("ComputePass not supported in WebGL")}createCommandEncoder(n={}){return new nde(this,n)}submit(){var n;(n=this.renderPass)==null||n.end(),this.renderPass=null}readPixelsToArrayWebGL(n,r){return Che(n,r)}readPixelsToBufferWebGL(n,r){return Phe(n,r)}setParametersWebGL(n){km(this.gl,n)}getParametersWebGL(n){return zH(this.gl,n)}withParametersWebGL(n,r){return rw(this.gl,n,r)}resetWebGL(){ut.warn("WebGLDevice.resetWebGL is deprecated, use only for debugging")(),Cfe(this.gl)}_getDeviceSpecificTextureFormatCapabilities(n){return $fe(this.gl,n,this._extensions)}loseDevice(){var s;let n=!1;const i=this.getExtension("WEBGL_lose_context").WEBGL_lose_context;return i&&(n=!0,i.loseContext()),(s=this._resolveContextLost)==null||s.call(this,{reason:"destroyed",message:"Application triggered context loss"}),n}pushState(){Wh.get(this.gl).push()}popState(){Wh.get(this.gl).pop()}setSpectorMetadata(n,r){n.__SPECTOR_Metadata=r}getGLKey(n,r){const i=Number(n);for(const s in this.gl)if(this.gl[s]===i)return`GL.${s}`;return r!=null&&r.emptyIfUnknown?"":String(n)}getGLKeys(n){const r={emptyIfUnknown:!0};return Object.entries(n).reduce((i,[s,o])=>(i[`${s}:${this.getGLKey(s,r)}`]=`${o}:${this.getGLKey(o,r)}`,i),{})}setConstantAttributeWebGL(n,r){const i=this.limits.maxVertexAttributes;this._constants=this._constants||new Array(i).fill(null);const s=this._constants[n];switch(s&&fde(s,r)&&ut.info(1,`setConstantAttributeWebGL(${n}) could have been skipped, value unchanged`)(),this._constants[n]=r,r.constructor){case Float32Array:lde(this,n,r);break;case Int32Array:cde(this,n,r);break;case Uint32Array:ude(this,n,r);break;default:throw new Error("constant")}}getExtension(n){return nm(this.gl,n,this._extensions),this._extensions}}function lde(t,e,n){switch(n.length){case 1:t.gl.vertexAttrib1fv(e,n);break;case 2:t.gl.vertexAttrib2fv(e,n);break;case 3:t.gl.vertexAttrib3fv(e,n);break;case 4:t.gl.vertexAttrib4fv(e,n);break}}function cde(t,e,n){t.gl.vertexAttribI4iv(e,n)}function ude(t,e,n){t.gl.vertexAttribI4uiv(e,n)}function fde(t,e){if(!t||!e||t.length!==e.length||t.constructor!==e.constructor)return!1;for(let n=0;n<t.length;++n)if(t[n]!==e[n])return!1;return!0}const hde={WEBGL_depth_texture:{UNSIGNED_INT_24_8_WEBGL:34042},OES_element_index_uint:{},OES_texture_float:{},OES_texture_half_float:{HALF_FLOAT_OES:5131},EXT_color_buffer_float:{},OES_standard_derivatives:{FRAGMENT_SHADER_DERIVATIVE_HINT_OES:35723},EXT_frag_depth:{},EXT_blend_minmax:{MIN_EXT:32775,MAX_EXT:32776},EXT_shader_texture_lod:{}},dde=t=>({drawBuffersWEBGL(e){return t.drawBuffers(e)},COLOR_ATTACHMENT0_WEBGL:36064,COLOR_ATTACHMENT1_WEBGL:36065,COLOR_ATTACHMENT2_WEBGL:36066,COLOR_ATTACHMENT3_WEBGL:36067}),pde=t=>({VERTEX_ARRAY_BINDING_OES:34229,createVertexArrayOES(){return t.createVertexArray()},deleteVertexArrayOES(e){return t.deleteVertexArray(e)},isVertexArrayOES(e){return t.isVertexArray(e)},bindVertexArrayOES(e){return t.bindVertexArray(e)}}),gde=t=>({VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE:35070,drawArraysInstancedANGLE(...e){return t.drawArraysInstanced(...e)}
1548,drawElementsInstancedANGLE(...e){return t.drawElementsInstanced(...e)},vertexAttribDivisorANGLE(...e){return t.vertexAttribDivisor(...e)}});function mde(t=!0){const e=HTMLCanvasElement.prototype;if(!t&&e.originalGetContext){e.getContext=e.originalGetContext,e.originalGetContext=void 0;return}e.originalGetContext=e.getContext,e.getContext=function(n,r){if(n==="webgl"||n==="experimental-webgl"){const i=this.originalGetContext("webgl2",r);return i instanceof HTMLElement&&vde(i),i}return this.originalGetContext(n,r)}}function vde(t){t.getExtension("EXT_color_buffer_float");const e={...hde,WEBGL_disjoint_timer_query:t.getExtension("EXT_disjoint_timer_query_webgl2"),WEBGL_draw_buffers:dde(t),OES_vertex_array_object:pde(t),ANGLE_instanced_arrays:gde(t)},n=t.getExtension;t.getExtension=function(i){const s=n.call(t,i);return s||(i in e?e[i]:null)};const r=t.getSupportedExtensions;t.getSupportedExtensions=function(){const i=r.apply(t)||[];return i==null?void 0:i.concat(Object.keys(e))}}const yb=1;class yde extends Gie{constructor(){super();re(this,"type","webgl");tf.defaultProps={...tf.defaultProps,...bM},_g.adapter=this}isSupported(){return typeof WebGL2RenderingContext<"u"}enforceWebGL2(n){mde(n)}async attach(n){if(n instanceof _g)return n;if((n==null?void 0:n.device)instanceof tf)return n.device;if(!bde(n))throw new Error("Invalid WebGL2RenderingContext");return new _g({_handle:n,createCanvasContext:{canvas:n.canvas,autoResize:!1}})}async create(n={}){ut.groupCollapsed(yb,"WebGLDevice created")();const r=[];(n.debugWebGL||n.debug)&&r.push(rhe()),n.debugSpectorJS&&r.push(ehe(n));const i=await Promise.allSettled(r);for(const a of i)a.status==="rejected"&&ut.error(`Failed to initialize debug libraries ${a.reason}`)();const s=new _g(n),o=`${s._reused?"Reusing":"Created"} device with WebGL2 ${s.debug?"debug ":""}context: ${s.info.vendor}, ${s.info.renderer} for canvas: ${s.canvasContext.id}`;return ut.probe(yb,o)(),ut.table(yb,s.info)(),ut.groupEnd(yb)(),s}}function bde(t){return typeof WebGL2RenderingContext<"u"&&t instanceof WebGL2RenderingContext?!0:!!(t&&Number.isFinite(t._version))}const J8=new yde;function Ru(){}const _de=({isDragging:t})=>t?"grabbing":"grab",JH={id:"",width:"100%",height:"100%",style:null,viewState:null,initialViewState:null,pickingRadius:0,layerFilter:null,parameters:{},parent:null,device:null,deviceProps:{},gl:null,canvas:null,layers:[],effects:[],views:null,controller:null,useDevicePixels:!0,touchAction:"none",eventRecognizerOptions:{},_framebuffer:null,_animate:!1,_pickable:!0,_typedArrayManagerProps:{},_customRender:null,widgets:[],onDeviceInitialized:Ru,onWebGLInitialized:Ru,onResize:Ru,onViewStateChange:Ru,onInteractionStateChange:Ru,onBeforeRender:Ru,onAfterRender:Ru,onLoad:Ru,onError:t=>Zt.error(t.message,t.cause)(),onHover:null,onClick:null,onDragStart:null,onDrag:null,onDragEnd:null,_onMetrics:null,getCursor:_de,getTooltip:null,debug:!1,drawPickingColors:!1};class wM{constructor(e){this.width=0,this.height=0,this.userData={},this.device=null,this.canvas=null,this.viewManager=null,this.layerManager=null,this.effectManager=null,this.deckRenderer=null,this.deckPicker=null,this.eventManager=null,this.widgetManager=null,this.tooltip=null,this.animationLoop=null,this.cursorState={isHovering:!1,isDragging:!1},this.stats=new by({id:"deck.gl"}),this.metrics={fps:0,setPropsTime:0,updateAttributesTime:0,framesRedrawn:0,pickTime:0,pickCount:0,gpuTime:0,gpuTimePerFrame:0,cpuTime:0,cpuTimePerFrame:0,bufferMemory:0,textureMemory:0,renderbufferMemory:0,gpuMemory:0},this._metricsCounter=0,this._needsRedraw="Initial render",this._pickRequest={mode:"hover",x:-1,y:-1,radius:0,event:null},this._lastPointerDownInfo=null,this._onPointerMove=r=>{const{_pickRequest:i}=this;if(r.type==="pointerleave")i.x=-1,i.y=-1,i.radius=0;else{if(r.leftButton||r.rightButton)return;{const s=r.offsetCenter;if(!s)return;i.x=s.x,i.y=s.y,i.radius=this.props.pickingRadius}}this.layerManager&&(this.layerManager.context.mousePosition={x:i.x,y:i.y}),i.event=r},this._onEvent=r=>{const i=wP[r.type],s=r.offsetCenter;if(!i||!s||!this.layerManager)return;const o=this.layerManager.getLayers(),a=this.deckPicker.getLastPickedObject({x:s.x,y:s.y,layers:o,viewports:this.getViewports(s)},this._lastPointerDownInfo),{layer:l}=a,c=l&&(l[i]||l.props[i]),u=this.props[i];let h=!1;c&&(h=c.call(l,a,r)),h||(u==null||u(a,r),this.widgetManager.onEvent(a,r))},this._onPointerDown=r=>{var o;if(((o=this.device)==null?void 0:o.type)==="webgpu")return;const i=r.offsetCenter,s=this._pick("pickObject","pickObject Time",{x:i.x,y:i.y,radius:this.props.pickingRadius});this._lastPointerDownInfo=s.result[0]||s.emptyInfo},this.props={...JH,...e},e=this.props,e.viewState&&e.initialViewState&&Zt.warn("View state tracking is disabled. Use either `initialViewState` for auto update or `viewState` for manual update.")(),this.viewState=this.props.initialViewState,e.device&&(this.device=e.device);let n=this.device;!n&&e.gl&&(e.gl instanceof WebGLRenderingContext&&Zt.error("WebGL1 context not supported.")(),n=J8.attach(e.gl)),n||(n=nP.createDevice({type:"best-available",_reuseDevices:!0,adapters:[J8],...e.deviceProps,createCanvasContext:{canvas:this._createCanvas(e),useDevicePixels:this.props.useDevicePixels,autoResize:!1}})),this.animationLoop=this._createAnimationLoop(n,e),this.setProps(e),e._typedArrayManagerProps&&Jg.setOptions(e._typedArrayManagerProps),this.animationLoop.start()}finalize(){var e,n,r,i,s,o,a,l,c,u;(e=this.animationLoop)==null||e.stop(),(n=this.animationLoop)==null||n.destroy(),this.animationLoop=null,this._lastPointerDownInfo=null,(r=this.layerManager)==null||r.finalize(),this.layerManager=null,(i=this.viewManager)==null||i.finalize(),this.viewManager=null,(s=this.effectManager)==null||s.finalize(),this.effectManager=null,(o=this.deckRenderer)==null||o.finalize(),this.deckRenderer=null,(a=this.deckPicker)==null||a.finalize(),this.deckPicker=null,(l=this.eventManager)==null||l.destroy(),this.eventManager=null,(c=this.widgetManager)==null||c.finalize(),this.widgetManager=null,!this.props.canvas&&!this.props.device&&!this.props.gl&&this.canvas&&((u=this.canvas.parentElement)==null||u.removeChild(this.canvas),this.canvas=null)}setProps(e){var r;this.stats.get("setProps Time").timeStart(),"onLayerHover"in e&&Zt.removed("onLayerHover","onHover")(),"onLayerClick"in e&&Zt.removed("onLayerClick","onClick")(),e.initialViewState&&!Ii(this.props.initialViewState,e.initialViewState,3)&&(this.viewState=e.initialViewState),Object.assign(this.props,e),this._setCanvasSize(this.props);const n=Object.create(this.props);Object.assign(n,{views:this._getViews(),width:this.width,height:this.height,viewState:this._getViewState()}),(r=this.animationLoop)==null||r.setProps(n),this.layerManager&&(this.viewManager.setProps(n),this.layerManager.activateViewport(this.getViewports()[0]),this.layerManager.setProps(n),this.effectManager.setProps(n),this.deckRenderer.setProps(n),this.deckPicker.setProps(n),this.widgetManager.setProps(n)),this.stats.get("setProps Time").timeEnd()}needsRedraw(e={clearRedrawFlags:!1}){if(!this.layerManager)return!1;if(this.props._animate)return"Deck._animate";let n=this._needsRedraw;e.clearRedrawFlags&&(this._needsRedraw=!1);const r=this.viewManager.needsRedraw(e),i=this.layerManager.needsRedraw(e),s=this.effectManager.needsRedraw(e),o=this.deckRenderer.needsRedraw(e);return n=n||r||i||s||o,n}redraw(e){if(!this.layerManager)return;let n=this.needsRedraw({clearRedrawFlags:!0});n=e||n,n&&(this.stats.get("Redraw Count").incrementCount(),this.props._customRender?this.props._customRender(n):this._drawLayers(n))}get isInitialized(){return this.viewManager!==null}getViews(){return Ti(this.viewManager),this.viewManager.views}getViewports(e){return Ti(this.viewManager),this.viewManager.getViewports(e)}getCanvas(){return this.canvas}pickObject(e){const n=this._pick("pickObject","pickObject Time",e).result;return n.length?n[0]:null}pickMultipleObjects(e){return e.depth=e.depth||10,this._pick("pickObject","pickMultipleObjects Time",e).result}pickObjects(e){return this._pick("pickObjects","pickObjects Time",e)}
1548_addResources(e,n=!1){for(const r in e)this.layerManager.resourceManager.add({resourceId:r,data:e[r],forceUpdate:n})}_removeResources(e){for(const n of e)this.layerManager.resourceManager.remove(n)}_addDefaultEffect(e){this.effectManager.addDefaultEffect(e)}_addDefaultShaderModule(e){this.layerManager.addDefaultShaderModule(e)}_removeDefaultShaderModule(e){var n;(n=this.layerManager)==null||n.removeDefaultShaderModule(e)}_pick(e,n,r){Ti(this.deckPicker);const{stats:i}=this;i.get("Pick Count").incrementCount(),i.get(n).timeStart();const s=this.deckPicker[e]({layers:this.layerManager.getLayers(r),views:this.viewManager.getViews(),viewports:this.getViewports(r),onViewportActive:this.layerManager.activateViewport,effects:this.effectManager.getEffects(),...r});return i.get(n).timeEnd(),s}_createCanvas(e){let n=e.canvas;return typeof n=="string"&&(n=document.getElementById(n),Ti(n)),n||(n=document.createElement("canvas"),n.id=e.id||"deckgl-overlay",(e.parent||document.body).appendChild(n)),Object.assign(n.style,e.style),n}_setCanvasSize(e){var i;if(!this.canvas)return;const{width:n,height:r}=e;if(n||n===0){const s=Number.isFinite(n)?`${n}px`:n;this.canvas.style.width=s}if(r||r===0){const s=Number.isFinite(r)?`${r}px`:r;this.canvas.style.position=((i=e.style)==null?void 0:i.position)||"absolute",this.canvas.style.height=s}}_updateCanvasSize(){var i,s;const{canvas:e}=this;if(!e)return;const n=e.clientWidth??e.width,r=e.clientHeight??e.height;(n!==this.width||r!==this.height)&&(this.width=n,this.height=r,(i=this.viewManager)==null||i.setProps({width:n,height:r}),(s=this.layerManager)==null||s.activateViewport(this.getViewports()[0]),this.props.onResize({width:n,height:r}))}_createAnimationLoop(e,n){const{gl:r,onError:i,useDevicePixels:s}=n;return new Eue({device:e,useDevicePixels:s,autoResizeDrawingBuffer:!r,autoResizeViewport:!1,onInitialize:o=>this._setDevice(o.device),onRender:this._onRenderFrame.bind(this),onError:i})}_getViewState(){return this.props.viewState||this.viewState}_getViews(){const{views:e}=this.props,n=Array.isArray(e)?e:e?[e]:[new LH({id:"default-view"})];return n.length&&this.props.controller&&(n[0].props.controller=this.props.controller),n}_onContextLost(){const{onError:e}=this.props;this.animationLoop&&e&&e(new Error("WebGL context is lost"))}_pickAndCallback(){var n,r,i,s;if(((n=this.device)==null?void 0:n.type)==="webgpu")return;const{_pickRequest:e}=this;if(e.event){const{result:o,emptyInfo:a}=this._pick("pickObject","pickObject Time",e);this.cursorState.isHovering=o.length>0;let l=a,c=!1;for(const u of o)l=u,c=((r=u.layer)==null?void 0:r.onHover(u,e.event))||c;c||((s=(i=this.props).onHover)==null||s.call(i,l,e.event),this.widgetManager.onHover(l,e.event)),e.event=null}}_updateCursor(){const e=this.props.parent||this.canvas;e&&(e.style.cursor=this.props.getCursor(this.cursorState))}_setDevice(e){var i,s;if(this.device=e,!this.animationLoop)return;this.canvas||(this.canvas=(i=this.device.canvasContext)==null?void 0:i.canvas),this.device.type==="webgl"&&this.device.setParametersWebGL({blend:!0,blendFunc:[770,771,1,771],polygonOffsetFill:!0,depthTest:!0,depthFunc:515}),this.props.onDeviceInitialized(this.device),this.device.type==="webgl"&&this.props.onWebGLInitialized(this.device.gl);const n=new MH;n.play(),this.animationLoop.attachTimeline(n),this.eventManager=new Gle(this.props.parent||this.canvas,{touchAction:this.props.touchAction,recognizers:Object.keys(b8).map(o=>{var m;const[a,l,c,u]=b8[o],h=(m=this.props.eventRecognizerOptions)==null?void 0:m[o],d={...l,...h,event:o};return{recognizer:new a(d),recognizeWith:c,requestFailure:u}}),events:{pointerdown:this._onPointerDown,pointermove:this._onPointerMove,pointerleave:this._onPointerMove}});for(const o in wP)this.eventManager.on(o,this._onEvent);this.viewManager=new Xue({timeline:n,eventManager:this.eventManager,onViewStateChange:this._onViewStateChange.bind(this),onInteractionStateChange:this._onInteractionStateChange.bind(this),views:this._getViews(),viewState:this._getViewState(),width:this.width,height:this.height});const r=this.viewManager.getViewports()[0];this.layerManager=new Que(this.device,{deck:this,stats:this.stats,viewport:r,timeline:n}),this.effectManager=new cfe({deck:this,device:this.device}),this.deckRenderer=new hfe(this.device),this.deckPicker=new yfe(this.device),this.widgetManager=new wfe({deck:this,parentElement:(s=this.canvas)==null?void 0:s.parentElement}),this.widgetManager.addDefault(new Afe),this.setProps(this.props),this._updateCanvasSize(),this.props.onLoad()}_drawLayers(e,n){var o;const{device:r,gl:i}=this.layerManager.context;this.props.onBeforeRender({device:r,gl:i});const s={target:this.props._framebuffer,layers:this.layerManager.getLayers(),viewports:this.viewManager.getViewports(),onViewportActive:this.layerManager.activateViewport,views:this.viewManager.getViews(),pass:"screen",effects:this.effectManager.getEffects(),...n};(o=this.deckRenderer)==null||o.renderLayers(s),s.pass==="screen"&&this.widgetManager.onRedraw({viewports:s.viewports,layers:s.layers}),this.props.onAfterRender({device:r,gl:i})}_onRenderFrame(){var e;this._getFrameStats(),this._metricsCounter++%60===0&&(this._getMetrics(),this.stats.reset(),Zt.table(4,this.metrics)(),this.props._onMetrics&&this.props._onMetrics(this.metrics)),this._updateCanvasSize(),this._updateCursor(
vendor: 59,475 bytes, lines 1548-1628
1548),this.layerManager.updateLayers(),((e=this.device)==null?void 0:e.type)!=="webgpu"&&this._pickAndCallback(),this.redraw(),this.viewManager&&this.viewManager.updateViewStates()}_onViewStateChange(e){const n=this.props.onViewStateChange(e)||e.viewState;this.viewState&&(this.viewState={...this.viewState,[e.viewId]:n},this.props.viewState||this.viewManager&&this.viewManager.setProps({viewState:this.viewState}))}_onInteractionStateChange(e){this.cursorState.isDragging=e.isDragging||!1,this.props.onInteractionStateChange(e)}_getFrameStats(){const{stats:e}=this;e.get("frameRate").timeEnd(),e.get("frameRate").timeStart();const n=this.animationLoop.stats;e.get("GPU Time").addTime(n.get("GPU Time").lastTiming),e.get("CPU Time").addTime(n.get("CPU Time").lastTiming)}_getMetrics(){const{metrics:e,stats:n}=this;e.fps=n.get("frameRate").getHz(),e.setPropsTime=n.get("setProps Time").time,e.updateAttributesTime=n.get("Update Attributes").time,e.framesRedrawn=n.get("Redraw Count").count,e.pickTime=n.get("pickObject Time").time+n.get("pickMultipleObjects Time").time+n.get("pickObjects Time").time,e.pickCount=n.get("Pick Count").count,e.gpuTime=n.get("GPU Time").time,e.cpuTime=n.get("CPU Time").time,e.gpuTimePerFrame=n.get("GPU Time").getAverageTime(),e.cpuTimePerFrame=n.get("CPU Time").getAverageTime();const r=nP.stats.get("Memory Usage");e.bufferMemory=r.get("Buffer Memory").count,e.textureMemory=r.get("Texture Memory").count,e.renderbufferMemory=r.get("Renderbuffer Memory").count,e.gpuMemory=r.get("GPU Memory").count}}wM.defaultProps=JH;wM.VERSION=nie;function wde(t){switch(t){case"float64":return Float64Array;case"uint8":case"unorm8":return Uint8ClampedArray;default:return f$(t)}}const xde=u$;function bb(t,e,n){const r=n==="webgpu"&&e.type==="uint8"?"unorm8":e.type;return{attribute:t,format:e.size>1?`${r}x${e.size}`:e.type,byteOffset:e.offset||0}}function Ih(t){return t.stride||t.size*t.bytesPerElement}function Ade(t,e){return t.type===e.type&&t.size===e.size&&Ih(t)===Ih(e)&&(t.offset||0)===(e.offset||0)}function kP(t,e){e.offset&&Zt.removed("shaderAttribute.offset","vertexOffset, elementOffset")();const n=Ih(t),r=e.vertexOffset!==void 0?e.vertexOffset:t.vertexOffset||0,i=e.elementOffset||0,s=r*n+i*t.bytesPerElement+(t.offset||0);return{...e,offset:s,stride:n}}function Ede(t,e){const n=kP(t,e);return{high:n,low:{...n,offset:n.offset+t.size*4}}}class Sde{constructor(e,n,r){this._buffer=null,this.device=e,this.id=n.id||"",this.size=n.size||1;const i=n.logicalType||n.type,s=i==="float64";let{defaultValue:o}=n;o=Number.isFinite(o)?[o]:o||new Array(this.size).fill(0);let a;s?a="float32":!i&&n.isIndexed?a="uint32":a=i||"float32";let l=wde(i||a);this.doublePrecision=s,s&&n.fp64===!1&&(l=Float32Array),this.value=null,this.settings={...n,defaultType:l,defaultValue:o,logicalType:i,type:a,normalized:a.includes("norm"),size:this.size,bytesPerElement:l.BYTES_PER_ELEMENT},this.state={...r,externalBuffer:null,bufferAccessor:this.settings,allocatedValue:null,numInstances:0,bounds:null,constant:!1}}get isConstant(){return this.state.constant}get buffer(){return this._buffer}get byteOffset(){const e=this.getAccessor();return e.vertexOffset?e.vertexOffset*Ih(e):0}get numInstances(){return this.state.numInstances}set numInstances(e){this.state.numInstances=e}delete(){this._buffer&&(this._buffer.delete(),this._buffer=null),Jg.release(this.state.allocatedValue)}getBuffer(){return this.state.constant?null:this.state.externalBuffer||this._buffer}getValue(e=this.id,n=null){const r={};if(this.state.constant){const i=this.value;if(n){const s=kP(this.getAccessor(),n),o=s.offset/i.BYTES_PER_ELEMENT,a=s.size||this.size;r[e]=i.subarray(o,o+a)}else r[e]=i}else r[e]=this.getBuffer();return this.doublePrecision&&(this.value instanceof Float64Array?r[`${e}64Low`]=r[e]:r[`${e}64Low`]=new Float32Array(this.size)),r}_getBufferLayout(e=this.id,n=null){const r=this.getAccessor(),i=[],s={name:this.id,byteStride:Ih(r),attributes:i};if(this.doublePrecision){const o=Ede(r,n||{});i.push(bb(e,{...r,...o.high},this.device.type),bb(`${e}64Low`,{...r,...o.low},this.device.type))}else if(n){const o=kP(r,n);i.push(bb(e,{...r,...o},this.device.type))}else i.push(bb(e,r,this.device.type));return s}setAccessor(e){this.state.bufferAccessor=e}getAccessor(){return this.state.bufferAccessor}getBounds(){if(this.state.bounds)return this.state.bounds;let e=null;if(this.state.constant&&this.value){const n=Array.from(this.value);e=[n,n]}else{const{value:n,numInstances:r,size:i}=this,s=r*i;if(n&&s&&n.length>=s){const o=new Array(i).fill(1/0),a=new Array(i).fill(-1/0);for(let l=0;l<s;)for(let c=0;c<i;c++){const u=n[l++];u<o[c]&&(o[c]=u),u>a[c]&&(a[c]=u)}e=[o,a]}}return this.state.bounds=e,e}setData(e){const{state:n}=this;let r;ArrayBuffer.isView(e)?r={value:e}:e instanceof lr?r={buffer:e}:r=e;const i={...this.settings,...r};if(ArrayBuffer.isView(r.value)){if(!r.type)if(this.doublePrecision&&r.value instanceof Float64Array)i.type="float32";else{const o=xde(r.value);i.type=i.normalized?o.replace("int","norm"):o}i.bytesPerElement=r.value.BYTES_PER_ELEMENT,i.stride=Ih(i)}if(n.bounds=null,r.constant){let s=r.value;if(s=this._normalizeValue(s,[],0),this.settings.normalized&&(s=this.normalizeConstant(s)),!(!n.constant||!this._areValuesEqual(s,this.value)))return!1;n.externalBuffer=null,n.constant=!0,this.value=ArrayBuffer.isView(s)?s:new Float32Array(s)}else if(r.buffer){const s=r.buffer;n.externalBuffer=s,n.constant=!1,this.value=r.value||null}else if(r.value){this._checkExternalBuffer(r);let s=r.value;n.externalBuffer=null,n.constant=!1,this.value=s;let{buffer:o}=this;const a=Ih(i),l=(i.vertexOffset||0)*a;if(this.doublePrecision&&s instanceof Float64Array&&(s=gE(s,i)),this.settings.isIndexed){const u=this.settings.defaultType;s.constructor!==u&&(s=new u(s))}const c=s.byteLength+l+a*2;(!o||o.byteLength<c)&&(o=this._createBuffer(c)),o.write(s,l)}return this.setAccessor(i),!0}updateSubBuffer(e={}){this.state.bounds=null;const n=this.value,{startOffset:r=0,endOffset:i}=e;this.buffer.write(this.doublePrecision&&n instanceof Float64Array?gE(n,{size:this.size,startIndex:r,endIndex:i}):n.subarray(r,i),r*n.BYTES_PER_ELEMENT+this.byteOffset)}allocate(e,n=!1){const{state:r}=this,i=r.allocatedValue,s=Jg.allocate(i,e+1,{size:this.size,type:this.settings.defaultType,copy:n});this.value=s;const{byteOffset:o}=this;let{buffer:a}=this;return(!a||a.byteLength<s.byteLength+o)&&(a=this._createBuffer(s.byteLength+o),n&&i&&a.write(i instanceof Float64Array?gE(i,this):i,o)),r.allocatedValue=s,r.constant=!1,r.externalBuffer=null,this.setAccessor(this.settings),!0}_checkExternalBuffer(e){const{value:n}=e;if(!ArrayBuffer.isView(n))throw new Error(`Attribute ${this.id} value is not TypedArray`);const r=this.settings.defaultType;let i=!1;if(this.doublePrecision&&(i=n.BYTES_PER_ELEMENT<4),i)throw new Error(`Attribute ${this.id} does not support ${n.constructor.name}`);!(n instanceof r)&&this.settings.normalized&&!("normalized"in e)&&Zt.warn(`Attribute ${this.id} is normalized`)()}normalizeConstant(e){switch(this.settings.type){case"snorm8":return new Float32Array(e).map(n=>(n+128)/255*2-1);case"snorm16":return new Float32Array(e).map(n=>(n+32768)/65535*2-1);case"unorm8":return new Float32Array(e).map(n=>n/255);case"unorm16":return new Float32Array(e).map(n=>n/65535);default:return e}}_normalizeValue(e,n,r){const{defaultValue:i,size:s}=this.settings;if(Number.isFinite(e))return n[r]=e,n;if(!e){let o=s;for(;--o>=0;)n[r+o]=i[o];return n}switch(s){case 4:n[r+3]=Number.isFinite(e[3])?e[3]:i[3];case 3:n[r+2]=Number.isFinite(e[2])?e[2]:i[2];case 2:n[r+1]=Number.isFinite(e[1])?e[1]:i[1];case 1:n[r+0]=Number.isFinite(e[0])?e[0]:i[0];break;default:let o=s;for(;--o>=0;)n[r+o]=Number.isFinite(e[o])?e[o]:i[o]}return n}_areValuesEqual(e,n){if(!e||!n)return!1;const{size:r}=this;for(let i=0;i<r;i++)if(e[i]!==n[i])return!1;return!0}_createBuffer(e){var i;this._buffer&&this._buffer.destroy();const{isIndexed:n,type:r}=this.settings;return this._buffer=this.device.createBuffer({...(i=this._buffer)==null?void 0:i.props,id:this.id,usage:(n?lr.INDEX:lr.VERTEX)|lr.COPY_DST,indexType:n?r:void 0,byteLength:e}),this._buffer}}const eN=[],tN=[];function Ey(t,e=0,n=1/0){let r=eN;const i={index:-1,data:t,target:[]};return t?typeof t[Symbol.iterator]=="function"?r=t:t.length>0&&(tN.length=t.length,r=tN):r=eN,(e>0||Number.isFinite(n))&&(r=(Array.isArray(r)?r:Array.from(r)).slice(e,n),i.index=e-1),{iterable:r,objectInfo:i}}function eq(t){return t&&t[Symbol.asyncIterator]}function tq(t,e){const{size:n,stride:r,offset:i,startIndices:s,nested:o}=e,a=t.BYTES_PER_ELEMENT,l=r?r/a:n,c=i?i/a:0,u=Math.floor((t.length-c)/l);return(h,{index:d,target:m})=>{if(!s){const x=d*l+c;for(let T=0;T<n;T++)m[T]=t[x+T];return m}const y=s[d],v=s[d+1]||u;let b;if(o){b=new Array(v-y);for(let x=y;x<v;x++){const T=x*l+c;m=new Array(n);for(let E=0;E<n;E++)m[E]=t[T+E];b[x-y]=m}}else if(l===n)b=t.subarray(y*n+c,v*n+c);else{b=new t.constructor((v-y)*n);let x=0;for(let T=y;T<v;T++){const E=T*l+c;for(let C=0;C<n;C++)b[x++]=t[E+C]}}return b}}const Tde=[],y_=[[0,1/0]];function Cde(t,e){if(t===y_||(e[0]<0&&(e[0]=0),e[0]>=e[1]))return t;const n=[],r=t.length;let i=0;for(let s=0;s<r;s++){const o=t[s];o[1]<e[0]?(n.push(o),i=s+1):o[0]>e[1]?n.push(o):e=[Math.min(o[0],e[0]),Math.max(o[1],e[1])]}return n.splice(i,0,e),n}const Pde={interpolation:{duration:0,easing:t=>t},spring:{stiffness:.05,damping:.5}};function nq(t,e){if(!t)return null;Number.isFinite(t)&&(t={type:"interpolation",duration:t});const n=t.type||"interpolation";return{...Pde[n],...e,...t,type:n}}class rq extends Sde{constructor(e,n){super(e,n,{startIndices:null,lastExternalBuffer:null,binaryValue:null,binaryAccessor:null,needsUpdate:!0,needsRedraw:!1,layoutChanged:!1,updateRanges:y_}),this.constant=!1,this.settings.update=n.update||(n.accessor?this._autoUpdater:void 0),Object.seal(this.settings),Object.seal(this.state),this._validateAttributeUpdaters()}get startIndices(){return this.state.startIndices}set startIndices(e){this.state.startIndices=e}needsUpdate(){return this.state.needsUpdate}needsRedraw({clearChangedFlags:e=!1}={}){const n=this.state.needsRedraw;return this.state.needsRedraw=n&&!e,n}layoutChanged(){return this.state.layoutChanged}setAccessor(e){var n;(n=this.state).layoutChanged||(n.layoutChanged=!Ade(e,this.getAccessor())),super.setAccessor(e)}getUpdateTriggers(){const{accessor:e}=this.settings;return[this.id].concat(typeof e!="function"&&e||[])}supportsTransition(){return!!this.settings.transition}getTransitionSetting(e){if(!e||!this.supportsTransition())return null;const{accessor:n}=this.settings,r=this.settings.transition,i=Array.isArray(n)?e[n.find(s=>e[s])]:e[n];return nq(i,r)}setNeedsUpdate(e=this.id,n){if(this.state.needsUpdate=this.state.needsUpdate||e,this.setNeedsRedraw(e),n){const{startRow:r=0,endRow:i=1/0}=n;this.state.updateRanges=Cde(this.state.updateRanges,[r,i])}else this.state.updateRanges=y_}clearNeedsUpdate(){this.state.needsUpdate=!1,this.state.updateRanges=Tde}setNeedsRedraw(e=this.id){this.state.needsRedraw=this.state.needsRedraw||e}allocate(e){const{state:n,settings:r}=this;return r.noAlloc?!1:r.update?(super.allocate(e,n.updateRanges!==y_),!0):!1}updateBuffer({numInstances:e,data:n,props:r,context:i}){if(!this.needsUpdate())return!1;const{state:{updateRanges:s},settings:{update:o,noAlloc:a}}=this;let l=!0;if(o){for(const[c,u]of s)o.call(i,this,{data:n,startRow:c,endRow:u,props:r,numInstances:e});if(this.value)if(this.constant||!this.buffer||this.buffer.byteLength<this.value.byteLength+this.byteOffset)this.setData({value:this.value,constant:this.constant}),this.constant=!1;else for(const[c,u]of s){const h=Number.isFinite(c)?this.getVertexOffset(c):0,d=Number.isFinite(u)?this.getVertexOffset(u):a||!Number.isFinite(e)?this.value.length:e*this.size;super.updateSubBuffer({startOffset:h,endOffset:d})}this._checkAttributeArray()}else l=!1;return this.clearNeedsUpdate(),this.setNeedsRedraw(),l}setConstantValue(e){return this.device.type==="webgpu"||e===void 0||typeof e=="function"?!1:(this.setData({constant:!0,value:e})&&this.setNeedsRedraw(),this.clearNeedsUpdate(),!0)}setExternalBuffer(e){const{state:n}=this;return e?(this.clearNeedsUpdate(),n.lastExternalBuffer===e||(n.lastExternalBuffer=e,this.setNeedsRedraw(),this.setData(e)),!0):(n.lastExternalBuffer=null,!1)}setBinaryValue(e,n=null){const{state:r,settings:i}=this;if(!e)return r.binaryValue=null,r.binaryAccessor=null,!1;if(i.noAlloc)return!1;if(r.binaryValue===e)return this.clearNeedsUpdate(),!0;if(r.binaryValue=e,this.setNeedsRedraw(),i.transform||n!==this.startIndices){ArrayBuffer.isView(e)&&(e={value:e});const o=e;Ti(ArrayBuffer.isView(o.value),`invalid ${i.accessor}`);const a=!!o.size&&o.size!==this.size;return r.binaryAccessor=tq(o.value,{size:o.size||this.size,stride:o.stride,offset:o.offset,startIndices:n,nested:a}),!1}return this.clearNeedsUpdate(),this.setData(e),!0}getVertexOffset(e){const{startIndices:n}=this;return(n?e<n.length?n[e]:this.numInstances:e)*this.size}getValue(){const e=this.settings.shaderAttributes,n=super.getValue();if(!e)return n;for(const r in e)Object.assign(n,super.getValue(r,e[r]));return n}getBufferLayout(e){this.state.layoutChanged=!1;const n=this.settings.shaderAttributes,r=super._getBufferLayout(),{stepMode:i}=this.settings;if(i==="dynamic"?r.stepMode=e?e.isInstanced?"instance":"vertex":"instance":r.stepMode=i??"vertex",!n)return r;for(const s in n){const o=super._getBufferLayout(s,n[s]);r.attributes.push(...o.attributes)}return r}_autoUpdater(e,{data:n,startRow:r,endRow:i,props:s,numInstances:o}){if(e.constant&&this.context.device.type!=="webgpu")return;const{settings:a,state:l,value:c,size:u,startIndices:h}=e,{accessor:d,transform:m}=a;let y=l.binaryAccessor||(typeof d=="function"?d:s[d]);typeof y!="function"&&(y=()=>y),Ti(typeof y=="function",`accessor "${d}" is not a function`);let v=e.getVertexOffset(r);const{iterable:b,objectInfo:x}=Ey(n,r,i);for(const T of b){x.index++;let E=y(T,x);if(m&&(E=m.call(this,E)),h){const C=(x.index<h.length-1?h[x.index+1]:o)-h[x.index];if(E&&Array.isArray(E[0])){let I=v;for(const O of E)e._normalizeValue(O,c,I),I+=u}else E&&E.length>u?c.set(E,v):(e._normalizeValue(E,x.target,0),Vue({target:c,source:x.target,start:v,count:C}));v+=C*u}else e._normalizeValue(E,c,v),v+=u}}_validateAttributeUpdaters(){const{settings:e}=this;if(!(e.noAlloc||typeof e.update=="function"))throw new Error(`Attribute ${this.id} missing update or accessor`)}_checkAttributeArray(){const{value:e}=this,n=Math.min(4,this.size);if(e&&e.length>=n){let r=!0;switch(n){case 4:r=r&&Number.isFinite(e[3]);case 3:r=r&&Number.isFinite(e[2]);case 2:r=r&&Number.isFinite(e[1]);case 1:r=r&&Number.isFinite(e[0]);break;default:r=!1}if(!r)throw new Error(`Illegal attribute generated for ${this.id}`)}}}function EE(t){const{source:e,target:n,start:r=0,size:i,getData:s}=t,o=t.end||n.length,a=e.length,l=o-r;if(a>l){n.set(e.subarray(0,l),r);return}if(n.set(e,r),!s)return;let c=a;for(;c<l;){const u=s(c,e);for(let h=0;h<i;h++)n[r+c]=u[h]||0,c++}}function Ide({source:t,target:e,size:n,getData:r,sourceStartIndices:i,targetStartIndices:s}){if(!i||!s)return EE({source:t,target:e,size:n,getData:r}),e;let o=0,a=0;const l=r&&((u,h)=>r(u+a,h)),c=Math.min(i.length,s.length);for(let u=1;u<c;u++){const h=i[u]*n,d=s[u]*n;EE({source:t.subarray(o,h),target:e,start:a,end:d,size:n,getData:l}),o=h,a=d}return a<e.length&&EE({source:[],target:e,start:a,size:n,getData:l}),e}function Ode(t){const{device:e,settings:n,value:r}=t,i=new rq(e,n);return i.setData({value:r instanceof Float64Array?new Float64Array(0):new Float32Array(0),normalized:n.normalized}),i}function iq(t){switch(t){case 1:return"float";case 2:return"vec2";case 3:return"vec3";case 4:return"vec4";default:throw new Error(`No defined attribute type for size "${t}"`)}}function sq(t){switch(t){case 1:return"float32";case 2:return"float32x2";case 3:return"float32x3";case 4:return"float32x4";default:throw new Error("invalid type size")}}function oq(t){t.push(t.shift())}function Mde(t,e){const{doublePrecision:n,settings:r,value:i,size:s}=t,o=n&&i instanceof Float64Array?2:1;let a=0;const{shaderAttributes:l}=t.settings;if(l)for(const c of Object.values(l))a=Math.max(a,c.vertexOffset??0);return(r.noAlloc?i.length:(e+a)*s)*o}function aq({device:t,source:e,target:n}){return(!n||n.byteLength<e.byteLength)&&(n==null||n.destroy(),n=t.createBuffer({byteLength:e.byteLength,usage:e.usage})),n}function lq({device:t,buffer:e,attribute:n,fromLength:r,toLength:i,fromStartIndices:s,getData:o=a=>a}){const a=n.doublePrecision&&n.value instanceof Float64Array?2:1,l=n.size*a,c=n.byteOffset,u=n.settings.bytesPerElement<4?c/n.settings.bytesPerElement*4:c,h=n.startIndices,d=s&&h,m=n.isConstant;if(!d&&e&&r>=i)return e;const y=n.value instanceof Float64Array?Float32Array:n.value.constructor,v=m?n.value:new y(n.getBuffer().readSyncWebGL(c,i*y.BYTES_PER_ELEMENT).buffer);if(n.settings.normalized&&!m){const E=o;o=(C,I)=>n.normalizeConstant(E(C,I))}const b=m?(E,C)=>o(v,C):(E,C)=>o(v.subarray(E+c,E+c+l),C),x=e?new Float32Array(e.readSyncWebGL(u,r*4).buffer):new Float32Array(0),T=new Float32Array(i);return Ide({source:x,target:T,sourceStartIndices:s,targetStartIndices:h,size:l,getData:b}),(!e||e.byteLength<T.byteLength+u)&&(e==null||e.destroy(),e=t.createBuffer({byteLength:T.byteLength+u,usage:35050})),e.write(T,u),e}class cq{constructor({device:e,attribute:n,timeline:r}){this.buffers=[],this.currentLength=0,this.device=e,this.transition=new Kx(r),this.attribute=n,this.attributeInTransition=Ode(n),this.currentStartIndices=n.startIndices}get inProgress(){return this.transition.inProgress}start(e,n,r=1/0){this.settings=e,this.currentStartIndices=this.attribute.startIndices,this.currentLength=Mde(this.attribute,n),this.transition.start({...e,duration:r})}update(){const e=this.transition.update();return e&&this.onUpdate(),e}setBuffer(e){this.attributeInTransition.setData({buffer:e,normalized:this.attribute.settings.normalized,value:this.attributeInTransition.value})}cancel(){this.transition.cancel()}delete(){this.cancel();for(const e of this.buffers)e.destroy();this.buffers.length=0}}class Rde extends cq{constructor({device:e,attribute:n,timeline:r}){super({device:e,attribute:n,timeline:r}),this.type="interpolation",this.transform=Bde(e,n)}start(e,n){const r=this.currentLength,i=this.currentStartIndices;if(super.start(e,n,e.duration),e.duration<=0){this.transition.cancel();return}const{buffers:s,attribute:o}=this;oq(s),s[0]=lq({device:this.device,buffer:s[0],attribute:o,fromLength:r,toLength:this.currentLength,fromStartIndices:i,getData:e.enter}),s[1]=aq({device:this.device,source:s[0],target:s[1]}),this.setBuffer(s[1]);const{transform:a}=this,l=a.model;let c=Math.floor(this.currentLength/o.size);uq(o)&&(c/=2),l.setVertexCount(c),o.isConstant?(l.setAttributes({aFrom:s[0]}),l.setConstantAttributes({aTo:o.value})):l.setAttributes({aFrom:s[0],aTo:o.getBuffer()}),a.transformFeedback.setBuffers({vCurrent:s[1]})}onUpdate(){const{duration:e,easing:n}=this.settings,{time:r}=this.transition;let i=r/e;n&&(i=n(i));const{model:s}=this.transform,o={time:i};s.shaderInputs.setProps({interpolation:o}),this.transform.run({discard:!0})}delete(){super.delete(),this.transform.destroy()}}const kde=`uniform interpolationUniforms {
1549  float time;
1550} interpolation;
1551`,nN={name:"interpolation",vs:kde,uniformTypes:{time:"f32"}},Nde=`#version 300 es
1552#define SHADER_NAME interpolation-transition-vertex-shader
1553
1554in ATTRIBUTE_TYPE aFrom;
1555in ATTRIBUTE_TYPE aTo;
1556out ATTRIBUTE_TYPE vCurrent;
1557
1558void main(void) {
1559  vCurrent = mix(aFrom, aTo, interpolation.time);
1560  gl_Position = vec4(0.0);
1561}
1562`,Dde=`#version 300 es
1563#define SHADER_NAME interpolation-transition-vertex-shader
1564
1565in ATTRIBUTE_TYPE aFrom;
1566in ATTRIBUTE_TYPE aFrom64Low;
1567in ATTRIBUTE_TYPE aTo;
1568in ATTRIBUTE_TYPE aTo64Low;
1569out ATTRIBUTE_TYPE vCurrent;
1570out ATTRIBUTE_TYPE vCurrent64Low;
1571
1572vec2 mix_fp64(vec2 a, vec2 b, float x) {
1573  vec2 range = sub_fp64(b, a);
1574  return sum_fp64(a, mul_fp64(range, vec2(x, 0.0)));
1575}
1576
1577void main(void) {
1578  for (int i=0; i<ATTRIBUTE_SIZE; i++) {
1579    vec2 value = mix_fp64(vec2(aFrom[i], aFrom64Low[i]), vec2(aTo[i], aTo64Low[i]), interpolation.time);
1580    vCurrent[i] = value.x;
1581    vCurrent64Low[i] = value.y;
1582  }
1583  gl_Position = vec4(0.0);
1584}
1585`;function uq(t){return t.doublePrecision&&t.value instanceof Float64Array}function Bde(t,e){const n=e.size,r=iq(n),i=sq(n),s=e.getBufferLayout();return uq(e)?new em(t,{vs:Dde,bufferLayout:[{name:"aFrom",byteStride:8*n,attributes:[{attribute:"aFrom",format:i,byteOffset:0},{attribute:"aFrom64Low",format:i,byteOffset:4*n}]},{name:"aTo",byteStride:8*n,attributes:[{attribute:"aTo",format:i,byteOffset:0},{attribute:"aTo64Low",format:i,byteOffset:4*n}]}],modules:[$ae,nN],defines:{ATTRIBUTE_TYPE:r,ATTRIBUTE_SIZE:n},moduleSettings:{},varyings:["vCurrent","vCurrent64Low"],bufferMode:35980,disableWarnings:!0}):new em(t,{vs:Nde,bufferLayout:[{name:"aFrom",format:i},{name:"aTo",format:s.attributes[0].format}],modules:[nN],defines:{ATTRIBUTE_TYPE:r},varyings:["vCurrent"],disableWarnings:!0})}class Lde extends cq{constructor({device:e,attribute:n,timeline:r}){super({device:e,attribute:n,timeline:r}),this.type="spring",this.texture=Wde(e),this.framebuffer=$de(e,this.texture),this.transform=Vde(e,n)}start(e,n){const r=this.currentLength,i=this.currentStartIndices;super.start(e,n);const{buffers:s,attribute:o}=this;for(let l=0;l<2;l++)s[l]=lq({device:this.device,buffer:s[l],attribute:o,fromLength:r,toLength:this.currentLength,fromStartIndices:i,getData:e.enter});s[2]=aq({device:this.device,source:s[0],target:s[2]}),this.setBuffer(s[1]);const{model:a}=this.transform;a.setVertexCount(Math.floor(this.currentLength/o.size)),o.isConstant?a.setConstantAttributes({aTo:o.value}):a.setAttributes({aTo:o.getBuffer()})}onUpdate(){const{buffers:e,transform:n,framebuffer:r,transition:i}=this,s=this.settings;n.model.setAttributes({aPrev:e[0],aCur:e[1]}),n.transformFeedback.setBuffers({vNext:e[2]});const o={stiffness:s.stiffness,damping:s.damping};n.model.shaderInputs.setProps({spring:o}),n.run({framebuffer:r,discard:!1,parameters:{viewport:[0,0,1,1]},clearColor:[0,0,0,0]}),oq(e),this.setBuffer(e[1]),this.device.readPixelsToArrayWebGL(r)[0]>0||i.end()}delete(){super.delete(),this.transform.destroy(),this.texture.destroy(),this.framebuffer.destroy()}}const Fde=`uniform springUniforms {
1586  float damping;
1587  float stiffness;
1588} spring;
1589`,Ude={name:"spring",vs:Fde,uniformTypes:{damping:"f32",stiffness:"f32"}},zde=`#version 300 es
1590#define SHADER_NAME spring-transition-vertex-shader
1591
1592#define EPSILON 0.00001
1593
1594in ATTRIBUTE_TYPE aPrev;
1595in ATTRIBUTE_TYPE aCur;
1596in ATTRIBUTE_TYPE aTo;
1597out ATTRIBUTE_TYPE vNext;
1598out float vIsTransitioningFlag;
1599
1600ATTRIBUTE_TYPE getNextValue(ATTRIBUTE_TYPE cur, ATTRIBUTE_TYPE prev, ATTRIBUTE_TYPE dest) {
1601  ATTRIBUTE_TYPE velocity = cur - prev;
1602  ATTRIBUTE_TYPE delta = dest - cur;
1603  ATTRIBUTE_TYPE force = delta * spring.stiffness;
1604  ATTRIBUTE_TYPE resistance = velocity * spring.damping;
1605  return force - resistance + velocity + cur;
1606}
1607
1608void main(void) {
1609  bool isTransitioning = length(aCur - aPrev) > EPSILON || length(aTo - aCur) > EPSILON;
1610  vIsTransitioningFlag = isTransitioning ? 1.0 : 0.0;
1611
1612  vNext = getNextValue(aCur, aPrev, aTo);
1613  gl_Position = vec4(0, 0, 0, 1);
1614  gl_PointSize = 100.0;
1615}
1616`,jde=`#version 300 es
1617#define SHADER_NAME spring-transition-is-transitioning-fragment-shader
1618
1619in float vIsTransitioningFlag;
1620
1621out vec4 fragColor;
1622
1623void main(void) {
1624  if (vIsTransitioningFlag == 0.0) {
1625    discard;
1626  }
1627  fragColor = vec4(1.0);
1628}`;function Vde(t,e){const n=iq(e.size),r=sq(e.size);return new em(t,{vs:zde,fs:jde,bufferLayout:[{name:"aPrev",format:r},{name:"aCur",format:r},{name:"aTo",format:e.getBufferLayout().attributes[0].format}],varyings:["vNext"],modules:[Ude],defines:{ATTRIBUTE_TYPE:n},parameters:{depthCompare:"always",blendColorOperation:"max",blendColorSrcFactor:"one",blendColorDstFactor:"one",blendAlphaOperation:"max",blendAlphaSrcFactor:"one",blendAlphaDstFactor:"one"}})}function Wde(t){return t.createTexture({data:new Uint8Array(4),format:"rgba8unorm",mipmaps:!1,width:1,height:1})}function $de(t,e){return t.createFramebuffer({id:"spring-transition-is-transitioning-framebuffer",width:1,height:1,colorAttachments:[e]})}const Hde={interpolation:Rde,spring:Lde};class qde{constructor(e,{id:n,timeline:r}){if(!e)throw new Error("AttributeTransitionManager is constructed without device");this.id=n,this.device=e,this.timeline=r,this.transitions={},this.needsRedraw=!1,this.numInstances=1}finalize(){for(const e in this.transitions)this._removeTransition(e)}update({attributes:e,transitions:n,numInstances:r}){this.numInstances=r||1;for(const i in e){const s=e[i],o=s.getTransitionSetting(n);o&&this._updateAttribute(i,s,o)}for(const i in this.transitions){const s=e[i];(!s||!s.getTransitionSetting(n))&&this._removeTransition(i)}}hasAttribute(e){const n=this.transitions[e];return n&&n.inProgress}getAttributes(){const e={};for(const n in this.transitions){const r=this.transitions[n];r.inProgress&&(e[n]=r.attributeInTransition)}return e}run(){if(this.numInstances===0)return!1;for(const n in this.transitions)this.transitions[n].update()&&(this.needsRedraw=!0);const e=this.needsRedraw;return this.needsRedraw=!1,e}_removeTransition(e){this.transitions[e].delete(),delete this.transitions[e]}_updateAttribute(e,n,r){const i=this.transitions[e];let s=!i||i.type!==r.type;if(s){i&&this._removeTransition(e);const o=Hde[r.type];o?this.transitions[e]=new o({attribute:n,timeline:this.timeline,device:this.device}):(Zt.error(`unsupported transition type '${r.type}'`)(),s=!1)}(s||n.needsRedraw())&&(this.needsRedraw=!0,this.transitions[e].start(r,this.numInstances))}}const rN="attributeManager.invalidate",Qde="attributeManager.updateStart",Xde="attributeManager.updateEnd",Yde="attribute.updateStart",Kde="attribute.allocate",Gde="attribute.updateEnd";class Zde{constructor(e,{id:n="attribute-manager",stats:r,timeline:i}={}){this.mergeBoundsMemoized=xy(fue),this.id=n,this.device=e,this.attributes={},this.updateTriggers={},this.needsRedraw=!0,this.userData={},this.stats=r,this.attributeTransitionManager=new qde(e,{id:`${n}-transitions`,timeline:i}),Object.seal(this)}finalize(){for(const e in this.attributes)this.attributes[e].delete();this.attributeTransitionManager.finalize()}getNeedsRedraw(e={clearRedrawFlags:!1}){const n=this.needsRedraw;return this.needsRedraw=this.needsRedraw&&!e.clearRedrawFlags,n&&this.id}setNeedsRedraw(){this.needsRedraw=!0}add(e){this._add(e)}addInstanced(e){this._add(e,{stepMode:"instance"})}remove(e){for(const n of e)this.attributes[n]!==void 0&&(this.attributes[n].delete(),delete this.attributes[n])}invalidate(e,n){const r=this._invalidateTrigger(e,n);$i(rN,this,e,r)}invalidateAll(e){for(const n in this.attributes)this.attributes[n].setNeedsUpdate(n,e);$i(rN,this,"all")}update({data:e,numInstances:n,startIndices:r=null,transitions:i,props:s={},buffers:o={},context:a={}}){let l=!1;$i(Qde,this),this.stats&&this.stats.get("Update Attributes").timeStart();for(const c in this.attributes){const u=this.attributes[c],h=u.settings.accessor;u.startIndices=r,u.numInstances=n,s[c]&&Zt.removed(`props.${c}`,`data.attributes.${c}`)(),u.setExternalBuffer(o[c])||u.setBinaryValue(typeof h=="string"?o[h]:void 0,e.startIndices)||typeof h=="string"&&!o[h]&&u.setConstantValue(s[h])||u.needsUpdate()&&(l=!0,this._updateAttribute({attribute:u,numInstances:n,data:e,props:s,context:a})),this.needsRedraw=this.needsRedraw||u.needsRedraw()}l&&$i(Xde,this,n),this.stats&&this.stats.get("Update Attributes").timeEnd(),this.attributeTransitionManager.update({attributes:this.attributes,numInstances:n,transitions:i})}updateTransition(){const{attributeTransitionManager:e}=this,n=e.run();return this.needsRedraw=this.needsRedraw||n,n}getAttributes(){return{...this.attributes,...this.attributeTransitionManager.getAttributes()}}getBounds(e){const n=e.map(r=>{var i;return(i=this.attributes[r])==null?void 0:i.getBounds()});return this.mergeBoundsMemoized(n)}getChangedAttributes(e={clearChangedFlags:!1}){const{attributes:n,attributeTransitionManager:r}=this,i={...r.getAttributes()};for(const s in n){const o=n[s];o.needsRedraw(e)&&!r.hasAttribute(s)&&(i[s]=o)}return i}getBufferLayouts(e){return Object.values(this.getAttributes()).map(n=>n.getBufferLayout(e))}_add(e,n){for(const r in e){const i=e[r],s={...i,id:r,size:i.isIndexed&&1||i.size||1,...n};this.attributes[r]=new rq(this.device,s)}this._mapUpdateTriggersToAttributes()}_mapUpdateTriggersToAttributes(){const e={};for(const n in this.attributes)this.attributes[n].getUpdateTriggers().forEach(i=>{e[i]||(e[i]=[]),e[i].push(n)});this.updateTriggers=e}_invalidateTrigger(e,n){const{attributes:r,updateTriggers:i}=this,s=i[e];return s&&s.forEach(o=>{const a=r[o];a&&a.setNeedsUpdate(a.id,n)}),s}_updateAttribute(e){const{attribute:n,numInstances:r}=e;if($i(Yde,n),n.constant){n.setConstantValue(n.value);return}n.allocate(r)&&$i(Kde,n,r),n.updateBuffer(e)&&(this.needsRedraw=!0,$i(Gde,n,r))}}class Jde extends Kx{get value(){return this._value}_onUpdate(){const{time:e,settings:{fromValue:n,toValue:r,duration:i,easing:s}}=this,o=s(e/i);this._value=Sl(n,r,o)}}const iN=1e-5;function sN(t,e,n,r,i){const s=e-t,a=(n-e)*i,l=-s*r;return a+l+s+e}function epe(t,e,n,r,i){if(Array.isArray(n)){const s=[];for(let o=0;o<n.length;o++)s[o]=sN(t[o],e[o],n[o],r,i);return s}return sN(t,e,n,r,i)}function oN(t,e){if(Array.isArray(t)){let n=0;for(let r=0;r<t.length;r++){const i=t[r]-e[r];n+=i*i}return Math.sqrt(n)}return Math.abs(t-e)}class tpe extends Kx{get value(){return this._currValue}_onUpdate(){const{fromValue:e,toValue:n,damping:r,stiffness:i}=this.settings,{_prevValue:s=e,_currValue:o=e}=this;let a=epe(s,o,n,r,i);const l=oN(a,n),c=oN(a,o);l<iN&&c<iN&&(a=n,this.end()),this._prevValue=o,this._currValue=a}}const npe={interpolation:Jde,spring:tpe};class rpe{constructor(e){this.transitions=new Map,this.timeline=e}get active(){return this.transitions.size>0}add(e,n,r,i){const{transitions:s}=this;if(s.has(e)){const l=s.get(e),{value:c=l.settings.fromValue}=l;n=c,this.remove(e)}if(i=nq(i),!i)return;const o=npe[i.type];if(!o){Zt.error(`unsupported transition type '${i.type}'`)();return}const a=new o(this.timeline);a.start({...i,fromValue:n,toValue:r}),s.set(e,a)}remove(e){const{transitions:n}=this;n.has(e)&&(n.get(e).cancel(),n.delete(e))}update(){const e={};for(const[n,r]of this.transitions)r.update(),e[n]=r.value,r.inProgress||this.remove(n);return e}clear(){for(const e of this.transitions.keys())this.remove(e)}}function ipe(t){const e=t[rf];for(const n in e){const r=e[n],{validate:i}=r;if(i&&!i(t[n],r))throw new Error(`Invalid prop ${n}: ${t[n]}`)}}function spe(t,e){const n=fq({newProps:t,oldProps:e,propTypes:t[rf],ignoreProps:{data:null,updateTriggers:null,extensions:null,transitions:null}}),r=ape(t,e);let i=!1;return r||(i=lpe(t,e)),{dataChanged:r,propsChanged:n,updateTriggersChanged:i,extensionsChanged:cpe(t,e),transitionsChanged:ope(t,e)}}function ope(t,e){if(!t.transitions)return!1;const n={},r=t[rf];let i=!1;for(const s in t.transitions){const o=r[s],a=o&&o.type;(a==="number"||a==="color"||a==="array")&&NP(t[s],e[s],o)&&(n[s]=!0,i=!0)}return i?n:!1}function fq({newProps:t,oldProps:e,ignoreProps:n={},propTypes:r={},triggerName:i="props"}){if(e===t)return!1;if(typeof t!="object"||t===null)return`${i} changed shallowly`;if(typeof e!="object"||e===null)return`${i} changed shallowly`;for(const s of Object.keys(t))if(!(s in n)){if(!(s in e))return`${i}.${s} added`;const o=NP(t[s],e[s],r[s]);if(o)return`${i}.${s} ${o}`}for(const s of Object.keys(e))if(!(s in n)){if(!(s in t))return`${i}.${s} dropped`;if(!Object.hasOwnProperty.call(t,s)){const o=NP(t[s],e[s],r[s]);if(o)return`${i}.${s} ${o}`}}return!1}function NP(t,e,n){let r=n&&n.equal;return r&&!r(t,e,n)||!r&&(r=t&&e&&t.equals,r&&!r.call(t,e))?"changed deeply":!r&&e!==t?"changed shallowly":null}function ape(t,e){if(e===null)return"oldProps is null, initial diff";let n=!1;const{dataComparator:r,_dataDiff:i}=t;return r?r(t.data,e.data)||(n="Data comparator detected a change"):t.data!==e.data&&(n="A new data container was supplied"),n&&i&&(n=i(t.data,e.data)||n),n}function lpe(t,e){if(e===null)return{all:!0};if("all"in t.updateTriggers&&aN(t,e,"all"))return{all:!0};const n={};let r=!1;for(const i in t.updateTriggers)i!=="all"&&aN(t,e,i)&&(n[i]=!0,r=!0);return r?n:!1}function cpe(t,e){if(e===null)return!0;const n=e.extensions,{extensions:r}=t;if(r===n)return!1;if(!n||!r||r.length!==n.length)return!0;for(let i=0;i<r.length;i++)if(!r[i].equals(n[i]))return!0;return!1}function aN(t,e,n){let r=t.updateTriggers[n];r=r??{};let i=e.updateTriggers[n];return i=i??{},fq({oldProps:i,newProps:r,triggerName:n})}const upe="count(): argument not an object",fpe="count(): argument not a container";function hpe(t){if(!ppe(t))throw new Error(upe);if(typeof t.count=="function")return t.count();if(Number.isFinite(t.size))return t.size;if(Number.isFinite(t.length))return t.length;if(dpe(t))return Object.keys(t).length;throw new Error(fpe)}function dpe(t){return t!==null&&typeof t=="object"&&t.constructor===Object}function ppe(t){return t!==null&&typeof t=="object"}function iw(t,e){if(!e)return t;const n={...t,...e};if("defines"in e&&(n.defines={...t.defines,...e.defines}),"modules"in e&&(n.modules=(t.modules||[]).concat(e.modules),e.modules.some(r=>r.name==="project64"))){const r=n.modules.findIndex(i=>i.name==="project32");r>=0&&n.modules.splice(r,1)}if("inject"in e)if(!t.inject)n.inject=e.inject;else{const r={...t.inject};for(const i in e.inject)r[i]=(r[i]||"")+e.inject[i];n.inject=r}return n}const gpe={minFilter:"linear",mipmapFilter:"linear",magFilter:"linear",addressModeU:"clamp-to-edge",addressModeV:"clamp-to-edge"},DP={};function mpe(t,e,n,r){if(n instanceof ar)return n;n.constructor&&n.constructor.name!=="Object"&&(n={data:n});let i=null;n.compressed&&(i={minFilter:"linear",mipmapFilter:n.data.length>1?"nearest":"linear"});const s=e.createTexture({...n,sampler:{...gpe,...i,...r},mipmaps:!0});return DP[s.id]=t,s}function vpe(t,e){!e||!(e instanceof ar)||DP[e.id]===t&&(e.delete(),delete DP[e.id])}const ype={boolean:{validate(t,e){return!0},equal(t,e,n){return!!t==!!e}},number:{validate(t,e){return Number.isFinite(t)&&(!("max"in e)||t<=e.max)&&(!("min"in e)||t>=e.min)}},color:{validate(t,e){return e.optional&&!t||BP(t)&&(t.length===3||t.length===4)},equal(t,e,n){return Ii(t,e,1)}},accessor:{validate(t,e){const n=sw(t);return n==="function"||n===sw(e.value)},equal(t,e,n){return typeof e=="function"?!0:Ii(t,e,1)}},array:{validate(t,e){return e.optional&&!t||BP(t)},equal(t,e,n){const{compare:r}=n,i=Number.isInteger(r)?r:r?1:0;return r?Ii(t,e,i):t===e}},object:{equal(t,e,n){if(n.ignore)return!0;const{compare:r}=n,i=Number.isInteger(r)?r:r?1:0;return r?Ii(t,e,i):t===e}},function:{validate(t,e){return e.optional&&!t||typeof t=="function"},equal(t,e,n){return!n.compare&&n.ignore!==!1||t===e}},data:{transform:(t,e,n)=>{if(!t)return t;const{dataTransform:r}=n.props;return r?r(t):typeof t.shape=="string"&&t.shape.endsWith("-table")&&Array.isArray(t.data)?t.data:t}},image:{transform:(t,e,n)=>{const r=n.context;return!r||!r.device?null:mpe(n.id,r.device,t,{...e.parameters,...n.props.textureParameters})},release:(t,e,n)=>{vpe(n.id,t)}}};function bpe(t){const e={},n={},r={};for(const[i,s]of Object.entries(t)){const o=s==null?void 0:s.deprecatedFor;if(o)r[i]=Array.isArray(o)?o:[o];else{const a=_pe(i,s);e[i]=a,n[i]=a.value}}return{propTypes:e,defaultProps:n,deprecatedProps:r}}function _pe(t,e){switch(sw(e)){case"object":return h1(t,e);case"array":return h1(t,{type:"array",value:e,compare:!1});case"boolean":return h1(t,{type:"boolean",value:e});case"number":return h1(t,{type:"number",value:e});case"function":return h1(t,{type:"function",value:e,compare:!0});default:return{name:t,type:"unknown",value:e}}}function h1(t,e){return"type"in e?{name:t,...ype[e.type],...e}:"value"in e?{name:t,type:sw(e.value),...e}:{name:t,type:"object",value:e}}function BP(t){return Array.isArray(t)||ArrayBuffer.isView(t)}function sw(t){return BP(t)?"array":t===null?"null":typeof t}function wpe(t,e){let n;for(let s=e.length-1;s>=0;s--){const o=e[s];"extensions"in o&&(n=o.extensions)}const r=LP(t.constructor,n),i=Object.create(r);i[nw]=t,i[Jh]={},i[Gu]={};for(let s=0;s<e.length;++s){const o=e[s];for(const a in o)i[a]=o[a]}return Object.freeze(i),i}const xpe="_mergedDefaultProps";function LP(t,e){if(!(t instanceof Gx.constructor))return{};let n=xpe;if(e)for(const i of e){const s=i.constructor;s&&(n+=`:${s.extensionName||s.name}`)}const r=hq(t,n);return r||(t[n]=Ape(t,e||[]))}function Ape(t,e){if(!t.prototype)return null;const r=Object.getPrototypeOf(t),i=LP(r),s=hq(t,"defaultProps")||{},o=bpe(s),a=Object.assign(Object.create(null),i,o.defaultProps),l=Object.assign(Object.create(null),i==null?void 0:i[rf],o.propTypes),c=Object.assign(Object.create(null),i==null?void 0:i[bE],o.deprecatedProps);for(const u of e){const h=LP(u.constructor);h&&(Object.assign(a,h),Object.assign(l,h[rf]),Object.assign(c,h[bE]))}return Epe(a,t),Tpe(a,l),Spe(a,c),a[rf]=l,a[bE]=c,e.length===0&&!xM(t,"_propTypes")&&(t._propTypes=l),a}function Epe(t,e){const n=Ppe(e);Object.defineProperties(t,{id:{writable:!0,value:n}})}function Spe(t,e){for(const n in e)Object.defineProperty(t,n,{enumerable:!1,set(r){const i=`${this.id}: ${n}`;for(const s of e[n])xM(this,s)||(this[s]=r);Zt.deprecated(i,e[n].join("/"))()}})}function Tpe(t,e){const n={},r={};for(const i in e){const s=e[i],{name:o,value:a}=s;s.async&&(n[o]=a,r[o]=Cpe(o))}t[Mg]=n,t[Jh]={},Object.defineProperties(t,r)}function Cpe(t){return{enumerable:!0,set(e){typeof e=="string"||e instanceof Promise||eq(e)?this[Jh][t]=e:this[Gu][t]=e},get(){if(this[Gu]){if(t in this[Gu])return this[Gu][t]||this[Mg][t];if(t in this[Jh]){const e=this[nw]&&this[nw].internalState;if(e&&e.hasAsyncProp(t))return e.getAsyncProp(t)||this[Mg][t]}}return this[Mg][t]}}}function xM(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function hq(t,e){return xM(t,e)&&t[e]}function Ppe(t){const e=t.componentName;return e||Zt.warn(`${t.name}.componentName not specified`)(),e||t.name}let Ipe=0;class Gx{constructor(...e){this.props=wpe(this,e),this.id=this.props.id,this.count=Ipe++}clone(e){const{props:n}=this,r={};for(const i in n[Mg])i in n[Gu]?r[i]=n[Gu][i]:i in n[Jh]&&(r[i]=n[Jh][i]);return new this.constructor({...n,...r,...e})}}Gx.componentName="Component";Gx.defaultProps={};const Ope=Object.freeze({});class Mpe{constructor(e){this.component=e,this.asyncProps={},this.onAsyncPropUpdated=()=>{},this.oldProps=null,this.oldAsyncProps=null}finalize(){for(const e in this.asyncProps){const n=this.asyncProps[e];n&&n.type&&n.type.release&&n.type.release(n.resolvedValue,n.type,this.component)}this.asyncProps={},this.component=null,this.resetOldProps()}getOldProps(){return this.oldAsyncProps||this.oldProps||Ope}resetOldProps(){this.oldAsyncProps=null,this.oldProps=this.component?this.component.props:null}hasAsyncProp(e){return e in this.asyncProps}getAsyncProp(e){const n=this.asyncProps[e];return n&&n.resolvedValue}isAsyncPropLoading(e){if(e){const n=this.asyncProps[e];return!!(n&&n.pendingLoadCount>0&&n.pendingLoadCount!==n.resolvedLoadCount)}for(const n in this.asyncProps)if(this.isAsyncPropLoading(n))return!0;return!1}reloadAsyncProp(e,n){this._watchPromise(e,Promise.resolve(n))}setAsyncProps(e){this.component=e[nw]||this.component;const n=e[Gu]||{},r=e[Jh]||e,i=e[Mg]||{};for(const s in n){const o=n[s];this._createAsyncPropData(s,i[s]),this._updateAsyncProp(s,o),n[s]=this.getAsyncProp(s)}for(const s in r){const o=r[s];this._createAsyncPropData(s,i[s]),this._updateAsyncProp(s,o)}}_fetch(e,n){return null}_onResolve(e,n){}_onError(e,n){}_updateAsyncProp(e,n){if(this._didAsyncInputValueChange(e,n)){if(typeof n=="string"&&(n=this._fetch(e,n)),n instanceof Promise){this._watchPromise(e,n);return}if(eq(n)){this._resolveAsyncIterable(e,n);return}this._setPropValue(e,n)}}_freezeAsyncOldProps(){if(!this.oldAsyncProps&&this.oldProps){this.oldAsyncProps=Object.create(this.oldProps);for(const e in this.asyncProps)Object.defineProperty(this.oldAsyncProps,e,{enumerable:!0,value:this.oldProps[e]})}}_didAsyncInputValueChange(e,n){const r=this.asyncProps[e];return n===r.resolvedValue||n===r.lastValue?!1:(r.lastValue=n,!0)}_setPropValue(e,n){this._freezeAsyncOldProps();const r=this.asyncProps[e];r&&(n=this._postProcessValue(r,n),r.resolvedValue=n,r.pendingLoadCount++,r.resolvedLoadCount=r.pendingLoadCount)}_setAsyncPropValue(e,n,r){const i=this.asyncProps[e];i&&r>=i.resolvedLoadCount&&n!==void 0&&(this._freezeAsyncOldProps(),i.resolvedValue=n,i.resolvedLoadCount=r,this.onAsyncPropUpdated(e,n))}_watchPromise(e,n){const r=this.asyncProps[e];if(r){r.pendingLoadCount++;const i=r.pendingLoadCount;n.then(s=>{this.component&&(s=this._postProcessValue(r,s),this._setAsyncPropValue(e,s,i),this._onResolve(e,s))}).catch(s=>{this._onError(e,s)})}}async _resolveAsyncIterable(e,n){if(e!=="data"){this._setPropValue(e,n);return}const r=this.asyncProps[e];if(!r)return;r.pendingLoadCount++;const i=r.pendingLoadCount;let s=[],o=0;for await(const a of n){if(!this.component)return;const{dataTransform:l}=this.component.props;l?s=l(a,s):s=s.concat(a),Object.defineProperty(s,"__diff",{enumerable:!1,value:[{startRow:o,endRow:s.length}]}),o=s.length,this._setAsyncPropValue(e,s,i)}this._onResolve(e,s)}_postProcessValue(e,n){const r=e.type;return r&&this.component&&(r.release&&r.release(e.resolvedValue,r,this.component),r.transform)?r.transform(n,r,this.component):n}_createAsyncPropData(e,n){if(!this.asyncProps[e]){const i=this.component&&this.component.props[rf];this.asyncProps[e]={type:i&&i[e],lastValue:null,resolvedValue:n,pendingLoadCount:0,resolvedLoadCount:0}}}}class Rpe extends Mpe{constructor({attributeManager:e,layer:n}){super(n),this.attributeManager=e,this.needsRedraw=!0,this.needsUpdate=!0,this.subLayers=null,this.usesPickingColorCache=!1}get layer(){return this.component}_fetch(e,n){const r=this.layer,i=r==null?void 0:r.props.fetch;return i?i(n,{propName:e,layer:r}):super._fetch(e,n)}_onResolve(e,n){const r=this.layer;if(r){const i=r.props.onDataLoad;e==="data"&&i&&i(n,{propName:e,layer:r})}}_onError(e,n){const r=this.layer;r&&r.raiseError(n,`loading ${e} of ${this.layer}`)}}const kpe="layer.changeFlag",Npe="layer.initialize",Dpe="layer.update",Bpe="layer.finalize",Lpe="layer.matched",lN=2**24-1,Fpe=Object.freeze([]),Upe=xy(({oldViewport:t,viewport:e})=>t.equals(e));let da=new Uint8ClampedArray(0);const zpe={data:{type:"data",value:Fpe,async:!0},dataComparator:{type:"function",value:null,optional:!0},_dataDiff:{type:"function",value:t=>t&&t.__diff,optional:!0},dataTransform:{type:"function",value:null,optional:!0},onDataLoad:{type:"function",value:null,optional:!0},onError:{type:"function",value:null,optional:!0},fetch:{type:"function",value:(t,{propName:e,layer:n,loaders:r,loadOptions:i,signal:s})=>{const{resourceManager:o}=n.context;i=i||n.getLoadOptions(),r=r||n.props.loaders,s&&(i={...i,fetch:{...i==null?void 0:i.fetch,signal:s}});let a=o.contains(t);return!a&&!i&&(o.add({resourceId:t,data:F_(t,r),persistent:!1}),a=!0),a?o.subscribe({resourceId:t,onChange:l=>{var c;return(c=n.internalState)==null?void 0:c.reloadAsyncProp(e,l)},consumerId:n.id,requestId:e}):F_(t,r,i)}},updateTriggers:{},visible:!0,pickable:!1,opacity:{type:"number",min:0,max:1,value:1},operation:"draw",onHover:{type:"function",value:null,optional:!0},onClick:{type:"function",value:null,optional:!0},onDragStart:{type:"function",value:null,optional:!0},onDrag:{type:"function",value:null,optional:!0},onDragEnd:{type:"function",value:null,optional:!0},coordinateSystem:Wt.DEFAULT,coordinateOrigin:{type:"array",value:[0,0,0],compare:!0},modelMatrix:{type:"array",value:null,compare:!0,optional:!0},wrapLongitude:!1,positionFormat:"XYZ",colorFormat:"RGBA",parameters:{type:"object",value:{},optional:!0,compare:2},loadOptions:{type:"object",value:null,optional:!0,ignore:!0},transitions:null,extensions:[],loaders:{type:"array",value:[],optional:!0,ignore:!0},getPolygonOffset:{type:"function",value:({layerIndex:t})=>[0,-t*100]},highlightedObjectIndex:null,autoHighlight:!1,highlightColor:{type:"accessor",value:[0,0,128,128]}};let Wo=class extends Gx{constructor(){super(...arguments),this.internalState=null,this.lifecycle=hg.NO_STATE,this.parent=null}static get componentName(){return Object.prototype.hasOwnProperty.call(this,"layerName")?this.layerName:""}get root(){let e=this;for(;e.parent;)e=e.parent;return e}toString(){return`${this.constructor.layerName||this.constructor.name}({id: '${this.props.id}'})`}project(e){Ti(this.internalState);const n=this.internalState.viewport||this.context.viewport,r=OH(e,{viewport:n,modelMatrix:this.props.modelMatrix,coordinateOrigin:this.props.coordinateOrigin,coordinateSystem:this.props.coordinateSystem}),[i,s,o]=AH(r,n.pixelProjectionMatrix);return e.length===2?[i,s]:[i,s,o]}unproject(e){return Ti(this.internalState),(this.internalState.viewport||this.context.viewport).unproject(e)}projectPosition(e,n){Ti(this.internalState);const r=this.internalState.viewport||this.context.viewport;return vue(e,{viewport:r,modelMatrix:this.props.modelMatrix,coordinateOrigin:this.props.coordinateOrigin,coordinateSystem:this.props.coordinateSystem,...n})}get isComposite(){return!1}get isDrawable(){return!0}setState(e){this.setChangeFlags({stateChanged:!0}),Object.assign(this.state,e),this.setNeedsRedraw()}setNeedsRedraw(){this.internalState&&(this.internalState.needsRedraw=!0)}setNeedsUpdate(){this.internalState&&(this.context.layerManager.setNeedsUpdate(String(this)),this.internalState.needsUpdate=!0)}get isLoaded(){return this.internalState?!this.internalState.isAsyncPropLoading():!1}get wrapLongitude(){return this.props.wrapLongitude}isPickable(){return this.props.pickable&&this.props.visible}getModels(){const e=this.state;return e&&(e.models||e.model&&[e.model])||[]}setShaderModuleProps(...e){for(const n of this.getModels())n.shaderInputs.setProps(...e)}getAttributeManager(){return this.internalState&&this.internalState.attributeManager}getCurrentLayer(){return this.internalState&&this.internalState.layer}getLoadOptions(){return this.props.loadOptions}use64bitPositions(){const{coordinateSystem:e}=this.props;return e===Wt.DEFAULT||e===Wt.LNGLAT||e===Wt.CARTESIAN}onHover(e,n){return this.props.onHover&&this.props.onHover(e,n)||!1}onClick(e,n){return this.props.onClick&&this.props.onClick(e,n)||!1}nullPickingColor(){return[0,0,0]}encodePickingColor(e,n=[]){return n[0]=e+1&255,n[1]=e+1>>8&255,n[2]=e+1>>8>>8&255,n}decodePickingColor(e){Ti(e instanceof Uint8Array);const[n,r,i]=e;return n+r*256+i*65536-1}getNumInstances(){return Number.isFinite(this.props.numInstances)?this.props.numInstances:this.state&&this.state.numInstances!==void 0?this.state.numInstances:hpe(this.props.data)}getStartIndices(){return this.props.startIndices?this.props.startIndices:this.state&&this.state.startIndices?this.state.startIndices:null}getBounds(){var e;return(e=this.getAttributeManager())==null?void 0:e.getBounds(["positions","instancePositions"])}getShaders(e){e=iw(e,{disableWarnings:!0,modules:this.context.defaultShaderModules});for(const n of this.props.extensions)e=iw(e,n.getShaders.call(this,n));return e}shouldUpdateState(e){return e.changeFlags.propsOrDataChanged}updateState(e){const n=this.getAttributeManager(),{dataChanged:r}=e.changeFlags;if(r&&n)if(Array.isArray(r))for(const i of r)n.invalidateAll(i);else n.invalidateAll();if(n){const{props:i}=e,s=this.internalState.hasPickingBuffer,o=Number.isInteger(i.highlightedObjectIndex)||i.pickable||i.extensions.some(a=>a.getNeedsPickingBuffer.call(this,a));if(s!==o){this.internalState.hasPickingBuffer=o;const{pickingColors:a,instancePickingColors:l}=n.attributes,c=a||l;c&&(o&&c.constant&&(c.constant=!1,n.invalidate(c.id)),!c.value&&!o&&(c.constant=!0,c.value=[0,0,0]))}}}finalizeState(e){for(const r of this.getModels())r.destroy();const n=this.getAttributeManager();n&&n.finalize(),this.context&&this.context.resourceManager.unsubscribe({consumerId:this.id}),this.internalState&&(this.internalState.uniformTransitions.clear(),this.internalState.finalize())}draw(e){for(const n of this.getModels())n.draw(e.renderPass)}getPickingInfo({info:e,mode:n,sourceLayer:r}){const{index:i}=e;return i>=0&&Array.isArray(this.props.data)&&(e.object=this.props.data[i]),e}raiseError(e,n){var r,i,s,o;n&&(e=new Error(`${n}: ${e.message}`,{cause:e})),(i=(r=this.props).onError)!=null&&i.call(r,e)||(o=(s=this.context)==null?void 0:s.onError)==null||o.call(s,e,this)}getNeedsRedraw(e={clearRedrawFlags:!1}){return this._getNeedsRedraw(e)}needsUpdate(){return this.internalState?this.internalState.needsUpdate||this.hasUniformTransition()||this.shouldUpdateState(this._getUpdateParams()):!1}hasUniformTransition(){var e;return((e=this.internalState)==null?void 0:e.uniformTransitions.active)||!1}activateViewport(e){if(!this.internalState)return;const n=this.internalState.viewport;this.internalState.viewport=e,(!n||!Upe({oldViewport:n,viewport:e}))&&(this.setChangeFlags({viewportChanged:!0}),this.isComposite?this.needsUpdate()&&this.setNeedsUpdate():this._update())}invalidateAttribute(e="all"){const n=this.getAttributeManager();n&&(e==="all"?n.invalidateAll():n.invalidate(e))}updateAttributes(e){let n=!1;for(const r in e)e[r].layoutChanged()&&(n=!0);for(const r of this.getModels())this._setModelAttributes(r,e,n)}_updateAttributes(){const e=this.getAttributeManager();if(!e)return;const n=this.props,r=this.getNumInstances(),i=this.getStartIndices();e.update({data:n.data,numInstances:r,startIndices:i,props:n,transitions:n.transitions,buffers:n.data.attributes,context:this});const s=e.getChangedAttributes({clearChangedFlags:!0});this.updateAttributes(s)}_updateAttributeTransition(){const e=this.getAttributeManager();e&&e.updateTransition()}_updateUniformTransition(){const{uniformTransitions:e}=this.internalState;if(e.active){const n=e.update(),r=Object.create(this.props);for(const i in n)Object.defineProperty(r,i,{value:n[i]});return r}return this.props}calculateInstancePickingColors(e,{numInstances:n}){if(e.constant)return;const r=Math.floor(da.length/4);if(this.internalState.usesPickingColorCache=!0,r<n){n>lN&&Zt.warn("Layer has too many data objects. Picking might not be able to distinguish all objects.")(),da=Jg.allocate(da,n,{size:4,copy:!0,maxCount:Math.max(n,lN)});const i=Math.floor(da.length/4),s=[0,0,0];for(let o=r;o<i;o++)this.encodePickingColor(o,s),da[o*4+0]=s[0],da[o*4+1]=s[1],da[o*4+2]=s[2],da[o*4+3]=0}e.value=da.subarray(0,n*4)}_setModelAttributes(e,n,r=!1){var a;if(!Object.keys(n).length)return;if(r){const l=this.getAttributeManager();e.setBufferLayout(l.getBufferLayouts(e)),n=l.getAttributes()}const i=((a=e.userData)==null?void 0:a.excludeAttributes)||{},s={},o={};for(const l in n){if(i[l])continue;const c=n[l].getValue();for(const u in c){const h=c[u];h instanceof lr?n[l].settings.isIndexed?e.setIndexBuffer(h):s[u]=h:h&&(o[u]=h)}}e.setAttributes(s),e.setConstantAttributes(o)}disablePickingIndex(e){const n=this.props.data;if(!("attributes"in n)){this._disablePickingIndex(e);return}const{pickingColors:r,instancePickingColors:i}=this.getAttributeManager().attributes,s=r||i,o=s&&n.attributes&&n.attributes[s.id];if(o&&o.value){const a=o.value,l=this.encodePickingColor(e);for(let c=0;c<n.length;c++){const u=s.getVertexOffset(c);a[u]===l[0]&&a[u+1]===l[1]&&a[u+2]===l[2]&&this._disablePickingIndex(c)}}else this._disablePickingIndex(e)}_disablePickingIndex(e){const{pickingColors:n,instancePickingColors:r}=this.getAttributeManager().attributes,i=n||r;if(!i)return;const s=i.getVertexOffset(e),o=i.getVertexOffset(e+1);i.buffer.write(new Uint8Array(o-s),s)}restorePickingColors(){const{pickingColors:e,instancePickingColors:n}=this.getAttributeManager().attributes,r=e||n;r&&(this.internalState.usesPickingColorCache&&r.value.buffer!==da.buffer&&(r.value=da.subarray(0,r.value.length)),r.updateSubBuffer({startOffset:0}))}_initialize(){Ti(!this.internalState),Ti(Number.isFinite(this.props.coordinateSystem)),$i(Npe,this);const e=this._getAttributeManager();e&&e.addInstanced({instancePickingColors:{type:"uint8",size:4,noAlloc:!0,update:this.calculateInstancePickingColors}}),this.internalState=new Rpe({attributeManager:e,layer:this}),this._clearChangeFlags(),this.state={},Object.defineProperty(this.state,"attributeManager",{get:()=>(Zt.deprecated("layer.state.attributeManager","layer.getAttributeManager()")(),e)}),this.internalState.uniformTransitions=new rpe(this.context.timeline),this.internalState.onAsyncPropUpdated=this._onAsyncPropUpdated.bind(this),this.internalState.setAsyncProps(this.props),this.initializeState(this.context);for(const n of this.props.extensions)n.initializeState.call(this,this.context,n);this.setChangeFlags({dataChanged:"init",propsChanged:"init",viewportChanged:!0,extensionsChanged:!0}),this._update()}_transferState(e){$i(Lpe,this,this===e);const{state:n,internalState:r}=e;this!==e&&(this.internalState=r,this.state=n,this.internalState.setAsyncProps(this.props),this._diffProps(this.props,this.internalState.getOldProps()))}_update(){const e=this.needsUpdate();if($i(Dpe,this,e),!e)return;const n=this.props,r=this.context,i=this.internalState,s=r.viewport,o=this._updateUniformTransition();i.propsInTransition=o,r.viewport=i.viewport||s,this.props=o;try{const a=this._getUpdateParams(),l=this.getModels();if(r.device)this.updateState(a);else try{this.updateState(a)}catch{}for(const u of this.props.extensions)u.updateState.call(this,a,u);this.setNeedsRedraw(),this._updateAttributes();const c=this.getModels()[0]!==l[0];this._postUpdate(a,c)}finally{r.viewport=s,this.props=n,this._clearChangeFlags(),i.needsUpdate=!1,i.resetOldProps()}}_finalize(){$i(Bpe,this),this.finalizeState(this.context);for(const e of this.props.extensions)e.finalizeState.call(this,this.context,e)}_drawLayer({renderPass:e,shaderModuleProps:n=null,uniforms:r={},parameters:i={}}){this._updateAttributeTransition();const s=this.props,o=this.context;this.props=this.internalState.propsInTransition||s;try{n&&this.setShaderModuleProps(n);const{getPolygonOffset:a}=this.props,l=a&&a(r)||[0,0];o.device instanceof _g&&o.device.setParametersWebGL({polygonOffset:l});for(const c of this.getModels())c.device.type==="webgpu"?c.setParameters({...c.parameters,...i}):c.setParameters(i);if(o.device instanceof _g)o.device.withParametersWebGL(i,()=>{const c={renderPass:e,shaderModuleProps:n,uniforms:r,parameters:i,context:o};for(const u of this.props.extensions)u.draw.call(this,c,u);this.draw(c)});else{const c={renderPass:e,shaderModuleProps:n,uniforms:r,parameters:i,context:o};for(const u of this.props.extensions)u.draw.call(this,c,u);this.draw(c)}}finally{this.props=s}}getChangeFlags(){var e;return(e=this.internalState)==null?void 0:e.changeFlags}setChangeFlags(e){if(!this.internalState)return;const{changeFlags:n}=this.internalState;for(const i in e)if(e[i]){let s=!1;switch(i){case"dataChanged":const o=e[i],a=n[i];o&&Array.isArray(a)&&(n.dataChanged=Array.isArray(o)?a.concat(o):o,s=!0);default:n[i]||(n[i]=e[i],s=!0)}s&&$i(kpe,this,i,e)}const r=!!(n.dataChanged||n.updateTriggersChanged||n.propsChanged||n.extensionsChanged);n.propsOrDataChanged=r,n.somethingChanged=r||n.viewportChanged||n.stateChanged}_clearChangeFlags(){this.internalState.changeFlags={dataChanged:!1,propsChanged:!1,updateTriggersChanged:!1,viewportChanged:!1,stateChanged:!1,extensionsChanged:!1,propsOrDataChanged:!1,somethingChanged:!1}}_diffProps(e,n){var i;const r=spe(e,n);if(r.updateTriggersChanged)for(const s in r.updateTriggersChanged)r.updateTriggersChanged[s]&&this.invalidateAttribute(s);if(r.transitionsChanged)for(const s in r.transitionsChanged)this.internalState.uniformTransitions.add(s,n[s],e[s],(i=e.transitions)==null?void 0:i[s]);return this.setChangeFlags(r)}validateProps(){ipe(this.props)}updateAutoHighlight(e){this.props.autoHighlight&&!Number.isInteger(this.props.highlightedObjectIndex)&&this._updateAutoHighlight(e)}_updateAutoHighlight(e){const n={highlightedObjectColor:e.picked?e.color:null},{highlightColor:r}=this.props;e.picked&&typeof r=="function"&&(n.highlightColor=r(e)),this.setShaderModuleProps({picking:n}),this.setNeedsRedraw()}_getAttributeManager(){const e=this.context;return new Zde(e.device,{id:this.props.id,stats:e.stats,timeline:e.timeline})}_postUpdate(e,n){const{props:r,oldProps:i}=e,s=this.state.model;s!=null&&s.isInstanced&&s.setInstanceCount(this.getNumInstances());const{autoHighlight:o,highlightedObjectIndex:a,highlightColor:l}=r;if(n||i.autoHighlight!==o||i.highlightedObjectIndex!==a||i.highlightColor!==l){const c={};Array.isArray(l)&&(c.highlightColor=l),(n||i.autoHighlight!==o||a!==i.highlightedObjectIndex)&&(c.highlightedObjectColor=Number.isFinite(a)&&a>=0?this.encodePickingColor(a):null),this.setShaderModuleProps({picking:c})}}_getUpdateParams(){return{props:this.props,oldProps:this.internalState.getOldProps(),context:this.context,changeFlags:this.internalState.changeFlags}}_getNeedsRedraw(e){if(!this.internalState)return!1;let n=!1;n=n||this.internalState.needsRedraw&&this.id;const r=this.getAttributeManager(),i=r?r.getNeedsRedraw(e):!1;if(n=n||i,n)for(const s of this.props.extensions)s.onNeedsRedraw.call(this,s);return this.internalState.needsRedraw=this.internalState.needsRedraw&&!e.clearRedrawFlags,n}_onAsyncPropUpdated(){this._diffProps(this.props,this.internalState.getOldProps()),this.setNeedsUpdate()}};Wo.defaultProps=zpe;Wo.layerName="Layer";const jpe="compositeLayer.renderLayers";class Ns extends Wo{get isComposite(){return!0}get isDrawable(){return!1}get isLoaded(){return super.isLoaded&&this.getSubLayers().every(e=>e.isLoaded)}getSubLayers(){return this.internalState&&this.internalState.subLayers||[]}initializeState(e){}setState(e){super.setState(e),this.setNeedsUpdate()}getPickingInfo({info:e}){const{object:n}=e;return n&&n.__source&&n.__source.parent&&n.__source.parent.id===this.id&&(e.object=n.__source.object,e.index=n.__source.index),e}filterSubLayer(e){return!0}shouldRenderSubLayer(e,n){return n&&n.length}getSubLayerClass(e,n){const{_subLayerProps:r}=this.props;return r&&r[e]&&r[e].type||n}getSubLayerRow(e,n,r){return e.__source={parent:this,object:n,index:r},e}getSubLayerAccessor(e){if(typeof e=="function"){const n={index:-1,data:this.props.data,target:[]};return(r,i)=>r&&r.__source?(n.index=r.__source.index,e(r.__source.object,n)):e(r,i)}return e}getSubLayerProps(e={}){var N;const{opacity:n,pickable:r,visible:i,parameters:s,getPolygonOffset:o,highlightedObjectIndex:a,autoHighlight:l,highlightColor:c,coordinateSystem:u,coordinateOrigin:h,wrapLongitude:d,positionFormat:m,modelMatrix:y,extensions:v,fetch:b,operation:x,_subLayerProps:T}=this.props,E={id:"",updateTriggers:{},opacity:n,pickable:r,visible:i,parameters:s,getPolygonOffset:o,highlightedObjectIndex:a,autoHighlight:l,highlightColor:c,coordinateSystem:u,coordinateOrigin:h,wrapLongitude:d,positionFormat:m,modelMatrix:y,extensions:v,fetch:b,operation:x},C=T&&e.id&&T[e.id],I=C&&C.updateTriggers,O=e.id||"sublayer";if(C){const U=this.props[rf],F=e.type?e.type._propTypes:{};for(const H in C){const W=F[H]||U[H];W&&W.type==="accessor"&&(C[H]=this.getSubLayerAccessor(C[H]))}}Object.assign(E,e,C),E.id=`${this.props.id}-${O}`,E.updateTriggers={all:(N=this.props.updateTriggers)==null?void 0:N.all,...e.updateTriggers,...I};for(const U of v){const F=U.getSubLayerProps.call(this,U);F&&Object.assign(E,F,{updateTriggers:Object.assign(E.updateTriggers,F.updateTriggers)})}return E}
1628_updateAutoHighlight(e){for(const n of this.getSubLayers())n.updateAutoHighlight(e)}_getAttributeManager(){return null}_postUpdate(e,n){let r=this.internalState.subLayers;const i=!r||this.needsUpdate();if(i){const s=this.renderLayers();r=Yx(s,Boolean),this.internalState.subLayers=r}$i(jpe,this,i,r);for(const s of r)s.parent=this}}Ns.layerName="CompositeLayer";const _b=Math.PI/180,cN=180/Math.PI,b_=6370972,wg=256;function Vpe(){const t=wg/b_,e=Math.PI/180*wg;return{unitsPerMeter:[t,t,t],unitsPerMeter2:[0,0,0],metersPerUnit:[1/t,1/t,1/t],unitsPerDegree:[e,e,t],unitsPerDegree2:[0,0,0],degreesPerUnit:[1/e,1/e,1/t]}}class dq extends dd{constructor(e={}){const{longitude:n=0,zoom:r=0,nearZMultiplier:i=.5,farZMultiplier:s=1,resolution:o=10}=e;let{latitude:a=0,height:l,altitude:c=1.5,fovy:u}=e;a=Math.max(Math.min(a,gg),-gg),l=l||1,u?c=dM(u):u=xv(c);const h=1/Math.PI/Math.cos(a*Math.PI/180),d=Math.pow(2,r)*h,m=e.nearZ??i,y=e.farZ??(c+wg*2*d/l)*s,v=new fi().lookAt({eye:[0,-c,0],up:[0,0,1]});v.rotateX(a*_b),v.rotateZ(-n*_b),v.scale(d/l),super({...e,height:l,viewMatrix:v,longitude:n,latitude:a,zoom:r,distanceScales:Vpe(),fovy:u,focalDistance:c,near:m,far:y}),this.scale=d,this.latitude=a,this.longitude=n,this.resolution=o}get projectionMode(){return so.GLOBE}getDistanceScales(){return this.distanceScales}getBounds(e={}){const n={targetZ:e.z||0},r=this.unproject([0,this.height/2],n),i=this.unproject([this.width/2,0],n),s=this.unproject([this.width,this.height/2],n),o=this.unproject([this.width/2,this.height],n);return s[0]<this.longitude&&(s[0]+=360),r[0]>this.longitude&&(r[0]-=360),[Math.min(r[0],s[0],i[0],o[0]),Math.min(r[1],s[1],i[1],o[1]),Math.max(r[0],s[0],i[0],o[0]),Math.max(r[1],s[1],i[1],o[1])]}unproject(e,{topLeft:n=!0,targetZ:r}={}){const[i,s,o]=e,a=n?s:this.height-s,{pixelUnprojectionMatrix:l}=this;let c;if(Number.isFinite(o))c=SE(l,[i,a,o,1]);else{const m=SE(l,[i,a,-1,1]),y=SE(l,[i,a,1,1]),v=((r||0)/b_+1)*wg,b=aE(X$([],m,y)),x=aE(m),T=aE(y),C=4*((4*x*T-(b-x-T)**2)/16)/b,I=Math.sqrt(x-C),O=Math.sqrt(Math.max(0,v*v-C)),N=(I-O)/Math.sqrt(b);c=Roe([],m,y,N)}const[u,h,d]=this.unprojectPosition(c);return Number.isFinite(o)?[u,h,d]:Number.isFinite(r)?[u,h,r]:[u,h]}projectPosition(e){const[n,r,i=0]=e,s=n*_b,o=r*_b,a=Math.cos(o),l=(i/b_+1)*wg;return[Math.sin(s)*a*l,-Math.cos(s)*a*l,Math.sin(o)*l]}unprojectPosition(e){const[n,r,i]=e,s=Y$(e),o=Math.asin(i/s),l=Math.atan2(n,-r)*cN,c=o*cN,u=(s/wg-1)*b_;return[l,c,u]}projectFlat(e){return e}unprojectFlat(e){return e}panByPosition(e,n){const r=this.unproject(n);return{longitude:e[0]-r[0]+this.longitude,latitude:e[1]-r[1]+this.latitude}}}function SE(t,e){const n=Rm([],e,t);return fM(n,n,1/n[3]),n}const Wpe=new fi().lookAt({eye:[0,0,1]});function $pe({width:t,height:e,near:n,far:r,padding:i}){let s=-t/2,o=t/2,a=-e/2,l=e/2;if(i){const{left:c=0,right:u=0,top:h=0,bottom:d=0}=i,m=wl((c+t-u)/2,0,t)-t/2,y=wl((h+e-d)/2,0,e)-e/2;s-=m,o-=m,a+=y,l+=y}return new fi().ortho({left:s,right:o,bottom:a,top:l,near:n,far:r})}class Hpe extends dd{constructor(e){const{width:n,height:r,near:i=.1,far:s=1e3,zoom:o=0,target:a=[0,0,0],padding:l=null,flipY:c=!0}=e,u=Array.isArray(o)?o[0]:o,h=Array.isArray(o)?o[1]:o,d=Math.min(u,h),m=Math.pow(2,d);let y;if(u!==h){const v=Math.pow(2,u),b=Math.pow(2,h);y={unitsPerMeter:[v/m,b/m,1],metersPerUnit:[m/v,m/b,1]}}super({...e,longitude:void 0,position:a,viewMatrix:Wpe.clone().scale([m,m*(c?-1:1),m]),projectionMatrix:$pe({width:n||1,height:r||1,padding:l,near:i,far:s}),zoom:d,distanceScales:y})}projectFlat([e,n]){const{unitsPerMeter:r}=this.distanceScales;return[e*r[0],n*r[1]]}unprojectFlat([e,n]){const{metersPerUnit:r}=this.distanceScales;return[e*r[0],n*r[1]]}panByPosition(e,n){const r=Qx(n,this.pixelUnprojectionMatrix),i=this.projectFlat(e),s=_v([],i,z$([],r)),o=_v([],this.center,s);return{target:this.unprojectFlat(o)}}}class pd{static get componentName(){return Object.prototype.hasOwnProperty.call(this,"extensionName")?this.extensionName:""}constructor(e){e&&(this.opts=e)}equals(e){return this===e?!0:this.constructor===e.constructor&&Ii(this.opts,e.opts,1)}getShaders(e){return null}getSubLayerProps(e){const{defaultProps:n}=e.constructor,r={updateTriggers:{}};for(const i in n)if(i in this.props){const s=n[i],o=this.props[i];r[i]=o,s&&s.type==="accessor"&&(r.updateTriggers[i]=this.props.updateTriggers[i],typeof o=="function"&&(r[i]=this.getSubLayerAccessor(
1628o)))}return r}initializeState(e,n){}updateState(e,n){}onNeedsRedraw(e){}getNeedsPickingBuffer(e){return!1}draw(e,n){}finalizeState(e,n){}}pd.defaultProps={};pd.extensionName="LayerExtension";const TE={bearing:0,pitch:0,position:[0,0,0]},qpe={speed:1.2,curve:1.414};class pq extends BH{constructor(e={}){super({compare:["longitude","latitude","zoom","bearing","pitch","position"],extract:["width","height","longitude","latitude","zoom","bearing","pitch","position"],required:["width","height","latitude","longitude","zoom"]}),this.opts={...qpe,...e}}interpolateProps(e,n,r){const i=Oce(e,n,r,this.opts);for(const s in TE)i[s]=Sl(e[s]||TE[s],n[s]||TE[s],r);return i}getDuration(e,n){let{transitionDuration:r}=n;return r==="auto"&&(r=Mce(e,n,this.opts)),r}}class gq{constructor(e){this.indexStarts=[0],this.vertexStarts=[0],this.vertexCount=0,this.instanceCount=0;const{attributes:n={}}=e;this.typedArrayManager=Jg,this.attributes={},this._attributeDefs=n,this.opts=e,this.updateGeometry(e)}updateGeometry(e){Object.assign(this.opts,e);const{data:n,buffers:r={},getGeometry:i,geometryBuffer:s,positionFormat:o,dataChanged:a,normalize:l=!0}=this.opts;if(this.data=n,this.getGeometry=i,this.positionSize=s&&s.size||(o==="XY"?2:3),this.buffers=r,this.normalize=l,s&&(Ti(n.startIndices),this.getGeometry=this.getGeometryFromBuffer(s),l||(r.vertexPositions=s)),this.geometryBuffer=r.vertexPositions,Array.isArray(a))for(const c of a)this._rebuildGeometry(c);else this._rebuildGeometry()}updatePartialGeometry({startRow:e,endRow:n}){this._rebuildGeometry({startRow:e,endRow:n})}getGeometryFromBuffer(e){const n=e.value||e;return ArrayBuffer.isView(n)?tq(n,{size:this.positionSize,offset:e.offset,stride:e.stride,startIndices:this.data.startIndices}):null}_allocate(e,n){const{attributes:r,buffers:i,_attributeDefs:s,typedArrayManager:o}=this;for(const a in s)if(a in i)o.release(r[a]),r[a]=null;else{const l=s[a];l.copy=n,r[a]=o.allocate(r[a],e,l)}}_forEachGeometry(e,n,r){const{data:i,getGeometry:s}=this,{iterable:o,objectInfo:a}=Ey(i,n,r);for(const l of o){a.index++;const c=s?s(l,a):null;e(c,a.index)}}_rebuildGeometry(e){if(!this.data)return;let{indexStarts:n,vertexStarts:r,instanceCount:i}=this;const{data:s,geometryBuffer:o}=this,{startRow:a=0,endRow:l=1/0}=e||{},c={};if(e||(n=[0],r=[0]),this.normalize||!o)this._forEachGeometry((h,d)=>{const m=h&&this.normalizeGeometry(h);c[d]=m,r[d+1]=r[d]+(m?this.getGeometrySize(m):0)},a,l),i=r[r.length-1];else if(r=s.startIndices,i=r[s.length]||0,ArrayBuffer.isView(o))i=i||o.length/this.positionSize;else if(o instanceof lr){const h=this.positionSize*4;i=i||o.byteLength/h}else if(o.buffer){const h=o.stride||this.positionSize*4;i=i||o.buffer.byteLength/h}else if(o.value){const h=o.value,d=o.stride/h.BYTES_PER_ELEMENT||this.positionSize;i=i||h.length/d}this._allocate(i,!!e),this.indexStarts=n,this.vertexStarts=r,this.instanceCount=i;const u={};this._forEachGeometry((h,d)=>{const m=c[d]||h;u.vertexStart=r[d],u.indexStart=n[d];const y=d<r.length-1?r[d+1]:i;u.geometrySize=y-r[d],u.geometryIndex=d,this.updateGeometryAttributes(m,u)},a,l),this.vertexCount=n[n.length-1]}}function rm(t,e){e&&Object.entries(e).map(([n,r])=>{n.startsWith("--")?t.style.setProperty(n,r):t.style[n]=r})}function AM(t,e){e&&Object.keys(e).map(n=>{n.startsWith("--")?t.style.removeProperty(n):t.style[n]=""})}const Qpe=new Uint32Array([0,2,1,0,3,2]),Xpe=new Float32Array([0,1,0,0,1,0,1,1]);function Ype(t,e){if(!e)return Kpe(t);const n=Math.max(Math.abs(t[0][0]-t[3][0]),Math.abs(t[1][0]-t[2][0])),r=Math.max(Math.abs(t[1][1]-t[0][1]),Math.abs(t[2][1]-t[3][1])),i=Math.ceil(n/e)+1,s=Math.ceil(r/e)+1,o=(i-1)*(s-1)*6,a=new Uint32Array(o),l=new Float32Array(i*s*2),c=new Float64Array(i*s*3);let u=0,h=0;for(let d=0;d<i;d++){const m=d/(i-1);for(let y=0;y<s;y++){const v=y/(s-1),b=Gpe(t,m,v);c[u*3+0]=b[0],c[u*3+1]=b[1],c[u*3+2]=b[2]||0,l[u*2+0]=m,l[u*2+1]=1-v,d>0&&y>0&&(a[h++]=u-s,a[h++]=u-s-1,a[h++]=u-1,a[h++]=u-s,a[h++]=u-1,a[h++]=u),u++}}return{vertexCount:o,positions:c,indices:a,texCoords:l}}function Kpe(t){const e=new Float64Array(12);for(let n=0;n<t.length;n++)e[n*3+0]=t[n][0],e[n*3+1]=t[n][1],e[n*3+2]=t[n][2]||0;return{vertexCount:6,positions:e,indices:Qpe,texCoords:Xpe}}function Gpe(t,e,n){return Sl(Sl(t[0],t[1],n),Sl(t[3],t[2],n),e)}const uN=`uniform bitmapUniforms {
1629  vec4 bounds;
1630  float coordinateConversion;
1631  float desaturate;
1632  vec3 tintColor;
1633  vec4 transparentColor;
1634} bitmap;
1635`,Zpe={name:"bitmap",vs:uN,fs:uN,uniformTypes:{bounds:"vec4<f32>",coordinateConversion:"f32",desaturate:"f32",tintColor:"vec3<f32>",transparentColor:"vec4<f32>"}},Jpe=`#version 300 es
1636#define SHADER_NAME bitmap-layer-vertex-shader
1637
1638in vec2 texCoords;
1639in vec3 positions;
1640in vec3 positions64Low;
1641
1642out vec2 vTexCoord;
1643out vec2 vTexPos;
1644
1645const vec3 pickingColor = vec3(1.0, 0.0, 0.0);
1646
1647void main(void) {
1648  geometry.worldPosition = positions;
1649  geometry.uv = texCoords;
1650  geometry.pickingColor = pickingColor;
1651
1652  gl_Position = project_position_to_clipspace(positions, positions64Low, vec3(0.0), geometry.position);
1653  DECKGL_FILTER_GL_POSITION(gl_Position, geometry);
1654
1655  vTexCoord = texCoords;
1656
1657  if (bitmap.coordinateConversion < -0.5) {
1658    vTexPos = geometry.position.xy + project.commonOrigin.xy;
1659  } else if (bitmap.coordinateConversion > 0.5) {
1660    vTexPos = geometry.worldPosition.xy;
1661  }
1662
1663  vec4 color = vec4(0.0);
1664  DECKGL_FILTER_COLOR(color, geometry);
1665}
1666`,ege=`
1667vec3 packUVsIntoRGB(vec2 uv) {
1668  // Extract the top 8 bits. We want values to be truncated down so we can add a fraction
1669  vec2 uv8bit = floor(uv * 256.);
1670
1671  // Calculate the normalized remainders of u and v parts that do not fit into 8 bits
1672  // Scale and clamp to 0-1 range
1673  vec2 uvFraction = fract(uv * 256.);
1674  vec2 uvFraction4bit = floor(uvFraction * 16.);
1675
1676  // Remainder can be encoded in blue channel, encode as 4 bits for pixel coordinates
1677  float fractions = uvFraction4bit.x + uvFraction4bit.y * 16.;
1678
1679  return vec3(uv8bit, fractions) / 255.;
1680}
1681`,tge=`#version 300 es
1682#define SHADER_NAME bitmap-layer-fragment-shader
1683
1684#ifdef GL_ES
1685precision highp float;
1686#endif
1687
1688uniform sampler2D bitmapTexture;
1689
1690in vec2 vTexCoord;
1691in vec2 vTexPos;
1692
1693out vec4 fragColor;
1694
1695/* projection utils */
1696const float TILE_SIZE = 512.0;
1697const float PI = 3.1415926536;
1698const float WORLD_SCALE = TILE_SIZE / PI / 2.0;
1699
1700// from degrees to Web Mercator
1701vec2 lnglat_to_mercator(vec2 lnglat) {
1702  float x = lnglat.x;
1703  float y = clamp(lnglat.y, -89.9, 89.9);
1704  return vec2(
1705    radians(x) + PI,
1706    PI + log(tan(PI * 0.25 + radians(y) * 0.5))
1707  ) * WORLD_SCALE;
1708}
1709
1710// from Web Mercator to degrees
1711vec2 mercator_to_lnglat(vec2 xy) {
1712  xy /= WORLD_SCALE;
1713  return degrees(vec2(
1714    xy.x - PI,
1715    atan(exp(xy.y - PI)) * 2.0 - PI * 0.5
1716  ));
1717}
1718/* End projection utils */
1719
1720// apply desaturation
1721vec3 color_desaturate(vec3 color) {
1722  float luminance = (color.r + color.g + color.b) * 0.333333333;
1723  return mix(color, vec3(luminance), bitmap.desaturate);
1724}
1725
1726// apply tint
1727vec3 color_tint(vec3 color) {
1728  return color * bitmap.tintColor;
1729}
1730
1731// blend with background color
1732vec4 apply_opacity(vec3 color, float alpha) {
1733  if (bitmap.transparentColor.a == 0.0) {
1734    return vec4(color, alpha);
1735  }
1736  float blendedAlpha = alpha + bitmap.transparentColor.a * (1.0 - alpha);
1737  float highLightRatio = alpha / blendedAlpha;
1738  vec3 blendedRGB = mix(bitmap.transparentColor.rgb, color, highLightRatio);
1739  return vec4(blendedRGB, blendedAlpha);
1740}
1741
1742vec2 getUV(vec2 pos) {
1743  return vec2(
1744    (pos.x - bitmap.bounds[0]) / (bitmap.bounds[2] - bitmap.bounds[0]),
1745    (pos.y - bitmap.bounds[3]) / (bitmap.bounds[1] - bitmap.bounds[3])
1746  );
1747}
1748
1749${ege}
1750
1751void main(void) {
1752  vec2 uv = vTexCoord;
1753  if (bitmap.coordinateConversion < -0.5) {
1754    vec2 lnglat = mercator_to_lnglat(vTexPos);
1755    uv = getUV(lnglat);
1756  } else if (bitmap.coordinateConversion > 0.5) {
1757    vec2 commonPos = lnglat_to_mercator(vTexPos);
1758    uv = getUV(commonPos);
1759  }
1760  vec4 bitmapColor = texture(bitmapTexture, uv);
1761
1762  fragColor = apply_opacity(color_tint(color_desaturate(bitmapColor.rgb)), bitmapColor.a * layer.opacity);
1763
1764  geometry.uv = uv;
1765  DECKGL_FILTER_COLOR(fragColor, geometry);
1766
1767  if (bool(picking.isActive) && !bool(picking.isAttribute)) {
1768    // Since instance information is not used, we can use picking color for pixel index
1769    fragColor.rgb = packUVsIntoRGB(uv);
1770  }
1771}
1772`,nge={image:{type:"image",value:null,async:!0},bounds:{type:"array",value:[1,0,0,1],compare:!0},_imageCoordinateSystem:Wt.DEFAULT,desaturate:{type:"number",min:0,max:1,value:0},transparentColor:{type:"color",value:[0,0,0,0]},tintColor:{type:"color",value:[255,255,255]},textureParameters:{type:"object",ignore:!0,value:null}};class Zx extends Wo{getShaders(){return super.getShaders({vs:Jpe,fs:tge,modules:[uf,ff,Zpe]})}initializeState(){const e=this.getAttributeManager();e.remove(["instancePickingColors"]);const n=!0;e.add({indices:{size:1,isIndexed:!0,update:r=>r.value=this.state.mesh.indices,noAlloc:n},positions:{size:3,type:"float64",fp64:this.use64bitPositions(),update:r=>r.value=this.state.mesh.positions,noAlloc:n},texCoords:{size:2,update:r=>r.value=this.state.mesh.texCoords,noAlloc:n}})}updateState({props:e,oldProps:n,changeFlags:r}){var s;const i=this.getAttributeManager();if(r.extensionsChanged&&((s=this.state.model)==null||s.destroy(),this.state.model=this._getModel(),i.invalidateAll()),e.bounds!==n.bounds){const o=this.state.mesh,a=this._createMesh();this.state.model.setVertexCount(a.vertexCount);for(const l in a)o&&o[l]!==a[l]&&i.invalidate(l);this.setState({mesh:a,...this._getCoordinateUniforms()})}else e._imageCoordinateSystem!==n._imageCoordinateSystem&&this.setState(this._getCoordinateUniforms())}getPickingInfo(e){const{image:n}=this.props,r=e.info;if(!r.color||!n)return r.bitmap=null,r;const{width:i,height:s}=n;r.index=0;const o=rge(r.color);return r.bitmap={size:{width:i,height:s},uv:o,pixel:[Math.floor(o[0]*i),Math.floor(o[1]*s)]},r}disablePickingIndex(){this.setState({disablePicking:!0})}restorePickingColors(){this.setState({disablePicking:!1})}_updateAutoHighlight(e){super._updateAutoHighlight({...e,color:this.encodePickingColor(0)})}_createMesh(){const{bounds:e}=this.props;let n=e;return fN(e)&&(n=[[e[0],e[1]],[e[0],e[3]],[e[2],e[3]],[e[2],e[1]]]),Ype(n,this.context.viewport.resolution)}
1772_getModel(){return new us(this.context.device,{...this.getShaders(),id:this.props.id,bufferLayout:this.getAttributeManager().getBufferLayouts(),topology:"triangle-list",isInstanced:!1})}draw(e){const{shaderModuleProps:n}=e,{model:r,coordinateConversion:i,bounds:s,disablePicking:o}=this.state,{image:a,desaturate:l,transparentColor:c,tintColor:u}=this.props;if(!(n.picking.isActive&&o)&&a&&r){const h={bitmapTexture:a,bounds:s,coordinateConversion:i,desaturate:l,tintColor:u.slice(0,3).map(d=>d/255),transparentColor:c.map(d=>d/255)};r.shaderInputs.setProps({bitmap:h}),r.draw(this.context.renderPass)}}_getCoordinateUniforms(){const{LNGLAT:e,CARTESIAN:n,DEFAULT:r}=Wt;let{_imageCoordinateSystem:i}=this.props;if(i!==r){const{bounds:s}=this.props;if(!fN(s))throw new Error("_imageCoordinateSystem only supports rectangular bounds");const o=this.context.viewport.resolution?e:n;if(i=i===e?e:n,i===e&&o===n)return{coordinateConversion:-1,bounds:s};if(i===n&&o===e){const a=Rl([s[0],s[1]]),l=Rl([s[2],s[3]]);return{coordinateConversion:1,bounds:[a[0],a[1],l[0],l[1]]}}}return{coordinateConversion:0,bounds:[0,0,0,0]}}}Zx.layerName="BitmapLayer";Zx.defaultProps=nge;function rge(t){const[e,n,r]=t,i=(r&240)/256,s=(r&15)/16;return[(e+s)/256,(n+i)/256]}function fN(t){return Number.isFinite(t[0])}const hN=`uniform iconUniforms {
1773  float sizeScale;
1774  vec2 iconsTextureDim;
1775  float sizeMinPixels;
1776  float sizeMaxPixels;
1777  bool billboard;
1778  highp int sizeUnits;
1779  float alphaCutoff;
1780} icon;
1781`,ige={name:"icon",vs:hN,fs:hN,uniformTypes:{sizeScale:"f32",iconsTextureDim:"vec2<f32>",sizeMinPixels:"f32",sizeMaxPixels:"f32",billboard:"f32",sizeUnits:"i32",alphaCutoff:"f32"}},sge=`#version 300 es
1782#define SHADER_NAME icon-layer-vertex-shader
1783in vec2 positions;
1784in vec3 instancePositions;
1785in vec3 instancePositions64Low;
1786in float instanceSizes;
1787in float instanceAngles;
1788in vec4 instanceColors;
1789in vec3 instancePickingColors;
1790in vec4 instanceIconFrames;
1791in float instanceColorModes;
1792in vec2 instanceOffsets;
1793in vec2 instancePixelOffset;
1794out float vColorMode;
1795out vec4 vColor;
1796out vec2 vTextureCoords;
1797out vec2 uv;
1798vec2 rotate_by_angle(vec2 vertex, float angle) {
1799float angle_radian = angle * PI / 180.0;
1800float cos_angle = cos(angle_radian);
1801float sin_angle = sin(angle_radian);
1802mat2 rotationMatrix = mat2(cos_angle, -sin_angle, sin_angle, cos_angle);
1803return rotationMatrix * vertex;
1804}
1805void main(void) {
1806geometry.worldPosition = instancePositions;
1807geometry.uv = positions;
1808geometry.pickingColor = instancePickingColors;
1809uv = positions;
1810vec2 iconSize = instanceIconFrames.zw;
1811float sizePixels = clamp(
1812project_size_to_pixel(instanceSizes * icon.sizeScale, icon.sizeUnits),
1813icon.sizeMinPixels, icon.sizeMaxPixels
1814);
1815float instanceScale = iconSize.y == 0.0 ? 0.0 : sizePixels / iconSize.y;
1816vec2 pixelOffset = positions / 2.0 * iconSize + instanceOffsets;
1817pixelOffset = rotate_by_angle(pixelOffset, instanceAngles) * instanceScale;
1818pixelOffset += instancePixelOffset;
1819pixelOffset.y *= -1.0;
1820if (icon.billboard)  {
1821gl_Position = project_position_to_clipspace(instancePositions, instancePositions64Low, vec3(0.0), geometry.position);
1822DECKGL_FILTER_GL_POSITION(gl_Position, geometry);
1823vec3 offset = vec3(pixelOffset, 0.0);
1824DECKGL_FILTER_SIZE(offset, geometry);
1825gl_Position.xy += project_pixel_size_to_clipspace(offset.xy);
1826} else {
1827vec3 offset_common = vec3(project_pixel_size(pixelOffset), 0.0);
1828DECKGL_FILTER_SIZE(offset_common, geometry);
1829gl_Position = project_position_to_clipspace(instancePositions, instancePositions64Low, offset_common, geometry.position);
1830DECKGL_FILTER_GL_POSITION(gl_Position, geometry);
1831}
1832vTextureCoords = mix(
1833instanceIconFrames.xy,
1834instanceIconFrames.xy + iconSize,
1835(positions.xy + 1.0) / 2.0
1836) / icon.iconsTextureDim;
1837vColor = instanceColors;
1838DECKGL_FILTER_COLOR(vColor, geometry);
1839vColorMode = instanceColorModes;
1840}
1841`,oge=`#version 300 es
1842#define SHADER_NAME icon-layer-fragment-shader
1843precision highp float;
1844uniform sampler2D iconsTexture;
1845in float vColorMode;
1846in vec4 vColor;
1847in vec2 vTextureCoords;
1848in vec2 uv;
1849out vec4 fragColor;
1850void main(void) {
1851geometry.uv = uv;
1852vec4 texColor = texture(iconsTexture, vTextureCoords);
1853vec3 color = mix(texColor.rgb, vColor.rgb, vColorMode);
1854float a = texColor.a * layer.opacity * vColor.a;
1855if (a < icon.alphaCutoff) {
1856discard;
1857}
1858fragColor = vec4(color, a);
1859DECKGL_FILTER_COLOR(fragColor, geometry);
1860}
1861`,age=1024,lge=4,dN=()=>{},pN={minFilter:"linear",mipmapFilter:"linear",magFilter:"linear",addressModeU:"clamp-to-edge",addressModeV:"clamp-to-edge"},cge={x:0,y:0,width:0,height:0};function uge(t){return Math.pow(2,Math.ceil(Math.log2(t)))}function fge(t,e,n,r){const i=Math.min(n/e.width,r/e.height),s=Math.floor(e.width*i),o=Math.floor(e.height*i);return i===1?{image:e,width:s,height:o}:(t.canvas.height=o,t.canvas.width=s,t.clearRect(0,0,s,o),t.drawImage(e,0,0,e.width,e.height,0,0,s,o),{image:t.canvas,width:s,height:o})}function Av(t){return t&&(t.id||t.url)}function hge(t,e,n,r){const{width:i,height:s,device:o}=t,a=o.createTexture({format:"rgba8unorm",width:e,height:n,sampler:r,mipmaps:!0}),l=o.createCommandEncoder();return l.copyTextureToTexture({sourceTexture:t,destinationTexture:a,width:i,height:s}),l.finish(),t.destroy(),a}function gN(t,e,n){for(let r=0;r<e.length;r++){const{icon:i,xOffset:s}=e[r],o=Av(i);t[o]={...i,x:s,y:n}}}function dge({icons:t,buffer:e,mapping:n={},xOffset:r=0,yOffset:i=0,rowHeight:s=0,canvasWidth:o}){let a=[];for(let l=0;l<t.length;l++){const c=t[l],u=Av(c);if(!n[u]){const{height:h,width:d}=c;r+d+e>o&&(gN(n,a,i),r=0,i=s+i+e,s=0,a=[]),a.push({icon:c,xOffset:r}),r=r+d+e,s=Math.max(s,h)}}return a.length>0&&gN(n,a,i),{mapping:n,rowHeight:s,xOffset:r,yOffset:i,canvasWidth:o,canvasHeight:uge(s+i+e)}}function pge(t,e,n){if(!t||!e)return null;n=n||{};const r={},{iterable:i,objectInfo:s}=Ey(t);for(const o of i){s.index++;const a=e(o,s),l=Av(a);if(!a)throw new Error("Icon is missing.");if(!a.url)throw new Error("Icon url is missing.");!r[l]&&(!n[l]||a.url!==n[l].url)&&(r[l]={...a,source:o,sourceIndex:s.index})}return r}class gge{constructor(e,{onUpdate:n=dN,onError:r=dN}){this._loadOptions=null,this._texture=null,this._externalTexture=null,this._mapping={},this._samplerParameters=null,this._pendingCount=0,this._autoPacking=!1,this._xOffset=0,this._yOffset=0,this._rowHeight=0,this._buffer=lge,this._canvasWidth=age,this._canvasHeight=0,this._canvas=null,this.device=e,this.onUpdate=n,this.onError=r}finalize(){var e;(e=this._texture)==null||e.delete()}getTexture(){return this._texture||this._externalTexture}getIconMapping(e){const n=this._autoPacking?Av(e):e;return this._mapping[n]||cge}setProps({loadOptions:e,autoPacking:n,iconAtlas:r,iconMapping:i,textureParameters:s}){var o;e&&(this._loadOptions=e),n!==void 0&&(this._autoPacking=n),i&&(this._mapping=i),r&&((o=this._texture)==null||o.delete(),this._texture=null,this._externalTexture=r),s&&(this._samplerParameters=s)}get isLoaded(){return this._pendingCount===0}packIcons(e,n){if(!this._autoPacking||typeof document>"u")return;const r=Object.values(pge(e,n,this._mapping)||{});if(r.length>0){const{mapping:i,xOffset:s,yOffset:o,rowHeight:a,canvasHeight:l}=dge({icons:r,buffer:this._buffer,canvasWidth:this._canvasWidth,mapping:this._mapping,rowHeight:this._rowHeight,xOffset:this._xOffset,yOffset:this._yOffset});this._rowHeight=a,this._mapping=i,this._xOffset=s,this._yOffset=o,this._canvasHeight=l,this._texture||(this._texture=this.device.createTexture({format:"rgba8unorm",width:this._canvasWidth,height:this._canvasHeight,sampler:this._samplerParameters||pN,mipmaps:!0})),this._texture.height!==this._canvasHeight&&(this._texture=hge(this._texture,this._canvasWidth,this._canvasHeight,this._samplerParameters||pN)),this.onUpdate(),this._canvas=this._canvas||document.createElement("canvas"),this._loadIcons(r)}}_loadIcons(e){const n=this._canvas.getContext("2d",{willReadFrequently:!0});
1861for(const r of e)this._pendingCount++,F_(r.url,this._loadOptions).then(i=>{var y;const s=Av(r),o=this._mapping[s],{x:a,y:l,width:c,height:u}=o,{image:h,width:d,height:m}=fge(n,i,c,u);(y=this._texture)==null||y.copyExternalImage({image:h,x:a+(c-d)/2,y:l+(u-m)/2,width:d,height:m}),o.width=d,o.height=m,this._texture.generateMipmap(),this.onUpdate()}).catch(i=>{this.onError({url:r.url,source:r.source,sourceIndex:r.sourceIndex,loadOptions:this._loadOptions,error:i})}).finally(()=>{this._pendingCount--})}}const mq=[0,0,0,255],mge={iconAtlas:{type:"image",value:null,async:!0},iconMapping:{type:"object",value:{},async:!0},sizeScale:{type:"number",value:1,min:0},billboard:!0,sizeUnits:"pixels",sizeMinPixels:{type:"number",min:0,value:0},sizeMaxPixels:{type:"number",min:0,value:Number.MAX_SAFE_INTEGER},alphaCutoff:{type:"number",value:.05,min:0,max:1},getPosition:{type:"accessor",value:t=>t.position},getIcon:{type:"accessor",value:t=>t.icon},getColor:{type:"accessor",value:mq},getSize:{type:"accessor",value:1},getAngle:{type:"accessor",value:0},getPixelOffset:{type:"accessor",value:[0,0]},onIconError:{type:"function",value:null,optional:!0},textureParameters:{type:"object",ignore:!0,value:null}};class Nm extends Wo{getShaders(){return super.getShaders({vs:sge,fs:oge,modules:[uf,ff,ige]})}initializeState(){this.state={iconManager:new gge(this.context.device,{onUpdate:this._onUpdate.bind(this),onError:this._onError.bind(this)})},this.getAttributeManager().addInstanced({instancePositions:{size:3,type:"float64",fp64:this.use64bitPositions(),transition:!0,accessor:"getPosition"},instanceSizes:{size:1,transition:!0,accessor:"getSize",defaultValue:1},instanceOffsets:{size:2,accessor:"getIcon",transform:this.getInstanceOffset},instanceIconFrames:{size:4,accessor:"getIcon",transform:this.getInstanceIconFrame},instanceColorModes:{size:1,type:"uint8",accessor:"getIcon",transform:this.getInstanceColorMode},instanceColors:{size:this.props.colorFormat.length,type:"unorm8",transition:!0,accessor:"getColor",defaultValue:mq},instanceAngles:{size:1,transition:!0,accessor:"getAngle"},instancePixelOffset:{size:2,transition:!0,accessor:"getPixelOffset"}})}updateState(e){var m;super.updateState(e);const{props:n,oldProps:r,changeFlags:i}=e,s=this.getAttributeManager(),{iconAtlas:o,iconMapping:a,data:l,getIcon:c,textureParameters:u}=n,{iconManager:h}=this.state;if(typeof o=="string")return;const d=o||this.internalState.isAsyncPropLoading("iconAtlas");h.setProps({loadOptions:n.loadOptions,autoPacking:!d,iconAtlas:o,iconMapping:d?a:null,textureParameters:u}),d?r.iconMapping!==n.iconMapping&&s.invalidate("getIcon"):(i.dataChanged||i.updateTriggersChanged&&(i.updateTriggersChanged.all||i.updateTriggersChanged.getIcon))&&h.packIcons(l,c),i.extensionsChanged&&((m=this.state.model)==null||m.destroy(),this.state.model=this._getModel(),s.invalidateAll())}get isLoaded(){return super.isLoaded&&this.state.iconManager.isLoaded}finalizeState(e){super.finalizeState(e),this.state.iconManager.finalize()}draw({uniforms:e}){const{sizeScale:n,sizeMinPixels:r,sizeMaxPixels:i,sizeUnits:s,billboard:o,alphaCutoff:a}=this.props,{iconManager:l}=this.state,c=l.getTexture();if(c){const u=this.state.model,h={iconsTexture:c,iconsTextureDim:[c.width,c.height],sizeUnits:Ml[s],sizeScale:n,sizeMinPixels:r,sizeMaxPixels:i,billboard:o,alphaCutoff:a};u.shaderInputs.setProps({icon:h}),u.draw(this.context.renderPass)}}_getModel(){const e=[-1,-1,1,-1,-1,1,1,1];return new us(this.context.device,{...this.getShaders(),id:this.props.id,bufferLayout:this.getAttributeManager().getBufferLayouts(),geometry:new Cl({topology:"triangle-strip",attributes:{positions:{size:2,value:new Float32Array(e)}}}),isInstanced:!0})}_onUpdate(){this.setNeedsRedraw()}_onError(e){var r;const n=(r=this.getCurrentLayer())==null?void 0:r.props.onIconError;n?n(e):Zt.error(e.error.message)()}getInstanceOffset(e){const{width:n,height:r,anchorX:i=n/2,anchorY:s=r/2}=this.state.iconManager.getIconMapping(e);return[n/2-i,r/2-s]}getInstanceColorMode(e){return this.state.iconManager.getIconMapping(e).mask?1:0}getInstanceIconFrame(e){const{x:n,y:r,width:i,height:s}=this.state.iconManager.getIconMapping(e);return[n,r,i,s]}}Nm.defaultProps=mge;Nm.layerName="IconLayer";const vge=`struct LineUniforms {
1862  widthScale: f32,
1863  widthMinPixels: f32,
1864  widthMaxPixels: f32,
1865  useShortestPath: f32,
1866  widthUnits: i32,
1867};
1868
1869@group(0) @binding(1)
1870var<uniform> line: LineUniforms;
1871`,mN=`uniform lineUniforms {
1872  float widthScale;
1873  float widthMinPixels;
1874  float widthMaxPixels;
1875  float useShortestPath;
1876  highp int widthUnits;
1877} line;
1878`,yge={name:"line",source:vge,vs:mN,fs:mN,uniformTypes:{widthScale:"f32",widthMinPixels:"f32",widthMaxPixels:"f32",useShortestPath:"f32",widthUnits:"i32"}},bge=`// TODO(ibgreen): Hack for Layer uniforms (move to new "color" module?)
1879struct LayerUniforms {
1880  opacity: f32,
1881};
1882var<private> layer: LayerUniforms = LayerUniforms(1.0);
1883// @group(0) @binding(1) var<uniform> layer: LayerUniforms;
1884
1885// ---------- Helper Structures & Functions ----------
1886
1887// Placeholder filter functions.
1888fn deckgl_filter_size(offset: vec3<f32>, geometry: Geometry) -> vec3<f32> {
1889  return offset;
1890}
1891fn deckgl_filter_gl_position(p: vec4<f32>, geometry: Geometry) -> vec4<f32> {
1892  return p;
1893}
1894fn deckgl_filter_color(color: vec4<f32>, geometry: Geometry) -> vec4<f32> {
1895  return color;
1896}
1897
1898// Compute an extrusion offset given a line direction (in clipspace),
1899// an offset direction (-1 or 1), and a width in pixels.
1900// Assumes a uniform "project" with a viewportSize field is available.
1901fn getExtrusionOffset(line_clipspace: vec2<f32>, offset_direction: f32, width: f32) -> vec2<f32> {
1902  // project.viewportSize should be provided as a uniform (not shown here)
1903  let dir_screenspace = normalize(line_clipspace * project.viewportSize);
1904  // Rotate by 90°: (x,y) becomes (-y,x)
1905  let rotated = vec2<f32>(-dir_screenspace.y, dir_screenspace.x);
1906  return rotated * offset_direction * width / 2.0;
1907}
1908
1909// Splits the line between two points at a given x coordinate.
1910// Interpolates the y and z components.
1911fn splitLine(a: vec3<f32>, b: vec3<f32>, x: f32) -> vec3<f32> {
1912  let t: f32 = (x - a.x) / (b.x - a.x);
1913  return vec3<f32>(x, a.yz + t * (b.yz - a.yz));
1914}
1915
1916// ---------- Uniforms & Global Structures ----------
1917
1918// Uniforms for line, layer, and project are assumed to be defined elsewhere.
1919// For example:
1920//
1921// @group(0) @binding(0)
1922// var<uniform> line: LineUniform;
1923//
1924// struct LayerUniform {
1925//   opacity: f32,
1926// };
1927// @group(0) @binding(1)
1928// var<uniform> layer: LayerUniform;
1929//
1930// struct ProjectUniform {
1931//   viewportSize: vec2<f32>,
1932// };
1933// @group(0) @binding(2)
1934// var<uniform> project: ProjectUniform;
1935
1936
1937
1938// ---------- Vertex Output Structure ----------
1939
1940struct Varyings {
1941  @builtin(position) gl_Position: vec4<f32>,
1942  @location(0) vColor: vec4<f32>,
1943  @location(1) uv: vec2<f32>,
1944};
1945
1946// ---------- Vertex Shader Entry Point ----------
1947
1948@vertex
1949fn vertexMain(
1950  @location(0) positions: vec3<f32>,
1951  @location(1) instanceSourcePositions: vec3<f32>,
1952  @location(2) instanceTargetPositions: vec3<f32>,
1953  @location(3) instanceSourcePositions64Low: vec3<f32>,
1954  @location(4) instanceTargetPositions64Low: vec3<f32>,
1955  @location(5) instanceColors: vec4<f32>,
1956  @location(6) instancePickingColors: vec3<f32>,
1957  @location(7) instanceWidths: f32
1958) -> Varyings {
1959  var geometry: Geometry;
1960  geometry.worldPosition = instanceSourcePositions;
1961  geometry.worldPositionAlt = instanceTargetPositions;
1962
1963  var source_world: vec3<f32> = instanceSourcePositions;
1964  var target_world: vec3<f32> = instanceTargetPositions;
1965  var source_world_64low: vec3<f32> = instanceSourcePositions64Low;
1966  var target_world_64low: vec3<f32> = instanceTargetPositions64Low;
1967
1968  // Apply shortest-path adjustments if needed.
1969  if (line.useShortestPath > 0.5 || line.useShortestPath < -0.5) {
1970    source_world.x = (source_world.x + 180.0 % 360.0) - 180.0;
1971    target_world.x = (target_world.x + 180.0 % 360.0) - 180.0;
1972    let deltaLng: f32 = target_world.x - source_world.x;
1973
1974    if (deltaLng * line.useShortestPath > 180.0) {
1975      source_world.x = source_world.x + 360.0 * line.useShortestPath;
1976      source_world = splitLine(source_world, target_world, 180.0 * line.useShortestPath);
1977      source_world_64low = vec3<f32>(0.0, 0.0, 0.0);
1978    } else if (deltaLng * line.useShortestPath < -180.0) {
1979      target_world.x = target_world.x + 360.0 * line.useShortestPath;
1980      target_world = splitLine(source_world, target_world, 180.0 * line.useShortestPath);
1981      target_world_64low = vec3<f32>(0.0, 0.0, 0.0);
1982    } else if (line.useShortestPath < 0.0) {
1983      var abortOut: Varyings;
1984      abortOut.gl_Position = vec4<f32>(0.0);
1985      abortOut.vColor = vec4<f32>(0.0);
1986      abortOut.uv = vec2<f32>(0.0);
1987      return abortOut;
1988    }
1989  }
1990
1991  // Project Pos and target positions to clip space.
1992  let sourceResult = project_position_to_clipspace_and_commonspace(source_world, source_world_64low, vec3<f32>(0.0));
1993  let targetResult = project_position_to_clipspace_and_commonspace(target_world, target_world_64low, vec3<f32>(0.0));
1994  let sourcePos: vec4<f32> = sourceResult.clipPosition;
1995  let targetPos: vec4<f32> = targetResult.clipPosition;
1996  let source_commonspace: vec4<f32> = sourceResult.commonPosition;
1997  let target_commonspace: vec4<f32> = targetResult.commonPosition;
1998
1999  // Interpolate along the line segment.
2000  let segmentIndex: f32 = positions.x;
2001  let p: vec4<f32> = sourcePos + segmentIndex * (targetPos - sourcePos);
2002  geometry.position = source_commonspace + segmentIndex * (target_commonspace - source_commonspace);
2003  let uv: vec2<f32> = positions.xy;
2004  geometry.uv = uv;
2005  geometry.pickingColor = instancePickingColors;
2006
2007  // Determine width in pixels.
2008  let widthPixels: f32 = clamp(
2009    project_unit_size_to_pixel(instanceWidths * line.widthScale, line.widthUnits),
2010    line.widthMinPixels, line.widthMaxPixels
2011  );
2012
2013  // Compute extrusion offset.
2014  let extrusion: vec2<f32> = getExtrusionOffset(targetPos.xy - sourcePos.xy, positions.y, widthPixels);
2015  let offset: vec3<f32> = vec3<f32>(extrusion, 0.0);
2016
2017  // Apply deck.gl filter functions.
2018  let filteredOffset = deckgl_filter_size(offset, geometry);
2019  let filteredP = deckgl_filter_gl_position(p, geometry);
2020
2021  let clipOffset: vec2<f32> = project_pixel_size_to_clipspace(filteredOffset.xy);
2022  let finalPosition: vec4<f32>
2022 = filteredP + vec4<f32>(clipOffset, 0.0, 0.0);
2023
2024  // Compute color.
2025  var vColor: vec4<f32> = vec4<f32>(instanceColors.rgb, instanceColors.a * layer.opacity);
2026  // vColor = deckgl_filter_color(vColor, geometry);
2027
2028  var output: Varyings;
2029  output.gl_Position = finalPosition;
2030  output.vColor = vColor;
2031  output.uv = uv;
2032  return output;
2033}
2034
2035@fragment
2036fn fragmentMain(
2037  @location(0) vColor: vec4<f32>,
2038  @location(1) uv: vec2<f32>
2039) -> @location(0) vec4<f32> {
2040  // Create and initialize geometry with the provided uv.
2041  var geometry: Geometry;
2042  geometry.uv = uv;
2043
2044  // Start with the input color.
2045  var fragColor: vec4<f32> = vColor;
2046
2047  // Apply the deck.gl filter to the color.
2048  fragColor = deckgl_filter_color(fragColor, geometry);
2049
2050  return fragColor;
2051}
2052`,_ge=`#version 300 es
2053#define SHADER_NAME line-layer-vertex-shader
2054in vec3 positions;
2055in vec3 instanceSourcePositions;
2056in vec3 instanceTargetPositions;
2057in vec3 instanceSourcePositions64Low;
2058in vec3 instanceTargetPositions64Low;
2059in vec4 instanceColors;
2060in vec3 instancePickingColors;
2061in float instanceWidths;
2062out vec4 vColor;
2063out vec2 uv;
2064vec2 getExtrusionOffset(vec2 line_clipspace, float offset_direction, float width) {
2065vec2 dir_screenspace = normalize(line_clipspace * project.viewportSize);
2066dir_screenspace = vec2(-dir_screenspace.y, dir_screenspace.x);
2067return dir_screenspace * offset_direction * width / 2.0;
2068}
2069vec3 splitLine(vec3 a, vec3 b, float x) {
2070float t = (x - a.x) / (b.x - a.x);
2071return vec3(x, mix(a.yz, b.yz, t));
2072}
2073void main(void) {
2074geometry.worldPosition = instanceSourcePositions;
2075geometry.worldPositionAlt = instanceTargetPositions;
2076vec3 source_world = instanceSourcePositions;
2077vec3 target_world = instanceTargetPositions;
2078vec3 source_world_64low = instanceSourcePositions64Low;
2079vec3 target_world_64low = instanceTargetPositions64Low;
2080if (line.useShortestPath > 0.5 || line.useShortestPath < -0.5) {
2081source_world.x = mod(source_world.x + 180., 360.0) - 180.;
2082target_world.x = mod(target_world.x + 180., 360.0) - 180.;
2083float deltaLng = target_world.x - source_world.x;
2084if (deltaLng * line.useShortestPath > 180.) {
2085source_world.x += 360. * line.useShortestPath;
2086source_world = splitLine(source_world, target_world, 180. * line.useShortestPath);
2087source_world_64low = vec3(0.0);
2088} else if (deltaLng * line.useShortestPath < -180.) {
2089target_world.x += 360. * line.useShortestPath;
2090target_world = splitLine(source_world, target_world, 180. * line.useShortestPath);
2091target_world_64low = vec3(0.0);
2092} else if (line.useShortestPath < 0.) {
2093gl_Position = vec4(0.);
2094return;
2095}
2096}
2097vec4 source_commonspace;
2098vec4 target_commonspace;
2099vec4 source = project_position_to_clipspace(source_world, source_world_64low, vec3(0.), source_commonspace);
2100vec4 target = project_position_to_clipspace(target_world, target_world_64low, vec3(0.), target_commonspace);
2101float segmentIndex = positions.x;
2102vec4 p = mix(source, target, segmentIndex);
2103geometry.position = mix(source_commonspace, target_commonspace, segmentIndex);
2104uv = positions.xy;
2105geometry.uv = uv;
2106geometry.pickingColor = instancePickingColors;
2107float widthPixels = clamp(
2108project_size_to_pixel(instanceWidths * line.widthScale, line.widthUnits),
2109line.widthMinPixels, line.widthMaxPixels
2110);
2111vec3 offset = vec3(
2112getExtrusionOffset(target.xy - source.xy, positions.y, widthPixels),
21130.0);
2114DECKGL_FILTER_SIZE(offset, geometry);
2115DECKGL_FILTER_GL_POSITION(p, geometry);
2116gl_Position = p + vec4(project_pixel_size_to_clipspace(offset.xy), 0.0, 0.0);
2117vColor = vec4(instanceColors.rgb, instanceColors.a * layer.opacity);
2118DECKGL_FILTER_COLOR(vColor, geometry);
2119}
2120`,wge=`#version 300 es
2121#define SHADER_NAME line-layer-fragment-shader
2122precision highp float;
2123in vec4 vColor;
2124in vec2 uv;
2125out vec4 fragColor;
2126void main(void) {
2127geometry.uv = uv;
2128fragColor = vColor;
2129DECKGL_FILTER_COLOR(fragColor, geometry);
2130}
2131`,xge=[0,0,0,255],Age={getSourcePosition:{type:"accessor",value:t=>t.sourcePosition},getTargetPosition:{type:"accessor",value:t=>t.targetPosition},getColor:{type:"accessor",value:xge},getWidth:{type:"accessor",value:1},widthUnits:"pixels",widthScale:{type:"number",value:1,min:0},widthMinPixels:{type:"number",value:0,min:0},widthMaxPixels:{type:"number",value:Number.MAX_SAFE_INTEGER,min:0}};class EM extends Wo{getBounds(){var e;return(e=this.getAttributeManager())==null?void 0:e.getBounds(["instanceSourcePositions","instanceTargetPositions"])}getShaders(){return super.getShaders({vs:_ge,fs:wge,source:bge,modules:[uf,ff,yge]})}get wrapLongitude(){return!1}initializeState(){this.getAttributeManager().addInstanced({instanceSourcePositions:{size:3,type:"float64",fp64:this.use64bitPositions(),transition:!0,accessor:"getSourcePosition"},instanceTargetPositions:{size:3,type:"float64",fp64:this.use64bitPositions(),transition:!0,accessor:"getTargetPosition"},instanceColors:{size:this.props.colorFormat.length,type:"unorm8",transition:!0,accessor:"getColor",defaultValue:[0,0,0,255]},instanceWidths:{size:1,transition:!0,accessor:"getWidth",defaultValue:1}})}updateState(e){var n;super.updateState(e),e.changeFlags.extensionsChanged&&((n=this.state.model)==null||n.destroy(),this.state.model=this._getModel(),this.getAttributeManager().invalidateAll())}draw({uniforms:e}){const{widthUnits:n,widthScale:r,widthMinPixels:i,widthMaxPixels:s,wrapLongitude:o}=this.props,a=this.state.model,l={widthUnits:Ml[n],widthScale:r,widthMinPixels:i,widthMaxPixels:s,useShortestPath:o?1:0};a.shaderInputs.setProps({line:l}),a.draw(this.context.renderPass),o&&(a.shaderInputs.setProps({line:{...l,useShortestPath:-1}}),a.draw(this.context.renderPass))}_getModel(){const e=[0,-1,0,0,1,0,1,-1,0,1,1,0];return new us(this.context.device,{...this.getShaders(),id:this.props.id,bufferLayout:this.getAttributeManager().getBufferLayouts(),geometry:new Cl({topology:"triangle-strip",attributes:{positions:{size:3,value:new Float32Array(e)}}}),isInstanced:!0})}}EM.layerName="LineLayer";EM.defaultProps=Age;const vN=`uniform scatterplotUniforms {
2132  float radiusScale;
2133  float radiusMinPixels;
2134  float radiusMaxPixels;
2135  float lineWidthScale;
2136  float lineWidthMinPixels;
2137  float lineWidthMaxPixels;
2138  float stroked;
2139  float filled;
2140  bool antialiasing;
2141  bool billboard;
2142  highp int radiusUnits;
2143  highp int lineWidthUnits;
2144} scatterplot;
2145`,Ege={name:"scatterplot",vs:vN,fs:vN,source:"",uniformTypes:{radiu
2145sScale:"f32",radiusMinPixels:"f32",radiusMaxPixels:"f32",lineWidthScale:"f32",lineWidthMinPixels:"f32",lineWidthMaxPixels:"f32",stroked:"f32",filled:"f32",antialiasing:"f32",billboard:"f32",radiusUnits:"i32",lineWidthUnits:"i32"}},Sge=`#version 300 es
2146#define SHADER_NAME scatterplot-layer-vertex-shader
2147in vec3 positions;
2148in vec3 instancePositions;
2149in vec3 instancePositions64Low;
2150in float instanceRadius;
2151in float instanceLineWidths;
2152in vec4 instanceFillColors;
2153in vec4 instanceLineColors;
2154in vec3 instancePickingColors;
2155out vec4 vFillColor;
2156out vec4 vLineColor;
2157out vec2 unitPosition;
2158out float innerUnitRadius;
2159out float outerRadiusPixels;
2160void main(void) {
2161geometry.worldPosition = instancePositions;
2162outerRadiusPixels = clamp(
2163project_size_to_pixel(scatterplot.radiusScale * instanceRadius, scatterplot.radiusUnits),
2164scatterplot.radiusMinPixels, scatterplot.radiusMaxPixels
2165);
2166float lineWidthPixels = clamp(
2167project_size_to_pixel(scatterplot.lineWidthScale * instanceLineWidths, scatterplot.lineWidthUnits),
2168scatterplot.lineWidthMinPixels, scatterplot.lineWidthMaxPixels
2169);
2170outerRadiusPixels += scatterplot.stroked * lineWidthPixels / 2.0;
2171float edgePadding = scatterplot.antialiasing ? (outerRadiusPixels + SMOOTH_EDGE_RADIUS) / outerRadiusPixels : 1.0;
2172unitPosition = edgePadding * positions.xy;
2173geometry.uv = unitPosition;
2174geometry.pickingColor = instancePickingColors;
2175innerUnitRadius = 1.0 - scatterplot.stroked * lineWidthPixels / outerRadiusPixels;
2176if (scatterplot.billboard) {
2177gl_Position = project_position_to_clipspace(instancePositions, instancePositions64Low, vec3(0.0), geometry.position);
2178DECKGL_FILTER_GL_POSITION(gl_Position, geometry);
2179vec3 offset = edgePadding * positions * outerRadiusPixels;
2180DECKGL_FILTER_SIZE(offset, geometry);
2181gl_Position.xy += project_pixel_size_to_clipspace(offset.xy);
2182} else {
2183vec3 offset = edgePadding * positions * project_pixel_size(outerRadiusPixels);
2184DECKGL_FILTER_SIZE(offset, geometry);
2185gl_Position = project_position_to_clipspace(instancePositions, instancePositions64Low, offset, geometry.position);
2186DECKGL_FILTER_GL_POSITION(gl_Position, geometry);
2187}
2188vFillColor = vec4(instanceFillColors.rgb, instanceFillColors.a * layer.opacity);
2189DECKGL_FILTER_COLOR(vFillColor, geometry);
2190vLineColor = vec4(instanceLineColors.rgb, instanceLineColors.a * layer.opacity);
2191DECKGL_FILTER_COLOR(vLineColor, geometry);
2192}
2193`,Tge=`#version 300 es
2194#define SHADER_NAME scatterplot-layer-fragment-shader
2195precision highp float;
2196in vec4 vFillColor;
2197in vec4 vLineColor;
2198in vec2 unitPosition;
2199in float innerUnitRadius;
2200in float outerRadiusPixels;
2201out vec4 fragColor;
2202void main(void) {
2203geometry.uv = unitPosition;
2204float distToCenter = length(unitPosition) * outerRadiusPixels;
2205float inCircle = scatterplot.antialiasing ?
2206smoothedge(distToCenter, outerRadiusPixels) :
2207step(distToCenter, outerRadiusPixels);
2208if (inCircle == 0.0) {
2209discard;
2210}
2211if (scatterplot.stroked > 0.5) {
2212float isLine = scatterplot.antialiasing ?
2213smoothedge(innerUnitRadius * outerRadiusPixels, distToCenter) :
2214step(innerUnitRadius * outerRadiusPixels, distToCenter);
2215if (scatterplot.filled > 0.5) {
2216fragColor = mix(vFillColor, vLineColor, isLine);
2217} else {
2218if (isLine == 0.0) {
2219discard;
2220}
2221fragColor = vec4(vLineColor.rgb, vLineColor.a * isLine);
2222}
2223} else if (scatterplot.filled < 0.5) {
2224discard;
2225} else {
2226fragColor = vFillColor;
2227}
2228fragColor.a *= inCircle;
2229DECKGL_FILTER_COLOR(fragColor, geometry);
2230}
2231`,Cge=`// TODO(ibgreen): Hack for Layer uniforms (move to new "color" module?)
2232
2233struct LayerUniforms {
2234  opacity: f32,
2235};
2236
2237var<private> layer: LayerUniforms = LayerUniforms(1.0);
2238// @group(0) @binding(1) var<uniform> layer: LayerUniforms;
2239
2240// Main shaders
2241
2242struct ScatterplotUniforms {
2243  radiusScale: f32,
2244  radiusMinPixels: f32,
2245  radiusMaxPixels: f32,
2246  lineWidthScale: f32,
2247  lineWidthMinPixels: f32,
2248  lineWidthMaxPixels: f32,
2249  stroked: f32,
2250  filled: i32,
2251  antialiasing: i32,
2252  billboard: i32,
2253  radiusUnits: i32,
2254  lineWidthUnits: i32,
2255};
2256
2257struct ConstantAttributeUniforms {
2258 instancePositions: vec3<f32>,
2259 instancePositions64Low: vec3<f32>,
2260 instanceRadius: f32,
2261 instanceLineWidths: f32,
2262 instanceFillColors: vec4<f32>,
2263 instanceLineColors: vec4<f32>,
2264 instancePickingColors: vec3<f32>,
2265
2266 instancePositionsConstant: i32,
2267 instancePositions64LowConstant: i32,
2268 instanceRadiusConstant: i32,
2269 instanceLineWidthsConstant: i32,
2270 instanceFillColorsConstant: i32,
2271 instanceLineColorsConstant: i32,
2272 instancePickingColorsConstant: i32
2273};
2274
2275@group(0) @binding(2) var<uniform> scatterplot: ScatterplotUniforms;
2276
2277struct ConstantAttributes {
2278  instancePositions: vec3<f32>,
2279  instancePositions64Low: vec3<f32>,
2280  instanceRadius: f32,
2281  instanceLineWidths: f32,
2282  instanceFillColors: vec4<f32>,
2283  instanceLineColors: vec4<f32>,
2284  instancePickingColors: vec3<f32>
2285};
2286
2287const constants = ConstantAttributes(
2288  vec3<f32>(0.0),
2289  vec3<f32>(0.0),
2290  0.0,
2291  0.0,
2292  vec4<f32>(0.0, 0.0, 0.0, 1.0),
2293  vec4<f32>(0.0, 0.0, 0.0, 1.0),
2294  vec3<f32>(0.0)
2295);
2296
2297struct Attributes {
2298  @builtin(instance_index) instanceIndex : u32,
2299  @builtin(vertex_index) vertexIndex : u32,
2300  @location(0) positions: vec3<f32>,
2301  @location(1) instancePositions: vec3<f32>,
2302  @location(2) instancePositions64Low: vec3<f32>,
2303  @location(3) instanceRadius: f32,
2304  @location(4) instanceLineWidths: f32,
2305  @location(5) instanceFillColors: vec4<f32>,
2306  @location(6) instanceLineColors: vec4<f32>,
2307  @location(7) instancePickingColors: vec3<f32>
2308};
2309
2310struct Varyings {
2311  @builtin(position) position: vec4<f32>,
2312  @location(0) vFillColor: vec4<f32>,
2313  @location(1) vLineColor: vec4<f32>,
2314  @location(2) unitPosition: vec2<f32>,
2315  @location(3) innerUnitRadius: f32,
2316  @location(4) outerRadiusPixels: f32,
2317};
2318
2319@vertex
2320fn vertexMain(attributes: Attributes) -> Varyings {
2321  var varyings: Varyings;
2322
2323  // Draw an inline geometry constant array clip space triangle to verify that rendering works.
2324  // var positions = array<vec2<f32>, 3>(vec2(0.0, 0.5), vec2(-0.5, -0.5), vec2(0.5, -0.5));
2325  // if (attributes.instanceIndex == 0) {
2326  //   varyings.position = vec4<f32>(positions[attributes.vertexIndex], 0.0, 1.0);
2327  //   return varyings;
2328  // }
2329
2330  // var geometry: Geometry;
2331  // geometry.worldPosition = instancePositions;
2332
2333  // Multiply out radius and clamp to limits
2334  varyings.outerRadiusPixels = clamp(
2335    project_unit_size_to_pixel(scatterplot.radiusScale * attributes.instanceRadius, scatterplot.radiusUnits),
2336    scatterplot.radiusMinPixels, scatterplot.radiusMaxPixels
2337  );
2338
2339  // Multiply out line width and clamp to limits
2340  let lineWidthPixels = clamp(
2341    project_unit_size_to_pixel(scatterplot.lineWidthScale * attributes.instanceLineWidths, scatterplot.lineWidthUnits),
2342    scatterplot.lineWidthMinPixels, scatterplot.lineWidthMaxPixels
2343  );
2344
2345  // outer radius needs to offset by half stroke width
2346  varyings.outerRadiusPixels += scatterplot.stroked * lineWidthPixels / 2.0;
2347  // Expand geometry to accommodate edge smoothing
2348  let edgePadding = select(
2349    (varyings.outerRadiusPixels + SMOOTH_EDGE_RADIUS) / varyings.outerRadiusPixels,
2350    1.0,
2351    scatterplot.antialiasing != 0
2352  );
2353
2354  // position on the containing square in [-1, 1] space
2355  varyings.unitPosition = edgePadding * attributes.positions.xy;
2356  geometry.uv = varyings.unitPosition;
2357  geometry.pickingColor = attributes.instancePickingColors;
2358
2359  varyings.innerUnitRadius = 1.0 - scatterplot.stroked * lineWidthPixels / varyings.outerRadiusPixels;
2360
2361  if (scatterplot.billboard != 0) {
2362    varyings.position = project_position_to_clipspace(attributes.instancePositions, attributes.instancePositions64Low, vec3<f32>(0.0)); // TODO , geometry.position);
2363    // DECKGL_FILTER_GL_POSITION(varyings.position, geometry);
2364    let offset = attributes.positions; // * edgePadding * varyings.outerRadiusPixels;
2365    // DECKGL_FILTER_SIZE(offset, geometry);
2366    let clipPixels = project_pixel_size_to_clipspace(offset.xy);
2367    varyings.position.x = clipPixels.x;
2368    varyings.position.y = clipPixels.y;
2369  } else {
2370    let offset = edgePadding * attributes.positions * project_pixel_size_float(varyings.outerRadiusPixels);
2371    // DECKGL_FILTER_SIZE(offset, geometry);
2372    varyings.position = project_position_to_clipspace(attributes.instancePositions, attributes.instancePositions64Low, offset); // TODO , geometry.position);
2373    // DECKGL_FILTER_GL_POSITION(varyings.position, geometry);
2374  }
2375
2376  // Apply opacity to instance color, or return instance picking color
2377  varyings.vFillColor = vec4<f32>(attributes.instanceFillColors.rgb, attributes.instanceFillColors.a * layer.opacity);
2378  // DECKGL_FILTER_COLOR(varyings.vFillColor, geometry);
2379  varyings.vLineColor = vec4<f32>(attributes.instanceLineColors.rgb, attributes.instanceLineColors.a * layer.opacity);
2380  // DECKGL_FILTER_COLOR(varyings.vLineColor, geometry);
2381
2382  return varyings;
2383}
2384
2385@fragment
2386fn fragmentMain(varyings: Varyings) -> @location(0) vec4<f32> {
2387  // var geometry: Geometry;
2388  // geometry.uv = unitPosition;
2389
2390  let distToCenter = length(varyings.unitPosition) * varyings.outerRadiusPixels;
2391  let inCircle = select(
2392    smoothedge(distToCenter, varyings.outerRadiusPixels),
2393    step(distToCenter, varyings.outerRadiusPixels),
2394    scatterplot.antialiasing != 0
2395  );
2396
2397  if (inCircle == 0.0) {
2398    // discard;
2399  }
2400
2401  var fragColor: vec4<f32>;
2402
2403  if (scatterplot.stroked != 0) {
2404    let isLine = select(
2405      smoothedge(varyings.innerUnitRadius * varyings.outerRadiusPixels, distToCenter),
2406      step(varyings.innerUnitRadius * varyings.outerRadiusPixels, distToCenter),
2407      scatterplot.antialiasing != 0
2408    );
2409
2410    if (scatterplot.filled != 0) {
2411      fragColor = mix(varyings.vFillColor, varyings.vLineColor, isLine);
2412    } else {
2413      if (isLine == 0.0) {
2414        // discard;
2415      }
2416      fragColor = vec4<f32>(varyings.vLineColor.rgb, varyings.vLineColor.a * isLine);
2417    }
2418  } else if (scatterplot.filled == 0) {
2419    // discard;
2420  } else {
2421    fragColor = varyings.vFillColor;
2422  }
2423
2424  fragColor.a *= inCircle;
2425  // DECKGL_FILTER_COLOR(fragColor, geometry);
2426
2427  return fragColor;
2428  // return vec4<f32>(0, 0, 1, 1);
2429}
2430`,yN=[0,0,0,255],Pge={radiusUnits:"meters",radiusScale:{type:"number",min:0,value:1},radiusMinPixels:{type:"number",min:0,value:0},radiusMaxPixels:{type:"number",min:0,value:Number.MAX_SAFE_INTEGER},lineWidthUnits:"meters",lineWidthScale:{type:"number",min:0,value:1},lineWidthMinPixels:{type:"number",min:0,value:0},lineWidthMaxPixels:{type:"number",min:0,value:Number.MAX_SAFE_INTEGER},stroked:!1,filled:!0,billboard:!1,antialiasing:!0,getPosition:{type:"accessor",value:t=>t.position},getRadius:{type:"accessor",value:1},getFillColor:{type:"accessor",value:yN},getLineColor:{type:"accessor",value:yN},getLineWidth:{type:"accessor",value:1},strokeWidth:{deprecatedFor:"getLineWidth"},outline:{deprecatedFor:"stroked"},getColor:{deprecatedFor:["getFillColor","getLineColor"]}};class Jx extends Wo{getShaders(){return super.getShaders({vs:Sge,fs:Tge,source:Cge,modules:[uf,ff,Ege]})}initializeState(){this.getAttributeManager().addInstanced({instancePositions:{size:3,type:"float64",fp64:this.use64bitPositions(),transition:!0,accessor:"getPosition"},instanceRadius:{size:1,transition:!0,accessor:"getRadius",defaultValue:1},instanceFillColors:{size:this.props.colorFormat.length,transition:!0,type:"unorm8",accessor:"getFillColor",defaultValue:[0,0,0,255]},instanceLineColors:{size:this.props.colorFormat.length,transition:!0,type:"unorm8",accessor:"getLineColor",defaultValue:[0,0,0,255]},instanceLineWidths:{size:1,transition:!0,accessor:"getLineWidth",defaultValue:1}})}updateState(e){var n;super.updateState(e),e.changeFlags.extensionsChanged&&((n=this.state.model)==null||n.destroy(),this.state.model=this._getModel(),this.getAttributeManager().invalidateAll())}draw({uniforms:e}){const{radiusUnits:n,radiusScale:r,radiusMinPixels:i,radiusMaxPixels:s,stroked:o,filled:a,billboard:l,antialiasing:c,lineWidthUnits:u,lineWidthScale:h,lineWidthMinPixels:d,lineWidthMaxPixels:m}=this.props,y={stroked:o,filled:a,billboard:l,antialiasing:c,radiusUnits:Ml[n],radiusScale:r,radiusMinPixels:i,radiusMaxPixels:s,lineWidthUnits:Ml[u],lineWidthScale:h,lineWidthMinPixels:d,lineWidthMaxPixels:m},v=this.state.model;v.shaderInputs.setProps({scatterplot:y}),v.draw(this.context.renderPass)}_getModel(){const e=[-1,-1,0,1,-1,0,-1,1,0,1,1,0];
vendor: 5,138 bytes, line 2430
2430return new us(this.context.device,{...this.getShaders(),id:this.props.id,bufferLayout:this.getAttributeManager().getBufferLayouts(),geometry:new Cl({topology:"triangle-strip",attributes:{positions:{size:3,value:new Float32Array(e)}}}),isInstanced:!0})}}Jx.defaultProps=Pge;Jx.layerName="ScatterplotLayer";const vq={CLOCKWISE:1,COUNTER_CLOCKWISE:-1};function yq(t,e,n={}){return Ige(t,n)!==e?(Mge(t,n),!0):!1}function Ige(t,e={}){return Math.sign(Oge(t,e))}const bN={x:0,y:1,z:2};function Oge(t,e={}){const{start:n=0,end:r=t.length,plane:i="xy"}=e,s=e.size||2;let o=0;const a=bN[i[0]],l=bN[i[1]];for(let c=n,u=r-s;c<r;c+=s)o+=(t[c+a]-t[u+a])*(t[c+l]+t[u+l]),u=c;return o/2}function Mge(t,e){const{start:n=0,end:r=t.length,size:i=2}=e,s=(r-n)/i,o=Math.floor(s/2);for(let a=0;a<o;++a){const l=n+a*i,c=n+(s-1-a)*i;for(let u=0;u<i;++u){const h=t[l+u];t[l+u]=t[c+u],t[c+u]=h}}}function Sa(t,e){const n=e.length,r=t.length;if(r>0){let i=!0;for(let s=0;s<n;s++)if(t[r-n+s]!==e[s]){i=!1;break}if(i)return!1}for(let i=0;i<n;i++)t[r+i]=e[i];return!0}function FP(t,e){const n=e.length;for(let r=0;r<n;r++)t[r]=e[r]}function Ev(t,e,n,r,i=[]){const s=r+e*n;for(let o=0;o<n;o++)i[o]=t[s+o];return i}function UP(t,e,n,r,i=[]){let s,o;if(n&8)s=(r[3]-t[1])/(e[1]-t[1]),o=3;else if(n&4)s=(r[1]-t[1])/(e[1]-t[1]),o=1;else if(n&2)s=(r[2]-t[0])/(e[0]-t[0]),o=2;else if(n&1)s=(r[0]-t[0])/(e[0]-t[0]),o=0;else return null;for(let a=0;a<t.length;a++)i[a]=(o&1)===a?r[o]:s*(e[a]-t[a])+t[a];return i}function __(t,e){let n=0;return t[0]<e[0]?n|=1:t[0]>e[2]&&(n|=2),t[1]<e[1]?n|=4:t[1]>e[3]&&(n|=8),n}function bq(t,e){const{size:n=2,broken:r=!1,gridResolution:i=10,gridOffset:s=[0,0],startIndex:o=0,endIndex:a=t.length}=e||{},l=(a-o)/n;let c=[];const u=[c],h=Ev(t,0,n,o);let d,m;const y=wq(h,i,s,[]),v=[];Sa(c,h);for(let b=1;b<l;b++){for(d=Ev(t,b,n,o,d),m=__(d,y);m;){UP(h,d,m,y,v);const x=__(v,y);x&&(UP(h,v,x,y,v),m=x),Sa(c,v),FP(h,v),kge(y,i,m),r&&c.length>n&&(c=[],u.push(c),Sa(c,h)),m=__(d,y)}Sa(c,d),FP(h,d)}return r?u:u[0]}const _N=0,Rge=1;function _q(t,e=null,n){if(!t.length)return[];const{size:r=2,gridResolution:i=10,gridOffset:s=[0,0],edgeTypes:o=!1}=n||{},a=[],l=[{pos:t,types:o?new Array(t.length/r).fill(Rge):null,holes:e||[]}],c=[[],[]];let u=[];for(;l.length;){const{pos:h,types:d,holes:m}=l.shift();Nge(h,r,m[0]||h.length,c),u=wq(c[0],i,s,u);const y=__(c[1],u);if(y){let v=wN(h,d,r,0,m[0]||h.length,u,y);const b={pos:v[0].pos,types:v[0].types,holes:[]},x={pos:v[1].pos,types:v[1].types,holes:[]};l.push(b,x);for(let T=0;T<m.length;T++)v=wN(h,d,r,m[T],m[T+1]||h.length,u,y),v[0]&&(b.holes.push(b.pos.length),b.pos=wb(b.pos,v[0].pos),o&&(b.types=wb(b.types,v[0].types))),v[1]&&(x.holes.push(x.pos.length),x.pos=wb(x.pos,v[1].pos),o&&(x.types=wb(x.types,v[1].types)))}else{const v={positions:h};o&&(v.edgeTypes=d),m.length&&(v.holeIndices=m),a.push(v)}}return a}function wN(t,e,n,r,i,s,o){const a=(i-r)/n,l=[],c=[],u=[],h=[],d=[];let m,y,v;const b=Ev(t,a-1,n,r);let x=Math.sign(o&8?b[1]-s[3]:b[0]-s[2]),T=e&&e[a-1],E=0,C=0;for(let I=0;I<a;I++)m=Ev(t,I,n,r,m),y=Math.sign(o&8?m[1]-s[3]:m[0]-s[2]),v=e&&e[r/n+I],y&&x&&x!==y&&(UP(b,m,o,s,d),Sa(l,d)&&u.push(T),Sa(c,d)&&h.push(T)),y<=0?(Sa(l,m)&&u.push(v),E-=y):u.length&&(u[u.length-1]=_N),y>=0?(Sa(c,m)&&h.push(v),C+=y):h.length&&(h[h.length-1]=_N),FP(b,m),x=y,T=v;return[E?{pos:l,types:e&&u}:null,C?{pos:c,types:e&&h}:null]}function wq(t,e,n,r){const i=Math.floor((t[0]-n[0])/e)*e+n[0],s=Math.floor((t[1]-n[1])/e)*e+n[1];return r[0]=i,r[1]=s,r[2]=i+e,r[3]=s+e,r}function kge(t,e,n){n&8?(t[1]+=e,t[3]+=e):n&4?(t[1]-=e,t[3]-=e):n&2?(t[0]+=e,t[2]+=e):n&1&&(t[0]-=e,t[2]-=e)}function Nge(t,e,n,r){let i=1/0,s=-1/0,o=1/0,a=-1/0;for(let l=0;l<n;l+=e){const c=t[l],u=t[l+1];i=c<i?c:i,s=c>s?c:s,o=u<o?u:o,a=u>a?u:a}return r[0][0]=i,r[0][1]=o,r[1][0]=s,r[1][1]=a,r}function wb(t,e){for(let n=0;n<e.length;n++)t.push(e[n]);return t}const Dge=85.051129;function Bge(t,e){const{size:n=2,startIndex:r=0,endIndex:i=t.length,normalize:s=!0}=e||{},o=t.slice(r,i);xq(o,n,0,i-r);const a=bq(o,{size:n,broken:!0,gridResolution:360,gridOffset:[-180,-180]});if(s)for(const l of a)Aq(l,n);return a}function Lge(t,e=null,n){const{size:r=2,normalize:i=!0,edgeTypes:s=!1}=n||{};e=e||[];const o=[],a=[];let l=0,c=0;for(let h=0;h<=e.length;h++){const d=e[h]||t.length,m=c,y=Fge(t,r,l,d);for(let v=y;v<d;v++)o[c++]=t[v];for(let v=l;v<y;v++)o[c++]=t[v];xq(o,r,m,c),Uge(o,r,m,c,n==null?void 0:n.maxLatitude),l=d,a[h]=c}a.pop();const u=_q(o,a,{size:r,gridResolution:360,gridOffset:[-180,-180],edgeTypes:s});if(i)for(const h of u)Aq(h.positions,r);return u}function Fge(t,e,n,r){let i=-1,s=-1;for(let o=n+1;o<r;o+=e){const a=Math.abs(t[o]);a>i&&(i=a,s=o-1)}return s}function Uge(t,e,n,r,i=Dge){const s=t[n],o=t[r-e];if(Math.abs(s-o)>180){const a=Ev(t,0,e,n);a[0]+=Math.round((o-s)/360)*360,Sa(t,a),a[1]=Math.sign(a[1])*i,Sa(t,a),a[0]=s,Sa(t,a)}}function xq(t,e,n,r){let i=t[0],s;for(let o=n;o<r;o+=e){s=t[o];const a=s-i;(a>180||a<-180)&&(s-=Math.round(a/360)*360),t[o]=i=s}}function Aq(t,e){let n;const r=t.length/e;for(let s=0;s<r&&(n=t[s*e],(n+180)%360===0);s++);const i=-Math.round(n/360)*360;if(i!==0)for(let s=0;s<r;s++)t[s*e]+=i}
2430function zge(t,e,n,r){let i;if(Array.isArray(t[0])){const s=t.length*e;i=new Array(s);for(let o=0;o<t.length;o++)for(let a=0;a<e;a++)i[o*e+a]=t[o][a]||0}else i=t;return n?bq(i,{size:e,gridResolution:n}):r?Bge(i,{size:e}):i}const jge=1,Vge=2,CE=4;class Wge extends gq{constructor(e){super({...e,attributes:{positions:{size:3,padding:18,initialize:!0,type:e.fp64?Float64Array:Float32Array},segmentTypes:{size:1,type:Uint8ClampedArray}}})}get(e){return this.attributes[e]}getGeometryFromBuffer(e){return this.normalize?super.getGeometryFromBuffer(e):null}normalizeGeometry(e){return this.normalize?zge(e,this.positionSize,this.opts.resolution,this.opts.wrapLongitude):e}getGeometrySize(e){if(xN(e)){let r=0;for(const i of e)r+=this.getGeometrySize(i);return r}const n=this.getPathLength(e);return n<2?0:this.isClosed(e)?n<3?0:n+2:n}updateGeometryAttributes(e,n){if(n.geometrySize!==0)if(e&&xN(e))for(const r of e){const i=this.getGeometrySize(r);n.geometrySize=i,this.updateGeometryAttributes(r,n),n.vertexStart+=i}else this._updateSegmentTypes(e,n),this._updatePositions(e,n)}_updateSegmentTypes(e,n){const r=this.attributes.segmentTypes,i=e?this.isClosed(e):!1,{vertexStart:s,geometrySize:o}=n;r.fill(0,s,s+o),i?(r[s]=CE,r[s+o-2]=CE):(r[s]+=jge,r[s+o-2]+=Vge),r[s+o-1]=CE}_updatePositions(e,n){const{positions:r}=this.attributes;if(!r||!e)return;const{vertexStart:i,geometrySize:s}=n,o=new Array(3);for(let a=i,l=0;l<s;a++,l++)this.getPointOnPath(e,l,o),r[a*3]=o[0],r[a*3+1]=o[1],r[a*3+2]=o[2]}getPathLength(e){return e.length/this.positionSize}getPointOnPath(e,n,r=[]){const{positionSize:i}=this;n*i>=e.length&&(n+=1-e.length/i);const s=n*i;return r[0]=e[s],r[1]=e[s+1],r[2]=i===3&&e[s+2]||0,r}isClosed(e){if(!this.normalize)return!!this.opts.loop;const{positionSize:n}=this,r=e.length-n;return e[0]===e[r]&&e[1]===e[r+1]&&(n===2||e[2]===e[r+2])}}function xN(t){return Array.isArray(t[0])}const AN=`uniform pathUniforms {
2431  float widthScale;
2432  float widthMinPixels;
2433  float widthMaxPixels;
2434  float jointType;
2435  float capType;
2436  float miterLimit;
2437  bool billboard;
2438  highp int widthUnits;
2439} path;
2440`,$ge={name:"path",vs:AN,fs:AN,uniformTypes:{widthScale:"f32",widthMinPixels:"f32",widthMaxPixels:"f32",jointType:"f32",capType:"f32",miterLimit:"f32",billboard:"f32",widthUnits:"i32"}},Hge=`#version 300 es
2441#define SHADER_NAME path-layer-vertex-shader
2442in vec2 positions;
2443in float instanceTypes;
2444in vec3 instanceStartPositions;
2445in vec3 instanceEndPositions;
2446in vec3 instanceLeftPositions;
2447in vec3 instanceRightPositions;
2448in vec3 instanceLeftPositions64Low;
2449in vec3 instanceStartPositions64Low;
2450in vec3 instanceEndPositions64Low;
2451in vec3 instanceRightPositions64Low;
2452in float instanceStrokeWidths;
2453in vec4 instanceColors;
2454in vec3 instancePickingColors;
2455uniform float opacity;
2456out vec4 vColor;
2457out vec2 vCornerOffset;
2458out float vMiterLength;
2459out vec2 vPathPosition;
2460out float vPathLength;
2461out float vJointType;
2462const float EPSILON = 0.001;
2463const vec3 ZERO_OFFSET = vec3(0.0);
2464float flipIfTrue(bool flag) {
2465return -(float(flag) * 2. - 1.);
2466}
2467vec3 getLineJoinOffset(
2468vec3 prevPoint, vec3 currPoint, vec3 nextPoint,
2469vec2 width
2470) {
2471bool isEnd = positions.x > 0.0;
2472float sideOfPath = positions.y;
2473float isJoint = float(sideOfPath == 0.0);
2474vec3 deltaA3 = (currPoint - prevPoint);
2475vec3 deltaB3 = (nextPoint - currPoint);
2476mat3 rotationMatrix;
2477bool needsRotation = !path.billboard && project_needs_rotation(currPoint, rotationMatrix);
2478if (needsRotation) {
2479deltaA3 = deltaA3 * rotationMatrix;
2480deltaB3 = deltaB3 * rotationMatrix;
2481}
2482vec2 deltaA = deltaA3.xy / width;
2483vec2 deltaB = deltaB3.xy / width;
2484float lenA = length(deltaA);
2485float lenB = length(deltaB);
2486vec2 dirA = lenA > 0. ? normalize(deltaA) : vec2(0.0, 0.0);
2487vec2 dirB = lenB > 0. ? normalize(deltaB) : vec2(0.0, 0.0);
2488vec2 perpA = vec2(-dirA.y, dirA.x);
2489vec2 perpB = vec2(-dirB.y, dirB.x);
2490vec2 tangent = dirA + dirB;
2491tangent = length(tangent) > 0. ? normalize(tangent) : perpA;
2492vec2 miterVec = vec2(-tangent.y, tangent.x);
2493vec2 dir = isEnd ? dirA : dirB;
2494vec2 perp = isEnd ? perpA : perpB;
2495float L = isEnd ? lenA : lenB;
2496float sinHalfA = abs(dot(miterVec, perp));
2497float cosHalfA = abs(dot(dirA, miterVec));
2498float turnDirection = flipIfTrue(dirA.x * dirB.y >= dirA.y * dirB.x);
2499float cornerPosition = sideOfPath * turnDirection;
2500float miterSize = 1.0 / max(sinHalfA, EPSILON);
2501miterSize = mix(
2502min(miterSize, max(lenA, lenB) / max(cosHalfA, EPSILON)),
2503miterSize,
2504step(0.0, cornerPosition)
2505);
2506vec2 offsetVec = mix(miterVec * miterSize, perp, step(0.5, cornerPosition))
2507* (sideOfPath + isJoint * turnDirection);
2508bool isStartCap = lenA == 0.0 || (!isEnd && (instanceTypes == 1.0 || instanceTypes == 3.0));
2509bool isEndCap = lenB == 0.0 || (isEnd && (instanceTypes == 2.0 || instanceTypes == 3.0));
2510bool isCap = isStartCap || isEndCap;
2511if (isCap) {
2512offsetVec = mix(perp * sideOfPath, dir * path.capType * 4.0 * flipIfTrue(isStartCap), isJoint);
2513vJointType = path.capType;
2514} else {
2515vJointType = path.jointType;
2516}
2517vPathLength = L;
2518vCornerOffset = offsetVec;
2519vMiterLength = dot(vCornerOffset, miterVec * turnDirection);
2520vMiterLength = isCap ? isJoint : vMiterLength;
2521vec2 offsetFromStartOfPath = vCornerOffset + deltaA * float(isEnd);
2522vPathPosition = vec2(
2523dot(offsetFromStartOfPath, perp),
2524dot(offsetFromStartOfPath, dir)
2525);
2526geometry.uv = vPathPosition;
2527float isValid = step(instanceTypes, 3.5);
2528vec3 offset = vec3(offsetVec * width * isValid, 0.0);
2529if (needsRotation) {
2530offset = rotationMatrix * offset;
2531}
2532return offset;
2533}
2534void clipLine(inout vec4 position, vec4 refPosition) {
2535if (position.w < EPSILON) {
2536float r = (EPSILON - refPosition.w) / (position.w - refPosition.w);
2537position = refPosition + (position - refPosition) * r;
2538}
2539}
2540void main() {
2541geometry.pickingColor = instancePickingColors;
2542vColor = vec4(instanceColors.rgb, instanceColors.a * layer.opacity);
2543float isEnd = positions.x;
2544vec3 prevPosition = mix(instanceLeftPositions, instanceStartPositions, isEnd);
2545vec3 prevPosition64Low = mix(instanceLeftPositions64Low, instanceStartPositions64Low, isEnd);
2546vec3 currPosition = mix(instanceStartPositions, instanceEndPositions, isEnd);
2547vec3 currPosition64Low = mix(instanceStartPositions64Low, instanceEndPositions64Low, isEnd);
2548vec3 nextPosition = mix(instanceEndPositions, instanceRightPositions, isEnd);
2549vec3 nextPosition64Low = mix(instanceEndPositions64Low, instanceRightPositions64Low, isEnd);
2550geometry.worldPosition = currPosition;
2551vec2 widthPixels = vec2(clamp(
2552project_size_to_pixel(instanceStrokeWidths * path.widthScale, path.widthUnits),
2553path.widthMinPixels, path.widthMaxPixels) / 2.0);
2554vec3 width;
2555if (path.billboard) {
2556vec4 prevPositionScreen = project_position_to_clipspace(prevPosition, prevPosition64Low, ZERO_OFFSET);
2557vec4 currPositionScreen = project_position_to_clipspace(currPosition, currPosition64Low, ZERO_OFFSET, geometry.position);
2558vec4 nextPositionScreen = project_position_to_clipspace(nextPosition, nextPosition64Low, ZERO_OFFSET);
2559clipLine(prevPositionScreen, currPositionScreen);
2560clipLine(nextPositionScreen, currPositionScreen);
2561clipLine(currPositionScreen, mix(nextPositionScreen, prevPositionScreen, isEnd));
2562width = vec3(widthPixels, 0.0);
2563DECKGL_FILTER_SIZE(width, geometry);
2564vec3 offset = getLineJoinOffset(
2565prevPositionScreen.xyz / prevPositionScreen.w,
2566currPositionScreen.xyz / currPositionScreen.w,
2567nextPositionScreen.xyz / nextPositionScreen.w,
2568project_pixel_size_to_clipspace(width.xy)
2569);
2570DECKGL_FILTER_GL_POSITION(currPositionScreen, geometry);
2571gl_Position = vec4(currPositionScreen.xyz + offset * currPositionScreen.w, currPositionScreen.w);
2572} else {
2573prevPosition = project_position(prevPosition, prevPosition64Low);
2574currPosition = project_position(currPosition, currPosition64Low);
2575nextPosition = project_position(nextPosition, nextPosition64Low);
2576width = vec3(project_pixel_size(widthPixels), 0.0);
2577DECKGL_FILTER_SIZE(width, geometry);
2578vec3 offset = getLineJoinOffset(prevPosition, currPosition, nextPosition, width.xy);
2579geometry.position = vec4(currPosition + offset, 1.0);
2580gl_Position = project_common_position_to_clipspace(geometry.position);
2581DECKGL_FILTER_GL_POSITION(gl_Position, geometry);
2582}
2583DECKGL_FILTER_COLOR(vColor, geometry);
2584}
2585`,qge=`#version 300 es
2586#define SHADER_NAME path-layer-fragment-shader
2587precision highp float;
2588in vec4 vColor;
2589in vec2 vCornerOffset;
2590in float vMiterLength;
2591in vec2 vPathPosition;
2592in float vPathLength;
2593in float vJointType;
2594out vec4 fragColor;
2595void main(void) {
2596geometry.uv = vPathPosition;
2597if (vPathPosition.y < 0.0 || vPathPosition.y > vPathLength) {
2598if (vJointType > 0.5 && length(vCornerOffset) > 1.0) {
2599discard;
2600}
2601if (vJointType < 0.5 && vMiterLength > path.miterLimit + 1.0) {
2602discard;
2603}
2604}
2605fragColor = vColor;
2606DECKGL_FILTER_COLOR(fragColor, geometry);
2607}
2608`,Eq=[0,0,0,255],Qge={widthUnits:"meters",widthScale:{type:"number",min:0,value:1},widthMinPixels:{type:"number",min:0,value:0},widthMaxPixels:{type:"number",min:0,value:Number.MAX_SAFE_INTEGER},jointRounded:!1,capRounded:!1,miterLimit:{type:"number",min:0,value:4},billboard:!1,_pathType:null,getPath:{type:"accessor",value:t=>t.path},getColor:{type:"accessor",value:Eq},getWidth:{type:"accessor",value:1}
vendor: 10,963 bytes, line 2608
2608,rounded:{deprecatedFor:["jointRounded","capRounded"]}},PE={enter:(t,e)=>e.length?e.subarray(e.length-t.length):t};class Sv extends Wo{getShaders(){return super.getShaders({vs:Hge,fs:qge,modules:[uf,ff,$ge]})}get wrapLongitude(){return!1}getBounds(){var e;return(e=this.getAttributeManager())==null?void 0:e.getBounds(["vertexPositions"])}initializeState(){this.getAttributeManager().addInstanced({vertexPositions:{size:3,vertexOffset:1,type:"float64",fp64:this.use64bitPositions(),transition:PE,accessor:"getPath",update:this.calculatePositions,noAlloc:!0,shaderAttributes:{instanceLeftPositions:{vertexOffset:0},instanceStartPositions:{vertexOffset:1},instanceEndPositions:{vertexOffset:2},instanceRightPositions:{vertexOffset:3}}},instanceTypes:{size:1,type:"uint8",update:this.calculateSegmentTypes,noAlloc:!0},instanceStrokeWidths:{size:1,accessor:"getWidth",transition:PE,defaultValue:1},instanceColors:{size:this.props.colorFormat.length,type:"unorm8",accessor:"getColor",transition:PE,defaultValue:Eq},instancePickingColors:{size:4,type:"uint8",accessor:(r,{index:i,target:s})=>this.encodePickingColor(r&&r.__source?r.__source.index:i,s)}}),this.setState({pathTesselator:new Wge({fp64:this.use64bitPositions()})})}updateState(e){var o;super.updateState(e);const{props:n,changeFlags:r}=e,i=this.getAttributeManager();if(r.dataChanged||r.updateTriggersChanged&&(r.updateTriggersChanged.all||r.updateTriggersChanged.getPath)){const{pathTesselator:a}=this.state,l=n.data.attributes||{};a.updateGeometry({data:n.data,geometryBuffer:l.getPath,buffers:l,normalize:!n._pathType,loop:n._pathType==="loop",getGeometry:n.getPath,positionFormat:n.positionFormat,wrapLongitude:n.wrapLongitude,resolution:this.context.viewport.resolution,dataChanged:r.dataChanged}),this.setState({numInstances:a.instanceCount,startIndices:a.vertexStarts}),r.dataChanged||i.invalidateAll()}r.extensionsChanged&&((o=this.state.model)==null||o.destroy(),this.state.model=this._getModel(),i.invalidateAll())}getPickingInfo(e){const n=super.getPickingInfo(e),{index:r}=n,i=this.props.data;return i[0]&&i[0].__source&&(n.object=i.find(s=>s.__source.index===r)),n}disablePickingIndex(e){const n=this.props.data;if(n[0]&&n[0].__source)for(let r=0;r<n.length;r++)n[r].__source.index===e&&this._disablePickingIndex(r);else super.disablePickingIndex(e)}draw({uniforms:e}){const{jointRounded:n,capRounded:r,billboard:i,miterLimit:s,widthUnits:o,widthScale:a,widthMinPixels:l,widthMaxPixels:c}=this.props,u=this.state.model,h={jointType:Number(n),capType:Number(r),billboard:i,widthUnits:Ml[o],widthScale:a,miterLimit:s,widthMinPixels:l,widthMaxPixels:c};u.shaderInputs.setProps({path:h}),u.draw(this.context.renderPass)}_getModel(){const e=[0,1,2,1,4,2,1,3,4,3,5,4],n=[0,0,0,-1,0,1,1,-1,1,1,1,0];return new us(this.context.device,{...this.getShaders(),id:this.props.id,bufferLayout:this.getAttributeManager().getBufferLayouts(),geometry:new Cl({topology:"triangle-list",attributes:{indices:new Uint16Array(e),positions:{value:new Float32Array(n),size:2}}}),isInstanced:!0})}calculatePositions(e){const{pathTesselator:n}=this.state;e.startIndices=n.vertexStarts,e.value=n.get("positions")}calculateSegmentTypes(e){const{pathTesselator:n}=this.state;e.startIndices=n.vertexStarts,e.value=n.get("segmentTypes")}}Sv.defaultProps=Qge;Sv.layerName="PathLayer";var xb={exports:{}},EN;function Xge(){if(EN)return xb.exports;EN=1,xb.exports=t,xb.exports.default=t;function t(j,q,Y){Y=Y||2;var X=q&&q.length,te=X?q[0]*Y:j.length,D=e(j,0,te,Y,!0),$=[];if(!D||D.next===D.prev)return $;var he,Se,fe,$e,Ze,ce,me;if(X&&(D=l(j,q,D,Y)),j.length>80*Y){he=fe=j[0],Se=$e=j[1];for(var de=Y;de<te;de+=Y)Ze=j[de],ce=j[de+1],Ze<he&&(he=Ze),ce<Se&&(Se=ce),Ze>fe&&(fe=Ze),ce>$e&&($e=ce);me=Math.max(fe-he,$e-Se),me=me!==0?32767/me:0}return r(D,$,Y,he,Se,me,0),$}function e(j,q,Y,X,te){var D,$;if(te===K(j,q,Y,X)>0)for(D=q;D<Y;D+=X)$=z(D,j[D],j[D+1],$);else for(D=Y-X;D>=q;D-=X)$=z(D,j[D],j[D+1],$);return $&&C($,$.next)&&(V($),$=$.next),$}function n(j,q){if(!j)return j;q||(q=j);var Y=j,X;do if(X=!1,!Y.steiner&&(C(Y,Y.next)||E(Y.prev,Y,Y.next)===0)){if(V(Y),Y=q=Y.prev,Y===Y.next)break;X=!0}else Y=Y.next;while(X||Y!==q);return q}function r(j,q,Y,X,te,D,$){if(j){!$&&D&&m(j,X,te,D);for(var he=j,Se,fe;j.prev!==j.next;){if(Se=j.prev,fe=j.next,D?s(j,X,te,D):i(j)){q.push(Se.i/Y|0),q.push(j.i/Y|0),q.push(fe.i/Y|0),V(j),j=fe.next,he=fe.next;continue}if(j=fe,j===he){$?$===1?(j=o(n(j),q,Y),r(j,q,Y,X,te,D,2)):$===2&&a(j,q,Y,X,te,D):r(n(j),q,Y,X,te,D,1);break}}}}function i(j){var q=j.prev,Y=j,X=j.next;if(E(q,Y,X)>=0)return!1;for(var te=q.x,D=Y.x,$=X.x,he=q.y,Se=Y.y,fe=X.y,$e=te<D?te<$?te:$:D<$?D:$,Ze=he<Se?he<fe?he:fe:Se<fe?Se:fe,ce=te>D?te>$?te:$:D>$?D:$,me=he>Se?he>fe?he:fe:Se>fe?Se:fe,de=X.next;de!==q;){if(de.x>=$e&&de.x<=ce&&de.y>=Ze&&de.y<=me&&x(te,he,D,Se,$,fe,de.x,de.y)&&E(de.prev,de,de.next)>=0)return!1;de=de.next}return!0}function s(j,q,Y,X){var te=j.prev,D=j,$=j.next;if(E(te,D,$)>=0)return!1;for(var he=te.x,Se=D.x,fe=$.x,$e=te.y,Ze=D.y,ce=$.y,me=he<Se?he<fe?he:fe:Se<fe?Se:fe,de=$e<Ze?$e<ce?$e:ce:Ze<ce?Ze:ce,ye=he>Se?he>fe?he:fe:Se>fe?Se:fe,ve=$e>Ze?$e>ce?$e:ce:Ze>ce?Ze:ce,ue=v(me,de,q,Y,X),k=v(ye,ve,q,Y,X),ie=j.prevZ,ne=j.nextZ;ie&&ie.z>=ue&&ne&&ne.z<=k;){if(ie.x>=me&&ie.x<=ye&&ie.y>=de&&ie.y<=ve&&ie!==te&&ie!==$&&x(he,$e,Se,Ze,fe,ce,ie.x,ie.y)&&E(ie.prev,ie,ie.next)>=0||(ie=ie.prevZ,ne.x>=me&&ne.x<=ye&&ne.y>=de&&ne.y<=ve&&ne!==te&&ne!==$&&x(he,$e,Se,Ze,fe,ce,ne.x,ne.y)&&E(ne.prev,ne,ne.next)>=0))return!1;ne=ne.nextZ}for(;ie&&ie.z>=ue;){if(ie.x>=me&&ie.x<=ye&&ie.y>=de&&ie.y<=ve&&ie!==te&&ie!==$&&x(he,$e,Se,Ze,fe,ce,ie.x,ie.y)&&E(ie.prev,ie,ie.next)>=0)return!1;ie=ie.prevZ}for(;ne&&ne.z<=k;){if(ne.x>=me&&ne.x<=ye&&ne.y>=de&&ne.y<=ve&&ne!==te&&ne!==$&&x(he,$e,Se,Ze,fe,ce,ne.x,ne.y)&&E(ne.prev,ne,ne.next)>=0)return!1;ne=ne.nextZ}return!0}function o(j,q,Y){var X=j;do{var te=X.prev,D=X.next.next;!C(te,D)&&I(te,X,X.next,D)&&F(te,D)&&F(D,te)&&(q.push(te.i/Y|0),q.push(X.i/Y|0),q.push(D.i/Y|0),V(X),V(X.next),X=j=D),X=X.next}while(X!==j);return n(X)}function a(j,q,Y,X,te,D){var $=j;do{for(var he=$.next.next;he!==$.prev;){if($.i!==he.i&&T($,he)){var Se=W($,he);$=n($,$.next),Se=n(Se,Se.next),r($,q,Y,X,te,D,0),r(Se,q,Y,X,te,D,0);return}he=he.next}$=$.next}while($!==j)}function l(j,q,Y,X){var te=[],D,$,he,Se,fe;for(D=0,$=q.length;D<$;D++)he=q[D]*X,Se=D<$-1?q[D+1]*X:j.length,fe=e(j,he,Se,X,!1),fe===fe.next&&(fe.steiner=!0),te.push(b(fe));for(te.sort(c),D=0;D<te.length;D++)Y=u(te[D],Y);return Y}function c(j,q){return j.x-q.x}function u(j,q){var Y=h(j,q);if(!Y)return q;var X=W(Y,j);return n(X,X.next),n(Y,Y.next)}function h(j,q){var Y=q,X=j.x,te=j.y,D=-1/0,$;do{if(te<=Y.y&&te>=Y.next.y&&Y.next.y!==Y.y){var he=Y.x+(te-Y.y)*(Y.next.x-Y.x)/(Y.next.y-Y.y);if(he<=X&&he>D&&(D=he,$=Y.x<Y.next.x?Y:Y.next,he===X))return $}Y=Y.next}while(Y!==q);if(!$)return null;var Se=$,fe=$.x,$e=$.y,Ze=1/0,ce;Y=$;do X>=Y.x&&Y.x>=fe&&X!==Y.x&&x(te<$e?X:D,te,fe,$e,te<$e?D:X,te,Y.x,Y.y)&&(ce=Math.abs(te-Y.y)/(X-Y.x),F(Y,j)&&(ce<Ze||ce===Ze&&(Y.x>$.x||Y.x===$.x&&d($,Y)))&&($=Y,Ze=ce)),Y=Y.next;while(Y!==Se);return $}function d(j,q){return E(j.prev,j,q.prev)<0&&E(q.next,j,j.next)<0}function m(j,q,Y,X){var te=j;do te.z===0&&(te.z=v(te.x,te.y,q,Y,X)),te.prevZ=te.prev,te.nextZ=te.next,te=te.next;while(te!==j);te.prevZ.nextZ=null,te.prevZ=null,y(te)}function y(j){var q,Y,X,te,D,$,he,Se,fe=1;do{for(Y=j,j=null,D=null,$=0;Y;){for($++,X=Y,he=0,q=0;q<fe&&(he++,X=X.nextZ,!!X);q++);for(Se=fe;he>0||Se>0&&X;)he!==0&&(Se===0||!X||Y.z<=X.z)?(te=Y,Y=Y.nextZ,he--):(te=X,X=X.nextZ,Se--),D?D.nextZ=te:j=te,te.prevZ=D,D=te;Y=X}D.nextZ=null,fe*=2}while($>1);return j}function v(j,q,Y,X,te){return j=(j-Y)*te|0,q=(q-X)*te|0,j=(j|j<<8)&16711935,j=(j|j<<4)&252645135,j=(j|j<<2)&858993459,j=(j|j<<1)&1431655765,q=(q|q<<8)&16711935,q=(q|q<<4)&252645135,q=(q|q<<2)&858993459,q=(q|q<<1)&1431655765,j|q<<1}function b(j){var q=j,Y=j;do(q.x<Y.x||q.x===Y.x&&q.y<Y.y)&&(Y=q),q=q.next;while(q!==j);return Y}function x(j,q,Y,X,te,D,$,he){return(te-$)*(q-he)>=(j-$)*(D-he)&&(j-$)*(X-he)>=(Y-$)*(q-he)&&(Y-$)*(D-he)>=(te-$)*(X-he)}function T(j,q){return j.next.i!==q.i&&j.prev.i!==q.i&&!U(j,q)&&(F(j,q)&&F(q,j)&&H(j,q)&&(E(j.prev,j,q.prev)||E(j,q.prev,q))||C(j,q)&&E(j.prev,j,j.next)>0&&E(q.prev,q,q.next)>0)}function E(j,q,Y){return(q.y-j.y)*(Y.x-q.x)-(q.x-j.x)*(Y.y-q.y)}function C(j,q){return j.x===q.x&&j.y===q.y}function I(j,q,Y,X){var te=N(E(j,q,Y)),D=N(E(j,q,X)),$=N(E(Y,X,j)),he=N(E(Y,X,q));return!!(te!==D&&$!==he||te===0&&O(j,Y,q)||D===0&&O(j,X,q)||$===0&&O(Y,j,X)||he===0&&O(Y,q,X))}function O(j,q,Y){return q.x<=Math.max(j.x,Y.x)&&q.x>=Math.min(j.x,Y.x)&&q.y<=Math.max(j.y,Y.y)&&q.y>=Math.min(j.y,Y.y)}function N(j){return j>0?1:j<0?-1:0}function U(j,q){var Y=j;do{if(Y.i!==j.i&&Y.next.i!==j.i&&Y.i!==q.i&&Y.next.i!==q.i&&I(Y,Y.next,j,q))return!0;Y=Y.next}while(Y!==j);return!1}function F(j,q){return E(j.prev,j,j.next)<0?E(j,q,j.next)>=0&&E(j,j.prev,q)>=0:E(j,q,j.prev)<0||E(j,j.next,q)<0}function H(j,q){var Y=j,X=!1,te=(j.x+q.x)/2,D=(j.y+q.y)/2;do Y.y>D!=Y.next.y>D&&Y.next.y!==Y.y&&te<(Y.next.x-Y.x)*(D-Y.y)/(Y.next.y-Y.y)+Y.x&&(X=!X),Y=Y.next;while(Y!==j);return X}function W(j,q){var Y=new M(j.i,j.x,j.y),X=new M(q.i,q.x,q.y),te=j.next,D=q.prev;return j.next=q,q.prev=j,Y.next=te,te.prev=Y,X.next=Y,Y.prev=X,D.next=X,X.prev=D,X}function z(j,q,Y,X){var te=new M(j,q,Y);return X?(te.next=X.next,te.prev=X,X.next.prev=te,X.next=te):(te.prev=te,te.next=te),te}function V(j){j.next.prev=j.prev,j.prev.next=j.next,j.prevZ&&(j.prevZ.nextZ=j.nextZ),j.nextZ&&(j.nextZ.prevZ=j.prevZ)}function M(j,q,Y){this.i=j,this.x=q,this.y=Y,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}t.deviation=function(j,q,Y,X){var te=q&&q.length,D=te?q[0]*Y:j.length,$=Math.abs(K(j,0,D,Y));if(te)for(var he=0,Se=q.length;he<Se;he++){var fe=q[he]*Y,$e=he<Se-1?q[he+1]*Y:j.length;$-=Math.abs(K(j,fe,$e,Y))}var Ze=0;for(he=0;he<X.length;he+=3){var ce=X[he]*Y,me=X[he+1]*Y,de=X[he+2]*Y;Ze+=Math.abs((j[ce]-j[de])*(j[me+1]-j[ce+1])-(j[ce]-j[me])*(j[de+1]-j[ce+1]))}return $===0&&Ze===0?0:Math.abs((Ze-$)/$)};function K(j,q,Y,X){for(var te=0,D=q,$=Y-X;D<Y;D+=X)te+=(j[$]-j[D])*(j[D+1]+j[$+1]),$=D;return te}return t.flatten=function(j){for(var q=j[0][0].length,Y={vertices:[],holes:[],dimensions:q},X=0,te=0;te<j.length;te++){for(var D=0;D<j[te].length;D++)for(var $=0;$<q;$++)Y.vertices.push(j[te][D][$]);te>0&&(X+=j[te-1].length,Y.holes.push(X))}return Y},xb.exports}var Yge=Xge();const Kge=fn(Yge),Ab=vq.CLOCKWISE,SN=vq.COUNTER_CLOCKWISE,Zu={};function Gge(t){if(t=t&&t.positions||t,!Array.isArray(t)&&!ArrayBuffer.isView(t))throw new Error("invalid polygon")}function U1(t){return"positions"in t?t.positions:t}function w_(t){return"holeIndices"in t?t.holeIndices:null}function Zge(t){return Array.isArray(t[0])}function Jge(t){return t.length>=1&&t[0].length>=2&&Number.isFinite(t[0][0])}function eme(t){const e=t[0],n=t[t.length-1];return e[0]===n[0]&&e[1]===n[1]&&e[2]===n[2]}function tme(t,e,n,r){for(let i=0;i<e;
2608i++)if(t[n+i]!==t[r-e+i])return!1;return!0}function TN(t,e,n,r,i){let s=e;const o=n.length;for(let a=0;a<o;a++)for(let l=0;l<r;l++)t[s++]=n[a][l]||0;if(!eme(n))for(let a=0;a<r;a++)t[s++]=n[0][a]||0;return Zu.start=e,Zu.end=s,Zu.size=r,yq(t,i,Zu),s}function CN(t,e,n,r,i=0,s,o){s=s||n.length;const a=s-i;if(a<=0)return e;let l=e;for(let c=0;c<a;c++)t[l++]=n[i+c];if(!tme(n,r,i,s))for(let c=0;c<r;c++)t[l++]=n[i+c];return Zu.start=e,Zu.end=l,Zu.size=r,yq(t,o,Zu),l}function nme(t,e){Gge(t);const n=[],r=[];if("positions"in t){const{positions:i,holeIndices:s}=t;if(s){let o=0;for(let a=0;a<=s.length;a++)o=CN(n,o,i,e,s[a-1],s[a],a===0?Ab:SN),r.push(o);return r.pop(),{positions:n,holeIndices:r}}t=i}if(!Zge(t))return CN(n,0,t,e,0,n.length,Ab),n;if(!Jge(t)){let i=0;for(const[s,o]of t.entries())i=TN(n,i,o,e,s===0?Ab:SN),r.push(i);return r.pop(),{positions:n,holeIndices:r}}return TN(n,0,t,e,Ab),n}function IE(t,e,n){const r=t.length/3;let i=0;for(let s=0;s<r;s++){const o=(s+1)%r;i+=t[s*3+e]*t[o*3+n],i-=t[o*3+e]*t[s*3+n]}return Math.abs(i/2)}function PN(t,e,n,r){const i=t.length/3;for(let s=0;s<i;s++){const o=s*3,a=t[o+0],l=t[o+1],c=t[o+2];t[o+e]=a,t[o+n]=l,t[o+r]=c}}function rme(t,e,n,r){let i=w_(t);i&&(i=i.map(a=>a/e));let s=U1(t);const o=r&&e===3;if(n){const a=s.length;s=s.slice();const l=[];for(let c=0;c<a;c+=e){l[0]=s[c],l[1]=s[c+1],o&&(l[2]=s[c+2]);const u=n(l);s[c]=u[0],s[c+1]=u[1],o&&(s[c+2]=u[2])}}if(o){const a=IE(s,0,1),l=IE(s,0,2),c=IE(s,1,2);if(!a&&!l&&!c)return[];a>l&&a>c||(l>c?(n||(s=s.slice()),PN(s,0,2,1)):(n||(s=s.slice()),PN(s,2,0,1)))}return Kge(s,i,e)}class ime extends gq{constructor(e){const{fp64:n,IndexType:r=Uint32Array}=e;super({...e,attributes:{positions:{size:3,type:n?Float64Array:Float32Array},vertexValid:{type:Uint16Array,size:1},indices:{type:r,size:1}}})}get(e){const{attributes:n}=this;return e==="indices"?n.indices&&n.indices.subarray(0,this.vertexCount):n[e]}updateGeometry(e){super.updateGeometry(e);const n=this.buffers.indices;if(n)this.vertexCount=(n.value||n).length;else if(this.data&&!this.getGeometry)throw new Error("missing indices buffer")}normalizeGeometry(e){if(this.normalize){const n=nme(e,this.positionSize);return this.opts.resolution?_q(U1(n),w_(n),{size:this.positionSize,gridResolution:this.opts.resolution,edgeTypes:!0}):this.opts.wrapLongitude?Lge(U1(n),w_(n),{size:this.positionSize,maxLatitude:86,edgeTypes:!0}):n}return e}getGeometrySize(e){if(IN(e)){let n=0;for(const r of e)n+=this.getGeometrySize(r);return n}return U1(e).length/this.positionSize}getGeometryFromBuffer(e){return this.normalize||!this.buffers.indices?super.getGeometryFromBuffer(e):null}updateGeometryAttributes(e,n){if(e&&IN(e))for(const r of e){const i=this.getGeometrySize(r);n.geometrySize=i,this.updateGeometryAttributes(r,n),n.vertexStart+=i,n.indexStart=this.indexStarts[n.geometryIndex+1]}else{const r=e;this._updateIndices(r,n),this._updatePositions(r,n),this._updateVertexValid(r,n)}}_updateIndices(e,{geometryIndex:n,vertexStart:r,indexStart:i}){const{attributes:s,indexStarts:o,typedArrayManager:a}=this;let l=s.indices;if(!l||!e)return;let c=i;const u=rme(e,this.positionSize,this.opts.preproject,this.opts.full3d);l=a.allocate(l,i+u.length,{copy:!0});for(let h=0;h<u.length;h++)l[c++]=u[h]+r;o[n+1]=i+u.length,s.indices=l}_updatePositions(e,{vertexStart:n,geometrySize:r}){const{attributes:{positions:i},positionSize:s}=this;if(!i||!e)return;const o=U1(e);for(let a=n,l=0;l<r;a++,l++){const c=o[l*s],u=o[l*s+1],h=s>2?o[l*s+2]:0;i[a*3]=c,i[a*3+1]=u,i[a*3+2]=h}}_updateVertexValid(e,{vertexStart:n,geometrySize:r}){const{positionSize:i}=this,s=this.attributes.vertexValid,o=e&&w_(e);if(e&&e.edgeTypes?s.set(e.edgeTypes,n):s.fill(1,n,n+r),o)for(let a=0;a<o.length;a++)s[n+o[a]/i-1]=0;s[n+r-1]=0}}function IN(t){return Array.isArray(t)&&t.length>0&&!Number.isFinite(t[0])}const ON=`uniform solidPolygonUniforms {
2609  bool extruded;
2610  bool isWireframe;
2611  float elevationScale;
2612} solidPolygon;
2613`,sme={name:"solidPolygon",vs:ON,fs:ON,uniformTypes:{extruded:"f32",isWireframe:"f32",elevationScale:"f32"}},Sq=`in vec4 fillColors;
2614in vec4 lineColors;
2615in vec3 pickingColors;
2616out vec4 vColor;
2617struct PolygonProps {
2618vec3 positions;
2619vec3 positions64Low;
2620vec3 normal;
2621float elevations;
2622};
2623vec3 project_offset_normal(vec3 vector) {
2624if (project.coordinateSystem == COORDINATE_SYSTEM_LNGLAT ||
2625project.coordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSETS) {
2626return normalize(vector * project.commonUnitsPerWorldUnit);
2627}
2628return project_normal(vector);
2629}
2630void calculatePosition(PolygonProps props) {
2631vec3 pos = props.positions;
2632vec3 pos64Low = props.positions64Low;
2633vec3 normal = props.normal;
2634vec4 colors = solidPolygon.isWireframe ? lineColors : fillColors;
2635geometry.worldPosition = props.positions;
2636geometry.pickingColor = pickingColors;
2637if (solidPolygon.extruded) {
2638pos.z += props.elevations * solidPolygon.elevationScale;
2639}
2640gl_Position = project_position_to_clipspace(pos, pos64Low, vec3(0.), geometry.position);
2641DECKGL_FILTER_GL_POSITION(gl_Position, geometry);
2642if (solidPolygon.extruded) {
2643#ifdef IS_SIDE_VERTEX
2644normal = project_offset_normal(normal);
2645#else
2646normal = project_normal(normal);
2647#endif
2648geometry.normal = normal;
2649vec3 lightColor = lighting_getLightColor(colors.rgb, project.cameraPosition, geometry.position.xyz, geometry.normal);
2650vColor = vec4(lightColor, colors.a * layer.opacity);
2651} else {
2652vColor = vec4(colors.rgb, colors.a * layer.opacity);
2653}
2654DECKGL_FILTER_COLOR(vColor, geometry);
2655}
2656`,ome=`#version 300 es
2657#define SHADER_NAME solid-polygon-layer-vertex-shader
2658in vec3 vertexPositions;
2659in vec3 vertexPositions64Low;
2660in float elevations;
2661${Sq}
2662void main(void) {
2663PolygonProps props;
2664props.positions = vertexPositions;
2665props.positions64Low = vertexPositions64Low;
2666props.elevations = elevations;
2667props.normal = vec3(0.0, 0.0, 1.0);
2668calculatePosition(props);
2669}
2670`,ame=`#version 300 es
2671#define SHADER_NAME solid-polygon-layer-vertex-shader-side
2672#define IS_SIDE_VERTEX
2673in vec2 positions;
2674in vec3 vertexPositions;
2675in vec3 nextVertexPositions;
2676in vec3 vertexPositions64Low;
2677in vec3 nextVertexPositions64Low;
2678in float elevations;
2679in float instanceVertexValid;
2680${Sq}
2681void main(void) {
2682if(instanceVertexValid < 0.5){
2683gl_Position = vec4(0.);
2684return;
2685}
2686PolygonProps props;
2687vec3 pos;
2688vec3 pos64Low;
2689vec3 nextPos;
2690vec3 nextPos64Low;
2691#if RING_WINDING_ORDER_CW == 1
2692pos = vertexPositions;
2693pos64Low = vertexPositions64Low;
2694nextPos = nextVertexPositions;
2695nextPos64Low = nextVertexPositions64Low;
2696#else
2697pos = nextVertexPositions;
2698pos64Low = nextVertexPositions64Low;
2699nextPos = vertexPositions;
2700nextPos64Low = vertexPositions64Low;
2701#endif
2702props.positions = mix(pos, nextPos, positions.x);
2703props.positions64Low = mix(pos64Low, nextPos64Low, positions.x);
2704props.normal = vec3(
2705pos.y - nextPos.y + (pos64Low.y - nextPos64Low.y),
2706nextPos.x - pos.x + (nextPos64Low.x - pos64Low.x),
27070.0);
2708props.elevations = elevations * positions.y;
2709calculatePosition(props);
2710}
2711`,lme=`#version 300 es
2712#define SHADER_NAME solid-polygon-layer-fragment-shader
2713precision highp float;
2714in vec4 vColor;
2715out vec4 fragColor;
2716void main(void) {
2717fragColor = vColor;
2718geometry.uv = vec2(0.);
2719DECKGL_FILTER_COLOR(fragColor, geometry);
2720}
2721`,ow=[0,0,0,255],cme={filled:!0,extruded:!1,wireframe:!1,_normalize:!0,_windingOrder:"CW",_full3d:!1,elevationScale:{type:"number",min:0,value:1},getPolygon:{type:"accessor",value:t=>t.polygon},getElevation:{type:"accessor",value:1e3},getFillColor:{type:"accessor",value:ow},getLineColor:{type:"accessor",value:ow},material:!0},Eb={enter:(t,e)=>e.length?e.subarray(e.length-t.length):t};class SM extends Wo{getShaders(e){return super.getShaders({vs:e==="top"?ome:ame,fs:lme,defines:{RING_WINDING_ORDER_CW:!this.props._normalize&&this.props._windingOrder==="CCW"?0:1},modules:[uf,aH,ff,sme]})}get wrapLongitude(){return!1}getBounds(){var e;return(e=this.getAttributeManager())==null?void 0:e.getBounds(["vertexPositions"])}initializeState(){const{viewport:e}=this.context;let{coordinateSystem:n}=this.props;const{_full3d:r}=this.props;e.isGeospatial&&n===Wt.DEFAULT&&(n=Wt.LNGLAT);let i;n===Wt.LNGLAT&&(r?i=e.projectPosition.bind(e):i=e.projectFlat.bind(e)),this.setState({numInstances:0,polygonTesselator:new ime({preproject:i,fp64:this.use64bitPositions(),IndexType:Uint32Array})});const s=this.getAttributeManager(),o=!0;s.remove(["instancePickingColors"]),s.add({indices:{size:1,isIndexed:!0,update:this.calculateIndices,noAlloc:o},vertexPositions:{size:3,type:"float64",stepMode:"dynamic",fp64:this.use64bitPositions(),transition:Eb,accessor:"getPolygon",update:this.calculatePositions,noAlloc:o,shaderAttributes:{nextVertexPositions:{vertexOffset:1}}},instanceVertexValid:{size:1,type:"uint16",stepMode:"instance",update:this.calculateVertexValid,noAlloc:o},elevations:{size:1,stepMode:"dynamic",transition:Eb,accessor:"getElevation"},fillColors:{size:this.props.colorFormat.length,type:"unorm8",stepMode:"dynamic",transition:Eb,accessor:"getFillColor",defaultValue:ow},lineColors:{size:this.props.colorFormat.length,type:"unorm8",stepMode:"dynamic",transition:Eb,accessor:"getLineColor",defaultValue:ow},pickingColors:{size:4,type:"uint8",stepMode:"dynamic",accessor:(a,{index:l,target:c})=>this.encodePickingColor(a&&a.__source?a.__source.index:l,c)}})}getPickingInfo(e){const n=super.getPickingInfo(e),{index:r}=n,i=this.props.data;return i[0]&&i[0].__source&&(n.object=i.find(s=>s.__source.index===r)),n}disablePickingIndex(e){const n=this.props.data;if(n[0]&&n[0].__source)for(let r=0;r<n.length;r++)n[r].__source.index===e&&this._disablePickingIndex(r);else super.disablePickingIndex(e)}draw({uniforms:e}){const{extruded:n,filled:r,wireframe:i,elevationScale:s}=this.props,{topModel:o,sideModel:a,wireframeModel:l,polygonTesselator:c}=this.state,u={extruded:!!n,elevationScale:s,isWireframe:!1};l&&i&&(l.setInstanceCount(c.instanceCount-1),l.shaderInputs.setProps({solidPolygon:{...u,isWireframe:!0}}),l.draw(this.context.renderPass)),a&&r&&(a.setInstanceCount(c.instanceCount-1),a.shaderInputs.setProps({solidPolygon:u}),a.draw(this.context.renderPass)),o&&r&&(o.setVertexCount(c.vertexCount),o.shaderInputs.setProps({solidPolygon:u}),o.draw(this.context.renderPass))}updateState(e){var a;super.updateState(e),this.updateGeometry(e);const{props:n,oldProps:r,changeFlags:i}=e,s=this.getAttributeManager();(i.extensionsChanged||n.filled!==r.filled||n.extruded!==r.extruded)&&((a=this.state.models)==null||a.forEach(l=>l.destroy()),this.setState(this._getModels()),s.invalidateAll())}updateGeometry({props:e,oldProps:n,changeFlags:r}){if(r.dataChanged||r.updateTriggersChanged&&(r.updateTriggersChanged.all||r.updateTriggersChanged.getPolygon)){const{polygonTesselator:s}=this.state,o=e.data.attributes||{};s.updateGeometry({data:e.data,normalize:e._normalize,geometryBuffer:o.getPolygon,buffers:o,getGeometry:e.getPolygon,positionFormat:e.positionFormat,wrapLongitude:e.wrapLongitude,resolution:this.context.viewport.resolution,fp64:this.use64bitPositions(),dataChanged:r.dataChanged,full3d:e._full3d}),this.setState({numInstances:s.instanceCount,startIndices:s.vertexStarts}),r.dataChanged||this.getAttributeManager().invalidateAll()}}_getModels(){const{id:e,filled:n,extruded:r}=this.props;let i,s,o;if(n){const a=this.getShaders("top");a.defines.NON_INSTANCED_MODEL=1;const l=this.getAttributeManager().getBufferLayouts({isInstanced:!1});i=new us(this.context.device,{...a,id:`${e}-top`,topology:"triangle-list",bufferLayout:l,isIndexed:!0,userData:{excludeAttributes:{instanceVertexValid:!0}}})}if(r){const a=this.getAttributeManager().getBufferLayouts({isInstanced:!0});
2721s=new us(this.context.device,{...this.getShaders("side"),id:`${e}-side`,bufferLayout:a,geometry:new Cl({topology:"triangle-strip",attributes:{positions:{size:2,value:new Float32Array([1,0,0,0,1,1,0,1])}}}),isInstanced:!0,userData:{excludeAttributes:{indices:!0}}}),o=new us(this.context.device,{...this.getShaders("side"),id:`${e}-wireframe`,bufferLayout:a,geometry:new Cl({topology:"line-strip",attributes:{positions:{size:2,value:new Float32Array([1,0,0,0,0,1,1,1])}}}),isInstanced:!0,userData:{excludeAttributes:{indices:!0}}})}return{models:[s,o,i].filter(Boolean),topModel:i,sideModel:s,wireframeModel:o}}calculateIndices(e){const{polygonTesselator:n}=this.state;e.startIndices=n.indexStarts,e.value=n.get("indices")}calculatePositions(e){const{polygonTesselator:n}=this.state;e.startIndices=n.vertexStarts,e.value=n.get("positions")}calculateVertexValid(e){e.value=this.state.polygonTesselator.get("vertexValid")}}SM.defaultProps=cme;SM.layerName="SolidPolygonLayer";function ume({data:t,getIndex:e,dataRange:n,replace:r}){const{startRow:i=0,endRow:s=1/0}=n,o=t.length;let a=o,l=o;for(let d=0;d<o;d++){const m=e(t[d]);if(a>d&&m>=i&&(a=d),m>=s){l=d;break}}let c=a;const h=l-a!==r.length?t.slice(l):void 0;for(let d=0;d<r.length;d++)t[c++]=r[d];if(h){for(let d=0;d<h.length;d++)t[c++]=h[d];t.length=c}return{startRow:a,endRow:a+r.length}}function fme(t,e){if(!t)return null;const n="startIndices"in t?t.startIndices[e]:e,r=t.featureIds.value[n];return n!==-1?hme(t,r,n):null}function hme(t,e,n){const r={properties:{...t.properties[e]}};for(const i in t.numericProps)r.properties[i]=t.numericProps[i].value[n];return r}function dme(t,e){const n={points:null,lines:null,polygons:null};for(const r in n){const i=t[r].globalFeatureIds.value;n[r]=new Uint8ClampedArray(i.length*4);const s=[];for(let o=0;o<i.length;o++)e(i[o],s),n[r][o*4+0]=s[0],n[r][o*4+1]=s[1],n[r][o*4+2]=s[2],n[r][o*4+3]=255}return n}const MN=`uniform sdfUniforms {
2722  float gamma;
2723  bool enabled;
2724  float buffer;
2725  float outlineBuffer;
2726  vec4 outlineColor;
2727} sdf;
2728`,pme={name:"sdf",vs:MN,fs:MN,uniformTypes:{gamma:"f32",enabled:"f32",buffer:"f32",outlineBuffer:"f32",outlineColor:"vec4<f32>"}},gme=`#version 300 es
2729#define SHADER_NAME multi-icon-layer-fragment-shader
2730precision highp float;
2731uniform sampler2D iconsTexture;
2732in vec4 vColor;
2733in vec2 vTextureCoords;
2734in vec2 uv;
2735out vec4 fragColor;
2736void main(void) {
2737geometry.uv = uv;
2738if (!bool(picking.isActive)) {
2739float alpha = texture(iconsTexture, vTextureCoords).a;
2740vec4 color = vColor;
2741if (sdf.enabled) {
2742float distance = alpha;
2743alpha = smoothstep(sdf.buffer - sdf.gamma, sdf.buffer + sdf.gamma, distance);
2744if (sdf.outlineBuffer > 0.0) {
2745float inFill = alpha;
2746float inBorder = smoothstep(sdf.outlineBuffer - sdf.gamma, sdf.outlineBuffer + sdf.gamma, distance);
2747color = mix(sdf.outlineColor, vColor, inFill);
2748alpha = inBorder;
2749}
2750}
2751float a = alpha * color.a;
2752if (a < icon.alphaCutoff) {
2753discard;
2754}
2755fragColor = vec4(color.rgb, a * layer.opacity);
2756}
2757DECKGL_FILTER_COLOR(fragColor, geometry);
2758}
2759`,OE=192/256,RN=[],mme={getIconOffsets:{type:"accessor",value:t=>t.offsets},alphaCutoff:.001,smoothing:.1,outlineWidth:0,outlineColor:{type:"color",value:[0,0,0,255]}};class TM extends Nm{getShaders(){const e=super.getShaders();return{...e,modules:[...e.modules,pme],fs:gme}}initializeState(){super.initializeState(),this.getAttributeManager().addInstanced({instanceOffsets:{size:2,accessor:"getIconOffsets"},instancePickingColors:{type:"uint8",size:3,accessor:(n,{index:r,target:i})=>this.encodePickingColor(r,i)}})}updateState(e){super.updateState(e);const{props:n,oldProps:r}=e;let{outlineColor:i}=n;i!==r.outlineColor&&(i=i.map(s=>s/255),i[3]=Number.isFinite(i[3])?i[3]:1,this.setState({outlineColor:i})),!n.sdf&&n.outlineWidth&&Zt.warn(`${this.id}: fontSettings.sdf is required to render outline`)()}draw(e){const{sdf:n,smoothing:r,outlineWidth:i}=this.props,{outlineColor:s}=this.state,o=i?Math.max(r,OE*(1-i)):-1,a=this.state.model,l={buffer:OE,outlineBuffer:o,gamma:r,enabled:!!n,outlineColor:s};if(a.shaderInputs.setProps({sdf:l}),super.draw(e),n&&i){const{iconManager:c}=this.state;
2759c.getTexture()&&(a.shaderInputs.setProps({sdf:{...l,outlineBuffer:OE}}),a.draw(this.context.renderPass))}}getInstanceOffset(e){return e?Array.from(e).flatMap(n=>super.getInstanceOffset(n)):RN}getInstanceColorMode(e){return 1}getInstanceIconFrame(e){return e?Array.from(e).flatMap(n=>super.getInstanceIconFrame(n)):RN}}TM.defaultProps=mme;TM.layerName="MultiIconLayer";const av=1e20;class vme{constructor({fontSize:e=24,buffer:n=3,radius:r=8,cutoff:i=.25,fontFamily:s="sans-serif",fontWeight:o="normal",fontStyle:a="normal",lang:l=null}={}){this.buffer=n,this.cutoff=i,this.radius=r,this.lang=l;const c=this.size=e+n*4,u=this._createCanvas(c),h=this.ctx=u.getContext("2d",{willReadFrequently:!0});h.font=`${a} ${o} ${e}px ${s}`,h.textBaseline="alphabetic",h.textAlign="left",h.fillStyle="black",this.gridOuter=new Float64Array(c*c),this.gridInner=new Float64Array(c*c),this.f=new Float64Array(c),this.z=new Float64Array(c+1),this.v=new Uint16Array(c)}_createCanvas(e){const n=document.createElement("canvas");return n.width=n.height=e,n}draw(e){const{width:n,actualBoundingBoxAscent:r,actualBoundingBoxDescent:i,actualBoundingBoxLeft:s,actualBoundingBoxRight:o}=this.ctx.measureText(e),a=Math.ceil(r),l=0,c=Math.max(0,Math.min(this.size-this.buffer,Math.ceil(o-s))),u=Math.min(this.size-this.buffer,a+Math.ceil(i)),h=c+2*this.buffer,d=u+2*this.buffer,m=Math.max(h*d,0),y=new Uint8ClampedArray(m),v={data:y,width:h,height:d,glyphWidth:c,glyphHeight:u,glyphTop:a,glyphLeft:l,glyphAdvance:n};if(c===0||u===0)return v;const{ctx:b,buffer:x,gridInner:T,gridOuter:E}=this;this.lang&&(b.lang=this.lang),b.clearRect(x,x,c,u),b.fillText(e,x,x+a);const C=b.getImageData(x,x,c,u);E.fill(av,0,m),T.fill(0,0,m);for(let I=0;I<u;I++)for(let O=0;O<c;O++){const N=C.data[4*(I*c+O)+3]/255;if(N===0)continue;const U=(I+x)*h+O+x;if(N===1)E[U]=0,T[U]=av;else{const F=.5-N;E[U]=F>0?F*F:0,T[U]=F<0?F*F:0}}kN(E,0,0,h,d,h,this.f,this.v,this.z),kN(T,x,x,c,u,h,this.f,this.v,this.z);for(let I=0;I<m;I++){const O=Math.sqrt(E[I])-Math.sqrt(T[I]);y[I]=Math.round(255-255*(O/this.radius+this.cutoff))}return v}}function kN(t,e,n,r,i,s,o,a,l){for(let c=e;c<e+r;c++)NN(t,n*s+c,s,i,o,a,l);for(let c=n;c<n+i;c++)NN(t,c*s+e,1,r,o,a,l)}function NN(t,e,n,r,i,s,o){s[0]=0,o[0]=-av,o[1]=av,i[0]=t[e];for(let a=1,l=0,c=0;a<r;a++){i[a]=t[e+a*n];const u=a*a;do{const h=s[l];c=(i[a]-i[h]+u-h*h)/(a-h)/2}while(c<=o[l]&&--l>-1);l++,s[l]=a,o[l]=c,o[l+1]=av}for(let a=0,l=0;a<r;a++){for(;o[l+1]<a;)l++;const c=s[l],u=a-c;t[e+a*n]=i[c]+u*u}}const yme=32,bme=[];function _me(t){return Math.pow(2,Math.ceil(Math.log2(t)))}function wme({characterSet:t,getFontWidth:e,fontHeight:n,buffer:r,maxCanvasWidth:i,mapping:s={},xOffset:o=0,yOffset:a=0}){let l=0,c=o;const u=n+r*2;for(const h of t)if(!s[h]){const d=e(h);c+d+r*2>i&&(c=0,l++),s[h]={x:c+r,y:a+l*u+r,width:d,height:u,layoutWidth:d,layoutHeight:n},c+=d+r*2}return{mapping:s,xOffset:c,yOffset:a+l*u,canvasHeight:_me(a+(l+1)*u)}}function Tq(t,e,n,r){var s;let i=0;for(let o=e;o<n;o++){const a=t[o];i+=((s=r[a])==null?void 0:s.layoutWidth)||0}return i}function Cq(t,e,n,r,i,s){let o=e,a=0;for(let l=e;l<n;l++){const c=Tq(t,l,l+1,i);a+c>r&&(o<l&&s.push(l),o=l,a=0),a+=c}return a}function xme(t,e,n,r,i,s){let o=e,a=e,l=e,c=0;for(let u=e;u<n;u++)if((t[u]===" "||t[u+1]===" "||u+1===n)&&(l=u+1),l>a){let h=Tq(t,a,l,i);c+h>r&&(o<a&&(s.push(a),o=a,c=0),h>r&&(h=Cq(t,a,l,r,i,s),o=s[s.length-1])),a=l,c+=h}return c}function Ame(t,e,n,r,i=0,s){s===void 0&&(s=t.length);const o=[];return e==="break-all"?Cq(t,i,s,n,r,o):xme(t,i,s,n,r,o),o}function Eme(t,e,n,r,i,s){let o=0,a=0;for(let l=e;l<n;l++){const c=t[l],u=r[c];u?(a||(a=u.layoutHeight),i[l]=o+u.layoutWidth/2,o+=u.layoutWidth):(Zt.warn(`Missing character: ${c} (${c.codePointAt(0)})`)(),i[l]=o,o+=yme)}s[0]=o,s[1]=a}function Sme(t,e,n,r,i){var b;const s=Array.from(t),o=s.length,a=new Array(o),l=new Array(o),c=new Array(o),u=(n==="break-word"||n==="break-all")&&isFinite(r)&&r>0,h=[0,0],d=[0,0];let m=0,y=0,v=0;for(let x=0;x<=o;x++){const T=s[x];if((T===`
2760`||x===o)&&(v=x),v>y){const E=u?Ame(s,n,r,i,y,v):bme;for(let C=0;C<=E.length;C++){const I=C===0?y:E[C-1],O=C<E.length?E[C]:v;Eme(s,I,O,i,a,d);for(let N=I;N<O;N++){a[N]-d[0]/2;const U=s[N],F=((b=i[U])==null?void 0:b.layoutOffsetY)||0;l[N]=m+d[1]/2+F,c[N]=d[0]}m=m+d[1]*e,h[0]=Math.max(h[0],d[0])}y=v}T===`
2761`&&(a[y]=0,l[y]=0,c[y]=0,y++)}return h[1]=m,{x:a,y:l,rowWidth:c,size:h}}function Tme({value:t,length:e,stride:n,offset:r,startIndices:i,characterSet:s}){const o=t.BYTES_PER_ELEMENT,a=n?n/o:1,l=r?r/o:0,c=i[e]||Math.ceil((t.length-l)/a),u=s&&new Set,h=new Array(e);let d=t;if(a>1||l>0){const m=t.constructor;d=new m(c);for(let y=0;y<c;y++)d[y]=t[y*a+l]}for(let m=0;m<e;m++){const y=i[m],v=i[m+1]||c,b=d.subarray(y,v);h[m]=String.fromCodePoint.apply(null,b),u&&b.forEach(u.add,u)}if(u)for(const m of u)s.add(String.fromCodePoint(m));return{texts:h,characterCount:c}}class Pq{constructor(e=5){this._cache={},this._order=[],this.limit=e}get(e){const n=this._cache[e];return n&&(this._deleteOrder(e),this._appendOrder(e)),n}set(e,n){this._cache[e]?(this.delete(e),this._cache[e]=n,this._appendOrder(e)):(Object.keys(this._cache).length===this.limit&&this.delete(this._order[0]),this._cache[e]=n,this._appendOrder(e))}delete(e){this._cache[e]&&(delete this._cache[e],this._deleteOrder(e))}_deleteOrder(e){const n=this._order.indexOf(e);n>=0&&this._order.splice(n,1)}_appendOrder(e){this._order.push(e)}}function Cme(){const t=[];for(let e=32;e<128;e++)t.push(String.fromCharCode(e));return t}const Rg={fontFamily:"Monaco, monospace",fontWeight:"normal",characterSet:Cme(),fontSize:64,buffer:4,sdf:!1,cutoff:.25,radius:12,smoothing:.1},DN=1024,BN=.9,LN=1.2,Iq=3;let aw=new Pq(Iq);function Pme(t,e){let n;typeof e=="string"?n=new Set(Array.from(e)):n=new Set(e);const r=aw.get(t);if(!r)return n;for(const i in r.mapping)n.has(i)&&n.delete(i);return n}function Ime(t,e){for(let n=0;n<t.length;n++)e.data[4*n+3]=t[n]}function FN(t,e,n,r){t.font=`${r} ${n}px ${e}`,t.fillStyle="#000",t.textBaseline="alphabetic",t.textAlign="left"}function Ome(t){Zt.assert(Number.isFinite(t)&&t>
2761=Iq,"Invalid cache limit"),aw=new Pq(t)}class Mme{constructor(){this.props={...Rg}}get atlas(){return this._atlas}get mapping(){return this._atlas&&this._atlas.mapping}get scale(){const{fontSize:e,buffer:n}=this.props;return(e*LN+n*2)/e}setProps(e={}){Object.assign(this.props,e),this._key=this._getKey();const n=Pme(this._key,this.props.characterSet),r=aw.get(this._key);if(r&&n.size===0){this._atlas!==r&&(this._atlas=r);return}const i=this._generateFontAtlas(n,r);this._atlas=i,aw.set(this._key,i)}_generateFontAtlas(e,n){const{fontFamily:r,fontWeight:i,fontSize:s,buffer:o,sdf:a,radius:l,cutoff:c}=this.props;let u=n&&n.data;u||(u=document.createElement("canvas"),u.width=DN);const h=u.getContext("2d",{willReadFrequently:!0});FN(h,r,s,i);const{mapping:d,canvasHeight:m,xOffset:y,yOffset:v}=wme({getFontWidth:b=>h.measureText(b).width,fontHeight:s*LN,buffer:o,characterSet:e,maxCanvasWidth:DN,...n&&{mapping:n.mapping,xOffset:n.xOffset,yOffset:n.yOffset}});if(u.height!==m){const b=h.getImageData(0,0,u.width,u.height);u.height=m,h.putImageData(b,0,0)}if(FN(h,r,s,i),a){const b=new vme({fontSize:s,buffer:o,radius:l,cutoff:c,fontFamily:r,fontWeight:`${i}`});for(const x of e){const{data:T,width:E,height:C,glyphTop:I}=b.draw(x);d[x].width=E,d[x].layoutOffsetY=s*BN-I;const O=h.createImageData(E,C);Ime(T,O),h.putImageData(O,d[x].x,d[x].y)}}else for(const b of e)h.fillText(b,d[b].x,d[b].y+o+s*BN);return{xOffset:y,yOffset:v,mapping:d,data:u,width:u.width,height:u.height}}_getKey(){const{fontFamily:e,fontWeight:n,fontSize:r,buffer:i,sdf:s,radius:o,cutoff:a}=this.props;return s?`${e} ${n} ${r} ${i} ${o} ${a}`:`${e} ${n} ${r} ${i}`}}const UN=`uniform textBackgroundUniforms {
2762  bool billboard;
2763  float sizeScale;
2764  float sizeMinPixels;
2765  float sizeMaxPixels;
2766  vec4 borderRadius;
2767  vec4 padding;
2768  highp int sizeUnits;
2769  bool stroked;
2770} textBackground;
2771`,Rme={name:"textBackground",vs:UN,fs:UN,uniformTypes:{billboard:"f32",sizeScale:"f32",sizeMinPixels:"f32",sizeMaxPixels:"f32",borderRadius:"vec4<f32>",padding:"vec4<f32>",sizeUnits:"i32",stroked:"f32"}},kme=`#version 300 es
2772#define SHADER_NAME text-background-layer-vertex-shader
2773in vec2 positions;
2774in vec3 instancePositions;
2775in vec3 instancePositions64Low;
2776in vec4 instanceRects;
2777in float instanceSizes;
2778in float instanceAngles;
2779in vec2 instancePixelOffsets;
2780in float instanceLineWidths;
2781in vec4 instanceFillColors;
2782in vec4 instanceLineColors;
2783in vec3 instancePickingColors;
2784out vec4 vFillColor;
2785out vec4 vLineColor;
2786out float vLineWidth;
2787out vec2 uv;
2788out vec2 dimensions;
2789vec2 rotate_by_angle(vec2 vertex, float angle) {
2790float angle_radian = radians(angle);
2791float cos_angle = cos(angle_radian);
2792float sin_angle = sin(angle_radian);
2793mat2 rotationMatrix = mat2(cos_angle, -sin_angle, sin_angle, cos_angle);
2794return rotationMatrix * vertex;
2795}
2796void main(void) {
2797geometry.worldPosition = instancePositions;
2798geometry.uv = positions;
2799geometry.pickingColor = instancePickingColors;
2800uv = positions;
2801vLineWidth = instanceLineWidths;
2802float sizePixels = clamp(
2803project_size_to_pixel(instanceSizes * textBackground.sizeScale, textBackground.sizeUnits),
2804textBackground.sizeMinPixels, textBackground.sizeMaxPixels
2805);
2806dimensions = instanceRects.zw * sizePixels + textBackground.padding.xy + textBackground.padding.zw;
2807vec2 pixelOffset = (positions * instanceRects.zw + instanceRects.xy) * sizePixels + mix(-textBackground.padding.xy, textBackground.padding.zw, positions);
2808pixelOffset = rotate_by_angle(pixelOffset, instanceAngles);
2809pixelOffset += instancePixelOffsets;
2810pixelOffset.y *= -1.0;
2811if (textBackground.billboard)  {
2812gl_Position = project_position_to_clipspace(instancePositions, instancePositions64Low, vec3(0.0), geometry.position);
2813DECKGL_FILTER_GL_POSITION(gl_Position, geometry);
2814vec3 offset = vec3(pixelOffset, 0.0);
2815DECKGL_FILTER_SIZE(offset, geometry);
2816gl_Position.xy += project_pixel_size_to_clipspace(offset.xy);
2817} else {
2818vec3 offset_common = vec3(project_pixel_size(pixelOffset), 0.0);
2819DECKGL_FILTER_SIZE(offset_common, geometry);
2820gl_Position = project_position_to_clipspace(instancePositions, instancePositions64Low, offset_common, geometry.position);
2821DECKGL_FILTER_GL_POSITION(gl_Position, geometry);
2822}
2823vFillColor = vec4(instanceFillColors.rgb, instanceFillColors.a * layer.opacity);
2824DECKGL_FILTER_COLOR(vFillColor, geometry);
2825vLineColor = vec4(instanceLineColors.rgb, instanceLineColors.a * layer.opacity);
2826DECKGL_FILTER_COLOR(vLineColor, geometry);
2827}
2828`,Nme=`#version 300 es
2829#define SHADER_NAME text-background-layer-fragment-shader
2830precision highp float;
2831in vec4 vFillColor;
2832in vec4 vLineColor;
2833in float vLineWidth;
2834in vec2 uv;
2835in vec2 dimensions;
2836out vec4 fragColor;
2837float round_rect(vec2 p, vec2 size, vec4 radii) {
2838vec2 pixelPositionCB = (p - 0.5) * size;
2839vec2 sizeCB = size * 0.5;
2840float maxBorderRadius = min(size.x, size.y) * 0.5;
2841vec4 borderRadius = vec4(min(radii, maxBorderRadius));
2842borderRadius.xy =
2843(pixelPositionCB.x > 0.0) ? borderRadius.xy : borderRadius.zw;
2844borderRadius.x = (pixelPositionCB.y > 0.0) ? borderRadius.x : borderRadius.y;
2845vec2 q = abs(pixelPositionCB) - sizeCB + borderRadius.x;
2846return -(min(max(q.x, q.y), 0.0) + length(max(q, 0.0)) - borderRadius.x);
2847}
2848float rect(vec2 p, vec2 size) {
2849vec2 pixelPosition = p * size;
2850return min(min(pixelPosition.x, size.x - pixelPosition.x),
2851min(pixelPosition.y, size.y - pixelPosition.y));
2852}
2853vec4 get_stroked_fragColor(float dist) {
2854float isBorder = smoothedge(dist, vLineWidth);
2855return mix(vFillColor, vLineColor, isBorder);
2856}
2857void main(void) {
2858geometry.uv = uv;
2859if (textBackground.borderRadius != vec4(0.0)) {
2860float distToEdge = round_rect(uv, dimensions, textBackground.borderRadius);
2861if (textBackground.stroked) {
2862fragColor = get_stroked_fragColor(distToEdge);
2863} else {
2864fragColor = vFillColor;
2865}
2866float shapeAlpha = smoothedge(-distToEdge, 0.0);
2867fragColor.a *= shapeAlpha;
2868} else {
2869if (textBackground.stroked) {
2870float distToEdge = rect(uv, dimensions);
2871fragColor = get_stroked_fragColor(distToEdge);
2872} else {
2873fragColor = vFillColor;
2874}
2875}
2876DECKGL_FILTER_COLOR(fragColor, geometry);
2877}
2878`,Dme={billboard:!0,sizeScale:1,sizeUnits:"pixels",sizeMinPixels:0,sizeMaxPixels:Number.MAX_SAFE_INTEGER,borderRadius:{type:"object",value:0},padding:{type:"array",value:[0,0,0,0]},getPosition:{type:"accessor",value:t=>t.position},getSize:{type:"accessor",value:1},getAngle:{type:"accessor",value:0},getPixelOffset:{type:"accessor",value:[0,0]},getBoundingRect:{type:"accessor",value:[0,0,0,0]},getFillColor:{type:"accessor",value:[0,0,0,255]},getLineColor:{type:"accessor",value:[0,0,0,255]},getLineWidth:{type:"accessor",value:1}};class CM extends Wo{getShaders(){return super.getShaders({vs:kme,fs:Nme,modules:[uf,ff,Rme]})}initializeState(){this.getAttributeManager().addInstanced({instancePositions:{size:3,type:"float64",fp64:this.use64bitPositions(),transition:!0,accessor:"getPosition"},instanceSizes:{size:1,transition:!0,accessor:"getSize",defaultValue:1},instanceAngles:{size:1,transition:!0,accessor:"getAngle"},instanceRects:{size:4,accessor:"getBoundingRect"},instancePixelOffsets:{size:2,transition:!0,accessor:"getPixelOffset"},instanceFillColors:{size:4,transition:!0,type:"unorm8",accessor:"getFillColor",defaultValue:[0,0,0,255]},instanceLineColors:{size:4,transition:!0,type:"unorm8",accessor:"getLineColor",defaultValue:[0,0,0,255]},instanceLineWidths:{size:1,transition:!0,accessor:"getLineWidth",defaultValue:1}})}updateState(e){var r;super.updateState(e);const{changeFlags:n}=e;n.extensionsChanged&&((r=this.state.model)==null||r.destroy(),this.state.model=this._getModel(),this.getAttributeManager().invalidateAll())}draw({uniforms:e}
2878){const{billboard:n,sizeScale:r,sizeUnits:i,sizeMinPixels:s,sizeMaxPixels:o,getLineWidth:a}=this.props;let{padding:l,borderRadius:c}=this.props;l.length<4&&(l=[l[0],l[1],l[0],l[1]]),Array.isArray(c)||(c=[c,c,c,c]);const u=this.state.model,h={billboard:n,stroked:!!a,borderRadius:c,padding:l,sizeUnits:Ml[i],sizeScale:r,sizeMinPixels:s,sizeMaxPixels:o};u.shaderInputs.setProps({textBackground:h}),u.draw(this.context.renderPass)}_getModel(){const e=[0,0,1,0,0,1,1,1];return new us(this.context.device,{...this.getShaders(),id:this.props.id,bufferLayout:this.getAttributeManager().getBufferLayouts(),geometry:new Cl({topology:"triangle-strip",vertexCount:4,attributes:{positions:{size:2,value:new Float32Array(e)}}}),isInstanced:!0})}}CM.defaultProps=Dme;CM.layerName="TextBackgroundLayer";const zN={start:1,middle:0,end:-1},jN={top:1,center:0,bottom:-1},ME=[0,0,0,255],Bme=1,Lme={billboard:!0,sizeScale:1,sizeUnits:"pixels",sizeMinPixels:0,sizeMaxPixels:Number.MAX_SAFE_INTEGER,background:!1,getBackgroundColor:{type:"accessor",value:[255,255,255,255]},getBorderColor:{type:"accessor",value:ME},getBorderWidth:{type:"accessor",value:0},backgroundBorderRadius:{type:"object",value:0},backgroundPadding:{type:"array",value:[0,0,0,0]},characterSet:{type:"object",value:Rg.characterSet},fontFamily:Rg.fontFamily,fontWeight:Rg.fontWeight,lineHeight:Bme,outlineWidth:{type:"number",value:0,min:0},outlineColor:{type:"color",value:ME},fontSettings:{type:"object",value:{},compare:1},wordBreak:"break-word",maxWidth:{type:"number",value:-1},getText:{type:"accessor",value:t=>t.text},getPosition:{type:"accessor",value:t=>t.position},getColor:{type:"accessor",value:ME},getSize:{type:"accessor",value:32},getAngle:{type:"accessor",value:0},getTextAnchor:{type:"accessor",value:"middle"},getAlignmentBaseline:{type:"accessor",value:"center"},getPixelOffset:{type:"accessor",value:[0,0]},backgroundColor:{deprecatedFor:["background","getBackgroundColor"]}};class ed extends Ns{constructor(){super(...arguments),this.getBoundingRect=(e,n)=>{let{size:[r,i]}=this.transformParagraph(e,n);const{fontSize:s}=this.state.fontAtlasManager.props;r/=s,i/=s;const{getTextAnchor:o,getAlignmentBaseline:a}=this.props,l=zN[typeof o=="function"?o(e,n):o],c=jN[typeof a=="function"?a(e,n):a];return[(l-1)*r/2,(c-1)*i/2,r,i]},this.getIconOffsets=(e,n)=>{const{getTextAnchor:r,getAlignmentBaseline:i}=this.props,{x:s,y:o,rowWidth:a,size:[l,c]}=this.transformParagraph(e,n),u=zN[typeof r=="function"?r(e,n):r],h=jN[typeof i=="function"?i(e,n):i],d=s.length,m=new Array(d*2);let y=0;for(let v=0;v<d;v++){const b=(1-u)*(l-a[v])/2;m[y++]=(u-1)*l/2+b+s[v],m[y++]=(h-1)*c/2+o[v]}return m}}initializeState(){this.state={styleVersion:0,fontAtlasManager:new Mme},this.props.maxWidth>0&&Zt.once(1,"v8.9 breaking change: TextLayer maxWidth is now relative to text size")()}updateState(e){const{props:n,oldProps:r,changeFlags:i}=e;(i.dataChanged||i.updateTriggersChanged&&(i.updateTriggersChanged.all||i.updateTriggersChanged.getText))&&this._updateText(),(this._updateFontAtlas()||n.lineHeight!==r.lineHeight||n.wordBreak!==r.wordBreak||n.maxWidth!==r.maxWidth)&&this.setState({styleVersion:this.state.styleVersion+1})}getPickingInfo({info:e}){return e.object=e.index>=0?this.props.data[e.index]:null,e}_updateFontAtlas(){const{fontSettings:e,fontFamily:n,fontWeight:r}=this.props,{fontAtlasManager:i,characterSet:s}=this.state,o={...e,characterSet:s,fontFamily:n,fontWeight:r};if(!i.mapping)return i.setProps(o),!0;for(const a in o)if(o[a]!==i.props[a])return i.setProps(o),!0;return!1}_updateText(){var l;const{data:e,characterSet:n}=this.props,r=(l=e.attributes)==null?void 0:l.getText;let{getText:i}=this.props,s=e.startIndices,o;const a=n==="auto"&&new Set;if(r&&s){const{texts:c,characterCount:u}=Tme({...ArrayBuffer.isView(r)?{value:r}:r,length:e.length,startIndices:s,characterSet:a});o=u,i=(h,{index:d})=>c[d]}else{const{iterable:c,objectInfo:u}=Ey(e);s=[0],o=0;for(const h of c){u.index++;const d=Array.from(i(h,u)||"");a&&d.forEach(a.add,a),o+=d.length,s.push(o)}}this.setState({getText:i,startIndices:s,numInstances:o,characterSet:a||n})}transformParagraph(e,n){const{fontAtlasManager:r}=this.state,i=r.mapping,s=this.state.getText,{wordBreak:o,lineHeight:a,maxWidth:l}=this.props,c=s(e,n)||"";return Sme(c,a,o,l*r.props.fontSize,i)}renderLayers(){const{startIndices:e,numInstances:n,getText:r,fontAtlasManager:{scale:i,atlas:s,mapping:o},styleVersion:a}=this.state,{data:l,_dataDiff:c,getPosition:u,getColor:h,getSize:d,getAngle:m,getPixelOffset:y,getBackgroun
vendor: 7,800 bytes, line 2878
2878dColor:v,getBorderColor:b,getBorderWidth:x,backgroundBorderRadius:T,backgroundPadding:E,background:C,billboard:I,fontSettings:O,outlineWidth:N,outlineColor:U,sizeScale:F,sizeUnits:H,sizeMinPixels:W,sizeMaxPixels:z,transitions:V,updateTriggers:M}=this.props,K=this.getSubLayerClass("characters",TM),j=this.getSubLayerClass("background",CM);return[C&&new j({getFillColor:v,getLineColor:b,getLineWidth:x,borderRadius:T,padding:E,getPosition:u,getSize:d,getAngle:m,getPixelOffset:y,billboard:I,sizeScale:F,sizeUnits:H,sizeMinPixels:W,sizeMaxPixels:z,transitions:V&&{getPosition:V.getPosition,getAngle:V.getAngle,getSize:V.getSize,getFillColor:V.getBackgroundColor,getLineColor:V.getBorderColor,getLineWidth:V.getBorderWidth,getPixelOffset:V.getPixelOffset}},this.getSubLayerProps({id:"background",updateTriggers:{getPosition:M.getPosition,getAngle:M.getAngle,getSize:M.getSize,getFillColor:M.getBackgroundColor,getLineColor:M.getBorderColor,getLineWidth:M.getBorderWidth,getPixelOffset:M.getPixelOffset,getBoundingRect:{getText:M.getText,getTextAnchor:M.getTextAnchor,getAlignmentBaseline:M.getAlignmentBaseline,styleVersion:a}}}),{data:l.attributes&&l.attributes.background?{length:l.length,attributes:l.attributes.background}:l,_dataDiff:c,autoHighlight:!1,getBoundingRect:this.getBoundingRect}),new K({sdf:O.sdf,smoothing:Number.isFinite(O.smoothing)?O.smoothing:Rg.smoothing,outlineWidth:N/(O.radius||Rg.radius),outlineColor:U,iconAtlas:s,iconMapping:o,getPosition:u,getColor:h,getSize:d,getAngle:m,getPixelOffset:y,billboard:I,sizeScale:F*i,sizeUnits:H,sizeMinPixels:W*i,sizeMaxPixels:z*i,transitions:V&&{getPosition:V.getPosition,getAngle:V.getAngle,getColor:V.getColor,getSize:V.getSize,getPixelOffset:V.getPixelOffset}},this.getSubLayerProps({id:"characters",updateTriggers:{all:M.getText,getPosition:M.getPosition,getAngle:M.getAngle,getColor:M.getColor,getSize:M.getSize,getPixelOffset:M.getPixelOffset,getIconOffsets:{getTextAnchor:M.getTextAnchor,getAlignmentBaseline:M.getAlignmentBaseline,styleVersion:a}}}),{data:l,_dataDiff:c,startIndices:e,numInstances:n,getIconOffsets:this.getIconOffsets,getIcon:r})]}static set fontAtlasCacheLimit(e){Ome(e)}}ed.defaultProps=Lme;ed.layerName="TextLayer";const x_={circle:{type:Jx,props:{filled:"filled",stroked:"stroked",lineWidthMaxPixels:"lineWidthMaxPixels",lineWidthMinPixels:"lineWidthMinPixels",lineWidthScale:"lineWidthScale",lineWidthUnits:"lineWidthUnits",pointRadiusMaxPixels:"radiusMaxPixels",pointRadiusMinPixels:"radiusMinPixels",pointRadiusScale:"radiusScale",pointRadiusUnits:"radiusUnits",pointAntialiasing:"antialiasing",pointBillboard:"billboard",getFillColor:"getFillColor",getLineColor:"getLineColor",getLineWidth:"getLineWidth",getPointRadius:"getRadius"}},icon:{type:Nm,props:{iconAtlas:"iconAtlas",iconMapping:"iconMapping",iconSizeMaxPixels:"sizeMaxPixels",iconSizeMinPixels:"sizeMinPixels",iconSizeScale:"sizeScale",iconSizeUnits:"sizeUnits",iconAlphaCutoff:"alphaCutoff",iconBillboard:"billboard",getIcon:"getIcon",getIconAngle:"getAngle",getIconColor:"getColor",getIconPixelOffset:"getPixelOffset",getIconSize:"getSize"}},text:{type:ed,props:{textSizeMaxPixels:"sizeMaxPixels",textSizeMinPixels:"sizeMinPixels",textSizeScale:"sizeScale",textSizeUnits:"sizeUnits",textBackground:"background",textBackgroundPadding:"backgroundPadding",textFontFamily:"fontFamily",textFontWeight:"fontWeight",textLineHeight:"lineHeight",textMaxWidth:"maxWidth",textOutlineColor:"outlineColor",textOutlineWidth:"outlineWidth",textWordBreak:"wordBreak",textCharacterSet:"characterSet",textBillboard:"billboard",textFontSettings:"fontSettings",getText:"getText",getTextAngle:"getAngle",getTextColor:"getColor",getTextPixelOffset:"getPixelOffset",getTextSize:"getSize",getTextAnchor:"getTextAnchor",getTextAlignmentBaseline:"getAlignmentBaseline",getTextBackgroundColor:"getBackgroundColor",getTextBorderColor:"getBorderColor",getTextBorderWidth:"getBorderWidth"}}},A_={type:Sv,props:{lineWidthUnits:"widthUnits",lineWidthScale:"widthScale",lineWidthMinPixels:"widthMinPixels",lineWidthMaxPixels:"widthMaxPixels",lineJointRounded:"jointRounded",lineCapRounded:"capRounded",lineMiterLimit:"miterLimit",lineBillboard:"billboard",getLineColor:"getColor",getLineWidth:"getWidth"}},zP={type:SM,props:{extruded:"extruded",filled:"filled",wireframe:"wireframe",elevationScale:"elevationScale",material:"material",_full3d:"_full3d",getElevation:"getElevation",getFillColor:"getFillColor",getLineColor:"getLineColor"}};function d1({type:t,props:e}){const n={};for(const r in e)n[r]=t.defaultProps[e[r]];return n}function RE(t,e){const{transitions:n,updateTriggers:r}=t.props,i={updateTriggers:{},transitions:n&&{getPosition:n.geometry}};for(const s in e){const o=e[s];let a=t.props[s];s.startsWith("get")&&(a=t.getSubLayerAccessor(a),i.updateTriggers[o]=r[s],n&&(i.transitions[o]=n[s])),i[o]=a}return i}function Fme(t){if(Array.isArray(t))return t;switch(Zt.assert(t.type,"GeoJSON does not have type"),t.type){case"Feature":return[t];case"FeatureCollection":return Zt.assert(Array.isArray(t.features),"GeoJSON does not have features array"),t.features;default:return[{geometry:t}]}}function VN(t,e,n={}){const r={pointFeatures:[],lineFeatures:[],polygonFeatures:[],polygonOutlineFeatures:[]},{startRow:i=0,endRow:s=t.length}=n;for(let o=i;o<s;o++){const a=t[o],{geometry:l}=a;if(l)if(l.type==="GeometryCollection"){Zt.assert(Array.isArray(l.geometries),"GeoJSON does not have geometries array");const{geometries:c}=l;for(let u=0;u<c.length;u++){const h=c[u];WN(h,r,e,a,o)}}else WN(l,r,e,a,o)}return r}function WN(t,e,n,r,i){const{type:s,coordinates:o}=t,{pointFeatures:a,lineFeatures:l,polygonFeatures:c,polygonOutlineFeatures:u}=e;if(!zme(s,o)){Zt.warn(`${s} coordinates are malformed`)();return}switch(s){case"Point":a.push(n({geometry:t},r,i));break;case"MultiPoint":o.forEach(h=>{a.push(n({geometry:{type:"Point",coordinates:h}},r,i))});break;case"LineString":l.push(n({geometry:t},r,i));break;case"MultiLineString":o.forEach(h=>{l.push(n({geometry:{type:"LineString",coordinates:h}},r,i))});break;case"Polygon":c.push(n({geometry:t},r,i)),o.forEach(h=>{u.push(n({geometry:{type:"LineString",coordinates:h}},r,i))});break;case"MultiPolygon":o.forEach(h=>{c.push(n({geometry:{type:"Polygon",coordinates:h}},r,i)),h.forEach(d=>{u.push(n({geometry:{type:"LineString",coordinates:d}},r,i))})});break}}const Ume={Point:1,MultiPoint:2,LineString:2,MultiLineString:3,Polygon:3,MultiPolygon:4};function zme(t,e){let n=Ume[t];for(Zt.assert(n,`Unknown GeoJSON type ${t}`);e&&--n>0;)e=e[0];return e&&Number.isFinite(e[0])}function Oq(){return{points:{},lines:{},polygons:{},polygonsOutline:{}}}function Sb(t){return t.geometry.coordinates}function jme(t,e){const n=Oq(),{pointFeatures:r,lineFeatures:i,polygonFeatures:s,polygonOutlineFeatures:o}=t;return n.points.data=r,n.points._dataDiff=e.pointFeatures&&(()=>e.pointFeatures),n.points.getPosition=Sb,n.lines.data=i,n.lines._dataDiff=e.lineFeatures&&(()=>e.lineFeatures),n.lines.getPath=Sb,n.polygons.data=s,n.polygons._dataDiff=e.polygonFeatures&&(()=>e.polygonFeatures),n.polygons.getPolygon=Sb,n.polygonsOutline.data=o,n.polygonsOutline._dataDiff=e.polygonOutlineFeatures&&(()=>e.polygonOutlineFeatures),n.polygonsOutline.getPath=Sb,n}function Vme(t,e){const n=Oq(),{points:r,lines:i,polygons:s}=t,o=dme(t,e);return n.points.data={length:r.positions.value.length/r.positions.size,attributes:{...r.attributes,getPosition:r.positions,instancePickingColors:{size:4,value:o.points}},properties:r.properties,numericProps:r.numericProps,featureIds:r.featureIds},n.lines.data={length:i.pathIndices.value.length-1,startIndices:i.pathIndices.value,attributes:{...i.attributes,getPath:i.positions,instancePickingColors:{size:4,value:o.lines}},properties:i.properties,numericProps:i.numericProps,featureIds:i.featureIds}
vendor: 2,405 bytes, line 2878
2878,n.lines._pathType="open",n.polygons.data={length:s.polygonIndices.value.length-1,startIndices:s.polygonIndices.value,attributes:{...s.attributes,getPolygon:s.positions,pickingColors:{size:4,value:o.polygons}},properties:s.properties,numericProps:s.numericProps,featureIds:s.featureIds},n.polygons._normalize=!1,s.triangles&&(n.polygons.data.attributes.indices=s.triangles.value),n.polygonsOutline.data={length:s.primitivePolygonIndices.value.length-1,startIndices:s.primitivePolygonIndices.value,attributes:{...s.attributes,getPath:s.positions,instancePickingColors:{size:4,value:o.polygons}},properties:s.properties,numericProps:s.numericProps,featureIds:s.featureIds},n.polygonsOutline._pathType="open",n}const Wme=["points","linestrings","polygons"],$me={...d1(x_.circle),...d1(x_.icon),...d1(x_.text),...d1(A_),...d1(zP),stroked:!0,filled:!0,extruded:!1,wireframe:!1,_full3d:!1,iconAtlas:{type:"object",value:null},iconMapping:{type:"object",value:{}},getIcon:{type:"accessor",value:t=>t.properties.icon},getText:{type:"accessor",value:t=>t.properties.text},pointType:"circle",getRadius:{deprecatedFor:"getPointRadius"}};class gd extends Ns{initializeState(){this.state={layerProps:{},features:{},featuresDiff:{}}}updateState({props:e,changeFlags:n}){if(!n.dataChanged)return;const{data:r}=this.props,i=r&&"points"in r&&"polygons"in r&&"lines"in r;this.setState({binary:i}),i?this._updateStateBinary({props:e,changeFlags:n}):this._updateStateJSON({props:e,changeFlags:n})}_updateStateBinary({props:e,changeFlags:n}){const r=Vme(e.data,this.encodePickingColor);this.setState({layerProps:r})}_updateStateJSON({props:e,changeFlags:n}){const r=Fme(e.data),i=this.getSubLayerRow.bind(this);let s={};const o={};if(Array.isArray(n.dataChanged)){const l=this.state.features;for(const c in l)s[c]=l[c].slice(),o[c]=[];for(const c of n.dataChanged){const u=VN(r,i,c);for(const h in l)o[h].push(ume({data:s[h],getIndex:d=>d.__source.index,dataRange:c,replace:u[h]}))}}else s=VN(r,i);const a=jme(s,o);this.setState({features:s,featuresDiff:o,layerProps:a})}getPickingInfo(e){const n=super.getPickingInfo(e),{index:r,sourceLayer:i}=n;return n.featureType=Wme.find(s=>i.id.startsWith(`${this.id}-${s}-`)),r>=0&&i.id.startsWith(`${this.id}-points-text`)&&this.state.binary&&(n.index=this.props.data.points.globalFeatureIds.value[r]),n}_updateAutoHighlight(e){const n=`${this.id}-points-`,r=e.featureType==="points";
2878for(const i of this.getSubLayers())i.id.startsWith(n)===r&&i.updateAutoHighlight(e)}_renderPolygonLayer(){var o;const{extruded:e,wireframe:n}=this.props,{layerProps:r}=this.state,i="polygons-fill",s=this.shouldRenderSubLayer(i,(o=r.polygons)==null?void 0:o.data)&&this.getSubLayerClass(i,zP.type);if(s){const a=RE(this,zP.props),l=e&&n;return l||delete a.getLineColor,a.updateTriggers.lineColors=l,new s(a,this.getSubLayerProps({id:i,updateTriggers:a.updateTriggers}),r.polygons)}return null}_renderLineLayers(){var l,c;const{extruded:e,stroked:n}=this.props,{layerProps:r}=this.state,i="polygons-stroke",s="linestrings",o=!e&&n&&this.shouldRenderSubLayer(i,(l=r.polygonsOutline)==null?void 0:l.data)&&this.getSubLayerClass(i,A_.type),a=this.shouldRenderSubLayer(s,(c=r.lines)==null?void 0:c.data)&&this.getSubLayerClass(s,A_.type);if(o||a){const u=RE(this,A_.props);return[o&&new o(u,this.getSubLayerProps({id:i,updateTriggers:u.updateTriggers}),r.polygonsOutline),a&&new a(u,this.getSubLayerProps({id:s,updateTriggers:u.updateTriggers}),r.lines)]}return null}_renderPointLayers(){var a;const{pointType:e}=this.props,{layerProps:n,binary:r}=this.state;let{highlightedObjectIndex:i}=this.props;!r&&Number.isFinite(i)&&(i=n.points.data.findIndex(l=>l.__source.index===i));const s=new Set(e.split("+")),o=[];for(const l of s){const c=`points-${l}`,u=x_[l],h=u&&this.shouldRenderSubLayer(c,(a=n.points)==null?void 0:a.data)&&this.getSubLayerClass(c,u.type);if(h){const d=RE(this,u.props);let m=n.points;if(l==="text"&&r){const{instancePickingColors:y,...v}=m.data.attributes;m={...m,data:{...m.data,attributes:v}}}
2878o.push(new h(d,this.getSubLayerProps({id:c,updateTriggers:d.updateTriggers,highlightedObjectIndex:i}),m))}}return o}renderLayers(){const{extruded:e}=this.props,n=this._renderPolygonLayer(),r=this._renderLineLayers(),i=this._renderPointLayers();return[!e&&n,r,i,e&&n]}getSubLayerAccessor(e){const{binary:n}=this.state;return!n||typeof e!="function"?super.getSubLayerAccessor(e):(r,i)=>{const{data:s,index:o}=i,a=fme(s,o);return e(a,i)}}}gd.layerName="GeoJsonLayer";gd.defaultProps=$me;function Tb(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}class Hme{constructor(e){this.index=e,this.isVisible=!1,this.isSelected=!1,this.parent=null,this.children=[],this.content=null,this._loader=void 0,this._abortController=null,this._loaderId=0,this._isLoaded=!1,this._isCancelled=!1,this._needsReload=!1}get bbox(){return this._bbox}set bbox(e){this._bbox||(this._bbox=e,"west"in e?this.boundingBox=[[e.west,e.south],[e.east,e.north]]:this.boundingBox=[[e.left,e.top],[e.right,e.bottom]])}get data(){return this.isLoading&&this._loader?this._loader.then(()=>this.data):this.content}get isLoaded(){return this._isLoaded&&!this._needsReload}get isLoading(){return!!this._loader&&!this._isCancelled}get needsReload(){return this._needsReload||this._isCancelled}get byteLength(){const e=this.content?this.content.byteLength:0;return Number.isFinite(e)||console.error("byteLength not defined in tile data"),e}async _loadData({getData:e,requestScheduler:n,onLoad:r,onError:i}){const{index:s,id:o,bbox:a,userData:l,zoom:c}=this,u=this._loaderId;this._abortController=new AbortController;const{signal:h}=this._abortController,d=await n.scheduleRequest(this,v=>v.isSelected?1:-1);if(!d){this._isCancelled=!0;return}if(this._isCancelled){d.done();return}let m=null,y;try{m=await e({index:s,id:o,bbox:a,userData:l,zoom:c,signal:h})}catch(v){y=v||!0}finally{d.done()}if(u===this._loaderId){if(this._loader=void 0,this.content=m,this._isCancelled&&!m){this._isLoaded=!1;return}this._isLoaded=!0,this._isCancelled=!1,y?i(y,this):r(this)}}loadData(e){return this._isLoaded=!1,this._isCancelled=!1,this._needsReload=!1,this._loaderId++,this._loader=this._loadData(e),this._loader}setNeedsReload(){this.isLoading&&(this.abort(),this._loader=void 0),this._needsReload=!0}abort(){var e;this.isLoaded||(this._isCancelled=!0,(e=this._abortController)==null||e.abort())}}const Hi={OUTSIDE:-1,INTERSECTING:0,INSIDE:1},$N=new At,qme=new At;class PM{constructor(e=[0,0,0],n=[0,0,0],r){r=r||$N.copy(e).add(n).scale(.5),this.center=new At(r),this.halfDiagonal=new At(n).subtract(this.center),this.minimum=new At(e),this.maximum=new At(n)}clone(){return new PM(this.minimum,this.maximum,this.center)}equals(e){return this===e||!!e&&this.minimum.equals(e.minimum)&&this.maximum.equals(e.maximum)}transform(e){return this.center.transformAsPoint(e),this.halfDiagonal.transform(e),this.minimum.transform(e),this.maximum.transform(e),this}intersectPlane(e){const{halfDiagonal:n}=this,r=qme.from(e.normal),i=n.x*Math.abs(r.x)+n.y*Math.abs(r.y)+n.z*Math.abs(r.z),s=this.center.dot(r)+e.distance;return s-i>0?Hi.INSIDE:s+i<0?Hi.OUTSIDE:Hi.INTERSECTING}distanceTo(e){return Math.sqrt(this.distanceSquaredTo(e))}distanceSquaredTo(e){const n=$N.from(e).subtract(this.center),{halfDiagonal:r}=this;let i=0,s;return s=Math.abs(n.x)-r.x,s>0&&(i+=s*s),s=Math.abs(n.y)-r.y,s>0&&(i+=s*s),s=Math.abs(n.z)-r.z,s>0&&(i+=s*s),i}}const p1=new At,HN=new At;class IM{constructor(e=[0,0,0],n=0){this.radius=-0,this.center=new At,this.fromCenterRadius(e,n)}fromCenterRadius(e,n){return this.center.from(e),this.radius=n,this}fromCornerPoints(e,n){return n=p1.from(n),this.center=new At().from(e).add(n).scale(.5),this.radius=this.center.distance(n),this}equals(e){return this===e||!!e&&this.center.equals(e.center)&&this.radius===e.radius}clone(){return new IM(this.center,this.radius)}union(e){const n=this.center,r=this.radius,i=e.center,s=e.radius,o=p1.copy(i).subtract(n),a=o.magnitude();if(r>=a+s)return this.clone();if(s>=a+r)return e.clone();const l=(r+a+s)*.5;return HN.copy(o).scale((-r+l)/a).add(n),this.center.copy(HN),this.radius=l,this}expand(e){const r=p1.from(e).subtract(this.center).magnitude();return r>this.radius&&(this.radius=r),this}transform(e){this.center.transform(e);const n=Joe(p1,e);return this.radius=Math.max(n[0],Math.max(n[1],n[2]))*this.radius,this}distanceSquaredTo(e){const n=this.distanceTo(e);return n*n}distanceTo(e){const r=p1.from(e).subtract(this.center);return Math.max(0,r.len()-this.radius)}intersectPlane(e){const n=this.center,r=this.radius,s=e.normal.dot(n)+e.distance;return s<-r?Hi.OUTSIDE:s<r?Hi.INTERSECTING:Hi.INSIDE}}const Qme=new At,Xme=new At,Cb=new At,Pb=new At,Ib=new At,Yme=new At,Kme=new At,yc={COLUMN0ROW0:0,COLUMN0ROW1:1,COLUMN0ROW2:2,COLUMN1ROW0:3,COLUMN1ROW1:4,COLUMN1ROW2:5,COLUMN2ROW0:6,COLUMN2ROW1:7,COLUMN2ROW2:8};class OM{constructor(e=[0,0,0],n=[0,0,0,0,0,0,0,0,0]){this.center=new At().from(e),this.halfAxes=new Pi(n)}get halfSize(){const e=this.halfAxes.getColumn(0),n=this.halfAxes.getColumn(1),r=this.halfAxes.getColumn(2);return[new At(e).len(),new At(n).len(),new At(r).len()]}get quaternion(){const e=this.halfAxes.getColumn(0),n=this.halfAxes.getColumn(1),r=this.halfAxes.getColumn(2),i=new At(e).normalize(),s=new At(n).normalize(),o=new At(r).normalize();return new t8().fromMatrix3(new Pi([...i,...s,...o]))}fromCenterHalfSizeQuaternion(e,n,r){const i=new t8(r),s=new Pi().fromQuaternion(i);return s[0]=s[0]*n[0],s[1]=s[1]*n[0],s[2]=s[2]*n[0],s[3]=s[3]*n[1],s[4]=s[4]*n[1],s[5]=s[5]*n[1],s[6]=s[6]*n[2],s[7]=s[7]*n[2],s[8]=s[8]*n[2],this.center=new At().from(e),this.halfAxes=s,this}clone(){return new OM(this.center,this.halfAxes)}equals(e){return this===e||!!e&&this.center.equals(e.center)&&this.halfAxes.equals(e.halfAxes)}getBoundingSphere(e=new IM){const n=this.halfAxes,r=n.getColumn(0,Cb),i=n.getColumn(1,Pb),s=n.getColumn(2,Ib),o=Qme.copy(r).add(i).add(s);return e.center.copy(this.center),e.radius=o.magnitude(),e}intersectPlane(e){const n=this.center,r=e.normal,i=this.halfAxes,s=r.x,o=r.y,a=r.z,l=Math.abs(s*i[yc.COLUMN0ROW0]+o*i[yc.COLUMN0ROW1]+a*i[yc.COLUMN0ROW2])+Math.abs(s*i[yc.COLUMN1ROW0]+o*i[yc.COLUMN1ROW1]+a*i[yc.COLUMN1ROW2])+Math.abs(s*i[yc.COLUMN2ROW0]+o*i[yc.COLUMN2ROW1]+a*i[yc.COLUMN2ROW2]),c=r.dot(n)+e.distance;return c<=-l?Hi.OUTSIDE:c>
vendor: 3,778 bytes, line 2878
2878=l?Hi.INSIDE:Hi.INTERSECTING}distanceTo(e){return Math.sqrt(this.distanceSquaredTo(e))}distanceSquaredTo(e){const n=Xme.from(e).subtract(this.center),r=this.halfAxes,i=r.getColumn(0,Cb),s=r.getColumn(1,Pb),o=r.getColumn(2,Ib),a=i.magnitude(),l=s.magnitude(),c=o.magnitude();i.normalize(),s.normalize(),o.normalize();let u=0,h;return h=Math.abs(n.dot(i))-a,h>0&&(u+=h*h),h=Math.abs(n.dot(s))-l,h>0&&(u+=h*h),h=Math.abs(n.dot(o))-c,h>0&&(u+=h*h),u}computePlaneDistances(e,n,r=[-0,-0]){let i=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY;const o=this.center,a=this.halfAxes,l=a.getColumn(0,Cb),c=a.getColumn(1,Pb),u=a.getColumn(2,Ib),h=Yme.copy(l).add(c).add(u).add(o),d=Kme.copy(h).subtract(e);let m=n.dot(d);return i=Math.min(m,i),s=Math.max(m,s),h.copy(o).add(l).add(c).subtract(u),d.copy(h).subtract(e),m=n.dot(d),i=Math.min(m,i),s=Math.max(m,s),h.copy(o).add(l).subtract(c).add(u),d.copy(h).subtract(e),m=n.dot(d),i=Math.min(m,i),s=Math.max(m,s),h.copy(o).add(l).subtract(c).subtract(u),d.copy(h).subtract(e),m=n.dot(d),i=Math.min(m,i),s=Math.max(m,s),o.copy(h).subtract(l).add(c).add(u),d.copy(h).subtract(e),m=n.dot(d),i=Math.min(m,i),s=Math.max(m,s),o.copy(h).subtract(l).add(c).subtract(u),d.copy(h).subtract(e),m=n.dot(d),i=Math.min(m,i),s=Math.max(m,s),o.copy(h).subtract(l).subtract(c).add(u),d.copy(h).subtract(e),m=n.dot(d),i=Math.min(m,i),s=Math.max(m,s),o.copy(h).subtract(l).subtract(c).subtract(u),d.copy(h).subtract(e),m=n.dot(d),i=Math.min(m,i),s=Math.max(m,s),r[0]=i,r[1]=s,r}transform(e){this.center.transformAsPoint(e);const n=this.halfAxes.getColumn(0,Cb);n.transformAsPoint(e);const r=this.halfAxes.getColumn(1,Pb);r.transformAsPoint(e);const i=this.halfAxes.getColumn(2,Ib);return i.transformAsPoint(e),this.halfAxes=new Pi([...n,...r,...i]),this}getTransform(){throw new Error("not implemented")}}const qN=new At,QN=new At;class Tv{constructor(e=[0,0,1],n=0){this.normal=new At,this.distance=-0,this.fromNormalDistance(e,n)}fromNormalDistance(e,n){return bv(Number.isFinite(n)),this.normal.from(e).normalize(),this.distance=n,this}fromPointNormal(e,n){e=qN.from(e),this.normal.from(n).normalize();const r=-this.normal.dot(e);return this.distance=r,this}fromCoefficients(e,n,r,i){return this.normal.set(e,n,r),bv(Tl(this.normal.len(),1)),this.distance=i,this}clone(){return new Tv(this.normal,this.distance)}equals(e){return Tl(this.distance,e.distance)&&Tl(this.normal,e.normal)}getPointDistance(e){return this.normal.dot(e)+this.distance}transform(e){const n=QN.copy(this.normal).transformAsVector(e).normalize(),r=this.normal.scale(-this.distance).transform(e);return this.fromPointNormal(r,n)}projectPointOntoPlane(e,n=[0,0,0]){const r=qN.from(e),i=this.getPointDistance(r),s=QN.copy(this.normal).scale(i);return r.subtract(s).to(n)}}const XN=[new At([1,0,0]),new At([0,1,0]),new At([0,0,1])],YN=new At,Gme=new At;class Tc{constructor(e=[]){this.planes=e}fromBoundingSphere(e){this.planes.length=2*XN.length;const n=e.center,r=e.radius;let i=0;for(const s of XN){let o=this.planes[i],a=this.planes[i+1];o||(o=this.planes[i]=new Tv),a||(a=this.planes[i+1]=new Tv);const l=YN.copy(s).scale(-r).add(n);o.fromPointNormal(l,s);const c=YN.copy(s).scale(r).add(n),u=Gme.copy(s).negate();a.fromPointNormal(c,u),i+=2}return this}computeVisibility(e){let n=Hi.INSIDE;for(const r of this.planes)switch(e.intersectPlane(r)){case Hi.OUTSIDE:return Hi.OUTSIDE;case Hi.INTERSECTING:n=Hi.INTERSECTING;break}return n}computeVisibilityWithPlaneMask(e,n){if(bv(Number.isFinite(n),"parentPlaneMask is required."),n===Tc.MASK_OUTSIDE||n===Tc.MASK_INSIDE)return n;let r=Tc.MASK_INSIDE;const i=this.planes;for(let s=0;s<this.planes.length;++s){const o=s<31?1<<s:0;if(s<31&&(n&o)===0)continue;const a=i[s],l=e.intersectPlane(a);if(l===Hi.OUTSIDE)return Tc.MASK_OUTSIDE;
2878l===Hi.INTERSECTING&&(r|=o)}return r}}Tc.MASK_OUTSIDE=4294967295;Tc.MASK_INSIDE=0;Tc.MASK_INDETERMINATE=2147483647;new At;new At;new At;new At;new At;new At;new At;new At;new At;new At;new At;new At;new At;new At;new At;new At;new At;const pl=new Pi,Zme=new Pi,Jme=new Pi,Ob=new Pi,KN=new Pi;function e0e(t,e={}){const n=Lae,r=10;let i=0,s=0;const o=Zme,a=Jme;o.identity(),a.copy(t);const l=n*t0e(a);for(;s<r&&n0e(a)>l;)r0e(a,Ob),KN.copy(Ob).transpose(),a.multiplyRight(Ob),a.multiplyLeft(KN),o.multiplyRight(Ob),++i>2&&(++s,i=0);return e.unitary=o.toTarget(e.unitary),e.diagonal=a.toTarget(e.diagonal),e}function t0e(t){let e=0;for(let n=0;n<9;++n){const r=t[n];e+=r*r}return Math.sqrt(e)}const jP=[1,0,0],VP=[2,2,1];function n0e(t){let e=0;for(let n=0;n<3;++n){const r=t[pl.getElementIndex(VP[n],jP[n])];e+=2*r*r}return Math.sqrt(e)}function r0e(t,e){const n=Bae;let r=0,i=1;for(let c=0;c<3;++c){const u=Math.abs(t[pl.getElementIndex(VP[c],jP[c])]);u>r&&(i=c,r=u)}const s=jP[i],o=VP[i];let a=1,l=0;if(Math.abs(t[pl.getElementIndex(o,s)])>n){const c=t[pl.getElementIndex(o,o)],u=t[pl.getElementIndex(s,s)],h=t[pl.getElementIndex(o,s)],d=(c-u)/2/h;let m;d<0?m=-1/(-d+Math.sqrt(1+d*d)):m=1/(d+Math.sqrt(1+d*d)),a=1/Math.sqrt(1+m*m),l=m*a}return Pi.IDENTITY.to(e),e[pl.getElementIndex(s,s)]=e[pl.getElementIndex(o,o)]=a,e[pl.getElementIndex(o,s)]=l,e[pl.getElementIndex(s,o)]=-l,e}const ku=new At,i0e=new At,s0e=new At,o0e=new At,a0e=new At,l0e=new Pi,c0e={diagonal:new Pi,unitary:new Pi};function u0e(t,e=new OM){if(!t||t.length===0)return e.halfAxes=new Pi([0,0,0,0,0,0,0,0,0]),e.center=new At,e;const n=t.length,r=new At(0,0,0);for(const F of t)r.add(F);const i=1/n;r.multiplyByScalar(i);let s=0,o=0,a=0,l=0,c=0,u=0;for(const F of t){const H=ku.copy(F).subtract(r);s+=H.x*H.x,o+=H.x*H.y,a+=H.x*H.z,l+=H.y*H.y,c+=H.y*H.z,u+=H.z*H.z}s*=i,o*=i,a*=i,l*=i,c*=i,u*=i;const h=l0e;h[0]=s,h[1]=o,h[2]=a,h[3]=o,h[4]=l,h[5]=c,h[6]=a,h[7]=c,h[8]=u;const{unitary:d}=e0e(h,c0e),m=e.halfAxes.copy(d);let y=m.getColumn(0,s0e),v=m.getColumn(1,o0e),b=m.getColumn(2,a0e),x=-Number.MAX_VALUE,T=-Number.MAX_VALUE,E=-Number.MAX_VALUE,C=Number.MAX_VALUE,I=Number.MAX_VALUE,O=Number.MAX_VALUE;for(const F of t)ku.copy(F),x=Math.max(ku.dot(y),x),T=Math.max(ku.dot(v),T),E=Math.max(ku.dot(b),E),C=Math.min(ku.dot(y),C),I=Math.min(ku.dot(v),I),O=Math.min(ku.dot(b),O);y=y.multiplyByScalar(.5*(C+x)),v=v.multiplyByScalar(.5*(I+T)),b=b.multiplyByScalar(.5*(O+E)),e.center.copy(y).add(v).add(b);const N=i0e.set(x-C,T-I,E-O).multiplyByScalar(.5),U=new Pi([N[0],0,0,0,N[1],0,0,0,N[2]]);return e.halfAxes.multiplyRight(U),e}const xg=512,GN=3,Mq=[[.5,.5],[0,0],[0,1],[1,0],[1,1]],Rq=Mq.concat([[0,.5],[.5,0],[1,.5],[.5,1]]),f0e=Rq.concat([[.25,.5],[.75,.5]]);class Ag{constructor(e,n,r){this.x=e,this.y=n,this.z=r}get children(){if(!this._children){const e=this.x*2,n=this.y*2,r=this.z+1;this._children=[new Ag(e,n,r),new Ag(e,n+1,r),new Ag(e+1,n,r),new Ag(e+1,n+1,r)]}return this._children}update(e){const{viewport:n,cullingVolume:r,elevationBounds:i,minZ:s,maxZ:o,bounds:a,offset:l,project:c}=e,u=this.getBoundingVolume(i,l,c);if(a&&!this.insideBounds(a)||r.computeVisibility(u)<0)return!1;if(!this.childVisible){let{z:d}=this;if(d<o&&d>=s){const m=u.distanceTo(n.cameraPosition)*n.scale/n.height;d+=Math.floor(Math.log2(m))}if(d>=o)return this.selected=!0,!0}this.selected=!1,this.childVisible=!0;for(const d of this.children)d.update(e);return!0}getSelected(e=[]){if(this.selected&&e.push(this),this._children)for(const n of this._children)n.getSelected(e);return e}insideBounds([e,n,r,i]){const s=Math.pow(2,this.z),o=xg/s;return this.x*o<r&&this.y*o<i&&(this.x+1)*o>e&&(this.y+1)*o>n}getBoundingVolume(e,n,r){if(r){const l=this.z<1?f0e:this.z<2?Rq:Mq,c=[];for(const u of l){const h=$P(this.x+u[0],this.y+u[1],this.z);h[2]=e[0],c.push(r(h)),e[0]!==e[1]&&(h[2]=e[1],c.push(r(h)))}return u0e(c)}const i=Math.pow(2,this.z),s=xg/i,o=this.x*s+n*xg,a=xg-(this.y+1)*s;return new PM([o,a,e[0]],[o+s,a+s,e[1]])}}function h0e(t,e,n,r){const i=t instanceof dq&&t.resolution?t.projectPosition:null,s=Object.values(t.getFrustumPlanes()).map(({normal:m,distance:y})=>new Tv(m.clone().negate(),y)),o=new Tc(s),a=t.distanceScales.unitsPerMeter[2],l=n&&n[0]*a||0,c=n&&n[1]*a||0,u=t instanceof ao&&t.pitch<=60?e:0;if(r){const[m,y,v,b]=r,x=Rl([m,b]),T=Rl([v,y]);r=[x[0],xg-x[1],T[0],xg-T[1]]}const h=new Ag(0,0,0),d={viewport:t,project:i,cullingVolume:o,elevationBounds:[l,c],minZ:u,maxZ:e,bounds:r,offset:0};if(h.update(d),t instanceof ao&&t.subViewports&&t.subViewports.length>1){for(d.offset=-1;h.update(d)&&!(--d.offset<-GN););for(d.offset=1;h.update(d)&&!(++d.offset>GN););}return h.getSelected()}const Bc=512,d0e=[-1/0,-1/0,1/0,1/0],lw={type:"object",value:null,validate:(t,e)=>e.optional&&t===null||typeof t=="string"||Array.isArray(t)&&t.every(n=>typeof n=="string"),equal:(t,e)=>{if(t===e)return!0;
vendor: 5,466 bytes, line 2878
2878if(!Array.isArray(t)||!Array.isArray(e))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}};function kq(t,e){const n=[e.transformAsPoint([t[0],t[1]]),e.transformAsPoint([t[2],t[1]]),e.transformAsPoint([t[0],t[3]]),e.transformAsPoint([t[2],t[3]])];return[Math.min(...n.map(i=>i[0])),Math.min(...n.map(i=>i[1])),Math.max(...n.map(i=>i[0])),Math.max(...n.map(i=>i[1]))]}function p0e(t){return Math.abs(t.split("").reduce((e,n)=>(e<<5)-e+n.charCodeAt(0)|0,0))}function cw(t,e){if(!t||!t.length)return null;const{index:n,id:r}=e;if(Array.isArray(t)){const s=p0e(r)%t.length;t=t[s]}let i=t;for(const s of Object.keys(n)){const o=new RegExp(`{${s}}`,"g");i=i.replace(o,String(n[s]))}return Number.isInteger(n.y)&&Number.isInteger(n.z)&&(i=i.replace(/\{-y\}/g,String(Math.pow(2,n.z)-n.y-1))),i}function g0e(t,e,n){let r;return r=t.getBounds(),t.isGeospatial?[Math.max(r[0],n[0]),Math.max(r[1],n[1]),Math.min(r[2],n[2]),Math.min(r[3],n[3])]:[Math.max(Math.min(r[0],n[2]),n[0]),Math.max(Math.min(r[1],n[3]),n[1]),Math.min(Math.max(r[2],n[0]),n[2]),Math.min(Math.max(r[3],n[1]),n[3])]}function m0e({viewport:t,z:e,cullRect:n}){return(t.subViewports||[t]).map(i=>WP(i,e||0,n))}function WP(t,e,n){if(!Array.isArray(e)){const s=n.x-t.x,o=n.y-t.y,{width:a,height:l}=n,c={targetZ:e},u=t.unproject([s,o],c),h=t.unproject([s+a,o],c),d=t.unproject([s,o+l],c),m=t.unproject([s+a,o+l],c);return[Math.min(u[0],h[0],d[0],m[0]),Math.min(u[1],h[1],d[1],m[1]),Math.max(u[0],h[0],d[0],m[0]),Math.max(u[1],h[1],d[1],m[1])]}const r=WP(t,e[0],n),i=WP(t,e[1],n);return[Math.min(r[0],i[0]),Math.min(r[1],i[1]),Math.max(r[2],i[2]),Math.max(r[3],i[3])]}function v0e(t,e,n){return n?kq(t,n).map(i=>i*e/Bc):t.map(r=>r*e/Bc)}function MM(t,e){return Math.pow(2,t)*Bc/e}function $P(t,e,n){const r=MM(n,Bc),i=t/r*360-180,s=Math.PI-2*Math.PI*e/r,o=180/Math.PI*Math.atan(.5*(Math.exp(s)-Math.exp(-s)));return[i,o]}function ZN(t,e,n,r){const i=MM(n,r);return[t/i*Bc,e/i*Bc]}function y0e(t,e,n,r,i=Bc){if(t.isGeospatial){const[c,u]=$P(e,n,r),[h,d]=$P(e+1,n+1,r);return{west:c,north:u,east:h,south:d}}const[s,o]=ZN(e,n,r,i),[a,l]=ZN(e+1,n+1,r,i);return{left:s,top:o,right:a,bottom:l}}function b0e(t,e,n,r,i){const s=g0e(t,null,r),o=MM(e,n),[a,l,c,u]=v0e(s,o,i),h=[];for(let d=Math.floor(a);d<c;d++)for(let m=Math.floor(l);m<u;m++)h.push({x:d,y:m,z:e});return h}function _0e({viewport:t,maxZoom:e,minZoom:n,zRange:r,extent:i,tileSize:s=Bc,modelMatrix:o,modelMatrixInverse:a,zoomOffset:l=0}){let c=t.isGeospatial?Math.round(t.zoom+Math.log2(Bc/s))+l:Math.ceil(t.zoom)+l;if(typeof n=="number"&&Number.isFinite(n)&&c<n){if(!i)return[];c=n}typeof e=="number"&&Number.isFinite(e)&&c>e&&(c=e);let u=i;return o&&a&&i&&!t.isGeospatial&&(u=kq(i,o)),t.isGeospatial?h0e(t,c,r,i):b0e(t,c,s,u||d0e,a)}function w0e(t){return/(?=.*{z})(?=.*{x})(?=.*({y}|{-y}))/.test(t)}function x0e(t){return Number.isFinite(t.west)&&Number.isFinite(t.north)&&Number.isFinite(t.east)&&Number.isFinite(t.south)}function A0e(t){let e={},n;return r=>{for(const i in r)if(!E0e(r[i],e[i])){n=t(r),e=r;break}return n}}function E0e(t,e){if(t===e)return!0;if(Array.isArray(t)){const n=t.length;if(!e||e.length!==n)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}return!1}const JN=1,eA=2,S0e="never",T0e="no-overlap",RM="best-available",C0e=5,P0e={[RM]:M0e,[T0e]:R0e,[S0e]:()=>{}},I0e={extent:null,tileSize:512,maxZoom:null,minZoom:null,maxCacheSize:null,maxCacheByteSize:null,refinementStrategy:"best-available",zRange:null,maxRequests:6,debounceTime:0,zoomOffset:0,onTileLoad:()=>{},onTileUnload:()=>{},onTileError:()=>{}};class O0e{constructor(e){this._getCullBounds=A0e(m0e),this.opts={...I0e,...e},this.setOptions(this.opts),this.onTileLoad=n=>{var r,i;(i=(r=this.opts).onTileLoad)==null||i.call(r,n),this.opts.maxCacheByteSize!==null&&(this._cacheByteSize+=n.byteLength,this._resizeCache())},this._requestScheduler=new dne({throttleRequests:this.opts.maxRequests>0||this.opts.debounceTime>0,maxRequests:this.opts.maxRequests,debounceTime:this.opts.debounceTime}),this._cache=new Map,this._tiles=[],this._dirty=!1,this._cacheByteSize=0,this._viewport=null,this._zRange=null,this._selectedTiles=null,this._frameNumber=0,this._modelMatrix=new fi,this._modelMatrixInverse=new fi}get tiles(){return this._tiles}get selectedTiles(){return this._selectedTiles}get isLoaded(){return this._selectedTiles!==null&&this._selectedTiles.every(e=>e.isLoaded)}get needsReload(){return this._selectedTiles!==null&&this._selectedTiles.some(e=>e.needsReload)}setOptions(e){Object.assign(this.opts,e),Number.isFinite(e.maxZoom)&&(this._maxZoom=Math.floor(e.maxZoom)),Number.isFinite(e.minZoom)&&(this._minZoom=Math.ceil(e.minZoom))}finalize(){for(const e of this._cache.values())e.isLoading&&e.abort();this._cache.clear(),this._tiles=[],this._selectedTiles=null}reloadAll(){for(const e of this._cache.keys()){const n=this._cache.get(e);!this._selectedTiles||!this._selectedTiles.includes(n)?this._cache.delete(e):n.setNeedsReload()}}update(e,{zRange:n,modelMatrix:r}={zRange:null,modelMatrix:null}){const i=r?new fi(r):new fi,s=!i.equals(this._modelMatrix);if(!this._viewport||!e.equals(this._viewport)||!Tl(this._zRange,n)||s){s&&(this._modelMatrixInverse=i.clone().invert(),this._modelMatrix=i),this._viewport=e,this._zRange=n;const a=this.getTileIndices({viewport:e,maxZoom:this._maxZoom,minZoom:this._minZoom,zRange:n,modelMatrix:this._modelMatrix,modelMatrixInverse:this._modelMatrixInverse});
2878this._selectedTiles=a.map(l=>this._getTile(l,!0)),this._dirty&&this._rebuildTree()}else this.needsReload&&(this._selectedTiles=this._selectedTiles.map(a=>this._getTile(a.index,!0)));const o=this.updateTileStates();return this._pruneRequests(),this._dirty&&this._resizeCache(),o&&this._frameNumber++,this._frameNumber}isTileVisible(e,n){if(!e.isVisible)return!1;if(n&&this._viewport){const r=this._getCullBounds({viewport:this._viewport,z:this._zRange,cullRect:n}),{bbox:i}=e;for(const[s,o,a,l]of r){let c;if("west"in i)c=i.west<a&&i.east>s&&i.south<l&&i.north>o;else{const u=Math.min(i.top,i.bottom),h=Math.max(i.top,i.bottom);c=i.left<a&&i.right>s&&u<l&&h>o}if(c)return!0}return!1}return!0}getTileIndices({viewport:e,maxZoom:n,minZoom:r,zRange:i,modelMatrix:s,modelMatrixInverse:o}){const{tileSize:a,extent:l,zoomOffset:c}=this.opts;return _0e({viewport:e,maxZoom:n,minZoom:r,zRange:i,tileSize:a,extent:l,modelMatrix:s,modelMatrixInverse:o,zoomOffset:c})}getTileId(e){return`${e.x}-${e.y}-${e.z}`}getTileZoom(e){return e.z}getTileMetadata(e){const{tileSize:n}=this.opts;return{bbox:y0e(this._viewport,e.x,e.y,e.z,n)}}getParentIndex(e){const n=Math.floor(e.x/2),r=Math.floor(e.y/2),i=e.z-1;return{x:n,y:r,z:i}}updateTileStates(){const e=this.opts.refinementStrategy||RM,n=new Array(this._cache.size);let r=0;for(const i of this._cache.values())n[r++]=i.isVisible,i.isSelected=!1,i.isVisible=!1;for(const i of this._selectedTiles)i.isSelected=!0,i.isVisible=!0;(typeof e=="function"?e:P0e[e])(Array.from(this._cache.values())),r=0;for(const i of this._cache.values())if(n[r++]!==i.isVisible)return!0;return!1}_pruneRequests(){const{maxRequests:e=0}=this.opts,n=[];let r=0;for(const i of this._cache.values())i.isLoading&&(r++,!i.isSelected&&!i.isVisible&&n.push(i));for(;e>0&&r>e&&n.length>0;)n.shift().abort(),r--}_rebuildTree(){const{_cache:e}=this;for(const n of e.values())n.parent=null,n.children&&(n.children.length=0);for(const n of e.values()){const r=this._getNearestAncestor(n);n.parent=r,r!=null&&r.children&&r.children.push(n)}}_resizeCache(){var o,a;const{_cache:e,opts:n}=this,r=n.maxCacheSize??(n.maxCacheByteSize!==null?1/0:C0e*this.selectedTiles.length),i=n.maxCacheByteSize??1/0;if(e.size>r||this._cacheByteSize>i){for(const[l,c]of e)if(!c.isVisible&&!c.isSelected&&(this._cacheByteSize-=n.maxCacheByteSize!==null?c.byteLength:0,e.delete(l),(a=(o=this.opts).onTileUnload)==null||a.call(o,c)),e.size<=r&&this._cacheByteSize<=i)break;this._rebuildTree(),this._dirty=!0}this._dirty&&(this._tiles=Array.from(this._cache.values()).sort((l,c)=>l.zoom-c.zoom),this._dirty=!1)}_getTile(e,n){const r=this.getTileId(e);let i=this._cache.get(r),s=!1;return!i&&n?(i=new Hme(e),Object.assign(i,this.getTileMetadata(i.index)),Object.assign(i,{id:r,zoom:this.getTileZoom(i.index)}),s=!0,this._cache.set(r,i),this._dirty=!0):i&&i.needsReload&&(s=!0),i&&s&&i.loadData({getData:this.opts.getTileData,requestScheduler:this._requestScheduler,onLoad:this.onTileLoad,onError:this.opts.onTileError}),i}_getNearestAncestor(e){const{_minZoom:n=0}=this;let r=e.index;for(;this.getTileZoom(r)>n;){r=this.getParentIndex(r);const i=this._getTile(r);if(i)return i}return null}}function M0e(t){for(const e of t)e.state=0;for(const e of t)e.isSelected&&!Nq(e)&&kM(e);for(const e of t)e.isVisible=!!(e.state&eA)}function R0e(t){for(const n of t)n.state=0;for(const n of t)n.isSelected&&Nq(n);const e=Array.from(t).sort((n,r)=>n.zoom-r.zoom);for(const n of e)if(n.isVisible=!!(n.state&eA),n.children&&(n.isVisible||n.state&JN))for(const r of n.children)r.state=JN;else n.isSelected&&kM(n)}function Nq(t){let e=t;for(;e;){if(e.isLoaded||e.content)return e.state|=eA,!0;e=e.parent}return!1}function kM(t){for(const e of t.children)e.isLoaded||e.content?e.state|=eA:kM(e)}const k0e={TilesetClass:O0e,data:{type:"data",value:[]},dataComparator:lw.equal,renderSubLayers:{type:"function",value:t=>new gd(t)},getTileData:{type:"function",optional:!0,value:null},onViewportLoad:{type:"function",optional:!0,value:null},onTileLoad:{type:"function",value:t=>{}},onTileUnload:{type:"function",value:t=>{}},onTileError:{type:"function",value:t=>console.error(t)},extent:{type:"array",optional:!0,value:null,compare:!0},tileSize:512,maxZoom:null,minZoom:0,maxCacheSize:null,maxCacheByteSize:null,refinementStrategy:RM,zRange:null,maxRequests:6,debounceTime:0,zoomOffset:0};
2878class Sy extends Ns{initializeState(){this.state={tileset:null,isLoaded:!1}}finalizeState(){var e,n;(n=(e=this.state)==null?void 0:e.tileset)==null||n.finalize()}get isLoaded(){var e,n,r;return!!((r=(n=(e=this.state)==null?void 0:e.tileset)==null?void 0:n.selectedTiles)!=null&&r.every(i=>i.isLoaded&&i.layers&&i.layers.every(s=>s.isLoaded)))}shouldUpdateState({changeFlags:e}){return e.somethingChanged}updateState({changeFlags:e}){let{tileset:n}=this.state;const r=e.propsOrDataChanged||e.updateTriggersChanged,i=e.dataChanged||e.updateTriggersChanged&&(e.updateTriggersChanged.all||e.updateTriggersChanged.getTileData);n?r&&(n.setOptions(this._getTilesetOptions()),i?n.reloadAll():n.tiles.forEach(s=>{s.layers=null})):(n=new this.props.TilesetClass(this._getTilesetOptions()),this.setState({tileset:n})),this._updateTileset()}_getTilesetOptions(){const{tileSize:e,maxCacheSize:n,maxCacheByteSize:r,refinementStrategy:i,extent:s,maxZoom:o,minZoom:a,maxRequests:l,debounceTime:c,zoomOffset:u}=this.props;return{maxCacheSize:n,maxCacheByteSize:r,maxZoom:o,minZoom:a,tileSize:e,refinementStrategy:i,extent:s,maxRequests:l,debounceTime:c,zoomOffset:u,getTileData:this.getTileData.bind(this),onTileLoad:this._onTileLoad.bind(this),onTileError:this._onTileError.bind(this),onTileUnload:this._onTileUnload.bind(this)}}_updateTileset(){const e=this.state.tileset,{zRange:n,modelMatrix:r}=this.props,i=e.update(this.context.viewport,{zRange:n,modelMatrix:r}),{isLoaded:s}=e,o=this.state.isLoaded!==s,a=this.state.frameNumber!==i;s&&(o||a)&&this._onViewportLoad(),a&&this.setState({frameNumber:i}),this.state.isLoaded=s}_onViewportLoad(){const{tileset:e}=this.state,{onViewportLoad:n}=this.props;n&&n(e.selectedTiles)}_onTileLoad(e){this.props.onTileLoad(e),e.layers=null,this.setNeedsUpdate()}_onTileError(e,n){this.props.onTileError(e),n.layers=null,this.setNeedsUpdate()}_onTileUnload(e){this.props.onTileUnload(e)}getTileData(e){const{data:n,getTileData:r,fetch:i}=this.props,{signal:s}=e;return e.url=typeof n=="string"||Array.isArray(n)?cw(n,e):null,r?r(e):i&&e.url?i(e.url,{propName:"data",layer:this,signal:s}):null}renderSubLayers(e){return this.props.renderSubLayers(e)}getSubLayerPropsByTile(e){return null}getPickingInfo(e){const n=e.sourceLayer,r=n.props.tile,i=e.info;return i.picked&&(i.tile=r),i.sourceTile=r,i.sourceTileSubLayer=n,i}_updateAutoHighlight(e){e.sourceTileSubLayer.updateAutoHighlight(e)}renderLayers(){return this.state.tileset.tiles.map(e=>{const n=this.getSubLayerPropsByTile(e);if(!(!e.isLoaded&&!e.content))if(e.layers)n&&e.layers[0]&&Object.keys(n).some(r=>e.layers[0].props[r]!==n[r])&&(e.layers=e.layers.map(r=>r.clone(n)));else{const r=this.renderSubLayers({...this.props,...this.getSubLayerProps({id:e.id,updateTriggers:this.props.updateTriggers}),data:e.content,_offset:0,tile:e});e.layers=Yx(r,Boolean).map(i=>i.clone({tile:e,...n}))}return e.layers})}filterSubLayer({layer:e,cullRect:n}){const{tile:r}=e.props;return this.state.tileset.isTileVisible(r,n)}}Sy.defaultProps=k0e;Sy.layerName="TileLayer";const kE=Math.PI/180,Mb=new Float32Array(16),eD=new Float32Array(12);function tD(t,e,n){const r=e[0]*kE,i=e[1]*kE,s=e[2]*kE,o=Math.sin(s),a=Math.sin(r),l=Math.sin(i),c=Math.cos(s),u=Math.cos(r),h=Math.cos(i),d=n[0],m=n[1],y=n[2];t[0]=d*h*u,t[1]=d*l*u,t[2]=d*-a,t[3]=m*(-l*c+h*a*o),t[4]=m*(h*c+l*a*o),t[5]=m*u*o,t[6]=y*(l*o+h*a*c),t[7]=y*(-h*o+l*a*c),t[8]=y*u*c}function nD(t){return t[0]=t[0],t[1]=t[1],t[2]=t[2],t[3]=t[4],t[4]=t[5],t[5]=t[6],t[6]=t[8],t[7]=t[9],t[8]=t[10],t[9]=t[12],t[10]=t[13],t[11]=t[14],t.subarray(0,12)}const N0e={size:12,accessor:["getOrientation","getScale","getTranslation","getTransformMatrix"],shaderAttributes:{instanceModelMatrixCol0:{size:3,elementOffset:0},instanceModelMatrixCol1:{size:3,elementOffset:3},instanceModelMatrixCol2:{size:3,elementOffset:6},instanceTranslation:{size:3,elementOffset:9}},update(t,{startRow:e,endRow:n}){const{data:r,getOrientation:i,getScale:s,getTranslation:o,getTransformMatrix:a}=this.props,l=Array.isArray(a),c=l&&a.length===16,u=Array.isArray(s),h=Array.isArray(i),d=Array.isArray(o),m=c||!l&&!!a(r[0]);m?t.constant=c:t.constant=h&&u&&d;const y=t.value;if(t.constant){let v;m?(Mb.set(a),v=nD(Mb)):(v=eD,tD(v,i,s),v.set(o,9)),t.value=new Float32Array(v)}else{let v=e*t.size;const{iterable:b,objectInfo:x}=Ey(r,e,n);for(const T of b){x.index++;let E;if(m)Mb.set(c?a:a(T,x)),E=nD(Mb);else{E=eD;const C=h?i:i(T,x),I=u?s:s(T,x);tD(E,C,I),E.set(d?o:o(T,x),9)}y[v++]=E[0],y[v++]=E[1],y[v++]=E[2],y[v++]=E[3],y[v++]=E[4],y[v++]=E[5],y[v++]=E[6],y[v++]=E[7],y[v++]=E[8],y[v++]=E[9],y[v++]=E[10],y[v++]=E[11]}}}};function D0e(t,e){return e===Wt.CARTESIAN||e===Wt.METER_OFFSETS||e===Wt.DEFAULT&&!t.isGeospatial}const rD=`uniform simpleMeshUniforms {
2879  float sizeScale;
2880  bool composeModelMatrix;
2881  bool hasTexture;
2882  bool flatShading;
2883} simpleMesh;
2884`,B0e={name:"simpleMesh",vs:rD,fs:rD,uniformTypes:{sizeScale:"f32",composeModelMatrix:"f32",hasTexture:"f32",flatShading:"f32"}},L0e=`#version 300 es
2885#define SHADER_NAME simple-mesh-layer-vs
2886in vec3 positions;
2887in vec3 normals;
2888in vec3 colors;
2889in vec2 texCoords;
2890in vec3 instancePositions;
2891in vec3 instancePositions64Low;
2892in vec4 instanceColors;
2893in vec3 instancePickingColors;
2894in vec3 instanceModelMatrixCol0;
2895in vec3 instanceModelMatrixCol1;
2896in vec3 instanceModelMatrixCol2;
2897in vec3 instanceTranslation;
2898out vec2 vTexCoord;
2899out vec3 cameraPosition;
2900out vec3 normals_commonspace;
2901out vec4 position_commonspace;
2902out vec4 vColor;
2903void main(void) {
2904geometry.worldPosition = instancePositions;
2905geometry.uv = texCoords;
2906geometry.pickingColor = instancePickingColors;
2907vTexCoord = texCoords;
2908cameraPosition = project.cameraPosition;
2909vColor = vec4(colors * instanceColors.rgb, instanceColors.a);
2910mat3 instanceModelMatrix = mat3(instanceModelMatrixCol0, instanceModelMatrixCol1, instanceModelMatrixCol2);
2911vec3 pos = (instanceModelMatrix * positions) * simpleMesh.sizeScale + instanceTranslation;
2912if (simpleMesh.composeModelMatrix) {
2913DECKGL_FILTER_SIZE(pos, geometry);
2914normals_commonspace = project_normal(instanceModelMatrix * normals);
2915geometry.worldPosition += pos;
2916gl_Position = project_position_to_clipspace(pos + instancePositions, instancePositions64Low, vec3(0.0), position_commonspace);
2917geometry.position = position_commonspace;
2918}
2919else {
2920pos = project_size(pos);
2921DECKGL_FILTER_SIZE(pos, geometry);
2922gl_Position = project_position_to_clipspace(instancePositions, instancePositions64Low, pos, position_commonspace);
2923geometry.position = position_commonspace;
2924normals_commonspace = project_normal(instanceModelMatrix * normals);
2925}
2926geometry.normal = normals_commonspace;
2927DECKGL_FILTER_GL_POSITION(gl_Position, geometry);
2928DECKGL_FILTER_COLOR(vColor, geometry);
2929}
2930`,F0e=`#version 300 es
2931#define SHADER_NAME simple-mesh-layer-fs
2932precision highp float;
2933uniform sampler2D sampler;
2934in vec2 vTexCoord;
2935in vec3 cameraPosition;
2936in vec3 normals_commonspace;
2937in vec4 position_commonspace;
2938in vec4 vColor;
2939out vec4 fragColor;
2940void main(void) {
2941geometry.uv = vTexCoord;
2942vec3 normal;
2943if (simpleMesh.flatShading) {
2944normal = normalize(cross(dFdx(position_commonspace.xyz), dFdy(position_commonspace.xyz)));
2945} else {
2946normal = normals_commonspace;
2947}
2948vec4 color = simpleMesh.hasTexture ? texture(sampler, vTexCoord) : vColor;
2949DECKGL_FILTER_COLOR(color, geometry);
2950vec3 lightColor = lighting_getLightColor(color.rgb, cameraPosition, position_commonspace.xyz, normal);
2951fragColor = vec4(lightColor, color.a * layer.opacity);
2952}
2953`;function NE(t){const e=t.positions||t.POSITION;Zt.assert(e,'no "postions" or "POSITION" attribute in mesh');const n=e.value.length/e.size;let r=t.COLOR_0||t.colors;r||(r={size:3,value:new Float32Array(n*3).fill(1)});let i=t.NORMAL||t.normals;
vendor: 1,161 bytes, line 2953
2953i||(i={size:3,value:new Float32Array(n*3).fill(0)});let s=t.TEXCOORD_0||t.texCoords;return s||(s={size:2,value:new Float32Array(n*2).fill(0)}),{positions:e,colors:r,normals:i,texCoords:s}}function iD(t){return t instanceof Cl?(t.attributes=NE(t.attributes),t):t.attributes?new Cl({...t,topology:"triangle-list",attributes:NE(t.attributes)}):new Cl({topology:"triangle-list",attributes:NE(t)})}const U0e=[0,0,0,255],z0e={mesh:{type:"object",value:null,async:!0},texture:{type:"image",value:null,async:!0},sizeScale:{type:"number",value:1,min:0},_instanced:!0,wireframe:!1,material:!0,getPosition:{type:"accessor",value:t=>t.position},getColor:{type:"accessor",value:U0e},getOrientation:{type:"accessor",value:[0,0,0]},getScale:{type:"accessor",value:[1,1,1]},getTranslation:{type:"accessor",value:[0,0,0]},getTransformMatrix:{type:"accessor",value:[]},textureParameters:{type:"object",ignore:!0,value:null}};class uw extends Wo{getShaders(){return super.getShaders({vs:L0e,fs:F0e,modules:[uf,lH,ff,B0e]})}getBounds(){var r;if(this.props._instanced)return super.getBounds();let e=this.state.positionBounds;if(e)return e;const{mesh:n}=this.props;if(!n)return null;
2953if(e=(r=n.header)==null?void 0:r.boundingBox,!e){const{attributes:i}=iD(n);i.POSITION=i.POSITION||i.positions,e=vre(i)}return this.state.positionBounds=e,e}initializeState(){this.getAttributeManager().addInstanced({instancePositions:{transition:!0,type:"float64",fp64:this.use64bitPositions(),size:3,accessor:"getPosition"},instanceColors:{type:"unorm8",transition:!0,size:this.props.colorFormat.length,accessor:"getColor",defaultValue:[0,0,0,255]},instanceModelMatrix:N0e}),this.setState({emptyTexture:this.context.device.createTexture({data:new Uint8Array(4),width:1,height:1})})}updateState(e){var s;super.updateState(e);const{props:n,oldProps:r,changeFlags:i}=e;if(n.mesh!==r.mesh||i.extensionsChanged){if(this.state.positionBounds=null,(s=this.state.model)==null||s.destroy(),n.mesh){this.state.model=this.getModel(n.mesh);const o=n.mesh.attributes||n.mesh;this.setState({hasNormals:!!(o.NORMAL||o.normals)})}this.getAttributeManager().invalidateAll()}n.texture!==r.texture&&n.texture instanceof ar&&this.setTexture(n.texture),this.state.model&&this.state.model.setTopology(this.props.wireframe?"line-strip":"triangle-list")}finalizeState(e){super.finalizeState(e),this.state.emptyTexture.delete()}draw({uniforms:e}){const{model:n}=this.state;if(!n)return;const{viewport:r,renderPass:i}=this.context,{sizeScale:s,coordinateSystem:o,_instanced:a}=this.props,l={sizeScale:s,composeModelMatrix:!a||D0e(r,o),flatShading:!this.state.hasNormals};n.shaderInputs.setProps({simpleMesh:l}),n.draw(i)}get isLoaded(){var e;return!!((e=this.state)!=null&&e.model&&super.isLoaded)}getModel(e){const n=new us(this.context.device,{...this.getShaders(),id:this.props.id,bufferLayout:this.getAttributeManager().getBufferLayouts(),geometry:iD(e),isInstanced:!0}),{texture:r}=this.props,{emptyTexture:i}=this.state,s={sampler:r||i,hasTexture:!!r};return n.shaderInputs.setProps({simpleMesh:s}),n}setTexture(e){const{emptyTexture:n,model:r}=this.state;if(r){const i={sampler:e||n,hasTexture:!!e};r.shaderInputs.setProps({simpleMesh:i})}}}uw.defaultProps=z0e;uw.layerName="SimpleMeshLayer";var DE={exports:{}};/*!
2954
2955JSZip v3.10.1 - A JavaScript class for generating and reading zip files
2956<http://stuartk.com/jszip>
2957
2958(c) 2009-2016 Stuart Knightley <stuart [at] stuartk.com>
2959Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/main/LICENSE.markdown.
2960
2961JSZip uses the library pako released under the MIT license :
2962https://github.com/nodeca/pako/blob/main/LICENSE
2963*/var sD;function j0e(){return sD||(sD=1,(function(t,e){(function(n){t.exports=n()})(function(){return(function n(r,i,s){function o(c,u){if(!i[c]){if(!r[c]){var h=typeof Tb=="function"&&Tb;if(!u&&h)return h(c,!0);if(a)return a(c,!0);var d=new Error("Cannot find module '"+c+"'");throw d.code="MODULE_NOT_FOUND",d}var m=i[c]={exports:{}};r[c][0].call(m.exports,function(y){var v=r[c][1][y];return o(v||y)},m,m.exports,n,r,i,s)}return i[c].exports}for(var a=typeof Tb=="function"&&Tb,l=0;l<s.length;l++)o(s[l]);return o}
vendor: 17,847 bytes, lines 2963-2964
2963)({1:[function(n,r,i){var s=n("./utils"),o=n("./support"),a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";i.encode=function(l){for(var c,u,h,d,m,y,v,b=[],x=0,T=l.length,E=T,C=s.getTypeOf(l)!=="string";x<l.length;)E=T-x,h=C?(c=l[x++],u=x<T?l[x++]:0,x<T?l[x++]:0):(c=l.charCodeAt(x++),u=x<T?l.charCodeAt(x++):0,x<T?l.charCodeAt(x++):0),d=c>>2,m=(3&c)<<4|u>>4,y=1<E?(15&u)<<2|h>>6:64,v=2<E?63&h:64,b.push(a.charAt(d)+a.charAt(m)+a.charAt(y)+a.charAt(v));return b.join("")},i.decode=function(l){var c,u,h,d,m,y,v=0,b=0,x="data:";if(l.substr(0,x.length)===x)throw new Error("Invalid base64 input, it looks like a data url.");var T,E=3*(l=l.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(l.charAt(l.length-1)===a.charAt(64)&&E--,l.charAt(l.length-2)===a.charAt(64)&&E--,E%1!=0)throw new Error("Invalid base64 input, bad content length.");for(T=o.uint8array?new Uint8Array(0|E):new Array(0|E);v<l.length;)c=a.indexOf(l.charAt(v++))<<2|(d=a.indexOf(l.charAt(v++)))>>4,u=(15&d)<<4|(m=a.indexOf(l.charAt(v++)))>>2,h=(3&m)<<6|(y=a.indexOf(l.charAt(v++))),T[b++]=c,m!==64&&(T[b++]=u),y!==64&&(T[b++]=h);return T}},{"./support":30,"./utils":32}],2:[function(n,r,i){var s=n("./external"),o=n("./stream/DataWorker"),a=n("./stream/Crc32Probe"),l=n("./stream/DataLengthProbe");function c(u,h,d,m,y){this.compressedSize=u,this.uncompressedSize=h,this.crc32=d,this.compression=m,this.compressedContent=y}c.prototype={getContentWorker:function(){var u=new o(s.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new l("data_length")),h=this;return u.on("end",function(){if(this.streamInfo.data_length!==h.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),u},getCompressedWorker:function(){return new o(s.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},c.createWorkerFrom=function(u,h,d){return u.pipe(new a).pipe(new l("uncompressedSize")).pipe(h.compressWorker(d)).pipe(new l("compressedSize")).withStreamInfo("compression",h)},r.exports=c},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(n,r,i){var s=n("./stream/GenericWorker");i.STORE={magic:"\0\0",compressWorker:function(){return new s("STORE compression")},uncompressWorker:function(){return new s("STORE decompression")}},i.DEFLATE=n("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(n,r,i){var s=n("./utils"),o=(function(){for(var a,l=[],c=0;c<256;c++){a=c;for(var u=0;u<8;u++)a=1&a?3988292384^a>>>1:a>>>1;l[c]=a}return l})();r.exports=function(a,l){return a!==void 0&&a.length?s.getTypeOf(a)!=="string"?(function(c,u,h,d){var m=o,y=d+h;c^=-1;for(var v=d;v<y;v++)c=c>>>8^m[255&(c^u[v])];return-1^c})(0|l,a,a.length,0):(function(c,u,h,d){var m=o,y=d+h;c^=-1;for(var v=d;v<y;v++)c=c>>>8^m[255&(c^u.charCodeAt(v))];return-1^c})(0|l,a,a.length,0):0}},{"./utils":32}],5:[function(n,r,i){i.base64=!1,i.binary=!1,i.dir=!1,i.createFolders=!0,i.date=null,i.compression=null,i.compressionOptions=null,i.comment=null,i.unixPermissions=null,i.dosPermissions=null},{}],6:[function(n,r,i){var s=null;s=typeof Promise<"u"?Promise:n("lie"),r.exports={Promise:s}},{lie:37}],7:[function(n,r,i){var s=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",o=n("pako"),a=n("./utils"),l=n("./stream/GenericWorker"),c=s?"uint8array":"array";function u(h,d){l.call(this,"FlateWorker/"+h),this._pako=null,this._pakoAction=h,this._pakoOptions=d,this.meta={}}i.magic="\b\0",a.inherits(u,l),u.prototype.processChunk=function(h){this.meta=h.meta,this._pako===null&&this._createPako(),this._pako.push(a.transformTo(c,h.data),!1)},u.prototype.flush=function(){l.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},u.prototype.cleanUp=function(){l.prototype.cleanUp.call(this),this._pako=null},u.prototype._createPako=function(){this._pako=new o[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var h=this;this._pako.onData=function(d){h.push({data:d,meta:h.meta})}},i.compressWorker=function(h){return new u("Deflate",h)},i.uncompressWorker=function(){return new u("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(n,r,i){function s(m,y){var v,b="";for(v=0;v<y;v++)b+=String.fromCharCode(255&m),m>>>=8;return b}function o(m,y,v,b,x,T){var E,C,I=m.file,O=m.compression,N=T!==c.utf8encode,U=a.transformTo("string",T(I.name)),F=a.transformTo("string",c.utf8encode(I.name)),H=I.comment,W=a.transformTo("string",T(H)),z=a.transformTo("string",c.utf8encode(H)),V=F.length!==I.name.length,M=z.length!==H.length,K="",j="",q="",Y=I.dir,X=I.date,te={crc32:0,compressedSize:0,uncompressedSize:0};y&&!v||(te.crc32=m.crc32,te.compressedSize=m.compressedSize,te.uncompressedSize=m.uncompressedSize);var D=0;y&&(D|=8),N||!V&&!M||(D|=2048);var $=0,he=0;Y&&($|=16),x==="UNIX"?(he=798,$|=(function(fe,$e){var Ze=fe;return fe||(Ze=$e?16893:33204),(65535&Ze)<<16})(I.unixPermissions,Y)):(he=20,$|=(function(fe){return 63&(fe||0)})(I.dosPermissions)),E=X.getUTCHours(),E<<=6,E|=X.getUTCMinutes(),E<<=5,E|=X.getUTCSeconds()/2,C=X.getUTCFullYear()-1980,C<<=4,C|=X.getUTCMonth()+1,C<<=5,C|=X.getUTCDate(),V&&(j=s(1,1)+s(u(U),4)+F,K+="up"+s(j.length,2)+j),M&&(q=s(1,1)+s(u(W),4)+z,K+="uc"+s(q.length,2)+q);var Se="";return Se+=`
2964\0`,Se+=s(D,2),Se+=O.magic,Se+=s(E,2),Se+=s(C,2),Se+=s(te.crc32,4),Se+=s(te.compressedSize,4),Se+=s(te.uncompressedSize,4),Se+=s(U.length,2),Se+=s(K.length,2),{fileRecord:h.LOCAL_FILE_HEADER+Se+U+K,dirRecord:h.CENTRAL_FILE_HEADER+s(he,2)+Se+s(W.length,2)+"\0\0\0\0"+s($,4)+s(b,4)+U+K+W}}var a=n("../utils"),l=n("../stream/GenericWorker"),c=n("../utf8"),u=n("../crc32"),h=n("../signature");function d(m,y,v,b){l.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=y,this.zipPlatform=v,this.encodeFileName=b,this.streamFiles=m,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}a.inherits(d,l),d.prototype.push=function(m){var y=m.meta.percent||0,v=this.entriesCount,b=this._sources.length;this.accumulate?this.contentBuffer.push(m):(this.bytesWritten+=m.data.length,l.prototype.push.call(this,{data:m.data,meta:{currentFile:this.currentFile,percent:v?(y+100*(v-b-1))/v:100}}))},d.prototype.openedSource=function(m){this.currentSourceOffset=this.bytesWritten,this.currentFile=m.file.name;var y=this.streamFiles&&!m.file.dir;if(y){var v=o(m,y,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:v.fileRecord,meta:{percent:0}})}else this.accumulate=!0},d.prototype.closedSource=function(m){this.accumulate=!1;var y=this.streamFiles&&!m.file.dir,v=o(m,y,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(v.dirRecord),y)this.push({data:(function(b){return h.DATA_DESCRIPTOR+s(b.crc32,4)+s(b.compressedSize,4)+s(b.uncompressedSize,4)})(m),meta:{percent:100}});else for(this.push({data:v.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},d.prototype.flush=function(){for(var m=this.bytesWritten,y=0;y<this.dirRecords.length;y++)this.push({data:this.dirRecords[y],meta:{percent:100}});var v=this.bytesWritten-m,b=(function(x,T,E,C,I){var O=a.transformTo("string",I(C));return h.CENTRAL_DIRECTORY_END+"\0\0\0\0"+s(x,2)+s(x,2)+s(T,4)+s(E,4)+s(O.length,2)+O})(this.dirRecords.length,v,m,this.zipComment,this.encodeFileName);this.push({data:b,meta:{percent:100}})},d.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},d.prototype.registerPrevious=function(m){this._sources.push(m);var y=this;return m.on("data",function(v){y.processChunk(v)}),m.on("end",function(){y.closedSource(y.previous.streamInfo),y._sources.length?y.prepareNextSource():y.end()}),m.on("error",function(v){y.error(v)}),this},d.prototype.resume=function(){return!!l.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},d.prototype.error=function(m){var y=this._sources;if(!l.prototype.error.call(this,m))return!1;for(var v=0;v<y.length;v++)try{y[v].error(m)}catch{}return!0},d.prototype.lock=function(){l.prototype.lock.call(this);for(var m=this._sources,y=0;y<m.length;y++)m[y].lock()},r.exports=d},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(n,r,i){var s=n("../compressions"),o=n("./ZipFileWorker");i.generateWorker=function(a,l,c){var u=new o(l.streamFiles,c,l.platform,l.encodeFileName),h=0;try{a.forEach(function(d,m){h++;var y=(function(T,E){var C=T||E,I=s[C];if(!I)throw new Error(C+" is not a valid compression method !");return I})(m.options.compression,l.compression),v=m.options.compressionOptions||l.compressionOptions||{},b=m.dir,x=m.date;m._compressWorker(y,v).withStreamInfo("file",{name:d,dir:b,date:x,comment:m.comment||"",unixPermissions:m.unixPermissions,dosPermissions:m.dosPermissions}).pipe(u)}),u.entriesCount=h}catch(d){u.error(d)}return u}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(n,r,i){function s(){if(!(this instanceof s))return new s;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var o=new s;for(var a in this)typeof this[a]!="function"&&(o[a]=this[a]);return o}}(s.prototype=n("./object")).loadAsync=n("./load"),s.support=n("./support"),s.defaults=n("./defaults"),s.version="3.10.1",s.loadAsync=function(o,a){return new s().loadAsync(o,a)},s.external=n("./external"),r.exports=s},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(n,r,i){var s=n("./utils"),o=n("./external"),a=n("./utf8"),l=n("./zipEntries"),c=n("./stream/Crc32Probe"),u=n("./nodejsUtils");function h(d){return new o.Promise(function(m,y){var v=d.decompressed.getContentWorker().pipe(new c);v.on("error",function(b){y(b)}).on("end",function(){v.streamInfo.crc32!==d.decompressed.crc32?y(new Error("Corrupted zip : CRC32 mismatch")):m()}).resume()})}r.exports=function(d,m){var y=this;return m=s.extend(m||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:a.utf8decode}),u.isNode&&u.isStream(d)?o.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):s.prepareContent("the loaded zip file",d,!0,m.optimizedBinaryString,m.base64).then(function(v){var b=new l(m);return b.load(v),b}).then(function(v){var b=[o.Promise.resolve(v)],x=v.files;if(m.checkCRC32)for(var T=0;T<x.length;T++)b.push(h(x[T]));return o.Promise.all(b)}).then(function(v){for(var b=v.shift(),x=b.files,T=0;T<x.length;T++){var E=x[T],C=E.fileNameStr,I=s.resolve(E.fileNameStr);y.file(I,E.decompressed,{binary:!0,optimizedBinaryString:!0,date:E.date,dir:E.dir,comment:E.fileCommentStr.length?E.fileCommentStr:null,unixPermissions:E.unixPermissions,dosPermissions:E.dosPermissions,createFolders:m.createFolders}),E.dir||(y.file(I).unsafeOriginalName=C)}return b.zipComment.length&&(y.comment=b.zipComment),y})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(n,r,i){var s=n("../utils"),o=n("../stream/GenericWorker");function a(l,c){o.call(this,"Nodejs stream input adapter for "+l),this._upstreamEnded=!1,this._bindStream(c)}s.inherits(a,o),a.prototype._bindStream=function(l){var c=this;(this._stream=l).pause(),l.on("data",function(u){c.push({data:u,meta:{percent:0}})}).on("error",function(u){c.isPaused?this.generatedError=u:c.error(u)}).on("end",function(){c.isPaused?c._upstreamEnded=!0:c.end()})},a.prototype.pause=function(){return!!o.prototype.pause.call(this)&&(this._stream.pause(),!0)},a.prototype.resume=function(){return!!o.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},r.exports=a},{"../stream/GenericWorker":28,"../utils":32}],13:[function(n,r,i){var s=n("readable-stream").Readable;function o(a,l,c){s.call(this,l),this._helper=a;var u=this;a.on("data",function(h,d){u.push(h)||u._helper.pause(),c&&c(d)}).on("error",function(h){u.emit("error",h)}).on("end",function(){u.push(null)})}n("../utils").inherits(o,s),o.prototype._read=function(){this._helper.resume()},r.exports=o},{"../utils":32,"readable-stream":16}],14:[function(n,r,i){r.exports={isNode:typeof Buffer<"u",newBufferFrom:function(s,o){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(s,o);if(typeof s=="number")throw new Error('The "data" argument must not be a number');return new Buffer(s,o)},allocBuffer:function(s){if(Buffer.alloc)return Buffer.alloc(s);var o=new Buffer(s);return o.fill(0),o},isBuffer:function(s){return Buffer.isBuffer(s)},isStream:function(s){return s&&typeof s.on=="function"&&typeof s.pause=="function"&&typeof s.resume=="function"}}},{}],15:[function(n,r,i){function s(I,O,N){var U,F=a.getTypeOf(O),H=a.extend(N||{},u);H.date=H.date||new Date,H.compression!==null&&(H.compression=H.compression.toUpperCase()),typeof H.unixPermissions=="string"&&(H.unixPermissions=parseInt(H.unixPermissions,8)),H.unixPermissions&&16384&H.unixPermissions&&(H.dir=!0),H.dosPermissions&&16&H.dosPermissions&&(H.dir=!0),H.dir&&(I=x(I)),H.createFolders&&(U=b(I))&&T.call(this,U,!0);var W=F==="string"&&H.binary===!1&&H.base64===!1;N&&N.binary!==void 0||(H.binary=!W),(O instanceof h&&O.uncompressedSize===0||H.dir||!O||O.length===0)&&(H.base64=!1,H.binary=!0,O="",H.compression="STORE",F="string");var z=null;z=O instanceof h||O instanceof l?O:y.isNode&&y.isStream(O)?new v(I,O):a.prepareContent(I,O,H.binary,H.optimizedBinaryString,H.base64);var V=new d(I,z,H);this.files[I]=V}var o=n("./utf8"),a=n("./utils"),l=n("./stream/GenericWorker"),c=n("./stream/StreamHelper"),u=n("./defaults"),h=n("./compressedObject"),d=n("./zipObject"),m=n("./generate"),y=n("./nodejsUtils"),v=n("./nodejs/NodejsStreamInputAdapter"),b=function(I){I.slice(-1)==="/"&&(I=I.substring(0,I.length-1));var O=I.lastIndexOf("/");return 0<O?I.substring(0,O):""},x=function(I){return I.slice(-1)!=="/"&&(I+="/"),I},T=function(I,O){return O=O!==void 0?O:u.createFolders,I=x(I),this.files[I]||s.call(this,I,null,{dir:!0,createFolders:O}),this.files[I]};function E(I){return Object.prototype.toString.call(I)==="[object RegExp]"}var C={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(I){var O,N,U;for(O in this.files)U=this.files[O],(N=O.slice(this.root.length,O.length))&&O.slice(0,this.root.length)===this.root&&I(N,U)},filter:function(I){var O=[];return this.forEach(function(N,U){I(N,U)&&O.push(U)}),O},file:function(I,O,N){if(arguments.length!==1)return I=this.root+I,s.call(this,I,O,N),this;if(E(I)){var U=I;return this.filter(function(H,W){return!W.dir&&U.test(H)})}var F=this.files[this.root+I];return F&&!F.dir?F:null},folder:function(I){if(!I)return this;if(E(I))return this.filter(function(F,H){return H.dir&&I.test(F)});var O=this.root+I,N=T.call(this,O),U=this.clone();return U.root=N.name,U},remove:function(I){I=this.root+I;var O=this.files[I];if(O||(I.slice(-1)!=="/"&&(I+="/"),O=this.files[I]),O&&!O.dir)delete this.files[I];else for(var N=this.filter(function(F,H){return H.name.slice(0,I.length)===I}),U=0;U<N.length;U++)delete this.files[N[U].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(I){var O,N={};try{if((N=a.extend(I||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:o.utf8encode})).type=N.type.toLowerCase(),N.compression=N.compression.toUpperCase(),N.type==="binarystring"&&(N.type="string"),!N.type)throw new Error("No output type specified.");a.checkSupport(N.type),N.platform!=="darwin"&&N.platform!=="freebsd"&&N.platform!=="linux"&&N.platform!=="sunos"||(N.platform="UNIX"),N.platform==="win32"&&(N.platform="DOS");var U=N.comment||this.comment||"";O=m.generateWorker(this,N,U)}catch(F){(O=new l("error")).error(F)}return new c(O,N.type||"string",N.mimeType)},generateAsync:function(I,O){return this.generateInternalStream(I).accumulate(O)},generateNodeStream:function(I,O){return(I=I||{}).type||(I.type="nodebuffer"),this.generateInternalStream(I).toNodejsStream(O)}};r.exports=C},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(n,r,i){r.exports=n("stream")},{stream:void 0}],17:[function(n,r,i){var s=n("./DataReader");function o(a){s.call(this,a);for(var l=0;l<this.data.length;l++)a[l]=255&a[l]}n("../utils").inherits(o,s),o.prototype.byteAt=function(a){return this.data[this.zero+a]},o.prototype.lastIndexOfSignature=function(a){for(var l=a.charCodeAt(0),c=a.charCodeAt(1),u=a.charCodeAt(2),h=a.charCodeAt(3),d=this.length-4;0<=d;--d)if(this.data[d]===l&&this.data[d+1]===c&&this.data[d+2]===u&&this.data[d+3]===h)return d-this.zero;return-1},o.prototype.readAndCheckSignature=function(a){var l=a.charCodeAt(0),c=a.charCodeAt(1),u=a.charCodeAt(2),h=a.charCodeAt(3),d=this.readData(4);return l===d[0]&&c===d[1]&&u===d[2]&&h===d[3]},o.prototype.readData=function(a){if(this.checkOffset(a),a===0)return[];var l=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,l},r.exports=o},{"../utils":32,"./DataReader":18}
vendor: 1,312 bytes, line 2964
2964],18:[function(n,r,i){var s=n("../utils");function o(a){this.data=a,this.length=a.length,this.index=0,this.zero=0}o.prototype={checkOffset:function(a){this.checkIndex(this.index+a)},checkIndex:function(a){if(this.length<this.zero+a||a<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+a+"). Corrupted zip ?")},setIndex:function(a){this.checkIndex(a),this.index=a},skip:function(a){this.setIndex(this.index+a)},byteAt:function(){},readInt:function(a){var l,c=0;for(this.checkOffset(a),l=this.index+a-1;l>=this.index;l--)c=(c<<8)+this.byteAt(l);return this.index+=a,c},readString:function(a){return s.transformTo("string",this.readData(a))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var a=this.readInt(4);return new Date(Date.UTC(1980+(a>>25&127),(a>>21&15)-1,a>>16&31,a>>11&31,a>>5&63,(31&a)<<1))}},r.exports=o},{"../utils":32}],19:[function(n,r,i){var s=n("./Uint8ArrayReader");function o(a){s.call(this,a)}n("../utils").inherits(o,s),o.prototype.readData=function(a){this.checkOffset(a);var l=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,l},r.exports=o},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(n,r,i){var s=n("./DataReader");function o(a){s.call(this,a)}
vendor: 18,645 bytes, line 2964
2964n("../utils").inherits(o,s),o.prototype.byteAt=function(a){return this.data.charCodeAt(this.zero+a)},o.prototype.lastIndexOfSignature=function(a){return this.data.lastIndexOf(a)-this.zero},o.prototype.readAndCheckSignature=function(a){return a===this.readData(4)},o.prototype.readData=function(a){this.checkOffset(a);var l=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,l},r.exports=o},{"../utils":32,"./DataReader":18}],21:[function(n,r,i){var s=n("./ArrayReader");function o(a){s.call(this,a)}n("../utils").inherits(o,s),o.prototype.readData=function(a){if(this.checkOffset(a),a===0)return new Uint8Array(0);var l=this.data.subarray(this.zero+this.index,this.zero+this.index+a);return this.index+=a,l},r.exports=o},{"../utils":32,"./ArrayReader":17}],22:[function(n,r,i){var s=n("../utils"),o=n("../support"),a=n("./ArrayReader"),l=n("./StringReader"),c=n("./NodeBufferReader"),u=n("./Uint8ArrayReader");r.exports=function(h){var d=s.getTypeOf(h);return s.checkSupport(d),d!=="string"||o.uint8array?d==="nodebuffer"?new c(h):o.uint8array?new u(s.transformTo("uint8array",h)):new a(s.transformTo("array",h)):new l(h)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(n,r,i){i.LOCAL_FILE_HEADER="PK��",i.CENTRAL_FILE_HEADER="PK��",i.CENTRAL_DIRECTORY_END="PK��",i.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK�\x07",i.ZIP64_CENTRAL_DIRECTORY_END="PK��",i.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(n,r,i){var s=n("./GenericWorker"),o=n("../utils");function a(l){s.call(this,"ConvertWorker to "+l),this.destType=l}o.inherits(a,s),a.prototype.processChunk=function(l){this.push({data:o.transformTo(this.destType,l.data),meta:l.meta})},r.exports=a},{"../utils":32,"./GenericWorker":28}],25:[function(n,r,i){var s=n("./GenericWorker"),o=n("../crc32");function a(){s.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}n("../utils").inherits(a,s),a.prototype.processChunk=function(l){this.streamInfo.crc32=o(l.data,this.streamInfo.crc32||0),this.push(l)},r.exports=a},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(n,r,i){var s=n("../utils"),o=n("./GenericWorker");function a(l){o.call(this,"DataLengthProbe for "+l),this.propName=l,this.withStreamInfo(l,0)}s.inherits(a,o),a.prototype.processChunk=function(l){if(l){var c=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=c+l.data.length}o.prototype.processChunk.call(this,l)},r.exports=a},{"../utils":32,"./GenericWorker":28}],27:[function(n,r,i){var s=n("../utils"),o=n("./GenericWorker");function a(l){o.call(this,"DataWorker");var c=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,l.then(function(u){c.dataIsReady=!0,c.data=u,c.max=u&&u.length||0,c.type=s.getTypeOf(u),c.isPaused||c._tickAndRepeat()},function(u){c.error(u)})}s.inherits(a,o),a.prototype.cleanUp=function(){o.prototype.cleanUp.call(this),this.data=null},a.prototype.resume=function(){return!!o.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,s.delay(this._tickAndRepeat,[],this)),!0)},a.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(s.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},a.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var l=null,c=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":l=this.data.substring(this.index,c);break;case"uint8array":l=this.data.subarray(this.index,c);break;case"array":case"nodebuffer":l=this.data.slice(this.index,c)}return this.index=c,this.push({data:l,meta:{percent:this.max?this.index/this.max*100:0}})},r.exports=a},{"../utils":32,"./GenericWorker":28}],28:[function(n,r,i){function s(o){this.name=o||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}s.prototype={push:function(o){this.emit("data",o)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(o){this.emit("error",o)}return!0},error:function(o){return!this.isFinished&&(this.isPaused?this.generatedError=o:(this.isFinished=!0,this.emit("error",o),this.previous&&this.previous.error(o),this.cleanUp()),!0)},on:function(o,a){return this._listeners[o].push(a),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(o,a){if(this._listeners[o])for(var l=0;l<this._listeners[o].length;l++)this._listeners[o][l].call(this,a)},pipe:function(o){return o.registerPrevious(this)},registerPrevious:function(o){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=o.streamInfo,this.mergeStreamInfo(),this.previous=o;var a=this;return o.on("data",function(l){a.processChunk(l)}),o.on("end",function(){a.end()}),o.on("error",function(l){a.error(l)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var o=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),o=!0),this.previous&&this.previous.resume(),!o},flush:function(){},processChunk:function(o){this.push(o)},withStreamInfo:function(o,a){return this.extraStreamInfo[o]=a,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var o in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,o)&&(this.streamInfo[o]=this.extraStreamInfo[o])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var o="Worker "+this.name;return this.previous?this.previous+" -> "+o:o}},r.exports=s},{}],29:[function(n,r,i){var s=n("../utils"),o=n("./ConvertWorker"),a=n("./GenericWorker"),l=n("../base64"),c=n("../support"),u=n("../external"),h=null;if(c.nodestream)try{h=n("../nodejs/NodejsStreamOutputAdapter")}catch{}function d(y,v){return new u.Promise(function(b,x){var T=[],E=y._internalType,C=y._outputType,I=y._mimeType;y.on("data",function(O,N){T.push(O),v&&v(N)}).on("error",function(O){T=[],x(O)}).on("end",function(){try{var O=(function(N,U,F){switch(N){case"blob":return s.newBlob(s.transformTo("arraybuffer",U),F);case"base64":return l.encode(U);default:return s.transformTo(N,U)}})(C,(function(N,U){var F,H=0,W=null,z=0;for(F=0;F<U.length;F++)z+=U[F].length;switch(N){case"string":return U.join("");case"array":return Array.prototype.concat.apply([],U);case"uint8array":for(W=new Uint8Array(z),F=0;F<U.length;F++)W.set(U[F],H),H+=U[F].length;return W;case"nodebuffer":return Buffer.concat(U);default:throw new Error("concat : unsupported type '"+N+"'")}})(E,T),I);b(O)}catch(N){x(N)}T=[]}).resume()})}function m(y,v,b){var x=v;switch(v){case"blob":case"arraybuffer":x="uint8array";break;case"base64":x="string"}try{this._internalType=x,this._outputType=v,this._mimeType=b,s.checkSupport(x),this._worker=y.pipe(new o(x)),y.lock()}catch(T){this._worker=new a("error"),this._worker.error(T)}}m.prototype={accumulate:function(y){return d(this,y)},on:function(y,v){var b=this;return y==="data"?this._worker.on(y,function(x){v.call(b,x.data,x.meta)}):this._worker.on(y,function(){s.delay(v,arguments,b)}),this},resume:function(){return s.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(y){if(s.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new h(this,{objectMode:this._outputType!=="nodebuffer"},y)}},r.exports=m},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(n,r,i){if(i.base64=!0,i.array=!0,i.string=!0,i.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",i.nodebuffer=typeof Buffer<"u",i.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")i.blob=!1;else{var s=new ArrayBuffer(0);try{i.blob=new Blob([s],{type:"application/zip"}).size===0}catch{try{var o=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);o.append(s),i.blob=o.getBlob("application/zip").size===0}catch{i.blob=!1}}}try{i.nodestream=!!n("readable-stream").Readable}catch{i.nodestream=!1}},{"readable-stream":16}],31:[function(n,r,i){for(var s=n("./utils"),o=n("./support"),a=n("./nodejsUtils"),l=n("./stream/GenericWorker"),c=new Array(256),u=0;u<256;u++)c[u]=252<=u?6:248<=u?5:240<=u?4:224<=u?3:192<=u?2:1;c[254]=c[254]=1;function h(){l.call(this,"utf-8 decode"),this.leftOver=null}function d(){l.call(this,"utf-8 encode")}i.utf8encode=function(m){return o.nodebuffer?a.newBufferFrom(m,"utf-8"):(function(y){var v,b,x,T,E,C=y.length,I=0;for(T=0;T<C;T++)(64512&(b=y.charCodeAt(T)))==55296&&T+1<C&&(64512&(x=y.charCodeAt(T+1)))==56320&&(b=65536+(b-55296<<10)+(x-56320),T++),I+=b<128?1:b<2048?2:b<65536?3:4;for(v=o.uint8array?new Uint8Array(I):new Array(I),T=E=0;E<I;T++)(64512&(b=y.charCodeAt(T)))==55296&&T+1<C&&(64512&(x=y.charCodeAt(T+1)))==56320&&(b=65536+(b-55296<<10)+(x-56320),T++),b<128?v[E++]=b:(b<2048?v[E++]=192|b>>>6:(b<65536?v[E++]=224|b>>>12:(v[E++]=240|b>>>18,v[E++]=128|b>>>12&63),v[E++]=128|b>>>6&63),v[E++]=128|63&b);return v})(m)},i.utf8decode=function(m){return o.nodebuffer?s.transformTo("nodebuffer",m).toString("utf-8"):(function(y){var v,b,x,T,E=y.length,C=new Array(2*E);for(v=b=0;v<E;)if((x=y[v++])<128)C[b++]=x;else if(4<(T=c[x]))C[b++]=65533,v+=T-1;else{for(x&=T===2?31:T===3?15:7;1<T&&v<E;)x=x<<6|63&y[v++],T--;1<T?C[b++]=65533:x<65536?C[b++]=x:(x-=65536,C[b++]=55296|x>>10&1023,C[b++]=56320|1023&x)}return C.length!==b&&(C.subarray?C=C.subarray(0,b):C.length=b),s.applyFromCharCode(C)})(m=s.transformTo(o.uint8array?"uint8array":"array",m))},s.inherits(h,l),h.prototype.processChunk=function(m){var y=s.transformTo(o.uint8array?"uint8array":"array",m.data);if(this.leftOver&&this.leftOver.length){if(o.uint8array){var v=y;(y=new Uint8Array(v.length+this.leftOver.length)).set(this.leftOver,0),y.set(v,this.leftOver.length)}else y=this.leftOver.concat(y);this.leftOver=null}var b=(function(T,E){var C;for((E=E||T.length)>T.length&&(E=T.length),C=E-1;0<=C&&(192&T[C])==128;)C--;return C<0||C===0?E:C+c[T[C]]>E?C:E})(y),x=y;b!==y.length&&(o.uint8array?(x=y.subarray(0,b),this.leftOver=y.subarray(b,y.length)):(x=y.slice(0,b),this.leftOver=y.slice(b,y.length))),this.push({data:i.utf8decode(x),meta:m.meta})},h.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:i.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},i.Utf8DecodeWorker=h,s.inherits(d,l),d.prototype.processChunk=function(m){this.push({data:i.utf8encode(m.data),meta:m.meta})},i.Utf8EncodeWorker=d},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(n,r,i){var s=n("./support"),o=n("./base64"),a=n("./nodejsUtils"),l=n("./external");function c(v){return v}function u(v,b){for(var x=0;x<v.length;++x)b[x]=255&v.charCodeAt(x);return b}n("setimmediate"),i.newBlob=function(v,b){i.checkSupport("blob");try{return new Blob([v],{type:b})}catch{try{var x=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return x.append(v),x.getBlob(b)}catch{throw new Error("Bug : can't construct the Blob.")}}};var h={stringifyByChunk:function(v,b,x){var T=[],E=0,C=v.length;if(C<=x)return String.fromCharCode.apply(null,v);for(;E<C;)b==="array"||b==="nodebuffer"?T.push(String.fromCharCode.apply(null,v.slice(E,Math.min(E+x,C)))):T.push(String.fromCharCode.apply(null,v.subarray(E,Math.min(E+x,C)))),E+=x;return T.join("")},stringifyByChar:function(v){for(var b="",x=0;x<v.length;x++)b+=String.fromCharCode(v[x]);return b},applyCanBeUsed:{uint8array:(function(){try{return s.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}})(),nodebuffer:(function(){try{return s.nodebuffer&&String.fromCharCode.apply(null,a.allocBuffer(1)).length===1}catch{return!1}})()}};function d(v){var b=65536,x=i.getTypeOf(v),T=!0;if(x==="uint8array"?T=h.applyCanBeUsed.uint8array:x==="nodebuffer"&&(T=h.applyCanBeUsed.nodebuffer),T)for(;1<b;)try{return h.stringifyByChunk(v,x,b)}catch{b=Math.floor(b/2)}return h.stringifyByChar(v)}function m(v,b){for(var x=0;x<v.length;x++)b[x]=v[x];return b}i.applyFromCharCode=d;var y={};y.string={string:c,array:function(v){return u(v,new Array(v.length))},arraybuffer:function(v){return y.string.uint8array(v).buffer},uint8array:function(v){return u(v,new Uint8Array(v.length))},nodebuffer:function(v){return u(v,a.allocBuffer(v.length))}},y.array={string:d,array:c,arraybuffer:function(v){return new Uint8Array(v).buffer},uint8array:function(v){return new Uint8Array(v)},nodebuffer:function(v){return a.newBufferFrom(v)}},y.arraybuffer={string:function(v){return d(new Uint8Array(v))},array:function(v){return m(new Uint8Array(v),new Array(v.byteLength))},arraybuffer:c,uint8array:function(v){return new Uint8Array(v)},nodebuffer:function(v){return a.newBufferFrom(new Uint8Array(v))}},y.uint8array={string:d,array:function(v){return m(v,new Array(v.length))},arraybuffer:function(v){return v.buffer},uint8array:c,nodebuffer:function(v){return a.newBufferFrom(v)}},y.nodebuffer={string:d,array:function(v){return m(v,new Array(v.length))},arraybuffer:function(v){return y.nodebuffer.uint8array(v).buffer},uint8array:function(v){return m(v,new Uint8Array(v.length))},nodebuffer:c},i.transformTo=function(v,b){if(b=b||"",!v)return b;i.checkSupport(v);var x=i.getTypeOf(b);return y[x][v](b)},i.resolve=function(v){for(var b=v.split("/"),x=[],T=0;T<b.length;T++){var E=b[T];E==="."||E===""&&T!==0&&T!==b.length-1||(E===".."?x.pop():x.push(E))}return x.join("/")},i.getTypeOf=function(v){return typeof v=="string"?"string":Object.prototype.toString.call(v)==="[object Array]"?"array":s.nodebuffer&&a.isBuffer(v)?"nodebuffer":s.uint8array&&v instanceof Uint8Array?"uint8array":s.arraybuffer&&v instanceof ArrayBuffer?"arraybuffer":void 0},i.checkSupport=function(v){if(!s[v.toLowerCase()])throw new Error(v+" is not supported by this platform")},i.MAX_VALUE_16BITS=65535,i.MAX_VALUE_32BITS=-1,i.pretty=function(v){var b,x,T="";for(x=0;x<(v||"").length;x++)T+="\\x"+((b=v.charCodeAt(x))<16?"0":"")+b.toString(16).toUpperCase();return T},i.delay=function(v,b,x){setImmediate(function(){v.apply(x||null,b||[])})},i.inherits=function(v,b){function x(){}x.prototype=b.prototype,v.prototype=new x},i.extend=function(){var v,b,x={};for(v=0;v<arguments.length;v++)for(b in arguments[v])Object.prototype.hasOwnProperty.call(arguments[v],b)&&x[b]===void 0&&(x[b]=arguments[v][b]);return x},i.prepareContent=function(v,b,x,T,E){return l.Promise.resolve(b).then(function(C){return s.blob&&(C instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(C))!==-1)&&typeof FileReader<"u"?new l.Promise(function(I,O){var N=new FileReader;N.onload=function(U){I(U.target.result)},N.onerror=function(U){O(U.target.error)},N.readAsArrayBuffer(C)}):C}).then(function(C){var I=i.getTypeOf(C);return I?(I==="arraybuffer"?C=i.transformTo("uint8array",C):I==="string"&&(E?C=o.decode(C):x&&T!==!0&&(C=(function(O){return u(O,s.uint8array?new Uint8Array(O.length):new Array(O.length))})(C))),C):l.Promise.reject(new Error("Can't read the data of '"+v+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(n,r,i){var s=n("./reader/readerFor"),o=n("./utils"),a=n("./signature"),l=n("./zipEntry"),c=n("./support");function u(h){this.files=[],this.loadOptions=h}u.prototype={checkSignature:function(h){if(!this.reader.readAndCheckSignature(h)){this.reader.index-=4;var d=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+o.pretty(d)+", expected "+o.pretty(h)+")")}},isSignature:function(h,d){var m=this.reader.index;this.reader.setIndex(h);var y=this.reader.readString(4)===d;return this.reader.setIndex(m),y},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var h=this.reader.readData(this.zipCommentLength),d=c.uint8array?"uint8array":"array",m=o.transformTo(d,h);this.zipComment=this.loadOptions.decodeFileName(m)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var h,d,m,y=this.zip64EndOfCentralSize-44;0<y;)h=this.reader.readInt(2),d=this.reader.readInt(4),m=this.reader.readData(d),this.zip64ExtensibleData[h]={id:h,length:d,value:m}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var h,d;for(h=0;h<this.files.length;h++)d=this.files[h],this.reader.setIndex(d.localHeaderOffset),this.checkSignature(a.LOCAL_FILE_HEADER),d.readLocalPart(this.reader),d.handleUTF8(),d.processAttributes()},readCentralDir:function(){var h;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(a.CENTRAL_FILE_HEADER);)(h=new l({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(h);if(this.centralDirRecords!==this.files.length&&this.centralDirRecords!==0&&this.files.length===0)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var h=this.reader.lastIndexOfSignature(a.CENTRAL_DIRECTORY_END);if(h<0)throw this.isSignature(0,a.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip f
2964ile ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(h);var d=h;if(this.checkSignature(a.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===o.MAX_VALUE_16BITS||this.diskWithCentralDirStart===o.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===o.MAX_VALUE_16BITS||this.centralDirRecords===o.MAX_VALUE_16BITS||this.centralDirSize===o.MAX_VALUE_32BITS||this.centralDirOffset===o.MAX_VALUE_32BITS){if(this.zip64=!0,(h=this.reader.lastIndexOfSignature(a.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(h),this.checkSignature(a.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,a.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(a.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(a.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var m=this.centralDirOffset+this.centralDirSize;this.zip64&&(m+=20,m+=12+this.zip64EndOfCentralSize);var y=d-m;if(0<y)this.isSignature(d,a.CENTRAL_FILE_HEADER)||(this.reader.zero=y);else if(y<0)throw new Error("Corrupted zip: missing "+Math.abs(y)+" bytes.")},prepareReader:function(h){this.reader=s(h)},load:function(h){this.prepareReader(h),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},r.exports=u},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(n,r,i){var s=n("./reader/readerFor"),o=n("./utils"),a=n("./compressedObject"),l=n("./crc32"),c=n("./utf8"),u=n("./compressions"),h=n("./support");function d(m,y){this.options=m,this.loadOptions=y}d.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(m){var y,v;if(m.skip(22),this.fileNameLength=m.readInt(2),v=m.readInt(2),this.fileName=m.readData(this.fileNameLength),m.skip(v),this.compressedSize===-1||this.uncompressedSize===-1)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if((y=(function(b){for(var x in u)if(Object.prototype.hasOwnProperty.call(u,x)&&u[x].magic===b)return u[x];return null})(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+o.pretty(this.compressionMethod)+" unknown (inner file : "+o.transformTo("string",this.fileName)+")");this.decompressed=new a(this.compressedSize,this.uncompressedSize,this.crc32,y,m.readData(this.compressedSize))},readCentralPart:function(m){this.versionMadeBy=m.readInt(2),m.skip(2),this.bitFlag=m.readInt(2),this.compressionMethod=m.readString(2),this.date=m.readDate(),this.crc32=m.readInt(4),this.compressedSize=m.readInt(4),this.uncompressedSize=m.readInt(4);var y=m.readInt(2);if(this.extraFieldsLength=m.readInt(2),this.fileCommentLength=m.readInt(2),this.diskNumberStart=m.readInt(2),this.internalFileAttributes=m.readInt(2),this.externalFileAttributes=m.readInt(4),this.localHeaderOffset=m.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");m.skip(y),this.readExtraFields(m),this.parseZIP64ExtraField(m),this.fileComment=m.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var m=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),m==0&&(this.dosPermissions=63&this.externalFileAttributes),m==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var m=s(this.extraFields[1].value);this.uncompressedSize===o.MAX_VALUE_32BITS&&(this.uncompressedSize=m.readInt(8)),this.compressedSize===o.MAX_VALUE_32BITS&&(this.compressedSize=m.readInt(8)),this.localHeaderOffset===o.MAX_VALUE_32BITS&&
vendor: 13,545 bytes, line 2964
2964(this.localHeaderOffset=m.readInt(8)),this.diskNumberStart===o.MAX_VALUE_32BITS&&(this.diskNumberStart=m.readInt(4))}},readExtraFields:function(m){var y,v,b,x=m.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});m.index+4<x;)y=m.readInt(2),v=m.readInt(2),b=m.readData(v),this.extraFields[y]={id:y,length:v,value:b};m.setIndex(x)},handleUTF8:function(){var m=h.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=c.utf8decode(this.fileName),this.fileCommentStr=c.utf8decode(this.fileComment);else{var y=this.findExtraFieldUnicodePath();if(y!==null)this.fileNameStr=y;else{var v=o.transformTo(m,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(v)}var b=this.findExtraFieldUnicodeComment();if(b!==null)this.fileCommentStr=b;else{var x=o.transformTo(m,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(x)}}},findExtraFieldUnicodePath:function(){var m=this.extraFields[28789];if(m){var y=s(m.value);return y.readInt(1)!==1||l(this.fileName)!==y.readInt(4)?null:c.utf8decode(y.readData(m.length-5))}return null},findExtraFieldUnicodeComment:function(){var m=this.extraFields[25461];if(m){var y=s(m.value);return y.readInt(1)!==1||l(this.fileComment)!==y.readInt(4)?null:c.utf8decode(y.readData(m.length-5))}return null}},r.exports=d},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(n,r,i){function s(y,v,b){this.name=y,this.dir=b.dir,this.date=b.date,this.comment=b.comment,this.unixPermissions=b.unixPermissions,this.dosPermissions=b.dosPermissions,this._data=v,this._dataBinary=b.binary,this.options={compression:b.compression,compressionOptions:b.compressionOptions}}var o=n("./stream/StreamHelper"),a=n("./stream/DataWorker"),l=n("./utf8"),c=n("./compressedObject"),u=n("./stream/GenericWorker");s.prototype={internalStream:function(y){var v=null,b="string";try{if(!y)throw new Error("No output type specified.");var x=(b=y.toLowerCase())==="string"||b==="text";b!=="binarystring"&&b!=="text"||(b="string"),v=this._decompressWorker();var T=!this._dataBinary;T&&!x&&(v=v.pipe(new l.Utf8EncodeWorker)),!T&&x&&(v=v.pipe(new l.Utf8DecodeWorker))}catch(E){(v=new u("error")).error(E)}return new o(v,b,"")},async:function(y,v){return this.internalStream(y).accumulate(v)},nodeStream:function(y,v){return this.internalStream(y||"nodebuffer").toNodejsStream(v)},_compressWorker:function(y,v){if(this._data instanceof c&&this._data.compression.magic===y.magic)return this._data.getCompressedWorker();var b=this._decompressWorker();return this._dataBinary||(b=b.pipe(new l.Utf8EncodeWorker)),c.createWorkerFrom(b,y,v)},_decompressWorker:function(){return this._data instanceof c?this._data.getContentWorker():this._data instanceof u?this._data:new a(this._data)}};for(var h=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],d=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},m=0;m<h.length;m++)s.prototype[h[m]]=d;r.exports=s},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(n,r,i){(function(s){var o,a,l=s.MutationObserver||s.WebKitMutationObserver;if(l){var c=0,u=new l(y),h=s.document.createTextNode("");u.observe(h,{characterData:!0}),o=function(){h.data=c=++c%2}}else if(s.setImmediate||s.MessageChannel===void 0)o="document"in s&&"onreadystatechange"in s.document.createElement("script")?function(){var v=s.document.createElement("script");v.onreadystatechange=function(){y(),v.onreadystatechange=null,v.parentNode.removeChild(v),v=null},s.document.documentElement.appendChild(v)}:function(){setTimeout(y,0)};else{var d=new s.MessageChannel;d.port1.onmessage=y,o=function(){d.port2.postMessage(0)}}var m=[];function y(){var v,b;a=!0;for(var x=m.length;x;){for(b=m,m=[],v=-1;++v<x;)b[v]();x=m.length}a=!1}r.exports=function(v){m.push(v)!==1||a||o()}}).call(this,typeof Yi<"u"?Yi:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(n,r,i){var s=n("immediate");function o(){}var a={},l=["REJECTED"],c=["FULFILLED"],u=["PENDING"];function h(x){if(typeof x!="function")throw new TypeError("resolver must be a function");this.state=u,this.queue=[],this.outcome=void 0,x!==o&&v(this,x)}function d(x,T,E){this.promise=x,typeof T=="function"&&(this.onFulfilled=T,this.callFulfilled=this.otherCallFulfilled),typeof E=="function"&&(this.onRejected=E,this.callRejected=this.otherCallRejected)}function m(x,T,E){s(function(){var C;try{C=T(E)}catch(I){return a.reject(x,I)}C===x?a.reject(x,new TypeError("Cannot resolve promise with itself")):a.resolve(x,C)})}function y(x){var T=x&&x.then;if(x&&(typeof x=="object"||typeof x=="function")&&typeof T=="function")return function(){T.apply(x,arguments)}}function v(x,T){var E=!1;function C(N){E||(E=!0,a.reject(x,N))}function I(N){E||(E=!0,a.resolve(x,N))}var O=b(function(){T(I,C)});O.status==="error"&&C(O.value)}function b(x,T){var E={};try{E.value=x(T),E.status="success"}catch(C){E.status="error",E.value=C}return E}(r.exports=h).prototype.finally=function(x){if(typeof x!="function")return this;var T=this.constructor;return this.then(function(E){return T.resolve(x()).then(function(){return E})},function(E){return T.resolve(x()).then(function(){throw E})})},h.prototype.catch=function(x){return this.then(null,x)},h.prototype.then=function(x,T){if(typeof x!="function"&&this.state===c||typeof T!="function"&&this.state===l)return this;var E=new this.constructor(o);return this.state!==u?m(E,this.state===c?x:T,this.outcome):this.queue.push(new d(E,x,T)),E},d.prototype.callFulfilled=function(x){a.resolve(this.promise,x)},d.prototype.otherCallFulfilled=function(x){m(this.promise,this.onFulfilled,x)},d.prototype.callRejected=function(x){a.reject(this.promise,x)},d.prototype.otherCallRejected=function(x){m(this.promise,this.onRejected,x)},a.resolve=function(x,T){var E=b(y,T);if(E.status==="error")return a.reject(x,E.value);var C=E.value;if(C)v(x,C);else{x.state=c,x.outcome=T;for(var I=-1,O=x.queue.length;++I<O;)x.queue[I].callFulfilled(T)}return x},a.reject=function(x,T){x.state=l,x.outcome=T;for(var E=-1,C=x.queue.length;++E<C;)x.queue[E].callRejected(T);return x},h.resolve=function(x){return x instanceof this?x:a.resolve(new this(o),x)},h.reject=function(x){var T=new this(o);return a.reject(T,x)},h.all=function(x){var T=this;if(Object.prototype.toString.call(x)!=="[object Array]")return this.reject(new TypeError("must be an array"));var E=x.length,C=!1;if(!E)return this.resolve([]);for(var I=new Array(E),O=0,N=-1,U=new this(o);++N<E;)F(x[N],N);return U;function F(H,W){T.resolve(H).then(function(z){I[W]=z,++O!==E||C||(C=!0,a.resolve(U,I))},function(z){C||(C=!0,a.reject(U,z))})}},h.race=function(x){var T=this;if(Object.prototype.toString.call(x)!=="[object Array]")return this.reject(new TypeError("must be an array"));var E=x.length,C=!1;if(!E)return this.resolve([]);for(var I=-1,O=new this(o);++I<E;)N=x[I],T.resolve(N).then(function(U){C||(C=!0,a.resolve(O,U))},function(U){C||(C=!0,a.reject(O,U))});var N;return O}},{immediate:36}],38:[function(n,r,i){var s={};(0,n("./lib/utils/common").assign)(s,n("./lib/deflate"),n("./lib/inflate"),n("./lib/zlib/constants")),r.exports=s},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(n,r,i){var s=n("./zlib/deflate"),o=n("./utils/common"),a=n("./utils/strings"),l=n("./zlib/messages"),c=n("./zlib/zstream"),u=Object.prototype.toString,h=0,d=-1,m=0,y=8;function v(x){if(!(this instanceof v))return new v(x);this.options=o.assign({level:d,method:y,chunkSize:16384,windowBits:15,memLevel:8,strategy:m,to:""},x||{});var T=this.options;T.raw&&0<T.windowBits?T.windowBits=-T.windowBits:T.gzip&&0<T.windowBits&&T.windowBits<16&&(T.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new c,this.strm.avail_out=0;var E=s.deflateInit2(this.strm,T.level,T.method,T.windowBits,T.memLevel,T.strategy);if(E!==h)throw new Error(l[E]);if(T.header&&s.deflateSetHeader(this.strm,T.header),T.dictionary){var C;if(C=typeof T.dictionary=="string"?a.string2buf(T.dictionary):u.call(T.dictionary)==="[object ArrayBuffer]"?new Uint8Array(T.dictionary):T.dictionary,(E=s.deflateSetDictionary(this.strm,C))!==h)throw new Error(l[E]);this._dict_set=!0}}function b(x,T){var E=new v(T);if(E.push(x,!0),E.err)throw E.msg||l[E.err];return E.result}v.prototype.push=function(x,T){var E,C,I=this.strm,O=this.options.chunkSize;if(this.ended)return!1;C=T===~~T?T:T===!0?4:0,typeof x=="string"?I.input=a.string2buf(x):u.call(x)==="[object ArrayBuffer]"?I.input=new Uint8Array(x):I.input=x,I.next_in=0,I.avail_in=I.input.length;do{if(I.avail_out===0&&(I.output=new o.Buf8(O),I.next_out=0,I.avail_out=O),(E=s.deflate(I,C))!==1&&E!==h)return this.onEnd(E),!(this.ended=!0);I.avail_out!==0&&(I.avail_in!==0||C!==4&&C!==2)||(this.options.to==="string"?this.onData(a.buf2binstring(o.shrinkBuf(I.output,I.next_out))):this.onData(o.shrinkBuf(I.output,I.next_out)))}while((0<I.avail_in||I.avail_out===0)&&E!==1);return C===4?(E=s.deflateEnd(this.strm),this.onEnd(E),this.ended=!0,E===h):C!==2||(this.onEnd(h),!(I.avail_out=0))},v.prototype.onData=function(x){this.chunks.push(x)},v.prototype.onEnd=function(x){x===h&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=o.flattenChunks(this.chunks)),this.chunks=[],this.err=x,this.msg=this.strm.msg},i.Deflate=v,i.deflate=b,i.deflateRaw=function(x,T){return(T=T||{}).raw=!0,b(x,T)},i.gzip=function(x,T){return(T=T||{}).gzip=!0,b(x,T)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(n,r,i){var s=n("./zlib/inflate"),o=n("./utils/common"),a=n("./utils/strings"),l=n("./zlib/constants"),c=n("./zlib/messages"),u=n("./zlib/zstream"),h=n("./zlib/gzheader"),d=Object.prototype.toString;function m(v){if(!(this instanceof m))return new m(v);this.options=o.assign({chunkSize:16384,windowBits:0,to:""},v||{});var b=this.options;b.raw&&0<=b.windowBits&&b.windowBits<16&&(b.windowBits=-b.windowBits,b.windowBits===0&&(b.windowBits=-15)),!(0<=b.windowBits&&b.windowBits<16)||v&&v.windowBits||(b.windowBits+=32),15<b.windowBits&&b.windowBits<48&&(15&b.windowBits)==0&&(b.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new u,this.strm.avail_out=0;var x=s.inflateInit2(this.strm,b.windowBits);if(x!==l.Z_OK)throw new Error(c[x]);this.header=new h,s.inflateGetHeader(this.strm,this.header)}function y(v,b){var x=new m(b);if(x.push(v,!0),x.err)throw x.msg||c[x.err];return x.result}m.prototype.push=function(v,b){var x,T,E,C,I,O,N=this.strm,U=this.options.chunkSize,F=this.options.dictionary,H=!1;if(this.ended)return!1;T=b===~~b?b:b===!0?l.Z_FINISH:l.Z_NO_FLUSH,typeof v=="string"?N.input=a.binstring2buf(v):d.call(v)==="[object ArrayBuffer]"?N.input=new Uint8Array(v):N.input=v,N.next_in=0,N.avail_in=N.input.length;do{if(N.avail_out===0&&(N.output=new o.Buf8(U),N.next_out=0,N.avail_out=U),(x=s.inflate(N,l.Z_NO_FLUSH))===l.Z_NEED_DICT&&F&&(O=typeof F=="string"?a.string2buf(F):d.call(F)==="[object ArrayBuffer]"?new Uint8Array(F):F,x=s.inflateSetDictionary(this.strm,O)),x===l.Z_BUF_ERROR&&H===!0&&(x=l.Z_OK,H=!1),x!==l.Z_STREAM_END&&x!==l.Z_OK)return this.onEnd(x),!(this.ended=!0);N.next_out&&(N.avail_out!==0&&x!==l.Z_STREAM_END&&(N.avail_in!==0||T!==l.Z_FINISH&&T!==l.Z_SYNC_FLUSH)||(this.options.to==="string"?(E=a.utf8border(N.output,N.next_out),C=N.next_out-E,I=a.buf2string(N.output,E),N.next_out=C,N.avail_out=U-C,C&&o.arraySet(N.output,N.output,E,C,0),this.onData(I)):this.onData(o.shrinkBuf(N.output,N.next_out)))),N.avail_in===0&&N.avail_out===0&&(H=!0)}while((0<N.avail_in||N.avail_out===0)&&x!==l.Z_STREAM_END);return x===l.Z_STREAM_END&&(T=l.Z_FINISH),T===l.Z_FINISH?(x=s.inflateEnd(this.strm),this.onEnd(x),this.ended=!0,x===l.Z_OK):T!==l.Z_SYNC_FLUSH||(this.onEnd(l.Z_OK),!(N.avail_out=0))},m.prototype.onData=function(v){this.chunks.push(v)},m.prototype.onEnd=function(v){v===l.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=o.flattenChunks(this.chunks)),this.chunks=[],this.err=v,this.msg=this.strm.msg},i.Inflate=m,i.inflate=y,i.inflateRaw=function(v,b){return(b=b||{}).raw=!0,y(v,b)},i.ungzip=y},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(n,r,i){var s=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";i.assign=function(l){for(var c=Array.prototype.slice.call(arguments,1);c.length;){var u=c.shift();if(u){if(typeof u!="object")throw new TypeError(u+"must be non-object");for(var h in u)u.hasOwnProperty(h)&&(l[h]=u[h])}}return l},i.shrinkBuf=function(l,c){return l.length===c?l:l.subarray?l.subarray(0,c):(l.length=c,l)};var o={arraySet:function(l,c,u,h,d){if(c.subarray&&l.subarray)l.set(c.subarray(u,u+h),d);else for(var m=0;m<h;m++)l[d+m]=c[u+m]},flattenChunks:function(l){var c,u,h,d,m,y;for(c=h=0,u=l.length;c<u;c++)h+=l[c].length;for(y=new Uint8Array(h),c=d=0,u=l.length;c<u;c++)m=l[c],y.set(m,d),d+=m.length;return y}},a={arraySet:function(l,c,u,h,d){for(var m=0;m<h;m++)l[d+m]=c[u+m]},flattenChunks:function(l){return[].concat.apply([],l)}};i.setTyped=function(l){l?(i.Buf8=Uint8Array,i.Buf16=Uint16Array,i.Buf32=Int32Array,i.assign(i,o)):(i.Buf8=Array,i.Buf16=Array,i.Buf32=Array,i.assign(i,a))},i.setTyped(s)},{}],42:[function(n,r,i){var s=n("./common"),o=!0,a=!0;try{String.fromCharCode.apply(null,[0])}catch{o=!1}
vendor: 5,191 bytes, line 2964
2964try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{a=!1}for(var l=new s.Buf8(256),c=0;c<256;c++)l[c]=252<=c?6:248<=c?5:240<=c?4:224<=c?3:192<=c?2:1;function u(h,d){if(d<65537&&(h.subarray&&a||!h.subarray&&o))return String.fromCharCode.apply(null,s.shrinkBuf(h,d));for(var m="",y=0;y<d;y++)m+=String.fromCharCode(h[y]);return m}l[254]=l[254]=1,i.string2buf=function(h){var d,m,y,v,b,x=h.length,T=0;for(v=0;v<x;v++)(64512&(m=h.charCodeAt(v)))==55296&&v+1<x&&(64512&(y=h.charCodeAt(v+1)))==56320&&(m=65536+(m-55296<<10)+(y-56320),v++),T+=m<128?1:m<2048?2:m<65536?3:4;for(d=new s.Buf8(T),v=b=0;b<T;v++)(64512&(m=h.charCodeAt(v)))==55296&&v+1<x&&(64512&(y=h.charCodeAt(v+1)))==56320&&(m=65536+(m-55296<<10)+(y-56320),v++),m<128?d[b++]=m:(m<2048?d[b++]=192|m>>>6:(m<65536?d[b++]=224|m>>>12:(d[b++]=240|m>>>18,d[b++]=128|m>>>12&63),d[b++]=128|m>>>6&63),d[b++]=128|63&m);return d},i.buf2binstring=function(h){return u(h,h.length)},i.binstring2buf=function(h){for(var d=new s.Buf8(h.length),m=0,y=d.length;m<y;m++)d[m]=h.charCodeAt(m);return d},i.buf2string=function(h,d){var m,y,v,b,x=d||h.length,T=new Array(2*x);for(m=y=0;m<x;)if((v=h[m++])<128)T[y++]=v;else if(4<(b=l[v]))T[y++]=65533,m+=b-1;else{for(v&=b===2?31:b===3?15:7;1<b&&m<x;)v=v<<6|63&h[m++],b--;1<b?T[y++]=65533:v<65536?T[y++]=v:(v-=65536,T[y++]=55296|v>>10&1023,T[y++]=56320|1023&v)}return u(T,y)},i.utf8border=function(h,d){var m;for((d=d||h.length)>h.length&&(d=h.length),m=d-1;0<=m&&(192&h[m])==128;)m--;return m<0||m===0?d:m+l[h[m]]>d?m:d}},{"./common":41}],43:[function(n,r,i){r.exports=function(s,o,a,l){for(var c=65535&s|0,u=s>>>16&65535|0,h=0;a!==0;){for(a-=h=2e3<a?2e3:a;u=u+(c=c+o[l++]|0)|0,--h;);c%=65521,u%=65521}return c|u<<16|0}},{}],44:[function(n,r,i){r.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(n,r,i){var s=(function(){for(var o,a=[],l=0;l<256;l++){o=l;for(var c=0;c<8;c++)o=1&o?3988292384^o>>>1:o>>>1;a[l]=o}return a})();r.exports=function(o,a,l,c){var u=s,h=c+l;o^=-1;for(var d=c;d<h;d++)o=o>>>8^u[255&(o^a[d])];return-1^o}},{}],46:[function(n,r,i){var s,o=n("../utils/common"),a=n("./trees"),l=n("./adler32"),c=n("./crc32"),u=n("./messages"),h=0,d=4,m=0,y=-2,v=-1,b=4,x=2,T=8,E=9,C=286,I=30,O=19,N=2*C+1,U=15,F=3,H=258,W=H+F+1,z=42,V=113,M=1,K=2,j=3,q=4;function Y(k,ie){return k.msg=u[ie],ie}function X(k){return(k<<1)-(4<k?9:0)}function te(k){for(var ie=k.length;0<=--ie;)k[ie]=0}function D(k){var ie=k.state,ne=ie.pending;ne>k.avail_out&&(ne=k.avail_out),ne!==0&&(o.arraySet(k.output,ie.pending_buf,ie.pending_out,ne,k.next_out),k.next_out+=ne,ie.pending_out+=ne,k.total_out+=ne,k.avail_out-=ne,ie.pending-=ne,ie.pending===0&&(ie.pending_out=0))}function $(k,ie){a._tr_flush_block(k,0<=k.block_start?k.block_start:-1,k.strstart-k.block_start,ie),k.block_start=k.strstart,D(k.strm)}function he(k,ie){k.pending_buf[k.pending++]=ie}function Se(k,ie){k.pending_buf[k.pending++]=ie>>>8&255,k.pending_buf[k.pending++]=255&ie}function fe(k,ie){var ne,Z,J=k.max_chain_length,le=k.strstart,pe=k.prev_length,Te=k.nice_match,we=k.strstart>k.w_size-W?k.strstart-(k.w_size-W):0,Qe=k.window,nt=k.w_mask,Xe=k.prev,ft=k.strstart+H,It=Qe[le+pe-1],gt=Qe[le+pe];k.prev_length>=k.good_match&&(J>>=2),Te>k.lookahead&&(Te=k.lookahead);do if(Qe[(ne=ie)+pe]===gt&&Qe[ne+pe-1]===It&&Qe[ne]===Qe[le]&&Qe[++ne]===Qe[le+1]){le+=2,ne++;do;while(Qe[++le]===Qe[++ne]&&Qe[++le]===Qe[++ne]&&Qe[++le]===Qe[++ne]&&Qe[++le]===Qe[++ne]&&Qe[++le]===Qe[++ne]&&Qe[++le]===Qe[++ne]&&Qe[++le]===Qe[++ne]&&Qe[++le]===Qe[++ne]&&le<ft);if(Z=H-(ft-le),le=ft-H,pe<Z){if(k.match_start=ie,Te<=(pe=Z))break;It=Qe[le+pe-1],gt=Qe[le+pe]}}while((ie=Xe[ie&nt])>we&&--J!=0);return pe<=k.lookahead?pe:k.lookahead}function $e(k){var ie,ne,Z,J,le,pe,Te,we,Qe,nt,Xe=k.w_size;do{if(J=k.window_size-k.lookahead-k.strstart,k.strstart>=Xe+(Xe-W)){for(o.arraySet(k.window,k.window,Xe,Xe,0),k.match_start-=Xe,k.strstart-=Xe,k.block_start-=Xe,ie=ne=k.hash_size;Z=k.head[--ie],k.head[ie]=Xe<=Z?Z-Xe:0,--ne;);for(ie=ne=Xe;Z=k.prev[--ie],k.prev[ie]=Xe<=Z?Z-Xe:0,--ne;);J+=Xe}if(k.strm.avail_in===0)break;if(pe=k.strm,Te=k.window,we=k.strstart+k.lookahead,Qe=J,nt=void 0,nt=pe.avail_in,Qe<nt&&(nt=Qe),ne=nt===0?0:(pe.avail_in-=nt,o.arraySet(Te,pe.input,pe.next_in,nt,we),pe.state.wrap===1?pe.adler=l(pe.adler,Te,nt,we):pe.state.wrap===2&&(pe.adler=c(pe.adler,Te,nt,we)),pe.next_in+=nt,pe.total_in+=nt,nt),k.lookahead+=ne,k.lookahead+k.insert>=F)for(le=k.strstart-k.insert,k.ins_h=k.window[le],k.ins_h=(k.ins_h<<k.hash_shift^k.window[le+1])&k.hash_mask;k.insert&&(k.ins_h=(k.ins_h<<k.hash_shift^k.window[le+F-1])&k.hash_mask,k.prev[le&k.w_mask]=k.head[k.ins_h],k.head[k.ins_h]=le,le++,k.insert--,!(k.lookahead+k.insert<F)););}while(k.lookahead<W&&k.strm.avail_in!==0)}function Ze(k,ie){for(var ne,Z;;){if(k.lookahead<W){if($e(k),k.lookahead<W&&ie===h)return M;if(k.lookahead===0)break}if(ne=0,k.lookahead>
vendor: 36,293 bytes, line 2964
2964=F&&(k.ins_h=(k.ins_h<<k.hash_shift^k.window[k.strstart+F-1])&k.hash_mask,ne=k.prev[k.strstart&k.w_mask]=k.head[k.ins_h],k.head[k.ins_h]=k.strstart),ne!==0&&k.strstart-ne<=k.w_size-W&&(k.match_length=fe(k,ne)),k.match_length>=F)if(Z=a._tr_tally(k,k.strstart-k.match_start,k.match_length-F),k.lookahead-=k.match_length,k.match_length<=k.max_lazy_match&&k.lookahead>=F){for(k.match_length--;k.strstart++,k.ins_h=(k.ins_h<<k.hash_shift^k.window[k.strstart+F-1])&k.hash_mask,ne=k.prev[k.strstart&k.w_mask]=k.head[k.ins_h],k.head[k.ins_h]=k.strstart,--k.match_length!=0;);k.strstart++}else k.strstart+=k.match_length,k.match_length=0,k.ins_h=k.window[k.strstart],k.ins_h=(k.ins_h<<k.hash_shift^k.window[k.strstart+1])&k.hash_mask;else Z=a._tr_tally(k,0,k.window[k.strstart]),k.lookahead--,k.strstart++;if(Z&&($(k,!1),k.strm.avail_out===0))return M}return k.insert=k.strstart<F-1?k.strstart:F-1,ie===d?($(k,!0),k.strm.avail_out===0?j:q):k.last_lit&&($(k,!1),k.strm.avail_out===0)?M:K}function ce(k,ie){for(var ne,Z,J;;){if(k.lookahead<W){if($e(k),k.lookahead<W&&ie===h)return M;if(k.lookahead===0)break}if(ne=0,k.lookahead>=F&&(k.ins_h=(k.ins_h<<k.hash_shift^k.window[k.strstart+F-1])&k.hash_mask,ne=k.prev[k.strstart&k.w_mask]=k.head[k.ins_h],k.head[k.ins_h]=k.strstart),k.prev_length=k.match_length,k.prev_match=k.match_start,k.match_length=F-1,ne!==0&&k.prev_length<k.max_lazy_match&&k.strstart-ne<=k.w_size-W&&(k.match_length=fe(k,ne),k.match_length<=5&&(k.strategy===1||k.match_length===F&&4096<k.strstart-k.match_start)&&(k.match_length=F-1)),k.prev_length>=F&&k.match_length<=k.prev_length){for(J=k.strstart+k.lookahead-F,Z=a._tr_tally(k,k.strstart-1-k.prev_match,k.prev_length-F),k.lookahead-=k.prev_length-1,k.prev_length-=2;++k.strstart<=J&&(k.ins_h=(k.ins_h<<k.hash_shift^k.window[k.strstart+F-1])&k.hash_mask,ne=k.prev[k.strstart&k.w_mask]=k.head[k.ins_h],k.head[k.ins_h]=k.strstart),--k.prev_length!=0;);if(k.match_available=0,k.match_length=F-1,k.strstart++,Z&&($(k,!1),k.strm.avail_out===0))return M}else if(k.match_available){if((Z=a._tr_tally(k,0,k.window[k.strstart-1]))&&$(k,!1),k.strstart++,k.lookahead--,k.strm.avail_out===0)return M}else k.match_available=1,k.strstart++,k.lookahead--}return k.match_available&&(Z=a._tr_tally(k,0,k.window[k.strstart-1]),k.match_available=0),k.insert=k.strstart<F-1?k.strstart:F-1,ie===d?($(k,!0),k.strm.avail_out===0?j:q):k.last_lit&&($(k,!1),k.strm.avail_out===0)?M:K}function me(k,ie,ne,Z,J){this.good_length=k,this.max_lazy=ie,this.nice_length=ne,this.max_chain=Z,this.func=J}function de(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=T,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new o.Buf16(2*N),this.dyn_dtree=new o.Buf16(2*(2*I+1)),this.bl_tree=new o.Buf16(2*(2*O+1)),te(this.dyn_ltree),te(this.dyn_dtree),te(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new o.Buf16(U+1),this.heap=new o.Buf16(2*C+1),te(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new o.Buf16(2*C+1),te(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function ye(k){var ie;return k&&k.state?(k.total_in=k.total_out=0,k.data_type=x,(ie=k.state).pending=0,ie.pending_out=0,ie.wrap<0&&(ie.wrap=-ie.wrap),ie.status=ie.wrap?z:V,k.adler=ie.wrap===2?0:1,ie.last_flush=h,a._tr_init(ie),m):Y(k,y)}function ve(k){var ie=ye(k);return ie===m&&(function(ne){ne.window_size=2*ne.w_size,te(ne.head),ne.max_lazy_match=s[ne.level].max_lazy,ne.good_match=s[ne.level].good_length,ne.nice_match=s[ne.level].nice_length,ne.max_chain_length=s[ne.level].max_chain,ne.strstart=0,ne.block_start=0,ne.lookahead=0,ne.insert=0,ne.match_length=ne.prev_length=F-1,ne.match_available=0,ne.ins_h=0})(k.state),ie}function ue(k,ie,ne,Z,J,le){if(!k)return y;var pe=1;if(ie===v&&(ie=6),Z<0?(pe=0,Z=-Z):15<Z&&(pe=2,Z-=16),J<1||E<J||ne!==T||Z<8||15<Z||ie<0||9<ie||le<0||b<le)return Y(k,y);Z===8&&(Z=9);var Te=new de;return(k.state=Te).strm=k,Te.wrap=pe,Te.gzhead=null,Te.w_bits=Z,Te.w_size=1<<Te.w_bits,Te.w_mask=Te.w_size-1,Te.hash_bits=J+7,Te.hash_size=1<<Te.hash_bits,Te.hash_mask=Te.hash_size-1,Te.hash_shift=~~((Te.hash_bits+F-1)/F),Te.window=new o.Buf8(2*Te.w_size),Te.head=new o.Buf16(Te.hash_size),Te.prev=new o.Buf16(Te.w_size),Te.lit_bufsize=1<<J+6,Te.pending_buf_size=4*Te.lit_bufsize,Te.pending_buf=new o.Buf8(Te.pending_buf_size),Te.d_buf=1*Te.lit_bufsize,Te.l_buf=3*Te.lit_bufsize,Te.level=ie,Te.strategy=le,Te.method=ne,ve(k)}s=[new me(0,0,0,0,function(k,ie){var ne=65535;for(ne>k.pending_buf_size-5&&(ne=k.pending_buf_size-5);;){if(k.lookahead<=1){if($e(k),k.lookahead===0&&ie===h)return M;if(k.lookahead===0)break}k.strstart+=k.lookahead,k.lookahead=0;var Z=k.block_start+ne;if((k.strstart===0||k.strstart>=Z)&&(k.lookahead=k.strstart-Z,k.strstart=Z,$(k,!1),k.strm.avail_out===0)||k.strstart-k.block_start>=k.w_size-W&&($(k,!1),k.strm.avail_out===0))return M}return k.insert=0,ie===d?($(k,!0),k.strm.avail_out===0?j:q):(k.strstart>k.block_start&&($(k,!1),k.strm.avail_out),M)}),new me(4,4,8,4,Ze),new me(4,5,16,8,Ze),new me(4,6,32,32,Ze),new me(4,4,16,16,ce),new me(8,16,32,32,ce),new me(8,16,128,128,ce),new me(8,32,128,256,ce),new me(32,128,258,1024,ce),new me(32,258,258,4096,ce)],i.deflateInit=function(k,ie){return ue(k,ie,T,15,8,0)},i.deflateInit2=ue,i.deflateReset=ve,i.deflateResetKeep=ye,i.deflateSetHeader=function(k,ie){return k&&k.state?k.state.wrap!==2?y:(k.state.gzhead=ie,m):y},i.deflate=function(k,ie){var ne,Z,J,le;if(!k||!k.state||5<ie||ie<0)return k?Y(k,y):y;if(Z=k.state,!k.output||!k.input&&k.avail_in!==0||Z.status===666&&ie!==d)return Y(k,k.avail_out===0?-5:y);if(Z.strm=k,ne=Z.last_flush,Z.last_flush=ie,Z.status===z)if(Z.wrap===2)k.adler=0,he(Z,31),he(Z,139),he(Z,8),Z.gzhead?(he(Z,(Z.gzhead.text?1:0)+(Z.gzhead.hcrc?2:0)+(Z.gzhead.extra?4:0)+(Z.gzhead.name?8:0)+(Z.gzhead.comment?16:0)),he(Z,255&Z.gzhead.time),he(Z,Z.gzhead.time>>8&255),he(Z,Z.gzhead.time>>16&255),he(Z,Z.gzhead.time>>24&255),he(Z,Z.level===9?2:2<=Z.strategy||Z.level<2?4:0),he(Z,255&Z.gzhead.os),Z.gzhead.extra&&Z.gzhead.extra.length&&(he(Z,255&Z.gzhead.extra.length),he(Z,Z.gzhead.extra.length>>8&255)),Z.gzhead.hcrc&&(k.adler=c(k.adler,Z.pending_buf,Z.pending,0)),Z.gzindex=0,Z.status=69):(he(Z,0),he(Z,0),he(Z,0),he(Z,0),he(Z,0),he(Z,Z.level===9?2:2<=Z.strategy||Z.level<2?4:0),he(Z,3),Z.status=V);else{var pe=T+(Z.w_bits-8<<4)<<8;pe|=(2<=Z.strategy||Z.level<2?0:Z.level<6?1:Z.level===6?2:3)<<6,Z.strstart!==0&&(pe|=32),pe+=31-pe%31,Z.status=V,Se(Z,pe),Z.strstart!==0&&(Se(Z,k.adler>>>16),Se(Z,65535&k.adler)),k.adler=1}if(Z.status===69)if(Z.gzhead.extra){for(J=Z.pending;Z.gzindex<(65535&Z.gzhead.extra.length)&&(Z.pending!==Z.pending_buf_size||(Z.gzhead.hcrc&&Z.pending>J&&(k.adler=c(k.adler,Z.pending_buf,Z.pending-J,J)),D(k),J=Z.pending,Z.pending!==Z.pending_buf_size));)he(Z,255&Z.gzhead.extra[Z.gzindex]),Z.gzindex++;Z.gzhead.hcrc&&Z.pending>J&&(k.adler=c(k.adler,Z.pending_buf,Z.pending-J,J)),Z.gzindex===Z.gzhead.extra.length&&(Z.gzindex=0,Z.status=73)}else Z.status=73;if(Z.status===73)if(Z.gzhead.name){J=Z.pending;do{if(Z.pending===Z.pending_buf_size&&(Z.gzhead.hcrc&&Z.pending>J&&(k.adler=c(k.adler,Z.pending_buf,Z.pending-J,J)),D(k),J=Z.pending,Z.pending===Z.pending_buf_size)){le=1;break}le=Z.gzindex<Z.gzhead.name.length?255&Z.gzhead.name.charCodeAt(Z.gzindex++):0,he(Z,le)}while(le!==0);Z.gzhead.hcrc&&Z.pending>J&&(k.adler=c(k.adler,Z.pending_buf,Z.pending-J,J)),le===0&&(Z.gzindex=0,Z.status=91)}else Z.status=91;if(Z.status===91)if(Z.gzhead.comment){J=Z.pending;do{if(Z.pending===Z.pending_buf_size&&(Z.gzhead.hcrc&&Z.pending>J&&(k.adler=c(k.adler,Z.pending_buf,Z.pending-J,J)),D(k),J=Z.pending,Z.pending===Z.pending_buf_size)){le=1;break}le=Z.gzindex<Z.gzhead.comment.length?255&Z.gzhead.comment.charCodeAt(Z.gzindex++):0,he(Z,le)}while(le!==0);Z.gzhead.hcrc&&Z.pending>J&&(k.adler=c(k.adler,Z.pending_buf,Z.pending-J,J)),le===0&&(Z.status=103)}else Z.status=103;if(Z.status===103&&(Z.gzhead.hcrc?(Z.pending+2>Z.pending_buf_size&&D(k),Z.pending+2<=Z.pending_buf_size&&(he(Z,255&k.adler),he(Z,k.adler>>8&255),k.adler=0,Z.status=V)):Z.status=V),Z.pending!==0){if(D(k),k.avail_out===0)return Z.last_flush=-1,m}else if(k.avail_in===0&&X(ie)<=X(ne)&&ie!==d)return Y(k,-5);if(Z.status===666&&k.avail_in!==0)return Y(k,-5);if(k.avail_in!==0||Z.lookahead!==0||ie!==h&&Z.status!==666){var Te=Z.strategy===2?(function(we,Qe){for(var nt;;){if(we.lookahead===0&&($e(we),we.lookahead===0)){if(Qe===h)return M;break}if(we.match_length=0,nt=a._tr_tally(we,0,we.window[we.strstart]),we.lookahead--,we.strstart++,nt&&($(we,!1),we.strm.avail_out===0))return M}return we.insert=0,Qe===d?($(we,!0),we.strm.avail_out===0?j:q):we.last_lit&&($(we,!1),we.strm.avail_out===0)?M:K})(Z,ie):Z.strategy===3?(function(we,Qe){for(var nt,Xe,ft,It,gt=we.window;;){if(we.lookahead<=H){if($e(we),we.lookahead<=H&&Qe===h)return M;if(we.lookahead===0)break}if(we.match_length=0,we.lookahead>=F&&0<we.strstart&&(Xe=gt[ft=we.strstart-1])===gt[++ft]&&Xe===gt[++ft]&&Xe===gt[++ft]){It=we.strstart+H;do;while(Xe===gt[++ft]&&Xe===gt[++ft]&&Xe===gt[++ft]&&Xe===gt[++ft]&&Xe===gt[++ft]&&Xe===gt[++ft]&&Xe===gt[++ft]&&Xe===gt[++ft]&&ft<It);we.match_length=H-(It-ft),we.match_length>we.lookahead&&(we.match_length=we.lookahead)}if(we.match_length>=F?(nt=a._tr_tally(we,1,we.match_length-F),we.lookahead-=we.match_length,we.strstart+=we.match_length,we.match_length=0):(nt=a._tr_tally(we,0,we.window[we.strstart]),we.lookahead--,we.strstart++),nt&&($(we,!1),we.strm.avail_out===0))return M}return we.insert=0,Qe===d?($(we,!0),we.strm.avail_out===0?j:q):we.last_lit&&($(we,!1),we.strm.avail_out===0)?M:K})(Z,ie):s[Z.level].func(Z,ie);if(Te!==j&&Te!==q||(Z.status=666),Te===M||Te===j)return k.avail_out===0&&(Z.last_flush=-1),m;if(Te===K&&(ie===1?a._tr_align(Z):ie!==5&&(a._tr_stored_block(Z,0,0,!1),ie===3&&(te(Z.head),Z.lookahead===0&&(Z.strstart=0,Z.block_start=0,Z.insert=0))),D(k),k.avail_out===0))return Z.last_flush=-1,m}return ie!==d?m:Z.wrap<=0?1:(Z.wrap===2?(he(Z,255&k.adler),he(Z,k.adler>>8&255),he(Z,k.adler>>16&255),he(Z,k.adler>>24&255),he(Z,255&k.total_in),he(Z,k.total_in>>8&255),he(Z,k.total_in>>16&255),he(Z,k.total_in>>24&255)):(Se(Z,k.adler>>>16),Se(Z,65535&k.adler)),D(k),0<Z.wrap&&(Z.wrap=-Z.wrap),Z.pending!==0?m:1)},i.deflateEnd=function(k){var ie;return k&&k.state?(ie=k.state.status)!==z&&ie!==69&&ie!==73&&ie!==91&&ie!==103&&ie!==V&&ie!==666?Y(k,y):(k.state=null,ie===V?Y(k,-3):m):y},i.deflateSetDictionary=function(k,ie){var ne,Z,J,le,pe,Te,we,Qe,nt=ie.length;if(!k||!k.state||(le=(ne=k.state).wrap)===2||le===1&&ne.status!==z||ne.lookahead)return y;for(le===1&&(k.adler=l(k.adler,ie,nt,0)),ne.wrap=0,nt>=ne.w_size&&(le===0&&(te(ne.head),ne.strstart=0,ne.block_start=0,ne.insert=0),Qe=new o.Buf8(ne.w_size),o.arraySet(Qe,ie,nt-ne.w_size,ne.w_size,0),ie=Qe,nt=ne.w_size),pe=k.avail_in,Te=k.next_in,we=k.input,k.avail_in=nt,k.next_in=0,k.input=ie,$e(ne);ne.lookahead>=F;){for(Z=ne.strstart,J=ne.lookahead-(F-1);ne.ins_h=(ne.ins_h<<ne.hash_shift^ne.window[Z+F-1])&ne.hash_mask,ne.prev[Z&ne.w_mask]=ne.head[ne.ins_h],ne.head[ne.ins_h]=Z,Z++,--J;);ne.strstart=Z,ne.lookahead=F-1,$e(ne)}return ne.strstart+=ne.lookahead,ne.block_start=ne.strstart,ne.insert=ne.lookahead,ne.lookahead=0,ne.match_length=ne.prev_length=F-1,ne.match_available=0,k.next_in=Te,k.input=we,k.avail_in=pe,ne.wrap=le,m},i.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(n,r,i){r.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(n,r,i){r.exports=function(s,o){var a,l,c,u,h,d,m,y,v,b,x,T,E,C,I,O,N,U,F,H,W,z,V,M,K;a=s.state,l=s.next_in,M=s.input,c=l+(s.avail_in-5),u=s.next_out,K=s.output,h=u-(o-s.avail_out),d=u+(s.avail_out-257),m=a.dmax,y=a.wsize,v=a.whave,b=a.wnext,x=a.window,T=a.hold,E=a.bits,C=a.lencode,I=a.distcode,O=(1<<a.lenbits)-1,N=(1<<a.distbits)-1;e:do{E<15&&(T+=M[l++]<<E,E+=8,T+=M[l++]<<E,E+=8),U=C[T&O];t:for(;;){if(T>>>=F=U>>>24,E-=F,(F=U>>>16&255)===0)K[u++]=65535&U;else{if(!(16&F)){if((64&F)==0){U=C[(65535&U)+(T&(1<<F)-1)];continue t}if(32&F){a.mode=12;break e}s.msg="invalid literal/length code",a.mode=30;break e}H=65535&U,(F&=15)&&(E<F&&(T+=M[l++]<<E,E+=8),H+=T&(1<<F)-1,T>>>=F,E-=F),E<15&&(T+=M[l++]<<E,E+=8,T+=M[l++]<<E,E+=8),U=I[T&N];n:for(;;){if(T>>>=F=U>>>24,E-=F,!(16&(F=U>>>16&255))){if((64&F)==0){U=I[(65535&U)+(T&(1<<F)-1)];continue n}s.msg="invalid distance code",a.mode=30;break e}if(W=65535&U,E<(F&=15)&&(T+=M[l++]<<E,(E+=8)<F&&(T+=M[l++]<<E,E+=8)),m<(W+=T&(1<<F)-1)){s.msg="invalid distance too far back",a.mode=30;break e}if(T>>>=F,E-=F,(F=u-h)<W){if(v<(F=W-F)&&a.sane){s.msg="invalid distance too far back",a.mode=30;break e}if(V=x,(z=0)===b){if(z+=y-F,F<H){for(H-=F;K[u++]=x[z++],--F;);z=u-W,V=K}}else if(b<F){if(z+=y+b-F,(F-=b)<H){for(H-=F;K[u++]=x[z++],--F;);if(z=0,b<H){for(H-=F=b;K[u++]=x[z++],--F;);z=u-W,V=K}}}else if(z+=b-F,F<H){for(H-=F;K[u++]=x[z++],--F;);z=u-W,V=K}for(;2<H;)K[u++]=V[z++],K[u++]=V[z++],K[u++]=V[z++],H-=3;H&&(K[u++]=V[z++],1<H&&(K[u++]=V[z++]))}else{for(z=u-W;K[u++]=K[z++],K[u++]=K[z++],K[u++]=K[z++],2<(H-=3););H&&(K[u++]=K[z++],1<H&&(K[u++]=K[z++]))}break}}break}}while(l<c&&u<d);l-=H=E>>3,T&=(1<<(E-=H<<3))-1,s.next_in=l,s.next_out=u,s.avail_in=l<c?c-l+5:5-(l-c),s.avail_out=u<d?d-u+257:257-(u-d),a.hold=T,a.bits=E}},{}],49:[function(n,r,i){var s=n("../utils/common"),o=n("./adler32"),a=n("./crc32"),l=n("./inffast"),c=n("./inftrees"),u=1,h=2,d=0,m=-2,y=1,v=852,b=592;function x(z){return(z>>>24&255)+(z>>>8&65280)+((65280&z)<<8)+((255&z)<<24)}function T(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new s.Buf16(320),this.work=new s.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function E(z){var V;return z&&z.state?(V=z.state,z.total_in=z.total_out=V.total=0,z.msg="",V.wrap&&(z.adler=1&V.wrap),V.mode=y,V.last=0,V.havedict=0,V.dmax=32768,V.head=null,V.hold=0,V.bits=0,V.lencode=V.lendyn=new s.Buf32(v),V.distcode=V.distdyn=new s.Buf32(b),V.sane=1,V.back=-1,d):m}function C(z){var V;return z&&z.state?((V=z.state).wsize=0,V.whave=0,V.wnext=0,E(z)):m}function I(z,V){var M,K;return z&&z.state?(K=z.state,V<0?(M=0,V=-V):(M=1+(V>>4),V<48&&(V&=15)),V&&(V<8||15<V)?m:(K.window!==null&&K.wbits!==V&&(K.window=null),K.wrap=M,K.wbits=V,C(z))):m}function O(z,V){var M,K;return z?(K=new T,(z.state=K).window=null,(M=I(z,V))!==d&&(z.state=null),M):m}var N,U,F=!0;function H(z){if(F){var V;for(N=new s.Buf32(512),U=new s.Buf32(32),V=0;V<144;)z.lens[V++]=8;for(;V<256;)z.lens[V++]=9;for(;V<280;)z.lens[V++]=7;for(;V<288;)z.lens[V++]=8;for(c(u,z.lens,0,288,N,0,z.work,{bits:9}),V=0;V<32;)z.lens[V++]=5;c(h,z.lens,0,32,U,0,z.work,{bits:5}),F=!1}z.lencode=N,z.lenbits=9,z.distcode=U,z.distbits=5}function W(z,V,M,K){var j,q=z.state;return q.window===null&&(q.wsize=1<<q.wbits,q.wnext=0,q.whave=0,q.window=new s.Buf8(q.wsize)),K>=q.wsize?(s.arraySet(q.window,V,M-q.wsize,q.wsize,0),q.wnext=0,q.whave=q.wsize):(K<(j=q.wsize-q.wnext)&&(j=K),s.arraySet(q.window,V,M-K,j,q.wnext),(K-=j)?(s.arraySet(q.window,V,M-K,K,0),q.wnext=K,q.whave=q.wsize):(q.wnext+=j,q.wnext===q.wsize&&(q.wnext=0),q.whave<q.wsize&&(q.whave+=j))),0}i.inflateReset=C,i.inflateReset2=I,i.inflateResetKeep=E,i.inflateInit=function(z){return O(z,15)},i.inflateInit2=O,i.inflate=function(z,V){var M,K,j,q,Y,X,te,D,$,he,Se,fe,$e,Ze,ce,me,de,ye,ve,ue,k,ie,ne,Z,J=0,le=new s.Buf8(4),pe=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!z||!z.state||!z.output||!z.input&&z.avail_in!==0)return m;(M=z.state).mode===12&&(M.mode=13),Y=z.next_out,j=z.output,te=z.avail_out,q=z.next_in,K=z.input,X=z.avail_in,D=M.hold,$=M.bits,he=X,Se=te,ie=d;e:for(;;)switch(M.mode){case y:if(M.wrap===0){M.mode=13;break}for(;$<16;){if(X===0)break e;X--,D+=K[q++]<<$,$+=8}if(2&M.wrap&&D===35615){le[M.check=0]=255&D,le[1]=D>>>8&255,M.check=a(M.check,le,2,0),$=D=0,M.mode=2;break}if(M.flags=0,M.head&&(M.head.done=!1),!(1&M.wrap)||(((255&D)<<8)+(D>>8))%31){z.msg="incorrect header check",M.mode=30;break}if((15&D)!=8){z.msg="unknown compression method",M.mode=30;break}if($-=4,k=8+(15&(D>>>=4)),M.wbits===0)M.wbits=k;else if(k>M.wbits){z.msg="invalid window size",M.mode=30;break}M.dmax=1<<k,z.adler=M.check=1,M.mode=512&D?10:12,$=D=0;break;case 2:for(;$<16;){if(X===0)break e;X--,D+=K[q++]<<$,$+=8}if(M.flags=D,(255&M.flags)!=8){z.msg="unknown compression method",M.mode=30;break}if(57344&M.flags){z.msg="unknown header flags set",M.mode=30;break}M.head&&(M.head.text=D>>8&1),512&M.flags&&(le[0]=255&D,le[1]=D>>>8&255,M.check=a(M.check,le,2,0)),$=D=0,M.mode=3;case 3:for(;$<32;){if(X===0)break e;X--,D+=K[q++]<<$,$+=8}M.head&&(M.head.time=D),512&M.flags&&(le[0]=255&D,le[1]=D>>>8&255,le[2]=D>>>16&255,le[3]=D>>>24&255,M.check=a(M.check,le,4,0)),$=D=0,M.mode=4;case 4:for(;$<16;){if(X===0)break e;X--,D+=K[q++]<<$,$+=8}M.head&&(M.head.xflags=255&D,M.head.os=D>>8),512&M.flags&&(le[0]=255&D,le[1]=D>>>8&255,M.check=a(M.check,le,2,0)),$=D=0,M.mode=5;case 5:if(1024&M.flags){for(;$<16;){if(X===0)break e;X--,D+=K[q++]<<$,$+=8}M.length=D,M.head&&(M.head.extra_len=D),512&M.flags&&(le[0]=255&D,le[1]=D>>>8&255,M.check=a(M.check,le,2,0)),$=D=0}else M.head&&(M.head.extra=null);M.mode=6;case 6:if(1024&M.flags&&(X<(fe=M.length)&&(fe=X),fe&&(M.head&&(k=M.head.extra_len-M.length,M.head.extra||(M.head.extra=new Array(M.head.extra_len)),s.arraySet(M.head.extra,K,q,fe,k)),512&M.flags&&(M.check=a(M.check,K,fe,q)),X-=fe,q+=fe,M.length-=fe),M.length))break e;M.length=0,M.mode=7;case 7:if(2048&M.flags){if(X===0)break e;for(fe=0;k=K[q+fe++],M.head&&k&&M.length<65536&&(M.head.name+=String.fromCharCode(k)),k&&fe<X;);if(512&M.flags&&(M.check=a(M.check,K,fe,q)),X-=fe,q+=fe,k)break e}else M.head&&(M.head.name=null);M.length=0,M.mode=8;case 8:if(4096&M.flags){if(X===0)break e;for(fe=0;k=K[q+fe++],M.head&&k&&M.length<65536&&(M.head.comment+=String.fromCharCode(k)),k&&fe<X;);if(512&M.flags&&(M.check=a(M.check,K,fe,q)),X-=fe,q+=fe,k)break e}else M.head&&(M.head.comment=null);M.mode=9;case 9:if(512&M.flags){for(;$<16;){if(X===0)break e;X--,D+=K[q++]<<$,$+=8}if(D!==(65535&M.check)){z.msg="header crc mismatch",M.mode=30;break}$=D=0}M.head&&(M.head.hcrc=M.flags>>9&1,M.head.done=!0),z.adler=M.check=0,M.mode=12;break;case 10:for(;$<32;){if(X===0)break e;X--,D+=K[q++]<<$,$+=8}z.adler=M.check=x(D),$=D=0,M.mode=11;case 11:if(M.havedict===0)return z.next_out=Y,z.avail_out=te,z.next_in=q,z.avail_in=X,M.hold=D,M.bits=$,2;z.adler=M.check=1,M.mode=12;case 12:if(V===5||V===6)break e;case 13:if(M.last){D>>>=7&$,$-=7&$,M.mode=27;break}for(;$<3;){if(X===0)break e;X--,D+=K[q++]<<$,$+=8}switch(M.last=1&D,$-=1,3&(D>>>=1)){case 0:M.mode=14;break;case 1:if(H(M),M.mode=20,V!==6)break;D>>>=2,$-=2;break e;case 2:M.mode=17;break;case 3:z.msg="invalid block type",M.mode=30}D>>>=2,$-=2;break;case 14:for(D>>>=7&$,$-=7&$;$<32;){if(X===0)break e;X--,D+=K[q++]<<$,$+=8}if((65535&D)!=(D>>>16^65535)){z.msg="invalid stored block lengths",M.mode=30;break}if(M.length=65535&D,$=D=0,M.mode=15,V===6)break e;case 15:M.mode=16;case 16:if(fe=M.length){if(X<fe&&(fe=X),te<fe&&(fe=te),fe===0)break e;s.arraySet(j,K,q,fe,Y),X-=fe,q+=fe,te-=fe,Y+=fe,M.length-=fe;break}M.mode=12;break;case 17:for(;$<14;){if(X===0)break e;X--,D+=K[q++]<<$,$+=8}if(M.nlen=257+(31&D),D>>>=5,$-=5,M.ndist=1+(31&D),D>>>=5,$-=5,M.ncode=4+(15&D),D>>>=4,$-=4,286<M.nlen||30<M.ndist){z.msg="too many length or distance symbols",M.mode=30;break}M.have=0,M.mode=18;case 18:for(;M.have<M.ncode;){for(;$<3;){if(X===0)break e;X--,D+=K[q++]<<$,$+=8}M.lens[pe[M.have++]]=7&D,D>>>=3,$-=3}for(;M.have<19;)M.lens[pe[M.have++]]=0;if(M.lencode=M.lendyn,M.lenbits=7,ne={bits:M.lenbits},ie=c(0,M.lens,0,19,M.lencode,0,M.work,ne),M.lenbits=ne.bits,ie){z.msg="invalid code lengths set",M.mode=30;break}M.have=0,M.mode=19;case 19:for(;M.have<M.nlen+M.ndist;){for(;me=(J=M.lencode[D&(1<<M.lenbits)-1])>>>16&255,de=65535&J,!((ce=J>>>24)<=$);){if(X===0)break e;X--,D+=K[q++]<<$,$+=8}if(de<16)D>>>=ce,$-=ce,M.lens[M.have++]=de;else{if(de===16){for(Z=ce+2;$<Z;){if(X===0)break e;X--,D+=K[q++]<<$,$+=8}if(D>>>=ce,$-=ce,M.have===0){z.msg="invalid bit length repeat",M.mode=30;break}k=M.lens[M.have-1],fe=3+(3&D),D>>>=2,$-=2}else if(de===17){for(Z=ce+3;$<Z;){if(X===0)break e;X--,D+=K[q++]<<$,$+=8}$-=ce,k=0,fe=3+(7&(D>>>=ce)),D>>>=3,$-=3}else{for(Z=ce+7;$<Z;){if(X===0)break e;X--,D+=K[q++]<<$,$+=8}$-=ce,k=0,fe=11+(127&(D>>>=ce)),D>>>=7,$-=7}if(M.have+fe>M.nlen+M.ndist){z.msg="invalid bit length repeat",M.mode=30;break}for(;fe--;)M.lens[M.have++]=k}}if(M.mode===30)break;if(M.lens[256]===0){z.msg="invalid code -- missing end-of-block",M.mode=30;break}if(M.lenbits=9,ne={bits:M.lenbits},ie=c(u,M.lens,0,M.nlen,M.lencode,0,M.work,ne),M.lenbits=ne.bits,ie){z.msg="invalid literal/lengths set",M.mode=30;break}if(M.distbits=6,M.distcode=M.distdyn,ne={bits:M.distbits},ie=c(h,M.lens,M.nlen,M.ndist,M.distcode,0,M.work,ne),M.distbits=ne.bits,ie){z.msg="invalid distances set",M.mode=30;break}if(M.mode=20,V===6)break e;case 20:M.mode=21;case 21:if(6<=X&&258<=te){z.next_out=Y,z.avail_out=te,z.next_in=q,z.avail_in=X,M.hold=D,M.bits=$,l(z,Se),Y=z.next_out,j=z.output,te=z.avail_out,q=z.next_in,K=z.input,X=z.avail_in,D=M.hold,$=M.bits,M.mode===12&&(M.back=-1);break}for(M.back=0;me=(J=M.lencode[D&(1<<M.lenbits)-1])>>>16&255,de=65535&J,!((ce=J>>>24)<=$);){if(X===0)break e;X--,D+=K[q++]<<$,$+=8}if(me&&(240&me)==0){for(ye=ce,ve=me,ue=de;me=(J=M.lencode[ue+((D&(1<<ye+ve)-1)>>ye)])>>>16&255,de=65535&J,!(ye+(ce=J>>>24)<=$);){if(X===0)break e;X--,D+=K[q++]<<$,$+=8}D>>>=ye,$-=ye,M.back+=ye}if(D>>>=ce,$-=ce,M.back+=ce,M.length=de,me===0){M.mode=26;break}if(32&me){M.back=-1,M.mode=12;break}if(64&me){z.msg="invalid literal/length code",M.mode=30;break}M.extra=15&me,M.mode=22;case 22:if(M.extra){for(Z=M.extra;$<Z;){if(X===0)break e;X--,D+=K[q++]<<$,$+=8}M.length+=D&(1<<M.extra)-1,D>>>=M.extra,$-=M.extra,M.back+=M.extra}M.was=M.length,M.mode=23;case 23:for(;me=(J=M.distcode[D&(1<<M.distbits)-1])>>>16&255,de=65535&J,!((ce=J>>>24)<=$);){if(X===0)break e;X--,D+=K[q++]<<$,$+=8}if((240&me)==0){for(ye=ce,ve=me,ue=de;me=(J=M.distcode[ue+((D&(1<<ye+ve)-1)>>ye)])>>>16&255,de=65535&J,!(ye+(ce=J>>>24)<=$);){if(X===0)break e;X--,D+=K[q++]<<$,$+=8}D>>>=ye,$-=ye,M.back+=ye}if(D>>>=ce,$-=ce,M.back+=ce,64&me){z.msg="invalid distance code",M.mode=30;break}M.offset=de,M.extra=15&me,M.mode=24;case 24:if(M.extra){for(Z=M.extra;$<Z;){if(X===0)break e;X--,D+=K[q++]<<$,$+=8}M.offset+=D&(1<<M.extra)-1,D>>>=M.extra,$-=M.extra,M.back+=M.extra}if(M.offset>M.dmax){z.msg="invalid distance too far back",M.mode=30;break}M.mode=25;case 25:if(te===0)break e;if(fe=Se-te,M.offset>fe){if((fe=M.offset-fe)>M.whave&&M.sane){z.msg="invalid distance too far back",M.mode=30;break}$e=fe>M.wnext?(fe-=M.wnext,M.wsize-fe):M.wnext-fe,fe>M.length&&(fe=M.length),Ze=M.window}else Ze=j,$e=Y-M.offset,fe=M.length;for(te<fe&&(fe=te),te-=fe,M.length-=fe;j[Y++]=Ze[$e++],--fe;);M.length===0&&(M.mode=21);break;case 26:if(te===0)break e;j[Y++]=M.length,te--,M.mode=21;break;case 27:if(M.wrap){for(;$<32;){if(X===0)break e;X--,D|=K[q++]<<$,$+=8}if(Se-=te,z.total_out+=Se,M.total+=Se,Se&&(z.adler=M.check=M.flags?a(M.check,j,Se,Y-Se):o(M.check,j,Se,Y-Se)),Se=te,(M.flags?D:x(D))!==M.check){z.msg="incorrect data check",M.mode=30;break}$=D=0}M.mode=28;case 28:if(M.wrap&&M.flags){for(;$<32;){if(X===0)break e;X--,D+=K[q++]<<$,$+=8}if(D!==(4294967295&M.total)){z.msg="incorrect length check",M.mode=30;break}$=D=0}M.mode=29;case 29:ie=1;break e;case 30:ie=-3;break e;case 31:return-4;case 32:default:return m}return z.next_out=Y,z.avail_out=te,z.next_in=q,z.avail_in=X,M.hold=D,M.bits=$,(M.wsize||Se!==z.avail_out&&M.mode<30&&(M.mode<27||V!==4))&&W(z,z.output,z.next_out,Se-z.avail_out)?(M.mode=31,-4):(he-=z.avail_in,Se-=z.avail_out,z.total_in+=he,z.total_out+=Se,M.total+=Se,M.wrap&&Se&&(z.adler=M.check=M.flags?a(M.check,j,Se,z.next_out-Se):o(M.check,j,Se,z.next_out-Se)),z.data_type=M.bits+(M.last?64:0)+(M.mode===12?128:0)+(M.mode===20||M.mode===15?256:0),(he==0&&Se===0||V===4)&&ie===d&&(ie=-5),ie)},i.inflateEnd=function(z){if(!z||!z.state)return m;var V=z.state;return V.window&&(V.window=null),z.state=null,d},i.inflateGetHeader=function(z,V){var M;return z&&z.state?(2&(M=z.state).wrap)==0?m:((M.head=V).done=!1,d):m},i.inflateSetDictionary=function(z,V){var M,K=V.length;return z&&z.state?(M=z.state).wrap!==0&&M.mode!==11?m:M.mode===11&&o(1,V,K,0)!==M.check?-3:W(z,V,K,K)?(M.mode=31,-4):(M.havedict=1,d):m},i.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(n,r,i){var s=n("../utils/common"),o=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],a=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],l=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],c=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];r.exports=function(u,h,d,m,y,v,b,x){var T,E,C,I,O,N,U,F,H,W=x.bits,z=0,V=0,M=0,K=0,j=0,q=0,Y=0,X=0,te=0,D=0,$=null,he=0,Se=new s.Buf16(16),fe=new s.Buf16(16),$e=null,Ze=0;for(z=0;z<=15;z++)Se[z]=0;for(V=0;V<m;V++)Se[h[d+V]]++;for(j=W,K=15;1<=K&&Se[K]===0;K--);if(K<j&&(j=K),K===0)return y[v++]=20971520,y[v++]=20971520,x.bits=1,0;for(M=1;M<K&&Se[M]===0;M++);for(j<M&&(j=M),z=X=1;z<=15;z++)if(X<<=1,(X-=Se[z])<0)return-1;if(0<X&&(u===0||K!==1))return-1;for(fe[1]=0,z=1;z<15;z++)fe[z+1]=fe[z]+Se[z];for(V=0;V<m;V++)h[d+V]!==0&&(b[fe[h[d+V]]++]=V);if(N=u===0?($=$e=b,19):u===1?($=o,he-=257,$e=a,Ze-=257,256):($=l,$e=c,-1),z=M,O=v,Y=V=D=0,C=-1,I=(te=1<<(q=j))-1,u===1&&852<te||u===2&&592<te)return 1;for(;;){for(U=z-Y,H=b[V]<N?(F=0,b[V]):b[V]>N?(F=$e[Ze+b[V]],$[he+b[V]]):(F=96,0),T=1<<z-Y,M=E=1<<q;y[O+(D>>Y)+(E-=T)]=U<<24|F<<16|H|0,E!==0;);for(T=1<<z-1;D&T;)T>>=1;if(T!==0?(D&=T-1,D+=T):D=0,V++,--Se[z]==0){if(z===K)break;z=h[d+b[V]]}if(j<z&&(D&I)!==C){for(Y===0&&(Y=j),O+=M,X=1<<(q=z-Y);q+Y<K&&!((X-=Se[q+Y])<=0);)q++,X<<=1;if(te+=1<<q,u===1&&852<te||u===2&&592<te)return 1;y[C=D&I]=j<<24|q<<16|O-v|0}}return D!==0&&(y[O+D]=z-Y<<24|64<<16|0),x.bits=j,0}},{"../utils/common":41}],51:[function(n,r,i){r.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(n,r,i){var s=n("../utils/common"),o=0,a=1;function l(J){for(var le=J.length;0<=--le;)J[le]=0}var c=0,u=29,h=256,d=h+1+u,m=30,y=19,v=2*d+1,b=15,x=16,T=7,E=256,C=16,I=17,O=18,N=[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],U=[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],F=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],H=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],W=new Array(2*(d+2));l(W);var z=new Array(2*m);l(z);var V=new Array(512);l(V);var M=new Array(256);l(M);var K=new Array(u);l(K);var j,q,Y,X=new Array(m);function te(J,le,pe,Te,we){this.static_tree=J,this.extra_bits=le,this.extra_base=pe,this.elems=Te,this.max_length=we,this.has_stree=J&&J.length}function D(J,le){this.dyn_tree=J,this.max_code=0,this.stat_desc=le}function $(J){return J<256?V[J]:V[256+(J>>>7)]}function he(J,le){J.pending_buf[J.pending++]=255&le,J.pending_buf[J.pending++]=le>>>8&255}function Se(J,le,pe){J.bi_valid>x-pe?(J.bi_buf|=le<<J.bi_valid&65535,he(J,J.bi_buf),J.bi_buf=le>>x-J.bi_valid,J.bi_valid+=pe-x):(J.bi_buf|=le<<J.bi_valid&65535,J.bi_valid+=pe)}function fe(J,le,pe){Se(J,pe[2*le],pe[2*le+1])}function $e(J,le){for(var pe=0;pe|=1&J,J>>>=1,pe<<=1,0<--le;);return pe>>>1}function Ze(J,le,pe){var Te,we,Qe=new Array(b+1),nt=0;for(Te=1;Te<=b;Te++)Qe[Te]=nt=nt+pe[Te-1]<<1;for(we=0;we<=le;we++){var Xe=J[2*we+1];Xe!==0&&(J[2*we]=$e(Qe[Xe]++,Xe))}}function ce(J){var le;for(le=0;le<d;le++)J.dyn_ltree[2*le]=0;for(le=0;le<m;le++)J.dyn_dtree[2*le]=0;for(le=0;le<y;le++)J.bl_tree[2*le]=0;J.dyn_ltree[2*E]=1,J.opt_len=J.static_len=0,J.last_lit=J.matches=0}function me(J){8<J.bi_valid?he(J,J.bi_buf):0<J.bi_valid&&(J.pending_buf[J.pending++]=J.bi_buf),J.bi_buf=0,J.bi_valid=0}function de(J,le,pe,Te){var we=2*le,Qe=2*pe;return J[we]<J[Qe]||J[we]===J[Qe]&&Te[le]<=Te[pe]}function ye(J,le,pe){for(var Te=J.heap[pe],we=pe<<1;we<=J.heap_len&&(we<J.heap_len&&de(le,J.heap[we+1],J.heap[we],J.depth)&&we++,!de(le,Te,J.heap[we],J.depth));)J.heap[pe]=J.heap[we],pe=we,we<<=1;J.heap[pe]=Te}function ve(J,le,pe){var Te,we,Qe,nt,Xe=0;if(J.last_lit!==0)for(;Te=J.pending_buf[J.d_buf+2*Xe]<<8|J.pending_buf[J.d_buf+2*Xe+1],we=J.pending_buf[J.l_buf+Xe],Xe++,Te===0?fe(J,we,le):(fe(J,(Qe=M[we])+h+1,le),(nt=N[Qe])!==0&&Se(J,we-=K[Qe],nt),fe(J,Qe=$(--Te),pe),(nt=U[Qe])!==0&&Se(J,Te-=X[Qe],nt)),Xe<J.last_lit;);fe(J,E,le)}function ue(J,le){var pe,Te,we,Qe=le.dyn_tree,nt=le.stat_desc.static_tree,Xe=le.stat_desc.has_stree,ft=le.stat_desc.elems,It=-1;for(J.heap_len=0,J.heap_max=v,pe=0;pe<ft;pe++)Qe[2*pe]!==0?(J.heap[++J.heap_len]=It=pe,J.depth[pe]=0):Qe[2*pe+1]=0;for(;J.heap_len<2;)Qe[2*(we=J.heap[++J.heap_len]=It<2?++It:0)]=1,J.depth[we]=0,J.opt_len--,Xe&&(J.static_len-=nt[2*we+1]);for(le.max_code=It,pe=J.heap_len>>1;1<=pe;pe--)ye(J,Qe,pe);for(we=ft;pe=J.heap[1],J.heap[1]=J.heap[J.heap_len--],ye(J,Qe,1),Te=J.heap[1],J.heap[--J.heap_max]=pe,J.heap[--J.heap_max]=Te,Qe[2*we]=Qe[2*pe]+Qe[2*Te],J.depth[we]=(J.depth[pe]>=J.depth[Te]?J.depth[pe]:J.depth[Te])+1,Qe[2*pe+1]=Qe[2*Te+1]=we,J.heap[1]=we++,ye(J,Qe,1),2<=J.heap_len;);J.heap[--J.heap_max]=J.heap[1],(function(gt,Yt){var en,_t,Mt,ht,$t,Zn,on=Yt.dyn_tree,Ut=Yt.max_code,Ct=Yt.stat_desc.static_tree,rr=Yt.stat_desc.has_stree,di=Yt.stat_desc.extra_bits,Sr=Yt.stat_desc.extra_base,yr=Yt.stat_desc.max_length,Dn=0;for(ht=0;ht<=b;ht++)gt.bl_count[ht]=0;for(on[2*gt.heap[gt.heap_max]+1]=0,en=gt.heap_max+1;en<v;en++)yr<(ht=on[2*on[2*(_t=gt.heap[en])+1]+1]+1)&&(ht=yr,Dn++),on[2*_t+1]=ht,Ut<_t||(gt.bl_count[ht]++,$t=0,Sr<=_t&&($t=di[_t-Sr]),Zn=on[2*_t],gt.opt_len+=Zn*(ht+$t),rr&&(gt.static_len+=Zn*(Ct[2*_t+1]+$t)));if(Dn!==0){do{for(ht=yr-1;gt.bl_count[ht]===0;)ht--;gt.bl_count[ht]--,gt.bl_count[ht+1]+=2,gt.bl_count[yr]--,Dn-=2}while(0<Dn);for(ht=yr;ht!==0;ht--)for(_t=gt.bl_count[ht];_t!==0;)Ut<(Mt=gt.heap[--en])||(on[2*Mt+1]!==ht&&(gt.opt_len+=(ht-on[2*Mt+1])*on[2*Mt],on[2*Mt+1]=ht),_t--)}})(J,le),Ze(Qe,It,J.bl_count)}function k(J,le,pe){var Te,we,Qe=-1,nt=le[1],Xe=0,ft=7,It=4;for(nt===0&&(ft=138,It=3),le[2*(pe+1)+1]=65535,Te=0;Te<=pe;Te++)we=nt,nt=le[2*(Te+1)+1],++Xe<ft&&we===nt||(Xe<It?J.bl_tree[2*we]+=Xe:we!==0?(we!==Qe&&J.bl_tree[2*we]++,J.bl_tree[2*C]++):Xe<=10?J.bl_tree[2*I]++:J.bl_tree[2*O]++,Qe=we,It=(Xe=0)===nt?(ft=138,3):we===nt?(ft=6,3):(ft=7,4))}function ie(J,le,pe){var Te,we,Qe=-1,nt=le[1],Xe=0,ft=7,It=4;for(nt===0&&(ft=138,It=3),Te=0;Te<=pe;Te++)if(we=nt,nt=le[2*(Te+1)+1],!(++Xe<ft&&we===nt)){if(Xe<It)for(;fe(J,we,J.bl_tree),--Xe!=0;);else we!==0?(we!==Qe&&(fe(J,we,J.bl_tree),Xe--),fe(J,C,J.bl_tree),Se(J,Xe-3,2)):Xe<=10?(fe(J,I,J.bl_tree),Se(J,Xe-3,3)):(fe(J,O,J.bl_tree),Se(J,Xe-11,7));Qe=we,It=(Xe=0)===nt?(ft=138,3):we===nt?(ft=6,3):(ft=7,4)}}l(X);var ne=!1;function Z(J,le,pe,Te){Se(J,(c<<1)+(Te?1:0),3),(function(we,Qe,nt,Xe){me(we),he(we,nt),he(we,~nt),s.arraySet(we.pending_buf,we.window,Qe,nt,we.pending),we.pending+=nt})(J,le,pe)}i._tr_init=function(J){ne||((function(){var le,pe,Te,we,Qe,nt=new Array(b+1);for(we=Te=0;we<u-1;we++)for(K[we]=Te,le=0;le<1<<N[we];le++)M[Te++]=we;for(M[Te-1]=we,we=Qe=0;we<16;we++)for(X[we]=Qe,le=0;le<1<<U[we];le++)V[Qe++]=we;for(Qe>>=7;we<m;we++)for(X[we]=Qe<<7,le=0;le<1<<U[we]-7;le++)V[256+Qe++]=we;for(pe=0;pe<=b;pe++)nt[pe]=0;for(le=0;le<=143;)W[2*le+1]=8,le++,nt[8]++;for(;le<=255;)W[2*le+1]=9,le++,nt[9]++;for(;le<=279;)W[2*le+1]=7,le++,nt[7]++;for(;le<=287;)W[2*le+1]=8,le++,nt[8]++;for(Ze(W,d+1,nt),le=0;le<m;le++)z[2*le+1]=5,z[2*le]=$e(le,5);j=new te(W,N,h+1,d,b),q=new te(z,U,0,m,b),Y=new te(new Array(0),F,0,y,T)})(),ne=!0),J.l_desc=new D(J.dyn_ltree,j),J.d_desc=new D(J.dyn_dtree,q),J.bl_desc=new D(J.bl_tree,Y),J.bi_buf=0,J.bi_valid=0,ce(J)},i._tr_stored_block=Z,i._tr_flush_block=function(J,le,pe,Te){var we,Qe,nt=0;0<J.level?(J.strm.data_type===2&&(J.strm.data_type=(function(Xe){var ft,It=4093624447;for(ft=0;ft<=31;ft++,It>>>=1)if(1&It&&Xe.dyn_ltree[2*ft]!==0)return o;if(Xe.dyn_ltree[18]!==0||Xe.dyn_ltree[20]!==0||Xe.dyn_ltree[26]!==0)return a;for(ft=32;ft<h;ft++)if(Xe.dyn_ltree[2*ft]!==0)return a;return o})(J)),ue(J,J.l_desc),ue(J,J.d_desc),nt=(function(Xe){var ft;for(k(Xe,Xe.dyn_ltree,Xe.l_desc.max_code),k(Xe,Xe.dyn_dtree,Xe.d_desc.max_code),ue(Xe,Xe.bl_desc),ft=y-1;3<=ft&&Xe.bl_tree[2*H[ft]+1]===0;ft--);return Xe.opt_len+=3*(ft+1)+5+5+4,ft})(J),we=J.opt_len+3+7>>>3,(Qe=J.static_len+3+7>>>3)<=we&&(we=Qe)):we=Qe=pe+5,pe+4<=we&&le!==-1?Z(J,le,pe,Te):J.strategy===4||Qe===we?(Se(J,2+(Te?1:0),3),ve(J,W,z)):(Se(J,4+(Te?1:0),3),(function(Xe,ft,It,gt){var Yt;for(Se(Xe,ft-257,5),Se(Xe,It-1,5),Se(Xe,gt-4,4),Yt=0;Yt<gt;Yt++)Se(Xe,Xe.bl_tree[2*H[Yt]+1],3);ie(Xe,Xe.dyn_ltree,ft-1),ie(Xe,Xe.dyn_dtree,It-1)})(J,J.l_desc.max_code+1,J.d_desc.max_code+1,nt+1),ve(J,J.dyn_ltree,J.dyn_dtree)),ce(J),Te&&me(J)},i._tr_tally=function(J,le,pe){return J.pending_buf[J.d_buf+2*J.last_lit]=le>>>8&255,J.pending_buf[J.d_buf+2*J.last_lit+1]=255&le,J.pending_buf[J.l_buf+J.last_lit]=255&pe,J.last_lit++,le===0?J.dyn_ltree[2*pe]++:(J.matches++,le--,J.dyn_ltree[2*(M[pe]+h+1)]++,J.dyn_dtree[2*$(le)]++),J.last_lit===J.lit_bufsize-1},i._tr_align=function(J){Se(J,2,3),fe(J,E,W),(function(le){le.bi_valid===16?(he(le,le.bi_buf),le.bi_buf=0,le.bi_valid=0):8<=le.bi_valid&&(le.pending_buf[le.pending++]=255&le.bi_buf,le.bi_buf>>=8,le.bi_valid-=8)})(J)}},{"../utils/common":41}],53:[function(n,r,i){r.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(n,r,i){(function(s){(function(o,a){if(!o.setImmediate){var l,c,u,h,d=1,m={},y=!1,v=o.document,b=Object.getPrototypeOf&&Object.getPrototypeOf(o);b=b&&b.setTimeout?b:o,l={}.toString.call(o.process)==="[object process]"?function(C){process.nextTick(function(){T(C)})}:(function(){if(o.postMessage&&!o.importScripts){var C=!0,I=o.onmessage;return o.onmessage=function(){C=!1},o.postMessage("","*"),o.onmessage=I,C}})()?(h="setImmediate$"+Math.random()+"$",o.addEventListener?o.addEventListener("message",E,!1):o.attachEvent("onmessage",E),function(C){o.postMessage(h+C,"*")}):o.MessageChannel?((u=new MessageChannel).port1.onmessage=function(C){T(C.data)},function(C){u.port2.postMessage(C)}):v&&"onreadystatechange"in v.createElement("script")?(c=v.documentElement,function(C){var I=v.createElement("script");I.onreadystatechange=function(){T(C),I.onreadystatechange=null,c.removeChild(I),I=null},c.appendChild(I)}):function(C){setTimeout(T,0,C)},b.setImmediate=function(C){typeof C!="function"&&(C=new Function(""+C));for(var I=new Array(arguments.length-1),O=0;O<I.length;O++)I[O]=arguments[O+1];var N={callback:C,args:I};return m[d]=N,l(d),d++},b.clearImmediate=x}function x(C){delete m[C]}function T(C){if(y)setTimeout(T,0,C);else{var I=m[C];if(I){y=!0;try{(function(O){var N=O.callback,U=O.args;switch(U.length){case 0:N();break;case 1:N(U[0]);break;case 2:N(U[0],U[1]);break;case 3:N(U[0],U[1],U[2]);break;default:N.apply(a,U)}})(I)}finally{x(C),y=!1}}}}
2964function E(C){C.source===o&&typeof C.data=="string"&&C.data.indexOf(h)===0&&T(+C.data.slice(h.length))}})(typeof self>"u"?s===void 0?this:s:self)}).call(this,typeof Yi<"u"?Yi:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(DE)),DE.exports}var V0e=j0e();const W0e=fn(V0e),$0e="4.3.3",Dq={dataType:null,batchType:null,name:"Terrain",id:"terrain",module:"terrain",version:$0e,worker:!0,extensions:["png","pngraw","jpg","jpeg","gif","webp","bmp"],mimeTypes:["image/png","image/jpeg","image/gif","image/webp","image/bmp"],options:{terrain:{tesselator:"auto",bounds:void 0,meshMaxError:10,elevationDecoder:{rScaler:1,gScaler:0,bScaler:0,offset:0},skirtHeight:void 0}}};({...Dq});const oD=[1],H0e={...Sy.defaultProps,elevationData:lw,texture:{...lw,optional:!0},meshMaxError:{type:"number",value:4},bounds:{type:"array",value:null,optional:!0,compare:!0},color:{type:"color",value:[255,255,255]},elevationDecoder:{type:"object",value:{rScaler:1,gScaler:0,bScaler:0,offset:0}},workerUrl:"",wireframe:!1,material:!0,loaders:[Dq]};function aD(t){return Array.isArray(t)?t.join(";"):t||""}class NM extends Ns{updateState({props:e,oldProps:n}){const r=e.elevationData!==n.elevationData;if(r){const{elevationData:s}=e,o=s&&(Array.isArray(s)||s.includes("{x}")&&s.includes("{y}"));this.setState({isTiled:o})}const i=r||e.meshMaxError!==n.meshMaxError||e.elevationDecoder!==n.elevationDecoder||e.bounds!==n.bounds;if(!this.state.isTiled&&i){const s=this.loadTerrain(e);this.setState({terrain:s})}e.workerUrl&&Zt.removed("workerUrl","loadOptions.terrain.workerUrl")()}loadTerrain({elevationData:e,bounds:n,elevationDecoder:r,meshMaxError:i,signal:s}){if(!e)return null;let o=this.getLoadOptions();o={...o,terrain:{skirtHeight:this.state.isTiled?i*2:0,...o==null?void 0:o.terrain,bounds:n,meshMaxError:i,elevationDecoder:r}};const{fetch:a}=this.props;return a(e,{propName:"elevationData",layer:this,loadOptions:o,signal:s})}getTiledTerrainData(e){const{elevationData:n,fetch:r,texture:i,elevationDecoder:s,meshMaxError:o}=this.props,{viewport:a}=this.context,l=cw(n,e),c=i&&cw(i,e),{signal:u}=e;let h=[0,0],d=[0,0];if(a.isGeospatial){const b=e.bbox;h=a.projectFlat([b.west,b.south]),d=a.projectFlat([b.east,b.north])}else{const b=e.bbox;h=[b.left,b.bottom],d=[b.right,b.top]}const m=[h[0],h[1],d[0],d[1]],y=this.loadTerrain({elevationData:l,bounds:m,elevationDecoder:s,meshMaxError:o,signal:u}),v=c?r(c,{propName:"texture",layer:this,loaders:[],signal:u}).catch(b=>null):Promise.resolve(null);return Promise.all([y,v])}renderSubLayers(e){const n=this.getSubLayerClass("mesh",uw),{color:r,wireframe:i,material:s}=this.props,{data:o}=e;if(!o)return null;const[a,l]=o;return new n(e,{data:oD,mesh:a,texture:l,_instanced:!1,coordinateSystem:Wt.CARTESIAN,getPosition:c=>[0,0,0],getColor:r,wireframe:i,material:s})}onViewportLoad(e){if(!e)return;const{zRange:n}=this.state,r=e.map(o=>o.content).filter(Boolean).map(o=>o[0].header.boundingBox.map(l=>l[2]));if(r.length===0)return;const i=Math.min(...r.map(o=>o[0])),s=Math.max(...r.map(o=>o[1]));(!n||i<n[0]||s>n[1])&&this.setState({zRange:[i,s]})}renderLayers(){const{color:e,material:n,elevationData:r,texture:i,wireframe:s,meshMaxError:o,elevationDecoder:a,tileSize:l,maxZoom:c,minZoom:u,extent:h,maxRequests:d,onTileLoad:m,onTileUnload:y,onTileError:v,maxCacheSize:b,maxCacheByteSize:x,refinementStrategy:T}=this.props;if(this.state.isTiled)return new Sy(this.getSubLayerProps({id:"tiles"}),{getTileData:this.getTiledTerrainData.bind(this),renderSubLayers:this.renderSubLayers.bind(this),updateTriggers:{getTileData:{elevationData:aD(r),texture:aD(i),meshMaxError:o,elevationDecoder:a}},onViewportLoad:this.onViewportLoad.bind(this),zRange:this.state.zRange||null,tileSize:l,maxZoom:c,minZoom:u,extent:h,maxRequests:d,onTileLoad:m,onTileUnload:y,onTileError:v,maxCacheSize:b,maxCacheByteSize:x,refinementStrategy:T});if(!r)return null;const E=this.getSubLayerClass("mesh",uw);return new E(this.getSubLayerProps({id:"mesh"}),{data:oD,mesh:this.state.terrain,texture:i,_instanced:!1,getPosition:C=>[0,0,0],getColor:e,material:n,wireframe:s})}}NM.defaultProps=H0e;NM.layerName="TerrainLayer";const Bq=`uniform dataFilterUniforms {
2965  bool useSoftMargin;
2966  bool enabled;
2967  bool transformSize;
2968  bool transformColor;
2969#ifdef DATAFILTER_TYPE
2970  DATAFILTER_TYPE min;
2971  DATAFILTER_TYPE softMin;
2972  DATAFILTER_TYPE softMax;
2973  DATAFILTER_TYPE max;
2974#ifdef DATAFILTER_DOUBLE
2975  DATAFILTER_TYPE min64High;
2976  DATAFILTER_TYPE max64High;
2977#endif
2978#endif
2979#ifdef DATACATEGORY_TYPE
2980  highp uvec4 categoryBitMask;
2981#endif
2982} dataFilter;
2983`,q0e=`
2984#ifdef DATAFILTER_TYPE
2985  in DATAFILTER_TYPE filterValues;
2986#ifdef DATAFILTER_DOUBLE
2987  in DATAFILTER_TYPE filterValues64Low;
2988#endif
2989#endif
2990
2991#ifdef DATACATEGORY_TYPE
2992  in DATACATEGORY_TYPE filterCategoryValues;
2993#endif
2994
2995out float dataFilter_value;
2996
2997float dataFilter_reduceValue(float value) {
2998  return value;
2999}
3000float dataFilter_reduceValue(vec2 value) {
3001  return min(value.x, value.y);
3002}
3003float dataFilter_reduceValue(vec3 value) {
3004  return min(min(value.x, value.y), value.z);
3005}
3006float dataFilter_reduceValue(vec4 value) {
3007  return min(min(value.x, value.y), min(value.z, value.w));
3008}
3009
3010#ifdef DATAFILTER_TYPE
3011  void dataFilter_setValue(DATAFILTER_TYPE valueFromMin, DATAFILTER_TYPE valueFromMax) {
3012    if (dataFilter.useSoftMargin) {
3013      // smoothstep results are undefined if edge0 ≥ edge1
3014      // Fallback to ignore filterSoftRange if it is truncated by filterRange
3015      DATAFILTER_TYPE leftInRange = mix(
3016        smoothstep(dataFilter.min, dataFilter.softMin, valueFromMin),
3017        step(dataFilter.min, valueFromMin),
3018        step(dataFilter.softMin, dataFilter.min)
3019      );
3020      DATAFILTER_TYPE rightInRange = mix(
3021        1.0 - smoothstep(dataFilter.softMax, dataFilter.max, valueFromMax),
3022        step(valueFromMax, dataFilter.max),
3023        step(dataFilter.max, dataFilter.softMax)
3024      );
3025      dataFilter_value = dataFilter_reduceValue(leftInRange * rightInRange);
3026    } else {
3027      dataFilter_value = dataFilter_reduceValue(
3028        step(dataFilter.min, valueFromMin) * step(valueFromMax, dataFilter.max)
3029      );
3030    }
3031  }
3032#endif
3033
3034#ifdef DATACATEGORY_TYPE
3035  void dataFilter_setCategoryValue(DATACATEGORY_TYPE category) {
3036    #if DATACATEGORY_CHANNELS == 1 // One 128-bit mask
3037    uint dataFilter_masks = dataFilter.categoryBitMask[category / 32u];
3038    #elif DATACATEGORY_CHANNELS == 2 // Two 64-bit masks
3039    uvec2 dataFilter_masks = uvec2(
3040      dataFilter.categoryBitMask[category.x / 32u],
3041      dataFilter.categoryBitMask[category.y / 32u + 2u]
3042    );
3043    #elif DATACATEGORY_CHANNELS == 3 // Three 32-bit masks
3044    uvec3 dataFilter_masks = dataFilter.categoryBitMask.xyz;
3045    #else // Four 32-bit masks
3046    uvec4 dataFilter_masks = dataFilter.categoryBitMask;
3047    #endif
3048
3049    // Shift mask and extract relevant bits
3050    DATACATEGORY_TYPE dataFilter_bits = DATACATEGORY_TYPE(dataFilter_masks) >> (category & 31u);
3051    dataFilter_bits &= 1u;
3052
3053    #if DATACATEGORY_CHANNELS == 1
3054    if(dataFilter_bits == 0u) dataFilter_value = 0.0;
3055    #else
3056    if(any(equal(dataFilter_bits, DATACATEGORY_TYPE(0u)))) dataFilter_value = 0.0;
3057    #endif
3058  }
3059#endif
3060`,Lq=`
3061${Bq}
3062${q0e}
3063`,Q0e=`
3064in float dataFilter_value;
3065`,Fq=`
3066${Bq}
3067${Q0e}
3068`;function Uq(t){if(!t||!("extensions"in t))return{};const{filterRange:e=[-1,1],filterEnabled:n=!0,filterTransformSize:r=!0,filterTransformColor:i=!0,categoryBitMask:s}=t,o=t.filterSoftRange||e;return{...Number.isFinite(e[0])?{min:e[0],softMin:o[0],softMax:o[1],max:e[1]}:{min:e.map(a=>a[0]),softMin:o.map(a=>a[0]),softMax:o.map(a=>a[1]),max:e.map(a=>a[1])},enabled:n,useSoftMargin:!!t.filterSoftRange,transformSize:n&&r,transformColor:n&&i,...s&&{categoryBitMask:s}}}function X0e(t){if(!t||!("extensions"in t))return{};const e=Uq(t);if(Number.isFinite(e.min)){const n=Math.fround(e.min);e.min-=n,e.softMin-=n,e.min64High=n;const r=Math.fround(e.max);e.max-=r,e.softMax-=r,e.max64High=r}else{const n=e.min.map(Math.fround);e.min=e.min.map((i,s)=>i-n[s]),e.softMin=e.softMin.map((i,s)=>i-n[s]),e.min64High=n;const r=e.max.map(Math.fround);e.max=e.max.map((i,s)=>i-r[s]),e.softMax=e.softMax.map((i,s)=>i-r[s]),e.max64High=r}return e}const zq={"vs:#main-start":`
3069    dataFilter_value = 1.0;
3070    if (dataFilter.enabled) {
3071      #ifdef DATAFILTER_TYPE
3072        #ifdef DATAFILTER_DOUBLE
3073          dataFilter_setValue(
3074            filterValues - dataFilter.min64High + filterValues64Low,
3075            filterValues - dataFilter.max64High + filterValues64Low
3076          );
3077        #else
3078          dataFilter_setValue(filterValues, filterValues);
3079        #endif
3080      #endif
3081
3082      #ifdef DATACATEGORY_TYPE
3083        dataFilter_setCategoryValue(filterCategoryValues);
3084      #endif
3085    }
3086  `,"vs:#main-end":`
3087    if (dataFilter_value == 0.0) {
3088      gl_Position = vec4(0.);
3089    }
3090  `,"vs:DECKGL_FILTER_SIZE":`
3091    if (dataFilter.transformSize) {
3092      size = size * dataFilter_value;
3093    }
3094  `,"fs:DECKGL_FILTER_COLOR":`
3095    if (dataFilter_value == 0.0) discard;
3096    if (dataFilter.transformColor) {
3097      color.a *= dataFilter_value;
3098    }
3099  `};function jq(t){const{categorySize:e,filterSize:n,fp64:r}=t,i={useSoftMargin:"i32",enabled:"i32",transformSize:"i32",transformColor:"i32"};if(n){const s=n===1?"f32":`vec${n}<f32>`;i.min=s,i.softMin=s,i.softMax=s,i.max=s,r&&(i.min64High=s,i.max64High=s)}return e&&(i.categoryBitMask="vec4<i32>"),i}const Y0e={name:"dataFilter",vs:Lq,fs:Fq,inject:zq,getUniforms:Uq,uniformTypesFromOptions:jq},K0e={name:"dataFilter",vs:Lq,fs:Fq,inject:zq,getUniforms:X0e,uniformTypesFromOptions:jq},G0e=`#version 300 es
3100#define SHADER_NAME data-filter-vertex-shader
3101
3102#ifdef FLOAT_TARGET
3103  in float filterIndices;
3104  in float filterPrevIndices;
3105#else
3106  in vec2 filterIndices;
3107  in vec2 filterPrevIndices;
3108#endif
3109
3110out vec4 vColor;
3111const float component = 1.0 / 255.0;
3112
3113void main() {
3114  #ifdef FLOAT_TARGET
3115    dataFilter_value *= float(filterIndices != filterPrevIndices);
3116    gl_Position = vec4(0.0, 0.0, 0.0, 1.0);
3117    vColor = vec4(0.0, 0.0, 0.0, 1.0);
3118  #else
3119    // Float texture is not supported: pack result into 4 channels x 256 px x 64px
3120    dataFilter_value *= float(filterIndices.x != filterPrevIndices.x);
3121    float col = filterIndices.x;
3122    float row = filterIndices.y * 4.0;
3123    float channel = floor(row);
3124    row = fract(row);
3125    vColor = component * vec4(bvec4(channel == 0.0, channel == 1.0, channel == 2.0, channel == 3.0));
3126    gl_Position = vec4(col * 2.0 - 1.0, row * 2.0 - 1.0, 0.0, 1.0);
3127  #endif
3128  gl_PointSize = 1.0;
3129}
3130`,Z0e=`#version 300 es
3131#define SHADER_NAME data-filter-fragment-shader
3132precision highp float;
3133
3134in vec4 vColor;
3135
3136out vec4 fragColor;
3137
3138void main() {
3139  if (dataFilter_value < 0.5) {
3140    discard;
3141  }
3142  fragColor = vColor;
3143}
3144`,J0e=["float32-renderable-webgl","texture-blend-float-webgl"];function e1e(t){return J0e.every(e=>t.features.has(e))}function t1e(t,e){return e?t.createFramebuffer({width:1,height:1,colorAttachments:[t.createTexture({format:"rgba32float",mipmaps:!1})]}):t.createFramebuffer({width:256,height:64,colorAttachments:[t.createTexture({format:"rgba8unorm",mipmaps:!1})]})}function n1e(t,e,n,r){return n.defines.NON_INSTANCED_MODEL=1,r&&(n.defines.FLOAT_TARGET=1),new us(t,{id:"data-filter-aggregation-model",vertexCount:1,isInstanced:!1,topology:"point-list",disableWarnings:!0,vs:G0e,fs:Z0e,bufferLayout:e,...n})}const r1e={blend:!0,blendColorSrcFactor:"one",blendColorDstFactor:"one",blendAlphaSrcFactor:"one",blendAlphaDstFactor:"one",blendColorOperation:"add",blendAlphaOperation:"add",depthCompare:"never"},i1e={getFilterValue:{type:"accessor",value:0},getFilterCategory:{type:"accessor",value:0},onFilteredItemsChange:{type:"function",value:null,optional:!0},filterEnabled:!0,filterRange:[-1,1],filterSoftRange:null,filterCategories:[0],filterTransformSize:!0,filterTransformColor:!0},s1e={categorySize:0,filterSize:1,fp64:!1,countItems:!1},o1e={1:"uint",2:"uvec2",3:"uvec3",4:"uvec4"},a1e={1:"float",2:"vec2",3:"vec3",4:"vec4"};class DM extends pd{constructor(e={}){super({...s1e,...e})}getShaders(e){const{categorySize:n,filterSize:r,fp64:i}=e.opts,s={};n&&(s.DATACATEGORY_TYPE=o1e[n],s.DATACATEGORY_CHANNELS=n),r&&(s.DATAFILTER_TYPE=a1e[r],s.DATAFILTER_DOUBLE=!!i);const o=i?K0e:Y0e;return o.uniformTypes=o.uniformTypesFromOptions(e.opts),{modules:[o],defines:s}}initializeState(e,n){const r=this.getAttributeManager(),{categorySize:i,filterSize:s,fp64:o}=n.opts;r&&(s&&r.add({filterValues:{size:s,type:o?"float64":"float32",stepMode:"dynamic",accessor:"getFilterValue"}}),i&&r.add({filterCategoryValues:{size:i,stepMode:"dynamic",accessor:"getFilterCategory",type:"uint32",transform:i===1?l=>n._getCategoryKey.call(this,l,0):l=>l.map((c,u)=>n._getCategoryKey.call(this,c,u))}}));const{device:a}=this.context;if(r&&n.opts.countItems){const l=e1e(a);r.add({filterVertexIndices:{size:l?1:2,vertexOffset:1,type:"unorm8",accessor:(h,{index:d})=>{const m=h&&h.__source?h.__source.index:d;return l?(m+1)%255:[(m+1)%255,Math.floor(m/255)%255]},shaderAttributes:{filterPrevIndices:{vertexOffset:0},filterIndices:{vertexOffset:1}}}});const c=t1e(a,l),u=n1e(a,r.getBufferLayouts({isInstanced:!1}),n.getShaders.call(this,n),l);this.setState({filterFBO:c,filterModel:u})}}updateState({props:e,oldProps:n,changeFlags:r},i){var a,l;const s=this.getAttributeManager(),{categorySize:o}=i.opts;if(this.state.filterModel){const c=((a=s.attributes.filterValues)==null?void 0:a.needsUpdate())||((l=s.attributes.filterCategoryValues)==null?void 0:l.needsUpdate())||e.filterEnabled!==n.filterEnabled||e.filterRange!==n.filterRange||e.filterSoftRange!==n.filterSoftRange||e.filterCategories!==n.filterCategories;c&&this.setState({filterNeedsUpdate:c})}s!=null&&s.attributes.filterCategoryValues&&((s.attributes.filterCategoryValues.needsUpdate()||!Ii(e.filterCategories,n.filterCategories,2))&&this.setState({categoryBitMask:null}),r.dataChanged&&(this.setState({categoryMap:Array(o).fill(0).map(()=>({}))}),s.attributes.filterCategoryValues.setNeedsUpdate("categoryMap")))}draw(e,n){const r=this.state.filterFBO,i=this.state.filterModel,s=this.state.filterNeedsUpdate;this.state.categoryBitMask||n._updateCategoryBitMask.call(this,e,n);const{onFilteredItemsChange:o,extensions:a,filterEnabled:l,filterRange:c,filterSoftRange:u,filterTransformSize:h,filterTransformColor:d,filterCategories:m}=this.props,y={extensions:a,filterEnabled:l,filterRange:c,filterSoftRange:u,filterTransformSize:h,filterTransformColor:d,filterCategories:m};if(this.state.categoryBitMask&&(y.categoryBitMask=this.state.categoryBitMask),this.setShaderModuleProps({dataFilter:y}),s&&o&&i){const v=this.getAttributeManager(),{attributes:{filterValues:b,filterCategoryValues:x,filterVertexIndices:T}}=v;i.setVertexCount(this.getNumInstances());const E={...b==null?void 0:b.getValue(),...x==null?void 0:x.getValue(),...T==null?void 0:T.getValue()};i.setAttributes(E),i.shaderInputs.setProps({dataFilter:y});const C=[0,0,r.width,r.height],I=i.device.beginRenderPass({id:"data-filter-aggregation",framebuffer:r,parameters:{viewport:C},clearColor:[0,0,0,0]});i.setParameters(r1e),i.draw(I),I.end();const O=i.device.readPixelsToArrayWebGL(r);let N=0;for(let U=0;U<O.length;U++)N+=O[U];
3144o({id:this.id,count:N}),this.state.filterNeedsUpdate=!1}}finalizeState(){const e=this.state.filterFBO,n=this.state.filterModel;e==null||e.destroy(),n==null||n.destroy()}_updateCategoryBitMask(e,n){const{categorySize:r}=n.opts;if(!r)return;const{filterCategories:i}=this.props,s=new Uint32Array([0,0,0,0]),o=r===1?[i]:i,a=r===1?128:r===2?64:32;for(let l=0;l<o.length;l++){const c=o[l];for(const u of c){const h=n._getCategoryKey.call(this,u,l);if(h<a){const d=l*(a/32)+Math.floor(h/32);s[d]+=Math.pow(2,h%32)}else Zt.warn(`Exceeded maximum number of categories (${a})`)()}}this.state.categoryBitMask=s}_getCategoryKey(e,n){const r=this.state.categoryMap[n];return e in r||(r[e]=Object.keys(r).length),r[e]}}DM.defaultProps=i1e;DM.extensionName="DataFilterExtension";const l1e={inject:{"vs:#decl":`
3145in vec2 instanceDashArrays;
3146in float instanceDashOffsets;
3147out vec2 vDashArray;
3148out float vDashOffset;
3149`,"vs:#main-end":`
3150vDashArray = instanceDashArrays;
3151vDashOffset = instanceDashOffsets / width.x;
3152`,"fs:#decl":`
3153uniform pathStyleUniforms {
3154float dashAlignMode;
3155bool dashGapPickable;
3156} pathStyle;
3157in vec2 vDashArray;
3158in float vDashOffset;
3159`,"fs:#main-start":`
3160float solidLength = vDashArray.x;
3161float gapLength = vDashArray.y;
3162float unitLength = solidLength + gapLength;
3163float offset;
3164if (unitLength > 0.0) {
3165if (pathStyle.dashAlignMode == 0.0) {
3166offset = vDashOffset;
3167} else {
3168unitLength = vPathLength / round(vPathLength / unitLength);
3169offset = solidLength / 2.0;
3170}
3171float unitOffset = mod(vPathPosition.y + offset, unitLength);
3172if (gapLength > 0.0 && unitOffset > solidLength) {
3173if (path.capType <= 0.5) {
3174if (!(pathStyle.dashGapPickable && bool(picking.isActive))) {
3175discard;
3176}
3177} else {
3178float distToEnd = length(vec2(
3179min(unitOffset - solidLength, unitLength - unitOffset),
3180vPathPosition.x
3181));
3182if (distToEnd > 1.0) {
3183if (!(pathStyle.dashGapPickable && bool(picking.isActive))) {
3184discard;
3185}
3186}
3187}
3188}
3189}
3190`}},c1e={inject:{"vs:#decl":`
3191in float instanceOffsets;
3192`,"vs:DECKGL_FILTER_SIZE":`
3193float offsetWidth = abs(instanceOffsets * 2.0) + 1.0;
3194size *= offsetWidth;
3195`,"vs:#main-end":`
3196float offsetWidth = abs(instanceOffsets * 2.0) + 1.0;
3197float offsetDir = sign(instanceOffsets);
3198vPathPosition.x = (vPathPosition.x + offsetDir) * offsetWidth - offsetDir;
3199vPathPosition.y *= offsetWidth;
3200vPathLength *= offsetWidth;
3201`,"fs:#main-start":`
3202float isInside;
3203isInside = step(-1.0, vPathPosition.x) * step(vPathPosition.x, 1.0);
3204if (isInside == 0.0) {
3205discard;
3206}
3207`}},u1e={getDashArray:{type:"accessor",value:[0,0]},getOffset:{type:"accessor",value:0},dashJustified:!1,dashGapPickable:!1};class td extends pd{constructor({dash:e=!1,offset:n=!1,highPrecisionDash:r=!1}={}){super({dash:e||r,offset:n,highPrecisionDash:r})}isEnabled(e){return"pathTesselator"in e.state}getShaders(e){if(!e.isEnabled(this))return null;let n={};e.opts.dash&&(n=iw(n,l1e)),e.opts.offset&&(n=iw(n,c1e));const{inject:r}=n;return{modules:[{name:"pathStyle",inject:r,uniformTypes:{dashAlignMode:"f32",dashGapPickable:"i32"}}]}}initializeState(e,n){const r=this.getAttributeManager();!r||!n.isEnabled(this)||(n.opts.dash&&r.addInstanced({instanceDashArrays:{size:2,accessor:"getDashArray"},instanceDashOffsets:n.opts.highPrecisionDash?{size:1,accessor:"getPath",transform:n.getDashOffsets.bind(this)}:{size:1,update:i=>{i.constant=!0,i.value=[0]}}}),n.opts.offset&&r.addInstanced({instanceOffsets:{size:1,accessor:"getOffset"}}))}updateState(e,n){if(n.isEnabled(this)&&n.opts.dash){const r={dashAlignMode:this.props.dashJustified?1:0,dashGapPickable:!!this.props.dashGapPickable};this.setShaderModuleProps({pathStyle:r})}}getDashOffsets(e){const n=[0],r=this.props.positionFormat==="XY"?2:3,i=Array.isArray(e[0]),s=i?e.length:e.length/r;let o,a;for(let l=0;l<s-1;l++)o=i?e[l]:e.slice(l*r,l*r+r),o=this.projectPosition(o),l>0&&(n[l]=n[l-1]+Loe(a,o)),a=o;return n[s-1]=0,n}}td.defaultProps=u1e;td.extensionName="PathStyleExtension";const f1e={clipBounds:[0,0,1,1],clipByInstance:void 0},Vq=`
3208uniform clipUniforms {
3209  vec4 bounds;
3210} clip;
3211
3212bool clip_isInBounds(vec2 position) {
3213  return position.x >= clip.bounds[0] && position.y >= clip.bounds[1] && position.x < clip.bounds[2] && position.y < clip.bounds[3];
3214}
3215`,h1e={name:"clip",vs:Vq,uniformTypes:{bounds:"vec4<f32>"}},d1e={"vs:#decl":`
3216out float clip_isVisible;
3217`,"vs:DECKGL_FILTER_GL_POSITION":`
3218  clip_isVisible = float(clip_isInBounds(geometry.worldPosition.xy));
3219`,"fs:#decl":`
3220in float clip_isVisible;
3221`,"fs:DECKGL_FILTER_COLOR":`
3222  if (clip_isVisible < 0.5) discard;
3223`},p1e={name:"clip",fs:Vq,uniformTypes:{bounds:"vec4<f32>"}},g1e={"vs:#decl":`
3224out vec2 clip_commonPosition;
3225`,"vs:DECKGL_FILTER_GL_POSITION":`
3226  clip_commonPosition = geometry.position.xy;
3227`,"fs:#decl":`
3228in vec2 clip_commonPosition;
3229`,"fs:DECKGL_FILTER_COLOR":`
3230  if (!clip_isInBounds(clip_commonPosition)) discard;
3231`};class Ty extends pd{getShaders(){let e="instancePositions"in this.getAttributeManager().attributes;return this.props.clipByInstance!==void 0&&(e=!!this.props.clipByInstance),this.state.clipByInstance=e,e?{modules:[h1e],inject:d1e}:{modules:[p1e],inject:g1e}}draw(){const{clipBounds:e}=this.props,n={};if(this.state.clipByInstance)n.bounds=e;else{const r=this.projectPosition([e[0],e[1],0]),i=this.projectPosition([e[2],e[3],0]);n.bounds=[Math.min(r[0],i[0]),Math.min(r[1],i[1]),Math.max(r[0],i[0]),Math.max(r[1],i[1])]}this.setShaderModuleProps({clip:n}
3231)}}Ty.defaultProps=f1e;Ty.extensionName="ClipExtension";const m1e=`
3232in float collisionPriorities;
3233
3234uniform sampler2D collision_texture;
3235
3236uniform collisionUniforms {
3237  bool sort;
3238  bool enabled;
3239} collision;
3240
3241vec2 collision_getCoords(vec4 position) {
3242  vec4 collision_clipspace = project_common_position_to_clipspace(position);
3243  return (1.0 + collision_clipspace.xy / collision_clipspace.w) / 2.0;
3244}
3245
3246float collision_match(vec2 tex, vec3 pickingColor) {
3247  vec4 collision_pickingColor = texture(collision_texture, tex);
3248  float delta = dot(abs(collision_pickingColor.rgb - pickingColor), vec3(1.0));
3249  float e = 0.001;
3250  return step(delta, e);
3251}
3252
3253float collision_isVisible(vec2 texCoords, vec3 pickingColor) {
3254  if (!collision.enabled) {
3255    return 1.0;
3256  }
3257
3258  // Visibility test, sample area of 5x5 pixels in order to fade in/out.
3259  // Due to the locality, the lookups will be cached
3260  // This reduces the flicker present when objects are shown/hidden
3261  const int N = 2;
3262  float accumulator = 0.0;
3263  vec2 step = vec2(1.0 / project.viewportSize);
3264
3265  const float floatN = float(N);
3266  vec2 delta = -floatN * step;
3267  for(int i = -N; i <= N; i++) {
3268    delta.x = -step.x * floatN;
3269    for(int j = -N; j <= N; j++) {
3270      accumulator += collision_match(texCoords + delta, pickingColor);
3271      delta.x += step.x;
3272    }
3273    delta.y += step.y;
3274  }
3275
3276  float W = 2.0 * floatN + 1.0;
3277  return pow(accumulator / (W * W), 2.2);
3278}
3279`,v1e={"vs:#decl":`
3280  float collision_fade = 1.0;
3281`,"vs:DECKGL_FILTER_GL_POSITION":`
3282  if (collision.sort) {
3283    float collisionPriority = collisionPriorities;
3284    position.z = -0.001 * collisionPriority * position.w;
3284 // Support range -1000 -> 1000
3285  }
3286
3287  if (collision.enabled) {
3288    vec4 collision_common_position = project_position(vec4(geometry.worldPosition, 1.0));
3289    vec2 collision_texCoords = collision_getCoords(collision_common_position);
3290    collision_fade = collision_isVisible(collision_texCoords, geometry.pickingColor / 255.0);
3291    if (collision_fade < 0.0001) {
3292      // Position outside clip space bounds to discard
3293      position = vec4(0.0, 0.0, 2.0, 1.0);
3294    }
3295  }
3296  `,"vs:DECKGL_FILTER_COLOR":`
3297  color.a *= collision_fade;
3298  `},y1e=t=>{if(!t||!("dummyCollisionMap"in t))return{};const{enabled:e,collisionFBO:n,drawToCollisionMap:r,dummyCollisionMap:i}=t;return{enabled:e&&!r,sort:!!r,collision_texture:!r&&n?n.colorAttachments[0]:i}},b1e={name:"collision",dependencies:[Gg],vs:m1e,inject:v1e,getUniforms:y1e,uniformTypes:{sort:"i32",enabled:"i32"}};class _1e extends Ay{renderCollisionMap(e,n){const i=[0,0,0,0],s=[1,1,e.width-2,e.height-2];this.render({...n,clearColor:i,scissorRect:s,target:e,pass:"collision"})}getLayerParameters(e,n,r){return{...e.props.parameters,blend:!1,depthWriteEnabled:!0,depthCompare:"less-equal"}}getShaderModuleProps(){return{collision:{drawToCollisionMap:!0},picking:{isActive:1,isAttribute:!1},lighting:{enabled:!1}}}}const BE=2;class w1e{constructor(){this.id="collision-filter-effect",this.props=null,this.useInPicking=!0,this.order=1,this.channels={},this.collisionFBOs={}}setup(e){this.context=e;const{device:n}=e;this.dummyCollisionMap=n.createTexture({width:1,height:1}),this.collisionFilterPass=new _1e(n,{id:"default-collision-filter"})}preRender({effects:e,layers:n,layerFilter:r,viewports:i,onViewportActive:s,views:o,isPicking:a,preRenderStats:l={}}){var b;const{device:c}=this.context;if(a)return;const u=n.filter(({props:{visible:x,collisionEnabled:T}})=>x&&T);if(u.length===0){this.channels={};return}const h=e==null?void 0:e.filter(x=>x.useInPicking&&l[x.id]),d=(b=l["mask-effect"])==null?void 0:b.didRender,m=this._groupByCollisionGroup(c,u),y=i[0],v=!this.lastViewport||!this.lastViewport.equals(y)||d;for(const x in m){const T=this.collisionFBOs[x],E=m[x],[C,I]=c.canvasContext.getPixelSize();T.resize({width:C/BE,height:I/BE}),this._render(E,{effects:h,layerFilter:r,onViewportActive:s,views:o,viewport:y,viewportChanged:v})}}_render(e,{effects:n,layerFilter:r,onViewportActive:i,views:s,viewport:o,viewportChanged:a}){const{collisionGroup:l}=e,c=this.channels[l];if(!c)return;const u=a||e===c||!Ii(c.layers,e.layers,1)||e.layerBounds.some((h,d)=>!Tl(h,c.layerBounds[d]))||e.allLayersLoaded!==c.allLayersLoaded||e.layers.some(h=>h.props.transitions);if(this.channels[l]=e,u){this.lastViewport=o;const h=this.collisionFBOs[l];this.collisionFilterPass.renderCollisionMap(h,{pass:"collision-filter",isPicking:!0,layers:e.layers,effects:n,layerFilter:r,viewports:o?[o]:[],onViewportActive:i,views:s,shaderModuleProps:{collision:{enabled:!0,dummyCollisionMap:this.dummyCollisionMap},project:{devicePixelRatio:h.device.canvasContext.getDevicePixelRatio()/BE}}})}}_groupByCollisionGroup(e,n){const r={};for(const i of n){const s=i.props.collisionGroup;let o=r[s];o||(o={collisionGroup:s,layers:[],layerBounds:[],allLayersLoaded:!0},r[s]=o),o.layers.push(i),o.layerBounds.push(i.getBounds()),i.isLoaded||(o.allLayersLoaded=!1)}for(const i of Object.keys(r))this.collisionFBOs[i]||this.createFBO(e,i),this.channels[i]||(this.channels[i]=r[i]);for(const i of Object.keys(this.collisionFBOs))r[i]||this.destroyFBO(i);return r}getShaderModuleProps(e){const{collisionGroup:n,collisionEnabled:r}=e.props,{collisionFBOs:i,dummyCollisionMap:s}=this,o=i[n];return{collision:{enabled:r&&!!o,collisionFBO:o,dummyCollisionMap:s}}}cleanup(){this.dummyCollisionMap&&(this.dummyCollisionMap.delete(),this.dummyCollisionMap=void 0),this.channels={};for(const e of Object.keys(this.collisionFBOs))this.destroyFBO(e);this.collisionFBOs={},this.lastViewport=void 0}createFBO(e,n){const{width:r,height:i}=e.gl.canvas,s=e.createTexture({format:"rgba8unorm",width:r,height:i,sampler:{minFilter:"nearest",magFilter:"nearest",addressModeU:"clamp-to-edge",addressModeV:"clamp-to-edge"}}),o=e.createTexture({format:"depth16unorm",width:r,height:i,mipmaps:!1});
3298this.collisionFBOs[n]=e.createFramebuffer({id:`collision-${n}`,width:r,height:i,colorAttachments:[s],depthStencilAttachment:o})}destroyFBO(e){var r,i;const n=this.collisionFBOs[e];(r=n.colorAttachments[0])==null||r.destroy(),(i=n.depthStencilAttachment)==null||i.destroy(),n.destroy(),delete this.collisionFBOs[e]}}const x1e={getCollisionPriority:{type:"accessor",value:0},collisionEnabled:!0,collisionGroup:{type:"string",value:"default"},collisionTestProps:{}};class Cv extends pd{getShaders(){return{modules:[b1e]}}draw({shaderModuleProps:e}){var n;(n=e.collision)!=null&&n.drawToCollisionMap&&(this.props=this.clone(this.props.collisionTestProps).props)}initializeState(e,n){var i;if(this.getAttributeManager()===null)return;(i=this.context.deck)==null||i._addDefaultEffect(new w1e),this.getAttributeManager().add({collisionPriorities:{size:1,stepMode:"dynamic",accessor:"getCollisionPriority"}})}getNeedsPickingBuffer(){return this.props.collisionEnabled}}Cv.defaultProps=x1e;Cv.extensionName="CollisionFilterExtension";function Wq(t,e){const n=[1/0,1/0,-1/0,-1/0];for(const r of t){const i=r.getBounds();if(i){const s=r.projectPosition(i[0],{viewport:e,autoOffset:!1}),o=r.projectPosition(i[1],{viewport:e,autoOffset:!1});n[0]=Math.min(n[0],s[0]),n[1]=Math.min(n[1],s[1]),n[2]=Math.max(n[2],o[0]),n[3]=Math.max(n[3],o[1])}}return Number.isFinite(n[0])?n:null}const A1e=2048;function $q(t){const{bounds:e,viewport:n,border:r=0}=t,{isGeospatial:i}=n;if(e[2]<=e[0]||e[3]<=e[1])return null;const s=n.unprojectPosition([(e[0]+e[2])/2,(e[1]+e[3])/2,0]);let{width:o,height:a,zoom:l}=t;if(l===void 0){o=o-r*2,a=a-r*2;const c=Math.min(o/(e[2]-e[0]),a/(e[3]-e[1]));l=Math.min(Math.log2(c),20)}else if(!o||!a){const c=2**l;o=Math.round(Math.abs(e[2]-e[0])*c),a=Math.round(Math.abs(e[3]-e[1])*c);const u=A1e-r*2;if(o>u||a>u){const h=u/Math.max(o,a);o=Math.round(o*h),a=Math.round(a*h),l+=Math.log2(h)}}return i?new ao({id:n.id,x:r,y:r,width:o,height:a,longitude:s[0],latitude:s[1],zoom:l,orthographic:!0}):new Hpe({id:n.id,x:r,y:r,width:o,height:a,target:s,zoom:l,flipY:!1})}function E1e(t,e){let n;n=t.getBounds();const r=t.projectPosition(n.slice(0,2)),i=t.projectPosition(n.slice(2,4));return[r[0],r[1],i[0],i[1]]}function Hq(t,e,n){if(!t)return[0,0,1,1];const r=E1e(e),i=S1e(r);return t[2]-t[0]<=i[2]-i[0]&&t[3]-t[1]<=i[3]-i[1]?t:[Math.max(t[0],i[0]),Math.max(t[1],i[1]),Math.min(t[2],i[2]),Math.min(t[3],i[3])]}function S1e(t){const e=t[2]-t[0],n=t[3]-t[1],r=(t[0]+t[2])/2,i=(t[1]+t[3])/2;return[r-e,i-n,r+e,i+n]}const gl={NONE:0,WRITE_HEIGHT_MAP:1,USE_HEIGHT_MAP:2,USE_COVER:3,USE_COVER_ONLY:4,SKIP:5},T1e=Object.keys(gl).map(t=>`const float TERRAIN_MODE_${t} = ${gl[t]}.0;`).join(`
3299`),lD=T1e+`
3300uniform terrainUniforms {
3301  float mode;
3302  vec4 bounds;
3303} terrain;
3304
3305uniform sampler2D terrain_map;
3306`,HP={name:"terrain",dependencies:[Gg],vs:lD+"out vec3 commonPos;",fs:lD+"in vec3 commonPos;",inject:{"vs:#main-start":`
3307if (terrain.mode == TERRAIN_MODE_SKIP) {
3308  gl_Position = vec4(0.0);
3309  return;
3310}
3311`,"vs:DECKGL_FILTER_GL_POSITION":`
3312commonPos = geometry.position.xyz;
3313if (terrain.mode == TERRAIN_MODE_WRITE_HEIGHT_MAP) {
3314  vec2 texCoords = (commonPos.xy - terrain.bounds.xy) / terrain.bounds.zw;
3315  position = vec4(texCoords * 2.0 - 1.0, 0.0, 1.0);
3316  commonPos.z += project.commonOrigin.z;
3317}
3318if (terrain.mode == TERRAIN_MODE_USE_HEIGHT_MAP) {
3319  vec3 anchor = geometry.worldPosition;
3320  anchor.z = 0.0;
3321  vec3 anchorCommon = project_position(anchor);
3322  vec2 texCoords = (anchorCommon.xy - terrain.bounds.xy) / terrain.bounds.zw;
3323  if (texCoords.x >= 0.0 && texCoords.y >= 0.0 && texCoords.x <= 1.0 && texCoords.y <= 1.0) {
3324    float terrainZ = texture(terrain_map, texCoords).r;
3325    geometry.position.z += terrainZ;
3326    position = project_common_position_to_clipspace(geometry.position);
3327  }
3328}
3329    `,"fs:#main-start":`
3330if (terrain.mode == TERRAIN_MODE_WRITE_HEIGHT_MAP) {
3331  fragColor = vec4(commonPos.z, 0.0, 0.0, 1.0);
3332  return;
3333}
3334    `,"fs:DECKGL_FILTER_COLOR":`
3335if ((terrain.mode == TERRAIN_MODE_USE_COVER) || (terrain.mode == TERRAIN_MODE_USE_COVER_ONLY)) {
3336  vec2 texCoords = (commonPos.xy - terrain.bounds.xy) / terrain.bounds.zw;
3337  vec4 pixel = texture(terrain_map, texCoords);
3338  if (terrain.mode == TERRAIN_MODE_USE_COVER_ONLY) {
3339    color = pixel;
3340  } else {
3341    // pixel is premultiplied
3342    color = pixel + color * (1.0 - pixel.a);
3343  }
3344  return;
3345}
3346    `},getUniforms:(t={})=>
3346{if("dummyHeightMap"in t){const{drawToTerrainHeightMap:e,heightMap:n,heightMapBounds:r,dummyHeightMap:i,terrainCover:s,useTerrainHeightMap:o,terrainSkipRender:a}=t,l=Gg.getUniforms(t.project),{commonOrigin:c}=l;let u=a?gl.SKIP:gl.NONE,h=i,d=null;if(e)u=gl.WRITE_HEIGHT_MAP,d=r;else if(o&&n)u=gl.USE_HEIGHT_MAP,h=n,d=r;else if(s){const m=t.isPicking?s.getPickingFramebuffer():s.getRenderFramebuffer();h=m==null?void 0:m.colorAttachments[0].texture,t.isPicking&&(u=gl.SKIP),h?(u=u===gl.SKIP?gl.USE_COVER_ONLY:gl.USE_COVER,d=s.bounds):h=i}return{mode:u,terrain_map:h,bounds:d?[d[0]-c[0],d[1]-c[1],d[2]-d[0],d[3]-d[1]]:[0,0,0,0]}}return{}},uniformTypes:{mode:"f32",bounds:"vec4<f32>"}};function qP(t,e){return t.createFramebuffer({id:e.id,colorAttachments:[t.createTexture({id:e.id,...e.float&&{format:"rgba32float",type:5126},mipmaps:!1,sampler:e.interpolate===!1?{minFilter:"nearest",magFilter:"nearest"}:{minFilter:"linear",magFilter:"linear"}})]})}class C1e{constructor(e){this.isDirty=!0,this.renderViewport=null,this.bounds=null,this.layers=[],this.targetBounds=null,this.targetBoundsCommon=null,this.targetLayer=e,this.tile=qq(e)}get id(){return this.targetLayer.id}get isActive(){return!!this.targetLayer.getCurrentLayer()}shouldUpdate({targetLayer:e,viewport:n,layers:r,layerNeedsRedraw:i}){e&&(this.targetLayer=e);const s=n?this._updateViewport(n):!1;let o=r?this._updateLayers(r):!1;if(i){for(const a of this.layers)if(i[a]){o=!0;break}}return o||s}_updateLayers(e){let n=!1;if(e=this.tile?P1e(this.tile,e):e,e.length!==this.layers.length)n=!0;else for(let r=0;r<e.length;r++)if(e[r].id!==this.layers[r]){n=!0;break}return n&&(this.layers=e.map(r=>r.id)),n}_updateViewport(e){var s;const n=this.targetLayer;let r=!1;if(this.tile&&"boundingBox"in this.tile){if(!this.targetBounds){r=!0,this.targetBounds=this.tile.boundingBox;const o=e.projectPosition(this.targetBounds[0]),a=e.projectPosition(this.targetBounds[1]);this.targetBoundsCommon=[o[0],o[1],a[0],a[1]]}}else this.targetBounds!==n.getBounds()&&(r=!0,this.targetBounds=n.getBounds(),this.targetBoundsCommon=Wq([n],e));if(!this.targetBoundsCommon)return!1;const i=Math.ceil(e.zoom+.5);if(this.tile)this.bounds=this.targetBoundsCommon;else{const o=(s=this.renderViewport)==null?void 0:s.zoom;r=r||i!==o;const a=Hq(this.targetBoundsCommon,e),l=this.bounds;r=r||!l||a.some((c,u)=>c!==l[u]),this.bounds=a}return r&&(this.renderViewport=$q({bounds:this.bounds,zoom:i,viewport:e})),r}getRenderFramebuffer(){return!this.renderViewport||this.layers.length===0?null:(this.fbo||(this.fbo=qP(this.targetLayer.context.device,{id:this.id})),this.fbo)}getPickingFramebuffer(){return!this.renderViewport||this.layers.length===0&&!this.targetLayer.props.pickable?null:(this.pickingFbo||(this.pickingFbo=qP(this.targetLayer.context.device,{id:`${this.id}-picking`,interpolate:!1})),this.pickingFbo)}filterLayers(e){return e.filter(({id:n})=>this.layers.includes(n))}delete(){const{fbo:e,pickingFbo:n}=this;e&&(e.colorAttachments[0].destroy(),e.destroy()),n&&(n.colorAttachments[0].destroy(),n.destroy())}}function P1e(t,e){return e.filter(n=>{const r=qq(n);return r?I1e(t.boundingBox,r.boundingBox):!0})}function qq(t){for(;t;){const{tile:e}=t.props;if(e)return e;t=t.parent}return null}function I1e(t,e){return t&&e?t[0][0]<e[1][0]&&e[0][0]<t[1][0]&&t[0][1]<e[1][1]&&e[0][1]<t[1][1]:!1}const O1e={blendColorOperation:"max",blendColorSrcFactor:"one",blendColorDstFactor:"one",blendAlphaOperation:"max",blendAlphaSrcFactor:"one",blendAlphaDstFactor:"one"};class M1e extends Ay{getRenderableLayers(e,n){const{layers:r}=n,i=[],s=this._getDrawLayerParams(e,n,!0);for(let o=0;o<r.length;o++){const a=r[o];!a.isComposite&&s[o].shouldDrawLayer&&i.push(a)}return i}renderHeightMap(e,n){const r=e.getRenderFramebuffer(),i=e.renderViewport;!r||!i||(r.resize(i),this.render({...n,target:r,pass:"terrain-height-map",layers:n.layers,viewports:[i],effects:[],clearColor:[0,0,0,0]}))}renderTerrainCover(e,n){const r=e.getRenderFramebuffer(),i=e.renderViewport;if(!r||!i)return;const s=e.filterLayers(n.layers);r.resize(i),this.render({...n,target:r,pass:`terrain-cover-${e.id}`,layers:s,effects:[],viewports:[i],clearColor:[0,0,0,0]})}getLayerParameters(e,n,r){return{...e.props.parameters,blend:!0,depthCompare:"always",...e.props.operation.includes("terrain")&&O1e}}getShaderModuleProps(e,n,r){return{terrain:{project:r.project}}}}class R1e extends pM{constructor(){super(...arguments),this.drawParameters={}}getRenderableLayers(e,n){const{layers:r}=n,i=[];this.drawParameters={},this._resetColorEncoder(n.pickZ);const s=this._getDrawLayerParams(e,n);for(let o=0;o<r.length;o++){const a=r[o];!a.isComposite&&s[o].shouldDrawLayer&&(i.push(a),this.drawParameters[a.id]=s[o].layerParameters)}return i}renderTerrainCover(e,n){const r=e.getPickingFramebuffer(),i=e.renderViewport;if(!r||!i)return;const s=e.filterLayers(n.layers),o=e.targetLayer;o.props.pickable&&s.unshift(o),r.resize(i),this.render({...n,pickingFBO:r,pass:`terrain-cover-picking-${e.id}`,layers:s,effects:[],viewports:[i],cullRect:void 0,deviceRect:i,pickZ:!1})}getLayerParameters(e,n,r){let i;return this.drawParameters[e.id]?i=this.drawParameters[e.id]:(i=super.getLayerParameters(e,n,r),i.blend=!0),{...i,depthCompare:"always"}}getShaderModuleProps(e,n,r){return{terrain:{project:r.project}}}}const cD=2048;class uD{static isSupported(e){return e.isTextureFormatRenderable("rgba32float")}constructor(e){this.renderViewport=null,this.bounds=null,this.layers=[],this.layersBounds=[],this.layersBoundsCommon=null,this.lastViewport=null,this.device=e}getRenderFramebuffer(){return this.renderViewport?(this.fbo||(this.fbo=qP(this.device,{id:"height-map",float:!0})),this.fbo):null}shouldUpdate({layers:e,viewport:n}){const r=e.length!==this.layers.length||e.some((s,o)=>s!==this.layers[o]||s.props.transitions||s.getBounds()!==this.layersBounds[o]);r&&(this.layers=e,this.layersBounds=e.map(s=>s.getBounds()),this.layersBoundsCommon=Wq(e,n));const i=!this.lastViewport||!n.equals(this.lastViewport);if(!this.layersBoundsCommon)this.renderViewport=null;else if(r||i){const s=Hq(this.layersBoundsCommon,n);if(s[2]<=s[0]||s[3]<=s[1])return this.renderViewport=null,!1;this.bounds=s,this.lastViewport=n;const o=n.scale,a=(s[2]-s[0])*o,l=(s[3]-s[1])*o;return this.renderViewport=a>0||l>
33460?$q({bounds:[n.center[0]-1,n.center[1]-1,n.center[0]+1,n.center[1]+1],zoom:n.zoom,width:Math.min(a,cD),height:Math.min(l,cD),viewport:n}):null,!0}return!1}delete(){this.fbo&&(this.fbo.colorAttachments[0].delete(),this.fbo.delete())}}class k1e{constructor(){this.id="terrain-effect",this.props=null,this.useInPicking=!0,this.isPicking=!1,this.isDrapingEnabled=!1,this.terrainCovers=new Map}setup({device:e,deck:n}){this.dummyHeightMap=e.createTexture({width:1,height:1,data:new Uint8Array([0,0,0,0])}),this.terrainPass=new M1e(e,{id:"terrain"}),this.terrainPickingPass=new R1e(e,{id:"terrain-picking"}),uD.isSupported(e)?this.heightMap=new uD(e):Zt.warn("Terrain offset mode is not supported by this browser")(),n._addDefaultShaderModule(HP)}preRender(e){if(e.pickZ){this.isDrapingEnabled=!1;return}const{viewports:n}=e,r=e.pass.startsWith("picking");this.isPicking=r,this.isDrapingEnabled=!0;const i=n[0],s=(r?this.terrainPickingPass:this.terrainPass).getRenderableLayers(i,e),o=s.filter(l=>l.props.operation.includes("terrain"));if(o.length===0)return;r||s.filter(c=>c.state.terrainDrawMode==="offset").length>0&&this._updateHeightMap(o,i,e);const a=s.filter(l=>l.state.terrainDrawMode==="drape");this._updateTerrainCovers(o,a,i,e)}getShaderModuleProps(e,n){var i,s,o;const{terrainDrawMode:r}=e.state;return{terrain:{project:n.project,isPicking:this.isPicking,heightMap:((s=(i=this.heightMap)==null?void 0:i.getRenderFramebuffer())==null?void 0:s.colorAttachments[0].texture)||null,heightMapBounds:(o=this.heightMap)==null?void 0:o.bounds,dummyHeightMap:this.dummyHeightMap,terrainCover:this.isDrapingEnabled?this.terrainCovers.get(e.id):null,useTerrainHeightMap:r==="offset",terrainSkipRender:r==="drape"||!e.props.operation.includes("draw")}}}cleanup({deck:e}){this.dummyHeightMap&&(this.dummyHeightMap.delete(),this.dummyHeightMap=void 0),this.heightMap&&(this.heightMap.delete(),this.heightMap=void 0);for(const n of this.terrainCovers.values())n.delete();this.terrainCovers.clear(),e._removeDefaultShaderModule(HP)}_updateHeightMap(e,n,r){!this.heightMap||!this.heightMap.shouldUpdate({layers:e,viewport:n})||this.terrainPass.renderHeightMap(this.heightMap,{...r,layers:e,shaderModuleProps:{terrain:{heightMapBounds:this.heightMap.bounds,dummyHeightMap:this.dummyHeightMap,drawToTerrainHeightMap:!0},project:{devicePixelRatio:1}}})}_updateTerrainCovers(e,n,r,i){const s={};for(const o of n)o.state.terrainCoverNeedsRedraw&&(s[o.id]=!0,o.state.terrainCoverNeedsRedraw=!1);for(const o of this.terrainCovers.values())o.isDirty=o.isDirty||o.shouldUpdate({layerNeedsRedraw:s});for(const o of e)this._updateTerrainCover(o,n,r,i);this.isPicking||this._pruneTerrainCovers()}_updateTerrainCover(e,n,r,i){const s=this.isPicking?this.terrainPickingPass:this.terrainPass;let o=this.terrainCovers.get(e.id);o||(o=new C1e(e),this.terrainCovers.set(e.id,o));try{const a=o.shouldUpdate({targetLayer:e,viewport:r,layers:n});(this.isPicking||o.isDirty||a)&&(s.renderTerrainCover(o,{...i,layers:n,shaderModuleProps:{terrain:{dummyHeightMap:this.dummyHeightMap,terrainSkipRender:!1},project:{devicePixelRatio:1}}}),this.isPicking||(o.isDirty=!1))}catch(a){e.raiseError(a,`Error rendering terrain cover ${o.id}`)}}_pruneTerrainCovers(){const e=[];for(const[n,r]of this.terrainCovers)r.isActive||e.push(n);for(const n of e)this.terrainCovers.delete(n)}}const N1e={terrainDrawMode:void 0};class tA extends pd{getShaders(){return{modules:[HP]}}initializeState(){var e;(e=this.context.deck)==null||e._addDefaultEffect(new k1e)}updateState(e){var s;const{props:n,oldProps:r}=e;if(this.state.terrainDrawMode&&n.terrainDrawMode===r.terrainDrawMode&&n.extruded===r.extruded)return;let{terrainDrawMode:i}=n;if(!i){const o=this.props.extruded,a=(s=this.getAttributeManager())==null?void 0:s.attributes,l=a&&"instancePositions"in a;i=o||l?"offset":"drape"}this.setState({terrainDrawMode:i})}onNeedsRedraw(){const e=this.state;e.terrainDrawMode==="drape"&&(e.terrainCoverNeedsRedraw=!0)}}tA.defaultProps=N1e;tA.extensionName="TerrainExtension";function fD(t,e){const n=e==null?void 0:e.globalFeatureId;return n!==void 0?D1e(t,n):B1e(t,e==null?void 0:e.type)}function D1e(t,e){const n=Qq(t);for(const r of n){let i=0,s=r.featureIds.value[0];for(let o=0;o<r.featureIds.value.length;o++){const a=r.featureIds.value[o];
3346if(a!==s){if(e===r.globalFeatureIds.value[i])return fw(r,i,o);i=o,s=a}}if(e===r.globalFeatureIds.value[i])return fw(r,i,r.featureIds.value.length)}throw new Error(`featureId:${e} not found`)}function B1e(t,e){const n=Qq(t);return F1e(n)}function L1e(t,e,n){switch(t.type){case"Point":return V1e(t,e,n);case"LineString":return j1e(t,e,n);case"Polygon":return Xq(t,e,n);default:const r=t;throw new Error(`Unsupported geometry type: ${r==null?void 0:r.type}`)}}function Qq(t,e){const n=[];return t.points&&(t.points.type="Point",n.push(t.points)),t.lines&&(t.lines.type="LineString",n.push(t.lines)),t.polygons&&(t.polygons.type="Polygon",n.push(t.polygons)),n}function F1e(t){const e=[];for(const n of t){if(n.featureIds.value.length===0)continue;let r=0,i=n.featureIds.value[0];for(let s=0;s<n.featureIds.value.length;s++){const o=n.featureIds.value[s];o!==i&&(e.push(fw(n,r,s)),r=s,i=o)}e.push(fw(n,r,n.featureIds.value.length))}return e}function fw(t,e,n){const r=L1e(t,e,n),i=z1e(t,e),s=U1e(t,e);return{type:"Feature",geometry:r,properties:i,...s}}function U1e(t,e=0,n){return t.fields&&t.fields[t.featureIds.value[e]]}function z1e(t,e=0,n){const r=Object.assign({},t.properties[t.featureIds.value[e]]);for(const i in t.numericProps)r[i]=t.numericProps[i].value[e];return r}function Xq(t,e=-1/0,n=1/0){const{positions:r}=t,i=t.polygonIndices.value.filter(l=>l>=e&&l<=n),s=t.primitivePolygonIndices.value.filter(l=>l>=e&&l<=n);if(!(i.length>2)){const l=[];for(let c=0;c<s.length-1;c++){const u=s[c],h=s[c+1],d=hw(r,u,h);l.push(d)}return{type:"Polygon",coordinates:l}}const a=[];for(let l=0;l<i.length-1;l++){const c=i[l],u=i[l+1],h=Xq(t,c,u).coordinates;a.push(h)}return{type:"MultiPolygon",coordinates:a}}function j1e(t,e=-1/0,n=1/0){const{positions:r}=t,i=t.pathIndices.value.filter(a=>a>=e&&a<=n);if(!(i.length>2))return{type:"LineString",coordinates:hw(r,i[0],i[1])};const o=[];for(let a=0;a<i.length-1;a++){const l=hw(r,i[a],i[a+1]);o.push(l)}return{type:"MultiLineString",coordinates:o}}function V1e(t,e,n){const{positions:r}=t,i=hw(r,e,n);return i.length>1?{type:"MultiPoint",coordinates:i}:{type:"Point",coordinates:i[0]}}function hw(t,e,n){e=e||0,n=n||t.value.length/t.size;const r=[];for(let i=e;i<n;i++){const s=Array();for(let o=i*t.size;o<(i+1)*t.size;o++)s.push(Number(t.value[o]));r.push(s)}return r}const W1e="4.3.3",Yq={dataType:null,batchType:null,name:"Mapbox Vector Tile",id:"mvt",module:"mvt",version:W1e,extensions:["mvt","pbf"],mimeTypes:["application/vnd.mapbox-vector-tile","application/x-protobuf"],worker:!0,category:"geometry",options:{mvt:{shape:"geojson",coordinates:"local",layerProperty:"layerName",layers:void 0,tileIndex:void 0}}};({...Yq});const $1e={Point:Kq,MultiPoint:H1e,LineString:Gq,MultiLineString:q1e,Polygon:Zq,MultiPolygon:Q1e};function Kq([t,e],[n,r],i){const s=Sl(n[0],r[0],t),o=Sl(n[1],r[1],e);return i.unprojectFlat([s,o])}function BM(t,e,n){return t.map(r=>Kq(r,e,n))}function H1e(t,e,n){return BM(t,e,n)}function Gq(t,e,n){return BM(t,e,n)}function q1e(t,e,n){return t.map(r=>Gq(r,e,n))}function Zq(t,e,n){return t.map(r=>BM(r,e,n))}function Q1e(t,e,n){return t.map(r=>Zq(r,e,n))}function X1e(t,e,n){const r=n.projectFlat([e.west,e.north]),i=n.projectFlat([e.east,e.south]),s=[r,i];return{...t,coordinates:$1e[t.type](t.coordinates,s,n)}}const Y1e=["points","lines","polygons"];function K1e(t,e,n,r){for(const i of Y1e){const s=t[i]&&G1e(t[i],e,n,r);if(s>=0)return s}return-1}function G1e(t,e,n,r){const i=t.featureIds.value;if(!i.length)return-1;let s=0,o=i[i.length-1]+1;if(r){const l=Z1e(t,r);if(l)s=l[0],o=l[1]+1;else return-1}let a=-1;if(e in t.numericProps){const l=t.numericProps[e].value.findIndex((c,u)=>c===n&&i[u]>=s&&i[u]<o);return l>=0?t.globalFeatureIds.value[l]:-1}else e?a=hD(t.properties,l=>l[e]===n,s,o):t.fields&&(a=hD(t.fields,l=>l.id===n,s,o));return a>=0?J1e(t,a):-1}function Z1e(t,e){if(!t.__layers){const n={},{properties:r}=t;for(let i=0;i<r.length;i++){const{layerName:s}=r[i];s&&(n[s]?n[s][1]=i:n[s]=[i,i])}t.__layers=n}return t.__layers[e]}function J1e(t,e){if(!t.__ids){const n=[],r=t.featureIds.value,i=t.globalFeatureIds.value;for(let s=0;s<r.length;s++)n[r[s]]=i[s];t.__ids=n}return t.__ids[e]}function hD(t,e,n,r){for(let i=n;i<r;i++)if(e(t[i],i))return i;return-1}const LE=512,eve={...gd.defaultProps,data:lw,onDataLoad:{type:"function",value:null,optional:!0,compare:!1},uniqueIdProperty:"",highlightedFeatureId:null,loaders:[Yq],binary:!0};class LM extends Sy{initializeState(){super.initializeState();const e=this.context.viewport.resolution!==void 0?!1:this.props.binary;this.setState({binary:e,data:null,tileJSON:null,hoveredFeatureId:null,hoveredFeatureLayerName:null})}get isLoaded(){var e;return!!((e=this.state)!=null&&e.data&&super.isLoaded)}updateState({props:e,oldProps:n,context:r,changeFlags:i}){var o;i.dataChanged&&this._updateTileData(),(o=this.state)!=null&&o.data&&(super.updateState({props:e,oldProps:n,context:r,changeFlags:i}),this._setWGS84PropertyForTiles());const{highlightColor:s}=e;s!==n.highlightColor&&Array.isArray(s)&&this.setState({highlightColor:s})}async _updateTileData(){let e=this.props.data,n=null;if(typeof e=="string"&&!w0e(e)){const{onDataLoad:r,fetch:i}=this.props;this.setState({data:null,tileJSON:null});try{n=await i(e,{propName:"data",layer:this,loaders:[]})}catch(s){this.raiseError(s,"loading TileJSON"),e=null}r&&r(n,{propName:"data",layer:this})}else e&&typeof e=="object"&&"tilejson"in e&&(n=e);n&&(e=n.tiles),this.setState({data:e,tileJSON:n})}_getTilesetOptions(){const e=super._getTilesetOptions(),n=this.state.tileJSON,{minZoom:r,maxZoom:i}=this.props;return n&&(Number.isFinite(n.minzoom)&&n.minzoom>r&&(e.minZoom=n.minzoom),Number.isFinite(n.maxzoom)&&(!Number.isFinite(i)||n.maxzoom<i)&&(e.maxZoom=n.maxzoom)),e}renderLayers(){var e;return(e=this.state)!=null&&e.data?super.renderLayers():null}getTileData(e){const{data:n,binary:r}=this.state,{index:i,signal:s}=e,o=cw(n,e);if(!o)return Promise.reject("Invalid URL");let a=this.getLoadOptions();const{fetch:l}=this.props;return a={...a,mimeType:"application/x-protobuf",mvt:{...a==null?void 0:a.mvt,coordinates:this.context.viewport.resolution?"wgs84":"local",tileIndex:i},gis:r?{format:"binary"}:{}},l(o,{propName:"data",layer:this,loadOptions:a,signal:s})}renderSubLayers(e){const{x:n,y:r,z:i}=e.tile.index,s=Math.pow(2,i),o=LE/s,a=-o,l=LE*n/s,c=LE*(1-r/s),u=new fi().scale([o,a,1]);e.autoHighlight=!1,this.context.viewport.resolution||(e.modelMatrix=u,e.coordinateOrigin=[l,c,0],e.coordinateSystem=Wt.CARTESIAN,e.extensions=[...e.extensions||[],new Ty]);const h=super.renderSubLayers(e);return this.state.binary&&!(h instanceof gd)&&Zt.warn("renderSubLayers() must return GeoJsonLayer when using binary:true")(),h}_updateAutoHighlight(e){const{uniqueIdProperty:n}=this.props,{hoveredFeatureId:r,hoveredFeatureLayerName:i}=this.state,s=e.object;let o=null,a=null;s&&(o=FE(s,n),a=dD(s));let{highlightColor:l}=this.props;typeof l=="function"&&(l=l(e)),(r!==o||i!==a)&&this.setState({highlightColor:l,hoveredFeatureId:o,hoveredFeatureLayerName:a})}_isWGS84(){return!!this.context.viewport.resolution}getPickingInfo(e){const n=super.getPickingInfo(e);if(this.state.binary&&n.index!==-1){const{data:r}
3346=e.sourceLayer.props;n.object=fD(r,{globalFeatureId:n.index})}return n.object&&!this._isWGS84()&&(n.object=gD(n.object,n.tile.bbox,this.context.viewport)),n}getSubLayerPropsByTile(e){return{highlightedObjectIndex:this.getHighlightedObjectIndex(e),highlightColor:this.state.highlightColor}}getHighlightedObjectIndex(e){const{hoveredFeatureId:n,hoveredFeatureLayerName:r,binary:i}=this.state,{uniqueIdProperty:s,highlightedFeatureId:o}=this.props,a=e.content,l=pD(o);if(!(pD(n)||l))return-1;const u=l?o:n;return Array.isArray(a)?a.findIndex(h=>{const d=FE(h,s)===u,m=l||dD(h)===r;return d&&m}):a&&i?K1e(a,s,u,l?"":r):-1}_pickObjects(e){const{deck:n,viewport:r}=this.context,i=r.width,s=r.height,o=r.x,a=r.y,l=[this.id];return n.pickObjects({x:o,y:a,width:i,height:s,layerIds:l,maxObjects:e})}getRenderedFeatures(e=null){const n=this._pickObjects(e),r=new Set,i=[];for(const s of n){const o=FE(s.object,this.props.uniqueIdProperty);o===void 0?i.push(s.object):r.has(o)||(r.add(o),i.push(s.object))}return i}_setWGS84PropertyForTiles(){const e="dataInWGS84";this.state.tileset.selectedTiles.forEach(r=>{r.hasOwnProperty(e)||Object.defineProperty(r,e,{get:()=>{if(!r.content)return null;if(this.state.binary&&Array.isArray(r.content)&&!r.content.length)return[];const{bbox:i}=r;if(r._contentWGS84===void 0&&x0e(i)){const s=this.state.binary?fD(r.content):r.content;r._contentWGS84=s.map(o=>gD(o,i,this.context.viewport))}return r._contentWGS84}})})}}LM.layerName="MVTLayer";LM.defaultProps=eve;function FE(t,e){if(t.properties&&e)return t.properties[e];if("id"in t)return t.id}function dD(t){var e;return((e=t.properties)==null?void 0:e.layerName)||null}function pD(t){return t!=null&&t!==""}function gD(t,e,n){const r={...t,geometry:{type:t.geometry.type}};return Object.defineProperty(r.geometry,"coordinates",{get:()=>X1e(t.geometry,e,n).coordinates}),r}const Rr={MVT:"mvt",GEOJSON_2D:"geojson-2d",GEOJSON_3D:"geojson-3d",WIND:"wind",GRID:"grid",TERRAIN:"terrain"},tve=500,Jq=[-165,24.5,-66,69.5],mD={longitude:-95.7129,latitude:37.0902,zoom:3,pitch:0,bearing:0,padding:{top:void 0,bottom:void 0,left:void 0,right:void 0}},nve="mapbox://styles/covid-nasa/cmb6kewie00nq01r2b84y3gsj",rve=({id:t="fire-perimeters-mvt",data:e,filterFunction:n,opacity:r=100,onTileLoad:i,onClick:s,lineWidthMinPixels:o=1,updateTriggers:a={}})=>new LM({id:t,data:e,extent:Jq,getFillColor:[255,140,0,180],getLineColor:[255,69,0,255],uniqueIdProperty:"primarykey",lineWidthMinPixels:o,pickable:!0,opacity:r/100,autoHighlight:!0,highlightColor:[255,100,50,220],onClick:s,updateTriggers:{getFilterValue:[n,...a.getFilterValue||[]]},getFilterValue:l=>n?n(l)?1:0:1,filterRange:[1,1],filterEnabled:!0,onTileLoad:i,maxRequests:3,extensions:[new DM({filterSize:1})]});var wt={},z1={exports:{}},ive=z1.exports,vD;function sve(){return vD||(vD=1,(function(t,e){(function(n,r){var i="1.0.41",s="",o="?",a="function",l="undefined",c="object",u="string",h="major",d="model",m="name",y="type",v="vendor",b="version",x="architecture",T="console",E="mobile",C="tablet",I="smarttv",O="wearable",N="embedded",U=500,F="Amazon",H="Apple",W="ASUS",z="BlackBerry",V="Browser",M="Chrome",K="Edge",j="Firefox",q="Google",Y="Honor",X="Huawei",te="Lenovo",D="LG",$="Microsoft",he="Motorola",Se="Nvidia",fe="OnePlus",$e="Opera",Ze="OPPO",ce="Samsung",me="Sharp",de="Sony",ye="Xiaomi",ve="Zebra",ue="Facebook",k="Chromium OS",ie="Mac OS",ne=" Browser",Z=function(_t,Mt){var ht={};for(var $t in _t)Mt[$t]&&Mt[$t].length%2===0?ht[$t]=Mt[$t].concat(_t[$t]):ht[$t]=_t[$t];return ht},J=function(_t){for(var Mt={},ht=0;ht<_t.length;ht++)Mt[_t[ht].toUpperCase()]=_t[ht];return Mt},le=function(_t,Mt){return typeof _t===u?pe(Mt).indexOf(pe(_t))!==-1:!1},pe=function(_t){return _t.toLowerCase()},Te=function(_t){return typeof _t===u?_t.replace(/[^\d\.]/g,s).split(".")[0]:r},we=function(_t,Mt){if(typeof _t===u)return _t=_t.replace(/^\s\s*/,s),typeof Mt===l?_t:_t.substring(0,U)},Qe=function(_t,Mt){for(var ht=0,$t,Zn,on,Ut,Ct,rr;ht<Mt.length&&!Ct;){var di=Mt[ht],Sr=Mt[ht+1];for($t=Zn=0;$t<di.length&&!Ct&&di[$t];)if(Ct=di[$t++].exec(_t),Ct)for(on=0;on<Sr.length;on++)rr=Ct[++Zn],Ut=Sr[on],typeof Ut===c&&Ut.length>0?Ut.length===2?typeof Ut[1]==a?this[Ut[0]]=Ut[1].call(this,rr):this[Ut[0]]=Ut[1]:Ut.length===3?typeof Ut[1]===a&&!(Ut[1].exec&&Ut[1].test)?this[Ut[0]]=rr?Ut[1].call(this,rr,Ut[2]):r:this[Ut[0]]=rr?rr.replace(Ut[1],Ut[2]):r:Ut.length===4&&(this[Ut[0]]=rr?Ut[3].call(this,rr.replace(Ut[1],Ut[2])):r):this[Ut]=rr||r;ht+=2}},nt=function(_t,Mt){for(var ht in Mt)if(typeof Mt[ht]===c&&Mt[ht].length>0){for(var $t=0;$t<Mt[ht].length;$t++)if(le(Mt[ht][$t],_t))return ht===o?r:ht}else if(le(Mt[ht],_t))return ht===o?r:ht;return Mt.hasOwnProperty("*")?Mt["*"]:_t},Xe={"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},ft={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},It={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[b,[m,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[b,[m,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[m,b],[/opios[\/ ]+([\w\.]+)/i],[b,[m,$e+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[b,[m,$e+" GX"]],[/\bopr\/([\w\.]+)/i],[b,[m,$e]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[b,[m,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[b,[m,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon)\/([-\w\.]+)/i,/(heytap|ovi|115)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[m,b],[/quark(?:pc)?\/([-\w\.]+)/i],[b,[m,"Quark"]],[/\bddg\/([\w\.]+)/i],[b,[m,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[b,[m,"UC"+V]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[b,[m,"WeChat"]],[/konqueror\/([\w\.]+)/i],[b,[m,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[b,[m,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[b,[m,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[b,[m,"Smart Lenovo "+V]],[/(avast|avg)\/([\w\.]+)/i],[[m,/(.+
vendor: 11,043 bytes, line 3346
3346)/,"$1 Secure "+V],b],[/\bfocus\/([\w\.]+)/i],[b,[m,j+" Focus"]],[/\bopt\/([\w\.]+)/i],[b,[m,$e+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[b,[m,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[b,[m,"Dolphin"]],[/coast\/([\w\.]+)/i],[b,[m,$e+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[b,[m,"MIUI"+ne]],[/fxios\/([\w\.-]+)/i],[b,[m,j]],[/\bqihoobrowser\/?([\w\.]*)/i],[b,[m,"360"]],[/\b(qq)\/([\w\.]+)/i],[[m,/(.+)/,"$1Browser"],b],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[m,/(.+)/,"$1"+ne],b],[/samsungbrowser\/([\w\.]+)/i],[b,[m,ce+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[b,[m,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[m,"Sogou Mobile"],b],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[m,b],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[m],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[b,m],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[m,ue],b],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/(daum)apps[\/ ]([\w\.]+)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[m,b],[/\bgsa\/([\w\.]+) .*safari\//i],[b,[m,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[b,[m,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[b,[m,M+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[m,M+" WebView"],b],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[b,[m,"Android "+V]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[m,b],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[b,[m,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[b,m],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[m,[b,nt,Xe]],[/(webkit|khtml)\/([\w\.]+)/i],[m,b],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[m,"Netscape"],b],[/(wolvic|librewolf)\/([\w\.]+)/i],[m,b],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[b,[m,j+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/\b(links) \(([\w\.]+)/i],[m,[b,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[m,[b,/master.|lts./,""]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[x,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[x,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[x,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[x,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[x,"arm"]],[/((ppc|powerpc)(64)?)( mac|;|\))/i],[[x,/ower/,s,pe]],[/ sun4\w[;\)]/i],[[x,"sparc"]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i],[[x,pe]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[d,[v,ce],[y,C]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[d,[v,ce],[y,E]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[d,[v,H],[y,E]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[d,[v,H],[y,C]],[/(macintosh);/i],[d,[v,H]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[d,[v,me],[y,E]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[d,[v,Y],[y,C]],[/honor([-\w ]+)[;\)]/i],[d,[v,Y],[y,E]],[/\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i],[d,[v,X],[y,C]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[d,[v,X],[y,E]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[d,/_/g," "],[v,ye],[y,C]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i,/ ([\w ]+) miui\/v?\d/i],[[d,/_/g," "],[v,ye],[y,E]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[d,[v,Ze],[y,E]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[d,[v,nt,{OnePlus:["304","403","203"],"*":Ze}],[y,C]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[d,[v,"Vivo"],[y,E]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[d,[v,"Realme"],[y,E]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto(?! 360)[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[d,[v,he],[y,E]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[d,[v,he],[y,C]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[d,[v,D],[y,C]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv|watch)\w+)/i,/\blg-?([\d\w]+) bui/i],[d,[v,D],[y,E]],[/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i],[d,[v,te],[y,C]],[/(nokia) (t[12][01])/i],[v,d,[y,C]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*))/i],[[d,/_/g," "],[y,E],[v,"Nokia"]],[/(pixel (c|tablet))\b/i],[d,[v,q],[y,C]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[d,[v,q],[y,E]],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[d,[v,de],[y,E]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[d,"Xperia Tablet"],[v,de],[y,C]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[d,[v,fe],[y,E]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[d,[v,F],[y,C]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[d,/(.+)/g,"Fire Phone $1"],[v,F],[y,E]],[/(playbook);[-\w\),; ]+(rim)/i],[d,v,[y,C]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[d,[v,z],[y,E]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[d,[v,W],[y,C]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[d,[v,W],[y,E]],[/(nexus 9)/i],[d,[v,"HTC"],[y,C]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[v,[d,/_/g," "],[y,E]],[/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])\w*(\)| bui)/i],[d,[v,"TCL"],[y,C]],[/(itel) ((\w+))/i],[[v,pe],d,[y,nt,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[d,[v,"Acer"],[y,C]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[d,[v,"Meizu"],[y,E]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[d,[v,"Ulefone"],[y,E]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[d,[v,"Energizer"],[y,E]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[d,[v,"Cat"],[y,E]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[d,[v,"Smartfren"],[y,E]],[/droid.+; (a(?:015|06[35]|142p?))/i],[d,[v,"Nothing"],[y,E]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[d,[v,"Archos"],[y,C]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[d,[v,"Archos"],[y,E]],[/(imo) (tab \w+)/i,/(infinix) (x1101b?)/i],[v,d,[y,C]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (hmd|imo) ([\w ]+?)(?: bui|\))/i,/(hp) ([\w ]+\w)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i,/(oppo) ?([\w ]+) bui/i],[v,d,[y,E]],[/(kobo)\s(ereader|touch)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[v,d,[y,C]],[/(surface duo)/i],[d,[v,$],[y,C]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[d,[v,"Fairphone"],[y,E]],[/(u304aa)/i],[d,[v,"AT&T"],[y,E]],[/\bsie-(\w*)/i],[d,[v,"Siemens"],[y,E]],[/\b(rct\w+) b/i],[d,[v,"RCA"],[y,C]],[/\b(venue[\d ]{2,7}) b/i],[d,[v,"Dell"],[y,C]],[/\b(q(?:mv|ta)\w+) b/i],[d,[v,"Verizon"],[y,C]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[d,[v,"Barnes & Noble"],[y,C]],[/\b(tm\d{3}\w+) b/i],[d,[v,"NuVision"],[y,C]],[/\b(k88) b/i],[d,[v,"ZTE"],[y,C]],[/\b(nx\d{3}j) b/i],[d,[v,"ZTE"],[y,E]],[/\b(gen\d{3}) b.+49h/i],[d,[v,"Swiss"],[y,E]],[/\b(zur\d{3}) b/i],[d,[v,"Swiss"],[y,C]],[/\b((zeki)?tb.*\b) b/i],[d,[v,"Zeki"],[y,C]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[v,"Dragon Touch"],d,[y,C]],[/\b(ns-?\w{0,9}) b/i],[d,[v,"Insignia"],[y,C]],[/\b((nxa|next)-?\w{0,9}) b/i],[d,[v,"NextBook"],[y,C]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[v,"Voice"],d,[y,E]],[/\b(lvtel\-)?(v1[12]) b/i],[[v,"LvTel"],d,[y,E]],[/\b(ph-1) /i],[d,[v,"Essential"],[y,E]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[d,[v,"Envizen"],[y,C]],[/\b(trio[-\w\. ]+) b/i],[d,[v,"MachSpeed"],[y,C]],[/\btu_(1491) b/i],[d,[v,"Rotor"],[y,C]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[d,[v,Se],[y,C]],[/(sprint) (\w+)/i],[v,d,[y,E]],[/(kin\.[onetw]{3})/i],[[d,/\./g," "],[v,$],[y,E]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[d,[v,ve],[y,C]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[d,[v,ve],[y,E]],[/smart-tv.+(samsung)/i],[v,[y,I]],[/hbbtv.+maple;(\d+)/i],[[d,/^/,"SmartTV"],[v,ce],[y,I]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[v,D],[y,I]],[/(apple) ?tv/i],[v,[d,H+" TV"],[y,I]],[/crkey/i],[[d,M+"cast"],[v,q],[y,I]],[/droid.+aft(\w+)( bui|\))/i],[d,[v,F],[y,I]],[/(shield \w+ tv)/i],[d,[v,Se],[y,I]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[d,[v,me],[y,I]],[/(bravia[\w ]+)( bui|\))/i],[d,[v,de],[y,I]],[/(mi(tv|box)-?\w+) bui/i],[d,[v,ye],[y,I]],[/Hbbtv.*(technisat) (.*);/i],[v,d,[y,I]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[v,we],[d,we],[y,I]],[/droid.+; ([\w- ]+) (?:android tv|smart[- ]?tv)/i],[d,[y,I]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[y,I]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[v,d,[y,T]],[/droid.+; (shield)( bui|\))/i],[d,[v,Se],[y,T]],[/(playstation \w+)/i],[d,[v,de],[y,T]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[d,[v,$],[y,T]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[d,[v,ce],[y,O]],[/((pebble))app/i,/(asu
vendor: 2,014 bytes, line 3346
3346s|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[v,d,[y,O]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[d,[v,Ze],[y,O]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[d,[v,H],[y,O]],[/(opwwe\d{3})/i],[d,[v,fe],[y,O]],[/(moto 360)/i],[d,[v,he],[y,O]],[/(smartwatch 3)/i],[d,[v,de],[y,O]],[/(g watch r)/i],[d,[v,D],[y,O]],[/droid.+; (wt63?0{2,3})\)/i],[d,[v,ve],[y,O]],[/droid.+; (glass) \d/i],[d,[v,q],[y,O]],[/(pico) (4|neo3(?: link|pro)?)/i],[v,d,[y,O]],[/; (quest( \d| pro)?)/i],[d,[v,ue],[y,O]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[v,[y,N]],[/(aeobc)\b/i],[d,[v,F],[y,N]],[/(homepod).+mac os/i],[d,[v,H],[y,N]],[/windows iot/i],[[y,N]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[d,[y,E]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[d,[y,C]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[y,C]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[y,E]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[d,[v,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[b,[m,K+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[m,b],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[b,[m,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[m,b],[/ladybird\//i],[[m,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[b,m]],os:[[/microsoft (windows) (vista|xp)/i],[m,b],[/(windows (?:phone(?: os)?|mobile|iot))[\/ ]?([\d\.\w ]*)/i],[m,[b,nt,ft]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[b,nt,ft],[m,"Windows"]],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[b,/_/g,"."],[m,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[m,ie],[b,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[b,m],[/(ubuntu) ([\w\.]+) like android/i],[[m,/(.+
vendor: 4,341 bytes, line 3346
3346)/,"$1 Touch"],b],[/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen|webos)\w*[-\/; ]?([\d\.]*)/i],[m,b],[/\(bb(10);/i],[b,[m,z]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[b,[m,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[b,[m,j+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[b,[m,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[b,[m,"watchOS"]],[/crkey\/([\d\.]+)/i],[b,[m,M+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[m,k],b],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux)(?: arm\w*| x86\w*| ?)([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[m,b],[/(sunos) ?([\w\.\d]*)/i],[[m,"Solaris"],b],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[m,b]]},gt=function(_t,Mt){if(typeof _t===c&&(Mt=_t,_t=r),!(this instanceof gt))return new gt(_t,Mt).getResult();var ht=typeof n!==l&&n.navigator?n.navigator:r,$t=_t||(ht&&ht.userAgent?ht.userAgent:s),Zn=ht&&ht.userAgentData?ht.userAgentData:r,on=Mt?Z(It,Mt):It,Ut=ht&&ht.userAgent==$t;return this.getBrowser=function(){var Ct={};return Ct[m]=r,Ct[b]=r,Qe.call(Ct,$t,on.browser),Ct[h]=Te(Ct[b]),Ut&&ht&&ht.brave&&typeof ht.brave.isBrave==a&&(Ct[m]="Brave"),Ct},this.getCPU=function(){var Ct={};return Ct[x]=r,Qe.call(Ct,$t,on.cpu),Ct},this.getDevice=function(){var Ct={};return Ct[v]=r,Ct[d]=r,Ct[y]=r,Qe.call(Ct,$t,on.device),Ut&&!Ct[y]&&Zn&&Zn.mobile&&(Ct[y]=E),Ut&&Ct[d]=="Macintosh"&&ht&&typeof ht.standalone!==l&&ht.maxTouchPoints&&ht.maxTouchPoints>2&&(Ct[d]="iPad",Ct[y]=C),Ct},this.getEngine=function(){var Ct={};return Ct[m]=r,Ct[b]=r,Qe.call(Ct,$t,on.engine),Ct},this.getOS=function(){var Ct={};return Ct[m]=r,Ct[b]=r,Qe.call(Ct,$t,on.os),Ut&&!Ct[m]&&Zn&&Zn.platform&&Zn.platform!="Unknown"&&(Ct[m]=Zn.platform.replace(/chrome os/i,k).replace(/macos/i,ie)),Ct},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return $t},this.setUA=function(Ct){return $t=typeof Ct===u&&Ct.length>U?we(Ct,U):Ct,this},this.setUA($t),this};gt.VERSION=i,gt.BROWSER=J([m,b,h]),gt.CPU=J([x]),gt.DEVICE=J([d,v,y,T,E,I,C,O,N]),gt.ENGINE=gt.OS=J([m,b]),t.exports&&(e=t.exports=gt),e.UAParser=gt;var Yt=typeof n!==l&&(n.jQuery||n.Zepto);if(Yt&&!Yt.ua){var en=new gt;Yt.ua=en.getResult(),Yt.ua.get=function(){return en.getUA()},Yt.ua.set=function(_t){en.setUA(_t);var Mt=en.getResult();for(var ht in Mt)Yt.ua[ht]=Mt[ht]}}})(typeof window=="object"?window:ive)})(z1,z1.exports)),z1.exports}var yD;function ove(){if(yD)return wt;yD=1,Object.defineProperty(wt,"__esModule",{value:!0});function t(Fe){return Fe&&typeof Fe=="object"&&"default"in Fe?Fe.default:Fe}var e=my(),n=t(e),r=sve(),i=new r,s=i.getBrowser(),o=i.getCPU(),a=i.getDevice(),l=i.getEngine(),c=i.getOS(),u=i.getUA(),h=function(be){return i.setUA(be)},d=function(be){if(!be){console.error("No userAgent string was provided");return}var Ce=new r(be);return{UA:Ce,browser:Ce.getBrowser(),cpu:Ce.getCPU(),device:Ce.getDevice(),engine:Ce.getEngine(),os:Ce.getOS(),ua:Ce.getUA(),setUserAgent:function(Ye){return Ce.setUA(Ye)}}},m=Object.freeze({ClientUAInstance:i,browser:s,cpu:o,device:a,engine:l,os:c,ua:u,setUa:h,parseUserAgent:d});function y(Fe,be){var Ce=Object.keys(Fe);if(Object.getOwnPropertySymbols){var Ve=Object.getOwnPropertySymbols(Fe);be&&(Ve=Ve.filter(function(Ye){return Object.getOwnPropertyDescriptor(Fe,Ye).enumerable})),Ce.push.apply(Ce,Ve)}return Ce}function v(Fe){for(var be=1;be<arguments.length;be++){var Ce=arguments[be]!=null?arguments[be]:{};
3346be%2?y(Object(Ce),!0).forEach(function(Ve){C(Fe,Ve,Ce[Ve])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Fe,Object.getOwnPropertyDescriptors(Ce)):y(Object(Ce)).forEach(function(Ve){Object.defineProperty(Fe,Ve,Object.getOwnPropertyDescriptor(Ce,Ve))})}return Fe}function b(Fe){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?b=function(be){return typeof be}:b=function(be){return be&&typeof Symbol=="function"&&be.constructor===Symbol&&be!==Symbol.prototype?"symbol":typeof be},b(Fe)}function x(Fe,be){if(!(Fe instanceof be))throw new TypeError("Cannot call a class as a function")}function T(Fe,be){for(var Ce=0;Ce<be.length;Ce++){var Ve=be[Ce];Ve.enumerable=Ve.enumerable||!1,Ve.configurable=!0,"value"in Ve&&(Ve.writable=!0),Object.defineProperty(Fe,Ve.key,Ve)}}function E(Fe,be,Ce){return be&&T(Fe.prototype,be),Fe}function C(Fe,be,Ce){return be in Fe?Object.defineProperty(Fe,be,{value:Ce,enumerable:!0,configurable:!0,writable:!0}):Fe[be]=Ce,Fe}function I(){return I=Object.assign||function(Fe){for(var be=1;be<arguments.length;be++){var Ce=arguments[be];for(var Ve in Ce)Object.prototype.hasOwnProperty.call(Ce,Ve)&&(Fe[Ve]=Ce[Ve])}return Fe},I.apply(this,arguments)}function O(Fe,be){if(typeof be!="function"&&be!==null)throw new TypeError("Super expression must either be null or a function");Fe.prototype=Object.create(be&&be.prototype,{constructor:{value:Fe,writable:!0,configurable:!0}}),be&&U(Fe,be)}function N(Fe){return N=Object.setPrototypeOf?Object.getPrototypeOf:function(Ce){return Ce.__proto__||Object.getPrototypeOf(Ce)},N(Fe)}function U(Fe,be){return U=Object.setPrototypeOf||function(Ve,Ye){return Ve.__proto__=Ye,Ve},U(Fe,be)}function F(Fe,be){if(Fe==null)return{};var Ce={},Ve=Object.keys(Fe),Ye,Vt;for(Vt=0;Vt<Ve.length;Vt++)Ye=Ve[Vt],!(be.indexOf(Ye)>=0)&&(Ce[Ye]=Fe[Ye]);return Ce}function H(Fe,be){if(Fe==null)return{};var Ce=F(Fe,be),Ve,Ye;if(Object.getOwnPropertySymbols){var Vt=Object.getOwnPropertySymbols(Fe);for(Ye=0;Ye<Vt.length;Ye++)Ve=Vt[Ye],!(be.indexOf(Ve)>=0)&&Object.prototype.propertyIsEnumerable.call(Fe,Ve)&&(Ce[Ve]=Fe[Ve])}return Ce}function W(Fe){if(Fe===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Fe}function z(Fe,be){if(be&&(typeof be=="object"||typeof be=="function"))return be;if(be!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return W(Fe)}function V(Fe,be){return M(Fe)||K(Fe,be)||j(Fe,be)||Y()}function M(Fe){if(Array.isArray(Fe))return Fe}function K(Fe,be){var Ce=Fe==null?null:typeof Symbol<"u"&&Fe[Symbol.iterator]||Fe["@@iterator"];if(Ce!=null){var Ve=[],Ye=!0,Vt=!1,Ln,Kr;try{for(Ce=Ce.call(Fe);!(Ye=(Ln=Ce.next()).done)&&(Ve.push(Ln.value),!(be&&Ve.length===be));Ye=!0);}catch(Xc){Vt=!0,Kr=Xc}finally{try{!Ye&&Ce.return!=null&&Ce.return()}finally{if(Vt)throw Kr}}return Ve}}function j(Fe,be){if(Fe){if(typeof Fe=="string")return q(Fe,be);var Ce=Object.prototype.toString.call(Fe).slice(8,-1);if(Ce==="Object"&&Fe.constructor&&(Ce=Fe.constructor.name),Ce==="Map"||Ce==="Set")return Array.from(Fe);if(Ce==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Ce))return q(Fe,be)}}function q(Fe,be){(be==null||be>Fe.length)&&(be=Fe.length);for(var Ce=0,Ve=new Array(be);Ce<be;Ce++)Ve[Ce]=Fe[Ce];return Ve}function Y(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
3347In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var X={Mobile:"mobile",Tablet:"tablet",SmartTv:"smarttv",Console:"console",Wearable:"wearable",Embedded:"embedded",Browser:void 0},te={Chrome:"Chrome",Firefox:"Firefox",Opera:"Opera",Yandex:"Yandex",Safari:"Safari",InternetExplorer:"Internet Explorer",Edge:"Edge",Chromium:"Chromium",Ie:"IE",MobileSafari:"Mobile Safari",EdgeChromium:"Edge Chromium",MIUI:"MIUI Browser",SamsungBrowser:"Samsung Browser"},D={IOS:"iOS",Android:"Android",WindowsPhone:"Windows Phone",Windows:"Windows",MAC_OS:"Mac OS"},$={isMobile:!1,isTablet:!1,isBrowser:!1,isSmartTV:!1,isConsole:!1,isWearable:!1},he=function(be){switch(be){case X.Mobile:return{isMobile:!0};case X.Tablet:return{isTablet:!0};case X.SmartTv:return{isSmartTV:!0};case X.Console:return{isConsole:!0};case X.Wearable:return{isWearable:!0};case X.Browser:return{isBrowser:!0};case X.Embedded:return{isEmbedded:!0};default:return $}},Se=function(be){return h(be)},fe=function(be){var Ce=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"none";return be||Ce},$e=function(){return typeof window<"u"&&(window.navigator||navigator)?window.navigator||navigator:!1}
3347,Ze=function(be){var Ce=$e();return Ce&&Ce.platform&&(Ce.platform.indexOf(be)!==-1||Ce.platform==="MacIntel"&&Ce.maxTouchPoints>1&&!window.MSStream)},ce=function(be,Ce,Ve,Ye,Vt){return{isBrowser:be,browserMajorVersion:fe(Ce.major),browserFullVersion:fe(Ce.version),browserName:fe(Ce.name),engineName:fe(Ve.name),engineVersion:fe(Ve.version),osName:fe(Ye.name),osVersion:fe(Ye.version),userAgent:fe(Vt)}},me=function(be,Ce,Ve,Ye){return v({},be,{vendor:fe(Ce.vendor),model:fe(Ce.model),os:fe(Ve.name),osVersion:fe(Ve.version),ua:fe(Ye)})},de=function(be,Ce,Ve,Ye){return{isSmartTV:be,engineName:fe(Ce.name),engineVersion:fe(Ce.version),osName:fe(Ve.name),osVersion:fe(Ve.version),userAgent:fe(Ye)}},ye=function(be,Ce,Ve,Ye){return{isConsole:be,engineName:fe(Ce.name),engineVersion:fe(Ce.version),osName:fe(Ve.name),osVersion:fe(Ve.version),userAgent:fe(Ye)}},ve=function(be,Ce,Ve,Ye){return{isWearable:be,engineName:fe(Ce.name),engineVersion:fe(Ce.version),osName:fe(Ve.name),osVersion:fe(Ve.version),userAgent:fe(Ye)}},ue=function(be,Ce,Ve,Ye,Vt){return{isEmbedded:be,vendor:fe(Ce.vendor),model:fe(Ce.model),engineName:fe(Ve.name),engineVersion:fe(Ve.version),osName:fe(Ye.name),osVersion:fe(Ye.version),userAgent:fe(Vt)}};function k(Fe){var be=Fe?d(Fe):m,Ce=be.device,Ve=be.browser,Ye=be.engine,Vt=be.os,Ln=be.ua,Kr=he(Ce.type),Xc=Kr.isBrowser,Pf=Kr.isMobile,Yc=Kr.isTablet,ql=Kr.isSmartTV,If=Kr.isConsole,Tn=Kr.isWearable,Wa=Kr.isEmbedded;if(Xc)return ce(Xc,Ve,Ye,Vt,Ln);if(ql)return de(ql,Ye,Vt,Ln);if(If)return ye(If,Ye,Vt,Ln);if(Pf||Yc)return me(Kr,Ce,Vt,Ln);if(Tn)return ve(Tn,Ye,Vt,Ln);if(Wa)return ue(Wa,Ce,Ye,Vt,Ln)}var ie=function(be){var Ce=be.type;return Ce===X.Mobile},ne=function(be){var Ce=be.type;return Ce===X.Tablet},Z=function(be){var Ce=be.type;return Ce===X.Mobile||Ce===X.Tablet},J=function(be){var Ce=be.type;return Ce===X.SmartTv},le=function(be){var Ce=be.type;return Ce===X.Browser},pe=function(be){var Ce=be.type;return Ce===X.Wearable},Te=function(be){var Ce=be.type;return Ce===X.Console},we=function(be){var Ce=be.type;return Ce===X.Embedded},Qe=function(be){var Ce=be.vendor;return fe(Ce)},nt=function(be){var Ce=be.model;return fe(Ce)},Xe=function(be){var Ce=be.type;return fe(Ce,"browser")},ft=function(be){var Ce=be.name;return Ce===D.Android},It=function(be){var Ce=be.name;return Ce===D.Windows},gt=function(be){var Ce=be.name;return Ce===D.MAC_OS},Yt=function(be){var Ce=be.name;return Ce===D.WindowsPhone},en=function(be){var Ce=be.name;return Ce===D.IOS},_t=function(be){var Ce=be.version;return fe(Ce)},Mt=function(be){var Ce=be.name;return fe(Ce)},ht=function(be){var Ce=be.name;return Ce===te.Chrome},$t=function(be){var Ce=be.name;return Ce===te.Firefox},Zn=function(be){var Ce=be.name;return Ce===te.Chromium},on=function(be){var Ce=be.name;return Ce===te.Edge},Ut=function(be){var Ce=be.name;return Ce===te.Yandex},Ct=function(be){var Ce=be.name;return Ce===te.Safari||Ce===te.MobileSafari},rr=function(be){var Ce=be.name;return Ce===te.MobileSafari},di=function(be){var Ce=be.name;return Ce===te.Opera},Sr=function(be){var Ce=be.name;return Ce===te.InternetExplorer||Ce===te.Ie},yr=function(be){var Ce=be.name;return Ce===te.MIUI},Dn=function(be){var Ce=be.name;return Ce===te.SamsungBrowser},cr=function(be){var Ce=be.version;return fe(Ce)},lo=function(be){var Ce=be.major;return fe(Ce)},vn=function(be){var Ce=be.name;return fe(Ce)},Br=function(be){var Ce=be.name;return fe(Ce)},Da=function(be){var Ce=be.version;return fe(Ce)},Ho=function(){var be=$e(),Ce=be&&be.userAgent&&be.userAgent.toLowerCase();return typeof Ce=="string"?/electron/.test(Ce):!1},pi=function(be){return typeof be=="string"&&be.indexOf("Edg/")!==-1},Bs=function(){var be=$e();return be&&(/iPad|iPhone|iPod/.test(be.platform)||be.platform==="MacIntel"&&be.maxTouchPoints>1)&&!window.MSStream},ur=function(){return Ze("iPad")},Ls=function(){return Ze("iPhone")},ds=function(){return Ze("iPod")},Fs=function(be){return fe(be)};function Us(Fe){var be=Fe||m,Ce=be.device,Ve=be.browser,Ye=be.os,Vt=be.engine,Ln=be.ua;return{isSmartTV:J(Ce),isConsole:Te(Ce),isWearable:pe(Ce),isEmbedded:we(Ce),isMobileSafari:rr(Ve)||ur(),isChromium:Zn(Ve),isMobile:Z(Ce)||ur(),isMobileOnly:ie(Ce),isTablet:ne(Ce)||ur(),isBrowser:le(Ce),isDesktop:le(Ce),isAndroid:ft(Ye),isWinPhone:Yt(Ye),isIOS:en(Ye)||ur(),isChrome:ht(Ve),isFirefox:$t(Ve),isSafari:Ct(Ve),isOpera:di(Ve),isIE:Sr(Ve),osVersion:_t(Ye),osName:Mt(Ye),fullBrowserVersion:cr(Ve),browserVersion:lo(Ve),browserName:vn(Ve),mobileVendor:Qe(Ce),mobileModel:nt(Ce),engineName:Br(Vt),engineVersion:Da(Vt),getUA:Fs(Ln),isEdge:on(Ve)||pi(Ln),isYandex:Ut(Ve),deviceType:Xe(Ce),isIOS13:Bs(),isIPad13:ur(),isIPhone13:Ls(),isIPod13:ds(),isElectron:Ho(),isEdgeChromium:pi(Ln),isLegacyEdge:on(Ve)&&!pi(Ln),isWindows:It(Ye),isMacOs:gt(Ye),isMIUI:yr(Ve),isSamsungBrowser:Dn(Ve)}}var Ba=J(a),La=Te(a),Ul=pe(a),wf=we(a),zs=rr(s)||ur(),Ht=Zn(s),gn=Z(a)||ur(),Bn=ie(a),Lr=ne(a)||ur(),Fr=le(a),Fa=le(a),zl=ft(c),qo=Yt(c),Td=en(c)||ur(),Pn=ht(s),Hm=$t(s),xf=Ct(s),Cd=di(s),Ua=Sr(s),Pd=_t(c),Af=Mt(c),Wc=cr(s),ps=lo(s),qm=vn(s),Gi=Qe(a),Id=nt(a),Od=Br(l),Md=Da(l),za=Fs(u),$c=on(s)||pi(u),ja=Ut(s),Qo=Xe(a),Rd=Bs(),Qm=ur(),Hc=Ls(),Ef=ds(),jl=Ho(),Vl=pi(u),kd=on(s)&&!pi(u),Wl=It(c),an=gt(c),Xo=yr(s),Sf=
3347Dn(s),qc=function(be){if(!be||typeof be!="string"){console.error("No valid user agent string was provided");return}var Ce=d(be),Ve=Ce.device,Ye=Ce.browser,Vt=Ce.os,Ln=Ce.engine,Kr=Ce.ua;return Us({device:Ve,browser:Ye,os:Vt,engine:Ln,ua:Kr})},Nd=function(be){var Ce=be.renderWithFragment,Ve=be.children,Ye=H(be,["renderWithFragment","children"]);return zl?Ce?n.createElement(e.Fragment,null,Ve):n.createElement("div",Ye,Ve):null},Tf=function(be){var Ce=be.renderWithFragment,Ve=be.children,Ye=H(be,["renderWithFragment","children"]);return Fr?Ce?n.createElement(e.Fragment,null,Ve):n.createElement("div",Ye,Ve):null},Cf=function(be){var Ce=be.renderWithFragment,Ve=be.children,Ye=H(be,["renderWithFragment","children"]);return Ua?Ce?n.createElement(e.Fragment,null,Ve):n.createElement("div",Ye,Ve):null},Qc=function(be){var Ce=be.renderWithFragment,Ve=be.children,Ye=H(be,["renderWithFragment","children"]);return Td?Ce?n.createElement(e.Fragment,null,Ve):n.createElement("div",Ye,Ve):null},$l=function(be){var Ce=be.renderWithFragment,Ve=be.children,Ye=H(be,["renderWithFragment","children"]);return gn?Ce?n.createElement(e.Fragment,null,Ve):n.createElement("div",Ye,Ve):null},co=function(be){var Ce=be.renderWithFragment,Ve=be.children,Ye=H(be,["renderWithFragment","children"]);return Lr?Ce?n.createElement(e.Fragment,null,Ve):n.createElement("div",Ye,Ve):null},uo=function(be){var Ce=be.renderWithFragment,Ve=be.children,Ye=H(be,["renderWithFragment","children"]);return qo?Ce?n.createElement(e.Fragment,null,Ve):n.createElement("div",Ye,Ve):null},fo=function(be){var Ce=be.renderWithFragment,Ve=be.children;be.viewClassName,be.style;var Ye=H(be,["renderWithFragment","children","viewClassName","style"]);return Bn?Ce?n.createElement(e.Fragment,null,Ve):n.createElement("div",Ye,Ve):null},Va=function(be){var Ce=be.renderWithFragment,Ve=be.children,Ye=H(be,["renderWithFragment","children"]);return Ba?Ce?n.createElement(e.Fragment,null,Ve):n.createElement("div",Ye,Ve):null},Hl=function(be){var Ce=be.renderWithFragment,Ve=be.children,Ye=H(be,["renderWithFragment","children"]);return La?Ce?n.createElement(e.Fragment,null,Ve):n.createElement("div",Ye,Ve):null},ho=function(be){var Ce=be.renderWithFragment,Ve=be.children,Ye=H(be,["renderWithFragment","children"]);return Ul?Ce?n.createElement(e.Fragment,null,Ve):n.createElement("div",Ye,Ve):null},Xm=function(be){var Ce=be.renderWithFragment,Ve=be.children;be.viewClassName,be.style;var Ye=be.condition,Vt=H(be,["renderWithFragment","children","viewClassName","style","condition"]);return Ye?Ce?n.createElement(e.Fragment,null,Ve):n.createElement("div",Vt,Ve):null};function Dd(Fe){return(function(be){O(Ce,be);function Ce(Ve){var Ye;return x(this,Ce),Ye=z(this,N(Ce).call(this,Ve)),Ye.isEventListenerAdded=!1,Ye.handleOrientationChange=Ye.handleOrientationChange.bind(W(Ye)),Ye.onOrientationChange=Ye.onOrientationChange.bind(W(Ye)),Ye.onPageLoad=Ye.onPageLoad.bind(W(Ye)),Ye.state={isLandscape:!1,isPortrait:!1},Ye}return E(Ce,[{key:"handleOrientationChange",value:function(){this.isEventListenerAdded||(this.isEventListenerAdded=!0);var Ye=window.innerWidth>window.innerHeight?90:0;this.setState({isPortrait:Ye===0,isLandscape:Ye===90})}},{key:"onOrientationChange",value:function(){this.handleOrientationChange()}},{key:"onPageLoad",value:function(){this.handleOrientationChange()}},{key:"componentDidMount",value:function(){(typeof window>"u"?"undefined":b(window))!==void 0&&gn&&(this.isEventListenerAdded?window.removeEventListener("load",this.onPageLoad,!1):(this.handleOrientationChange(),window.addEventListener("load",this.onPageLoad,!1)),window.addEventListener("resize",this.onOrientationChange,!1))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.onOrientationChange,!1)}},{key:"render",value:function(){return n.createElement(Fe,I({},this.props,{isLandscape:this.state.isLandscape,isPortrait:this.state.isPortrait}))}}]),Ce})(n.Component)}function Yo(){var Fe=e.useState(function(){var Vt=window.innerWidth>window.innerHeight?90:0;return{isPortrait:Vt===0,isLandscape:Vt===90,orientation:Vt===0?"portrait":"landscape"}}),be=V(Fe,2),Ce=be[0],Ve=be[1],Ye=e.useCallback(function(){var Vt=window.innerWidth>window.innerHeight?90:0,Ln={isPortrait:Vt===0,isLandscape:Vt===90,orientation:Vt===0?"portrait":"landscape"};Ce.orientation!==Ln.orientation&&Ve(Ln)},[Ce.orientation]);return e.useEffect(function(){return(typeof window>"u"?"undefined":b(window))!==void 0&&gn&&(Ye(),window.addEventListener("load",Ye,!1),window.addEventListener("resize",Ye,!1)),function(){window.removeEventListener("resize",Ye,!1),window.removeEventListener("load",Ye,!1)}},[Ye]),Ce}function Bd(Fe){var be=Fe||window.navigator.userAgent;return d(be)}function Ld(Fe){var be=Fe||window.navigator.userAgent,Ce=Bd(be),Ve=Us(Ce);return[Ve,Ce]}return wt.AndroidView=Nd,wt.BrowserTypes=te,wt.BrowserView=Tf,wt.ConsoleView=Hl,wt.CustomView=Xm,wt.IEView=Cf,wt.IOSView=Qc,wt.MobileOnlyView=fo,wt.MobileView=$l,wt.OsTypes=D,wt.SmartTVView=Va,wt.TabletView=co,wt.WearableView=ho,wt.WinPhoneView=uo,wt.browserName=qm,wt.browserVersion=ps,wt.deviceDetect=k,wt.deviceType=Qo,wt.engineName=Od,wt.engineVersion=Md,wt.fullBrowserVersion=Wc,wt.getSelectorsByUserAgent=qc,wt.getUA=za,wt.isAndroid=zl,wt.isBrowser=Fr,wt.isChrome=Pn,wt.isChromium=Ht,wt.isConsole=La,wt.isDesktop=Fa,wt.isEdge=$c,wt.isEdgeChromium=Vl,wt.isElectron=jl,wt.isEmbedded=wf,wt.isFirefox=Hm,wt.isIE=Ua,wt.isIOS=Td,wt.isIOS13=Rd,wt.isIPad13=Qm,wt.isIPhone13=Hc,wt.isIPod13=Ef,wt.isLegacyEdge=kd,wt.isMIUI=Xo,wt.isMacOs=an,wt.isMobile=gn,wt.isMobileOnly=Bn,wt.isMobileSafari=zs,wt.isOpera=Cd,wt.isSafari=xf,wt.isSamsungBrowser=Sf,wt.isSmartTV=Ba,wt.isTablet=Lr,wt.isWearable=Ul,wt.isWinPhone=qo,wt.isWindows=Wl,wt.isYandex=ja,wt.mobileModel=Id,wt.mobileVendor=Gi,wt.osName=Af,wt.osVersion=Pd,wt.parseUserAgent=d,wt.setUserAgent=Se,wt.useDeviceData=Bd,wt.useDeviceSelectors=Ld,wt.useMobileOrientation=Yo,wt.withOrientationChange=Dd,wt}var Ms=ove();const ave=({id:t="fire-perimeters-2d",data:e,filterFunction:n,opacity:r=100,onClick:i,updateTriggers:s={},timeMarker:o})=>{const a=Array.isArray(e==null?void 0:e.features)?{...e,features:[...e.features].sort((c,u)=>{const h=new Date(c.properties.t).getTime();return new Date(u.properties.t).getTime()-h})}:e,l=c=>{var d;if(!((d=c==null?void 0:c.properties)!=null&&d.t))return"current";const u=new Date(c.properties.t).getTime(),h=(o==null?void 0:o.getTime())||Date.now();return u<h?"past":u===h?"current":"future"};return new gd({id:t,data:a,filled:!0,stroked:!0,getFillColor:c=>{switch(l(c)){case"past":return[136,140,160,255];case"current":return[219,86,66,255];
3347case"future":return[255,255,255,5];default:return[136,140,160,255]}},getLineColor:c=>{switch(l(c)){case"past":return[115,120,124,255];case"current":return[246,184,68,255];case"future":return[146,151,154,255];default:return[115,120,124,255]}},getLineWidth:c=>l(c)==="current"?30:1.5,getDashArray:c=>{if(Ms.isMobile)return[0,0];switch(l(c)){case"past":return[5,5];case"current":return[0,0];case"future":return[5,5];default:return[0,0]}},lineWidthMinPixels:1,material:Ms.isMobile?!1:{ambient:.8,diffuse:.6,shininess:10},opacity:r/100,pickable:!Ms.isMobile,updateTriggers:{getFillColor:[n,o==null?void 0:o.getTime(),...s.getFillColor||[]],getLineColor:[n,o==null?void 0:o.getTime(),...s.getLineColor||[]],getLineWidth:[o==null?void 0:o.getTime(),...s.getLineWidth||[]],getDashArray:[o==null?void 0:o.getTime(),...s.getDashArray||[]]},extensions:Ms.isMobile?[]:[new td({dash:!0})],parameters:{depthTest:!1},onClick:i})},lve=({id:t="fire-perimeters-3d",data:e,filterFunction:n,opacity:r=100,onClick:i,updateTriggers:s={},timeMarker:o})=>{const a=Array.isArray(e==null?void 0:e.features)?{...e,features:[...e.features].sort((c,u)=>{const h=new Date(c.properties.t).getTime();return new Date(u.properties.t).getTime()-h})}:e,l=c=>{var d;if(!((d=c==null?void 0:c.properties)!=null&&d.t))return"current";const u=new Date(c.properties.t).getTime(),h=(o==null?void 0:o.getTime())||Date.now();return u<h?"past":u===h?"current":"future"};return new gd({id:t,data:a,filled:!0,stroked:!0,getFillColor:c=>{switch(l(c)){case"past":return[136,140,160,255];case"current":return[219,86,66,255];case"future":return[255,255,255,5];default:return[136,140,160,255]}},getLineColor:c=>{switch(l(c)){case"past":return[115,120,124,255];case"current":return[246,184,68,255];case"future":return[146,151,154,255];default:return[115,120,124,255]}},getLineWidth:c=>l(c)==="current"?100:1.5,getDashArray:c=>{if(Ms.isMobile)return[0,0];switch(l(c)){case"past":return[5,5];case"current":return[0,0];case"future":return[5,5];default:return[0,0]}},lineWidthMinPixels:1,lineWidthMaxPixels:Ms.isMobile?6:30,material:Ms.isMobile?!1:{ambient:.8,diffuse:.6,shininess:10},opacity:r/100,pickable:!Ms.isMobile,updateTriggers:{getFillColor:[n,o==null?void 0:o.getTime(),...s.getFillColor||[]],getLineColor:[n,o==null?void 0:o.getTime(),...s.getLineColor||[]],getLineWidth:[o==null?void 0:o.getTime(),...s.getLineWidth||[]],getDashArray:[o==null?void 0:o.getTime(),...s.getDashArray||[]]},extensions:[new tA,...Ms.isMobile?[]:[new td({dash:!0})]],parameters:{depthTest:!1},onClick:i})},cve="modulepreload",uve=function(t){return"/"+t},bD={},eQ=function(e,n,r){let i=Promise.resolve();if(n&&n.length>0){let o=function(c){return Promise.all(c.map(u=>Promise.resolve(u).then(h=>({status:"fulfilled",value:h}),h=>({status:"rejected",reason:h}))))};document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),l=(a==null?void 0:a.nonce)||(a==null?void 0:a.getAttribute("nonce"));i=o(n.map(c=>{if(c=uve(c),c in bD)return;bD[c]=!0;const u=c.endsWith(".css"),h=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${h}`))return;const d=document.createElement("link");if(d.rel=u?"stylesheet":cve,u||(d.as="script"),d.crossOrigin="",d.href=c,l&&d.setAttribute("nonce",l),document.head.appendChild(d),u)return new Promise((m,y)=>{d.addEventListener("load",m),d.addEventListener("error",()=>y(new Error(`Unable to preload CSS for ${c}`)))})}))}function s(o){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=o,window.dispatchEvent(a),!a.defaultPrevented)throw o}return i.then(o=>{for(const a of o||[])a.status==="rejected"&&s(a.reason);return e().catch(s)})};/*!
3348* Copyright (c) 2022 WeatherLayers.com
3349*
3350* This Source Code Form is subject to the terms of the Mozilla Public
3351* License, v. 2.0. If a copy of the MPL was not distributed with this
3352* file, You can obtain one at http://mozilla.org/MPL/2.0/.
3353*/function FM(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var UE,_D;function tQ(){return _D||(_D=1,UE=(t,e=0,n=1)=>t<e?e:t>n?n:t),UE}var zE,wD;function fve(){if(wD)return zE;wD=1;const t=tQ();return zE=e=>{e._clipped=!1,e._unclipped=e.slice(0);for(let n=0;n<=3;n++)n<3?((e[n]<0||e[n]>
3353255)&&(e._clipped=!0),e[n]=t(e[n],0,255)):n===3&&(e[n]=t(e[n],0,1));return e},zE}var jE,xD;function UM(){if(xD)return jE;xD=1;const t={};for(let e of["Boolean","Number","String","Function","Array","Date","RegExp","Undefined","Null"])t[`[object ${e}]`]=e.toLowerCase();return jE=function(e){return t[Object.prototype.toString.call(e)]||"object"},jE}var VE,AD;function hve(){if(AD)return VE;AD=1;const t=UM();return VE=(e,n=null)=>e.length>=3?Array.prototype.slice.call(e):t(e[0])=="object"&&n?n.split("").filter(r=>e[0][r]!==void 0).map(r=>e[0][r]):e[0],VE}var WE,ED;function dve(){if(ED)return WE;ED=1;const t=UM();return WE=e=>{if(e.length<2)return null;const n=e.length-1;return t(e[n])=="string"?e[n].toLowerCase():null},WE}var $E,SD;function Mi(){if(SD)return $E;SD=1;const t=Math.PI;return $E={clip_rgb:fve(),limit:tQ(),type:UM(),unpack:hve(),last:dve(),PI:t,TWOPI:t*2,PITHIRD:t/3,DEG2RAD:t/180,RAD2DEG:180/t},$E}var HE,TD;function hf(){return TD||(TD=1,HE={format:{},autodetect:[]}),HE}var qE,CD;function Ra(){if(CD)return qE;CD=1;const{last:t,clip_rgb:e,type:n}=Mi(),r=hf();class i{constructor(...o){const a=this;if(n(o[0])==="object"&&o[0].constructor&&o[0].constructor===this.constructor)return o[0];let l=t(o),c=!1;if(!l){c=!0,r.sorted||(r.autodetect=r.autodetect.sort((u,h)=>h.p-u.p),r.sorted=!0);for(let u of r.autodetect)if(l=u.test(...o),l)break}if(r.format[l]){const u=r.format[l].apply(null,c?o:o.slice(0,-1));a._rgb=e(u)}else throw new Error("unknown format: "+o);a._rgb.length===3&&a._rgb.push(1)}toString(){return n(this.hex)=="function"?this.hex():`[${this._rgb.join(",")}]`}}return qE=i,qE}var QE,PD;function md(){if(PD)return QE;PD=1;const t=(...e)=>new t.Color(...e);return t.Color=Ra(),t.version="@@version",QE=t,QE}var pve=md(),dw=FM(pve),ID={},XE,OD;function gve(){if(OD)return XE;OD=1;const{unpack:t,last:e}=Mi(),n=i=>Math.round(i*100)/100;return XE=(...i)=>{const s=t(i,"hsla");let o=e(i)||"lsa";return s[0]=n(s[0]||0),s[1]=n(s[1]*100)+"%",s[2]=n(s[2]*100)+"%",o==="hsla"||s.length>3&&s[3]<1?(s[3]=s.length>3?s[3]:1,o="hsla"):s.length=3,`${o}(${s.join(",")})`},XE}var YE,MD;function nQ(){if(MD)return YE;MD=1;const{unpack:t}=Mi();return YE=(...n)=>{n=t(n,"rgba");let[r,i,s]=n;r/=255,i/=255,s/=255;const o=Math.min(r,i,s),a=Math.max(r,i,s),l=(a+o)/2;let c,u;return a===o?(c=0,u=Number.NaN):c=l<.5?(a-o)/(a+o):(a-o)/(2-a-o),r==a?u=(i-s)/(a-o):i==a?u=2+(s-r)/(a-o):s==a&&(u=4+(r-i)/(a-o)),u*=60,u<0&&(u+=360),n.length>3&&n[3]!==void 0?[u,c,l,n[3]]:[u,c,l]},YE}var KE,RD;function mve(){if(RD)return KE;RD=1;const{unpack:t,last:e}=Mi(),n=gve(),r=nQ(),{round:i}=Math;return KE=(...o)=>{const a=t(o,"rgba");let l=e(o)||"rgb";return l.substr(0,3)=="hsl"?n(r(a),l):(a[0]=i(a[0]),a[1]=i(a[1]),a[2]=i(a[2]),(l==="rgba"||a.length>3&&a[3]<1)&&(a[3]=a.length>3?a[3]:1,l="rgba"),`${l}(${a.slice(0,l==="rgb"?3:4).join(",")})`)},KE}var GE,kD;function rQ(){if(kD)return GE;kD=1;const{unpack:t}=Mi(),{round:e}=Math;return GE=(...r)=>{r=t(r,"hsl");const[i,s,o]=r;let a,l,c;if(s===0)a=l=c=o*255;else{const u=[0,0,0],h=[0,0,0],d=o<.5?o*(1+s):o+s-o*s,m=2*o-d,y=i/360;u[0]=y+1/3,u[1]=y,u[2]=y-1/3;for(let v=0;v<3;v++)u[v]<0&&(u[v]+=1),u[v]>1&&(u[v]-=1),6*u[v]<1?h[v]=m+(d-m)*6*u[v]:2*u[v]<1?h[v]=d:3*u[v]<2?h[v]=m+(d-m)*(2/3-u[v])*6:h[v]=m;[a,l,c]=[e(h[0]*255),e(h[1]*255),e(h[2]*255)]}return r.length>3?[a,l,c,r[3]]:[a,l,c,1]},GE}var ZE,ND;function vve(){if(ND)return ZE;ND=1;const t=rQ(),e=hf(),n=/^rgb\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*\)$/,r=/^rgba\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*,\s*([01]|[01]?\.\d+)\)$/,i=/^rgb\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,s=/^rgba\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,o=/^hsl\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,a=/^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,{round:l}=Math,c=u=>{u=u.toLowerCase().trim();let h;if(e.format.named)try{return e.format.named(u)}catch{}if(h=u.match(n)){const d=h.slice(1,4);for(let m=0;m<3;m++)d[m]=+d[m];return d[3]=1,d}if(h=u.match(r)){const d=h.slice(1,5);for(let m=0;m<4;m++)d[m]=+d[m];return d}if(h=u.match(i)){const d=h.slice(1,4);for(let m=0;m<3;m++)d[m]=l(d[m]*2.55);return d[3]=1,d}if(h=u.match(s)){const d=h.slice(1,5);for(let m=0;m<3;m++)d[m]=l(d[m]*2.55);return d[3]=+d[3],d}
3353if(h=u.match(o)){const d=h.slice(1,4);d[1]*=.01,d[2]*=.01;const m=t(d);return m[3]=1,m}if(h=u.match(a)){const d=h.slice(1,4);d[1]*=.01,d[2]*=.01;const m=t(d);return m[3]=+h[4],m}};return c.test=u=>n.test(u)||r.test(u)||i.test(u)||s.test(u)||o.test(u)||a.test(u),ZE=c,ZE}var DD;function yve(){if(DD)return ID;DD=1;const t=md(),e=Ra(),n=hf(),{type:r}=Mi(),i=mve(),s=vve();return e.prototype.css=function(o){return i(this._rgb,o)},t.css=(...o)=>new e(...o,"css"),n.format.css=s,n.autodetect.push({p:5,test:(o,...a)=>{if(!a.length&&r(o)==="string"&&s.test(o))return"css"}}),ID}yve();var BD={},JE,LD;function iQ(){if(LD)return JE;LD=1;const{unpack:t,last:e}=Mi(),{round:n}=Math;return JE=(...i)=>{let[s,o,a,l]=t(i,"rgba"),c=e(i)||"auto";l===void 0&&(l=1),c==="auto"&&(c=l<1?"rgba":"rgb"),s=n(s),o=n(o),a=n(a);let h="000000"+(s<<16|o<<8|a).toString(16);h=h.substr(h.length-6);let d="0"+n(l*255).toString(16);switch(d=d.substr(d.length-2),c.toLowerCase()){case"rgba":return`#${h}${d}`;case"argb":return`#${d}${h}`;default:return`#${h}`}},JE}var eS,FD;function sQ(){if(FD)return eS;FD=1;const t=/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,e=/^#?([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/;return eS=r=>
3353{if(r.match(t)){(r.length===4||r.length===7)&&(r=r.substr(1)),r.length===3&&(r=r.split(""),r=r[0]+r[0]+r[1]+r[1]+r[2]+r[2]);const i=parseInt(r,16),s=i>>16,o=i>>8&255,a=i&255;return[s,o,a,1]}if(r.match(e)){(r.length===5||r.length===9)&&(r=r.substr(1)),r.length===4&&(r=r.split(""),r=r[0]+r[0]+r[1]+r[1]+r[2]+r[2]+r[3]+r[3]);const i=parseInt(r,16),s=i>>24&255,o=i>>16&255,a=i>>8&255,l=Math.round((i&255)/255*100)/100;return[s,o,a,l]}throw new Error(`unknown hex color: ${r}`)},eS}var UD;function bve(){if(UD)return BD;UD=1;const t=md(),e=Ra(),{type:n}=Mi(),r=hf(),i=iQ();return e.prototype.hex=function(s){return i(this._rgb,s)},t.hex=(...s)=>new e(...s,"hex"),r.format.hex=sQ(),r.autodetect.push({p:4,test:(s,...o)=>{if(!o.length&&n(s)==="string"&&[3,4,5,6,7,8,9].indexOf(s.length)>=0)return"hex"}}),BD}bve();var zD={},jD;function oQ(){if(jD)return zD;jD=1;const{unpack:t,type:e}=Mi(),n=md(),r=Ra(),i=hf(),s=nQ();return r.prototype.hsl=function(){return s(this._rgb)},n.hsl=(...o)=>new r(...o,"hsl"),i.format.hsl=rQ(),i.autodetect.push({p:2,test:(...o)=>{if(o=t(o,"hsl"),e(o)==="array"&&o.length===3)return"hsl"}}),zD}oQ();var VD={},tS,WD;function _ve(){if(WD)return tS;WD=1;const{unpack:t}=Mi(),{min:e,max:n}=Math;return tS=(...i)=>{i=t(i,"rgb");let[s,o,a]=i;const l=e(s,o,a),c=n(s,o,a),u=c-l;let h,d,m;return m=c/255,c===0?(h=Number.NaN,d=0):(d=u/c,s===c&&(h=(o-a)/u),o===c&&(h=2+(a-s)/u),a===c&&(h=4+(s-o)/u),h*=60,h<0&&(h+=360)),[h,d,m]},tS}var nS,$D;function wve(){if($D)return nS;$D=1;const{unpack:t}=Mi(),{floor:e}=Math;return nS=(...r)=>{r=t(r,"hsv");let[i,s,o]=r,a,l,c;if(o*=255,s===0)a=l=c=o;else{i===360&&(i=0),i>360&&(i-=360),i<0&&(i+=360),i/=60;const u=e(i),h=i-u,d=o*(1-s),m=o*(1-s*h),y=o*(1-s*(1-h));switch(u){case 0:[a,l,c]=[o,y,d];break;case 1:[a,l,c]=[m,o,d];break;case 2:[a,l,c]=[d,o,y];break;case 3:[a,l,c]=[d,m,o];break;case 4:[a,l,c]=[y,d,o];break;case 5:[a,l,c]=[o,d,m];break}}return[a,l,c,r.length>3?r[3]:1]},nS}var HD;function aQ(){if(HD)return VD;HD=1;const{unpack:t,type:e}=Mi(),n=md(),r=Ra(),i=hf(),s=_ve();return r.prototype.hsv=function(){return s(this._rgb)},n.hsv=(...o)=>new r(...o,"hsv"),i.format.hsv=wve(),i.autodetect.push({p:2,test:(...o)=>{if(o=t(o,"hsv"),e(o)==="array"&&o.length===3)return"hsv"}}),VD}aQ();var qD={},rS,QD;function xve(){return QD||(QD=1,rS={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflower:"#6495ed",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",laserlemon:"#ffff54",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrod:"#fafad2",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",maroon2:"#7f0000",maroon3:"#b03060",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",purple2:"#7f007f",purple3:"#a020f0",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",s
3353almon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"}),rS}var XD;function Ave(){if(XD)return qD;XD=1;const t=Ra(),e=hf(),{type:n}=Mi(),r=xve(),i=sQ(),s=iQ();return t.prototype.name=function(){const o=s(this._rgb,"rgb");for(let a of Object.keys(r))if(r[a]===o)return a.toLowerCase();return o},e.format.named=o=>{if(o=o.toLowerCase(),r[o])return i(r[o]);throw new Error("unknown color name: "+o)},e.autodetect.push({p:5,test:(o,...a)=>{if(!a.length&&n(o)==="string"&&r[o.toLowerCase()])return"named"}}),qD}Ave();var YD={},KD;function Eve(){if(KD)return YD;KD=1;const t=md(),e=Ra(),n=hf(),{unpack:r,type:i}=Mi(),{round:s}=Math;return e.prototype.rgb=function(o=!0){return o===!1?this._rgb.slice(0,3):this._rgb.slice(0,3).map(s)},e.prototype.rgba=function(o=!0){return this._rgb.slice(0,4).map((a,l)=>l<3?o===!1?a:s(a):a)},t.rgb=(...o)=>new e(...o,"rgb"),n.format.rgb=(...o)=>{const a=r(o,"rgba");return a[3]===void 0&&(a[3]=1),a},n.autodetect.push({p:3,test:(...o)=>{if(o=r(o,"rgba"),i(o)==="array"&&(o.length===3||o.length===4&&i(o[3])=="number"&&o[3]>=0&&o[3]<=1))return"rgb"}}),YD}Eve();var GD={},ZD;function Sve(){if(ZD)return GD;ZD=1;const t=Ra(),{type:e}=Mi();return t.prototype.alpha=function(n,r=!1){return n!==void 0&&e(n)==="number"?r?(this._rgb[3]=n,this):new t([this._rgb[0],this._rgb[1],this._rgb[2],n],"rgb"):this._rgb[3]},GD}Sve();var iS,JD;function lQ(){if(JD)return iS;JD=1;const t=Ra();return iS=(e,n,r,i)=>{let s,o;i==="hsl"?(s=e.hsl(),o=n.hsl()):i==="hsv"?(s=e.hsv(),o=n.hsv()):i==="hcg"?(s=e.hcg(),o=n.hcg()):i==="hsi"?(s=e.hsi(),o=n.hsi()):i==="lch"||i==="hcl"?(i="hcl",s=e.hcl(),o=n.hcl()):i==="oklch"&&(s=e.oklch().reverse(),o=n.oklch().reverse());let a,l,c,u,h,d;(i.substr(0,1)==="h"||i==="oklch")&&([a,c,h]=s,[l,u,d]=o);let m,y,v,b;return!isNaN(a)&&!isNaN(l)?(l>a&&l-a>180?b=l-(a+360):l<a&&a-l>180?b=l+360-a:b=l-a,y=a+r*b):isNaN(a)?isNaN(l)?y=Number.NaN:(y=l,(h==1||h==0)&&i!="hsv"&&(m=u)):(y=a,(d==1||d==0)&&i!="hsv"&&(m=c)),m===void 0&&(m=c+r*(u-c)),v=h+r*(d-h),i==="oklch"?new t([v,m,y],i):new t([y,m,v],i)},iS}var sS,eB;function nA(){return eB||(eB=1,sS={}),sS}var oS,tB;function Tve(){if(tB)return oS;tB=1,oQ();const t=lQ(),e=(n,r,i)=>t(n,r,i,"hsl");return nA().hsl=e,oS=e,oS}Tve();var aS,nB;function Cve(){if(nB)return aS;nB=1,aQ();const t=lQ(),e=(n,r,i)=>t(n,r,i,"hsv");return nA().hsv=e,aS=e,aS}Cve();var lS,rB;function Pve(){if(rB)return lS;rB=1;const t=Ra(),e=(n,r,i)=>{const s=n._rgb,o=r._rgb;return new t(s[0]+i*(o[0]-s[0]),s[1]+i*(o[1]-s[1]),s[2]+i*(o[2]-s[2]),"rgb")};return nA().rgb=e,lS=e,lS}Pve();var cS,iB;function Ive(){if(iB)return cS;iB=1;const t=Ra(),{type:e}=Mi(),n=nA();return cS=(r,i,s=.5,...o)=>{let a=o[0]||"lrgb";if(!n[a]&&!o.length&&(a=Object.keys(n)[0]),!n[a])throw new Error(`interpolation mode ${a} is not defined`);return e(r)!=="object"&&(r=new t(r)),e(i)!=="object"&&(i=new t(i)),n[a](r,i,s).alpha(r.alpha()+s*(i.alpha()-r.alpha()))},cS}var Ove=Ive(),Mve=FM(Ove),uS,sB;function Rve(){if(sB)return uS;sB=1;const t=md(),{type:e}=Mi(),{pow:n}=Math;uS=function(i){let s="rgb",o=t("#ccc"),a=0,l=[0,1],c=[],u=[0,0],h=!1,d=[],m=!1,y=0,v=1,b=!1,x={},T=!0,E=1;const C=function(W){if(W=W||["#fff","#000"],W&&e(W)==="string"&&t.brewer&&t.brewer[W.toLowerCase()]&&(W=t.brewer[W.toLowerCase()]),e(W)==="array"){W.length===1&&(W=[W[0],W[0]]),W=W.slice(0);for(let z=0;z<W.length;z++)W[z]=t(W[z]);c.length=0;for(let z=0;z<W.length;z++)c.push(z/(W.length-1))}return F(),d=W},I=function(W){if(h!=null){const z=h.length-1;let V=0;for(;V<z&&W>=h[V];)V++;return V-1}return 0};let O=W=>W,N=W=>W;const U=function(W,z){let V,M;if(z==null&&(z=!1),isNaN(W)||W===null)return o;z?M=W:h&&h.length>2?M=I(W)/(h.length-2):v!==y?M=(W-y)/(v-y):M=1,M=N(M),z||(M=O(M)),E!==1&&(M=n(M,E)),M=u[0]+M*(1-u[0]-u[1]),M=Math.min(1,Math.max(0,M));const K=Math.floor(M*1e4);if(T&&x[K])V=x[K];else{if(e(d)==="array")for(let j=0;j<c.length;j++){const q=c[j];if(M<=q){V=d[j];break}if(M>=q&&j===c.length-1){V=d[j];break}if(M>q&&M<c[j+1]){M=(M-q)/(c[j+1]-q),V=t.interpolate(d[j],d[j+1],M,s);break}}else e(d)==="function"&&(V=d(M));T&&(x[K]=V)}return V};var F=()=>x={};C(i);const H=function(W){const z=t(U(W));return m&&z[m]?z[m]():z};return H.classes=function(W){if(W!=null){if(e(W)==="array")h=W,l=[W[0],W[W.length-1]];else{const z=t.analyze(l);W===0?h=[z.min,z.max]:h=t.limits(z,"e",W)}return H}return h},H.domain=function(W){if(!arguments.length)return l;y=W[0],v=W[W.length-1],c=[];const z=d.length;if(W.length===z&&y!==v)for(let V of Array.from(W))c.push((V-y)/(v-y));else{for(let V=0;V<z;V++)c.push(V/(z-1));if(W.length>2){const V=W.map((K,j)=>j/(W.length-1)),M=W.map(K=>(K-y)/(v-y));M.every((K,j)=>V[j]===K)||(N=K=>{if(K<=0||K>=1)return K;let j=0;for(;K>=M[j+1];)j++;const q=(K-M[j])/(M[j+1]-M[j]);return V[j]+q*(V[j+1]-V[j])})}}return l=[y,v],H},H.mode=function(W){return arguments.length?(s=W,F(),H):s},H.range=function(W,z){return C(W),H},H.out=function(W){return m=W,H},H.spread=function(W){return arguments.length?(a=W,H):a},H.correctLightness=function(W){return W==null&&(W=!0),b=W,F(),b?O=function(z){const V=U(0,!0).lab()[0],M=U(1,!0).lab()[0],K=V>M;let j=U(z,!0).lab()[0];const q=V+(M-V)*z;let Y=j-q,X=0,te=1,D=20;for(;Math.abs(Y)>.01&&D-- >0;)(function(){return K&&(Y*=-1),Y<0?(X=z,z+=(te-z)*.5):(te=z,z+=(X-z)*.5),j=U(z,!0).lab()[0],Y=j-q})();return z}:O=z=>z,H},H.padding=function(W){return W!=null?(e(W)==="number"&&(W=[W,W]),u=W,H):u}
3353,H.colors=function(W,z){arguments.length<2&&(z="hex");let V=[];if(arguments.length===0)V=d.slice(0);else if(W===1)V=[H(.5)];else if(W>1){const M=l[0],K=l[1]-M;V=r(0,W).map(j=>H(M+j/(W-1)*K))}else{i=[];let M=[];if(h&&h.length>2)for(let K=1,j=h.length,q=1<=j;q?K<j:K>j;q?K++:K--)M.push((h[K-1]+h[K])*.5);else M=l;V=M.map(K=>H(K))}return t[z]&&(V=V.map(M=>M[z]())),V},H.cache=function(W){return W!=null?(T=W,H):T},H.gamma=function(W){return W!=null?(E=W,H):E},H.nodata=function(W){return W!=null?(o=t(W),H):o},H};function r(i,s,o){let a=[],l=i<s,c=s;for(let u=i;l?u<c:u>c;l?u++:u--)a.push(u);return a}return uS}var kve=Rve(),Nve=FM(kve);dw.mix=dw.interpolate=Mve;dw.scale=Nve;const cQ=/[ ,\t:]+/g,Dve=/[\-\/]/g;function zM(t){return t.startsWith("#")}function Bve(t){return t.some(e=>!zM(e)&&e.split(cQ).length>=8)}function Lve(t){return t.some(e=>!!(!zM(e)&&(e.match(/\d+\-\d+\-\d+/)||e.match(/\d+\/\d+\/\d+/))))}function Fve(t){const e=t.find(n=>zM(n)&&n.includes("COLOR_MODEL = "));if(e){const n=e.match(/COLOR_MODEL = ([a-zA-Z]+)/);if(n)return n[1].toLowerCase()}}function fS(t){const e=t.split(Dve);return e.length===1?e[0]:e}function Uve(t){const e=t.trim().split(`
3354`),n=Bve(e),r=Lve(e),i=Fve(e),s=e.filter(a=>!!a&&!a.startsWith("#")),o=[];for(let a of s){const l=a.split(cQ);n?l.length===8||l.length===9?(o.push([l[0],[l[1],l[2],l[3]]]),o.push([l[4],[l[5],l[6],l[7]]])):(l.length===4||l.length===5)&&o.push([l[0],[l[1],l[2],l[3]]]):r?l.length===4||l.length===5?(o.push([l[0],fS(l[1])]),o.push([l[2],fS(l[3])])):(l.length===2||l.length===3)&&o.push([l[0],fS(l[1])]):l.length===5?o.push([l[0],[l[1],l[2],l[3],l[4]]]):l.length===4?o.push([l[0],[l[1],l[2],l[3]]]):l.length===2&&o.push([l[0],l[1]])}return{paletteArray:o,mode:i}}const zve="rgb";function jve(t,e){if(typeof t=="string")if(t[t.length-1]==="%"){const n=parseFloat(t)/100;if(n<0||n>1)throw new Error(`Invalid value for a percentage ${t}`);return e[0]+(e[1]-e[0])*n}else return t==="N"?null:t==="B"||t==="F"?void 0:t==="nv"?null:t==="default"?void 0:t==="null"||t==="nodata"?null:parseFloat(t);else{if(typeof t=="number")return t;throw new Error("Invalid state")}}function Vve(t,e){if(Array.isArray(t)){if(t.length===4)return{[e[0]]:parseFloat(t[0].toString()),[e[1]]:parseFloat(t[1].toString()),[e[2]]:parseFloat(t[2].toString()),a:parseFloat(t[3].toString())/255};if(t.length===3)return{[e[0]]:parseFloat(t[0].toString()),[e[1]]:parseFloat(t[1].toString()),[e[2]]:parseFloat(t[2].toString())};throw new Error(`Invalid color ${t}`)}else{if(typeof t=="string"||typeof t=="number")return t.toString().match(/^\d+$/)||typeof t=="number"?{[e[0]]:parseFloat(t.toString()),[e[1]]:parseFloat(t.toString()),[e[2]]:parseFloat(t.toString())}:t;throw new Error(`Invalid color ${t}`)}}function uQ(t,{bounds:e=[0,1],mode:n=zve}={}){const r=[],i=[];let s;for(let[a,l]of t){const c=jve(a,e),u=Vve(l,n);c!=null?(r.push(u),i.push(c)):c===null&&(s=u)}let o=dw.scale(r).domain(i).mode(n);return typeof s<"u"&&(o=o.nodata(s)),o}function Wve(t,{bounds:e=[0,1]}={}){const{paletteArray:n,mode:r}=Uve(t);return uQ(n,{bounds:e,mode:r})}function Cy(t,{bounds:e=[0,1]}={}){if(typeof t=="string")return Wve(t,{bounds:e});if(Array.isArray(t))return uQ(t,{bounds:e});throw new Error("Invalid format")}function $ve(t,{width:e=256,height:n=1}={}){const r=t.colors(e,"css"),i=document.createElement("canvas");i.width=e,i.height=n,i.style.imageRendering="-moz-crisp-edges",i.style.imageRendering="pixelated";const s=i.getContext("2d");for(let o=0;o<e;o++)s.fillStyle=r[o],s.fillRect(o,0,1,n);return i}const fQ=6371e3;function Hve(t,e){return!(Math.abs(t[0]-e[0])>Number.EPSILON||Math.abs(t[1]-e[1])>Number.EPSILON)}function xl(t){return t/180*Math.PI}function QP(t){return t/Math.PI*180}function qve(t){return(t+360)%360}function Qve(t,e,n=fQ){const r=n,i=xl(t[1]),s=xl(t[0]),o=xl(e[1]),a=xl(e[0]),l=o-i,c=a-s,u=Math.sin(l/2)*Math.sin(l/2)+Math.cos(i)*Math.cos(o)*Math.sin(c/2)*Math.sin(c/2),h=2*Math.atan2(Math.sqrt(u),Math.sqrt(1-u));return r*h}function Xve(t,e){if(Hve(t,e))return NaN;const n=xl(t[1]),r=xl(e[1]),i=xl(e[0]-t[0]),s=Math.cos(n)*Math.sin(r)-Math.sin(n)*Math.cos(r)*Math.cos(i),o=Math.sin(i)*Math.cos(r),a=Math.atan2(o,s),l=QP(a);return qve(l)}function Yve(t,e,n,r=fQ){const i=e/r,s=xl(n),o=xl(t[1]),a=xl(t[0]),l=Math.sin(o)*Math.cos(i)+Math.cos(o)*Math.sin(i)*Math.cos(s),c=Math.asin(l),u=Math.sin(s)*Math.sin(i)*Math.cos(o),h=Math.cos(i)-Math.sin(o)*l,d=a+Math.atan2(u,h),m=QP(c);return[QP(d),m]}/**
3355 * @license
3356 * Copyright 2019 Google LLC
3357 * SPDX-License-Identifier: Apache-2.0
3358 */const hQ=Symbol("Comlink.proxy"),Kve=Symbol("Comlink.endpoint"),Gve=Symbol("Comlink.releaseProxy"),hS=Symbol("Comlink.finalizer"),E_=Symbol("Comlink.thrown"),dQ=t=>typeof t=="object"&&t!==null||typeof t=="function",Zve={canHandle:t=>dQ(t)&&t[hQ],serialize(t){const{port1:e,port2:n}=new MessageChannel;return gQ(t,e),[n,[n]]},deserialize(t){return t.start(),vQ(t)}},Jve={canHandle:t=>dQ(t)&&E_ in t,serialize({value:t}){let e;return t instanceof Error?e={isError:!0,value:{message:t.message,name:t.name,stack:t.stack}}:e={isError:!1,value:t},[e,[]]},deserialize(t){throw t.isError?Object.assign(new Error(t.value.message),t.value):t.value}},pQ=new Map([["proxy",Zve],["throw",Jve]]);function eye(t,e){for(const n of t)if(e===n||n==="*"||n instanceof RegExp&&n.test(e))return!0;return!1}function gQ(t,e=globalThis,n=["*"]){e.addEventListener("message",function r(i){if(!i||!i.data)return;if(!eye(n,i.origin)){console.warn(`Invalid origin '${i.origin}' for comlink proxy`);return}const{id:s,type:o,path:a}=Object.assign({path:[]},i.data),l=(i.data.argumentList||[]).map(Th);let c;try{const u=a.slice(0,-1).reduce((d,m)=>d[m],t),h=a.reduce((d,m)=>d[m],t);switch(o){case"GET":c=h;break;
3358case"SET":u[a.slice(-1)[0]]=Th(i.data.value),c=!0;break;case"APPLY":c=h.apply(u,l);break;case"CONSTRUCT":{const d=new h(...l);c=sye(d)}break;case"ENDPOINT":{const{port1:d,port2:m}=new MessageChannel;gQ(t,m),c=YP(d,[d])}break;case"RELEASE":c=void 0;break;default:return}}catch(u){c={value:u,[E_]:0}}Promise.resolve(c).catch(u=>({value:u,[E_]:0})).then(u=>{const[h,d]=mw(u);e.postMessage(Object.assign(Object.assign({},h),{id:s}),d),o==="RELEASE"&&(e.removeEventListener("message",r),mQ(e),hS in t&&typeof t[hS]=="function"&&t[hS]())}).catch(u=>{const[h,d]=mw({value:new TypeError("Unserializable return value"),[E_]:0});e.postMessage(Object.assign(Object.assign({},h),{id:s}),d)})}),e.start&&e.start()}function tye(t){return t.constructor.name==="MessagePort"}function mQ(t){tye(t)&&t.close()}function vQ(t,e){const n=new Map;return t.addEventListener("message",function(i){const{data:s}=i;if(!s||!s.id)return;const o=n.get(s.id);if(o)try{o(s)}finally{n.delete(s.id)}}),XP(t,n,[],e)}function Rb(t){if(t)throw new Error("Proxy has been released and is not useable")}function yQ(t){return dg(t,new Map,{type:"RELEASE"}).then(()=>{mQ(t)})}const pw=new WeakMap,gw="FinalizationRegistry"in globalThis&&new FinalizationRegistry(t=>{const e=(pw.get(t)||0)-1;pw.set(t,e),e===0&&yQ(t)});function nye(t,e){const n=(pw.get(e)||0)+1;pw.set(e,n),gw&&gw.register(t,e,t)}function rye(t){gw&&gw.unregister(t)}function XP(t,e,n=[],r=function(){}){let i=!1;const s=new Proxy(r,{get(o,a){if(Rb(i),a===Gve)return()=>{rye(s),yQ(t),e.clear(),i=!0};if(a==="then"){if(n.length===0)return{then:()=>s};const l=dg(t,e,{type:"GET",path:n.map(c=>c.toString())}).then(Th);return l.then.bind(l)}return XP(t,e,[...n,a])},set(o,a,l){Rb(i);const[c,u]=mw(l);return dg(t,e,{type:"SET",path:[...n,a].map(h=>h.toString()),value:c},u).then(Th)},apply(o,a,l){Rb(i);const c=n[n.length-1];if(c===Kve)return dg(t,e,{type:"ENDPOINT"}).then(Th);if(c==="bind")return XP(t,e,n.slice(0,-1));const[u,h]=oB(l);return dg(t,e,{type:"APPLY",path:n.map(d=>d.toString()),argumentList:u},h).then(Th)},construct(o,a){Rb(i);const[l,c]=oB(a);return dg(t,e,{type:"CONSTRUCT",path:n.map(u=>u.toString()),argumentList:l},c).then(Th)}});return nye(s,t),s}function iye(t){return Array.prototype.concat.apply([],t)}function oB(t){const e=t.map(mw);return[e.map(n=>n[0]),iye(e.map(n=>n[1]))]}const bQ=new WeakMap;function YP(t,e){return bQ.set(t,e),t}function sye(t){return Object.assign(t,{[hQ]:!0})}function mw(t){for(const[e,n]of pQ)if(n.canHandle(t)){const[r,i]=n.serialize(t);return[{type:"HANDLER",name:e,value:r},i]}return[{type:"RAW",value:t},bQ.get(t)||[]]}function Th(t){switch(t.type){case"HANDLER":return pQ.get(t.name).deserialize(t.value);case"RAW":return t.value}}function dg(t,e,n,r){return new Promise(i=>{const s=oye();e.set(s,i),t.start&&t.start(),t.postMessage(Object.assign({id:s},n),r)})}function oye(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}const _Q=function(t){return t.on=t.addEventListener,t.off=t.removeEventListener,t},aye=function(t){try{return URL.createObjectURL(new Blob([t],{type:"application/javascript"}))}catch{const n=new BlobBuilder;return n.append(t),URL.createObjectURL(n.getBlob())}},lye=function(t){return function(){const e=aye(t),n=_Q(new Worker(e));n.objURL=e;const r=n.terminate;return n.on=n.addEventListener,n.off=n.removeEventListener,n.terminate=function(){return URL.revokeObjectURL(e),r.call(this)},n}},cye=function(t){return`var browserWorkerPolyFill = ${_Q.toString()};
3359browserWorkerPolyFill(self);
3360`+t},kb=Math.PI/180,Nb=180/Math.PI,Db=6378137,Nu=20037508342789244e-9,Bb="900913",uye="WGS84",ig={};function aB(t){return Number(t)===t&&t%1!==0}var Er,Xu,Qg,Xg,zh,Yu;class fye{constructor(e={}){tn(this,Er);tn(this,Xu);tn(this,Qg);tn(this,Xg);tn(this,zh);tn(this,Yu);if(Ft(this,Er,e.size||256),Ft(this,Xu,e.antimeridian?2:1),!ig[qe(this,Er)]){let n=qe(this,Er);const r=ig[qe(this,Er)]={};r.Bc=[],r.Cc=[],r.zc=[],r.Ac=[];for(let i=0;i<30;i++)r.Bc.push(n/360),r.Cc.push(n/(2*Math.PI)),r.zc.push(n/2),r.Ac.push(n),n*=2}
3360Ft(this,Qg,ig[qe(this,Er)].Bc),Ft(this,Xg,ig[qe(this,Er)].Cc),Ft(this,zh,ig[qe(this,Er)].zc),Ft(this,Yu,ig[qe(this,Er)].Ac)}px(e,n){if(aB(n)){const r=qe(this,Er)*Math.pow(2,n),i=r/2,s=r/360,o=r/(2*Math.PI),a=r,l=Math.min(Math.max(Math.sin(kb*e[1]),-.9999),.9999);let c=i+e[0]*s,u=i+.5*Math.log((1+l)/(1-l))*-o;return c>a*qe(this,Xu)&&(c=a*qe(this,Xu)),u>a&&(u=a),[c,u]}else{const r=qe(this,zh)[n],i=Math.min(Math.max(Math.sin(kb*e[1]),-.9999),.9999);let s=Math.round(r+e[0]*qe(this,Qg)[n]),o=Math.round(r+.5*Math.log((1+i)/(1-i))*-qe(this,Xg)[n]);return s>qe(this,Yu)[n]*qe(this,Xu)&&(s=qe(this,Yu)[n]*qe(this,Xu)),o>qe(this,Yu)[n]&&(o=qe(this,Yu)[n]),[s,o]}}ll(e,n){if(aB(n)){const r=qe(this,Er)*Math.pow(2,n),i=r/360,s=r/(2*Math.PI),o=r/2,a=(e[1]-o)/-s,l=(e[0]-o)/i,c=Nb*(2*Math.atan(Math.exp(a))-.5*Math.PI);return[l,c]}else{const r=(e[1]-qe(this,zh)[n])/-qe(this,Xg)[n],i=(e[0]-qe(this,zh)[n])/qe(this,Qg)[n],s=Nb*(2*Math.atan(Math.exp(r))-.5*Math.PI);return[i,s]}}convert(e,n){return n===Bb?[...this.forward(e.slice(0,2)),...this.forward(e.slice(2,4))]:[...this.inverse(e.slice(0,2)),...this.inverse(e.slice(2,4))]}inverse(e){return[e[0]*Nb/Db,(Math.PI*.5-2*Math.atan(Math.exp(-e[1]/Db)))*Nb]}forward(e){const n=[Db*e[0]*kb,Db*Math.log(Math.tan(Math.PI*.25+.5*e[1]*kb))];return n[0]>Nu&&(n[0]=Nu),n[0]<-Nu&&(n[0]=-Nu),n[1]>Nu&&(n[1]=Nu),n[1]<-Nu&&(n[1]=-Nu),n}bbox(e,n,r,i,s){i&&(n=Math.pow(2,r)-1-n);
3360const o=[e*qe(this,Er),(+n+1)*qe(this,Er)],a=[(+e+1)*qe(this,Er),n*qe(this,Er)],l=[...this.ll(o,r),...this.ll(a,r)];return s===Bb?this.convert(l,Bb):l}xyz(e,n,r,i){const s=i===Bb?this.convert(e,uye):e,o=[s[0],s[1]],a=[s[2],s[3]],l=this.px(o,n),c=this.px(a,n),u=[Math.floor(l[0]/qe(this,Er)),Math.floor((c[0]-1)/qe(this,Er))],h=[Math.floor(c[1]/qe(this,Er)),Math.floor((l[1]-1)/qe(this,Er))],d={minX:Math.min.apply(Math,u)<0?0:Math.min.apply(Math,u),minY:Math.min.apply(Math,h)<0?0:Math.min.apply(Math,h),maxX:Math.max.apply(Math,u),maxY:Math.max.apply(Math,h)};if(r){const m={minY:Math.pow(2,n)-1-d.maxY,maxY:Math.pow(2,n)-1-d.minY};d.minY=m.minY,d.maxY=m.maxY}return d}}Er=new WeakMap,Xu=new WeakMap,Qg=new WeakMap,Xg=new WeakMap,zh=new WeakMap,Yu=new WeakMap;function hye(t=4,e=!1){if(t>10)throw new Error(`Max order is 10, but given ${t}.`);const n=(1+Math.sqrt(5))/2,i=10*Math.pow(4,t)+2,s=e?t===0?3:Math.pow(2,t)*3+9:0,o=new Float32Array((i+s)*3);o.set(Float32Array.of(-1,n,0,1,n,0,-1,-n,0,1,-n,0,0,-1,n,0,1,n,0,-1,-n,0,1,-n,n,0,-1,n,0,1,-n,0,-1,-n,0,1));let a=Uint16Array.of(0,11,5,0,5,1,0,1,7,0,7,10,0,10,11,11,10,2,5,11,4,1,5,9,7,1,8,10,7,6,3,9,4,3,4,2,3,2,6,3,6,8,3,8,9,9,8,1,4,9,5,2,4,11,6,2,10,8,6,7),l=12;const c=t?new Map:null;function u(b,x){const T=Math.floor((b+x)*(b+x+1)/2+Math.min(b,x)),E=c.get(T);return E!==void 0?(c.delete(T),E):(c.set(T,l),o[3*l+0]=(o[3*b+0]+o[3*x+0])*.5,o[3*l+1]=(o[3*b+1]+o[3*x+1])*.5,o[3*l+2]=(o[3*b+2]+o[3*x+2])*.5,l++)}let h=a;const d=t>5?Uint32Array:Uint16Array;for(let b=0;b<t;b++){const x=h.length;a=new d(x*4);for(let T=0;T<x;T+=3){const E=h[T+0],C=h[T+1],I=h[T+2],O=u(E,C),N=u(C,I),U=u(I,E);let F=T*4;a[F++]=E,a[F++]=O,a[F++]=U,a[F++]=C,a[F++]=N,a[F++]=O,a[F++]=I,a[F++]=U,a[F++]=N,a[F++]=O,a[F++]=N,a[F++]=U}h=a}for(let b=0;b<i*3;b+=3){const x=o[b+0],T=o[b+1],E=o[b+2],C=1/Math.sqrt(x*x+T*T+E*E);o[b+0]*=C,o[b+1]*=C,o[b+2]*=C}if(!e)return{vertices:o,triangles:a};const m=new Float32Array((i+s)*2);for(let b=0;b<i;b++)m[2*b+0]=Math.atan2(o[3*b+2],o[3*b])/(2*Math.PI)+.5,m[2*b+1]=Math.asin(o[3*b+1])/Math.PI+.5;const y=new Map;function v(b,x,T,E){if(E){const C=y.get(b);if(C!==void 0)return C}return o[3*l+0]=o[3*b+0],o[3*l+1]=o[3*b+1],o[3*l+2]=o[3*b+2],m[2*l+0]=x,m[2*l+1]=T,E&&y.set(b,l),l++}for(let b=0;b<a.length;b+=3){const x=a[b+0],T=a[b+1],E=a[b+2];let C=m[2*x],I=m[2*T],O=m[2*E];const N=m[2*x+1],U=m[2*T+1],F=m[2*E+1];I-C>=.5&&N!==1&&(I-=1),O-I>.5&&(O-=1),(C>.5&&C-O>.5||C===1&&F===0)&&(C-=1),I>.5&&I-C>.5&&(I-=1),N===0||N===1?(C=(I+O)/2,N===I?m[2*x]=C:a[b+0]=v(x,C,N,!1)):U===0||U===1?(I=(C+O)/2,U===C?m[2*T]=I:a[b+1]=v(T,I,U,!1)):(F===0||F===1)&&(O=(C+I)/2,F===C?m[2*E]=O:a[b+2]=v(E,O,F,!1)),C!==m[2*x]&&N!==0&&N!==1&&(a[b+0]=v(x,C,N,!0)),I!==m[2*T]&&U!==0&&U!==1&&(a[b+1]=v(T,I,U,!0)),O!==m[2*E]&&F!==0&&F!==1&&(a[b+2]=v(E,O,F,!0))}return{vertices:o,triangles:a,uv:m}}const lB=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],dS=1,g1=8;class jM{static from(e){if(!(e instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");const[n,r]=new Uint8Array(e,0,2);if(n!==219)throw new Error("Data does not appear to be in a KDBush format.");const i=r>>4;if(i!==dS)throw new Error(`Got v${i} data when expected v${dS}.`);const s=lB[r&15];if(!s)throw new Error("Unrecognized array type.");const[o]=new Uint16Array(e,2,1),[a]=new Uint32Array(e,4,1);return new jM(a,o,s,e)}constructor(e,n=64,r=Float64Array,i){if(isNaN(e)||e<0)throw new Error(`Unpexpected numItems value: ${e}.`);this.numItems=+e,this.nodeSize=Math.min(Math.max(+n,2),65535),this.ArrayType=r,this.IndexArrayType=e<65536?Uint16Array:Uint32Array;const s=lB.indexOf(this.ArrayType),o=e*2*this.ArrayType.BYTES_PER_ELEMENT,a=e*this.IndexArrayType.BYTES_PER_ELEMENT,l=(8-a%8)%8;if(s<0)throw new Error(`Unexpected typed array class: ${r}.`);i&&i instanceof ArrayBuffer?(this.data=i,this.ids=new this.IndexArrayType(this.data,g1,e),this.coords=new this.ArrayType(this.data,g1+a+l,e*2),this._pos=e*2,this._finished=!0):(this.data=new ArrayBuffer(g1+o+a+l),this.ids=new this.IndexArrayType(this.data,g1,e),this.coords=new this.ArrayType(this.data,g1+a+l,e*2),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,(dS<<4)+s]),new Uint16Array(this.data,2,1)[0]=n,new Uint32Array(this.data,4,1)[0]=e)}add(e,n){const r=this._pos>>1;return this.ids[r]=r,this.coords[this._pos++]=e,this.coords[this._pos++]=n,r}finish(){const e=this._pos>>1;if(e!==this.numItems)throw new Error(`Added ${e} items when expected ${this.numItems}.`);return KP(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(e,n,r,i){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:s,coords:o,nodeSize:a}=this,l=[0,s.length-1,0],c=[];for(;l.length;){const u=l.pop()||0,h=l.pop()||0,d=l.pop()||0;if(h-d<=a){for(let b=d;b<=h;b++){const x=o[2*b],T=o[2*b+1];x>=e&&x<=r&&T>=n&&T<=i&&c.push(s[b])}continue}const m=d+h>>1,y=o[2*m],v=o[2*m+1];y>=e&&y<=r&&v>=n&&v<=i&&c.push(s[m]),(u===0?e<=y:n<=v)&&(l.push(d),l.push(m-1),l.push(1-u)),(u===0?r>=y:i>=v)&&(l.push(m+1),l.push(h),l.push(1-u))}return c}within(e,n,r){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:i,coords:s,nodeSize:o}=this,a=[0,i.length-1,0],l=[],c=r*r;for(;a.length;){const u=a.pop()||0,h=a.pop()||0,d=a.pop()||0;if(h-d<=o){for(let b=d;b<=h;b++)cB(s[2*b],s[2*b+1],e,n)<=c&&l.push(i[b]);continue}const m=d+h>>1,y=s[2*m],v=s[2*m+1];cB(y,v,e,n)<=c&&l.push(i[m]),(u===0?e-r<=y:n-r<=v)&&(a.push(d),a.push(m-1),a.push(1-u)),(u===0?e+r>=y:n+r>=v)&&(a.push(m+1),a.push(h),a.push(1-u))}return l}}function KP(t,e,n,r,i,s){if(i-r<=n)return;const o=r+i>>1;wQ(t,e,o,r,i,s),KP(t,e,n,r,o-1,1-s),KP(t,e,n,o+1,i,1-s)}function wQ(t,e,n,r,i,s){for(;i>r;){if(i-r>600){const c=i-r+1,u=n-r+1,h=Math.log(c),d=.5*Math.exp(2*h/3),m=.5*Math.sqrt(h*d*(c-d)/c)*(u-c/2<0?-1:1),y=Math.max(r,Math.floor(n-u*d/c+m)),v=Math.min(i,Math.floor(n+(c-u)*d/c+m));wQ(t,e,n,y,v,s)}const o=e[2*n+s];let a=r,l=i;for(m1(t,e,r,n),e[2*i+s]>o&&m1(t,e,r,i);a<l;){for(m1(t,e,a,l),a++,l--;e[2*a+s]<o;)a++;for(;e[2*l+s]>o;)l--}e[2*r+s]===o?m1(t,e,r,l):(l++,m1(t,e,l,i)),l<=n&&(r=l+1),n<=l&&(i=l-1)}}function m1(t,e,n,r){pS(t,n,r),pS(e,2*n,2*r),pS(e,2*n+1,2*r+1)}function pS(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function cB(t,e,n,r){const i=t-n,s=e-r;return i*i+s*s}class dye{constructor(e=[],n=pye){if(this.data=e,this.length=this.data.length,this.compare=n,this.length>0)for(let r=(this.length>>1)-1;r>=0;r--)this._down(r)}push(e){this.data.push(e),this.length++,this._up(this.length-1)}pop(){if(this.length===0)return;const e=this.data[0],n=this.data.pop();return this.length--,this.length>0&&(this.data[0]=n,this._down(0)),e}peek(){return this.data[0]}_up(e){const{data:n,compare:r}=this,i=n[e];for(;e>0;){const s=e-1>>1,o=n[s];if(r(i,o)>=0)break;n[e]=o,e=s}n[e]=i}_down(e){const{data:n,compare:r}=this,i=this.length>>1,s=n[e];for(;e<i;){let o=(e<<1)+1,a=n[o];const l=o+1;if(l<this.length&&r(n[l],a)<0&&(o=l,a=n[l]),r(a,s)>=0)break;n[e]=a,e=o}n[e]=s}}function pye(t,e){return t<e?-1:t>e?1:0}const gye=6371,Al=Math.PI/180;function mye(t,e,n,r=1/0,i=1/0,s){let o=1;const a=[];r===void 0&&(r=1/0),i!==void 0&&(o=Oh(i/gye));const l=new dye([],vye);let c={left:0,right:t.ids.length-1,axis:0,minLng:-180,minLat:-90,maxLng:180,maxLat:90};const u=Math.cos(n*Al);for(;c;){const h=c.right,d=c.left;if(h-d<=t.nodeSize)for(let m=d;m<=h;m++){const y=t.ids[m];
3360{const v=fB(e,n,t.coords[2*m],t.coords[2*m+1],u);l.push({id:y,dist:v})}}else{const m=d+h>>1,y=t.coords[2*m],v=t.coords[2*m+1],b=t.ids[m];{const C=fB(e,n,y,v,u);l.push({id:b,dist:C})}const x=(c.axis+1)%2,T={left:d,right:m-1,axis:x,minLng:c.minLng,minLat:c.minLat,maxLng:c.axis===0?y:c.maxLng,maxLat:c.axis===1?v:c.maxLat,dist:0},E={left:m+1,right:h,axis:x,minLng:c.axis===0?y:c.minLng,minLat:c.axis===1?v:c.minLat,maxLng:c.maxLng,maxLat:c.maxLat,dist:0};T.dist=uB(e,n,u,T),E.dist=uB(e,n,u,E),l.push(T),l.push(E)}for(;l.length&&l.peek().id!=null;){const m=l.pop();if(m.dist>o||(a.push(m.id),a.length===r))return a}c=l.pop()}return a}function uB(t,e,n,r){const i=r.minLng,s=r.maxLng,o=r.minLat,a=r.maxLat;if(t>=i&&t<=s)return e<o?Oh((e-o)*Al):e>a?Oh((e-a)*Al):0;const l=Math.min(Oh((t-i)*Al),Oh((t-s)*Al)),c=yye(e,l);return c>o&&c<a?S_(l,n,e,c):Math.min(S_(l,n,e,o),S_(l,n,e,a))}function vye(t,e){return t.dist-e.dist}function Oh(t){const e=Math.sin(t/2);return e*e}function S_(t,e,n,r){return e*Math.cos(r*Al)*t+Oh((n-r)*Al)}function fB(t,e,n,r,i){const s=Oh((t-n)*Al);return S_(s,i,e,r)}function yye(t,e){const n=1-2*e;return n<=0?t>0?90:-90:Math.atan(Math.tan(t*Al)/n)/Al}const hB=new Map;function bye(t,e){if(!e)return`${Math.round(t)}`;const{scale:n=1,offset:r=0,decimals:i=0}=e,s=n*t+r;return`${i?Math.round(s*10**i)/10**i:Math.round(s)}`}const xQ=[255,255,255],VM='"Helvetica Neue", Arial, Helvetica, sans-serif',WM=[255,255,255],$M=[13,13,13],AQ=bye,_ye=[255,255,255];function Gn(t,e){const n={};for(const r in t)if(t[r]===void 0&&r in e){const i=e[r];i&&("value"in i?i.value&&(n[r]=i.value):n[r]=i)}return Object.freeze({...t,...n})}const wye=new Map,xye=new class{constructor(){this.queue=Promise.resolve()}async run(t){const e=this.queue;let n;this.queue=new Promise((r=>{n=r}));try{return await e,await t()}finally{n()}}};async function Aye(t,e){const n=await(async function(a){if(hB.has(a))return hB.get(a);try{if(a==="geotiff")return await eQ(()=>import("./__vite-optional-peer-dep_geotiff_weatherlayers-gl-BIHI7g3E.js"),[])}catch(l){throw new Error(`Optional dependency '${a}' is missing, install it with a package manager or provide with \`setLibrary('${a}', library)\``,{cause:l})}})("geotiff");let r;try{r=await n.fromUrl(t,{allowFullFile:!0,blockSize:Number.MAX_SAFE_INTEGER,fetch:(a,l)=>fetch(a,{...l,headers:{...l==null?void 0:l.headers,...e==null?void 0:e.headers}})})}catch(a){throw new Error(`Image ${t} can't be decoded.`,{cause:a})}const i=await r.getImage(0),s=await i.readRasters({interleave:!0});if(!(s instanceof Uint8Array||s instanceof Uint8ClampedArray||s instanceof Float32Array))throw new Error("Unsupported data format");return{data:(function(a,l){if(l==null)return a;const c=a.slice(0);for(let u=0;u<c.length;u++)Math.abs(c[u]-l)<2*Number.EPSILON&&(c[u]=NaN);return c})(s,i.getGDALNoData()),width:i.getWidth(),height:i.getHeight()}}function Eye(t){return async(e,n)=>{if((n==null?void 0:n.cache)===!1)return t(e);const r=(n==null?void 0:n.cache)??wye,i=e+(n!=null&&n.headers?":"+JSON.stringify(n==null?void 0:n.headers):""),s=r.get(i);if(s)return s;const o={...n,cache:void 0},a=t(e,o);return r.set(i,a),a.then((l=>{r.set(i,l)})),a}}const rA=Eye((async(t,e)=>{if(t.includes(".png")||t.includes(".webp")||t.includes("image/png")||t.includes("image/webp"))return(async function(n,r){let i;if(r!=null&&r.headers){const d=await fetch(n,{headers:r.headers});if(!d.ok)throw new Error(`URL ${n} can't be loaded. Status: ${d.status}`);const m=await d.blob();i=URL.createObjectURL(m)}const s=new Image;try{await new Promise(((d,m)=>{s.addEventListener("load",d),s.addEventListener("error",m),s.crossOrigin="anonymous",s.src=i??n}))}catch(d){throw new Error(`URL ${n} can't be loaded.`,{cause:d})}finally{i&&URL.revokeObjectURL(i)}try{await xye.run((()=>s.decode()))}catch(d){throw new Error(`Image ${n} can't be decoded.`,{cause:d})}const o=document.createElement("canvas");o.width=s.width,o.height=s.height;const a=o.getContext("2d");a.drawImage(s,0,0);const l=a.getImageData(0,0,o.width,o.height),{data:c,width:u,height:h}=l;return{data:c,width:u,height:h}})(t,e);if(t.includes(".tif")||t.includes("image/tif"))return Aye(t,e);throw new Error("Unsupported data format")})),Lc={NEAREST:"NEAREST",LINEAR:"LINEAR",CUBIC:"CUBIC"},hs={SCALAR:"SCALAR",VECTOR:"VECTOR"};
3360function Lb(t){return t%1}function gS(t,e){return t.map(((n,r)=>t[r]+e[r]))}function Fb(t,e){return t.map(((n,r)=>t[r]*e))}function Ub(t,e){return t.map(((n,r)=>t[r]*e[r])).reduce(((n,r)=>n+r))}function im(t,e,n){return t===e?t:t*(1-n)+e*n}function T_(t,e,n){return t.map(((r,i)=>im(t[i],e[i],n)))}function Sye(t,e){return e?t[3]>=255:!isNaN(t[0])}function EQ(t,e,n){return e===hs.VECTOR?n?[im(n[0],n[1],t[0]/255),im(n[0],n[1],t[1]/255)]:[t[0],t[1]]:[NaN,NaN]}function Tye(t,e,n){if(e===hs.VECTOR){const r=EQ(t,e,n);return Math.hypot(r[0],r[1])}return(function(r,i,s){return i===hs.VECTOR?0:s?im(s[0],s[1],r[0]/255):r[0]})(t,e,n)}function Ar(t,e,n,r,i,s){const{data:o,width:a,height:l}=t,c=o.length/(a*l),u=(n+i+.5)/e[0],h=(r+s+.5)/e[1],d=Math.max(0,Math.min(a-1,Math.floor(u*a))),m=Math.max(0,Math.min(l-1,Math.floor(h*l)));return new Array(c).fill(void 0).map(((y,v)=>o[(d+m*a)*c+v]))}const dB=[3,-6,0,4].map((t=>t/6)),pB=[-1,6,-12,8].map((t=>t/6));function zb(t){return[t*t*t,t*t,t,1]}function v1(t,e,n,r,i){const s=gS(gS(gS(Fb(t,Ub(pB,zb(i+1))),Fb(e,Ub(dB,zb(i)))),Fb(n,Ub(dB,zb(1-i)))),Fb(r,Ub(pB,zb(2-i))));return s[3]=t[3]>0&&e[3]>0&&n[3]>0&&r[3]>0?Math.max(Math.max(Math.max(t[3],e[3]),n[3]),r[3]):0,s}function mS(t,e,n,r,i){return n===Lc.CUBIC?(function(s,o,a,l){const c=a*o[0]-.5,u=l*o[1]-.5,h=Math.floor(c),d=Math.floor(u),m=Lb(c),y=Lb(u);return v1(v1(Ar(s,o,h,d,-1,-1),Ar(s,o,h,d,0,-1),Ar(s,o,h,d,1,-1),Ar(s,o,h,d,2,-1),m),v1(Ar(s,o,h,d,-1,0),Ar(s,o,h,d,0,0),Ar(s,o,h,d,1,0),Ar(s,o,h,d,2,0),m),v1(Ar(s,o,h,d,-1,1),Ar(s,o,h,d,0,1),Ar(s,o,h,d,1,1),Ar(s,o,h,d,2,1),m),v1(Ar(s,o,h,d,-1,2),Ar(s,o,h,d,0,2),Ar(s,o,h,d,1,2),Ar(s,o,h,d,2,2),m),y)})(t,e,r,i):n===Lc.LINEAR?(function(s,o,a,l){const c=a*o[0]-.5,u=l*o[1]-.5,h=Math.floor(c),d=Math.floor(u),m=Lb(c),y=Lb(u);return T_(T_(Ar(s,o,h,d,0,0),Ar(s,o,h,d,1,0),m),T_(Ar(s,o,h,d,0,1),Ar(s,o,h,d,1,1),m),y)})(t,e,r,i):(function(s,o,a,l){const c=a*o[0]-.5,u=l*o[1]-.5;return Ar(s,o,Math.round(c),Math.round(u),0,0)})(t,e,r,i)}function Cye(t,e,n,r,i,s,o,a){const l=s?o+.5/n[0]:im(0+.5/n[0],1-.5/n[0],o),c=im(0+.5/n[1],1-.5/n[1],a);return e&&i>0?T_(mS(t,n,r,l,c),mS(e,n,r,l,c),i):mS(t,n,r,l,c)}function Pye(t,e,n){const r=1+Math.max(0,n);return[t/r,e/r]}const SQ=-180,TQ=180,CQ=-85.051129,PQ=85.051129,Iye=[SQ,CQ,TQ,PQ];function GP(t,e){let n=((t+180)%(r=360)+r)%r-180;var r;return typeof e=="number"&&n<e&&(n+=360),n}function Mc(t){return t[2]-t[0]==360}function IQ(t,e){return t[0]>=e[0]&&t[0]<=e[2]&&t[1]>=e[1]&&t[1]<=e[3]}function y1(t,e){return{type:"Feature",geometry:{type:"Point",coordinates:t},properties:e}}function Oye(t,e,n){const{image:r,image2:i,imageSmoothing:s,imageInterpolation:o,imageWeight:a,imageType:l,imageUnscale:c,imageMinValue:u,imageMaxValue:h}=t,{width:d,height:m}=r,y=(function(T,E,C){const I=[C[0],C[3]],O=(C[2]-C[0])/T,N=(C[3]-C[1])/E;return U=>{const[F,H]=U;return[(F-I[0])/O,(I[1]-H)/N]}})(d,m,e),v=Pye(d,m,s),b=Mc(e);return{type:"FeatureCollection",features:n.map((T=>{if(!IQ(T,e))return y1(T,{value:NaN});const E=y(T),C=E[0]/d,I=E[1]/m,O=Cye(r,i,v,o,a,b,C,I);if(!Sye(O,c))return y1(T,{value:NaN});const N=Tye(O,l,c);if(typeof u=="number"&&!isNaN(u)&&N<u||typeof h=="number"&&!isNaN(h)&&N>h)return y1(T,{value:NaN});if(l===hs.VECTOR){const U=(function(F,H,W){if(H===hs.VECTOR){const z=EQ(F,H,W);return(360-(Math.atan2(z[1],z[0])/Math.PI*180+180)-270)%360}return NaN})(O,l,c);return y1(T,{value:N,direction:U})}return y1(T,{value:N})}))}}const OQ=6370972;function ma(t,e){return Qve(t,e,OQ)}function Mye(t,e,n){return Yve(t,e,n,OQ)}function Ca(t){return!!t.resolution}function MQ(t){return!Ca(t)}function Dm(t,e,n){return!(e!=null&&t.zoom<e)&&!(n!=null&&t.zoom>n)}function HM(t){return[t.longitude,t.latitude]}function RQ(t){const e=HM(t);return Math.max(ma(e,t.unproject([t.width/2,0])),ma(e,t.unproject([0,t.height/2])),...t.width>t.height?[ma(e,t.unproject([t.width/2-t.height/4*1,t.height/2])),ma(e,t.unproject([t.width/2-t.height/2*1,t.height/2])),ma(e,t.unproject([t.width/2-t.height/4*3,t.height/2])),ma(e,t.unproject([t.width/2-t.height,t.height/2]))]:[ma(e,t.unproject([t.width/2,t.height/2-t.width/4*1])),ma(e,t.unproject([t.width/2,t.height/2-t.width/2*1])),ma(e,t.unproject([t.width/2,t.height/2-t.width/4*3])),ma(e,t.unproject([t.width/2,t.height/2-t.width]))])}function kQ(t){return(function(e){const n=e[2]-e[0]<360?GP(e[0]):SQ,r=e[2]-e[0]<360?GP(e[2],n):TQ;return[n,Math.max(e[1],CQ),r,Math.min(e[3],PQ)]})(t.getBounds())}function lv(t){return Ca(t)?Math.log2(t.scale):t.zoom}function gB(t,e){return e*(Ca(t)?-1:1)}function Ju(t,e){return e+(Ca(t)?180:0)}
3360const Rye=new WeakMap,kye=new WeakMap;function af(t,e,n=!1){const r=n?Rye:kye,i=r.get(t)??(()=>{const o=new WeakMap;return r.set(t,o),o})();return i.get(e)??(()=>{const o=(function(l,c,u){const{data:h,width:d,height:m}=c,y=h.length/(d*m);let v;if(h instanceof Uint8Array||h instanceof Uint8ClampedArray)if(y===4)v="rgba8unorm";else if(y===2)v="rg8unorm";else{if(y!==1)throw new Error("Unsupported data format");v="r8unorm"}else{if(!(h instanceof Float32Array))throw new Error("Unsupported data format");if(!l.features.has("float32-renderable-webgl"))throw new Error("Float textures are required");if(y===2)v="rg32float";else{if(y!==1)throw new Error("Unsupported data format");v="r32float"}}return{data:h,width:d,height:m,format:v,mipmaps:!1,sampler:{magFilter:"nearest",minFilter:"nearest",addressModeU:u?"repeat":"clamp-to-edge",addressModeV:"clamp-to-edge",lodMaxClamp:0}}})(t,e,n),a=t.createTexture(o);return i.set(e,a),a})()}let vS=null;function fs(t){return vS||(vS=t.createTexture({data:new Uint8Array(4),width:1,height:1,mipmaps:!1})),vS}function qM(t,e){const n=e.domain(),r=[n[0],n[n.length-1]],i=$ve(e);return{paletteBounds:r,paletteTexture:t.createTexture({data:i,sampler:{magFilter:"linear",minFilter:"linear",addressModeU:"clamp-to-edge",addressModeV:"clamp-to-edge"}})}}function NQ(t){return[t[0]/255,t[1]/255,t[2]/255,(t[3]??255)/255]}function vw(t){return[t[0],t[1],t[2],255*t[3]]}const mB="uniform bitmap2Uniforms{vec4 A;bool B;float C;vec4 D;}bitmap2;const float E=512.;const float F=3.1415926536;const float G=E/F/2.;vec2 H(vec2 I){float J=I.x;float K=clamp(I.y,-89.9,89.9);return vec2(radians(J)+F,F+log(tan(F*0.25+radians(K)*0.5)))*G;}vec2 L(vec2 M){M/=G;return degrees(vec2(M.x-F,atan(exp(M.y-F))*2.-F*0.5));}vec4 N(vec3 O,float P){return mix(bitmap2.D,vec4(O,1.),P);}vec2 Q(vec2 R){return vec2((R.x-bitmap2.A[0])/(bitmap2.A[2]-bitmap2.A[0]),(R.y-bitmap2.A[3])/(bitmap2.A[1]-bitmap2.A[3]));}vec2 S(vec2 T,vec2 U){vec2 uv=T;if(bitmap2.C<-0.5){vec2 I=L(U);uv=Q(I);}else if(bitmap2.C>0.5){vec2 V=H(U);uv=Q(V);}return uv;}",vB="A",yB="B",bB="C",_B="D",Eg=Math.PI,Nye=Eg/4,wB=Eg/180,xB=512;function AB(t){const[e,n]=t,r=n*wB;return[xB*(e*wB+Eg)/(2*Eg),xB*(Eg+Math.log(Math.tan(Nye+.5*r)))/(2*Eg)]}function Dye(t={}){const{LNGLAT:e,CARTESIAN:n,DEFAULT:r}=Wt;let{viewportGlobe:i,bounds:s,_imageCoordinateSystem:o}=t;if(!(function(a){return Number.isFinite(a[0])})(s))throw new Error("_imageCoordinateSystem only supports rectangular bounds");if(o!==r){const a=i?e:n;if(o=o===e?e:n,o===e&&a===n)return{coordinateConversion:-1,bounds:s};if(o===n&&a===e){const l=AB([s[0],s[1]]),c=AB([s[2],s[3]]);return{coordinateConversion:1,bounds:[l[0],l[1],c[0],c[1]]}}}return{coordinateConversion:0,bounds:s}}const sm={name:"bitmap2",vs:mB,fs:mB,uniformTypes:{[vB]:"vec4<f32>",[yB]:"f32",[bB]:"f32",[_B]:"vec4<f32>"},getUniforms:function(t={}){const{bounds:e,coordinateConversion:n}=Dye(t);return{[vB]:e,[yB]:Mc(e)?1:0,[bB]:n,[_B]:t.transparentColor?NQ(t.transparentColor):[0,0,0,0]}}},EB="uniform sampler2D W;uniform sampler2D X;uniform rasterUniforms{vec2 Y;float Z;float a;float b;float c;vec2 d;float e;float f;}raster;",Bye="W",Lye="X",SB="Y",TB="Z",CB="a",PB="b",IB="c",OB="d",MB="e",RB="f",om={name:"raster",vs:EB,fs:EB,uniformTypes:{[SB]:"vec2<f32>",[TB]:"f32",[CB]:"f32",[PB]:"f32",[IB]:"f32",[OB]:"vec2<f32>",[MB]:"f32",[RB]:"f32"},getUniforms:function(t={}){return{[Bye]:t.imageTexture,[Lye]:t.imageTexture2,[SB]:t.imageTexture?[t.imageTexture.width,t.imageTexture.height]:[0,0],[TB]:t.imageSmoothing??0,[CB]:Object.values(Lc).indexOf(t.imageInterpolation??Lc.NEAREST),[PB]:t.imageTexture2!==t.imageTexture&&t.imageWeight?t.imageWeight:0,[IB]:Object.values(hs).indexOf(t.imageType??hs.SCALAR),[OB]:t.imageUnscale??[0,0],[MB]:t.imageMinValue??Number.MIN_SAFE_INTEGER,[RB]:t.imageMaxValue??Number.MAX_SAFE_INTEGER}}},kB="uniform sampler2D g;uniform paletteUniforms{vec2 h;vec4 i;}palette;float j(float min,float max,float k){return(k-min)/(max-min);}vec4 l(sampler2D g,vec2 h,vec4 i,float k){if(h[0]<h[1]){float m=j(h[0],h[1],k);return texture(g,vec2(m,0.));}else{return i;}}",Fye="g",NB="h",DB="i",am={name:"palette",vs:kB,fs:kB,uniformTypes:{[NB]:"vec2<f32>",[DB]:"vec4<f32>"},getUniforms:function(t={}){return{[Fye]:t.paletteTexture,[NB]:t.paletteBounds??[0,0],[DB]:t.paletteColor?NQ(t.paletteColor):[0,0,0,0]}}},j1={imageTexture:{type:"object",value:null},imageTexture2:{type:"object",value:null},imageSmoothing:{type:"number",value:0},imageInterpolation:{type:"object",value:Lc.CUBIC},imageWeight:{type:"number",value:0},imageType:{type:"object",value:hs.SCALAR},imageUnscale:{type:"array",value:null},imageMinValue:{type:"object",value:null},imageMaxValue:{type:"object",value:null},bounds:{type:"array",value:[-180,-90,180,90],compare:!0},minZoom:{type:"object",value:null},maxZoom:{type:"object",value:null},palette:{type:"object",value:null}};class yw extends Zx{getShaders(){const e=super.getShaders();return{...e,fs:`#version 300 es
3361#define SHADER_NAME  raster-bitmap-layer-fragment-shader
3362#ifdef GL_ES
3363precision highp float;
3364#endif
3365vec4 AA(sampler2D AB,vec2 AC,vec2 AD,vec2 AE){vec2 uv=(AD+AE+0.5)/AC;return texture(AB,uv);}const vec4 AF=vec4(3.,-6.,0.,4.)/6.;const vec4 AG=vec4(-1.,6.,-12.,8.)/6.;vec4 AH(float J){return vec4(J*J*J,J*J,J,1.);}vec4 AI(vec4 AJ,vec4 AK,vec4 AL,vec4 AM,float AN){vec4 O=AJ*dot(AG,AH(AN+1.))+AK*dot(AF,AH(AN))+AL*dot(AF,AH(1.-AN))+AM*dot(AG,AH(2.-AN));O.a=(AJ.a>0.&&AK.a>0.&&AL.a>0.&&AM.a>0.)?max(max(max(AJ.a,AK.a),AL.a),AM.a):0.;return O;}vec4 AO(sampler2D AB,vec2 AC,vec2 uv){vec2 AP=uv*AC-0.5;vec2 AD=floor(AP);vec2 AQ=fract(AP);return AI(AI(AA(AB,AC,AD,vec2(-1,-1)),AA(AB,AC,AD,vec2(0,-1)),AA(AB,AC,AD,vec2(1,-1)),AA(AB,AC,AD,vec2(2,-1)),AQ.x),AI(AA(AB,AC,AD,vec2(-1,0)),AA(AB,AC,AD,vec2(0,0)),AA(AB,AC,AD,vec2(1,0)),AA(AB,AC,AD,vec2(2,0)),AQ.x),AI(AA(AB,AC,AD,vec2(-1,1)),AA(AB,AC,AD,vec2(0,1)),AA(AB,AC,AD,vec2(1,1)),AA(AB,AC,AD,vec2(2,1)),AQ.x),AI(AA(AB,AC,AD,vec2(-1,2)),AA(AB,AC,AD,vec2(0,2)),AA(AB,AC,AD,vec2(1,2)),AA(AB,AC,AD,vec2(2,2)),AQ.x),AQ.y);}vec4 AR(sampler2D AB,vec2 AC,vec2 uv){vec2 AP=uv*AC-0.5;vec2 AD=floor(AP);vec2 AQ=fract(AP);return mix(mix(AA(AB,AC,AD,vec2(0,0)),AA(AB,AC,AD,vec2(1,0)),AQ.x),mix(AA(AB,AC,AD,vec2(0,1)),AA(AB,AC,AD,vec2(1,1)),AQ.x),AQ.y);}vec4 AS(sampler2D AB,vec2 AC,vec2 uv){vec2 AP=uv*AC-0.5;vec2 AD=floor(AP+0.5);return AA(AB,AC,AD,vec2(0,0));}vec4 AT(sampler2D AB,vec2 AC,float a,vec2 uv){if(a==2.){return AO(AB,AC,uv);}if(a==1.){return AR(AB,AC,uv);}else{return AS(AB,AC,uv);}}vec4 AU(sampler2D AB,sampler2D AV,vec2 AC,float a,float b,bool B,vec2 uv){vec2 AW;AW.x=B?uv.x+0.5/AC.x:mix(0.+0.5/AC.x,1.-0.5/AC.x,uv.x);AW.y=mix(0.+0.5/AC.y,1.-0.5/AC.y,uv.y);if(b>0.){vec4 AX=AT(AB,AC,a,AW);vec4 AY=AT(AV,AC,a,AW);return mix(AX,AY,b);}else{return AT(AB,AC,a,AW);}}vec4 AZ(sampler2D AB,sampler2D AV,vec2 Y,float Z,float a,float b,bool B,vec2 uv){float Aa=1.+max(0.,Z);vec2 AC=Y/Aa;return AU(AB,AV,AC,a,b,B,uv);}float Ab(float K,float J){return J==0.?sign(K)*F/2.:atan(K,J);}bool Ac(float k){uint Ad=floatBitsToUint(k);return(Ad&0x7fffffffu)>0x7f800000u;}bool Ae(vec4 AX,vec2 d){if(d[0]<d[1]){return AX.a>=1.;}else{return!Ac(AX.x);}}float Af(vec4 AX,float c,vec2 d){if(c==1.){return 0.;}else{if(d[0]<d[1]){return mix(d[0],d[1],AX.x);}else{return AX.x;}}}vec2 Ag(vec4 AX,float c,vec2 d){if(c==1.){if(d[0]<d[1]){return mix(vec2(d[0]),vec2(d[1]),AX.xy);}else{return AX.xy;}}else{return vec2(0.);}}float Ah(vec4 AX,float c,vec2 d){if(c==1.){vec2 k=Ag(AX,c,d);return length(k);}else{return Af(AX,c,d);}}float Ai(vec4 AX,float c,vec2 d){if(c==1.){vec2 k=Ag(AX,c,d);return mod((360.-(Ab(k.y,k.x)/F*180.+180.))-270.,360.)/360.;}else{return 0.;}}in vec2 vTexCoord;in vec2 vTexPos;out vec4 fragColor;void main(void){vec2 uv=S(vTexCoord,vTexPos);vec4 AX=AZ(W,X,raster.Y,raster.Z,raster.a,raster.b,bitmap2.B,uv);if(!Ae(AX,raster.d)){discard;}float k=Ah(AX,raster.c,raster.d);if((!Ac(raster.e)&&k<raster.e)||(!Ac(raster.f)&&k>raster.f)){discard;}vec4 Aj=l(g,palette.h,palette.i,k);fragColor=N(Aj.rgb,Aj.a*layer.opacity);geometry.uv=uv;DECKGL_FILTER_COLOR(fragColor,geometry);if(bool(picking.isActive)&&!bool(picking.isAttribute)){float m=j(palette.h[0],palette.h[1],k);float Ak=Ai(AX,raster.c,raster.d);fragColor=vec4(m,Ak,0,1);}}`,modules:[...e.modules,sm,om,am]}}updateState(e){const{palette:n}=e.props;super.updateState(e),n!==e.oldProps.palette&&this._updatePalette()}draw(e){const{device:n,viewport:r}=this.context,{model:i}=this.state,{imageTexture:s,imageTexture2:o,imageSmoothing:a,imageInterpolation:l,imageWeight:c,imageType:u,imageUnscale:h,imageMinValue:d,imageMaxValue:m,bounds:y,_imageCoordinateSystem:v,transparentColor:b,minZoom:x,maxZoom:T}=Gn(this.props,j1),{paletteTexture:E,paletteBounds:C}=this.state;if(!s)return;const I=Ca(r);i&&Dm(r,x,T)&&(i.shaderInputs.setProps({[sm.name]:{viewportGlobe:I,bounds:y,_imageCoordinateSystem:v,transparentColor:b},[om.name]:{imageTexture:s??fs(n),imageTexture2:o??fs(n),imageSmoothing:a,imageInterpolation:l,imageWeight:c,imageType:u,imageUnscale:h,imageMinValue:d,imageMaxValue:m},[am.name]:{paletteTexture:E??fs(n),paletteBounds:C}}),i.setParameters({...i.parameters,cullMode:"back",depthCompare:"always",...this.props.parameters}),this.props.image=s,super.draw(e),this.props.image=null)}
3365_updatePalette(){const{device:e}=this.context,{palette:n}=Gn(this.props,j1);if(!n)return void this.setState({paletteTexture:void 0,paletteBounds:void 0});const r=Cy(n),{paletteBounds:i,paletteTexture:s}=qM(e,r);this.setState({paletteTexture:s,paletteBounds:i})}_getRasterMagnitudeValue(e,n){return n[0]+e[0]/255*(n[1]-n[0])}_getRasterDirectionValue(e){const{imageType:n}=Gn(this.props,j1);return n===hs.VECTOR?e[1]/255*360:NaN}getPickingInfo(e){const n=super.getPickingInfo(e),{imageType:r}=Gn(this.props,j1),{paletteBounds:i}=this.state;if(!n.color)return n;let s;const o=this._getRasterMagnitudeValue(n.color,i??[0,0]);return r===hs.VECTOR?s={value:o,direction:this._getRasterDirectionValue(n.color)}:s={value:o},n.raster=s,n}}yw.layerName="RasterBitmapLayer",yw.defaultProps=j1;const ZP={...yw.defaultProps,imageTexture:void 0,imageTexture2:void 0,image:{type:"object",value:null},image2:{type:"object",value:null},bounds:{type:"array",value:[-180,-90,180,90],compare:!0},gridEnabled:{type:"boolean",value:!1}};class BB extends Ns{renderLayers(){const{device:e}=this.context,{props:n,imageTexture:r,imageTexture2:i}=this.state;if(!n||!r)return[];const{gridEnabled:s}=Gn(n,ZP);let o;if(s){const{positions:a}=this.state;o=new Jx({data:a,getPosition:l=>l,getRadius:1,getFillColor:[255,255,255],radiusUnits:"pixels",opacity:.2,parameters:{depthCompare:"always",...this.props.parameters}})}return[new yw(this.props,this.getSubLayerProps({id:"bitmap",imageTexture:r,imageTexture2:i,_imageCoordinateSystem:Wt.LNGLAT,image:fs(e),image2:fs(e)})),...o?[o]:[]]}updateState(e){const{image:n,image2:r,imageUnscale:i,bounds:s,gridEnabled:o}=e.props;if(super.updateState(e),n&&i&&!(n.data instanceof Uint8Array||n.data instanceof Uint8ClampedArray))throw new Error("imageUnscale can be applied to Uint8 data only");if(n!==e.oldProps.image||r!==e.oldProps.image2){const{device:a}=this.context,{image:l,image2:c}=this.props,u=l?af(a,l,Mc(s)):null,h=c?af(a,c,Mc(s)):null;this.setState({imageTexture:u,imageTexture2:h})}n===e.oldProps.image&&o===e.oldProps.gridEnabled||this._updateFeatures(),this.setState({props:e.props})}_updateFeatures(){const{image:e,bounds:n,gridEnabled:r}=Gn(this.props,ZP);if(e&&r){const i=[n[0],n[1]],s=[n[2],n[3]],o=s[0]-i[0],a=s[1]-i[1],l=e.width,c=e.height,u=o/(l-(Mc(n)?0:1)),h=a/(c-1),d=new Array(l*c).fill(void 0).map(((y,v)=>[i[0]+v%l*u,i[1]+Math.floor(v/l)*h])),m=(function(y,v){return Ca(y)?v:v.filter((b=>IQ(b,Iye)))})(this.context.viewport,d);this.setState({positions:m})}}}BB.layerName="RasterLayer",BB.defaultProps=ZP;const LB="uniform contourUniforms{float n;float o;float p;}contour;",FB="n",UB="o",zB="p",jB={name:"contour",vs:LB,fs:LB,uniformTypes:{[FB]:"f32",[UB]:"f32",[zB]:"f32"},getUniforms:function(t={}){return{[FB]:t.interval,[UB]:t.majorInterval,[zB]:t.width}}},JP={imageTexture:{type:"object",value:null},imageTexture2:{type:"object",value:null},imageSmoothing:{type:"number",value:0},imageInterpolation:{type:"object",value:Lc.CUBIC},imageWeight:{type:"number",value:0},imageType:{type:"object",value:hs.SCALAR},imageUnscale:{type:"object",value:null},imageMinValue:{type:"object",value:null},imageMaxValue:{type:"object",value:null},bounds:{type:"array",value:[-180,-90,180,90],compare:!0},minZoom:{type:"object",value:null},maxZoom:{type:"object",value:10},palette:{type:"object",value:null},color:{type:"color",value:xQ},interval:{type:"number",value:0},majorInterval:{type:"number",value:0},width:{type:"number",value:1}};class bw extends Zx{getShaders(){const e=super.getShaders();return{...e,fs:`#version 300 es
3366#define SHADER_NAME  contour-bitmap-layer-fragment-shader
3367#ifdef GL_ES
3368precision highp float;
3369#endif
3370vec4 AA(sampler2D AB,vec2 AC,vec2 AD,vec2 AE){vec2 uv=(AD+AE+0.5)/AC;return texture(AB,uv);}const vec4 AF=vec4(3.,-6.,0.,4.)/6.;const vec4 AG=vec4(-1.,6.,-12.,8.)/6.;vec4 AH(float J){return vec4(J*J*J,J*J,J,1.);}vec4 AI(vec4 AJ,vec4 AK,vec4 AL,vec4 AM,float AN){vec4 O=AJ*dot(AG,AH(AN+1.))+AK*dot(AF,AH(AN))+AL*dot(AF,AH(1.-AN))+AM*dot(AG,AH(2.-AN));O.a=(AJ.a>0.&&AK.a>0.&&AL.a>0.&&AM.a>0.)?max(max(max(AJ.a,AK.a),AL.a),AM.a):0.;return O;}
3370vec4 AO(sampler2D AB,vec2 AC,vec2 uv){vec2 AP=uv*AC-0.5;vec2 AD=floor(AP);vec2 AQ=fract(AP);return AI(AI(AA(AB,AC,AD,vec2(-1,-1)),AA(AB,AC,AD,vec2(0,-1)),AA(AB,AC,AD,vec2(1,-1)),AA(AB,AC,AD,vec2(2,-1)),AQ.x),AI(AA(AB,AC,AD,vec2(-1,0)),AA(AB,AC,AD,vec2(0,0)),AA(AB,AC,AD,vec2(1,0)),AA(AB,AC,AD,vec2(2,0)),AQ.x),AI(AA(AB,AC,AD,vec2(-1,1)),AA(AB,AC,AD,vec2(0,1)),AA(AB,AC,AD,vec2(1,1)),AA(AB,AC,AD,vec2(2,1)),AQ.x),AI(AA(AB,AC,AD,vec2(-1,2)),AA(AB,AC,AD,vec2(0,2)),AA(AB,AC,AD,vec2(1,2)),AA(AB,AC,AD,vec2(2,2)),AQ.x),AQ.y);}vec4 AR(sampler2D AB,vec2 AC,vec2 uv){vec2 AP=uv*AC-0.5;vec2 AD=floor(AP);vec2 AQ=fract(AP);return mix(mix(AA(AB,AC,AD,vec2(0,0)),AA(AB,AC,AD,vec2(1,0)),AQ.x),mix(AA(AB,AC,AD,vec2(0,1)),AA(AB,AC,AD,vec2(1,1)),AQ.x),AQ.y);}vec4 AS(sampler2D AB,vec2 AC,vec2 uv){vec2 AP=uv*AC-0.5;vec2 AD=floor(AP+0.5);return AA(AB,AC,AD,vec2(0,0));}vec4 AT(sampler2D AB,vec2 AC,float a,vec2 uv){if(a==2.){return AO(AB,AC,uv);}if(a==1.){return AR(AB,AC,uv);}else{return AS(AB,AC,uv);}}vec4 AU(sampler2D AB,sampler2D AV,vec2 AC,float a,float b,bool B,vec2 uv){vec2 AW;AW.x=B?uv.x+0.5/AC.x:mix(0.+0.5/AC.x,1.-0.5/AC.x,uv.x);AW.y=mix(0.+0.5/AC.y,1.-0.5/AC.y,uv.y);if(b>0.){vec4 AX=AT(AB,AC,a,AW);vec4 AY=AT(AV,AC,a,AW);return mix(AX,AY,b);}else{return AT(AB,AC,a,AW);}}vec4 AZ(sampler2D AB,sampler2D AV,vec2 Y,float Z,float a,float b,bool B,vec2 uv){float Aa=1.+max(0.,Z);vec2 AC=Y/Aa;return AU(AB,AV,AC,a,b,B,uv);}float Ab(float K,float J){return J==0.?sign(K)*F/2.:atan(K,J);}bool Ac(float k){uint Ad=floatBitsToUint(k);return(Ad&0x7fffffffu)>0x7f800000u;}bool Ae(vec4 AX,vec2 d){if(d[0]<d[1]){return AX.a>=1.;}else{return!Ac(AX.x);}}float Af(vec4 AX,float c,vec2 d){if(c==1.){return 0.;}else{if(d[0]<d[1]){return mix(d[0],d[1],AX.x);}else{return AX.x;}}}vec2 Ag(vec4 AX,float c,vec2 d){if(c==1.){if(d[0]<d[1]){return mix(vec2(d[0]),vec2(d[1]),AX.xy);}else{return AX.xy;}}else{return vec2(0.);}}float Ah(vec4 AX,float c,vec2 d){if(c==1.){vec2 k=Ag(AX,c,d);return length(k);}else{return Af(AX,c,d);}}float Ai(vec4 AX,float c,vec2 d){if(c==1.){vec2 k=Ag(AX,c,d);return mod((360.-(Ab(k.y,k.x)/F*180.+180.))-270.,360.)/360.;}else{return 0.;}}in vec2 vTexCoord;in vec2 vTexPos;out vec4 fragColor;void main(void){vec2 uv=S(vTexCoord,vTexPos);vec4 AX=AZ(W,X,raster.Y,raster.Z,raster.a,raster.b,bitmap2.B,uv);if(!Ae(AX,raster.d)){discard;}float k=Ah(AX,raster.c,raster.d);if((!Ac(raster.e)&&k<raster.e)||(!Ac(raster.f)&&k>raster.f)){discard;}float Aj=contour.o>contour.n?floor(contour.o/contour.n):1.;float Ak=k/contour.n;float Al=(step(fract(Ak/Aj),0.1)+1.)/2.;float Am=contour.p*Al;float An=abs(fract(Ak+0.5)-0.5);float Ao=length(vec2(dFdx(Ak),dFdy(Ak)));float Ap=1.-clamp((An/Ao)+0.5-Am,0.,1.);if(Ao==0.){Ap=0.;}float Aq=Ap*Al;vec4 Ar=l(g,palette.h,palette.i,k);fragColor=vec4(Ar.rgb,Ar.a*Aq*layer.opacity);geometry.uv=uv;DECKGL_FILTER_COLOR(fragColor,geometry);}`,modules:[...e.modules,sm,om,am,jB]}}updateState(e){const{palette:n}=e.props;super.updateState(e),n!==e.oldProps.palette&&this._updatePalette()}draw(e){const{device:n,viewport:r}=this.context,{model:i}=this.state,{imageTexture:s,imageTexture2:o,imageSmoothing:a,imageInterpolation:l,imageWeight:c,imageType:u,imageUnscale:h,imageMinValue:d,imageMaxValue:m,bounds:y,_imageCoordinateSystem:v,transparentColor:b,minZoom:x,maxZoom:T,color:E,interval:C,majorInterval:I,width:O}=Gn(this.props,JP),{paletteTexture:N,paletteBounds:U}=this.state;if(!s)return;const F=Ca(r);i&&Dm(r,x,T)&&(i.shaderInputs.setProps({[sm.name]:{viewportGlobe:F,bounds:y,_imageCoordinateSystem:v,transparentColor:b},[om.name]:{imageTexture:s??fs(n),imageTexture2:o??fs(n),imageSmoothing:a,imageInterpolation:l,imageWeight:c,imageType:u,imageUnscale:h,imageMinValue:d,imageMaxValue:m},[am.name]:{paletteTexture:N??fs(n),paletteBounds:U,paletteColor:E},[jB.name]:{interval:C,majorInterval:I,width:O}}),i.setParameters({...i.parameters,cullMode:"back",depthCompare:"always",...this.props.parameters}),this.props.image=s,super.draw(e),this.props.image=null)}_updatePalette(){const{device:e}=this.context,{palette:n}=Gn(this.props,JP);if(!n)return void this.setState({paletteTexture:void 0,paletteBounds:void 0});const r=Cy(n),{paletteBounds:i,paletteTexture:s}=qM(e,r);this.setState({paletteTexture:s,paletteBounds:i})}}bw.layerName="ContourBitmapLayer",bw.defaultProps=JP;const Uye={...bw.defaultProps,imageTexture:void 0,imageTexture2:void 0,image:{type:"object",value:null},image2:{type:"object",value:null}};let VB=class extends Ns{renderLayers(){const{device:e}=this.context,{props:n,imageTexture:r,imageTexture2:i}=this.state;
3370return n&&r?[new bw(this.props,this.getSubLayerProps({id:"bitmap",imageTexture:r,imageTexture2:i,_imageCoordinateSystem:Wt.LNGLAT,image:fs(e),image2:fs(e)}))]:[]}updateState(e){const{image:n,image2:r,imageUnscale:i,bounds:s}=e.props;if(super.updateState(e),n&&i&&!(n.data instanceof Uint8Array||n.data instanceof Uint8ClampedArray))throw new Error("imageUnscale can be applied to Uint8 data only");if(n!==e.oldProps.image||r!==e.oldProps.image2){const{device:o}=this.context,{image:a,image2:l}=this.props,c=a?af(o,a,Mc(s)):null,u=l?af(o,l,Mc(s)):null;this.setState({imageTexture:c,imageTexture2:u})}this.setState({props:e.props})}};VB.layerName="ContourLayer",VB.defaultProps=Uye;const zye="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";function jye(t=20){return new Array(t).fill(void 0).map((()=>zye.charAt(Math.floor(62*Math.random())))).join("")}const Vye=cye((WB=function(){const t=Symbol("Comlink.proxy"),e=Symbol("Comlink.endpoint"),n=Symbol("Comlink.releaseProxy"),r=Symbol("Comlink.finalizer"),i=Symbol("Comlink.thrown"),s=ce=>typeof ce=="object"&&ce!==null||typeof ce=="function",o={canHandle:ce=>s(ce)&&ce[t],serialize(ce){const{port1:me,port2:de}=new MessageChannel;return l(ce,me),[de,[de]]},deserialize:ce=>(ce.start(),(function(me,de){const ye=new Map;return me.addEventListener("message",(function(ve){const{data:ue}=ve;if(!ue||!ue.id)return;const k=ye.get(ue.id);if(k)try{k(ue)}finally{ye.delete(ue.id)}})),y(me,ye,[],de)})(ce))},a=new Map([["proxy",o],["throw",{canHandle:ce=>s(ce)&&i in ce,serialize({value:ce}){let me;return me=ce instanceof Error?{isError:!0,value:{message:ce.message,name:ce.name,stack:ce.stack}}:{isError:!1,value:ce},[me,[]]},deserialize(ce){throw ce.isError?Object.assign(new Error(ce.value.message),ce.value):ce.value}}]]);function l(ce,me=globalThis,de=["*"]){me.addEventListener("message",(function ye(ve){if(!ve||!ve.data)return;if(!(function(J,le){for(const pe of J)if(le===pe||pe==="*"||pe instanceof RegExp&&pe.test(le))return!0;return!1})(de,ve.origin))return void console.warn(`Invalid origin '${ve.origin}' for comlink proxy`);const{id:ue,type:k,path:ie}=Object.assign({path:[]},ve.data),ne=(ve.data.argumentList||[]).map(E);let Z;try{const J=ie.slice(0,-1).reduce(((pe,Te)=>pe[Te]),ce),le=ie.reduce(((pe,Te)=>pe[Te]),ce);switch(k){case"GET":Z=le;break;case"SET":J[ie.slice(-1)[0]]=E(ve.data.value),Z=!0;break;case"APPLY":Z=le.apply(J,ne);break;case"CONSTRUCT":Z=(function(pe){return Object.assign(pe,{[t]:!0})})(new le(...ne));break;case"ENDPOINT":{const{port1:pe,port2:Te}=new MessageChannel;l(ce,Te),Z=x(pe,[pe])}break;case"RELEASE":Z=void 0;break;default:return}}catch(J){Z={value:J,[i]:0}}Promise.resolve(Z).catch((J=>({value:J,[i]:0}))).then((J=>{const[le,pe]=T(J);me.postMessage(Object.assign(Object.assign({},le),{id:ue}),pe),k==="RELEASE"&&(me.removeEventListener("message",ye),c(me),r in ce&&typeof ce[r]=="function"&&ce[r]())})).catch((J=>{const[le,pe]=T({value:new TypeError("Unserializable return value"),[i]:0});me.postMessage(Object.assign(Object.assign({},le),{id:ue}),pe)}))})),me.start&&me.start()}function c(ce){(function(me){return me.constructor.name==="MessagePort"})(ce)&&ce.close()}function u(ce){if(ce)throw new Error("Proxy has been released and is not useable")}function h(ce){return C(ce,new Map,{type:"RELEASE"}).then((()=>{c(ce)}))}const d=new WeakMap,m="FinalizationRegistry"in globalThis&&new FinalizationRegistry((ce=>{const me=(d.get(ce)||0)-1;d.set(ce,me),me===0&&h(ce)}));function y(ce,me,de=[],ye=function(){}){let ve=!1;const ue=new Proxy(ye,{get(k,ie){if(u(ve),ie===n)return()=>{(function(ne){m&&m.unregister(ne)})(ue),h(ce),me.clear(),ve=!0};if(ie==="then"){if(de.length===0)return{then:()=>ue};const ne=C(ce,me,{type:"GET",path:de.map((Z=>Z.toString()))}).then(E);return ne.then.bind(ne)}return y(ce,me,[...de,ie])},set(k,ie,ne){u(ve);const[Z,J]=T(ne);return C(ce,me,{type:"SET",path:[...de,ie].map((le=>le.toString())),value:Z},J).then(E)},apply(k,ie,ne){u(ve);const Z=de[de.length-1];if(Z===e)return C(ce,me,{type:"ENDPOINT"}).then(E);if(Z==="bind")return y(ce,me,de.slice(0,-1));const[J,le]=v(ne);
3370return C(ce,me,{type:"APPLY",path:de.map((pe=>pe.toString())),argumentList:J},le).then(E)},construct(k,ie){u(ve);const[ne,Z]=v(ie);return C(ce,me,{type:"CONSTRUCT",path:de.map((J=>J.toString())),argumentList:ne},Z).then(E)}});return(function(k,ie){const ne=(d.get(ie)||0)+1;d.set(ie,ne),m&&m.register(k,ie,k)})(ue,ce),ue}function v(ce){const me=ce.map(T);return[me.map((ye=>ye[0])),(de=me.map((ye=>ye[1])),Array.prototype.concat.apply([],de))];var de}const b=new WeakMap;function x(ce,me){return b.set(ce,me),ce}function T(ce){for(const[me,de]of a)if(de.canHandle(ce)){const[ye,ve]=de.serialize(ce);return[{type:"HANDLER",name:me,value:ye},ve]}return[{type:"RAW",value:ce},b.get(ce)||[]]}function E(ce){switch(ce.type){case"HANDLER":return a.get(ce.name).deserialize(ce.value);case"RAW":return ce.value}}function C(ce,me,de,ye){return new Promise((ve=>{const ue=new Array(4).fill(0).map((()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16))).join("-");me.set(ue,ve),ce.start&&ce.start(),ce.postMessage(Object.assign({id:ue},de),ye)}))}const I=6371e3;function O(ce){return ce/180*Math.PI}const N=6370972;function U(ce,me){return(function(de,ye,ve=I){const ue=ve,k=O(de[1]),ie=O(de[0]),ne=O(ye[1]),Z=ne-k,J=O(ye[0])-ie,le=Math.sin(Z/2)*Math.sin(Z/2)+Math.cos(k)*Math.cos(ne)*Math.sin(J/2)*Math.sin(J/2);return ue*(2*Math.atan2(Math.sqrt(le),Math.sqrt(1-le)))})(ce,me,N)}const F={NEAREST:"NEAREST",LINEAR:"LINEAR",CUBIC:"CUBIC"},H={VECTOR:"VECTOR"};function W(ce){return ce%1}function z(ce,me){return ce.map(((de,ye)=>ce[ye]+me[ye]))}function V(ce,me){return ce.map(((de,ye)=>ce[ye]*me))}function M(ce,me){return ce.map(((de,ye)=>ce[ye]*me[ye])).reduce(((de,ye)=>de+ye))}function K(ce,me,de){return ce===me?ce:ce*(1-de)+me*de}function j(ce,me,de){return ce.map(((ye,ve)=>K(ce[ve],me[ve],de)))}function q(ce,me){return me?ce[3]>=255:!isNaN(ce[0])}function Y(ce,me,de){if(me===H.VECTOR){const ye=(function(ve,ue,k){return ue===H.VECTOR?k?[K(k[0],k[1],ve[0]/255),K(k[0],k[1],ve[1]/255)]:[ve[0],ve[1]]:[NaN,NaN]})(ce,me,de);return Math.hypot(ye[0],ye[1])}return(function(ye,ve,ue){return ve===H.VECTOR?0:ue?K(ue[0],ue[1],ye[0]/255):ye[0]})(ce,me,de)}function X(ce,me,de,ye,ve,ue){const{data:k,width:ie,height:ne}=ce,Z=k.length/(ie*ne),J=(de+ve+.5)/me[0],le=(ye+ue+.5)/me[1],pe=Math.max(0,Math.min(ie-1,Math.floor(J*ie))),Te=Math.max(0,Math.min(ne-1,Math.floor(le*ne)));return new Array(Z).fill(void 0).map(((we,Qe)=>k[(pe+Te*ie)*Z+Qe]))}const te=[3,-6,0,4].map((ce=>ce/6)),D=[-1,6,-12,8].map((ce=>ce/6));function $(ce){return[ce*ce*ce,ce*ce,ce,1]}function he(ce,me,de,ye,ve){const ue=z(z(z(V(ce,M(D,$(ve+1))),V(me,M(te,$(ve)))),V(de,M(te,$(1-ve)))),V(ye,M(D,$(2-ve))));return ue[3]=ce[3]>0&&me[3]>0&&de[3]>0&&ye[3]>0?Math.max(Math.max(Math.max(ce[3],me[3]),de[3]),ye[3]):0,ue}function Se(ce,me,de,ye,ve){return de===F.CUBIC?(function(ue,k,ie,ne){const Z=ie*k[0]-.5,J=ne*k[1]-.5,le=Math.floor(Z),pe=Math.floor(J),Te=W(Z),we=W(J);return he(he(X(ue,k,le,pe,-1,-1),X(ue,k,le,pe,0,-1),X(ue,k,le,pe,1,-1),X(ue,k,le,pe,2,-1),Te),he(X(ue,k,le,pe,-1,0),X(ue,k,le,pe,0,0),X(ue,k,le,pe,1,0),X(ue,k,le,pe,2,0),Te),he(X(ue,k,le,pe,-1,1),X(ue,k,le,pe,0,1),X(ue,k,le,pe,1,1),X(ue,k,le,pe,2,1),Te),he(X(ue,k,le,pe,-1,2),X(ue,k,le,pe,0,2),X(ue,k,le,pe,1,2),X(ue,k,le,pe,2,2),Te),we)})(ce,me,ye,ve):de===F.LINEAR?(function(ue,k,ie,ne){const Z=ie*k[0]-.5,J=ne*k[1]-.5,le=Math.floor(Z),pe=Math.floor(J),Te=W(Z),we=W(J);return j(j(X(ue,k,le,pe,0,0),X(ue,k,le,pe,1,0),Te),j(X(ue,k,le,pe,0,1),X(ue,k,le,pe,1,1),Te),we)})(ce,me,ye,ve):(function(ue,k,ie,ne){const Z=ie*k[0]-.5,J=ne*k[1]-.5;return X(ue,k,Math.round(Z),Math.round(J),0,0)})(ce,me,ye,ve)}function fe(ce,me,de,ye,ve,ue,k,ie){const ne=ue?k+.5/de[0]:K(0+.5/de[0],1-.5/de[0],k),Z=K(0+.5/de[1],1-.5/de[1],ie);return me&&ve>0?j(Se(ce,de,ye,ne,Z),Se(me,de,ye,ne,Z),ve):Se(ce,de,ye,ne,Z)}function $e(ce,me){const{image:de,image2:ye,imageSmoothing:ve,imageInterpolation:ue,imageWeight:k,imageType:ie,imageUnscale:ne,imageMinValue:Z,imageMaxValue:J}=ce,{width:le,height:pe}=de,Te=ue!==F.NEAREST?F.NEAREST:ue,we=(function(Xe,ft,It){const gt=1+Math.max(0,It);
3370return[Xe/gt,ft/gt]})(le,pe,ve),Qe=(function(Xe){return Xe[2]-Xe[0]==360})(me),nt=new Float32Array(le*pe);for(let Xe=0;Xe<pe;Xe++)for(let ft=0;ft<le;ft++){const It=ft+Xe*le,gt=fe(de,ye,we,Te,k,Qe,ft/le,Xe/pe);if(!q(gt,ne)){nt[It]=NaN;continue}const Yt=Y(gt,ie,ne);typeof Z=="number"&&!isNaN(Z)&&Yt<Z||typeof J=="number"&&!isNaN(J)&&Yt>J?nt[It]=NaN:nt[It]=Yt}return{data:nt,width:le,height:pe}}function Ze(ce,me,de){let{data:ye,width:ve,height:ue}=ce;const k=1e3*de,ie=(function(pe,Te,we){const Qe=[we[0],we[3]],nt=(we[2]-we[0])/pe,Xe=(we[3]-we[1])/Te;return ft=>{const[It,gt]=ft;return[Qe[0]+It*nt,Qe[1]-gt*Xe]}})(ve,ue,me);ye=(function(pe,Te,we){const Qe=new Float32Array(pe.length);for(let nt=0;nt<we;nt++)for(let Xe=0;Xe<Te;Xe++){const ft=Xe+nt*Te;if(Xe>=1&&Xe<=Te-2&&nt>=1&&nt<=we-2){const It=[pe[Xe-1+(nt-1)*Te],pe[Xe+(nt-1)*Te],pe[Xe+1+(nt-1)*Te],pe[Xe-1+nt*Te],pe[Xe+nt*Te],pe[Xe+1+nt*Te],pe[Xe-1+(nt+1)*Te],pe[Xe+(nt+1)*Te],pe[Xe+1+(nt-1)*Te]];Qe[ft]=It.reduce(((gt,Yt)=>gt+Yt),0)/It.length}else Qe[ft]=pe[ft]}return Qe})(ye,ve,ue);let ne=[],Z=[];for(let pe=1;pe<ue-1;pe++)for(let Te=1;Te<ve-1;Te++){const we=ye[Te+pe*ve];if(!isNaN(we)&&we>=ye[Te+1+pe*ve]&&we>=ye[Te+1+(pe+1)*ve]&&we>=ye[Te+(pe+1)*ve]&&we>=ye[Te-1+(pe+1)*ve]&&we>ye[Te-1+pe*ve]&&we>ye[Te-1+(pe-1)*ve]&&we>ye[Te+(pe-1)*ve]&&we>
3370ye[Te+1+(pe-1)*ve]){const Qe=ie([Te,pe]);ne.push({position:Qe,value:we})}if(!isNaN(we)&&we<=ye[Te+1+pe*ve]&&we<=ye[Te+1+(pe+1)*ve]&&we<=ye[Te+(pe+1)*ve]&&we<=ye[Te-1+(pe+1)*ve]&&we<ye[Te-1+pe*ve]&&we<ye[Te-1+(pe-1)*ve]&&we<ye[Te+(pe-1)*ve]&&we<ye[Te+1+(pe-1)*ve]){const Qe=ie([Te,pe]);Z.push({position:Qe,value:we})}}ne=ne.sort(((pe,Te)=>Te.value-pe.value)),Z=Z.sort(((pe,Te)=>pe.value-Te.value));const J=[...ne];for(let pe=0;pe<J.length;pe++){const Te=J[pe];if(Te)for(let we=pe+1;we<J.length;we++){const Qe=J[we];Qe&&U(Te.position,Qe.position)<k&&(J[we]=void 0)}}ne=J.filter((pe=>!!pe));const le=[...Z];for(let pe=0;pe<le.length;pe++){const Te=le[pe];if(Te)for(let we=pe+1;we<le.length;we++){const Qe=le[we];Qe&&U(Te.position,Qe.position)<k&&(le[we]=void 0)}}return Z=le.filter((pe=>!!pe)),new Float32Array([ne.length,...ne.map((pe=>[...pe.position,pe.value])).flat(),Z.length,...Z.map((pe=>[...pe.position,pe.value])).flat()])}l({getHighLowPointData(ce,me,de,ye,ve,ue,k,ie,ne,Z,J,le,pe,Te,we){const Qe=(function(nt,Xe,ft){return Ze($e(nt,Xe),Xe,ft)})({image:{data:ce,width:me,height:de},image2:ye?{data:ye,width:ve,height:ue}:null,imageSmoothing:k,imageInterpolation:ie,imageWeight:ne,imageType:Z,imageUnscale:J,imageMinValue:le,imageMaxValue:pe},Te,we);return x(Qe,[Qe.buffer])}})},WB.toString().replace(/^function.+?{/,"").slice(0,-1)));var WB,Wye=lye(Vye);const eI={LOW:"L",HIGH:"H"},$ye=vQ(Wye());function $B(t,e){return{type:"Feature",geometry:{type:"Point",coordinates:t},properties:e}}async function Hye(t,e,n){const{image:r,image2:i,imageSmoothing:s,imageInterpolation:o,imageWeight:a,imageType:l,imageUnscale:c,imageMinValue:u,imageMaxValue:h}=t,{data:d,width:m,height:y}=r,{data:v=null,width:b=null,height:x=null}=i||{},T=d.slice(0),E=v?v.slice(0):null;return{type:"FeatureCollection",features:(function(I){let O=0;const N=[],U=I[O++];for(let H=0;H<U;H++){const W=[I[O++],I[O++]],z=I[O++];N.push($B(W,{type:eI.HIGH,value:z}))}const F=I[O++];for(let H=0;H<F;H++){const W=[I[O++],I[O++]],z=I[O++];N.push($B(W,{type:eI.LOW,value:z}))}return N})(await $ye.getHighLowPointData(YP(T,[T.buffer]),m,y,E?YP(E,[E.buffer]):null,b,x,s,o,a,l,c,u,h,e,n))}}const HB="high-low-label";function qB(t,e,n){return t.properties.type===eI.HIGH?Math.round((t.properties.value-n)/n*100):Math.round((e-t.properties.value)/e*100)}const V1={image:{type:"object",value:null},image2:{type:"object",value:null},imageSmoothing:{type:"number",value:0},imageInterpolation:{type:"object",value:Lc.CUBIC},imageWeight:{type:"number",value:0},imageType:{type:"object",value:hs.SCALAR},imageUnscale:{type:"array",value:null},imageMinValue:{type:"object",value:null},imageMaxValue:{type:"object",value:null},bounds:{type:"array",value:[-180,-90,180,90],compare:!0},minZoom:{type:"object",value:null},maxZoom:{type:"object",value:null},radius:{type:"number",value:0},unitFormat:{type:"object",value:null},textFormatFunction:{type:"function",value:AQ},textFontFamily:{type:"object",value:VM},textSize:{type:"number",value:12},textColor:{type:"color",value:WM},textOutlineWidth:{type:"number",value:1},textOutlineColor:{type:"color",value:$M},palette:{type:"object",value:null}};let _w=class extends Ns{renderLayers(){const{viewport:e}=this.context,{props:n,visiblePoints:r,minValue:i,maxValue:s}=this.state;if(!n||!r||typeof i!="number"||typeof s!="number")return[];const{unitFormat:o,textFormatFunction:a,textFontFamily:l,textSize:c,textColor:u,textOutlineWidth:h,textOutlineColor:d}=Gn(n,V1),{paletteScale:m}=this.state;return[new ed(this.getSubLayerProps({id:"type",data:r,getPixelOffset:[0,-gB(e,1.2*c/2)],getPosition:y=>y.geometry.coordinates,getText:y=>y.properties.type,getSize:1.2*c,getColor:y=>m?vw(m(y.properties.value).rgba()):u,getAngle:Ju(e,0),outlineWidth:h,outlineColor:d,fontFamily:l,fontSettings:{sdf:!0},billboard:!1,extensions:[new Cv],collisionEnabled:!0,collisionGroup:HB,collisionTestProps:{sizeScale:5},getCollisionPriority:y=>qB(y,i,s),parameters:{cullMode:"front",depthCompare:"always",...this.props.parameters}})),new ed(this.getSubLayerProps({id:"value",data:r,getPixelOffset:[0,gB(e,1.2*c/2)],getPosition:y=>y.geometry.coordinates,getText:y=>a(y.properties.value,o),getSize:c,getColor:y=>m?vw(m(y.properties.value).rgba()):u,getAngle:Ju(e,0),outlineWidth:h,outlineColor:d,fontFamily:l,fontSettings:{sdf:!0},billboard:!1,extensions:[new Cv],collisionEnabled:!0,collisionGroup:HB,collisionTestProps:{sizeScale:5},getCollisionPriority:y=>qB(y,i,s),parameters:{cullMode:"front",depthCompare:"always",...this.props.parameters}}))]}shouldUpdateState(e){return super.shouldUpdateState(e)||e.changeFlags.viewportChanged}updateState(e){const{image:n,image2:r,imageSmoothing:i,imageInterpolation:s,imageWeight:o,imageType:a,imageUnscale:l,imageMinValue:c,imageMaxValue:u,minZoom:h,maxZoom:d,radius:m,unitFormat:y,textFormatFunction:v,textFontFamily:b,textSize:x,textColor:T,textOutlineWidth:E,textOutlineColor:C,palette:I,visible:O}=e.props;super.updateState(e),m&&O?(n===e.oldProps.image&&r===e.oldProps.image2&&i===e.oldProps.imageSmoothing&&s===e.oldProps.imageInterpolation&&o===e.oldProps.imageWeight&&a===e.oldProps.imageType&&l===e.oldProps.imageUnscale&&c===e.oldProps.imageMinValue&&u===e.oldProps.imageMaxValue&&m===e.oldProps.radius&&O===e.oldProps.visible||this._updateFeatures(),(h!==e.oldProps.minZoom||d!==e.oldProps.maxZoom||e.changeFlags.viewportChanged)&&this._updateVisibleFeatures(),I!==e.oldProps.palette&&this._updatePalette
3370(),y===e.oldProps.unitFormat&&v===e.oldProps.textFormatFunction&&b===e.oldProps.textFontFamily&&x===e.oldProps.textSize&&T===e.oldProps.textColor&&E===e.oldProps.textOutlineWidth&&C===e.oldProps.textOutlineColor||this._redrawVisibleFeatures(),this.setState({props:e.props})):this.setState({points:void 0,visiblePoints:void 0,minValue:void 0,maxValue:void 0})}async _updateFeatures(){const{image:e,image2:n,imageSmoothing:r,imageInterpolation:i,imageType:s,imageUnscale:o,imageMinValue:a,imageMaxValue:l,imageWeight:c,bounds:u,radius:h}=Gn(this.props,V1);if(!e)return;const d=jye();this.state.requestId=d;const m={image:e,image2:n,imageSmoothing:r,imageInterpolation:i,imageWeight:c,imageType:s,imageUnscale:o,imageMinValue:a,imageMaxValue:l},y=(await Hye(m,u,h)).features;if(this.state.requestId!==d)return;const v=y.map((T=>T.properties.value)),b=Math.min(...v),x=Math.max(...v);this.setState({points:y,minValue:b,maxValue:x}),this._updateVisibleFeatures()}_updateVisibleFeatures(){const{viewport:e}=this.context,{minZoom:n,maxZoom:r}=Gn(this.props,V1),{points:i}=this.state;if(!i)return;let s;s=Dm(e,n,r)?i:[],this.setState({visiblePoints:s})}_updatePalette(){const{palette:e}=Gn(this.props,V1);if(!e)return this.setState({paletteScale:void 0}),void this._redrawVisibleFeatures();const n=Cy(e);this.setState({paletteScale:n}),this._redrawVisibleFeatures()}_redrawVisibleFeatures(){this.setState({visiblePoints:Array.isArray(this.state.visiblePoints)?Array.from(this.state.visiblePoints):this.state.visiblePoints})}};_w.layerName="HighLowCompositeLayer",_w.defaultProps=V1;const qye={..._w.defaultProps};let QB=class extends Ns{renderLayers(){const{props:e}=this.state;return e?[new _w(this.props,this.getSubLayerProps({id:"composite"}))]:[]}updateState(e){const{image:n,imageUnscale:r}=e.props;if(super.updateState(e),n&&r&&!(n.data instanceof Uint8Array||n.data instanceof Uint8ClampedArray))throw new Error("imageUnscale can be applied to Uint8 data only");this.setState({props:e.props})}};QB.layerName="HighLowLayer",QB.defaultProps=qye;const eo={COLD:"COLD",WARM:"WARM",OCCLUDED:"OCCLUDED",STATIONARY:"STATIONARY"},XB={iconAtlas:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGoAAAAqCAYAAABbec77AAAFsmlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4KPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iWE1QIENvcmUgNS41LjAiPgogPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIgogICAgeG1sbnM6cGhvdG9zaG9wPSJodHRwOi8vbnMuYWRvYmUuY29tL3Bob3Rvc2hvcC8xLjAvIgogICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICAgeG1sbnM6ZXhpZj0iaHR0cDovL25zLmFkb2JlLmNvbS9leGlmLzEuMC8iCiAgICB4bWxuczp0aWZmPSJodHRwOi8vbnMuYWRvYmUuY29tL3RpZmYvMS4wLyIKICAgIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIgogICAgeG1sbnM6c3RFdnQ9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZUV2ZW50IyIKICAgeG1wOkNyZWF0ZURhdGU9IjIwMjMtMDMtMTBUMTQ6NDI6NTYrMDEwMCIKICAgeG1wOk1vZGlmeURhdGU9IjIwMjMtMDMtMjVUMDk6MDY6NTgrMDE6MDAiCiAgIHhtcDpNZXRhZGF0YURhdGU9IjIwMjMtMDMtMjVUMDk6MDY6NTgrMDE6MDAiCiAgIHBob3Rvc2hvcDpEYXRlQ3JlYXRlZD0iMjAyMy0wMy0xMFQxNDo0Mjo1NiswMTAwIgogICBwaG90b3Nob3A6Q29sb3JNb2RlPSIzIgogICBwaG90b3Nob3A6SUNDUHJvZmlsZT0ic1JHQiBJRUM2MTk2Ni0yLjEiCiAgIGV4aWY6UGl4ZWxYRGltZW5zaW9uPSIxMDYiCiAgIGV4aWY6UGl4ZWxZRGltZW5zaW9uPSI0MiIKICAgZXhpZjpDb2xvclNwYWNlPSIxIgogICB0aWZmOkltYWdlV2lkdGg9IjEwNiIKICAgdGlmZjpJbWFnZUxlbmd0aD0iNDIiCiAgIHRpZmY6UmVzb2x1dGlvblVuaXQ9IjIiCiAgIHRpZmY6WFJlc29sdXRpb249IjcyLzEiCiAgIHRpZmY6WVJlc29sdXRpb249IjcyLzEiPgogICA8ZGM6dGl0bGU+CiAgICA8cmRmOkFsdD4KICAgICA8cmRmOmxpIHhtbDpsYW5nPSJ4LWRlZmF1bHQiPmZyb250PC9yZGY6bGk+CiAgICA8L3JkZjpBbHQ+CiAgIDwvZGM6dGl0bGU+CiAgIDx4bXBNTTpIaXN0b3J5PgogICAgPHJkZjpTZXE+CiAgICAgPHJkZjpsaQogICAgICBzdEV2dDphY3Rpb249InByb2R1Y2VkIgogICAgICBzdEV2dDpzb2Z0d2FyZUFnZW50PSJBZmZpbml0eSBEZXNpZ25lciAyIDIuMC40IgogICAgICBzdEV2dDp3aGVuPSIyMDIzLTAzLTI1VDA5OjA2OjU4KzAxOjAwIi8+CiAgICA8L3JkZjpTZXE+CiAgIDwveG1wTU06SGlzdG9yeT4KICA8L3JkZjpEZXNjcmlwdGlvbj4KIDwvcmRmOlJERj4KPC94OnhtcG1ldGE+Cjw/eHBhY2tldCBlbmQ9InIiPz6ldAqQAAABgWlDQ1BzUkdCIElFQzYxOTY2LTIuMQAAKJF1kd8rg1EYxz/baGKiuKBcLOFqNNTiRtnSKGnNlOFme/dL7cfb+25puVVuV5S48euCv4Bb5VopIiW3XBM3rNfzbmqSPafnPJ/zPed5Ouc5YA2llYze4IZMNq8F/V7nYnjJaX/GRjd2BrFEFF2dDARmqWsfd1jMeDNo1qp/7l9ricV1BSxNwhOKquWFp4Vn1/KqydvCnUoqEhM+FXZpckHhW1OPVvnF5GSVv0zWQkEfWNuFnclfHP3FSkrLCMvL6cukC8rPfcyXOOLZhXmJveI96ATx48XJDFP48DDMuMwe6c4IQ7KiTr67kj9HTnIVmVWKaKySJEUel6gFqR6XmBA9LiNN0ez/377qidGRanWHFxqfDOOtH+xbUC4ZxuehYZSPwPYIF9lafu4Axt5FL9W0vn1o24Czy5oW3YHzTeh6UCNapCLZxK2JBLyeQGsYOq6hebnas599ju8htC5fdQW7ezAg59tWvgEshmfLrsJJUgAAAAlwSFlzAAALEwAACxMBAJqcGAAAAohJREFUeJztmj1uE1EURo8J0BBMmSgV7IE0oUzDCtJQ44JsgcRmEQksAJZARBqoUrGCVNPhGpzGwlIo/J4x9hv7vv/n8D7pSJYlz3xX1x4djQdqamo2M68UNQXnGfBT8TRvlZq2bAFXwK3iSr1XU1gG/F2Spp+zUM1yXgATlhc1AQ4y9qqZyxOgYXlJmgboZmtXM8sn2pek+ZitXQ0w1fB1S9JUZc8UreLSRVVlz5BFFZdSlX1N7gc+3gluNncAvAXeha0TJF3gJbAP7C0A8GOB78AX4FfypsK0qbiUkpR9F+gBF8AY+1nG6rM9daxisk7FpeRW9h3gHL8vnOkLeK
3370aOnT0SFZeSQ9m3md4tuXHoK2UEnKpzZYmNiktJqeyHwDDCDG0M1TmTxlbFpaRQ9g5wTNjLnJSJOneSuKq4lJjK/gD4ELG7lPeqS9QMEgzSj9D7IXCZoLuUSyIuy1fFpYRW9g5l/JJMv6zgCaXiUhrCKftxwt62vAk04ywhVVxKCGU/JI84SJkQ0AZjqLgUH2XfJq2CuzIEHnnMCcRTcSk+yn6asbctJ44zAvFVXIqLsu8Q945DaEZ43G4aFDCApm/Z/byAzracWc4IpFNxKTbKvltYdym/sbzrnlrFpTTIlL1XQFdXXgvmmyWHikuRKPtFAT1d+SyYD8ir4lJWKXsXtz/9SmEMPF4xH5BfxaWsUvajAvr5cqSHuWcYcIvpZWUTHo7sMr08m5R9P3GXGHmuX5gW5fqASq7oB2MWs2d4b9PSOkNpKi7FpOzfCujly1fTkkpVcSkN/16urwvo5Mu1aVElq7iUeWUfFdDHlxs9TGdusFvuRvRMd2oek0zUFJi6qJqamv8wfwB+DW9fiCc45gAAAABJRU5ErkJggg==",iconMapping:{COLD:{x:2,y:2,width:50,height:38,anchorY:35,mask:!0},WARM:{x:54,y:2,width:50,height:38,anchorY:35,mask:!0}}};function Qye(t,e){for(let n=t.length-1;n>=0;n--)if(e.call(t,t[n],n,t))return n;return-1}const C_={data:{type:"array",value:[]},minZoom:{type:"object",value:null},maxZoom:{type:"object",value:null},getType:{type:"function",value:null},getPath:{type:"function",value:null},width:{type:"number",value:2},coldColor:{type:"color",value:[0,0,255]},warmColor:{type:"color",value:[255,0,0]},occludedColor:{type:"color",value:[148,0,211]},iconSize:{type:"number",value:15},_debug:{type:"boolean",value:!1}};let ww=class extends Ns{renderLayers(){const{viewport:e}=this.context,{props:n,visibleFrontLines:r,visibleDebugFrontPoints:i}=this.state;if(!n||!r||!i)return[];const{getType:s,getPath:o,width:a,coldColor:l,warmColor:c,occludedColor:u,iconSize:h,_debug:d}=Gn(n,C_);if(!s||!o)return[];const{iconStyle:m,iconAtlasTexture:y}=this.state;if(!m||!y)return[];const v={[eo.COLD]:l,[eo.WARM]:c,[eo.OCCLUDED]:u,[eo.STATIONARY]:l};return[new Sv(this.getSubLayerProps({id:"path",data:r,getPath:b=>[b.startPosition,...b.icons.map((x=>x.position)),b.endPosition],getColor:b=>v[s(b.d)],getWidth:a,widthUnits:"pixels"})),new Sv(this.getSubLayerProps({id:"path-stationary-warm",data:r.filter((b=>s(b.d)===eo.STATIONARY)),getPath:b=>[b.startPosition,...b.icons.map((x=>x.position)),b.endPosition],getColor:c,getWidth:a,widthUnits:"pixels",extensions:[new td({dash:!0,highPrecisionDash:!0})],getDashArray:[45,45]})),new Nm(this.getSubLayerProps({id:"icon",data:r.flatMap((b=>b.icons)),getPosition:b=>b.position,getIcon:b=>s(b.d)===eo.OCCLUDED||s(b.d)===eo.STATIONARY?b.alternate?eo.COLD:eo.WARM:s(b.d),getSize:h,getColor:b=>s(b.d)===eo.STATIONARY?b.alternate?v[eo.COLD]:v[eo.WARM]:v[s(b.d)],getAngle:b=>s(b.d)===eo.STATIONARY?b.alternate?Ju(e,b.direction):Ju(e,b.direction+180):Ju(e,b.direction),iconAtlas:y,iconMapping:m.iconMapping,billboard:!1,extensions:[new Cv],collisionEnabled:!0,collisionGroup:"front-icon",collisionTestProps:{sizeScale:5},getCollisionPriority:b=>b.priority})),...d?[new ed(this.getSubLayerProps({id:"text",data:i,getPosition:b=>b.position,getText:b=>`${b.index}`,getSize:12,getColor:WM,getAngle:Ju(e,0),outlineWidth:1,outlineColor:$M,fontFamily:VM,fontSettings:{sdf:!0},billboard:!1}))]:[]]}shouldUpdateState(e){return super.shouldUpdateState(e)||e.changeFlags.viewportChanged}updateState(e){const{data:n,getType:r,getPath:i,minZoom:s,maxZoom:o}=e.props;super.updateState(e),n&&r&&i?(this.state.iconStyle||this._updateIconStyle(),n===e.oldProps.data&&i===e.oldProps.getPath||this._updateFeatures(),(s!==e.oldProps.minZoom||o!==e.oldProps.maxZoom||e.changeFlags.viewportChanged)&&this._updateVisibleFeatures(),this.setState({props:e.props})):this.setState({features:void 0,debugFeatures:void 0,visibleFeatures:void 0,visibleDebugFeatures:void 0})}async _updateIconStyle(){const{device:e}=this.context;this.setState({iconStyle:XB});const n=af(e,await rA(XB.iconAtlas));this.setState({iconAtlasTexture:n})}_updateFeatures(){const{data:e,getPath:n}=Gn(this.props,C_);if(!n)return;const r=e.map((s=>(function(o,a){const l=a,c=l.slice(0,-1).map(((d,m)=>ma(l[m],l[m+1]))).reduce(((d,m)=>[...d,d[d.length-1]+m]),[0]);let u=[];for(let d=1,m=c[c.length-1]/3;m>5e3;d++,m/=3){const y=3**d;for(let v=1;v<y;v++){if(d>1&&v%3==0)continue;const b=v*m,x=Qye(c,(H=>H<=b));if(x===-1||x===l.length-1)throw new Error("Invalid state");const T=x+1,E=l[x],C=l[T],I=c[x],O=Xve(E,C),N=Mye(E,b-I,O),U=90-O,F=100-d;u.push({distance:b,position:N,direction:U,priority:F})}}u=u.sort(((d,m)=>d.distance-m.distance));const h=u.map(((d,m)=>({d:o,...d,alternate:m%2==0})));return{d:o,startPosition:a[0],endPosition:a[a.length-1],icons:h}})(s,n(s)))),i=e.flatMap((s=>n(s).map(((o,a)=>({d:s,position:o,index:a})))));this.setState({frontLines:r,debugFrontPoints:i}),this._updateVisibleFeatures()}_updateVisibleFeatures(){const{viewport:e}=this.context,{minZoom:n,maxZoom:r}=Gn(this.props,C_),{frontLines:i,debugFrontPoints:s}=this.state;if(!i||!s)return;let o,a;Dm(e,n,r)?(o=i,a=s):(o=[],a=[]),this.setState({visibleFrontLines:o,visibleDebugFrontPoints:a})}};ww.layerName="FrontCompositeLayer",ww.defaultProps=C_;const Xye={...ww.defaultProps};let YB=class extends Ns{renderLayers(){return[new ww(this.props,this.get
3370SubLayerProps({id:"composite"}))]}};YB.layerName="FrontLayer",YB.defaultProps=Xye;const Yye=new Map,Kye=new Map;function Gye(t,e=0){let n;if(Ca(t))n=(function(r,i,s){s=Math.min(Math.max(s-2,0),7);const a=Yye.get(s)??(()=>{const{uv:u}=hye(s,!0),h=[];for(let d=0;d<u.length;d+=2){const m=u[d],y=u[d+1];if(m===0||y<=0||y>=1)continue;const v=360*m-180,b=180*y-90;h.push([v,b])}return h.push([0,-90]),h.push([0,90]),h})(),l=Kye.get(s)??(()=>{const u=new jM(a.length,void 0,Float32Array);for(let h=0;h<a.length;h++){const d=a[h];u.add(d[0],d[1])}return u.finish(),u})();return mye(l,r[0],r[1],void 0,i/1e3).map((u=>a[u]))})(HM(t),RQ(t),Math.floor(lv(t)+e+1));else{if(!MQ(t))throw new Error("Invalid state");n=(function(r,i){const s=new fye({size:1,antimeridian:!0}),o=[...s.px([r[0],r[1]],i),...s.px([r[2],r[3]],i)];[o[1],o[3]]=[o[3],o[1]];const a=2**i,l=o[2]-o[0]+1,c=o[3]-o[1]+1,u=[];for(let h=0;h<c;h++)for(let d=0;d<l;d++){const m=o[0]+d,y=[m,o[1]+h+(m%2==1?.5:0)];if(y[0]===0||y[1]<=0||y[1]>=a)continue;const v=s.ll([y[0],y[1]],i);v[0]=GP(v[0]),u.push(v)}return u})(kQ(t),Math.floor(lv(t)+e))}return n}const xw={VALUE:"VALUE",ARROW:"ARROW",WIND_BARB:"WIND_BARB"},KB=new Map([[xw.ARROW,{iconAtlas:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAFtGlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4KPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iWE1QIENvcmUgNS41LjAiPgogPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICAgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIgogICAgeG1sbnM6cGhvdG9zaG9wPSJodHRwOi8vbnMuYWRvYmUuY29tL3Bob3Rvc2hvcC8xLjAvIgogICAgeG1sbnM6ZXhpZj0iaHR0cDovL25zLmFkb2JlLmNvbS9leGlmLzEuMC8iCiAgICB4bWxuczp0aWZmPSJodHRwOi8vbnMuYWRvYmUuY29tL3RpZmYvMS4wLyIKICAgIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIgogICAgeG1sbnM6c3RFdnQ9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZUV2ZW50IyIKICAgeG1wOkNyZWF0ZURhdGU9IjIwMjMtMDMtMTBUMTQ6NDE6MjYrMDEwMCIKICAgeG1wOk1vZGlmeURhdGU9IjIwMjQtMDItMTFUMjM6Mzc6NTErMDE6MDAiCiAgIHhtcDpNZXRhZGF0YURhdGU9IjIwMjQtMDItMTFUMjM6Mzc6NTErMDE6MDAiCiAgIHBob3Rvc2hvcDpEYXRlQ3JlYXRlZD0iMjAyMy0wMy0xMFQxNDo0MToyNiswMTAwIgogICBwaG90b3Nob3A6Q29sb3JNb2RlPSIzIgogICBwaG90b3Nob3A6SUNDUHJvZmlsZT0ic1JHQiBJRUM2MTk2Ni0yLjEiCiAgIGV4aWY6UGl4ZWxYRGltZW5zaW9uPSIxMDAiCiAgIGV4aWY6UGl4ZWxZRGltZW5zaW9uPSIxMDAiCiAgIGV4aWY6Q29sb3JTcGFjZT0iMSIKICAgdGlmZjpJbWFnZVdpZHRoPSIxMDAiCiAgIHRpZmY6SW1hZ2VMZW5ndGg9IjEwMCIKICAgdGlmZjpSZXNvbHV0aW9uVW5pdD0iMiIKICAgdGlmZjpYUmVzb2x1dGlvbj0iNzIvMSIKICAgdGlmZjpZUmVzb2x1dGlvbj0iNzIvMSI+CiAgIDxkYzp0aXRsZT4KICAgIDxyZGY6QWx0PgogICAgIDxyZGY6bGkgeG1sOmxhbmc9IngtZGVmYXVsdCI+YXJyb3c8L3JkZjpsaT4KICAgIDwvcmRmOkFsdD4KICAgPC9kYzp0aXRsZT4KICAgPHhtcE1NOkhpc3Rvcnk+CiAgICA8cmRmOlNlcT4KICAgICA8cmRmOmxpCiAgICAgIHN0RXZ0OmFjdGlvbj0icHJvZHVjZWQiCiAgICAgIHN0RXZ0OnNvZnR3YXJlQWdlbnQ9IkFmZmluaXR5IERlc2lnbmVyIDIgMi4zLjEiCiAgICAgIHN0RXZ0OndoZW49IjIwMjQtMDItMTFUMjM6Mzc6NTErMDE6MDAiLz4KICAgIDwvcmRmOlNlcT4KICAgPC94bXBNTTpIaXN0b3J5PgogIDwvcmRmOkRlc2NyaXB0aW9uPgogPC9yZGY6UkRGPgo8L3g6eG1wbWV0YT4KPD94cGFja2V0IGVuZD0iciI/PkD+OBEAAAGAaUNDUHNSR0IgSUVDNjE5NjYtMi4xAAAokXWRz0tCQRDHP1phpGFQRIcOEtbJwgykLkFGWCAhZpDVRZ+/ArXHe0ZE16BrUBB16deh/oK6Bp2DoCiC6Oy5qEvFa54KSuQss/PZ7+4Mu7NgjeaUvN7shXyhqEWCAddCbNFlK2HFTjduLHFFVyfC4RAN7fMRixnvB81ajc/9a/ZkSlfA0io8rqhaUXhaOLReVE3eE+5SsvGk8IWwR5MLCj+YeqLCJZMzFf42WYtGJsHaIezK1HGijpWslheWl+PO59aU6n3MlzhShfk5iX3ivehECBLAxQxTTOJnmDGZ/QziY0hWNMj3lvNnWZVcRWaVDTRWyJCliEfUNamekpgWPSUjx4bZ/7991dMjvkp1RwBaXg3jvR9su/CzYxhfJ4bxcwpNL3BdqOWvHsPoh+g7Nc19BM4tuLypaYl9uNqGnmc1rsXLUpO4NZ2Gt3Noj0HnHbQtVXpW3efsCaKb8lW3cHAIA3LeufwLGtZnw2AleGQAAAAJcEhZcwAACxMAAAsTAQCanBgAAAOKSURBVHic7Zy9j01BGIcfSyHZRKmyye21iOpq9CJ6NfEPqMU/oKZeEVHZFQUqraBHoyBUhFwF9yjO3rh7nTtnZs58vO+575NMssXOmY8nM3ve/e1dMAxjfMyApqfNqs1uAFu1J2A
3370cxoQIw4QIw4QIw4QIw4QIw4QIw4QIw4QIw4QIw4QIw4QIw4QIw4QIw4QIw4QIw4QIw4QIw4QIw4QIw4QIw4QIw4QIw4QIw4QIw4QIw4QIw4QIo4aQYxXGjKX4XGsIuQBMK4wbyhQ4U3sSJdgGvjJMSu6PI0yBd8DRAc9QxT7wg3gpOYVMD+Z2J7K/Sq7RblqslFxCFjIa4HxEf7Wc4t/GxUjJIWRZxgfgSGB/9bwmXkpqIcsyGuB2QN/RcIvDGxgiJaWQVRkNcNqz76g4y/+b6CsllZAuGW9DFjEmtoBPxElJIaRLRgPcDF/KeLhL92b2SRkqZJ2MBpjELmYMXGL9hrqkDBHikvFy6IK0sw38IlxKrBCXjAa4kWZZutnHvbFdUmKE9Mn4DZxMujKlLKr2ECmhQvpkNMDTHIvTyA79m7sqJUSIj4wGuJpvifpYrtp9pPgK8ZUxA05kX6UiVqv2Pilzj++b4yejAR7mX6Iuuqr2ku1y/iXqYl3VXqJ9A47nX6IfUv7IYU77+luDR7S1kAikCAF4XGnc3Urjiqevas/RPiMsN5d0Qn4CzwuP+QD4U3hMJ5KEQPlr637h8dThW7WnaCJzc2kn5CPwptBYu7RiRCFNCJS7tuy68qRE1S42N5d4Ql7Rvo7mxE5HIPfIe0ImxVYyElxZ+9C28bl5DDmrdsvNI+nL2mOa+Nxc4g/1BXsZnvkM+JLhuRtBjqrdcvOB+GbtPk1Fbi75yoK0Vfse8D3h8zaSlFW75eYJSJW1i8rNXUi/slJl7aJyc+2kqNovFp/1iBlatYvLzV1Iv7JgeNYuLjd3oUEIDKva7VftGYit2kXm5i60nJDYrF1kbu5CixCIq9rtuspIaNUuNjcfC6FV+0Z/3rwUIVn7pM4UNwvfqt1y80L4Vu2WmxfkCW4Z4nNzF5peexf0vf5abl6YvqrdcvMKrMvaVeTmLjReWbD+2rLcvBLn6D4hlptXoqtqV5Obu9B6ZXVl7ZabV2a1arfcvDLLVbuq3NyF1isL2qz9xcHXqnLzMXOd9oRs1P9pl8wO8B5lufnYuVJ7AoZhlOIvaGdhp4AP+qMAAAAASUVORK5CYII=",iconMapping:{0:{x:0,y:0,width:100,height:100,mask:!0}}}],[xw.WIND_BARB,{iconAtlas:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA/wAAAKoCAYAAADKyfSuAAAAAXNSR0IArs4c6QAAIABJREFUeF7s3W2sdWd6F/YLIQFf+AJODBRm8kJCMnqMWrVU7pBUVK0UUFCKpwEncezMJBM0ICVNbImED9gZI94i222TL5EIk0SPnSaozbhAFCK1KmoG1yqtWmGJooJLMkxD/NiIL3wAJKRqxcea4+P9stbe17XWuu/7tyUryfPsfa37/l3/rGdf5z5nn98QHgQIECBAgAABAgQIECBAgEB3Ar+hux3ZEAECBAgQIECAAAECBAgQIBAGfiEgQIAAAQIECBAgQIAAAQIdChj4O2yqLREgQIAAAQIECBAgQIAAAQO/DBAgQIAAAQIECBAgQIAAgQ4FDPwdNtWWCBAgQIAAAQIECBAgQICAgV8GCBAgQIAAAQIECBAgQIBAhwIG/g6baksECBAgQIAAAQIECBAgQMDALwMECBAgQIAAAQIECBAgQKBDAQN/h021JQIECBAgQIAAAQIECBAgYOCXAQIECBAgQIAAAQIECBAg0KGAgb/DptoSAQIECBAgQIAAAQIECBAw8MsAAQIECBAgQIAAAQIECBDoUMDA32FTbYkAAQIECBAgQIAAAQIECBj4ZYAAAQIECHxR4CMR8Q+AENi5gJzuvEGW9+sCcioILQh0n1MDfwsxtEYCBAgQWEPgkxHxfRFxb42LuQaBCwXk9EI4L1tVQE5X5XaxCwWGyKmB/8J0eBkBAgQIdCMwDfjfHxHfebOjH46IH+hmdzbSi4Cc9tLJvvchp333t5fdDZVTA38vsbUPAgQIELhE4Ltvhv2vvfPiT0TET15S0GsIFAjIaQGqkukCcppOqmCBwHA5NfAXpEhJAgQIENi9wPTV/acjYhrsDz1+LSL+eER8bvc7scCeBeS05+72szc57aeXPe9k2Jwa+HuOtb0RIECAwCGBP3lzqv81J3j+ekQ8jo/AhgJyuiG+S88WkNPZVJ64ocDQOTXwb5g8lyZAgACBVQV+X0T8YER8/MRV/21E/ImI+LlVV+ZiBL4oIKfS0IKAnLbQJWuU04gw8Pt/BAIECBAYQeBTN6f6X31is69ExLePgGGPuxWQ0922xsJuCcipOLQgIKc3XTLwtxBXayRAgACBSwW+IiKei4inThT4Vzen+n/z0ot4HYErBeT0SkAvX0VATldhdpErBeT0DqCB/8pEeTkBAgQI7FZg+ur+9MF8X3VihT915lv8d7s5C+tGQE67aWXXG5HTrtvbzebk9EArDfzd5NtGCBAgQOBG4HdHxF+MiCdPiPzLm1P9X6BGYCMBOd0I3mUXCcjpIi5P3khATk/AG/g3SqXLEiBAgECJwHfdfDDf7z1R/ccjYvo9vB4EthKQ063kXXeJgJwu0fLcrQTk9Iy8gX+raLouAQIECGQKPBwRL0bEEyeK/oubv3eqnymv1hIBOV2i5blbCcjpVvKuu0RATmdqGfhnQnkaAQIECOxWYPpAvumD+aYP6jn2+LGI+FO73YGFjSAgpyN0uf09Zub00zf35vZV7GBvAnK6oCMG/gVYnkqAAAECuxL4bRHxI2dO9d+OiO+ICKf6u2rdUIuR06Ha3exmM3P60ZvvuHr05rNUXm5WxcL3JiCnF3TEwH8BmpcQIECAwOYC3xoRfyEivvzESn40Ir5385VawMgCcjpy99vZe2ZOp1P9Z29t/UFE3IuI6YuvHgSuEZDTC/UM/BfCeRkBAgQIbCLwW29O9T9+4uq/GhGfdKq/SX9c9F0BOZWEFgQyc3r7VP/u3qcT/lO/NaUFK2vcTkBOr7Q38F8J6OUECBAgsJrAN0fECxHx4RNXdKq/Wjtc6IiAnIpGCwKZOb17qn9o/9PPXN9vAcYadyUgpwntMPAnICpBgAABAqUCv+XmVP/Ur9L7fER8yql+aR8UPy0gpxLSgkBmTk+d6r9n8XpEPBMRr7WAY427EZDTxFYY+BMxlSJAgACBdIFviojp1P5DJyo71U9nV3ChgJwuBPP0TQQyczrnVP95n9K/SZ9bv6icJnfQwJ8MqhwBAgQIpAj8xptT/T99otqbEfE9TvVTvBW5TEBOL3PzqnUFMnPqVH/d3o10NTkt6raBvwhWWQIECBC4WOCP3Jzqf+WJCk71L+b1wiQBOU2CVKZUIDOnTvVLWzV0cTktbL+BvxBXaQIECBC4SOCHTnwb6D+++VV7v3BRZS8ikCcgp3mWKtUJZOTUqX5df1R+V0BOC5Ng4C/EVZrADgUO3VCnr9hPf+5BYC8Cx
3370/7hd6q/lw5Zx6k3qHNzOt17n0NJoFjg2vupU/3iBil/cuBfcj999ozlsJ8pYeD3/2UExhIw8I/V71Z3K6etdm6sdV+a09unpdPvJp9+R7kHgSqBjJweW5tP4K/q2nh15bSw5wb+QlylCexQ4NIb6g63YkkdC8hpx83taGuX5PTuaemDiLgXEW935GIr+xLIyOmhHQ17Wrqv9nazGjktbKWBvxBXaQI7FLjkhrrDbVhS5wJy2nmDO9nekpye+hno6YR/Oun3IFAhkJXT99bmVL+iS2rKaWEGDPyFuEoT2KHAkhvqDpdvSYMIyOkgjW58m3NzOudnoJ+KiPuNe1j+PgUyc+pUf5897mFVclrYRQN/Ia7SBHYoMPeGusOlW9JAAnI6ULMb3uq5nPpk84ab29HS5bSjZna8FTktbK6BvxBXaQI7FDh3Q93hki1pQAE5HbDpDW75VE7nnOo7LW2w6Q0uWU4bbNqAS5bTwqYb+AtxlSawQwGD1A6bYkkfEJBToWhB4FBOPxMRH4mIR09swM9At9DdftYop/30suedyGlhdw38hbhKE9ihgEFqh02xJAO/DDQpcOh+em4jTvXPCfn7bAE5zRZVr0JATitUb2oa+AtxlSawQwED/w6bYkkGfhloUmDJG1Sn+k22uItFy2kXbex+E3Ja2GIDfyGu0gR2KGDg32FTLMnALwNNCsx9g+pUv8n2drNoOe2mlV1vRE4L22vgL8RVmsAOBQz8O2yKJRn4ZaBJgXNvUJ3qN9nW7hYtp921tMsNyWlhWw38hbhKE9ihwLUD/0MR8c4O92VJfQlcm9O+NOxmrwKn3qA61d9r18Zbl5yO1/MWd3xtTr0/PdF1A3+L/y9hzQQuF7hmkHoyIl6IiHsR8fblS/BKAmcFrsnp2eKeQCBJ4FBOvxARj0fEa0nXUIbAtQJyeq2g168hcE1OvT890yED/xoRdg0C+xG4ZJB6OCJejIgnbrbxckRMN1cPAlUCl+S0ai3qEjgmIKey0YKAnLbQJWu8JKfen87MjYF/JpSnEehEYOkNdRrsX4qI6Vulbj+mP58Gfw8CFQJLc1qxBjUJnBOQ03NC/n4PAnK6hy5YwzmBpTn1/vSc6K2/N/AvwPJUAh0IzL2h3v2q6d2tT9/SP31r/4MOTGxhfwJzc7q/lVvRSAJyOlK3292rnLbbu5FWPjen3p9ekAoD/wVoXkKgYYE5N9RjXzW9ve1XIuKZiHirYQtL36/AnJzud/VWNoqAnI7S6bb3Kadt92+U1c/JqfenF6bBwH8hnJcRaFTg1A313FdNpy1Pn9D/dETcb3T/lt2GwJx/+NvYiVX2LCCnPXe3n73JaT+97Hkn3p8WdtfAX4irNIEdChy7ob555Gf1nervsIkDLMkb1AGa3MEW5bSDJg6wBTkdoMkdbNH708ImGvgLcZUmsEOBQzfUNyLikRNrdaq/w0Z2viRvUDtvcCfbk9NOGtn5NuS08wZ3sj3vTwsbaeAvxFWawA4FDt1QTy3Tz+rvsIkDLMkb1AGa3MEW5bSDJg6wBTkdoMkdbNH708ImGvgLcZUmsEOBuTdUp/o7bN5AS/IGdaBmN7xVOW24eQMtXU4HanbDW/X+tLB5Bv5CXKUJ7FBgzg3Vqf4OGzfYkrxBHazhjW5XThtt3GDLltPBGt7odr0/LWycgb8QV2kCOxQ4dUN1qr/Dhg26JG9QB218Y9uW08YaNuhy5XTQxje2be9PCxtm4C/EVZrADgWO3VCd6u+wWQMvyRvUgZvf0NbltKFmDbxUOR24+Q1t3fvTwmYZ+AtxlSawQ4FDN9RXI+KxHa7VksYV8AZ13N63tHM5balb465VTsftfUs79/60sFsG/kJcpQnsUMA//DtsiiV9QEBOhaIFATltoUvWKKcy0IKAnBZ2ycBfiKs0gR0KuKHusCmWZOCXgSYF3E+bbNtwi5bT4Vre5IbltLBtBv5CXKUJ7FDADXWHTbEkA78MNCngftpk24ZbtJwO1/ImNyynhW0z8BfiKk1ghwJuqDtsiiUZ+GWgSQH30ybbNtyi5XS4lje5YTktbJuBvxBXaQI7FHBD3WFTLMnALwNNCrifNtm24RYtp8O1vMkNy2lh2wz8hbhKE9ihgBvqDptiSQZ+GWhSwP20ybYNt2g5Ha7lTW5YTgvbZuAvxFWawA4F3FB32BRLMvDLQJMC7qdNtm24RcvpcC1vcsNyWtg2A38hrtIEdijghrrDpliSgV8GmhRwP22ybcMtWk6Ha3mTG5bTwrYZ+AtxlSawQwE31B02xZIM/DLQpID7aZNtG27Rcjpcy5vcsJwWts3AX4irNIEdCrih7rAplmTgl4EmBdxPm2zbcIuW0+Fa3uSG5bSwbQb+QlylCexQwA11h02xJAO/DDQp4H7aZNuGW7ScDtfyJjcsp4VtM/AX4ipNYIcCbqg7bIolGfhloEkB99Mm2zbcouV0uJY3uWE5LWybgb8QV2kCOxRwQ91hUyzJwC8DTQq4nzbZtuEWLafDtbzJDctpYdsM/IW4ShPYoYAb6g6bYkkGfhloUsD9tMm2DbdoOR2u5U1uWE4L22bgL8RVmsAOBdxQd9gUSzLwy0CTAu6nTbZtuEXL6XAtb3LDclrYNgN/Ia7SBHYo4Ia6w6ZYkoFfBpoUcD9tsm3DLVpOh2t5kxuW08K2GfgLcZUmsEMBN9QdNsWSDPwy0KSA+2mTbRtu0XI6XMub3LCcFrbNwF+IqzSBHQq4oe6wKZZk4JeBJgXcT5ts23CLltPhWt7khuW0sG0G/kJcpQnsUMANdYdNsSQDvww0KeB+2mTbhlu0nA7X8iY3LKeFbTPwF+IqTWCHAm6oO2yKJRn4ZaBJAffTJts23KLldLiWN7lhOS1sm4G/EFdpAjsUcEPdYVMsycAvA00KuJ822bbhFi2nw7W8yQ3LaWHbDPyFuEoT2KGAG+oOm2JJBn4ZaFLA/bTJtg23aDkdruVNblhOC9tm4C/EVZrADgXcUHfYFEsy8MtAkwLup022bbhFy+lwLW9yw3Ja2DYDfyGu0gR2KOCGusOmWJKBXwaaFHA/bbJtwy1aTodreZMbltPCthn4C3GVJrBDATfUHTbFkgz8MtCkgPtpk20bbtFyOlzLm9ywnBa2zcBfiKs0gR0KuKHusCmWZOCXgSYF3E+bbNtwi5bT4Vre5IbltLBtBv5CXKUJ7FDADXWHTbEkA78MNCngftpk24ZbtJwO1/ImNyynhW0z8BfiKk1ghwJuqDtsiiUZ+GWgSQH30ybbNtyi5XS4lje5YTktbJuBvxBXaQI7FHBD3WFTLMnALwNNCrifNtm24RYtp8O1vMkNy2lh2wz8hbhKE9ihgBvqDptiSQZ+GWhSwP20ybYNt2g5Ha7lTW5YTgvbZuAvxFWawA4F3FB32BRLMvDLQJMC7qdNtm24RcvpcC1vcsNyWtg2A38hrtIEdijghrrDpliSgV8GmhRwP22ybcMtWk6Ha3mTG5bTwrYZ+AtxlSawQwE31B02xZIM/DLQpID7aZNtG27Rcjpcy5vcsJwWts3AX4irNIEdCrih7rAplmTgl4EmBdxPm2zbcIuW0+Fa3uSG5bSwbQb+QlylCexQwA11h02xJAO/DDQp4H7aZNuGW7ScDtfyJjcsp4VtM/AX4ipNYIcCbqg7bIolGfhloEkB99Mm2zbcouV0uJY3uWE5LWybgb8QV2kCOxRwQ91hUyzJwC8DTQq4nzbZtuEWLafDtbzJDctpYdsM/IW4ShPYoYAb6g6bYkkGfhloUsD9tMm2DbdoOR2u5U1uWE4L22bgL8RVmsAOBdxQd9gUSzLwy0CTAu6nTbZtuEXL6XAtb3LDclrYNgN/Ia7SBHYo4Ia6w6ZYkoFfBpoUcD9tsm3DLVpOh2t5kxuW08K2GfgLcZUmsEMBN9QdNsWSDPwy0KSA+2mTbRtu0XI6XMub3LCcFrbNwF+IqzSBHQq4oe6wKZZk4JeBJgXcT5ts23CLltPhWt7khuW0sG0G/kJcpQnsUMANdYdNsSQDvww0KeB+2mTbhlu0nA7X8iY3LKeFbTPwF+IqTWCHAm6oO2yKJRn4ZaBJAffTJts23KLldLiWN7lhOS1sm4G/EFdpAjsUcEPdYVMsycAvA00KuJ822bbhFi2nw7W8yQ3LaWHbDPyFuEoT2KGAG+oOm2JJBn4ZaFLA/bTJtg23aDkdruVNblhOC9tm4M/B/e0R8Xsi4kMR8eU3Jf9JRHw+Iv5pRPzznMuoQuBqATfUqwkVWEFATldAdomrBeT0akIFVhCQ0xWQXeJqATm9mvB4AQP/ZbiPRMS3RcR/GhEfjogvPVPmQUT8SkT8TxHx0xHxxmWX9SoCVwu4oV5NqMAKAnK6ArJLXC0gp1cTKrCCgJyugOwSVwvI6dWEBv4swm+8GfSnYf+axzT0T//9/DVFvJbABQJuqBegecnqAnK6OrkLXiAgpxegecnqAnK6OrkLXiAgpxegzX2JE/55Ut8REZ+MiK+b9/TZz/pcRPx4RPzU7Fd4IoHrBNxQr/Pz6nUE5HQdZ1e5TkBOr/Pz6nUE5HQdZ1e5TkBOr/M7+WoD/3ncv3oz7J9/5uXPmIb+77785V5JYLaAG+psKk/cUEBON8R36dkCcjqbyhM3FJDTDfFderaAnM6mWv5EA/9xs6+KiL8REV9zhvVfR8T/d/Pfr978z+kl/05E/K6b/zn977/5TJ1/GBHfFBH/aHkbvYLAbAE31NlUnrihgJxuiO/SswXkdDaVJ24oIKcb4rv0bAE5nU21/IkG/sNmn4iIz5zh/LsR8bM3/00fynfqMX2o3+M3//3BM8/9zoj4ieWt9AoCswTcUGcxedLGAnK6cQNcfpaAnM5i8qSNBeR04wa4/CwBOZ3FdNmTDPwfdPtjEfHZE5w/GRE/ExG/eBl5fENEfEtEfPzE6x+LiFcvrO9lBE4JuKHKRwsCctpCl6xRTmWgBQE5baFL1iinhRkw8L8f93dEx
3370D874f0DEfHDSf34MxHxV07U+p0R8WtJ11KGwHsCbqiy0IKAnLbQJWuUUxloQUBOW+iSNcppYQYM/O/H/Z8j4g8d8X4yIl5O7sW3R8T9IzX/TkT8J8nXU46AG6oMtCAgpy10yRrlVAZaEJDTFrpkjXJamAED/xdxn4+IP3fE+ssi4leK+vDhiPjlI7X/fEQ8W3RdZccUcEMds++t7VpOW+vYmOuV0zH73tqu5bS1jo25Xjkt7LuB/13cJ06c3n9JRLxT2IOp9EMR8faRa0zfBfBK8fWVH0fADXWcXre8UzltuXvjrF1Ox+l1yzuV05a7N87a5bSw1wb+d3F/KSK+7oDz9GfTp/Gv8Zg+vf9zBy40/dnXr7EA1xhCwA11iDY3v0k5bb6FQ2xATodoc/OblNPmWzjEBuS0sM0G/ohvjIi/dcD4u2b8ar7s1ky/ku+vHSj6RyPi57Mvpt6QAm6oQ7a9uU3LaXMtG3LBcjpk25vbtJw217IhFyynhW038L/77fLfdsd4+tV7nyh0P1X6Jw78yr6fvvmxg42W5LIdCbihdtTMjrcipx03t6OtyWlHzex4K3LacXM72pqcFjZz9IH/kYj4+wd8/3BE/GKh+6nS3xARf/vAE35/RLyx0Zpcth8BN9R+etnzTuS05+72szc57aeXPe9ETnvubj97k9PCXo4+8P+liPjBO77Tz+wf+nn+wjZ8oPT0c/vTz/TffvzliPizay7CtboUcEPtsq3dbUpOu2tplxuS0y7b2t2m5LS7lna5ITktbOvoA//fi4j/4I7v90bEjxaazyn9PRHxI3ee+L9HxB+Y82LPIXBCwA1VPFoQkNMWumSNcioDLQjIaQtdskY5LczA6AP/g4iYfu3ee49/ExG/JyKmP9/y8aUR8U8j4jfdWsT0a/umP/cgcI2AG+o1el67loCcriXtOtcIyOk1el67loCcriXtOtcIyOk1emdeO/LA/1BETEP07ccvR8SXF3ovKf1PIuLL7rxg+uLEO0uKeC6BOwJuqCLRgoCcttAla5RTGWhBQE5b6JI1ymlhBkYe+P/9iJi+Tf7243+NiI8Wei8p/VpE/Ed3XjD9+MH/saSI5xIw8MtAgwL+4W+waQMuWU4HbHqDW5bTBps24JLltLDpIw/8H4uI//6O7fR/f3Oh95LS/11E/Bd3XjD93z+3pIjnEjDwy0CDAv7hb7BpAy5ZTgdseoNbltMGmzbgkuW0sOkjD/zfFxH/1R3b6f9+utB7SemXIuL777xg+r//6yVFPJeAgV8GGhTwD3+DTRtwyXI6YNMb3LKcNti0AZcsp4VNH3ng/y8PDM/TkP1MofeS0i8e+OLD9EWK/2ZJEc8lQIAAAQIECBAgQIAAgTEFRh74vyki/oc7bf/ZiPiWnUThZyLi8Ttr+c8j4m/sZH2WQYAAAQIECBAgQIAAAQI7Fhh54P93I+L/vNObX4qI/3gn/fpfIuLr76zl34uI/2sn67MMAgQIECBAgAABAgQIENixwMgD/28/8Cvu/t+I+Mqd9OvNiPiKO2uZfpXgP9/J+iyDAAECBAgQIECAAAECBHYsMPLAP7XlrYj40lv9+dcR8aGIeLBxz6Y1fT4ifvOtdUxrenjjdbk8AQIECBAgQIAAAQIECDQiMPrA/79FxB+406vvjYgf3bh/3xMRP3JnDX8vIv7Djdfl8gQIECBAgAABAgQIECDQiMDoA/9fiogfvNOrvxsRX7dx/z4XEX/wzhr+ckT82Y3X5fIECBAgQIAAAQIECBAg0IjA6AP/IxHx9w/06g9HxC9u1MNviIi/feDavz8i3thoTS5LgAABAgQIECBAgAABAo0JjD7wT+16JSK+7U7ffjIiPrFRL38iIj5+59o/HRFPbLQelyVAgAABAgQIECBAgACBBgUM/BHfGBF/60DvfiAifnjlnv6ZiPgrB675RyPi51dei8sRIECAAAECBAgQIECAQMMCBv53m/dLR35u/8mIeHml/n57RNw/cK3p5/m/fqU1uAwBAgQIECBAgAABAgQIdCJg4H+3kd8REdO38R96fFlE/Epxvz8cEb985BrTt/f/VPH1lSdAgAABAgQIECBAgACBzgQM/F9s6F+NiE8e6e+XRMQ7Rb1/KCLePlL7xyPiu4uuqywBAgQIECBAgAABAgQIdCxg4H9/c//viPiaI/2eflXf9Cv7Mh/Tr96bvmX/0OMfRsTXZl5MLQIECBAgQIAAAQIECBAYR8DA//5ef1VE/D8n2v9dEfGZpHh8Z0T8tRO1vjoi/lHStZQhQIAAAQIECBAgQIAAgcEEDPwfbPj06/hODfXTz/r/TET84oVZ+YaI+JYDv3rvdrnpiwHTr+fzIECAAAECBAgQIECAAAECFwkY+A+z/bGI+OwZ0enb+3/25r8HZ577pRHx+M1/07fxn3o8FhGvXtRNLyJAgAABAgQIECBAgAABAjcCBv7jUfgdEfHfRsQfOpOWfxMRvxoR/+zmf37+5vkfiojfFRG/8+Z//qYzdf5ORHxrRPyadBIgQIAAAQIECBAgQIAAgWsFDPznBZ+PiD93/mlXPePPR8SzV1XwYgIECBAgQIAAAQIECBAgcEvAwD8vDk9ExKciYvqk/szH9An9PxYRr2QWVYsAAQIECBAgQIAAAQIECBj4l2XgGyPi227+W/bK9z/7pyNi+u/nrynitQQIECBAgAABAgQIECBA4JiAgf+ybDxyM/T/ZxHx4Yj4kjNl3o6IX4mI//Fm0H/jsst6FQECBAgQIECAAAECBAgQmCdg4J/ndO5ZD90M/tPwP31Y3/SYPrxvGvKn/945V8DfEyBAgAABAgQIECBAgACBTAEDf6amWgQIECBAgAABAgQIECBAYCcCBv6dNMIyCBAgQIAAAQIECBAgQIBApoCBP1NTLQIECBAgQIAAAQIECBAgsBMBA/9OGmEZBAgQIECAAAECBAgQIEAgU8DAn6mpFgECBAgQIECAAAECBAgQ2ImAgX8njbAMAgQIECBAgAABAgQIECCQKWDgz9RUiwABAgQIECBAgAABAgQI7ETAwL+TRlgGAQIECBAgQIAAAQIECBDIFDDwZ2qqRYAAAQIECBAgQIAAAQIEdiJg4N9JIyyDAAECBAgQIECAAAECBAhkChj4MzXVIkCAAAECBAgQIECAAAECOxEw8O+kEZZBgAABAgQIECBAgAABAgQyBQz8mZpqESBAgAABAgQIECBAgACBnQgY+HfSCMsgQIAAAQIECBAgQIAAAQKZAgb+TE21CBAgQIAAAQIECBAgQIDATgQM/DtphGUQIECAAAECBAgQIECAAIFMAQN/pqZaBAgQIECAAAECBAgQIEBgJwIG/p00wjIIECBAgAABAgQIECBAgECmgIE/U1MtAgQIECBAgAABAgQIECCwEwED/04aYRkECBAgQIAAAQIECBAgQCBTwMCfqakWAQIECBAgQIAAAQIECBDYiYCBfyeNsAwCBAgQIECAAAECBAgQIJApYODP1FSLAAECBAgQIECAAAECBAjsRMDAv5NGWAYBAgQIECBAgAABAgQIEMgUMPBnaqpFgAABAgQIECBAgAABAgR2ImDg30kjLIMAAQIECBAgQIAAAQIECGQKGPgzNdUiQIAAAQIECBAgQIAAAQI7ETDw76QRlkGAAAECBAgQIECAAAECBDIFDPyZmtvV+khE/IPtLu/KBGYJyOk+90g5AAAgAElEQVQsJk/aWEBON26Ay88SkNNZTJ5EgAABAgb+9jPwyYj4voi41/5W7KBjATntuLkdbU1OO2pmx1uR046ba2sECBDIFjDwZ4uuV28a8L8/Ir7z5pI/HBE/sN7lXYnALAE5ncXkSRsLyOnGDXD5WQJyOovJkwgQIEDgtoCBv808fPfNsP+1d5b/iYj4yTa3ZNUdCshph03tcEty2mFTO9ySnHbYVFsiQIDAGgIG/jWU864xfXX/6YiYBvtDj1+LiD8eEZ/Lu6RKBBYLyOliMi/YQEBON0B3ycUCcrqYzAsIECBA4LaAgb+dPPzJm1P9rzmx5L8eEY+3syUr7VBATjtsaodbktMOm9rhluS0w6baEgECBNYWMPCvLb78er8vIn4wIj5+4qX/NiL+RET83PLyXkEgRUBOUxgVKRaQ02Jg5VME5DSFURECBAgQmAQM/PvOwaduTvW/+sQyX4mIb9/3NqyucwE57bzBnWxPTjtpZOfbkNPOG2x7BAgQWFvAwL+2+LzrfUVEPBcRT514+r+6OdX/m/NKehaBdAE5TSdVsEBATgtQlUwXkNN0UgUJECBAYBIw8O8vB9NX96cP5vuqE0v7qTPf4r+/XVlRbwJy2ltH+9yPnPbZ1952Jae9ddR+CBAgsCMBA/9+mvG7I+IvRsSTJ5b0L29O9X9hP8u2ksEE5HSwhje6XTlttHGDLVtOB2u47RIgQGALAQP/FuofvOZ33Xww3+89sZwfj4jp9/B6ENhKQE63knfdJQJyukTLc7cSkNOt5F2XAAECgwkY+Ldt+MMR8WJEPHFiGf/i5u+d6m/bq5GvLqcjd7+dvctpO70aeaVyOnL37Z0AAQIbCBj4N0C/ueT0gXzTB/NNH9Rz7PFjEfGnZizx0ze1ZjzVUwgsEpDTRVyevJGAnG4E77KLBOR0EZcnEyBAgECGgIE/Q3FZjd8WET9y5lT/7Yj4jog4d6r/0ZvvEHj05mf/X162FM8mcFRAToWjBQE5baFL1iinMkCAAAECmwkY+Nel/9aI+AsR8eUnLvujEfG9M5Y1neo/e+t5DyLiXkRMXyzwIHCNgJxeo+e1awnI6VrSrnONgJxeo+e1BAgQIHC1gIH/asJZBX7rzan+x088+1cj4pMLT/XvlptO+E99yv+sxXrSsAJyOmzrm9q4nDbVrmEXK6fDtt7GC
3370RAgsC8BA399P745Il6IiA+fuNSlp/qHSk4/I3i/fluu0JmAnHbW0E63I6edNrazbclpZw21HQIECLQsYOCv695vuTnVP/Wr9D4fEZ+68lT/vR28HhHPRMRrdVtSuUMBOe2wqR1uSU47bGqHW5LTDptqSwQIEGhdwMBf08Fviojp1P5DK53qP+9T+msa2XlVOe28wZ1sT047aWTn25DTzhtsewQIEGhVwMCf27nfeHOq/6dPlH0zIr7HqX4uvGqLBOR0EZcnbyQgpxvBu+wiATldxOXJBAgQILC2gIE/T/yP3Jzqf6VT/TxUldIF5DSdVMECATktQFUyXUBO00kVJECAAIFsAQN/nugPnfi2+n9886v2fuHM5T4aES9GxKMnnudn9fN6NmIlOR2x6+3tWU7b69mIK5bTEbtuzwQIEGhMwMCf17Bj//BnfgK/n9XP69eoleR01M63tW85batfo65WTkftfFv7PvWFqTV2Mv266OnXRnsQOCUgp4X5MPDn4R4K6qcjYvrzUw+n+nk9UOm8gJyeN/KM7QXkdPseWMF5ATk9b+QZ2wtsNUhNQ/7TEfH29gRW0ICAnBY2ycCfh3vJP/zTFwSePbOEOaf6D0XEO3lbUaljATntuLkdbU1OO2pmx1uR046b29HW1h6kpgF/GvSd6ncUohW2IqeFyAb+PNwl//BnnupP3yr1QkTc81XUvGZ2XElOO25uR1uT046a2fFW5LTj5na0tTUHKaf6HQVn5a3IaSG4gT8Pd+4//Fmn+g/ffMDfEzdbmG6y0/DvQeCUgJzKRwsCctpCl6xRTmWgBYE1Bimn+i0kYd9rlNPC/hj483DP/cOffar/UkRM38p/++GDUfL62WslOe21s33tS0776mevu5HTXjvb176qBymn+n3lZavdyGmhvIE/D/fUP/xVp/p3Vz99hXX61v4HedtSqTMBOe2soZ1uR047bWxn25LTzhra6XaqBimn+p0GZqNtyWkhvIE/D/dQUD8TER+JiEdPXOb1iHgmIl47s5Tp9P7Qqf7tl71yU+utvG2p1JmAnHbW0E63I6edNrazbclpZw3tdDsVg5RT/U7DsuG25LQQ38Cfh3tJUOd8Av/dn9U/tOLpE/qnT0S9n7cdlToVkNNOG9vZtuS0s4Z2uh057bSxnW3rkpweI3Cq31k4drQdOS1shoE/D3dJUJ3q57mrtExATpd5efY2AnK6jburLhOQ02Venr2NwJKcnlqhU/1t+jfKVeW0sNMG/jzcuUF1qp9nrtJyATldbuYV6wvI6frmrrhcQE6Xm3nF+gJzc3psZU711+/ZiFeU08KuG/jzcM8F1al+nrVKlwvI6eV2XrmegJyuZ+1KlwvI6eV2XrmewLmcnlqJU/31+jT6leS0MAEG/jzcU0F1qp/nrNJ1AnJ6nZ9XryMgp+s4u8p1AnJ6nZ9XryNwySDlVH+d3rjKFwXktDANBv483ENB/UJEPO4T+POQVbpaQE6vJlRgBQE5XQHZJa4WkNOrCRVYQWDpIOVUf4WmuMQHBOS0MBQG/jzcQ0H9dERMf37s4RP48/xVmicgp/OcPGtbATnd1t/V5wnI6Twnz9pWYO4g5VR/2z6NfnU5LUyAgT8Pd+k//E9GxEsR8dCJJbwSEc9ExFt5y1RpcAE5HTwAjWx/y5xOX6h9rhEny9xWQE639Xf1eQJzBimn+vMsPatOQE7rbMPAn4c79x9+p/p55iotF5DT5WZesb7AFjn9aES8GBGPRsT0BdnpDbAHgVMCciofLQicGqSc6rfQwTHWKKeFfTbw5+HO+YffqX6et0qXCcjpZW5eta7A2jmdTvWfvbXFBxFxLyKmN8MeBI4JyKlstCBwbJByqt9C98ZZ47U5nb5j+p1xuJbt1MC/zOvSr/Q71c9zVuk6gVNvUOX0OluvzhNYK6e3T/Xvrn56Mzx9kdaDwCUDf+b9VE5l8BqBQ/fTz0bEx64p6rUEkgWuyen0b/ULvlB/vCMG/ry0HnuD+qaf1c9DVulqATm9mlCBFQTWyOndU/1D23oqIu6vsF+XaFNATtvs22irnvOdKKOZ2O/+BC7J6d0vrPpC/ZG+GvjzAn8oqG9ExCMnLjF968nT3lDmNUGlswJyepbIE3YgUJnTU6el72399ZsPTH1tBxaWsF8BOd1vb6zsiwKXDFL8CKwtsDSnx35M2mfwHOicgT8vznM+XfL21XwCf569SvMF5HS+lWduJ1CV0zmn+s/7lP7tGt/YleW0sYYNutylg9SgTLa9scDcnJ77canps3emz+CZPovH40bAwJ8Xhbn/8DvVzzNXabmAnC4384r1BbJz6lR//R6OcEU5HaHL7e9x7iDV/k7toGWBOTn14ecXdtjAfyHcgZfN+YffqX6et0qXCcjpZW5eta5AZk6d6q/bu5GuJqcjdbvdvc4ZpNrdnZX3IrDWh/X24rVoHwb+RVwnn3zqH36n+nnOKl0nIKfX+Xn1OgIZOXWqv06vRr6KnI7c/Xb2buBvp1cjr3SND0Ed1tfAn9f6Y//wO9XPM1bpeoFrczqdlj53/TJUIHDRF1Dn3k+d6gvYGgIZ99NnzyzUZ0qs0cm+r2Hg77u/veyu8kNQezG6eB8G/ovpPvDCQ0F9NSIey7uESgSuFrg0p7dPS30C6tVtUOCMQEZOj13CJ/CLX5aAnGZJqlMpYOCv1FU7S2DOj0jdvtbcA4Cs9TVdx8Cf1z431DxLleoELsnp3dPS6ZNPp09AnT4J1YNAhUBGTg+ty2lpRbfGrSmn4/a+pZ1fktOW9metfQjMHfj9mPQF/TbwX4B25CVuqHmWKtUJLMnpqZ+BfjkippN+DwIVAlk5fW9tTvUruqSmnMpACwJLctrCfqyxT4E5A79T/Qt7b+C/EO7Ay9xQ8yxVqhOYm9M5PwP9VETcr1uqygMLZObUqf7AQSreupwWAyufIjA3pykXU4TAhQIZH4J64aX7f5mBP6/Hbqh5lirVCZzLqU82r7NXeb6AnM638sztBOR0O3tXni9wLqfzK3kmgTqBaz8EtW5lHVQ28Oc10Q01z1KlOoFTOZ1zqu+0tK43Kn9RQE6loQUBOW2hS9bo/akMtCBw6YegtrC3zddo4M9rgRtqnqVKdQKHcvqZiPhIRDx64rJ+BrquJyp/UEBOpaIFATltoUvW6P2pDLQgIKeFXTLw5+EKap6lSnUCcz4U5e7VnerX9UPlwwJyKhktCMhpC12yRu9PZaAFATkt7JKBPw9XUPMsVaoTWPIG1al+XR9UPi0gpxLSgoCcttAla/T+VAZaEJDTwi4Z+PNwBTXPUqU6gblvUJ3q1/VA5fMCcnreyDO2F5DT7XtgBecFvD89b+QZ2wvIaWEPDPx5uIKaZ6lSncC5N6hO9evsVZ4vIKfzrTxzOwE53c7elecLeH8638oztxOQ00J7A38erqDmWapUJ3DqDapT/Tp3lZcJyOkyL8/eRuDanD4UEe9ss3RXHUjA+9OBmt3wVuW0sHkG/jxcQc2zVKlO4FBOvxARj0fEa3WXVZnAIgE5XcTlyRsJXJPTJyPihYi4FxFvb7R+lx1DwPvTMfrc+i7ltLCDBv48XEHNs1SpTkBO62xVzhOQ0zxLleoELsnpwxHxYkQ8cbOslyNiGv49CFQJXJLTqrWoS+CYgJwWZsPAn4crqHmWKtUJyGmdrcp5AnKaZ6lSncDSnE6D/UsRMX0r/+3H9OfT4O9BoEJgaU4r1qAmgXMCcnpO6Iq/N/BfgXfnpYKaZ6lSnYCc1tmqnCcgp3mWKtUJzM3p3VP9uyuavqV/+tb+B3VLVXlggbk5HZjI1ncgIKeFTTDw5+EKap6lSnUCclpnq3KegJzmWapUJzAnp8dO9W+v6pWIeCYi3qpbqsoDC8zJ6cA8tr4TATktbISBPw9XUPMsVaoTkNM6W5XzBOQ0z1KlOoFTOT13qj+tavqE/qcj4n7dElUmEO6nQtCCgJwWdsnAn4crqHmWKtUJyGmdrcp5AnKaZ6lSncCxnL555Gf1b6/EqX5dX1R+v4D7qUS0ICCnhV0y8OfhCmqepUp1AnJaZ6tynoCc5lmqVCdwKKdvRMQjJy7pVL+uHyofFnA/lYwWBOS0sEsG/jxcQc2zVKlOQE7rbFXOE5DTPEuV6gQO5fTU1Zzq1/VC5eMC7qfS0YKAnBZ2ycCfhyuoeZYq1QnIaZ2tynkCcppnqVKdwNyB36l+XQ9UPi/gfnreyDO2F5DTwh4Y+PNwBTXPUqU6ATmts1U5T0BO8yxVqhOYM/A71a/zV3megPvpPCfP2lZATgv9Dfx5uIKaZ6lSnYCc1tmqnCcgp3mWKtUJnBr4nerXuau8TMD9dJmXZ28jIKeF7gb+PFxBzbNUqU5ATutsVc4TkNM8S5XqBI4N/E7168xVXi7gfrrczCvWF5DTQnMDfx6uoOZZqlQnIKd1tirnCchpnqVKdQKHcvpqRDxWd0mVCSwWcD9dTOYFGwjIaSG6gT8PV1DzLFWqE5DTOluV8wTkNM9SpToBOa2zVTlPQE7zLFWqE5DTOtsw8OfhCmqepUp1AnJaZ6tynoCc5lmqVCcgp3W2KucJyGmepUp1AnJaZ2vgT7QV1ERMpcoE5LSMVuFEATlNxFSqTEBOy2gVThSQ00RMpcoE5LSMNgz8ibaCmoipVJmAnJbRKpwoIKeJmEqVCchpGa3CiQJymoipVJmAnJbRGvgzaQU1U1OtKgE5rZJVN1NATjM11aoSkNMqWXUzBeQ0U1OtKgE5rZINA38mraBmaqpVJSCnVbLqZgrIaaamWlUCclolq26mgJxmaqpVJSCnVbIG/lRZQU3lVKxIQE6LYJVNFZDTVE7FigTktAhW2VQBOU3lVKxIQE6LYKeyPqU/D1dQ8yxVqhOQ0zpblfME5DTPUqU6ATmts1U5T0BO8yxVqhOQ0zpbA3+iraAmYipVJiCnZbQKJwrIaSKmUmUCclpGq3CigJwmYipVJiCnZbRO+DNpBTVTU60qATmtklU3U0BOMzXVqhKQ0ypZdTMF5DRTU60qATmtkvUt/amygprKqViRgJwWwSqbKiCnqZyKFQnIaRGssqkCcprKqViRgJwWwU5l/Qx/Hq6g5lmqVCcgp3W2KucJyGmepUp1AnJaZ6tynoCc5lmqVCcgp3W2Bv5EW0FNxFSqTEBOy2gVThSQ00RMpcoE5LSMVuFEATlNxFSqTEBOy2id8GfSCmqmplpVAnJaJatupoCcZmqqVSUgp1Wy6mYKyGmmplpVAnJaJetb+lNlBTWVU7EiATktglU2VUBOUzkVKxKQ0yJYZVMF5DSVU7EiATktgp3K+hn+PFxBzbNUqU5ATutsVc4TkNM8S5XqBOS0zlblPAE5zbNUqU5ATutsDfyJtoKaiKlUmYCcltEqnCggp4mYSpUJyGkZrcKJAnKaiKlUmYCcltE64c+kFdRMTbWqBOS0SlbdTAE5zdRUq0pATqtk1c0UkNNMTbWqBOS0Sta39KfKCmoqp2JFAnJaBKtsqoCcpnIqViQgp0WwyqYKyGkqp2JFAnJaBDuV9TP8ebiCmmepUp2AnNbZqpwnIKd5lirVCchpna3KeQJymmepUp2AnNbZGvgTbQU1EVOpMgE5LaNVOFFAThMxlSoTkNMyWoUTBeQ0EVOpMgE5LaN1wp9JK6iZmmpVCchplay6mQJymqmpVpWAnFbJqpspIKeZmmpVCchplaxv6U+VFdRUTsWKBOS0CFbZVAE5TeVUrEhATotglU0VkNNUTsWKBOS0CHYq62f483AFNc9SpToBOa2zVTlPQE7zLFWqE5DTOluV8wTkNM9SpToBOa2zNfAn2gpqIqZSZQJyWkarcKKAnCZiKlUmIKdltAonCshpIqZSZQJyWkbrhD+TVlAzNdWqEpDTKll1MwXkNFNTrSoBOa2SVTdTQE4zNdWqEpDTKlnf0p8qK6ipnIoVCchpEayyqQJymsqpWJGAnBbBKpsqIKepnIoVCchpEexU1s/w5+EKap6lSnUCclpnq3KegJzmWapUJyCndbYq5wnIaZ6lSnUCclpna+BPtBXUREylygTktIxW4UQBOU3EVKpMQE7LaBVOFJDTREylygT
3370ktIzWCX8mraBmaqpVJSCnVbLqZgrIaaamWlUCclolq26mgJxmaqpVJSCnVbK+pT9VVlBTORUrEpDTIlhlUwXkNJVTsSIBOS2CVTZVQE5TORUrEpDTItiprJ/hz8MV1DxLleoE5LTOVuU8ATnNs1SpTkBO62xVzhOQ0zxLleoE5LTO1sCfaCuoiZhKlQnIaRmtwokCcpqIqVSZgJyW0SqcKCCniZhKlQnIaRmtE/5MWkHN1FSrSkBOq2TVzRSQ00xNtaoE5LRKVt1MATnN1FSrSkBOq2R9S3+qrKCmcipWJCCnRbDKpgrIaSqnYkUCcloEq2yqgJymcipWJCCnRbBTWT/Dn4crqHmWKtUJyGmdrcp5AnKaZ6lSnYCc1tmqnCcgp3mWKtUJyGmdrYE/0VZQEzGVKhOQ0zJahRMF5DQRU6kyATkto1U4UUBOEzGVKhOQ0zJaJ/yZtIKaqalWlYCcVsmqmykgp5maalUJyGmVrLqZAnKaqalWlYCcVsn6lv5UWUFN5VSsSEBOi2CVTRWQ01ROxYoE5LQIVtlUATlN5VSsSEBOi2Cnsn6GPw9XUPMsVaoTkNM6W5XzBOQ0z1KlOgE5rbNVOU9ATvMsVaoTkNM6WwN/oq2gJmIqVSYgp2W0CicKyGkiplJlAnJaRqtwooCcJmIqVSYgp2W0TvgzaQU1U1OtKgE5rZJVN1NATjM11aoSkNMqWXUzBeQ0U1OtKgE5rZL1Lf2psoKayqlYkYCcFsEqmyogp6mcihUJyGkRrLKpAnKayqlYkYCcFsFOZf0Mfx6uoOZZqlQnIKd1tirnCchpnqVKdQJyWmercp6AnOZZqlQnIKd1tgb+QlulCRAgQIAAAQIECBAgQIDAZgJO+Dejd2ECBAgQIECAAAECBAgQIFAnYOCvs1WZAAECBAgQIECAAAECBAhsJmDg34zehQkQIECAAAECBAgQIECAQJ2Agb/OVmUCBAgQIECAAAECBAgQILCZgIF/M3oXJkCAAAECBAgQIECAAAECdQIG/jpblQkQIECAAAECBAgQIECAwGYCBv7N6F2YAAECBAgQIECAAAECBAjUCRj462xVJkCAAAECBAgQIECAAAECmwkY+Dejd2ECBAgQIECAAAECBAgQIFAnYOCvs1WZAAECBAgQIECAAAECBAhsJmDg34zehQkQIECAAAECBAgQIECAQJ2Agb/OVmUCBAgQIECAAAECBAgQILCZgIF/M3oXJkCAAAECBAgQIECAAAECdQIG/jpblQkQIECAAAECBAgQIECAwGYCBv7N6F2YAAECBAgQIECAAAECBAjUCRj462xVJkCAAAECBAgQIECAAAECmwkY+Dejd2ECBAgQIECAAAECBAgQIFAnYOCvs1WZAAECBAgQIECAAAECBAhsJmDg34zehQkQIECAAAECBAgQIECAQJ2Agb/OVmUCBAgQIECAAAECBAgQILCZgIF/M3oXJkCAAAECBAgQIECAAAECdQIG/jpblQkQIECAAAECBAgQIECAwGYCBv7N6F2YAAECBAgQIECAAAECBAjUCRj462xVJkCAAAECBAgQIECAAAECmwkY+Dejd2ECBAgQIECAAAECBAgQIFAnYOCvs1WZAAECBAgQIECAAAECBAhsJmDg34zehQkQIECAAAECBAgQIECAQJ2Agb/OVmUCBAgQIECAAAECBAgQILCZgIF/M3oXJkCAAAECBAgQIECAAAECdQIG/jpblQkQIECAAAECBAgQIECAwGYCBv7N6F2YAAECBAgQIECAAAECBAjUCRj462xVJkCAAAECBAgQIECAAAECmwkY+Dejd2ECBAgQIECAAAECBAgQIFAnYOCvs1WZAAECBAgQIECAAAECBAhsJmDg34zehQkQIECAAAECBAgQIECAQJ2Agb/OVmUCBAgQIECAAAECBAgQILCZgIF/M3oXJkCAAAECBAgQIECAAAECdQIG/jpblQkQIECAAAECBAgQIECAwGYCBv7N6F2YAAECBAgQIECAAAECBAjUCRj462xVJkCAAAECBAgQIECAAAECmwkY+Dejd2ECBAgQIECAAAECBAgQIFAnYOCvs1WZAAECBAgQIECAAAECBAhsJmDg34zehQkQIECAAAECBAgQIECAQJ2Agb/OVmUCBAgQIECAAAECBAgQILCZgIF/M3oXJkCAAAECBAgQIECAAAECdQIG/jpblQkQIECAAAECBAgQIECAwGYCBv7N6F2YAAECBAgQIECAAAECBAjUCRj462xVJkCAAAECBAgQIECAAAECmwkY+Dejd2ECBAgQIECAAAECBAgQIFAnYOCvs1WZAAECBAgQIECAAAECBAhsJmDg34zehQkQIECAAAECBAgQIECAQJ2Agb/OVmUCBAgQIECAAAECBAgQILCZgIF/M3oXJkCAAAECBAgQIECAAAECdQIG/jpblQkQIECAAAECBAgQIECAwGYCBv7N6F2YAAECBAgQIECAAAECBAjUCRj462xVJkCAAAECBAgQIECAAAECmwkY+Dejd2ECBAgQIECAAAECBAgQIFAnYOCvs1WZAAECBAgQIECAAAECBAhsJmDg34zehQkQIECAAAECBAgQIECAQJ2Agb/OVmUCBAgQIECAAAECBAgQILCZgIF/M3oXJkCAAAECBAgQIECAAAECdQIG/jpblQkQIECAAAECBAgQIECAwGYCBv7N6F2YAAECBAgQIECAAAECBAjUCRj462xVJkCAAAECBAgQIECAAAECmwkY+Dejd2ECBAgQIECAAAECBAgQIFAnYOCvs1WZAAECBAgQIECAAAECBAhsJmDg34zehQkQIECAAAECBAgQIECAQJ2Agb/OVmUCBAgQIECAAAECBAgQILCZgIF/M3oXJkCAAAECBAgQIECAAAECdQIG/jpblQkQIECAAAECBAgQIECAwGYCBv7N6F2YAAECBAgQIECAAAECBAjUCRj462xVJkCAAAECBAgQIECAAAECmwkY+Dejd2ECBAgQIECAAAECBAgQIFAnYODPs/2hiHgur9ziSk9GxMuLX+UFownI6Wgdb3O/ctpm30ZbtZyO1vE29yunbfZttFXLaWHHDfx5uFsFdRryn46It/O2olLHAnLacXM72pqcdtTMjrcipx03t6OtyWlHzex4K3Ja2FwDfx7u2kGdBvxp0Heqn9fDESrJ6Qhdbn+Pctp+D0fYgZyO0OX29yin7fdwhB3IaWGXDfx5uGsG1al+Xt9GqySno3W8zf3KaZt9G23Vcjpax9vcr5y22bfRVi2nhR038OfhrhFUp/p5/Rq1kpyO2vm29i2nbfVr1NXK6aidb2vfctpWv0ZdrZwWdt7An4dbHVSn+nm9GrmSnI7c/Xb2Lqft9GrklcrpyN1vZ+9y2k6vRl6pnBZ238Cfh1sVVKf6eT1SKUJOpaAFATltoUvWKKcy0IKAnLbQJWuU08IMGPjzcCuCOvdU/6GIeCdvKyp1LCCnHTe3o63JaUfN7Hgrctpxczvampx21MyOtyKnhc018OfhZgZ1yan+kxHxQkTc86v58prZcSU57bi5HW1NTjtqZsdbkdOOm9vR1uS0o2Z2vBU5LWyugT8PNyuoc0/1H46IFyPiiZstTK+bhn8PAqcE5IHUw4AAACAASURBVFQ+WhCQ0xa6ZI1yKgMtCMhpC12yRjktzICBPw/32qAuPdV/KSKmb+W//ZgG/mnw9yBwTEBOZaMFATltoUvWKKcy0IKAnLbQJWuU08IMGPjzcK8J6qWn+ndXP33RYPrW/gd521KpMwE57ayhnW5HTjttbGfbktPOGtrpduS008Z2ti05LWyogT8P95KgZpzq397BKxHxTES8lbctlToTkNPOGtrpduS008Z2ti057ayhnW5HTjttbGfbktPChhr483CXBjXrVH/awfQJ/U9HxP287ajUqYCcdtrYzrYlp501tNPtyGmnje1sW3LaWUM73Y6cFjbWwJ+HOzeoTvXzzFVaLiCny828Yn0BOV3f3BWXC8jpcjOvWF9ATtc3d8XlAnK63Gz2Kwz8s6nOPnFOUJ3qn2X0hGIBOS0GVj5FQE5TGBUpFpDTYmDlUwTkNIVRkWIBOS0ENvDn4Z4KqlP9PGeVrhOQ0+v8vHodATldx9lVrhOQ0+v8vHodATldx9lVrhOQ0+v8Tr7awJ+HeyyoTvXzjFW6XkBOrzdUoV5ATuuNXeF6ATm93lCFegE5rTd2hesF5PR6w6MVDPx5uIeC+tmI+NiMSzwZES9FxEMnnusT+GdAespZATk9S+QJOxC
3370Q0x00wRLOCsjpWSJP2IGAnO6gCZZwVkBOzxJd/gQD/+V2d195KKifjojpz489Ho6IFyPiiRPP8Qn8eT1S6d08PncHQk4lY28Ccrq3jljPIQE5lYsWBOS0hS5Zo5wWZsDAn4e7NKhO9fPsVZovIKfzrTxzO4Etczp9AezuF8W2k3DlPQvI6Z67Y23vCcipLLQgIKeFXTLw5+HODapT/TxzlZYLyOlyM69YX2CLnH705juuHo2I6Quy0+eveBA4JSCn8tGCgJy20CVrlNPCDBj483DnBNWpfp63SpcJyOllbl61rsDaOZ1O9Z+9tcUHEXEvIqbfsOJB4JiAnMpGCwJy2kKXrFFOCzNg4M/DPRVUp/p5zipdJyCn1/l59ToCa+X09qn+3Z1NJ/zTF2k9CFwy8Gf+uy+nMniNgPvpNXpeu5aAnBZKG/jzcI8F9U2fwJ+HrNLVAnJ6NaECKwiskdO7p/qHtvVURNxfYb8u0aaAnLbZt9FWLaejdbzN/cppYd8M/Hm4h4L6RkQ8cuISPoE/z1+leQJyOs/Js7YVqMzpqdPS93b9ekQ8ExGvbcvg6jsXkNOdN8jyfl1ATgWhBQE5LeySgT8P91BQT1V/5eYN5Vt5S1CJwFkBOT1L5Ak7EKjK6ZxT/ed9Sv8OEtDGEuS0jT6Nvko5HT0BbexfTgv7ZODPw50bVKf6eeYqLReQ0+VmXrG+QHZOneqv38MRriinI3S5/T3Kafs9HGEHclrYZQN/Hu6coDrVz/NW6TIBOb3MzavWFcjMqVP9dXs30tXkdKRut7tXOW23dyOtXE4Lu23gz8M9FVSn+nnOKl0nIKfX+Xn1OgIZOXWqv06vRr6KnI7c/Xb2Lqft9GrklcppYfcN/Hm4x4LqVD/PWKXrBa7N6XRa+tz1y1CBwEmBjJw+e8bYz+oL4bUCcnqtoNevISCnayi7xrUCcnqt4InXG/jzcA8F9dWIeCzvEioRuFrg0pzePi2dfjf59DvKPQhUCWTk9NjafAJ/VdfGqyun4/W8xR3LaYtdG2/NclrYcwN/Hu6hoE6nodOfexDYi8AlOb37M9APIuJeRLy9l01ZR3cCGTk9hOJUv7uobLohOd2U38VnCmyZ04ciYvqxVg8C5wTk9JzQFX9v4L8C785LLwlq3tVVIjBPYElOT/0M9HTCP530exCoEMjK6Xtrc6pf0SU15VQGWhDYKqfTe4QXHBC0EJFdrFFOC9tg4M/DXRLUvKuqRGCZwNyczvlk86ci4v6yy3s2gVkCmTl1qj+L3JMuEJDTC9C8ZHWBtXP6cES8GBFP3OzUAcHqLW/ygnJa2DYDfx7u3KDmXVElAssFzuXUJ5svN/WKfAE5zTdVMV9ATvNNVcwXWDOn06n+SxExfSv/7YfP/snva28V5bSwowb+PNxzQc27kkoELhc4ldM5p/pOSy+398r5AnI638oztxOQ0+3sXXm+wBo5vXuqf3d102f+TJ/9M30GkAeBQwJyWpgLA38eroE/z1KlOoFDOf1MRHwkIh49cVk/A13XE5U/KCCnUtGCgJy20CVrrM7psVP92/J+RbUcnhOQ03NCV/y9gf8KvDsvNfDnWapUJ3Aop+eu5lT/nJC/zxaQ02xR9SoE5LRCVc1sgaqcnjvVn/YxfUL/0z7vJ7ulXdaT08K2GvjzcA38eZYq1QksuaE61a/rg8qnBeRUQloQkNMWumSNFTl1qi9X2QJymi16q56BPw/XwJ9nqVKdwNwbqlP9uh6ofF5ATs8becb2AnK6fQ+s4LxAZk6d6p/39ozLBOT0MrdZrzLwz2Ka9SQD/ywmT9pY4NwN1an+xg1y+V8XkFNBaEFATlvokjVm5dSpvixVCshpoa6BPw/XwJ9nqVKdwKkbqlP9OneVlwnI6TIvz95G4NqcTr+6bPoZZw8ClQLX5tSpfmV31H5PQE4Ls2Dgz8M18OdZqlQncCinX4iIxyPitbrLqkxgkYCcLuLy5I0ErsnpdFr6ws2vKpt+ZZkHgSqBa3P6UkRMX5w69vAJ/FWdG6uunBb228Cfh2vgz7NUqU5ATutsVc4TkNM8S5XqBC7J6d3T0pcjYhr+PQhUCWTk9NDafAJ/VcfGrCunhX038OfhXhLUvKurRGCegJzOc/KsbQXkdFt/V58nsDSnx34GevrzafD3IFAhkJXT22tzql/RqbFrymlh/w38ebhLg5p3ZZUIzBeQ0/lWnrmdgJxuZ+/K8wXm5vTcz0BP39J/LyIezL+0ZxKYLZCV0+mCTvVns3viQgE5XQi25OkG/iVap587N6h5V1SJwHIBOV1u5hXrC8jp+uauuFxgTk59svlyV6/IFZDTXE/VagTktMb116sa+PNw5wQ172oqEbhMQE4vc/OqdQXkdF1vV7tM4FROz53qT1d0WnqZu1ctE5DTZV6evY2AnBa6G/jzcL1BzbNUqU5ATutsVc4TkNM8S5XqBI7l9M2I8Mnmde4qLxOQ02Venr2NgJwWuhv483C9Qc2zVKlOQE7rbFXOE5DTPEuV6gQO5fSNiHjkxCWd6tf1Q+XDAnIqGS0IyGlhlwz8ebjeoOZZqlQnIKd1tirnCchpnqVKdQKHcnrqaj7ZvK4XKh8XkFPpaEFATgu7ZODPw/UGNc9SpToBOa2zVTlPQE7zLFWqE5j7BtWpfl0PVD4vIKfnjTxjewE5LeyBgT8P1xvUPEuV6gTktM5W5TwBOc2zVKlOYM4bVKf6df4qzxOQ03lOnrWtgJwW+hv483C9Qc2zVKlOQE7rbFXOE5DTPEuV6gROvUF1ql/nrvIyATld5uXZ2wjIaaG7gT8P1xvUPEuV6gTktM5W5TwBOc2zVKlO4NgbVKf6deYqLxeQ0+VmXrG+wLU5/XREPLf+stu4ooE/r0/eoOZZqlQnIKd1tirnCchpnqVKdQKHcvpqRDxWd0mVCSwWkNPFZF6wgcClOf1oRLwYEY9GxJMR8fIGa9/9JQ38eS3yBjXPUqU6ATmts1U5T0BO8yxVqhOQ0zpblfME5DTPUqU6gUtyOp3qP3trSQ8i4l5EvF23zDYrG/jz+nZJUPOurhKBeQJyOs/Js7YVkNNt/V19noCcznPyrG0F5HRbf1efJ7Akp7dP9e9Wn074p5N+j1sCBv68OCwJat5VVSKwTEBOl3l59jYCcrqNu6suE5DTZV6evY2AnG7j7qrLBObm9O6p/qGrPBUR95ddvu9nG/jz+js3qHlXVInAcgE5XW7mFesLyOn65q64XEBOl5t5xfoCcrq+uSsuFziX01On+u9d7fWIeCYiXlt++b5fYeDP6++5oOZdSSUClwvI6eV2XrmegJyuZ+1KlwvI6eV2XrmegJyuZ+1KlwucyumcU/3nfUr/cXwD/+XBvPtKN9Q8S5XqBOS0zlblPAE5zbNUqU5ATutsVc4TkNM8S5XqBA7l9DMR8ZGbT+A/dmWn+jN6YuCfgTTzKW6oM6E8bVMBOd2U38VnCsjpTChP21RATjfld/GZAnI6E8rTNhU4lNNzC3Kqf07o5u8N/DOhZjzNDXUGkqdsLiCnm7fAAmYIyOkMJE/ZXEBON2+BBcwQkNMZSJ6yucCSgd+p/sJ2GfgXgp14uhtqnqVKdQJyWmercp6AnOZZqlQnIKd1tirnCchpnqVKdQJzB36n+hf0wMB/AdqRl7ih5lmqVCcgp3W2KucJyGmepUp1AnJaZ6tynoCc5lmqVCdwbuB3qn+FvYH/Crw7L3VDzbNUqU5ATutsVc4TkNM8S5XqBOS0zlblPAE5zbNUqU7g1MDvVP9KdwP/lYC3Xu6GmmepUp2AnNbZqpwnIKd5lirVCchpna3KeQJymmepUp3AoZx+ISIej4jX6i47RmUDf16f3VDzLFWqE5DTOluV8wTkNM9SpToBOa2zVTlPQE7zLFWqE5DTOtsw8OfhCmqepUp1AnJaZ6tynoCc5lmqVCcgp3W2KucJyGmepUp1AnJaZ2vgT7QV1ERMpcoE5LSMVuFEATlNxFSqTEBOy2gVThSQ00RMpcoE5LSMNgz8ibaCmoipVJmAnJbRKpwoIKeJmEqVCchpGa3CiQJymoipVJmAnJbRGvgzaQU1U1OtKgE5rZJVN1NATjM11aoSkNMqWXUzBeQ0U1OtKgE5rZINA38mraBmaqpVJSCnVbLqZgrIaaamWlUCclolq26mgJxmaqpVJSCnVbIG/lRZQU3lVKxIQE6LYJVNFZDTVE7FigTktAhW2VQBOU3lVKxIQE6LYKeyPqU/D1dQ8yxVqhOQ0zpblfME5DTPUqU6ATmts1U5T0BO8yxVqhOQ0zpbA3+iraAmYipVJiCnZbQKJwrIaSKmUmUCclpGq3CigJwmYipVJiCnZbRO+DNpBTVTU60qATmtklU3U0BOMzXVqhKQ0ypZdTMF5DRTU60qATmtkvUt/amygprKqViRgJwWwSqbKiCnqZyKFQnIaRGssqkCcprKqViRgJwWwU5l/Qx/Hq6g5lmqVCcgp3W2KucJyGmepUp1AnJaZ6tynoCc5lmqVCcgp3W2Bv5EW0FNxFSqTEBOy2gVThSQ00RMpcoE5LSMVuFEATlNxFSqTEBOy2id8GfSCmqmplpVAnJaJatupoCcZmqqVSUgp1Wy6mYKyGmmplpVAnJaJetb+lNlBTWVU7EiATktglU2VUBOUzkVKxKQ0yJYZVMF5DSVU7EiATktgp3K+hn+PFxBzbNUqU5ATutsVc4TkNM8S5XqBOS0zlblPAE5zbNUqU5ATutsDfyJtoKaiKlUmYCcltEqnCggp4mYSpUJyGkZrcKJAnKaiKlUmYCcltE64c+kFdRMTbWqBOS0SlbdTAE5zdRUq0pATqtk1c0UkNNMTbWqBOS0Sta39KfKCmoqp2JFAnJaBKtsqoCcpnIqViQgp0WwyqYKyGkqp2JFAnJaBDuV9TP8ebiCmmepUp2AnNbZqpwnIKd5lirVCchpna3KeQJymmepUp2AnNbZGvgTbQU1EVOpMgE5LaNVOFFAThMxlSoTkNMyWoUTBeQ0EVOpMgE5LaN1wp9JK6iZmmpVCchplay6mQJymqmpVpWAnFbJqpspIKeZmmpVCchplaxv6U+VFdRUTsWKBOS0CFbZVAE5TeVUrEhATotglU0VkNNUTsWKBOS0CHYq62f483AFNc9SpToBOa2zVTlPQE7zLFWqE5DTOluV8wTkNM9SpToBOa2zNfAn2gpqIqZSZQJyWkarcKKAnCZiKlUmIKdltAonCshpIqZSZQJyWkbrhD+TVlAzNdWqEpDTKll1MwXkNFNTrSoBOa2SVTdTQE4zNdWqEpDTKlnf0p8qK6ipnIoVCchpEayyqQJymsqpWJGAnBbBKpsqIKepnIoVCchpEexU1s/wF+IqTYAAAQIECBAgQIAAAQIEthIw8G8l77oECBAgQIAAAQIECBAgQKBQwMBfiKs0AQIECBAgQIAAAQIECBDYSsDAv5W86xIgQIAAAQIECBAgQIAAgUIBA38hrtIECBAgQIAAAQIECBAgQGArAQP/VvKuS4AAAQIECBAgQIAAAQIECgUM/IW4ShMgQIAAAQIECBAgQIAAga0EDPxbybsuAQIECBAgQIAAAQIECBAoFDDwF+IqTYAAAQIECBAgQIAAAQIEthIw8G8l77oECBAgQIAAAQIECBAgQKBQwMBfiKs0AQIECBAgQIAAAQIECBDYSsDAv5W86xIgQIAAAQIECBAgQIAAgUIBA38hrtIECBAgQIAAAQIECBAgQGArAQP/VvKuS4AAAQIECBAgQIAAAQIECgUM/IW4ShMgQIAAAQIECBAgQIAAga0EDPxbybsuAQIECBAgQIAAAQIECBAoFDDwF+IqTYAAAQIECBAgQIAAAQIEthIw8G8l77oECBAgQIAAAQIECBAgQKBQwMBfiKs0AQIECBAgQIAAAQIECBDYSsDAv5W86xIgQIAAAQIECBAgQIAAgUIBA38hrtIECBAgQIAAAQIECBAgQGArAQP/VvKuS4AAAQIECBAgQIAAAQIECgUM/IW4ShMgQIAAAQIECBAgQIAAga0EDPxbybsuAQIECBAgQIAAAQIECBAoFDDwF+IqTYAAAQIECBAgQIAAAQIEthIw8G8l77oECBAgQIAAAQIECBAgQKBQwMBfiKs0AQIECBAgQIAAAQIECBDYSsDAv5W86xIgQIAAAQIECBAgQIAAgUIBA38hrtIECBAgQIAAAQIECBAgQGArAQP/VvKuS4AAAQIECBAgQIAAAQIECgUM/IW4ShMgQIAAAQIECBAgQIAAga0EDPxbybsuAQIECBAgQIAAAQIECBAoFDDwF+IqTYAAAQIECBAgQIAAAQIEthIw8G8l77oECBAgQIAAAQIECBAgQKBQwMBfiKs0AQIECBAgQIAAAQIECBDYSsDAv5W86xIgQIAAAQIECBAgQIAAgUIBA38hrtIECBAgQIAAAQIECBAgQGArAQP/VvKuS4AAAQIECBAgQIAAAQIECgUM/IW4ShMgQIAAAQIECBAgQIAAga0EDPxbybsuAQIECBAgQIAAAQIECBAoFDDwF+IqTYAAAQIECBAgQIAAAQIEthIw8G8l77oECBAgQIAAAQIECBAgQKBQwMBfiKs0AQIECBAgQIAAAQIECBDYSsDAv5W86xIgQIAAAQIECBAgQIAAgUIBA38hrtIECBAgQIAAAQIECBAgQGArAQP/VvKuS4AAAQIECBAgQIAAAQIECgUM/IW4ShMgQIAAAQIECBAgQIAAga0EDPxbybsuAQIECBAgQIAAAQIECBAoFDDwF+IqTYAAAQIECBAgQIAAAQIEthIw8G8l77oECBAgQIAAAQIECBAgQKBQwMBfiKs0AQIECBAgQIAAAQIECBDYSsDAv5W86xIgQIAAAQIECBAgQIAAgUIBA38hrtIECBAgQIAAAQIECBAgQGArAQP/VvKuS4AAAQIECBAgQIAAAQIECgUM/IW4ShMgQIAAAQIECBAgQIAAga0EDPxbybsuAQIECBAgQIAAAQIECBAoFDDwF+IqTYAAAQIECBAgQIAAAQIEthIw8G8l77oECBAgQIAAAQIECBAgQKBQwMBfiKs0AQIECBAgQIAAAQIECBDYSsDAv5W86xIgQIAAAQIECBAgQIAAgUIBA38hrtIECBAgQIAAAQIECBAgQGArAQP/VvKuS4AAAQIECBAgQIAAAQIECgUM/IW4ShMgQIAAAQIECBAgQIAAga0EDPxbybsuAQIECBAgQIAAAQIECBAoFDDwF+IqTYAAAQIECBAgQIAAAQIEthIw8G8l77oECBAgQIAAAQIECBAgQKBQwMBfiKs0AQIECBAgQIAAAQIECBDYSsDAv5W86xIgQIAAAQIECBAgQIAAgUIBA38hrtIECBAgQIAAAQIECBAgQGArAQP/VvKuS4AAAQIECBAgQIAAAQIECgUM/IW4ShMgQIAAAQIECBAgQIAAga0EDPxbybsuAQIECBAgQIAAAQIECBAoFDDwF+IqTYAAAQIECBAgQIAAAQIEthIw8G8l77oECBAgQIAAAQIECBAgQKBQwMCfh/tDEfFcXrnFlZ6MiJcXv8oLRhOQ09E63uZ+5bTNvlk1AQIECBAgsDMBA39eQ7Z6gzoN+U9HxNt5W1GpYwE57bi5HW1NTjtqpq0QIECAAAEC2wkY+PPs136DOg3406DvVD+vhyNUktMRutz+HuW0/R7aAQECBAgQILADAQN/XhPWfIPqVD+vb6NVktPROt7mfuW0zb5ZNQECBAgQILAzAQN/XkPWeIPqVD+vX6NWktNRO9/WvuW0rX5ZLQECBAgQILBTAQN/XmOq36A61c/r1ciV5HTk7rezdzltp1dWSoAAAQIECOxYwMCf15yqN6hO9fN6pFKEnEpBCwJy2kKXrJEAAQIECBDYvYCBP69FFW9Q557qPxQR7+RtRaWOBeS04+Z2tLUtc9oRo60QIECAAAECowsY+PMSkPkGdcmp/pMR8UJE3POr+fKa2XElOe24uR1tbaucdkRoKwQIECBAgACBCAN/Xgqy3qDOPdV/OCJejIgnbrYwvW4a/j0InBKQU/loQWDtnLZgYo0ECBAgQIAAgcUCBv7FZEdfcO0b1KWn+i9FxPSt/Lcf08A/Df4eBI4JyKlstCCwZk5b8LBGAgQIECBAgMBFAgb+i9gOvuiaN6iXnurfXcj0RYPpW/sf5G1Lpc4E5LSzhna6nTVy2imdbREgQIAAAQIEvihg4M9LwyVvUDNO9W/v4JWIeCYi3srblkqdCchpZw3tdDvVOe2UzbYIECBAgAABAu8XMPDnJWLpG9SsU/1pB9Mn9D8dEffztqNSpwJy2mljO9tWVU47Y7IdAgQIECBAgMBpAQN/XkLmvkF1qp9nrtJyATldbuYV6wtU5HT9XbgiAQIECBAgQGBjAQN/XgPmvEF1qp/nrdJlAnJ6mZtXrSuQmdN1V+5qBAgQIECAAIEdCRj485px6g2qU/08Z5WuE5DT6/y8eh2BrJyus1
3370pXIUCAAAECBAjsVMDAn9eYY29QnernGat0vYCcXm+oQr3AtTmtX6ErECBAgAABAgQaEDDw5zXp0BvUz0bEx2Zc4smIeCkiHjrxXJ/APwPSU84KyOlZIk/YgcA1Od3B8i2BAAECBAgQILAPAQN/Xh8OvUH9dERMf37s8XBEvBgRT5x4jk/gz+uRSu/m8bk7EHIqGXsTuCSne9uD9RAgQIAAAQIENhcw8Oe1YOkb1MxT/WlguzvE5e1MpZ4E5LSnbva7l6U57VfCzggQIECAAAECVwgY+K/Au/PSuW9QM0/1P3rzHQKPRsT0BYTp8wI8CJwSkFP5aEFgbk5b2Is1EiBAgAABAgQ2EzDw59HPeYOafar/7K3lP4iIexEx/UYADwLHBORUNloQmJPTFvZhjQQIECBAgACBTQUM/Hn8p96gVp3q3139dMI/fVHBg8AlA7+cys1eBAz8e+mEdRAgQIAAAQJNCxj489p37A3qm4mfwD/9rP7tU/1Dq38qIu7nbUulzgTktLOGdrodA3+njbUtAgQIECBAYF0BA3+e96E3qG9ExCMnLjH3E/hv/6z+sXKvR8QzEfFa3pZU6lBATjtsaodbMvB32FRbIkCAAAECBNYXMPDnmR96g3qq+is3A/pbZ5Yw51T/eZ/Sn9fIzivJaecN7mR7Bv5OGmkbBAgQIECAwLYCBv48/7mDlFP9PHOVlgvI6XIzr1hfwMC/vrkrEiBAgAABAh0KGPjzmjpnkHKqn+et0mUCcnqZm1etK2DgX9fb1QgQIECAAIFOBQz8eY09NUg51c9zVuk6ATm9zs+r1xEw8K/j7CoECBAgQIBA5wIG/rwGHxuknOrnGat0vYCcXm+oQr3AnO9EqVzF9OtNp19z6kGAAAECBAgQaFrAwJ/XvkNvUF+NiMfOXMIn8Of1QKXzAnJ63sgzthfYauCfhvynI+Lt7QmsgAABAgQIECBwvYCB/3rD9ypc8i2oWZ/A/1BETD824EHgnICcnhPy93sQWHvgnwb8adB3qr+H7lsDAQIECBAgkCZg4E+jjCWDVOap/vStpy9ExD2nUnnN7LiSnHbc3I62tubA71S/o+DYCgECBAgQIPB+AQN/XiLmDlJZp/oPR8SLEfHEzRamN63T8O9B4JSAnMpHCwJrDPxO9VtIgjUSIECAAAECVwkY+K/ie9+Lzw1S2af6L0XE9K38tx8+aCqvn71WktNeO9vXvqoHfqf6feXFbggQIECAAIEjAgb+vGicGqSqTvXvrn46sZq+tf9B3rZU6kxATjtraKfbqRr4nep3GhjbIkCAAAECBA4LGPjzknHoDepnIuIjEfHoicu8HhHPRMRrZ5Yynd4fOtW//bK5vwIwb9cqtSYgp611bMz1Vgz8TvXHzJJdEyBAgACBoQUM/Hntv+QN6vMR8dyZJdz9Wf1DT58+oX/6hOn7edtRqVMBOe20sZ1t65KcHiNwqt9ZOGyHAAECBAgQmC9g4J9vde6ZS96gOtU/p+nvqwTktEpW3UyBJTk9dV2n+pldUYsAAQIECBBoTsDAn9eyuW9Qnernmau0XEBOl5t5xfoCc3N6bGVO9dfvmSsSIECAAAECOxQw8Oc15dwbVKf6edYqXS4gp5fbeeV6AudyemolTvXX65MrESBAgAABAjsXMPDnNejUG1Sn+nnOKl0nIKfX+Xn1OgKXDPxO9dfpjasQIECAAAECDQkY+POadegN6hci4nGfwJ+HrNLVAnJ6NaECKwgsHfid6q/QFJcgQIAAAQIE2hMw8Of17NTvoXM8pgAAC3NJREFUNz92FZ/An+ev0jwBOZ3n5FnbCswd+J3qb9snVydAgAABAgR2LmDgz2vQ0kHqyYh4KSIeOrGEVyLimYh468wyPz3j1/vl7VSllgXktOXujbP2OQO/U/1x8mCnBAgQIECAwIUCBv4L4Q68bO4glXmq/9GIeDEiHo2I6QsI0xtgDwKnBORUPloQODXwO9VvoYPWSIAAAQIECOxCwMCf14Y5g1T2qf6zt5b/ICLuRcT0ZtiDwDEBOZWNFgSODfxO9VvonjUSIECAAAECuxEw8Oe14tQgVXWqf3f105vh6YsKHgQuGfjlVG72InDofvrZiPjYXhZoHQQIECBAgACBFgQM/HldOjbwv5n8s/q3T/UPrf6piLifty2VOhOQ084a2ul25nwnSqdbty0CBAgQIECAQJ6AgT/P8tAb1Dci4pETl3gnIp6eMaDf/ln9Y+Vev/mAv9fytqRShwJy2mFTO9ySgb/DptoSAQIECBAgsL6AgT/PfM6nSt++2pJP4D93qv+8T+nPa2TnleS08wZ3sj0DfyeNtA0CBAgQIEBgWwEDf57/3EHKqX6euUrLBeR0uZlXrC9g4F/f3BUJECBAgACBDgUM/HlNnTNIOdXP81bpMgE5vczNq9YVMPCv6+1qBAgQIECAQKcCBv68xp4apJzq5zmrdJ2AnF7n59XrCBj413F2FQIECBAgQKBzAQN/XoOPDVJO9fOMVbpeQE6vN1ShXsDAX2/sCgQIECBAgMAAAgb+vCYfeoP6akQ8duYSPoE/rwcqnReQ0/NGnrG9gIF/+x5YAQECBAgQINCBgIE/r4mXvEH9dET4BP68Hqh0XkBOzxt5xvYCl+R0+1VbAQECBAgQIEBgZwIG/ryGLHmD6lQ/z12lZQJyuszLs7cRWJLTbVboqgQIECBAgACBBgQM/HlNmvsG1al+nrlKywXkdLmZV6wvMDen66/MFQkQIECAAAECDQkY+POade4NqlP9PGuVLheQ08vtvHI9gXM5XW8lrkSAAAECBAgQaFjAwJ/XvFNvUJ3q5zmrdJ2AnF7n59XrCBj413F2FQIECBAgQKBzAQN/XoMPvUH9TER8JCIePXGZ1yPimYh4LW8pKhE4KiCnwtGCgIG/hS5ZIwECBAgQILB7AQN/XouO/X7zU1d4PiKey1uCSgTOCsjpWSJP2IGAgX8HTbAEAgQIECBAoH0BA39eD5cMUk7189xVWiYgp8u8PHsbAQP/Nu6uSoAAAQIECHQmYODPa+jcQcqpfp65SssF5HS5mVesL2DgX9/cFQkQIECAAIEOBQz8eU09N0g51c+zVulyATm93M4r1xMw8K9n7UoECBAgQIBAxwIG/rzmnhqknOrnOat0ncC1OX0oIt65bgleTeCsgIH/LJEnECBAgAABAgTOCxj4zxvNfcahN6hfiIjHfQL/XELPW0Hgmpw+GREvRMS9iHh7hbW6xLgCBv5xe2/nBAgQIECAQKKAgT8P0xvUPEuV6gQuyenDEfFiRDxxs6yXI2Ia/j0IVAlcktOqtahLgAABAgQIEGhWwMCf1zpvUPMsVaoTWJrTabB/KSKmb+W//Zj+fBr8PQhUCCzNacUa1CRAgAABAgQINC9g4M9roTeoeZYq1QnMzendU/27K5q+pX/61v4HdUtVeWCBuTkdmMjWCRAgQIAAAQLnBQz8543mPsMb1LlSnrelwJycHjvVv73uVyLimYh4a8vNuHa3AnNy2u3mbYwAAQIECBAgkCVg4M+SjPAGNc9SpTqBUzk9d6o/rWr6hP6nI+J+3RJVJuB+KgMECBAgQIAAgQwBA3+G4rs1DPx5lirVCRzL6ZtHflb/9kqc6tf1ReX3C7ifSgQBAgQIECBAIEHAwJ+AeFPCG9Q8S5XqBA7l9I2IeOTEJZ3q1/VD5cMC7qeSQYAAAQIECBBIEDDwJyAa+PMQVSoXODRInbqoU/3ylrjAAQEDv1gQIECAAAECBBIEDPwJiAb+PESVygXmDvxO9ctb4QInBAz84kGAAAECBAgQSBAw8CcgGvjzEFUqF5gz8DvVL2+DC5wRMPCLCAECBAgQIEAgQcDAn4Bo4M9DVKlc4NTA71S/nN8FZgoY+GdCeRoBAgQIECBA4JSAgT8vH96g5lmqVCdwbOB3ql9nrvJyAffT5WZeQYAAAQIECBD4gICBPy8U3qDmWapUJ3Aop69GxGN1l1SZwGIB99PFZF5AgAABAgQIEPiggIE/LxXeoOZZqlQnIKd1tirnCchpnqVKBAgQIECAwMACBv685nuDmmepUp2AnNbZqpwnIKd5lioRIECAAAECAwsY+POa7w1qnqVKdQJyWmercp6AnOZZqkSAAAECBAgMLGDgz2u+N6h5lirVCchpna3KeQJymmepEgECBAgQIDCwgIE/r/neoOZZqlQnIKd1tirnCchpnqVKBAgQIECAwMACBv685nuDmmepUp2AnNbZqpwnIKd5lioRIECAAAECAwsY+POa7w1qnqVKdQJyWmercp6AnOZZqkSAAAECBAgMLGDgz2u+N6h5lirVCchpna3KeQJymmepEgECBAgQIDCwgIE/r/neoOZZqlQnIKd1tirnCchpnqVKBAgQIECAwMACBv685nuDmmepUp2AnNbZqpwnIKd5lioRIECAAAECAwsY+POa7w1qnqVKdQJyWmercp6AnOZZqkSAAAECBAgMLGDgz2u+N6h5lirVCchpna3KeQJymmepEgECBAgQIDCwgIE/r/neoOZZqlQnIKd1tirnCchpnqVKBAgQIECAwMACBv685nuDmmepUp2AnNbZqpwnIKd5lioRIECAAAECAwsY+Aduvq0TIECAAAECBAgQIECAQL8CBv5+e2tnBAgQIECAAAECBAgQIDCwgIF/4ObbOgECBAgQIECAAAECBAj0K2Dg77e3dkaAAAECBAgQIECAAAECAwsY+Aduvq0TIECAAAECBAgQIECAQL8CBv5+e2tnBAgQIECAAAECBAgQIDCwgIF/4ObbOgECBAgQIECAAAECBAj0K2Dg77e3dkaAAAECBAgQIECAAAECAwsY+Aduvq0TIECAAAECBAgQIECAQL8CBv5+e2tnBAgQIECAAAECBAgQIDCwgIF/4ObbOgECBAgQIECAAAECBAj0K2Dg77e3dkaAAAECBAgQIECAAAECAwsY+Aduvq0TIECAAAECBAgQIECAQL8CBv5+e2tnBAgQIECAAAECBAgQIDCwgIF/4ObbOgECBAgQIECAAAECBAj0K2Dg77e3dkaAAAECBAgQIECAAAECAwsY+Aduvq0TIECAAAECBAgQIECAQL8CBv5+e2tnBAgQIECAAAECBAgQIDCwgIF/4ObbOgECBAgQIECAAAECBAj0K2Dg77e3dkaAAAECBAgQIECAAAECAwsY+Aduvq0TIECAAAECBAgQIECAQL8CBv5+e2tnBAgQIECAAAECBAgQIDCwgIF/4ObbOgECBAgQIECAAAECBAj0K2Dg77e3dkaAAAECBAgQIECAAAECAwsY+Aduvq0TIECAAAECBAgQIECAQL8CBv5+e2tnBAgQIECAAAECBAgQIPD/t1/HBAAAAAjC+re2hyyC8yIsIPjD55tOgAABAgQIECBAgAABAr8Cgv/3W8sIECBAgAABAgQIECBAICwg+MPnm06AAAECBAgQIECAAAECvwKC//dbywgQIECAAAECBAgQIEAgLCD4w+ebToAAAQIECBAgQIAAAQK/AoL/91vLCBAgQIAAAQIECBAgQCA
3370sIPjD55tOgAABAgQIECBAgAABAr8Cgv/3W8sIECBAgAABAgQIECBAICwg+MPnm06AAAECBAgQIECAAAECvwKC//dbywgQIECAAAECBAgQIEAgLCD4w+ebToAAAQIECBAgQIAAAQK/AgOYR34g/YMI8gAAAABJRU5ErkJggg==",iconMapping:{0:{x:0,y:0,width:170,height:170,anchorX:85,anchorY:133,mask:!0},1:{x:170,y:0,width:170,height:170,anchorX:85,anchorY:133,mask:!0},2:{x:340,y:0,width:170,height:170,anchorX:85,anchorY:133,mask:!0},3:{x:510,y:0,width:170,height:170,anchorX:85,anchorY:133,mask:!0},4:{x:680,y:0,width:170,height:170,anchorX:85,anchorY:133,mask:!0},5:{x:850,y:0,width:170,height:170,anchorX:85,anchorY:133,mask:!0},6:{x:0,y:170,width:170,height:170,anchorX:85,anchorY:133,mask:!0},7:{x:170,y:170,width:170,height:170,anchorX:85,anchorY:133,mask:!0},8:{x:340,y:170,width:170,height:170,anchorX:85,anchorY:133,mask:!0},9:{x:510,y:170,width:170,height:170,anchorX:85,anchorY:133,mask:!0},10:{x:680,y:170,width:170,height:170,anchorX:85,anchorY:133,mask:!0},11:{x:850,y:170,width:170,height:170,anchorX:85,anchorY:133,mask:!0},12:{x:0,y:340,width:170,height:170,anchorX:85,anchorY:133,mask:!0}
3370,13:{x:170,y:340,width:170,height:170,anchorX:85,anchorY:133,mask:!0},14:{x:340,y:340,width:170,height:170,anchorX:85,anchorY:133,mask:!0},15:{x:510,y:340,width:170,height:170,anchorX:85,anchorY:133,mask:!0},16:{x:680,y:340,width:170,height:170,anchorX:85,anchorY:133,mask:!0},17:{x:850,y:340,width:170,height:170,anchorX:85,anchorY:133,mask:!0},18:{x:0,y:510,width:170,height:170,anchorX:85,anchorY:133,mask:!0},19:{x:170,y:510,width:170,height:170,anchorX:85,anchorY:133,mask:!0},20:{x:340,y:510,width:170,height:170,anchorX:85,anchorY:133,mask:!0}},iconBounds:[0,51.444]}]]),wh={image:{type:"object",value:null},image2:{type:"object",value:null},imageSmoothing:{type:"number",value:0},imageInterpolation:{type:"object",value:Lc.CUBIC},imageWeight:{type:"number",value:0},imageType:{type:"object",value:hs.SCALAR},imageUnscale:{type:"array",value:null},imageMinValue:{type:"object",value:null},imageMaxValue:{type:"object",value:null},bounds:{type:"array",value:[-180,-90,180,90],compare:!0},minZoom:{type:"object",value:null},maxZoom:{type:"object",value:null},style:{type:"object",value:xw.VALUE},density:{type:"number",value:0},unitFormat:{type:"object",value:null},textFormatFunction:{type:"function",value:AQ},textFontFamily:{type:"object",value:VM},textSize:{type:"number",value:12},textColor:{type:"color",value:WM},textOutlineWidth:{type:"number",value:1},textOutlineColor:{type:"color",value:$M},iconBounds:{type:"array",value:null},iconSize:{type:"object",value:40},iconColor:{type:"color",value:_ye},palette:{type:"object",value:null}};let Aw=class extends Ns{renderLayers(){const{viewport:e}=this.context,{props:n,visiblePoints:r}=this.state;if(!n||!r)return[];const{style:i,unitFormat:s,textFormatFunction:o,textFontFamily:a,textSize:l,textColor:c,textOutlineWidth:u,textOutlineColor:h,iconSize:d,iconColor:m}=Gn(n,wh),{paletteScale:y}=this.state;if(KB.has(i)){const{iconStyle:v,iconAtlasTexture:b}=this.state;if(!v||!b)return[];const x=Object.keys(v.iconMapping).length,T=n.iconBounds??v.iconBounds??[0,0],E=T[1]-T[0],C=O=>(O-T[0])/E,I=Array.isArray(d)?d[1]-d[0]:0;return[new Nm(this.getSubLayerProps({id:"icon",data:r,getPosition:O=>O.geometry.coordinates,getIcon:O=>`${Math.min(Math.max(Math.floor(C(O.properties.value)*x),0),x-1)}`,getSize:O=>Array.isArray(d)?d[0]+C(O.properties.value)*I:d,getColor:O=>y?vw(y(O.properties.value).rgba()):m,getAngle:O=>Ju(e,O.properties.direction?360-O.properties.direction:0),iconAtlas:b,iconMapping:v.iconMapping,billboard:!1,parameters:{cullMode:"front",depthCompare:"always",...this.props.parameters}}))]}return[new ed(this.getSubLayerProps({id:"text",data:r,getPosition:v=>v.geometry.coordinates,getText:v=>o(v.properties.value,s),getSize:l,getColor:v=>y?vw(y(v.properties.value).rgba()):c,getAngle:Ju(e,0),outlineWidth:u,outlineColor:h,fontFamily:a,fontSettings:{sdf:!0},billboard:!1,parameters:{cullMode:"front",depthCompare:"always",...this.props.parameters}}))]}shouldUpdateState(e){return super.shouldUpdateState(e)||e.changeFlags.viewportChanged}initializeState(){this._updatePositions()}updateState(e){const{image:n,image2:r,imageSmoothing:i,imageInterpolation:s,imageWeight:o,imageType:a,imageUnscale:l,imageMinValue:c,imageMaxValue:u,minZoom:h,maxZoom:d,style:m,density:y,unitFormat:v,textFormatFunction:b,textFontFamily:x,textSize:T,textColor:E,textOutlineWidth:C,textOutlineColor:I,iconSize:O,iconColor:N,palette:U,visible:F}=e.props;super.updateState(e),F?(this.state.iconStyle&&m===e.oldProps.style||this._updateIconStyle(),(y!==e.oldProps.density||e.changeFlags.viewportChanged)&&this._updatePositions(),n===e.oldProps.image&&r===e.oldProps.image2&&i===e.oldProps.imageSmoothing&&s===e.oldProps.imageInterpolation&&o===e.oldProps.imageWeight&&a===e.oldProps.imageType&&l===e.oldProps.imageUnscale&&c===e.oldProps.imageMinValue&&u===e.oldProps.imageMaxValue&&F===e.oldProps.visible||this._updateFeatures(),(h!==e.oldProps.minZoom||d!==e.oldProps.maxZoom||e.changeFlags.viewportChanged)&&this._updateVisibleFeatures(),U!==e.oldProps.palette&&this._updatePalette(),v===e.oldProps.unitFormat&&b===e.oldProps.textFormatFunction&&x===e.oldProps.textFontFamily&&T===e.oldProps.textSize&&E===e.oldProps.textColor&&C===e.oldProps.textOutlineWidth&&I===e.oldProps.textOutlineColor&&O===e.oldProps.iconSize&&N===e.oldProps.iconColor||this._redrawVisibleFeatures(),this.setState({props:e.props})):this.setState({points:void 0,visiblePoints:void 0})}async _updateIconStyle(){const{device:e}=this.context,{style:n}=Gn(this.props,wh),r=KB.get(n);if(!r)return void this.setState({iconStyle:void 0,iconAtlasTexture:void 0});this.setState({iconStyle:r});const i=af(e,await rA(r.iconAtlas));this.setState({iconAtlasTexture:i})}_updatePositions(){const{viewport:e}=this.context,{density:n}=Gn(this.props,wh),r=Gye(e,n+3);this.setState({positions:r}),this._updateFeatures()}_updateFeatures(){const{image:e,image2:n,imageSmoothing:r,imageInterpolation:i,imageWeight:s,imageType:o,imageUnscale:a,imageMinValue:l,imageMaxValue:c,bounds:u}=Gn(this.props,wh),{positions:h}=this.state;if(!e||!h)return;const d=Oye({image:e,image2:n,imageSmoothing:r,imageInterpolation:i,imageWeight:s,imageType:o,imageUnscale:a,imageMinValue:l,imageMaxValue:c},u,h).features.filter((m=>!isNaN(m.properties.value)));this.setState({points:d}),this._updateVisibleFeatures()}_updateVisibleFeatures(){const{viewport:e}=this.context,{minZoom:n,maxZoom:r}=Gn(this.props,wh),{points:i}=this.state;if(!i)return;let s;s=Dm(e,n,r)?i:[],this.setState({visiblePoints:s})}
3370_updatePalette(){const{palette:e}=Gn(this.props,wh);if(!e)return this.setState({paletteScale:void 0}),void this._redrawVisibleFeatures();const n=Cy(e);this.setState({paletteScale:n}),this._redrawVisibleFeatures()}_redrawVisibleFeatures(){this.setState({visiblePoints:Array.isArray(this.state.visiblePoints)?Array.from(this.state.visiblePoints):this.state.visiblePoints})}};Aw.layerName="GridCompositeLayer",Aw.defaultProps=wh;const Zye={...Aw.defaultProps};let tI=class extends Ns{renderLayers(){const{props:e}=this.state;return e?[new Aw(this.props,this.getSubLayerProps({id:"composite"}))]:[]}updateState(e){const{image:n,imageUnscale:r}=e.props;if(super.updateState(e),n&&r&&!(n.data instanceof Uint8Array||n.data instanceof Uint8ClampedArray))throw new Error("imageUnscale can be applied to Uint8 data only");this.setState({props:e.props})}};tI.layerName="GridLayer",tI.defaultProps=Zye;const GB="uniform particleUniforms{float q;vec2 r;float s;vec4 t;float u;float v;float w;float x;float y;float z;}particle;",ZB="q",JB="r",eL="s",tL="t",nL="u",rL="v",iL="w",sL="x",oL="y",aL="z",lL={name:"particle",vs:GB,fs:GB,uniformTypes:{[ZB]:"f32",[JB]:"vec2<f32>",[eL]:"f32",[tL]:"vec4<f32>",[nL]:"f32",[rL]:"f32",[iL]:"f32",[sL]:"f32",[oL]:"f32",[aL]:"f32"},getUniforms:function(t={}){return{[ZB]:t.viewportGlobe?1:0,[JB]:t.viewportGlobeCenter??[0,0],[eL]:t.viewportGlobeRadius??0,[tL]:t.viewportBounds??[0,0,0,0],[nL]:t.viewportZoomChangeFactor??0,[rL]:t.numParticles,[iL]:t.maxAge,[sL]:t.speedFactor,[oL]:t.time,[aL]:t.seed}}},yS="sourcePosition",bS="targetPosition",_S="sourceColor",wS="targetColor",W1={imageTexture:{type:"object",value:null},imageTexture2:{type:"object",value:null},imageSmoothing:{type:"number",value:0},imageInterpolation:{type:"object",value:Lc.CUBIC},imageWeight:{type:"number",value:0},imageType:{type:"object",value:hs.VECTOR},imageUnscale:{type:"array",value:null},imageMinValue:{type:"object",value:null},imageMaxValue:{type:"object",value:null},bounds:{type:"array",value:[-180,-90,180,90],compare:!0},minZoom:{type:"object",value:null},maxZoom:{type:"object",value:15},palette:{type:"object",value:null},color:{type:"color",value:xQ},numParticles:{type:"number",min:1,max:1e6,value:5e3},maxAge:{type:"number",min:1,max:255,value:10},speedFactor:{type:"number",min:0,max:50,value:1},width:{type:"number",value:1},animate:!0,wrapLongitude:!0};let Ew=class extends EM{getShaders(){var n,r,i,s,o;const e=super.getShaders();return{...e,inject:{...e.inject,"vs:#decl":(((n=e.inject)==null?void 0:n["vs:#decl"])||"")+`
3371          in float instanceOpacities;
3372          out float drop;
3373          const float DROP_POSITION_Z = -1.;
3374        `,"vs:#main-start":(((r=e.inject)==null?void 0:r["vs:#main-start"])||"")+`
3375          drop = float(instanceSourcePositions.z == DROP_POSITION_Z || instanceTargetPositions.z == DROP_POSITION_Z);
3376        `,"vs:DECKGL_FILTER_COLOR":(((i=e.inject)==null?void 0:i["vs:DECKGL_FILTER_COLOR"])||"")+`
3377          color.a = color.a * instanceOpacities;
3378        `,"fs:#decl":(((s=e.inject)==null?void 0:s["fs:#decl"])||"")+`
3379          in float drop;
3380        `,"fs:#main-start":(((o=e.inject)==null?void 0:o["fs:#main-start"])||"")+`
3381          if (drop > 0.5) discard;
3382        `}}}initializeState(){super.initializeState(),this._setupTransformFeedback();const e=this.getAttributeManager();e.remove(["instanceSourcePositions","instanceTargetPositions","instanceColors","instanceWidths"]),e.addInstanced({instanceSourcePositions:{size:3,type:"float32",noAlloc:!0},instanceTargetPositions:{size:3,type:"float32",noAlloc:!0},instanceColors:{size:4,type:"float32",noAlloc:!0},instanceOpacities:{size:1,type:"float32",noAlloc:!0}})}updateState(e){const{imageType:n,numParticles:r,maxAge:i,width:s,palette:o}=e.props;super.updateState(e),n===hs.VECTOR&&r&&i&&s?(n===e.oldProps.imageType&&r===e.oldProps.numParticles&&i===e.oldProps.maxAge&&s===e.oldProps.width||this._setupTransformFeedback(),o!==e.oldProps.palette&&this._updatePalette()):this._deleteTransformFeedback()}finalizeState(e){this._deleteTransformFeedback(),super.finalizeState(e)}draw(e){const{initialized:n}=this.state;if(!n)return;const{viewport:r}=this.context,{model:i}
3382=this.state,{minZoom:s,maxZoom:o,width:a,animate:l}=Gn(this.props,W1),{sourcePositions:c,targetPositions:u,sourceColors:h,opacities:d,transform:m}=this.state;c&&u&&h&&d&&m&&i&&Dm(r,s,o)&&(i.setAttributes({instanceSourcePositions:c,instanceTargetPositions:u,instanceColors:h,instanceOpacities:d}),i.setConstantAttributes({instanceSourcePositions64Low:new Float32Array([0,0,0]),instanceTargetPositions64Low:new Float32Array([0,0,0]),instanceWidths:new Float32Array([a])}),i.setParameters({...i.parameters,cullMode:"front",depthCompare:"always",...this.props.parameters}),super.draw(e),l&&this.step())}_setupTransformFeedback(){const{device:e}=this.context,{initialized:n}=this.state;n&&this._deleteTransformFeedback();const{numParticles:r,maxAge:i}=Gn(this.props,W1),s=r*i,o=r*(i-1),a=e.createBuffer(new Float32Array(3*s)),l=e.createBuffer(new Float32Array(3*s)),c=e.createBuffer(new Float32Array(4*s)),u=e.createBuffer(new Float32Array(4*s)),h=e.createBuffer(new Float32Array(new Array(s).fill(void 0).map(((m,y)=>1-Math.floor(y/r)/i)))),d=new em(e,{vs:`#version 300 es
3383#define SHADER_NAME  particle-line-layer-update-vertex-shader
3384#ifdef GL_ES
3385precision highp float;
3386#endif
3387vec4 AA(sampler2D AB,vec2 AC,vec2 AD,vec2 AE){vec2 uv=(AD+AE+0.5)/AC;return texture(AB,uv);}const vec4 AF=vec4(3.,-6.,0.,4.)/6.;const vec4 AG=vec4(-1.,6.,-12.,8.)/6.;vec4 AH(float J){return vec4(J*J*J,J*J,J,1.);}vec4 AI(vec4 AJ,vec4 AK,vec4 AL,vec4 AM,float AN){vec4 O=AJ*dot(AG,AH(AN+1.))+AK*dot(AF,AH(AN))+AL*dot(AF,AH(1.-AN))+AM*dot(AG,AH(2.-AN));O.a=(AJ.a>0.&&AK.a>0.&&AL.a>0.&&AM.a>0.)?max(max(max(AJ.a,AK.a),AL.a),AM.a):0.;return O;}vec4 AO(sampler2D AB,vec2 AC,vec2 uv){vec2 AP=uv*AC-0.5;vec2 AD=floor(AP);vec2 AQ=fract(AP);return AI(AI(AA(AB,AC,AD,vec2(-1,-1)),AA(AB,AC,AD,vec2(0,-1)),AA(AB,AC,AD,vec2(1,-1)),AA(AB,AC,AD,vec2(2,-1)),AQ.x),AI(AA(AB,AC,AD,vec2(-1,0)),AA(AB,AC,AD,vec2(0,0)),AA(AB,AC,AD,vec2(1,0)),AA(AB,AC,AD,vec2(2,0)),AQ.x),AI(AA(AB,AC,AD,vec2(-1,1)),AA(AB,AC,AD,vec2(0,1)),AA(AB,AC,AD,vec2(1,1)),AA(AB,AC,AD,vec2(2,1)),AQ.x),AI(AA(AB,AC,AD,vec2(-1,2)),AA(AB,AC,AD,vec2(0,2)),AA(AB,AC,AD,vec2(1,2)),AA(AB,AC,AD,vec2(2,2)),AQ.x),AQ.y);}vec4 AR(sampler2D AB,vec2 AC,vec2 uv){vec2 AP=uv*AC-0.5;vec2 AD=floor(AP);vec2 AQ=fract(AP);return mix(mix(AA(AB,AC,AD,vec2(0,0)),AA(AB,AC,AD,vec2(1,0)),AQ.x),mix(AA(AB,AC,AD,vec2(0,1)),AA(AB,AC,AD,vec2(1,1)),AQ.x),AQ.y);}vec4 AS(sampler2D AB,vec2 AC,vec2 uv){vec2 AP=uv*AC-0.5;vec2 AD=floor(AP+0.5);return AA(AB,AC,AD,vec2(0,0));}vec4 AT(sampler2D AB,vec2 AC,float a,vec2 uv){if(a==2.){return AO(AB,AC,uv);}if(a==1.){return AR(AB,AC,uv);}else{return AS(AB,AC,uv);}}vec4 AU(sampler2D AB,sampler2D AV,vec2 AC,float a,float b,bool B,vec2 uv){vec2 AW;AW.x=B?uv.x+0.5/AC.x:mix(0.+0.5/AC.x,1.-0.5/AC.x,uv.x);AW.y=mix(0.+0.5/AC.y,1.-0.5/AC.y,uv.y);if(b>0.){vec4 AX=AT(AB,AC,a,AW);vec4 AY=AT(AV,AC,a,AW);return mix(AX,AY,b);}else{return AT(AB,AC,a,AW);}}vec4 AZ(sampler2D AB,sampler2D AV,vec2 Y,float Z,float a,float b,bool B,vec2 uv){float Aa=1.+max(0.,Z);vec2 AC=Y/Aa;return AU(AB,AV,AC,a,b,B,uv);}float Ab(float K,float J){return J==0.?sign(K)*F/2.:atan(K,J);}bool Ac(float k){uint Ad=floatBitsToUint(k);return(Ad&0x7fffffffu)>0x7f800000u;}bool Ae(vec4 AX,vec2 d){if(d[0]<d[1]){return AX.a>=1.;}else{return!Ac(AX.x);}}float Af(vec4 AX,float c,vec2 d){if(c==1.){return 0.;}else{if(d[0]<d[1]){return mix(d[0],d[1],AX.x);}else{return AX.x;}}}vec2 Ag(vec4 AX,float c,vec2 d){if(c==1.){if(d[0]<d[1]){return mix(vec2(d[0]),vec2(d[1]),AX.xy);}else{return AX.xy;}}else{return vec2(0.);}}float Ah(vec4 AX,float c,vec2 d){if(c==1.){vec2 k=Ag(AX,c,d);return length(k);}else{return Af(AX,c,d);}}float Ai(vec4 AX,float c,vec2 d){if(c==1.){vec2 k=Ag(AX,c,d);return mod((360.-(Ab(k.y,k.x)/F*180.+180.))-270.,360.)/360.;}else{return 0.;}}in vec3 sourcePosition;in vec4 sourceColor;out vec3 targetPosition;out vec4 targetColor;const float Aj=-1.;const vec4 Ak=vec4(0);const float Al=6370972.;vec2 Am(vec2 An,float Ao,float Ap){float Aq=Ao/Al;float Ar=radians(Ap);float As=radians(An.y);float At=radians(An.x);float Au=sin(As)*cos(Aq)+cos(As)*sin(Aq)*cos(Ar);float Av=asin(Au);float K=sin(Ar)*sin(Aq)*cos(As);float J=cos(Aq)-sin(As)*Au;float Aw=At+Ab(K,J);float Ax=degrees(Av);float Ay=degrees(Aw);return vec2(Ay,Ax);}float Az(float BA){float BB=mod(BA+180.,360.)-180.;return BB;}float Az(float BA,float BC){float BB=Az(BA);if(BB<BC){BB+=360.;}return BB;}float BD(vec2 z){return fract(sin(dot(z.xy,vec2(12.9898,78.233)))*43758.5453);}vec2 BE(vec2 z){return vec2(BD(z+1.3),BD(z+2.1));}vec2 BF(vec2 BG){if(particle.q==1.){BG.x+=0.0001;BG.x=sqrt(BG.x);float Ao=BG.x*particle.s;float Ap=BG.y*360.;return Am(particle.r,Ao,Ap);}else{BG.y=smoothstep(0.,1.,BG.y);vec2 BH=particle.t.xy;vec2 BI=particle.t.zw;return mix(BH,BI,BG);}}vec2 BJ(vec2 BK,vec2 BL){float BM=cos(radians(BK.y));vec2 AE;if(particle.q==1.){AE=vec2(BL.x/BM,BL.y);}else{AE=vec2(BL.x,BL.y*BM);}return BK+AE;}bool BN(vec2 BK,vec4 A){vec2 BO=A.xy;vec2 BP=A.zw;float BA=Az(BK.x,BO.x);float Ax=BK.y;return(BO.x<=BA&&BA<=BP.x&&BO.y<=Ax&&Ax<=BP.y);}void main(){float BQ=mod(float(gl_VertexID),particle.v);float BR=floor(float(gl_VertexID)/particle.v);if(BR>0.){return;}
3387if(sourcePosition.z==Aj){vec2 BS=vec2(BQ*particle.z/particle.v);vec2 BG=BE(BS);vec2 BK=BF(BG);targetPosition.xy=BK;targetPosition.x=Az(targetPosition.x);targetColor=Ak;return;}if(particle.u>1.&&mod(BQ,particle.u)>=1.){targetPosition.xy=sourcePosition.xy;targetPosition.z=Aj;targetColor=Ak;return;}if(abs(mod(BQ,particle.w+2.)-mod(particle.y,particle.w+2.))<1.){targetPosition.xy=sourcePosition.xy;targetPosition.z=Aj;targetColor=Ak;return;}if(!BN(sourcePosition.xy,bitmap2.A)){targetPosition.xy=sourcePosition.xy;targetColor=Ak;return;}vec2 uv=Q(sourcePosition.xy);vec4 AX=AZ(W,X,raster.Y,raster.Z,raster.a,raster.b,bitmap2.B,uv);if(!Ae(AX,raster.d)){targetPosition.xy=sourcePosition.xy;targetColor=Ak;return;}float k=Ah(AX,raster.c,raster.d);if((!Ac(raster.e)&&k<raster.e)||(!Ac(raster.f)&&k>raster.f)){targetPosition.xy=sourcePosition.xy;targetColor=Ak;return;}vec2 BL=Ag(AX,raster.c,raster.d)*particle.x;targetPosition.xy=BJ(sourcePosition.xy,BL);targetPosition.x=Az(targetPosition.x);targetColor=sourceColor;targetColor=l(g,palette.h,palette.i,k);}`,modules:[sm,om,am,lL],vertexCount:r,attributes:{[yS]:a,[_S]:c},bufferLayout:[{name:yS,format:"float32x3"},{name:_S,format:"float32x4"}],feedbackBuffers:{[bS]:l,[wS]:u},varyings:[bS,wS]});this.setState({initialized:!0,numInstances:s,numAgedInstances:o,sourcePositions:a,targetPositions:l,sourceColors:c,targetColors:u,opacities:h,transform:d,previousViewportZoom:0,previousTime:0})}_runTransformFeedback(){const{initialized:e}=this.state;if(!e)return;const{device:n,viewport:r,timeline:i}=this.context,{imageTexture:s,imageTexture2:o,imageSmoothing:a,imageInterpolation:l,imageWeight:c,imageType:u,imageUnscale:h,imageMinValue:d,imageMaxValue:m,bounds:y,color:v,numParticles:b,maxAge:x,speedFactor:T}=Gn(this.props,W1),{paletteTexture:E,paletteBounds:C,numAgedInstances:I,sourcePositions:O,targetPositions:N,sourceColors:U,targetColors:F,transform:H,previousViewportZoom:W,previousTime:z}=this.state;if(!(s&&typeof I=="number"&&O&&N&&U&&F&&H))return;const V=i.getTime();if(typeof z=="number"&&V<z+1e3/30)return;const M=Ca(r),K=Ca(r)?HM(r):void 0,j=Ca(r)?RQ(r):void 0,q=MQ(r)?kQ(r):void 0,Y=2**(4*(typeof W=="number"?W-lv(r):0)),X=T/2**(lv(r)+7);H.model.shaderInputs.setProps({[sm.name]:{viewportGlobe:M,bounds:y,_imageCoordinateSystem:Wt.LNGLAT},[om.name]:{imageTexture:s??fs(n),imageTexture2:o??fs(n),imageSmoothing:a,imageInterpolation:l,imageWeight:c,imageType:u,imageUnscale:h,imageMinValue:d,imageMaxValue:m},[am.name]:{paletteTexture:E??fs(n),paletteBounds:C,paletteColor:v},[lL.name]:{viewportGlobe:M,viewportGlobeCenter:K,viewportGlobeRadius:j,viewportBounds:q,viewportZoomChangeFactor:Y,numParticles:b,maxAge:x,speedFactor:X,time:V,seed:Math.random()}}),H.run({clearColor:!1,clearDepth:!1,clearStencil:!1,depthReadOnly:!0,stencilReadOnly:!0});const te=n.createCommandEncoder();te.copyBufferToBuffer({sourceBuffer:O,sourceOffset:0,destinationBuffer:N,destinationOffset:4*b*3,size:4*I*3}),te.copyBufferToBuffer({sourceBuffer:U,sourceOffset:0,destinationBuffer:F,destinationOffset:4*b*4,size:4*I*4}),te.finish(),te.destroy(),this._swapTransformFeedback(),this.state.previousViewportZoom=lv(r),this.state.previousTime=V}_swapTransformFeedback(){const{sourcePositions:e,targetPositions:n,sourceColors:r,targetColors:i,transform:s}=this.state;e&&n&&r&&i&&s&&(this.state.sourcePositions=n,this.state.targetPositions=e,this.state.sourceColors=i,this.state.targetColors=r,s.model.setAttributes({[yS]:n,[_S]:i}),s.transformFeedback.setBuffers({[bS]:e,[wS]:r}))}_resetTransformFeedback(){const{initialized:e}=this.state;if(!e)return;const{numInstances:n,sourcePositions:r,targetPositions:i,sourceColors:s,targetColors:o}=this.state;typeof n=="number"&&r&&i&&s&&o&&(r.write(new Float32Array(3*n)),i.write(new Float32Array(3*n)),s.write(new Float32Array(4*n)),o.write(new Float32Array(4*n)))}_deleteTransformFeedback(){const{initialized:e}=this.state;if(!e)return;const{sourcePositions:n,targetPositions:r,sourceColors:i,targetColors:s,opacities:o,transform:a}=this.state;n&&r&&i&&s&&o&&a&&(n.destroy(),r.destroy(),i.destroy(),s.destroy(),o.destroy(),a.destroy(),this.setState({initialized:!1,sourcePositions:void 0,targetPositions:void 0,sourceColors:void 0,targetColors:void 0,opacities:void 0,transform:void 0}))}
3387_updatePalette(){const{device:e}=this.context,{palette:n}=Gn(this.props,W1);if(!n)return void this.setState({paletteTexture:void 0,paletteBounds:void 0});const r=Cy(n),{paletteBounds:i,paletteTexture:s}=qM(e,r);this.setState({paletteTexture:s,paletteBounds:i})}step(){this._runTransformFeedback(),this.setNeedsRedraw()}clear(){this._resetTransformFeedback(),this.setNeedsRedraw()}};Ew.layerName="ParticleLineLayer",Ew.defaultProps=W1;const Jye={...Ew.defaultProps,imageTexture:void 0,imageTexture2:void 0,image:{type:"object",value:null},image2:{type:"object",value:null}};let nI=class extends Ns{renderLayers(){const{device:e}=this.context,{props:n,imageTexture:r,imageTexture2:i}=this.state;return n&&r?[new Ew(this.props,this.getSubLayerProps({id:"line",data:[],imageTexture:r,imageTexture2:i,image:fs(e),image2:fs(e)}))]:[]}updateState(e){const{image:n,image2:r,imageUnscale:i,bounds:s}=e.props;if(super.updateState(e),n&&i&&!(n.data instanceof Uint8Array||n.data instanceof Uint8ClampedArray))throw new Error("imageUnscale can be applied to Uint8 data only");if(n!==e.oldProps.image||r!==e.oldProps.image2){const{device:o}=this.context,{image:a,image2:l}=this.props,c=a?af(o,a,Mc(s)):null,u=l?af(o,l,Mc(s)):null;this.setState({imageTexture:c,imageTexture2:u})}this.setState({props:e.props})}};nI.layerName="ParticleLayer",nI.defaultProps=Jye;function Py(t,e){e===void 0&&(e={});var n=e.insertAt;if(t&&typeof document<"u"){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css",n==="top"&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=t:i.appendChild(document.createTextNode(t))}}Py(".weatherlayers-legend-control{margin:10px;pointer-events:auto}.weatherlayers-legend-control>div{background:hsla(0,0%,100%,.5);color:rgba(0,0,0,.75);display:inline-block;font-family:Helvetica Neue,Arial,Helvetica,sans-serif;font-size:12px;line-height:14px;width:100%}.weatherlayers-legend-control header,.weatherlayers-legend-control main{margin:5px 10px}.weatherlayers-legend-control header{font-weight:700}.weatherlayers-legend-control__legend{margin-top:5px;vertical-align:middle;width:100%}");Py(`.weatherlayers-tooltip-control{margin:10px;pointer-events:auto}.weatherlayers-tooltip-control>div{align-items:center;background:hsla(0,0%,100%,.5);color:rgba(0,0,0,.75);display:inline-flex;font-family:Helvetica Neue,Arial,Helvetica,sans-serif;font-size:12px;line-height:20px;padding:0 5px;white-space:nowrap}.weatherlayers-tooltip-control.follow-cursor{margin:0;pointer-events:none;position:absolute;z-index:1}.weatherlayers-tooltip-control.follow-cursor>div{position:absolute}.leaflet-map-pane .weatherlayers-tooltip-control.follow-cursor{z-index:101}.weatherlayers-tooltip-control.follow-cursor:before{content:"";height:0;position:absolute;width:0}.weatherlayers-tooltip-control.follow-cursor[data-follow-cursor-placement=BOTTOM]:before{border-bottom:5px solid hsla(0,0%,100%,.5);border-left:5px solid transparent;border-right:5px solid transparent;left:calc(50% - 5px);top:-5px}.weatherlayers-tooltip-control.follow-cursor[data-follow-cursor-placement=TOP]:before{border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid hsla(0,0%,100%,.5);left:calc(50% - 5px);top:0}.weatherlayers-tooltip-control.follow-cursor[data-follow-cursor-placement=RIGHT]:before{border-bottom:5px solid transparent;border-right:5px solid hsla(0,0%,100%,.5);border-top:5px solid transparent;left:-5px;top:calc(50% - 5px)}.weatherlayers-tooltip-control.follow-cursor[data-follow-cursor-placement=LEFT]:before{border-bottom:5px solid transparent;border-left:5px solid hsla(0,0%,100%,.5);border-top:5px solid transparent;left:0;top:calc(50% - 5px)}.weatherlayers-tooltip-control .weatherlayers-tooltip-control__direction{align-items:center;display:inline-flex;margin-left:4px}.weatherlayers-tooltip-control .weatherlayers-tooltip-control__direction-icon{background:no-repeat 50%/contain;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30' style='enable-background:new 0 0 30 30' xml:space='preserve'%3E%3Cpath d='M3.74 14.5c0-2.04.51-3.93 1.52-5.66s2.38-3.1 4.11-4.11 3.61-1.51 5.64-1.51c1.52 0 2.98.3 4.37.89s2.58 1.4 3.59 2.4 1.81 2.2 2.4 3.6.89 2.85.89 4.39c0 1.52-.3 2.98-.89 4.37s-1.4 2.59-2.4 3.59-2.2 1.8-3.59 2.39-2.84.89-4.37.89c-1.53 0-3-.3-4.39-.89s-2.59-1.4-3.6-2.4-1.8-2.2-2.4-3.58-.88-2.84-.88-4.37zm2.48 0c0 2.37.86 4.43 2.59 6.18 1.73 1.73 3.79 2.59 6.2 2.59 1.58 0 3.05-.39 4.39-1.18s2.42-1.85 3.21-3.2 1.19-2.81 1.19-4.39-.4-3.05-1.19-4.4-1.86-2.42-3.21-3.21-2.81-1.18-4.39-1.18-3.05.39-4.39 1.18S8.2 8.75 7.4 10.1s-1.18 2.82-1.18 4.4zm4.89 5.85 3.75-13.11c.01-.
33871.06-.15.15-.15s.14.05.15.15l3.74 13.11c.04.11.03.19-.02.25s-.13.06-.24 0l-3.47-1.3c-.1-.04-.2-.04-.29 0l-3.5 1.3c-.1.06-.17.06-.21 0s-.08-.15-.06-.25z'/%3E%3C/svg%3E");display:inline-block;height:20px;opacity:.75;vertical-align:middle;width:20px}.weatherlayers-tooltip-control .weatherlayers-tooltip-control__direction-text{margin-left:2px}.weatherlayers-tooltip-control:not(.has-direction) .weatherlayers-tooltip-control__direction,.weatherlayers-tooltip-control:not(.has-value){display:none}`);Py(`.weatherlayers-timeline-control{margin:10px;pointer-events:auto}.weatherlayers-timeline-control>div{background:hsla(0,0%,100%,.5);color:rgba(0,0,0,.75);display:inline-block;font-family:Helvetica Neue,Arial,Helvetica,sans-serif;font-size:12px;line-height:14px;width:100%}.weatherlayers-timeline-control footer,.weatherlayers-timeline-control header,.weatherlayers-timeline-control main{margin:5px 10px;text-align:center}.weatherlayers-timeline-control header{font-weight:700}.weatherlayers-timeline-control footer{display:flex;gap:10px}.weatherlayers-timeline-control__progress-input{margin:-2px 0 2px;vertical-align:middle;width:100%}.weatherlayers-timeline-control__end-datetime,.weatherlayers-timeline-control__start-datetime{flex:0 0}.weatherlayers-timeline-control__buttons{flex:1 0}.weatherlayers-timeline-control__start-datetime{text-align:left}.weatherlayers-timeline-control__end-datetime{text-align:right}.weatherlayers-timeline-control__button{background:no-repeat 50%/contain;display:inline-block;height:16px;vertical-align:middle;width:16px}.weatherlayers-timeline-control__button+.weatherlayers-timeline-control__button{margin-left:5px}.weatherlayers-timeline-control__play-button{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='1792' height='1792' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1576 927 248 1665q-23 13-39.5 3t-16.5-36V160q0-26 16.5-36t39.5 3l1328 738q23 13 23 31t-23 31z'/%3E%3C/svg%3E")}.weatherlayers-timeline-control__pause-button{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='1792' height='1792' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1664 192v1408q0 26-19 45t-45 19h-512q-26 0-45-19t-19-45V192q0-26 19-45t45-19h512q26 0 45 19t19 45zm-896 0v1408q0 26-19 45t-45 19H192q-26 0-45-19t-19-45V192q0-26 19-45t45-19h512q26 0 45 19t19 45z'/%3E%3C/svg%3E")}.weatherlayers-timeline-control__step-backward-button{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='1792' height='1792' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1363 141q19-19 32-13t13 32v1472q0 26-13 32t-32-13L653 941q-9-9-13-19v678q0 26-19 45t-45 19H448q-26 0-45-19t-19-45V192q0-26 19-45t45-19h128q26 0 45 19t19 45v678q4-10 13-19z'/%3E%3C/svg%3E")}.weatherlayers-timeline-control__step-forward-button{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='1792' height='1792' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M429 1651q-19 19-32 13t-13-32V160q0-26 13-32t32 13l710 710q9 9 13 19V192q0-26 19-45t45-19h128q26 0 45 19t19 45v1408q0 26-19 45t-45 19h-128q-26 0-45-19t-19-45V922q-4 10-13 19z'/%3E%3C/svg%3E")}.weatherlayers-timeline-control__loader{display:block;margin-top:2px}.weatherlayers-timeline-control__loader-icon{background:no-repeat 50%/contain;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' style='margin:auto;background:0 0;display:block;shape-rendering:auto' width='16' height='16' viewBox='0 0 100 100' preserveAspectRatio='xMidYMid'%3E%3Ccircle cx='50' cy='50' fill='none' stroke='rgba(0, 0, 0, 0.4)' stroke-width='10' r='25' stroke-dasharray='117.80972450961724 41.269908169872416'%3E%3CanimateTransform attributeName='transform' type='rotate' repeatCount='indefinite' dur='1s' values='0 50 50;360 50 50' keyTimes='0;1'/%3E%3C/circle%3E%3C/svg%3E");display:inline-block;height:16px;vertical-align:middle;width:16px}.weatherlayers-timeline-control__loader-text{color:rgba(0,0,0,.4);margin-left:2px;vertical-align:middle}.weatherlayers-timeline-control.loading *{pointer-events:none}.weatherlayers-timeline-control.running .weatherlayers-timeline-control__play-button,.weatherlayers-timeline-control:not(.running) .weatherlayers-timeline-control__pause-button{display:none}.weatherlayers-timeline-control:not(.loading) .weatherlayers-timeline-control__loader{visibility:hidden}`);Py(".weatherlayers-attribution-control{margin-top:2px;pointer-events:auto}.weatherlayers-attribution-control>div{background:hsla(0,0%,100%,.5);color:rgba(0,0,0,.75);
3387display:inline-block;font-family:Helvetica Neue,Arial,Helvetica,sans-serif;font-size:12px;line-height:20px;padding:0 5px}.weatherlayers-attribution-control a{color:rgba(0,0,0,.75);text-decoration:none}.weatherlayers-attribution-control a:hover{text-decoration:underline}");Py(`.weatherlayers-logo-control{margin:10px;pointer-events:auto}.weatherlayers-logo-control a{background:no-repeat 50%/contain;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' style='fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:2' viewBox='0 0 131 23'%3E%3Cg opacity='.9'%3E%3Cpath d='M27.391 17.706h2.534l1.736-6.475h.132l1.765 6.475h2.52l2.761-10.569H36.07l-1.384 7.009h-.132l-1.75-7.009H30.65l-1.692 7.009h-.131L27.42 7.137h-2.79l2.761 10.569Zm15.092.19c2.615 0 3.611-1.53 3.846-2.504l.022-.088-2.373.007-.015.029c-.117.213-.564.711-1.428.711-.996 0-1.597-.674-1.619-1.839h5.486v-.747c0-2.49-1.56-4.101-4.014-4.101-2.461 0-4.021 1.633-4.021 4.262v.008c0 2.644 1.56 4.262 4.116 4.262Zm-.036-6.687c.805 0 1.377.52 1.501 1.495h-3.003c.125-.96.703-1.495 1.502-1.495Zm7.028 6.622c1.04 0 1.912-.44 2.271-1.136h.139v1.011h2.549v-5.559c0-1.758-1.282-2.783-3.531-2.783-2.204 0-3.611.989-3.757 2.49l-.007.088h2.351l.014-.037c.154-.41.572-.637 1.253-.637.718 0 1.128.33 1.128.879v.637l-1.78.103c-2.102.132-3.259.988-3.259 2.468v.015c0 1.486 1.069 2.461 2.629 2.461Zm-.132-2.644v-.015c0-.484.403-.791 1.172-.842l1.37-.088v.534c0 .703-.637 1.245-1.458 1.245-.652 0-1.084-.322-1.084-.834Zm9.944 2.534c.49 0 .966-.044 1.237-.103v-1.853a5.19 5.19 0 0 1-.651.029c-.674 0-.982-.293-.982-.908v-3.428h1.633V9.554h-1.
3387633V7.687h-2.6v1.867h-1.245v1.904h1.245v4.014c0 1.597.85 2.249 2.996 2.249Zm2.267-.015h2.593v-4.658c0-.938.498-1.575 1.34-1.575.879 0 1.282.557 1.282 1.546v4.687h2.593V12.44c0-1.956-.945-3.076-2.754-3.076-1.15 0-1.97.571-2.322 1.465h-.139V6.5h-2.593v11.206Zm12.719.19c2.615 0 3.611-1.53 3.846-2.504l.022-.088-2.373.007-.015.029c-.117.213-.564.711-1.428.711-.996 0-1.597-.674-1.619-1.839h5.486v-.747c0-2.49-1.56-4.101-4.014-4.101-2.461 0-4.021 1.633-4.021 4.262v.008c0 2.644 1.56 4.262 4.116 4.262Zm-.036-6.687c.805 0 1.377.52 1.501 1.495h-3.003c.125-.96.703-1.495 1.502-1.495Zm4.816 6.497h2.593v-4.314c0-1.128.71-1.78 1.926-1.78.366 0 .74.052 1.084.139V9.562a2.733 2.733 0 0 0-.879-.132c-1.04 0-1.757.52-1.992 1.421h-.139V9.554h-2.593v8.152Zm6.443 0h7.177v-2.161h-4.489V7.137h-2.688v10.569Zm10.36.125c1.04 0 1.912-.44 2.271-1.136h.139v1.011h2.549v-5.559c0-1.758-1.282-2.783-3.53-2.783-2.205 0-3.611.989-3.758 2.49l-.007.088h2.351l.015-.037c.154-.41.571-.637 1.252-.637.718 0 1.128.33 1.128.879v.637l-1.78.103c-2.102.132-3.259.988-3.259 2.468v.015c0 1.486 1.069 2.461 2.629 2.461Zm-.131-2.644v-.015c0-.484.402-.791 1.171-.842l1.37-.088v.534c0 .703-.637 1.245-1.457 1.245-.652 0-1.084-.322-1.084-.834Zm7.233 5.397c2.3 0 3.589-.82 4.336-3.142l2.571-7.888h-2.74l-1.45 5.911h-.154l-1.45-5.911h-2.863l2.783 8.152-.037.227c-.08.476-.527.747-1.304.747-.212 0-.424 0-.571-.007v1.904c.293.007.586.007.879.007Zm10.896-2.688c2.614 0 3.61-1.53 3.845-2.504l.022-.088-2.373.007-.015.029c-.117.213-.564.711-1.428.711-.996 0-1.597-.674-1.619-1.839h5.486v-.747c0-2.49-1.56-4.101-4.014-4.101-2.461 0-4.021 1.633-4.021 4.262v.008c0 2.644 1.56 4.262 4.117 4.262Zm-.037-6.687c.806 0 1.377.52 1.501 1.495h-3.003c.125-.96.704-1.495 1.502-1.495Zm4.816 6.497h2.593v-4.314c0-1.128.711-1.78 1.926-1.78.367 0 .74.052 1.084.139V9.562a2.733 2.733 0 0 0-.879-.132c-1.04 0-1.757.52-1.992 1.421h-.139V9.554h-2.593v8.152Zm9.468.19c2.212 0 3.735-1.083 3.735-2.775v-.008c0-1.223-.769-1.911-2.454-2.248l-1.406-.279c-.776-.161-1.025-.373-1.025-.739v-.015c0-.454.432-.725 1.076-.725.718 0 1.121.381 1.202.718l.014.051h2.373v-.037c-.044-1.303-1.23-2.475-3.589-2.475-2.19 0-3.581 1.018-3.581 2.644v.007c0 1.245.805 2.066 2.38 2.381l1.406.278c.74.154 1.018.373 1.018.754v.008c0 .439-.446.71-1.142.71-.754 0-1.165-.315-1.318-.732l-.015-.044h-2.52v.051c.162 1.421 1.429 2.475 3.846 2.475Z' style='fill:none;fill-rule:nonzero;stroke:%23000;stroke-opacity:.3;stroke-width:3px' transform='translate(-2.33)'/%3E%3Cpath d='M27.391 17.706h2.534l1.736-6.475h.132l1.765 6.475h2.52l2.761-10.569H36.07l-1.384 7.009h-.132l-1.75-7.009H30.65l-1.692 7.009h-.131L27.42 7.137h-2.79l2.761 10.569Zm15.092.19c2.615 0 3.611-1.53 3.846-2.504l.022-.088-2.373.007-.015.029c-.117.213-.564.711-1.428.711-.996 0-1.597-.674-1.619-1.839h5.486v-.747c0-2.49-1.56-4.101-4.014-4.101-2.461 0-4.021 1.633-4.021 4.262v.008c0 2.644 1.56 4.262 4.116 4.262Zm-.036-6.687c.805 0 1.377.52 1.501 1.495h-3.003c.125-.96.703-1.495 1.502-1.495Zm7.028 6.622c1.04 0 1.912-.44 2.271-1.136h.139v1.011h2.549v-5.559c0-1.758-1.282-2.783-3.531-2.783-2.204 0-3.611.989-3.757 2.49l-.007.088h2.351l.014-.037c.154-.41.572-.637 1.253-.637.718 0 1.128.33 1.128.879v.637l-1.78.103c-2.102.132-3.259.988-3.259 2.468v.015c0 1.486 1.069 2.461 2.629 2.461Zm-.132-2.644v-.015c0-.484.403-.791 1.172-.842l1.37-.088v.534c0 .703-.637 1.245-1.458 1.245-.652 0-1.084-.322-1.084-.834Zm9.944 2.534c.49 0 .966-.044 1.237-.103v-1.853a5.19 5.19 0 0 1-.651.029c-.674 0-.982-.293-.982-.908v-3.428h1.633V9.554h-1.
3387633V7.687h-2.6v1.867h-1.245v1.904h1.245v4.014c0 1.597.85 2.249 2.996 2.249Zm2.267-.015h2.593v-4.658c0-.938.498-1.575 1.34-1.575.879 0 1.282.557 1.282 1.546v4.687h2.593V12.44c0-1.956-.945-3.076-2.754-3.076-1.15 0-1.97.571-2.322 1.465h-.139V6.5h-2.593v11.206Zm12.719.19c2.615 0 3.611-1.53 3.846-2.504l.022-.088-2.373.007-.015.029c-.117.213-.564.711-1.428.711-.996 0-1.597-.674-1.619-1.839h5.486v-.747c0-2.49-1.56-4.101-4.014-4.101-2.461 0-4.021 1.633-4.021 4.262v.008c0 2.644 1.56 4.262 4.116 4.262Zm-.036-6.687c.805 0 1.377.52 1.501 1.495h-3.003c.125-.96.703-1.495 1.502-1.495Zm4.816 6.497h2.593v-4.314c0-1.128.71-1.78 1.926-1.78.366 0 .74.052 1.084.139V9.562a2.733 2.733 0 0 0-.879-.132c-1.04 0-1.757.52-1.992 1.421h-.139V9.554h-2.593v8.152Zm6.443 0h7.177v-2.161h-4.489V7.137h-2.688v10.569Zm10.36.125c1.04 0 1.912-.44 2.271-1.136h.139v1.011h2.549v-5.559c0-1.758-1.282-2.783-3.53-2.783-2.205 0-3.611.989-3.758 2.49l-.007.088h2.351l.015-.037c.154-.41.571-.637 1.252-.637.718 0 1.128.33 1.128.879v.637l-1.78.103c-2.102.132-3.259.988-3.259 2.468v.015c0 1.486 1.069 2.461 2.629 2.461Zm-.131-2.644v-.015c0-.484.402-.791 1.171-.842l1.37-.088v.534c0 .703-.637 1.245-1.457 1.245-.652 0-1.084-.322-1.084-.834Zm7.233 5.397c2.3 0 3.589-.82 4.336-3.142l2.571-7.888h-2.74l-1.45 5.911h-.154l-1.45-5.911h-2.863l2.783 8.152-.037.227c-.08.476-.527.747-1.304.747-.212 0-.424 0-.571-.007v1.904c.293.007.586.007.879.007Zm10.896-2.688c2.614 0 3.61-1.53 3.845-2.504l.022-.088-2.373.007-.015.029c-.117.213-.564.711-1.428.711-.996 0-1.597-.674-1.619-1.839h5.486v-.747c0-2.49-1.56-4.101-4.014-4.101-2.461 0-4.021 1.633-4.021 4.262v.008c0 2.644 1.56 4.262 4.117 4.262Zm-.037-6.687c.806 0 1.377.52 1.501 1.495h-3.003c.125-.96.704-1.495 1.502-1.495Zm4.816 6.497h2.593v-4.314c0-1.128.711-1.78 1.926-1.78.367 0 .74.052 1.084.139V9.562a2.733 2.733 0 0 0-.879-.132c-1.04 0-1.757.52-1.992 1.421h-.139V9.554h-2.593v8.152Zm9.468.19c2.212 0 3.735-1.083 3.735-2.775v-.008c0-1.223-.769-1.911-2.454-2.248l-1.406-.279c-.776-.161-1.025-.373-1.025-.739v-.015c0-.454.432-.725 1.076-.725.718 0 1.121.381 1.202.718l.014.051h2.373v-.037c-.044-1.303-1.23-2.475-3.589-2.475-2.19 0-3.581 1.018-3.581 2.644v.007c0 1.245.805 2.066 2.38 2.381l1.406.278c.74.154 1.018.373 1.018.754v.008c0 .439-.446.71-1.142.71-.754 0-1.165-.315-1.318-.732l-.015-.044h-2.52v.051c.162 1.421 1.429 2.475 3.846 2.475Z' style='fill:%23fff;fill-rule:nonzero' transform='translate(-2.33)'/%3E%3Cpath d='m6.107 9.12-2.749 1.193a.68.68 0 0 0-.408.628c0 .275.16.522.407.629l2.75 1.193-2.749 1.192a.684.684 0 0 0-.408.63c0 .275.16.521.407.628l6.213 2.696a1.103 1.103 0 0 0 .877 0l6.212-2.695a.683.683 0 0 0 .408-.629.682.682 0 0 0-.407-.629l-2.75-1.193 2.749-1.193a.683.683 0 0 0 .409-.629.68.68 0 0 0-.408-.628l-2.75-1.194-1.144.497 3.054 1.326-5.736 2.488a.181.181 0 0 1-.151 0l-5.736-2.489 3.054-1.325-1.144-.496Zm9.713 5.465-5.736 2.489a.189.189 0 0 1-.151 0l-5.736-2.49 3.054-1.325 2.319 1.006a1.09 1.09 0 0 0 .877 0l2.319-1.006 3.054 1.326Zm-2.289-7.966c-.011.04-.039.066-.083.079l-1.207.378v1.206a.122.122 0 0 1-.054.103.128.128 0 0 1-.12.016L10.86 8.03l-.744.978a.13.13 0 0 1-.107.051.134.134 0 0 1-.108-.051l-.744-.978-1.207.371c-.038.015-.078.01-.12-.016a.121.121 0 0 1-.053-.103V7.076l-1.208-.378c-.044-.013-.071-.039-.082-.079-.014-.045-.008-.083.016-.114l.744-.978-.744-.977a.121.121 0 0 1-.016-.114c.011-.04.038-.066.082-.079l1.208-.378V2.773c0-.042.017-.077.053-.103.042-.026.082-.032.12-.016l1.207.371.744-.978A.131.131 0 0 1 10.009 2c.047 0 .083.016.107.047l.744.978 1.207-.371c.039-.016.079-.01.12.016a.122.122 0 0 1 .054.103v1.206l1.207.378c.044.013.072.039.083.079a.119.119 0 0 1-.017.114l-.744.977.744.978c.025.031.031.069.017.114M12.39 5.527c0-.307-.063-.601-.188-.88a2.287 2.287 0 0 0-1.269-1.21 2.422 2.422 0 0 0-.924-.18c-.323 0-.631.06-.924.18a2.284 2.284 0 0 0-1.269 1.21 2.115 2.115 0 0 0-.188.88c0 .308.062.602.188.881a2.284 2.284 0 0 0 1.269 1.21c.293.12.601.18.924.18.322 0 .63-.06.924-.18a2.287 2.287 0 0 0 1.269-1.21c.125-.279.188-.573.188-.881' style='fill:none;fill-rule:nonzero;stroke:%23000;stroke-opacity:.3;stroke-width:2.4px' transform='matrix(1.25 0 0 1.25 -2.188 -1)'/%3E%3Cpath d='m6.107 9.12-2.749 1.193a.68.68 0 0 0-.408.628c0 .275.16.522.407.629l2.75 1.193-2.749 1.192a.684.684 0 0 0-.408.63c0 .275.16.521.407.628l6.213 2.696a1.103 1.103 0 0 0 .877 0l6.212-2.695a.683.683 0 0 0 .408-.629.682.682 0 0 0-.407-.629l-2.75-1.193 2.749-1.193a.683.683 0 0 0 .409-.629.68.68 0 0 0-.408-.628l-2.75-1.194-1.144.497 3.054 1.326-5.736 2.488a.181.181 0 0 1-.151 0l-5.736-2.489 3.054-1.325-1.144-.496Zm9.713 5.465-5.736 2.489a.189.189 0 0 1-.151 0l-5.736-2.49 3.054-1.325 2.319 1.006a1.09 1.09 0 0 0 .877 0l2.319-1.006 3.054 1.326Zm-2.289-7.966c-.011.04-.039.066-.083.079l-1.207.378v1.206a.122.122 0 0 1-.054.103.128.128 0 0 1-.12.016L10.86 8.03l-.744.978a.13.13 0 0 1-.107.051.134.134 0 0 1-.108-.051l-.744-.978-1.207.371c-.038.015-.078.01-.12-.016a.121.121 0 0 1-.053-.103V7.076l-1.208-.378c-.044-.013-.071-.039-.082-.079-.014-.045-.008-.083.016-.114l.744-.978-.744-.977a.121.121 0 0 1-.016-.114c.011-.04.038-.066.082-.079l1.208-.378V2.773c0-.042.017-.077.053-.103.042-.026.082-.032.12-.016l1.207.371.744-.978A.131.131 0 0 1 10.009 2c.047 0 .083.016.107.047l.744.978 1.207-.371c.039-.016.079-.01.12.016a.122.122 0 0 1 .054.103v1.206l1.207.378c.044.013.072.039.083.079a.119.119 0 0 1-.017.114l-.744.977.744.978c.025.031.031.069.017.114M12.39 5.527c0-.307-.063-.601-.188-.88a2.287 2.287 0 0 0-1.269-1.21 2.422 2.422 0 0 0-.924-.18c-.323 0-.631.06-.924.18a2.284 2.284 0 0 0-1.269 1.21 2.115 2.115 0 0 0-.188.88c0 .308.062.602.188.881a2.284 2.284 0 0 0 1.269 1.21c.293.12.601.18.924.18.322 0 .63-.06.924-.18a2.287 2.287 0 0 0 1.269-1.21c.125-.279.188-.573.188-.881' style='fill:%23fff;fill-rule:nonzero' transform='matrix(1.25 0 0 1.25 -2.188 -1)'/%3E%3C/g%3E%3C/svg%3E");display:inline-block;height:23px;margin:-1.5px;vertical-align:middle;width:131px}`);const e2e=async({timeMarker:t,particleCount:e=2e3,speedFactor:n=10,opacity:r=92})=>{try{const i=t.getUTCHours(),s=Math.floor(i/6)*6,o=s.toString().padStart(2,"0"),a=new Date(Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),s)),l=a.toISOString().split("T")[0].replace(/-/g,""),c=Math.round((t-a)/36e5).toString().padStart(2,"0"),u=`https://openveda.cloud/api/raster/cog/preview.png?rescale=-127,128&url=vrt:///vsicurl/https://noaa-hrrr-bdp-pds.s3.amazonaws.com/hrrr.${l}/conus/hrrr.t${o}z.wrfsfcf${c}.grib2?bands=10,11&format=png`;let h;try{h=await rA(u)}catch(d){console.error("loadTextureData failed:",d)}return new nI({id:"wind-particles",image:h,imageType:"VECTOR",imageUnscale:[-127,128],bounds:[-134.1214,21.1222,-60.8912,52.6287],clipBounds:[-134.1214,21.1222,-60.8912,52.6287],extensions:[new Ty],numParticles:Ms.isMobile?500:e,color:[97,173,234,255],fadeOpacity:r/100,dropRate:.003,dropRateBump:.01,speedFactor:Ms.isMobile?5:n,lineWidth:{type:"exponential",value:2,slope:.5,min:1,max:4.5},maxAge:Ms.isMobile?8:15,paths:Ms.isMobile?10:25,iconAtlas:"",iconMapping:{},fadeIn:!0,useWorkers:!0,updateRate:Ms.isMobile?32:16,blendMode:"screen",particleGradient:{0:[50,50,50,0],.1:[50,50,50,255],.4:[30,30,30,255],.7:[0,0,0,255],1:[0,0,0,0]},colorScale:{type:"linear",domain:[0,30],range:[[50,50,50,50],[0,0,0]]}})}catch(i){return console.error("Error initializing wind layer:",i),null}},t2e=async({timeMarker:t,opacity:e=92})=>{try{const n=t.getUTCHours(),r=Math.floor(n/6)*6,i=r.toString().padStart(2,"0"),s=new Date(Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),r)),o=s.toISOString().split("T")[0].replace(/-/g,""),a=Math.round((t-s)/36e5).toString().padStart(2,"0"),l=`https://openveda.cloud/api/raster/cog/preview.png?rescale=-127,128&url=vrt:///vsicurl/https://noaa-hrrr-bdp-pds.s3.amazonaws.com/hrrr.${o}
3387/conus/hrrr.t${i}z.wrfsfcf${a}.grib2?bands=10,11&format=png`;let c;try{c=await rA(l)}catch(u){console.error("loadTextureData failed:",u)}return new tI({id:"grid-particles",image:c,imageType:"VECTOR",imageUnscale:[-127,128],bounds:[-130,20,-60,55],density:-1,extensions:[new Ty,new tA],clipBounds:Jq,style:xw.ARROW,iconBounds:[0,30],iconSize:[8,24],iconColor:[97,173,234,255],opacity:e/100})}catch(n){return console.error("Error initializing wind layer:",n),null}},n2e=({id:t="terrain",mapboxAccessToken:e})=>e?new NM({id:t,minZoom:0,maxZoom:23,strategy:"no-overlap",elevationDecoder:{rScaler:256,gScaler:1,bScaler:1/256,offset:-32768},terrainDrawMode:"drape",elevationData:"https://s3.amazonaws.com/elevation-tiles-prod/terrarium/{z}/{x}/{y}.png",texture:`https://api.mapbox.com/v4/mapbox.satellite/{z}/{x}/{y}@2x.png?access_token=${e}`,operation:"terrain+draw"}):(console.error("Mapbox token is required for TerrainLayer"),null),DQ={[Rr.TERRAIN]:{id:Rr.TERRAIN,name:"Terrain Elevation",render:n2e,defaultProps:{id:"terrain-layer"},requiresData:!1},[Rr.MVT]:{id:Rr.MVT,name:"Map Vector Tile",render:rve,defaultProps:{id:"fire-perimeters-mvt"},requiresData:!0},[Rr.GEOJSON_2D]:{id:Rr.GEOJSON_2D,name:"GeoJSON 2D",render:ave,defaultProps:{id:"fire-perimeters",extensions:[new td({dash:!0})]},requiresData:!0},[Rr.GEOJSON_3D]:{id:Rr.GEOJSON_3D,name:"GeoJSON 3D",render:lve,defaultProps:{id:"fire-perimeters-3d",opacity:100,extensions:[new td({dash:!0})]},requiresData:!0},[Rr.WIND]:{id:Rr.WIND,name:"Wind Particles",render:e2e,defaultProps:{id:"wind-particles"},requiresData:!1},[Rr.GRID]:{id:Rr.GRID,name:"Wind Grid",render:t2e,defaultProps:{id:"grid-particles"},requiresData:!1}},r2e=async t=>{const{type:e,...n}=t,r=DQ[e];if(!r)return console.error(`Unknown layer type: ${e}`),null;try{const i={...r.defaultProps,...n};return e==="wind"?await r.render(i):r.render(i)}catch(i){return console.error(`Error creating layer of type ${e}:`,i),null}},i2e=async t=>{const e=t.map(r=>r2e(r));return(await Promise.all(e)).filter(Boolean)};Object.keys(DQ).reduce((t,e)=>(t[e]=e,t),{});const s2e=t=>({viewState:mD,viewStateForUrl:mD,mapBounds:null,layerOpacity:100,setViewState:(e,n)=>t({viewState:n?{...e,...n}:e}),setViewStateForUrl:e=>t({viewStateForUrl:e}),setMapBounds:e=>t({mapBounds:e}),setLayerOpacity:e=>{if(typeof e!="number"||isNaN(e))return;const n=Math.max(0,Math.min(100,e));t({layerOpacity:n}
3387)},updateViewStateForUrl:e=>t(n=>({viewStateForUrl:{...n.viewStateForUrl,...e}}))}),o2e=async(t,e)=>{const n=`${e}/collections/public.eis_fire_snapshot_perimeter_nrt/items?filter=fireid%3D${t}&limit=500&f=geojson`;try{const r=await fetch(n);if(!r.ok)throw new Error(`Failed to fetch alternative fire perimeters: ${r.statusText}`);return await r.json()}catch(r){return console.error("Error fetching alternative fire perimeters:",r),null}},QM=t=>t?t.properties||t.object&&t.object.properties||{}:{},a2e=t=>{var n;return((n=QM(t).fireid)==null?void 0:n.toString())||""},l2e=t=>{var n;return((n=QM(t).t)==null?void 0:n.toString())||""},BQ=t=>{if(!(t!=null&&t.geometry))return null;try{let e=[];if(t.geometry.type==="Polygon")e=t.geometry.coordinates[0];else if(t.geometry.type==="MultiPolygon")t.geometry.coordinates.forEach(u=>{e=[...e,...u[0]]});else if(t.geometry.type==="Point"){const[u,h]=t.geometry.coordinates,d={bounds:[[u-.05,h-.05],[u+.05,h+.05]],padding:40},m=new CustomEvent("fitbounds",{detail:d});return window.dispatchEvent(m),d}if(e.length===0)return null;const n=e.map(u=>u[0]),r=e.map(u=>u[1]),i=Math.min(...n),s=Math.max(...n),o=Math.min(...r),a=Math.max(...r),l={bounds:[[i,o],[s,a]],padding:40},c=new CustomEvent("fitbounds",{detail:l});return window.dispatchEvent(c),l}catch(e){return console.error("Error calculating bounds:",e),null}},LQ=async(t,e,n,r,i=30)=>{const s=`${t}/${e}/items?filter=fireid%3D${n}&sortby=-t&limit=1&f=geojson`,a=(await fetch(s).then(c=>c.json())).numberMatched??0;if(r==="geojson"){const c={type:"FeatureCollection",features:[]};for(let u=0;u<a;u+=i){const h=await fetch(`${t}/${e}/items?filter=fireid%3D${n}&limit=${i}&sortby=-t&offset=${u}&f=geojson`).then(d=>d.json());Array.isArray(h.features)&&c.features.push(...h.features)}return new Blob([JSON.stringify(c)],{type:"application/geo+json"})}let l="";for(let c=0;c<a;c+=i){const u=await fetch(`${t}/${e}/items?filter=fireid%3D${n}&limit=${i}&sortby=-t&offset=${c}&f=csv`).then(h=>h.text());l+=c===0?u:u.split(`
3388`).slice(1).join(`
3389`)}return new Blob([l],{type:"text/csv;charset=utf-8;"})},c2e=t=>({selectedEventId:null,events:[],firePerimeters:null,firePerimetersLoading:!1,selectEvent:async(e,n)=>{var r,i;if(t({selectedEventId:e}),e&&n){t({firePerimetersLoading:!0});try{let o=await(await LQ(`${n}/collections`,"public.eis_fire_lf_perimeter_nrt",e,"geojson")).text().then(JSON.parse);if((r=o==null?void 0:o.features)!=null&&r.length||(o=await o2e(e,n)),t({firePerimeters:o,firePerimetersLoading:!1}),((i=o==null?void 0:o.features)==null?void 0:i.length)>0){const a=[...o.features].sort((l,c)=>new Date(c.properties.t).getTime()-new Date(l.properties.t).getTime());BQ(a[0])}}catch(s){console.error("Error fetching fire perimeters:",s),t({firePerimeters:null,firePerimetersLoading:!1})}}else t({firePerimeters:null})},updateEvents:e=>t({events:e}),setFirePerimeters:e=>t({firePerimeters:e}),setFirePerimetersLoading:e=>t({firePerimetersLoading:e})}),sg={fireArea:{min:0,max:1e4},duration:{min:0,max:100},meanFrp:{min:0,max:1e3}},u2e=t=>({fireArea:sg.fireArea,duration:sg.duration,meanFrp:sg.meanFrp,region:null,isActive:null,showAdvancedFilters:!1,setFireAreaRange:e=>t({fireArea:e}),setDurationRange:e=>t({duration:e}),setMeanFrpRange:e=>t({meanFrp:e}),setRegion:e=>t({region:e}),setIsActive:e=>t({isActive:e}),toggleAdvancedFilters:()=>t(e=>({showAdvancedFilters:!e.showAdvancedFilters})),resetFilters:()=>t({fireArea:sg.fireArea,duration:sg.duration,meanFrp:sg.meanFrp,region:null,isActive:null})}),f2e=t=>({featuresApiEndpoint:"https://openveda.cloud/api/features",mapboxAccessToken:"pk.eyJ1IjoiY292aWQtbmFzYSIsImEiOiJjbWVybGIxb3cwN3k5Mm1wdW16eHllOW85In0.b3G1cP1U8y7lyptOd4EI8g",setEnvConfig:e=>t({featuresApiEndpoint:e.featuresApiEndpoint,mapboxAccessToken:e.mapboxAccessToken})}),h2e=t=>{const e=t;e.use={};for(const n of Object.keys(e.getState()))e.use[n]=()=>e(r=>r[n]);return e},d2e=pte()((t,e,...n)=>{const r=Ste(t,e,...n),i=s2e(t,e,...n),s=c2e(t,e,...n),o=u2e(t,e,...n),a=f2e(t,e,...n);return{...r,...i,...s,...o,...a,selectEvent:async(l,c)=>{r.setViewMode(l?"detail":"explorer"),await s.selectEvent(l,c)}}}),Je=h2e(d2e),p2e=typeof window<"u"?A.useLayoutEffect:A.useEffect;function Sw(t,e){for(;t;){if(t===e)return!0;t=Object.getPrototypeOf(t)}return!1}const g2e={position:"absolute",zIndex:-1};function FQ(t,e){if(typeof t=="function")return t(e);if(Array.isArray(t))return t.map(n=>FQ(n,e));if(iA(t)){if(m2e(t))return e.style=g2e,A.cloneElement(t,e);if(v2e(t))return A.cloneElement(t,e)}return t}function iA(t){return t&&typeof t=="object"&&"type"in t||!1}function m2e(t){var e;return(e=t.props)==null?void 0:e.mapStyle}function v2e(t){const e=t.type;return e&&e.deckGLViewProps}function rI(t){if(typeof t=="function")return A.createElement(tm,{},t);if(Array.isArray(t))return t.map(rI);if(iA(t)){if(t.type===A.Fragment)return rI(t.props.children);if(Sw(t.type,tm))return t}return t}function y2e({children:t,layers:e=[],views:n=null}){const r=[],i=[],s={};
3389return A.Children.forEach(rI(t),o=>{if(iA(o)){const a=o.type;if(Sw(a,Wo)){const l=b2e(a,o.props);i.push(l)}else r.push(o);if(Sw(a,tm)&&a!==tm&&o.props.id){const l=new a(o.props);s[l.id]=l}}else o&&r.push(o)}),Object.keys(s).length>0&&(Array.isArray(n)?n.forEach(o=>{s[o.id]=o}):n&&(s[n.id]=n),n=Object.values(s)),e=i.length>0?[...i,...e]:e,{layers:e,children:r,views:n}}function b2e(t,e){const n={},r=t.defaultProps||{};for(const i in e)r[i]!==e[i]&&(n[i]=e[i]);return new t(n)}const _2e=A.createContext();function w2e({children:t,deck:e,ContextProvider:n=_2e.Provider}){const{viewManager:r}=e||{};if(!r||!r.views.length)return[];const i={},s=r.views[0].id;for(const o of t){let a=s,l=o;iA(o)&&Sw(o.type,tm)&&(a=o.props.id||s,l=o.props.children);const c=r.getViewport(a),u=r.getViewState(a);if(c){u.padding=c.padding;const{x:h,y:d,width:m,height:y}=c;l=FQ(l,{x:h,y:d,width:m,height:y,viewport:c,viewState:u}),i[a]||(i[a]={viewport:c,children:[]}),i[a].children.push(l)}}return Object.keys(i).map(o=>{const{viewport:a,children:l}=i[o],{x:c,y:u,width:h,height:d}=a,m={position:"absolute",left:c,top:u,width:h,height:d},y=`view-${o}`,v=A.createElement("div",{key:y,id:y,style:m},...l),b={deck:e,viewport:a,container:e.canvas.offsetParent,eventManager:e.eventManager,onViewStateChange:T=>{T.viewId=o,e._onViewStateChange(T)},widgets:[]},x=`view-${o}-context`;return A.createElement(n,{key:x,value:b},v)})}const x2e={mixBlendMode:null};function A2e({width:t,height:e,style:n}){const r={position:"absolute",zIndex:0,left:0,top:0,width:t,height:e},i={left:0,top:0};if(n)for(const s in n)s in x2e?i[s]=n[s]:r[s]=n[s];return{containerStyle:r,canvasStyle:i}}function E2e(t){return{get deck(){return t.deck},pickObject:e=>t.deck.pickObject(e),pickMultipleObjects:e=>t.deck.pickMultipleObjects(e),pickObjects:e=>t.deck.pickObjects(e)}}function UQ(t){t.redrawReason&&(t.deck._drawLayers(t.redrawReason),t.redrawReason=null)}function S2e(t,e,n){var i,s,o;const r=new e({...n,_customRender:((o=(s=(i=n.deviceProps)==null?void 0:i.adapters)==null?void 0:s[0])==null?void 0:o.type)==="webgpu"?void 0:a=>{t.redrawReason=a;const l=r.getViewports();t.lastRenderedViewports!==l?t.forceUpdate():UQ(t)}});return r}function T2e(t,e){const[n,r]=A.useState(0),s=A.useRef({control:null,version:n,forceUpdate:()=>r(I=>I+1)}).current,o=A.useRef(null),a=A.useRef(null),l=A.useMemo(()=>y2e(t),[t.layers,t.views,t.children]);let c=!0;const u=I=>{var O;return c&&t.viewState?(s.viewStateUpdateRequested=I,null):(s.viewStateUpdateRequested=null,(O=t.onViewStateChange)==null?void 0:O.call(t,I))},h=I=>{var O;c?s.interactionStateUpdateRequested=I:(s.interactionStateUpdateRequested=null,(O=t.onInteractionStateChange)==null||O.call(t,I))},d=A.useMemo(()=>{const I={widgets:[],...t,style:null,width:"100%",height:"100%",parent:o.current,canvas:a.current,layers:l.layers,views:l.views,onViewStateChange:u,onInteractionStateChange:h};return delete I._customRender,s.deck&&s.deck.setProps(I),I},[t]);A.useEffect(()=>{const I=t.Deck||wM;return s.deck=S2e(s,I,{...d,parent:o.current,canvas:a.current}),()=>{var O;return(O=s.deck)==null?void 0:O.finalize()}},[]),p2e(()=>{UQ(s);const{viewStateUpdateRequested:I,interactionStateUpdateRequested:O}=s;I&&u(I),O&&h(O)}),A.useImperativeHandle(e,()=>E2e(s),[]);const m=s.deck&&s.deck.isInitialized?s.deck.getViewports():void 0,{ContextProvider:y,width:v="100%",height:b="100%",id:x,style:T}=t,{containerStyle:E,canvasStyle:C}=A.useMemo(()=>A2e({width:v,height:b,style:T}),[v,b,T]);if(!s.viewStateUpdateRequested&&s.lastRenderedViewports===m||s.version!==n){s.lastRenderedViewports=m,s.version=n;
vendor: 9,758 bytes, line 3389
3389const I=w2e({children:l.children,deck:s.deck,ContextProvider:y}),O=A.createElement("canvas",{key:"canvas",id:x||"deckgl-overlay",ref:a,style:C});s.control=A.createElement("div",{id:`${x||"deckgl"}-wrapper`,ref:o,style:E},[O,I])}return c=!1,s.control}const C2e=A.forwardRef(T2e);var sA,Qn,zQ,Ch,cL,jQ,VQ,WQ,XM,iI,sI,Pv={},$Q=[],P2e=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,oA=Array.isArray;function Cc(t,e){for(var n in e)t[n]=e[n];return t}function YM(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function I2e(t,e,n){var r,i,s,o={};for(s in e)s=="key"?r=e[s]:s=="ref"?i=e[s]:o[s]=e[s];if(arguments.length>2&&(o.children=arguments.length>3?sA.call(arguments,2):n),typeof t=="function"&&t.defaultProps!=null)for(s in t.defaultProps)o[s]===void 0&&(o[s]=t.defaultProps[s]);return P_(t,o,r,i,null)}function P_(t,e,n,r,i){var s={type:t,props:e,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i??++zQ,__i:-1,__u:0};return i==null&&Qn.vnode!=null&&Qn.vnode(s),s}function aA(t){return t.children}function I_(t,e){this.props=t,this.context=e}function lm(t,e){if(e==null)return t.__?lm(t.__,t.__i+1):null;for(var n;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null)return n.__e;return typeof t.type=="function"?lm(t):null}function HQ(t){var e,n;if((t=t.__)!=null&&t.__c!=null){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null){t.__e=t.__c.base=n.__e;break}return HQ(t)}}function uL(t){(!t.__d&&(t.__d=!0)&&Ch.push(t)&&!Tw.__r++||cL!=Qn.debounceRendering)&&((cL=Qn.debounceRendering)||jQ)(Tw)}function Tw(){for(var t,e,n,r,i,s,o,a=1;Ch.length;)Ch.length>a&&Ch.sort(VQ),t=Ch.shift(),a=Ch.length,t.__d&&(n=void 0,i=(r=(e=t).__v).__e,s=[],o=[],e.__P&&((n=Cc({},r)).__v=r.__v+1,Qn.vnode&&Qn.vnode(n),KM(e.__P,n,r,e.__n,e.__P.namespaceURI,32&r.__u?[i]:null,s,i??lm(r),!!(32&r.__u),o),n.__v=r.__v,n.__.__k[n.__i]=n,XQ(s,n,o),n.__e!=i&&HQ(n)));Tw.__r=0}function qQ(t,e,n,r,i,s,o,a,l,c,u){var h,d,m,y,v,b,x,T=r&&r.__k||$Q,E=e.length;for(l=O2e(n,e,T,l,E),h=0;h<E;h++)(m=n.__k[h])!=null&&(d=m.__i==-1?Pv:T[m.__i]||Pv,m.__i=h,b=KM(t,m,d,i,s,o,a,l,c,u),y=m.__e,m.ref&&d.ref!=m.ref&&(d.ref&&GM(d.ref,null,m),u.push(m.ref,m.__c||y,m)),v==null&&y!=null&&(v=y),(x=!!(4&m.__u))||d.__k===m.__k?l=QQ(m,l,t,x):typeof m.type=="function"&&b!==void 0?l=b:y&&(l=y.nextSibling),m.__u&=-7);return n.__e=v,l}function O2e(t,e,n,r,i){var s,o,a,l,c,u=n.length,h=u,d=0;for(t.__k=new Array(i),s=0;s<i;s++)(o=e[s])!=null&&typeof o!="boolean"&&typeof o!="function"?(l=s+d,(o=t.__k[s]=typeof o=="string"||typeof o=="number"||typeof o=="bigint"||o.constructor==String?P_(null,o,null,null,null):oA(o)?P_(aA,{children:o},null,null,null):o.constructor==null&&o.__b>0?P_(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o).__=t,o.__b=t.__b+1,a=null,(c=o.__i=M2e(o,n,l,h))!=-1&&(h--,(a=n[c])&&(a.__u|=2)),a==null||a.__v==null?(c==-1&&(i>u?d--:i<u&&d++),typeof o.type!="function"&&(o.__u|=4)):c!=l&&(c==l-1?d--:c==l+1?d++:(c>l?d--:d++,o.__u|=4))):t.__k[s]=null;if(h)for(s=0;s<u;s++)(a=n[s])!=null&&(2&a.__u)==0&&(a.__e==r&&(r=lm(a)),KQ(a,a));return r}function QQ(t,e,n,r){var i,s;if(typeof t.type=="function"){for(i=t.__k,s=0;i&&s<i.length;s++)i[s]&&(i[s].__=t,e=QQ(i[s],e,n,r));return e}t.__e!=e&&(r&&(e&&t.type&&!e.parentNode&&(e=lm(t)),n.insertBefore(t.__e,e||null)),e=t.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType==8);return e}function M2e(t,e,n,r){var i,s,o,a=t.key,l=t.type,c=e[n],u=c!=null&&(2&c.__u)==0;if(c===null&&t.key==null||u&&a==c.key&&l==c.type)return n;if(r>(u?1:0)){for(i=n-1,s=n+1;i>=0||s<e.length;)if((c=e[o=i>=0?i--:s++])!=null&&(2&c.__u)==0&&a==c.key&&l==c.type)return o}return-1}function fL(t,e,n){e[0]=="-"?t.setProperty(e,n??""):t[e]=n==null?"":typeof n!="number"||P2e.test(e)?n:n+"px"}function jb(t,e,n,r,i){var s,o;e:if(e=="style")if(typeof n=="string")t.style.cssText=n;else{if(typeof r=="string"&&(t.style.cssText=r=""),r)for(e in r)n&&e in n||fL(t.style,e,"");if(n)for(e in n)r&&n[e]==r[e]||fL(t.style,e,n[e])}else if(e[0]=="o"&&e[1]=="n")s=e!=(e=e.replace(WQ,"$1")),o=e.toLowerCase(),e=o in t||e=="onFocusOut"||e=="onFocusIn"?o.slice(2):e.slice(2),t.l||(t.l={}),t.l[e+s]=n,n?r?n.u=r.u:(n.u=XM,t.addEventListener(e,s?sI:iI,s)):t.removeEventListener(e,s?sI:iI,s);else{if(i=="http://www.w3.org/2000/svg")e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!="width"&&e!="height"&&e!="href"&&e!="list"&&e!="form"&&e!="tabIndex"&&e!="download"&&e!="rowSpan"&&e!="colSpan"&&e!="role"&&e!="popover"&&e in t)try{t[e]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&e[4]!="-"?t.removeAttribute(e):t.setAttribute(e,e=="popover"&&n==1?"":n))}}function hL(t){return function(e){if(this.l){var n=this.l[e.type+t];if(e.t==null)e.t=XM++;else if(e.t<n.u)return;return n(Qn.event?Qn.event(e):e)}}}function KM(t,e,n,r,i,s,o,a,l,c){var u,h,d,m,y,v,b,x,T,E,C,I,O,N,U,F,H,W=e.type;if(e.constructor!=null)return null;128&n.__u&&(l=!!(32&n.__u),s=[a=e.__e=n.__e]),(u=Qn.__b)&&u(e);e:if(typeof W=="function")try{if(x=e.props,T="prototype"in W&&W.prototype.render,E=(u=W.contextType)&&r[u.__c],C=u?E?E.props.value:u.__:r,n.__c?b=(h=e.__c=n.__c).__=h.__E:(T?e.__c=h=new W(x,C):(e.__c=h=new I_(x,C),h.constructor=W,h.render=k2e),E&&E.sub(h),h.props=x,h.state||(h.state={}),h.context=C,h.__n=r,d=h.__d=!0,h.__h=[],h._sb=[]),T&&h.__s==null&&(h.__s=h.state),T&&W.getDerivedStateFromProps!=null&&(h.__s==h.state&&(h.__s=Cc({},h.__s)),Cc(h.__s,W.getDerivedStateFromProps(x,h.__s))),m=h.props,y=h.state,h.__v=e,d)T&&W.getDerivedStateFromProps==null&&h.componentWillMount!=null&&h.componentWillMount(),T&&h.componentDidMount!=null&&h.__h.push(h.componentDidMount);else{if(T&&W.getDerivedStateFromProps==null&&x!==m&&h.componentWillReceiveProps!=null&&h.componentWillReceiveProps(x,C),!h.__e&&h.shouldComponentUpdate!=null&&h.shouldComponentUpdate(x,h.__s,C)===!1||e.__v==n.__v){for(e.__v!=n.__v&&(h.props=x,h.state=h.__s,h.__d=!1),e.__e=n.__e,e.__k=n.__k,e.__k.some(function(z){z&&(z.__=e)}),I=0;I<h._sb.length;I++)h.__h.push(h._sb[I]);h._sb=[],h.__h.length&&o.push(h);break e}h.componentWillUpdate!=null&&h.componentWillUpdate(x,h.__s,C),T&&h.componentDidUpdate!=null&&h.__h.push(function(){h.componentDidUpdate(m,y,v)})}if(h.context=C,h.props=x,h.__P=t,h.__e=!1,O=Qn.__r,N=0,T){for(h.state=h.__s,h.__d=!1,O&&O(e),u=h.render(h.props,h.state,h.context),U=0;U<h._sb.length;U++)h.__h.push(h._sb[U]);h._sb=[]}else do h.__d=!1,O&&O(e),u=h.render(h.props,h.state,h.context),h.state=h.__s;while(h.__d&&++N<25);h.state=h.__s,h.getChildContext!=null&&(r=Cc(Cc({},r),h.getChildContext())),T&&!d&&h.getSnapshotBeforeUpdate!=null&&(v=h.getSnapshotBeforeUpdate(m,y)),F=u,u!=null&&u.type===aA&&u.key==null&&(F=YQ(u.props.children)),a=qQ(t,oA(F)?F:[F],e,n,r,i,s,o,a,l,c),h.base=e.__e,e.__u&=-161,h.__h.length&&o.push(h),b&&(h.__E=h.__=null)}catch(z){if(e.__v=null,l||s!=null)if(z.then){for(e.__u|=l?160:128;a&&a.nodeType==8&&a.nextSibling;)a=a.nextSibling;s[s.indexOf(a)]=null,e.__e=a}else{for(H=s.length;H--;)YM(s[H]);oI(e)}else e.__e=n.__e,e.__k=n.__k,z.then||oI(e);Qn.__e(z,e,n)}else s==null&&e.__v==n.__v?(e.__k=n.__k,e.__e=n.__e):a=e.__e=R2e(n.__e,e,n,r,i,s,o,l,c);return(u=Qn.diffed)&&u(e),128&e.__u?void 0:a}function oI(t){t&&t.__c&&(t.__c.__e=!0),t&&t.__k&&t.__k.forEach(oI)}function XQ(t,e,n){for(var r=0;r<n.length;r++)GM(n[r],n[++r],n[++r]);Qn.__c&&Qn.__c(e,t),t.some(function(i){try{t=i.__h,i.__h=[],t.some(function(s){s.call(i)})}catch(s){Qn.__e(s,i.__v)}})}function YQ(t){return typeof t!="object"||t==null||t.__b&&t.__b>0?t:oA(t)?t.map(YQ):Cc({},t)}function R2e(t,e,n,r,i,s,o,a,l){var c,u,h,d,m,y,v,b=n.props,x=e.props,T=e.type;if(T=="svg"?i="http://www.w3.org/2000/svg":T=="math"?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),s!=null){for(c=0;c<s.length;c++)if((m=s[c])&&"setAttribute"in m==!!T&&(T?m.localName==T:m.nodeType==3)){t=m,s[c]=null;break}}if(t==null){if(T==null)return document.createTextNode(x);t=document.createElementNS(i,T,x.is&&x),a&&(Qn.__m&&Qn.__m(e,s),a=!1),s=null}if(T==null)b===x||a&&t.data==x||(t.data=x);else{if(s=s&&sA.call(t.childNodes),b=n.props||Pv,!a&&s!=null)for(b={},c=0;c<t.attributes.length;c++)b[(m=t.attributes[c]).name]=m.value;for(c in b)if(m=b[c],c!="children"){if(c=="dangerouslySetInnerHTML")h=m;else if(!(c in x)){if(c=="value"&&"defaultValue"in x||c=="checked"&&"defaultChecked"in x)continue;jb(t,c,null,m,i)}}for(c in x)m=x[c],c=="children"?d=m:c=="dangerouslySetInnerHTML"?u=m:c=="value"?y=m:c=="checked"?v=m:a&&typeof m!="function"||b[c]===m||jb(t,c,m,b[c],i);if(u)a||h&&(u.__html==h.__html||u.__html==t.innerHTML)||(t.innerHTML=u.__html),e.__k=[];else if(h&&(t.innerHTML=""),qQ(e.type=="template"?t.content:t,oA(d)?d:[d],e,n,r,T=="foreignObject"?"http://www.w3.org/1999/xhtml":i,s,o,s?s[0]:n.__k&&lm(n,0),a,l),s!=null)for(c=s.length;c--;)YM(s[c]);a||(c="value",T=="progress"&&y==null?t.removeAttribute("value"):y!=null&&(y!==t[c]||T=="progress"&&!y||T=="option"&&y!=b[c])&&jb(t,c,y,b[c],i),c="checked",v!=null&&v!=t[c]&&jb(t,c,v,b[c],i))}return t}function GM(t,e,n){try{if(typeof t=="function"){var r=typeof t.__u=="function";r&&t.__u(),r&&e==null||(t.__u=t(e))}else t.current=e}catch(i){Qn.__e(i,n)}}function KQ(t,e,n){var r,i;if(Qn.unmount&&Qn.unmount(t),(r=t.ref)&&(r.current&&r.current!=t.__e||GM(r,null,e)),(r=t.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(s){Qn.__e(s,e)}r.base=r.__P=null}if(r=t.__k)for(i=0;i<r.length;i++)r[i]&&KQ(r[i],e,n||typeof t.type!="function");n||YM(t.__e),t.__c=t.__=t.__e=void 0}function k2e(t,e,n){return this.constructor(t,n)}function ZM(t,e,n){var r,i,s,o;e==document&&(e=document.documentElement),Qn.__&&Qn.__(t,e),i=(r=!1)?null:e.__k,s=[],o=[],KM(e,t=e.__k=I2e(aA,null,[t]),i||Pv,Pv,e.namespaceURI,i?null:e.firstChild?sA.call(e.childNodes):null,
3389s,i?i.__e:e.firstChild,r,o),XQ(s,t,o)}sA=$Q.slice,Qn={__e:function(t,e,n,r){for(var i,s,o;e=e.__;)if((i=e.__c)&&!i.__)try{if((s=i.constructor)&&s.getDerivedStateFromError!=null&&(i.setState(s.getDerivedStateFromError(t)),o=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(t,r||{}),o=i.__d),o)return i.__E=i}catch(a){t=a}throw t}},zQ=0,I_.prototype.setState=function(t,e){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=Cc({},this.state),typeof t=="function"&&(t=t(Cc({},n),this.props)),t&&Cc(n,t),t!=null&&this.__v&&(e&&this._sb.push(e),uL(this))},I_.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),uL(this))},I_.prototype.render=aA,Ch=[],jQ=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,VQ=function(t,e){return t.__v.__b-e.__v.__b},Tw.__r=0,WQ=/(PointerCapture)$|Capture$/i,XM=0,iI=hL(!1),sI=hL(!0);var N2e=0;function qi(t,e,n,r,i,s){e||(e={});var o,a,l=e;if("ref"in l)for(a in l={},e)a=="ref"?o=e[a]:l[a]=e[a];var c={type:t,props:l,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--N2e,__i:-1,__u:0,__source:i,__self:s};if(typeof t=="function"&&(o=t.defaultProps))for(a in o)l[a]===void 0&&(l[a]=o[a]);return Qn.vnode&&Qn.vnode(c),c}const D2e=t=>{const{className:e,label:n,onClick:r}=t;return qi("div",{className:"deck-widget-button",children:qi("button",{className:`deck-widget-icon-button ${e}`,type:"button",onClick:r,title:n,children:qi("div",{className:"deck-widget-icon"})})})},B2e=t=>{const{children:e,orientation:n}=t;return qi("div",{className:`deck-widget-button-group ${n}`,children:e})},dL=t=>{const{className:e,label:n,onClick:r}=t;return qi("button",{className:`deck-widget-icon-button ${e}`,type:"button",onClick:r,title:n,children:qi("div",{className:"deck-widget-icon"})})};class L2e{constructor(e){this.id="fullscreen",this.placement="top-left",this.fullscreen=!1,this.id=e.id??this.id,this.placement=e.placement??this.placement,this.props={...e,enterLabel:e.enterLabel??"Enter Fullscreen",exitLabel:e.exitLabel??"Exit Fullscreen",style:e.style??{}}}onAdd({deck:e}){const{style:n,className:r}=this.props,i=document.createElement("div");return i.classList.add("deck-widget","deck-widget-fullscreen"),r&&i.classList.add(r),rm(i,n),this.deck=e,this.element=i,this.update(),document.addEventListener("fullscreenchange",this.onFullscreenChange.bind(this)),i}onRemove(){this.deck=void 0,this.element=void 0,document.removeEventListener("fullscreenchange",this.onFullscreenChange.bind(this))}update(){const{enterLabel:e,exitLabel:n}=this.props,r=this.element;if(!r)return;const i=qi(D2e,{onClick:this.handleClick.bind(this),label:this.fullscreen?n:e,className:this.fullscreen?"deck-widget-fullscreen-exit":"deck-widget-fullscreen-enter"});ZM(i,r)}setProps(e){this.placement=e.placement??this.placement;const n=this.props,r=this.element;r&&(n.className!==e.className&&(n.className&&r.classList.remove(n.className),e.className&&r.classList.add(e.className)),Ii(n.style,e.style,1)||(AM(r,n.style),rm(r,e.style))),Object.assign(this.props,e),this.update()}getContainer(){var e,n;return this.props.container||((n=(e=this.deck)==null?void 0:e.getCanvas())==null?void 0:n.parentElement)}onFullscreenChange(){const e=this.fullscreen,n=document.fullscreenElement===this.getContainer();e!==n&&(this.fullscreen=!this.fullscreen),this.update()}async handleClick(){this.fullscreen?await this.exitFullscreen():await this.requestFullscreen(),this.update()}async requestFullscreen(){const e=this.getContainer();e!=null&&e.requestFullscreen?await e.requestFullscreen({navigationUI:"hide"}):this.togglePseudoFullscreen()}async exitFullscreen(){document.exitFullscreen?await document.exitFullscreen():this.togglePseudoFullscreen()}togglePseudoFullscreen(){var e;(e=this.getContainer())==null||e.classList.toggle("deck-pseudo-fullscreen")}}class F2e{constructor(e){this.id="compass",this.placement="top-left",this.viewId=null,this.viewports={},this.id=e.id??this.id,this.viewId=e.viewId??this.viewId,this.placement=e.placement??this.placement,this.props={...e,transitionDuration:e.transitionDuration??200,label:e.label??"Reset Compass",style:e.style??{}}}setProps(e){this.placement=e.placement??this.placement,this.viewId=e.viewId??this.viewId;const n=this.props,r=this.element;r&&(n.className!==e.className&&(n.className&&r.classList.remove(n.className),e.className&&r.classList.add(e.className)),Ii(n.style,e.style,1)||(AM(r,n.style),rm(r,e.style))),Object.assign(this.props,e),this.update()}onViewportChange(e){e.equals(this.viewports[e.id])||(this.viewports[e.id]=e,this.update())}onAdd({deck:e}){const{style:n,className:r}=this.props,i=document.createElement("div");return i.classList.add("deck-widget","deck-widget-compass"),r&&i.classList.add(r),rm(i,n),this.deck=e,this.element=i,this.update(),i}getRotation(e){return e instanceof ao?[-e.bearing,e.pitch]:e instanceof dq?[0,Math.max(-80,Math.min(80,e.latitude))]:[0,0]}update(){var a;const e=this.viewId||((a=Object.values(this.viewports)[0])==null?void 0:a.id)||"default-view",n=this.viewports[e],[r,i]=this.getRotation(n),s=this.element;if(!s)return;const o=qi("div",{className:"deck-widget-button",style:{perspective:100},children:qi("button",{type:"button",onClick:()=>{for(const l of Object.values(this.viewports))this.handleCompassReset(l)},title:this.props.label,style:{transform:`rotateX(${i}deg)`}
3389,children:qi("svg",{fill:"none",width:"100%",height:"100%",viewBox:"0 0 26 26",children:qi("g",{transform:`rotate(${r},13,13)`,children:[qi("path",{d:"M10 13.0001L12.9999 5L15.9997 13.0001H10Z",fill:"var(--icon-compass-north-color, #F05C44)"}),qi("path",{d:"M16.0002 12.9999L13.0004 21L10.0005 12.9999H16.0002Z",fill:"var(--icon-compass-south-color, #C2C2CC)"})]})})})});ZM(o,s)}onRemove(){this.deck=void 0,this.element=void 0}handleCompassReset(e){const n=this.viewId||e.id||"default-view";if(e instanceof ao){const r={...e,bearing:0,...this.getRotation(e)[0]===0?{pitch:0}:{},transitionDuration:this.props.transitionDuration,transitionInterpolator:new pq};this.deck._onViewStateChange({viewId:n,viewState:r,interactionState:{}})}}}class lA{constructor(e={}){this.id="zoom",this.placement="top-left",this.viewId=null,this.viewports={},this.id=e.id??this.id,this.viewId=e.viewId??this.viewId,this.placement=e.placement??this.placement,this.props={...lA.defaultProps,...e}}onAdd({deck:e}){const{style:n,className:r}=this.props,i=document.createElement("div");return i.classList.add("deck-widget","deck-widget-zoom"),r&&i.classList.add(r),rm(i,n),this.deck=e,this.element=i,this.update(),i}onRemove(){this.deck=void 0,this.element=void 0}setProps(e){this.placement=e.placement??this.placement,this.viewId=e.viewId??this.viewId;const n=this.props,r=this.element;r&&(n.className!==e.className&&(n.className&&r.classList.remove(n.className),e.className&&r.classList.add(e.className)),Ii(n.style,e.style,1)||(AM(r,n.style),rm(r,e.style))),Object.assign(this.props,e),this.update()}onViewportChange(e){this.viewports[e.id]=e}handleZoom(e,n){const r=this.viewId||(e==null?void 0:e.id)||"default-view",i={...e,zoom:n};this.props.transitionDuration>0&&(i.transitionDuration=this.props.transitionDuration,i.transitionInterpolator="latitude"in i?new pq:new gM),this.setViewState(r,i)}handleZoomIn(){for(const e of Object.values(this.viewports))this.handleZoom(e,e.zoom+1)}handleZoomOut(){for(const e of Object.values(this.viewports))this.handleZoom(e,e.zoom-1)}setViewState(e,n){this.deck._onViewStateChange({viewId:e,viewState:n,interactionState:{}})}update(){const e=this.element;if(!e)return;const n=qi(B2e,{orientation:this.props.orientation,children:[qi(dL,{onClick:()=>this.handleZoomIn(),label:this.props.zoomInLabel,className:"deck-widget-zoom-in"}),qi(dL,{onClick:()=>this.handleZoomOut(),label:this.props.zoomOutLabel,className:"deck-widget-zoom-out"})]});ZM(n,e)}}lA.defaultProps={id:"zoom-widget",style:{},placement:"top-left",className:void 0,orientation:"vertical",transitionDuration:200,zoomInLabel:"Zoom In",zoomOutLabel:"Zoom Out",viewId:void 0};const U2e=A.createContext(null);function z2e(t,e){const n=Array.isArray(t)?t[0]:t?t.x:0,r=Array.isArray(t)?t[1]:t?t.y:0,i=Array.isArray(e)?e[0]:e?e.x:0,s=Array.isArray(e)?e[1]:e?e.y:0;return n===i&&r===s}function Sc(t,e){if(t===e)return!0;if(!t||!e)return!1;if(Array.isArray(t)){if(!Array.isArray(e)||t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(!Sc(t[n],e[n]))return!1;return!0}else if(Array.isArray(e))return!1;if(typeof t=="object"&&typeof e=="object"){const n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(const i of n)if(!e.hasOwnProperty(i)||!Sc(t[i],e[i]))return!1;return!0}return!1}function j2e(t){const e=t.clone();return e.pixelsToGLUnits=t.pixelsToGLUnits,e}function pL(t,e){if(!t.getProjection)return;const n=t.getProjection(),r=e.getProjection();Sc(n,r)||e.setProjection(n)}function gL(t){return{longitude:t.center.lng,latitude:t.center.lat,zoom:t.zoom,pitch:t.pitch,bearing:t.bearing,padding:t.padding}}function mL(t,e){const n=e.viewState||e;let r=!1;if("zoom"in n){const i=t.zoom;t.zoom=n.zoom,r=r||i!==t.zoom}if("bearing"in n){const i=t.bearing;t.bearing=n.bearing,r=r||i!==t.bearing}if("pitch"in n){const i=t.pitch;t.pitch=n.pitch,r=r||i!==t.pitch}if(n.padding&&!t.isPaddingEqual(n.padding)&&(r=!0,t.padding=n.padding),"longitude"in n&&"latitude"in n){const i=t.center;t.center=new i.constructor(n.longitude,n.latitude),r=r||i!==t.center}return r}const V2e=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function vL(t){if(!t)return null;if(typeof t=="string"||("toJS"in t&&(t=t.toJS()),!t.layers))return t;const e={};
3389for(const r of t.layers)e[r.id]=r;const n=t.layers.map(r=>{let i=null;"interactive"in r&&(i=Object.assign({},r),delete i.interactive);const s=e[r.ref];if(s){i=i||Object.assign({},r),delete i.ref;for(const o of V2e)o in s&&(i[o]=s[o])}return i||r});return{...t,layers:n}}var yL={};const bL={version:8,sources:{},layers:[]},_L={mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",click:"onClick",dblclick:"onDblClick",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",mouseout:"onMouseOut",contextmenu:"onContextMenu",touchstart:"onTouchStart",touchend:"onTouchEnd",touchmove:"onTouchMove",touchcancel:"onTouchCancel"},xS={movestart:"onMoveStart",move:"onMove",moveend:"onMoveEnd",dragstart:"onDragStart",drag:"onDrag",dragend:"onDragEnd",zoomstart:"onZoomStart",zoom:"onZoom",zoomend:"onZoomEnd",rotatestart:"onRotateStart",rotate:"onRotate",rotateend:"onRotateEnd",pitchstart:"onPitchStart",pitch:"onPitch",pitchend:"onPitchEnd"},wL={wheel:"onWheel",boxzoomstart:"onBoxZoomStart",boxzoomend:"onBoxZoomEnd",boxzoomcancel:"onBoxZoomCancel",resize:"onResize",load:"onLoad",render:"onRender",idle:"onIdle",remove:"onRemove",data:"onData",styledata:"onStyleData",sourcedata:"onSourceData",error:"onError"},W2e=["minZoom","maxZoom","minPitch","maxPitch","maxBounds","projection","renderWorldCopies"],$2e=["scrollZoom","boxZoom","dragRotate","dragPan","keyboard","doubleClickZoom","touchZoomRotate","touchPitch"];class cm{constructor(e,n,r){this._map=null,this._internalUpdate=!1,this._inRender=!1,this._hoveredFeatures=null,this._deferredEvents={move:!1,zoom:!1,pitch:!1,rotate:!1},this._onEvent=i=>{const s=this.props[wL[i.type]];s?s(i):i.type==="error"&&console.error(i.error)},this._onPointerEvent=i=>{(i.type==="mousemove"||i.type==="mouseout")&&this._updateHover(i);const s=this.props[_L[i.type]];s&&(this.props.interactiveLayerIds&&i.type!=="mouseover"&&i.type!=="mouseout"&&(i.features=this._hoveredFeatures||this._queryRenderedFeatures(i.point)),s(i),delete i.features)},this._onCameraEvent=i=>{if(!this._internalUpdate){const s=this.props[xS[i.type]];s&&s(i)}i.type in this._deferredEvents&&(this._deferredEvents[i.type]=!1)},this._MapClass=e,this.props=n,this._initialize(r)}get map(){return this._map}get transform(){return this._renderTransform}setProps(e){const n=this.props;this.props=e;
3389const r=this._updateSettings(e,n);r&&this._createShadowTransform(this._map);const i=this._updateSize(e),s=this._updateViewState(e,!0);this._updateStyle(e,n),this._updateStyleComponents(e,n),this._updateHandlers(e,n),(r||i||s&&!this._map.isMoving())&&this.redraw()}static reuse(e,n){const r=cm.savedMaps.pop();if(!r)return null;const i=r.map,s=i.getContainer();for(n.className=s.className;s.childNodes.length>0;)n.appendChild(s.childNodes[0]);i._container=n,r.setProps({...e,styleDiffing:!1}),i.resize();const{initialViewState:o}=e;return o&&(o.bounds?i.fitBounds(o.bounds,{...o.fitBoundsOptions,duration:0}):r._updateViewState(o,!1)),i.isStyleLoaded()?i.fire("load"):i.once("styledata",()=>i.fire("load")),i._update(),r}_initialize(e){const{props:n}=this,{mapStyle:r=bL}=n,i={...n,...n.initialViewState,accessToken:n.mapboxAccessToken||H2e()||null,container:e,style:vL(r)},s=i.initialViewState||i.viewState||i;if(Object.assign(i,{center:[s.longitude||0,s.latitude||0],zoom:s.zoom||0,pitch:s.pitch||0,bearing:s.bearing||0}),n.gl){const u=HTMLCanvasElement.prototype.getContext;HTMLCanvasElement.prototype.getContext=()=>(HTMLCanvasElement.prototype.getContext=u,n.gl)}const o=new this._MapClass(i);s.padding&&o.setPadding(s.padding),n.cursor&&(o.getCanvas().style.cursor=n.cursor),this._createShadowTransform(o);const a=o._render;o._render=u=>{this._inRender=!0,a.call(o,u),this._inRender=!1};const l=o._renderTaskQueue.run;o._renderTaskQueue.run=u=>{l.call(o._renderTaskQueue,u),this._onBeforeRepaint()},o.on("render",()=>this._onAfterRepaint());const c=o.fire;o.fire=this._fireEvent.bind(this,c),o.on("resize",()=>{this._renderTransform.resize(o.transform.width,o.transform.height)}),o.on("styledata",()=>{this._updateStyleComponents(this.props,{}),pL(o.transform,this._renderTransform)}),o.on("sourcedata",()=>this._updateStyleComponents(this.props,{}));for(const u in _L)o.on(u,this._onPointerEvent);for(const u in xS)o.on(u,this._onCameraEvent);for(const u in wL)o.on(u,this._onEvent);this._map=o}recycle(){const n=this.map.getContainer().querySelector("[mapboxgl-children]");n==null||n.remove(),cm.savedMaps.push(this)}destroy(){this._map.remove()}redraw(){const e=this._map;!this._inRender&&e.style&&(e._frame&&(e._frame.cancel(),e._frame=null),e._render())}_createShadowTransform(e){const n=j2e(e.transform);e.painter.transform=n,this._renderTransform=n}_updateSize(e){const{viewState:n}=e;if(n){const r=this._map;if(n.width!==r.transform.width||n.height!==r.transform.height)return r.resize(),!0}return!1}_updateViewState(e,n){if(this._internalUpdate)return!1;const r=this._map,i=this._renderTransform,{zoom:s,pitch:o,bearing:a}=i,l=r.isMoving();l&&(i.cameraElevationReference="sea");const c=mL(i,{...gL(r.transform),...e});if(l&&(i.cameraElevationReference="ground"),c&&n){const u=this._deferredEvents;u.move=!0,u.zoom||(u.zoom=s!==i.zoom),u.rotate||(u.rotate=a!==i.bearing),u.pitch||(u.pitch=o!==i.pitch)}return l||mL(r.transform,e),c}
3389_updateSettings(e,n){const r=this._map;let i=!1;for(const s of W2e)if(s in e&&!Sc(e[s],n[s])){i=!0;const o=r[`set${s[0].toUpperCase()}${s.slice(1)}`];o==null||o.call(r,e[s])}return i}_updateStyle(e,n){if(e.cursor!==n.cursor&&(this._map.getCanvas().style.cursor=e.cursor||""),e.mapStyle!==n.mapStyle){const{mapStyle:r=bL,styleDiffing:i=!0}=e,s={diff:i};return"localIdeographFontFamily"in e&&(s.localIdeographFontFamily=e.localIdeographFontFamily),this._map.setStyle(vL(r),s),!0}return!1}_updateStyleComponents(e,n){const r=this._map;let i=!1;return r.isStyleLoaded()&&("light"in e&&r.setLight&&!Sc(e.light,n.light)&&(i=!0,r.setLight(e.light)),"fog"in e&&r.setFog&&!Sc(e.fog,n.fog)&&(i=!0,r.setFog(e.fog)),"terrain"in e&&r.setTerrain&&!Sc(e.terrain,n.terrain)&&(!e.terrain||r.getSource(e.terrain.source))&&(i=!0,r.setTerrain(e.terrain))),i}_updateHandlers(e,n){const r=this._map;let i=!1;for(const s of $2e){const o=e[s]??!0,a=n[s]??!0;Sc(o,a)||(i=!0,o?r[s].enable(o):r[s].disable())}return i}_queryRenderedFeatures(e){const n=this._map,r=n.transform,{interactiveLayerIds:i=[]}=this.props;try{return n.transform=this._renderTransform,n.queryRenderedFeatures(e,{layers:i.filter(n.getLayer.bind(n))})}catch{return[]}finally{n.transform=r}}_updateHover(e){var i;const{props:n}=this;if(n.interactiveLayerIds&&(n.onMouseMove||n.onMouseEnter||n.onMouseLeave)){const s=e.type,o=((i=this._hoveredFeatures)==null?void 0:i.length)>0,a=this._queryRenderedFeatures(e.point),l=a.length>0;!l&&o&&(e.type="mouseleave",this._onPointerEvent(e)),this._hoveredFeatures=a,l&&!o&&(e.type="mouseenter",this._onPointerEvent(e)),e.type=s}else this._hoveredFeatures=null}_fireEvent(e,n,r){const i=this._map,s=i.transform,o=typeof n=="string"?n:n.type;return o==="move"&&this._updateViewState(this.props,!1),o in xS&&(typeof n=="object"&&(n.viewState=gL(s)),this._map.isMoving())?(i.transform=this._renderTransform,e.call(i,n,r),i.transform=s,i):(e.call(i,n,r),i)}_onBeforeRepaint(){const e=this._map;this._internalUpdate=!0;for(const r in this._deferredEvents)this._deferredEvents[r]&&e.fire(r);this._internalUpdate=!1;const n=this._map.transform;e.transform=this._renderTransform,this._onAfterRepaint=()=>{pL(this._renderTransform,n),e.transform=n}}}cm.savedMaps=[];function H2e(){let t=null;if(typeof location<"u"){const e=/access_token=([^&\/]*)/.exec(location.search);t=e&&e[1]}try{t=t||yL.MapboxAccessToken}catch{}try{t=t||yL.REACT_APP_MAPBOX_ACCESS_TOKEN}catch{}return t}const q2e=["setMaxBounds","setMinZoom","setMaxZoom","setMinPitch","setMaxPitch","setRenderWorldCopies","setProjection","setStyle","addSource","removeSource","addLayer","removeLayer","setLayerZoomRange","setFilter","setPaintProperty","setLayoutProperty","setLight","setTerrain","setFog","remove"];function Q2e(t){if(!t)return null;const e=t.map,n={getMap:()=>e,getCenter:()=>t.transform.center,getZoom:()=>t.transform.zoom,getBearing:()=>t.transform.bearing,getPitch:()=>t.transform.pitch,getPadding:()=>t.transform.padding,getBounds:()=>t.transform.getBounds(),project:r=>{const i=e.transform;e.transform=t.transform;const s=e.project(r);return e.transform=i,s},unproject:r=>{const i=e.transform;e.transform=t.transform;const s=e.unproject(r);return e.transform=i,s},queryTerrainElevation:(r,i)=>{const s=e.transform;e.transform=t.transform;const o=e.queryTerrainElevation(r,i);return e.transform=s,o},queryRenderedFeatures:(r,i)=>{const s=e.transform;e.transform=t.transform;const o=e.queryRenderedFeatures(r,i);return e.transform=s,o}};for(const r of X2e(e))!(r in n)&&!q2e.includes(r)&&(n[r]=e[r].bind(e));return n}function X2e(t){const e=new Set;let n=t;for(;n;){for(const r of Object.getOwnPropertyNames(n))r[0]!=="_"&&typeof t[r]=="function"&&r!=="fire"&&r!=="setEventedParent"&&e.add(r);n=Object.getPrototypeOf(n)}return Array.from(e)}const Y2e=typeof document<"u"?A.useLayoutEffect:A.useEffect,K2e=["baseApiUrl","maxParallelImageRequests","workerClass","workerCount","workerUrl"];function G2e(t,e){for(const r of K2e)r in e&&(t[r]=e[r]);const{RTLTextPlugin:n="https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-rtl-text/v0.2.3/mapbox-gl-rtl-text.js"}=e;n&&t.getRTLTextPluginStatus&&t.getRTLTextPluginStatus()==="unavailable"&&t.setRTLTextPlugin(n,r=>{r&&console.error(r)},!0)}const cA=A.createContext(null);function Z2e(t,e){const n=A.useContext(U2e),[r,i]=A.useState(null),s=A.useRef(),{current:o}=A.useRef({mapLib:null,map:null});A.useEffect(()=>{const c=t.mapLib;let u=!0,h;return Promise.resolve(c||eQ(()=>import("./mapbox-gl-Cn1H14Mn.js").then(d=>d.m),[])).then(d=>{if(!u)return;if(!d)throw new Error("Invalid mapLib");const m="Map"in d?d:d.default;if(!m.Map)throw new Error("Invalid mapLib");G2e(m,t),t.reuseMaps&&(h=cm.reuse(t,s.current)),h||(h=new cm(m.Map,t,s.current)),o.map=Q2e(h),o.mapLib=m,i(h),n==null||n.onMapMount(o.map,t.id)}).catch(d=>{const{onError:m}=t;m?m({type:"error",target:null,error:d}):console.error(d)}),()=>{u=!1,h&&(n==null||n.onMapUnmount(t.id),t.reuseMaps?h.recycle():h.destroy())}},[]),Y2e(()=>{r&&r.setProps(t)}),A.useImperativeHandle(e,()=>o.map,[r]);const a=A.useMemo(()=>({position:"relative",width:"100%",height:"100%",...t.style}),[t.style]),l={height:"100%"};return A.createElement("div",{id:t.id,ref:s,style:a},r&&A.createElement(cA.Provider,{value:o},A.createElement("div",{"mapboxgl-children":"",style:l},t.children)))}const J2e=A.forwardRef(Z2e);var JM=dW();const ebe=fn(JM),tbe=/box|flex|grid|column|lineHeight|fontWeight|opacity|order|tabSize|zIndex/;function vd(t,e){if(!t||!e)return;const n=t.style;for(const r in e){const i=e[r];Number.isFinite(i)&&!tbe.test(r)?n[r]=`${i}px`:n[r]=i}}function GQ(t,e){if(t===e)return null;const n=xL(t),r=xL(e),i=[];for(const s of r)n.has(s)||i.push(s);for(const s of n)r.has(s)||i.push(s);return i.length===0?null:i}function xL(t){return new Set(t?t.trim().split(/\s+/):[])}A.memo(A.forwardRef((t,e)=>{const{map:n,mapLib:r}=A.useContext(cA),i=A.useRef({props:t}),s=A.useMemo(()=>{let x=!1;
3389A.Children.forEach(t.children,C=>{C&&(x=!0)});const T={...t,element:x?document.createElement("div"):null},E=new r.Marker(T);return E.setLngLat([t.longitude,t.latitude]),E.getElement().addEventListener("click",C=>{var I,O;(O=(I=i.current.props).onClick)==null||O.call(I,{type:"click",target:E,originalEvent:C})}),E.on("dragstart",C=>{var O,N;const I=C;I.lngLat=s.getLngLat(),(N=(O=i.current.props).onDragStart)==null||N.call(O,I)}),E.on("drag",C=>{var O,N;const I=C;I.lngLat=s.getLngLat(),(N=(O=i.current.props).onDrag)==null||N.call(O,I)}),E.on("dragend",C=>{var O,N;const I=C;I.lngLat=s.getLngLat(),(N=(O=i.current.props).onDragEnd)==null||N.call(O,I)}),E},[]);A.useEffect(()=>(s.addTo(n.getMap()),()=>{s.remove()}),[]);const{longitude:o,latitude:a,offset:l,style:c,draggable:u=!1,popup:h=null,rotation:d=0,rotationAlignment:m="auto",pitchAlignment:y="auto"}=t;A.useEffect(()=>{vd(s.getElement(),c)},[c]),A.useImperativeHandle(e,()=>s,[]);const v=i.current.props;(s.getLngLat().lng!==o||s.getLngLat().lat!==a)&&s.setLngLat([o,a]),l&&!z2e(s.getOffset(),l)&&s.setOffset(l),s.isDraggable()!==u&&s.setDraggable(u),s.getRotation()!==d&&s.setRotation(d),s.getRotationAlignment()!==m&&s.setRotationAlignment(m),s.getPitchAlignment()!==y&&s.setPitchAlignment(y),s.getPopup()!==h&&s.setPopup(h);const b=GQ(v.className,t.className);if(b)for(const x of b)s.toggleClassName(x);return i.current.props=t,JM.createPortal(t.children,s.getElement())}));A.memo(A.forwardRef((t,e)=>{const{map:n,mapLib:r}=A.useContext(cA),i=A.useMemo(()=>document.createElement("div"),[]),s=A.useRef({props:t}),o=A.useMemo(()=>{const a={...t},l=new r.Popup(a);return l.setLngLat([t.longitude,t.latitude]),l.once("open",c=>{var u,h;(h=(u=s.current.props).onOpen)==null||h.call(u,c)}),l},[]);if(A.useEffect(()=>{const a=l=>{var c,u;(u=(c=s.current.props).onClose)==null||u.call(c,l)};return o.on("close",a),o.setDOMContent(i).addTo(n.getMap()),()=>{o.off("close",a),o.isOpen()&&o.remove()}},[]),A.useEffect(()=>{vd(o.getElement(),t.style)},[t.style]),A.useImperativeHandle(e,()=>o,[]),o.isOpen()){const a=s.current.props;(o.getLngLat().lng!==t.longitude||o.getLngLat().lat!==t.latitude)&&o.setLngLat([t.longitude,t.latitude]),t.offset&&!Sc(a.offset,t.offset)&&(o.options.anchor=t.anchor,o.setOffset(t.offset)),(a.anchor!==t.anchor||a.maxWidth!==t.maxWidth)&&o.setMaxWidth(t.maxWidth);const l=GQ(a.className,t.className);if(l)for(const c of l)o.toggleClassName(c);s.current.props=t}return JM.createPortal(t.children,i)}));function Iy(t,e,n,r){const i=A.useContext(cA),s=A.useMemo(()=>t(i),[]);return A.useEffect(()=>{const o=e,a=null,l=typeof e=="function"?e:null,{map:c}=i;return c.hasControl(s)||(c.addControl(s,o==null?void 0:o.position),a&&a(i)),()=>{l&&l(i),c.hasControl(s)&&c.removeControl(s)}},[]),s}function nbe(t){const e=Iy(({mapLib:n})=>new n.AttributionControl(t),{position:t.position});return A.useEffect(()=>{vd(e._container,t.style)},[t.style]),null}A.memo(nbe);function rbe(t){const e=Iy(({mapLib:n})=>new n.FullscreenControl({container:t.containerId&&document.getElementById(t.containerId)}),{position:t.position});return A.useEffect(()=>{vd(e._controlContainer,t.style)},[t.style]),null}A.memo(rbe);function ibe(t,e){const n=A.useRef({props:t}),r=Iy(({mapLib:i})=>{const s=new i.GeolocateControl(t),o=s._setupUI.bind(s);return s._setupUI=a=>{s._container.hasChildNodes()||o(a)},s.on("geolocate",a=>{var l,c;(c=(l=n.current.props).onGeolocate)==null||c.call(l,a)}),s.on("error",a=>{var l,c;(c=(l=n.current.props).onError)==null||c.call(l,a)}),s.on("outofmaxbounds",a=>{var l,c;(c=(l=n.current.props).onOutOfMaxBounds)==null||c.call(l,a)}),s.on("trackuserlocationstart",a=>{var l,c;(c=(l=n.current.props).onTrackUserLocationStart)==null||c.call(l,a)}),s.on("trackuserlocationend",a=>{var l,c;(c=(l=n.current.props).onTrackUserLocationEnd)==null||c.call(l,a)}),s},{position:t.position});return n.current.props=t,A.useImperativeHandle(e,()=>r,[]),A.useEffect(()=>{vd(r._container,t.style)},[t.style]),null}A.memo(A.forwardRef(ibe));function sbe(t){const e=Iy(({mapLib:n})=>new n.NavigationControl(t),{position:t.position});return A.useEffect(()=>{vd(e._container,t.style)}
3389,[t.style]),null}A.memo(sbe);function obe(t){const e=Iy(({mapLib:s})=>new s.ScaleControl(t),{position:t.position}),n=A.useRef(t),r=n.current;n.current=t;const{style:i}=t;return t.maxWidth!==void 0&&t.maxWidth!==r.maxWidth&&(e.options.maxWidth=t.maxWidth),t.unit!==void 0&&t.unit!==r.unit&&e.setUnit(t.unit),A.useEffect(()=>{vd(e._container,i)},[i]),null}A.memo(obe);var $1={exports:{}};/**
3390 * @license
3391 * Lodash <https://lodash.com/>
3392 * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
3393 * Released under MIT license <https://lodash.com/license>
3394 * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
3395 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
3396 */var abe=$1.exports,AL;function lbe(){return AL||(AL=1,(function(t,e){(function(){var n,r="4.17.21",i=200,s="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",o="Expected a function",a="Invalid `variable` option passed into `_.template`",l="__lodash_hash_undefined__",c=500,u="__lodash_placeholder__",h=1,d=2,m=4,y=1,v=2,b=1,x=2,T=4,E=8,C=16,I=32,O=64,N=128,U=256,F=512,H=30,W="...",z=800,V=16,M=1,K=2,j=3,q=1/0,Y=9007199254740991,X=17976931348623157e292,te=NaN,D=4294967295,$=D-1,he=D>>>1,Se=[["ary",N],["bind",b],["bindKey",x],["curry",E],["curryRight",C],["flip",F],["partial",I],["partialRight",O],["rearg",U]],fe="[object Arguments]",$e="[object Array]",Ze="[object AsyncFunction]",ce="[object Boolean]",me="[object Date]",de="[object DOMException]",ye="[object Error]",ve="[object Function]",ue="[object GeneratorFunction]",k="[object Map]",ie="[object Number]",ne="[object Null]",Z="[object Object]",J="[object Promise]",le="[object Proxy]",pe="[object RegExp]",Te="[object Set]",we="[object String]",Qe="[object Symbol]",nt="[object Undefined]",Xe="[object WeakMap]",ft="[object WeakSet]",It="[object ArrayBuffer]",gt="[object DataView]",Yt="[object Float32Array]",en="[object Float64Array]",_t="[object Int8Array]",Mt="[object Int16Array]",ht="[object Int32Array]",$t="[object Uint8Array]",Zn="[object Uint8ClampedArray]",on="[object Uint16Array]",Ut="[object Uint32Array]",Ct=/\b__p \+= '';/g,rr=/\b(__p \+=) '' \+/g,di=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Sr=/&(?:amp|lt|gt|quot|#39);/g,yr=/[&<>"']/g,Dn=RegExp(Sr.source),cr=RegExp(yr.source),lo=/<%-([\s\S]+?)%>/g,vn=/<%([\s\S]+?)%>/g,Br=/<%=([\s\S]+?)%>/g,Da=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ho=/^\w*$/,pi=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Bs=/[\\^$.*+?()[\]{}|]/g,ur=RegExp(Bs.source),Ls=/^\s+/,ds=/\s/,Fs=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Us=/\{\n\/\* \[wrapped with (.+)\] \*/,Ba=/,? & /,La=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Ul=/[()=,{}\[\]\/\s]/,wf=/\\(\\)?/g,zs=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ht=/\w*$/,gn=/^[-+]0x[0-9a-f]+$/i,Bn=/^0b[01]+$/i,Lr=/^\[object .+?Constructor\]$/,Fr=/^0o[0-7]+$/i,Fa=/^(?:0|[1-9]\d*)$/,zl=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u01
vendor: 11,522 bytes, line 3396
33967f]/g,qo=/($^)/,Td=/['\n\r\u2028\u2029\\]/g,Pn="\\ud800-\\udfff",Hm="\\u0300-\\u036f",xf="\\ufe20-\\ufe2f",Cd="\\u20d0-\\u20ff",Ua=Hm+xf+Cd,Pd="\\u2700-\\u27bf",Af="a-z\\xdf-\\xf6\\xf8-\\xff",Wc="\\xac\\xb1\\xd7\\xf7",ps="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",qm="\\u2000-\\u206f",Gi=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Id="A-Z\\xc0-\\xd6\\xd8-\\xde",Od="\\ufe0e\\ufe0f",Md=Wc+ps+qm+Gi,za="['’]",$c="["+Pn+"]",ja="["+Md+"]",Qo="["+Ua+"]",Rd="\\d+",Qm="["+Pd+"]",Hc="["+Af+"]",Ef="[^"+Pn+Md+Rd+Pd+Af+Id+"]",jl="\\ud83c[\\udffb-\\udfff]",Vl="(?:"+Qo+"|"+jl+")",kd="[^"+Pn+"]",Wl="(?:\\ud83c[\\udde6-\\uddff]){2}",an="[\\ud800-\\udbff][\\udc00-\\udfff]",Xo="["+Id+"]",Sf="\\u200d",qc="(?:"+Hc+"|"+Ef+")",Nd="(?:"+Xo+"|"+Ef+")",Tf="(?:"+za+"(?:d|ll|m|re|s|t|ve))?",Cf="(?:"+za+"(?:D|LL|M|RE|S|T|VE))?",Qc=Vl+"?",$l="["+Od+"]?",co="(?:"+Sf+"(?:"+[kd,Wl,an].join("|")+")"+$l+Qc+")*",uo="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",fo="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Va=$l+Qc+co,Hl="(?:"+[Qm,Wl,an].join("|")+")"+Va,ho="(?:"+[kd+Qo+"?",Qo,Wl,an,$c].join("|")+")",Xm=RegExp(za,"g"),Dd=RegExp(Qo,"g"),Yo=RegExp(jl+"(?="+jl+")|"+ho+Va,"g"),Bd=RegExp([Xo+"?"+Hc+"+"+Tf+"(?="+[ja,Xo,"$"].join("|")+")",Nd+"+"+Cf+"(?="+[ja,Xo+qc,"$"].join("|")+")",Xo+"?"+qc+"+"+Tf,Xo+"+"+Cf,fo,uo,Rd,Hl].join("|"),"g"),Ld=RegExp("["+Sf+Pn+Ua+Od+"]"),Fe=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,be=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Ce=-1,Ve={};Ve[Yt]=Ve[en]=Ve[_t]=Ve[Mt]=Ve[ht]=Ve[$t]=Ve[Zn]=Ve[on]=Ve[Ut]=!0,Ve[fe]=Ve[$e]=Ve[It]=Ve[ce]=Ve[gt]=Ve[me]=Ve[ye]=Ve[ve]=Ve[k]=Ve[ie]=Ve[Z]=Ve[pe]=Ve[Te]=Ve[we]=Ve[Xe]=!1;var Ye={};Ye[fe]=Ye[$e]=Ye[It]=Ye[gt]=Ye[ce]=Ye[me]=Ye[Yt]=Ye[en]=Ye[_t]=Ye[Mt]=Ye[ht]=Ye[k]=Ye[ie]=Ye[Z]=Ye[pe]=Ye[Te]=Ye[we]=Ye[Qe]=Ye[$t]=Ye[Zn]=Ye[on]=Ye[Ut]=!0,Ye[ye]=Ye[ve]=Ye[Xe]=!1;var Vt={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},Ln={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Kr={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},Xc={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Pf=parseFloat,Yc=parseInt,ql=typeof Yi=="object"&&Yi&&Yi.Object===Object&&Yi,If=typeof self=="object"&&self&&self.Object===Object&&self,Tn=ql||If||Function("return this")(),Wa=e&&!e.nodeType&&e,po=Wa&&!0&&t&&!t.nodeType&&t,Ym=po&&po.exports===Wa,Kc=Ym&&ql.process,gi=(function(){try{var Ne=po&&po.require&&po.require("util").types;return Ne||Kc&&Kc.binding&&Kc.binding("util")}catch{}})(),Km=gi&&gi.isArrayBuffer,Ri=gi&&gi.isDate,Ql=gi&&gi.isMap,Fd=gi&&gi.isRegExp,Gc=gi&&gi.isSet,Wy=gi&&gi.isTypedArray;function mi(Ne,Ke,We){switch(We.length){case 0:return Ne.call(Ke);case 1:return Ne.call(Ke,We[0]);case 2:return Ne.call(Ke,We[0],We[1]);case 3:return Ne.call(Ke,We[0],We[1],We[2])}return Ne.apply(Ke,We)}function Gm(Ne,Ke,We,vt){for(var zt=-1,hn=Ne==null?0:Ne.length;++zt<hn;){var fr=Ne[zt];Ke(vt,fr,We(fr),Ne)}return vt}function Gr(Ne,Ke){for(var We=-1,vt=Ne==null?0:Ne.length;++We<vt&&Ke(Ne[We],We,Ne)!==!1;);return Ne}function Ud(Ne,Ke){for(var We=Ne==null?0:Ne.length;We--&&Ke(Ne[We],We,Ne)!==!1;);return Ne}function Zm(Ne,Ke){for(var We=-1,vt=Ne==null?0:Ne.length;++We<vt;)if(!Ke(Ne[We],We,Ne))return!1;return!0}function $a(Ne,Ke){for(var We=-1,vt=Ne==null?0:Ne.length,zt=0,hn=[];++We<vt;){var fr=Ne[We];Ke(fr,We,Ne)&&(hn[zt++]=fr)}return hn}function zd(Ne,Ke){var We=Ne==null?0:Ne.length;return!!We&&Zc(Ne,Ke,0)>-1}function Jm(Ne,Ke,We){for(var vt=-1,zt=Ne==null?0:Ne.length;++vt<zt;)if(We(Ke,Ne[vt]))return!0;return!1}function In(Ne,Ke){for(var We=-1,vt=Ne==null?0:Ne.length,zt=Array(vt);++We<vt;)zt[We]=Ke(Ne[We],We,Ne);return zt}function Ha(Ne,Ke){for(var We=-1,vt=Ke.length,zt=Ne.length;++We<vt;)Ne[zt+We]=Ke[We];return Ne}function e0(Ne,Ke,We,vt){var zt=-1,hn=Ne==null?0:Ne.length;for(vt&&hn&&(We=Ne[++zt]);++zt<hn;)We=Ke(We,Ne[zt],zt,Ne);return We}function YA(Ne,Ke,We,vt){var zt=Ne==null?0:Ne.length;for(vt&&zt&&(We=Ne[--zt]);zt--;)We=Ke(We,Ne[zt],zt,Ne);return We}function t0(Ne,Ke){for(var We=-1,vt=Ne==null?0:Ne.length;++We<vt;)if(Ke(Ne[We],We,Ne))return!0;return!1}var KA=r0("length");function $y(Ne){return Ne.split("")}function GA(Ne){return Ne.match(La)||[]}function Hy(Ne,Ke,We){var vt;return We(Ne,function(zt,hn,fr){if(Ke(zt,hn,fr))return vt=hn,!1}),vt}function jd(Ne,Ke,We,vt){for(var zt=Ne.length,hn=We+(vt?1:-1);vt?hn--:++hn<zt;)if(Ke(Ne[hn],hn,Ne))return hn;return-1}function Zc(Ne,Ke,We){return Ke===Ke?$d(Ne,Ke,We):jd(Ne,qy,We)}function n0(Ne,Ke,We,vt){for(var zt=We-1,hn=Ne.length;++zt<hn;)if(vt(Ne[zt],Ke))return zt;return-1}function qy(Ne){return Ne!==Ne}function Qy(Ne,Ke){var We=Ne==null?0:Ne.length;return We?i0(Ne,Ke)/We:te}function r0(Ne){return function(Ke){return Ke==null?n:Ke[Ne]}}function Vd(Ne){return function(Ke){return Ne==null?n:Ne[Ke]}}function Xy(Ne,Ke,We,vt,zt){return zt(Ne,function(hn,fr,wn){We=vt?(vt=!1,hn):Ke(We,hn,fr,wn)}),We}function ZA(Ne,Ke){var We=Ne.length;for(Ne.sort(Ke);We--;)Ne[We]=Ne[We].value;return Ne}function i0(Ne,Ke){for(var We,vt=-1,zt=Ne.length;++vt<zt;){var hn=Ke(Ne[vt]);hn!==n&&(We=We===n?hn:We+hn)}return We}function s0(Ne,Ke){for(var We=-1,vt=Array(Ne);++We<Ne;)vt[We]=Ke(We);return vt}function JA(Ne,Ke){return In(Ke,function(We){return[We,Ne[We]]})}function Yy(Ne){return Ne&&Ne.slice(0,Hd(Ne)+1).replace(Ls,"")}function Zi(Ne){return function(Ke){return Ne(Ke)}}function Of(Ne,Ke){return In(Ke,function(We){return Ne[We]})}function Ko(Ne,Ke){return Ne.has(Ke)}function Ky(Ne,Ke){for(var We=-1,vt=Ne.length;++We<vt&&Zc(Ke,Ne[We],0)>-1;);return We}function o0(Ne,Ke){for(var We=Ne.length;We--&&Zc(Ke,Ne[We],0)>-1;);return We}function Gy(Ne,Ke){for(var We=Ne.length,vt=0;We--;)Ne[We]===Ke&&++vt;return vt}var Zy=Vd(Vt),Jy=Vd(Ln);function e2(Ne){return"\\"+Xc[Ne]}function Jc(Ne,Ke){return Ne==null?n:Ne[Ke]}function eu(Ne){return Ld.test(Ne)}function e3(Ne){return Fe.test(Ne)}function t3(Ne){for(var Ke,We=[];!(Ke=Ne.next()).done;)We.push(Ke.value);return We}function Wd(Ne){var Ke=-1,We=Array(Ne.size);return Ne.forEach(function(vt,zt){We[++Ke]=[zt,vt]}),We}function a0(Ne,Ke){return function(We){return Ne(Ke(We))}}function gs(Ne,Ke){for(var We=-1,vt=Ne.length,zt=0,hn=[];++We<vt;){var fr=Ne[We];(fr===Ke||fr===u)&&(Ne[We]=u,hn[zt++]=We)}return hn}function qa(Ne){var Ke=-1,We=Array(Ne.size);return Ne.forEach(function(vt){We[++Ke]=vt}),We}function n3(Ne){var Ke=-1,We=Array(Ne.size);return Ne.forEach(function(vt){We[++Ke]=[vt,vt]}),We}function $d(Ne,Ke,We){for(var vt=We-1,zt=Ne.length;++vt<zt;)if(Ne[vt]===Ke)return vt;return-1}function r3(Ne,Ke,We){for(var vt=We+1;vt--;)if(Ne[vt]===Ke)return vt;return vt}function Xl(Ne){return eu(Ne)?n2(Ne):KA(Ne)}function Ji(Ne){return eu(Ne)?r2(Ne):$y(Ne)}function Hd(Ne){for(var Ke=Ne.length;Ke--&&ds.test(Ne.charAt(Ke)););return Ke}var t2=Vd(Kr);function n2(Ne){for(var Ke=Yo.lastIndex=0;Yo.test(Ne);)++Ke;return Ke}function r2(Ne){return Ne.match(Yo)||[]}function i3(Ne){return Ne.match(Bd)||[]}var s3=(function Ne(Ke){Ke=Ke==null?Tn:tu.defaults(Tn.Object(),Ke,tu.pick(Tn,be));var We=Ke.Array,vt=Ke.Date,zt=Ke.Error,hn=Ke.Function,fr=Ke.Math,wn=Ke.Object,Mf=Ke.RegExp,o3=Ke.String,ms=Ke.TypeError,Go=We.prototype,l0=hn.prototype,go=wn.prototype,nu=Ke["__core-js_shared__"],Rf=l0.toString,dn=go.hasOwnProperty,ru=0,qd=(function(){var g=/[^.]+$/.exec(nu&&nu.keys&&nu.keys.IE_PROTO||"");return g?"Symbol(src)_1."+g:""})(),kf=go.toString,Qd=Rf.call(wn),i2=Tn._,s2=Mf("^"+Rf.call(dn).replace(Bs,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Nf=Ym?Ke.Buffer:n,Zo=Ke.Symbol,Df=Ke.Uint8Array,c0=Nf?Nf.allocUnsafe:n,js=a0(wn.getPrototypeOf,wn),Xd=wn.create,Yd=go.propertyIsEnumerable,Kd=Go.splice,o2=Zo?Zo.isConcatSpreadable:n,Jo=Zo?Zo.iterator:n,Yl=Zo?Zo.toStringTag:n,Bf=(function(){try{var g=rl(wn,"defineProperty");return g({},"",{}),g}catch{}})(),a2=Ke.clearTimeout!==Tn.clearTimeout&&Ke.clearTimeout,Fn=vt&&vt.now!==Tn.Date.now&&vt.now,u0=Ke.setTimeout!==Tn.setTimeout&&Ke.setTimeout,Kl=fr.ceil,Qa=fr.floor,Gd=wn.getOwnPropertySymbols,f0=Nf?Nf.isBuffer:n,iu=Ke.isFinite,Zd=Go.join,su=a0(wn.keys,wn),hr=fr.max,Zr=fr.min,a3=vt.now,l2=Ke.parseInt,Lf=fr.random,Jd=Go.reverse,Ff=rl(Ke,"DataView"),Gl=rl(Ke,"Map"),Uf=rl(Ke,"Promise"),Xa=rl(Ke,"Set"),zf=rl(Ke,"WeakMap"),ou=rl(wn,"create"),ep=zf&&new zf,au={},h0=il(Ff),Ya=il(Gl),c2=il(Uf),lu=il(Xa),mo=il(zf),Ka=Zo?Zo.prototype:n,es=Ka?Ka.valueOf:n,tp=Ka?Ka.toString:n;function se(g){if(pr(g)&&!Qt(g)&&!(g instanceof qt)){if(g instanceof Jr)return g;if(dn.call(g,"__wrapped__"))return L2(g)}return new Jr(g)}var cu=(function(){function g(){}return function(_){if(!or(_))return{};if(Xd)return Xd(_);g.prototype=_;var P=new g;return g.prototype=n,P}})();function vo(){}function Jr(g,_){this.__wrapped__=g,this.__actions__=[],this.__chain__=!!_,this.__index__=0,this.__values__=n}se.templateSettings={escape:lo,evaluate:vn,interpolate:Br,variable:"",imports:{_:se}},se.prototype=vo.prototype,se.prototype.constructor=se,Jr.prototype=cu(vo.prototype),Jr.prototype.constructor=Jr;function qt(g){this.__wrapped__=g,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=D,this.__views__=[]}function np(){var g=new qt(this.__wrapped__);return g.__actions__=yi(this.__actions__),g.__dir__=this.__dir__,g.__filtered__=this.__filtered__,g.__iteratees__=yi(this.__iteratees__),g.__takeCount__=this.__takeCount__,g.__views__=yi(this.__views__),g}function d0(){if(this.__filtered__){var g=new qt(this);g.__dir__=-1,g.__filtered__=!0}else g=this.clone(),g.__dir__*=-1;return g}function uu(){var g=this.__wrapped__.value(),_=this.__dir__,P=Qt(g),L=_<0,G=P?g.length:0,oe=j0(0,G,this.__views__),Ee=oe.start,Ie=oe.end,Le=Ie-Ee,et=L?Ie:Ee-1,tt=this.__iteratees__,at=tt.length,mt=0,Pt=Zr(Le,this.__takeCount__);if(!P||!L&&G==Le&&Pt==Le)return yu(g,this.__actions__);var Dt=[];e:for(;
vendor: 10,279 bytes, line 3396
3396Le--&&mt<Pt;){et+=_;for(var Jt=-1,Bt=g[et];++Jt<at;){var sn=tt[Jt],cn=sn.iteratee,Gs=sn.type,ss=cn(Bt);if(Gs==K)Bt=ss;else if(!ss){if(Gs==M)continue e;break e}}Dt[mt++]=Bt}return Dt}qt.prototype=cu(vo.prototype),qt.prototype.constructor=qt;function ki(g){var _=-1,P=g==null?0:g.length;for(this.clear();++_<P;){var L=g[_];this.set(L[0],L[1])}}function Un(){this.__data__=ou?ou(null):{},this.size=0}function On(g){var _=this.has(g)&&delete this.__data__[g];return this.size-=_?1:0,_}function Ga(g){var _=this.__data__;if(ou){var P=_[g];return P===l?n:P}return dn.call(_,g)?_[g]:n}function ei(g){var _=this.__data__;return ou?_[g]!==n:dn.call(_,g)}function Ni(g,_){var P=this.__data__;return this.size+=this.has(g)?0:1,P[g]=ou&&_===n?l:_,this}ki.prototype.clear=Un,ki.prototype.delete=On,ki.prototype.get=Ga,ki.prototype.has=ei,ki.prototype.set=Ni;function vi(g){var _=-1,P=g==null?0:g.length;for(this.clear();++_<P;){var L=g[_];this.set(L[0],L[1])}}function fu(){this.__data__=[],this.size=0}function Di(g){var _=this.__data__,P=ni(_,g);if(P<0)return!1;var L=_.length-1;return P==L?_.pop():Kd.call(_,P,1),--this.size,!0}function rp(g){var _=this.__data__,P=ni(_,g);return P<0?n:_[P][1]}function u2(g){return ni(this.__data__,g)>-1}function f2(g,_){var P=this.__data__,L=ni(P,g);return L<0?(++this.size,P.push([g,_])):P[L][1]=_,this}vi.prototype.clear=fu,vi.prototype.delete=Di,vi.prototype.get=rp,vi.prototype.has=u2,vi.prototype.set=f2;function vs(g){var _=-1,P=g==null?0:g.length;for(this.clear();++_<P;){var L=g[_];this.set(L[0],L[1])}}function h2(){this.size=0,this.__data__={hash:new ki,map:new(Gl||vi),string:new ki}}function ea(g){var _=nh(this,g).delete(g);return this.size-=_?1:0,_}function ip(g){return nh(this,g).get(g)}function p0(g){return nh(this,g).has(g)}function d2(g,_){var P=nh(this,g),L=P.size;return P.set(g,_),this.size+=P.size==L?0:1,this}vs.prototype.clear=h2,vs.prototype.delete=ea,vs.prototype.get=ip,vs.prototype.has=p0,vs.prototype.set=d2;function Zl(g){var _=-1,P=g==null?0:g.length;for(this.__data__=new vs;++_<P;)this.add(g[_])}function Za(g){return this.__data__.set(g,l),this}function hu(g){return this.__data__.has(g)}Zl.prototype.add=Zl.prototype.push=Za,Zl.prototype.has=hu;function ti(g){var _=this.__data__=new vi(g);this.size=_.size}function sp(){this.__data__=new vi,this.size=0}function op(g){var _=this.__data__,P=_.delete(g);return this.size=_.size,P}function ys(g){return this.__data__.get(g)}function bs(g){return this.__data__.has(g)}function Jl(g,_){var P=this.__data__;if(P instanceof vi){var L=P.__data__;if(!Gl||L.length<i-1)return L.push([g,_]),this.size=++P.size,this;P=this.__data__=new vs(L)}return P.set(g,_),this.size=P.size,this}ti.prototype.clear=sp,ti.prototype.delete=op,ti.prototype.get=ys,ti.prototype.has=bs,ti.prototype.set=Jl;function yo(g,_){var P=Qt(g),L=!P&&ph(g),G=!P&&!L&&Pu(g),oe=!P&&!L&&!G&&Yp(g),Ee=P||L||G||oe,Ie=Ee?s0(g.length,o3):[],Le=Ie.length;for(var et in g)(_||dn.call(g,et))&&!(Ee&&(et=="length"||G&&(et=="offset"||et=="parent")||oe&&(et=="buffer"||et=="byteLength"||et=="byteOffset")||Hn(et,Le)))&&Ie.push(et);return Ie}function bo(g){var _=g.length;return _?g[mu(0,_-1)]:n}function ec(g,_){return Rp(yi(g),ta(_,0,g.length))}function p2(g){return Rp(yi(g))}function jf(g,_,P){(P!==n&&!fa(g[_],P)||P===n&&!(_ in g))&&_o(g,_,P)}function tc(g,_,P){var L=g[_];(!(dn.call(g,_)&&fa(L,P))||P===n&&!(_ in g))&&_o(g,_,P)}function ni(g,_){for(var P=g.length;P--;)if(fa(g[P][0],_))return P;return-1}function ts(g,_,P,L){return xo(g,function(G,oe,Ee){_(L,G,P(G),Ee)}),L}function zn(g,_){return g&&Ws(_,si(_),g)}function Vs(g,_){return g&&Ws(_,Ps(_),g)}function _o(g,_,P){_=="__proto__"&&Bf?Bf(g,_,{configurable:!0,enumerable:!0,value:P,writable:!0}):g[_]=P}function ap(g,_){for(var P=-1,L=_.length,G=We(L),oe=g==null;++P<L;)G[P]=oe?n:M3(g,_[P]);return G}function ta(g,_,P){return g===g&&(P!==n&&(g=g<=P?g:P),_!==n&&(g=g>=_?g:_)),g}function Bi(g,_,P,L,G,oe){var Ee,Ie=_&h,Le=_&d,et=_&m;if(P&&(Ee=G?P(g,L,G,oe):P(g)),Ee!==n)return Ee;if(!or(g))return g;var tt=Qt(g);if(tt){if(Ee=ih(g),!Ie)return yi(g,Ee)}else{var at=jr(g),mt=at==ve||at==ue;if(Pu(g))return I0(g,Ie);if(at==Z||at==fe||mt&&!G){if(Ee=Le||mt?{}:Vr(g),!Ie)return Le?c3(g,Vs(Ee,g)):_p(g,zn(Ee,g))}else{if(!Ye[at])return G?g:{};Ee=u3(g,at,Ie)}}oe||(oe=new ti);var Pt=oe.get(g);if(Pt)return Pt;oe.set(g,Ee),IR(g)?g.forEach(function(Bt){Ee.add(Bi(Bt,_,P,Bt,g,oe))}):CR(g)&&g.forEach(function(Bt,sn){Ee.set(sn,Bi(Bt,_,P,sn,g,oe))});var Dt=et?Le?th:eh:Le?Ps:si,Jt=tt?n:Dt(g);return Gr(Jt||g,function(Bt,sn){Jt&&(sn=Bt,Bt=g[sn]),tc(Ee,sn,Bi(Bt,_,P,sn,g,oe))}),Ee}function g2(g){var _=si(g);return function(P){return Vf(P,g,_)}}function Vf(g,_,P){var L=P.length;if(g==null)return!L;for(g=wn(g);L--;){var G=P[L],oe=_[G],Ee=g[G];if(Ee===n&&!(G in g)||!oe(Ee))return!1}return!0}function g0(g,_,P){if(typeof g!="function")throw new ms(o);return Su(function(){g.apply(n,P)},_)}function wo(g,_,P,L){var G=-1,oe=zd,Ee=!0,Ie=g.length,Le=[],et=_.length;if(!Ie)return Le;P&&(_=In(_,Zi(P))),L?(oe=Jm,Ee=!1):_.length>=i&&(oe=Ko,Ee=!1,_=new Zl(_));e:for(;++G<Ie;){var tt=g[G],at=P==null?tt:P(tt);if(tt=L||tt!==0?tt:0,Ee&&at===at){for(var mt=et;mt--;)if(_[mt]===at)continue e;Le.push(tt)}else oe(_,at,L)||Le.push(tt)}return Le}var xo=Es(ns),m2=Es(Ja,!0);function Wf(g,_){var P=!0;return xo(g,function(L,G,oe){return P=!!_(L,G,oe),P}),P}function nc(g,_,P){for(var L=-1,G=g.length;++L<G;){var oe=g[L],Ee=_(oe);if(Ee!=null&&(Ie===n?Ee===Ee&&!Ks(Ee):P(Ee,Ie)))var Ie=Ee,Le=oe}return Le}function v2(g,_,P,L){var G=g.length;for(P=Gt(P),P<0&&(P=-P>G?0:G+P),L=L===n||L>G?G:Gt(L),L<0&&(L+=G),L=P>L?0:MR(L);P<L;)g[P++]=_;return g}function m0(g,_){var P=[];return xo(g,function(L,G,oe){_(L,G,oe)&&P.push(L)}),P}function Jn(g,_,P,L,G){var oe=-1,Ee=g.length;for(P||(P=Ip),G||(G=[]);++oe<Ee;){var Ie=g[oe];_>0&&P(Ie)?_>1?Jn(Ie,_-1,P,L,G):Ha(G,Ie):L||(G[G.length]=Ie)}return G}var lp=xp(),$f=xp(!0);function ns(g,_){return g&&lp(g,_,si)}function Ja(g,_){return g&&$f(g,_,si)}function du(g,_){return $a(_,function(P){return gc(g[P])})}function na(g,_){_=So(_,g);for(var P=0,L=_.length;g!=null&&P<L;)g=g[Qs(_[P++])];return P&&P==L?g:n}function cp(g,_,P){var L=_(g);return Qt(g)?L:Ha(L,P(g))}function Ur(g){return g==null?g===n?nt:ne:Yl&&Yl in wn(g)?Pp(g):W0(g)}function el(g,_){return g>_}function _s(g,_){return g!=null&&dn.call(g,_)}function rc(g,_){return g!=null&&_ in wn(g)}function v0(g,_,P){return g>=Zr(_,P)&&g<hr(_,P)}function up(g,_,P){for(var L=P?Jm:zd,G=g[0].length,oe=g.length,Ee=oe,Ie=We(oe),Le=1/0,et=[];Ee--;){var tt=g[Ee];Ee&&_&&(tt=In(tt,Zi(_))),Le=Zr(tt.length,Le),Ie[Ee]=!P&&(_||G>=120&&tt.length>=120)?new Zl(Ee&&tt):n}tt=g[0];var at=-1,mt=Ie[0];e:for(;++at<G&&et.length<Le;){var Pt=tt[at],Dt=_?_(Pt):Pt;if(Pt=P||Pt!==0?Pt:0,!(mt?Ko(mt,Dt):L(et,Dt,P))){for(Ee=oe;--Ee;){var Jt=Ie[Ee];if(!(Jt?Ko(Jt,Dt):L(g[Ee],Dt,P)))continue e}mt&&mt.push(Dt),et.push(Pt)}}return et}function ra(g,_,P,L){return ns(g,function(G,oe,Ee){_(L,P(G),oe,Ee)}),L}function ws(g,_,P){_=So(_,g),g=Tr(g,_);var L=g==null?g:g[Qs(wi(_))];return L==null?n:mi(L,g,P)}function fp(g){return pr(g)&&Ur(g)==fe}function y2(g){return pr(g)&&Ur(g)==It}function ia(g){return pr(g)&&Ur(g)==me}function xs(g,_,P,L,G){return g===_?!0:g==null||_==null||!pr(g)&&!pr(_)?g!==g&&_!==_:hp(g,_,P,L,xs,G)}function hp(g,_,P,L,G,oe){var Ee=Qt(g),Ie=Qt(_),Le=Ee?$e:jr(g),et=Ie?$e:jr(_);Le=Le==fe?Z:Le,et=et==fe?Z:et;var tt=Le==Z,at=et==Z,mt=Le==et;if(mt&&Pu(g)){if(!Pu(_))return!1;Ee=!0,tt=!1}if(mt&&!tt)return oe||(oe=new ti),Ee||Yp(g)?U0(g,_,P,L,G,oe):z0(g,_,Le,P,L,G,oe);if(!(P&y)){var Pt=tt&&dn.call(g,"__wrapped__"),Dt=at&&dn.call(_,"__wrapped__");if(Pt||Dt){var Jt=Pt?g.value():g,Bt=Dt?_.value():_;return oe||(oe=new ti),G(Jt,Bt,P,L,oe)}}return mt?(oe||(oe=new ti),I2(g,_,P,L,G,oe)):!1}function b2(g){return pr(g)&&jr(g)==k}function pu(g,_,P,L){var G=P.length,oe=G,Ee=!L;if(g==null)return!oe;for(g=wn(g);G--;){var Ie=P[G];if(Ee&&Ie[2]?Ie[1]!==g[Ie[0]]:!(Ie[0]in g))return!1}for(;++G<oe;){Ie=P[G];var Le=Ie[0],et=g[Le],tt=Ie[1];if(Ee&&Ie[2]){if(et===n&&!(Le in g))return!1}else{var at=new ti;if(L)var mt=L(et,tt,Le,g,_,at);if(!(mt===n?xs(tt,et,y|v,L,at):mt))return!1}}return!0}function y0(g){if(!or(g)||R2(g))return!1;var _=gc(g)?s2:Lr;return _.test(il(g))}function Hf(g){return pr(g)&&Ur(g)==pe}function Ao(g){return pr(g)&&jr(g)==Te}function qf(g){return pr(g)&&G2(g.length)&&!!Ve[Ur(g)]}function gu(g){return typeof g=="function"?g:g==null?Is:typeof g=="object"?Qt(g)?$n(g[0],g[1]):dp(g):VR(g)}function sa(g){if(!ca(g))return su(g);var _=[];for(var P in wn(g))dn.call(g,P)&&P!="constructor"&&_.push(P);return _}function b0(g){if(!or(g))return D2(g);var _=ca(g),P=[];for(var L in g)L=="constructor"&&(_||!dn.call(g,L))||P.push(L);return P}function tl(g,_){return g<_}function _0(g,_){var P=-1,L=Cs(g)?We(g.length):[];return xo(g,function(G,oe,Ee){L[++P]=_(G,oe,Ee)}),L}function dp(g){var _=rh(g);return _.length==1&&_[0][2]?Op(_[0][0],_[0][1]):function(P){return P===g||pu(P,g,_)}}function $n(g,_){return bt(g)&&oh(_)?Op(Qs(g),_):function(P){var L=M3(P,g);return L===n&&L===_?R3(P,g):xs(_,L,y|v)}}function ic(g,_,P,L,G){g!==_&&lp(_,function(oe,Ee){if(G||(G=new ti),or(oe))w0(g,_,Ee,P,ic,L,G);else{var Ie=L?L(Po(g,Ee),oe,Ee+"",g,_,G):n;Ie===n&&(Ie=oe),jf(g,Ee,Ie)}},Ps)}function w0(g,_,P,L,G,oe,Ee){var Ie=Po(g,P),Le=Po(_,P),et=Ee.get(Le);if(et){jf(g,P,et);return}var tt=oe?oe(Ie,Le,P+"",g,_,Ee):n,at=tt===n;if(at){var mt=Qt(Le),Pt=!mt&&Pu(Le),Dt=!mt&&!Pt&&Yp(Le);tt=Le,mt||Pt||Dt?Qt(Ie)?tt=Ie:wr(Ie)?tt=yi(Ie):Pt?(at=!1,tt=I0(Le,!0)):Dt?(at=!1,tt=E2(Le,!0)):tt=[]:a1(Le)||ph(Le)?(tt=Ie,ph(Ie)?tt=RR(Ie):(!or(Ie)||gc(Ie))&&(tt=Vr(Le))):at=!1}at&&(Ee.set(Le,tt),G(tt,Le,L,oe,Ee),Ee.delete(Le)),jf(g,P,tt)}function pp(g,_){var P=g.length;if(P)return _+=_<0?P:0,Hn(_,P)?g[_]:n}function Qf(g,_,P){_.length?_=In(_,function(oe){return Qt(oe)?function(Ee){return na(Ee,oe.length===1?oe[0]:oe)}:oe}):_=[Is];var L=-1;_=In(_,Zi(kt()));var G=_0(g,function(oe,Ee,Ie){var Le=In(_,function(et){return et(oe)});return{criteria:Le,index:++L,value:oe}});return ZA(G,function(oe,Ee){return l3(oe,Ee,P)})}function x0(g,_){return nl(g,_,function(P,L){return R3(g,L)})}function nl(g,_,P){for(var L=-1,G=_.length,oe={};++L<G;){var Ee=_[L],Ie=na(g,Ee);P(Ie,Ee)&&oc(oe,So(Ee,g),Ie)}return oe}function Xn(g){return function(_){return na(_,g)}}
vendor: 8,663 bytes, line 3396
3396function ir(g,_,P,L){var G=L?n0:Zc,oe=-1,Ee=_.length,Ie=g;for(g===_&&(_=yi(_)),P&&(Ie=In(g,Zi(P)));++oe<Ee;)for(var Le=0,et=_[oe],tt=P?P(et):et;(Le=G(Ie,tt,Le,L))>-1;)Ie!==g&&Kd.call(Ie,Le,1),Kd.call(g,Le,1);return g}function br(g,_){for(var P=g?_.length:0,L=P-1;P--;){var G=_[P];if(P==L||G!==oe){var oe=G;Hn(G)?Kd.call(g,G,1):vp(g,G)}}return g}function mu(g,_){return g+Qa(Lf()*(_-g+1))}function Xf(g,_,P,L){for(var G=-1,oe=hr(Kl((_-g)/(P||1)),0),Ee=We(oe);oe--;)Ee[L?oe:++G]=g,g+=P;return Ee}function sc(g,_){var P="";if(!g||_<1||_>Y)return P;do _%2&&(P+=g),_=Qa(_/2),_&&(g+=g);while(_);return P}function Kt(g,_){return rs(Mp(g,_,Is),g+"")}function ri(g){return bo(Kp(g))}function A0(g,_){var P=Kp(g);return Rp(P,ta(_,0,P.length))}function oc(g,_,P,L){if(!or(g))return g;_=So(_,g);for(var G=-1,oe=_.length,Ee=oe-1,Ie=g;Ie!=null&&++G<oe;){var Le=Qs(_[G]),et=P;if(Le==="__proto__"||Le==="constructor"||Le==="prototype")return g;if(G!=Ee){var tt=Ie[Le];et=L?L(tt,Le,Ie):n,et===n&&(et=or(tt)?tt:Hn(_[G+1])?[]:{})}tc(Ie,Le,et),Ie=Ie[Le]}return g}var gp=ep?function(g,_){return ep.set(g,_),g}:Is,Eo=Bf?function(g,_){return Bf(g,"toString",{configurable:!0,enumerable:!1,value:N3(_),writable:!0})}:Is;function As(g){return Rp(Kp(g))}function ii(g,_,P){var L=-1,G=g.length;_<0&&(_=-_>G?0:G+_),P=P>G?G:P,P<0&&(P+=G),G=_>P?0:P-_>>>0,_>>>=0;for(var oe=We(G);++L<G;)oe[L]=g[L+_];return oe}function E0(g,_){var P;return xo(g,function(L,G,oe){return P=_(L,G,oe),!P}),!!P}function vu(g,_,P){var L=0,G=g==null?L:g.length;if(typeof _=="number"&&_===_&&G<=he){for(;L<G;){var oe=L+G>>>1,Ee=g[oe];Ee!==null&&!Ks(Ee)&&(P?Ee<=_:Ee<_)?L=oe+1:G=oe}return G}return mp(g,_,Is,P)}function mp(g,_,P,L){var G=0,oe=g==null?0:g.length;if(oe===0)return 0;_=P(_);for(var Ee=_!==_,Ie=_===null,Le=Ks(_),et=_===n;G<oe;){var tt=Qa((G+oe)/2),at=P(g[tt]),mt=at!==n,Pt=at===null,Dt=at===at,Jt=Ks(at);if(Ee)var Bt=L||Dt;else et?Bt=Dt&&(L||mt):Ie?Bt=Dt&&mt&&(L||!Pt):Le?Bt=Dt&&mt&&!Pt&&(L||!Jt):Pt||Jt?Bt=!1:Bt=L?at<=_:at<_;Bt?G=tt+1:oe=tt}return Zr(oe,$)}function S0(g,_){for(var P=-1,L=g.length,G=0,oe=[];++P<L;){var Ee=g[P],Ie=_?_(Ee):Ee;if(!P||!fa(Ie,Le)){var Le=Ie;oe[G++]=Ee===0?0:Ee}}return oe}function T0(g){return typeof g=="number"?g:Ks(g)?te:+g}function Li(g){if(typeof g=="string")return g;if(Qt(g))return In(g,Li)+"";if(Ks(g))return tp?tp.call(g):"";var _=g+"";return _=="0"&&1/g==-q?"-0":_}function oa(g,_,P){var L=-1,G=zd,oe=g.length,Ee=!0,Ie=[],Le=Ie;if(P)Ee=!1,G=Jm;else if(oe>=i){var et=_?null:P2(g);if(et)return qa(et);Ee=!1,G=Ko,Le=new Zl}else Le=_?[]:Ie;e:for(;++L<oe;){var tt=g[L],at=_?_(tt):tt;if(tt=P||tt!==0?tt:0,Ee&&at===at){for(var mt=Le.length;mt--;)if(Le[mt]===at)continue e;_&&Le.push(at),Ie.push(tt)}else G(Le,at,P)||(Le!==Ie&&Le.push(at),Ie.push(tt))}return Ie}function vp(g,_){return _=So(_,g),g=Tr(g,_),g==null||delete g[Qs(wi(_))]}function C0(g,_,P,L){return oc(g,_,P(na(g,_)),L)}function Yf(g,_,P,L){for(var G=g.length,oe=L?G:-1;(L?oe--:++oe<G)&&_(g[oe],oe,g););return P?ii(g,L?0:oe,L?oe+1:G):ii(g,L?oe+1:0,L?G:oe)}function yu(g,_){var P=g;return P instanceof qt&&(P=P.value()),e0(_,function(L,G){return G.func.apply(G.thisArg,Ha([L],G.args))},P)}function yp(g,_,P){var L=g.length;if(L<2)return L?oa(g[0]):[];for(var G=-1,oe=We(L);++G<L;)for(var Ee=g[G],Ie=-1;++Ie<L;)Ie!=G&&(oe[G]=wo(oe[G]||Ee,g[Ie],_,P));return oa(Jn(oe,1),_,P)}function Kf(g,_,P){for(var L=-1,G=g.length,oe=_.length,Ee={};++L<G;){var Ie=L<oe?_[L]:n;P(Ee,g[L],Ie)}return Ee}function bu(g){return wr(g)?g:[]}function bp(g){return typeof g=="function"?g:Is}function So(g,_){return Qt(g)?g:bt(g,_)?[g]:q0(xn(g))}var _2=Kt;function aa(g,_,P){var L=g.length;return P=P===n?L:P,!_&&P>=L?g:ii(g,_,P)}var P0=a2||function(g){return Tn.clearTimeout(g)};function I0(g,_){if(_)return g.slice();var P=g.length,L=c0?c0(P):new g.constructor(P);return g.copy(L),L}function Gf(g){var _=new g.constructor(g.byteLength);return new Df(_).set(new Df(g)),_}function w2(g,_){var P=_?Gf(g.buffer):g.buffer;return new g.constructor(P,g.byteOffset,g.byteLength)}function x2(g){var _=new g.constructor(g.source,Ht.exec(g));return _.lastIndex=g.lastIndex,_}function A2(g){return es?wn(es.call(g)):{}}function E2(g,_){var P=_?Gf(g.buffer):g.buffer;return new g.constructor(P,g.byteOffset,g.length)}function O0(g,_){if(g!==_){var P=g!==n,L=g===null,G=g===g,oe=Ks(g),Ee=_!==n,Ie=_===null,Le=_===_,et=Ks(_);if(!Ie&&!et&&!oe&&g>_||oe&&Ee&&Le&&!Ie&&!et||L&&Ee&&Le||!P&&Le||!G)return 1;if(!L&&!oe&&!et&&g<_||et&&P&&G&&!L&&!oe||Ie&&P&&G||!Ee&&G||!Le)return-1}return 0}function l3(g,_,P){for(var L=-1,G=g.criteria,oe=_.criteria,Ee=G.length,Ie=P.length;++L<Ee;){var Le=O0(G[L],oe[L]);if(Le){if(L>=Ie)return Le;var et=P[L];return Le*(et=="desc"?-1:1)}}return g.index-_.index}function S2(g,_,P,L){for(var G=-1,oe=g.length,Ee=P.length,Ie=-1,Le=_.length,et=hr(oe-Ee,0),tt=We(Le+et),at=!L;++Ie<Le;)tt[Ie]=_[Ie];for(;++G<Ee;)(at||G<oe)&&(tt[P[G]]=g[G]);for(;et--;)tt[Ie++]=g[G++];return tt}function M0(g,_,P,L){for(var G=-1,oe=g.length,Ee=-1,Ie=P.length,Le=-1,et=_.length,tt=hr(oe-Ie,0),at=We(tt+et),mt=!L;++G<tt;)at[G]=g[G];for(var Pt=G;++Le<et;)at[Pt+Le]=_[Le];for(;++Ee<Ie;)(mt||G<oe)&&(at[Pt+P[Ee]]=g[G++]);return at}function yi(g,_){var P=-1,L=g.length;for(_||(_=We(L));++P<L;)_[P]=g[P];return _}function Ws(g,_,P,L){var G=!P;P||(P={});for(var oe=-1,Ee=_.length;++oe<Ee;){var Ie=_[oe],Le=L?L(P[Ie],g[Ie],Ie,P,g):n;Le===n&&(Le=g[Ie]),G?_o(P,Ie,Le):tc(P,Ie,Le)}return P}function _p(g,_){return Ws(g,$s(g),_)}function c3(g,_){return Ws(g,O2(g),_)}function wp(g,_){return function(P,L){var G=Qt(P)?Gm:ts,oe=_?_():{};return G(P,g,kt(L,2),oe)}}function _u(g){return Kt(function(_,P){var L=-1,G=P.length,oe=G>1?P[G-1]:n,Ee=G>2?P[2]:n;for(oe=g.length>3&&typeof oe=="function"?(G--,oe):n,Ee&&_i(P[0],P[1],Ee)&&(oe=G<3?n:oe,G=1),_=wn(_);++L<G;){var Ie=P[L];Ie&&g(_,Ie,L,oe)}return _})}function Es(g,_){return function(P,L){if(P==null)return P;if(!Cs(P))return g(P,L);for(var G=P.length,oe=_?G:-1,Ee=wn(P);(_?oe--:++oe<G)&&L(Ee[oe],oe,Ee)!==!1;);return P}}function xp(g){return function(_,P,L){for(var G=-1,oe=wn(_),Ee=L(_),Ie=Ee.length;Ie--;){var Le=Ee[g?Ie:++G];if(P(oe[Le],Le,oe)===!1)break}return _}}function Ap(g,_,P){var L=_&b,G=wu(g);function oe(){var Ee=this&&this!==Tn&&this instanceof oe?G:g;return Ee.apply(L?P:this,arguments)}return oe}function R0(g){return function(_){_=xn(_);var P=eu(_)?Ji(_):n,L=P?P[0]:_.charAt(0),G=P?aa(P,1).join(""):_.slice(1);return L[g]()+G}}function ac(g){return function(_){return e0(zR(UR(_).replace(Xm,"")),g,"")}}function wu(g){return function(){var _=arguments;switch(_.length){case 0:return new g;case 1:return new g(_[0]);case 2:return new g(_[0],_[1]);case 3:return new g(_[0],_[1],_[2]);case 4:return new g(_[0],_[1],_[2],_[3]);case 5:return new g(_[0],_[1],_[2],_[3],_[4]);case 6:return new g(_[0],_[1],_[2],_[3],_[4],_[5]);case 7:return new g(_[0],_[1],_[2],_[3],_[4],_[5],_[6])}var P=cu(g.prototype),L=g.apply(P,_);return or(L)?L:P}}function k0(g,_,P){var L=wu(g);function G(){for(var oe=arguments.length,Ee=We(oe),Ie=oe,Le=la(G);Ie--;)Ee[Ie]=arguments[Ie];var et=oe<3&&Ee[0]!==Le&&Ee[oe-1]!==Le?[]:gs(Ee,Le);if(oe-=et.length,oe<P)return bi(g,_,xu,G.placeholder,n,Ee,et,n,n,P-oe);var tt=this&&this!==Tn&&this instanceof G?L:g;return mi(tt,this,Ee)}return G}function lc(g){return function(_,P,L){var G=wn(_);if(!Cs(_)){var oe=kt(P,3);_=si(_),P=function(Ie){return oe(G[Ie],Ie,G)}}var Ee=g(_,P,L);return Ee>-1?G[oe?_[Ee]:Ee]:n}}function Ep(g){return Co(function(_){var P=_.length,L=P,G=Jr.prototype.thru;for(g&&_.reverse();L--;){var oe=_[L];if(typeof oe!="function")throw new ms(o);if(G&&!Ee&&Au(oe)=="wrapper")var Ee=new Jr([],!0)}for(L=Ee?L:P;++L<P;){oe=_[L];var Ie=Au(oe),Le=Ie=="wrapper"?Cp(oe):n;Le&&sh(Le[0])&&Le[1]==(N|E|I|U)&&!Le[4].length&&Le[9]==1?Ee=Ee[Au(Le[0])].apply(Ee,Le[3]):Ee=oe.length==1&&sh(oe)?Ee[Ie]():Ee.thru(oe)}return function(){var et=arguments,tt=et[0];if(Ee&&et.length==1&&Qt(tt))return Ee.plant(tt).value();for(var at=0,mt=P?_[at].apply(this,et):tt;++at<P;)mt=_[at].call(this,mt);return mt}})}function xu(g,_,P,L,G,oe,Ee,Ie,Le,et){var tt=_&N,at=_&b,mt=_&x,Pt=_&(E|C),Dt=_&F,Jt=mt?n:wu(g);function Bt(){for(var sn=arguments.length,cn=We(sn),Gs=sn;Gs--;)cn[Gs]=arguments[Gs];if(Pt)var ss=la(Bt),Zs=Gy(cn,ss);if(L&&(cn=S2(cn,L,G,Pt)),oe&&(cn=M0(cn,oe,Ee,Pt)),sn-=Zs,Pt&&sn<et){var xr=gs(cn,ss);return bi(g,_,xu,Bt.placeholder,P,cn,xr,Ie,Le,et-sn)}var ha=at?P:this,vc=mt?ha[g]:g;return sn=cn.length,Ie?cn=Hs(cn,Ie):Dt&&sn>1&&cn.reverse(),tt&&Le<sn&&(cn.length=Le),this&&this!==Tn&&this instanceof Bt&&(vc=Jt||wu(vc)),vc.apply(ha,cn)}return Bt}function T2(g,_){return function(P,L){return ra(P,g,_(L),{})}}function Zf(g,_){return function(P,L){var G;if(P===n&&L===n)return _;
vendor: 6,093 bytes, line 3396
3396if(P!==n&&(G=P),L!==n){if(G===n)return L;typeof P=="string"||typeof L=="string"?(P=Li(P),L=Li(L)):(P=T0(P),L=T0(L)),G=g(P,L)}return G}}function Sp(g){return Co(function(_){return _=In(_,Zi(kt())),Kt(function(P){var L=this;return g(_,function(G){return mi(G,L,P)})})})}function Jf(g,_){_=_===n?" ":Li(_);var P=_.length;if(P<2)return P?sc(_,g):_;var L=sc(_,Kl(g/Xl(_)));return eu(_)?aa(Ji(L),0,g).join(""):L.slice(0,g)}function C2(g,_,P,L){var G=_&b,oe=wu(g);function Ee(){for(var Ie=-1,Le=arguments.length,et=-1,tt=L.length,at=We(tt+Le),mt=this&&this!==Tn&&this instanceof Ee?oe:g;++et<tt;)at[et]=L[et];for(;Le--;)at[et++]=arguments[++Ie];return mi(mt,G?P:this,at)}return Ee}function N0(g){return function(_,P,L){return L&&typeof L!="number"&&_i(_,P,L)&&(P=L=n),_=mc(_),P===n?(P=_,_=0):P=mc(P),L=L===n?_<P?1:-1:mc(L),Xf(_,P,L,g)}}function Tp(g){return function(_,P){return typeof _=="string"&&typeof P=="string"||(_=Io(_),P=Io(P)),g(_,P)}}function bi(g,_,P,L,G,oe,Ee,Ie,Le,et){var tt=_&E,at=tt?Ee:n,mt=tt?n:Ee,Pt=tt?oe:n,Dt=tt?n:oe;_|=tt?I:O,_&=~(tt?O:I),_&T||(_&=-4);var Jt=[g,_,G,Pt,at,Dt,mt,Ie,Le,et],Bt=P.apply(n,Jt);return sh(g)&&$0(Bt,Jt),Bt.placeholder=L,H0(Bt,g,_)}function zr(g){var _=fr[g];return function(P,L){if(P=Io(P),L=L==null?0:Zr(Gt(L),292),L&&iu(P)){var G=(xn(P)+"e").split("e"),oe=_(G[0]+"e"+(+G[1]+L));return G=(xn(oe)+"e").split("e"),+(G[0]+"e"+(+G[1]-L))}return _(P)}}var P2=Xa&&1/qa(new Xa([,-0]))[1]==q?function(g){return new Xa(g)}:L3;function D0(g){return function(_){var P=jr(_);return P==k?Wd(_):P==Te?n3(_):JA(_,g(_))}}function To(g,_,P,L,G,oe,Ee,Ie){var Le=_&x;if(!Le&&typeof g!="function")throw new ms(o);var et=L?L.length:0;if(et||(_&=-97,L=G=n),Ee=Ee===n?Ee:hr(Gt(Ee),0),Ie=Ie===n?Ie:Gt(Ie),et-=G?G.length:0,_&O){var tt=L,at=G;L=G=n}var mt=Le?n:Cp(g),Pt=[g,_,P,L,G,tt,at,oe,Ee,Ie];if(mt&&N2(Pt,mt),g=Pt[0],_=Pt[1],P=Pt[2],L=Pt[3],G=Pt[4],Ie=Pt[9]=Pt[9]===n?Le?0:g.length:hr(Pt[9]-et,0),!Ie&&_&(E|C)&&(_&=-25),!_||_==b)var Dt=Ap(g,_,P);else _==E||_==C?Dt=k0(g,_,Ie):(_==I||_==(b|I))&&!G.length?Dt=C2(g,_,P,L):Dt=xu.apply(n,Pt);var Jt=mt?gp:$0;return H0(Jt(Dt,Pt),g,_)}function B0(g,_,P,L){return g===n||fa(g,go[P])&&!dn.call(L,P)?_:g}function L0(g,_,P,L,G,oe){return or(g)&&or(_)&&(oe.set(_,g),ic(g,_,n,L0,oe),oe.delete(_)),g}function F0(g){return a1(g)?n:g}function U0(g,_,P,L,G,oe){var Ee=P&y,Ie=g.length,Le=_.length;if(Ie!=Le&&!(Ee&&Le>Ie))return!1;var et=oe.get(g),tt=oe.get(_);if(et&&tt)return et==_&&tt==g;var at=-1,mt=!0,Pt=P&v?new Zl:n;for(oe.set(g,_),oe.set(_,g);++at<Ie;){var Dt=g[at],Jt=_[at];if(L)var Bt=Ee?L(Jt,Dt,at,_,g,oe):L(Dt,Jt,at,g,_,oe);if(Bt!==n){if(Bt)continue;mt=!1;break}if(Pt){if(!t0(_,function(sn,cn){if(!Ko(Pt,cn)&&(Dt===sn||G(Dt,sn,P,L,oe)))return Pt.push(cn)})){mt=!1;break}}else if(!(Dt===Jt||G(Dt,Jt,P,L,oe))){mt=!1;break}}return oe.delete(g),oe.delete(_),mt}function z0(g,_,P,L,G,oe,Ee){switch(P){case gt:if(g.byteLength!=_.byteLength||g.byteOffset!=_.byteOffset)return!1;g=g.buffer,_=_.buffer;case It:return!(g.byteLength!=_.byteLength||!oe(new Df(g),new Df(_)));case ce:case me:case ie:return fa(+g,+_);case ye:return g.name==_.name&&g.message==_.message;case pe:case we:return g==_+"";case k:var Ie=Wd;case Te:var Le=L&y;if(Ie||(Ie=qa),g.size!=_.size&&!Le)return!1;var et=Ee.get(g);if(et)return et==_;L|=v,Ee.set(g,_);var tt=U0(Ie(g),Ie(_),L,G,oe,Ee);return Ee.delete(g),tt;case Qe:if(es)return es.call(g)==es.call(_)}return!1}function I2(g,_,P,L,G,oe){var Ee=P&y,Ie=eh(g),Le=Ie.length,et=eh(_),tt=et.length;if(Le!=tt&&!Ee)return!1;for(var at=Le;at--;){var mt=Ie[at];if(!(Ee?mt in _:dn.call(_,mt)))return!1}var Pt=oe.get(g),Dt=oe.get(_);if(Pt&&Dt)return Pt==_&&Dt==g;var Jt=!0;oe.set(g,_),oe.set(_,g);for(var Bt=Ee;++at<Le;){mt=Ie[at];var sn=g[mt],cn=_[mt];if(L)var Gs=Ee?L(cn,sn,mt,_,g,oe):L(sn,cn,mt,g,_,oe);if(!(Gs===n?sn===cn||G(sn,cn,P,L,oe):Gs)){Jt=!1;break}Bt||(Bt=mt=="constructor")}if(Jt&&!Bt){var ss=g.constructor,Zs=_.constructor;ss!=Zs&&"constructor"in g&&"constructor"in _&&!(typeof ss=="function"&&ss instanceof ss&&typeof Zs=="function"&&Zs instanceof Zs)&&(Jt=!1)}return oe.delete(g),oe.delete(_),Jt}function Co(g){return rs(Mp(g,n,Np),g+"")}function eh(g){return cp(g,si,$s)}function th(g){return cp(g,Ps,O2)}var Cp=ep?function(g){return ep.get(g)}:L3;function Au(g){for(var _=g.name+"",P=au[_],L=dn.call(au,_)?P.length:0;L--;){var G=P[L],oe=G.func;if(oe==null||oe==g)return G.name}return _}function la(g){var _=dn.call(se,"placeholder")?se:g;return _.placeholder}function kt(){var g=se.iteratee||D3;return g=g===D3?gu:g,arguments.length?g(arguments[0],arguments[1]):g}function nh(g,_){var P=g.__data__;return Eu(_)?P[typeof _=="string"?"string":"hash"]:P.map}function rh(g){for(var _=si(g),P=_.length;P--;){var L=_[P],G=g[L];_[P]=[L,G,oh(G)]}return _}function rl(g,_){var P=Jc(g,_);return y0(P)?P:n}function Pp(g){var _=dn.call(g,Yl),P=g[Yl];try{g[Yl]=n;var L=!0}catch{}var G=kf.call(g);return L&&(_?g[Yl]=P:delete g[Yl]),G}var $s=Gd?function(g){return g==null?[]:(g=wn(g),$a(Gd(g),function(_){return Yd.call(g,_)}))}:F3,O2=Gd?function(g){for(var _=[];g;)Ha(_,$s(g)),g=js(g);return _}:F3,jr=Ur;(Ff&&jr(new Ff(new ArrayBuffer(1)))!=gt||Gl&&jr(new Gl)!=k||Uf&&jr(Uf.resolve())!=J||Xa&&jr(new Xa)!=Te||zf&&jr(new zf)!=Xe)&&(jr=function(g){var _=Ur(g),P=_==Z?g.constructor:n,L=P?il(P):"";if(L)switch(L){case h0:return gt;case Ya:return k;case c2:return J;case lu:return Te;case mo:return Xe}return _});function j0(g,_,P){for(var L=-1,G=P.length;++L<G;){var oe=P[L],Ee=oe.size;switch(oe.type){case"drop":g+=Ee;break;case"dropRight":_-=Ee;break;case"take":_=Zr(_,g+Ee);break;case"takeRight":g=hr(g,_-Ee);break}}return{start:g,end:_}}function M2(g){var _=g.match(Us);return _?_[1].split(Ba):[]}function V0(g,_,P){_=So(_,g);for(var L=-1,G=_.length,oe=!1;++L<G;){var Ee=Qs(_[L]);if(!(oe=g!=null&&P(g,Ee)))break;g=g[Ee]}return oe||++L!=G?oe:(G=g==null?0:g.length,!!G&&G2(G)&&Hn(Ee,G)&&(Qt(g)||ph(g)))}function ih(g){var _=g.length,P=new g.constructor(_);return _&&typeof g[0]=="string"&&dn.call(g,"index")&&(P.index=g.index,P.input=g.input),P}function Vr(g){return typeof g.constructor=="function"&&!ca(g)?cu(js(g)):{}}
vendor: 6,081 bytes, lines 3396-3398
3396function u3(g,_,P){var L=g.constructor;switch(_){case It:return Gf(g);case ce:case me:return new L(+g);case gt:return w2(g,P);case Yt:case en:case _t:case Mt:case ht:case $t:case Zn:case on:case Ut:return E2(g,P);case k:return new L;case ie:case we:return new L(g);case pe:return x2(g);case Te:return new L;case Qe:return A2(g)}}function f3(g,_){var P=_.length;if(!P)return g;var L=P-1;return _[L]=(P>1?"& ":"")+_[L],_=_.join(P>2?", ":" "),g.replace(Fs,`{
3397/* [wrapped with `+_+`] */
3398`)}function Ip(g){return Qt(g)||ph(g)||!!(o2&&g&&g[o2])}function Hn(g,_){var P=typeof g;return _=_??Y,!!_&&(P=="number"||P!="symbol"&&Fa.test(g))&&g>-1&&g%1==0&&g<_}function _i(g,_,P){if(!or(P))return!1;var L=typeof _;return(L=="number"?Cs(P)&&Hn(_,P.length):L=="string"&&_ in P)?fa(P[_],g):!1}function bt(g,_){if(Qt(g))return!1;var P=typeof g;return P=="number"||P=="symbol"||P=="boolean"||g==null||Ks(g)?!0:Ho.test(g)||!Da.test(g)||_!=null&&g in wn(_)}function Eu(g){var _=typeof g;return _=="string"||_=="number"||_=="symbol"||_=="boolean"?g!=="__proto__":g===null}function sh(g){var _=Au(g),P=se[_];if(typeof P!="function"||!(_ in qt.prototype))return!1;if(g===P)return!0;var L=Cp(P);return!!L&&g===L[0]}function R2(g){return!!qd&&qd in g}var h3=nu?gc:U3;function ca(g){var _=g&&g.constructor,P=typeof _=="function"&&_.prototype||go;return g===P}function oh(g){return g===g&&!or(g)}function Op(g,_){return function(P){return P==null?!1:P[g]===_&&(_!==n||g in wn(P))}}function k2(g){var _=je(g,function(L){return P.size===c&&P.clear(),L}),P=_.cache;return _}function N2(g,_){var P=g[1],L=_[1],G=P|L,oe=G<(b|x|N),Ee=L==N&&P==E||L==N&&P==U&&g[7].length<=_[8]||L==(N|U)&&_[7].length<=_[8]&&P==E;if(!(oe||Ee))return g;L&b&&(g[2]=_[2],G|=P&b?0:T);var Ie=_[3];if(Ie){var Le=g[3];g[3]=Le?S2(Le,Ie,_[4]):Ie,g[4]=Le?gs(g[3],u):_[4]}return Ie=_[5],Ie&&(Le=g[5],g[5]=Le?M0(Le,Ie,_[6]):Ie,g[6]=Le?gs(g[5],u):_[6]),Ie=_[7],Ie&&(g[7]=Ie),L&N&&(g[8]=g[8]==null?_[8]:Zr(g[8],_[8])),g[9]==null&&(g[9]=_[9]),g[0]=_[0],g[1]=G,g}function D2(g){var _=[];if(g!=null)for(var P in wn(g))_.push(P);return _}function W0(g){return kf.call(g)}function Mp(g,_,P){return _=hr(_===n?g.length-1:_,0),function(){for(var L=arguments,G=-1,oe=hr(L.length-_,0),Ee=We(oe);++G<oe;)Ee[G]=L[_+G];G=-1;for(var Ie=We(_+1);++G<_;)Ie[G]=L[G];return Ie[_]=P(Ee),mi(g,this,Ie)}}function Tr(g,_){return _.length<2?g:na(g,ii(_,0,-1))}function Hs(g,_){for(var P=g.length,L=Zr(_.length,P),G=yi(g);L--;){var oe=_[L];g[L]=Hn(oe,P)?G[oe]:n}return g}function Po(g,_){if(!(_==="constructor"&&typeof g[_]=="function")&&_!="__proto__")return g[_]}var $0=qs(gp),Su=u0||function(g,_){return Tn.setTimeout(g,_)},rs=qs(Eo);function H0(g,_,P){var L=_+"";return rs(g,f3(L,B2(M2(L),P)))}function qs(g){var _=0,P=0;return function(){var L=a3(),G=V-(L-P);if(P=L,G>0){if(++_>=z)return arguments[0]}else _=0;return g.apply(n,arguments)}}function Rp(g,_){var P=-1,L=g.length,G=L-1;for(_=_===n?L:_;++P<_;){var oe=mu(P,G),Ee=g[oe];g[oe]=g[P],g[P]=Ee}return g.length=_,g}var q0=k2(function(g){var _=[];return g.charCodeAt(0)===46&&_.push(""),g.replace(pi,function(P,L,G,oe){_.push(G?oe.replace(wf,"$1"):L||P)}),_});function Qs(g){if(typeof g=="string"||Ks(g))return g;var _=g+"";return _=="0"&&1/g==-q?"-0":_}function il(g){if(g!=null){try{return Rf.call(g)}catch{}try{return g+""}catch{}}return""}function B2(g,_){return Gr(Se,function(P){var L="_."+P[0];_&P[1]&&!zd(g,L)&&g.push(L)}),g.sort()}function L2(g){if(g instanceof qt)return g.clone();var _=new Jr(g.__wrapped__,g.__chain__);return _.__actions__=yi(g.__actions__),_.__index__=g.__index__,_.__values__=g.__values__,_}function kp(g,_,P){(P?_i(g,_,P):_===n)?_=1:_=hr(Gt(_),0);var L=g==null?0:g.length;if(!L||_<1)return[];for(var G=0,oe=0,Ee=We(Kl(L/_));G<L;)Ee[oe++]=ii(g,G,G+=_);return Ee}function Q0(g){for(var _=-1,P=g==null?0:g.length,L=0,G=[];++_<P;){var oe=g[_];oe&&(G[L++]=oe)}return G}function Ss(){var g=arguments.length;if(!g)return[];for(var _=We(g-1),P=arguments[0],L=g;L--;)_[L-1]=arguments[L];return Ha(Qt(P)?yi(P):[P],Jn(_,1))}var ln=Kt(function(g,_){return wr(g)?wo(g,Jn(_,1,wr,!0)):[]}),Cr=Kt(function(g,_){var P=wi(_);return wr(P)&&(P=n),wr(g)?wo(g,Jn(_,1,wr,!0),kt(P,2)):[]}),dr=Kt(function(g,_){var P=wi(_);return wr(P)&&(P=n),wr(g)?wo(g,Jn(_,1,wr,!0),n,P):[]});function Wr(g,_,P){var L=g==null?0:g.length;return L?(_=P||_===n?1:Gt(_),ii(g,_<0?0:_,L)):[]}function is(g,_,P){var L=g==null?0:g.length;return L?(_=P||_===n?1:Gt(_),_=L-_,ii(g,0,_<0?0:_)):[]}function Tu(g,_){return g&&g.length?Yf(g,kt(_,3),!0,!0):[]}function _r(g,_){return g&&g.length?Yf(g,kt(_,3),!0):[]}function ah(g,_,P,L){var G=g==null?0:g.length;return G?(P&&typeof P!="number"&&_i(g,_,P)&&(P=0,L=G),v2(g,_,P,L)):[]}function sl(g,_,P){var L=g==null?0:g.length;if(!L)return-1;var G=P==null?0:Gt(P);return G<0&&(G=hr(L+G,0)),jd(g,kt(_,3),G)}function lh(g,_,P){var L=g==null?0:g.length;if(!L)return-1;var G=L-1;return P!==n&&(G=Gt(P),G=P<0?hr(L+G,0):Zr(G,L-1)),jd(g,kt(_,3),G,!0)}function Np(g){var _=g==null?0:g.length;return _?Jn(g,1):[]}function ch(g){var _=g==null?0:g.length;return _?Jn(g,q):[]}function Fi(g,_){var P=g==null?0:g.length;return P?(_=_===n?1:Gt(_),Jn(g,_)):[]}function X0(g){for(var _=-1,P=g==null?0:g.length,L={};++_<P;){var G=g[_];L[G[0]]=G[1]}return L}function cc(g){return g&&g.length?g[0]:n}function ua(g,_,P){var L=g==null?0:g.length;if(!L)return-1;var G=P==null?0:Gt(P);return G<0&&(G=hr(L+G,0)),Zc(g,_,G)}function Dp(g){var _=g==null?0:g.length;return _?ii(g,0,-1):[]}var Y0=Kt(function(g){var _=In(g,bu);return _.length&&_[0]===g[0]?up(_):[]}),ol=Kt(function(g){var _=wi(g),P=In(g,bu);return _===wi(P)?_=n:P.pop(),P.length&&P[0]===g[0]?up(P,kt(_,2)):[]}),Bp=Kt(function(g){var _=wi(g),P=In(g,bu);return _=typeof _=="function"?_:n,_&&P.pop(),P.length&&P[0]===g[0]?up(P,n,_):[]});function al(g,_){return g==null?"":Zd.call(g,_)}function wi(g){var _=g==null?0:g.length;return _?g[_-1]:n}function uh(g,_,P){var L=g==null?0:g.length;if(!L)return-1;var G=L;return P!==n&&(G=Gt(P),G=G<0?hr(L+G,0):Zr(G,L-1)),_===_?r3(g,_,G):jd(g,qy,G,!0)}function K0(g,_){return g&&g.length?pp(g,Gt(_)):n}var Lp=Kt(fh);
vendor: 6,029 bytes, line 3398
3398function fh(g,_){return g&&g.length&&_&&_.length?ir(g,_):g}function xi(g,_,P){return g&&g.length&&_&&_.length?ir(g,_,kt(P,2)):g}function ll(g,_,P){return g&&g.length&&_&&_.length?ir(g,_,n,P):g}var Xs=Co(function(g,_){var P=g==null?0:g.length,L=ap(g,_);return br(g,In(_,function(G){return Hn(G,P)?+G:G}).sort(O0)),L});function Ui(g,_){var P=[];if(!(g&&g.length))return P;var L=-1,G=[],oe=g.length;for(_=kt(_,3);++L<oe;){var Ee=g[L];_(Ee,L,g)&&(P.push(Ee),G.push(L))}return br(g,G),P}function Fp(g){return g==null?g:Jd.call(g)}function G0(g,_,P){var L=g==null?0:g.length;return L?(P&&typeof P!="number"&&_i(g,_,P)?(_=0,P=L):(_=_==null?0:Gt(_),P=P===n?L:Gt(P)),ii(g,_,P)):[]}function Z0(g,_){return vu(g,_)}function d3(g,_,P){return mp(g,_,kt(P,2))}function cl(g,_){var P=g==null?0:g.length;if(P){var L=vu(g,_);if(L<P&&fa(g[L],_))return L}return-1}function F2(g,_){return vu(g,_,!0)}function J0(g,_,P){return mp(g,_,kt(P,2),!0)}function uc(g,_){var P=g==null?0:g.length;if(P){var L=vu(g,_,!0)-1;if(fa(g[L],_))return L}return-1}function e1(g){return g&&g.length?S0(g):[]}function fc(g,_){return g&&g.length?S0(g,kt(_,2)):[]}function U2(g){var _=g==null?0:g.length;return _?ii(g,1,_):[]}function z2(g,_,P){return g&&g.length?(_=P||_===n?1:Gt(_),ii(g,0,_<0?0:_)):[]}function t1(g,_,P){var L=g==null?0:g.length;return L?(_=P||_===n?1:Gt(_),_=L-_,ii(g,_<0?0:_,L)):[]}function Up(g,_){return g&&g.length?Yf(g,kt(_,3),!1,!0):[]}function p3(g,_){return g&&g.length?Yf(g,kt(_,3)):[]}var g3=Kt(function(g){return oa(Jn(g,1,wr,!0))}),j2=Kt(function(g){var _=wi(g);return wr(_)&&(_=n),oa(Jn(g,1,wr,!0),kt(_,2))}),V2=Kt(function(g){var _=wi(g);return _=typeof _=="function"?_:n,oa(Jn(g,1,wr,!0),n,_)});function hc(g){return g&&g.length?oa(g):[]}function m3(g,_){return g&&g.length?oa(g,kt(_,2)):[]}function Cu(g,_){return _=typeof _=="function"?_:n,g&&g.length?oa(g,n,_):[]}function zp(g){if(!(g&&g.length))return[];var _=0;return g=$a(g,function(P){if(wr(P))return _=hr(P.length,_),!0}),s0(_,function(P){return In(g,r0(P))})}function Yn(g,_){if(!(g&&g.length))return[];var P=zp(g);return _==null?P:In(P,function(L){return mi(_,n,L)})}var v3=Kt(function(g,_){return wr(g)?wo(g,_):[]}),W2=Kt(function(g){return yp($a(g,wr))}),y3=Kt(function(g){var _=wi(g);return wr(_)&&(_=n),yp($a(g,wr),kt(_,2))}),b3=Kt(function(g){var _=wi(g);return _=typeof _=="function"?_:n,yp($a(g,wr),n,_)}),$2=Kt(zp);function H2(g,_){return Kf(g||[],_||[],tc)}function _3(g,_){return Kf(g||[],_||[],oc)}var Ts=Kt(function(g){var _=g.length,P=_>1?g[_-1]:n;return P=typeof P=="function"?(g.pop(),P):n,Yn(g,P)});function jp(g){var _=se(g);return _.__chain__=!0,_}function w3(g,_){return _(g),g}function Ys(g,_){return _(g)}var Vp=Co(function(g){var _=g.length,P=_?g[0]:0,L=this.__wrapped__,G=function(oe){return ap(oe,g)};return _>1||this.__actions__.length||!(L instanceof qt)||!Hn(P)?this.thru(G):(L=L.slice(P,+P+(_?1:0)),L.__actions__.push({func:Ys,args:[G],thisArg:n}),new Jr(L,this.__chain__).thru(function(oe){return _&&!oe.length&&oe.push(n),oe}))});function dc(){return jp(this)}function Wp(){return new Jr(this.value(),this.__chain__)}function n1(){this.__values__===n&&(this.__values__=OR(this.value()));var g=this.__index__>=this.__values__.length,_=g?n:this.__values__[this.__index__++];return{done:g,value:_}}function r1(){return this}function x3(g){for(var _,P=this;P instanceof vo;){var L=L2(P);L.__index__=0,L.__values__=n,_?G.__wrapped__=L:_=L;var G=L;P=P.__wrapped__}return G.__wrapped__=g,_}function i1(){var g=this.__wrapped__;if(g instanceof qt){var _=g;return this.__actions__.length&&(_=new qt(this)),_=_.reverse(),_.__actions__.push({func:Ys,args:[Fp],thisArg:n}),new Jr(_,this.__chain__)}return this.thru(Fp)}function A3(){return yu(this.__wrapped__,this.__actions__)}var q2=wp(function(g,_,P){dn.call(g,P)?++g[P]:_o(g,P,1)});function Q2(g,_,P){var L=Qt(g)?Zm:Wf;return P&&_i(g,_,P)&&(_=n),L(g,kt(_,3))}function $p(g,_){var P=Qt(g)?$a:m0;return P(g,kt(_,3))}var Hp=lc(sl),X2=lc(lh);function s1(g,_){return Jn(pc(g,_),1)}function E3(g,_){return Jn(pc(g,_),q)}function Y2(g,_,P){return P=P===n?1:Gt(P),Jn(pc(g,_),P)}function qp(g,_){var P=Qt(g)?Gr:xo;return P(g,kt(_,3))}function hh(g,_){var P=Qt(g)?Ud:m2;return P(g,kt(_,3))}var o1=wp(function(g,_,P){dn.call(g,P)?g[P].push(_):_o(g,P,[_])});function Qp(g,_,P,L){g=Cs(g)?g:Kp(g),P=P&&!L?Gt(P):0;var G=g.length;return P<0&&(P=hr(G+P,0)),Z2(g)?P<=G&&g.indexOf(_,P)>-1:!!G&&Zc(g,_,P)>-1}var K2=Kt(function(g,_,P){var L=-1,G=typeof _=="function",oe=Cs(g)?We(g.length):[];return xo(g,function(Ee){oe[++L]=G?mi(_,Ee,P):ws(Ee,_,P)}),oe}),S3=wp(function(g,_,P){_o(g,P,_)});function pc(g,_){var P=Qt(g)?In:_0;return P(g,kt(_,3))}function T3(g,_,P,L){return g==null?[]:(Qt(_)||(_=_==null?[]:[_]),P=L?n:P,Qt(P)||(P=P==null?[]:[P]),Qf(g,_,P))}var dh=wp(function(g,_,P){g[P?0:1].push(_)},function(){return[[],[]]});function C3(g,_,P){var L=Qt(g)?e0:Xy,G=arguments.length<3;return L(g,kt(_,4),P,G,xo)}function Xp(g,_,P){var L=Qt(g)?YA:Xy,G=arguments.length<3;return L(g,kt(_,4),P,G,m2)}function f(g,_){var P=Qt(g)?$a:m0;return P(g,ct(kt(_,3)))}function p(g){var _=Qt(g)?bo:ri;return _(g)}function w(g,_,P){(P?_i(g,_,P):_===n)?_=1:_=Gt(_);var L=Qt(g)?ec:A0;return L(g,_)}function S(g){var _=Qt(g)?p2:As;return _(g)}function R(g){if(g==null)return 0;if(Cs(g))return Z2(g)?Xl(g):g.length;var _=jr(g);return _==k||_==Te?g.size:sa(g).length}function B(g,_,P){var L=Qt(g)?t0:E0;return P&&_i(g,_,P)&&(_=n),L(g,kt(_,3))}var ee=Kt(function(g,_){if(g==null)return[];var P=_.length;return P>1&&_i(g,_[0],_[1])?_=[]:P>2&&_i(_[0],_[1],_[2])&&(_=[_[0]]),Qf(g,Jn(_,1),[])}),_e=Fn||function(){return Tn.Date.now()};function Pe(g,_){if(typeof _!="function")throw new ms(o);return g=Gt(g),function(){if(--g<1)return _.apply(this,arguments)}}function He(g,_,P){return _=P?n:_,_=g&&_==null?g.length:_,To(g,N,n,n,n,n,_)}function ot(g,_){var P;if(typeof _!="function")throw new ms(o);return g=Gt(g),function(){return--g>0&&(P=_.apply(this,arguments)),g<=1&&(_=n),P}}var lt=Kt(function(g,_,P){var L=b;if(P.length){var G=gs(P,la(lt));L|=I}
vendor: 5,487 bytes, line 3398
3398return To(g,L,_,P,G)}),st=Kt(function(g,_,P){var L=b|x;if(P.length){var G=gs(P,la(st));L|=I}return To(_,L,g,P,G)});function yt(g,_,P){_=P?n:_;var L=To(g,E,n,n,n,n,n,_);return L.placeholder=yt.placeholder,L}function xt(g,_,P){_=P?n:_;var L=To(g,C,n,n,n,n,n,_);return L.placeholder=xt.placeholder,L}function St(g,_,P){var L,G,oe,Ee,Ie,Le,et=0,tt=!1,at=!1,mt=!0;if(typeof g!="function")throw new ms(o);_=Io(_)||0,or(P)&&(tt=!!P.leading,at="maxWait"in P,oe=at?hr(Io(P.maxWait)||0,_):oe,mt="trailing"in P?!!P.trailing:mt);function Pt(xr){var ha=L,vc=G;return L=G=n,et=xr,Ee=g.apply(vc,ha),Ee}function Dt(xr){return et=xr,Ie=Su(sn,_),tt?Pt(xr):Ee}function Jt(xr){var ha=xr-Le,vc=xr-et,WR=_-ha;return at?Zr(WR,oe-vc):WR}function Bt(xr){var ha=xr-Le,vc=xr-et;return Le===n||ha>=_||ha<0||at&&vc>=oe}function sn(){var xr=_e();if(Bt(xr))return cn(xr);Ie=Su(sn,Jt(xr))}function cn(xr){return Ie=n,mt&&L?Pt(xr):(L=G=n,Ee)}function Gs(){Ie!==n&&P0(Ie),et=0,L=Le=G=Ie=n}function ss(){return Ie===n?Ee:cn(_e())}function Zs(){var xr=_e(),ha=Bt(xr);if(L=arguments,G=this,Le=xr,ha){if(Ie===n)return Dt(Le);if(at)return P0(Ie),Ie=Su(sn,_),Pt(Le)}return Ie===n&&(Ie=Su(sn,_)),Ee}return Zs.cancel=Gs,Zs.flush=ss,Zs}var sr=Kt(function(g,_){return g0(g,1,_)}),Ue=Kt(function(g,_,P){return g0(g,Io(_)||0,P)});function Oe(g){return To(g,F)}function je(g,_){if(typeof g!="function"||_!=null&&typeof _!="function")throw new ms(o);var P=function(){var L=arguments,G=_?_.apply(this,L):L[0],oe=P.cache;if(oe.has(G))return oe.get(G);var Ee=g.apply(this,L);return P.cache=oe.set(G,Ee)||oe,Ee};return P.cache=new(je.Cache||vs),P}je.Cache=vs;function ct(g){if(typeof g!="function")throw new ms(o);return function(){var _=arguments;switch(_.length){case 0:return!g.call(this);case 1:return!g.call(this,_[0]);case 2:return!g.call(this,_[0],_[1]);case 3:return!g.call(this,_[0],_[1],_[2])}return!g.apply(this,_)}}function Tt(g){return ot(2,g)}var Rt=_2(function(g,_){_=_.length==1&&Qt(_[0])?In(_[0],Zi(kt())):In(Jn(_,1),Zi(kt()));var P=_.length;return Kt(function(L){for(var G=-1,oe=Zr(L.length,P);++G<oe;)L[G]=_[G].call(this,L[G]);return mi(g,this,L)})}),Ot=Kt(function(g,_){var P=gs(_,la(Ot));return To(g,I,n,_,P)}),Nt=Kt(function(g,_){var P=gs(_,la(Nt));return To(g,O,n,_,P)}),Pr=Co(function(g,_){return To(g,U,n,n,n,_)});function pn(g,_){if(typeof g!="function")throw new ms(o);return _=_===n?_:Gt(_),Kt(g,_)}function ul(g,_){if(typeof g!="function")throw new ms(o);return _=_==null?0:hr(Gt(_),0),Kt(function(P){var L=P[_],G=aa(P,0,_);return L&&Ha(G,L),mi(g,this,G)})}function P3(g,_,P){var L=!0,G=!0;if(typeof g!="function")throw new ms(o);return or(P)&&(L="leading"in P?!!P.leading:L,G="trailing"in P?!!P.trailing:G),St(g,_,{leading:L,maxWait:_,trailing:G})}function oZ(g){return He(g,1)}function aZ(g,_){return Ot(bp(_),g)}function lZ(){if(!arguments.length)return[];var g=arguments[0];return Qt(g)?g:[g]}function cZ(g){return Bi(g,m)}function uZ(g,_){return _=typeof _=="function"?_:n,Bi(g,m,_)}function fZ(g){return Bi(g,h|m)}function hZ(g,_){return _=typeof _=="function"?_:n,Bi(g,h|m,_)}function dZ(g,_){return _==null||Vf(g,_,si(_))}function fa(g,_){return g===_||g!==g&&_!==_}var pZ=Tp(el),gZ=Tp(function(g,_){return g>=_}),ph=fp((function(){return arguments})())?fp:function(g){return pr(g)&&dn.call(g,"callee")&&!Yd.call(g,"callee")},Qt=We.isArray,mZ=Km?Zi(Km):y2;function Cs(g){return g!=null&&G2(g.length)&&!gc(g)}function wr(g){return pr(g)&&Cs(g)}function vZ(g){return g===!0||g===!1||pr(g)&&Ur(g)==ce}var Pu=f0||U3,yZ=Ri?Zi(Ri):ia;function bZ(g){return pr(g)&&g.nodeType===1&&!a1(g)}function _Z(g){if(g==null)return!0;if(Cs(g)&&(Qt(g)||typeof g=="string"||typeof g.splice=="function"||Pu(g)||Yp(g)||ph(g)))return!g.length;var _=jr(g);if(_==k||_==Te)return!g.size;if(ca(g))return!sa(g).length;for(var P in g)if(dn.call(g,P))return!1;return!0}function wZ(g,_){return xs(g,_)}function xZ(g,_,P){P=typeof P=="function"?P:n;var L=P?P(g,_):n;return L===n?xs(g,_,n,P):!!L}function I3(g){if(!pr(g))return!1;var _=Ur(g);return _==ye||_==de||typeof g.message=="string"&&typeof g.name=="string"&&!a1(g)}function AZ(g){return typeof g=="number"&&iu(g)}function gc(g){if(!or(g))return!1;var _=Ur(g);return _==ve||_==ue||_==Ze||_==le}function TR(g){return typeof g=="number"&&g==Gt(g)}function G2(g){return typeof g=="number"&&g>-1&&g%1==0&&g<=Y}function or(g){var _=typeof g;return g!=null&&(_=="object"||_=="function")}function pr(g){return g!=null&&typeof g=="object"}var CR=Ql?Zi(Ql):b2;function EZ(g,_){return g===_||pu(g,_,rh(_))}function SZ(g,_,P){return P=typeof P=="function"?P:n,pu(g,_,rh(_),P)}function TZ(g){return PR(g)&&g!=+g}function CZ(g){if(h3(g))throw new zt(s);return y0(g)}function PZ(g){return g===null}function IZ(g){return g==null}function PR(g){return typeof g=="number"||pr(g)&&Ur(g)==ie}function a1(g){if(!pr(g)||Ur(g)!=Z)return!1;var _=js(g);if(_===null)return!0;var P=dn.call(_,"constructor")&&_.constructor;return typeof P=="function"&&P instanceof P&&Rf.call(P)==Qd}var O3=Fd?Zi(Fd):Hf;function OZ(g){return TR(g)&&g>=-Y&&g<=Y}var IR=Gc?Zi(Gc):Ao;function Z2(g){return typeof g=="string"||!Qt(g)&&pr(g)&&Ur(g)==we}function Ks(g){return typeof g=="symbol"||pr(g)&&Ur(g)==Qe}var Yp=Wy?Zi(Wy):qf;function MZ(g){return g===n}function RZ(g){return pr(g)&&jr(g)==Xe}function kZ(g){return pr(g)&&Ur(g)==ft}var NZ=Tp(tl),DZ=Tp(function(g,_){return g<=_});function OR(g){if(!g)return[];if(Cs(g))return Z2(g)?Ji(g):yi(g);if(Jo&&g[Jo])return t3(g[Jo]());var _=jr(g),P=_==k?Wd:_==Te?qa:Kp;return P(g)}
vendor: 6,749 bytes, lines 3398-3415
3398function mc(g){if(!g)return g===0?g:0;if(g=Io(g),g===q||g===-q){var _=g<0?-1:1;return _*X}return g===g?g:0}function Gt(g){var _=mc(g),P=_%1;return _===_?P?_-P:_:0}function MR(g){return g?ta(Gt(g),0,D):0}function Io(g){if(typeof g=="number")return g;if(Ks(g))return te;if(or(g)){var _=typeof g.valueOf=="function"?g.valueOf():g;g=or(_)?_+"":_}if(typeof g!="string")return g===0?g:+g;g=Yy(g);var P=Bn.test(g);return P||Fr.test(g)?Yc(g.slice(2),P?2:8):gn.test(g)?te:+g}function RR(g){return Ws(g,Ps(g))}function BZ(g){return g?ta(Gt(g),-Y,Y):g===0?g:0}function xn(g){return g==null?"":Li(g)}var LZ=_u(function(g,_){if(ca(_)||Cs(_)){Ws(_,si(_),g);return}for(var P in _)dn.call(_,P)&&tc(g,P,_[P])}),kR=_u(function(g,_){Ws(_,Ps(_),g)}),J2=_u(function(g,_,P,L){Ws(_,Ps(_),g,L)}),FZ=_u(function(g,_,P,L){Ws(_,si(_),g,L)}),UZ=Co(ap);function zZ(g,_){var P=cu(g);return _==null?P:zn(P,_)}var jZ=Kt(function(g,_){g=wn(g);var P=-1,L=_.length,G=L>2?_[2]:n;for(G&&_i(_[0],_[1],G)&&(L=1);++P<L;)for(var oe=_[P],Ee=Ps(oe),Ie=-1,Le=Ee.length;++Ie<Le;){var et=Ee[Ie],tt=g[et];(tt===n||fa(tt,go[et])&&!dn.call(g,et))&&(g[et]=oe[et])}return g}),VZ=Kt(function(g){return g.push(n,L0),mi(NR,n,g)});function WZ(g,_){return Hy(g,kt(_,3),ns)}function $Z(g,_){return Hy(g,kt(_,3),Ja)}function HZ(g,_){return g==null?g:lp(g,kt(_,3),Ps)}function qZ(g,_){return g==null?g:$f(g,kt(_,3),Ps)}function QZ(g,_){return g&&ns(g,kt(_,3))}function XZ(g,_){return g&&Ja(g,kt(_,3))}function YZ(g){return g==null?[]:du(g,si(g))}function KZ(g){return g==null?[]:du(g,Ps(g))}function M3(g,_,P){var L=g==null?n:na(g,_);return L===n?P:L}function GZ(g,_){return g!=null&&V0(g,_,_s)}function R3(g,_){return g!=null&&V0(g,_,rc)}var ZZ=T2(function(g,_,P){_!=null&&typeof _.toString!="function"&&(_=kf.call(_)),g[_]=P},N3(Is)),JZ=T2(function(g,_,P){_!=null&&typeof _.toString!="function"&&(_=kf.call(_)),dn.call(g,_)?g[_].push(P):g[_]=[P]},kt),eJ=Kt(ws);function si(g){return Cs(g)?yo(g):sa(g)}function Ps(g){return Cs(g)?yo(g,!0):b0(g)}function tJ(g,_){var P={};return _=kt(_,3),ns(g,function(L,G,oe){_o(P,_(L,G,oe),L)}),P}function nJ(g,_){var P={};return _=kt(_,3),ns(g,function(L,G,oe){_o(P,G,_(L,G,oe))}),P}var rJ=_u(function(g,_,P){ic(g,_,P)}),NR=_u(function(g,_,P,L){ic(g,_,P,L)}),iJ=Co(function(g,_){var P={};if(g==null)return P;var L=!1;_=In(_,function(oe){return oe=So(oe,g),L||(L=oe.length>1),oe}),Ws(g,th(g),P),L&&(P=Bi(P,h|d|m,F0));for(var G=_.length;G--;)vp(P,_[G]);return P});function sJ(g,_){return DR(g,ct(kt(_)))}var oJ=Co(function(g,_){return g==null?{}:x0(g,_)});function DR(g,_){if(g==null)return{};var P=In(th(g),function(L){return[L]});return _=kt(_),nl(g,P,function(L,G){return _(L,G[0])})}function aJ(g,_,P){_=So(_,g);var L=-1,G=_.length;for(G||(G=1,g=n);++L<G;){var oe=g==null?n:g[Qs(_[L])];oe===n&&(L=G,oe=P),g=gc(oe)?oe.call(g):oe}return g}function lJ(g,_,P){return g==null?g:oc(g,_,P)}function cJ(g,_,P,L){return L=typeof L=="function"?L:n,g==null?g:oc(g,_,P,L)}var BR=D0(si),LR=D0(Ps);function uJ(g,_,P){var L=Qt(g),G=L||Pu(g)||Yp(g);if(_=kt(_,4),P==null){var oe=g&&g.constructor;G?P=L?new oe:[]:or(g)?P=gc(oe)?cu(js(g)):{}:P={}}return(G?Gr:ns)(g,function(Ee,Ie,Le){return _(P,Ee,Ie,Le)}),P}function fJ(g,_){return g==null?!0:vp(g,_)}function hJ(g,_,P){return g==null?g:C0(g,_,bp(P))}function dJ(g,_,P,L){return L=typeof L=="function"?L:n,g==null?g:C0(g,_,bp(P),L)}function Kp(g){return g==null?[]:Of(g,si(g))}function pJ(g){return g==null?[]:Of(g,Ps(g))}function gJ(g,_,P){return P===n&&(P=_,_=n),P!==n&&(P=Io(P),P=P===P?P:0),_!==n&&(_=Io(_),_=_===_?_:0),ta(Io(g),_,P)}function mJ(g,_,P){return _=mc(_),P===n?(P=_,_=0):P=mc(P),g=Io(g),v0(g,_,P)}function vJ(g,_,P){if(P&&typeof P!="boolean"&&_i(g,_,P)&&(_=P=n),P===n&&(typeof _=="boolean"?(P=_,_=n):typeof g=="boolean"&&(P=g,g=n)),g===n&&_===n?(g=0,_=1):(g=mc(g),_===n?(_=g,g=0):_=mc(_)),g>_){var L=g;g=_,_=L}if(P||g%1||_%1){var G=Lf();return Zr(g+G*(_-g+Pf("1e-"+((G+"").length-1))),_)}return mu(g,_)}var yJ=ac(function(g,_,P){return _=_.toLowerCase(),g+(P?FR(_):_)});function FR(g){return k3(xn(g).toLowerCase())}function UR(g){return g=xn(g),g&&g.replace(zl,Zy).replace(Dd,"")}function bJ(g,_,P){g=xn(g),_=Li(_);var L=g.length;P=P===n?L:ta(Gt(P),0,L);var G=P;return P-=_.length,P>=0&&g.slice(P,G)==_}function _J(g){return g=xn(g),g&&cr.test(g)?g.replace(yr,Jy):g}function wJ(g){return g=xn(g),g&&ur.test(g)?g.replace(Bs,"\\$&"):g}var xJ=ac(function(g,_,P){return g+(P?"-":"")+_.toLowerCase()}),AJ=ac(function(g,_,P){return g+(P?" ":"")+_.toLowerCase()}),EJ=R0("toLowerCase");function SJ(g,_,P){g=xn(g),_=Gt(_);var L=_?Xl(g):0;if(!_||L>=_)return g;var G=(_-L)/2;return Jf(Qa(G),P)+g+Jf(Kl(G),P)}function TJ(g,_,P){g=xn(g),_=Gt(_);var L=_?Xl(g):0;return _&&L<_?g+Jf(_-L,P):g}function CJ(g,_,P){g=xn(g),_=Gt(_);var L=_?Xl(g):0;return _&&L<_?Jf(_-L,P)+g:g}function PJ(g,_,P){return P||_==null?_=0:_&&(_=+_),l2(xn(g).replace(Ls,""),_||0)}function IJ(g,_,P){return(P?_i(g,_,P):_===n)?_=1:_=Gt(_),sc(xn(g),_)}function OJ(){var g=arguments,_=xn(g[0]);return g.length<3?_:_.replace(g[1],g[2])}var MJ=ac(function(g,_,P){return g+(P?"_":"")+_.toLowerCase()});function RJ(g,_,P){return P&&typeof P!="number"&&_i(g,_,P)&&(_=P=n),P=P===n?D:P>>>0,P?(g=xn(g),g&&(typeof _=="string"||_!=null&&!O3(_))&&(_=Li(_),!_&&eu(g))?aa(Ji(g),0,P):g.split(_,P)):[]}var kJ=ac(function(g,_,P){return g+(P?" ":"")+k3(_)});function NJ(g,_,P){return g=xn(g),P=P==null?0:ta(Gt(P),0,g.length),_=Li(_),g.slice(P,P+_.length)==_}function DJ(g,_,P){var L=se.templateSettings;P&&_i(g,_,P)&&(_=n),g=xn(g),_=J2({},_,L,B0);var G=J2({},_.imports,L.imports,B0),oe=si(G),Ee=Of(G,oe),Ie,Le,et=0,tt=_.interpolate||qo,at="__p += '",mt=Mf((_.escape||qo).source+"|"+tt.source+"|"+(tt===Br?zs:qo).source+"|"+(_.evaluate||qo).source+"|$","g"),Pt="//# sourceURL="+(dn.call(_,"sourceURL")?(_.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Ce+"]")+`
3399`;g.replace(mt,function(Bt,sn,cn,Gs,ss,Zs){return cn||(cn=Gs),at+=g.slice(et,Zs).replace(Td,e2),sn&&(Ie=!0,at+=`' +
3400__e(`+sn+`) +
3401'`),ss&&(Le=!0,at+=`';
3402`+ss+`;
3403__p += '`),cn&&(at+=`' +
3404((__t = (`+cn+`)) == null ? '' : __t) +
3405'`),et=Zs+Bt.length,Bt}),at+=`';
3406`;var Dt=dn.call(_,"variable")&&_.variable;if(!Dt)at=`with (obj) {
3407`+at+`
3408}
3409`;else if(Ul.test(Dt))throw new zt(a);at=(Le?at.replace(Ct,""):at).replace(rr,"$1").replace(di,"$1;"),at="function("+(Dt||"obj")+`) {
3410`+(Dt?"":`obj || (obj = {});
3411`)+"var __t, __p = ''"+(Ie?", __e = _.escape":"")+(Le?`, __j = Array.prototype.join;
3412function print() { __p += __j.call(arguments, '') }
3413`:`;
3414`)+at+`return __p
3415}`;var Jt=jR(function(){return hn(oe,Pt+"return "+at).apply(n,Ee)});if(Jt.source=at,I3(Jt))throw Jt;return Jt}function BJ(g){return xn(g).toLowerCase()}function LJ(g){return xn(g).toUpperCase()}function FJ(g,_,P){if(g=xn(g),g&&(P||_===n))return Yy(g);
vendor: 4,335 bytes, line 3415
3415if(!g||!(_=Li(_)))return g;var L=Ji(g),G=Ji(_),oe=Ky(L,G),Ee=o0(L,G)+1;return aa(L,oe,Ee).join("")}function UJ(g,_,P){if(g=xn(g),g&&(P||_===n))return g.slice(0,Hd(g)+1);if(!g||!(_=Li(_)))return g;var L=Ji(g),G=o0(L,Ji(_))+1;return aa(L,0,G).join("")}function zJ(g,_,P){if(g=xn(g),g&&(P||_===n))return g.replace(Ls,"");if(!g||!(_=Li(_)))return g;var L=Ji(g),G=Ky(L,Ji(_));return aa(L,G).join("")}function jJ(g,_){var P=H,L=W;if(or(_)){var G="separator"in _?_.separator:G;P="length"in _?Gt(_.length):P,L="omission"in _?Li(_.omission):L}g=xn(g);var oe=g.length;if(eu(g)){var Ee=Ji(g);oe=Ee.length}if(P>=oe)return g;var Ie=P-Xl(L);if(Ie<1)return L;var Le=Ee?aa(Ee,0,Ie).join(""):g.slice(0,Ie);if(G===n)return Le+L;if(Ee&&(Ie+=Le.length-Ie),O3(G)){if(g.slice(Ie).search(G)){var et,tt=Le;for(G.global||(G=Mf(G.source,xn(Ht.exec(G))+"g")),G.lastIndex=0;et=G.exec(tt);)var at=et.index;Le=Le.slice(0,at===n?Ie:at)}}else if(g.indexOf(Li(G),Ie)!=Ie){var mt=Le.lastIndexOf(G);mt>-1&&(Le=Le.slice(0,mt))}return Le+L}function VJ(g){return g=xn(g),g&&Dn.test(g)?g.replace(Sr,t2):g}var WJ=ac(function(g,_,P){return g+(P?" ":"")+_.toUpperCase()}),k3=R0("toUpperCase");function zR(g,_,P){return g=xn(g),_=P?n:_,_===n?e3(g)?i3(g):GA(g):g.match(_)||[]}var jR=Kt(function(g,_){try{return mi(g,n,_)}catch(P){return I3(P)?P:new zt(P)}}),$J=Co(function(g,_){return Gr(_,function(P){P=Qs(P),_o(g,P,lt(g[P],g))}),g});function HJ(g){var _=g==null?0:g.length,P=kt();return g=_?In(g,function(L){if(typeof L[1]!="function")throw new ms(o);return[P(L[0]),L[1]]}):[],Kt(function(L){for(var G=-1;++G<_;){var oe=g[G];if(mi(oe[0],this,L))return mi(oe[1],this,L)}})}function qJ(g){return g2(Bi(g,h))}function N3(g){return function(){return g}}function QJ(g,_){return g==null||g!==g?_:g}var XJ=Ep(),YJ=Ep(!0);function Is(g){return g}function D3(g){return gu(typeof g=="function"?g:Bi(g,h))}function KJ(g){return dp(Bi(g,h))}function GJ(g,_){return $n(g,Bi(_,h))}var ZJ=Kt(function(g,_){return function(P){return ws(P,g,_)}}),JJ=Kt(function(g,_){return function(P){return ws(g,P,_)}});function B3(g,_,P){var L=si(_),G=du(_,L);P==null&&!(or(_)&&(G.length||!L.length))&&(P=_,_=g,g=this,G=du(_,si(_)));var oe=!(or(P)&&"chain"in P)||!!P.chain,Ee=gc(g);return Gr(G,function(Ie){var Le=_[Ie];g[Ie]=Le,Ee&&(g.prototype[Ie]=function(){var et=this.__chain__;if(oe||et){var tt=g(this.__wrapped__),at=tt.__actions__=yi(this.__actions__);return at.push({func:Le,args:arguments,thisArg:g}),tt.__chain__=et,tt}return Le.apply(g,Ha([this.value()],arguments))})}),g}function eee(){return Tn._===this&&(Tn._=i2),this}function L3(){}function tee(g){return g=Gt(g),Kt(function(_){return pp(_,g)})}var nee=Sp(In),ree=Sp(Zm),iee=Sp(t0);function VR(g){return bt(g)?r0(Qs(g)):Xn(g)}function see(g){return function(_){return g==null?n:na(g,_)}}var oee=N0(),aee=N0(!0);function F3(){return[]}function U3(){return!1}function lee(){return{}}function cee(){return""}function uee(){return!0}function fee(g,_){if(g=Gt(g),g<1||g>Y)return[];var P=D,L=Zr(g,D);_=kt(_),g-=D;for(var G=s0(L,_);++P<g;)_(P);return G}function hee(g){return Qt(g)?In(g,Qs):Ks(g)?[g]:yi(q0(xn(g)))}function dee(g){var _=++ru;return xn(g)+_}var pee=Zf(function(g,_){return g+_},0),gee=zr("ceil"),mee=Zf(function(g,_){return g/_},1),vee=zr("floor");function yee(g){return g&&g.length?nc(g,Is,el):n}function bee(g,_){return g&&g.length?nc(g,kt(_,2),el):n}function _ee(g){return Qy(g,Is)}function wee(g,_){return Qy(g,kt(_,2))}function xee(g){return g&&g.length?nc(g,Is,tl):n}function Aee(g,_){return g&&g.length?nc(g,kt(_,2),tl):n}var Eee=Zf(function(g,_){return g*_},1),See=zr("round"),Tee=Zf(function(g,_){return g-_},0);function Cee(g){return g&&g.length?i0(g,Is):0}function Pee(g,_){return g&&g.length?i0(g,kt(_,2)):0}return se.after=Pe,se.ary=He,se.assign=LZ,se.assignIn=kR,se.assignInWith=J2,se.assignWith=FZ,se.at=UZ,se.before=ot,se.bind=lt,se.bindAll=$J,se.bindKey=st,se.castArray=lZ,se.chain=jp,se.chunk=kp,se.compact=Q0,se.concat=Ss,se.cond=HJ,se.conforms=qJ,se.constant=N3,se.countBy=q2,se.create=zZ,se.curry=yt,se.curryRight=xt,se.debounce=St,se.defaults=jZ,se.defaultsDeep=VZ,se.defer=sr,se.delay=Ue,se.difference=ln,se.differenceBy=Cr,se.differenceWith=dr,se.drop=Wr,se.dropRight=is,se.dropRightWhile=Tu,se.dropWhile=_r,se.fill=ah,se.filter=$p,se.flatMap=s1,se.flatMapDeep=E3,se.flatMapDepth=Y2,se.flatten=Np,se.flatten
vendor: 4,700 bytes, line 3415
3415Deep=ch,se.flattenDepth=Fi,se.flip=Oe,se.flow=XJ,se.flowRight=YJ,se.fromPairs=X0,se.functions=YZ,se.functionsIn=KZ,se.groupBy=o1,se.initial=Dp,se.intersection=Y0,se.intersectionBy=ol,se.intersectionWith=Bp,se.invert=ZZ,se.invertBy=JZ,se.invokeMap=K2,se.iteratee=D3,se.keyBy=S3,se.keys=si,se.keysIn=Ps,se.map=pc,se.mapKeys=tJ,se.mapValues=nJ,se.matches=KJ,se.matchesProperty=GJ,se.memoize=je,se.merge=rJ,se.mergeWith=NR,se.method=ZJ,se.methodOf=JJ,se.mixin=B3,se.negate=ct,se.nthArg=tee,se.omit=iJ,se.omitBy=sJ,se.once=Tt,se.orderBy=T3,se.over=nee,se.overArgs=Rt,se.overEvery=ree,se.overSome=iee,se.partial=Ot,se.partialRight=Nt,se.partition=dh,se.pick=oJ,se.pickBy=DR,se.property=VR,se.propertyOf=see,se.pull=Lp,se.pullAll=fh,se.pullAllBy=xi,se.pullAllWith=ll,se.pullAt=Xs,se.range=oee,se.rangeRight=aee,se.rearg=Pr,se.reject=f,se.remove=Ui,se.rest=pn,se.reverse=Fp,se.sampleSize=w,se.set=lJ,se.setWith=cJ,se.shuffle=S,se.slice=G0,se.sortBy=ee,se.sortedUniq=e1,se.sortedUniqBy=fc,se.split=RJ,se.spread=ul,se.tail=U2,se.take=z2,se.takeRight=t1,se.takeRightWhile=Up,se.takeWhile=p3,se.tap=w3,se.throttle=P3,se.thru=Ys,se.toArray=OR,se.toPairs=BR,se.toPairsIn=LR,se.toPath=hee,se.toPlainObject=RR,se.transform=uJ,se.unary=oZ,se.union=g3,se.unionBy=j2,se.unionWith=V2,se.uniq=hc,se.uniqBy=m3,se.uniqWith=Cu,se.unset=fJ,se.unzip=zp,se.unzipWith=Yn,se.update=hJ,se.updateWith=dJ,se.values=Kp,se.valuesIn=pJ,se.without=v3,se.words=zR,se.wrap=aZ,se.xor=W2,se.xorBy=y3,se.xorWith=b3,se.zip=$2,se.zipObject=H2,se.zipObjectDeep=_3,se.zipWith=Ts,se.entries=BR,se.entriesIn=LR,se.extend=kR,se.extendWith=J2,B3(se,se),se.add=pee,se.attempt=jR,se.camelCase=yJ,se.capitalize=FR,se.ceil=gee,se.clamp=gJ,se.clone=cZ,se.cloneDeep=fZ,se.cloneDeepWith=hZ,se.cloneWith=uZ,se.conformsTo=dZ,se.deburr=UR,se.defaultTo=QJ,se.divide=mee,se.endsWith=bJ,se.eq=fa,se.escape=_J,se.escapeRegExp=wJ,se.every=Q2,se.find=Hp,se.findIndex=sl,se.findKey=WZ,se.findLast=X2,se.findLastIndex=lh,se.findLastKey=$Z,se.floor=vee,se.forEach=qp,se.forEachRight=hh,se.forIn=HZ,se.forInRight=qZ,se.forOwn=QZ,se.forOwnRight=XZ,se.get=M3,se.gt=pZ,se.gte=gZ,se.has=GZ,se.hasIn=R3,se.head=cc,se.identity=Is,se.includes=Qp,se.indexOf=ua,se.inRange=mJ,se.invoke=eJ,se.isArguments=ph,se.isArray=Qt,se.isArrayBuffer=mZ,se.isArrayLike=Cs,se.isArrayLikeObject=wr,se.isBoolean=vZ,se.isBuffer=Pu,se.isDate=yZ,se.isElement=bZ,se.isEmpty=_Z,se.isEqual=wZ,se.isEqualWith=xZ,se.isError=I3,se.isFinite=AZ,se.isFunction=gc,se.isInteger=TR,se.isLength=G2,se.isMap=CR,se.isMatch=EZ,se.isMatchWith=SZ,se.isNaN=TZ,se.isNative=CZ,se.isNil=IZ,se.isNull=PZ,se.isNumber=PR,se.isObject=or,se.isObjectLike=pr,se.isPlainObject=a1,se.isRegExp=O3,se.isSafeInteger=OZ,se.isSet=IR,se.isString=Z2,se.isSymbol=Ks,se.isTypedArray=Yp,se.isUndefined=MZ,se.isWeakMap=RZ,se.isWeakSet=kZ,se.join=al,se.kebabCase=xJ,se.last=wi,se.lastIndexOf=uh,se.lowerCase=AJ,se.lowerFirst=EJ,se.lt=NZ,se.lte=DZ,se.max=yee,se.maxBy=bee,se.mean=_ee,se.meanBy=wee,se.min=xee,se.minBy=Aee,se.stubArray=F3,se.stubFalse=U3,se.stubObject=lee,se.stubString=cee,se.stubTrue=uee,se.multiply=Eee,se.nth=K0,se.noConflict=eee,se.noop=L3,se.now=_e,se.pad=SJ,se.padEnd=TJ,se.padStart=CJ,se.parseInt=PJ,se.random=vJ,se.reduce=C3,se.reduceRight=Xp,se.repeat=IJ,se.replace=OJ,se.result=aJ,se.round=See,se.runInContext=Ne,se.sample=p,se.size=R,se.snakeCase=MJ,se.some=B,se.sortedIndex=Z0,se.sortedIndexBy=d3,se.sortedIndexOf=cl,se.sortedLastIndex=F2,se.sortedLastIndexBy=J0,se.sortedLastIndexOf=uc,se.startCase=kJ,se.startsWith=NJ,se.subtract=Tee,se.sum=Cee,se.sumBy=Pee,se.template=DJ,se.times=fee,se.toFinite=mc,se.toInteger=Gt,se.toLength=MR,se.toLower=BJ,se.toNumber=Io,se.toSafeInteger=BZ,se.toString=xn,se.toUpper=LJ,se.trim=FJ,se.trimEnd=UJ,se.trimStart=zJ,se.truncate=jJ,se.unescape=VJ,se.uniqueId=dee,se.upperCase=WJ,se.upperFirst=k3,se.each=qp,se.eachRight=hh,se.first=cc,B3(se,(function(){var g={};return ns(se,function(_,P){dn.call(se.prototype,P)||(g[P]=_)}),g})(),{chain:!1}),se.VERSION=r,Gr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(g){se[g].placeholder=se}),Gr(["drop","take"],function(g,_){qt.prototype[g]=function(P){P=P===n?1:hr(Gt(P),0);var L=this.__filtered__&&!_?new qt(this):this.clone();return L.__filtered__?L.__takeCount__=Zr(P,L.__takeCount__):L.__views__.push({size:Zr(P,D),type:g+(L.__dir__<0?"Right":"")}),L},qt.prototype[g+"Right"]=function(P){return this.reverse()[g](P).reverse()}}),Gr(["filter","map","takeWhile"],function(g,_){var P=_+1,L=P==M||P==j;qt.prototype[g]=function(G){var oe=this.clone();return oe.__iteratees__.push({iteratee:kt(G,3),type:P}),oe.__filtered__=oe.__filtered__||L,oe}}),Gr(["head","last"],function(g,_){var P="take"+(_?"Right":"");
3415qt.prototype[g]=function(){return this[P](1).value()[0]}}),Gr(["initial","tail"],function(g,_){var P="drop"+(_?"":"Right");qt.prototype[g]=function(){return this.__filtered__?new qt(this):this[P](1)}}),qt.prototype.compact=function(){return this.filter(Is)},qt.prototype.find=function(g){return this.filter(g).head()},qt.prototype.findLast=function(g){return this.reverse().find(g)},qt.prototype.invokeMap=Kt(function(g,_){return typeof g=="function"?new qt(this):this.map(function(P){return ws(P,g,_)})}),qt.prototype.reject=function(g){return this.filter(ct(kt(g)))},qt.prototype.slice=function(g,_){g=Gt(g);var P=this;return P.__filtered__&&(g>0||_<0)?new qt(P):(g<0?P=P.takeRight(-g):g&&(P=P.drop(g)),_!==n&&(_=Gt(_),P=_<0?P.dropRight(-_):P.take(_-g)),P)},qt.prototype.takeRightWhile=function(g){return this.reverse().takeWhile(g).reverse()},qt.prototype.toArray=function(){return this.take(D)},ns(qt.prototype,function(g,_){var P=/^(?:filter|find|map|reject)|While$/.test(_),L=/^(?:head|last)$/.test(_),G=se[L?"take"+(_=="last"?"Right":""):_],oe=L||/^find/.test(_);G&&(se.prototype[_]=function(){var Ee=this.__wrapped__,Ie=L?[1]:arguments,Le=Ee instanceof qt,et=Ie[0],tt=Le||Qt(Ee),at=function(sn){var cn=G.apply(se,Ha([sn],Ie));return L&&mt?cn[0]:cn};tt&&P&&typeof et=="function"&&et.length!=1&&(Le=tt=!1);var mt=this.__chain__,Pt=!!this.__actions__.length,Dt=oe&&!mt,Jt=Le&&!Pt;if(!oe&&tt){Ee=Jt?Ee:new qt(this);var Bt=g.apply(Ee,Ie);return Bt.__actions__.push({func:Ys,args:[at],thisArg:n}),new Jr(Bt,mt)}return Dt&&Jt?g.apply(this,Ie):(Bt=this.thru(at),Dt?L?Bt.value()[0]:Bt.value():Bt)})}),Gr(["pop","push","shift","sort","splice","unshift"],function(g){var _=Go[g],P=/^(?:push|sort|unshift)$/.test(g)?"tap":"thru",L=/^(?:pop|shift)$/.test(g);se.prototype[g]=function(){var G=arguments;if(L&&!this.__chain__){var oe=this.value();return _.apply(Qt(oe)?oe:[],G)}return this[P](function(Ee){return _.apply(Qt(Ee)?Ee:[],G)})}}),ns(qt.prototype,function(g,_){var P=se[_];if(P){var L=P.name+"";dn.call(au,L)||(au[L]=[]),au[L].push({name:_,func:P})}}),au[xu(n,x).name]=[{name:"wrapper",func:n}],qt.prototype.clone=np,qt.prototype.reverse=d0,qt.prototype.value=uu,se.prototype.at=Vp,se.prototype.chain=dc,se.prototype.commit=Wp,se.prototype.next=n1,se.prototype.plant=x3,se.prototype.reverse=i1,se.prototype.toJSON=se.prototype.valueOf=se.prototype.value=A3,se.prototype.first=se.prototype.head,Jo&&(se.prototype[Jo]=r1),se}),tu=s3();po?((po.exports=tu)._=tu,Wa._=tu):Tn._=tu}).call(abe)})($1,$1.exports)),$1.exports}var e6=lbe();const cbe=fn(e6),ube=()=>{const t=Je.use.featuresApiEndpoint(),e=Je.use.timeRange(),n=A.useMemo(()=>{const r=new Date(e.start).toISOString(),i=new Date(e.end).toISOString();return`${r}/${i}`},[e]);return A.useMemo(()=>({perimeterNrt:`${t}/collections/pg_temp.eis_fire_lf_perimeter_nrt_latest/tiles/WebMercatorQuad/{z}/{x}/{y}?datetime=${n}&bbox=-165.0,24.5,-66.0,69.5&properties=duration,farea,meanfrp,fperim,n_pixels,n_newpixels,pixden,fireid,primarykey,t,region`,fireline:`${t}/collections/public.eis_fire_lf_fireline_nrt/tiles/WebMercatorQuad/{z}/{x}/{y}?datetime=${n}&bbox=-165.0,24.5,-66.0,69.5&properties=duration,farea,meanfrp,fperim,n_pixels,n_newpixels,pixden,fireid,primarykey,t,region`,newfirepix:`${t}/collections/public.eis_fire_lf_newfirepix_nrt/tiles/WebMercatorQuad/{z}/{x}/{y}?datetime=${n}&bbox=-165.0,24.5,-66.0,69.5&properties=duration,farea,meanfrp,fperim,n_pixels,n_newpixels,pixden,fireid,primarykey,t,region`}),[t,n])},fbe=()=>{const t=Je.use.timeRange(),e=Je.use.showAdvancedFilters(),n=Je.use.fireArea(),r=Je.use.duration(),i=Je.use.meanFrp(),s=Je.use.region(),o=Je.use.isActive();return A.useMemo(()=>a=>{if(!(a!=null&&a.properties))return!1;const l=new Date(a.properties.t).getTime();if(!(l>=t.start.getTime()&&l<=t.end.getTime()))return!1;if(e){const u=a.properties.farea||0;if(u<n.min||u>n.max)return!1;const h=a.properties.duration||0;if(h<r.min||h>r.max)return!1;const d=a.properties.meanfrp||0;if(d<i.min||d>i.max||s&&a.properties.region!==s||o!==null&&a.properties.isactive!==o)return!1}return!0},[t,e,n,r,i,s,o])},hbe=t=>{const e=Je.use.selectEvent(),n=Je.use.featuresApiEndpoint(),r=A.useCallback(s=>s!=null&&s.properties&&(s.properties.fireid||s.properties.primarykey)||null,[]);return{handleClick:A.useCallback(s=>{const{object:o}=s;
3415if(!o)return;const a=r(o);if(!a){console.error("No fire ID found for the selected feature");return}e(a,n),BQ(o),t("detail")},[r,e,n,t])}},dbe=(t,e)=>{const n=Je.use.showPerimeterNrt(),r=Je.use.showFireline(),i=Je.use.showNewFirepix(),[s,o]=A.useState({perimeterNrt:!1,fireline:!1,newfirepix:!1}),a=A.useCallback(()=>()=>{},[]),l=A.useCallback(c=>u=>{console.error(`Tile loading error for ${c}:`,u)},[]);return A.useEffect(()=>{o({perimeterNrt:n,fireline:r,newfirepix:i})},[n,r,i]),A.useEffect(()=>{const u=setInterval(()=>{const h={...s};let d=!1;Object.keys(t.current).forEach(m=>{const y=t.current[m],v=m.replace("perimeter-nrt","perimeterNrt");if(y&&typeof y.isLoaded=="boolean"){const b=s[v],x=y.isLoaded;!b&&!x?(h[v]=!0,d=!0):b&&x&&(h[v]=!1,d=!0)}}),d&&o(h)},100);return()=>clearInterval(u)},[s,e]),{loadingStates:s,createTileLoadHandler:a,createTileErrorHandler:l}},pbe=()=>{const t=Je.use.timeRange(),e=Je.use.timeMarker(),n=Je.use.showAdvancedFilters(),r=Je.use.fireArea(),i=Je.use.duration(),s=Je.use.meanFrp(),o=Je.use.region(),a=Je.use.isActive();return A.useMemo(()=>({getFillColor:[t.start.getTime(),t.end.getTime(),e.getTime(),n,r.min,r.max,i.min,i.max,s.min,s.max,o,a],getLineColor:[t.start.getTime(),t.end.getTime(),e.getTime(),n,r.min,r.max,i.min,i.max,s.min,s.max,o,a]}),[t.start,t.end,e,n,r.min,r.max,i.min,i.max,s.min,s.max,o,a])},gbe=({isInteracting:t,viewState:e,setViewMode:n})=>{const[r,i]=A.useState([]),s=A.useRef({}),o=ube(),a=fbe(),{handleClick:l}=hbe(n),{loadingStates:c,createTileLoadHandler:u,createTileErrorHandler:h}=dbe(s,t),d=pbe(),m=Je.use.windLayerType(),y=Je.use.show3DMap(),v=Je.use.timeRange(),b=Je.use.timeMarker(),x=Je.use.showPerimeterNrt(),T=Je.use.showFireline(),E=Je.use.showNewFirepix(),C=Je.use.layerOpacity(),I=Je.use.firePerimeters(),O=Je.use.mapboxAccessToken(),N=Je.use.viewMode(),[U,F]=A.useState(b),H=A.useMemo(()=>cbe.debounce(W=>F(W),300),[]);return A.useEffect(()=>{H(b)},[b,H]),A.useEffect(()=>{(async()=>{const z=[];y&&z.push({type:Rr.TERRAIN,opacity:C,mapboxAccessToken:O,viewState:e}),x&&N!=="detail"&&z.push({type:Rr.MVT,id:"perimeter-nrt",data:o.perimeterNrt,filterFunction:a,opacity:C,onTileLoad:u(),onTileError:h("perimeterNrt"),onClick:l,updateTriggers:d}),T&&N!=="detail"&&z.push({type:Rr.MVT,id:"fireline",data:o.fireline,filterFunction:a,opacity:C,onTileLoad:u(),onTileError:h("fireline"),onClick:l,updateTriggers:d}),E&&N!=="detail"&&z.push({type:Rr.MVT,id:"newfirepix",data:o.newfirepix,filterFunction:a,opacity:C,lineWidthMinPixels:2,onTileLoad:u(),onTileError:h("newfirepix"),onClick:l,updateTriggers:d}),I&&z.push({type:y?Rr.GEOJSON_3D:Rr.GEOJSON_2D,data:I,filterFunction:a,opacity:C,updateTriggers:{...d,getLineWidth:[v.start.getTime(),v.end.getTime()],getDashArray:[v.start.getTime(),v.end.getTime()]},onClick:l,timeMarker:b}),m==="wind"&&z.push({type:Rr.WIND,timeMarker:U,opacity:C}),m==="grid"&&z.push({type:Rr.GRID,timeMarker:U,opacity:C});const V=await i2e(z);s.current={},V.forEach(M=>{M&&M.id&&(s.current[M.id]=M)}),i(V)})()},[x,T,E,y,m,o.perimeterNrt,o.fireline,o.newfirepix,I,C,O,U,a,l,d,v,...y?[e]:[]]),{layers:r,loadingStates:c,featurePassesFilters:a}},mbe=({viewState:t,setViewState:e,setViewStateForUrl:n,setMapBounds:r})=>{const[i,s]=A.useState(!1),o=A.useRef(null),a=A.useRef(null),l=A.useRef(null),c=A.useRef(!0),u=A.useCallback(()=>{a.current!==null&&(clearTimeout(a.current),a.current=null)},[]),h=A.useCallback(b=>{try{const T=new ao(b).getBounds();l.current=T,i||r(T)}catch(x){console.error("Error updating bounds:",x)}},[r,i]),d=A.useCallback(()=>{try{if(!l.current||!o.current)return;r(l.current),n&&n(t)}catch(b){console.error("Error updating store after interaction:",b)}},[r,n,t]),m=A.useCallback(({isDragging:b,isPanning:x,isRotating:T,isZooming:E})=>{try{const C=b||x||T||E;a.current!==null&&(clearTimeout(a.current),a.current=null),s(C),C||(a.current=setTimeout(()=>{d(),a.current=null},tve))}catch(C){console.error("Error handling interaction state change:",C)}},[d]),y=A.useCallback(({viewState:b})=>{try{e(b),h(b)}catch(x){console.error("Error handling view state change:",x)}},[e,h]),v=A.useCallback((b,{padding:x=40}={})=>
3415{if(!b||b.length!==2){console.warn("Invalid bounds provided to fitBounds",b);return}try{const[[T,E],[C,I]]=b;if(typeof T!="number"||typeof E!="number"||typeof C!="number"||typeof I!="number"||!isFinite(T)||!isFinite(E)||!isFinite(C)||!isFinite(I)){console.warn("Invalid coordinate values in bounds",b);return}if(T>=C||E>=I){console.warn("Invalid bounds: min values should be less than max values",b);return}const O=new ao(t).fitBounds(b,{padding:x});if(!isFinite(O.longitude)||!isFinite(O.latitude)||!isFinite(O.zoom)||O.zoom<0||O.zoom>24){console.warn("Invalid viewport calculated from bounds",O);return}e({...t,longitude:O.longitude,latitude:O.latitude,zoom:O.zoom})}catch(T){console.error("Error in fitBounds:",T)}},[t,e]);return A.useEffect(()=>(c.current=!0,()=>{c.current=!1,u()}),[u]),A.useEffect(()=>()=>{u()},[u]),{viewState:t,isInteracting:i,deckRef:o,handleInteractionStateChange:m,handleViewStateChange:y,fitBounds:v}},vbe=({onLoadingStatesChange:t})=>{const e=Je.use.mapboxAccessToken(),n=Je.use.show3DMap(),r=Je.use.setViewMode(),i=Je.use.setMapBounds(),s=Je.use.viewState(),o=Je.use.setViewState(),a=Je.use.setViewStateForUrl(),{deckRef:l,handleInteractionStateChange:c,handleViewStateChange:u,isInteracting:h,fitBounds:d}=mbe({viewState:s,setViewState:o,setViewStateForUrl:a,setMapBounds:i}),{layers:m,loadingStates:y,featurePassesFilters:v}=gbe({isInteracting:h,viewState:s,setViewMode:r});return A.useEffect(()=>{o({...s,pitch:n?45:0},{transitionDuration:300})},[n]),A.useEffect(()=>{t&&t(y)},[y,t]),A.useEffect(()=>{const b=x=>{d&&x.detail&&x.detail.bounds&&d(x.detail.bounds,{padding:x.detail.padding||40})};return window.addEventListener("fitbounds",b),()=>{window.removeEventListener("fitbounds",b)}},[d]),Q.jsx(C2e,{ref:l,viewState:s,onViewStateChange:u,onInteractionStateChange:c,layers:m,controller:{doubleClickZoom:!1},getCursor:({isDragging:b})=>b?"grabbing":"grab",pickingRadius:10,getTooltip:({object:b})=>ybe({object:b,featurePassesFilters:v}),useDevicePixels:!1,widgets:[new lA({placement:"top-left",style:{marginTop:"55px"}}),new F2e({id:"compass",placement:"top-left"}),new L2e({id:"fullscreen",placement:"top-left"})],children:Q.jsx(J2e,{mapboxAccessToken:e,mapStyle:nve,projection:"mercator",attributionControl:!1,reuseMaps:!0})})};function ybe({object:t,featurePassesFilters:e}){if(!t||!e(t))return null;const{fireid:n,primarykey:r,region:i,t:s}=t.properties;return{html:`
3416        <table style="font-size: 12px; border-collapse: collapse;">
3417          <tr><td style="padding: 2px 4px;"><strong>ID</strong></td><td style="padding: 2px 4px;">${n}</td></tr>
3418          <tr><td style="padding: 2px 4px;"><strong>Primary key</strong></td><td style="padding: 2px 4px;">${r}</td></tr>
3419          <tr><td style="padding: 2px 4px;"><strong>Region</strong></td><td style="padding: 2px 4px;">${i}</td></tr>
3420          <tr><td style="padding: 2px 4px;"><strong>Timestamp</strong></td><td style="padding: 2px 4px;">${s}</td></tr>
3421        </table>
3422      `,style:{backgroundColor:"#fff",color:"#000",padding:"6px",border:"1px solid #ccc",borderRadius:"4px"}}}const ZQ=6048e5,bbe=864e5,EL=Symbol.for("constructDateFrom");function lf(t,e){return typeof t=="function"?t(e):t&&typeof t=="object"&&EL in t?t[EL](e):t instanceof Date?new t.constructor(e):new Date(e)}function ka(t,e){return lf(e||t,t)}let _be={};function uA(){return _be}function Iv(t,e){var a,l,c,u;const n=uA(),r=(e==null?void 0:e.weekStartsOn)??((l=(a=e==null?void 0:e.locale)==null?void 0:a.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((u=(c=n.locale)==null?void 0:c.options)==null?void 0:u.weekStartsOn)??0,i=ka(t,e==null?void 0:e.in),s=i.getDay(),o=(s<r?7:0)+s-r;return i.setDate(i.getDate()-o),i.setHours(0,0,0,0),i}function Cw(t,e){return Iv(t,{...e,weekStartsOn:1})}function JQ(t,e){const n=ka(t,e==null?void 0:e.in),r=n.getFullYear(),i=lf(n,0);i.setFullYear(r+1,0,4),i.setHours(0,0,0,0);const s=Cw(i),o=lf(n,0);o.setFullYear(r,0,4),o.setHours(0,0,0,0);const a=Cw(o);return n.getTime()>=s.getTime()?r+1:n.getTime()>=a.getTime()?r:r-1}function SL(t){const e=ka(t),n=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return n.setUTCFullYear(e.getFullYear()),+t-+n}function wbe(t,...e){const n=lf.bind(null,e.find(r=>typeof r=="object"));return e.map(n)}function TL(t,e){const n=ka(t,e==null?void 0:e.in);return n.setHours(0,0,0,0),n}function xbe(t,e,n){const[r,i]=wbe(n==null?void 0:n.in,t,e),s=TL(r),o=TL(i),a=+s-SL(s),l=+o-SL(o);return Math.round((a-l)/bbe)}function Abe(t,e){const n=JQ(t,e),r=lf(t,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Cw(r)}function Ebe(t){return t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]"}function Sbe(t){return!(!Ebe(t)&&typeof t!="number"||isNaN(+ka(t)))}function Tbe(t,e){const n=ka(t,e==null?void 0:e.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}const Cbe={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Pbe=(t,e,n)=>{let r;const i=Cbe[t];return typeof i=="string"?r=i:e===1?r=i.one:r=i.other.replace("{{count}}",e.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function AS(t){return(e={})=>{const n=e.width?String(e.width):t.defaultWidth;return t.formats[n]||t.formats[t.defaultWidth]}}const Ibe={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Obe={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Mbe={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Rbe={date:AS({formats:Ibe,defaultWidth:"full"}),time:AS({formats:Obe,defaultWidth:"full"}),dateTime:AS({formats:Mbe,defaultWidth:"full"})},kbe={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Nbe=(t,e,n,r)=>kbe[t];function b1(t){return(e,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let i;if(r==="formatting"&&t.formattingValues){const o=t.defaultFormattingWidth||t.defaultWidth,a=n!=null&&n.width?String(n.width):o;i=t.formattingValues[a]||t.formattingValues[o]}else{const o=t.defaultWidth,a=n!=null&&n.width?String(n.width):t.defaultWidth;i=t.values[a]||t.values[o]}const s=t.argumentCallback?t.argumentCallback(e):e;return i[s]}}const Dbe={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Bbe={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Lbe={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Fbe={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Frid
3422ay","Saturday"]},Ube={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},zbe={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},jbe=(t,e)=>{const n=Number(t),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},Vbe={ordinalNumber:jbe,era:b1({values:Dbe,defaultWidth:"wide"}),quarter:b1({values:Bbe,defaultWidth:"wide",argumentCallback:t=>t-1}),month:b1({values:Lbe,defaultWidth:"wide"}),day:b1({values:Fbe,defaultWidth:"wide"}),dayPeriod:b1({values:Ube,defaultWidth:"wide",formattingValues:zbe,defaultFormattingWidth:"wide"})};function _1(t){return(e,n={})=>{const r=n.width,i=r&&t.matchPatterns[r]||t.matchPatterns[t.defaultMatchWidth],s=e.match(i);if(!s)return null;const o=s[0],a=r&&t.parsePatterns[r]||t.parsePatterns[t.defaultParseWidth],l=Array.isArray(a)?$be(a,h=>h.test(o)):Wbe(a,h=>h.test(o));let c;c=t.valueCallback?t.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;const u=e.slice(o.length);return{value:c,rest:u}}}function Wbe(t,e){for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&e(t[n]))return n}function $be(t,e){for(let n=0;n<t.length;n++)if(e(t[n]))return n}function Hbe(t){return(e,n={})=>{const r=e.match(t.matchPattern);if(!r)return null;const i=r[0],s=e.match(t.parsePattern);if(!s)return null;let o=t.valueCallback?t.valueCallback(s[0]):s[0];o=n.valueCallback?n.valueCallback(o):o;const a=e.slice(i.length);return{value:o,rest:a}}}const qbe=/^(\d+)(th|st|nd|rd)?/i,Qbe=/\d+/i,Xbe={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Ybe={any:[/^b/i,/^(a|c)/i]},Kbe={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Gbe={any:[/1/i,/2/i,/3/i,/4/i]},Zbe={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Jbe={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},e_e={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},t_e={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},n_e={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},r_e={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},i_e={ordinalNumber:Hbe({matchPattern:qbe,parsePattern:Qbe,valueCallback:t=>parseInt(t,10)}),era:_1({matchPatterns:Xbe,defaultMatchWidth:"wide",parsePatterns:Ybe,defaultParseWidth:"any"}),quarter:_1({matchPatterns:Kbe,defaultMatchWidth:"wide",parsePatterns:Gbe,defaultParseWidth:"any",valueCallback:t=>t+1}),month:_1({matchPatterns:Zbe,defaultMatchWidth:"wide",parsePatterns:Jbe,defaultParseWidth:"any"}),day:_1({matchPatterns:e_e,defaultMatchWidth:"wide",parsePatterns:t_e,defaultParseWidth:"any"}),dayPeriod:_1({matchPatterns:n_e,defaultMatchWidth:"any",parsePatterns:r_e,defaultParseWidth:"any"})},s_e={code:"en-US",formatDistance:Pbe,formatLong:Rbe,formatRelative:Nbe,localize:Vbe,match:i_e,options:{weekStartsOn:0,firstWeekContainsDate:1}};function o_e(t,e){const n=ka(t,e==null?void 0:e.in);return xbe(n,Tbe(n))+1}function a_e(t,e){const n=ka(t,e==null?void 0:e.in),r=+Cw(n)-+Abe(n);return Math.round(r/ZQ)+1}function eX(t,e){var u,h,d,m;const n=ka(t,e==null?void 0:e.in),r=n.getFullYear(),i=uA(),s=(e==null?void 0:e.firstWeekContainsDate)??((h=(u=e==null?void 0:e.locale)==null?void 0:u.options)==null?void 0:h.firstWeekContainsDate)??i.firstWeekContainsDate??((m=(d=i.locale)==null?void 0:d.options)==null?void 0:m.firstWeekContainsDate)??1,o=lf((e==null?void 0:e.in)||t,0);o.setFullYear(r+1,0,s),o.setHours(0,0,0,0);const a=Iv(o,e),l=lf((e==null?void 0:e.in)||t,0);l.setFullYear(r,0,s),l.setHours(0,0,0,0);const c=Iv(l,e);return+n>=+a?r+1:+n>=+c?r:r-1}function l_e(t,e){var a,l,c,u;const n=uA(),r=(e==null?void 0:e.firstWeekContainsDate)??((l=(a=e==null?void 0:e.locale)==null?void 0:a.options)==null?void 0:l.firstWeekContainsDate)??n.firstWeekContainsDate??((u=(c=n.locale)==null?void 0:c.options)==null?void 0:u.firstWeekContainsDate)??1,i=eX(t,e),s=lf((e==null?void 0:e.in)||t,0);return s.setFullYear(i,0,r),s.setHours(0,0,0,0),Iv(s,e)}function c_e(t,e){const n=ka(t,e==null?void 0:e.in),r=+Iv(n,e)-+l_e(n,e);return Math.round(r/ZQ)+1}function Cn(t,e){const n=t<0?"-":"",r=Math.abs(t).toString().padStart(e,"0");return n+r}const Du={y(t,e){const n=t.getFullYear(),r=n>0?n:1-n;return Cn(e==="yy"?r%100:r,e.length)},M(t,e){const n=t.getMonth();return e==="M"?String(n+1):Cn(n+1,2)},d(t,e){return Cn(t.getDate(),e.length)},a(t,e){const n=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(t,e){return Cn(t.getHours()%12||12,e.length)},H(t,e){return Cn(t.getHours(),e.length)},m(t,e){return Cn(t.getMinutes(),e.length)},s(t,e){return Cn(t.getSeconds(),e.length)},S(t,e){const n=e.length,r=t.getMilliseconds(),i=Math.trunc(r*Math.pow(10,n-3));return Cn(i,e.length)}},og={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},CL={G:function(t,e,n){const r=t.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(t,e,n){if(e==="yo"){const r=t.getFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return Du.y(t,e)},Y:function(t,e,n,r){const i=eX(t,r),s=i>0?i:1-i;if(e==="YY"){const o=s%100;return Cn(o,2)}return e==="Yo"?n.ordinalNumber(s,{unit:"year"}):Cn(s,e.length)},R:function(t,e){const n=JQ(t);return Cn(n,e.length)},u:function(t,e){const n=t.getFullYear();return Cn(n,e.length)},Q:function(t,e,n){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return Cn(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(t,e,n){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return Cn(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(t,e,n){const r=t.getMonth();switch(e){case"M":case"MM":return Du.M(t,e);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(t,e,n){const r=t.getMonth();switch(e){case"L":return String(r+1);case"LL":return Cn(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(t,e,n,r){const i=c_e(t,r);return e==="wo"?n.ordinalNumber(i,{unit:"week"}):Cn(i,e.length)},I:function(t,e,n){const r=a_e(t);return e==="Io"?n.ordinalNumber(r,{unit:"week"}):Cn(r,e.length)},d:function(t,e,n){return e==="do"?n.ordinalNumber(t.getDate(),{unit:"date"}):Du.d(t,e)},D:function(t,e,n){const r=o_e(t);return e==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):Cn(r,e.length)},E:function(t,e,n){const r=t.getDay();switch(e){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(t,e,n,r){const i=t.getDay(),s=(i-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(s);case"ee":return Cn(s,2);case"eo":return n.ordinalNumber(s,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(t,e,n,r){const i=t.getDay(),s=(i-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(s);case"cc":return Cn(s,e.length);case"co":return n.ordinalNumber(s,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(t,e,n){const r=t.getDay(),i=r===0?7:r;switch(e){case"i":return String(i);case"ii":return Cn(i,e.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(t,e,n){const i=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(t,e,n){const r=t.getHours();let i;switch(r===12?i=og.noon:r===0?i=og.midnight:i=r/12>
vendor: 4,419 bytes, line 3422
3422=1?"pm":"am",e){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(t,e,n){const r=t.getHours();let i;switch(r>=17?i=og.evening:r>=12?i=og.afternoon:r>=4?i=og.morning:i=og.night,e){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(t,e,n){if(e==="ho"){let r=t.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Du.h(t,e)},H:function(t,e,n){return e==="Ho"?n.ordinalNumber(t.getHours(),{unit:"hour"}):Du.H(t,e)},K:function(t,e,n){const r=t.getHours()%12;return e==="Ko"?n.ordinalNumber(r,{unit:"hour"}):Cn(r,e.length)},k:function(t,e,n){let r=t.getHours();return r===0&&(r=24),e==="ko"?n.ordinalNumber(r,{unit:"hour"}):Cn(r,e.length)},m:function(t,e,n){return e==="mo"?n.ordinalNumber(t.getMinutes(),{unit:"minute"}):Du.m(t,e)},s:function(t,e,n){return e==="so"?n.ordinalNumber(t.getSeconds(),{unit:"second"}):Du.s(t,e)},S:function(t,e){return Du.S(t,e)},X:function(t,e,n){const r=t.getTimezoneOffset();if(r===0)return"Z";switch(e){case"X":return IL(r);case"XXXX":case"XX":return xh(r);case"XXXXX":case"XXX":default:return xh(r,":")}},x:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"x":return IL(r);case"xxxx":case"xx":return xh(r);case"xxxxx":case"xxx":default:return xh(r,":")}},O:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+PL(r,":");case"OOOO":default:return"GMT"+xh(r,":")}},z:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+PL(r,":");case"zzzz":default:return"GMT"+xh(r,":")}},t:function(t,e,n){const r=Math.trunc(+t/1e3);return Cn(r,e.length)},T:function(t,e,n){return Cn(+t,e.length)}};function PL(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),i=Math.trunc(r/60),s=r%60;return s===0?n+String(i):n+String(i)+e+Cn(s,2)}function IL(t,e){return t%60===0?(t>0?"-":"+")+Cn(Math.abs(t)/60,2):xh(t,e)}function xh(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),i=Cn(Math.trunc(r/60),2),s=Cn(r%60,2);return n+i+e+s}const OL=(t,e)=>{switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},tX=(t,e)=>{switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},u_e=(t,e)=>{const n=t.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return OL(t,e);let s;switch(r){case"P":s=e.dateTime({width:"short"});break;case"PP":s=e.dateTime({width:"medium"});break;case"PPP":s=e.dateTime({width:"long"});break;case"PPPP":default:s=e.dateTime({width:"full"});break}return s.replace("{{date}}",OL(r,e)).replace("{{time}}",tX(i,e))},f_e={p:tX,P:u_e},h_e=/^D+$/,d_e=/^Y+$/,p_e=["D","DD","YY","YYYY"];function g_e(t){return h_e.test(t)}function m_e(t){return d_e.test(t)}function v_e(t,e,n){const r=y_e(t,e,n);if(console.warn(r),p_e.includes(t))throw new RangeError(r)}function y_e(t,e,n){const r=t[0]==="Y"?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const b_e=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,__e=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,w_e=/^'([^]*?)'?$/,x_e=/''/g,A_e=/[a-zA-Z]/;function Lo(t,e,n){var u,h,d,m;const r=uA(),i=r.locale??s_e,s=r.firstWeekContainsDate??((h=(u=r.locale)==null?void 0:u.options)==null?void 0:h.firstWeekContainsDate)??1,o=r.weekStartsOn??((m=(d=r.locale)==null?void 0:d.options)==null?void 0:m.weekStartsOn)??0,a=ka(t,n==null?void 0:n.in);if(!Sbe(a))throw new RangeError("Invalid time value");let l=e.match(__e).map(y=>{const v=y[0];if(v==="p"||v==="P"){const b=f_e[v];return b(y,i.formatLong)}return y}).join("").match(b_e).map(y=>{if(y==="''")return{isToken:!1,value:"'"};const v=y[0];if(v==="'")return{isToken:!1,value:E_e(y)};if(CL[v])return{isToken:!0,value:y};
3422if(v.match(A_e))throw new RangeError("Format string contains an unescaped latin alphabet character `"+v+"`");return{isToken:!1,value:y}});i.localize.preprocessor&&(l=i.localize.preprocessor(a,l));const c={firstWeekContainsDate:s,weekStartsOn:o,locale:i};return l.map(y=>{if(!y.isToken)return y.value;const v=y.value;(m_e(v)||g_e(v))&&v_e(v,e,String(t));const b=CL[v[0]];return b(a,v,i.localize,c)}).join("")}function E_e(t){const e=t.match(w_e);return e?e[1].replace(x_e,"'"):t}function aI(t,e){return aI=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},aI(t,e)}function S_e(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,aI(t,e)}function ES(t){return t&&t.stopPropagation&&t.stopPropagation(),t&&t.preventDefault&&t.preventDefault(),!1}function SS(t){return t==null?[]:Array.isArray(t)?t.slice():[t]}function Vb(t){return t!==null&&t.length===1?t[0]:t.slice()}function Wb(t){Object.keys(t).forEach((e=>{typeof document<"u"&&document.addEventListener(e,t[e],!1)}))}function yh(t,e){return lI((function(n,r){let i=n;return i<=r.min&&(i=r.min),i>=r.max&&(i=r.max),i})(t,e),e)}function lI(t,e){const n=(t-e.min)%e.step;let r=t-n;return 2*Math.abs(n)>=e.step&&(r+=n>0?e.step:-e.step),parseFloat(r.toFixed(5))}let cI=(function(t){function e(r){var i;(i=t.call(this,r)||this).onKeyUp=()=>{i.onEnd()},i.onMouseUp=()=>{i.onEnd(i.getMouseEventMap())},i.onTouchEnd=a=>{a.preventDefault(),i.onEnd(i.getTouchEventMap())},i.onBlur=()=>{i.setState({index:-1},i.onEnd(i.getKeyDownEventMap()))},i.onMouseMove=a=>{i.setState({pending:!0});const l=i.getMousePosition(a),c=i.getDiffPosition(l[0]),u=i.getValueFromPosition(c);i.move(u)},i.onTouchMove=a=>{if(a.touches.length>1)return;i.setState({pending:!0});const l=i.getTouchPosition(a);if(i.isScrolling===void 0){const h=l[0]-i.startPosition[0],d=l[1]-i.startPosition[1];i.isScrolling=Math.abs(d)>Math.abs(h)}if(i.isScrolling)return void i.setState({index:-1});const c=i.getDiffPosition(l[0]),u=i.getValueFromPosition(c);i.move(u)},i.onKeyDown=a=>{if(!(a.ctrlKey||a.shiftKey||a.altKey||a.metaKey))switch(i.setState({pending:!0}),a.key){case"ArrowLeft":case"ArrowDown":case"Left":case"Down":a.preventDefault(),i.moveDownByStep();break;case"ArrowRight":case"ArrowUp":case"Right":case"Up":a.preventDefault(),i.moveUpByStep();break;case"Home":a.preventDefault(),i.move(i.props.min);break;case"End":a.preventDefault(),i.move(i.props.max);break;case"PageDown":a.preventDefault(),i.moveDownByStep(i.props.pageFn(i.props.step));break;case"PageUp":a.preventDefault(),i.moveUpByStep(i.props.pageFn(i.props.step))}},i.onSliderMouseDown=a=>{if(!i.props.disabled&&a.button!==2){if(i.setState({pending:!0}),!i.props.snapDragDisabled){const l=i.getMousePosition(a);i.forceValueFromPosition(l[0],(c=>{i.start(c,l[0]),Wb(i.getMouseEventMap())}))}ES(a)}},i.onSliderClick=a=>{if(!i.props.disabled&&i.props.onSliderClick&&!i.hasMoved){const l=i.getMousePosition(a),c=yh(i.calcValue(i.calcOffsetFromPosition(l[0])),i.props);i.props.onSliderClick(c)}},i.createOnKeyDown=a=>l=>{i.props.disabled||(i.start(a),Wb(i.getKeyDownEventMap()),ES(l))},i.createOnMouseDown=a=>l=>{if(i.props.disabled||l.button===2)return;i.setState({pending:!0});const c=i.getMousePosition(l);i.start(a,c[0]),Wb(i.getMouseEventMap()),ES(l)},i.createOnTouchStart=a=>l=>{if(i.props.disabled||l.touches.length>1)return;i.setState({pending:!0});const c=i.getTouchPosition(l);i.startPosition=c,i.isScrolling=void 0,i.start(a,c[0]),Wb(i.getTouchEventMap()),(function(u){u.stopPropagation&&u.stopPropagation()})(l)},i.handleResize=()=>{const a=window.setTimeout((()=>{i.pendingResizeTimeouts.shift(),i.resize()}),0);i.pendingResizeTimeouts.push(a)},i.renderThumb=(a,l)=>{const c=i.props.thumbClassName+" "+i.props.thumbClassName+"-"+l+" "+(i.state.index===l?i.props.thumbActiveClassName:""),u={ref:d=>{i["thumb"+l]=d},key:i.props.thumbClassName+"-"+l,className:c,style:a,onMouseDown:i.createOnMouseDown(l),onTouchStart:i.createOnTouchStart(l),onFocus:i.createOnKeyDown(l),tabIndex:0,role:"slider","aria-orientation":i.props.orientation,"aria-valuenow":i.state.value[l],"aria-valuemin":i.props.min,"aria-valuemax":i.props.max,"aria-label":Array.isArray(i.props.ariaLabel)?i.props.ariaLabel[l]:i.props.ariaLabel,"aria-labelledby":Array.isArray(i.props.ariaLabelledby)?i.props.ariaLabelledby[l]:i.props.ariaLabelledby,"aria-disabled":i.props.disabled},h={index:l,value:Vb(i.state.value),valueNow:i.state.value[l]};return i.props.ariaValuetext&&(u["aria-valuetext"]=typeof i.props.ariaValuetext=="string"?i.props.ariaValuetext:i.props.ariaValuetext(h)),i.props.renderThumb(u,h)},i.renderTrack=(a,l,c)=>{const u={key:i.props.trackClassName+"-"+a,className:i.props.trackClassName+" "+i.props.trackClassName+"-"+a,style:i.buildTrackStyle(l,i.state.upperBound-c)},h={index:a,value:Vb(i.state.value)};return i.props.renderTrack(u,h)};let s=SS(r.value);s.length||(s=SS(r.defaultValue)),i.pendingResizeTimeouts=[];const o=[];for(let a=0;a<s.length;a+=1)s[a]=yh(s[a],r),o.push(a);return i.resizeObserver=null,i.resizeElementRef=Me.createRef(),i.state={index:-1,upperBound:0,sliderLength:0,value:s,zIndices:o},i}S_e(e,t);var n=e.prototype;return n.componentDidMount=function(){typeof window<"u"&&(this.resizeObserver=new ResizeObserver(this.handleResize),this.resizeObserver.observe(this.resizeElementRef.current),this.resize())},e.getDerivedStateFromProps=function(r,i){const s=SS(r.value);return s.length?i.pending?null:{value:s.map((o=>yh(o,r)))}:null},n.componentDidUpdate=function(){this.state.upperBound===0&&this.resize()},n.componentWillUnmount=function(){this.clearPendingResizeTimeouts(),this.resizeObserver&&this.resizeObserver.disconnect()}
3422,n.onEnd=function(r){r&&(function(i){Object.keys(i).forEach((s=>{typeof document<"u"&&document.removeEventListener(s,i[s],!1)}))})(r),this.hasMoved&&this.fireChangeEvent("onAfterChange"),this.setState({pending:!1}),this.hasMoved=!1},n.getValue=function(){return Vb(this.state.value)},n.getClosestIndex=function(r){let i=Number.MAX_VALUE,s=-1;const{value:o}=this.state,a=o.length;for(let l=0;l<a;l+=1){const c=this.calcOffset(o[l]),u=Math.abs(r-c);u<i&&(i=u,s=l)}return s},n.getMousePosition=function(r){return[r["page"+this.axisKey()],r["page"+this.orthogonalAxisKey()]]},n.getTouchPosition=function(r){const i=r.touches[0];return[i["page"+this.axisKey()],i["page"+this.orthogonalAxisKey()]]},n.getKeyDownEventMap=function(){return{keydown:this.onKeyDown,keyup:this.onKeyUp,focusout:this.onBlur}},n.getMouseEventMap=function(){return{mousemove:this.onMouseMove,mouseup:this.onMouseUp}},n.getTouchEventMap=function(){return{touchmove:this.onTouchMove,touchend:this.onTouchEnd}},n.getValueFromPosition=function(r){const i=r/(this.state.sliderLength-this.state.thumbSize)*(this.props.max-this.props.min);return yh(this.state.startValue+i,this.props)},n.getDiffPosition=function(r){let i=r-this.state.startPosition;return this.props.invert&&(i*=-1),i},n.resize=function(){const{slider:r,thumb0:i}=this;if(!r||!i)return;const s=this.sizeKey(),o=r.getBoundingClientRect(),a=r[s],l=o[this.posMaxKey()],c=o[this.posMinKey()],u=i.getBoundingClientRect()[s.replace("client","").toLowerCase()],h=a-u,d=Math.abs(l-c);this.state.upperBound===h&&this.state.sliderLength===d&&this.state.thumbSize===u||this.setState({upperBound:h,sliderLength:d,thumbSize:u})},n.calcOffset=function(r){const i=this.props.max-this.props.min;return i===0?0:(r-this.props.min)/i*this.state.upperBound},n.calcValue=function(r){return r/this.state.upperBound*(this.props.max-this.props.min)+this.props.min},n.calcOffsetFromPosition=function(r){const{slider:i}=this,s=i.getBoundingClientRect(),o=s[this.posMaxKey()],a=s[this.posMinKey()];let l=r-(window["page"+this.axisKey()+"Offset"]+(this.props.invert?o:a));return this.props.invert&&(l=this.state.sliderLength-l),l-=this.state.thumbSize/2,l},n.forceValueFromPosition=function(r,i){const s=this.calcOffsetFromPosition(r),o=this.getClosestIndex(s),a=yh(this.calcValue(s),this.props),l=this.state.value.slice();l[o]=a;for(let c=0;c<l.length-1;c+=1)if(l[c+1]-l[c]<this.props.minDistance)return;this.fireChangeEvent("onBeforeChange"),this.hasMoved=!0,this.setState({value:l},(()=>{i(o),this.fireChangeEvent("onChange")}))},n.clearPendingResizeTimeouts=function(){do{const r=this.pendingResizeTimeouts.shift();clearTimeout(r)}while(this.pendingResizeTimeouts.length)},n.start=function(r,i){const s=this["thumb"+r];s&&s.focus();const{zIndices:o}=this.state;o.splice(o.indexOf(r),1),o.push(r),this.setState((a=>({startValue:a.value[r],startPosition:i!==void 0?i:a.startPosition,index:r,zIndices:o})))},n.moveUpByStep=function(r){r===void 0&&(r=this.props.step);const i=this.state.value[this.state.index],s=yh(this.props.invert&&this.props.orientation==="horizontal"?i-r:i+r,this.props);
3422this.move(Math.min(s,this.props.max))},n.moveDownByStep=function(r){r===void 0&&(r=this.props.step);const i=this.state.value[this.state.index],s=yh(this.props.invert&&this.props.orientation==="horizontal"?i+r:i-r,this.props);this.move(Math.max(s,this.props.min))},n.move=function(r){const i=this.state.value.slice(),{index:s}=this.state,{length:o}=i,a=i[s];if(r===a)return;this.hasMoved||this.fireChangeEvent("onBeforeChange"),this.hasMoved=!0;const{pearling:l,max:c,min:u,minDistance:h}=this.props;if(!l){if(s>0){const d=i[s-1];r<d+h&&(r=d+h)}if(s<o-1){const d=i[s+1];r>d-h&&(r=d-h)}}i[s]=r,l&&o>1&&(r>a?(this.pushSucceeding(i,h,s),(function(d,m,y,v){for(let b=0;b<d;b+=1){const x=v-b*y;m[d-1-b]>x&&(m[d-1-b]=x)}})(o,i,h,c)):r<a&&(this.pushPreceding(i,h,s),(function(d,m,y,v){for(let b=0;b<d;b+=1){const x=v+b*y;m[b]<x&&(m[b]=x)}})(o,i,h,u))),this.setState({value:i},this.fireChangeEvent.bind(this,"onChange"))},n.pushSucceeding=function(r,i,s){let o,a;for(o=s,a=r[o]+i;r[o+1]!==null&&a>r[o+1];o+=1,a=r[o]+i)r[o+1]=lI(a,this.props)},n.pushPreceding=function(r,i,s){for(let o=s,a=r[o]-i;r[o-1]!==null&&a<r[o-1];o-=1,a=r[o]-i)r[o-1]=lI(a,this.props)},n.axisKey=function(){return this.props.orientation==="vertical"?"Y":"X"},n.orthogonalAxisKey=function(){return this.props.orientation==="vertical"?"X":"Y"},n.posMinKey=function(){return this.props.orientation==="vertical"?this.props.invert?"bottom":"top":this.props.invert?"right":"left"},n.posMaxKey=function(){return this.props.orientation==="vertical"?this.props.invert?"top":"bottom":this.props.invert?"left":"right"},n.sizeKey=function(){return this.props.orientation==="vertical"?"clientHeight":"clientWidth"},n.fireChangeEvent=function(r){this.props[r]&&this.props[r](Vb(this.state.value),this.state.index)},n.buildThumbStyle=function(r,i){const s={position:"absolute",touchAction:"none",willChange:this.state.index>=0?this.posMinKey():void 0,zIndex:this.state.zIndices.indexOf(i)+1};return s[this.posMinKey()]=r+"px",s},n.buildTrackStyle=function(r,i){const s={position:"absolute",willChange:this.state.index>=0?this.posMinKey()+","+this.posMaxKey():void 0};return s[this.posMinKey()]=r,s[this.posMaxKey()]=i,s},n.buildMarkStyle=function(r){var i;return(i={position:"absolute"})[this.posMinKey()]=r,i},n.renderThumbs=function(r){const{length:i}=r,s=[];for(let a=0;a<i;a+=1)s[a]=this.buildThumbStyle(r[a],a);const o=[];for(let a=0;a<i;a+=1)o[a]=this.renderThumb(s[a],a);return o},n.renderTracks=function(r){const i=[],s=r.length-1;i.push(this.renderTrack(0,0,r[0]));for(let o=0;o<s;o+=1)i.push(this.renderTrack(o+1,r[o],r[o+1]));return i.push(this.renderTrack(s+1,r[s],this.state.upperBound)),i},n.renderMarks=function(){let{marks:r}=this.props;const i=this.props.max-this.props.min+1;return typeof r=="boolean"?r=Array.from({length:i}).map(((s,o)=>o)):typeof r=="number"&&(r=Array.from({length:i}).map(((s,o)=>o)).filter((s=>s%r==0))),r.map(parseFloat).sort(((s,o)=>s-o)).map((s=>{const o=this.calcOffset(s),a={key:s,className:this.props.markClassName,style:this.buildMarkStyle(o)};return this.props.renderMark(a)}))},n.render=function(){const r=[],{value:i}=this.state,s=i.length;for(let c=0;c<s;c+=1)r[c]=this.calcOffset(i[c],c);const o=this.props.withTracks?this.renderTracks(r):null,a=this.renderThumbs(r),l=this.props.marks?this.renderMarks():null;return Me.createElement("div",{ref:c=>{this.slider=c,this.resizeElementRef.current=c},style:{position:"relative"},className:this.props.className+(this.props.disabled?" disabled":""),onMouseDown:this.onSliderMouseDown,onClick:this.onSliderClick},o,a,l)},e})(Me.Component);cI.displayName="ReactSlider",cI.defaultProps={min:0,max:100,step:1,pageFn:t=>10*t,minDistance:0,defaultValue:0,orientation:"horizontal",className:"slider",thumbClassName:"thumb",thumbActiveClassName:"active",trackClassName:"track",markClassName:"mark",withTracks:!0,pearling:!1,disabled:!1,snapDragDisabled:!1,invert:!1,marks:[],renderThumb:t=>Me.createElement("div",t),renderTrack:t=>Me.createElement("div",t),renderMark:t=>Me.createElement("span",t)};var kg=cI,TS,ML;function T_e(){return ML||(ML=1,TS={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],ol
3422ive:[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]}),TS}var CS,RL;function C_e(){if(RL)return CS;RL=1;var t=T_e();CS=n;var e={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function n(r){var i,s=[],o=1,a;if(typeof r=="string")if(r=r.toLowerCase(),t[r])s=t[r].slice(),a="rgb";else if(r==="transparent")o=0,a="rgb",s=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(r)){var l=r.slice(1),c=l.length,u=c<=4;o=1,u?(s=[parseInt(l[0]+l[0],16),parseInt(l[1]+l[1],16),parseInt(l[2]+l[2],16)],c===4&&(o=parseInt(l[3]+l[3],16)/255)):(s=[parseInt(l[0]+l[1],16),parseInt(l[2]+l[3],16),parseInt(l[4]+l[5],16)],c===8&&(o=parseInt(l[6]+l[7],16)/255)),s[0]||(s[0]=0),s[1]||(s[1]=0),s[2]||(s[2]=0),a="rgb"}else if(i=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(r)){var h=i[1],d=h==="rgb",l=h.replace(/a$/,"");a=l;var c=l==="cmyk"?4:l==="gray"?1:3;s=i[2].trim().split(/\s*[,\/]\s*|\s+/).map(function(v,b){if(/%$/.test(v))return b===c?parseFloat(v)/100:l==="rgb"?parseFloat(v)*255/100:parseFloat(v);if(l[b]==="h"){if(/deg$/.test(v))return parseFloat(v);if(e[v]!==void 0)return e[v]}return parseFloat(v)}),h===l&&s.push(1),o=d||s[c]===void 0?1:s[c],s=s.slice(0,c)}else r.length>10&&/[0-9](?:\s|\/)/.test(r)&&(s=r.match(/([0-9]+)/g).map(function(m){return parseFloat(m)}),a=r.match(/([a-z])/ig).join("").toLowerCase());else isNaN(r)?Array.isArray(r)||r.length?(s=[r[0],r[1],r[2]],a="rgb",o=r.length===4?r[3]:1):r instanceof Object&&(r.r!=null||r.red!=null||r.R!=null?(a="rgb",s=[r.r||r.red||r.R||0,r.g||r.green||r.G||0,r.b||r.blue||r.B||0]):(a="hsl",s=[r.h||r.hue||r.H||0,r.s||r.saturation||r.S||0,r.l||r.lightness||r.L||r.b||r.brightness]),o=r.a||r.alpha||r.opacity||1,r.opacity!=null&&(o/=100)):(a="rgb",s=[r>>>16,(r&65280)>>>8,r&255]);return{space:a,values:s,alpha:o}}return CS}var PS,kL;function P_e(){return kL||(kL=1,PS={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]}),PS}var IS,NL;function I_e(){if(NL)return IS;NL=1;var t=P_e();return IS={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(e){var n=e[0]/360,r=e[1]/100,i=e[2]/100,s,o,a,l,c;if(r===0)return c=i*255,[c,c,c];i<.5?o=i*(1+r):o=i+r-i*r,s=2*i-o,l=[0,0,0];for(var u=0;u<3;u++)a=n+1/3*-(u-1),a<0?a++:a>1&&a--,6*a<1?c=s+(o-s)*6*a:2*a<1?c=o:3*a<2?c=s+(o-s)*(2/3-a)*6:c=s,l[u]=c*255;return l}},t.hsl=function(e){var n=e[0]/255,r=e[1]/255,i=e[2]/255,s=Math.min(n,r,i),o=Math.max(n,r,i),a=o-s,l,c,u;return o===s?l=0:n===o?l=(r-i)/a:r===o?l=2+(i-n)/a:i===o&&(l=4+(n-r)/a),l=Math.min(l*60,360),l<0&&(l+=360),u=(s+o)/2,o===s?c=0:u<=.5?c=a/(o+s):c=a/(2-o-s),[l,c*100,u*100]},IS}var OS,DL;function O_e(){if(DL)return OS;DL=1;const t=C_e(),e=I_e();function n(s,o,a){return o<a?s<o?o:s>a?a:s:s<a?a:s>o?o:s}function r(s,o,a){return s*(1-a)+o*a}OS=i;function i(s){return s=s.map(function(o){if(o=t(o),o.space!="rgb"){if(o.space!="hsl")throw"c.spacespace is not supported.";o.values=e.rgb(o.values)}return o.values.push(o.alpha),o.values}),function(o,a){a=a||r,o=n(o,0,1);var l=(s.length-1)*o,c=Math.floor(l),u=Math.ceil(l);o=l-c;var h=s[c],d=s[u],m=h.map(function(y,v){return y=a(y,d[v],o),v<3&&(y=Math.round(y)),y});return m[3]===1?"rgb("+m.slice(0,3)+")":"rgba("+m+")"}}return OS}var M_e=O_e();const R_e=fn(M_e);var No=function(){return No=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},No.apply(this,arguments)};function k_e(t){return Me.createElement("div",{style:No({width:t.size,height:t.size},t)})}function N_e(t){return Me.createElement("div",{style:t})}
3422function D_e(t){var e=t.barBackgroundColor,n=e===void 0?"#dedede":e,r=t.barBackgroundColorActive,i=r===void 0?"#06b7e7":r,s=t.barBorderRadius,o=s===void 0?16:s,a=t.barHeight,l=a===void 0?26:a,c=t.barWidth,u=c===void 0?48:c,h=t.handleBackgroundColor,d=h===void 0?"#ffffff":h,m=t.handleBackgroundColorActive,y=t.handleBorderRadius,v=y===void 0?16:y,b=t.handleSize,x=b===void 0?18:b,T=t.padding,E=T===void 0?5:T,C=t.transitionDuration,I=C===void 0?"100ms":C,O=t.barTransitionDuration,N=t.handleTransitionDuration,U=t.onToggle,F=U===void 0?function(){}:U,H=t.handleRenderer,W=t.handleRendererActive,z=t.barRenderer,V=t.barRendererActive,M=t.flip,K=t.barStyles,j=t.barStylesActive,q=t.handleStyles,Y=t.handleStylesActive,X=t.active,te=X===void 0?!1:X,D=t.draggable,$=D===void 0?!0:D,he=t.barTransitionType,Se=he===void 0?"fade":he,fe=A.useState(te),$e=fe[0],Ze=fe[1],ce=A.useState($e&&!M||!$e&&M?1:0),me=ce[0],de=ce[1],ye=A.useState($e?i:n),ve=ye[0],ue=ye[1],k=A.useState(!1),ie=k[0],ne=k[1];function Z(en,_t,Mt){var ht=R_e([en,_t]);return ht(Mt)}function J(en){var _t=Math.max(E,Math.min(u-E-x,en*u-x/2)),Mt=(_t-E)/(u-E*2-x);de(en),Se==="fade"&&ue(Z(n,i,Mt))}var le={boxSizing:"border-box",width:"100%",flex:"none"};K=$e?No(No({},K),j):K,q=$e?No(No({},q),Y):q;var pe=z??Me.createElement(N_e,No({width:u,height:l,borderRadius:o,background:ve,transition:"all "+(ie?"0s":O??I)},K)),Te=H??Me.createElement(k_e,No({size:x,borderRadius:v,backgroundColor:$e?m??d:d,transition:"all "+(ie?"0s":N??I)},q)),we=V??pe,Qe=W??Te,nt=A.useState(!1),Xe=nt[0],ft=nt[1];function It(en){ft(!0)}function gt(en){if(!(!Xe||!$)){var _t=ie;if(ie||(ne(!0),_t=!0),_t){var Mt=en.currentTarget.getBoundingClientRect(),ht=(en.clientX-Mt.left)/u;J(ht)}}}function Yt(){if(Xe){if(!ie)F(!$e),J($e?0:1),Ze(!$e);else{var en=me>.5;F(en),J(en?1:0),Ze(en)}ft(!1),ne(!1)}}return Me.createElement("div",{style:{display:"flex",flexFlow:"row nowrap",cursor:"pointer",width:u,userSelect:"none"},onPointerUp:Yt,onPointerDown:It,onPointerMove:gt,onPointerLeave:Yt},Me.createElement("div",{style:No({paddingTop:Math.max(x-l,0)/2},le)},$e?we:pe),Se==="slide"?Me.createElement("div",{style:No({marginLeft:"-100%"},le)},Me.createElement("div",{style:{borderRadius:o,width:u,height:l,marginTop:Math.max(x-l,0)/2,overflow:"hidden"}},Me.createElement("div",{style:{transition:"all "+(ie?"0s":I),backgroundColor:i,width:me*u,height:l}}))):void 0,Me.createElement("div",{style:No({marginLeft:"-100%"},le)},Me.createElement("div",{style:{transition:"all "+(ie?"0s":I),paddingTop:Math.max(l-x,0)/2,paddingLeft:Math.max(E,Math.min(u-E-x,me*u-x/2))}},$e?Qe:Te)))}/**
3423 * @license lucide-react v0.477.0 - ISC
3424 *
3425 * This source code is licensed under the ISC license.
3426 * See the LICENSE file in the root directory of this source tree.
3427 */const B_e=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),nX=(...t)=>t.filter((e,n,r)=>!!e&&e.trim()!==""&&r.indexOf(e)===n).join(" ").trim();/**
3428 * @license lucide-react v0.477.0 - ISC
3429 *
3430 * This source code is licensed under the ISC license.
3431 * See the LICENSE file in the root directory of this source tree.
3432 */var L_e={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
3433 * @license lucide-react v0.477.0 - ISC
3434 *
3435 * This source code is licensed under the ISC license.
3436 * See the LICENSE file in the root directory of this source tree.
3437 */const F_e=A.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:s,iconNode:o,...a},l)=>A.createElement("svg",{ref:l,...L_e,width:e,height:e,stroke:t,strokeWidth:r?Number(n)*24/Number(e):n,className:nX("lucide",i),...a},[...o.map(([c,u])=>A.createElement(c,u)),...Array.isArray(s)?s:[s]]));/**
3438 * @license lucide-react v0.477.0 - ISC
3439 *
3440 * This source code is licensed under the ISC license.
3441 * See the LICENSE file in the root directory of this source tree.
3442 */const Bl=(t,e)=>{const n=A.forwardRef(({className:r,...i},s)=>A.createElement(F_e,{ref:s,iconNode:e,className:nX(`lucide-${B_e(t)}`,r),...i}));return n.displayName=`${t}`,n};/**
3443 * @license lucide-react v0.477.0 - ISC
3444 *
3445 * This source code is licensed under the ISC license.
3446 * See the LICENSE file in the root directory of this source tree.
3447 */const U_e=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],z_e=Bl("Calendar",U_e);/**
3448 * @license lucide-react v0.477.0 - ISC
3449 *
3450 * This source code is licensed under the ISC license.
3451 * See the LICENSE file in the root directory of this source tree.
3452 */const j_e=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],V_e=Bl("EyeOff",j_e);/**
3453 * @license lucide-react v0.477.0 - ISC
3454 *
3455 * This source code is licensed under the ISC license.
3456 * See the LICENSE file in the root directory of this source tree.
3457 */const W_e=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],$_e=Bl("Eye",W_e);/**
3458 * @license lucide-react v0.477.0 - ISC
3459 *
3460 * This source code is licensed under the ISC license.
3461 * See the LICENSE file in the root directory of this source tree.
3462 */const H_e=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],q_e=Bl("Layers",H_e);/**
3463 * @license lucide-react v0.477.0 - ISC
3464 *
3465 * This source code is licensed under the ISC license.
3466 * See the LICENSE file in the root directory of this source tree.
3467 */const Q_e=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],fA=Bl("LoaderCircle",Q_e);/**
3468 * @license lucide-react v0.477.0 - ISC
3469 *
3470 * This source code is licensed under the ISC license.
3471 * See the LICENSE file in the root directory of this source tree.
3472 */const X_e=[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]],BL=Bl("Pause",X_e);/**
3473 * @license lucide-react v0.477.0 - ISC
3474 *
3475 * This source code is licensed under the ISC license.
3476 * See the LICENSE file in the root directory of this source tree.
3477 */const Y_e=[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]],LL=Bl("Play",Y_e);/**
3478 * @license lucide-react v0.477.0 - ISC
3479 *
3480 * This source code is licensed under the ISC license.
3481 * See the LICENSE file in the root directory of this source tree.
3482 */const K_e=[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]],FL=Bl("RotateCw",K_e);/**
3483 * @license lucide-react v0.477.0 - ISC
3484 *
3485 * This source code is licensed under the ISC license.
3486 * See the LICENSE file in the root directory of this source tree.
3487 */const G_e=[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]],UL=Bl("Video",G_e);/**
3488 * @license lucide-react v0.477.0 - ISC
3489 *
3490 * This source code is licensed under the ISC license.
3491 * See the LICENSE file in the root directory of this source tree.
3492 */const Z_e=[["path",{d:"M18 6 6 18",key:"1bl5f8"}
vendor: 4,309 bytes, lines 3492-3495
3492],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],uI=Bl("X",Z_e);var $b={exports:{}};/*!
3493* tabbable 6.2.0
3494* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
3495*/var rX=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],Pw=rX.join(","),iX=typeof Element>"u",nd=iX?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Iw=!iX&&Element.prototype.getRootNode?function(t){var e;return t==null||(e=t.getRootNode)===null||e===void 0?void 0:e.call(t)}:function(t){return t==null?void 0:t.ownerDocument},Ow=function t(e,n){var r;n===void 0&&(n=!0);var i=e==null||(r=e.getAttribute)===null||r===void 0?void 0:r.call(e,"inert"),s=i===""||i==="true",o=s||n&&e&&t(e.parentNode);return o},J_e=function(e){var n,r=e==null||(n=e.getAttribute)===null||n===void 0?void 0:n.call(e,"contenteditable");return r===""||r==="true"},sX=function(e,n,r){if(Ow(e))return[];var i=Array.prototype.slice.apply(e.querySelectorAll(Pw));return n&&nd.call(e,Pw)&&i.unshift(e),i=i.filter(r),i},oX=function t(e,n,r){for(var i=[],s=Array.from(e);s.length;){var o=s.shift();if(!Ow(o,!1))if(o.tagName==="SLOT"){var a=o.assignedElements(),l=a.length?a:o.children,c=t(l,!0,r);r.flatten?i.push.apply(i,c):i.push({scopeParent:o,candidates:c})}else{var u=nd.call(o,Pw);u&&r.filter(o)&&(n||!e.includes(o))&&i.push(o);var h=o.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(o),d=!Ow(h,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(o));if(h&&d){var m=t(h===!0?o.children:h.children,!0,r);r.flatten?i.push.apply(i,m):i.push({scopeParent:o,candidates:m})}else s.unshift.apply(s,o.children)}}return i},aX=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},ju=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||J_e(e))&&!aX(e)?0:e.tabIndex},ewe=function(e,n){var r=ju(e);return r<0&&n&&!aX(e)?0:r},twe=function(e,n){return e.tabIndex===n.tabIndex?e.documentOrder-n.documentOrder:e.tabIndex-n.tabIndex},lX=function(e){return e.tagName==="INPUT"},nwe=function(e){return lX(e)&&e.type==="hidden"},rwe=function(e){var n=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(r){return r.tagName==="SUMMARY"});return n},iwe=function(e,n){for(var r=0;r<e.length;r++)if(e[r].checked&&e[r].form===n)return e[r]},swe=function(e){if(!e.name)return!0;var n=e.form||Iw(e),r=function(a){return n.querySelectorAll('input[type="radio"][name="'+a+'"]')},i;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")i=r(window.CSS.escape(e.name));else try{i=r(e.name)}catch(o){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",o.message),!1}var s=iwe(i,e.form);return!s||s===e},owe=function(e){return lX(e)&&e.type==="radio"},awe=function(e){return owe(e)&&!swe(e)},lwe=function(e){var n,r=e&&Iw(e),i=(n=r)===null||n===void 0?void 0:n.host,s=!1;if(r&&r!==e){var o,a,l;for(s=!!((o=i)!==null&&o!==void 0&&(a=o.ownerDocument)!==null&&a!==void 0&&a.contains(i)||e!=null&&(l=e.ownerDocument)!==null&&l!==void 0&&l.contains(e));!s&&i;){var c,u,h;r=Iw(i),i=(c=r)===null||c===void 0?void 0:c.host,s=!!((u=i)!==null&&u!==void 0&&(h=u.ownerDocument)!==null&&h!==void 0&&h.contains(i))}}return s},zL=function(e){var n=e.getBoundingClientRect(),r=n.width,i=n.height;return r===0&&i===0},cwe=function(e,n){var r=n.displayCheck,i=n.getShadowRoot;if(getComputedStyle(e).visibility==="hidden")return!0;var s=nd.call(e,"details>summary:first-of-type"),o=s?e.parentElement:e;if(nd.call(o,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof i=="function"){for(var a=e;e;){var l=e.parentElement,c=Iw(e);if(l&&!l.shadowRoot&&i(l)===!0)return zL(e);e.assignedSlot?e=e.assignedSlot:!l&&c!==e.ownerDocument?e=c.host:e=l}e=a}if(lwe(e))return!e.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return zL(e);return!1}
vendor: 1,114 bytes, line 3495
3495,uwe=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var n=e.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var i=n.children.item(r);if(i.tagName==="LEGEND")return nd.call(n,"fieldset[disabled] *")?!0:!i.contains(e)}return!0}n=n.parentElement}return!1},Mw=function(e,n){return!(n.disabled||Ow(n)||nwe(n)||cwe(n,e)||rwe(n)||uwe(n))},fI=function(e,n){return!(awe(n)||ju(n)<0||!Mw(e,n))},fwe=function(e){var n=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},hwe=function t(e){var n=[],r=[];return e.forEach(function(i,s){var o=!!i.scopeParent,a=o?i.scopeParent:i,l=ewe(a,o),c=o?t(i.candidates):a;l===0?o?n.push.apply(n,c):n.push(a):r.push({documentOrder:s,tabIndex:l,item:i,isScope:o,content:c})}),r.sort(twe).reduce(function(i,s){return s.isScope?i.push.apply(i,s.content):i.push(s.content),i},[]).concat(n)},cX=function(e,n){n=n||{};var r;return n.getShadowRoot?r=oX([e],n.includeContainer,{filter:fI.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:fwe}):r=sX(e,n.includeContainer,fI.bind(null,n)),hwe(r)}
vendor: 4,596 bytes, lines 3495-3499
3495,uX=function(e,n){n=n||{};var r;return n.getShadowRoot?r=oX([e],n.includeContainer,{filter:Mw.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=sX(e,n.includeContainer,Mw.bind(null,n)),r},Ah=function(e,n){if(n=n||{},!e)throw new Error("No node provided");return nd.call(e,Pw)===!1?!1:fI(n,e)},dwe=rX.concat("iframe").join(","),O_=function(e,n){if(n=n||{},!e)throw new Error("No node provided");return nd.call(e,dwe)===!1?!1:Mw(n,e)};const pwe=Object.freeze(Object.defineProperty({__proto__:null,focusable:uX,getTabIndex:ju,isFocusable:O_,isTabbable:Ah,tabbable:cX},Symbol.toStringTag,{value:"Module"}));/*!
3496* focus-trap 7.6.5
3497* @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
3498*/function hI(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function gwe(t){if(Array.isArray(t))return hI(t)}function mwe(t,e,n){return(e=wwe(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function vwe(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function ywe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
3499In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jL(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function VL(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?jL(Object(n),!0).forEach(function(r){mwe(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):jL(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function bwe(t){return gwe(t)||vwe(t)||xwe(t)||ywe()}function _we(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function wwe(t){var e=_we(t,"string");return typeof e=="symbol"?e:e+""}function xwe(t,e){if(t){if(typeof t=="string")return hI(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?hI(t,e):void 0}}var WL={activateTrap:function(e,n){if(e.length>0){var r=e[e.length-1];r!==n&&r._setPausedState(!0)}var i=e.indexOf(n);i===-1||e.splice(i,1),e.push(n)},deactivateTrap:function(e,n){var r=e.indexOf(n);r!==-1&&e.splice(r,1),e.length>0&&!e[e.length-1]._isManuallyPaused()&&e[e.length-1]._setPausedState(!1)}},Awe=function(e){return e.tagName&&e.tagName.toLowerCase()==="input"&&typeof e.select=="function"},Ewe=function(e){return(e==null?void 0:e.key)==="Escape"||(e==null?void 0:e.key)==="Esc"||(e==null?void 0:e.keyCode)===27},cv=function(e){return(e==null?void 0:e.key)==="Tab"||(e==null?void 0:e.keyCode)===9},Swe=function(e){return cv(e)&&!e.shiftKey},Twe=function(e){return cv(e)&&e.shiftKey},$L=function(e){return setTimeout(e,0)},w1=function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return typeof e=="function"?e.apply(void 0,r):e},Hb=function(e){return e.target.shadowRoot&&typeof e.composedPath=="function"?e.composedPath()[0]:e.target},Cwe=[],Pwe=function(e,n){var r=(n==null?void 0:n.document)||document,i=(n==null?void 0:n.trapStack)||Cwe,s=VL({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isKeyForward:Swe,isKeyBackward:Twe},n),o={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,manuallyPaused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},a,l=function(V,M,K){return V&&V[M]!==void 0?V[M]:s[K||M]},c=function(V,M){var K=typeof(M==null?void 0:M.composedPath)=="function"?M.composedPath():void 0;return o.containerGroups.findIndex(function(j){var q=j.container,Y=j.tabbableNodes;return q.contains(V)||(K==null?void 0:K.includes(q))||Y.find(function(X){return X===V})})},u=function(V){var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},K=M.hasFallback,j=K===void 0?!1:K,q=M.params,Y=q===void 0?[]:q,X=s[V];if(typeof X=="function"&&(X=X.apply(void 0,bwe(Y))),X===!0&&(X=void 0),!X){if(X===void 0||X===!1)return X;throw new Error("`".concat(V,"` was specified but was not a node, or did not return a node"))}var te=X;
vendor: 3,388 bytes, line 3499
3499if(typeof X=="string"){try{te=r.querySelector(X)}catch(D){throw new Error("`".concat(V,'` appears to be an invalid selector; error="').concat(D.message,'"'))}if(!te&&!j)throw new Error("`".concat(V,"` as selector refers to no known node"))}return te},h=function(){var V=u("initialFocus",{hasFallback:!0});if(V===!1)return!1;if(V===void 0||V&&!O_(V,s.tabbableOptions))if(c(r.activeElement)>=0)V=r.activeElement;else{var M=o.tabbableGroups[0],K=M&&M.firstTabbableNode;V=K||u("fallbackFocus")}else V===null&&(V=u("fallbackFocus"));if(!V)throw new Error("Your focus-trap needs to have at least one focusable element");return V},d=function(){if(o.containerGroups=o.containers.map(function(V){var M=cX(V,s.tabbableOptions),K=uX(V,s.tabbableOptions),j=M.length>0?M[0]:void 0,q=M.length>0?M[M.length-1]:void 0,Y=K.find(function(D){return Ah(D)}),X=K.slice().reverse().find(function(D){return Ah(D)}),te=!!M.find(function(D){return ju(D)>0});return{container:V,tabbableNodes:M,focusableNodes:K,posTabIndexesFound:te,firstTabbableNode:j,lastTabbableNode:q,firstDomTabbableNode:Y,lastDomTabbableNode:X,nextTabbableNode:function($){var he=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,Se=M.indexOf($);return Se<0?he?K.slice(K.indexOf($)+1).find(function(fe){return Ah(fe)}):K.slice(0,K.indexOf($)).reverse().find(function(fe){return Ah(fe)}):M[Se+(he?1:-1)]}}}),o.tabbableGroups=o.containerGroups.filter(function(V){return V.tabbableNodes.length>0}),o.tabbableGroups.length<=0&&!u("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(o.containerGroups.find(function(V){return V.posTabIndexesFound})&&o.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},m=function(V){var M=V.activeElement;if(M)return M.shadowRoot&&M.shadowRoot.activeElement!==null?m(M.shadowRoot):M},y=function(V){if(V!==!1&&V!==m(document)){if(!V||!V.focus){y(h());return}V.focus({preventScroll:!!s.preventScroll}),o.mostRecentlyFocusedNode=V,Awe(V)&&V.select()}},v=function(V){var M=u("setReturnFocus",{params:[V]});return M||(M===!1?!1:V)},b=function(V){var M=V.target,K=V.event,j=V.isBackward,q=j===void 0?!1:j;M=M||Hb(K),d();var Y=null;if(o.tabbableGroups.length>0){var X=c(M,K),te=X>=0?o.containerGroups[X]:void 0;if(X<0)q?Y=o.tabbableGroups[o.tabbableGroups.length-1].lastTabbableNode:Y=o.tabbableGroups[0].firstTabbableNode;else if(q){var D=o.tabbableGroups.findIndex(function(Ze){var ce=Ze.firstTabbableNode;return M===ce});if(D<0&&(te.container===M||O_(M,s.tabbableOptions)&&!Ah(M,s.tabbableOptions)&&!te.nextTabbableNode(M,!1))&&(D=X),D>=0){var $=D===0?o.tabbableGroups.length-1:D-1,he=o.tabbableGroups[$];Y=ju(M)>=0?he.lastTabbableNode:he.lastDomTabbableNode}else cv(K)||(Y=te.nextTabbableNode(M,!1))}else{var Se=o.tabbableGroups.findIndex(function(Ze){var ce=Ze.lastTabbableNode;return M===ce});if(Se<0&&(te.container===M||O_(M,s.tabbableOptions)&&!Ah(M,s.tabbableOptions)&&!te.nextTabbableNode(M))&&(Se=X),Se>=0){var fe=Se===o.tabbableGroups.length-1?0:Se+1,$e=o.tabbableGroups[fe];Y=ju(M)>=0?$e.firstTabbableNode:$e.firstDomTabbableNode}else cv(K)||(Y=te.nextTabbableNode(M))}}else Y=u("fallbackFocus");return Y},x=function(V){var M=Hb(V);if(!(c(M,V)>
vendor: 5,937 bytes, line 3499
3499=0)){if(w1(s.clickOutsideDeactivates,V)){a.deactivate({returnFocus:s.returnFocusOnDeactivate});return}w1(s.allowOutsideClick,V)||V.preventDefault()}},T=function(V){var M=Hb(V),K=c(M,V)>=0;if(K||M instanceof Document)K&&(o.mostRecentlyFocusedNode=M);else{V.stopImmediatePropagation();var j,q=!0;if(o.mostRecentlyFocusedNode)if(ju(o.mostRecentlyFocusedNode)>0){var Y=c(o.mostRecentlyFocusedNode),X=o.containerGroups[Y].tabbableNodes;if(X.length>0){var te=X.findIndex(function(D){return D===o.mostRecentlyFocusedNode});te>=0&&(s.isKeyForward(o.recentNavEvent)?te+1<X.length&&(j=X[te+1],q=!1):te-1>=0&&(j=X[te-1],q=!1))}}else o.containerGroups.some(function(D){return D.tabbableNodes.some(function($){return ju($)>0})})||(q=!1);else q=!1;q&&(j=b({target:o.mostRecentlyFocusedNode,isBackward:s.isKeyBackward(o.recentNavEvent)})),y(j||o.mostRecentlyFocusedNode||h())}o.recentNavEvent=void 0},E=function(V){var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;o.recentNavEvent=V;var K=b({event:V,isBackward:M});K&&(cv(V)&&V.preventDefault(),y(K))},C=function(V){(s.isKeyForward(V)||s.isKeyBackward(V))&&E(V,s.isKeyBackward(V))},I=function(V){Ewe(V)&&w1(s.escapeDeactivates,V)!==!1&&(V.preventDefault(),a.deactivate())},O=function(V){var M=Hb(V);c(M,V)>=0||w1(s.clickOutsideDeactivates,V)||w1(s.allowOutsideClick,V)||(V.preventDefault(),V.stopImmediatePropagation())},N=function(){if(o.active)return WL.activateTrap(i,a),o.delayInitialFocusTimer=s.delayInitialFocus?$L(function(){y(h())}):y(h()),r.addEventListener("focusin",T,!0),r.addEventListener("mousedown",x,{capture:!0,passive:!1}),r.addEventListener("touchstart",x,{capture:!0,passive:!1}),r.addEventListener("click",O,{capture:!0,passive:!1}),r.addEventListener("keydown",C,{capture:!0,passive:!1}),r.addEventListener("keydown",I),a},U=function(){if(o.active)return r.removeEventListener("focusin",T,!0),r.removeEventListener("mousedown",x,!0),r.removeEventListener("touchstart",x,!0),r.removeEventListener("click",O,!0),r.removeEventListener("keydown",C,!0),r.removeEventListener("keydown",I),a},F=function(V){var M=V.some(function(K){var j=Array.from(K.removedNodes);return j.some(function(q){return q===o.mostRecentlyFocusedNode})});M&&y(h())},H=typeof window<"u"&&"MutationObserver"in window?new MutationObserver(F):void 0,W=function(){H&&(H.disconnect(),o.active&&!o.paused&&o.containers.map(function(V){H.observe(V,{subtree:!0,childList:!0})}))};return a={get active(){return o.active},get paused(){return o.paused},activate:function(V){if(o.active)return this;var M=l(V,"onActivate"),K=l(V,"onPostActivate"),j=l(V,"checkCanFocusTrap");j||d(),o.active=!0,o.paused=!1,o.nodeFocusedBeforeActivation=m(r),M==null||M();var q=function(){j&&d(),N(),W(),K==null||K()};return j?(j(o.containers.concat()).then(q,q),this):(q(),this)},deactivate:function(V){if(!o.active)return this;var M=VL({onDeactivate:s.onDeactivate,onPostDeactivate:s.onPostDeactivate,checkCanReturnFocus:s.checkCanReturnFocus},V);clearTimeout(o.delayInitialFocusTimer),o.delayInitialFocusTimer=void 0,U(),o.active=!1,o.paused=!1,W(),WL.deactivateTrap(i,a);var K=l(M,"onDeactivate"),j=l(M,"onPostDeactivate"),q=l(M,"checkCanReturnFocus"),Y=l(M,"returnFocus","returnFocusOnDeactivate");K==null||K();var X=function(){$L(function(){Y&&y(v(o.nodeFocusedBeforeActivation)),j==null||j()})};return Y&&q?(q(v(o.nodeFocusedBeforeActivation)).then(X,X),this):(X(),this)},pause:function(V){return o.active?(o.manuallyPaused=!0,this._setPausedState(!0,V)):this},unpause:function(V){return o.active?(o.manuallyPaused=!1,i[i.length-1]!==this?this:this._setPausedState(!1,V)):this},updateContainerElements:function(V){var M=[].concat(V).filter(Boolean);return o.containers=M.map(function(K){return typeof K=="string"?r.querySelector(K):K}),o.active&&d(),W(),this}},Object.defineProperties(a,{_isManuallyPaused:{value:function(){return o.manuallyPaused}},_setPausedState:{value:function(V,M){if(o.paused===V)return this;if(o.paused=V,V){var K=l(M,"onPause"),j=l(M,"onPostPause");K==null||K(),U(),W(),j==null||j()}else{var q=l(M,"onUnpause"),Y=l(M,"onPostUnpause");q==null||q(),d(),N(),W(),Y==null||Y()}return this}}}),a.updateContainerElements(e),a};const Iwe=Object.freeze(Object.defineProperty({__proto__:null,createFocusTrap:Pwe},Symbol.toStringTag,{value:"Module"})),Owe=hW(Iwe),Mwe=hW(pwe);var HL;function Rwe(){if(HL)return $b.exports;HL=1;function t(N){"@babel/helpers - typeof";return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(U){return typeof U}:function(U){return U&&typeof Symbol=="function"&&U.constructor===Symbol&&U!==Symbol.prototype?"symbol":typeof U},t(N)}var e,n;function r(N,U){if(!(N instanceof U))throw new TypeError("Cannot call a class as a function")}function i(N,U){for(var F=0;F<U.length;F++){var H=U[F];H.enumerable=H.enumerable||!1,H.configurable=!0,"value"in H&&(H.writable=!0),Object.defineProperty(N,y(H.key),H)}}function s(N,U,F){return U&&i(N.prototype,U),Object.defineProperty(N,"prototype",{writable:!1}),N}function o(N,U,F){return U=u(U),a(N,c()?Reflect.construct(U,F||[],u(N).constructor):U.apply(N,F))}function a(N,U){if(U&&(t(U)=="object"||typeof U=="function"))return U;if(U!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return l(N)}function l(N){if(N===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return N}function c(){try{var N=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(c=function(){return!!N})()}function u(N){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(U){return U.__proto__||Object.getPrototypeOf(U)},u(N)}function h(N,U){if(typeof U!="function"&&U!==null)throw new TypeError("Super expression must either be null or a function");N.prototype=Object.create(U&&U.prototype,{constructor:{value:N,writable:!0,configurable:!0}}),Object.defineProperty(N,"prototype",{writable:!1}),U&&d(N,U)}
3499function d(N,U){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(F,H){return F.__proto__=H,F},d(N,U)}function m(N,U,F){return(U=y(U))in N?Object.defineProperty(N,U,{value:F,enumerable:!0,configurable:!0,writable:!0}):N[U]=F,N}function y(N){var U=v(N,"string");return t(U)=="symbol"?U:U+""}function v(N,U){if(t(N)!="object"||!N)return N;var F=N[Symbol.toPrimitive];if(F!==void 0){var H=F.call(N,U);if(t(H)!="object")return H;throw new TypeError("@@toPrimitive must return a primitive value.")}return(U==="string"?String:Number)(N)}var b=my(),x=Owe,T=x.createFocusTrap,E=Mwe,C=E.isFocusable,I=parseInt((e=(n=/^(\d+)\./.exec(b.version))===null||n===void 0?void 0:n[1])!==null&&e!==void 0?e:0,10),O=(function(N){function U(F){var H;r(this,U),H=o(this,U,[F]),m(H,"getNodeForOption",function(V){var M,K=(M=this.internalOptions[V])!==null&&M!==void 0?M:this.originalOptions[V];if(typeof K=="function"){for(var j=arguments.length,q=new Array(j>1?j-1:0),Y=1;Y<j;Y++)q[Y-1]=arguments[Y];K=K.apply(void 0,q)}if(K===!0&&(K=void 0),!K){if(K===void 0||K===!1)return K;throw new Error("`".concat(V,"` was specified but was not a node, or did not return a node"))}var X=K;if(typeof K=="string"){var te;if(X=(te=this.getDocument())===null||te===void 0?void 0:te.querySelector(K),!X)throw new Error("`".concat(V,"` as selector refers to no known node"))}return X}),H.handleDeactivate=H.handleDeactivate.bind(H),H.handlePostDeactivate=H.handlePostDeactivate.bind(H),H.handleClickOutsideDeactivates=H.handleClickOutsideDeactivates.bind(H),H.internalOptions={returnFocusOnDeactivate:!1,checkCanReturnFocus:null,onDeactivate:H.handleDeactivate,onPostDeactivate:H.handlePostDeactivate,clickOutsideDeactivates:H.handleClickOutsideDeactivates},H.originalOptions={returnFocusOnDeactivate:!0,onDeactivate:null,onPostDeactivate:null,checkCanReturnFocus:null,clickOutsideDeactivates:!1};var W=F.focusTrapOptions;for(var z in W)if(Object.prototype.hasOwnProperty.call(W,z)){if(z==="returnFocusOnDeactivate"||z==="onDeactivate"||z==="onPostDeactivate"||z==="checkCanReturnFocus"||z==="clickOutsideDeactivates"){H.originalOptions[z]=W[z];continue}H.internalOptions[z]=W[z]}return H.outsideClick=null,H.focusTrapElements=F.containerElements||[],H.updatePreviousElement(),H}return h(U,N),s(U,[{key:"getDocument",value:function(){return this.props.focusTrapOptions.document||(typeof document<"u"?document:void 0)}},{key:"getReturnFocusNode",value:function(){var H=this.getNodeForOption("setReturnFocus",this.previouslyFocusedElement);return H||(H===!1?!1:this.previouslyFocusedElement)}},{key:"updatePreviousElement",value:function(){var H=this.getDocument();H&&(this.previouslyFocusedElement=H.activeElement)}},{key:"deactivateTrap",value:function(){!this.focusTrap||!this.focusTrap.active||this.focusTrap.deactivate({returnFocus:!1,checkCanReturnFocus:null,onDeactivate:this.originalOptions.onDeactivate})}},{key:"handleClickOutsideDeactivates",value:function(H){var W=typeof this.originalOptions.clickOutsideDeactivates=="function"?this.originalOptions.clickOutsideDeactivates.call(null,H):this.originalOptions.clickOutsideDeactivates;return W&&(this.outsideClick={target:H.target,allowDeactivation:W}),W}},{key:"handleDeactivate",value:function(){this.originalOptions.onDeactivate&&this.originalOptions.onDeactivate.call(null),this.deactivateTrap()}},{key:"handlePostDeactivate",value:function(){var H=this,W=function(){var V=H.getReturnFocusNode(),M=!!(H.originalOptions.returnFocusOnDeactivate&&V!==null&&V!==void 0&&V.focus&&(!H.outsideClick||H.outsideClick.allowDeactivation&&!C(H.outsideClick.target,H.internalOptions.tabbableOptions))),K=H.internalOptions.preventScroll,j=K===void 0?!1:K;M&&V.focus({preventScroll:j}),H.originalOptions.onPostDeactivate&&H.originalOptions.onPostDeactivate.call(null),H.outsideClick=null};this.originalOptions.checkCanReturnFocus?this.originalOptions.checkCanReturnFocus.call(null,this.getReturnFocusNode()).then(W,W):W()}},{key:"setupFocusTrap",value:function(){if(this.focusTrap)this.props.active&&!this.focusTrap.active&&(this.focusTrap.activate(),this.props.paused&&this.focusTrap.pause());else{var H=this.focusTrapElements.some(Boolean);H&&(this.focusTrap=this.props._createFocusTrap(this.focusTrapElements,this.internalOptions),this.props.active&&this.focusTrap.activate(),this.props.paused&&this.focusTrap.pause())}}},{key:"componentDidMount",value:function(){this.props.active&&this.setupFocusTrap()}},{key:"componentDidUpdate",value:function(H){if(this.focusTrap){H.containerElements!==this.props.containerElements&&this.focusTrap.updateContainerElements(this.props.containerElements);var W=!H.active&&this.props.active,z=H.active&&!this.props.active,V=!H.paused&&this.props.paused,M=H.paused&&!this.props.paused;if(W&&(this.updatePreviousElement(),this.focusTrap.activate()),z){this.deactivateTrap();return}V&&this.focusTrap.pause(),M&&this.focusTrap.unpause()}else H.containerElements!==this.props.containerElements&&(this.focusTrapElements=this.props.containerElements),this.props.active&&(this.updatePreviousElement(),this.setupFocusTrap())}},{key:"componentWillUnmount",value:function(){this.deactivateTrap()}},{key:"render",value:function(){var H=this,W=this.props.children?b.Children.only(this.props.children):void 0;if(W){if(W.type&&W.type===b.Fragment)throw new Error("A focus-trap cannot use a Fragment as its child container. Try replacing it with a <div> element.");var z=function(K){var j=H.props.containerElements;W&&(I>=19?typeof W.props.ref=="function"?W.props.ref(K):W.props.ref&&(W.props.ref.current=K):typeof W.ref=="function"?W.ref(K):W.ref&&(W.ref.current=K)),H.focusTrapElements=j||[K]},V=b.cloneElement(W,{ref:z});return V}return null}}])})(b.Component);return O.defaultProps={active:!0,paused:!1,focusTrapOptions:{},_createFocusTrap:T},$b.exports=O,$b.exports.FocusTrap=O,$b.exports}var kwe=Rwe();const Nwe=fn(kwe);function Dwe(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var fX={exports:{}};/*!
3500	Copyright (c) 2018 Jed Watson.
3501	Licensed under the MIT License (MIT), see
3502	http://jedwatson.github.io/classnames
3503*/(function(t){(function(){var e={}.hasOwnProperty;function n(){for(var s="",o=0;o<arguments.length;o++){var a=arguments[o];a&&(s=i(s,r(a)))}return s}function r(s){if(typeof s=="string"||typeof s=="number")return s;if(typeof s!="object")return"";if(Array.isArray(s))return n.apply(null,s);if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]"))return s.toString();var o="";for(var a in s)e.call(s,a)&&s[a]&&(o=i(o,a));return o}function i(s,o){return o?s?s+" "+o:s+o:s}
3503t.exports?(n.default=n,t.exports=n):window.classNames=n})()})(fX);var Bwe=fX.exports;const Ki=Dwe(Bwe),oo=({type:t,children:e,secondary:n,base:r,accentStyle:i,outline:s,inverse:o,size:a,unstyled:l,onClick:c,className:u,...h})=>{const d=Ki("usa-button",{"usa-button--secondary":n,"usa-button--base":r,"usa-button--accent-cool":i==="cool","usa-button--accent-warm":i==="warm","usa-button--outline":s,"usa-button--inverse":o,"usa-button--big":a==="big","usa-button--unstyled":l},u);return Q.jsx("button",{type:t,className:d,onClick:c,"data-testid":"button",...h,children:e})},Lwe=({children:t,background:e,className:n,...r})=>{const i={};e&&(i.background=e);const s=Ki("usa-tag",n);return Q.jsx("span",{"data-testid":"tag",className:s,style:{...i},...r,children:t})},Fwe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M20.5 6c-2.61.7-5.67 1-8.5 1s-5.89-.3-8.5-1L3 8c1.86.5 4 .83 6 1v13h2v-6h2v6h2V9c2-.17 4.14-.5 6-1l-.5-2zM12 6c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2z"})),Uwe=A.memo(Fwe),zwe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("circle",{cx:17,cy:4.54,r:2}),A.createElement("path",{d:"M14 17h-2c0 1.65-1.35 3-3 3s-3-1.35-3-3 1.35-3 3-3v-2c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5zm3-3.5h-1.86l1.67-3.67C17.42 8.5 16.44 7 14.96 7h-5.2c-.81 0-1.54.47-1.87 1.2L7.22 10l1.92.53L9.79 9H12l-1.83 4.1c-.6 1.33.39 2.9 1.85 2.9H17v5h2v-5.5c0-1.1-.9-2-2-2z"})),jwe=A.memo(zwe),Vwe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M4 10h3v7H4zm6.5 0h3v7h-3zM2 19h20v3H2zm15-9h3v7h-3zm-5-9L2 6v2h20V6z"})),Wwe=A.memo(Vwe),$we=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7 3c1.93 0 3.5 1.57 3.5 3.5S13.93 13 12 13s-3.5-1.57-3.5-3.5S10.07 6 12 6zm7 13H5v-.23c0-.62.28-1.2.76-1.58C7.47 15.82 9.64 15 12 15s4.53.82 6.24 2.19c.48.38.76.97.76 1.58V19z"})),Hwe=A.memo($we),qwe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 4c1.93 0 3.5 1.57 3.5 3.5S13.93 13 12 13s-3.5-1.57-3.5-3.5S10.07 6 12 6zm0 14c-2.03 0-4.43-.82-6.14-2.88a9.947 9.947 0 0 1 12.28 0C16.43 19.18 14.03 20 12 20z"})),Qwe=A.memo(qwe),Xwe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"})),Ywe=A.memo(Xwe),Kwe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm5 11h-4v4h-2v-4H7v-2h4V7h2v4h4v2z"})),Gwe=A.memo(Kwe),Zwe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M13 7h-2v4H7v2h4v4h2v-4h4v-2h-4V7zm-1-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"})),Jwe=A.memo(Zwe),exe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"m22 5.72-4.6-3.86-1.29 1.53 4.6 3.86L22 5.72zM7.88 3.39 6.6 1.86 2 5.71l1.29 1.53 4.59-3.85zM12.5 8H11v6l4.75 2.85.75-1.23-4-2.37V8zM12 4c-4.97 0-9 4.03-9 9s4.02 9 9 9a9 9 0 0 0 0-18zm0 16c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z"})),txe=A.memo(exe),nxe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10h5v-2h-5c-4.34 0-8-3.66-8-8s3.66-8 8-8 8 3.66 8 8v1.43c0 .79-.71 1.57-1.5 1.57s-1.5-.78-1.5-1.57V12c0-2.76-2.24-5-5-5s-5 2.24-5 5 2.24 5 5 5c1.38 0 2.64-.56 3.54-1.47.65.89 1.77 1.47 2.96 1.47 1.97 0 3.5-1.6 3.5-3.57V12c0-5.52-4.48-10-10-10zm0 13c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3z"})),rxe=A.memo(nxe),ixe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-7 9h-2V5h2v6zm0 4h-2v-2h2v2z"})),sxe=A.memo(ixe),oxe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"})),axe=A.memo(oxe),lxe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"m20 12-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"})),cxe=A.memo(lxe),uxe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"m7 10 5 5 5-5z"})),fxe=A.memo(uxe),hxe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"m7 14 5-5 5 5z"})),dxe=A.memo(hxe),pxe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"m12 4-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"})),gxe=A.memo(pxe),mxe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"m4 12 1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z"})),vxe=A.memo(mxe),yxe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"m14 12-2 2-2-2 2-2 2 2zm-2-6 2.12 2.12 2.5-2.5L12 1 7.38 5.62l2.5 2.5L12 6zm-6 6 2.12-2.12-2.5-2.5L1 12l4.62 4.62 2.5-2.5L6 12zm12 0-2.12 2.12 2.5 2.5L23 12l-4.62-4.62-2.5 2.5L18 12zm-6 6-2.12-2.12-2.5 2.5L12 23l4.62-4.62-2.5-2.5L12 18z"})),bxe=A.memo(yxe),_xe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 17H7v-7h2v7zm4 0h-2V7h2v10zm4 0h-2v-4h2v4z"})),wxe=A.memo(_xe),xxe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M16.5 6v11.5c0 2.21-1.79 4-4 4s-4-1.79-4-4V5a2.5 2.5 0 0 1 5 0v10.5c0 .55-.45 1-1 1s-1-.45-1-1V6H10v9.5a2.5 2.5 0 0 0 5 0V5c0-2.21-1.79-4-4-4S7 2.79 7 5v12.5c0 3.04 2.46 5.5 5.5 5.5s5.5-2.46 5.5-5.5V6h-1.5z"})),Axe=A.memo(xxe),Exe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M11.8 10.9c-2.27-.59-3-1.2-3-2.15 0-1.09 1.01-1.85 2.7-1.85 1.78 0 2.44.85 2.5 2.1h2.21c-.07-1.72-1.12-3.3-3.21-3.81V3h-3v2.16c-1.94.42-3.5 1.68-3.5 3.61 0 2.31 1.91 3.46 4.7 4.13 2.5.6 3 1.48 3 2.41 0 .69-.49 1.79-2.7 1.79-2.06 0-2.87-.92-2.98-2.1h-2.2c.12 2.19 1.76 3.42 3.68 3.83V21h3v-2.15c1.95-.37 3.5-1.5 3.5-3.55 0-2.84-2.43-3.81-4.7-4.4z"})),Sxe=A.memo(Exe),Txe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M12 6v3l4-4-4-4v3c-4.42 0-8 3.58-8 8 0 1.57.46 3.03 1.24 4.26L6.7 14.8A5.87 5.87 0 0 1 6 12c0-3.31 2.69-6 6-6zm6.76 1.74L17.3 9.2c.44.84.7 1.79.7 2.8 0 3.31-2.69 6-6 6v-3l-4 4 4 4v-3c4.42 0 8-3.58 8-8 0-1.57-.46-3.03-1.24-4.26z"}
3503)),Cxe=A.memo(Txe),Pxe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M20 8v12c0 1.1-.9 2-2 2H6c-1.1 0-2-.9-2-2V8c0-1.86 1.28-3.41 3-3.86V2h3v2h4V2h3v2.14c1.72.45 3 2 3 3.86zM6 12v2h10v2h2v-4H6z"})),Ixe=A.memo(Pxe),Oxe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("circle",{cx:7,cy:7,r:2}),A.createElement("path",{d:"M20 13V4.83C20 3.27 18.73 2 17.17 2c-.75 0-1.47.3-2 .83l-1.25 1.25c-.16-.05-.33-.08-.51-.08-.4 0-.77.12-1.08.32l2.76 2.76c.2-.31.32-.68.32-1.08 0-.18-.03-.34-.07-.51l1.25-1.25a.828.828 0 0 1 1.41.59V13h-6.85c-.3-.21-.57-.45-.82-.72l-1.4-1.55c-.19-.21-.43-.38-.69-.5A2.251 2.251 0 0 0 5 12.25V13H2v6c0 1.1.9 2 2 2 0 .55.45 1 1 1h14c.55 0 1-.45 1-1 1.1 0 2-.9 2-2v-6h-2z"})),Mxe=A.memo(Oxe),Rxe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 24 24",width:"1em",...t},A.createElement("path",{d:"M17 10.13a33.86 33.86 0 0 1-10 0 1.92 1.92 0 0 1-1.51-1.46 10.42 10.42 0 0 1 0-4.84 1.92 1.92 0 0 1 1.57-1.46 33.86 33.86 0 0 1 10 0 1.9 1.9 0 0 1 1.56 1.46 10.16 10.16 0 0 1 0 4.84A1.9 1.9 0 0 1 17 10.13Zm4 12.12H7a5.25 5.25 0 0 1 0-10.5h10a3.25 3.25 0 0 1 0 6.5H7a1.25 1.25 0 0 1 0-2.5h10a.75.75 0 0 0 0-1.5H7a2.75 2.75 0 0 0 0 5.5h14a1.25 1.25 0 0 1 0 2.5Z"})),kxe=A.memo(Rxe),Nxe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M17 3H7c-1.1 0-1.99.9-1.99 2L5 21l7-3 7 3V5c0-1.1-.9-2-2-2z"})),Dxe=A.memo(Nxe),Bxe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M20 8h-2.81a5.985 5.985 0 0 0-1.82-1.96L17 4.41 15.59 3l-2.17 2.17C12.96 5.06 12.49 5 12 5c-.49 0-.96.06-1.41.17L8.41 3 7 4.41l1.62 1.63C7.88 6.55 7.26 7.22 6.81 8H4v2h2.09c-.05.33-.09.66-.09 1v1H4v2h2v1c0 .34.04.67.09 1H4v2h2.81c1.04 1.79 2.97 3 5.19 3s4.15-1.21 5.19-3H20v-2h-2.09c.05-.33.09-.66.09-1v-1h2v-2h-2v-1c0-.34-.04-.67-.09-1H20V8zm-6 8h-4v-2h4v2zm0-4h-4v-2h4v2z"})),Lxe=A.memo(Bxe),Fxe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"m22.7 19-9.1-9.1c.9-2.3.4-5-1.5-6.9-2-2-5-2.4-7.4-1.3L9 6 6 9 1.6 4.7C.4 7.1.9 10.1 2.9 12.1c1.9 1.9 4.6 2.4 6.9 1.5l9.1 9.1c.4.4 1 .4 1.4 0l2.3-2.3c.5-.4.5-1.1.1-1.4z"})),Uxe=A.memo(Fxe),zxe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M20 3h-1V1h-2v2H7V1H5v2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 18H4V8h16v13z"})),jxe=A.memo(zxe),Vxe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M18 11v2h4v-2h-4zm-2 6.61c.96.71 2.21 1.65 3.2 2.39.4-.53.8-1.07 1.2-1.6-.99-.74-2.24-1.68-3.2-2.4-.4.54-.8 1.08-1.2 1.61zM20.4 5.6c-.4-.53-.8-1.07-1.2-1.6-.99.74-2.24 1.68-3.2 2.4.4.53.8 1.07 1.2 1.6.96-.72 2.21-1.65 3.2-2.4zM4 9c-1.1 0-2 .9-2 2v2c0 1.1.9 2 2 2h1v4h2v-4h1l5 3V6L8 9H4zm11.5 3c0-1.33-.58-2.53-1.5-3.35v6.69c.92-.81 1.5-2.01 1.5-3.34z"})),Wxe=A.memo(Vxe),$xe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{fillRule:"evenodd",d:"m12 5 8 13h2v2H2v-2h2l8-13zm.05 8-2.69 5h5.38l-2.69-5zM5.5 3l-.018.024A2.5 2.5 0 0 0 7.498 7 2.5 2.5 0 1 1 5.5 3z"})),Hxe=A.memo($xe),qxe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"})),Qxe=A.memo(qxe),Xxe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM6 9h12v2H6V9zm8 5H6v-2h8v2zm4-6H6V6h12v2z"})),Yxe=A.memo(Xxe),Kxe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"})),Gxe=A.memo(Kxe),Zxe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"})),Jxe=A.memo(Zxe),eAe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"})),tAe=A.memo(eAe),nAe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M16.59 7.58 10 14.17l-3.59-3.58L5 12l5 5 8-8zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"})),rAe=A.memo(nAe),iAe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M21.6 18.2 13 11.75v-.91a3.496 3.496 0 0 0-.18-6.75A3.51 3.51 0 0 0 8.5 7.5h2c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5c0 .84-.69 1.52-1.53 1.5-.54-.01-.97.45-.97.99v1.76L2.4 18.2c-.77.58-.36 1.8.6 1.8h18c.96 0 1.37-1.22.6-1.8zM6 18l6-4.5 6 4.5H6z"})),sAe=A.memo(iAe),oAe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"m16.99 5 .63 1.37 1.37.63-1.37.63L16.99 9l-.63-1.37L14.99 7l1.37-.63.63-1.37M11 6.13V4h2c.57 0 1.1.17 1.55.45l1.43-1.43A4.899 4.899 0 0 0 13 2H7.5v2H9v2.14A5.007 5.007 0 0 0 5.26 9.5h3.98L15 11.65v-.62a5 5 0 0 0-4-4.9zM1 22h4V11H1v11zm19-5h-7l-2.09-.73.33-.94L13 16h2.82c.65 0 1.18-.53 1.18-1.18 0-.49-.31-.93-.77-1.11L8.97 11H7v9.02L14 22l8-3c-.01-1.1-.89-2-2-2zm0-3c1.1 0 2-.9 2-2s-2-4-2-4-2 2.9-2 4 .9 2 2 2z"})),aAe=A.memo(oAe),lAe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 24 24",width:"1em",...t},A.createElement("path",{d:"M15.7 2.37 15 2.3V4a3 3 0 0 1-6 0V2.3l-.7.07a7 7 0 0 0-6.3 7V20h3V10h1.5v12h11V10H19v10h3V9.33a7 7 0 0 0-6.3-6.96Z"})),cAe=A.memo(lAe),uAe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})),fAe=A.memo(uAe),hAe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M19 4H5a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-8 7H9.5v-.5h-2v3h2V13H11v1c0 .55-.45 1-1 1H7c-.55 0-1-.45-1-1v-4c0-.55.45-1 1-1h3c.55 0 1 .45 1 1v1zm7 0h-1.5v-.5h-2v3h2V13H18v1c0 .55-.45 1-1 1h-3c-.55 0-1-.45-1-1v-4c0-.55.45-1 1-1h3c.55 0 1 .45 1 1v1z"})),dAe=A.memo(hAe),pAe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M19.35 10.04A7.49 7.49 0 0 0 12 4C9.11 4 6.6 5.64 5.35 8.04A5.994 5.994 0 0 0 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96z"})),gAe=A.memo(pAe),mAe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M9.4 16.6 4.8 12l4.6-4.6L8 6l-6 6 6 6 1.4-1.4zm5.2 0 4.6-4.6-4.6-4.6L16 6l6 6-6 6-1.4-1.4z"})),vAe=A.memo(mAe),yAe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M21.99 4c0-1.1-.89-2-1.99-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h14l4 4-.01-18zM18 14H6v-2h12v2zm0-3H6V9h12v2zm0-3H6V6h12v2z"})),bAe=A.memo(yAe),_Ae=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M11 14H9a9 9 0 0 1 9-9v2c-3.87 0-7 3.13-7 7zm7-3V9c-2.76 0-5 2.24-5 5h2c0-1.66 1.34-3 3-3zM7 4c0-1.11-.89-2-2-2s-2 .89-2 2 .89 2 2 2 2-.89 2-2zm4.45.5h-2A2.99 2.99 0 0 1 6.5 7h-3C2.67 7 2 7.67 2 8.5V11h6V8.74a4.97 4.97 0 0 0 3.45-4.24zM19 17c1.11 0 2-.89 2-2s-.89-2-2-2-2 .89-2 2 .89 2 2 2zm
35031.5 1h-3a2.99 2.99 0 0 1-2.95-2.5h-2A4.97 4.97 0 0 0 16 19.74V22h6v-2.5c0-.83-.67-1.5-1.5-1.5z"})),wAe=A.memo(_Ae),xAe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"m13.783 15.172 2.121-2.121 5.996 5.996-2.121 2.121zM17.5 10c1.93 0 3.5-1.57 3.5-3.5 0-.58-.16-1.12-.41-1.6l-2.7 2.7-1.49-1.49 2.7-2.7c-.48-.25-1.02-.41-1.6-.41C15.57 3 14 4.57 14 6.5c0 .41.08.8.21 1.16l-1.85 1.85-1.78-1.78.71-.71-1.41-1.41L12 3.49a3 3 0 0 0-4.24 0L4.22 7.03l1.41 1.41H2.81l-.71.71 3.54 3.54.71-.71V9.15l1.41 1.41.71-.71 1.78 1.78-7.41 7.41 2.12 2.12L16.34 9.79c.36.13.75.21 1.16.21z"})),AAe=A.memo(xAe),EAe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 24 24",width:"1em",...t},A.createElement("circle",{cx:10.5,cy:4.5,r:1.5}),A.createElement("path",{d:"M19.59 16h-1.27l-.64.71h-1.27L15.14 21h1.27l.64-.71h1.9l.64.71h1.27l-1.27-5zm-5.21-3.28L14 14.19l-3.8-1.26-.1-.16.52-3.13c.93 1.37 2.15 2.11 4.6 2.11v-1.5c-2.44 0-3.09-.77-3.9-2.39a2.65 2.65 0 0 0-3-1.59L3.75 7.41v3.38l-1.51-.5-.48 1.42 4.35 1.45L5 20.86l2 .28 1-7.34.38.13L10 16.3V21h2v-5.3l-.49-.7 2 .67-.37 1.27 1.91.57 1.24-4.19Zm-9.13-1.43v-2.7l1.57-.4-.49 3.46Z"})),SAe=A.memo(EAe),TAe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M14 2H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V8l-6-6zm-2 8c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2zm4 8H8v-.57c0-.81.48-1.53 1.22-1.85a6.95 6.95 0 0 1 5.56 0A2.01 2.01 0 0 1 16 17.43V18z"})),CAe=A.memo(TAe),PAe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"})),IAe=A.memo(PAe),OAe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M21.25 10.5c-.41 0-.75.34-.75.75h-1.54a6.978 6.978 0 0 0-1.52-3.65l1.09-1.09.01.01c.29.29.77.29 1.06 0s.29-.77 0-1.06L18.54 4.4a.754.754 0 0 0-1.06 0c-.29.29-.29.76-.01 1.05l-1.09 1.09a7.015 7.015 0 0 0-3.64-1.51V3.5h.01c.41 0 .75-.34.75-.75S13.16 2 12.75 2h-1.5c-.41 0-.75.34-.75.75s.33.74.74.75v1.55c-1.37.14-2.62.69-3.64 1.51L6.51 5.47l.01-.01c.29-.29.29-.77 0-1.06a.754.754 0 0 0-1.06 0L4.4 5.46c-.29.29-.29.77 0 1.06.29.29.76.29 1.05.01l1.09 1.09a6.89 6.89 0 0 0-1.5 3.63H3.5c0-.41-.34-.75-.75-.75s-.75.34-.75.75v1.5c0 .41.34.75.75.75s.75-.34.75-.75h1.54c.15 1.37.69 2.61 1.5 3.63l-1.09 1.09a.742.742 0 0 0-1.05.01c-.29.29-.29.77 0 1.06l1.06 1.06c.29.29.77.29 1.06 0 .29-.29.29-.77 0-1.06l-.01-.01 1.09-1.09c1.02.82 2.26 1.36 3.63 1.51v1.55c-.41.01-.74.34-.74.75s.34.75.75.75h1.5c.41 0 .75-.34.75-.75s-.34-.75-.75-.75h-.01v-1.54c1.37-.14 2.62-.69 3.64-1.51l1.09 1.09c-.29.29-.28.76.01 1.05.29.29.77.29 1.06 0l1.06-1.06c.29-.29.29-.77 0-1.06a.754.754 0 0 0-1.06 0l-.01.01-1.09-1.09a7.025 7.025 0 0 0 1.52-3.65h1.54c0 .41.34.75.75.75s.75-.34.75-.75v-1.5c.01-.4-.33-.74-.74-.74zM13.75 8c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zM12 13c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm-1.75-5c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zM8.5 13c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm1.75 3c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm3.5 0c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm.75-4c0-.55.45-1 1-1s1 .45 1 1-.45 1-1 1-1-.45-1-1z"})),MAe=A.memo(OAe),RAe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M20 4H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zm0 14H4v-6h16v6zm0-10H4V6h16v2z"})),kAe=A.memo(RAe),NAe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M22 9 12 2 2 9h9v13h2V9z"}),A.createElement("path",{d:"m4.14 12-1.96.37.82 4.37V22h2l.02-4H7v4h2v-6H4.9zm14.96 4H15v6h2v-4h1.98l.02 4h2v-5.26l.82-4.37-1.96-.37z"})),DAe=A.memo(NAe),BAe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"})),LAe=A.memo(BAe),FAe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M15 13V5c0-1.66-1.34-3-3-3S9 3.34 9 5v8c-1.21.91-2 2.37-2 4 0 2.76 2.24 5 5 5s5-2.24 5-5c0-1.63-.79-3.09-2-4zm-4-8c0-.55.45-1 1-1s1 .45 1 1h-1v1h1v2h-1v1h1v2h-2V5z"})),UAe=A.memo(FAe),zAe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"m21.41 10.59-7.99-8c-.78-.78-2.05-.78-2.83 0l-8.01 8c-.78.78-.78 2.05 0 2.83l8.01 8c.78.78 2.05.78 2.83 0l7.99-8c.79-.79.79-2.05 0-2.83zM13.5 14.5V12H10v3H8v-4c0-.55.45-1 1-1h4.5V7.5L17 11l-3.5 3.5z"})),jAe=A.memo(zAe),VAe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M15.5 5.5c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zM5 12c-2.8 0-5 2.2-5 5s2.2 5 5 5 5-2.2 5-5-2.2-5-5-5zm0 8.5c-1.9 0-3.5-1.6-3.5-3.5s1.6-3.5 3.5-3.5 3.5 1.6 3.5 3.5-1.6 3.5-3.5 3.5zm5.8-10 2.4-2.4.8.8c1.3 1.3 3 2.1 5.1 2.1V9c-1.5 0-2.7-.6-3.6-1.5l-1.9-1.9c-.5-.4-1-.6-1.6-.
35036s-1.1.2-1.4.6L7.8 8.4c-.4.4-.6.9-.6 1.4 0 .6.2 1.1.6 1.4L11 14v5h2v-6.2l-2.2-2.3zM19 12c-2.8 0-5 2.2-5 5s2.2 5 5 5 5-2.2 5-5-2.2-5-5-5zm0 8.5c-1.9 0-3.5-1.6-3.5-3.5s1.6-3.5 3.5-3.5 3.5 1.6 3.5 3.5-1.6 3.5-3.5 3.5z"})),WAe=A.memo(VAe),$Ae=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M4 16c0 .88.39 1.67 1 2.22V20c0 .55.45 1 1 1h1c.55 0 1-.45 1-1v-1h8v1c0 .55.45 1 1 1h1c.55 0 1-.45 1-1v-1.78c.61-.55 1-1.34 1-2.22V6c0-3.5-3.58-4-8-4s-8 .5-8 4v10zm3.5 1c-.83 0-1.5-.67-1.5-1.5S6.67 14 7.5 14s1.5.67 1.5 1.5S8.33 17 7.5 17zm9 0c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zm1.5-6H6V6h12v5z"})),HAe=A.memo($Ae),qAe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M18.92 6.01C18.72 5.42 18.16 5 17.5 5h-11c-.66 0-1.21.42-1.42 1.01L3 12v8c0 .55.45 1 1 1h1c.55 0 1-.45 1-1v-1h12v1c0 .55.45 1 1 1h1c.55 0 1-.45 1-1v-8l-2.08-5.99zM6.5 16c-.83 0-1.5-.67-1.5-1.5S5.67 13 6.5 13s1.5.67 1.5 1.5S7.33 16 6.5 16zm11 0c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zM5 11l1.5-4.5h11L19 11H5z"})),QAe=A.memo(qAe),XAe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M13.5 5.5c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zM9.8 8.9 7 23h2.1l1.8-8 2.1 2v6h2v-7.5l-2.1-2 .6-3C14.8 12 16.8 13 19 13v-2c-1.9 0-3.5-1-4.3-2.4l-1-1.6c-.4-.6-1-1-1.7-1-.3 0-.5.1-.8.1L6 8.3V13h2V9.6l1.8-.7"})),YAe=A.memo(XAe),KAe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8 0-1.85.63-3.55 1.69-4.9L16.9 18.31A7.902 7.902 0 0 1 12 20zm6.31-3.1L7.1 5.69A7.902 7.902 0 0 1 12 4c4.42 0 8 3.58 8 8 0 1.85-.63 3.55-1.69 4.9z"})),GAe=A.memo(KAe),ZAe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"m13 10.17-2.5-2.5V2.25a1.25 1.25 0 0 1 2.5 0v7.92zm7 2.58v-7.5a1.25 1.25 0 0 0-2.5 0V11h-1V3.25a1.25 1.25 0 0 0-2.5 0v7.92l6 6v-4.42zM9.5 4.25C9.5 3.56 8.94 3 8.25 3c-.67 0-1.2.53-1.24 1.18L9.5 6.67V4.25zm3.5 5.92-2.5-2.5V2.25a1.25 1.25 0 0 1 2.5 0v7.92zm7 2.58v-7.5a1.25 1.25 0 0 0-2.5 0V11h-1V3.25a1.25 1.25 0 0 0-2.5 0v7.92l6 6v-4.42zM9.5 4.25C9.5 3.56 8.94 3 8.25 3c-.67 0-1.2.53-1.24 1.18L9.5 6.67V4.25zm11.69 16.94L2.81 2.81 1.39 4.22l5.63 5.63L7 9.83v4.3c-1.11-.64-2.58-1.47-2.6-1.48-.17-.09-.34-.14-.54-.14-.26 0-.5.09-.7.26-.04.01-1.16 1.11-1.16 1.11l6.8 7.18c.57.6 1.35.94 2.18.94H17c.62 0 1.18-.19 1.65-.52l-.02-.02 1.15 1.15 1.41-1.42z"})),JAe=A.memo(ZAe),e3e=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M20 9H4v2h16V9zM4 15h16v-2H4v2z"})),t3e=A.memo(e3e),n3e=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 24 24",width:"1em",...t},A.createElement("path",{fill:"none",d:"M0 0h24v24H0z"}),A.createElement("path",{d:"M6.05 8.05a7.001 7.001 0 0 0-.02 9.88c1.47-3.4 4.09-6.24 7.36-7.93A15.952 15.952 0 0 0 8 19.32c2.6 1.23 5.8.78 7.95-1.37C19.43 14.47 20 4 20 4S9.53 4.57 6.05 8.05z"})),r3e=A.memo(n3e),i3e=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04a.996.996 0 0 0 0-1.41l-2.34-2.34a.996.996 0 0 0-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"})),s3e=A.memo(i3e),o3e=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M21 14c0-.55-.45-1-1-1h-2v2h2c.55 0 1-.45 1-1zm-1 3h-2v2h2c.55 0 1-.45 1-1s-.45-1-1-1zm-8-3h-2v4h2c0 1.1.9 2 2 2h3v-8h-3c-1.1 0-2 .9-2 2z"}),A.createElement("path",{d:"M5 13c0-1.1.9-2 2-2h1.5c1.93 0 3.5-1.57 3.5-3.5S10.43 4 8.5 4H5c-.55 0-1 .45-1 1s.45 1 1 1h3.5c.83 0 1.5.67 1.5 1.5S9.33 9 8.5 9H7c-2.21 0-4 1.79-4 4s1.79 4 4 4h2v-2H7c-1.1 0-2-.9-2-2z"})),a3e=A.memo(o3e),l3e=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M19 5h-2V3H7v2H5c-1.1 0-2 .9-2 2v1c0 2.55 1.92 4.63 4.39 4.94A5.01 5.01 0 0 0 11 15.9V19H7v2h10v-2h-4v-3.1a5.01 5.01 0 0 0 3.61-2.96C19.08 12.63 21 10.55 21 8V7c0-1.1-.9-2-2-2zM5 8V7h2v3.82C5.84 10.4 5 9.3 5 8zm14 0c0 1.3-.84 2.4-2 2.82V7h2v1z"})),c3e=A.memo(l3e),u3e=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"})),f3e=A.memo(u3e),h3e=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"})),d3e=A.memo(h3e),p3e=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M17 12h-5v5h5v-5zM16 1v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-1V1h-2zm3 18H5V8h14v11z"})),g3e=A.memo(p3e),m3e=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"m12 8-6 6 1.41 1.41L12 10.83l4.59 4.58
3503L18 14z"})),v3e=A.memo(m3e),y3e=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"})),b3e=A.memo(y3e),_3e=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 24 24",width:"1em",...t},A.createElement("path",{fill:"none",d:"M0 0h24v24H0z"}),A.createElement("path",{d:"M22 12c0-5.52-4.48-10-10-10S2 6.48 2 12c0 4.84 3.44 8.87 8 9.8V15H8v-3h2V9.5C10 7.57 11.57 6 13.5 6H16v3h-2c-.55 0-1 .45-1 1v2h3v3h-3v6.95c5.05-.5 9-4.76 9-9.95z"})),w3e=A.memo(_3e),x3e=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"m4 18 8.5-6L4 6v12zm9-12v12l8.5-6L13 6z"})),A3e=A.memo(x3e),E3e=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M11 18V6l-8.5 6 8.5 6zm.5-6 8.5 6V6l-8.5 6z"})),S3e=A.memo(E3e),T3e=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"m12 21.35-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z"})),C3e=A.memo(T3e),P3e=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M16.5 3c-1.74 0-3.41.81-4.5 2.09C10.91 3.81 9.24 3 7.5 3 4.42 3 2 5.42 2 8.5c0 3.78 3.4 6.86 8.55 11.54L12 21.35l1.45-1.32C18.6 15.36 22 12.28 22 8.5 22 5.42 19.58 3 16.5 3zm-4.4 15.55-.1.1-.1-.1C7.14 14.24 4 11.39 4 8.5 4 6.5 5.5 5 7.5 5c1.54 0 3.04.99 3.57 2.36h1.87C13.46 5.99 14.96 5 16.5 5c2 0 3.5 1.5 3.5 3.5 0 2.89-3.14 5.74-7.9 10.05z"})),I3e=A.memo(P3e),O3e=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M19 9h-1V4H8v16h14v-8c0-1.66-1.34-3-3-3zm-9-3h6v3h-6V6zm4 11h-4v-5h4v5zm2 0c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm0-3c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm3 3c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm0-3c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zM4.5 8A2.5 2.5 0 0 0 2 10.5v8a2.5 2.5 0 0 0 5 0v-8A2.5 2.5 0 0 0 4.5 8z"})),M3e=A.memo(O3e),R3e=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z"})),k3e=A.memo(R3e),N3e=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M15 2H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V7l-5-5zM6 20V4h8v4h4v12H6zm10-10v5c0 2.21-1.79 4-4 4s-4-1.79-4-4V8.5a2.5 2.5 0 0 1 2.76-2.49c1.3.13 2.24 1.32 2.24 2.63V15h-2V8.5c0-.28-.22-.5-.5-.5s-.5.22-.5.5V15c0 1.1.9 2 2 2s2-.9 2-2v-5h2z"})),D3e=A.memo(N3e),B3e=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M9 16h6v-6h4l-7-7-7 7h4zm-4 2h14v2H5z"})),L3e=A.memo(B3e),F3e=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M4.25 5.61C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39A.998.998 0 0 0 18.95 4H5.04c-.83 0-1.3.95-.79 1.61z"})),U3e=A.memo(F3e),z3e=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z"})),j3e=A.memo(z3e),V3e=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M17.81 4.47c-.08 0-.16-.02-.23-.06C15.66 3.42 14 3 12.01 3c-1.98 0-3.86.47-5.57 1.41-.24.13-.54.04-.68-.2a.506.506 0 0 1 .2-.68C7.82 2.52 9.86 2 12.01 2c2.13 0 3.99.47 6.03 1.52.25.13.34.43.21.67a.49.49 0 0 1-.44.28zM3.5 9.72a.499.499 0 0 1-.41-.79c.99-1.4 2.25-2.5 3.75-3.27C9.98 4.04 14 4.03 17.15 5.65c1.5.77 2.76 1.86 3.75 3.25a.5.5 0 0 1-.12.7c-.23.16-.54.11-.7-.12a9.388 9.388 0 0 0-3.39-2.94c-2.87-1.47-6.54-1.47-9.4.01-1.36.7-2.5 1.7-3.4 2.96-.08.14-.23.21-.39.21zm6.25 12.07a.47.47 0 0 1-.35-.15c-.87-.87-1.34-1.43-2.01-2.64-.69-1.23-1.05-2.73-1.05-4.34 0-2.97 2.54-5.39 5.66-5.39s5.66 2.42 5.66 5.39c0 .28-.22.5-.5.5s-.5-.22-.5-.5c0-2.42-2.09-4.39-4.66-4.39-2.57 0-4.66 1.97-4.66 4.39 0 1.44.32 2.77.93 3.85.64 1.15 1.08 1.64 1.85 2.42.19.2.19.51 0 .71-.11.1-.24.15-.37.15zm7.17-1.85c-1.19 0-2.24-.3-3.1-.89-1.49-1.01-2.38-2.65-2.38-4.39 0-.28.22-.5.5-.5s.5.22.5.5c0 1.41.72 2.74 1.94 3.56.71.48 1.54.71 2.54.71.24 0 .64-.03 1.04-.1.27-.05.53.13.58.41.05.27-.13.53-.41.58-.57.11-1.07.12-1.21.12zM14.91 22c-.04 0-.09-.01-.13-.02-1.59-.44-2.63-1.03-3.72-2.1a7.297 7.297 0 0 1-2.17-5.22c0-1.62 1.38-2.94 3.08-2.94 1.7 0 3.08 1.32 3.08 2.94 0 1.07.93 1.94 2.08 1.94s2.08-.87 2.08-1.94c0-3.77-3.25-6.83-7.25-6.83-2.84 0-
35035.44 1.58-6.61 4.03-.39.81-.59 1.76-.59 2.8 0 .78.07 2.01.67 3.61.1.26-.03.55-.29.64-.26.1-.55-.04-.64-.29a11.14 11.14 0 0 1-.73-3.96c0-1.2.23-2.29.68-3.24 1.33-2.79 4.28-4.6 7.51-4.6 4.55 0 8.25 3.51 8.25 7.83 0 1.62-1.38 2.94-3.08 2.94s-3.08-1.32-3.08-2.94c0-1.07-.93-1.94-2.08-1.94s-2.08.87-2.08 1.94c0 1.71.66 3.31 1.87 4.51.95.94 1.86 1.46 3.27 1.85.27.07.42.35.35.61-.05.23-.26.38-.47.38z"})),W3e=A.memo(V3e),$3e=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M18.41 16.59 13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"})),H3e=A.memo($3e),q3e=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M14.4 6 14 4H5v17h2v-7h5.6l.4 2h7V6z"})),Q3e=A.memo(q3e),X3e=t=>A.createElement("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...t},A.createElement("path",{d:"M6.459 17a4.444 4.444 0 0 1-4.116-2.768 4.541 4.541 0 0 1 .954-4.909 4.405 4.405 0 0 1 4.845-.982 4.5 4.5 0 0 1 2.747 4.159 4.514 4.514 0 0 1-1.292 3.181A4.403 4.403 0 0 1 6.459 17Zm11.111 0a4.444 4.444 0 0 1-4.116-2.768 4.541 4.541 0 0 1 .954-4.909 4.405 4.405 0 0 1 4.845-.982A4.5 4.5 0 0 1 22 12.5a4.514 4.514 0 0 1-1.292 3.181A4.403 4.403 0 0 1 17.57 17Z"})),Y3e=A.memo(X3e),K3e=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M21 16v-2l-8-5V3.5c0-.83-.67-1.5-1.5-1.5S10 2.67 10 3.5V9l-8 5v2l8-2.5V19l-2 1.5V22l3.5-1 3.5 1v-1.5L13 19v-5.5l8 2.5z"})),G3e=A.memo(K3e),Z3e=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 24 24",width:"1em",...t},A.createElement("path",{d:"M17 18.16a6 6 0 0 0-2.95.8 4.08 4.08 0 0 1-2.05.6 3.81 3.81 0 0 1-2-.56 5.84 5.84 0 0 0-5.9 0 4.05 4.05 0 0 1-2 .6v2a6 6 0 0 0 3-.8 4.05 4.05 0 0 1 1.9-.69 3.87 3.87 0 0 1 2.05.6 5.84 5.84 0 0 0 5.9 0 4.08 4.08 0 0 1 2.05-.6 3.81 3.81 0 0 1 2.05.6 5.9 5.9 0 0 0 2.95.8v-2a3.81 3.81 0 0 1-2-.51 6 6 0 0 0-3-.84Zm3-3.65a6.8 6.8 0 0 0-2-.71V10h3l-9-7-9 7h3v3.8a6.8 6.8 0 0 0-1.95.71 4.15 4.15 0 0 1-2 .6v1.95a6.07 6.07 0 0 0 3-.8 3.8 3.8 0 0 1 4.1 0 5.87 5.87 0 0 0 2.95.8 6 6 0 0 0 2.95-.8 3.8 3.8 0 0 1 4.1 0 5.9 5.9 0 0 0 2.95.8v-1.95a3.81 3.81 0 0 1-2.1-.6Zm-9.95 0V11h4v3.54a4.19 4.19 0 0 1-2 .57 3.8 3.8 0 0 1-2.05-.57Z"})),J3e=A.memo(Z3e),eEe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8l-2-2z"})),tEe=A.memo(eEe),nEe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M20 6h-8l-2-2H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm0 12H4V8h16v10z"})),rEe=A.memo(nEe),iEe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M6 17h3l2-4V7H5v6h3zm8 0h3l2-4V7h-6v6h3z"})),sEe=A.memo(iEe),oEe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M9 4v3h5v12h3V7h5V4H9zm-6 8h3v7h3v-7h3V9H3v3z"})),aEe=A.memo(oEe),lEe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M21 6h-2v9H6v2c0 .55.45 1 1 1h11l4 4V7c0-.55-.45-1-1-1zm-4 6V3c0-.55-.45-1-1-1H3c-.55 0-1 .45-1 1v14l4-4h10c.55 0 1-.45 1-1z"})),cEe=A.memo(lEe),uEe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 24 24",width:"1em",...t},A.createElement("path",{d:"M12 2a10 10 0 0 0-3.16 19.49c.5.09.68-.22.68-.48v-1.7C6.73 19.91 6.14 18 6.14 18A2.69 2.69 0 0 0 5 16.5c-.91-.62.07-.61.07-.61a2.13 2.13 0 0 1 1.53 1 2.14 2.14 0 0 0 2.91.83 2.16 2.16 0 0 1 .63-1.34c-2.14-.21-4.52-1.07-4.52-4.9a3.89 3.89 0 0 1 1-2.69 3.57 3.57 0 0 1 .1-2.64s.84-.27 2.75 1a9.63 9.63 0 0 1 5 0c1.91-1.29 2.75-1 2.75-1a3.57 3.57 0 0 1 .1 2.64 3.89 3.89 0 0 1 1 2.69c0 3.84-2.34 4.68-4.57 4.93a2.39 2.39 0 0 1 .68 1.85v2.75c0 .33.18.58.69.48A10 10 0 0 0 12 2Z",fillRule:"evenodd"})),fEe=A.memo(uEe),hEe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{fillRule:"evenodd",d:"M3 3v8h8V3H3zm6 6H5V5h4v4zm-6 4v8h8v-8H3zm6 6H5v-4h4v4zm4-16v8h8V3h-8zm6 6h-4V5h4v4zm-6 4v8h8v-8h-8zm6 6h-4v-4h4v4z"})),dEe=A.memo(hEe),pEe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M22 9V7h-2v2h-2v2h2v2h2v-2h2V9zM8 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 1c-2.67 0-8 1.34-8 4v3h16v-3c0-2.66-5.33-4-8-4zm4.51-8.95C13.43 5.
350311 14 6.49 14 8s-.57 2.89-1.49 3.95C14.47 11.7 16 10.04 16 8s-1.53-3.7-3.49-3.95zm4.02 9.78C17.42 14.66 18 15.7 18 17v3h2v-3c0-1.45-1.59-2.51-3.47-3.17z"})),gEe=A.memo(pEe),mEe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M12 12.75c1.63 0 3.07.39 4.24.9 1.08.48 1.76 1.56 1.76 2.73V18H6v-1.61c0-1.18.68-2.26 1.76-2.73 1.17-.52 2.61-.91 4.24-.91zM4 13c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm1.13 1.1c-.37-.06-.74-.1-1.13-.1-.99 0-1.93.21-2.78.58A2.01 2.01 0 0 0 0 16.43V18h4.5v-1.61c0-.83.23-1.61.63-2.29zM20 13c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm4 3.43c0-.81-.48-1.53-1.22-1.85A6.95 6.95 0 0 0 20 14c-.39 0-.76.04-1.13.1.4.68.63 1.46.63 2.29V18H24v-1.57zM12 6c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3z"})),vEe=A.memo(mEe),yEe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M17 20c-.29 0-.56-.06-.76-.15-.71-.37-1.21-.88-1.71-2.38-.51-1.56-1.47-2.29-2.39-3-.79-.61-1.61-1.24-2.32-2.53C9.29 10.98 9 9.93 9 9c0-2.8 2.2-5 5-5s5 2.2 5 5h2c0-3.93-3.07-7-7-7S7 5.07 7 9c0 1.26.38 2.65 1.07 3.9.91 1.65 1.98 2.48 2.85 3.15.81.62 1.39 1.07 1.71 2.05.6 1.82 1.37 2.84 2.73 3.55A3.999 3.999 0 0 0 21 18h-2c0 1.1-.9 2-2 2zM7.64 2.64 6.22 1.22C4.23 3.21 3 5.96 3 9s1.23 5.79 3.22 7.78l1.41-1.41C6.01 13.74 5 11.49 5 9s1.01-4.74 2.64-6.36zM11.5 9a2.5 2.5 0 0 0 5 0 2.5 2.5 0 0 0-5 0z"})),bEe=A.memo(yEe),_Ee=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"})),wEe=A.memo(_Ee),xEe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M11 18h2v-2h-2v2zm1-16C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm0-14c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5 0-2.21-1.79-4-4-4z"})),AEe=A.memo(xEe),EEe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M14.59 8 12 10.59 9.41 8 8 9.41 10.59 12 8 14.59 9.41 16 12 13.41 14.59 16 16 14.59 13.41 12 16 9.41 14.59 8zM12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"})),SEe=A.memo(EEe),TEe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M13 3a9 9 0 0 0-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42A8.954 8.954 0 0 0 13 21a9 9 0 0 0 0-18zm-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8H12z"})),CEe=A.memo(TEe),PEe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"})),IEe=A.memo(PEe),OEe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 24 24",width:"1em",...t},A.createElement("path",{d:"M19 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2Zm-3 14h-2v-4h-4v4H8V7h2v4h4V7h2Z"})),MEe=A.memo(OEe),REe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M7 13c1.66 0 3-1.34 3-3S8.66 7 7 7s-3 1.34-3 3 1.34 3 3 3zm12-6h-8v7H3V5H1v15h2v-3h18v3h2v-9c0-2.21-1.79-4-4-4z"})),kEe=A.memo(REe),NEe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M6 2v6h.01L6 8.01 10 12l-4 4 .01.01H6V22h12v-5.99h-.01L18 16l-4-4 4-3.99-.01-.01H18V2H6zm10 14.5V20H8v-3.5l4-4 4 4zm-4-5-4-4V4h8v3.5l-4 4z"})),DEe=A.memo(NEe),BEe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 24 24",width:"1em",...t},A.createElement("path",{d:"M19 12a7 7 0 0 0-6.34-7 27.32 27.32 0 0 1 2.21-2.09.44.44 0 0 0-.29-.78 10.62 10.62 0 0 0-9.17 7.5 4.26 4.26 0 0 0-.15.47v.06A7.18 7.18 0 0 0 5 12a7 7 0 0 0 6.35 7 27.71 27.71 0 0 1-2.21 2.1.44.44 0 0 0 .29.78 10.65 10.65 0 0 0 9.23-7.69v-.14c0-.05.05-.13.07-.2A6.76 6.76 0 0 0 19 12Zm-7 3.5a3.5 3.5 0 1 1 3.5-3.5 3.5 3.5 0 0 1-3.5 3.5Z"})),LEe=A.memo(BEe),FEe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 24 24",width:"1em",...t},A.createElement("path",{d:"M11 14.14C11 13.38 9.33 13 8.5 13S6 13.38 6 14.14V15h5Z"}),A.createElement("circle",{cx:8.5,cy:10.5,r:1.5}),A.createElement("path",{d:"M20 4H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2Zm-7 13H4V7h9Zm7 0h-5v-2h5Zm0-4h-5v-2h5Zm0-4h-5V7h5Z"})),UEe=A.memo(FEe),zEe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z"})),jEe=A.memo(zEe),VEe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"})),WEe=A.memo(VEe),$Ee=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 24 24",width:"1em",...t},A.createElement("path",{d:"M0 0h24v24H0V0z",fill:"none"}),A.createElement("path",{d:"M11 7h2v2h-2V7zm0 4h2v6h-2v-6zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"})),HEe=A.memo($Ee),qEe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M21 8c-1.45 0-2.26 1.44-1.93 2.51l-3.55 3.56c-.3-.09-.74-.09-1.04 0l-2.55-2.55C12.27 10.45 11.46 9 10 9c-1.45 0-2.27 1.44-1.93 2.52l-4.56 4.55C2.44 15.74 1 16.55 1 18c0 1.1.9 2 2 2 1.45 0 2.26-1.44 1.93-2.51l4.55-4.56c.3.09.74.09 1.04 0l2.55 2.55C12.73 16.55 13.54 18 15 18c1.45 0 2.27-1.44 1.93-2.52l3.56-3.55c1.07.33 2.51-.48 2.51-1.93 0-1.1-.9-2-2-2z"}),A.createElement("path",{d:"m15 9 .94-2.07L18 6l-2.06-.93L15 3l-.92 2.07L12 6l2.08.93zM3.5 11 4 9l2-.5L4 8l-.5-2L3 8l-2 .5L3 9z"})),QEe=A.memo(qEe),XEe=t=>A.createElement("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...t},A.createElement("path",{d:"M8.273 3.063c-.958.045-1.612.198-2.184.423a4.41 4.41 0 0 0-1.592 1.04 4.409 4.409 0 0 0-1.035 1.596c-.222.572-.372 1.227-.414 2.185-.042.958-.052 1.266-.047 3.71.005 2.444.016 2.75.062 3.71.046.958.198 1.612.423 2.184a4.41 4.41 0 0 0 1.04 1.592 4.4 4.4 0 0 0 1.597 1.035c.572.221 1.227.372 2.185.414.958.042 1.266.052 3.71.047 2.443-.005 2.75-.016 3.71-.061.96-.046 1.611-.199 2.183-.423a4.411 4.411 0 0 0 1.592-1.04 4.41 4.41 0 0 0 1.035-1.597c.222-.572.372-1.227.414-2.184.042-.96.052-1.268.047-3.711-.005-2.444-.016-2.75-.061-3.71-.046-.96-.198-1.612-.423-2.184a4.418 4.418 0 0 0-1.04-1.592 4.4 4.4 0 0 0-1.597-1.035c-.572-.221-1.227-.372-2.185-.414-.958-.041-1.266-.052-3.71-.047-2.444.005-2.75.015-3.71.062m.105 16.27c-.878-.038-1.354-.184-1.672-.306a2.802 2.802 0 0 1-1.036-.671 2.772 2.772 0 0 1-.675-1.034c-.124-.317-.272-.793-.313-1.67-.045-.95-.054-1.234-.06-3.637-.004-2.403.005-2.687.046-3.636.038-.877.184-1.354.306-1.671.162-.421.357-.72.672-1.036a2.778 2.778 0 0 1 1.033-.675c.317-.124.793-.272 1.67-.313.95-.045 1.234-.054 3.637-.06 2.402-.005 2.687.004 3.637.046.876.038 1.354.183 1.67.306.421.162.72.357 1.037.671.316.315.511.613.675 1.034.124.317.271.792.313 1.67.045.95.055 1.234.06 3.636.004 2.402-.004 2.688-.046 3.636-.038.878-.184 1.354-.306 1.672a2.79 2.79 
35030 0 1-.672 1.036 2.78 2.78 0 0 1-1.033.675c-.317.124-.794.271-1.67.313-.95.045-1.234.054-3.637.06-2.403.005-2.687-.005-3.636-.046M15.715 7.19a1.08 1.08 0 1 0 2.16-.004 1.08 1.08 0 0 0-2.16.004m-8.336 4.819a4.62 4.62 0 1 0 9.242-.018 4.62 4.62 0 0 0-9.242.018M9 12.006a3 3 0 1 1 6-.012 3 3 0 0 1-6 .012"})),YEe=A.memo(XEe),KEe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M20 5H4c-1.1 0-1.99.9-1.99 2L2 17c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm-9 3h2v2h-2V8zm0 3h2v2h-2v-2zM8 8h2v2H8V8zm0 3h2v2H8v-2zm-1 2H5v-2h2v2zm0-3H5V8h2v2zm9 7H8v-2h8v2zm0-4h-2v-2h2v2zm0-3h-2V8h2v2zm3 3h-2v-2h2v2zm0-3h-2V8h2v2z"})),GEe=A.memo(KEe),ZEe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M17.63 5.84C17.27 5.33 16.67 5 16 5L5 5.01C3.9 5.01 3 5.9 3 7v10c0 1.1.9 1.99 2 1.99L16 19c.67 0 1.27-.33 1.63-.84L22 12l-4.37-6.16z"})),JEe=A.memo(ZEe),eSe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zm6.93 6h-2.95a15.65 15.65 0 0 0-1.38-3.56A8.03 8.03 0 0 1 18.92 8zM12 4.04c.83 1.2 1.48 2.53 1.91 3.96h-3.82c.43-1.43 1.08-2.76 1.91-3.96zM4.26 14C4.1 13.36 4 12.69 4 12s.1-1.36.26-2h3.38c-.08.66-.14 1.32-.14 2 0 .68.06 1.34.14 2H4.26zm.82 2h2.95c.32 1.25.78 2.45 1.38 3.56A7.987 7.987 0 0 1 5.08 16zm2.95-8H5.08a7.987 7.987 0 0 1 4.33-3.56A15.65 15.65 0 0 0 8.03 8zM12 19.96c-.83-1.2-1.48-2.53-1.91-3.96h3.82c-.43 1.43-1.08 2.76-1.91 3.96zM14.34 14H9.66c-.09-.66-.16-1.32-.16-2 0-.68.07-1.35.16-2h4.68c.09.65.16 1.32.16 2 0 .68-.07 1.34-.16 2zm.25 5.56c.6-1.11 1.06-2.31 1.38-3.56h2.95a8.03 8.03 0 0 1-4.33 3.56zM16.36 14c.08-.66.14-1.32.14-2 0-.68-.06-1.34-.14-2h3.38c.16.64.26 1.31.26 2s-.1 1.36-.26 2h-3.38z"})),tSe=A.memo(eSe),nSe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M5.59 7.41 10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"})),rSe=A.memo(nSe),iSe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M19 19H5V5h7V3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"})),sSe=A.memo(iSe),oSe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M9 21c0 .5.4 1 1 1h4c.6 0 1-.5 1-1v-1H9v1zm3-19C8.1 2 5 5.1 5 9c0 2.4 1.2 4.5 3 5.7V17c0 .5.4 1 1 1h6c.6 0 1-.5 1-1v-2.3c1.8-1.3 3-3.4 3-5.7 0-3.9-3.1-7-7-7z"})),aSe=A.memo(oSe),lSe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 24 24",width:"1em",...t},A.createElement("path",{fill:"none",d:"M0 0h24v24H0z"}),A.createElement("path",{d:"M9 21c0 .55.45 1 1 1h4c.55 0 1-.45 1-1v-1H9v1zm3-19C8.14 2 5 5.14 5 9c0 2.38 1.19 4.47 3 5.74V17c0 .55.45 1 1 1h6c.55 0 1-.45 1-1v-2.26c1.81-1.27 3-3.36 3-5.74 0-3.86-3.14-7-7-7zm2 11.7V16h-4v-2.3C8.48 12.63 7 11.53 7 9c0-2.76 2.24-5 5-5s5 2.24 5 5c0 2.49-1.51 3.65-3 4.7z"})),cSe=A.memo(lSe),uSe=t=>A.createElement("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...t},A.createElement("path",{d:"M19.667 3A1.322 1.322 0 0 1 21 4.298V19.7a1.323 1.323 0 0 1-1.333 1.3H4.328A1.32 1.32 0 0 1 3 19.701V4.3A1.32 1.32 0 0 1 4.328 3h15.339Zm-4.898 6.1a2.834 2.834 0 0 0-2.55 1.403h-.036V9.316H9.6V18h2.692v-4.296c0-1.133.214-2.23 1.616-2.23 1.382 0 1.4 1.296 1.4 2.303V18H18v-4.764c0-2.338-.503-4.136-3.231-4.136Zm-6.86.216H5.213V18h2.694V9.316ZM6.561 5A1.57 1.57 0 0 0 5 6.565a1.57 1.57 0 0 0 1.562 1.564l.142-.006a1.572 1.572 0 0 0 1.42-1.558l-.006-.142A1.572 1.572 0 0 0 6.562 5Z"})),fSe=A.memo(uSe),hSe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"})),dSe=A.memo(hSe),pSe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M17 7h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1 0 1.43-.98 2.63-2.31 2.98l1.46 1.46C20.88 15.61 22 13.95 22 12c0-2.76-2.24-5-5-5zm-1 4h-2.19l2 2H16zM2 4.27l3.11 3.11A4.991 4.991 0 0 0 2 12c0 2.76 2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1 0-1.59 1.21-2.9 2.76-3.07L8.73 11H8v2h2.73L13 15.27V17h1.73l4.01 4L20 19.74 3.27 3 2 4.27z"})),gSe=A.memo(pSe),mSe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M3 13h2v-2H3v2zm0 4h2v-2H3v2zm0-8h2V7H3v2zm4 4h14v-2H7v2zm0 4h14v-2H7v2zM7 7v2h14V7H7z"})),vSe=A.memo(mSe),ySe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M20 3H4v10c0 2.21 1.79 4 4 4h6c2.21 0 4-1.79 4-4v-3h2a2 2 0 0 0 2-2V5c0-1.11-.89-2-2-2zm0 5h-2V5h2v3zM4 19h16v2H4z"})),bSe=A.memo(ySe),_Se=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"m12 12.9-2.13 2.09c-.56.56-.87 1.29-.87 2.07C9 18.68 10.35 20 12 20s3-1.32 3-2.94c0-.78-.31-1.52-.87-2.07L12 12.9z"}),A.createElement("path",{d:"m16 6-.44.55C14.38 8.02 12 7.19 12 5.3V2S4 6 4 13c0 2.92 1.56 5.47 3.89 6.86-.56-.79-.89-1.76-.89-2.8 0-1.32.52-2.56 1.47-3.5L12 10.1l3.53 3.47c.95.93 1.47 2.17 1.47 3.5 0 1.02-.31 1.96-.85 2.75 1.89-1.15 3.29-3.06 3.71-5.3.66-3.55-1.07-6.9-3.86-8.52z"})),wSe=A.memo(_Se),xSe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"m19.77 7.23.01-.01-3.72-3.72L15 4.56l2.11 2.11c-.94.36-1.61 1.26-1.61 2.33a2.5 2.5 0 0 0 2.5 2.5c.36 0 .69-.08 1-.21v7.21c0 .55-.45 1-1 1s-1-.45-1-1V14c0-1.1-.9-2-2-2h-1V5c0-1.1-.9-2-2-2H6c-1.1 0-2 .9-2 2v16
3503h10v-7.5h1.5v5a2.5 2.5 0 0 0 5 0V9c0-.69-.28-1.32-.73-1.77zM12 10H6V5h6v5zm6 0c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1z"})),ASe=A.memo(xSe),ESe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M7 18c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2zM1 2v2h2l3.6 7.59-1.35 2.45c-.16.28-.25.61-.25.96 0 1.1.9 2 2 2h12v-2H7.42c-.14 0-.25-.11-.25-.25l.03-.12.9-1.63h7.45c.75 0 1.41-.41 1.75-1.03l3.58-6.49A1.003 1.003 0 0 0 20 4H5.21l-.94-2H1zm16 16c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2z"})),SSe=A.memo(ESe),TSe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M19 3H5c-1.1 0-1.99.9-1.99 2L3 19c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-1 11h-4v4h-4v-4H6v-4h4V6h4v4h4v4z"})),CSe=A.memo(TSe),PSe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M9.17 16.83a4.008 4.008 0 0 0 5.66 0 4.008 4.008 0 0 0 0-5.66l-5.66 5.66zM18 2.01 6 2c-1.11 0-2 .89-2 2v16c0 1.11.89 2 2 2h12c1.11 0 2-.89 2-2V4c0-1.11-.89-1.99-2-1.99zM10 4c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zM7 4c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm5 16c-3.31 0-6-2.69-6-6s2.69-6 6-6 6 2.69 6 6-2.69 6-6 6z"})),ISe=A.memo(PSe),OSe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M12 11.55C9.64 9.35 6.48 8 3 8v11c3.48 0 6.64 1.35 9 3.55 2.36-2.19 5.52-3.55 9-3.55V8c-3.48 0-6.64 1.35-9 3.55zM12 8c1.66 0 3-1.34 3-3s-1.34-3-3-3-3 1.34-3 3 1.34 3 3 3z"})),MSe=A.memo(OSe),RSe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"m21.41 11.58-9-9C12.05 2.22 11.55 2 11 2H4c-1.1 0-2 .9-2 2v7c0 .55.22 1.05.59 1.42l9 9c.36.36.86.58 1.41.58.55 0 1.05-.22 1.41-.59l7-7c.37-.36.59-.86.59-1.41 0-.55-.23-1.06-.59-1.42zM5.5 7C4.67 7 4 6.33 4 5.5S4.67 4 5.5 4 7 4.67 7 5.5 6.33 7 5.5 7z"})),kSe=A.memo(RSe),NSe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M13 3H6v18h4v-6h3c3.31 0 6-2.69 6-6s-2.69-6-6-6zm.2 8H10V7h3.2c1.1 0 2 .9 2 2s-.9 2-2 2z"})),DSe=A.memo(NSe),BSe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M21 5h-2.64l1.14-3.14L17.15 1l-1.46 4H3v2l2 6-2 6v2h18v-2l-2-6 2-6V5zm-5 9h-3v3h-2v-3H8v-2h3V9h2v3h3v2z"})),LSe=A.memo(BSe),FSe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M12 1 3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4zm2.5 11.59.9 3.88-3.4-2.05-3.4 2.05.9-3.87-3-2.59 3.96-.34L12 6.02l1.54 3.64 3.96.34-3 2.59z"})),USe=A.memo(FSe),zSe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M18.92 6.01C18.72 5.42 18.16 5 17.5 5H15V3H9v2H6.5c-.66 0-1.21.42-1.42 1.01L3 12v8c0 .55.45 1 1 1h1c.55 0 1-.45 1-1v-1h12v1c0 .55.45 1 1 1h1c.55 0 1-.45 1-1v-8l-2.08-5.99zM6.5 16c-.83 0-1.5-.67-1.5-1.5S5.67 13 6.5 13s1.5.67 1.5 1.5S7.33 16 6.5 16zm11 0c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zM5 11l1.5-4.5h11L19 11H5z"})),jSe=A.memo(zSe),VSe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M15 11V5l-3-3-3 3v2H3v14h18V11h-6zm-8 8H5v-2h2v2zm0-4H5v-2h2v2zm0-4H5V9h2v2zm6 8h-2v-2h2v2zm0-4h-2v-2h2v2zm0-4h-2V9h2v2zm0-4h-2V5h2v2zm6 12h-2v-2h2v2zm0-4h-2v-2h2v2z"})),WSe=A.memo(VSe),$Se=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5a2.5 2.5 0 0 1 0-5 2.5 2.5 0 0 1 0 5z"})),HSe=A.memo($Se),qSe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2z"})),QSe=A.memo(qSe),XSe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M12 17c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm6-9h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6h1.9c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm0 12H6V10h12v10z"})),YSe=A.memo(XSe),KSe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 24 24",width:"1em",...t},A.createElement("path",{fill:"none",d:"M0 0h24v24H0z"}),A.createElement("path",{d:"M12 17c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm6-9h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zM8.9 6c0-1.71 1.39-3.1 3.1-3.1s3.1 1.39 3.1 3.1v2H8.9V6zM18 20H6V10h12v10z"})),GSe=A.memo(KSe),ZSe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M11 7 9.6 8.4l2.6 2.6H2v2h10.2l-2.6 2.6L11 17l5-5-5-5zm9 12h-8v2h8c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-8v2h8v14z"})),JSe=A.memo(ZSe),eTe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"m17 7-1.41 1.41L18.17 11H8v2h10.17l-2.58 2.58L17 17l5-5zM4 5h8V3H4c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h8v-2H4V5z"})),tTe=A.memo(eTe),nTe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46A7.93 7.93 0 0 0 20 12c0-4.42-3.58-8-8-8zm0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.8L5.24 7.74A7.93 7.93 0 0 0 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4v3z"})),rTe=A.memo(nTe),iTe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4-8 5-8-5V6l8 5 8-5v2z"})),sTe=A.memo(iTe),oTe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 14H4V8l8 5 8-5v10zm-8-7L4 6h16l-8 5z"})),aTe=A.memo(oTe),lTe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"m20.5 3-.16.03L15 5.1 9 3 3.36 4.9c-.21.07-.36.25-.36.48V20.5c0 .28.22.5.5.5l.16-.03L9 18.9l6 2.1 5.64-1.9c.21-.07.36-.25.36-.48V3.5c0-.28-.22-.5-.5-.5zM15 19l-6-2.11V5l6 2.11V19z"})),cTe=A.memo(lTe),uTe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M19.5 6c-1.31 0-2.37 1.01-2.48 2.3-1.88-.5-2.84-1.8-5.02-1.8-2.19 0-3.14 1.3-5.02 1.8
3503C6.87 7.02 5.81 6 4.5 6A2.5 2.5 0 0 0 2 8.5V9c0 6 3.6 7.81 6.52 7.98C9.53 17.62 10.72 18 12 18s2.47-.38 3.48-1.02C18.4 16.81 22 15 22 9v-.5A2.5 2.5 0 0 0 19.5 6zm-16 3v-.5c0-.55.45-1 1-1s1 .45 1 1v3c0 1.28.38 2.47 1.01 3.48C4.99 14.27 3.5 12.65 3.5 9zm17 0c0 3.65-1.49 5.27-3.01 5.98.64-1.01 1.01-2.2 1.01-3.48v-3c0-.55.45-1 1-1s1 .45 1 1V9zm-9.81 1.48c-.44.26-.96.56-1.69.76V10.2c.48-.17.84-.38 1.18-.58C10.72 9.3 11.23 9 12 9s1.27.3 1.8.62c.34.2.71.42 1.2.59v1.04c-.75-.21-1.26-.51-1.71-.78-.46-.27-.8-.47-1.29-.47s-.84.2-1.31.48z"})),fTe=A.memo(uTe),hTe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M20 6h-4V4c0-1.1-.9-2-2-2h-4c-1.1 0-2 .9-2 2v2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zM10 4h4v2h-4V4zm6 11h-3v3h-2v-3H8v-2h3v-3h2v3h3v2z"})),dTe=A.memo(hTe),pTe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"})),gTe=A.memo(pTe),mTe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M17 10.43V2H7v8.43c0 .35.18.68.49.86l4.18 2.51-.99 2.34-3.41.29 2.59 2.24L9.07 22 12 20.23 14.93 22l-.78-3.33 2.59-2.24-3.41-.29-.99-2.34 4.18-2.51c.3-.18.48-.5.48-.86zm-4 1.8-1 .6-1-.6V3h2v9.23z"})),vTe=A.memo(mTe),yTe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"})),bTe=A.memo(yTe),_Te=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"})),wTe=A.memo(_Te),xTe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm8.94 3A8.994 8.994 0 0 0 13 3.06V1h-2v2.06A8.994 8.994 0 0 0 3.06 11H1v2h2.06A8.994 8.994 0 0 0 11 20.94V23h2v-2.06A8.994 8.994 0 0 0 20.94 13H23v-2h-2.06zM12 19c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z"})),ATe=A.memo(xTe),ETe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"})),STe=A.memo(ETe),TTe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"})),CTe=A.memo(TTe),PTe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 24 24",width:"1em",...t},A.createElement("path",{d:"M11.41 7.41 10 6l-6 6 6 6 1.41-1.41L6.83 12zm8 0L18 6l-6 6 6 6 1.41-1.41L14.83 12z"})),ITe=A.memo(PTe),OTe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 24 24",width:"1em",...t},A.createElement("path",{d:"m14 6-1.41 1.41L17.17 12l-4.58 4.59L14 18l6-6zM6 6 4.59 7.41 9.17 12l-4.58 4.59L6 18l6-6z"})),MTe=A.memo(OTe),RTe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M21 3 3 10.53v.98l6.84 2.65L12.48 21h.98L21 3z"})),kTe=A.memo(RTe),NTe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M12 22c1.1 0 2-.9 2-2h-4a2 2 0 0 0 2 2zm6-6v-5c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2z"})),DTe=A.memo(NTe),BTe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M7.58 4.08 6.15 2.65C3.75 4.48 2.17 7.3 2.03 10.5h2a8.445 8.445 0 0 1 3.55-6.42zm12.39 6.42h2c-.15-3.2-1.73-6.02-4.12-7.85l-1.42 1.43a8.495 8.495 0 0 1 3.54 6.42zM18 11c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2v-5zm-6 11c.14 0 .27-.01.4-.04.65-.14 1.18-.58 1.44-1.18.1-.24.15-.5.15-.78h-4c.01 1.1.9 2 2.01 2z"})),LTe=A.memo(BTe),FTe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M12 22c1.1 0 2-.9 2-2h-4c0 1.1.9 2 2 2zm6-6v-5c0-3.07-1.63-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.64 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2zm-2 1H8v-6c0-2.48 1.51-4.5 4-4.5s4 2.02 4 4.5v6z"})),UTe=A.memo(FTe),zTe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M20 18.69 7.84 6.14 5.27 3.49 4 4.76l2.8 2.8v.01c-.52.99-.8 2.16-.8 3.42v5l-2 2v1h13.73l2 2L21 19.72l-1-1.03zM12 22c1.11 0 2-.89 2-2h-4c0 1.11.89 2 2 2zm6-7.32V11c0-3.08-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68c-.15.03-.29.08-.42.12-.1.03-.2.07-.3.11h-.01c-.01 0-.01 0-.02.01-.23.09-.46.2-.68.31 0 0-.01 0-.01.01L18 14.68z"})),jTe=A.memo(zTe),VTe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t}
3503,A.createElement("path",{d:"M17 12h2L12 2 5.05 12H7l-3.9 6h6.92v4h3.96v-4H21z"})),WTe=A.memo(VTe),$Te=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3zm-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3zm0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5zm8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5z"})),HTe=A.memo($Te),qTe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"})),QTe=A.memo(qTe),XTe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("circle",{cx:4.5,cy:9.5,r:2.5}),A.createElement("circle",{cx:9,cy:5.5,r:2.5}),A.createElement("circle",{cx:15,cy:5.5,r:2.5}),A.createElement("circle",{cx:19.5,cy:9.5,r:2.5}),A.createElement("path",{d:"M17.34 14.86c-.87-1.02-1.6-1.89-2.48-2.91-.46-.54-1.05-1.08-1.75-1.32-.11-.04-.22-.07-.33-.09-.25-.04-.52-.04-.78-.04s-.53 0-.79.05c-.11.02-.22.05-.33.09-.7.24-1.28.78-1.75 1.32-.87 1.02-1.6 1.89-2.48 2.91-1.31 1.31-2.92 2.76-2.62 4.79.29 1.02 1.02 2.03 2.33 2.32.73.15 3.06-.44 5.54-.44h.18c2.48 0 4.81.58 5.54.44 1.31-.29 2.04-1.31 2.33-2.32.31-2.04-1.3-3.49-2.61-4.8z"})),YTe=A.memo(XTe),KTe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M6.62 10.79c1.44 2.83 3.76 5.14 6.59 6.59l2.2-2.2c.27-.27.67-.36 1.02-.24 1.12.37 2.33.57 3.57.57.55 0 1 .45 1 1V20c0 .55-.45 1-1 1-9.39 0-17-7.61-17-17 0-.55.45-1 1-1h3.5c.55 0 1 .45 1 1 0 1.25.2 2.45.57 3.57.11.35.03.74-.25 1.02l-2.2 2.2z"})),GTe=A.memo(KTe),ZTe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("circle",{cx:12,cy:12,r:3.2}),A.createElement("path",{d:"M9 2 7.17 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2h-3.17L15 2H9zm3 15c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5z"})),JTe=A.memo(ZTe),e4e=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M19 8H5c-1.66 0-3 1.34-3 3v6h4v4h12v-4h4v-6c0-1.66-1.34-3-3-3zm-3 11H8v-5h8v5zm3-7c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm-1-9H6v4h12V3z"})),t4e=A.memo(e4e),n4e=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("circle",{cx:12,cy:19,r:2}),A.createElement("path",{d:"M10 3h4v12h-4z"})),r4e=A.memo(n4e),i4e=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2v1.93zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39z"})),s4e=A.memo(i4e),o4e=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{fillRule:"evenodd",d:"M16 9V4h1c.55 0 1-.45 1-1s-.45-1-1-1H7c-.55 0-1 .45-1 1s.45 1 1 1h1v5c0 1.66-1.34 3-3 3v2h5.97v7l1 1 1-1v-7H19v-2c-1.66 0-3-1.34-3-3z"})),a4e=A.memo(o4e),l4e=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"})),c4e=A.memo(l4e),u4e=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 24 24",width:"1em",...t},A.createElement("path",{d:"M17.51 7A5.62 5.62 0 0 0 7 5.51a4.5 4.5 0 0 0 .49 9h9.75A3.74 3.74 0 0 0 17.51 7ZM4.076 20.774 6.08 15.77l1.857.743-2.003 5.004zm4.998-.002 2.003-5.004 1.856.743-2.002 5.004zm4.998.008 2.002-5.004 1.857.743-2.002 5.004z"})),f4e=A.memo(u4e),h4e=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M16 4c0-1.1.9-2 2-2s2 .9 2 2-.9 2-2 2-2-.9-2-2zm4.78 3.58A6.95 6.95 0 0 0 18 7c-.67 0-1.31.1-1.92.28.58.55.92 1.32.92 2.15V10h5v-.57c0-.81-.48-1.53-1.22-1.85zM6 6c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm
35031.92 1.28C7.31 7.1 6.67 7 6 7c-.99 0-1.93.21-2.78.58A2.01 2.01 0 0 0 2 9.43V10h5v-.57c0-.83.34-1.6.92-2.15zM10 4c0-1.1.9-2 2-2s2 .9 2 2-.9 2-2 2-2-.9-2-2zm6 6H8v-.57c0-.81.48-1.53 1.22-1.85a6.95 6.95 0 0 1 5.56 0A2.01 2.01 0 0 1 16 9.43V10zm-1 6c0-1.1.9-2 2-2s2 .9 2 2-.9 2-2 2-2-.9-2-2zm6 6h-8v-.57c0-.81.48-1.53 1.22-1.85a6.95 6.95 0 0 1 5.56 0A2.01 2.01 0 0 1 21 21.43V22zM5 16c0-1.1.9-2 2-2s2 .9 2 2-.9 2-2 2-2-.9-2-2zm6 6H3v-.57c0-.81.48-1.53 1.22-1.85a6.95 6.95 0 0 1 5.56 0A2.01 2.01 0 0 1 11 21.43V22zm1.75-9v-2h-1.5v2H9l3 3 3-3h-2.25z"})),d4e=A.memo(h4e),p4e=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm5 11H7v-2h10v2z"})),g4e=A.memo(p4e),m4e=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M19 13H5v-2h14v2z"})),v4e=A.memo(m4e),y4e=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M15.73 3H8.27L3 8.27v7.46L8.27 21h7.46L21 15.73V8.27L15.73 3zM12 17.3c-.72 0-1.3-.58-1.3-1.3 0-.72.58-1.3 1.3-1.3.72 0 1.3.58 1.3 1.3 0 .72-.58 1.3-1.3 1.3zm1-4.3h-2V7h2v6z"})),b4e=A.memo(y4e),_4e=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M11 9H9V2H7v7H5V2H3v7c0 2.12 1.66 3.84 3.75 3.97V22h2.5v-9.03C11.34 12.84 13 11.12 13 9V2h-2v7zm5-3v8h2.5v8H21V2c-2.76 0-5 2.24-5 4z"})),w4e=A.memo(_4e),x4e=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("circle",{cx:6.18,cy:17.82,r:2.18}),A.createElement("path",{d:"M4 4.44v2.83c7.03 0 12.73 5.7 12.73 12.73h2.83c0-8.59-6.97-15.56-15.56-15.56zm0 5.66v2.83c3.9 0 7.07 3.17 7.07 7.07h2.83c0-5.47-4.43-9.9-9.9-9.9z"})),A4e=A.memo(x4e),E4e=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M11 5h2v14h-2V5zm-6 7c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm2.78 1.58a6.95 6.95 0 0 0-5.56 0A2.01 2.01 0 0 0 1 15.43V16h8v-.57c0-.81-.48-1.53-1.22-1.85zM19 12c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm2.78 1.58a6.95 6.95 0 0 0-5.56 0A2.01 2.01 0 0 0 15 15.43V16h8v-.57c0-.81-.48-1.53-1.22-1.85z"})),S4e=A.memo(E4e),T4e=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M15.5 6.5C15.5 5.66 17 4 17 4s1.5 1.66 1.5 2.5c0 .83-.67 1.5-1.5 1.5s-1.5-.67-1.5-1.5zm4 8.5a2.5 2.5 0 0 0 2.5-2.5c0-1.67-2.5-4.5-2.5-4.5S17 10.83 17 12.5a2.5 2.5 0 0 0 2.5 2.5zM13 14h-2v-2H9v2H7v2h2v2h2v-2h2v-2zm3-2v10H4V12c0-2.97 2.16-5.43 5-5.91V4H7V2h6c1.13 0 2.15.39 2.99 1.01l-1.43 1.43C14.1 4.17 13.57 4 13 4h-2v2.09c2.84.48 5 2.94 5 5.91z"})),C4e=A.memo(T4e),P4e=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M19 12v7H5v-7H3v7c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7h-2zm-6 .67 2.59-2.58L17 11.5l-5 5-5-5 1.41-1.41L11 12.67V3h2z"})),I4e=A.memo(P4e),O4e=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 24 24",width:"1em",...t},A.createElement("g",{"data-name":"Severe Weather"},A.createElement("path",{d:"M4.05 17.73 12 4l8 13.85A5 5 0 0 0 19.2 8a7.49 7.49 0 0 0-14-2 6 6 0 0 0-1.15 11.73Z"}),A.createElement("path",{d:"M12 7 3.34 22h17.32Zm0 13.4a1 1 0 1 1 1-1 1 1 0 0 1-1 1ZM11 17v-4.6h2V17Z"}))),M4e=A.memo(O4e),R4e=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),A.createElement("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})),k4e=A.memo(R4e),N4e=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t}
3503,A.createElement("path",{d:"M5 13.18v4L12 21l7-3.82v-4L12 17l-7-3.82zM12 3 1 9l11 6 9-4.91V17h2V9L12 3z"})),D4e=A.memo(N4e),B4e=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M19.8 18.4 14 10.67V6.5l1.35-1.69c.26-.33.03-.81-.39-.81H9.04c-.42 0-.65.48-.39.81L10 6.5v4.17L4.2 18.4c-.49.66-.02 1.6.8 1.6h14c.82 0 1.29-.94.8-1.6z"})),L4e=A.memo(B4e),F4e=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"})),U4e=A.memo(F4e),z4e=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M12 1 3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4zm0 10.99h7c-.53 4.12-3.28 7.79-7 8.94V12H5V6.3l7-3.11v8.8z"})),j4e=A.memo(z4e),V4e=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M2.01 21 23 12 2.01 3 2 10l15 2-15 2z"})),W4e=A.memo(V4e),$4e=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("circle",{cx:15.5,cy:9.5,r:1.5}),A.createElement("circle",{cx:8.5,cy:9.5,r:1.5}),A.createElement("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm0-3.5c.73 0 1.39.19 1.97.53.12-.14.86-.98 1.01-1.14A5.39 5.39 0 0 0 12 15c-1.11 0-2.13.33-2.99.88.97 1.09.01.02 1.01 1.14.59-.33 1.25-.52 1.98-.52z"})),H4e=A.memo($4e),q4e=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M9 15.5h6v1H9v-1z"}),A.createElement("circle",{cx:15.5,cy:9.5,r:1.5}),A.createElement("circle",{cx:8.5,cy:9.5,r:1.5}),A.createElement("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"})),Q4e=A.memo(q4e),X4e=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("circle",{cx:15.5,cy:9.5,r:1.5}),A.createElement("circle",{cx:8.5,cy:9.5,r:1.5}),A.createElement("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm0-4c-.73 0-1.38-.18-1.96-.52-.12.14-.86.98-1.01 1.15a5.49 5.49 0 0 0 5.95-.01c-.97-1.09-.01-.02-1.01-1.15-.59.35-1.24.53-1.97.53z"})),Y4e=A.memo(X4e),K4e=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("circle",{cx:15.5,cy:9.5,r:1.5}),A.createElement("circle",{cx:8.5,cy:9.5,r:1.5}),A.createElement("circle",{cx:15.5,cy:9.5,r:1.5}),A.createElement("circle",{cx:8.5,cy:9.5,r:1.5}),A.createElement("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm0-2.5c2.33 0 4.32-1.45 5.12-3.5h-1.67c-.69 1.19-1.97 2-3.45 2s-2.75-.81-3.45-2H6.88c.8 2.05 2.79 3.5 5.12 3.5z"})),G4e=A.memo(K4e),Z4e=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("circle",{cx:15.5,cy:9.5,r:1.5}),A.createElement("circle",{cx:8.5,cy:9.5,r:1.5}),A.createElement("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm0-6c-2.33 0-4.32 1.45-5.12 3.5h1.67c.69-1.19 1.97-2 3.45-2s2.75.81 3.45 2h1.67c-.8-2.05-2.79-3.5-5.12-3.5z"})),J4e=A.memo(Z4e),eCe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58a.49.49 0 0 0 .12-.61l-1.92-3.32a.488.488 0 0 0-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54a.484.484 0 0 0-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58a.49.49 0 0 0-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z"})),tCe=A.memo(eCe),nCe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M18 16.08c-.76 0-1.44.3-1.96.77L8.91 12.7c.05-.23.09-.46.09-.7s-.04-.47-.09-.7l7.05-4.11c.54.5 1.25.81 2.04.81 1.66 0 3-1.34 3-3s-1.34-3
3503-3-3-3 1.34-3 3c0 .24.04.47.09.7L8.04 9.81C7.5 9.31 6.79 9 6 9c-1.66 0-3 1.34-3 3s1.34 3 3 3c.79 0 1.5-.31 2.04-.81l7.12 4.16c-.05.21-.08.43-.08.65 0 1.61 1.31 2.92 2.92 2.92 1.61 0 2.92-1.31 2.92-2.92s-1.31-2.92-2.92-2.92z"})),rCe=A.memo(nCe),iCe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M12 1 3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4z"})),sCe=A.memo(iCe),oCe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"m17.21 9-4.38-6.56a.993.993 0 0 0-.83-.42c-.32 0-.64.14-.83.43L6.79 9H2c-.55 0-1 .45-1 1 0 .09.01.18.04.27l2.54 9.27c.23.84 1 1.46 1.92 1.46h13c.92 0 1.69-.62 1.93-1.46l2.54-9.27L23 10c0-.55-.45-1-1-1h-4.79zM9 9l3-4.4L15 9H9zm3 8c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z"})),aCe=A.memo(oCe),lCe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 24 24",width:"1em",...t},A.createElement("path",{d:"m20.76 14.07-.66-1.34-2.88 1.42L13.5 12l3.72-2.15 2.88 1.42.66-1.34-1.97-.98 2.25-1.3-.75-1.3-2.25 1.3.14-2.2-1.5-.1-.21 3.2-3.72 2.15V6.4l2.67-1.78-.84-1.24-1.83 1.22V2h-1.5v2.6L9.42 3.38l-.84 1.24 2.67 1.78v4.3L7.53 8.55l-.21-3.2-1.5.1.14 2.2-2.25-1.3-.75 1.3 2.25 1.3-1.97.98.66 1.34 2.88-1.42L10.5 12l-3.72 2.15-2.88-1.42-.66 1.34 1.97.98-2.25 1.3.75 1.3 2.25-1.3-.14 2.2 1.5.1.21-3.2 3.72-2.15v4.3l-2.67 1.78.84 1.24 1.83-1.22V22h1.5v-2.6l1.83 1.22.84-1.24-2.67-1.78v-4.3l3.72 2.15.21 3.2 1.5-.1-.14-2.2 2.25 1.3.75-1.3-2.25-1.3 1.97-.98z"})),cCe=A.memo(lCe),uCe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"m9.12 5-7.18 6.79c-.6.56-.94 1.35-.94 2.18V20c0 1.66 1.34 3 3 3h13.75a1.25 1.25 0 0 0 0-2.5H12v-1h7.75a1.25 1.25 0 0 0 0-2.5H12v-1h8.75a1.25 1.25 0 0 0 0-2.5H12v-1h6.75a1.25 1.25 0 0 0 0-2.5H8.86c.64-1.11 1.48-2.58 1.49-2.61a1.065 1.065 0 0 0-.12-1.23C10.22 6.12 9.12 5 9.12 5zM14 6.25c.41 0 .75.34.75.75s-.34.75-.75.75-.75-.34-.75-.75.34-.75.75-.75m0-1.5c-1.24 0-2.25 1.01-2.25 2.25S12.76 9.25 14 9.25 16.25 8.24 16.25 7 15.24 4.75 14 4.75zm5.75.75c.28 0 .5.22.5.5s-.22.5-.5.5-.5-.22-.5-.5.22-.5.5-.5m0-1.5c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zM16.5 1c-.83 0-1.5.67-1.5 1.5S15.67 4 16.5 4 18 3.33 18 2.5 17.33 1 16.5 1z"})),fCe=A.memo(uCe),hCe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M4 5c0-1.1.9-2 2-2s2 .9 2 2-.9 2-2 2-2-.9-2-2zm4.78 3.58a6.95 6.95 0 0 0-5.56 0A2.01 2.01 0 0 0 2 10.43V11h8v-.57c0-.81-.48-1.53-1.22-1.85zM18 7c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm2.78 1.58a6.95 6.95 0 0 0-5.56 0A2.01 2.01 0 0 0 14 10.43V11h8v-.57c0-.81-.48-1.53-1.22-1.85zM22 17l-4-4v3H6v-3l-4 4 4 4v-3h12v3l4-4z"})),dCe=A.memo(hCe),pCe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 24 24",width:"1em",...t},A.createElement("path",{d:"M15.17 15 13 17.17V6.83L15.17 9l1.41-1.41L12 3 7.41 7.59 8.83 9 11 6.83v10.34L8.83 15l-1.41 1.41L12 21l4.59-4.59L15.17 15z"})),gCe=A.memo(pCe),mCe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M12.45 16h2.09L9.43 3H7.57L2.46 16h2.09l1.12-3h
35035.64l1.14 3zm-6.02-5L8.5 5.48 10.57 11H6.43zm15.16.59-8.09 8.09L9.83 16l-1.41 1.41 5.09 5.09L23 13l-1.41-1.41z"})),vCe=A.memo(mCe),yCe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M12 17.27 18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"})),bCe=A.memo(yCe),_Ce=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"m22 9.24-7.19-.62L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03L22 9.24zM12 15.4V6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28L12 15.4z"})),wCe=A.memo(_Ce),xCe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"m22 9.24-7.19-.62L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03L22 9.24zM12 15.4l-3.76 2.27 1-4.28-3.32-2.88 4.38-.38L12 6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28L12 15.4z"})),ACe=A.memo(xCe),ECe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M20 4H4v2h16V4zm1 10v-2l-1-5H4l-1 5v2h1v6h10v-6h4v6h2v-6h1zm-9 4H6v-4h6v4z"})),SCe=A.memo(ECe),TCe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm7.46 7.12-2.78 1.15a4.982 4.982 0 0 0-2.95-2.94l1.15-2.78c2.1.8 3.77 2.47 4.58 4.57zM12 15c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3zM9.13 4.54l1.17 2.78a5 5 0 0 0-2.98 2.97L4.54 9.13a7.984 7.984 0 0 1 4.59-4.59zM4.54 14.87l2.78-1.15a4.968 4.968 0 0 0 2.97 2.96l-1.17 2.78a7.996 7.996 0 0 1-4.58-4.59zm10.34 4.59-1.15-2.78a4.978 4.978 0 0 0 2.95-2.97l2.78 1.17a8.007 8.007 0 0 1-4.58 4.58z"})),CCe=A.memo(TCe),PCe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M21 12.22C21 6.73 16.74 3 12 3c-4.69 0-9 3.65-9 9.28-.6.34-1 .98-1 1.72v2c0 1.1.9 2 2 2h1v-6.1c0-3.87 3.13-7 7-7s7 3.13 7 7V19h-8v2h8c1.1 0 2-.9 2-2v-1.22c.59-.31 1-.92 1-1.64v-2.3c0-.7-.41-1.31-1-1.62z"}),A.createElement("circle",{cx:9,cy:13,r:1}),A.createElement("circle",{cx:15,cy:13,r:1}),A.createElement("path",{d:"M18 11.03A6.04 6.04 0 0 0 12.05 6c-3.03 0-6.29 2.51-6.03 6.45a8.075 8.075 0 0 0 4.86-5.89c1.31 2.63 4 4.44 7.12 4.47z"})),ICe=A.memo(PCe),OCe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M2.5 4v3h5v12h3V7h5V4h-13zm19 5h-9v3h3v7h3v-7h3V9z"})),MCe=A.memo(OCe),RCe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M22 4h-2c-.55 0-1 .45-1 1v9c0 .55.45 1 1 1h2V4zM2.17 11.12c-.11.25-.17.52-.17.8V13c0 1.1.9 2 2 2h5.5l-.92 4.65c-.05.22-.02.46.08.66.23.45.52.86.88 1.22L10 22l6.41-6.41c.38-.38.59-.89.59-1.42V6.34C17 5.05 15.95 4 14.66 4h-8.1c-.71 0-1.36.37-1.72.97l-2.67 6.15z"})),kCe=A.memo(RCe),NCe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M2 20h2c.55 0 1-.45 1-1v-9c0-.55-.45-1-1-1H2v11zm19.83-7.12c.11-.25.17-.52.17-.8V11c0-1.1-.9-2-2-2h-5.5l.92-4.65c.05-.22.02-.46-.08-.66a4.8 4.8 0 0 0-.88-1.22L14 2 7.59 8.41C7.21 8.79 7 9.3 7 9.83v7.84A2.34 2.34 0 0 0 9.34 20h8.11c.7 0 1.36-.37 1.72-.97l2.66-6.15z"})),DCe=A.memo(NCe),BCe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M9 1h6v2H9zm10.03 6.39 1.42-1.42c-.43-.51-.9-.99-1.41-1.41l-1.42 1.42A8.962 8.962 0 0 0 12 4a9 9 0 0 0-9 9c0 4.97 4.02 9 9 9a8.994 8.994 0 0 0 7.03-14.61zM13 14h-2V8h2v6z"})),LCe=A.memo(BCe),FCe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M17 7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h10c2.76 0 5-2.24 5-5s-2.24-5-5-5zM7 15c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3z"})),UCe=A.memo(FCe),zCe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M17 7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h10c2.76 0 5-2.24 5-5s-2.24-5-5-5zm0 8c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3z"})),jCe=A.memo(zCe),VCe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M20 6h-8l-2-2H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm-6 10
3503H6v-2h8v2zm4-4H6v-2h12v2z"})),WCe=A.memo(VCe),$Ce=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 24 24",width:"1em",...t},A.createElement("path",{d:"M13 16v-2h2.77c.08-.32.16-.65.23-1 1.19-5.95 4-6 4-10H4a10.35 10.35 0 0 0 .48 3H8v2H5.26c.32.69.68 1.36 1 2H10v2H7.51A13.86 13.86 0 0 1 9 15a6.24 6.24 0 0 1-1 6l1 1c2.82-1.54 4.85-3.09 6.1-6Z"})),HCe=A.memo($Ce),qCe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"m12.87 15.07-2.54-2.51.03-.03A17.52 17.52 0 0 0 14.07 6H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7 1.62-4.33L19.12 17h-3.24z"})),QCe=A.memo(qCe),XCe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"m16 18 2.29-2.29-4.88-4.88-4 4L2 7.41 3.41 6l6 6 4-4 6.3 6.29L22 12v6z"})),YCe=A.memo(XCe),KCe=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"m16 6 2.29 2.29-4.88 4.88-4-4L2 16.59 3.41 18l6-6 4 4 6.3-6.29L22 12V6z"})),GCe=A.memo(KCe),ZCe=t=>A.createElement("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...t},A.createElement("path",{d:"M19.912 7.925v.527A11.562 11.562 0 0 1 8.265 20.098 11.443 11.443 0 0 1 2 18.265c.328.017.657.017.985 0a8.132 8.132 0 0 0 5.093-1.698 4.092 4.092 0 0 1-3.786-2.852c.255.062.518.091.781.085.36-.002.72-.047 1.07-.136a4.109 4.109 0 0 1-3.21-4.024c.566.32 1.202.494 1.851.51a4.126 4.126 0 0 1-1.34-5.518 11.613 11.613 0 0 0 8.488 4.295 4.397 4.397 0 0 1-.119-.934 4.092 4.092 0 0 1 4.092-4.092 4.04 4.04 0 0 1 3.005 1.29 7.929 7.929 0 0 0 2.53-1c-.3.953-.94 1.763-1.8 2.274A7.725 7.725 0 0 0 22 5.803a8.489 8.489 0 0 1-2.088 2.122Z",fillRule:"evenodd"})),JCe=A.memo(ZCe),e5e=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M12.5 8c-2.65 0-5.05.99-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z"})),t5e=A.memo(e5e),n5e=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M7.41 18.59 8.83 20 12 16.83 15.17 20l1.41-1.41L12 14l-4.59 4.59zm9.18-13.18L15.17 4 12 7.17 8.83 4 7.41 5.41 12 10l4.59-4.59z"})),r5e=A.memo(n5e),i5e=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M12 5.83 15.17 9l1.41-1.41L12 3 7.41 7.59 8.83 9 12 5.83zm0 12.34L8.83 15l-1.41 1.41L12 21l4.59-4.59L15.17 15 12 18.17z"})),s5e=A.memo(i5e),o5e=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M21 10.12h-6.78l2.74-2.82c-2.73-2.7-7.15-2.8-9.88-.1-2.73 2.71-2.73 7.08 0 9.79s7.15 2.71 9.88 0C18.32 15.65 19 14.08 19 12.1h2c0 1.98-.88 4.55-2.64 6.29-3.51 3.48-9.21 3.48-12.72 0-3.5-3.47-3.53-9.11-.02-12.58s9.14-3.47 12.65 0L21 3v7.12zM12.5 8v4.25l3.5 2.08-.72 1.21L11 13V8h1.5z"})),a5e=A.memo(o5e),l5e=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm4 18H6V4h7v5h5v11zM8 15.01l1.41 1.41L11 14.84V19h2v-4.16l1.59 1.59L16 15.01 12.01 11z"})),c5e=A.memo(l5e),u5e=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"m23 12-2.44-2.79.34-3.69-3.61-.82-1.89-3.2L12 2.96 8.6 1.5 6.71 4.69 3.1 5.5l.34 3.7L1 12l2.44 2.79-.34 3.7 3.61.82L8.6 22.5l3.4-1.47 3.4 1.46 1.89-3.19 3.61-.82-.34-3.69L23 12zm-12.91 4.72-3.8-3.81 1.48-1.48 2.32 2.33 5.85-5.87 1.48 1.48-7.33 7.35z"})),f5e=A.memo(u5e),h5e=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M12 1 3 5v6c0 5.55 3.84 10.74 9 12 5.
350316-1.26 9-6.45 9-12V5l-9-4zm-2 16-4-4 1.41-1.41L10 14.17l6.59-6.59L18 9l-8 8z"})),d5e=A.memo(h5e),p5e=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"})),g5e=A.memo(p5e),m5e=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46A11.804 11.804 0 0 0 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z"})),v5e=A.memo(m5e),y5e=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M16.5 12A4.5 4.5 0 0 0 14 7.97v2.21l2.45 2.45c.03-.2.05-.41.05-.63zm2.5 0c0 .94-.2 1.82-.54 2.64l1.51 1.51A8.796 8.796 0 0 0 21 12c0-4.28-2.99-7.86-7-8.77v2.06c2.89.86 5 3.54 5 6.71zM4.27 3 3 4.27 7.73 9H3v6h4l5 5v-6.73l4.25 4.25c-.67.52-1.42.93-2.25 1.18v2.06a8.99 8.99 0 0 0 3.69-1.81L19.73 21 21 19.73l-9-9L4.27 3zM12 4 9.91 6.09 12 8.18V4z"})),b5e=A.memo(y5e),_5e=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t}
3503,A.createElement("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"})),w5e=A.memo(_5e),x5e=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M18.5 8A2.5 2.5 0 0 0 21 5.5C21 3.83 18.5 1 18.5 1S16 3.83 16 5.5A2.5 2.5 0 0 0 18.5 8zm-5 1c.83 0 1.5-.67 1.5-1.5 0-.84-1.5-2.5-1.5-2.5S12 6.66 12 7.5c0 .83.67 1.5 1.5 1.5zM9.12 5l-7.18 6.79c-.6.56-.94 1.35-.94 2.18V20c0 1.66 1.34 3 3 3h13.75a1.25 1.25 0 0 0 0-2.5H12v-1h7.75a1.25 1.25 0 0 0 0-2.5H12v-1h8.75a1.25 1.25 0 0 0 0-2.5H12v-1h6.75a1.25 1.25 0 0 0 0-2.5H8.86c.64-1.11 1.48-2.58 1.49-2.61a1.065 1.065 0 0 0-.12-1.23C10.22 6.12 9.12 5 9.12 5z"})),A5e=A.memo(x5e),E5e=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"m1 9 2 2c4.97-4.97 13.03-4.97 18 0l2-2C16.93 2.93 7.08 2.93 1 9zm8 8 3 3 3-3a4.237 4.237 0 0 0-6 0zm-4-4 2 2a7.074 7.074 0 0 1 10 0l2-2C15.14 9.14 8.87 9.14 5 13z"})),S5e=A.memo(E5e),T5e=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M20 6h-4V4c0-1.11-.89-2-2-2h-4c-1.11 0-2 .89-2 2v2H4c-1.11 0-1.99.89-1.99 2L2 19c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V8c0-1.11-.89-2-2-2zm-6 0h-4V4h4v2z"})),C5e=A.memo(T5e),P5e=t=>A.createElement("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...t},A.createElement("path",{d:"M13.522 10.775 19.48 4h-1.412l-5.172 5.883L8.765 4H4l6.247 8.895L4 20h1.412l5.461-6.212L15.236 20H20l-6.478-9.225Zm-1.933 2.199-.633-.886L5.92 5.04h2.168l4.064 5.688.633.886 5.283 7.394H15.9l-4.311-6.034Z"})),I5e=A.memo(P5e),O5e=t=>A.createElement("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...t},A.createElement("path",{d:"M19.816 5.389a2.469 2.469 0 0 1 1.766 1.746c.291 1.598.43 3.22.417 4.843a25.867 25.867 0 0 1-.417 4.794 2.468 2.468 0 0 1-1.766 1.795c-2.593.318-5.204.46-7.816.429a58.411 58.411 0 0 1-7.816-.429 2.469 2.469 0 0 1-1.766-1.746 25.879 25.879 0 0 1-.417-4.843 25.85 25.85 0 0 1 .417-4.793 2.468 2.468 0 0 1 1.766-1.796c2.594-.3 5.205-.427 7.816-.379a58.413 58.413 0 0 1 7.816.379ZM9.95 9.046v5.864l5.233-2.932L9.95 9.046Z"})),M5e=A.memo(O5e),R5e=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"}),A.createElement("path",{d:"M12 10h-2v2H9v-2H7V9h2V7h1v2h2v1z"})),k5e=A.memo(R5e),N5e=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"m15 3 2.3 2.3-2.89 2.87 1.42 1.42L18.7 6.7 21 9V3h-6zM3 9l2.3-2.3 2.87 2.89 1.42-1.42L6.7 5.3 9 3H3v6zm6 12-2.3-2.3 2.89-2.87-1.42-1.42L5.3 17.3 3 15v6h6zm12-6-2.3 2.3-2.87-2.89-1.42 1.42 2.89 2.87L15 21h6v-6z"})),D5e=A.memo(N5e),B5e=t=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",...t},A.createElement("path",{d:"M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14zM7 9h5v1H7z"})),L5e=A.memo(B5e),Ae=t=>{const e=n=>{const{size:r,className:i,focusable:s=!1,role:o="img",...a}=n,l={className:Ki("usa-icon",{[`usa-icon--size-${r}`]:r!==void 0},i),focusable:s,role:o,...a};return o==="img"&&!a["aria-hidden"]&&!a["aria-label"]&&!a["aria-labelledby"]&&console.warn("Icon with img role is missing an accessible label. https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/Img_role#associated_wai-aria_roles_states_and_properties"),Q.jsx(t,{...l})};return e.displayName=t.displayName,e},xe=class{};xe.AccessibilityNew=Ae(Uwe),xe.AccessibleForward=Ae(jwe),xe.AccountBalance=Ae(Wwe),xe.AccountBox=Ae(Hwe),xe.AccountCircle=Ae(Qwe),xe.Add=Ae(Ywe),xe.AddCircle=Ae(Gwe),xe.AddCircleOutline=Ae(Jwe),xe.Alarm=Ae(txe),xe.AlternateEmail=Ae(rxe),xe.Announcement=Ae(sxe),xe.ArrowBack=Ae(axe),xe.ArrowDownward=Ae(cxe),xe.ArrowDropDown=Ae(fxe),xe.ArrowDropUp=Ae(dxe),xe.ArrowForward=Ae(gxe),xe.ArrowUpward=Ae(vxe),xe.Api=Ae(bxe),xe.Assessment=Ae(wxe),xe.AttachFile=Ae(Axe),xe.AttachMoney=Ae(Sxe),xe.Autorenew=Ae(Cxe),xe.Backpack=Ae(Ixe),xe.Bathtub=Ae(Mxe),xe.Bedding=Ae(kxe),xe.Bookmark=Ae(Dxe),xe.BugReport=Ae(Lxe),xe.Build=Ae(Uxe),xe.CalendarToday=Ae(jxe),xe.Campaign=Ae(Wxe),xe.Camping=Ae(Hxe),xe.Cancel=Ae(Qxe),xe.Chat=Ae(Yxe),xe.Check=Ae(Gxe),xe.CheckBoxOutlineBlank=Ae(Jxe),xe.CheckCircle=Ae(tAe),xe.CheckCircleOutline=Ae(rAe),xe.Checkroom=Ae(sAe),xe.CleanHands=Ae(aAe),xe.Clothes=Ae(cAe),xe.Close=Ae(fAe),xe.ClosedCaption=Ae(dAe),xe.Cloud=Ae(gAe),xe.Code=Ae(vAe),xe.Comment=Ae(bAe),xe.ConnectWithoutContact=Ae(wAe),xe.Construction=Ae(AAe),xe.ConstructionWorker=Ae(SAe),xe.ContactPage=Ae(CAe),xe.ContentCopy=Ae(IAe),xe.Coronavirus=Ae(MAe),xe.Credit
3503Card=Ae(kAe),xe.Deck=Ae(DAe),xe.Delete=Ae(LAe),xe.DeviceThermostat=Ae(UAe),xe.Directions=Ae(jAe),xe.DirectionsBike=Ae(WAe),xe.DirectionsBus=Ae(HAe),xe.DirectionsCar=Ae(QAe),xe.DirectionsWalk=Ae(YAe),xe.DoNotDisturb=Ae(GAe),xe.DoNotTouch=Ae(JAe),xe.DragHandle=Ae(t3e),xe.Eco=Ae(r3e),xe.Edit=Ae(s3e),xe.ElectricalServices=Ae(a3e),xe.EmojiEvents=Ae(c3e),xe.Error=Ae(f3e),xe.ErrorOutline=Ae(d3e),xe.Event=Ae(g3e),xe.ExpandLess=Ae(v3e),xe.ExpandMore=Ae(b3e),xe.Facebook=Ae(w3e),xe.FastForward=Ae(A3e),xe.FastRewind=Ae(S3e),xe.Favorite=Ae(C3e),xe.FavoriteBorder=Ae(I3e),xe.Fax=Ae(M3e),xe.FileDownload=Ae(k3e),xe.FilePresent=Ae(D3e),xe.FileUpload=Ae(L3e),xe.FilterAlt=Ae(U3e),xe.FilterList=Ae(j3e),xe.Fingerprint=Ae(W3e),xe.FirstPage=Ae(H3e),xe.Flag=Ae(Q3e),xe.Flickr=Ae(Y3e),xe.Flight=Ae(G3e),xe.Flooding=Ae(J3e),xe.Folder=Ae(tEe),xe.FolderOpen=Ae(rEe),xe.FormatQuote=Ae(sEe),xe.FormatSize=Ae(aEe),xe.Forum=Ae(cEe),xe.Github=Ae(fEe),xe.GridView=Ae(dEe),xe.GroupAdd=Ae(gEe),xe.Groups=Ae(vEe),xe.Hearing=Ae(bEe),xe.Help=Ae(wEe),xe.HelpOutline=Ae(AEe),xe.HighlightOff=Ae(SEe),xe.History=Ae(CEe),xe.Home=Ae(IEe),xe.Hospital=Ae(MEe),xe.Hotel=Ae(kEe),xe.HourglassEmpty=Ae(DEe),xe.Hurricane=Ae(LEe),xe.Identification=Ae(UEe),xe.Image=Ae(jEe),xe.Info=Ae(WEe),xe.InfoOutline=Ae(HEe),xe.Insights=Ae(QEe),xe.Instagram=Ae(YEe),xe.Keyboard=Ae(GEe),xe.Label=Ae(JEe),xe.Language=Ae(tSe),xe.LastPage=Ae(rSe),xe.Launch=Ae(sSe),xe.Lightbulb=Ae(aSe),xe.LightbulbOutline=Ae(cSe),xe.LinkedIn=Ae(fSe),xe.Link=Ae(dSe),xe.LinkOff=Ae(gSe),xe.List=Ae(vSe),xe.LocalCafe=Ae(bSe),xe.LocalFireDepartment=Ae(wSe),xe.LocalGasStation=Ae(ASe),xe.LocalGroceryStore=Ae(SSe),xe.LocalHospital=Ae(CSe),xe.LocalLaundryService=Ae(ISe),xe.LocalLibrary=Ae(MSe),xe.LocalOffer=Ae(kSe),xe.LocalParking=Ae(DSe),xe.LocalPharmacy=Ae(LSe),xe.LocalPolice=Ae(USe),xe.LocalTaxi=Ae(jSe),xe.LocationCity=Ae(WSe),xe.LocationOn=Ae(HSe),xe.Lock=Ae(QSe),xe.LockOpen=Ae(YSe),xe.LockOutline=Ae(GSe),xe.Login=Ae(JSe),xe.Logout=Ae(tTe),xe.Loop=Ae(rTe),xe.Mail=Ae(sTe),xe.MailOutline=Ae(aTe),xe.Map=Ae(cTe),xe.Masks=Ae(fTe),xe.MedicalServices=Ae(dTe),xe.Menu=Ae(gTe),xe.MilitaryTech=Ae(vTe),xe.MoreHoriz=Ae(bTe),xe.MoreVert=Ae(wTe),xe.MyLocation=Ae(ATe),xe.NavigateBefore=Ae(STe),xe.NavigateNext=Ae(CTe),xe.NavigateFarBefore=Ae(ITe),xe.NavigateFarNext=Ae(MTe),xe.NearMe=Ae(kTe),xe.Notifications=Ae(DTe),xe.NotificationsActive=Ae(LTe),xe.NotificationsNone=Ae(UTe),xe.NotificationsOff=Ae(jTe),xe.Park=Ae(WTe),xe.People=Ae(HTe),xe.Person=Ae(QTe),xe.Pets=Ae(YTe),xe.Phone=Ae(GTe),xe.PhotoCamera=Ae(JTe),xe.Print=Ae(t4e),xe.PriorityHigh=Ae(r4e),xe.Public=Ae(s4e),xe.PushPin=Ae(a4e),xe.RadioButtonUnchecked=Ae(c4e),xe.Rain=Ae(f4e),xe.ReduceCapacity=Ae(d4e),xe.RemoveCircle=Ae(g4e),xe.Remove=Ae(v4e),xe.Report=Ae(b4e),xe.Restaurant=Ae(w4e),xe.RssFeed=Ae(A4e),xe.SafetyDivider=Ae(S4e),xe.Sanitizer=Ae(C4e),xe.SaveAlt=Ae(I4e),xe.SevereWeather=Ae(M4e),xe.Schedule=Ae(k4e),xe.School=Ae(D4e),xe.Science=Ae(L4e),xe.Search=Ae(U4e),xe.Security=Ae(j4e),xe.Send=Ae(W4e),xe.SentimentDissatisfied=Ae(H4e),xe.SentimentNeutral=Ae(Q4e),xe.SentimentSatisfied=Ae(Y4e),xe.SentimentSatisfiedAlt=Ae(G4e),xe.SentimentVeryDissatisfied=Ae(J4e),xe.Settings=Ae(tCe),xe.Share=Ae(rCe),xe.Shield=Ae(sCe),xe.ShoppingBasket=Ae(aCe),xe.Snow=Ae(cCe),xe.Soap=Ae(fCe),xe.SocialDistance=Ae(dCe),xe.SortArrow=Ae(gCe),xe.Spellcheck=Ae(vCe),xe.Star=Ae(bCe),xe.StarHalf=Ae(wCe),xe.StarOutline=Ae(ACe),xe.Store=Ae(SCe),xe.Support=Ae(CCe),xe.SupportAgent=Ae(ICe),xe.TextFields=Ae(MCe),xe.ThumbDownAlt=Ae(kCe),xe.ThumbUpAlt=Ae(DCe),xe.Timer=Ae(LCe),xe.ToggleOff=Ae(UCe),xe.ToggleOn=Ae(jCe),xe.Topic=Ae(WCe),xe.Tornado=Ae(HCe),xe.Translate=Ae(QCe),xe.TrendingDown=Ae(YCe),xe.TrendingUp=Ae(GCe),xe.Twitter=Ae(JCe),xe.Undo=Ae(t5e),xe.UnfoldLess=Ae(r5e),xe.UnfoldMore=Ae(s5e),xe.Update=Ae(a5e),xe.UploadFile=Ae(c5e),xe.Verified=Ae(f5e),xe.VerifiedUser=Ae(d5e),xe.Visibility=Ae(g5e),xe.VisibilityOff=Ae(v5e),xe.VolumeOff=Ae(b5e),xe.Warning=Ae(w5e),xe.Wash=Ae(A5e),xe.Wifi=Ae(S5e),xe.Work=Ae(C5e),xe.X=Ae(I5e),xe.Youtube=Ae(M5e),xe.ZoomIn=Ae(k5e),xe.ZoomOutMap=Ae(D5e),xe.ZoomOut=Ae(L5e);let um=xe;const F5e=A.forwardRef((t,e)=>{const{id:n,name:r,type:i,className:s,validationStatus:o,inputSize:a,inputRef:l,...c}=t,u=Ki("usa-input",{"usa-input--error":o==="error","usa-input--success":o==="success","usa-input--small":a==="small","usa-input--medium":a==="medium"},s);return Q.jsx("input",{"data-testid":"textInput",className:u,id:n,name:r,type:i,ref:l||e,...c})});F5e.displayName="TextInput";const MS=({id:t,name:e,className:n,label:r,inputRef:i,tile:s,labelDescription:o,...a})=>{const l=Ki("usa-checkbox",n),c=Ki("usa-checkbox__input",{"usa-checkbox__input--tile":s});return Q.jsxs("div",{"data-testid":"checkbox",className:l,children:[Q.jsx("input",{className:c,id:t,type:"checkbox",name:e,ref:i,...a}),Q.jsxs("label",{className:"usa-checkbox__label",htmlFor:t,children:[r,o&&Q.jsx("span",{className:"usa-checkbox__label-description",children:o})]})]})},U5e=(t,e="",n={})=>{const r=s=>s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");let i=t.replace(/{{(.*?)}}/g,(s,o)=>{const a=o.trim(),l=n[a];if(a!=="query"&&l){const c=new RegExp(l,"i"),u=e.match(c);return u?r(u[1]):""}return r(e)});return i="^(?:"+i+")$",new RegExp(i,"i")};var Rn=(t=>(t[t.SELECT_OPTION=0]="SELECT_OPTION",t[t.CLEAR=1]="CLEAR",t[t.OPEN_LIST=2]="OPEN_LIST",t[t.CLOSE_LIST=3]="CLOSE_LIST",t[t.FOCUS_OPTION=4]="FOCUS_OPTION",t[t.UPDATE_FILTER=5]="UPDATE_FILTER",t[t.BLUR=6]="BLUR",t[t.CLEAR_SELECTION=7]="CLEAR_SELECTION",t[t.FOCUS_INPUT=8]="FOCUS_INPUT",t))(Rn||{});const z5e=(t,e,n,r)=>{const i=s=>{const o=U5e(r.filter,s,r.extras),a=e.filter(l=>o.test(l.label.toLowerCase()));return n?{closestMatch:a.length>0?a[0]:e[0],optionsToDisplay:e}:{closestMatch:a[0],optionsToDisplay:a}};return A.useReducer((s,o)=>{switch(o.type){case 0:return{...s,isOpen:!1,selectedOption:o.option,focusMode:wc.Input,inputValue:o.option.label,filteredOptions:e,focu
3503sedOption:o.option,statusText:""};case 5:{const{closestMatch:a,optionsToDisplay:l}=i(o.value),c={...s,isOpen:!0,filteredOptions:l,inputValue:o.value,statusText:`${l.length} result${l.length>1?"s":""} available.`};return l.length<1&&(c.statusText="No results."),n||!s.selectedOption?c.focusedOption=a:s.selectedOption&&(c.filteredOptions.includes(s.selectedOption)?c.focusedOption=s.selectedOption:c.focusedOption=a),c}case 2:{const a=s.filteredOptions.length?`${s.filteredOptions.length} result${s.filteredOptions.length>1?"s":""} available.`:"No results.";return{...s,isOpen:!0,focusMode:wc.Input,focusedOption:s.selectedOption||s.focusedOption||e[0],statusText:a}}case 3:{const a={...s,isOpen:!1,focusMode:wc.Input,focusedOption:void 0,statusText:""};return s.filteredOptions.length===0&&(a.filteredOptions=e,a.inputValue=""),s.selectedOption&&(a.inputValue=s.selectedOption.label),a}case 4:{const a=s.filteredOptions.length?`${s.filteredOptions.length} result${s.filteredOptions.length>1?"s":""} available.`:"No results.";return{...s,isOpen:!0,focusedOption:o.option,focusMode:wc.Item,statusText:a}}case 1:return{...s,inputValue:"",isOpen:!1,focusMode:wc.Input,selectedOption:void 0,filteredOptions:e,focusedOption:e[0],statusText:""};case 6:{const a={...s,isOpen:!1,focusMode:wc.None,filteredOptions:e,statusText:""};return s.selectedOption?(a.inputValue=s.selectedOption.label,a.focusedOption=s.selectedOption):(a.inputValue="",a.focusedOption=e[0]),a}case 7:return{...s,inputValue:"",isOpen:!1,focusMode:wc.None,selectedOption:void 0,filteredOptions:e,focusedOption:void 0,statusText:""};case 8:return{...s,focusMode:wc.Input};default:throw new Error}},t)},j5e=".*{{query}}.*";var wc=(t=>(t[t.None=0]="None",t[t.Input=1]="Input",t[t.Item=2]="Item",t))(wc||{});const V5e=({focused:t,...e})=>{const n=A.useRef(null);return A.useEffect(()=>{t&&n.current&&n.current.focus()}),Q.jsx("input",{type:"text",...e,className:"usa-combo-box__input","data-testid":"combo-box-input",autoCapitalize:"off",autoComplete:"off",ref:n})},W5e=({id:t,name:e,className:n,options:r,defaultValue:i,disabled:s,onChange:o,assistiveHint:a,noResults:l,selectProps:c,inputProps:u,ulProps:h,customFilter:d,disableFiltering:m=!1},y)=>{var v;const b=!!s;let x;i&&(x=r.find(D=>D.value===i));const T=d||{filter:j5e},E={isOpen:!1,selectedOption:x||void 0,focusedOption:void 0,focusMode:0,filteredOptions:r,inputValue:x?x.label:"",statusText:""},[C,I]=z5e(E,r,m,T),O=A.useRef(null),N=A.useRef(null),U=A.useRef(null);A.useEffect(()=>{C.filteredOptions=r},[r]),A.useEffect(()=>{var D;o&&o(((D=C.selectedOption)==null?void 0:D.value)||void 0)},[C.selectedOption]),A.useEffect(()=>{C.focusMode===2&&C.focusedOption&&U.current&&U.current.focus()},[C.focusMode,C.focusedOption]),A.useEffect(()=>{if(C.isOpen&&C.focusedOption&&U.current&&N.current&&C.focusMode===1){const D=U.current.offsetTop+U.current.offsetHeight,$=N.current.scrollTop+N.current.offsetHeight;D>$&&(N.current.scrollTop=D-N.current.offsetHeight),U.current.offsetTop<N.current.scrollTop&&(N.current.scrollTop=U.current.offsetTop)}},[C.isOpen,C.focusedOption]),A.useEffect(()=>{var D;C.focusMode!==0&&((D=O.current)!=null&&D.contains(window.document.activeElement)||I({type:Rn.BLUR}))},[C.focusMode]),A.useImperativeHandle(y,()=>({focus:()=>I({type:Rn.FOCUS_INPUT}),clearSelection:()=>I({type:Rn.CLEAR_SELECTION})}),[]);const F=D=>{if(D.key==="Escape")I({type:Rn.CLOSE_LIST});else if(D.key==="ArrowDown"||D.key=="Down")D.preventDefault(),I({type:Rn.FOCUS_OPTION,option:C.selectedOption||C.focusedOption||C.filteredOptions[0]});else if(D.key==="Tab"){if(C.isOpen&&!C.selectedOption){const $=m?C.focusedOption:C.selectedOption||C.focusedOption;$?(D.preventDefault(),I({type:Rn.FOCUS_OPTION,option:$})):I({type:Rn.BLUR})}!C.isOpen&&C.selectedOption&&I({type:Rn.BLUR})}else if(D.key==="Enter"&&C.isOpen){D.preventDefault();const $=C.filteredOptions.find(he=>he.label.toLowerCase()===C.inputValue.toLowerCase());$?I({type:Rn.SELECT_OPTION,option:$}):C.selectedOption?I({type:Rn.CLOSE_LIST}):I({type:Rn.CLEAR})}},H=D=>{var $;const{relatedTarget:he}=D;(!he||he instanceof Node&&!(($=O.current)!=null&&$.contains(he)))&&C.focusMode!==0&&I({type:Rn.BLUR})},W=D=>{D.key==="Tab"&&C.isOpen&&C.selectedOption&&(D.preventDefault(),I({type:Rn.FOCUS_OPTION,option:C.selectedOption}))},z=(D,$,he)=>{const Se=$.focusedOption?$.filteredOptions.indexOf($.focusedOption):-1,fe=$.filteredOptions[0],$e=$.filteredOptions[$.filteredOptions.length-1];if(Se===-1)D({type:Rn.FOCUS_OPTION,option:fe});else{const Ze=Se+he;if(Ze<0)D({type:Rn.CLOSE_LIST});else if(Ze>=$.filteredOptions.length)D({type:Rn.FOCUS_OPTION,option:$e});else{const ce=$.filteredOptions[Ze];D({type:Rn.FOCUS_OPTION,option:ce})}}},V=D=>{var $;const{relatedTarget:he}=D;(!he||he instanceof Node&&!(($=O.current)!=null&&$.contains(he)))&&I({type:Rn.BLUR})},M=D=>{D.key==="Escape"?I({type:Rn.CLOSE_LIST}):D.key==="Tab"||D.key==="Enter"?(D.preventDefault(),C.focusedOption&&I({type:Rn.SELECT_OPTION,option:C.focusedOption})):D.key==="ArrowDown"||D.key==="Down"?(D.preventDefault(),z(I,C,1)):(D.key==="ArrowUp"||D.key==="Up")&&(D.preventDefault(),z(I,C,-1))},K=C.selectedOption&&C.selectedOption.label===C.inputValue,j=Ki("usa-combo-box",n,{"usa-combo-box--pristine":K}),q=`${t}--list`,Y=`${t}--assistiveHint`,X=C.focusedOption?C.filteredOptions.findIndex(D=>D===C.focusedOption):-1,te=X>-1&&`${q}--option-${X}`;return Q.jsxs("div",{"data-testid":"combo-box","data-enhanced":"true",className:j,ref:O,children:[Q.jsx("select",{...c,className:"usa-select usa-sr-only usa-combo-box__select",name:e,"aria-hidden":!0,tabIndex:-1,defaultValue:(v=C.selectedOption)==null?void 0:v.value,"data-testid":"combo-box-select",children:r.map(D=>Q.jsx("option",{value:D.value,children:D.label},D.value))}),Q.jsx(V5e,{...u,role:"combobox",onChange:D=>{u!=null&&u.onChange&&(u==null||u.onChange(D)),I({type:Rn.UPDATE_FILTER,value:D.target.value})},onClick:()=>I({type:Rn.OPEN_LIST}),onBlur:H,onKeyDown:F,value:C.inputValue,focused:C.focusMode===1,"aria-owns":q,"aria-controls":q,"aria-autocomplete":"list","aria-describedby":Y,"aria-expanded":C.isOpen,"aria-activedescendant":C.isOpen&&te||"",id:t,disabled:b}),Q.jsx("span",{className:"usa-combo-box__clear-input__wrapper",tabIndex:-1,
3503children:Q.jsx("button",{type:"button",className:"usa-combo-box__clear-input","aria-label":"Clear the select contents",onClick:()=>I({type:Rn.CLEAR}),"data-testid":"combo-box-clear-button",onKeyDown:W,hidden:!K||b,disabled:b,children:" "})}),Q.jsx("span",{className:"usa-combo-box__input-button-separator",children:" "}),Q.jsx("span",{className:"usa-combo-box__toggle-list__wrapper",tabIndex:-1,children:Q.jsx("button",{"data-testid":"combo-box-toggle",type:"button",className:"usa-combo-box__toggle-list",tabIndex:-1,"aria-label":"Toggle the dropdown list",onClick:()=>I({type:C.isOpen?Rn.CLOSE_LIST:Rn.OPEN_LIST}),disabled:b,children:" "})}),Q.jsxs("ul",{...h,"data-testid":"combo-box-option-list",tabIndex:-1,id:q,className:"usa-combo-box__list",role:"listbox",ref:N,hidden:!C.isOpen,children:[C.filteredOptions.map((D,$)=>{const he=D===C.focusedOption,Se=D===C.selectedOption,fe=Ki("usa-combo-box__list-option",{"usa-combo-box__list-option--focused":he,"usa-combo-box__list-option--selected":Se});return Q.jsx("li",{ref:he?U:null,value:D.value,className:fe,tabIndex:he?0:-1,role:"option","aria-selected":Se,"aria-setsize":C.filteredOptions.length,"aria-posinset":$+1,id:q+`--option-${$}`,onKeyDown:M,onBlur:V,"data-testid":`combo-box-option-${D.value}`,"data-value":D.value,onMouseEnter:()=>I({type:Rn.FOCUS_OPTION,option:D}),onClick:()=>{I({type:Rn.SELECT_OPTION,option:D})},children:D.label},D.value)}),C.filteredOptions.length===0?Q.jsx("li",{className:"usa-combo-box__list-option--no-results",children:l||"No results found"}):null]}),Q.jsx("div",{className:"usa-combo-box__status usa-sr-only",role:"status",children:C.statusText}),Q.jsx("span",{id:Y,className:"usa-sr-only","data-testid":"combo-box-assistive-hint",children:a||`When autocomplete results are available use up and down arrows to review
3504           and enter to select. Touch device users, explore by touch or with swipe
3505           gestures.`})]})};A.forwardRef(W5e);const $5e=["January","February","March","April","May","June","July","August","September","October","November","December"],H5e=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],q5e=["S","M","T","W","Th","F","S"],Q5e="MM/DD/YYYY",X5e="YYYY-MM-DD",Y5e={months:$5e,daysOfWeek:H5e,daysOfWeekShort:q5e,statuses:["You can navigate by day using left and right arrows","Weeks by using up and down arrows","Months by using page up and page down keys","Years by using shift plus page up and shift plus page down","Home and end keys navigate to the beginning and end of a week"],selectedDate:"Selected date",selectAMonth:"Select a month.",toggleCalendar:"Toggle calendar",backOneYear:"Navigate back one year",backOneMonth:"Navigate back one month",forwardOneYear:"Navigate forward one year",forwardOneMonth:"Navigate forward one month",selectMonth:"Select month",selectYear:"Select year"},K5e=(t,e=X5e)=>{const n=(o,a)=>`0000${o}`.slice(-a),r=t.getMonth()+1,i=t.getDate(),s=t.getFullYear();return e===Q5e?[n(r,2),n(i,2),n(s,4)].join("/"):[n(s,4),n(r,2),n(i,2)].join("-")},G5e=()=>typeof navigator<"u"&&(navigator.userAgent.match(/(iPod|iPhone|iPad)/g)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1)&&!window.MSStream,Z5e=({date:t,onClick:e,onKeyDown:n,onMouseMove:r,isDisabled:i=!1,isSelected:s=!1,isFocused:o=!1,isPrevMonth:a=!1,isFocusedMonth:l=!1,isNextMonth:c=!1,isToday:u=!1,isRangeDate:h=!1,isRangeStart:d=!1,isRangeEnd:m=!1,isWithinRange:y=!1,i18n:v=Y5e},b)=>{const x=t.getDate(),T=t.getMonth(),E=t.getFullYear(),C=t.getDay(),I=K5e(t),O=o?0:-1,N=Ki("usa-date-picker__calendar__date",{"usa-date-picker__calendar__date--previous-month":a,"usa-date-picker__calendar__date--current-month":l,"usa-date-picker__calendar__date--next-month":c,"usa-date-picker__calendar__date--selected":s,"usa-date-picker__calendar__date--today":u,"usa-date-picker__calendar__date--focused":o,"usa-date-picker__calendar__date--range-date":h,"usa-date-picker__calendar__date--range-date-start":d,"usa-date-picker__calendar__date--range-date-end":m,"usa-date-picker__calendar__date--within-range":y}),U=v.months[parseInt(`${T}`)],F=v.daysOfWeek[parseInt(`${C}`)],H=()=>{e(I)},W=V=>{n(V)},z=()=>{i||G5e()||r(t)};return Q.jsx("button",{type:"button","data-testid":"select-date",ref:b,onClick:H,tabIndex:O,className:N,"data-day":x,"data-month":T+1,"data-year":E,"data-value":I,"aria-label":`${x} ${U} ${E} ${F}`,"aria-selected":!!s,disabled:i,onKeyDown:W,onMouseMove:l?z:void 0,children:x})};A.forwardRef(Z5e);const qL="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",J5e
3505=({imageId:t,file:e})=>{const n=A.useRef(new FileReader),[r,i]=A.useState(!0),[s,o]=A.useState(qL),[a,l]=A.useState(!1);A.useEffect(()=>(n.current.onloadend=()=>{i(!1),o(n.current.result)},n.current.readAsDataURL(e),()=>{n.current.onloadend=null}),[]);const{name:c}=e,u=()=>{o(qL),l(!0)},h=c.indexOf(".pdf")>0,d=c.indexOf(".doc")>0||c.indexOf(".pages")>0,m=c.indexOf(".mov")>0||c.indexOf(".mp4")>0,y=c.indexOf(".xls")>0||c.indexOf(".numbers")>0,v=Ki("usa-file-input__preview-image",{"is-loading":r,"usa-file-input__preview-image--pdf":a&&h,"usa-file-input__preview-image--word":a&&d,"usa-file-input__preview-image--video":a&&m,"usa-file-input__preview-image--excel":a&&y,"usa-file-input__preview-image--generic":a&&!h&&!d&&!m&&!y});return Q.jsxs("div",{"data-testid":"file-input-preview",className:"usa-file-input__preview","aria-hidden":"true",children:[Q.jsx("img",{id:t,"data-testid":"file-input-preview-image",src:s,alt:"",className:v,onError:u}),c]})},ePe=t=>t.replace(/[^a-z0-9]/g,function(e){const n=e.charCodeAt(0);return n===32?"-":n>=65&&n<=90?`img_${e.toLowerCase()}`:`__${n.toString(16).slice(-4)}`}),tPe=({name:t,id:e,dragText:n,chooseText:r,errorText:i,disabled:s,multiple:o,className:a,accept:l,onChange:c,onDrop:u,...h},d)=>{const m=A.useRef(null),[y,v]=A.useState(!1),[b,x]=A.useState(!1),[T,E]=A.useState([]),[C,I]=A.useState(!1);A.useEffect(()=>{if(typeof navigator>"u")return;const X=/rv:11.0/i.test(navigator==null?void 0:navigator.userAgent)||/Edge\/\d./i.test(navigator==null?void 0:navigator.userAgent);I(X)},[typeof navigator]),A.useImperativeHandle(d,()=>({input:m.current,clearFiles:()=>E([]),files:T}),[T]);const O=Ki("usa-file-input",{"usa-file-input--disabled":s},a),N=Ki("usa-file-input__target",{"usa-file-input--drag":y,"has-invalid-file":b}),U=o?"Drag files here or ":"Drag file here or ",F="choose from folder",H="This is not a valid file type.",W=[];if(T)for(let X=0;X<(T==null?void 0:T.length);X++){const te=ePe(T[parseInt(`${X}`)].name),D=`filePreview_${te}`;W.push(Q.jsx(J5e,{imageId:te,file:T[parseInt(`${X}`)]},D))}const z=Ki("usa-file-input__instructions",{"display-none":W.length>0}),V=W.length>1?`${W.length} files selected`:"Selected file",M=X=>{if(x(!1),l){const te=l.split(",");let D=!0;for(let $=0;$<X.dataTransfer.files.length;$+=1){const he=X.dataTransfer.files[parseInt(`${$}`)];if(D)for(let Se=0;Se<te.length;Se+=1){const fe=te[parseInt(`${Se}`)];if(D=he.name.indexOf(fe)>0||he.type.includes(fe.replace(/\*/g,"")),D)break}else break}D||(E([]),x(!0),X.preventDefault(),X.stopPropagation())}},K=()=>v(!0),j=()=>v(!1),q=X=>{M(X),v(!1),u&&u(X)},Y=X=>{var te,D,$,he;x(!1);const Se=[];if((D=(te=X.target)==null?void 0:te.files)!=null&&D.length){const fe=((he=($=X.target)==null?void 0:$.files)==null?void 0:he.length)||0;for(let $e=0;$e<fe;$e++){const Ze=X.target.files.item($e);Ze&&Se.push(Ze)}}E(Se),c&&c(X)};return Q.jsx("div",{"data-testid":"file-input",className:O,"aria-disabled":s,children:Q.jsxs("div",{"data-testid":"file-input-droptarget",className:N,onDragOver:K,onDragLeave:j,onDrop:q,children:[W.length>0&&Q.jsxs("div",{"data-testid":"file-input-preview-heading",className:"usa-file-input__preview-heading",children:[V," ",Q.jsxs("span",{className:"usa-file-input__choose",children:["Change file",W.length>1&&"s"]})]}),Q.jsxs("div",{"data-testid":"file-input-instructions",className:z,"aria-hidden":"true",children:[!C&&Q.jsx("span",{className:"usa-file-input__drag-text",children:n||U}),Q.jsx("span",{className:"usa-file-input__choose",children:r||F})]}),W,Q.jsx("div",{"data-testid":"file-input-box",className:"usa-file-input__box"}),b&&Q.jsx("div",{"data-testid":"file-input-error",className:"usa-file-input__accepted-files-message",children:i||H}),Q.jsx("input",{...h,ref:m,type:"file","data-testid":"file-input-input",name:t,id:e,className:"usa-file-input__input",disabled:s,onChange:Y,multiple:o,accept:l})]})})};A.forwardRef(tPe);const nPe=({id:t,name:e,className:n,inputRef:r,children:i,validationStatus:s,...o})=>{const a=Ki("usa-select",{"usa-input--error":s==="error","usa-input--success":s==="success"},n);return Q.jsx("select",{"data-testid":"Select",className:a,id:t,name:e,ref:r,...o,children:i})},rPe=t=>{const[e,n]=A.useState(t||!1),r=i=>{const s=i.target;return i&&s&&s.closest(".usa-modal")?s.hasAttribute("[data-close-modal]")||!!s.closest("[data-close-modal]"):!0};return{isOpen:e,toggleModal:(i,s)=>i&&!r(i)?(i.stopPropagation(),!1):(n(s===!0?!0:s===!1?!1:o=>!o),!0)}},iPe=()=>{var t;if(typeof document<"u"){const e=document.createElement("div");e.setAttribute("style","visibility: hidden; overflow: scroll; ms-overflow-style: scrollbar"),document.body.appendChild(e);const n=document.createElement("div");e.appendChild(n);const r=`${e.offsetWidth-n.offsetWidth}px`;return(t=e.parentNode)==null||t.removeChild(e),r}return""},sPe=({handleClose:t,...e})=>Q.jsx(oo,{"aria-label":"Close this window",...e,className:"usa-modal__close",onClick:t,"data-close-modal":!0,type:"button",children:Q.jsx(um.Close,{"aria-hidden":"true"})}),oPe=({modalId:t,className:e,children:n,handleClose:r,isLarge:i=!1,forceAction:s=!1,...o},a)=>{const l=Ki("usa-modal",{"usa-modal--lg":i},e);return Q.jsx("div",{...o,"data-testid":"modalWindow",className:l,ref:a,"data-force-action":s,
3505children:Q.jsxs("div",{className:"usa-modal__content",children:[Q.jsx("div",{className:"usa-modal__main",children:n}),!s&&Q.jsx(sPe,{"aria-controls":t,handleClose:r})]})})},aPe=A.forwardRef(oPe),lPe=({id:t,children:e,isVisible:n,forceAction:r,className:i,handleClose:s,...o},a)=>{const l=Ki("usa-modal-wrapper",{"is-visible":n,"is-hidden":!n},i);return Q.jsx("div",{...o,ref:a,id:t,className:l,role:"dialog",children:Q.jsx("div",{"data-testid":"modalOverlay",className:"usa-modal-overlay",onClick:r?void 0:s,"aria-controls":t,children:e})})},cPe=A.forwardRef(lPe),uPe=({id:t,children:e,isLarge:n=!1,forceAction:r=!1,modalRoot:i=".usa-modal-wrapper",renderToPortal:s=!0,isInitiallyOpen:o,...a},l)=>{const{isOpen:c,toggleModal:u}=rPe(o),[h,d]=A.useState(!1),m=A.useRef(),y=A.useRef(),v=A.useRef(null),b=`body > *:not(${i||".usa-modal-wrapper"}):not([aria-hidden])`,x="[data-modal-hidden]",T=U=>{u(U,!1)};A.useImperativeHandle(l,()=>({modalId:t,modalIsOpen:c,toggleModal:u}),[t,c]);const E=()=>{const{body:U}=document;U.style.paddingRight=y.current||"",U.classList.add("usa-js-modal--active"),document.querySelectorAll(b).forEach(F=>{F.setAttribute("aria-hidden","true"),F.setAttribute("data-modal-hidden","")}),r&&U.classList.add("usa-js-no-click")},C=()=>{const{body:U}=document;U.style.paddingRight=m.current||"",U.classList.remove("usa-js-modal--active"),U.classList.remove("usa-js-no-click"),document.querySelectorAll(x).forEach(F=>{F.removeAttribute("aria-hidden"),F.removeAttribute("data-modal-hidden")})};A.useEffect(()=>{const U=iPe(),F=window.getComputedStyle(document.body).getPropertyValue("padding-right")||"0px",H=`${parseInt(F.replace(/px/,""),10)+parseInt(U.replace(/px/,""),10)}px`;return m.current=F,y.current=H,d(!0),()=>{C()}},[]),A.useEffect(()=>{h&&(c===!0?E():c===!1&&C())},[c]);const I=a["aria-labelledby"],O=a["aria-describedby"];I||console.error(`${t} is missing aria-labelledby attribute`),O||console.error(`${t} is missing aria-describedby attribute`),delete a["aria-labelledby"],delete a["aria-describedby"];const N=Q.jsx(Nwe,{active:c,focusTrapOptions:{initialFocus:()=>{var U;return((U=v.current)==null?void 0:U.querySelector("[data-focus]"))||v.current||!1},escapeDeactivates:()=>r?!1:(T(),!0)},children:Q.jsx(cPe,{role:"dialog",id:t,"aria-labelledby":I,"aria-describedby":O,"data-force-action":r,isVisible:c,handleClose:T,forceAction:r,children:Q.jsx(aPe,{modalId:t,...a,ref:v,isLarge:n,forceAction:r,tabIndex:-1,handleClose:T,children:e})})});if(s){const U=document.getElementById("modal-root")||document.body;return ebe.createPortal(N,U)}else return N},fPe=A.forwardRef(uPe),hPe=({modalRef:t,children:e,opener:n,closer:r,...i})=>{var s;const o=l=>{if(!t||!t.current)return console.error("ModalRef is required"),!1;i.onClick&&i.onClick(l),n&&!r?t.current.toggleModal(l,!0):r&&!n?t.current.toggleModal(l,!1):t.current.toggleModal(l)},a={"data-close-modal":!0,"data-open-modal":!0};return n&&!r&&delete a["data-close-modal"],r&&!n&&delete a["data-open-modal"],Q.jsx(oo,{...i,...a,type:"button","aria-controls":(s=t==null?void 0:t.current)==null?void 0:s.modalId,onClick:o,children:e})};var M_={exports:{}},dPe=M_.exports,QL;function pPe(){return QL||(QL=1,(function(t,e){(function(n,r){r()})(dPe,function(){function n(c,u){return typeof u>"u"?u={autoBom:!1}:typeof u!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),u={autoBom:!u}),u.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(c.type)?new Blob(["\uFEFF",c],{type:c.type}):c}function r(c,u,h){var d=new XMLHttpRequest;d.open("GET",c),d.responseType="blob",d.onload=function(){l(d.response,u,h)},d.onerror=function(){console.error("could not download file")},d.send()}function i(c){var u=new XMLHttpRequest;u.open("HEAD",c,!1);try{u.send()}catch{}return 200<=u.status&&299>=u.status}function s(c){try{c.dispatchEvent(new MouseEvent("click"))}catch{var u=document.createEvent("MouseEvents");
3505u.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),c.dispatchEvent(u)}}var o=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof Yi=="object"&&Yi.global===Yi?Yi:void 0,a=o.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),l=o.saveAs||(typeof window!="object"||window!==o?function(){}:"download"in HTMLAnchorElement.prototype&&!a?function(c,u,h){var d=o.URL||o.webkitURL,m=document.createElement("a");u=u||c.name||"download",m.download=u,m.rel="noopener",typeof c=="string"?(m.href=c,m.origin===location.origin?s(m):i(m.href)?r(c,u,h):s(m,m.target="_blank")):(m.href=d.createObjectURL(c),setTimeout(function(){d.revokeObjectURL(m.href)},4e4),setTimeout(function(){s(m)},0))}:"msSaveOrOpenBlob"in navigator?function(c,u,h){if(u=u||c.name||"download",typeof c!="string")navigator.msSaveOrOpenBlob(n(c,h),u);else if(i(c))r(c,u,h);else{var d=document.createElement("a");d.href=c,d.target="_blank",setTimeout(function(){s(d)})}}:function(c,u,h,d){if(d=d||open("","_blank"),d&&(d.document.title=d.document.body.innerText="downloading..."),typeof c=="string")return r(c,u,h);var m=c.type==="application/octet-stream",y=/constructor/i.test(o.HTMLElement)||o.safari,v=/CriOS\/[\d]+/.test(navigator.userAgent);if((v||m&&y||a)&&typeof FileReader<"u"){var b=new FileReader;b.onloadend=function(){var E=b.result;E=v?E:E.replace(/^data:[^;]*;/,"data:attachment/file;"),d?d.location.href=E:location=E,d=null},b.readAsDataURL(c)}else{var x=o.URL||o.webkitURL,T=x.createObjectURL(c);d?d.location=T:location.href=T,d=null,setTimeout(function(){x.revokeObjectURL(T)},4e4)}});o.saveAs=l.saveAs=l,t.exports=l})})(M_)),M_.exports}var gPe=pPe();const mPe=({fireId:t,fireLatestObservationTimestamp:e,featuresApiEndpoint:n,onClose:r})=>{const[i,s]=A.useState("geojson"),[o,a]=A.useState({perimeter:!0,fireline:!1,firepixels:!1}),[l,c]=A.useState(!1),u=A.useRef(null),h=l||!Object.values(o).some(Boolean);A.useEffect(()=>{const m=y=>u.current&&!u.current.contains(y.target)&&r();return document.addEventListener("mousedown",m),()=>document.removeEventListener("mousedown",m)},[r]);const d=async()=>{c(!0);const m=`${n}/collections`,y=[o.perimeter&&"public.eis_fire_lf_perimeter_nrt",o.fireline&&"public.eis_fire_lf_fireline_nrt",o.firepixels&&"public.eis_fire_lf_newfirepix_nrt"].filter(Boolean),v={"public.eis_fire_lf_perimeter_nrt":"fire-perimeters","public.eis_fire_lf_fireline_nrt":"active-fire-fronts","public.eis_fire_lf_newfirepix_nrt":"fire-detections"},b=new W0e,x=e.replace(/[:\/]/g,"_");for(const T of y){const E=v[T];try{const C=await LQ(m,T,t,i);b.file(`fire-${t}-${E}-${x}.${i}`,C)}catch(C){console.error(`Failed to download ${T}`,C)}}try{const T=await b.generateAsync({type:"blob"});gPe.saveAs(T,`fire-${t}-${x}-data.zip`)}catch(T){console.error("ZIP generation failed",T)}c(!1),r()};return Q.jsxs("div",{className:"download-menu position-absolute top-2 right-0",ref:u,children:[Q.jsxs("fieldset",{className:"margin-bottom-2",children:[Q.jsx("legend",{className:"font-sans-3xs text-base-dark",children:"Select layers"}),Q.jsx(MS,{id:"dl-perimeter",label:"Fire Perimeters",checked:o.perimeter,onChange:()=>a(m=>({...m,perimeter:!m.perimeter}))}),Q.jsx(MS,{id:"dl-fireline",label:"Active Fire Fronts",checked:o.fireline,onChange:()=>a(m=>({...m,fireline:!m.fireline}))}),Q.jsx(MS,{id:"dl-firepixels",label:"Fire Detections",checked:o.firepixels,onChange:()=>a(m=>({...m,firepixels:!m.firepixels}))})]}),Q.jsx("label",{className:"font-sans-3xs text-base-dark margin-bottom-05 display-block",children:"Format"}),Q.jsxs(nPe,{id:"download-format",className:"width-full",value:i,onChange:m=>s(m.target.value),children:[Q.jsx("option",{value:"geojson",children:"GeoJSON"}),Q.jsx("option",{value:"csv",children:"CSV"})]}),Q.jsx(oo,{type:"button",className:"width-full margin-top-2",disabled:h,onClick:d,title:"Download event layers",children:l?Q.jsxs("span",{className:"display-flex flex-align-center flex-justify-center",children:[Q.jsx(fA,{size:16,className:"spin margin-right-1"}),"Downloading…"]}):"Download"})]})},hX=({onBack:t,isMobile:e})=>{const n=Je.use.selectedEventId(),r=Je.use.firePerimeters(),i=Je.use.firePerimetersLoading(),s=Je.use.windLayerType(),o=Je.use.setWindLayerType(),a=Je.use.show3DMap(),l=Je.use.toggle3DMap(),c=Je.use.layerOpacity(),u=Je.use.featuresApiEndpoint(),[h,d]=A.useState(!1),m=A.useRef(null),y=Je.use.setLayerOpacity(),v=K=>{const j=Array.isArray(K)?K[0]:K;y(j)};A.useEffect(()=>{const K=j=>{m.current&&!m.current.contains(j.target)&&d(!1)};return document.addEventListener("mousedown",K),()=>document.removeEventListener("mousedown",K)},[]);const b=A.useMemo(()=>{var K;return!n||!((K=r==null?void 0:r.features)!=null&&K.length)?null:r.features[0]},[n,r]),x=A.useMemo(()=>b?QM(b):null,[b]);if(i)return Q.jsxs("div",{className:"padding-2 display-flex flex-column flex-align-center flex-justify-center",children:[Q.jsx(fA,{size:16,className:"spin margin-bottom-1"}),Q.jsx("p",{className:"font-sans-3xs text-base-dark",children:"Loading event details, please wait…"})]});if(!b||!x)return Q.jsxs("div",{className:"padding-2 display-flex flex-column flex-align-center flex-justify-center",children:[Q.jsx("p",{children:"No event selected"}),Q.jsx("button",{className:"usa-button",onClick:t,children:"Back to list"})]});const T=a2e(b),E=l2e(b),C=x.isactive===1,I=x.name||`Fire Event ${T}`,O=x.t?new Date(x.t):null,N=K=>K?Lo(K,"MMM d, yyyy"):"Unknown",U=x.farea?Number(x.farea).toFixed(2):"0.00",F=x.duration?x.duration:0,H=x.meanfrp?Number(x.meanfrp).toFixed(2):"0.00",W=x.fperim?Number(x.fperim).toFixed(2):"0.00",z=x.pixden?
3505Number(x.pixden).toFixed(2):"0.00",V=x.n_newpixels||0,M=x.n_pixels||0;return Q.jsxs("div",{className:"height-full display-flex flex-column bg-white",children:[!e&&Q.jsx("div",{className:"padding-y-2 padding-x-3 border-bottom border-base-lighter display-flex flex-row flex-align-center",children:Q.jsxs("button",{className:"usa-button usa-button--unstyled text-base-dark display-flex flex-align-center",onClick:t,children:[Q.jsx("svg",{className:"margin-right-1",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Q.jsx("path",{d:"M20 11H7.83L13.42 5.41L12 4L4 12L12 20L13.41 18.59L7.83 13H20V11Z",fill:"currentColor"})}),Q.jsx("span",{className:"font-body font-weight-regular font-sans-3xs text-underline",children:"Back to all fire events"})]})}),Q.jsxs("div",{className:"tablet:padding-x-3 padding-y-2 overflow-auto flex-fill",children:[Q.jsxs("div",{className:"display-flex flex-justify flex-align-center margin-bottom-1",children:[Q.jsx("h1",{className:`font-body font-weight-700 font-sans-lg margin-0 ${C?"text-error":"text-base-ink"}`,children:I}),!e&&Q.jsxs("div",{className:"display-flex position-relative margin-left-2",ref:m,children:[Q.jsx("button",{className:"usa-button usa-button--unstyled","aria-label":"Download fire event data",onClick:()=>d(K=>!K),children:Q.jsx(um.FileDownload,{size:3,color:"#71767A"})}),h&&Q.jsx(mPe,{fireId:T,fireLatestObservationTimestamp:E,featuresApiEndpoint:u,onClose:()=>d(!1)})]})]}),Q.jsx("div",{className:"margin-bottom-2",children:Q.jsxs("span",{className:"font-body font-weight-regular font-sans-3xs text-base-dark",children:["Observations for ",N(O)]})}),Q.jsxs("div",{className:"display-flex flex-row margin-bottom-2 grid-gap-3",children:[Q.jsxs("div",{className:"border-1px border-base-lighter radius-md padding-y-1 padding-x-2 flex-fill margin-right-2",children:[Q.jsx("h3",{className:"margin-0 margin-bottom-1 font-body font-weight-bold font-sans-3xs text-base",children:"Area"}),Q.jsxs("div",{className:"margin-0 font-body font-weight-bold font-sans-lg text-base-ink",children:[Q.jsx("span",{children:U})," ",Q.jsx("span",{className:"font-sans-xs",children:"km²"})]})]}),Q.jsxs("div",{className:"border-1px border-base-lighter radius-md padding-y-1 padding-x-2 flex-fill",children:[Q.jsx("h3",{className:"margin-0 margin-bottom-1 font-body font-weight-bold font-sans-3xs text-base",children:"Duration"}),Q.jsxs("div",{className:"margin-0 font-body font-weight-bold font-sans-lg text-base-ink",children:[Q.jsx("span",{children:F})," ",Q.jsx("span",{className:"font-sans-xs",children:"days"})]})]})]}),Q.jsxs("div",{className:"display-flex flex-row margin-bottom-2 grid-gap-3",children:[Q.jsxs("div",{className:"border-1px border-base-lighter radius-md padding-y-1 padding-x-2 flex-fill margin-right-2",children:[Q.jsxs("h3",{className:"margin-0 margin-bottom-1 font-body font-weight-bold font-sans-3xs text-base display-flex flex-align-center",children:["Mean FRP",Q.jsx("span",{className:"margin-left-1 text-base",children:Q.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",children:[Q.jsx("path",{d:"M8 0C3.6 0 0 3.6 0 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8zm0 14c-3.3 0-6-2.7-6-6s2.7-6 6-6 6 2.7 6 6-2.7 6-6 6z"}),Q.jsx("path",{d:"M9 4H7v5h2V4zm0 6H7v2h2v-2z"})]})})]}),Q.jsxs("div",{className:"margin-0 font-body font-weight-bold font-sans-lg text-base-ink",children:[Q.jsx("span",{children:H})," ",Q.jsx("span",{className:"font-sans-xs",children:"MW"})]})]}),Q.jsxs("div",{className:"border-1px border-base-lighter radius-md padding-y-1 padding-x-2 flex-fill",children:[Q.jsx("h3",{className:"margin-0 margin-bottom-1 font-body font-weight-bold font-sans-3xs text-base",children:"Perimeter"}),Q.jsxs("div",{className:"margin-0 font-body font-weight-bold font-sans-lg text-base-ink",children:[Q.jsx("span",{children:W})," ",Q.jsx("span",{className:"font-sans-xs",children:"km"})]})]})]}),Q.jsx("div",{className:"border-top-0",children:Q.jsx("table",{className:"usa-table usa-table--borderless width-full margin-bottom-0 border-base-darker",children:Q.jsxs("tbody",{children:[Q.jsxs("tr",{className:"border-base-darker",children:[Q.jsx("th",{scope:"row",className:"font-body font-weight-regular font-sans-3xs text-base-ink padding-y-2 padding-x-0 border-base-darker border-top-0",children:"Pixel density"}),Q.jsxs("td",{className:"font-body font-weight-regular font-sans-3xs text-base-ink text-right padding-y-2 padding-x-0 border-base-darker border-top-0",children:[z," px/km²"]})]}),Q.jsxs("tr",{className:"border-base-darker",children:[Q.jsx("th",{scope:"row",className:"font-body font-weight-regular font-sans-3xs text-base-ink padding-y-2 padding-x-0 border-base-darker",children:"New pixels"}),Q.jsx("td",{className:"font-body font-weight-regular font-sans-3xs text-base-ink text-right padding-y-2 padding-x-0 border-base-darker",children:V})]}),Q.jsxs("tr",{className:"border-base-darker",children:[Q.jsx("th",{scope:"row",className:"font-body font-weight-regular font-sans-3xs text-base-ink padding-y-2 padding-x-0 border-base-darker",children:"Total pixels"}),Q.jsx("td",{className:"font-body font-weight-regular font-sans-3xs text-base-ink text-right padding-y-2 padding-x-0 border-base-darker",children:M})]})]})})}),Q.jsxs("div",{className:"margin-top-0 margin-bottom-1 border-bottom-1px border-base-lighter padding-y-2",children:[Q.jsx("h3",{className:"margin-top-0 margin-bottom-1 font-weight-700 font-sans-2xs text-base-dark",children:"Fire spread"}),Q.jsxs("div",{className:"wildfire-explorer__legend display-flex flex-justify flex-wrap",children:[Q.jsxs("div",{className:"wildfire-explorer__legend-item display-flex flex-align-center margin-bottom-0",children:[Q.jsx("div",{className:"width-3 height-3 bg-base-dark margin-right-1"}),Q.jsx("span",{className:"font-body font-weight-regular font-sans-3xs text-base-dark",children:"Previous"})]}),Q.jsxs("div",{className:"wildfire-explorer__legend-item display-flex flex-align-center margin-bottom-0",children:[Q.jsx("div",{className:"width-3 height-3 bg-error margin-right-1"}),Q.jsx("span",{className:"font-body font-weight-regular font-sans-3xs text-base-dark",children:"Current"})]}),Q.jsxs("div",{className:"wildfire-explorer__legend-item display-flex flex-align-center margin-bottom-0",children:[Q.jsx("div",{className:"width-3 height-3 bg-warning margin-right-1"}),Q.jsx("span",{className:"font-body font-weight-regular font-sans-3xs text-base-dark",children:"Perimeter"})]})]}),!e&&Q.jsx("div",{className:"margin-top-2",children:Q.jsxs("div",{className:"display-flex flex-align-center",children:[Q.jsx("label",{className:"font-body font-weight-bold font-sans-3xs text-base-ink margin-right-2",children:"Opacity"}),Q.jsxs("div",{className:"display-flex flex-align-center flex-fill",children:[Q.jsx(kg,{className:"opacity-slider flex-fill",thumbClassName:"thumb",trackClassName:"track",min:0,max:100,value:c,onChange:v}),Q.jsxs("span",{className:"slider-value margin-left-2 text-base-dark border-1px border-base-lighter padding-x-2 padding-y-1",children:[c,"%"]})]})]})})]}),!e&&Q.jsx("div",{className:"margin-top-1 padding-top-1",children:Q.jsxs("div",{className:"display-flex flex-column",children:[Q.jsx("div",{className:"margin-bottom-2",children:Q.jsxs("div",{className:"display-flex flex-align-center flex-justify",children:[Q.jsxs("label",{className:"usa-checkbox margin-0",children:[Q.jsx("input",{className:"usa-checkbox__input",type:"checkbox",checked:s!==null,onChange:K=>o(K.target.checked?"wind":null)}),Q.jsx("span",{className:"usa-checkbox__label font-ui font-sans-2xs text-base-ink margin-top-0",children:"Wind direction"})]}),Q.jsxs("div",{className:"display-flex flex-align-center",style:{opacity:s===null?.5:1,pointerEvents:s===null?"none":"auto"},children:[Q.jsx(D_e,{active:s==="wind",onToggle:K=>o(K?"wind":"grid"),barHeight:20,barWidth:40,handleSize:12,barBackgroun
3505dColor:"#e0e0e0",barBackgroundColorActive:"#1a6baa",handleBackgroundColor:"#ffffff",handleBorderRadius:10,barBorderRadius:10},s===null?"off":s),Q.jsx("span",{className:"font-sans-3xs text-base margin-left-1 text-base-dark",children:"Animate"})]})]})}),Q.jsxs("label",{className:"usa-checkbox",children:[Q.jsx("input",{className:"usa-checkbox__input",type:"checkbox",name:"3d-map",checked:a,onChange:l}),Q.jsx("span",{className:"usa-checkbox__label font-ui font-weight-regular font-sans-2xs text-base-ink",children:"3D map"})]})]})})]})]})};function dX(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(n=dX(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function un(){for(var t,e,n=0,r="",i=arguments.length;n<i;n++)(t=arguments[n])&&(e=dX(t))&&(r&&(r+=" "),r+=e);return r}var RS,XL;function Ds(){if(XL)return RS;XL=1;var t=Array.isArray;return RS=t,RS}var kS,YL;function pX(){if(YL)return kS;YL=1;var t=typeof Yi=="object"&&Yi&&Yi.Object===Object&&Yi;return kS=t,kS}var NS,KL;function Ll(){if(KL)return NS;KL=1;var t=pX(),e=typeof self=="object"&&self&&self.Object===Object&&self,n=t||e||Function("return this")();return NS=n,NS}var DS,GL;function Oy(){if(GL)return DS;GL=1;var t=Ll(),e=t.Symbol;return DS=e,DS}var BS,ZL;function vPe(){if(ZL)return BS;ZL=1;var t=Oy(),e=Object.prototype,n=e.hasOwnProperty,r=e.toString,i=t?t.toStringTag:void 0;function s(o){var a=n.call(o,i),l=o[i];try{o[i]=void 0;var c=!0}catch{}var u=r.call(o);return c&&(a?o[i]=l:delete o[i]),u}return BS=s,BS}var LS,JL;function yPe(){if(JL)return LS;JL=1;var t=Object.prototype,e=t.toString;function n(r){return e.call(r)}return LS=n,LS}var FS,e9;function Uc(){if(e9)return FS;e9=1;var t=Oy(),e=vPe(),n=yPe(),r="[object Null]",i="[object Undefined]",s=t?t.toStringTag:void 0;function o(a){return a==null?a===void 0?i:r:s&&s in Object(a)?e(a):n(a)}return FS=o,FS}var US,t9;function zc(){if(t9)return US;t9=1;function t(e){return e!=null&&typeof e=="object"}return US=t,US}var zS,n9;function Bm(){if(n9)return zS;n9=1;var t=Uc(),e=zc(),n="[object Symbol]";function r(i){return typeof i=="symbol"||e(i)&&t(i)==n}return zS=r,zS}var jS,r9;function t6(){if(r9)return jS;r9=1;var t=Ds(),e=Bm(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function i(s,o){if(t(s))return!1;var a=typeof s;return a=="number"||a=="symbol"||a=="boolean"||s==null||e(s)?!0:r.test(s)||!n.test(s)||o!=null&&s in Object(o)}return jS=i,jS}var VS,i9;function df(){if(i9)return VS;i9=1;function t(e){var n=typeof e;return e!=null&&(n=="object"||n=="function")}return VS=t,VS}var WS,s9;function n6(){if(s9)return WS;s9=1;var t=Uc(),e=df(),n="[object AsyncFunction]",r="[object Function]",i="[object GeneratorFunction]",s="[object Proxy]";function o(a){if(!e(a))return!1;var l=t(a);return l==r||l==i||l==n||l==s}return WS=o,WS}var $S,o9;function bPe(){if(o9)return $S;o9=1;var t=Ll(),e=t["__core-js_shared__"];return $S=e,$S}var HS,a9;function _Pe(){if(a9)return HS;a9=1;
vendor: 5,738 bytes, line 3505
3505var t=bPe(),e=(function(){var r=/[^.]+$/.exec(t&&t.keys&&t.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""})();function n(r){return!!e&&e in r}return HS=n,HS}var qS,l9;function gX(){if(l9)return qS;l9=1;var t=Function.prototype,e=t.toString;function n(r){if(r!=null){try{return e.call(r)}catch{}try{return r+""}catch{}}return""}return qS=n,qS}var QS,c9;function wPe(){if(c9)return QS;c9=1;var t=n6(),e=_Pe(),n=df(),r=gX(),i=/[\\^$.*+?()[\]{}|]/g,s=/^\[object .+?Constructor\]$/,o=Function.prototype,a=Object.prototype,l=o.toString,c=a.hasOwnProperty,u=RegExp("^"+l.call(c).replace(i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function h(d){if(!n(d)||e(d))return!1;var m=t(d)?u:s;return m.test(r(d))}return QS=h,QS}var XS,u9;function xPe(){if(u9)return XS;u9=1;function t(e,n){return e==null?void 0:e[n]}return XS=t,XS}var YS,f9;function yd(){if(f9)return YS;f9=1;var t=wPe(),e=xPe();function n(r,i){var s=e(r,i);return t(s)?s:void 0}return YS=n,YS}var KS,h9;function hA(){if(h9)return KS;h9=1;var t=yd(),e=t(Object,"create");return KS=e,KS}var GS,d9;function APe(){if(d9)return GS;d9=1;var t=hA();function e(){this.__data__=t?t(null):{},this.size=0}return GS=e,GS}var ZS,p9;function EPe(){if(p9)return ZS;p9=1;function t(e){var n=this.has(e)&&delete this.__data__[e];return this.size-=n?1:0,n}return ZS=t,ZS}var JS,g9;function SPe(){if(g9)return JS;g9=1;var t=hA(),e="__lodash_hash_undefined__",n=Object.prototype,r=n.hasOwnProperty;function i(s){var o=this.__data__;if(t){var a=o[s];return a===e?void 0:a}return r.call(o,s)?o[s]:void 0}return JS=i,JS}var eT,m9;function TPe(){if(m9)return eT;m9=1;var t=hA(),e=Object.prototype,n=e.hasOwnProperty;function r(i){var s=this.__data__;return t?s[i]!==void 0:n.call(s,i)}return eT=r,eT}var tT,v9;function CPe(){if(v9)return tT;v9=1;var t=hA(),e="__lodash_hash_undefined__";function n(r,i){var s=this.__data__;return this.size+=this.has(r)?0:1,s[r]=t&&i===void 0?e:i,this}return tT=n,tT}var nT,y9;function PPe(){if(y9)return nT;y9=1;var t=APe(),e=EPe(),n=SPe(),r=TPe(),i=CPe();function s(o){var a=-1,l=o==null?0:o.length;for(this.clear();++a<l;){var c=o[a];this.set(c[0],c[1])}}return s.prototype.clear=t,s.prototype.delete=e,s.prototype.get=n,s.prototype.has=r,s.prototype.set=i,nT=s,nT}var rT,b9;function IPe(){if(b9)return rT;b9=1;function t(){this.__data__=[],this.size=0}return rT=t,rT}var iT,_9;function r6(){if(_9)return iT;_9=1;function t(e,n){return e===n||e!==e&&n!==n}return iT=t,iT}var sT,w9;function dA(){if(w9)return sT;w9=1;var t=r6();function e(n,r){for(var i=n.length;i--;)if(t(n[i][0],r))return i;return-1}return sT=e,sT}var oT,x9;function OPe(){if(x9)return oT;x9=1;var t=dA(),e=Array.prototype,n=e.splice;function r(i){var s=this.__data__,o=t(s,i);if(o<0)return!1;var a=s.length-1;return o==a?s.pop():n.call(s,o,1),--this.size,!0}return oT=r,oT}var aT,A9;function MPe(){if(A9)return aT;A9=1;var t=dA();function e(n){var r=this.__data__,i=t(r,n);return i<0?void 0:r[i][1]}return aT=e,aT}var lT,E9;function RPe(){if(E9)return lT;E9=1;var t=dA();function e(n){return t(this.__data__,n)>-1}return lT=e,lT}var cT,S9;function kPe(){if(S9)return cT;S9=1;var t=dA();function e(n,r){var i=this.__data__,s=t(i,n);return s<0?(++this.size,i.push([n,r])):i[s][1]=r,this}return cT=e,cT}var uT,T9;function pA(){if(T9)return uT;T9=1;var t=IPe(),e=OPe(),n=MPe(),r=RPe(),i=kPe();function s(o){var a=-1,l=o==null?0:o.length;for(this.clear();++a<l;){var c=o[a];this.set(c[0],c[1])}}return s.prototype.clear=t,s.prototype.delete=e,s.prototype.get=n,s.prototype.has=r,s.prototype.set=i,uT=s,uT}var fT,C9;function i6(){if(C9)return fT;C9=1;var t=yd(),e=Ll(),n=t(e,"Map");return fT=n,fT}var hT,P9;function NPe(){if(P9)return hT;P9=1;var t=PPe(),e=pA(),n=i6();function r(){this.size=0,this.__data__={hash:new t,map:new(n||e),string:new t}}return hT=r,hT}var dT,I9;function DPe(){if(I9)return dT;I9=1;function t(e){var n=typeof e;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?e!=="__proto__":e===null}return dT=t,dT}var pT,O9;function gA(){if(O9)return pT;O9=1;var t=DPe();function e(n,r){var i=n.__data__;return t(r)?i[typeof r=="string"?"string":"hash"]:i.map}return pT=e,pT}var gT,M9;function BPe(){if(M9)return gT;M9=1;var t=gA();function e(n){var r=t(this,n).delete(n);return this.size-=r?1:0,r}return gT=e,gT}var mT,R9;function LPe(){if(R9)return mT;R9=1;var t=gA();function e(n){return t(this,n).get(n)}return mT=e,mT}var vT,k9;function FPe(){if(k9)return vT;k9=1;var t=gA();function e(n){return t(this,n).has(n)}return vT=e,vT}var yT,N9;function UPe(){if(N9)return yT;N9=1;var t=gA();function e(n,r){var i=t(this,n),s=i.size;return i.set(n,r),this.size+=i.size==s?0:1,this}return yT=e,yT}var bT,D9;function s6(){if(D9)return bT;D9=1;var t=NPe(),e=BPe(),n=LPe(),r=FPe(),i=UPe();function s(o){var a=-1,l=o==null?0:o.length;for(this.clear();++a<l;){var c=o[a];this.set(c[0],c[1])}}return s.prototype.clear=t,s.prototype.delete=e,s.prototype.get=n,s.prototype.has=r,s.prototype.set=i,bT=s,bT}var _T,B9;function mX(){if(B9)return _T;B9=1;var t=s6(),e="Expected a function";function n(r,i){if(typeof r!="function"||i!=null&&typeof i!="function")throw new TypeError(e);var s=function(){var o=arguments,a=i?i.apply(this,o):o[0],l=s.cache;if(l.has(a))return l.get(a);var c=r.apply(this,o);return s.cache=l.set(a,c)||l,c};return s.cache=new(n.Cache||t),s}return n.Cache=t,_T=n,_T}var wT,L9;function zPe(){if(L9)return wT;L9=1;var t=mX(),e=500;function n(r){var i=t(r,function(o){return s.size===e&&s.clear(),o}),s=i.cache;return i}return wT=n,wT}var xT,F9;function jPe(){if(F9)return xT;F9=1;var t=zPe(),e=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n=/\\(\\)?/g,r=t(function(i){var s=[];
vendor: 7,190 bytes, lines 3505-3513
3505return i.charCodeAt(0)===46&&s.push(""),i.replace(e,function(o,a,l,c){s.push(l?c.replace(n,"$1"):a||o)}),s});return xT=r,xT}var AT,U9;function o6(){if(U9)return AT;U9=1;function t(e,n){for(var r=-1,i=e==null?0:e.length,s=Array(i);++r<i;)s[r]=n(e[r],r,e);return s}return AT=t,AT}var ET,z9;function VPe(){if(z9)return ET;z9=1;var t=Oy(),e=o6(),n=Ds(),r=Bm(),i=t?t.prototype:void 0,s=i?i.toString:void 0;function o(a){if(typeof a=="string")return a;if(n(a))return e(a,o)+"";if(r(a))return s?s.call(a):"";var l=a+"";return l=="0"&&1/a==-1/0?"-0":l}return ET=o,ET}var ST,j9;function vX(){if(j9)return ST;j9=1;var t=VPe();function e(n){return n==null?"":t(n)}return ST=e,ST}var TT,V9;function yX(){if(V9)return TT;V9=1;var t=Ds(),e=t6(),n=jPe(),r=vX();function i(s,o){return t(s)?s:e(s,o)?[s]:n(r(s))}return TT=i,TT}var CT,W9;function mA(){if(W9)return CT;W9=1;var t=Bm();function e(n){if(typeof n=="string"||t(n))return n;var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}return CT=e,CT}var PT,$9;function a6(){if($9)return PT;$9=1;var t=yX(),e=mA();function n(r,i){i=t(i,r);for(var s=0,o=i.length;r!=null&&s<o;)r=r[e(i[s++])];return s&&s==o?r:void 0}return PT=n,PT}var IT,H9;function bX(){if(H9)return IT;H9=1;var t=a6();function e(n,r,i){var s=n==null?void 0:t(n,r);return s===void 0?i:s}return IT=e,IT}var WPe=bX();const jo=fn(WPe);var OT,q9;function $Pe(){if(q9)return OT;q9=1;function t(e){return e==null}return OT=t,OT}var HPe=$Pe();const _n=fn(HPe);var MT,Q9;function qPe(){if(Q9)return MT;Q9=1;var t=Uc(),e=Ds(),n=zc(),r="[object String]";function i(s){return typeof s=="string"||!e(s)&&n(s)&&t(s)==r}return MT=i,MT}var QPe=qPe();const rd=fn(QPe);var XPe=n6();const rn=fn(XPe);var YPe=df();const Lm=fn(YPe);var RT={exports:{}},En={};/**
3506 * @license React
3507 * react-is.production.min.js
3508 *
3509 * Copyright (c) Facebook, Inc. and its affiliates.
3510 *
3511 * This source code is licensed under the MIT license found in the
3512 * LICENSE file in the root directory of this source tree.
3513 */var X9;function KPe(){if(X9)return En;X9=1;var t=Symbol.for("react.element"),e=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),o=Symbol.for("react.context"),a=Symbol.for("react.server_context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen"),y;y=Symbol.for("react.module.reference");function v(b){if(typeof b=="object"&&b!==null){var x=b.$$typeof;switch(x){case t:switch(b=b.type,b){case n:case i:case r:case c:case u:return b;default:switch(b=b&&b.$$typeof,b){case a:case o:case l:case d:case h:case s:return b;default:return x}}case e:return x}}}return En.ContextConsumer=o,En.ContextProvider=s,En.Element=t,En.ForwardRef=l,En.Fragment=n,En.Lazy=d,En.Memo=h,En.Portal=e,En.Profiler=i,En.StrictMode=r,En.Suspense=c,En.SuspenseList=u,En.isAsyncMode=function(){return!1},En.isConcurrentMode=function(){return!1},En.isContextConsumer=function(b){return v(b)===o},En.isContextProvider=function(b){return v(b)===s},En.isElement=function(b){return typeof b=="object"&&b!==null&&b.$$typeof===t},En.isForwardRef=function(b){return v(b)===l},En.isFragment=function(b){return v(b)===n},En.isLazy=function(b){return v(b)===d},En.isMemo=function(b){return v(b)===h},En.isPortal=function(b){return v(b)===e},En.isProfiler=function(b){return v(b)===i},En.isStrictMode=function(b){return v(b)===r},En.isSuspense=function(b){return v(b)===c},En.isSuspenseList=function(b){return v(b)===u},En.isValidElementType=function(b){return typeof b=="string"||typeof b=="function"||b===n||b===i||b===r||b===c||b===u||b===m||typeof b=="object"&&b!==null&&(b.$$typeof===d||b.$$typeof===h||b.$$typeof===s||b.$$typeof===o||b.$$typeof===l||b.$$typeof===y||b.getModuleId!==void 0)},En.typeOf=v,En}var Y9;function GPe(){return Y9||(Y9=1,RT.exports=KPe()),RT.exports}var ZPe=GPe(),kT,K9;function _X(){if(K9)return kT;K9=1;var t=Uc(),e=zc(),n="[object Number]";function r(i){return typeof i=="number"||e(i)&&t(i)==n}return kT=r,kT}var NT,G9;function JPe(){if(G9)return NT;G9=1;var t=_X();function e(n){return t(n)&&n!=+n}return NT=e,NT}var eIe=JPe();const My=fn(eIe);var tIe=_X();const nIe=fn(tIe);var Ta=function(e){return e===0?0:e>0?1:-1},Mh=function(e){return rd(e)&&e.indexOf("%")===e.length-1},dt=function(e){return nIe(e)&&!My(e)},rIe=function(e){return _n(e)},Xr=function(e){return dt(e)||rd(e)},iIe=0,vA=function(e){var n=++iIe;return"".concat(e||"").concat(n)},id=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!dt(e)&&!rd(e))return r;var s;if(Mh(e)){var o=e.indexOf("%");s=n*parseFloat(e.slice(0,o))/100}else s=+e;return My(s)&&(s=r),i&&s>n&&(s=n),s},Vu=function(e){if(!e)return null;var n=Object.keys(e);return n&&n.length?e[n[0]]:null},sIe=function(e){if(!Array.isArray(e))return!1;for(var n=e.length,r={},i=0;i<n;i++)if(!r[e[i]])r[e[i]]=!0;else return!0;return!1},ag=function(e,n){return dt(e)&&dt(n)?function(r){return e+r*(n-e)}:function(){return n}};function dI(t,e,n){return!t||!t.length?null:t.find(function(r){return r&&(typeof e=="function"?e(r):jo(r,e))===n})}var oIe=function(e,n){return dt(e)&&dt(n)?e-n:rd(e)&&rd(n)?e.localeCompare(n):e instanceof Date&&n instanceof Date?e.getTime()-n.getTime():String(e).localeCompare(String(n))};function Ng(t,e){for(var n in t)if({}.hasOwnProperty.call(t,n)&&(!{}.hasOwnProperty.call(e,n)||t[n]!==e[n]))return!1;for(var r in e)if({}.hasOwnProperty.call(e,r)&&!{}.hasOwnProperty.call(t,r))return!1;return!0}function pI(t){"@babel/helpers - typeof";return pI=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},pI(t)}var aIe=["viewBox","children"],lIe=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRen
3513dering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"],Z9=["points","pathLength"],DT={svg:aIe,polygon:Z9,polyline:Z9},l6=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDrag
3513Capture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"],Rw=function(e,n){if(!e||typeof e=="function"||typeof e=="boolean")return null;var r=e;if(A.isValidElement(e)&&(r=e.props),!Lm(r))return null;var i={};return Object.keys(r).forEach(function(s){l6.includes(s)&&(i[s]=n||function(o){return r[s](r,o)})}),i},cIe=function(e,n,r){return function(i){return e(n,r,i),null}},kw=function(e,n,r){if(!Lm(e)||pI(e)!=="object")return null;var i=null;return Object.keys(e).forEach(function(s){var o=e[s];l6.includes(s)&&typeof o=="function"&&(i||(i={}),i[s]=cIe(o,n,r))}),i},uIe=["children"],fIe=["children"];function J9(t,e){if(t==null)return{};var n=hIe(t,e),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(i=0;i<s.length;i++)r=s[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function hIe(t,e){if(t==null)return{};var n={};for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){if(e.indexOf(r)>=0)continue;n[r]=t[r]}return n}var eF={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart",contextmenu:"onContextMenu",dblclick:"onDoubleClick"},Rc=function(e){return typeof e=="string"?e:e?e.displayName||e.name||"Component":""},tF=null,BT=null,c6=function t(e){if(e===tF&&Array.isArray(BT))return BT;var n=[];return A.Children.forEach(e,function(r){_n(r)||(ZPe.isFragment(r)?n=n.concat(t(r.props.children)):n.push(r))}),BT=n,tF=e,n};function Pa(t,e){var n=[],r=[];return Array.isArray(e)?r=e.map(function(i){return Rc(i)}):r=[Rc(e)],c6(t).forEach(function(i){var s=jo(i,"type.displayName")||jo(i,"type.name");r.indexOf(s)!==-1&&n.push(i)}),n}function no(t,e){var n=Pa(t,e);return n&&n[0]}var nF=function(e){if(!e||!e.props)return!1;var n=e.props,r=n.width,i=n.height;return!(!dt(r)||r<=0||!dt(i)||i<=0)},dIe=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],pIe=function(e){return e&&e.type&&rd(e.type)&&dIe.indexOf(e.type)>=0}
vendor: 4,694 bytes, line 3513
3513,gIe=function(e,n,r,i){var s,o=(s=DT==null?void 0:DT[i])!==null&&s!==void 0?s:[];return n.startsWith("data-")||!rn(e)&&(i&&o.includes(n)||lIe.includes(n))||r&&l6.includes(n)},bn=function(e,n,r){if(!e||typeof e=="function"||typeof e=="boolean")return null;var i=e;if(A.isValidElement(e)&&(i=e.props),!Lm(i))return null;var s={};return Object.keys(i).forEach(function(o){var a;gIe((a=i)===null||a===void 0?void 0:a[o],o,n,r)&&(s[o]=i[o])}),s},gI=function t(e,n){if(e===n)return!0;var r=A.Children.count(e);if(r!==A.Children.count(n))return!1;if(r===0)return!0;if(r===1)return rF(Array.isArray(e)?e[0]:e,Array.isArray(n)?n[0]:n);for(var i=0;i<r;i++){var s=e[i],o=n[i];if(Array.isArray(s)||Array.isArray(o)){if(!t(s,o))return!1}else if(!rF(s,o))return!1}return!0},rF=function(e,n){if(_n(e)&&_n(n))return!0;if(!_n(e)&&!_n(n)){var r=e.props||{},i=r.children,s=J9(r,uIe),o=n.props||{},a=o.children,l=J9(o,fIe);return i&&a?Ng(s,l)&&gI(i,a):!i&&!a?Ng(s,l):!1}return!1},iF=function(e,n){var r=[],i={};return c6(e).forEach(function(s,o){if(pIe(s))r.push(s);else if(s){var a=Rc(s.type),l=n[a]||{},c=l.handler,u=l.once;if(c&&(!u||!i[a])){var h=c(s,a,o);r.push(h),i[a]=!0}}}),r},mIe=function(e){var n=e&&e.type;return n&&eF[n]?eF[n]:null},vIe=function(e,n){return c6(n).indexOf(e)},yIe=["children","width","height","viewBox","className","style","title","desc"];function mI(){return mI=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},mI.apply(this,arguments)}function bIe(t,e){if(t==null)return{};var n=_Ie(t,e),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(i=0;i<s.length;i++)r=s[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function _Ie(t,e){if(t==null)return{};var n={};for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){if(e.indexOf(r)>=0)continue;n[r]=t[r]}return n}function vI(t){var e=t.children,n=t.width,r=t.height,i=t.viewBox,s=t.className,o=t.style,a=t.title,l=t.desc,c=bIe(t,yIe),u=i||{width:n,height:r,x:0,y:0},h=un("recharts-surface",s);return Me.createElement("svg",mI({},bn(c,!0,"svg"),{className:h,width:n,height:r,style:o,viewBox:"".concat(u.x," ").concat(u.y," ").concat(u.width," ").concat(u.height)}),Me.createElement("title",null,a),Me.createElement("desc",null,l),e)}var wIe=["children","className"];function yI(){return yI=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},yI.apply(this,arguments)}function xIe(t,e){if(t==null)return{};var n=AIe(t,e),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(i=0;i<s.length;i++)r=s[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function AIe(t,e){if(t==null)return{};var n={};for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){if(e.indexOf(r)>=0)continue;n[r]=t[r]}return n}var ui=Me.forwardRef(function(t,e){var n=t.children,r=t.className,i=xIe(t,wIe),s=un("recharts-layer",r);return Me.createElement("g",yI({className:s},bn(i,!0),{ref:e}),n)}),kc=function(e,n){for(var r=arguments.length,i=new Array(r>2?r-2:0),s=2;s<r;s++)i[s-2]=arguments[s]},LT,sF;function EIe(){if(sF)return LT;sF=1;function t(e,n,r){var i=-1,s=e.length;n<0&&(n=-n>s?0:s+n),r=r>s?s:r,r<0&&(r+=s),s=n>r?0:r-n>>>0,n>>>=0;for(var o=Array(s);++i<s;)o[i]=e[i+n];return o}return LT=t,LT}var FT,oF;function SIe(){if(oF)return FT;oF=1;var t=EIe();function e(n,r,i){var s=n.length;return i=i===void 0?s:i,!r&&i>=s?n:t(n,r,i)}return FT=e,FT}var UT,aF;function wX(){if(aF)return UT;aF=1;var t="\\ud800-\\udfff",e="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",i=e+n+r,s="\\ufe0e\\ufe0f",o="\\u200d",a=RegExp("["+o+t+i+s+"]");function l(c){return a.test(c)}return UT=l,UT}var zT,lF;function TIe(){if(lF)return zT;lF=1;function t(e){return e.split("")}return zT=t,zT}var jT,cF;function CIe(){if(cF)return jT;cF=1;var t="\\ud800-\\udfff",e="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",i=e+n+r,s="\\ufe0e\\ufe0f",o="["+t+"]",a="["+i+"]",l="\\ud83c[\\udffb-\\udfff]",c="(?:"+a+"|"+l+")",u="[^"+t+"]",h="(?:\\ud83c[\\udde6-\\uddff]){2}",d="[\\ud800-\\udbff][\\udc00-\\udfff]",m="\\u200d",y=c+"?",v="["+s+"]?",b="(?:"+m+"(?:"+[u,h,d].join("|")+")"+v+y+")*",x=v+y+b,T="(?:"+[u+a+"?",a,h,d,o].join("|")+")",E=RegExp(l+"(?="+l+")|"+T+x,"g");function C(I){return I.match(E)||[]}return jT=C,jT}var VT,uF;function PIe(){if(uF)return VT;uF=1;var t=TIe(),e=wX(),n=CIe();function r(i){return e(i)?n(i):t(i)}return VT=r,VT}var WT,fF;
vendor: 5,469 bytes, line 3513
3513function IIe(){if(fF)return WT;fF=1;var t=SIe(),e=wX(),n=PIe(),r=vX();function i(s){return function(o){o=r(o);var a=e(o)?n(o):void 0,l=a?a[0]:o.charAt(0),c=a?t(a,1).join(""):o.slice(1);return l[s]()+c}}return WT=i,WT}var $T,hF;function OIe(){if(hF)return $T;hF=1;var t=IIe(),e=t("toUpperCase");return $T=e,$T}var MIe=OIe();const yA=fn(MIe);function qn(t){return function(){return t}}const xX=Math.cos,Nw=Math.sin,Na=Math.sqrt,Dw=Math.PI,bA=2*Dw,bI=Math.PI,_I=2*bI,Eh=1e-6,RIe=_I-Eh;function AX(t){this._+=t[0];for(let e=1,n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function kIe(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return AX;const n=10**e;return function(r){this._+=r[0];for(let i=1,s=r.length;i<s;++i)this._+=Math.round(arguments[i]*n)/n+r[i]}}class NIe{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?AX:kIe(e)}moveTo(e,n){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,n){this._append`L${this._x1=+e},${this._y1=+n}`}quadraticCurveTo(e,n,r,i){this._append`Q${+e},${+n},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(e,n,r,i,s,o){this._append`C${+e},${+n},${+r},${+i},${this._x1=+s},${this._y1=+o}`}arcTo(e,n,r,i,s){if(e=+e,n=+n,r=+r,i=+i,s=+s,s<0)throw new Error(`negative radius: ${s}`);let o=this._x1,a=this._y1,l=r-e,c=i-n,u=o-e,h=a-n,d=u*u+h*h;if(this._x1===null)this._append`M${this._x1=e},${this._y1=n}`;else if(d>Eh)if(!(Math.abs(h*l-c*u)>Eh)||!s)this._append`L${this._x1=e},${this._y1=n}`;else{let m=r-o,y=i-a,v=l*l+c*c,b=m*m+y*y,x=Math.sqrt(v),T=Math.sqrt(d),E=s*Math.tan((bI-Math.acos((v+d-b)/(2*x*T)))/2),C=E/T,I=E/x;Math.abs(C-1)>Eh&&this._append`L${e+C*u},${n+C*h}`,this._append`A${s},${s},0,0,${+(h*m>u*y)},${this._x1=e+I*l},${this._y1=n+I*c}`}}arc(e,n,r,i,s,o){if(e=+e,n=+n,r=+r,o=!!o,r<0)throw new Error(`negative radius: ${r}`);let a=r*Math.cos(i),l=r*Math.sin(i),c=e+a,u=n+l,h=1^o,d=o?i-s:s-i;this._x1===null?this._append`M${c},${u}`:(Math.abs(this._x1-c)>Eh||Math.abs(this._y1-u)>Eh)&&this._append`L${c},${u}`,r&&(d<0&&(d=d%_I+_I),d>RIe?this._append`A${r},${r},0,1,${h},${e-a},${n-l}A${r},${r},0,1,${h},${this._x1=c},${this._y1=u}`:d>Eh&&this._append`A${r},${r},0,${+(d>=bI)},${h},${this._x1=e+r*Math.cos(s)},${this._y1=n+r*Math.sin(s)}`)}rect(e,n,r,i){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}}function u6(t){let e=3;return t.digits=function(n){if(!arguments.length)return e;if(n==null)e=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);e=r}return t},()=>new NIe(e)}function f6(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function EX(t){this._context=t}EX.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e);break}}};function _A(t){return new EX(t)}function SX(t){return t[0]}function TX(t){return t[1]}function CX(t,e){var n=qn(!0),r=null,i=_A,s=null,o=u6(a);t=typeof t=="function"?t:t===void 0?SX:qn(t),e=typeof e=="function"?e:e===void 0?TX:qn(e);function a(l){var c,u=(l=f6(l)).length,h,d=!1,m;for(r==null&&(s=i(m=o())),c=0;c<=u;++c)!(c<u&&n(h=l[c],c,l))===d&&((d=!d)?s.lineStart():s.lineEnd()),d&&s.point(+t(h,c,l),+e(h,c,l));if(m)return s=null,m+""||null}return a.x=function(l){return arguments.length?(t=typeof l=="function"?l:qn(+l),a):t},a.y=function(l){return arguments.length?(e=typeof l=="function"?l:qn(+l),a):e},a.defined=function(l){return arguments.length?(n=typeof l=="function"?l:qn(!!l),a):n},a.curve=function(l){return arguments.length?(i=l,r!=null&&(s=i(r)),a):i},a.context=function(l){return arguments.length?(l==null?r=s=null:s=i(r=l),a):r},a}function qb(t,e,n){var r=null,i=qn(!0),s=null,o=_A,a=null,l=u6(c);t=typeof t=="function"?t:t===void 0?SX:qn(+t),e=typeof e=="function"?e:qn(e===void 0?0:+e),n=typeof n=="function"?n:n===void 0?TX:qn(+n);function c(h){var d,m,y,v=(h=f6(h)).length,b,x=!1,T,E=new Array(v),C=new Array(v);for(s==null&&(a=o(T=l())),d=0;d<=v;++d){if(!(d<v&&i(b=h[d],d,h))===x)if(x=!x)m=d,a.areaStart(),a.lineStart();else{for(a.lineEnd(),a.lineStart(),y=d-1;y>=m;--y)a.point(E[y],C[y]);a.lineEnd(),a.areaEnd()}x&&(E[d]=+t(b,d,h),C[d]=+e(b,d,h),a.point(r?+r(b,d,h):E[d],n?+n(b,d,h):C[d]))}if(T)return a=null,T+""||null}function u(){return CX().defined(i).curve(o).context(s)}return c.x=function(h){return arguments.length?(t=typeof h=="function"?h:qn(+h),r=null,c):t},c.x0=function(h){return arguments.length?(t=typeof h=="function"?h:qn(+h),c):t},c.x1=function(h){return arguments.length?(r=h==null?null:typeof h=="function"?h:qn(+h),c):r},c.y=function(h){return arguments.length?(e=typeof h=="function"?h:qn(+h),n=null,c):e},c.y0=function(h){return arguments.length?(e=typeof h=="function"?h:qn(+h),c):e},c.y1=function(h){return arguments.length?(n=h==null?null:typeof h=="function"?h:qn(+h),c):n},c.lineX0=c.lineY0=function(){return u().x(t).y(e)},c.lineY1=function(){return u().x(t).y(n)},c.lineX1=function(){return u().x(r).y(e)},c.defined=function(h){return arguments.length?(i=typeof h=="function"?h:qn(!!h
3513),c):i},c.curve=function(h){return arguments.length?(o=h,s!=null&&(a=o(s)),c):o},c.context=function(h){return arguments.length?(h==null?s=a=null:a=o(s=h),c):s},c}class PX{constructor(e,n){this._context=e,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,n){switch(e=+e,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(e,n):this._context.moveTo(e,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,n,e,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,e,this._y0,e,n);break}}this._x0=e,this._y0=n}}function DIe(t){return new PX(t,!0)}function BIe(t){return new PX(t,!1)}const h6={draw(t,e){const n=Na(e/Dw);t.moveTo(n,0),t.arc(0,0,n,0,bA)}},LIe={draw(t,e){const n=Na(e/5)/2;t.moveTo(-3*n,-n),t.lineTo(-n,-n),t.lineTo(-n,-3*n),t.lineTo(n,-3*n),t.lineTo(n,-n),t.lineTo(3*n,-n),t.lineTo(3*n,n),t.lineTo(n,n),t.lineTo(n,3*n),t.lineTo(-n,3*n),t.lineTo(-n,n),t.lineTo(-3*n,n),t.closePath()}},IX=Na(1/3),FIe=IX*2,UIe={draw(t,e){const n=Na(e/FIe),r=n*IX;t.moveTo(0,-n),t.lineTo(r,0),t.lineTo(0,n),t.lineTo(-r,0),t.closePath()}},zIe={draw(t,e){const n=Na(e),r=-n/2;t.rect(r,r,n,n)}},jIe=.8908130915292852,OX=Nw(Dw/10)/Nw(7*Dw/10),VIe=Nw(bA/10)*OX,WIe=-xX(bA/10)*OX,$Ie={draw(t,e){const n=Na(e*jIe),r=VIe*n,i=WIe*n;t.moveTo(0,-n),t.lineTo(r,i);for(let s=1;s<5;++s){const o=bA*s/5,a=xX(o),l=Nw(o);t.lineTo(l*n,-a*n),t.lineTo(a*r-l*i,l*r+a*i)}t.closePath()}},HT=Na(3),HIe={draw(t,e){const n=-Na(e/(HT*3));t.moveTo(0,n*2),t.lineTo(-HT*n,-n),t.lineTo(HT*n,-n),t.closePath()}},Oo=-.5,Mo=Na(3)/2,wI=1/Na(12),qIe=(wI/2+1)*3,QIe={draw(t,e){const n=Na(e/qIe),r=n/2,i=n*wI,s=r,o=n*wI+n,a=-s,l=o;t.moveTo(r,i),t.lineTo(s,o),t.lineTo(a,l),t.lineTo(Oo*r-Mo*i,Mo*r+Oo*i),t.lineTo(Oo*s-Mo*o,Mo*s+Oo*o),t.lineTo(Oo*a-Mo*l,Mo*a+Oo*l),t.lineTo(Oo*r+Mo*i,Oo*i-Mo*r),t.lineTo(Oo*s+Mo*o,Oo*o-Mo*s),t.lineTo(Oo*a+Mo*l,Oo*l-Mo*a),t.closePath()}};function XIe(t,e){let n=null,r=u6(i);t=typeof t=="function"?t:qn(t||h6),e=typeof e=="function"?e:qn(e===void 0?64:+e);function i(){let s;if(n||(n=s=r()),t.apply(this,arguments).draw(n,+e.apply(this,arguments)),s)return n=null,s+""||null}return i.type=function(s){return arguments.length?(t=typeof s=="function"?s:qn(s),i):t},i.size=function(s){return arguments.length?(e=typeof s=="function"?s:qn(+s),i):e},i.context=function(s){return arguments.length?(n=s??null,i):n},i}function Bw(){}function Lw(t,e,n){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+n)/6)}function MX(t){this._context=t}MX.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Lw(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Lw(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function YIe(t){return new MX(t)}function RX(t){this._context=t}RX.prototype={areaStart:Bw,areaEnd:Bw,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:Lw(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function KIe(t){return new RX(t)}function kX(t){this._context=t}kX.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:Lw(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function GIe(t){return new kX(t)}function NX(t){this._context=t}NX.prototype={areaStart:Bw,areaEnd:Bw,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}};function ZIe(t){return new NX(t)}function dF(t){return t<0?-1:1}function pF(t,e,n){var r=t._x1-t._x0,i=e-t._x1,s=(t._y1-t._y0)/(r||i<0&&-0),o=(n-t._y1)/(i||r<0&&-0),a=(s*i+o*r)/(r+i);return(dF(s)+dF(o))*Math.min(Math.abs(s),Math.abs(o),.5*Math.abs(a)
3513)||0}function gF(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function qT(t,e,n){var r=t._x0,i=t._y0,s=t._x1,o=t._y1,a=(s-r)/3;t._context.bezierCurveTo(r+a,i+a*e,s-a,o-a*n,s,o)}function Fw(t){this._context=t}Fw.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:qT(this,this._t0,gF(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(t=+t,e=+e,!(t===this._x1&&e===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,qT(this,gF(this,n=pF(this,t,e)),n);break;default:qT(this,this._t0,n=pF(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}};function DX(t){this._context=new BX(t)}(DX.prototype=Object.create(Fw.prototype)).point=function(t,e){Fw.prototype.point.call(this,e,t)};function BX(t){this._context=t}BX.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,n,r,i,s){this._context.bezierCurveTo(e,t,r,n,s,i)}};function JIe(t){return new Fw(t)}function eOe(t){return new DX(t)}function LX(t){this._context=t}LX.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,n=t.length;if(n)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),n===2)this._context.lineTo(t[1],e[1]);else for(var r=mF(t),i=mF(e),s=0,o=1;o<n;++s,++o)this._context.bezierCurveTo(r[0][s],i[0][s],r[1][s],i[1][s],t[o],e[o]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}};function mF(t){var e,n=t.length-1,r,i=new Array(n),s=new Array(n),o=new Array(n);for(i[0]=0,s[0]=2,o[0]=t[0]+2*t[1],e=1;e<n-1;++e)i[e]=1,s[e]=4,o[e]=4*t[e]+2*t[e+1];for(i[n-1]=2,s[n-1]=7,o[n-1]=8*t[n-1]+t[n],e=1;e<n;++e)r=i[e]/s[e-1],s[e]-=r,o[e]-=r*o[e-1];for(i[n-1]=o[n-1]/s[n-1],e=n-2;e>=0;--e)i[e]=(o[e]-i[e+1])/s[e];for(s[n-1]=(t[n]+i[n-1])/2,e=0;e<n-1;++e)s[e]=2*t[e+1]-i[e+1];return[i,s]}function tOe(t){return new LX(t)}function wA(t,e){this._context=t,this._t=e}wA.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}break}}this._x=t,this._y=e}};function nOe(t){return new wA(t,.5)}function rOe(t){return new wA(t,0)}function iOe(t){return new wA(t,1)}function fm(t,e){if((o=t.length)>1)for(var n=1,r,i,s=t[e[0]],o,a=s.length;n<o;++n)for(i=s,s=t[e[n]],r=0;r<a;++r)s[r][1]+=s[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function xI(t){for(var e=t.length,n=new Array(e);--e>=0;)n[e]=e;return n}function sOe(t,e){return t[e]}function oOe(t){const e=[];return e.key=t,e}function aOe(){var t=qn([]),e=xI,n=fm,r=sOe;function i(s){var o=Array.from(t.apply(this,arguments),oOe),a,l=o.length,c=-1,u;for(const h of s)for(a=0,++c;a<l;++a)(o[a][c]=[0,+r(h,o[a].key,c,s)]).data=h;for(a=0,u=f6(e(o));a<l;++a)o[u[a]].index=a;return n(o,u),o}return i.keys=function(s){return arguments.length?(t=typeof s=="function"?s:qn(Array.from(s)),i):t},i.value=function(s){return arguments.length?(r=typeof s=="function"?s:qn(+s),i):r},i.order=function(s){return arguments.length?(e=s==null?xI:typeof s=="function"?s:qn(Array.from(s)),i):e},i.offset=function(s){return arguments.length?(n=s??fm,i):n},i}function lOe(t,e){if((r=t.length)>0){for(var n,r,i=0,s=t[0].length,o;i<s;++i){for(o=n=0;n<r;++n)o+=t[n][i][1]||0;if(o)for(n=0;n<r;++n)t[n][i][1]/=o}fm(t,e)}}function cOe(t,e){if((i=t.length)>0){for(var n=0,r=t[e[0]],i,s=r.length;n<s;++n){for(var o=0,a=0;o<i;++o)a+=t[o][n][1]||0;r[n][1]+=r[n][0]=-a/2}fm(t,e)}}function uOe(t,e){if(!(!((o=t.length)>0)||!((s=(i=t[e[0]]).length)>0))){for(var n=0,r=1,i,s,o;r<s;++r){for(var a=0,l=0,c=0;a<o;++a){for(var u=t[e[a]],h=u[r][1]||0,d=u[r-1][1]||0,m=(h-d)/2,y=0;y<a;++y){var v=t[e[y]],b=v[r][1]||0,x=v[r-1][1]||0;m+=b-x}l+=h,c+=m*h}i[r-1][1]+=i[r-1][0]=n,l&&(n-=c/l)}i[r-1][1]+=i[r-1][0]=n,fm(t,e)}}function Ov(t){"@babel/helpers - typeof";return Ov=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ov(t)}var fOe=["type","size","sizeType"];function AI(){return AI=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},AI.apply(this,arguments)}function vF(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function yF(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};
vendor: 15,099 bytes, lines 3513-3516
3513e%2?vF(Object(n),!0).forEach(function(r){hOe(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):vF(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function hOe(t,e,n){return e=dOe(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function dOe(t){var e=pOe(t,"string");return Ov(e)=="symbol"?e:e+""}function pOe(t,e){if(Ov(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(Ov(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function gOe(t,e){if(t==null)return{};var n=mOe(t,e),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(i=0;i<s.length;i++)r=s[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function mOe(t,e){if(t==null)return{};var n={};for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){if(e.indexOf(r)>=0)continue;n[r]=t[r]}return n}var FX={symbolCircle:h6,symbolCross:LIe,symbolDiamond:UIe,symbolSquare:zIe,symbolStar:$Ie,symbolTriangle:HIe,symbolWye:QIe},vOe=Math.PI/180,yOe=function(e){var n="symbol".concat(yA(e));return FX[n]||h6},bOe=function(e,n,r){if(n==="area")return e;switch(r){case"cross":return 5*e*e/9;case"diamond":return .5*e*e/Math.sqrt(3);case"square":return e*e;case"star":{var i=18*vOe;return 1.25*e*e*(Math.tan(i)-Math.tan(i*2)*Math.pow(Math.tan(i),2))}case"triangle":return Math.sqrt(3)*e*e/4;case"wye":return(21-10*Math.sqrt(3))*e*e/8;default:return Math.PI*e*e/4}},_Oe=function(e,n){FX["symbol".concat(yA(e))]=n},d6=function(e){var n=e.type,r=n===void 0?"circle":n,i=e.size,s=i===void 0?64:i,o=e.sizeType,a=o===void 0?"area":o,l=gOe(e,fOe),c=yF(yF({},l),{},{type:r,size:s,sizeType:a}),u=function(){var b=yOe(r),x=XIe().type(b).size(bOe(s,a,r));return x()},h=c.className,d=c.cx,m=c.cy,y=bn(c,!0);return d===+d&&m===+m&&s===+s?Me.createElement("path",AI({},y,{className:un("recharts-symbols",h),transform:"translate(".concat(d,", ").concat(m,")"),d:u()})):null};d6.registerSymbol=_Oe;function hm(t){"@babel/helpers - typeof";return hm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},hm(t)}function EI(){return EI=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},EI.apply(this,arguments)}function bF(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function wOe(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?bF(Object(n),!0).forEach(function(r){Mv(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):bF(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function xOe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function AOe(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,zX(r.key),r)}}function EOe(t,e,n){return e&&AOe(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function SOe(t,e,n){return e=Uw(e),TOe(t,UX()?Reflect.construct(e,n||[],Uw(t).constructor):e.apply(t,n))}function TOe(t,e){if(e&&(hm(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return COe(t)}function COe(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function UX(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(UX=function(){return!!t})()}function Uw(t){return Uw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Uw(t)}function POe(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&SI(t,e)}function SI(t,e){return SI=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},SI(t,e)}function Mv(t,e,n){return e=zX(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function zX(t){var e=IOe(t,"string");return hm(e)=="symbol"?e:e+""}function IOe(t,e){if(hm(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(hm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var Ro=32,p6=(function(t){function e(){return xOe(this,e),SOe(this,e,arguments)}return POe(e,t),EOe(e,[{key:"renderIcon",value:function(r){var i=this.props.inactiveColor,s=Ro/2,o=Ro/6,a=Ro/3,l=r.inactive?i:r.color;if(r.type==="plainline")return Me.createElement("line",{strokeWidth:4,fill:"none",stroke:l,strokeDasharray:r.payload.strokeDasharray,x1:0,y1:s,x2:Ro,y2:s,className:"recharts-legend-icon"});if(r.type==="line")return Me.createElement("path",{strokeWidth:4,fill:"none",stroke:l,d:"M0,".concat(s,"h").concat(a,`
3514            A`).concat(o,",").concat(o,",0,1,1,").concat(2*a,",").concat(s,`
3515            H`).concat(Ro,"M").concat(2*a,",").concat(s,`
3516            A`).concat(o,",").concat(o,",0,1,1,").concat(a,",").concat(s),className:"recharts-legend-icon"});if(r.type==="rect")return Me.createElement("path",{stroke:"none",fill:l,d:"M0,".concat(Ro/8,"h").concat(Ro,"v").concat(Ro*3/4,"h").concat(-Ro,"z"),className:"recharts-legend-icon"});if(Me.isValidElement(r.legendIcon)){var c=wOe({},r);return delete c.legendIcon,Me.cloneElement(r.legendIcon,c)}return Me.createElement(d6,{fill:l,cx:s,cy:s,size:Ro,sizeType:"diameter",type:r.type})}},{key:"renderItems",value:function(){var r=this,i=this.props,s=i.payload,o=i.iconSize,a=i.layout,l=i.formatter,c=i.inactiveColor,u={x:0,y:0,width:Ro,height:Ro},h={display:a==="horizontal"?"inline-block":"block",marginRight:10},d={display:"inline-block",verticalAlign:"middle",marginRight:4};return s.map(function(m,y){var v=m.formatter||l,b=un(Mv(Mv({"recharts-legend-item":!0},"legend-item-".concat(y),!0),"inactive",m.inactive));if(m.type==="none")return null;var x=rn(m.value)?null:m.value;kc(!rn(m.value),`The name property is also required when using a function for the dataKey of a chart's cartesian components. Ex: <Bar name="Name of my Data"/>`);var T=m.inactive?c:m.color;return Me.createElement("li",EI({className:b,style:h,key:"legend-item-".concat(y)},kw(r.props,m,y)),Me.createElement(vI,{width:o,height:o,viewBox:u,style:d},r.renderIcon(m)),Me.createElement("span",{className:"recharts-legend-item-text",style:{color:T}},v?v(x,m,y):x))})}},{key:"render",value:function(){var r=this.props,i=r.payload,s=r.layout,o=r.align;if(!i||!i.length)return null;var a={padding:0,margin:0,textAlign:s==="horizontal"?o:"left"};return Me.createElement("ul",{className:"recharts-default-legend",style:a},this.renderItems())}}])})(A.PureComponent);Mv(p6,"displayName","Legend");Mv(p6,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var QT,_F;function OOe(){if(_F)return QT;_F=1;var t=pA();function e(){this.__data__=new t,this.size=0}return QT=e,QT}var XT,wF;function MOe(){if(wF)return XT;wF=1;function t(e){var n=this.__data__,r=n.delete(e);return this.size=n.size,r}return XT=t,XT}var YT,xF;function ROe(){if(xF)return YT;xF=1;function t(e){return this.__data__.get(e)}return YT=t,YT}var KT,AF;function kOe(){if(AF)return KT;AF=1;function t(e){return this.__data__.has(e)}return KT=t,KT}var GT,EF;function NOe(){if(EF)return GT;EF=1;var t=pA(),e=i6(),n=s6(),r=200;function i(s,o){var a=this.__data__;if(a instanceof t){var l=a.__data__;if(!e||l.length<r-1)return l.push([s,o]),this.size=++a.size,this;a=this.__data__=new n(l)}return a.set(s,o),this.size=a.size,this}return GT=i,GT}var ZT,SF;function jX(){if(SF)return ZT;SF=1;var t=pA(),e=OOe(),n=MOe(),r=ROe(),i=kOe(),s=NOe();function o(a){var l=this.__data__=new t(a);this.size=l.size}return o.prototype.clear=e,o.prototype.delete=n,o.prototype.get=r,o.prototype.has=i,o.prototype.set=s,ZT=o,ZT}var JT,TF;function DOe(){if(TF)return JT;TF=1;var t="__lodash_hash_undefined__";function e(n){return this.__data__.set(n,t),this}return JT=e,JT}var e4,CF;function BOe(){if(CF)return e4;CF=1;function t(e){return this.__data__.has(e)}return e4=t,e4}var t4,PF;function VX(){if(PF)return t4;PF=1;var t=s6(),e=DOe(),n=BOe();function r(i){var s=-1,o=i==null?0:i.length;for(this.__data__=new t;++s<o;)this.add(i[s])}return r.prototype.add=r.prototype.push=e,r.prototype.has=n,t4=r,t4}var n4,IF;function WX(){if(IF)return n4;IF=1;function t(e,n){for(var r=-1,i=e==null?0:e.length;++r<i;)if(n(e[r],r,e))return!0;return!1}return n4=t,n4}var r4,OF;function $X(){if(OF)return r4;OF=1;function t(e,n){return e.has(n)}return r4=t,r4}var i4,MF;function HX(){if(MF)return i4;MF=1;var t=VX(),e=WX(),n=$X(),r=1,i=2;function s(o,a,l,c,u,h){var d=l&r,m=o.length,y=a.length;if(m!=y&&!(d&&y>m))return!1;var v=h.get(o),b=h.get(a);if(v&&b)return v==a&&b==o;var x=-1,T=!0,E=l&i?new t:void 0;for(h.set(o,a),h.set(a,o);++x<m;){var C=o[x],I=a[x];if(c)var O=d?c(I,C,x,a,o,h):c(C,I,x,o,a,h);if(O!==void 0){if(O)continue;T=!1;break}if(E){if(!e(a,function(N,U){if(!n(E,U)&&(C===N||u(C,N,l,c,h)))return E.push(U)})){T=!1;break}}else if(!(C===I||u(C,I,l,c,h))){T=!1;break}}return h.delete(o),h.delete(a),T}return i4=s,i4}var s4,RF;function LOe(){if(RF)return s4;RF=1;var t=Ll(),e=t.Uint8Array;return s4=e,s4}var o4,kF;function FOe(){if(kF)return o4;kF=1;function t(e){var n=-1,r=Array(e.size);return e.forEach(function(i,s){r[++n]=[s,i]}),r}return o4=t,o4}var a4,NF;function g6(){if(NF)return a4;NF=1;function t(e){var n=-1,r=Array(e.size);return e.forEach(function(i){r[++n]=i}),r}return a4=t,a4}var l4,DF;function UOe(){if(DF)return l4;DF=1;var t=Oy(),e=LOe(),n=r6(),r=HX(),i=FOe(),s=g6(),o=1,a=2,l="[object Boolean]",c="[object Date]",u="[object Error]",h="[object Map]",d="[object Number]",m="[object RegExp]",y="[object Set]",v="[object String]",b="[object Symbol]",x="[object ArrayBuffer]",T="[object DataView]",E=t?t.prototype:void 0,C=E?E.valueOf:void 0;function I(O,N,U,F,H,W,z){switch(U){case T:if(O.byteLength!=N.byteLength||O.byteOffset!=N.byteOffset)return!1;O=O.buffer,N=N.buffer;case x:return!(O.byteLength!=N.byteLength||!W(new e(O),new e(N)));case l:case c:case d:return n(+O,+N);case u:return O.name==N.name&&O.message==N.message;case m:case v:return O==N+"";case h:var V=i;case y:var M=F&o;if(V||(V=s),O.size!=N.size&&!M)return!1;var K=z.get(O);if(K)return K==N;F|=a,z.set(O,N);var j=r(V(O),V(N),F,H,W,z);return z.delete(O),j;case b:if(C)return C.call(O)==C.call(N)}return!1}return l4=I,l4}var c4,BF;function qX(){if(BF)return c4;BF=1;function t(e,n){for(var r=-1,i=n.length,s=e.length;++r<i;)e[s+r]=n[r];return e}return c4=t,c4}var u4,LF;function zOe(){if(LF)return u4;LF=1;var t=qX(),e=Ds();function n(r,i,s){var o=i(r);return e(r)?o:t(o,s(r))}return u4=n,u4}var f4,FF;function jOe(){if(FF)return f4;FF=1;function t(e,n){for(var r=-1,i=e==null?0:e.length,s=0,o=[];++r<i;){var a=e[r];n(a,r,e)&&(o[s++]=a)}return o}return f4=t,f4}var h4,UF;function VOe(){if(UF)return h4;UF=1;function t(){return[]}return h4=t,h4}var d4,zF;function WOe(){if(zF)return d4;zF=1;var t=jOe(),e=VOe(),n=Object.prototype,r=n.propertyIsEnumerable,i=Object.getOwnPropertySymbols,s=i?function(o){return o==null?[]:(o=Object(o),t(i(o),function(a){return r.call(o,a)}))}:e;return d4=s,d4}var p4,jF;function $Oe(){if(jF)return p4;jF=1;function t(e,n){for(var r=-1,i=Array(e);++r<e;)i[r]=n(r);return i}return p4=t,p4}var g4,VF;function HOe(){if(VF)return g4;VF=1;var t=Uc(),e=zc(),n="[object Arguments]";function r(i){return e(i)&&t(i)==n}return g4=r,g4}var m4,WF;function m6(){if(WF)return m4;WF=1;var t=HOe(),e=zc(),n=Object.prototype,r=n.hasOwnProperty,i=n.propertyIsEnumerable,s=t((function(){return arguments})())?t:function(o){return e(o)&&r.call(o,"callee")&&!i.call(o,"callee")};return m4=s,m4}var H1={exports:{}},v4,$F;function qOe(){if($F)return v4;$F=1;function t(){return!1}return v4=t,v4}H1.exports;var HF;function QX(){return HF||(HF=1,(function(t,e){var n=Ll(),r=qOe(),i=e&&!e.nodeType&&e,s=i&&!0&&t&&!t.nodeType&&t,o=s&&s.exports===i,a=o?n.Buffer:void 0,l=a?a.isBuffer:void 0,c=l||r;t.exports=c})(H1,H1.exports)),H1.exports}var y4,qF;function v6(){if(qF)return y4;qF=1;var t=9007199254740991,e=/^(?:0|[1-9]\d*)$/;function n(r,i){var s=typeof r;return i=i??t,!!i&&(s=="number"||s!="symbol"&&e.test(r))&&r>-1&&r%1==0&&r<i}return y4=n,y4}var b4,QF;function y6(){if(QF)return b4;QF=1;var t=9007199254740991;function e(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=t}return b4=e,b4}var _4,XF;function QOe(){if(XF)return _4;XF=1;var t=Uc(),e=y6(),n=zc(),r="[object Arguments]",i="[object Array]",s="[object Boolean]",o="[object Date]",a="[object Error]",l="[object Function]",c="[object Map]",u="[object Number]",h="[object Object]",d="[object RegExp]",m="[object Set]",y="[object String]",v="[object WeakMap]",b="[object ArrayBuffer]",x="[object DataView]",T="[object Float32Array]",E="[object Float64Array]",C="[object Int8Array]",I="[object Int16Array]",O="[object Int32Array]",N="[object Uint8Array]",U="[object Uint8ClampedArray]",F="[object Uint16Array]",H="[object Uint32Array]",W={};W[T]=W[E]=W[C]=W[I]=W[O]=W[N]=W[U]=W[F]=W[H]=!0,W[r]=W[i]=W[b]=W[s]=W[x]=W[o]=W[a]=W[l]=W[c]=W[u]=W[h]=W[d]=W[m]=W[y]=W[v]=!1;function z(V){return n(V)&&e(V.length)&&!!W[t(V)]}return _4=z,_4}var w4,YF;function XX(){if(YF)return w4;YF=1;function t(e){return function(n){return e(n)}}return w4=t,w4}var q1={exports:{}};q1.exports;var KF;function XOe(){return KF||(KF=1,(function(t,e){var n=pX(),r=e&&!e.nodeType&&e,i=r&&!0&&t&&!t.nodeType&&t,s=i&&i.exports===r,o=s&&n.process,a=(function(){try{var l=i&&i.require&&i.require("util").types;return l||o&&o.binding&&o.binding("util")}catch{}})();t.exports=a})(q1,q1.exports)),q1.exports}var x4,GF;function YX(){if(GF)return x4;GF=1;var t=QOe(),e=XX(),n=XOe(),r=n&&n.isTypedArray,i=r?e(r):t;return x4=i,x4}var A4,ZF;function YOe(){if(ZF)return A4;ZF=1;var t=$Oe(),e=m6(),n=Ds(),r=QX(),i=v6(),s=YX(),o=Object.prototype,a=o.hasOwnProperty;function l(c,u){var h=n(c),d=!h&&e(c),m=!h&&!d&&r(c),y=!h&&!d&&!m&&s(c),v=h||d||m||y,b=v?t(c.length,String):[],x=b.length;for(var T in c)(u||a.call(c,T))&&!(v&&(T=="length"||m&&(T=="offset"||T=="parent")||y&&(T=="buffer"||T=="byteLength"||T=="byteOffset")||i(T,x)))&&b.push(T);return b}return A4=l,A4}var E4,JF;function KOe(){if(JF)return E4;JF=1;var t=Object.prototype;
vendor: 2,787 bytes, line 3516
3516function e(n){var r=n&&n.constructor,i=typeof r=="function"&&r.prototype||t;return n===i}return E4=e,E4}var S4,e7;function KX(){if(e7)return S4;e7=1;function t(e,n){return function(r){return e(n(r))}}return S4=t,S4}var T4,t7;function GOe(){if(t7)return T4;t7=1;var t=KX(),e=t(Object.keys,Object);return T4=e,T4}var C4,n7;function ZOe(){if(n7)return C4;n7=1;var t=KOe(),e=GOe(),n=Object.prototype,r=n.hasOwnProperty;function i(s){if(!t(s))return e(s);var o=[];for(var a in Object(s))r.call(s,a)&&a!="constructor"&&o.push(a);return o}return C4=i,C4}var P4,r7;function Ry(){if(r7)return P4;r7=1;var t=n6(),e=y6();function n(r){return r!=null&&e(r.length)&&!t(r)}return P4=n,P4}var I4,i7;function xA(){if(i7)return I4;i7=1;var t=YOe(),e=ZOe(),n=Ry();function r(i){return n(i)?t(i):e(i)}return I4=r,I4}var O4,s7;function JOe(){if(s7)return O4;s7=1;var t=zOe(),e=WOe(),n=xA();function r(i){return t(i,n,e)}return O4=r,O4}var M4,o7;function eMe(){if(o7)return M4;o7=1;var t=JOe(),e=1,n=Object.prototype,r=n.hasOwnProperty;function i(s,o,a,l,c,u){var h=a&e,d=t(s),m=d.length,y=t(o),v=y.length;if(m!=v&&!h)return!1;for(var b=m;b--;){var x=d[b];if(!(h?x in o:r.call(o,x)))return!1}var T=u.get(s),E=u.get(o);if(T&&E)return T==o&&E==s;var C=!0;u.set(s,o),u.set(o,s);for(var I=h;++b<m;){x=d[b];var O=s[x],N=o[x];if(l)var U=h?l(N,O,x,o,s,u):l(O,N,x,s,o,u);if(!(U===void 0?O===N||c(O,N,a,l,u):U)){C=!1;break}I||(I=x=="constructor")}if(C&&!I){var F=s.constructor,H=o.constructor;F!=H&&"constructor"in s&&"constructor"in o&&!(typeof F=="function"&&F instanceof F&&typeof H=="function"&&H instanceof H)&&(C=!1)}return u.delete(s),u.delete(o),C}return M4=i,M4}var R4,a7;function tMe(){if(a7)return R4;a7=1;var t=yd(),e=Ll(),n=t(e,"DataView");return R4=n,R4}var k4,l7;function nMe(){if(l7)return k4;l7=1;var t=yd(),e=Ll(),n=t(e,"Promise");return k4=n,k4}var N4,c7;function GX(){if(c7)return N4;c7=1;var t=yd(),e=Ll(),n=t(e,"Set");return N4=n,N4}var D4,u7;function rMe(){if(u7)return D4;u7=1;var t=yd(),e=Ll(),n=t(e,"WeakMap");return D4=n,D4}var B4,f7;function iMe(){if(f7)return B4;f7=1;var t=tMe(),e=i6(),n=nMe(),r=GX(),i=rMe(),s=Uc(),o=gX(),a="[object Map]",l="[object Object]",c="[object Promise]",u="[object Set]",h="[object WeakMap]",d="[object DataView]",m=o(t),y=o(e),v=o(n),b=o(r),x=o(i),T=s;return(t&&T(new t(new ArrayBuffer(1)))!=d||e&&T(new e)!=a||n&&T(n.resolve())!=c||r&&T(new r)!=u||i&&T(new i)!=h)&&(T=function(E){var C=s(E),I=C==l?E.constructor:void 0,O=I?o(I):"";if(O)switch(O){case m:return d;case y:return a;case v:return c;case b:return u;case x:return h}return C}),B4=T,B4}var L4,h7;function sMe(){if(h7)return L4;h7=1;var t=jX(),e=HX(),n=UOe(),r=eMe(),i=iMe(),s=Ds(),o=QX(),a=YX(),l=1,c="[object Arguments]",u="[object Array]",h="[object Object]",d=Object.prototype,m=d.hasOwnProperty;
vendor: 45,992 bytes, lines 3516-3524
3516function y(v,b,x,T,E,C){var I=s(v),O=s(b),N=I?u:i(v),U=O?u:i(b);N=N==c?h:N,U=U==c?h:U;var F=N==h,H=U==h,W=N==U;if(W&&o(v)){if(!o(b))return!1;I=!0,F=!1}if(W&&!F)return C||(C=new t),I||a(v)?e(v,b,x,T,E,C):n(v,b,N,x,T,E,C);if(!(x&l)){var z=F&&m.call(v,"__wrapped__"),V=H&&m.call(b,"__wrapped__");if(z||V){var M=z?v.value():v,K=V?b.value():b;return C||(C=new t),E(M,K,x,T,C)}}return W?(C||(C=new t),r(v,b,x,T,E,C)):!1}return L4=y,L4}var F4,d7;function b6(){if(d7)return F4;d7=1;var t=sMe(),e=zc();function n(r,i,s,o,a){return r===i?!0:r==null||i==null||!e(r)&&!e(i)?r!==r&&i!==i:t(r,i,s,o,n,a)}return F4=n,F4}var U4,p7;function oMe(){if(p7)return U4;p7=1;var t=jX(),e=b6(),n=1,r=2;function i(s,o,a,l){var c=a.length,u=c,h=!l;if(s==null)return!u;for(s=Object(s);c--;){var d=a[c];if(h&&d[2]?d[1]!==s[d[0]]:!(d[0]in s))return!1}for(;++c<u;){d=a[c];var m=d[0],y=s[m],v=d[1];if(h&&d[2]){if(y===void 0&&!(m in s))return!1}else{var b=new t;if(l)var x=l(y,v,m,s,o,b);if(!(x===void 0?e(v,y,n|r,l,b):x))return!1}}return!0}return U4=i,U4}var z4,g7;function ZX(){if(g7)return z4;g7=1;var t=df();function e(n){return n===n&&!t(n)}return z4=e,z4}var j4,m7;function aMe(){if(m7)return j4;m7=1;var t=ZX(),e=xA();function n(r){for(var i=e(r),s=i.length;s--;){var o=i[s],a=r[o];i[s]=[o,a,t(a)]}return i}return j4=n,j4}var V4,v7;function JX(){if(v7)return V4;v7=1;function t(e,n){return function(r){return r==null?!1:r[e]===n&&(n!==void 0||e in Object(r))}}return V4=t,V4}var W4,y7;function lMe(){if(y7)return W4;y7=1;var t=oMe(),e=aMe(),n=JX();function r(i){var s=e(i);return s.length==1&&s[0][2]?n(s[0][0],s[0][1]):function(o){return o===i||t(o,i,s)}}return W4=r,W4}var $4,b7;function cMe(){if(b7)return $4;b7=1;function t(e,n){return e!=null&&n in Object(e)}return $4=t,$4}var H4,_7;function uMe(){if(_7)return H4;_7=1;var t=yX(),e=m6(),n=Ds(),r=v6(),i=y6(),s=mA();function o(a,l,c){l=t(l,a);for(var u=-1,h=l.length,d=!1;++u<h;){var m=s(l[u]);if(!(d=a!=null&&c(a,m)))break;a=a[m]}return d||++u!=h?d:(h=a==null?0:a.length,!!h&&i(h)&&r(m,h)&&(n(a)||e(a)))}return H4=o,H4}var q4,w7;function fMe(){if(w7)return q4;w7=1;var t=cMe(),e=uMe();function n(r,i){return r!=null&&e(r,i,t)}return q4=n,q4}var Q4,x7;function hMe(){if(x7)return Q4;x7=1;var t=b6(),e=bX(),n=fMe(),r=t6(),i=ZX(),s=JX(),o=mA(),a=1,l=2;function c(u,h){return r(u)&&i(h)?s(o(u),h):function(d){var m=e(d,u);return m===void 0&&m===h?n(d,u):t(h,m,a|l)}}return Q4=c,Q4}var X4,A7;function Fm(){if(A7)return X4;A7=1;function t(e){return e}return X4=t,X4}var Y4,E7;function dMe(){if(E7)return Y4;E7=1;function t(e){return function(n){return n==null?void 0:n[e]}}return Y4=t,Y4}var K4,S7;function pMe(){if(S7)return K4;S7=1;var t=a6();function e(n){return function(r){return t(r,n)}}return K4=e,K4}var G4,T7;function gMe(){if(T7)return G4;T7=1;var t=dMe(),e=pMe(),n=t6(),r=mA();function i(s){return n(s)?t(r(s)):e(s)}return G4=i,G4}var Z4,C7;function pf(){if(C7)return Z4;C7=1;var t=lMe(),e=hMe(),n=Fm(),r=Ds(),i=gMe();function s(o){return typeof o=="function"?o:o==null?n:typeof o=="object"?r(o)?e(o[0],o[1]):t(o):i(o)}return Z4=s,Z4}var J4,P7;function eY(){if(P7)return J4;P7=1;function t(e,n,r,i){for(var s=e.length,o=r+(i?1:-1);i?o--:++o<s;)if(n(e[o],o,e))return o;return-1}return J4=t,J4}var eC,I7;function mMe(){if(I7)return eC;I7=1;function t(e){return e!==e}return eC=t,eC}var tC,O7;function vMe(){if(O7)return tC;O7=1;function t(e,n,r){for(var i=r-1,s=e.length;++i<s;)if(e[i]===n)return i;return-1}return tC=t,tC}var nC,M7;function yMe(){if(M7)return nC;M7=1;var t=eY(),e=mMe(),n=vMe();function r(i,s,o){return s===s?n(i,s,o):t(i,e,o)}return nC=r,nC}var rC,R7;function bMe(){if(R7)return rC;R7=1;var t=yMe();function e(n,r){var i=n==null?0:n.length;return!!i&&t(n,r,0)>-1}return rC=e,rC}var iC,k7;function _Me(){if(k7)return iC;k7=1;function t(e,n,r){for(var i=-1,s=e==null?0:e.length;++i<s;)if(r(n,e[i]))return!0;return!1}return iC=t,iC}var sC,N7;function wMe(){if(N7)return sC;N7=1;function t(){}return sC=t,sC}var oC,D7;function xMe(){if(D7)return oC;D7=1;var t=GX(),e=wMe(),n=g6(),r=1/0,i=t&&1/n(new t([,-0]))[1]==r?function(s){return new t(s)}:e;return oC=i,oC}var aC,B7;function AMe(){if(B7)return aC;B7=1;var t=VX(),e=bMe(),n=_Me(),r=$X(),i=xMe(),s=g6(),o=200;function a(l,c,u){var h=-1,d=e,m=l.length,y=!0,v=[],b=v;if(u)y=!1,d=n;else if(m>=o){var x=c?null:i(l);if(x)return s(x);y=!1,d=r,b=new t}else b=c?[]:v;e:for(;++h<m;){var T=l[h],E=c?c(T):T;if(T=u||T!==0?T:0,y&&E===E){for(var C=b.length;C--;)if(b[C]===E)continue e;c&&b.push(E),v.push(T)}else d(b,E,u)||(b!==v&&b.push(E),v.push(T))}return v}return aC=a,aC}var lC,L7;function EMe(){if(L7)return lC;L7=1;var t=pf(),e=AMe();function n(r,i){return r&&r.length?e(r,t(i,2)):[]}return lC=n,lC}var SMe=EMe();const F7=fn(SMe);function tY(t,e,n){return e===!0?F7(t,n):rn(e)?F7(t,e):t}function dm(t){"@babel/helpers - typeof";return dm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},dm(t)}var TMe=["ref"];function U7(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function bc(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?U7(Object(n),!0).forEach(function(r){AA(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):U7(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function CMe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function z7(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,rY(r.key),r)}}function PMe(t,e,n){return e&&z7(t.prototype,e),n&&z7(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function IMe(t,e,n){return e=zw(e),OMe(t,nY()?Reflect.construct(e,n||[],zw(t).constructor):e.apply(t,n))}function OMe(t,e){if(e&&(dm(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return MMe(t)}function MMe(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function nY(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(nY=function(){return!!t})()}function zw(t){return zw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},zw(t)}function RMe(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&TI(t,e)}function TI(t,e){return TI=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},TI(t,e)}function AA(t,e,n){return e=rY(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function rY(t){var e=kMe(t,"string");return dm(e)=="symbol"?e:e+""}function kMe(t,e){if(dm(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(dm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function NMe(t,e){if(t==null)return{};var n=DMe(t,e),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(i=0;i<s.length;i++)r=s[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function DMe(t,e){if(t==null)return{};var n={};for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){if(e.indexOf(r)>=0)continue;n[r]=t[r]}return n}function BMe(t){return t.value}function LMe(t,e){if(Me.isValidElement(t))return Me.cloneElement(t,e);if(typeof t=="function")return Me.createElement(t,e);e.ref;var n=NMe(e,TMe);return Me.createElement(p6,n)}var j7=1,Dg=(function(t){function e(){var n;CMe(this,e);for(var r=arguments.length,i=new Array(r),s=0;s<r;s++)i[s]=arguments[s];return n=IMe(this,e,[].concat(i)),AA(n,"lastBoundingBox",{width:-1,height:-1}),n}return RMe(e,t),PMe(e,[{key:"componentDidMount",value:function(){this.updateBBox()}},{key:"componentDidUpdate",value:function(){this.updateBBox()}},{key:"getBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var r=this.wrapperNode.getBoundingClientRect();return r.height=this.wrapperNode.offsetHeight,r.width=this.wrapperNode.offsetWidth,r}return null}},{key:"updateBBox",value:function(){var r=this.props.onBBoxUpdate,i=this.getBBox();i?(Math.abs(i.width-this.lastBoundingBox.width)>j7||Math.abs(i.height-this.lastBoundingBox.height)>j7)&&(this.lastBoundingBox.width=i.width,this.lastBoundingBox.height=i.height,r&&r(i)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,r&&r(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?bc({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(r){var i=this.props,s=i.layout,o=i.align,a=i.verticalAlign,l=i.margin,c=i.chartWidth,u=i.chartHeight,h,d;if(!r||(r.left===void 0||r.left===null)&&(r.right===void 0||r.right===null))if(o==="center"&&s==="vertical"){var m=this.getBBoxSnapshot();h={left:((c||0)-m.width)/2}}else h=o==="right"?{right:l&&l.right||0}:{left:l&&l.left||0};if(!r||(r.top===void 0||r.top===null)&&(r.bottom===void 0||r.bottom===null))if(a==="middle"){var y=this.getBBoxSnapshot();d={top:((u||0)-y.height)/2}}else d=a==="bottom"?{bottom:l&&l.bottom||0}:{top:l&&l.top||0};return bc(bc({},h),d)}},{key:"render",value:function(){var r=this,i=this.props,s=i.content,o=i.width,a=i.height,l=i.wrapperStyle,c=i.payloadUniqBy,u=i.payload,h=bc(bc({position:"absolute",width:o||"auto",height:a||"auto"},this.getDefaultPosition(l)),l);return Me.createElement("div",{className:"recharts-legend-wrapper",style:h,ref:function(m){r.wrapperNode=m}},LMe(s,bc(bc({},this.props),{},{payload:tY(u,c,BMe)})))}}],[{key:"getWithHeight",value:function(r,i){var s=bc(bc({},this.defaultProps),r.props),o=s.layout;return o==="vertical"&&dt(r.props.height)?{height:r.props.height}:o==="horizontal"?{width:r.props.width||i}:null}}])})(A.PureComponent);AA(Dg,"displayName","Legend");AA(Dg,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var cC,V7;function FMe(){if(V7)return cC;V7=1;var t=Oy(),e=m6(),n=Ds(),r=t?t.isConcatSpreadable:void 0;function i(s){return n(s)||e(s)||!!(r&&s&&s[r])}return cC=i,cC}var uC,W7;function iY(){if(W7)return uC;W7=1;var t=qX(),e=FMe();function n(r,i,s,o,a){var l=-1,c=r.length;for(s||(s=e),a||(a=[]);++l<c;){var u=r[l];i>0&&s(u)?i>1?n(u,i-1,s,o,a):t(a,u):o||(a[a.length]=u)}return a}return uC=n,uC}var fC,$7;function UMe(){if($7)return fC;$7=1;function t(e){return function(n,r,i){for(var s=-1,o=Object(n),a=i(n),l=a.length;l--;){var c=a[e?l:++s];if(r(o[c],c,o)===!1)break}return n}}return fC=t,fC}var hC,H7;function zMe(){if(H7)return hC;H7=1;var t=UMe(),e=t();return hC=e,hC}var dC,q7;function sY(){if(q7)return dC;q7=1;var t=zMe(),e=xA();function n(r,i){return r&&t(r,i,e)}return dC=n,dC}var pC,Q7;function jMe(){if(Q7)return pC;Q7=1;var t=Ry();function e(n,r){return function(i,s){if(i==null)return i;if(!t(i))return n(i,s);for(var o=i.length,a=r?o:-1,l=Object(i);(r?a--:++a<o)&&s(l[a],a,l)!==!1;);return i}}return pC=e,pC}var gC,X7;function _6(){if(X7)return gC;X7=1;var t=sY(),e=jMe(),n=e(t);return gC=n,gC}var mC,Y7;function oY(){if(Y7)return mC;Y7=1;var t=_6(),e=Ry();function n(r,i){var s=-1,o=e(r)?Array(r.length):[];return t(r,function(a,l,c){o[++s]=i(a,l,c)}),o}return mC=n,mC}var vC,K7;function VMe(){if(K7)return vC;K7=1;function t(e,n){var r=e.length;for(e.sort(n);r--;)e[r]=e[r].value;return e}return vC=t,vC}var yC,G7;function WMe(){if(G7)return yC;G7=1;var t=Bm();function e(n,r){if(n!==r){var i=n!==void 0,s=n===null,o=n===n,a=t(n),l=r!==void 0,c=r===null,u=r===r,h=t(r);if(!c&&!h&&!a&&n>r||a&&l&&u&&!c&&!h||s&&l&&u||!i&&u||!o)return 1;if(!s&&!a&&!h&&n<r||h&&i&&o&&!s&&!a||c&&i&&o||!l&&o||!u)return-1}return 0}return yC=e,yC}var bC,Z7;function $Me(){if(Z7)return bC;Z7=1;var t=WMe();function e(n,r,i){for(var s=-1,o=n.criteria,a=r.criteria,l=o.length,c=i.length;++s<l;){var u=t(o[s],a[s]);if(u){if(s>=c)return u;var h=i[s];return u*(h=="desc"?-1:1)}}return n.index-r.index}return bC=e,bC}var _C,J7;function HMe(){if(J7)return _C;J7=1;var t=o6(),e=a6(),n=pf(),r=oY(),i=VMe(),s=XX(),o=$Me(),a=Fm(),l=Ds();function c(u,h,d){h.length?h=t(h,function(v){return l(v)?function(b){return e(b,v.length===1?v[0]:v)}:v}):h=[a];var m=-1;h=t(h,s(n));var y=r(u,function(v,b,x){var T=t(h,function(E){return E(v)});return{criteria:T,index:++m,value:v}});return i(y,function(v,b){return o(v,b,d)})}return _C=c,_C}var wC,eU;function qMe(){if(eU)return wC;eU=1;function t(e,n,r){switch(r.length){case 0:return e.call(n);case 1:return e.call(n,r[0]);case 2:return e.call(n,r[0],r[1]);case 3:return e.call(n,r[0],r[1],r[2])}return e.apply(n,r)}return wC=t,wC}var xC,tU;function QMe(){if(tU)return xC;tU=1;var t=qMe(),e=Math.max;function n(r,i,s){return i=e(i===void 0?r.length-1:i,0),function(){for(var o=arguments,a=-1,l=e(o.length-i,0),c=Array(l);++a<l;)c[a]=o[i+a];a=-1;for(var u=Array(i+1);++a<i;)u[a]=o[a];return u[i]=s(c),t(r,this,u)}}return xC=n,xC}var AC,nU;function XMe(){if(nU)return AC;nU=1;function t(e){return function(){return e}}return AC=t,AC}var EC,rU;function aY(){if(rU)return EC;rU=1;var t=yd(),e=(function(){try{var n=t(Object,"defineProperty");return n({},"",{}),n}catch{}})();return EC=e,EC}var SC,iU;function YMe(){if(iU)return SC;iU=1;var t=XMe(),e=aY(),n=Fm(),r=e?function(i,s){return e(i,"toString",{configurable:!0,enumerable:!1,value:t(s),writable:!0})}:n;return SC=r,SC}var TC,sU;function KMe(){if(sU)return TC;sU=1;var t=800,e=16,n=Date.now;function r(i){var s=0,o=0;return function(){var a=n(),l=e-(a-o);if(o=a,l>0){if(++s>=t)return arguments[0]}else s=0;return i.apply(void 0,arguments)}}return TC=r,TC}var CC,oU;function GMe(){if(oU)return CC;oU=1;var t=YMe(),e=KMe(),n=e(t);return CC=n,CC}var PC,aU;function ZMe(){if(aU)return PC;aU=1;var t=Fm(),e=QMe(),n=GMe();function r(i,s){return n(e(i,s,t),i+"")}return PC=r,PC}var IC,lU;function EA(){if(lU)return IC;lU=1;var t=r6(),e=Ry(),n=v6(),r=df();function i(s,o,a){if(!r(a))return!1;var l=typeof o;return(l=="number"?e(a)&&n(o,a.length):l=="string"&&o in a)?t(a[o],s):!1}return IC=i,IC}var OC,cU;function JMe(){if(cU)return OC;cU=1;var t=iY(),e=HMe(),n=ZMe(),r=EA(),i=n(function(s,o){if(s==null)return[];var a=o.length;return a>1&&r(s,o[0],o[1])?o=[]:a>2&&r(o[0],o[1],o[2])&&(o=[o[0]]),e(s,t(o,1),[])});return OC=i,OC}var e6e=JMe();const w6=fn(e6e);function Rv(t){"@babel/helpers - typeof";return Rv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Rv(t)}function CI(){return CI=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},CI.apply(this,arguments)}function t6e(t,e){return s6e(t)||i6e(t,e)||r6e(t,e)||n6e()}function n6e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
3517In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function r6e(t,e){if(t){if(typeof t=="string")return uU(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return uU(t,e)}}function uU(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function i6e(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,s,o,a=[],l=!0,c=!1;try{if(s=(n=n.call(t)).next,e!==0)for(;!(l=(r=s.call(n)).done)&&(a.push(r.value),a.length!==e);l=!0);}catch(u){c=!0,i=u}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return a}}function s6e(t){if(Array.isArray(t))return t}function fU(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function MC(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?fU(Object(n),!0).forEach(function(r){o6e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):fU(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function o6e(t,e,n){return e=a6e(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function a6e(t){var e=l6e(t,"string");return Rv(e)=="symbol"?e:e+""}function l6e(t,e){if(Rv(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(Rv(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function c6e(t){return Array.isArray(t)&&Xr(t[0])&&Xr(t[1])?t.join(" ~ "):t}var u6e=function(e){var n=e.separator,r=n===void 0?" : ":n,i=e.contentStyle,s=i===void 0?{}:i,o=e.itemStyle,a=o===void 0?{}:o,l=e.labelStyle,c=l===void 0?{}:l,u=e.payload,h=e.formatter,d=e.itemSorter,m=e.wrapperClassName,y=e.labelClassName,v=e.label,b=e.labelFormatter,x=e.accessibilityLayer,T=x===void 0?!1:x,E=function(){if(u&&u.length){var z={padding:0,margin:0},V=(d?w6(u,d):u).map(function(M,K){if(M.type==="none")return null;var j=MC({display:"block",paddingTop:4,paddingBottom:4,color:M.color||"#000"},a),q=M.formatter||h||c6e,Y=M.value,X=M.name,te=Y,D=X;if(q&&te!=null&&D!=null){var $=q(Y,X,M,K,u);if(Array.isArray($)){var he=t6e($,2);te=he[0],D=he[1]}else te=$}return Me.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(K),style:j},Xr(D)?Me.createElement("span",{className:"recharts-tooltip-item-name"},D):null,Xr(D)?Me.createElement("span",{className:"recharts-tooltip-item-separator"},r):null,Me.createElement("span",{className:"recharts-tooltip-item-value"},te),Me.createElement("span",{className:"recharts-tooltip-item-unit"},M.unit||""))});return Me.createElement("ul",{className:"recharts-tooltip-item-list",style:z},V)}return null},C=MC({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},s),I=MC({margin:0},c),O=!_n(v),N=O?v:"",U=un("recharts-default-tooltip",m),F=un("recharts-tooltip-label",y);O&&b&&u!==void 0&&u!==null&&(N=b(v,u));var H=T?{role:"status","aria-live":"assertive"}:{};return Me.createElement("div",CI({className:U,style:C},H),Me.createElement("p",{className:F,style:I},Me.isValidElement(N)?N:"".concat(N)),E())};function kv(t){"@babel/helpers - typeof";return kv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},kv(t)}function Qb(t,e,n){return e=f6e(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function f6e(t){var e=h6e(t,"string");return kv(e)=="symbol"?e:e+""}function h6e(t,e){if(kv(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(kv(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var x1="recharts-tooltip-wrapper",d6e={visibility:"hidden"};function p6e(t){var e=t.coordinate,n=t.translateX,r=t.translateY;return un(x1,Qb(Qb(Qb(Qb({},"".concat(x1,"-right"),dt(n)&&e&&dt(e.x)&&n>=e.x),"".concat(x1,"-left"),dt(n)&&e&&dt(e.x)&&n<e.x),"".concat(x1,"-bottom"),dt(r)&&e&&dt(e.y)&&r>=e.y),"".concat(x1,"-top"),dt(r)&&e&&dt(e.y)&&r<e.y))}function hU(t){var e=t.allowEscapeViewBox,n=t.coordinate,r=t.key,i=t.offsetTopLeft,s=t.position,o=t.reverseDirection,a=t.tooltipDimension,l=t.viewBox,c=t.viewBoxDimension;if(s&&dt(s[r]))return s[r];var u=n[r]-a-i,h=n[r]+i;if(e[r])return o[r]?u:h;if(o[r]){var d=u,m=l[r];return d<m?Math.max(h,l[r]):Math.max(u,l[r])}var y=h+a,v=l[r]+c;return y>v?Math.max(u,l[r]):Math.max(h,l[r])}function g6e(t){var e=t.translateX,n=t.translateY,r=t.useTranslate3d;return{transform:r?"translate3d(".concat(e,"px, ").concat(n,"px, 0)"):"translate(".concat(e,"px, ").concat(n,"px)")}}function m6e(t){var e=t.allowEscapeViewBox,n=t.coordinate,r=t.offsetTopLeft,i=t.position,s=t.reverseDirection,o=t.tooltipBox,a=t.useTranslate3d,l=t.viewBox,c,u,h;return o.height>0&&o.width>0&&n?(u=hU({allowEscapeViewBox:e,coordinate:n,key:"x",offsetTopLeft:r,position:i,reverseDirection:s,tooltipDimension:o.width,viewBox:l,viewBoxDimension:l.width}),h=hU({allowEscapeViewBox:e,coordinate:n,key:"y",offsetTopLeft:r,position:i,reverseDirection:s,tooltipDimension:o.height,viewBox:l,viewBoxDimension:l.height}),c=g6e({translateX:u,translateY:h,useTranslate3d:a})):c=d6e,{cssProperties:c,cssClasses:p6e({translateX:u,translateY:h,coordinate:n})}}function pm(t){"@babel/helpers - typeof";return pm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},pm(t)}function dU(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function pU(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?dU(Object(n),!0).forEach(function(r){II(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):dU(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function v6e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function y6e(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,cY(r.key),r)}}function b6e(t,e,n){return e&&y6e(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function _6e(t,e,n){return e=jw(e),w6e(t,lY()?Reflect.construct(e,n||[],jw(t).constructor):e.apply(t,n))}function w6e(t,e){if(e&&(pm(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return x6e(t)}function x6e(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function lY(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(lY=function(){return!!t})()}function jw(t){return jw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},jw(t)}function A6e(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&PI(t,e)}function PI(t,e){return PI=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},PI(t,e)}function II(t,e,n){return e=cY(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function cY(t){var e=E6e(t,"string");return pm(e)=="symbol"?e:e+""}function E6e(t,e){if(pm(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(pm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var gU=1,S6e=(function(t){function e(){var n;v6e(this,e);for(var r=arguments.length,i=new Array(r),s=0;s<r;s++)i[s]=arguments[s];return n=_6e(this,e,[].concat(i)),II(n,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),II(n,"handleKeyDown",function(o){if(o.key==="Escape"){var a,l,c,u;n.setState({dismissed:!0,dismissedAtCoordinate:{x:(a=(l=n.props.coordinate)===null||l===void 0?void 0:l.x)!==null&&a!==void 0?a:0,y:(c=(u=n.props.coordinate)===null||u===void 0?void 0:u.y)!==null&&c!==void 0?c:0}})}}),n}return A6e(e,t),b6e(e,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var r=this.wrapperNode.getBoundingClientRect();(Math.abs(r.width-this.state.lastBoundingBox.width)>gU||Math.abs(r.height-this.state.lastBoundingBox.height)>gU)&&this.setState({lastBoundingBox:{width:r.width,height:r.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var r,i;this.props.active&&this.updateBBox(),this.state.dismissed&&(((r=this.props.coordinate)===null||r===void 0?void 0:r.x)!==this.state.dismissedAtCoordinate.x||((i=this.props.coordinate)===null||i===void 0?void 0:i.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var r=this,i=this.props,s=i.active,o=i.allowEscapeViewBox,a=i.animationDuration,l=i.animationEasing,c=i.children,u=i.coordinate,h=i.hasPayload,d=i.isAnimationActive,m=i.offset,y=i.position,v=i.reverseDirection,b=i.useTranslate3d,x=i.viewBox,T=i.wrapperStyle,E=m6e({allowEscapeViewBox:o,coordinate:u,offsetTopLeft:m,position:y,reverseDirection:v,tooltipBox:this.state.lastBoundingBox,useTranslate3d:b,viewBox:x}),C=E.cssClasses,I=E.cssProperties,O=pU(pU({transition:d&&s?"transform ".concat(a,"ms ").concat(l):void 0},I),{},{pointerEvents:"none",visibility:!this.state.dismissed&&s&&h?"visible":"hidden",position:"absolute",top:0,left:0},T);return Me.createElement("div",{tabIndex:-1,className:C,style:O,ref:function(U){r.wrapperNode=U}},c)}}])})(A.PureComponent),T6e=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},ky={isSsr:T6e()};function gm(t){"@babel/helpers - typeof";return gm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},gm(t)}function mU(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function vU(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?mU(Object(n),!0).forEach(function(r){x6(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):mU(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function C6e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function P6e(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,fY(r.key),r)}}function I6e(t,e,n){return e&&P6e(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function O6e(t,e,n){return e=Vw(e),M6e(t,uY()?Reflect.construct(e,n||[],Vw(t).constructor):e.apply(t,n))}function M6e(t,e){if(e&&(gm(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return R6e(t)}function R6e(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function uY(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(uY=function(){return!!t})()}function Vw(t){return Vw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Vw(t)}function k6e(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&OI(t,e)}function OI(t,e){return OI=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},OI(t,e)}function x6(t,e,n){return e=fY(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function fY(t){var e=N6e(t,"string");return gm(e)=="symbol"?e:e+""}function N6e(t,e){if(gm(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(gm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function D6e(t){return t.dataKey}function B6e(t,e){return Me.isValidElement(t)?Me.cloneElement(t,e):typeof t=="function"?Me.createElement(t,e):Me.createElement(u6e,e)}var wa=(function(t){function e(){return C6e(this,e),O6e(this,e,arguments)}return k6e(e,t),I6e(e,[{key:"render",value:function(){var r=this,i=this.props,s=i.active,o=i.allowEscapeViewBox,a=i.animationDuration,l=i.animationEasing,c=i.content,u=i.coordinate,h=i.filterNull,d=i.isAnimationActive,m=i.offset,y=i.payload,v=i.payloadUniqBy,b=i.position,x=i.reverseDirection,T=i.useTranslate3d,E=i.viewBox,C=i.wrapperStyle,I=y??[];h&&I.length&&(I=tY(y.filter(function(N){return N.value!=null&&(N.hide!==!0||r.props.includeHidden)}),v,D6e));var O=I.length>0;return Me.createElement(S6e,{allowEscapeViewBox:o,animationDuration:a,animationEasing:l,isAnimationActive:d,active:s,coordinate:u,hasPayload:O,offset:m,position:b,reverseDirection:x,useTranslate3d:T,viewBox:E,wrapperStyle:C},B6e(c,vU(vU({},this.props),{},{payload:I})))}}])})(A.PureComponent);x6(wa,"displayName","Tooltip");x6(wa,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!ky.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var RC,yU;function L6e(){if(yU)return RC;yU=1;var t=Ll(),e=function(){return t.Date.now()};return RC=e,RC}var kC,bU;function F6e(){if(bU)return kC;bU=1;var t=/\s/;function e(n){for(var r=n.length;r--&&t.test(n.charAt(r)););return r}return kC=e,kC}var NC,_U;function U6e(){if(_U)return NC;_U=1;var t=F6e(),e=/^\s+/;function n(r){return r&&r.slice(0,t(r)+1).replace(e,"")}return NC=n,NC}var DC,wU;function hY(){if(wU)return DC;wU=1;var t=U6e(),e=df(),n=Bm(),r=NaN,i=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,o=/^0o[0-7]+$/i,a=parseInt;function l(c){if(typeof c=="number")return c;if(n(c))return r;if(e(c)){var u=typeof c.valueOf=="function"?c.valueOf():c;c=e(u)?u+"":u}if(typeof c!="string")return c===0?c:+c;c=t(c);var h=s.test(c);return h||o.test(c)?a(c.slice(2),h?2:8):i.test(c)?r:+c}return DC=l,DC}var BC,xU;function z6e(){if(xU)return BC;xU=1;var t=df(),e=L6e(),n=hY(),r="Expected a function",i=Math.max,s=Math.min;function o(a,l,c){var u,h,d,m,y,v,b=0,x=!1,T=!1,E=!0;if(typeof a!="function")throw new TypeError(r);l=n(l)||0,t(c)&&(x=!!c.leading,T="maxWait"in c,d=T?i(n(c.maxWait)||0,l):d,E="trailing"in c?!!c.trailing:E);function C(V){var M=u,K=h;return u=h=void 0,b=V,m=a.apply(K,M),m}function I(V){return b=V,y=setTimeout(U,l),x?C(V):m}function O(V){var M=V-v,K=V-b,j=l-M;return T?s(j,d-K):j}function N(V){var M=V-v,K=V-b;return v===void 0||M>=l||M<0||T&&K>=d}function U(){var V=e();if(N(V))return F(V);y=setTimeout(U,O(V))}function F(V){return y=void 0,E&&u?C(V):(u=h=void 0,m)}function H(){y!==void 0&&clearTimeout(y),b=0,u=v=h=y=void 0}function W(){return y===void 0?m:F(e())}function z(){var V=e(),M=N(V);if(u=arguments,h=this,v=V,M){if(y===void 0)return I(v);if(T)return clearTimeout(y),y=setTimeout(U,l),C(v)}return y===void 0&&(y=setTimeout(U,l)),m}return z.cancel=H,z.flush=W,z}return BC=o,BC}var LC,AU;function j6e(){if(AU)return LC;AU=1;var t=z6e(),e=df(),n="Expected a function";function r(i,s,o){var a=!0,l=!0;if(typeof i!="function")throw new TypeError(n);return e(o)&&(a="leading"in o?!!o.leading:a,l="trailing"in o?!!o.trailing:l),t(i,s,{leading:a,maxWait:s,trailing:l})}return LC=r,LC}var V6e=j6e();const dY=fn(V6e);function Nv(t){"@babel/helpers - typeof";return Nv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Nv(t)}function EU(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Xb(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?EU(Object(n),!0).forEach(function(r){W6e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):EU(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function W6e(t,e,n){return e=$6e(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function $6e(t){var e=H6e(t,"string");return Nv(e)=="symbol"?e:e+""}function H6e(t,e){if(Nv(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(Nv(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function q6e(t,e){return K6e(t)||Y6e(t,e)||X6e(t,e)||Q6e()}function Q6e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
3518In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function X6e(t,e){if(t){if(typeof t=="string")return SU(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return SU(t,e)}}function SU(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Y6e(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,s,o,a=[],l=!0,c=!1;try{if(s=(n=n.call(t)).next,e!==0)for(;!(l=(r=s.call(n)).done)&&(a.push(r.value),a.length!==e);l=!0);}catch(u){c=!0,i=u}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return a}}function K6e(t){if(Array.isArray(t))return t}var pY=A.forwardRef(function(t,e){var n=t.aspect,r=t.initialDimension,i=r===void 0?{width:-1,height:-1}:r,s=t.width,o=s===void 0?"100%":s,a=t.height,l=a===void 0?"100%":a,c=t.minWidth,u=c===void 0?0:c,h=t.minHeight,d=t.maxHeight,m=t.children,y=t.debounce,v=y===void 0?0:y,b=t.id,x=t.className,T=t.onResize,E=t.style,C=E===void 0?{}:E,I=A.useRef(null),O=A.useRef();O.current=T,A.useImperativeHandle(e,function(){return Object.defineProperty(I.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),I.current},configurable:!0})});var N=A.useState({containerWidth:i.width,containerHeight:i.height}),U=q6e(N,2),F=U[0],H=U[1],W=A.useCallback(function(V,M){H(function(K){var j=Math.round(V),q=Math.round(M);return K.containerWidth===j&&K.containerHeight===q?K:{containerWidth:j,containerHeight:q}})},[]);A.useEffect(function(){var V=function(X){var te,D=X[0].contentRect,$=D.width,he=D.height;W($,he),(te=O.current)===null||te===void 0||te.call(O,$,he)};v>0&&(V=dY(V,v,{trailing:!0,leading:!1}));var M=new ResizeObserver(V),K=I.current.getBoundingClientRect(),j=K.width,q=K.height;return W(j,q),M.observe(I.current),function(){M.disconnect()}},[W,v]);var z=A.useMemo(function(){var V=F.containerWidth,M=F.containerHeight;if(V<0||M<0)return null;kc(Mh(o)||Mh(l),`The width(%s) and height(%s) are both fixed numbers,
3519       maybe you don't need to use a ResponsiveContainer.`,o,l),kc(!n||n>0,"The aspect(%s) must be greater than zero.",n);var K=Mh(o)?V:o,j=Mh(l)?M:l;n&&n>0&&(K?j=K/n:j&&(K=j*n),d&&j>d&&(j=d)),kc(K>0||j>0,`The width(%s) and height(%s) of chart should be greater than 0,
3520       please check the style of container, or the props width(%s) and height(%s),
3521       or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
3522       height and width.`,K,j,o,l,u,h,n);var q=!Array.isArray(m)&&Rc(m.type).endsWith("Chart");return Me.Children.map(m,function(Y){return Me.isValidElement(Y)?A.cloneElement(Y,Xb({width:K,height:j},q?{style:Xb({height:"100%",width:"100%",maxHeight:j,maxWidth:K},Y.props.style)}:{})):Y})},[n,m,l,d,h,u,F,o]);return Me.createElement("div",{id:b?"".concat(b):void 0,className:un("recharts-responsive-container",x),style:Xb(Xb({},C),{},{width:o,height:l,minWidth:u,minHeight:h,maxHeight:d}),ref:I},z)}),gY=function(e){return null};gY.displayName="Cell";function Dv(t){"@babel/helpers - typeof";return Dv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Dv(t)}function TU(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function MI(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?TU(Object(n),!0).forEach(function(r){G6e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):TU(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function G6e(t,e,n){return e=Z6e(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Z6e(t){var e=J6e(t,"string");return Dv(e)=="symbol"?e:e+""}function J6e(t,e){if(Dv(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(Dv(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var lg={widthCache:{},cacheCount:0},eRe=2e3,tRe={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},CU="recharts_measurement_span";function nRe(t){var e=MI({},t);return Object.keys(e).forEach(function(n){e[n]||delete e[n]}),e}var uv=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(e==null||ky.isSsr)return{width:0,height:0};var r=nRe(n),i=JSON.stringify({text:e,copyStyle:r});if(lg.widthCache[i])return lg.widthCache[i];try{var s=document.getElementById(CU);s||(s=document.createElement("span"),s.setAttribute("id",CU),s.setAttribute("aria-hidden","true"),document.body.appendChild(s));var o=MI(MI({},tRe),r);Object.assign(s.style,o),s.textContent="".concat(e);var a=s.getBoundingClientRect(),l={width:a.width,height:a.height};return lg.widthCache[i]=l,++lg.cacheCount>eRe&&(lg.cacheCount=0,lg.widthCache={}),l}catch{return{width:0,height:0}}},rRe=function(e){return{top:e.top+window.scrollY-document.documentElement.clientTop,left:e.left+window.scrollX-document.documentElement.clientLeft}};function Bv(t){"@babel/helpers - typeof";return Bv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Bv(t)}function Ww(t,e){return aRe(t)||oRe(t,e)||sRe(t,e)||iRe()}function iRe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
3523In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function sRe(t,e){if(t){if(typeof t=="string")return PU(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return PU(t,e)}}function PU(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function oRe(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,s,o,a=[],l=!0,c=!1;try{if(s=(n=n.call(t)).next,e===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=s.call(n)).done)&&(a.push(r.value),a.length!==e);l=!0);}catch(u){c=!0,i=u}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return a}}function aRe(t){if(Array.isArray(t))return t}function lRe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function IU(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,uRe(r.key),r)}}function cRe(t,e,n){return e&&IU(t.prototype,e),n&&IU(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function uRe(t){var e=fRe(t,"string");return Bv(e)=="symbol"?e:e+""}function fRe(t,e){if(Bv(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(Bv(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var OU=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,MU=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,hRe=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,dRe=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,mY={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},pRe=Object.keys(mY),Sg="NaN";function gRe(t,e){return t*mY[e]}var Yb=(function(){function t(e,n){lRe(this,t),this.num=e,this.unit=n,this.num=e,this.unit=n,Number.isNaN(e)&&(this.unit=""),n!==""&&!hRe.test(n)&&(this.num=NaN,this.unit=""),pRe.includes(n)&&(this.num=gRe(e,n),this.unit="px")}return cRe(t,[{key:"add",value:function(n){return this.unit!==n.unit?new t(NaN,""):new t(this.num+n.num,this.unit)}},{key:"subtract",value:function(n){return this.unit!==n.unit?new t(NaN,""):new t(this.num-n.num,this.unit)}},{key:"multiply",value:function(n){return this.unit!==""&&n.unit!==""&&this.unit!==n.unit?new t(NaN,""):new t(this.num*n.num,this.unit||n.unit)}},{key:"divide",value:function(n){return this.unit!==""&&n.unit!==""&&this.unit!==n.unit?new t(NaN,""):new t(this.num/n.num,this.unit||n.unit)}},{key:"toString",value:function(){return"".concat(this.num).concat(this.unit)}},{key:"isNaN",value:function(){return Number.isNaN(this.num)}}],[{key:"parse",value:function(n){var r,i=(r=dRe.exec(n))!==null&&r!==void 0?r:[],s=Ww(i,3),o=s[1],a=s[2];return new t(parseFloat(o),a??"")}}])})();function vY(t){if(t.includes(Sg))return Sg;for(var e=t;e.includes("*")||e.includes("/");){var n,r=(n=OU.exec(e))!==null&&n!==void 0?n:[],i=Ww(r,4),s=i[1],o=i[2],a=i[3],l=Yb.parse(s??""),c=Yb.parse(a??""),u=o==="*"?l.multiply(c):l.divide(c);if(u.isNaN())return Sg;e=e.replace(OU,u.toString())}for(;e.includes("+")||/.-\d+(?:\.\d+)?/.test(e);){var h,d=(h=MU.exec(e))!==null&&h!==void 0?h:[],m=Ww(d,4),y=m[1],v=m[2],b=m[3],x=Yb.parse(y??""),T=Yb.parse(b??""),E=v==="+"?x.add(T):x.subtract(T);if(E.isNaN())return Sg;e=e.replace(MU,E.toString())}return e}var RU=/\(([^()]*)\)/;function mRe(t){for(var e=t;e.includes("(");){var n=RU.exec(e),r=Ww(n,2),i=r[1];e=e.replace(RU,vY(i))}return e}function vRe(t){var e=t.replace(/\s+/g,"");return e=mRe(e),e=vY(e),e}function yRe(t){try{return vRe(t)}catch{return Sg}}function FC(t){var e=yRe(t.slice(5,-1));return e===Sg?"":e}var bRe=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],_Re=["dx","dy","angle","className","breakAll"];function RI(){return RI=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},RI.apply(this,arguments)}function kU(t,e){if(t==null)return{};var n=wRe(t,e),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(i=0;i<s.length;i++)r=s[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function wRe(t,e){if(t==null)return{};var n={};for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){if(e.indexOf(r)>=0)continue;n[r]=t[r]}return n}function NU(t,e){return SRe(t)||ERe(t,e)||ARe(t,e)||xRe()}function xRe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
3524In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ARe(t,e){if(t){if(typeof t=="string")return DU(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return DU(t,e)}}function DU(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function ERe(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,s,o,a=[],l=!0,c=!1;try{if(s=(n=n.call(t)).next,e===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=s.call(n)).done)&&(a.push(r.value),a.length!==e);l=!0);}catch(u){c=!0,i=u}
3524finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return a}}function SRe(t){if(Array.isArray(t))return t}var yY=/[ \f\n\r\t\v\u2028\u2029]+/,bY=function(e){var n=e.children,r=e.breakAll,i=e.style;try{var s=[];_n(n)||(r?s=n.toString().split(""):s=n.toString().split(yY));var o=s.map(function(l){return{word:l,width:uv(l,i).width}}),a=r?0:uv(" ",i).width;return{wordsWithComputedWidth:o,spaceWidth:a}}catch{return null}},TRe=function(e,n,r,i,s){var o=e.maxLines,a=e.children,l=e.style,c=e.breakAll,u=dt(o),h=a,d=function(){var K=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return K.reduce(function(j,q){var Y=q.word,X=q.width,te=j[j.length-1];if(te&&(i==null||s||te.width+X+r<Number(i)))te.words.push(Y),te.width+=X+r;else{var D={words:[Y],width:X};j.push(D)}return j},[])},m=d(n),y=function(K){return K.reduce(function(j,q){return j.width>q.width?j:q})};if(!u)return m;for(var v="…",b=function(K){var j=h.slice(0,K),q=bY({breakAll:c,style:l,children:j+v}).wordsWithComputedWidth,Y=d(q),X=Y.length>o||y(Y).width>Number(i);return[X,Y]},x=0,T=h.length-1,E=0,C;x<=T&&E<=h.length-1;){var I=Math.floor((x+T)/2),O=I-1,N=b(O),U=NU(N,2),F=U[0],H=U[1],W=b(I),z=NU(W,1),V=z[0];if(!F&&!V&&(x=I+1),F&&V&&(T=I-1),!F&&V){C=H;break}E++}return C||m},BU=function(e){var n=_n(e)?[]:e.toString().split(yY);return[{words:n}]},CRe=function(e){var n=e.width,r=e.scaleToFit,i=e.children,s=e.style,o=e.breakAll,a=e.maxLines;if((n||r)&&!ky.isSsr){var l,c,u=bY({breakAll:o,children:i,style:s});if(u){var h=u.wordsWithComputedWidth,d=u.spaceWidth;l=h,c=d}else return BU(i);return TRe({breakAll:o,children:i,maxLines:a,style:s},l,c,n,r)}return BU(i)},LU="#808080",$w=function(e){var n=e.x,r=n===void 0?0:n,i=e.y,s=i===void 0?0:i,o=e.lineHeight,a=o===void 0?"1em":o,l=e.capHeight,c=l===void 0?"0.71em":l,u=e.scaleToFit,h=u===void 0?!1:u,d=e.textAnchor,m=d===void 0?"start":d,y=e.verticalAnchor,v=y===void 0?"end":y,b=e.fill,x=b===void 0?LU:b,T=kU(e,bRe),E=A.useMemo(function(){return CRe({breakAll:T.breakAll,children:T.children,maxLines:T.maxLines,scaleToFit:h,style:T.style,width:T.width})},[T.breakAll,T.children,T.maxLines,h,T.style,T.width]),C=T.dx,I=T.dy,O=T.angle,N=T.className,U=T.breakAll,F=kU(T,_Re);if(!Xr(r)||!Xr(s))return null;var H=r+(dt(C)?C:0),W=s+(dt(I)?I:0),z;switch(v){case"start":z=FC("calc(".concat(c,")"));break;case"middle":z=FC("calc(".concat((E.length-1)/2," * -").concat(a," + (").concat(c," / 2))"));break;default:z=FC("calc(".concat(E.length-1," * -").concat(a,")"));break}var V=[];if(h){var M=E[0].width,K=T.width;V.push("scale(".concat((dt(K)?K/M:1)/M,")"))}return O&&V.push("rotate(".concat(O,", ").concat(H,", ").concat(W,")")),V.length&&(F.transform=V.join(" ")),Me.createElement("text",RI({},bn(F,!0),{x:H,y:W,className:un("recharts-text",N),textAnchor:m,fill:x.includes("url")?LU:x}),E.map(function(j,q){var Y=j.words.join(U?"":" ");return Me.createElement("tspan",{x:H,dy:q===0?z:a,key:"".concat(Y,"-").concat(q)},Y)}))};function sf(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function PRe(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function A6(t){let e,n,r;t.length!==2?(e=sf,n=(a,l)=>sf(t(a),l),r=(a,l)=>t(a)-l):(e=t===sf||t===PRe?t:IRe,n=t,r=t);function i(a,l,c=0,u=a.length){if(c<u){if(e(l,l)!==0)return u;do{const h=c+u>>>1;n(a[h],l)<0?c=h+1:u=h}while(c<u)}return c}function s(a,l,c=0,u=a.length){if(c<u){if(e(l,l)!==0)return u;do{const h=c+u>>>1;n(a[h],l)<=0?c=h+1:u=h}while(c<u)}return c}function o(a,l,c=0,u=a.length){const h=i(a,l,c,u-1);return h>c&&r(a[h-1],l)>-r(a[h],l)?h-1:h}return{left:i,center:o,right:s}}function IRe(){return 0}function _Y(t){return t===null?NaN:+t}function*ORe(t,e){for(let n of t)n!=null&&(n=+n)>=n&&(yield n)}const MRe=A6(sf),Ny=MRe.right;A6(_Y).center;class FU extends Map{constructor(e,n=NRe){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),e!=null)for(const[r,i]of e)this.set(r,i)}get(e){return super.get(UU(this,e))}has(e){return super.has(UU(this,e))}set(e,n){return super.set(RRe(this,e),n)}delete(e){return super.delete(kRe(this,e))}}function UU({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function RRe({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}function kRe({_intern:t,_key:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}function NRe(t){return t!==null&&typeof t=="object"?t.valueOf():t}function DRe(t=sf){if(t===sf)return wY;if(typeof t!="function")throw new TypeError("compare is not a function");return(e,n)=>{const r=t(e,n);return r||r===0?r:(t(n,n)===0)-(t(e,e)===0)}}function wY(t,e){return(t==null||!(t>=t))-(e==null||!(e>=e))||(t<e?-1:t>e?1:0)}const BRe=Math.sqrt(50),LRe=Math.sqrt(10),FRe=Math.sqrt(2);function Hw(t,e,n){const r=(e-t)/Math.max(0,n),i=Math.floor(Math.log10(r)),s=r/Math.pow(10,i),o=s>=BRe?10:s>=LRe?5:s>=FRe?2:1;let a,l,c;return i<0?(c=Math.pow(10,-i)/o,a=Math.round(t*c),l=Math.round(e*c),a/c<t&&++a,l/c>e&&--l,c=-c):(c=Math.pow(10,i)*o,a=Math.round(t/c),l=Math.round(e/c),a*c<t&&++a,l*c>e&&--l),l<a&&.5<=n&&n<2?Hw(t,e,n*2):[a,l,c]}function kI(t,e,n){if(e=+e,t=+t,n=+n,!(n>0))return[];if(t===e)return[t];const r=e<t,[i,s,o]=r?Hw(e,t,n):Hw(t,e,n);if(!(s>=i))return[];const a=s-i+1,l=new Array(a);if(r)if(o<0)for(let c=0;c<a;++c)l[c]=(s-c)/-o;else for(let c=0;c<a;++c)l[c]=(s-c)*o;else if(o<0)for(let c=0;c<a;++c)l[c]=(i+c)/-o;else for(let c=0;c<a;++c)l[c]=(i+c)*o;return l}function NI(t,e,n){return e=+e,t=+t,n=+n,Hw(t,e,n)[2]}function DI(t,e,n){e=+e,t=+t,n=+n;const r=e<t,i=r?NI(e,t,n):NI(t,e,n);return(r?-1:1)*(i<0?1/-i:i)}function zU(t,e){let n;for(const r of t)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);return n}function jU(t,e){let n;for(const r of t)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}
3524function xY(t,e,n=0,r=1/0,i){if(e=Math.floor(e),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(t.length-1,r)),!(n<=e&&e<=r))return t;for(i=i===void 0?wY:DRe(i);r>n;){if(r-n>600){const l=r-n+1,c=e-n+1,u=Math.log(l),h=.5*Math.exp(2*u/3),d=.5*Math.sqrt(u*h*(l-h)/l)*(c-l/2<0?-1:1),m=Math.max(n,Math.floor(e-c*h/l+d)),y=Math.min(r,Math.floor(e+(l-c)*h/l+d));xY(t,e,m,y,i)}const s=t[e];let o=n,a=r;for(A1(t,n,e),i(t[r],s)>0&&A1(t,n,r);o<a;){for(A1(t,o,a),++o,--a;i(t[o],s)<0;)++o;for(;i(t[a],s)>0;)--a}i(t[n],s)===0?A1(t,n,a):(++a,A1(t,a,r)),a<=e&&(n=a+1),e<=a&&(r=a-1)}return t}function A1(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function URe(t,e,n){if(t=Float64Array.from(ORe(t)),!(!(r=t.length)||isNaN(e=+e))){if(e<=0||r<2)return jU(t);if(e>=1)return zU(t);var r,i=(r-1)*e,s=Math.floor(i),o=zU(xY(t,s).subarray(0,s+1)),a=jU(t.subarray(s+1));return o+(a-o)*(i-s)}}function zRe(t,e,n=_Y){if(!(!(r=t.length)||isNaN(e=+e))){if(e<=0||r<2)return+n(t[0],0,t);if(e>=1)return+n(t[r-1],r-1,t);var r,i=(r-1)*e,s=Math.floor(i),o=+n(t[s],s,t),a=+n(t[s+1],s+1,t);return o+(a-o)*(i-s)}}function jRe(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((e-t)/n))|0,s=new Array(i);++r<i;)s[r]=t+r*n;return s}function $o(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}function jc(t,e){switch(arguments.length){case 0:break;case 1:{typeof t=="function"?this.interpolator(t):this.range(t);break}default:{this.domain(t),typeof e=="function"?this.interpolator(e):this.range(e);break}}return this}const BI=Symbol("implicit");function E6(){var t=new FU,e=[],n=[],r=BI;function i(s){let o=t.get(s);if(o===void 0){if(r!==BI)return r;t.set(s,o=e.push(s)-1)}return n[o%n.length]}return i.domain=function(s){if(!arguments.length)return e.slice();e=[],t=new FU;for(const o of s)t.has(o)||t.set(o,e.push(o)-1);return i},i.range=function(s){return arguments.length?(n=Array.from(s),i):n.slice()},i.unknown=function(s){return arguments.length?(r=s,i):r},i.copy=function(){return E6(e,n).unknown(r)},$o.apply(i,arguments),i}function Lv(){var t=E6().unknown(void 0),e=t.domain,n=t.range,r=0,i=1,s,o,a=!1,l=0,c=0,u=.5;delete t.unknown;function h(){var d=e().length,m=i<r,y=m?i:r,v=m?r:i;s=(v-y)/Math.max(1,d-l+c*2),a&&(s=Math.floor(s)),y+=(v-y-s*(d-l))*u,o=s*(1-l),a&&(y=Math.round(y),o=Math.round(o));var b=jRe(d).map(function(x){return y+s*x});return n(m?b.reverse():b)}return t.domain=function(d){return arguments.length?(e(d),h()):e()},t.range=function(d){return arguments.length?([r,i]=d,r=+r,i=+i,h()):[r,i]},t.rangeRound=function(d){return[r,i]=d,r=+r,i=+i,a=!0,h()},t.bandwidth=function(){return o},t.step=function(){return s},t.round=function(d){return arguments.length?(a=!!d,h()):a},t.padding=function(d){return arguments.length?(l=Math.min(1,c=+d),h()):l},t.paddingInner=function(d){return arguments.length?(l=Math.min(1,d),h()):l},t.paddingOuter=function(d){return arguments.length?(c=+d,h()):c},t.align=function(d){return arguments.length?(u=Math.max(0,Math.min(1,d)),h()):u},t.copy=function(){return Lv(e(),[r,i]).round(a).paddingInner(l).paddingOuter(c).align(u)},$o.apply(h(),arguments)}function AY(t){var e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return AY(e())},t}function fv(){return AY(Lv.apply(null,arguments).paddingInner(1))}function S6(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function EY(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Dy(){}var Fv=.7,qw=1/Fv,Bg="\\s*([+-]?\\d+)\\s*",Uv="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Pl="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",VRe=/^#([0-9a-f]{3,8})$/,WRe=new RegExp(`^rgb\\(${Bg},${Bg},${Bg}\\)$`),$Re=new RegExp(`^rgb\\(${Pl},${Pl},${Pl}\\)$`),HRe=new RegExp(`^rgba\\(${Bg},${Bg},${Bg},${Uv}\\)$`),qRe=new RegExp(`^rgba\\(${Pl},${Pl},${Pl},${Uv}\\)$`),QRe=new RegExp(`^hsl\\(${Uv},${Pl},${Pl}\\)$`),XRe=new RegExp(`^hsla\\(${Uv},${Pl},${Pl},${Uv}\\)$`),VU={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};S6(Dy,zv,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:WU,formatHex:WU,formatHex8:YRe,formatHsl:KRe,formatRgb:$U,toString:$U});function WU(){return this.rgb().formatHex()}function YRe(){return this.rgb().formatHex8()}function KRe(){return SY(this).formatHsl()}function $U(){return this.rgb().formatRgb()}function zv(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=VRe.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?HU(e):n===3?new Rs(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?Kb(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?Kb(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=WRe.exec(t))?new Rs(e[1],e[2],e[3],1):(e=$Re.exec(t))?new Rs(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=HRe.exec(t))?Kb(e[1],e[2],e[3],e[4]):(e=qRe.exec(t))?Kb(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=QRe.exec(t))?XU(e[1],e[2]/100,e[3]/100,1):(e=XRe.exec(t))?XU(e[1],e[2]/100,e[3]/100,e[4]):VU.hasOwnProperty(t)?HU(VU[t]):t==="transparent"?new Rs(NaN,NaN,NaN,0):null}function HU(t){return new Rs(t>>16&255,t>>8&255,t&255,1)}function Kb(t,e,n,r){return r<=0&&(t=e=n=NaN),new Rs(t,e,n,r)}function GRe(t){return t instanceof Dy||(t=zv(t)),t?(t=t.rgb(),new Rs(t.r,t.g,t.b,t.opacity)):new Rs}function LI(t,e,n,r){return arguments.length===1?GRe(t):new Rs(t,e,n,r??1)}function Rs(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}S6(Rs,LI,EY(Dy,{brighter(t){return t=t==null?qw:Math.pow(qw,t),new Rs(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?Fv:Math.pow(Fv,t),new Rs(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Rs(Hh(this.r),Hh(this.g),Hh(this.b),Qw(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:qU,formatHex:qU,formatHex8:ZRe,formatRgb:QU,toString:QU}));function qU(){return`#${Rh(this.r)}${Rh(this.g)}${Rh(this.b)}`}function ZRe(){return`#${Rh(this.r)}${Rh(this.g)}${Rh(this.b)}${Rh((isNaN(this.opacity)?1:this.opacity)*255)}`}function QU(){const t=Qw(this.opacity);return`${t===1?"rgb(":"rgba("}${Hh(this.r)}, ${Hh(this.g)}, ${Hh(this.b)}${t===1?")":`, ${t})`}`}function Qw(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Hh(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Rh(t){return t=Hh(t),(t<16?"0":"")+t.toString(16)}function XU(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Aa(t,e,n,r)}function SY(t){if(t instanceof Aa)return new Aa(t.h,t.s,t.l,t.opacity);if(t instanceof Dy||(t=zv(t)),!t)return new Aa;if(t instanceof Aa)return t;t=t.rgb();var e=t.r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),s=Math.max(e,n,r),o=NaN,a=s-i,l=(s+i)/2;return a?(e===s?o=(n-r)/a+(n<r)*6:n===s?o=(r-e)/a+2:o=(e-n)/a+4,a/=l<.5?s+i:2-s-i,o*=60):a=l>0&&l<1?0:o,new Aa(o,a,l,t.opacity)}function JRe(t,e,n,r){return arguments.length===1?SY(t):new Aa(t,e,n,r??1)}function Aa(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}S6(Aa,JRe,EY(Dy,{brighter(t){return t=t==null?qw:Math.pow(qw,t),new Aa(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?Fv:Math.pow(Fv,t),new Aa(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new Rs(UC(t>=240?t-240:t+120,i,r),UC(t,i,r),UC(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new Aa(YU(this.h),Gb(this.s),Gb(this.l),Qw(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=Qw(this.opacity);return`${t===1?"hsl(":"hsla("}${YU(this.h)}, ${Gb(this.s)*100}%, ${Gb(this.l)*100}%${t===1?")":`, ${t})`}`}}));function YU(t){return t=(t||0)%360,t<0?t+360:t}
vendor: 4,320 bytes, line 3524
3524function Gb(t){return Math.max(0,Math.min(1,t||0))}function UC(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}const T6=t=>()=>t;function eke(t,e){return function(n){return t+n*e}}function tke(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}function nke(t){return(t=+t)==1?TY:function(e,n){return n-e?tke(e,n,t):T6(isNaN(e)?n:e)}}function TY(t,e){var n=e-t;return n?eke(t,n):T6(isNaN(t)?e:t)}const KU=(function t(e){var n=nke(e);function r(i,s){var o=n((i=LI(i)).r,(s=LI(s)).r),a=n(i.g,s.g),l=n(i.b,s.b),c=TY(i.opacity,s.opacity);return function(u){return i.r=o(u),i.g=a(u),i.b=l(u),i.opacity=c(u),i+""}}return r.gamma=t,r})(1);function rke(t,e){e||(e=[]);var n=t?Math.min(e.length,t.length):0,r=e.slice(),i;return function(s){for(i=0;i<n;++i)r[i]=t[i]*(1-s)+e[i]*s;return r}}function ike(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function ske(t,e){var n=e?e.length:0,r=t?Math.min(n,t.length):0,i=new Array(r),s=new Array(n),o;for(o=0;o<r;++o)i[o]=Um(t[o],e[o]);for(;o<n;++o)s[o]=e[o];return function(a){for(o=0;o<r;++o)s[o]=i[o](a);return s}}function oke(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function Xw(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function ake(t,e){var n={},r={},i;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(i in e)i in t?n[i]=Um(t[i],e[i]):r[i]=e[i];return function(s){for(i in n)r[i]=n[i](s);return r}}var FI=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,zC=new RegExp(FI.source,"g");function lke(t){return function(){return t}}function cke(t){return function(e){return t(e)+""}}function uke(t,e){var n=FI.lastIndex=zC.lastIndex=0,r,i,s,o=-1,a=[],l=[];for(t=t+"",e=e+"";(r=FI.exec(t))&&(i=zC.exec(e));)(s=i.index)>n&&(s=e.slice(n,s),a[o]?a[o]+=s:a[++o]=s),(r=r[0])===(i=i[0])?a[o]?a[o]+=i:a[++o]=i:(a[++o]=null,l.push({i:o,x:Xw(r,i)})),n=zC.lastIndex;return n<e.length&&(s=e.slice(n),a[o]?a[o]+=s:a[++o]=s),a.length<2?l[0]?cke(l[0].x):lke(e):(e=l.length,function(c){for(var u=0,h;u<e;++u)a[(h=l[u]).i]=h.x(c);return a.join("")})}function Um(t,e){var n=typeof e,r;return e==null||n==="boolean"?T6(e):(n==="number"?Xw:n==="string"?(r=zv(e))?(e=r,KU):uke:e instanceof zv?KU:e instanceof Date?oke:ike(e)?rke:Array.isArray(e)?ske:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?ake:Xw)(t,e)}function C6(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}function fke(t,e){e===void 0&&(e=t,t=Um);for(var n=0,r=e.length-1,i=e[0],s=new Array(r<0?0:r);n<r;)s[n]=t(i,i=e[++n]);return function(o){var a=Math.max(0,Math.min(r-1,Math.floor(o*=r)));return s[a](o-a)}}function hke(t){return function(){return t}}function Yw(t){return+t}var GU=[0,1];function cs(t){return t}function UI(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:hke(isNaN(e)?NaN:.5)}function dke(t,e){var n;return t>e&&(n=t,t=e,e=n),function(r){return Math.max(t,Math.min(e,r))}}function pke(t,e,n){var r=t[0],i=t[1],s=e[0],o=e[1];return i<r?(r=UI(i,r),s=n(o,s)):(r=UI(r,i),s=n(s,o)),function(a){return s(r(a))}}function gke(t,e,n){var r=Math.min(t.length,e.length)-1,i=new Array(r),s=new Array(r),o=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++o<r;)i[o]=UI(t[o],t[o+1]),s[o]=n(e[o],e[o+1]);return function(a){var l=Ny(t,a,1,r)-1;return s[l](i[l](a))}}function By(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function SA(){var t=GU,e=GU,n=Um,r,i,s,o=cs,a,l,c;function u(){var d=Math.min(t.length,e.length);return o!==cs&&(o=dke(t[0],t[d-1])),a=d>2?gke:pke,l=c=null,h}function h(d){return d==null||isNaN(d=+d)?s:(l||(l=a(t.map(r),e,n)))(r(o(d)))}return h.invert=function(d){return o(i((c||(c=a(e,t.map(r),Xw)))(d)))},h.domain=function(d){return arguments.length?(t=Array.from(d,Yw),u()):t.slice()},h.range=function(d){return arguments.length?(e=Array.from(d),u()):e.slice()},h.rangeRound=function(d){return e=Array.from(d),n=C6,u()},h.clamp=function(d){return arguments.length?(o=d?!0:cs,u()):o!==cs},h.interpolate=function(d){return arguments.length?(n=d,u()):n},h.unknown=function(d){return arguments.length?(s=d,h):s},function(d,m){return r=d,i=m,u()}}function P6(){return SA()(cs,cs)}function mke(t){return Math.abs(t=Math.round(t))>
vendor: 3,284 bytes, line 3524
3524=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function Kw(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function mm(t){return t=Kw(Math.abs(t)),t?t[1]:NaN}function vke(t,e){return function(n,r){for(var i=n.length,s=[],o=0,a=t[0],l=0;i>0&&a>0&&(l+a+1>r&&(a=Math.max(1,r-l)),s.push(n.substring(i-=a,i+a)),!((l+=a+1)>r));)a=t[o=(o+1)%t.length];return s.reverse().join(e)}}function yke(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var bke=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function jv(t){if(!(e=bke.exec(t)))throw new Error("invalid format: "+t);var e;return new I6({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}jv.prototype=I6.prototype;function I6(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}I6.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function _ke(t){e:for(var e=t.length,n=1,r=-1,i;n<e;++n)switch(t[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+t[n])break e;r>0&&(r=0);break}return r>0?t.slice(0,r)+t.slice(i+1):t}var CY;function wke(t,e){var n=Kw(t,e);if(!n)return t+"";var r=n[0],i=n[1],s=i-(CY=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=r.length;return s===o?r:s>o?r+new Array(s-o+1).join("0"):s>0?r.slice(0,s)+"."+r.slice(s):"0."+new Array(1-s).join("0")+Kw(t,Math.max(0,e+s-1))[0]}function ZU(t,e){var n=Kw(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const JU={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:mke,e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>ZU(t*100,e),r:ZU,s:wke,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function ez(t){return t}var tz=Array.prototype.map,nz=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function xke(t){var e=t.grouping===void 0||t.thousands===void 0?ez:vke(tz.call(t.grouping,Number),t.thousands+""),n=t.currency===void 0?"":t.currency[0]+"",r=t.currency===void 0?"":t.currency[1]+"",i=t.decimal===void 0?".":t.decimal+"",s=t.numerals===void 0?ez:yke(tz.call(t.numerals,String)),o=t.percent===void 0?"%":t.percent+"",a=t.minus===void 0?"−":t.minus+"",l=t.nan===void 0?"NaN":t.nan+"";function c(h){h=jv(h);var d=h.fill,m=h.align,y=h.sign,v=h.symbol,b=h.zero,x=h.width,T=h.comma,E=h.precision,C=h.trim,I=h.type;I==="n"?(T=!0,I="g"):JU[I]||(E===void 0&&(E=12),C=!0,I="g"),(b||d==="0"&&m==="=")&&(b=!0,d="0",m="=");
vendor: 5,538 bytes, line 3524
3524var O=v==="$"?n:v==="#"&&/[boxX]/.test(I)?"0"+I.toLowerCase():"",N=v==="$"?r:/[%p]/.test(I)?o:"",U=JU[I],F=/[defgprs%]/.test(I);E=E===void 0?6:/[gprs]/.test(I)?Math.max(1,Math.min(21,E)):Math.max(0,Math.min(20,E));function H(W){var z=O,V=N,M,K,j;if(I==="c")V=U(W)+V,W="";else{W=+W;var q=W<0||1/W<0;if(W=isNaN(W)?l:U(Math.abs(W),E),C&&(W=_ke(W)),q&&+W==0&&y!=="+"&&(q=!1),z=(q?y==="("?y:a:y==="-"||y==="("?"":y)+z,V=(I==="s"?nz[8+CY/3]:"")+V+(q&&y==="("?")":""),F){for(M=-1,K=W.length;++M<K;)if(j=W.charCodeAt(M),48>j||j>57){V=(j===46?i+W.slice(M+1):W.slice(M))+V,W=W.slice(0,M);break}}}T&&!b&&(W=e(W,1/0));var Y=z.length+W.length+V.length,X=Y<x?new Array(x-Y+1).join(d):"";switch(T&&b&&(W=e(X+W,X.length?x-V.length:1/0),X=""),m){case"<":W=z+W+V+X;break;case"=":W=z+X+W+V;break;case"^":W=X.slice(0,Y=X.length>>1)+z+W+V+X.slice(Y);break;default:W=X+z+W+V;break}return s(W)}return H.toString=function(){return h+""},H}function u(h,d){var m=c((h=jv(h),h.type="f",h)),y=Math.max(-8,Math.min(8,Math.floor(mm(d)/3)))*3,v=Math.pow(10,-y),b=nz[8+y/3];return function(x){return m(v*x)+b}}return{format:c,formatPrefix:u}}var Zb,O6,PY;Ake({thousands:",",grouping:[3],currency:["$",""]});function Ake(t){return Zb=xke(t),O6=Zb.format,PY=Zb.formatPrefix,Zb}function Eke(t){return Math.max(0,-mm(Math.abs(t)))}function Ske(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(mm(e)/3)))*3-mm(Math.abs(t)))}function Tke(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,mm(e)-mm(t))+1}function IY(t,e,n,r){var i=DI(t,e,n),s;switch(r=jv(r??",f"),r.type){case"s":{var o=Math.max(Math.abs(t),Math.abs(e));return r.precision==null&&!isNaN(s=Ske(i,o))&&(r.precision=s),PY(r,o)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(s=Tke(i,Math.max(Math.abs(t),Math.abs(e))))&&(r.precision=s-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(s=Eke(i))&&(r.precision=s-(r.type==="%")*2);break}}return O6(r)}function gf(t){var e=t.domain;return t.ticks=function(n){var r=e();return kI(r[0],r[r.length-1],n??10)},t.tickFormat=function(n,r){var i=e();return IY(i[0],i[i.length-1],n??10,r)},t.nice=function(n){n==null&&(n=10);var r=e(),i=0,s=r.length-1,o=r[i],a=r[s],l,c,u=10;for(a<o&&(c=o,o=a,a=c,c=i,i=s,s=c);u-- >0;){if(c=NI(o,a,n),c===l)return r[i]=o,r[s]=a,e(r);if(c>0)o=Math.floor(o/c)*c,a=Math.ceil(a/c)*c;else if(c<0)o=Math.ceil(o*c)/c,a=Math.floor(a*c)/c;else break;l=c}return t},t}function Gw(){var t=P6();return t.copy=function(){return By(t,Gw())},$o.apply(t,arguments),gf(t)}function OY(t){var e;function n(r){return r==null||isNaN(r=+r)?e:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(t=Array.from(r,Yw),n):t.slice()},n.unknown=function(r){return arguments.length?(e=r,n):e},n.copy=function(){return OY(t).unknown(e)},t=arguments.length?Array.from(t,Yw):[0,1],gf(n)}function MY(t,e){t=t.slice();var n=0,r=t.length-1,i=t[n],s=t[r],o;return s<i&&(o=n,n=r,r=o,o=i,i=s,s=o),t[n]=e.floor(i),t[r]=e.ceil(s),t}function rz(t){return Math.log(t)}function iz(t){return Math.exp(t)}function Cke(t){return-Math.log(-t)}function Pke(t){return-Math.exp(-t)}function Ike(t){return isFinite(t)?+("1e"+t):t<0?0:t}function Oke(t){return t===10?Ike:t===Math.E?Math.exp:e=>Math.pow(t,e)}function Mke(t){return t===Math.E?Math.log:t===10&&Math.log10||t===2&&Math.log2||(t=Math.log(t),e=>Math.log(e)/t)}function sz(t){return(e,n)=>-t(-e,n)}function M6(t){const e=t(rz,iz),n=e.domain;let r=10,i,s;function o(){return i=Mke(r),s=Oke(r),n()[0]<0?(i=sz(i),s=sz(s),t(Cke,Pke)):t(rz,iz),e}return e.base=function(a){return arguments.length?(r=+a,o()):r},e.domain=function(a){return arguments.length?(n(a),o()):n()},e.ticks=a=>{const l=n();let c=l[0],u=l[l.length-1];const h=u<c;h&&([c,u]=[u,c]);let d=i(c),m=i(u),y,v;const b=a==null?10:+a;let x=[];if(!(r%1)&&m-d<b){if(d=Math.floor(d),m=Math.ceil(m),c>0){for(;d<=m;++d)for(y=1;y<r;++y)if(v=d<0?y/s(-d):y*s(d),!(v<c)){if(v>u)break;x.push(v)}}else for(;d<=m;++d)for(y=r-1;y>=1;--y)if(v=d>0?y/s(-d):y*s(d),!(v<c)){if(v>u)break;x.push(v)}x.length*2<b&&(x=kI(c,u,b))}else x=kI(d,m,Math.min(m-d,b)).map(s);return h?x.reverse():x},e.tickFormat=(a,l)=>{if(a==null&&(a=10),l==null&&(l=r===10?"s":","),typeof l!="function"&&(!(r%1)&&(l=jv(l)).precision==null&&(l.trim=!0),l=O6(l)),a===1/0)return l;const c=Math.max(1,r*a/e.ticks().length);return u=>{let h=u/s(Math.round(i(u)));return h*r<r-.5&&(h*=r),h<=c?l(u):""}},e.nice=()=>n(MY(n(),{floor:a=>s(Math.floor(i(a))),ceil:a=>s(Math.ceil(i(a)))})),e}function RY(){const t=M6(SA()).domain([1,10]);return t.copy=()=>By(t,RY()).base(t.base()),$o.apply(t,arguments),t}function oz(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function az(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function R6(t){var e=1,n=t(oz(e),az(e));return n.constant=function(r){return arguments.length?t(oz(e=+r),az(e)):e},gf(n)}function kY(){var t=R6(SA());return t.copy=function(){return By(t,kY()).constant(t.constant())},$o.apply(t,arguments)}function lz(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function Rke(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function kke(t){return t<0?-t*t:t*t}function k6(t){var e=t(cs,cs),n=1;function r(){return n===1?t(cs,cs):n===.5?t(Rke,kke):t(lz(n),lz(1/n))}return e.exponent=function(i){return arguments.length?(n=+i,r()):n},gf(e)}function N6(){var t=k6(SA());return t.copy=function(){return By(t,N6()).exponent(t.exponent())},$o.apply(t,arguments),t}function Nke(){return N6.apply(null,arguments).exponent(.5)}function cz(t){return Math.sign(t)*t*t}
3524function Dke(t){return Math.sign(t)*Math.sqrt(Math.abs(t))}function NY(){var t=P6(),e=[0,1],n=!1,r;function i(s){var o=Dke(t(s));return isNaN(o)?r:n?Math.round(o):o}return i.invert=function(s){return t.invert(cz(s))},i.domain=function(s){return arguments.length?(t.domain(s),i):t.domain()},i.range=function(s){return arguments.length?(t.range((e=Array.from(s,Yw)).map(cz)),i):e.slice()},i.rangeRound=function(s){return i.range(s).round(!0)},i.round=function(s){return arguments.length?(n=!!s,i):n},i.clamp=function(s){return arguments.length?(t.clamp(s),i):t.clamp()},i.unknown=function(s){return arguments.length?(r=s,i):r},i.copy=function(){return NY(t.domain(),e).round(n).clamp(t.clamp()).unknown(r)},$o.apply(i,arguments),gf(i)}function DY(){var t=[],e=[],n=[],r;function i(){var o=0,a=Math.max(1,e.length);for(n=new Array(a-1);++o<a;)n[o-1]=zRe(t,o/a);return s}function s(o){return o==null||isNaN(o=+o)?r:e[Ny(n,o)]}return s.invertExtent=function(o){var a=e.indexOf(o);return a<0?[NaN,NaN]:[a>0?n[a-1]:t[0],a<n.length?n[a]:t[t.length-1]]},s.domain=function(o){if(!arguments.length)return t.slice();t=[];for(let a of o)a!=null&&!isNaN(a=+a)&&t.push(a);return t.sort(sf),i()},s.range=function(o){return arguments.length?(e=Array.from(o),i()):e.slice()},s.unknown=function(o){return arguments.length?(r=o,s):r},s.quantiles=function(){return n.slice()},s.copy=function(){return DY().domain(t).range(e).unknown(r)},$o.apply(s,arguments)}function BY(){var t=0,e=1,n=1,r=[.5],i=[0,1],s;function o(l){return l!=null&&l<=l?i[Ny(r,l,0,n)]:s}function a(){var l=-1;for(r=new Array(n);++l<n;)r[l]=((l+1)*e-(l-n)*t)/(n+1);return o}return o.domain=function(l){return arguments.length?([t,e]=l,t=+t,e=+e,a()):[t,e]},o.range=function(l){return arguments.length?(n=(i=Array.from(l)).length-1,a()):i.slice()},o.invertExtent=function(l){var c=i.indexOf(l);return c<0?[NaN,NaN]:c<1?[t,r[0]]:c>=n?[r[n-1],e]:[r[c-1],r[c]]},o.unknown=function(l){return arguments.length&&(s=l),o},o.thresholds=function(){return r.slice()},o.copy=function(){return BY().domain([t,e]).range(i).unknown(s)},$o.apply(gf(o),arguments)}function LY(){var t=[.5],e=[0,1],n,r=1;function i(s){return s!=null&&s<=s?e[Ny(t,s,0,r)]:n}return i.domain=function(s){return arguments.length?(t=Array.from(s),r=Math.min(t.length,e.length-1),i):t.slice()},i.range=function(s){return arguments.length?(e=Array.from(s),r=Math.min(t.length,e.length-1),i):e.slice()},i.invertExtent=function(s){var o=e.indexOf(s);return[t[o-1],t[o]]},i.unknown=function(s){return arguments.length?(n=s,i):n},i.copy=function(){return LY().domain(t).range(e).unknown(n)},$o.apply(i,arguments)}const jC=new Date,VC=new Date;function Yr(t,e,n,r){function i(s){return t(s=arguments.length===0?new Date:new Date(+s)),s}return i.floor=s=>(t(s=new Date(+s)),s),i.ceil=s=>(t(s=new Date(s-1)),e(s,1),t(s),s),i.round=s=>{const o=i(s),a=i.ceil(s);return s-o<a-s?o:a},i.offset=(s,o)=>(e(s=new Date(+s),o==null?1:Math.floor(o)),s),i.range=(s,o,a)=>{const l=[];if(s=i.ceil(s),a=a==null?1:Math.floor(a),!(s<o)||!(a>0))return l;let c;do l.push(c=new Date(+s)),e(s,a),t(s);while(c<s&&s<o);return l},i.filter=s=>Yr(o=>{if(o>=o)for(;t(o),!s(o);)o.setTime(o-1)},(o,a)=>{if(o>=o)if(a<0)for(;++a<=0;)for(;e(o,-1),!s(o););else for(;--a>=0;)for(;e(o,1),!s(o););}),n&&(i.count=(s,o)=>(jC.setTime(+s),VC.setTime(+o),t(jC),t(VC),Math.floor(n(jC,VC))),i.every=s=>(s=Math.floor(s),!isFinite(s)||!(s>0)?null:s>1?i.filter(r?o=>r(o)%s===0:o=>i.count(0,o)%s===0):i)),i}const Zw=Yr(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);Zw.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?Yr(e=>{e.setTime(Math.floor(e/t)*t)},(e,n)=>{e.setTime(+e+n*t)},(e,n)=>(n-e)/t):Zw);Zw.range;const Pc=1e3,Fo=Pc*60,Ic=Fo*60,Fc=Ic*24,D6=Fc*7,uz=Fc*30,WC=Fc*365,kh=Yr(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*Pc)},(t,e)=>(e-t)/Pc,t=>t.getUTCSeconds());kh.range;const B6=Yr(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*Pc)},(t,e)=>{t.setTime(+t+e*Fo)},(t,e)=>(e-t)/Fo,t=>t.getMinutes());B6.range;const L6=Yr(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*Fo)},(t,e)=>(e-t)/Fo,t=>t.getUTCMinutes());L6.range;const F6=Yr(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*Pc-t.getMinutes()*Fo)},(t,e)=>{t.setTime(+t+e*Ic)},(t,e)=>(e-t)/Ic,t=>t.getHours());F6.range;const U6=Yr(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*Ic)},(t,e)=>(e-t)/Ic,t=>t.getUTCHours());U6.range;const z6=Yr(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*Fo)/Fc,t=>t.getDate()-1);z6.range;const FY=Yr(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/Fc,t=>t.getUTCDate()-1);FY.range;const UY=Yr(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/Fc,t=>Math.floor(t/Fc));UY.range;function bd(t){return Yr(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,n)=>{e.setDate(e.getDate()+n*7)},(e,n)=>(n-e-(n.getTimezoneOffset()-e.getTimezoneOffset())*Fo)/D6)}const j6=bd(0),Bke=bd(1),Lke=bd(2),Fke=bd(3),Uke=bd(4),zke=bd(5),jke=bd(6);j6.range;Bke.range;Lke.range;Fke.range;Uke.range;zke.range;jke.range;function _d(t){return Yr(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n*7)},(e,n)=>(n-e)/D6)}const V6=_d(0),Vke=_d(1),Wke=_d(2),$ke=_d(3),Hke=_d(4),qke=_d(5),Qke=_d(6);V6.range;Vke.range;Wke.range;$ke.range;Hke.range;qke.range;Qke.range;const W6=Yr(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth());W6.range;const $6=Yr(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth());$6.range;const TA=Yr(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());TA.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:Yr(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,n)=>{e.setFullYear(e.getFullYear()+n*t)});TA.range;const CA=Yr(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());CA.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:Yr(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)});CA.range;function zY(t,e,n,r,i,s){const o=[[kh,1,Pc],[kh,5,5*Pc],[kh,15,15*Pc],[kh,30,30*Pc],[s,1,Fo],[s,5,5*Fo],[s,15,15*Fo],[s,30,30*Fo],[i,1,Ic],[i,3,3*Ic],[i,6,6*Ic],[i,12,12*Ic],[r,1,Fc],[r,2,2*Fc],[n,1,D6],[e,1,uz],[e,3,3*uz],[t,1,WC]];function a(c,u,h){const d=u<c;d&&([c,u]=[u,c]);const m=h&&typeof h.range=="function"?h:l(c,u,h),y=m?m.range(c,+u+1):[];return d?y.reverse():y}function l(c,u,h){const d=Math.abs(u-c)/h,m=A6(([,,b])=>b).right(o,d);if(m===o.length)return t.every(DI(c/WC,u/WC,h));if(m===0)return Zw.every(Math.max(DI(c,u,h),1));const[y,v]=o[d/o[m-1][2]<o[m][2]/d?m-1:m];return y.every(v)}return[a,l]}const[Xke,Yke]=zY(CA,$6,V6,UY,U6,L6),[Kke,Gke]=zY(TA,W6,j6,z6,F6,B6),$C=new Date,HC=new Date;function Fl(t,e,n,r){function i(s){return t(s=arguments.length===0?new Date:new Date(+s)),s}return i.floor=s=>(t(s=new Date(+s)),s),i.ceil=s=>(t(s=new Date(s-1)),e(s,1),t(s),s),i.round=s=>{const o=i(s),a=i.ceil(s);return s-o<a-s?o:a},i.offset=(s,o)=>(e(s=new Date(+s),o==null?1:Math.floor(o)),s),i.range=(s,o,a)=>{const l=[];
vendor: 6,826 bytes, line 3524
3524if(s=i.ceil(s),a=a==null?1:Math.floor(a),!(s<o)||!(a>0))return l;let c;do l.push(c=new Date(+s)),e(s,a),t(s);while(c<s&&s<o);return l},i.filter=s=>Fl(o=>{if(o>=o)for(;t(o),!s(o);)o.setTime(o-1)},(o,a)=>{if(o>=o)if(a<0)for(;++a<=0;)for(;e(o,-1),!s(o););else for(;--a>=0;)for(;e(o,1),!s(o););}),n&&(i.count=(s,o)=>($C.setTime(+s),HC.setTime(+o),t($C),t(HC),Math.floor(n($C,HC))),i.every=s=>(s=Math.floor(s),!isFinite(s)||!(s>0)?null:s>1?i.filter(r?o=>r(o)%s===0:o=>i.count(0,o)%s===0):i)),i}const Zke=1e3,H6=Zke*60,Jke=H6*60,Vv=Jke*24,jY=Vv*7,q6=Fl(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*H6)/Vv,t=>t.getDate()-1);q6.range;const Q6=Fl(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/Vv,t=>t.getUTCDate()-1);Q6.range;const e8e=Fl(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/Vv,t=>Math.floor(t/Vv));e8e.range;function wd(t){return Fl(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,n)=>{e.setDate(e.getDate()+n*7)},(e,n)=>(n-e-(n.getTimezoneOffset()-e.getTimezoneOffset())*H6)/jY)}const VY=wd(0),Jw=wd(1),t8e=wd(2),n8e=wd(3),vm=wd(4),r8e=wd(5),i8e=wd(6);VY.range;Jw.range;t8e.range;n8e.range;vm.range;r8e.range;i8e.range;function xd(t){return Fl(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n*7)},(e,n)=>(n-e)/jY)}const WY=xd(0),ex=xd(1),s8e=xd(2),o8e=xd(3),ym=xd(4),a8e=xd(5),l8e=xd(6);WY.range;ex.range;s8e.range;o8e.range;ym.range;a8e.range;l8e.range;const sd=Fl(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());sd.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:Fl(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,n)=>{e.setFullYear(e.getFullYear()+n*t)});sd.range;const od=Fl(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());od.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:Fl(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)});od.range;function qC(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function QC(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function E1(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}function c8e(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,s=t.days,o=t.shortDays,a=t.months,l=t.shortMonths,c=S1(i),u=T1(i),h=S1(s),d=T1(s),m=S1(o),y=T1(o),v=S1(a),b=T1(a),x=S1(l),T=T1(l),E={a:q,A:Y,b:X,B:te,c:null,d:mz,e:mz,f:R8e,g:V8e,G:$8e,H:I8e,I:O8e,j:M8e,L:$Y,m:k8e,M:N8e,p:D,q:$,Q:bz,s:_z,S:D8e,u:B8e,U:L8e,V:F8e,w:U8e,W:z8e,x:null,X:null,y:j8e,Y:W8e,Z:H8e,"%":yz},C={a:he,A:Se,b:fe,B:$e,c:null,d:vz,e:vz,f:Y8e,g:sNe,G:aNe,H:q8e,I:Q8e,j:X8e,L:qY,m:K8e,M:G8e,p:Ze,q:ce,Q:bz,s:_z,S:Z8e,u:J8e,U:eNe,V:tNe,w:nNe,W:rNe,x:null,X:null,y:iNe,Y:oNe,Z:lNe,"%":yz},I={a:H,A:W,b:z,B:V,c:M,d:pz,e:pz,f:S8e,g:dz,G:hz,H:gz,I:gz,j:w8e,L:E8e,m:_8e,M:x8e,p:F,q:b8e,Q:C8e,s:P8e,S:A8e,u:p8e,U:g8e,V:m8e,w:d8e,W:v8e,x:K,X:j,y:dz,Y:hz,Z:y8e,"%":T8e};E.x=O(n,E),E.X=O(r,E),E.c=O(e,E),C.x=O(n,C),C.X=O(r,C),C.c=O(e,C);function O(me,de){return function(ye){var ve=[],ue=-1,k=0,ie=me.length,ne,Z,J;for(ye instanceof Date||(ye=new Date(+ye));++ue<ie;)me.charCodeAt(ue)===37&&(ve.push(me.slice(k,ue)),(Z=fz[ne=me.charAt(++ue)])!=null?ne=me.charAt(++ue):Z=ne==="e"?" ":"0",(J=de[ne])&&(ne=J(ye,Z)),ve.push(ne),k=ue+1);return ve.push(me.slice(k,ue)),ve.join("")}}function N(me,de){return function(ye){var ve=E1(1900,void 0,1),ue=U(ve,me,ye+="",0),k,ie;if(ue!=ye.length)return null;if("Q"in ve)return new Date(ve.Q);if("s"in ve)return new Date(ve.s*1e3+("L"in ve?ve.L:0));if(de&&!("Z"in ve)&&(ve.Z=0),"p"in ve&&(ve.H=ve.H%12+ve.p*12),ve.m===void 0&&(ve.m="q"in ve?ve.q:0),"V"in ve){if(ve.V<1||ve.V>53)return null;"w"in ve||(ve.w=1),"Z"in ve?(k=QC(E1(ve.y,0,1)),ie=k.getUTCDay(),k=ie>4||ie===0?ex.ceil(k):ex(k),k=Q6.offset(k,(ve.V-1)*7),ve.y=k.getUTCFullYear(),ve.m=k.getUTCMonth(),ve.d=k.getUTCDate()+(ve.w+6)%7):(k=qC(E1(ve.y,0,1)),ie=k.getDay(),k=ie>4||ie===0?Jw.ceil(k):Jw(k),k=q6.offset(k,(ve.V-1)*7),ve.y=k.getFullYear(),ve.m=k.getMonth(),ve.d=k.getDate()+(ve.w+6)%7)}else("W"in ve||"U"in ve)&&("w"in ve||(ve.w="u"in ve?ve.u%7:"W"in ve?1:0),ie="Z"in ve?QC(E1(ve.y,0,1)).getUTCDay():qC(E1(ve.y,0,1)).getDay(),ve.m=0,ve.d="W"in ve?(ve.w+6)%7+ve.W*7-(ie+5)%7:ve.w+ve.U*7-(ie+6)%7);return"Z"in ve?(ve.H+=ve.Z/100|0,ve.M+=ve.Z%100,QC(ve)):qC(ve)}}function U(me,de,ye,ve){for(var ue=0,k=de.length,ie=ye.length,ne,Z;ue<k;){if(ve>=ie)return-1;if(ne=de.charCodeAt(ue++),ne===37){if(ne=de.charAt(ue++),Z=I[ne in fz?de.charAt(ue++):ne],!Z||(ve=Z(me,ye,ve))<0)return-1}else if(ne!=ye.charCodeAt(ve++))return-1}return ve}function F(me,de,ye){var ve=c.exec(de.slice(ye));return ve?(me.p=u.get(ve[0].toLowerCase()),ye+ve[0].length):-1}function H(me,de,ye){var ve=m.exec(de.slice(ye));return ve?(me.w=y.get(ve[0].toLowerCase()),ye+ve[0].length):-1}function W(me,de,ye){var ve=h.exec(de.slice(ye));return ve?(me.w=d.get(ve[0].toLowerCase()),ye+ve[0].length):-1}function z(me,de,ye){var ve=x.exec(de.slice(ye));return ve?(me.m=T.get(ve[0].toLowerCase()),ye+ve[0].length):-1}function V(me,de,ye){var ve=v.exec(de.slice(ye));return ve?(me.m=b.get(ve[0].toLowerCase()),ye+ve[0].length):-1}function M(me,de,ye){return U(me,e,de,ye)}function K(me,de,ye){return U(me,n,de,ye)}function j(me,de,ye){return U(me,r,de,ye)}function q(me){return o[me.getDay()]}function Y(me){return s[me.getDay()]}function X(me){return l[me.getMonth()]}function te(me){return a[me.getMonth()]}function D(me){return i[+(me.getHours()>=12)]}function $(me){return 1+~~(me.getMonth()/3)}function he(me){return o[me.getUTCDay()]}function Se(me){return s[me.getUTCDay()]}function fe(me){return l[me.getUTCMonth()]}function $e(me){return a[me.getUTCMonth()]}function Ze(me){return i[+(me.getUTCHours()>=12)]}function ce(me){return 1+~~(me.getUTCMonth()/3)}return{format:function(me){var de=O(me+="",E);return de.toString=function(){return me},de},parse:function(me){var de=N(me+="",!1);return de.toString=function(){return me},de},utcFormat:function(me){var de=O(me+="",C);return de.toString=function(){return me},de},utcParse:function(me){var de=N(me+="",!0);return de.toString=function(){return me},de}}}var fz={"-":"",_:" ",0:"0"},hi=/^\s*\d+/,u8e=/^%/,f8e=/[\\^$*+?|[\]().{}]/g;function mn(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",s=i.length;return r+(s<n?new Array(n-s+1).join(e)+i:i)}
vendor: 4,512 bytes, line 3524
3524function h8e(t){return t.replace(f8e,"\\$&")}function S1(t){return new RegExp("^(?:"+t.map(h8e).join("|")+")","i")}function T1(t){return new Map(t.map((e,n)=>[e.toLowerCase(),n]))}function d8e(t,e,n){var r=hi.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function p8e(t,e,n){var r=hi.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function g8e(t,e,n){var r=hi.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function m8e(t,e,n){var r=hi.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function v8e(t,e,n){var r=hi.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function hz(t,e,n){var r=hi.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function dz(t,e,n){var r=hi.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function y8e(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function b8e(t,e,n){var r=hi.exec(e.slice(n,n+1));return r?(t.q=r[0]*3-3,n+r[0].length):-1}function _8e(t,e,n){var r=hi.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function pz(t,e,n){var r=hi.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function w8e(t,e,n){var r=hi.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function gz(t,e,n){var r=hi.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function x8e(t,e,n){var r=hi.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function A8e(t,e,n){var r=hi.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function E8e(t,e,n){var r=hi.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function S8e(t,e,n){var r=hi.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function T8e(t,e,n){var r=u8e.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function C8e(t,e,n){var r=hi.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function P8e(t,e,n){var r=hi.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function mz(t,e){return mn(t.getDate(),e,2)}function I8e(t,e){return mn(t.getHours(),e,2)}function O8e(t,e){return mn(t.getHours()%12||12,e,2)}function M8e(t,e){return mn(1+q6.count(sd(t),t),e,3)}function $Y(t,e){return mn(t.getMilliseconds(),e,3)}function R8e(t,e){return $Y(t,e)+"000"}function k8e(t,e){return mn(t.getMonth()+1,e,2)}function N8e(t,e){return mn(t.getMinutes(),e,2)}function D8e(t,e){return mn(t.getSeconds(),e,2)}function B8e(t){var e=t.getDay();return e===0?7:e}function L8e(t,e){return mn(VY.count(sd(t)-1,t),e,2)}function HY(t){var e=t.getDay();return e>=4||e===0?vm(t):vm.ceil(t)}function F8e(t,e){return t=HY(t),mn(vm.count(sd(t),t)+(sd(t).getDay()===4),e,2)}function U8e(t){return t.getDay()}function z8e(t,e){return mn(Jw.count(sd(t)-1,t),e,2)}function j8e(t,e){return mn(t.getFullYear()%100,e,2)}function V8e(t,e){return t=HY(t),mn(t.getFullYear()%100,e,2)}function W8e(t,e){return mn(t.getFullYear()%1e4,e,4)}function $8e(t,e){var n=t.getDay();return t=n>=4||n===0?vm(t):vm.ceil(t),mn(t.getFullYear()%1e4,e,4)}function H8e(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+mn(e/60|0,"0",2)+mn(e%60,"0",2)}function vz(t,e){return mn(t.getUTCDate(),e,2)}function q8e(t,e){return mn(t.getUTCHours(),e,2)}function Q8e(t,e){return mn(t.getUTCHours()%12||12,e,2)}function X8e(t,e){return mn(1+Q6.count(od(t),t),e,3)}function qY(t,e){return mn(t.getUTCMilliseconds(),e,3)}function Y8e(t,e){return qY(t,e)+"000"}function K8e(t,e){return mn(t.getUTCMonth()+1,e,2)}function G8e(t,e){return mn(t.getUTCMinutes(),e,2)}function Z8e(t,e){return mn(t.getUTCSeconds(),e,2)}function J8e(t){var e=t.getUTCDay();return e===0?7:e}function eNe(t,e){return mn(WY.count(od(t)-1,t),e,2)}function QY(t){var e=t.getUTCDay();return e>=4||e===0?ym(t):ym.ceil(t)}function tNe(t,e){return t=QY(t),mn(ym.count(od(t),t)+(od(t).getUTCDay()===4),e,2)}function nNe(t){return t.getUTCDay()}function rNe(t,e){return mn(ex.count(od(t)-1,t),e,2)}function iNe(t,e){return mn(t.getUTCFullYear()%100,e,2)}function sNe(t,e){return t=QY(t),mn(t.getUTCFullYear()%100,e,2)}function oNe(t,e){return mn(t.getUTCFullYear()%1e4,e,4)}function aNe(t,e){var n=t.getUTCDay();return t=n>=4||n===0?ym(t):ym.ceil(t),mn(t.getUTCFullYear()%1e4,e,4)}function lNe(){return"+0000"}function yz(){return"%"}function bz(t){return+t}function _z(t){return Math.floor(+t/1e3)}var cg,XY,YY;cNe({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Frid
3524ay","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function cNe(t){return cg=c8e(t),XY=cg.format,cg.parse,YY=cg.utcFormat,cg.utcParse,cg}function uNe(t){return new Date(t)}function fNe(t){return t instanceof Date?+t:+new Date(+t)}function X6(t,e,n,r,i,s,o,a,l,c){var u=P6(),h=u.invert,d=u.domain,m=c(".%L"),y=c(":%S"),v=c("%I:%M"),b=c("%I %p"),x=c("%a %d"),T=c("%b %d"),E=c("%B"),C=c("%Y");function I(O){return(l(O)<O?m:a(O)<O?y:o(O)<O?v:s(O)<O?b:r(O)<O?i(O)<O?x:T:n(O)<O?E:C)(O)}return u.invert=function(O){return new Date(h(O))},u.domain=function(O){return arguments.length?d(Array.from(O,fNe)):d().map(uNe)},u.ticks=function(O){var N=d();return t(N[0],N[N.length-1],O??10)},u.tickFormat=function(O,N){return N==null?I:c(N)},u.nice=function(O){var N=d();return(!O||typeof O.range!="function")&&(O=e(N[0],N[N.length-1],O??10)),O?d(MY(N,O)):u},u.copy=function(){return By(u,X6(t,e,n,r,i,s,o,a,l,c))},u}function hNe(){return $o.apply(X6(Kke,Gke,TA,W6,j6,z6,F6,B6,kh,XY).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function dNe(){return $o.apply(X6(Xke,Yke,CA,$6,V6,FY,U6,L6,kh,YY).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function PA(){var t=0,e=1,n,r,i,s,o=cs,a=!1,l;function c(h){return h==null||isNaN(h=+h)?l:o(i===0?.5:(h=(s(h)-n)*i,a?Math.max(0,Math.min(1,h)):h))}c.domain=function(h){return arguments.length?([t,e]=h,n=s(t=+t),r=s(e=+e),i=n===r?0:1/(r-n),c):[t,e]},c.clamp=function(h){return arguments.length?(a=!!h,c):a},c.interpolator=function(h){return arguments.length?(o=h,c):o};function u(h){return function(d){var m,y;return arguments.length?([m,y]=d,o=h(m,y),c):[o(0),o(1)]}}return c.range=u(Um),c.rangeRound=u(C6),c.unknown=function(h){return arguments.length?(l=h,c):l},function(h){return s=h,n=h(t),r=h(e),i=n===r?0:1/(r-n),c}}function mf(t,e){return e.domain(t.domain()).interpolator(t.interpolator()).clamp(t.clamp()).unknown(t.unknown())}function KY(){var t=gf(PA()(cs));return t.copy=function(){return mf(t,KY())},jc.apply(t,arguments)}function GY(){var t=M6(PA()).domain([1,10]);return t.copy=function(){return mf(t,GY()).base(t.base())},jc.apply(t,arguments)}function ZY(){var t=R6(PA());return t.copy=function(){return mf(t,ZY()).constant(t.constant())},jc.apply(t,arguments)}function Y6(){var t=k6(PA());return t.copy=function(){return mf(t,Y6()).exponent(t.exponent())},jc.apply(t,arguments)}function pNe(){return Y6.apply(null,arguments).exponent(.5)}function JY(){var t=[],e=cs;function n(r){if(r!=null&&!isNaN(r=+r))return e((Ny(t,r,1)-1)/(t.length-1))}return n.domain=function(r){if(!arguments.length)return t.slice();t=[];for(let i of r)i!=null&&!isNaN(i=+i)&&t.push(i);return t.sort(sf),n},n.interpolator=function(r){return arguments.length?(e=r,n):e},n.range=function(){return t.map((r,i)=>e(i/(t.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(i,s)=>URe(t,s/r))},n.copy=function(){return JY(e).domain(t)},jc.apply(n,arguments)}function IA(){var t=0,e=.5,n=1,r=1,i,s,o,a,l,c=cs,u,h=!1,d;function m(v){return isNaN(v=+v)?d:(v=.5+((v=+u(v))-s)*(r*v<r*s?a:l),c(h?Math.max(0,Math.min(1,v)):v))}m.domain=function(v){return arguments.length?([t,e,n]=v,i=u(t=+t),s=u(e=+e),o=u(n=+n),a=i===s?0:.5/(s-i),l=s===o?0:.5/(o-s),r=s<i?-1:1,m):[t,e,n]},m.clamp=function(v){return arguments.length?(h=!!v,m):h},m.interpolator=function(v){return arguments.length?(c=v,m):c};function y(v){return function(b){var x,T,E;return arguments.length?([x,T,E]=b,c=fke(v,[x,T,E]),m):[c(0),c(.5),c(1)]}}return m.range=y(Um),m.rangeRound=y(C6),m.unknown=function(v){return arguments.length?(d=v,m):d},function(v){return u=v,i=v(t),s=v(e),o=v(n),a=i===s?0:.5/(s-i),l=s===o?0:.5/(o-s),r=s<i?-1:1,m}}function eK(){var t=gf(IA()(cs));return t.copy=function(){return mf(t,eK())},jc.apply(t,arguments)}function tK(){var t=M6(IA()).domain([.1,1,10]);return t.copy=function(){return mf(t,tK()).base(t.base())},jc.apply(t,arguments)}function nK(){var t=R6(IA());return t.copy=function(){return mf(t,nK()).constant(t.constant())},jc.apply(t,arguments)}function K6(){var t=k6(IA());return t.copy=function(){return mf(t,K6()).exponent(t.exponent())},jc.apply(t,arguments)}function gNe(){return K6.apply(null,arguments).exponent(.5)}const wz=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:Lv,scaleDiverging:eK,scaleDivergingLog:tK,scaleDivergingPow:K6,scaleDivergingSqrt:gNe,scaleDivergingSymlog:nK,scaleIdentity:OY,scaleImplicit:BI,scaleLinear:Gw,scaleLog:RY,scaleOrdinal:E6,scalePoint:fv,scalePow:N6,scaleQuantile:DY,scaleQuantize:BY,scaleRadial:NY,scaleSequential:KY,scaleSequentialLog:GY,scaleSequentialPow:Y6,scaleSequentialQuantile:JY,scaleSequentialSqrt:pNe,scaleSequentialSymlog:ZY,scaleSqrt:Nke,scaleSymlog:kY,scaleThreshold:LY,scaleTime:hNe,scaleUtc:dNe,tickFormat:IY},Symbol.toStringTag,{value:"Module"}));var XC,xz;function rK(){if(xz)return XC;xz=1;var t=Bm();function e(n,r,i){for(var s=-1,o=n.length;++s<o;){var a=n[s],l=r(a);if(l!=null&&(c===void 0?l===l&&!t(l):i(l,c)))var c=l,u=a}return u}return XC=e,XC}var YC,Az;
vendor: 67,490 bytes, lines 3524-3550
3524function mNe(){if(Az)return YC;Az=1;function t(e,n){return e>n}return YC=t,YC}var KC,Ez;function vNe(){if(Ez)return KC;Ez=1;var t=rK(),e=mNe(),n=Fm();function r(i){return i&&i.length?t(i,n,e):void 0}return KC=r,KC}var yNe=vNe();const OA=fn(yNe);var GC,Sz;function bNe(){if(Sz)return GC;Sz=1;function t(e,n){return e<n}return GC=t,GC}var ZC,Tz;function _Ne(){if(Tz)return ZC;Tz=1;var t=rK(),e=bNe(),n=Fm();function r(i){return i&&i.length?t(i,n,e):void 0}return ZC=r,ZC}var wNe=_Ne();const MA=fn(wNe);var JC,Cz;function xNe(){if(Cz)return JC;Cz=1;var t=o6(),e=pf(),n=oY(),r=Ds();function i(s,o){var a=r(s)?t:n;return a(s,e(o,3))}return JC=i,JC}var e5,Pz;function ANe(){if(Pz)return e5;Pz=1;var t=iY(),e=xNe();function n(r,i){return t(e(r,i),1)}return e5=n,e5}var ENe=ANe();const SNe=fn(ENe);var t5,Iz;function TNe(){if(Iz)return t5;Iz=1;var t=b6();function e(n,r){return t(n,r)}return t5=e,t5}var CNe=TNe();const G6=fn(CNe);var zm=1e9,PNe={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},J6,er=!0,Vo="[DecimalError] ",qh=Vo+"Invalid argument: ",Z6=Vo+"Exponent out of range: ",jm=Math.floor,Sh=Math.pow,INe=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,io,ci=1e7,Kn=7,iK=9007199254740991,tx=jm(iK/Kn),Et={};Et.absoluteValue=Et.abs=function(){var t=new this.constructor(this);return t.s&&(t.s=1),t};Et.comparedTo=Et.cmp=function(t){var e,n,r,i,s=this;if(t=new s.constructor(t),s.s!==t.s)return s.s||-t.s;if(s.e!==t.e)return s.e>t.e^s.s<0?1:-1;for(r=s.d.length,i=t.d.length,e=0,n=r<i?r:i;e<n;++e)if(s.d[e]!==t.d[e])return s.d[e]>t.d[e]^s.s<0?1:-1;return r===i?0:r>i^s.s<0?1:-1};Et.decimalPlaces=Et.dp=function(){var t=this,e=t.d.length-1,n=(e-t.e)*Kn;if(e=t.d[e],e)for(;e%10==0;e/=10)n--;return n<0?0:n};Et.dividedBy=Et.div=function(t){return Nc(this,new this.constructor(t))};Et.dividedToIntegerBy=Et.idiv=function(t){var e=this,n=e.constructor;return Wn(Nc(e,new n(t),0,1),n.precision)};Et.equals=Et.eq=function(t){return!this.cmp(t)};Et.exponent=function(){return Dr(this)};Et.greaterThan=Et.gt=function(t){return this.cmp(t)>0};Et.greaterThanOrEqualTo=Et.gte=function(t){return this.cmp(t)>=0};Et.isInteger=Et.isint=function(){return this.e>this.d.length-2};Et.isNegative=Et.isneg=function(){return this.s<0};Et.isPositive=Et.ispos=function(){return this.s>0};Et.isZero=function(){return this.s===0};Et.lessThan=Et.lt=function(t){return this.cmp(t)<0};Et.lessThanOrEqualTo=Et.lte=function(t){return this.cmp(t)<1};Et.logarithm=Et.log=function(t){var e,n=this,r=n.constructor,i=r.precision,s=i+5;if(t===void 0)t=new r(10);else if(t=new r(t),t.s<1||t.eq(io))throw Error(Vo+"NaN");if(n.s<1)throw Error(Vo+(n.s?"NaN":"-Infinity"));return n.eq(io)?new r(0):(er=!1,e=Nc(Wv(n,s),Wv(t,s),s),er=!0,Wn(e,i))};Et.minus=Et.sub=function(t){var e=this;return t=new e.constructor(t),e.s==t.s?aK(e,t):sK(e,(t.s=-t.s,t))};Et.modulo=Et.mod=function(t){var e,n=this,r=n.constructor,i=r.precision;if(t=new r(t),!t.s)throw Error(Vo+"NaN");return n.s?(er=!1,e=Nc(n,t,0,1).times(t),er=!0,n.minus(e)):Wn(new r(n),i)};Et.naturalExponential=Et.exp=function(){return oK(this)};Et.naturalLogarithm=Et.ln=function(){return Wv(this)};Et.negated=Et.neg=function(){var t=new this.constructor(this);return t.s=-t.s||0,t};Et.plus=Et.add=function(t){var e=this;return t=new e.constructor(t),e.s==t.s?sK(e,t):aK(e,(t.s=-t.s,t))};Et.precision=Et.sd=function(t){var e,n,r,i=this;if(t!==void 0&&t!==!!t&&t!==1&&t!==0)throw Error(qh+t);if(e=Dr(i)+1,r=i.d.length-1,n=r*Kn+1,r=i.d[r],r){for(;r%10==0;r/=10)n--;for(r=i.d[0];r>=10;r/=10)n++}return t&&e>n?e:n};Et.squareRoot=Et.sqrt=function(){var t,e,n,r,i,s,o,a=this,l=a.constructor;if(a.s<1){if(!a.s)return new l(0);throw Error(Vo+"NaN")}for(t=Dr(a),er=!1,i=Math.sqrt(+a),i==0||i==1/0?(e=El(a.d),(e.length+t)%2==0&&(e+="0"),i=Math.sqrt(e),t=jm((t+1)/2)-(t<0||t%2),i==1/0?e="5e"+t:(e=i.toExponential(),e=e.slice(0,e.indexOf("e")+1)+t),r=new l(e)):r=new l(i.toString()),n=l.precision,i=o=n+3;;)if(s=r,r=s.plus(Nc(a,s,o+2)).times(.5),El(s.d).slice(0,o)===(e=El(r.d)).slice(0,o)){if(e=e.slice(o-3,o+1),i==o&&e=="4999"){if(Wn(s,n+1,0),s.times(s).eq(a)){r=s;break}}else if(e!="9999")break;o+=4}return er=!0,Wn(r,n)};Et.times=Et.mul=function(t){var e,n,r,i,s,o,a,l,c,u=this,h=u.constructor,d=u.d,m=(t=new h(t)).d;if(!u.s||!t.s)return new h(0);for(t.s*=u.s,n=u.e+t.e,l=d.length,c=m.length,l<c&&(s=d,d=m,m=s,o=l,l=c,c=o),s=[],o=l+c,r=o;r--;)s.push(0);for(r=c;--r>=0;){for(e=0,i=l+r;i>r;)a=s[i]+m[r]*d[i-r-1]+e,s[i--]=a%ci|0,e=a/ci|0;s[i]=(s[i]+e)%ci|0}for(;!s[--o];)s.pop();return e?++n:s.shift(),t.d=s,t.e=n,er?Wn(t,h.precision):t};Et.toDecimalPlaces=Et.todp=function(t,e){var n=this,r=n.constructor;return n=new r(n),t===void 0?n:(kl(t,0,zm),e===void 0?e=r.rounding:kl(e,0,8),Wn(n,t+Dr(n)+1,e))};Et.toExponential=function(t,e){var n,r=this,i=r.constructor;return t===void 0?n=ad(r,!0):(kl(t,0,zm),e===void 0?e=i.rounding:kl(e,0,8),r=Wn(new i(r),t+1,e),n=ad(r,!0,t+1)),n};Et.toFixed=function(t,e){var n,r,i=this,s=i.constructor;return t===void 0?ad(i):(kl(t,0,zm),e===void 0?e=s.rounding:kl(e,0,8),r=Wn(new s(i),t+Dr(i)+1,e),n=ad(r.abs(),!1,t+Dr(r)+1),i.isneg()&&!i.isZero()?"-"+n:n)};Et.toInteger=Et.toint=function(){var t=this,e=t.constructor;return Wn(new e(t),Dr(t)+1,e.rounding)};Et.toNumber=function(){return+this};Et.toPower=Et.pow=function(t){var e,n,r,i,s,o,a=this,l=a.constructor,c=12,u=+(t=new l(t));if(!t.s)return new l(io);if(a=new l(a),!a.s){if(t.s<1)throw Error(Vo+"Infinity");return a}if(a.eq(io))return a;if(r=l.precision,t.eq(io))return Wn(a,r);if(e=t.e,n=t.d.length-1,o=e>=n,s=a.s,o){if((n=u<0?-u:u)<=iK){for(i=new l(io),e=Math.ceil(r/Kn+4),er=!1;n%2&&(i=i.times(a),Mz(i.d,e)),n=jm(n/2),n!==0;)a=a.times(a),Mz(a.d,e);return er=!0,t.s<0?new l(io).div(i):Wn(i,r)}}else if(s<0)throw Error(Vo+"NaN");return s=s<0&&t.d[Math.max(e,n)]&1?-1:1,a.s=1,er=!1,i=t.times(Wv(a,r+c)),er=!0,i=oK(i),i.s=s,i};Et.toPrecision=function(t,e){var n,r,i=this,s=i.constructor;return t===void 0?(n=Dr(i),r=ad(i,n<=s.toExpNeg||n>=s.toExpPos)):(kl(t,1,zm),e===void 0?e=s.rounding:kl(e,0,8),i=Wn(new s(i),t,e),n=Dr(i),r=ad(i,t<=n||n<=s.toExpNeg,t)),r};Et.toSignificantDigits=Et.tosd=function(t,e){var n=this,r=n.constructor;return t===void 0?(t=r.precision,e=r.rounding):(kl(t,1,zm),e===void 0?e=r.rounding:kl(e,0,8)),Wn(new r(n),t,e)};Et.toString=Et.valueOf=Et.val=Et.toJSON=Et[Symbol.for("nodejs.util.inspect.custom")]=function(){var t=this,e=Dr(t),n=t.constructor;return ad(t,e<=n.toExpNeg||e>=n.toExpPos)};function sK(t,e){var n,r,i,s,o,a,l,c,u=t.constructor,h=u.precision;if(!t.s||!e.s)return e.s||(e=new u(t)),er?Wn(e,h):e;if(l=t.d,c=e.d,o=t.e,i=e.e,l=l.slice(),s=o-i,s){for(s<0?(r=l,s=-s,a=c.length):(r=c,i=o,a=l.length),o=Math.ceil(h/Kn),a=o>a?o+1:a+1,s>a&&(s=a,r.length=1),r.reverse();s--;)r.push(0);r.reverse()}for(a=l.length,s=c.length,a-s<0&&(s=a,r=c,c=l,l=r),n=0;s;)n=(l[--s]=l[s]+c[s]+n)/ci|0,l[s]%=ci;for(n&&(l.unshift(n),++i),a=l.length;l[--a]==0;)l.pop();return e.d=l,e.e=i,er?Wn(e,h):e}function kl(t,e,n){if(t!==~~t||t<e||t>n)throw Error(qh+t)}function El(t){var e,n,r,i=t.length-1,s="",o=t[0];if(i>0){for(s+=o,e=1;e<i;e++)r=t[e]+"",n=Kn-r.length,n&&(s+=Fu(n)),s+=r;o=t[e],r=o+"",n=Kn-r.length,n&&(s+=Fu(n))}else if(o===0)return"0";for(;o%10===0;)o/=10;return s+o}var Nc=(function(){function t(r,i){var s,o=0,a=r.length;for(r=r.slice();a--;)s=r[a]*i+o,r[a]=s%ci|0,o=s/ci|0;return o&&r.unshift(o),r}function e(r,i,s,o){var a,l;if(s!=o)l=s>o?1:-1;else for(a=l=0;a<s;a++)if(r[a]!=i[a]){l=r[a]>i[a]?1:-1;break}return l}function n(r,i,s){for(var o=0;s--;)r[s]-=o,o=r[s]<i[s]?1:0,r[s]=o*ci+r[s]-i[s];for(;!r[0]&&r.length>1;)r.shift()}return function(r,i,s,o){var a,l,c,u,h,d,m,y,v,b,x,T,E,C,I,O,N,U,F=r.constructor,H=r.s==i.s?1:-1,W=r.d,z=i.d;if(!r.s)return new F(r);if(!i.s)throw Error(Vo+"Division by zero");for(l=r.e-i.e,N=z.length,I=W.length,m=new F(H),y=m.d=[],c=0;z[c]==(W[c]||0);)++c;if(z[c]>(W[c]||0)&&--l,s==null?T=s=F.precision:o?T=s+(Dr(r)-Dr(i))+1:T=s,T<0)return new F(0);if(T=T/Kn+2|0,c=0,N==1)for(u=0,z=z[0],T++;(c<I||u)&&T--;c++)E=u*ci+(W[c]||0),y[c]=E/z|0,u=E%z|0;else{for(u=ci/(z[0]+1)|0,u>1&&(z=t(z,u),W=t(W,u),N=z.length,I=W.length),C=N,v=W.slice(0,N),b=v.length;b<N;)v[b++]=0;U=z.slice(),U.unshift(0),O=z[0],z[1]>=ci/2&&++O;do u=0,a=e(z,v,N,b),a<0?(x=v[0],N!=b&&(x=x*ci+(v[1]||0)),u=x/O|0,u>1?(u>=ci&&(u=ci-1),h=t(z,u),d=h.length,b=v.length,a=e(h,v,d,b),a==1&&(u--,n(h,N<d?U:z,d))):(u==0&&(a=u=1),h=z.slice()),d=h.length,d<b&&h.unshift(0),n(v,h,b),a==-1&&(b=v.length,a=e(z,v,N,b),a<1&&(u++,n(v,N<b?U:z,b))),b=v.length):a===0&&(u++,v=[0]),y[c++]=u,a&&v[0]?v[b++]=W[C]||0:(v=[W[C]],b=1);while((C++<I||v[0]!==void 0)&&T--)}return y[0]||y.shift(),m.e=l,Wn(m,o?s+Dr(m)+1:s)}})();function oK(t,e){var n,r,i,s,o,a,l=0,c=0,u=t.constructor,h=u.precision;if(Dr(t)>16)throw Error(Z6+Dr(t));if(!t.s)return new u(io);for(er=!1,a=h,o=new u(.03125);t.abs().gte(.1);)t=t.times(o),c+=5;for(r=Math.log(Sh(2,c))/Math.LN10*2+5|0,a+=r,n=i=s=new u(io),u.precision=a;;){if(i=Wn(i.times(t),a),n=n.times(++l),o=s.plus(Nc(i,n,a)),El(o.d).slice(0,a)===El(s.d).slice(0,a)){for(;c--;)s=Wn(s.times(s),a);return u.precision=h,e==null?(er=!0,Wn(s,h)):s}s=o}}function Dr(t){for(var e=t.e*Kn,n=t.d[0];n>=10;n/=10)e++;return e}function n5(t,e,n){if(e>t.LN10.sd())throw er=!0,n&&(t.precision=n),Error(Vo+"LN10 precision limit exceeded");return Wn(new t(t.LN10),e)}function Fu(t){for(var e="";t--;)e+="0";return e}function Wv(t,e){var n,r,i,s,o,a,l,c,u,h=1,d=10,m=t,y=m.d,v=m.constructor,b=v.precision;if(m.s<1)throw Error(Vo+(m.s?"NaN":"-Infinity"));if(m.eq(io))return new v(0);if(e==null?(er=!1,c=b):c=e,m.eq(10))return e==null&&(er=!0),n5(v,c);if(c+=d,v.precision=c,n=El(y),r=n.charAt(0),s=Dr(m),Math.abs(s)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)m=m.times(t),n=El(m.d),r=n.charAt(0),h++;s=Dr(m),r>1?(m=new v("0."+n),s++):m=new v(r+"."+n.slice(1))}else return l=n5(v,c+2,b).times(s+""),m=Wv(new v(r+"."+n.slice(1)),c-d).plus(l),v.precision=b,e==null?(er=!0,Wn(m,b)):m;for(a=o=m=Nc(m.minus(io),m.plus(io),c),u=Wn(m.times(m),c),i=3;;){if(o=Wn(o.times(u),c),l=a.plus(Nc(o,new v(i),c)),El(l.d).slice(0,c)===El(a.d).slice(0,c))return a=a.times(2),s!==0&&(a=a.plus(n5(v,c+2,b).times(s+""))),a=Nc(a,new v(h),c),v.precision=b,e==null?(er=!0,Wn(a,b)):a;a=l,i+=2}}function Oz(t,e){var n,r,i;for((n=e.indexOf("."))>-1&&(e=e.replace(".","")),(r=e.search(/e/i))>0?(n<0&&(n=r),n+=+e.slice(r+1),e=e.substring(0,r)):n<0&&(n=e.length),r=0;e.charCodeAt(r)===48;)++r;for(i=e.length;e.charCodeAt(i-1)===48;)--i;if(e=e.slice(r,i),e){if(i-=r,n=n-r-1,t.e=jm(n/Kn),t.d=[],r=(n+1)%Kn,n<0&&(r+=Kn),r<i){for(r&&t.d.push(+e.slice(0,r)),i-=Kn;r<i;)t.d.push(+e.slice(r,r+=Kn));e=e.slice(r),r=Kn-e.length}else r-=i;for(;r--;)e+="0";if(t.d.push(+e),er&&(t.e>tx||t.e<-tx))throw Error(Z6+n)}else t.s=0,t.e=0,t.d=[0];return t}function Wn(t,e,n){var r,i,s,o,a,l,c,u,h=t.d;for(o=1,s=h[0];s>=10;s/=10)o++;if(r=e-o,r<0)r+=Kn,i=e,c=h[u=0];else{if(u=Math.ceil((r+1)/Kn),s=h.length,u>=s)return t;for(c=s=h[u],o=1;s>=10;s/=10)o++;r%=Kn,i=r-Kn+o}if(n!==void 0&&(s=Sh(10,o-i-1),a=c/s%10|0,l=e<0||h[u+1]!==void 0||c%s,l=n<4?(a||l)&&(n==0||n==(t.s<0?3:2)):a>5||a==5&&(n==4||l||n==6&&(r>0?i>0?c/Sh(10,o-i):0:h[u-1])%10&1||n==(t.s<0?8:7))),e<1||!h[0])return l?(s=Dr(t),h.length=1,e=e-s-1,h[0]=Sh(10,(Kn-e%Kn)%Kn),t.e=jm(-e/Kn)||0):(h.length=1,h[0]=t.e=t.s=0),t;if(r==0?(h.length=u,s=1,u--):(h.length=u+1,s=Sh(10,Kn-r),h[u]=i>0?(c/Sh(10,o-i)%Sh(10,i)|0)*s:0),l)for(;;)if(u==0){(h[0]+=s)==ci&&(h[0]=1,++t.e);break}else{if(h[u]+=s,h[u]!=ci)break;h[u--]=0,s=1}for(r=h.length;h[--r]===0;)h.pop();if(er&&(t.e>tx||t.e<-tx))throw Error(Z6+Dr(t));return t}function aK(t,e){var n,r,i,s,o,a,l,c,u,h,d=t.constructor,m=d.precision;if(!t.s||!e.s)return e.s?e.s=-e.s:e=new d(t),er?Wn(e,m):e;if(l=t.d,h=e.d,r=e.e,c=t.e,l=l.slice(),o=c-r,o){for(u=o<0,u?(n=l,o=-o,a=h.length):(n=h,r=c,a=l.length),i=Math.max(Math.ceil(m/Kn),a)+2,o>i&&(o=i,n.length=1),n.reverse(),i=o;i--;)n.push(0);n.reverse()}else{for(i=l.length,a=h.length,u=i<a,u&&(a=i),i=0;i<a;i++)if(l[i]!=h[i]){u=l[i]<h[i];break}o=0}for(u&&(n=l,l=h,h=n,e.s=-e.s),a=l.length,i=h.length-a;i>0;--i)l[a++]=0;for(i=h.length;i>o;){if(l[--i]<h[i]){for(s=i;s&&l[--s]===0;)l[s]=ci-1;--l[s],l[i]+=ci}l[i]-=h[i]}for(;l[--a]===0;)l.pop();for(;l[0]===0;l.shift())--r;return l[0]?(e.d=l,e.e=r,er?Wn(e,m):e):new d(0)}function ad(t,e,n){var r,i=Dr(t),s=El(t.d),o=s.length;return e?(n&&(r=n-o)>0?s=s.charAt(0)+"."+s.slice(1)+Fu(r):o>1&&(s=s.charAt(0)+"."+s.slice(1)),s=s+(i<0?"e":"e+")+i):i<0?(s="0."+Fu(-i-1)+s,n&&(r=n-o)>0&&(s+=Fu(r))):i>=o?(s+=Fu(i+1-o),n&&(r=n-i-1)>0&&(s=s+"."+Fu(r))):((r=i+1)<o&&(s=s.slice(0,r)+"."+s.slice(r)),n&&(r=n-o)>0&&(i+1===o&&(s+="."),s+=Fu(r))),t.s<0?"-"+s:s}function Mz(t,e){if(t.length>e)return t.length=e,!0}function lK(t){var e,n,r;function i(s){var o=this;if(!(o instanceof i))return new i(s);if(o.constructor=i,s instanceof i){o.s=s.s,o.e=s.e,o.d=(s=s.d)?s.slice():s;return}if(typeof s=="number"){if(s*0!==0)throw Error(qh+s);if(s>0)o.s=1;else if(s<0)s=-s,o.s=-1;else{o.s=0,o.e=0,o.d=[0];return}if(s===~~s&&s<1e7){o.e=0,o.d=[s];return}return Oz(o,s.toString())}else if(typeof s!="string")throw Error(qh+s);if(s.charCodeAt(0)===45?(s=s.slice(1),o.s=-1):o.s=1,INe.test(s))Oz(o,s);else throw Error(qh+s)}if(i.prototype=Et,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=lK,i.config=i.set=ONe,t===void 0&&(t={}),t)for(r=["precision","rounding","toExpNeg","toExpPos","LN10"],e=0;e<r.length;)t.hasOwnProperty(n=r[e++])||(t[n]=this[n]);return i.config(t),i}function ONe(t){if(!t||typeof t!="object")throw Error(Vo+"Object expected");var e,n,r,i=["precision",1,zm,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(e=0;e<i.length;e+=3)if((r=t[n=i[e]])!==void 0)if(jm(r)===r&&r>=i[e+1]&&r<=i[e+2])this[n]=r;else throw Error(qh+n+": "+r);if((r=t[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(qh+n+": "+r);return this}var J6=lK(PNe);io=new J6(1);const kn=J6;function MNe(t){return DNe(t)||NNe(t)||kNe(t)||RNe()}function RNe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
3525In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function kNe(t,e){if(t){if(typeof t=="string")return zI(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return zI(t,e)}}function NNe(t){if(typeof Symbol<"u"&&Symbol.iterator in Object(t))return Array.from(t)}function DNe(t){if(Array.isArray(t))return zI(t)}function zI(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var BNe=function(e){return e},cK={},uK=function(e){return e===cK},Rz=function(e){return function n(){return arguments.length===0||arguments.length===1&&uK(arguments.length<=0?void 0:arguments[0])?n:e.apply(void 0,arguments)}},LNe=function t(e,n){return e===1?n:Rz(function(){for(var r=arguments.length,i=new Array(r),s=0;s<r;s++)i[s]=arguments[s];var o=i.filter(function(a){return a!==cK}).length;return o>=e?n.apply(void 0,i):t(e-o,Rz(function(){for(var a=arguments.length,l=new Array(a),c=0;c<a;c++)l[c]=arguments[c];var u=i.map(function(h){return uK(h)?l.shift():h});return n.apply(void 0,MNe(u).concat(l))}))})},RA=function(e){return LNe(e.length,e)},jI=function(e,n){for(var r=[],i=e;i<n;++i)r[i-e]=i;return r},FNe=RA(function(t,e){return Array.isArray(e)?e.map(t):Object.keys(e).map(function(n){return e[n]}).map(t)}),UNe=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];if(!n.length)return BNe;var i=n.reverse(),s=i[0],o=i.slice(1);return function(){return o.reduce(function(a,l){return l(a)},s.apply(void 0,arguments))}},VI=function(e){return Array.isArray(e)?e.reverse():e.split("").reverse.join("")},fK=function(e){var n=null,r=null;return function(){for(var i=arguments.length,s=new Array(i),o=0;o<i;o++)s[o]=arguments[o];return n&&s.every(function(a,l){return a===n[l]})||(n=s,r=e.apply(void 0,s)),r}};function zNe(t){var e;return t===0?e=1:e=Math.floor(new kn(t).abs().log(10).toNumber())+1,e}function jNe(t,e,n){for(var r=new kn(t),i=0,s=[];r.lt(e)&&i<1e5;)s.push(r.toNumber()),r=r.add(n),i++;return s}var VNe=RA(function(t,e,n){var r=+t,i=+e;return r+n*(i-r)}),WNe=RA(function(t,e,n){var r=e-+t;return r=r||1/0,(n-t)/r}),$Ne=RA(function(t,e,n){var r=e-+t;return r=r||1/0,Math.max(0,Math.min(1,(n-t)/r))});const kA={rangeStep:jNe,getDigitCount:zNe,interpolateNumber:VNe,uninterpolateNumber:WNe,uninterpolateTruncation:$Ne};function WI(t){return QNe(t)||qNe(t)||hK(t)||HNe()}function HNe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
3526In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qNe(t){if(typeof Symbol<"u"&&Symbol.iterator in Object(t))return Array.from(t)}function QNe(t){if(Array.isArray(t))return $I(t)}function $v(t,e){return KNe(t)||YNe(t,e)||hK(t,e)||XNe()}function XNe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
3527In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function hK(t,e){if(t){if(typeof t=="string")return $I(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return $I(t,e)}}function $I(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function YNe(t,e){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(t)))){var n=[],r=!0,i=!1,s=void 0;try{for(var o=t[Symbol.iterator](),a;!(r=(a=o.next()).done)&&(n.push(a.value),!(e&&n.length===e));r=!0);}catch(l){i=!0,s=l}finally{try{!r&&o.return!=null&&o.return()}finally{if(i)throw s}}return n}}function KNe(t){if(Array.isArray(t))return t}function dK(t){var e=$v(t,2),n=e[0],r=e[1],i=n,s=r;return n>r&&(i=r,s=n),[i,s]}function pK(t,e,n){if(t.lte(0))return new kn(0);var r=kA.getDigitCount(t.toNumber()),i=new kn(10).pow(r),s=t.div(i),o=r!==1?.05:.1,a=new kn(Math.ceil(s.div(o).toNumber())).add(n).mul(o),l=a.mul(i);return e?l:new kn(Math.ceil(l))}function GNe(t,e,n){var r=1,i=new kn(t);if(!i.isint()&&n){var s=Math.abs(t);s<1?(r=new kn(10).pow(kA.getDigitCount(t)-1),i=new kn(Math.floor(i.div(r).toNumber())).mul(r)):s>1&&(i=new kn(Math.floor(t)))}else t===0?i=new kn(Math.floor((e-1)/2)):n||(i=new kn(Math.floor(t)));var o=Math.floor((e-1)/2),a=UNe(FNe(function(l){return i.add(new kn(l-o).mul(r)).toNumber()}),jI);return a(0,e)}function gK(t,e,n,r){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((e-t)/(n-1)))return{step:new kn(0),tickMin:new kn(0),tickMax:new kn(0)};var s=pK(new kn(e).sub(t).div(n-1),r,i),o;t<=0&&e>=0?o=new kn(0):(o=new kn(t).add(e).div(2),o=o.sub(new kn(o).mod(s)));var a=Math.ceil(o.sub(t).div(s).toNumber()),l=Math.ceil(new kn(e).sub(o).div(s).toNumber()),c=a+l+1;return c>n?gK(t,e,n,r,i+1):(c<n&&(l=e>0?l+(n-c):l,a=e>0?a:a+(n-c)),{step:s,tickMin:o.sub(new kn(a).mul(s)),tickMax:o.add(new kn(l).mul(s))})}function ZNe(t){var e=$v(t,2),n=e[0],r=e[1],i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=Math.max(i,2),a=dK([n,r]),l=$v(a,2),c=l[0],u=l[1];if(c===-1/0||u===1/0){var h=u===1/0?[c].concat(WI(jI(0,i-1).map(function(){return 1/0}))):[].concat(WI(jI(0,i-1).map(function(){return-1/0})),[u]);return n>r?VI(h):h}if(c===u)return GNe(c,i,s);var d=gK(c,u,o,s),m=d.step,y=d.tickMin,v=d.tickMax,b=kA.rangeStep(y,v.add(new kn(.1).mul(m)),m);return n>r?VI(b):b}function JNe(t,e){var n=$v(t,2),r=n[0],i=n[1],s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=dK([r,i]),a=$v(o,2),l=a[0],c=a[1];if(l===-1/0||c===1/0)return[r,i];if(l===c)return[l];var u=Math.max(e,2),h=pK(new kn(c).sub(l).div(u-1),s,0),d=[].concat(WI(kA.rangeStep(new kn(l),new kn(c).sub(new kn(.99).mul(h)),h)),[c]);return r>i?VI(d):d}var eDe=fK(ZNe),tDe=fK(JNe),nDe="Invariant failed";function ld(t,e){throw new Error(nDe)}var rDe=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function bm(t){"@babel/helpers - typeof";return bm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},bm(t)}function nx(){return nx=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},nx.apply(this,arguments)}function iDe(t,e){return lDe(t)||aDe(t,e)||oDe(t,e)||sDe()}function sDe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
3528In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function oDe(t,e){if(t){if(typeof t=="string")return kz(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return kz(t,e)}}function kz(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function aDe(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,s,o,a=[],l=!0,c=!1;try{if(s=(n=n.call(t)).next,e!==0)for(;!(l=(r=s.call(n)).done)&&(a.push(r.value),a.length!==e);l=!0);}catch(u){c=!0,i=u}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return a}}function lDe(t){if(Array.isArray(t))return t}function cDe(t,e){if(t==null)return{};var n=uDe(t,e),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(i=0;i<s.length;i++)r=s[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function uDe(t,e){if(t==null)return{};var n={};for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){if(e.indexOf(r)>=0)continue;n[r]=t[r]}return n}function fDe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function hDe(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,yK(r.key),r)}}function dDe(t,e,n){return e&&hDe(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function pDe(t,e,n){return e=rx(e),gDe(t,mK()?Reflect.construct(e,n||[],rx(t).constructor):e.apply(t,n))}function gDe(t,e){if(e&&(bm(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return mDe(t)}function mDe(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function mK(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(mK=function(){return!!t})()}function rx(t){return rx=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},rx(t)}function vDe(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&HI(t,e)}function HI(t,e){return HI=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},HI(t,e)}function vK(t,e,n){return e=yK(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function yK(t){var e=yDe(t,"string");return bm(e)=="symbol"?e:e+""}function yDe(t,e){if(bm(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(bm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var NA=(function(t){function e(){return fDe(this,e),pDe(this,e,arguments)}return vDe(e,t),dDe(e,[{key:"render",value:function(){var r=this.props,i=r.offset,s=r.layout,o=r.width,a=r.dataKey,l=r.data,c=r.dataPointFormatter,u=r.xAxis,h=r.yAxis,d=cDe(r,rDe),m=bn(d,!1);this.props.direction==="x"&&u.type!=="number"&&ld();var y=l.map(function(v){var b=c(v,a),x=b.x,T=b.y,E=b.value,C=b.errorVal;if(!C)return null;var I=[],O,N;if(Array.isArray(C)){var U=iDe(C,2);O=U[0],N=U[1]}else O=N=C;if(s==="vertical"){var F=u.scale,H=T+i,W=H+o,z=H-o,V=F(E-O),M=F(E+N);I.push({x1:M,y1:W,x2:M,y2:z}),I.push({x1:V,y1:H,x2:M,y2:H}),I.push({x1:V,y1:W,x2:V,y2:z})}else if(s==="horizontal"){var K=h.scale,j=x+i,q=j-o,Y=j+o,X=K(E-O),te=K(E+N);I.push({x1:q,y1:te,x2:Y,y2:te}),I.push({x1:j,y1:X,x2:j,y2:te}),I.push({x1:q,y1:X,x2:Y,y2:X})}return Me.createElement(ui,nx({className:"recharts-errorBar",key:"bar-".concat(I.map(function(D){return"".concat(D.x1,"-").concat(D.x2,"-").concat(D.y1,"-").concat(D.y2)}))},m),I.map(function(D){return Me.createElement("line",nx({},D,{key:"line-".concat(D.x1,"-").concat(D.x2,"-").concat(D.y1,"-").concat(D.y2)}))}))});return Me.createElement(ui,{className:"recharts-errorBars"},y)}}])})(Me.Component);vK(NA,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"});vK(NA,"displayName","ErrorBar");function Hv(t){"@babel/helpers - typeof";return Hv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Hv(t)}function Nz(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function bh(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Nz(Object(n),!0).forEach(function(r){bDe(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Nz(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function bDe(t,e,n){return e=_De(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function _De(t){var e=wDe(t,"string");return Hv(e)=="symbol"?e:e+""}function wDe(t,e){if(Hv(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(Hv(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var bK=function(e){var n=e.children,r=e.formattedGraphicalItems,i=e.legendWidth,s=e.legendContent,o=no(n,Dg);if(!o)return null;var a=Dg.defaultProps,l=a!==void 0?bh(bh({},a),o.props):{},c;return o.props&&o.props.payload?c=o.props&&o.props.payload:s==="children"?c=(r||[]).reduce(function(u,h){var d=h.item,m=h.props,y=m.sectors||m.data||[];return u.concat(y.map(function(v){return{type:o.props.iconType||d.props.legendType,value:v.name,color:v.fill,payload:v}}))},[]):c=(r||[]).map(function(u){var h=u.item,d=h.type.defaultProps,m=d!==void 0?bh(bh({},d),h.props):{},y=m.dataKey,v=m.name,b=m.legendType,x=m.hide;return{inactive:x,dataKey:y,type:l.iconType||b||"square",color:eR(h),value:v||y,payload:m}}),bh(bh(bh({},l),Dg.getWithHeight(o,i)),{},{payload:c,item:o})};function qv(t){"@babel/helpers - typeof";return qv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},qv(t)}function Dz(t){return SDe(t)||EDe(t)||ADe(t)||xDe()}function xDe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
3529In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ADe(t,e){if(t){if(typeof t=="string")return qI(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return qI(t,e)}}function EDe(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function SDe(t){if(Array.isArray(t))return qI(t)}function qI(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Bz(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function vr(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Bz(Object(n),!0).forEach(function(r){Lg(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Bz(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Lg(t,e,n){return e=TDe(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function TDe(t){var e=CDe(t,"string");return qv(e)=="symbol"?e:e+""}function CDe(t,e){if(qv(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(qv(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Nl(t,e,n){return _n(t)||_n(e)?n:Xr(e)?jo(t,e,n):rn(e)?e(t):n}function hv(t,e,n,r){var i=SNe(t,function(a){return Nl(a,e)});if(n==="number"){var s=i.filter(function(a){return dt(a)||parseFloat(a)});return s.length?[MA(s),OA(s)]:[1/0,-1/0]}var o=r?i.filter(function(a){return!_n(a)}):i;return o.map(function(a){return Xr(a)||a instanceof Date?a:""})}var PDe=function(e){var n,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0,s=arguments.length>3?arguments[3]:void 0,o=-1,a=(n=r==null?void 0:r.length)!==null&&n!==void 0?n:0;if(a<=1)return 0;if(s&&s.axisType==="angleAxis"&&Math.abs(Math.abs(s.range[1]-s.range[0])-360)<=1e-6)for(var l=s.range,c=0;c<a;c++){var u=c>0?i[c-1].coordinate:i[a-1].coordinate,h=i[c].coordinate,d=c>=a-1?i[0].coordinate:i[c+1].coordinate,m=void 0;if(Ta(h-u)!==Ta(d-h)){var y=[];if(Ta(d-h)===Ta(l[1]-l[0])){m=d;var v=h+l[1]-l[0];y[0]=Math.min(v,(v+u)/2),y[1]=Math.max(v,(v+u)/2)}else{m=u;var b=d+l[1]-l[0];y[0]=Math.min(h,(b+h)/2),y[1]=Math.max(h,(b+h)/2)}var x=[Math.min(h,(m+h)/2),Math.max(h,(m+h)/2)];if(e>x[0]&&e<=x[1]||e>=y[0]&&e<=y[1]){o=i[c].index;break}}else{var T=Math.min(u,d),E=Math.max(u,d);if(e>(T+h)/2&&e<=(E+h)/2){o=i[c].index;break}}}else for(var C=0;C<a;C++)if(C===0&&e<=(r[C].coordinate+r[C+1].coordinate)/2||C>0&&C<a-1&&e>(r[C].coordinate+r[C-1].coordinate)/2&&e<=(r[C].coordinate+r[C+1].coordinate)/2||C===a-1&&e>(r[C].coordinate+r[C-1].coordinate)/2){o=r[C].index;break}return o},eR=function(e){var n,r=e,i=r.type.displayName,s=(n=e.type)!==null&&n!==void 0&&n.defaultProps?vr(vr({},e.type.defaultProps),e.props):e.props,o=s.stroke,a=s.fill,l;switch(i){case"Line":l=o;break;case"Area":case"Radar":l=o&&o!=="none"?o:a;break;default:l=a;break}return l},IDe=function(e){var n=e.barSize,r=e.totalSize,i=e.stackGroups,s=i===void 0?{}:i;if(!s)return{};for(var o={},a=Object.keys(s),l=0,c=a.length;l<c;l++)for(var u=s[a[l]].stackGroups,h=Object.keys(u),d=0,m=h.length;d<m;d++){var y=u[h[d]],v=y.items,b=y.cateAxisId,x=v.filter(function(N){return Rc(N.type).indexOf("Bar")>=0});if(x&&x.length){var T=x[0].type.defaultProps,E=T!==void 0?vr(vr({},T),x[0].props):x[0].props,C=E.barSize,I=E[b];o[I]||(o[I]=[]);var O=_n(C)?n:C;o[I].push({item:x[0],stackList:x.slice(1),barSize:_n(O)?void 0:id(O,r,0)})}}return o},ODe=function(e){var n=e.barGap,r=e.barCategoryGap,i=e.bandSize,s=e.sizeList,o=s===void 0?[]:s,a=e.maxBarSize,l=o.length;if(l<1)return null;var c=id(n,i,0,!0),u,h=[];if(o[0].barSize===+o[0].barSize){var d=!1,m=i/l,y=o.reduce(function(C,I){return C+I.barSize||0},0);y+=(l-1)*c,y>=i&&(y-=(l-1)*c,c=0),y>=i&&m>0&&(d=!0,m*=.9,y=l*m);var v=(i-y)/2>>0,b={offset:v-c,size:0};u=o.reduce(function(C,I){var O={item:I.item,position:{offset:b.offset+b.size+c,size:d?m:I.barSize}},N=[].concat(Dz(C),[O]);return b=N[N.length-1].position,I.stackList&&I.stackList.length&&I.stackList.forEach(function(U){N.push({item:U,position:b})}),N},h)}else{var x=id(r,i,0,!0);i-2*x-(l-1)*c<=0&&(c=0);var T=(i-2*x-(l-1)*c)/l;T>1&&(T>>=0);var E=a===+a?Math.min(T,a):T;u=o.reduce(function(C,I,O){var N=[].concat(Dz(C),[{item:I.item,position:{offset:x+(T+c)*O+(T-E)/2,size:E}}]);return I.stackList&&I.stackList.length&&I.stackList.forEach(function(U){N.push({item:U,position:N[N.length-1].position})}),N},h)}return u},MDe=function(e,n,r,i){var s=r.children,o=r.width,a=r.margin,l=o-(a.left||0)-(a.right||0),c=bK({children:s,legendWidth:l});if(c){var u=i||{},h=u.width,d=u.height,m=c.align,y=c.verticalAlign,v=c.layout;if((v==="vertical"||v==="horizontal"&&y==="middle")&&m!=="center"&&dt(e[m]))return vr(vr({},e),{},Lg({},m,e[m]+(h||0)));if((v==="horizontal"||v==="vertical"&&m==="center")&&y!=="middle"&&dt(e[y]))return vr(vr({},e),{},Lg({},y,e[y]+(d||0)))}return e},RDe=function(e,n,r){return _n(n)?!0:e==="horizontal"?n==="yAxis":e==="vertical"||r==="x"?n==="xAxis":r==="y"?n==="yAxis":!0},_K=function(e,n,r,i,s){var o=n.props.children,a=Pa(o,NA).filter(function(c){return RDe(i,s,c.props.direction)});if(a&&a.length){var l=a.map(function(c){return c.props.dataKey});return e.reduce(function(c,u){var h=Nl(u,r);if(_n(h))return c;var d=Array.isArray(h)?[MA(h),OA(h)]:[h,h],m=l.reduce(function(y,v){var b=Nl(u,v,0),x=d[0]-Math.abs(Array.isArray(b)?b[0]:b),T=d[1]+Math.abs(Array.isArray(b)?b[1]:b);return[Math.min(x,y[0]),Math.max(T,y[1])]},[1/0,-1/0]);return[Math.min(m[0],c[0]),Math.max(m[1],c[1])]},[1/0,-1/0])}return null},kDe=function(e,n,r,i,s){var o=n.map(function(a){return _K(e,a,r,s,i)}).filter(function(a){return!_n(a)});return o&&o.length?o.reduce(function(a,l){return[Math.min(a[0],l[0]),Math.max(a[1],l[1])]},[1/0,-1/0]):null},wK=function(e,n,r,i,s){var o=n.map(function(l){var c=l.props.dataKey;return r==="number"&&c&&_K(e,l,c,i)||hv(e,c,r,s)});if(r==="number")return o.reduce(function(l,c){return[Math.min(l[0],c[0]),Math.max(l[1],c[1])]},[1/0,-1/0]);var a={};return o.reduce(function(l,c){for(var u=0,h=c.length;u<h;u++)a[c[u]]||(a[c[u]]=!0,l.push(c[u]));return l},[])},xK=function(e,n){return e==="horizontal"&&n==="xAxis"||e==="vertical"&&n==="yAxis"||e==="centric"&&n==="angleAxis"||e==="radial"&&n==="radiusAxis"},AK=function(e,n,r,i){if(i)return e.map(function(l){return l.coordinate});var s,o,a=e.map(function(l){return l.coordinate===n&&(s=!0),l.coordinate===r&&(o=!0),l.coordinate});return s||a.push(n),o||a.push(r),a},Oc=function(e,n,r){if(!e)return null;var i=e.scale,s=e.duplicateDomain,o=e.type,a=e.range,l=e.realScaleType==="scaleBand"?i.bandwidth()/2:2,c=(n||r)&&o==="category"&&i.bandwidth?i.bandwidth()/l:0;if(c=e.axisType==="angleAxis"&&(a==null?void 0:a.length)>=2?Ta(a[0]-a[1])*2*c:c,n&&(e.ticks||e.niceTicks)){var u=(e.ticks||e.niceTicks).map(function(h){var d=s?s.indexOf(h):h;return{coordinate:i(d)+c,value:h,offset:c}});return u.filter(function(h){return!My(h.coordinate)})}return e.isCategorical&&e.categoricalDomain?e.categoricalDomain.map(function(h,d){return{coordinate:i(h)+c,value:h,index:d,offset:c}}):i.ticks&&!r?i.ticks(e.tickCount).map(function(h){return{coordinate:i(h)+c,value:h,offset:c}}):i.domain().map(function(h,d){return{coordinate:i(h)+c,value:s?s[h]:h,index:d,offset:c}})},r5=new WeakMap,Jb=function(e,n){if(typeof n!="function")return e;r5.has(e)||r5.set(e,new WeakMap);var r=r5.get(e);if(r.has(n))return r.get(n);var i=function(){e.apply(void 0,arguments),n.apply(void 0,arguments)};return r.set(n,i),i},NDe=function(e,n,r){var i=e.scale,s=e.type,o=e.layout,a=e.axisType;if(i==="auto")return o==="radial"&&a==="radiusAxis"?{scale:Lv(),realScaleType:"band"}:o==="radial"&&a==="angleAxis"?{scale:Gw(),realScaleType:"linear"}:s==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!r)?{scale:fv(),realScaleType:"point"}:s==="category"?{scale:Lv(),realScaleType:"band"}:{scale:Gw(),realScaleType:"linear"};if(rd(i)){var l="scale".concat(yA(i));return{scale:(wz[l]||fv)(),realScaleType:wz[l]?l:"point"}}return rn(i)?{scale:i}:{scale:fv(),realScaleType:"point"}},Lz=1e-4,DDe=function(e){var n=e.domain();if(!(!n||n.length<=2)){var r=n.length,i=e.range(),s=Math.min(i[0],i[1])-Lz,o=Math.max(i[0],i[1])+Lz,a=e(n[0]),l=e(n[r-1]);(a<s||a>o||l<s||l>o)&&e.domain([n[0],n[r-1]])}},BDe=function(e,n){if(!e)return null;for(var r=0,i=e.length;r<i;r++)if(e[r].item===n)return e[r].position;return null},LDe=function(e,n){if(!n||n.length!==2||!dt(n[0])||!dt(n[1]))return e;var r=Math.min(n[0],n[1]),i=Math.max(n[0],n[1]),s=[e[0],e[1]];return(!dt(e[0])||e[0]<r)&&(s[0]=r),(!dt(e[1])||e[1]>i)&&(s[1]=i),s[0]>i&&(s[0]=i),s[1]<r&&(s[1]=r),s},FDe=function(e){var n=e.length;if(!(n<=0))for(var r=0,i=e[0].length;r<i;++r)for(var s=0,o=0,a=0;a<n;++a){var l=My(e[a][r][1])?e[a][r][0]:e[a][r][1];l>=0?(e[a][r][0]=s,e[a][r][1]=s+l,s=e[a][r][1]):(e[a][r][0]=o,e[a][r][1]=o+l,o=e[a][r][1])}},UDe=function(e){var n=e.length;if(!(n<=0))for(var r=0,i=e[0].length;r<i;++r)for(var s=0,o=0;o<n;++o){var a=My(e[o][r][1])?e[o][r][0]:e[o][r][1];a>=0?(e[o][r][0]=s,e[o][r][1]=s+a,s=e[o][r][1]):(e[o][r][0]=0,e[o][r][1]=0)}},zDe={sign:FDe,expand:lOe,none:fm,silhouette:cOe,wiggle:uOe,positive:UDe},jDe=function(e,n,r){var i=n.map(function(a){return a.props.dataKey}),s=zDe[r],o=aOe().keys(i).value(function(a,l){return+Nl(a,l,0)}).order(xI).offset(s);return o(e)},VDe=function(e,n,r,i,s,o){if(!e)return null;var a=o?n.reverse():n,l={},c=a.reduce(function(h,d){var m,y=(m=d.type)!==null&&m!==void 0&&m.defaultProps?vr(vr({},d.type.defaultProps),d.props):d.props,v=y.stackId,b=y.hide;if(b)return h;var x=y[r],T=h[x]||{hasStack:!1,stackGroups:{}};if(Xr(v)){var E=T.stackGroups[v]||{numericAxisId:r,cateAxisId:i,items:[]};E.items.push(d),T.hasStack=!0,T.stackGroups[v]=E}else T.stackGroups[vA("_stackId_")]={numericAxisId:r,cateAxisId:i,items:[d]};return vr(vr({},h),{},Lg({},x,T))},l),u={};return Object.keys(c).reduce(function(h,d){var m=c[d];if(m.hasStack){var y={};m.stackGroups=Object.keys(m.stackGroups).reduce(function(v,b){var x=m.stackGroups[b];return vr(vr({},v),{},Lg({},b,{numericAxisId:r,cateAxisId:i,items:x.items,stackedData:jDe(e,x.items,s)}))},y)}return vr(vr({},h),{},Lg({},d,m))},u)},WDe=function(e,n){var r=n.realScaleType,i=n.type,s=n.tickCount,o=n.originalDomain,a=n.allowDecimals,l=r||n.scale;if(l!=="auto"&&l!=="linear")return null;if(s&&i==="number"&&o&&(o[0]==="auto"||o[1]==="auto")){var c=e.domain();if(!c.length)return null;var u=eDe(c,s,a);return e.domain([MA(u),OA(u)]),{niceTicks:u}}if(s&&i==="number"){var h=e.domain(),d=tDe(h,s,a);return{niceTicks:d}}return null},Fz=function(e){var n=e.axis,r=e.ticks,i=e.offset,s=e.bandSize,o=e.entry,a=e.index;if(n.type==="category")return r[a]?r[a].coordinate+i:null;var l=Nl(o,n.dataKey,n.domain[a]);return _n(l)?null:n.scale(l)-s/2+i},$De=function(e){var n=e.numericAxis,r=n.scale.domain();if(n.type==="number"){var i=Math.min(r[0],r[1]),s=Math.max(r[0],r[1]);return i<=0&&s>=0?0:s<0?s:i}return r[0]},HDe=function(e,n){var r,i=(r=e.type)!==null&&r!==void 0&&r.defaultProps?vr(vr({},e.type.defaultProps),e.props):e.props,s=i.stackId;if(Xr(s)){var o=n[s];if(o){var a=o.items.indexOf(e);return a>=0?o.stackedData[a]:null}}return null},qDe=function(e){return e.reduce(function(n,r){return[MA(r.concat([n[0]]).filter(dt)),OA(r.concat([n[1]]).filter(dt))]},[1/0,-1/0])},EK=function(e,n,r){return Object.keys(e).reduce(function(i,s){var o=e[s],a=o.stackedData,l=a.reduce(function(c,u){var h=qDe(u.slice(n,r+1));return[Math.min(c[0],h[0]),Math.max(c[1],h[1])]},[1/0,-1/0]);return[Math.min(l[0],i[0]),Math.max(l[1],i[1])]},[1/0,-1/0]).map(function(i){return i===1/0||i===-1/0?0:i})},Uz=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,zz=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,QI=function(e,n,r){if(rn(e))return e(n,r);if(!Array.isArray(e))return n;var i=[];if(dt(e[0]))i[0]=r?e[0]:Math.min(e[0],n[0]);else if(Uz.test(e[0])){var s=+Uz.exec(e[0])[1];i[0]=n[0]-s}else rn(e[0])?i[0]=e[0](n[0]):i[0]=n[0];if(dt(e[1]))i[1]=r?e[1]:Math.max(e[1],n[1]);else if(zz.test(e[1])){var o=+zz.exec(e[1])[1];i[1]=n[1]+o}else rn(e[1])?i[1]=e[1](n[1]):i[1]=n[1];return i},ix=function(e,n,r){if(e&&e.scale&&e.scale.bandwidth){var i=e.scale.bandwidth();if(!r||i>0)return i}if(e&&n&&n.length>=2){for(var s=w6(n,function(h){return h.coordinate}),o=1/0,a=1,l=s.length;a<l;a++){var c=s[a],u=s[a-1];o=Math.min((c.coordinate||0)-(u.coordinate||0),o)}return o===1/0?0:o}return r?void 0:0},jz=function(e,n,r){return!e||!e.length||G6(e,jo(r,"type.defaultProps.domain"))?n:e},SK=function(e,n){var r=e.type.defaultProps?vr(vr({},e.type.defaultProps),e.props):e.props,i=r.dataKey,s=r.name,o=r.unit,a=r.formatter,l=r.tooltipType,c=r.chartType,u=r.hide;return vr(vr({},bn(e,!1)),{},{dataKey:i,unit:o,formatter:a,name:s||i,color:eR(e),value:Nl(n,i),type:l,payload:n,chartType:c,hide:u})};function Qv(t){"@babel/helpers - typeof";return Qv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Qv(t)}function Vz(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Wz(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Vz(Object(n),!0).forEach(function(r){QDe(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Vz(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function QDe(t,e,n){return e=XDe(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function XDe(t){var e=YDe(t,"string");return Qv(e)=="symbol"?e:e+""}function YDe(t,e){if(Qv(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(Qv(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var sx=Math.PI/180,KDe=function(e){return e*180/Math.PI},Oi=function(e,n,r,i){return{x:e+Math.cos(-sx*i)*r,y:n+Math.sin(-sx*i)*r}},GDe=function(e,n){var r=e.x,i=e.y,s=n.x,o=n.y;return Math.sqrt(Math.pow(r-s,2)+Math.pow(i-o,2))},ZDe=function(e,n){var r=e.x,i=e.y,s=n.cx,o=n.cy,a=GDe({x:r,y:i},{x:s,y:o});if(a<=0)return{radius:a};var l=(r-s)/a,c=Math.acos(l);return i>o&&(c=2*Math.PI-c),{radius:a,angle:KDe(c),angleInRadian:c}},JDe=function(e){var n=e.startAngle,r=e.endAngle,i=Math.floor(n/360),s=Math.floor(r/360),o=Math.min(i,s);return{startAngle:n-o*360,endAngle:r-o*360}},eBe=function(e,n){var r=n.startAngle,i=n.endAngle,s=Math.floor(r/360),o=Math.floor(i/360),a=Math.min(s,o);return e+a*360},$z=function(e,n){var r=e.x,i=e.y,s=ZDe({x:r,y:i},n),o=s.radius,a=s.angle,l=n.innerRadius,c=n.outerRadius;if(o<l||o>c)return!1;if(o===0)return!0;var u=JDe(n),h=u.startAngle,d=u.endAngle,m=a,y;if(h<=d){for(;m>d;)m-=360;for(;m<h;)m+=360;y=m>=h&&m<=d}else{for(;m>h;)m-=360;for(;m<d;)m+=360;y=m>=d&&m<=h}return y?Wz(Wz({},n),{},{radius:o,angle:eBe(m,n)}):null};function Xv(t){"@babel/helpers - typeof";return Xv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Xv(t)}var tBe=["offset"];function nBe(t){return oBe(t)||sBe(t)||iBe(t)||rBe()}function rBe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
3530In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function iBe(t,e){if(t){if(typeof t=="string")return XI(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return XI(t,e)}}function sBe(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function oBe(t){if(Array.isArray(t))return XI(t)}function XI(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function aBe(t,e){if(t==null)return{};var n=lBe(t,e),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(i=0;i<s.length;i++)r=s[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function lBe(t,e){if(t==null)return{};var n={};for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){if(e.indexOf(r)>=0)continue;n[r]=t[r]}return n}function Hz(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Hr(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Hz(Object(n),!0).forEach(function(r){cBe(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Hz(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function cBe(t,e,n){return e=uBe(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function uBe(t){var e=fBe(t,"string");return Xv(e)=="symbol"?e:e+""}function fBe(t,e){if(Xv(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(Xv(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Yv(){return Yv=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Yv.apply(this,arguments)}var hBe=function(e){var n=e.value,r=e.formatter,i=_n(e.children)?n:e.children;return rn(r)?r(i):i},dBe=function(e,n){var r=Ta(n-e),i=Math.min(Math.abs(n-e),360);return r*i},pBe=function(e,n,r){var i=e.position,s=e.viewBox,o=e.offset,a=e.className,l=s,c=l.cx,u=l.cy,h=l.innerRadius,d=l.outerRadius,m=l.startAngle,y=l.endAngle,v=l.clockWise,b=(h+d)/2,x=dBe(m,y),T=x>=0?1:-1,E,C;i==="insideStart"?(E=m+T*o,C=v):i==="insideEnd"?(E=y-T*o,C=!v):i==="end"&&(E=y+T*o,C=v),C=x<=0?C:!C;var I=Oi(c,u,b,E),O=Oi(c,u,b,E+(C?1:-1)*359),N="M".concat(I.x,",").concat(I.y,`
3531    A`).concat(b,",").concat(b,",0,1,").concat(C?0:1,`,
3532    `).concat(O.x,",").concat(O.y),U=_n(e.id)?vA("recharts-radial-line-"):e.id;return Me.createElement("text",Yv({},r,{dominantBaseline:"central",className:un("recharts-radial-bar-label",a)}),Me.createElement("defs",null,Me.createElement("path",{id:U,d:N})),Me.createElement("textPath",{xlinkHref:"#".concat(U)},n))},gBe=function(e){var n=e.viewBox,r=e.offset,i=e.position,s=n,o=s.cx,a=s.cy,l=s.innerRadius,c=s.outerRadius,u=s.startAngle,h=s.endAngle,d=(u+h)/2;if(i==="outside"){var m=Oi(o,a,c+r,d),y=m.x,v=m.y;return{x:y,y:v,textAnchor:y>=o?"start":"end",verticalAnchor:"middle"}}if(i==="center")return{x:o,y:a,textAnchor:"middle",verticalAnchor:"middle"};if(i==="centerTop")return{x:o,y:a,textAnchor:"middle",verticalAnchor:"start"};if(i==="centerBottom")return{x:o,y:a,textAnchor:"middle",verticalAnchor:"end"};var b=(l+c)/2,x=Oi(o,a,b,d),T=x.x,E=x.y;return{x:T,y:E,textAnchor:"middle",verticalAnchor:"middle"}},mBe=function(e){var n=e.viewBox,r=e.parentViewBox,i=e.offset,s=e.position,o=n,a=o.x,l=o.y,c=o.width,u=o.height,h=u>=0?1:-1,d=h*i,m=h>0?"end":"start",y=h>0?"start":"end",v=c>=0?1:-1,b=v*i,x=v>0?"end":"start",T=v>0?"start":"end";if(s==="top"){var E={x:a+c/2,y:l-h*i,textAnchor:"middle",verticalAnchor:m};return Hr(Hr({},E),r?{height:Math.max(l-r.y,0),width:c}:{})}if(s==="bottom"){var C={x:a+c/2,y:l+u+d,textAnchor:"middle",verticalAnchor:y};return Hr(Hr({},C),r?{height:Math.max(r.y+r.height-(l+u),0),width:c}:{})}if(s==="left"){var I={x:a-b,y:l+u/2,textAnchor:x,verticalAnchor:"middle"};return Hr(Hr({},I),r?{width:Math.max(I.x-r.x,0),height:u}:{})}if(s==="right"){var O={x:a+c+b,y:l+u/2,textAnchor:T,verticalAnchor:"middle"};return Hr(Hr({},O),r?{width:Math.max(r.x+r.width-O.x,0),height:u}:{})}var N=r?{width:c,height:u}:{};return s==="insideLeft"?Hr({x:a+b,y:l+u/2,textAnchor:T,verticalAnchor:"middle"},N):s==="insideRight"?Hr({x:a+c-b,y:l+u/2,textAnchor:x,verticalAnchor:"middle"},N):s==="insideTop"?Hr({x:a+c/2,y:l+d,textAnchor:"middle",verticalAnchor:y},N):s==="insideBottom"?Hr({x:a+c/2,y:l+u-d,textAnchor:"middle",verticalAnchor:m},N):s==="insideTopLeft"?Hr({x:a+b,y:l+d,textAnchor:T,verticalAnchor:y},N):s==="insideTopRight"?Hr({x:a+c-b,y:l+d,textAnchor:x,verticalAnchor:y},N):s==="insideBottomLeft"?Hr({x:a+b,y:l+u-d,textAnchor:T,verticalAnchor:m},N):s==="insideBottomRight"?Hr({x:a+c-b,y:l+u-d,textAnchor:x,verticalAnchor:m},N):Lm(s)&&(dt(s.x)||Mh(s.x))&&(dt(s.y)||Mh(s.y))?Hr({x:a+id(s.x,c),y:l+id(s.y,u),textAnchor:"end",verticalAnchor:"end"},N):Hr({x:a+c/2,y:l+u/2,textAnchor:"middle",verticalAnchor:"middle"},N)},vBe=function(e){return"cx"in e&&dt(e.cx)};function Qi(t){var e=t.offset,n=e===void 0?5:e,r=aBe(t,tBe),i=Hr({offset:n},r),s=i.viewBox,o=i.position,a=i.value,l=i.children,c=i.content,u=i.className,h=u===void 0?"":u,d=i.textBreakAll;if(!s||_n(a)&&_n(l)&&!A.isValidElement(c)&&!rn(c))return null;if(A.isValidElement(c))return A.cloneElement(c,i);var m;if(rn(c)){if(m=A.createElement(c,i),A.isValidElement(m))return m}else m=hBe(i);var y=vBe(s),v=bn(i,!0);if(y&&(o==="insideStart"||o==="insideEnd"||o==="end"))return pBe(i,m,v);var b=y?gBe(i):mBe(i);return Me.createElement($w,Yv({className:un("recharts-label",h)},v,b,{breakAll:d}),m)}Qi.displayName="Label";var TK=function(e){var n=e.cx,r=e.cy,i=e.angle,s=e.startAngle,o=e.endAngle,a=e.r,l=e.radius,c=e.innerRadius,u=e.outerRadius,h=e.x,d=e.y,m=e.top,y=e.left,v=e.width,b=e.height,x=e.clockWise,T=e.labelViewBox;if(T)return T;if(dt(v)&&dt(b)){if(dt(h)&&dt(d))return{x:h,y:d,width:v,height:b};if(dt(m)&&dt(y))return{x:m,y,width:v,height:b}}return dt(h)&&dt(d)?{x:h,y:d,width:0,height:0}:dt(n)&&dt(r)?{cx:n,cy:r,startAngle:s||i||0,endAngle:o||i||0,innerRadius:c||0,outerRadius:u||l||a||0,clockWise:x}:e.viewBox?e.viewBox:{}},yBe=function(e,n){return e?e===!0?Me.createElement(Qi,{key:"label-implicit",viewBox:n}):Xr(e)?Me.createElement(Qi,{key:"label-implicit",viewBox:n,value:e}):A.isValidElement(e)?e.type===Qi?A.cloneElement(e,{key:"label-implicit",viewBox:n}):Me.createElement(Qi,{key:"label-implicit",content:e,viewBox:n}):rn(e)?Me.createElement(Qi,{key:"label-implicit",content:e,viewBox:n}):Lm(e)?Me.createElement(Qi,Yv({viewBox:n},e,{key:"label-implicit"})):null:null},bBe=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&r&&!e.label)return null;var i=e.children,s=TK(e),o=Pa(i,Qi).map(function(l,c){return A.cloneElement(l,{viewBox:n||s,key:"label-".concat(c)})});if(!r)return o;var a=yBe(e.label,n||s);return[a].concat(nBe(o))};Qi.parseViewBox=TK;Qi.renderCallByParent=bBe;var i5,qz;function _Be(){if(qz)return i5;qz=1;function t(e){var n=e==null?0:e.length;return n?e[n-1]:void 0}return i5=t,i5}var wBe=_Be();const xBe=fn(wBe);function Kv(t){"@babel/helpers - typeof";return Kv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Kv(t)}var ABe=["valueAccessor"],EBe=["data","dataKey","clockWise","id","textBreakAll"];function SBe(t){return IBe(t)||PBe(t)||CBe(t)||TBe()}function TBe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
3533In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function CBe(t,e){if(t){if(typeof t=="string")return YI(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return YI(t,e)}}function PBe(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function IBe(t){if(Array.isArray(t))return YI(t)}function YI(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function ox(){return ox=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},ox.apply(this,arguments)}function Qz(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Xz(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Qz(Object(n),!0).forEach(function(r){OBe(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Qz(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function OBe(t,e,n){return e=MBe(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function MBe(t){var e=RBe(t,"string");return Kv(e)=="symbol"?e:e+""}function RBe(t,e){if(Kv(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(Kv(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Yz(t,e){if(t==null)return{};var n=kBe(t,e),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(i=0;i<s.length;i++)r=s[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function kBe(t,e){if(t==null)return{};var n={};for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){if(e.indexOf(r)>=0)continue;n[r]=t[r]}return n}var NBe=function(e){return Array.isArray(e.value)?xBe(e.value):e.value};function Qh(t){var e=t.valueAccessor,n=e===void 0?NBe:e,r=Yz(t,ABe),i=r.data,s=r.dataKey,o=r.clockWise,a=r.id,l=r.textBreakAll,c=Yz(r,EBe);return!i||!i.length?null:Me.createElement(ui,{className:"recharts-label-list"},i.map(function(u,h){var d=_n(s)?n(u,h):Nl(u&&u.payload,s),m=_n(a)?{}:{id:"".concat(a,"-").concat(h)};return Me.createElement(Qi,ox({},bn(u,!0),c,m,{parentViewBox:u.parentViewBox,value:d,textBreakAll:l,viewBox:Qi.parseViewBox(_n(o)?u:Xz(Xz({},u),{},{clockWise:o})),key:"label-".concat(h),index:h}))}))}Qh.displayName="LabelList";function DBe(t,e){return t?t===!0?Me.createElement(Qh,{key:"labelList-implicit",data:e}):Me.isValidElement(t)||rn(t)?Me.createElement(Qh,{key:"labelList-implicit",data:e,content:t}):Lm(t)?Me.createElement(Qh,ox({data:e},t,{key:"labelList-implicit"})):null:null}function BBe(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&n&&!t.label)return null;var r=t.children,i=Pa(r,Qh).map(function(o,a){return A.cloneElement(o,{data:e,key:"labelList-".concat(a)})});if(!n)return i;var s=DBe(t.label,e);return[s].concat(SBe(i))}Qh.renderCallByParent=BBe;function Gv(t){"@babel/helpers - typeof";return Gv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Gv(t)}function KI(){return KI=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},KI.apply(this,arguments)}function Kz(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Gz(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Kz(Object(n),!0).forEach(function(r){LBe(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Kz(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function LBe(t,e,n){return e=FBe(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function FBe(t){var e=UBe(t,"string");return Gv(e)=="symbol"?e:e+""}function UBe(t,e){if(Gv(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(Gv(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var zBe=function(e,n){var r=Ta(n-e),i=Math.min(Math.abs(n-e),359.999);return r*i},e_=function(e){var n=e.cx,r=e.cy,i=e.radius,s=e.angle,o=e.sign,a=e.isExternal,l=e.cornerRadius,c=e.cornerIsExternal,u=l*(a?1:-1)+i,h=Math.asin(l/u)/sx,d=c?s:s+o*h,m=Oi(n,r,u,d),y=Oi(n,r,i,d),v=c?s-o*h:s,b=Oi(n,r,u*Math.cos(h*sx),v);return{center:m,circleTangency:y,lineTangency:b,theta:h}},CK=function(e){var n=e.cx,r=e.cy,i=e.innerRadius,s=e.outerRadius,o=e.startAngle,a=e.endAngle,l=zBe(o,a),c=o+l,u=Oi(n,r,s,o),h=Oi(n,r,s,c),d="M ".concat(u.x,",").concat(u.y,`
3534    A `).concat(s,",").concat(s,`,0,
3535    `).concat(+(Math.abs(l)>180),",").concat(+(o>c),`,
3536    `).concat(h.x,",").concat(h.y,`
3537  `);if(i>0){var m=Oi(n,r,i,o),y=Oi(n,r,i,c);d+="L ".concat(y.x,",").concat(y.y,`
3538            A `).concat(i,",").concat(i,`,0,
3539            `).concat(+(Math.abs(l)>180),",").concat(+(o<=c),`,
3540            `).concat(m.x,",").concat(m.y," Z")}else d+="L ".concat(n,",").concat(r," Z");return d},jBe=function(e){var n=e.cx,r=e.cy,i=e.innerRadius,s=e.outerRadius,o=e.cornerRadius,a=e.forceCornerRadius,l=e.cornerIsExternal,c=e.startAngle,u=e.endAngle,h=Ta(u-c),d=e_({cx:n,cy:r,radius:s,angle:c,sign:h,cornerRadius:o,cornerIsExternal:l}),m=d.circleTangency,y=d.lineTangency,v=d.theta,b=e_({cx:n,cy:r,radius:s,angle:u,sign:-h,cornerRadius:o,cornerIsExternal:l}),x=b.circleTangency,T=b.lineTangency,E=b.theta,C=l?Math.abs(c-u):Math.abs(c-u)-v-E;if(C<0)return a?"M ".concat(y.x,",").concat(y.y,`
3541        a`).concat(o,",").concat(o,",0,0,1,").concat(o*2,`,0
3542        a`).concat(o,",").concat(o,",0,0,1,").concat(-o*2,`,0
3543      `):CK({cx:n,cy:r,innerRadius:i,outerRadius:s,startAngle:c,endAngle:u});var I="M ".concat(y.x,",").concat(y.y,`
3544    A`).concat(o,",").concat(o,",0,0,").concat(+(h<0),",").concat(m.x,",").concat(m.y,`
3545    A`).concat(s,",").concat(s,",0,").concat(+(C>180),",").concat(+(h<0),",").concat(x.x,",").concat(x.y,`
3546    A`).concat(o,",").concat(o,",0,0,").concat(+(h<0),",").concat(T.x,",").concat(T.y,`
3547  `);if(i>0){var O=e_({cx:n,cy:r,radius:i,angle:c,sign:h,isExternal:!0,cornerRadius:o,cornerIsExternal:l}),N=O.circleTangency,U=O.lineTangency,F=O.theta,H=e_({cx:n,cy:r,radius:i,angle:u,sign:-h,isExternal:!0,cornerRadius:o,cornerIsExternal:l}),W=H.circleTangency,z=H.lineTangency,V=H.theta,M=l?Math.abs(c-u):Math.abs(c-u)-F-V;if(M<0&&o===0)return"".concat(I,"L").concat(n,",").concat(r,"Z");I+="L".concat(z.x,",").concat(z.y,`
3548      A`).concat(o,",").concat(o,",0,0,").concat(+(h<0),",").concat(W.x,",").concat(W.y,`
3549      A`).concat(i,",").concat(i,",0,").concat(+(M>180),",").concat(+(h>0),",").concat(N.x,",").concat(N.y,`
3550      A`).concat(o,",").concat(o,",0,0,").concat(+(h<0),",").concat(U.x,",").concat(U.y,"Z")}else I+="L".concat(n,",").concat(r,"Z");return I},VBe={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},PK=function(e){var n=Gz(Gz({},VBe),e),r=n.cx,i=n.cy,s=n.innerRadius,o=n.outerRadius,a=n.cornerRadius,l=n.forceCornerRadius,c=n.cornerIsExternal,u=n.startAngle,h=n.endAngle,d=n.className;if(o<s||u===h)return null;var m=un("recharts-sector",d),y=o-s,v=id(a,y,0,!0),b;return v>0&&Math.abs(u-h)<360?b=jBe({cx:r,cy:i,innerRadius:s,outerRadius:o,cornerRadius:Math.min(v,y/2),forceCornerRadius:l,cornerIsExternal:c,startAngle:u,endAngle:h}):b=CK({cx:r,cy:i,innerRadius:s,outerRadius:o,startAngle:u,endAngle:h}),Me.createElement("path",KI({},bn(n,!0),{className:m,d:b,role:"img"}))};function Zv(t){"@babel/helpers - typeof";return Zv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Zv(t)}function GI(){return GI=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},GI.apply(this,arguments)}function Zz(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Jz(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Zz(Object(n),!0).forEach(function(r){WBe(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Zz(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function WBe(t,e,n){return e=$Be(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function $Be(t){var e=HBe(t,"string");return Zv(e)=="symbol"?e:e+""}function HBe(t,e){if(Zv(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(Zv(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var ej={curveBasisClosed:KIe,curveBasisOpen:GIe,curveBasis:YIe,curveBumpX:DIe,curveBumpY:BIe,curveLinearClosed:ZIe,curveLinear:_A,curveMonotoneX:JIe,curveMonotoneY:eOe,curveNatural:tOe,curveStep:nOe,curveStepAfter:iOe,curveStepBefore:rOe},t_=function(e){return e.x===+e.x&&e.y===+e.y},C1=function(e){return e.x},P1=function(e){return e.y},qBe=function(e,n){if(rn(e))return e;var r="curve".concat(yA(e));return(r==="curveMonotone"||r==="curveBump")&&n?ej["".concat(r).concat(n==="vertical"?"Y":"X")]:ej[r]||_A},QBe=function(e){var n=e.type,r=n===void 0?"linear":n,i=e.points,s=i===void 0?[]:i,o=e.baseLine,a=e.layout,l=e.connectNulls,c=l===void 0?!1:l,u=qBe(r,a),h=c?s.filter(function(v){return t_(v)}):s,d;if(Array.isArray(o)){var m=c?o.filter(function(v){return t_(v)}):o,y=h.map(function(v,b){return Jz(Jz({},v),{},{base:m[b]})});return a==="vertical"?d=qb().y(P1).x1(C1).x0(function(v){return v.base.x}):d=qb().x(C1).y1(P1).y0(function(v){return v.base.y}),d.defined(t_).curve(u),d(y)}return a==="vertical"&&dt(o)?d=qb().y(P1).x1(C1).x0(o):dt(o)?d=qb().x(C1).y1(P1).y0(o):d=CX().x(C1).y(P1),d.defined(t_).curve(u),d(h)},tj=function(e){var n=e.className,r=e.points,i=e.path,s=e.pathRef;if((!r||!r.length)&&!i)return null;var o=r&&r.length?QBe(e):i;return A.createElement("path",GI({},bn(e,!1),Rw(e),{className:un("recharts-curve",n),d:o,ref:s}))},s5={exports:{}},o5,nj;function XBe(){if(nj)return o5;nj=1;var t="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return o5=t,o5}var a5,rj;function YBe(){if(rj)return a5;rj=1;var t=XBe();function e(){}function n(){}return n.resetWarningCache=e,a5=function(){function r(o,a,l,c,u,h){if(h!==t){var d=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw d.name="Invariant Violation",d}}r.isRequired=r;function i(){return r}var s={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:e};return s.PropTypes=s,s},a5}var ij;function KBe(){return ij||(ij=1,s5.exports=YBe()()),s5.exports}var GBe=KBe();const Sn=fn(GBe);var ZBe=Object.getOwnPropertyNames,JBe=Object.getOwnPropertySymbols,eLe=Object.prototype.hasOwnProperty;function sj(t,e){return function(r,i,s){return t(r,i,s)&&e(r,i,s)}}function n_(t){return function(n,r,i){if(!n||!r||typeof n!="object"||typeof r!="object")return t(n,r,i);var s=i.cache,o=s.get(n),a=s.get(r);if(o&&a)return o===r&&a===n;s.set(n,r),s.set(r,n);var l=t(n,r,i);return s.delete(n),s.delete(r),l}}function oj(t){return ZBe(t).concat(JBe(t))}var tLe=Object.hasOwn||(function(t,e){return eLe.call(t,e)});function Ad(t,e){return t===e||!t&&!e&&t!==t&&e!==e}var nLe="__v",rLe="__o",iLe="_owner",aj=Object.getOwnPropertyDescriptor,lj=Object.keys;function sLe(t,e,n){var r=t.length;if(e.length!==r)return!1;for(;r-- >0;)if(!n.equals(t[r],e[r],r,r,t,e,n))return!1;return!0}function oLe(t,e){return Ad(t.getTime(),e.getTime())}function aLe(t,e){return t.name===e.name&&t.message===e.message&&t.cause===e.cause&&t.stack===e.stack}function lLe(t,e){return t===e}function cj(t,e,n){var r=t.size;if(r!==e.size)return!1;if(!r)return!0;for(var i=new Array(r),s=t.entries(),o,a,l=0;(o=s.next())&&!o.done;){for(var c=e.entries(),u=!1,h=0;(a=c.next())&&!a.done;){if(i[h]){h++;continue}var d=o.value,m=a.value;if(n.equals(d[0],m[0],l,h,t,e,n)&&n.equals(d[1],m[1],d[0],m[0],t,e,n)){u=i[h]=!0;break}h++}if(!u)return!1;l++}return!0}var cLe=Ad;function uLe(t,e,n){var r=lj(t),i=r.length;if(lj(e).length!==i)return!1;for(;i-- >0;)if(!IK(t,e,n,r[i]))return!1;return!0}function I1(t,e,n){var r=oj(t),i=r.length;if(oj(e).length!==i)return!1;for(var s,o,a;i-- >0;)if(s=r[i],!IK(t,e,n,s)||(o=aj(t,s),a=aj(e,s),(o||a)&&(!o||!a||o.configurable!==a.configurable||o.enumerable!==a.enumerable||o.writable!==a.writable)))return!1;return!0}function fLe(t,e){return Ad(t.valueOf(),e.valueOf())}function hLe(t,e){return t.source===e.source&&t.flags===e.flags}function uj(t,e,n){var r=t.size;if(r!==e.size)return!1;if(!r)return!0;for(var i=new Array(r),s=t.values(),o,a;(o=s.next())&&!o.done;){for(var l=e.values(),c=!1,u=0;(a=l.next())&&!a.done;){if(!i[u]&&n.equals(o.value,a.value,o.value,a.value,t,e,n)){c=i[u]=!0;break}u++}if(!c)return!1}return!0}function dLe(t,e){var n=t.length;if(e.length!==n)return!1;for(;n-- >0;)if(t[n]!==e[n])return!1;return!0}function pLe(t,e){return t.hostname===e.hostname&&t.pathname===e.pathname&&t.protocol===e.protocol&&t.port===e.port&&t.hash===e.hash&&t.username===e.username&&t.password===e.password}function IK(t,e,n,r){return(r===iLe||r===rLe||r===nLe)&&(t.$$typeof||e.$$typeof)?!0:tLe(e,r)&&n.equals(t[r],e[r],r,r,t,e,n)}var gLe="[object Arguments]",mLe="[object Boolean]",vLe="[object Date]",yLe="[object Error]",bLe="[object Map]",_Le="[object Number]",wLe="[object Object]",xLe="[object RegExp]",ALe="[object Set]",ELe="[object String]",SLe="[object URL]",TLe=Array.isArray,fj=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,hj=Object.assign,CLe=Object.prototype.toString.call.bind(Object.prototype.toString);function PLe(t){var e=t.areArraysEqual,n=t.areDatesEqual,r=t.areErrorsEqual,i=t.areFunctionsEqual,s=t.areMapsEqual,o=t.areNumbersEqual,a=t.areObjectsEqual,l=t.arePrimitiveWrappersEqual,c=t.areRegExpsEqual,u=t.areSetsEqual,h=t.areTypedArraysEqual,d=t.areUrlsEqual;return function(y,v,b){if(y===v)return!0;
3550if(y==null||v==null)return!1;var x=typeof y;if(x!==typeof v)return!1;if(x!=="object")return x==="number"?o(y,v,b):x==="function"?i(y,v,b):!1;var T=y.constructor;if(T!==v.constructor)return!1;if(T===Object)return a(y,v,b);if(TLe(y))return e(y,v,b);if(fj!=null&&fj(y))return h(y,v,b);if(T===Date)return n(y,v,b);if(T===RegExp)return c(y,v,b);if(T===Map)return s(y,v,b);if(T===Set)return u(y,v,b);var E=CLe(y);return E===vLe?n(y,v,b):E===xLe?c(y,v,b):E===bLe?s(y,v,b):E===ALe?u(y,v,b):E===wLe?typeof y.then!="function"&&typeof v.then!="function"&&a(y,v,b):E===SLe?d(y,v,b):E===yLe?r(y,v,b):E===gLe?a(y,v,b):E===mLe||E===_Le||E===ELe?l(y,v,b):!1}}function ILe(t){var e=t.circular,n=t.createCustomConfig,r=t.strict,i={areArraysEqual:r?I1:sLe,areDatesEqual:oLe,areErrorsEqual:aLe,areFunctionsEqual:lLe,areMapsEqual:r?sj(cj,I1):cj,areNumbersEqual:cLe,areObjectsEqual:r?I1:uLe,arePrimitiveWrappersEqual:fLe,areRegExpsEqual:hLe,areSetsEqual:r?sj(uj,I1):uj,areTypedArraysEqual:r?I1:dLe,areUrlsEqual:pLe};if(n&&(i=hj({},i,n(i))),e){var s=n_(i.areArraysEqual),o=n_(i.areMapsEqual),a=n_(i.areObjectsEqual),l=n_(i.areSetsEqual);i=hj({},i,{areArraysEqual:s,areMapsEqual:o,areObjectsEqual:a,areSetsEqual:l})}return i}function OLe(t){return function(e,n,r,i,s,o,a){return t(e,n,a)}}function MLe(t){var e=t.circular,n=t.comparator,r=t.createState,i=t.equals,s=t.strict;if(r)return function(l,c){var u=r(),h=u.cache,d=h===void 0?e?new WeakMap:void 0:h,m=u.meta;return n(l,c,{cache:d,equals:i,meta:m,strict:s})};if(e)return function(l,c){return n(l,c,{cache:new WeakMap,equals:i,meta:void 0,strict:s})};var o={cache:void 0,equals:i,meta:void 0,strict:s};return function(l,c){return n(l,c,o)}}var RLe=vf();vf({strict:!0});vf({circular:!0});vf({circular:!0,strict:!0});vf({createInternalComparator:function(){return Ad}});vf({strict:!0,createInternalComparator:function(){return Ad}});vf({circular:!0,createInternalComparator:function(){return Ad}});vf({circular:!0,createInternalComparator:function(){return Ad},strict:!0});function vf(t){t===void 0&&(t={});var e=t.circular,n=e===void 0?!1:e,r=t.createInternalComparator,i=t.createState,s=t.strict,o=s===void 0?!1:s,a=ILe(t),l=PLe(a),c=r?r(l):OLe(l);return MLe({circular:n,comparator:l,createState:i,equals:c,strict:o})}function kLe(t){typeof requestAnimationFrame<"u"&&requestAnimationFrame(t)}function dj(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=-1,r=function i(s){n<0&&(n=s),s-n>e?(t(s),n=-1):kLe(i)};requestAnimationFrame(r)}function ZI(t){"@babel/helpers - typeof";return ZI=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ZI(t)}function NLe(t){return FLe(t)||LLe(t)||BLe(t)||DLe()}function DLe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
3551In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function BLe(t,e){if(t){if(typeof t=="string")return pj(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return pj(t,e)}}function pj(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function LLe(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function FLe(t){if(Array.isArray(t))return t}function ULe(){var t={},e=function(){return null},n=!1,r=function i(s){if(!n){if(Array.isArray(s)){if(!s.length)return;var o=s,a=NLe(o),l=a[0],c=a.slice(1);if(typeof l=="number"){dj(i.bind(null,c),l);return}i(l),dj(i.bind(null,c));return}ZI(s)==="object"&&(t=s,e(t)),typeof s=="function"&&s()}};return{stop:function(){n=!0},start:function(s){n=!1,r(s)},subscribe:function(s){return e=s,function(){e=function(){return null}}}}}function Jv(t){"@babel/helpers - typeof";return Jv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Jv(t)}function gj(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function mj(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};
vendor: 148,940 bytes, lines 3551-3572
3551e%2?gj(Object(n),!0).forEach(function(r){OK(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):gj(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function OK(t,e,n){return e=zLe(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function zLe(t){var e=jLe(t,"string");return Jv(e)==="symbol"?e:String(e)}function jLe(t,e){if(Jv(t)!=="object"||t===null)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(Jv(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var VLe=function(e,n){return[Object.keys(e),Object.keys(n)].reduce(function(r,i){return r.filter(function(s){return i.includes(s)})})},WLe=function(e){return e},$Le=function(e){return e.replace(/([A-Z])/g,function(n){return"-".concat(n.toLowerCase())})},dv=function(e,n){return Object.keys(n).reduce(function(r,i){return mj(mj({},r),{},OK({},i,e(i,n[i])))},{})},vj=function(e,n,r){return e.map(function(i){return"".concat($Le(i)," ").concat(n,"ms ").concat(r)}).join(",")};function HLe(t,e){return XLe(t)||QLe(t,e)||MK(t,e)||qLe()}function qLe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
3552In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function QLe(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,s,o,a=[],l=!0,c=!1;try{if(s=(n=n.call(t)).next,e!==0)for(;!(l=(r=s.call(n)).done)&&(a.push(r.value),a.length!==e);l=!0);}catch(u){c=!0,i=u}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return a}}function XLe(t){if(Array.isArray(t))return t}function YLe(t){return ZLe(t)||GLe(t)||MK(t)||KLe()}function KLe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
3553In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function MK(t,e){if(t){if(typeof t=="string")return JI(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return JI(t,e)}}function GLe(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function ZLe(t){if(Array.isArray(t))return JI(t)}function JI(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var ax=1e-4,RK=function(e,n){return[0,3*e,3*n-6*e,3*e-3*n+1]},kK=function(e,n){return e.map(function(r,i){return r*Math.pow(n,i)}).reduce(function(r,i){return r+i})},yj=function(e,n){return function(r){var i=RK(e,n);return kK(i,r)}},JLe=function(e,n){return function(r){var i=RK(e,n),s=[].concat(YLe(i.map(function(o,a){return o*a}).slice(1)),[0]);return kK(s,r)}},bj=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i=n[0],s=n[1],o=n[2],a=n[3];if(n.length===1)switch(n[0]){case"linear":i=0,s=0,o=1,a=1;break;case"ease":i=.25,s=.1,o=.25,a=1;break;case"ease-in":i=.42,s=0,o=1,a=1;break;case"ease-out":i=.42,s=0,o=.58,a=1;break;case"ease-in-out":i=0,s=0,o=.58,a=1;break;default:{var l=n[0].split("(");if(l[0]==="cubic-bezier"&&l[1].split(")")[0].split(",").length===4){var c=l[1].split(")")[0].split(",").map(function(b){return parseFloat(b)}),u=HLe(c,4);i=u[0],s=u[1],o=u[2],a=u[3]}}}var h=yj(i,o),d=yj(s,a),m=JLe(i,o),y=function(x){return x>1?1:x<0?0:x},v=function(x){for(var T=x>1?1:x,E=T,C=0;C<8;++C){var I=h(E)-T,O=m(E);if(Math.abs(I-T)<ax||O<ax)return d(E);E=y(E-I/O)}return d(E)};return v.isStepper=!1,v},e9e=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=e.stiff,r=n===void 0?100:n,i=e.damping,s=i===void 0?8:i,o=e.dt,a=o===void 0?17:o,l=function(u,h,d){var m=-(u-h)*r,y=d*s,v=d+(m-y)*a/1e3,b=d*a/1e3+u;return Math.abs(b-h)<ax&&Math.abs(v)<ax?[h,0]:[b,v]};return l.isStepper=!0,l.dt=a,l},t9e=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i=n[0];if(typeof i=="string")switch(i){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return bj(i);case"spring":return e9e();default:if(i.split("(")[0]==="cubic-bezier")return bj(i)}return typeof i=="function"?i:null};function ey(t){"@babel/helpers - typeof";return ey=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ey(t)}function _j(t){return i9e(t)||r9e(t)||NK(t)||n9e()}function n9e(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
3554In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function r9e(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function i9e(t){if(Array.isArray(t))return tO(t)}function wj(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Si(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?wj(Object(n),!0).forEach(function(r){eO(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):wj(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function eO(t,e,n){return e=s9e(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function s9e(t){var e=o9e(t,"string");return ey(e)==="symbol"?e:String(e)}function o9e(t,e){if(ey(t)!=="object"||t===null)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(ey(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function a9e(t,e){return u9e(t)||c9e(t,e)||NK(t,e)||l9e()}function l9e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
3555In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function NK(t,e){if(t){if(typeof t=="string")return tO(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return tO(t,e)}}function tO(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function c9e(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,s,o,a=[],l=!0,c=!1;try{if(s=(n=n.call(t)).next,e!==0)for(;!(l=(r=s.call(n)).done)&&(a.push(r.value),a.length!==e);l=!0);}catch(u){c=!0,i=u}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return a}}function u9e(t){if(Array.isArray(t))return t}var lx=function(e,n,r){return e+(n-e)*r},nO=function(e){var n=e.from,r=e.to;return n!==r},f9e=function t(e,n,r){var i=dv(function(s,o){if(nO(o)){var a=e(o.from,o.to,o.velocity),l=a9e(a,2),c=l[0],u=l[1];return Si(Si({},o),{},{from:c,velocity:u})}return o},n);return r<1?dv(function(s,o){return nO(o)?Si(Si({},o),{},{velocity:lx(o.velocity,i[s].velocity,r),from:lx(o.from,i[s].from,r)}):o},n):t(e,i,r-1)};const h9e=(function(t,e,n,r,i){var s=VLe(t,e),o=s.reduce(function(b,x){return Si(Si({},b),{},eO({},x,[t[x],e[x]]))},{}),a=s.reduce(function(b,x){return Si(Si({},b),{},eO({},x,{from:t[x],velocity:0,to:e[x]}))},{}),l=-1,c,u,h=function(){return null},d=function(){return dv(function(x,T){return T.from},a)},m=function(){return!Object.values(a).filter(nO).length},y=function(x){c||(c=x);var T=x-c,E=T/n.dt;a=f9e(n,a,E),i(Si(Si(Si({},t),e),d())),c=x,m()||(l=requestAnimationFrame(h))},v=function(x){u||(u=x);var T=(x-u)/r,E=dv(function(I,O){return lx.apply(void 0,_j(O).concat([n(T)]))},o);if(i(Si(Si(Si({},t),e),E)),T<1)l=requestAnimationFrame(h);else{var C=dv(function(I,O){return lx.apply(void 0,_j(O).concat([n(1)]))},o);i(Si(Si(Si({},t),e),C))}};return h=n.isStepper?y:v,function(){return requestAnimationFrame(h),function(){cancelAnimationFrame(l)}}});function _m(t){"@babel/helpers - typeof";return _m=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_m(t)}var d9e=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function p9e(t,e){if(t==null)return{};var n=g9e(t,e),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(i=0;i<s.length;i++)r=s[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function g9e(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,s;for(s=0;s<r.length;s++)i=r[s],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function l5(t){return b9e(t)||y9e(t)||v9e(t)||m9e()}function m9e(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
3556In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function v9e(t,e){if(t){if(typeof t=="string")return rO(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return rO(t,e)}}function y9e(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function b9e(t){if(Array.isArray(t))return rO(t)}function rO(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function xj(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function pa(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?xj(Object(n),!0).forEach(function(r){Q1(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):xj(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Q1(t,e,n){return e=DK(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function _9e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function w9e(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,DK(r.key),r)}}function x9e(t,e,n){return e&&w9e(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function DK(t){var e=A9e(t,"string");return _m(e)==="symbol"?e:String(e)}function A9e(t,e){if(_m(t)!=="object"||t===null)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(_m(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function E9e(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&iO(t,e)}function iO(t,e){return iO=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},iO(t,e)}function S9e(t){var e=T9e();return function(){var r=cx(t),i;if(e){var s=cx(this).constructor;i=Reflect.construct(r,arguments,s)}else i=r.apply(this,arguments);return sO(this,i)}}function sO(t,e){if(e&&(_m(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return oO(t)}function oO(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function T9e(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function cx(t){return cx=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},cx(t)}var cf=(function(t){E9e(n,t);var e=S9e(n);function n(r,i){var s;_9e(this,n),s=e.call(this,r,i);var o=s.props,a=o.isActive,l=o.attributeName,c=o.from,u=o.to,h=o.steps,d=o.children,m=o.duration;if(s.handleStyleChange=s.handleStyleChange.bind(oO(s)),s.changeStyle=s.changeStyle.bind(oO(s)),!a||m<=0)return s.state={style:{}},typeof d=="function"&&(s.state={style:u}),sO(s);if(h&&h.length)s.state={style:h[0].style};else if(c){if(typeof d=="function")return s.state={style:c},sO(s);s.state={style:l?Q1({},l,c):c}}else s.state={style:{}};return s}return x9e(n,[{key:"componentDidMount",value:function(){var i=this.props,s=i.isActive,o=i.canBegin;this.mounted=!0,!(!s||!o)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(i){var s=this.props,o=s.isActive,a=s.canBegin,l=s.attributeName,c=s.shouldReAnimate,u=s.to,h=s.from,d=this.state.style;if(a){if(!o){var m={style:l?Q1({},l,u):u};this.state&&d&&(l&&d[l]!==u||!l&&d!==u)&&this.setState(m);return}if(!(RLe(i.to,u)&&i.canBegin&&i.isActive)){var y=!i.canBegin||!i.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var v=y||c?h:i.to;if(this.state&&d){var b={style:l?Q1({},l,v):v};(l&&d[l]!==v||!l&&d!==v)&&this.setState(b)}this.runAnimation(pa(pa({},this.props),{},{from:v,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var i=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),i&&i()}},{key:"handleStyleChange",value:function(i){this.changeStyle(i)}},{key:"changeStyle",value:function(i){this.mounted&&this.setState({style:i})}},{key:"runJSAnimation",value:function(i){var s=this,o=i.from,a=i.to,l=i.duration,c=i.easing,u=i.begin,h=i.onAnimationEnd,d=i.onAnimationStart,m=h9e(o,a,t9e(c),l,this.changeStyle),y=function(){s.stopJSAnimation=m()};this.manager.start([d,u,y,l,h])}},{key:"runStepAnimation",value:function(i){var s=this,o=i.steps,a=i.begin,l=i.onAnimationStart,c=o[0],u=c.style,h=c.duration,d=h===void 0?0:h,m=function(v,b,x){if(x===0)return v;var T=b.duration,E=b.easing,C=E===void 0?"ease":E,I=b.style,O=b.properties,N=b.onAnimationEnd,U=x>0?o[x-1]:b,F=O||Object.keys(I);if(typeof C=="function"||C==="spring")return[].concat(l5(v),[s.runJSAnimation.bind(s,{from:U.style,to:I,duration:T,easing:C}),T]);var H=vj(F,T,C),W=pa(pa(pa({},U.style),I),{},{transition:H});return[].concat(l5(v),[W,T,N]).filter(WLe)};return this.manager.start([l].concat(l5(o.reduce(m,[u,Math.max(d,a)])),[i.onAnimationEnd]))}},{key:"runAnimation",value:function(i){this.manager||(this.manager=ULe());var s=i.begin,o=i.duration,a=i.attributeName,l=i.to,c=i.easing,u=i.onAnimationStart,h=i.onAnimationEnd,d=i.steps,m=i.children,y=this.manager;if(this.unSubscribe=y.subscribe(this.handleStyleChange),typeof c=="function"||typeof m=="function"||c==="spring"){this.runJSAnimation(i);return}if(d.length>1){this.runStepAnimation(i);return}var v=a?Q1({},a,l):l,b=vj(Object.keys(v),o,c);y.start([u,s,pa(pa({},v),{},{transition:b}),o,h])}},{key:"render",value:function(){var i=this.props,s=i.children;i.begin;var o=i.duration;i.attributeName,i.easing;var a=i.isActive;i.steps,i.from,i.to,i.canBegin,i.onAnimationEnd,i.shouldReAnimate,i.onAnimationReStart;var l=p9e(i,d9e),c=A.Children.count(s),u=this.state.style;if(typeof s=="function")return s(u);if(!a||c===0||o<=0)return s;var h=function(m){var y=m.props,v=y.style,b=v===void 0?{}:v,x=y.className,T=A.cloneElement(m,pa(pa({},l),{},{style:pa(pa({},b),u),className:x}));return T};return c===1?h(A.Children.only(s)):Me.createElement("div",null,A.Children.map(s,function(d){return h(d)}))}}]),n})(A.PureComponent);cf.displayName="Animate";cf.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};cf.propTypes={from:Sn.oneOfType([Sn.object,Sn.string]),to:Sn.oneOfType([Sn.object,Sn.string]),attributeName:Sn.string,duration:Sn.number,begin:Sn.number,easing:Sn.oneOfType([Sn.string,Sn.func]),steps:Sn.arrayOf(Sn.shape({duration:Sn.number.isRequired,style:Sn.object.isRequired,easing:Sn.oneOfType([Sn.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),Sn.func]),properties:Sn.arrayOf("string"),onAnimationEnd:Sn.func})),children:Sn.oneOfType([Sn.node,Sn.func]),isActive:Sn.bool,canBegin:Sn.bool,onAnimationEnd:Sn.func,shouldReAnimate:Sn.bool,onAnimationStart:Sn.func,onAnimationReStart:Sn.func};function ty(t){"@babel/helpers - typeof";return ty=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ty(t)}function ux(){return ux=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},ux.apply(this,arguments)}function C9e(t,e){return M9e(t)||O9e(t,e)||I9e(t,e)||P9e()}function P9e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
3557In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function I9e(t,e){if(t){if(typeof t=="string")return Aj(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Aj(t,e)}}function Aj(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function O9e(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,s,o,a=[],l=!0,c=!1;try{if(s=(n=n.call(t)).next,e!==0)for(;!(l=(r=s.call(n)).done)&&(a.push(r.value),a.length!==e);l=!0);}catch(u){c=!0,i=u}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return a}}function M9e(t){if(Array.isArray(t))return t}function Ej(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Sj(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Ej(Object(n),!0).forEach(function(r){R9e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ej(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function R9e(t,e,n){return e=k9e(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function k9e(t){var e=N9e(t,"string");return ty(e)=="symbol"?e:e+""}function N9e(t,e){if(ty(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(ty(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Tj=function(e,n,r,i,s){var o=Math.min(Math.abs(r)/2,Math.abs(i)/2),a=i>=0?1:-1,l=r>=0?1:-1,c=i>=0&&r>=0||i<0&&r<0?1:0,u;if(o>0&&s instanceof Array){for(var h=[0,0,0,0],d=0,m=4;d<m;d++)h[d]=s[d]>o?o:s[d];u="M".concat(e,",").concat(n+a*h[0]),h[0]>0&&(u+="A ".concat(h[0],",").concat(h[0],",0,0,").concat(c,",").concat(e+l*h[0],",").concat(n)),u+="L ".concat(e+r-l*h[1],",").concat(n),h[1]>0&&(u+="A ".concat(h[1],",").concat(h[1],",0,0,").concat(c,`,
3558        `).concat(e+r,",").concat(n+a*h[1])),u+="L ".concat(e+r,",").concat(n+i-a*h[2]),h[2]>0&&(u+="A ".concat(h[2],",").concat(h[2],",0,0,").concat(c,`,
3559        `).concat(e+r-l*h[2],",").concat(n+i)),u+="L ".concat(e+l*h[3],",").concat(n+i),h[3]>0&&(u+="A ".concat(h[3],",").concat(h[3],",0,0,").concat(c,`,
3560        `).concat(e,",").concat(n+i-a*h[3])),u+="Z"}else if(o>0&&s===+s&&s>0){var y=Math.min(o,s);u="M ".concat(e,",").concat(n+a*y,`
3561            A `).concat(y,",").concat(y,",0,0,").concat(c,",").concat(e+l*y,",").concat(n,`
3562            L `).concat(e+r-l*y,",").concat(n,`
3563            A `).concat(y,",").concat(y,",0,0,").concat(c,",").concat(e+r,",").concat(n+a*y,`
3564            L `).concat(e+r,",").concat(n+i-a*y,`
3565            A `).concat(y,",").concat(y,",0,0,").concat(c,",").concat(e+r-l*y,",").concat(n+i,`
3566            L `).concat(e+l*y,",").concat(n+i,`
3567            A `).concat(y,",").concat(y,",0,0,").concat(c,",").concat(e,",").concat(n+i-a*y," Z")}else u="M ".concat(e,",").concat(n," h ").concat(r," v ").concat(i," h ").concat(-r," Z");return u},D9e=function(e,n){if(!e||!n)return!1;var r=e.x,i=e.y,s=n.x,o=n.y,a=n.width,l=n.height;if(Math.abs(a)>0&&Math.abs(l)>0){var c=Math.min(s,s+a),u=Math.max(s,s+a),h=Math.min(o,o+l),d=Math.max(o,o+l);return r>=c&&r<=u&&i>=h&&i<=d}return!1},B9e={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},tR=function(e){var n=Sj(Sj({},B9e),e),r=A.useRef(),i=A.useState(-1),s=C9e(i,2),o=s[0],a=s[1];A.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var C=r.current.getTotalLength();C&&a(C)}catch{}},[]);var l=n.x,c=n.y,u=n.width,h=n.height,d=n.radius,m=n.className,y=n.animationEasing,v=n.animationDuration,b=n.animationBegin,x=n.isAnimationActive,T=n.isUpdateAnimationActive;if(l!==+l||c!==+c||u!==+u||h!==+h||u===0||h===0)return null;var E=un("recharts-rectangle",m);return T?Me.createElement(cf,{canBegin:o>0,from:{width:u,height:h,x:l,y:c},to:{width:u,height:h,x:l,y:c},duration:v,animationEasing:y,isActive:T},function(C){var I=C.width,O=C.height,N=C.x,U=C.y;return Me.createElement(cf,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:b,duration:v,isActive:x,easing:y},Me.createElement("path",ux({},bn(n,!0),{className:E,d:Tj(N,U,I,O,d),ref:r})))}):Me.createElement("path",ux({},bn(n,!0),{className:E,d:Tj(l,c,u,h,d)}))};function aO(){return aO=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},aO.apply(this,arguments)}var BK=function(e){var n=e.cx,r=e.cy,i=e.r,s=e.className,o=un("recharts-dot",s);return n===+n&&r===+r&&i===+i?A.createElement("circle",aO({},bn(e,!1),Rw(e),{className:o,cx:n,cy:r,r:i})):null};function ny(t){"@babel/helpers - typeof";return ny=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ny(t)}var L9e=["x","y","top","left","width","height","className"];function lO(){return lO=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},lO.apply(this,arguments)}function Cj(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function F9e(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Cj(Object(n),!0).forEach(function(r){U9e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Cj(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function U9e(t,e,n){return e=z9e(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function z9e(t){var e=j9e(t,"string");return ny(e)=="symbol"?e:e+""}function j9e(t,e){if(ny(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(ny(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function V9e(t,e){if(t==null)return{};var n=W9e(t,e),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(i=0;i<s.length;i++)r=s[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function W9e(t,e){if(t==null)return{};var n={};for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){if(e.indexOf(r)>=0)continue;n[r]=t[r]}return n}var $9e=function(e,n,r,i,s,o){return"M".concat(e,",").concat(s,"v").concat(i,"M").concat(o,",").concat(n,"h").concat(r)},H9e=function(e){var n=e.x,r=n===void 0?0:n,i=e.y,s=i===void 0?0:i,o=e.top,a=o===void 0?0:o,l=e.left,c=l===void 0?0:l,u=e.width,h=u===void 0?0:u,d=e.height,m=d===void 0?0:d,y=e.className,v=V9e(e,L9e),b=F9e({x:r,y:s,top:a,left:c,width:h,height:m},v);return!dt(r)||!dt(s)||!dt(h)||!dt(m)||!dt(a)||!dt(c)?null:Me.createElement("path",lO({},bn(b,!0),{className:un("recharts-cross",y),d:$9e(r,s,h,m,a,c)}))},c5,Pj;function q9e(){if(Pj)return c5;Pj=1;var t=KX(),e=t(Object.getPrototypeOf,Object);return c5=e,c5}var u5,Ij;function Q9e(){if(Ij)return u5;Ij=1;var t=Uc(),e=q9e(),n=zc(),r="[object Object]",i=Function.prototype,s=Object.prototype,o=i.toString,a=s.hasOwnProperty,l=o.call(Object);function c(u){if(!n(u)||t(u)!=r)return!1;var h=e(u);if(h===null)return!0;var d=a.call(h,"constructor")&&h.constructor;return typeof d=="function"&&d instanceof d&&o.call(d)==l}return u5=c,u5}var X9e=Q9e();const Y9e=fn(X9e);var f5,Oj;function K9e(){if(Oj)return f5;Oj=1;var t=Uc(),e=zc(),n="[object Boolean]";function r(i){return i===!0||i===!1||e(i)&&t(i)==n}return f5=r,f5}var G9e=K9e();const Z9e=fn(G9e);function ry(t){"@babel/helpers - typeof";return ry=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ry(t)}function fx(){return fx=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},fx.apply(this,arguments)}function J9e(t,e){return rFe(t)||nFe(t,e)||tFe(t,e)||eFe()}function eFe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
3568In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function tFe(t,e){if(t){if(typeof t=="string")return Mj(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Mj(t,e)}}function Mj(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function nFe(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,s,o,a=[],l=!0,c=!1;try{if(s=(n=n.call(t)).next,e!==0)for(;!(l=(r=s.call(n)).done)&&(a.push(r.value),a.length!==e);l=!0);}catch(u){c=!0,i=u}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return a}}function rFe(t){if(Array.isArray(t))return t}function Rj(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function kj(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Rj(Object(n),!0).forEach(function(r){iFe(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Rj(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function iFe(t,e,n){return e=sFe(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function sFe(t){var e=oFe(t,"string");return ry(e)=="symbol"?e:e+""}function oFe(t,e){if(ry(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(ry(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Nj=function(e,n,r,i,s){var o=r-i,a;return a="M ".concat(e,",").concat(n),a+="L ".concat(e+r,",").concat(n),a+="L ".concat(e+r-o/2,",").concat(n+s),a+="L ".concat(e+r-o/2-i,",").concat(n+s),a+="L ".concat(e,",").concat(n," Z"),a},aFe={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},lFe=function(e){var n=kj(kj({},aFe),e),r=A.useRef(),i=A.useState(-1),s=J9e(i,2),o=s[0],a=s[1];A.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var E=r.current.getTotalLength();E&&a(E)}catch{}},[]);var l=n.x,c=n.y,u=n.upperWidth,h=n.lowerWidth,d=n.height,m=n.className,y=n.animationEasing,v=n.animationDuration,b=n.animationBegin,x=n.isUpdateAnimationActive;if(l!==+l||c!==+c||u!==+u||h!==+h||d!==+d||u===0&&h===0||d===0)return null;var T=un("recharts-trapezoid",m);return x?Me.createElement(cf,{canBegin:o>0,from:{upperWidth:0,lowerWidth:0,height:d,x:l,y:c},to:{upperWidth:u,lowerWidth:h,height:d,x:l,y:c},duration:v,animationEasing:y,isActive:x},function(E){var C=E.upperWidth,I=E.lowerWidth,O=E.height,N=E.x,U=E.y;return Me.createElement(cf,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:b,duration:v,easing:y},Me.createElement("path",fx({},bn(n,!0),{className:T,d:Nj(N,U,C,I,O),ref:r})))}):Me.createElement("g",null,Me.createElement("path",fx({},bn(n,!0),{className:T,d:Nj(l,c,u,h,d)})))},cFe=["option","shapeType","propTransformer","activeClassName","isActive"];function iy(t){"@babel/helpers - typeof";return iy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},iy(t)}function uFe(t,e){if(t==null)return{};var n=fFe(t,e),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(i=0;i<s.length;i++)r=s[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function fFe(t,e){if(t==null)return{};var n={};for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){if(e.indexOf(r)>=0)continue;n[r]=t[r]}return n}function Dj(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function hx(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Dj(Object(n),!0).forEach(function(r){hFe(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Dj(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function hFe(t,e,n){return e=dFe(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function dFe(t){var e=pFe(t,"string");return iy(e)=="symbol"?e:e+""}function pFe(t,e){if(iy(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(iy(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function gFe(t,e){return hx(hx({},e),t)}function mFe(t,e){return t==="symbols"}function Bj(t){var e=t.shapeType,n=t.elementProps;switch(e){case"rectangle":return Me.createElement(tR,n);case"trapezoid":return Me.createElement(lFe,n);case"sector":return Me.createElement(PK,n);case"symbols":if(mFe(e))return Me.createElement(d6,n);break;default:return null}}function vFe(t){return A.isValidElement(t)?t.props:t}function yFe(t){var e=t.option,n=t.shapeType,r=t.propTransformer,i=r===void 0?gFe:r,s=t.activeClassName,o=s===void 0?"recharts-active-shape":s,a=t.isActive,l=uFe(t,cFe),c;if(A.isValidElement(e))c=A.cloneElement(e,hx(hx({},l),vFe(e)));else if(rn(e))c=e(l);else if(Y9e(e)&&!Z9e(e)){var u=i(e,l);c=Me.createElement(Bj,{shapeType:n,elementProps:u})}else{var h=l;c=Me.createElement(Bj,{shapeType:n,elementProps:h})}return a?Me.createElement(ui,{className:o},c):c}function DA(t,e){return e!=null&&"trapezoids"in t.props}function BA(t,e){return e!=null&&"sectors"in t.props}function sy(t,e){return e!=null&&"points"in t.props}function bFe(t,e){var n,r,i=t.x===(e==null||(n=e.labelViewBox)===null||n===void 0?void 0:n.x)||t.x===e.x,s=t.y===(e==null||(r=e.labelViewBox)===null||r===void 0?void 0:r.y)||t.y===e.y;return i&&s}function _Fe(t,e){var n=t.endAngle===e.endAngle,r=t.startAngle===e.startAngle;return n&&r}function wFe(t,e){var n=t.x===e.x,r=t.y===e.y,i=t.z===e.z;return n&&r&&i}function xFe(t,e){var n;return DA(t,e)?n=bFe:BA(t,e)?n=_Fe:sy(t,e)&&(n=wFe),n}function AFe(t,e){var n;return DA(t,e)?n="trapezoids":BA(t,e)?n="sectors":sy(t,e)&&(n="points"),n}function EFe(t,e){if(DA(t,e)){var n;return(n=e.tooltipPayload)===null||n===void 0||(n=n[0])===null||n===void 0||(n=n.payload)===null||n===void 0?void 0:n.payload}if(BA(t,e)){var r;return(r=e.tooltipPayload)===null||r===void 0||(r=r[0])===null||r===void 0||(r=r.payload)===null||r===void 0?void 0:r.payload}return sy(t,e)?e.payload:{}}function SFe(t){var e=t.activeTooltipItem,n=t.graphicalItem,r=t.itemData,i=AFe(n,e),s=EFe(n,e),o=r.filter(function(l,c){var u=G6(s,l),h=n.props[i].filter(function(y){var v=xFe(n,e);return v(y,e)}),d=n.props[i].indexOf(h[h.length-1]),m=c===d;return u&&m}),a=r.indexOf(o[o.length-1]);return a}var h5,Lj;function TFe(){if(Lj)return h5;Lj=1;var t=Math.ceil,e=Math.max;function n(r,i,s,o){for(var a=-1,l=e(t((i-r)/(s||1)),0),c=Array(l);l--;)c[o?l:++a]=r,r+=s;return c}return h5=n,h5}var d5,Fj;function LK(){if(Fj)return d5;Fj=1;var t=hY(),e=1/0,n=17976931348623157e292;function r(i){if(!i)return i===0?i:0;if(i=t(i),i===e||i===-e){var s=i<0?-1:1;return s*n}return i===i?i:0}return d5=r,d5}var p5,Uj;function CFe(){if(Uj)return p5;Uj=1;var t=TFe(),e=EA(),n=LK();function r(i){return function(s,o,a){return a&&typeof a!="number"&&e(s,o,a)&&(o=a=void 0),s=n(s),o===void 0?(o=s,s=0):o=n(o),a=a===void 0?s<o?1:-1:n(a),t(s,o,a,i)}}return p5=r,p5}var g5,zj;function PFe(){if(zj)return g5;zj=1;var t=CFe(),e=t();return g5=e,g5}var IFe=PFe();const dx=fn(IFe);function oy(t){"@babel/helpers - typeof";return oy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},oy(t)}function jj(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Vj(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?jj(Object(n),!0).forEach(function(r){FK(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):jj(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function FK(t,e,n){return e=OFe(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function OFe(t){var e=MFe(t,"string");return oy(e)=="symbol"?e:e+""}function MFe(t,e){if(oy(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(oy(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var RFe=["Webkit","Moz","O","ms"],kFe=function(e,n){var r=e.replace(/(\w)/,function(s){return s.toUpperCase()}),i=RFe.reduce(function(s,o){return Vj(Vj({},s),{},FK({},o+r,n))},{});return i[e]=n,i};function wm(t){"@babel/helpers - typeof";return wm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},wm(t)}function px(){return px=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},px.apply(this,arguments)}function Wj(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function m5(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Wj(Object(n),!0).forEach(function(r){to(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Wj(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function NFe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function $j(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,zK(r.key),r)}}function DFe(t,e,n){return e&&$j(t.prototype,e),n&&$j(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function BFe(t,e,n){return e=gx(e),LFe(t,UK()?Reflect.construct(e,n||[],gx(t).constructor):e.apply(t,n))}function LFe(t,e){if(e&&(wm(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return FFe(t)}function FFe(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function UK(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(UK=function(){return!!t})()}function gx(t){return gx=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},gx(t)}function UFe(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&cO(t,e)}function cO(t,e){return cO=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},cO(t,e)}function to(t,e,n){return e=zK(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function zK(t){var e=zFe(t,"string");return wm(e)=="symbol"?e:e+""}function zFe(t,e){if(wm(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(wm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var jFe=function(e){var n=e.data,r=e.startIndex,i=e.endIndex,s=e.x,o=e.width,a=e.travellerWidth;if(!n||!n.length)return{};var l=n.length,c=fv().domain(dx(0,l)).range([s,s+o-a]),u=c.domain().map(function(h){return c(h)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:c(r),endX:c(i),scale:c,scaleValues:u}},Hj=function(e){return e.changedTouches&&!!e.changedTouches.length},xm=(function(t){function e(n){var r;return NFe(this,e),r=BFe(this,e,[n]),to(r,"handleDrag",function(i){r.leaveTimer&&(clearTimeout(r.leaveTimer),r.leaveTimer=null),r.state.isTravellerMoving?r.handleTravellerMove(i):r.state.isSlideMoving&&r.handleSlideDrag(i)}),to(r,"handleTouchMove",function(i){i.changedTouches!=null&&i.changedTouches.length>0&&r.handleDrag(i.changedTouches[0])}),to(r,"handleDragEnd",function(){r.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var i=r.props,s=i.endIndex,o=i.onDragEnd,a=i.startIndex;o==null||o({endIndex:s,startIndex:a})}),r.detachDragEndListener()}),to(r,"handleLeaveWrapper",function(){(r.state.isTravellerMoving||r.state.isSlideMoving)&&(r.leaveTimer=window.setTimeout(r.handleDragEnd,r.props.leaveTimeOut))}),to(r,"handleEnterSlideOrTraveller",function(){r.setState({isTextActive:!0})}),to(r,"handleLeaveSlideOrTraveller",function(){r.setState({isTextActive:!1})}),to(r,"handleSlideDragStart",function(i){var s=Hj(i)?i.changedTouches[0]:i;r.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:s.pageX}),r.attachDragEndListener()}),r.travellerDragStartHandlers={startX:r.handleTravellerDragStart.bind(r,"startX"),endX:r.handleTravellerDragStart.bind(r,"endX")},r.state={},r}return UFe(e,t),DFe(e,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(r){var i=r.startX,s=r.endX,o=this.state.scaleValues,a=this.props,l=a.gap,c=a.data,u=c.length-1,h=Math.min(i,s),d=Math.max(i,s),m=e.getIndexInRange(o,h),y=e.getIndexInRange(o,d);return{startIndex:m-m%l,endIndex:y===u?u:y-y%l}}},{key:"getTextOfTick",value:function(r){var i=this.props,s=i.data,o=i.tickFormatter,a=i.dataKey,l=Nl(s[r],a,r);return rn(o)?o(l,r):l}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(r){var i=this.state,s=i.slideMoveStartX,o=i.startX,a=i.endX,l=this.props,c=l.x,u=l.width,h=l.travellerWidth,d=l.startIndex,m=l.endIndex,y=l.onChange,v=r.pageX-s;v>0?v=Math.min(v,c+u-h-a,c+u-h-o):v<0&&(v=Math.max(v,c-o,c-a));var b=this.getIndex({startX:o+v,endX:a+v});(b.startIndex!==d||b.endIndex!==m)&&y&&y(b),this.setState({startX:o+v,endX:a+v,slideMoveStartX:r.pageX})}},{key:"handleTravellerDragStart",value:function(r,i){var s=Hj(i)?i.changedTouches[0]:i;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:r,brushMoveStartX:s.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(r){var i=this.state,s=i.brushMoveStartX,o=i.movingTravellerId,a=i.endX,l=i.startX,c=this.state[o],u=this.props,h=u.x,d=u.width,m=u.travellerWidth,y=u.onChange,v=u.gap,b=u.data,x={startX:this.state.startX,endX:this.state.endX},T=r.pageX-s;T>0?T=Math.min(T,h+d-m-c):T<0&&(T=Math.max(T,h-c)),x[o]=c+T;var E=this.getIndex(x),C=E.startIndex,I=E.endIndex,O=function(){var U=b.length-1;return o==="startX"&&(a>l?C%v===0:I%v===0)||a<l&&I===U||o==="endX"&&(a>l?I%v===0:C%v===0)||a>l&&I===U};this.setState(to(to({},o,c+T),"brushMoveStartX",r.pageX),function(){y&&O()&&y(E)})}},{key:"handleTravellerMoveKeyboard",value:function(r,i){var s=this,o=this.state,a=o.scaleValues,l=o.startX,c=o.endX,u=this.state[i],h=a.indexOf(u);if(h!==-1){var d=h+r;if(!(d===-1||d>=a.length)){var m=a[d];i==="startX"&&m>=c||i==="endX"&&m<=l||this.setState(to({},i,m),function(){s.props.onChange(s.getIndex({startX:s.state.startX,endX:s.state.endX}))})}}}},{key:"renderBackground",value:function(){var r=this.props,i=r.x,s=r.y,o=r.width,a=r.height,l=r.fill,c=r.stroke;return Me.createElement("rect",{stroke:c,fill:l,x:i,y:s,width:o,height:a})}},{key:"renderPanorama",value:function(){var r=this.props,i=r.x,s=r.y,o=r.width,a=r.height,l=r.data,c=r.children,u=r.padding,h=A.Children.only(c);return h?Me.cloneElement(h,{x:i,y:s,width:o,height:a,margin:u,compact:!0,data:l}):null}},{key:"renderTravellerLayer",value:function(r,i){var s,o,a=this,l=this.props,c=l.y,u=l.travellerWidth,h=l.height,d=l.traveller,m=l.ariaLabel,y=l.data,v=l.startIndex,b=l.endIndex,x=Math.max(r,this.props.x),T=m5(m5({},bn(this.props,!1)),{},{x,y:c,width:u,height:h}),E=m||"Min value: ".concat((s=y[v])===null||s===void 0?void 0:s.name,", Max value: ").concat((o=y[b])===null||o===void 0?void 0:o.name);return Me.createElement(ui,{tabIndex:0,role:"slider","aria-label":E,"aria-valuenow":r,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[i],onTouchStart:this.travellerDragStartHandlers[i],onKeyDown:function(I){["ArrowLeft","ArrowRight"].includes(I.key)&&(I.preventDefault(),I.stopPropagation(),a.handleTravellerMoveKeyboard(I.key==="ArrowRight"?1:-1,i))},onFocus:function(){a.setState({isTravellerFocused:!0})},onBlur:function(){a.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},e.renderTraveller(d,T))}},{key:"renderSlide",value:function(r,i){var s=this.props,o=s.y,a=s.height,l=s.stroke,c=s.travellerWidth,u=Math.min(r,i)+c,h=Math.max(Math.abs(i-r)-c,0);return Me.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:l,fillOpacity:.2,x:u,y:o,width:h,height:a})}},{key:"renderText",value:function(){var r=this.props,i=r.startIndex,s=r.endIndex,o=r.y,a=r.height,l=r.travellerWidth,c=r.stroke,u=this.state,h=u.startX,d=u.endX,m=5,y={pointerEvents:"none",fill:c};return Me.createElement(ui,{className:"recharts-brush-texts"},Me.createElement($w,px({textAnchor:"end",verticalAnchor:"middle",x:Math.min(h,d)-m,y:o+a/2},y),this.getTextOfTick(i)),Me.createElement($w,px({textAnchor:"start",verticalAnchor:"middle",x:Math.max(h,d)+l+m,y:o+a/2},y),this.getTextOfTick(s)))}},{key:"render",value:function(){var r=this.props,i=r.data,s=r.className,o=r.children,a=r.x,l=r.y,c=r.width,u=r.height,h=r.alwaysShowText,d=this.state,m=d.startX,y=d.endX,v=d.isTextActive,b=d.isSlideMoving,x=d.isTravellerMoving,T=d.isTravellerFocused;if(!i||!i.length||!dt(a)||!dt(l)||!dt(c)||!dt(u)||c<=0||u<=0)return null;var E=un("recharts-brush",s),C=Me.Children.count(o)===1,I=kFe("userSelect","none");return Me.createElement(ui,{className:E,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:I},this.renderBackground(),C&&this.renderPanorama(),this.renderSlide(m,y),this.renderTravellerLayer(m,"startX"),this.renderTravellerLayer(y,"endX"),(v||b||x||T||h)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(r){var i=r.x,s=r.y,o=r.width,a=r.height,l=r.stroke,c=Math.floor(s+a/2)-1;return Me.createElement(Me.Fragment,null,Me.createElement("rect",{x:i,y:s,width:o,height:a,fill:l,stroke:"none"}),Me.createElement("line",{x1:i+1,y1:c,x2:i+o-1,y2:c,fill:"none",stroke:"#fff"}),Me.createElement("line",{x1:i+1,y1:c+2,x2:i+o-1,y2:c+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(r,i){var s;return Me.isValidElement(r)?s=Me.cloneElement(r,i):rn(r)?s=r(i):s=e.renderDefaultTraveller(i),s}},{key:"getDerivedStateFromProps",value:function(r,i){var s=r.data,o=r.width,a=r.x,l=r.travellerWidth,c=r.updateId,u=r.startIndex,h=r.endIndex;if(s!==i.prevData||c!==i.prevUpdateId)return m5({prevData:s,prevTravellerWidth:l,prevUpdateId:c,prevX:a,prevWidth:o},s&&s.length?jFe({data:s,width:o,x:a,travellerWidth:l,startIndex:u,endIndex:h}):{scale:null,scaleValues:null});if(i.scale&&(o!==i.prevWidth||a!==i.prevX||l!==i.prevTravellerWidth)){i.scale.range([a,a+o-l]);var d=i.scale.domain().map(function(m){return i.scale(m)});return{prevData:s,prevTravellerWidth:l,prevUpdateId:c,prevX:a,prevWidth:o,startX:i.scale(r.startIndex),endX:i.scale(r.endIndex),scaleValues:d}}return null}},{key:"getIndexInRange",value:function(r,i){for(var s=r.length,o=0,a=s-1;a-o>1;){var l=Math.floor((o+a)/2);r[l]>i?a=l:o=l}return i>=r[a]?a:o}}])})(A.PureComponent);to(xm,"displayName","Brush");to(xm,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var v5,qj;function VFe(){if(qj)return v5;qj=1;var t=_6();function e(n,r){var i;return t(n,function(s,o,a){return i=r(s,o,a),!i}),!!i}return v5=e,v5}var y5,Qj;function WFe(){if(Qj)return y5;Qj=1;var t=WX(),e=pf(),n=VFe(),r=Ds(),i=EA();function s(o,a,l){var c=r(o)?t:n;return l&&i(o,a,l)&&(a=void 0),c(o,e(a,3))}return y5=s,y5}var $Fe=WFe();const HFe=fn($Fe);var Il=function(e,n){var r=e.alwaysShow,i=e.ifOverflow;return r&&(i="extendDomain"),i===n},b5,Xj;function qFe(){if(Xj)return b5;Xj=1;var t=aY();function e(n,r,i){r=="__proto__"&&t?t(n,r,{configurable:!0,enumerable:!0,value:i,writable:!0}):n[r]=i}return b5=e,b5}var _5,Yj;function QFe(){if(Yj)return _5;Yj=1;var t=qFe(),e=sY(),n=pf();function r(i,s){var o={};return s=n(s,3),e(i,function(a,l,c){t(o,l,s(a,l,c))}),o}return _5=r,_5}var XFe=QFe();const YFe=fn(XFe);var w5,Kj;function KFe(){if(Kj)return w5;Kj=1;function t(e,n){for(var r=-1,i=e==null?0:e.length;++r<i;)if(!n(e[r],r,e))return!1;return!0}return w5=t,w5}var x5,Gj;function GFe(){if(Gj)return x5;Gj=1;var t=_6();function e(n,r){var i=!0;return t(n,function(s,o,a){return i=!!r(s,o,a),i}),i}return x5=e,x5}var A5,Zj;function ZFe(){if(Zj)return A5;Zj=1;var t=KFe(),e=GFe(),n=pf(),r=Ds(),i=EA();function s(o,a,l){var c=r(o)?t:e;return l&&i(o,a,l)&&(a=void 0),c(o,n(a,3))}return A5=s,A5}var JFe=ZFe();const jK=fn(JFe);var e7e=["x","y"];function ay(t){"@babel/helpers - typeof";return ay=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ay(t)}function uO(){return uO=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},uO.apply(this,arguments)}function Jj(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function O1(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Jj(Object(n),!0).forEach(function(r){t7e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Jj(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function t7e(t,e,n){return e=n7e(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function n7e(t){var e=r7e(t,"string");return ay(e)=="symbol"?e:e+""}function r7e(t,e){if(ay(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(ay(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function i7e(t,e){if(t==null)return{};var n=s7e(t,e),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(i=0;i<s.length;i++)r=s[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function s7e(t,e){if(t==null)return{};var n={};for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){if(e.indexOf(r)>=0)continue;n[r]=t[r]}return n}function o7e(t,e){var n=t.x,r=t.y,i=i7e(t,e7e),s="".concat(n),o=parseInt(s,10),a="".concat(r),l=parseInt(a,10),c="".concat(e.height||i.height),u=parseInt(c,10),h="".concat(e.width||i.width),d=parseInt(h,10);return O1(O1(O1(O1(O1({},e),i),o?{x:o}:{}),l?{y:l}:{}),{},{height:u,width:d,name:e.name,radius:e.radius})}function eV(t){return Me.createElement(yFe,uO({shapeType:"rectangle",propTransformer:o7e,activeClassName:"recharts-active-bar"},t))}var a7e=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(r,i){if(typeof e=="number")return e;var s=dt(r)||rIe(r);return s?e(r,i):(s||ld(),n)}},l7e=["value","background"],VK;function Am(t){"@babel/helpers - typeof";return Am=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Am(t)}function c7e(t,e){if(t==null)return{};var n=u7e(t,e),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(i=0;i<s.length;i++)r=s[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function u7e(t,e){if(t==null)return{};var n={};for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){if(e.indexOf(r)>=0)continue;n[r]=t[r]}return n}function mx(){return mx=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},mx.apply(this,arguments)}function tV(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Mr(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?tV(Object(n),!0).forEach(function(r){ef(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):tV(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function f7e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function nV(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,$K(r.key),r)}}function h7e(t,e,n){return e&&nV(t.prototype,e),n&&nV(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function d7e(t,e,n){return e=vx(e),p7e(t,WK()?Reflect.construct(e,n||[],vx(t).constructor):e.apply(t,n))}function p7e(t,e){if(e&&(Am(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return g7e(t)}function g7e(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function WK(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(WK=function(){return!!t})()}function vx(t){return vx=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},vx(t)}function m7e(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&fO(t,e)}function fO(t,e){return fO=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},fO(t,e)}function ef(t,e,n){return e=$K(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function $K(t){var e=v7e(t,"string");return Am(e)=="symbol"?e:e+""}function v7e(t,e){if(Am(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(Am(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var yf=(function(t){function e(){var n;f7e(this,e);for(var r=arguments.length,i=new Array(r),s=0;s<r;s++)i[s]=arguments[s];return n=d7e(this,e,[].concat(i)),ef(n,"state",{isAnimationFinished:!1}),ef(n,"id",vA("recharts-bar-")),ef(n,"handleAnimationEnd",function(){var o=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),o&&o()}),ef(n,"handleAnimationStart",function(){var o=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),o&&o()}),n}return m7e(e,t),h7e(e,[{key:"renderRectanglesStatically",value:function(r){var i=this,s=this.props,o=s.shape,a=s.dataKey,l=s.activeIndex,c=s.activeBar,u=bn(this.props,!1);return r&&r.map(function(h,d){var m=d===l,y=m?c:o,v=Mr(Mr(Mr({},u),h),{},{isActive:m,option:y,index:d,dataKey:a,onAnimationStart:i.handleAnimationStart,onAnimationEnd:i.handleAnimationEnd});return Me.createElement(ui,mx({className:"recharts-bar-rectangle"},kw(i.props,h,d),{key:"rectangle-".concat(h==null?void 0:h.x,"-").concat(h==null?void 0:h.y,"-").concat(h==null?void 0:h.value,"-").concat(d)}),Me.createElement(eV,v))})}},{key:"renderRectanglesWithAnimation",value:function(){var r=this,i=this.props,s=i.data,o=i.layout,a=i.isAnimationActive,l=i.animationBegin,c=i.animationDuration,u=i.animationEasing,h=i.animationId,d=this.state.prevData;return Me.createElement(cf,{begin:l,duration:c,isActive:a,easing:u,from:{t:0},to:{t:1},key:"bar-".concat(h),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(m){var y=m.t,v=s.map(function(b,x){var T=d&&d[x];if(T){var E=ag(T.x,b.x),C=ag(T.y,b.y),I=ag(T.width,b.width),O=ag(T.height,b.height);return Mr(Mr({},b),{},{x:E(y),y:C(y),width:I(y),height:O(y)})}if(o==="horizontal"){var N=ag(0,b.height),U=N(y);return Mr(Mr({},b),{},{y:b.y+b.height-U,height:U})}var F=ag(0,b.width),H=F(y);return Mr(Mr({},b),{},{width:H})});return Me.createElement(ui,null,r.renderRectanglesStatically(v))})}},{key:"renderRectangles",value:function(){var r=this.props,i=r.data,s=r.isAnimationActive,o=this.state.prevData;return s&&i&&i.length&&(!o||!G6(o,i))?this.renderRectanglesWithAnimation():this.renderRectanglesStatically(i)}},{key:"renderBackground",value:function(){var r=this,i=this.props,s=i.data,o=i.dataKey,a=i.activeIndex,l=bn(this.props.background,!1);return s.map(function(c,u){c.value;var h=c.background,d=c7e(c,l7e);if(!h)return null;var m=Mr(Mr(Mr(Mr(Mr({},d),{},{fill:"#eee"},h),l),kw(r.props,c,u)),{},{onAnimationStart:r.handleAnimationStart,onAnimationEnd:r.handleAnimationEnd,dataKey:o,index:u,className:"recharts-bar-background-rectangle"});return Me.createElement(eV,mx({key:"background-bar-".concat(u),option:r.props.background,isActive:u===a},m))})}},{key:"renderErrorBar",value:function(r,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var s=this.props,o=s.data,a=s.xAxis,l=s.yAxis,c=s.layout,u=s.children,h=Pa(u,NA);if(!h)return null;var d=c==="vertical"?o[0].height/2:o[0].width/2,m=function(b,x){var T=Array.isArray(b.value)?b.value[1]:b.value;return{x:b.x,y:b.y,value:T,errorVal:Nl(b,x)}},y={clipPath:r?"url(#clipPath-".concat(i,")"):null};return Me.createElement(ui,y,h.map(function(v){return Me.cloneElement(v,{key:"error-bar-".concat(i,"-").concat(v.props.dataKey),data:o,xAxis:a,yAxis:l,layout:c,offset:d,dataPointFormatter:m})}))}},{key:"render",value:function(){var r=this.props,i=r.hide,s=r.data,o=r.className,a=r.xAxis,l=r.yAxis,c=r.left,u=r.top,h=r.width,d=r.height,m=r.isAnimationActive,y=r.background,v=r.id;if(i||!s||!s.length)return null;var b=this.state.isAnimationFinished,x=un("recharts-bar",o),T=a&&a.allowDataOverflow,E=l&&l.allowDataOverflow,C=T||E,I=_n(v)?this.id:v;return Me.createElement(ui,{className:x},T||E?Me.createElement("defs",null,Me.createElement("clipPath",{id:"clipPath-".concat(I)},Me.createElement("rect",{x:T?c:c-h/2,y:E?u:u-d/2,width:T?h:h*2,height:E?d:d*2}))):null,Me.createElement(ui,{className:"recharts-bar-rectangles",clipPath:C?"url(#clipPath-".concat(I,")"):null},y?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(C,I),(!m||b)&&Qh.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curData:r.data,prevData:i.curData}:r.data!==i.curData?{curData:r.data}:null}}])})(A.PureComponent);VK=yf;ef(yf,"displayName","Bar");ef(yf,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!ky.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"});ef(yf,"getComposedData",function(t){var e=t.props,n=t.item,r=t.barPosition,i=t.bandSize,s=t.xAxis,o=t.yAxis,a=t.xAxisTicks,l=t.yAxisTicks,c=t.stackedData,u=t.dataStartIndex,h=t.displayedData,d=t.offset,m=BDe(r,n);if(!m)return null;var y=e.layout,v=n.type.defaultProps,b=v!==void 0?Mr(Mr({},v),n.props):n.props,x=b.dataKey,T=b.children,E=b.minPointSize,C=y==="horizontal"?o:s,I=c?C.scale.domain():null,O=$De({numericAxis:C}),N=Pa(T,gY),U=h.map(function(F,H){var W,z,V,M,K,j;c?W=LDe(c[u+H],I):(W=Nl(F,x),Array.isArray(W)||(W=[O,W]));var q=a7e(E,VK.defaultProps.minPointSize)(W[1],H);if(y==="horizontal"){var Y,X=[o.scale(W[0]),o.scale(W[1])],te=X[0],D=X[1];z=Fz({axis:s,ticks:a,bandSize:i,offset:m.offset,entry:F,index:H}),V=(Y=D??te)!==null&&Y!==void 0?Y:void 0,M=m.size;var $=te-D;if(K=Number.isNaN($)?0:$,j={x:z,y:o.y,width:M,height:o.height},Math.abs(q)>0&&Math.abs(K)<Math.abs(q)){var he=Ta(K||q)*(Math.abs(q)-Math.abs(K));V-=he,K+=he}}else{var Se=[s.scale(W[0]),s.scale(W[1])],fe=Se[0],$e=Se[1];if(z=fe,V=Fz({axis:o,ticks:l,bandSize:i,offset:m.offset,entry:F,index:H}),M=$e-fe,K=m.size,j={x:s.x,y:V,width:s.width,height:K},Math.abs(q)>0&&Math.abs(M)<Math.abs(q)){var Ze=Ta(M||q)*(Math.abs(q)-Math.abs(M));M+=Ze}}return Mr(Mr(Mr({},F),{},{x:z,y:V,width:M,height:K,value:c?W:W[1],payload:F,background:j},N&&N[H]&&N[H].props),{},{tooltipPayload:[SK(n,F)],tooltipPosition:{x:z+M/2,y:V+K/2}})});return Mr({data:U,layout:y},d)});function ly(t){"@babel/helpers - typeof";return ly=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ly(t)}function y7e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function rV(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,HK(r.key),r)}}function b7e(t,e,n){return e&&rV(t.prototype,e),n&&rV(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function iV(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function xa(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?iV(Object(n),!0).forEach(function(r){LA(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):iV(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function LA(t,e,n){return e=HK(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function HK(t){var e=_7e(t,"string");return ly(e)=="symbol"?e:e+""}function _7e(t,e){if(ly(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(ly(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var w7e=function(e,n,r,i,s){var o=e.width,a=e.height,l=e.layout,c=e.children,u=Object.keys(n),h={left:r.left,leftMirror:r.left,right:o-r.right,rightMirror:o-r.right,top:r.top,topMirror:r.top,bottom:a-r.bottom,bottomMirror:a-r.bottom},d=!!no(c,yf);return u.reduce(function(m,y){var v=n[y],b=v.orientation,x=v.domain,T=v.padding,E=T===void 0?{}:T,C=v.mirror,I=v.reversed,O="".concat(b).concat(C?"Mirror":""),N,U,F,H,W;if(v.type==="number"&&(v.padding==="gap"||v.padding==="no-gap")){var z=x[1]-x[0],V=1/0,M=v.categoricalDomain.sort(oIe);if(M.forEach(function(Se,fe){fe>0&&(V=Math.min((Se||0)-(M[fe-1]||0),V))}),Number.isFinite(V)){var K=V/z,j=v.layout==="vertical"?r.height:r.width;if(v.padding==="gap"&&(N=K*j/2),v.padding==="no-gap"){var q=id(e.barCategoryGap,K*j),Y=K*j/2;N=Y-q-(Y-q)/j*q}}}i==="xAxis"?U=[r.left+(E.left||0)+(N||0),r.left+r.width-(E.right||0)-(N||0)]:i==="yAxis"?U=l==="horizontal"?[r.top+r.height-(E.bottom||0),r.top+(E.top||0)]:[r.top+(E.top||0)+(N||0),r.top+r.height-(E.bottom||0)-(N||0)]:U=v.range,I&&(U=[U[1],U[0]]);var X=NDe(v,s,d),te=X.scale,D=X.realScaleType;te.domain(x).range(U),DDe(te);var $=WDe(te,xa(xa({},v),{},{realScaleType:D}));i==="xAxis"?(W=b==="top"&&!C||b==="bottom"&&C,F=r.left,H=h[O]-W*v.height):i==="yAxis"&&(W=b==="left"&&!C||b==="right"&&C,F=h[O]-W*v.width,H=r.top);var he=xa(xa(xa({},v),$),{},{realScaleType:D,x:F,y:H,scale:te,width:i==="xAxis"?r.width:v.width,height:i==="yAxis"?r.height:v.height});return he.bandSize=ix(he,$),!v.hide&&i==="xAxis"?h[O]+=(W?-1:1)*he.height:v.hide||(h[O]+=(W?-1:1)*he.width),xa(xa({},m),{},LA({},y,he))},{})},qK=function(e,n){var r=e.x,i=e.y,s=n.x,o=n.y;return{x:Math.min(r,s),y:Math.min(i,o),width:Math.abs(s-r),height:Math.abs(o-i)}},x7e=function(e){var n=e.x1,r=e.y1,i=e.x2,s=e.y2;return qK({x:n,y:r},{x:i,y:s})},QK=(function(){function t(e){y7e(this,t),this.scale=e}return b7e(t,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.bandAware,s=r.position;if(n!==void 0){if(s)switch(s){case"start":return this.scale(n);case"middle":{var o=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+o}case"end":{var a=this.bandwidth?this.bandwidth():0;return this.scale(n)+a}default:return this.scale(n)}if(i){var l=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+l}return this.scale(n)}}},{key:"isInRange",value:function(n){var r=this.range(),i=r[0],s=r[r.length-1];return i<=s?n>=i&&n<=s:n>=s&&n<=i}}],[{key:"create",value:function(n){return new t(n)}}])})();LA(QK,"EPS",1e-4);var nR=function(e){var n=Object.keys(e).reduce(function(r,i){return xa(xa({},r),{},LA({},i,QK.create(e[i])))},{});return xa(xa({},n),{},{apply:function(i){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=s.bandAware,a=s.position;return YFe(i,function(l,c){return n[c].apply(l,{bandAware:o,position:a})})},isInRange:function(i){return jK(i,function(s,o){return n[o].isInRange(s)})}})};function A7e(t){return(t%180+180)%180}var E7e=function(e){var n=e.width,r=e.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,s=A7e(i),o=s*Math.PI/180,a=Math.atan(r/n),l=o>a&&o<Math.PI-a?r/Math.sin(o):n/Math.cos(o);return Math.abs(l)},E5,sV;function S7e(){if(sV)return E5;sV=1;var t=pf(),e=Ry(),n=xA();function r(i){return function(s,o,a){var l=Object(s);if(!e(s)){var c=t(o,3);s=n(s),o=function(h){return c(l[h],h,l)}}var u=i(s,o,a);return u>-1?l[c?s[u]:u]:void 0}}return E5=r,E5}var S5,oV;function T7e(){if(oV)return S5;oV=1;var t=LK();function e(n){var r=t(n),i=r%1;return r===r?i?r-i:r:0}return S5=e,S5}var T5,aV;function C7e(){if(aV)return T5;aV=1;var t=eY(),e=pf(),n=T7e(),r=Math.max;function i(s,o,a){var l=s==null?0:s.length;if(!l)return-1;var c=a==null?0:n(a);return c<0&&(c=r(l+c,0)),t(s,e(o,3),c)}return T5=i,T5}var C5,lV;function P7e(){if(lV)return C5;lV=1;var t=S7e(),e=C7e(),n=t(e);return C5=n,C5}var I7e=P7e();const O7e=fn(I7e);var M7e=mX();const R7e=fn(M7e);var k7e=R7e(function(t){return{x:t.left,y:t.top,width:t.width,height:t.height}},function(t){return["l",t.left,"t",t.top,"w",t.width,"h",t.height].join("")}),rR=A.createContext(void 0),iR=A.createContext(void 0),XK=A.createContext(void 0),YK=A.createContext({}),KK=A.createContext(void 0),GK=A.createContext(0),ZK=A.createContext(0),cV=function(e){var n=e.state,r=n.xAxisMap,i=n.yAxisMap,s=n.offset,o=e.clipPathId,a=e.children,l=e.width,c=e.height,u=k7e(s);return Me.createElement(rR.Provider,{value:r},Me.createElement(iR.Provider,{value:i},Me.createElement(YK.Provider,{value:s},Me.createElement(XK.Provider,{value:u},Me.createElement(KK.Provider,{value:o},Me.createElement(GK.Provider,{value:c},Me.createElement(ZK.Provider,{value:l},a)))))))},N7e=function(){return A.useContext(KK)},JK=function(e){var n=A.useContext(rR);n==null&&ld();var r=n[e];return r==null&&ld(),r},D7e=function(){var e=A.useContext(rR);return Vu(e)},B7e=function(){var e=A.useContext(iR),n=O7e(e,function(r){return jK(r.domain,Number.isFinite)});return n||Vu(e)},eG=function(e){var n=A.useContext(iR);n==null&&ld();var r=n[e];return r==null&&ld(),r},L7e=function(){var e=A.useContext(XK);return e},F7e=function(){return A.useContext(YK)},sR=function(){return A.useContext(ZK)},oR=function(){return A.useContext(GK)};function Em(t){"@babel/helpers - typeof";return Em=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Em(t)}function U7e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function z7e(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,nG(r.key),r)}}function j7e(t,e,n){return e&&z7e(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function V7e(t,e,n){return e=yx(e),W7e(t,tG()?Reflect.construct(e,n||[],yx(t).constructor):e.apply(t,n))}function W7e(t,e){if(e&&(Em(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return $7e(t)}function $7e(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function tG(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(tG=function(){return!!t})()}function yx(t){return yx=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},yx(t)}function H7e(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&hO(t,e)}function hO(t,e){return hO=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},hO(t,e)}function uV(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function fV(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?uV(Object(n),!0).forEach(function(r){aR(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):uV(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function aR(t,e,n){return e=nG(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function nG(t){var e=q7e(t,"string");return Em(e)=="symbol"?e:e+""}function q7e(t,e){if(Em(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(Em(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function Q7e(t,e){return G7e(t)||K7e(t,e)||Y7e(t,e)||X7e()}function X7e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
3569In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Y7e(t,e){if(t){if(typeof t=="string")return hV(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return hV(t,e)}}function hV(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function K7e(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,s,o,a=[],l=!0,c=!1;try{if(s=(n=n.call(t)).next,e!==0)for(;!(l=(r=s.call(n)).done)&&(a.push(r.value),a.length!==e);l=!0);}catch(u){c=!0,i=u}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return a}}function G7e(t){if(Array.isArray(t))return t}function dO(){return dO=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},dO.apply(this,arguments)}var Z7e=function(e,n){var r;return Me.isValidElement(e)?r=Me.cloneElement(e,n):rn(e)?r=e(n):r=Me.createElement("line",dO({},n,{className:"recharts-reference-line-line"})),r},J7e=function(e,n,r,i,s,o,a,l,c){var u=s.x,h=s.y,d=s.width,m=s.height;if(r){var y=c.y,v=e.y.apply(y,{position:o});if(Il(c,"discard")&&!e.y.isInRange(v))return null;var b=[{x:u+d,y:v},{x:u,y:v}];return l==="left"?b.reverse():b}if(n){var x=c.x,T=e.x.apply(x,{position:o});if(Il(c,"discard")&&!e.x.isInRange(T))return null;var E=[{x:T,y:h+m},{x:T,y:h}];return a==="top"?E.reverse():E}if(i){var C=c.segment,I=C.map(function(O){return e.apply(O,{position:o})});return Il(c,"discard")&&HFe(I,function(O){return!e.isInRange(O)})?null:I}return null};function eUe(t){var e=t.x,n=t.y,r=t.segment,i=t.xAxisId,s=t.yAxisId,o=t.shape,a=t.className,l=t.alwaysShow,c=N7e(),u=JK(i),h=eG(s),d=L7e();if(!c||!d)return null;kc(l===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var m=nR({x:u.scale,y:h.scale}),y=Xr(e),v=Xr(n),b=r&&r.length===2,x=J7e(m,y,v,b,d,t.position,u.orientation,h.orientation,t);if(!x)return null;var T=Q7e(x,2),E=T[0],C=E.x,I=E.y,O=T[1],N=O.x,U=O.y,F=Il(t,"hidden")?"url(#".concat(c,")"):void 0,H=fV(fV({clipPath:F},bn(t,!0)),{},{x1:C,y1:I,x2:N,y2:U});return Me.createElement(ui,{className:un("recharts-reference-line",a)},Z7e(o,H),Qi.renderCallByParent(t,x7e({x1:C,y1:I,x2:N,y2:U})))}var lR=(function(t){function e(){return U7e(this,e),V7e(this,e,arguments)}return H7e(e,t),j7e(e,[{key:"render",value:function(){return Me.createElement(eUe,this.props)}}])})(Me.Component);aR(lR,"displayName","ReferenceLine");aR(lR,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function pO(){return pO=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},pO.apply(this,arguments)}function Sm(t){"@babel/helpers - typeof";return Sm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Sm(t)}function dV(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function pV(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?dV(Object(n),!0).forEach(function(r){FA(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):dV(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function tUe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function nUe(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,iG(r.key),r)}}function rUe(t,e,n){return e&&nUe(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function iUe(t,e,n){return e=bx(e),sUe(t,rG()?Reflect.construct(e,n||[],bx(t).constructor):e.apply(t,n))}function sUe(t,e){if(e&&(Sm(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return oUe(t)}function oUe(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function rG(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(rG=function(){return!!t})()}function bx(t){return bx=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},bx(t)}function aUe(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&gO(t,e)}function gO(t,e){return gO=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},gO(t,e)}function FA(t,e,n){return e=iG(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function iG(t){var e=lUe(t,"string");return Sm(e)=="symbol"?e:e+""}function lUe(t,e){if(Sm(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(Sm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var cUe=function(e){var n=e.x,r=e.y,i=e.xAxis,s=e.yAxis,o=nR({x:i.scale,y:s.scale}),a=o.apply({x:n,y:r},{bandAware:!0});return Il(e,"discard")&&!o.isInRange(a)?null:a},UA=(function(t){function e(){return tUe(this,e),iUe(this,e,arguments)}return aUe(e,t),rUe(e,[{key:"render",value:function(){var r=this.props,i=r.x,s=r.y,o=r.r,a=r.alwaysShow,l=r.clipPathId,c=Xr(i),u=Xr(s);if(kc(a===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!c||!u)return null;var h=cUe(this.props);if(!h)return null;var d=h.x,m=h.y,y=this.props,v=y.shape,b=y.className,x=Il(this.props,"hidden")?"url(#".concat(l,")"):void 0,T=pV(pV({clipPath:x},bn(this.props,!0)),{},{cx:d,cy:m});return Me.createElement(ui,{className:un("recharts-reference-dot",b)},e.renderDot(v,T),Qi.renderCallByParent(this.props,{x:d-o,y:m-o,width:2*o,height:2*o}))}}])})(Me.Component);FA(UA,"displayName","ReferenceDot");FA(UA,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1});FA(UA,"renderDot",function(t,e){var n;return Me.isValidElement(t)?n=Me.cloneElement(t,e):rn(t)?n=t(e):n=Me.createElement(BK,pO({},e,{cx:e.cx,cy:e.cy,className:"recharts-reference-dot-dot"})),n});function mO(){return mO=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},mO.apply(this,arguments)}function Tm(t){"@babel/helpers - typeof";return Tm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Tm(t)}function gV(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function mV(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?gV(Object(n),!0).forEach(function(r){zA(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):gV(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function uUe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function fUe(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,oG(r.key),r)}}function hUe(t,e,n){return e&&fUe(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function dUe(t,e,n){return e=_x(e),pUe(t,sG()?Reflect.construct(e,n||[],_x(t).constructor):e.apply(t,n))}function pUe(t,e){if(e&&(Tm(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return gUe(t)}function gUe(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function sG(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(sG=function(){return!!t})()}function _x(t){return _x=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},_x(t)}function mUe(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&vO(t,e)}function vO(t,e){return vO=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},vO(t,e)}function zA(t,e,n){return e=oG(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function oG(t){var e=vUe(t,"string");return Tm(e)=="symbol"?e:e+""}function vUe(t,e){if(Tm(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(Tm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var yUe=function(e,n,r,i,s){var o=s.x1,a=s.x2,l=s.y1,c=s.y2,u=s.xAxis,h=s.yAxis;if(!u||!h)return null;var d=nR({x:u.scale,y:h.scale}),m={x:e?d.x.apply(o,{position:"start"}):d.x.rangeMin,y:r?d.y.apply(l,{position:"start"}):d.y.rangeMin},y={x:n?d.x.apply(a,{position:"end"}):d.x.rangeMax,y:i?d.y.apply(c,{position:"end"}):d.y.rangeMax};return Il(s,"discard")&&(!d.isInRange(m)||!d.isInRange(y))?null:qK(m,y)},jA=(function(t){function e(){return uUe(this,e),dUe(this,e,arguments)}return mUe(e,t),hUe(e,[{key:"render",value:function(){var r=this.props,i=r.x1,s=r.x2,o=r.y1,a=r.y2,l=r.className,c=r.alwaysShow,u=r.clipPathId;kc(c===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var h=Xr(i),d=Xr(s),m=Xr(o),y=Xr(a),v=this.props.shape;if(!h&&!d&&!m&&!y&&!v)return null;var b=yUe(h,d,m,y,this.props);if(!b&&!v)return null;var x=Il(this.props,"hidden")?"url(#".concat(u,")"):void 0;return Me.createElement(ui,{className:un("recharts-reference-area",l)},e.renderRect(v,mV(mV({clipPath:x},bn(this.props,!0)),b)),Qi.renderCallByParent(this.props,b))}}])})(Me.Component);zA(jA,"displayName","ReferenceArea");zA(jA,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1});zA(jA,"renderRect",function(t,e){var n;return Me.isValidElement(t)?n=Me.cloneElement(t,e):rn(t)?n=t(e):n=Me.createElement(tR,mO({},e,{className:"recharts-reference-area-rect"})),n});function aG(t,e,n){if(e<1)return[];if(e===1&&n===void 0)return t;for(var r=[],i=0;i<t.length;i+=e)r.push(t[i]);return r}function bUe(t,e,n){var r={width:t.width+e.width,height:t.height+e.height};return E7e(r,n)}function _Ue(t,e,n){var r=n==="width",i=t.x,s=t.y,o=t.width,a=t.height;return e===1?{start:r?i:s,end:r?i+o:s+a}:{start:r?i+o:s+a,end:r?i:s}}function wx(t,e,n,r,i){if(t*e<t*r||t*e>t*i)return!1;var s=n();return t*(e-t*s/2-r)>=0&&t*(e+t*s/2-i)<=0}function wUe(t,e){return aG(t,e+1)}function xUe(t,e,n,r,i){for(var s=(r||[]).slice(),o=e.start,a=e.end,l=0,c=1,u=o,h=function(){var y=r==null?void 0:r[l];if(y===void 0)return{v:aG(r,c)};var v=l,b,x=function(){return b===void 0&&(b=n(y,v)),b},T=y.coordinate,E=l===0||wx(t,T,x,u,a);E||(l=0,u=o,c+=1),E&&(u=T+t*(x()/2+i),l+=c)},d;c<=s.length;)if(d=h(),d)return d.v;return[]}function cy(t){"@babel/helpers - typeof";return cy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},cy(t)}function vV(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Wi(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?vV(Object(n),!0).forEach(function(r){AUe(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):vV(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function AUe(t,e,n){return e=EUe(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function EUe(t){var e=SUe(t,"string");return cy(e)=="symbol"?e:e+""}function SUe(t,e){if(cy(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(cy(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function TUe(t,e,n,r,i){for(var s=(r||[]).slice(),o=s.length,a=e.start,l=e.end,c=function(d){var m=s[d],y,v=function(){return y===void 0&&(y=n(m,d)),y};if(d===o-1){var b=t*(m.coordinate+t*v()/2-l);s[d]=m=Wi(Wi({},m),{},{tickCoord:b>0?m.coordinate-b*t:m.coordinate})}else s[d]=m=Wi(Wi({},m),{},{tickCoord:m.coordinate});var x=wx(t,m.tickCoord,v,a,l);x&&(l=m.tickCoord-t*(v()/2+i),s[d]=Wi(Wi({},m),{},{isShow:!0}))},u=o-1;u>=0;u--)c(u);return s}function CUe(t,e,n,r,i,s){var o=(r||[]).slice(),a=o.length,l=e.start,c=e.end;if(s){var u=r[a-1],h=n(u,a-1),d=t*(u.coordinate+t*h/2-c);o[a-1]=u=Wi(Wi({},u),{},{tickCoord:d>0?u.coordinate-d*t:u.coordinate});var m=wx(t,u.tickCoord,function(){return h},l,c);m&&(c=u.tickCoord-t*(h/2+i),o[a-1]=Wi(Wi({},u),{},{isShow:!0}))}for(var y=s?a-1:a,v=function(T){var E=o[T],C,I=function(){return C===void 0&&(C=n(E,T)),C};if(T===0){var O=t*(E.coordinate-t*I()/2-l);o[T]=E=Wi(Wi({},E),{},{tickCoord:O<0?E.coordinate-O*t:E.coordinate})}else o[T]=E=Wi(Wi({},E),{},{tickCoord:E.coordinate});var N=wx(t,E.tickCoord,I,l,c);N&&(l=E.tickCoord+t*(I()/2+i),o[T]=Wi(Wi({},E),{},{isShow:!0}))},b=0;b<y;b++)v(b);return o}function cR(t,e,n){var r=t.tick,i=t.ticks,s=t.viewBox,o=t.minTickGap,a=t.orientation,l=t.interval,c=t.tickFormatter,u=t.unit,h=t.angle;if(!i||!i.length||!r)return[];if(dt(l)||ky.isSsr)return wUe(i,typeof l=="number"&&dt(l)?l:0);var d=[],m=a==="top"||a==="bottom"?"width":"height",y=u&&m==="width"?uv(u,{fontSize:e,letterSpacing:n}):{width:0,height:0},v=function(E,C){var I=rn(c)?c(E.value,C):E.value;return m==="width"?bUe(uv(I,{fontSize:e,letterSpacing:n}),y,h):uv(I,{fontSize:e,letterSpacing:n})[m]},b=i.length>=2?Ta(i[1].coordinate-i[0].coordinate):1,x=_Ue(s,b,m);return l==="equidistantPreserveStart"?xUe(b,x,v,i,o):(l==="preserveStart"||l==="preserveStartEnd"?d=CUe(b,x,v,i,o,l==="preserveStartEnd"):d=TUe(b,x,v,i,o),d.filter(function(T){return T.isShow}))}var PUe=["viewBox"],IUe=["viewBox"],OUe=["ticks"];function Cm(t){"@babel/helpers - typeof";return Cm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Cm(t)}function Tg(){return Tg=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Tg.apply(this,arguments)}function yV(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function $r(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?yV(Object(n),!0).forEach(function(r){uR(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):yV(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function P5(t,e){if(t==null)return{};var n=MUe(t,e),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(i=0;i<s.length;i++)r=s[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function MUe(t,e){if(t==null)return{};var n={};for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){if(e.indexOf(r)>=0)continue;n[r]=t[r]}return n}function RUe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function bV(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,cG(r.key),r)}}function kUe(t,e,n){return e&&bV(t.prototype,e),n&&bV(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function NUe(t,e,n){return e=xx(e),DUe(t,lG()?Reflect.construct(e,n||[],xx(t).constructor):e.apply(t,n))}function DUe(t,e){if(e&&(Cm(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return BUe(t)}function BUe(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function lG(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(lG=function(){return!!t})()}function xx(t){return xx=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},xx(t)}function LUe(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&yO(t,e)}function yO(t,e){return yO=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},yO(t,e)}function uR(t,e,n){return e=cG(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function cG(t){var e=FUe(t,"string");return Cm(e)=="symbol"?e:e+""}function FUe(t,e){if(Cm(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(Cm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var Vm=(function(t){function e(n){var r;return RUe(this,e),r=NUe(this,e,[n]),r.state={fontSize:"",letterSpacing:""},r}return LUe(e,t),kUe(e,[{key:"shouldComponentUpdate",value:function(r,i){var s=r.viewBox,o=P5(r,PUe),a=this.props,l=a.viewBox,c=P5(a,IUe);return!Ng(s,l)||!Ng(o,c)||!Ng(i,this.state)}},{key:"componentDidMount",value:function(){var r=this.layerReference;if(r){var i=r.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];i&&this.setState({fontSize:window.getComputedStyle(i).fontSize,letterSpacing:window.getComputedStyle(i).letterSpacing})}}},{key:"getTickLineCoord",value:function(r){var i=this.props,s=i.x,o=i.y,a=i.width,l=i.height,c=i.orientation,u=i.tickSize,h=i.mirror,d=i.tickMargin,m,y,v,b,x,T,E=h?-1:1,C=r.tickSize||u,I=dt(r.tickCoord)?r.tickCoord:r.coordinate;switch(c){case"top":m=y=r.coordinate,b=o+ +!h*l,v=b-E*C,T=v-E*d,x=I;break;case"left":v=b=r.coordinate,y=s+ +!h*a,m=y-E*C,x=m-E*d,T=I;break;case"right":v=b=r.coordinate,y=s+ +h*a,m=y+E*C,x=m+E*d,T=I;break;default:m=y=r.coordinate,b=o+ +h*l,v=b+E*C,T=v+E*d,x=I;break}return{line:{x1:m,y1:v,x2:y,y2:b},tick:{x,y:T}}}},{key:"getTickTextAnchor",value:function(){var r=this.props,i=r.orientation,s=r.mirror,o;switch(i){case"left":o=s?"start":"end";break;case"right":o=s?"end":"start";break;default:o="middle";break}return o}},{key:"getTickVerticalAnchor",value:function(){var r=this.props,i=r.orientation,s=r.mirror,o="end";switch(i){case"left":case"right":o="middle";break;case"top":o=s?"start":"end";break;default:o=s?"end":"start";break}return o}},{key:"renderAxisLine",value:function(){var r=this.props,i=r.x,s=r.y,o=r.width,a=r.height,l=r.orientation,c=r.mirror,u=r.axisLine,h=$r($r($r({},bn(this.props,!1)),bn(u,!1)),{},{fill:"none"});if(l==="top"||l==="bottom"){var d=+(l==="top"&&!c||l==="bottom"&&c);h=$r($r({},h),{},{x1:i,y1:s+d*a,x2:i+o,y2:s+d*a})}else{var m=+(l==="left"&&!c||l==="right"&&c);h=$r($r({},h),{},{x1:i+m*o,y1:s,x2:i+m*o,y2:s+a})}return Me.createElement("line",Tg({},h,{className:un("recharts-cartesian-axis-line",jo(u,"className"))}))}},{key:"renderTicks",value:function(r,i,s){var o=this,a=this.props,l=a.tickLine,c=a.stroke,u=a.tick,h=a.tickFormatter,d=a.unit,m=cR($r($r({},this.props),{},{ticks:r}),i,s),y=this.getTickTextAnchor(),v=this.getTickVerticalAnchor(),b=bn(this.props,!1),x=bn(u,!1),T=$r($r({},b),{},{fill:"none"},bn(l,!1)),E=m.map(function(C,I){var O=o.getTickLineCoord(C),N=O.line,U=O.tick,F=$r($r($r($r({textAnchor:y,verticalAnchor:v},b),{},{stroke:"none",fill:c},x),U),{},{index:I,payload:C,visibleTicksCount:m.length,tickFormatter:h});return Me.createElement(ui,Tg({className:"recharts-cartesian-axis-tick",key:"tick-".concat(C.value,"-").concat(C.coordinate,"-").concat(C.tickCoord)},kw(o.props,C,I)),l&&Me.createElement("line",Tg({},T,N,{className:un("recharts-cartesian-axis-tick-line",jo(l,"className"))})),u&&e.renderTickItem(u,F,"".concat(rn(h)?h(C.value,I):C.value).concat(d||"")))});return Me.createElement("g",{className:"recharts-cartesian-axis-ticks"},E)}},{key:"render",value:function(){var r=this,i=this.props,s=i.axisLine,o=i.width,a=i.height,l=i.ticksGenerator,c=i.className,u=i.hide;if(u)return null;var h=this.props,d=h.ticks,m=P5(h,OUe),y=d;return rn(l)&&(y=d&&d.length>0?l(this.props):l(m)),o<=0||a<=0||!y||!y.length?null:Me.createElement(ui,{className:un("recharts-cartesian-axis",c),ref:function(b){r.layerReference=b}},s&&this.renderAxisLine(),this.renderTicks(y,this.state.fontSize,this.state.letterSpacing),Qi.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(r,i,s){var o,a=un(i.className,"recharts-cartesian-axis-tick-value");return Me.isValidElement(r)?o=Me.cloneElement(r,$r($r({},i),{},{className:a})):rn(r)?o=r($r($r({},i),{},{className:a})):o=Me.createElement($w,Tg({},i,{className:"recharts-cartesian-axis-tick-value"}),s),o}}])})(A.Component);uR(Vm,"displayName","CartesianAxis");uR(Vm,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var UUe=["x1","y1","x2","y2","key"],zUe=["offset"];function cd(t){"@babel/helpers - typeof";return cd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},cd(t)}function _V(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Xi(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?_V(Object(n),!0).forEach(function(r){jUe(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):_V(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function jUe(t,e,n){return e=VUe(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function VUe(t){var e=WUe(t,"string");return cd(e)=="symbol"?e:e+""}function WUe(t,e){if(cd(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(cd(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Nh(){return Nh=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Nh.apply(this,arguments)}function wV(t,e){if(t==null)return{};var n=$Ue(t,e),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(i=0;i<s.length;i++)r=s[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function $Ue(t,e){if(t==null)return{};var n={};for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){if(e.indexOf(r)>=0)continue;n[r]=t[r]}return n}var HUe=function(e){var n=e.fill;if(!n||n==="none")return null;var r=e.fillOpacity,i=e.x,s=e.y,o=e.width,a=e.height,l=e.ry;return Me.createElement("rect",{x:i,y:s,ry:l,width:o,height:a,stroke:"none",fill:n,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function uG(t,e){var n;if(Me.isValidElement(t))n=Me.cloneElement(t,e);else if(rn(t))n=t(e);else{var r=e.x1,i=e.y1,s=e.x2,o=e.y2,a=e.key,l=wV(e,UUe),c=bn(l,!1);c.offset;var u=wV(c,zUe);n=Me.createElement("line",Nh({},u,{x1:r,y1:i,x2:s,y2:o,fill:"none",key:a}))}return n}function qUe(t){var e=t.x,n=t.width,r=t.horizontal,i=r===void 0?!0:r,s=t.horizontalPoints;if(!i||!s||!s.length)return null;var o=s.map(function(a,l){var c=Xi(Xi({},t),{},{x1:e,y1:a,x2:e+n,y2:a,key:"line-".concat(l),index:l});return uG(i,c)});return Me.createElement("g",{className:"recharts-cartesian-grid-horizontal"},o)}function QUe(t){var e=t.y,n=t.height,r=t.vertical,i=r===void 0?!0:r,s=t.verticalPoints;if(!i||!s||!s.length)return null;var o=s.map(function(a,l){var c=Xi(Xi({},t),{},{x1:a,y1:e,x2:a,y2:e+n,key:"line-".concat(l),index:l});return uG(i,c)});return Me.createElement("g",{className:"recharts-cartesian-grid-vertical"},o)}function XUe(t){var e=t.horizontalFill,n=t.fillOpacity,r=t.x,i=t.y,s=t.width,o=t.height,a=t.horizontalPoints,l=t.horizontal,c=l===void 0?!0:l;if(!c||!e||!e.length)return null;var u=a.map(function(d){return Math.round(d+i-i)}).sort(function(d,m){return d-m});i!==u[0]&&u.unshift(0);var h=u.map(function(d,m){var y=!u[m+1],v=y?i+o-d:u[m+1]-d;if(v<=0)return null;var b=m%e.length;return Me.createElement("rect",{key:"react-".concat(m),y:d,x:r,height:v,width:s,stroke:"none",fill:e[b],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return Me.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},h)}function YUe(t){var e=t.vertical,n=e===void 0?!0:e,r=t.verticalFill,i=t.fillOpacity,s=t.x,o=t.y,a=t.width,l=t.height,c=t.verticalPoints;if(!n||!r||!r.length)return null;var u=c.map(function(d){return Math.round(d+s-s)}).sort(function(d,m){return d-m});s!==u[0]&&u.unshift(0);var h=u.map(function(d,m){var y=!u[m+1],v=y?s+a-d:u[m+1]-d;if(v<=0)return null;var b=m%r.length;return Me.createElement("rect",{key:"react-".concat(m),x:d,y:o,width:v,height:l,stroke:"none",fill:r[b],fillOpacity:i,className:"recharts-cartesian-grid-bg"})});return Me.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},h)}var KUe=function(e,n){var r=e.xAxis,i=e.width,s=e.height,o=e.offset;return AK(cR(Xi(Xi(Xi({},Vm.defaultProps),r),{},{ticks:Oc(r,!0),viewBox:{x:0,y:0,width:i,height:s}})),o.left,o.left+o.width,n)},GUe=function(e,n){var r=e.yAxis,i=e.width,s=e.height,o=e.offset;return AK(cR(Xi(Xi(Xi({},Vm.defaultProps),r),{},{ticks:Oc(r,!0),viewBox:{x:0,y:0,width:i,height:s}})),o.top,o.top+o.height,n)},ug={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function fR(t){var e,n,r,i,s,o,a=sR(),l=oR(),c=F7e(),u=Xi(Xi({},t),{},{stroke:(e=t.stroke)!==null&&e!==void 0?e:ug.stroke,fill:(n=t.fill)!==null&&n!==void 0?n:ug.fill,horizontal:(r=t.horizontal)!==null&&r!==void 0?r:ug.horizontal,horizontalFill:(i=t.horizontalFill)!==null&&i!==void 0?i:ug.horizontalFill,vertical:(s=t.vertical)!==null&&s!==void 0?s:ug.vertical,verticalFill:(o=t.verticalFill)!==null&&o!==void 0?o:ug.verticalFill,x:dt(t.x)?t.x:c.left,y:dt(t.y)?t.y:c.top,width:dt(t.width)?t.width:c.width,height:dt(t.height)?t.height:c.height}),h=u.x,d=u.y,m=u.width,y=u.height,v=u.syncWithTicks,b=u.horizontalValues,x=u.verticalValues,T=D7e(),E=B7e();if(!dt(m)||m<=0||!dt(y)||y<=0||!dt(h)||h!==+h||!dt(d)||d!==+d)return null;var C=u.verticalCoordinatesGenerator||KUe,I=u.horizontalCoordinatesGenerator||GUe,O=u.horizontalPoints,N=u.verticalPoints;if((!O||!O.length)&&rn(I)){var U=b&&b.length,F=I({yAxis:E?Xi(Xi({},E),{},{ticks:U?b:E.ticks}):void 0,width:a,height:l,offset:c},U?!0:v);kc(Array.isArray(F),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(cd(F),"]")),Array.isArray(F)&&(O=F)}if((!N||!N.length)&&rn(C)){var H=x&&x.length,W=C({xAxis:T?Xi(Xi({},T),{},{ticks:H?x:T.ticks}):void 0,width:a,height:l,offset:c},H?!0:v);kc(Array.isArray(W),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(cd(W),"]")),Array.isArray(W)&&(N=W)}return Me.createElement("g",{className:"recharts-cartesian-grid"},Me.createElement(HUe,{fill:u.fill,fillOpacity:u.fillOpacity,x:u.x,y:u.y,width:u.width,height:u.height,ry:u.ry}),Me.createElement(qUe,Nh({},u,{offset:c,horizontalPoints:O,xAxis:T,yAxis:E})),Me.createElement(QUe,Nh({},u,{offset:c,verticalPoints:N,xAxis:T,yAxis:E})),Me.createElement(XUe,Nh({},u,{horizontalPoints:O})),Me.createElement(YUe,Nh({},u,{verticalPoints:N})))}fR.displayName="CartesianGrid";function Pm(t){"@babel/helpers - typeof";return Pm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Pm(t)}function ZUe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function JUe(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,dG(r.key),r)}}function eze(t,e,n){return e&&JUe(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function tze(t,e,n){return e=Ax(e),nze(t,fG()?Reflect.construct(e,n||[],Ax(t).constructor):e.apply(t,n))}function nze(t,e){if(e&&(Pm(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return rze(t)}function rze(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function fG(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(fG=function(){return!!t})()}function Ax(t){return Ax=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ax(t)}function ize(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&bO(t,e)}function bO(t,e){return bO=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},bO(t,e)}function hG(t,e,n){return e=dG(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function dG(t){var e=sze(t,"string");return Pm(e)=="symbol"?e:e+""}function sze(t,e){if(Pm(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(Pm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function _O(){return _O=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},_O.apply(this,arguments)}function oze(t){var e=t.xAxisId,n=sR(),r=oR(),i=JK(e);return i==null?null:A.createElement(Vm,_O({},i,{className:un("recharts-".concat(i.axisType," ").concat(i.axisType),i.className),viewBox:{x:0,y:0,width:n,height:r},ticksGenerator:function(o){return Oc(o,!0)}}))}var Ly=(function(t){function e(){return ZUe(this,e),tze(this,e,arguments)}return ize(e,t),eze(e,[{key:"render",value:function(){return A.createElement(oze,this.props)}}])})(A.Component);hG(Ly,"displayName","XAxis");hG(Ly,"defaultProps",{allowDecimals:!0,hide:!1,orientation:"bottom",width:0,height:30,mirror:!1,xAxisId:0,tickCount:5,type:"category",padding:{left:0,right:0},allowDataOverflow:!1,scale:"auto",reversed:!1,allowDuplicatedCategory:!0});function Im(t){"@babel/helpers - typeof";return Im=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Im(t)}function aze(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function lze(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,mG(r.key),r)}}function cze(t,e,n){return e&&lze(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function uze(t,e,n){return e=Ex(e),fze(t,pG()?Reflect.construct(e,n||[],Ex(t).constructor):e.apply(t,n))}function fze(t,e){if(e&&(Im(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return hze(t)}function hze(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function pG(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(pG=function(){return!!t})()}function Ex(t){return Ex=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ex(t)}function dze(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&wO(t,e)}function wO(t,e){return wO=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},wO(t,e)}function gG(t,e,n){return e=mG(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function mG(t){var e=pze(t,"string");return Im(e)=="symbol"?e:e+""}function pze(t,e){if(Im(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(Im(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function xO(){return xO=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},xO.apply(this,arguments)}var gze=function(e){var n=e.yAxisId,r=sR(),i=oR(),s=eG(n);return s==null?null:A.createElement(Vm,xO({},s,{className:un("recharts-".concat(s.axisType," ").concat(s.axisType),s.className),viewBox:{x:0,y:0,width:r,height:i},ticksGenerator:function(a){return Oc(a,!0)}}))},Fy=(function(t){function e(){return aze(this,e),uze(this,e,arguments)}return dze(e,t),cze(e,[{key:"render",value:function(){return A.createElement(gze,this.props)}}])})(A.Component);gG(Fy,"displayName","YAxis");gG(Fy,"defaultProps",{allowDuplicatedCategory:!0,allowDecimals:!0,hide:!1,orientation:"left",width:60,height:0,mirror:!1,yAxisId:0,tickCount:5,type:"number",padding:{top:0,bottom:0},allowDataOverflow:!1,scale:"auto",reversed:!1});function xV(t){return bze(t)||yze(t)||vze(t)||mze()}function mze(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
3570In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function vze(t,e){if(t){if(typeof t=="string")return AO(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return AO(t,e)}}function yze(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function bze(t){if(Array.isArray(t))return AO(t)}function AO(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var EO=function(e,n,r,i,s){var o=Pa(e,lR),a=Pa(e,UA),l=[].concat(xV(o),xV(a)),c=Pa(e,jA),u="".concat(i,"Id"),h=i[0],d=n;if(l.length&&(d=l.reduce(function(v,b){if(b.props[u]===r&&Il(b.props,"extendDomain")&&dt(b.props[h])){var x=b.props[h];return[Math.min(v[0],x),Math.max(v[1],x)]}return v},d)),c.length){var m="".concat(h,"1"),y="".concat(h,"2");d=c.reduce(function(v,b){if(b.props[u]===r&&Il(b.props,"extendDomain")&&dt(b.props[m])&&dt(b.props[y])){var x=b.props[m],T=b.props[y];return[Math.min(v[0],x,T),Math.max(v[1],x,T)]}return v},d)}return s&&s.length&&(d=s.reduce(function(v,b){return dt(b)?[Math.min(v[0],b),Math.max(v[1],b)]:v},d)),d},I5={exports:{}},AV;function _ze(){return AV||(AV=1,(function(t){var e=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function i(l,c,u){this.fn=l,this.context=c,this.once=u||!1}function s(l,c,u,h,d){if(typeof u!="function")throw new TypeError("The listener must be a function");var m=new i(u,h||l,d),y=n?n+c:c;return l._events[y]?l._events[y].fn?l._events[y]=[l._events[y],m]:l._events[y].push(m):(l._events[y]=m,l._eventsCount++),l}function o(l,c){--l._eventsCount===0?l._events=new r:delete l._events[c]}function a(){this._events=new r,this._eventsCount=0}a.prototype.eventNames=function(){var c=[],u,h;if(this._eventsCount===0)return c;for(h in u=this._events)e.call(u,h)&&c.push(n?h.slice(1):h);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(u)):c},a.prototype.listeners=function(c){var u=n?n+c:c,h=this._events[u];if(!h)return[];if(h.fn)return[h.fn];for(var d=0,m=h.length,y=new Array(m);d<m;d++)y[d]=h[d].fn;return y},a.prototype.listenerCount=function(c){var u=n?n+c:c,h=this._events[u];return h?h.fn?1:h.length:0},a.prototype.emit=function(c,u,h,d,m,y){var v=n?n+c:c;if(!this._events[v])return!1;var b=this._events[v],x=arguments.length,T,E;if(b.fn){switch(b.once&&this.removeListener(c,b.fn,void 0,!0),x){case 1:return b.fn.call(b.context),!0;case 2:return b.fn.call(b.context,u),!0;case 3:return b.fn.call(b.context,u,h),!0;case 4:return b.fn.call(b.context,u,h,d),!0;case 5:return b.fn.call(b.context,u,h,d,m),!0;case 6:return b.fn.call(b.context,u,h,d,m,y),!0}for(E=1,T=new Array(x-1);E<x;E++)T[E-1]=arguments[E];b.fn.apply(b.context,T)}else{var C=b.length,I;for(E=0;E<C;E++)switch(b[E].once&&this.removeListener(c,b[E].fn,void 0,!0),x){case 1:b[E].fn.call(b[E].context);break;case 2:b[E].fn.call(b[E].context,u);break;case 3:b[E].fn.call(b[E].context,u,h);break;case 4:b[E].fn.call(b[E].context,u,h,d);break;default:if(!T)for(I=1,T=new Array(x-1);I<x;I++)T[I-1]=arguments[I];b[E].fn.apply(b[E].context,T)}}return!0},a.prototype.on=function(c,u,h){return s(this,c,u,h,!1)},a.prototype.once=function(c,u,h){return s(this,c,u,h,!0)},a.prototype.removeListener=function(c,u,h,d){var m=n?n+c:c;if(!this._events[m])return this;if(!u)return o(this,m),this;var y=this._events[m];if(y.fn)y.fn===u&&(!d||y.once)&&(!h||y.context===h)&&o(this,m);else{for(var v=0,b=[],x=y.length;v<x;v++)(y[v].fn!==u||d&&!y[v].once||h&&y[v].context!==h)&&b.push(y[v]);b.length?this._events[m]=b.length===1?b[0]:b:o(this,m)}return this},a.prototype.removeAllListeners=function(c){var u;return c?(u=n?n+c:c,this._events[u]&&o(this,u)):(this._events=new r,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=n,a.EventEmitter=a,t.exports=a})(I5)),I5.exports}var wze=_ze();const xze=fn(wze);var O5=new xze,M5="recharts.syncMouseEvents";function uy(t){"@babel/helpers - typeof";return uy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},uy(t)}function Aze(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Eze(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,vG(r.key),r)}}function Sze(t,e,n){return e&&Eze(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function R5(t,e,n){return e=vG(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function vG(t){var e=Tze(t,"string");return uy(e)=="symbol"?e:e+""}function Tze(t,e){if(uy(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(uy(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var Cze=(function(){function t(){Aze(this,t),R5(this,"activeIndex",0),R5(this,"coordinateList",[]),R5(this,"layout","horizontal")}return Sze(t,[{key:"setDetails",value:function(n){var r,i=n.coordinateList,s=i===void 0?null:i,o=n.container,a=o===void 0?null:o,l=n.layout,c=l===void 0?null:l,u=n.offset,h=u===void 0?null:u,d=n.mouseHandlerCallback,m=d===void 0?null:d;this.coordinateList=(r=s??this.coordinateList)!==null&&r!==void 0?r:[],this.container=a??this.container,this.layout=c??this.layout,this.offset=h??this.offset,this.mouseHandlerCallback=m??this.mouseHandlerCallback,this.activeIndex=Math.min(Math.max(this.activeIndex,0),this.coordinateList.length-1)}},{key:"focus",value:function(){this.spoofMouse()}},{key:"keyboardEvent",value:function(n){if(this.coordinateList.length!==0)switch(n.key){case"ArrowRight":{if(this.layout!=="horizontal")return;this.activeIndex=Math.min(this.activeIndex+1,this.coordinateList.length-1),this.spoofMouse();break}case"ArrowLeft":{if(this.layout!=="horizontal")return;this.activeIndex=Math.max(this.activeIndex-1,0),this.spoofMouse();break}}}},{key:"setIndex",value:function(n){this.activeIndex=n}},{key:"spoofMouse",value:function(){var n,r;if(this.layout==="horizontal"&&this.coordinateList.length!==0){var i=this.container.getBoundingClientRect(),s=i.x,o=i.y,a=i.height,l=this.coordinateList[this.activeIndex].coordinate,c=((n=window)===null||n===void 0?void 0:n.scrollX)||0,u=((r=window)===null||r===void 0?void 0:r.scrollY)||0,h=s+l+c,d=o+this.offset.top+a/2+u;this.mouseHandlerCallback({pageX:h,pageY:d})}}}])})();function Pze(t,e,n){if(n==="number"&&e===!0&&Array.isArray(t)){var r=t==null?void 0:t[0],i=t==null?void 0:t[1];if(r&&i&&dt(r)&&dt(i))return!0}return!1}function Ize(t,e,n,r){var i=r/2;return{stroke:"none",fill:"#ccc",x:t==="horizontal"?e.x-i:n.left+.5,y:t==="horizontal"?n.top+.5:e.y-i,width:t==="horizontal"?r:n.width-1,height:t==="horizontal"?n.height-1:r}}function yG(t){var e=t.cx,n=t.cy,r=t.radius,i=t.startAngle,s=t.endAngle,o=Oi(e,n,r,i),a=Oi(e,n,r,s);return{points:[o,a],cx:e,cy:n,radius:r,startAngle:i,endAngle:s}}function Oze(t,e,n){var r,i,s,o;if(t==="horizontal")r=e.x,s=r,i=n.top,o=n.top+n.height;else if(t==="vertical")i=e.y,o=i,r=n.left,s=n.left+n.width;else if(e.cx!=null&&e.cy!=null)if(t==="centric"){var a=e.cx,l=e.cy,c=e.innerRadius,u=e.outerRadius,h=e.angle,d=Oi(a,l,c,h),m=Oi(a,l,u,h);r=d.x,i=d.y,s=m.x,o=m.y}else return yG(e);return[{x:r,y:i},{x:s,y:o}]}function fy(t){"@babel/helpers - typeof";return fy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},fy(t)}function EV(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function r_(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?EV(Object(n),!0).forEach(function(r){Mze(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):EV(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Mze(t,e,n){return e=Rze(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Rze(t){var e=kze(t,"string");return fy(e)=="symbol"?e:e+""}function kze(t,e){if(fy(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(fy(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Nze(t){var e,n,r=t.element,i=t.tooltipEventType,s=t.isActive,o=t.activeCoordinate,a=t.activePayload,l=t.offset,c=t.activeTooltipIndex,u=t.tooltipAxisBandSize,h=t.layout,d=t.chartName,m=(e=r.props.cursor)!==null&&e!==void 0?e:(n=r.type.defaultProps)===null||n===void 0?void 0:n.cursor;if(!r||!m||!s||!o||d!=="ScatterChart"&&i!=="axis")return null;var y,v=tj;if(d==="ScatterChart")y=o,v=H9e;else if(d==="BarChart")y=Ize(h,o,l,u),v=tR;else if(h==="radial"){var b=yG(o),x=b.cx,T=b.cy,E=b.radius,C=b.startAngle,I=b.endAngle;y={cx:x,cy:T,startAngle:C,endAngle:I,innerRadius:E,outerRadius:E},v=PK}else y={points:Oze(h,o,l)},v=tj;var O=r_(r_(r_(r_({stroke:"#ccc",pointerEvents:"none"},l),y),bn(m,!1)),{},{payload:a,payloadIndex:c,className:un("recharts-tooltip-cursor",m.className)});return A.isValidElement(m)?A.cloneElement(m,O):A.createElement(v,O)}var Dze=["item"],Bze=["children","className","width","height","style","compact","title","desc"];function Om(t){"@babel/helpers - typeof";return Om=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Om(t)}function Cg(){return Cg=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Cg.apply(this,arguments)}function SV(t,e){return Uze(t)||Fze(t,e)||_G(t,e)||Lze()}function Lze(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
3571In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Fze(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,s,o,a=[],l=!0,c=!1;try{if(s=(n=n.call(t)).next,e!==0)for(;!(l=(r=s.call(n)).done)&&(a.push(r.value),a.length!==e);l=!0);}catch(u){c=!0,i=u}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return a}}function Uze(t){if(Array.isArray(t))return t}function TV(t,e){if(t==null)return{};var n=zze(t,e),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(i=0;i<s.length;i++)r=s[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function zze(t,e){if(t==null)return{};var n={};for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){if(e.indexOf(r)>=0)continue;n[r]=t[r]}return n}function jze(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Vze(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,wG(r.key),r)}}function Wze(t,e,n){return e&&Vze(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function $ze(t,e,n){return e=Sx(e),Hze(t,bG()?Reflect.construct(e,n||[],Sx(t).constructor):e.apply(t,n))}function Hze(t,e){if(e&&(Om(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return qze(t)}function qze(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function bG(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(bG=function(){return!!t})()}function Sx(t){return Sx=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Sx(t)}function Qze(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&SO(t,e)}function SO(t,e){return SO=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},SO(t,e)}function Mm(t){return Kze(t)||Yze(t)||_G(t)||Xze()}function Xze(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
3572In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _G(t,e){if(t){if(typeof t=="string")return TO(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return TO(t,e)}}function Yze(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function Kze(t){if(Array.isArray(t))return TO(t)}function TO(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function CV(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Ge(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?CV(Object(n),!0).forEach(function(r){Lt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):CV(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Lt(t,e,n){return e=wG(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function wG(t){var e=Gze(t,"string");return Om(e)=="symbol"?e:e+""}function Gze(t,e){if(Om(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(Om(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Zze={xAxis:["bottom","top"],yAxis:["left","right"]},Jze={width:"100%",height:"100%"},xG={x:0,y:0};function i_(t){return t}var eje=function(e,n){return n==="horizontal"?e.x:n==="vertical"?e.y:n==="centric"?e.angle:e.radius},tje=function(e,n,r,i){var s=n.find(function(u){return u&&u.index===r});if(s){if(e==="horizontal")return{x:s.coordinate,y:i.y};if(e==="vertical")return{x:i.x,y:s.coordinate};if(e==="centric"){var o=s.coordinate,a=i.radius;return Ge(Ge(Ge({},i),Oi(i.cx,i.cy,a,o)),{},{angle:o,radius:a})}var l=s.coordinate,c=i.angle;return Ge(Ge(Ge({},i),Oi(i.cx,i.cy,l,c)),{},{angle:c,radius:l})}return xG},VA=function(e,n){var r=n.graphicalItems,i=n.dataStartIndex,s=n.dataEndIndex,o=(r??[]).reduce(function(a,l){var c=l.props.data;return c&&c.length?[].concat(Mm(a),Mm(c)):a},[]);return o.length>0?o:e&&e.length&&dt(i)&&dt(s)?e.slice(i,s+1):[]};function AG(t){return t==="number"?[0,"auto"]:void 0}var CO=function(e,n,r,i){var s=e.graphicalItems,o=e.tooltipAxis,a=VA(n,e);return r<0||!s||!s.length||r>=a.length?null:s.reduce(function(l,c){var u,h=(u=c.props.data)!==null&&u!==void 0?u:n;h&&e.dataStartIndex+e.dataEndIndex!==0&&e.dataEndIndex-e.dataStartIndex>=r&&(h=h.slice(e.dataStartIndex,e.dataEndIndex+1));var d;if(o.dataKey&&!o.allowDuplicatedCategory){var m=h===void 0?a:h;d=dI(m,o.dataKey,i)}else d=h&&h[r]||a[r];return d?[].concat(Mm(l),[SK(c,d)]):l},[])},PV=function(e,n,r,i){var s=i||{x:e.chartX,y:e.chartY},o=eje(s,r),a=e.orderedTooltipTicks,l=e.tooltipAxis,c=e.tooltipTicks,u=PDe(o,a,c,l);if(u>=0&&c){var h=c[u]&&c[u].value,d=CO(e,n,u,h),m=tje(r,a,u,s);return{activeTooltipIndex:u,activeLabel:h,activePayload:d,activeCoordinate:m}}return null},nje=function(e,n){var r=n.axes,i=n.graphicalItems,s=n.axisType,o=n.axisIdKey,a=n.stackGroups,l=n.dataStartIndex,c=n.dataEndIndex,u=e.layout,h=e.children,d=e.stackOffset,m=xK(u,s);return r.reduce(function(y,v){var b,x=v.type.defaultProps!==void 0?Ge(Ge({},v.type.defaultProps),v.props):v.props,T=x.type,E=x.dataKey,C=x.allowDataOverflow,I=x.allowDuplicatedCategory,O=x.scale,N=x.ticks,U=x.includeHidden,F=x[o];if(y[F])return y;var H=VA(e.data,{graphicalItems:i.filter(function($){var he,Se=o in $.props?$.props[o]:(he=$.type.defaultProps)===null||he===void 0?void 0:he[o];return Se===F}),dataStartIndex:l,dataEndIndex:c}),W=H.length,z,V,M;Pze(x.domain,C,T)&&(z=QI(x.domain,null,C),m&&(T==="number"||O!=="auto")&&(M=hv(H,E,"category")));var K=AG(T);if(!z||z.length===0){var j,q=(j=x.domain)!==null&&j!==void 0?j:K;if(E){if(z=hv(H,E,T),T==="category"&&m){var Y=sIe(z);I&&Y?(V=z,z=dx(0,W)):I||(z=jz(q,z,v).reduce(function($,he){return $.indexOf(he)>=0?$:[].concat(Mm($),[he])},[]))}else if(T==="category")I?z=z.filter(function($){return $!==""&&!_n($)}):z=jz(q,z,v).reduce(function($,he){return $.indexOf(he)>=0||he===""||_n(he)?$:[].concat(Mm($),[he])},[]);else if(T==="number"){var X=kDe(H,i.filter(function($){var he,Se,fe=o in $.props?$.props[o]:(he=$.type.defaultProps)===null||he===void 0?void 0:he[o],$e="hide"in $.props?$.props.hide:(Se=$.type.defaultProps)===null||Se===void 0?void 0:Se.hide;return fe===F&&(U||!$e)}),E,s,u);X&&(z=X)}m&&(T==="number"||O!=="auto")&&(M=hv(H,E,"category"))}else m?z=dx(0,W):a&&a[F]&&a[F].hasStack&&T==="number"?z=d==="expand"?[0,1]:EK(a[F].stackGroups,l,c):z=wK(H,i.filter(function($){var he=o in $.props?$.props[o]:$.type.defaultProps[o],Se="hide"in $.props?$.props.hide:$.type.defaultProps.hide;return he===F&&(U||!Se)}),T,u,!0);if(T==="number")z=EO(h,z,F,s,N),q&&(z=QI(q,z,C));else if(T==="category"&&q){var te=q,D=z.every(function($){return te.indexOf($)>=0});D&&(z=te)}}return Ge(Ge({},y),{},Lt({},F,Ge(Ge({},x),{},{axisType:s,domain:z,categoricalDomain:M,duplicateDomain:V,originalDomain:(b=x.domain)!==null&&b!==void 0?b:K,isCategorical:m,layout:u})))},{})},rje=function(e,n){var r=n.graphicalItems,i=n.Axis,s=n.axisType,o=n.axisIdKey,a=n.stackGroups,l=n.dataStartIndex,c=n.dataEndIndex,u=e.layout,h=e.children,d=VA(e.data,{graphicalItems:r,dataStartIndex:l,dataEndIndex:c}),m=d.length,y=xK(u,s),v=-1;return r.reduce(function(b,x){var T=x.type.defaultProps!==void 0?Ge(Ge({},x.type.defaultProps),x.props):x.props,E=T[o],C=AG("number");if(!b[E]){v++;var I;return y?I=dx(0,m):a&&a[E]&&a[E].hasStack?(I=EK(a[E].stackGroups,l,c),I=EO(h,I,E,s)):(I=QI(C,wK(d,r.filter(function(O){var N,U,F=o in O.props?O.props[o]:(N=O.type.defaultProps)===null||N===void 0?void 0:N[o],H="hide"in O.props?O.props.hide:(U=O.type.defaultProps)===null||U===void 0?void 0:U.hide;return F===E&&!H}),"number",u),i.defaultProps.allowDataOverflow),I=EO(h,I,E,s)),Ge(Ge({},b),{},Lt({},E,Ge(Ge({axisType:s},i.defaultProps),{},{hide:!0,orientation:jo(Zze,"".concat(s,".").concat(v%2),null),domain:I,originalDomain:C,isCategorical:y,layout:u})))}return b},{})},ije=function(e,n){var r=n.axisType,i=r===void 0?"xAxis":r,s=n.AxisComp,o=n.graphicalItems,a=n.stackGroups,l=n.dataStartIndex,c=n.dataEndIndex,u=e.children,h="".concat(i,"Id"),d=Pa(u,s),m={};return d&&d.length?m=nje(e,{axes:d,graphicalItems:o,axisType:i,axisIdKey:h,stackGroups:a,dataStartIndex:l,dataEndIndex:c}):o&&o.length&&(m=rje(e,{Axis:s,graphicalItems:o,axisType:i,axisIdKey:h,stackGroups:a,dataStartIndex:l,dataEndIndex:c})),m},sje=function(e){var n=Vu(e),r=Oc(n,!1,!0);return{tooltipTicks:r,orderedTooltipTicks:w6(r,function(i){return i.coordinate}),tooltipAxis:n,tooltipAxisBandSize:ix(n,r)}},IV=function(e){var n=e.children,r=e.defaultShowTooltip,i=no(n,xm),s=0,o=0;return e.data&&e.data.length!==0&&(o=e.data.length-1),i&&i.props&&(i.props.startIndex>=0&&(s=i.props.startIndex),i.props.endIndex>=0&&(o=i.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:s,dataEndIndex:o,activeTooltipIndex:-1,isTooltipActive:!!r}},oje=function(e){return!e||!e.length?!1:e.some(function(n){var r=Rc(n&&n.type);return r&&r.indexOf("Bar")>=0})},OV=function(e){return e==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:e==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:e==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},aje=function(e,n){var r=e.props,i=e.graphicalItems,s=e.xAxisMap,o=s===void 0?{}:s,a=e.yAxisMap,l=a===void 0?{}:a,c=r.width,u=r.height,h=r.children,d=r.margin||{},m=no(h,xm),y=no(h,Dg),v=Object.keys(l).reduce(function(I,O){var N=l[O],U=N.orientation;return!N.mirror&&!N.hide?Ge(Ge({},I),{},Lt({},U,I[U]+N.width)):I},{left:d.left||0,right:d.right||0}),b=Object.keys(o).reduce(function(I,O){var N=o[O],U=N.orientation;return!N.mirror&&!N.hide?Ge(Ge({},I),{},Lt({},U,jo(I,"".concat(U))+N.height)):I},{top:d.top||0,bottom:d.bottom||0}),x=Ge(Ge({},b),v),T=x.bottom;m&&(x.bottom+=m.props.height||xm.defaultProps.height),y&&n&&(x=MDe(x,i,r,n));var E=c-x.left-x.right,C=u-x.top-x.bottom;return Ge(Ge({brushBottom:T},x),{},{width:Math.max(E,0),height:Math.max(C,0)})},lje=function(e,n){if(n==="xAxis")return e[n].width;if(n==="yAxis")return e[n].height},cje=function(e){var n=e.chartName,r=e.GraphicalChild,i=e.defaultTooltipEventType,s=i===void 0?"axis":i,o=e.validateTooltipEventTypes,a=o===void 0?["axis"]:o,l=e.axisComponents,c=e.legendContent,u=e.formatAxisMap,h=e.defaultProps,d=function(x,T){var E=T.graphicalItems,C=T.stackGroups,I=T.offset,O=T.updateId,N=T.dataStartIndex,U=T.dataEndIndex,F=x.barSize,H=x.layout,W=x.barGap,z=x.barCategoryGap,V=x.maxBarSize,M=OV(H),K=M.numericAxisName,j=M.cateAxisName,q=oje(E),Y=[];return E.forEach(function(X,te){var D=VA(x.data,{graphicalItems:[X],dataStartIndex:N,dataEndIndex:U}),$=X.type.defaultProps!==void 0?Ge(Ge({},X.type.defaultProps),X.props):X.props,he=$.dataKey,Se=$.maxBarSize,fe=$["".concat(K,"Id")],$e=$["".concat(j,"Id")],Ze={},ce=l.reduce(function(Te,we){var Qe=T["".concat(we.axisType,"Map")],nt=$["".concat(we.axisType,"Id")];Qe&&Qe[nt]||we.axisType==="zAxis"||ld();var Xe=Qe[nt];return Ge(Ge({},Te),{},Lt(Lt({},we.axisType,Xe),"".concat(we.axisType,"Ticks"),Oc(Xe)))},Ze),me=ce[j],de=ce["".concat(j,"Ticks")],ye=C&&C[fe]&&C[fe].hasStack&&HDe(X,C[fe].stackGroups),ve=Rc(X.type).indexOf("Bar")>=0,ue=ix(me,de),k=[],ie=q&&IDe({barSize:F,stackGroups:C,totalSize:lje(ce,j)});if(ve){var ne,Z,J=_n(Se)?V:Se,le=(ne=(Z=ix(me,de,!0))!==null&&Z!==void 0?Z:J)!==null&&ne!==void 0?ne:0;k=ODe({barGap:W,barCategoryGap:z,bandSize:le!==ue?le:ue,sizeList:ie[$e],maxBarSize:J}),le!==ue&&(k=k.map(function(Te){return Ge(Ge({},Te),{},{position:Ge(Ge({},Te.position),{},{offset:Te.position.offset-le/2})})}))}var pe=X&&X.type&&X.type.getComposedData;pe&&Y.push({props:Ge(Ge({},pe(Ge(Ge({},ce),{},{displayedData:D,props:x,dataKey:he,item:X,bandSize:ue,barPosition:k,offset:I,stackedData:ye,layout:H,dataStartIndex:N,dataEndIndex:U}))),{},Lt(Lt(Lt({key:X.key||"item-".concat(te)},K,ce[K]),j,ce[j]),"animationId",O)),childIndex:vIe(X,x.children),item:X})}),Y},m=function(x,T){var E=x.props,C=x.dataStartIndex,I=x.dataEndIndex,O=x.updateId;if(!nF({props:E}))return null;var N=E.children,U=E.layout,F=E.stackOffset,H=E.data,W=E.reverseStackOrder,z=OV(U),V=z.numericAxisName,M=z.cateAxisName,K=Pa(N,r),j=VDe(H,K,"".concat(V,"Id"),"".concat(M,"Id"),F,W),q=l.reduce(function($,he){var Se="".concat(he.axisType,"Map");return Ge(Ge({},$),{},Lt({},Se,ije(E,Ge(Ge({},he),{},{graphicalItems:K,stackGroups:he.axisType===V&&j,dataStartIndex:C,dataEndIndex:I}))))},{}),Y=aje(Ge(Ge({},q),{},{props:E,graphicalItems:K}),T==null?void 0:T.legendBBox);Object.keys(q).forEach(function($){q[$]=u(E,q[$],Y,$.replace("Map",""),n)});var X=q["".concat(M,"Map")],te=sje(X),D=d(E,Ge(Ge({},q),{},{dataStartIndex:C,dataEndIndex:I,updateId:O,graphicalItems:K,stackGroups:j,offset:Y}));return Ge(Ge({formattedGraphicalItems:D,graphicalItems:K,offset:Y,stackGroups:j},te),q)},y=(function(b){function x(T){var E,C,I;return jze(this,x),I=$ze(this,x,[T]),Lt(I,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),Lt(I,"accessibilityManager",new Cze),Lt(I,"handleLegendBBoxUpdate",function(O){if(O){var N=I.state,U=N.dataStartIndex,F=N.dataEndIndex,H=N.updateId;I.setState(Ge({legendBBox:O},m({props:I.props,dataStartIndex:U,dataEndIndex:F,updateId:H},Ge(Ge({},I.state),{},{legendBBox:O}))))}}),Lt(I,"handleReceiveSyncEvent",function(O,N,U){if(I.props.syncId===O){if(U===I.eventEmitterSymbol&&typeof I.props.syncMethod!="function")return;I.applySyncEvent(N)}}),Lt(I,"handleBrushChange",function(O){var N=O.startIndex,U=O.endIndex;if(N!==I.state.dataStartIndex||U!==I.state.dataEndIndex){var F=I.state.updateId;I.setState(function(){return Ge({dataStartIndex:N,dataEndIndex:U},m({props:I.props,dataStartIndex:N,dataEndIndex:U,updateId:F},I.state))}),I.triggerSyncEvent({dataStartIndex:N,dataEndIndex:U})}}),Lt(I,"handleMouseEnter",function(O){var N=I.getMouseInfo(O);if(N){var U=Ge(Ge({},N),{},{isTooltipActive:!0});I.setState(U),I.triggerSyncEvent(U);var F=I.props.onMouseEnter;rn(F)&&F(U,O)}}),Lt(I,"triggeredAfterMouseMove",function(O){var N=I.getMouseInfo(O),U=N?Ge(Ge({},N),{},{isTooltipActive:!0}):{isTooltipActive:!1};I.setState(U),I.triggerSyncEvent(U);var F=I.props.onMouseMove;rn(F)&&F(U,O)}),Lt(I,"handleItemMouseEnter",function(O){I.setState(function(){return{isTooltipActive:!0,activeItem:O,activePayload:O.tooltipPayload,activeCoordinate:O.tooltipPosition||{x:O.cx,y:O.cy}}})}),Lt(I,"handleItemMouseLeave",function(){I.setState(function(){return{isTooltipActive:!1}})}),Lt(I,"handleMouseMove",function(O){O.persist(),I.throttleTriggeredAfterMouseMove(O)}),Lt(I,"handleMouseLeave",function(O){I.throttleTriggeredAfterMouseMove.cancel();var N={isTooltipActive:!1};I.setState(N),I.triggerSyncEvent(N);var U=I.props.onMouseLeave;rn(U)&&U(N,O)}),Lt(I,"handleOuterEvent",function(O){var N=mIe(O),U=jo(I.props,"".concat(N));if(N&&rn(U)){var F,H;/.*touch.*/i.test(N)?H=I.getMouseInfo(O.changedTouches[0]):H=I.getMouseInfo(O),U((F=H)!==null&&F!==void 0?F:{},O)}}),Lt(I,"handleClick",function(O){var N=I.getMouseInfo(O);if(N){var U=Ge(Ge({},N),{},{isTooltipActive:!0});I.setState(U),I.triggerSyncEvent(U);var F=I.props.onClick;rn(F)&&F(U,O)}}),Lt(I,"handleMouseDown",function(O){var N=I.props.onMouseDown;if(rn(N)){var U=I.getMouseInfo(O);N(U,O)}}),Lt(I,"handleMouseUp",function(O){var N=I.props.onMouseUp;if(rn(N)){var U=I.getMouseInfo(O);N(U,O)}}),Lt(I,"handleTouchMove",function(O){O.changedTouches!=null&&O.changedTouches.length>0&&I.throttleTriggeredAfterMouseMove(O.changedTouches[0])}),Lt(I,"handleTouchStart",function(O){O.changedTouches!=null&&O.changedTouches.length>0&&I.handleMouseDown(O.changedTouches[0])}),Lt(I,"handleTouchEnd",function(O){O.changedTouches!=null&&O.changedTouches.length>0&&I.handleMouseUp(O.changedTouches[0])}),Lt(I,"handleDoubleClick",function(O){var N=I.props.onDoubleClick;if(rn(N)){var U=I.getMouseInfo(O);N(U,O)}}),Lt(I,"handleContextMenu",function(O){var N=I.props.onContextMenu;if(rn(N)){var U=I.getMouseInfo(O);N(U,O)}}),Lt(I,"triggerSyncEvent",function(O){I.props.syncId!==void 0&&O5.emit(M5,I.props.syncId,O,I.eventEmitterSymbol)}),Lt(I,"applySyncEvent",function(O){var N=I.props,U=N.layout,F=N.syncMethod,H=I.state.updateId,W=O.dataStartIndex,z=O.dataEndIndex;if(O.dataStartIndex!==void 0||O.dataEndIndex!==void 0)I.setState(Ge({dataStartIndex:W,dataEndIndex:z},m({props:I.props,dataStartIndex:W,dataEndIndex:z,updateId:H},I.state)));else if(O.activeTooltipIndex!==void 0){var V=O.chartX,M=O.chartY,K=O.activeTooltipIndex,j=I.state,q=j.offset,Y=j.tooltipTicks;if(!q)return;if(typeof F=="function")K=F(Y,O);else if(F==="value"){K=-1;for(var X=0;X<Y.length;X++)if(Y[X].value===O.activeLabel){K=X;break}}var te=Ge(Ge({},q),{},{x:q.left,y:q.top}),D=Math.min(V,te.x+te.width),$=Math.min(M,te.y+te.height),he=Y[K]&&Y[K].value,Se=CO(I.state,I.props.data,K),fe=Y[K]?{x:U==="horizontal"?Y[K].coordinate:D,y:U==="horizontal"?$:Y[K].coordinate}:xG;I.setState(Ge(Ge({},O),{},{activeLabel:he,activeCoordinate:fe,activePayload:Se,activeTooltipIndex:K}))}else I.setState(O)}),Lt(I,"renderCursor",function(O){var N,U=I.state,F=U.isTooltipActive,H=U.activeCoordinate,W=U.activePayload,z=U.offset,V=U.activeTooltipIndex,M=U.tooltipAxisBandSize,K=I.getTooltipEventType(),j=(N=O.props.active)!==null&&N!==void 0?N:F,q=I.props.layout,Y=O.key||"_recharts-cursor";return Me.createElement(Nze,{key:Y,activeCoordinate:H,activePayload:W,activeTooltipIndex:V,chartName:n,element:O,isActive:j,layout:q,offset:z,tooltipAxisBandSize:M,tooltipEventType:K})}),Lt(I,"renderPolarAxis",function(O,N,U){var F=jo(O,"type.axisType"),H=jo(I.state,"".concat(F,"Map")),W=O.type.defaultProps,z=W!==void 0?Ge(Ge({},W),O.props):O.props,V=H&&H[z["".concat(F,"Id")]];return A.cloneElement(O,Ge(Ge({},V),{},{className:un(F,V.className),key:O.key||"".concat(N,"-").concat(U),ticks:Oc(V,!0)}))}),Lt(I,"renderPolarGrid",function(O){var N=O.props,U=N.radialLines,F=N.polarAngles,H=N.polarRadius,W=I.state,z=W.radiusAxisMap,V=W.angleAxisMap,M=Vu(z),K=Vu(V),j=K.cx,q=K.cy,Y=K.innerRadius,X=K.outerRadius;return A.cloneElement(O,{polarAngles:Array.isArray(F)?F:Oc(K,!0).map(function(te){return te.coordinate}),polarRadius:Array.isArray(H)?H:Oc(M,!0).map(function(te){return te.coordinate}),cx:j,cy:q,innerRadius:Y,outerRadius:X,key:O.key||"polar-grid",radialLines:U})}),Lt(I,"renderLegend",function(){var O=I.state.formattedGraphicalItems,N=I.props,U=N.children,F=N.width,H=N.height,W=I.props.margin||{},z=F-(W.left||0)-(W.right||0),V=bK({children:U,formattedGraphicalItems:O,legendWidth:z,legendContent:c});if(!V)return null;var M=V.item,K=TV(V,Dze);return A.cloneElement(M,Ge(Ge({},K),{},{chartWidth:F,chartHeight:H,margin:W,onBBoxUpdate:I.handleLegendBBoxUpdate}))}),Lt(I,"renderTooltip",function(){var O,N=I.props,U=N.children,F=N.accessibilityLayer,H=no(U,wa);if(!H)return null;var W=I.state,z=W.isTooltipActive,V=W.activeCoordinate,M=W.activePayload,K=W.activeLabel,j=W.offset,q=(O=H.props.active)!==null&&O!==void 0?O:z;return A.cloneElement(H,{viewBox:Ge(Ge({},j),{},{x:j.left,y:j.top}),active:q,label:K,payload:q?M:[],coordinate:V,accessibilityLayer:F})}),Lt(I,"renderBrush",function(O){var N=I.props,U=N.margin,F=N.data,H=I.state,W=H.offset,z=H.dataStartIndex,V=H.dataEndIndex,M=H.updateId;return A.cloneElement(O,{key:O.key||"_recharts-brush",onChange:Jb(I.handleBrushChange,O.props.onChange),data:F,x:dt(O.props.x)?O.props.x:W.left,y:dt(O.props.y)?O.props.y:W.top+W.height+W.brushBottom-(U.bottom||0),width:dt(O.props.width)?O.props.width:W.width,startIndex:z,endIndex:V,updateId:"brush-".concat(M)})}),Lt(I,"renderReferenceElement",function(O,N,U){if(!O)return null;var F=I,H=F.clipPathId,W=I.state,z=W.xAxisMap,V=W.yAxisMap,M=W.offset,K=O.type.defaultProps||{},j=O.props,q=j.xAxisId,Y=q===void 0?K.xAxisId:q,X=j.yAxisId,te=X===void 0?K.yAxisId:X;return A.cloneElement(O,{key:O.key||"".concat(N,"-").concat(U),xAxis:z[Y],yAxis:V[te],viewBox:{x:M.left,y:M.top,width:M.width,height:M.height},clipPathId:H})}),Lt(I,"renderActivePoints",function(O){var N=O.item,U=O.activePoint,F=O.basePoint,H=O.childIndex,W=O.isRange,z=[],V=N.props.key,M=N.item.type.defaultProps!==void 0?Ge(Ge({},N.item.type.defaultProps),N.item.props):N.item.props,K=M.activeDot,j=M.dataKey,q=Ge(Ge({index:H,dataKey:j,cx:U.x,cy:U.y,r:4,fill:eR(N.item),strokeWidth:2,stroke:"#fff",payload:U.payload,value:U.value},bn(K,!1)),Rw(K));return z.push(x.renderActiveDot(K,q,"".concat(V,"-activePoint-").concat(H))),F?z.push(x.renderActiveDot(K,Ge(Ge({},q),{},{cx:F.x,cy:F.y}),"".concat(V,"-basePoint-").concat(H))):W&&z.push(null),z}),Lt(I,"renderGraphicChild",function(O,N,U){var F=I.filterFormatItem(O,N,U);if(!F)return null;var H=I.getTooltipEventType(),W=I.state,z=W.isTooltipActive,V=W.tooltipAxis,M=W.activeTooltipIndex,K=W.activeLabel,j=I.props.children,q=no(j,wa),Y=F.props,X=Y.points,te=Y.isRange,D=Y.baseLine,$=F.item.type.defaultProps!==void 0?Ge(Ge({},F.item.type.defaultProps),F.item.props):F.item.props,he=$.activeDot,Se=$.hide,fe=$.activeBar,$e=$.activeShape,Ze=!!(!Se&&z&&q&&(he||fe||$e)),ce={};H!=="axis"&&q&&q.props.trigger==="click"?ce={onClick:Jb(I.handleItemMouseEnter,O.props.onClick)}:H!=="axis"&&(ce={onMouseLeave:Jb(I.handleItemMouseLeave,O.props.onMouseLeave),onMouseEnter:Jb(I.handleItemMouseEnter,O.props.onMouseEnter)});var me=A.cloneElement(O,Ge(Ge({},F.props),ce));function de(we){return typeof V.dataKey=="function"?V.dataKey(we.payload):null}if(Ze)if(M>=0){var ye,ve;if(V.dataKey&&!V.allowDuplicatedCategory){var ue=typeof V.dataKey=="function"?de:"payload.".concat(V.dataKey.toString());ye=dI(X,ue,K),ve=te&&D&&dI(D,ue,K)}else ye=X==null?void 0:X[M],ve=te&&D&&D[M];if($e||fe){var k=O.props.activeIndex!==void 0?O.props.activeIndex:M;return[A.cloneElement(O,Ge(Ge(Ge({},F.props),ce),{},{activeIndex:k})),null,null]}if(!_n(ye))return[me].concat(Mm(I.renderActivePoints({item:F,activePoint:ye,basePoint:ve,childIndex:M,isRange:te})))}else{var ie,ne=(ie=I.getItemByXY(I.state.activeCoordinate))!==null&&ie!==void 0?ie:{graphicalItem:me},Z=ne.graphicalItem,J=Z.item,le=J===void 0?O:J,pe=Z.childIndex,Te=Ge(Ge(Ge({},F.props),ce),{},{activeIndex:pe});return[A.cloneElement(le,Te),null,null]}return te?[me,null,null]:[me,null]}),Lt(I,"renderCustomized",function(O,N,U){return A.cloneElement(O,Ge(Ge({key:"recharts-customized-".concat(U)},I.props),I.state))}),Lt(I,"renderMap",{CartesianGrid:{handler:i_,once:!0},ReferenceArea:{handler:I.renderReferenceElement},ReferenceLine:{handler:i_},ReferenceDot:{handler:I.renderReferenceElement},XAxis:{handler:i_},YAxis:{handler:i_},Brush:{handler:I.renderBrush,once:!0},Bar:{handler:I.renderGraphicChild},Line:{handler:I.renderGraphicChild},Area:{handler:I.renderGraphicChild},Radar:{handler:I.renderGraphicChild},RadialBar:{handler:I.renderGraphicChild},Scatter:{handler:I.renderGraphicChild},Pie:{handler:I.renderGraphicChild},Funnel:{handler:I.renderGraphicChild},Tooltip:{handler:I.renderCursor,once:!0},PolarGrid:{handler:I.renderPolarGrid,once:!0},PolarAngleAxis:{handler:I.renderPolarAxis},PolarRadiusAxis:{handler:I.renderPolarAxis},Customized:{handler:I.renderCustomized}}),I.clipPathId="".concat((E=T.id)!==null&&E!==void 0?E:vA("recharts"),"-clip"),I.throttleTriggeredAfterMouseMove=dY(I.triggeredAfterMouseMove,(C=T.throttleDelay)!==null&&C!==void 0?C:1e3/60),I.state={},I}return Qze(x,b),Wze(x,[{key:"componentDidMount",value:function(){var E,C;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(E=this.props.margin.left)!==null&&E!==void 0?E:0,top:(C=this.props.margin.top)!==null&&C!==void 0?C:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var E=this.props,C=E.children,I=E.data,O=E.height,N=E.layout,U=no(C,wa);if(U){var F=U.props.defaultIndex;if(!(typeof F!="number"||F<0||F>this.state.tooltipTicks.length-1)){var H=this.state.tooltipTicks[F]&&this.state.tooltipTicks[F].value,W=CO(this.state,I,F,H),z=this.state.tooltipTicks[F].coordinate,V=(this.state.offset.top+O)/2,M=N==="horizontal",K=M?{x:z,y:V}:{y:z,x:V},j=this.state.formattedGraphicalItems.find(function(Y){var X=Y.item;return X.type.name==="Scatter"});j&&(K=Ge(Ge({},K),j.props.points[F].tooltipPosition),W=j.props.points[F].tooltipPayload);var q={activeTooltipIndex:F,isTooltipActive:!0,activeLabel:H,activePayload:W,activeCoordinate:K};this.setState(q),this.renderCursor(U),this.accessibilityManager.setIndex(F)}}}},{key:"getSnapshotBeforeUpdate",value:function(E,C){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==C.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==E.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==E.margin){var I,O;this.accessibilityManager.setDetails({offset:{left:(I=this.props.margin.left)!==null&&I!==void 0?I:0,top:(O=this.props.margin.top)!==null&&O!==void 0?O:0}})}return null}},{key:"componentDidUpdate",value:function(E){gI([no(E.children,wa)],[no(this.props.children,wa)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var E=no(this.props.children,wa);if(E&&typeof E.props.shared=="boolean"){var C=E.props.shared?"axis":"item";return a.indexOf(C)>=0?C:s}return s}},{key:"getMouseInfo",value:function(E){if(!this.container)return null;var C=this.container,I=C.getBoundingClientRect(),O=rRe(I),N={chartX:Math.round(E.pageX-O.left),chartY:Math.round(E.pageY-O.top)},U=I.width/C.offsetWidth||1,F=this.inRange(N.chartX,N.chartY,U);if(!F)return null;var H=this.state,W=H.xAxisMap,z=H.yAxisMap,V=this.getTooltipEventType(),M=PV(this.state,this.props.data,this.props.layout,F);if(V!=="axis"&&W&&z){var K=Vu(W).scale,j=Vu(z).scale,q=K&&K.invert?K.invert(N.chartX):null,Y=j&&j.invert?j.invert(N.chartY):null;return Ge(Ge({},N),{},{xValue:q,yValue:Y},M)}return M?Ge(Ge({},N),M):null}},{key:"inRange",value:function(E,C){var I=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,O=this.props.layout,N=E/I,U=C/I;if(O==="horizontal"||O==="vertical"){var F=this.state.offset,H=N>=F.left&&N<=F.left+F.width&&U>=F.top&&U<=F.top+F.height;return H?{x:N,y:U}:null}var W=this.state,z=W.angleAxisMap,V=W.radiusAxisMap;if(z&&V){var M=Vu(z);return $z({x:N,y:U},M)}return null}},{key:"parseEventsOfWrapper",value:function(){var E=this.props.children,C=this.getTooltipEventType(),I=no(E,wa),O={};I&&C==="axis"&&(I.props.trigger==="click"?O={onClick:this.handleClick}:O={onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu});var N=Rw(this.props,this.handleOuterEvent);return Ge(Ge({},N),O)}},{key:"addListener",value:function(){O5.on(M5,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){O5.removeListener(M5,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(E,C,I){for(var O=this.state.formattedGraphicalItems,N=0,U=O.length;N<U;N++){var F=O[N];if(F.item===E||F.props.key===E.key||C===Rc(F.item.type)&&I===F.childIndex)return F}return null}},{key:"renderClipPath",value:function(){var E=this.clipPathId,C=this.state.offset,I=C.left,O=C.top,N=C.height,U=C.width;return Me.createElement("defs",null,Me.createElement("clipPath",{id:E},Me.createElement("rect",{x:I,y:O,height:N,width:U})))}},{key:"getXScales",value:function(){var E=this.state.xAxisMap;return E?Object.entries(E).reduce(function(C,I){var O=SV(I,2),N=O[0],U=O[1];return Ge(Ge({},C),{},Lt({},N,U.scale))},{}):null}},{key:"getYScales",value:function(){var E=this.state.yAxisMap;return E?Object.entries(E).reduce(function(C,I){var O=SV(I,2),N=O[0],U=O[1];return Ge(Ge({},C),{},Lt({},N,U.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(E){var C;return(C=this.state.xAxisMap)===null||C===void 0||(C=C[E])===null||C===void 0?void 0:C.scale}},{key:"getYScaleByAxisId",value:function(E){var C;return(C=this.state.yAxisMap)===null||C===void 0||(C=C[E])===null||C===void 0?void 0:C.scale}},{key:"getItemByXY",value:function(E){var C=this.state,I=C.formattedGraphicalItems,O=C.activeItem;if(I&&I.length)for(var N=0,U=I.length;N<U;N++){var F=I[N],H=F.props,W=F.item,z=W.type.defaultProps!==void 0?Ge(Ge({},W.type.defaultProps),W.props):W.props,V=Rc(W.type);if(V==="Bar"){var M=(H.data||[]).find(function(Y){return D9e(E,Y)});if(M)return{graphicalItem:F,payload:M}}else if(V==="RadialBar"){var K=(H.data||[]).find(function(Y){return $z(E,Y)});if(K)return{graphicalItem:F,payload:K}}else if(DA(F,O)||BA(F,O)||sy(F,O)){var j=SFe({graphicalItem:F,activeTooltipItem:O,itemData:z.data}),q=z.activeIndex===void 0?j:z.activeIndex;return{graphicalItem:Ge(Ge({},F),{},{childIndex:q}),payload:sy(F,O)?z.data[j]:F.props.data[j]}}}return null}},{key:"render",value:function(){var E=this;if(!nF(this))return null;var C=this.props,I=C.children,O=C.className,N=C.width,U=C.height,F=C.style,H=C.compact,W=C.title,z=C.desc,V=TV(C,Bze),M=bn(V,!1);if(H)return Me.createElement(cV,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},Me.createElement(vI,Cg({},M,{width:N,height:U,title:W,desc:z}),this.renderClipPath(),iF(I,this.renderMap)));if(this.props.accessibilityLayer){var K,j;M.tabIndex=(K=this.props.tabIndex)!==null&&K!==void 0?K:0,M.role=(j=this.props.role)!==null&&j!==void 0?j:"application",M.onKeyDown=function(Y){E.accessibilityManager.keyboardEvent(Y)},M.onFocus=function(){E.accessibilityManager.focus()}}var q=this.parseEventsOfWrapper();return Me.createElement(cV,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},Me.createElement("div",Cg({className:un("recharts-wrapper",O),style:Ge({position:"relative",curs
3572or:"default",width:N,height:U},F)},q,{ref:function(X){E.container=X}}),Me.createElement(vI,Cg({},M,{width:N,height:U,title:W,desc:z,style:Jze}),this.renderClipPath(),iF(I,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])})(A.Component);Lt(y,"displayName",n),Lt(y,"defaultProps",Ge({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},h)),Lt(y,"getDerivedStateFromProps",function(b,x){var T=b.dataKey,E=b.data,C=b.children,I=b.width,O=b.height,N=b.layout,U=b.stackOffset,F=b.margin,H=x.dataStartIndex,W=x.dataEndIndex;if(x.updateId===void 0){var z=IV(b);return Ge(Ge(Ge({},z),{},{updateId:0},m(Ge(Ge({props:b},z),{},{updateId:0}),x)),{},{prevDataKey:T,prevData:E,prevWidth:I,prevHeight:O,prevLayout:N,prevStackOffset:U,prevMargin:F,prevChildren:C})}if(T!==x.prevDataKey||E!==x.prevData||I!==x.prevWidth||O!==x.prevHeight||N!==x.prevLayout||U!==x.prevStackOffset||!Ng(F,x.prevMargin)){var V=IV(b),M={chartX:x.chartX,chartY:x.chartY,isTooltipActive:x.isTooltipActive},K=Ge(Ge({},PV(x,E,N)),{},{updateId:x.updateId+1}),j=Ge(Ge(Ge({},V),M),K);return Ge(Ge(Ge({},j),m(Ge({props:b},j),x)),{},{prevDataKey:T,prevData:E,prevWidth:I,prevHeight:O,prevLayout:N,prevStackOffset:U,prevMargin:F,prevChildren:C})}if(!gI(C,x.prevChildren)){var q,Y,X,te,D=no(C,xm),$=D&&(q=(Y=D.props)===null||Y===void 0?void 0:Y.startIndex)!==null&&q!==void 0?q:H,he=D&&(X=(te=D.props)===null||te===void 0?void 0:te.endIndex)!==null&&X!==void 0?X:W,Se=$!==H||he!==W,fe=!_n(E),$e=fe&&!Se?x.updateId:x.updateId+1;return Ge(Ge({updateId:$e},m(Ge(Ge({props:b},x),{},{updateId:$e,dataStartIndex:$,dataEndIndex:he}),x)),{},{prevChildren:C,dataStartIndex:$,dataEndIndex:he})}return null}),Lt(y,"renderActiveDot",function(b,x,T){var E;return A.isValidElement(b)?E=A.cloneElement(b,x):rn(b)?E=b(x):E=Me.createElement(BK,x),Me.createElement(ui,{className:"recharts-active-dot",key:T},E)});var v=A.forwardRef(function(x,T){return Me.createElement(y,Cg({},x,{ref:T}))});return v.displayName=y.displayName,v},EG=cje({chartName:"BarChart",GraphicalChild:yf,defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"xAxis",AxisComp:Ly},{axisType:"yAxis",AxisComp:Fy}],formatAxisMap:w7e}),k5={exports:{}},MV;function uje(){return MV||(MV=1,(function(t){(function(){function e(d,m){let y={};return[d,m].forEach(function(v){for(let b in v)Object.prototype.hasOwnProperty.call(v,b)&&(y[b]=v[b])}),y}function n(d){if(typeof d!="string"||!d.match(/^data:image\/webp;base64,/i))throw new Error("Failed to decode WebP Base64 URL");return window.atob(d.substring(23))}function r(d,m){let y=typeof d=="string"&&/^data:image\/webp/.test(d)?d:d.toDataURL("image/webp",m);return n(y)}function i(d){let m=d.charCodeAt(0),y=d.charCodeAt(1),v=d.charCodeAt(2),b=d.charCodeAt(3);return(m|y<<8|v<<16|b<<24)>>>0}function s(d){let m=d.indexOf("VP8",12);if(m===-1)throw new Error("Bad image format, does this browser support WebP?");let y=!1;for(;m<d.length-8;){let v,b;switch(b=d.substring(m,m+4),m+=4,v=i(d.substring(m,m+4)),m+=4,b){case"VP8 ":return{frame:d.substring(m,m+v),hasAlpha:y};case"ALPH":y=!0;break}m+=v,(v&1)!==0&&m++}throw new Error("Failed to find VP8 keyframe in WebP image, is this image mistakenly encoded in the Lossless WebP format?")}const o=-1,a=-2;function l(d){this.value=d}function c(d){this.value=d}function u(d,m,y){if(Array.isArray(y))for(let v=0;v<y.length;v++)u(d,m,y[v]);else if(typeof y=="string")d.writeString(y);else if(y instanceof Uint8Array)d.writeBytes(y);else if(y.id)if(y.offset=d.pos+m,d.writeUnsignedIntBE(y.id),Array.isArray(y.data)){let v,b,x;y.size===o?d.writeByte(255):y.size===a?(v=d.pos,d.writeBytes([15,255,255,255,255])):(v=d.pos,d.writeBytes([0,0,0,0])),b=d.pos,y.dataOffset=b+m,u(d,m,y.data),y.size!==o&&y.size!==a&&(x=d.pos,y.size=x-b,d.seek(v),d.writeEBMLVarIntWidth(y.size,4),d.seek(x))}
3572else if(typeof y.data=="string")d.writeEBMLVarInt(y.data.length),y.dataOffset=d.pos+m,d.writeString(y.data);else if(typeof y.data=="number")y.size||(y.size=d.measureUnsignedInt(y.data)),d.writeEBMLVarInt(y.size),y.dataOffset=d.pos+m,d.writeUnsignedIntBE(y.data,y.size);else if(y.data instanceof c)d.writeEBMLVarInt(8),y.dataOffset=d.pos+m,d.writeDoubleBE(y.data.value);else if(y.data instanceof l)d.writeEBMLVarInt(4),y.dataOffset=d.pos+m,d.writeFloatBE(y.data.value);else if(y.data instanceof Uint8Array)d.writeEBMLVarInt(y.data.byteLength),y.dataOffset=d.pos+m,d.writeBytes(y.data);else throw new Error("Bad EBML datatype "+typeof y.data);else throw new Error("Bad EBML datatype "+typeof y.data)}let h=function(d,m){return function(y){let v=5e3,b=1,x=!1,T=0,E=0,C=null,I=null,O=null,N=[],U=0,F=0,H={quality:.95,transparent:!1,alphaQuality:void 0,fileWriter:null,fd:null,frameDuration:null,frameRate:null},W={Cues:{id:new Uint8Array([28,83,187,107]),positionEBML:null},SegmentInfo:{id:new Uint8Array([21,73,169,102]),positionEBML:null},Tracks:{id:new Uint8Array([22,84,174,107]),positionEBML:null}},z,V={id:17545,data:new c(0)},M,K=[],j=new m(y.fileWriter||y.fd);function q(ue){return ue-z.dataOffset}function Y(ue){(C===null||C.width!==ue.width||C.height!==ue.height)&&(C=document.createElement("canvas"),C.width=ue.width,C.height=ue.height,I=C.getContext("2d"),O=I.createImageData(C.width,C.height));let k=ue.getContext("2d"),ie=k.getImageData(0,0,ue.width,ue.height).data,ne=O.data,Z=0,J=ue.width*ue.height*4;for(let le=3;le<J;le+=4){let pe=ie[le];ne[Z++]=pe,ne[Z++]=pe,ne[Z++]=pe,ne[Z++]=255}return I.putImageData(O,0,0),C}function X(){let ue={id:21420,size:5,data:0},k={id:290298740,data:[]};for(let ie in W){let ne=W[ie];ne.positionEBML=Object.create(ue),k.data.push({id:19899,data:[{id:21419,data:ne.id},ne.positionEBML]})}return k}function te(){M=X();let ue={id:440786851,data:[{id:17030,data:1},{id:17143,data:1},{id:17138,data:4},{id:17139,data:8},{id:17026,data:"webm"},{id:17031,data:2},{id:17029,data:2}]},k={id:357149030,data:[{id:2807729,data:1e6},{id:19840,data:"webm-writer-js"},{id:22337,data:"webm-writer-js"},V]},ie=[{id:176,data:T},{id:186,data:E}];y.transparent&&ie.push({id:21440,data:1});let ne={id:374648427,data:[{id:174,data:[{id:215,data:b},{id:29637,data:b},{id:156,data:0},{id:2274716,data:"und"},{id:134,data:"V_VP8"},{id:2459272,data:"VP8"},{id:131,data:1},{id:224,data:ie}]}]};z={id:408125543,size:a,data:[M,k,ne]};let Z=new d(256);u(Z,j.pos,[ue,z]),j.write(Z.getAsDataArray()),W.SegmentInfo.positionEBML.data=q(k.offset),W.Tracks.positionEBML.data=q(ne.offset),x=!0}function D(ue){let k,ie,ne=new d(4);if(!(ue.trackNumber>0&&ue.trackNumber<127))throw new Error("TrackNumber must be > 0 and < 127");return ne.writeEBMLVarInt(ue.trackNumber),ne.writeU16BE(ue.timecode),ne.writeByte(0),k={id:161,data:[ne.getAsDataArray(),ue.frame]},ie={id:30113,data:[{id:166,data:[{id:238,data:1},{id:165,data:ue.alpha}]}]},{id:160,data:[k,ie]}}function $(ue){let k=new d(4);if(!(ue.trackNumber>0&&ue.trackNumber<127))throw new Error("TrackNumber must be > 0 and < 127");return k.writeEBMLVarInt(ue.trackNumber),k.writeU16BE(ue.timecode),k.writeByte(128),{id:163,data:[k.getAsDataArray(),ue.frame]}}function he(ue){return ue.alpha?D(ue):$(ue)}function Se(ue){return{id:524531317,data:[{id:231,data:Math.round(ue.timecode)}]}}function fe(ue,k,ie){K.push({id:187,data:[{id:179,data:k},{id:183,data:[{id:247,data:ue},{id:241,data:q(ie)}]}]})}function $e(){let ue={id:475249515,data:K},k=new d(16+K.length*32);u(k,j.pos,ue),j.write(k.getAsDataArray()),W.Cues.positionEBML.data=q(ue.offset)}function Ze(){if(N.length===0)return;let ue=0;for(let ne=0;ne<N.length;ne++)ue+=N[ne].frame.length+(N[ne].alpha?N[ne].alpha.length:0);let k=new d(ue+N.length*64),ie=Se({timecode:Math.round(U)});for(let ne=0;ne<N.length;ne++)ie.data.push(he(N[ne]));u(k,j.pos,ie),j.write(k.getAsDataArray()),fe(b,Math.round(U),ie.offset),N=[],U+=F,F=0}function ce(){if(!y.frameDuration)if(y.frameRate)y.frameDuration=1e3/y.frameRate;else throw new Error("Missing required frameDuration or frameRate setting");
3572y.quality=Math.max(Math.min(y.quality,.99999),0),y.alphaQuality===void 0?y.alphaQuality=y.quality:y.alphaQuality=Math.max(Math.min(y.alphaQuality,.99999),0)}function me(ue){ue.trackNumber=b,ue.timecode=Math.round(F),N.push(ue),F+=ue.duration,F>=v&&Ze()}function de(){let ue=new d(M.size),k=j.pos;u(ue,M.dataOffset,M.data),j.seek(M.dataOffset),j.write(ue.getAsDataArray()),j.seek(k)}function ye(){let ue=new d(8),k=j.pos;ue.writeDoubleBE(U),j.seek(V.dataOffset),j.write(ue.getAsDataArray()),j.seek(k)}function ve(){let ue=new d(10),k=j.pos;ue.writeUnsignedIntBE(z.id),ue.writeEBMLVarIntWidth(j.pos-z.dataOffset,5),j.seek(z.offset),j.write(ue.getAsDataArray()),j.seek(k)}this.addFrame=function(ue,k,ie){x||(T=ue.width||0,E=ue.height||0,te());let ne=s(r(ue,y.quality)),Z,J=null;ie?Z=ie:typeof k=="number"?Z=k:Z=y.frameDuration,y.transparent&&(k instanceof HTMLCanvasElement||typeof k=="string"?J=k:ne.hasAlpha&&(J=Y(ue))),me({frame:ne.frame,duration:Z,alpha:J?s(r(J,y.alphaQuality)).frame:null})},this.complete=function(){return x||te(),Ze(),$e(),de(),ye(),ve(),j.complete("video/webm")},this.getWrittenSize=function(){return j.length},y=e(H,y||{}),ce()}};t.exports=h})()})(k5)),k5.exports}var N5={exports:{}},RV;function fje(){return RV||(RV=1,(function(t){(function(){let e=function(n){this.data=new Uint8Array(n),this.pos=0};e.prototype.seek=function(n){this.pos=n},e.prototype.writeBytes=function(n){for(let r=0;r<n.length;r++)this.data[this.pos++]=n[r]},e.prototype.writeByte=function(n){this.data[this.pos++]=n},e.prototype.writeU8=e.prototype.writeByte,e.prototype.writeU16BE=function(n){this.data[this.pos++]=n>>8,this.data[this.pos++]=n},e.prototype.writeDoubleBE=function(n){let r=new Uint8Array(new Float64Array([n]).buffer);for(let i=r.length-1;i>=0;i--)this.writeByte(r[i])},e.prototype.writeFloatBE=function(n){let r=new Uint8Array(new Float32Array([n]).buffer);for(let i=r.length-1;i>=0;i--)this.writeByte(r[i])},e.prototype.writeString=function(n){for(let r=0;r<n.length;r++)this.data[this.pos++]=n.charCodeAt(r)},e.prototype.writeEBMLVarIntWidth=function(n,r){switch(r){case 1:this.writeU8(128|n);break;case 2:this.writeU8(64|n>>8),this.writeU8(n);break;case 3:this.writeU8(32|n>>16),this.writeU8(n>>8),this.writeU8(n);break;case 4:this.writeU8(16|n>>24),this.writeU8(n>>16),this.writeU8(n>>8),this.writeU8(n);break;case 5:this.writeU8(8|n/4294967296&7),this.writeU8(n>>24),this.writeU8(n>>16),this.writeU8(n>>8),this.writeU8(n);break;default:throw new Error("Bad EBML VINT size "+r)}},e.prototype.measureEBMLVarInt=function(n){if(n<127)return 1;if(n<16383)return 2;if(n<(1<<21)-1)return 3;if(n<(1<<28)-1)return 4;if(n<34359738367)return 5;throw new Error("EBML VINT size not supported "+n)},e.prototype.writeEBMLVarInt=function(n){this.writeEBMLVarIntWidth(n,this.measureEBMLVarInt(n))},e.prototype.writeUnsignedIntBE=function(n,r){switch(r===void 0&&(r=this.measureUnsignedInt(n)),r){case 5:this.writeU8(Math.floor(n/4294967296));case 4:this.writeU8(n>>24);case 3:this.writeU8(n>>16);case 2:this.writeU8(n>>8);case 1:this.writeU8(n);break;default:throw new Error("Bad UINT size "+r)}},e.prototype.measureUnsignedInt=function(n){return n<256?1:n<65536?2:n<1<<24?3:n<4294967296?4:5},e.prototype.getAsDataArray=function(){if(this.pos<this.data.byteLength)return this.data.subarray(0,this.pos);if(this.pos==this.data.byteLength)return this.data;throw new Error("ArrayBufferDataStream's pos lies beyond end of buffer")},t.exports=e})()})(N5)),N5.exports}var D5={exports:{}},kV;function hje(){return kV||(kV=1,(function(t){(function(){let e=function(n){return function(r){let i=[],s=Promise.resolve(),o=null,a=null;r&&r.constructor.name==="FileWriter"?o=r:n&&r&&(a=r),this.pos=0,this.length=0;function l(h){return new Promise(function(d,m){let y=new FileReader;y.addEventListener("loadend",function(){d(y.result)}),y.readAsArrayBuffer(h)})}function c(h){return new Promise(function(d,m){h instanceof Uint8Array?d(h):h instanceof ArrayBuffer||ArrayBuffer.isView(h)?d(new Uint8Array(h)):h instanceof Blob?d(l(h).then(function(y){return new Uint8Array(y)})):d(l(new Blob([h])).then(function(y){return new Uint8Array(y)}))})}function u(h){let d=h.byteLength||h.length||h.size;if(!Number.isInteger(d))throw new Error("Failed to determine size of element");return d}this.seek=function(h){if(h<0)throw new Error("Offset may not be negative");if(isNaN(h))throw new Error("Offset may not be NaN");if(h>this.length)throw new Error("Seeking beyond the end of file is not allowed");this.pos=h},this.write=function(h){let d={offset:this.pos,data:h,length:u(h)},m=d.offset>=this.length;this.pos+=d.length,this.length=Math.max(this.length,this.pos),s=s.then(function(){if(a)return new Promise(function(y,v){c(d.data).then(function(b){let x=0,T=Buffer.from(b.buffer),E=function(C,I,O){x+=I,x>=O.length?y():n.write(a,O,x,O.length-x,d.offset+x,E)};n.write(a,T,0,T.length,d.offset,E)})});if(o)return new Promise(function(y,v){o.onwriteend=y,o.seek(d.offset),o.write(new Blob([d.data]))});if(!m)for(let y=0;y<i.length;y++){let v=i[y];if(!(d.offset+d.length<=v.offset||d.offset>=v.offset+v.length)){if(d.offset<v.offset||d.offset+d.length>v.offset+v.length)throw new Error("Overwrite crosses blob boundaries");if(d.offset==v.offset&&d.length==v.length){v.data=d.data;return}else return c(v.data).then(function(b){return v.data=b,c(d.data)}).then(function(b){d.data=b,v.data.set(d.data,d.offset-v.offset)})}}i.push(d)})},this.complete=function(h){return a||o?s=s.then(function(){return null}):s=s.then(function(){let d=[];for(let m=0;m<i.length;m++)d.push(i[m].data);return new Blob(d,{type:h})}),s}}};t.exports=e})()})(D5)),D5.exports}var B5,NV;function dje(){return NV||(NV=1,B5=uje()(fje(),hje()(null))),B5}var pje=dje();const gje=fn(pje);function mje(t,e){if(!t)throw new Error(e)}const Bo=globalThis.document||{};var it={URL:globalThis.URL||globalThis.webkitURL||globalThis.mozURL||globalThis.msURL,getUserMedia:(function(){if(!globalThis.navigator)return globalThis.navigator;const t=globalThis.navigator.getUserMedia||globalThis.navigator.webkitGetUserMedia||globalThis.navigator.mozGetUserMedia||globalThis.navigator.msGetUserMedia;return t&&t.bind(globalThis.navigator)})(),requestAnimFrame:globalThis.requestAnimationFrame||globalThis.webkitRequestAnimationFrame||globalThis.mozRequestAnimationFrame||globalThis.oRequestAnimationFrame||globalThis.msRequestAnimationFrame,requestTimeout:function(e,n){if(e=e||it.noop,n=n||0,!it.requestAnimFrame)return setTimeout(e,n);const r=new Date().getTime(),i=new Object,s=it.requestAnimFrame,o=function a(){new Date().getTime()-r>=n?e.call():i.value=s(a)};return i.value=s(o),i},Blob:globalThis.Blob||globalThis.BlobBuilder||globalThis.WebKitBlobBuilder||globalThis.MozBlobBuilder||globalThis.MSBlobBuilder,btoa:(function(){const t=globalThis.btoa||function(e){let n="",r=0;const i=e.length,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
3572+/=";let o,a,l,c,u,h,d;for(;r<i;)o=e.charCodeAt(r++),a=e.charCodeAt(r++),l=e.charCodeAt(r++),c=o>>2,u=(o&3)<<4|a>>4,h=(a&15)<<2|l>>6,d=l&63,isNaN(a)?h=d=64:isNaN(l)&&(d=64),n=n+s.charAt(c)+s.charAt(u)+s.charAt(h)+s.charAt(d);return n};return t?t.bind(globalThis):it.noop})(),isObject:function(e){return e&&Object.prototype.toString.call(e)==="[object Object]"},isEmptyObject:function(e){return it.isObject(e)&&!Object.keys(e).length},isArray:function(e){return e&&Array.isArray(e)},isFunction:function(e){return e&&typeof e=="function"},isElement:function(e){return e&&e.nodeType===1},isString:function(e){return typeof e=="string"||Object.prototype.toString.call(e)==="[object String]"},isSupported:{canvas:function(){const e=Bo.createElement("canvas");return e&&e.getContext&&e.getContext("2d")},webworkers:function(){return globalThis.Worker},blob:function(){return it.Blob},Uint8Array:function(){return globalThis.Uint8Array},Uint32Array:function(){return globalThis.Uint32Array},videoCodecs:(function(){const t=Bo.createElement("video"),e={mp4:!1,h264:!1,ogv:!1,ogg:!1,webm:!1};try{t&&t.canPlayType&&(e.mp4=t.canPlayType('video/mp4; codecs="mp4v.20.8"')!=="",e.h264=(t.canPlayType('video/mp4; codecs="avc1.42E01E"')||t.canPlayType('video/mp4; codecs="avc1.42E01E, mp4a.40.2"'))!=="",e.ogv=t.canPlayType('video/ogg; codecs="theora"')!=="",e.ogg=t.canPlayType('video/ogg; codecs="theora"')!=="",e.webm=t.canPlayType('video/webm; codecs="vp8, vorbis"')!==-1)}catch{}return e})()},noop:function(){},each:function(e,n){let r,i;if(it.isArray(e))for(r=-1,i=e.length;++r<i&&n(r,e[r])!==!1;);else if(it.isObject(e)){for(r in e)if(e.hasOwnProperty(r)&&n(r,e[r])===!1)break}},normalizeOptions:function(e,n){if(!it.isObject(e)||!it.isObject(n)||!Object.keys)return;const r={};return it.each(e,function(i,s){r[i]=e[i]}),it.each(n,function(i,s){const o=n[i];it.isObject(o)&&e[i]?r[i]=it.normalizeOptions(e[i],o):r[i]=o}),r},setCSSAttr:function(e,n,r){it.isElement(e)&&(it.isString(n)&&it.isString(r)?e.style[n]=r:it.isObject(n)&&it.each(n,function(i,s){e.style[i]=s}))},removeElement:function(e){it.isElement(e)&&e.parentNode&&e.parentNode.removeChild(e)},createWebWorker:function(e){if(!it.isString(e))return{};try{const n=new it.Blob([e],{type:"text/javascript"}),r=it.URL.createObjectURL(n),i=new Worker(r);return{objectUrl:r,worker:i}}catch(n){return`${n}`}},getExtension:function(e){return e.substr(e.lastIndexOf(".")+1,e.length)},getFontSize:function(){const e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!Bo.body||e.resizeFont===!1)return e.fontSize;const n=e.text,r=e.gifWidth;let i=parseInt(e.fontSize,10);const s=parseInt(e.minFontSize,10),o=Bo.createElement("div"),a=Bo.createElement("span");for(o.setAttribute("width",r),o.appendChild(a),a.innerHTML=n,a.style.fontSize=`${i}px`,a.style.textIndent="-9999px",a.style.visibility="hidden",Bo.body.appendChild(a);a.offsetWidth>r&&i>=s;)a.style.fontSize=`${--i}px`;return Bo.body.removeChild(a),`${i}px`},webWorkerError:!1};const vje=Object.freeze({default:it});var Oa={validate:function(e){e=it.isObject(e)?e:{};let n={};return it.each(Oa.validators,function(r,i){const s=i.errorCode;if(!e[s]&&!i.condition)return n=i,n.error=!0,!1}),delete n.condition,n},isValid:function(e){return Oa.validate(e).error!==!0},validators:[{condition:it.isFunction(it.getUserMedia),errorCode:"getUserMedia",errorMsg:"The getUserMedia API is not supported in your browser"},{condition:it.isSupported.canvas(),errorCode:"canvas",errorMsg:"Canvas elements are not supported in your browser"},{condition:it.isSupported.webworkers(),errorCode:"webworkers",errorMsg:"The Web Workers API is not supported in your browser"},{condition:it.isFunction(it.URL),errorCode:"globalThis.URL",errorMsg:"The globalThis.URL API is not supported in your browser"},{condition:it.isSupported.blob(),errorCode:"globalThis.Blob",errorMsg:"The globalThis.Blob File API is not supported in your browser"},{condition:it.isSupported.Uint8Array(),errorCode:"globalThis.Uint8Array",errorMsg:"The globalThis.Uint8Array function constructor is not supported in your browser"},{condition:it.isSupported.Uint32Array(),errorCode:"globalThis.Uint32Array",errorMsg:"The globalThis.Uint32Array function constructor is not supported in your browser"}],messages:{videoCodecs:{errorCode:"videocodec",errorMsg:"The video codec you are trying to use is not supported in your browser"}}};const yje=Object.freeze({default:Oa}),DV=function(){},hR={sampleInterval:10,numWorkers:2,filter:"",gifWidth:200,gifHeight:200,interval:.1,numFrames:10,frameDuration:1,keepCameraOn:!1,images:[],video:null,webcamVideoElement:null,cameraStream:null,text:"",fontWeight:"normal",fontSize:"16px",minFontSize:"10px",resizeFont:!1,fontFamily:"sans-serif",fontColor:"#ffffff",textAlign:"center",textBaseline:"bottom",textXCoordinate:null,textYCoordinate:null,progressCallback:DV,completeCallback:DV,saveRenderingContexts:!1,savedRenderingContexts:[],crossOrigin:"Anonymous"},bje=Object.freeze({default:hR});function _je(){return Oa.isValid()}function SG(){return Oa.isValid()}function wje(){const t={getUserMedia:!0};return Oa.isValid(t)}function xje(t){let e=!1;if(it.isArray(t)&&t.length){if(it.each(t,function(n,r){it.isSupported.videoCodecs[r]&&(e=!0)}),!e)return!1}else if(it.isString(t)&&t.length&&!it.isSupported.videoCodecs[t])return!1;return Oa.isValid({getUserMedia:!0})}function TG(){let O,W,z,V,M;const K=[],j=[],q=[],Y=[];function X(de,ye,ve){let ue,k;for(W=de,z=ye,V=ve,M=new Array(256),ue=0;ue<256;ue++)M[ue]=new Array(4),k=M[ue],k[0]=k[1]=k[2]=(ue<<12)/256|0,q[ue]=65536/256|0,j[ue]=0}function te(){const de=[],ye=new Array(256);for(let ue=0;ue<256;ue++)ye[M[ue][3]]=ue;let ve=0;for(let ue=0;ue<256;ue++){const k=ye[ue];de[ve++]=M[k][0],de[ve++]=M[k][1],de[ve++]=M[k][2]}return de}function D(){let de,ye,ve,ue,k,ie,ne,Z;for(ne=0,Z=0,de=0;de<256;de++){for(k=M[de],ve=de,ue=k[1],ye=de+1;ye<256;ye++)ie=M[ye],ie[1]<ue&&(ve=ye,ue=ie[1]);if(ie=M[ve],de!=ve&&(ye=ie[0],ie[0]=k[0],k[0]=ye,ye=ie[1],ie[1]=k[1],k[1]=ye,ye=ie[2],ie[2]=k[2],k[2]=ye,ye=ie[3],ie[3]=k[3],k[3]=ye),ue!=ne){for(K[ne]=Z+de>>1,ye=ne+1;ye<ue;ye++)K[ye]=de;ne=ue,Z=de}}for(K[ne]=Z+255>>1,ye=ne+1;ye<256;ye++)K[ye]=255}function $(){let de,ye,ve,ue,k,ie,ne,Z,J,le,pe,Te,we,Qe;for(z<1509&&(V=1),O=30+(V-1)/3,Te=W,we=0,Qe=z,pe=z/(3*V),le=pe/100|0,Z=1024,ie=2048,ne=ie>>6,ne<=1&&(ne=0),de=0;de<ne;de++)Y[de]=Z*((ne*ne-de*de)*256/(ne*ne));for(z<1509?J=3:z%499!==0?J=3*499:z%491!==0?J=3*491:z%487!==0?J=3*487:J=3*503,de=0;de<pe;)if(ve=(Te[we+0]&255)<<4,ue=(Te[we+1]&255)<<4,k=(Te[we+2]&255)<<4,ye=ce(ve,ue,k),Ze(Z,ye,ve,ue,k),ne!==0&&$e(ne,ye,ve,ue,k),we+=J,we>=Qe&&(we-=z),de++,le===0&&(le=1),de%le===0)for(Z-=Z/O,ie-=ie/30,ne=ie>>6,ne<=1&&(ne=0),ye=0;ye<ne;ye++)Y[ye]=Z*((ne*ne-ye*ye)*256/(ne*ne))}function he(de,ye,ve){let ue,k,ie,ne,Z,J,le;for(Z=1e3,le=-1,ue=K[ye],k=ue-1;ue<256||k>=0;)ue<256&&(J=M[ue],ie=J[1]-ye,ie>=Z?ue=256:(ue++,ie<0&&(ie=-ie),ne=J[0]-de,ne<0&&(ne=-ne),ie+=ne,ie<Z&&(ne=J[2]-ve,ne<0&&(ne=-ne),ie+=ne,ie<Z&&(Z=ie,le=J[3])))),k>=0&&(J=M[k],ie=ye-J[1],ie>=Z?k=-1:(k--,ie<0&&(ie=-ie),ne=J[0]-de,ne<0&&(ne=-ne),ie+=ne,ie<Z&&(ne=J[2]-ve,ne<0&&(ne=-ne),ie+=ne,ie<Z&&(Z=ie,le=J[3]))));return le}function Se(){return $(),fe(),D(),te()}function fe(){let de;for(de=0;de<256;de++)M[de][0]>>=4,M[de][1]>>=4,M[de][2]>>=4,M[de][3]=de}function $e(de,ye,ve,ue,k){let ie,ne,Z,J,le,pe,Te;for(Z=ye-de,Z<-1&&(Z=-1),J=ye+de,J>256&&(J=256),ie=ye+1,ne=ye-1,pe=1;ie<J||ne>Z;){if(le=Y[pe++],ie<J){Te=M[ie++];try{Te[0]-=le*(Te[0]-ve)/262144|0,Te[1]-=le*(Te[1]-ue)/262144|0,Te[2]-=le*(Te[2]-k)/262144|0}catch{}}if(ne>Z){Te=M[ne--];try{Te[0]-=le*(Te[0]-ve)/262144|0,Te[1]-=le*(Te[1]-ue)/262144|0,Te[2]-=le*(Te[2]-k)/262144|0}catch{}}}}function Ze(de,ye,ve,ue,k){const ie=M[ye],ne=de/1024;ie[0]-=ne*(ie[0]-ve)|0,ie[1]-=ne*(ie[1]-ue)|0,ie[2]-=ne*(ie[2]-k)|0}function ce(de,ye,ve){let ue,k,ie,ne,Z,J,le,pe,Te,we;for(pe=2147483647,Te=pe,J=-1,le=J,ue=0;ue<256;ue++)we=M[ue],k=we[0]-de,k<0&&(k=-k),ie=we[1]-ye,ie<0&&(ie=-ie),k+=ie,ie=we[2]-ve,ie<0&&(ie=-ie),k+=ie,k<pe&&(pe=k,J=ue),ne=k-(j[ue]>>12),ne<Te&&(Te=ne,le=ue),Z=q[ue]>>10,q[ue]-=Z,j[ue]+=Z<<10;return q[J]+=64,j[J]-=65536,le}X.apply(this,arguments);const me={};return me.map=he,me.process=Se,me}function BV(){try{globalThis.onmessage=function(e){const n=e.data||{};let r;n.gifshot&&(r=t.run(n),postMessage(r))}}catch{}var t={dataToRGB:function(n,r,i){const s=r*i*4;let o=0;const a=[];for(;o<s;)a.push(n[o++]),a.push(n[o++]),a.push(n[o++]),o++;return a},componentizedPaletteToArray:function(n){n=n||[];const r=[];for(let i=0;i<n.length;i+=3){const s=n[i],o=n[i+1],a=n[i+2];r.push(s<<16|o<<8|a)}return r},processFrameWithQuantizer:function(n,r,i,s){const o=this.dataToRGB(n,r,i),a=new TG(o,o.length,s),l=a.process(),c=new Uint32Array(this.componentizedPaletteToArray(l)),u=r*i,h=new Uint8Array(u);let d=0;for(let m=0;m<u;m++){const y=o[d++],v=o[d++],b=o[d++];h[m]=a.map(y,v,b)}return{pixels:h,palette:c}},run:function(n){n=n||{};const r=n,i=r.height;r.palette;const s=r.sampleInterval,o=r.width,a=n.data;return this.processFrameWithQuantizer(a,o,i,s)}};return t}function Aje(t,e,n,r){let i=0;r=r===void 0?{}:r;const s=r.loop===void 0?null:r.loop,o=r.palette===void 0?null:r.palette;if(e<=0||n<=0||e>65535||n>65535)throw"Width/Height invalid.";function a(d){const m=d.length;if(m<2||m>256||m&m-1)throw"Invalid code/color length, must be power of 2 and 2 .. 256.";return m}t[i++]=71,t[i++]=73,t[i++]=70,t[i++]=56,t[i++]=57,t[i++]=97;const l=0,c=0;if(t[i++]=e&255,t[i++]=e>>8&255,t[i++]=n&255,t[i++]=n>>8&255,t[i++]=(o!==null?128:0)|l,t[i++]=c,t[i++]=0,s!==null){if(s<0||s>65535)throw"Loop count invalid.";t[i++]=33,t[i++]=255,t[i++]=11,t[i++]=78,t[i++]=69,t[i++]=84,t[i++]=83,t[i++]=67,t[i++]=65,t[i++]=80,t[i++]=69,t[i++]=50,t[i++]=46,t[i++]=48,t[i++]=3,t[i++]=1,t[i++]=s&255,t[i++]=s>>8&255,t[i++]=0}let u=!1;this.addFrame=function(d,m,y,v,b,x){if(u===!0&&(--i,u=!1),x=x===void 0?{}:x,d<0||m<0||d>65535||m>
357265535)throw"x/y invalid.";if(y<=0||v<=0||y>65535||v>65535)throw"Width/Height invalid.";if(b.length<y*v)throw"Not enough pixels for the frame size.";let T=!0,E=x.palette;if(E==null&&(T=!1,E=o),E==null)throw"Must supply either a local or global palette.";let C=a(E),I=0;for(;C>>=1;)++I;C=1<<I;const O=x.delay===void 0?0:x.delay,N=x.disposal===void 0?0:x.disposal;if(N<0||N>3)throw"Disposal out of range.";let U=!1,F=0;if(x.transparent!==void 0&&x.transparent!==null&&(U=!0,F=x.transparent,F<0||F>=C))throw"Transparent color index.";if((N!==0||U||O!==0)&&(t[i++]=33,t[i++]=249,t[i++]=4,t[i++]=N<<2|(U===!0?1:0),t[i++]=O&255,t[i++]=O>>8&255,t[i++]=F,t[i++]=0),t[i++]=44,t[i++]=d&255,t[i++]=d>>8&255,t[i++]=m&255,t[i++]=m>>8&255,t[i++]=y&255,t[i++]=y>>8&255,t[i++]=v&255,t[i++]=v>>8&255,t[i++]=T===!0?128|I-1:0,T===!0)for(let H=0,W=E.length;H<W;++H){const z=E[H];t[i++]=z>>16&255,t[i++]=z>>8&255,t[i++]=z&255}i=h(t,i,I<2?2:I,b)},this.end=function(){return u===!1&&(t[i++]=59,u=!0),i};function h(d,m,y,v){d[m++]=y;let b=m++;const x=1<<y,T=x-1,E=x+1;let C=E+1,I=y+1,O=0,N=0;function U(z){for(;O>=z;)d[m++]=N&255,N>>=8,O-=8,m===b+256&&(d[b]=255,b=m++)}function F(z){N|=z<<O,O+=I,U(8)}let H=v[0]&T,W={};F(x);for(let z=1,V=v.length;z<V;++z){const M=v[z]&T,K=H<<8|M,j=W[K];if(j===void 0){for(N|=H<<O,O+=I;O>=8;)d[m++]=N&255,N>>=8,O-=8,m===b+256&&(d[b]=255,b=m++);C===4096?(F(x),C=E+1,I=y+1,W={}):(C>=1<<I&&++I,W[K]=C++),H=M}else H=j}return F(H),F(E),U(1),b+1===m?d[b]=0:(d[b]=m-b-1,d[m++]=0),m}}const LV=function(){},dR=function(e){this.canvas=null,this.ctx=null,this.repeat=0,this.frames=[],this.numRenderedFrames=0,this.onRenderCompleteCallback=LV,this.onRenderProgressCallback=LV,this.workers=[],this.availableWorkers=[],this.generatingGIF=!1,this.options=e,this.initializeWebWorkers(e)};dR.prototype={workerMethods:BV(),initializeWebWorkers:function(e){const n=this,r=`${TG.toString()}(${BV.toString()}());`;let i,s,o,a,l=-1,c="";for(a=e.numWorkers;++l<a;)i=it.createWebWorker(r),it.isObject(i)?(s=i.objectUrl,o=i.worker,n.workers.push({worker:o,objectUrl:s}),n.availableWorkers.push(o)):(c=i,it.webWorkerError=!!i);this.workerError=c,this.canvas=Bo.createElement("canvas"),this.canvas.width=e.gifWidth,this.canvas.height=e.gifHeight,this.ctx=this.canvas.getContext("2d"),this.frames=[]},getWorker:function(){return this.availableWorkers.pop()},freeWorker:function(e){this.availableWorkers.push(e)},byteMap:(function(){const t=[];for(let e=0;e<256;e++)t[e]=String.fromCharCode(e);return t})(),bufferToString:function(e){const n=e.length;let r="",i=-1;for(;++i<n;)r+=this.byteMap[e[i]];return r},onFrameFinished:function(e){const n=this,r=n.frames,s=!!(n.options.images||[]).length,o=r.every(function(a){return!a.beingProcessed&&a.done});n.numRenderedFrames++,s&&e(n.numRenderedFrames/r.length),n.onRenderProgressCallback(n.numRenderedFrames*.75/r.length),o?n.generatingGIF||n.generateGIF(r,n.onRenderCompleteCallback):it.requestTimeout(function(){n.processNextFrame()},1)},processFrame:function(e){const n=this;this.options;const r=this.options,i=r.progressCallback,s=r.sampleInterval,o=this.frames;let a,l;const c=function(){const d=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}).data;delete a.data,a.pixels=Array.prototype.slice.call(d.pixels),a.palette=Array.prototype.slice.call(d.palette),a.done=!0,a.beingProcessed=!1,n.freeWorker(l),n.onFrameFinished(i)};if(a=o[e],a.beingProcessed||a.done){this.onFrameFinished();return}a.sampleInterval=s,a.beingProcessed=!0,a.gifshot=!0,l=this.getWorker(),l?(l.onmessage=c,l.postMessage(a)):c({data:n.workerMethods.run(a)})},startRendering:function(e){this.onRenderCompleteCallback=e;for(let n=0;n<this.options.numWorkers&&n<this.frames.length;n++)this.processFrame(n)},processNextFrame:function(){let e=-1;for(let n=0;n<this.frames.length;n++){const r=this.frames[n];if(!r.done&&!r.beingProcessed){e=n;break}}e>=0&&this.processFrame(e)},generateGIF:function(e,n){const r=[],i={loop:this.repeat},s=this.options,o=s.interval,a=s.frameDuration,c=!!s.images.length,u=s.gifHeight,h=s.gifWidth,d=new Aje(r,h,u,i),m=this.onRenderProgressCallback,y=c?o*100:0;let v,b;this.generatingGIF=!0,it.each(e,function(x,T){const E=T.palette;m(.75+.25*T.position*1/e.length);for(let C=0;C<a;C++)d.addFrame(0,0,h,u,T.pixels,{palette:E,delay:y})}),d.end(),m(1),this.frames=[],this.generatingGIF=!1,it.isFunction(n)&&(v=this.bufferToString(r),b=`data:image/gif;base64,${it.btoa(v)}`,n(b))},setRepeat:function(e){this.repeat=e}
3572,addFrame:function(e,n){n=it.isObject(n)?n:{};const r=this,i=r.ctx,s=r.options,o=s.gifWidth,a=s.gifHeight,l=it.getFontSize(n),c=n,u=c.filter,h=c.fontColor,d=c.fontFamily,m=c.fontWeight;c.gifHeight,c.gifWidth;const y=c.text,v=c.textAlign,b=c.textBaseline,x=n.textXCoordinate?n.textXCoordinate:v==="left"?1:v==="right"?o:o/2,T=n.textYCoordinate?n.textYCoordinate:b==="top"?1:b==="center"?a/2:a,E=`${m} ${l} ${d}`;let C;try{i.filter=u,i.drawImage(e,0,0,o,a),y&&(i.font=E,i.fillStyle=h,i.textAlign=v,i.textBaseline=b,i.fillText(y,x,T)),C=i.getImageData(0,0,o,a),r.addFrameImageData(C)}catch(I){return`${I}`}},addFrameImageData:function(){const e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=this.frames,r=e.data;this.frames.push({data:r,width:e.width,height:e.height,palette:null,dithering:null,done:!1,beingProcessed:!1,position:n.length})},onRenderProgress:function(e){this.onRenderProgressCallback=e},isRendering:function(){return this.generatingGIF},getBase64GIF:function(e){const n=this,r=function(s){n.destroyWorkers(),it.requestTimeout(function(){e(s)},0)};n.startRendering(r)},destroyWorkers:function(){if(this.workerError)return;const e=this.workers;it.each(e,function(n,r){const i=r.worker,s=r.objectUrl;i.terminate(),it.URL.revokeObjectURL(s)})}};function Eje(t,e){t.getBase64GIF(function(n){e({error:!1,errorCode:"",errorMsg:"",image:n})})}function Sje(){const t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=t.callback,n=t.images,r=t.options;let i=t.imagesLength;const s={getUserMedia:!0,"globalThis.URL":!0},o=Oa.validate(s),a=[];let l=0,c,u;if(o.error)return e(o);u=new dR(r),it.each(n,function(d,m){const y=m;it.isElement(y)?(r.crossOrigin&&(y.crossOrigin=r.crossOrigin),a[d]=y,l+=1,l===i&&h()):it.isString(y)&&(c=new Image,r.crossOrigin&&(c.crossOrigin=r.crossOrigin),(function(v){m.text&&(v.text=m.text),v.onerror=function(b){let x;if(--i,i===0)return x={},x.error="None of the requested images was capable of being retrieved",e(x)},v.onload=function(b){m.text?a[d]={img:v,text:v.text}:a[d]=v,l+=1,l===i&&h(),it.removeElement(v)},v.src=y})(c),it.setCSSAttr(c,{position:"fixed",opacity:"0"}),Bo.body.appendChild(c))});function h(){it.each(a,function(d,m){m&&(m.text?u.addFrame(m.img,r,m.text):u.addFrame(m,r))}),Eje(u,e)}}const Tje=function(){},PO={getGIF:function(){const e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};let n=arguments[1];n=it.isFunction(n)?n:Tje;const r=Bo.createElement("canvas");let i;const o=!!e.images.length,a=e.cameraStream,l=e.crop,c=e.filter,u=e.fontColor,h=e.fontFamily,d=e.fontWeight,m=e.keepCameraOn;e.numWorkers;const y=e.progressCallback,v=e.saveRenderingContexts,b=e.savedRenderingContexts,x=e.text,T=e.textAlign,E=e.textBaseline,C=e.videoElement,I=e.videoHeight,O=e.videoWidth,N=e.webcamVideoElement,U=Number(e.gifWidth),F=Number(e.gifHeight);let H=Number(e.interval);Number(e.sampleInterval);const W=o?0:H*1e3,z=[];let V=b.length?b.length:e.numFrames,M=V;const K=new dR(e),j=it.getFontSize(e),q=e.textXCoordinate?e.textXCoordinate:T==="left"?1:T==="right"?U:U/2,Y=e.textYCoordinate?e.textYCoordinate:E==="top"?1:E==="center"?F/2:F,X=`${d} ${j} ${h}`;let te=l?Math.floor(l.scaledWidth/2):0,D=l?O-l.scaledWidth:0,$=l?Math.floor(l.scaledHeight/2):0,he=l?I-l.scaledHeight:0;const Se=function fe(){const $e=M-1;b.length?(i.putImageData(b[V-M],0,0),ce()):Ze();function Ze(){try{D>O&&(D=O),he>I&&(he=I),te<0&&(te=0),$<0&&($=0),i.filter=c,i.drawImage(C,te,$,D,he,0,0,U,F),ce()}catch(me){if(me.name==="NS_ERROR_NOT_AVAILABLE")it.requestTimeout(Ze,100);else throw me}}function ce(){let me;v&&z.push(i.getImageData(0,0,U,F)),x&&(i.font=X,i.fillStyle=u,i.textAlign=T,i.textBaseline=E,i.fillText(x,q,Y)),me=i.getImageData(0,0,U,F),K.addFrameImageData(me),M=$e,y((V-M)/V),$e>0&&it.requestTimeout(fe,W),M||K.getBase64GIF(function(de){n({error:!1,errorCode:"",errorMsg:"",image:de,cameraStream:a,videoElement:C,webcamVideoElement:N,savedRenderingContexts:z,keepCameraOn:m})})}};V=V!==void 0?V:10,H=H!==void 0?H:.1,r.width=U,r.height=F,i=r.getContext("2d"),(function fe(){if(!b.length&&C.currentTime===0){it.requestTimeout(fe,100);return}Se()})()},getCropDimensions:function(){const e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=e.videoWidth,r=e.videoHeight,i=e.gifWidth,s=e.gifHeight,o={width:0,height:0,scaledWidth:0,scaledHeight:0};return n>r?(o.width=Math.round(n*(s/r))-i,o.scaledWidth=Math.round(o.width*(r/s))):(o.height=Math.round(r*(i/n))-s,o.scaledHeight=Math.round(o.height*(n/i))),o}};var Ei={loadedData:!1,defaultVideoDimensions:{width:640,height:480},findVideoSize:function t(e){t.attempts=t.attempts||0;const n=e.cameraStream,r=e.completedCallback,i=e.videoElement;i&&(i.videoWidth>0&&i.videoHeight>0?(i.removeEventListener("loadeddata",Ei.findVideoSize),r({videoElement:i,
3572cameraStream:n,videoWidth:i.videoWidth,videoHeight:i.videoHeight})):t.attempts<10?(t.attempts+=1,it.requestTimeout(function(){Ei.findVideoSize(e)},400)):r({videoElement:i,cameraStream:n,videoWidth:Ei.defaultVideoDimensions.width,videoHeight:Ei.defaultVideoDimensions.height}))},onStreamingTimeout:function(e){it.isFunction(e)&&e({error:!0,errorCode:"getUserMedia",errorMsg:"There was an issue with the getUserMedia API - Timed out while trying to start streaming",image:null,cameraStream:{}})},stream:function(e){const n=it.isArray(e.existingVideo)?e.existingVideo[0]:e.existingVideo,r=e.cameraStream,i=e.completedCallback,s=e.streamedCallback,o=e.videoElement;if(it.isFunction(s)&&s(),n){if(it.isString(n))o.src=n,o.innerHTML=`<source src="${n}" type="video/${it.getExtension(n)}" />`;else if(n instanceof Blob){try{o.src=it.URL.createObjectURL(n)}catch{}o.innerHTML=`<source src="${n}" type="${n.type}" />`}}else if(o.mozSrcObject)o.mozSrcObject=r;else if(it.URL)try{o.srcObject=r,o.src=it.URL.createObjectURL(r)}catch{o.srcObject=r}o.play(),it.requestTimeout(function a(){a.count=a.count||0,Ei.loadedData===!0?(Ei.findVideoSize({videoElement:o,cameraStream:r,completedCallback:i}),Ei.loadedData=!1):(a.count+=1,a.count>10?Ei.findVideoSize({videoElement:o,cameraStream:r,completedCallback:i}):a())},0)},startStreaming:function(e){const n=it.isFunction(e.error)?e.error:it.noop,r=it.isFunction(e.streamed)?e.streamed:it.noop,i=it.isFunction(e.completed)?e.completed:it.noop,s=e.crossOrigin,o=e.existingVideo,a=e.lastCameraStream,l=e.options,c=e.webcamVideoElement,u=it.isElement(o)?o:c||Bo.createElement("video");s&&(u.crossOrigin=l.crossOrigin),u.autoplay=!0,u.loop=!0,u.muted=!0,u.addEventListener("loadeddata",function(h){Ei.loadedData=!0,l.offset&&(u.currentTime=l.offset)}),o?Ei.stream({videoElement:u,existingVideo:o,completedCallback:i}):a?Ei.stream({videoElement:u,cameraStream:a,streamedCallback:r,completedCallback:i}):it.getUserMedia({video:!0},function(h){Ei.stream({videoElement:u,cameraStream:h,streamedCallback:r,completedCallback:i})},n)},startVideoStreaming:function(e){const n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.timeout!==void 0?n.timeout:0,i=n.callback,s=n.webcamVideoElement;let o;r>0&&(o=it.requestTimeout(function(){Ei.onStreamingTimeout(i)},1e4)),Ei.startStreaming({error:function(){i({error:!0,errorCode:"getUserMedia",errorMsg:"There was an issue with the getUserMedia API - the user probably denied permission",image:null,cameraStream:{}})},streamed:function(){clearTimeout(o)},completed:function(){const l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},c=l.cameraStream,u=l.videoElement,h=l.videoHeight,d=l.videoWidth;e({cameraStream:c,videoElement:u,videoHeight:h,videoWidth:d})},lastCameraStream:n.lastCameraStream,webcamVideoElement:s,crossOrigin:n.crossOrigin,options:n})},stopVideoStreaming:function(e){e=it.isObject(e)?e:{};const n=e,r=n.keepCameraOn,i=n.videoElement,s=n.webcamVideoElement,o=e.cameraStream||{},a=o.getTracks?o.getTracks()||[]:[],l=!!a.length,c=a[0];!r&&l&&it.isFunction(c.stop)&&c.stop(),it.isElement(i)&&!s&&(i.pause(),it.isFunction(it.URL.revokeObjectURL)&&!it.webWorkerError&&i.src&&it.URL.revokeObjectURL(i.src),it.removeElement(i))}};function CG(t){t=it.isObject(t)?t:{},Ei.stopVideoStreaming(t)}function PG(t,e){const n=t.options||{},r=n.images,i=n.video,s=Number(n.gifWidth),o=Number(n.gifHeight);Number(n.numFrames);const a=t.cameraStream,l=t.videoElement,c=t.videoWidth,u=t.videoHeight,h=PO.getCropDimensions({videoWidth:c,videoHeight:u,gifHeight:o,gifWidth:s}),d=e;n.crop=h,n.videoElement=l,n.videoWidth=c,n.videoHeight=u,n.cameraStream=a,it.isElement(l)&&(l.width=s+h.width,l.height=o+h.height,n.webcamVideoElement||(it.setCSSAttr(l,{position:"fixed",opacity:"0"}),Bo.body.appendChild(l)),l.play(),PO.getGIF(n,function(m){(!r||!r.length)&&(!i||!i.length)&&CG(m),d(m)}))}function Cje(){const t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=t.callback;let n=t.existingVideo;const r=t.options,i={getUserMedia:!0,"globalThis.URL":!0},s=Oa.validate(i);let o,a;if(s.error)return e(s);if(it.isElement(n)&&n.src){if(a=n.src,o=it.getExtension(a),!it.isSupported.videoCodecs[o]
3572)return e(Oa.messages.videoCodecs)}else it.isArray(n)&&it.each(n,function(l,c){if(c instanceof Blob?o=c.type.substr(c.type.lastIndexOf("/")+1,c.length):o=c.substr(c.lastIndexOf(".")+1,c.length),it.isSupported.videoCodecs[o])return n=c,!1});Ei.startStreaming({completed:function(c){c.options=r||{},PG(c,e)},existingVideo:n,crossOrigin:r.crossOrigin,options:r})}function Pje(){const t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=t.callback,n=t.lastCameraStream,r=t.options,i=t.webcamVideoElement;if(!SG())return e(Oa.validate());if(r.savedRenderingContexts.length){PO.getGIF(r,function(s){e(s)});return}Ei.startVideoStreaming(function(){const s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};s.options=r||{},PG(s,e)},{lastCameraStream:n,callback:e,webcamVideoElement:i,crossOrigin:r.crossOrigin})}function IG(t,e){if(e=it.isFunction(t)?t:e,t=it.isObject(t)?t:{},!it.isFunction(e))return;let n=it.normalizeOptions(hR,t)||{};const r=t.cameraStream,i=n.images,s=i?i.length:0,o=n.video,a=n.webcamVideoElement;n=it.normalizeOptions(n,{gifWidth:Math.floor(n.gifWidth),gifHeight:Math.floor(n.gifHeight)}),s?Sje({images:i,imagesLength:s,callback:e,options:n}):o?Cje({existingVideo:o,callback:e,options:n}):Pje({lastCameraStream:r,callback:e,webcamVideoElement:a,options:n})}function Ije(t,e){if(e=it.isFunction(t)?t:e,t=it.isObject(t)?t:{},!it.isFunction(e))return;const n=it.normalizeOptions(hR,t),r=it.normalizeOptions(n,{interval:.1,numFrames:1,gifWidth:Math.floor(n.gifWidth),gifHeight:Math.floor(n.gifHeight)});IG(r,e)}const Oje={utils:vje,error:yje,defaultOptions:bje,createGIF:IG,takeSnapShot:Ije,stopVideoStreaming:CG,isSupported:_je,isWebCamGIFSupported:SG,isExistingVideoGIFSupported:xje,isExistingImagesGIFSupported:wje,VERSION:"0.4.5"},Mje={source:"images",width:200,height:200,crossOrigin:"Anonymous",progressCallback:t=>{},completeCallback:()=>{},numWorkers:2,sampleInterval:10,interval:.1,offset:null,numFrames:10,frameDuration:1,filter:"",waterMark:null,waterMarkHeight:null,waterMarkWidth:null,waterMarkXCoordinate:1,waterMarkYCoordinate:1,text:"",showFrameText:!0,fontWeight:"normal",fontSize:"16px",minFontSize:"10px",resizeFont:!1,fontFamily:"sans-serif",fontColor:"#ffffff",textAlign:"center",textBaseline:"bottom",textXCoordinate:null,textYCoordinate:null,webcamVideoElement:null,keepCameraOn:!1,cameraStream:null,saveRenderingContexts:!1,savedRenderingContexts:[]};class pR{static get properties(){return{id:"gif",name:"GIF",extensions:["gif"],mimeTypes:["image/gif"],builder:pR,options:Mje}}constructor(e){this.options={...e},this.source=e.source,delete e.source,this.files=[],this.gifshot=Oje}async initialize(e){}async add(e){await this.initialize(),this.files.push(e)}async build(){switch(await this.initialize(),this._cleanOptions(this.options),this.source){case"images":this.options.images=this.files;break;case"video":this.options.video=this.files;break;case"webcam":mje(this.files.length===0);break;default:throw new Error("GIFBuilder: invalid source")}return await this._createGIF()}async _createGIF(){return new Promise((e,n)=>{this.gifshot.createGIF(this.options,r=>{if(r.error){n(r.errorMsg);return}e(r.image)})})}_cleanOptions(e){(e.video||e.images||e.gifWidth||e.gifHeight)&&console.warn("GIFBuilder: ignoring options"),delete e.video,delete e.images,e.gifWidth=e.width,e.gifHeight=e.height,delete e.width,delete e.height}}function OG({show3DMap:t,toggle3DMap:e,windLayerType:n,setWindLayerType:r,resetAnimation:i,setIsPlaying:s,getCurrentPerimeter:o,animationCompleteRef:a,baseFrameDelay:l}){const[c,u]=A.useState(!1),[h,d]=A.useState(!1),[m,y]=A.useState(!1),[v,b]=A.useState(1),[x,T]=A.useState(1),[E,C]=A.useState("gif"),I=A.useRef(null),O=A.useRef([]),N=A.useRef(null),U=A.useRef(!1),F=l>=500?.5:l>=250?.25:.1,H=A.useCallback(()=>{if(!U.current)return;const K=document.getElementById("deckgl-overlay");if(!K)return;const j=document.createElement("canvas");j.width=K.width,j.height=K.height;const q=j.getContext("2d",{alpha:!1});if(!q)return;q.fillRect(0,0,j.width,j.height),q.drawImage(K,0,0);const Y=o();if(!(Y!=null&&Y.time))return;const X=Lo(Y.time,"yyyy-MM-dd HH:mm");q.font="64px sans-serif",q.fillStyle="white",q.strokeStyle="black",q.lineWidth=3,q.textAlign="right",q.textBaseline="top",q.strokeText(X,j.width-32,32),q.fillText(X,j.width-32,32),I.current&&I.current.addFrame(j),O.current.push(j)},[o]),W=A.useCallback(()=>{t||e(),n==="wind"&&r("grid"),a.current=!1,d(!0),i()},[t,e,n,r,a,i]),z=A.useCallback(()=>{N.current&&clearTimeout(N.current),d(!1),U.current=!0,u(!0),a.current=!1,I.current=E==="webm"?new gje({quality:.95,frameRate:1e3/l,transparent:!1,debug:!0}):null,O.current=[],i(),setTimeout(()=>s(!0),500)},[E,l,i,s,a]),V=A.useCallback(()=>
3572{if(!U.current){u(!1),d(!1),y(!1);return}N.current&&clearTimeout(N.current),U.current=!1,s(!1),y(!0),(async()=>{try{if(E==="webm"&&I.current){const j=await I.current.complete(),q=URL.createObjectURL(j);FV(q,"webm")}if(E==="gif"&&O.current.length>0){const[j]=O.current,q=.6,Y=Math.floor(j.width*q),X=Math.floor(j.height*q),te=new pR({source:"images",width:Y,height:X,sampleInterval:10,numFrames:O.current.length,interval:F});O.current.forEach(Se=>te.add(Se));const D=await te.build(),$=await(await fetch(D)).blob(),he=URL.createObjectURL($);FV(he,"gif")}}catch(j){console.error("Error exporting video:",j)}u(!1),d(!1),y(!1),O.current=[],I.current=null})()},[E,s,F]),M=A.useCallback(()=>{U.current?V():h?z():W()},[h,z,V,W]);return A.useEffect(()=>()=>{N.current&&clearTimeout(N.current)},[]),{isRecording:c,isPreparingToRecord:h,isExporting:m,videoFps:v,setVideoFps:b,speedMultiplier:x,setSpeedMultiplier:T,exportFormat:E,setExportFormat:C,isRecordingRef:U,captureFrame:H,handleExportVideo:M,stopRecording:V}}function FV(t,e){const n=Object.assign(document.createElement("a"),{href:t,download:`fire-animation-${Lo(new Date,"yyyy-MM-dd_HH-mm-ss")}.${e}`});document.body.appendChild(n),n.click(),setTimeout(()=>{document.body.removeChild(n),URL.revokeObjectURL(t)},100)}const MG=({exportFormat:t,setExportFormat:e,baseFrameDelay:n,setBaseFrameDelay:r,isMobile:i})=>Q.jsxs(Q.Fragment,{children:[!i&&Q.jsxs("div",{className:"display-flex flex-align-center flex-col margin-right-2",children:[Q.jsx("span",{className:"font-role-body font-weight-regular font-body-3xs color-base-ink margin-right-1",children:"Format"}),Q.jsxs("select",{className:"usa-select margin-top-0",value:t,onChange:s=>e(s.target.value),children:[Q.jsx("option",{value:"webm",children:"WebM"}),Q.jsx("option",{value:"gif",children:"GIF"})]})]}),Q.jsxs("div",{className:"display-flex flex-align-center flex-col",children:[Q.jsx("span",{className:"font-role-body font-weight-regular font-body-3xs color-base-ink margin-right-1",children:"Speed"}),Q.jsxs("select",{className:"usa-select margin-top-0",value:n,onChange:s=>r(Number(s.target.value)),children:[Q.jsx("option",{value:500,children:"1x"}),Q.jsx("option",{value:250,children:"2x"}),Q.jsx("option",{value:50,children:"3x"})]})]})]}),Rje=({isExporting:t,isRecording:e,isPreparingToRecord:n,handleExportVideo:r})=>Q.jsx("button",{style:{height:"40px"},className:`usa-button export-button font-body-3xs padding-1 ${t?"bg-base-lighter color-base font-italic":n?"preparing":e?"recording":""}`,onClick:r,disabled:t,children:t?Q.jsxs(Q.Fragment,{children:["Processing... ",Q.jsx(fA,{size:16,className:"spin margin-left-1"})]}):e?Q.jsxs(Q.Fragment,{children:["Stop Recording ",Q.jsx(uI,{size:16,className:"margin-left-1"})]}):n?Q.jsxs(Q.Fragment,{children:["Start Recording ",Q.jsx(UL,{size:16,className:"margin-left-1"})]}):Q.jsxs(Q.Fragment,{children:["Prepare Video ",Q.jsx(UL,{size:16,className:"margin-left-1"})]})}),RG=({isPlaying:t,togglePlayback:e,resetAnimation:n,isRecording:r,isPreparingToRecord:i,isMobile:s})=>s?Q.jsxs("div",{className:"display-flex flex-align-center width-full flex-justify-center",children:[Q.jsx("button",{className:"control-button padding-1",onClick:e,"aria-label":t?"Pause":"Play",disabled:r||i,children:t?Q.jsx(BL,{size:24}):Q.jsx(LL,{size:24})}),Q.jsx("button",{className:"control-button padding-1 margin-left-1",onClick:n,"aria-label":"Reset",disabled:r||i,children:Q.jsx(FL,{size:24})})]}):Q.jsxs("div",{className:"display-flex flex-align-center",children:[Q.jsx("button",{className:"control-button padding-1",onClick:e,"aria-label":t?"Pause":"Play",disabled:r||i,children:t?Q.jsx(BL,{size:12}):Q.jsx(LL,{size:16})}),Q.jsx("button",{className:"control-button padding-1 margin-left-1",onClick:n,"aria-label":"Reset",disabled:r||i,children:Q.jsx(FL,{size:16})})]}),kG=["Fire area (km²)","Mean FRP","Duration (days)"],kje=()=>{const t=Je.use.selectedEventId(),e=Je.use.firePerimeters(),n=Je.use.windLayerType(),r=Je.use.setWindLayerType(),i=Je.use.setTimeMarker(),s=Je.use.show3DMap(),o=Je.use.toggle3DMap(),[a,l]=A.useState(0),[c,u]=A.useState(null),[h,d]=A.useState(!1),[m,y]=A.useState([]),[v,b]=A.useState(500),[x,T]=A.useState(kG[0]),E=A.useRef(null),C=A.useRef(null),I=A.useRef(null),O=A.useRef(!1),N=()=>c,U=A.useCallback(()=>{O.current=!1,d(!1),l(m[0]||0)},[m]),{isRecording:F,isPreparingToRecord:H,isExporting:W,exportFormat:z,setExportFormat:V,speedMultiplier:M,captureFrame:K,handleExportVideo:j,stopRecording:q,isRecordingRef:Y}=OG({show3DMap:s,toggle3DMap:o,windLayerType:n,setWindLayerType:r,resetAnimation:U,setIsPlaying:d,getCurrentPerimeter:N,animationCompleteRef:O,baseFrameDelay:v}),{minDate:X,totalRange:te,perimeterData:D,timePoints:$,chartData:he}=A.useMemo(()=>
3572{if(!e||e.features.length===0)return{minDate:new Date,maxDate:new Date,totalRange:0,perimeterData:[],timePoints:[],chartData:[]};const ye=[...e.features].sort((k,ie)=>{const ne=new Date(k.properties.primarykey.split("|")[2]).getTime(),Z=new Date(ie.properties.primarykey.split("|")[2]).getTime();return ne-Z}).map(k=>{const ie=new Date(k.properties.primarykey.split("|")[2]);return{time:ie,timestamp:ie.getTime(),area:k.properties.farea||0,meanFrp:k.properties.meanfrp||0,duration:k.properties.duration||0,properties:k.properties}}),ve=ye.map(k=>({time:k.time,timestamp:k.timestamp})),ue=ye.map(k=>({...k,date:Lo(k.time,"MMM d, HH:mm"),name:Lo(k.time,"MMM d, yyyy HH:mm")}));return{minDate:ye[0].time,maxDate:ye[ye.length-1].time,totalRange:ye[ye.length-1].timestamp-ye[0].timestamp,perimeterData:ye,timePoints:ve,chartData:ue}},[e]);A.useEffect(()=>{if($.length){const de=$.map((ye,ve)=>ve/($.length-1)*100);y(de)}},[$]),A.useEffect(()=>{if(!D.length)return;l(0);const de=D[0];u(de),i(de.time)},[X,D]),A.useEffect(()=>{if(te===0||!D.length||!$.length||!m.length)return;let de=0,ye=1/0;m.forEach((ue,k)=>{const ie=Math.abs(ue-a);ie<ye&&(ye=ie,de=k)});const ve=D[de];(!c||ve.timestamp!==c.timestamp)&&u(ve),(!c||ve.time!==c.time)&&i(ve.time),Math.abs(a-m[de])>.1&&l(m[de])},[a,X,D,i,$,m,te,c]),A.useEffect(()=>{if(!h||!m.length)return;let de=0,ye=1/0;m.forEach((ie,ne)=>{const Z=Math.abs(a-ie);Z<ye&&(ye=Z,de=ne)});const ve=Math.min(de+1,m.length-1),ue=de===m.length-1,k=v/M;return I.current=setTimeout(()=>{if(ue){Y.current&&requestAnimationFrame(()=>{K(),q()}),O.current=!0,d(!1);return}Y.current&&requestAnimationFrame(K),l(m[ve])},k),()=>clearTimeout(I.current)},[h,a,m,$,K,q,Y,v,M]);const Se=A.useCallback(()=>{a>=100?(O.current=!1,l(m[0]||0),d(!0)):d(de=>!de)},[a,m]),fe=A.useCallback(()=>{switch(x){case"Fire area (km²)":return"area";case"Mean FRP":return"meanFrp";default:return"duration"}},[x]),$e=de=>de.toFixed(1),Ze=A.useCallback(({active:de,payload:ye})=>{if(!de||!(ye!=null&&ye.length))return null;const ve=ye[0].payload,ue=x==="Fire area (km²)"?`${ve.area.toFixed(2)} km²`:x==="Mean FRP"?ve.meanFrp.toFixed(2):`${ve.duration.toFixed(2)} days`;return Q.jsxs("div",{className:"bg-white padding-2 radius-md border-1px border-base-lighter shadow-1 z-top",children:[Q.jsx("p",{className:"text-bold",children:Lo(ve.time,"HH:mm MMM d, yyyy")}),Q.jsxs("p",{children:[x,": ",ue]})]})},[x]),ce=A.useMemo(()=>!he.length||!c?he:he.map(de=>({...de,isHighlighted:de.timestamp<=c.timestamp})),[he,c]),me=A.useMemo(()=>{if(!ce.length)return[];const de=Math.ceil(ce.length/8),ye=ce.filter((ue,k)=>k%de===0).map(ue=>ue.timestamp),ve=ce[ce.length-1].timestamp;return ye[ye.length-1]!==ve&&ye.push(ve),ye},[ce]);return t?Q.jsxs("div",{className:"detailed-time-chart bg-white radius-md padding-3 shadow-2 z-top",style:{width:"800px",height:"215px"},children:[Q.jsxs("div",{className:"display-flex flex-align-center flex-justify margin-bottom-2",children:[Q.jsx(Nje,{selectedYAxis:x,onChange:T}),Q.jsx(RG,{isPlaying:h,togglePlayback:Se,resetAnimation:U,isRecording:F,isPreparingToRecord:H}),Q.jsx(Rje,{isExporting:W,isRecording:F,isPreparingToRecord:H,handleExportVideo:j}),Q.jsx(MG,{exportFormat:z,setExportFormat:V,baseFrameDelay:v,setBaseFrameDelay:b})]}),Q.jsx("div",{className:"chart-container",ref:E,children:Q.jsx(pY,{width:"100%",height:113,children:Q.jsxs(EG,{data:ce,margin:{top:10,bottom:0,left:30},barGap:0,barCategoryGap:"0",barSize:20,children:[Q.jsx(fR,{strokeDasharray:"3 3"}),Q.jsx(Ly,{dataKey:"timestamp",type:"number",scale:"time",domain:["auto","auto"],ticks:me,tickFormatter:de=>{const ye=new Date(de),ve=ye.getHours();return ve===0||ve===12?Lo(ye,"HH:mm MMM d"):""},tick:{fontSize:10,fill:"#71767a",transform:"translate(0, 30px)"},tickLine:!1,axisLine:!1,padding:{left:10,right:10}}),Q.jsx(Fy,{dataKey:fe(),tickFormatter:$e,width:1,axisLine:!1,tickLine:!1,tick:{fontSize:12,fontFamily:"Source Sans Pro Web, Helvetica Neue, Helvetica, Roboto, Arial, sans-serif",fill:"#71767a"},className:"font-body-3xs color-base"}),Q.jsx(wa,{content:Ze,cursor:!1}),Q.jsx(yf,{dataKey:fe(),isAnimationActive:!1,shape:de=>{const{x:ye,y:ve,width:ue,height:k,payload:ie}=de;return ye==null||ve==null||ue==null||k==null?null:Q.jsx("rect",{x:ye,y:ve,width:ue,height:k,fill:ie.isHighlighted?"#1a6baa":"#DFE1E2",opacity:ie.isHighlighted?1:.5,rx:2,ry:2,style:{outline:"none",stroke:"none"}})}})]})})}),Q.jsx("div",{className:"slider-container",ref:C,children:Q.jsx(kg,{className:"time-slider",thumbClassName:"thumb",trackClassName:"track",value:a,onChange:de=>{d(!1),l(de)},min:0,max:100,marks:m.length>0,markClassName:"slider-mark",ariaLabel:"Fire perimeter time",disabled:F||H})})]}):null},Nje=({selectedYAxis:t,onChange:e})=>Q.jsxs("div",{className:"display-flex flex-align-center",children:[Q.jsx("span",{className:"margin-right-1 font-body-3xs font-weight-regular color-base-ink",children:"y-axis:"}),Q.jsx("select",{className:"usa-select margin-top-0",value:t,onChange:n=>e(n.target.value),children:kG.map(n=>Q.jsx("option",{value:n,children:n},n))})]});var L5,UV;function Dje(){if(UV)return L5;UV=1;const t=(l,c,u,h)=>
3572{if(u==="length"||u==="prototype"||u==="arguments"||u==="caller")return;const d=Object.getOwnPropertyDescriptor(l,u),m=Object.getOwnPropertyDescriptor(c,u);!e(d,m)&&h||Object.defineProperty(l,u,m)},e=function(l,c){return l===void 0||l.configurable||l.writable===c.writable&&l.enumerable===c.enumerable&&l.configurable===c.configurable&&(l.writable||l.value===c.value)},n=(l,c)=>{const u=Object.getPrototypeOf(c);u!==Object.getPrototypeOf(l)&&Object.setPrototypeOf(l,u)},r=(l,c)=>`/* Wrapped ${l}*/
3573${c}`,i=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),s=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),o=(l,c,u)=>{const h=u===""?"":`with ${u.trim()}() `,d=r.bind(null,h,c.toString());Object.defineProperty(d,"name",s),Object.defineProperty(l,"toString",{...i,value:d})};return L5=(l,c,{ignoreNonConfigurable:u=!1}={})=>{const{name:h}=l;for(const d of Reflect.ownKeys(c))t(l,c,d,u);return n(l,c),o(l,c,h),l},L5}var X1={exports:{}},F5,zV;function Bje(){return zV||(zV=1,F5=()=>{const t={};return t.promise=new Promise((e,n)=>{t.resolve=e,t.reject=n}),t}),F5}var s_=X1.exports,jV;function Lje(){return jV||(jV=1,(function(t,e){var n=s_&&s_.__awaiter||function(o,a,l,c){return new(l||(l=Promise))(function(u,h){function d(v){try{y(c.next(v))}catch(b){h(b)}}function m(v){try{y(c.throw(v))}catch(b){h(b)}}function y(v){v.done?u(v.value):new l(function(b){b(v.value)}).then(d,m)}y((c=c.apply(o,a||[])).next())})},r=s_&&s_.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(e,"__esModule",{value:!0});const i=r(Bje());function s(o,a="maxAge"){let l,c,u;const h=()=>n(this,void 0,void 0,function*(){if(l!==void 0)return;const y=v=>n(this,void 0,void 0,function*(){u=i.default();const b=v[1][a]-Date.now();if(b<=0){o.delete(v[0]),u.resolve();return}return l=v[0],c=setTimeout(()=>{o.delete(v[0]),u&&u.resolve()},b),typeof c.unref=="function"&&c.unref(),u.promise});try{for(const v of o)yield y(v)}catch{}l=void 0}),d=()=>{l=void 0,c!==void 0&&(clearTimeout(c),c=void 0),u!==void 0&&(u.reject(void 0),u=void 0)},m=o.set.bind(o);return o.set=(y,v)=>{o.has(y)&&o.delete(y);const b=m(y,v);return l&&l===y&&d(),h(),b},h(),o}e.default=s,t.exports=s,t.exports.default=s})(X1,X1.exports)),X1.exports}var U5,VV;function Fje(){if(VV)return U5;VV=1;const t=Dje(),e=Lje(),n=new WeakMap,r=new WeakMap,i=(s,{cacheKey:o,cache:a=new Map,maxAge:l}={})=>{typeof l=="number"&&e(a);const c=function(...u){const h=o?o(u):u[0],d=a.get(h);if(d)return d.data;const m=s.apply(this,u);return a.set(h,{data:m,maxAge:l?Date.now()+l:Number.POSITIVE_INFINITY}),m};return t(c,s,{ignoreNonConfigurable:!0}),r.set(c,a),c};return i.decorator=(s={})=>(o,a,l)=>{const c=o[a];if(typeof c!="function")throw new TypeError("The decorated value must be a function");delete l.value,delete l.writable,l.get=function(){if(!n.has(this)){const u=i(c,s);return n.set(this,u),u}return n.get(this)}},i.clear=s=>{const o=r.get(s);if(!o)throw new TypeError("Can't clear a function that was not memoized!");if(typeof o.clear!="function")throw new TypeError("The cache Map can't be cleared!");o.clear()},U5=i,U5}var Uje=Fje();const NG=fn(Uje);function zje(t){return typeof t=="string"}function jje(t,e,n){return n.indexOf(t)===e}function Vje(t){return t.toLowerCase()===t}function WV(t){return t.indexOf(",")===-1?t:t.split(",")}function IO(t){if(!t)return t;if(t==="C"||t==="posix"||t==="POSIX")return"en-US";if(t.indexOf(".")!==-1){var e=t.split(".")[0],n=e===void 0?"":e;return IO(n)}if(t.indexOf("@")!==-1){var r=t.split("@")[0],n=r===void 0?"":r;return IO(n)}if(t.indexOf("-")===-1||!Vje(t))return t;var i=t.split("-"),s=i[0],o=i[1],a=o===void 0?"":o;return"".concat(s,"-").concat(a.toUpperCase())}function Wje(t){var e=t===void 0?{}:t,n=e.useFallbackLocale,r=n===void 0?!0:n,i=e.fallbackLocale,s=i===void 0?"en-US":i,o=[];if(typeof navigator<"u"){for(var a=navigator.languages||[],l=[],c=0,u=a;c<u.length;c++){var h=u[c];l=l.concat(WV(h))}var d=navigator.language,m=d&&WV(d);o=o.concat(l,m)}return r&&o.push(s),o.filter(zje).map(IO).filter(jje)}var $je=NG(Wje,{cacheKey:JSON.stringify});function Hje(t){return $je(t)[0]||null}var DG=NG(Hje,{cacheKey:JSON.stringify});function Vc(t,e,n){return function(i,s){s===void 0&&(s=n);var o=t(i)+s;return e(o)}}function Uy(t){return function(n){return new Date(t(n).getTime()-1)}}function zy(t,e){return function(r){return[t(r),e(r)]}}function nr(t){if(t instanceof Date)return t.getFullYear();if(typeof t=="number")return t;var e=parseInt(t,10);if(typeof t=="string"&&!isNaN(e))return e;throw new Error("Failed to get year from date: ".concat(t,"."))}function bf(t){if(t instanceof Date)return t.getMonth();throw new Error("Failed to get month from date: ".concat(t,"."))}function WA(t){if(t instanceof Date)return t.getDate();throw new Error("Failed to get year from date: ".concat(t,"."))}function Wm(t){var e=nr(t),n=e+(-e+1)%100,r=new Date;return r.setFullYear(n,0,1),r.setHours(0,0,0,0),r}var qje=Vc(nr,Wm,-100),BG=Vc(nr,Wm,100),gR=Uy(BG),Qje=Vc(nr,gR,-100),LG=zy(Wm,gR);function _f(t){var e=nr(t),n=e+(-e+1)%10,r=new Date;return r.setFullYear(n,0,1),r.setHours(0,0,0,0),r}var FG=Vc(nr,_f,-10),mR=Vc(nr,_f,10),$A=Uy(mR),UG=Vc(nr,$A,-10),zG=zy(_f,$A);function $m(t){var e=nr(t),n=new Date;return n.setFullYear(e,0,1),n.setHours(0,0,0,0),n}var jG=Vc(nr,$m,-1),vR=Vc(nr,$m,1),HA=Uy(vR),VG=Vc(nr,HA,-1),Xje=zy($m,HA);function yR(t,e){return function(r,i){i===void 0&&(i=e);var s=nr(r),o=bf(r)+i,a=new Date;return a.setFullYear(s,o,1),a.setHours(0,0,0,0),t(a)}}function Ed(t){var e=nr(t),n=bf(t),r=new Date;return r.setFullYear(e,n,1),r.setHours(0,0,0,0),r}var WG=yR(Ed,-1),bR=yR(Ed,1),jy=Uy(bR),$G=yR(jy,-1),Yje=zy(Ed,jy);function Kje(t,e){return function(r,i){i===void 0&&(i=e);var s=nr(r),o=bf(r),a=WA(r)+i,l=new Date;return l.setFullYear(s,o,a),l.setHours(0,0,0,0),t(l)}}function Vy(t){var e=nr(t),n=bf(t),r=WA(t),i=new Date;return i.setFullYear(e,n,r),i.setHours(0,0,0,0),i}var Gje=Kje(Vy,1),_R=Uy(Gje),Zje=zy(Vy,_R);function HG(t){return WA(jy(t))}var Ci={GREGORY:"gregory",HEBREW:"hebrew",ISLAMIC:"islamic",ISO_8601:"iso8601"},Jje={gregory:["en-CA","en-US","es-AR","es-BO","es-CL","es-CO","es-CR","es-DO","es-EC","es-GT","es-HN","es-MX","es-NI","es-PA","es-PE","es-PR","es-SV","es-VE","pt-B
3573R"],hebrew:["he","he-IL"],islamic:["ar","ar-AE","ar-BH","ar-DZ","ar-EG","ar-IQ","ar-JO","ar-KW","ar-LY","ar-OM","ar-QA","ar-SA","ar-SD","ar-SY","ar-YE","dv","dv-MV","ps","ps-AR"]},wR=[0,1,2,3,4,5,6],z5=new Map;function eVe(t){return function(n,r){var i=n||DG();z5.has(i)||z5.set(i,new Map);var s=z5.get(i);return s.has(t)||s.set(t,new Intl.DateTimeFormat(i||void 0,t).format),s.get(t)(r)}}function tVe(t){var e=new Date(t);return new Date(e.setHours(12))}function Sd(t){return function(e,n){return eVe(t)(e,tVe(n))}}var nVe={day:"numeric"},rVe={day:"numeric",month:"long",year:"numeric"},iVe={month:"long"},sVe={month:"long",year:"numeric"},oVe={weekday:"short"},aVe={weekday:"long"},lVe={year:"numeric"},cVe=Sd(nVe),uVe=Sd(rVe),fVe=Sd(iVe),qG=Sd(sVe),hVe=Sd(oVe),dVe=Sd(aVe),qA=Sd(lVe),pVe=wR[0],gVe=wR[5],$V=wR[6];function hy(t,e){e===void 0&&(e=Ci.ISO_8601);var n=t.getDay();switch(e){case Ci.ISO_8601:return(n+6)%7;case Ci.ISLAMIC:return(n+1)%7;case Ci.HEBREW:case Ci.GREGORY:return n;default:throw new Error("Unsupported calendar type.")}}function mVe(t){var e=Wm(t);return nr(e)}function vVe(t){var e=_f(t);return nr(e)}function OO(t,e){e===void 0&&(e=Ci.ISO_8601);var n=nr(t),r=bf(t),i=t.getDate()-hy(t,e);return new Date(n,r,i)}function yVe(t,e){e===void 0&&(e=Ci.ISO_8601);var n=e===Ci.GREGORY?Ci.GREGORY:Ci.ISO_8601,r=OO(t,e),i=nr(t)+1,s,o;do s=new Date(i,0,n===Ci.ISO_8601?4:1),o=OO(s,e),i-=1;while(t<o);return Math.round((r.getTime()-o.getTime())/(864e5*7))+1}function Xh(t,e){switch(t){case"century":return Wm(e);case"decade":return _f(e);case"year":return $m(e);case"month":return Ed(e);case"day":return Vy(e);default:throw new Error("Invalid rangeType: ".concat(t))}}function bVe(t,e){switch(t){case"century":return qje(e);case"decade":return FG(e);case"year":return jG(e);case"month":return WG(e);default:throw new Error("Invalid rangeType: ".concat(t))}}function QG(t,e){switch(t){case"century":return BG(e);case"decade":return mR(e);case"year":return vR(e);case"month":return bR(e);default:throw new Error("Invalid rangeType: ".concat(t))}}function _Ve(t,e){switch(t){case"decade":return FG(e,-100);case"year":return jG(e,-10);case"month":return WG(e,-12);default:throw new Error("Invalid rangeType: ".concat(t))}}function wVe(t,e){switch(t){case"decade":return mR(e,100);case"year":return vR(e,10);case"month":return bR(e,12);default:throw new Error("Invalid rangeType: ".concat(t))}}function XG(t,e){switch(t){case"century":return gR(e);case"decade":return $A(e);case"year":return HA(e);case"month":return jy(e);case"day":return _R(e);default:throw new Error("Invalid rangeType: ".concat(t))}}function xVe(t,e){switch(t){case"century":return Qje(e);case"decade":return UG(e);case"year":return VG(e);case"month":return $G(e);default:throw new Error("Invalid rangeType: ".concat(t))}}function AVe(t,e){switch(t){case"decade":return UG(e,-100);case"year":return VG(e,-10);case"month":return $G(e,-12);default:throw new Error("Invalid rangeType: ".concat(t))}}function HV(t,e){switch(t){case"century":return LG(e);case"decade":return zG(e);case"year":return Xje(e);case"month":return Yje(e);case"day":return Zje(e);default:throw new Error("Invalid rangeType: ".concat(t))}}function EVe(t,e,n){var r=[e,n].sort(function(i,s){return i.getTime()-s.getTime()});
3573return[Xh(t,r[0]),XG(t,r[1])]}function YG(t,e,n){return n.map(function(r){return(e||qA)(t,r)}).join(" – ")}function SVe(t,e,n){return YG(t,e,LG(n))}function KG(t,e,n){return YG(t,e,zG(n))}function TVe(t){return t.getDay()===new Date().getDay()}function GG(t,e){e===void 0&&(e=Ci.ISO_8601);var n=t.getDay();switch(e){case Ci.ISLAMIC:case Ci.HEBREW:return n===gVe||n===$V;case Ci.ISO_8601:case Ci.GREGORY:return n===$V||n===pVe;default:throw new Error("Unsupported calendar type.")}}var dl="react-calendar__navigation";function CVe(t){var e=t.activeStartDate,n=t.drillUp,r=t.formatMonthYear,i=r===void 0?qG:r,s=t.formatYear,o=s===void 0?qA:s,a=t.locale,l=t.maxDate,c=t.minDate,u=t.navigationAriaLabel,h=u===void 0?"":u,d=t.navigationAriaLive,m=t.navigationLabel,y=t.next2AriaLabel,v=y===void 0?"":y,b=t.next2Label,x=b===void 0?"»":b,T=t.nextAriaLabel,E=T===void 0?"":T,C=t.nextLabel,I=C===void 0?"›":C,O=t.prev2AriaLabel,N=O===void 0?"":O,U=t.prev2Label,F=U===void 0?"«":U,H=t.prevAriaLabel,W=H===void 0?"":H,z=t.prevLabel,V=z===void 0?"‹":z,M=t.setActiveStartDate,K=t.showDoubleView,j=t.view,q=t.views,Y=q.indexOf(j)>0,X=j!=="century",te=bVe(j,e),D=X?_Ve(j,e):void 0,$=QG(j,e),he=X?wVe(j,e):void 0,Se=(function(){if(te.getFullYear()<0)return!0;var k=xVe(j,e);return c&&c>=k})(),fe=X&&(function(){if(D.getFullYear()<0)return!0;var k=AVe(j,e);return c&&c>=k})(),$e=l&&l<$,Ze=X&&l&&l<he;function ce(){M(te,"prev")}function me(){M(D,"prev2")}function de(){M($,"next")}function ye(){M(he,"next2")}function ve(k){var ie=(function(){switch(j){case"century":return SVe(a,o,k);case"decade":return KG(a,o,k);case"year":return o(a,k);case"month":return i(a,k);default:throw new Error("Invalid view: ".concat(j,"."))}})();return m?m({date:k,label:ie,locale:a||DG()||void 0,view:j}):ie}function ue(){var k="".concat(dl,"__label");return Q.jsxs("button",{"aria-label":h,"aria-live":d,className:k,disabled:!Y,onClick:n,style:{flexGrow:1},type:"button",children:[Q.jsx("span",{className:"".concat(k,"__labelText ").concat(k,"__labelText--from"),children:ve(e)}),K?Q.jsxs(Q.Fragment,{children:[Q.jsx("span",{className:"".concat(k,"__divider"),children:" – "}),Q.jsx("span",{className:"".concat(k,"__labelText ").concat(k,"__labelText--to"),children:ve($)})]}):null]})}return Q.jsxs("div",{className:dl,children:[F!==null&&X?Q.jsx("button",{"aria-label":N,className:"".concat(dl,"__arrow ").concat(dl,"__prev2-button"),disabled:fe,onClick:me,type:"button",children:F}):null,V!==null&&Q.jsx("button",{"aria-label":W,className:"".concat(dl,"__arrow ").concat(dl,"__prev-button"),disabled:Se,onClick:ce,type:"button",children:V}),ue(),I!==null&&Q.jsx("button",{"aria-label":E,className:"".concat(dl,"__arrow ").concat(dl,"__next-button"),disabled:$e,onClick:de,type:"button",children:I}),x!==null&&X?Q.jsx("button",{"aria-label":v,className:"".concat(dl,"__arrow ").concat(dl,"__next2-button"),disabled:Ze,onClick:ye,type:"button",children:x}):null]})}var Pg=function(){return Pg=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Pg.apply(this,arguments)},PVe=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function qV(t){return"".concat(t,"%")}function xR(t){var e=t.children,n=t.className,r=t.count,i=t.direction,s=t.offset,o=t.style,a=t.wrap,l=PVe(t,["children","className","count","direction","offset","style","wrap"]);return Q.jsx("div",Pg({className:n,style:Pg({display:"flex",flexDirection:i,flexWrap:a?"wrap":"nowrap"},o)},l,{children:A.Children.map(e,function(c,u){var h=s&&u===0?qV(100*s/r):null;return A.cloneElement(c,Pg(Pg({},c.props),{style:{flexBasis:qV(100/r),flexShrink:0,flexGrow:0,overflow:"hidden",marginLeft:h,marginInlineStart:h,marginInlineEnd:0}}))})}))}function IVe(t,e,n){return e&&e>t?e:n&&n<t?n:t}function dy(t,e){return e[0]<=t&&e[1]>=t}function OVe(t,e){return t[0]<=e[0]&&t[1]>=e[1]}function ZG(t,e){return dy(t[0],e)||dy(t[1],e)}function QV(t,e,n){var r=ZG(e,t),i=[];if(r){i.push(n);var s=dy(t[0],e),o=dy(t[1],e);s&&i.push("".concat(n,"Start")),o&&i.push("".concat(n,"End")),s&&o&&i.push("".concat(n,"BothEnds"))}return i}function MVe(t){return Array.isArray(t)?t[0]!==null&&t[1]!==null:t!==null}function RVe(t){if(!t)throw new Error("args is required");var e=t.value,n=t.date,r=t.hover,i="react-calendar__tile",s=[i];if(!n)return s;var o=new Date,a=(function(){if(Array.isArray(n))return n;var m=t.dateType;if(!m)throw new Error("dateType is required when date is not an array of two dates");return HV(m,n)})();if(dy(o,a)&&s.push("".concat(i,"--now")),!e||!MVe(e))return s;var l=(function(){if(Array.isArray(e))return e;var m=t.valueType;if(!m)throw new Error("valueType is required when value is not an array of two dates");return HV(m,e)})();OVe(l,a)?s.push("".concat(i,"--active")):ZG(l,a)&&s.push("".concat(i,"--hasActive"));var c=QV(l,a,"".concat(i,"--range"));s.push.apply(s,c);var u=Array.isArray(e)?e:[e];if(r&&u.length===1){var h=r>l[0]?[l[0],r]:[r,l[0]],d=QV(h,a,"".concat(i,"--hover"));s.push.apply(s,d)}return s}function QA(t){for(var e=t.className,n=t.count,r=n===void 0?3:n,i=t.dateTransform,s=t.dateType,o=t.end,a=t.hover,l=t.offset,c=t.renderTile,u=t.start,h=t.step,d=h===void 0?1:h,m=t.value,y=t.valueType,v=[],b=u;b<=o;b+=d){var x=i(b);v.push(c({classes:RVe({date:x,dateType:s,hover:a,value:m,valueType:y}),date:x}))}return Q.jsx(xR,{className:e,count:r,offset:l,wrap:!0,children:v})}function XA(t){var e=t.activeStartDate,n=t.children,r=t.classes,i=t.date,
3573s=t.formatAbbr,o=t.locale,a=t.maxDate,l=t.maxDateTransform,c=t.minDate,u=t.minDateTransform,h=t.onClick,d=t.onMouseOver,m=t.style,y=t.tileClassName,v=t.tileContent,b=t.tileDisabled,x=t.view,T=A.useMemo(function(){var C={activeStartDate:e,date:i,view:x};return typeof y=="function"?y(C):y},[e,i,y,x]),E=A.useMemo(function(){var C={activeStartDate:e,date:i,view:x};return typeof v=="function"?v(C):v},[e,i,v,x]);return Q.jsxs("button",{className:un(r,T),disabled:c&&u(c)>i||a&&l(a)<i||(b==null?void 0:b({activeStartDate:e,date:i,view:x})),onClick:h?function(C){return h(i,C)}:void 0,onFocus:d?function(){return d(i)}:void 0,onMouseOver:d?function(){return d(i)}:void 0,style:m,type:"button",children:[s?Q.jsx("abbr",{"aria-label":s(o,i),children:n}):n,E]})}var MO=function(){return MO=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},MO.apply(this,arguments)},kVe=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n},XV="react-calendar__century-view__decades__decade";function NVe(t){var e=t.classes,n=e===void 0?[]:e,r=t.currentCentury,i=t.formatYear,s=i===void 0?qA:i,o=kVe(t,["classes","currentCentury","formatYear"]),a=o.date,l=o.locale,c=[];return n&&c.push.apply(c,n),c.push(XV),Wm(a).getFullYear()!==r&&c.push("".concat(XV,"--neighboringCentury")),Q.jsx(XA,MO({},o,{classes:c,maxDateTransform:$A,minDateTransform:_f,view:"century",children:KG(l,s,a)}))}var RO=function(){return RO=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},RO.apply(this,arguments)},YV=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function DVe(t){var e=t.activeStartDate,n=t.hover,r=t.showNeighboringCentury,i=t.value,s=t.valueType,o=YV(t,["activeStartDate","hover","showNeighboringCentury","value","valueType"]),a=mVe(e),l=a+(r?119:99);return Q.jsx(QA,{className:"react-calendar__century-view__decades",dateTransform:_f,dateType:"decade",end:l,hover:n,renderTile:function(c){var u=c.date,h=YV(c,["date"]);return Q.jsx(NVe,RO({},o,h,{activeStartDate:e,currentCentury:a,date:u}),u.getTime())},start:a,step:10,value:i,valueType:s})}var kO=function(){return kO=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},kO.apply(this,arguments)};function BVe(t){function e(){return Q.jsx(DVe,kO({},t))}return Q.jsx("div",{className:"react-calendar__century-view",children:e()})}var NO=function(){return NO=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},NO.apply(this,arguments)},LVe=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n},KV="react-calendar__decade-view__years__year";function FVe(t){var e=t.classes,n=e===void 0?[]:e,r=t.currentDecade,i=t.formatYear,s=i===void 0?qA:i,o=LVe(t,["classes","currentDecade","formatYear"]),a=o.date,l=o.locale,c=[];return n&&c.push.apply(c,n),c.push(KV),_f(a).getFullYear()!==r&&c.push("".concat(KV,"--neighboringDecade")),Q.jsx(XA,NO({},o,{classes:c,maxDateTransform:HA,minDateTransform:$m,view:"decade",children:s(l,a)}))}var DO=function(){return DO=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},DO.apply(this,arguments)},GV=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function UVe(t){var e=t.activeStartDate,n=t.hover,r=t.showNeighboringDecade,i=t.value,s=t.valueType,o=GV(t,["activeStartDate","hover","showNeighboringDecade","value","valueType"]),a=vVe(e),l=a+(r?11:9);return Q.jsx(QA,{className:"react-calendar__decade-view__years",dateTransform:$m,dateType:"year",end:l,hover:n,renderTile:function(c){var u=c.date,h=GV(c,["date"]);
3573return Q.jsx(FVe,DO({},o,h,{activeStartDate:e,currentDecade:a,date:u}),u.getTime())},start:a,value:i,valueType:s})}var BO=function(){return BO=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},BO.apply(this,arguments)};function zVe(t){function e(){return Q.jsx(UVe,BO({},t))}return Q.jsx("div",{className:"react-calendar__decade-view",children:e()})}var LO=function(){return LO=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},LO.apply(this,arguments)},jVe=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n},ZV=function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,s;r<i;r++)(s||!(r in e))&&(s||(s=Array.prototype.slice.call(e,0,r)),s[r]=e[r]);return t.concat(s||Array.prototype.slice.call(e))},VVe="react-calendar__year-view__months__month";function WVe(t){var e=t.classes,n=e===void 0?[]:e,r=t.formatMonth,i=r===void 0?fVe:r,s=t.formatMonthYear,o=s===void 0?qG:s,a=jVe(t,["classes","formatMonth","formatMonthYear"]),l=a.date,c=a.locale;return Q.jsx(XA,LO({},a,{classes:ZV(ZV([],n,!0),[VVe],!1),formatAbbr:o,maxDateTransform:jy,minDateTransform:Ed,view:"year",children:i(c,l)}))}var FO=function(){return FO=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},FO.apply(this,arguments)},JV=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function $Ve(t){var e=t.activeStartDate,n=t.hover,r=t.value,i=t.valueType,s=JV(t,["activeStartDate","hover","value","valueType"]),o=0,a=11,l=nr(e);return Q.jsx(QA,{className:"react-calendar__year-view__months",dateTransform:function(c){var u=new Date;return u.setFullYear(l,c,1),Ed(u)},dateType:"month",end:a,hover:n,renderTile:function(c){var u=c.date,h=JV(c,["date"]);return Q.jsx(WVe,FO({},s,h,{activeStartDate:e,date:u}),u.getTime())},start:o,value:r,valueType:i})}var UO=function(){return UO=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},UO.apply(this,arguments)};function HVe(t){function e(){return Q.jsx($Ve,UO({},t))}return Q.jsx("div",{className:"react-calendar__year-view",children:e()})}var zO=function(){return zO=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},zO.apply(this,arguments)},qVe=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n},j5="react-calendar__month-view__days__day";function QVe(t){var e=t.calendarType,n=t.classes,r=n===void 0?[]:n,i=t.currentMonthIndex,s=t.formatDay,o=s===void 0?cVe:s,a=t.formatLongDate,l=a===void 0?uVe:a,c=qVe(t,["calendarType","classes","currentMonthIndex","formatDay","formatLongDate"]),u=c.date,h=c.locale,d=[];return r&&d.push.apply(d,r),d.push(j5),GG(u,e)&&d.push("".concat(j5,"--weekend")),u.getMonth()!==i&&d.push("".concat(j5,"--neighboringMonth")),Q.jsx(XA,zO({},c,{classes:d,formatAbbr:l,maxDateTransform:_R,minDateTransform:Vy,view:"month",children:o(h,u)}))}var jO=function(){return jO=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},jO.apply(this,arguments)},eW=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function XVe(t){var e=t.activeStartDate,n=t.calendarType,r=t.hover,i=t.showFixedNumberOfWeeks,s=t.showNeighboringMonth,o=t.value,a=t.valueType,l=eW(t,["activeStartDate","calendarType","hover","showFixedNumberOfWeeks","
3573showNeighboringMonth","value","valueType"]),c=nr(e),u=bf(e),h=i||s,d=hy(e,n),m=h?0:d,y=(h?-d:0)+1,v=(function(){if(i)return y+42-1;var b=HG(e);if(s){var x=new Date;x.setFullYear(c,u,b),x.setHours(0,0,0,0);var T=7-hy(x,n)-1;return b+T}return b})();return Q.jsx(QA,{className:"react-calendar__month-view__days",count:7,dateTransform:function(b){var x=new Date;return x.setFullYear(c,u,b),Vy(x)},dateType:"day",hover:r,end:v,renderTile:function(b){var x=b.date,T=eW(b,["date"]);return Q.jsx(QVe,jO({},l,T,{activeStartDate:e,calendarType:n,currentMonthIndex:u,date:x}),x.getTime())},offset:m,start:y,value:o,valueType:a})}var JG="react-calendar__month-view__weekdays",V5="".concat(JG,"__weekday");function YVe(t){for(var e=t.calendarType,n=t.formatShortWeekday,r=n===void 0?hVe:n,i=t.formatWeekday,s=i===void 0?dVe:i,o=t.locale,a=t.onMouseLeave,l=new Date,c=Ed(l),u=nr(c),h=bf(c),d=[],m=1;m<=7;m+=1){var y=new Date(u,h,m-hy(c,e)),v=s(o,y);d.push(Q.jsx("div",{className:un(V5,TVe(y)&&"".concat(V5,"--current"),GG(y,e)&&"".concat(V5,"--weekend")),children:Q.jsx("abbr",{"aria-label":v,title:v,children:r(o,y).replace(".","")})},m))}return Q.jsx(xR,{className:JG,count:7,onFocus:a,onMouseOver:a,children:d})}var Tx=function(){return Tx=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Tx.apply(this,arguments)},tW=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n},nW="react-calendar__tile";function KVe(t){var e=t.onClickWeekNumber,n=t.weekNumber,r=Q.jsx("span",{children:n});if(e){var i=t.date,s=t.onClickWeekNumber,o=t.weekNumber,a=tW(t,["date","onClickWeekNumber","weekNumber"]);return Q.jsx("button",Tx({},a,{className:nW,onClick:function(l){return s(o,i,l)},type:"button",children:r}))}else{t.date,t.onClickWeekNumber,t.weekNumber;var a=tW(t,["date","onClickWeekNumber","weekNumber"]);return Q.jsx("div",Tx({},a,{className:nW,children:r}))}}function GVe(t){var e=t.activeStartDate,n=t.calendarType,r=t.onClickWeekNumber,i=t.onMouseLeave,s=t.showFixedNumberOfWeeks,o=(function(){if(s)return 6;var c=HG(e),u=hy(e,n),h=c-(7-u);return 1+Math.ceil(h/7)})(),a=(function(){for(var c=nr(e),u=bf(e),h=WA(e),d=[],m=0;m<o;m+=1)d.push(OO(new Date(c,u,h+m*7),n));return d})(),l=a.map(function(c){return yVe(c,n)});return Q.jsx(xR,{className:"react-calendar__month-view__weekNumbers",count:o,direction:"column",onFocus:i,onMouseOver:i,style:{flexBasis:"calc(100% * (1 / 8)",flexShrink:0},children:l.map(function(c,u){var h=a[u];if(!h)throw new Error("date is not defined");return Q.jsx(KVe,{date:h,onClickWeekNumber:r,weekNumber:c},c)})})}var VO=function(){return VO=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},VO.apply(this,arguments)},ZVe=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function JVe(t){if(t)for(var e=0,n=Object.entries(Jje);e<n.length;e++){var r=n[e],i=r[0],s=r[1];if(s.includes(t))return i}return Ci.ISO_8601}function eWe(t){var e=t.activeStartDate,n=t.locale,r=t.onMouseLeave,i=t.showFixedNumberOfWeeks,s=t.calendarType,o=s===void 0?JVe(n):s,a=t.formatShortWeekday,l=t.formatWeekday,c=t.onClickWeekNumber,u=t.showWeekNumbers,h=ZVe(t,["calendarType","formatShortWeekday","formatWeekday","onClickWeekNumber","showWeekNumbers"]);function d(){return Q.jsx(YVe,{calendarType:o,formatShortWeekday:a,formatWeekday:l,locale:n,onMouseLeave:r})}function m(){return u?Q.jsx(GVe,{activeStartDate:e,calendarType:
3573o,onClickWeekNumber:c,onMouseLeave:r,showFixedNumberOfWeeks:i}):null}function y(){return Q.jsx(XVe,VO({calendarType:o},h))}var v="react-calendar__month-view";return Q.jsx("div",{className:un(v,u?"".concat(v,"--weekNumbers"):""),children:Q.jsxs("div",{style:{display:"flex",alignItems:"flex-end"},children:[m(),Q.jsxs("div",{style:{flexGrow:1,width:"100%"},children:[d(),y()]})]})})}var Ig=function(){return Ig=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Ig.apply(this,arguments)},o_="react-calendar",R_=["century","decade","year","month"],tWe=["decade","year","month","day"],AR=new Date;AR.setFullYear(1,0,1);AR.setHours(0,0,0,0);var nWe=new Date(864e13);function Y1(t){return t instanceof Date?t:new Date(t)}function eZ(t,e){return R_.slice(R_.indexOf(t),R_.indexOf(e)+1)}function rWe(t,e,n){var r=eZ(e,n);return r.indexOf(t)!==-1}function ER(t,e,n){return t&&rWe(t,e,n)?t:n}function tZ(t){var e=R_.indexOf(t);return tWe[e]}function iWe(t,e){var n=Array.isArray(t)?t[e]:t;if(!n)return null;var r=Y1(n);if(Number.isNaN(r.getTime()))throw new Error("Invalid date: ".concat(t));return r}function nZ(t,e){var n=t.value,r=t.minDate,i=t.maxDate,s=t.maxDetail,o=iWe(n,e);if(!o)return null;var a=tZ(s),l=(function(){switch(e){case 0:return Xh(a,o);case 1:return XG(a,o);default:throw new Error("Invalid index value: ".concat(e))}})();return IVe(l,r,i)}var SR=function(t){return nZ(t,0)},rZ=function(t){return nZ(t,1)},sWe=function(t){return[SR,rZ].map(function(e){return e(t)})};function iZ(t){var e=t.maxDate,n=t.maxDetail,r=t.minDate,i=t.minDetail,s=t.value,o=t.view,a=ER(o,i,n),l=SR({value:s,minDate:r,maxDate:e,maxDetail:n})||new Date;return Xh(a,l)}function oWe(t){var e=t.activeStartDate,n=t.defaultActiveStartDate,r=t.defaultValue,i=t.defaultView,s=t.maxDate,o=t.maxDetail,a=t.minDate,l=t.minDetail,c=t.value,u=t.view,h=ER(u,l,o),d=e||n;return d?Xh(h,d):iZ({maxDate:s,maxDetail:o,minDate:a,minDetail:l,value:c||r,view:u||i})}function W5(t){return t&&(!Array.isArray(t)||t.length===1)}function a_(t,e){return t instanceof Date&&e instanceof Date&&t.getTime()===e.getTime()}var aWe=A.forwardRef(function(e,n){var r=e.activeStartDate,i=e.allowPartialRange,s=e.calendarType,o=e.className,a=e.defaultActiveStartDate,l=e.defaultValue,c=e.defaultView,u=e.formatDay,h=e.formatLongDate,d=e.formatMonth,m=e.formatMonthYear,y=e.formatShortWeekday,v=e.formatWeekday,b=e.formatYear,x=e.goToRangeStartOnSelect,T=x===void 0?!0:x,E=e.inputRef,C=e.locale,I=e.maxDate,O=I===void 0?nWe:I,N=e.maxDetail,U=N===void 0?"month":N,F=e.minDate,H=F===void 0?AR:F,W=e.minDetail,z=W===void 0?"century":W,V=e.navigationAriaLabel,M=e.navigationAriaLive,K=e.navigationLabel,j=e.next2AriaLabel,q=e.next2Label,Y=e.nextAriaLabel,X=e.nextLabel,te=e.onActiveStartDateChange,D=e.onChange,$=e.onClickDay,he=e.onClickDecade,Se=e.onClickMonth,fe=e.onClickWeekNumber,$e=e.onClickYear,Ze=e.onDrillDown,ce=e.onDrillUp,me=e.onViewChange,de=e.prev2AriaLabel,ye=e.prev2Label,ve=e.prevAriaLabel,ue=e.prevLabel,k=e.returnValue,ie=k===void 0?"start":k,ne=e.selectRange,Z=e.showDoubleView,J=e.showFixedNumberOfWeeks,le=e.showNavigation,pe=le===void 0?!0:le,Te=e.showNeighboringCentury,we=e.showNeighboringDecade,Qe=e.showNeighboringMonth,nt=Qe===void 0?!0:Qe,Xe=e.showWeekNumbers,ft=e.tileClassName,It=e.tileContent,gt=e.tileDisabled,Yt=e.value,en=e.view,_t=A.useState(a),Mt=_t[0],ht=_t[1],$t=A.useState(null),Zn=$t[0],on=$t[1],Ut=A.useState(Array.isArray(l)?l.map(function(Ht){return Ht!==null?Y1(Ht):null}):l!=null?Y1(l):null),Ct=Ut[0],rr=Ut[1],di=A.useState(c),Sr=di[0],yr=di[1],Dn=r||Mt||oWe({activeStartDate:r,defaultActiveStartDate:a,defaultValue:l,defaultView:c,maxDate:O,maxDetail:U,minDate:H,minDetail:z,value:Yt,view:en}),cr=(function(){var Ht=(function(){return ne&&W5(Ct)?Ct:Yt!==void 0?Yt:Ct})();return Ht?Array.isArray(Ht)?Ht.map(function(gn){return gn!==null?Y1(gn):null}):Ht!==null?Y1(Ht):null:null})(),lo=tZ(U),vn=ER(en||Sr,z,U),Br=eZ(z,U),Da=ne?Zn:null,Ho=Br.indexOf(vn)<Br.length-1,pi=Br.indexOf(vn)>0,Bs=A.useCallback(function(Ht){var gn=(function(){switch(ie){case"start":return SR;case"end":return rZ;case"range":return sWe;default:throw new Error("Invalid returnValue.")}})();return gn({maxDate:O,maxDetail:U,minDate:H,value:Ht})}
3573,[O,U,H,ie]),ur=A.useCallback(function(Ht,gn){ht(Ht);var Bn={action:gn,activeStartDate:Ht,value:cr,view:vn};te&&!a_(Dn,Ht)&&te(Bn)},[Dn,te,cr,vn]),Ls=A.useCallback(function(Ht,gn){var Bn=(function(){switch(vn){case"century":return he;case"decade":return $e;case"year":return Se;case"month":return $;default:throw new Error("Invalid view: ".concat(vn,"."))}})();Bn&&Bn(Ht,gn)},[$,he,Se,$e,vn]),ds=A.useCallback(function(Ht,gn){if(Ho){Ls(Ht,gn);var Bn=Br[Br.indexOf(vn)+1];if(!Bn)throw new Error("Attempted to drill down from the lowest view.");ht(Ht),yr(Bn);var Lr={action:"drillDown",activeStartDate:Ht,value:cr,view:Bn};te&&!a_(Dn,Ht)&&te(Lr),me&&vn!==Bn&&me(Lr),Ze&&Ze(Lr)}},[Dn,Ho,te,Ls,Ze,me,cr,vn,Br]),Fs=A.useCallback(function(){if(pi){var Ht=Br[Br.indexOf(vn)-1];if(!Ht)throw new Error("Attempted to drill up from the highest view.");var gn=Xh(Ht,Dn);ht(gn),yr(Ht);var Bn={action:"drillUp",activeStartDate:gn,value:cr,view:Ht};te&&!a_(Dn,gn)&&te(Bn),me&&vn!==Ht&&me(Bn),ce&&ce(Bn)}},[Dn,pi,te,ce,me,cr,vn,Br]),Us=A.useCallback(function(Ht,gn){var Bn=cr;Ls(Ht,gn);var Lr=ne&&!W5(Bn),Fr;if(ne)if(Lr)Fr=Xh(lo,Ht);else{if(!Bn)throw new Error("previousValue is required");if(Array.isArray(Bn))throw new Error("previousValue must not be an array");Fr=EVe(lo,Bn,Ht)}else Fr=Bs(Ht);var Fa=!ne||Lr||T?iZ({maxDate:O,maxDetail:U,minDate:H,minDetail:z,value:Fr,view:vn}):null;gn.persist(),ht(Fa),rr(Fr);var zl={action:"onChange",activeStartDate:Fa,value:Fr,view:vn};if(te&&!a_(Dn,Fa)&&te(zl),D)if(ne){var qo=W5(Fr);if(!qo)D(Fr||null,gn);else if(i){if(Array.isArray(Fr))throw new Error("value must not be an array");D([Fr||null,null],gn)}}else D(Fr||null,gn)},[Dn,i,Bs,T,O,U,H,z,te,D,Ls,ne,cr,lo,vn]);function Ba(Ht){on(Ht)}function La(){on(null)}A.useImperativeHandle(n,function(){return{activeStartDate:Dn,drillDown:ds,drillUp:Fs,onChange:Us,setActiveStartDate:ur,value:cr,view:vn}},[Dn,ds,Fs,Us,ur,cr,vn]);function Ul(Ht){var gn=Ht?QG(vn,Dn):Xh(vn,Dn),Bn=Ho?ds:Us,Lr={activeStartDate:gn,hover:Da,locale:C,maxDate:O,minDate:H,onClick:Bn,onMouseOver:ne?Ba:void 0,tileClassName:ft,tileContent:It,tileDisabled:gt,value:cr,valueType:lo};switch(vn){case"century":return Q.jsx(BVe,Ig({formatYear:b,showNeighboringCentury:Te},Lr));case"decade":return Q.jsx(zVe,Ig({formatYear:b,showNeighboringDecade:we},Lr));case"year":return Q.jsx(HVe,Ig({formatMonth:d,formatMonthYear:m},Lr));case"month":return Q.jsx(eWe,Ig({calendarType:s,formatDay:u,formatLongDate:h,formatShortWeekday:y,formatWeekday:v,onClickWeekNumber:fe,onMouseLeave:ne?La:void 0,showFixedNumberOfWeeks:typeof J<"u"?J:Z,showNeighboringMonth:nt,showWeekNumbers:Xe},Lr));default:throw new Error("Invalid view: ".concat(vn,"."))}}function wf(){return pe?Q.jsx(CVe,{activeStartDate:Dn,drillUp:Fs,formatMonthYear:m,formatYear:b,locale:C,maxDate:O,minDate:H,navigationAriaLabel:V,navigationAriaLive:M,navigationLabel:K,next2AriaLabel:j,next2Label:q,nextAriaLabel:Y,nextLabel:X,prev2AriaLabel:de,prev2Label:ye,prevAriaLabel:ve,prevLabel:ue,setActiveStartDate:ur,showDoubleView:Z,view:vn,views:Br}):null}var zs=Array.isArray(cr)?cr:[cr];return Q.jsxs("div",{className:un(o_,ne&&zs.length===1&&"".concat(o_,"--selectRange"),Z&&"".concat(o_,"--doubleView"),o),ref:E,children:[wf(),Q.jsxs("div",{className:"".concat(o_,"__viewContainer"),onBlur:ne?La:void 0,onMouseLeave:ne?La:void 0,children:[Ul(),Z?Ul(!0):null]})]})});const lWe=()=>{const t=Je.use.fireArea(),e=Je.use.duration(),n=Je.use.meanFrp(),r=Je.use.setFireAreaRange(),i=Je.use.setDurationRange(),s=Je.use.setMeanFrpRange(),[o,a]=A.useState([t.min,t.max]),[l,c]=A.useState([e.min,e.max]),[u,h]=A.useState([n.min,n.max]);A.useEffect(()=>{a([t.min,t.max]),c([e.min,e.max]),h([n.min,n.max])},[t,e,n]);const d=v=>{a(v),r({min:v[0],max:v[1]})},m=v=>{c(v),i({min:v[0],max:v[1]})},y=v=>{h(v),s({min:v[0],max:v[1]})};return Q.jsx(Q.Fragment,{children:Q.jsxs("div",{className:"padding-y-2  grid-row  grid-gap-lg",children:[Q.jsxs("div",{className:"grid-row tablet:grid-col-4 display-flex flex-column padding-bottom-2  tablet:padding-bottom-0 ",children:[Q.jsxs("label",{className:"font-body text-bold font-sans-3xs margin-bottom-1 display-block",htmlFor:"fire-area-slider",children:["Fire area (km",Q.jsx("sup",{children:"2"}),")"]}),Q.jsxs("div",{className:"display-flex flex-align-center",children:[Q.jsx("div",{className:"border-1px padding-x-1 padding-y-05 width-6 height-4 display-flex flex-align-center flex-justify-center slider-value bg-white",children:o[0]}),Q.jsx("div",{className:"flex-fill padding-x-2",children:Q.jsx(kg,{className:"horizontal-slider",thumbClassName:"thumb",trackClassName:"track",value:o,onChange:d,min:0,max:1e4,ariaLabel:["Minimum fire area","Maximum fire area"],ariaValuetext:v=>`${v} km²`,pearling:!0,minDistance:10})}),Q.jsx("div",{className:"border-1px padding-x-1 padding-y-05 width-6 height-4 display-flex flex-align-center flex-justify-center slider-value bg-white",children:o[1]})]})]}),Q.jsxs("div",{className:"grid-row tablet:grid-col-4 display-flex  padding-bottom-2 flex-column  tablet:padding-bottom-0",children:[Q.jsx("label",{className:"font-body text-bold font-sans-3xs margin-bottom-1 display-block",htmlFor:"duration-sli
3573der",children:"Duration (days)"}),Q.jsxs("div",{className:"display-flex flex-align-center",children:[Q.jsx("div",{className:"border-1px padding-x-1 padding-y-05 width-6 height-4 display-flex flex-align-center flex-justify-center slider-value bg-white",children:l[0]}),Q.jsx("div",{className:"flex-fill padding-x-2",children:Q.jsx(kg,{className:"horizontal-slider",thumbClassName:"thumb",trackClassName:"track",value:l,onChange:m,min:0,max:30,ariaLabel:["Minimum duration","Maximum duration"],ariaValuetext:v=>`${v} days`,pearling:!0,minDistance:1})}),Q.jsx("div",{className:"border-1px padding-x-1 padding-y-05 width-6 height-4 display-flex flex-align-center flex-justify-center slider-value bg-white",children:l[1]})]})]}),Q.jsxs("div",{className:"grid-row tablet:grid-col-4 display-flex flex-column padding-bottom-2 tablet:padding-bottom-0",children:[Q.jsx("label",{className:"font-body text-bold font-sans-3xs margin-bottom-1 display-block",htmlFor:"mean-frp-slider",children:"Mean FRP (MW)"}),Q.jsxs("div",{className:"display-flex flex-align-center",children:[Q.jsx("div",{className:"border-1px padding-x-1 padding-y-05 width-6 height-4 display-flex flex-align-center flex-justify-center slider-value bg-white",children:u[0]}),Q.jsx("div",{className:"flex-fill padding-x-2",children:Q.jsx(kg,{className:"horizontal-slider",thumbClassName:"thumb",trackClassName:"track",value:u,onChange:y,min:0,max:1e3,ariaLabel:["Minimum FRP","Maximum FRP"],ariaValuetext:v=>`${v} MW`,pearling:!0,minDistance:10})}),Q.jsx("div",{className:"border-1px padding-x-1 padding-y-05 width-6 height-4 display-flex flex-align-center flex-justify-center slider-value bg-white",children:u[1]})]})]})]})})},cWe=()=>{const t=Je.use.timeRange(),e=Je.use.setTimeRange(),n=Je.use.showAdvancedFilters(),r=Je.use.toggleAdvancedFilters(),i=Je.use.selectedDuration(),s=Je.use.setSelectedDuration(),[o,a]=A.useState(!1),l=A.useRef(null),c=A.useMemo(()=>new Date(t.end),[t.end]),u=A.useMemo(()=>{const h=new Date(c.setHours(23,59,59,999));return{start:new Date(h.getTime()-i.value),end:h}},[c,i]);return A.useEffect(()=>{(t.start.getTime()!==u.start.getTime()||t.end.getTime()!==u.end.getTime())&&e(u)},[u,e,t.start,t.end]),A.useEffect(()=>{const h=d=>{l.current&&!l.current.contains(d.target)&&a(!1)};return o&&document.addEventListener("mousedown",h),()=>{document.removeEventListener("mousedown",h)}},[o]),Q.jsxs("div",{className:"bg-white radius-md tablet:padding-y-2 padding-y-3 padding-x-3 shadow-2 z-top text-no-wrap",children:[Q.jsxs("div",{className:"grid-row grid-gap-lg flex-no-wrap  ",children:[Q.jsxs("div",{className:" grid-col display-flex flex-column tablet:flex-row  ",style:{gap:"0.75rem"},children:[Q.jsxs("div",{className:"display-flex flex-align-center tablet:margin-right-2 ",children:[Q.jsx("span",{className:"font-sans-3xs text-base-dark font-weight-bold margin-right-2",children:"Find fire events within"}),Q.jsx("select",{className:"usa-select margin-top-0",style:{minWidth:"120px",height:"2.5rem"},value:i.label,onChange:h=>{const d=Q5.find(m=>m.label===h.target.value);d&&s(d)},children:Q5.map(h=>Q.jsx("option",{value:h.label,children:h.label},h.label))})]}),Q.jsxs("div",{className:"display-inline-flex flex-align-center flex-justify",children:[Q.jsx("span",{className:"font-sans-3xs text-base-dark margin-right-2",children:"prior to"}),Q.jsxs("div",{className:"display-flex flex-align-center border-1px border-base-light padding-y-05 padding-x-1 radius-sm bg-white date-picker ",style:{position:"relative",height:"2.5rem"},children:[Q.jsxs("button",{className:"border-0 bg-transparent padding-1 display-flex flex-align-center",onClick:()=>a(h=>!h),style:{cursor:"pointer"},children:[Q.jsx("span",{className:"font-sans-3xs text-base-dark",children:Lo(c,"MMM d, yyyy")}),Q.jsx(z_e,{size:16,color:"#71767a",className:"margin-left-1"})]}),o&&Q.jsx("div",{ref:l,className:"calendar-override",children:Q.jsx(aWe,{onChange:h=>{if(h instanceof Date){const d=new Date(h.setHours(23,59,59,999)),m=new Date(d.getTime()-i.value);e({start:m,end:d}),a(!1)}},value:c,minDate:new Date(new Date().getFullYear(),0,1),maxDate:new Date})})]})]})]}),Q.jsxs("div",{className:"grid-col-auto",children:[Q.jsx("div",{className:"tablet:display-none ",children:Q.jsxs(oo,{type:"button",onClick:r,className:` font-sans-3xs ${n?"usa-button":"usa-button--base bg-base-light "}`,children:[Q.jsx(um.FilterAlt,{}),Q.jsx("p",{className:"tablet:display-inline display-none",children:n?"Hide advanced filters":"Show advanced filters"})]})}),Q.jsx("div",{className:"tablet:display-block display-none ",children:Q.jsxs(oo,{type:"button",onClick:r,unstyled:!0,className:"text-underline font-sans-3xs usa-button--unstyled",children:[Q.jsx(um.FilterAlt,{}),Q.jsx("p",{className:"tablet:display-inline display-none",children:n?"Hide advanced filters":"Show advanced filters"})]})})]})]}),n&&Q.jsx("div",{className:"margin-top-2",style:{width:"100%"},children:Q.jsx(lWe,{})})]})},uWe=()=>{const t=A.useRef(null),[e,n]=A.useState(()=>{const l=localStorage.getItem("hideFireModal");return l?l!=="true":!1});A.useEffect(()=>{var l;e&&((l=t.current)==null||l.toggleModal(void 0,!0))},[e]);const r=()=>{var l;localStorage.setItem("hideFireModal","true"),(l=t.current)==null||l.toggleModal(void 0,!1),n(!1)},i=new Date,s=i.getUTCHours()>=12,a=new Date(Date.UTC(i.getUTCFullYear(),i.getUTCMonth(),i.getUTCDate(),s?12:0)).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric",hour:"numeric",hour12:!0,timeZone:"UTC"});return Q.jsxs("header",{className:"header bg-white height-5 padding-y-05 padding-x-105 dis
3573play-flex flex-row tablet:flex-justify-between flex-align-center width-full position-fixed top-0 left-0 z-top",children:[Q.jsxs("div",{className:"display-flex flex-align-center width-full tablet:flex-justify-start flex-justify",children:[Q.jsxs("a",{href:"https://earthdata.nasa.gov/dashboard",className:"display-flex flex-align-center text-no-underline",children:[Q.jsx("img",{src:"https://earthdata.nasa.gov/dashboard/NASA_logo.svg",alt:"NASA Logo",className:"height-4 margin-right-2","aria-hidden":"false"}),Q.jsx("span",{className:"font-public-sans font-sans-2xs font-weight-bold text-base margin-right-2 display-none tablet:display-block ",children:"Earthdata VEDA Dashboard"})]}),Q.jsx("span",{className:"font-public-sans font-sans-xs font-weight-bold text-ink margin-0 margin-right-1",children:"Fire Event Explorer"}),Q.jsx(hPe,{className:"usa-button usa-button--unstyled",modalRef:t,opener:!0,children:Q.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Q.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M9.16663 5.83317H10.8333V7.49984H9.16663V5.83317ZM9.16663 9.1665H10.8333V14.1665H9.16663V9.1665ZM9.99996 1.6665C5.39996 1.6665 1.66663 5.39984 1.66663 9.99984C1.66663 14.5998 5.39996 18.3332 9.99996 18.3332C14.6 18.3332 18.3333 14.5998 18.3333 9.99984C18.3333 5.39984 14.6 1.6665 9.99996 1.6665ZM9.99996 16.6665C6.32496 16.6665 3.33329 13.6748 3.33329 9.99984C3.33329 6.32484 6.32496 3.33317 9.99996 3.33317C13.675 3.33317 16.6666 6.32484 16.6666 9.99984C16.6666 13.6748 13.675 16.6665 9.99996 16.6665Z",fill:"#71767A"})})})]}),Q.jsx(fPe,{id:"fire-modal",className:"wildfire-explorer__modal usa-modal--lg bg-base-lightest shadow-3 padding-5 radius-0",ref:t,"aria-describedby":"fire-modal-description","aria-labelledby":"fire-modal-heading",children:Q.jsxs("div",{className:"wildfire-explorer__modal-content usa-modal__content",children:[Q.jsx("button",{className:"usa-button usa-button--unstyled position-absolute",style:{top:"20px",right:"20px"},onClick:r,"aria-label":"Close modal",type:"button",children:Q.jsx("svg",{width:"36",height:"36",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Q.jsx("path",{d:"M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12L19 6.41Z",fill:"#71767A"})})}),Q.jsxs("div",{className:"wildfire-explorer__modal-main usa-modal__main",children:[Q.jsxs("div",{className:"display-flex flex-align-center margin-bottom-3",children:[Q.jsx("img",{src:"https://earthdata.nasa.gov/dashboard/NASA_logo.svg",alt:"NASA Logo",className:"height-4 margin-right-2","aria-hidden":"false"}),Q.jsx("span",{className:"font-public-sans font-sans-md text-base",children:"Earthdata VEDA Dashboard"})]}),Q.jsx("h1",{className:"font-heading-xl text-ink margin-0 margin-bottom-2",id:"fire-modal-heading",children:"Fire Event Explorer"}),Q.jsxs(Lwe,{className:"border-radius-sm",background:"#71767A",children:["Last updated: ",a]}),Q.jsx("p",{className:"wildfire-explorer__modal-description font-sans-sm line-height-body-5 text-ink",children:"This tool visualizes near real-time (NRT) satellite-based fire perimeters, active portions of fire perimeters (fire lines), and active fire pixel detections for the current year."}),Q.jsx("p",{className:"wildfire-explorer__modal-description font-sans-sm line-height-body-5 text-ink",children:"Use the bottom panel to select different date ranges or subset fires by size, duration, or intensity. Click on an individual fire to visualize the time series of fire growth every 12 hours and create video outputs in GIF or WebM formats."}),Q.jsx("p",{className:"wildfire-explorer__modal-description font-sans-sm line-height-body-5 text-ink margin-bottom-1",children:"These fire tracking data are from the Fire Event Data Suite (FEDS) algorithm. Find out more:"}),Q.jsxs("ul",{className:"wildfire-explorer__modal-list usa-list font-sans-sm margin-top-0 margin-bottom-4",children:[Q.jsx("li",{children:Q.jsx("a",{href:"https://earth-information-system.github.io/fireatlas/docs/nrt.html#accessing-nrt-data",className:"text-primary",target:"_blank",rel:"noopener noreferrer",children:"FEDS data source documentation"})}),Q.jsx("li",{children:Q.jsx("a",{href:"https://docs.openveda.cloud/user-guide/notebooks/tutorials/mapping-fires.html#collection-information",className:"text-primary",target:"_blank",rel:"noopener noreferrer",children:"OpenVEDA documentation"})}),Q.jsx("li",{children:Q.jsx("a",{href:"https://www.earthdata.nasa.gov/dashboard/",className:"text-primary",target:"_blank",rel:"noopener noreferrer",children:"Earthdata VEDA dashboard"})})]}),Q.jsxs("div",{className:"display-flex flex-justify flex-align-center",children:[Q.jsxs("div",{className:"display-flex flex-align-center",children:[Q.jsx("input",{type:"checkbox",id:"dont-show-again",className:"usa-checkbox__input",defaultChecked:localStorage.getItem("hideFireModal")==="true"||localStorage.getItem("hideFireModal")===null,onChange:l=>localStorage.setItem("hideFireModal",l.target.checked?"true":"false")}),Q.jsx("label",{htmlFor:"dont-show-again",className:"usa-checkbox__label font-sans-sm text-ink",children:"Don't show again"})]}),Q.jsxs("button",{className:"usa-button display-flex flex-align-center radius-md font-ui font-weight-bold font-2xs line-height-1 text-center text-bottom padding-y-105 padding-x-205",onClick:r,children:["Explore tool",Q.jsx("svg",{className:"margin-left-1",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Q.jsx("path",{d:"M4 12H20M20 12L14 6M20 12L14 18",stroke:"white",strokeWidth:"2"})})]})]}),Q.jsx("h2",{children:"Frequently Asked Questions"}),Q.jsx("h3",{children:"Q: What is NRT?"}),Q.jsx("p",{children:"A: Near real-time (NRT) refers to data available 1 to 3 hours after an observation by an instrument aboard a space-based platform. FEDS data utilize NRT observations from the Visible Infrared Imaging Radiometer Suite (VIIRS) sensors. FEDS data update periodically each day based on new VIIRS observations within a few hours of initial satellite observation."}),Q.jsx("h3",{children:"Q: What are the layers?"}),Q.jsxs("p",{children:["The ",Q.jsx("b",{children:"Fire Perimeters"})," layer shows the estimated fire-affected area as detected by the VIIRS sensor. The ",Q.jsx("b",{children:"Active Fire Front"})," ","layer shows the portion of the perimeter where active burning is detected. The ",Q.jsx("b",{children:"Fire Detections"})," layer shows the individual VIIRS pixel detections representing active fire activity."]}),Q.jsx("h3",{children:"Q: What can you do with this tool?"}),Q.jsx("p",{children:"You can look at active fire perimeters from the start of the calendar year up to today. By clicking on an individual fire perimeter, you can see its progression history in more detail, including how it spread over terrain and changed with wind direction. You can also save a movie or GIF showing its lifetime spread."})]})]})})]})},fg=({label:t,visible:e,toggle:n,isLoading:r=!1,disabled:i=!1,isLast:s=!1,isMobile:o})=>Q.jsxs(oo,{onClick:n,className:`layer-item display-flex flex-justify align-items-center text-no-underline width-full ${s?"":"margin-bottom-1"} ${o?"border-1px border-base-lighter bg-white":""} ${!e||i?"text-base-lighter":"text-base"}`,type:"button",unstyled:!o,children:[Q.jsxs("div",{className:"display-flex align-items-center",children:[Q.jsx("span",{className:"tablet:font-sans-3xs font-sans-sm",children:t}),e&&r&&Q.jsx("div",{className:"margin-left-1",children:Q.jsx(fA,{size:12,className:"spin text-blue-500","aria-label":"Loading tiles"})})]}),Q.jsx(oo,{type:"button",unstyled:!0,className:`margin-left-1 visibility-hidden group-hover:visibility-visible ${!e||i?"text-base-lighter":"text-base-dark"}`,disabled:i,"aria-label":`Toggle ${t}`,children:e?Q.jsx($_e,{size:14}):Q.jsx(V_e,{size:14})})]}),fWe=({onClose:t,loadingStates:e={}})=>{const n=Je.use.showPerimeterNrt(),r=Je.use.showFireline(),i=Je.use.showNewFirepix(),s=Je.use.setShowPerimeterNrt(),o=Je.use.setShowFireline(),a=Je.use.setShowNewFirepix();return Q.jsxs(Q.Fragment,{children:[Q.jsxs("div",{className:"tablet:display-block display-none layer-switcher z-top bg-white padding-x-1 padding-y-1 radius-md shadow-2 border-1px border-base-lighter text-3xs",children:[Q.jsxs("div",{className:"display-flex flex-justify align-items-center margin-bottom-1",children:[Q.jsx("h4",{className:"margin-0 text-base font-sans-3xs",children:"Available layers"}),Q.jsx(oo,{type:"button",unstyled:!0,className:"margin-right-05 text-base-dark",onClick:t,"aria-label":"Collapse layer switcher",children:Q.jsx(uI,{size:16})})]}),Q.jsx(fg,{label:"Fire Perimeters",visible:n,toggle:()=>s(!n),isLoading:e.perimeterNrt}),Q.jsx(fg,{label:"Active Fire Fronts",visible:r,toggle:()=>
3573o(!r),isLoading:e.fireline}),Q.jsx(fg,{label:"Fire Detections",visible:i,toggle:()=>a(!i),isLoading:e.newfirepix,isLast:!0})]}),Q.jsxs("div",{className:"display-flex height-full",children:[Q.jsx(oo,{type:"button",onClick:t,unstyled:!0,className:" width-full heigth-auto  tablet:display-none display-flex flex-column"}),Q.jsxs("div",{className:"tablet:display-none display-block layer-switcher z-top bg-white padding-x-1 tablet:padding-y-1 padding-y-3 radius-md shadow-2 border-1px border-base-lighter text-3xs width-full bottom-0 position-absolute",children:[Q.jsxs("div",{className:"display-flex flex-justify align-items-center margin-bottom-1",children:[Q.jsx("h4",{className:"margin-0 text-base tablet:font-sans-3xs font-sans-md",children:"Available layers"}),Q.jsx(oo,{type:"button",unstyled:!0,className:"margin-right-05 text-base-dark",onClick:t,"aria-label":"Collapse layer switcher",children:Q.jsx(uI,{size:24})})]}),Q.jsx(fg,{label:"Fire Perimeters",visible:n,toggle:()=>s(!n),isLoading:e.perimeterNrt,isMobile:!0}),Q.jsx(fg,{label:"Active Fire Fronts",visible:r,toggle:()=>o(!r),isLoading:e.fireline,isMobile:!0}),Q.jsx(fg,{label:"Fire Detections",visible:i,toggle:()=>a(!i),isLoading:e.newfirepix,isMobile:!0,isLast:!0})]})]})]})},hWe=({setMobileTimelineActive:t,mobileTimelineActive:e})=>(A.useEffect(()=>{},[e]),Q.jsxs("div",{className:"widsht-full display-flex padding-05 border-1px border-base-light radius-md grid-gap-lg",children:[Q.jsx(oo,{type:"button",outline:e!=!0,className:`width-full  ${e==!0?"":"text-base-light shadow-none"}`,title:"Timeline",onClick:()=>t(!e),children:"Timeline"}),Q.jsx(oo,{type:"button",onClick:()=>t(!e),className:`width-full  margin-0  ${e==!0?"text-base-light shadow-none":""}`,title:"Fire Details",outline:e==!0,children:"Fire Details"})]})),sZ=["Fire area (km²)","Mean FRP","Duration (days)"],dWe=({onBack:t})=>{const e=Je.use.selectedEventId(),n=Je.use.firePerimeters(),r=Je.use.windLayerType(),i=Je.use.setWindLayerType(),s=Je.use.setTimeMarker(),o=Je.use.show3DMap(),a=Je.use.toggle3DMap(),[l,c]=A.useState(0),[u,h]=A.useState(null),[d,m]=A.useState(!1),[y,v]=A.useState([]),[b,x]=A.useState(500),[T,E]=A.useState(sZ[0]),[C,I]=A.useState(!0),[O,N]=A.useState(!0),U=A.useRef(null),F=A.useRef(null),H=A.useRef(null),W=A.useRef(!1),z=()=>u,V=A.useCallback(()=>{W.current=!1,m(!1),c(y[0]||0)},[y]),{isRecording:M,isPreparingToRecord:K,exportFormat:j,setExportFormat:q,speedMultiplier:Y,captureFrame:X,stopRecording:te,isRecordingRef:D}=OG({show3DMap:o,toggle3DMap:a,windLayerType:r,setWindLayerType:i,resetAnimation:V,setIsPlaying:m,getCurrentPerimeter:z,animationCompleteRef:W,baseFrameDelay:b}),{minDate:$,totalRange:he,perimeterData:Se,timePoints:fe,chartData:$e}=A.useMemo(()=>{if(!n||n.features.length===0)return{minDate:new Date,maxDate:new Date,totalRange:0,perimeterData:[],timePoints:[],chartData:[]};const k=[...n.features].sort((Z,J)=>{const le=new Date(Z.properties.primarykey.split("|")[2]).getTime(),pe=new Date(J.properties.primarykey.split("|")[2]).getTime();return le-pe}).map(Z=>{const J=new Date(Z.properties.primarykey.split("|")[2]);return{time:J,timestamp:J.getTime(),area:Z.properties.farea||0,meanFrp:Z.properties.meanfrp||0,duration:Z.properties.duration||0,properties:Z.properties}}),ie=k.map(Z=>({time:Z.time,timestamp:Z.timestamp})),ne=k.map(Z=>({...Z,date:Lo(Z.time,"MMM d, HH:mm"),name:Lo(Z.time,"MMM d, yyyy HH:mm")}));return{minDate:k[0].time,maxDate:k[k.length-1].time,totalRange:k[k.length-1].timestamp-k[0].timestamp,perimeterData:k,timePoints:ie,chartData:ne}},[n]);A.useEffect(()=>{if(fe.length){const ue=fe.map((k,ie)=>ie/(fe.length-1)*100);v(ue)}},[fe]),A.useEffect(()=>{},[C]),A.useEffect(()=>{if(!Se.length)return;c(0);const ue=Se[0];h(ue),s(ue.time)},[$,Se]),A.useEffect(()=>{if(he===0||!Se.length||!fe.length||!y.length)return;let ue=0,k=1/0;y.forEach((ne,Z)=>{const J=Math.abs(ne-l);J<k&&(k=J,ue=Z)});const ie=Se[ue];(!u||ie.timestamp!==u.timestamp)&&h(ie),(!u||ie.time!==u.time)&&s(ie.time),Math.abs(l-y[ue])>.1&&c(y[ue])},[l,$,Se,s,fe,y,he,u]),A.useEffect(()=>{if(!d||!y.length)return;let ue=0,k=1/0;
3573y.forEach((J,le)=>{const pe=Math.abs(l-J);pe<k&&(k=pe,ue=le)});const ie=Math.min(ue+1,y.length-1),ne=ue===y.length-1,Z=b/Y;return H.current=setTimeout(()=>{if(ne){D.current&&requestAnimationFrame(()=>{X(),te()}),W.current=!0,m(!1);return}D.current&&requestAnimationFrame(X),c(y[ie])},Z),()=>clearTimeout(H.current)},[d,l,y,fe,X,te,D,b,Y]);const Ze=A.useCallback(()=>{l>=100?(W.current=!1,c(y[0]||0),m(!0)):m(ue=>!ue)},[l,y]),ce=A.useCallback(()=>{switch(T){case"Fire area (km²)":return"area";case"Mean FRP":return"meanFrp";default:return"duration"}},[T]),me=ue=>ue.toFixed(1),de=A.useCallback(({active:ue,payload:k})=>{if(!ue||!(k!=null&&k.length))return null;const ie=k[0].payload,ne=T==="Fire area (km²)"?`${ie.area.toFixed(2)} km²`:T==="Mean FRP"?ie.meanFrp.toFixed(2):`${ie.duration.toFixed(2)} days`;return Q.jsxs("div",{className:"bg-white padding-2 radius-md border-1px border-base-lighter shadow-1 z-top",children:[Q.jsx("p",{className:"text-bold",children:Lo(ie.time,"HH:mm MMM d, yyyy")}),Q.jsxs("p",{children:[T,": ",ne]})]})},[T]),ye=A.useMemo(()=>!$e.length||!u?$e:$e.map(ue=>({...ue,isHighlighted:ue.timestamp<=u.timestamp})),[$e,u]),ve=A.useMemo(()=>{if(!ye.length)return[];const ue=Math.ceil(ye.length/8),k=ye.filter((ne,Z)=>Z%ue===0).map(ne=>ne.timestamp),ie=ye[ye.length-1].timestamp;return k[k.length-1]!==ie&&k.push(ie),k},[ye]);return e?Q.jsxs("div",{children:[Q.jsxs("div",{className:"padding-y-1  border-bottom border-base-lighter display-flex flex-row flex-align-center bg-white padding-x-3 display-flex flex-justify",children:[Q.jsx("div",{children:Q.jsxs("button",{className:"usa-button usa-button--unstyled text-base-dark display-flex flex-align-center",onClick:t,children:[Q.jsx("svg",{className:"margin-right-1",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Q.jsx("path",{d:"M20 11H7.83L13.42 5.41L12 4L4 12L12 20L13.41 18.59L7.83 13H20V11Z",fill:"currentColor"})}),Q.jsx("span",{className:"font-body font-weight-regular font-sans-3xs text-underline",children:"Back to all fire events"})]})}),Q.jsx("div",{children:Q.jsx(oo,{type:"button",unstyled:!0,onClick:()=>N(!O),children:O?Q.jsx(um.ExpandLess,{size:5,className:"text-base"}):Q.jsx(um.ExpandMore,{size:5,className:"text-base"})})})]}),Q.jsxs("div",{className:"detailed-time-chart bg-white radius-md padding-2 shadow-2 z-top width-full≈",children:[O&&Q.jsxs("div",{children:[Q.jsx(hWe,{setMobileTimelineActive:I,mobileTimelineActive:C}),C?Q.jsxs(Q.Fragment,{children:[Q.jsx("div",{className:" details-container padding-y-2 grid-container  padding-x-0",children:Q.jsxs("div",{className:"grid-row",children:[Q.jsx("div",{className:"grid-col-6 padding-right-1",children:Q.jsxs("label",{className:"usa-checkbox margin-0 border-base-light border-1px radius-md padding-2 display-flex width-full maxh-8 display-flex flex-justify",children:[" ",Q.jsx("span",{children:"Wind"}),Q.jsx("input",{className:"usa-checkbox__input",type:"checkbox",checked:r!==null,onChange:ue=>i(ue.target.checked?"wind":null)}),Q.jsx("span",{className:"usa-checkbox__label font-ui font-sans-2xs text-base-ink margin-top-0 "})]})}),Q.jsx("div",{className:"grid-col-6 ",children:Q.jsxs("label",{className:"usa-checkbox border-base-light border-1px radius-md padding-2 display-flex width-full maxh-8 display-flex flex-justify",children:[Q.jsx("span",{children:"3D map"}),Q.jsx("input",{className:"usa-checkbox__input",type:"checkbox",name:"3d-map",checked:o,onChange:a}),Q.jsx("span",{className:"usa-checkbox__label font-ui font-weight-regular font-sans-2xs text-base-ink margin-top-0"})]})})]})}),Q.jsxs("div",{className:"display-flex flex-align-center flex-justify margin-bottom-2",children:[Q.jsx(pWe,{selectedYAxis:T,onChange:E}),Q.jsx(MG,{exportFormat:j,setExportFormat:q,baseFrameDelay:b,setBaseFrameDelay:x,isMobile:!0})]}),Q.jsx("div",{className:"chart-container",ref:U,children:Q.jsx(pY,{width:"100%",height:113,children:Q.jsxs(EG,{data:ye,margin:{top:10,bottom:0,left:30},barGap:0,barCategoryGap:"0",barSize:20,children:[Q.jsx(fR,{strokeDasharray:"3 3"}),Q.jsx(Ly,{dataKey:"timestamp",type:"number",scale:"time",domain:["auto","auto"],ticks:ve,tickFormatter:ue=>{const k=new Date(ue),ie=k.getHours();return ie===0||ie===12?Lo(k,"HH:mm MMM d"):""},tick:{fontSize:10,fill:"#71767a",transform:"translate(0, 30px)"}
3573,tickLine:!1,axisLine:!1,padding:{left:10,right:10}}),Q.jsx(Fy,{dataKey:ce(),tickFormatter:me,width:1,axisLine:!1,tickLine:!1,tick:{fontSize:12,fontFamily:"Source Sans Pro Web, Helvetica Neue, Helvetica, Roboto, Arial, sans-serif",fill:"#71767a"},className:"font-body-3xs color-base"}),Q.jsx(wa,{content:de,cursor:!1}),Q.jsx(yf,{dataKey:ce(),isAnimationActive:!1,shape:ue=>{const{x:k,y:ie,width:ne,height:Z,payload:J}=ue;return k==null||ie==null||ne==null||Z==null?null:Q.jsx("rect",{x:k,y:ie,width:ne,height:Z,fill:J.isHighlighted?"#1a6baa":"#DFE1E2",opacity:J.isHighlighted?1:.5,rx:2,ry:2,style:{outline:"none",stroke:"none"}})}})]})})}),Q.jsx("div",{className:"slider-container margin-bottom-2",ref:F,children:Q.jsx(kg,{className:"time-slider",thumbClassName:"thumb",trackClassName:"track",value:l,onChange:ue=>{m(!1),c(ue)},min:0,max:100,marks:y.length>0,markClassName:"slider-mark",ariaLabel:"Fire perimeter time",disabled:M||K})})]}):Q.jsx("div",{className:"details-container ",children:Q.jsx(hX,{isMobile:!0})})]}),Q.jsx("div",{className:"display-flex flex-align-center width-full ",children:Q.jsx(RG,{isPlaying:d,togglePlayback:Ze,resetAnimation:V,isRecording:M,isPreparingToRecord:K,isMobile:!0})})]})]}):null},pWe=({selectedYAxis:t,onChange:e})=>Q.jsxs("div",{className:"display-flex flex-align-center",children:[Q.jsx("span",{className:"margin-right-1 font-body-3xs font-weight-regular color-base-ink",children:"y-axis:"}),Q.jsx("select",{className:"usa-select margin-top-0",value:t,onChange:n=>e(n.target.value),children:sZ.map(n=>Q.jsx("option",{value:n,children:n},n))})]}),gWe=()=>{const[t,e]=A.useState(!0),[n,r]=A.useState({perimeterNrt:!1,fireline:!1,newfirepix:!1}),i=Je.use.viewMode(),s=Je.use.setViewMode(),o=Je.use.toggle3DMap(),a=Je.use.show3DMap(),l=Je.use.windLayerType(),c=Je.use.setWindLayerType(),u=Je.use.showPerimeterNrt(),h=Je.use.showFireline(),d=Je.use.showNewFirepix(),m=Je.use.selectedEventId(),y=Je.use.selectEvent(),v=Je.use.setTimeRange(),b=()=>{y(null),s("explorer"),a&&o(),l!==null&&c(null);const E=Ete();v(E)},x=E=>{r(E)},T=Object.entries(n).some(([E,C])=>{if(!C)return!1;switch(E){case"perimeterNrt":return u;case"fireline":return h;case"newfirepix":return d;default:return!1}});return Q.jsxs("div",{className:"wildfire-explorer ",children:[Q.jsx(uWe,{}),Q.jsxs("div",{className:"display-flex app-window",children:[Q.jsxs("div",{className:"position-relative flex-fill",children:[i!=="detail"&&Q.jsx("div",{className:"display-flex position-absolute z-top bg-white border-0 shadow-2 radius-md cursor-pointer",style:{top:"50px",right:"10px",transition:"right 0.2s ease",padding:"5px 5px 2px 5px"},onClick:()=>e(!t),"aria-label":"Toggle layer switcher",children:Q.jsxs("div",{className:"position-relative",children:[Q.jsx(q_e,{size:18}),T&&Q.jsx("div",{className:"position-absolute",style:{width:"6px",height:"6px",top:"0px",right:"0px",backgroundColor:"#3b82f6",borderRadius:"50%",animation:"spin 1.5s ease-in-out infinite"}})]})}),t&&i!=="detail"&&Q.jsx("div",{className:`position-absolute tablet:z-top bottom-0 layer-component height-auto ${t?"layer-modal-background":""}`,children:Q.jsx(fWe,{onClose:()=>e(!1),loadingStates:n})}),Q.jsx(vbe,{onLoadingStatesChange:x}),i==="detail"&&m?Q.jsxs(Q.Fragment,{children:[Q.jsx("div",{className:"position-absolute bottom-0 z-top margin-bottom-2 display-none tablet:display-block",style:{left:"calc(50% - 185px)",transform:"translateX(-50%)"},children:Q.jsx(kje,{})}),Q.jsx("div",{className:" position-absolute bottom-0 z-top  mobile-fire-details width-full ",children:Q.jsx(dWe,{onBack:b})})]}):Q.jsx("div",{className:"position-absolute bottom-0 z-500 tablet:margin-bottom-2 tablet:width-auto width-full margin-bottom-0",style:{left:"50%",transform:"translateX(-50%)"},children:Q.jsx(cWe,{})})]}),i==="detail"&&Q.jsx("div",{className:"overflow-hidden display-flex flex-column position-absolute bg-white tablet:display-inline display-none",style:{position:"absolute",width:"360px",top:"50px",right:"10px",height:"calc(100% - 66px)"},children:Q.jsx(hX,{onBack:b})})]})]})},mWe=()=>{const t=Je.use.selectedEventId(),e=Je.use.windLayerType(),n=Je.use.show3DMap(),r=Je.use.showPerimeterNrt(),i=Je.use.showFireline(),s=Je.use.showNewFirepix(),o=Je.use.viewMode(),a=Je.use.timeRange(),l=Je.use.viewStateForUrl(),c=Je.use.selectedDuration(),u=Je.use.setViewMode(),h=Je.use.setWindLayerType(),d=Je.use.toggle3DMap(),m=Je.use.setShowPerimeterNrt(),y=Je.use.setShowFireline(),v=Je.use.setShowNewFirepix(),b=Je.use.setTimeRange(),x=Je.use.selectEvent(),T=Je.use.featuresApiEndpoint(),E=Je.use.setViewStateForUrl(),C=Je.use.setViewState(),I=Je.use.setSelectedDuration(),O=A.useMemo(()=>e6.debounce(b,300),[b]),N=A.useMemo(()=>({selectedEventId:t,windLayerType:e,show3DMap:n,showPerimeterNrt:r,showFireline:i,showNewFirepix:s,viewMode:o,timeRange:a,selectedDuration:c,viewStateForUrl:l}),[t,e,n,r,i,s,o,a,c,l]),U=A.useCallback(F=>{F.viewMode!==void 0&&u(F.viewMode),F.windLayerType!==void 0&&h(F.windLayerType),F.show3DMap!==void 0&&F.show3DMap!==n&&d(),F.showPerimeterNrt!==void 0&&m(F.showPerimeterNrt),F.show
3573Fireline!==void 0&&y(F.showFireline),F.showNewFirepix!==void 0&&v(F.showNewFirepix),F.selectedEventId!==void 0&&F.selectedEventId!==t&&x(F.selectedEventId,T),F.timeRange!==void 0&&O(F.timeRange),F.viewStateForUrl!==void 0&&(E(F.viewStateForUrl),C(F.viewStateForUrl)),F.selectedDuration!==void 0&&I(F.selectedDuration)},[n,t,u,h,d,m,y,v,x,T,O,E,C,I]);return A.useMemo(()=>({state:N,setState:U}),[N,U])},vWe=new ate({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:1}}}),yWe=()=>{const t=Je.use.setEnvConfig(),{state:e,setState:n}=mWe();A.useEffect(()=>{t({mapboxAccessToken:"pk.eyJ1IjoiY292aWQtbmFzYSIsImEiOiJjbWVybGIxb3cwN3k5Mm1wdW16eHllOW85In0.b3G1cP1U8y7lyptOd4EI8g",featuresApiEndpoint:"https://openveda.cloud/api/features"})},[t]),A.useEffect(()=>{const s=new URLSearchParams(window.location.search).get("fireEventExplorer");if(s)try{const o=JSON.parse(decodeURIComponent(s));o.timeRange&&(o.timeRange={start:new Date(o.timeRange.start),end:new Date(o.timeRange.end)}),n({...o,viewStateForUrl:o.viewState})}catch(o){console.error("Invalid fireEventExplorer param",o)}},[]);const r=A.useCallback(e6.debounce(i=>{var l,c,u,h,d,m;const s={...i,timeRange:{start:(u=(c=(l=i.timeRange)==null?void 0:l.start)==null?void 0:c.toISOString)==null?void 0:u.call(c),end:(m=(d=(h=i.timeRange)==null?void 0:h.end)==null?void 0:d.toISOString)==null?void 0:m.call(d)},viewState:i.viewStateForUrl},o=encodeURIComponent(JSON.stringify(s)),a=new URLSearchParams(window.location.search);if(a.get("fireEventExplorer")!==o){a.set("fireEventExplorer",o);const y=`${window.location.pathname}?${a.toString()}`;window.history.replaceState({},"",y)}},500),[]);return A.useEffect(()=>{r(e)},[e,r]),Q.jsx(gWe,{})};function bWe(){return Q.jsx(cte,{client:vWe,children:Q.jsx(yWe,{})})}Fee.createRoot(document.getElementById("root")).render(Q.jsx(bWe,{}));export{fn as g};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.