var Zve=Object.defineProperty,Qve=Object.defineProperties;var Jve=Object.getOwnPropertyDescriptors;var Sk=Object.getOwnPropertySymbols;var gq=Object.prototype.hasOwnProperty,vq=Object.prototype.propertyIsEnumerable;var yq=(t,e,r)=>e in t?Zve(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,io=(t,e)=>{for(var r in e||(e={}))gq.call(e,r)&&yq(t,r,e[r]);if(Sk)for(var r of Sk(e))vq.call(e,r)&&yq(t,r,e[r]);return t},ul=(t,e)=>Qve(t,Jve(e));var z0=(t,e)=>{var r={};for(var n in t)gq.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&Sk)for(var n of Sk(t))e.indexOf(n)<0&&vq.call(t,n)&&(r[n]=t[n]);return r};function hz(t,e){return e.forEach(function(r){r&&typeof r!="string"&&!Array.isArray(r)&&Object.keys(r).forEach(function(n){if(n!=="default"&&!(n in t)){var i=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:function(){return r[n]}})}})}),Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var xl=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function Tk(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function PT(t){if(t.__esModule)return t;var e=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(t).forEach(function(r){var n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:function(){return t[r]}})}),e}var Wa={exports:{}},Bd={},Y={exports:{}},Ao={};/** * @license React * react.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var IT=Symbol.for("react.element"),eye=Symbol.for("react.portal"),tye=Symbol.for("react.fragment"),rye=Symbol.for("react.strict_mode"),nye=Symbol.for("react.profiler"),iye=Symbol.for("react.provider"),oye=Symbol.for("react.context"),sye=Symbol.for("react.forward_ref"),aye=Symbol.for("react.suspense"),lye=Symbol.for("react.memo"),cye=Symbol.for("react.lazy"),xq=Symbol.iterator;function uye(t){return t===null||typeof t!="object"?null:(t=xq&&t[xq]||t["@@iterator"],typeof t=="function"?t:null)}var _q={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},bq=Object.assign,wq={};function o2(t,e,r){this.props=t,this.context=e,this.refs=wq,this.updater=r||_q}o2.prototype.isReactComponent={};o2.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,t,e,"setState")};o2.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function Cq(){}Cq.prototype=o2.prototype;function pz(t,e,r){this.props=t,this.context=e,this.refs=wq,this.updater=r||_q}var mz=pz.prototype=new Cq;mz.constructor=pz;bq(mz,o2.prototype);mz.isPureReactComponent=!0;var Eq=Array.isArray,Sq=Object.prototype.hasOwnProperty,gz={current:null},Tq={key:!0,ref:!0,__self:!0,__source:!0};function Pq(t,e,r){var n,i={},o=null,a=null;if(e!=null)for(n in e.ref!==void 0&&(a=e.ref),e.key!==void 0&&(o=""+e.key),e)Sq.call(e,n)&&!Tq.hasOwnProperty(n)&&(i[n]=e[n]);var s=arguments.length-2;if(s===1)i.children=r;else if(1<s){for(var l=Array(s),u=0;u<s;u++)l[u]=arguments[u+2];i.children=l}if(t&&t.defaultProps)for(n in s=t.defaultProps,s)i[n]===void 0&&(i[n]=s[n]);return{$$typeof:IT,type:t,key:o,ref:a,props:i,_owner:gz.current}}function fye(t,e){return{$$typeof:IT,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}function vz(t){return typeof t=="object"&&t!==null&&t.$$typeof===IT}function dye(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(r){return e[r]})}var Iq=/\/+/g;function yz(t,e){return typeof t=="object"&&t!==null&&t.key!=null?dye(""+t.key):e.toString(36)}function Pk(t,e,r,n,i){var o=typeof t;(o==="undefined"||o==="boolean")&&(t=null);var a=!1;if(t===null)a=!0;else switch(o){case"string":case"number":a=!0;break;case"object":switch(t.$$typeof){case IT:case eye:a=!0}}if(a)return a=t,i=i(a),t=n===""?"."+yz(a,0):n,Eq(i)?(r="",t!=null&&(r=t.replace(Iq,"$&/")+"/"),Pk(i,e,r,"",function(u){return u})):i!=null&&(vz(i)&&(i=fye(i,r+(!i.key||a&&a.key===i.key?"":(""+i.key).replace(Iq,"$&/")+"/")+t)),e.push(i)),1;if(a=0,n=n===""?".":n+":",Eq(t))for(var s=0;s<t.length;s++){o=t[s];var l=n+yz(o,s);a+=Pk(o,e,r,l,i)}else if(l=uye(t),typeof l=="function")for(t=l.call(t),s=0;!(o=t.next()).done;)o=o.value,l=n+yz(o,s++),a+=Pk(o,e,r,l,i);else if(o==="object")throw e=String(t),Error("Objects are not valid as a React child (found: "+(e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead.");return a}function Ik(t,e,r){if(t==null)return t;var n=[],i=0;return Pk(t,n,"","",function(o){return e.call(r,o,i++)}),n}function hye(t){if(t._status===-1){var e=t._result;e=e(),e.then(function(r){(t._status===0||t._status===-1)&&(t._status=1,t._result=r)},function(r){(t._status===0||t._status===-1)&&(t._status=2,t._result=r)}),t._status===-1&&(t._status=0,t._result=e)}if(t._status===1)return t._result.default;throw t._result}var ef={current:null},Mk={transition:null},pye={ReactCurrentDispatcher:ef,ReactCurrentBatchConfig:Mk,ReactCurrentOwner:gz};Ao.Children={map:Ik,forEach:function(t,e,r){Ik(t,function(){e.apply(this,arguments)},r)},count:function(t){var e=0;return Ik(t,function(){e++}),e},toArray:function(t){return Ik(t,function(e){return e})||[]},only:function(t){if(!vz(t))throw Error("React.Children.only expected to receive a single React element child.");return t}};Ao.Component=o2;Ao.Fragment=tye;Ao.Profiler=nye;Ao.PureComponent=pz;Ao.StrictMode=rye;Ao.Suspense=aye;Ao.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=pye;Ao.cloneElement=function(t,e,r){if(t==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+t+".");var n=bq({},t.props),i=t.key,o=t.ref,a=t._owner;if(e!=null){if(e.ref!==void 0&&(o=e.ref,a=gz.current),e.key!==void 0&&(i=""+e.key),t.type&&t.type.defaultProps)var s=t.type.defaultProps;for(l in e)Sq.call(e,l)&&!Tq.hasOwnProperty(l)&&(n[l]=e[l]===void 0&&s!==void 0?s[l]:e[l])}var l=arguments.length-2;if(l===1)n.children=r;else if(1<l){s=Array(l);for(var u=0;u<l;u++)s[u]=arguments[u+2];n.children=s}return{$$typeof:IT,type:t.type,key:i,ref:o,props:n,_owner:a}};Ao.createContext=function(t){return t={$$typeof:oye,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},t.Provider={$$typeof:iye,_context:t},t.Consumer=t};Ao.createElement=Pq;Ao.createFactory=function(t){var e=Pq.bind(null,t);return e.type=t,e};Ao.createRef=function(){return{current:null}};Ao.forwardRef=function(t){return{$$typeof:sye,render:t}};Ao.isValidElement=vz;Ao.lazy=function(t){return{$$typeof:cye,_payload:{_status:-1,_result:t},_init:hye}};Ao.memo=function(t,e){return{$$typeof:lye,type:t,compare:e===void 0?null:e}};Ao.startTransition=function(t){var e=Mk.transition;Mk.transition={};try{t()}finally{Mk.transition=e}};Ao.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")};Ao.useCallback=function(t,e){return ef.current.useCallback(t,e)};Ao.useContext=function(t){return ef.current.useContext(t)};Ao.useDebugValue=function(){};Ao.useDeferredValue=function(t){return ef.current.useDeferredValue(t)};Ao.useEffect=function(t,e){return ef.current.useEffect(t,e)};Ao.useId=function(){return ef.current.useId()};Ao.useImperativeHandle=function(t,e,r){return ef.current.useImperativeHandle(t,e,r)};Ao.useInsertionEffect=function(t,e){return ef.current.useInsertionEffect(t,e)};Ao.useLayoutEffect=function(t,e){return ef.current.useLayoutEffect(t,e)};Ao.useMemo=function(t,e){return ef.current.useMemo(t,e)};Ao.useReducer=function(t,e,r){return ef.current.useReducer(t,e,r)};Ao.useRef=function(t){return ef.current.useRef(t)};Ao.useState=function(t){return ef.current.useState(t)};Ao.useSyncExternalStore=function(t,e,r){return ef.current.useSyncExternalStore(t,e,r)};Ao.useTransition=function(){return ef.current.useTransition()};Ao.version="18.2.0";Y.exports=Ao;var Or=Y.exports,B0=hz({__proto__:null,default:Or},[Y.exports]),Mq={exports:{}},Aq={};/** * @license React * scheduler.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */(function(t){function e(q,ee){var re=q.length;q.push(ee);e:for(;0<re;){var ce=re-1>>>1,fe=q[ce];if(0<i(fe,ee))q[ce]=ee,q[re]=fe,re=ce;else break e}}function r(q){return q.length===0?null:q[0]}function n(q){if(q.length===0)return null;var ee=q[0],re=q.pop();if(re!==ee){q[0]=re;e:for(var ce=0,fe=q.length,J=fe>>>1;ce<J;){var oe=2*(ce+1)-1,ve=q[oe],ye=oe+1,xe=q[ye];if(0>i(ve,re))ye<fe&&0>i(xe,ve)?(q[ce]=xe,q[ye]=re,ce=ye):(q[ce]=ve,q[oe]=re,ce=oe);else if(ye<fe&&0>i(xe,re))q[ce]=xe,q[ye]=re,ce=ye;else break e}}return ee}function i(q,ee){var re=q.sortIndex-ee.sortIndex;return re!==0?re:q.id-ee.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;t.unstable_now=function(){return o.now()}}else{var a=Date,s=a.now();t.unstable_now=function(){return a.now()-s}}var l=[],u=[],p=1,m=null,v=3,x=!1,y=!1,_=!1,w=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,E=typeof setImmediate!="undefined"?setImmediate:null;typeof navigator!="undefined"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function T(q){for(var ee=r(u);ee!==null;){if(ee.callback===null)n(u);else if(ee.startTime<=q)n(u),ee.sortIndex=ee.expirationTime,e(l,ee);else break;ee=r(u)}}function A(q){if(_=!1,T(q),!y)if(r(l)!==null)y=!0,F(k);else{var ee=r(u);ee!==null&&G(A,ee.startTime-q)}}function k(q,ee){y=!1,_&&(_=!1,C(W),W=-1),x=!0;var re=v;try{for(T(ee),m=r(l);m!==null&&(!(m.expirationTime>ee)||q&&!N());){var ce=m.callback;if(typeof ce=="function"){m.callback=null,v=m.priorityLevel;var fe=ce(m.expirationTime<=ee);ee=t.unstable_now(),typeof fe=="function"?m.callback=fe:m===r(l)&&n(l),T(ee)}else n(l);m=r(l)}if(m!==null)var J=!0;else{var oe=r(u);oe!==null&&G(A,oe.startTime-ee),J=!1}return J}finally{m=null,v=re,x=!1}}var X=!1,Z=null,W=-1,D=5,H=-1;function N(){return!(t.unstable_now()-H<D)}function j(){if(Z!==null){var q=t.unstable_now();H=q;var ee=!0;try{ee=Z(!0,q)}finally{ee?$():(X=!1,Z=null)}}else X=!1}var $;if(typeof E=="function")$=function(){E(j)};else if(typeof MessageChannel!="undefined"){var z=new MessageChannel,O=z.port2;z.port1.onmessage=j,$=function(){O.postMessage(null)}}else $=function(){w(j,0)};function F(q){Z=q,X||(X=!0,$())}function G(q,ee){W=w(function(){q(t.unstable_now())},ee)}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(q){q.callback=null},t.unstable_continueExecution=function(){y||x||(y=!0,F(k))},t.unstable_forceFrameRate=function(q){0>q||125<q?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):D=0<q?Math.floor(1e3/q):5},t.unstable_getCurrentPriorityLevel=function(){return v},t.unstable_getFirstCallbackNode=function(){return r(l)},t.unstable_next=function(q){switch(v){case 1:case 2:case 3:var ee=3;break;default:ee=v}var re=v;v=ee;try{return q()}finally{v=re}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(q,ee){switch(q){case 1:case 2:case 3:case 4:case 5:break;default:q=3}var re=v;v=q;try{return ee()}finally{v=re}},t.unstable_scheduleCallback=function(q,ee,re){var ce=t.unstable_now();switch(typeof re=="object"&&re!==null?(re=re.delay,re=typeof re=="number"&&0<re?ce+re:ce):re=ce,q){case 1:var fe=-1;break;case 2:fe=250;break;case 5:fe=1073741823;break;case 4:fe=1e4;break;default:fe=5e3}return fe=re+fe,q={id:p++,callback:ee,priorityLevel:q,startTime:re,expirationTime:fe,sortIndex:-1},re>ce?(q.sortIndex=re,e(u,q),r(l)===null&&q===r(u)&&(_?(C(W),W=-1):_=!0,G(A,re-ce))):(q.sortIndex=fe,e(l,q),y||x||(y=!0,F(k))),q},t.unstable_shouldYield=N,t.unstable_wrapCallback=function(q){var ee=v;return function(){var re=v;v=ee;try{return q.apply(this,arguments)}finally{v=re}}}})(Aq);Mq.exports=Aq;/** * @license React * react-dom.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Rq=Y.exports,jd=Mq.exports;function vn(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,r=1;r<arguments.length;r++)e+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var kq=new Set,MT={};function m1(t,e){s2(t,e),s2(t+"Capture",e)}function s2(t,e){for(MT[t]=e,t=0;t<e.length;t++)kq.add(e[t])}var ey=!(typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"),xz=Object.prototype.hasOwnProperty,mye=/^[: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]*$/,Oq={},Lq={};function gye(t){return xz.call(Lq,t)?!0:xz.call(Oq,t)?!1:mye.test(t)?Lq[t]=!0:(Oq[t]=!0,!1)}function vye(t,e,r,n){if(r!==null&&r.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function yye(t,e,r,n){if(e===null||typeof e=="undefined"||vye(t,e,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function tf(t,e,r,n,i,o,a){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=n,this.attributeNamespace=i,this.mustUseProperty=r,this.propertyName=t,this.type=e,this.sanitizeURL=o,this.removeEmptyString=a}var $c={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){$c[t]=new tf(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];$c[e]=new tf(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){$c[t]=new tf(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){$c[t]=new tf(t,2,!1,t,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(t){$c[t]=new tf(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){$c[t]=new tf(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){$c[t]=new tf(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){$c[t]=new tf(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){$c[t]=new tf(t,5,!1,t.toLowerCase(),null,!1,!1)});var _z=/[\-:]([a-z])/g;function bz(t){return t[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(t){var e=t.replace(_z,bz);$c[e]=new tf(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(_z,bz);$c[e]=new tf(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(_z,bz);$c[e]=new tf(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){$c[t]=new tf(t,1,!1,t.toLowerCase(),null,!1,!1)});$c.xlinkHref=new tf("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){$c[t]=new tf(t,1,!1,t.toLowerCase(),null,!0,!0)});function wz(t,e,r,n){var i=$c.hasOwnProperty(e)?$c[e]:null;(i!==null?i.type!==0:n||!(2<e.length)||e[0]!=="o"&&e[0]!=="O"||e[1]!=="n"&&e[1]!=="N")&&(yye(e,r,i,n)&&(r=null),n||i===null?gye(e)&&(r===null?t.removeAttribute(e):t.setAttribute(e,""+r)):i.mustUseProperty?t[i.propertyName]=r===null?i.type===3?!1:"":r:(e=i.attributeName,n=i.attributeNamespace,r===null?t.removeAttribute(e):(i=i.type,r=i===3||i===4&&r===!0?"":""+r,n?t.setAttributeNS(n,e,r):t.setAttribute(e,r))))}var ty=Rq.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Ak=Symbol.for("react.element"),a2=Symbol.for("react.portal"),l2=Symbol.for("react.fragment"),Cz=Symbol.for("react.strict_mode"),Ez=Symbol.for("react.profiler"),Dq=Symbol.for("react.provider"),Nq=Symbol.for("react.context"),Sz=Symbol.for("react.forward_ref"),Tz=Symbol.for("react.suspense"),Pz=Symbol.for("react.suspense_list"),Iz=Symbol.for("react.memo"),j0=Symbol.for("react.lazy"),$q=Symbol.for("react.offscreen"),Fq=Symbol.iterator;function AT(t){return t===null||typeof t!="object"?null:(t=Fq&&t[Fq]||t["@@iterator"],typeof t=="function"?t:null)}var Ga=Object.assign,Mz;function RT(t){if(Mz===void 0)try{throw Error()}catch(r){var e=r.stack.trim().match(/\n( *(at )?)/);Mz=e&&e[1]||""}return` `+Mz+t}var Az=!1;function Rz(t,e){if(!t||Az)return"";Az=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(e)if(e=function(){throw Error()},Object.defineProperty(e.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(e,[])}catch(u){var n=u}Reflect.construct(t,[],e)}else{try{e.call()}catch(u){n=u}t.call(e.prototype)}else{try{throw Error()}catch(u){n=u}t()}}catch(u){if(u&&n&&typeof u.stack=="string"){for(var i=u.stack.split(` `),o=n.stack.split(` `),a=i.length-1,s=o.length-1;1<=a&&0<=s&&i[a]!==o[s];)s--;for(;1<=a&&0<=s;a--,s--)if(i[a]!==o[s]){if(a!==1||s!==1)do if(a--,s--,0>s||i[a]!==o[s]){var l=` `+i[a].replace(" at new "," at ");return t.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",t.displayName)),l}while(1<=a&&0<=s);break}}}finally{Az=!1,Error.prepareStackTrace=r}return(t=t?t.displayName||t.name:"")?RT(t):""}function xye(t){switch(t.tag){case 5:return RT(t.type);case 16:return RT("Lazy");case 13:return RT("Suspense");case 19:return RT("SuspenseList");case 0:case 2:case 15:return t=Rz(t.type,!1),t;case 11:return t=Rz(t.type.render,!1),t;case 1:return t=Rz(t.type,!0),t;default:return""}}function kz(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case l2:return"Fragment";case a2:return"Portal";case Ez:return"Profiler";case Cz:return"StrictMode";case Tz:return"Suspense";case Pz:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case Nq:return(t.displayName||"Context")+".Consumer";case Dq:return(t._context.displayName||"Context")+".Provider";case Sz:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case Iz:return e=t.displayName||null,e!==null?e:kz(t.type)||"Memo";case j0:e=t._payload,t=t._init;try{return kz(t(e))}catch{}}return null}function _ye(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return kz(e);case 8:return e===Cz?"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 e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function U0(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function zq(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function bye(t){var e=zq(t)?"checked":"value",r=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),n=""+t[e];if(!t.hasOwnProperty(e)&&typeof r!="undefined"&&typeof r.get=="function"&&typeof r.set=="function"){var i=r.get,o=r.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(a){n=""+a,o.call(this,a)}}),Object.defineProperty(t,e,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(a){n=""+a},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function Rk(t){t._valueTracker||(t._valueTracker=bye(t))}function Bq(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var r=e.getValue(),n="";return t&&(n=zq(t)?t.checked?"true":"false":t.value),t=n,t!==r?(e.setValue(t),!0):!1}function kk(t){if(t=t||(typeof document!="undefined"?document:void 0),typeof t=="undefined")return null;try{return t.activeElement||t.body}catch{return t.body}}function Oz(t,e){var r=e.checked;return Ga({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r!=null?r:t._wrapperState.initialChecked})}function jq(t,e){var r=e.defaultValue==null?"":e.defaultValue,n=e.checked!=null?e.checked:e.defaultChecked;r=U0(e.value!=null?e.value:r),t._wrapperState={initialChecked:n,initialValue:r,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function Uq(t,e){e=e.checked,e!=null&&wz(t,"checked",e,!1)}function Lz(t,e){Uq(t,e);var r=U0(e.value),n=e.type;if(r!=null)n==="number"?(r===0&&t.value===""||t.value!=r)&&(t.value=""+r):t.value!==""+r&&(t.value=""+r);else if(n==="submit"||n==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?Dz(t,e.type,r):e.hasOwnProperty("defaultValue")&&Dz(t,e.type,U0(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function Vq(t,e,r){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var n=e.type;if(!(n!=="submit"&&n!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,r||e===t.value||(t.value=e),t.defaultValue=e}r=t.name,r!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,r!==""&&(t.name=r)}function Dz(t,e,r){(e!=="number"||kk(t.ownerDocument)!==t)&&(r==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+r&&(t.defaultValue=""+r))}var kT=Array.isArray;function c2(t,e,r,n){if(t=t.options,e){e={};for(var i=0;i<r.length;i++)e["$"+r[i]]=!0;for(r=0;r<t.length;r++)i=e.hasOwnProperty("$"+t[r].value),t[r].selected!==i&&(t[r].selected=i),i&&n&&(t[r].defaultSelected=!0)}else{for(r=""+U0(r),e=null,i=0;i<t.length;i++){if(t[i].value===r){t[i].selected=!0,n&&(t[i].defaultSelected=!0);return}e!==null||t[i].disabled||(e=t[i])}e!==null&&(e.selected=!0)}}function Nz(t,e){if(e.dangerouslySetInnerHTML!=null)throw Error(vn(91));return Ga({},e,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function Hq(t,e){var r=e.value;if(r==null){if(r=e.children,e=e.defaultValue,r!=null){if(e!=null)throw Error(vn(92));if(kT(r)){if(1<r.length)throw Error(vn(93));r=r[0]}e=r}e==null&&(e=""),r=e}t._wrapperState={initialValue:U0(r)}}function Wq(t,e){var r=U0(e.value),n=U0(e.defaultValue);r!=null&&(r=""+r,r!==t.value&&(t.value=r),e.defaultValue==null&&t.defaultValue!==r&&(t.defaultValue=r)),n!=null&&(t.defaultValue=""+n)}function Gq(t){var e=t.textContent;e===t._wrapperState.initialValue&&e!==""&&e!==null&&(t.value=e)}function qq(t){switch(t){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function $z(t,e){return t==null||t==="http://www.w3.org/1999/xhtml"?qq(e):t==="http://www.w3.org/2000/svg"&&e==="foreignObject"?"http://www.w3.org/1999/xhtml":t}var Ok,Xq=function(t){return typeof MSApp!="undefined"&&MSApp.execUnsafeLocalFunction?function(e,r,n,i){MSApp.execUnsafeLocalFunction(function(){return t(e,r,n,i)})}:t}(function(t,e){if(t.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in t)t.innerHTML=e;else{for(Ok=Ok||document.createElement("div"),Ok.innerHTML="<svg>"+e.valueOf().toString()+"</svg>",e=Ok.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function OT(t,e){if(e){var r=t.firstChild;if(r&&r===t.lastChild&&r.nodeType===3){r.nodeValue=e;return}}t.textContent=e}var LT={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},wye=["Webkit","ms","Moz","O"];Object.keys(LT).forEach(function(t){wye.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),LT[e]=LT[t]})});function Yq(t,e,r){return e==null||typeof e=="boolean"||e===""?"":r||typeof e!="number"||e===0||LT.hasOwnProperty(t)&<[t]?(""+e).trim():e+"px"}function Kq(t,e){t=t.style;for(var r in e)if(e.hasOwnProperty(r)){var n=r.indexOf("--")===0,i=Yq(r,e[r],n);r==="float"&&(r="cssFloat"),n?t.setProperty(r,i):t[r]=i}}var Cye=Ga({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 Fz(t,e){if(e){if(Cye[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(vn(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(vn(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(vn(61))}if(e.style!=null&&typeof e.style!="object")throw Error(vn(62))}}function zz(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Bz=null;function jz(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Uz=null,u2=null,f2=null;function Zq(t){if(t=rP(t)){if(typeof Uz!="function")throw Error(vn(280));var e=t.stateNode;e&&(e=rO(e),Uz(t.stateNode,t.type,e))}}function Qq(t){u2?f2?f2.push(t):f2=[t]:u2=t}function Jq(){if(u2){var t=u2,e=f2;if(f2=u2=null,Zq(t),e)for(t=0;t<e.length;t++)Zq(e[t])}}function eX(t,e){return t(e)}function tX(){}var Vz=!1;function rX(t,e,r){if(Vz)return t(e,r);Vz=!0;try{return eX(t,e,r)}finally{Vz=!1,(u2!==null||f2!==null)&&(tX(),Jq())}}function DT(t,e){var r=t.stateNode;if(r===null)return null;var n=rO(r);if(n===null)return null;r=n[e];e:switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(t=t.type,n=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!n;break e;default:t=!1}if(t)return null;if(r&&typeof r!="function")throw Error(vn(231,e,typeof r));return r}var Hz=!1;if(ey)try{var NT={};Object.defineProperty(NT,"passive",{get:function(){Hz=!0}}),window.addEventListener("test",NT,NT),window.removeEventListener("test",NT,NT)}catch{Hz=!1}function Eye(t,e,r,n,i,o,a,s,l){var u=Array.prototype.slice.call(arguments,3);try{e.apply(r,u)}catch(p){this.onError(p)}}var $T=!1,Lk=null,Dk=!1,Wz=null,Sye={onError:function(t){$T=!0,Lk=t}};function Tye(t,e,r,n,i,o,a,s,l){$T=!1,Lk=null,Eye.apply(Sye,arguments)}function Pye(t,e,r,n,i,o,a,s,l){if(Tye.apply(this,arguments),$T){if($T){var u=Lk;$T=!1,Lk=null}else throw Error(vn(198));Dk||(Dk=!0,Wz=u)}}function g1(t){var e=t,r=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do e=t,(e.flags&4098)!=0&&(r=e.return),t=e.return;while(t)}return e.tag===3?r:null}function nX(t){if(t.tag===13){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function iX(t){if(g1(t)!==t)throw Error(vn(188))}function Iye(t){var e=t.alternate;if(!e){if(e=g1(t),e===null)throw Error(vn(188));return e!==t?null:t}for(var r=t,n=e;;){var i=r.return;if(i===null)break;var o=i.alternate;if(o===null){if(n=i.return,n!==null){r=n;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===r)return iX(i),t;if(o===n)return iX(i),e;o=o.sibling}throw Error(vn(188))}if(r.return!==n.return)r=i,n=o;else{for(var a=!1,s=i.child;s;){if(s===r){a=!0,r=i,n=o;break}if(s===n){a=!0,n=i,r=o;break}s=s.sibling}if(!a){for(s=o.child;s;){if(s===r){a=!0,r=o,n=i;break}if(s===n){a=!0,n=o,r=i;break}s=s.sibling}if(!a)throw Error(vn(189))}}if(r.alternate!==n)throw Error(vn(190))}if(r.tag!==3)throw Error(vn(188));return r.stateNode.current===r?t:e}function oX(t){return t=Iye(t),t!==null?sX(t):null}function sX(t){if(t.tag===5||t.tag===6)return t;for(t=t.child;t!==null;){var e=sX(t);if(e!==null)return e;t=t.sibling}return null}var aX=jd.unstable_scheduleCallback,lX=jd.unstable_cancelCallback,Mye=jd.unstable_shouldYield,Aye=jd.unstable_requestPaint,_l=jd.unstable_now,Rye=jd.unstable_getCurrentPriorityLevel,Gz=jd.unstable_ImmediatePriority,cX=jd.unstable_UserBlockingPriority,Nk=jd.unstable_NormalPriority,kye=jd.unstable_LowPriority,uX=jd.unstable_IdlePriority,$k=null,Og=null;function Oye(t){if(Og&&typeof Og.onCommitFiberRoot=="function")try{Og.onCommitFiberRoot($k,t,void 0,(t.current.flags&128)==128)}catch{}}var mm=Math.clz32?Math.clz32:Nye,Lye=Math.log,Dye=Math.LN2;function Nye(t){return t>>>=0,t===0?32:31-(Lye(t)/Dye|0)|0}var Fk=64,zk=4194304;function FT(t){switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function Bk(t,e){var r=t.pendingLanes;if(r===0)return 0;var n=0,i=t.suspendedLanes,o=t.pingedLanes,a=r&268435455;if(a!==0){var s=a&~i;s!==0?n=FT(s):(o&=a,o!==0&&(n=FT(o)))}else a=r&~i,a!==0?n=FT(a):o!==0&&(n=FT(o));if(n===0)return 0;if(e!==0&&e!==n&&(e&i)==0&&(i=n&-n,o=e&-e,i>=o||i===16&&(o&4194240)!=0))return e;if((n&4)!=0&&(n|=r&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=n;0<e;)r=31-mm(e),i=1<<r,n|=t[r],e&=~i;return n}function $ye(t,e){switch(t){case 1:case 2:case 4:return e+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 e+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 Fye(t,e){for(var r=t.suspendedLanes,n=t.pingedLanes,i=t.expirationTimes,o=t.pendingLanes;0<o;){var a=31-mm(o),s=1<<a,l=i[a];l===-1?((s&r)==0||(s&n)!=0)&&(i[a]=$ye(s,e)):l<=e&&(t.expiredLanes|=s),o&=~s}}function qz(t){return t=t.pendingLanes&-1073741825,t!==0?t:t&1073741824?1073741824:0}function fX(){var t=Fk;return Fk<<=1,(Fk&4194240)==0&&(Fk=64),t}function Xz(t){for(var e=[],r=0;31>r;r++)e.push(t);return e}function zT(t,e,r){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-mm(e),t[e]=r}function zye(t,e){var r=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var n=t.eventTimes;for(t=t.expirationTimes;0<r;){var i=31-mm(r),o=1<<i;e[i]=0,n[i]=-1,t[i]=-1,r&=~o}}function Yz(t,e){var r=t.entangledLanes|=e;for(t=t.entanglements;r;){var n=31-mm(r),i=1<<n;i&e|t[n]&e&&(t[n]|=e),r&=~i}}var _s=0;function dX(t){return t&=-t,1<t?4<t?(t&268435455)!=0?16:536870912:4:1}var hX,Kz,pX,mX,gX,Zz=!1,jk=[],V0=null,H0=null,W0=null,BT=new Map,jT=new Map,G0=[],Bye="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 vX(t,e){switch(t){case"focusin":case"focusout":V0=null;break;case"dragenter":case"dragleave":H0=null;break;case"mouseover":case"mouseout":W0=null;break;case"pointerover":case"pointerout":BT.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":jT.delete(e.pointerId)}}function UT(t,e,r,n,i,o){return t===null||t.nativeEvent!==o?(t={blockedOn:e,domEventName:r,eventSystemFlags:n,nativeEvent:o,targetContainers:[i]},e!==null&&(e=rP(e),e!==null&&Kz(e)),t):(t.eventSystemFlags|=n,e=t.targetContainers,i!==null&&e.indexOf(i)===-1&&e.push(i),t)}function jye(t,e,r,n,i){switch(e){case"focusin":return V0=UT(V0,t,e,r,n,i),!0;case"dragenter":return H0=UT(H0,t,e,r,n,i),!0;case"mouseover":return W0=UT(W0,t,e,r,n,i),!0;case"pointerover":var o=i.pointerId;return BT.set(o,UT(BT.get(o)||null,t,e,r,n,i)),!0;case"gotpointercapture":return o=i.pointerId,jT.set(o,UT(jT.get(o)||null,t,e,r,n,i)),!0}return!1}function yX(t){var e=v1(t.target);if(e!==null){var r=g1(e);if(r!==null){if(e=r.tag,e===13){if(e=nX(r),e!==null){t.blockedOn=e,gX(t.priority,function(){pX(r)});return}}else if(e===3&&r.stateNode.current.memoizedState.isDehydrated){t.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}t.blockedOn=null}function Uk(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var r=Jz(t.domEventName,t.eventSystemFlags,e[0],t.nativeEvent);if(r===null){r=t.nativeEvent;var n=new r.constructor(r.type,r);Bz=n,r.target.dispatchEvent(n),Bz=null}else return e=rP(r),e!==null&&Kz(e),t.blockedOn=r,!1;e.shift()}return!0}function xX(t,e,r){Uk(t)&&r.delete(e)}function Uye(){Zz=!1,V0!==null&&Uk(V0)&&(V0=null),H0!==null&&Uk(H0)&&(H0=null),W0!==null&&Uk(W0)&&(W0=null),BT.forEach(xX),jT.forEach(xX)}function VT(t,e){t.blockedOn===e&&(t.blockedOn=null,Zz||(Zz=!0,jd.unstable_scheduleCallback(jd.unstable_NormalPriority,Uye)))}function HT(t){function e(i){return VT(i,t)}if(0<jk.length){VT(jk[0],t);for(var r=1;r<jk.length;r++){var n=jk[r];n.blockedOn===t&&(n.blockedOn=null)}}for(V0!==null&&VT(V0,t),H0!==null&&VT(H0,t),W0!==null&&VT(W0,t),BT.forEach(e),jT.forEach(e),r=0;r<G0.length;r++)n=G0[r],n.blockedOn===t&&(n.blockedOn=null);for(;0<G0.length&&(r=G0[0],r.blockedOn===null);)yX(r),r.blockedOn===null&&G0.shift()}var d2=ty.ReactCurrentBatchConfig,Vk=!0;function Vye(t,e,r,n){var i=_s,o=d2.transition;d2.transition=null;try{_s=1,Qz(t,e,r,n)}finally{_s=i,d2.transition=o}}function Hye(t,e,r,n){var i=_s,o=d2.transition;d2.transition=null;try{_s=4,Qz(t,e,r,n)}finally{_s=i,d2.transition=o}}function Qz(t,e,r,n){if(Vk){var i=Jz(t,e,r,n);if(i===null)gB(t,e,n,Hk,r),vX(t,n);else if(jye(i,t,e,r,n))n.stopPropagation();else if(vX(t,n),e&4&&-1<Bye.indexOf(t)){for(;i!==null;){var o=rP(i);if(o!==null&&hX(o),o=Jz(t,e,r,n),o===null&&gB(t,e,n,Hk,r),o===i)break;i=o}i!==null&&n.stopPropagation()}else gB(t,e,n,null,r)}}var Hk=null;function Jz(t,e,r,n){if(Hk=null,t=jz(n),t=v1(t),t!==null)if(e=g1(t),e===null)t=null;else if(r=e.tag,r===13){if(t=nX(e),t!==null)return t;t=null}else if(r===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;t=null}else e!==t&&(t=null);return Hk=t,null}function _X(t){switch(t){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Rye()){case Gz:return 1;case cX:return 4;case Nk:case kye:return 16;case uX:return 536870912;default:return 16}default:return 16}}var q0=null,eB=null,Wk=null;function bX(){if(Wk)return Wk;var t,e=eB,r=e.length,n,i="value"in q0?q0.value:q0.textContent,o=i.length;for(t=0;t<r&&e[t]===i[t];t++);var a=r-t;for(n=1;n<=a&&e[r-n]===i[o-n];n++);return Wk=i.slice(t,1<n?1-n:void 0)}function Gk(t){var e=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&e===13&&(t=13)):t=e,t===10&&(t=13),32<=t||t===13?t:0}function qk(){return!0}function wX(){return!1}function Ud(t){function e(r,n,i,o,a){this._reactName=r,this._targetInst=i,this.type=n,this.nativeEvent=o,this.target=a,this.currentTarget=null;for(var s in t)t.hasOwnProperty(s)&&(r=t[s],this[s]=r?r(o):o[s]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?qk:wX,this.isPropagationStopped=wX,this}return Ga(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=qk)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=qk)},persist:function(){},isPersistent:qk}),e}var h2={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},tB=Ud(h2),WT=Ga({},h2,{view:0,detail:0}),Wye=Ud(WT),rB,nB,GT,Xk=Ga({},WT,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:oB,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==GT&&(GT&&t.type==="mousemove"?(rB=t.screenX-GT.screenX,nB=t.screenY-GT.screenY):nB=rB=0,GT=t),rB)},movementY:function(t){return"movementY"in t?t.movementY:nB}}),CX=Ud(Xk),Gye=Ga({},Xk,{dataTransfer:0}),qye=Ud(Gye),Xye=Ga({},WT,{relatedTarget:0}),iB=Ud(Xye),Yye=Ga({},h2,{animationName:0,elapsedTime:0,pseudoElement:0}),Kye=Ud(Yye),Zye=Ga({},h2,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),Qye=Ud(Zye),Jye=Ga({},h2,{data:0}),EX=Ud(Jye),e0e={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},t0e={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"},r0e={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function n0e(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=r0e[t])?!!e[t]:!1}function oB(){return n0e}var i0e=Ga({},WT,{key:function(t){if(t.key){var e=e0e[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=Gk(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?t0e[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:oB,charCode:function(t){return t.type==="keypress"?Gk(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?Gk(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),o0e=Ud(i0e),s0e=Ga({},Xk,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),SX=Ud(s0e),a0e=Ga({},WT,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:oB}),l0e=Ud(a0e),c0e=Ga({},h2,{propertyName:0,elapsedTime:0,pseudoElement:0}),u0e=Ud(c0e),f0e=Ga({},Xk,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),d0e=Ud(f0e),h0e=[9,13,27,32],sB=ey&&"CompositionEvent"in window,qT=null;ey&&"documentMode"in document&&(qT=document.documentMode);var p0e=ey&&"TextEvent"in window&&!qT,TX=ey&&(!sB||qT&&8<qT&&11>=qT),PX=String.fromCharCode(32),IX=!1;function MX(t,e){switch(t){case"keyup":return h0e.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function AX(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var p2=!1;function m0e(t,e){switch(t){case"compositionend":return AX(e);case"keypress":return e.which!==32?null:(IX=!0,PX);case"textInput":return t=e.data,t===PX&&IX?null:t;default:return null}}function g0e(t,e){if(p2)return t==="compositionend"||!sB&&MX(t,e)?(t=bX(),Wk=eB=q0=null,p2=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return TX&&e.locale!=="ko"?null:e.data;default:return null}}var v0e={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 RX(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!v0e[t.type]:e==="textarea"}function kX(t,e,r,n){Qq(n),e=Jk(e,"onChange"),0<e.length&&(r=new tB("onChange","change",null,r,n),t.push({event:r,listeners:e}))}var XT=null,YT=null;function y0e(t){KX(t,0)}function Yk(t){var e=x2(t);if(Bq(e))return t}function x0e(t,e){if(t==="change")return e}var OX=!1;if(ey){var aB;if(ey){var lB="oninput"in document;if(!lB){var LX=document.createElement("div");LX.setAttribute("oninput","return;"),lB=typeof LX.oninput=="function"}aB=lB}else aB=!1;OX=aB&&(!document.documentMode||9<document.documentMode)}function DX(){XT&&(XT.detachEvent("onpropertychange",NX),YT=XT=null)}function NX(t){if(t.propertyName==="value"&&Yk(YT)){var e=[];kX(e,YT,t,jz(t)),rX(y0e,e)}}function _0e(t,e,r){t==="focusin"?(DX(),XT=e,YT=r,XT.attachEvent("onpropertychange",NX)):t==="focusout"&&DX()}function b0e(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return Yk(YT)}function w0e(t,e){if(t==="click")return Yk(e)}function C0e(t,e){if(t==="input"||t==="change")return Yk(e)}function E0e(t,e){return t===e&&(t!==0||1/t==1/e)||t!==t&&e!==e}var gm=typeof Object.is=="function"?Object.is:E0e;function KT(t,e){if(gm(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;var r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;for(n=0;n<r.length;n++){var i=r[n];if(!xz.call(e,i)||!gm(t[i],e[i]))return!1}return!0}function $X(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function FX(t,e){var r=$X(t);t=0;for(var n;r;){if(r.nodeType===3){if(n=t+r.textContent.length,t<=e&&n>=e)return{node:r,offset:e-t};t=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=$X(r)}}function zX(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?zX(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function BX(){for(var t=window,e=kk();e instanceof t.HTMLIFrameElement;){try{var r=typeof e.contentWindow.location.href=="string"}catch{r=!1}if(r)t=e.contentWindow;else break;e=kk(t.document)}return e}function cB(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function S0e(t){var e=BX(),r=t.focusedElem,n=t.selectionRange;if(e!==r&&r&&r.ownerDocument&&zX(r.ownerDocument.documentElement,r)){if(n!==null&&cB(r)){if(e=n.start,t=n.end,t===void 0&&(t=e),"selectionStart"in r)r.selectionStart=e,r.selectionEnd=Math.min(t,r.value.length);else if(t=(e=r.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var i=r.textContent.length,o=Math.min(n.start,i);n=n.end===void 0?o:Math.min(n.end,i),!t.extend&&o>n&&(i=n,n=o,o=i),i=FX(r,o);var a=FX(r,n);i&&a&&(t.rangeCount!==1||t.anchorNode!==i.node||t.anchorOffset!==i.offset||t.focusNode!==a.node||t.focusOffset!==a.offset)&&(e=e.createRange(),e.setStart(i.node,i.offset),t.removeAllRanges(),o>n?(t.addRange(e),t.extend(a.node,a.offset)):(e.setEnd(a.node,a.offset),t.addRange(e)))}}for(e=[],t=r;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<e.length;r++)t=e[r],t.element.scrollLeft=t.left,t.element.scrollTop=t.top}}var T0e=ey&&"documentMode"in document&&11>=document.documentMode,m2=null,uB=null,ZT=null,fB=!1;function jX(t,e,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;fB||m2==null||m2!==kk(n)||(n=m2,"selectionStart"in n&&cB(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),ZT&&KT(ZT,n)||(ZT=n,n=Jk(uB,"onSelect"),0<n.length&&(e=new tB("onSelect","select",null,e,r),t.push({event:e,listeners:n}),e.target=m2)))}function Kk(t,e){var r={};return r[t.toLowerCase()]=e.toLowerCase(),r["Webkit"+t]="webkit"+e,r["Moz"+t]="moz"+e,r}var g2={animationend:Kk("Animation","AnimationEnd"),animationiteration:Kk("Animation","AnimationIteration"),animationstart:Kk("Animation","AnimationStart"),transitionend:Kk("Transition","TransitionEnd")},dB={},UX={};ey&&(UX=document.createElement("div").style,"AnimationEvent"in window||(delete g2.animationend.animation,delete g2.animationiteration.animation,delete g2.animationstart.animation),"TransitionEvent"in window||delete g2.transitionend.transition);function Zk(t){if(dB[t])return dB[t];if(!g2[t])return t;var e=g2[t],r;for(r in e)if(e.hasOwnProperty(r)&&r in UX)return dB[t]=e[r];return t}var VX=Zk("animationend"),HX=Zk("animationiteration"),WX=Zk("animationstart"),GX=Zk("transitionend"),qX=new Map,XX="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 X0(t,e){qX.set(t,e),m1(e,[t])}for(var hB=0;hB<XX.length;hB++){var pB=XX[hB],P0e=pB.toLowerCase(),I0e=pB[0].toUpperCase()+pB.slice(1);X0(P0e,"on"+I0e)}X0(VX,"onAnimationEnd");X0(HX,"onAnimationIteration");X0(WX,"onAnimationStart");X0("dblclick","onDoubleClick");X0("focusin","onFocus");X0("focusout","onBlur");X0(GX,"onTransitionEnd");s2("onMouseEnter",["mouseout","mouseover"]);s2("onMouseLeave",["mouseout","mouseover"]);s2("onPointerEnter",["pointerout","pointerover"]);s2("onPointerLeave",["pointerout","pointerover"]);m1("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));m1("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));m1("onBeforeInput",["compositionend","keypress","textInput","paste"]);m1("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));m1("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));m1("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var QT="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(" "),M0e=new Set("cancel close invalid load scroll toggle".split(" ").concat(QT));function YX(t,e,r){var n=t.type||"unknown-event";t.currentTarget=r,Pye(n,e,void 0,t),t.currentTarget=null}function KX(t,e){e=(e&4)!=0;for(var r=0;r<t.length;r++){var n=t[r],i=n.event;n=n.listeners;e:{var o=void 0;if(e)for(var a=n.length-1;0<=a;a--){var s=n[a],l=s.instance,u=s.currentTarget;if(s=s.listener,l!==o&&i.isPropagationStopped())break e;YX(i,s,u),o=l}else for(a=0;a<n.length;a++){if(s=n[a],l=s.instance,u=s.currentTarget,s=s.listener,l!==o&&i.isPropagationStopped())break e;YX(i,s,u),o=l}}}if(Dk)throw t=Wz,Dk=!1,Wz=null,t}function ha(t,e){var r=e[wB];r===void 0&&(r=e[wB]=new Set);var n=t+"__bubble";r.has(n)||(ZX(e,t,2,!1),r.add(n))}function mB(t,e,r){var n=0;e&&(n|=4),ZX(r,t,n,e)}var Qk="_reactListening"+Math.random().toString(36).slice(2);function JT(t){if(!t[Qk]){t[Qk]=!0,kq.forEach(function(r){r!=="selectionchange"&&(M0e.has(r)||mB(r,!1,t),mB(r,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[Qk]||(e[Qk]=!0,mB("selectionchange",!1,e))}}function ZX(t,e,r,n){switch(_X(e)){case 1:var i=Vye;break;case 4:i=Hye;break;default:i=Qz}r=i.bind(null,e,r,t),i=void 0,!Hz||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(i=!0),n?i!==void 0?t.addEventListener(e,r,{capture:!0,passive:i}):t.addEventListener(e,r,!0):i!==void 0?t.addEventListener(e,r,{passive:i}):t.addEventListener(e,r,!1)}function gB(t,e,r,n,i){var o=n;if((e&1)==0&&(e&2)==0&&n!==null)e:for(;;){if(n===null)return;var a=n.tag;if(a===3||a===4){var s=n.stateNode.containerInfo;if(s===i||s.nodeType===8&&s.parentNode===i)break;if(a===4)for(a=n.return;a!==null;){var l=a.tag;if((l===3||l===4)&&(l=a.stateNode.containerInfo,l===i||l.nodeType===8&&l.parentNode===i))return;a=a.return}for(;s!==null;){if(a=v1(s),a===null)return;if(l=a.tag,l===5||l===6){n=o=a;continue e}s=s.parentNode}}n=n.return}rX(function(){var u=o,p=jz(r),m=[];e:{var v=qX.get(t);if(v!==void 0){var x=tB,y=t;switch(t){case"keypress":if(Gk(r)===0)break e;case"keydown":case"keyup":x=o0e;break;case"focusin":y="focus",x=iB;break;case"focusout":y="blur",x=iB;break;case"beforeblur":case"afterblur":x=iB;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":x=CX;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":x=qye;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":x=l0e;break;case VX:case HX:case WX:x=Kye;break;case GX:x=u0e;break;case"scroll":x=Wye;break;case"wheel":x=d0e;break;case"copy":case"cut":case"paste":x=Qye;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":x=SX}var _=(e&4)!=0,w=!_&&t==="scroll",C=_?v!==null?v+"Capture":null:v;_=[];for(var E=u,T;E!==null;){T=E;var A=T.stateNode;if(T.tag===5&&A!==null&&(T=A,C!==null&&(A=DT(E,C),A!=null&&_.push(eP(E,A,T)))),w)break;E=E.return}0<_.length&&(v=new x(v,y,null,r,p),m.push({event:v,listeners:_}))}}if((e&7)==0){e:{if(v=t==="mouseover"||t==="pointerover",x=t==="mouseout"||t==="pointerout",v&&r!==Bz&&(y=r.relatedTarget||r.fromElement)&&(v1(y)||y[ry]))break e;if((x||v)&&(v=p.window===p?p:(v=p.ownerDocument)?v.defaultView||v.parentWindow:window,x?(y=r.relatedTarget||r.toElement,x=u,y=y?v1(y):null,y!==null&&(w=g1(y),y!==w||y.tag!==5&&y.tag!==6)&&(y=null)):(x=null,y=u),x!==y)){if(_=CX,A="onMouseLeave",C="onMouseEnter",E="mouse",(t==="pointerout"||t==="pointerover")&&(_=SX,A="onPointerLeave",C="onPointerEnter",E="pointer"),w=x==null?v:x2(x),T=y==null?v:x2(y),v=new _(A,E+"leave",x,r,p),v.target=w,v.relatedTarget=T,A=null,v1(p)===u&&(_=new _(C,E+"enter",y,r,p),_.target=T,_.relatedTarget=w,A=_),w=A,x&&y)t:{for(_=x,C=y,E=0,T=_;T;T=v2(T))E++;for(T=0,A=C;A;A=v2(A))T++;for(;0<E-T;)_=v2(_),E--;for(;0<T-E;)C=v2(C),T--;for(;E--;){if(_===C||C!==null&&_===C.alternate)break t;_=v2(_),C=v2(C)}_=null}else _=null;x!==null&&QX(m,v,x,_,!1),y!==null&&w!==null&&QX(m,w,y,_,!0)}}e:{if(v=u?x2(u):window,x=v.nodeName&&v.nodeName.toLowerCase(),x==="select"||x==="input"&&v.type==="file")var k=x0e;else if(RX(v))if(OX)k=C0e;else{k=b0e;var X=_0e}else(x=v.nodeName)&&x.toLowerCase()==="input"&&(v.type==="checkbox"||v.type==="radio")&&(k=w0e);if(k&&(k=k(t,u))){kX(m,k,r,p);break e}X&&X(t,v,u),t==="focusout"&&(X=v._wrapperState)&&X.controlled&&v.type==="number"&&Dz(v,"number",v.value)}switch(X=u?x2(u):window,t){case"focusin":(RX(X)||X.contentEditable==="true")&&(m2=X,uB=u,ZT=null);break;case"focusout":ZT=uB=m2=null;break;case"mousedown":fB=!0;break;case"contextmenu":case"mouseup":case"dragend":fB=!1,jX(m,r,p);break;case"selectionchange":if(T0e)break;case"keydown":case"keyup":jX(m,r,p)}var Z;if(sB)e:{switch(t){case"compositionstart":var W="onCompositionStart";break e;case"compositionend":W="onCompositionEnd";break e;case"compositionupdate":W="onCompositionUpdate";break e}W=void 0}else p2?MX(t,r)&&(W="onCompositionEnd"):t==="keydown"&&r.keyCode===229&&(W="onCompositionStart");W&&(TX&&r.locale!=="ko"&&(p2||W!=="onCompositionStart"?W==="onCompositionEnd"&&p2&&(Z=bX()):(q0=p,eB="value"in q0?q0.value:q0.textContent,p2=!0)),X=Jk(u,W),0<X.length&&(W=new EX(W,t,null,r,p),m.push({event:W,listeners:X}),Z?W.data=Z:(Z=AX(r),Z!==null&&(W.data=Z)))),(Z=p0e?m0e(t,r):g0e(t,r))&&(u=Jk(u,"onBeforeInput"),0<u.length&&(p=new EX("onBeforeInput","beforeinput",null,r,p),m.push({event:p,listeners:u}),p.data=Z))}KX(m,e)})}function eP(t,e,r){return{instance:t,listener:e,currentTarget:r}}function Jk(t,e){for(var r=e+"Capture",n=[];t!==null;){var i=t,o=i.stateNode;i.tag===5&&o!==null&&(i=o,o=DT(t,r),o!=null&&n.unshift(eP(t,o,i)),o=DT(t,e),o!=null&&n.push(eP(t,o,i))),t=t.return}return n}function v2(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5);return t||null}function QX(t,e,r,n,i){for(var o=e._reactName,a=[];r!==null&&r!==n;){var s=r,l=s.alternate,u=s.stateNode;if(l!==null&&l===n)break;s.tag===5&&u!==null&&(s=u,i?(l=DT(r,o),l!=null&&a.unshift(eP(r,l,s))):i||(l=DT(r,o),l!=null&&a.push(eP(r,l,s)))),r=r.return}a.length!==0&&t.push({event:e,listeners:a})}var A0e=/\r\n?/g,R0e=/\u0000|\uFFFD/g;function JX(t){return(typeof t=="string"?t:""+t).replace(A0e,` `).replace(R0e,"")}function eO(t,e,r){if(e=JX(e),JX(t)!==e&&r)throw Error(vn(425))}function tO(){}var vB=null,yB=null;function xB(t,e){return t==="textarea"||t==="noscript"||typeof e.children=="string"||typeof e.children=="number"||typeof e.dangerouslySetInnerHTML=="object"&&e.dangerouslySetInnerHTML!==null&&e.dangerouslySetInnerHTML.__html!=null}var _B=typeof setTimeout=="function"?setTimeout:void 0,k0e=typeof clearTimeout=="function"?clearTimeout:void 0,eY=typeof Promise=="function"?Promise:void 0,O0e=typeof queueMicrotask=="function"?queueMicrotask:typeof eY!="undefined"?function(t){return eY.resolve(null).then(t).catch(L0e)}:_B;function L0e(t){setTimeout(function(){throw t})}function bB(t,e){var r=e,n=0;do{var i=r.nextSibling;if(t.removeChild(r),i&&i.nodeType===8)if(r=i.data,r==="/$"){if(n===0){t.removeChild(i),HT(e);return}n--}else r!=="$"&&r!=="$?"&&r!=="$!"||n++;r=i}while(r);HT(e)}function Y0(t){for(;t!=null;t=t.nextSibling){var e=t.nodeType;if(e===1||e===3)break;if(e===8){if(e=t.data,e==="$"||e==="$!"||e==="$?")break;if(e==="/$")return null}}return t}function tY(t){t=t.previousSibling;for(var e=0;t;){if(t.nodeType===8){var r=t.data;if(r==="$"||r==="$!"||r==="$?"){if(e===0)return t;e--}else r==="/$"&&e++}t=t.previousSibling}return null}var y2=Math.random().toString(36).slice(2),Lg="__reactFiber$"+y2,tP="__reactProps$"+y2,ry="__reactContainer$"+y2,wB="__reactEvents$"+y2,D0e="__reactListeners$"+y2,N0e="__reactHandles$"+y2;function v1(t){var e=t[Lg];if(e)return e;for(var r=t.parentNode;r;){if(e=r[ry]||r[Lg]){if(r=e.alternate,e.child!==null||r!==null&&r.child!==null)for(t=tY(t);t!==null;){if(r=t[Lg])return r;t=tY(t)}return e}t=r,r=t.parentNode}return null}function rP(t){return t=t[Lg]||t[ry],!t||t.tag!==5&&t.tag!==6&&t.tag!==13&&t.tag!==3?null:t}function x2(t){if(t.tag===5||t.tag===6)return t.stateNode;throw Error(vn(33))}function rO(t){return t[tP]||null}var CB=[],_2=-1;function K0(t){return{current:t}}function pa(t){0>_2||(t.current=CB[_2],CB[_2]=null,_2--)}function Qs(t,e){_2++,CB[_2]=t.current,t.current=e}var Z0={},_u=K0(Z0),jf=K0(!1),y1=Z0;function b2(t,e){var r=t.type.contextTypes;if(!r)return Z0;var n=t.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===e)return n.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in r)i[o]=e[o];return n&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=i),i}function Uf(t){return t=t.childContextTypes,t!=null}function nO(){pa(jf),pa(_u)}function rY(t,e,r){if(_u.current!==Z0)throw Error(vn(168));Qs(_u,e),Qs(jf,r)}function nY(t,e,r){var n=t.stateNode;if(e=e.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var i in n)if(!(i in e))throw Error(vn(108,_ye(t)||"Unknown",i));return Ga({},r,n)}function iO(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||Z0,y1=_u.current,Qs(_u,t),Qs(jf,jf.current),!0}function iY(t,e,r){var n=t.stateNode;if(!n)throw Error(vn(169));r?(t=nY(t,e,y1),n.__reactInternalMemoizedMergedChildContext=t,pa(jf),pa(_u),Qs(_u,t)):pa(jf),Qs(jf,r)}var ny=null,oO=!1,EB=!1;function oY(t){ny===null?ny=[t]:ny.push(t)}function $0e(t){oO=!0,oY(t)}function Q0(){if(!EB&&ny!==null){EB=!0;var t=0,e=_s;try{var r=ny;for(_s=1;t<r.length;t++){var n=r[t];do n=n(!0);while(n!==null)}ny=null,oO=!1}catch(i){throw ny!==null&&(ny=ny.slice(t+1)),aX(Gz,Q0),i}finally{_s=e,EB=!1}}return null}var w2=[],C2=0,sO=null,aO=0,Hh=[],Wh=0,x1=null,iy=1,oy="";function _1(t,e){w2[C2++]=aO,w2[C2++]=sO,sO=t,aO=e}function sY(t,e,r){Hh[Wh++]=iy,Hh[Wh++]=oy,Hh[Wh++]=x1,x1=t;var n=iy;t=oy;var i=32-mm(n)-1;n&=~(1<<i),r+=1;var o=32-mm(e)+i;if(30<o){var a=i-i%5;o=(n&(1<<a)-1).toString(32),n>>=a,i-=a,iy=1<<32-mm(e)+i|r<<i|n,oy=o+t}else iy=1<<o|r<<i|n,oy=t}function SB(t){t.return!==null&&(_1(t,1),sY(t,1,0))}function TB(t){for(;t===sO;)sO=w2[--C2],w2[C2]=null,aO=w2[--C2],w2[C2]=null;for(;t===x1;)x1=Hh[--Wh],Hh[Wh]=null,oy=Hh[--Wh],Hh[Wh]=null,iy=Hh[--Wh],Hh[Wh]=null}var Vd=null,Hd=null,Sa=!1,vm=null;function aY(t,e){var r=Yh(5,null,null,0);r.elementType="DELETED",r.stateNode=e,r.return=t,e=t.deletions,e===null?(t.deletions=[r],t.flags|=16):e.push(r)}function lY(t,e){switch(t.tag){case 5:var r=t.type;return e=e.nodeType!==1||r.toLowerCase()!==e.nodeName.toLowerCase()?null:e,e!==null?(t.stateNode=e,Vd=t,Hd=Y0(e.firstChild),!0):!1;case 6:return e=t.pendingProps===""||e.nodeType!==3?null:e,e!==null?(t.stateNode=e,Vd=t,Hd=null,!0):!1;case 13:return e=e.nodeType!==8?null:e,e!==null?(r=x1!==null?{id:iy,overflow:oy}:null,t.memoizedState={dehydrated:e,treeContext:r,retryLane:1073741824},r=Yh(18,null,null,0),r.stateNode=e,r.return=t,t.child=r,Vd=t,Hd=null,!0):!1;default:return!1}}function PB(t){return(t.mode&1)!=0&&(t.flags&128)==0}function IB(t){if(Sa){var e=Hd;if(e){var r=e;if(!lY(t,e)){if(PB(t))throw Error(vn(418));e=Y0(r.nextSibling);var n=Vd;e&&lY(t,e)?aY(n,r):(t.flags=t.flags&-4097|2,Sa=!1,Vd=t)}}else{if(PB(t))throw Error(vn(418));t.flags=t.flags&-4097|2,Sa=!1,Vd=t}}}function cY(t){for(t=t.return;t!==null&&t.tag!==5&&t.tag!==3&&t.tag!==13;)t=t.return;Vd=t}function lO(t){if(t!==Vd)return!1;if(!Sa)return cY(t),Sa=!0,!1;var e;if((e=t.tag!==3)&&!(e=t.tag!==5)&&(e=t.type,e=e!=="head"&&e!=="body"&&!xB(t.type,t.memoizedProps)),e&&(e=Hd)){if(PB(t))throw uY(),Error(vn(418));for(;e;)aY(t,e),e=Y0(e.nextSibling)}if(cY(t),t.tag===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(vn(317));e:{for(t=t.nextSibling,e=0;t;){if(t.nodeType===8){var r=t.data;if(r==="/$"){if(e===0){Hd=Y0(t.nextSibling);break e}e--}else r!=="$"&&r!=="$!"&&r!=="$?"||e++}t=t.nextSibling}Hd=null}}else Hd=Vd?Y0(t.stateNode.nextSibling):null;return!0}function uY(){for(var t=Hd;t;)t=Y0(t.nextSibling)}function E2(){Hd=Vd=null,Sa=!1}function MB(t){vm===null?vm=[t]:vm.push(t)}var F0e=ty.ReactCurrentBatchConfig;function ym(t,e){if(t&&t.defaultProps){e=Ga({},e),t=t.defaultProps;for(var r in t)e[r]===void 0&&(e[r]=t[r]);return e}return e}var cO=K0(null),uO=null,S2=null,AB=null;function RB(){AB=S2=uO=null}function kB(t){var e=cO.current;pa(cO),t._currentValue=e}function OB(t,e,r){for(;t!==null;){var n=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,n!==null&&(n.childLanes|=e)):n!==null&&(n.childLanes&e)!==e&&(n.childLanes|=e),t===r)break;t=t.return}}function T2(t,e){uO=t,AB=S2=null,t=t.dependencies,t!==null&&t.firstContext!==null&&((t.lanes&e)!=0&&(Vf=!0),t.firstContext=null)}function Gh(t){var e=t._currentValue;if(AB!==t)if(t={context:t,memoizedValue:e,next:null},S2===null){if(uO===null)throw Error(vn(308));S2=t,uO.dependencies={lanes:0,firstContext:t}}else S2=S2.next=t;return e}var b1=null;function LB(t){b1===null?b1=[t]:b1.push(t)}function fY(t,e,r,n){var i=e.interleaved;return i===null?(r.next=r,LB(e)):(r.next=i.next,i.next=r),e.interleaved=r,sy(t,n)}function sy(t,e){t.lanes|=e;var r=t.alternate;for(r!==null&&(r.lanes|=e),r=t,t=t.return;t!==null;)t.childLanes|=e,r=t.alternate,r!==null&&(r.childLanes|=e),r=t,t=t.return;return r.tag===3?r.stateNode:null}var J0=!1;function DB(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function dY(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function ay(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function ex(t,e,r){var n=t.updateQueue;if(n===null)return null;if(n=n.shared,(Zo&2)!=0){var i=n.pending;return i===null?e.next=e:(e.next=i.next,i.next=e),n.pending=e,sy(t,r)}return i=n.interleaved,i===null?(e.next=e,LB(n)):(e.next=i.next,i.next=e),n.interleaved=e,sy(t,r)}function fO(t,e,r){if(e=e.updateQueue,e!==null&&(e=e.shared,(r&4194240)!=0)){var n=e.lanes;n&=t.pendingLanes,r|=n,e.lanes=r,Yz(t,r)}}function hY(t,e){var r=t.updateQueue,n=t.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var i=null,o=null;if(r=r.firstBaseUpdate,r!==null){do{var a={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};o===null?i=o=a:o=o.next=a,r=r.next}while(r!==null);o===null?i=o=e:o=o.next=e}else i=o=e;r={baseState:n.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:n.shared,effects:n.effects},t.updateQueue=r;return}t=r.lastBaseUpdate,t===null?r.firstBaseUpdate=e:t.next=e,r.lastBaseUpdate=e}function dO(t,e,r,n){var i=t.updateQueue;J0=!1;var o=i.firstBaseUpdate,a=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var l=s,u=l.next;l.next=null,a===null?o=u:a.next=u,a=l;var p=t.alternate;p!==null&&(p=p.updateQueue,s=p.lastBaseUpdate,s!==a&&(s===null?p.firstBaseUpdate=u:s.next=u,p.lastBaseUpdate=l))}if(o!==null){var m=i.baseState;a=0,p=u=l=null,s=o;do{var v=s.lane,x=s.eventTime;if((n&v)===v){p!==null&&(p=p.next={eventTime:x,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var y=t,_=s;switch(v=e,x=r,_.tag){case 1:if(y=_.payload,typeof y=="function"){m=y.call(x,m,v);break e}m=y;break e;case 3:y.flags=y.flags&-65537|128;case 0:if(y=_.payload,v=typeof y=="function"?y.call(x,m,v):y,v==null)break e;m=Ga({},m,v);break e;case 2:J0=!0}}s.callback!==null&&s.lane!==0&&(t.flags|=64,v=i.effects,v===null?i.effects=[s]:v.push(s))}else x={eventTime:x,lane:v,tag:s.tag,payload:s.payload,callback:s.callback,next:null},p===null?(u=p=x,l=m):p=p.next=x,a|=v;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;v=s,s=v.next,v.next=null,i.lastBaseUpdate=v,i.shared.pending=null}}while(1);if(p===null&&(l=m),i.baseState=l,i.firstBaseUpdate=u,i.lastBaseUpdate=p,e=i.shared.interleaved,e!==null){i=e;do a|=i.lane,i=i.next;while(i!==e)}else o===null&&(i.shared.lanes=0);E1|=a,t.lanes=a,t.memoizedState=m}}function pY(t,e,r){if(t=e.effects,e.effects=null,t!==null)for(e=0;e<t.length;e++){var n=t[e],i=n.callback;if(i!==null){if(n.callback=null,n=r,typeof i!="function")throw Error(vn(191,i));i.call(n)}}}var mY=new Rq.Component().refs;function NB(t,e,r,n){e=t.memoizedState,r=r(n,e),r=r==null?e:Ga({},e,r),t.memoizedState=r,t.lanes===0&&(t.updateQueue.baseState=r)}var hO={isMounted:function(t){return(t=t._reactInternals)?g1(t)===t:!1},enqueueSetState:function(t,e,r){t=t._reactInternals;var n=nf(),i=ix(t),o=ay(n,i);o.payload=e,r!=null&&(o.callback=r),e=ex(t,o,i),e!==null&&(bm(e,t,i,n),fO(e,t,i))},enqueueReplaceState:function(t,e,r){t=t._reactInternals;var n=nf(),i=ix(t),o=ay(n,i);o.tag=1,o.payload=e,r!=null&&(o.callback=r),e=ex(t,o,i),e!==null&&(bm(e,t,i,n),fO(e,t,i))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var r=nf(),n=ix(t),i=ay(r,n);i.tag=2,e!=null&&(i.callback=e),e=ex(t,i,n),e!==null&&(bm(e,t,n,r),fO(e,t,n))}};function gY(t,e,r,n,i,o,a){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(n,o,a):e.prototype&&e.prototype.isPureReactComponent?!KT(r,n)||!KT(i,o):!0}function vY(t,e,r){var n=!1,i=Z0,o=e.contextType;return typeof o=="object"&&o!==null?o=Gh(o):(i=Uf(e)?y1:_u.current,n=e.contextTypes,o=(n=n!=null)?b2(t,i):Z0),e=new e(r,o),t.memoizedState=e.state!==null&&e.state!==void 0?e.state:null,e.updater=hO,t.stateNode=e,e._reactInternals=t,n&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=i,t.__reactInternalMemoizedMaskedChildContext=o),e}function yY(t,e,r,n){t=e.state,typeof e.componentWillReceiveProps=="function"&&e.componentWillReceiveProps(r,n),typeof e.UNSAFE_componentWillReceiveProps=="function"&&e.UNSAFE_componentWillReceiveProps(r,n),e.state!==t&&hO.enqueueReplaceState(e,e.state,null)}function $B(t,e,r,n){var i=t.stateNode;i.props=r,i.state=t.memoizedState,i.refs=mY,DB(t);var o=e.contextType;typeof o=="object"&&o!==null?i.context=Gh(o):(o=Uf(e)?y1:_u.current,i.context=b2(t,o)),i.state=t.memoizedState,o=e.getDerivedStateFromProps,typeof o=="function"&&(NB(t,e,o,r),i.state=t.memoizedState),typeof e.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(e=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),e!==i.state&&hO.enqueueReplaceState(i,i.state,null),dO(t,r,i,n),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308)}function nP(t,e,r){if(t=r.ref,t!==null&&typeof t!="function"&&typeof t!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error(vn(309));var n=r.stateNode}if(!n)throw Error(vn(147,t));var i=n,o=""+t;return e!==null&&e.ref!==null&&typeof e.ref=="function"&&e.ref._stringRef===o?e.ref:(e=function(a){var s=i.refs;s===mY&&(s=i.refs={}),a===null?delete s[o]:s[o]=a},e._stringRef=o,e)}if(typeof t!="string")throw Error(vn(284));if(!r._owner)throw Error(vn(290,t))}return t}function pO(t,e){throw t=Object.prototype.toString.call(e),Error(vn(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t))}function xY(t){var e=t._init;return e(t._payload)}function _Y(t){function e(C,E){if(t){var T=C.deletions;T===null?(C.deletions=[E],C.flags|=16):T.push(E)}}function r(C,E){if(!t)return null;for(;E!==null;)e(C,E),E=E.sibling;return null}function n(C,E){for(C=new Map;E!==null;)E.key!==null?C.set(E.key,E):C.set(E.index,E),E=E.sibling;return C}function i(C,E){return C=sx(C,E),C.index=0,C.sibling=null,C}function o(C,E,T){return C.index=T,t?(T=C.alternate,T!==null?(T=T.index,T<E?(C.flags|=2,E):T):(C.flags|=2,E)):(C.flags|=1048576,E)}function a(C){return t&&C.alternate===null&&(C.flags|=2),C}function s(C,E,T,A){return E===null||E.tag!==6?(E=_6(T,C.mode,A),E.return=C,E):(E=i(E,T),E.return=C,E)}function l(C,E,T,A){var k=T.type;return k===l2?p(C,E,T.props.children,A,T.key):E!==null&&(E.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===j0&&xY(k)===E.type)?(A=i(E,T.props),A.ref=nP(C,E,T),A.return=C,A):(A=OO(T.type,T.key,T.props,null,C.mode,A),A.ref=nP(C,E,T),A.return=C,A)}function u(C,E,T,A){return E===null||E.tag!==4||E.stateNode.containerInfo!==T.containerInfo||E.stateNode.implementation!==T.implementation?(E=b6(T,C.mode,A),E.return=C,E):(E=i(E,T.children||[]),E.return=C,E)}function p(C,E,T,A,k){return E===null||E.tag!==7?(E=I1(T,C.mode,A,k),E.return=C,E):(E=i(E,T),E.return=C,E)}function m(C,E,T){if(typeof E=="string"&&E!==""||typeof E=="number")return E=_6(""+E,C.mode,T),E.return=C,E;if(typeof E=="object"&&E!==null){switch(E.$$typeof){case Ak:return T=OO(E.type,E.key,E.props,null,C.mode,T),T.ref=nP(C,null,E),T.return=C,T;case a2:return E=b6(E,C.mode,T),E.return=C,E;case j0:var A=E._init;return m(C,A(E._payload),T)}if(kT(E)||AT(E))return E=I1(E,C.mode,T,null),E.return=C,E;pO(C,E)}return null}function v(C,E,T,A){var k=E!==null?E.key:null;if(typeof T=="string"&&T!==""||typeof T=="number")return k!==null?null:s(C,E,""+T,A);if(typeof T=="object"&&T!==null){switch(T.$$typeof){case Ak:return T.key===k?l(C,E,T,A):null;case a2:return T.key===k?u(C,E,T,A):null;case j0:return k=T._init,v(C,E,k(T._payload),A)}if(kT(T)||AT(T))return k!==null?null:p(C,E,T,A,null);pO(C,T)}return null}function x(C,E,T,A,k){if(typeof A=="string"&&A!==""||typeof A=="number")return C=C.get(T)||null,s(E,C,""+A,k);if(typeof A=="object"&&A!==null){switch(A.$$typeof){case Ak:return C=C.get(A.key===null?T:A.key)||null,l(E,C,A,k);case a2:return C=C.get(A.key===null?T:A.key)||null,u(E,C,A,k);case j0:var X=A._init;return x(C,E,T,X(A._payload),k)}if(kT(A)||AT(A))return C=C.get(T)||null,p(E,C,A,k,null);pO(E,A)}return null}function y(C,E,T,A){for(var k=null,X=null,Z=E,W=E=0,D=null;Z!==null&&W<T.length;W++){Z.index>W?(D=Z,Z=null):D=Z.sibling;var H=v(C,Z,T[W],A);if(H===null){Z===null&&(Z=D);break}t&&Z&&H.alternate===null&&e(C,Z),E=o(H,E,W),X===null?k=H:X.sibling=H,X=H,Z=D}if(W===T.length)return r(C,Z),Sa&&_1(C,W),k;if(Z===null){for(;W<T.length;W++)Z=m(C,T[W],A),Z!==null&&(E=o(Z,E,W),X===null?k=Z:X.sibling=Z,X=Z);return Sa&&_1(C,W),k}for(Z=n(C,Z);W<T.length;W++)D=x(Z,C,W,T[W],A),D!==null&&(t&&D.alternate!==null&&Z.delete(D.key===null?W:D.key),E=o(D,E,W),X===null?k=D:X.sibling=D,X=D);return t&&Z.forEach(function(N){return e(C,N)}),Sa&&_1(C,W),k}function _(C,E,T,A){var k=AT(T);if(typeof k!="function")throw Error(vn(150));if(T=k.call(T),T==null)throw Error(vn(151));for(var X=k=null,Z=E,W=E=0,D=null,H=T.next();Z!==null&&!H.done;W++,H=T.next()){Z.index>W?(D=Z,Z=null):D=Z.sibling;var N=v(C,Z,H.value,A);if(N===null){Z===null&&(Z=D);break}t&&Z&&N.alternate===null&&e(C,Z),E=o(N,E,W),X===null?k=N:X.sibling=N,X=N,Z=D}if(H.done)return r(C,Z),Sa&&_1(C,W),k;if(Z===null){for(;!H.done;W++,H=T.next())H=m(C,H.value,A),H!==null&&(E=o(H,E,W),X===null?k=H:X.sibling=H,X=H);return Sa&&_1(C,W),k}for(Z=n(C,Z);!H.done;W++,H=T.next())H=x(Z,C,W,H.value,A),H!==null&&(t&&H.alternate!==null&&Z.delete(H.key===null?W:H.key),E=o(H,E,W),X===null?k=H:X.sibling=H,X=H);return t&&Z.forEach(function(j){return e(C,j)}),Sa&&_1(C,W),k}function w(C,E,T,A){if(typeof T=="object"&&T!==null&&T.type===l2&&T.key===null&&(T=T.props.children),typeof T=="object"&&T!==null){switch(T.$$typeof){case Ak:e:{for(var k=T.key,X=E;X!==null;){if(X.key===k){if(k=T.type,k===l2){if(X.tag===7){r(C,X.sibling),E=i(X,T.props.children),E.return=C,C=E;break e}}else if(X.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===j0&&xY(k)===X.type){r(C,X.sibling),E=i(X,T.props),E.ref=nP(C,X,T),E.return=C,C=E;break e}r(C,X);break}else e(C,X);X=X.sibling}T.type===l2?(E=I1(T.props.children,C.mode,A,T.key),E.return=C,C=E):(A=OO(T.type,T.key,T.props,null,C.mode,A),A.ref=nP(C,E,T),A.return=C,C=A)}return a(C);case a2:e:{for(X=T.key;E!==null;){if(E.key===X)if(E.tag===4&&E.stateNode.containerInfo===T.containerInfo&&E.stateNode.implementation===T.implementation){r(C,E.sibling),E=i(E,T.children||[]),E.return=C,C=E;break e}else{r(C,E);break}else e(C,E);E=E.sibling}E=b6(T,C.mode,A),E.return=C,C=E}return a(C);case j0:return X=T._init,w(C,E,X(T._payload),A)}if(kT(T))return y(C,E,T,A);if(AT(T))return _(C,E,T,A);pO(C,T)}return typeof T=="string"&&T!==""||typeof T=="number"?(T=""+T,E!==null&&E.tag===6?(r(C,E.sibling),E=i(E,T),E.return=C,C=E):(r(C,E),E=_6(T,C.mode,A),E.return=C,C=E),a(C)):r(C,E)}return w}var P2=_Y(!0),bY=_Y(!1),iP={},Dg=K0(iP),oP=K0(iP),sP=K0(iP);function w1(t){if(t===iP)throw Error(vn(174));return t}function FB(t,e){switch(Qs(sP,e),Qs(oP,t),Qs(Dg,iP),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:$z(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=$z(e,t)}pa(Dg),Qs(Dg,e)}function I2(){pa(Dg),pa(oP),pa(sP)}function wY(t){w1(sP.current);var e=w1(Dg.current),r=$z(e,t.type);e!==r&&(Qs(oP,t),Qs(Dg,r))}function zB(t){oP.current===t&&(pa(Dg),pa(oP))}var qa=K0(0);function mO(t){for(var e=t;e!==null;){if(e.tag===13){var r=e.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if((e.flags&128)!=0)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var BB=[];function jB(){for(var t=0;t<BB.length;t++)BB[t]._workInProgressVersionPrimary=null;BB.length=0}var gO=ty.ReactCurrentDispatcher,UB=ty.ReactCurrentBatchConfig,C1=0,Xa=null,Ql=null,vc=null,vO=!1,aP=!1,lP=0,z0e=0;function bu(){throw Error(vn(321))}function VB(t,e){if(e===null)return!1;for(var r=0;r<e.length&&r<t.length;r++)if(!gm(t[r],e[r]))return!1;return!0}function HB(t,e,r,n,i,o){if(C1=o,Xa=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,gO.current=t===null||t.memoizedState===null?V0e:H0e,t=r(n,i),aP){o=0;do{if(aP=!1,lP=0,25<=o)throw Error(vn(301));o+=1,vc=Ql=null,e.updateQueue=null,gO.current=W0e,t=r(n,i)}while(aP)}if(gO.current=_O,e=Ql!==null&&Ql.next!==null,C1=0,vc=Ql=Xa=null,vO=!1,e)throw Error(vn(300));return t}function WB(){var t=lP!==0;return lP=0,t}function Ng(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return vc===null?Xa.memoizedState=vc=t:vc=vc.next=t,vc}function qh(){if(Ql===null){var t=Xa.alternate;t=t!==null?t.memoizedState:null}else t=Ql.next;var e=vc===null?Xa.memoizedState:vc.next;if(e!==null)vc=e,Ql=t;else{if(t===null)throw Error(vn(310));Ql=t,t={memoizedState:Ql.memoizedState,baseState:Ql.baseState,baseQueue:Ql.baseQueue,queue:Ql.queue,next:null},vc===null?Xa.memoizedState=vc=t:vc=vc.next=t}return vc}function cP(t,e){return typeof e=="function"?e(t):e}function GB(t){var e=qh(),r=e.queue;if(r===null)throw Error(vn(311));r.lastRenderedReducer=t;var n=Ql,i=n.baseQueue,o=r.pending;if(o!==null){if(i!==null){var a=i.next;i.next=o.next,o.next=a}n.baseQueue=i=o,r.pending=null}if(i!==null){o=i.next,n=n.baseState;var s=a=null,l=null,u=o;do{var p=u.lane;if((C1&p)===p)l!==null&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),n=u.hasEagerState?u.eagerState:t(n,u.action);else{var m={lane:p,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(s=l=m,a=n):l=l.next=m,Xa.lanes|=p,E1|=p}u=u.next}while(u!==null&&u!==o);l===null?a=n:l.next=s,gm(n,e.memoizedState)||(Vf=!0),e.memoizedState=n,e.baseState=a,e.baseQueue=l,r.lastRenderedState=n}if(t=r.interleaved,t!==null){i=t;do o=i.lane,Xa.lanes|=o,E1|=o,i=i.next;while(i!==t)}else i===null&&(r.lanes=0);return[e.memoizedState,r.dispatch]}function qB(t){var e=qh(),r=e.queue;if(r===null)throw Error(vn(311));r.lastRenderedReducer=t;var n=r.dispatch,i=r.pending,o=e.memoizedState;if(i!==null){r.pending=null;var a=i=i.next;do o=t(o,a.action),a=a.next;while(a!==i);gm(o,e.memoizedState)||(Vf=!0),e.memoizedState=o,e.baseQueue===null&&(e.baseState=o),r.lastRenderedState=o}return[o,n]}function CY(){}function EY(t,e){var r=Xa,n=qh(),i=e(),o=!gm(n.memoizedState,i);if(o&&(n.memoizedState=i,Vf=!0),n=n.queue,XB(PY.bind(null,r,n,t),[t]),n.getSnapshot!==e||o||vc!==null&&vc.memoizedState.tag&1){if(r.flags|=2048,uP(9,TY.bind(null,r,n,i,e),void 0,null),yc===null)throw Error(vn(349));(C1&30)!=0||SY(r,e,i)}return i}function SY(t,e,r){t.flags|=16384,t={getSnapshot:e,value:r},e=Xa.updateQueue,e===null?(e={lastEffect:null,stores:null},Xa.updateQueue=e,e.stores=[t]):(r=e.stores,r===null?e.stores=[t]:r.push(t))}function TY(t,e,r,n){e.value=r,e.getSnapshot=n,IY(e)&&MY(t)}function PY(t,e,r){return r(function(){IY(e)&&MY(t)})}function IY(t){var e=t.getSnapshot;t=t.value;try{var r=e();return!gm(t,r)}catch{return!0}}function MY(t){var e=sy(t,1);e!==null&&bm(e,t,1,-1)}function AY(t){var e=Ng();return typeof t=="function"&&(t=t()),e.memoizedState=e.baseState=t,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:cP,lastRenderedState:t},e.queue=t,t=t.dispatch=U0e.bind(null,Xa,t),[e.memoizedState,t]}function uP(t,e,r,n){return t={tag:t,create:e,destroy:r,deps:n,next:null},e=Xa.updateQueue,e===null?(e={lastEffect:null,stores:null},Xa.updateQueue=e,e.lastEffect=t.next=t):(r=e.lastEffect,r===null?e.lastEffect=t.next=t:(n=r.next,r.next=t,t.next=n,e.lastEffect=t)),t}function RY(){return qh().memoizedState}function yO(t,e,r,n){var i=Ng();Xa.flags|=t,i.memoizedState=uP(1|e,r,void 0,n===void 0?null:n)}function xO(t,e,r,n){var i=qh();n=n===void 0?null:n;var o=void 0;if(Ql!==null){var a=Ql.memoizedState;if(o=a.destroy,n!==null&&VB(n,a.deps)){i.memoizedState=uP(e,r,o,n);return}}Xa.flags|=t,i.memoizedState=uP(1|e,r,o,n)}function kY(t,e){return yO(8390656,8,t,e)}function XB(t,e){return xO(2048,8,t,e)}function OY(t,e){return xO(4,2,t,e)}function LY(t,e){return xO(4,4,t,e)}function DY(t,e){if(typeof e=="function")return t=t(),e(t),function(){e(null)};if(e!=null)return t=t(),e.current=t,function(){e.current=null}}function NY(t,e,r){return r=r!=null?r.concat([t]):null,xO(4,4,DY.bind(null,e,t),r)}function YB(){}function $Y(t,e){var r=qh();e=e===void 0?null:e;var n=r.memoizedState;return n!==null&&e!==null&&VB(e,n[1])?n[0]:(r.memoizedState=[t,e],t)}function FY(t,e){var r=qh();e=e===void 0?null:e;var n=r.memoizedState;return n!==null&&e!==null&&VB(e,n[1])?n[0]:(t=t(),r.memoizedState=[t,e],t)}function zY(t,e,r){return(C1&21)==0?(t.baseState&&(t.baseState=!1,Vf=!0),t.memoizedState=r):(gm(r,e)||(r=fX(),Xa.lanes|=r,E1|=r,t.baseState=!0),e)}function B0e(t,e){var r=_s;_s=r!==0&&4>r?r:4,t(!0);var n=UB.transition;UB.transition={};try{t(!1),e()}finally{_s=r,UB.transition=n}}function BY(){return qh().memoizedState}function j0e(t,e,r){var n=ix(t);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},jY(t))UY(e,r);else if(r=fY(t,e,r,n),r!==null){var i=nf();bm(r,t,n,i),VY(r,e,n)}}function U0e(t,e,r){var n=ix(t),i={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(jY(t))UY(e,i);else{var o=t.alternate;if(t.lanes===0&&(o===null||o.lanes===0)&&(o=e.lastRenderedReducer,o!==null))try{var a=e.lastRenderedState,s=o(a,r);if(i.hasEagerState=!0,i.eagerState=s,gm(s,a)){var l=e.interleaved;l===null?(i.next=i,LB(e)):(i.next=l.next,l.next=i),e.interleaved=i;return}}catch{}finally{}r=fY(t,e,i,n),r!==null&&(i=nf(),bm(r,t,n,i),VY(r,e,n))}}function jY(t){var e=t.alternate;return t===Xa||e!==null&&e===Xa}function UY(t,e){aP=vO=!0;var r=t.pending;r===null?e.next=e:(e.next=r.next,r.next=e),t.pending=e}function VY(t,e,r){if((r&4194240)!=0){var n=e.lanes;n&=t.pendingLanes,r|=n,e.lanes=r,Yz(t,r)}}var _O={readContext:Gh,useCallback:bu,useContext:bu,useEffect:bu,useImperativeHandle:bu,useInsertionEffect:bu,useLayoutEffect:bu,useMemo:bu,useReducer:bu,useRef:bu,useState:bu,useDebugValue:bu,useDeferredValue:bu,useTransition:bu,useMutableSource:bu,useSyncExternalStore:bu,useId:bu,unstable_isNewReconciler:!1},V0e={readContext:Gh,useCallback:function(t,e){return Ng().memoizedState=[t,e===void 0?null:e],t},useContext:Gh,useEffect:kY,useImperativeHandle:function(t,e,r){return r=r!=null?r.concat([t]):null,yO(4194308,4,DY.bind(null,e,t),r)},useLayoutEffect:function(t,e){return yO(4194308,4,t,e)},useInsertionEffect:function(t,e){return yO(4,2,t,e)},useMemo:function(t,e){var r=Ng();return e=e===void 0?null:e,t=t(),r.memoizedState=[t,e],t},useReducer:function(t,e,r){var n=Ng();return e=r!==void 0?r(e):e,n.memoizedState=n.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},n.queue=t,t=t.dispatch=j0e.bind(null,Xa,t),[n.memoizedState,t]},useRef:function(t){var e=Ng();return t={current:t},e.memoizedState=t},useState:AY,useDebugValue:YB,useDeferredValue:function(t){return Ng().memoizedState=t},useTransition:function(){var t=AY(!1),e=t[0];return t=B0e.bind(null,t[1]),Ng().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,r){var n=Xa,i=Ng();if(Sa){if(r===void 0)throw Error(vn(407));r=r()}else{if(r=e(),yc===null)throw Error(vn(349));(C1&30)!=0||SY(n,e,r)}i.memoizedState=r;var o={value:r,getSnapshot:e};return i.queue=o,kY(PY.bind(null,n,o,t),[t]),n.flags|=2048,uP(9,TY.bind(null,n,o,r,e),void 0,null),r},useId:function(){var t=Ng(),e=yc.identifierPrefix;if(Sa){var r=oy,n=iy;r=(n&~(1<<32-mm(n)-1)).toString(32)+r,e=":"+e+"R"+r,r=lP++,0<r&&(e+="H"+r.toString(32)),e+=":"}else r=z0e++,e=":"+e+"r"+r.toString(32)+":";return t.memoizedState=e},unstable_isNewReconciler:!1},H0e={readContext:Gh,useCallback:$Y,useContext:Gh,useEffect:XB,useImperativeHandle:NY,useInsertionEffect:OY,useLayoutEffect:LY,useMemo:FY,useReducer:GB,useRef:RY,useState:function(){return GB(cP)},useDebugValue:YB,useDeferredValue:function(t){var e=qh();return zY(e,Ql.memoizedState,t)},useTransition:function(){var t=GB(cP)[0],e=qh().memoizedState;return[t,e]},useMutableSource:CY,useSyncExternalStore:EY,useId:BY,unstable_isNewReconciler:!1},W0e={readContext:Gh,useCallback:$Y,useContext:Gh,useEffect:XB,useImperativeHandle:NY,useInsertionEffect:OY,useLayoutEffect:LY,useMemo:FY,useReducer:qB,useRef:RY,useState:function(){return qB(cP)},useDebugValue:YB,useDeferredValue:function(t){var e=qh();return Ql===null?e.memoizedState=t:zY(e,Ql.memoizedState,t)},useTransition:function(){var t=qB(cP)[0],e=qh().memoizedState;return[t,e]},useMutableSource:CY,useSyncExternalStore:EY,useId:BY,unstable_isNewReconciler:!1};function M2(t,e){try{var r="",n=e;do r+=xye(n),n=n.return;while(n);var i=r}catch(o){i=` Error generating stack: `+o.message+` `+o.stack}return{value:t,source:e,stack:i,digest:null}}function KB(t,e,r){return{value:t,source:null,stack:r!=null?r:null,digest:e!=null?e:null}}function ZB(t,e){try{console.error(e.value)}catch(r){setTimeout(function(){throw r})}}var G0e=typeof WeakMap=="function"?WeakMap:Map;function HY(t,e,r){r=ay(-1,r),r.tag=3,r.payload={element:null};var n=e.value;return r.callback=function(){PO||(PO=!0,d6=n),ZB(t,e)},r}function WY(t,e,r){r=ay(-1,r),r.tag=3;var n=t.type.getDerivedStateFromError;if(typeof n=="function"){var i=e.value;r.payload=function(){return n(i)},r.callback=function(){ZB(t,e)}}var o=t.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(r.callback=function(){ZB(t,e),typeof n!="function"&&(rx===null?rx=new Set([this]):rx.add(this));var a=e.stack;this.componentDidCatch(e.value,{componentStack:a!==null?a:""})}),r}function GY(t,e,r){var n=t.pingCache;if(n===null){n=t.pingCache=new G0e;var i=new Set;n.set(e,i)}else i=n.get(e),i===void 0&&(i=new Set,n.set(e,i));i.has(r)||(i.add(r),t=sxe.bind(null,t,e,r),e.then(t,t))}function qY(t){do{var e;if((e=t.tag===13)&&(e=t.memoizedState,e=e!==null?e.dehydrated!==null:!0),e)return t;t=t.return}while(t!==null);return null}function XY(t,e,r,n,i){return(t.mode&1)==0?(t===e?t.flags|=65536:(t.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(e=ay(-1,1),e.tag=2,ex(r,e,1))),r.lanes|=1),t):(t.flags|=65536,t.lanes=i,t)}var q0e=ty.ReactCurrentOwner,Vf=!1;function rf(t,e,r,n){e.child=t===null?bY(e,null,r,n):P2(e,t.child,r,n)}function YY(t,e,r,n,i){r=r.render;var o=e.ref;return T2(e,i),n=HB(t,e,r,n,o,i),r=WB(),t!==null&&!Vf?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,ly(t,e,i)):(Sa&&r&&SB(e),e.flags|=1,rf(t,e,n,i),e.child)}function KY(t,e,r,n,i){if(t===null){var o=r.type;return typeof o=="function"&&!x6(o)&&o.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(e.tag=15,e.type=o,ZY(t,e,o,n,i)):(t=OO(r.type,null,n,e,e.mode,i),t.ref=e.ref,t.return=e,e.child=t)}if(o=t.child,(t.lanes&i)==0){var a=o.memoizedProps;if(r=r.compare,r=r!==null?r:KT,r(a,n)&&t.ref===e.ref)return ly(t,e,i)}return e.flags|=1,t=sx(o,n),t.ref=e.ref,t.return=e,e.child=t}function ZY(t,e,r,n,i){if(t!==null){var o=t.memoizedProps;if(KT(o,n)&&t.ref===e.ref)if(Vf=!1,e.pendingProps=n=o,(t.lanes&i)!=0)(t.flags&131072)!=0&&(Vf=!0);else return e.lanes=t.lanes,ly(t,e,i)}return QB(t,e,r,n,i)}function QY(t,e,r){var n=e.pendingProps,i=n.children,o=t!==null?t.memoizedState:null;if(n.mode==="hidden")if((e.mode&1)==0)e.memoizedState={baseLanes:0,cachePool:null,transitions:null},Qs(R2,Wd),Wd|=r;else{if((r&1073741824)==0)return t=o!==null?o.baseLanes|r:r,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t,cachePool:null,transitions:null},e.updateQueue=null,Qs(R2,Wd),Wd|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=o!==null?o.baseLanes:r,Qs(R2,Wd),Wd|=n}else o!==null?(n=o.baseLanes|r,e.memoizedState=null):n=r,Qs(R2,Wd),Wd|=n;return rf(t,e,i,r),e.child}function JY(t,e){var r=e.ref;(t===null&&r!==null||t!==null&&t.ref!==r)&&(e.flags|=512,e.flags|=2097152)}function QB(t,e,r,n,i){var o=Uf(r)?y1:_u.current;return o=b2(e,o),T2(e,i),r=HB(t,e,r,n,o,i),n=WB(),t!==null&&!Vf?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,ly(t,e,i)):(Sa&&n&&SB(e),e.flags|=1,rf(t,e,r,i),e.child)}function eK(t,e,r,n,i){if(Uf(r)){var o=!0;iO(e)}else o=!1;if(T2(e,i),e.stateNode===null)wO(t,e),vY(e,r,n),$B(e,r,n,i),n=!0;else if(t===null){var a=e.stateNode,s=e.memoizedProps;a.props=s;var l=a.context,u=r.contextType;typeof u=="object"&&u!==null?u=Gh(u):(u=Uf(r)?y1:_u.current,u=b2(e,u));var p=r.getDerivedStateFromProps,m=typeof p=="function"||typeof a.getSnapshotBeforeUpdate=="function";m||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(s!==n||l!==u)&&yY(e,a,n,u),J0=!1;var v=e.memoizedState;a.state=v,dO(e,n,a,i),l=e.memoizedState,s!==n||v!==l||jf.current||J0?(typeof p=="function"&&(NB(e,r,p,n),l=e.memoizedState),(s=J0||gY(e,r,s,n,v,l,u))?(m||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(e.flags|=4194308)):(typeof a.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=n,e.memoizedState=l),a.props=n,a.state=l,a.context=u,n=s):(typeof a.componentDidMount=="function"&&(e.flags|=4194308),n=!1)}else{a=e.stateNode,dY(t,e),s=e.memoizedProps,u=e.type===e.elementType?s:ym(e.type,s),a.props=u,m=e.pendingProps,v=a.context,l=r.contextType,typeof l=="object"&&l!==null?l=Gh(l):(l=Uf(r)?y1:_u.current,l=b2(e,l));var x=r.getDerivedStateFromProps;(p=typeof x=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(s!==m||v!==l)&&yY(e,a,n,l),J0=!1,v=e.memoizedState,a.state=v,dO(e,n,a,i);var y=e.memoizedState;s!==m||v!==y||jf.current||J0?(typeof x=="function"&&(NB(e,r,x,n),y=e.memoizedState),(u=J0||gY(e,r,u,n,v,y,l)||!1)?(p||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(n,y,l),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(n,y,l)),typeof a.componentDidUpdate=="function"&&(e.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof a.componentDidUpdate!="function"||s===t.memoizedProps&&v===t.memoizedState||(e.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||s===t.memoizedProps&&v===t.memoizedState||(e.flags|=1024),e.memoizedProps=n,e.memoizedState=y),a.props=n,a.state=y,a.context=l,n=u):(typeof a.componentDidUpdate!="function"||s===t.memoizedProps&&v===t.memoizedState||(e.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||s===t.memoizedProps&&v===t.memoizedState||(e.flags|=1024),n=!1)}return JB(t,e,r,n,o,i)}function JB(t,e,r,n,i,o){JY(t,e);var a=(e.flags&128)!=0;if(!n&&!a)return i&&iY(e,r,!1),ly(t,e,o);n=e.stateNode,q0e.current=e;var s=a&&typeof r.getDerivedStateFromError!="function"?null:n.render();return e.flags|=1,t!==null&&a?(e.child=P2(e,t.child,null,o),e.child=P2(e,null,s,o)):rf(t,e,s,o),e.memoizedState=n.state,i&&iY(e,r,!0),e.child}function tK(t){var e=t.stateNode;e.pendingContext?rY(t,e.pendingContext,e.pendingContext!==e.context):e.context&&rY(t,e.context,!1),FB(t,e.containerInfo)}function rK(t,e,r,n,i){return E2(),MB(i),e.flags|=256,rf(t,e,r,n),e.child}var e6={dehydrated:null,treeContext:null,retryLane:0};function t6(t){return{baseLanes:t,cachePool:null,transitions:null}}function nK(t,e,r){var n=e.pendingProps,i=qa.current,o=!1,a=(e.flags&128)!=0,s;if((s=a)||(s=t!==null&&t.memoizedState===null?!1:(i&2)!=0),s?(o=!0,e.flags&=-129):(t===null||t.memoizedState!==null)&&(i|=1),Qs(qa,i&1),t===null)return IB(e),t=e.memoizedState,t!==null&&(t=t.dehydrated,t!==null)?((e.mode&1)==0?e.lanes=1:t.data==="$!"?e.lanes=8:e.lanes=1073741824,null):(a=n.children,t=n.fallback,o?(n=e.mode,o=e.child,a={mode:"hidden",children:a},(n&1)==0&&o!==null?(o.childLanes=0,o.pendingProps=a):o=LO(a,n,0,null),t=I1(t,n,r,null),o.return=e,t.return=e,o.sibling=t,e.child=o,e.child.memoizedState=t6(r),e.memoizedState=e6,t):r6(e,a));if(i=t.memoizedState,i!==null&&(s=i.dehydrated,s!==null))return X0e(t,e,a,n,s,i,r);if(o){o=n.fallback,a=e.mode,i=t.child,s=i.sibling;var l={mode:"hidden",children:n.children};return(a&1)==0&&e.child!==i?(n=e.child,n.childLanes=0,n.pendingProps=l,e.deletions=null):(n=sx(i,l),n.subtreeFlags=i.subtreeFlags&14680064),s!==null?o=sx(s,o):(o=I1(o,a,r,null),o.flags|=2),o.return=e,n.return=e,n.sibling=o,e.child=n,n=o,o=e.child,a=t.child.memoizedState,a=a===null?t6(r):{baseLanes:a.baseLanes|r,cachePool:null,transitions:a.transitions},o.memoizedState=a,o.childLanes=t.childLanes&~r,e.memoizedState=e6,n}return o=t.child,t=o.sibling,n=sx(o,{mode:"visible",children:n.children}),(e.mode&1)==0&&(n.lanes=r),n.return=e,n.sibling=null,t!==null&&(r=e.deletions,r===null?(e.deletions=[t],e.flags|=16):r.push(t)),e.child=n,e.memoizedState=null,n}function r6(t,e){return e=LO({mode:"visible",children:e},t.mode,0,null),e.return=t,t.child=e}function bO(t,e,r,n){return n!==null&&MB(n),P2(e,t.child,null,r),t=r6(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function X0e(t,e,r,n,i,o,a){if(r)return e.flags&256?(e.flags&=-257,n=KB(Error(vn(422))),bO(t,e,a,n)):e.memoizedState!==null?(e.child=t.child,e.flags|=128,null):(o=n.fallback,i=e.mode,n=LO({mode:"visible",children:n.children},i,0,null),o=I1(o,i,a,null),o.flags|=2,n.return=e,o.return=e,n.sibling=o,e.child=n,(e.mode&1)!=0&&P2(e,t.child,null,a),e.child.memoizedState=t6(a),e.memoizedState=e6,o);if((e.mode&1)==0)return bO(t,e,a,null);if(i.data==="$!"){if(n=i.nextSibling&&i.nextSibling.dataset,n)var s=n.dgst;return n=s,o=Error(vn(419)),n=KB(o,n,void 0),bO(t,e,a,n)}if(s=(a&t.childLanes)!=0,Vf||s){if(n=yc,n!==null){switch(a&-a){case 4:i=2;break;case 16:i=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:i=32;break;case 536870912:i=268435456;break;default:i=0}i=(i&(n.suspendedLanes|a))!=0?0:i,i!==0&&i!==o.retryLane&&(o.retryLane=i,sy(t,i),bm(n,t,i,-1))}return y6(),n=KB(Error(vn(421))),bO(t,e,a,n)}return i.data==="$?"?(e.flags|=128,e.child=t.child,e=axe.bind(null,t),i._reactRetry=e,null):(t=o.treeContext,Hd=Y0(i.nextSibling),Vd=e,Sa=!0,vm=null,t!==null&&(Hh[Wh++]=iy,Hh[Wh++]=oy,Hh[Wh++]=x1,iy=t.id,oy=t.overflow,x1=e),e=r6(e,n.children),e.flags|=4096,e)}function iK(t,e,r){t.lanes|=e;var n=t.alternate;n!==null&&(n.lanes|=e),OB(t.return,e,r)}function n6(t,e,r,n,i){var o=t.memoizedState;o===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:i}:(o.isBackwards=e,o.rendering=null,o.renderingStartTime=0,o.last=n,o.tail=r,o.tailMode=i)}function oK(t,e,r){var n=e.pendingProps,i=n.revealOrder,o=n.tail;if(rf(t,e,n.children,r),n=qa.current,(n&2)!=0)n=n&1|2,e.flags|=128;else{if(t!==null&&(t.flags&128)!=0)e:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&iK(t,r,e);else if(t.tag===19)iK(t,r,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}n&=1}if(Qs(qa,n),(e.mode&1)==0)e.memoizedState=null;else switch(i){case"forwards":for(r=e.child,i=null;r!==null;)t=r.alternate,t!==null&&mO(t)===null&&(i=r),r=r.sibling;r=i,r===null?(i=e.child,e.child=null):(i=r.sibling,r.sibling=null),n6(e,!1,i,r,o);break;case"backwards":for(r=null,i=e.child,e.child=null;i!==null;){if(t=i.alternate,t!==null&&mO(t)===null){e.child=i;break}t=i.sibling,i.sibling=r,r=i,i=t}n6(e,!0,r,null,o);break;case"together":n6(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function wO(t,e){(e.mode&1)==0&&t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2)}function ly(t,e,r){if(t!==null&&(e.dependencies=t.dependencies),E1|=e.lanes,(r&e.childLanes)==0)return null;if(t!==null&&e.child!==t.child)throw Error(vn(153));if(e.child!==null){for(t=e.child,r=sx(t,t.pendingProps),e.child=r,r.return=e;t.sibling!==null;)t=t.sibling,r=r.sibling=sx(t,t.pendingProps),r.return=e;r.sibling=null}return e.child}function Y0e(t,e,r){switch(e.tag){case 3:tK(e),E2();break;case 5:wY(e);break;case 1:Uf(e.type)&&iO(e);break;case 4:FB(e,e.stateNode.containerInfo);break;case 10:var n=e.type._context,i=e.memoizedProps.value;Qs(cO,n._currentValue),n._currentValue=i;break;case 13:if(n=e.memoizedState,n!==null)return n.dehydrated!==null?(Qs(qa,qa.current&1),e.flags|=128,null):(r&e.child.childLanes)!=0?nK(t,e,r):(Qs(qa,qa.current&1),t=ly(t,e,r),t!==null?t.sibling:null);Qs(qa,qa.current&1);break;case 19:if(n=(r&e.childLanes)!=0,(t.flags&128)!=0){if(n)return oK(t,e,r);e.flags|=128}if(i=e.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Qs(qa,qa.current),n)break;return null;case 22:case 23:return e.lanes=0,QY(t,e,r)}return ly(t,e,r)}var sK,i6,aK,lK;sK=function(t,e){for(var r=e.child;r!==null;){if(r.tag===5||r.tag===6)t.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===e)break;for(;r.sibling===null;){if(r.return===null||r.return===e)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};i6=function(){};aK=function(t,e,r,n){var i=t.memoizedProps;if(i!==n){t=e.stateNode,w1(Dg.current);var o=null;switch(r){case"input":i=Oz(t,i),n=Oz(t,n),o=[];break;case"select":i=Ga({},i,{value:void 0}),n=Ga({},n,{value:void 0}),o=[];break;case"textarea":i=Nz(t,i),n=Nz(t,n),o=[];break;default:typeof i.onClick!="function"&&typeof n.onClick=="function"&&(t.onclick=tO)}Fz(r,n);var a;r=null;for(u in i)if(!n.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var s=i[u];for(a in s)s.hasOwnProperty(a)&&(r||(r={}),r[a]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(MT.hasOwnProperty(u)?o||(o=[]):(o=o||[]).push(u,null));for(u in n){var l=n[u];if(s=i!=null?i[u]:void 0,n.hasOwnProperty(u)&&l!==s&&(l!=null||s!=null))if(u==="style")if(s){for(a in s)!s.hasOwnProperty(a)||l&&l.hasOwnProperty(a)||(r||(r={}),r[a]="");for(a in l)l.hasOwnProperty(a)&&s[a]!==l[a]&&(r||(r={}),r[a]=l[a])}else r||(o||(o=[]),o.push(u,r)),r=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,s=s?s.__html:void 0,l!=null&&s!==l&&(o=o||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(o=o||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(MT.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&ha("scroll",t),o||s===l||(o=[])):(o=o||[]).push(u,l))}r&&(o=o||[]).push("style",r);var u=o;(e.updateQueue=u)&&(e.flags|=4)}};lK=function(t,e,r,n){r!==n&&(e.flags|=4)};function fP(t,e){if(!Sa)switch(t.tailMode){case"hidden":e=t.tail;for(var r=null;e!==null;)e.alternate!==null&&(r=e),e=e.sibling;r===null?t.tail=null:r.sibling=null;break;case"collapsed":r=t.tail;for(var n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:n.sibling=null}}function wu(t){var e=t.alternate!==null&&t.alternate.child===t.child,r=0,n=0;if(e)for(var i=t.child;i!==null;)r|=i.lanes|i.childLanes,n|=i.subtreeFlags&14680064,n|=i.flags&14680064,i.return=t,i=i.sibling;else for(i=t.child;i!==null;)r|=i.lanes|i.childLanes,n|=i.subtreeFlags,n|=i.flags,i.return=t,i=i.sibling;return t.subtreeFlags|=n,t.childLanes=r,e}function K0e(t,e,r){var n=e.pendingProps;switch(TB(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return wu(e),null;case 1:return Uf(e.type)&&nO(),wu(e),null;case 3:return n=e.stateNode,I2(),pa(jf),pa(_u),jB(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(t===null||t.child===null)&&(lO(e)?e.flags|=4:t===null||t.memoizedState.isDehydrated&&(e.flags&256)==0||(e.flags|=1024,vm!==null&&(m6(vm),vm=null))),i6(t,e),wu(e),null;case 5:zB(e);var i=w1(sP.current);if(r=e.type,t!==null&&e.stateNode!=null)aK(t,e,r,n,i),t.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!n){if(e.stateNode===null)throw Error(vn(166));return wu(e),null}if(t=w1(Dg.current),lO(e)){n=e.stateNode,r=e.type;var o=e.memoizedProps;switch(n[Lg]=e,n[tP]=o,t=(e.mode&1)!=0,r){case"dialog":ha("cancel",n),ha("close",n);break;case"iframe":case"object":case"embed":ha("load",n);break;case"video":case"audio":for(i=0;i<QT.length;i++)ha(QT[i],n);break;case"source":ha("error",n);break;case"img":case"image":case"link":ha("error",n),ha("load",n);break;case"details":ha("toggle",n);break;case"input":jq(n,o),ha("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!o.multiple},ha("invalid",n);break;case"textarea":Hq(n,o),ha("invalid",n)}Fz(r,o),i=null;for(var a in o)if(o.hasOwnProperty(a)){var s=o[a];a==="children"?typeof s=="string"?n.textContent!==s&&(o.suppressHydrationWarning!==!0&&eO(n.textContent,s,t),i=["children",s]):typeof s=="number"&&n.textContent!==""+s&&(o.suppressHydrationWarning!==!0&&eO(n.textContent,s,t),i=["children",""+s]):MT.hasOwnProperty(a)&&s!=null&&a==="onScroll"&&ha("scroll",n)}switch(r){case"input":Rk(n),Vq(n,o,!0);break;case"textarea":Rk(n),Gq(n);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(n.onclick=tO)}n=i,e.updateQueue=n,n!==null&&(e.flags|=4)}else{a=i.nodeType===9?i:i.ownerDocument,t==="http://www.w3.org/1999/xhtml"&&(t=qq(r)),t==="http://www.w3.org/1999/xhtml"?r==="script"?(t=a.createElement("div"),t.innerHTML="<script><\/script>",t=t.removeChild(t.firstChild)):typeof n.is=="string"?t=a.createElement(r,{is:n.is}):(t=a.createElement(r),r==="select"&&(a=t,n.multiple?a.multiple=!0:n.size&&(a.size=n.size))):t=a.createElementNS(t,r),t[Lg]=e,t[tP]=n,sK(t,e,!1,!1),e.stateNode=t;e:{switch(a=zz(r,n),r){case"dialog":ha("cancel",t),ha("close",t),i=n;break;case"iframe":case"object":case"embed":ha("load",t),i=n;break;case"video":case"audio":for(i=0;i<QT.length;i++)ha(QT[i],t);i=n;break;case"source":ha("error",t),i=n;break;case"img":case"image":case"link":ha("error",t),ha("load",t),i=n;break;case"details":ha("toggle",t),i=n;break;case"input":jq(t,n),i=Oz(t,n),ha("invalid",t);break;case"option":i=n;break;case"select":t._wrapperState={wasMultiple:!!n.multiple},i=Ga({},n,{value:void 0}),ha("invalid",t);break;case"textarea":Hq(t,n),i=Nz(t,n),ha("invalid",t);break;default:i=n}Fz(r,i),s=i;for(o in s)if(s.hasOwnProperty(o)){var l=s[o];o==="style"?Kq(t,l):o==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&Xq(t,l)):o==="children"?typeof l=="string"?(r!=="textarea"||l!=="")&&OT(t,l):typeof l=="number"&&OT(t,""+l):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(MT.hasOwnProperty(o)?l!=null&&o==="onScroll"&&ha("scroll",t):l!=null&&wz(t,o,l,a))}switch(r){case"input":Rk(t),Vq(t,n,!1);break;case"textarea":Rk(t),Gq(t);break;case"option":n.value!=null&&t.setAttribute("value",""+U0(n.value));break;case"select":t.multiple=!!n.multiple,o=n.value,o!=null?c2(t,!!n.multiple,o,!1):n.defaultValue!=null&&c2(t,!!n.multiple,n.defaultValue,!0);break;default:typeof i.onClick=="function"&&(t.onclick=tO)}switch(r){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}}n&&(e.flags|=4)}e.ref!==null&&(e.flags|=512,e.flags|=2097152)}return wu(e),null;case 6:if(t&&e.stateNode!=null)lK(t,e,t.memoizedProps,n);else{if(typeof n!="string"&&e.stateNode===null)throw Error(vn(166));if(r=w1(sP.current),w1(Dg.current),lO(e)){if(n=e.stateNode,r=e.memoizedProps,n[Lg]=e,(o=n.nodeValue!==r)&&(t=Vd,t!==null))switch(t.tag){case 3:eO(n.nodeValue,r,(t.mode&1)!=0);break;case 5:t.memoizedProps.suppressHydrationWarning!==!0&&eO(n.nodeValue,r,(t.mode&1)!=0)}o&&(e.flags|=4)}else n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[Lg]=e,e.stateNode=n}return wu(e),null;case 13:if(pa(qa),n=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(Sa&&Hd!==null&&(e.mode&1)!=0&&(e.flags&128)==0)uY(),E2(),e.flags|=98560,o=!1;else if(o=lO(e),n!==null&&n.dehydrated!==null){if(t===null){if(!o)throw Error(vn(318));if(o=e.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(vn(317));o[Lg]=e}else E2(),(e.flags&128)==0&&(e.memoizedState=null),e.flags|=4;wu(e),o=!1}else vm!==null&&(m6(vm),vm=null),o=!0;if(!o)return e.flags&65536?e:null}return(e.flags&128)!=0?(e.lanes=r,e):(n=n!==null,n!==(t!==null&&t.memoizedState!==null)&&n&&(e.child.flags|=8192,(e.mode&1)!=0&&(t===null||(qa.current&1)!=0?Jl===0&&(Jl=3):y6())),e.updateQueue!==null&&(e.flags|=4),wu(e),null);case 4:return I2(),i6(t,e),t===null&&JT(e.stateNode.containerInfo),wu(e),null;case 10:return kB(e.type._context),wu(e),null;case 17:return Uf(e.type)&&nO(),wu(e),null;case 19:if(pa(qa),o=e.memoizedState,o===null)return wu(e),null;if(n=(e.flags&128)!=0,a=o.rendering,a===null)if(n)fP(o,!1);else{if(Jl!==0||t!==null&&(t.flags&128)!=0)for(t=e.child;t!==null;){if(a=mO(t),a!==null){for(e.flags|=128,fP(o,!1),n=a.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),e.subtreeFlags=0,n=r,r=e.child;r!==null;)o=r,t=n,o.flags&=14680066,a=o.alternate,a===null?(o.childLanes=0,o.lanes=t,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=a.childLanes,o.lanes=a.lanes,o.child=a.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=a.memoizedProps,o.memoizedState=a.memoizedState,o.updateQueue=a.updateQueue,o.type=a.type,t=a.dependencies,o.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),r=r.sibling;return Qs(qa,qa.current&1|2),e.child}t=t.sibling}o.tail!==null&&_l()>k2&&(e.flags|=128,n=!0,fP(o,!1),e.lanes=4194304)}else{if(!n)if(t=mO(a),t!==null){if(e.flags|=128,n=!0,r=t.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),fP(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!Sa)return wu(e),null}else 2*_l()-o.renderingStartTime>k2&&r!==1073741824&&(e.flags|=128,n=!0,fP(o,!1),e.lanes=4194304);o.isBackwards?(a.sibling=e.child,e.child=a):(r=o.last,r!==null?r.sibling=a:e.child=a,o.last=a)}return o.tail!==null?(e=o.tail,o.rendering=e,o.tail=e.sibling,o.renderingStartTime=_l(),e.sibling=null,r=qa.current,Qs(qa,n?r&1|2:r&1),e):(wu(e),null);case 22:case 23:return v6(),n=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==n&&(e.flags|=8192),n&&(e.mode&1)!=0?(Wd&1073741824)!=0&&(wu(e),e.subtreeFlags&6&&(e.flags|=8192)):wu(e),null;case 24:return null;case 25:return null}throw Error(vn(156,e.tag))}function Z0e(t,e){switch(TB(e),e.tag){case 1:return Uf(e.type)&&nO(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return I2(),pa(jf),pa(_u),jB(),t=e.flags,(t&65536)!=0&&(t&128)==0?(e.flags=t&-65537|128,e):null;case 5:return zB(e),null;case 13:if(pa(qa),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(vn(340));E2()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return pa(qa),null;case 4:return I2(),null;case 10:return kB(e.type._context),null;case 22:case 23:return v6(),null;case 24:return null;default:return null}}var CO=!1,Cu=!1,Q0e=typeof WeakSet=="function"?WeakSet:Set,jn=null;function A2(t,e){var r=t.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){fl(t,e,n)}else r.current=null}function o6(t,e,r){try{r()}catch(n){fl(t,e,n)}}var cK=!1;function J0e(t,e){if(vB=Vk,t=BX(),cB(t)){if("selectionStart"in t)var r={start:t.selectionStart,end:t.selectionEnd};else e:{r=(r=t.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var i=n.anchorOffset,o=n.focusNode;n=n.focusOffset;try{r.nodeType,o.nodeType}catch{r=null;break e}var a=0,s=-1,l=-1,u=0,p=0,m=t,v=null;t:for(;;){for(var x;m!==r||i!==0&&m.nodeType!==3||(s=a+i),m!==o||n!==0&&m.nodeType!==3||(l=a+n),m.nodeType===3&&(a+=m.nodeValue.length),(x=m.firstChild)!==null;)v=m,m=x;for(;;){if(m===t)break t;if(v===r&&++u===i&&(s=a),v===o&&++p===n&&(l=a),(x=m.nextSibling)!==null)break;m=v,v=m.parentNode}m=x}r=s===-1||l===-1?null:{start:s,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(yB={focusedElem:t,selectionRange:r},Vk=!1,jn=e;jn!==null;)if(e=jn,t=e.child,(e.subtreeFlags&1028)!=0&&t!==null)t.return=e,jn=t;else for(;jn!==null;){e=jn;try{var y=e.alternate;if((e.flags&1024)!=0)switch(e.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var _=y.memoizedProps,w=y.memoizedState,C=e.stateNode,E=C.getSnapshotBeforeUpdate(e.elementType===e.type?_:ym(e.type,_),w);C.__reactInternalSnapshotBeforeUpdate=E}break;case 3:var T=e.stateNode.containerInfo;T.nodeType===1?T.textContent="":T.nodeType===9&&T.documentElement&&T.removeChild(T.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(vn(163))}}catch(A){fl(e,e.return,A)}if(t=e.sibling,t!==null){t.return=e.return,jn=t;break}jn=e.return}return y=cK,cK=!1,y}function dP(t,e,r){var n=e.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var i=n=n.next;do{if((i.tag&t)===t){var o=i.destroy;i.destroy=void 0,o!==void 0&&o6(e,r,o)}i=i.next}while(i!==n)}}function EO(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var r=e=e.next;do{if((r.tag&t)===t){var n=r.create;r.destroy=n()}r=r.next}while(r!==e)}}function s6(t){var e=t.ref;if(e!==null){var r=t.stateNode;switch(t.tag){case 5:t=r;break;default:t=r}typeof e=="function"?e(t):e.current=t}}function uK(t){var e=t.alternate;e!==null&&(t.alternate=null,uK(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[Lg],delete e[tP],delete e[wB],delete e[D0e],delete e[N0e])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function fK(t){return t.tag===5||t.tag===3||t.tag===4}function dK(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||fK(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function a6(t,e,r){var n=t.tag;if(n===5||n===6)t=t.stateNode,e?r.nodeType===8?r.parentNode.insertBefore(t,e):r.insertBefore(t,e):(r.nodeType===8?(e=r.parentNode,e.insertBefore(t,r)):(e=r,e.appendChild(t)),r=r._reactRootContainer,r!=null||e.onclick!==null||(e.onclick=tO));else if(n!==4&&(t=t.child,t!==null))for(a6(t,e,r),t=t.sibling;t!==null;)a6(t,e,r),t=t.sibling}function l6(t,e,r){var n=t.tag;if(n===5||n===6)t=t.stateNode,e?r.insertBefore(t,e):r.appendChild(t);else if(n!==4&&(t=t.child,t!==null))for(l6(t,e,r),t=t.sibling;t!==null;)l6(t,e,r),t=t.sibling}var Fc=null,xm=!1;function tx(t,e,r){for(r=r.child;r!==null;)hK(t,e,r),r=r.sibling}function hK(t,e,r){if(Og&&typeof Og.onCommitFiberUnmount=="function")try{Og.onCommitFiberUnmount($k,r)}catch{}switch(r.tag){case 5:Cu||A2(r,e);case 6:var n=Fc,i=xm;Fc=null,tx(t,e,r),Fc=n,xm=i,Fc!==null&&(xm?(t=Fc,r=r.stateNode,t.nodeType===8?t.parentNode.removeChild(r):t.removeChild(r)):Fc.removeChild(r.stateNode));break;case 18:Fc!==null&&(xm?(t=Fc,r=r.stateNode,t.nodeType===8?bB(t.parentNode,r):t.nodeType===1&&bB(t,r),HT(t)):bB(Fc,r.stateNode));break;case 4:n=Fc,i=xm,Fc=r.stateNode.containerInfo,xm=!0,tx(t,e,r),Fc=n,xm=i;break;case 0:case 11:case 14:case 15:if(!Cu&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){i=n=n.next;do{var o=i,a=o.destroy;o=o.tag,a!==void 0&&((o&2)!=0||(o&4)!=0)&&o6(r,e,a),i=i.next}while(i!==n)}tx(t,e,r);break;case 1:if(!Cu&&(A2(r,e),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(s){fl(r,e,s)}tx(t,e,r);break;case 21:tx(t,e,r);break;case 22:r.mode&1?(Cu=(n=Cu)||r.memoizedState!==null,tx(t,e,r),Cu=n):tx(t,e,r);break;default:tx(t,e,r)}}function pK(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var r=t.stateNode;r===null&&(r=t.stateNode=new Q0e),e.forEach(function(n){var i=lxe.bind(null,t,n);r.has(n)||(r.add(n),n.then(i,i))})}}function _m(t,e){var r=e.deletions;if(r!==null)for(var n=0;n<r.length;n++){var i=r[n];try{var o=t,a=e,s=a;e:for(;s!==null;){switch(s.tag){case 5:Fc=s.stateNode,xm=!1;break e;case 3:Fc=s.stateNode.containerInfo,xm=!0;break e;case 4:Fc=s.stateNode.containerInfo,xm=!0;break e}s=s.return}if(Fc===null)throw Error(vn(160));hK(o,a,i),Fc=null,xm=!1;var l=i.alternate;l!==null&&(l.return=null),i.return=null}catch(u){fl(i,e,u)}}if(e.subtreeFlags&12854)for(e=e.child;e!==null;)mK(e,t),e=e.sibling}function mK(t,e){var r=t.alternate,n=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(_m(e,t),$g(t),n&4){try{dP(3,t,t.return),EO(3,t)}catch(_){fl(t,t.return,_)}try{dP(5,t,t.return)}catch(_){fl(t,t.return,_)}}break;case 1:_m(e,t),$g(t),n&512&&r!==null&&A2(r,r.return);break;case 5:if(_m(e,t),$g(t),n&512&&r!==null&&A2(r,r.return),t.flags&32){var i=t.stateNode;try{OT(i,"")}catch(_){fl(t,t.return,_)}}if(n&4&&(i=t.stateNode,i!=null)){var o=t.memoizedProps,a=r!==null?r.memoizedProps:o,s=t.type,l=t.updateQueue;if(t.updateQueue=null,l!==null)try{s==="input"&&o.type==="radio"&&o.name!=null&&Uq(i,o),zz(s,a);var u=zz(s,o);for(a=0;a<l.length;a+=2){var p=l[a],m=l[a+1];p==="style"?Kq(i,m):p==="dangerouslySetInnerHTML"?Xq(i,m):p==="children"?OT(i,m):wz(i,p,m,u)}switch(s){case"input":Lz(i,o);break;case"textarea":Wq(i,o);break;case"select":var v=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!o.multiple;var x=o.value;x!=null?c2(i,!!o.multiple,x,!1):v!==!!o.multiple&&(o.defaultValue!=null?c2(i,!!o.multiple,o.defaultValue,!0):c2(i,!!o.multiple,o.multiple?[]:"",!1))}i[tP]=o}catch(_){fl(t,t.return,_)}}break;case 6:if(_m(e,t),$g(t),n&4){if(t.stateNode===null)throw Error(vn(162));i=t.stateNode,o=t.memoizedProps;try{i.nodeValue=o}catch(_){fl(t,t.return,_)}}break;case 3:if(_m(e,t),$g(t),n&4&&r!==null&&r.memoizedState.isDehydrated)try{HT(e.containerInfo)}catch(_){fl(t,t.return,_)}break;case 4:_m(e,t),$g(t);break;case 13:_m(e,t),$g(t),i=t.child,i.flags&8192&&(o=i.memoizedState!==null,i.stateNode.isHidden=o,!o||i.alternate!==null&&i.alternate.memoizedState!==null||(f6=_l())),n&4&&pK(t);break;case 22:if(p=r!==null&&r.memoizedState!==null,t.mode&1?(Cu=(u=Cu)||p,_m(e,t),Cu=u):_m(e,t),$g(t),n&8192){if(u=t.memoizedState!==null,(t.stateNode.isHidden=u)&&!p&&(t.mode&1)!=0)for(jn=t,p=t.child;p!==null;){for(m=jn=p;jn!==null;){switch(v=jn,x=v.child,v.tag){case 0:case 11:case 14:case 15:dP(4,v,v.return);break;case 1:A2(v,v.return);var y=v.stateNode;if(typeof y.componentWillUnmount=="function"){n=v,r=v.return;try{e=n,y.props=e.memoizedProps,y.state=e.memoizedState,y.componentWillUnmount()}catch(_){fl(n,r,_)}}break;case 5:A2(v,v.return);break;case 22:if(v.memoizedState!==null){yK(m);continue}}x!==null?(x.return=v,jn=x):yK(m)}p=p.sibling}e:for(p=null,m=t;;){if(m.tag===5){if(p===null){p=m;try{i=m.stateNode,u?(o=i.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(s=m.stateNode,l=m.memoizedProps.style,a=l!=null&&l.hasOwnProperty("display")?l.display:null,s.style.display=Yq("display",a))}catch(_){fl(t,t.return,_)}}}else if(m.tag===6){if(p===null)try{m.stateNode.nodeValue=u?"":m.memoizedProps}catch(_){fl(t,t.return,_)}}else if((m.tag!==22&&m.tag!==23||m.memoizedState===null||m===t)&&m.child!==null){m.child.return=m,m=m.child;continue}if(m===t)break e;for(;m.sibling===null;){if(m.return===null||m.return===t)break e;p===m&&(p=null),m=m.return}p===m&&(p=null),m.sibling.return=m.return,m=m.sibling}}break;case 19:_m(e,t),$g(t),n&4&&pK(t);break;case 21:break;default:_m(e,t),$g(t)}}function $g(t){var e=t.flags;if(e&2){try{e:{for(var r=t.return;r!==null;){if(fK(r)){var n=r;break e}r=r.return}throw Error(vn(160))}switch(n.tag){case 5:var i=n.stateNode;n.flags&32&&(OT(i,""),n.flags&=-33);var o=dK(t);l6(t,o,i);break;case 3:case 4:var a=n.stateNode.containerInfo,s=dK(t);a6(t,s,a);break;default:throw Error(vn(161))}}catch(l){fl(t,t.return,l)}t.flags&=-3}e&4096&&(t.flags&=-4097)}function exe(t,e,r){jn=t,gK(t)}function gK(t,e,r){for(var n=(t.mode&1)!=0;jn!==null;){var i=jn,o=i.child;if(i.tag===22&&n){var a=i.memoizedState!==null||CO;if(!a){var s=i.alternate,l=s!==null&&s.memoizedState!==null||Cu;s=CO;var u=Cu;if(CO=a,(Cu=l)&&!u)for(jn=i;jn!==null;)a=jn,l=a.child,a.tag===22&&a.memoizedState!==null?xK(i):l!==null?(l.return=a,jn=l):xK(i);for(;o!==null;)jn=o,gK(o),o=o.sibling;jn=i,CO=s,Cu=u}vK(t)}else(i.subtreeFlags&8772)!=0&&o!==null?(o.return=i,jn=o):vK(t)}}function vK(t){for(;jn!==null;){var e=jn;if((e.flags&8772)!=0){var r=e.alternate;try{if((e.flags&8772)!=0)switch(e.tag){case 0:case 11:case 15:Cu||EO(5,e);break;case 1:var n=e.stateNode;if(e.flags&4&&!Cu)if(r===null)n.componentDidMount();else{var i=e.elementType===e.type?r.memoizedProps:ym(e.type,r.memoizedProps);n.componentDidUpdate(i,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var o=e.updateQueue;o!==null&&pY(e,o,n);break;case 3:var a=e.updateQueue;if(a!==null){if(r=null,e.child!==null)switch(e.child.tag){case 5:r=e.child.stateNode;break;case 1:r=e.child.stateNode}pY(e,a,r)}break;case 5:var s=e.stateNode;if(r===null&&e.flags&4){r=s;var l=e.memoizedProps;switch(e.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&r.focus();break;case"img":l.src&&(r.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(e.memoizedState===null){var u=e.alternate;if(u!==null){var p=u.memoizedState;if(p!==null){var m=p.dehydrated;m!==null&&HT(m)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(vn(163))}Cu||e.flags&512&&s6(e)}catch(v){fl(e,e.return,v)}}if(e===t){jn=null;break}if(r=e.sibling,r!==null){r.return=e.return,jn=r;break}jn=e.return}}function yK(t){for(;jn!==null;){var e=jn;if(e===t){jn=null;break}var r=e.sibling;if(r!==null){r.return=e.return,jn=r;break}jn=e.return}}function xK(t){for(;jn!==null;){var e=jn;try{switch(e.tag){case 0:case 11:case 15:var r=e.return;try{EO(4,e)}catch(l){fl(e,r,l)}break;case 1:var n=e.stateNode;if(typeof n.componentDidMount=="function"){var i=e.return;try{n.componentDidMount()}catch(l){fl(e,i,l)}}var o=e.return;try{s6(e)}catch(l){fl(e,o,l)}break;case 5:var a=e.return;try{s6(e)}catch(l){fl(e,a,l)}}}catch(l){fl(e,e.return,l)}if(e===t){jn=null;break}var s=e.sibling;if(s!==null){s.return=e.return,jn=s;break}jn=e.return}}var txe=Math.ceil,SO=ty.ReactCurrentDispatcher,c6=ty.ReactCurrentOwner,Xh=ty.ReactCurrentBatchConfig,Zo=0,yc=null,Fl=null,zc=0,Wd=0,R2=K0(0),Jl=0,hP=null,E1=0,TO=0,u6=0,pP=null,Hf=null,f6=0,k2=1/0,cy=null,PO=!1,d6=null,rx=null,IO=!1,nx=null,MO=0,mP=0,h6=null,AO=-1,RO=0;function nf(){return(Zo&6)!=0?_l():AO!==-1?AO:AO=_l()}function ix(t){return(t.mode&1)==0?1:(Zo&2)!=0&&zc!==0?zc&-zc:F0e.transition!==null?(RO===0&&(RO=fX()),RO):(t=_s,t!==0||(t=window.event,t=t===void 0?16:_X(t.type)),t)}function bm(t,e,r,n){if(50<mP)throw mP=0,h6=null,Error(vn(185));zT(t,r,n),((Zo&2)==0||t!==yc)&&(t===yc&&((Zo&2)==0&&(TO|=r),Jl===4&&ox(t,zc)),Wf(t,n),r===1&&Zo===0&&(e.mode&1)==0&&(k2=_l()+500,oO&&Q0()))}function Wf(t,e){var r=t.callbackNode;Fye(t,e);var n=Bk(t,t===yc?zc:0);if(n===0)r!==null&&lX(r),t.callbackNode=null,t.callbackPriority=0;else if(e=n&-n,t.callbackPriority!==e){if(r!=null&&lX(r),e===1)t.tag===0?$0e(bK.bind(null,t)):oY(bK.bind(null,t)),O0e(function(){(Zo&6)==0&&Q0()}),r=null;else{switch(dX(n)){case 1:r=Gz;break;case 4:r=cX;break;case 16:r=Nk;break;case 536870912:r=uX;break;default:r=Nk}r=MK(r,_K.bind(null,t))}t.callbackPriority=e,t.callbackNode=r}}function _K(t,e){if(AO=-1,RO=0,(Zo&6)!=0)throw Error(vn(327));var r=t.callbackNode;if(O2()&&t.callbackNode!==r)return null;var n=Bk(t,t===yc?zc:0);if(n===0)return null;if((n&30)!=0||(n&t.expiredLanes)!=0||e)e=kO(t,n);else{e=n;var i=Zo;Zo|=2;var o=CK();(yc!==t||zc!==e)&&(cy=null,k2=_l()+500,T1(t,e));do try{ixe();break}catch(s){wK(t,s)}while(1);RB(),SO.current=o,Zo=i,Fl!==null?e=0:(yc=null,zc=0,e=Jl)}if(e!==0){if(e===2&&(i=qz(t),i!==0&&(n=i,e=p6(t,i))),e===1)throw r=hP,T1(t,0),ox(t,n),Wf(t,_l()),r;if(e===6)ox(t,n);else{if(i=t.current.alternate,(n&30)==0&&!rxe(i)&&(e=kO(t,n),e===2&&(o=qz(t),o!==0&&(n=o,e=p6(t,o))),e===1))throw r=hP,T1(t,0),ox(t,n),Wf(t,_l()),r;switch(t.finishedWork=i,t.finishedLanes=n,e){case 0:case 1:throw Error(vn(345));case 2:P1(t,Hf,cy);break;case 3:if(ox(t,n),(n&130023424)===n&&(e=f6+500-_l(),10<e)){if(Bk(t,0)!==0)break;if(i=t.suspendedLanes,(i&n)!==n){nf(),t.pingedLanes|=t.suspendedLanes&i;break}t.timeoutHandle=_B(P1.bind(null,t,Hf,cy),e);break}P1(t,Hf,cy);break;case 4:if(ox(t,n),(n&4194240)===n)break;for(e=t.eventTimes,i=-1;0<n;){var a=31-mm(n);o=1<<a,a=e[a],a>i&&(i=a),n&=~o}if(n=i,n=_l()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*txe(n/1960))-n,10<n){t.timeoutHandle=_B(P1.bind(null,t,Hf,cy),n);break}P1(t,Hf,cy);break;case 5:P1(t,Hf,cy);break;default:throw Error(vn(329))}}}return Wf(t,_l()),t.callbackNode===r?_K.bind(null,t):null}function p6(t,e){var r=pP;return t.current.memoizedState.isDehydrated&&(T1(t,e).flags|=256),t=kO(t,e),t!==2&&(e=Hf,Hf=r,e!==null&&m6(e)),t}function m6(t){Hf===null?Hf=t:Hf.push.apply(Hf,t)}function rxe(t){for(var e=t;;){if(e.flags&16384){var r=e.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var n=0;n<r.length;n++){var i=r[n],o=i.getSnapshot;i=i.value;try{if(!gm(o(),i))return!1}catch{return!1}}}if(r=e.child,e.subtreeFlags&16384&&r!==null)r.return=e,e=r;else{if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}function ox(t,e){for(e&=~u6,e&=~TO,t.suspendedLanes|=e,t.pingedLanes&=~e,t=t.expirationTimes;0<e;){var r=31-mm(e),n=1<<r;t[r]=-1,e&=~n}}function bK(t){if((Zo&6)!=0)throw Error(vn(327));O2();var e=Bk(t,0);if((e&1)==0)return Wf(t,_l()),null;var r=kO(t,e);if(t.tag!==0&&r===2){var n=qz(t);n!==0&&(e=n,r=p6(t,n))}if(r===1)throw r=hP,T1(t,0),ox(t,e),Wf(t,_l()),r;if(r===6)throw Error(vn(345));return t.finishedWork=t.current.alternate,t.finishedLanes=e,P1(t,Hf,cy),Wf(t,_l()),null}function g6(t,e){var r=Zo;Zo|=1;try{return t(e)}finally{Zo=r,Zo===0&&(k2=_l()+500,oO&&Q0())}}function S1(t){nx!==null&&nx.tag===0&&(Zo&6)==0&&O2();var e=Zo;Zo|=1;var r=Xh.transition,n=_s;try{if(Xh.transition=null,_s=1,t)return t()}finally{_s=n,Xh.transition=r,Zo=e,(Zo&6)==0&&Q0()}}function v6(){Wd=R2.current,pa(R2)}function T1(t,e){t.finishedWork=null,t.finishedLanes=0;var r=t.timeoutHandle;if(r!==-1&&(t.timeoutHandle=-1,k0e(r)),Fl!==null)for(r=Fl.return;r!==null;){var n=r;switch(TB(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&nO();break;case 3:I2(),pa(jf),pa(_u),jB();break;case 5:zB(n);break;case 4:I2();break;case 13:pa(qa);break;case 19:pa(qa);break;case 10:kB(n.type._context);break;case 22:case 23:v6()}r=r.return}if(yc=t,Fl=t=sx(t.current,null),zc=Wd=e,Jl=0,hP=null,u6=TO=E1=0,Hf=pP=null,b1!==null){for(e=0;e<b1.length;e++)if(r=b1[e],n=r.interleaved,n!==null){r.interleaved=null;var i=n.next,o=r.pending;if(o!==null){var a=o.next;o.next=i,n.next=a}r.pending=n}b1=null}return t}function wK(t,e){do{var r=Fl;try{if(RB(),gO.current=_O,vO){for(var n=Xa.memoizedState;n!==null;){var i=n.queue;i!==null&&(i.pending=null),n=n.next}vO=!1}if(C1=0,vc=Ql=Xa=null,aP=!1,lP=0,c6.current=null,r===null||r.return===null){Jl=1,hP=e,Fl=null;break}e:{var o=t,a=r.return,s=r,l=e;if(e=zc,s.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l,p=s,m=p.tag;if((p.mode&1)==0&&(m===0||m===11||m===15)){var v=p.alternate;v?(p.updateQueue=v.updateQueue,p.memoizedState=v.memoizedState,p.lanes=v.lanes):(p.updateQueue=null,p.memoizedState=null)}var x=qY(a);if(x!==null){x.flags&=-257,XY(x,a,s,o,e),x.mode&1&&GY(o,u,e),e=x,l=u;var y=e.updateQueue;if(y===null){var _=new Set;_.add(l),e.updateQueue=_}else y.add(l);break e}else{if((e&1)==0){GY(o,u,e),y6();break e}l=Error(vn(426))}}else if(Sa&&s.mode&1){var w=qY(a);if(w!==null){(w.flags&65536)==0&&(w.flags|=256),XY(w,a,s,o,e),MB(M2(l,s));break e}}o=l=M2(l,s),Jl!==4&&(Jl=2),pP===null?pP=[o]:pP.push(o),o=a;do{switch(o.tag){case 3:o.flags|=65536,e&=-e,o.lanes|=e;var C=HY(o,l,e);hY(o,C);break e;case 1:s=l;var E=o.type,T=o.stateNode;if((o.flags&128)==0&&(typeof E.getDerivedStateFromError=="function"||T!==null&&typeof T.componentDidCatch=="function"&&(rx===null||!rx.has(T)))){o.flags|=65536,e&=-e,o.lanes|=e;var A=WY(o,s,e);hY(o,A);break e}}o=o.return}while(o!==null)}SK(r)}catch(k){e=k,Fl===r&&r!==null&&(Fl=r=r.return);continue}break}while(1)}function CK(){var t=SO.current;return SO.current=_O,t===null?_O:t}function y6(){(Jl===0||Jl===3||Jl===2)&&(Jl=4),yc===null||(E1&268435455)==0&&(TO&268435455)==0||ox(yc,zc)}function kO(t,e){var r=Zo;Zo|=2;var n=CK();(yc!==t||zc!==e)&&(cy=null,T1(t,e));do try{nxe();break}catch(i){wK(t,i)}while(1);if(RB(),Zo=r,SO.current=n,Fl!==null)throw Error(vn(261));return yc=null,zc=0,Jl}function nxe(){for(;Fl!==null;)EK(Fl)}function ixe(){for(;Fl!==null&&!Mye();)EK(Fl)}function EK(t){var e=IK(t.alternate,t,Wd);t.memoizedProps=t.pendingProps,e===null?SK(t):Fl=e,c6.current=null}function SK(t){var e=t;do{var r=e.alternate;if(t=e.return,(e.flags&32768)==0){if(r=K0e(r,e,Wd),r!==null){Fl=r;return}}else{if(r=Z0e(r,e),r!==null){r.flags&=32767,Fl=r;return}if(t!==null)t.flags|=32768,t.subtreeFlags=0,t.deletions=null;else{Jl=6,Fl=null;return}}if(e=e.sibling,e!==null){Fl=e;return}Fl=e=t}while(e!==null);Jl===0&&(Jl=5)}function P1(t,e,r){var n=_s,i=Xh.transition;try{Xh.transition=null,_s=1,oxe(t,e,r,n)}finally{Xh.transition=i,_s=n}return null}function oxe(t,e,r,n){do O2();while(nx!==null);if((Zo&6)!=0)throw Error(vn(327));r=t.finishedWork;var i=t.finishedLanes;if(r===null)return null;if(t.finishedWork=null,t.finishedLanes=0,r===t.current)throw Error(vn(177));t.callbackNode=null,t.callbackPriority=0;var o=r.lanes|r.childLanes;if(zye(t,o),t===yc&&(Fl=yc=null,zc=0),(r.subtreeFlags&2064)==0&&(r.flags&2064)==0||IO||(IO=!0,MK(Nk,function(){return O2(),null})),o=(r.flags&15990)!=0,(r.subtreeFlags&15990)!=0||o){o=Xh.transition,Xh.transition=null;var a=_s;_s=1;var s=Zo;Zo|=4,c6.current=null,J0e(t,r),mK(r,t),S0e(yB),Vk=!!vB,yB=vB=null,t.current=r,exe(r),Aye(),Zo=s,_s=a,Xh.transition=o}else t.current=r;if(IO&&(IO=!1,nx=t,MO=i),o=t.pendingLanes,o===0&&(rx=null),Oye(r.stateNode),Wf(t,_l()),e!==null)for(n=t.onRecoverableError,r=0;r<e.length;r++)i=e[r],n(i.value,{componentStack:i.stack,digest:i.digest});if(PO)throw PO=!1,t=d6,d6=null,t;return(MO&1)!=0&&t.tag!==0&&O2(),o=t.pendingLanes,(o&1)!=0?t===h6?mP++:(mP=0,h6=t):mP=0,Q0(),null}function O2(){if(nx!==null){var t=dX(MO),e=Xh.transition,r=_s;try{if(Xh.transition=null,_s=16>t?16:t,nx===null)var n=!1;else{if(t=nx,nx=null,MO=0,(Zo&6)!=0)throw Error(vn(331));var i=Zo;for(Zo|=4,jn=t.current;jn!==null;){var o=jn,a=o.child;if((jn.flags&16)!=0){var s=o.deletions;if(s!==null){for(var l=0;l<s.length;l++){var u=s[l];for(jn=u;jn!==null;){var p=jn;switch(p.tag){case 0:case 11:case 15:dP(8,p,o)}var m=p.child;if(m!==null)m.return=p,jn=m;else for(;jn!==null;){p=jn;var v=p.sibling,x=p.return;if(uK(p),p===u){jn=null;break}if(v!==null){v.return=x,jn=v;break}jn=x}}}var y=o.alternate;if(y!==null){var _=y.child;if(_!==null){y.child=null;do{var w=_.sibling;_.sibling=null,_=w}while(_!==null)}}jn=o}}if((o.subtreeFlags&2064)!=0&&a!==null)a.return=o,jn=a;else e:for(;jn!==null;){if(o=jn,(o.flags&2048)!=0)switch(o.tag){case 0:case 11:case 15:dP(9,o,o.return)}var C=o.sibling;if(C!==null){C.return=o.return,jn=C;break e}jn=o.return}}var E=t.current;for(jn=E;jn!==null;){a=jn;var T=a.child;if((a.subtreeFlags&2064)!=0&&T!==null)T.return=a,jn=T;else e:for(a=E;jn!==null;){if(s=jn,(s.flags&2048)!=0)try{switch(s.tag){case 0:case 11:case 15:EO(9,s)}}catch(k){fl(s,s.return,k)}if(s===a){jn=null;break e}var A=s.sibling;if(A!==null){A.return=s.return,jn=A;break e}jn=s.return}}if(Zo=i,Q0(),Og&&typeof Og.onPostCommitFiberRoot=="function")try{Og.onPostCommitFiberRoot($k,t)}catch{}n=!0}return n}finally{_s=r,Xh.transition=e}}return!1}function TK(t,e,r){e=M2(r,e),e=HY(t,e,1),t=ex(t,e,1),e=nf(),t!==null&&(zT(t,1,e),Wf(t,e))}function fl(t,e,r){if(t.tag===3)TK(t,t,r);else for(;e!==null;){if(e.tag===3){TK(e,t,r);break}else if(e.tag===1){var n=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(rx===null||!rx.has(n))){t=M2(r,t),t=WY(e,t,1),e=ex(e,t,1),t=nf(),e!==null&&(zT(e,1,t),Wf(e,t));break}}e=e.return}}function sxe(t,e,r){var n=t.pingCache;n!==null&&n.delete(e),e=nf(),t.pingedLanes|=t.suspendedLanes&r,yc===t&&(zc&r)===r&&(Jl===4||Jl===3&&(zc&130023424)===zc&&500>_l()-f6?T1(t,0):u6|=r),Wf(t,e)}function PK(t,e){e===0&&((t.mode&1)==0?e=1:(e=zk,zk<<=1,(zk&130023424)==0&&(zk=4194304)));var r=nf();t=sy(t,e),t!==null&&(zT(t,e,r),Wf(t,r))}function axe(t){var e=t.memoizedState,r=0;e!==null&&(r=e.retryLane),PK(t,r)}function lxe(t,e){var r=0;switch(t.tag){case 13:var n=t.stateNode,i=t.memoizedState;i!==null&&(r=i.retryLane);break;case 19:n=t.stateNode;break;default:throw Error(vn(314))}n!==null&&n.delete(e),PK(t,r)}var IK;IK=function(t,e,r){if(t!==null)if(t.memoizedProps!==e.pendingProps||jf.current)Vf=!0;else{if((t.lanes&r)==0&&(e.flags&128)==0)return Vf=!1,Y0e(t,e,r);Vf=(t.flags&131072)!=0}else Vf=!1,Sa&&(e.flags&1048576)!=0&&sY(e,aO,e.index);switch(e.lanes=0,e.tag){case 2:var n=e.type;wO(t,e),t=e.pendingProps;var i=b2(e,_u.current);T2(e,r),i=HB(null,e,n,t,i,r);var o=WB();return e.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,Uf(n)?(o=!0,iO(e)):o=!1,e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,DB(e),i.updater=hO,e.stateNode=i,i._reactInternals=e,$B(e,n,t,r),e=JB(null,e,n,!0,o,r)):(e.tag=0,Sa&&o&&SB(e),rf(null,e,i,r),e=e.child),e;case 16:n=e.elementType;e:{switch(wO(t,e),t=e.pendingProps,i=n._init,n=i(n._payload),e.type=n,i=e.tag=uxe(n),t=ym(n,t),i){case 0:e=QB(null,e,n,t,r);break e;case 1:e=eK(null,e,n,t,r);break e;case 11:e=YY(null,e,n,t,r);break e;case 14:e=KY(null,e,n,ym(n.type,t),r);break e}throw Error(vn(306,n,""))}return e;case 0:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:ym(n,i),QB(t,e,n,i,r);case 1:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:ym(n,i),eK(t,e,n,i,r);case 3:e:{if(tK(e),t===null)throw Error(vn(387));n=e.pendingProps,o=e.memoizedState,i=o.element,dY(t,e),dO(e,n,null,r);var a=e.memoizedState;if(n=a.element,o.isDehydrated)if(o={element:n,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},e.updateQueue.baseState=o,e.memoizedState=o,e.flags&256){i=M2(Error(vn(423)),e),e=rK(t,e,n,r,i);break e}else if(n!==i){i=M2(Error(vn(424)),e),e=rK(t,e,n,r,i);break e}else for(Hd=Y0(e.stateNode.containerInfo.firstChild),Vd=e,Sa=!0,vm=null,r=bY(e,null,n,r),e.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(E2(),n===i){e=ly(t,e,r);break e}rf(t,e,n,r)}e=e.child}return e;case 5:return wY(e),t===null&&IB(e),n=e.type,i=e.pendingProps,o=t!==null?t.memoizedProps:null,a=i.children,xB(n,i)?a=null:o!==null&&xB(n,o)&&(e.flags|=32),JY(t,e),rf(t,e,a,r),e.child;case 6:return t===null&&IB(e),null;case 13:return nK(t,e,r);case 4:return FB(e,e.stateNode.containerInfo),n=e.pendingProps,t===null?e.child=P2(e,null,n,r):rf(t,e,n,r),e.child;case 11:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:ym(n,i),YY(t,e,n,i,r);case 7:return rf(t,e,e.pendingProps,r),e.child;case 8:return rf(t,e,e.pendingProps.children,r),e.child;case 12:return rf(t,e,e.pendingProps.children,r),e.child;case 10:e:{if(n=e.type._context,i=e.pendingProps,o=e.memoizedProps,a=i.value,Qs(cO,n._currentValue),n._currentValue=a,o!==null)if(gm(o.value,a)){if(o.children===i.children&&!jf.current){e=ly(t,e,r);break e}}else for(o=e.child,o!==null&&(o.return=e);o!==null;){var s=o.dependencies;if(s!==null){a=o.child;for(var l=s.firstContext;l!==null;){if(l.context===n){if(o.tag===1){l=ay(-1,r&-r),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var p=u.pending;p===null?l.next=l:(l.next=p.next,p.next=l),u.pending=l}}o.lanes|=r,l=o.alternate,l!==null&&(l.lanes|=r),OB(o.return,r,e),s.lanes|=r;break}l=l.next}}else if(o.tag===10)a=o.type===e.type?null:o.child;else if(o.tag===18){if(a=o.return,a===null)throw Error(vn(341));a.lanes|=r,s=a.alternate,s!==null&&(s.lanes|=r),OB(a,r,e),a=o.sibling}else a=o.child;if(a!==null)a.return=o;else for(a=o;a!==null;){if(a===e){a=null;break}if(o=a.sibling,o!==null){o.return=a.return,a=o;break}a=a.return}o=a}rf(t,e,i.children,r),e=e.child}return e;case 9:return i=e.type,n=e.pendingProps.children,T2(e,r),i=Gh(i),n=n(i),e.flags|=1,rf(t,e,n,r),e.child;case 14:return n=e.type,i=ym(n,e.pendingProps),i=ym(n.type,i),KY(t,e,n,i,r);case 15:return ZY(t,e,e.type,e.pendingProps,r);case 17:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:ym(n,i),wO(t,e),e.tag=1,Uf(n)?(t=!0,iO(e)):t=!1,T2(e,r),vY(e,n,i),$B(e,n,i,r),JB(null,e,n,!0,t,r);case 19:return oK(t,e,r);case 22:return QY(t,e,r)}throw Error(vn(156,e.tag))};function MK(t,e){return aX(t,e)}function cxe(t,e,r,n){this.tag=t,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Yh(t,e,r,n){return new cxe(t,e,r,n)}function x6(t){return t=t.prototype,!(!t||!t.isReactComponent)}function uxe(t){if(typeof t=="function")return x6(t)?1:0;if(t!=null){if(t=t.$$typeof,t===Sz)return 11;if(t===Iz)return 14}return 2}function sx(t,e){var r=t.alternate;return r===null?(r=Yh(t.tag,e,t.key,t.mode),r.elementType=t.elementType,r.type=t.type,r.stateNode=t.stateNode,r.alternate=t,t.alternate=r):(r.pendingProps=e,r.type=t.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=t.flags&14680064,r.childLanes=t.childLanes,r.lanes=t.lanes,r.child=t.child,r.memoizedProps=t.memoizedProps,r.memoizedState=t.memoizedState,r.updateQueue=t.updateQueue,e=t.dependencies,r.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},r.sibling=t.sibling,r.index=t.index,r.ref=t.ref,r}function OO(t,e,r,n,i,o){var a=2;if(n=t,typeof t=="function")x6(t)&&(a=1);else if(typeof t=="string")a=5;else e:switch(t){case l2:return I1(r.children,i,o,e);case Cz:a=8,i|=8;break;case Ez:return t=Yh(12,r,e,i|2),t.elementType=Ez,t.lanes=o,t;case Tz:return t=Yh(13,r,e,i),t.elementType=Tz,t.lanes=o,t;case Pz:return t=Yh(19,r,e,i),t.elementType=Pz,t.lanes=o,t;case $q:return LO(r,i,o,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case Dq:a=10;break e;case Nq:a=9;break e;case Sz:a=11;break e;case Iz:a=14;break e;case j0:a=16,n=null;break e}throw Error(vn(130,t==null?t:typeof t,""))}return e=Yh(a,r,e,i),e.elementType=t,e.type=n,e.lanes=o,e}function I1(t,e,r,n){return t=Yh(7,t,n,e),t.lanes=r,t}function LO(t,e,r,n){return t=Yh(22,t,n,e),t.elementType=$q,t.lanes=r,t.stateNode={isHidden:!1},t}function _6(t,e,r){return t=Yh(6,t,null,e),t.lanes=r,t}function b6(t,e,r){return e=Yh(4,t.children!==null?t.children:[],t.key,e),e.lanes=r,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function fxe(t,e,r,n,i){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Xz(0),this.expirationTimes=Xz(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Xz(0),this.identifierPrefix=n,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function w6(t,e,r,n,i,o,a,s,l){return t=new fxe(t,e,r,s,l),e===1?(e=1,o===!0&&(e|=8)):e=0,o=Yh(3,null,null,e),t.current=o,o.stateNode=t,o.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},DB(o),t}function dxe(t,e,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a2,key:n==null?null:""+n,children:t,containerInfo:e,implementation:r}}function AK(t){if(!t)return Z0;t=t._reactInternals;e:{if(g1(t)!==t||t.tag!==1)throw Error(vn(170));var e=t;do{switch(e.tag){case 3:e=e.stateNode.context;break e;case 1:if(Uf(e.type)){e=e.stateNode.__reactInternalMemoizedMergedChildContext;break e}}e=e.return}while(e!==null);throw Error(vn(171))}if(t.tag===1){var r=t.type;if(Uf(r))return nY(t,r,e)}return e}function RK(t,e,r,n,i,o,a,s,l){return t=w6(r,n,!0,t,i,o,a,s,l),t.context=AK(null),r=t.current,n=nf(),i=ix(r),o=ay(n,i),o.callback=e!=null?e:null,ex(r,o,i),t.current.lanes=i,zT(t,i,n),Wf(t,n),t}function DO(t,e,r,n){var i=e.current,o=nf(),a=ix(i);return r=AK(r),e.context===null?e.context=r:e.pendingContext=r,e=ay(o,a),e.payload={element:t},n=n===void 0?null:n,n!==null&&(e.callback=n),t=ex(i,e,a),t!==null&&(bm(t,i,a,o),fO(t,i,a)),a}function NO(t){if(t=t.current,!t.child)return null;switch(t.child.tag){case 5:return t.child.stateNode;default:return t.child.stateNode}}function kK(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var r=t.retryLane;t.retryLane=r!==0&&r<e?r:e}}function C6(t,e){kK(t,e),(t=t.alternate)&&kK(t,e)}function hxe(){return null}var OK=typeof reportError=="function"?reportError:function(t){console.error(t)};function E6(t){this._internalRoot=t}$O.prototype.render=E6.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(vn(409));DO(t,e,null,null)};$O.prototype.unmount=E6.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;S1(function(){DO(null,t,null,null)}),e[ry]=null}};function $O(t){this._internalRoot=t}$O.prototype.unstable_scheduleHydration=function(t){if(t){var e=mX();t={blockedOn:null,target:t,priority:e};for(var r=0;r<G0.length&&e!==0&&e<G0[r].priority;r++);G0.splice(r,0,t),r===0&&yX(t)}};function S6(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function FO(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11&&(t.nodeType!==8||t.nodeValue!==" react-mount-point-unstable "))}function LK(){}function pxe(t,e,r,n,i){if(i){if(typeof n=="function"){var o=n;n=function(){var u=NO(a);o.call(u)}}var a=RK(e,n,t,0,null,!1,!1,"",LK);return t._reactRootContainer=a,t[ry]=a.current,JT(t.nodeType===8?t.parentNode:t),S1(),a}for(;i=t.lastChild;)t.removeChild(i);if(typeof n=="function"){var s=n;n=function(){var u=NO(l);s.call(u)}}var l=w6(t,0,!1,null,null,!1,!1,"",LK);return t._reactRootContainer=l,t[ry]=l.current,JT(t.nodeType===8?t.parentNode:t),S1(function(){DO(e,l,r,n)}),l}function zO(t,e,r,n,i){var o=r._reactRootContainer;if(o){var a=o;if(typeof i=="function"){var s=i;i=function(){var l=NO(a);s.call(l)}}DO(e,a,t,i)}else a=pxe(r,e,t,i,n);return NO(a)}hX=function(t){switch(t.tag){case 3:var e=t.stateNode;if(e.current.memoizedState.isDehydrated){var r=FT(e.pendingLanes);r!==0&&(Yz(e,r|1),Wf(e,_l()),(Zo&6)==0&&(k2=_l()+500,Q0()))}break;case 13:S1(function(){var n=sy(t,1);if(n!==null){var i=nf();bm(n,t,1,i)}}),C6(t,1)}};Kz=function(t){if(t.tag===13){var e=sy(t,134217728);if(e!==null){var r=nf();bm(e,t,134217728,r)}C6(t,134217728)}};pX=function(t){if(t.tag===13){var e=ix(t),r=sy(t,e);if(r!==null){var n=nf();bm(r,t,e,n)}C6(t,e)}};mX=function(){return _s};gX=function(t,e){var r=_s;try{return _s=t,e()}finally{_s=r}};Uz=function(t,e,r){switch(e){case"input":if(Lz(t,r),e=r.name,r.type==="radio"&&e!=null){for(r=t;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+e)+'][type="radio"]'),e=0;e<r.length;e++){var n=r[e];if(n!==t&&n.form===t.form){var i=rO(n);if(!i)throw Error(vn(90));Bq(n),Lz(n,i)}}}break;case"textarea":Wq(t,r);break;case"select":e=r.value,e!=null&&c2(t,!!r.multiple,e,!1)}};eX=g6;tX=S1;var mxe={usingClientEntryPoint:!1,Events:[rP,x2,rO,Qq,Jq,g6]},gP={findFiberByHostInstance:v1,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},gxe={bundleType:gP.bundleType,version:gP.version,rendererPackageName:gP.rendererPackageName,rendererConfig:gP.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:ty.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return t=oX(t),t===null?null:t.stateNode},findFiberByHostInstance:gP.findFiberByHostInstance||hxe,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__!="undefined"){var BO=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!BO.isDisabled&&BO.supportsFiber)try{$k=BO.inject(gxe),Og=BO}catch{}}Bd.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=mxe;Bd.createPortal=function(t,e){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!S6(e))throw Error(vn(200));return dxe(t,e,null,r)};Bd.createRoot=function(t,e){if(!S6(t))throw Error(vn(299));var r=!1,n="",i=OK;return e!=null&&(e.unstable_strictMode===!0&&(r=!0),e.identifierPrefix!==void 0&&(n=e.identifierPrefix),e.onRecoverableError!==void 0&&(i=e.onRecoverableError)),e=w6(t,1,!1,null,null,r,!1,n,i),t[ry]=e.current,JT(t.nodeType===8?t.parentNode:t),new E6(e)};Bd.findDOMNode=function(t){if(t==null)return null;if(t.nodeType===1)return t;var e=t._reactInternals;if(e===void 0)throw typeof t.render=="function"?Error(vn(188)):(t=Object.keys(t).join(","),Error(vn(268,t)));return t=oX(e),t=t===null?null:t.stateNode,t};Bd.flushSync=function(t){return S1(t)};Bd.hydrate=function(t,e,r){if(!FO(e))throw Error(vn(200));return zO(null,t,e,!0,r)};Bd.hydrateRoot=function(t,e,r){if(!S6(t))throw Error(vn(405));var n=r!=null&&r.hydratedSources||null,i=!1,o="",a=OK;if(r!=null&&(r.unstable_strictMode===!0&&(i=!0),r.identifierPrefix!==void 0&&(o=r.identifierPrefix),r.onRecoverableError!==void 0&&(a=r.onRecoverableError)),e=RK(e,null,t,1,r!=null?r:null,i,!1,o,a),t[ry]=e.current,JT(t),n)for(t=0;t<n.length;t++)r=n[t],i=r._getVersion,i=i(r._source),e.mutableSourceEagerHydrationData==null?e.mutableSourceEagerHydrationData=[r,i]:e.mutableSourceEagerHydrationData.push(r,i);return new $O(e)};Bd.render=function(t,e,r){if(!FO(e))throw Error(vn(200));return zO(null,t,e,!1,r)};Bd.unmountComponentAtNode=function(t){if(!FO(t))throw Error(vn(40));return t._reactRootContainer?(S1(function(){zO(null,null,t,!1,function(){t._reactRootContainer=null,t[ry]=null})}),!0):!1};Bd.unstable_batchedUpdates=g6;Bd.unstable_renderSubtreeIntoContainer=function(t,e,r,n){if(!FO(r))throw Error(vn(200));if(t==null||t._reactInternals===void 0)throw Error(vn(38));return zO(t,e,r,!1,n)};Bd.version="18.2.0-next-9e3b772b8-20220608";function DK(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__=="undefined"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(DK)}catch(t){console.error(t)}}DK(),Wa.exports=Bd;var M1=Wa.exports,vxe,NK=Wa.exports;vxe=NK.createRoot,NK.hydrateRoot;function T6(t,e){return T6=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},T6(t,e)}function Eu(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,T6(t,e)}var vP={exports:{}},yxe="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",xxe=yxe,_xe=xxe;function $K(){}function FK(){}FK.resetWarningCache=$K;var bxe=function(){function t(n,i,o,a,s,l){if(l!==_xe){var u=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 u.name="Invariant Violation",u}}t.isRequired=t;function e(){return t}var r={array:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:FK,resetWarningCache:$K};return r.PropTypes=r,r};vP.exports=bxe();var Us=vP.exports;function vt(){return vt=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},vt.apply(this,arguments)}function jO(t){return t.charAt(0)==="/"}function P6(t,e){for(var r=e,n=r+1,i=t.length;n<i;r+=1,n+=1)t[r]=t[n];t.pop()}function wxe(t,e){e===void 0&&(e="");var r=t&&t.split("/")||[],n=e&&e.split("/")||[],i=t&&jO(t),o=e&&jO(e),a=i||o;if(t&&jO(t)?n=r:r.length&&(n.pop(),n=n.concat(r)),!n.length)return"/";var s;if(n.length){var l=n[n.length-1];s=l==="."||l===".."||l===""}else s=!1;for(var u=0,p=n.length;p>=0;p--){var m=n[p];m==="."?P6(n,p):m===".."?(P6(n,p),u++):u&&(P6(n,p),u--)}if(!a)for(;u--;u)n.unshift("..");a&&n[0]!==""&&(!n[0]||!jO(n[0]))&&n.unshift("");var v=n.join("/");return s&&v.substr(-1)!=="/"&&(v+="/"),v}function zK(t){return t.valueOf?t.valueOf():Object.prototype.valueOf.call(t)}function UO(t,e){if(t===e)return!0;if(t==null||e==null)return!1;if(Array.isArray(t))return Array.isArray(e)&&t.length===e.length&&t.every(function(i,o){return UO(i,e[o])});if(typeof t=="object"||typeof e=="object"){var r=zK(t),n=zK(e);return r!==t||n!==e?UO(r,n):Object.keys(Object.assign({},t,e)).every(function(i){return UO(t[i],e[i])})}return!1}var Cxe=!0,BK="Invariant failed";function Fg(t,e){if(!t)throw Cxe?new Error(BK):new Error(BK+": "+(e||""))}function yP(t){return t.charAt(0)==="/"?t:"/"+t}function jK(t){return t.charAt(0)==="/"?t.substr(1):t}function Exe(t,e){return t.toLowerCase().indexOf(e.toLowerCase())===0&&"/?#".indexOf(t.charAt(e.length))!==-1}function UK(t,e){return Exe(t,e)?t.substr(e.length):t}function VK(t){return t.charAt(t.length-1)==="/"?t.slice(0,-1):t}function Sxe(t){var e=t||"/",r="",n="",i=e.indexOf("#");i!==-1&&(n=e.substr(i),e=e.substr(0,i));var o=e.indexOf("?");return o!==-1&&(r=e.substr(o),e=e.substr(0,o)),{pathname:e,search:r==="?"?"":r,hash:n==="#"?"":n}}function Gf(t){var e=t.pathname,r=t.search,n=t.hash,i=e||"/";return r&&r!=="?"&&(i+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(i+=n.charAt(0)==="#"?n:"#"+n),i}function of(t,e,r,n){var i;typeof t=="string"?(i=Sxe(t),i.state=e):(i=vt({},t),i.pathname===void 0&&(i.pathname=""),i.search?i.search.charAt(0)!=="?"&&(i.search="?"+i.search):i.search="",i.hash?i.hash.charAt(0)!=="#"&&(i.hash="#"+i.hash):i.hash="",e!==void 0&&i.state===void 0&&(i.state=e));try{i.pathname=decodeURI(i.pathname)}catch(o){throw o instanceof URIError?new URIError('Pathname "'+i.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):o}return r&&(i.key=r),n?i.pathname?i.pathname.charAt(0)!=="/"&&(i.pathname=wxe(i.pathname,n.pathname)):i.pathname=n.pathname:i.pathname||(i.pathname="/"),i}function Txe(t,e){return t.pathname===e.pathname&&t.search===e.search&&t.hash===e.hash&&t.key===e.key&&UO(t.state,e.state)}function I6(){var t=null;function e(a){return t=a,function(){t===a&&(t=null)}}function r(a,s,l,u){if(t!=null){var p=typeof t=="function"?t(a,s):t;typeof p=="string"?typeof l=="function"?l(p,u):u(!0):u(p!==!1)}else u(!0)}var n=[];function i(a){var s=!0;function l(){s&&a.apply(void 0,arguments)}return n.push(l),function(){s=!1,n=n.filter(function(u){return u!==l})}}function o(){for(var a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];n.forEach(function(u){return u.apply(void 0,s)})}return{setPrompt:e,confirmTransitionTo:r,appendListener:i,notifyListeners:o}}var HK=!!(typeof window!="undefined"&&window.document&&window.document.createElement);function WK(t,e){e(window.confirm(t))}function Pxe(){var t=window.navigator.userAgent;return(t.indexOf("Android 2.")!==-1||t.indexOf("Android 4.0")!==-1)&&t.indexOf("Mobile Safari")!==-1&&t.indexOf("Chrome")===-1&&t.indexOf("Windows Phone")===-1?!1:window.history&&"pushState"in window.history}function Ixe(){return window.navigator.userAgent.indexOf("Trident")===-1}function Mxe(){return window.navigator.userAgent.indexOf("Firefox")===-1}function Axe(t){return t.state===void 0&&navigator.userAgent.indexOf("CriOS")===-1}var GK="popstate",qK="hashchange";function XK(){try{return window.history.state||{}}catch{return{}}}function Rxe(t){t===void 0&&(t={}),HK||Fg(!1);var e=window.history,r=Pxe(),n=!Ixe(),i=t,o=i.forceRefresh,a=o===void 0?!1:o,s=i.getUserConfirmation,l=s===void 0?WK:s,u=i.keyLength,p=u===void 0?6:u,m=t.basename?VK(yP(t.basename)):"";function v(ee){var re=ee||{},ce=re.key,fe=re.state,J=window.location,oe=J.pathname,ve=J.search,ye=J.hash,xe=oe+ve+ye;return m&&(xe=UK(xe,m)),of(xe,fe,ce)}function x(){return Math.random().toString(36).substr(2,p)}var y=I6();function _(ee){vt(q,ee),q.length=e.length,y.notifyListeners(q.location,q.action)}function w(ee){Axe(ee)||T(v(ee.state))}function C(){T(v(XK()))}var E=!1;function T(ee){if(E)E=!1,_();else{var re="POP";y.confirmTransitionTo(ee,re,l,function(ce){ce?_({action:re,location:ee}):A(ee)})}}function A(ee){var re=q.location,ce=X.indexOf(re.key);ce===-1&&(ce=0);var fe=X.indexOf(ee.key);fe===-1&&(fe=0);var J=ce-fe;J&&(E=!0,H(J))}var k=v(XK()),X=[k.key];function Z(ee){return m+Gf(ee)}function W(ee,re){var ce="PUSH",fe=of(ee,re,x(),q.location);y.confirmTransitionTo(fe,ce,l,function(J){if(!!J){var oe=Z(fe),ve=fe.key,ye=fe.state;if(r)if(e.pushState({key:ve,state:ye},null,oe),a)window.location.href=oe;else{var xe=X.indexOf(q.location.key),se=X.slice(0,xe+1);se.push(fe.key),X=se,_({action:ce,location:fe})}else window.location.href=oe}})}function D(ee,re){var ce="REPLACE",fe=of(ee,re,x(),q.location);y.confirmTransitionTo(fe,ce,l,function(J){if(!!J){var oe=Z(fe),ve=fe.key,ye=fe.state;if(r)if(e.replaceState({key:ve,state:ye},null,oe),a)window.location.replace(oe);else{var xe=X.indexOf(q.location.key);xe!==-1&&(X[xe]=fe.key),_({action:ce,location:fe})}else window.location.replace(oe)}})}function H(ee){e.go(ee)}function N(){H(-1)}function j(){H(1)}var $=0;function z(ee){$+=ee,$===1&&ee===1?(window.addEventListener(GK,w),n&&window.addEventListener(qK,C)):$===0&&(window.removeEventListener(GK,w),n&&window.removeEventListener(qK,C))}var O=!1;function F(ee){ee===void 0&&(ee=!1);var re=y.setPrompt(ee);return O||(z(1),O=!0),function(){return O&&(O=!1,z(-1)),re()}}function G(ee){var re=y.appendListener(ee);return z(1),function(){z(-1),re()}}var q={length:e.length,action:"POP",location:k,createHref:Z,push:W,replace:D,go:H,goBack:N,goForward:j,block:F,listen:G};return q}var YK="hashchange",kxe={hashbang:{encodePath:function(e){return e.charAt(0)==="!"?e:"!/"+jK(e)},decodePath:function(e){return e.charAt(0)==="!"?e.substr(1):e}},noslash:{encodePath:jK,decodePath:yP},slash:{encodePath:yP,decodePath:yP}};function KK(t){var e=t.indexOf("#");return e===-1?t:t.slice(0,e)}function xP(){var t=window.location.href,e=t.indexOf("#");return e===-1?"":t.substring(e+1)}function Oxe(t){window.location.hash=t}function M6(t){window.location.replace(KK(window.location.href)+"#"+t)}function Lxe(t){t===void 0&&(t={}),HK||Fg(!1);var e=window.history;Mxe();var r=t,n=r.getUserConfirmation,i=n===void 0?WK:n,o=r.hashType,a=o===void 0?"slash":o,s=t.basename?VK(yP(t.basename)):"",l=kxe[a],u=l.encodePath,p=l.decodePath;function m(){var re=p(xP());return s&&(re=UK(re,s)),of(re)}var v=I6();function x(re){vt(ee,re),ee.length=e.length,v.notifyListeners(ee.location,ee.action)}var y=!1,_=null;function w(re,ce){return re.pathname===ce.pathname&&re.search===ce.search&&re.hash===ce.hash}function C(){var re=xP(),ce=u(re);if(re!==ce)M6(ce);else{var fe=m(),J=ee.location;if(!y&&w(J,fe)||_===Gf(fe))return;_=null,E(fe)}}function E(re){if(y)y=!1,x();else{var ce="POP";v.confirmTransitionTo(re,ce,i,function(fe){fe?x({action:ce,location:re}):T(re)})}}function T(re){var ce=ee.location,fe=Z.lastIndexOf(Gf(ce));fe===-1&&(fe=0);var J=Z.lastIndexOf(Gf(re));J===-1&&(J=0);var oe=fe-J;oe&&(y=!0,N(oe))}var A=xP(),k=u(A);A!==k&&M6(k);var X=m(),Z=[Gf(X)];function W(re){var ce=document.querySelector("base"),fe="";return ce&&ce.getAttribute("href")&&(fe=KK(window.location.href)),fe+"#"+u(s+Gf(re))}function D(re,ce){var fe="PUSH",J=of(re,void 0,void 0,ee.location);v.confirmTransitionTo(J,fe,i,function(oe){if(!!oe){var ve=Gf(J),ye=u(s+ve),xe=xP()!==ye;if(xe){_=ve,Oxe(ye);var se=Z.lastIndexOf(Gf(ee.location)),me=Z.slice(0,se+1);me.push(ve),Z=me,x({action:fe,location:J})}else x()}})}function H(re,ce){var fe="REPLACE",J=of(re,void 0,void 0,ee.location);v.confirmTransitionTo(J,fe,i,function(oe){if(!!oe){var ve=Gf(J),ye=u(s+ve),xe=xP()!==ye;xe&&(_=ve,M6(ye));var se=Z.indexOf(Gf(ee.location));se!==-1&&(Z[se]=ve),x({action:fe,location:J})}})}function N(re){e.go(re)}function j(){N(-1)}function $(){N(1)}var z=0;function O(re){z+=re,z===1&&re===1?window.addEventListener(YK,C):z===0&&window.removeEventListener(YK,C)}var F=!1;function G(re){re===void 0&&(re=!1);var ce=v.setPrompt(re);return F||(O(1),F=!0),function(){return F&&(F=!1,O(-1)),ce()}}function q(re){var ce=v.appendListener(re);return O(1),function(){O(-1),ce()}}var ee={length:e.length,action:"POP",location:X,createHref:W,push:D,replace:H,go:N,goBack:j,goForward:$,block:G,listen:q};return ee}function ZK(t,e,r){return Math.min(Math.max(t,e),r)}function Dxe(t){t===void 0&&(t={});var e=t,r=e.getUserConfirmation,n=e.initialEntries,i=n===void 0?["/"]:n,o=e.initialIndex,a=o===void 0?0:o,s=e.keyLength,l=s===void 0?6:s,u=I6();function p(W){vt(Z,W),Z.length=Z.entries.length,u.notifyListeners(Z.location,Z.action)}function m(){return Math.random().toString(36).substr(2,l)}var v=ZK(a,0,i.length-1),x=i.map(function(W){return typeof W=="string"?of(W,void 0,m()):of(W,void 0,W.key||m())}),y=Gf;function _(W,D){var H="PUSH",N=of(W,D,m(),Z.location);u.confirmTransitionTo(N,H,r,function(j){if(!!j){var $=Z.index,z=$+1,O=Z.entries.slice(0);O.length>z?O.splice(z,O.length-z,N):O.push(N),p({action:H,location:N,index:z,entries:O})}})}function w(W,D){var H="REPLACE",N=of(W,D,m(),Z.location);u.confirmTransitionTo(N,H,r,function(j){!j||(Z.entries[Z.index]=N,p({action:H,location:N}))})}function C(W){var D=ZK(Z.index+W,0,Z.entries.length-1),H="POP",N=Z.entries[D];u.confirmTransitionTo(N,H,r,function(j){j?p({action:H,location:N,index:D}):p()})}function E(){C(-1)}function T(){C(1)}function A(W){var D=Z.index+W;return D>=0&&D<Z.entries.length}function k(W){return W===void 0&&(W=!1),u.setPrompt(W)}function X(W){return u.appendListener(W)}var Z={length:x.length,action:"POP",location:x[v],index:v,entries:x,createHref:y,push:_,replace:w,go:C,goBack:E,goForward:T,canGo:A,block:k,listen:X};return Z}var A6=1073741823,QK=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:{};function Nxe(){var t="__global_unique_id__";return QK[t]=(QK[t]||0)+1}function $xe(t,e){return t===e?t!==0||1/t==1/e:t!==t&&e!==e}function Fxe(t){var e=[];return{on:function(n){e.push(n)},off:function(n){e=e.filter(function(i){return i!==n})},get:function(){return t},set:function(n,i){t=n,e.forEach(function(o){return o(t,i)})}}}function zxe(t){return Array.isArray(t)?t[0]:t}function Bxe(t,e){var r,n,i="__create-react-context-"+Nxe()+"__",o=function(s){Eu(l,s);function l(){var p;return p=s.apply(this,arguments)||this,p.emitter=Fxe(p.props.value),p}var u=l.prototype;return u.getChildContext=function(){var m;return m={},m[i]=this.emitter,m},u.componentWillReceiveProps=function(m){if(this.props.value!==m.value){var v=this.props.value,x=m.value,y;$xe(v,x)?y=0:(y=typeof e=="function"?e(v,x):A6,y|=0,y!==0&&this.emitter.set(m.value,y))}},u.render=function(){return this.props.children},l}(Y.exports.Component);o.childContextTypes=(r={},r[i]=Us.object.isRequired,r);var a=function(s){Eu(l,s);function l(){var p;return p=s.apply(this,arguments)||this,p.state={value:p.getValue()},p.onUpdate=function(m,v){var x=p.observedBits|0;(x&v)!=0&&p.setState({value:p.getValue()})},p}var u=l.prototype;return u.componentWillReceiveProps=function(m){var v=m.observedBits;this.observedBits=v==null?A6:v},u.componentDidMount=function(){this.context[i]&&this.context[i].on(this.onUpdate);var m=this.props.observedBits;this.observedBits=m==null?A6:m},u.componentWillUnmount=function(){this.context[i]&&this.context[i].off(this.onUpdate)},u.getValue=function(){return this.context[i]?this.context[i].get():t},u.render=function(){return zxe(this.props.children)(this.state.value)},l}(Y.exports.Component);return a.contextTypes=(n={},n[i]=Us.object,n),{Provider:o,Consumer:a}}var jxe=Or.createContext||Bxe,L2={exports:{}},Uxe=Array.isArray||function(t){return Object.prototype.toString.call(t)=="[object Array]"},VO=Uxe;L2.exports=tZ;L2.exports.parse=R6;L2.exports.compile=Hxe;L2.exports.tokensToFunction=JK;L2.exports.tokensToRegExp=eZ;var Vxe=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function R6(t,e){for(var r=[],n=0,i=0,o="",a=e&&e.delimiter||"/",s;(s=Vxe.exec(t))!=null;){var l=s[0],u=s[1],p=s.index;if(o+=t.slice(i,p),i=p+l.length,u){o+=u[1];continue}var m=t[i],v=s[2],x=s[3],y=s[4],_=s[5],w=s[6],C=s[7];o&&(r.push(o),o="");var E=v!=null&&m!=null&&m!==v,T=w==="+"||w==="*",A=w==="?"||w==="*",k=s[2]||a,X=y||_;r.push({name:x||n++,prefix:v||"",delimiter:k,optional:A,repeat:T,partial:E,asterisk:!!C,pattern:X?qxe(X):C?".*":"[^"+HO(k)+"]+?"})}return i<t.length&&(o+=t.substr(i)),o&&r.push(o),r}function Hxe(t,e){return JK(R6(t,e),e)}function Wxe(t){return encodeURI(t).replace(/[\/?#]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}function Gxe(t){return encodeURI(t).replace(/[?#]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}function JK(t,e){for(var r=new Array(t.length),n=0;n<t.length;n++)typeof t[n]=="object"&&(r[n]=new RegExp("^(?:"+t[n].pattern+")$",O6(e)));return function(i,o){for(var a="",s=i||{},l=o||{},u=l.pretty?Wxe:encodeURIComponent,p=0;p<t.length;p++){var m=t[p];if(typeof m=="string"){a+=m;continue}var v=s[m.name],x;if(v==null)if(m.optional){m.partial&&(a+=m.prefix);continue}else throw new TypeError('Expected "'+m.name+'" to be defined');if(VO(v)){if(!m.repeat)throw new TypeError('Expected "'+m.name+'" to not repeat, but received `'+JSON.stringify(v)+"`");if(v.length===0){if(m.optional)continue;throw new TypeError('Expected "'+m.name+'" to not be empty')}for(var y=0;y<v.length;y++){if(x=u(v[y]),!r[p].test(x))throw new TypeError('Expected all "'+m.name+'" to match "'+m.pattern+'", but received `'+JSON.stringify(x)+"`");a+=(y===0?m.prefix:m.delimiter)+x}continue}if(x=m.asterisk?Gxe(v):u(v),!r[p].test(x))throw new TypeError('Expected "'+m.name+'" to match "'+m.pattern+'", but received "'+x+'"');a+=m.prefix+x}return a}}function HO(t){return t.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}function qxe(t){return t.replace(/([=!:$\/()])/g,"\\$1")}function k6(t,e){return t.keys=e,t}function O6(t){return t&&t.sensitive?"":"i"}function Xxe(t,e){var r=t.source.match(/\((?!\?)/g);if(r)for(var n=0;n<r.length;n++)e.push({name:n,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,asterisk:!1,pattern:null});return k6(t,e)}function Yxe(t,e,r){for(var n=[],i=0;i<t.length;i++)n.push(tZ(t[i],e,r).source);var o=new RegExp("(?:"+n.join("|")+")",O6(r));return k6(o,e)}function Kxe(t,e,r){return eZ(R6(t,r),e,r)}function eZ(t,e,r){VO(e)||(r=e||r,e=[]),r=r||{};for(var n=r.strict,i=r.end!==!1,o="",a=0;a<t.length;a++){var s=t[a];if(typeof s=="string")o+=HO(s);else{var l=HO(s.prefix),u="(?:"+s.pattern+")";e.push(s),s.repeat&&(u+="(?:"+l+u+")*"),s.optional?s.partial?u=l+"("+u+")?":u="(?:"+l+"("+u+"))?":u=l+"("+u+")",o+=u}}var p=HO(r.delimiter||"/"),m=o.slice(-p.length)===p;return n||(o=(m?o.slice(0,-p.length):o)+"(?:"+p+"(?=$))?"),i?o+="$":o+=n&&m?"":"(?="+p+"|$)",k6(new RegExp("^"+o,O6(r)),e)}function tZ(t,e,r){return VO(e)||(r=e||r,e=[]),r=r||{},t instanceof RegExp?Xxe(t,e):VO(t)?Yxe(t,e,r):Kxe(t,e,r)}var rZ=L2.exports,L6={exports:{}},bs={};/** @license React v16.13.1 * react-is.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var xc=typeof Symbol=="function"&&Symbol.for,D6=xc?Symbol.for("react.element"):60103,N6=xc?Symbol.for("react.portal"):60106,WO=xc?Symbol.for("react.fragment"):60107,GO=xc?Symbol.for("react.strict_mode"):60108,qO=xc?Symbol.for("react.profiler"):60114,XO=xc?Symbol.for("react.provider"):60109,YO=xc?Symbol.for("react.context"):60110,$6=xc?Symbol.for("react.async_mode"):60111,KO=xc?Symbol.for("react.concurrent_mode"):60111,ZO=xc?Symbol.for("react.forward_ref"):60112,QO=xc?Symbol.for("react.suspense"):60113,Zxe=xc?Symbol.for("react.suspense_list"):60120,JO=xc?Symbol.for("react.memo"):60115,eL=xc?Symbol.for("react.lazy"):60116,Qxe=xc?Symbol.for("react.block"):60121,Jxe=xc?Symbol.for("react.fundamental"):60117,e_e=xc?Symbol.for("react.responder"):60118,t_e=xc?Symbol.for("react.scope"):60119;function Gd(t){if(typeof t=="object"&&t!==null){var e=t.$$typeof;switch(e){case D6:switch(t=t.type,t){case $6:case KO:case WO:case qO:case GO:case QO:return t;default:switch(t=t&&t.$$typeof,t){case YO:case ZO:case eL:case JO:case XO:return t;default:return e}}case N6:return e}}}function nZ(t){return Gd(t)===KO}bs.AsyncMode=$6;bs.ConcurrentMode=KO;bs.ContextConsumer=YO;bs.ContextProvider=XO;bs.Element=D6;bs.ForwardRef=ZO;bs.Fragment=WO;bs.Lazy=eL;bs.Memo=JO;bs.Portal=N6;bs.Profiler=qO;bs.StrictMode=GO;bs.Suspense=QO;bs.isAsyncMode=function(t){return nZ(t)||Gd(t)===$6};bs.isConcurrentMode=nZ;bs.isContextConsumer=function(t){return Gd(t)===YO};bs.isContextProvider=function(t){return Gd(t)===XO};bs.isElement=function(t){return typeof t=="object"&&t!==null&&t.$$typeof===D6};bs.isForwardRef=function(t){return Gd(t)===ZO};bs.isFragment=function(t){return Gd(t)===WO};bs.isLazy=function(t){return Gd(t)===eL};bs.isMemo=function(t){return Gd(t)===JO};bs.isPortal=function(t){return Gd(t)===N6};bs.isProfiler=function(t){return Gd(t)===qO};bs.isStrictMode=function(t){return Gd(t)===GO};bs.isSuspense=function(t){return Gd(t)===QO};bs.isValidElementType=function(t){return typeof t=="string"||typeof t=="function"||t===WO||t===KO||t===qO||t===GO||t===QO||t===Zxe||typeof t=="object"&&t!==null&&(t.$$typeof===eL||t.$$typeof===JO||t.$$typeof===XO||t.$$typeof===YO||t.$$typeof===ZO||t.$$typeof===Jxe||t.$$typeof===e_e||t.$$typeof===t_e||t.$$typeof===Qxe)};bs.typeOf=Gd;L6.exports=bs;function sf(t,e){if(t==null)return{};var r={},n=Object.keys(t),i,o;for(o=0;o<n.length;o++)i=n[o],!(e.indexOf(i)>=0)&&(r[i]=t[i]);return r}var F6=L6.exports,r_e={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},n_e={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},i_e={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},iZ={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},z6={};z6[F6.ForwardRef]=i_e;z6[F6.Memo]=iZ;function oZ(t){return F6.isMemo(t)?iZ:z6[t.$$typeof]||r_e}var o_e=Object.defineProperty,s_e=Object.getOwnPropertyNames,sZ=Object.getOwnPropertySymbols,a_e=Object.getOwnPropertyDescriptor,l_e=Object.getPrototypeOf,aZ=Object.prototype;function lZ(t,e,r){if(typeof e!="string"){if(aZ){var n=l_e(e);n&&n!==aZ&&lZ(t,n,r)}var i=s_e(e);sZ&&(i=i.concat(sZ(e)));for(var o=oZ(t),a=oZ(e),s=0;s<i.length;++s){var l=i[s];if(!n_e[l]&&!(r&&r[l])&&!(a&&a[l])&&!(o&&o[l])){var u=a_e(e,l);try{o_e(t,l,u)}catch{}}}}return t}var D2=lZ,cZ=function(e){var r=jxe();return r.displayName=e,r},uZ=cZ("Router-History"),Kh=cZ("Router"),_P=function(t){Eu(e,t),e.computeRootMatch=function(i){return{path:"/",url:"/",params:{},isExact:i==="/"}};function e(n){var i;return i=t.call(this,n)||this,i.state={location:n.history.location},i._isMounted=!1,i._pendingLocation=null,n.staticContext||(i.unlisten=n.history.listen(function(o){i._isMounted?i.setState({location:o}):i._pendingLocation=o})),i}var r=e.prototype;return r.componentDidMount=function(){this._isMounted=!0,this._pendingLocation&&this.setState({location:this._pendingLocation})},r.componentWillUnmount=function(){this.unlisten&&(this.unlisten(),this._isMounted=!1,this._pendingLocation=null)},r.render=function(){return Or.createElement(Kh.Provider,{value:{history:this.props.history,location:this.state.location,match:e.computeRootMatch(this.state.location.pathname),staticContext:this.props.staticContext}},Or.createElement(uZ.Provider,{children:this.props.children||null,value:this.props.history}))},e}(Or.Component),c_e=function(t){Eu(e,t);function e(){for(var n,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o))||this,n.history=Dxe(n.props),n}var r=e.prototype;return r.render=function(){return Or.createElement(_P,{history:this.history,children:this.props.children})},e}(Or.Component),fZ=function(t){Eu(e,t);function e(){return t.apply(this,arguments)||this}var r=e.prototype;return r.componentDidMount=function(){this.props.onMount&&this.props.onMount.call(this,this)},r.componentDidUpdate=function(i){this.props.onUpdate&&this.props.onUpdate.call(this,this,i)},r.componentWillUnmount=function(){this.props.onUnmount&&this.props.onUnmount.call(this,this)},r.render=function(){return null},e}(Or.Component);function u_e(t){var e=t.message,r=t.when,n=r===void 0?!0:r;return Or.createElement(Kh.Consumer,null,function(i){if(i||Fg(!1),!n||i.staticContext)return null;var o=i.history.block;return Or.createElement(fZ,{onMount:function(s){s.release=o(e)},onUpdate:function(s,l){l.message!==e&&(s.release(),s.release=o(e))},onUnmount:function(s){s.release()},message:e})})}var B6={},f_e=1e4,dZ=0;function d_e(t){if(B6[t])return B6[t];var e=rZ.compile(t);return dZ<f_e&&(B6[t]=e,dZ++),e}function j6(t,e){return t===void 0&&(t="/"),e===void 0&&(e={}),t==="/"?t:d_e(t)(e,{pretty:!0})}function h_e(t){var e=t.computedMatch,r=t.to,n=t.push,i=n===void 0?!1:n;return Or.createElement(Kh.Consumer,null,function(o){o||Fg(!1);var a=o.history,s=o.staticContext,l=i?a.push:a.replace,u=of(e?typeof r=="string"?j6(r,e.params):vt({},r,{pathname:j6(r.pathname,e.params)}):r);return s?(l(u),null):Or.createElement(fZ,{onMount:function(){l(u)},onUpdate:function(m,v){var x=of(v.to);Txe(x,vt({},u,{key:x.key}))||l(u)},to:r})})}var hZ={},p_e=1e4,pZ=0;function m_e(t,e){var r=""+e.end+e.strict+e.sensitive,n=hZ[r]||(hZ[r]={});if(n[t])return n[t];var i=[],o=rZ(t,i,e),a={regexp:o,keys:i};return pZ<p_e&&(n[t]=a,pZ++),a}function N2(t,e){e===void 0&&(e={}),(typeof e=="string"||Array.isArray(e))&&(e={path:e});var r=e,n=r.path,i=r.exact,o=i===void 0?!1:i,a=r.strict,s=a===void 0?!1:a,l=r.sensitive,u=l===void 0?!1:l,p=[].concat(n);return p.reduce(function(m,v){if(!v&&v!=="")return null;if(m)return m;var x=m_e(v,{end:o,strict:s,sensitive:u}),y=x.regexp,_=x.keys,w=y.exec(t);if(!w)return null;var C=w[0],E=w.slice(1),T=t===C;return o&&!T?null:{path:v,url:v==="/"&&C===""?"/":C,isExact:T,params:_.reduce(function(A,k,X){return A[k.name]=E[X],A},{})}},null)}function g_e(t){return Or.Children.count(t)===0}var v_e=function(t){Eu(e,t);function e(){return t.apply(this,arguments)||this}var r=e.prototype;return r.render=function(){var i=this;return Or.createElement(Kh.Consumer,null,function(o){o||Fg(!1);var a=i.props.location||o.location,s=i.props.computedMatch?i.props.computedMatch:i.props.path?N2(a.pathname,i.props):o.match,l=vt({},o,{location:a,match:s}),u=i.props,p=u.children,m=u.component,v=u.render;return Array.isArray(p)&&g_e(p)&&(p=null),Or.createElement(Kh.Provider,{value:l},l.match?p?typeof p=="function"?p(l):p:m?Or.createElement(m,l):v?v(l):null:typeof p=="function"?p(l):null)})},e}(Or.Component);function U6(t){return t.charAt(0)==="/"?t:"/"+t}function y_e(t,e){return t?vt({},e,{pathname:U6(t)+e.pathname}):e}function x_e(t,e){if(!t)return e;var r=U6(t);return e.pathname.indexOf(r)!==0?e:vt({},e,{pathname:e.pathname.substr(r.length)})}function mZ(t){return typeof t=="string"?t:Gf(t)}function V6(t){return function(){Fg(!1)}}function gZ(){}var __e=function(t){Eu(e,t);function e(){for(var n,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o))||this,n.handlePush=function(s){return n.navigateTo(s,"PUSH")},n.handleReplace=function(s){return n.navigateTo(s,"REPLACE")},n.handleListen=function(){return gZ},n.handleBlock=function(){return gZ},n}var r=e.prototype;return r.navigateTo=function(i,o){var a=this.props,s=a.basename,l=s===void 0?"":s,u=a.context,p=u===void 0?{}:u;p.action=o,p.location=y_e(l,of(i)),p.url=mZ(p.location)},r.render=function(){var i=this.props,o=i.basename,a=o===void 0?"":o,s=i.context,l=s===void 0?{}:s,u=i.location,p=u===void 0?"/":u,m=sf(i,["basename","context","location"]),v={createHref:function(y){return U6(a+mZ(y))},action:"POP",location:x_e(a,of(p)),push:this.handlePush,replace:this.handleReplace,go:V6(),goBack:V6(),goForward:V6(),listen:this.handleListen,block:this.handleBlock};return Or.createElement(_P,vt({},m,{history:v,staticContext:l}))},e}(Or.Component),b_e=function(t){Eu(e,t);function e(){return t.apply(this,arguments)||this}var r=e.prototype;return r.render=function(){var i=this;return Or.createElement(Kh.Consumer,null,function(o){o||Fg(!1);var a=i.props.location||o.location,s,l;return Or.Children.forEach(i.props.children,function(u){if(l==null&&Or.isValidElement(u)){s=u;var p=u.props.path||u.props.from;l=p?N2(a.pathname,vt({},u.props,{path:p})):o.match}}),l?Or.cloneElement(s,{location:a,computedMatch:l}):null})},e}(Or.Component);function w_e(t){var e="withRouter("+(t.displayName||t.name)+")",r=function(i){var o=i.wrappedComponentRef,a=sf(i,["wrappedComponentRef"]);return Or.createElement(Kh.Consumer,null,function(s){return s||Fg(!1),Or.createElement(t,vt({},a,s,{ref:o}))})};return r.displayName=e,r.WrappedComponent=t,D2(r,t)}var tL=Or.useContext;function C_e(){return tL(uZ)}function vZ(){return tL(Kh).location}function E_e(){var t=tL(Kh).match;return t?t.params:{}}function S_e(t){var e=vZ(),r=tL(Kh).match;return t?N2(e.pathname,t):r}var T_e=function(t){Eu(e,t);function e(){for(var n,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o))||this,n.history=Rxe(n.props),n}var r=e.prototype;return r.render=function(){return Or.createElement(_P,{history:this.history,children:this.props.children})},e}(Or.Component),P_e=function(t){Eu(e,t);function e(){for(var n,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=t.call.apply(t,[this].concat(o))||this,n.history=Lxe(n.props),n}var r=e.prototype;return r.render=function(){return Or.createElement(_P,{history:this.history,children:this.props.children})},e}(Or.Component),H6=function(e,r){return typeof e=="function"?e(r):e},W6=function(e,r){return typeof e=="string"?of(e,null,null,r):e},G6=function(e){return e},$2=Or.forwardRef;typeof $2=="undefined"&&($2=G6);function I_e(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}var M_e=$2(function(t,e){var r=t.innerRef,n=t.navigate,i=t.onClick,o=sf(t,["innerRef","navigate","onClick"]),a=o.target,s=vt({},o,{onClick:function(u){try{i&&i(u)}catch(p){throw u.preventDefault(),p}!u.defaultPrevented&&u.button===0&&(!a||a==="_self")&&!I_e(u)&&(u.preventDefault(),n())}});return G6!==$2?s.ref=e||r:s.ref=r,Or.createElement("a",s)}),yZ=$2(function(t,e){var r=t.component,n=r===void 0?M_e:r,i=t.replace,o=t.to,a=t.innerRef,s=sf(t,["component","replace","to","innerRef"]);return Or.createElement(Kh.Consumer,null,function(l){l||Fg(!1);var u=l.history,p=W6(H6(o,l.location),l.location),m=p?u.createHref(p):"",v=vt({},s,{href:m,navigate:function(){var y=H6(o,l.location),_=Gf(l.location)===Gf(W6(y)),w=i||_?u.replace:u.push;w(y)}});return G6!==$2?v.ref=e||a:v.innerRef=a,Or.createElement(n,v)})}),xZ=function(e){return e},rL=Or.forwardRef;typeof rL=="undefined"&&(rL=xZ);function A_e(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return e.filter(function(n){return n}).join(" ")}var R_e=rL(function(t,e){var r=t["aria-current"],n=r===void 0?"page":r,i=t.activeClassName,o=i===void 0?"active":i,a=t.activeStyle,s=t.className,l=t.exact,u=t.isActive,p=t.location,m=t.sensitive,v=t.strict,x=t.style,y=t.to,_=t.innerRef,w=sf(t,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return Or.createElement(Kh.Consumer,null,function(C){C||Fg(!1);var E=p||C.location,T=W6(H6(y,E),E),A=T.pathname,k=A&&A.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),X=k?N2(E.pathname,{path:k,exact:l,sensitive:m,strict:v}):null,Z=!!(u?u(X,E):X),W=typeof s=="function"?s(Z):s,D=typeof x=="function"?x(Z):x;Z&&(W=A_e(W,o),D=vt({},D,a));var H=vt({"aria-current":Z&&n||null,className:W,style:D,to:T},w);return xZ!==rL?H.ref=e||_:H.innerRef=_,Or.createElement(yZ,H)})}),k_e=Object.freeze(Object.defineProperty({__proto__:null,BrowserRouter:T_e,HashRouter:P_e,Link:yZ,NavLink:R_e,MemoryRouter:c_e,Prompt:u_e,Redirect:h_e,Route:v_e,Router:_P,StaticRouter:__e,Switch:b_e,generatePath:j6,matchPath:N2,useHistory:C_e,useLocation:vZ,useParams:E_e,useRouteMatch:S_e,withRouter:w_e},Symbol.toStringTag,{value:"Module"})),O_e={black:"#000",white:"#fff"},nL=O_e,L_e={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},q6=L_e,D_e={50:"#fce4ec",100:"#f8bbd0",200:"#f48fb1",300:"#f06292",400:"#ec407a",500:"#e91e63",600:"#d81b60",700:"#c2185b",800:"#ad1457",900:"#880e4f",A100:"#ff80ab",A200:"#ff4081",A400:"#f50057",A700:"#c51162"},X6=D_e,N_e={50:"#e8eaf6",100:"#c5cae9",200:"#9fa8da",300:"#7986cb",400:"#5c6bc0",500:"#3f51b5",600:"#3949ab",700:"#303f9f",800:"#283593",900:"#1a237e",A100:"#8c9eff",A200:"#536dfe",A400:"#3d5afe",A700:"#304ffe"},Y6=N_e,$_e={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},K6=$_e,F_e={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},Z6=F_e,z_e={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},Q6=z_e,B_e={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#d5d5d5",A200:"#aaaaaa",A400:"#303030",A700:"#616161"},J6=B_e;function A1(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?A1=function(r){return typeof r}:A1=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},A1(t)}function e8(t){return t&&A1(t)==="object"&&t.constructor===Object}function ax(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{clone:!0},n=r.clone?vt({},t):t;return e8(t)&&e8(e)&&Object.keys(e).forEach(function(i){i!=="__proto__"&&(e8(e[i])&&i in t?n[i]=ax(t[i],e[i],r):n[i]=e[i])}),n}function Fi(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function F2(t){for(var e="https://material-ui.com/production-error/?code="+t,r=1;r<arguments.length;r+=1)e+="&args[]="+encodeURIComponent(arguments[r]);return"Minified Material-UI error #"+t+"; visit "+e+" for the full message."}var Js={};/** @license React v17.0.2 * react-is.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var iL=60103,oL=60106,bP=60107,wP=60108,CP=60114,EP=60109,SP=60110,TP=60112,PP=60113,t8=60120,IP=60115,MP=60116,_Z=60121,bZ=60122,wZ=60117,CZ=60129,EZ=60131;if(typeof Symbol=="function"&&Symbol.for){var Bc=Symbol.for;iL=Bc("react.element"),oL=Bc("react.portal"),bP=Bc("react.fragment"),wP=Bc("react.strict_mode"),CP=Bc("react.profiler"),EP=Bc("react.provider"),SP=Bc("react.context"),TP=Bc("react.forward_ref"),PP=Bc("react.suspense"),t8=Bc("react.suspense_list"),IP=Bc("react.memo"),MP=Bc("react.lazy"),_Z=Bc("react.block"),bZ=Bc("react.server.block"),wZ=Bc("react.fundamental"),CZ=Bc("react.debug_trace_mode"),EZ=Bc("react.legacy_hidden")}function wm(t){if(typeof t=="object"&&t!==null){var e=t.$$typeof;switch(e){case iL:switch(t=t.type,t){case bP:case CP:case wP:case PP:case t8:return t;default:switch(t=t&&t.$$typeof,t){case SP:case TP:case MP:case IP:case EP:return t;default:return e}}case oL:return e}}}var j_e=EP,U_e=iL,V_e=TP,H_e=bP,W_e=MP,G_e=IP,q_e=oL,X_e=CP,Y_e=wP,K_e=PP;Js.ContextConsumer=SP;Js.ContextProvider=j_e;Js.Element=U_e;Js.ForwardRef=V_e;Js.Fragment=H_e;Js.Lazy=W_e;Js.Memo=G_e;Js.Portal=q_e;Js.Profiler=X_e;Js.StrictMode=Y_e;Js.Suspense=K_e;Js.isAsyncMode=function(){return!1};Js.isConcurrentMode=function(){return!1};Js.isContextConsumer=function(t){return wm(t)===SP};Js.isContextProvider=function(t){return wm(t)===EP};Js.isElement=function(t){return typeof t=="object"&&t!==null&&t.$$typeof===iL};Js.isForwardRef=function(t){return wm(t)===TP};Js.isFragment=function(t){return wm(t)===bP};Js.isLazy=function(t){return wm(t)===MP};Js.isMemo=function(t){return wm(t)===IP};Js.isPortal=function(t){return wm(t)===oL};Js.isProfiler=function(t){return wm(t)===CP};Js.isStrictMode=function(t){return wm(t)===wP};Js.isSuspense=function(t){return wm(t)===PP};Js.isValidElementType=function(t){return typeof t=="string"||typeof t=="function"||t===bP||t===CP||t===CZ||t===wP||t===PP||t===t8||t===EZ||typeof t=="object"&&t!==null&&(t.$$typeof===MP||t.$$typeof===IP||t.$$typeof===EP||t.$$typeof===SP||t.$$typeof===TP||t.$$typeof===wZ||t.$$typeof===_Z||t[0]===bZ)};Js.typeOf=wm;function r8(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1;return Math.min(Math.max(e,t),r)}function Z_e(t){t=t.substr(1);var e=new RegExp(".{1,".concat(t.length>=6?2:1,"}"),"g"),r=t.match(e);return r&&r[0].length===1&&(r=r.map(function(n){return n+n})),r?"rgb".concat(r.length===4?"a":"","(").concat(r.map(function(n,i){return i<3?parseInt(n,16):Math.round(parseInt(n,16)/255*1e3)/1e3}).join(", "),")"):""}function Q_e(t){t=R1(t);var e=t,r=e.values,n=r[0],i=r[1]/100,o=r[2]/100,a=i*Math.min(o,1-o),s=function(m){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:(m+n/30)%12;return o-a*Math.max(Math.min(v-3,9-v,1),-1)},l="rgb",u=[Math.round(s(0)*255),Math.round(s(8)*255),Math.round(s(4)*255)];return t.type==="hsla"&&(l+="a",u.push(r[3])),sL({type:l,values:u})}function R1(t){if(t.type)return t;if(t.charAt(0)==="#")return R1(Z_e(t));var e=t.indexOf("("),r=t.substring(0,e);if(["rgb","rgba","hsl","hsla"].indexOf(r)===-1)throw new Error(F2(3,t));var n=t.substring(e+1,t.length-1).split(",");return n=n.map(function(i){return parseFloat(i)}),{type:r,values:n}}function sL(t){var e=t.type,r=t.values;return e.indexOf("rgb")!==-1?r=r.map(function(n,i){return i<3?parseInt(n,10):n}):e.indexOf("hsl")!==-1&&(r[1]="".concat(r[1],"%"),r[2]="".concat(r[2],"%")),"".concat(e,"(").concat(r.join(", "),")")}function J_e(t,e){var r=n8(t),n=n8(e);return(Math.max(r,n)+.05)/(Math.min(r,n)+.05)}function n8(t){t=R1(t);var e=t.type==="hsl"?R1(Q_e(t)).values:t.values;return e=e.map(function(r){return r/=255,r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4)}),Number((.2126*e[0]+.7152*e[1]+.0722*e[2]).toFixed(3))}function lx(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:.15;return n8(t)>.5?z2(t,e):B2(t,e)}function wo(t,e){return t=R1(t),e=r8(e),(t.type==="rgb"||t.type==="hsl")&&(t.type+="a"),t.values[3]=e,sL(t)}function z2(t,e){if(t=R1(t),e=r8(e),t.type.indexOf("hsl")!==-1)t.values[2]*=1-e;else if(t.type.indexOf("rgb")!==-1)for(var r=0;r<3;r+=1)t.values[r]*=1-e;return sL(t)}function B2(t,e){if(t=R1(t),e=r8(e),t.type.indexOf("hsl")!==-1)t.values[2]+=(100-t.values[2])*e;else if(t.type.indexOf("rgb")!==-1)for(var r=0;r<3;r+=1)t.values[r]+=(255-t.values[r])*e;return sL(t)}function nn(t,e){if(t==null)return{};var r=sf(t,e),n,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)n=o[i],!(e.indexOf(n)>=0)&&(!Object.prototype.propertyIsEnumerable.call(t,n)||(r[n]=t[n]))}return r}var cx=["xs","sm","md","lg","xl"];function e1e(t){var e=t.values,r=e===void 0?{xs:0,sm:600,md:960,lg:1280,xl:1920}:e,n=t.unit,i=n===void 0?"px":n,o=t.step,a=o===void 0?5:o,s=nn(t,["values","unit","step"]);function l(x){var y=typeof r[x]=="number"?r[x]:x;return"@media (min-width:".concat(y).concat(i,")")}function u(x){var y=cx.indexOf(x)+1,_=r[cx[y]];if(y===cx.length)return l("xs");var w=typeof _=="number"&&y>0?_:x;return"@media (max-width:".concat(w-a/100).concat(i,")")}function p(x,y){var _=cx.indexOf(y);return _===cx.length-1?l(x):"@media (min-width:".concat(typeof r[x]=="number"?r[x]:x).concat(i,") and ")+"(max-width:".concat((_!==-1&&typeof r[cx[_+1]]=="number"?r[cx[_+1]]:y)-a/100).concat(i,")")}function m(x){return p(x,x)}function v(x){return r[x]}return vt({keys:cx,values:r,up:l,down:u,between:p,only:m,width:v},s)}function t1e(t,e,r){var n;return vt({gutters:function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return console.warn(["Material-UI: theme.mixins.gutters() is deprecated.","You can use the source of the mixin directly:",` paddingLeft: theme.spacing(2), paddingRight: theme.spacing(2), [theme.breakpoints.up('sm')]: { paddingLeft: theme.spacing(3), paddingRight: theme.spacing(3), }, `].join(` `)),vt({paddingLeft:e(2),paddingRight:e(2)},o,Fi({},t.up("sm"),vt({paddingLeft:e(3),paddingRight:e(3)},o[t.up("sm")])))},toolbar:(n={minHeight:56},Fi(n,"".concat(t.up("xs")," and (orientation: landscape)"),{minHeight:48}),Fi(n,t.up("sm"),{minHeight:64}),n)},r)}var SZ={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.54)",disabled:"rgba(0, 0, 0, 0.38)",hint:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:nL.white,default:J6[50]},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},i8={text:{primary:nL.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",hint:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:J6[800],default:"#303030"},action:{active:nL.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function TZ(t,e,r,n){var i=n.light||n,o=n.dark||n*1.5;t[e]||(t.hasOwnProperty(r)?t[e]=t[r]:e==="light"?t.light=B2(t.main,i):e==="dark"&&(t.dark=z2(t.main,o)))}function r1e(t){var e=t.primary,r=e===void 0?{light:Y6[300],main:Y6[500],dark:Y6[700]}:e,n=t.secondary,i=n===void 0?{light:X6.A200,main:X6.A400,dark:X6.A700}:n,o=t.error,a=o===void 0?{light:q6[300],main:q6[500],dark:q6[700]}:o,s=t.warning,l=s===void 0?{light:Q6[300],main:Q6[500],dark:Q6[700]}:s,u=t.info,p=u===void 0?{light:K6[300],main:K6[500],dark:K6[700]}:u,m=t.success,v=m===void 0?{light:Z6[300],main:Z6[500],dark:Z6[700]}:m,x=t.type,y=x===void 0?"light":x,_=t.contrastThreshold,w=_===void 0?3:_,C=t.tonalOffset,E=C===void 0?.2:C,T=nn(t,["primary","secondary","error","warning","info","success","type","contrastThreshold","tonalOffset"]);function A(W){var D=J_e(W,i8.text.primary)>=w?i8.text.primary:SZ.text.primary;return D}var k=function(D){var H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:500,N=arguments.length>2&&arguments[2]!==void 0?arguments[2]:300,j=arguments.length>3&&arguments[3]!==void 0?arguments[3]:700;if(D=vt({},D),!D.main&&D[H]&&(D.main=D[H]),!D.main)throw new Error(F2(4,H));if(typeof D.main!="string")throw new Error(F2(5,JSON.stringify(D.main)));return TZ(D,"light",N,E),TZ(D,"dark",j,E),D.contrastText||(D.contrastText=A(D.main)),D},X={dark:i8,light:SZ},Z=ax(vt({common:nL,type:y,primary:k(r),secondary:k(i,"A400","A200","A700"),error:k(a),warning:k(l),info:k(p),success:k(v),grey:J6,contrastThreshold:w,getContrastText:A,augmentColor:k,tonalOffset:E},X[y]),T);return Z}function PZ(t){return Math.round(t*1e5)/1e5}function n1e(t){return PZ(t)}var IZ={textTransform:"uppercase"},MZ='"Roboto", "Helvetica", "Arial", sans-serif';function i1e(t,e){var r=typeof e=="function"?e(t):e,n=r.fontFamily,i=n===void 0?MZ:n,o=r.fontSize,a=o===void 0?14:o,s=r.fontWeightLight,l=s===void 0?300:s,u=r.fontWeightRegular,p=u===void 0?400:u,m=r.fontWeightMedium,v=m===void 0?500:m,x=r.fontWeightBold,y=x===void 0?700:x,_=r.htmlFontSize,w=_===void 0?16:_,C=r.allVariants,E=r.pxToRem,T=nn(r,["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"]),A=a/14,k=E||function(W){return"".concat(W/w*A,"rem")},X=function(D,H,N,j,$){return vt({fontFamily:i,fontWeight:D,fontSize:k(H),lineHeight:N},i===MZ?{letterSpacing:"".concat(PZ(j/H),"em")}:{},$,C)},Z={h1:X(l,96,1.167,-1.5),h2:X(l,60,1.2,-.5),h3:X(p,48,1.167,0),h4:X(p,34,1.235,.25),h5:X(p,24,1.334,0),h6:X(v,20,1.6,.15),subtitle1:X(p,16,1.75,.15),subtitle2:X(v,14,1.57,.1),body1:X(p,16,1.5,.15),body2:X(p,14,1.43,.15),button:X(v,14,1.75,.4,IZ),caption:X(p,12,1.66,.4),overline:X(p,12,2.66,1,IZ)};return ax(vt({htmlFontSize:w,pxToRem:k,round:n1e,fontFamily:i,fontSize:a,fontWeightLight:l,fontWeightRegular:p,fontWeightMedium:v,fontWeightBold:y},Z),T,{clone:!1})}var o1e=.2,s1e=.14,a1e=.12;function Ta(){return["".concat(arguments.length<=0?void 0:arguments[0],"px ").concat(arguments.length<=1?void 0:arguments[1],"px ").concat(arguments.length<=2?void 0:arguments[2],"px ").concat(arguments.length<=3?void 0:arguments[3],"px rgba(0,0,0,").concat(o1e,")"),"".concat(arguments.length<=4?void 0:arguments[4],"px ").concat(arguments.length<=5?void 0:arguments[5],"px ").concat(arguments.length<=6?void 0:arguments[6],"px ").concat(arguments.length<=7?void 0:arguments[7],"px rgba(0,0,0,").concat(s1e,")"),"".concat(arguments.length<=8?void 0:arguments[8],"px ").concat(arguments.length<=9?void 0:arguments[9],"px ").concat(arguments.length<=10?void 0:arguments[10],"px ").concat(arguments.length<=11?void 0:arguments[11],"px rgba(0,0,0,").concat(a1e,")")].join(",")}var l1e=["none",Ta(0,2,1,-1,0,1,1,0,0,1,3,0),Ta(0,3,1,-2,0,2,2,0,0,1,5,0),Ta(0,3,3,-2,0,3,4,0,0,1,8,0),Ta(0,2,4,-1,0,4,5,0,0,1,10,0),Ta(0,3,5,-1,0,5,8,0,0,1,14,0),Ta(0,3,5,-1,0,6,10,0,0,1,18,0),Ta(0,4,5,-2,0,7,10,1,0,2,16,1),Ta(0,5,5,-3,0,8,10,1,0,3,14,2),Ta(0,5,6,-3,0,9,12,1,0,3,16,2),Ta(0,6,6,-3,0,10,14,1,0,4,18,3),Ta(0,6,7,-4,0,11,15,1,0,4,20,3),Ta(0,7,8,-4,0,12,17,2,0,5,22,4),Ta(0,7,8,-4,0,13,19,2,0,5,24,4),Ta(0,7,9,-4,0,14,21,2,0,5,26,4),Ta(0,8,9,-5,0,15,22,2,0,6,28,5),Ta(0,8,10,-5,0,16,24,2,0,6,30,5),Ta(0,8,11,-5,0,17,26,2,0,6,32,5),Ta(0,9,11,-5,0,18,28,2,0,7,34,6),Ta(0,9,12,-6,0,19,29,2,0,7,36,6),Ta(0,10,13,-6,0,20,31,3,0,8,38,7),Ta(0,10,13,-6,0,21,33,3,0,8,40,7),Ta(0,10,14,-6,0,22,35,3,0,8,42,7),Ta(0,11,14,-7,0,23,36,3,0,9,44,8),Ta(0,11,15,-7,0,24,38,3,0,9,46,8)],c1e=l1e,u1e={borderRadius:4},f1e=u1e;function o8(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function d1e(t){if(Array.isArray(t))return o8(t)}function AZ(t){if(typeof Symbol!="undefined"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function s8(t,e){if(!!t){if(typeof t=="string")return o8(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return o8(t,e)}}function h1e(){throw new TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function uy(t){return d1e(t)||AZ(t)||s8(t)||h1e()}function aL(t,e){return e?ax(t,e,{clone:!1}):t}var p1e={xs:0,sm:600,md:960,lg:1280,xl:1920},RZ={keys:["xs","sm","md","lg","xl"],up:function(e){return"@media (min-width:".concat(p1e[e],"px)")}};function kZ(t,e,r){if(Array.isArray(e)){var n=t.theme.breakpoints||RZ;return e.reduce(function(a,s,l){return a[n.up(n.keys[l])]=r(e[l]),a},{})}if(A1(e)==="object"){var i=t.theme.breakpoints||RZ;return Object.keys(e).reduce(function(a,s){return a[i.up(s)]=r(e[s]),a},{})}var o=r(e);return o}function OZ(t,e){return!e||typeof e!="string"?null:e.split(".").reduce(function(r,n){return r&&r[n]?r[n]:null},t)}function Yn(t){var e=t.prop,r=t.cssProperty,n=r===void 0?t.prop:r,i=t.themeKey,o=t.transform,a=function(l){if(l[e]==null)return null;var u=l[e],p=l.theme,m=OZ(p,i)||{},v=function(y){var _;return typeof m=="function"?_=m(y):Array.isArray(m)?_=m[y]||y:(_=OZ(m,y)||y,o&&(_=o(_))),n===!1?_:Fi({},n,_)};return kZ(l,u,v)};return a.propTypes={},a.filterProps=[e],a}function fy(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var n=function(o){return e.reduce(function(a,s){var l=s(o);return l?aL(a,l):a},{})};return n.propTypes={},n.filterProps=e.reduce(function(i,o){return i.concat(o.filterProps)},[]),n}function AP(t){return typeof t!="number"?t:"".concat(t,"px solid")}var m1e=Yn({prop:"border",themeKey:"borders",transform:AP}),g1e=Yn({prop:"borderTop",themeKey:"borders",transform:AP}),v1e=Yn({prop:"borderRight",themeKey:"borders",transform:AP}),y1e=Yn({prop:"borderBottom",themeKey:"borders",transform:AP}),x1e=Yn({prop:"borderLeft",themeKey:"borders",transform:AP}),_1e=Yn({prop:"borderColor",themeKey:"palette"}),b1e=Yn({prop:"borderRadius",themeKey:"shape"}),w1e=fy(m1e,g1e,v1e,y1e,x1e,_1e,b1e),C1e=w1e;function LZ(t,e){var r={};return Object.keys(t).forEach(function(n){e.indexOf(n)===-1&&(r[n]=t[n])}),r}function E1e(t){var e=function(n){var i=t(n);return n.css?vt({},aL(i,t(vt({theme:n.theme},n.css))),LZ(n.css,[t.filterProps])):n.sx?vt({},aL(i,t(vt({theme:n.theme},n.sx))),LZ(n.sx,[t.filterProps])):i};return e.propTypes={},e.filterProps=["css","sx"].concat(uy(t.filterProps)),e}var S1e=Yn({prop:"displayPrint",cssProperty:!1,transform:function(e){return{"@media print":{display:e}}}}),T1e=Yn({prop:"display"}),P1e=Yn({prop:"overflow"}),I1e=Yn({prop:"textOverflow"}),M1e=Yn({prop:"visibility"}),A1e=Yn({prop:"whiteSpace"}),R1e=fy(S1e,T1e,P1e,I1e,M1e,A1e),k1e=Yn({prop:"flexBasis"}),O1e=Yn({prop:"flexDirection"}),L1e=Yn({prop:"flexWrap"}),D1e=Yn({prop:"justifyContent"}),N1e=Yn({prop:"alignItems"}),$1e=Yn({prop:"alignContent"}),F1e=Yn({prop:"order"}),z1e=Yn({prop:"flex"}),B1e=Yn({prop:"flexGrow"}),j1e=Yn({prop:"flexShrink"}),U1e=Yn({prop:"alignSelf"}),V1e=Yn({prop:"justifyItems"}),H1e=Yn({prop:"justifySelf"}),W1e=fy(k1e,O1e,L1e,D1e,N1e,$1e,F1e,z1e,B1e,j1e,U1e,V1e,H1e),G1e=W1e,q1e=Yn({prop:"gridGap"}),X1e=Yn({prop:"gridColumnGap"}),Y1e=Yn({prop:"gridRowGap"}),K1e=Yn({prop:"gridColumn"}),Z1e=Yn({prop:"gridRow"}),Q1e=Yn({prop:"gridAutoFlow"}),J1e=Yn({prop:"gridAutoColumns"}),ebe=Yn({prop:"gridAutoRows"}),tbe=Yn({prop:"gridTemplateColumns"}),rbe=Yn({prop:"gridTemplateRows"}),nbe=Yn({prop:"gridTemplateAreas"}),ibe=Yn({prop:"gridArea"}),obe=fy(q1e,X1e,Y1e,K1e,Z1e,Q1e,J1e,ebe,tbe,rbe,nbe,ibe),sbe=obe,abe=Yn({prop:"color",themeKey:"palette"}),lbe=Yn({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette"}),cbe=fy(abe,lbe),ube=cbe,fbe=Yn({prop:"position"}),dbe=Yn({prop:"zIndex",themeKey:"zIndex"}),hbe=Yn({prop:"top"}),pbe=Yn({prop:"right"}),mbe=Yn({prop:"bottom"}),gbe=Yn({prop:"left"}),vbe=fy(fbe,dbe,hbe,pbe,mbe,gbe),ybe=Yn({prop:"boxShadow",themeKey:"shadows"}),xbe=ybe;function ux(t){return t<=1?"".concat(t*100,"%"):t}var _be=Yn({prop:"width",transform:ux}),bbe=Yn({prop:"maxWidth",transform:ux}),wbe=Yn({prop:"minWidth",transform:ux}),Cbe=Yn({prop:"height",transform:ux}),Ebe=Yn({prop:"maxHeight",transform:ux}),Sbe=Yn({prop:"minHeight",transform:ux});Yn({prop:"size",cssProperty:"width",transform:ux});Yn({prop:"size",cssProperty:"height",transform:ux});var Tbe=Yn({prop:"boxSizing"}),Pbe=fy(_be,bbe,wbe,Cbe,Ebe,Sbe,Tbe),Ibe=Pbe;function DZ(t){if(Array.isArray(t))return t}function Mbe(t,e){var r=t==null?null:typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n=[],i=!0,o=!1,a,s;try{for(r=r.call(t);!(i=(a=r.next()).done)&&(n.push(a.value),!(e&&n.length===e));i=!0);}catch(l){o=!0,s=l}finally{try{!i&&r.return!=null&&r.return()}finally{if(o)throw s}}return n}}function NZ(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qf(t,e){return DZ(t)||Mbe(t,e)||s8(t,e)||NZ()}function Abe(t){var e={};return function(r){return e[r]===void 0&&(e[r]=t(r)),e[r]}}var Rbe={m:"margin",p:"padding"},kbe={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},$Z={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},Obe=Abe(function(t){if(t.length>2)if($Z[t])t=$Z[t];else return[t];var e=t.split(""),r=qf(e,2),n=r[0],i=r[1],o=Rbe[n],a=kbe[i]||"";return Array.isArray(a)?a.map(function(s){return o+s}):[o+a]}),FZ=["m","mt","mr","mb","ml","mx","my","p","pt","pr","pb","pl","px","py","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY"];function zZ(t){var e=t.spacing||8;return typeof e=="number"?function(r){return e*r}:Array.isArray(e)?function(r){return e[r]}:typeof e=="function"?e:function(){}}function Lbe(t,e){if(typeof e=="string"||e==null)return e;var r=Math.abs(e),n=t(r);return e>=0?n:typeof n=="number"?-n:"-".concat(n)}function Dbe(t,e){return function(r){return t.reduce(function(n,i){return n[i]=Lbe(e,r),n},{})}}function a8(t){var e=t.theme,r=zZ(e);return Object.keys(t).map(function(n){if(FZ.indexOf(n)===-1)return null;var i=Obe(n),o=Dbe(i,r),a=t[n];return kZ(t,a,o)}).reduce(aL,{})}a8.propTypes={};a8.filterProps=FZ;var Nbe=Yn({prop:"fontFamily",themeKey:"typography"}),$be=Yn({prop:"fontSize",themeKey:"typography"}),Fbe=Yn({prop:"fontStyle",themeKey:"typography"}),zbe=Yn({prop:"fontWeight",themeKey:"typography"}),Bbe=Yn({prop:"letterSpacing"}),jbe=Yn({prop:"lineHeight"}),Ube=Yn({prop:"textAlign"}),Vbe=fy(Nbe,$be,Fbe,zbe,Bbe,jbe,Ube),Hbe=Vbe;function Wbe(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:8;if(t.mui)return t;var e=zZ({spacing:t}),r=function(){for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return o.length===0?e(1):o.length===1?e(o[0]):o.map(function(s){if(typeof s=="string")return s;var l=e(s);return typeof l=="number"?"".concat(l,"px"):l}).join(" ")};return Object.defineProperty(r,"unit",{get:function(){return t}}),r.mui=!0,r}var BZ={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},af={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function jZ(t){return"".concat(Math.round(t),"ms")}var Gbe={easing:BZ,duration:af,create:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:["all"],r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=r.duration,i=n===void 0?af.standard:n,o=r.easing,a=o===void 0?BZ.easeInOut:o,s=r.delay,l=s===void 0?0:s;return nn(r,["duration","easing","delay"]),(Array.isArray(e)?e:[e]).map(function(u){return"".concat(u," ").concat(typeof i=="string"?i:jZ(i)," ").concat(a," ").concat(typeof l=="string"?l:jZ(l))}).join(",")},getAutoHeightDuration:function(e){if(!e)return 0;var r=e/36;return Math.round((4+15*Math.pow(r,.25)+r/5)*10)}},qbe={mobileStepper:1e3,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},UZ=qbe;function Xbe(){for(var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=t.breakpoints,r=e===void 0?{}:e,n=t.mixins,i=n===void 0?{}:n,o=t.palette,a=o===void 0?{}:o,s=t.spacing,l=t.typography,u=l===void 0?{}:l,p=nn(t,["breakpoints","mixins","palette","spacing","typography"]),m=r1e(a),v=e1e(r),x=Wbe(s),y=ax({breakpoints:v,direction:"ltr",mixins:t1e(v,x,i),overrides:{},palette:m,props:{},shadows:c1e,typography:i1e(m,u),spacing:x,shape:f1e,transitions:Gbe,zIndex:UZ},p),_=arguments.length,w=new Array(_>1?_-1:0),C=1;C<_;C++)w[C-1]=arguments[C];return y=w.reduce(function(E,T){return ax(E,T)},y),y}var Ybe=typeof Symbol=="function"&&Symbol.for,VZ=Ybe?Symbol.for("mui.nested"):"__THEME_NESTED__",Kbe=["checked","disabled","error","focused","focusVisible","required","expanded","selected"];function Zbe(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=t.disableGlobal,r=e===void 0?!1:e,n=t.productionPrefix,i=n===void 0?"jss":n,o=t.seed,a=o===void 0?"":o,s=a===""?"":"".concat(a,"-"),l=0,u=function(){return l+=1,l};return function(p,m){var v=m.options.name;if(v&&v.indexOf("Mui")===0&&!m.options.link&&!r){if(Kbe.indexOf(p.key)!==-1)return"Mui-".concat(p.key);var x="".concat(s).concat(v,"-").concat(p.key);return!m.options.theme[VZ]||a!==""?x:"".concat(x,"-").concat(u())}return"".concat(s).concat(i).concat(u())}}function HZ(t){var e=t.theme,r=t.name,n=t.props;if(!e||!e.props||!e.props[r])return n;var i=e.props[r],o;for(o in i)n[o]===void 0&&(n[o]=i[o]);return n}var WZ=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},RP=(typeof window=="undefined"?"undefined":WZ(window))==="object"&&(typeof document=="undefined"?"undefined":WZ(document))==="object"&&document.nodeType===9;function GZ(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function l8(t,e,r){return e&&GZ(t.prototype,e),r&&GZ(t,r),t}function lL(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var Qbe={}.constructor;function c8(t){if(t==null||typeof t!="object")return t;if(Array.isArray(t))return t.map(c8);if(t.constructor!==Qbe)return t;var e={};for(var r in t)e[r]=c8(t[r]);return e}function u8(t,e,r){t===void 0&&(t="unnamed");var n=r.jss,i=c8(e),o=n.plugins.onCreateRule(t,i,r);return o||(t[0]==="@",null)}var qZ=function(e,r){for(var n="",i=0;i<e.length&&e[i]!=="!important";i++)n&&(n+=r),n+=e[i];return n},k1=function(e,r){if(r===void 0&&(r=!1),!Array.isArray(e))return e;var n="";if(Array.isArray(e[0]))for(var i=0;i<e.length&&e[i]!=="!important";i++)n&&(n+=", "),n+=qZ(e[i]," ");else n=qZ(e,", ");return!r&&e[e.length-1]==="!important"&&(n+=" !important"),n};function j2(t){return t&&t.format===!1?{linebreak:"",space:""}:{linebreak:` `,space:" "}}function kP(t,e){for(var r="",n=0;n<e;n++)r+=" ";return r+t}function OP(t,e,r){r===void 0&&(r={});var n="";if(!e)return n;var i=r,o=i.indent,a=o===void 0?0:o,s=e.fallbacks;r.format===!1&&(a=-1/0);var l=j2(r),u=l.linebreak,p=l.space;if(t&&a++,s)if(Array.isArray(s))for(var m=0;m<s.length;m++){var v=s[m];for(var x in v){var y=v[x];y!=null&&(n&&(n+=u),n+=kP(x+":"+p+k1(y)+";",a))}}else for(var _ in s){var w=s[_];w!=null&&(n&&(n+=u),n+=kP(_+":"+p+k1(w)+";",a))}for(var C in e){var E=e[C];E!=null&&C!=="fallbacks"&&(n&&(n+=u),n+=kP(C+":"+p+k1(E)+";",a))}return!n&&!r.allowEmpty||!t?n:(a--,n&&(n=""+u+n+u),kP(""+t+p+"{"+n,a)+kP("}",a))}var Jbe=/([[\].#*$><+~=|^:(),"'`\s])/g,XZ=typeof CSS!="undefined"&&CSS.escape,f8=function(t){return XZ?XZ(t):t.replace(Jbe,"\\$1")},YZ=function(){function t(r,n,i){this.type="style",this.isProcessed=!1;var o=i.sheet,a=i.Renderer;this.key=r,this.options=i,this.style=n,o?this.renderer=o.renderer:a&&(this.renderer=new a)}var e=t.prototype;return e.prop=function(n,i,o){if(i===void 0)return this.style[n];var a=o?o.force:!1;if(!a&&this.style[n]===i)return this;var s=i;(!o||o.process!==!1)&&(s=this.options.jss.plugins.onChangeValue(i,n,this));var l=s==null||s===!1,u=n in this.style;if(l&&!u&&!a)return this;var p=l&&u;if(p?delete this.style[n]:this.style[n]=s,this.renderable&&this.renderer)return p?this.renderer.removeProperty(this.renderable,n):this.renderer.setProperty(this.renderable,n,s),this;var m=this.options.sheet;return m&&m.attached,this},t}(),d8=function(t){Eu(e,t);function e(n,i,o){var a;a=t.call(this,n,i,o)||this;var s=o.selector,l=o.scoped,u=o.sheet,p=o.generateId;return s?a.selectorText=s:l!==!1&&(a.id=p(lL(lL(a)),u),a.selectorText="."+f8(a.id)),a}var r=e.prototype;return r.applyTo=function(i){var o=this.renderer;if(o){var a=this.toJSON();for(var s in a)o.setProperty(i,s,a[s])}return this},r.toJSON=function(){var i={};for(var o in this.style){var a=this.style[o];typeof a!="object"?i[o]=a:Array.isArray(a)&&(i[o]=k1(a))}return i},r.toString=function(i){var o=this.options.sheet,a=o?o.options.link:!1,s=a?vt({},i,{allowEmpty:!0}):i;return OP(this.selectorText,this.style,s)},l8(e,[{key:"selector",set:function(i){if(i!==this.selectorText){this.selectorText=i;var o=this.renderer,a=this.renderable;if(!(!a||!o)){var s=o.setSelector(a,i);s||o.replaceRule(a,this)}}},get:function(){return this.selectorText}}]),e}(YZ),ewe={onCreateRule:function(e,r,n){return e[0]==="@"||n.parent&&n.parent.type==="keyframes"?null:new d8(e,r,n)}},h8={indent:1,children:!0},twe=/@([\w-]+)/,rwe=function(){function t(r,n,i){this.type="conditional",this.isProcessed=!1,this.key=r;var o=r.match(twe);this.at=o?o[1]:"unknown",this.query=i.name||"@"+this.at,this.options=i,this.rules=new cL(vt({},i,{parent:this}));for(var a in n)this.rules.add(a,n[a]);this.rules.process()}var e=t.prototype;return e.getRule=function(n){return this.rules.get(n)},e.indexOf=function(n){return this.rules.indexOf(n)},e.addRule=function(n,i,o){var a=this.rules.add(n,i,o);return a?(this.options.jss.plugins.onProcessRule(a),a):null},e.toString=function(n){n===void 0&&(n=h8);var i=j2(n),o=i.linebreak;if(n.indent==null&&(n.indent=h8.indent),n.children==null&&(n.children=h8.children),n.children===!1)return this.query+" {}";var a=this.rules.toString(n);return a?this.query+" {"+o+a+o+"}":""},t}(),nwe=/@media|@supports\s+/,iwe={onCreateRule:function(e,r,n){return nwe.test(e)?new rwe(e,r,n):null}},p8={indent:1,children:!0},owe=/@keyframes\s+([\w-]+)/,m8=function(){function t(r,n,i){this.type="keyframes",this.at="@keyframes",this.isProcessed=!1;var o=r.match(owe);o&&o[1]?this.name=o[1]:this.name="noname",this.key=this.type+"-"+this.name,this.options=i;var a=i.scoped,s=i.sheet,l=i.generateId;this.id=a===!1?this.name:f8(l(this,s)),this.rules=new cL(vt({},i,{parent:this}));for(var u in n)this.rules.add(u,n[u],vt({},i,{parent:this}));this.rules.process()}var e=t.prototype;return e.toString=function(n){n===void 0&&(n=p8);var i=j2(n),o=i.linebreak;if(n.indent==null&&(n.indent=p8.indent),n.children==null&&(n.children=p8.children),n.children===!1)return this.at+" "+this.id+" {}";var a=this.rules.toString(n);return a&&(a=""+o+a+o),this.at+" "+this.id+" {"+a+"}"},t}(),swe=/@keyframes\s+/,awe=/\$([\w-]+)/g,g8=function(e,r){return typeof e=="string"?e.replace(awe,function(n,i){return i in r?r[i]:n}):e},KZ=function(e,r,n){var i=e[r],o=g8(i,n);o!==i&&(e[r]=o)},lwe={onCreateRule:function(e,r,n){return typeof e=="string"&&swe.test(e)?new m8(e,r,n):null},onProcessStyle:function(e,r,n){return r.type!=="style"||!n||("animation-name"in e&&KZ(e,"animation-name",n.keyframes),"animation"in e&&KZ(e,"animation",n.keyframes)),e},onChangeValue:function(e,r,n){var i=n.options.sheet;if(!i)return e;switch(r){case"animation":return g8(e,i.keyframes);case"animation-name":return g8(e,i.keyframes);default:return e}}},cwe=function(t){Eu(e,t);function e(){return t.apply(this,arguments)||this}var r=e.prototype;return r.toString=function(i){var o=this.options.sheet,a=o?o.options.link:!1,s=a?vt({},i,{allowEmpty:!0}):i;return OP(this.key,this.style,s)},e}(YZ),uwe={onCreateRule:function(e,r,n){return n.parent&&n.parent.type==="keyframes"?new cwe(e,r,n):null}},fwe=function(){function t(r,n,i){this.type="font-face",this.at="@font-face",this.isProcessed=!1,this.key=r,this.style=n,this.options=i}var e=t.prototype;return e.toString=function(n){var i=j2(n),o=i.linebreak;if(Array.isArray(this.style)){for(var a="",s=0;s<this.style.length;s++)a+=OP(this.at,this.style[s]),this.style[s+1]&&(a+=o);return a}return OP(this.at,this.style,n)},t}(),dwe=/@font-face/,hwe={onCreateRule:function(e,r,n){return dwe.test(e)?new fwe(e,r,n):null}},pwe=function(){function t(r,n,i){this.type="viewport",this.at="@viewport",this.isProcessed=!1,this.key=r,this.style=n,this.options=i}var e=t.prototype;return e.toString=function(n){return OP(this.key,this.style,n)},t}(),mwe={onCreateRule:function(e,r,n){return e==="@viewport"||e==="@-ms-viewport"?new pwe(e,r,n):null}},gwe=function(){function t(r,n,i){this.type="simple",this.isProcessed=!1,this.key=r,this.value=n,this.options=i}var e=t.prototype;return e.toString=function(n){if(Array.isArray(this.value)){for(var i="",o=0;o<this.value.length;o++)i+=this.key+" "+this.value[o]+";",this.value[o+1]&&(i+=` `);return i}return this.key+" "+this.value+";"},t}(),vwe={"@charset":!0,"@import":!0,"@namespace":!0},ywe={onCreateRule:function(e,r,n){return e in vwe?new gwe(e,r,n):null}},ZZ=[ewe,iwe,lwe,uwe,hwe,mwe,ywe],xwe={process:!0},QZ={force:!0,process:!0},cL=function(){function t(r){this.map={},this.raw={},this.index=[],this.counter=0,this.options=r,this.classes=r.classes,this.keyframes=r.keyframes}var e=t.prototype;return e.add=function(n,i,o){var a=this.options,s=a.parent,l=a.sheet,u=a.jss,p=a.Renderer,m=a.generateId,v=a.scoped,x=vt({classes:this.classes,parent:s,sheet:l,jss:u,Renderer:p,generateId:m,scoped:v,name:n,keyframes:this.keyframes,selector:void 0},o),y=n;n in this.raw&&(y=n+"-d"+this.counter++),this.raw[y]=i,y in this.classes&&(x.selector="."+f8(this.classes[y]));var _=u8(y,i,x);if(!_)return null;this.register(_);var w=x.index===void 0?this.index.length:x.index;return this.index.splice(w,0,_),_},e.get=function(n){return this.map[n]},e.remove=function(n){this.unregister(n),delete this.raw[n.key],this.index.splice(this.index.indexOf(n),1)},e.indexOf=function(n){return this.index.indexOf(n)},e.process=function(){var n=this.options.jss.plugins;this.index.slice(0).forEach(n.onProcessRule,n)},e.register=function(n){this.map[n.key]=n,n instanceof d8?(this.map[n.selector]=n,n.id&&(this.classes[n.key]=n.id)):n instanceof m8&&this.keyframes&&(this.keyframes[n.name]=n.id)},e.unregister=function(n){delete this.map[n.key],n instanceof d8?(delete this.map[n.selector],delete this.classes[n.key]):n instanceof m8&&delete this.keyframes[n.name]},e.update=function(){var n,i,o;if(typeof(arguments.length<=0?void 0:arguments[0])=="string"?(n=arguments.length<=0?void 0:arguments[0],i=arguments.length<=1?void 0:arguments[1],o=arguments.length<=2?void 0:arguments[2]):(i=arguments.length<=0?void 0:arguments[0],o=arguments.length<=1?void 0:arguments[1],n=null),n)this.updateOne(this.map[n],i,o);else for(var a=0;a<this.index.length;a++)this.updateOne(this.index[a],i,o)},e.updateOne=function(n,i,o){o===void 0&&(o=xwe);var a=this.options,s=a.jss.plugins,l=a.sheet;if(n.rules instanceof t){n.rules.update(i,o);return}var u=n.style;if(s.onUpdate(i,n,l,o),o.process&&u&&u!==n.style){s.onProcessStyle(n.style,n,l);for(var p in n.style){var m=n.style[p],v=u[p];m!==v&&n.prop(p,m,QZ)}for(var x in u){var y=n.style[x],_=u[x];y==null&&y!==_&&n.prop(x,null,QZ)}}},e.toString=function(n){for(var i="",o=this.options.sheet,a=o?o.options.link:!1,s=j2(n),l=s.linebreak,u=0;u<this.index.length;u++){var p=this.index[u],m=p.toString(n);!m&&!a||(i&&(i+=l),i+=m)}return i},t}(),JZ=function(){function t(r,n){this.attached=!1,this.deployed=!1,this.classes={},this.keyframes={},this.options=vt({},n,{sheet:this,parent:this,classes:this.classes,keyframes:this.keyframes}),n.Renderer&&(this.renderer=new n.Renderer(this)),this.rules=new cL(this.options);for(var i in r)this.rules.add(i,r[i]);this.rules.process()}var e=t.prototype;return e.attach=function(){return this.attached?this:(this.renderer&&this.renderer.attach(),this.attached=!0,this.deployed||this.deploy(),this)},e.detach=function(){return this.attached?(this.renderer&&this.renderer.detach(),this.attached=!1,this):this},e.addRule=function(n,i,o){var a=this.queue;this.attached&&!a&&(this.queue=[]);var s=this.rules.add(n,i,o);return s?(this.options.jss.plugins.onProcessRule(s),this.attached?(this.deployed&&(a?a.push(s):(this.insertRule(s),this.queue&&(this.queue.forEach(this.insertRule,this),this.queue=void 0))),s):(this.deployed=!1,s)):null},e.insertRule=function(n){this.renderer&&this.renderer.insertRule(n)},e.addRules=function(n,i){var o=[];for(var a in n){var s=this.addRule(a,n[a],i);s&&o.push(s)}return o},e.getRule=function(n){return this.rules.get(n)},e.deleteRule=function(n){var i=typeof n=="object"?n:this.rules.get(n);return!i||this.attached&&!i.renderable?!1:(this.rules.remove(i),this.attached&&i.renderable&&this.renderer?this.renderer.deleteRule(i.renderable):!0)},e.indexOf=function(n){return this.rules.indexOf(n)},e.deploy=function(){return this.renderer&&this.renderer.deploy(),this.deployed=!0,this},e.update=function(){var n;return(n=this.rules).update.apply(n,arguments),this},e.updateOne=function(n,i,o){return this.rules.updateOne(n,i,o),this},e.toString=function(n){return this.rules.toString(n)},t}(),_we=function(){function t(){this.plugins={internal:[],external:[]},this.registry={}}var e=t.prototype;return e.onCreateRule=function(n,i,o){for(var a=0;a<this.registry.onCreateRule.length;a++){var s=this.registry.onCreateRule[a](n,i,o);if(s)return s}return null},e.onProcessRule=function(n){if(!n.isProcessed){for(var i=n.options.sheet,o=0;o<this.registry.onProcessRule.length;o++)this.registry.onProcessRule[o](n,i);n.style&&this.onProcessStyle(n.style,n,i),n.isProcessed=!0}},e.onProcessStyle=function(n,i,o){for(var a=0;a<this.registry.onProcessStyle.length;a++)i.style=this.registry.onProcessStyle[a](i.style,i,o)},e.onProcessSheet=function(n){for(var i=0;i<this.registry.onProcessSheet.length;i++)this.registry.onProcessSheet[i](n)},e.onUpdate=function(n,i,o,a){for(var s=0;s<this.registry.onUpdate.length;s++)this.registry.onUpdate[s](n,i,o,a)},e.onChangeValue=function(n,i,o){for(var a=n,s=0;s<this.registry.onChangeValue.length;s++)a=this.registry.onChangeValue[s](a,i,o);return a},e.use=function(n,i){i===void 0&&(i={queue:"external"});var o=this.plugins[i.queue];o.indexOf(n)===-1&&(o.push(n),this.registry=[].concat(this.plugins.external,this.plugins.internal).reduce(function(a,s){for(var l in s)l in a&&a[l].push(s[l]);return a},{onCreateRule:[],onProcessRule:[],onProcessStyle:[],onProcessSheet:[],onChangeValue:[],onUpdate:[]}))},t}(),bwe=function(){function t(){this.registry=[]}var e=t.prototype;return e.add=function(n){var i=this.registry,o=n.options.index;if(i.indexOf(n)===-1){if(i.length===0||o>=this.index){i.push(n);return}for(var a=0;a<i.length;a++)if(i[a].options.index>o){i.splice(a,0,n);return}}},e.reset=function(){this.registry=[]},e.remove=function(n){var i=this.registry.indexOf(n);this.registry.splice(i,1)},e.toString=function(n){for(var i=n===void 0?{}:n,o=i.attached,a=sf(i,["attached"]),s=j2(a),l=s.linebreak,u="",p=0;p<this.registry.length;p++){var m=this.registry[p];o!=null&&m.attached!==o||(u&&(u+=l),u+=m.toString(a))}return u},l8(t,[{key:"index",get:function(){return this.registry.length===0?0:this.registry[this.registry.length-1].options.index}}]),t}(),LP=new bwe,v8=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"&&window.Math===Math?window:typeof self!="undefined"&&self.Math===Math?self:Function("return this")(),y8="2f1acc6c3a606b082e5eef5e54414ffb";v8[y8]==null&&(v8[y8]=0);var eQ=v8[y8]++,tQ=function(e){e===void 0&&(e={});var r=0,n=function(o,a){r+=1;var s="",l="";return a&&(a.options.classNamePrefix&&(l=a.options.classNamePrefix),a.options.jss.id!=null&&(s=String(a.options.jss.id))),e.minify?""+(l||"c")+eQ+s+r:l+o.key+"-"+eQ+(s?"-"+s:"")+"-"+r};return n},rQ=function(e){var r;return function(){return r||(r=e()),r}},wwe=function(e,r){try{return e.attributeStyleMap?e.attributeStyleMap.get(r):e.style.getPropertyValue(r)}catch{return""}},Cwe=function(e,r,n){try{var i=n;if(Array.isArray(n)&&(i=k1(n,!0),n[n.length-1]==="!important"))return e.style.setProperty(r,i,"important"),!0;e.attributeStyleMap?e.attributeStyleMap.set(r,i):e.style.setProperty(r,i)}catch{return!1}return!0},Ewe=function(e,r){try{e.attributeStyleMap?e.attributeStyleMap.delete(r):e.style.removeProperty(r)}catch{}},Swe=function(e,r){return e.selectorText=r,e.selectorText===r},nQ=rQ(function(){return document.querySelector("head")});function Twe(t,e){for(var r=0;r<t.length;r++){var n=t[r];if(n.attached&&n.options.index>e.index&&n.options.insertionPoint===e.insertionPoint)return n}return null}function Pwe(t,e){for(var r=t.length-1;r>=0;r--){var n=t[r];if(n.attached&&n.options.insertionPoint===e.insertionPoint)return n}return null}function Iwe(t){for(var e=nQ(),r=0;r<e.childNodes.length;r++){var n=e.childNodes[r];if(n.nodeType===8&&n.nodeValue.trim()===t)return n}return null}function Mwe(t){var e=LP.registry;if(e.length>0){var r=Twe(e,t);if(r&&r.renderer)return{parent:r.renderer.element.parentNode,node:r.renderer.element};if(r=Pwe(e,t),r&&r.renderer)return{parent:r.renderer.element.parentNode,node:r.renderer.element.nextSibling}}var n=t.insertionPoint;if(n&&typeof n=="string"){var i=Iwe(n);if(i)return{parent:i.parentNode,node:i.nextSibling}}return!1}function Awe(t,e){var r=e.insertionPoint,n=Mwe(e);if(n!==!1&&n.parent){n.parent.insertBefore(t,n.node);return}if(r&&typeof r.nodeType=="number"){var i=r,o=i.parentNode;o&&o.insertBefore(t,i.nextSibling);return}nQ().appendChild(t)}var Rwe=rQ(function(){var t=document.querySelector('meta[property="csp-nonce"]');return t?t.getAttribute("content"):null}),iQ=function(e,r,n){try{"insertRule"in e?e.insertRule(r,n):"appendRule"in e&&e.appendRule(r)}catch{return!1}return e.cssRules[n]},oQ=function(e,r){var n=e.cssRules.length;return r===void 0||r>n?n:r},kwe=function(){var e=document.createElement("style");return e.textContent=` `,e},Owe=function(){function t(r){this.getPropertyValue=wwe,this.setProperty=Cwe,this.removeProperty=Ewe,this.setSelector=Swe,this.hasInsertedRules=!1,this.cssRules=[],r&&LP.add(r),this.sheet=r;var n=this.sheet?this.sheet.options:{},i=n.media,o=n.meta,a=n.element;this.element=a||kwe(),this.element.setAttribute("data-jss",""),i&&this.element.setAttribute("media",i),o&&this.element.setAttribute("data-meta",o);var s=Rwe();s&&this.element.setAttribute("nonce",s)}var e=t.prototype;return e.attach=function(){if(!(this.element.parentNode||!this.sheet)){Awe(this.element,this.sheet.options);var n=Boolean(this.sheet&&this.sheet.deployed);this.hasInsertedRules&&n&&(this.hasInsertedRules=!1,this.deploy())}},e.detach=function(){if(!!this.sheet){var n=this.element.parentNode;n&&n.removeChild(this.element),this.sheet.options.link&&(this.cssRules=[],this.element.textContent=` `)}},e.deploy=function(){var n=this.sheet;if(!!n){if(n.options.link){this.insertRules(n.rules);return}this.element.textContent=` `+n.toString()+` `}},e.insertRules=function(n,i){for(var o=0;o<n.index.length;o++)this.insertRule(n.index[o],o,i)},e.insertRule=function(n,i,o){if(o===void 0&&(o=this.element.sheet),n.rules){var a=n,s=o;if(n.type==="conditional"||n.type==="keyframes"){var l=oQ(o,i);if(s=iQ(o,a.toString({children:!1}),l),s===!1)return!1;this.refCssRule(n,l,s)}return this.insertRules(a.rules,s),s}var u=n.toString();if(!u)return!1;var p=oQ(o,i),m=iQ(o,u,p);return m===!1?!1:(this.hasInsertedRules=!0,this.refCssRule(n,p,m),m)},e.refCssRule=function(n,i,o){n.renderable=o,n.options.parent instanceof JZ&&(this.cssRules[i]=o)},e.deleteRule=function(n){var i=this.element.sheet,o=this.indexOf(n);return o===-1?!1:(i.deleteRule(o),this.cssRules.splice(o,1),!0)},e.indexOf=function(n){return this.cssRules.indexOf(n)},e.replaceRule=function(n,i){var o=this.indexOf(n);return o===-1?!1:(this.element.sheet.deleteRule(o),this.cssRules.splice(o,1),this.insertRule(i,o))},e.getRules=function(){return this.element.sheet.cssRules},t}(),Lwe=0,Dwe=function(){function t(r){this.id=Lwe++,this.version="10.8.0",this.plugins=new _we,this.options={id:{minify:!1},createGenerateId:tQ,Renderer:RP?Owe:null,plugins:[]},this.generateId=tQ({minify:!1});for(var n=0;n<ZZ.length;n++)this.plugins.use(ZZ[n],{queue:"internal"});this.setup(r)}var e=t.prototype;return e.setup=function(n){return n===void 0&&(n={}),n.createGenerateId&&(this.options.createGenerateId=n.createGenerateId),n.id&&(this.options.id=vt({},this.options.id,n.id)),(n.createGenerateId||n.id)&&(this.generateId=this.options.createGenerateId(this.options.id)),n.insertionPoint!=null&&(this.options.insertionPoint=n.insertionPoint),"Renderer"in n&&(this.options.Renderer=n.Renderer),n.plugins&&this.use.apply(this,n.plugins),this},e.createStyleSheet=function(n,i){i===void 0&&(i={});var o=i,a=o.index;typeof a!="number"&&(a=LP.index===0?0:LP.index+1);var s=new JZ(n,vt({},i,{jss:this,generateId:i.generateId||this.generateId,insertionPoint:this.options.insertionPoint,Renderer:this.options.Renderer,index:a}));return this.plugins.onProcessSheet(s),s},e.removeStyleSheet=function(n){return n.detach(),LP.remove(n),this},e.createRule=function(n,i,o){if(i===void 0&&(i={}),o===void 0&&(o={}),typeof n=="object")return this.createRule(void 0,n,i);var a=vt({},o,{name:n,jss:this,Renderer:this.options.Renderer});a.generateId||(a.generateId=this.generateId),a.classes||(a.classes={}),a.keyframes||(a.keyframes={});var s=u8(n,i,a);return s&&this.plugins.onProcessRule(s),s},e.use=function(){for(var n=this,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return o.forEach(function(s){n.plugins.use(s)}),this},t}(),x8=function(e){return new Dwe(e)},_8=typeof CSS=="object"&&CSS!=null&&"number"in CSS;function b8(t){var e=null;for(var r in t){var n=t[r],i=typeof n;if(i==="function")e||(e={}),e[r]=n;else if(i==="object"&&n!==null&&!Array.isArray(n)){var o=b8(n);o&&(e||(e={}),e[r]=o)}}return e}/** * A better abstraction over CSS. * * @copyright Oleg Isonen (Slobodskoi) / Isonen 2014-present * @website https://github.com/cssinjs/jss * @license MIT */x8();var sQ=Date.now(),w8="fnValues"+sQ,C8="fnStyle"+ ++sQ,Nwe=function(){return{onCreateRule:function(r,n,i){if(typeof n!="function")return null;var o=u8(r,{},i);return o[C8]=n,o},onProcessStyle:function(r,n){if(w8 in n||C8 in n)return r;var i={};for(var o in r){var a=r[o];typeof a=="function"&&(delete r[o],i[o]=a)}return n[w8]=i,r},onUpdate:function(r,n,i,o){var a=n,s=a[C8];s&&(a.style=s(r)||{});var l=a[w8];if(l)for(var u in l)a.prop(u,l[u](r),o)}}},aQ=Nwe,fx="@global",E8="@global ",$we=function(){function t(r,n,i){this.type="global",this.at=fx,this.isProcessed=!1,this.key=r,this.options=i,this.rules=new cL(vt({},i,{parent:this}));for(var o in n)this.rules.add(o,n[o]);this.rules.process()}var e=t.prototype;return e.getRule=function(n){return this.rules.get(n)},e.addRule=function(n,i,o){var a=this.rules.add(n,i,o);return a&&this.options.jss.plugins.onProcessRule(a),a},e.indexOf=function(n){return this.rules.indexOf(n)},e.toString=function(){return this.rules.toString()},t}(),Fwe=function(){function t(r,n,i){this.type="global",this.at=fx,this.isProcessed=!1,this.key=r,this.options=i;var o=r.substr(E8.length);this.rule=i.jss.createRule(o,n,vt({},i,{parent:this}))}var e=t.prototype;return e.toString=function(n){return this.rule?this.rule.toString(n):""},t}(),zwe=/\s*,\s*/g;function lQ(t,e){for(var r=t.split(zwe),n="",i=0;i<r.length;i++)n+=e+" "+r[i].trim(),r[i+1]&&(n+=", ");return n}function Bwe(t,e){var r=t.options,n=t.style,i=n?n[fx]:null;if(!!i){for(var o in i)e.addRule(o,i[o],vt({},r,{selector:lQ(o,t.selector)}));delete n[fx]}}function jwe(t,e){var r=t.options,n=t.style;for(var i in n)if(!(i[0]!=="@"||i.substr(0,fx.length)!==fx)){var o=lQ(i.substr(fx.length),t.selector);e.addRule(o,n[i],vt({},r,{selector:o})),delete n[i]}}function cQ(){function t(r,n,i){if(!r)return null;if(r===fx)return new $we(r,n,i);if(r[0]==="@"&&r.substr(0,E8.length)===E8)return new Fwe(r,n,i);var o=i.parent;return o&&(o.type==="global"||o.options.parent&&o.options.parent.type==="global")&&(i.scoped=!1),i.scoped===!1&&(i.selector=r),null}function e(r,n){r.type!=="style"||!n||(Bwe(r,n),jwe(r,n))}return{onCreateRule:t,onProcessRule:e}}var uQ=/\s*,\s*/g,Uwe=/&/g,Vwe=/\$([\w-]+)/g;function fQ(){function t(i,o){return function(a,s){var l=i.getRule(s)||o&&o.getRule(s);return l?l.selector:s}}function e(i,o){for(var a=o.split(uQ),s=i.split(uQ),l="",u=0;u<a.length;u++)for(var p=a[u],m=0;m<s.length;m++){var v=s[m];l&&(l+=", "),l+=v.indexOf("&")!==-1?v.replace(Uwe,p):p+" "+v}return l}function r(i,o,a){if(a)return vt({},a,{index:a.index+1});var s=i.options.nestingLevel;s=s===void 0?1:s+1;var l=vt({},i.options,{nestingLevel:s,index:o.indexOf(i)+1});return delete l.name,l}function n(i,o,a){if(o.type!=="style")return i;var s=o,l=s.options.parent,u,p;for(var m in i){var v=m.indexOf("&")!==-1,x=m[0]==="@";if(!(!v&&!x)){if(u=r(s,l,u),v){var y=e(m,s.selector);p||(p=t(l,a)),y=y.replace(Vwe,p),l.addRule(y,i[m],vt({},u,{selector:y}))}else x&&l.addRule(m,{},u).addRule(s.key,i[m],{selector:s.selector});delete i[m]}}return i}return{onProcessStyle:n}}var Hwe=/[A-Z]/g,Wwe=/^ms-/,S8={};function Gwe(t){return"-"+t.toLowerCase()}function dQ(t){if(S8.hasOwnProperty(t))return S8[t];var e=t.replace(Hwe,Gwe);return S8[t]=Wwe.test(e)?"-"+e:e}function uL(t){var e={};for(var r in t){var n=r.indexOf("--")===0?r:dQ(r);e[n]=t[r]}return t.fallbacks&&(Array.isArray(t.fallbacks)?e.fallbacks=t.fallbacks.map(uL):e.fallbacks=uL(t.fallbacks)),e}function hQ(){function t(r){if(Array.isArray(r)){for(var n=0;n<r.length;n++)r[n]=uL(r[n]);return r}return uL(r)}function e(r,n,i){if(n.indexOf("--")===0)return r;var o=dQ(n);return n===o?r:(i.prop(o,r),null)}return{onProcessStyle:t,onChangeValue:e}}var Fr=_8&&CSS?CSS.px:"px",fL=_8&&CSS?CSS.ms:"ms",U2=_8&&CSS?CSS.percent:"%",qwe={"animation-delay":fL,"animation-duration":fL,"background-position":Fr,"background-position-x":Fr,"background-position-y":Fr,"background-size":Fr,border:Fr,"border-bottom":Fr,"border-bottom-left-radius":Fr,"border-bottom-right-radius":Fr,"border-bottom-width":Fr,"border-left":Fr,"border-left-width":Fr,"border-radius":Fr,"border-right":Fr,"border-right-width":Fr,"border-top":Fr,"border-top-left-radius":Fr,"border-top-right-radius":Fr,"border-top-width":Fr,"border-width":Fr,"border-block":Fr,"border-block-end":Fr,"border-block-end-width":Fr,"border-block-start":Fr,"border-block-start-width":Fr,"border-block-width":Fr,"border-inline":Fr,"border-inline-end":Fr,"border-inline-end-width":Fr,"border-inline-start":Fr,"border-inline-start-width":Fr,"border-inline-width":Fr,"border-start-start-radius":Fr,"border-start-end-radius":Fr,"border-end-start-radius":Fr,"border-end-end-radius":Fr,margin:Fr,"margin-bottom":Fr,"margin-left":Fr,"margin-right":Fr,"margin-top":Fr,"margin-block":Fr,"margin-block-end":Fr,"margin-block-start":Fr,"margin-inline":Fr,"margin-inline-end":Fr,"margin-inline-start":Fr,padding:Fr,"padding-bottom":Fr,"padding-left":Fr,"padding-right":Fr,"padding-top":Fr,"padding-block":Fr,"padding-block-end":Fr,"padding-block-start":Fr,"padding-inline":Fr,"padding-inline-end":Fr,"padding-inline-start":Fr,"mask-position-x":Fr,"mask-position-y":Fr,"mask-size":Fr,height:Fr,width:Fr,"min-height":Fr,"max-height":Fr,"min-width":Fr,"max-width":Fr,bottom:Fr,left:Fr,top:Fr,right:Fr,inset:Fr,"inset-block":Fr,"inset-block-end":Fr,"inset-block-start":Fr,"inset-inline":Fr,"inset-inline-end":Fr,"inset-inline-start":Fr,"box-shadow":Fr,"text-shadow":Fr,"column-gap":Fr,"column-rule":Fr,"column-rule-width":Fr,"column-width":Fr,"font-size":Fr,"font-size-delta":Fr,"letter-spacing":Fr,"text-decoration-thickness":Fr,"text-indent":Fr,"text-stroke":Fr,"text-stroke-width":Fr,"word-spacing":Fr,motion:Fr,"motion-offset":Fr,outline:Fr,"outline-offset":Fr,"outline-width":Fr,perspective:Fr,"perspective-origin-x":U2,"perspective-origin-y":U2,"transform-origin":U2,"transform-origin-x":U2,"transform-origin-y":U2,"transform-origin-z":U2,"transition-delay":fL,"transition-duration":fL,"vertical-align":Fr,"flex-basis":Fr,"shape-margin":Fr,size:Fr,gap:Fr,grid:Fr,"grid-gap":Fr,"row-gap":Fr,"grid-row-gap":Fr,"grid-column-gap":Fr,"grid-template-rows":Fr,"grid-template-columns":Fr,"grid-auto-rows":Fr,"grid-auto-columns":Fr,"box-shadow-x":Fr,"box-shadow-y":Fr,"box-shadow-blur":Fr,"box-shadow-spread":Fr,"font-line-height":Fr,"text-shadow-x":Fr,"text-shadow-y":Fr,"text-shadow-blur":Fr};function pQ(t){var e=/(-[a-z])/g,r=function(a){return a[1].toUpperCase()},n={};for(var i in t)n[i]=t[i],n[i.replace(e,r)]=t[i];return n}var Xwe=pQ(qwe);function DP(t,e,r){if(e==null)return e;if(Array.isArray(e))for(var n=0;n<e.length;n++)e[n]=DP(t,e[n],r);else if(typeof e=="object")if(t==="fallbacks")for(var i in e)e[i]=DP(i,e[i],r);else for(var o in e)e[o]=DP(t+"-"+o,e[o],r);else if(typeof e=="number"&&isNaN(e)===!1){var a=r[t]||Xwe[t];return a&&!(e===0&&a===Fr)?typeof a=="function"?a(e).toString():""+e+a:e.toString()}return e}function mQ(t){t===void 0&&(t={});var e=pQ(t);function r(i,o){if(o.type!=="style")return i;for(var a in i)i[a]=DP(a,i[a],e);return i}function n(i,o){return DP(o,i,e)}return{onProcessStyle:r,onChangeValue:n}}var NP="",T8="",gQ="",vQ="",Ywe=RP&&"ontouchstart"in document.documentElement;if(RP){var P8={Moz:"-moz-",ms:"-ms-",O:"-o-",Webkit:"-webkit-"},Kwe=document.createElement("p"),I8=Kwe.style,Zwe="Transform";for(var M8 in P8)if(M8+Zwe in I8){NP=M8,T8=P8[M8];break}NP==="Webkit"&&"msHyphens"in I8&&(NP="ms",T8=P8.ms,vQ="edge"),NP==="Webkit"&&"-apple-trailing-word"in I8&&(gQ="apple")}var Xi={js:NP,css:T8,vendor:gQ,browser:vQ,isTouch:Ywe};function Qwe(t){return t[1]==="-"||Xi.js==="ms"?t:"@"+Xi.css+"keyframes"+t.substr(10)}var Jwe={noPrefill:["appearance"],supportedProperty:function(e){return e!=="appearance"?!1:Xi.js==="ms"?"-webkit-"+e:Xi.css+e}},e2e={noPrefill:["color-adjust"],supportedProperty:function(e){return e!=="color-adjust"?!1:Xi.js==="Webkit"?Xi.css+"print-"+e:e}},t2e=/[-\s]+(.)?/g;function r2e(t,e){return e?e.toUpperCase():""}function A8(t){return t.replace(t2e,r2e)}function dx(t){return A8("-"+t)}var n2e={noPrefill:["mask"],supportedProperty:function(e,r){if(!/^mask/.test(e))return!1;if(Xi.js==="Webkit"){var n="mask-image";if(A8(n)in r)return e;if(Xi.js+dx(n)in r)return Xi.css+e}return e}},i2e={noPrefill:["text-orientation"],supportedProperty:function(e){return e!=="text-orientation"?!1:Xi.vendor==="apple"&&!Xi.isTouch?Xi.css+e:e}},o2e={noPrefill:["transform"],supportedProperty:function(e,r,n){return e!=="transform"?!1:n.transform?e:Xi.css+e}},s2e={noPrefill:["transition"],supportedProperty:function(e,r,n){return e!=="transition"?!1:n.transition?e:Xi.css+e}},a2e={noPrefill:["writing-mode"],supportedProperty:function(e){return e!=="writing-mode"?!1:Xi.js==="Webkit"||Xi.js==="ms"&&Xi.browser!=="edge"?Xi.css+e:e}},l2e={noPrefill:["user-select"],supportedProperty:function(e){return e!=="user-select"?!1:Xi.js==="Moz"||Xi.js==="ms"||Xi.vendor==="apple"?Xi.css+e:e}},c2e={supportedProperty:function(e,r){if(!/^break-/.test(e))return!1;if(Xi.js==="Webkit"){var n="WebkitColumn"+dx(e);return n in r?Xi.css+"column-"+e:!1}if(Xi.js==="Moz"){var i="page"+dx(e);return i in r?"page-"+e:!1}return!1}},u2e={supportedProperty:function(e,r){if(!/^(border|margin|padding)-inline/.test(e))return!1;if(Xi.js==="Moz")return e;var n=e.replace("-inline","");return Xi.js+dx(n)in r?Xi.css+n:!1}},f2e={supportedProperty:function(e,r){return A8(e)in r?e:!1}},d2e={supportedProperty:function(e,r){var n=dx(e);return e[0]==="-"||e[0]==="-"&&e[1]==="-"?e:Xi.js+n in r?Xi.css+e:Xi.js!=="Webkit"&&"Webkit"+n in r?"-webkit-"+e:!1}},h2e={supportedProperty:function(e){return e.substring(0,11)!=="scroll-snap"?!1:Xi.js==="ms"?""+Xi.css+e:e}},p2e={supportedProperty:function(e){return e!=="overscroll-behavior"?!1:Xi.js==="ms"?Xi.css+"scroll-chaining":e}},m2e={"flex-grow":"flex-positive","flex-shrink":"flex-negative","flex-basis":"flex-preferred-size","justify-content":"flex-pack",order:"flex-order","align-items":"flex-align","align-content":"flex-line-pack"},g2e={supportedProperty:function(e,r){var n=m2e[e];return n&&Xi.js+dx(n)in r?Xi.css+n:!1}},yQ={flex:"box-flex","flex-grow":"box-flex","flex-direction":["box-orient","box-direction"],order:"box-ordinal-group","align-items":"box-align","flex-flow":["box-orient","box-direction"],"justify-content":"box-pack"},v2e=Object.keys(yQ),y2e=function(e){return Xi.css+e},x2e={supportedProperty:function(e,r,n){var i=n.multiple;if(v2e.indexOf(e)>-1){var o=yQ[e];if(!Array.isArray(o))return Xi.js+dx(o)in r?Xi.css+o:!1;if(!i)return!1;for(var a=0;a<o.length;a++)if(!(Xi.js+dx(o[0])in r))return!1;return o.map(y2e)}return!1}},xQ=[Jwe,e2e,n2e,i2e,o2e,s2e,a2e,l2e,c2e,u2e,f2e,d2e,h2e,p2e,g2e,x2e],_Q=xQ.filter(function(t){return t.supportedProperty}).map(function(t){return t.supportedProperty}),_2e=xQ.filter(function(t){return t.noPrefill}).reduce(function(t,e){return t.push.apply(t,uy(e.noPrefill)),t},[]),$P,O1={};if(RP){$P=document.createElement("p");var R8=window.getComputedStyle(document.documentElement,"");for(var k8 in R8)isNaN(k8)||(O1[R8[k8]]=R8[k8]);_2e.forEach(function(t){return delete O1[t]})}function O8(t,e){if(e===void 0&&(e={}),!$P)return t;if(O1[t]!=null)return O1[t];(t==="transition"||t==="transform")&&(e[t]=t in $P.style);for(var r=0;r<_Q.length&&(O1[t]=_Q[r](t,$P.style,e),!O1[t]);r++);try{$P.style[t]=""}catch{return!1}return O1[t]}var V2={},b2e={transition:1,"transition-property":1,"-webkit-transition":1,"-webkit-transition-property":1},w2e=/(^\s*[\w-]+)|, (\s*[\w-]+)(?![^()]*\))/g,hx;function C2e(t,e,r){if(e==="var")return"var";if(e==="all")return"all";if(r==="all")return", all";var n=e?O8(e):", "+O8(r);return n||e||r}RP&&(hx=document.createElement("p"));function bQ(t,e){var r=e;if(!hx||t==="content")return e;if(typeof r!="string"||!isNaN(parseInt(r,10)))return r;var n=t+r;if(V2[n]!=null)return V2[n];try{hx.style[t]=r}catch{return V2[n]=!1,!1}if(b2e[t])r=r.replace(w2e,C2e);else if(hx.style[t]===""&&(r=Xi.css+r,r==="-ms-flex"&&(hx.style[t]="-ms-flexbox"),hx.style[t]=r,hx.style[t]===""))return V2[n]=!1,!1;return hx.style[t]="",V2[n]=r,V2[n]}function wQ(){function t(i){if(i.type==="keyframes"){var o=i;o.at=Qwe(o.at)}}function e(i){for(var o in i){var a=i[o];if(o==="fallbacks"&&Array.isArray(a)){i[o]=a.map(e);continue}var s=!1,l=O8(o);l&&l!==o&&(s=!0);var u=!1,p=bQ(l,k1(a));p&&p!==a&&(u=!0),(s||u)&&(s&&delete i[o],i[l||o]=p||a)}return i}function r(i,o){return o.type!=="style"?i:e(i)}function n(i,o){return bQ(o,k1(i))||i}return{onProcessRule:t,onProcessStyle:r,onChangeValue:n}}function CQ(){var t=function(r,n){return r.length===n.length?r>n?1:-1:r.length-n.length};return{onProcessStyle:function(r,n){if(n.type!=="style")return r;for(var i={},o=Object.keys(r).sort(t),a=0;a<o.length;a++)i[o[a]]=r[o[a]];return i}}}function E2e(){return{plugins:[aQ(),cQ(),fQ(),hQ(),mQ(),typeof window=="undefined"?null:wQ(),CQ()]}}function L8(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=t.baseClasses,r=t.newClasses;if(t.Component,!r)return e;var n=vt({},e);return Object.keys(r).forEach(function(i){r[i]&&(n[i]="".concat(e[i]," ").concat(r[i]))}),n}var S2e={set:function(e,r,n,i){var o=e.get(r);o||(o=new Map,e.set(r,o)),o.set(n,i)},get:function(e,r,n){var i=e.get(r);return i?i.get(n):void 0},delete:function(e,r,n){var i=e.get(r);i.delete(n)}},H2=S2e,T2e=Or.createContext(null),EQ=T2e;function W2(){var t=Or.useContext(EQ);return t}var P2e=x8(E2e()),I2e=Zbe(),M2e=new Map,A2e={disableGeneration:!1,generateClassName:I2e,jss:P2e,sheetsCache:null,sheetsManager:M2e,sheetsRegistry:null},R2e=Or.createContext(A2e),SQ=-1e9;function k2e(){return SQ+=1,SQ}var O2e={},L2e=O2e;function D2e(t){var e=typeof t=="function";return{create:function(n,i){var o;try{o=e?t(n):t}catch(l){throw l}if(!i||!n.overrides||!n.overrides[i])return o;var a=n.overrides[i],s=vt({},o);return Object.keys(a).forEach(function(l){s[l]=ax(s[l],a[l])}),s},options:{}}}function N2e(t,e,r){var n=t.state,i=t.stylesOptions;if(i.disableGeneration)return e||{};n.cacheClasses||(n.cacheClasses={value:null,lastProp:null,lastJSS:{}});var o=!1;return n.classes!==n.cacheClasses.lastJSS&&(n.cacheClasses.lastJSS=n.classes,o=!0),e!==n.cacheClasses.lastProp&&(n.cacheClasses.lastProp=e,o=!0),o&&(n.cacheClasses.value=L8({baseClasses:n.cacheClasses.lastJSS,newClasses:e,Component:r})),n.cacheClasses.value}function $2e(t,e){var r=t.state,n=t.theme,i=t.stylesOptions,o=t.stylesCreator,a=t.name;if(!i.disableGeneration){var s=H2.get(i.sheetsManager,o,n);s||(s={refs:0,staticSheet:null,dynamicStyles:null},H2.set(i.sheetsManager,o,n,s));var l=vt({},o.options,i,{theme:n,flip:typeof i.flip=="boolean"?i.flip:n.direction==="rtl"});l.generateId=l.serverGenerateClassName||l.generateClassName;var u=i.sheetsRegistry;if(s.refs===0){var p;i.sheetsCache&&(p=H2.get(i.sheetsCache,o,n));var m=o.create(n,a);p||(p=i.jss.createStyleSheet(m,vt({link:!1},l)),p.attach(),i.sheetsCache&&H2.set(i.sheetsCache,o,n,p)),u&&u.add(p),s.staticSheet=p,s.dynamicStyles=b8(m)}if(s.dynamicStyles){var v=i.jss.createStyleSheet(s.dynamicStyles,vt({link:!0},l));v.update(e),v.attach(),r.dynamicSheet=v,r.classes=L8({baseClasses:s.staticSheet.classes,newClasses:v.classes}),u&&u.add(v)}else r.classes=s.staticSheet.classes;s.refs+=1}}function F2e(t,e){var r=t.state;r.dynamicSheet&&r.dynamicSheet.update(e)}function z2e(t){var e=t.state,r=t.theme,n=t.stylesOptions,i=t.stylesCreator;if(!n.disableGeneration){var o=H2.get(n.sheetsManager,i,r);o.refs-=1;var a=n.sheetsRegistry;o.refs===0&&(H2.delete(n.sheetsManager,i,r),n.jss.removeStyleSheet(o.staticSheet),a&&a.remove(o.staticSheet)),e.dynamicSheet&&(n.jss.removeStyleSheet(e.dynamicSheet),a&&a.remove(e.dynamicSheet))}}function B2e(t,e){var r=Or.useRef([]),n,i=Or.useMemo(function(){return{}},e);r.current!==i&&(r.current=i,n=t()),Or.useEffect(function(){return function(){n&&n()}},[i])}function D8(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=e.name,n=e.classNamePrefix,i=e.Component,o=e.defaultTheme,a=o===void 0?L2e:o,s=nn(e,["name","classNamePrefix","Component","defaultTheme"]),l=D2e(t),u=r||n||"makeStyles";l.options={index:k2e(),name:r,meta:u,classNamePrefix:u};var p=function(){var v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},x=W2()||a,y=vt({},Or.useContext(R2e),s),_=Or.useRef(),w=Or.useRef();B2e(function(){var E={name:r,state:{},stylesCreator:l,stylesOptions:y,theme:x};return $2e(E,v),w.current=!1,_.current=E,function(){z2e(E)}},[x,l]),Or.useEffect(function(){w.current&&F2e(_.current,v),w.current=!0});var C=N2e(_.current,v.classes,i);return C};return p}function j2e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function TQ(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t))for(e=0;e<t.length;e++)t[e]&&(r=TQ(t[e]))&&(n&&(n+=" "),n+=r);else for(e in t)t[e]&&(n&&(n+=" "),n+=e);return n}function Lr(){for(var t=0,e,r,n="";t<arguments.length;)(e=arguments[t++])&&(r=TQ(e))&&(n&&(n+=" "),n+=r);return n}function U2e(t,e){var r={};return Object.keys(t).forEach(function(n){e.indexOf(n)===-1&&(r[n]=t[n])}),r}function V2e(t){var e=function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=i.name,a=nn(i,["name"]),s=o,l=typeof n=="function"?function(v){return{root:function(y){return n(vt({theme:v},y))}}}:{root:n},u=D8(l,vt({Component:t,name:o||t.displayName,classNamePrefix:s},a)),p;n.filterProps&&(p=n.filterProps,delete n.filterProps),n.propTypes&&(n.propTypes,delete n.propTypes);var m=Or.forwardRef(function(x,y){var _=x.children,w=x.className,C=x.clone,E=x.component,T=nn(x,["children","className","clone","component"]),A=u(x),k=Lr(A.root,w),X=T;if(p&&(X=U2e(X,p)),C)return Or.cloneElement(_,vt({className:Lr(_.props.className,k)},X));if(typeof _=="function")return _(vt({className:k},X));var Z=E||t;return Or.createElement(Z,vt({ref:y,className:k},X),_)});return D2(m,t),m};return e}function H2e(t,e){if(typeof e=="function"){var r=e(t);return r}return vt({},t,e)}function sAt(t){var e=t.children,r=t.theme,n=W2(),i=Or.useMemo(function(){var o=n===null?r:H2e(n,r);return o!=null&&(o[VZ]=n!==null),o},[r,n]);return Or.createElement(EQ.Provider,{value:i},e)}var W2e=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function(n){var i=r.defaultTheme,o=r.withTheme,a=o===void 0?!1:o,s=r.name,l=nn(r,["defaultTheme","withTheme","name"]),u=s,p=D8(e,vt({defaultTheme:i,Component:n,name:s||n.displayName,classNamePrefix:u},l)),m=Or.forwardRef(function(x,y){x.classes;var _=x.innerRef,w=nn(x,["classes","innerRef"]),C=p(vt({},n.defaultProps,x)),E,T=w;return(typeof s=="string"||a)&&(E=W2()||i,s&&(T=HZ({theme:E,name:s,props:w})),a&&!T.theme&&(T.theme=E)),Or.createElement(n,vt({ref:_||y,classes:C},T))});return D2(m,n),m}},G2e=W2e,q2e=Xbe(),dL=q2e;function aAt(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return D8(t,vt({defaultTheme:dL},e))}var X2e=function(e){var r=V2e(e);return function(n,i){return r(n,vt({defaultTheme:dL},i))}},Y2e=X2e;function zg(){var t=W2()||dL;return t}function Dn(t,e){return G2e(t,vt({defaultTheme:dL},e))}function ni(t){if(typeof t!="string")throw new Error(F2(7));return t.charAt(0).toUpperCase()+t.slice(1)}function dy(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return e.reduce(function(n,i){return i==null?n:function(){for(var a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];n.apply(this,s),i.apply(this,s)}},function(){})}var K2e=function(e){return{root:{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:"currentColor",flexShrink:0,fontSize:e.typography.pxToRem(24),transition:e.transitions.create("fill",{duration:e.transitions.duration.shorter})},colorPrimary:{color:e.palette.primary.main},colorSecondary:{color:e.palette.secondary.main},colorAction:{color:e.palette.action.active},colorError:{color:e.palette.error.main},colorDisabled:{color:e.palette.action.disabled},fontSizeInherit:{fontSize:"inherit"},fontSizeSmall:{fontSize:e.typography.pxToRem(20)},fontSizeLarge:{fontSize:e.typography.pxToRem(35)}}},PQ=Y.exports.forwardRef(function(e,r){var n=e.children,i=e.classes,o=e.className,a=e.color,s=a===void 0?"inherit":a,l=e.component,u=l===void 0?"svg":l,p=e.fontSize,m=p===void 0?"medium":p,v=e.htmlColor,x=e.titleAccess,y=e.viewBox,_=y===void 0?"0 0 24 24":y,w=nn(e,["children","classes","className","color","component","fontSize","htmlColor","titleAccess","viewBox"]);return Y.exports.createElement(u,vt({className:Lr(i.root,o,s!=="inherit"&&i["color".concat(ni(s))],m!=="default"&&m!=="medium"&&i["fontSize".concat(ni(m))]),focusable:"false",viewBox:_,color:v,"aria-hidden":x?void 0:!0,role:x?"img":void 0,ref:r},w),n,x?Y.exports.createElement("title",null,x):null)});PQ.muiName="SvgIcon";var IQ=Dn(K2e,{name:"MuiSvgIcon"})(PQ);function Ro(t,e){var r=function(i,o){return Or.createElement(IQ,vt({ref:o},i),t)};return r.muiName=IQ.muiName,Or.memo(Or.forwardRef(r))}function px(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:166,r;function n(){for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];var s=this,l=function(){t.apply(s,o)};clearTimeout(r),r=setTimeout(l,e)}return n.clear=function(){clearTimeout(r)},n}function Z2e(t,e){return function(){return null}}function L1(t,e){return Y.exports.isValidElement(t)&&e.indexOf(t.type.muiName)!==-1}function jc(t){return t&&t.ownerDocument||document}function hL(t){var e=jc(t);return e.defaultView||window}function Q2e(t){return function(){return null}}function hy(t,e){typeof t=="function"?t(e):t&&(t.current=e)}function J2e(t,e,r,n,i){return null}function Bg(t){var e=t.controlled,r=t.default;t.name,t.state;var n=Y.exports.useRef(e!==void 0),i=n.current,o=Y.exports.useState(r),a=o[0],s=o[1],l=i?e:a,u=Y.exports.useCallback(function(p){i||s(p)},[]);return[l,u]}var eCe=typeof window!="undefined"?Y.exports.useLayoutEffect:Y.exports.useEffect;function As(t){var e=Y.exports.useRef(t);return eCe(function(){e.current=t}),Y.exports.useCallback(function(){return e.current.apply(void 0,arguments)},[])}function Fo(t,e){return Y.exports.useMemo(function(){return t==null&&e==null?null:function(r){hy(t,r),hy(e,r)}},[t,e])}function pL(t){var e=Y.exports.useState(t),r=e[0],n=e[1],i=t||r;return Y.exports.useEffect(function(){r==null&&n("mui-".concat(Math.round(Math.random()*1e5)))},[r]),i}var mL=!0,N8=!1,MQ=null,tCe={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function rCe(t){var e=t.type,r=t.tagName;return!!(r==="INPUT"&&tCe[e]&&!t.readOnly||r==="TEXTAREA"&&!t.readOnly||t.isContentEditable)}function nCe(t){t.metaKey||t.altKey||t.ctrlKey||(mL=!0)}function $8(){mL=!1}function iCe(){this.visibilityState==="hidden"&&N8&&(mL=!0)}function oCe(t){t.addEventListener("keydown",nCe,!0),t.addEventListener("mousedown",$8,!0),t.addEventListener("pointerdown",$8,!0),t.addEventListener("touchstart",$8,!0),t.addEventListener("visibilitychange",iCe,!0)}function sCe(t){var e=t.target;try{return e.matches(":focus-visible")}catch{}return mL||rCe(e)}function aCe(){N8=!0,window.clearTimeout(MQ),MQ=window.setTimeout(function(){N8=!1},100)}function FP(){var t=Y.exports.useCallback(function(e){var r=Wa.exports.findDOMNode(e);r!=null&&oCe(r.ownerDocument)},[]);return{isFocusVisible:sCe,onBlurVisible:aCe,ref:t}}var lCe=Object.freeze(Object.defineProperty({__proto__:null,capitalize:ni,createChainedFunction:dy,createSvgIcon:Ro,debounce:px,deprecatedPropType:Z2e,isMuiElement:L1,ownerDocument:jc,ownerWindow:hL,requirePropFactory:Q2e,setRef:hy,unsupportedProp:J2e,useControlled:Bg,useEventCallback:As,useForkRef:Fo,unstable_useId:pL,useIsFocusVisible:FP},Symbol.toStringTag,{value:"Module"}));function cCe(t){return DZ(t)||AZ(t)||s8(t)||NZ()}var AQ={disabled:!1},gL=Or.createContext(null),zP="unmounted",D1="exited",N1="entering",G2="entered",F8="exiting",py=function(t){Eu(e,t);function e(n,i){var o;o=t.call(this,n,i)||this;var a=i,s=a&&!a.isMounting?n.enter:n.appear,l;return o.appearStatus=null,n.in?s?(l=D1,o.appearStatus=N1):l=G2:n.unmountOnExit||n.mountOnEnter?l=zP:l=D1,o.state={status:l},o.nextCallback=null,o}e.getDerivedStateFromProps=function(i,o){var a=i.in;return a&&o.status===zP?{status:D1}:null};var r=e.prototype;return r.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},r.componentDidUpdate=function(i){var o=null;if(i!==this.props){var a=this.state.status;this.props.in?a!==N1&&a!==G2&&(o=N1):(a===N1||a===G2)&&(o=F8)}this.updateStatus(!1,o)},r.componentWillUnmount=function(){this.cancelNextCallback()},r.getTimeouts=function(){var i=this.props.timeout,o,a,s;return o=a=s=i,i!=null&&typeof i!="number"&&(o=i.exit,a=i.enter,s=i.appear!==void 0?i.appear:a),{exit:o,enter:a,appear:s}},r.updateStatus=function(i,o){i===void 0&&(i=!1),o!==null?(this.cancelNextCallback(),o===N1?this.performEnter(i):this.performExit()):this.props.unmountOnExit&&this.state.status===D1&&this.setState({status:zP})},r.performEnter=function(i){var o=this,a=this.props.enter,s=this.context?this.context.isMounting:i,l=this.props.nodeRef?[s]:[M1.findDOMNode(this),s],u=l[0],p=l[1],m=this.getTimeouts(),v=s?m.appear:m.enter;if(!i&&!a||AQ.disabled){this.safeSetState({status:G2},function(){o.props.onEntered(u)});return}this.props.onEnter(u,p),this.safeSetState({status:N1},function(){o.props.onEntering(u,p),o.onTransitionEnd(v,function(){o.safeSetState({status:G2},function(){o.props.onEntered(u,p)})})})},r.performExit=function(){var i=this,o=this.props.exit,a=this.getTimeouts(),s=this.props.nodeRef?void 0:M1.findDOMNode(this);if(!o||AQ.disabled){this.safeSetState({status:D1},function(){i.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:F8},function(){i.props.onExiting(s),i.onTransitionEnd(a.exit,function(){i.safeSetState({status:D1},function(){i.props.onExited(s)})})})},r.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},r.safeSetState=function(i,o){o=this.setNextCallback(o),this.setState(i,o)},r.setNextCallback=function(i){var o=this,a=!0;return this.nextCallback=function(s){a&&(a=!1,o.nextCallback=null,i(s))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},r.onTransitionEnd=function(i,o){this.setNextCallback(o);var a=this.props.nodeRef?this.props.nodeRef.current:M1.findDOMNode(this),s=i==null&&!this.props.addEndListener;if(!a||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],u=l[0],p=l[1];this.props.addEndListener(u,p)}i!=null&&setTimeout(this.nextCallback,i)},r.render=function(){var i=this.state.status;if(i===zP)return null;var o=this.props,a=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var s=sf(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return Or.createElement(gL.Provider,{value:null},typeof a=="function"?a(i,s):Or.cloneElement(Or.Children.only(a),s))},e}(Or.Component);py.contextType=gL;py.propTypes={};function q2(){}py.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:q2,onEntering:q2,onEntered:q2,onExit:q2,onExiting:q2,onExited:q2};py.UNMOUNTED=zP;py.EXITED=D1;py.ENTERING=N1;py.ENTERED=G2;py.EXITING=F8;var BP=py;function z8(t,e){var r=function(o){return e&&Y.exports.isValidElement(o)?e(o):o},n=Object.create(null);return t&&Y.exports.Children.map(t,function(i){return i}).forEach(function(i){n[i.key]=r(i)}),n}function uCe(t,e){t=t||{},e=e||{};function r(p){return p in e?e[p]:t[p]}var n=Object.create(null),i=[];for(var o in t)o in e?i.length&&(n[o]=i,i=[]):i.push(o);var a,s={};for(var l in e){if(n[l])for(a=0;a<n[l].length;a++){var u=n[l][a];s[n[l][a]]=r(u)}s[l]=r(l)}for(a=0;a<i.length;a++)s[i[a]]=r(i[a]);return s}function $1(t,e,r){return r[e]!=null?r[e]:t.props[e]}function fCe(t,e){return z8(t.children,function(r){return Y.exports.cloneElement(r,{onExited:e.bind(null,r),in:!0,appear:$1(r,"appear",t),enter:$1(r,"enter",t),exit:$1(r,"exit",t)})})}function dCe(t,e,r){var n=z8(t.children),i=uCe(e,n);return Object.keys(i).forEach(function(o){var a=i[o];if(!!Y.exports.isValidElement(a)){var s=o in e,l=o in n,u=e[o],p=Y.exports.isValidElement(u)&&!u.props.in;l&&(!s||p)?i[o]=Y.exports.cloneElement(a,{onExited:r.bind(null,a),in:!0,exit:$1(a,"exit",t),enter:$1(a,"enter",t)}):!l&&s&&!p?i[o]=Y.exports.cloneElement(a,{in:!1}):l&&s&&Y.exports.isValidElement(u)&&(i[o]=Y.exports.cloneElement(a,{onExited:r.bind(null,a),in:u.props.in,exit:$1(a,"exit",t),enter:$1(a,"enter",t)}))}}),i}var hCe=Object.values||function(t){return Object.keys(t).map(function(e){return t[e]})},pCe={component:"div",childFactory:function(e){return e}},B8=function(t){Eu(e,t);function e(n,i){var o;o=t.call(this,n,i)||this;var a=o.handleExited.bind(lL(o));return o.state={contextValue:{isMounting:!0},handleExited:a,firstRender:!0},o}var r=e.prototype;return r.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},r.componentWillUnmount=function(){this.mounted=!1},e.getDerivedStateFromProps=function(i,o){var a=o.children,s=o.handleExited,l=o.firstRender;return{children:l?fCe(i,s):dCe(i,a,s),firstRender:!1}},r.handleExited=function(i,o){var a=z8(this.props.children);i.key in a||(i.props.onExited&&i.props.onExited(o),this.mounted&&this.setState(function(s){var l=vt({},s.children);return delete l[i.key],{children:l}}))},r.render=function(){var i=this.props,o=i.component,a=i.childFactory,s=sf(i,["component","childFactory"]),l=this.state.contextValue,u=hCe(this.state.children).map(a);return delete s.appear,delete s.enter,delete s.exit,o===null?Or.createElement(gL.Provider,{value:l},u):Or.createElement(gL.Provider,{value:l},Or.createElement(o,s,u))},e}(Or.Component);B8.propTypes={};B8.defaultProps=pCe;var mCe=B8,vL=function(e){return e.scrollTop};function jg(t,e){var r=t.timeout,n=t.style,i=n===void 0?{}:n;return{duration:i.transitionDuration||typeof r=="number"?r:r[e.mode]||0,delay:i.transitionDelay}}var gCe=function(e){return{root:{height:0,overflow:"hidden",transition:e.transitions.create("height")},entered:{height:"auto",overflow:"visible"},hidden:{visibility:"hidden"},wrapper:{display:"flex"},wrapperInner:{width:"100%"}}},RQ=Y.exports.forwardRef(function(e,r){var n=e.children,i=e.classes,o=e.className,a=e.collapsedHeight,s=e.collapsedSize,l=s===void 0?"0px":s,u=e.component,p=u===void 0?"div":u,m=e.disableStrictModeCompat,v=m===void 0?!1:m,x=e.in,y=e.onEnter,_=e.onEntered,w=e.onEntering,C=e.onExit,E=e.onExited,T=e.onExiting,A=e.style,k=e.timeout,X=k===void 0?af.standard:k,Z=e.TransitionComponent,W=Z===void 0?BP:Z,D=nn(e,["children","classes","className","collapsedHeight","collapsedSize","component","disableStrictModeCompat","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"]),H=zg(),N=Y.exports.useRef(),j=Y.exports.useRef(null),$=Y.exports.useRef(),z=typeof(a||l)=="number"?"".concat(a||l,"px"):a||l;Y.exports.useEffect(function(){return function(){clearTimeout(N.current)}},[]);var O=H.unstable_strictMode&&!v,F=Y.exports.useRef(null),G=Fo(r,O?F:void 0),q=function(xe){return function(se,me){if(xe){var pe=O?[F.current,se]:[se,me],Ce=qf(pe,2),Pe=Ce[0],Re=Ce[1];Re===void 0?xe(Pe):xe(Pe,Re)}}},ee=q(function(ye,xe){ye.style.height=z,y&&y(ye,xe)}),re=q(function(ye,xe){var se=j.current?j.current.clientHeight:0,me=jg({style:A,timeout:X},{mode:"enter"}),pe=me.duration;if(X==="auto"){var Ce=H.transitions.getAutoHeightDuration(se);ye.style.transitionDuration="".concat(Ce,"ms"),$.current=Ce}else ye.style.transitionDuration=typeof pe=="string"?pe:"".concat(pe,"ms");ye.style.height="".concat(se,"px"),w&&w(ye,xe)}),ce=q(function(ye,xe){ye.style.height="auto",_&&_(ye,xe)}),fe=q(function(ye){var xe=j.current?j.current.clientHeight:0;ye.style.height="".concat(xe,"px"),C&&C(ye)}),J=q(E),oe=q(function(ye){var xe=j.current?j.current.clientHeight:0,se=jg({style:A,timeout:X},{mode:"exit"}),me=se.duration;if(X==="auto"){var pe=H.transitions.getAutoHeightDuration(xe);ye.style.transitionDuration="".concat(pe,"ms"),$.current=pe}else ye.style.transitionDuration=typeof me=="string"?me:"".concat(me,"ms");ye.style.height=z,T&&T(ye)}),ve=function(xe,se){var me=O?xe:se;X==="auto"&&(N.current=setTimeout(me,$.current||0))};return Y.exports.createElement(W,vt({in:x,onEnter:ee,onEntered:ce,onEntering:re,onExit:fe,onExited:J,onExiting:oe,addEndListener:ve,nodeRef:O?F:void 0,timeout:X==="auto"?null:X},D),function(ye,xe){return Y.exports.createElement(p,vt({className:Lr(i.root,i.container,o,{entered:i.entered,exited:!x&&z==="0px"&&i.hidden}[ye]),style:vt({minHeight:z},A),ref:G},xe),Y.exports.createElement("div",{className:i.wrapper,ref:j},Y.exports.createElement("div",{className:i.wrapperInner},n)))})});RQ.muiSupportAuto=!0;var vCe=Dn(gCe,{name:"MuiCollapse"})(RQ),yCe=function(e){var r={};return e.shadows.forEach(function(n,i){r["elevation".concat(i)]={boxShadow:n}}),vt({root:{backgroundColor:e.palette.background.paper,color:e.palette.text.primary,transition:e.transitions.create("box-shadow")},rounded:{borderRadius:e.shape.borderRadius},outlined:{border:"1px solid ".concat(e.palette.divider)}},r)},xCe=Y.exports.forwardRef(function(e,r){var n=e.classes,i=e.className,o=e.component,a=o===void 0?"div":o,s=e.square,l=s===void 0?!1:s,u=e.elevation,p=u===void 0?1:u,m=e.variant,v=m===void 0?"elevation":m,x=nn(e,["classes","className","component","square","elevation","variant"]);return Y.exports.createElement(a,vt({className:Lr(n.root,i,v==="outlined"?n.outlined:n["elevation".concat(p)],!l&&n.rounded),ref:r},x))}),F1=Dn(yCe,{name:"MuiPaper"})(xCe),_Ce=Y.exports.createContext({}),kQ=_Ce,bCe=function(e){var r={duration:e.transitions.duration.shortest};return{root:{position:"relative",transition:e.transitions.create(["margin"],r),"&:before":{position:"absolute",left:0,top:-1,right:0,height:1,content:'""',opacity:1,backgroundColor:e.palette.divider,transition:e.transitions.create(["opacity","background-color"],r)},"&:first-child":{"&:before":{display:"none"}},"&$expanded":{margin:"16px 0","&:first-child":{marginTop:0},"&:last-child":{marginBottom:0},"&:before":{opacity:0}},"&$expanded + &":{"&:before":{display:"none"}},"&$disabled":{backgroundColor:e.palette.action.disabledBackground}},rounded:{borderRadius:0,"&:first-child":{borderTopLeftRadius:e.shape.borderRadius,borderTopRightRadius:e.shape.borderRadius},"&:last-child":{borderBottomLeftRadius:e.shape.borderRadius,borderBottomRightRadius:e.shape.borderRadius,"@supports (-ms-ime-align: auto)":{borderBottomLeftRadius:0,borderBottomRightRadius:0}}},expanded:{},disabled:{}}},wCe=Y.exports.forwardRef(function(e,r){var n=e.children,i=e.classes,o=e.className,a=e.defaultExpanded,s=a===void 0?!1:a,l=e.disabled,u=l===void 0?!1:l,p=e.expanded,m=e.onChange,v=e.square,x=v===void 0?!1:v,y=e.TransitionComponent,_=y===void 0?vCe:y,w=e.TransitionProps,C=nn(e,["children","classes","className","defaultExpanded","disabled","expanded","onChange","square","TransitionComponent","TransitionProps"]),E=Bg({controlled:p,default:s,name:"Accordion",state:"expanded"}),T=qf(E,2),A=T[0],k=T[1],X=Y.exports.useCallback(function(j){k(!A),m&&m(j,!A)},[A,m,k]),Z=Y.exports.Children.toArray(n),W=cCe(Z),D=W[0],H=W.slice(1),N=Y.exports.useMemo(function(){return{expanded:A,disabled:u,toggle:X}},[A,u,X]);return Y.exports.createElement(F1,vt({className:Lr(i.root,o,A&&i.expanded,u&&i.disabled,!x&&i.rounded),ref:r,square:x},C),Y.exports.createElement(kQ.Provider,{value:N},D),Y.exports.createElement(_,vt({in:A,timeout:"auto"},w),Y.exports.createElement("div",{"aria-labelledby":D.props.id,id:D.props["aria-controls"],role:"region"},H)))}),lAt=Dn(bCe,{name:"MuiAccordion"})(wCe),CCe=function(e){return{root:{display:"flex",padding:e.spacing(1,2,2)}}},ECe=Y.exports.forwardRef(function(e,r){var n=e.classes,i=e.className,o=nn(e,["classes","className"]);return Y.exports.createElement("div",vt({className:Lr(n.root,i),ref:r},o))}),cAt=Dn(CCe,{name:"MuiAccordionDetails"})(ECe),SCe=typeof window=="undefined"?Y.exports.useEffect:Y.exports.useLayoutEffect;function TCe(t){var e=t.classes,r=t.pulsate,n=r===void 0?!1:r,i=t.rippleX,o=t.rippleY,a=t.rippleSize,s=t.in,l=t.onExited,u=l===void 0?function(){}:l,p=t.timeout,m=Y.exports.useState(!1),v=m[0],x=m[1],y=Lr(e.ripple,e.rippleVisible,n&&e.ripplePulsate),_={width:a,height:a,top:-(a/2)+o,left:-(a/2)+i},w=Lr(e.child,v&&e.childLeaving,n&&e.childPulsate),C=As(u);return SCe(function(){if(!s){x(!0);var E=setTimeout(C,p);return function(){clearTimeout(E)}}},[C,s,p]),Y.exports.createElement("span",{className:y,style:_},Y.exports.createElement("span",{className:w}))}var j8=550,PCe=80,ICe=function(e){return{root:{overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"},ripple:{opacity:0,position:"absolute"},rippleVisible:{opacity:.3,transform:"scale(1)",animation:"$enter ".concat(j8,"ms ").concat(e.transitions.easing.easeInOut)},ripplePulsate:{animationDuration:"".concat(e.transitions.duration.shorter,"ms")},child:{opacity:1,display:"block",width:"100%",height:"100%",borderRadius:"50%",backgroundColor:"currentColor"},childLeaving:{opacity:0,animation:"$exit ".concat(j8,"ms ").concat(e.transitions.easing.easeInOut)},childPulsate:{position:"absolute",left:0,top:0,animation:"$pulsate 2500ms ".concat(e.transitions.easing.easeInOut," 200ms infinite")},"@keyframes enter":{"0%":{transform:"scale(0)",opacity:.1},"100%":{transform:"scale(1)",opacity:.3}},"@keyframes exit":{"0%":{opacity:1},"100%":{opacity:0}},"@keyframes pulsate":{"0%":{transform:"scale(1)"},"50%":{transform:"scale(0.92)"},"100%":{transform:"scale(1)"}}}},MCe=Y.exports.forwardRef(function(e,r){var n=e.center,i=n===void 0?!1:n,o=e.classes,a=e.className,s=nn(e,["center","classes","className"]),l=Y.exports.useState([]),u=l[0],p=l[1],m=Y.exports.useRef(0),v=Y.exports.useRef(null);Y.exports.useEffect(function(){v.current&&(v.current(),v.current=null)},[u]);var x=Y.exports.useRef(!1),y=Y.exports.useRef(null),_=Y.exports.useRef(null),w=Y.exports.useRef(null);Y.exports.useEffect(function(){return function(){clearTimeout(y.current)}},[]);var C=Y.exports.useCallback(function(k){var X=k.pulsate,Z=k.rippleX,W=k.rippleY,D=k.rippleSize,H=k.cb;p(function(N){return[].concat(uy(N),[Y.exports.createElement(TCe,{key:m.current,classes:o,timeout:j8,pulsate:X,rippleX:Z,rippleY:W,rippleSize:D})])}),m.current+=1,v.current=H},[o]),E=Y.exports.useCallback(function(){var k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},X=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Z=arguments.length>2?arguments[2]:void 0,W=X.pulsate,D=W===void 0?!1:W,H=X.center,N=H===void 0?i||X.pulsate:H,j=X.fakeElement,$=j===void 0?!1:j;if(k.type==="mousedown"&&x.current){x.current=!1;return}k.type==="touchstart"&&(x.current=!0);var z=$?null:w.current,O=z?z.getBoundingClientRect():{width:0,height:0,left:0,top:0},F,G,q;if(N||k.clientX===0&&k.clientY===0||!k.clientX&&!k.touches)F=Math.round(O.width/2),G=Math.round(O.height/2);else{var ee=k.touches?k.touches[0]:k,re=ee.clientX,ce=ee.clientY;F=Math.round(re-O.left),G=Math.round(ce-O.top)}if(N)q=Math.sqrt((2*Math.pow(O.width,2)+Math.pow(O.height,2))/3),q%2==0&&(q+=1);else{var fe=Math.max(Math.abs((z?z.clientWidth:0)-F),F)*2+2,J=Math.max(Math.abs((z?z.clientHeight:0)-G),G)*2+2;q=Math.sqrt(Math.pow(fe,2)+Math.pow(J,2))}k.touches?_.current===null&&(_.current=function(){C({pulsate:D,rippleX:F,rippleY:G,rippleSize:q,cb:Z})},y.current=setTimeout(function(){_.current&&(_.current(),_.current=null)},PCe)):C({pulsate:D,rippleX:F,rippleY:G,rippleSize:q,cb:Z})},[i,C]),T=Y.exports.useCallback(function(){E({},{pulsate:!0})},[E]),A=Y.exports.useCallback(function(k,X){if(clearTimeout(y.current),k.type==="touchend"&&_.current){k.persist(),_.current(),_.current=null,y.current=setTimeout(function(){A(k,X)});return}_.current=null,p(function(Z){return Z.length>0?Z.slice(1):Z}),v.current=X},[]);return Y.exports.useImperativeHandle(r,function(){return{pulsate:T,start:E,stop:A}},[T,E,A]),Y.exports.createElement("span",vt({className:Lr(o.root,a),ref:w},s),Y.exports.createElement(mCe,{component:null,exit:!0},u))}),ACe=Dn(ICe,{flip:!1,name:"MuiTouchRipple"})(Y.exports.memo(MCe)),RCe={root:{display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle","-moz-appearance":"none","-webkit-appearance":"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},"&$disabled":{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}},disabled:{},focusVisible:{}},kCe=Y.exports.forwardRef(function(e,r){var n=e.action,i=e.buttonRef,o=e.centerRipple,a=o===void 0?!1:o,s=e.children,l=e.classes,u=e.className,p=e.component,m=p===void 0?"button":p,v=e.disabled,x=v===void 0?!1:v,y=e.disableRipple,_=y===void 0?!1:y,w=e.disableTouchRipple,C=w===void 0?!1:w,E=e.focusRipple,T=E===void 0?!1:E,A=e.focusVisibleClassName,k=e.onBlur,X=e.onClick,Z=e.onFocus,W=e.onFocusVisible,D=e.onKeyDown,H=e.onKeyUp,N=e.onMouseDown,j=e.onMouseLeave,$=e.onMouseUp,z=e.onTouchEnd,O=e.onTouchMove,F=e.onTouchStart,G=e.onDragLeave,q=e.tabIndex,ee=q===void 0?0:q,re=e.TouchRippleProps,ce=e.type,fe=ce===void 0?"button":ce,J=nn(e,["action","buttonRef","centerRipple","children","classes","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","onBlur","onClick","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","onDragLeave","tabIndex","TouchRippleProps","type"]),oe=Y.exports.useRef(null);function ve(){return Wa.exports.findDOMNode(oe.current)}var ye=Y.exports.useRef(null),xe=Y.exports.useState(!1),se=xe[0],me=xe[1];x&&se&&me(!1);var pe=FP(),Ce=pe.isFocusVisible,Pe=pe.onBlurVisible,Re=pe.ref;Y.exports.useImperativeHandle(n,function(){return{focusVisible:function(){me(!0),oe.current.focus()}}},[]),Y.exports.useEffect(function(){se&&T&&!_&&ye.current.pulsate()},[_,T,se]);function ke(Dt,Jr){var We=arguments.length>2&&arguments[2]!==void 0?arguments[2]:C;return As(function(Oe){Jr&&Jr(Oe);var $e=We;return!$e&&ye.current&&ye.current[Dt](Oe),!0})}var ze=ke("start",N),Ge=ke("stop",G),ht=ke("stop",$),Tt=ke("stop",function(Dt){se&&Dt.preventDefault(),j&&j(Dt)}),xt=ke("start",F),pt=ke("stop",z),It=ke("stop",O),Ie=ke("stop",function(Dt){se&&(Pe(Dt),me(!1)),k&&k(Dt)},!1),de=As(function(Dt){oe.current||(oe.current=Dt.currentTarget),Ce(Dt)&&(me(!0),W&&W(Dt)),Z&&Z(Dt)}),Te=function(){var Jr=ve();return m&&m!=="button"&&!(Jr.tagName==="A"&&Jr.href)},Be=Y.exports.useRef(!1),Ke=As(function(Dt){T&&!Be.current&&se&&ye.current&&Dt.key===" "&&(Be.current=!0,Dt.persist(),ye.current.stop(Dt,function(){ye.current.start(Dt)})),Dt.target===Dt.currentTarget&&Te()&&Dt.key===" "&&Dt.preventDefault(),D&&D(Dt),Dt.target===Dt.currentTarget&&Te()&&Dt.key==="Enter"&&!x&&(Dt.preventDefault(),X&&X(Dt))}),ot=As(function(Dt){T&&Dt.key===" "&&ye.current&&se&&!Dt.defaultPrevented&&(Be.current=!1,Dt.persist(),ye.current.stop(Dt,function(){ye.current.pulsate(Dt)})),H&&H(Dt),X&&Dt.target===Dt.currentTarget&&Te()&&Dt.key===" "&&!Dt.defaultPrevented&&X(Dt)}),Ze=m;Ze==="button"&&J.href&&(Ze="a");var Je={};Ze==="button"?(Je.type=fe,Je.disabled=x):((Ze!=="a"||!J.href)&&(Je.role="button"),Je["aria-disabled"]=x);var St=Fo(i,r),er=Fo(Re,oe),Ft=Fo(St,er),Ut=Y.exports.useState(!1),Er=Ut[0],kr=Ut[1];Y.exports.useEffect(function(){kr(!0)},[]);var mr=Er&&!_&&!x;return Y.exports.createElement(Ze,vt({className:Lr(l.root,u,se&&[l.focusVisible,A],x&&l.disabled),onBlur:Ie,onClick:X,onFocus:de,onKeyDown:Ke,onKeyUp:ot,onMouseDown:ze,onMouseLeave:Tt,onMouseUp:ht,onDragLeave:Ge,onTouchEnd:pt,onTouchMove:It,onTouchStart:xt,ref:Ft,tabIndex:x?-1:ee},Je,J),s,mr?Y.exports.createElement(ACe,vt({ref:ye,center:a},re)):null)}),my=Dn(RCe,{name:"MuiButtonBase"})(kCe),OCe=function(e){return{root:{textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:12,borderRadius:"50%",overflow:"visible",color:e.palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{backgroundColor:wo(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"&$disabled":{backgroundColor:"transparent",color:e.palette.action.disabled}},edgeStart:{marginLeft:-12,"$sizeSmall&":{marginLeft:-3}},edgeEnd:{marginRight:-12,"$sizeSmall&":{marginRight:-3}},colorInherit:{color:"inherit"},colorPrimary:{color:e.palette.primary.main,"&:hover":{backgroundColor:wo(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},colorSecondary:{color:e.palette.secondary.main,"&:hover":{backgroundColor:wo(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},disabled:{},sizeSmall:{padding:3,fontSize:e.typography.pxToRem(18)},label:{width:"100%",display:"flex",alignItems:"inherit",justifyContent:"inherit"}}},LCe=Y.exports.forwardRef(function(e,r){var n=e.edge,i=n===void 0?!1:n,o=e.children,a=e.classes,s=e.className,l=e.color,u=l===void 0?"default":l,p=e.disabled,m=p===void 0?!1:p,v=e.disableFocusRipple,x=v===void 0?!1:v,y=e.size,_=y===void 0?"medium":y,w=nn(e,["edge","children","classes","className","color","disabled","disableFocusRipple","size"]);return Y.exports.createElement(my,vt({className:Lr(a.root,s,u!=="default"&&a["color".concat(ni(u))],m&&a.disabled,_==="small"&&a["size".concat(ni(_))],{start:a.edgeStart,end:a.edgeEnd}[i]),centerRipple:!0,focusRipple:!x,disabled:m,ref:r},w),Y.exports.createElement("span",{className:a.label},o))}),jP=Dn(OCe,{name:"MuiIconButton"})(LCe),DCe=function(e){var r={duration:e.transitions.duration.shortest};return{root:{display:"flex",minHeight:8*6,transition:e.transitions.create(["min-height","background-color"],r),padding:e.spacing(0,2),"&:hover:not($disabled)":{cursor:"pointer"},"&$expanded":{minHeight:64},"&$focused, &$focusVisible":{backgroundColor:e.palette.action.focus},"&$disabled":{opacity:e.palette.action.disabledOpacity}},expanded:{},focused:{},focusVisible:{},disabled:{},content:{display:"flex",flexGrow:1,transition:e.transitions.create(["margin"],r),margin:"12px 0","&$expanded":{margin:"20px 0"}},expandIcon:{transform:"rotate(0deg)",transition:e.transitions.create("transform",r),"&:hover":{backgroundColor:"transparent"},"&$expanded":{transform:"rotate(180deg)"}}}},NCe=Y.exports.forwardRef(function(e,r){var n=e.children,i=e.classes,o=e.className,a=e.expandIcon,s=e.focusVisibleClassName,l=e.IconButtonProps,u=l===void 0?{}:l,p=e.onClick,m=nn(e,["children","classes","className","expandIcon","focusVisibleClassName","IconButtonProps","onClick"]),v=Y.exports.useContext(kQ),x=v.disabled,y=x===void 0?!1:x,_=v.expanded,w=v.toggle,C=function(T){w&&w(T),p&&p(T)};return Y.exports.createElement(my,vt({focusRipple:!1,disableRipple:!0,disabled:y,component:"div","aria-expanded":_,className:Lr(i.root,o,y&&i.disabled,_&&i.expanded),focusVisibleClassName:Lr(i.focusVisible,i.focused,s),onClick:C,ref:r},m),Y.exports.createElement("div",{className:Lr(i.content,_&&i.expanded)},n),a&&Y.exports.createElement(jP,vt({className:Lr(i.expandIcon,_&&i.expanded),edge:"end",component:"div",tabIndex:null,role:null,"aria-hidden":!0},u),a))}),uAt=Dn(DCe,{name:"MuiAccordionSummary"})(NCe),$Ce=function(e){var r=e.palette.type==="light"?e.palette.grey[100]:e.palette.grey[900];return{root:{display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box",zIndex:e.zIndex.appBar,flexShrink:0},positionFixed:{position:"fixed",top:0,left:"auto",right:0,"@media print":{position:"absolute"}},positionAbsolute:{position:"absolute",top:0,left:"auto",right:0},positionSticky:{position:"sticky",top:0,left:"auto",right:0},positionStatic:{position:"static"},positionRelative:{position:"relative"},colorDefault:{backgroundColor:r,color:e.palette.getContrastText(r)},colorPrimary:{backgroundColor:e.palette.primary.main,color:e.palette.primary.contrastText},colorSecondary:{backgroundColor:e.palette.secondary.main,color:e.palette.secondary.contrastText},colorInherit:{color:"inherit"},colorTransparent:{backgroundColor:"transparent",color:"inherit"}}},FCe=Y.exports.forwardRef(function(e,r){var n=e.classes,i=e.className,o=e.color,a=o===void 0?"primary":o,s=e.position,l=s===void 0?"fixed":s,u=nn(e,["classes","className","color","position"]);return Y.exports.createElement(F1,vt({square:!0,component:"header",elevation:4,className:Lr(n.root,n["position".concat(ni(l))],n["color".concat(ni(a))],i,l==="fixed"&&"mui-fixed"),ref:r},u))}),fAt=Dn($Ce,{name:"MuiAppBar"})(FCe),zCe={entering:{opacity:1},entered:{opacity:1}},BCe={enter:af.enteringScreen,exit:af.leavingScreen},jCe=Y.exports.forwardRef(function(e,r){var n=e.children,i=e.disableStrictModeCompat,o=i===void 0?!1:i,a=e.in,s=e.onEnter,l=e.onEntered,u=e.onEntering,p=e.onExit,m=e.onExited,v=e.onExiting,x=e.style,y=e.TransitionComponent,_=y===void 0?BP:y,w=e.timeout,C=w===void 0?BCe:w,E=nn(e,["children","disableStrictModeCompat","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","TransitionComponent","timeout"]),T=zg(),A=T.unstable_strictMode&&!o,k=Y.exports.useRef(null),X=Fo(n.ref,r),Z=Fo(A?k:void 0,X),W=function(F){return function(G,q){if(F){var ee=A?[k.current,G]:[G,q],re=qf(ee,2),ce=re[0],fe=re[1];fe===void 0?F(ce):F(ce,fe)}}},D=W(u),H=W(function(O,F){vL(O);var G=jg({style:x,timeout:C},{mode:"enter"});O.style.webkitTransition=T.transitions.create("opacity",G),O.style.transition=T.transitions.create("opacity",G),s&&s(O,F)}),N=W(l),j=W(v),$=W(function(O){var F=jg({style:x,timeout:C},{mode:"exit"});O.style.webkitTransition=T.transitions.create("opacity",F),O.style.transition=T.transitions.create("opacity",F),p&&p(O)}),z=W(m);return Y.exports.createElement(_,vt({appear:!0,in:a,nodeRef:A?k:void 0,onEnter:H,onEntered:N,onEntering:D,onExit:$,onExited:z,onExiting:j,timeout:C},E),function(O,F){return Y.exports.cloneElement(n,vt({style:vt({opacity:0,visibility:O==="exited"&&!a?"hidden":void 0},zCe[O],x,n.props.style),ref:Z},F))})}),OQ=jCe,UCe={root:{zIndex:-1,position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},invisible:{backgroundColor:"transparent"}},VCe=Y.exports.forwardRef(function(e,r){var n=e.children,i=e.classes,o=e.className,a=e.invisible,s=a===void 0?!1:a,l=e.open,u=e.transitionDuration,p=e.TransitionComponent,m=p===void 0?OQ:p,v=nn(e,["children","classes","className","invisible","open","transitionDuration","TransitionComponent"]);return Y.exports.createElement(m,vt({in:l,timeout:u},v),Y.exports.createElement("div",{className:Lr(i.root,o,s&&i.invisible),"aria-hidden":!0,ref:r},n))}),HCe=Dn(UCe,{name:"MuiBackdrop"})(VCe),WCe=E1e(fy(C1e,R1e,G1e,sbe,vbe,ube,xbe,Ibe,a8,Hbe)),GCe=Y2e("div")(WCe,{name:"MuiBox"}),dAt=GCe,qCe=function(e){return{root:{margin:0},body2:e.typography.body2,body1:e.typography.body1,caption:e.typography.caption,button:e.typography.button,h1:e.typography.h1,h2:e.typography.h2,h3:e.typography.h3,h4:e.typography.h4,h5:e.typography.h5,h6:e.typography.h6,subtitle1:e.typography.subtitle1,subtitle2:e.typography.subtitle2,overline:e.typography.overline,srOnly:{position:"absolute",height:1,width:1,overflow:"hidden"},alignLeft:{textAlign:"left"},alignCenter:{textAlign:"center"},alignRight:{textAlign:"right"},alignJustify:{textAlign:"justify"},noWrap:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},gutterBottom:{marginBottom:"0.35em"},paragraph:{marginBottom:16},colorInherit:{color:"inherit"},colorPrimary:{color:e.palette.primary.main},colorSecondary:{color:e.palette.secondary.main},colorTextPrimary:{color:e.palette.text.primary},colorTextSecondary:{color:e.palette.text.secondary},colorError:{color:e.palette.error.main},displayInline:{display:"inline"},displayBlock:{display:"block"}}},LQ={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p"},XCe=Y.exports.forwardRef(function(e,r){var n=e.align,i=n===void 0?"inherit":n,o=e.classes,a=e.className,s=e.color,l=s===void 0?"initial":s,u=e.component,p=e.display,m=p===void 0?"initial":p,v=e.gutterBottom,x=v===void 0?!1:v,y=e.noWrap,_=y===void 0?!1:y,w=e.paragraph,C=w===void 0?!1:w,E=e.variant,T=E===void 0?"body1":E,A=e.variantMapping,k=A===void 0?LQ:A,X=nn(e,["align","classes","className","color","component","display","gutterBottom","noWrap","paragraph","variant","variantMapping"]),Z=u||(C?"p":k[T]||LQ[T])||"span";return Y.exports.createElement(Z,vt({className:Lr(o.root,a,T!=="inherit"&&o[T],l!=="initial"&&o["color".concat(ni(l))],_&&o.noWrap,x&&o.gutterBottom,C&&o.paragraph,i!=="inherit"&&o["align".concat(ni(i))],m!=="initial"&&o["display".concat(ni(m))]),ref:r},X))}),U8=Dn(qCe,{name:"MuiTypography"})(XCe),YCe=function(e){return{root:vt({},e.typography.button,{boxSizing:"border-box",minWidth:64,padding:"6px 16px",borderRadius:e.shape.borderRadius,color:e.palette.text.primary,transition:e.transitions.create(["background-color","box-shadow","border"],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:"none",backgroundColor:wo(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"},"&$disabled":{backgroundColor:"transparent"}},"&$disabled":{color:e.palette.action.disabled}}),label:{width:"100%",display:"inherit",alignItems:"inherit",justifyContent:"inherit"},text:{padding:"6px 8px"},textPrimary:{color:e.palette.primary.main,"&:hover":{backgroundColor:wo(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},textSecondary:{color:e.palette.secondary.main,"&:hover":{backgroundColor:wo(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},outlined:{padding:"5px 15px",border:"1px solid ".concat(e.palette.type==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"),"&$disabled":{border:"1px solid ".concat(e.palette.action.disabledBackground)}},outlinedPrimary:{color:e.palette.primary.main,border:"1px solid ".concat(wo(e.palette.primary.main,.5)),"&:hover":{border:"1px solid ".concat(e.palette.primary.main),backgroundColor:wo(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},outlinedSecondary:{color:e.palette.secondary.main,border:"1px solid ".concat(wo(e.palette.secondary.main,.5)),"&:hover":{border:"1px solid ".concat(e.palette.secondary.main),backgroundColor:wo(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"&$disabled":{border:"1px solid ".concat(e.palette.action.disabled)}},contained:{color:e.palette.getContrastText(e.palette.grey[300]),backgroundColor:e.palette.grey[300],boxShadow:e.shadows[2],"&:hover":{backgroundColor:e.palette.grey.A100,boxShadow:e.shadows[4],"@media (hover: none)":{boxShadow:e.shadows[2],backgroundColor:e.palette.grey[300]},"&$disabled":{backgroundColor:e.palette.action.disabledBackground}},"&$focusVisible":{boxShadow:e.shadows[6]},"&:active":{boxShadow:e.shadows[8]},"&$disabled":{color:e.palette.action.disabled,boxShadow:e.shadows[0],backgroundColor:e.palette.action.disabledBackground}},containedPrimary:{color:e.palette.primary.contrastText,backgroundColor:e.palette.primary.main,"&:hover":{backgroundColor:e.palette.primary.dark,"@media (hover: none)":{backgroundColor:e.palette.primary.main}}},containedSecondary:{color:e.palette.secondary.contrastText,backgroundColor:e.palette.secondary.main,"&:hover":{backgroundColor:e.palette.secondary.dark,"@media (hover: none)":{backgroundColor:e.palette.secondary.main}}},disableElevation:{boxShadow:"none","&:hover":{boxShadow:"none"},"&$focusVisible":{boxShadow:"none"},"&:active":{boxShadow:"none"},"&$disabled":{boxShadow:"none"}},focusVisible:{},disabled:{},colorInherit:{color:"inherit",borderColor:"currentColor"},textSizeSmall:{padding:"4px 5px",fontSize:e.typography.pxToRem(13)},textSizeLarge:{padding:"8px 11px",fontSize:e.typography.pxToRem(15)},outlinedSizeSmall:{padding:"3px 9px",fontSize:e.typography.pxToRem(13)},outlinedSizeLarge:{padding:"7px 21px",fontSize:e.typography.pxToRem(15)},containedSizeSmall:{padding:"4px 10px",fontSize:e.typography.pxToRem(13)},containedSizeLarge:{padding:"8px 22px",fontSize:e.typography.pxToRem(15)},sizeSmall:{},sizeLarge:{},fullWidth:{width:"100%"},startIcon:{display:"inherit",marginRight:8,marginLeft:-4,"&$iconSizeSmall":{marginLeft:-2}},endIcon:{display:"inherit",marginRight:-4,marginLeft:8,"&$iconSizeSmall":{marginRight:-2}},iconSizeSmall:{"& > *:first-child":{fontSize:18}},iconSizeMedium:{"& > *:first-child":{fontSize:20}},iconSizeLarge:{"& > *:first-child":{fontSize:22}}}},KCe=Y.exports.forwardRef(function(e,r){var n=e.children,i=e.classes,o=e.className,a=e.color,s=a===void 0?"default":a,l=e.component,u=l===void 0?"button":l,p=e.disabled,m=p===void 0?!1:p,v=e.disableElevation,x=v===void 0?!1:v,y=e.disableFocusRipple,_=y===void 0?!1:y,w=e.endIcon,C=e.focusVisibleClassName,E=e.fullWidth,T=E===void 0?!1:E,A=e.size,k=A===void 0?"medium":A,X=e.startIcon,Z=e.type,W=Z===void 0?"button":Z,D=e.variant,H=D===void 0?"text":D,N=nn(e,["children","classes","className","color","component","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"]),j=X&&Y.exports.createElement("span",{className:Lr(i.startIcon,i["iconSize".concat(ni(k))])},X),$=w&&Y.exports.createElement("span",{className:Lr(i.endIcon,i["iconSize".concat(ni(k))])},w);return Y.exports.createElement(my,vt({className:Lr(i.root,i[H],o,s==="inherit"?i.colorInherit:s!=="default"&&i["".concat(H).concat(ni(s))],k!=="medium"&&[i["".concat(H,"Size").concat(ni(k))],i["size".concat(ni(k))]],x&&i.disableElevation,m&&i.disabled,T&&i.fullWidth),component:u,disabled:m,focusRipple:!_,focusVisibleClassName:Lr(i.focusVisible,C),ref:r,type:W},N),Y.exports.createElement("span",{className:i.label},j,n,$))}),ZCe=Dn(YCe,{name:"MuiButton"})(KCe);ZCe.styles;var QCe=function(e){return{root:{display:"inline-flex",borderRadius:e.shape.borderRadius},contained:{boxShadow:e.shadows[2]},disableElevation:{boxShadow:"none"},disabled:{},fullWidth:{width:"100%"},vertical:{flexDirection:"column"},grouped:{minWidth:40},groupedHorizontal:{"&:not(:first-child)":{borderTopLeftRadius:0,borderBottomLeftRadius:0},"&:not(:last-child)":{borderTopRightRadius:0,borderBottomRightRadius:0}},groupedVertical:{"&:not(:first-child)":{borderTopRightRadius:0,borderTopLeftRadius:0},"&:not(:last-child)":{borderBottomRightRadius:0,borderBottomLeftRadius:0}},groupedText:{},groupedTextHorizontal:{"&:not(:last-child)":{borderRight:"1px solid ".concat(e.palette.type==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)")}},groupedTextVertical:{"&:not(:last-child)":{borderBottom:"1px solid ".concat(e.palette.type==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)")}},groupedTextPrimary:{"&:not(:last-child)":{borderColor:wo(e.palette.primary.main,.5)}},groupedTextSecondary:{"&:not(:last-child)":{borderColor:wo(e.palette.secondary.main,.5)}},groupedOutlined:{},groupedOutlinedHorizontal:{"&:not(:first-child)":{marginLeft:-1},"&:not(:last-child)":{borderRightColor:"transparent"}},groupedOutlinedVertical:{"&:not(:first-child)":{marginTop:-1},"&:not(:last-child)":{borderBottomColor:"transparent"}},groupedOutlinedPrimary:{"&:hover":{borderColor:e.palette.primary.main}},groupedOutlinedSecondary:{"&:hover":{borderColor:e.palette.secondary.main}},groupedContained:{boxShadow:"none"},groupedContainedHorizontal:{"&:not(:last-child)":{borderRight:"1px solid ".concat(e.palette.grey[400]),"&$disabled":{borderRight:"1px solid ".concat(e.palette.action.disabled)}}},groupedContainedVertical:{"&:not(:last-child)":{borderBottom:"1px solid ".concat(e.palette.grey[400]),"&$disabled":{borderBottom:"1px solid ".concat(e.palette.action.disabled)}}},groupedContainedPrimary:{"&:not(:last-child)":{borderColor:e.palette.primary.dark}},groupedContainedSecondary:{"&:not(:last-child)":{borderColor:e.palette.secondary.dark}}}},JCe=Y.exports.forwardRef(function(e,r){var n=e.children,i=e.classes,o=e.className,a=e.color,s=a===void 0?"default":a,l=e.component,u=l===void 0?"div":l,p=e.disabled,m=p===void 0?!1:p,v=e.disableElevation,x=v===void 0?!1:v,y=e.disableFocusRipple,_=y===void 0?!1:y,w=e.disableRipple,C=w===void 0?!1:w,E=e.fullWidth,T=E===void 0?!1:E,A=e.orientation,k=A===void 0?"horizontal":A,X=e.size,Z=X===void 0?"medium":X,W=e.variant,D=W===void 0?"outlined":W,H=nn(e,["children","classes","className","color","component","disabled","disableElevation","disableFocusRipple","disableRipple","fullWidth","orientation","size","variant"]),N=Lr(i.grouped,i["grouped".concat(ni(k))],i["grouped".concat(ni(D))],i["grouped".concat(ni(D)).concat(ni(k))],i["grouped".concat(ni(D)).concat(s!=="default"?ni(s):"")],m&&i.disabled);return Y.exports.createElement(u,vt({role:"group",className:Lr(i.root,o,T&&i.fullWidth,x&&i.disableElevation,D==="contained"&&i.contained,k==="vertical"&&i.vertical),ref:r},H),Y.exports.Children.map(n,function(j){return Y.exports.isValidElement(j)?Y.exports.cloneElement(j,{className:Lr(N,j.props.className),color:j.props.color||s,disabled:j.props.disabled||m,disableElevation:j.props.disableElevation||x,disableFocusRipple:_,disableRipple:C,fullWidth:T,size:j.props.size||Z,variant:j.props.variant||D}):null}))}),hAt=Dn(QCe,{name:"MuiButtonGroup"})(JCe),DQ=Y.exports.createContext();function eEe(){return Y.exports.useContext(DQ)}var V8=DQ;function z1(){return Y.exports.useContext(V8)}var tEe={root:{padding:9},checked:{},disabled:{},input:{cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}},rEe=Y.exports.forwardRef(function(e,r){var n=e.autoFocus,i=e.checked,o=e.checkedIcon,a=e.classes,s=e.className,l=e.defaultChecked,u=e.disabled,p=e.icon,m=e.id,v=e.inputProps,x=e.inputRef,y=e.name,_=e.onBlur,w=e.onChange,C=e.onFocus,E=e.readOnly,T=e.required,A=e.tabIndex,k=e.type,X=e.value,Z=nn(e,["autoFocus","checked","checkedIcon","classes","className","defaultChecked","disabled","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"]),W=Bg({controlled:i,default:Boolean(l),name:"SwitchBase",state:"checked"}),D=qf(W,2),H=D[0],N=D[1],j=z1(),$=function(ee){C&&C(ee),j&&j.onFocus&&j.onFocus(ee)},z=function(ee){_&&_(ee),j&&j.onBlur&&j.onBlur(ee)},O=function(ee){var re=ee.target.checked;N(re),w&&w(ee,re)},F=u;j&&typeof F=="undefined"&&(F=j.disabled);var G=k==="checkbox"||k==="radio";return Y.exports.createElement(jP,vt({component:"span",className:Lr(a.root,s,H&&a.checked,F&&a.disabled),disabled:F,tabIndex:null,role:void 0,onFocus:$,onBlur:z,ref:r},Z),Y.exports.createElement("input",vt({autoFocus:n,checked:i,defaultChecked:l,className:a.input,disabled:F,id:G&&m,name:y,onChange:O,readOnly:E,ref:x,required:T,tabIndex:A,type:k,value:X},v)),H?o:p)}),H8=Dn(tEe,{name:"PrivateSwitchBase"})(rEe),nEe=Ro(Y.exports.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"})),iEe=Ro(Y.exports.createElement("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"})),oEe=Ro(Y.exports.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-2 10H7v-2h10v2z"})),sEe=function(e){return{root:{color:e.palette.text.secondary},checked:{},disabled:{},indeterminate:{},colorPrimary:{"&$checked":{color:e.palette.primary.main,"&:hover":{backgroundColor:wo(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:e.palette.action.disabled}},colorSecondary:{"&$checked":{color:e.palette.secondary.main,"&:hover":{backgroundColor:wo(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:e.palette.action.disabled}}}},aEe=Y.exports.createElement(iEe,null),lEe=Y.exports.createElement(nEe,null),cEe=Y.exports.createElement(oEe,null),uEe=Y.exports.forwardRef(function(e,r){var n=e.checkedIcon,i=n===void 0?aEe:n,o=e.classes,a=e.color,s=a===void 0?"secondary":a,l=e.icon,u=l===void 0?lEe:l,p=e.indeterminate,m=p===void 0?!1:p,v=e.indeterminateIcon,x=v===void 0?cEe:v,y=e.inputProps,_=e.size,w=_===void 0?"medium":_,C=nn(e,["checkedIcon","classes","color","icon","indeterminate","indeterminateIcon","inputProps","size"]),E=m?x:u,T=m?x:i;return Y.exports.createElement(H8,vt({type:"checkbox",classes:{root:Lr(o.root,o["color".concat(ni(s))],m&&o.indeterminate),checked:o.checked,disabled:o.disabled},color:s,inputProps:vt({"data-indeterminate":m},y),icon:Y.exports.cloneElement(E,{fontSize:E.props.fontSize===void 0&&w==="small"?w:E.props.fontSize}),checkedIcon:Y.exports.cloneElement(T,{fontSize:T.props.fontSize===void 0&&w==="small"?w:T.props.fontSize}),ref:r},C))}),pAt=Dn(sEe,{name:"MuiCheckbox"})(uEe),fEe=Ro(Y.exports.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"})),dEe=function(e){var r=e.palette.type==="light"?e.palette.grey[300]:e.palette.grey[700],n=wo(e.palette.text.primary,.26);return{root:{fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,color:e.palette.getContrastText(r),backgroundColor:r,borderRadius:32/2,whiteSpace:"nowrap",transition:e.transitions.create(["background-color","box-shadow"]),cursor:"default",outline:0,textDecoration:"none",border:"none",padding:0,verticalAlign:"middle",boxSizing:"border-box","&$disabled":{opacity:.5,pointerEvents:"none"},"& $avatar":{marginLeft:5,marginRight:-6,width:24,height:24,color:e.palette.type==="light"?e.palette.grey[700]:e.palette.grey[300],fontSize:e.typography.pxToRem(12)},"& $avatarColorPrimary":{color:e.palette.primary.contrastText,backgroundColor:e.palette.primary.dark},"& $avatarColorSecondary":{color:e.palette.secondary.contrastText,backgroundColor:e.palette.secondary.dark},"& $avatarSmall":{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:e.typography.pxToRem(10)}},sizeSmall:{height:24},colorPrimary:{backgroundColor:e.palette.primary.main,color:e.palette.primary.contrastText},colorSecondary:{backgroundColor:e.palette.secondary.main,color:e.palette.secondary.contrastText},disabled:{},clickable:{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover, &:focus":{backgroundColor:lx(r,.08)},"&:active":{boxShadow:e.shadows[1]}},clickableColorPrimary:{"&:hover, &:focus":{backgroundColor:lx(e.palette.primary.main,.08)}},clickableColorSecondary:{"&:hover, &:focus":{backgroundColor:lx(e.palette.secondary.main,.08)}},deletable:{"&:focus":{backgroundColor:lx(r,.08)}},deletableColorPrimary:{"&:focus":{backgroundColor:lx(e.palette.primary.main,.2)}},deletableColorSecondary:{"&:focus":{backgroundColor:lx(e.palette.secondary.main,.2)}},outlined:{backgroundColor:"transparent",border:"1px solid ".concat(e.palette.type==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"),"$clickable&:hover, $clickable&:focus, $deletable&:focus":{backgroundColor:wo(e.palette.text.primary,e.palette.action.hoverOpacity)},"& $avatar":{marginLeft:4},"& $avatarSmall":{marginLeft:2},"& $icon":{marginLeft:4},"& $iconSmall":{marginLeft:2},"& $deleteIcon":{marginRight:5},"& $deleteIconSmall":{marginRight:3}},outlinedPrimary:{color:e.palette.primary.main,border:"1px solid ".concat(e.palette.primary.main),"$clickable&:hover, $clickable&:focus, $deletable&:focus":{backgroundColor:wo(e.palette.primary.main,e.palette.action.hoverOpacity)}},outlinedSecondary:{color:e.palette.secondary.main,border:"1px solid ".concat(e.palette.secondary.main),"$clickable&:hover, $clickable&:focus, $deletable&:focus":{backgroundColor:wo(e.palette.secondary.main,e.palette.action.hoverOpacity)}},avatar:{},avatarSmall:{},avatarColorPrimary:{},avatarColorSecondary:{},icon:{color:e.palette.type==="light"?e.palette.grey[700]:e.palette.grey[300],marginLeft:5,marginRight:-6},iconSmall:{width:18,height:18,marginLeft:4,marginRight:-4},iconColorPrimary:{color:"inherit"},iconColorSecondary:{color:"inherit"},label:{overflow:"hidden",textOverflow:"ellipsis",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap"},labelSmall:{paddingLeft:8,paddingRight:8},deleteIcon:{WebkitTapHighlightColor:"transparent",color:n,height:22,width:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:wo(n,.4)}},deleteIconSmall:{height:16,width:16,marginRight:4,marginLeft:-4},deleteIconColorPrimary:{color:wo(e.palette.primary.contrastText,.7),"&:hover, &:active":{color:e.palette.primary.contrastText}},deleteIconColorSecondary:{color:wo(e.palette.secondary.contrastText,.7),"&:hover, &:active":{color:e.palette.secondary.contrastText}},deleteIconOutlinedColorPrimary:{color:wo(e.palette.primary.main,.7),"&:hover, &:active":{color:e.palette.primary.main}},deleteIconOutlinedColorSecondary:{color:wo(e.palette.secondary.main,.7),"&:hover, &:active":{color:e.palette.secondary.main}}}};function NQ(t){return t.key==="Backspace"||t.key==="Delete"}var hEe=Y.exports.forwardRef(function(e,r){var n=e.avatar,i=e.classes,o=e.className,a=e.clickable,s=e.color,l=s===void 0?"default":s,u=e.component,p=e.deleteIcon,m=e.disabled,v=m===void 0?!1:m,x=e.icon,y=e.label,_=e.onClick,w=e.onDelete,C=e.onKeyDown,E=e.onKeyUp,T=e.size,A=T===void 0?"medium":T,k=e.variant,X=k===void 0?"default":k,Z=nn(e,["avatar","classes","className","clickable","color","component","deleteIcon","disabled","icon","label","onClick","onDelete","onKeyDown","onKeyUp","size","variant"]),W=Y.exports.useRef(null),D=Fo(W,r),H=function(fe){fe.stopPropagation(),w&&w(fe)},N=function(fe){fe.currentTarget===fe.target&&NQ(fe)&&fe.preventDefault(),C&&C(fe)},j=function(fe){fe.currentTarget===fe.target&&(w&&NQ(fe)?w(fe):fe.key==="Escape"&&W.current&&W.current.blur()),E&&E(fe)},$=a!==!1&&_?!0:a,z=A==="small",O=u||($?my:"div"),F=O===my?{component:"div"}:{},G=null;if(w){var q=Lr(l!=="default"&&(X==="default"?i["deleteIconColor".concat(ni(l))]:i["deleteIconOutlinedColor".concat(ni(l))]),z&&i.deleteIconSmall);G=p&&Y.exports.isValidElement(p)?Y.exports.cloneElement(p,{className:Lr(p.props.className,i.deleteIcon,q),onClick:H}):Y.exports.createElement(fEe,{className:Lr(i.deleteIcon,q),onClick:H})}var ee=null;n&&Y.exports.isValidElement(n)&&(ee=Y.exports.cloneElement(n,{className:Lr(i.avatar,n.props.className,z&&i.avatarSmall,l!=="default"&&i["avatarColor".concat(ni(l))])}));var re=null;return x&&Y.exports.isValidElement(x)&&(re=Y.exports.cloneElement(x,{className:Lr(i.icon,x.props.className,z&&i.iconSmall,l!=="default"&&i["iconColor".concat(ni(l))])})),Y.exports.createElement(O,vt({role:$||w?"button":void 0,className:Lr(i.root,o,l!=="default"&&[i["color".concat(ni(l))],$&&i["clickableColor".concat(ni(l))],w&&i["deletableColor".concat(ni(l))]],X!=="default"&&[i.outlined,{primary:i.outlinedPrimary,secondary:i.outlinedSecondary}[l]],v&&i.disabled,z&&i.sizeSmall,$&&i.clickable,w&&i.deletable),"aria-disabled":v?!0:void 0,tabIndex:$||w?0:void 0,onClick:_,onKeyDown:N,onKeyUp:j,ref:D},F,Z),ee||re,Y.exports.createElement("span",{className:Lr(i.label,z&&i.labelSmall)},y),G)}),pEe=Dn(dEe,{name:"MuiChip"})(hEe),mx=44,mEe=function(e){return{root:{display:"inline-block"},static:{transition:e.transitions.create("transform")},indeterminate:{animation:"$circular-rotate 1.4s linear infinite"},determinate:{transition:e.transitions.create("transform")},colorPrimary:{color:e.palette.primary.main},colorSecondary:{color:e.palette.secondary.main},svg:{display:"block"},circle:{stroke:"currentColor"},circleStatic:{transition:e.transitions.create("stroke-dashoffset")},circleIndeterminate:{animation:"$circular-dash 1.4s ease-in-out infinite",strokeDasharray:"80px, 200px",strokeDashoffset:"0px"},circleDeterminate:{transition:e.transitions.create("stroke-dashoffset")},"@keyframes circular-rotate":{"0%":{transformOrigin:"50% 50%"},"100%":{transform:"rotate(360deg)"}},"@keyframes circular-dash":{"0%":{strokeDasharray:"1px, 200px",strokeDashoffset:"0px"},"50%":{strokeDasharray:"100px, 200px",strokeDashoffset:"-15px"},"100%":{strokeDasharray:"100px, 200px",strokeDashoffset:"-125px"}},circleDisableShrink:{animation:"none"}}},gEe=Y.exports.forwardRef(function(e,r){var n=e.classes,i=e.className,o=e.color,a=o===void 0?"primary":o,s=e.disableShrink,l=s===void 0?!1:s,u=e.size,p=u===void 0?40:u,m=e.style,v=e.thickness,x=v===void 0?3.6:v,y=e.value,_=y===void 0?0:y,w=e.variant,C=w===void 0?"indeterminate":w,E=nn(e,["classes","className","color","disableShrink","size","style","thickness","value","variant"]),T={},A={},k={};if(C==="determinate"||C==="static"){var X=2*Math.PI*((mx-x)/2);T.strokeDasharray=X.toFixed(3),k["aria-valuenow"]=Math.round(_),T.strokeDashoffset="".concat(((100-_)/100*X).toFixed(3),"px"),A.transform="rotate(-90deg)"}return Y.exports.createElement("div",vt({className:Lr(n.root,i,a!=="inherit"&&n["color".concat(ni(a))],{determinate:n.determinate,indeterminate:n.indeterminate,static:n.static}[C]),style:vt({width:p,height:p},A,m),ref:r,role:"progressbar"},k,E),Y.exports.createElement("svg",{className:n.svg,viewBox:"".concat(mx/2," ").concat(mx/2," ").concat(mx," ").concat(mx)},Y.exports.createElement("circle",{className:Lr(n.circle,l&&n.circleDisableShrink,{determinate:n.circleDeterminate,indeterminate:n.circleIndeterminate,static:n.circleStatic}[C]),style:T,cx:mx,cy:mx,r:(mx-x)/2,fill:"none",strokeWidth:x})))}),mAt=Dn(mEe,{name:"MuiCircularProgress",flip:!1})(gEe);function $Q(t){return t.substring(2).toLowerCase()}function vEe(t){return document.documentElement.clientWidth<t.clientX||document.documentElement.clientHeight<t.clientY}function yEe(t){var e=t.children,r=t.disableReactTree,n=r===void 0?!1:r,i=t.mouseEvent,o=i===void 0?"onClick":i,a=t.onClickAway,s=t.touchEvent,l=s===void 0?"onTouchEnd":s,u=Y.exports.useRef(!1),p=Y.exports.useRef(null),m=Y.exports.useRef(!1),v=Y.exports.useRef(!1);Y.exports.useEffect(function(){return setTimeout(function(){m.current=!0},0),function(){m.current=!1}},[]);var x=Y.exports.useCallback(function(E){p.current=Wa.exports.findDOMNode(E)},[]),y=Fo(e.ref,x),_=As(function(E){var T=v.current;if(v.current=!1,!(!m.current||!p.current||vEe(E))){if(u.current){u.current=!1;return}var A;if(E.composedPath)A=E.composedPath().indexOf(p.current)>-1;else{var k=jc(p.current);A=!k.documentElement.contains(E.target)||p.current.contains(E.target)}!A&&(n||!T)&&a(E)}}),w=function(T){return function(A){v.current=!0;var k=e.props[T];k&&k(A)}},C={ref:y};return l!==!1&&(C[l]=w(l)),Y.exports.useEffect(function(){if(l!==!1){var E=$Q(l),T=jc(p.current),A=function(){u.current=!0};return T.addEventListener(E,_),T.addEventListener("touchmove",A),function(){T.removeEventListener(E,_),T.removeEventListener("touchmove",A)}}},[_,l]),o!==!1&&(C[o]=w(o)),Y.exports.useEffect(function(){if(o!==!1){var E=$Q(o),T=jc(p.current);return T.addEventListener(E,_),function(){T.removeEventListener(E,_)}}},[_,o]),Y.exports.createElement(Y.exports.Fragment,null,Y.exports.cloneElement(e,C))}var xEe=function(e){return{root:Fi({width:"100%",marginLeft:"auto",boxSizing:"border-box",marginRight:"auto",paddingLeft:e.spacing(2),paddingRight:e.spacing(2),display:"block"},e.breakpoints.up("sm"),{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}),disableGutters:{paddingLeft:0,paddingRight:0},fixed:Object.keys(e.breakpoints.values).reduce(function(r,n){var i=e.breakpoints.values[n];return i!==0&&(r[e.breakpoints.up(n)]={maxWidth:i}),r},{}),maxWidthXs:Fi({},e.breakpoints.up("xs"),{maxWidth:Math.max(e.breakpoints.values.xs,444)}),maxWidthSm:Fi({},e.breakpoints.up("sm"),{maxWidth:e.breakpoints.values.sm}),maxWidthMd:Fi({},e.breakpoints.up("md"),{maxWidth:e.breakpoints.values.md}),maxWidthLg:Fi({},e.breakpoints.up("lg"),{maxWidth:e.breakpoints.values.lg}),maxWidthXl:Fi({},e.breakpoints.up("xl"),{maxWidth:e.breakpoints.values.xl})}},_Ee=Y.exports.forwardRef(function(e,r){var n=e.classes,i=e.className,o=e.component,a=o===void 0?"div":o,s=e.disableGutters,l=s===void 0?!1:s,u=e.fixed,p=u===void 0?!1:u,m=e.maxWidth,v=m===void 0?"lg":m,x=nn(e,["classes","className","component","disableGutters","fixed","maxWidth"]);return Y.exports.createElement(a,vt({className:Lr(n.root,i,p&&n.fixed,l&&n.disableGutters,v!==!1&&n["maxWidth".concat(ni(String(v)))]),ref:r},x))}),gAt=Dn(xEe,{name:"MuiContainer"})(_Ee);function bEe(t){return t=typeof t=="function"?t():t,Wa.exports.findDOMNode(t)}var W8=typeof window!="undefined"?Y.exports.useLayoutEffect:Y.exports.useEffect,wEe=Y.exports.forwardRef(function(e,r){var n=e.children,i=e.container,o=e.disablePortal,a=o===void 0?!1:o,s=e.onRendered,l=Y.exports.useState(null),u=l[0],p=l[1],m=Fo(Y.exports.isValidElement(n)?n.ref:null,r);return W8(function(){a||p(bEe(i)||document.body)},[i,a]),W8(function(){if(u&&!a)return hy(r,u),function(){hy(r,null)}},[r,u,a]),W8(function(){s&&(u||a)&&s()},[s,u,a]),a?Y.exports.isValidElement(n)?Y.exports.cloneElement(n,{ref:m}):n:u&&Wa.exports.createPortal(n,u)}),FQ=wEe;function zQ(){var t=document.createElement("div");t.style.width="99px",t.style.height="99px",t.style.position="absolute",t.style.top="-9999px",t.style.overflow="scroll",document.body.appendChild(t);var e=t.offsetWidth-t.clientWidth;return document.body.removeChild(t),e}function CEe(t){var e=jc(t);return e.body===t?hL(e).innerWidth>e.documentElement.clientWidth:t.scrollHeight>t.clientHeight}function UP(t,e){e?t.setAttribute("aria-hidden","true"):t.removeAttribute("aria-hidden")}function BQ(t){return parseInt(window.getComputedStyle(t)["padding-right"],10)||0}function jQ(t,e,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:[],i=arguments.length>4?arguments[4]:void 0,o=[e,r].concat(uy(n)),a=["TEMPLATE","SCRIPT","STYLE"];[].forEach.call(t.children,function(s){s.nodeType===1&&o.indexOf(s)===-1&&a.indexOf(s.tagName)===-1&&UP(s,i)})}function G8(t,e){var r=-1;return t.some(function(n,i){return e(n)?(r=i,!0):!1}),r}function EEe(t,e){var r=[],n=[],i=t.container,o;if(!e.disableScrollLock){if(CEe(i)){var a=zQ();r.push({value:i.style.paddingRight,key:"padding-right",el:i}),i.style["padding-right"]="".concat(BQ(i)+a,"px"),o=jc(i).querySelectorAll(".mui-fixed"),[].forEach.call(o,function(p){n.push(p.style.paddingRight),p.style.paddingRight="".concat(BQ(p)+a,"px")})}var s=i.parentElement,l=s.nodeName==="HTML"&&window.getComputedStyle(s)["overflow-y"]==="scroll"?s:i;r.push({value:l.style.overflow,key:"overflow",el:l}),l.style.overflow="hidden"}var u=function(){o&&[].forEach.call(o,function(m,v){n[v]?m.style.paddingRight=n[v]:m.style.removeProperty("padding-right")}),r.forEach(function(m){var v=m.value,x=m.el,y=m.key;v?x.style.setProperty(y,v):x.style.removeProperty(y)})};return u}function SEe(t){var e=[];return[].forEach.call(t.children,function(r){r.getAttribute&&r.getAttribute("aria-hidden")==="true"&&e.push(r)}),e}var TEe=function(){function t(){j2e(this,t),this.modals=[],this.containers=[]}return l8(t,[{key:"add",value:function(r,n){var i=this.modals.indexOf(r);if(i!==-1)return i;i=this.modals.length,this.modals.push(r),r.modalRef&&UP(r.modalRef,!1);var o=SEe(n);jQ(n,r.mountNode,r.modalRef,o,!0);var a=G8(this.containers,function(s){return s.container===n});return a!==-1?(this.containers[a].modals.push(r),i):(this.containers.push({modals:[r],container:n,restore:null,hiddenSiblingNodes:o}),i)}},{key:"mount",value:function(r,n){var i=G8(this.containers,function(a){return a.modals.indexOf(r)!==-1}),o=this.containers[i];o.restore||(o.restore=EEe(o,n))}},{key:"remove",value:function(r){var n=this.modals.indexOf(r);if(n===-1)return n;var i=G8(this.containers,function(s){return s.modals.indexOf(r)!==-1}),o=this.containers[i];if(o.modals.splice(o.modals.indexOf(r),1),this.modals.splice(n,1),o.modals.length===0)o.restore&&o.restore(),r.modalRef&&UP(r.modalRef,!0),jQ(o.container,r.mountNode,r.modalRef,o.hiddenSiblingNodes,!1),this.containers.splice(i,1);else{var a=o.modals[o.modals.length-1];a.modalRef&&UP(a.modalRef,!1)}return n}},{key:"isTopModal",value:function(r){return this.modals.length>0&&this.modals[this.modals.length-1]===r}}]),t}();function PEe(t){var e=t.children,r=t.disableAutoFocus,n=r===void 0?!1:r,i=t.disableEnforceFocus,o=i===void 0?!1:i,a=t.disableRestoreFocus,s=a===void 0?!1:a,l=t.getDoc,u=t.isEnabled,p=t.open,m=Y.exports.useRef(),v=Y.exports.useRef(null),x=Y.exports.useRef(null),y=Y.exports.useRef(),_=Y.exports.useRef(null),w=Y.exports.useCallback(function(T){_.current=Wa.exports.findDOMNode(T)},[]),C=Fo(e.ref,w),E=Y.exports.useRef();return Y.exports.useEffect(function(){E.current=p},[p]),!E.current&&p&&typeof window!="undefined"&&(y.current=l().activeElement),Y.exports.useEffect(function(){if(!!p){var T=jc(_.current);!n&&_.current&&!_.current.contains(T.activeElement)&&(_.current.hasAttribute("tabIndex")||_.current.setAttribute("tabIndex",-1),_.current.focus());var A=function(){var W=_.current;if(W!==null){if(!T.hasFocus()||o||!u()||m.current){m.current=!1;return}_.current&&!_.current.contains(T.activeElement)&&_.current.focus()}},k=function(W){o||!u()||W.keyCode!==9||T.activeElement===_.current&&(m.current=!0,W.shiftKey?x.current.focus():v.current.focus())};T.addEventListener("focus",A,!0),T.addEventListener("keydown",k,!0);var X=setInterval(function(){A()},50);return function(){clearInterval(X),T.removeEventListener("focus",A,!0),T.removeEventListener("keydown",k,!0),s||(y.current&&y.current.focus&&y.current.focus(),y.current=null)}}},[n,o,s,u,p]),Y.exports.createElement(Y.exports.Fragment,null,Y.exports.createElement("div",{tabIndex:0,ref:v,"data-test":"sentinelStart"}),Y.exports.cloneElement(e,{ref:C}),Y.exports.createElement("div",{tabIndex:0,ref:x,"data-test":"sentinelEnd"}))}var UQ={root:{zIndex:-1,position:"fixed",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},invisible:{backgroundColor:"transparent"}},IEe=Y.exports.forwardRef(function(e,r){var n=e.invisible,i=n===void 0?!1:n,o=e.open,a=nn(e,["invisible","open"]);return o?Y.exports.createElement("div",vt({"aria-hidden":!0,ref:r},a,{style:vt({},UQ.root,i?UQ.invisible:{},a.style)})):null}),MEe=IEe;function AEe(t){return t=typeof t=="function"?t():t,Wa.exports.findDOMNode(t)}function REe(t){return t.children?t.children.props.hasOwnProperty("in"):!1}var kEe=new TEe,OEe=function(e){return{root:{position:"fixed",zIndex:e.zIndex.modal,right:0,bottom:0,top:0,left:0},hidden:{visibility:"hidden"}}},LEe=Y.exports.forwardRef(function(e,r){var n=W2(),i=HZ({name:"MuiModal",props:vt({},e),theme:n}),o=i.BackdropComponent,a=o===void 0?MEe:o,s=i.BackdropProps,l=i.children,u=i.closeAfterTransition,p=u===void 0?!1:u,m=i.container,v=i.disableAutoFocus,x=v===void 0?!1:v,y=i.disableBackdropClick,_=y===void 0?!1:y,w=i.disableEnforceFocus,C=w===void 0?!1:w,E=i.disableEscapeKeyDown,T=E===void 0?!1:E,A=i.disablePortal,k=A===void 0?!1:A,X=i.disableRestoreFocus,Z=X===void 0?!1:X,W=i.disableScrollLock,D=W===void 0?!1:W,H=i.hideBackdrop,N=H===void 0?!1:H,j=i.keepMounted,$=j===void 0?!1:j,z=i.manager,O=z===void 0?kEe:z,F=i.onBackdropClick,G=i.onClose,q=i.onEscapeKeyDown,ee=i.onRendered,re=i.open,ce=nn(i,["BackdropComponent","BackdropProps","children","closeAfterTransition","container","disableAutoFocus","disableBackdropClick","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","manager","onBackdropClick","onClose","onEscapeKeyDown","onRendered","open"]),fe=Y.exports.useState(!0),J=fe[0],oe=fe[1],ve=Y.exports.useRef({}),ye=Y.exports.useRef(null),xe=Y.exports.useRef(null),se=Fo(xe,r),me=REe(i),pe=function(){return jc(ye.current)},Ce=function(){return ve.current.modalRef=xe.current,ve.current.mountNode=ye.current,ve.current},Pe=function(){O.mount(Ce(),{disableScrollLock:D}),xe.current.scrollTop=0},Re=As(function(){var de=AEe(m)||pe().body;O.add(Ce(),de),xe.current&&Pe()}),ke=Y.exports.useCallback(function(){return O.isTopModal(Ce())},[O]),ze=As(function(de){ye.current=de,!!de&&(ee&&ee(),re&&ke()?Pe():UP(xe.current,!0))}),Ge=Y.exports.useCallback(function(){O.remove(Ce())},[O]);if(Y.exports.useEffect(function(){return function(){Ge()}},[Ge]),Y.exports.useEffect(function(){re?Re():(!me||!p)&&Ge()},[re,Ge,me,p,Re]),!$&&!re&&(!me||J))return null;var ht=function(){oe(!1)},Tt=function(){oe(!0),p&&Ge()},xt=function(Te){Te.target===Te.currentTarget&&(F&&F(Te),!_&&G&&G(Te,"backdropClick"))},pt=function(Te){Te.key!=="Escape"||!ke()||(q&&q(Te),T||(Te.stopPropagation(),G&&G(Te,"escapeKeyDown")))},It=OEe(n||{zIndex:UZ}),Ie={};return l.props.tabIndex===void 0&&(Ie.tabIndex=l.props.tabIndex||"-1"),me&&(Ie.onEnter=dy(ht,l.props.onEnter),Ie.onExited=dy(Tt,l.props.onExited)),Y.exports.createElement(FQ,{ref:ze,container:m,disablePortal:k},Y.exports.createElement("div",vt({ref:se,onKeyDown:pt,role:"presentation"},ce,{style:vt({},It.root,!re&&J?It.hidden:{},ce.style)}),N?null:Y.exports.createElement(a,vt({open:re,onClick:xt},s)),Y.exports.createElement(PEe,{disableEnforceFocus:C,disableAutoFocus:x,disableRestoreFocus:Z,getDoc:pe,isEnabled:ke,open:re},Y.exports.cloneElement(l,Ie))))}),VQ=LEe,DEe=function(e){return{root:{"@media print":{position:"absolute !important"}},scrollPaper:{display:"flex",justifyContent:"center",alignItems:"center"},scrollBody:{overflowY:"auto",overflowX:"hidden",textAlign:"center","&:after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}},container:{height:"100%","@media print":{height:"auto"},outline:0},paper:{margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"}},paperScrollPaper:{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"},paperScrollBody:{display:"inline-block",verticalAlign:"middle",textAlign:"left"},paperWidthFalse:{maxWidth:"calc(100% - 64px)"},paperWidthXs:{maxWidth:Math.max(e.breakpoints.values.xs,444),"&$paperScrollBody":Fi({},e.breakpoints.down(Math.max(e.breakpoints.values.xs,444)+32*2),{maxWidth:"calc(100% - 64px)"})},paperWidthSm:{maxWidth:e.breakpoints.values.sm,"&$paperScrollBody":Fi({},e.breakpoints.down(e.breakpoints.values.sm+32*2),{maxWidth:"calc(100% - 64px)"})},paperWidthMd:{maxWidth:e.breakpoints.values.md,"&$paperScrollBody":Fi({},e.breakpoints.down(e.breakpoints.values.md+32*2),{maxWidth:"calc(100% - 64px)"})},paperWidthLg:{maxWidth:e.breakpoints.values.lg,"&$paperScrollBody":Fi({},e.breakpoints.down(e.breakpoints.values.lg+32*2),{maxWidth:"calc(100% - 64px)"})},paperWidthXl:{maxWidth:e.breakpoints.values.xl,"&$paperScrollBody":Fi({},e.breakpoints.down(e.breakpoints.values.xl+32*2),{maxWidth:"calc(100% - 64px)"})},paperFullWidth:{width:"calc(100% - 64px)"},paperFullScreen:{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,"&$paperScrollBody":{margin:0,maxWidth:"100%"}}}},NEe={enter:af.enteringScreen,exit:af.leavingScreen},$Ee=Y.exports.forwardRef(function(e,r){var n=e.BackdropProps,i=e.children,o=e.classes,a=e.className,s=e.disableBackdropClick,l=s===void 0?!1:s,u=e.disableEscapeKeyDown,p=u===void 0?!1:u,m=e.fullScreen,v=m===void 0?!1:m,x=e.fullWidth,y=x===void 0?!1:x,_=e.maxWidth,w=_===void 0?"sm":_,C=e.onBackdropClick,E=e.onClose,T=e.onEnter,A=e.onEntered,k=e.onEntering,X=e.onEscapeKeyDown,Z=e.onExit,W=e.onExited,D=e.onExiting,H=e.open,N=e.PaperComponent,j=N===void 0?F1:N,$=e.PaperProps,z=$===void 0?{}:$,O=e.scroll,F=O===void 0?"paper":O,G=e.TransitionComponent,q=G===void 0?OQ:G,ee=e.transitionDuration,re=ee===void 0?NEe:ee,ce=e.TransitionProps,fe=e["aria-describedby"],J=e["aria-labelledby"],oe=nn(e,["BackdropProps","children","classes","className","disableBackdropClick","disableEscapeKeyDown","fullScreen","fullWidth","maxWidth","onBackdropClick","onClose","onEnter","onEntered","onEntering","onEscapeKeyDown","onExit","onExited","onExiting","open","PaperComponent","PaperProps","scroll","TransitionComponent","transitionDuration","TransitionProps","aria-describedby","aria-labelledby"]),ve=Y.exports.useRef(),ye=function(me){ve.current=me.target},xe=function(me){me.target===me.currentTarget&&me.target===ve.current&&(ve.current=null,C&&C(me),!l&&E&&E(me,"backdropClick"))};return Y.exports.createElement(VQ,vt({className:Lr(o.root,a),BackdropComponent:HCe,BackdropProps:vt({transitionDuration:re},n),closeAfterTransition:!0},l?{disableBackdropClick:l}:{},{disableEscapeKeyDown:p,onEscapeKeyDown:X,onClose:E,open:H,ref:r},oe),Y.exports.createElement(q,vt({appear:!0,in:H,timeout:re,onEnter:T,onEntering:k,onEntered:A,onExit:Z,onExiting:D,onExited:W,role:"none presentation"},ce),Y.exports.createElement("div",{className:Lr(o.container,o["scroll".concat(ni(F))]),onMouseUp:xe,onMouseDown:ye},Y.exports.createElement(j,vt({elevation:24,role:"dialog","aria-describedby":fe,"aria-labelledby":J},z,{className:Lr(o.paper,o["paperScroll".concat(ni(F))],o["paperWidth".concat(ni(String(w)))],z.className,v&&o.paperFullScreen,y&&o.paperFullWidth)}),i))))}),vAt=Dn(DEe,{name:"MuiDialog"})($Ee),FEe={root:{display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto"},spacing:{"& > :not(:first-child)":{marginLeft:8}}},zEe=Y.exports.forwardRef(function(e,r){var n=e.disableSpacing,i=n===void 0?!1:n,o=e.classes,a=e.className,s=nn(e,["disableSpacing","classes","className"]);return Y.exports.createElement("div",vt({className:Lr(o.root,a,!i&&o.spacing),ref:r},s))}),yAt=Dn(FEe,{name:"MuiDialogActions"})(zEe),BEe={root:{margin:0,padding:"16px 24px",flex:"0 0 auto"}},jEe=Y.exports.forwardRef(function(e,r){var n=e.children,i=e.classes,o=e.className,a=e.disableTypography,s=a===void 0?!1:a,l=nn(e,["children","classes","className","disableTypography"]);return Y.exports.createElement("div",vt({className:Lr(i.root,o),ref:r},l),s?n:Y.exports.createElement(U8,{component:"h2",variant:"h6"},n))}),xAt=Dn(BEe,{name:"MuiDialogTitle"})(jEe),UEe=function(e){return{root:{height:1,margin:0,border:"none",flexShrink:0,backgroundColor:e.palette.divider},absolute:{position:"absolute",bottom:0,left:0,width:"100%"},inset:{marginLeft:72},light:{backgroundColor:wo(e.palette.divider,.08)},middle:{marginLeft:e.spacing(2),marginRight:e.spacing(2)},vertical:{height:"100%",width:1},flexItem:{alignSelf:"stretch",height:"auto"}}},VEe=Y.exports.forwardRef(function(e,r){var n=e.absolute,i=n===void 0?!1:n,o=e.classes,a=e.className,s=e.component,l=s===void 0?"hr":s,u=e.flexItem,p=u===void 0?!1:u,m=e.light,v=m===void 0?!1:m,x=e.orientation,y=x===void 0?"horizontal":x,_=e.role,w=_===void 0?l!=="hr"?"separator":void 0:_,C=e.variant,E=C===void 0?"fullWidth":C,T=nn(e,["absolute","classes","className","component","flexItem","light","orientation","role","variant"]);return Y.exports.createElement(l,vt({className:Lr(o.root,a,E!=="fullWidth"&&o[E],i&&o.absolute,p&&o.flexItem,v&&o.light,y==="vertical"&&o.vertical),role:w,ref:r},T))}),_At=Dn(UEe,{name:"MuiDivider"})(VEe);function HEe(t,e){var r=e.getBoundingClientRect(),n;if(e.fakeTransform)n=e.fakeTransform;else{var i=window.getComputedStyle(e);n=i.getPropertyValue("-webkit-transform")||i.getPropertyValue("transform")}var o=0,a=0;if(n&&n!=="none"&&typeof n=="string"){var s=n.split("(")[1].split(")")[0].split(",");o=parseInt(s[4],10),a=parseInt(s[5],10)}return t==="left"?"translateX(".concat(window.innerWidth,"px) translateX(").concat(o-r.left,"px)"):t==="right"?"translateX(-".concat(r.left+r.width-o,"px)"):t==="up"?"translateY(".concat(window.innerHeight,"px) translateY(").concat(a-r.top,"px)"):"translateY(-".concat(r.top+r.height-a,"px)")}function yL(t,e){var r=HEe(t,e);r&&(e.style.webkitTransform=r,e.style.transform=r)}var WEe={enter:af.enteringScreen,exit:af.leavingScreen},GEe=Y.exports.forwardRef(function(e,r){var n=e.children,i=e.direction,o=i===void 0?"down":i,a=e.in,s=e.onEnter,l=e.onEntered,u=e.onEntering,p=e.onExit,m=e.onExited,v=e.onExiting,x=e.style,y=e.timeout,_=y===void 0?WEe:y,w=e.TransitionComponent,C=w===void 0?BP:w,E=nn(e,["children","direction","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"]),T=zg(),A=Y.exports.useRef(null),k=Y.exports.useCallback(function(F){A.current=Wa.exports.findDOMNode(F)},[]),X=Fo(n.ref,k),Z=Fo(X,r),W=function(G){return function(q){G&&(q===void 0?G(A.current):G(A.current,q))}},D=W(function(F,G){yL(o,F),vL(F),s&&s(F,G)}),H=W(function(F,G){var q=jg({timeout:_,style:x},{mode:"enter"});F.style.webkitTransition=T.transitions.create("-webkit-transform",vt({},q,{easing:T.transitions.easing.easeOut})),F.style.transition=T.transitions.create("transform",vt({},q,{easing:T.transitions.easing.easeOut})),F.style.webkitTransform="none",F.style.transform="none",u&&u(F,G)}),N=W(l),j=W(v),$=W(function(F){var G=jg({timeout:_,style:x},{mode:"exit"});F.style.webkitTransition=T.transitions.create("-webkit-transform",vt({},G,{easing:T.transitions.easing.sharp})),F.style.transition=T.transitions.create("transform",vt({},G,{easing:T.transitions.easing.sharp})),yL(o,F),p&&p(F)}),z=W(function(F){F.style.webkitTransition="",F.style.transition="",m&&m(F)}),O=Y.exports.useCallback(function(){A.current&&yL(o,A.current)},[o]);return Y.exports.useEffect(function(){if(!(a||o==="down"||o==="right")){var F=px(function(){A.current&&yL(o,A.current)});return window.addEventListener("resize",F),function(){F.clear(),window.removeEventListener("resize",F)}}},[o,a]),Y.exports.useEffect(function(){a||O()},[a,O]),Y.exports.createElement(C,vt({nodeRef:A,onEnter:D,onEntered:N,onEntering:H,onExit:$,onExited:z,onExiting:j,appear:!0,in:a,timeout:_},E),function(F,G){return Y.exports.cloneElement(n,vt({ref:Z,style:vt({visibility:F==="exited"&&!a?"hidden":void 0},x,n.props.style)},G))})}),bAt=GEe,qEe=function(e){return{root:vt({},e.typography.button,{boxSizing:"border-box",minHeight:36,transition:e.transitions.create(["background-color","box-shadow","border"],{duration:e.transitions.duration.short}),borderRadius:"50%",padding:0,minWidth:0,width:56,height:56,boxShadow:e.shadows[6],"&:active":{boxShadow:e.shadows[12]},color:e.palette.getContrastText(e.palette.grey[300]),backgroundColor:e.palette.grey[300],"&:hover":{backgroundColor:e.palette.grey.A100,"@media (hover: none)":{backgroundColor:e.palette.grey[300]},"&$disabled":{backgroundColor:e.palette.action.disabledBackground},textDecoration:"none"},"&$focusVisible":{boxShadow:e.shadows[6]},"&$disabled":{color:e.palette.action.disabled,boxShadow:e.shadows[0],backgroundColor:e.palette.action.disabledBackground}}),label:{width:"100%",display:"inherit",alignItems:"inherit",justifyContent:"inherit"},primary:{color:e.palette.primary.contrastText,backgroundColor:e.palette.primary.main,"&:hover":{backgroundColor:e.palette.primary.dark,"@media (hover: none)":{backgroundColor:e.palette.primary.main}}},secondary:{color:e.palette.secondary.contrastText,backgroundColor:e.palette.secondary.main,"&:hover":{backgroundColor:e.palette.secondary.dark,"@media (hover: none)":{backgroundColor:e.palette.secondary.main}}},extended:{borderRadius:48/2,padding:"0 16px",width:"auto",minHeight:"auto",minWidth:48,height:48,"&$sizeSmall":{width:"auto",padding:"0 8px",borderRadius:34/2,minWidth:34,height:34},"&$sizeMedium":{width:"auto",padding:"0 16px",borderRadius:40/2,minWidth:40,height:40}},focusVisible:{},disabled:{},colorInherit:{color:"inherit"},sizeSmall:{width:40,height:40},sizeMedium:{width:48,height:48}}},XEe=Y.exports.forwardRef(function(e,r){var n=e.children,i=e.classes,o=e.className,a=e.color,s=a===void 0?"default":a,l=e.component,u=l===void 0?"button":l,p=e.disabled,m=p===void 0?!1:p,v=e.disableFocusRipple,x=v===void 0?!1:v,y=e.focusVisibleClassName,_=e.size,w=_===void 0?"large":_,C=e.variant,E=C===void 0?"circular":C,T=nn(e,["children","classes","className","color","component","disabled","disableFocusRipple","focusVisibleClassName","size","variant"]);return Y.exports.createElement(my,vt({className:Lr(i.root,o,w!=="large"&&i["size".concat(ni(w))],m&&i.disabled,E==="extended"&&i.extended,{primary:i.primary,secondary:i.secondary,inherit:i.colorInherit}[s]),component:u,disabled:m,focusRipple:!x,focusVisibleClassName:Lr(i.focusVisible,y),ref:r},T),Y.exports.createElement("span",{className:i.label},n))}),HQ=Dn(qEe,{name:"MuiFab"})(XEe);function X2(t){var e=t.props,r=t.states,n=t.muiFormControl;return r.reduce(function(i,o){return i[o]=e[o],n&&typeof e[o]=="undefined"&&(i[o]=n[o]),i},{})}function xL(t,e){return parseInt(t[e],10)||0}var YEe=typeof window!="undefined"?Y.exports.useLayoutEffect:Y.exports.useEffect,KEe={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}},ZEe=Y.exports.forwardRef(function(e,r){var n=e.onChange,i=e.rows,o=e.rowsMax,a=e.rowsMin,s=e.maxRows,l=e.minRows,u=l===void 0?1:l,p=e.style,m=e.value,v=nn(e,["onChange","rows","rowsMax","rowsMin","maxRows","minRows","style","value"]),x=s||o,y=i||a||u,_=Y.exports.useRef(m!=null),w=_.current,C=Y.exports.useRef(null),E=Fo(r,C),T=Y.exports.useRef(null),A=Y.exports.useRef(0),k=Y.exports.useState({}),X=k[0],Z=k[1],W=Y.exports.useCallback(function(){var H=C.current,N=window.getComputedStyle(H),j=T.current;j.style.width=N.width,j.value=H.value||e.placeholder||"x",j.value.slice(-1)===` `&&(j.value+=" ");var $=N["box-sizing"],z=xL(N,"padding-bottom")+xL(N,"padding-top"),O=xL(N,"border-bottom-width")+xL(N,"border-top-width"),F=j.scrollHeight-z;j.value="x";var G=j.scrollHeight-z,q=F;y&&(q=Math.max(Number(y)*G,q)),x&&(q=Math.min(Number(x)*G,q)),q=Math.max(q,G);var ee=q+($==="border-box"?z+O:0),re=Math.abs(q-F)<=1;Z(function(ce){return A.current<20&&(ee>0&&Math.abs((ce.outerHeightStyle||0)-ee)>1||ce.overflow!==re)?(A.current+=1,{overflow:re,outerHeightStyle:ee}):ce})},[x,y,e.placeholder]);Y.exports.useEffect(function(){var H=px(function(){A.current=0,W()});return window.addEventListener("resize",H),function(){H.clear(),window.removeEventListener("resize",H)}},[W]),YEe(function(){W()}),Y.exports.useEffect(function(){A.current=0},[m]);var D=function(N){A.current=0,w||W(),n&&n(N)};return Y.exports.createElement(Y.exports.Fragment,null,Y.exports.createElement("textarea",vt({value:m,onChange:D,ref:E,rows:y,style:vt({height:X.outerHeightStyle,overflow:X.overflow?"hidden":null},p)},v)),Y.exports.createElement("textarea",{"aria-hidden":!0,className:e.className,readOnly:!0,ref:T,tabIndex:-1,style:vt({},KEe.shadow,p)}))}),QEe=ZEe;function WQ(t){return t!=null&&!(Array.isArray(t)&&t.length===0)}function q8(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return t&&(WQ(t.value)&&t.value!==""||e&&WQ(t.defaultValue)&&t.defaultValue!=="")}function JEe(t){return t.startAdornment}var eSe=function(e){var r=e.palette.type==="light",n={color:"currentColor",opacity:r?.42:.5,transition:e.transitions.create("opacity",{duration:e.transitions.duration.shorter})},i={opacity:"0 !important"},o={opacity:r?.42:.5};return{"@global":{"@keyframes mui-auto-fill":{},"@keyframes mui-auto-fill-cancel":{}},root:vt({},e.typography.body1,{color:e.palette.text.primary,lineHeight:"1.1876em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center","&$disabled":{color:e.palette.text.disabled,cursor:"default"}}),formControl:{},focused:{},disabled:{},adornedStart:{},adornedEnd:{},error:{},marginDense:{},multiline:{padding:"".concat(8-2,"px 0 ").concat(8-1,"px"),"&$marginDense":{paddingTop:4-1}},colorSecondary:{},fullWidth:{width:"100%"},input:{font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"".concat(8-2,"px 0 ").concat(8-1,"px"),border:0,boxSizing:"content-box",background:"none",height:"1.1876em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%",animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&::-webkit-input-placeholder":n,"&::-moz-placeholder":n,"&:-ms-input-placeholder":n,"&::-ms-input-placeholder":n,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{"-webkit-appearance":"none"},"label[data-shrink=false] + $formControl &":{"&::-webkit-input-placeholder":i,"&::-moz-placeholder":i,"&:-ms-input-placeholder":i,"&::-ms-input-placeholder":i,"&:focus::-webkit-input-placeholder":o,"&:focus::-moz-placeholder":o,"&:focus:-ms-input-placeholder":o,"&:focus::-ms-input-placeholder":o},"&$disabled":{opacity:1},"&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}},inputMarginDense:{paddingTop:4-1},inputMultiline:{height:"auto",resize:"none",padding:0},inputTypeSearch:{"-moz-appearance":"textfield","-webkit-appearance":"textfield"},inputAdornedStart:{},inputAdornedEnd:{},inputHiddenLabel:{}}},tSe=typeof window=="undefined"?Y.exports.useEffect:Y.exports.useLayoutEffect,rSe=Y.exports.forwardRef(function(e,r){var n=e["aria-describedby"],i=e.autoComplete,o=e.autoFocus,a=e.classes,s=e.className;e.color;var l=e.defaultValue,u=e.disabled,p=e.endAdornment;e.error;var m=e.fullWidth,v=m===void 0?!1:m,x=e.id,y=e.inputComponent,_=y===void 0?"input":y,w=e.inputProps,C=w===void 0?{}:w,E=e.inputRef;e.margin;var T=e.multiline,A=T===void 0?!1:T,k=e.name,X=e.onBlur,Z=e.onChange,W=e.onClick,D=e.onFocus,H=e.onKeyDown,N=e.onKeyUp,j=e.placeholder,$=e.readOnly,z=e.renderSuffix,O=e.rows,F=e.rowsMax,G=e.rowsMin,q=e.maxRows,ee=e.minRows,re=e.startAdornment,ce=e.type,fe=ce===void 0?"text":ce,J=e.value,oe=nn(e,["aria-describedby","autoComplete","autoFocus","classes","className","color","defaultValue","disabled","endAdornment","error","fullWidth","id","inputComponent","inputProps","inputRef","margin","multiline","name","onBlur","onChange","onClick","onFocus","onKeyDown","onKeyUp","placeholder","readOnly","renderSuffix","rows","rowsMax","rowsMin","maxRows","minRows","startAdornment","type","value"]),ve=C.value!=null?C.value:J,ye=Y.exports.useRef(ve!=null),xe=ye.current,se=Y.exports.useRef(),me=Y.exports.useCallback(function(Ze){},[]),pe=Fo(C.ref,me),Ce=Fo(E,pe),Pe=Fo(se,Ce),Re=Y.exports.useState(!1),ke=Re[0],ze=Re[1],Ge=eEe(),ht=X2({props:e,muiFormControl:Ge,states:["color","disabled","error","hiddenLabel","margin","required","filled"]});ht.focused=Ge?Ge.focused:ke,Y.exports.useEffect(function(){!Ge&&u&&ke&&(ze(!1),X&&X())},[Ge,u,ke,X]);var Tt=Ge&&Ge.onFilled,xt=Ge&&Ge.onEmpty,pt=Y.exports.useCallback(function(Ze){q8(Ze)?Tt&&Tt():xt&&xt()},[Tt,xt]);tSe(function(){xe&&pt({value:ve})},[ve,pt,xe]);var It=function(Je){if(ht.disabled){Je.stopPropagation();return}D&&D(Je),C.onFocus&&C.onFocus(Je),Ge&&Ge.onFocus?Ge.onFocus(Je):ze(!0)},Ie=function(Je){X&&X(Je),C.onBlur&&C.onBlur(Je),Ge&&Ge.onBlur?Ge.onBlur(Je):ze(!1)},de=function(Je){if(!xe){var St=Je.target||se.current;if(St==null)throw new Error(F2(1));pt({value:St.value})}for(var er=arguments.length,Ft=new Array(er>1?er-1:0),Ut=1;Ut<er;Ut++)Ft[Ut-1]=arguments[Ut];C.onChange&&C.onChange.apply(C,[Je].concat(Ft)),Z&&Z.apply(void 0,[Je].concat(Ft))};Y.exports.useEffect(function(){pt(se.current)},[]);var Te=function(Je){se.current&&Je.currentTarget===Je.target&&se.current.focus(),W&&W(Je)},Be=_,Ke=vt({},C,{ref:Pe});typeof Be!="string"?Ke=vt({inputRef:Pe,type:fe},Ke,{ref:null}):A?O&&!q&&!ee&&!F&&!G?Be="textarea":(Ke=vt({minRows:O||ee,rowsMax:F,maxRows:q},Ke),Be=QEe):Ke=vt({type:fe},Ke);var ot=function(Je){pt(Je.animationName==="mui-auto-fill-cancel"?se.current:{value:"x"})};return Y.exports.useEffect(function(){Ge&&Ge.setAdornedStart(Boolean(re))},[Ge,re]),Y.exports.createElement("div",vt({className:Lr(a.root,a["color".concat(ni(ht.color||"primary"))],s,ht.disabled&&a.disabled,ht.error&&a.error,v&&a.fullWidth,ht.focused&&a.focused,Ge&&a.formControl,A&&a.multiline,re&&a.adornedStart,p&&a.adornedEnd,ht.margin==="dense"&&a.marginDense),onClick:Te,ref:r},oe),re,Y.exports.createElement(V8.Provider,{value:null},Y.exports.createElement(Be,vt({"aria-invalid":ht.error,"aria-describedby":n,autoComplete:i,autoFocus:o,defaultValue:l,disabled:ht.disabled,id:x,onAnimationStart:ot,name:k,placeholder:j,readOnly:$,required:ht.required,rows:O,value:ve,onKeyDown:H,onKeyUp:N},Ke,{className:Lr(a.input,C.className,ht.disabled&&a.disabled,A&&a.inputMultiline,ht.hiddenLabel&&a.inputHiddenLabel,re&&a.inputAdornedStart,p&&a.inputAdornedEnd,fe==="search"&&a.inputTypeSearch,ht.margin==="dense"&&a.inputMarginDense),onBlur:Ie,onChange:de,onFocus:It}))),p,z?z(vt({},ht,{startAdornment:re})):null)}),X8=Dn(eSe,{name:"MuiInputBase"})(rSe),nSe=function(e){var r=e.palette.type==="light",n=r?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",i=r?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.09)";return{root:{position:"relative",backgroundColor:i,borderTopLeftRadius:e.shape.borderRadius,borderTopRightRadius:e.shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:r?"rgba(0, 0, 0, 0.13)":"rgba(255, 255, 255, 0.13)","@media (hover: none)":{backgroundColor:i}},"&$focused":{backgroundColor:r?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.09)"},"&$disabled":{backgroundColor:r?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)"}},colorSecondary:{"&$underline:after":{borderBottomColor:e.palette.secondary.main}},underline:{"&:after":{borderBottom:"2px solid ".concat(e.palette.primary.main),left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},"&$focused:after":{transform:"scaleX(1)"},"&$error:after":{borderBottomColor:e.palette.error.main,transform:"scaleX(1)"},"&:before":{borderBottom:"1px solid ".concat(n),left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},"&:hover:before":{borderBottom:"1px solid ".concat(e.palette.text.primary)},"&$disabled:before":{borderBottomStyle:"dotted"}},focused:{},disabled:{},adornedStart:{paddingLeft:12},adornedEnd:{paddingRight:12},error:{},marginDense:{},multiline:{padding:"27px 12px 10px","&$marginDense":{paddingTop:23,paddingBottom:6}},input:{padding:"27px 12px 10px","&:-webkit-autofill":{WebkitBoxShadow:e.palette.type==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.type==="light"?null:"#fff",caretColor:e.palette.type==="light"?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},inputMarginDense:{paddingTop:23,paddingBottom:6},inputHiddenLabel:{paddingTop:18,paddingBottom:19,"&$inputMarginDense":{paddingTop:10,paddingBottom:11}},inputMultiline:{padding:0},inputAdornedStart:{paddingLeft:0},inputAdornedEnd:{paddingRight:0}}},GQ=Y.exports.forwardRef(function(e,r){var n=e.disableUnderline,i=e.classes,o=e.fullWidth,a=o===void 0?!1:o,s=e.inputComponent,l=s===void 0?"input":s,u=e.multiline,p=u===void 0?!1:u,m=e.type,v=m===void 0?"text":m,x=nn(e,["disableUnderline","classes","fullWidth","inputComponent","multiline","type"]);return Y.exports.createElement(X8,vt({classes:vt({},i,{root:Lr(i.root,!n&&i.underline),underline:null}),fullWidth:a,inputComponent:l,multiline:p,ref:r,type:v},x))});GQ.muiName="Input";var qQ=Dn(nSe,{name:"MuiFilledInput"})(GQ),iSe={root:{display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top"},marginNormal:{marginTop:16,marginBottom:8},marginDense:{marginTop:8,marginBottom:4},fullWidth:{width:"100%"}},oSe=Y.exports.forwardRef(function(e,r){var n=e.children,i=e.classes,o=e.className,a=e.color,s=a===void 0?"primary":a,l=e.component,u=l===void 0?"div":l,p=e.disabled,m=p===void 0?!1:p,v=e.error,x=v===void 0?!1:v,y=e.fullWidth,_=y===void 0?!1:y,w=e.focused,C=e.hiddenLabel,E=C===void 0?!1:C,T=e.margin,A=T===void 0?"none":T,k=e.required,X=k===void 0?!1:k,Z=e.size,W=e.variant,D=W===void 0?"standard":W,H=nn(e,["children","classes","className","color","component","disabled","error","fullWidth","focused","hiddenLabel","margin","required","size","variant"]),N=Y.exports.useState(function(){var ve=!1;return n&&Y.exports.Children.forEach(n,function(ye){if(!!L1(ye,["Input","Select"])){var xe=L1(ye,["Select"])?ye.props.input:ye;xe&&JEe(xe.props)&&(ve=!0)}}),ve}),j=N[0],$=N[1],z=Y.exports.useState(function(){var ve=!1;return n&&Y.exports.Children.forEach(n,function(ye){!L1(ye,["Input","Select"])||q8(ye.props,!0)&&(ve=!0)}),ve}),O=z[0],F=z[1],G=Y.exports.useState(!1),q=G[0],ee=G[1],re=w!==void 0?w:q;m&&re&&ee(!1);var ce,fe=Y.exports.useCallback(function(){F(!0)},[]),J=Y.exports.useCallback(function(){F(!1)},[]),oe={adornedStart:j,setAdornedStart:$,color:s,disabled:m,error:x,filled:O,focused:re,fullWidth:_,hiddenLabel:E,margin:(Z==="small"?"dense":void 0)||A,onBlur:function(){ee(!1)},onEmpty:J,onFilled:fe,onFocus:function(){ee(!0)},registerEffect:ce,required:X,variant:D};return Y.exports.createElement(V8.Provider,{value:oe},Y.exports.createElement(u,vt({className:Lr(i.root,o,A!=="none"&&i["margin".concat(ni(A))],_&&i.fullWidth),ref:r},H),n))}),sSe=Dn(iSe,{name:"MuiFormControl"})(oSe),aSe=function(e){return{root:{display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,"&$disabled":{cursor:"default"}},labelPlacementStart:{flexDirection:"row-reverse",marginLeft:16,marginRight:-11},labelPlacementTop:{flexDirection:"column-reverse",marginLeft:16},labelPlacementBottom:{flexDirection:"column",marginLeft:16},disabled:{},label:{"&$disabled":{color:e.palette.text.disabled}}}},lSe=Y.exports.forwardRef(function(e,r){e.checked;var n=e.classes,i=e.className,o=e.control,a=e.disabled;e.inputRef;var s=e.label,l=e.labelPlacement,u=l===void 0?"end":l;e.name,e.onChange,e.value;var p=nn(e,["checked","classes","className","control","disabled","inputRef","label","labelPlacement","name","onChange","value"]),m=z1(),v=a;typeof v=="undefined"&&typeof o.props.disabled!="undefined"&&(v=o.props.disabled),typeof v=="undefined"&&m&&(v=m.disabled);var x={disabled:v};return["checked","name","onChange","value","inputRef"].forEach(function(y){typeof o.props[y]=="undefined"&&typeof e[y]!="undefined"&&(x[y]=e[y])}),Y.exports.createElement("label",vt({className:Lr(n.root,i,u!=="end"&&n["labelPlacement".concat(ni(u))],v&&n.disabled),ref:r},p),Y.exports.cloneElement(o,x),Y.exports.createElement(U8,{component:"span",className:Lr(n.label,v&&n.disabled)},s))}),wAt=Dn(aSe,{name:"MuiFormControlLabel"})(lSe),cSe={root:{display:"flex",flexDirection:"column",flexWrap:"wrap"},row:{flexDirection:"row"}},uSe=Y.exports.forwardRef(function(e,r){var n=e.classes,i=e.className,o=e.row,a=o===void 0?!1:o,s=nn(e,["classes","className","row"]);return Y.exports.createElement("div",vt({className:Lr(n.root,i,a&&n.row),ref:r},s))}),fSe=Dn(cSe,{name:"MuiFormGroup"})(uSe),dSe=function(e){return{root:vt({color:e.palette.text.secondary},e.typography.caption,{textAlign:"left",marginTop:3,margin:0,"&$disabled":{color:e.palette.text.disabled},"&$error":{color:e.palette.error.main}}),error:{},disabled:{},marginDense:{marginTop:4},contained:{marginLeft:14,marginRight:14},focused:{},filled:{},required:{}}},hSe=Y.exports.forwardRef(function(e,r){var n=e.children,i=e.classes,o=e.className,a=e.component,s=a===void 0?"p":a;e.disabled,e.error,e.filled,e.focused,e.margin,e.required,e.variant;var l=nn(e,["children","classes","className","component","disabled","error","filled","focused","margin","required","variant"]),u=z1(),p=X2({props:e,muiFormControl:u,states:["variant","margin","disabled","error","filled","focused","required"]});return Y.exports.createElement(s,vt({className:Lr(i.root,(p.variant==="filled"||p.variant==="outlined")&&i.contained,o,p.disabled&&i.disabled,p.error&&i.error,p.filled&&i.filled,p.focused&&i.focused,p.required&&i.required,p.margin==="dense"&&i.marginDense),ref:r},l),n===" "?Y.exports.createElement("span",{dangerouslySetInnerHTML:{__html:"​"}}):n)}),pSe=Dn(dSe,{name:"MuiFormHelperText"})(hSe),mSe=function(e){return{root:vt({color:e.palette.text.secondary},e.typography.body1,{lineHeight:1,padding:0,"&$focused":{color:e.palette.primary.main},"&$disabled":{color:e.palette.text.disabled},"&$error":{color:e.palette.error.main}}),colorSecondary:{"&$focused":{color:e.palette.secondary.main}},focused:{},disabled:{},error:{},filled:{},required:{},asterisk:{"&$error":{color:e.palette.error.main}}}},gSe=Y.exports.forwardRef(function(e,r){var n=e.children,i=e.classes,o=e.className;e.color;var a=e.component,s=a===void 0?"label":a;e.disabled,e.error,e.filled,e.focused,e.required;var l=nn(e,["children","classes","className","color","component","disabled","error","filled","focused","required"]),u=z1(),p=X2({props:e,muiFormControl:u,states:["color","required","focused","disabled","error","filled"]});return Y.exports.createElement(s,vt({className:Lr(i.root,i["color".concat(ni(p.color||"primary"))],o,p.disabled&&i.disabled,p.error&&i.error,p.filled&&i.filled,p.focused&&i.focused,p.required&&i.required),ref:r},l),n,p.required&&Y.exports.createElement("span",{"aria-hidden":!0,className:Lr(i.asterisk,p.error&&i.error)},"\u2009","*"))}),vSe=Dn(mSe,{name:"MuiFormLabel"})(gSe),ySe=[0,1,2,3,4,5,6,7,8,9,10],xSe=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12];function _Se(t,e,r){var n={};xSe.forEach(function(i){var o="grid-".concat(r,"-").concat(i);if(i===!0){n[o]={flexBasis:0,flexGrow:1,maxWidth:"100%"};return}if(i==="auto"){n[o]={flexBasis:"auto",flexGrow:0,maxWidth:"none"};return}var a="".concat(Math.round(i/12*1e8)/1e6,"%");n[o]={flexBasis:a,flexGrow:0,maxWidth:a}}),r==="xs"?vt(t,n):t[e.breakpoints.up(r)]=n}function Y8(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,r=parseFloat(t);return"".concat(r/e).concat(String(t).replace(String(r),"")||"px")}function bSe(t,e){var r={};return ySe.forEach(function(n){var i=t.spacing(n);i!==0&&(r["spacing-".concat(e,"-").concat(n)]={margin:"-".concat(Y8(i,2)),width:"calc(100% + ".concat(Y8(i),")"),"& > $item":{padding:Y8(i,2)}})}),r}var wSe=function(e){return vt({root:{},container:{boxSizing:"border-box",display:"flex",flexWrap:"wrap",width:"100%"},item:{boxSizing:"border-box",margin:"0"},zeroMinWidth:{minWidth:0},"direction-xs-column":{flexDirection:"column"},"direction-xs-column-reverse":{flexDirection:"column-reverse"},"direction-xs-row-reverse":{flexDirection:"row-reverse"},"wrap-xs-nowrap":{flexWrap:"nowrap"},"wrap-xs-wrap-reverse":{flexWrap:"wrap-reverse"},"align-items-xs-center":{alignItems:"center"},"align-items-xs-flex-start":{alignItems:"flex-start"},"align-items-xs-flex-end":{alignItems:"flex-end"},"align-items-xs-baseline":{alignItems:"baseline"},"align-content-xs-center":{alignContent:"center"},"align-content-xs-flex-start":{alignContent:"flex-start"},"align-content-xs-flex-end":{alignContent:"flex-end"},"align-content-xs-space-between":{alignContent:"space-between"},"align-content-xs-space-around":{alignContent:"space-around"},"justify-content-xs-center":{justifyContent:"center"},"justify-content-xs-flex-end":{justifyContent:"flex-end"},"justify-content-xs-space-between":{justifyContent:"space-between"},"justify-content-xs-space-around":{justifyContent:"space-around"},"justify-content-xs-space-evenly":{justifyContent:"space-evenly"}},bSe(e,"xs"),e.breakpoints.keys.reduce(function(r,n){return _Se(r,e,n),r},{}))},CSe=Y.exports.forwardRef(function(e,r){var n=e.alignContent,i=n===void 0?"stretch":n,o=e.alignItems,a=o===void 0?"stretch":o,s=e.classes,l=e.className,u=e.component,p=u===void 0?"div":u,m=e.container,v=m===void 0?!1:m,x=e.direction,y=x===void 0?"row":x,_=e.item,w=_===void 0?!1:_,C=e.justify,E=e.justifyContent,T=E===void 0?"flex-start":E,A=e.lg,k=A===void 0?!1:A,X=e.md,Z=X===void 0?!1:X,W=e.sm,D=W===void 0?!1:W,H=e.spacing,N=H===void 0?0:H,j=e.wrap,$=j===void 0?"wrap":j,z=e.xl,O=z===void 0?!1:z,F=e.xs,G=F===void 0?!1:F,q=e.zeroMinWidth,ee=q===void 0?!1:q,re=nn(e,["alignContent","alignItems","classes","className","component","container","direction","item","justify","justifyContent","lg","md","sm","spacing","wrap","xl","xs","zeroMinWidth"]),ce=Lr(s.root,l,v&&[s.container,N!==0&&s["spacing-xs-".concat(String(N))]],w&&s.item,ee&&s.zeroMinWidth,y!=="row"&&s["direction-xs-".concat(String(y))],$!=="wrap"&&s["wrap-xs-".concat(String($))],a!=="stretch"&&s["align-items-xs-".concat(String(a))],i!=="stretch"&&s["align-content-xs-".concat(String(i))],(C||T)!=="flex-start"&&s["justify-content-xs-".concat(String(C||T))],G!==!1&&s["grid-xs-".concat(String(G))],D!==!1&&s["grid-sm-".concat(String(D))],Z!==!1&&s["grid-md-".concat(String(Z))],k!==!1&&s["grid-lg-".concat(String(k))],O!==!1&&s["grid-xl-".concat(String(O))]);return Y.exports.createElement(p,vt({className:ce,ref:r},re))}),ESe=Dn(wSe,{name:"MuiGrid"})(CSe),CAt=ESe,SSe={root:{boxSizing:"border-box",flexShrink:0},tile:{position:"relative",display:"block",height:"100%",overflow:"hidden"},imgFullHeight:{height:"100%",transform:"translateX(-50%)",position:"relative",left:"50%"},imgFullWidth:{width:"100%",position:"relative",transform:"translateY(-50%)",top:"50%"}},K8=function(e,r){if(!(!e||!e.complete))if(e.width/e.height>e.parentElement.offsetWidth/e.parentElement.offsetHeight){var n,i;(n=e.classList).remove.apply(n,uy(r.imgFullWidth.split(" "))),(i=e.classList).add.apply(i,uy(r.imgFullHeight.split(" ")))}else{var o,a;(o=e.classList).remove.apply(o,uy(r.imgFullHeight.split(" "))),(a=e.classList).add.apply(a,uy(r.imgFullWidth.split(" ")))}};function TSe(t,e){!t||(t.complete?K8(t,e):t.addEventListener("load",function(){K8(t,e)}))}var PSe=Y.exports.forwardRef(function(e,r){var n=e.children,i=e.classes,o=e.className;e.cols;var a=e.component,s=a===void 0?"li":a;e.rows;var l=nn(e,["children","classes","className","cols","component","rows"]),u=Y.exports.useRef(null);return Y.exports.useEffect(function(){TSe(u.current,i)}),Y.exports.useEffect(function(){var p=px(function(){K8(u.current,i)});return window.addEventListener("resize",p),function(){p.clear(),window.removeEventListener("resize",p)}},[i]),Y.exports.createElement(s,vt({className:Lr(i.root,o),ref:r},l),Y.exports.createElement("div",{className:i.tile},Y.exports.Children.map(n,function(p){return Y.exports.isValidElement(p)?p.type==="img"||L1(p,["Image"])?Y.exports.cloneElement(p,{ref:u}):p:null})))}),EAt=Dn(SSe,{name:"MuiGridListTile"})(PSe),ISe=function(e){return{root:{position:"absolute",left:0,right:0,height:48,background:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",fontFamily:e.typography.fontFamily},titlePositionBottom:{bottom:0},titlePositionTop:{top:0},rootSubtitle:{height:68},titleWrap:{flexGrow:1,marginLeft:16,marginRight:16,color:e.palette.common.white,overflow:"hidden"},titleWrapActionPosLeft:{marginLeft:0},titleWrapActionPosRight:{marginRight:0},title:{fontSize:e.typography.pxToRem(16),lineHeight:"24px",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},subtitle:{fontSize:e.typography.pxToRem(12),lineHeight:1,textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},actionIcon:{},actionIconActionPosLeft:{order:-1}}},MSe=Y.exports.forwardRef(function(e,r){var n=e.actionIcon,i=e.actionPosition,o=i===void 0?"right":i,a=e.classes,s=e.className,l=e.subtitle,u=e.title,p=e.titlePosition,m=p===void 0?"bottom":p,v=nn(e,["actionIcon","actionPosition","classes","className","subtitle","title","titlePosition"]),x=n&&o;return Y.exports.createElement("div",vt({className:Lr(a.root,s,m==="top"?a.titlePositionTop:a.titlePositionBottom,l&&a.rootSubtitle),ref:r},v),Y.exports.createElement("div",{className:Lr(a.titleWrap,{left:a.titleWrapActionPosLeft,right:a.titleWrapActionPosRight}[x])},Y.exports.createElement("div",{className:a.title},u),l?Y.exports.createElement("div",{className:a.subtitle},l):null),n?Y.exports.createElement("div",{className:Lr(a.actionIcon,x==="left"&&a.actionIconActionPosLeft)},n):null)}),SAt=Dn(ISe,{name:"MuiGridListTileBar"})(MSe);function Z8(t){return"scale(".concat(t,", ").concat(Math.pow(t,2),")")}var ASe={entering:{opacity:1,transform:Z8(1)},entered:{opacity:1,transform:"none"}},XQ=Y.exports.forwardRef(function(e,r){var n=e.children,i=e.disableStrictModeCompat,o=i===void 0?!1:i,a=e.in,s=e.onEnter,l=e.onEntered,u=e.onEntering,p=e.onExit,m=e.onExited,v=e.onExiting,x=e.style,y=e.timeout,_=y===void 0?"auto":y,w=e.TransitionComponent,C=w===void 0?BP:w,E=nn(e,["children","disableStrictModeCompat","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"]),T=Y.exports.useRef(),A=Y.exports.useRef(),k=zg(),X=k.unstable_strictMode&&!o,Z=Y.exports.useRef(null),W=Fo(n.ref,r),D=Fo(X?Z:void 0,W),H=function(ee){return function(re,ce){if(ee){var fe=X?[Z.current,re]:[re,ce],J=qf(fe,2),oe=J[0],ve=J[1];ve===void 0?ee(oe):ee(oe,ve)}}},N=H(u),j=H(function(q,ee){vL(q);var re=jg({style:x,timeout:_},{mode:"enter"}),ce=re.duration,fe=re.delay,J;_==="auto"?(J=k.transitions.getAutoHeightDuration(q.clientHeight),A.current=J):J=ce,q.style.transition=[k.transitions.create("opacity",{duration:J,delay:fe}),k.transitions.create("transform",{duration:J*.666,delay:fe})].join(","),s&&s(q,ee)}),$=H(l),z=H(v),O=H(function(q){var ee=jg({style:x,timeout:_},{mode:"exit"}),re=ee.duration,ce=ee.delay,fe;_==="auto"?(fe=k.transitions.getAutoHeightDuration(q.clientHeight),A.current=fe):fe=re,q.style.transition=[k.transitions.create("opacity",{duration:fe,delay:ce}),k.transitions.create("transform",{duration:fe*.666,delay:ce||fe*.333})].join(","),q.style.opacity="0",q.style.transform=Z8(.75),p&&p(q)}),F=H(m),G=function(ee,re){var ce=X?ee:re;_==="auto"&&(T.current=setTimeout(ce,A.current||0))};return Y.exports.useEffect(function(){return function(){clearTimeout(T.current)}},[]),Y.exports.createElement(C,vt({appear:!0,in:a,nodeRef:X?Z:void 0,onEnter:j,onEntered:$,onEntering:N,onExit:O,onExited:F,onExiting:z,addEndListener:G,timeout:_==="auto"?null:_},E),function(q,ee){return Y.exports.cloneElement(n,vt({style:vt({opacity:0,transform:Z8(.75),visibility:q==="exited"&&!a?"hidden":void 0},ASe[q],x,n.props.style),ref:D},ee))})});XQ.muiSupportAuto=!0;var Q8=XQ,RSe=function(e){var r=e.palette.type==="light",n=r?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return{root:{position:"relative"},formControl:{"label + &":{marginTop:16}},focused:{},disabled:{},colorSecondary:{"&$underline:after":{borderBottomColor:e.palette.secondary.main}},underline:{"&:after":{borderBottom:"2px solid ".concat(e.palette.primary.main),left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},"&$focused:after":{transform:"scaleX(1)"},"&$error:after":{borderBottomColor:e.palette.error.main,transform:"scaleX(1)"},"&:before":{borderBottom:"1px solid ".concat(n),left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},"&:hover:not($disabled):before":{borderBottom:"2px solid ".concat(e.palette.text.primary),"@media (hover: none)":{borderBottom:"1px solid ".concat(n)}},"&$disabled:before":{borderBottomStyle:"dotted"}},error:{},marginDense:{},multiline:{},fullWidth:{},input:{},inputMarginDense:{},inputMultiline:{},inputTypeSearch:{}}},YQ=Y.exports.forwardRef(function(e,r){var n=e.disableUnderline,i=e.classes,o=e.fullWidth,a=o===void 0?!1:o,s=e.inputComponent,l=s===void 0?"input":s,u=e.multiline,p=u===void 0?!1:u,m=e.type,v=m===void 0?"text":m,x=nn(e,["disableUnderline","classes","fullWidth","inputComponent","multiline","type"]);return Y.exports.createElement(X8,vt({classes:vt({},i,{root:Lr(i.root,!n&&i.underline),underline:null}),fullWidth:a,inputComponent:l,multiline:p,ref:r,type:v},x))});YQ.muiName="Input";var J8=Dn(RSe,{name:"MuiInput"})(YQ),kSe=function(e){return{root:{display:"block",transformOrigin:"top left"},focused:{},disabled:{},error:{},required:{},asterisk:{},formControl:{position:"absolute",left:0,top:0,transform:"translate(0, 24px) scale(1)"},marginDense:{transform:"translate(0, 21px) scale(1)"},shrink:{transform:"translate(0, 1.5px) scale(0.75)",transformOrigin:"top left"},animated:{transition:e.transitions.create(["color","transform"],{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut})},filled:{zIndex:1,pointerEvents:"none",transform:"translate(12px, 20px) scale(1)","&$marginDense":{transform:"translate(12px, 17px) scale(1)"},"&$shrink":{transform:"translate(12px, 10px) scale(0.75)","&$marginDense":{transform:"translate(12px, 7px) scale(0.75)"}}},outlined:{zIndex:1,pointerEvents:"none",transform:"translate(14px, 20px) scale(1)","&$marginDense":{transform:"translate(14px, 12px) scale(1)"},"&$shrink":{transform:"translate(14px, -6px) scale(0.75)"}}}},OSe=Y.exports.forwardRef(function(e,r){var n=e.classes,i=e.className,o=e.disableAnimation,a=o===void 0?!1:o;e.margin;var s=e.shrink;e.variant;var l=nn(e,["classes","className","disableAnimation","margin","shrink","variant"]),u=z1(),p=s;typeof p=="undefined"&&u&&(p=u.filled||u.focused||u.adornedStart);var m=X2({props:e,muiFormControl:u,states:["margin","variant"]});return Y.exports.createElement(vSe,vt({"data-shrink":p,className:Lr(n.root,i,u&&n.formControl,!a&&n.animated,p&&n.shrink,m.margin==="dense"&&n.marginDense,{filled:n.filled,outlined:n.outlined}[m.variant]),classes:{focused:n.focused,disabled:n.disabled,error:n.error,required:n.required,asterisk:n.asterisk},ref:r},l))}),LSe=Dn(kSe,{name:"MuiInputLabel"})(OSe),DSe={root:{},underlineNone:{textDecoration:"none"},underlineHover:{textDecoration:"none","&:hover":{textDecoration:"underline"}},underlineAlways:{textDecoration:"underline"},button:{position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle","-moz-appearance":"none","-webkit-appearance":"none","&::-moz-focus-inner":{borderStyle:"none"},"&$focusVisible":{outline:"auto"}},focusVisible:{}},NSe=Y.exports.forwardRef(function(e,r){var n=e.classes,i=e.className,o=e.color,a=o===void 0?"primary":o,s=e.component,l=s===void 0?"a":s,u=e.onBlur,p=e.onFocus,m=e.TypographyClasses,v=e.underline,x=v===void 0?"hover":v,y=e.variant,_=y===void 0?"inherit":y,w=nn(e,["classes","className","color","component","onBlur","onFocus","TypographyClasses","underline","variant"]),C=FP(),E=C.isFocusVisible,T=C.onBlurVisible,A=C.ref,k=Y.exports.useState(!1),X=k[0],Z=k[1],W=Fo(r,A),D=function(j){X&&(T(),Z(!1)),u&&u(j)},H=function(j){E(j)&&Z(!0),p&&p(j)};return Y.exports.createElement(U8,vt({className:Lr(n.root,n["underline".concat(ni(x))],i,X&&n.focusVisible,l==="button"&&n.button),classes:m,color:a,component:l,onBlur:D,onFocus:H,ref:W,variant:_},w))}),TAt=Dn(DSe,{name:"MuiLink"})(NSe),$Se=Y.exports.createContext({}),_L=$Se,FSe={root:{listStyle:"none",margin:0,padding:0,position:"relative"},padding:{paddingTop:8,paddingBottom:8},dense:{},subheader:{paddingTop:0}},zSe=Y.exports.forwardRef(function(e,r){var n=e.children,i=e.classes,o=e.className,a=e.component,s=a===void 0?"ul":a,l=e.dense,u=l===void 0?!1:l,p=e.disablePadding,m=p===void 0?!1:p,v=e.subheader,x=nn(e,["children","classes","className","component","dense","disablePadding","subheader"]),y=Y.exports.useMemo(function(){return{dense:u}},[u]);return Y.exports.createElement(_L.Provider,{value:y},Y.exports.createElement(s,vt({className:Lr(i.root,o,u&&i.dense,!m&&i.padding,v&&i.subheader),ref:r},x),v,n))}),BSe=Dn(FSe,{name:"MuiList"})(zSe),jSe=function(e){return{root:{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,"&$focusVisible":{backgroundColor:e.palette.action.selected},"&$selected, &$selected:hover":{backgroundColor:e.palette.action.selected},"&$disabled":{opacity:.5}},container:{position:"relative"},focusVisible:{},dense:{paddingTop:4,paddingBottom:4},alignItemsFlexStart:{alignItems:"flex-start"},disabled:{},divider:{borderBottom:"1px solid ".concat(e.palette.divider),backgroundClip:"padding-box"},gutters:{paddingLeft:16,paddingRight:16},button:{transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:e.palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}}},secondaryAction:{paddingRight:48},selected:{}}},USe=typeof window=="undefined"?Y.exports.useEffect:Y.exports.useLayoutEffect,VSe=Y.exports.forwardRef(function(e,r){var n=e.alignItems,i=n===void 0?"center":n,o=e.autoFocus,a=o===void 0?!1:o,s=e.button,l=s===void 0?!1:s,u=e.children,p=e.classes,m=e.className,v=e.component,x=e.ContainerComponent,y=x===void 0?"li":x,_=e.ContainerProps;_=_===void 0?{}:_;var w=_.className,C=nn(_,["className"]),E=e.dense,T=E===void 0?!1:E,A=e.disabled,k=A===void 0?!1:A,X=e.disableGutters,Z=X===void 0?!1:X,W=e.divider,D=W===void 0?!1:W,H=e.focusVisibleClassName,N=e.selected,j=N===void 0?!1:N,$=nn(e,["alignItems","autoFocus","button","children","classes","className","component","ContainerComponent","ContainerProps","dense","disabled","disableGutters","divider","focusVisibleClassName","selected"]),z=Y.exports.useContext(_L),O={dense:T||z.dense||!1,alignItems:i},F=Y.exports.useRef(null);USe(function(){a&&F.current&&F.current.focus()},[a]);var G=Y.exports.Children.toArray(u),q=G.length&&L1(G[G.length-1],["ListItemSecondaryAction"]),ee=Y.exports.useCallback(function(J){F.current=Wa.exports.findDOMNode(J)},[]),re=Fo(ee,r),ce=vt({className:Lr(p.root,m,O.dense&&p.dense,!Z&&p.gutters,D&&p.divider,k&&p.disabled,l&&p.button,i!=="center"&&p.alignItemsFlexStart,q&&p.secondaryAction,j&&p.selected),disabled:k},$),fe=v||"li";return l&&(ce.component=v||"div",ce.focusVisibleClassName=Lr(p.focusVisible,H),fe=my),q?(fe=!ce.component&&!v?"div":fe,y==="li"&&(fe==="li"?fe="div":ce.component==="li"&&(ce.component="div")),Y.exports.createElement(_L.Provider,{value:O},Y.exports.createElement(y,vt({className:Lr(p.container,w),ref:re},C),Y.exports.createElement(fe,ce,G),G.pop()))):Y.exports.createElement(_L.Provider,{value:O},Y.exports.createElement(fe,vt({ref:re},ce),G))}),HSe=Dn(jSe,{name:"MuiListItem"})(VSe),WSe=function(e){return{root:{boxSizing:"border-box",lineHeight:"48px",listStyle:"none",color:e.palette.text.secondary,fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(14)},colorPrimary:{color:e.palette.primary.main},colorInherit:{color:"inherit"},gutters:{paddingLeft:16,paddingRight:16},inset:{paddingLeft:72},sticky:{position:"sticky",top:0,zIndex:1,backgroundColor:"inherit"}}},GSe=Y.exports.forwardRef(function(e,r){var n=e.classes,i=e.className,o=e.color,a=o===void 0?"default":o,s=e.component,l=s===void 0?"li":s,u=e.disableGutters,p=u===void 0?!1:u,m=e.disableSticky,v=m===void 0?!1:m,x=e.inset,y=x===void 0?!1:x,_=nn(e,["classes","className","color","component","disableGutters","disableSticky","inset"]);return Y.exports.createElement(l,vt({className:Lr(n.root,i,a!=="default"&&n["color".concat(ni(a))],y&&n.inset,!v&&n.sticky,!p&&n.gutters),ref:r},_))}),qSe=Dn(WSe,{name:"MuiListSubheader"})(GSe);function KQ(t,e){var r=0;return typeof e=="number"?r=e:e==="center"?r=t.height/2:e==="bottom"&&(r=t.height),r}function ZQ(t,e){var r=0;return typeof e=="number"?r=e:e==="center"?r=t.width/2:e==="right"&&(r=t.width),r}function QQ(t){return[t.horizontal,t.vertical].map(function(e){return typeof e=="number"?"".concat(e,"px"):e}).join(" ")}function XSe(t,e){for(var r=e,n=0;r&&r!==t;)r=r.parentElement,n+=r.scrollTop;return n}function e9(t){return typeof t=="function"?t():t}var YSe={root:{},paper:{position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}},KSe=Y.exports.forwardRef(function(e,r){var n=e.action,i=e.anchorEl,o=e.anchorOrigin,a=o===void 0?{vertical:"top",horizontal:"left"}:o,s=e.anchorPosition,l=e.anchorReference,u=l===void 0?"anchorEl":l,p=e.children,m=e.classes,v=e.className,x=e.container,y=e.elevation,_=y===void 0?8:y,w=e.getContentAnchorEl,C=e.marginThreshold,E=C===void 0?16:C,T=e.onEnter,A=e.onEntered,k=e.onEntering,X=e.onExit,Z=e.onExited,W=e.onExiting,D=e.open,H=e.PaperProps,N=H===void 0?{}:H,j=e.transformOrigin,$=j===void 0?{vertical:"top",horizontal:"left"}:j,z=e.TransitionComponent,O=z===void 0?Q8:z,F=e.transitionDuration,G=F===void 0?"auto":F,q=e.TransitionProps,ee=q===void 0?{}:q,re=nn(e,["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","classes","className","container","elevation","getContentAnchorEl","marginThreshold","onEnter","onEntered","onEntering","onExit","onExited","onExiting","open","PaperProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps"]),ce=Y.exports.useRef(),fe=Y.exports.useCallback(function(Ce){if(u==="anchorPosition")return s;var Pe=e9(i),Re=Pe&&Pe.nodeType===1?Pe:jc(ce.current).body,ke=Re.getBoundingClientRect(),ze=Ce===0?a.vertical:"center";return{top:ke.top+KQ(ke,ze),left:ke.left+ZQ(ke,a.horizontal)}},[i,a.horizontal,a.vertical,s,u]),J=Y.exports.useCallback(function(Ce){var Pe=0;if(w&&u==="anchorEl"){var Re=w(Ce);if(Re&&Ce.contains(Re)){var ke=XSe(Ce,Re);Pe=Re.offsetTop+Re.clientHeight/2-ke||0}}return Pe},[a.vertical,u,w]),oe=Y.exports.useCallback(function(Ce){var Pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return{vertical:KQ(Ce,$.vertical)+Pe,horizontal:ZQ(Ce,$.horizontal)}},[$.horizontal,$.vertical]),ve=Y.exports.useCallback(function(Ce){var Pe=J(Ce),Re={width:Ce.offsetWidth,height:Ce.offsetHeight},ke=oe(Re,Pe);if(u==="none")return{top:null,left:null,transformOrigin:QQ(ke)};var ze=fe(Pe),Ge=ze.top-ke.vertical,ht=ze.left-ke.horizontal,Tt=Ge+Re.height,xt=ht+Re.width,pt=hL(e9(i)),It=pt.innerHeight-E,Ie=pt.innerWidth-E;if(Ge<E){var de=Ge-E;Ge-=de,ke.vertical+=de}else if(Tt>It){var Te=Tt-It;Ge-=Te,ke.vertical+=Te}if(ht<E){var Be=ht-E;ht-=Be,ke.horizontal+=Be}else if(xt>Ie){var Ke=xt-Ie;ht-=Ke,ke.horizontal+=Ke}return{top:"".concat(Math.round(Ge),"px"),left:"".concat(Math.round(ht),"px"),transformOrigin:QQ(ke)}},[i,u,fe,J,oe,E]),ye=Y.exports.useCallback(function(){var Ce=ce.current;if(!!Ce){var Pe=ve(Ce);Pe.top!==null&&(Ce.style.top=Pe.top),Pe.left!==null&&(Ce.style.left=Pe.left),Ce.style.transformOrigin=Pe.transformOrigin}},[ve]),xe=function(Pe,Re){k&&k(Pe,Re),ye()},se=Y.exports.useCallback(function(Ce){ce.current=Wa.exports.findDOMNode(Ce)},[]);Y.exports.useEffect(function(){D&&ye()}),Y.exports.useImperativeHandle(n,function(){return D?{updatePosition:function(){ye()}}:null},[D,ye]),Y.exports.useEffect(function(){if(!!D){var Ce=px(function(){ye()});return window.addEventListener("resize",Ce),function(){Ce.clear(),window.removeEventListener("resize",Ce)}}},[D,ye]);var me=G;G==="auto"&&!O.muiSupportAuto&&(me=void 0);var pe=x||(i?jc(e9(i)).body:void 0);return Y.exports.createElement(VQ,vt({container:pe,open:D,ref:r,BackdropProps:{invisible:!0},className:Lr(m.root,v)},re),Y.exports.createElement(O,vt({appear:!0,in:D,onEnter:T,onEntered:A,onExit:X,onExited:Z,onExiting:W,timeout:me},ee,{onEntering:dy(xe,ee.onEntering)}),Y.exports.createElement(F1,vt({elevation:_,ref:se},N,{className:Lr(m.paper,N.className)}),p)))}),ZSe=Dn(YSe,{name:"MuiPopover"})(KSe);function t9(t,e,r){return t===e?t.firstChild:e&&e.nextElementSibling?e.nextElementSibling:r?null:t.firstChild}function JQ(t,e,r){return t===e?r?t.firstChild:t.lastChild:e&&e.previousElementSibling?e.previousElementSibling:r?null:t.lastChild}function eJ(t,e){if(e===void 0)return!0;var r=t.innerText;return r===void 0&&(r=t.textContent),r=r.trim().toLowerCase(),r.length===0?!1:e.repeating?r[0]===e.keys[0]:r.indexOf(e.keys.join(""))===0}function VP(t,e,r,n,i,o){for(var a=!1,s=i(t,e,e?r:!1);s;){if(s===t.firstChild){if(a)return;a=!0}var l=n?!1:s.disabled||s.getAttribute("aria-disabled")==="true";if(!s.hasAttribute("tabindex")||!eJ(s,o)||l)s=i(t,s,r);else{s.focus();return}}}var QSe=typeof window=="undefined"?Y.exports.useEffect:Y.exports.useLayoutEffect,JSe=Y.exports.forwardRef(function(e,r){var n=e.actions,i=e.autoFocus,o=i===void 0?!1:i,a=e.autoFocusItem,s=a===void 0?!1:a,l=e.children,u=e.className,p=e.disabledItemsFocusable,m=p===void 0?!1:p,v=e.disableListWrap,x=v===void 0?!1:v,y=e.onKeyDown,_=e.variant,w=_===void 0?"selectedMenu":_,C=nn(e,["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"]),E=Y.exports.useRef(null),T=Y.exports.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});QSe(function(){o&&E.current.focus()},[o]),Y.exports.useImperativeHandle(n,function(){return{adjustStyleForScrollbar:function(H,N){var j=!E.current.style.width;if(H.clientHeight<E.current.clientHeight&&j){var $="".concat(zQ(),"px");E.current.style[N.direction==="rtl"?"paddingLeft":"paddingRight"]=$,E.current.style.width="calc(100% + ".concat($,")")}return E.current}}},[]);var A=function(H){var N=E.current,j=H.key,$=jc(N).activeElement;if(j==="ArrowDown")H.preventDefault(),VP(N,$,x,m,t9);else if(j==="ArrowUp")H.preventDefault(),VP(N,$,x,m,JQ);else if(j==="Home")H.preventDefault(),VP(N,null,x,m,t9);else if(j==="End")H.preventDefault(),VP(N,null,x,m,JQ);else if(j.length===1){var z=T.current,O=j.toLowerCase(),F=performance.now();z.keys.length>0&&(F-z.lastTime>500?(z.keys=[],z.repeating=!0,z.previousKeyMatched=!0):z.repeating&&O!==z.keys[0]&&(z.repeating=!1)),z.lastTime=F,z.keys.push(O);var G=$&&!z.repeating&&eJ($,z);z.previousKeyMatched&&(G||VP(N,$,!1,m,t9,z))?H.preventDefault():z.previousKeyMatched=!1}y&&y(H)},k=Y.exports.useCallback(function(D){E.current=Wa.exports.findDOMNode(D)},[]),X=Fo(k,r),Z=-1;Y.exports.Children.forEach(l,function(D,H){!Y.exports.isValidElement(D)||D.props.disabled||(w==="selectedMenu"&&D.props.selected||Z===-1)&&(Z=H)});var W=Y.exports.Children.map(l,function(D,H){if(H===Z){var N={};return s&&(N.autoFocus=!0),D.props.tabIndex===void 0&&w==="selectedMenu"&&(N.tabIndex=0),Y.exports.cloneElement(D,N)}return D});return Y.exports.createElement(BSe,vt({role:"menu",ref:X,className:u,onKeyDown:A,tabIndex:o?0:-1},C),W)}),eTe=JSe,tJ={vertical:"top",horizontal:"right"},rJ={vertical:"top",horizontal:"left"},tTe={paper:{maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"},list:{outline:0}},rTe=Y.exports.forwardRef(function(e,r){var n=e.autoFocus,i=n===void 0?!0:n,o=e.children,a=e.classes,s=e.disableAutoFocusItem,l=s===void 0?!1:s,u=e.MenuListProps,p=u===void 0?{}:u,m=e.onClose,v=e.onEntering,x=e.open,y=e.PaperProps,_=y===void 0?{}:y,w=e.PopoverClasses,C=e.transitionDuration,E=C===void 0?"auto":C,T=e.TransitionProps;T=T===void 0?{}:T;var A=T.onEntering,k=nn(T,["onEntering"]),X=e.variant,Z=X===void 0?"selectedMenu":X,W=nn(e,["autoFocus","children","classes","disableAutoFocusItem","MenuListProps","onClose","onEntering","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant"]),D=zg(),H=i&&!l&&x,N=Y.exports.useRef(null),j=Y.exports.useRef(null),$=function(){return j.current},z=function(ee,re){N.current&&N.current.adjustStyleForScrollbar(ee,D),v&&v(ee,re),A&&A(ee,re)},O=function(ee){ee.key==="Tab"&&(ee.preventDefault(),m&&m(ee,"tabKeyDown"))},F=-1;Y.exports.Children.map(o,function(q,ee){!Y.exports.isValidElement(q)||q.props.disabled||(Z!=="menu"&&q.props.selected||F===-1)&&(F=ee)});var G=Y.exports.Children.map(o,function(q,ee){return ee===F?Y.exports.cloneElement(q,{ref:function(ce){j.current=Wa.exports.findDOMNode(ce),hy(q.ref,ce)}}):q});return Y.exports.createElement(ZSe,vt({getContentAnchorEl:$,classes:w,onClose:m,TransitionProps:vt({onEntering:z},k),anchorOrigin:D.direction==="rtl"?tJ:rJ,transformOrigin:D.direction==="rtl"?tJ:rJ,PaperProps:vt({},_,{classes:vt({},_.classes,{root:a.paper})}),open:x,ref:r,transitionDuration:E},W),Y.exports.createElement(eTe,vt({onKeyDown:O,actions:N,autoFocus:i&&(F===-1||l),autoFocusItem:H,variant:Z},p,{className:Lr(a.list,p.className)}),G))}),nTe=Dn(tTe,{name:"MuiMenu"})(rTe),iTe=function(e){return{root:vt({},e.typography.body1,Fi({minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",width:"auto",overflow:"hidden",whiteSpace:"nowrap"},e.breakpoints.up("sm"),{minHeight:"auto"})),gutters:{},selected:{},dense:vt({},e.typography.body2,{minHeight:"auto"})}},oTe=Y.exports.forwardRef(function(e,r){var n=e.classes,i=e.className,o=e.component,a=o===void 0?"li":o,s=e.disableGutters,l=s===void 0?!1:s,u=e.ListItemClasses,p=e.role,m=p===void 0?"menuitem":p,v=e.selected,x=e.tabIndex,y=nn(e,["classes","className","component","disableGutters","ListItemClasses","role","selected","tabIndex"]),_;return e.disabled||(_=x!==void 0?x:-1),Y.exports.createElement(HSe,vt({button:!0,role:m,tabIndex:_,component:a,selected:v,disableGutters:l,classes:vt({dense:n.dense},u),className:Lr(n.root,i,v&&n.selected,!l&&n.gutters),ref:r},y))}),PAt=Dn(iTe,{name:"MuiMenuItem"})(oTe),sTe=Y.exports.forwardRef(function(e,r){var n=e.classes,i=e.className,o=e.disabled,a=e.IconComponent,s=e.inputRef,l=e.variant,u=l===void 0?"standard":l,p=nn(e,["classes","className","disabled","IconComponent","inputRef","variant"]);return Y.exports.createElement(Y.exports.Fragment,null,Y.exports.createElement("select",vt({className:Lr(n.root,n.select,n[u],i,o&&n.disabled),disabled:o,ref:s||r},p)),e.multiple?null:Y.exports.createElement(a,{className:Lr(n.icon,n["icon".concat(ni(u))],o&&n.disabled)}))}),nJ=sTe,iJ=Ro(Y.exports.createElement("path",{d:"M7 10l5 5 5-5z"})),oJ=function(e){return{root:{},select:{"-moz-appearance":"none","-webkit-appearance":"none",userSelect:"none",borderRadius:0,minWidth:16,cursor:"pointer","&:focus":{backgroundColor:e.palette.type==="light"?"rgba(0, 0, 0, 0.05)":"rgba(255, 255, 255, 0.05)",borderRadius:0},"&::-ms-expand":{display:"none"},"&$disabled":{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:e.palette.background.paper},"&&":{paddingRight:24}},filled:{"&&":{paddingRight:32}},outlined:{borderRadius:e.shape.borderRadius,"&&":{paddingRight:32}},selectMenu:{height:"auto",minHeight:"1.1876em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"},disabled:{},icon:{position:"absolute",right:0,top:"calc(50% - 12px)",pointerEvents:"none",color:e.palette.action.active,"&$disabled":{color:e.palette.action.disabled}},iconOpen:{transform:"rotate(180deg)"},iconFilled:{right:7},iconOutlined:{right:7},nativeInput:{bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%"}}},aTe=Y.exports.createElement(J8,null),sJ=Y.exports.forwardRef(function(e,r){var n=e.children,i=e.classes,o=e.IconComponent,a=o===void 0?iJ:o,s=e.input,l=s===void 0?aTe:s,u=e.inputProps;e.variant;var p=nn(e,["children","classes","IconComponent","input","inputProps","variant"]),m=z1(),v=X2({props:e,muiFormControl:m,states:["variant"]});return Y.exports.cloneElement(l,vt({inputComponent:nJ,inputProps:vt({children:n,classes:i,IconComponent:a,variant:v.variant,type:void 0},u,l?l.props.inputProps:{}),ref:r},p))});sJ.muiName="Select";Dn(oJ,{name:"MuiNativeSelect"})(sJ);var lTe=function(e){return{root:{position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden"},legend:{textAlign:"left",padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})},legendLabelled:{display:"block",width:"auto",textAlign:"left",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:e.transitions.create("max-width",{duration:50,easing:e.transitions.easing.easeOut}),"& > span":{paddingLeft:5,paddingRight:5,display:"inline-block"}},legendNotched:{maxWidth:1e3,transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}},cTe=Y.exports.forwardRef(function(e,r){e.children;var n=e.classes,i=e.className,o=e.label,a=e.labelWidth,s=e.notched,l=e.style,u=nn(e,["children","classes","className","label","labelWidth","notched","style"]),p=zg(),m=p.direction==="rtl"?"right":"left";if(o!==void 0)return Y.exports.createElement("fieldset",vt({"aria-hidden":!0,className:Lr(n.root,i),ref:r,style:l},u),Y.exports.createElement("legend",{className:Lr(n.legendLabelled,s&&n.legendNotched)},o?Y.exports.createElement("span",null,o):Y.exports.createElement("span",{dangerouslySetInnerHTML:{__html:"​"}})));var v=a>0?a*.75+8:.01;return Y.exports.createElement("fieldset",vt({"aria-hidden":!0,style:vt(Fi({},"padding".concat(ni(m)),8),l),className:Lr(n.root,i),ref:r},u),Y.exports.createElement("legend",{className:n.legend,style:{width:s?v:.01}},Y.exports.createElement("span",{dangerouslySetInnerHTML:{__html:"​"}})))}),uTe=Dn(lTe,{name:"PrivateNotchedOutline"})(cTe),fTe=function(e){var r=e.palette.type==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{root:{position:"relative",borderRadius:e.shape.borderRadius,"&:hover $notchedOutline":{borderColor:e.palette.text.primary},"@media (hover: none)":{"&:hover $notchedOutline":{borderColor:r}},"&$focused $notchedOutline":{borderColor:e.palette.primary.main,borderWidth:2},"&$error $notchedOutline":{borderColor:e.palette.error.main},"&$disabled $notchedOutline":{borderColor:e.palette.action.disabled}},colorSecondary:{"&$focused $notchedOutline":{borderColor:e.palette.secondary.main}},focused:{},disabled:{},adornedStart:{paddingLeft:14},adornedEnd:{paddingRight:14},error:{},marginDense:{},multiline:{padding:"18.5px 14px","&$marginDense":{paddingTop:10.5,paddingBottom:10.5}},notchedOutline:{borderColor:r},input:{padding:"18.5px 14px","&:-webkit-autofill":{WebkitBoxShadow:e.palette.type==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.type==="light"?null:"#fff",caretColor:e.palette.type==="light"?null:"#fff",borderRadius:"inherit"}},inputMarginDense:{paddingTop:10.5,paddingBottom:10.5},inputMultiline:{padding:0},inputAdornedStart:{paddingLeft:0},inputAdornedEnd:{paddingRight:0}}},aJ=Y.exports.forwardRef(function(e,r){var n=e.classes,i=e.fullWidth,o=i===void 0?!1:i,a=e.inputComponent,s=a===void 0?"input":a,l=e.label,u=e.labelWidth,p=u===void 0?0:u,m=e.multiline,v=m===void 0?!1:m,x=e.notched,y=e.type,_=y===void 0?"text":y,w=nn(e,["classes","fullWidth","inputComponent","label","labelWidth","multiline","notched","type"]);return Y.exports.createElement(X8,vt({renderSuffix:function(E){return Y.exports.createElement(uTe,{className:n.notchedOutline,label:l,labelWidth:p,notched:typeof x!="undefined"?x:Boolean(E.startAdornment||E.filled||E.focused)})},classes:vt({},n,{root:Lr(n.root,n.underline),notchedOutline:null}),fullWidth:o,inputComponent:s,multiline:v,ref:r,type:_},w))});aJ.muiName="Input";var lJ=Dn(fTe,{name:"MuiOutlinedInput"})(aJ);/**! * @fileOverview Kickass library to create and place poppers near their reference elements. * @version 1.16.1-lts * @license * Copyright (c) 2016 Federico Zivolo and contributors * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */var HP=typeof window!="undefined"&&typeof document!="undefined"&&typeof navigator!="undefined",dTe=function(){for(var t=["Edge","Trident","Firefox"],e=0;e<t.length;e+=1)if(HP&&navigator.userAgent.indexOf(t[e])>=0)return 1;return 0}();function hTe(t){var e=!1;return function(){e||(e=!0,window.Promise.resolve().then(function(){e=!1,t()}))}}function pTe(t){var e=!1;return function(){e||(e=!0,setTimeout(function(){e=!1,t()},dTe))}}var mTe=HP&&window.Promise,gTe=mTe?hTe:pTe;function cJ(t){var e={};return t&&e.toString.call(t)==="[object Function]"}function B1(t,e){if(t.nodeType!==1)return[];var r=t.ownerDocument.defaultView,n=r.getComputedStyle(t,null);return e?n[e]:n}function r9(t){return t.nodeName==="HTML"?t:t.parentNode||t.host}function WP(t){if(!t)return document.body;switch(t.nodeName){case"HTML":case"BODY":return t.ownerDocument.body;case"#document":return t.body}var e=B1(t),r=e.overflow,n=e.overflowX,i=e.overflowY;return/(auto|scroll|overlay)/.test(r+i+n)?t:WP(r9(t))}function uJ(t){return t&&t.referenceNode?t.referenceNode:t}var fJ=HP&&!!(window.MSInputMethodContext&&document.documentMode),dJ=HP&&/MSIE 10/.test(navigator.userAgent);function Y2(t){return t===11?fJ:t===10?dJ:fJ||dJ}function K2(t){if(!t)return document.documentElement;for(var e=Y2(10)?document.body:null,r=t.offsetParent||null;r===e&&t.nextElementSibling;)r=(t=t.nextElementSibling).offsetParent;var n=r&&r.nodeName;return!n||n==="BODY"||n==="HTML"?t?t.ownerDocument.documentElement:document.documentElement:["TH","TD","TABLE"].indexOf(r.nodeName)!==-1&&B1(r,"position")==="static"?K2(r):r}function vTe(t){var e=t.nodeName;return e==="BODY"?!1:e==="HTML"||K2(t.firstElementChild)===t}function n9(t){return t.parentNode!==null?n9(t.parentNode):t}function bL(t,e){if(!t||!t.nodeType||!e||!e.nodeType)return document.documentElement;var r=t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING,n=r?t:e,i=r?e:t,o=document.createRange();o.setStart(n,0),o.setEnd(i,0);var a=o.commonAncestorContainer;if(t!==a&&e!==a||n.contains(i))return vTe(a)?a:K2(a);var s=n9(t);return s.host?bL(s.host,e):bL(t,n9(e).host)}function Z2(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"top",r=e==="top"?"scrollTop":"scrollLeft",n=t.nodeName;if(n==="BODY"||n==="HTML"){var i=t.ownerDocument.documentElement,o=t.ownerDocument.scrollingElement||i;return o[r]}return t[r]}function yTe(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,n=Z2(e,"top"),i=Z2(e,"left"),o=r?-1:1;return t.top+=n*o,t.bottom+=n*o,t.left+=i*o,t.right+=i*o,t}function hJ(t,e){var r=e==="x"?"Left":"Top",n=r==="Left"?"Right":"Bottom";return parseFloat(t["border"+r+"Width"])+parseFloat(t["border"+n+"Width"])}function pJ(t,e,r,n){return Math.max(e["offset"+t],e["scroll"+t],r["client"+t],r["offset"+t],r["scroll"+t],Y2(10)?parseInt(r["offset"+t])+parseInt(n["margin"+(t==="Height"?"Top":"Left")])+parseInt(n["margin"+(t==="Height"?"Bottom":"Right")]):0)}function mJ(t){var e=t.body,r=t.documentElement,n=Y2(10)&&getComputedStyle(r);return{height:pJ("Height",e,r,n),width:pJ("Width",e,r,n)}}var xTe=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},_Te=function(){function t(e,r){for(var n=0;n<r.length;n++){var i=r[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),Q2=function(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t},Zh=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t};function gx(t){return Zh({},t,{right:t.left+t.width,bottom:t.top+t.height})}function i9(t){var e={};try{if(Y2(10)){e=t.getBoundingClientRect();var r=Z2(t,"top"),n=Z2(t,"left");e.top+=r,e.left+=n,e.bottom+=r,e.right+=n}else e=t.getBoundingClientRect()}catch{}var i={left:e.left,top:e.top,width:e.right-e.left,height:e.bottom-e.top},o=t.nodeName==="HTML"?mJ(t.ownerDocument):{},a=o.width||t.clientWidth||i.width,s=o.height||t.clientHeight||i.height,l=t.offsetWidth-a,u=t.offsetHeight-s;if(l||u){var p=B1(t);l-=hJ(p,"x"),u-=hJ(p,"y"),i.width-=l,i.height-=u}return gx(i)}function o9(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,n=Y2(10),i=e.nodeName==="HTML",o=i9(t),a=i9(e),s=WP(t),l=B1(e),u=parseFloat(l.borderTopWidth),p=parseFloat(l.borderLeftWidth);r&&i&&(a.top=Math.max(a.top,0),a.left=Math.max(a.left,0));var m=gx({top:o.top-a.top-u,left:o.left-a.left-p,width:o.width,height:o.height});if(m.marginTop=0,m.marginLeft=0,!n&&i){var v=parseFloat(l.marginTop),x=parseFloat(l.marginLeft);m.top-=u-v,m.bottom-=u-v,m.left-=p-x,m.right-=p-x,m.marginTop=v,m.marginLeft=x}return(n&&!r?e.contains(s):e===s&&s.nodeName!=="BODY")&&(m=yTe(m,e)),m}function bTe(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=t.ownerDocument.documentElement,n=o9(t,r),i=Math.max(r.clientWidth,window.innerWidth||0),o=Math.max(r.clientHeight,window.innerHeight||0),a=e?0:Z2(r),s=e?0:Z2(r,"left"),l={top:a-n.top+n.marginTop,left:s-n.left+n.marginLeft,width:i,height:o};return gx(l)}function gJ(t){var e=t.nodeName;if(e==="BODY"||e==="HTML")return!1;if(B1(t,"position")==="fixed")return!0;var r=r9(t);return r?gJ(r):!1}function vJ(t){if(!t||!t.parentElement||Y2())return document.documentElement;for(var e=t.parentElement;e&&B1(e,"transform")==="none";)e=e.parentElement;return e||document.documentElement}function s9(t,e,r,n){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1,o={top:0,left:0},a=i?vJ(t):bL(t,uJ(e));if(n==="viewport")o=bTe(a,i);else{var s=void 0;n==="scrollParent"?(s=WP(r9(e)),s.nodeName==="BODY"&&(s=t.ownerDocument.documentElement)):n==="window"?s=t.ownerDocument.documentElement:s=n;var l=o9(s,a,i);if(s.nodeName==="HTML"&&!gJ(a)){var u=mJ(t.ownerDocument),p=u.height,m=u.width;o.top+=l.top-l.marginTop,o.bottom=p+l.top,o.left+=l.left-l.marginLeft,o.right=m+l.left}else o=l}r=r||0;var v=typeof r=="number";return o.left+=v?r:r.left||0,o.top+=v?r:r.top||0,o.right-=v?r:r.right||0,o.bottom-=v?r:r.bottom||0,o}function wTe(t){var e=t.width,r=t.height;return e*r}function yJ(t,e,r,n,i){var o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:0;if(t.indexOf("auto")===-1)return t;var a=s9(r,n,o,i),s={top:{width:a.width,height:e.top-a.top},right:{width:a.right-e.right,height:a.height},bottom:{width:a.width,height:a.bottom-e.bottom},left:{width:e.left-a.left,height:a.height}},l=Object.keys(s).map(function(v){return Zh({key:v},s[v],{area:wTe(s[v])})}).sort(function(v,x){return x.area-v.area}),u=l.filter(function(v){var x=v.width,y=v.height;return x>=r.clientWidth&&y>=r.clientHeight}),p=u.length>0?u[0].key:l[0].key,m=t.split("-")[1];return p+(m?"-"+m:"")}function xJ(t,e,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,i=n?vJ(e):bL(e,uJ(r));return o9(r,i,n)}function _J(t){var e=t.ownerDocument.defaultView,r=e.getComputedStyle(t),n=parseFloat(r.marginTop||0)+parseFloat(r.marginBottom||0),i=parseFloat(r.marginLeft||0)+parseFloat(r.marginRight||0),o={width:t.offsetWidth+i,height:t.offsetHeight+n};return o}function wL(t){var e={left:"right",right:"left",bottom:"top",top:"bottom"};return t.replace(/left|right|bottom|top/g,function(r){return e[r]})}function bJ(t,e,r){r=r.split("-")[0];var n=_J(t),i={width:n.width,height:n.height},o=["right","left"].indexOf(r)!==-1,a=o?"top":"left",s=o?"left":"top",l=o?"height":"width",u=o?"width":"height";return i[a]=e[a]+e[l]/2-n[l]/2,r===s?i[s]=e[s]-n[u]:i[s]=e[wL(s)],i}function GP(t,e){return Array.prototype.find?t.find(e):t.filter(e)[0]}function CTe(t,e,r){if(Array.prototype.findIndex)return t.findIndex(function(i){return i[e]===r});var n=GP(t,function(i){return i[e]===r});return t.indexOf(n)}function wJ(t,e,r){var n=r===void 0?t:t.slice(0,CTe(t,"name",r));return n.forEach(function(i){i.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var o=i.function||i.fn;i.enabled&&cJ(o)&&(e.offsets.popper=gx(e.offsets.popper),e.offsets.reference=gx(e.offsets.reference),e=o(e,i))}),e}function ETe(){if(!this.state.isDestroyed){var t={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};t.offsets.reference=xJ(this.state,this.popper,this.reference,this.options.positionFixed),t.placement=yJ(this.options.placement,t.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),t.originalPlacement=t.placement,t.positionFixed=this.options.positionFixed,t.offsets.popper=bJ(this.popper,t.offsets.reference,t.placement),t.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",t=wJ(this.modifiers,t),this.state.isCreated?this.options.onUpdate(t):(this.state.isCreated=!0,this.options.onCreate(t))}}function CJ(t,e){return t.some(function(r){var n=r.name,i=r.enabled;return i&&n===e})}function a9(t){for(var e=[!1,"ms","Webkit","Moz","O"],r=t.charAt(0).toUpperCase()+t.slice(1),n=0;n<e.length;n++){var i=e[n],o=i?""+i+r:t;if(typeof document.body.style[o]!="undefined")return o}return null}function STe(){return this.state.isDestroyed=!0,CJ(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.position="",this.popper.style.top="",this.popper.style.left="",this.popper.style.right="",this.popper.style.bottom="",this.popper.style.willChange="",this.popper.style[a9("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function EJ(t){var e=t.ownerDocument;return e?e.defaultView:window}function SJ(t,e,r,n){var i=t.nodeName==="BODY",o=i?t.ownerDocument.defaultView:t;o.addEventListener(e,r,{passive:!0}),i||SJ(WP(o.parentNode),e,r,n),n.push(o)}function TTe(t,e,r,n){r.updateBound=n,EJ(t).addEventListener("resize",r.updateBound,{passive:!0});var i=WP(t);return SJ(i,"scroll",r.updateBound,r.scrollParents),r.scrollElement=i,r.eventsEnabled=!0,r}function PTe(){this.state.eventsEnabled||(this.state=TTe(this.reference,this.options,this.state,this.scheduleUpdate))}function ITe(t,e){return EJ(t).removeEventListener("resize",e.updateBound),e.scrollParents.forEach(function(r){r.removeEventListener("scroll",e.updateBound)}),e.updateBound=null,e.scrollParents=[],e.scrollElement=null,e.eventsEnabled=!1,e}function MTe(){this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=ITe(this.reference,this.state))}function l9(t){return t!==""&&!isNaN(parseFloat(t))&&isFinite(t)}function c9(t,e){Object.keys(e).forEach(function(r){var n="";["width","height","top","right","bottom","left"].indexOf(r)!==-1&&l9(e[r])&&(n="px"),t.style[r]=e[r]+n})}function ATe(t,e){Object.keys(e).forEach(function(r){var n=e[r];n!==!1?t.setAttribute(r,e[r]):t.removeAttribute(r)})}function RTe(t){return c9(t.instance.popper,t.styles),ATe(t.instance.popper,t.attributes),t.arrowElement&&Object.keys(t.arrowStyles).length&&c9(t.arrowElement,t.arrowStyles),t}function kTe(t,e,r,n,i){var o=xJ(i,e,t,r.positionFixed),a=yJ(r.placement,o,e,t,r.modifiers.flip.boundariesElement,r.modifiers.flip.padding);return e.setAttribute("x-placement",a),c9(e,{position:r.positionFixed?"fixed":"absolute"}),r}function OTe(t,e){var r=t.offsets,n=r.popper,i=r.reference,o=Math.round,a=Math.floor,s=function(C){return C},l=o(i.width),u=o(n.width),p=["left","right"].indexOf(t.placement)!==-1,m=t.placement.indexOf("-")!==-1,v=l%2==u%2,x=l%2==1&&u%2==1,y=e?p||m||v?o:a:s,_=e?o:s;return{left:y(x&&!m&&e?n.left-1:n.left),top:_(n.top),bottom:_(n.bottom),right:y(n.right)}}var LTe=HP&&/Firefox/i.test(navigator.userAgent);function DTe(t,e){var r=e.x,n=e.y,i=t.offsets.popper,o=GP(t.instance.modifiers,function(T){return T.name==="applyStyle"}).gpuAcceleration;o!==void 0&&console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!");var a=o!==void 0?o:e.gpuAcceleration,s=K2(t.instance.popper),l=i9(s),u={position:i.position},p=OTe(t,window.devicePixelRatio<2||!LTe),m=r==="bottom"?"top":"bottom",v=n==="right"?"left":"right",x=a9("transform"),y=void 0,_=void 0;if(m==="bottom"?s.nodeName==="HTML"?_=-s.clientHeight+p.bottom:_=-l.height+p.bottom:_=p.top,v==="right"?s.nodeName==="HTML"?y=-s.clientWidth+p.right:y=-l.width+p.right:y=p.left,a&&x)u[x]="translate3d("+y+"px, "+_+"px, 0)",u[m]=0,u[v]=0,u.willChange="transform";else{var w=m==="bottom"?-1:1,C=v==="right"?-1:1;u[m]=_*w,u[v]=y*C,u.willChange=m+", "+v}var E={"x-placement":t.placement};return t.attributes=Zh({},E,t.attributes),t.styles=Zh({},u,t.styles),t.arrowStyles=Zh({},t.offsets.arrow,t.arrowStyles),t}function TJ(t,e,r){var n=GP(t,function(s){var l=s.name;return l===e}),i=!!n&&t.some(function(s){return s.name===r&&s.enabled&&s.order<n.order});if(!i){var o="`"+e+"`",a="`"+r+"`";console.warn(a+" modifier is required by "+o+" modifier in order to work, be sure to include it before "+o+"!")}return i}function NTe(t,e){var r;if(!TJ(t.instance.modifiers,"arrow","keepTogether"))return t;var n=e.element;if(typeof n=="string"){if(n=t.instance.popper.querySelector(n),!n)return t}else if(!t.instance.popper.contains(n))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),t;var i=t.placement.split("-")[0],o=t.offsets,a=o.popper,s=o.reference,l=["left","right"].indexOf(i)!==-1,u=l?"height":"width",p=l?"Top":"Left",m=p.toLowerCase(),v=l?"left":"top",x=l?"bottom":"right",y=_J(n)[u];s[x]-y<a[m]&&(t.offsets.popper[m]-=a[m]-(s[x]-y)),s[m]+y>a[x]&&(t.offsets.popper[m]+=s[m]+y-a[x]),t.offsets.popper=gx(t.offsets.popper);var _=s[m]+s[u]/2-y/2,w=B1(t.instance.popper),C=parseFloat(w["margin"+p]),E=parseFloat(w["border"+p+"Width"]),T=_-t.offsets.popper[m]-C-E;return T=Math.max(Math.min(a[u]-y,T),0),t.arrowElement=n,t.offsets.arrow=(r={},Q2(r,m,Math.round(T)),Q2(r,v,""),r),t}function $Te(t){return t==="end"?"start":t==="start"?"end":t}var PJ=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],u9=PJ.slice(3);function IJ(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=u9.indexOf(t),n=u9.slice(r+1).concat(u9.slice(0,r));return e?n.reverse():n}var f9={FLIP:"flip",CLOCKWISE:"clockwise",COUNTERCLOCKWISE:"counterclockwise"};function FTe(t,e){if(CJ(t.instance.modifiers,"inner")||t.flipped&&t.placement===t.originalPlacement)return t;var r=s9(t.instance.popper,t.instance.reference,e.padding,e.boundariesElement,t.positionFixed),n=t.placement.split("-")[0],i=wL(n),o=t.placement.split("-")[1]||"",a=[];switch(e.behavior){case f9.FLIP:a=[n,i];break;case f9.CLOCKWISE:a=IJ(n);break;case f9.COUNTERCLOCKWISE:a=IJ(n,!0);break;default:a=e.behavior}return a.forEach(function(s,l){if(n!==s||a.length===l+1)return t;n=t.placement.split("-")[0],i=wL(n);var u=t.offsets.popper,p=t.offsets.reference,m=Math.floor,v=n==="left"&&m(u.right)>m(p.left)||n==="right"&&m(u.left)<m(p.right)||n==="top"&&m(u.bottom)>m(p.top)||n==="bottom"&&m(u.top)<m(p.bottom),x=m(u.left)<m(r.left),y=m(u.right)>m(r.right),_=m(u.top)<m(r.top),w=m(u.bottom)>m(r.bottom),C=n==="left"&&x||n==="right"&&y||n==="top"&&_||n==="bottom"&&w,E=["top","bottom"].indexOf(n)!==-1,T=!!e.flipVariations&&(E&&o==="start"&&x||E&&o==="end"&&y||!E&&o==="start"&&_||!E&&o==="end"&&w),A=!!e.flipVariationsByContent&&(E&&o==="start"&&y||E&&o==="end"&&x||!E&&o==="start"&&w||!E&&o==="end"&&_),k=T||A;(v||C||k)&&(t.flipped=!0,(v||C)&&(n=a[l+1]),k&&(o=$Te(o)),t.placement=n+(o?"-"+o:""),t.offsets.popper=Zh({},t.offsets.popper,bJ(t.instance.popper,t.offsets.reference,t.placement)),t=wJ(t.instance.modifiers,t,"flip"))}),t}function zTe(t){var e=t.offsets,r=e.popper,n=e.reference,i=t.placement.split("-")[0],o=Math.floor,a=["top","bottom"].indexOf(i)!==-1,s=a?"right":"bottom",l=a?"left":"top",u=a?"width":"height";return r[s]<o(n[l])&&(t.offsets.popper[l]=o(n[l])-r[u]),r[l]>o(n[s])&&(t.offsets.popper[l]=o(n[s])),t}function BTe(t,e,r,n){var i=t.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),o=+i[1],a=i[2];if(!o)return t;if(a.indexOf("%")===0){var s=void 0;switch(a){case"%p":s=r;break;case"%":case"%r":default:s=n}var l=gx(s);return l[e]/100*o}else if(a==="vh"||a==="vw"){var u=void 0;return a==="vh"?u=Math.max(document.documentElement.clientHeight,window.innerHeight||0):u=Math.max(document.documentElement.clientWidth,window.innerWidth||0),u/100*o}else return o}function jTe(t,e,r,n){var i=[0,0],o=["right","left"].indexOf(n)!==-1,a=t.split(/(\+|\-)/).map(function(p){return p.trim()}),s=a.indexOf(GP(a,function(p){return p.search(/,|\s/)!==-1}));a[s]&&a[s].indexOf(",")===-1&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var l=/\s*,\s*|\s+/,u=s!==-1?[a.slice(0,s).concat([a[s].split(l)[0]]),[a[s].split(l)[1]].concat(a.slice(s+1))]:[a];return u=u.map(function(p,m){var v=(m===1?!o:o)?"height":"width",x=!1;return p.reduce(function(y,_){return y[y.length-1]===""&&["+","-"].indexOf(_)!==-1?(y[y.length-1]=_,x=!0,y):x?(y[y.length-1]+=_,x=!1,y):y.concat(_)},[]).map(function(y){return BTe(y,v,e,r)})}),u.forEach(function(p,m){p.forEach(function(v,x){l9(v)&&(i[m]+=v*(p[x-1]==="-"?-1:1))})}),i}function UTe(t,e){var r=e.offset,n=t.placement,i=t.offsets,o=i.popper,a=i.reference,s=n.split("-")[0],l=void 0;return l9(+r)?l=[+r,0]:l=jTe(r,o,a,s),s==="left"?(o.top+=l[0],o.left-=l[1]):s==="right"?(o.top+=l[0],o.left+=l[1]):s==="top"?(o.left+=l[0],o.top-=l[1]):s==="bottom"&&(o.left+=l[0],o.top+=l[1]),t.popper=o,t}function VTe(t,e){var r=e.boundariesElement||K2(t.instance.popper);t.instance.reference===r&&(r=K2(r));var n=a9("transform"),i=t.instance.popper.style,o=i.top,a=i.left,s=i[n];i.top="",i.left="",i[n]="";var l=s9(t.instance.popper,t.instance.reference,e.padding,r,t.positionFixed);i.top=o,i.left=a,i[n]=s,e.boundaries=l;var u=e.priority,p=t.offsets.popper,m={primary:function(x){var y=p[x];return p[x]<l[x]&&!e.escapeWithReference&&(y=Math.max(p[x],l[x])),Q2({},x,y)},secondary:function(x){var y=x==="right"?"left":"top",_=p[y];return p[x]>l[x]&&!e.escapeWithReference&&(_=Math.min(p[y],l[x]-(x==="right"?p.width:p.height))),Q2({},y,_)}};return u.forEach(function(v){var x=["left","top"].indexOf(v)!==-1?"primary":"secondary";p=Zh({},p,m[x](v))}),t.offsets.popper=p,t}function HTe(t){var e=t.placement,r=e.split("-")[0],n=e.split("-")[1];if(n){var i=t.offsets,o=i.reference,a=i.popper,s=["bottom","top"].indexOf(r)!==-1,l=s?"left":"top",u=s?"width":"height",p={start:Q2({},l,o[l]),end:Q2({},l,o[l]+o[u]-a[u])};t.offsets.popper=Zh({},a,p[n])}return t}function WTe(t){if(!TJ(t.instance.modifiers,"hide","preventOverflow"))return t;var e=t.offsets.reference,r=GP(t.instance.modifiers,function(n){return n.name==="preventOverflow"}).boundaries;if(e.bottom<r.top||e.left>r.right||e.top>r.bottom||e.right<r.left){if(t.hide===!0)return t;t.hide=!0,t.attributes["x-out-of-boundaries"]=""}else{if(t.hide===!1)return t;t.hide=!1,t.attributes["x-out-of-boundaries"]=!1}return t}function GTe(t){var e=t.placement,r=e.split("-")[0],n=t.offsets,i=n.popper,o=n.reference,a=["left","right"].indexOf(r)!==-1,s=["top","left"].indexOf(r)===-1;return i[a?"left":"top"]=o[r]-(s?i[a?"width":"height"]:0),t.placement=wL(e),t.offsets.popper=gx(i),t}var qTe={shift:{order:100,enabled:!0,fn:HTe},offset:{order:200,enabled:!0,fn:UTe,offset:0},preventOverflow:{order:300,enabled:!0,fn:VTe,priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:zTe},arrow:{order:500,enabled:!0,fn:NTe,element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:FTe,behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:GTe},hide:{order:800,enabled:!0,fn:WTe},computeStyle:{order:850,enabled:!0,fn:DTe,gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:RTe,onLoad:kTe,gpuAcceleration:void 0}},XTe={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:qTe},CL=function(){function t(e,r){var n=this,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};xTe(this,t),this.scheduleUpdate=function(){return requestAnimationFrame(n.update)},this.update=gTe(this.update.bind(this)),this.options=Zh({},t.Defaults,i),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=e&&e.jquery?e[0]:e,this.popper=r&&r.jquery?r[0]:r,this.options.modifiers={},Object.keys(Zh({},t.Defaults.modifiers,i.modifiers)).forEach(function(a){n.options.modifiers[a]=Zh({},t.Defaults.modifiers[a]||{},i.modifiers?i.modifiers[a]:{})}),this.modifiers=Object.keys(this.options.modifiers).map(function(a){return Zh({name:a},n.options.modifiers[a])}).sort(function(a,s){return a.order-s.order}),this.modifiers.forEach(function(a){a.enabled&&cJ(a.onLoad)&&a.onLoad(n.reference,n.popper,n.options,a,n.state)}),this.update();var o=this.options.eventsEnabled;o&&this.enableEventListeners(),this.state.eventsEnabled=o}return _Te(t,[{key:"update",value:function(){return ETe.call(this)}},{key:"destroy",value:function(){return STe.call(this)}},{key:"enableEventListeners",value:function(){return PTe.call(this)}},{key:"disableEventListeners",value:function(){return MTe.call(this)}}]),t}();CL.Utils=(typeof window!="undefined"?window:global).PopperUtils;CL.placements=PJ;CL.Defaults=XTe;var YTe=CL;function KTe(t,e){var r=e&&e.direction||"ltr";if(r==="ltr")return t;switch(t){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return t}}function MJ(t){return typeof t=="function"?t():t}var ZTe=typeof window!="undefined"?Y.exports.useLayoutEffect:Y.exports.useEffect,QTe={},JTe=Y.exports.forwardRef(function(e,r){var n=e.anchorEl,i=e.children,o=e.container,a=e.disablePortal,s=a===void 0?!1:a,l=e.keepMounted,u=l===void 0?!1:l,p=e.modifiers,m=e.open,v=e.placement,x=v===void 0?"bottom":v,y=e.popperOptions,_=y===void 0?QTe:y,w=e.popperRef,C=e.style,E=e.transition,T=E===void 0?!1:E,A=nn(e,["anchorEl","children","container","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","style","transition"]),k=Y.exports.useRef(null),X=Fo(k,r),Z=Y.exports.useRef(null),W=Fo(Z,w),D=Y.exports.useRef(W);ZTe(function(){D.current=W},[W]),Y.exports.useImperativeHandle(w,function(){return Z.current},[]);var H=Y.exports.useState(!0),N=H[0],j=H[1],$=W2(),z=KTe(x,$),O=Y.exports.useState(z),F=O[0],G=O[1];Y.exports.useEffect(function(){Z.current&&Z.current.update()});var q=Y.exports.useCallback(function(){if(!(!k.current||!n||!m)){Z.current&&(Z.current.destroy(),D.current(null));var oe=function(xe){G(xe.placement)};MJ(n);var ve=new YTe(MJ(n),k.current,vt({placement:z},_,{modifiers:vt({},s?{}:{preventOverflow:{boundariesElement:"window"}},p,_.modifiers),onCreate:dy(oe,_.onCreate),onUpdate:dy(oe,_.onUpdate)}));D.current(ve)}},[n,s,p,m,z,_]),ee=Y.exports.useCallback(function(oe){hy(X,oe),q()},[X,q]),re=function(){j(!1)},ce=function(){!Z.current||(Z.current.destroy(),D.current(null))},fe=function(){j(!0),ce()};if(Y.exports.useEffect(function(){return function(){ce()}},[]),Y.exports.useEffect(function(){!m&&!T&&ce()},[m,T]),!u&&!m&&(!T||N))return null;var J={placement:F};return T&&(J.TransitionProps={in:m,onEnter:re,onExited:fe}),Y.exports.createElement(FQ,{disablePortal:s,container:o},Y.exports.createElement("div",vt({ref:ee,role:"tooltip"},A,{style:vt({position:"fixed",top:0,left:0,display:!m&&u&&!T?"none":null},C)}),typeof i=="function"?i(J):i))}),AJ=JTe,ePe=Ro(Y.exports.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"})),tPe=Ro(Y.exports.createElement("path",{d:"M8.465 8.465C9.37 7.56 10.62 7 12 7C14.76 7 17 9.24 17 12C17 13.38 16.44 14.63 15.535 15.535C14.63 16.44 13.38 17 12 17C9.24 17 7 14.76 7 12C7 10.62 7.56 9.37 8.465 8.465Z"})),rPe=function(e){return{root:{position:"relative",display:"flex","&$checked $layer":{transform:"scale(1)",transition:e.transitions.create("transform",{easing:e.transitions.easing.easeOut,duration:e.transitions.duration.shortest})}},layer:{left:0,position:"absolute",transform:"scale(0)",transition:e.transitions.create("transform",{easing:e.transitions.easing.easeIn,duration:e.transitions.duration.shortest})},checked:{}}};function nPe(t){var e=t.checked,r=t.classes,n=t.fontSize;return Y.exports.createElement("div",{className:Lr(r.root,e&&r.checked)},Y.exports.createElement(ePe,{fontSize:n}),Y.exports.createElement(tPe,{fontSize:n,className:r.layer}))}var RJ=Dn(rPe,{name:"PrivateRadioButtonIcon"})(nPe),iPe=Y.exports.createContext(),kJ=iPe;function oPe(){return Y.exports.useContext(kJ)}var sPe=function(e){return{root:{color:e.palette.text.secondary},checked:{},disabled:{},colorPrimary:{"&$checked":{color:e.palette.primary.main,"&:hover":{backgroundColor:wo(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:e.palette.action.disabled}},colorSecondary:{"&$checked":{color:e.palette.secondary.main,"&:hover":{backgroundColor:wo(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:e.palette.action.disabled}}}},aPe=Y.exports.createElement(RJ,{checked:!0}),lPe=Y.exports.createElement(RJ,null),cPe=Y.exports.forwardRef(function(e,r){var n=e.checked,i=e.classes,o=e.color,a=o===void 0?"secondary":o,s=e.name,l=e.onChange,u=e.size,p=u===void 0?"medium":u,m=nn(e,["checked","classes","color","name","onChange","size"]),v=oPe(),x=n,y=dy(l,v&&v.onChange),_=s;return v&&(typeof x=="undefined"&&(x=v.value===e.value),typeof _=="undefined"&&(_=v.name)),Y.exports.createElement(H8,vt({color:a,type:"radio",icon:Y.exports.cloneElement(lPe,{fontSize:p==="small"?"small":"medium"}),checkedIcon:Y.exports.cloneElement(aPe,{fontSize:p==="small"?"small":"medium"}),classes:{root:Lr(i.root,i["color".concat(ni(a))]),checked:i.checked,disabled:i.disabled},name:_,checked:x,onChange:y,ref:r},m))}),IAt=Dn(sPe,{name:"MuiRadio"})(cPe),uPe=Y.exports.forwardRef(function(e,r){var n=e.actions,i=e.children,o=e.name,a=e.value,s=e.onChange,l=nn(e,["actions","children","name","value","onChange"]),u=Y.exports.useRef(null),p=Bg({controlled:a,default:e.defaultValue,name:"RadioGroup"}),m=qf(p,2),v=m[0],x=m[1];Y.exports.useImperativeHandle(n,function(){return{focus:function(){var E=u.current.querySelector("input:not(:disabled):checked");E||(E=u.current.querySelector("input:not(:disabled)")),E&&E.focus()}}},[]);var y=Fo(r,u),_=function(E){x(E.target.value),s&&s(E,E.target.value)},w=pL(o);return Y.exports.createElement(kJ.Provider,{value:{name:w,onChange:_,value:v}},Y.exports.createElement(fSe,vt({role:"radiogroup",ref:y},l),i))}),MAt=uPe;function OJ(t,e){return A1(e)==="object"&&e!==null?t===e:String(t)===String(e)}function fPe(t){return t==null||typeof t=="string"&&!t.trim()}var dPe=Y.exports.forwardRef(function(e,r){var n=e["aria-label"],i=e.autoFocus,o=e.autoWidth,a=e.children,s=e.classes,l=e.className,u=e.defaultValue,p=e.disabled,m=e.displayEmpty,v=e.IconComponent,x=e.inputRef,y=e.labelId,_=e.MenuProps,w=_===void 0?{}:_,C=e.multiple,E=e.name,T=e.onBlur,A=e.onChange,k=e.onClose,X=e.onFocus,Z=e.onOpen,W=e.open,D=e.readOnly,H=e.renderValue,N=e.SelectDisplayProps,j=N===void 0?{}:N,$=e.tabIndex;e.type;var z=e.value,O=e.variant,F=O===void 0?"standard":O,G=nn(e,["aria-label","autoFocus","autoWidth","children","classes","className","defaultValue","disabled","displayEmpty","IconComponent","inputRef","labelId","MenuProps","multiple","name","onBlur","onChange","onClose","onFocus","onOpen","open","readOnly","renderValue","SelectDisplayProps","tabIndex","type","value","variant"]),q=Bg({controlled:z,default:u,name:"Select"}),ee=qf(q,2),re=ee[0],ce=ee[1],fe=Y.exports.useRef(null),J=Y.exports.useState(null),oe=J[0],ve=J[1],ye=Y.exports.useRef(W!=null),xe=ye.current,se=Y.exports.useState(),me=se[0],pe=se[1],Ce=Y.exports.useState(!1),Pe=Ce[0],Re=Ce[1],ke=Fo(r,x);Y.exports.useImperativeHandle(ke,function(){return{focus:function(){oe.focus()},node:fe.current,value:re}},[oe,re]),Y.exports.useEffect(function(){i&&oe&&oe.focus()},[i,oe]),Y.exports.useEffect(function(){if(oe){var Ft=jc(oe).getElementById(y);if(Ft){var Ut=function(){getSelection().isCollapsed&&oe.focus()};return Ft.addEventListener("click",Ut),function(){Ft.removeEventListener("click",Ut)}}}},[y,oe]);var ze=function(Ut,Er){Ut?Z&&Z(Er):k&&k(Er),xe||(pe(o?null:oe.clientWidth),Re(Ut))},Ge=function(Ut){Ut.button===0&&(Ut.preventDefault(),oe.focus(),ze(!0,Ut))},ht=function(Ut){ze(!1,Ut)},Tt=Y.exports.Children.toArray(a),xt=function(Ut){var Er=Tt.map(function(mr){return mr.props.value}).indexOf(Ut.target.value);if(Er!==-1){var kr=Tt[Er];ce(kr.props.value),A&&A(Ut,kr)}},pt=function(Ut){return function(Er){C||ze(!1,Er);var kr;if(C){kr=Array.isArray(re)?re.slice():[];var mr=re.indexOf(Ut.props.value);mr===-1?kr.push(Ut.props.value):kr.splice(mr,1)}else kr=Ut.props.value;Ut.props.onClick&&Ut.props.onClick(Er),re!==kr&&(ce(kr),A&&(Er.persist(),Object.defineProperty(Er,"target",{writable:!0,value:{value:kr,name:E}}),A(Er,Ut)))}},It=function(Ut){if(!D){var Er=[" ","ArrowUp","ArrowDown","Enter"];Er.indexOf(Ut.key)!==-1&&(Ut.preventDefault(),ze(!0,Ut))}},Ie=oe!==null&&(xe?W:Pe),de=function(Ut){!Ie&&T&&(Ut.persist(),Object.defineProperty(Ut,"target",{writable:!0,value:{value:re,name:E}}),T(Ut))};delete G["aria-invalid"];var Te,Be,Ke=[],ot=!1;(q8({value:re})||m)&&(H?Te=H(re):ot=!0);var Ze=Tt.map(function(Ft){if(!Y.exports.isValidElement(Ft))return null;var Ut;if(C){if(!Array.isArray(re))throw new Error(F2(2));Ut=re.some(function(Er){return OJ(Er,Ft.props.value)}),Ut&&ot&&Ke.push(Ft.props.children)}else Ut=OJ(re,Ft.props.value),Ut&&ot&&(Be=Ft.props.children);return Y.exports.cloneElement(Ft,{"aria-selected":Ut?"true":void 0,onClick:pt(Ft),onKeyUp:function(kr){kr.key===" "&&kr.preventDefault(),Ft.props.onKeyUp&&Ft.props.onKeyUp(kr)},role:"option",selected:Ut,value:void 0,"data-value":Ft.props.value})});ot&&(Te=C?Ke.join(", "):Be);var Je=me;!o&&xe&&oe&&(Je=oe.clientWidth);var St;typeof $!="undefined"?St=$:St=p?null:0;var er=j.id||(E?"mui-component-select-".concat(E):void 0);return Y.exports.createElement(Y.exports.Fragment,null,Y.exports.createElement("div",vt({className:Lr(s.root,s.select,s.selectMenu,s[F],l,p&&s.disabled),ref:ve,tabIndex:St,role:"button","aria-disabled":p?"true":void 0,"aria-expanded":Ie?"true":void 0,"aria-haspopup":"listbox","aria-label":n,"aria-labelledby":[y,er].filter(Boolean).join(" ")||void 0,onKeyDown:It,onMouseDown:p||D?null:Ge,onBlur:de,onFocus:X},j,{id:er}),fPe(Te)?Y.exports.createElement("span",{dangerouslySetInnerHTML:{__html:"​"}}):Te),Y.exports.createElement("input",vt({value:Array.isArray(re)?re.join(","):re,name:E,ref:fe,"aria-hidden":!0,onChange:xt,tabIndex:-1,className:s.nativeInput,autoFocus:i},G)),Y.exports.createElement(v,{className:Lr(s.icon,s["icon".concat(ni(F))],Ie&&s.iconOpen,p&&s.disabled)}),Y.exports.createElement(nTe,vt({id:"menu-".concat(E||""),anchorEl:oe,open:Ie,onClose:ht},w,{MenuListProps:vt({"aria-labelledby":y,role:"listbox",disableListWrap:!0},w.MenuListProps),PaperProps:vt({},w.PaperProps,{style:vt({minWidth:Je},w.PaperProps!=null?w.PaperProps.style:null)})}),Ze))}),hPe=dPe,pPe=oJ,mPe=Y.exports.createElement(J8,null),gPe=Y.exports.createElement(qQ,null),LJ=Y.exports.forwardRef(function t(e,r){var n=e.autoWidth,i=n===void 0?!1:n,o=e.children,a=e.classes,s=e.displayEmpty,l=s===void 0?!1:s,u=e.IconComponent,p=u===void 0?iJ:u,m=e.id,v=e.input,x=e.inputProps,y=e.label,_=e.labelId,w=e.labelWidth,C=w===void 0?0:w,E=e.MenuProps,T=e.multiple,A=T===void 0?!1:T,k=e.native,X=k===void 0?!1:k,Z=e.onClose,W=e.onOpen,D=e.open,H=e.renderValue,N=e.SelectDisplayProps,j=e.variant,$=j===void 0?"standard":j,z=nn(e,["autoWidth","children","classes","displayEmpty","IconComponent","id","input","inputProps","label","labelId","labelWidth","MenuProps","multiple","native","onClose","onOpen","open","renderValue","SelectDisplayProps","variant"]),O=X?nJ:hPe,F=z1(),G=X2({props:e,muiFormControl:F,states:["variant"]}),q=G.variant||$,ee=v||{standard:mPe,outlined:Y.exports.createElement(lJ,{label:y,labelWidth:C}),filled:gPe}[q];return Y.exports.cloneElement(ee,vt({inputComponent:O,inputProps:vt({children:o,IconComponent:p,variant:q,type:void 0,multiple:A},X?{id:m}:{autoWidth:i,displayEmpty:l,labelId:_,MenuProps:E,onClose:Z,onOpen:W,open:D,renderValue:H,SelectDisplayProps:vt({id:m},N)},x,{classes:x?L8({baseClasses:a,newClasses:x.classes,Component:t}):a},v?v.props.inputProps:{}),ref:r},z))});LJ.muiName="Select";var vPe=Dn(pPe,{name:"MuiSelect"})(LJ),yPe=function(e){return{thumb:{"&$open":{"& $offset":{transform:"scale(1) translateY(-10px)"}}},open:{},offset:vt({zIndex:1},e.typography.body2,{fontSize:e.typography.pxToRem(12),lineHeight:1.2,transition:e.transitions.create(["transform"],{duration:e.transitions.duration.shortest}),top:-34,transformOrigin:"bottom center",transform:"scale(0)",position:"absolute"}),circle:{display:"flex",alignItems:"center",justifyContent:"center",width:32,height:32,borderRadius:"50% 50% 50% 0",backgroundColor:"currentColor",transform:"rotate(-45deg)"},label:{color:e.palette.primary.contrastText,transform:"rotate(45deg)"}}};function xPe(t){var e=t.children,r=t.classes,n=t.className,i=t.open,o=t.value,a=t.valueLabelDisplay;return a==="off"?e:Y.exports.cloneElement(e,{className:Lr(e.props.className,(i||a==="on")&&r.open,r.thumb)},Y.exports.createElement("span",{className:Lr(r.offset,n)},Y.exports.createElement("span",{className:r.circle},Y.exports.createElement("span",{className:r.label},o))))}var _Pe=Dn(yPe,{name:"PrivateValueLabel"})(xPe);function d9(t,e){return t-e}function h9(t,e,r){return Math.min(Math.max(e,t),r)}function DJ(t,e){var r=t.reduce(function(i,o,a){var s=Math.abs(e-o);return i===null||s<i.distance||s===i.distance?{distance:s,index:a}:i},null),n=r.index;return n}function EL(t,e){if(e.current!==void 0&&t.changedTouches){for(var r=0;r<t.changedTouches.length;r+=1){var n=t.changedTouches[r];if(n.identifier===e.current)return{x:n.clientX,y:n.clientY}}return!1}return{x:t.clientX,y:t.clientY}}function SL(t,e,r){return(t-e)*100/(r-e)}function bPe(t,e,r){return(r-e)*t+e}function wPe(t){if(Math.abs(t)<1){var e=t.toExponential().split("e-"),r=e[0].split(".")[1];return(r?r.length:0)+parseInt(e[1],10)}var n=t.toString().split(".")[1];return n?n.length:0}function NJ(t,e,r){var n=Math.round((t-r)/e)*e+r;return Number(n.toFixed(wPe(e)))}function $J(t){var e=t.values,r=t.source,n=t.newValue,i=t.index;if(e[i]===n)return r;var o=e.slice();return o[i]=n,o}function TL(t){var e=t.sliderRef,r=t.activeIndex,n=t.setActive;(!e.current.contains(document.activeElement)||Number(document.activeElement.getAttribute("data-index"))!==r)&&e.current.querySelector('[role="slider"][data-index="'.concat(r,'"]')).focus(),n&&n(r)}var PL={horizontal:{offset:function(e){return{left:"".concat(e,"%")}},leap:function(e){return{width:"".concat(e,"%")}}},"horizontal-reverse":{offset:function(e){return{right:"".concat(e,"%")}},leap:function(e){return{width:"".concat(e,"%")}}},vertical:{offset:function(e){return{bottom:"".concat(e,"%")}},leap:function(e){return{height:"".concat(e,"%")}}}},FJ=function(e){return e},CPe=function(e){return{root:{height:2,width:"100%",boxSizing:"content-box",padding:"13px 0",display:"inline-block",position:"relative",cursor:"pointer",touchAction:"none",color:e.palette.primary.main,WebkitTapHighlightColor:"transparent","&$disabled":{pointerEvents:"none",cursor:"default",color:e.palette.grey[400]},"&$vertical":{width:2,height:"100%",padding:"0 13px"},"@media (pointer: coarse)":{padding:"20px 0","&$vertical":{padding:"0 20px"}},"@media print":{colorAdjust:"exact"}},colorPrimary:{},colorSecondary:{color:e.palette.secondary.main},marked:{marginBottom:20,"&$vertical":{marginBottom:"auto",marginRight:20}},vertical:{},disabled:{},rail:{display:"block",position:"absolute",width:"100%",height:2,borderRadius:1,backgroundColor:"currentColor",opacity:.38,"$vertical &":{height:"100%",width:2}},track:{display:"block",position:"absolute",height:2,borderRadius:1,backgroundColor:"currentColor","$vertical &":{width:2}},trackFalse:{"& $track":{display:"none"}},trackInverted:{"& $track":{backgroundColor:e.palette.type==="light"?B2(e.palette.primary.main,.62):z2(e.palette.primary.main,.5)},"& $rail":{opacity:1}},thumb:{position:"absolute",width:12,height:12,marginLeft:-6,marginTop:-5,boxSizing:"border-box",borderRadius:"50%",outline:0,backgroundColor:"currentColor",display:"flex",alignItems:"center",justifyContent:"center",transition:e.transitions.create(["box-shadow"],{duration:e.transitions.duration.shortest}),"&::after":{position:"absolute",content:'""',borderRadius:"50%",left:-15,top:-15,right:-15,bottom:-15},"&$focusVisible,&:hover":{boxShadow:"0px 0px 0px 8px ".concat(wo(e.palette.primary.main,.16)),"@media (hover: none)":{boxShadow:"none"}},"&$active":{boxShadow:"0px 0px 0px 14px ".concat(wo(e.palette.primary.main,.16))},"&$disabled":{width:8,height:8,marginLeft:-4,marginTop:-3,"&:hover":{boxShadow:"none"}},"$vertical &":{marginLeft:-5,marginBottom:-6},"$vertical &$disabled":{marginLeft:-3,marginBottom:-4}},thumbColorPrimary:{},thumbColorSecondary:{"&$focusVisible,&:hover":{boxShadow:"0px 0px 0px 8px ".concat(wo(e.palette.secondary.main,.16))},"&$active":{boxShadow:"0px 0px 0px 14px ".concat(wo(e.palette.secondary.main,.16))}},active:{},focusVisible:{},valueLabel:{left:"calc(-50% - 4px)"},mark:{position:"absolute",width:2,height:2,borderRadius:1,backgroundColor:"currentColor"},markActive:{backgroundColor:e.palette.background.paper,opacity:.8},markLabel:vt({},e.typography.body2,{color:e.palette.text.secondary,position:"absolute",top:26,transform:"translateX(-50%)",whiteSpace:"nowrap","$vertical &":{top:"auto",left:26,transform:"translateY(50%)"},"@media (pointer: coarse)":{top:40,"$vertical &":{left:31}}}),markLabelActive:{color:e.palette.text.primary}}},EPe=Y.exports.forwardRef(function(e,r){var n=e["aria-label"],i=e["aria-labelledby"],o=e["aria-valuetext"],a=e.classes,s=e.className,l=e.color,u=l===void 0?"primary":l,p=e.component,m=p===void 0?"span":p,v=e.defaultValue,x=e.disabled,y=x===void 0?!1:x,_=e.getAriaLabel,w=e.getAriaValueText,C=e.marks,E=C===void 0?!1:C,T=e.max,A=T===void 0?100:T,k=e.min,X=k===void 0?0:k,Z=e.name,W=e.onChange,D=e.onChangeCommitted,H=e.onMouseDown,N=e.orientation,j=N===void 0?"horizontal":N,$=e.scale,z=$===void 0?FJ:$,O=e.step,F=O===void 0?1:O,G=e.ThumbComponent,q=G===void 0?"span":G,ee=e.track,re=ee===void 0?"normal":ee,ce=e.value,fe=e.ValueLabelComponent,J=fe===void 0?_Pe:fe,oe=e.valueLabelDisplay,ve=oe===void 0?"off":oe,ye=e.valueLabelFormat,xe=ye===void 0?FJ:ye,se=nn(e,["aria-label","aria-labelledby","aria-valuetext","classes","className","color","component","defaultValue","disabled","getAriaLabel","getAriaValueText","marks","max","min","name","onChange","onChangeCommitted","onMouseDown","orientation","scale","step","ThumbComponent","track","value","ValueLabelComponent","valueLabelDisplay","valueLabelFormat"]),me=zg(),pe=Y.exports.useRef(),Ce=Y.exports.useState(-1),Pe=Ce[0],Re=Ce[1],ke=Y.exports.useState(-1),ze=ke[0],Ge=ke[1],ht=Bg({controlled:ce,default:v,name:"Slider"}),Tt=qf(ht,2),xt=Tt[0],pt=Tt[1],It=Array.isArray(xt),Ie=It?xt.slice().sort(d9):[xt];Ie=Ie.map(function(rr){return h9(rr,X,A)});var de=E===!0&&F!==null?uy(Array(Math.floor((A-X)/F)+1)).map(function(rr,tr){return{value:X+F*tr}}):E||[],Te=FP(),Be=Te.isFocusVisible,Ke=Te.onBlurVisible,ot=Te.ref,Ze=Y.exports.useState(-1),Je=Ze[0],St=Ze[1],er=Y.exports.useRef(),Ft=Fo(ot,er),Ut=Fo(r,Ft),Er=As(function(rr){var tr=Number(rr.currentTarget.getAttribute("data-index"));Be(rr)&&St(tr),Ge(tr)}),kr=As(function(){Je!==-1&&(St(-1),Ke()),Ge(-1)}),mr=As(function(rr){var tr=Number(rr.currentTarget.getAttribute("data-index"));Ge(tr)}),Dt=As(function(){Ge(-1)}),Jr=me.direction==="rtl",We=As(function(rr){var tr=Number(rr.currentTarget.getAttribute("data-index")),sn=Ie[tr],un=(A-X)/10,Ye=de.map(function($t){return $t.value}),Ve=Ye.indexOf(sn),gt,qt=Jr?"ArrowLeft":"ArrowRight",Ht=Jr?"ArrowRight":"ArrowLeft";switch(rr.key){case"Home":gt=X;break;case"End":gt=A;break;case"PageUp":F&&(gt=sn+un);break;case"PageDown":F&&(gt=sn-un);break;case qt:case"ArrowUp":F?gt=sn+F:gt=Ye[Ve+1]||Ye[Ye.length-1];break;case Ht:case"ArrowDown":F?gt=sn-F:gt=Ye[Ve-1]||Ye[0];break;default:return}if(rr.preventDefault(),F&&(gt=NJ(gt,F,X)),gt=h9(gt,X,A),It){var on=gt;gt=$J({values:Ie,source:xt,newValue:gt,index:tr}).sort(d9),TL({sliderRef:er,activeIndex:gt.indexOf(on)})}pt(gt),St(tr),W&&W(rr,gt),D&&D(rr,gt)}),Oe=Y.exports.useRef(),$e=j;Jr&&j!=="vertical"&&($e+="-reverse");var Xe=function(tr){var sn=tr.finger,un=tr.move,Ye=un===void 0?!1:un,Ve=tr.values,gt=tr.source,qt=er.current,Ht=qt.getBoundingClientRect(),on=Ht.width,$t=Ht.height,Gt=Ht.bottom,Ir=Ht.left,Br;$e.indexOf("vertical")===0?Br=(Gt-sn.y)/$t:Br=(sn.x-Ir)/on,$e.indexOf("-reverse")!==-1&&(Br=1-Br);var Xr;if(Xr=bPe(Br,X,A),F)Xr=NJ(Xr,F,X);else{var Vn=de.map(function(Gi){return Gi.value}),Ln=DJ(Vn,Xr);Xr=Vn[Ln]}Xr=h9(Xr,X,A);var br=0;if(It){Ye?br=Oe.current:br=DJ(Ve,Xr);var oi=Xr;Xr=$J({values:Ve,source:gt,newValue:Xr,index:br}).sort(d9),br=Xr.indexOf(oi),Oe.current=br}return{newValue:Xr,activeIndex:br}},tt=As(function(rr){var tr=EL(rr,pe);if(!!tr){var sn=Xe({finger:tr,move:!0,values:Ie,source:xt}),un=sn.newValue,Ye=sn.activeIndex;TL({sliderRef:er,activeIndex:Ye,setActive:Re}),pt(un),W&&W(rr,un)}}),_t=As(function(rr){var tr=EL(rr,pe);if(!!tr){var sn=Xe({finger:tr,values:Ie,source:xt}),un=sn.newValue;Re(-1),rr.type==="touchend"&&Ge(-1),D&&D(rr,un),pe.current=void 0;var Ye=jc(er.current);Ye.removeEventListener("mousemove",tt),Ye.removeEventListener("mouseup",_t),Ye.removeEventListener("touchmove",tt),Ye.removeEventListener("touchend",_t)}}),Ot=As(function(rr){rr.preventDefault();var tr=rr.changedTouches[0];tr!=null&&(pe.current=tr.identifier);var sn=EL(rr,pe),un=Xe({finger:sn,values:Ie,source:xt}),Ye=un.newValue,Ve=un.activeIndex;TL({sliderRef:er,activeIndex:Ve,setActive:Re}),pt(Ye),W&&W(rr,Ye);var gt=jc(er.current);gt.addEventListener("touchmove",tt),gt.addEventListener("touchend",_t)});Y.exports.useEffect(function(){var rr=er.current;rr.addEventListener("touchstart",Ot);var tr=jc(rr);return function(){rr.removeEventListener("touchstart",Ot),tr.removeEventListener("mousemove",tt),tr.removeEventListener("mouseup",_t),tr.removeEventListener("touchmove",tt),tr.removeEventListener("touchend",_t)}},[_t,tt,Ot]);var Nt=As(function(rr){H&&H(rr),rr.preventDefault();var tr=EL(rr,pe),sn=Xe({finger:tr,values:Ie,source:xt}),un=sn.newValue,Ye=sn.activeIndex;TL({sliderRef:er,activeIndex:Ye,setActive:Re}),pt(un),W&&W(rr,un);var Ve=jc(er.current);Ve.addEventListener("mousemove",tt),Ve.addEventListener("mouseup",_t)}),bt=SL(It?Ie[0]:X,X,A),Wt=SL(Ie[Ie.length-1],X,A)-bt,Sr=vt({},PL[$e].offset(bt),PL[$e].leap(Wt));return Y.exports.createElement(m,vt({ref:Ut,className:Lr(a.root,a["color".concat(ni(u))],s,y&&a.disabled,de.length>0&&de.some(function(rr){return rr.label})&&a.marked,re===!1&&a.trackFalse,j==="vertical"&&a.vertical,re==="inverted"&&a.trackInverted),onMouseDown:Nt},se),Y.exports.createElement("span",{className:a.rail}),Y.exports.createElement("span",{className:a.track,style:Sr}),Y.exports.createElement("input",{value:Ie.join(","),name:Z,type:"hidden"}),de.map(function(rr,tr){var sn=SL(rr.value,X,A),un=PL[$e].offset(sn),Ye;return re===!1?Ye=Ie.indexOf(rr.value)!==-1:Ye=re==="normal"&&(It?rr.value>=Ie[0]&&rr.value<=Ie[Ie.length-1]:rr.value<=Ie[0])||re==="inverted"&&(It?rr.value<=Ie[0]||rr.value>=Ie[Ie.length-1]:rr.value>=Ie[0]),Y.exports.createElement(Y.exports.Fragment,{key:rr.value},Y.exports.createElement("span",{style:un,"data-index":tr,className:Lr(a.mark,Ye&&a.markActive)}),rr.label!=null?Y.exports.createElement("span",{"aria-hidden":!0,"data-index":tr,style:un,className:Lr(a.markLabel,Ye&&a.markLabelActive)},rr.label):null)}),Ie.map(function(rr,tr){var sn=SL(rr,X,A),un=PL[$e].offset(sn);return Y.exports.createElement(J,{key:tr,valueLabelFormat:xe,valueLabelDisplay:ve,className:a.valueLabel,value:typeof xe=="function"?xe(z(rr),tr):xe,index:tr,open:ze===tr||Pe===tr||ve==="on",disabled:y},Y.exports.createElement(q,{className:Lr(a.thumb,a["thumbColor".concat(ni(u))],Pe===tr&&a.active,y&&a.disabled,Je===tr&&a.focusVisible),tabIndex:y?null:0,role:"slider",style:un,"data-index":tr,"aria-label":_?_(tr):n,"aria-labelledby":i,"aria-orientation":j,"aria-valuemax":z(A),"aria-valuemin":z(X),"aria-valuenow":z(rr),"aria-valuetext":w?w(z(rr),tr):o,onKeyDown:We,onFocus:Er,onBlur:kr,onMouseOver:mr,onMouseLeave:Dt}))}))}),AAt=Dn(CPe,{name:"MuiSlider"})(EPe),SPe=function(e){var r=e.palette.type==="light"?.8:.98,n=lx(e.palette.background.default,r);return{root:vt({},e.typography.body2,Fi({color:e.palette.getContrastText(n),backgroundColor:n,display:"flex",alignItems:"center",flexWrap:"wrap",padding:"6px 16px",borderRadius:e.shape.borderRadius,flexGrow:1},e.breakpoints.up("sm"),{flexGrow:"initial",minWidth:288})),message:{padding:"8px 0"},action:{display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8}}},TPe=Y.exports.forwardRef(function(e,r){var n=e.action,i=e.classes,o=e.className,a=e.message,s=e.role,l=s===void 0?"alert":s,u=nn(e,["action","classes","className","message","role"]);return Y.exports.createElement(F1,vt({role:l,square:!0,elevation:6,className:Lr(i.root,o),ref:r},u),Y.exports.createElement("div",{className:i.message},a),n?Y.exports.createElement("div",{className:i.action},n):null)}),PPe=Dn(SPe,{name:"MuiSnackbarContent"})(TPe),IPe=function(e){var r={top:8},n={bottom:8},i={justifyContent:"flex-end"},o={justifyContent:"flex-start"},a={top:24},s={bottom:24},l={right:24},u={left:24},p={left:"50%",right:"auto",transform:"translateX(-50%)"};return{root:{zIndex:e.zIndex.snackbar,position:"fixed",display:"flex",left:8,right:8,justifyContent:"center",alignItems:"center"},anchorOriginTopCenter:vt({},r,Fi({},e.breakpoints.up("sm"),vt({},a,p))),anchorOriginBottomCenter:vt({},n,Fi({},e.breakpoints.up("sm"),vt({},s,p))),anchorOriginTopRight:vt({},r,i,Fi({},e.breakpoints.up("sm"),vt({left:"auto"},a,l))),anchorOriginBottomRight:vt({},n,i,Fi({},e.breakpoints.up("sm"),vt({left:"auto"},s,l))),anchorOriginTopLeft:vt({},r,o,Fi({},e.breakpoints.up("sm"),vt({right:"auto"},a,u))),anchorOriginBottomLeft:vt({},n,o,Fi({},e.breakpoints.up("sm"),vt({right:"auto"},s,u)))}},MPe=Y.exports.forwardRef(function(e,r){var n=e.action,i=e.anchorOrigin;i=i===void 0?{vertical:"bottom",horizontal:"center"}:i;var o=i.vertical,a=i.horizontal,s=e.autoHideDuration,l=s===void 0?null:s,u=e.children,p=e.classes,m=e.className,v=e.ClickAwayListenerProps,x=e.ContentProps,y=e.disableWindowBlurListener,_=y===void 0?!1:y,w=e.message,C=e.onClose,E=e.onEnter,T=e.onEntered,A=e.onEntering,k=e.onExit,X=e.onExited,Z=e.onExiting,W=e.onMouseEnter,D=e.onMouseLeave,H=e.open,N=e.resumeHideDuration,j=e.TransitionComponent,$=j===void 0?Q8:j,z=e.transitionDuration,O=z===void 0?{enter:af.enteringScreen,exit:af.leavingScreen}:z,F=e.TransitionProps,G=nn(e,["action","anchorOrigin","autoHideDuration","children","classes","className","ClickAwayListenerProps","ContentProps","disableWindowBlurListener","message","onClose","onEnter","onEntered","onEntering","onExit","onExited","onExiting","onMouseEnter","onMouseLeave","open","resumeHideDuration","TransitionComponent","transitionDuration","TransitionProps"]),q=Y.exports.useRef(),ee=Y.exports.useState(!0),re=ee[0],ce=ee[1],fe=As(function(){C&&C.apply(void 0,arguments)}),J=As(function(Ce){!C||Ce==null||(clearTimeout(q.current),q.current=setTimeout(function(){fe(null,"timeout")},Ce))});Y.exports.useEffect(function(){return H&&J(l),function(){clearTimeout(q.current)}},[H,l,J]);var oe=function(){clearTimeout(q.current)},ve=Y.exports.useCallback(function(){l!=null&&J(N!=null?N:l*.5)},[l,N,J]),ye=function(Pe){W&&W(Pe),oe()},xe=function(Pe){D&&D(Pe),ve()},se=function(Pe){C&&C(Pe,"clickaway")},me=function(){ce(!0)},pe=function(){ce(!1)};return Y.exports.useEffect(function(){if(!_&&H)return window.addEventListener("focus",ve),window.addEventListener("blur",oe),function(){window.removeEventListener("focus",ve),window.removeEventListener("blur",oe)}},[_,ve,H]),!H&&re?null:Y.exports.createElement(yEe,vt({onClickAway:se},v),Y.exports.createElement("div",vt({className:Lr(p.root,p["anchorOrigin".concat(ni(o)).concat(ni(a))],m),onMouseEnter:ye,onMouseLeave:xe,ref:r},G),Y.exports.createElement($,vt({appear:!0,in:H,onEnter:dy(pe,E),onEntered:T,onEntering:A,onExit:k,onExited:dy(me,X),onExiting:Z,timeout:O,direction:o==="top"?"down":"up"},F),u||Y.exports.createElement(PPe,vt({message:w,action:n},x)))))}),RAt=Dn(IPe,{flip:!1,name:"MuiSnackbar"})(MPe),APe=function(e){return{root:{display:"inline-flex",width:34+12*2,height:14+12*2,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"}},edgeStart:{marginLeft:-8},edgeEnd:{marginRight:-8},switchBase:{position:"absolute",top:0,left:0,zIndex:1,color:e.palette.type==="light"?e.palette.grey[50]:e.palette.grey[400],transition:e.transitions.create(["left","transform"],{duration:e.transitions.duration.shortest}),"&$checked":{transform:"translateX(20px)"},"&$disabled":{color:e.palette.type==="light"?e.palette.grey[400]:e.palette.grey[800]},"&$checked + $track":{opacity:.5},"&$disabled + $track":{opacity:e.palette.type==="light"?.12:.1}},colorPrimary:{"&$checked":{color:e.palette.primary.main,"&:hover":{backgroundColor:wo(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:e.palette.type==="light"?e.palette.grey[400]:e.palette.grey[800]},"&$checked + $track":{backgroundColor:e.palette.primary.main},"&$disabled + $track":{backgroundColor:e.palette.type==="light"?e.palette.common.black:e.palette.common.white}},colorSecondary:{"&$checked":{color:e.palette.secondary.main,"&:hover":{backgroundColor:wo(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:e.palette.type==="light"?e.palette.grey[400]:e.palette.grey[800]},"&$checked + $track":{backgroundColor:e.palette.secondary.main},"&$disabled + $track":{backgroundColor:e.palette.type==="light"?e.palette.common.black:e.palette.common.white}},sizeSmall:{width:40,height:24,padding:7,"& $thumb":{width:16,height:16},"& $switchBase":{padding:4,"&$checked":{transform:"translateX(16px)"}}},checked:{},disabled:{},input:{left:"-100%",width:"300%"},thumb:{boxShadow:e.shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"},track:{height:"100%",width:"100%",borderRadius:14/2,zIndex:-1,transition:e.transitions.create(["opacity","background-color"],{duration:e.transitions.duration.shortest}),backgroundColor:e.palette.type==="light"?e.palette.common.black:e.palette.common.white,opacity:e.palette.type==="light"?.38:.3}}},RPe=Y.exports.forwardRef(function(e,r){var n=e.classes,i=e.className,o=e.color,a=o===void 0?"secondary":o,s=e.edge,l=s===void 0?!1:s,u=e.size,p=u===void 0?"medium":u,m=nn(e,["classes","className","color","edge","size"]),v=Y.exports.createElement("span",{className:n.thumb});return Y.exports.createElement("span",{className:Lr(n.root,i,{start:n.edgeStart,end:n.edgeEnd}[l],p==="small"&&n["size".concat(ni(p))])},Y.exports.createElement(H8,vt({type:"checkbox",icon:v,checkedIcon:v,classes:{root:Lr(n.switchBase,n["color".concat(ni(a))]),input:n.input,checked:n.checked,disabled:n.disabled},ref:r},m)),Y.exports.createElement("span",{className:n.track}))}),kAt=Dn(APe,{name:"MuiSwitch"})(RPe),kPe=function(e){var r;return{root:vt({},e.typography.button,(r={maxWidth:264,minWidth:72,position:"relative",boxSizing:"border-box",minHeight:48,flexShrink:0,padding:"6px 12px"},Fi(r,e.breakpoints.up("sm"),{padding:"6px 24px"}),Fi(r,"overflow","hidden"),Fi(r,"whiteSpace","normal"),Fi(r,"textAlign","center"),Fi(r,e.breakpoints.up("sm"),{minWidth:160}),r)),labelIcon:{minHeight:72,paddingTop:9,"& $wrapper > *:first-child":{marginBottom:6}},textColorInherit:{color:"inherit",opacity:.7,"&$selected":{opacity:1},"&$disabled":{opacity:.5}},textColorPrimary:{color:e.palette.text.secondary,"&$selected":{color:e.palette.primary.main},"&$disabled":{color:e.palette.text.disabled}},textColorSecondary:{color:e.palette.text.secondary,"&$selected":{color:e.palette.secondary.main},"&$disabled":{color:e.palette.text.disabled}},selected:{},disabled:{},fullWidth:{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"},wrapped:{fontSize:e.typography.pxToRem(12),lineHeight:1.5},wrapper:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:"100%",flexDirection:"column"}}},OPe=Y.exports.forwardRef(function(e,r){var n=e.classes,i=e.className,o=e.disabled,a=o===void 0?!1:o,s=e.disableFocusRipple,l=s===void 0?!1:s,u=e.fullWidth,p=e.icon,m=e.indicator,v=e.label,x=e.onChange,y=e.onClick,_=e.onFocus,w=e.selected,C=e.selectionFollowsFocus,E=e.textColor,T=E===void 0?"inherit":E,A=e.value,k=e.wrapped,X=k===void 0?!1:k,Z=nn(e,["classes","className","disabled","disableFocusRipple","fullWidth","icon","indicator","label","onChange","onClick","onFocus","selected","selectionFollowsFocus","textColor","value","wrapped"]),W=function(N){x&&x(N,A),y&&y(N)},D=function(N){C&&!w&&x&&x(N,A),_&&_(N)};return Y.exports.createElement(my,vt({focusRipple:!l,className:Lr(n.root,n["textColor".concat(ni(T))],i,a&&n.disabled,w&&n.selected,v&&p&&n.labelIcon,u&&n.fullWidth,X&&n.wrapped),ref:r,role:"tab","aria-selected":w,disabled:a,onClick:W,onFocus:D,tabIndex:w?0:-1},Z),Y.exports.createElement("span",{className:n.wrapper},p,v),m)}),OAt=Dn(kPe,{name:"MuiTab"})(OPe),LPe=Y.exports.createContext(),zJ=LPe,DPe=function(e){return{root:{display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,"& caption":vt({},e.typography.body2,{padding:e.spacing(2),color:e.palette.text.secondary,textAlign:"left",captionSide:"bottom"})},stickyHeader:{borderCollapse:"separate"}}},BJ="table",NPe=Y.exports.forwardRef(function(e,r){var n=e.classes,i=e.className,o=e.component,a=o===void 0?BJ:o,s=e.padding,l=s===void 0?"normal":s,u=e.size,p=u===void 0?"medium":u,m=e.stickyHeader,v=m===void 0?!1:m,x=nn(e,["classes","className","component","padding","size","stickyHeader"]),y=Y.exports.useMemo(function(){return{padding:l,size:p,stickyHeader:v}},[l,p,v]);return Y.exports.createElement(zJ.Provider,{value:y},Y.exports.createElement(a,vt({role:a===BJ?null:"table",ref:r,className:Lr(n.root,i,v&&n.stickyHeader)},x)))}),LAt=Dn(DPe,{name:"MuiTable"})(NPe),$Pe=Y.exports.createContext(),IL=$Pe,FPe={root:{display:"table-row-group"}},zPe={variant:"body"},jJ="tbody",BPe=Y.exports.forwardRef(function(e,r){var n=e.classes,i=e.className,o=e.component,a=o===void 0?jJ:o,s=nn(e,["classes","className","component"]);return Y.exports.createElement(IL.Provider,{value:zPe},Y.exports.createElement(a,vt({className:Lr(n.root,i),ref:r,role:a===jJ?null:"rowgroup"},s)))}),DAt=Dn(FPe,{name:"MuiTableBody"})(BPe),jPe=function(e){return{root:vt({},e.typography.body2,{display:"table-cell",verticalAlign:"inherit",borderBottom:`1px solid `.concat(e.palette.type==="light"?B2(wo(e.palette.divider,1),.88):z2(wo(e.palette.divider,1),.68)),textAlign:"left",padding:16}),head:{color:e.palette.text.primary,lineHeight:e.typography.pxToRem(24),fontWeight:e.typography.fontWeightMedium},body:{color:e.palette.text.primary},footer:{color:e.palette.text.secondary,lineHeight:e.typography.pxToRem(21),fontSize:e.typography.pxToRem(12)},sizeSmall:{padding:"6px 24px 6px 16px","&:last-child":{paddingRight:16},"&$paddingCheckbox":{width:24,padding:"0 12px 0 16px","&:last-child":{paddingLeft:12,paddingRight:16},"& > *":{padding:0}}},paddingCheckbox:{width:48,padding:"0 0 0 4px","&:last-child":{paddingLeft:0,paddingRight:4}},paddingNone:{padding:0,"&:last-child":{padding:0}},alignLeft:{textAlign:"left"},alignCenter:{textAlign:"center"},alignRight:{textAlign:"right",flexDirection:"row-reverse"},alignJustify:{textAlign:"justify"},stickyHeader:{position:"sticky",top:0,left:0,zIndex:2,backgroundColor:e.palette.background.default}}},UPe=Y.exports.forwardRef(function(e,r){var n=e.align,i=n===void 0?"inherit":n,o=e.classes,a=e.className,s=e.component,l=e.padding,u=e.scope,p=e.size,m=e.sortDirection,v=e.variant,x=nn(e,["align","classes","className","component","padding","scope","size","sortDirection","variant"]),y=Y.exports.useContext(zJ),_=Y.exports.useContext(IL),w=_&&_.variant==="head",C,E;s?(E=s,C=w?"columnheader":"cell"):E=w?"th":"td";var T=u;!T&&w&&(T="col");var A=l||(y&&y.padding?y.padding:"normal"),k=p||(y&&y.size?y.size:"medium"),X=v||_&&_.variant,Z=null;return m&&(Z=m==="asc"?"ascending":"descending"),Y.exports.createElement(E,vt({ref:r,className:Lr(o.root,o[X],a,i!=="inherit"&&o["align".concat(ni(i))],A!=="normal"&&o["padding".concat(ni(A))],k!=="medium"&&o["size".concat(ni(k))],X==="head"&&y&&y.stickyHeader&&o.stickyHeader),"aria-sort":Z,role:C,scope:T},x))}),NAt=Dn(jPe,{name:"MuiTableCell"})(UPe),VPe={root:{width:"100%",overflowX:"auto"}},HPe=Y.exports.forwardRef(function(e,r){var n=e.classes,i=e.className,o=e.component,a=o===void 0?"div":o,s=nn(e,["classes","className","component"]);return Y.exports.createElement(a,vt({ref:r,className:Lr(n.root,i)},s))}),$At=Dn(VPe,{name:"MuiTableContainer"})(HPe),WPe={root:{display:"table-header-group"}},GPe={variant:"head"},UJ="thead",qPe=Y.exports.forwardRef(function(e,r){var n=e.classes,i=e.className,o=e.component,a=o===void 0?UJ:o,s=nn(e,["classes","className","component"]);return Y.exports.createElement(IL.Provider,{value:GPe},Y.exports.createElement(a,vt({className:Lr(n.root,i),ref:r,role:a===UJ?null:"rowgroup"},s)))}),FAt=Dn(WPe,{name:"MuiTableHead"})(qPe),XPe=Ro(Y.exports.createElement("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"})),YPe=Ro(Y.exports.createElement("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"})),KPe=function(e){return{root:{color:"inherit",display:"table-row",verticalAlign:"middle",outline:0,"&$hover:hover":{backgroundColor:e.palette.action.hover},"&$selected, &$selected:hover":{backgroundColor:wo(e.palette.secondary.main,e.palette.action.selectedOpacity)}},selected:{},hover:{},head:{},footer:{}}},VJ="tr",ZPe=Y.exports.forwardRef(function(e,r){var n=e.classes,i=e.className,o=e.component,a=o===void 0?VJ:o,s=e.hover,l=s===void 0?!1:s,u=e.selected,p=u===void 0?!1:u,m=nn(e,["classes","className","component","hover","selected"]),v=Y.exports.useContext(IL);return Y.exports.createElement(a,vt({ref:r,className:Lr(n.root,i,v&&{head:n.head,footer:n.footer}[v.variant],l&&n.hover,p&&n.selected),role:a===VJ?null:"row"},m))}),zAt=Dn(KPe,{name:"MuiTableRow"})(ZPe),J2;function HJ(){if(J2)return J2;var t=document.createElement("div"),e=document.createElement("div");return e.style.width="10px",e.style.height="1px",t.appendChild(e),t.dir="rtl",t.style.fontSize="14px",t.style.width="4px",t.style.height="1px",t.style.position="absolute",t.style.top="-1000px",t.style.overflow="scroll",document.body.appendChild(t),J2="reverse",t.scrollLeft>0?J2="default":(t.scrollLeft=1,t.scrollLeft===0&&(J2="negative")),document.body.removeChild(t),J2}function WJ(t,e){var r=t.scrollLeft;if(e!=="rtl")return r;var n=HJ();switch(n){case"negative":return t.scrollWidth-t.clientWidth+r;case"reverse":return t.scrollWidth-t.clientWidth-r;default:return r}}function QPe(t){return(1+Math.sin(Math.PI*t-Math.PI/2))/2}function JPe(t,e,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:function(){},o=n.ease,a=o===void 0?QPe:o,s=n.duration,l=s===void 0?300:s,u=null,p=e[t],m=!1,v=function(){m=!0},x=function y(_){if(m){i(new Error("Animation cancelled"));return}u===null&&(u=_);var w=Math.min(1,(_-u)/l);if(e[t]=a(w)*(r-p)+p,w>=1){requestAnimationFrame(function(){i(null)});return}requestAnimationFrame(y)};return p===r?(i(new Error("Element already at target position")),v):(requestAnimationFrame(x),v)}var eIe={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function tIe(t){var e=t.onChange,r=nn(t,["onChange"]),n=Y.exports.useRef(),i=Y.exports.useRef(null),o=function(){n.current=i.current.offsetHeight-i.current.clientHeight};return Y.exports.useEffect(function(){var a=px(function(){var s=n.current;o(),s!==n.current&&e(n.current)});return window.addEventListener("resize",a),function(){a.clear(),window.removeEventListener("resize",a)}},[e]),Y.exports.useEffect(function(){o(),e(n.current)},[e]),Y.exports.createElement("div",vt({style:eIe,ref:i},r))}var rIe=function(e){return{root:{position:"absolute",height:2,bottom:0,width:"100%",transition:e.transitions.create()},colorPrimary:{backgroundColor:e.palette.primary.main},colorSecondary:{backgroundColor:e.palette.secondary.main},vertical:{height:"100%",width:2,right:0}}},nIe=Y.exports.forwardRef(function(e,r){var n=e.classes,i=e.className,o=e.color,a=e.orientation,s=nn(e,["classes","className","color","orientation"]);return Y.exports.createElement("span",vt({className:Lr(n.root,n["color".concat(ni(o))],i,a==="vertical"&&n.vertical),ref:r},s))}),iIe=Dn(rIe,{name:"PrivateTabIndicator"})(nIe),oIe={root:{width:40,flexShrink:0,opacity:.8,"&$disabled":{opacity:0}},vertical:{width:"100%",height:40,"& svg":{transform:"rotate(90deg)"}},disabled:{}},sIe=Y.exports.createElement(XPe,{fontSize:"small"}),aIe=Y.exports.createElement(YPe,{fontSize:"small"}),lIe=Y.exports.forwardRef(function(e,r){var n=e.classes,i=e.className,o=e.direction,a=e.orientation,s=e.disabled,l=nn(e,["classes","className","direction","orientation","disabled"]);return Y.exports.createElement(my,vt({component:"div",className:Lr(n.root,i,s&&n.disabled,a==="vertical"&&n.vertical),ref:r,role:null,tabIndex:null},l),o==="left"?sIe:aIe)}),cIe=Dn(oIe,{name:"MuiTabScrollButton"})(lIe),uIe=function(e){return{root:{overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex"},vertical:{flexDirection:"column"},flexContainer:{display:"flex"},flexContainerVertical:{flexDirection:"column"},centered:{justifyContent:"center"},scroller:{position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap"},fixed:{overflowX:"hidden",width:"100%"},scrollable:{overflowX:"scroll",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},scrollButtons:{},scrollButtonsDesktop:Fi({},e.breakpoints.down("xs"),{display:"none"}),indicator:{}}},fIe=Y.exports.forwardRef(function(e,r){var n=e["aria-label"],i=e["aria-labelledby"],o=e.action,a=e.centered,s=a===void 0?!1:a,l=e.children,u=e.classes,p=e.className,m=e.component,v=m===void 0?"div":m,x=e.indicatorColor,y=x===void 0?"secondary":x,_=e.onChange,w=e.orientation,C=w===void 0?"horizontal":w,E=e.ScrollButtonComponent,T=E===void 0?cIe:E,A=e.scrollButtons,k=A===void 0?"auto":A,X=e.selectionFollowsFocus,Z=e.TabIndicatorProps,W=Z===void 0?{}:Z,D=e.TabScrollButtonProps,H=e.textColor,N=H===void 0?"inherit":H,j=e.value,$=e.variant,z=$===void 0?"standard":$,O=nn(e,["aria-label","aria-labelledby","action","centered","children","classes","className","component","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","selectionFollowsFocus","TabIndicatorProps","TabScrollButtonProps","textColor","value","variant"]),F=zg(),G=z==="scrollable",q=F.direction==="rtl",ee=C==="vertical",re=ee?"scrollTop":"scrollLeft",ce=ee?"top":"left",fe=ee?"bottom":"right",J=ee?"clientHeight":"clientWidth",oe=ee?"height":"width",ve=Y.exports.useState(!1),ye=ve[0],xe=ve[1],se=Y.exports.useState({}),me=se[0],pe=se[1],Ce=Y.exports.useState({start:!1,end:!1}),Pe=Ce[0],Re=Ce[1],ke=Y.exports.useState({overflow:"hidden",marginBottom:null}),ze=ke[0],Ge=ke[1],ht=new Map,Tt=Y.exports.useRef(null),xt=Y.exports.useRef(null),pt=function(){var Dt=Tt.current,Jr;if(Dt){var We=Dt.getBoundingClientRect();Jr={clientWidth:Dt.clientWidth,scrollLeft:Dt.scrollLeft,scrollTop:Dt.scrollTop,scrollLeftNormalized:WJ(Dt,F.direction),scrollWidth:Dt.scrollWidth,top:We.top,bottom:We.bottom,left:We.left,right:We.right}}var Oe;if(Dt&&j!==!1){var $e=xt.current.children;if($e.length>0){var Xe=$e[ht.get(j)];Oe=Xe?Xe.getBoundingClientRect():null}}return{tabsMeta:Jr,tabMeta:Oe}},It=As(function(){var mr,Dt=pt(),Jr=Dt.tabsMeta,We=Dt.tabMeta,Oe=0;if(We&&Jr)if(ee)Oe=We.top-Jr.top+Jr.scrollTop;else{var $e=q?Jr.scrollLeftNormalized+Jr.clientWidth-Jr.scrollWidth:Jr.scrollLeft;Oe=We.left-Jr.left+$e}var Xe=(mr={},Fi(mr,ce,Oe),Fi(mr,oe,We?We[oe]:0),mr);if(isNaN(me[ce])||isNaN(me[oe]))pe(Xe);else{var tt=Math.abs(me[ce]-Xe[ce]),_t=Math.abs(me[oe]-Xe[oe]);(tt>=1||_t>=1)&&pe(Xe)}}),Ie=function(Dt){JPe(re,Tt.current,Dt)},de=function(Dt){var Jr=Tt.current[re];ee?Jr+=Dt:(Jr+=Dt*(q?-1:1),Jr*=q&&HJ()==="reverse"?-1:1),Ie(Jr)},Te=function(){de(-Tt.current[J])},Be=function(){de(Tt.current[J])},Ke=Y.exports.useCallback(function(mr){Ge({overflow:null,marginBottom:-mr})},[]),ot=function(){var Dt={};Dt.scrollbarSizeListener=G?Y.exports.createElement(tIe,{className:u.scrollable,onChange:Ke}):null;var Jr=Pe.start||Pe.end,We=G&&(k==="auto"&&Jr||k==="desktop"||k==="on");return Dt.scrollButtonStart=We?Y.exports.createElement(T,vt({orientation:C,direction:q?"right":"left",onClick:Te,disabled:!Pe.start,className:Lr(u.scrollButtons,k!=="on"&&u.scrollButtonsDesktop)},D)):null,Dt.scrollButtonEnd=We?Y.exports.createElement(T,vt({orientation:C,direction:q?"left":"right",onClick:Be,disabled:!Pe.end,className:Lr(u.scrollButtons,k!=="on"&&u.scrollButtonsDesktop)},D)):null,Dt},Ze=As(function(){var mr=pt(),Dt=mr.tabsMeta,Jr=mr.tabMeta;if(!(!Jr||!Dt)){if(Jr[ce]<Dt[ce]){var We=Dt[re]+(Jr[ce]-Dt[ce]);Ie(We)}else if(Jr[fe]>Dt[fe]){var Oe=Dt[re]+(Jr[fe]-Dt[fe]);Ie(Oe)}}}),Je=As(function(){if(G&&k!=="off"){var mr=Tt.current,Dt=mr.scrollTop,Jr=mr.scrollHeight,We=mr.clientHeight,Oe=mr.scrollWidth,$e=mr.clientWidth,Xe,tt;if(ee)Xe=Dt>1,tt=Dt<Jr-We-1;else{var _t=WJ(Tt.current,F.direction);Xe=q?_t<Oe-$e-1:_t>1,tt=q?_t>1:_t<Oe-$e-1}(Xe!==Pe.start||tt!==Pe.end)&&Re({start:Xe,end:tt})}});Y.exports.useEffect(function(){var mr=px(function(){It(),Je()}),Dt=hL(Tt.current);return Dt.addEventListener("resize",mr),function(){mr.clear(),Dt.removeEventListener("resize",mr)}},[It,Je]);var St=Y.exports.useCallback(px(function(){Je()}));Y.exports.useEffect(function(){return function(){St.clear()}},[St]),Y.exports.useEffect(function(){xe(!0)},[]),Y.exports.useEffect(function(){It(),Je()}),Y.exports.useEffect(function(){Ze()},[Ze,me]),Y.exports.useImperativeHandle(o,function(){return{updateIndicator:It,updateScrollButtons:Je}},[It,Je]);var er=Y.exports.createElement(iIe,vt({className:u.indicator,orientation:C,color:y},W,{style:vt({},me,W.style)})),Ft=0,Ut=Y.exports.Children.map(l,function(mr){if(!Y.exports.isValidElement(mr))return null;var Dt=mr.props.value===void 0?Ft:mr.props.value;ht.set(Dt,Ft);var Jr=Dt===j;return Ft+=1,Y.exports.cloneElement(mr,{fullWidth:z==="fullWidth",indicator:Jr&&!ye&&er,selected:Jr,selectionFollowsFocus:X,onChange:_,textColor:N,value:Dt})}),Er=function(Dt){var Jr=Dt.target,We=Jr.getAttribute("role");if(We==="tab"){var Oe=null,$e=C!=="vertical"?"ArrowLeft":"ArrowUp",Xe=C!=="vertical"?"ArrowRight":"ArrowDown";switch(C!=="vertical"&&F.direction==="rtl"&&($e="ArrowRight",Xe="ArrowLeft"),Dt.key){case $e:Oe=Jr.previousElementSibling||xt.current.lastChild;break;case Xe:Oe=Jr.nextElementSibling||xt.current.firstChild;break;case"Home":Oe=xt.current.firstChild;break;case"End":Oe=xt.current.lastChild;break}Oe!==null&&(Oe.focus(),Dt.preventDefault())}},kr=ot();return Y.exports.createElement(v,vt({className:Lr(u.root,p,ee&&u.vertical),ref:r},O),kr.scrollButtonStart,kr.scrollbarSizeListener,Y.exports.createElement("div",{className:Lr(u.scroller,G?u.scrollable:u.fixed),style:ze,ref:Tt,onScroll:St},Y.exports.createElement("div",{"aria-label":n,"aria-labelledby":i,className:Lr(u.flexContainer,ee&&u.flexContainerVertical,s&&!G&&u.centered),onKeyDown:Er,ref:xt,role:"tablist"},Ut),ye&&er),kr.scrollButtonEnd)}),BAt=Dn(uIe,{name:"MuiTabs"})(fIe),dIe={standard:J8,filled:qQ,outlined:lJ},hIe={root:{}},pIe=Y.exports.forwardRef(function(e,r){var n=e.autoComplete,i=e.autoFocus,o=i===void 0?!1:i,a=e.children,s=e.classes,l=e.className,u=e.color,p=u===void 0?"primary":u,m=e.defaultValue,v=e.disabled,x=v===void 0?!1:v,y=e.error,_=y===void 0?!1:y,w=e.FormHelperTextProps,C=e.fullWidth,E=C===void 0?!1:C,T=e.helperText,A=e.hiddenLabel,k=e.id,X=e.InputLabelProps,Z=e.inputProps,W=e.InputProps,D=e.inputRef,H=e.label,N=e.multiline,j=N===void 0?!1:N,$=e.name,z=e.onBlur,O=e.onChange,F=e.onFocus,G=e.placeholder,q=e.required,ee=q===void 0?!1:q,re=e.rows,ce=e.rowsMax,fe=e.maxRows,J=e.minRows,oe=e.select,ve=oe===void 0?!1:oe,ye=e.SelectProps,xe=e.type,se=e.value,me=e.variant,pe=me===void 0?"standard":me,Ce=nn(e,["autoComplete","autoFocus","children","classes","className","color","defaultValue","disabled","error","FormHelperTextProps","fullWidth","helperText","hiddenLabel","id","InputLabelProps","inputProps","InputProps","inputRef","label","multiline","name","onBlur","onChange","onFocus","placeholder","required","rows","rowsMax","maxRows","minRows","select","SelectProps","type","value","variant"]),Pe={};if(pe==="outlined"&&(X&&typeof X.shrink!="undefined"&&(Pe.notched=X.shrink),H)){var Re,ke=(Re=X==null?void 0:X.required)!==null&&Re!==void 0?Re:ee;Pe.label=Y.exports.createElement(Y.exports.Fragment,null,H,ke&&"\xA0*")}ve&&((!ye||!ye.native)&&(Pe.id=void 0),Pe["aria-describedby"]=void 0);var ze=T&&k?"".concat(k,"-helper-text"):void 0,Ge=H&&k?"".concat(k,"-label"):void 0,ht=dIe[pe],Tt=Y.exports.createElement(ht,vt({"aria-describedby":ze,autoComplete:n,autoFocus:o,defaultValue:m,fullWidth:E,multiline:j,name:$,rows:re,rowsMax:ce,maxRows:fe,minRows:J,type:xe,value:se,id:k,inputRef:D,onBlur:z,onChange:O,onFocus:F,placeholder:G,inputProps:Z},Pe,W));return Y.exports.createElement(sSe,vt({className:Lr(s.root,l),disabled:x,error:_,fullWidth:E,hiddenLabel:A,ref:r,required:ee,color:p,variant:pe},Ce),H&&Y.exports.createElement(LSe,vt({htmlFor:k,id:Ge},X),H),ve?Y.exports.createElement(vPe,vt({"aria-describedby":ze,id:k,labelId:Ge,value:se,input:Tt},ye),a):Tt,T&&Y.exports.createElement(pSe,vt({id:ze},w),T))}),jAt=Dn(hIe,{name:"MuiTextField"})(pIe);function GJ(t){return Math.round(t*1e5)/1e5}function mIe(){return{'&[x-placement*="bottom"] $arrow':{top:0,left:0,marginTop:"-0.71em",marginLeft:4,marginRight:4,"&::before":{transformOrigin:"0 100%"}},'&[x-placement*="top"] $arrow':{bottom:0,left:0,marginBottom:"-0.71em",marginLeft:4,marginRight:4,"&::before":{transformOrigin:"100% 0"}},'&[x-placement*="right"] $arrow':{left:0,marginLeft:"-0.71em",height:"1em",width:"0.71em",marginTop:4,marginBottom:4,"&::before":{transformOrigin:"100% 100%"}},'&[x-placement*="left"] $arrow':{right:0,marginRight:"-0.71em",height:"1em",width:"0.71em",marginTop:4,marginBottom:4,"&::before":{transformOrigin:"0 0"}}}}var gIe=function(e){return{popper:{zIndex:e.zIndex.tooltip,pointerEvents:"none"},popperInteractive:{pointerEvents:"auto"},popperArrow:mIe(),tooltip:{backgroundColor:wo(e.palette.grey[700],.9),borderRadius:e.shape.borderRadius,color:e.palette.common.white,fontFamily:e.typography.fontFamily,padding:"4px 8px",fontSize:e.typography.pxToRem(10),lineHeight:"".concat(GJ(14/10),"em"),maxWidth:300,wordWrap:"break-word",fontWeight:e.typography.fontWeightMedium},tooltipArrow:{position:"relative",margin:"0"},arrow:{overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:wo(e.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}},touch:{padding:"8px 16px",fontSize:e.typography.pxToRem(14),lineHeight:"".concat(GJ(16/14),"em"),fontWeight:e.typography.fontWeightRegular},tooltipPlacementLeft:Fi({transformOrigin:"right center",margin:"0 24px "},e.breakpoints.up("sm"),{margin:"0 14px"}),tooltipPlacementRight:Fi({transformOrigin:"left center",margin:"0 24px"},e.breakpoints.up("sm"),{margin:"0 14px"}),tooltipPlacementTop:Fi({transformOrigin:"center bottom",margin:"24px 0"},e.breakpoints.up("sm"),{margin:"14px 0"}),tooltipPlacementBottom:Fi({transformOrigin:"center top",margin:"24px 0"},e.breakpoints.up("sm"),{margin:"14px 0"})}},ML=!1,p9=null,vIe=Y.exports.forwardRef(function(e,r){var n=e.arrow,i=n===void 0?!1:n,o=e.children,a=e.classes,s=e.disableFocusListener,l=s===void 0?!1:s,u=e.disableHoverListener,p=u===void 0?!1:u,m=e.disableTouchListener,v=m===void 0?!1:m,x=e.enterDelay,y=x===void 0?100:x,_=e.enterNextDelay,w=_===void 0?0:_,C=e.enterTouchDelay,E=C===void 0?700:C,T=e.id,A=e.interactive,k=A===void 0?!1:A,X=e.leaveDelay,Z=X===void 0?0:X,W=e.leaveTouchDelay,D=W===void 0?1500:W,H=e.onClose,N=e.onOpen,j=e.open,$=e.placement,z=$===void 0?"bottom":$,O=e.PopperComponent,F=O===void 0?AJ:O,G=e.PopperProps,q=e.title,ee=e.TransitionComponent,re=ee===void 0?Q8:ee,ce=e.TransitionProps,fe=nn(e,["arrow","children","classes","disableFocusListener","disableHoverListener","disableTouchListener","enterDelay","enterNextDelay","enterTouchDelay","id","interactive","leaveDelay","leaveTouchDelay","onClose","onOpen","open","placement","PopperComponent","PopperProps","title","TransitionComponent","TransitionProps"]),J=zg(),oe=Y.exports.useState(),ve=oe[0],ye=oe[1],xe=Y.exports.useState(null),se=xe[0],me=xe[1],pe=Y.exports.useRef(!1),Ce=Y.exports.useRef(),Pe=Y.exports.useRef(),Re=Y.exports.useRef(),ke=Y.exports.useRef(),ze=Bg({controlled:j,default:!1,name:"Tooltip",state:"open"}),Ge=qf(ze,2),ht=Ge[0],Tt=Ge[1],xt=ht,pt=pL(T);Y.exports.useEffect(function(){return function(){clearTimeout(Ce.current),clearTimeout(Pe.current),clearTimeout(Re.current),clearTimeout(ke.current)}},[]);var It=function(Nt){clearTimeout(p9),ML=!0,Tt(!0),N&&N(Nt)},Ie=function(){var Nt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return function(bt){var Wt=o.props;bt.type==="mouseover"&&Wt.onMouseOver&&Nt&&Wt.onMouseOver(bt),!(pe.current&&bt.type!=="touchstart")&&(ve&&ve.removeAttribute("title"),clearTimeout(Pe.current),clearTimeout(Re.current),y||ML&&w?(bt.persist(),Pe.current=setTimeout(function(){It(bt)},ML?w:y)):It(bt))}},de=FP(),Te=de.isFocusVisible,Be=de.onBlurVisible,Ke=de.ref,ot=Y.exports.useState(!1),Ze=ot[0],Je=ot[1],St=function(){Ze&&(Je(!1),Be())},er=function(){var Nt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return function(bt){ve||ye(bt.currentTarget),Te(bt)&&(Je(!0),Ie()(bt));var Wt=o.props;Wt.onFocus&&Nt&&Wt.onFocus(bt)}},Ft=function(Nt){clearTimeout(p9),p9=setTimeout(function(){ML=!1},800+Z),Tt(!1),H&&H(Nt),clearTimeout(Ce.current),Ce.current=setTimeout(function(){pe.current=!1},J.transitions.duration.shortest)},Ut=function(){var Nt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return function(bt){var Wt=o.props;bt.type==="blur"&&(Wt.onBlur&&Nt&&Wt.onBlur(bt),St()),bt.type==="mouseleave"&&Wt.onMouseLeave&&bt.currentTarget===ve&&Wt.onMouseLeave(bt),clearTimeout(Pe.current),clearTimeout(Re.current),bt.persist(),Re.current=setTimeout(function(){Ft(bt)},Z)}},Er=function(Nt){pe.current=!0;var bt=o.props;bt.onTouchStart&&bt.onTouchStart(Nt)},kr=function(Nt){Er(Nt),clearTimeout(Re.current),clearTimeout(Ce.current),clearTimeout(ke.current),Nt.persist(),ke.current=setTimeout(function(){Ie()(Nt)},E)},mr=function(Nt){o.props.onTouchEnd&&o.props.onTouchEnd(Nt),clearTimeout(ke.current),clearTimeout(Re.current),Nt.persist(),Re.current=setTimeout(function(){Ft(Nt)},D)},Dt=Fo(ye,r),Jr=Fo(Ke,Dt),We=Y.exports.useCallback(function(Ot){hy(Jr,Wa.exports.findDOMNode(Ot))},[Jr]),Oe=Fo(o.ref,We);q===""&&(xt=!1);var $e=!xt&&!p,Xe=vt({"aria-describedby":xt?pt:null,title:$e&&typeof q=="string"?q:null},fe,o.props,{className:Lr(fe.className,o.props.className),onTouchStart:Er,ref:Oe}),tt={};v||(Xe.onTouchStart=kr,Xe.onTouchEnd=mr),p||(Xe.onMouseOver=Ie(),Xe.onMouseLeave=Ut(),k&&(tt.onMouseOver=Ie(!1),tt.onMouseLeave=Ut(!1))),l||(Xe.onFocus=er(),Xe.onBlur=Ut(),k&&(tt.onFocus=er(!1),tt.onBlur=Ut(!1)));var _t=Y.exports.useMemo(function(){return ax({popperOptions:{modifiers:{arrow:{enabled:Boolean(se),element:se}}}},G)},[se,G]);return Y.exports.createElement(Y.exports.Fragment,null,Y.exports.cloneElement(o,Xe),Y.exports.createElement(F,vt({className:Lr(a.popper,k&&a.popperInteractive,i&&a.popperArrow),placement:z,anchorEl:ve,open:ve?xt:!1,id:Xe["aria-describedby"],transition:!0},tt,_t),function(Ot){var Nt=Ot.placement,bt=Ot.TransitionProps;return Y.exports.createElement(re,vt({timeout:J.transitions.duration.shorter},bt,ce),Y.exports.createElement("div",{className:Lr(a.tooltip,a["tooltipPlacement".concat(ni(Nt.split("-")[0]))],pe.current&&a.touch,i&&a.tooltipArrow)},q,i?Y.exports.createElement("span",{className:a.arrow,ref:me}):null))}))}),yIe=Dn(gIe,{name:"MuiTooltip",flip:!1})(vIe),xIe={entering:{transform:"none"},entered:{transform:"none"}},_Ie={enter:af.enteringScreen,exit:af.leavingScreen},bIe=Y.exports.forwardRef(function(e,r){var n=e.children,i=e.disableStrictModeCompat,o=i===void 0?!1:i,a=e.in,s=e.onEnter,l=e.onEntered,u=e.onEntering,p=e.onExit,m=e.onExited,v=e.onExiting,x=e.style,y=e.timeout,_=y===void 0?_Ie:y,w=e.TransitionComponent,C=w===void 0?BP:w,E=nn(e,["children","disableStrictModeCompat","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"]),T=zg(),A=T.unstable_strictMode&&!o,k=Y.exports.useRef(null),X=Fo(n.ref,r),Z=Fo(A?k:void 0,X),W=function(F){return function(G,q){if(F){var ee=A?[k.current,G]:[G,q],re=qf(ee,2),ce=re[0],fe=re[1];fe===void 0?F(ce):F(ce,fe)}}},D=W(u),H=W(function(O,F){vL(O);var G=jg({style:x,timeout:_},{mode:"enter"});O.style.webkitTransition=T.transitions.create("transform",G),O.style.transition=T.transitions.create("transform",G),s&&s(O,F)}),N=W(l),j=W(v),$=W(function(O){var F=jg({style:x,timeout:_},{mode:"exit"});O.style.webkitTransition=T.transitions.create("transform",F),O.style.transition=T.transitions.create("transform",F),p&&p(O)}),z=W(m);return Y.exports.createElement(C,vt({appear:!0,in:a,nodeRef:A?k:void 0,onEnter:H,onEntered:N,onEntering:D,onExit:$,onExited:z,onExiting:j,timeout:_},E),function(O,F){return Y.exports.cloneElement(n,vt({style:vt({transform:"scale(0)",visibility:O==="exited"&&!a?"hidden":void 0},xIe[O],x,n.props.style),ref:Z},F))})}),wIe=bIe,gy={},CIe=PT(k_e);function m9(t){if(!t||typeof window=="undefined")return;const e=document.createElement("style");return e.setAttribute("type","text/css"),e.innerHTML=t,document.head.appendChild(e),t}Object.defineProperty(gy,"__esModule",{value:!0});var Uc=Y.exports,EIe=Us,g9=CIe;function qJ(t){if(t&&t.__esModule)return t;var e=Object.create(null);return t&&Object.keys(t).forEach(function(r){if(r!=="default"){var n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:function(){return t[r]}})}}),e.default=t,Object.freeze(e)}var Vr=qJ(Uc),ss=qJ(EIe),SIe="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAfwAAADvCAYAAAAXZ2aSAAAACXBIWXMAAAsSAAALEgHS3X78AAAgAElEQVR4nO3dC5QU1ZkH8Iu8YYAZQIaHDAMo6EBgAF+RKBjQZCMqJsbgRhN8bXJiMGiSPTFrDHlskpPsKit57G7MitEkalzFiMlGQZH4NsBAEHnI8FAgvIeXDMhjz/923+7b1VXVVV3V3VV1/79z5sC8uquqe+q797vfvbeNuHPxdCFEvSAiIqKk2thOCIGAP4EvMRERUWK9eApfWyIiouRjwCciIjIAAz4REZEBGPCJiIgMwIBPRERkAAZ8IiIiAzDgExERGYABn4iIyAAM+ERERAZgwCciIjIAAz4REZEBGPCJiIgMwIBPRERkAAZ8IiIiAzDgExERGYABn4iIyAAM+ERERAZgwCciIjIAAz4REZEBGPCJiIgMwIBPRERkAAZ8IiIiAzDgExERGYABn4iIyAAM+ERERAZgwCciIjIAAz4REZEBGPCJiIgMwIBPRERkAAZ8IiIiAzDgExERGYABn4iIyAAM+ERERAZgwCciIjIAAz4REZEBGPCJiIgMwIBPRERkAAZ8IiIiAzDgExERGYABn4iIyAAM+ERERAZgwCciIjIAAz4REZEBGPCJiIgMwIBPRERkAAZ8IiIiAzDgExERGYABn4iIyAAM+ERERAZgwCciIjIAAz4REZEBGPCJiIgMwIBPRERkAAZ8IiIiAzDgExERGYABn4iIyAAM+ERERAZgwCciIjIAAz4REZEBGPCJiIgMwIBPRERkAAZ8IiIiAzDgExERGYABn4iIyAAM+ERERAZgwCciIjIAAz4REZEBGPCJiIgMwIBPRERkAAZ8IiIiAzDgExERGYABn4iIyAAM+ERERAZgwCciIjIAAz4REZEBGPCJiIgMwIBPRERkAAZ8IiIiAzDgExERGYABn4iIyADt+CJTKVR3aica+3f1/chNWw+JltZjkX9NGvt1FdWd/f/5BDm/Yq9pOcXh9YvDdSy1jXuPiI17WwM/y8QhPQL9flz+3pMitgEfN9zZU4bmfa1Hp3BOaVPLETF3yXYxa+Gmgj+rbiD11Z1EfU0n+bX6mo6Z/yv4A8MfGjRtOyjf6Iua93k6nqkNvcT0sbVFBRmvcL5zl24P5bFwPV64eZTv33tq1W4x9eFVoRxDKeG9N2Gw/5vdxfev8PyaWxV7TSthX+sx0bTtkHyf46Yu/912KBLHFqfrWCrfWbjZ072tkKDXMcjfA/kX24CPwFfMDbcQBPpZCzZ5CnyzpwyRQdhrI8PpeL0857xVu+UfxszxA8TM8f1Da9joovCHd2W6YRNWw4MqA+9PvN/19zwaAXgfqw8iKi+m9NNwM5o5v9lXoGnsVxVK4B1UnZ8NsIOMAFrls1/eUtLAX2loSEWpR0jhwHv182Nr5Qf+3vC3NvvlraGklomoMBbtpdNb9T9+M9ReJW5oL27Yl/MRFhX4ccwPJrAnjMAw9+rhETgSKhW8xl+5YIDY8PVzxNyrh3lq8BJRMMb38JdvOyR7zMUWjiCQIxUux+dbWj2lxdWYPzIEGOufOLi6qOfGMU9/fK28WZZieKOSRssajSEy60LJpnr9//HKFjFrwWYWcRGViPEBH4Fl0S2jxMRfrvB9o8Hv6BDIVdWqXsCnqEaBSI+XhzFmjt5R0oK9gh6gql2g5MPrPbWht5j++Bq+5kQlYHzAFwGCPoI7qufRUy9mhoCqZMbNDcMJfscyEezRM0qyedc1yKEL9vrMgHoWVH6HVUVORFkcw09TQb/aR9CeNWmQ7JWgh11M8ZyqZP72pDpZme5VtRzjTn6wF5nx/GEROBIqJ/xN8HUnChcDvqaYoF9uODYcownBXsFUPcxKILPgPc6gTxQeBnwbKKSLKrnAT4SPr1RmTaqTwyZkFgR9ZNKIKDgGfA3GDRvnLBUtrcdlzyJqPX3c+FoOH5Nj2qhoNgmn6pkL6f2gS7gSEQO+hJXuxsxZKouEEFQxNxg9iyil99EAwY1v2YyxqUV35jeLqx5eJQv/TKGm6pF50NiL8lAbURwYH/CxdnvjfalefdOMsTKoKlEZ07cW6OEYcayo8G+cs0yuJWCK1NStXsacL6Wgen/W5DpeDaIAjG4yY5U6LFyDAIKgaldpH2SefhicqvFxXE0zxsiNZnBs865vSOx8fCu5Mhun6vmCLFaplrBFg3h0Geor0NiLylK82PQlztQmXmQWYwO+CvaYDvdAgUrgYoO+vpxuMTfFQlPv0EDBnOUbHl8rj82kqXpo4FgXPiJnXnd+DEKtIImVIzHmXooGKIo38XdbaVwYiOLIyICvgr2fAOkW9NF7WtTcIm8CXjZ9wc0Qi/VMHNxD/t+aWahOBzSvN0w0WHCjxTnhd680IOWNa4NaBiyLTNGgtnuWwXBh6n0c9iZPsmp/4WZuuENUBOMCvgr2KP7y2xu2Bn30mmbOX+97Vzd1U1TBCkMKqhGh5tn7zQYg3YnfRYrflJ7+vZcNkQ0t7qoXTfrujhh/x3s0DPh7YUOPyD+jivb0NH6xNx/04LEXP2A53DCCjb5ePHrq6vH9UnOWUcFvSiEfq7ejryW99TTGvcOYVeJnVUoiykpMwMe8dLcgh/F0VaBXaMzeDh4bNyw8RinTiQj89T9+Q47LY6jAL1Tw4xyRhXD7fZwPpvXFHTIhrN6OB7y38b4MGvTxmnM7XSL/EhHwEdiwrSZuJnZBHzeYqQ+tkiu1FbNUp1qQp5yFOsgeYLpgMQvsPCD3F+8opj70lu33cY1kZf+q3YnYT59T9eIDGbEwtjyeaMiMFKIwJSLgYxwdaUN8IJDp1fGgqnqR/vVTPISGglqQpxKCpELnXT9CTr25/Zncm6sK9qpmAAVQSVi8R07VY68vFtCYxfoXQXDlPSL/Yh/wEdznaTcPFfRVzxU3FnwfAcFPIRwCI+Z6R6EgDJkFvwvsYKESnDOKm1QDyBrsRXqPfsxtjjvuqhcvM58J1stn447Iv9gHfKfeN3r1SIercXs/U9XQSKjUQjtOEJidhiyc4Jxx7siA2AV7BY2CJPTyMVWPG63EA97PQQpLTVlkiihMsQ746Lm6jaursUI/PT9kBjC1LYqruKnshZ8b5ewpQ2VqP7UpkP05ySmGCRjLF+miRe6qFw9Jec8RxUWsA76XubgIZvM8jhcikEZhFS83OJ+pPjbNwe56XiQhra+gfoFT9aIPU1yJqHxiG/DRa/UayBHEC1Wj70v3nuNApfcLcUvj51/P1kj0uJC1CbqGAOoXuKte9AWd9cLCPSJ/Yhzw/c2FLxT0o5rGd4JiQkwXdOIn2CtRWa50+uNrAtcUYBEiTtVLNm4AQ+SPUSvtOQV9fC2Om2GgYNE6BVEUGeyjJKy52pyql2xcT5/IH+P2w7cG/X3pue5xhQp8XdyDvRLGXG25q951DWEeFhFRbBkX8IUl6KNYLc7BEb1hdS5JCfbK9CKXF9bJpXc5VY+IyMyAL7R5+knYdQur5SUt2As1I8FheWA/MFWPBV7Rw+mTROVlbMAX6Xn6SQiQGMt0m2cfZ4WKE73irnrR09ivquhjsqtdISJ3sb8D6j03zDlHgEDPwcsWs3Es1HPjpRfrdI2ifC1QnIhzC7K6mlpqeGoCdghMiiCzKLyuL0FEWbEO+KjAfuHmUZnPkaJHr33ZjLEFfxdjw9iGNknQi0Vgc4Mixervviqmj6uVu8wpg3/yZqSrnjEE0zRjjK/Nj6yw1DD2UucKb5WHbIuf5a6tFrGHT+RbrFP61jFAucmMx3HBeat2leioKsfLOSFg4hpZe/RRH09FYySMVRCxIA+n6lXezPEDAh3DouaWZFwIojKKdQ/fOgaIVLXXfbLnLkleLw8rD+q9die4btYeEr7mdeXCSsHxIYvj5RydqKl6qHmgykDjEoWUxUKWqtK7WJ78wYUVfX43qHmp1JbeFG2x7uHX1+Smr9EL9Np7i8K2t2HzOg6Pa2RN31uvZVTNWrA58NK7mKrHpXcro1puYzw80HNHvWFKFFUxD/jZ4K6qdr0UriW5wtfLualrpP9sXNLcmIkQxtK7yBJwql55IdgvumWUbHAFwRoMouLEOuAXO80qybt0FXtucZqyhuzMrBCm6iG1z6l65SHrRkII9ii2TdrsGqJyiXXA128eKtB56am2HD5e0uOqJC/npq6R3jgIeiMuNyyYFMbSu5iqR6WDBhVWOsTMmTDeY7MWcGyaqFiJWXhHBbpC09KEnNKT3ApfLz18dY3i3vAJY+ldTA0LWjFO+RrTdRIb//mcQAV6OrzWTOcTFY/5zIRJ4mp7TtR4vr4WQzFmTaqT07ySWMjph9cFq5xMHFwtH6Oxf5WnhrdfeK2JqHgM+BRrGM/FNKQgvcge6cpx06fqTRxSLe69LJqzFzAdk2P3RMEYvZY+JQPmHAedecGpeqm6iCjOYME0TEzHJKJgjAz4Sa7MNrXqHOP5YUzVC7K+exKEcR3DhGNJ2i6QRJWSmIBf3bmt/NdLEVeQXbqizsu5qYVr4rLYjhdhLb2Lqn2Tp+rhOoYx5TEMDPZE4Yp1wNdXXFOBzssGMKpxkERezk3dQO0WLooztfRuEHLp3esbEvv+8CKMKY9BoeGOYG96ISVRmGId8O1a/l62zTS9h6+uURJ7smEsvYtteE2fqlfJ1D4an433LWWwJwpZrO/46M2rPdLVv7hJFNp2M8i+6lHn5dzUjdRu4aK4U1P1sKpbkK10Ua1u8lS91HVcK568rrzZjrhs/BLljFiUt7mmyop5wM8dr7fbFMYJ1lFP2jQfrwVnCO7W7XCTtPqgWno36BQzTNUzeQwZQyRI7QfZt94rBNCZ89fHpoGF9wVR3MQ6pW9dMQ9BzGtPNYnV2F43g0GjyJr6T9rqg2GMQyMDMmtyOKvExVWpU/sYfrn4/hUcrycqg1gHfGsPHwEPNw0vN6ipDb1LeGSV4eWc1F7ijf1ze/hNW5N3sw1j6V3Tp+qp1H7Y0BhDoMdiR1xQh6g8Yj+Gj5uGoorR0FsIskRoXHlZelRdo7lLtufsK57EtHVYS+9iql7jnGXGjo2GldpH4wub3+DxONWOqPxiHxXtegdeU4MY80cATMrNx09PyZT0aXhL7w4zetwWvfym28YGWiMfv7uxpZXBnqhCjF1aF1PSsB96EqZfTR9bK5pmjOXe7g5Q9R3GVD1s82oqlS0JCoWQfJ8SVYaxS+ti2haKsmaO7x/7G9CsyYPkueCceDO1N/XhVYGLz5AlsM5uMAmyJUEXNkIv3/Q9C4gqxbiArwd7kU7XxrkSG71OlWZl0HcW1tK7864fYfT1xcJGQQshPz+21vg9C4gqwaiAbw32Ciqx49hzQw0CMhQ6Bn1nKBZ7cOn2QI9heg81vNS+2XsWEFWCMQHfKdgrcey54aZpt5ocg76zmfObA4/no4fK1H7wPQvw/iWi8oltwNc3fimkULAX6Z5bnG5A6GW6LaNbTND3c03jKqweapBle5MgjNQ+pvkxtU9UPjEO+B1ldboXhYK9ghtQHII+zhvDEIWooO8Fgr3X6xl3mJJ4+zPNRpxrqYSZ2jehoUkUBbFO6aM63Qs/G8MgXRvlwIdje8BHo8TrkrnWWoCki8IWsHGn1jgIgql9ovKJdcBHGt5p/XiksjE3HWOtGLf1MyULATWKQd9vsE+tbLY5s+aAU3ofXzeld6+r5BawSRHWGgemb0dMVA6xL9qzWwxFH7PHQh/FrAeOwBqlngduiH6CvUgvtYtzx+9iuMJpTB/fN3FMGtcG8/MpmDBS+7Mm1TG1T1RisQ/46B3ovVNrgZ7c8WzSoKKmZCG9j8eq5I2oOp3y9LvVK6qokXJFhkMtK2tXyIdzC7LsbNyFkZY2HWoimNonir5ETMtTY/lO1fhqhbRipmShQdE0Y0xFUo5y97/bxsqGhx+pvcWbU6n860fk/KY16M8OuGd8EoSRljYdU/tE0ZeIgK8WQyk0z16kd9LzO50IvQ/0sFET4HXP+SDQ60ZvB7u8+d2sBDfdqQ+l0tR4DLvfV0EfmZGgO6AlRRhL75oujNQ+/s5MXuOAqJQSs/AOpqkVmmePICfHbR96q6ibOx4fQbiUvRA89oavn+O7Vy/Se92rcXsEe7dgjnPxWxOQZGEtvWuyMFL7Ir3BDhGFz6ildVNFfMPkjQk9/WKCPuoAMKVLpAsG0UsOsqJdanncAZk6BOxTX0xqFOeCc8K54bGKaTCYLoyld00XRmpf1d0QUbiMK81WgRC9ufofv+l5UR6RDvZ6LxDp/QmD68QD6VQ65vtv3HskM/cd/0fPEZCmrO7cTjYOGvtVyc8b+1dlUu6qZ9SSDtx+jksP9mg8+C3woyzUPuD18XrtKR+GR1D3EmTmB+pu5q3aJd/TRBQOI9cH1YO+1+BqDfZW+H31GN8Wware/QR9OWb/8KpUSnpsLYN9QGoFuWUzxsb6PCoJ78VZCzcHfi8itY+/gxbWVhCFwtgFwfWg3zhnqSz6c1qutlCwLwUvQR/V+CjQU2P2TOOHQy29y8ZT8TDshXXy3fZ7KESm9ifXyaxL1CRhyAGZSExLraTZlw2NXYNu5vz1sc08Gb0DSGrXsyoZWHFTwZvfugNdJYK94hb0MQSA8VK1ih6r7cMVRsAyHf5ugqb20QhHbUWlA5NVItauWCgqfl3jOHSGodm4Mqpozw7ecBv/+Rw5Ho8bC8b11RrrlQz2igr6qhAK/46Zs1QGe9QBYJ4+g31pIHvCqXrFU6n9oJDa51bPRMEZH/BFep49ptshrS/SRUcIqlGZpqWC/g3p4Qekk5BSxDiz33n65O+6c+ndYJApwdBTEHiPI7VPRMEw4GuQPkSPWa5wF7ExGjlOv3S7nMaHBYBMXg63nJDyxDLFVLwwNinC3yb3zicKhgHfouXwMdG0NboFGUiT+tnul4IrZklmyn3PhlF4h/oapvaJiseAr1meXpAn6lWj6DFxgZjy4tK7wSA7pWpjisUNdoiCYcBPKybYY3oGpm8h+Podp0TwwO8gXYyx+bk+AziDfnmF1Us1WRipfRSoMrVPVBzmxwL07Ftaj8vKfrXUruK2wY4cMrCkhzEuX92pre/jVkWFnH9fHmiU4bXl9S5OalGjteLJ6xoCPQ56+ZhNwwV5iPwxPuBj57xi0/hY2Q7Fc+i1NKWX1m05fDyztK4dzOFUi3YgeCDYowoZvX0ch+9jeHytHNfk1LzyQC9/4pBqzo4oEhrISO0Heb+q1D5nUBD5Y3zAx40bN4+ZzzRn1r33CzcgLNCiFmkJurSuVwj0mK7EYF8+ardFLr1bPDRSsfZFkAV58J7HvhHW7BoROeMYfvrmgRXB0POOQxWwDPSTBsmbptNywFQ6auldKo5K7Qc1a1KdzJARkTcM+GnobSA9jyDqNfBjNy8scYt0PIYG/NIL97z0VPRAj2MN0kOiYMJYUMZkKrUfBKv2ifxhxLBQgX/m+P6ySMutMjs1bn9IrkmtoMdRX+M+vqtvm+sV0pezGOQjBUvvBk1Nmwy9fDm3PuDa5KiFidpa+0RR1EbcuXiREGICXx2iaEOGp7F/cZuNFNPIJKJEeZFdE6KYwNg3e7JEVCyO4RMRERmAAZ+IiMgADPhEREQGYMAnIiIyAAM+ERGRARjwiYiIDMCAT0REZAAGfCIiIgMw4BMRERmAAZ+IiMgADPhEREQGYMAnIiIyAAM+ERGRARjwiYiIDMCAT0REZAAGfCIiIgO044tMVFmDqjuJL57XV/Tr1lFsO3BEPLNmr3hp4z6+KkQUKgZ8ogq6b8pQcdM5taJL+7aZg/jCuf1Ez++9ypclAr58znPiw6e9E+hAth/sLu547rOZzy8ZslJMH/0X+f+2p5wQv1o2QTzXPNLXY/7+6jni6PHU7fvV904XP33zkpzv689RiuP2+vtbD9SI36y8QGw7WF30ceB5Jw56WwztuUMcP3GK6N3lgOjc7qh4d38vsf9IZ7F+Tx/H5/jdJ38mTpzMJrIXbhgh/qfpIt/H8MspvxJd2h+V/8dr9pdNw8XP/jq56HOqFAZ8KpmlXx4jTmnTpqiHX7L1oLjpf9cm+sVBsJ9xQf+8r/91y4GKHE+pfWZUb3HXxDox5derxKaW1lgcc8/OB8UZPf8e6mP27pL7mF+/4BmxcsdpvoLioB67Mv9fs7tvwecIg9/HVD97zYjXxfLtdeLuRZ/ydY43Ni4W00a+Kqo7vu/6+OP6bRBXDF8qXt8yVNzz2j/kPMf6PbXi0qF/y3xe1323+NM7o3wdx/cnPi5G127OfL7z/W6xDPaCAZ9KaUz/qqIfffVO+z/ypPhIfQ9x49m18mze/+C4uO+VreLOP2+UX3+35UjizhfDFj+74gzRq0s78coXR4sBP3o9AkcVDQho91z6G3HtE7cm9hwRMB/71E/Fd/8ytWA2o19Vi7weQ2t2eH78Tu0+EBMGrRbnD1gvHlh+UaYXf9eiq8XQntszj9Wx3Qe+rjWO+8JBazKfHz7WQXzz+Ws8H1fUMOBTSaA399b298WxEyfzHn50v66Z/y/fdsj26Z9ctcv260nxo4/Vi64dUmn8f3l2k5j98hb5/6SO3V81opfo3D6V7dmyP74NmvnrGn3/zp7DhRu+CEg/mfw78fUF1xZ5ZO7Qw353f09fv1PouJtb+ohVO/MzVDC4eqfo0PZ4TkYAwfZbF84TOw51l8djB8H+/svvF6d2yc9yvbVzgNjQcmrm835V+8SQmh2iptOhnOf44riFYsm2+sxz3PHsZ2VjA98T6WuN7IGX1P63Jzwphw8UpPKdjj0OGPCpJB5dsUt+WKEh8Mi0s+RX0bNtnLPUuBcAvd3xg7rL/6/ZeTgT7JMM54iCxC+d119c+dCq2J7pdxdfVbLHRg/VayDy6/mNI8TvVp4f6mMi2Be6Hgjg3/zIH8R5A9bLz9ETR13ELfNvsv35n33iwbxg/+KmM/NS9bpbz14gPn76ClHbNdVYfnb9h3KCMn4PvX40BJQbRi8umNpHKv+0bnsyn793oKfMGMQZp+VRWY2v65F5ug17kpe69uKrHxmQ+aln1+2N8qGGCg3ACb9cIVpajyXorMI1ffTinPHiuENAnfF/n5Pj64rT+SHDoQfY1mPtxb+88GmZ9XALzBhPv/yRO8SqnQPkh11QRiMK31PQ20fjwgkKBfWxf6Tyv/Ni6Rp75cKAT2U1uGfHzNP9dctBX0+NnvHM8QPkv3GmX4OXN3tL4eO81UeQ80eGBR8mUO8X9RFVqDRX0AP+wUcfkz3jJLl/2cScs7l25Gs5n+N8VRZA+Z6H8X7d9D/8k/xwcufz14iWI10y30XjAr14O7ed+2zOV+OeyleY0qeyGtgjG6yQ4rXzo48NFh8fViPandJGfO+FTeK1zQfFrz89TJx9WpWcvjaytou4+Yl1eb+JqvfzBnYTI/t2yZnmhqEDZBNmv7JF3P9mdkwRge/OCak/4j+t3ZMpmsP4+rDencWpXdvL7y3belDcNr/ZcXwdgeU3nxkuxvTvmvO8b7x7QNzz8nuZoY2nP9cgz39or+w1wPDGI9NS/7/9meac9L46FpX+V+69bEjBY1p9+9mi9dgJsePQUXHp/6yUAe/uj9aJms7txO73j+UdU9s2QnzovqU517Fju1R/4MTJk3nPhce74qyeomfn1DXac/gD8V9vbLMdxoGXvjBaVHVoK97d1you/3VuSl8d68a9rWLqw6vk9bx7Up24ZGi1GFidahyhkPGel7cUHP7A7/7HlCHigkHdM6+fft3wHOt2Hxa3PPFOZGYKPLn6bPGJM5oyqWz8+8OPPuYavOKmULC8acwi2dhRkMb3O1WxEJnab5ogbj/vT5mfREEeMg768SHToIYHREJS+QoDPpXVGb2zwa5pm30Pf0Rt50xhH4I9qrr7d++Q+f7K7bkV/HddXCcDECrA7SAIj6jtIiYPrc4J+FjoRj3P3KXbHafJYbbBvOsaxLifLssLEgjKz94wUnRun58sO3dgNzmEoYLglDN7uV7qJ9/anfm/07Hox/TnG0aIG/93bV6QHdW3qxh+aqrX+ODSQ3mP9fcD2SIkBHtcAxRP4lwenXZmzrVWcI5n3btEfjb/cw1iZN+ueT+DRoJIp+6tVKPlyLETed9Tx9q07ZBshKlqfh0CPwI2GolOjQq8D745caDta6HU13SSH3i8qAT8Pa1VsvJ7zsd/nQl6Dadukb3PpASaQsMU5w1ozvwfqXyM2ZcC6hjG9t0g6yUABXkozPvkY1+RnyOVr74n5Pu1vbj1j58vzUWpAAZ8KhsEFL0H7HTj1rMACC4qAKHq/+TJkzmB8dkbR4pLTq/JfI4iOIyLN+9N3cyvHtk7E2xeeze3GOhDWtD6+Bk14mPDamTv97dNO+TvD6nplFkUBwEIvU7r2gBzPzUsE2AOf3BCPPa3XaK6U1vRr1sHMapfV/HYyuw5PrpipzitR8fM8bz53gHx2+U7M99XAcgaoHFOL23aJxs6OOZrR50qnxPHheCIRpEevD46NDveOa5/10xwRqYjdX2y6WJ1bTu1O0U2anCeLzS3iM0tR8Wovl0yUyvxfMiynN6rs/wd9TO9urTNNGTU8VhfVz2dvmFvfoNJaezXVXz6Q73k4/x57V7xf+v2itqq9uKzo/tkevp3jD/N9n2DY7+yIdugennTfjHn1S3yZ9GIQMPrmlGnysfDdYjabAj0MH+xZHJO7xNjyC9uDr+nWwnfGP90zrNaCwj1HvX6vX0CLdRTCGoCnp52T+Y5VWofjStrKh/FfqU8lnJjwKeyuWx4NjA7TccTWhACBCvcoO16sm98qVGcc1qqV4mf+eGi98T3X8jtSSA4KnpDAfp0zb79Eey37j8qLvjP5TnBs2vHtuLGcan58m0tiwghkKj0PJ6/4d6lrr3GaY+slsFcBXwEe2uKGo+pB3s0Cs79eVPOz3x34Wbx9u3jZBBGgEYR4G3zs+OfaKjo1089zqd/uzrn+JD+Vmlv9GiPuyMAAAwGSURBVLJxDtMeeTvnOmPxJBX0LxqcCs7fem5TznXWg61dlkVvWFkbXWcPyE79QqbB7hiQCVIzO9Qwgw7XVD0/fl+f5ii0GSOXn4Vpae0DFYv+5qpfeP5ZuxXw3CAIjuj9Xk6x2N0XzvO9KI+daSNeFVPOWFaS43ajqvT1OfXW9D561Tp96p0VHm9i/Wq3p5R2vV/l2lC6741Lxb9e/PvM50jt47W1NjxKMWOikhjwqWyQQlcwlutEH3s9dPS4uOmJ/GD/28+cmRPs7RoEQhbIpYLfzkMf5AXjkbXZQISevTXYw9/+7twwuaohW/z2/PoWTyli1Bco1gYIfGdSfeb/63e35gV7kc4EYGhCNQxUKl3p3in3z9rpcTA3Xmd3DV/auD9nAaU5r2zNa1Qt2rAvp3dtNbgm+7pbz/l8y7HbHQM+V3UOVsgQ6A0kNPqcxvnr0w0hv8WiOj8rzdmtgFcIepmndd8jU/oiXU2OeemX/e5rRR+zSAfKUh43UvbXNLwujhzPvvcGdt8jhvfaljM2j3S9tTGBFfy8QrDXsyBO1u3p6xrw8b0JdaszjSuk9vXXFql8zN9PGlbpU9novTmnXpa1mvoPb+/JCwC4yV9xVnYREdzknYYHVONhw578YFyv9YQRxOwCtt5btuqk9TZH9/W2quDgmmxGwPp86N2r8WyY7rK0sD5UYO316tfZ7XH0YPvUqt2217BPVbbxheEAPZPglTrnQo0up2Nwm5WAokYFaXxrY0TR31f7Iz4tENXkWL5VQREfxvejDL32UbXviilnNGU+0AjQgz2mts1dflFkqt3RuEJBnp2kpfIV9vCpbPTg0bzXvjesB1gEiH98ND99p69ShyDk5SZvHTvWp6ahd+/UK9R7y8dP5q4a+G8vbcn0bDHGjCEGa9rcSjUy7Bo8esYAFf7FjjPr1xlB0OlxBmvXGudip/VY9pydVj+srWpv+3Ule87510Wfouh0DHomAjM3FH0BI/jGnzc6HoM+rOB1KqQdPyvtLd8+qKjnQKCxFvFhytrXzv+j+LfXPlHUY/pZaa/Y40aa/K4Ln8pZmU7ZtK+3+O+lF0euHgFz6/XrLOSCQgMSl8pXGPCpLPTxYpFeec2OHgCcqvgx/U1xW7jGbexYXwBowTvOj3GW1uO2pvcRSJ97Z2+maBBDDEu+PEaem10jRG+A2KWV9d7uyh3uewlYe/E6/TqjcM2JGu7AVDWnRoH+PHc6BFR9qOYtywwKt0YX3hOqiNPtGPRGoH7d9AWM8LxuDSR9WMEpG+RFKVfa09kV8V0+fJlYvqOuqKBZipX2rHBco/tslpvlKEiN/3zJZNfnXrTxzJzzxLK8TvA4To9190VPysyCH7jOCzaMyPm9O2O8Vn4hTOlTWei9tI0OvXthqdD/45r8QIwAolf6/7tDrxBG9nEeL9d77tZApFNBUTg0UjDHHaloBUVr37tkkCwks9JT6HZrEHTtkP1zdKsdEJbGjF4PYV1Uxy24ZYY7XM8/FSjdiiz1RpG1IePW6NLfEyu3Oz++3gjUr5v+GhYal1eNKbfziBoENiwTq6DnjJ31orIoz+73u+V9DRkI64p2Vwxb4vo4yGjsbc2+T1DgV8lzTGIqX2HAp7LQg51bgNE31rG7iVtT/k7pc4zzn5t+Truf03uuz9g0LIQlK+HWSMFiMRf+9wqxUgvSKCTTp5wJSwrd7jnrXeoFrMbXZVPZ+vCA3tt2C265PW/7egp9GqVbkaXeKLI2ZLwW7O045DyurjcCnV4rNzhX9Tq6nUcUYZxZD6BqZ70owPoBdtBD3n4o+95HAHda0U5ZqxUKIr1+x/mFC/PIPwZ8Kgt9XNktwChOc6X1Xh2m0TnRi7nsfk7vNTqlgvUeqFsjRT0GVqpDPYByQ3o6X/Y5swV7QeaB4zqp4j48lp7l0IMoVr9zove8nbIJ+jRKt6ls+hDCf76eW8WuVuKza3TpDSC3jIZqBFqvW1VHb7evO7TGjVvDIqqsRXx+to2tBPSQMZ6PIj0F1fDW6Xc669K7WPzG7eepOAz4VBZebu56gFm3q3BPTF+1T4cenV7MZQ18es/VrRecm5XwNnd7/urs5h/6vH08Z3bGgP1j6ePfEwf3sP0ZkV7sR3luXe50QH1YwO2Y9TUI7KYHCku2wKnQTc8U2AV1Fax3HMxvfOiNQKeaDn2Iwq3R8RHL8sMKCinVoj3Cw1BJFKkiPkxpiwuM5z+9ZkzO0boNR2AsXd9gB7CVrp+gj2mA5I4Bn8pCT1d7CTBOqdcObbNBFEHbOo0Pn//rpYNyetpYEU6np/NdU9Uee6C6KWdmK6H1qn69MeM03vz6e9kx7smnV9tucoMAphb7wTl+ZX5zzvf19LfbMaufcxsW0a+TUy2AnimwjsPrx293zuo94TZcohdXWh9j677s64protdNYDhGLczUqi3nG9etiFURX5xgPB+L1ygYjnDboe4HL12Rk8lAah+L42Bte7cxfWzE8/ur5yRql8FSYZU+lVyhXqCiF385pV5//vo2ce3o7EpcCO4Y18c0P30Z3fteeVd8Y8JA28fI6bm79BrdCvb2fOvD4uCR4+K59S3igSXb5dd+ccXQnJXm1NeFpTHjtGkQVtC78qxe8jEw7fBXnxwmbjq7ryxeRGBV3xPp9Patf1iXdy31VQqdGlZC63nbTZXLnn/hgj09U7Dy77kV+nqwtp6z/p6w6/1bj8HuMbAmwNSGXpkePOomsJrevtbjMvuDBiGGcw4cOS6HQNwaFl75WWlP2X6wu7jjueCLuNitxOeVn5X2wjxuLF7z4NT/ksFepJexRQDH8rZWyGTc/PTNcqEhfU98pPfx0dzSR+7Br6Cav3+3FlHTKf/9uedw/l4PxIBPZaD3At0DTOHeKcZwURWv5r/jpq6vtKaW2D149Ljz82g9d6f1ANwK9hCssOscPrDs7o2WsXqRXpFOH2/2UiSI4I0grjaPQdDHlD99rwCRXjkPi+nY1QGoY7Zb2EfRe95v7zxs+zNeC/b0jII17a8Ha+s568WXbvURhQr2vvjUOvHLq4ZlGjp6JglrEHz20TVi0S2pSvdDR/M37vHLz0p7pWBdic+rSlW9I4j/5JXLcpaxRfBGr9xuep0K+ihMtNYqDKneIT/cYNhj8aYzE7PpUNgY8Knkdh78INNLfKHZuVgNy9NioZdO7dq4pl5RFY+lda9s6JkJSghwy7YekouvIBAiqKnn1HeHEzJ7cFR+D/86Pc/5dVWZ31+9M7fnisYEtmvVx4YVtYiPdR7+/X/NBgq3gj2kzrEZDrZ4RS+8XlulDo2l55tbHOfDo5GCDXpwDa3nbIVzw851f1prnwUY0L195vwXrnc+Xmx5i5/DqoN2aX/1Pes5v//BCfk91Ff89LVtnh7f7roh+zHgR6+LH36sPpNFwVAKsiv4eTRc1DV0m/oXJyjis/aCo8y6jC18adwCOf/ebgocvnbtE7eKGxsXi2kjX81kB9xgWt+K7QPlLntJnlYXVBtx5+JFaHTF+zTIVKq3GmQxlWIhmOg9d7etW6kyfvWpYZkMjHVTHi8wLtxw6tZAx27dyAWPeeXw7Nz0p9aM873crL6JDNLc1t/3usmMkwFVe0Tr8dx1762P6RSwndx14TxxSptsXcu6Pf08LQaEwr2Jg94W/bvtFR3aZjN3+490lqn7RZvOCrSCn/U1LvUCRRX0IgM+ESUSMh5qV0FkXnp//1W+0GSyF1mlT0SJNP9zDTLYi/TmSESm4xg+EcXSO189Rxw7cVLup4CCQaTrMcSD2QH/2NgnM6PhzfcOxHY6HlGYGPCJKHYwU0KtR4Apd5ipYbdnPjY3wn4HRMSAT0QxhB47tuU9b2A3Oc2y3rLHwtpdh+VOgSyiJMpiwCeiWHKankhE9li0R0REZAAGfCIiIgMw4BMRERmAAZ+IiMgADPhEREQGYMAnIiIyAAM+ERGRARjwiYiIDMCAT0REZAAGfCIiIgMw4BMRERmAAZ+IiMgADPhEREQGYMAnIiIyAAM+ERGRARjwiYiIDMCAT0REZAAGfCIiIgMw4BMRERmAAZ+IiMgADPhEREQGaCeEmCuEWMQXm4iIKKGE2Pj/BrReOpnAnZcAAAAASUVORK5CYII=";m9(`.nrel-header { background: #fff; display: block; font-family: Roboto; width: 100%; max-width: 100vw; z-index: 100; position: absolute; } .nrel-header .vadr-header { align-items: center; display: flex; height: 140px; justify-content: space-between; margin: auto; padding: 0 15px; max-width: 1140px; } .nrel-header .vadr-header .vadr-100-title { font-weight: normal; color: #212224; font-size: 30px; letter-spacing: 0.5px; width: 70%; } .nrel-header .vadr-header .header-link { z-index: 1; } .nrel-header .vadr-header .header-link .nrel-logo-image { width: 280px; position: relative; top: -10px; } .nrel-header .menu-container { width: 100vw; margin: auto; background: #ededed; border-top: 1px solid #d6d4d4; height: 65px; position: absolute; top: 140px; } .nrel-header .menu-container.stick { position: fixed; height: auto; top: 0; } .nrel-header .menu-container .menu { max-width: 1140px; margin: auto; position: relative; right: 20px; } .nrel-header .menu-container .menu li { background: #ededed; height: 100%; font-size: 14px; } .nrel-header .menu-container .menu li.current { background: #5e6a71; filter: brightness(1.1); } .nrel-header .menu-container .menu li.current span, .nrel-header .menu-container .menu li.current a { color: #fff; } .nrel-header .menu-container .menu li.current .submenu-chevron { fill: #fff; } .nrel-header .menu-container .menu li.current li { background: #5e6a71; } .nrel-header .menu-container .menu li.current li:hover { filter: brightness(1.1); } .nrel-header .menu-container .menu li div, .nrel-header .menu-container .menu li button, .nrel-header .menu-container .menu li span, .nrel-header .menu-container .menu li a { white-space: nowrap; color: #2f2f2f; box-sizing: border-box; height: 64px; padding: 24px 25px; width: 100%; text-decoration: none; font-size: 16px; background: none; border-radius: 0; border: none; } .nrel-header .menu-container .menu li button:hover, .nrel-header .menu-container .menu li span:hover, .nrel-header .menu-container .menu li a:hover { color: #fff; background: #5e6a71; cursor: pointer; } .nrel-header .menu-container .menu li.auth a, .nrel-header .menu-container .menu li.auth button { color: #0a87d3; } .nrel-header .menu-container .menu li.auth a:hover, .nrel-header .menu-container .menu li.auth button:hover { color: #fff; background: #0a87d3; } .nrel-header .menu-container .menu li.auth.current a, .nrel-header .menu-container .menu li.auth.current button { color: #fff; background: #0a87d3; } .nrel-header.slim .vadr-header { height: 86px; } .nrel-header.slim .vadr-header .header-link .nrel-logo-image { width: 190px; } .nrel-header.slim .menu-container { top: 86px; } .nrel-header.slim .menu-container.stick { position: fixed; top: 0; } @media print { .nrel-header .menu-bar, .nrel-header .menu-container { display: none; } .nrel-header .menu-bar p, .nrel-header .menu-container p { display: none; } } @media (max-width: 1199px) { .nrel-header .vadr-header { max-width: 960px; } .nrel-header .menu-container .menu { max-width: 960px; } } @media (max-width: 991px) { .nrel-header .vadr-header { max-width: 720px; } .nrel-header .menu-container .menu { max-width: 720px; } } @media (max-width: 767px) { .nrel-header.mobile-nav .vadr-header { height: max-content; display: flex; flex-direction: column-reverse; align-items: center; justify-content: space-evenly; } .nrel-header.mobile-nav .vadr-header .vadr-100-title { text-align: center; width: 90%; margin-bottom: 0.3em; } .nrel-header.mobile-nav .vadr-header .header-link { z-index: 0; } .nrel-header.mobile-nav.slim .vadr-header { height: max-content; } .nrel-header.mobile-nav.slim .vadr-header .header-link .nrel-logo-image { top: -10px; } .nrel-header.mobile-nav .menu-bar { z-index: 2; } .nrel-header.mobile-nav .menu-bar.stick, .nrel-header.mobile-nav .menu-bar.open { position: fixed; top: 0; transition: 0.3s; } .nrel-header.mobile-nav .menu-container { position: static; overflow: hidden; } .nrel-header.mobile-nav .menu-container.close { height: 0px; top: 100vh; } .nrel-header.mobile-nav .menu-container.open { transition: 0.3s; height: calc(100vh - 43px); position: fixed; top: 43px; background: #ededed; overflow: auto; z-index: 2; } .nrel-header.mobile-nav .menu-container .menu { position: static; display: block; max-width: 100%; } }`);var XJ=Vr.createContext({menuCloseDelay:0});YJ.propTypes={appTitle:ss.any.isRequired,logoSrc:ss.string,isSlim:ss.bool,noStick:ss.bool,className:ss.string,children:ss.node,menuCloseDelay:ss.number};function YJ(t){var e=t.appTitle,r=t.className,n=r===void 0?"":r,i=t.logoSrc,o=t.children,a=t.isSlim,s=t.noStick,l=t.hasMobileNav,u=t.menuCloseDelay,p=u===void 0?0:u,m=a?"slim":"",v=l?"mobile-nav":"";return Vr.createElement(XJ.Provider,{value:{menuCloseDelay:p}},Vr.createElement("nav",{id:"shared-nrel-header",className:"nrel-header ".concat(n," ").concat(m," ").concat(v)},Vr.createElement("header",{className:"vadr-header"},Vr.createElement("h1",{className:"vadr-100-title"},e),Vr.createElement("a",{className:"header-link",href:"https://www.nrel.gov",target:"_blank",rel:"noopener noreferrer"},Vr.createElement("img",{src:i||SIe,width:"280px",alt:"nrel-logo",className:"nrel-logo-image"}))),o?Vr.createElement(Vr.Fragment,null,Uc.Children.map(o,function(x){return Uc.cloneElement(x,{isSlim:a,noStick:s})})):Vr.createElement(Uc.Fragment,null)))}var TIe="data:image/svg+xml,%3Csvg%20stroke%3D%22currentColor%22%20fill%3D%22currentColor%22%20stroke-width%3D%220%22%20viewBox%3D%220%200%20320%20512%22%20height%3D%221em%22%20width%3D%221em%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M279.14%20288l14.22-92.66h-88.91v-60.13c0-25.35%2012.42-50.06%2052.24-50.06h40.42V6.26S260.43%200%20225.36%200c-73.22%200-121.08%2044.38-121.08%20124.72v70.62H22.89V288h81.39v224h100.17V288z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E",PIe="data:image/svg+xml,%3Csvg%20stroke%3D%22currentColor%22%20fill%3D%22currentColor%22%20stroke-width%3D%220%22%20viewBox%3D%220%200%20448%20512%22%20height%3D%221em%22%20width%3D%221em%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M224.1%20141c-63.6%200-114.9%2051.3-114.9%20114.9s51.3%20114.9%20114.9%20114.9S339%20319.5%20339%20255.9%20287.7%20141%20224.1%20141zm0%20189.6c-41.1%200-74.7-33.5-74.7-74.7s33.5-74.7%2074.7-74.7%2074.7%2033.5%2074.7%2074.7-33.6%2074.7-74.7%2074.7zm146.4-194.3c0%2014.9-12%2026.8-26.8%2026.8-14.9%200-26.8-12-26.8-26.8s12-26.8%2026.8-26.8%2026.8%2012%2026.8%2026.8zm76.1%2027.2c-1.7-35.9-9.9-67.7-36.2-93.9-26.2-26.2-58-34.4-93.9-36.2-37-2.1-147.9-2.1-184.9%200-35.8%201.7-67.6%209.9-93.9%2036.1s-34.4%2058-36.2%2093.9c-2.1%2037-2.1%20147.9%200%20184.9%201.7%2035.9%209.9%2067.7%2036.2%2093.9s58%2034.4%2093.9%2036.2c37%202.1%20147.9%202.1%20184.9%200%2035.9-1.7%2067.7-9.9%2093.9-36.2%2026.2-26.2%2034.4-58%2036.2-93.9%202.1-37%202.1-147.8%200-184.8zM398.8%20388c-7.8%2019.6-22.9%2034.7-42.6%2042.6-29.5%2011.7-99.5%209-132.1%209s-102.7%202.6-132.1-9c-19.6-7.8-34.7-22.9-42.6-42.6-11.7-29.5-9-99.5-9-132.1s-2.6-102.7%209-132.1c7.8-19.6%2022.9-34.7%2042.6-42.6%2029.5-11.7%2099.5-9%20132.1-9s102.7-2.6%20132.1%209c19.6%207.8%2034.7%2022.9%2042.6%2042.6%2011.7%2029.5%209%2099.5%209%20132.1s2.7%20102.7-9%20132.1z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E",IIe="data:image/svg+xml,%3Csvg%20stroke%3D%22currentColor%22%20fill%3D%22currentColor%22%20stroke-width%3D%220%22%20viewBox%3D%220%200%20448%20512%22%20height%3D%221em%22%20width%3D%221em%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M416%2032H31.9C14.3%2032%200%2046.5%200%2064.3v383.4C0%20465.5%2014.3%20480%2031.9%20480H416c17.6%200%2032-14.5%2032-32.3V64.3c0-17.8-14.4-32.3-32-32.3zM135.4%20416H69V202.2h66.5V416zm-33.2-243c-21.3%200-38.5-17.3-38.5-38.5S80.9%2096%20102.2%2096c21.2%200%2038.5%2017.3%2038.5%2038.5%200%2021.3-17.2%2038.5-38.5%2038.5zm282.1%20243h-66.4V312c0-24.8-.5-56.7-34.5-56.7-34.6%200-39.9%2027-39.9%2054.9V416h-66.4V202.2h63.7v29.2h.9c8.9-16.8%2030.6-34.5%2062.9-34.5%2067.2%200%2079.7%2044.3%2079.7%20101.9V416z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E",MIe="data:image/svg+xml,%3Csvg%20width%3D%221200%22%20height%3D%221227%22%20viewBox%3D%220%200%201200%201227%22%20fill%3D%22none%22%20%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%20%20%3Cpath%20d%3D%22M714.163%20519.284L1160.89%200H1055.03L667.137%20450.887L357.328%200H0L468.492%20681.821L0%201226.37H105.866L515.491%20750.218L842.672%201226.37H1200L714.137%20519.284H714.163ZM569.165%20687.828L521.697%20619.934L144.011%2079.6944H306.615L611.412%20515.685L658.88%20583.579L1055.08%201150.3H892.476L569.165%20687.854V687.828Z%22%20fill%3D%22black%22%2F%3E%3C%2Fsvg%3E",AIe="data:image/svg+xml,%3Csvg%20stroke%3D%22currentColor%22%20fill%3D%22currentColor%22%20stroke-width%3D%220%22%20viewBox%3D%220%200%20576%20512%22%20height%3D%221em%22%20width%3D%221em%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M549.655%20124.083c-6.281-23.65-24.787-42.276-48.284-48.597C458.781%2064%20288%2064%20288%2064S117.22%2064%2074.629%2075.486c-23.497%206.322-42.003%2024.947-48.284%2048.597-11.412%2042.867-11.412%20132.305-11.412%20132.305s0%2089.438%2011.412%20132.305c6.281%2023.65%2024.787%2041.5%2048.284%2047.821C117.22%20448%20288%20448%20288%20448s170.78%200%20213.371-11.486c23.497-6.321%2042.003-24.171%2048.284-47.821%2011.412-42.867%2011.412-132.305%2011.412-132.305s0-89.438-11.412-132.305zm-317.51%20213.508V175.185l142.739%2081.205-142.739%2081.201z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E",RIe="data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20id%3D%22Layer_1%22%20data-name%3D%22Layer%201%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20version%3D%221.1%22%20viewBox%3D%220%200%20340.7%20123.6%22%3E%20%20%3Cdefs%3E%20%20%20%20%3Cstyle%3E%20%20%20%20%20%20.cls-1%20%7B%20%20%20%20%20%20%20%20fill%3A%20%23cdcdcd%3B%20%20%20%20%20%20%7D%20%20%20%20%20%20.cls-1%2C%20.cls-2%2C%20.cls-3%20%7B%20%20%20%20%20%20%20%20stroke-width%3A%200px%3B%20%20%20%20%20%20%7D%20%20%20%20%20%20.cls-1%2C%20.cls-3%20%7B%20%20%20%20%20%20%20%20fill-rule%3A%20evenodd%3B%20%20%20%20%20%20%7D%20%20%20%20%20%20.cls-2%2C%20.cls-3%20%7B%20%20%20%20%20%20%20%20fill%3A%20%23231f20%3B%20%20%20%20%20%20%7D%20%20%20%20%3C%2Fstyle%3E%20%20%3C%2Fdefs%3E%20%20%3Cg%3E%20%20%20%20%3Cpath%20class%3D%22cls-3%22%20d%3D%22M55.1%2C77.5l1.5%2C5.6h4.8l-6.1-21.8h-5.8l-6%2C21.8h4.6l1.4-5.6h5.6ZM50.1%2C73.8l1.2-4.6c.3-1.3.6-2.9.9-4.2h0c.3%2C1.3.6%2C2.9%2C1%2C4.2l1.2%2C4.6h-4.3Z%22%2F%3E%20%20%20%20%3Crect%20class%3D%22cls-2%22%20x%3D%2263.4%22%20y%3D%2260.1%22%20width%3D%224.4%22%20height%3D%2223%22%2F%3E%20%20%20%20%3Crect%20class%3D%22cls-2%22%20x%3D%2271.1%22%20y%3D%2260.1%22%20width%3D%224.4%22%20height%3D%2223%22%2F%3E%20%20%20%20%3Cpath%20class%3D%22cls-3%22%20d%3D%22M83.2%2C83.1v-15.8h-4.4v15.8h4.4ZM81%2C60.4c-1.4%2C0-2.4%2C1.1-2.3%2C2.5%2C0%2C1.4.9%2C2.5%2C2.3%2C2.5s2.4-1.1%2C2.4-2.5c0-1.4-.9-2.5-2.4-2.5Z%22%2F%3E%20%20%20%20%3Cpath%20class%3D%22cls-3%22%20d%3D%22M98.4%2C73.7c0-3.7-1.5-6.8-6.3-6.8s-4.5.8-5.5%2C1.4l.8%2C3.2c.9-.6%2C2.5-1.2%2C3.9-1.2%2C2.2%2C0%2C2.6%2C1.2%2C2.6%2C2v.2c-5%2C0-8.4%2C1.9-8.4%2C6s1.7%2C4.8%2C4.6%2C4.8%2C3.1-.7%2C4.1-1.9h0l.3%2C1.6h4c-.1-.9-.2-2.3-.2-3.8v-5.5ZM94.1%2C77.3c0%2C.3%2C0%2C.6%2C0%2C.8-.3%2C1-1.2%2C1.8-2.3%2C1.8s-1.7-.6-1.7-1.9c0-1.9%2C1.8-2.5%2C4.1-2.5v1.7Z%22%2F%3E%20%20%20%20%3Cpath%20class%3D%22cls-3%22%20d%3D%22M101.6%2C83.1h4.4v-9.1c0-.5%2C0-.9.2-1.2.3-.9%2C1-1.8%2C2.2-1.8s2.2%2C1.4%2C2.2%2C3.4v8.8h4.4v-9.4c0-4.7-2.2-6.8-5.1-6.8s-3.8%2C1.5-4.4%2C2.5h0l-.2-2.2h-3.8c0%2C1.4.1%2C3.1.1%2C5v10.8Z%22%2F%3E%20%20%20%20%3Cpath%20class%3D%22cls-3%22%20d%3D%22M128.5%2C79c-.7.3-1.5.5-2.5.5-2.2%2C0-3.9-1.5-3.9-4.4%2C0-2.6%2C1.5-4.4%2C3.8-4.4s1.9.2%2C2.5.5l.7-3.7c-.9-.4-2.2-.6-3.4-.6-5.3%2C0-8.1%2C3.8-8.1%2C8.4s2.9%2C8.1%2C7.5%2C8.1%2C3.2-.4%2C4-.7l-.5-3.7Z%22%2F%3E%20%20%20%20%3Cpath%20class%3D%22cls-3%22%20d%3D%22M143.4%2C76.7c0-.4.1-1.1.1-1.9%2C0-3.9-1.7-7.9-6.3-7.9s-7.2%2C4.4-7.2%2C8.4%2C2.8%2C8.1%2C7.6%2C8.1%2C3.7-.4%2C5.2-1l-.6-3.3c-1.2.4-2.4.6-3.9.6s-3.9-1-4-3h9.2ZM134.2%2C73.4c.1-1.3.9-3.2%2C2.7-3.2s2.5%2C2%2C2.5%2C3.2h-5.2Z%22%2F%3E%20%20%20%20%3Cpath%20class%3D%22cls-3%22%20d%3D%22M156.5%2C83.1v-12.2h2.8v-3.6h-2.9v-.8c0-1.6.6-2.8%2C2.1-2.8s1%2C0%2C1.4.2l.2-3.8c-.6-.2-1.4-.3-2.4-.3s-2.8.4-3.9%2C1.6c-1.3%2C1.3-1.8%2C3.4-1.8%2C5.3v.6h-1.9v3.6h1.9v12.2h4.5Z%22%2F%3E%20%20%20%20%3Cpath%20class%3D%22cls-3%22%20d%3D%22M167.6%2C66.9c-4.6%2C0-7.6%2C3.3-7.6%2C8.4s3.2%2C8.1%2C7.4%2C8.1%2C7.5-2.7%2C7.5-8.4-2.9-8.1-7.3-8.1ZM167.5%2C70.4c2%2C0%2C2.8%2C2.4%2C2.8%2C4.8s-1.1%2C4.8-2.8%2C4.8-2.9-2-2.9-4.8.8-4.8%2C2.9-4.8Z%22%2F%3E%20%20%20%20%3Cpath%20class%3D%22cls-3%22%20d%3D%22M177.4%2C83.1h4.4v-8c0-.4%2C0-.8%2C0-1.1.3-1.5%2C1.4-2.5%2C3-2.5s.9%2C0%2C1.2.2v-4.7c-.3%2C0-.5%2C0-.9%2C0-1.4%2C0-3.1%2C1-3.8%2C3.3h-.1v-2.9h-4c0%2C1.4.1%2C2.9.1%2C5.2v10.6Z%22%2F%3E%20%20%20%20%3Cpath%20class%3D%22cls-3%22%20d%3D%22M193.1%2C82.1c1.1.7%2C3.3%2C1.4%2C5.6%2C1.4%2C5.4%2C0%2C7.9-3.1%2C7.9-6.8s-1.6-5.1-5.1-6.5c-2.5-1.1-3.6-1.7-3.6-3.1s.9-2.1%2C2.9-2.1%2C3.3.6%2C4.1%2C1l1-3.9c-1.2-.6-2.8-1.1-5-1.1-4.6%2C0-7.4%2C2.8-7.4%2C6.6s2.1%2C5.2%2C5.4%2C6.4c2.4.9%2C3.3%2C1.7%2C3.3%2C3.1s-1.1%2C2.4-3.1%2C2.4-3.7-.7-4.9-1.4l-.9%2C4.1Z%22%2F%3E%20%20%20%20%3Cpath%20class%3D%22cls-3%22%20d%3D%22M222.5%2C67.3h-4.5v9.4c0%2C.4%2C0%2C.8-.1%2C1.1-.3.8-1%2C1.7-2.2%2C1.7s-2.2-1.4-2.2-3.7v-8.5h-4.5v9.3c0%2C4.9%2C2.1%2C6.9%2C5%2C6.9s3.9-1.6%2C4.5-2.6h0l.2%2C2.2h3.8c0-1.3-.1-3-.1-5.1v-10.7Z%22%2F%3E%20%20%20%20%3Cpath%20class%3D%22cls-3%22%20d%3D%22M225%2C82.3c1.1.6%2C2.7%2C1.1%2C4.6%2C1.1%2C4.1%2C0%2C6.2-2.2%2C6.2-5.1%2C0-2.3-1.2-3.8-3.9-4.9-1.7-.7-2.3-1.1-2.3-1.8s.6-1.3%2C1.7-1.3%2C2.4.5%2C3.1.9l.8-3.4c-.9-.5-2.4-.9-4-.9-3.5%2C0-5.8%2C2.2-5.8%2C5.2%2C0%2C1.8%2C1.1%2C3.6%2C4%2C4.7%2C1.7.6%2C2.1%2C1%2C2.1%2C1.8s-.6%2C1.3-1.9%2C1.3-3-.6-3.8-1.2l-.8%2C3.5Z%22%2F%3E%20%20%20%20%3Cpath%20class%3D%22cls-3%22%20d%3D%22M238.8%2C64.3v3h-1.9v3.6h1.9v6.5c0%2C2.2.4%2C3.7%2C1.2%2C4.7.7.8%2C1.9%2C1.4%2C3.3%2C1.4s2.3-.2%2C2.9-.5v-3.7c-.5%2C0-.7.1-1.3.1-1.3%2C0-1.7-.9-1.7-2.8v-5.7h3.2v-3.6h-3.2v-4.3l-4.3%2C1.3Z%22%2F%3E%20%20%20%20%3Cpath%20class%3D%22cls-3%22%20d%3D%22M260.4%2C73.7c0-3.7-1.5-6.8-6.3-6.8s-4.5.8-5.5%2C1.4l.8%2C3.2c.9-.6%2C2.5-1.2%2C3.9-1.2%2C2.2%2C0%2C2.6%2C1.2%2C2.6%2C2v.2c-5%2C0-8.4%2C1.9-8.4%2C6s1.7%2C4.8%2C4.6%2C4.8%2C3.1-.7%2C4.1-1.9h0l.3%2C1.6h4c-.1-.9-.2-2.3-.2-3.8v-5.5ZM256.1%2C77.3c0%2C.3%2C0%2C.6%2C0%2C.8-.3%2C1-1.2%2C1.8-2.3%2C1.8s-1.7-.6-1.7-1.9c0-1.9%2C1.8-2.5%2C4.1-2.5v1.7Z%22%2F%3E%20%20%20%20%3Cpath%20class%3D%22cls-3%22%20d%3D%22M268%2C83.1v-15.8h-4.4v15.8h4.4ZM265.8%2C60.4c-1.4%2C0-2.4%2C1.1-2.3%2C2.5%2C0%2C1.4.9%2C2.5%2C2.3%2C2.5s2.4-1.1%2C2.4-2.5c0-1.4-.9-2.5-2.4-2.5Z%22%2F%3E%20%20%20%20%3Cpath%20class%3D%22cls-3%22%20d%3D%22M271.3%2C83.1h4.4v-9.1c0-.5%2C0-.9.2-1.2.3-.9%2C1-1.8%2C2.2-1.8s2.2%2C1.4%2C2.2%2C3.4v8.8h4.4v-9.4c0-4.7-2.2-6.8-5.1-6.8s-3.8%2C1.5-4.4%2C2.5h0l-.2-2.2h-3.8c0%2C1.4.1%2C3.1.1%2C5v10.8Z%22%2F%3E%20%20%20%20%3Cpath%20class%3D%22cls-3%22%20d%3D%22M299.9%2C73.7c0-3.7-1.5-6.8-6.3-6.8s-4.5.8-5.5%2C1.4l.8%2C3.2c.9-.6%2C2.5-1.2%2C3.9-1.2%2C2.2%2C0%2C2.6%2C1.2%2C2.6%2C2v.2c-5%2C0-8.4%2C1.9-8.4%2C6s1.7%2C4.8%2C4.6%2C4.8%2C3.1-.7%2C4.1-1.9h0l.3%2C1.6h4c-.1-.9-.2-2.3-.2-3.8v-5.5ZM295.6%2C77.3c0%2C.3%2C0%2C.6%2C0%2C.8-.3%2C1-1.2%2C1.8-2.3%2C1.8s-1.7-.6-1.7-1.9c0-1.9%2C1.8-2.5%2C4.1-2.5v1.7Z%22%2F%3E%20%20%20%20%3Cpath%20class%3D%22cls-3%22%20d%3D%22M303.1%2C78.4c0%2C1.8%2C0%2C3.7-.1%2C4.7h3.8l.2-2.2h0c1%2C1.9%2C2.6%2C2.6%2C4.3%2C2.6%2C3.3%2C0%2C6.5-2.8%2C6.5-8.5%2C0-4.8-2.5-8-5.9-8s-3.5.9-4.3%2C2.2h0v-9.1h-4.4v18.3ZM307.5%2C74c0-.3%2C0-.6%2C0-.9.3-1.4%2C1.4-2.4%2C2.6-2.4%2C2.1%2C0%2C3.1%2C1.9%2C3.1%2C4.4s-1.2%2C4.5-3.1%2C4.5-2.3-1-2.6-2.3c0-.3%2C0-.6%2C0-.9v-2.3Z%22%2F%3E%20%20%20%20%3Crect%20class%3D%22cls-2%22%20x%3D%22320.2%22%20y%3D%2260.1%22%20width%3D%224.4%22%20height%3D%2223%22%2F%3E%20%20%20%20%3Cpath%20class%3D%22cls-3%22%20d%3D%22M340.5%2C76.7c0-.4.1-1.1.1-1.9%2C0-3.9-1.7-7.9-6.3-7.9s-7.2%2C4.4-7.2%2C8.4%2C2.8%2C8.1%2C7.6%2C8.1%2C3.7-.4%2C5.2-1l-.6-3.3c-1.2.4-2.4.6-3.9.6s-3.9-1-4-3h9.2ZM331.3%2C73.4c.1-1.3.9-3.2%2C2.7-3.2s2.5%2C2%2C2.5%2C3.2h-5.2Z%22%2F%3E%20%20%3C%2Fg%3E%20%20%3Cg%3E%20%20%20%20%3Cpolygon%20class%3D%22cls-3%22%20points%3D%22164.8%20103.2%20157.6%20103.2%20157.6%2098.7%20165.3%2098.7%20165.3%2094.6%20153.2%2094.6%20153.2%20116.4%20165.7%20116.4%20165.7%20112.4%20157.6%20112.4%20157.6%20107.2%20164.8%20107.2%20164.8%20103.2%22%2F%3E%20%20%20%20%3Cpath%20class%3D%22cls-3%22%20d%3D%22M168.3%2C116.4h4.4v-9.1c0-.5%2C0-.9.2-1.2.3-.9%2C1-1.8%2C2.2-1.8s2.2%2C1.4%2C2.2%2C3.4v8.8h4.4v-9.4c0-4.7-2.2-6.8-5.1-6.8s-3.8%2C1.5-4.4%2C2.5h0l-.2-2.2h-3.8c0%2C1.4.1%2C3.1.1%2C5v10.8Z%22%2F%3E%20%20%20%20%3Cpath%20class%3D%22cls-3%22%20d%3D%22M197.6%2C110.1c0-.4.1-1.1.1-1.9%2C0-3.9-1.7-7.9-6.3-7.9s-7.2%2C4.4-7.2%2C8.4%2C2.8%2C8.1%2C7.6%2C8.1%2C3.7-.4%2C5.1-1l-.6-3.3c-1.2.4-2.4.6-3.9.6s-3.9-1-4-3h9.2ZM188.4%2C106.7c.1-1.3.9-3.2%2C2.7-3.2s2.5%2C2%2C2.5%2C3.2h-5.2Z%22%2F%3E%20%20%20%20%3Cpath%20class%3D%22cls-3%22%20d%3D%22M200.1%2C116.4h4.4v-8c0-.4%2C0-.8%2C0-1.1.3-1.5%2C1.4-2.5%2C3-2.5s.9%2C0%2C1.2.2v-4.7c-.3%2C0-.5%2C0-.9%2C0-1.4%2C0-3.1%2C1-3.8%2C3.3h-.1v-2.9h-4c0%2C1.4.1%2C2.9.1%2C5.2v10.6Z%22%2F%3E%20%20%20%20%3Cpath%20class%3D%22cls-3%22%20d%3D%22M224.1%2C105.3c0-2.4%2C0-3.7.1-4.7h-3.8v1.9h-.2c-.7-1.3-2-2.2-3.9-2.2-3.5%2C0-6.5%2C3.2-6.5%2C8.3s2.5%2C7.7%2C6%2C7.7%2C3-.7%2C3.8-2.1h0v1c0%2C2.9-1.6%2C4.2-3.7%2C4.2s-3.2-.6-4.1-1.2l-.9%2C3.7c1.3.8%2C3.3%2C1.2%2C5.1%2C1.2s4.2-.5%2C5.8-1.9c1.6-1.6%2C2.2-4.1%2C2.2-7.1v-8.8ZM219.7%2C109.4c0%2C.4%2C0%2C.9-.1%2C1.3-.3%2C1.2-1.2%2C2-2.3%2C2-1.9%2C0-2.9-1.8-2.9-4.2s1.3-4.5%2C2.9-4.5%2C2.1.9%2C2.4%2C2.2c0%2C.3%2C0%2C.6%2C0%2C.9v2.3Z%22%2F%3E%20%20%20%20%3Cpath%20class%3D%22cls-3%22%20d%3D%22M225.8%2C100.6l5.2%2C14.5c.2.4.2.6.2.8s0%2C.5-.2.7c-.4.8-1.2%2C1.6-1.8%2C2-.7.5-1.4.7-1.9.8l.9%2C4.2c1.1-.2%2C2.7-.7%2C4.3-2.2%2C1.6-1.6%2C3-4.1%2C5-10.4l3.3-10.4h-4.7l-1.7%2C7.8c-.2.9-.4%2C2.1-.6%2C2.9h0c-.2-.8-.5-2-.7-2.9l-2.1-7.8h-4.9Z%22%2F%3E%20%20%20%20%3Cpath%20class%3D%22cls-3%22%20d%3D%22M242.1%2C120c1.4-2.5%2C2.7-5.9%2C3.7-9.2l-4.5.3c-.4%2C2.9-1.2%2C6.3-2.1%2C9.2l2.9-.3Z%22%2F%3E%20%20%20%20%3Cpolygon%20class%3D%22cls-3%22%20points%3D%22253.9%20116.4%20266.2%20116.4%20266.2%20112.3%20258.4%20112.3%20258.4%2094.6%20253.9%2094.6%20253.9%20116.4%22%2F%3E%20%20%20%20%3Cpolygon%20class%3D%22cls-3%22%20points%3D%22268.5%20116.4%20280.7%20116.4%20280.7%20112.3%20272.9%20112.3%20272.9%2094.6%20268.5%2094.6%20268.5%20116.4%22%2F%3E%20%20%20%20%3Cpath%20class%3D%22cls-3%22%20d%3D%22M295.7%2C112c-.9.4-2.4.7-3.7.7-4%2C0-6.3-2.7-6.3-7.1s2.7-7.2%2C6.3-7.2%2C2.8.4%2C3.7.8l.9-3.9c-.8-.5-2.5-1-4.8-1-5.9%2C0-10.7%2C4.1-10.7%2C11.6s3.5%2C10.9%2C10.3%2C10.9%2C4.2-.5%2C5-1l-.7-3.8Z%22%2F%3E%20%20%3C%2Fg%3E%20%20%3Cpath%20class%3D%22cls-1%22%20d%3D%22M200.8%2C31.1S232.4-3.2%2C285.7.2c39.5%2C2.5%2C22.9%2C37.4-12.8%2C46.1-33.8%2C8.2-73.9%2C7.5-130.8-.2-75.4-10.3-117.6.5-120.3%2C26.3-3.4%2C32.9%2C65.8%2C34.6%2C103.2%2C22.8-13.2%2C7.7-63%2C24.4-103.7%2C5.3C-24.9%2C78.7%2C9.3%2C30.5%2C73.6%2C28.1c48-1.8%2C94.3%2C11.4%2C156%2C13%2C62.6%2C1.6%2C87.5-32.2%2C53.2-35.2-44.3-3.8-82%2C25.1-82%2C25.1Z%22%2F%3E%3C%2Fsvg%3E",kIe="data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20id%3D%22Layer_1%22%20data-name%3D%22Layer%201%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20version%3D%221.1%22%20viewBox%3D%220%200%20497.8%20137.8%22%3E%20%20%3Cdefs%3E%20%20%20%20%3Cstyle%3E%20%20%20%20%20%20.cls-1%20%7B%20%20%20%20%20%20%20%20fill%3A%20%23231f20%3B%20%20%20%20%20%20%20%20stroke-width%3A%200px%3B%20%20%20%20%20%20%7D%20%20%20%20%3C%2Fstyle%3E%20%20%3C%2Fdefs%3E%20%20%3Cpolygon%20class%3D%22cls-1%22%20points%3D%2223.5%2098.5%2064.4%2098.5%2064.4%2077%2023.5%2077%2023.5%2065%2067.5%2065%2067.5%2043.4%200%2043.4%200%20136.3%2069.1%20136.3%2069.1%20114.9%2023.5%20114.9%2023.5%2098.5%22%2F%3E%20%20%3Cpolygon%20class%3D%22cls-1%22%20points%3D%22128.6%2091.3%20100.7%2043.4%2079.2%2043.4%2079.2%20136.3%20101.5%20136.3%20101.5%2089.7%20128.9%20136.3%20150.9%20136.3%20150.9%2043.4%20128.6%2043.4%20128.6%2091.3%22%2F%3E%20%20%3Cpolygon%20class%3D%22cls-1%22%20points%3D%22187.8%2098.5%20228.7%2098.5%20228.7%2077%20187.8%2077%20187.8%2065%20231.8%2065%20231.8%2043.4%20164.3%2043.4%20164.3%20136.3%20233.4%20136.3%20233.4%20114.9%20187.8%20114.9%20187.8%2098.5%22%2F%3E%20%20%3Cpath%20class%3D%22cls-1%22%20d%3D%22M303.5%2C99.8c-1-1.1-2.1-2.3-3.4-3.3%2C4.4-1.6%2C8-4%2C10.7-7.2%2C4.1-4.8%2C6.2-11%2C6.2-18.2s-1.4-10.9-4.1-15.3c-2.8-4.6-6.5-7.9-11.2-9.7-4.4-1.7-11-2.6-20.3-2.6h-38.2v92.9h23.5v-35.9c4.3%2C0%2C6.2.5%2C6.9.8%2C1.2.4%2C2.4%2C1.3%2C3.6%2C2.6%2C1%2C1.1%2C3.2%2C4.1%2C8.3%2C12.2l12.9%2C20.3h27.8l-13.1-22c-4.1-6.9-7.3-11.7-9.8-14.5ZM266.8%2C65h9.4c8.3%2C0%2C10.8.2%2C11.5.2%2C1.8.3%2C3.1%2C1%2C4.1%2C2.1.9%2C1.1%2C1.4%2C2.7%2C1.4%2C4.8s-.4%2C3.4-1.1%2C4.5c-.7%2C1.1-1.6%2C1.8-2.9%2C2.2-.7.3-3.5.9-13.6.9h-8.7v-14.8Z%22%2F%3E%20%20%3Cpath%20class%3D%22cls-1%22%20d%3D%22M366.5%2C104.8h18.9v5.7c-1.9%2C1.4-4.2%2C2.6-6.8%2C3.7-3%2C1.2-6.1%2C1.9-9.1%2C1.9-5.9%2C0-10.6-2.1-14.2-6.4-3.7-4.4-5.6-11.4-5.6-20.7s1.8-14.9%2C5.5-19.1c3.6-4.1%2C8.3-6%2C14.5-6s7.2%2C1%2C9.7%2C2.9c2.6%2C2%2C4.3%2C4.6%2C5.2%2C8.1l.9%2C3.1%2C23-4.5-.7-3.5c-1.8-8.7-5.9-15.6-12.3-20.6-6.3-4.9-15-7.5-25.9-7.5s-15.5%2C1.6-21.2%2C4.7c-7.5%2C4-13.2%2C9.9-17.1%2C17.5-3.8%2C7.4-5.7%2C16-5.7%2C25.4s1.7%2C16.9%2C5.1%2C24.3c3.5%2C7.6%2C8.8%2C13.6%2C15.7%2C17.7%2C6.9%2C4.1%2C15%2C6.1%2C24.1%2C6.1s14.3-1.4%2C21.2-4.3c7-2.8%2C12.4-6.2%2C16.2-10.1l1-1v-39.1h-42.5v21.5Z%22%2F%3E%20%20%3Cpolygon%20class%3D%22cls-1%22%20points%3D%22470.5%2043.4%20453.7%2073.8%20436.6%2043.4%20409.1%2043.4%20441.7%2097.7%20441.7%20136.3%20465.1%20136.3%20465.1%2097.8%20497.8%2043.4%20470.5%2043.4%22%2F%3E%20%20%3Cpath%20class%3D%22cls-1%22%20d%3D%22M2.1%2C22.9c.8.9%2C1.8%2C1.6%2C3.1%2C2.2%2C1.3.6%2C3.3.8%2C5.8.8s3.8-.3%2C5.2-.8c1.3-.5%2C2.4-1.2%2C3.2-2%2C.8-.9%2C1.3-1.9%2C1.6-3.1.3-1.2.4-3.4.4-6.4V.4h-5.4v13.9c0%2C2%2C0%2C3.4-.2%2C4.3-.2.9-.6%2C1.6-1.4%2C2.2-.8.6-1.9.9-3.5.9s-2.7-.3-3.6-.9c-.9-.6-1.4-1.4-1.7-2.5-.1-.6-.2-2-.2-4.2V.4H0v13.4c0%2C2.8.2%2C4.9.5%2C6.4.2%2C1%2C.8%2C1.9%2C1.5%2C2.8Z%22%2F%3E%20%20%3Crect%20class%3D%22cls-1%22%20x%3D%2229.8%22%20y%3D%2220.7%22%20width%3D%225.1%22%20height%3D%224.8%22%2F%3E%20%20%3Cpath%20class%3D%22cls-1%22%20d%3D%22M56.6%2C20.6c-.9.7-2.2%2C1-3.9%2C1s-3-.4-3.9-1.2c-1-.8-1.6-2-1.9-3.6l-5.3.5c.4%2C2.8%2C1.4%2C4.9%2C3.3%2C6.4%2C1.8%2C1.5%2C4.4%2C2.2%2C7.8%2C2.2s4.3-.3%2C5.8-.9c1.6-.6%2C2.8-1.5%2C3.6-2.8.9-1.3%2C1.3-2.6%2C1.3-4s-.4-2.9-1.1-4c-.7-1.1-1.7-1.9-3-2.5-1.3-.6-3.2-1.2-5.8-1.8-2.6-.6-4.3-1.1-5-1.7-.5-.4-.8-.9-.8-1.5s.3-1.2.9-1.6c.9-.6%2C2.1-.9%2C3.7-.9s2.7.3%2C3.4.8c.8.6%2C1.3%2C1.5%2C1.5%2C2.8l5.4-.2c0-2.3-1-4.1-2.7-5.5-1.7-1.4-4.2-2.1-7.6-2.1s-3.8.3-5.3.9c-1.5.6-2.6%2C1.4-3.3%2C2.5-.8%2C1.1-1.2%2C2.3-1.2%2C3.6%2C0%2C2%2C.8%2C3.7%2C2.5%2C5%2C1.2%2C1%2C3.2%2C1.8%2C6.1%2C2.5%2C2.3.5%2C3.7.9%2C4.3%2C1.1.9.3%2C1.6.7%2C1.9%2C1.1.4.4.6.9.6%2C1.5%2C0%2C.9-.4%2C1.7-1.3%2C2.4Z%22%2F%3E%20%20%3Crect%20class%3D%22cls-1%22%20x%3D%2270.5%22%20y%3D%2220.7%22%20width%3D%225.1%22%20height%3D%224.8%22%2F%3E%20%20%3Cpath%20class%3D%22cls-1%22%20d%3D%22M111.6%2C25c1.6-.5%2C2.9-1.1%2C3.8-2%2C1.2-1.1%2C2.2-2.6%2C2.9-4.4.5-1.5.8-3.3.8-5.3s-.3-4.3-.9-5.9c-.6-1.6-1.4-3-2.6-4.1-1.1-1.1-2.5-1.9-4-2.3-1.2-.3-2.9-.5-5.1-.5h-9.9v25.1h10.2c2%2C0%2C3.6-.2%2C4.8-.5ZM102%2C21.3V4.7h2.4c2.2%2C0%2C3.7%2C0%2C4.4.2%2C1%2C.2%2C1.8.6%2C2.5%2C1.2s1.2%2C1.4%2C1.5%2C2.4c.4%2C1%2C.5%2C2.5.5%2C4.5s-.2%2C3.5-.5%2C4.6c-.4%2C1.1-.8%2C1.9-1.4%2C2.4-.6.5-1.3.8-2.2%2C1-.7.2-1.8.2-3.3.2h-4Z%22%2F%3E%20%20%3Cpolygon%20class%3D%22cls-1%22%20points%3D%22146.7%2021.3%20131.8%2021.3%20131.8%2014.4%20145.2%2014.4%20145.2%2010.2%20131.8%2010.2%20131.8%204.7%20146.2%204.7%20146.2%20.4%20126.4%20.4%20126.4%2025.5%20146.7%2025.5%20146.7%2021.3%22%2F%3E%20%20%3Cpath%20class%3D%22cls-1%22%20d%3D%22M171.3%2C14.5c.9-.6%2C1.7-1.4%2C2.3-2.5.6-1%2C.9-2.3.9-3.9s-.5-3.6-1.6-4.9c-1-1.3-2.3-2.1-3.9-2.5-1-.3-3.1-.4-6.4-.4h-8.7v25.1h5.4v-9.5h3.5c2.5%2C0%2C4.3-.1%2C5.6-.4%2C1-.2%2C1.9-.6%2C2.8-1.2ZM166.6%2C11.4c-.7.3-2.1.4-4.3.4h-3v-7.1h2.6c2%2C0%2C3.2%2C0%2C3.9.2.9.1%2C1.6.5%2C2.2%2C1.1.6.6.9%2C1.3.9%2C2.3s-.2%2C1.4-.6%2C1.9c-.4.6-1%2C1-1.7%2C1.2Z%22%2F%3E%20%20%3Cpath%20class%3D%22cls-1%22%20d%3D%22M184.1%2C19.8h10.7l2.3%2C5.7h5.9L192.3.4h-5.7l-10.4%2C25.1h5.7l2.2-5.7ZM189.4%2C6.3l3.7%2C9.3h-7.3l3.6-9.3Z%22%2F%3E%20%20%3Cpath%20class%3D%22cls-1%22%20d%3D%22M214%2C15h1.1c1.2%2C0%2C2.2%2C0%2C2.7.3.6.2%2C1.1.5%2C1.6%2C1%2C.5.5%2C1.5%2C1.7%2C2.9%2C3.7l3.9%2C5.5h6.5l-3.3-4.9c-1.3-1.9-2.3-3.3-3.1-4.1-.8-.8-1.7-1.5-2.9-2.1%2C2.4-.3%2C4.1-1.1%2C5.3-2.3%2C1.2-1.2%2C1.8-2.8%2C1.8-4.7s-.4-2.8-1.2-3.9c-.8-1.2-1.8-2-3.1-2.4-1.3-.4-3.4-.7-6.2-.7h-11.4v25.1h5.4v-10.5ZM214%2C4.7h4.2c2.2%2C0%2C3.5%2C0%2C3.9%2C0%2C.9.1%2C1.6.5%2C2%2C1%2C.5.5.7%2C1.2.7%2C2s-.2%2C1.4-.5%2C1.9c-.4.5-.9.9-1.5%2C1.1-.6.2-2.3.3-4.9.3h-4v-6.4Z%22%2F%3E%20%20%3Cpolygon%20class%3D%22cls-1%22%20points%3D%22244.3%2025.5%20249.7%2025.5%20249.7%204.7%20257.6%204.7%20257.6%20.4%20236.3%20.4%20236.3%204.7%20244.3%204.7%20244.3%2025.5%22%2F%3E%20%20%3Cpolygon%20class%3D%22cls-1%22%20points%3D%22268.7%205.8%20274%2025.5%20279.3%2025.5%20284.6%205.8%20284.6%2025.5%20289.6%2025.5%20289.6%20.4%20281.5%20.4%20276.7%2017.5%20271.8%20.4%20263.7%20.4%20263.7%2025.5%20268.7%2025.5%20268.7%205.8%22%2F%3E%20%20%3Cpolygon%20class%3D%22cls-1%22%20points%3D%22318%2021.3%20303.1%2021.3%20303.1%2014.4%20316.5%2014.4%20316.5%2010.2%20303.1%2010.2%20303.1%204.7%20317.5%204.7%20317.5%20.4%20297.6%20.4%20297.6%2025.5%20318%2025.5%20318%2021.3%22%2F%3E%20%20%3Cpolygon%20class%3D%22cls-1%22%20points%3D%22330.4%209.1%20341.2%2025.5%20346.6%2025.5%20346.6%20.4%20341.6%20.4%20341.6%2017.2%20330.6%20.4%20325.3%20.4%20325.3%2025.5%20330.4%2025.5%20330.4%209.1%22%2F%3E%20%20%3Cpolygon%20class%3D%22cls-1%22%20points%3D%22361%2025.5%20366.4%2025.5%20366.4%204.7%20374.4%204.7%20374.4%20.4%20353.1%20.4%20353.1%204.7%20361%204.7%20361%2025.5%22%2F%3E%20%20%3Cpath%20class%3D%22cls-1%22%20d%3D%22M405.5%2C25.9c3.9%2C0%2C7.1-1.1%2C9.4-3.4%2C2.4-2.3%2C3.5-5.4%2C3.5-9.5s-1.2-7.3-3.6-9.6c-2.4-2.3-5.5-3.4-9.5-3.4s-4.1.3-5.8%2C1c-1.3.5-2.4%2C1.2-3.5%2C2.3-1.1%2C1-1.9%2C2.2-2.5%2C3.4-.8%2C1.7-1.2%2C3.9-1.2%2C6.4%2C0%2C4%2C1.2%2C7.1%2C3.5%2C9.4%2C2.4%2C2.3%2C5.5%2C3.4%2C9.5%2C3.4ZM400.1%2C6.5c1.4-1.4%2C3.2-2.1%2C5.4-2.1s4%2C.7%2C5.4%2C2.1c1.3%2C1.4%2C2%2C3.6%2C2%2C6.4s-.7%2C5.1-2.1%2C6.5c-1.4%2C1.5-3.2%2C2.2-5.3%2C2.2s-3.9-.7-5.3-2.2c-1.4-1.5-2.1-3.6-2.1-6.5s.7-5%2C2-6.5Z%22%2F%3E%20%20%3Cpolygon%20class%3D%22cls-1%22%20points%3D%22430.8%2014.8%20442%2014.8%20442%2010.6%20430.8%2010.6%20430.8%204.7%20443.8%204.7%20443.8%20.4%20425.4%20.4%20425.4%2025.5%20430.8%2025.5%20430.8%2014.8%22%2F%3E%3C%2Fsvg%3E";m9(`@import url("https://fonts.googleapis.com/css?family=Roboto"); .nrel-footer-wrapper { height: 100%; width: 100%; background-color: inherit; position: relative; font-family: Roboto, "Helvetica Neue", Helvetica, sans-serif; background-color: #e3e6e8; } .nrel-footer-wrapper *, .nrel-footer-wrapper ::after, .nrel-footer-wrapper ::before { box-sizing: border-box; } .nrel-footer-wrapper footer { background-color: #e3e6e8; color: #000; font-size: 14px; font-weight: 400; line-height: 1.2; padding-bottom: 5em; } .nrel-footer-wrapper footer .nrel-alliance-logo { max-height: 53px; } .nrel-footer-wrapper footer .nrel-doe-logo { max-height: 28px; } .nrel-footer-wrapper footer .footertop { background-color: #d1d5d8; padding: 2em 0; } .nrel-footer-wrapper footer a, .nrel-footer-wrapper footer a:visited { color: #000; text-decoration: none; } .nrel-footer-wrapper footer a:hover { color: #c60; text-decoration: underline; } .nrel-footer-wrapper footer a > .fa:first-child { margin-right: 5px; padding-bottom: 3px; } .nrel-footer-wrapper footer img { vertical-align: middle; border-style: none; } .nrel-footer-wrapper footer p { margin-top: 0; margin-bottom: 1rem; } .nrel-footer-wrapper footer ul { list-style-type: none; margin-left: 0; margin-bottom: 0; padding-left: 0; } .nrel-footer-wrapper footer .nrel-attr { font-size: 12px; } .nrel-footer-wrapper footer .nrel-attr a { text-decoration: underline; } .nrel-footer-wrapper footer .social-links { font-size: 14px; margin: 0 0 1em 0; } .nrel-footer-wrapper footer .list-inline-item:not(:last-child) { margin-right: 0.5rem; } .nrel-footer-wrapper footer .social-links li { padding: 0; } .nrel-footer-wrapper footer .social-links li .social-svg > svg { height: 15px; width: 15px; } .nrel-footer-wrapper footer .social-links li .social-svg__twitter { max-width: 15px; max-height: 15px; } .nrel-footer-wrapper footer .list-inline { padding-left: 0; list-style: none; } .nrel-footer-wrapper footer .list-inline-item { display: inline-block; } .nrel-footer-wrapper footer ul li { line-height: 1.25em; margin-bottom: 0.55em; } .nrel-footer-wrapper footer .footerbottom { padding-top: 2em; } .nrel-footer-wrapper footer .global div { margin: 1em 0 0 0; line-height: 1.3; } .nrel-footer-wrapper footer .globalsecondary div, .nrel-footer-wrapper footer .nrel-attr { font-size: 12px; } .nrel-footer-wrapper footer .mt-1, .nrel-footer-wrapper footer .my-1 { margin-top: 0.25rem !important; } .nrel-footer-wrapper footer .mt-3, .nrel-footer-wrapper footer .my-3 { margin-top: 1rem !important; } .nrel-footer-wrapper footer .mt-4, .nrel-footer-wrapper footer .my-4 { margin-top: 1.5rem !important; } .nrel-footer-wrapper footer .mr-5, .nrel-footer-wrapper footer .mx-5 { margin-right: 3rem !important; } .nrel-footer-wrapper footer .col-12 { -ms-flex: 0 0 100%; flex: 0 0 100%; max-width: 100%; } .nrel-footer-wrapper footer .col { -ms-flex-preferred-size: 0; flex-basis: 0; -ms-flex-positive: 1; flex-grow: 1; max-width: 100%; } .nrel-footer-wrapper footer .col, .nrel-footer-wrapper footer .col-1, .nrel-footer-wrapper footer .col-10, .nrel-footer-wrapper footer .col-11, .nrel-footer-wrapper footer .col-12, .nrel-footer-wrapper footer .col-2, .nrel-footer-wrapper footer .col-3, .nrel-footer-wrapper footer .col-4, .nrel-footer-wrapper footer .col-5, .nrel-footer-wrapper footer .col-6, .nrel-footer-wrapper footer .col-7, .nrel-footer-wrapper footer .col-8, .nrel-footer-wrapper footer .col-9, .nrel-footer-wrapper footer .col-auto, .nrel-footer-wrapper footer .col-lg, .nrel-footer-wrapper footer .col-lg-1, .nrel-footer-wrapper footer .col-lg-10, .nrel-footer-wrapper footer .col-lg-11, .nrel-footer-wrapper footer .col-lg-12, .nrel-footer-wrapper footer .col-lg-2, .nrel-footer-wrapper footer .col-lg-3, .nrel-footer-wrapper footer .col-lg-4, .nrel-footer-wrapper footer .col-lg-5, .nrel-footer-wrapper footer .col-lg-6, .nrel-footer-wrapper footer .col-lg-7, .nrel-footer-wrapper footer .col-lg-8, .nrel-footer-wrapper footer .col-lg-9, .nrel-footer-wrapper footer .col-lg-auto, .nrel-footer-wrapper footer .col-md, .nrel-footer-wrapper footer .col-md-1, .nrel-footer-wrapper footer .col-md-10, .nrel-footer-wrapper footer .col-md-11, .nrel-footer-wrapper footer .col-md-12, .nrel-footer-wrapper footer .col-md-2, .nrel-footer-wrapper footer .col-md-3, .nrel-footer-wrapper footer .col-md-4, .nrel-footer-wrapper footer .col-md-5, .nrel-footer-wrapper footer .col-md-6, .nrel-footer-wrapper footer .col-md-7, .nrel-footer-wrapper footer .col-md-8, .nrel-footer-wrapper footer .col-md-9, .nrel-footer-wrapper footer .col-md-auto, .nrel-footer-wrapper footer .col-sm, .nrel-footer-wrapper footer .col-sm-1, .nrel-footer-wrapper footer .col-sm-10, .nrel-footer-wrapper footer .col-sm-11, .nrel-footer-wrapper footer .col-sm-12, .nrel-footer-wrapper footer .col-sm-2, .nrel-footer-wrapper footer .col-sm-3, .nrel-footer-wrapper footer .col-sm-4, .nrel-footer-wrapper footer .col-sm-5, .nrel-footer-wrapper footer .col-sm-6, .nrel-footer-wrapper footer .col-sm-7, .nrel-footer-wrapper footer .col-sm-8, .nrel-footer-wrapper footer .col-sm-9, .nrel-footer-wrapper footer .col-sm-auto, .nrel-footer-wrapper footer .col-xl, .nrel-footer-wrapper footer .col-xl-1, .nrel-footer-wrapper footer .col-xl-10, .nrel-footer-wrapper footer .col-xl-11, .nrel-footer-wrapper footer .col-xl-12, .nrel-footer-wrapper footer .col-xl-2, .nrel-footer-wrapper footer .col-xl-3, .nrel-footer-wrapper footer .col-xl-4, .nrel-footer-wrapper footer .col-xl-5, .nrel-footer-wrapper footer .col-xl-6, .nrel-footer-wrapper footer .col-xl-7, .nrel-footer-wrapper footer .col-xl-8, .nrel-footer-wrapper footer .col-xl-9, .nrel-footer-wrapper footer .col-xl-auto { position: relative; width: 100%; padding-right: 15px; padding-left: 15px; } .nrel-footer-wrapper footer .flex-column { -ms-flex-direction: column !important; flex-direction: column !important; } .nrel-footer-wrapper footer .d-flex { display: -ms-flexbox !important; display: flex !important; } @media print { .nrel-footer-wrapper footer .footertop, .nrel-footer-wrapper footer .row.social-and-global-links { display: none; } } @media (min-width: 576px) { .nrel-footer-wrapper footer .container { max-width: 540px; } .nrel-footer-wrapper footer .col-sm-5 { -ms-flex: 0 0 41.666667%; flex: 0 0 41.666667%; max-width: 41.666667%; } .nrel-footer-wrapper footer .col-sm-6 { -ms-flex: 0 0 50%; flex: 0 0 50%; max-width: 50%; } .nrel-footer-wrapper footer .col-sm-7 { -ms-flex: 0 0 58.333333%; flex: 0 0 58.333333%; max-width: 58.333333%; } } @media (min-width: 768px) { .nrel-footer-wrapper footer .container { max-width: 720px; } .nrel-footer-wrapper footer .social-links { font-size: 14px; margin: 0 0 1em 0; } .nrel-footer-wrapper footer .col-md-4 { -ms-flex: 0 0 33.333333%; flex: 0 0 33.333333%; max-width: 33.333333%; } .nrel-footer-wrapper footer .col-md-8 { -ms-flex: 0 0 66.666667%; flex: 0 0 66.666667%; max-width: 66.666667%; } } @media (min-width: 992px) { .nrel-footer-wrapper footer { padding-bottom: 6em; } .nrel-footer-wrapper footer .container { max-width: 960px; } .nrel-footer-wrapper footer .col-lg-3 { -ms-flex: 0 0 25%; flex: 0 0 25%; max-width: 25%; } .nrel-footer-wrapper footer .col-lg-5 { -ms-flex: 0 0 41.666667%; flex: 0 0 41.666667%; max-width: 41.666667%; } .nrel-footer-wrapper footer .col-lg-7 { -ms-flex: 0 0 58.333333%; flex: 0 0 58.333333%; max-width: 58.333333%; } .nrel-footer-wrapper footer .global div:first-child { margin: 0 2em 0 0; } .nrel-footer-wrapper footer .global div { margin: 0 2em; } .nrel-footer-wrapper footer .justify-content-lg-start { -ms-flex-pack: start !important; justify-content: flex-start !important; } .nrel-footer-wrapper footer .flex-lg-row { -ms-flex-direction: row !important; flex-direction: row !important; } } @media (min-width: 1200px) { .nrel-footer-wrapper footer { padding-bottom: 7em; } .nrel-footer-wrapper footer .container { max-width: 1140px; } } .nrel-footer-wrapper footer .row { display: -ms-flexbox; display: flex; -ms-flex-wrap: wrap; flex-wrap: wrap; margin-right: -15px; margin-left: -15px; } .nrel-footer-wrapper footer .container { width: 100%; padding-right: 15px; padding-left: 15px; margin-right: auto; margin-left: auto; }`);KJ.propTypes={className:ss.string,contact:ss.string};function KJ(t){var e=t.className,r=e===void 0?"":e,n=t.contact,i=n||"mailto:maps.help@nrel.gov";return Vr.createElement("div",{className:"nrel-footer-wrapper ".concat(r)},Vr.createElement("footer",{id:"footer",className:"hidden-print"},Vr.createElement("div",{className:"footertop"},Vr.createElement("div",{className:"container"},Vr.createElement("div",{className:"row"},Vr.createElement("div",{className:"col-12 col-lg-5"},Vr.createElement("a",{href:"http://www.nrel.gov/index.html"},Vr.createElement("strong",null,"National Renewable Energy Laboratory"))),Vr.createElement("div",{className:"col col-lg-7"},Vr.createElement("div",{className:"d-flex flex-column flex-lg-row justify-content-lg-start global"},Vr.createElement("div",null,Vr.createElement("a",{href:"http://www.nrel.gov/about/index.html"},"About")),Vr.createElement("div",null,Vr.createElement("a",{href:"http://www.nrel.gov/research/index.html"},"Research")),Vr.createElement("div",null,Vr.createElement("a",{href:"http://www.nrel.gov/index.html"},"Work with Us")),Vr.createElement("div",null,Vr.createElement("a",{href:"http://www.nrel.gov/news/index.html"},"News")),Vr.createElement("div",null,Vr.createElement("a",{href:"http://www.nrel.gov/careers/index.html"},"Careers"))))))),Vr.createElement("div",{className:"footerbottom"},Vr.createElement("div",{className:"container"},Vr.createElement("div",{className:"row social-and-global-links"},Vr.createElement("div",{className:"col-md-4 col-lg-5"},Vr.createElement("div",null,Vr.createElement("a",{href:i},"Contact Us")),Vr.createElement("div",{className:"mt-2"},Vr.createElement("a",{href:"http://www.nrel.gov/about/visiting-nrel.html"},"Visit")),Vr.createElement("div",{className:"mt-2"},Vr.createElement("a",{href:"http://www.nrel.gov/news/subscribe.html"},"Subscribe")),Vr.createElement("div",{className:"mt-3"},Vr.createElement("ul",{className:"social-links list-inline"},Vr.createElement("li",{className:"list-inline-item"},Vr.createElement("a",{href:"https://www.facebook.com/nationalrenewableenergylab",rel:"noopener noreferrer",target:"_blank","aria-label":"Follow NREL on Facebook"},Vr.createElement("img",{"aria-hidden":!0,className:"social-svg",src:TIe}))),Vr.createElement("li",{className:"list-inline-item"},Vr.createElement("a",{href:"https://www.instagram.com/nationalrenewableenergylab/",rel:"noopener noreferrer",target:"_blank","aria-label":"Follow NREL on Instagram"},Vr.createElement("img",{"aria-hidden":!0,className:"social-svg",src:PIe}))),Vr.createElement("li",{className:"list-inline-item"},Vr.createElement("a",{href:"https://www.linkedin.com/company/national-renewable-energy-laboratory",rel:"noopener noreferrer",target:"_blank","aria-label":"Follow NREL on Linked In"},Vr.createElement("img",{"aria-hidden":!0,className:"social-svg",src:IIe}))),Vr.createElement("li",{className:"list-inline-item"},Vr.createElement("a",{href:"https://www.youtube.com/user/NRELPR/",rel:"noopener noreferrer",target:"_blank","aria-label":"Follow NREL on YouTube"},Vr.createElement("img",{"aria-hidden":!0,className:"social-svg",src:AIe}))),Vr.createElement("li",{className:"list-inline-item"},Vr.createElement("a",{href:"https://x.com/nrel/",rel:"noopener noreferrer",target:"_blank","aria-label":"Follow NREL on X"},Vr.createElement("img",{"aria-hidden":!0,className:"social-svg social-svg__twitter",src:MIe})))))),Vr.createElement("div",{className:"col-md-8 col-lg-7 globalsecondary"},Vr.createElement("div",{className:"row"},Vr.createElement("div",{className:"col-sm-6 col-lg-3"},Vr.createElement("div",{className:"mt-1"},Vr.createElement("a",{href:"http://www.nrel.gov/accessibility.html"},"Accessibility")),Vr.createElement("div",{className:"mt-1"},Vr.createElement("a",{href:"http://www.nrel.gov/disclaimer.html"},"Disclaimer")),Vr.createElement("div",{className:"mt-1"},Vr.createElement("a",{href:"http://www.nrel.gov/security.html"},"Security and Privacy")),Vr.createElement("div",{className:"mt-1"},Vr.createElement("a",{href:"http://www.nrel.gov/webmaster.html"},"Site Feedback"))),Vr.createElement("div",{className:"col-sm-6 col-lg-3"},Vr.createElement("div",{className:"mt-1"},Vr.createElement("a",{href:"https://developer.nrel.gov/"},"Developers")),Vr.createElement("div",{className:"mt-1"},Vr.createElement("a",{href:"https://thesource.nrel.gov/"},"Employees")))))),Vr.createElement("hr",null),Vr.createElement("div",{className:"mt-4"},Vr.createElement("div",{className:"row"},Vr.createElement("div",{className:"col-sm-5"},Vr.createElement("a",{href:"https://www.allianceforsustainableenergy.org/"},Vr.createElement("img",{className:"mr-5 nrel-alliance-logo",src:RIe,alt:"Alliance for Sustainable Energy, LLC"})),Vr.createElement("a",{href:"https://www.energy.gov"},Vr.createElement("img",{src:kIe,className:"nrel-doe-logo",alt:"U.S. Department of Energy"}))),Vr.createElement("div",{className:"col-12 col-sm-7"},Vr.createElement("p",{className:"nrel-attr"},"The National Renewable Energy Laboratory is a national laboratory of the ",Vr.createElement("a",{href:"https://www.energy.gov/"},"U.S. Department of Energy"),", ",Vr.createElement("a",{href:"https://www.energy.gov/eere/office-energy-efficiency-renewable-energy"},"Office of Energy Efficiency and Renewable Energy"),", operated by the ",Vr.createElement("a",{href:"https://www.allianceforsustainableenergy.org/"},"Alliance for Sustainable Energy LLC"),"."))))))))}function ZJ(t){if(typeof t=="string")try{t=new URL("http://test".concat(t)).pathname}catch{}return t}m9(`.nrel-header ul.menu, .nrel-header ul.sub-menu { display: flex; justify-content: flex-start; padding-left: 0px; } .nrel-header ul.menu > li.menu-item, .nrel-header ul.sub-menu > li.menu-item { list-style-type: none; flex: initial; position: relative; cursor: pointer; } .nrel-header ul.menu > li.menu-item > *, .nrel-header ul.sub-menu > li.menu-item > * { display: inline-block; } .nrel-header ul.menu > li.menu-item .submenu-chevron, .nrel-header ul.sub-menu > li.menu-item .submenu-chevron { width: 10px; height: 10px; margin-left: 5px; transform: rotate(270deg); position: relative; top: 1px; transition: transform 0.2s; } .nrel-header ul.menu > li.menu-item > ul.sub-menu, .nrel-header ul.sub-menu > li.menu-item > ul.sub-menu { display: none; justify-content: flex-start; flex-direction: column; position: absolute; width: 100%; } .nrel-header ul.menu > li.menu-item > ul.sub-menu > li.menu-item, .nrel-header ul.sub-menu > li.menu-item > ul.sub-menu > li.menu-item { list-style-type: none; } .nrel-header ul.menu > li.menu-item > ul.sub-menu > li.menu-item > ul.sub-menu, .nrel-header ul.sub-menu > li.menu-item > ul.sub-menu > li.menu-item > ul.sub-menu { top: 0; left: 100%; } .nrel-header ul.menu > li.menu-item.active > span > .submenu-chevron, .nrel-header ul.sub-menu > li.menu-item.active > span > .submenu-chevron { transform: rotate(90deg); } .nrel-header ul.menu > li.menu-item.active > ul.sub-menu, .nrel-header ul.sub-menu > li.menu-item.active > ul.sub-menu { display: flex; } .nrel-header ul.menu > li.menu-spacer, .nrel-header ul.sub-menu > li.menu-spacer { flex-grow: 1; max-width: 100%; flex-basis: 0; } .nrel-header ul.menu .menu-bar, .nrel-header ul.sub-menu .menu-bar { display: none; } @media (min-width: 768px) { .nrel-header ul.menu > li.menu-item { width: max-content; } .nrel-header ul.menu > li.menu-item span { width: max-content; } .nrel-header ul.menu > li.menu-item .sub-menu { width: auto !important; } .nrel-header ul.menu > li.menu-item .sub-menu .menu-item { display: flex; width: auto; } .nrel-header ul.menu > li.menu-item .sub-menu .menu-item span { flex: 1; } } @media (max-width: 767px) { .nrel-header ul.menu > li.menu-item.show .sub-menu, .nrel-header ul.menu > li.menu-item.active .sub-menu { display: block; position: unset; } .nrel-header ul.menu > li.menu-item.show .submenu-chevron, .nrel-header ul.menu > li.menu-item.active .submenu-chevron { transform: rotate(90deg); } .nrel-header .menu-bar { width: 100%; background-color: #5e6a71; height: 44px; display: flex; justify-content: flex-start; align-items: center; cursor: pointer; } .nrel-header .menu-bar > p { color: #fff; } .nrel-header .menu-bar #header-burger-btn { width: 30px; height: 30px; margin: 0 10px 0 20px; -webkit-transform: rotate(0deg); -moz-transform: rotate(0deg); -o-transform: rotate(0deg); transform: rotate(0deg); cursor: pointer; z-index: 1; position: relative; top: 3px; } .nrel-header .menu-bar #header-burger-btn span { display: block; position: absolute; height: 4px; width: 100%; background: #fff; border-radius: 9px; opacity: 1; left: 0; -webkit-transform: rotate(0deg); -moz-transform: rotate(0deg); -o-transform: rotate(0deg); transform: rotate(0deg); -webkit-transition: 0.3s ease-in-out; -moz-transition: 0.3s ease-in-out; -o-transition: 0.3s ease-in-out; transition: 0.3s ease-in-out; } .nrel-header .menu-bar .header-burger-line-1 { top: 3px; } .nrel-header .menu-bar .header-burger-line-2 { top: 16px; } .nrel-header .menu-bar #header-burger-btn:hover .header-burger-line-1 { top: 2px; } .nrel-header .menu-bar #header-burger-btn:hover .header-burger-line-2 { top: 17px; } .nrel-header .menu-bar #header-burger-btn.open > .header-burger-line-1 { top: 13px; -webkit-transform: rotate(135deg); -moz-transform: rotate(135deg); -o-transform: rotate(135deg); transform: rotate(135deg) translate(-5px, -3px); } .nrel-header .menu-bar #header-burger-btn.open > .header-burger-line-2 { top: 13px; -webkit-transform: rotate(-135deg); -moz-transform: rotate(-135deg); -o-transform: rotate(-135deg); transform: rotate(-135deg) translate(-3px, 5px); } }`);v9.propTypes={style:ss.object,children:ss.node.isRequired,className:ss.string,isSubMenu:ss.bool,noStick:ss.bool,scrollContainerId:ss.string};function v9(t){var e=t.children,r=t.isSubMenu,n=t.className,i=n===void 0?"":n,o=t.scrollContainerId,a=t.noStick,s=t.style,l=Uc.useRef(window),u=Uc.useState("no-stick"),p=u[0],m=u[1],v=Uc.useState(!1),x=v[0],y=v[1];Uc.useEffect(function(){var T;return o&&(l.current=document.getElementById(o)),(T=l.current)===null||T===void 0||T.addEventListener("scroll",_),function(){var A;(A=l.current)===null||A===void 0||A.removeEventListener("scroll",_)}},[o]);var _=function(){var T;if(!a){var A=((T=document.querySelector(".vadr-header"))===null||T===void 0?void 0:T.getBoundingClientRect().bottom)||0,k=A<=0?"stick":"no-stick";m(k)}},w=function(){return y(!x)},C=r?"sub-menu":"menu",E=x?"open":"close";return Vr.createElement(Vr.Fragment,null,r?Vr.createElement("ul",{style:s,className:"".concat(C," ").concat(i)},e):Vr.createElement(Vr.Fragment,null,Vr.createElement("div",{style:s,className:"menu-bar ".concat(p," ").concat(E),onClick:w},Vr.createElement("div",{id:"header-burger-btn",className:E},Vr.createElement("span",{className:"header-burger-line-1"}),Vr.createElement("span",{className:"header-burger-line-2"}))),Vr.createElement("div",{className:"menu-container ".concat(p," ").concat(E)},Vr.createElement("ul",{className:"".concat(C," ").concat(i)},Uc.Children.map(e,function(T){return T&&Uc.cloneElement(T,{toggleMenu:w})})))))}var QJ;function y9(){return y9=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},y9.apply(this,arguments)}function OIe(t){return Vr.createElement("svg",y9({width:13,height:24,viewBox:"0 0 13 24",xmlns:"http://www.w3.org/2000/svg"},t),QJ||(QJ=Vr.createElement("g",{stroke:"currentColor",strokeWidth:2,fill:"none",fillRule:"evenodd",strokeLinecap:"round"},Vr.createElement("path",{d:"M12.21 23.556L.916 12.222M.853 12.147L12.147.853"}))))}tee.propTypes={children:ss.node.isRequired,label:ss.string.isRequired,className:ss.string,toggleMenu:ss.func};var JJ=["Enter"],eee=function(t,e,r){return Uc.Children.toArray(t).some(function(n){var i,o;if(!Uc.isValidElement(n))return!1;var a=ZJ((i=n==null?void 0:n.props)===null||i===void 0?void 0:i.to),s=a===e;return r&&((o=n==null?void 0:n.props)===null||o===void 0?void 0:o.children)?s||eee(n.props.children,e,r):s})};function tee(t){var e=t.children,r=t.label,n=t.toggleMenu,i=t.className,o=i===void 0?"":i,a=g9.useLocation(),s=Uc.useState(!1),l=s[0],u=s[1],p=Uc.useState(!1),m=p[0],v=p[1],x=Uc.useState(!1),y=x[0],_=x[1],w=Vr.useRef(),C=Vr.useContext(XJ).menuCloseDelay,E=function(Z){return eee(e,a.pathname,Z)},T=function(Z){Z.stopPropagation(),Z.preventDefault(),m&&l?(v(!1),u(!1)):u(!l)};Vr.useEffect(function(){var Z=function(W){W.key==="Escape"&&_(!1),JJ.includes(W.key)&&y&&_(!1)};return document.addEventListener("keydown",Z),function(){document.removeEventListener("keydown",Z)}},[y]),Vr.useEffect(function(){v(!1)},[a.pathname]);var A=function(Z,W){return function(D){if(D.stopPropagation(),D.preventDefault(),!W)v(Z);else{var H=window.innerWidth;H>767&&(clearTimeout(w.current),Z?v(!0):w.current=setTimeout(function(){v(!1)},C))}}};Vr.useEffect(function(){var Z=function(){return y&&_(!1)};return document.addEventListener("click",Z),function(){document.removeEventListener("click",Z)}},[y]);var k=E(!0)?"current":"",X=l||E(!0)?"show":"";return Vr.createElement(Vr.Fragment,null,Vr.createElement("li",{tabIndex:0,onKeyDown:function(Z){return JJ.includes(Z.key)&&_(!y)},onClick:T,onMouseEnter:A(!0,!0),onMouseLeave:A(!1,!0),onTouchEnd:A(!m,!1),className:"desktop-menu menu-item ".concat(k," ").concat(o," ").concat(y||m?"active":""," ").concat(X)},Vr.createElement("span",null,r,Vr.createElement(OIe,{className:"submenu-chevron"})),Vr.createElement(v9,{isSubMenu:!0},Uc.Children.map(e,function(Z){return Z&&Uc.cloneElement(Z,{toggleMenu:function(W){n==null||n(W),T(W)}})}))))}function LIe(){return Vr.createElement("li",{className:"menu-spacer"})}ree.propTypes={to:ss.string.isRequired,children:ss.node.isRequired,toggleMenu:ss.func,className:ss.string,isCurrent:ss.bool};function ree(t){var e=t.children,r=t.to,n=t.className,i=n===void 0?"":n,o=t.isCurrent,a=t.toggleMenu,s=g9.useLocation(),l=g9.useHistory(),u=o===void 0&&ZJ(r)===s.pathname||o?"current":"",p=function(m){m.stopPropagation(),m.preventDefault(),l.push(r),a==null||a(m)};return Vr.createElement("li",{tabIndex:0,onKeyDown:function(m){return m.key==="Enter"&&p(m)},className:"menu-item ".concat(u," ").concat(i),onClick:p,onTouchEnd:p},Vr.createElement("span",null,e))}var x9=function(){return x9=Object.assign||function(e){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},x9.apply(this,arguments)};nee.propTypes={toggleMenu:ss.func,children:ss.node,className:ss.string,onClick:ss.func};function nee(t){var e=t.toggleMenu,r=t.children,n=t.onClick,i=t.className,o=i===void 0?"":i,a=t.buttonProps,s=function(l){n(l),e==null||e(l)};return Vr.createElement("li",{className:"menu-item ".concat(o),onClick:s},Vr.createElement("button",x9({},a),r))}iee.propTypes={to:ss.string.isRequired,children:ss.string.isRequired,alt:ss.string,className:ss.string};function iee(t){var e=t.to,r=t.children,n=t.alt,i=t.className,o=i===void 0?"":i;return Vr.createElement("li",{className:"menu-item ".concat(o)},Vr.createElement("a",{href:e,title:n,target:"_blank",rel:"noopener noreferrer"},r))}gy.ExternalMenuLink=iee;var UAt=gy.Footer=KJ,VAt=gy.Header=YJ,HAt=gy.Menu=v9,WAt=gy.MenuButton=nee,GAt=gy.MenuLink=ree,qAt=gy.MenuSpacer=LIe,XAt=gy.SubMenu=tee,vy=Or.createContext(null);function DIe(t){t()}var oee=DIe,NIe=function(e){return oee=e},$Ie=function(){return oee},see={notify:function(){}};function FIe(){var t=$Ie(),e=null,r=null;return{clear:function(){e=null,r=null},notify:function(){t(function(){for(var i=e;i;)i.callback(),i=i.next})},get:function(){for(var i=[],o=e;o;)i.push(o),o=o.next;return i},subscribe:function(i){var o=!0,a=r={callback:i,next:null,prev:r};return a.prev?a.prev.next=a:e=a,function(){!o||e===null||(o=!1,a.next?a.next.prev=a.prev:r=a.prev,a.prev?a.prev.next=a.next:e=a.next)}}}}var _9=function(){function t(r,n){this.store=r,this.parentSub=n,this.unsubscribe=null,this.listeners=see,this.handleChangeWrapper=this.handleChangeWrapper.bind(this)}var e=t.prototype;return e.addNestedSub=function(n){return this.trySubscribe(),this.listeners.subscribe(n)},e.notifyNestedSubs=function(){this.listeners.notify()},e.handleChangeWrapper=function(){this.onStateChange&&this.onStateChange()},e.isSubscribed=function(){return Boolean(this.unsubscribe)},e.trySubscribe=function(){this.unsubscribe||(this.unsubscribe=this.parentSub?this.parentSub.addNestedSub(this.handleChangeWrapper):this.store.subscribe(this.handleChangeWrapper),this.listeners=FIe())},e.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null,this.listeners.clear(),this.listeners=see)},t}(),AL={exports:{}},RL={};/** * @license React * react-jsx-runtime.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var zIe=Y.exports,BIe=Symbol.for("react.element"),jIe=Symbol.for("react.fragment"),UIe=Object.prototype.hasOwnProperty,VIe=zIe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,HIe={key:!0,ref:!0,__self:!0,__source:!0};function aee(t,e,r){var n,i={},o=null,a=null;r!==void 0&&(o=""+r),e.key!==void 0&&(o=""+e.key),e.ref!==void 0&&(a=e.ref);for(n in e)UIe.call(e,n)&&!HIe.hasOwnProperty(n)&&(i[n]=e[n]);if(t&&t.defaultProps)for(n in e=t.defaultProps,e)i[n]===void 0&&(i[n]=e[n]);return{$$typeof:BIe,type:t,key:o,ref:a,props:i,_owner:VIe.current}}RL.Fragment=jIe;RL.jsx=aee;RL.jsxs=aee;AL.exports=RL;const Kt=AL.exports.jsx,Ji=AL.exports.jsxs,WIe=AL.exports.Fragment;var GIe=Object.freeze(Object.defineProperty({__proto__:null,jsx:Kt,jsxs:Ji,Fragment:WIe},Symbol.toStringTag,{value:"Module"}));function YAt(t){var e=t.store,r=t.context,n=t.children,i=Y.exports.useMemo(function(){var s=new _9(e);return s.onStateChange=s.notifyNestedSubs,{store:e,subscription:s}},[e]),o=Y.exports.useMemo(function(){return e.getState()},[e]);Y.exports.useEffect(function(){var s=i.subscription;return s.trySubscribe(),o!==e.getState()&&s.notifyNestedSubs(),function(){s.tryUnsubscribe(),s.onStateChange=null}},[i,o]);var a=r||vy;return Kt(a.Provider,{value:i,children:n})}var b9=typeof window!="undefined"&&typeof window.document!="undefined"&&typeof window.document.createElement!="undefined"?Y.exports.useLayoutEffect:Y.exports.useEffect,qIe=[],XIe=[null,null];function YIe(t,e){var r=t[1];return[e.payload,r+1]}function lee(t,e,r){b9(function(){return t.apply(void 0,e)},r)}function KIe(t,e,r,n,i,o,a){t.current=n,e.current=i,r.current=!1,o.current&&(o.current=null,a())}function ZIe(t,e,r,n,i,o,a,s,l,u){if(!!t){var p=!1,m=null,v=function(){if(!p){var _=e.getState(),w,C;try{w=n(_,i.current)}catch(E){C=E,m=E}C||(m=null),w===o.current?a.current||l():(o.current=w,s.current=w,a.current=!0,u({type:"STORE_UPDATED",payload:{error:C}}))}};r.onStateChange=v,r.trySubscribe(),v();var x=function(){if(p=!0,r.tryUnsubscribe(),r.onStateChange=null,m)throw m};return x}}var QIe=function(){return[null,0]};function JIe(t,e){e===void 0&&(e={});var r=e,n=r.getDisplayName,i=n===void 0?function(T){return"ConnectAdvanced("+T+")"}:n,o=r.methodName,a=o===void 0?"connectAdvanced":o,s=r.renderCountProp,l=s===void 0?void 0:s,u=r.shouldHandleStateChanges,p=u===void 0?!0:u,m=r.storeKey,v=m===void 0?"store":m;r.withRef;var x=r.forwardRef,y=x===void 0?!1:x,_=r.context,w=_===void 0?vy:_,C=sf(r,["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"]),E=w;return function(A){var k=A.displayName||A.name||"Component",X=i(k),Z=vt({},C,{getDisplayName:i,methodName:a,renderCountProp:l,shouldHandleStateChanges:p,storeKey:v,displayName:X,wrappedComponentName:k,WrappedComponent:A}),W=C.pure;function D(z){return t(z.dispatch,Z)}var H=W?Y.exports.useMemo:function(z){return z()};function N(z){var O=Y.exports.useMemo(function(){var xt=z.forwardedRef,pt=sf(z,["forwardedRef"]);return[z.context,xt,pt]},[z]),F=O[0],G=O[1],q=O[2],ee=Y.exports.useMemo(function(){return F&&F.Consumer&&L6.exports.isContextConsumer(Kt(F.Consumer,{}))?F:E},[F,E]),re=Y.exports.useContext(ee),ce=Boolean(z.store)&&Boolean(z.store.getState)&&Boolean(z.store.dispatch);Boolean(re)&&Boolean(re.store);var fe=ce?z.store:re.store,J=Y.exports.useMemo(function(){return D(fe)},[fe]),oe=Y.exports.useMemo(function(){if(!p)return XIe;var xt=new _9(fe,ce?null:re.subscription),pt=xt.notifyNestedSubs.bind(xt);return[xt,pt]},[fe,ce,re]),ve=oe[0],ye=oe[1],xe=Y.exports.useMemo(function(){return ce?re:vt({},re,{subscription:ve})},[ce,re,ve]),se=Y.exports.useReducer(YIe,qIe,QIe),me=se[0],pe=me[0],Ce=se[1];if(pe&&pe.error)throw pe.error;var Pe=Y.exports.useRef(),Re=Y.exports.useRef(q),ke=Y.exports.useRef(),ze=Y.exports.useRef(!1),Ge=H(function(){return ke.current&&q===Re.current?ke.current:J(fe.getState(),q)},[fe,pe,q]);lee(KIe,[Re,Pe,ze,q,Ge,ke,ye]),lee(ZIe,[p,fe,ve,J,Re,Pe,ze,ke,ye,Ce],[fe,ve,J]);var ht=Y.exports.useMemo(function(){return Kt(A,ul(io({},Ge),{ref:G}))},[G,A,Ge]),Tt=Y.exports.useMemo(function(){return p?Kt(ee.Provider,{value:xe,children:ht}):ht},[ee,ht,xe]);return Tt}var j=W?Or.memo(N):N;if(j.WrappedComponent=A,j.displayName=X,y){var $=Or.forwardRef(function(O,F){return Kt(j,ul(io({},O),{forwardedRef:F}))});return $.displayName=X,$.WrappedComponent=A,D2($,A)}return D2(j,A)}}function cee(t,e){return t===e?t!==0||e!==0||1/t==1/e:t!==t&&e!==e}function w9(t,e){if(cee(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;var r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;for(var i=0;i<r.length;i++)if(!Object.prototype.hasOwnProperty.call(e,r[i])||!cee(t[r[i]],e[r[i]]))return!1;return!0}function uee(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function fee(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?uee(Object(r),!0).forEach(function(n){Fi(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):uee(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Vc(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var dee=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),C9=function(){return Math.random().toString(36).substring(7).split("").join(".")},kL={INIT:"@@redux/INIT"+C9(),REPLACE:"@@redux/REPLACE"+C9(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+C9()}};function eMe(t){if(typeof t!="object"||t===null)return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function hee(t,e,r){var n;if(typeof e=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Vc(0));if(typeof e=="function"&&typeof r=="undefined"&&(r=e,e=void 0),typeof r!="undefined"){if(typeof r!="function")throw new Error(Vc(1));return r(hee)(t,e)}if(typeof t!="function")throw new Error(Vc(2));var i=t,o=e,a=[],s=a,l=!1;function u(){s===a&&(s=a.slice())}function p(){if(l)throw new Error(Vc(3));return o}function m(_){if(typeof _!="function")throw new Error(Vc(4));if(l)throw new Error(Vc(5));var w=!0;return u(),s.push(_),function(){if(!!w){if(l)throw new Error(Vc(6));w=!1,u();var E=s.indexOf(_);s.splice(E,1),a=null}}}function v(_){if(!eMe(_))throw new Error(Vc(7));if(typeof _.type=="undefined")throw new Error(Vc(8));if(l)throw new Error(Vc(9));try{l=!0,o=i(o,_)}finally{l=!1}for(var w=a=s,C=0;C<w.length;C++){var E=w[C];E()}return _}function x(_){if(typeof _!="function")throw new Error(Vc(10));i=_,v({type:kL.REPLACE})}function y(){var _,w=m;return _={subscribe:function(E){if(typeof E!="object"||E===null)throw new Error(Vc(11));function T(){E.next&&E.next(p())}T();var A=w(T);return{unsubscribe:A}}},_[dee]=function(){return this},_}return v({type:kL.INIT}),n={dispatch:v,subscribe:m,getState:p,replaceReducer:x},n[dee]=y,n}function tMe(t){Object.keys(t).forEach(function(e){var r=t[e],n=r(void 0,{type:kL.INIT});if(typeof n=="undefined")throw new Error(Vc(12));if(typeof r(void 0,{type:kL.PROBE_UNKNOWN_ACTION()})=="undefined")throw new Error(Vc(13))})}function rMe(t){for(var e=Object.keys(t),r={},n=0;n<e.length;n++){var i=e[n];typeof t[i]=="function"&&(r[i]=t[i])}var o=Object.keys(r),a;try{tMe(r)}catch(s){a=s}return function(l,u){if(l===void 0&&(l={}),a)throw a;for(var p=!1,m={},v=0;v<o.length;v++){var x=o[v],y=r[x],_=l[x],w=y(_,u);if(typeof w=="undefined")throw u&&u.type,new Error(Vc(14));m[x]=w,p=p||w!==_}return p=p||o.length!==Object.keys(l).length,p?m:l}}function pee(t,e){return function(){return e(t.apply(this,arguments))}}function nMe(t,e){if(typeof t=="function")return pee(t,e);if(typeof t!="object"||t===null)throw new Error(Vc(16));var r={};for(var n in t){var i=t[n];typeof i=="function"&&(r[n]=pee(i,e))}return r}function OL(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return e.length===0?function(n){return n}:e.length===1?e[0]:e.reduce(function(n,i){return function(){return n(i.apply(void 0,arguments))}})}function iMe(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return function(n){return function(){var i=n.apply(void 0,arguments),o=function(){throw new Error(Vc(15))},a={getState:i.getState,dispatch:function(){return o.apply(void 0,arguments)}},s=e.map(function(l){return l(a)});return o=OL.apply(void 0,s)(i.dispatch),fee(fee({},i),{},{dispatch:o})}}}function E9(t){return function(r,n){var i=t(r,n);function o(){return i}return o.dependsOnOwnProps=!1,o}}function mee(t){return t.dependsOnOwnProps!==null&&t.dependsOnOwnProps!==void 0?Boolean(t.dependsOnOwnProps):t.length!==1}function gee(t,e){return function(n,i){i.displayName;var o=function(s,l){return o.dependsOnOwnProps?o.mapToProps(s,l):o.mapToProps(s)};return o.dependsOnOwnProps=!0,o.mapToProps=function(s,l){o.mapToProps=t,o.dependsOnOwnProps=mee(t);var u=o(s,l);return typeof u=="function"&&(o.mapToProps=u,o.dependsOnOwnProps=mee(u),u=o(s,l)),u},o}}function oMe(t){return typeof t=="function"?gee(t):void 0}function sMe(t){return t?void 0:E9(function(e){return{dispatch:e}})}function aMe(t){return t&&typeof t=="object"?E9(function(e){return nMe(t,e)}):void 0}var lMe=[oMe,sMe,aMe];function cMe(t){return typeof t=="function"?gee(t):void 0}function uMe(t){return t?void 0:E9(function(){return{}})}var fMe=[cMe,uMe];function dMe(t,e,r){return vt({},r,{},t,{},e)}function hMe(t){return function(r,n){n.displayName;var i=n.pure,o=n.areMergedPropsEqual,a=!1,s;return function(u,p,m){var v=t(u,p,m);return a?(!i||!o(v,s))&&(s=v):(a=!0,s=v),s}}}function pMe(t){return typeof t=="function"?hMe(t):void 0}function mMe(t){return t?void 0:function(){return dMe}}var gMe=[pMe,mMe];function vMe(t,e,r,n){return function(o,a){return r(t(o,a),e(n,a),a)}}function yMe(t,e,r,n,i){var o=i.areStatesEqual,a=i.areOwnPropsEqual,s=i.areStatePropsEqual,l=!1,u,p,m,v,x;function y(T,A){return u=T,p=A,m=t(u,p),v=e(n,p),x=r(m,v,p),l=!0,x}function _(){return m=t(u,p),e.dependsOnOwnProps&&(v=e(n,p)),x=r(m,v,p),x}function w(){return t.dependsOnOwnProps&&(m=t(u,p)),e.dependsOnOwnProps&&(v=e(n,p)),x=r(m,v,p),x}function C(){var T=t(u,p),A=!s(T,m);return m=T,A&&(x=r(m,v,p)),x}function E(T,A){var k=!a(A,p),X=!o(T,u);return u=T,p=A,k&&X?_():k?w():X?C():x}return function(A,k){return l?E(A,k):y(A,k)}}function xMe(t,e){var r=e.initMapStateToProps,n=e.initMapDispatchToProps,i=e.initMergeProps,o=sf(e,["initMapStateToProps","initMapDispatchToProps","initMergeProps"]),a=r(t,o),s=n(t,o),l=i(t,o),u=o.pure?yMe:vMe;return u(a,s,l,t,o)}function S9(t,e,r){for(var n=e.length-1;n>=0;n--){var i=e[n](t);if(i)return i}return function(o,a){throw new Error("Invalid value of type "+typeof t+" for "+r+" argument when connecting component "+a.wrappedComponentName+".")}}function _Me(t,e){return t===e}function bMe(t){var e=t===void 0?{}:t,r=e.connectHOC,n=r===void 0?JIe:r,i=e.mapStateToPropsFactories,o=i===void 0?fMe:i,a=e.mapDispatchToPropsFactories,s=a===void 0?lMe:a,l=e.mergePropsFactories,u=l===void 0?gMe:l,p=e.selectorFactory,m=p===void 0?xMe:p;return function(x,y,_,w){w===void 0&&(w={});var C=w,E=C.pure,T=E===void 0?!0:E,A=C.areStatesEqual,k=A===void 0?_Me:A,X=C.areOwnPropsEqual,Z=X===void 0?w9:X,W=C.areStatePropsEqual,D=W===void 0?w9:W,H=C.areMergedPropsEqual,N=H===void 0?w9:H,j=sf(C,["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"]),$=S9(x,o,"mapStateToProps"),z=S9(y,s,"mapDispatchToProps"),O=S9(_,u,"mergeProps");return n(m,vt({methodName:"connect",getDisplayName:function(G){return"Connect("+G+")"},shouldHandleStateChanges:Boolean(x),initMapStateToProps:$,initMapDispatchToProps:z,initMergeProps:O,pure:T,areStatesEqual:k,areOwnPropsEqual:Z,areStatePropsEqual:D,areMergedPropsEqual:N},j))}}var KAt=bMe();function vee(){var t=Y.exports.useContext(vy);return t}function yee(t){t===void 0&&(t=vy);var e=t===vy?vee:function(){return Y.exports.useContext(t)};return function(){var n=e(),i=n.store;return i}}var wMe=yee();function CMe(t){t===void 0&&(t=vy);var e=t===vy?wMe:yee(t);return function(){var n=e();return n.dispatch}}var ZAt=CMe(),EMe=function(e,r){return e===r};function SMe(t,e,r,n){var i=Y.exports.useReducer(function(m){return m+1},0),o=i[1],a=Y.exports.useMemo(function(){return new _9(r,n)},[r,n]),s=Y.exports.useRef(),l=Y.exports.useRef(),u=Y.exports.useRef(),p;try{t!==l.current||s.current?p=t(r.getState()):p=u.current}catch(m){throw s.current&&(m.message+=` The error may be correlated with this previous error: `+s.current.stack+` `),m}return b9(function(){l.current=t,u.current=p,s.current=void 0}),b9(function(){function m(){try{var v=l.current(r.getState());if(e(v,u.current))return;u.current=v}catch(x){s.current=x}o({})}return a.onStateChange=m,a.trySubscribe(),m(),function(){return a.tryUnsubscribe()}},[r,a]),p}function TMe(t){t===void 0&&(t=vy);var e=t===vy?vee:function(){return Y.exports.useContext(t)};return function(n,i){i===void 0&&(i=EMe);var o=e(),a=o.store,s=o.subscription;return SMe(n,i,a,s)}}var QAt=TMe();NIe(Wa.exports.unstable_batchedUpdates);function PMe(t,e,r,n){var i=-1,o=t==null?0:t.length;for(n&&o&&(r=t[++i]);++i<o;)r=e(r,t[i],i,t);return r}var IMe=PMe;function MMe(t){return function(e,r,n){for(var i=-1,o=Object(e),a=n(e),s=a.length;s--;){var l=a[t?s:++i];if(r(o[l],l,o)===!1)break}return e}}var AMe=MMe,RMe=AMe,kMe=RMe(),xee=kMe;function OMe(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}var LMe=OMe,DMe=typeof xl=="object"&&xl&&xl.Object===Object&&xl,_ee=DMe,NMe=_ee,$Me=typeof self=="object"&&self&&self.Object===Object&&self,FMe=NMe||$Me||Function("return this")(),Cm=FMe,zMe=Cm,BMe=zMe.Symbol,eC=BMe,bee=eC,wee=Object.prototype,jMe=wee.hasOwnProperty,UMe=wee.toString,qP=bee?bee.toStringTag:void 0;function VMe(t){var e=jMe.call(t,qP),r=t[qP];try{t[qP]=void 0;var n=!0}catch{}var i=UMe.call(t);return n&&(e?t[qP]=r:delete t[qP]),i}var HMe=VMe,WMe=Object.prototype,GMe=WMe.toString;function qMe(t){return GMe.call(t)}var XMe=qMe,Cee=eC,YMe=HMe,KMe=XMe,ZMe="[object Null]",QMe="[object Undefined]",Eee=Cee?Cee.toStringTag:void 0;function JMe(t){return t==null?t===void 0?QMe:ZMe:Eee&&Eee in Object(t)?YMe(t):KMe(t)}var j1=JMe;function eAe(t){return t!=null&&typeof t=="object"}var Ug=eAe,tAe=j1,rAe=Ug,nAe="[object Arguments]";function iAe(t){return rAe(t)&&tAe(t)==nAe}var oAe=iAe,See=oAe,sAe=Ug,Tee=Object.prototype,aAe=Tee.hasOwnProperty,lAe=Tee.propertyIsEnumerable,cAe=See(function(){return arguments}())?See:function(t){return sAe(t)&&aAe.call(t,"callee")&&!lAe.call(t,"callee")},LL=cAe,uAe=Array.isArray,Xf=uAe,tC={exports:{}};function fAe(){return!1}var dAe=fAe;(function(t,e){var r=Cm,n=dAe,i=e&&!e.nodeType&&e,o=i&&!0&&t&&!t.nodeType&&t,a=o&&o.exports===i,s=a?r.Buffer:void 0,l=s?s.isBuffer:void 0,u=l||n;t.exports=u})(tC,tC.exports);var hAe=9007199254740991,pAe=/^(?:0|[1-9]\d*)$/;function mAe(t,e){var r=typeof t;return e=e==null?hAe:e,!!e&&(r=="number"||r!="symbol"&&pAe.test(t))&&t>-1&&t%1==0&&t<e}var DL=mAe,gAe=9007199254740991;function vAe(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=gAe}var T9=vAe,yAe=j1,xAe=T9,_Ae=Ug,bAe="[object Arguments]",wAe="[object Array]",CAe="[object Boolean]",EAe="[object Date]",SAe="[object Error]",TAe="[object Function]",PAe="[object Map]",IAe="[object Number]",MAe="[object Object]",AAe="[object RegExp]",RAe="[object Set]",kAe="[object String]",OAe="[object WeakMap]",LAe="[object ArrayBuffer]",DAe="[object DataView]",NAe="[object Float32Array]",$Ae="[object Float64Array]",FAe="[object Int8Array]",zAe="[object Int16Array]",BAe="[object Int32Array]",jAe="[object Uint8Array]",UAe="[object Uint8ClampedArray]",VAe="[object Uint16Array]",HAe="[object Uint32Array]",ma={};ma[NAe]=ma[$Ae]=ma[FAe]=ma[zAe]=ma[BAe]=ma[jAe]=ma[UAe]=ma[VAe]=ma[HAe]=!0;ma[bAe]=ma[wAe]=ma[LAe]=ma[CAe]=ma[DAe]=ma[EAe]=ma[SAe]=ma[TAe]=ma[PAe]=ma[IAe]=ma[MAe]=ma[AAe]=ma[RAe]=ma[kAe]=ma[OAe]=!1;function WAe(t){return _Ae(t)&&xAe(t.length)&&!!ma[yAe(t)]}var GAe=WAe;function qAe(t){return function(e){return t(e)}}var NL=qAe,XP={exports:{}};(function(t,e){var r=_ee,n=e&&!e.nodeType&&e,i=n&&!0&&t&&!t.nodeType&&t,o=i&&i.exports===n,a=o&&r.process,s=function(){try{var l=i&&i.require&&i.require("util").types;return l||a&&a.binding&&a.binding("util")}catch{}}();t.exports=s})(XP,XP.exports);var XAe=GAe,YAe=NL,Pee=XP.exports,Iee=Pee&&Pee.isTypedArray,KAe=Iee?YAe(Iee):XAe,P9=KAe,ZAe=LMe,QAe=LL,JAe=Xf,eRe=tC.exports,tRe=DL,rRe=P9,nRe=Object.prototype,iRe=nRe.hasOwnProperty;function oRe(t,e){var r=JAe(t),n=!r&&QAe(t),i=!r&&!n&&eRe(t),o=!r&&!n&&!i&&rRe(t),a=r||n||i||o,s=a?ZAe(t.length,String):[],l=s.length;for(var u in t)(e||iRe.call(t,u))&&!(a&&(u=="length"||i&&(u=="offset"||u=="parent")||o&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||tRe(u,l)))&&s.push(u);return s}var Mee=oRe,sRe=Object.prototype;function aRe(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||sRe;return t===r}var $L=aRe;function lRe(t,e){return function(r){return t(e(r))}}var Aee=lRe,cRe=Aee,uRe=cRe(Object.keys,Object),fRe=uRe,dRe=$L,hRe=fRe,pRe=Object.prototype,mRe=pRe.hasOwnProperty;function gRe(t){if(!dRe(t))return hRe(t);var e=[];for(var r in Object(t))mRe.call(t,r)&&r!="constructor"&&e.push(r);return e}var vRe=gRe;function yRe(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var Yf=yRe,xRe=j1,_Re=Yf,bRe="[object AsyncFunction]",wRe="[object Function]",CRe="[object GeneratorFunction]",ERe="[object Proxy]";function SRe(t){if(!_Re(t))return!1;var e=xRe(t);return e==wRe||e==CRe||e==bRe||e==ERe}var I9=SRe,TRe=I9,PRe=T9;function IRe(t){return t!=null&&PRe(t.length)&&!TRe(t)}var vx=IRe,MRe=Mee,ARe=vRe,RRe=vx;function kRe(t){return RRe(t)?MRe(t):ARe(t)}var yx=kRe,ORe=xee,LRe=yx;function DRe(t,e){return t&&ORe(t,e,LRe)}var NRe=DRe,$Re=vx;function FRe(t,e){return function(r,n){if(r==null)return r;if(!$Re(r))return t(r,n);for(var i=r.length,o=e?i:-1,a=Object(r);(e?o--:++o<i)&&n(a[o],o,a)!==!1;);return r}}var zRe=FRe,BRe=NRe,jRe=zRe,URe=jRe(BRe),M9=URe;function VRe(){this.__data__=[],this.size=0}var HRe=VRe;function WRe(t,e){return t===e||t!==t&&e!==e}var U1=WRe,GRe=U1;function qRe(t,e){for(var r=t.length;r--;)if(GRe(t[r][0],e))return r;return-1}var FL=qRe,XRe=FL,YRe=Array.prototype,KRe=YRe.splice;function ZRe(t){var e=this.__data__,r=XRe(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():KRe.call(e,r,1),--this.size,!0}var QRe=ZRe,JRe=FL;function eke(t){var e=this.__data__,r=JRe(e,t);return r<0?void 0:e[r][1]}var tke=eke,rke=FL;function nke(t){return rke(this.__data__,t)>-1}var ike=nke,oke=FL;function ske(t,e){var r=this.__data__,n=oke(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}var ake=ske,lke=HRe,cke=QRe,uke=tke,fke=ike,dke=ake;function rC(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}rC.prototype.clear=lke;rC.prototype.delete=cke;rC.prototype.get=uke;rC.prototype.has=fke;rC.prototype.set=dke;var zL=rC,hke=zL;function pke(){this.__data__=new hke,this.size=0}var mke=pke;function gke(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}var vke=gke;function yke(t){return this.__data__.get(t)}var xke=yke;function _ke(t){return this.__data__.has(t)}var bke=_ke,wke=Cm,Cke=wke["__core-js_shared__"],Eke=Cke,A9=Eke,Ree=function(){var t=/[^.]+$/.exec(A9&&A9.keys&&A9.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function Ske(t){return!!Ree&&Ree in t}var Tke=Ske,Pke=Function.prototype,Ike=Pke.toString;function Mke(t){if(t!=null){try{return Ike.call(t)}catch{}try{return t+""}catch{}}return""}var kee=Mke,Ake=I9,Rke=Tke,kke=Yf,Oke=kee,Lke=/[\\^$.*+?()[\]{}|]/g,Dke=/^\[object .+?Constructor\]$/,Nke=Function.prototype,$ke=Object.prototype,Fke=Nke.toString,zke=$ke.hasOwnProperty,Bke=RegExp("^"+Fke.call(zke).replace(Lke,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function jke(t){if(!kke(t)||Rke(t))return!1;var e=Ake(t)?Bke:Dke;return e.test(Oke(t))}var Uke=jke;function Vke(t,e){return t==null?void 0:t[e]}var Hke=Vke,Wke=Uke,Gke=Hke;function qke(t,e){var r=Gke(t,e);return Wke(r)?r:void 0}var V1=qke,Xke=V1,Yke=Cm,Kke=Xke(Yke,"Map"),R9=Kke,Zke=V1,Qke=Zke(Object,"create"),BL=Qke,Oee=BL;function Jke(){this.__data__=Oee?Oee(null):{},this.size=0}var eOe=Jke;function tOe(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var rOe=tOe,nOe=BL,iOe="__lodash_hash_undefined__",oOe=Object.prototype,sOe=oOe.hasOwnProperty;function aOe(t){var e=this.__data__;if(nOe){var r=e[t];return r===iOe?void 0:r}return sOe.call(e,t)?e[t]:void 0}var lOe=aOe,cOe=BL,uOe=Object.prototype,fOe=uOe.hasOwnProperty;function dOe(t){var e=this.__data__;return cOe?e[t]!==void 0:fOe.call(e,t)}var hOe=dOe,pOe=BL,mOe="__lodash_hash_undefined__";function gOe(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=pOe&&e===void 0?mOe:e,this}var vOe=gOe,yOe=eOe,xOe=rOe,_Oe=lOe,bOe=hOe,wOe=vOe;function nC(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}nC.prototype.clear=yOe;nC.prototype.delete=xOe;nC.prototype.get=_Oe;nC.prototype.has=bOe;nC.prototype.set=wOe;var COe=nC,Lee=COe,EOe=zL,SOe=R9;function TOe(){this.size=0,this.__data__={hash:new Lee,map:new(SOe||EOe),string:new Lee}}var POe=TOe;function IOe(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}var MOe=IOe,AOe=MOe;function ROe(t,e){var r=t.__data__;return AOe(e)?r[typeof e=="string"?"string":"hash"]:r.map}var jL=ROe,kOe=jL;function OOe(t){var e=kOe(this,t).delete(t);return this.size-=e?1:0,e}var LOe=OOe,DOe=jL;function NOe(t){return DOe(this,t).get(t)}var $Oe=NOe,FOe=jL;function zOe(t){return FOe(this,t).has(t)}var BOe=zOe,jOe=jL;function UOe(t,e){var r=jOe(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}var VOe=UOe,HOe=POe,WOe=LOe,GOe=$Oe,qOe=BOe,XOe=VOe;function iC(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}iC.prototype.clear=HOe;iC.prototype.delete=WOe;iC.prototype.get=GOe;iC.prototype.has=qOe;iC.prototype.set=XOe;var k9=iC,YOe=zL,KOe=R9,ZOe=k9,QOe=200;function JOe(t,e){var r=this.__data__;if(r instanceof YOe){var n=r.__data__;if(!KOe||n.length<QOe-1)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new ZOe(n)}return r.set(t,e),this.size=r.size,this}var eLe=JOe,tLe=zL,rLe=mke,nLe=vke,iLe=xke,oLe=bke,sLe=eLe;function oC(t){var e=this.__data__=new tLe(t);this.size=e.size}oC.prototype.clear=rLe;oC.prototype.delete=nLe;oC.prototype.get=iLe;oC.prototype.has=oLe;oC.prototype.set=sLe;var UL=oC,aLe="__lodash_hash_undefined__";function lLe(t){return this.__data__.set(t,aLe),this}var cLe=lLe;function uLe(t){return this.__data__.has(t)}var fLe=uLe,dLe=k9,hLe=cLe,pLe=fLe;function VL(t){var e=-1,r=t==null?0:t.length;for(this.__data__=new dLe;++e<r;)this.add(t[e])}VL.prototype.add=VL.prototype.push=hLe;VL.prototype.has=pLe;var mLe=VL;function gLe(t,e){for(var r=-1,n=t==null?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1}var vLe=gLe;function yLe(t,e){return t.has(e)}var xLe=yLe,_Le=mLe,bLe=vLe,wLe=xLe,CLe=1,ELe=2;function SLe(t,e,r,n,i,o){var a=r&CLe,s=t.length,l=e.length;if(s!=l&&!(a&&l>s))return!1;var u=o.get(t),p=o.get(e);if(u&&p)return u==e&&p==t;var m=-1,v=!0,x=r&ELe?new _Le:void 0;for(o.set(t,e),o.set(e,t);++m<s;){var y=t[m],_=e[m];if(n)var w=a?n(_,y,m,e,t,o):n(y,_,m,t,e,o);if(w!==void 0){if(w)continue;v=!1;break}if(x){if(!bLe(e,function(C,E){if(!wLe(x,E)&&(y===C||i(y,C,r,n,o)))return x.push(E)})){v=!1;break}}else if(!(y===_||i(y,_,r,n,o))){v=!1;break}}return o.delete(t),o.delete(e),v}var Dee=SLe,TLe=Cm,PLe=TLe.Uint8Array,Nee=PLe;function ILe(t){var e=-1,r=Array(t.size);return t.forEach(function(n,i){r[++e]=[i,n]}),r}var MLe=ILe;function ALe(t){var e=-1,r=Array(t.size);return t.forEach(function(n){r[++e]=n}),r}var RLe=ALe,$ee=eC,Fee=Nee,kLe=U1,OLe=Dee,LLe=MLe,DLe=RLe,NLe=1,$Le=2,FLe="[object Boolean]",zLe="[object Date]",BLe="[object Error]",jLe="[object Map]",ULe="[object Number]",VLe="[object RegExp]",HLe="[object Set]",WLe="[object String]",GLe="[object Symbol]",qLe="[object ArrayBuffer]",XLe="[object DataView]",zee=$ee?$ee.prototype:void 0,O9=zee?zee.valueOf:void 0;function YLe(t,e,r,n,i,o,a){switch(r){case XLe:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case qLe:return!(t.byteLength!=e.byteLength||!o(new Fee(t),new Fee(e)));case FLe:case zLe:case ULe:return kLe(+t,+e);case BLe:return t.name==e.name&&t.message==e.message;case VLe:case WLe:return t==e+"";case jLe:var s=LLe;case HLe:var l=n&NLe;if(s||(s=DLe),t.size!=e.size&&!l)return!1;var u=a.get(t);if(u)return u==e;n|=$Le,a.set(t,e);var p=OLe(s(t),s(e),n,i,o,a);return a.delete(t),p;case GLe:if(O9)return O9.call(t)==O9.call(e)}return!1}var KLe=YLe;function ZLe(t,e){for(var r=-1,n=e.length,i=t.length;++r<n;)t[i+r]=e[r];return t}var L9=ZLe,QLe=L9,JLe=Xf;function eDe(t,e,r){var n=e(t);return JLe(t)?n:QLe(n,r(t))}var Bee=eDe;function tDe(t,e){for(var r=-1,n=t==null?0:t.length,i=0,o=[];++r<n;){var a=t[r];e(a,r,t)&&(o[i++]=a)}return o}var rDe=tDe;function nDe(){return[]}var jee=nDe,iDe=rDe,oDe=jee,sDe=Object.prototype,aDe=sDe.propertyIsEnumerable,Uee=Object.getOwnPropertySymbols,lDe=Uee?function(t){return t==null?[]:(t=Object(t),iDe(Uee(t),function(e){return aDe.call(t,e)}))}:oDe,D9=lDe,cDe=Bee,uDe=D9,fDe=yx;function dDe(t){return cDe(t,fDe,uDe)}var Vee=dDe,Hee=Vee,hDe=1,pDe=Object.prototype,mDe=pDe.hasOwnProperty;function gDe(t,e,r,n,i,o){var a=r&hDe,s=Hee(t),l=s.length,u=Hee(e),p=u.length;if(l!=p&&!a)return!1;for(var m=l;m--;){var v=s[m];if(!(a?v in e:mDe.call(e,v)))return!1}var x=o.get(t),y=o.get(e);if(x&&y)return x==e&&y==t;var _=!0;o.set(t,e),o.set(e,t);for(var w=a;++m<l;){v=s[m];var C=t[v],E=e[v];if(n)var T=a?n(E,C,v,e,t,o):n(C,E,v,t,e,o);if(!(T===void 0?C===E||i(C,E,r,n,o):T)){_=!1;break}w||(w=v=="constructor")}if(_&&!w){var A=t.constructor,k=e.constructor;A!=k&&"constructor"in t&&"constructor"in e&&!(typeof A=="function"&&A instanceof A&&typeof k=="function"&&k instanceof k)&&(_=!1)}return o.delete(t),o.delete(e),_}var vDe=gDe,yDe=V1,xDe=Cm,_De=yDe(xDe,"DataView"),bDe=_De,wDe=V1,CDe=Cm,EDe=wDe(CDe,"Promise"),SDe=EDe,TDe=V1,PDe=Cm,IDe=TDe(PDe,"Set"),MDe=IDe,ADe=V1,RDe=Cm,kDe=ADe(RDe,"WeakMap"),ODe=kDe,N9=bDe,$9=R9,F9=SDe,z9=MDe,B9=ODe,Wee=j1,sC=kee,Gee="[object Map]",LDe="[object Object]",qee="[object Promise]",Xee="[object Set]",Yee="[object WeakMap]",Kee="[object DataView]",DDe=sC(N9),NDe=sC($9),$De=sC(F9),FDe=sC(z9),zDe=sC(B9),H1=Wee;(N9&&H1(new N9(new ArrayBuffer(1)))!=Kee||$9&&H1(new $9)!=Gee||F9&&H1(F9.resolve())!=qee||z9&&H1(new z9)!=Xee||B9&&H1(new B9)!=Yee)&&(H1=function(t){var e=Wee(t),r=e==LDe?t.constructor:void 0,n=r?sC(r):"";if(n)switch(n){case DDe:return Kee;case NDe:return Gee;case $De:return qee;case FDe:return Xee;case zDe:return Yee}return e});var HL=H1,j9=UL,BDe=Dee,jDe=KLe,UDe=vDe,Zee=HL,Qee=Xf,Jee=tC.exports,VDe=P9,HDe=1,ete="[object Arguments]",tte="[object Array]",WL="[object Object]",WDe=Object.prototype,rte=WDe.hasOwnProperty;function GDe(t,e,r,n,i,o){var a=Qee(t),s=Qee(e),l=a?tte:Zee(t),u=s?tte:Zee(e);l=l==ete?WL:l,u=u==ete?WL:u;var p=l==WL,m=u==WL,v=l==u;if(v&&Jee(t)){if(!Jee(e))return!1;a=!0,p=!1}if(v&&!p)return o||(o=new j9),a||VDe(t)?BDe(t,e,r,n,i,o):jDe(t,e,l,r,n,i,o);if(!(r&HDe)){var x=p&&rte.call(t,"__wrapped__"),y=m&&rte.call(e,"__wrapped__");if(x||y){var _=x?t.value():t,w=y?e.value():e;return o||(o=new j9),i(_,w,r,n,o)}}return v?(o||(o=new j9),UDe(t,e,r,n,i,o)):!1}var qDe=GDe,XDe=qDe,nte=Ug;function ite(t,e,r,n,i){return t===e?!0:t==null||e==null||!nte(t)&&!nte(e)?t!==t&&e!==e:XDe(t,e,r,n,ite,i)}var U9=ite,YDe=UL,KDe=U9,ZDe=1,QDe=2;function JDe(t,e,r,n){var i=r.length,o=i,a=!n;if(t==null)return!o;for(t=Object(t);i--;){var s=r[i];if(a&&s[2]?s[1]!==t[s[0]]:!(s[0]in t))return!1}for(;++i<o;){s=r[i];var l=s[0],u=t[l],p=s[1];if(a&&s[2]){if(u===void 0&&!(l in t))return!1}else{var m=new YDe;if(n)var v=n(u,p,l,t,e,m);if(!(v===void 0?KDe(p,u,ZDe|QDe,n,m):v))return!1}}return!0}var e3e=JDe,t3e=Yf;function r3e(t){return t===t&&!t3e(t)}var ote=r3e,n3e=ote,i3e=yx;function o3e(t){for(var e=i3e(t),r=e.length;r--;){var n=e[r],i=t[n];e[r]=[n,i,n3e(i)]}return e}var s3e=o3e;function a3e(t,e){return function(r){return r==null?!1:r[t]===e&&(e!==void 0||t in Object(r))}}var ste=a3e,l3e=e3e,c3e=s3e,u3e=ste;function f3e(t){var e=c3e(t);return e.length==1&&e[0][2]?u3e(e[0][0],e[0][1]):function(r){return r===t||l3e(r,t,e)}}var d3e=f3e,h3e=j1,p3e=Ug,m3e="[object Symbol]";function g3e(t){return typeof t=="symbol"||p3e(t)&&h3e(t)==m3e}var YP=g3e,v3e=Xf,y3e=YP,x3e=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,_3e=/^\w*$/;function b3e(t,e){if(v3e(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||y3e(t)?!0:_3e.test(t)||!x3e.test(t)||e!=null&&t in Object(e)}var V9=b3e,ate=k9,w3e="Expected a function";function H9(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(w3e);var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var a=t.apply(this,n);return r.cache=o.set(i,a)||o,a};return r.cache=new(H9.Cache||ate),r}H9.Cache=ate;var C3e=H9,E3e=C3e,S3e=500;function T3e(t){var e=E3e(t,function(n){return r.size===S3e&&r.clear(),n}),r=e.cache;return e}var P3e=T3e,I3e=P3e,M3e=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,A3e=/\\(\\)?/g,R3e=I3e(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(M3e,function(r,n,i,o){e.push(i?o.replace(A3e,"$1"):n||r)}),e}),k3e=R3e;function O3e(t,e){for(var r=-1,n=t==null?0:t.length,i=Array(n);++r<n;)i[r]=e(t[r],r,t);return i}var KP=O3e,lte=eC,L3e=KP,D3e=Xf,N3e=YP,$3e=1/0,cte=lte?lte.prototype:void 0,ute=cte?cte.toString:void 0;function fte(t){if(typeof t=="string")return t;if(D3e(t))return L3e(t,fte)+"";if(N3e(t))return ute?ute.call(t):"";var e=t+"";return e=="0"&&1/t==-$3e?"-0":e}var F3e=fte,z3e=F3e;function B3e(t){return t==null?"":z3e(t)}var GL=B3e,j3e=Xf,U3e=V9,V3e=k3e,H3e=GL;function W3e(t,e){return j3e(t)?t:U3e(t,e)?[t]:V3e(H3e(t))}var aC=W3e,G3e=YP,q3e=1/0;function X3e(t){if(typeof t=="string"||G3e(t))return t;var e=t+"";return e=="0"&&1/t==-q3e?"-0":e}var lC=X3e,Y3e=aC,K3e=lC;function Z3e(t,e){e=Y3e(e,t);for(var r=0,n=e.length;t!=null&&r<n;)t=t[K3e(e[r++])];return r&&r==n?t:void 0}var ZP=Z3e,Q3e=ZP;function J3e(t,e,r){var n=t==null?void 0:Q3e(t,e);return n===void 0?r:n}var eNe=J3e;function tNe(t,e){return t!=null&&e in Object(t)}var rNe=tNe,nNe=aC,iNe=LL,oNe=Xf,sNe=DL,aNe=T9,lNe=lC;function cNe(t,e,r){e=nNe(e,t);for(var n=-1,i=e.length,o=!1;++n<i;){var a=lNe(e[n]);if(!(o=t!=null&&r(t,a)))break;t=t[a]}return o||++n!=i?o:(i=t==null?0:t.length,!!i&&aNe(i)&&sNe(a,i)&&(oNe(t)||iNe(t)))}var dte=cNe,uNe=rNe,fNe=dte;function dNe(t,e){return t!=null&&fNe(t,e,uNe)}var hNe=dNe,pNe=U9,mNe=eNe,gNe=hNe,vNe=V9,yNe=ote,xNe=ste,_Ne=lC,bNe=1,wNe=2;function CNe(t,e){return vNe(t)&&yNe(e)?xNe(_Ne(t),e):function(r){var n=mNe(r,t);return n===void 0&&n===e?gNe(r,t):pNe(e,n,bNe|wNe)}}var ENe=CNe;function SNe(t){return t}var qL=SNe;function TNe(t){return function(e){return e==null?void 0:e[t]}}var PNe=TNe,INe=ZP;function MNe(t){return function(e){return INe(e,t)}}var ANe=MNe,RNe=PNe,kNe=ANe,ONe=V9,LNe=lC;function DNe(t){return ONe(t)?RNe(LNe(t)):kNe(t)}var NNe=DNe,$Ne=d3e,FNe=ENe,zNe=qL,BNe=Xf,jNe=NNe;function UNe(t){return typeof t=="function"?t:t==null?zNe:typeof t=="object"?BNe(t)?FNe(t[0],t[1]):$Ne(t):jNe(t)}var W1=UNe;function VNe(t,e,r,n,i){return i(t,function(o,a,s){r=n?(n=!1,o):e(r,o,a,s)}),r}var HNe=VNe,WNe=IMe,GNe=M9,qNe=W1,XNe=HNe,YNe=Xf;function KNe(t,e,r){var n=YNe(t)?WNe:XNe,i=arguments.length<3;return n(t,qNe(e),r,i,GNe)}var JAt=KNe,ZNe=/\s/;function QNe(t){for(var e=t.length;e--&&ZNe.test(t.charAt(e)););return e}var JNe=QNe,e5e=JNe,t5e=/^\s+/;function r5e(t){return t&&t.slice(0,e5e(t)+1).replace(t5e,"")}var n5e=r5e,i5e=n5e,hte=Yf,o5e=YP,pte=0/0,s5e=/^[-+]0x[0-9a-f]+$/i,a5e=/^0b[01]+$/i,l5e=/^0o[0-7]+$/i,c5e=parseInt;function u5e(t){if(typeof t=="number")return t;if(o5e(t))return pte;if(hte(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=hte(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=i5e(t);var r=a5e.test(t);return r||l5e.test(t)?c5e(t.slice(2),r?2:8):s5e.test(t)?pte:+t}var mte=u5e,f5e=mte,gte=1/0,d5e=17976931348623157e292;function h5e(t){if(!t)return t===0?t:0;if(t=f5e(t),t===gte||t===-gte){var e=t<0?-1:1;return e*d5e}return t===t?t:0}var vte=h5e,p5e=vte;function m5e(t){var e=p5e(t),r=e%1;return e===e?r?e-r:e:0}var yte=m5e,g5e=yte,v5e="Expected a function";function y5e(t,e){var r;if(typeof e!="function")throw new TypeError(v5e);return t=g5e(t),function(){return--t>0&&(r=e.apply(this,arguments)),t<=1&&(e=void 0),r}}var x5e=y5e,_5e=x5e;function b5e(t){return _5e(2,t)}var eRt=b5e,w5e=V1,C5e=function(){try{var t=w5e(Object,"defineProperty");return t({},"",{}),t}catch{}}(),xte=C5e,_te=xte;function E5e(t,e,r){e=="__proto__"&&_te?_te(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}var XL=E5e,S5e=XL,T5e=U1;function P5e(t,e,r){(r!==void 0&&!T5e(t[e],r)||r===void 0&&!(e in t))&&S5e(t,e,r)}var bte=P5e,YL={exports:{}};(function(t,e){var r=Cm,n=e&&!e.nodeType&&e,i=n&&!0&&t&&!t.nodeType&&t,o=i&&i.exports===n,a=o?r.Buffer:void 0,s=a?a.allocUnsafe:void 0;function l(u,p){if(p)return u.slice();var m=u.length,v=s?s(m):new u.constructor(m);return u.copy(v),v}t.exports=l})(YL,YL.exports);var wte=Nee;function I5e(t){var e=new t.constructor(t.byteLength);return new wte(e).set(new wte(t)),e}var W9=I5e,M5e=W9;function A5e(t,e){var r=e?M5e(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}var Cte=A5e;function R5e(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}var Ete=R5e,k5e=Yf,Ste=Object.create,O5e=function(){function t(){}return function(e){if(!k5e(e))return{};if(Ste)return Ste(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}(),L5e=O5e,D5e=Aee,N5e=D5e(Object.getPrototypeOf,Object),G9=N5e,$5e=L5e,F5e=G9,z5e=$L;function B5e(t){return typeof t.constructor=="function"&&!z5e(t)?$5e(F5e(t)):{}}var Tte=B5e,j5e=vx,U5e=Ug;function V5e(t){return U5e(t)&&j5e(t)}var H5e=V5e,W5e=j1,G5e=G9,q5e=Ug,X5e="[object Object]",Y5e=Function.prototype,K5e=Object.prototype,Pte=Y5e.toString,Z5e=K5e.hasOwnProperty,Q5e=Pte.call(Object);function J5e(t){if(!q5e(t)||W5e(t)!=X5e)return!1;var e=G5e(t);if(e===null)return!0;var r=Z5e.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&Pte.call(r)==Q5e}var q9=J5e;function e$e(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}var Ite=e$e,t$e=XL,r$e=U1,n$e=Object.prototype,i$e=n$e.hasOwnProperty;function o$e(t,e,r){var n=t[e];(!(i$e.call(t,e)&&r$e(n,r))||r===void 0&&!(e in t))&&t$e(t,e,r)}var KL=o$e,s$e=KL,a$e=XL;function l$e(t,e,r,n){var i=!r;r||(r={});for(var o=-1,a=e.length;++o<a;){var s=e[o],l=n?n(r[s],t[s],s,r,t):void 0;l===void 0&&(l=t[s]),i?a$e(r,s,l):s$e(r,s,l)}return r}var xx=l$e;function c$e(t){var e=[];if(t!=null)for(var r in Object(t))e.push(r);return e}var u$e=c$e,f$e=Yf,d$e=$L,h$e=u$e,p$e=Object.prototype,m$e=p$e.hasOwnProperty;function g$e(t){if(!f$e(t))return h$e(t);var e=d$e(t),r=[];for(var n in t)n=="constructor"&&(e||!m$e.call(t,n))||r.push(n);return r}var v$e=g$e,y$e=Mee,x$e=v$e,_$e=vx;function b$e(t){return _$e(t)?y$e(t,!0):x$e(t)}var G1=b$e,w$e=xx,C$e=G1;function E$e(t){return w$e(t,C$e(t))}var S$e=E$e,Mte=bte,T$e=YL.exports,P$e=Cte,I$e=Ete,M$e=Tte,Ate=LL,Rte=Xf,A$e=H5e,R$e=tC.exports,k$e=I9,O$e=Yf,L$e=q9,D$e=P9,kte=Ite,N$e=S$e;function $$e(t,e,r,n,i,o,a){var s=kte(t,r),l=kte(e,r),u=a.get(l);if(u){Mte(t,r,u);return}var p=o?o(s,l,r+"",t,e,a):void 0,m=p===void 0;if(m){var v=Rte(l),x=!v&&R$e(l),y=!v&&!x&&D$e(l);p=l,v||x||y?Rte(s)?p=s:A$e(s)?p=I$e(s):x?(m=!1,p=T$e(l,!0)):y?(m=!1,p=P$e(l,!0)):p=[]:L$e(l)||Ate(l)?(p=s,Ate(s)?p=N$e(s):(!O$e(s)||k$e(s))&&(p=M$e(l))):m=!1}m&&(a.set(l,p),i(p,l,n,o,a),a.delete(l)),Mte(t,r,p)}var F$e=$$e,z$e=UL,B$e=bte,j$e=xee,U$e=F$e,V$e=Yf,H$e=G1,W$e=Ite;function Ote(t,e,r,n,i){t!==e&&j$e(e,function(o,a){if(i||(i=new z$e),V$e(o))U$e(t,e,a,r,Ote,n,i);else{var s=n?n(W$e(t,a),o,a+"",t,e,i):void 0;s===void 0&&(s=o),B$e(t,a,s)}},H$e)}var X9=Ote;function G$e(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}var Y9=G$e,q$e=Y9,Lte=Math.max;function X$e(t,e,r){return e=Lte(e===void 0?t.length-1:e,0),function(){for(var n=arguments,i=-1,o=Lte(n.length-e,0),a=Array(o);++i<o;)a[i]=n[e+i];i=-1;for(var s=Array(e+1);++i<e;)s[i]=n[i];return s[e]=r(a),q$e(t,this,s)}}var Dte=X$e;function Y$e(t){return function(){return t}}var K$e=Y$e,Z$e=K$e,Nte=xte,Q$e=qL,J$e=Nte?function(t,e){return Nte(t,"toString",{configurable:!0,enumerable:!1,value:Z$e(e),writable:!0})}:Q$e,e4e=J$e,t4e=800,r4e=16,n4e=Date.now;function i4e(t){var e=0,r=0;return function(){var n=n4e(),i=r4e-(n-r);if(r=n,i>0){if(++e>=t4e)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var o4e=i4e,s4e=e4e,a4e=o4e,l4e=a4e(s4e),$te=l4e,c4e=qL,u4e=Dte,f4e=$te;function d4e(t,e){return f4e(u4e(t,e,c4e),t+"")}var cC=d4e,h4e=U1,p4e=vx,m4e=DL,g4e=Yf;function v4e(t,e,r){if(!g4e(r))return!1;var n=typeof e;return(n=="number"?p4e(r)&&m4e(e,r.length):n=="string"&&e in r)?h4e(r[e],t):!1}var QP=v4e,y4e=cC,x4e=QP;function _4e(t){return y4e(function(e,r){var n=-1,i=r.length,o=i>1?r[i-1]:void 0,a=i>2?r[2]:void 0;for(o=t.length>3&&typeof o=="function"?(i--,o):void 0,a&&x4e(r[0],r[1],a)&&(o=i<3?void 0:o,i=1),e=Object(e);++n<i;){var s=r[n];s&&t(e,s,n,o)}return e})}var ZL=_4e,b4e=X9,w4e=ZL,C4e=w4e(function(t,e,r){b4e(t,e,r)}),tRt=C4e,QL,E4e=new Uint8Array(16);function S4e(){if(!QL&&(QL=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!QL))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return QL(E4e)}var T4e=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function P4e(t){return typeof t=="string"&&T4e.test(t)}var Hc=[];for(var K9=0;K9<256;++K9)Hc.push((K9+256).toString(16).substr(1));function I4e(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=(Hc[t[e+0]]+Hc[t[e+1]]+Hc[t[e+2]]+Hc[t[e+3]]+"-"+Hc[t[e+4]]+Hc[t[e+5]]+"-"+Hc[t[e+6]]+Hc[t[e+7]]+"-"+Hc[t[e+8]]+Hc[t[e+9]]+"-"+Hc[t[e+10]]+Hc[t[e+11]]+Hc[t[e+12]]+Hc[t[e+13]]+Hc[t[e+14]]+Hc[t[e+15]]).toLowerCase();if(!P4e(r))throw TypeError("Stringified UUID is invalid");return r}function rRt(t,e,r){t=t||{};var n=t.random||(t.rng||S4e)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,e){r=r||0;for(var i=0;i<16;++i)e[r+i]=n[i];return e}return I4e(n)}var M4e={exports:{}};/** @license * * Copyright (C) 2012 K. Arthur Endsley (kaendsle@mtu.edu) * Michigan Tech Research Institute (MTRI) * 3600 Green Court, Suite 100, Ann Arbor, MI, 48105 * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. * */(function(t,e){(function(r,n){t.exports=n()})(xl,function(){var r,n,i;return i=function(o){if(o instanceof i)return o;if(!(this instanceof i))return new i(o);this._wrapped=o},r=function(o,a){return o.substring(0,a.length)===a},n=function(o,a){return o.substring(o.length-a.length)===a},i.delimiter=" ",i.isArray=function(o){return!!(o&&o.constructor===Array)},i.trim=function(o,a){for(a=a||" ";r(o,a);)o=o.substring(1);for(;n(o,a);)o=o.substring(0,o.length-1);return o},i.Wkt=function(o){this.delimiter=i.delimiter||" ",this.wrapVertices=!0,this.regExes={typeStr:/^\s*(\w+)\s*\(\s*(.*)\s*\)\s*$/,spaces:/\s+|\+/,numeric:/-*\d+(\.*\d+)?/,comma:/\s*,\s*/,parenComma:/\)\s*,\s*\(/,coord:/-*\d+\.*\d+ -*\d+\.*\d+/,doubleParenComma:/\)\s*\)\s*,\s*\(\s*\(/,ogcTypes:/^(multi)?(point|line|polygon|box)?(string)?$/i,crudeJson:/^{.*"(type|coordinates|geometries|features)":.*}$/},this._stripWhitespaceAndParens=function(a){var s=a.trim(),l=s.replace(/^\(?(.*?)\)?$/,"$1");return l},this.components=void 0,o&&typeof o=="string"?this.read(o):o&&typeof o!==void 0&&this.fromObject(o)},i.Wkt.prototype.isCollection=function(){switch(this.type.slice(0,5)){case"multi":return!0;case"polyg":return!0;default:return!1}},i.Wkt.prototype.sameCoords=function(o,a){return o.x===a.x&&o.y===a.y},i.Wkt.prototype.fromObject=function(o){var a;return o.hasOwnProperty("type")&&o.hasOwnProperty("coordinates")?a=this.fromJson(o):a=this.deconstruct.call(this,o),this.components=a.components,this.isRectangle=a.isRectangle||!1,this.type=a.type,this},i.Wkt.prototype.toObject=function(o){var a=this.construct[this.type].call(this,o);return typeof a=="object"&&!i.isArray(a)&&(a.properties=this.properties),a},i.Wkt.prototype.toString=function(o){return this.write()},i.Wkt.prototype.fromJson=function(o){var a,s,l,u,p,m;if(this.type=o.type.toLowerCase(),this.components=[],o.hasOwnProperty("geometry"))return this.fromJson(o.geometry),this.properties=o.properties,this;if(u=o.coordinates,!i.isArray(u[0]))this.components.push({x:u[0],y:u[1]});else for(a in u)if(u.hasOwnProperty(a))if(!i.isArray(u[a][0]))this.type==="multipoint"?this.components.push([{x:u[a][0],y:u[a][1]}]):this.components.push({x:u[a][0],y:u[a][1]});else{m=[];for(s in u[a])if(u[a].hasOwnProperty(s))if(!i.isArray(u[a][s][0]))m.push({x:u[a][s][0],y:u[a][s][1]});else{p=[];for(l in u[a][s])u[a][s].hasOwnProperty(l)&&p.push({x:u[a][s][l][0],y:u[a][s][l][1]});m.push(p)}this.components.push(m)}return this},i.Wkt.prototype.toJson=function(){var o,a,s,l,u,p,m;if(o=this.components,a={coordinates:[],type:function(){var v,x,y;x=this.regExes.ogcTypes.exec(this.type).slice(1),y=[];for(v in x)x.hasOwnProperty(v)&&x[v]!==void 0&&y.push(x[v].toLowerCase().slice(0,1).toUpperCase()+x[v].toLowerCase().slice(1));return y}.call(this).join("")},this.type.toLowerCase()==="box"){a.type="Polygon",a.bbox=[];for(s in o)o.hasOwnProperty(s)&&(a.bbox=a.bbox.concat([o[s].x,o[s].y]));return a.coordinates=[[[o[0].x,o[0].y],[o[0].x,o[1].y],[o[1].x,o[1].y],[o[1].x,o[0].y],[o[0].x,o[0].y]]],a}for(s in o)if(o.hasOwnProperty(s))if(i.isArray(o[s])){m=[];for(l in o[s])if(o[s].hasOwnProperty(l))if(i.isArray(o[s][l])){p=[];for(u in o[s][l])o[s][l].hasOwnProperty(u)&&p.push([o[s][l][u].x,o[s][l][u].y]);m.push(p)}else o[s].length>1?m.push([o[s][l].x,o[s][l].y]):m=m.concat([o[s][l].x,o[s][l].y]);a.coordinates.push(m)}else o.length>1?a.coordinates.push([o[s].x,o[s].y]):a.coordinates=a.coordinates.concat([o[s].x,o[s].y]);return a},i.Wkt.prototype.merge=function(o){var a=this.type.slice(0,5);if(this.type!==o.type&&this.type.slice(5,this.type.length)!==o.type)throw TypeError("The input geometry types must agree or the calling this.Wkt.Wkt instance must be a multigeometry of the other");switch(a){case"point":this.components=[this.components.concat(o.components)];break;case"multi":this.components=this.components.concat(o.type.slice(0,5)==="multi"?o.components:[o.components]);break;default:this.components=[this.components,o.components];break}return a!=="multi"&&(this.type="multi"+this.type),this},i.Wkt.prototype.read=function(o){var a;if(a=this.regExes.typeStr.exec(o),a)this.type=a[1].toLowerCase(),this.base=a[2],this.ingest[this.type]&&(this.components=this.ingest[this.type].apply(this,[this.base]));else if(this.regExes.crudeJson.test(o))if(typeof JSON=="object"&&typeof JSON.parse=="function")this.fromJson(JSON.parse(o));else throw console.log("JSON.parse() is not available; cannot parse GeoJSON strings"),{name:"JSONError",message:"JSON.parse() is not available; cannot parse GeoJSON strings"};else throw console.log("Invalid WKT string provided to read()"),{name:"WKTError",message:"Invalid WKT string provided to read()"};return this},i.Wkt.prototype.write=function(o){var a,s,l;for(o=o||this.components,s=[],s.push(this.type.toUpperCase()+"("),a=0;a<o.length;a+=1){if(this.isCollection()&&a>0&&s.push(","),!this.extract[this.type])return null;l=this.extract[this.type].apply(this,[o[a]]),this.isCollection()&&this.type!=="multipoint"?s.push("("+l+")"):(s.push(l),a!==o.length-1&&this.type!=="multipoint"&&s.push(","))}return s.push(")"),s.join("")},i.Wkt.prototype.extract={point:function(o){return String(o.x)+this.delimiter+String(o.y)},multipoint:function(o){var a,s=[],l;for(a=0;a<o.length;a+=1)l=this.extract.point.apply(this,[o[a]]),this.wrapVertices&&(l="("+l+")"),s.push(l);return s.join(",")},linestring:function(o){return this.extract.point.apply(this,[o])},multilinestring:function(o){var a,s=[];if(o.length)for(a=0;a<o.length;a+=1)s.push(this.extract.linestring.apply(this,[o[a]]));else s.push(this.extract.point.apply(this,[o]));return s.join(",")},polygon:function(o){return this.extract.multilinestring.apply(this,[o])},multipolygon:function(o){var a,s=[];for(a=0;a<o.length;a+=1)s.push("("+this.extract.polygon.apply(this,[o[a]])+")");return s.join(",")},box:function(o){return this.extract.linestring.apply(this,[o])},geometrycollection:function(o){console.log("The geometrycollection WKT type is not yet supported.")}},i.Wkt.prototype.ingest={point:function(o){var a=i.trim(o).split(this.regExes.spaces);return[{x:parseFloat(this.regExes.numeric.exec(a[0])[0]),y:parseFloat(this.regExes.numeric.exec(a[1])[0])}]},multipoint:function(o){var a,s,l;for(s=[],l=i.trim(o).split(this.regExes.comma),a=0;a<l.length;a+=1)s.push(this.ingest.point.apply(this,[l[a]]));return s},linestring:function(o){var a,s,l;for(s=this.ingest.multipoint.apply(this,[o]),l=[],a=0;a<s.length;a+=1)l=l.concat(s[a]);return l},multilinestring:function(o){var a,s,l,u;for(s=[],u=i.trim(o).split(this.regExes.doubleParenComma),u.length===1&&(u=i.trim(o).split(this.regExes.parenComma)),a=0;a<u.length;a+=1)l=this._stripWhitespaceAndParens(u[a]),s.push(this.ingest.linestring.apply(this,[l]));return s},polygon:function(o){var a,s,l,u,p,m;for(m=i.trim(o).split(this.regExes.parenComma),l=[],a=0;a<m.length;a+=1){for(p=this._stripWhitespaceAndParens(m[a]).split(this.regExes.comma),u=[],s=0;s<p.length;s+=1){var v=p[s].split(this.regExes.spaces);if(v.length>2&&(v=v.filter(function(_){return _!=""})),v.length===2){var x=v[0],y=v[1];u.push({x:parseFloat(x),y:parseFloat(y)})}}l.push(u)}return l},box:function(o){var a,s,l;for(s=this.ingest.multipoint.apply(this,[o]),l=[],a=0;a<s.length;a+=1)l=l.concat(s[a]);return l},multipolygon:function(o){var a,s,l,u;for(s=[],u=i.trim(o).split(this.regExes.doubleParenComma),a=0;a<u.length;a+=1)l=this._stripWhitespaceAndParens(u[a]),s.push(this.ingest.polygon.apply(this,[l]));return s},geometrycollection:function(o){console.log("The geometrycollection WKT type is not yet supported.")}},i})})(M4e);var Z9={exports:{}},Fte=function(e,r){return function(){for(var i=new Array(arguments.length),o=0;o<i.length;o++)i[o]=arguments[o];return e.apply(r,i)}},A4e=Fte,q1=Object.prototype.toString;function Q9(t){return q1.call(t)==="[object Array]"}function J9(t){return typeof t=="undefined"}function R4e(t){return t!==null&&!J9(t)&&t.constructor!==null&&!J9(t.constructor)&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}function k4e(t){return q1.call(t)==="[object ArrayBuffer]"}function O4e(t){return typeof FormData!="undefined"&&t instanceof FormData}function L4e(t){var e;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&t.buffer instanceof ArrayBuffer,e}function D4e(t){return typeof t=="string"}function N4e(t){return typeof t=="number"}function zte(t){return t!==null&&typeof t=="object"}function JL(t){if(q1.call(t)!=="[object Object]")return!1;var e=Object.getPrototypeOf(t);return e===null||e===Object.prototype}function $4e(t){return q1.call(t)==="[object Date]"}function F4e(t){return q1.call(t)==="[object File]"}function z4e(t){return q1.call(t)==="[object Blob]"}function Bte(t){return q1.call(t)==="[object Function]"}function B4e(t){return zte(t)&&Bte(t.pipe)}function j4e(t){return typeof URLSearchParams!="undefined"&&t instanceof URLSearchParams}function U4e(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function V4e(){return typeof navigator!="undefined"&&(navigator.product==="ReactNative"||navigator.product==="NativeScript"||navigator.product==="NS")?!1:typeof window!="undefined"&&typeof document!="undefined"}function e7(t,e){if(!(t===null||typeof t=="undefined"))if(typeof t!="object"&&(t=[t]),Q9(t))for(var r=0,n=t.length;r<n;r++)e.call(null,t[r],r,t);else for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.call(null,t[i],i,t)}function t7(){var t={};function e(i,o){JL(t[o])&&JL(i)?t[o]=t7(t[o],i):JL(i)?t[o]=t7({},i):Q9(i)?t[o]=i.slice():t[o]=i}for(var r=0,n=arguments.length;r<n;r++)e7(arguments[r],e);return t}function H4e(t,e,r){return e7(e,function(i,o){r&&typeof i=="function"?t[o]=A4e(i,r):t[o]=i}),t}function W4e(t){return t.charCodeAt(0)===65279&&(t=t.slice(1)),t}var qd={isArray:Q9,isArrayBuffer:k4e,isBuffer:R4e,isFormData:O4e,isArrayBufferView:L4e,isString:D4e,isNumber:N4e,isObject:zte,isPlainObject:JL,isUndefined:J9,isDate:$4e,isFile:F4e,isBlob:z4e,isFunction:Bte,isStream:B4e,isURLSearchParams:j4e,isStandardBrowserEnv:V4e,forEach:e7,merge:t7,extend:H4e,trim:U4e,stripBOM:W4e},uC=qd;function jte(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var Ute=function(e,r,n){if(!r)return e;var i;if(n)i=n(r);else if(uC.isURLSearchParams(r))i=r.toString();else{var o=[];uC.forEach(r,function(l,u){l===null||typeof l=="undefined"||(uC.isArray(l)?u=u+"[]":l=[l],uC.forEach(l,function(m){uC.isDate(m)?m=m.toISOString():uC.isObject(m)&&(m=JSON.stringify(m)),o.push(jte(u)+"="+jte(m))}))}),i=o.join("&")}if(i){var a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e},G4e=qd;function eD(){this.handlers=[]}eD.prototype.use=function(e,r,n){return this.handlers.push({fulfilled:e,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1};eD.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)};eD.prototype.forEach=function(e){G4e.forEach(this.handlers,function(n){n!==null&&e(n)})};var q4e=eD,X4e=qd,Y4e=function(e,r){X4e.forEach(e,function(i,o){o!==r&&o.toUpperCase()===r.toUpperCase()&&(e[r]=i,delete e[o])})},Vte=function(e,r,n,i,o){return e.config=r,n&&(e.code=n),e.request=i,e.response=o,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}},e},K4e=Vte,Hte=function(e,r,n,i,o){var a=new Error(e);return K4e(a,r,n,i,o)},Z4e=Hte,Q4e=function(e,r,n){var i=n.config.validateStatus;!n.status||!i||i(n.status)?e(n):r(Z4e("Request failed with status code "+n.status,n.config,null,n.request,n))},tD=qd,J4e=tD.isStandardBrowserEnv()?function(){return{write:function(r,n,i,o,a,s){var l=[];l.push(r+"="+encodeURIComponent(n)),tD.isNumber(i)&&l.push("expires="+new Date(i).toGMTString()),tD.isString(o)&&l.push("path="+o),tD.isString(a)&&l.push("domain="+a),s===!0&&l.push("secure"),document.cookie=l.join("; ")},read:function(r){var n=document.cookie.match(new RegExp("(^|;\\s*)("+r+")=([^;]*)"));return n?decodeURIComponent(n[3]):null},remove:function(r){this.write(r,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}(),eFe=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)},tFe=function(e,r){return r?e.replace(/\/+$/,"")+"/"+r.replace(/^\/+/,""):e},rFe=eFe,nFe=tFe,iFe=function(e,r){return e&&!rFe(r)?nFe(e,r):r},r7=qd,oFe=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"],sFe=function(e){var r={},n,i,o;return e&&r7.forEach(e.split(` `),function(s){if(o=s.indexOf(":"),n=r7.trim(s.substr(0,o)).toLowerCase(),i=r7.trim(s.substr(o+1)),n){if(r[n]&&oFe.indexOf(n)>=0)return;n==="set-cookie"?r[n]=(r[n]?r[n]:[]).concat([i]):r[n]=r[n]?r[n]+", "+i:i}}),r},Wte=qd,aFe=Wte.isStandardBrowserEnv()?function(){var e=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a"),n;function i(o){var a=o;return e&&(r.setAttribute("href",a),a=r.href),r.setAttribute("href",a),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}return n=i(window.location.href),function(a){var s=Wte.isString(a)?i(a):a;return s.protocol===n.protocol&&s.host===n.host}}():function(){return function(){return!0}}();function n7(t){this.message=t}n7.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")};n7.prototype.__CANCEL__=!0;var rD=n7,nD=qd,lFe=Q4e,cFe=J4e,uFe=Ute,fFe=iFe,dFe=sFe,hFe=aFe,i7=Hte,pFe=oD,mFe=rD,Gte=function(e){return new Promise(function(n,i){var o=e.data,a=e.headers,s=e.responseType,l;function u(){e.cancelToken&&e.cancelToken.unsubscribe(l),e.signal&&e.signal.removeEventListener("abort",l)}nD.isFormData(o)&&delete a["Content-Type"];var p=new XMLHttpRequest;if(e.auth){var m=e.auth.username||"",v=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";a.Authorization="Basic "+btoa(m+":"+v)}var x=fFe(e.baseURL,e.url);p.open(e.method.toUpperCase(),uFe(x,e.params,e.paramsSerializer),!0),p.timeout=e.timeout;function y(){if(!!p){var w="getAllResponseHeaders"in p?dFe(p.getAllResponseHeaders()):null,C=!s||s==="text"||s==="json"?p.responseText:p.response,E={data:C,status:p.status,statusText:p.statusText,headers:w,config:e,request:p};lFe(function(A){n(A),u()},function(A){i(A),u()},E),p=null}}if("onloadend"in p?p.onloadend=y:p.onreadystatechange=function(){!p||p.readyState!==4||p.status===0&&!(p.responseURL&&p.responseURL.indexOf("file:")===0)||setTimeout(y)},p.onabort=function(){!p||(i(i7("Request aborted",e,"ECONNABORTED",p)),p=null)},p.onerror=function(){i(i7("Network Error",e,null,p)),p=null},p.ontimeout=function(){var C=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",E=e.transitional||pFe.transitional;e.timeoutErrorMessage&&(C=e.timeoutErrorMessage),i(i7(C,e,E.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",p)),p=null},nD.isStandardBrowserEnv()){var _=(e.withCredentials||hFe(x))&&e.xsrfCookieName?cFe.read(e.xsrfCookieName):void 0;_&&(a[e.xsrfHeaderName]=_)}"setRequestHeader"in p&&nD.forEach(a,function(C,E){typeof o=="undefined"&&E.toLowerCase()==="content-type"?delete a[E]:p.setRequestHeader(E,C)}),nD.isUndefined(e.withCredentials)||(p.withCredentials=!!e.withCredentials),s&&s!=="json"&&(p.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&p.addEventListener("progress",e.onDownloadProgress),typeof e.onUploadProgress=="function"&&p.upload&&p.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(l=function(w){!p||(i(!w||w&&w.type?new mFe("canceled"):w),p.abort(),p=null)},e.cancelToken&&e.cancelToken.subscribe(l),e.signal&&(e.signal.aborted?l():e.signal.addEventListener("abort",l))),o||(o=null),p.send(o)})},Wc=qd,qte=Y4e,gFe=Vte,vFe={"Content-Type":"application/x-www-form-urlencoded"};function Xte(t,e){!Wc.isUndefined(t)&&Wc.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}function yFe(){var t;return(typeof XMLHttpRequest!="undefined"||typeof process!="undefined"&&Object.prototype.toString.call(process)==="[object process]")&&(t=Gte),t}function xFe(t,e,r){if(Wc.isString(t))try{return(e||JSON.parse)(t),Wc.trim(t)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(t)}var iD={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:yFe(),transformRequest:[function(e,r){return qte(r,"Accept"),qte(r,"Content-Type"),Wc.isFormData(e)||Wc.isArrayBuffer(e)||Wc.isBuffer(e)||Wc.isStream(e)||Wc.isFile(e)||Wc.isBlob(e)?e:Wc.isArrayBufferView(e)?e.buffer:Wc.isURLSearchParams(e)?(Xte(r,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):Wc.isObject(e)||r&&r["Content-Type"]==="application/json"?(Xte(r,"application/json"),xFe(e)):e}],transformResponse:[function(e){var r=this.transitional||iD.transitional,n=r&&r.silentJSONParsing,i=r&&r.forcedJSONParsing,o=!n&&this.responseType==="json";if(o||i&&Wc.isString(e)&&e.length)try{return JSON.parse(e)}catch(a){if(o)throw a.name==="SyntaxError"?gFe(a,this,"E_JSON_PARSE"):a}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};Wc.forEach(["delete","get","head"],function(e){iD.headers[e]={}});Wc.forEach(["post","put","patch"],function(e){iD.headers[e]=Wc.merge(vFe)});var oD=iD,_Fe=qd,bFe=oD,wFe=function(e,r,n){var i=this||bFe;return _Fe.forEach(n,function(a){e=a.call(i,e,r)}),e},Yte=function(e){return!!(e&&e.__CANCEL__)},Kte=qd,o7=wFe,CFe=Yte,EFe=oD,SFe=rD;function s7(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new SFe("canceled")}var TFe=function(e){s7(e),e.headers=e.headers||{},e.data=o7.call(e,e.data,e.headers,e.transformRequest),e.headers=Kte.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),Kte.forEach(["delete","get","head","post","put","patch","common"],function(i){delete e.headers[i]});var r=e.adapter||EFe.adapter;return r(e).then(function(i){return s7(e),i.data=o7.call(e,i.data,i.headers,e.transformResponse),i},function(i){return CFe(i)||(s7(e),i&&i.response&&(i.response.data=o7.call(e,i.response.data,i.response.headers,e.transformResponse))),Promise.reject(i)})},Xd=qd,Zte=function(e,r){r=r||{};var n={};function i(p,m){return Xd.isPlainObject(p)&&Xd.isPlainObject(m)?Xd.merge(p,m):Xd.isPlainObject(m)?Xd.merge({},m):Xd.isArray(m)?m.slice():m}function o(p){if(Xd.isUndefined(r[p])){if(!Xd.isUndefined(e[p]))return i(void 0,e[p])}else return i(e[p],r[p])}function a(p){if(!Xd.isUndefined(r[p]))return i(void 0,r[p])}function s(p){if(Xd.isUndefined(r[p])){if(!Xd.isUndefined(e[p]))return i(void 0,e[p])}else return i(void 0,r[p])}function l(p){if(p in r)return i(e[p],r[p]);if(p in e)return i(void 0,e[p])}var u={url:a,method:a,data:a,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:l};return Xd.forEach(Object.keys(e).concat(Object.keys(r)),function(m){var v=u[m]||o,x=v(m);Xd.isUndefined(x)&&v!==l||(n[m]=x)}),n},Qte={version:"0.23.0"},PFe=Qte.version,a7={};["object","boolean","number","function","string","symbol"].forEach(function(t,e){a7[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});var Jte={};a7.transitional=function(e,r,n){function i(o,a){return"[Axios v"+PFe+"] Transitional option '"+o+"'"+a+(n?". "+n:"")}return function(o,a,s){if(e===!1)throw new Error(i(a," has been removed"+(r?" in "+r:"")));return r&&!Jte[a]&&(Jte[a]=!0,console.warn(i(a," has been deprecated since v"+r+" and will be removed in the near future"))),e?e(o,a,s):!0}};function IFe(t,e,r){if(typeof t!="object")throw new TypeError("options must be an object");for(var n=Object.keys(t),i=n.length;i-- >0;){var o=n[i],a=e[o];if(a){var s=t[o],l=s===void 0||a(s,o,t);if(l!==!0)throw new TypeError("option "+o+" must be "+l);continue}if(r!==!0)throw Error("Unknown option "+o)}}var MFe={assertOptions:IFe,validators:a7},ere=qd,AFe=Ute,tre=q4e,rre=TFe,sD=Zte,nre=MFe,fC=nre.validators;function JP(t){this.defaults=t,this.interceptors={request:new tre,response:new tre}}JP.prototype.request=function(e){typeof e=="string"?(e=arguments[1]||{},e.url=arguments[0]):e=e||{},e=sD(this.defaults,e),e.method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var r=e.transitional;r!==void 0&&nre.assertOptions(r,{silentJSONParsing:fC.transitional(fC.boolean),forcedJSONParsing:fC.transitional(fC.boolean),clarifyTimeoutError:fC.transitional(fC.boolean)},!1);var n=[],i=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(e)===!1||(i=i&&v.synchronous,n.unshift(v.fulfilled,v.rejected))});var o=[];this.interceptors.response.forEach(function(v){o.push(v.fulfilled,v.rejected)});var a;if(!i){var s=[rre,void 0];for(Array.prototype.unshift.apply(s,n),s=s.concat(o),a=Promise.resolve(e);s.length;)a=a.then(s.shift(),s.shift());return a}for(var l=e;n.length;){var u=n.shift(),p=n.shift();try{l=u(l)}catch(m){p(m);break}}try{a=rre(l)}catch(m){return Promise.reject(m)}for(;o.length;)a=a.then(o.shift(),o.shift());return a};JP.prototype.getUri=function(e){return e=sD(this.defaults,e),AFe(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")};ere.forEach(["delete","get","head","options"],function(e){JP.prototype[e]=function(r,n){return this.request(sD(n||{},{method:e,url:r,data:(n||{}).data}))}});ere.forEach(["post","put","patch"],function(e){JP.prototype[e]=function(r,n,i){return this.request(sD(i||{},{method:e,url:r,data:n}))}});var RFe=JP,kFe=rD;function dC(t){if(typeof t!="function")throw new TypeError("executor must be a function.");var e;this.promise=new Promise(function(i){e=i});var r=this;this.promise.then(function(n){if(!!r._listeners){var i,o=r._listeners.length;for(i=0;i<o;i++)r._listeners[i](n);r._listeners=null}}),this.promise.then=function(n){var i,o=new Promise(function(a){r.subscribe(a),i=a}).then(n);return o.cancel=function(){r.unsubscribe(i)},o},t(function(i){r.reason||(r.reason=new kFe(i),e(r.reason))})}dC.prototype.throwIfRequested=function(){if(this.reason)throw this.reason};dC.prototype.subscribe=function(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]};dC.prototype.unsubscribe=function(e){if(!!this._listeners){var r=this._listeners.indexOf(e);r!==-1&&this._listeners.splice(r,1)}};dC.source=function(){var e,r=new dC(function(i){e=i});return{token:r,cancel:e}};var OFe=dC,LFe=function(e){return function(n){return e.apply(null,n)}},DFe=function(e){return typeof e=="object"&&e.isAxiosError===!0},ire=qd,NFe=Fte,aD=RFe,$Fe=Zte,FFe=oD;function ore(t){var e=new aD(t),r=NFe(aD.prototype.request,e);return ire.extend(r,aD.prototype,e),ire.extend(r,e),r.create=function(i){return ore($Fe(t,i))},r}var Vg=ore(FFe);Vg.Axios=aD;Vg.Cancel=rD;Vg.CancelToken=OFe;Vg.isCancel=Yte;Vg.VERSION=Qte.version;Vg.all=function(e){return Promise.all(e)};Vg.spread=LFe;Vg.isAxiosError=DFe;Z9.exports=Vg;Z9.exports.default=Vg;var nRt=Z9.exports,zFe=Object.prototype,BFe=zFe.hasOwnProperty;function jFe(t,e){return t!=null&&BFe.call(t,e)}var UFe=jFe,VFe=UFe,HFe=dte;function WFe(t,e){return t!=null&&HFe(t,e,VFe)}var iRt=WFe,GFe=cC,qFe=U1,XFe=QP,YFe=G1,sre=Object.prototype,KFe=sre.hasOwnProperty;GFe(function(t,e){t=Object(t);var r=-1,n=e.length,i=n>2?e[2]:void 0;for(i&&XFe(e[0],e[1],i)&&(n=1);++r<n;)for(var o=e[r],a=YFe(o),s=-1,l=a.length;++s<l;){var u=a[s],p=t[u];(p===void 0||qFe(p,sre[u])&&!KFe.call(t,u))&&(t[u]=o[u])}return t});var ZFe=Cm,QFe=function(){return ZFe.Date.now()},JFe=QFe,eze=Yf,l7=JFe,are=mte,tze="Expected a function",rze=Math.max,nze=Math.min;function ize(t,e,r){var n,i,o,a,s,l,u=0,p=!1,m=!1,v=!0;if(typeof t!="function")throw new TypeError(tze);e=are(e)||0,eze(r)&&(p=!!r.leading,m="maxWait"in r,o=m?rze(are(r.maxWait)||0,e):o,v="trailing"in r?!!r.trailing:v);function x(X){var Z=n,W=i;return n=i=void 0,u=X,a=t.apply(W,Z),a}function y(X){return u=X,s=setTimeout(C,e),p?x(X):a}function _(X){var Z=X-l,W=X-u,D=e-Z;return m?nze(D,o-W):D}function w(X){var Z=X-l,W=X-u;return l===void 0||Z>=e||Z<0||m&&W>=o}function C(){var X=l7();if(w(X))return E(X);s=setTimeout(C,_(X))}function E(X){return s=void 0,v&&n?x(X):(n=i=void 0,a)}function T(){s!==void 0&&clearTimeout(s),u=0,n=l=i=s=void 0}function A(){return s===void 0?a:E(l7())}function k(){var X=l7(),Z=w(X);if(n=arguments,i=this,l=X,Z){if(s===void 0)return y(l);if(m)return clearTimeout(s),s=setTimeout(C,e),x(l)}return s===void 0&&(s=setTimeout(C,e)),a}return k.cancel=T,k.flush=A,k}var oze=ize,sze=oze,aze=Yf,lze="Expected a function";function cze(t,e,r){var n=!0,i=!0;if(typeof t!="function")throw new TypeError(lze);return aze(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),sze(t,e,{leading:n,maxWait:e,trailing:i})}var oRt=cze,uze=U9;function fze(t,e){return uze(t,e)}var sRt=fze,c7={exports:{}},X1={},u7={exports:{}},Em={},lD={exports:{}};(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=s;/*! * Adapted from jQuery UI core * * http://jqueryui.com * * Copyright 2014 jQuery Foundation and other contributors * Released under the MIT license. * http://jquery.org/license * * http://api.jqueryui.com/category/ui-core/ */var r=/input|select|textarea|button|object/;function n(l){var u=l.offsetWidth<=0&&l.offsetHeight<=0;if(u&&!l.innerHTML)return!0;try{var p=window.getComputedStyle(l);return u?p.getPropertyValue("overflow")!=="visible"||l.scrollWidth<=0&&l.scrollHeight<=0:p.getPropertyValue("display")=="none"}catch{return console.warn("Failed to inspect element style"),!1}}function i(l){for(var u=l;u&&u!==document.body;){if(n(u))return!1;u=u.parentNode}return!0}function o(l,u){var p=l.nodeName.toLowerCase(),m=r.test(p)&&!l.disabled||p==="a"&&l.href||u;return m&&i(l)}function a(l){var u=l.getAttribute("tabindex");u===null&&(u=void 0);var p=isNaN(u);return(p||u>=0)&&o(l,!p)}function s(l){return[].slice.call(l.querySelectorAll("*"),0).filter(a)}t.exports=e.default})(lD,lD.exports);Object.defineProperty(Em,"__esModule",{value:!0});Em.resetState=mze;Em.log=gze;Em.handleBlur=eI;Em.handleFocus=tI;Em.markForFocusLater=vze;Em.returnFocus=yze;Em.popWithoutFocus=xze;Em.setupScopedFocus=_ze;Em.teardownScopedFocus=bze;var dze=lD.exports,hze=pze(dze);function pze(t){return t&&t.__esModule?t:{default:t}}var hC=[],pC=null,f7=!1;function mze(){hC=[]}function gze(){}function eI(){f7=!0}function tI(){if(f7){if(f7=!1,!pC)return;setTimeout(function(){if(!pC.contains(document.activeElement)){var t=(0,hze.default)(pC)[0]||pC;t.focus()}},0)}}function vze(){hC.push(document.activeElement)}function yze(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,e=null;try{hC.length!==0&&(e=hC.pop(),e.focus({preventScroll:t}));return}catch{console.warn(["You tried to return focus to",e,"but it is not in the DOM anymore"].join(" "))}}function xze(){hC.length>0&&hC.pop()}function _ze(t){pC=t,window.addEventListener?(window.addEventListener("blur",eI,!1),document.addEventListener("focus",tI,!0)):(window.attachEvent("onBlur",eI),document.attachEvent("onFocus",tI))}function bze(){pC=null,window.addEventListener?(window.removeEventListener("blur",eI),document.removeEventListener("focus",tI)):(window.detachEvent("onBlur",eI),document.detachEvent("onFocus",tI))}var d7={exports:{}};(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=o;var r=lD.exports,n=i(r);function i(a){return a&&a.__esModule?a:{default:a}}function o(a,s){var l=(0,n.default)(a);if(!l.length){s.preventDefault();return}var u=void 0,p=s.shiftKey,m=l[0],v=l[l.length-1];if(a===document.activeElement){if(!p)return;u=v}if(v===document.activeElement&&!p&&(u=m),m===document.activeElement&&p&&(u=v),u){s.preventDefault(),u.focus();return}var x=/(\bChrome\b|\bSafari\b)\//.exec(navigator.userAgent),y=x!=null&&x[1]!="Chrome"&&/\biPod\b|\biPad\b/g.exec(navigator.userAgent)==null;if(!!y){var _=l.indexOf(document.activeElement);if(_>-1&&(_+=p?-1:1),u=l[_],typeof u=="undefined"){s.preventDefault(),u=p?v:m,u.focus();return}s.preventDefault(),u.focus()}}t.exports=e.default})(d7,d7.exports);var Sm={},wze=function(){},h7=wze,Tm={},lre={exports:{}};/*! Copyright (c) 2015 Jed Watson. Based on code that is Copyright 2013-2015, Facebook, Inc. All rights reserved. */(function(t){(function(){var e=!!(typeof window!="undefined"&&window.document&&window.document.createElement),r={canUseDOM:e,canUseWorkers:typeof Worker!="undefined",canUseEventListeners:e&&!!(window.addEventListener||window.attachEvent),canUseViewport:e&&!!window.screen};t.exports?t.exports=r:window.ExecutionEnvironment=r})()})(lre);Object.defineProperty(Tm,"__esModule",{value:!0});Tm.canUseDOM=Tm.SafeNodeList=Tm.SafeHTMLCollection=void 0;var Cze=lre.exports,Eze=Sze(Cze);function Sze(t){return t&&t.__esModule?t:{default:t}}var cD=Eze.default,Tze=cD.canUseDOM?window.HTMLElement:{};Tm.SafeHTMLCollection=cD.canUseDOM?window.HTMLCollection:{};Tm.SafeNodeList=cD.canUseDOM?window.NodeList:{};Tm.canUseDOM=cD.canUseDOM;Tm.default=Tze;Object.defineProperty(Sm,"__esModule",{value:!0});Sm.resetState=Rze;Sm.log=kze;Sm.assertNodeList=cre;Sm.setElement=Oze;Sm.validateElement=p7;Sm.hide=Lze;Sm.show=Dze;Sm.documentNotReadyOrSSRTesting=Nze;var Pze=h7,Ize=Aze(Pze),Mze=Tm;function Aze(t){return t&&t.__esModule?t:{default:t}}var Qh=null;function Rze(){Qh&&(Qh.removeAttribute?Qh.removeAttribute("aria-hidden"):Qh.length!=null?Qh.forEach(function(t){return t.removeAttribute("aria-hidden")}):document.querySelectorAll(Qh).forEach(function(t){return t.removeAttribute("aria-hidden")})),Qh=null}function kze(){}function cre(t,e){if(!t||!t.length)throw new Error("react-modal: No elements were found for selector "+e+".")}function Oze(t){var e=t;if(typeof e=="string"&&Mze.canUseDOM){var r=document.querySelectorAll(e);cre(r,e),e=r}return Qh=e||Qh,Qh}function p7(t){var e=t||Qh;return e?Array.isArray(e)||e instanceof HTMLCollection||e instanceof NodeList?e:[e]:((0,Ize.default)(!1,["react-modal: App element is not defined.","Please use `Modal.setAppElement(el)` or set `appElement={el}`.","This is needed so screen readers don't see main content","when modal is opened. It is not recommended, but you can opt-out","by setting `ariaHideApp={false}`."].join(" ")),[])}function Lze(t){var e=!0,r=!1,n=void 0;try{for(var i=p7(t)[Symbol.iterator](),o;!(e=(o=i.next()).done);e=!0){var a=o.value;a.setAttribute("aria-hidden","true")}}catch(s){r=!0,n=s}finally{try{!e&&i.return&&i.return()}finally{if(r)throw n}}}function Dze(t){var e=!0,r=!1,n=void 0;try{for(var i=p7(t)[Symbol.iterator](),o;!(e=(o=i.next()).done);e=!0){var a=o.value;a.removeAttribute("aria-hidden")}}catch(s){r=!0,n=s}finally{try{!e&&i.return&&i.return()}finally{if(r)throw n}}}function Nze(){Qh=null}var mC={};Object.defineProperty(mC,"__esModule",{value:!0});mC.resetState=$ze;mC.log=Fze;var rI={},nI={};function ure(t,e){t.classList.remove(e)}function $ze(){var t=document.getElementsByTagName("html")[0];for(var e in rI)ure(t,rI[e]);var r=document.body;for(var n in nI)ure(r,nI[n]);rI={},nI={}}function Fze(){}var zze=function(e,r){return e[r]||(e[r]=0),e[r]+=1,r},Bze=function(e,r){return e[r]&&(e[r]-=1),r},jze=function(e,r,n){n.forEach(function(i){zze(r,i),e.add(i)})},Uze=function(e,r,n){n.forEach(function(i){Bze(r,i),r[i]===0&&e.remove(i)})};mC.add=function(e,r){return jze(e.classList,e.nodeName.toLowerCase()=="html"?rI:nI,r.split(" "))};mC.remove=function(e,r){return Uze(e.classList,e.nodeName.toLowerCase()=="html"?rI:nI,r.split(" "))};var gC={};Object.defineProperty(gC,"__esModule",{value:!0});gC.log=Hze;gC.resetState=Wze;function Vze(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var fre=function t(){var e=this;Vze(this,t),this.register=function(r){e.openInstances.indexOf(r)===-1&&(e.openInstances.push(r),e.emit("register"))},this.deregister=function(r){var n=e.openInstances.indexOf(r);n!==-1&&(e.openInstances.splice(n,1),e.emit("deregister"))},this.subscribe=function(r){e.subscribers.push(r)},this.emit=function(r){e.subscribers.forEach(function(n){return n(r,e.openInstances.slice())})},this.openInstances=[],this.subscribers=[]},uD=new fre;function Hze(){console.log("portalOpenInstances ----------"),console.log(uD.openInstances.length),uD.openInstances.forEach(function(t){return console.log(t)}),console.log("end portalOpenInstances ----------")}function Wze(){uD=new fre}gC.default=uD;var m7={};Object.defineProperty(m7,"__esModule",{value:!0});m7.resetState=Yze;m7.log=Kze;var Gze=gC,qze=Xze(Gze);function Xze(t){return t&&t.__esModule?t:{default:t}}var Su=void 0,Pm=void 0,Y1=[];function Yze(){for(var t=[Su,Pm],e=0;e<t.length;e++){var r=t[e];!r||r.parentNode&&r.parentNode.removeChild(r)}Su=Pm=null,Y1=[]}function Kze(){console.log("bodyTrap ----------"),console.log(Y1.length);for(var t=[Su,Pm],e=0;e<t.length;e++){var r=t[e],n=r||{};console.log(n.nodeName,n.className,n.id)}console.log("edn bodyTrap ----------")}function dre(){Y1.length!==0&&Y1[Y1.length-1].focusContent()}function Zze(t,e){!Su&&!Pm&&(Su=document.createElement("div"),Su.setAttribute("data-react-modal-body-trap",""),Su.style.position="absolute",Su.style.opacity="0",Su.setAttribute("tabindex","0"),Su.addEventListener("focus",dre),Pm=Su.cloneNode(),Pm.addEventListener("focus",dre)),Y1=e,Y1.length>0?(document.body.firstChild!==Su&&document.body.insertBefore(Su,document.body.firstChild),document.body.lastChild!==Pm&&document.body.appendChild(Pm)):(Su.parentElement&&Su.parentElement.removeChild(Su),Pm.parentElement&&Pm.parentElement.removeChild(Pm))}qze.default.subscribe(Zze);(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var r=Object.assign||function(z){for(var O=1;O<arguments.length;O++){var F=arguments[O];for(var G in F)Object.prototype.hasOwnProperty.call(F,G)&&(z[G]=F[G])}return z},n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(z){return typeof z}:function(z){return z&&typeof Symbol=="function"&&z.constructor===Symbol&&z!==Symbol.prototype?"symbol":typeof z},i=function(){function z(O,F){for(var G=0;G<F.length;G++){var q=F[G];q.enumerable=q.enumerable||!1,q.configurable=!0,"value"in q&&(q.writable=!0),Object.defineProperty(O,q.key,q)}}return function(O,F,G){return F&&z(O.prototype,F),G&&z(O,G),O}}(),o=Y.exports,a=vP.exports,s=k(a),l=Em,u=A(l),p=d7.exports,m=k(p),v=Sm,x=A(v),y=mC,_=A(y),w=Tm,C=k(w),E=gC,T=k(E);function A(z){if(z&&z.__esModule)return z;var O={};if(z!=null)for(var F in z)Object.prototype.hasOwnProperty.call(z,F)&&(O[F]=z[F]);return O.default=z,O}function k(z){return z&&z.__esModule?z:{default:z}}function X(z,O){if(!(z instanceof O))throw new TypeError("Cannot call a class as a function")}function Z(z,O){if(!z)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return O&&(typeof O=="object"||typeof O=="function")?O:z}function W(z,O){if(typeof O!="function"&&O!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof O);z.prototype=Object.create(O&&O.prototype,{constructor:{value:z,enumerable:!1,writable:!0,configurable:!0}}),O&&(Object.setPrototypeOf?Object.setPrototypeOf(z,O):z.__proto__=O)}var D={overlay:"ReactModal__Overlay",content:"ReactModal__Content"},H=9,N=27,j=0,$=function(z){W(O,z);function O(F){X(this,O);var G=Z(this,(O.__proto__||Object.getPrototypeOf(O)).call(this,F));return G.setOverlayRef=function(q){G.overlay=q,G.props.overlayRef&&G.props.overlayRef(q)},G.setContentRef=function(q){G.content=q,G.props.contentRef&&G.props.contentRef(q)},G.afterClose=function(){var q=G.props,ee=q.appElement,re=q.ariaHideApp,ce=q.htmlOpenClassName,fe=q.bodyOpenClassName;fe&&_.remove(document.body,fe),ce&&_.remove(document.getElementsByTagName("html")[0],ce),re&&j>0&&(j-=1,j===0&&x.show(ee)),G.props.shouldFocusAfterRender&&(G.props.shouldReturnFocusAfterClose?(u.returnFocus(G.props.preventScroll),u.teardownScopedFocus()):u.popWithoutFocus()),G.props.onAfterClose&&G.props.onAfterClose(),T.default.deregister(G)},G.open=function(){G.beforeOpen(),G.state.afterOpen&&G.state.beforeClose?(clearTimeout(G.closeTimer),G.setState({beforeClose:!1})):(G.props.shouldFocusAfterRender&&(u.setupScopedFocus(G.node),u.markForFocusLater()),G.setState({isOpen:!0},function(){G.openAnimationFrame=requestAnimationFrame(function(){G.setState({afterOpen:!0}),G.props.isOpen&&G.props.onAfterOpen&&G.props.onAfterOpen({overlayEl:G.overlay,contentEl:G.content})})}))},G.close=function(){G.props.closeTimeoutMS>0?G.closeWithTimeout():G.closeWithoutTimeout()},G.focusContent=function(){return G.content&&!G.contentHasFocus()&&G.content.focus({preventScroll:!0})},G.closeWithTimeout=function(){var q=Date.now()+G.props.closeTimeoutMS;G.setState({beforeClose:!0,closesAt:q},function(){G.closeTimer=setTimeout(G.closeWithoutTimeout,G.state.closesAt-Date.now())})},G.closeWithoutTimeout=function(){G.setState({beforeClose:!1,isOpen:!1,afterOpen:!1,closesAt:null},G.afterClose)},G.handleKeyDown=function(q){q.keyCode===H&&(0,m.default)(G.content,q),G.props.shouldCloseOnEsc&&q.keyCode===N&&(q.stopPropagation(),G.requestClose(q))},G.handleOverlayOnClick=function(q){G.shouldClose===null&&(G.shouldClose=!0),G.shouldClose&&G.props.shouldCloseOnOverlayClick&&(G.ownerHandlesClose()?G.requestClose(q):G.focusContent()),G.shouldClose=null},G.handleContentOnMouseUp=function(){G.shouldClose=!1},G.handleOverlayOnMouseDown=function(q){!G.props.shouldCloseOnOverlayClick&&q.target==G.overlay&&q.preventDefault()},G.handleContentOnClick=function(){G.shouldClose=!1},G.handleContentOnMouseDown=function(){G.shouldClose=!1},G.requestClose=function(q){return G.ownerHandlesClose()&&G.props.onRequestClose(q)},G.ownerHandlesClose=function(){return G.props.onRequestClose},G.shouldBeClosed=function(){return!G.state.isOpen&&!G.state.beforeClose},G.contentHasFocus=function(){return document.activeElement===G.content||G.content.contains(document.activeElement)},G.buildClassName=function(q,ee){var re=(typeof ee=="undefined"?"undefined":n(ee))==="object"?ee:{base:D[q],afterOpen:D[q]+"--after-open",beforeClose:D[q]+"--before-close"},ce=re.base;return G.state.afterOpen&&(ce=ce+" "+re.afterOpen),G.state.beforeClose&&(ce=ce+" "+re.beforeClose),typeof ee=="string"&&ee?ce+" "+ee:ce},G.attributesFromObject=function(q,ee){return Object.keys(ee).reduce(function(re,ce){return re[q+"-"+ce]=ee[ce],re},{})},G.state={afterOpen:!1,beforeClose:!1},G.shouldClose=null,G.moveFromContentToOverlay=null,G}return i(O,[{key:"componentDidMount",value:function(){this.props.isOpen&&this.open()}},{key:"componentDidUpdate",value:function(G,q){this.props.isOpen&&!G.isOpen?this.open():!this.props.isOpen&&G.isOpen&&this.close(),this.props.shouldFocusAfterRender&&this.state.isOpen&&!q.isOpen&&this.focusContent()}},{key:"componentWillUnmount",value:function(){this.state.isOpen&&this.afterClose(),clearTimeout(this.closeTimer),cancelAnimationFrame(this.openAnimationFrame)}},{key:"beforeOpen",value:function(){var G=this.props,q=G.appElement,ee=G.ariaHideApp,re=G.htmlOpenClassName,ce=G.bodyOpenClassName;ce&&_.add(document.body,ce),re&&_.add(document.getElementsByTagName("html")[0],re),ee&&(j+=1,x.hide(q)),T.default.register(this)}},{key:"render",value:function(){var G=this.props,q=G.id,ee=G.className,re=G.overlayClassName,ce=G.defaultStyles,fe=G.children,J=ee?{}:ce.content,oe=re?{}:ce.overlay;if(this.shouldBeClosed())return null;var ve={ref:this.setOverlayRef,className:this.buildClassName("overlay",re),style:r({},oe,this.props.style.overlay),onClick:this.handleOverlayOnClick,onMouseDown:this.handleOverlayOnMouseDown},ye=r({id:q,ref:this.setContentRef,style:r({},J,this.props.style.content),className:this.buildClassName("content",ee),tabIndex:"-1",onKeyDown:this.handleKeyDown,onMouseDown:this.handleContentOnMouseDown,onMouseUp:this.handleContentOnMouseUp,onClick:this.handleContentOnClick,role:this.props.role,"aria-label":this.props.contentLabel},this.attributesFromObject("aria",r({modal:!0},this.props.aria)),this.attributesFromObject("data",this.props.data||{}),{"data-testid":this.props.testId}),xe=this.props.contentElement(ye,fe);return this.props.overlayElement(ve,xe)}}]),O}(o.Component);$.defaultProps={style:{overlay:{},content:{}},defaultStyles:{}},$.propTypes={isOpen:s.default.bool.isRequired,defaultStyles:s.default.shape({content:s.default.object,overlay:s.default.object}),style:s.default.shape({content:s.default.object,overlay:s.default.object}),className:s.default.oneOfType([s.default.string,s.default.object]),overlayClassName:s.default.oneOfType([s.default.string,s.default.object]),bodyOpenClassName:s.default.string,htmlOpenClassName:s.default.string,ariaHideApp:s.default.bool,appElement:s.default.oneOfType([s.default.instanceOf(C.default),s.default.instanceOf(w.SafeHTMLCollection),s.default.instanceOf(w.SafeNodeList),s.default.arrayOf(s.default.instanceOf(C.default))]),onAfterOpen:s.default.func,onAfterClose:s.default.func,onRequestClose:s.default.func,closeTimeoutMS:s.default.number,shouldFocusAfterRender:s.default.bool,shouldCloseOnOverlayClick:s.default.bool,shouldReturnFocusAfterClose:s.default.bool,preventScroll:s.default.bool,role:s.default.string,contentLabel:s.default.string,aria:s.default.object,data:s.default.object,children:s.default.node,shouldCloseOnEsc:s.default.bool,overlayRef:s.default.func,contentRef:s.default.func,id:s.default.string,overlayElement:s.default.func,contentElement:s.default.func,testId:s.default.string},e.default=$,t.exports=e.default})(u7,u7.exports);function hre(){var t=this.constructor.getDerivedStateFromProps(this.props,this.state);t!=null&&this.setState(t)}function pre(t){function e(r){var n=this.constructor.getDerivedStateFromProps(t,r);return n!=null?n:null}this.setState(e.bind(this))}function mre(t,e){try{var r=this.props,n=this.state;this.props=t,this.state=e,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(r,n)}finally{this.props=r,this.state=n}}hre.__suppressDeprecationWarning=!0;pre.__suppressDeprecationWarning=!0;mre.__suppressDeprecationWarning=!0;function Qze(t){var e=t.prototype;if(!e||!e.isReactComponent)throw new Error("Can only polyfill class components");if(typeof t.getDerivedStateFromProps!="function"&&typeof e.getSnapshotBeforeUpdate!="function")return t;var r=null,n=null,i=null;if(typeof e.componentWillMount=="function"?r="componentWillMount":typeof e.UNSAFE_componentWillMount=="function"&&(r="UNSAFE_componentWillMount"),typeof e.componentWillReceiveProps=="function"?n="componentWillReceiveProps":typeof e.UNSAFE_componentWillReceiveProps=="function"&&(n="UNSAFE_componentWillReceiveProps"),typeof e.componentWillUpdate=="function"?i="componentWillUpdate":typeof e.UNSAFE_componentWillUpdate=="function"&&(i="UNSAFE_componentWillUpdate"),r!==null||n!==null||i!==null){var o=t.displayName||t.name,a=typeof t.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error(`Unsafe legacy lifecycles will not be called for components using new component APIs. `+o+" uses "+a+" but also contains the following legacy lifecycles:"+(r!==null?` `+r:"")+(n!==null?` `+n:"")+(i!==null?` `+i:"")+` The above lifecycles should be removed. Learn more about this warning here: https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof t.getDerivedStateFromProps=="function"&&(e.componentWillMount=hre,e.componentWillReceiveProps=pre),typeof e.getSnapshotBeforeUpdate=="function"){if(typeof e.componentDidUpdate!="function")throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");e.componentWillUpdate=mre;var s=e.componentDidUpdate;e.componentDidUpdate=function(u,p,m){var v=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:m;s.call(this,u,p,v)}}return t}var Jze=Object.freeze(Object.defineProperty({__proto__:null,polyfill:Qze},Symbol.toStringTag,{value:"Module"})),eBe=PT(Jze);Object.defineProperty(X1,"__esModule",{value:!0});X1.bodyOpenClassName=X1.portalClassName=void 0;var gre=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},tBe=function(){function t(e,r){for(var n=0;n<r.length;n++){var i=r[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),vre=Y.exports,fD=iI(vre),rBe=Wa.exports,dD=iI(rBe),nBe=vP.exports,ji=iI(nBe),iBe=u7.exports,yre=iI(iBe),oBe=Sm,sBe=lBe(oBe),_x=Tm,xre=iI(_x),aBe=eBe;function lBe(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}function iI(t){return t&&t.__esModule?t:{default:t}}function cBe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _re(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function uBe(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var fBe=X1.portalClassName="ReactModalPortal",dBe=X1.bodyOpenClassName="ReactModal__Body--open",K1=_x.canUseDOM&&dD.default.createPortal!==void 0,bre=function(e){return document.createElement(e)},wre=function(){return K1?dD.default.createPortal:dD.default.unstable_renderSubtreeIntoContainer};function hD(t){return t()}var oI=function(t){uBe(e,t);function e(){var r,n,i,o;cBe(this,e);for(var a=arguments.length,s=Array(a),l=0;l<a;l++)s[l]=arguments[l];return o=(n=(i=_re(this,(r=e.__proto__||Object.getPrototypeOf(e)).call.apply(r,[this].concat(s))),i),i.removePortal=function(){!K1&&dD.default.unmountComponentAtNode(i.node);var u=hD(i.props.parentSelector);u&&u.contains(i.node)?u.removeChild(i.node):console.warn('React-Modal: "parentSelector" prop did not returned any DOM element. Make sure that the parent element is unmounted to avoid any memory leaks.')},i.portalRef=function(u){i.portal=u},i.renderPortal=function(u){var p=wre(),m=p(i,fD.default.createElement(yre.default,gre({defaultStyles:e.defaultStyles},u)),i.node);i.portalRef(m)},n),_re(i,o)}return tBe(e,[{key:"componentDidMount",value:function(){if(!!_x.canUseDOM){K1||(this.node=bre("div")),this.node.className=this.props.portalClassName;var n=hD(this.props.parentSelector);n.appendChild(this.node),!K1&&this.renderPortal(this.props)}}},{key:"getSnapshotBeforeUpdate",value:function(n){var i=hD(n.parentSelector),o=hD(this.props.parentSelector);return{prevParent:i,nextParent:o}}},{key:"componentDidUpdate",value:function(n,i,o){if(!!_x.canUseDOM){var a=this.props,s=a.isOpen,l=a.portalClassName;n.portalClassName!==l&&(this.node.className=l);var u=o.prevParent,p=o.nextParent;p!==u&&(u.removeChild(this.node),p.appendChild(this.node)),!(!n.isOpen&&!s)&&!K1&&this.renderPortal(this.props)}}},{key:"componentWillUnmount",value:function(){if(!(!_x.canUseDOM||!this.node||!this.portal)){var n=this.portal.state,i=Date.now(),o=n.isOpen&&this.props.closeTimeoutMS&&(n.closesAt||i+this.props.closeTimeoutMS);o?(n.beforeClose||this.portal.closeWithTimeout(),setTimeout(this.removePortal,o-i)):this.removePortal()}}},{key:"render",value:function(){if(!_x.canUseDOM||!K1)return null;!this.node&&K1&&(this.node=bre("div"));var n=wre();return n(fD.default.createElement(yre.default,gre({ref:this.portalRef,defaultStyles:e.defaultStyles},this.props)),this.node)}}],[{key:"setAppElement",value:function(n){sBe.setElement(n)}}]),e}(vre.Component);oI.propTypes={isOpen:ji.default.bool.isRequired,style:ji.default.shape({content:ji.default.object,overlay:ji.default.object}),portalClassName:ji.default.string,bodyOpenClassName:ji.default.string,htmlOpenClassName:ji.default.string,className:ji.default.oneOfType([ji.default.string,ji.default.shape({base:ji.default.string.isRequired,afterOpen:ji.default.string.isRequired,beforeClose:ji.default.string.isRequired})]),overlayClassName:ji.default.oneOfType([ji.default.string,ji.default.shape({base:ji.default.string.isRequired,afterOpen:ji.default.string.isRequired,beforeClose:ji.default.string.isRequired})]),appElement:ji.default.oneOfType([ji.default.instanceOf(xre.default),ji.default.instanceOf(_x.SafeHTMLCollection),ji.default.instanceOf(_x.SafeNodeList),ji.default.arrayOf(ji.default.instanceOf(xre.default))]),onAfterOpen:ji.default.func,onRequestClose:ji.default.func,closeTimeoutMS:ji.default.number,ariaHideApp:ji.default.bool,shouldFocusAfterRender:ji.default.bool,shouldCloseOnOverlayClick:ji.default.bool,shouldReturnFocusAfterClose:ji.default.bool,preventScroll:ji.default.bool,parentSelector:ji.default.func,aria:ji.default.object,data:ji.default.object,role:ji.default.string,contentLabel:ji.default.string,shouldCloseOnEsc:ji.default.bool,overlayRef:ji.default.func,contentRef:ji.default.func,id:ji.default.string,overlayElement:ji.default.func,contentElement:ji.default.func};oI.defaultProps={isOpen:!1,portalClassName:fBe,bodyOpenClassName:dBe,role:"dialog",ariaHideApp:!0,closeTimeoutMS:0,shouldFocusAfterRender:!0,shouldCloseOnEsc:!0,shouldCloseOnOverlayClick:!0,shouldReturnFocusAfterClose:!0,preventScroll:!1,parentSelector:function(){return document.body},overlayElement:function(e,r){return fD.default.createElement("div",e,r)},contentElement:function(e,r){return fD.default.createElement("div",e,r)}};oI.defaultStyles={overlay:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(255, 255, 255, 0.75)"},content:{position:"absolute",top:"40px",left:"40px",right:"40px",bottom:"40px",border:"1px solid #ccc",background:"#fff",overflow:"auto",WebkitOverflowScrolling:"touch",borderRadius:"4px",outline:"none",padding:"20px"}};(0,aBe.polyfill)(oI);X1.default=oI;(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var r=X1,n=i(r);function i(o){return o&&o.__esModule?o:{default:o}}e.default=n.default,t.exports=e.default})(c7,c7.exports);var aRt=Tk(c7.exports),Cre={exports:{}};/*! nouislider - 13.1.5 - 4/24/2019 */(function(t,e){(function(r){t.exports=r()})(function(){var r="13.1.5";function n(Ie){return typeof Ie=="object"&&typeof Ie.to=="function"&&typeof Ie.from=="function"}function i(Ie){Ie.parentElement.removeChild(Ie)}function o(Ie){return Ie!=null}function a(Ie){Ie.preventDefault()}function s(Ie){return Ie.filter(function(de){return this[de]?!1:this[de]=!0},{})}function l(Ie,de){return Math.round(Ie/de)*de}function u(Ie,de){var Te=Ie.getBoundingClientRect(),Be=Ie.ownerDocument,Ke=Be.documentElement,ot=E(Be);return/webkit.*Chrome.*Mobile/i.test(navigator.userAgent)&&(ot.x=0),de?Te.top+ot.y-Ke.clientTop:Te.left+ot.x-Ke.clientLeft}function p(Ie){return typeof Ie=="number"&&!isNaN(Ie)&&isFinite(Ie)}function m(Ie,de,Te){Te>0&&(_(Ie,de),setTimeout(function(){w(Ie,de)},Te))}function v(Ie){return Math.max(Math.min(Ie,100),0)}function x(Ie){return Array.isArray(Ie)?Ie:[Ie]}function y(Ie){Ie=String(Ie);var de=Ie.split(".");return de.length>1?de[1].length:0}function _(Ie,de){Ie.classList?Ie.classList.add(de):Ie.className+=" "+de}function w(Ie,de){Ie.classList?Ie.classList.remove(de):Ie.className=Ie.className.replace(new RegExp("(^|\\b)"+de.split(" ").join("|")+"(\\b|$)","gi")," ")}function C(Ie,de){return Ie.classList?Ie.classList.contains(de):new RegExp("\\b"+de+"\\b").test(Ie.className)}function E(Ie){var de=window.pageXOffset!==void 0,Te=(Ie.compatMode||"")==="CSS1Compat",Be=de?window.pageXOffset:Te?Ie.documentElement.scrollLeft:Ie.body.scrollLeft,Ke=de?window.pageYOffset:Te?Ie.documentElement.scrollTop:Ie.body.scrollTop;return{x:Be,y:Ke}}function T(){return window.navigator.pointerEnabled?{start:"pointerdown",move:"pointermove",end:"pointerup"}:window.navigator.msPointerEnabled?{start:"MSPointerDown",move:"MSPointerMove",end:"MSPointerUp"}:{start:"mousedown touchstart",move:"mousemove touchmove",end:"mouseup touchend"}}function A(){var Ie=!1;try{var de=Object.defineProperty({},"passive",{get:function(){Ie=!0}});window.addEventListener("test",null,de)}catch{}return Ie}function k(){return window.CSS&&CSS.supports&&CSS.supports("touch-action","none")}function X(Ie,de){return 100/(de-Ie)}function Z(Ie,de){return de*100/(Ie[1]-Ie[0])}function W(Ie,de){return Z(Ie,Ie[0]<0?de+Math.abs(Ie[0]):de-Ie[0])}function D(Ie,de){return de*(Ie[1]-Ie[0])/100+Ie[0]}function H(Ie,de){for(var Te=1;Ie>=de[Te];)Te+=1;return Te}function N(Ie,de,Te){if(Te>=Ie.slice(-1)[0])return 100;var Be=H(Te,Ie),Ke=Ie[Be-1],ot=Ie[Be],Ze=de[Be-1],Je=de[Be];return Ze+W([Ke,ot],Te)/X(Ze,Je)}function j(Ie,de,Te){if(Te>=100)return Ie.slice(-1)[0];var Be=H(Te,de),Ke=Ie[Be-1],ot=Ie[Be],Ze=de[Be-1],Je=de[Be];return D([Ke,ot],(Te-Ze)*X(Ze,Je))}function $(Ie,de,Te,Be){if(Be===100)return Be;var Ke=H(Be,Ie),ot=Ie[Ke-1],Ze=Ie[Ke];return Te?Be-ot>(Ze-ot)/2?Ze:ot:de[Ke-1]?Ie[Ke-1]+l(Be-Ie[Ke-1],de[Ke-1]):Be}function z(Ie,de,Te){var Be;if(typeof de=="number"&&(de=[de]),!Array.isArray(de))throw new Error("noUiSlider ("+r+"): 'range' contains invalid value.");if(Ie==="min"?Be=0:Ie==="max"?Be=100:Be=parseFloat(Ie),!p(Be)||!p(de[0]))throw new Error("noUiSlider ("+r+"): 'range' value isn't numeric.");Te.xPct.push(Be),Te.xVal.push(de[0]),Be?Te.xSteps.push(isNaN(de[1])?!1:de[1]):isNaN(de[1])||(Te.xSteps[0]=de[1]),Te.xHighestCompleteStep.push(0)}function O(Ie,de,Te){if(!!de){if(Te.xVal[Ie]===Te.xVal[Ie+1]){Te.xSteps[Ie]=Te.xHighestCompleteStep[Ie]=Te.xVal[Ie];return}Te.xSteps[Ie]=Z([Te.xVal[Ie],Te.xVal[Ie+1]],de)/X(Te.xPct[Ie],Te.xPct[Ie+1]);var Be=(Te.xVal[Ie+1]-Te.xVal[Ie])/Te.xNumSteps[Ie],Ke=Math.ceil(Number(Be.toFixed(3))-1),ot=Te.xVal[Ie]+Te.xNumSteps[Ie]*Ke;Te.xHighestCompleteStep[Ie]=ot}}function F(Ie,de,Te){this.xPct=[],this.xVal=[],this.xSteps=[Te||!1],this.xNumSteps=[!1],this.xHighestCompleteStep=[],this.snap=de;var Be,Ke=[];for(Be in Ie)Ie.hasOwnProperty(Be)&&Ke.push([Ie[Be],Be]);for(Ke.length&&typeof Ke[0][0]=="object"?Ke.sort(function(ot,Ze){return ot[0][0]-Ze[0][0]}):Ke.sort(function(ot,Ze){return ot[0]-Ze[0]}),Be=0;Be<Ke.length;Be++)z(Ke[Be][1],Ke[Be][0],this);for(this.xNumSteps=this.xSteps.slice(0),Be=0;Be<this.xNumSteps.length;Be++)O(Be,this.xNumSteps[Be],this)}F.prototype.getMargin=function(Ie){var de=this.xNumSteps[0];if(de&&Ie/de%1!=0)throw new Error("noUiSlider ("+r+"): 'limit', 'margin' and 'padding' must be divisible by step.");return this.xPct.length===2?Z(this.xVal,Ie):!1},F.prototype.toStepping=function(Ie){return Ie=N(this.xVal,this.xPct,Ie),Ie},F.prototype.fromStepping=function(Ie){return j(this.xVal,this.xPct,Ie)},F.prototype.getStep=function(Ie){return Ie=$(this.xPct,this.xSteps,this.snap,Ie),Ie},F.prototype.getDefaultStep=function(Ie,de,Te){var Be=H(Ie,this.xPct);return(Ie===100||de&&Ie===this.xPct[Be-1])&&(Be=Math.max(Be-1,1)),(this.xVal[Be]-this.xVal[Be-1])/Te},F.prototype.getNearbySteps=function(Ie){var de=H(Ie,this.xPct);return{stepBefore:{startValue:this.xVal[de-2],step:this.xNumSteps[de-2],highestStep:this.xHighestCompleteStep[de-2]},thisStep:{startValue:this.xVal[de-1],step:this.xNumSteps[de-1],highestStep:this.xHighestCompleteStep[de-1]},stepAfter:{startValue:this.xVal[de],step:this.xNumSteps[de],highestStep:this.xHighestCompleteStep[de]}}},F.prototype.countStepDecimals=function(){var Ie=this.xNumSteps.map(y);return Math.max.apply(null,Ie)},F.prototype.convert=function(Ie){return this.getStep(this.toStepping(Ie))};var G={to:function(Ie){return Ie!==void 0&&Ie.toFixed(2)},from:Number};function q(Ie){if(n(Ie))return!0;throw new Error("noUiSlider ("+r+"): 'format' requires 'to' and 'from' methods.")}function ee(Ie,de){if(!p(de))throw new Error("noUiSlider ("+r+"): 'step' is not numeric.");Ie.singleStep=de}function re(Ie,de){if(typeof de!="object"||Array.isArray(de))throw new Error("noUiSlider ("+r+"): 'range' is not an object.");if(de.min===void 0||de.max===void 0)throw new Error("noUiSlider ("+r+"): Missing 'min' or 'max' in 'range'.");if(de.min===de.max)throw new Error("noUiSlider ("+r+"): 'range' 'min' and 'max' cannot be equal.");Ie.spectrum=new F(de,Ie.snap,Ie.singleStep)}function ce(Ie,de){if(de=x(de),!Array.isArray(de)||!de.length)throw new Error("noUiSlider ("+r+"): 'start' option is incorrect.");Ie.handles=de.length,Ie.start=de}function fe(Ie,de){if(Ie.snap=de,typeof de!="boolean")throw new Error("noUiSlider ("+r+"): 'snap' option must be a boolean.")}function J(Ie,de){if(Ie.animate=de,typeof de!="boolean")throw new Error("noUiSlider ("+r+"): 'animate' option must be a boolean.")}function oe(Ie,de){if(Ie.animationDuration=de,typeof de!="number")throw new Error("noUiSlider ("+r+"): 'animationDuration' option must be a number.")}function ve(Ie,de){var Te=[!1],Be;if(de==="lower"?de=[!0,!1]:de==="upper"&&(de=[!1,!0]),de===!0||de===!1){for(Be=1;Be<Ie.handles;Be++)Te.push(de);Te.push(!1)}else{if(!Array.isArray(de)||!de.length||de.length!==Ie.handles+1)throw new Error("noUiSlider ("+r+"): 'connect' option doesn't match handle count.");Te=de}Ie.connect=Te}function ye(Ie,de){switch(de){case"horizontal":Ie.ort=0;break;case"vertical":Ie.ort=1;break;default:throw new Error("noUiSlider ("+r+"): 'orientation' option is invalid.")}}function xe(Ie,de){if(!p(de))throw new Error("noUiSlider ("+r+"): 'margin' option must be numeric.");if(de!==0&&(Ie.margin=Ie.spectrum.getMargin(de),!Ie.margin))throw new Error("noUiSlider ("+r+"): 'margin' option is only supported on linear sliders.")}function se(Ie,de){if(!p(de))throw new Error("noUiSlider ("+r+"): 'limit' option must be numeric.");if(Ie.limit=Ie.spectrum.getMargin(de),!Ie.limit||Ie.handles<2)throw new Error("noUiSlider ("+r+"): 'limit' option is only supported on linear sliders with 2 or more handles.")}function me(Ie,de){if(!p(de)&&!Array.isArray(de))throw new Error("noUiSlider ("+r+"): 'padding' option must be numeric or array of exactly 2 numbers.");if(Array.isArray(de)&&!(de.length===2||p(de[0])||p(de[1])))throw new Error("noUiSlider ("+r+"): 'padding' option must be numeric or array of exactly 2 numbers.");if(de!==0){if(Array.isArray(de)||(de=[de,de]),Ie.padding=[Ie.spectrum.getMargin(de[0]),Ie.spectrum.getMargin(de[1])],Ie.padding[0]===!1||Ie.padding[1]===!1)throw new Error("noUiSlider ("+r+"): 'padding' option is only supported on linear sliders.");if(Ie.padding[0]<0||Ie.padding[1]<0)throw new Error("noUiSlider ("+r+"): 'padding' option must be a positive number(s).");if(Ie.padding[0]+Ie.padding[1]>100)throw new Error("noUiSlider ("+r+"): 'padding' option must not exceed 100% of the range.")}}function pe(Ie,de){switch(de){case"ltr":Ie.dir=0;break;case"rtl":Ie.dir=1;break;default:throw new Error("noUiSlider ("+r+"): 'direction' option was not recognized.")}}function Ce(Ie,de){if(typeof de!="string")throw new Error("noUiSlider ("+r+"): 'behaviour' must be a string containing options.");var Te=de.indexOf("tap")>=0,Be=de.indexOf("drag")>=0,Ke=de.indexOf("fixed")>=0,ot=de.indexOf("snap")>=0,Ze=de.indexOf("hover")>=0,Je=de.indexOf("unconstrained")>=0;if(Ke){if(Ie.handles!==2)throw new Error("noUiSlider ("+r+"): 'fixed' behaviour must be used with 2 handles");xe(Ie,Ie.start[1]-Ie.start[0])}if(Je&&(Ie.margin||Ie.limit))throw new Error("noUiSlider ("+r+"): 'unconstrained' behaviour cannot be used with margin or limit");Ie.events={tap:Te||ot,drag:Be,fixed:Ke,snap:ot,hover:Ze,unconstrained:Je}}function Pe(Ie,de){if(de!==!1)if(de===!0){Ie.tooltips=[];for(var Te=0;Te<Ie.handles;Te++)Ie.tooltips.push(!0)}else{if(Ie.tooltips=x(de),Ie.tooltips.length!==Ie.handles)throw new Error("noUiSlider ("+r+"): must pass a formatter for all handles.");Ie.tooltips.forEach(function(Be){if(typeof Be!="boolean"&&(typeof Be!="object"||typeof Be.to!="function"))throw new Error("noUiSlider ("+r+"): 'tooltips' must be passed a formatter or 'false'.")})}}function Re(Ie,de){Ie.ariaFormat=de,q(de)}function ke(Ie,de){Ie.format=de,q(de)}function ze(Ie,de){if(Ie.keyboardSupport=de,typeof de!="boolean")throw new Error("noUiSlider ("+r+"): 'keyboardSupport' option must be a boolean.")}function Ge(Ie,de){Ie.documentElement=de}function ht(Ie,de){if(typeof de!="string"&&de!==!1)throw new Error("noUiSlider ("+r+"): 'cssPrefix' must be a string or `false`.");Ie.cssPrefix=de}function Tt(Ie,de){if(typeof de!="object")throw new Error("noUiSlider ("+r+"): 'cssClasses' must be an object.");if(typeof Ie.cssPrefix=="string"){Ie.cssClasses={};for(var Te in de)!de.hasOwnProperty(Te)||(Ie.cssClasses[Te]=Ie.cssPrefix+de[Te])}else Ie.cssClasses=de}function xt(Ie){var de={margin:0,limit:0,padding:0,animate:!0,animationDuration:300,ariaFormat:G,format:G},Te={step:{r:!1,t:ee},start:{r:!0,t:ce},connect:{r:!0,t:ve},direction:{r:!0,t:pe},snap:{r:!1,t:fe},animate:{r:!1,t:J},animationDuration:{r:!1,t:oe},range:{r:!0,t:re},orientation:{r:!1,t:ye},margin:{r:!1,t:xe},limit:{r:!1,t:se},padding:{r:!1,t:me},behaviour:{r:!0,t:Ce},ariaFormat:{r:!1,t:Re},format:{r:!1,t:ke},tooltips:{r:!1,t:Pe},keyboardSupport:{r:!0,t:ze},documentElement:{r:!1,t:Ge},cssPrefix:{r:!0,t:ht},cssClasses:{r:!0,t:Tt}},Be={connect:!1,direction:"ltr",behaviour:"tap",orientation:"horizontal",keyboardSupport:!0,cssPrefix:"noUi-",cssClasses:{target:"target",base:"base",origin:"origin",handle:"handle",handleLower:"handle-lower",handleUpper:"handle-upper",touchArea:"touch-area",horizontal:"horizontal",vertical:"vertical",background:"background",connect:"connect",connects:"connects",ltr:"ltr",rtl:"rtl",draggable:"draggable",drag:"state-drag",tap:"state-tap",active:"active",tooltip:"tooltip",pips:"pips",pipsHorizontal:"pips-horizontal",pipsVertical:"pips-vertical",marker:"marker",markerHorizontal:"marker-horizontal",markerVertical:"marker-vertical",markerNormal:"marker-normal",markerLarge:"marker-large",markerSub:"marker-sub",value:"value",valueHorizontal:"value-horizontal",valueVertical:"value-vertical",valueNormal:"value-normal",valueLarge:"value-large",valueSub:"value-sub"}};Ie.format&&!Ie.ariaFormat&&(Ie.ariaFormat=Ie.format),Object.keys(Te).forEach(function(St){if(!o(Ie[St])&&Be[St]===void 0){if(Te[St].r)throw new Error("noUiSlider ("+r+"): '"+St+"' is required.");return!0}Te[St].t(de,o(Ie[St])?Ie[St]:Be[St])}),de.pips=Ie.pips;var Ke=document.createElement("div"),ot=Ke.style.msTransform!==void 0,Ze=Ke.style.transform!==void 0;de.transformRule=Ze?"transform":ot?"msTransform":"webkitTransform";var Je=[["left","top"],["right","bottom"]];return de.style=Je[de.dir][de.ort],de}function pt(Ie,de,Te){var Be=T(),Ke=k(),ot=Ke&&A(),Ze=Ie,Je,St,er,Ft,Ut,Er=de.spectrum,kr=[],mr=[],Dt=[],Jr=0,We={},Oe,$e=Ie.ownerDocument,Xe=de.documentElement||$e.documentElement,tt=$e.body,_t=-1,Ot=0,Nt=1,bt=2,Wt=$e.dir==="rtl"||de.ort===1?0:100;function Sr(qe,et){var ct=$e.createElement("div");return et&&_(ct,et),qe.appendChild(ct),ct}function rr(qe,et){var ct=Sr(qe,de.cssClasses.origin),jt=Sr(ct,de.cssClasses.handle);return Sr(jt,de.cssClasses.touchArea),jt.setAttribute("data-handle",et),de.keyboardSupport&&(jt.setAttribute("tabindex","0"),jt.addEventListener("keydown",function(Xt){return es(Xt,et)})),jt.setAttribute("role","slider"),jt.setAttribute("aria-orientation",de.ort?"vertical":"horizontal"),et===0?_(jt,de.cssClasses.handleLower):et===de.handles-1&&_(jt,de.cssClasses.handleUpper),ct}function tr(qe,et){return et?Sr(qe,de.cssClasses.connect):!1}function sn(qe,et){var ct=Sr(et,de.cssClasses.connects);St=[],er=[],er.push(tr(ct,qe[0]));for(var jt=0;jt<de.handles;jt++)St.push(rr(et,jt)),Dt[jt]=jt,er.push(tr(ct,qe[jt+1]))}function un(qe){return _(qe,de.cssClasses.target),de.dir===0?_(qe,de.cssClasses.ltr):_(qe,de.cssClasses.rtl),de.ort===0?_(qe,de.cssClasses.horizontal):_(qe,de.cssClasses.vertical),Sr(qe,de.cssClasses.base)}function Ye(qe,et){return de.tooltips[et]?Sr(qe.firstChild,de.cssClasses.tooltip):!1}function Ve(){return Ze.hasAttribute("disabled")}function gt(qe){var et=St[qe];return et.hasAttribute("disabled")}function qt(){Ut&&(dr("update.tooltips"),Ut.forEach(function(qe){qe&&i(qe)}),Ut=null)}function Ht(){qt(),Ut=St.map(Ye),Ns("update.tooltips",function(qe,et,ct){if(!!Ut[et]){var jt=qe[et];de.tooltips[et]!==!0&&(jt=de.tooltips[et].to(ct[et])),Ut[et].innerHTML=jt}})}function on(){Ns("update",function(qe,et,ct,jt,Xt){Dt.forEach(function(pr){var zt=St[pr],Hr=Li(mr,pr,0,!0,!0,!0),Zr=Li(mr,pr,100,!0,!0,!0),hn=Xt[pr],gn=de.ariaFormat.to(ct[pr]);Hr=Er.fromStepping(Hr).toFixed(1),Zr=Er.fromStepping(Zr).toFixed(1),hn=Er.fromStepping(hn).toFixed(1),zt.children[0].setAttribute("aria-valuemin",Hr),zt.children[0].setAttribute("aria-valuemax",Zr),zt.children[0].setAttribute("aria-valuenow",hn),zt.children[0].setAttribute("aria-valuetext",gn)})})}function $t(qe,et,ct){if(qe==="range"||qe==="steps")return Er.xVal;if(qe==="count"){if(et<2)throw new Error("noUiSlider ("+r+"): 'values' (>= 2) required for mode 'count'.");var jt=et-1,Xt=100/jt;for(et=[];jt--;)et[jt]=jt*Xt;et.push(100),qe="positions"}if(qe==="positions")return et.map(function(pr){return Er.fromStepping(ct?Er.getStep(pr):pr)});if(qe==="values")return ct?et.map(function(pr){return Er.fromStepping(Er.getStep(Er.toStepping(pr)))}):et}function Gt(qe,et,ct){function jt(gn,Bn){return(gn+Bn).toFixed(7)/1}var Xt={},pr=Er.xVal[0],zt=Er.xVal[Er.xVal.length-1],Hr=!1,Zr=!1,hn=0;return ct=s(ct.slice().sort(function(gn,Bn){return gn-Bn})),ct[0]!==pr&&(ct.unshift(pr),Hr=!0),ct[ct.length-1]!==zt&&(ct.push(zt),Zr=!0),ct.forEach(function(gn,Bn){var wr,pn,ci,fi=gn,Lo=ct[Bn+1],On,ao,Ja,$i,_i,Hn,wf,yd=et==="steps";if(yd&&(wr=Er.xNumSteps[Bn]),wr||(wr=Lo-fi),!(fi===!1||Lo===void 0))for(wr=Math.max(wr,1e-7),pn=fi;pn<=Lo;pn=jt(pn,wr)){for(On=Er.toStepping(pn),ao=On-hn,_i=ao/qe,Hn=Math.round(_i),wf=ao/Hn,ci=1;ci<=Hn;ci+=1)Ja=hn+ci*wf,Xt[Ja.toFixed(5)]=[Er.fromStepping(Ja),0];$i=ct.indexOf(pn)>-1?Nt:yd?bt:Ot,!Bn&&Hr&&($i=0),pn===Lo&&Zr||(Xt[On.toFixed(5)]=[pn,$i]),hn=On}}),Xt}function Ir(qe,et,ct){var jt=$e.createElement("div"),Xt=[];Xt[Ot]=de.cssClasses.valueNormal,Xt[Nt]=de.cssClasses.valueLarge,Xt[bt]=de.cssClasses.valueSub;var pr=[];pr[Ot]=de.cssClasses.markerNormal,pr[Nt]=de.cssClasses.markerLarge,pr[bt]=de.cssClasses.markerSub;var zt=[de.cssClasses.valueHorizontal,de.cssClasses.valueVertical],Hr=[de.cssClasses.markerHorizontal,de.cssClasses.markerVertical];_(jt,de.cssClasses.pips),_(jt,de.ort===0?de.cssClasses.pipsHorizontal:de.cssClasses.pipsVertical);function Zr(gn,Bn){var wr=Bn===de.cssClasses.value,pn=wr?zt:Hr,ci=wr?Xt:pr;return Bn+" "+pn[de.ort]+" "+ci[gn]}function hn(gn,Bn,wr){if(wr=et?et(Bn,wr):wr,wr!==_t){var pn=Sr(jt,!1);pn.className=Zr(wr,de.cssClasses.marker),pn.style[de.style]=gn+"%",wr>Ot&&(pn=Sr(jt,!1),pn.className=Zr(wr,de.cssClasses.value),pn.setAttribute("data-value",Bn),pn.style[de.style]=gn+"%",pn.innerHTML=ct.to(Bn))}}return Object.keys(qe).forEach(function(gn){hn(gn,qe[gn][0],qe[gn][1])}),jt}function Br(){Ft&&(i(Ft),Ft=null)}function Xr(qe){Br();var et=qe.mode,ct=qe.density||1,jt=qe.filter||!1,Xt=qe.values||!1,pr=qe.stepped||!1,zt=$t(et,Xt,pr),Hr=Gt(ct,et,zt),Zr=qe.format||{to:Math.round};return Ft=Ze.appendChild(Ir(Hr,jt,Zr)),Ft}function Vn(){var qe=Je.getBoundingClientRect(),et="offset"+["Width","Height"][de.ort];return de.ort===0?qe.width||Je[et]:qe.height||Je[et]}function Ln(qe,et,ct,jt){var Xt=function(zt){if(zt=br(zt,jt.pageOffset,jt.target||et),!zt||Ve()&&!jt.doNotReject||C(Ze,de.cssClasses.tap)&&!jt.doNotReject||qe===Be.start&&zt.buttons!==void 0&&zt.buttons>1||jt.hover&&zt.buttons)return!1;ot||zt.preventDefault(),zt.calcPoint=zt.points[de.ort],ct(zt,jt)},pr=[];return qe.split(" ").forEach(function(zt){et.addEventListener(zt,Xt,ot?{passive:!0}:!1),pr.push([zt,Xt])}),pr}function br(qe,et,ct){var jt=qe.type.indexOf("touch")===0,Xt=qe.type.indexOf("mouse")===0,pr=qe.type.indexOf("pointer")===0,zt,Hr;if(qe.type.indexOf("MSPointer")===0&&(pr=!0),jt){var Zr=function(Bn){return Bn.target===ct||ct.contains(Bn.target)};if(qe.type==="touchstart"){var hn=Array.prototype.filter.call(qe.touches,Zr);if(hn.length>1)return!1;zt=hn[0].pageX,Hr=hn[0].pageY}else{var gn=Array.prototype.find.call(qe.changedTouches,Zr);if(!gn)return!1;zt=gn.pageX,Hr=gn.pageY}}return et=et||E($e),(Xt||pr)&&(zt=qe.clientX+et.x,Hr=qe.clientY+et.y),qe.pageOffset=et,qe.points=[zt,Hr],qe.cursor=Xt||pr,qe}function oi(qe){var et=qe-u(Je,de.ort),ct=et*100/Vn();return ct=v(ct),de.dir?100-ct:ct}function Gi(qe){var et=100,ct=!1;return St.forEach(function(jt,Xt){if(!gt(Xt)){var pr=Math.abs(mr[Xt]-qe);(pr<et||pr===100&&et===100)&&(ct=Xt,et=pr)}}),ct}function pi(qe,et){qe.type==="mouseout"&&qe.target.nodeName==="HTML"&&qe.relatedTarget===null&&Xo(qe,et)}function Ds(qe,et){if(navigator.appVersion.indexOf("MSIE 9")===-1&&qe.buttons===0&&et.buttonsProperty!==0)return Xo(qe,et);var ct=(de.dir?-1:1)*(qe.calcPoint-et.startCalcPoint),jt=ct*100/et.baseSize;qs(ct>0,jt,et.locations,et.handleNumbers)}function Xo(qe,et){et.handle&&(w(et.handle,de.cssClasses.active),Jr-=1),et.listeners.forEach(function(ct){Xe.removeEventListener(ct[0],ct[1])}),Jr===0&&(w(Ze,de.cssClasses.drag),Dr(),qe.cursor&&(tt.style.cursor="",tt.removeEventListener("selectstart",a))),et.handleNumbers.forEach(function(ct){Oi("change",ct),Oi("set",ct),Oi("end",ct)})}function jo(qe,et){if(et.handleNumbers.some(gt))return!1;var ct;if(et.handleNumbers.length===1){var jt=St[et.handleNumbers[0]];ct=jt.children[0],Jr+=1,_(ct,de.cssClasses.active)}qe.stopPropagation();var Xt=[],pr=Ln(Be.move,Xe,Ds,{target:qe.target,handle:ct,listeners:Xt,startCalcPoint:qe.calcPoint,baseSize:Vn(),pageOffset:qe.pageOffset,handleNumbers:et.handleNumbers,buttonsProperty:qe.buttons,locations:mr.slice()}),zt=Ln(Be.end,Xe,Xo,{target:qe.target,handle:ct,listeners:Xt,doNotReject:!0,handleNumbers:et.handleNumbers}),Hr=Ln("mouseout",Xe,pi,{target:qe.target,handle:ct,listeners:Xt,doNotReject:!0,handleNumbers:et.handleNumbers});Xt.push.apply(Xt,pr.concat(zt,Hr)),qe.cursor&&(tt.style.cursor=getComputedStyle(qe.target).cursor,St.length>1&&_(Ze,de.cssClasses.drag),tt.addEventListener("selectstart",a,!1)),et.handleNumbers.forEach(function(Zr){Oi("start",Zr)})}function Qa(qe){qe.stopPropagation();var et=oi(qe.calcPoint),ct=Gi(et);if(ct===!1)return!1;de.events.snap||m(Ze,de.cssClasses.tap,de.animationDuration),Rn(ct,et,!0,!0),Dr(),Oi("slide",ct,!0),Oi("update",ct,!0),Oi("change",ct,!0),Oi("set",ct,!0),de.events.snap&&jo(qe,{handleNumbers:[ct]})}function za(qe){var et=oi(qe.calcPoint),ct=Er.getStep(et),jt=Er.fromStepping(ct);Object.keys(We).forEach(function(Xt){Xt.split(".")[0]==="hover"&&We[Xt].forEach(function(pr){pr.call(Oe,jt)})})}function es(qe,et){if(Ve()||gt(et))return!1;var ct=["Left","Right"],jt=["Down","Up"];de.dir&&!de.ort?ct.reverse():de.ort&&!de.dir&&jt.reverse();var Xt=qe.key.replace("Arrow",""),pr=Xt===jt[0]||Xt===ct[0],zt=Xt===jt[1]||Xt===ct[1];if(!pr&&!zt)return!0;qe.preventDefault();var Hr=pr?0:1,Zr=le(et),hn=Zr[Hr];return hn===null||(hn===!1&&(hn=Er.getDefaultStep(mr[et],pr,10)),hn=Math.max(hn,1e-7),hn=(pr?-1:1)*hn,Uo(et,kr[et]+hn,!0)),!1}function Pi(qe){qe.fixed||St.forEach(function(et,ct){Ln(Be.start,et.children[0],jo,{handleNumbers:[ct]})}),qe.tap&&Ln(Be.start,Je,Qa,{}),qe.hover&&Ln(Be.move,Je,za,{hover:!0}),qe.drag&&er.forEach(function(et,ct){if(!(et===!1||ct===0||ct===er.length-1)){var jt=St[ct-1],Xt=St[ct],pr=[et];_(et,de.cssClasses.draggable),qe.fixed&&(pr.push(jt.children[0]),pr.push(Xt.children[0])),pr.forEach(function(zt){Ln(Be.start,zt,jo,{handles:[jt,Xt],handleNumbers:[ct-1,ct]})})}})}function Ns(qe,et){We[qe]=We[qe]||[],We[qe].push(et),qe.split(".")[0]==="update"&&St.forEach(function(ct,jt){Oi("update",jt)})}function dr(qe){var et=qe&&qe.split(".")[0],ct=et&&qe.substring(et.length);Object.keys(We).forEach(function(jt){var Xt=jt.split(".")[0],pr=jt.substring(Xt.length);(!et||et===Xt)&&(!ct||ct===pr)&&delete We[jt]})}function Oi(qe,et,ct){Object.keys(We).forEach(function(jt){var Xt=jt.split(".")[0];qe===Xt&&We[jt].forEach(function(pr){pr.call(Oe,kr.map(de.format.to),et,kr.slice(),ct||!1,mr.slice())})})}function Li(qe,et,ct,jt,Xt,pr){return St.length>1&&!de.events.unconstrained&&(jt&&et>0&&(ct=Math.max(ct,qe[et-1]+de.margin)),Xt&&et<St.length-1&&(ct=Math.min(ct,qe[et+1]-de.margin))),St.length>1&&de.limit&&(jt&&et>0&&(ct=Math.min(ct,qe[et-1]+de.limit)),Xt&&et<St.length-1&&(ct=Math.max(ct,qe[et+1]-de.limit))),de.padding&&(et===0&&(ct=Math.max(ct,de.padding[0])),et===St.length-1&&(ct=Math.min(ct,100-de.padding[1]))),ct=Er.getStep(ct),ct=v(ct),ct===qe[et]&&!pr?!1:ct}function ho(qe,et){var ct=de.ort;return(ct?et:qe)+", "+(ct?qe:et)}function qs(qe,et,ct,jt){var Xt=ct.slice(),pr=[!qe,qe],zt=[qe,!qe];jt=jt.slice(),qe&&jt.reverse(),jt.length>1?jt.forEach(function(Zr,hn){var gn=Li(Xt,Zr,Xt[Zr]+et,pr[hn],zt[hn],!1);gn===!1?et=0:(et=gn-Xt[Zr],Xt[Zr]=gn)}):pr=zt=[!0];var Hr=!1;jt.forEach(function(Zr,hn){Hr=Rn(Zr,ct[Zr]+et,pr[hn],zt[hn])||Hr}),Hr&&jt.forEach(function(Zr){Oi("update",Zr),Oi("slide",Zr)})}function fn(qe,et){return de.dir?100-qe-et:qe}function an(qe,et){mr[qe]=et,kr[qe]=Er.fromStepping(et);var ct="translate("+ho(fn(et,0)-Wt+"%","0")+")";St[qe].style[de.transformRule]=ct,zr(qe),zr(qe+1)}function Dr(){Dt.forEach(function(qe){var et=mr[qe]>50?-1:1,ct=3+(St.length+et*qe);St[qe].style.zIndex=ct})}function Rn(qe,et,ct,jt){return et=Li(mr,qe,et,ct,jt,!1),et===!1?!1:(an(qe,et),!0)}function zr(qe){if(!!er[qe]){var et=0,ct=100;qe!==0&&(et=mr[qe-1]),qe!==er.length-1&&(ct=mr[qe]);var jt=ct-et,Xt="translate("+ho(fn(et,jt)+"%","0")+")",pr="scale("+ho(jt/100,"1")+")";er[qe].style[de.transformRule]=Xt+" "+pr}}function Fn(qe,et){return qe===null||qe===!1||qe===void 0||(typeof qe=="number"&&(qe=String(qe)),qe=de.format.from(qe),qe=Er.toStepping(qe),qe===!1||isNaN(qe))?mr[et]:qe}function Tn(qe,et){var ct=x(qe),jt=mr[0]===void 0;et=et===void 0?!0:!!et,de.animate&&!jt&&m(Ze,de.cssClasses.tap,de.animationDuration),Dt.forEach(function(Xt){Rn(Xt,Fn(ct[Xt],Xt),!0,!1)}),Dt.forEach(function(Xt){Rn(Xt,mr[Xt],!0,!0)}),Dr(),Dt.forEach(function(Xt){Oi("update",Xt),ct[Xt]!==null&&et&&Oi("set",Xt)})}function ls(qe){Tn(de.start,qe)}function Uo(qe,et,ct){if(qe=Number(qe),!(qe>=0&&qe<Dt.length))throw new Error("noUiSlider ("+r+"): invalid handle number, got: "+qe);Rn(qe,Fn(et,qe),!0,!0),Oi("update",qe),ct&&Oi("set",qe)}function ri(){var qe=kr.map(de.format.to);return qe.length===1?qe[0]:qe}function $s(){for(var qe in de.cssClasses)!de.cssClasses.hasOwnProperty(qe)||w(Ze,de.cssClasses[qe]);for(;Ze.firstChild;)Ze.removeChild(Ze.firstChild);delete Ze.noUiSlider}function le(qe){var et=mr[qe],ct=Er.getNearbySteps(et),jt=kr[qe],Xt=ct.thisStep.step,pr=null;if(de.snap)return[jt-ct.stepBefore.startValue||null,ct.stepAfter.startValue-jt||null];Xt!==!1&&jt+Xt>ct.stepAfter.startValue&&(Xt=ct.stepAfter.startValue-jt),jt>ct.thisStep.startValue?pr=ct.thisStep.step:ct.stepBefore.step===!1?pr=!1:pr=jt-ct.stepBefore.highestStep,et===100?Xt=null:et===0&&(pr=null);var zt=Er.countStepDecimals();return Xt!==null&&Xt!==!1&&(Xt=Number(Xt.toFixed(zt))),pr!==null&&pr!==!1&&(pr=Number(pr.toFixed(zt))),[pr,Xt]}function Se(){return Dt.map(le)}function Ue(qe,et){var ct=ri(),jt=["margin","limit","padding","range","animate","snap","step","format","pips","tooltips"];jt.forEach(function(pr){qe[pr]!==void 0&&(Te[pr]=qe[pr])});var Xt=xt(Te);jt.forEach(function(pr){qe[pr]!==void 0&&(de[pr]=Xt[pr])}),Er=Xt.spectrum,de.margin=Xt.margin,de.limit=Xt.limit,de.padding=Xt.padding,de.pips?Xr(de.pips):Br(),de.tooltips?Ht():qt(),mr=[],Tn(qe.start||ct,et)}function Et(){Je=un(Ze),sn(de.connect,Je),Pi(de.events),Tn(de.start),de.pips&&Xr(de.pips),de.tooltips&&Ht(),on()}return Et(),Oe={destroy:$s,steps:Se,on:Ns,off:dr,get:ri,set:Tn,setHandle:Uo,reset:ls,__moveHandles:function(qe,et,ct){qs(qe,et,mr,ct)},options:Te,updateOptions:Ue,target:Ze,removePips:Br,removeTooltips:qt,pips:Xr},Oe}function It(Ie,de){if(!Ie||!Ie.nodeName)throw new Error("noUiSlider ("+r+"): create requires a single element, got: "+Ie);if(Ie.noUiSlider)throw new Error("noUiSlider ("+r+"): Slider was already initialized.");var Te=xt(de),Be=pt(Ie,Te,de);return Ie.noUiSlider=Be,Be}return{__spectrum:F,version:r,create:It}})})(Cre);var lRt=Cre.exports,hBe=xx,pBe=ZL,mBe=G1,gBe=pBe(function(t,e,r,n){hBe(e,mBe(e),t,n)}),vBe=gBe,yBe=j1,xBe=Ug,_Be=q9,bBe="[object DOMException]",wBe="[object Error]";function CBe(t){if(!xBe(t))return!1;var e=yBe(t);return e==wBe||e==bBe||typeof t.message=="string"&&typeof t.name=="string"&&!_Be(t)}var Ere=CBe,EBe=Y9,SBe=cC,TBe=Ere,PBe=SBe(function(t,e){try{return EBe(t,void 0,e)}catch(r){return TBe(r)?r:new Error(r)}}),IBe=PBe,MBe=KP;function ABe(t,e){return MBe(e,function(r){return t[r]})}var RBe=ABe,kBe=U1,Sre=Object.prototype,OBe=Sre.hasOwnProperty;function LBe(t,e,r,n){return t===void 0||kBe(t,Sre[r])&&!OBe.call(n,r)?e:t}var DBe=LBe,NBe={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"};function $Be(t){return"\\"+NBe[t]}var FBe=$Be,zBe=/<%=([\s\S]+?)%>/g,Tre=zBe;function BBe(t){return function(e){return t==null?void 0:t[e]}}var jBe=BBe,UBe=jBe,VBe={"&":"&","<":"<",">":">",'"':""","'":"'"},HBe=UBe(VBe),WBe=HBe,GBe=WBe,qBe=GL,Pre=/[&<>"']/g,XBe=RegExp(Pre.source);function YBe(t){return t=qBe(t),t&&XBe.test(t)?t.replace(Pre,GBe):t}var KBe=YBe,ZBe=/<%-([\s\S]+?)%>/g,QBe=ZBe,JBe=/<%([\s\S]+?)%>/g,e6e=JBe,t6e=KBe,r6e=QBe,n6e=e6e,i6e=Tre,o6e={escape:r6e,evaluate:n6e,interpolate:i6e,variable:"",imports:{_:{escape:t6e}}},s6e=o6e,Ire=vBe,a6e=IBe,l6e=RBe,Mre=DBe,c6e=FBe,u6e=Ere,f6e=QP,d6e=yx,h6e=Tre,Are=s6e,p6e=GL,m6e="Invalid `variable` option passed into `_.template`",g6e=/\b__p \+= '';/g,v6e=/\b(__p \+=) '' \+/g,y6e=/(__e\(.*?\)|\b__t\)) \+\n'';/g,x6e=/[()=,{}\[\]\/\s]/,_6e=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,pD=/($^)/,b6e=/['\n\r\u2028\u2029\\]/g,w6e=Object.prototype,Rre=w6e.hasOwnProperty;function C6e(t,e,r){var n=Are.imports._.templateSettings||Are;r&&f6e(t,e,r)&&(e=void 0),t=p6e(t),e=Ire({},e,n,Mre);var i=Ire({},e.imports,n.imports,Mre),o=d6e(i),a=l6e(i,o),s,l,u=0,p=e.interpolate||pD,m="__p += '",v=RegExp((e.escape||pD).source+"|"+p.source+"|"+(p===h6e?_6e:pD).source+"|"+(e.evaluate||pD).source+"|$","g"),x=Rre.call(e,"sourceURL")?"//# sourceURL="+(e.sourceURL+"").replace(/\s/g," ")+` `:"";t.replace(v,function(w,C,E,T,A,k){return E||(E=T),m+=t.slice(u,k).replace(b6e,c6e),C&&(s=!0,m+=`' + __e(`+C+`) + '`),A&&(l=!0,m+=`'; `+A+`; __p += '`),E&&(m+=`' + ((__t = (`+E+`)) == null ? '' : __t) + '`),u=k+w.length,w}),m+=`'; `;var y=Rre.call(e,"variable")&&e.variable;if(!y)m=`with (obj) { `+m+` } `;else if(x6e.test(y))throw new Error(m6e);m=(l?m.replace(g6e,""):m).replace(v6e,"$1").replace(y6e,"$1;"),m="function("+(y||"obj")+`) { `+(y?"":`obj || (obj = {}); `)+"var __t, __p = ''"+(s?", __e = _.escape":"")+(l?`, __j = Array.prototype.join; function print() { __p += __j.call(arguments, '') } `:`; `)+m+`return __p }`;var _=a6e(function(){return Function(o,x+"return "+m).apply(void 0,a)});if(_.source=m,u6e(_))throw _;return _}var cRt=C6e,kre={exports:{}};(function(t,e){(function(r,n){t.exports=n(Y.exports)})(xl,function(r){function n(y,_){return function(w){if(Array.isArray(w))return w}(y)||function(w,C){if(!(typeof Symbol=="undefined"||!(Symbol.iterator in Object(w)))){var E=[],T=!0,A=!1,k=void 0;try{for(var X,Z=w[Symbol.iterator]();!(T=(X=Z.next()).done)&&(E.push(X.value),!C||E.length!==C);T=!0);}catch(W){A=!0,k=W}finally{try{T||Z.return==null||Z.return()}finally{if(A)throw k}}return E}}(y,_)||o(y,_)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function i(y,_){var w;if(typeof Symbol=="undefined"||y[Symbol.iterator]==null){if(Array.isArray(y)||(w=o(y))||_&&y&&typeof y.length=="number"){w&&(y=w);var C=0,E=function(){};return{s:E,n:function(){return C>=y.length?{done:!0}:{done:!1,value:y[C++]}},e:function(X){throw X},f:E}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var T,A=!0,k=!1;return{s:function(){w=y[Symbol.iterator]()},n:function(){var X=w.next();return A=X.done,X},e:function(X){k=!0,T=X},f:function(){try{A||w.return==null||w.return()}finally{if(k)throw T}}}}function o(y,_){if(y){if(typeof y=="string")return a(y,_);var w=Object.prototype.toString.call(y).slice(8,-1);return w==="Object"&&y.constructor&&(w=y.constructor.name),w==="Map"||w==="Set"?Array.from(y):w==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(w)?a(y,_):void 0}}function a(y,_){(_==null||_>y.length)&&(_=y.length);for(var w=0,C=new Array(_);w<_;w++)C[w]=y[w];return C}function s(y){return(s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(_){return typeof _}:function(_){return _&&typeof Symbol=="function"&&_.constructor===Symbol&&_!==Symbol.prototype?"symbol":typeof _})(y)}function l(y,_){var w=Object.keys(y);if(Object.getOwnPropertySymbols){var C=Object.getOwnPropertySymbols(y);_&&(C=C.filter(function(E){return Object.getOwnPropertyDescriptor(y,E).enumerable})),w.push.apply(w,C)}return w}function u(y){for(var _=1;_<arguments.length;_++){var w=arguments[_]!=null?arguments[_]:{};_%2?l(Object(w),!0).forEach(function(C){v(y,C,w[C])}):Object.getOwnPropertyDescriptors?Object.defineProperties(y,Object.getOwnPropertyDescriptors(w)):l(Object(w)).forEach(function(C){Object.defineProperty(y,C,Object.getOwnPropertyDescriptor(w,C))})}return y}function p(y,_){for(var w=0;w<_.length;w++){var C=_[w];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(y,C.key,C)}}function m(y,_,w){return _&&p(y.prototype,_),w&&p(y,w),y}function v(y,_,w){return _ in y?Object.defineProperty(y,_,{value:w,enumerable:!0,configurable:!0,writable:!0}):y[_]=w,y}var x=function(){function y(){var _=this,w=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{};(function(E,T){if(!(E instanceof T))throw new TypeError("Cannot call a class as a function")})(this,y),v(this,"showMessageFor",function(E){_.visibleFields.includes(E)||_.visibleFields.push(E),_.helpers.forceUpdateIfNeeded()}),v(this,"hideMessageFor",function(E){var T=_.visibleFields.indexOf(E);-1<T&&_.visibleFields.splice(T,1),_.helpers.forceUpdateIfNeeded()}),v(this,"helpers",{parent:this,passes:function(E,T,A,k){return k.hasOwnProperty(E)?!(this.isRequired(E,k)||!this.isBlank(T))||k[E].rule(T,A,this.parent)!==!1:(console.error("Rule Not Found: There is no rule with the name ".concat(E,".")),!0)},isRequired:function(E,T){return T[E].hasOwnProperty("required")&&T[E].required},isBlank:function(E){return E==null||this.testRegex(E,/^[\s]*$/)},normalizeValues:function(E,T){return[this.valueOrEmptyString(E),this.getValidation(T),this.getOptions(T)]},getValidation:function(E){return E===Object(E)&&Object.keys(E).length?Object.keys(E)[0]:E.split(":")[0]},getOptions:function(E){if(E===Object(E)&&Object.values(E).length){var T=Object.values(E)[0];return Array.isArray(T)?T:[T]}return 1<(T=E.split(":")).length?T[1].split(","):[]},valueOrEmptyString:function(E){return E==null?"":E},toSentence:function(E){return E.slice(0,-2).join(", ")+(E.slice(0,-2).length?", ":"")+E.slice(-2).join(2<E.length?", or ":" or ")},testRegex:function(E,T){return E.toString().match(T)!==null},forceUpdateIfNeeded:function(){this.parent.autoForceUpdate&&this.parent.autoForceUpdate.forceUpdate()},message:function(E,T,A,k){A.messages=A.messages||{};var X=A.messages[E]||A.messages.default||this.parent.messages[E]||this.parent.messages.default||k[E].message;return X.replace(":attribute",this.humanizeFieldName(T))},humanizeFieldName:function(E){return E.replace(/([A-Z])/g," $1").replace(/_/g," ").toLowerCase()},element:function(E,T){var A=T.element||this.parent.element;return A(E,T.className)},momentInstalled:function(){return!(!window||!window.moment)||(console.warn("Date validators require using momentjs https://momentjs.com and moment objects."),!1)},size:function(E,T){return T==="string"||T===void 0||T==="array"?E.length:T==="num"?parseFloat(E):void 0},sizeText:function(E){return E==="string"||E===void 0?" characters":E==="array"?" elements":""}}),this.fields={},this.visibleFields=[],this.errorMessages={},this.messagesShown=!1,this.rules=u({accepted:{message:"The :attribute must be accepted.",rule:function(E){return E===!0},required:!0},after:{message:"The :attribute must be after :date.",rule:function(E,T){return _.helpers.momentInstalled()&&moment.isMoment(E)&&E.isAfter(T[0],"day")},messageReplace:function(E,T){return E.replace(":date",T[0].format("MM/DD/YYYY"))}},after_or_equal:{message:"The :attribute must be after or on :date.",rule:function(E,T){return _.helpers.momentInstalled()&&moment.isMoment(E)&&E.isSameOrAfter(T[0],"day")},messageReplace:function(E,T){return E.replace(":date",T[0].format("MM/DD/YYYY"))}},alpha:{message:"The :attribute may only contain letters.",rule:function(E){return _.helpers.testRegex(E,/^[A-Z]*$/i)}},alpha_space:{message:"The :attribute may only contain letters and spaces.",rule:function(E){return _.helpers.testRegex(E,/^[A-Z\s]*$/i)}},alpha_num:{message:"The :attribute may only contain letters and numbers.",rule:function(E){return _.helpers.testRegex(E,/^[A-Z0-9]*$/i)}},alpha_num_space:{message:"The :attribute may only contain letters, numbers, and spaces.",rule:function(E){return _.helpers.testRegex(E,/^[A-Z0-9\s]*$/i)}},alpha_num_dash:{message:"The :attribute may only contain letters, numbers, and dashes.",rule:function(E){return _.helpers.testRegex(E,/^[A-Z0-9_-]*$/i)}},alpha_num_dash_space:{message:"The :attribute may only contain letters, numbers, dashes, and spaces.",rule:function(E){return _.helpers.testRegex(E,/^[A-Z0-9_-\s]*$/i)}},array:{message:"The :attribute must be an array.",rule:function(E){return Array.isArray(E)}},before:{message:"The :attribute must be before :date.",rule:function(E,T){return _.helpers.momentInstalled()&&moment.isMoment(E)&&E.isBefore(T[0],"day")},messageReplace:function(E,T){return E.replace(":date",T[0].format("MM/DD/YYYY"))}},before_or_equal:{message:"The :attribute must be before or on :date.",rule:function(E,T){return _.helpers.momentInstalled()&&moment.isMoment(E)&&E.isSameOrBefore(T[0],"day")},messageReplace:function(E,T){return E.replace(":date",T[0].format("MM/DD/YYYY"))}},between:{message:"The :attribute must be between :min and :max:type.",rule:function(E,T){return _.helpers.size(E,T[2])>=parseFloat(T[0])&&_.helpers.size(E,T[2])<=parseFloat(T[1])},messageReplace:function(E,T){return E.replace(":min",T[0]).replace(":max",T[1]).replace(":type",_.helpers.sizeText(T[2]))}},boolean:{message:"The :attribute must be a boolean.",rule:function(E){return E===!1||E===!0}},card_exp:{message:"The :attribute must be a valid expiration date.",rule:function(E){return _.helpers.testRegex(E,/^(([0]?[1-9]{1})|([1]{1}[0-2]{1}))\s?\/\s?(\d{2}|\d{4})$/)}},card_num:{message:"The :attribute must be a valid credit card number.",rule:function(E){return _.helpers.testRegex(E,/^\d{4}\s?\d{4,6}\s?\d{4,5}\s?\d{0,8}$/)}},currency:{message:"The :attribute must be a valid currency.",rule:function(E){return _.helpers.testRegex(E,/^\$?(\d{1,3})(\,?\d{3})*\.?\d{0,2}$/)}},date:{message:"The :attribute must be a date.",rule:function(E){return _.helpers.momentInstalled()&&moment.isMoment(E)}},date_equals:{message:"The :attribute must be on :date.",rule:function(E,T){return _.helpers.momentInstalled()&&moment.isMoment(E)&&E.isSame(T[0],"day")},messageReplace:function(E,T){return E.replace(":date",T[0].format("MM/DD/YYYY"))}},email:{message:"The :attribute must be a valid email address.",rule:function(E){return _.helpers.testRegex(E,/^[A-Z0-9.!#$%&'*+-/=?^_`{|}~]+@[A-Z0-9.-]+\.[A-Z]{2,}$/i)}},in:{message:"The selected :attribute must be :values.",rule:function(E,T){return T.includes(E)},messageReplace:function(E,T){return E.replace(":values",_.helpers.toSentence(T))}},integer:{message:"The :attribute must be an integer.",rule:function(E){return _.helpers.testRegex(E,/^\-?\d*$/)}},max:{message:"The :attribute may not be greater than :max:type.",rule:function(E,T){return _.helpers.size(E,T[1])<=parseFloat(T[0])},messageReplace:function(E,T){return E.replace(":max",T[0]).replace(":type",_.helpers.sizeText(T[1]))}},min:{message:"The :attribute must be at least :min:type.",rule:function(E,T){return _.helpers.size(E,T[1])>=parseFloat(T[0])},messageReplace:function(E,T){return E.replace(":min",T[0]).replace(":type",_.helpers.sizeText(T[1]))}},not_in:{message:"The selected :attribute must not be :values.",rule:function(E,T){return!T.includes(E)},messageReplace:function(E,T){return E.replace(":values",_.helpers.toSentence(T))}},not_regex:{message:"The :attribute must not match the required pattern.",rule:function(E,T){return!_.helpers.testRegex(E,typeof T[0]=="string"||T[0]instanceof String?new RegExp(T[0]):T[0])}},numeric:{message:"The :attribute must be a number.",rule:function(E){return _.helpers.testRegex(E,/^\-?\d*\.?\d+$/)}},phone:{message:"The :attribute must be a valid phone number.",rule:function(E){return _.helpers.testRegex(E,/^(\+?\d{0,4})?\s?-?\s?(\(?\d{3}\)?)\s?-?\s?(\(?\d{3}\)?)\s?-?\s?(\(?\d{4}\)?)$/)&&!_.helpers.testRegex(E,/^\b(\d)\1{8,}\b$/)}},regex:{message:"The :attribute must match the required pattern.",rule:function(E,T){return _.helpers.testRegex(E,typeof T[0]=="string"||T[0]instanceof String?new RegExp(T[0]):T[0])}},required:{message:"The :attribute field is required.",rule:function(E){return!_.helpers.isBlank(E)},required:!0},size:{message:"The :attribute must be :size:type.",rule:function(E,T){return _.helpers.size(E,T[1])==parseFloat(T[0])},messageReplace:function(E,T){return E.replace(":size",T[0]).replace(":type",_.helpers.sizeText(T[1]))}},string:{message:"The :attribute must be a string.",rule:function(E){return s(E)===s("string")}},typeof:{message:"The :attribute is not the correct type of :type.",rule:function(E,T){return s(E)===s(T[0])},messageReplace:function(E,T){return E.replace(":type",s(T[0]))}},url:{message:"The :attribute must be a url.",rule:function(E){return _.helpers.testRegex(E,/^https?:\/\/[-a-z0-9@:%._\+~#=]{1,256}\.[a-z0-9()]{2,6}\b([-a-z0-9()@:%_\+.~#?&//=]*)$/i)}}},w.validators||{}),w.locale&&!y.locales.hasOwnProperty(w.locale)&&console.warn("Locale not found! Make sure it is spelled correctly and the locale file is loaded.");var C=y.locales[w.locale]||{};Object.keys(this.rules).forEach(function(E){_.rules[E].message=C[E]||_.rules[E].message}),this.messages=w.messages||{},this.className=w.className,this.autoForceUpdate=w.autoForceUpdate||!1,w.element===!1?this.element=function(E){return E}:w.hasOwnProperty("element")?this.element=w.element:(typeof navigator=="undefined"?"undefined":s(navigator))==="object"&&navigator.product==="ReactNative"?this.element=function(E){return E}:this.element=function(E,T){return r.createElement("div",{className:T||_.className||"srv-validation-message"},E)}}return m(y,null,[{key:"addLocale",value:function(_,w){this.locales[_]=w}}]),m(y,[{key:"getErrorMessages",value:function(){return this.errorMessages}},{key:"showMessages",value:function(){this.messagesShown=!0,this.helpers.forceUpdateIfNeeded()}},{key:"hideMessages",value:function(){this.messagesShown=!1,this.helpers.forceUpdateIfNeeded()}},{key:"allValid",value:function(){for(var _ in this.fields)if(this.fieldValid(_)===!1)return!1;return!0}},{key:"fieldValid",value:function(_){return this.fields.hasOwnProperty(_)&&this.fields[_]===!0}},{key:"purgeFields",value:function(){this.fields={},this.errorMessages={}}},{key:"messageWhenPresent",value:function(_){var w=1<arguments.length&&arguments[1]!==void 0?arguments[1]:{};if(!this.helpers.isBlank(_)&&this.messagesShown)return this.helpers.element(_,w)}},{key:"messageAlways",value:function(_,w){var C=2<arguments.length&&arguments[2]!==void 0?arguments[2]:{};if(console.warn("The messageAlways() method is deprecated in SimpleReactValidator. Please see the documentation and switch to the messageWhenPresent() method."),w&&this.messagesShown)return this.helpers.element(w,C)}},{key:"check",value:function(_,w){var C=2<arguments.length&&arguments[2]!==void 0?arguments[2]:{};Array.isArray(w)||(w=w.split("|"));var E,T=C.validators?u(u({},this.rules),C.validators):this.rules,A=i(w);try{for(A.s();!(E=A.n()).done;){var k=E.value,X=n(this.helpers.normalizeValues(_,k),3),Z=X[0],W=X[1],D=X[2];if(!this.helpers.passes(W,Z,D,T))return!1}}catch(H){A.e(H)}finally{A.f()}return!0}},{key:"message",value:function(_,w,C){var E=3<arguments.length&&arguments[3]!==void 0?arguments[3]:{};this.errorMessages[_]=null,this.fields[_]=!0,Array.isArray(C)||(C=C.split("|"));var T,A=E.validators?u(u({},this.rules),E.validators):this.rules,k=i(C);try{for(k.s();!(T=k.n()).done;){var X=T.value,Z=n(this.helpers.normalizeValues(w,X),3),W=Z[0],D=Z[1],H=Z[2];if(!this.helpers.passes(D,W,H,A)){this.fields[_]=!1;var N=this.helpers.message(D,_,E,A);if(0<H.length&&A[D].hasOwnProperty("messageReplace")&&(N=A[D].messageReplace(N,H)),this.errorMessages[_]=N,this.messagesShown||this.visibleFields.includes(_))return this.helpers.element(N,E)}}}catch(j){k.e(j)}finally{k.f()}}}]),y}();return v(x,"version","1.5.1"),v(x,"locales",{en:{}}),x})})(kre);var uRt=kre.exports,Ore=Object.prototype.hasOwnProperty;function Lre(t,e,r){for(r of t.keys())if(vC(r,e))return r}function vC(t,e){var r,n,i;if(t===e)return!0;if(t&&e&&(r=t.constructor)===e.constructor){if(r===Date)return t.getTime()===e.getTime();if(r===RegExp)return t.toString()===e.toString();if(r===Array){if((n=t.length)===e.length)for(;n--&&vC(t[n],e[n]););return n===-1}if(r===Set){if(t.size!==e.size)return!1;for(n of t)if(i=n,i&&typeof i=="object"&&(i=Lre(e,i),!i)||!e.has(i))return!1;return!0}if(r===Map){if(t.size!==e.size)return!1;for(n of t)if(i=n[0],i&&typeof i=="object"&&(i=Lre(e,i),!i)||!vC(n[1],e.get(i)))return!1;return!0}if(r===ArrayBuffer)t=new Uint8Array(t),e=new Uint8Array(e);else if(r===DataView){if((n=t.byteLength)===e.byteLength)for(;n--&&t.getInt8(n)===e.getInt8(n););return n===-1}if(ArrayBuffer.isView(t)){if((n=t.byteLength)===e.byteLength)for(;n--&&t[n]===e[n];);return n===-1}if(!r||typeof t=="object"){n=0;for(r in t)if(Ore.call(t,r)&&++n&&!Ore.call(e,r)||!(r in e)||!vC(t[r],e[r]))return!1;return Object.keys(e).length===n}}return t!==t&&e!==e}function Dre(t){var e=Y.exports.useRef(),r=Y.exports.useRef(0);return vC(t,e.current)||(e.current=t,r.current+=1),[r.current]}function fRt(t,e){return Y.exports.useEffect(t,Dre(e))}function dRt(t,e){return Y.exports.useEffect(t,Dre(e))}var E6e=Math.ceil,S6e=Math.max;function T6e(t,e,r,n){for(var i=-1,o=S6e(E6e((e-t)/(r||1)),0),a=Array(o);o--;)a[n?o:++i]=t,t+=r;return a}var P6e=T6e,I6e=P6e,M6e=QP,g7=vte;function A6e(t){return function(e,r,n){return n&&typeof n!="number"&&M6e(e,r,n)&&(r=n=void 0),e=g7(e),r===void 0?(r=e,e=0):r=g7(r),n=n===void 0?e<r?1:-1:g7(n),I6e(e,r,n,t)}}var R6e=A6e,k6e=R6e,O6e=k6e(),hRt=O6e,L6e=Ro(Y.exports.createElement("path",{d:"M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"})),D6e=Ro(Y.exports.createElement("path",{d:"M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"})),N6e=Ro(Y.exports.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"})),$6e=Ro(Y.exports.createElement("path",{d:"M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z"})),Nre=Ro(Y.exports.createElement("path",{d:"M19 6.41L17.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"})),F6e=function(e){var r=e.palette.type==="light"?z2:B2,n=e.palette.type==="light"?B2:z2;return{root:vt({},e.typography.body2,{borderRadius:e.shape.borderRadius,backgroundColor:"transparent",display:"flex",padding:"6px 16px"}),standardSuccess:{color:r(e.palette.success.main,.6),backgroundColor:n(e.palette.success.main,.9),"& $icon":{color:e.palette.success.main}},standardInfo:{color:r(e.palette.info.main,.6),backgroundColor:n(e.palette.info.main,.9),"& $icon":{color:e.palette.info.main}},standardWarning:{color:r(e.palette.warning.main,.6),backgroundColor:n(e.palette.warning.main,.9),"& $icon":{color:e.palette.warning.main}},standardError:{color:r(e.palette.error.main,.6),backgroundColor:n(e.palette.error.main,.9),"& $icon":{color:e.palette.error.main}},outlinedSuccess:{color:r(e.palette.success.main,.6),border:"1px solid ".concat(e.palette.success.main),"& $icon":{color:e.palette.success.main}},outlinedInfo:{color:r(e.palette.info.main,.6),border:"1px solid ".concat(e.palette.info.main),"& $icon":{color:e.palette.info.main}},outlinedWarning:{color:r(e.palette.warning.main,.6),border:"1px solid ".concat(e.palette.warning.main),"& $icon":{color:e.palette.warning.main}},outlinedError:{color:r(e.palette.error.main,.6),border:"1px solid ".concat(e.palette.error.main),"& $icon":{color:e.palette.error.main}},filledSuccess:{color:"#fff",fontWeight:e.typography.fontWeightMedium,backgroundColor:e.palette.success.main},filledInfo:{color:"#fff",fontWeight:e.typography.fontWeightMedium,backgroundColor:e.palette.info.main},filledWarning:{color:"#fff",fontWeight:e.typography.fontWeightMedium,backgroundColor:e.palette.warning.main},filledError:{color:"#fff",fontWeight:e.typography.fontWeightMedium,backgroundColor:e.palette.error.main},icon:{marginRight:12,padding:"7px 0",display:"flex",fontSize:22,opacity:.9},message:{padding:"8px 0"},action:{display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8}}},$re={success:Y.exports.createElement(L6e,{fontSize:"inherit"}),warning:Y.exports.createElement(D6e,{fontSize:"inherit"}),error:Y.exports.createElement(N6e,{fontSize:"inherit"}),info:Y.exports.createElement($6e,{fontSize:"inherit"})},z6e=Y.exports.createElement(Nre,{fontSize:"small"}),B6e=Y.exports.forwardRef(function(e,r){var n=e.action,i=e.children,o=e.classes,a=e.className,s=e.closeText,l=s===void 0?"Close":s,u=e.color,p=e.icon,m=e.iconMapping,v=m===void 0?$re:m,x=e.onClose,y=e.role,_=y===void 0?"alert":y,w=e.severity,C=w===void 0?"success":w,E=e.variant,T=E===void 0?"standard":E,A=nn(e,["action","children","classes","className","closeText","color","icon","iconMapping","onClose","role","severity","variant"]);return Y.exports.createElement(F1,vt({role:_,square:!0,elevation:0,className:Lr(o.root,o["".concat(T).concat(ni(u||C))],a),ref:r},A),p!==!1?Y.exports.createElement("div",{className:o.icon},p||v[C]||$re[C]):null,Y.exports.createElement("div",{className:o.message},i),n!=null?Y.exports.createElement("div",{className:o.action},n):null,n==null&&x?Y.exports.createElement("div",{className:o.action},Y.exports.createElement(jP,{size:"small","aria-label":l,title:l,color:"inherit",onClick:x},z6e)):null)}),pRt=Dn(F6e,{name:"MuiAlert"})(B6e),j6e=Ro(Y.exports.createElement("path",{d:"M7 10l5 5 5-5z"}));function Fre(t){return typeof t.normalize!="undefined"?t.normalize("NFD").replace(/[\u0300-\u036f]/g,""):t}function U6e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=t.ignoreAccents,r=e===void 0?!0:e,n=t.ignoreCase,i=n===void 0?!0:n,o=t.limit,a=t.matchFrom,s=a===void 0?"any":a,l=t.stringify,u=t.trim,p=u===void 0?!1:u;return function(m,v){var x=v.inputValue,y=v.getOptionLabel,_=p?x.trim():x;i&&(_=_.toLowerCase()),r&&(_=Fre(_));var w=m.filter(function(C){var E=(l||y)(C);return i&&(E=E.toLowerCase()),r&&(E=Fre(E)),s==="start"?E.indexOf(_)===0:E.indexOf(_)>-1});return typeof o=="number"?w.slice(0,o):w}}function v7(t,e){for(var r=0;r<t.length;r+=1)if(e(t[r]))return r;return-1}var V6e=U6e(),zre=5;function H6e(t){var e=t.autoComplete,r=e===void 0?!1:e,n=t.autoHighlight,i=n===void 0?!1:n,o=t.autoSelect,a=o===void 0?!1:o,s=t.blurOnSelect,l=s===void 0?!1:s,u=t.clearOnBlur,p=u===void 0?!t.freeSolo:u,m=t.clearOnEscape,v=m===void 0?!1:m,x=t.componentName,y=x===void 0?"useAutocomplete":x,_=t.debug,w=_===void 0?!1:_,C=t.defaultValue,E=C===void 0?t.multiple?[]:null:C,T=t.disableClearable,A=T===void 0?!1:T,k=t.disableCloseOnSelect,X=k===void 0?!1:k,Z=t.disabledItemsFocusable,W=Z===void 0?!1:Z,D=t.disableListWrap,H=D===void 0?!1:D,N=t.filterOptions,j=N===void 0?V6e:N,$=t.filterSelectedOptions,z=$===void 0?!1:$,O=t.freeSolo,F=O===void 0?!1:O,G=t.getOptionDisabled,q=t.getOptionLabel,ee=q===void 0?function(fn){return fn}:q,re=t.getOptionSelected,ce=re===void 0?function(fn,an){return fn===an}:re,fe=t.groupBy,J=t.handleHomeEndKeys,oe=J===void 0?!t.freeSolo:J,ve=t.id,ye=t.includeInputInList,xe=ye===void 0?!1:ye,se=t.inputValue,me=t.multiple,pe=me===void 0?!1:me,Ce=t.onChange,Pe=t.onClose,Re=t.onHighlightChange,ke=t.onInputChange,ze=t.onOpen,Ge=t.open,ht=t.openOnFocus,Tt=ht===void 0?!1:ht,xt=t.options,pt=t.selectOnFocus,It=pt===void 0?!t.freeSolo:pt,Ie=t.value,de=pL(ve),Te=ee,Be=Y.exports.useRef(!1),Ke=Y.exports.useRef(!0),ot=Y.exports.useRef(null),Ze=Y.exports.useRef(null),Je=Y.exports.useState(null),St=Je[0],er=Je[1],Ft=Y.exports.useState(-1),Ut=Ft[0],Er=Ft[1],kr=i?0:-1,mr=Y.exports.useRef(kr),Dt=Bg({controlled:Ie,default:E,name:y}),Jr=qf(Dt,2),We=Jr[0],Oe=Jr[1],$e=Bg({controlled:se,default:"",name:y,state:"inputValue"}),Xe=qf($e,2),tt=Xe[0],_t=Xe[1],Ot=Y.exports.useState(!1),Nt=Ot[0],bt=Ot[1],Wt=As(function(fn,an){var Dr;if(pe)Dr="";else if(an==null)Dr="";else{var Rn=Te(an);Dr=typeof Rn=="string"?Rn:""}tt!==Dr&&(_t(Dr),ke&&ke(fn,Dr,"reset"))});Y.exports.useEffect(function(){Wt(null,We)},[We,Wt]);var Sr=Bg({controlled:Ge,default:!1,name:y,state:"open"}),rr=qf(Sr,2),tr=rr[0],sn=rr[1],un=!pe&&We!=null&&tt===Te(We),Ye=tr,Ve=Ye?j(xt.filter(function(fn){return!(z&&(pe?We:[We]).some(function(an){return an!==null&&ce(fn,an)}))}),{inputValue:un?"":tt,getOptionLabel:Te}):[],gt=As(function(fn){fn===-1?ot.current.focus():St.querySelector('[data-tag-index="'.concat(fn,'"]')).focus()});Y.exports.useEffect(function(){pe&&Ut>We.length-1&&(Er(-1),gt(-1))},[We,pe,Ut,gt]);function qt(fn,an){if(!Ze.current||fn===-1)return-1;for(var Dr=fn;;){if(an==="next"&&Dr===Ve.length||an==="previous"&&Dr===-1)return-1;var Rn=Ze.current.querySelector('[data-option-index="'.concat(Dr,'"]')),zr=W?!1:Rn&&(Rn.disabled||Rn.getAttribute("aria-disabled")==="true");if(Rn&&!Rn.hasAttribute("tabindex")||zr)Dr+=an==="next"?1:-1;else return Dr}}var Ht=As(function(fn){var an=fn.event,Dr=fn.index,Rn=fn.reason,zr=Rn===void 0?"auto":Rn;if(mr.current=Dr,Dr===-1?ot.current.removeAttribute("aria-activedescendant"):ot.current.setAttribute("aria-activedescendant","".concat(de,"-option-").concat(Dr)),Re&&Re(an,Dr===-1?null:Ve[Dr],zr),!!Ze.current){var Fn=Ze.current.querySelector("[data-focus]");Fn&&Fn.removeAttribute("data-focus");var Tn=Ze.current.parentElement.querySelector('[role="listbox"]');if(!!Tn){if(Dr===-1){Tn.scrollTop=0;return}var ls=Ze.current.querySelector('[data-option-index="'.concat(Dr,'"]'));if(!!ls&&(ls.setAttribute("data-focus","true"),Tn.scrollHeight>Tn.clientHeight&&zr!=="mouse")){var Uo=ls,ri=Tn.clientHeight+Tn.scrollTop,$s=Uo.offsetTop+Uo.offsetHeight;$s>ri?Tn.scrollTop=$s-Tn.clientHeight:Uo.offsetTop-Uo.offsetHeight*(fe?1.3:0)<Tn.scrollTop&&(Tn.scrollTop=Uo.offsetTop-Uo.offsetHeight*(fe?1.3:0))}}}}),on=As(function(fn){var an=fn.event,Dr=fn.diff,Rn=fn.direction,zr=Rn===void 0?"next":Rn,Fn=fn.reason,Tn=Fn===void 0?"auto":Fn;if(!!Ye){var ls=function(){var Se=Ve.length-1;if(Dr==="reset")return kr;if(Dr==="start")return 0;if(Dr==="end")return Se;var Ue=mr.current+Dr;return Ue<0?Ue===-1&&xe?-1:H&&mr.current!==-1||Math.abs(Dr)>1?0:Se:Ue>Se?Ue===Se+1&&xe?-1:H||Math.abs(Dr)>1?Se:0:Ue},Uo=qt(ls(),zr);if(Ht({index:Uo,reason:Tn,event:an}),r&&Dr!=="reset")if(Uo===-1)ot.current.value=tt;else{var ri=Te(Ve[Uo]);ot.current.value=ri;var $s=ri.toLowerCase().indexOf(tt.toLowerCase());$s===0&&tt.length>0&&ot.current.setSelectionRange(tt.length,ri.length)}}}),$t=Y.exports.useCallback(function(){if(!!Ye){var fn=pe?We[0]:We;if(Ve.length===0||fn==null){on({diff:"reset"});return}if(!!Ze.current){if(!z&&fn!=null){var an=Ve[mr.current];if(pe&&an&&v7(We,function(Rn){return ce(an,Rn)})!==-1)return;var Dr=v7(Ve,function(Rn){return ce(Rn,fn)});Dr===-1?on({diff:"reset"}):Ht({index:Dr});return}if(mr.current>=Ve.length-1){Ht({index:Ve.length-1});return}Ht({index:mr.current})}}},[Ve.length===0,pe?!1:We,z,on,Ht,Ye,tt,pe]),Gt=As(function(fn){hy(Ze,fn),!!fn&&$t()});Y.exports.useEffect(function(){$t()},[$t]);var Ir=function(an){tr||(sn(!0),ze&&ze(an))},Br=function(an,Dr){!tr||(sn(!1),Pe&&Pe(an,Dr))},Xr=function(an,Dr,Rn,zr){We!==Dr&&(Ce&&Ce(an,Dr,Rn,zr),Oe(Dr))},Vn=Y.exports.useRef(!1),Ln=function(an,Dr){var Rn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"select-option",zr=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"options",Fn=Rn,Tn=Dr;if(pe){Tn=Array.isArray(We)?We.slice():[];var ls=v7(Tn,function(Uo){return ce(Dr,Uo)});ls===-1?Tn.push(Dr):zr!=="freeSolo"&&(Tn.splice(ls,1),Fn="remove-option")}Wt(an,Tn),Xr(an,Tn,Fn,{option:Dr}),X||Br(an,Fn),(l===!0||l==="touch"&&Vn.current||l==="mouse"&&!Vn.current)&&ot.current.blur()};function br(fn,an){if(fn===-1)return-1;for(var Dr=fn;;){if(an==="next"&&Dr===We.length||an==="previous"&&Dr===-1)return-1;var Rn=St.querySelector('[data-tag-index="'.concat(Dr,'"]'));if(Rn&&(!Rn.hasAttribute("tabindex")||Rn.disabled||Rn.getAttribute("aria-disabled")==="true"))Dr+=an==="next"?1:-1;else return Dr}}var oi=function(an,Dr){if(!!pe){Br(an,"toggleInput");var Rn=Ut;Ut===-1?tt===""&&Dr==="previous"&&(Rn=We.length-1):(Rn+=Dr==="next"?1:-1,Rn<0&&(Rn=0),Rn===We.length&&(Rn=-1)),Rn=br(Rn,Dr),Er(Rn),gt(Rn)}},Gi=function(an){Be.current=!0,_t(""),ke&&ke(an,"","clear"),Xr(an,pe?[]:null,"clear")},pi=function(an){return function(Dr){switch(Ut!==-1&&["ArrowLeft","ArrowRight"].indexOf(Dr.key)===-1&&(Er(-1),gt(-1)),Dr.key){case"Home":Ye&&oe&&(Dr.preventDefault(),on({diff:"start",direction:"next",reason:"keyboard",event:Dr}));break;case"End":Ye&&oe&&(Dr.preventDefault(),on({diff:"end",direction:"previous",reason:"keyboard",event:Dr}));break;case"PageUp":Dr.preventDefault(),on({diff:-zre,direction:"previous",reason:"keyboard",event:Dr}),Ir(Dr);break;case"PageDown":Dr.preventDefault(),on({diff:zre,direction:"next",reason:"keyboard",event:Dr}),Ir(Dr);break;case"ArrowDown":Dr.preventDefault(),on({diff:1,direction:"next",reason:"keyboard",event:Dr}),Ir(Dr);break;case"ArrowUp":Dr.preventDefault(),on({diff:-1,direction:"previous",reason:"keyboard",event:Dr}),Ir(Dr);break;case"ArrowLeft":oi(Dr,"previous");break;case"ArrowRight":oi(Dr,"next");break;case"Enter":if(Dr.which===229)break;if(mr.current!==-1&&Ye){var Rn=Ve[mr.current],zr=G?G(Rn):!1;if(Dr.preventDefault(),zr)return;Ln(Dr,Rn,"select-option"),r&&ot.current.setSelectionRange(ot.current.value.length,ot.current.value.length)}else F&&tt!==""&&un===!1&&(pe&&Dr.preventDefault(),Ln(Dr,tt,"create-option","freeSolo"));break;case"Escape":Ye?(Dr.preventDefault(),Dr.stopPropagation(),Br(Dr,"escape")):v&&(tt!==""||pe&&We.length>0)&&(Dr.preventDefault(),Dr.stopPropagation(),Gi(Dr));break;case"Backspace":if(pe&&tt===""&&We.length>0){var Fn=Ut===-1?We.length-1:Ut,Tn=We.slice();Tn.splice(Fn,1),Xr(Dr,Tn,"remove-option",{option:We[Fn]})}break}an.onKeyDown&&an.onKeyDown(Dr)}},Ds=function(an){bt(!0),Tt&&!Be.current&&Ir(an)},Xo=function(an){if(Ze.current!==null&&document.activeElement===Ze.current.parentElement){ot.current.focus();return}bt(!1),Ke.current=!0,Be.current=!1,!(w&&tt!=="")&&(a&&mr.current!==-1&&Ye?Ln(an,Ve[mr.current],"blur"):a&&F&&tt!==""?Ln(an,tt,"blur","freeSolo"):p&&Wt(an,We),Br(an,"blur"))},jo=function(an){var Dr=an.target.value;tt!==Dr&&(_t(Dr),ke&&ke(an,Dr,"input")),Dr===""?!A&&!pe&&Xr(an,null,"clear"):Ir(an)},Qa=function(an){Ht({event:an,index:Number(an.currentTarget.getAttribute("data-option-index")),reason:"mouse"})},za=function(){Vn.current=!0},es=function(an){var Dr=Number(an.currentTarget.getAttribute("data-option-index"));Ln(an,Ve[Dr],"select-option"),Vn.current=!1},Pi=function(an){return function(Dr){var Rn=We.slice();Rn.splice(an,1),Xr(Dr,Rn,"remove-option",{option:We[an]})}},Ns=function(an){tr?Br(an,"toggleInput"):Ir(an)},dr=function(an){an.target.getAttribute("id")!==de&&an.preventDefault()},Oi=function(){ot.current.focus(),It&&Ke.current&&ot.current.selectionEnd-ot.current.selectionStart==0&&ot.current.select(),Ke.current=!1},Li=function(an){(tt===""||!tr)&&Ns(an)},ho=F&&tt.length>0;ho=ho||(pe?We.length>0:We!==null);var qs=Ve;return fe&&(qs=Ve.reduce(function(fn,an,Dr){var Rn=fe(an);return fn.length>0&&fn[fn.length-1].group===Rn?fn[fn.length-1].options.push(an):fn.push({key:Dr,index:Dr,group:Rn,options:[an]}),fn},[])),{getRootProps:function(){var an=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return vt({"aria-owns":Ye?"".concat(de,"-popup"):null,role:"combobox","aria-expanded":Ye},an,{onKeyDown:pi(an),onMouseDown:dr,onClick:Oi})},getInputLabelProps:function(){return{id:"".concat(de,"-label"),htmlFor:de}},getInputProps:function(){return{id:de,value:tt,onBlur:Xo,onFocus:Ds,onChange:jo,onMouseDown:Li,"aria-activedescendant":Ye?"":null,"aria-autocomplete":r?"both":"list","aria-controls":Ye?"".concat(de,"-popup"):null,autoComplete:"off",ref:ot,autoCapitalize:"none",spellCheck:"false"}},getClearProps:function(){return{tabIndex:-1,onClick:Gi}},getPopupIndicatorProps:function(){return{tabIndex:-1,onClick:Ns}},getTagProps:function(an){var Dr=an.index;return{key:Dr,"data-tag-index":Dr,tabIndex:-1,onDelete:Pi(Dr)}},getListboxProps:function(){return{role:"listbox",id:"".concat(de,"-popup"),"aria-labelledby":"".concat(de,"-label"),ref:Gt,onMouseDown:function(Dr){Dr.preventDefault()}}},getOptionProps:function(an){var Dr=an.index,Rn=an.option,zr=(pe?We:[We]).some(function(Tn){return Tn!=null&&ce(Rn,Tn)}),Fn=G?G(Rn):!1;return{key:Dr,tabIndex:-1,role:"option",id:"".concat(de,"-option-").concat(Dr),onMouseOver:Qa,onClick:es,onTouchStart:za,"data-option-index":Dr,"aria-disabled":Fn,"aria-selected":zr}},id:de,inputValue:tt,value:We,dirty:ho,popupOpen:Ye,focused:Nt||Ut!==-1,anchorEl:St,setAnchorEl:er,focusedTag:Ut,groupedOptions:qs}}var W6e=function(e){var r;return{root:{"&$focused $clearIndicatorDirty":{visibility:"visible"},"@media (pointer: fine)":{"&:hover $clearIndicatorDirty":{visibility:"visible"}}},fullWidth:{width:"100%"},focused:{},tag:{margin:3,maxWidth:"calc(100% - 6px)"},tagSizeSmall:{margin:2,maxWidth:"calc(100% - 4px)"},hasPopupIcon:{},hasClearIcon:{},inputRoot:{flexWrap:"wrap","$hasPopupIcon &, $hasClearIcon &":{paddingRight:26+4},"$hasPopupIcon$hasClearIcon &":{paddingRight:52+4},"& $input":{width:0,minWidth:30},'&[class*="MuiInput-root"]':{paddingBottom:1,"& $input":{padding:4},"& $input:first-child":{padding:"6px 0"}},'&[class*="MuiInput-root"][class*="MuiInput-marginDense"]':{"& $input":{padding:"4px 4px 5px"},"& $input:first-child":{padding:"3px 0 6px"}},'&[class*="MuiOutlinedInput-root"]':{padding:9,"$hasPopupIcon &, $hasClearIcon &":{paddingRight:26+4+9},"$hasPopupIcon$hasClearIcon &":{paddingRight:52+4+9},"& $input":{padding:"9.5px 4px"},"& $input:first-child":{paddingLeft:6},"& $endAdornment":{right:9}},'&[class*="MuiOutlinedInput-root"][class*="MuiOutlinedInput-marginDense"]':{padding:6,"& $input":{padding:"4.5px 4px"}},'&[class*="MuiFilledInput-root"]':{paddingTop:19,paddingLeft:8,"$hasPopupIcon &, $hasClearIcon &":{paddingRight:26+4+9},"$hasPopupIcon$hasClearIcon &":{paddingRight:52+4+9},"& $input":{padding:"9px 4px"},"& $endAdornment":{right:9}},'&[class*="MuiFilledInput-root"][class*="MuiFilledInput-marginDense"]':{paddingBottom:1,"& $input":{padding:"4.5px 4px"}}},input:{flexGrow:1,textOverflow:"ellipsis",opacity:0},inputFocused:{opacity:1},endAdornment:{position:"absolute",right:0,top:"calc(50% - 14px)"},clearIndicator:{marginRight:-2,padding:4,visibility:"hidden"},clearIndicatorDirty:{},popupIndicator:{padding:2,marginRight:-2},popupIndicatorOpen:{transform:"rotate(180deg)"},popper:{zIndex:e.zIndex.modal},popperDisablePortal:{position:"absolute"},paper:vt({},e.typography.body1,{overflow:"hidden",margin:"4px 0"}),listbox:{listStyle:"none",margin:0,padding:"8px 0",maxHeight:"40vh",overflow:"auto"},loading:{color:e.palette.text.secondary,padding:"14px 16px"},noOptions:{color:e.palette.text.secondary,padding:"14px 16px"},option:(r={minHeight:48,display:"flex",justifyContent:"flex-start",alignItems:"center",cursor:"pointer",paddingTop:6,boxSizing:"border-box",outline:"0",WebkitTapHighlightColor:"transparent",paddingBottom:6,paddingLeft:16,paddingRight:16},Fi(r,e.breakpoints.up("sm"),{minHeight:"auto"}),Fi(r,'&[aria-selected="true"]',{backgroundColor:e.palette.action.selected}),Fi(r,'&[data-focus="true"]',{backgroundColor:e.palette.action.hover}),Fi(r,"&:active",{backgroundColor:e.palette.action.selected}),Fi(r,'&[aria-disabled="true"]',{opacity:e.palette.action.disabledOpacity,pointerEvents:"none"}),r),groupLabel:{backgroundColor:e.palette.background.paper,top:-8},groupUl:{padding:0,"& $option":{paddingLeft:24}}}};function G6e(t){t.anchorEl,t.open;var e=nn(t,["anchorEl","open"]);return Y.exports.createElement("div",e)}var q6e=Y.exports.createElement(Nre,{fontSize:"small"}),X6e=Y.exports.createElement(j6e,null),Y6e=Y.exports.forwardRef(function(e,r){e.autoComplete,e.autoHighlight,e.autoSelect,e.blurOnSelect;var n=e.ChipProps,i=e.classes,o=e.className,a=e.clearOnBlur;a===void 0&&e.freeSolo,e.clearOnEscape;var s=e.clearText,l=s===void 0?"Clear":s,u=e.closeIcon,p=u===void 0?q6e:u,m=e.closeText,v=m===void 0?"Close":m;e.debug;var x=e.defaultValue;x===void 0&&e.multiple;var y=e.disableClearable,_=y===void 0?!1:y;e.disableCloseOnSelect;var w=e.disabled,C=w===void 0?!1:w;e.disabledItemsFocusable,e.disableListWrap;var E=e.disablePortal,T=E===void 0?!1:E;e.filterOptions,e.filterSelectedOptions;var A=e.forcePopupIcon,k=A===void 0?"auto":A,X=e.freeSolo,Z=X===void 0?!1:X,W=e.fullWidth,D=W===void 0?!1:W,H=e.getLimitTagsText,N=H===void 0?function(Ye){return"+".concat(Ye)}:H;e.getOptionDisabled;var j=e.getOptionLabel,$=j===void 0?function(Ye){return Ye}:j;e.getOptionSelected;var z=e.groupBy,O=e.handleHomeEndKeys;O===void 0&&e.freeSolo,e.id,e.includeInputInList,e.inputValue;var F=e.limitTags,G=F===void 0?-1:F,q=e.ListboxComponent,ee=q===void 0?"ul":q,re=e.ListboxProps,ce=e.loading,fe=ce===void 0?!1:ce,J=e.loadingText,oe=J===void 0?"Loading\u2026":J,ve=e.multiple,ye=ve===void 0?!1:ve,xe=e.noOptionsText,se=xe===void 0?"No options":xe;e.onChange,e.onClose,e.onHighlightChange,e.onInputChange,e.onOpen,e.open,e.openOnFocus;var me=e.openText,pe=me===void 0?"Open":me;e.options;var Ce=e.PaperComponent,Pe=Ce===void 0?F1:Ce,Re=e.PopperComponent,ke=Re===void 0?AJ:Re,ze=e.popupIcon,Ge=ze===void 0?X6e:ze,ht=e.renderGroup,Tt=e.renderInput,xt=e.renderOption,pt=e.renderTags,It=e.selectOnFocus;It===void 0&&e.freeSolo;var Ie=e.size,de=Ie===void 0?"medium":Ie;e.value;var Te=nn(e,["autoComplete","autoHighlight","autoSelect","blurOnSelect","ChipProps","classes","className","clearOnBlur","clearOnEscape","clearText","closeIcon","closeText","debug","defaultValue","disableClearable","disableCloseOnSelect","disabled","disabledItemsFocusable","disableListWrap","disablePortal","filterOptions","filterSelectedOptions","forcePopupIcon","freeSolo","fullWidth","getLimitTagsText","getOptionDisabled","getOptionLabel","getOptionSelected","groupBy","handleHomeEndKeys","id","includeInputInList","inputValue","limitTags","ListboxComponent","ListboxProps","loading","loadingText","multiple","noOptionsText","onChange","onClose","onHighlightChange","onInputChange","onOpen","open","openOnFocus","openText","options","PaperComponent","PopperComponent","popupIcon","renderGroup","renderInput","renderOption","renderTags","selectOnFocus","size","value"]),Be=T?G6e:ke,Ke=H6e(vt({},e,{componentName:"Autocomplete"})),ot=Ke.getRootProps,Ze=Ke.getInputProps,Je=Ke.getInputLabelProps,St=Ke.getPopupIndicatorProps,er=Ke.getClearProps,Ft=Ke.getTagProps,Ut=Ke.getListboxProps,Er=Ke.getOptionProps,kr=Ke.value,mr=Ke.dirty,Dt=Ke.id,Jr=Ke.popupOpen,We=Ke.focused,Oe=Ke.focusedTag,$e=Ke.anchorEl,Xe=Ke.setAnchorEl,tt=Ke.inputValue,_t=Ke.groupedOptions,Ot;if(ye&&kr.length>0){var Nt=function(Ve){return vt({className:Lr(i.tag,de==="small"&&i.tagSizeSmall),disabled:C},Ft(Ve))};pt?Ot=pt(kr,Nt):Ot=kr.map(function(Ye,Ve){return Y.exports.createElement(pEe,vt({label:$(Ye),size:de},Nt({index:Ve}),n))})}if(G>-1&&Array.isArray(Ot)){var bt=Ot.length-G;!We&&bt>0&&(Ot=Ot.splice(0,G),Ot.push(Y.exports.createElement("span",{className:i.tag,key:Ot.length},N(bt))))}var Wt=function(Ve){return Y.exports.createElement("li",{key:Ve.key},Y.exports.createElement(qSe,{className:i.groupLabel,component:"div"},Ve.group),Y.exports.createElement("ul",{className:i.groupUl},Ve.children))},Sr=ht||Wt,rr=xt||$,tr=function(Ve,gt){var qt=Er({option:Ve,index:gt});return Y.exports.createElement("li",vt({},qt,{className:i.option}),rr(Ve,{selected:qt["aria-selected"],inputValue:tt}))},sn=!_&&!C,un=(!Z||k===!0)&&k!==!1;return Y.exports.createElement(Y.exports.Fragment,null,Y.exports.createElement("div",vt({ref:r,className:Lr(i.root,o,We&&i.focused,D&&i.fullWidth,sn&&i.hasClearIcon,un&&i.hasPopupIcon)},ot(Te)),Tt({id:Dt,disabled:C,fullWidth:!0,size:de==="small"?"small":void 0,InputLabelProps:Je(),InputProps:{ref:Xe,className:i.inputRoot,startAdornment:Ot,endAdornment:Y.exports.createElement("div",{className:i.endAdornment},sn?Y.exports.createElement(jP,vt({},er(),{"aria-label":l,title:l,className:Lr(i.clearIndicator,mr&&i.clearIndicatorDirty)}),p):null,un?Y.exports.createElement(jP,vt({},St(),{disabled:C,"aria-label":Jr?v:pe,title:Jr?v:pe,className:Lr(i.popupIndicator,Jr&&i.popupIndicatorOpen)}),Ge):null)},inputProps:vt({className:Lr(i.input,Oe===-1&&i.inputFocused),disabled:C},Ze())})),Jr&&$e?Y.exports.createElement(Be,{className:Lr(i.popper,T&&i.popperDisablePortal),style:{width:$e?$e.clientWidth:null},role:"presentation",anchorEl:$e,open:!0},Y.exports.createElement(Pe,{className:i.paper},fe&&_t.length===0?Y.exports.createElement("div",{className:i.loading},oe):null,_t.length===0&&!Z&&!fe?Y.exports.createElement("div",{className:i.noOptions},se):null,_t.length>0?Y.exports.createElement(ee,vt({className:i.listbox},Ut(),re),_t.map(function(Ye,Ve){return z?Sr({key:Ye.key,group:Ye.group,children:Ye.options.map(function(gt,qt){return tr(gt,Ye.index+qt)})}):tr(Ye,Ve)})):null)):null)}),mRt=Dn(W6e,{name:"MuiAutocomplete"})(Y6e);function mD(t){if(t==="up"||t==="down")return"vertical";if(t==="right"||t==="left")return"horizontal"}function K6e(t,e,r){return t<e?e:t>r?r:t}var bx=32,gD=16,Z6e=function(e){return{root:{zIndex:e.zIndex.speedDial,display:"flex",alignItems:"center",pointerEvents:"none"},fab:{pointerEvents:"auto"},directionUp:{flexDirection:"column-reverse","& $actions":{flexDirection:"column-reverse",marginBottom:-bx,paddingBottom:gD+bx}},directionDown:{flexDirection:"column","& $actions":{flexDirection:"column",marginTop:-bx,paddingTop:gD+bx}},directionLeft:{flexDirection:"row-reverse","& $actions":{flexDirection:"row-reverse",marginRight:-bx,paddingRight:gD+bx}},directionRight:{flexDirection:"row","& $actions":{flexDirection:"row",marginLeft:-bx,paddingLeft:gD+bx}},actions:{display:"flex",pointerEvents:"auto"},actionsClosed:{transition:"top 0s linear 0.2s",pointerEvents:"none"}}},Q6e=Y.exports.forwardRef(function(e,r){var n=e.ariaLabel,i=e.FabProps;i=i===void 0?{}:i;var o=i.ref,a=nn(i,["ref"]),s=e.children,l=e.classes,u=e.className,p=e.direction,m=p===void 0?"up":p,v=e.hidden,x=v===void 0?!1:v,y=e.icon,_=e.onBlur,w=e.onClose,C=e.onFocus,E=e.onKeyDown,T=e.onMouseEnter,A=e.onMouseLeave,k=e.onOpen,X=e.open;e.openIcon;var Z=e.TransitionComponent,W=Z===void 0?wIe:Z,D=e.transitionDuration,H=D===void 0?{enter:af.enteringScreen,exit:af.leavingScreen}:D,N=e.TransitionProps,j=nn(e,["ariaLabel","FabProps","children","classes","className","direction","hidden","icon","onBlur","onClose","onFocus","onKeyDown","onMouseEnter","onMouseLeave","onOpen","open","openIcon","TransitionComponent","transitionDuration","TransitionProps"]),$=Y.exports.useRef();Y.exports.useEffect(function(){return function(){clearTimeout($.current)}},[]);var z=Y.exports.useRef(0),O=Y.exports.useRef(),F=Y.exports.useRef([]);F.current=[F.current[0]];var G=Y.exports.useCallback(function(xe){F.current[0]=xe},[]),q=Fo(o,G),ee=function(se,me){return function(pe){F.current[se+1]=pe,me&&me(pe)}},re=function(se){E&&E(se);var me=se.key.replace("Arrow","").toLowerCase(),pe=O.current,Ce=pe===void 0?me:pe;if(se.key==="Escape"){w&&(F.current[0].focus(),w(se,"escapeKeyDown"));return}if(mD(me)===mD(Ce)&&mD(me)!==void 0){se.preventDefault();var Pe=me===Ce?1:-1,Re=K6e(z.current+Pe,0,F.current.length-1);F.current[Re].focus(),z.current=Re,O.current=Ce}};Y.exports.useEffect(function(){X||(z.current=0,O.current=void 0)},[X]);var ce=function(se){se.type==="mouseleave"&&A&&A(se),se.type==="blur"&&_&&_(se),clearTimeout($.current),w&&(se.type==="blur"?(se.persist(),$.current=setTimeout(function(){w(se,"blur")})):w(se,"mouseLeave"))},fe=function(se){a.onClick&&a.onClick(se),clearTimeout($.current),X?w&&w(se,"toggle"):k&&k(se,"toggle")},J=function(se){se.type==="mouseenter"&&T&&T(se),se.type==="focus"&&C&&C(se),clearTimeout($.current),k&&!X&&(se.persist(),$.current=setTimeout(function(){var me={focus:"focus",mouseenter:"mouseEnter"};k(se,me[se.type])}))},oe=n.replace(/^[^a-z]+|[^\w:.-]+/gi,""),ve=Y.exports.Children.toArray(s).filter(function(xe){return Y.exports.isValidElement(xe)}),ye=ve.map(function(xe,se){var me=xe.props.FabProps;me=me===void 0?{}:me;var pe=me.ref,Ce=nn(me,["ref"]);return Y.exports.cloneElement(xe,{FabProps:vt({},Ce,{ref:ee(se,pe)}),delay:30*(X?se:ve.length-se),open:X,id:"".concat(oe,"-action-").concat(se)})});return Y.exports.createElement("div",vt({className:Lr(l.root,l["direction".concat(ni(m))],u),ref:r,role:"presentation",onKeyDown:re,onBlur:ce,onFocus:J,onMouseEnter:J,onMouseLeave:ce},j),Y.exports.createElement(W,vt({in:!x,timeout:H,unmountOnExit:!0},N),Y.exports.createElement(HQ,vt({color:"primary","aria-label":n,"aria-haspopup":"true","aria-expanded":X,"aria-controls":"".concat(oe,"-actions")},a,{onClick:fe,className:Lr(l.fab,a.className),ref:q}),Y.exports.isValidElement(y)&&L1(y,["SpeedDialIcon"])?Y.exports.cloneElement(y,{open:X}):y)),Y.exports.createElement("div",{id:"".concat(oe,"-actions"),role:"menu","aria-orientation":mD(m),className:Lr(l.actions,!X&&l.actionsClosed)},ye))}),gRt=Dn(Z6e,{name:"MuiSpeedDial"})(Q6e),J6e=function(e){return{fab:{margin:8,color:e.palette.text.secondary,backgroundColor:e.palette.background.paper,"&:hover":{backgroundColor:lx(e.palette.background.paper,.15)},transition:"".concat(e.transitions.create("transform",{duration:e.transitions.duration.shorter}),", opacity 0.8s"),opacity:1},fabClosed:{opacity:0,transform:"scale(0)"},staticTooltip:{position:"relative",display:"flex","& $staticTooltipLabel":{transition:e.transitions.create(["transform","opacity"],{duration:e.transitions.duration.shorter}),opacity:1}},staticTooltipClosed:{"& $staticTooltipLabel":{opacity:0,transform:"scale(0.5)"}},staticTooltipLabel:vt({position:"absolute"},e.typography.body1,{backgroundColor:e.palette.background.paper,borderRadius:e.shape.borderRadius,boxShadow:e.shadows[1],color:e.palette.text.secondary,padding:"4px 16px",wordBreak:"keep-all"}),tooltipPlacementLeft:{alignItems:"center","& $staticTooltipLabel":{transformOrigin:"100% 50%",right:"100%",marginRight:8}},tooltipPlacementRight:{alignItems:"center","& $staticTooltipLabel":{transformOrigin:"0% 50%",left:"100%",marginLeft:8}}}},e8e=Y.exports.forwardRef(function(e,r){var n=e.classes,i=e.className,o=e.delay,a=o===void 0?0:o,s=e.FabProps,l=s===void 0?{}:s,u=e.icon,p=e.id,m=e.open,v=e.TooltipClasses,x=e.tooltipOpen,y=x===void 0?!1:x,_=e.tooltipPlacement,w=_===void 0?"left":_,C=e.tooltipTitle,E=nn(e,["classes","className","delay","FabProps","icon","id","open","TooltipClasses","tooltipOpen","tooltipPlacement","tooltipTitle"]),T=Y.exports.useState(y),A=T[0],k=T[1],X=function(){k(!1)},Z=function(){k(!0)},W={transitionDelay:"".concat(a,"ms")},D=Y.exports.createElement(HQ,vt({size:"small",className:Lr(n.fab,i,!m&&n.fabClosed),tabIndex:-1,role:"menuitem","aria-describedby":"".concat(p,"-label")},l,{style:vt({},W,l.style)}),u);return y?Y.exports.createElement("span",vt({id:p,ref:r,className:Lr(n.staticTooltip,n["tooltipPlacement".concat(ni(w))],!m&&n.staticTooltipClosed)},E),Y.exports.createElement("span",{style:W,id:"".concat(p,"-label"),className:n.staticTooltipLabel},C),D):Y.exports.createElement(yIe,vt({id:p,ref:r,title:C,placement:w,onClose:X,onOpen:Z,open:m&&A,classes:v},E),D)}),vRt=Dn(J6e,{name:"MuiSpeedDialAction"})(e8e),t8e=Ro(Y.exports.createElement("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"})),r8e=function(e){return{root:{height:24},icon:{transition:e.transitions.create(["transform","opacity"],{duration:e.transitions.duration.short})},iconOpen:{transform:"rotate(45deg)"},iconWithOpenIconOpen:{opacity:0},openIcon:{position:"absolute",transition:e.transitions.create(["transform","opacity"],{duration:e.transitions.duration.short}),opacity:0,transform:"rotate(-45deg)"},openIconOpen:{transform:"rotate(0deg)",opacity:1}}},Bre=Y.exports.forwardRef(function(e,r){var n=e.className,i=e.classes,o=e.icon,a=e.open,s=e.openIcon,l=nn(e,["className","classes","icon","open","openIcon"]),u=Lr(i.icon,a&&[i.iconOpen,s&&i.iconWithOpenIconOpen]),p=Lr(i.openIcon,a&&i.openIconOpen);function m(v,x){return Y.exports.isValidElement(v)?Y.exports.cloneElement(v,{className:x}):v}return Y.exports.createElement("span",vt({className:Lr(i.root,n),ref:r},l),s?m(s,p):null,o?m(o,u):Y.exports.createElement(t8e,{className:u}))});Bre.muiName="SpeedDialIcon";var yRt=Dn(r8e,{name:"MuiSpeedDialIcon"})(Bre);function Im(t){for(var e=arguments.length,r=Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];throw Error("[Immer] minified error nr: "+t+(r.length?" "+r.map(function(i){return"'"+i+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function wx(t){return!!t&&!!t[Pa]}function Cx(t){return!!t&&(function(e){if(!e||typeof e!="object")return!1;var r=Object.getPrototypeOf(e);if(r===null)return!0;var n=Object.hasOwnProperty.call(r,"constructor")&&r.constructor;return n===Object||typeof n=="function"&&Function.toString.call(n)===f8e}(t)||Array.isArray(t)||!!t[Kre]||!!t.constructor[Kre]||y7(t)||x7(t))}function Z1(t,e,r){r===void 0&&(r=!1),yC(t)===0?(r?Object.keys:_C)(t).forEach(function(n){r&&typeof n=="symbol"||e(n,t[n],t)}):t.forEach(function(n,i){return e(i,n,t)})}function yC(t){var e=t[Pa];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:y7(t)?2:x7(t)?3:0}function xC(t,e){return yC(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function n8e(t,e){return yC(t)===2?t.get(e):t[e]}function jre(t,e,r){var n=yC(t);n===2?t.set(e,r):n===3?(t.delete(e),t.add(r)):t[e]=r}function Ure(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function y7(t){return c8e&&t instanceof Map}function x7(t){return u8e&&t instanceof Set}function Q1(t){return t.o||t.t}function _7(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=Zre(t);delete e[Pa];for(var r=_C(e),n=0;n<r.length;n++){var i=r[n],o=e[i];o.writable===!1&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(e[i]={configurable:!0,writable:!0,enumerable:o.enumerable,value:t[i]})}return Object.create(Object.getPrototypeOf(t),e)}function b7(t,e){return e===void 0&&(e=!1),w7(t)||wx(t)||!Cx(t)||(yC(t)>1&&(t.set=t.add=t.clear=t.delete=i8e),Object.freeze(t),e&&Z1(t,function(r,n){return b7(n,!0)},!0)),t}function i8e(){Im(2)}function w7(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function yy(t){var e=R7[t];return e||Im(18,t),e}function o8e(t,e){R7[t]||(R7[t]=e)}function C7(){return sI}function E7(t,e){e&&(yy("Patches"),t.u=[],t.s=[],t.v=e)}function vD(t){S7(t),t.p.forEach(s8e),t.p=null}function S7(t){t===sI&&(sI=t.l)}function Vre(t){return sI={p:[],l:sI,h:t,m:!0,_:0}}function s8e(t){var e=t[Pa];e.i===0||e.i===1?e.j():e.O=!0}function T7(t,e){e._=e.p.length;var r=e.p[0],n=t!==void 0&&t!==r;return e.h.g||yy("ES5").S(e,t,n),n?(r[Pa].P&&(vD(e),Im(4)),Cx(t)&&(t=yD(e,t),e.l||xD(e,t)),e.u&&yy("Patches").M(r[Pa],t,e.u,e.s)):t=yD(e,r,[]),vD(e),e.u&&e.v(e.u,e.s),t!==Yre?t:void 0}function yD(t,e,r){if(w7(e))return e;var n=e[Pa];if(!n)return Z1(e,function(o,a){return Hre(t,n,e,o,a,r)},!0),e;if(n.A!==t)return e;if(!n.P)return xD(t,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=_7(n.k):n.o;Z1(n.i===3?new Set(i):i,function(o,a){return Hre(t,n,i,o,a,r)}),xD(t,i,!1),r&&t.u&&yy("Patches").R(n,r,t.u,t.s)}return n.o}function Hre(t,e,r,n,i,o){if(wx(i)){var a=yD(t,i,o&&e&&e.i!==3&&!xC(e.D,n)?o.concat(n):void 0);if(jre(r,n,a),!wx(a))return;t.m=!1}if(Cx(i)&&!w7(i)){if(!t.h.F&&t._<1)return;yD(t,i),e&&e.A.l||xD(t,i)}}function xD(t,e,r){r===void 0&&(r=!1),t.h.F&&t.m&&b7(e,r)}function P7(t,e){var r=t[Pa];return(r?Q1(r):t)[e]}function Wre(t,e){if(e in t)for(var r=Object.getPrototypeOf(t);r;){var n=Object.getOwnPropertyDescriptor(r,e);if(n)return n;r=Object.getPrototypeOf(r)}}function Ex(t){t.P||(t.P=!0,t.l&&Ex(t.l))}function I7(t){t.o||(t.o=_7(t.t))}function M7(t,e,r){var n=y7(e)?yy("MapSet").N(e,r):x7(e)?yy("MapSet").T(e,r):t.g?function(i,o){var a=Array.isArray(i),s={i:a?1:0,A:o?o.A:C7(),P:!1,I:!1,D:{},l:o,t:i,k:null,o:null,j:null,C:!1},l=s,u=bC;a&&(l=[s],u=_D);var p=Proxy.revocable(l,u),m=p.revoke,v=p.proxy;return s.k=v,s.j=m,v}(e,r):yy("ES5").J(e,r);return(r?r.A:C7()).p.push(n),n}function a8e(t){return wx(t)||Im(22,t),function e(r){if(!Cx(r))return r;var n,i=r[Pa],o=yC(r);if(i){if(!i.P&&(i.i<4||!yy("ES5").K(i)))return i.t;i.I=!0,n=Gre(r,o),i.I=!1}else n=Gre(r,o);return Z1(n,function(a,s){i&&n8e(i.t,a)===s||jre(n,a,e(s))}),o===3?new Set(n):n}(t)}function Gre(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return _7(t)}function l8e(){function t(o,a){var s=i[o];return s?s.enumerable=a:i[o]=s={configurable:!0,enumerable:a,get:function(){var l=this[Pa];return bC.get(l,o)},set:function(l){var u=this[Pa];bC.set(u,o,l)}},s}function e(o){for(var a=o.length-1;a>=0;a--){var s=o[a][Pa];if(!s.P)switch(s.i){case 5:n(s)&&Ex(s);break;case 4:r(s)&&Ex(s)}}}function r(o){for(var a=o.t,s=o.k,l=_C(s),u=l.length-1;u>=0;u--){var p=l[u];if(p!==Pa){var m=a[p];if(m===void 0&&!xC(a,p))return!0;var v=s[p],x=v&&v[Pa];if(x?x.t!==m:!Ure(v,m))return!0}}var y=!!a[Pa];return l.length!==_C(a).length+(y?0:1)}function n(o){var a=o.k;if(a.length!==o.t.length)return!0;var s=Object.getOwnPropertyDescriptor(a,a.length-1);return!(!s||s.get)}var i={};o8e("ES5",{J:function(o,a){var s=Array.isArray(o),l=function(p,m){if(p){for(var v=Array(m.length),x=0;x<m.length;x++)Object.defineProperty(v,""+x,t(x,!0));return v}var y=Zre(m);delete y[Pa];for(var _=_C(y),w=0;w<_.length;w++){var C=_[w];y[C]=t(C,p||!!y[C].enumerable)}return Object.create(Object.getPrototypeOf(m),y)}(s,o),u={i:s?5:4,A:a?a.A:C7(),P:!1,I:!1,D:{},l:a,t:o,k:l,o:null,O:!1,C:!1};return Object.defineProperty(l,Pa,{value:u,writable:!0}),l},S:function(o,a,s){s?wx(a)&&a[Pa].A===o&&e(o.p):(o.u&&function l(u){if(u&&typeof u=="object"){var p=u[Pa];if(p){var m=p.t,v=p.k,x=p.D,y=p.i;if(y===4)Z1(v,function(T){T!==Pa&&(m[T]!==void 0||xC(m,T)?x[T]||l(v[T]):(x[T]=!0,Ex(p)))}),Z1(m,function(T){v[T]!==void 0||xC(v,T)||(x[T]=!1,Ex(p))});else if(y===5){if(n(p)&&(Ex(p),x.length=!0),v.length<m.length)for(var _=v.length;_<m.length;_++)x[_]=!1;else for(var w=m.length;w<v.length;w++)x[w]=!0;for(var C=Math.min(v.length,m.length),E=0;E<C;E++)x[E]===void 0&&l(v[E])}}}}(o.p[0]),e(o.p))},K:function(o){return o.i===4?r(o):n(o)}})}var qre,sI,A7=typeof Symbol!="undefined"&&typeof Symbol("x")=="symbol",c8e=typeof Map!="undefined",u8e=typeof Set!="undefined",Xre=typeof Proxy!="undefined"&&Proxy.revocable!==void 0&&typeof Reflect!="undefined",Yre=A7?Symbol.for("immer-nothing"):((qre={})["immer-nothing"]=!0,qre),Kre=A7?Symbol.for("immer-draftable"):"__$immer_draftable",Pa=A7?Symbol.for("immer-state"):"__$immer_state",f8e=""+Object.prototype.constructor,_C=typeof Reflect!="undefined"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,Zre=Object.getOwnPropertyDescriptors||function(t){var e={};return _C(t).forEach(function(r){e[r]=Object.getOwnPropertyDescriptor(t,r)}),e},R7={},bC={get:function(t,e){if(e===Pa)return t;var r=Q1(t);if(!xC(r,e))return function(i,o,a){var s,l=Wre(o,a);return l?"value"in l?l.value:(s=l.get)===null||s===void 0?void 0:s.call(i.k):void 0}(t,r,e);var n=r[e];return t.I||!Cx(n)?n:n===P7(t.t,e)?(I7(t),t.o[e]=M7(t.A.h,n,t)):n},has:function(t,e){return e in Q1(t)},ownKeys:function(t){return Reflect.ownKeys(Q1(t))},set:function(t,e,r){var n=Wre(Q1(t),e);if(n==null?void 0:n.set)return n.set.call(t.k,r),!0;if(!t.P){var i=P7(Q1(t),e),o=i==null?void 0:i[Pa];if(o&&o.t===r)return t.o[e]=r,t.D[e]=!1,!0;if(Ure(r,i)&&(r!==void 0||xC(t.t,e)))return!0;I7(t),Ex(t)}return t.o[e]===r&&typeof r!="number"&&(r!==void 0||e in t.o)||(t.o[e]=r,t.D[e]=!0,!0)},deleteProperty:function(t,e){return P7(t.t,e)!==void 0||e in t.t?(t.D[e]=!1,I7(t),Ex(t)):delete t.D[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var r=Q1(t),n=Reflect.getOwnPropertyDescriptor(r,e);return n&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:n.enumerable,value:r[e]}},defineProperty:function(){Im(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){Im(12)}},_D={};Z1(bC,function(t,e){_D[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),_D.deleteProperty=function(t,e){return bC.deleteProperty.call(this,t[0],e)},_D.set=function(t,e,r){return bC.set.call(this,t[0],e,r,t[0])};var d8e=function(){function t(r){var n=this;this.g=Xre,this.F=!0,this.produce=function(i,o,a){if(typeof i=="function"&&typeof o!="function"){var s=o;o=i;var l=n;return function(x){var y=this;x===void 0&&(x=s);for(var _=arguments.length,w=Array(_>1?_-1:0),C=1;C<_;C++)w[C-1]=arguments[C];return l.produce(x,function(E){var T;return(T=o).call.apply(T,[y,E].concat(w))})}}var u;if(typeof o!="function"&&Im(6),a!==void 0&&typeof a!="function"&&Im(7),Cx(i)){var p=Vre(n),m=M7(n,i,void 0),v=!0;try{u=o(m),v=!1}finally{v?vD(p):S7(p)}return typeof Promise!="undefined"&&u instanceof Promise?u.then(function(x){return E7(p,a),T7(x,p)},function(x){throw vD(p),x}):(E7(p,a),T7(u,p))}if(!i||typeof i!="object")return(u=o(i))===Yre?void 0:(u===void 0&&(u=i),n.F&&b7(u,!0),u);Im(21,i)},this.produceWithPatches=function(i,o){return typeof i=="function"?function(l){for(var u=arguments.length,p=Array(u>1?u-1:0),m=1;m<u;m++)p[m-1]=arguments[m];return n.produceWithPatches(l,function(v){return i.apply(void 0,[v].concat(p))})}:[n.produce(i,o,function(l,u){a=l,s=u}),a,s];var a,s},typeof(r==null?void 0:r.useProxies)=="boolean"&&this.setUseProxies(r.useProxies),typeof(r==null?void 0:r.autoFreeze)=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var e=t.prototype;return e.createDraft=function(r){Cx(r)||Im(8),wx(r)&&(r=a8e(r));var n=Vre(this),i=M7(this,r,void 0);return i[Pa].C=!0,S7(n),i},e.finishDraft=function(r,n){var i=r&&r[Pa],o=i.A;return E7(o,n),T7(void 0,o)},e.setAutoFreeze=function(r){this.F=r},e.setUseProxies=function(r){r&&!Xre&&Im(20),this.g=r},e.applyPatches=function(r,n){var i;for(i=n.length-1;i>=0;i--){var o=n[i];if(o.path.length===0&&o.op==="replace"){r=o.value;break}}var a=yy("Patches").$;return wx(r)?a(r,n):this.produce(r,function(s){return a(s,n.slice(i+1))})},t}(),Yd=new d8e,Qre=Yd.produce;Yd.produceWithPatches.bind(Yd);Yd.setAutoFreeze.bind(Yd);Yd.setUseProxies.bind(Yd);Yd.applyPatches.bind(Yd);Yd.createDraft.bind(Yd);Yd.finishDraft.bind(Yd);function h8e(t,e){return t===e}function p8e(t,e,r){if(e===null||r===null||e.length!==r.length)return!1;for(var n=e.length,i=0;i<n;i++)if(!t(e[i],r[i]))return!1;return!0}function m8e(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:h8e,r=null,n=null;return function(){return p8e(e,r,arguments)||(n=t.apply(null,arguments)),r=arguments,n}}function g8e(t){var e=Array.isArray(t[0])?t[0]:t;if(!e.every(function(n){return typeof n=="function"})){var r=e.map(function(n){return typeof n}).join(", ");throw new Error("Selector creators expect all input-selectors to be functions, "+("instead received the following types: ["+r+"]"))}return e}function v8e(t){for(var e=arguments.length,r=Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];return function(){for(var i=arguments.length,o=Array(i),a=0;a<i;a++)o[a]=arguments[a];var s=0,l=o.pop(),u=g8e(o),p=t.apply(void 0,[function(){return s++,l.apply(null,arguments)}].concat(r)),m=t(function(){for(var v=[],x=u.length,y=0;y<x;y++)v.push(u[y].apply(null,arguments));return p.apply(null,v)});return m.resultFunc=l,m.dependencies=u,m.recomputations=function(){return s},m.resetRecomputations=function(){return s=0},m}}var xRt=v8e(m8e);function Jre(t){return function(e){var r=e.dispatch,n=e.getState;return function(i){return function(o){return typeof o=="function"?o(r,n,t):i(o)}}}}var k7=Jre();k7.withExtraArgument=Jre;var y8e=globalThis&&globalThis.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),x8e=globalThis&&globalThis.__generator||function(t,e){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(u){return function(p){return l([u,p])}}function l(u){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(o=u[0]&2?i.return:u[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,u[1])).done)return o;switch(i=0,o&&(u=[u[0]&2,o.value]),u[0]){case 0:case 1:o=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,i=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]<o[3])){r.label=u[1];break}if(u[0]===6&&r.label<o[1]){r.label=o[1],o=u;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(u);break}o[2]&&r.ops.pop(),r.trys.pop();continue}u=e.call(t,r)}catch(p){u=[6,p],i=0}finally{n=o=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},bD=globalThis&&globalThis.__spreadArray||function(t,e){for(var r=0,n=e.length,i=t.length;r<n;r++,i++)t[i]=e[r];return t},_8e=Object.defineProperty,b8e=Object.defineProperties,w8e=Object.getOwnPropertyDescriptors,ene=Object.getOwnPropertySymbols,C8e=Object.prototype.hasOwnProperty,E8e=Object.prototype.propertyIsEnumerable,tne=function(t,e,r){return e in t?_8e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r},Sx=function(t,e){for(var r in e||(e={}))C8e.call(e,r)&&tne(t,r,e[r]);if(ene)for(var n=0,i=ene(e);n<i.length;n++){var r=i[n];E8e.call(e,r)&&tne(t,r,e[r])}return t},O7=function(t,e){return b8e(t,w8e(e))},S8e=function(t,e,r){return new Promise(function(n,i){var o=function(l){try{s(r.next(l))}catch(u){i(u)}},a=function(l){try{s(r.throw(l))}catch(u){i(u)}},s=function(l){return l.done?n(l.value):Promise.resolve(l.value).then(o,a)};s((r=r.apply(t,e)).next())})},T8e=typeof window!="undefined"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?OL:OL.apply(null,arguments)};function P8e(t){if(typeof t!="object"||t===null)return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}var I8e=function(t){y8e(e,t);function e(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var i=t.apply(this,r)||this;return Object.setPrototypeOf(i,e.prototype),i}return Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return t.prototype.concat.apply(this,r)},e.prototype.prepend=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.length===1&&Array.isArray(r[0])?new(e.bind.apply(e,bD([void 0],r[0].concat(this)))):new(e.bind.apply(e,bD([void 0],r.concat(this))))},e}(Array);function M8e(t){return typeof t=="boolean"}function A8e(){return function(e){return R8e(e)}}function R8e(t){t===void 0&&(t={});var e=t.thunk,r=e===void 0?!0:e;t.immutableCheck,t.serializableCheck;var n=new I8e;return r&&(M8e(r)?n.push(k7):n.push(k7.withExtraArgument(r.extraArgument))),n}var k8e=!0;function _Rt(t){var e=A8e(),r=t||{},n=r.reducer,i=n===void 0?void 0:n,o=r.middleware,a=o===void 0?e():o,s=r.devTools,l=s===void 0?!0:s,u=r.preloadedState,p=u===void 0?void 0:u,m=r.enhancers,v=m===void 0?void 0:m,x;if(typeof i=="function")x=i;else if(P8e(i))x=rMe(i);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var y=a;typeof y=="function"&&(y=y(e));var _=iMe.apply(void 0,y),w=OL;l&&(w=T8e(Sx({trace:!k8e},typeof l=="object"&&l)));var C=[_];Array.isArray(v)?C=bD([_],v):typeof v=="function"&&(C=v(C));var E=w.apply(void 0,C);return hee(x,p,E)}function aI(t,e){function r(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(e){var o=e.apply(void 0,n);if(!o)throw new Error("prepareAction did not return an object");return Sx(Sx({type:t,payload:o.payload},"meta"in o&&{meta:o.meta}),"error"in o&&{error:o.error})}return{type:t,payload:n[0]}}return r.toString=function(){return""+t},r.type=t,r.match=function(n){return n.type===t},r}function rne(t){var e={},r=[],n,i={addCase:function(o,a){var s=typeof o=="string"?o:o.type;if(s in e)throw new Error("addCase cannot be called with two reducers for the same action type");return e[s]=a,i},addMatcher:function(o,a){return r.push({matcher:o,reducer:a}),i},addDefaultCase:function(o){return n=o,i}};return t(i),[e,r,n]}function O8e(t,e,r,n){r===void 0&&(r=[]);var i=typeof e=="function"?rne(e):[e,r,n],o=i[0],a=i[1],s=i[2],l=Qre(t,function(){});return function(u,p){u===void 0&&(u=l);var m=bD([o[p.type]],a.filter(function(v){var x=v.matcher;return x(p)}).map(function(v){var x=v.reducer;return x}));return m.filter(function(v){return!!v}).length===0&&(m=[s]),m.reduce(function(v,x){if(x)if(wx(v)){var y=v,_=x(y,p);return typeof _=="undefined"?v:_}else{if(Cx(v))return Qre(v,function(w){return x(w,p)});var _=x(v,p);if(typeof _=="undefined"){if(v===null)return v;throw Error("A case reducer on a non-draftable value must not return undefined")}return _}return v},u)}}function L8e(t,e){return t+"/"+e}function bRt(t){var e=t.name,r=t.initialState;if(!e)throw new Error("`name` is a required option for createSlice");var n=t.reducers||{},i=typeof t.extraReducers=="function"?rne(t.extraReducers):[t.extraReducers],o=i[0],a=o===void 0?{}:o,s=i[1],l=s===void 0?[]:s,u=i[2],p=u===void 0?void 0:u,m=Object.keys(n),v={},x={},y={};m.forEach(function(C){var E=n[C],T=L8e(e,C),A,k;"reducer"in E?(A=E.reducer,k=E.prepare):A=E,v[C]=A,x[T]=A,y[C]=k?aI(T,k):aI(T)});var _=Sx(Sx({},a),x),w=O8e(r,_,l,p);return{name:e,reducer:w,actions:y,caseReducers:v}}var D8e="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",N8e=function(t){t===void 0&&(t=21);for(var e="",r=t;r--;)e+=D8e[Math.random()*64|0];return e},$8e=["name","message","stack","code"],L7=function(){function t(e,r){this.payload=e,this.meta=r}return t}(),nne=function(){function t(e,r){this.payload=e,this.meta=r}return t}(),F8e=function(t){if(typeof t=="object"&&t!==null){for(var e={},r=0,n=$8e;r<n.length;r++){var i=n[r];typeof t[i]=="string"&&(e[i]=t[i])}return e}return{message:String(t)}};function wRt(t,e,r){var n=aI(t+"/fulfilled",function(l,u,p,m){return{payload:l,meta:O7(Sx({},m||{}),{arg:p,requestId:u,requestStatus:"fulfilled"})}}),i=aI(t+"/pending",function(l,u,p){return{payload:void 0,meta:O7(Sx({},p||{}),{arg:u,requestId:l,requestStatus:"pending"})}}),o=aI(t+"/rejected",function(l,u,p,m,v){return{payload:m,error:(r&&r.serializeError||F8e)(l||"Rejected"),meta:O7(Sx({},v||{}),{arg:p,requestId:u,rejectedWithValue:!!m,requestStatus:"rejected",aborted:(l==null?void 0:l.name)==="AbortError",condition:(l==null?void 0:l.name)==="ConditionError"})}}),a=typeof AbortController!="undefined"?AbortController:function(){function l(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){}}}return l.prototype.abort=function(){},l}();function s(l){return function(u,p,m){var v,x=((v=r==null?void 0:r.idGenerator)!=null?v:N8e)(),y=new a,_,w=new Promise(function(A,k){return y.signal.addEventListener("abort",function(){return k({name:"AbortError",message:_||"Aborted"})})}),C=!1;function E(A){C&&(_=A,y.abort())}var T=function(){return S8e(this,null,function(){var A,k,X,Z;return x8e(this,function(W){switch(W.label){case 0:if(W.trys.push([0,2,,3]),r&&r.condition&&r.condition(l,{getState:p,extra:m})===!1)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return C=!0,u(i(x,l,(A=r==null?void 0:r.getPendingMeta)==null?void 0:A.call(r,{requestId:x,arg:l},{getState:p,extra:m}))),[4,Promise.race([w,Promise.resolve(e(l,{dispatch:u,getState:p,extra:m,requestId:x,signal:y.signal,rejectWithValue:function(D,H){return new L7(D,H)},fulfillWithValue:function(D,H){return new nne(D,H)}})).then(function(D){if(D instanceof L7)throw D;return D instanceof nne?n(D.payload,x,l,D.meta):n(D,x,l)})])];case 1:return k=W.sent(),[3,3];case 2:return X=W.sent(),k=X instanceof L7?o(null,x,l,X.payload,X.meta):o(X,x,l),[3,3];case 3:return Z=r&&!r.dispatchConditionRejection&&o.match(k)&&k.meta.condition,Z||u(k),[2,k]}})})}();return Object.assign(T,{abort:E,requestId:x,arg:l,unwrap:function(){return T.then(z8e)}})}}return Object.assign(s,{pending:i,rejected:o,fulfilled:n,typePrefix:t})}function z8e(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}l8e();/*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */var D7=function(t,e){return D7=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i])},D7(t,e)};function Mm(t,e){D7(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var Kd=function(){return Kd=Object.assign||function(e){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},Kd.apply(this,arguments)};function lI(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(p){try{u(n.next(p))}catch(m){a(m)}}function l(p){try{u(n.throw(p))}catch(m){a(m)}}function u(p){p.done?o(p.value):i(p.value).then(s,l)}u((n=n.apply(t,e||[])).next())})}function cI(t,e){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(u){return function(p){return l([u,p])}}function l(u){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(o=u[0]&2?i.return:u[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,u[1])).done)return o;switch(i=0,o&&(u=[u[0]&2,o.value]),u[0]){case 0:case 1:o=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,i=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]<o[3])){r.label=u[1];break}if(u[0]===6&&r.label<o[1]){r.label=o[1],o=u;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(u);break}o[2]&&r.ops.pop(),r.trys.pop();continue}u=e.call(t,r)}catch(p){u=[6,p],i=0}finally{n=o=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}var _c=function(){function t(){}return t.createNewGuid=function(){var e=window.crypto;if(e&&e.getRandomValues){var r=new Uint8Array(16);return e.getRandomValues(r),r[6]|=64,r[6]&=79,r[8]|=128,r[8]&=191,t.decimalToHex(r[0])+t.decimalToHex(r[1])+t.decimalToHex(r[2])+t.decimalToHex(r[3])+"-"+t.decimalToHex(r[4])+t.decimalToHex(r[5])+"-"+t.decimalToHex(r[6])+t.decimalToHex(r[7])+"-"+t.decimalToHex(r[8])+t.decimalToHex(r[9])+"-"+t.decimalToHex(r[10])+t.decimalToHex(r[11])+t.decimalToHex(r[12])+t.decimalToHex(r[13])+t.decimalToHex(r[14])+t.decimalToHex(r[15])}else{for(var n="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx",i="0123456789abcdef",o=0,a="",s=0;s<36;s++)n[s]!=="-"&&n[s]!=="4"&&(o=Math.random()*16|0),n[s]==="x"?a+=i[o]:n[s]==="y"?(o&=3,o|=8,a+=i[o]):a+=n[s];return a}},t.isGuid=function(e){var r=/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;return r.test(e)},t.decimalToHex=function(e){for(var r=e.toString(16);r.length<2;)r="0"+r;return r},t.base64Encode=function(e){return btoa(encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,function(n,i){return String.fromCharCode(Number("0x"+i))}))},t.base64Decode=function(e){var r=e.replace(/-/g,"+").replace(/_/g,"/");switch(r.length%4){case 0:break;case 2:r+="==";break;case 3:r+="=";break;default:throw new Error("Invalid base64 string")}return decodeURIComponent(atob(r).split("").map(function(n){return"%"+("00"+n.charCodeAt(0).toString(16)).slice(-2)}).join(""))},t.deserialize=function(e){var r,n=/\+/g,i=/([^&=]+)=([^&]*)/g,o=function(s){return decodeURIComponent(s.replace(n," "))},a={};for(r=i.exec(e);r;)a[o(r[1])]=o(o(r[2])),r=i.exec(e);return a},t}(),tn=function(){function t(){}return Object.defineProperty(t,"libraryName",{get:function(){return"Msal.js"},enumerable:!0,configurable:!0}),Object.defineProperty(t,"claims",{get:function(){return"claims"},enumerable:!0,configurable:!0}),Object.defineProperty(t,"clientId",{get:function(){return"clientId"},enumerable:!0,configurable:!0}),Object.defineProperty(t,"adalIdToken",{get:function(){return"adal.idtoken"},enumerable:!0,configurable:!0}),Object.defineProperty(t,"cachePrefix",{get:function(){return"msal"},enumerable:!0,configurable:!0}),Object.defineProperty(t,"scopes",{get:function(){return"scopes"},enumerable:!0,configurable:!0}),Object.defineProperty(t,"no_account",{get:function(){return"NO_ACCOUNT"},enumerable:!0,configurable:!0}),Object.defineProperty(t,"upn",{get:function(){return"upn"},enumerable:!0,configurable:!0}),Object.defineProperty(t,"domain_hint",{get:function(){return"domain_hint"},enumerable:!0,configurable:!0}),Object.defineProperty(t,"prompt_select_account",{get:function(){return"&prompt=select_account"},enumerable:!0,configurable:!0}),Object.defineProperty(t,"prompt_none",{get:function(){return"&prompt=none"},enumerable:!0,configurable:!0}),Object.defineProperty(t,"prompt",{get:function(){return"prompt"},enumerable:!0,configurable:!0}),Object.defineProperty(t,"response_mode_fragment",{get:function(){return"&response_mode=fragment"},enumerable:!0,configurable:!0}),Object.defineProperty(t,"resourceDelimiter",{get:function(){return"|"},enumerable:!0,configurable:!0}),Object.defineProperty(t,"cacheDelimiter",{get:function(){return"."},enumerable:!0,configurable:!0}),Object.defineProperty(t,"popUpWidth",{get:function(){return this._popUpWidth},set:function(e){this._popUpWidth=e},enumerable:!0,configurable:!0}),Object.defineProperty(t,"popUpHeight",{get:function(){return this._popUpHeight},set:function(e){this._popUpHeight=e},enumerable:!0,configurable:!0}),Object.defineProperty(t,"login",{get:function(){return"LOGIN"},enumerable:!0,configurable:!0}),Object.defineProperty(t,"renewToken",{get:function(){return"RENEW_TOKEN"},enumerable:!0,configurable:!0}),Object.defineProperty(t,"unknown",{get:function(){return"UNKNOWN"},enumerable:!0,configurable:!0}),Object.defineProperty(t,"homeAccountIdentifier",{get:function(){return"homeAccountIdentifier"},enumerable:!0,configurable:!0}),Object.defineProperty(t,"common",{get:function(){return"common"},enumerable:!0,configurable:!0}),Object.defineProperty(t,"openidScope",{get:function(){return"openid"},enumerable:!0,configurable:!0}),Object.defineProperty(t,"profileScope",{get:function(){return"profile"},enumerable:!0,configurable:!0}),Object.defineProperty(t,"interactionTypeRedirect",{get:function(){return"redirectInteraction"},enumerable:!0,configurable:!0}),Object.defineProperty(t,"interactionTypePopup",{get:function(){return"popupInteraction"},enumerable:!0,configurable:!0}),Object.defineProperty(t,"interactionTypeSilent",{get:function(){return"silentInteraction"},enumerable:!0,configurable:!0}),Object.defineProperty(t,"inProgress",{get:function(){return"inProgress"},enumerable:!0,configurable:!0}),t._popUpWidth=483,t._popUpHeight=600,t}(),Si;(function(t){t.SCOPE="scope",t.STATE="state",t.ERROR="error",t.ERROR_DESCRIPTION="error_description",t.ACCESS_TOKEN="access_token",t.ID_TOKEN="id_token",t.EXPIRES_IN="expires_in",t.SESSION_STATE="session_state",t.CLIENT_INFO="client_info"})(Si||(Si={}));var oo;(function(t){t.AUTHORITY="authority",t.ACQUIRE_TOKEN_ACCOUNT="acquireTokenAccount",t.SESSION_STATE="session.state",t.STATE_LOGIN="state.login",t.STATE_ACQ_TOKEN="state.acquireToken",t.STATE_RENEW="state.renew",t.NONCE_IDTOKEN="nonce.idtoken",t.LOGIN_REQUEST="login.request",t.RENEW_STATUS="token.renew.status",t.URL_HASH="urlHash",t.INTERACTION_STATUS="interaction_status",t.REDIRECT_REQUEST="redirect_request"})(oo||(oo={}));var Am;(function(t){t.IDTOKEN="idtoken",t.CLIENT_INFO="client.info"})(Am||(Am={}));var Tu;(function(t){t.LOGIN_ERROR="login.error",t.ERROR="error",t.ERROR_DESC="error.description"})(Tu||(Tu={}));var ine={"login.windows.net":"login.windows.net","login.chinacloudapi.cn":"login.chinacloudapi.cn","login.cloudgovapi.us":"login.cloudgovapi.us","login.microsoftonline.com":"login.microsoftonline.com","login.microsoftonline.de":"login.microsoftonline.de","login.microsoftonline.us":"login.microsoftonline.us"},bl;(function(t){t.ACCOUNT="account",t.SID="sid",t.LOGIN_HINT="login_hint",t.ID_TOKEN="id_token",t.ACCOUNT_ID="accountIdentifier",t.HOMEACCOUNT_ID="homeAccountIdentifier"})(bl||(bl={}));var B8e=[bl.SID,bl.LOGIN_HINT],uI={LOGIN:"login",SELECT_ACCOUNT:"select_account",CONSENT:"consent",NONE:"none"},one={ID_TOKEN_FRAME:"msalIdTokenFrame",TOKEN_FRAME:"msalRenewFrame"};function wD(){return"1.3.1"}var CD={unexpectedError:{code:"unexpected_error",desc:"Unexpected error in authentication."},noWindowObjectError:{code:"no_window_object",desc:"No window object available. Details:"}},xy=function(t){Mm(e,t);function e(r,n){var i=t.call(this,n)||this;return Object.setPrototypeOf(i,e.prototype),i.errorCode=r,i.errorMessage=n,i.name="AuthError",i}return e.createUnexpectedError=function(r){return new e(CD.unexpectedError.code,CD.unexpectedError.desc+": "+r)},e.createNoWindowObjectError=function(r){return new e(CD.noWindowObjectError.code,CD.noWindowObjectError.desc+" "+r)},e}(Error),Ia=function(){function t(){}return t.isEmpty=function(e){return typeof e=="undefined"||!e||e.length===0},t}(),Mi={multipleMatchingTokens:{code:"multiple_matching_tokens",desc:"The cache contains multiple tokens satisfying the requirements. Call AcquireToken again providing more requirements like authority."},multipleCacheAuthorities:{code:"multiple_authorities",desc:"Multiple authorities found in the cache. Pass authority in the API overload."},endpointResolutionError:{code:"endpoints_resolution_error",desc:"Error: could not resolve endpoints. Please check network and try again."},popUpWindowError:{code:"popup_window_error",desc:"Error opening popup window. This can happen if you are using IE or if popups are blocked in the browser."},tokenRenewalError:{code:"token_renewal_error",desc:"Token renewal operation failed due to timeout."},invalidIdToken:{code:"invalid_id_token",desc:"Invalid ID token format."},invalidStateError:{code:"invalid_state_error",desc:"Invalid state."},nonceMismatchError:{code:"nonce_mismatch_error",desc:"Nonce is not matching, Nonce received: "},loginProgressError:{code:"login_progress_error",desc:"Login_In_Progress: Error during login call - login is already in progress."},acquireTokenProgressError:{code:"acquiretoken_progress_error",desc:"AcquireToken_In_Progress: Error during login call - login is already in progress."},userCancelledError:{code:"user_cancelled",desc:"User cancelled the flow."},callbackError:{code:"callback_error",desc:"Error occurred in token received callback function."},userLoginRequiredError:{code:"user_login_error",desc:"User login is required. For silent calls, request must contain either sid or login_hint"},userDoesNotExistError:{code:"user_non_existent",desc:"User object does not exist. Please call a login API."},clientInfoDecodingError:{code:"client_info_decoding_error",desc:"The client info could not be parsed/decoded correctly. Please review the trace to determine the root cause."},clientInfoNotPopulatedError:{code:"client_info_not_populated_error",desc:"The service did not populate client_info in the response, Please verify with the service team"},nullOrEmptyIdToken:{code:"null_or_empty_id_token",desc:"The idToken is null or empty. Please review the trace to determine the root cause."},idTokenNotParsed:{code:"id_token_parsing_error",desc:"ID token cannot be parsed. Please review stack trace to determine root cause."},tokenEncodingError:{code:"token_encoding_error",desc:"The token to be decoded is not encoded correctly."},invalidInteractionType:{code:"invalid_interaction_type",desc:"The interaction type passed to the handler was incorrect or unknown"},cacheParseError:{code:"cannot_parse_cache",desc:"The cached token key is not a valid JSON and cannot be parsed"},blockTokenRequestsInHiddenIframe:{code:"block_token_requests",desc:"Token calls are blocked in hidden iframes"}},ws=function(t){Mm(e,t);function e(r,n){var i=t.call(this,r,n)||this;return i.name="ClientAuthError",Object.setPrototypeOf(i,e.prototype),i}return e.createEndpointResolutionError=function(r){var n=Mi.endpointResolutionError.desc;return r&&!Ia.isEmpty(r)&&(n+=" Details: "+r),new e(Mi.endpointResolutionError.code,n)},e.createMultipleMatchingTokensInCacheError=function(r){return new e(Mi.multipleMatchingTokens.code,"Cache error for scope "+r+": "+Mi.multipleMatchingTokens.desc+".")},e.createMultipleAuthoritiesInCacheError=function(r){return new e(Mi.multipleCacheAuthorities.code,"Cache error for scope "+r+": "+Mi.multipleCacheAuthorities.desc+".")},e.createPopupWindowError=function(r){var n=Mi.popUpWindowError.desc;return r&&!Ia.isEmpty(r)&&(n+=" Details: "+r),new e(Mi.popUpWindowError.code,n)},e.createTokenRenewalTimeoutError=function(r){var n="URL navigated to is "+r+", "+Mi.tokenRenewalError.desc;return new e(Mi.tokenRenewalError.code,n)},e.createInvalidIdTokenError=function(r){return new e(Mi.invalidIdToken.code,Mi.invalidIdToken.desc+" Given token: "+r)},e.createInvalidStateError=function(r,n){return new e(Mi.invalidStateError.code,Mi.invalidStateError.desc+" "+r+", state expected : "+n+".")},e.createNonceMismatchError=function(r,n){return new e(Mi.nonceMismatchError.code,Mi.nonceMismatchError.desc+" "+r+", nonce expected : "+n+".")},e.createLoginInProgressError=function(){return new e(Mi.loginProgressError.code,Mi.loginProgressError.desc)},e.createAcquireTokenInProgressError=function(){return new e(Mi.acquireTokenProgressError.code,Mi.acquireTokenProgressError.desc)},e.createUserCancelledError=function(){return new e(Mi.userCancelledError.code,Mi.userCancelledError.desc)},e.createErrorInCallbackFunction=function(r){return new e(Mi.callbackError.code,Mi.callbackError.desc+" "+r+".")},e.createUserLoginRequiredError=function(){return new e(Mi.userLoginRequiredError.code,Mi.userLoginRequiredError.desc)},e.createUserDoesNotExistError=function(){return new e(Mi.userDoesNotExistError.code,Mi.userDoesNotExistError.desc)},e.createClientInfoDecodingError=function(r){return new e(Mi.clientInfoDecodingError.code,Mi.clientInfoDecodingError.desc+" Failed with error: "+r)},e.createClientInfoNotPopulatedError=function(r){return new e(Mi.clientInfoNotPopulatedError.code,Mi.clientInfoNotPopulatedError.desc+" Failed with error: "+r)},e.createIdTokenNullOrEmptyError=function(r){return new e(Mi.nullOrEmptyIdToken.code,Mi.nullOrEmptyIdToken.desc+" Raw ID Token Value: "+r)},e.createIdTokenParsingError=function(r){return new e(Mi.idTokenNotParsed.code,Mi.idTokenNotParsed.desc+" Failed with error: "+r)},e.createTokenEncodingError=function(r){return new e(Mi.tokenEncodingError.code,Mi.tokenEncodingError.desc+" Attempted to decode: "+r)},e.createInvalidInteractionTypeError=function(){return new e(Mi.invalidInteractionType.code,Mi.invalidInteractionType.desc)},e.createCacheParseError=function(r){var n="invalid key: "+r+", "+Mi.cacheParseError.desc;return new e(Mi.cacheParseError.code,n)},e.createBlockTokenRequestsInHiddenIframeError=function(){return new e(Mi.blockTokenRequestsInHiddenIframe.code,Mi.blockTokenRequestsInHiddenIframe.desc)},e}(xy),zo={configurationNotSet:{code:"no_config_set",desc:"Configuration has not been set. Please call the UserAgentApplication constructor with a valid Configuration object."},storageNotSupported:{code:"storage_not_supported",desc:"The value for the cacheLocation is not supported."},noRedirectCallbacksSet:{code:"no_redirect_callbacks",desc:"No redirect callbacks have been set. Please call handleRedirectCallback() with the appropriate function arguments before continuing. More information is available here: https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/MSAL-basics."},invalidCallbackObject:{code:"invalid_callback_object",desc:"The object passed for the callback was invalid. More information is available here: https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/MSAL-basics."},scopesRequired:{code:"scopes_required",desc:"Scopes are required to obtain an access token."},emptyScopes:{code:"empty_input_scopes_error",desc:"Scopes cannot be passed as empty array."},nonArrayScopes:{code:"nonarray_input_scopes_error",desc:"Scopes cannot be passed as non-array."},clientScope:{code:"clientid_input_scopes_error",desc:"Client ID can only be provided as a single scope."},invalidPrompt:{code:"invalid_prompt_value",desc:"Supported prompt values are 'login', 'select_account', 'consent' and 'none'"},invalidAuthorityType:{code:"invalid_authority_type",desc:"The given authority is not a valid type of authority supported by MSAL. Please see here for valid authorities: <insert URL here>."},authorityUriInsecure:{code:"authority_uri_insecure",desc:"Authority URIs must use https."},authorityUriInvalidPath:{code:"authority_uri_invalid_path",desc:"Given authority URI is invalid."},unsupportedAuthorityValidation:{code:"unsupported_authority_validation",desc:"The authority validation is not supported for this authority type."},untrustedAuthority:{code:"untrusted_authority",desc:"The provided authority is not a trusted authority. If using B2C, please include this authority in the knownAuthorities config parameter."},b2cAuthorityUriInvalidPath:{code:"b2c_authority_uri_invalid_path",desc:"The given URI for the B2C authority is invalid."},b2cKnownAuthoritiesNotSet:{code:"b2c_known_authorities_not_set",desc:"Must set known authorities when validateAuthority is set to True and using B2C"},claimsRequestParsingError:{code:"claims_request_parsing_error",desc:"Could not parse the given claims request object."},emptyRequestError:{code:"empty_request_error",desc:"Request object is required."},invalidCorrelationIdError:{code:"invalid_guid_sent_as_correlationId",desc:"Please set the correlationId as a valid guid"},telemetryConfigError:{code:"telemetry_config_error",desc:"Telemetry config is not configured with required values"},ssoSilentError:{code:"sso_silent_error",desc:"request must contain either sid or login_hint"}},Gc=function(t){Mm(e,t);function e(r,n){var i=t.call(this,r,n)||this;return i.name="ClientConfigurationError",Object.setPrototypeOf(i,e.prototype),i}return e.createNoSetConfigurationError=function(){return new e(zo.configurationNotSet.code,""+zo.configurationNotSet.desc)},e.createStorageNotSupportedError=function(r){return new e(zo.storageNotSupported.code,zo.storageNotSupported.desc+" Given location: "+r)},e.createRedirectCallbacksNotSetError=function(){return new e(zo.noRedirectCallbacksSet.code,zo.noRedirectCallbacksSet.desc)},e.createInvalidCallbackObjectError=function(r){return new e(zo.invalidCallbackObject.code,zo.invalidCallbackObject.desc+" Given value for callback function: "+r)},e.createEmptyScopesArrayError=function(r){return new e(zo.emptyScopes.code,zo.emptyScopes.desc+" Given value: "+r+".")},e.createScopesNonArrayError=function(r){return new e(zo.nonArrayScopes.code,zo.nonArrayScopes.desc+" Given value: "+r+".")},e.createClientIdSingleScopeError=function(r){return new e(zo.clientScope.code,zo.clientScope.desc+" Given value: "+r+".")},e.createScopesRequiredError=function(r){return new e(zo.scopesRequired.code,zo.scopesRequired.desc+" Given value: "+r)},e.createInvalidPromptError=function(r){return new e(zo.invalidPrompt.code,zo.invalidPrompt.desc+" Given value: "+r)},e.createClaimsRequestParsingError=function(r){return new e(zo.claimsRequestParsingError.code,zo.claimsRequestParsingError.desc+" Given value: "+r)},e.createEmptyRequestError=function(){var r=zo.emptyRequestError,n=r.code,i=r.desc;return new e(n,i)},e.createInvalidCorrelationIdError=function(){return new e(zo.invalidCorrelationIdError.code,zo.invalidCorrelationIdError.desc)},e.createKnownAuthoritiesNotSetError=function(){return new e(zo.b2cKnownAuthoritiesNotSet.code,zo.b2cKnownAuthoritiesNotSet.desc)},e.createInvalidAuthorityTypeError=function(){return new e(zo.invalidAuthorityType.code,zo.invalidAuthorityType.desc)},e.createUntrustedAuthorityError=function(){return new e(zo.untrustedAuthority.code,zo.untrustedAuthority.desc)},e.createTelemetryConfigError=function(r){var n=zo.telemetryConfigError,i=n.code,o=n.desc,a={applicationName:"string",applicationVersion:"string",telemetryEmitter:"function"},s=Object.keys(a).reduce(function(l,u){return r[u]?l:l.concat([u+" ("+a[u]+")"])},[]);return new e(i,o+" mising values: "+s.join(","))},e.createSsoSilentError=function(){return new e(zo.ssoSilentError.code,zo.ssoSilentError.desc)},e}(ws),wC=function(){function t(){}return t.isIntersectingScopes=function(e,r){e=this.convertToLowerCase(e);for(var n=0;n<r.length;n++)if(e.indexOf(r[n].toLowerCase())>-1)return!0;return!1},t.containsScope=function(e,r){return e=this.convertToLowerCase(e),r.every(function(n){return e.indexOf(n.toString().toLowerCase())>=0})},t.convertToLowerCase=function(e){return e.map(function(r){return r.toLowerCase()})},t.removeElement=function(e,r){return e.filter(function(n){return n!==r})},t.parseScope=function(e){var r="";if(e)for(var n=0;n<e.length;++n)r+=n!==e.length-1?e[n]+" ":e[n];return r},t.validateInputScope=function(e,r,n){if(!e){if(r)throw Gc.createScopesRequiredError(e);return}if(!Array.isArray(e))throw Gc.createScopesNonArrayError(e);if(e.length<1)throw Gc.createEmptyScopesArrayError(e.toString());if(e.indexOf(n)>-1&&e.length>1)throw Gc.createClientIdSingleScopeError(e.toString())},t.getScopeFromState=function(e){if(e){var r=e.indexOf(tn.resourceDelimiter);if(r>-1&&r+1<e.length)return e.substring(r+1)}return""},t.appendScopes=function(e,r){return e?r?e.concat(r):e:null},t}(),Cs=function(){function t(){}return t.createNavigateUrl=function(e){var r=this.createNavigationUrlString(e),n=e.authorityInstance.AuthorizationEndpoint;n.indexOf("?")<0?n+="?":n+="&";var i=""+n+r.join("&");return i},t.createNavigationUrlString=function(e){var r=e.scopes;r.indexOf(e.clientId)===-1&&r.push(e.clientId);var n=[];return n.push("response_type="+e.responseType),this.translateclientIdUsedInScope(r,e.clientId),n.push("scope="+encodeURIComponent(wC.parseScope(r))),n.push("client_id="+encodeURIComponent(e.clientId)),n.push("redirect_uri="+encodeURIComponent(e.redirectUri)),n.push("state="+encodeURIComponent(e.state)),n.push("nonce="+encodeURIComponent(e.nonce)),n.push("client_info=1"),n.push("x-client-SKU="+e.xClientSku),n.push("x-client-Ver="+e.xClientVer),e.promptValue&&n.push("prompt="+encodeURIComponent(e.promptValue)),e.claimsValue&&n.push("claims="+encodeURIComponent(e.claimsValue)),e.queryParameters&&n.push(e.queryParameters),e.extraQueryParameters&&n.push(e.extraQueryParameters),n.push("client-request-id="+encodeURIComponent(e.correlationId)),n},t.translateclientIdUsedInScope=function(e,r){var n=e.indexOf(r);n>=0&&(e.splice(n,1),e.indexOf("openid")===-1&&e.push("openid"),e.indexOf("profile")===-1&&e.push("profile"))},t.getCurrentUrl=function(){return window.location.href.split("?")[0].split("#")[0]},t.removeHashFromUrl=function(e){return e.split("#")[0]},t.replaceTenantPath=function(e,r){e=e.toLowerCase();var n=this.GetUrlComponents(e),i=n.PathSegments;return r&&i.length!==0&&i[0]===tn.common&&(i[0]=r),this.constructAuthorityUriFromObject(n,i)},t.constructAuthorityUriFromObject=function(e,r){return this.CanonicalizeUri(e.Protocol+"//"+e.HostNameAndPort+"/"+r.join("/"))},t.GetUrlComponents=function(e){if(!e)throw"Url required";var r=RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?"),n=e.match(r);if(!n||n.length<6)throw"Valid url required";var i={Protocol:n[1],HostNameAndPort:n[4],AbsolutePath:n[5]},o=i.AbsolutePath.split("/");return o=o.filter(function(a){return a&&a.length>0}),i.PathSegments=o,n[6]&&(i.Search=n[6]),n[8]&&(i.Hash=n[8]),i},t.CanonicalizeUri=function(e){return e&&(e=e.toLowerCase()),e&&!t.endsWith(e,"/")&&(e+="/"),e},t.endsWith=function(e,r){return!e||!r?!1:e.indexOf(r,e.length-r.length)!==-1},t.urlRemoveQueryStringParameter=function(e,r){if(Ia.isEmpty(e))return e;var n=new RegExp("(\\&"+r+"=)[^&]+");return e=e.replace(n,""),n=new RegExp("("+r+"=)[^&]+&"),e=e.replace(n,""),n=new RegExp("("+r+"=)[^&]+"),e=e.replace(n,""),e},t.getHashFromUrl=function(e){var r=e.indexOf("#"),n=e.indexOf("#/");return n>-1?e.substring(n+2):r>-1?e.substring(r+1):e},t.urlContainsHash=function(e){var r=t.deserializeHash(e);return r.hasOwnProperty(Si.ERROR_DESCRIPTION)||r.hasOwnProperty(Si.ERROR)||r.hasOwnProperty(Si.ACCESS_TOKEN)||r.hasOwnProperty(Si.ID_TOKEN)},t.deserializeHash=function(e){var r=t.getHashFromUrl(e);return _c.deserialize(r)},t.getHostFromUri=function(e){var r=String(e).replace(/^(https?:)\/\//,"");return r=r.split("/")[0],r},t}(),sne=function(){function t(e,r,n,i,o){this.authority=Cs.CanonicalizeUri(e),this.clientId=r,this.scopes=n,this.homeAccountIdentifier=_c.base64Encode(i)+"."+_c.base64Encode(o)}return t}(),ane=function(){function t(e,r,n,i){this.accessToken=e,this.idToken=r,this.expiresIn=n,this.homeAccountIdentifier=i}return t}(),CC=function(){function t(e,r,n,i,o,a,s){this.authorityInstance=e,this.clientId=r,this.nonce=_c.createNewGuid(),this.scopes=o?o.slice():[r],this.state=a,this.correlationId=s,this.xClientSku="MSAL.JS",this.xClientVer=wD(),this.responseType=n,this.redirectUri=i}return Object.defineProperty(t.prototype,"authority",{get:function(){return this.authorityInstance?this.authorityInstance.CanonicalAuthority:null},enumerable:!0,configurable:!0}),t.prototype.populateQueryParams=function(e,r,n,i){var o={};r&&(r.prompt&&(this.promptValue=r.prompt),r.claimsRequest&&(this.claimsValue=r.claimsRequest),t.isSSOParam(r)&&(o=this.constructUnifiedCacheQueryParameter(r,null))),n&&(o=this.constructUnifiedCacheQueryParameter(null,n)),o=this.addHintParameters(e,o);var a=r?r.extraQueryParameters:null;this.queryParameters=t.generateQueryParametersString(o),this.extraQueryParameters=t.generateQueryParametersString(a,i)},t.prototype.constructUnifiedCacheQueryParameter=function(e,r){var n,i,o={};if(e)if(e.account){var a=e.account;a.sid?(n=bl.SID,i=a.sid):a.userName&&(n=bl.LOGIN_HINT,i=a.userName)}else e.sid?(n=bl.SID,i=e.sid):e.loginHint&&(n=bl.LOGIN_HINT,i=e.loginHint);else r&&r.hasOwnProperty(tn.upn)&&(n=bl.ID_TOKEN,i=r.upn);return o=this.addSSOParameter(n,i),o},t.prototype.addHintParameters=function(e,r){if(e&&!r[bl.SID]){var n=!r[bl.LOGIN_HINT]&&e.sid&&this.promptValue===uI.NONE;if(n)r=this.addSSOParameter(bl.SID,e.sid,r);else{var i=!r[bl.LOGIN_HINT]&&e.userName&&!Ia.isEmpty(e.userName);i&&(r=this.addSSOParameter(bl.LOGIN_HINT,e.userName,r))}}return r},t.prototype.addSSOParameter=function(e,r,n){if(n||(n={}),!r)return n;switch(e){case bl.SID:{n[bl.SID]=r;break}case bl.ID_TOKEN:{n[bl.LOGIN_HINT]=r;break}case bl.LOGIN_HINT:{n[bl.LOGIN_HINT]=r;break}}return n},t.generateQueryParametersString=function(e,r){var n=null;return e&&Object.keys(e).forEach(function(i){i===tn.domain_hint&&(r||e[bl.SID])||(n==null?n=i+"="+encodeURIComponent(e[i]):n+="&"+i+"="+encodeURIComponent(e[i]))}),n},t.isSSOParam=function(e){return e&&(e.account||e.sid||e.loginHint)},t}(),fI=function(){function t(e){if(!e||Ia.isEmpty(e)){this.uid="",this.utid="";return}try{var r=_c.base64Decode(e),n=JSON.parse(r);n&&(n.hasOwnProperty("uid")&&(this.uid=n.uid),n.hasOwnProperty("utid")&&(this.utid=n.utid))}catch(i){throw ws.createClientInfoDecodingError(i)}}return Object.defineProperty(t.prototype,"uid",{get:function(){return this._uid?this._uid:""},set:function(e){this._uid=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"utid",{get:function(){return this._utid?this._utid:""},set:function(e){this._utid=e},enumerable:!0,configurable:!0}),t}(),N7=function(){function t(){}return t.decodeJwt=function(e){if(Ia.isEmpty(e))return null;var r=/^([^\.\s]*)\.([^\.\s]+)\.([^\.\s]*)$/,n=r.exec(e);if(!n||n.length<4)return null;var i={header:n[1],JWSPayload:n[2],JWSSig:n[3]};return i},t.extractIdToken=function(e){var r=this.decodeJwt(e);if(!r)return null;try{var n=r.JWSPayload,i=_c.base64Decode(n);return i?JSON.parse(i):null}catch{}return null},t}(),EC=function(){function t(e){if(Ia.isEmpty(e))throw ws.createIdTokenNullOrEmptyError(e);try{this.rawIdToken=e,this.claims=N7.extractIdToken(e),this.claims&&(this.claims.hasOwnProperty("iss")&&(this.issuer=this.claims.iss),this.claims.hasOwnProperty("oid")&&(this.objectId=this.claims.oid),this.claims.hasOwnProperty("sub")&&(this.subject=this.claims.sub),this.claims.hasOwnProperty("tid")&&(this.tenantId=this.claims.tid),this.claims.hasOwnProperty("ver")&&(this.version=this.claims.ver),this.claims.hasOwnProperty("preferred_username")&&(this.preferredName=this.claims.preferred_username),this.claims.hasOwnProperty("name")&&(this.name=this.claims.name),this.claims.hasOwnProperty("nonce")&&(this.nonce=this.claims.nonce),this.claims.hasOwnProperty("exp")&&(this.expiration=this.claims.exp),this.claims.hasOwnProperty("home_oid")&&(this.homeObjectId=this.claims.home_oid),this.claims.hasOwnProperty("sid")&&(this.sid=this.claims.sid),this.claims.hasOwnProperty("cloud_instance_host_name")&&(this.cloudInstance=this.claims.cloud_instance_host_name))}catch(r){throw ws.createIdTokenParsingError(r)}}return t}(),j8e=function(){function t(e,r){this.key=e,this.value=r}return t}(),U8e=function(){function t(e){if(!window)throw xy.createNoWindowObjectError("Browser storage class could not find window object");var r=typeof window[e]!="undefined"&&window[e]!=null;if(!r)throw Gc.createStorageNotSupportedError(e);this.cacheLocation=e}return t.prototype.setItem=function(e,r,n){window[this.cacheLocation].setItem(e,r),n&&this.setItemCookie(e,r)},t.prototype.getItem=function(e,r){return r&&this.getItemCookie(e)?this.getItemCookie(e):window[this.cacheLocation].getItem(e)},t.prototype.removeItem=function(e){return window[this.cacheLocation].removeItem(e)},t.prototype.clear=function(){return window[this.cacheLocation].clear()},t.prototype.setItemCookie=function(e,r,n){var i=e+"="+r+";path=/;";if(n){var o=this.getCookieExpirationTime(n);i+="expires="+o+";"}document.cookie=i},t.prototype.getItemCookie=function(e){for(var r=e+"=",n=document.cookie.split(";"),i=0;i<n.length;i++){for(var o=n[i];o.charAt(0)===" ";)o=o.substring(1);if(o.indexOf(r)===0)return o.substring(r.length,o.length)}return""},t.prototype.clearItemCookie=function(e){this.setItemCookie(e,"",-1)},t.prototype.getCookieExpirationTime=function(e){var r=new Date,n=new Date(r.getTime()+e*24*60*60*1e3);return n.toUTCString()},t}(),_y=function(t){Mm(e,t);function e(r,n,i){var o=t.call(this,n)||this;return o.clientId=r,o.rollbackEnabled=!0,o.migrateCacheEntries(i),o}return e.prototype.migrateCacheEntries=function(r){var n=this,i=tn.cachePrefix+"."+Am.IDTOKEN,o=tn.cachePrefix+"."+Am.CLIENT_INFO,a=tn.cachePrefix+"."+Tu.ERROR,s=tn.cachePrefix+"."+Tu.ERROR_DESC,l=t.prototype.getItem.call(this,i),u=t.prototype.getItem.call(this,o),p=t.prototype.getItem.call(this,a),m=t.prototype.getItem.call(this,s),v=[l,u,p,m],x=[Am.IDTOKEN,Am.CLIENT_INFO,Tu.ERROR,Tu.ERROR_DESC];x.forEach(function(y,_){return n.duplicateCacheEntry(y,v[_],r)})},e.prototype.duplicateCacheEntry=function(r,n,i){n&&this.setItem(r,n,i)},e.prototype.generateCacheKey=function(r,n){try{return JSON.parse(r),r}catch{return r.indexOf(""+tn.cachePrefix)===0||r.indexOf(tn.adalIdToken)===0?r:n?tn.cachePrefix+"."+this.clientId+"."+r:tn.cachePrefix+"."+r}},e.prototype.setItem=function(r,n,i,o){t.prototype.setItem.call(this,this.generateCacheKey(r,!0),n,i),this.rollbackEnabled&&t.prototype.setItem.call(this,this.generateCacheKey(r,!1),n,i)},e.prototype.getItem=function(r,n){return t.prototype.getItem.call(this,this.generateCacheKey(r,!0),n)},e.prototype.removeItem=function(r){t.prototype.removeItem.call(this,this.generateCacheKey(r,!0)),this.rollbackEnabled&&t.prototype.removeItem.call(this,this.generateCacheKey(r,!1))},e.prototype.resetCacheItems=function(){var r=window[this.cacheLocation],n;for(n in r)r.hasOwnProperty(n)&&n.indexOf(tn.cachePrefix)!==-1&&t.prototype.removeItem.call(this,n)},e.prototype.resetTempCacheItems=function(r){var n=window[this.cacheLocation],i;for(i in n)(!r||i.indexOf(r)!==-1)&&!this.tokenRenewalInProgress(r)&&(this.removeItem(i),this.setItemCookie(i,"",-1),this.clearMsalCookie(r));this.removeItem(oo.INTERACTION_STATUS),this.removeItem(oo.REDIRECT_REQUEST)},e.prototype.setItemCookie=function(r,n,i){t.prototype.setItemCookie.call(this,this.generateCacheKey(r,!0),n,i),this.rollbackEnabled&&t.prototype.setItemCookie.call(this,this.generateCacheKey(r,!1),n,i)},e.prototype.getItemCookie=function(r){return t.prototype.getItemCookie.call(this,this.generateCacheKey(r,!0))},e.prototype.getAllAccessTokens=function(r,n){var i=this,o=Object.keys(window[this.cacheLocation]).reduce(function(a,s){var l=s.match(r)&&s.match(n)&&s.match(tn.scopes);if(l){var u=i.getItem(s);if(u)try{var p=JSON.parse(s),m=new j8e(p,JSON.parse(u));return a.concat([m])}catch{throw ws.createCacheParseError(s)}}return a},[]);return o},e.prototype.tokenRenewalInProgress=function(r){var n=this.getItem(oo.RENEW_STATUS+"|"+r);return!!(n&&n===tn.inProgress)},e.prototype.clearMsalCookie=function(r){this.clearItemCookie(oo.NONCE_IDTOKEN+"|"+r),this.clearItemCookie(oo.STATE_LOGIN+"|"+r),this.clearItemCookie(oo.LOGIN_REQUEST+"|"+r),this.clearItemCookie(oo.STATE_ACQ_TOKEN+"|"+r)},e.generateAcquireTokenAccountKey=function(r,n){return""+oo.ACQUIRE_TOKEN_ACCOUNT+tn.resourceDelimiter+r+tn.resourceDelimiter+n},e.generateAuthorityKey=function(r){return""+oo.AUTHORITY+tn.resourceDelimiter+r},e}(U8e),J1=function(){function t(e,r,n,i,o,a,s){this.accountIdentifier=e,this.homeAccountIdentifier=r,this.userName=n,this.name=i,this.idToken=o,this.idTokenClaims=o,this.sid=a,this.environment=s}return t.createAccount=function(e,r){var n=e.objectId||e.subject,i=r?r.uid:"",o=r?r.utid:"",a;return!Ia.isEmpty(i)&&!Ia.isEmpty(o)&&(a=_c.base64Encode(i)+"."+_c.base64Encode(o)),new t(n,a,e.preferredName,e.name,e.claims,e.sid,e.issuer)},t.compareAccounts=function(e,r){return!e||!r?!1:!!(e.homeAccountIdentifier&&r.homeAccountIdentifier&&e.homeAccountIdentifier===r.homeAccountIdentifier)},t}(),Pu=function(){function t(){}return t.isInIframe=function(){return window.parent!==window},t.isInPopup=function(){return!!(window.opener&&window.opener!==window)},t.generateFrameName=function(e,r){return""+e+tn.resourceDelimiter+r},t.monitorWindowForHash=function(e,r,n,i){return new Promise(function(o,a){var s=r/t.POLLING_INTERVAL_MS,l=0,u=setInterval(function(){if(e.closed){clearInterval(u),a(ws.createUserCancelledError());return}var p;try{p=e.location.href}catch{}if(i)l++;else{if(!p||p==="about:blank")return;l++}p&&Cs.urlContainsHash(p)?(clearInterval(u),o(e.location.hash)):l>s&&(clearInterval(u),a(ws.createTokenRenewalTimeoutError(n)))},t.POLLING_INTERVAL_MS)})},t.loadFrame=function(e,r,n,i){var o=this;return i.info("LoadFrame: "+r),new Promise(function(a,s){setTimeout(function(){var l=o.loadFrameSync(e,r,i);if(!l){s("Unable to load iframe with name: "+r);return}a(l)},n)})},t.loadFrameSync=function(e,r,n){var i=t.addHiddenIFrame(r,n);if(i)(i.src===""||i.src==="about:blank")&&(i.src=e,n.infoPii("Frame Name : "+r+" Navigated to: "+e));else return null;return i},t.addHiddenIFrame=function(e,r){if(typeof e=="undefined")return null;r.info("Add msal frame to document:"+e);var n=document.getElementById(e);if(!n){if(document.createElement&&document.documentElement&&window.navigator.userAgent.indexOf("MSIE 5.0")===-1){var i=document.createElement("iframe");i.setAttribute("id",e),i.setAttribute("aria-hidden","true"),i.style.visibility="hidden",i.style.position="absolute",i.style.width=i.style.height="0",i.style.border="0",i.setAttribute("sandbox","allow-scripts allow-same-origin allow-forms"),n=document.getElementsByTagName("body")[0].appendChild(i)}else document.body&&document.body.insertAdjacentHTML&&document.body.insertAdjacentHTML("beforeend","<iframe name='"+e+"' id='"+e+"' style='display:none'></iframe>");window.frames&&window.frames[e]&&(n=window.frames[e])}return n},t.removeHiddenIframe=function(e){document.body===e.parentNode&&document.body.removeChild(e)},t.getIframeWithHash=function(e){var r=document.getElementsByTagName("iframe"),n=Array.apply(null,Array(r.length)).map(function(i,o){return r.item(o)});return n.filter(function(i){try{return i.contentWindow.location.hash===e}catch{return!1}})[0]},t.getPopups=function(){return window.openedWindows||(window.openedWindows=[]),window.openedWindows},t.getPopUpWithHash=function(e){return t.getPopups().filter(function(r){try{return r.location.hash===e}catch{return!1}})[0]},t.trackPopup=function(e){t.getPopups().push(e)},t.closePopups=function(){t.getPopups().forEach(function(e){return e.close()})},t.blockReloadInHiddenIframes=function(){if(Cs.urlContainsHash(window.location.hash)&&t.isInIframe())throw ws.createBlockTokenRequestsInHiddenIframeError()},t.checkIfBackButtonIsPressed=function(e){var r=e.getItem(oo.REDIRECT_REQUEST);if(r&&!Cs.urlContainsHash(window.location.hash)){var n=r.split(tn.resourceDelimiter),i=n.length>1?n[n.length-1]:null;e.resetTempCacheItems(i)}},t.POLLING_INTERVAL_MS=50,t}(),ED=function(){function t(){}return t.parseExpiresIn=function(e){return e||(e="3599"),parseInt(e,10)},t.now=function(){return Math.round(new Date().getTime()/1e3)},t}(),Tx=function(){function t(){}return t.validateRequest=function(e,r,n,i){if(!r&&!e)throw Gc.createEmptyRequestError();var o,a;e&&(o=r?wC.appendScopes(e.scopes,e.extraScopesToConsent):e.scopes,wC.validateInputScope(o,!r,n),this.validatePromptParameter(e.prompt),a=this.validateEQParameters(e.extraQueryParameters,e.claimsRequest),this.validateClaimsRequest(e.claimsRequest));var s=this.validateAndGenerateState(e&&e.state,i),l=this.validateAndGenerateCorrelationId(e&&e.correlationId),u=Kd({},e,{extraQueryParameters:a,scopes:o,state:s,correlationId:l});return u},t.validatePromptParameter=function(e){if(e&&[uI.LOGIN,uI.SELECT_ACCOUNT,uI.CONSENT,uI.NONE].indexOf(e)<0)throw Gc.createInvalidPromptError(e)},t.validateEQParameters=function(e,r){var n=Kd({},e);return n?(r&&delete n[tn.claims],B8e.forEach(function(i){n[i]&&delete n[i]}),n):null},t.validateClaimsRequest=function(e){if(!!e){var r;try{r=JSON.parse(e)}catch(n){throw Gc.createClaimsRequestParsingError(n)}}},t.validateAndGenerateState=function(e,r){return Ia.isEmpty(e)?t.generateLibraryState(r):""+t.generateLibraryState(r)+tn.resourceDelimiter+e},t.generateLibraryState=function(e){var r={id:_c.createNewGuid(),ts:ED.now(),method:e},n=JSON.stringify(r);return _c.base64Encode(n)},t.parseLibraryState=function(e){var r=decodeURIComponent(e).split(tn.resourceDelimiter)[0];if(_c.isGuid(r))return{id:r,ts:ED.now(),method:tn.interactionTypeRedirect};try{var n=_c.base64Decode(r),i=JSON.parse(n);return i}catch{throw ws.createInvalidStateError(e,null)}},t.validateAndGenerateCorrelationId=function(e){if(e&&!_c.isGuid(e))throw Gc.createInvalidCorrelationIdError();return _c.isGuid(e)?e:_c.createNewGuid()},t.createRequestSignature=function(e){return""+e.scopes.join(" ").toLowerCase()+tn.resourceDelimiter+e.authority},t}(),$7=function(){function t(){}return t.setResponseIdToken=function(e,r){if(e){if(!r)return e}else return null;var n=Number(r.expiration);return n&&!e.expiresOn&&(e.expiresOn=new Date(n*1e3)),Kd({},e,{idToken:r,idTokenClaims:r.claims,uniqueId:r.objectId||r.subject,tenantId:r.tenantId})},t}(),lne=function(){function t(){}return t.prototype.sendRequestAsync=function(e,r,n){var i=this;return new Promise(function(o,a){var s=new XMLHttpRequest;if(s.open(r,e,!0),s.onload=function(l){(s.status<200||s.status>=300)&&a(i.handleError(s.responseText));var u;try{u=JSON.parse(s.responseText)}catch{a(i.handleError(s.responseText))}var p={statusCode:s.status,body:u};o(p)},s.onerror=function(l){a(s.status)},r==="GET")s.send();else throw"not implemented"})},t.prototype.handleError=function(e){var r;try{if(r=JSON.parse(e),r.error)return r.error;throw e}catch{return e}},t}(),V8e="msal.",cne="event_name",H8e="start_time",une="elapsed_time",Px={MsalCorrelationIdConstStrKey:"Microsoft.MSAL.correlation_id",ApiTelemIdConstStrKey:"msal.api_telem_id",ApiIdConstStrKey:"msal.api_id",BrokerAppConstStrKey:"Microsoft_MSAL_broker_app",CacheEventCountConstStrKey:"Microsoft_MSAL_cache_event_count",HttpEventCountTelemetryBatchKey:"Microsoft_MSAL_http_event_count",IdpConstStrKey:"Microsoft_MSAL_idp",IsSilentTelemetryBatchKey:"",IsSuccessfulConstStrKey:"Microsoft_MSAL_is_successful",ResponseTimeConstStrKey:"Microsoft_MSAL_response_time",TenantIdConstStrKey:"Microsoft_MSAL_tenant_id",UiEventCountTelemetryBatchKey:"Microsoft_MSAL_ui_event_count"},W8e="<tenant>",F7=function(t){var e=Cs.GetUrlComponents(t);if(!ine[e.HostNameAndPort.toLocaleLowerCase()])return t;var r=e.PathSegments;if(r&&r.length>=2){var n=r[1]==="tfp"?2:1;n<r.length&&(r[n]=W8e)}return e.Protocol+"//"+e.HostNameAndPort+"/"+r.join("/")},z7=function(t){return _c.base64Encode(t)},Co=function(t){return""+V8e+(t||"")},G8e=function(){function t(e,r){var n;this.startTimestamp=Date.now(),this.eventId=_c.createNewGuid(),this.event=(n={},n[Co(cne)]=e,n[Co(H8e)]=this.startTimestamp,n[Co(une)]=-1,n[""+Px.MsalCorrelationIdConstStrKey]=r,n)}return t.prototype.setElapsedTime=function(e){this.event[Co(une)]=e},t.prototype.stop=function(){this.setElapsedTime(+Date.now()-+this.startTimestamp)},Object.defineProperty(t.prototype,"telemetryCorrelationId",{get:function(){return this.event[""+Px.MsalCorrelationIdConstStrKey]},set:function(e){this.event[""+Px.MsalCorrelationIdConstStrKey]=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"eventName",{get:function(){return this.event[Co(cne)]},enumerable:!0,configurable:!0}),t.prototype.get=function(){return Kd({},this.event,{eventId:this.eventId})},t}(),B7=G8e,Jh={HTTP_PATH:Co("http_path"),USER_AGENT:Co("user_agent"),QUERY_PARAMETERS:Co("query_parameters"),API_VERSION:Co("api_version"),RESPONSE_CODE:Co("response_code"),O_AUTH_ERROR_CODE:Co("oauth_error_code"),HTTP_METHOD:Co("http_method"),REQUEST_ID_HEADER:Co("request_id_header"),SPE_INFO:Co("spe_info"),SERVER_ERROR_CODE:Co("server_error_code"),SERVER_SUB_ERROR_CODE:Co("server_sub_error_code"),URL:Co("url")},q8e=function(t){Mm(e,t);function e(r){return t.call(this,Co("http_event"),r)||this}return Object.defineProperty(e.prototype,"url",{set:function(r){var n=F7(r);this.event[Jh.URL]=n&&n.toLowerCase()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"httpPath",{set:function(r){this.event[Jh.HTTP_PATH]=F7(r).toLowerCase()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"userAgent",{set:function(r){this.event[Jh.USER_AGENT]=r},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"queryParams",{set:function(r){this.event[Jh.QUERY_PARAMETERS]=CC.generateQueryParametersString(r)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"apiVersion",{set:function(r){this.event[Jh.API_VERSION]=r.toLowerCase()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"httpResponseStatus",{set:function(r){this.event[Jh.RESPONSE_CODE]=r},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"oAuthErrorCode",{set:function(r){this.event[Jh.O_AUTH_ERROR_CODE]=r},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"httpMethod",{set:function(r){this.event[Jh.HTTP_METHOD]=r},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"requestIdHeader",{set:function(r){this.event[Jh.REQUEST_ID_HEADER]=r},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"speInfo",{set:function(r){this.event[Jh.SPE_INFO]=r},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"serverErrorCode",{set:function(r){this.event[Jh.SERVER_ERROR_CODE]=r},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"serverSubErrorCode",{set:function(r){this.event[Jh.SERVER_SUB_ERROR_CODE]=r},enumerable:!0,configurable:!0}),e}(B7),fne=q8e,by;(function(t){t[t.Aad=0]="Aad",t[t.Adfs=1]="Adfs",t[t.B2C=2]="B2C"})(by||(by={}));var dne=function(){function t(e,r){this.IsValidationEnabled=r,this.CanonicalAuthority=e,this.validateAsUri()}return Object.defineProperty(t.prototype,"Tenant",{get:function(){return this.CanonicalAuthorityUrlComponents.PathSegments[0]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"AuthorizationEndpoint",{get:function(){return this.validateResolved(),this.tenantDiscoveryResponse.AuthorizationEndpoint.replace(/{tenant}|{tenantid}/g,this.Tenant)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"EndSessionEndpoint",{get:function(){return this.validateResolved(),this.tenantDiscoveryResponse.EndSessionEndpoint.replace(/{tenant}|{tenantid}/g,this.Tenant)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"SelfSignedJwtAudience",{get:function(){return this.validateResolved(),this.tenantDiscoveryResponse.Issuer.replace(/{tenant}|{tenantid}/g,this.Tenant)},enumerable:!0,configurable:!0}),t.prototype.validateResolved=function(){if(!this.tenantDiscoveryResponse)throw"Please call ResolveEndpointsAsync first"},Object.defineProperty(t.prototype,"CanonicalAuthority",{get:function(){return this.canonicalAuthority},set:function(e){this.canonicalAuthority=Cs.CanonicalizeUri(e),this.canonicalAuthorityUrlComponents=null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"CanonicalAuthorityUrlComponents",{get:function(){return this.canonicalAuthorityUrlComponents||(this.canonicalAuthorityUrlComponents=Cs.GetUrlComponents(this.CanonicalAuthority)),this.canonicalAuthorityUrlComponents},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"DefaultOpenIdConfigurationEndpoint",{get:function(){return this.CanonicalAuthority+"v2.0/.well-known/openid-configuration"},enumerable:!0,configurable:!0}),t.prototype.validateAsUri=function(){var e;try{e=this.CanonicalAuthorityUrlComponents}catch{throw zo.invalidAuthorityType}if(!e.Protocol||e.Protocol.toLowerCase()!=="https:")throw zo.authorityUriInsecure;if(!e.PathSegments||e.PathSegments.length<1)throw zo.authorityUriInvalidPath},t.prototype.DiscoverEndpoints=function(e,r,n){var i=new lne,o="GET",a=new fne(n);return a.url=e,a.httpMethod=o,r.startEvent(a),i.sendRequestAsync(e,o,!0).then(function(s){return a.httpResponseStatus=s.statusCode,r.stopEvent(a),{AuthorizationEndpoint:s.body.authorization_endpoint,EndSessionEndpoint:s.body.end_session_endpoint,Issuer:s.body.issuer}}).catch(function(s){throw a.serverErrorCode=s,r.stopEvent(a),s})},t.prototype.resolveEndpointsAsync=function(e,r){return lI(this,void 0,void 0,function(){var n,i;return cI(this,function(o){switch(o.label){case 0:return[4,this.GetOpenIdConfigurationEndpointAsync(e,r)];case 1:return n=o.sent(),i=this,[4,this.DiscoverEndpoints(n,e,r)];case 2:return i.tenantDiscoveryResponse=o.sent(),[2,this]}})})},t}(),X8e=function(t){Mm(e,t);function e(r,n){return t.call(this,r,n)||this}return Object.defineProperty(e.prototype,"AadInstanceDiscoveryEndpointUrl",{get:function(){return e.AadInstanceDiscoveryEndpoint+"?api-version=1.0&authorization_endpoint="+this.CanonicalAuthority+"oauth2/v2.0/authorize"},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"AuthorityType",{get:function(){return by.Aad},enumerable:!0,configurable:!0}),e.prototype.GetOpenIdConfigurationEndpointAsync=function(r,n){return lI(this,void 0,void 0,function(){var i,o,a;return cI(this,function(s){return!this.IsValidationEnabled||this.IsInTrustedHostList(this.CanonicalAuthorityUrlComponents.HostNameAndPort)?[2,this.DefaultOpenIdConfigurationEndpoint]:(i=new lne,o="GET",a=r.createAndStartHttpEvent(n,o,this.AadInstanceDiscoveryEndpointUrl),[2,i.sendRequestAsync(this.AadInstanceDiscoveryEndpointUrl,o,!0).then(function(l){return a.httpResponseStatus=l.statusCode,r.stopEvent(a),l.body.tenant_discovery_endpoint}).catch(function(l){throw a.serverErrorCode=l,r.stopEvent(a),l})])})})},e.prototype.IsInTrustedHostList=function(r){return ine[r.toLowerCase()]},e.AadInstanceDiscoveryEndpoint="https://login.microsoftonline.com/common/discovery/instance",e}(dne),dI={},Y8e=function(t){Mm(e,t);function e(r,n){return t.call(this,r,n)||this}return Object.defineProperty(e.prototype,"AuthorityType",{get:function(){return by.B2C},enumerable:!0,configurable:!0}),e.prototype.GetOpenIdConfigurationEndpointAsync=function(){return lI(this,void 0,void 0,function(){return cI(this,function(r){if(!this.IsValidationEnabled||this.IsInTrustedHostList(this.CanonicalAuthorityUrlComponents.HostNameAndPort))return[2,this.DefaultOpenIdConfigurationEndpoint];throw Gc.createUntrustedAuthorityError()})})},e.prototype.IsInTrustedHostList=function(r){if(this.IsValidationEnabled&&!Object.keys(dI).length)throw Gc.createKnownAuthoritiesNotSetError();return dI[r.toLowerCase()]},e.B2C_PREFIX="tfp",e}(dne),Ix=function(){function t(){}return t.setKnownAuthorities=function(e,r){e&&!Object.keys(dI).length&&r.forEach(function(n){dI[n]=n})},t.detectAuthorityFromUrl=function(e){e=Cs.CanonicalizeUri(e);var r=Cs.GetUrlComponents(e),n=r.PathSegments;return n[0]==="adfs"?by.Adfs:Object.keys(dI).length?by.B2C:by.Aad},t.CreateInstance=function(e,r){if(Ia.isEmpty(e))return null;var n=t.detectAuthorityFromUrl(e);switch(n){case by.B2C:return new Y8e(e,r);case by.Aad:return new X8e(e,r);default:throw Gc.createInvalidAuthorityTypeError()}},t}(),Kf;(function(t){t[t.Error=0]="Error",t[t.Warning=1]="Warning",t[t.Info=2]="Info",t[t.Verbose=3]="Verbose"})(Kf||(Kf={}));var K8e=function(){function t(e,r){r===void 0&&(r={}),this.level=Kf.Info;var n=r.correlationId,i=n===void 0?"":n,o=r.level,a=o===void 0?Kf.Info:o,s=r.piiLoggingEnabled,l=s===void 0?!1:s;this.localCallback=e,this.correlationId=i,this.level=a,this.piiLoggingEnabled=l}return t.prototype.logMessage=function(e,r,n){if(!(e>this.level||!this.piiLoggingEnabled&&n)){var i=new Date().toUTCString(),o;Ia.isEmpty(this.correlationId)?o=i+":"+wD()+"-"+Kf[e]+" "+r:o=i+":"+this.correlationId+"-"+wD()+"-"+Kf[e]+" "+r,this.executeCallback(e,o,n)}},t.prototype.executeCallback=function(e,r,n){this.localCallback&&this.localCallback(e,r,n)},t.prototype.error=function(e){this.logMessage(Kf.Error,e,!1)},t.prototype.errorPii=function(e){this.logMessage(Kf.Error,e,!0)},t.prototype.warning=function(e){this.logMessage(Kf.Warning,e,!1)},t.prototype.warningPii=function(e){this.logMessage(Kf.Warning,e,!0)},t.prototype.info=function(e){this.logMessage(Kf.Info,e,!1)},t.prototype.infoPii=function(e){this.logMessage(Kf.Info,e,!0)},t.prototype.verbose=function(e){this.logMessage(Kf.Verbose,e,!1)},t.prototype.verbosePii=function(e){this.logMessage(Kf.Verbose,e,!0)},t.prototype.isPiiLoggingEnabled=function(){return this.piiLoggingEnabled},t}(),Z8e=6e3,Q8e=300,J8e=500,e9e={clientId:"",authority:null,validateAuthority:!0,knownAuthorities:[],redirectUri:function(){return Cs.getCurrentUrl()},postLogoutRedirectUri:function(){return Cs.getCurrentUrl()},navigateToLoginRequestUrl:!0},t9e={cacheLocation:"sessionStorage",storeAuthStateInCookie:!1},r9e={logger:new K8e(null),loadFrameTimeout:Z8e,tokenRenewalOffsetSeconds:Q8e,navigateFrameWait:J8e},n9e={isAngular:!1,unprotectedResources:new Array,protectedResourceMap:new Map};function i9e(t){var e=t.auth,r=t.cache,n=r===void 0?{}:r,i=t.system,o=i===void 0?{}:i,a=t.framework,s=a===void 0?{}:a,l={auth:Kd({},e9e,e),cache:Kd({},t9e,n),system:Kd({},r9e,o),framework:Kd({},n9e,s)};return l}var j7={serverUnavailable:{code:"server_unavailable",desc:"Server is temporarily unavailable."},unknownServerError:{code:"unknown_server_error"}},hne=function(t){Mm(e,t);function e(r,n){var i=t.call(this,r,n)||this;return i.name="ServerError",Object.setPrototypeOf(i,e.prototype),i}return e.createServerUnavailableError=function(){return new e(j7.serverUnavailable.code,j7.serverUnavailable.desc)},e.createUnknownServerError=function(r){return new e(j7.unknownServerError.code,r)},e}(xy),SC={interactionRequired:{code:"interaction_required"},consentRequired:{code:"consent_required"},loginRequired:{code:"login_required"}},U7=function(t){Mm(e,t);function e(r,n){var i=t.call(this,r,n)||this;return i.name="InteractionRequiredAuthError",Object.setPrototypeOf(i,e.prototype),i}return e.isInteractionRequiredError=function(r){var n=[SC.interactionRequired.code,SC.consentRequired.code,SC.loginRequired.code];return r&&n.indexOf(r)>-1},e.createLoginRequiredAuthError=function(r){return new e(SC.loginRequired.code,r)},e.createInteractionRequiredAuthError=function(r){return new e(SC.interactionRequired.code,r)},e.createConsentRequiredAuthError=function(r){return new e(SC.consentRequired.code,r)},e}(hne);function SD(t){return{uniqueId:"",tenantId:"",tokenType:"",idToken:null,idTokenClaims:null,accessToken:"",scopes:null,expiresOn:null,account:null,accountState:t,fromCache:!1}}var o9e=function(t){Mm(e,t);function e(r,n,i,o){var a=t.call(this,Co("default_event"),n)||this;return a.event[Co("client_id")]=i,a.event[Co("sdk_plaform")]=r.sdk,a.event[Co("sdk_version")]=r.sdkVersion,a.event[Co("application_name")]=r.applicationName,a.event[Co("application_version")]=r.applicationVersion,a.event[Co("effective_connection_speed")]=r.networkInformation&&r.networkInformation.connectionSpeed,a.event[""+Px.UiEventCountTelemetryBatchKey]=a.getEventCount(Co("ui_event"),o),a.event[""+Px.HttpEventCountTelemetryBatchKey]=a.getEventCount(Co("http_event"),o),a.event[""+Px.CacheEventCountConstStrKey]=a.getEventCount(Co("cache_event"),o),a}return e.prototype.getEventCount=function(r,n){return n[r]?n[r]:0},e}(B7),s9e=o9e,Mx,wy={AUTHORITY:Co("authority"),AUTHORITY_TYPE:Co("authority_type"),PROMPT:Co("ui_behavior"),TENANT_ID:Co("tenant_id"),USER_ID:Co("user_id"),WAS_SUCESSFUL:Co("was_successful"),API_ERROR_CODE:Co("api_error_code"),LOGIN_HINT:Co("login_hint")},Ax;(function(t){t[t.AcquireTokenRedirect=2001]="AcquireTokenRedirect",t[t.AcquireTokenSilent=2002]="AcquireTokenSilent",t[t.AcquireTokenPopup=2003]="AcquireTokenPopup",t[t.LoginRedirect=2004]="LoginRedirect",t[t.LoginPopup=2005]="LoginPopup",t[t.Logout=2006]="Logout"})(Ax||(Ax={}));var ep;(function(t){t.AcquireTokenRedirect="AcquireTokenRedirect",t.AcquireTokenSilent="AcquireTokenSilent",t.AcquireTokenPopup="AcquireTokenPopup",t.LoginRedirect="LoginRedirect",t.LoginPopup="LoginPopup",t.Logout="Logout"})(ep||(ep={}));var a9e=(Mx={},Mx[ep.AcquireTokenSilent]=Ax.AcquireTokenSilent,Mx[ep.AcquireTokenPopup]=Ax.AcquireTokenPopup,Mx[ep.AcquireTokenRedirect]=Ax.AcquireTokenRedirect,Mx[ep.LoginPopup]=Ax.LoginPopup,Mx[ep.LoginRedirect]=Ax.LoginRedirect,Mx[ep.Logout]=Ax.Logout,Mx),l9e=function(t){Mm(e,t);function e(r,n,i){var o=t.call(this,Co("api_event"),r)||this;return i&&(o.apiCode=a9e[i],o.apiEventIdentifier=i),o.logger=n,o}return Object.defineProperty(e.prototype,"apiEventIdentifier",{set:function(r){this.event[Px.ApiTelemIdConstStrKey]=r},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"apiCode",{set:function(r){this.event[Px.ApiIdConstStrKey]=r},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"authority",{set:function(r){this.event[wy.AUTHORITY]=F7(r).toLowerCase()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"apiErrorCode",{set:function(r){this.event[wy.API_ERROR_CODE]=r},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"tenantId",{set:function(r){this.event[wy.TENANT_ID]=this.logger.isPiiLoggingEnabled()&&r?z7(r):null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"accountId",{set:function(r){this.event[wy.USER_ID]=this.logger.isPiiLoggingEnabled()&&r?z7(r):null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"wasSuccessful",{get:function(){return this.event[wy.WAS_SUCESSFUL]===!0},set:function(r){this.event[wy.WAS_SUCESSFUL]=r},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"loginHint",{set:function(r){this.event[wy.LOGIN_HINT]=this.logger.isPiiLoggingEnabled()&&r?z7(r):null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"authorityType",{set:function(r){this.event[wy.AUTHORITY_TYPE]=r.toLowerCase()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"promptType",{set:function(r){this.event[wy.PROMPT]=r.toLowerCase()},enumerable:!0,configurable:!0}),e}(B7),pne=function(t){return t.telemetryCorrelationId+"-"+t.eventId+"-"+t.eventName},c9e=function(){function t(e,r){this.completedEvents={},this.inProgressEvents={},this.eventCountByCorrelationId={},this.onlySendFailureTelemetry=!1,this.telemetryPlatform=Kd({sdk:tn.libraryName,sdkVersion:wD(),networkInformation:{connectionSpeed:navigator&&navigator.connection&&navigator.connection.effectiveType}},e.platform),this.clientId=e.clientId,this.onlySendFailureTelemetry=e.onlySendFailureTelemetry,this.telemetryEmitter=r}return t.getTelemetrymanagerStub=function(e){var r="UnSetStub",n="0.0",i=function(){},o={applicationName:r,applicationVersion:n},a={platform:o,clientId:e};return new this(a,i)},t.prototype.startEvent=function(e){if(!!this.telemetryEmitter){var r=pne(e);this.inProgressEvents[r]=e}},t.prototype.stopEvent=function(e){var r=pne(e);if(!(!this.telemetryEmitter||!this.inProgressEvents[r])){e.stop(),this.incrementEventCount(e);var n=this.completedEvents[e.telemetryCorrelationId];this.completedEvents[e.telemetryCorrelationId]=(n||[]).concat([e]),delete this.inProgressEvents[r]}},t.prototype.flush=function(e){var r=this;if(!(!this.telemetryEmitter||!this.completedEvents[e])){var n=this.getOrphanedEvents(e);n.forEach(function(l){return r.incrementEventCount(l)});var i=this.completedEvents[e].concat(n);delete this.completedEvents[e];var o=this.eventCountByCorrelationId[e];if(delete this.eventCountByCorrelationId[e],!(!i||!i.length)){var a=new s9e(this.telemetryPlatform,e,this.clientId,o),s=i.concat([a]);this.telemetryEmitter(s.map(function(l){return l.get()}))}}},t.prototype.createAndStartApiEvent=function(e,r,n){var i=new l9e(e,n,r);return this.startEvent(i),i},t.prototype.stopAndFlushApiEvent=function(e,r,n,i){r.wasSuccessful=n,i&&(r.apiErrorCode=i),this.stopEvent(r),this.flush(e)},t.prototype.createAndStartHttpEvent=function(e,r,n){console.log(n);var i=new fne(e);return i.url=n,i.httpMethod=r,this.startEvent(i),i},t.prototype.incrementEventCount=function(e){var r,n=e.eventName,i=this.eventCountByCorrelationId[e.telemetryCorrelationId];i?i[n]=i[n]?i[n]+1:1:this.eventCountByCorrelationId[e.telemetryCorrelationId]=(r={},r[n]=1,r)},t.prototype.getOrphanedEvents=function(e){var r=this;return Object.keys(this.inProgressEvents).reduce(function(n,i){if(i.indexOf(e)!==-1){var o=r.inProgressEvents[i];return delete r.inProgressEvents[i],n.concat([o])}return n},[])},t}(),mne=c9e,u9e="https://login.microsoftonline.com/common",Rx={id_token:"id_token",token:"token",id_token_token:"id_token token"},CRt=function(){function t(e){this.authResponseCallback=null,this.tokenReceivedCallback=null,this.errorReceivedCallback=null,this.config=i9e(e),this.logger=this.config.system.logger,this.clientId=this.config.auth.clientId,this.inCookie=this.config.cache.storeAuthStateInCookie,this.telemetryManager=this.getTelemetryManagerFromConfig(this.config.system.telemetry,this.clientId),Ix.setKnownAuthorities(this.config.auth.validateAuthority,this.config.auth.knownAuthorities),this.authority=this.config.auth.authority||u9e,this.cacheStorage=new _y(this.clientId,this.config.cache.cacheLocation,this.inCookie),window.activeRenewals={},window.renewStates=[],window.callbackMappedToRenewStates={},window.promiseMappedToRenewStates={},window.msal=this;var r=window.location.hash,n=Cs.urlContainsHash(r);if(Pu.checkIfBackButtonIsPressed(this.cacheStorage),n){var i=this.getResponseState(r);i.method===tn.interactionTypeRedirect&&this.handleRedirectAuthenticationResponse(r)}}return Object.defineProperty(t.prototype,"authority",{get:function(){return this.authorityInstance.CanonicalAuthority},set:function(e){this.authorityInstance=Ix.CreateInstance(e,this.config.auth.validateAuthority)},enumerable:!0,configurable:!0}),t.prototype.getAuthorityInstance=function(){return this.authorityInstance},t.prototype.handleRedirectCallback=function(e,r){if(!e)throw Gc.createInvalidCallbackObjectError(e);r?(this.tokenReceivedCallback=e,this.errorReceivedCallback=r,this.logger.warning("This overload for callback is deprecated - please change the format of the callbacks to a single callback as shown: (err: AuthError, response: AuthResponse).")):this.authResponseCallback=e,this.redirectError?this.authErrorHandler(tn.interactionTypeRedirect,this.redirectError,this.redirectResponse):this.redirectResponse&&this.authResponseHandler(tn.interactionTypeRedirect,this.redirectResponse)},t.prototype.urlContainsHash=function(e){return Cs.urlContainsHash(e)},t.prototype.authResponseHandler=function(e,r,n){if(e===tn.interactionTypeRedirect)this.errorReceivedCallback?this.tokenReceivedCallback(r):this.authResponseCallback&&this.authResponseCallback(null,r);else if(e===tn.interactionTypePopup)n(r);else throw ws.createInvalidInteractionTypeError()},t.prototype.authErrorHandler=function(e,r,n,i){if(this.cacheStorage.removeItem(oo.INTERACTION_STATUS),e===tn.interactionTypeRedirect)this.errorReceivedCallback?this.errorReceivedCallback(r,n.accountState):this.authResponseCallback(r,n);else if(e===tn.interactionTypePopup)i(r);else throw ws.createInvalidInteractionTypeError()},t.prototype.loginRedirect=function(e){var r=Tx.validateRequest(e,!0,this.clientId,tn.interactionTypeRedirect);this.acquireTokenInteractive(tn.interactionTypeRedirect,!0,r,null,null)},t.prototype.acquireTokenRedirect=function(e){var r=Tx.validateRequest(e,!1,this.clientId,tn.interactionTypeRedirect);this.acquireTokenInteractive(tn.interactionTypeRedirect,!1,r,null,null)},t.prototype.loginPopup=function(e){var r=this,n=Tx.validateRequest(e,!0,this.clientId,tn.interactionTypePopup),i=this.telemetryManager.createAndStartApiEvent(n.correlationId,ep.LoginPopup,this.logger);return new Promise(function(o,a){r.acquireTokenInteractive(tn.interactionTypePopup,!0,n,o,a)}).then(function(o){return r.telemetryManager.stopAndFlushApiEvent(n.correlationId,i,!0),o}).catch(function(o){throw r.cacheStorage.resetTempCacheItems(n.state),r.telemetryManager.stopAndFlushApiEvent(n.correlationId,i,!1,o.errorCode),o})},t.prototype.acquireTokenPopup=function(e){var r=this,n=Tx.validateRequest(e,!1,this.clientId,tn.interactionTypePopup),i=this.telemetryManager.createAndStartApiEvent(n.correlationId,ep.AcquireTokenPopup,this.logger);return new Promise(function(o,a){r.acquireTokenInteractive(tn.interactionTypePopup,!1,n,o,a)}).then(function(o){return r.telemetryManager.stopAndFlushApiEvent(n.correlationId,i,!0),o}).catch(function(o){throw r.cacheStorage.resetTempCacheItems(n.state),r.telemetryManager.stopAndFlushApiEvent(n.correlationId,i,!1,o.errorCode),o})},t.prototype.acquireTokenInteractive=function(e,r,n,i,o){var a=this;Pu.blockReloadInHiddenIframes();var s=this.cacheStorage.getItem(oo.INTERACTION_STATUS);if(e===tn.interactionTypeRedirect&&this.cacheStorage.setItem(oo.REDIRECT_REQUEST,""+tn.inProgress+tn.resourceDelimiter+n.state),s===tn.inProgress){var l=r?ws.createLoginInProgressError():ws.createAcquireTokenInProgressError(),u=SD(this.getAccountState(n.state));this.cacheStorage.resetTempCacheItems(n.state),this.authErrorHandler(e,l,u,o);return}var p=n&&n.account&&!r?n.account:this.getAccount();if(!p&&!CC.isSSOParam(n))if(r){var m=this.extractADALIdToken();if(m&&!n.scopes){this.logger.info("ADAL's idToken exists. Extracting login information from ADAL's idToken ");var v=this.buildIDTokenRequest(n);this.silentLogin=!0,this.acquireTokenSilent(v).then(function(x){a.silentLogin=!1,a.logger.info("Unified cache call is successful"),a.authResponseHandler(e,x,i)},function(x){a.silentLogin=!1,a.logger.error("Error occurred during unified cache ATS: "+x),a.acquireTokenHelper(null,e,r,n,i,o)})}else this.acquireTokenHelper(null,e,r,n,i,o)}else{this.logger.info("User login is required");var u=SD(this.getAccountState(n.state));this.cacheStorage.resetTempCacheItems(n.state),this.authErrorHandler(e,ws.createUserLoginRequiredError(),u,o);return}else this.acquireTokenHelper(p,e,r,n,i,o)},t.prototype.acquireTokenHelper=function(e,r,n,i,o,a){var s=this;this.cacheStorage.setItem(oo.INTERACTION_STATUS,tn.inProgress);var l=i.scopes?i.scopes.join(" ").toLowerCase():this.clientId.toLowerCase(),u,p=i&&i.authority?Ix.CreateInstance(i.authority,this.config.auth.validateAuthority):this.authorityInstance,m;if(r===tn.interactionTypePopup){try{m=this.openPopup("about:blank","msal",tn.popUpWidth,tn.popUpHeight),Pu.trackPopup(m)}catch{this.logger.info(Mi.popUpWindowError.code+":"+Mi.popUpWindowError.desc),this.cacheStorage.setItem(Tu.ERROR,Mi.popUpWindowError.code),this.cacheStorage.setItem(Tu.ERROR_DESC,Mi.popUpWindowError.desc),a&&a(ws.createPopupWindowError())}if(!m)return}p.resolveEndpointsAsync(this.telemetryManager,i.correlationId).then(function(){return lI(s,void 0,void 0,function(){var v,x,y,_,w;return cI(this,function(C){switch(C.label){case 0:if(v=n?Rx.id_token:this.getTokenType(e,i.scopes,!1),x=i.redirectStartPage||window.location.href,u=new CC(p,this.clientId,v,this.getRedirectUri(i&&i.redirectUri),i.scopes,i.state,i.correlationId),this.updateCacheEntries(u,e,n,x),u.populateQueryParams(e,i),y=Cs.createNavigateUrl(u)+tn.response_mode_fragment,r===tn.interactionTypeRedirect)n||this.cacheStorage.setItem(""+oo.STATE_ACQ_TOKEN+tn.resourceDelimiter+i.state,u.state,this.inCookie);else if(r===tn.interactionTypePopup)window.renewStates.push(u.state),window.requestType=n?tn.login:tn.renewToken,this.registerCallback(u.state,l,o,a);else throw ws.createInvalidInteractionTypeError();if(this.navigateWindow(y,m),!m)return[3,4];C.label=1;case 1:return C.trys.push([1,3,,4]),[4,Pu.monitorWindowForHash(m,this.config.system.loadFrameTimeout,y)];case 2:return _=C.sent(),this.handleAuthenticationResponse(_),this.cacheStorage.removeItem(oo.INTERACTION_STATUS),this.logger.info("Closing popup window"),this.config.framework.isAngular&&(this.broadcast("msal:popUpHashChanged",_),Pu.closePopups()),[3,4];case 3:return w=C.sent(),a&&a(w),this.config.framework.isAngular?this.broadcast("msal:popUpClosed",w.errorCode+tn.resourceDelimiter+w.errorMessage):(this.cacheStorage.removeItem(oo.INTERACTION_STATUS),m.close()),[3,4];case 4:return[2]}})})}).catch(function(v){s.logger.warning("could not resolve endpoints"),s.cacheStorage.resetTempCacheItems(i.state),s.authErrorHandler(r,ws.createEndpointResolutionError(v.toString),SD(i.state),a),m&&m.close()})},t.prototype.ssoSilent=function(e){if(!e)throw Gc.createEmptyRequestError();if(!e.sid&&!e.loginHint)throw Gc.createSsoSilentError();return this.acquireTokenSilent(Kd({},e,{scopes:[this.clientId]}))},t.prototype.acquireTokenSilent=function(e){var r=this,n=Tx.validateRequest(e,!1,this.clientId,tn.interactionTypeSilent),i=this.telemetryManager.createAndStartApiEvent(n.correlationId,ep.AcquireTokenSilent,this.logger),o=Tx.createRequestSignature(n);return new Promise(function(a,s){Pu.blockReloadInHiddenIframes();var l=n.scopes.join(" ").toLowerCase(),u=n.account||r.getAccount(),p=r.cacheStorage.getItem(tn.adalIdToken);if(!u&&!(n.sid||n.loginHint)&&Ia.isEmpty(p))return r.logger.info("User login is required"),s(ws.createUserLoginRequiredError());var m=r.getTokenType(u,n.scopes,!0),v=new CC(Ix.CreateInstance(n.authority,r.config.auth.validateAuthority),r.clientId,m,r.getRedirectUri(n.redirectUri),n.scopes,n.state,n.correlationId);if(CC.isSSOParam(n)||u)v.populateQueryParams(u,n,null,!0);else if(!u&&!Ia.isEmpty(p)){var x=N7.extractIdToken(p);r.logger.verbose("ADAL's idToken exists. Extracting login information from ADAL's idToken "),v.populateQueryParams(u,null,x,!0)}var y=n.claimsRequest||v.claimsValue,_,w;if(!y&&!n.forceRefresh)try{w=r.getCachedToken(v,u)}catch(E){_=E}if(w)return r.logger.info("Token is already in cache for scope:"+l),a(w),null;if(_)return r.logger.infoPii(_.errorCode+":"+_.errorMessage),s(_),null;var C=void 0;return y?C="Skipped cache lookup since claims were given.":n.forceRefresh?C="Skipped cache lookup since request.forceRefresh option was set to true":C="Token is not in cache for scope:"+l,r.logger.verbose(C),v.authorityInstance||(v.authorityInstance=n.authority?Ix.CreateInstance(n.authority,r.config.auth.validateAuthority):r.authorityInstance),v.authorityInstance.resolveEndpointsAsync(r.telemetryManager,n.correlationId).then(function(){window.activeRenewals[o]?(r.logger.verbose("Renew token for scope and authority: "+o+" is in progress. Registering callback"),r.registerCallback(window.activeRenewals[o],o,a,s)):n.scopes&&n.scopes.indexOf(r.clientId)>-1&&n.scopes.length===1?(r.logger.verbose("renewing idToken"),r.silentLogin=!0,r.renewIdToken(o,a,s,u,v)):(r.logger.verbose("renewing accesstoken"),r.renewToken(o,a,s,u,v))}).catch(function(E){return r.logger.warning("could not resolve endpoints"),s(ws.createEndpointResolutionError(E.toString())),null})}).then(function(a){return r.telemetryManager.stopAndFlushApiEvent(n.correlationId,i,!0),a}).catch(function(a){throw r.cacheStorage.resetTempCacheItems(n.state),r.telemetryManager.stopAndFlushApiEvent(n.correlationId,i,!1,a.errorCode),a})},t.prototype.openPopup=function(e,r,n,i){try{var o=window.screenLeft?window.screenLeft:window.screenX,a=window.screenTop?window.screenTop:window.screenY,s=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,l=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,u=s/2-n/2+o,p=l/2-i/2+a,m=window.open(e,r,"width="+n+", height="+i+", top="+p+", left="+u+", scrollbars=yes");if(!m)throw ws.createPopupWindowError();return m.focus&&m.focus(),m}catch(v){throw this.logger.error("error opening popup "+v.message),this.cacheStorage.removeItem(oo.INTERACTION_STATUS),ws.createPopupWindowError(v.toString())}},t.prototype.loadIframeTimeout=function(e,r,n){return lI(this,void 0,void 0,function(){var i,o,a,s,l;return cI(this,function(u){switch(u.label){case 0:return i=window.activeRenewals[n],this.logger.verbose("Set loading state to pending for: "+n+":"+i),this.cacheStorage.setItem(""+oo.RENEW_STATUS+tn.resourceDelimiter+i,tn.inProgress),this.config.system.navigateFrameWait?[4,Pu.loadFrame(e,r,this.config.system.navigateFrameWait,this.logger)]:[3,2];case 1:return a=u.sent(),[3,3];case 2:a=Pu.loadFrameSync(e,r,this.logger),u.label=3;case 3:o=a,u.label=4;case 4:return u.trys.push([4,6,,7]),[4,Pu.monitorWindowForHash(o.contentWindow,this.config.system.loadFrameTimeout,e,!0)];case 5:return s=u.sent(),s&&this.handleAuthenticationResponse(s),[3,7];case 6:throw l=u.sent(),this.cacheStorage.getItem(""+oo.RENEW_STATUS+tn.resourceDelimiter+i)===tn.inProgress&&(this.logger.verbose("Loading frame has timed out after: "+this.config.system.loadFrameTimeout/1e3+" seconds for scope/authority "+n+":"+i),i&&window.callbackMappedToRenewStates[i]&&window.callbackMappedToRenewStates[i](null,l),this.cacheStorage.removeItem(""+oo.RENEW_STATUS+tn.resourceDelimiter+i)),Pu.removeHiddenIframe(o),l;case 7:return Pu.removeHiddenIframe(o),[2]}})})},t.prototype.navigateWindow=function(e,r){if(e&&!Ia.isEmpty(e)){var n=r||window,i=r?"Navigated Popup window to:"+e:"Navigate to:"+e;this.logger.infoPii(i),n.location.assign(e)}else throw this.logger.info("Navigate url is empty"),xy.createUnexpectedError("Navigate url is empty")},t.prototype.registerCallback=function(e,r,n,i){var o=this;window.activeRenewals[r]=e,window.promiseMappedToRenewStates[e]||(window.promiseMappedToRenewStates[e]=[]),window.promiseMappedToRenewStates[e].push({resolve:n,reject:i}),window.callbackMappedToRenewStates[e]||(window.callbackMappedToRenewStates[e]=function(a,s){window.activeRenewals[r]=null;for(var l=0;l<window.promiseMappedToRenewStates[e].length;++l)try{if(s)window.promiseMappedToRenewStates[e][l].reject(s);else if(a)window.promiseMappedToRenewStates[e][l].resolve(a);else throw o.cacheStorage.resetTempCacheItems(e),xy.createUnexpectedError("Error and response are both null")}catch(u){o.logger.warning(u)}window.promiseMappedToRenewStates[e]=null,window.callbackMappedToRenewStates[e]=null})},t.prototype.logout=function(e){var r=this,n=e||_c.createNewGuid(),i=this.telemetryManager.createAndStartApiEvent(n,ep.Logout,this.logger);this.clearCache(),this.account=null;var o="";this.getPostLogoutRedirectUri()&&(o="post_logout_redirect_uri="+encodeURIComponent(this.getPostLogoutRedirectUri())),this.authorityInstance.resolveEndpointsAsync(this.telemetryManager,n).then(function(a){var s=a.EndSessionEndpoint?a.EndSessionEndpoint+"?"+o:r.authority+"oauth2/v2.0/logout?"+o;r.telemetryManager.stopAndFlushApiEvent(n,i,!0),r.navigateWindow(s)}).catch(function(a){r.telemetryManager.stopAndFlushApiEvent(n,i,!1,a.errorCode)})},t.prototype.clearCache=function(){window.renewStates=[];for(var e=this.cacheStorage.getAllAccessTokens(tn.clientId,tn.homeAccountIdentifier),r=0;r<e.length;r++)this.cacheStorage.removeItem(JSON.stringify(e[r].key));this.cacheStorage.resetCacheItems(),this.cacheStorage.clearMsalCookie()},t.prototype.clearCacheForScope=function(e){for(var r=this.cacheStorage.getAllAccessTokens(tn.clientId,tn.homeAccountIdentifier),n=0;n<r.length;n++){var i=r[n];i.value.accessToken===e&&this.cacheStorage.removeItem(JSON.stringify(i.key))}},t.prototype.isCallback=function(e){return this.logger.info("isCallback will be deprecated in favor of urlContainsHash in MSAL.js v2.0."),Cs.urlContainsHash(e)},t.prototype.processCallBack=function(e,r,n){this.logger.info("Processing the callback from redirect response"),r||(r=this.getResponseState(e));var i,o;try{i=this.saveTokenFromHash(e,r)}catch(s){o=s}try{this.cacheStorage.clearMsalCookie(r.state);var a=this.getAccountState(r.state);if(i){if(r.requestType===tn.renewToken||i.accessToken?(window.parent!==window?this.logger.verbose("Window is in iframe, acquiring token silently"):this.logger.verbose("acquiring token interactive in progress"),i.tokenType=Si.ACCESS_TOKEN):r.requestType===tn.login&&(i.tokenType=Si.ID_TOKEN),!n){this.redirectResponse=i;return}}else if(!n){this.redirectResponse=SD(a),this.redirectError=o,this.cacheStorage.resetTempCacheItems(r.state);return}n(i,o)}catch(s){throw this.logger.error("Error occurred in token received callback function: "+s),ws.createErrorInCallbackFunction(s.toString())}},t.prototype.handleAuthenticationResponse=function(e){var r=e||window.location.hash,n=this.getResponseState(r),i=window.callbackMappedToRenewStates[n.state];this.processCallBack(r,n,i),Pu.closePopups()},t.prototype.handleRedirectAuthenticationResponse=function(e){this.logger.info("Returned from redirect url"),window.location.hash="";var r=this.getResponseState(e);if(this.config.auth.navigateToLoginRequestUrl&&window.parent===window){var n=this.cacheStorage.getItem(""+oo.LOGIN_REQUEST+tn.resourceDelimiter+r.state,this.inCookie);if(!n||n==="null"){this.logger.error("Unable to get valid login request url from cache, redirecting to home page"),window.location.assign("/");return}else{var i=Cs.removeHashFromUrl(window.location.href),o=Cs.removeHashFromUrl(n);if(i!==o){window.location.assign(""+o+e);return}else{var a=Cs.GetUrlComponents(n);a.Hash&&(window.location.hash=a.Hash)}}}this.processCallBack(e,r,null)},t.prototype.getResponseState=function(e){var r=Cs.deserializeHash(e),n;if(!r)throw xy.createUnexpectedError("Hash was not parsed correctly.");if(r.hasOwnProperty(Si.STATE)){var i=Tx.parseLibraryState(r.state);n={requestType:tn.unknown,state:r.state,timestamp:i.ts,method:i.method,stateMatch:!1}}else throw xy.createUnexpectedError("Hash does not contain state.");if(n.state===this.cacheStorage.getItem(""+oo.STATE_LOGIN+tn.resourceDelimiter+n.state,this.inCookie)||n.state===this.silentAuthenticationState)return n.requestType=tn.login,n.stateMatch=!0,n;if(n.state===this.cacheStorage.getItem(""+oo.STATE_ACQ_TOKEN+tn.resourceDelimiter+n.state,this.inCookie))return n.requestType=tn.renewToken,n.stateMatch=!0,n;if(!n.stateMatch){n.requestType=window.requestType;for(var o=window.renewStates,a=0;a<o.length;a++)if(o[a]===n.state){n.stateMatch=!0;break}}return n},t.prototype.getCachedToken=function(e,r){var n=null,i=e.scopes,o=this.cacheStorage.getAllAccessTokens(this.clientId,r?r.homeAccountIdentifier:null);if(o.length===0)return null;var a=[];if(e.authority){for(var s=0;s<o.length;s++){var l=o[s],u=l.key.scopes.split(" ");wC.containsScope(u,i)&&Cs.CanonicalizeUri(l.key.authority)===e.authority&&a.push(l)}if(a.length===0)return null;if(a.length===1)n=a[0];else throw ws.createMultipleMatchingTokensInCacheError(i.toString())}else{for(var s=0;s<o.length;s++){var l=o[s],u=l.key.scopes.split(" ");wC.containsScope(u,i)&&a.push(l)}if(a.length===1)n=a[0],e.authorityInstance=Ix.CreateInstance(n.key.authority,this.config.auth.validateAuthority);else{if(a.length>1)throw ws.createMultipleMatchingTokensInCacheError(i.toString());var p=this.getUniqueAuthority(o,"authority");if(p.length>1)throw ws.createMultipleAuthoritiesInCacheError(i.toString());e.authorityInstance=Ix.CreateInstance(p[0],this.config.auth.validateAuthority)}}if(n!=null){var m=Number(n.value.expiresIn),v=this.config.system.tokenRenewalOffsetSeconds||300;if(m&&m>ED.now()+v){var x=new EC(n.value.idToken);if(!r&&(r=this.getAccount(),!r))throw xy.createUnexpectedError("Account should not be null here.");var y=this.getAccountState(e.state),_={uniqueId:"",tenantId:"",tokenType:n.value.idToken===n.value.accessToken?Si.ID_TOKEN:Si.ACCESS_TOKEN,idToken:x,idTokenClaims:x.claims,accessToken:n.value.accessToken,scopes:n.key.scopes.split(" "),expiresOn:new Date(m*1e3),account:r,accountState:y,fromCache:!0};return $7.setResponseIdToken(_,x),_}else return this.cacheStorage.removeItem(JSON.stringify(a[0].key)),null}else return null},t.prototype.getUniqueAuthority=function(e,r){var n=[],i=[];return e.forEach(function(o){o.key.hasOwnProperty(r)&&i.indexOf(o.key[r])===-1&&(i.push(o.key[r]),n.push(o.key[r]))}),n},t.prototype.extractADALIdToken=function(){var e=this.cacheStorage.getItem(tn.adalIdToken);return Ia.isEmpty(e)?null:N7.extractIdToken(e)},t.prototype.renewToken=function(e,r,n,i,o){this.logger.verbose("renewToken is called for scope and authority: "+e);var a=Pu.generateFrameName(one.TOKEN_FRAME,e);Pu.addHiddenIFrame(a,this.logger),this.updateCacheEntries(o,i,!1),this.logger.verbose("Renew token Expected state: "+o.state);var s=Cs.urlRemoveQueryStringParameter(Cs.createNavigateUrl(o),tn.prompt)+tn.prompt_none+tn.response_mode_fragment;window.renewStates.push(o.state),window.requestType=tn.renewToken,this.registerCallback(o.state,e,r,n),this.logger.infoPii("Navigate to:"+s),this.loadIframeTimeout(s,a,e).catch(function(l){return n(l)})},t.prototype.renewIdToken=function(e,r,n,i,o){this.logger.info("renewidToken is called");var a=Pu.generateFrameName(one.ID_TOKEN_FRAME,e);Pu.addHiddenIFrame(a,this.logger),this.updateCacheEntries(o,i,!1),this.logger.verbose("Renew Idtoken Expected state: "+o.state);var s=Cs.urlRemoveQueryStringParameter(Cs.createNavigateUrl(o),tn.prompt)+tn.prompt_none+tn.response_mode_fragment;this.silentLogin?(window.requestType=tn.login,this.silentAuthenticationState=o.state):(window.requestType=tn.renewToken,window.renewStates.push(o.state)),this.registerCallback(o.state,e,r,n),this.logger.infoPii("Navigate to:"+s),this.loadIframeTimeout(s,a,e).catch(function(l){return n(l)})},t.prototype.saveAccessToken=function(e,r,n,i,o){var a,s=Kd({},e),l=new fI(i),u;if(n.hasOwnProperty(Si.SCOPE)){a=n[Si.SCOPE];for(var p=a.split(" "),m=this.cacheStorage.getAllAccessTokens(this.clientId,r),v=0;v<m.length;v++){var x=m[v];if(x.key.homeAccountIdentifier===e.account.homeAccountIdentifier){var y=x.key.scopes.split(" ");wC.isIntersectingScopes(y,p)&&this.cacheStorage.removeItem(JSON.stringify(x.key))}}var _=ED.parseExpiresIn(n[Si.EXPIRES_IN]),w=Tx.parseLibraryState(n[Si.STATE]);u=w.ts+_;var C=new sne(r,this.clientId,a,l.uid,l.utid),E=new ane(n[Si.ACCESS_TOKEN],o.rawIdToken,u.toString(),i);this.cacheStorage.setItem(JSON.stringify(C),JSON.stringify(E)),s.accessToken=n[Si.ACCESS_TOKEN],s.scopes=p}else{a=this.clientId;var C=new sne(r,this.clientId,a,l.uid,l.utid);u=Number(o.expiration);var E=new ane(n[Si.ID_TOKEN],n[Si.ID_TOKEN],u.toString(),i);this.cacheStorage.setItem(JSON.stringify(C),JSON.stringify(E)),s.scopes=[a],s.accessToken=n[Si.ID_TOKEN]}return u?s.expiresOn=new Date(u*1e3):this.logger.error("Could not parse expiresIn parameter"),s},t.prototype.saveTokenFromHash=function(e,r){this.logger.info("State status:"+r.stateMatch+"; Request type:"+r.requestType);var n={uniqueId:"",tenantId:"",tokenType:"",idToken:null,idTokenClaims:null,accessToken:null,scopes:[],expiresOn:null,account:null,accountState:"",fromCache:!1},i,o=Cs.deserializeHash(e),a="",s="",l=null;if(o.hasOwnProperty(Si.ERROR_DESCRIPTION)||o.hasOwnProperty(Si.ERROR)){if(this.logger.infoPii("Error :"+o[Si.ERROR]+"; Error description:"+o[Si.ERROR_DESCRIPTION]),this.cacheStorage.setItem(Tu.ERROR,o[Si.ERROR]),this.cacheStorage.setItem(Tu.ERROR_DESC,o[Si.ERROR_DESCRIPTION]),r.requestType===tn.login&&(this.cacheStorage.setItem(Tu.LOGIN_ERROR,o[Si.ERROR_DESCRIPTION]+":"+o[Si.ERROR]),a=_y.generateAuthorityKey(r.state)),r.requestType===tn.renewToken){a=_y.generateAuthorityKey(r.state);var u=this.getAccount(),p=void 0;u&&!Ia.isEmpty(u.homeAccountIdentifier)?p=u.homeAccountIdentifier:p=tn.no_account,s=_y.generateAcquireTokenAccountKey(p,r.state)}var m=Si.ERROR,v=o[m],x=Si.ERROR_DESCRIPTION,y=o[x];U7.isInteractionRequiredError(v)||U7.isInteractionRequiredError(y)?i=new U7(o[Si.ERROR],o[Si.ERROR_DESCRIPTION]):i=new hne(o[Si.ERROR],o[Si.ERROR_DESCRIPTION])}else if(r.stateMatch){this.logger.info("State is right"),o.hasOwnProperty(Si.SESSION_STATE)&&this.cacheStorage.setItem(""+oo.SESSION_STATE+tn.resourceDelimiter+r.state,o[Si.SESSION_STATE]),n.accountState=this.getAccountState(r.state);var _="";if(o.hasOwnProperty(Si.ACCESS_TOKEN)){this.logger.info("Fragment has access token"),n.accessToken=o[Si.ACCESS_TOKEN],o.hasOwnProperty(Si.SCOPE)&&(n.scopes=o[Si.SCOPE].split(" ")),o.hasOwnProperty(Si.ID_TOKEN)?(l=new EC(o[Si.ID_TOKEN]),n.idToken=l,n.idTokenClaims=l.claims):(l=new EC(this.cacheStorage.getItem(Am.IDTOKEN)),n=$7.setResponseIdToken(n,l));var w=this.populateAuthority(r.state,this.inCookie,this.cacheStorage,l);if(o.hasOwnProperty(Si.CLIENT_INFO))_=o[Si.CLIENT_INFO];else throw this.logger.warning("ClientInfo not received in the response from AAD"),ws.createClientInfoNotPopulatedError("ClientInfo not received in the response from the server");n.account=J1.createAccount(l,new fI(_));var C=void 0;n.account&&!Ia.isEmpty(n.account.homeAccountIdentifier)?C=n.account.homeAccountIdentifier:C=tn.no_account,s=_y.generateAcquireTokenAccountKey(C,r.state);var E=_y.generateAcquireTokenAccountKey(tn.no_account,r.state),T=this.cacheStorage.getItem(s),A=void 0;Ia.isEmpty(T)?Ia.isEmpty(this.cacheStorage.getItem(E))||(n=this.saveAccessToken(n,w,o,_,l)):(A=JSON.parse(T),n.account&&A&&J1.compareAccounts(n.account,A)?(n=this.saveAccessToken(n,w,o,_,l),this.logger.info("The user object received in the response is the same as the one passed in the acquireToken request")):this.logger.warning("The account object created from the response is not the same as the one passed in the acquireToken request"))}if(o.hasOwnProperty(Si.ID_TOKEN)){this.logger.info("Fragment has id token"),l=new EC(o[Si.ID_TOKEN]),n=$7.setResponseIdToken(n,l),o.hasOwnProperty(Si.CLIENT_INFO)?_=o[Si.CLIENT_INFO]:this.logger.warning("ClientInfo not received in the response from AAD");var w=this.populateAuthority(r.state,this.inCookie,this.cacheStorage,l);this.account=J1.createAccount(l,new fI(_)),n.account=this.account,l&&l.nonce?l.nonce!==this.cacheStorage.getItem(""+oo.NONCE_IDTOKEN+tn.resourceDelimiter+r.state,this.inCookie)?(this.account=null,this.cacheStorage.setItem(Tu.LOGIN_ERROR,"Nonce Mismatch. Expected Nonce: "+this.cacheStorage.getItem(""+oo.NONCE_IDTOKEN+tn.resourceDelimiter+r.state,this.inCookie)+",Actual Nonce: "+l.nonce),this.logger.error("Nonce Mismatch.Expected Nonce: "+this.cacheStorage.getItem(""+oo.NONCE_IDTOKEN+tn.resourceDelimiter+r.state,this.inCookie)+",Actual Nonce: "+l.nonce),i=ws.createNonceMismatchError(this.cacheStorage.getItem(""+oo.NONCE_IDTOKEN+tn.resourceDelimiter+r.state,this.inCookie),l.nonce)):(this.cacheStorage.setItem(Am.IDTOKEN,o[Si.ID_TOKEN]),this.cacheStorage.setItem(Am.CLIENT_INFO,_),this.saveAccessToken(n,w,o,_,l)):(a=r.state,s=r.state,this.logger.error("Invalid id_token received in the response"),i=ws.createInvalidIdTokenError(l),this.cacheStorage.setItem(Tu.ERROR,i.errorCode),this.cacheStorage.setItem(Tu.ERROR_DESC,i.errorMessage))}}else{a=r.state,s=r.state;var k=this.cacheStorage.getItem(""+oo.STATE_LOGIN+tn.resourceDelimiter+r.state,this.inCookie);this.logger.error("State Mismatch.Expected State: "+k+",Actual State: "+r.state),i=ws.createInvalidStateError(r.state,k),this.cacheStorage.setItem(Tu.ERROR,i.errorCode),this.cacheStorage.setItem(Tu.ERROR_DESC,i.errorMessage)}if(this.cacheStorage.removeItem(""+oo.RENEW_STATUS+tn.resourceDelimiter+r.state),this.cacheStorage.resetTempCacheItems(r.state),this.inCookie&&(this.cacheStorage.setItemCookie(a,"",-1),this.cacheStorage.clearMsalCookie(r.state)),i)throw i;if(!n)throw xy.createUnexpectedError("Response is null");return n},t.prototype.populateAuthority=function(e,r,n,i){var o=_y.generateAuthorityKey(e),a=n.getItem(o,r);return Ia.isEmpty(a)?a:Cs.replaceTenantPath(a,i.tenantId)},t.prototype.getAccount=function(){if(this.account)return this.account;var e=this.cacheStorage.getItem(Am.IDTOKEN),r=this.cacheStorage.getItem(Am.CLIENT_INFO);if(!Ia.isEmpty(e)&&!Ia.isEmpty(r)){var n=new EC(e),i=new fI(r);return this.account=J1.createAccount(n,i),this.account}return null},t.prototype.getAccountState=function(e){if(e){var r=e.indexOf(tn.resourceDelimiter);if(r>-1&&r+1<e.length)return e.substring(r+1)}return e},t.prototype.getAllAccounts=function(){for(var e=[],r=this.cacheStorage.getAllAccessTokens(tn.clientId,tn.homeAccountIdentifier),n=0;n<r.length;n++){var i=new EC(r[n].value.idToken),o=new fI(r[n].value.homeAccountIdentifier),a=J1.createAccount(i,o);e.push(a)}return this.getUniqueAccounts(e)},t.prototype.getUniqueAccounts=function(e){if(!e||e.length<=1)return e;for(var r=[],n=[],i=0;i<e.length;++i)e[i].homeAccountIdentifier&&r.indexOf(e[i].homeAccountIdentifier)===-1&&(r.push(e[i].homeAccountIdentifier),n.push(e[i]));return n},t.prototype.broadcast=function(e,r){var n=new CustomEvent(e,{detail:r});window.dispatchEvent(n)},t.prototype.getCachedTokenInternal=function(e,r,n,i){var o=r||this.getAccount();if(!o)return null;var a=this.authorityInstance?this.authorityInstance:Ix.CreateInstance(this.authority,this.config.auth.validateAuthority),s=this.getTokenType(o,e,!0),l=new CC(a,this.clientId,s,this.getRedirectUri(),e,n,i);return this.getCachedToken(l,r)},t.prototype.getScopesForEndpoint=function(e){if(this.config.framework.unprotectedResources.length>0){for(var r=0;r<this.config.framework.unprotectedResources.length;r++)if(e.indexOf(this.config.framework.unprotectedResources[r])>-1)return null}if(this.config.framework.protectedResourceMap.size>0)for(var n=0,i=Array.from(this.config.framework.protectedResourceMap.keys());n<i.length;n++){var o=i[n];if(e.indexOf(o)>-1)return this.config.framework.protectedResourceMap.get(o)}if(e.indexOf("http://")>-1||e.indexOf("https://")>-1){if(Cs.getHostFromUri(e)===Cs.getHostFromUri(this.getRedirectUri()))return new Array(this.clientId)}else return new Array(this.clientId);return null},t.prototype.getLoginInProgress=function(){return this.cacheStorage.getItem(oo.INTERACTION_STATUS)===tn.inProgress},t.prototype.setInteractionInProgress=function(e){e?this.cacheStorage.setItem(oo.INTERACTION_STATUS,tn.inProgress):this.cacheStorage.removeItem(oo.INTERACTION_STATUS)},t.prototype.setloginInProgress=function(e){this.setInteractionInProgress(e)},t.prototype.getAcquireTokenInProgress=function(){return this.cacheStorage.getItem(oo.INTERACTION_STATUS)===tn.inProgress},t.prototype.setAcquireTokenInProgress=function(e){this.setInteractionInProgress(e)},t.prototype.getLogger=function(){return this.logger},t.prototype.setLogger=function(e){this.logger=e},t.prototype.getRedirectUri=function(e){return e||(typeof this.config.auth.redirectUri=="function"?this.config.auth.redirectUri():this.config.auth.redirectUri)},t.prototype.getPostLogoutRedirectUri=function(){return typeof this.config.auth.postLogoutRedirectUri=="function"?this.config.auth.postLogoutRedirectUri():this.config.auth.postLogoutRedirectUri},t.prototype.getCurrentConfiguration=function(){if(!this.config)throw Gc.createNoSetConfigurationError();return this.config},t.prototype.getTokenType=function(e,r,n){var i;return n?(J1.compareAccounts(e,this.getAccount())?i=r.indexOf(this.config.auth.clientId)>-1?Rx.id_token:Rx.token:i=r.indexOf(this.config.auth.clientId)>-1?Rx.id_token:Rx.id_token_token,i):(J1.compareAccounts(e,this.getAccount())?i=r.indexOf(this.clientId)>-1?Rx.id_token:Rx.token:i=Rx.id_token_token,i)},t.prototype.setAccountCache=function(e,r){var n=e?this.getAccountId(e):tn.no_account,i=_y.generateAcquireTokenAccountKey(n,r);this.cacheStorage.setItem(i,JSON.stringify(e))},t.prototype.setAuthorityCache=function(e,r){var n=_y.generateAuthorityKey(e);this.cacheStorage.setItem(n,Cs.CanonicalizeUri(r),this.inCookie)},t.prototype.updateCacheEntries=function(e,r,n,i){n?(this.cacheStorage.setItem(""+oo.LOGIN_REQUEST+tn.resourceDelimiter+e.state,i,this.inCookie),this.cacheStorage.setItem(""+oo.STATE_LOGIN+tn.resourceDelimiter+e.state,e.state,this.inCookie)):this.setAccountCache(r,e.state),this.setAuthorityCache(e.state,e.authority),this.cacheStorage.setItem(""+oo.NONCE_IDTOKEN+tn.resourceDelimiter+e.state,e.nonce,this.inCookie)},t.prototype.getAccountId=function(e){var r;return Ia.isEmpty(e.homeAccountIdentifier)?r=tn.no_account:r=e.homeAccountIdentifier,r},t.prototype.buildIDTokenRequest=function(e){var r={scopes:[this.clientId],authority:this.authority,account:this.getAccount(),extraQueryParameters:e.extraQueryParameters,correlationId:e.correlationId};return r},t.prototype.getTelemetryManagerFromConfig=function(e,r){if(!e)return mne.getTelemetrymanagerStub(r);var n=e.applicationName,i=e.applicationVersion,o=e.telemetryEmitter;if(!n||!i||!o)throw Gc.createTelemetryConfigError(e);var a={applicationName:n,applicationVersion:i},s={platform:a,clientId:r};return new mne(s,o)},t}(),f9e="@@router/LOCATION_CHANGE",gne="@@router/CALL_HISTORY_METHOD",d9e=function(e){return function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return{type:gne,payload:{method:e,args:n}}}},ERt=d9e("push");function TD(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?TD=function(r){return typeof r}:TD=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},TD(t)}var h9e=function(e){var r=e.getIn,n=e.toJS,i=function(v){return v!=null&&TD(v)==="object"&&r(v,["location"])&&r(v,["action"])},o=function(v){var x=n(r(v,["router"]));if(!i(x))throw'Could not find router reducer in state tree, it must be mounted under "router"';return x},a=function(v){return n(r(o(v),["location"]))},s=function(v){return n(r(o(v),["action"]))},l=function(v){return n(r(o(v),["location","search"]))},u=function(v){return n(r(o(v),["location","hash"]))},p=function(v){var x=null,y=null;return function(_){var w=a(_)||{},C=w.pathname;if(C===x)return y;x=C;var E=N2(C,v);return(!E||!y||E.url!==y.url||E.isExact!==y.isExact)&&(y=E),y}};return{getLocation:a,getAction:s,getRouter:o,getSearch:l,getHash:u,createMatchSelector:p}},p9e=h9e;function m9e(t,e){return x9e(t)||y9e(t,e)||v9e(t,e)||g9e()}function g9e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function v9e(t,e){if(!!t){if(typeof t=="string")return vne(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(r);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return vne(t,e)}}function vne(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function y9e(t,e){if(!(typeof Symbol=="undefined"||!(Symbol.iterator in Object(t)))){var r=[],n=!0,i=!1,o=void 0;try{for(var a=t[Symbol.iterator](),s;!(n=(s=a.next()).done)&&(r.push(s.value),!(e&&r.length===e));n=!0);}catch(l){i=!0,o=l}finally{try{!n&&a.return!=null&&a.return()}finally{if(i)throw o}}return r}}function x9e(t){if(Array.isArray(t))return t}function yne(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function V7(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?yne(Object(r),!0).forEach(function(n){xne(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):yne(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function xne(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var _ne=function(e){if(e&&e.query)return e;var r=e&&e.search;if(typeof r!="string"||r.length===0)return V7({},e,{query:{}});var n=r.substring(1),i=n.split("&"),o=i.reduce(function(a,s){var l=s.split("="),u=m9e(l,2),p=u[0],m=u[1];return V7({},a,xne({},p,m))},{});return V7({},e,{query:o})},_9e=function(e){var r=e.fromJS,n=e.merge,i=function(a){var s=r({location:_ne(a.location),action:a.action});return function(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:s,u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},p=u.type,m=u.payload;if(p===f9e){var v=m.location,x=m.action,y=m.isFirstRendering;return y?l:n(l,{location:r(_ne(v)),action:x})}return l}};return i},b9e=_9e,w9e=function(e,r){if(!e)return e;var n=r.length;if(!!n){for(var i=e,o=0;o<n&&!!i;++o)i=i[r[o]];return i}},C9e=w9e;function bne(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function E9e(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?bne(Object(r),!0).forEach(function(n){S9e(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):bne(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function S9e(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var T9e={fromJS:function(e){return e},getIn:C9e,merge:function(e,r){return E9e({},e,{},r)},toJS:function(e){return e}},wne=T9e;function P9e(t){return R9e(t)||A9e(t)||M9e(t)||I9e()}function I9e(){throw new TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function M9e(t,e){if(!!t){if(typeof t=="string")return H7(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(r);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return H7(t,e)}}function A9e(t){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(t))return Array.from(t)}function R9e(t){if(Array.isArray(t))return H7(t)}function H7(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var k9e=function(e){return function(r){return function(n){return function(i){if(i.type!==gne)return n(i);var o=i.payload,a=o.method,s=o.args;e[a].apply(e,P9e(s))}}}},SRt=k9e,TRt=b9e(wne),TC=p9e(wne);TC.getLocation;TC.getAction;TC.getHash;TC.getRouter;TC.getSearch;TC.createMatchSelector;function Cne(t,e,r){r===void 0&&(r={});var n={type:"Feature"};return(r.id===0||r.id)&&(n.id=r.id),r.bbox&&(n.bbox=r.bbox),n.properties=e||{},n.geometry=t,n}function O9e(t,e,r){r===void 0&&(r={});for(var n=0,i=t;n<i.length;n++){var o=i[n];if(o.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var a=0;a<o[o.length-1].length;a++)if(o[o.length-1][a]!==o[0][a])throw new Error("First and last Position are not equivalent.")}var s={type:"Polygon",coordinates:t};return Cne(s,e,r)}function L9e(t,e,r){r===void 0&&(r={});var n={type:"MultiPolygon",coordinates:t};return Cne(n,e,r)}function Ene(t,e,r){if(t!==null)for(var n,i,o,a,s,l,u,p=0,m=0,v,x=t.type,y=x==="FeatureCollection",_=x==="Feature",w=y?t.features.length:1,C=0;C<w;C++){u=y?t.features[C].geometry:_?t.geometry:t,v=u?u.type==="GeometryCollection":!1,s=v?u.geometries.length:1;for(var E=0;E<s;E++){var T=0,A=0;if(a=v?u.geometries[E]:u,a!==null){l=a.coordinates;var k=a.type;switch(p=r&&(k==="Polygon"||k==="MultiPolygon")?1:0,k){case null:break;case"Point":if(e(l,m,C,T,A)===!1)return!1;m++,T++;break;case"LineString":case"MultiPoint":for(n=0;n<l.length;n++){if(e(l[n],m,C,T,A)===!1)return!1;m++,k==="MultiPoint"&&T++}k==="LineString"&&T++;break;case"Polygon":case"MultiLineString":for(n=0;n<l.length;n++){for(i=0;i<l[n].length-p;i++){if(e(l[n][i],m,C,T,A)===!1)return!1;m++}k==="MultiLineString"&&T++,k==="Polygon"&&A++}k==="Polygon"&&T++;break;case"MultiPolygon":for(n=0;n<l.length;n++){for(A=0,i=0;i<l[n].length;i++){for(o=0;o<l[n][i].length-p;o++){if(e(l[n][i][o],m,C,T,A)===!1)return!1;m++}A++}T++}break;case"GeometryCollection":for(n=0;n<a.geometries.length;n++)if(Ene(a.geometries[n],e,r)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function Sne(t){var e=[1/0,1/0,-1/0,-1/0];return Ene(t,function(r){e[0]>r[0]&&(e[0]=r[0]),e[1]>r[1]&&(e[1]=r[1]),e[2]<r[0]&&(e[2]=r[0]),e[3]<r[1]&&(e[3]=r[1])}),e}Sne.default=Sne;function D9e(t,e){for(var r=-1,n=t==null?0:t.length;++r<n&&e(t[r],r,t)!==!1;);return t}var N9e=D9e,$9e=xx,F9e=yx;function z9e(t,e){return t&&$9e(e,F9e(e),t)}var B9e=z9e,j9e=xx,U9e=G1;function V9e(t,e){return t&&j9e(e,U9e(e),t)}var H9e=V9e,W9e=xx,G9e=D9;function q9e(t,e){return W9e(t,G9e(t),e)}var X9e=q9e,Y9e=L9,K9e=G9,Z9e=D9,Q9e=jee,J9e=Object.getOwnPropertySymbols,e7e=J9e?function(t){for(var e=[];t;)Y9e(e,Z9e(t)),t=K9e(t);return e}:Q9e,Tne=e7e,t7e=xx,r7e=Tne;function n7e(t,e){return t7e(t,r7e(t),e)}var i7e=n7e,o7e=Bee,s7e=Tne,a7e=G1;function l7e(t){return o7e(t,a7e,s7e)}var W7=l7e,c7e=Object.prototype,u7e=c7e.hasOwnProperty;function f7e(t){var e=t.length,r=new t.constructor(e);return e&&typeof t[0]=="string"&&u7e.call(t,"index")&&(r.index=t.index,r.input=t.input),r}var d7e=f7e,h7e=W9;function p7e(t,e){var r=e?h7e(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}var m7e=p7e,g7e=/\w*$/;function v7e(t){var e=new t.constructor(t.source,g7e.exec(t));return e.lastIndex=t.lastIndex,e}var y7e=v7e,Pne=eC,Ine=Pne?Pne.prototype:void 0,Mne=Ine?Ine.valueOf:void 0;function x7e(t){return Mne?Object(Mne.call(t)):{}}var _7e=x7e,b7e=W9,w7e=m7e,C7e=y7e,E7e=_7e,S7e=Cte,T7e="[object Boolean]",P7e="[object Date]",I7e="[object Map]",M7e="[object Number]",A7e="[object RegExp]",R7e="[object Set]",k7e="[object String]",O7e="[object Symbol]",L7e="[object ArrayBuffer]",D7e="[object DataView]",N7e="[object Float32Array]",$7e="[object Float64Array]",F7e="[object Int8Array]",z7e="[object Int16Array]",B7e="[object Int32Array]",j7e="[object Uint8Array]",U7e="[object Uint8ClampedArray]",V7e="[object Uint16Array]",H7e="[object Uint32Array]";function W7e(t,e,r){var n=t.constructor;switch(e){case L7e:return b7e(t);case T7e:case P7e:return new n(+t);case D7e:return w7e(t,r);case N7e:case $7e:case F7e:case z7e:case B7e:case j7e:case U7e:case V7e:case H7e:return S7e(t,r);case I7e:return new n;case M7e:case k7e:return new n(t);case A7e:return C7e(t);case R7e:return new n;case O7e:return E7e(t)}}var G7e=W7e,q7e=HL,X7e=Ug,Y7e="[object Map]";function K7e(t){return X7e(t)&&q7e(t)==Y7e}var Z7e=K7e,Q7e=Z7e,J7e=NL,Ane=XP.exports,Rne=Ane&&Ane.isMap,eje=Rne?J7e(Rne):Q7e,tje=eje,rje=HL,nje=Ug,ije="[object Set]";function oje(t){return nje(t)&&rje(t)==ije}var sje=oje,aje=sje,lje=NL,kne=XP.exports,One=kne&&kne.isSet,cje=One?lje(One):aje,uje=cje,fje=UL,dje=N9e,hje=KL,pje=B9e,mje=H9e,gje=YL.exports,vje=Ete,yje=X9e,xje=i7e,_je=Vee,bje=W7,wje=HL,Cje=d7e,Eje=G7e,Sje=Tte,Tje=Xf,Pje=tC.exports,Ije=tje,Mje=Yf,Aje=uje,Rje=yx,kje=G1,Oje=1,Lje=2,Dje=4,Lne="[object Arguments]",Nje="[object Array]",$je="[object Boolean]",Fje="[object Date]",zje="[object Error]",Dne="[object Function]",Bje="[object GeneratorFunction]",jje="[object Map]",Uje="[object Number]",Nne="[object Object]",Vje="[object RegExp]",Hje="[object Set]",Wje="[object String]",Gje="[object Symbol]",qje="[object WeakMap]",Xje="[object ArrayBuffer]",Yje="[object DataView]",Kje="[object Float32Array]",Zje="[object Float64Array]",Qje="[object Int8Array]",Jje="[object Int16Array]",eUe="[object Int32Array]",tUe="[object Uint8Array]",rUe="[object Uint8ClampedArray]",nUe="[object Uint16Array]",iUe="[object Uint32Array]",ea={};ea[Lne]=ea[Nje]=ea[Xje]=ea[Yje]=ea[$je]=ea[Fje]=ea[Kje]=ea[Zje]=ea[Qje]=ea[Jje]=ea[eUe]=ea[jje]=ea[Uje]=ea[Nne]=ea[Vje]=ea[Hje]=ea[Wje]=ea[Gje]=ea[tUe]=ea[rUe]=ea[nUe]=ea[iUe]=!0;ea[zje]=ea[Dne]=ea[qje]=!1;function PD(t,e,r,n,i,o){var a,s=e&Oje,l=e&Lje,u=e&Dje;if(r&&(a=i?r(t,n,i,o):r(t)),a!==void 0)return a;if(!Mje(t))return t;var p=Tje(t);if(p){if(a=Cje(t),!s)return vje(t,a)}else{var m=wje(t),v=m==Dne||m==Bje;if(Pje(t))return gje(t,s);if(m==Nne||m==Lne||v&&!i){if(a=l||v?{}:Sje(t),!s)return l?xje(t,mje(a,t)):yje(t,pje(a,t))}else{if(!ea[m])return i?t:{};a=Eje(t,m,s)}}o||(o=new fje);var x=o.get(t);if(x)return x;o.set(t,a),Aje(t)?t.forEach(function(w){a.add(PD(w,e,r,w,t,o))}):Ije(t)&&t.forEach(function(w,C){a.set(C,PD(w,e,r,C,t,o))});var y=u?l?bje:_je:l?kje:Rje,_=p?void 0:y(t);return dje(_||t,function(w,C){_&&(C=w,w=t[C]),hje(a,C,PD(w,e,r,C,t,o))}),a}var $ne=PD,oUe=$ne,sUe=1,aUe=4;function lUe(t){return oUe(t,sUe|aUe)}var PRt=lUe;const cUe={black:"#000",white:"#fff"};var hI=cUe;const uUe={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"};var PC=uUe;const fUe={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"};var IC=fUe;const dUe={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"};var MC=dUe;const hUe={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"};var AC=hUe;const pUe={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"};var RC=pUe;const mUe={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"};var pI=mUe;const gUe={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"};var vUe=gUe;function Fe(){return Fe=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Fe.apply(this,arguments)}function eb(t){return t!==null&&typeof t=="object"&&t.constructor===Object}function Fne(t){if(!eb(t))return t;const e={};return Object.keys(t).forEach(r=>{e[r]=Fne(t[r])}),e}function Zf(t,e,r={clone:!0}){const n=r.clone?Fe({},t):t;return eb(t)&&eb(e)&&Object.keys(e).forEach(i=>{i!=="__proto__"&&(eb(e[i])&&i in t&&eb(t[i])?n[i]=Zf(t[i],e[i],r):r.clone?n[i]=eb(e[i])?Fne(e[i]):e[i]:n[i]=e[i])}),n}function kx(t){let e="https://mui.com/production-error/?code="+t;for(let r=1;r<arguments.length;r+=1)e+="&args[]="+encodeURIComponent(arguments[r]);return"Minified MUI error #"+t+"; visit "+e+" for the full message."}var Rs={};/** * @license React * react-is.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var G7=Symbol.for("react.element"),q7=Symbol.for("react.portal"),ID=Symbol.for("react.fragment"),MD=Symbol.for("react.strict_mode"),AD=Symbol.for("react.profiler"),RD=Symbol.for("react.provider"),kD=Symbol.for("react.context"),yUe=Symbol.for("react.server_context"),OD=Symbol.for("react.forward_ref"),LD=Symbol.for("react.suspense"),DD=Symbol.for("react.suspense_list"),ND=Symbol.for("react.memo"),$D=Symbol.for("react.lazy"),xUe=Symbol.for("react.offscreen"),zne;zne=Symbol.for("react.module.reference");function tp(t){if(typeof t=="object"&&t!==null){var e=t.$$typeof;switch(e){case G7:switch(t=t.type,t){case ID:case AD:case MD:case LD:case DD:return t;default:switch(t=t&&t.$$typeof,t){case yUe:case kD:case OD:case $D:case ND:case RD:return t;default:return e}}case q7:return e}}}Rs.ContextConsumer=kD;Rs.ContextProvider=RD;Rs.Element=G7;Rs.ForwardRef=OD;Rs.Fragment=ID;Rs.Lazy=$D;Rs.Memo=ND;Rs.Portal=q7;Rs.Profiler=AD;Rs.StrictMode=MD;Rs.Suspense=LD;Rs.SuspenseList=DD;Rs.isAsyncMode=function(){return!1};Rs.isConcurrentMode=function(){return!1};Rs.isContextConsumer=function(t){return tp(t)===kD};Rs.isContextProvider=function(t){return tp(t)===RD};Rs.isElement=function(t){return typeof t=="object"&&t!==null&&t.$$typeof===G7};Rs.isForwardRef=function(t){return tp(t)===OD};Rs.isFragment=function(t){return tp(t)===ID};Rs.isLazy=function(t){return tp(t)===$D};Rs.isMemo=function(t){return tp(t)===ND};Rs.isPortal=function(t){return tp(t)===q7};Rs.isProfiler=function(t){return tp(t)===AD};Rs.isStrictMode=function(t){return tp(t)===MD};Rs.isSuspense=function(t){return tp(t)===LD};Rs.isSuspenseList=function(t){return tp(t)===DD};Rs.isValidElementType=function(t){return typeof t=="string"||typeof t=="function"||t===ID||t===AD||t===MD||t===LD||t===DD||t===xUe||typeof t=="object"&&t!==null&&(t.$$typeof===$D||t.$$typeof===ND||t.$$typeof===RD||t.$$typeof===kD||t.$$typeof===OD||t.$$typeof===zne||t.getModuleId!==void 0)};Rs.typeOf=tp;function Pr(t){if(typeof t!="string")throw new Error(kx(7));return t.charAt(0).toUpperCase()+t.slice(1)}function FD(...t){return t.reduce((e,r)=>r==null?e:function(...i){e.apply(this,i),r.apply(this,i)},()=>{})}function tb(t,e=166){let r;function n(...i){const o=()=>{t.apply(this,i)};clearTimeout(r),r=setTimeout(o,e)}return n.clear=()=>{clearTimeout(r)},n}function _Ue(t,e){return()=>null}function zD(t,e){return Y.exports.isValidElement(t)&&e.indexOf(t.type.muiName)!==-1}function wl(t){return t&&t.ownerDocument||document}function rp(t){return wl(t).defaultView||window}function bUe(t,e){return()=>null}function mI(t,e){typeof t=="function"?t(e):t&&(t.current=e)}const wUe=typeof window!="undefined"?Y.exports.useLayoutEffect:Y.exports.useEffect;var np=wUe;let Bne=0;function CUe(t){const[e,r]=Y.exports.useState(t),n=t||e;return Y.exports.useEffect(()=>{e==null&&(Bne+=1,r(`mui-${Bne}`))},[e]),n}const jne=B0["useId"];function gI(t){if(jne!==void 0){const e=jne();return t!=null?t:e}return CUe(t)}function EUe(t,e,r,n,i){return null}function Rm({controlled:t,default:e,name:r,state:n="value"}){const{current:i}=Y.exports.useRef(t!==void 0),[o,a]=Y.exports.useState(e),s=i?t:o,l=Y.exports.useCallback(u=>{i||a(u)},[]);return[s,l]}function bc(t){const e=Y.exports.useRef(t);return np(()=>{e.current=t}),Y.exports.useCallback((...r)=>(0,e.current)(...r),[])}function ta(...t){return Y.exports.useMemo(()=>t.every(e=>e==null)?null:e=>{t.forEach(r=>{mI(r,e)})},t)}let BD=!0,X7=!1,Une;const SUe={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function TUe(t){const{type:e,tagName:r}=t;return!!(r==="INPUT"&&SUe[e]&&!t.readOnly||r==="TEXTAREA"&&!t.readOnly||t.isContentEditable)}function PUe(t){t.metaKey||t.altKey||t.ctrlKey||(BD=!0)}function Y7(){BD=!1}function IUe(){this.visibilityState==="hidden"&&X7&&(BD=!0)}function MUe(t){t.addEventListener("keydown",PUe,!0),t.addEventListener("mousedown",Y7,!0),t.addEventListener("pointerdown",Y7,!0),t.addEventListener("touchstart",Y7,!0),t.addEventListener("visibilitychange",IUe,!0)}function AUe(t){const{target:e}=t;try{return e.matches(":focus-visible")}catch{}return BD||TUe(e)}function vI(){const t=Y.exports.useCallback(i=>{i!=null&&MUe(i.ownerDocument)},[]),e=Y.exports.useRef(!1);function r(){return e.current?(X7=!0,window.clearTimeout(Une),Une=window.setTimeout(()=>{X7=!1},100),e.current=!1,!0):!1}function n(i){return AUe(i)?(e.current=!0,!0):!1}return{isFocusVisibleRef:e,onFocus:n,onBlur:r,ref:t}}function Vne(t){const e=t.documentElement.clientWidth;return Math.abs(window.innerWidth-e)}let kC;function Hne(){if(kC)return kC;const t=document.createElement("div"),e=document.createElement("div");return e.style.width="10px",e.style.height="1px",t.appendChild(e),t.dir="rtl",t.style.fontSize="14px",t.style.width="4px",t.style.height="1px",t.style.position="absolute",t.style.top="-1000px",t.style.overflow="scroll",document.body.appendChild(t),kC="reverse",t.scrollLeft>0?kC="default":(t.scrollLeft=1,t.scrollLeft===0&&(kC="negative")),document.body.removeChild(t),kC}function Wne(t,e){const r=t.scrollLeft;if(e!=="rtl")return r;switch(Hne()){case"negative":return t.scrollWidth-t.clientWidth+r;case"reverse":return t.scrollWidth-t.clientWidth-r;default:return r}}const RUe=t=>{const e=Y.exports.useRef({});return Y.exports.useEffect(()=>{e.current=t}),e.current};var kUe=RUe;const OUe={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:-1,overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"};var LUe=OUe;function K7(t,e){const r=Fe({},e);return Object.keys(t).forEach(n=>{if(n.toString().match(/^(components|slots)$/))r[n]=Fe({},t[n],r[n]);else if(n.toString().match(/^(componentsProps|slotProps)$/)){const i=t[n]||{},o=e[n];r[n]={},!o||!Object.keys(o)?r[n]=i:!i||!Object.keys(i)?r[n]=o:(r[n]=Fe({},o),Object.keys(i).forEach(a=>{r[n][a]=K7(i[a],o[a])}))}else r[n]===void 0&&(r[n]=t[n])}),r}function Qn(t,e,r){const n={};return Object.keys(t).forEach(i=>{n[i]=t[i].reduce((o,a)=>(a&&(o.push(e(a)),r&&r[a]&&o.push(r[a])),o),[]).join(" ")}),n}const Gne=t=>t,DUe=()=>{let t=Gne;return{configure(e){t=e},generate(e){return t(e)},reset(){t=Gne}}},NUe=DUe();var Z7=NUe;const $Ue={active:"active",checked:"checked",completed:"completed",disabled:"disabled",readOnly:"readOnly",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",required:"required",selected:"selected"};function Kn(t,e,r="Mui"){const n=$Ue[e];return n?`${r}-${n}`:`${Z7.generate(t)}-${e}`}function ei(t,e,r="Mui"){const n={};return e.forEach(i=>{n[i]=Kn(t,i,r)}),n}function bn(t,e){if(t==null)return{};var r={},n=Object.keys(t),i,o;for(o=0;o<n.length;o++)i=n[o],!(e.indexOf(i)>=0)&&(r[i]=t[i]);return r}function qne(t){var e=Object.create(null);return function(r){return e[r]===void 0&&(e[r]=t(r)),e[r]}}var FUe=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|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|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|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|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,zUe=qne(function(t){return FUe.test(t)||t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)<91});function BUe(t){if(t.sheet)return t.sheet;for(var e=0;e<document.styleSheets.length;e++)if(document.styleSheets[e].ownerNode===t)return document.styleSheets[e]}function jUe(t){var e=document.createElement("style");return e.setAttribute("data-emotion",t.key),t.nonce!==void 0&&e.setAttribute("nonce",t.nonce),e.appendChild(document.createTextNode("")),e.setAttribute("data-s",""),e}var UUe=function(){function t(r){var n=this;this._insertTag=function(i){var o;n.tags.length===0?n.insertionPoint?o=n.insertionPoint.nextSibling:n.prepend?o=n.container.firstChild:o=n.before:o=n.tags[n.tags.length-1].nextSibling,n.container.insertBefore(i,o),n.tags.push(i)},this.isSpeedy=r.speedy===void 0?!0:r.speedy,this.tags=[],this.ctr=0,this.nonce=r.nonce,this.key=r.key,this.container=r.container,this.prepend=r.prepend,this.insertionPoint=r.insertionPoint,this.before=null}var e=t.prototype;return e.hydrate=function(n){n.forEach(this._insertTag)},e.insert=function(n){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(jUe(this));var i=this.tags[this.tags.length-1];if(this.isSpeedy){var o=BUe(i);try{o.insertRule(n,o.cssRules.length)}catch{}}else i.appendChild(document.createTextNode(n));this.ctr++},e.flush=function(){this.tags.forEach(function(n){return n.parentNode&&n.parentNode.removeChild(n)}),this.tags=[],this.ctr=0},t}(),Iu="-ms-",jD="-moz-",hs="-webkit-",Xne="comm",Q7="rule",J7="decl",VUe="@import",Yne="@keyframes",HUe=Math.abs,UD=String.fromCharCode,WUe=Object.assign;function GUe(t,e){return(((e<<2^Qf(t,0))<<2^Qf(t,1))<<2^Qf(t,2))<<2^Qf(t,3)}function Kne(t){return t.trim()}function qUe(t,e){return(t=e.exec(t))?t[0]:t}function vs(t,e,r){return t.replace(e,r)}function ej(t,e){return t.indexOf(e)}function Qf(t,e){return t.charCodeAt(e)|0}function yI(t,e,r){return t.slice(e,r)}function Hg(t){return t.length}function tj(t){return t.length}function VD(t,e){return e.push(t),t}function XUe(t,e){return t.map(e).join("")}var HD=1,OC=1,Zne=0,Jf=0,zl=0,LC="";function WD(t,e,r,n,i,o,a){return{value:t,root:e,parent:r,type:n,props:i,children:o,line:HD,column:OC,length:a,return:""}}function xI(t,e){return WUe(WD("",null,null,"",null,null,0),t,{length:-t.length},e)}function YUe(){return zl}function KUe(){return zl=Jf>0?Qf(LC,--Jf):0,OC--,zl===10&&(OC=1,HD--),zl}function Zd(){return zl=Jf<Zne?Qf(LC,Jf++):0,OC++,zl===10&&(OC=1,HD++),zl}function Wg(){return Qf(LC,Jf)}function GD(){return Jf}function _I(t,e){return yI(LC,t,e)}function bI(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Qne(t){return HD=OC=1,Zne=Hg(LC=t),Jf=0,[]}function Jne(t){return LC="",t}function qD(t){return Kne(_I(Jf-1,rj(t===91?t+2:t===40?t+1:t)))}function ZUe(t){for(;(zl=Wg())&&zl<33;)Zd();return bI(t)>2||bI(zl)>3?"":" "}function QUe(t,e){for(;--e&&Zd()&&!(zl<48||zl>102||zl>57&&zl<65||zl>70&&zl<97););return _I(t,GD()+(e<6&&Wg()==32&&Zd()==32))}function rj(t){for(;Zd();)switch(zl){case t:return Jf;case 34:case 39:t!==34&&t!==39&&rj(zl);break;case 40:t===41&&rj(t);break;case 92:Zd();break}return Jf}function JUe(t,e){for(;Zd()&&t+zl!==47+10;)if(t+zl===42+42&&Wg()===47)break;return"/*"+_I(e,Jf-1)+"*"+UD(t===47?t:Zd())}function eVe(t){for(;!bI(Wg());)Zd();return _I(t,Jf)}function tVe(t){return Jne(XD("",null,null,null,[""],t=Qne(t),0,[0],t))}function XD(t,e,r,n,i,o,a,s,l){for(var u=0,p=0,m=a,v=0,x=0,y=0,_=1,w=1,C=1,E=0,T="",A=i,k=o,X=n,Z=T;w;)switch(y=E,E=Zd()){case 40:if(y!=108&&Z.charCodeAt(m-1)==58){ej(Z+=vs(qD(E),"&","&\f"),"&\f")!=-1&&(C=-1);break}case 34:case 39:case 91:Z+=qD(E);break;case 9:case 10:case 13:case 32:Z+=ZUe(y);break;case 92:Z+=QUe(GD()-1,7);continue;case 47:switch(Wg()){case 42:case 47:VD(rVe(JUe(Zd(),GD()),e,r),l);break;default:Z+="/"}break;case 123*_:s[u++]=Hg(Z)*C;case 125*_:case 59:case 0:switch(E){case 0:case 125:w=0;case 59+p:x>0&&Hg(Z)-m&&VD(x>32?tie(Z+";",n,r,m-1):tie(vs(Z," ","")+";",n,r,m-2),l);break;case 59:Z+=";";default:if(VD(X=eie(Z,e,r,u,p,i,s,T,A=[],k=[],m),o),E===123)if(p===0)XD(Z,e,X,X,A,o,m,s,k);else switch(v){case 100:case 109:case 115:XD(t,X,X,n&&VD(eie(t,X,X,0,0,i,s,T,i,A=[],m),k),i,k,m,s,n?A:k);break;default:XD(Z,X,X,X,[""],k,0,s,k)}}u=p=x=0,_=C=1,T=Z="",m=a;break;case 58:m=1+Hg(Z),x=y;default:if(_<1){if(E==123)--_;else if(E==125&&_++==0&&KUe()==125)continue}switch(Z+=UD(E),E*_){case 38:C=p>0?1:(Z+="\f",-1);break;case 44:s[u++]=(Hg(Z)-1)*C,C=1;break;case 64:Wg()===45&&(Z+=qD(Zd())),v=Wg(),p=m=Hg(T=Z+=eVe(GD())),E++;break;case 45:y===45&&Hg(Z)==2&&(_=0)}}return o}function eie(t,e,r,n,i,o,a,s,l,u,p){for(var m=i-1,v=i===0?o:[""],x=tj(v),y=0,_=0,w=0;y<n;++y)for(var C=0,E=yI(t,m+1,m=HUe(_=a[y])),T=t;C<x;++C)(T=Kne(_>0?v[C]+" "+E:vs(E,/&\f/g,v[C])))&&(l[w++]=T);return WD(t,e,r,i===0?Q7:s,l,u,p)}function rVe(t,e,r){return WD(t,e,r,Xne,UD(YUe()),yI(t,2,-2),0)}function tie(t,e,r,n){return WD(t,e,r,J7,yI(t,0,n),yI(t,n+1,-1),n)}function rie(t,e){switch(GUe(t,e)){case 5103:return hs+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return hs+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return hs+t+jD+t+Iu+t+t;case 6828:case 4268:return hs+t+Iu+t+t;case 6165:return hs+t+Iu+"flex-"+t+t;case 5187:return hs+t+vs(t,/(\w+).+(:[^]+)/,hs+"box-$1$2"+Iu+"flex-$1$2")+t;case 5443:return hs+t+Iu+"flex-item-"+vs(t,/flex-|-self/,"")+t;case 4675:return hs+t+Iu+"flex-line-pack"+vs(t,/align-content|flex-|-self/,"")+t;case 5548:return hs+t+Iu+vs(t,"shrink","negative")+t;case 5292:return hs+t+Iu+vs(t,"basis","preferred-size")+t;case 6060:return hs+"box-"+vs(t,"-grow","")+hs+t+Iu+vs(t,"grow","positive")+t;case 4554:return hs+vs(t,/([^-])(transform)/g,"$1"+hs+"$2")+t;case 6187:return vs(vs(vs(t,/(zoom-|grab)/,hs+"$1"),/(image-set)/,hs+"$1"),t,"")+t;case 5495:case 3959:return vs(t,/(image-set\([^]*)/,hs+"$1$`$1");case 4968:return vs(vs(t,/(.+:)(flex-)?(.*)/,hs+"box-pack:$3"+Iu+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+hs+t+t;case 4095:case 3583:case 4068:case 2532:return vs(t,/(.+)-inline(.+)/,hs+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Hg(t)-1-e>6)switch(Qf(t,e+1)){case 109:if(Qf(t,e+4)!==45)break;case 102:return vs(t,/(.+:)(.+)-([^]+)/,"$1"+hs+"$2-$3$1"+jD+(Qf(t,e+3)==108?"$3":"$2-$3"))+t;case 115:return~ej(t,"stretch")?rie(vs(t,"stretch","fill-available"),e)+t:t}break;case 4949:if(Qf(t,e+1)!==115)break;case 6444:switch(Qf(t,Hg(t)-3-(~ej(t,"!important")&&10))){case 107:return vs(t,":",":"+hs)+t;case 101:return vs(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+hs+(Qf(t,14)===45?"inline-":"")+"box$3$1"+hs+"$2$3$1"+Iu+"$2box$3")+t}break;case 5936:switch(Qf(t,e+11)){case 114:return hs+t+Iu+vs(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return hs+t+Iu+vs(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return hs+t+Iu+vs(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return hs+t+Iu+t+t}return t}function DC(t,e){for(var r="",n=tj(t),i=0;i<n;i++)r+=e(t[i],i,t,e)||"";return r}function nVe(t,e,r,n){switch(t.type){case VUe:case J7:return t.return=t.return||t.value;case Xne:return"";case Yne:return t.return=t.value+"{"+DC(t.children,n)+"}";case Q7:t.value=t.props.join(",")}return Hg(r=DC(t.children,n))?t.return=t.value+"{"+r+"}":""}function iVe(t){var e=tj(t);return function(r,n,i,o){for(var a="",s=0;s<e;s++)a+=t[s](r,n,i,o)||"";return a}}function oVe(t){return function(e){e.root||(e=e.return)&&t(e)}}function sVe(t,e,r,n){if(t.length>-1&&!t.return)switch(t.type){case J7:t.return=rie(t.value,t.length);break;case Yne:return DC([xI(t,{value:vs(t.value,"@","@"+hs)})],n);case Q7:if(t.length)return XUe(t.props,function(i){switch(qUe(i,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return DC([xI(t,{props:[vs(i,/:(read-\w+)/,":"+jD+"$1")]})],n);case"::placeholder":return DC([xI(t,{props:[vs(i,/:(plac\w+)/,":"+hs+"input-$1")]}),xI(t,{props:[vs(i,/:(plac\w+)/,":"+jD+"$1")]}),xI(t,{props:[vs(i,/:(plac\w+)/,Iu+"input-$1")]})],n)}return""})}}var aVe=function(e,r,n){for(var i=0,o=0;i=o,o=Wg(),i===38&&o===12&&(r[n]=1),!bI(o);)Zd();return _I(e,Jf)},lVe=function(e,r){var n=-1,i=44;do switch(bI(i)){case 0:i===38&&Wg()===12&&(r[n]=1),e[n]+=aVe(Jf-1,r,n);break;case 2:e[n]+=qD(i);break;case 4:if(i===44){e[++n]=Wg()===58?"&\f":"",r[n]=e[n].length;break}default:e[n]+=UD(i)}while(i=Zd());return e},cVe=function(e,r){return Jne(lVe(Qne(e),r))},nie=new WeakMap,uVe=function(e){if(!(e.type!=="rule"||!e.parent||e.length<1)){for(var r=e.value,n=e.parent,i=e.column===n.column&&e.line===n.line;n.type!=="rule";)if(n=n.parent,!n)return;if(!(e.props.length===1&&r.charCodeAt(0)!==58&&!nie.get(n))&&!i){nie.set(e,!0);for(var o=[],a=cVe(r,o),s=n.props,l=0,u=0;l<a.length;l++)for(var p=0;p<s.length;p++,u++)e.props[u]=o[l]?a[l].replace(/&\f/g,s[p]):s[p]+" "+a[l]}}},fVe=function(e){if(e.type==="decl"){var r=e.value;r.charCodeAt(0)===108&&r.charCodeAt(2)===98&&(e.return="",e.value="")}},dVe=[sVe],hVe=function(e){var r=e.key;if(r==="css"){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(_){var w=_.getAttribute("data-emotion");w.indexOf(" ")!==-1&&(document.head.appendChild(_),_.setAttribute("data-s",""))})}var i=e.stylisPlugins||dVe,o={},a,s=[];a=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+r+' "]'),function(_){for(var w=_.getAttribute("data-emotion").split(" "),C=1;C<w.length;C++)o[w[C]]=!0;s.push(_)});var l,u=[uVe,fVe];{var p,m=[nVe,oVe(function(_){p.insert(_)})],v=iVe(u.concat(i,m)),x=function(w){return DC(tVe(w),v)};l=function(w,C,E,T){p=E,x(w?w+"{"+C.styles+"}":C.styles),T&&(y.inserted[C.name]=!0)}}var y={key:r,sheet:new UUe({key:r,container:a,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:o,registered:{},insert:l};return y.sheet.hydrate(s),y},pVe=!0;function iie(t,e,r){var n="";return r.split(" ").forEach(function(i){t[i]!==void 0?e.push(t[i]+";"):n+=i+" "}),n}var nj=function(e,r,n){var i=e.key+"-"+r.name;(n===!1||pVe===!1)&&e.registered[i]===void 0&&(e.registered[i]=r.styles)},ij=function(e,r,n){nj(e,r,n);var i=e.key+"-"+r.name;if(e.inserted[r.name]===void 0){var o=r;do e.insert(r===o?"."+i:"",o,e.sheet,!0),o=o.next;while(o!==void 0)}};function mVe(t){for(var e=0,r,n=0,i=t.length;i>=4;++n,i-=4)r=t.charCodeAt(n)&255|(t.charCodeAt(++n)&255)<<8|(t.charCodeAt(++n)&255)<<16|(t.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,e=(r&65535)*1540483477+((r>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(i){case 3:e^=(t.charCodeAt(n+2)&255)<<16;case 2:e^=(t.charCodeAt(n+1)&255)<<8;case 1:e^=t.charCodeAt(n)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}var gVe={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},vVe=/[A-Z]|^ms/g,yVe=/_EMO_([^_]+?)_([^]*?)_EMO_/g,oie=function(e){return e.charCodeAt(1)===45},sie=function(e){return e!=null&&typeof e!="boolean"},oj=qne(function(t){return oie(t)?t:t.replace(vVe,"-$&").toLowerCase()}),aie=function(e,r){switch(e){case"animation":case"animationName":if(typeof r=="string")return r.replace(yVe,function(n,i,o){return Gg={name:i,styles:o,next:Gg},i})}return gVe[e]!==1&&!oie(e)&&typeof r=="number"&&r!==0?r+"px":r};function wI(t,e,r){if(r==null)return"";if(r.__emotion_styles!==void 0)return r;switch(typeof r){case"boolean":return"";case"object":{if(r.anim===1)return Gg={name:r.name,styles:r.styles,next:Gg},r.name;if(r.styles!==void 0){var n=r.next;if(n!==void 0)for(;n!==void 0;)Gg={name:n.name,styles:n.styles,next:Gg},n=n.next;var i=r.styles+";";return i}return xVe(t,e,r)}case"function":{if(t!==void 0){var o=Gg,a=r(t);return Gg=o,wI(t,e,a)}break}}if(e==null)return r;var s=e[r];return s!==void 0?s:r}function xVe(t,e,r){var n="";if(Array.isArray(r))for(var i=0;i<r.length;i++)n+=wI(t,e,r[i])+";";else for(var o in r){var a=r[o];if(typeof a!="object")e!=null&&e[a]!==void 0?n+=o+"{"+e[a]+"}":sie(a)&&(n+=oj(o)+":"+aie(o,a)+";");else if(Array.isArray(a)&&typeof a[0]=="string"&&(e==null||e[a[0]]===void 0))for(var s=0;s<a.length;s++)sie(a[s])&&(n+=oj(o)+":"+aie(o,a[s])+";");else{var l=wI(t,e,a);switch(o){case"animation":case"animationName":{n+=oj(o)+":"+l+";";break}default:n+=o+"{"+l+"}"}}}return n}var lie=/label:\s*([^\s;\n{]+)\s*(;|$)/g,Gg,YD=function(e,r,n){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var i=!0,o="";Gg=void 0;var a=e[0];a==null||a.raw===void 0?(i=!1,o+=wI(n,r,a)):o+=a[0];for(var s=1;s<e.length;s++)o+=wI(n,r,e[s]),i&&(o+=a[s]);lie.lastIndex=0;for(var l="",u;(u=lie.exec(o))!==null;)l+="-"+u[1];var p=mVe(o)+l;return{name:p,styles:o,next:Gg}},sj={}.hasOwnProperty,cie=Y.exports.createContext(typeof HTMLElement!="undefined"?hVe({key:"css"}):null);cie.Provider;var aj=function(e){return Y.exports.forwardRef(function(r,n){var i=Y.exports.useContext(cie);return e(r,i,n)})},lj=Y.exports.createContext({}),_Ve=B0["useInsertionEffect"]?B0["useInsertionEffect"]:function(e){e()};function bVe(t){_Ve(t)}var cj="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",wVe=function(e,r){var n={};for(var i in r)sj.call(r,i)&&(n[i]=r[i]);return n[cj]=e,n},CVe=function(e){var r=e.cache,n=e.serialized,i=e.isStringTag;return nj(r,n,i),bVe(function(){return ij(r,n,i)}),null},EVe=aj(function(t,e,r){var n=t.css;typeof n=="string"&&e.registered[n]!==void 0&&(n=e.registered[n]);var i=t[cj],o=[n],a="";typeof t.className=="string"?a=iie(e.registered,o,t.className):t.className!=null&&(a=t.className+" ");var s=YD(o,void 0,Y.exports.useContext(lj));a+=e.key+"-"+s.name;var l={};for(var u in t)sj.call(t,u)&&u!=="css"&&u!==cj&&(l[u]=t[u]);return l.ref=r,l.className=a,Y.exports.createElement(Y.exports.Fragment,null,Y.exports.createElement(CVe,{cache:e,serialized:s,isStringTag:typeof i=="string"}),Y.exports.createElement(i,l))}),ys=function(e,r){var n=arguments;if(r==null||!sj.call(r,"css"))return Y.exports.createElement.apply(void 0,n);var i=n.length,o=new Array(i);o[0]=EVe,o[1]=wVe(e,r);for(var a=2;a<i;a++)o[a]=n[a];return Y.exports.createElement.apply(null,o)},uie=B0["useInsertionEffect"]?B0["useInsertionEffect"]:Y.exports.useLayoutEffect,SVe=aj(function(t,e){var r=t.styles,n=YD([r],void 0,Y.exports.useContext(lj)),i=Y.exports.useRef();return uie(function(){var o=e.key+"-global",a=new e.sheet.constructor({key:o,nonce:e.sheet.nonce,container:e.sheet.container,speedy:e.sheet.isSpeedy}),s=!1,l=document.querySelector('style[data-emotion="'+o+" "+n.name+'"]');return e.sheet.tags.length&&(a.before=e.sheet.tags[0]),l!==null&&(s=!0,l.setAttribute("data-emotion",o),a.hydrate([l])),i.current=[a,s],function(){a.flush()}},[e]),uie(function(){var o=i.current,a=o[0],s=o[1];if(s){o[1]=!1;return}if(n.next!==void 0&&ij(e,n.next,!0),a.tags.length){var l=a.tags[a.tags.length-1].nextElementSibling;a.before=l,a.flush()}e.insert("",n,a,!1)},[e,n.name]),null});function Ox(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return YD(e)}var qg=function(){var e=Ox.apply(void 0,arguments),r="animation-"+e.name;return{name:r,styles:"@keyframes "+r+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}},TVe=zUe,PVe=function(e){return e!=="theme"},fie=function(e){return typeof e=="string"&&e.charCodeAt(0)>96?TVe:PVe},die=function(e,r,n){var i;if(r){var o=r.shouldForwardProp;i=e.__emotion_forwardProp&&o?function(a){return e.__emotion_forwardProp(a)&&o(a)}:o}return typeof i!="function"&&n&&(i=e.__emotion_forwardProp),i},IVe=B0["useInsertionEffect"]?B0["useInsertionEffect"]:function(e){e()};function MVe(t){IVe(t)}var AVe=function(e){var r=e.cache,n=e.serialized,i=e.isStringTag;return nj(r,n,i),MVe(function(){return ij(r,n,i)}),null},RVe=function t(e,r){var n=e.__emotion_real===e,i=n&&e.__emotion_base||e,o,a;r!==void 0&&(o=r.label,a=r.target);var s=die(e,r,n),l=s||fie(i),u=!l("as");return function(){var p=arguments,m=n&&e.__emotion_styles!==void 0?e.__emotion_styles.slice(0):[];if(o!==void 0&&m.push("label:"+o+";"),p[0]==null||p[0].raw===void 0)m.push.apply(m,p);else{m.push(p[0][0]);for(var v=p.length,x=1;x<v;x++)m.push(p[x],p[0][x])}var y=aj(function(_,w,C){var E=u&&_.as||i,T="",A=[],k=_;if(_.theme==null){k={};for(var X in _)k[X]=_[X];k.theme=Y.exports.useContext(lj)}typeof _.className=="string"?T=iie(w.registered,A,_.className):_.className!=null&&(T=_.className+" ");var Z=YD(m.concat(A),w.registered,k);T+=w.key+"-"+Z.name,a!==void 0&&(T+=" "+a);var W=u&&s===void 0?fie(E):l,D={};for(var H in _)u&&H==="as"||W(H)&&(D[H]=_[H]);return D.className=T,D.ref=C,Y.exports.createElement(Y.exports.Fragment,null,Y.exports.createElement(AVe,{cache:w,serialized:Z,isStringTag:typeof E=="string"}),Y.exports.createElement(E,D))});return y.displayName=o!==void 0?o:"Styled("+(typeof i=="string"?i:i.displayName||i.name||"Component")+")",y.defaultProps=e.defaultProps,y.__emotion_real=y,y.__emotion_base=i,y.__emotion_styles=m,y.__emotion_forwardProp=s,Object.defineProperty(y,"toString",{value:function(){return"."+a}}),y.withComponent=function(_,w){return t(_,vt({},r,w,{shouldForwardProp:die(y,w,!0)})).apply(void 0,m)},y}},kVe=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],uj=RVe.bind();kVe.forEach(function(t){uj[t]=uj(t)});var OVe=uj;function LVe(t){return t==null||Object.keys(t).length===0}function DVe(t){const{styles:e,defaultTheme:r={}}=t;return Kt(SVe,{styles:typeof e=="function"?i=>e(LVe(i)?r:i):e})}/** * @mui/styled-engine v5.11.11 * * @license MIT * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */function hie(t,e){return OVe(t,e)}const NVe=(t,e)=>{Array.isArray(t.__emotion_styles)&&(t.__emotion_styles=e(t.__emotion_styles))};function CI(t,e){return e?Zf(t,e,{clone:!1}):t}const fj={xs:0,sm:600,md:900,lg:1200,xl:1536},pie={keys:["xs","sm","md","lg","xl"],up:t=>`@media (min-width:${fj[t]}px)`};function ed(t,e,r){const n=t.theme||{};if(Array.isArray(e)){const o=n.breakpoints||pie;return e.reduce((a,s,l)=>(a[o.up(o.keys[l])]=r(e[l]),a),{})}if(typeof e=="object"){const o=n.breakpoints||pie;return Object.keys(e).reduce((a,s)=>{if(Object.keys(o.values||fj).indexOf(s)!==-1){const l=o.up(s);a[l]=r(e[s],s)}else{const l=s;a[l]=e[l]}return a},{})}return r(e)}function mie(t={}){var e;return((e=t.keys)==null?void 0:e.reduce((n,i)=>{const o=t.up(i);return n[o]={},n},{}))||{}}function gie(t,e){return t.reduce((r,n)=>{const i=r[n];return(!i||Object.keys(i).length===0)&&delete r[n],r},e)}function $Ve(t,...e){const r=mie(t),n=[r,...e].reduce((i,o)=>Zf(i,o),{});return gie(Object.keys(r),n)}function FVe(t,e){if(typeof t!="object")return{};const r={},n=Object.keys(e);return Array.isArray(t)?n.forEach((i,o)=>{o<t.length&&(r[i]=!0)}):n.forEach(i=>{t[i]!=null&&(r[i]=!0)}),r}function rb({values:t,breakpoints:e,base:r}){const n=r||FVe(t,e),i=Object.keys(n);if(i.length===0)return t;let o;return i.reduce((a,s,l)=>(Array.isArray(t)?(a[s]=t[l]!=null?t[l]:t[o],o=l):typeof t=="object"?(a[s]=t[s]!=null?t[s]:t[o],o=s):a[s]=t,a),{})}function NC(t,e,r=!0){if(!e||typeof e!="string")return null;if(t&&t.vars&&r){const n=`vars.${e}`.split(".").reduce((i,o)=>i&&i[o]?i[o]:null,t);if(n!=null)return n}return e.split(".").reduce((n,i)=>n&&n[i]!=null?n[i]:null,t)}function KD(t,e,r,n=r){let i;return typeof t=="function"?i=t(r):Array.isArray(t)?i=t[r]||n:i=NC(t,r)||n,e&&(i=e(i,n,t)),i}function xs(t){const{prop:e,cssProperty:r=t.prop,themeKey:n,transform:i}=t,o=a=>{if(a[e]==null)return null;const s=a[e],l=a.theme,u=NC(l,n)||{};return ed(a,s,m=>{let v=KD(u,i,m);return m===v&&typeof m=="string"&&(v=KD(u,i,`${e}${m==="default"?"":Pr(m)}`,m)),r===!1?v:{[r]:v}})};return o.propTypes={},o.filterProps=[e],o}function ZD(...t){const e=t.reduce((n,i)=>(i.filterProps.forEach(o=>{n[o]=i}),n),{}),r=n=>Object.keys(n).reduce((i,o)=>e[o]?CI(i,e[o](n)):i,{});return r.propTypes={},r.filterProps=t.reduce((n,i)=>n.concat(i.filterProps),[]),r}function zVe(t){const e={};return r=>(e[r]===void 0&&(e[r]=t(r)),e[r])}const BVe={m:"margin",p:"padding"},jVe={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},vie={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},UVe=zVe(t=>{if(t.length>2)if(vie[t])t=vie[t];else return[t];const[e,r]=t.split(""),n=BVe[e],i=jVe[r]||"";return Array.isArray(i)?i.map(o=>n+o):[n+i]}),dj=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],hj=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...dj,...hj];function EI(t,e,r,n){var i;const o=(i=NC(t,e,!1))!=null?i:r;return typeof o=="number"?a=>typeof a=="string"?a:o*a:Array.isArray(o)?a=>typeof a=="string"?a:o[a]:typeof o=="function"?o:()=>{}}function pj(t){return EI(t,"spacing",8)}function $C(t,e){if(typeof e=="string"||e==null)return e;const r=Math.abs(e),n=t(r);return e>=0?n:typeof n=="number"?-n:`-${n}`}function VVe(t,e){return r=>t.reduce((n,i)=>(n[i]=$C(e,r),n),{})}function HVe(t,e,r,n){if(e.indexOf(r)===-1)return null;const i=UVe(r),o=VVe(i,n),a=t[r];return ed(t,a,o)}function yie(t,e){const r=pj(t.theme);return Object.keys(t).map(n=>HVe(t,e,n,r)).reduce(CI,{})}function dl(t){return yie(t,dj)}dl.propTypes={};dl.filterProps=dj;function hl(t){return yie(t,hj)}hl.propTypes={};hl.filterProps=hj;function Xg(t){return typeof t!="number"?t:`${t}px solid`}const WVe=xs({prop:"border",themeKey:"borders",transform:Xg}),GVe=xs({prop:"borderTop",themeKey:"borders",transform:Xg}),qVe=xs({prop:"borderRight",themeKey:"borders",transform:Xg}),XVe=xs({prop:"borderBottom",themeKey:"borders",transform:Xg}),YVe=xs({prop:"borderLeft",themeKey:"borders",transform:Xg}),KVe=xs({prop:"borderColor",themeKey:"palette"}),ZVe=xs({prop:"borderTopColor",themeKey:"palette"}),QVe=xs({prop:"borderRightColor",themeKey:"palette"}),JVe=xs({prop:"borderBottomColor",themeKey:"palette"}),eHe=xs({prop:"borderLeftColor",themeKey:"palette"}),QD=t=>{if(t.borderRadius!==void 0&&t.borderRadius!==null){const e=EI(t.theme,"shape.borderRadius",4),r=n=>({borderRadius:$C(e,n)});return ed(t,t.borderRadius,r)}return null};QD.propTypes={};QD.filterProps=["borderRadius"];ZD(WVe,GVe,qVe,XVe,YVe,KVe,ZVe,QVe,JVe,eHe,QD);const JD=t=>{if(t.gap!==void 0&&t.gap!==null){const e=EI(t.theme,"spacing",8),r=n=>({gap:$C(e,n)});return ed(t,t.gap,r)}return null};JD.propTypes={};JD.filterProps=["gap"];const e3=t=>{if(t.columnGap!==void 0&&t.columnGap!==null){const e=EI(t.theme,"spacing",8),r=n=>({columnGap:$C(e,n)});return ed(t,t.columnGap,r)}return null};e3.propTypes={};e3.filterProps=["columnGap"];const t3=t=>{if(t.rowGap!==void 0&&t.rowGap!==null){const e=EI(t.theme,"spacing",8),r=n=>({rowGap:$C(e,n)});return ed(t,t.rowGap,r)}return null};t3.propTypes={};t3.filterProps=["rowGap"];const tHe=xs({prop:"gridColumn"}),rHe=xs({prop:"gridRow"}),nHe=xs({prop:"gridAutoFlow"}),iHe=xs({prop:"gridAutoColumns"}),oHe=xs({prop:"gridAutoRows"}),sHe=xs({prop:"gridTemplateColumns"}),aHe=xs({prop:"gridTemplateRows"}),lHe=xs({prop:"gridTemplateAreas"}),cHe=xs({prop:"gridArea"});ZD(JD,e3,t3,tHe,rHe,nHe,iHe,oHe,sHe,aHe,lHe,cHe);function FC(t,e){return e==="grey"?e:t}const uHe=xs({prop:"color",themeKey:"palette",transform:FC}),fHe=xs({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:FC}),dHe=xs({prop:"backgroundColor",themeKey:"palette",transform:FC});ZD(uHe,fHe,dHe);function Qd(t){return t<=1&&t!==0?`${t*100}%`:t}const hHe=xs({prop:"width",transform:Qd}),mj=t=>{if(t.maxWidth!==void 0&&t.maxWidth!==null){const e=r=>{var n,i,o;return{maxWidth:((n=t.theme)==null||(i=n.breakpoints)==null||(o=i.values)==null?void 0:o[r])||fj[r]||Qd(r)}};return ed(t,t.maxWidth,e)}return null};mj.filterProps=["maxWidth"];const pHe=xs({prop:"minWidth",transform:Qd}),mHe=xs({prop:"height",transform:Qd}),gHe=xs({prop:"maxHeight",transform:Qd}),vHe=xs({prop:"minHeight",transform:Qd});xs({prop:"size",cssProperty:"width",transform:Qd});xs({prop:"size",cssProperty:"height",transform:Qd});const yHe=xs({prop:"boxSizing"});ZD(hHe,mj,pHe,mHe,gHe,vHe,yHe);const xHe={border:{themeKey:"borders",transform:Xg},borderTop:{themeKey:"borders",transform:Xg},borderRight:{themeKey:"borders",transform:Xg},borderBottom:{themeKey:"borders",transform:Xg},borderLeft:{themeKey:"borders",transform:Xg},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:QD},color:{themeKey:"palette",transform:FC},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:FC},backgroundColor:{themeKey:"palette",transform:FC},p:{style:hl},pt:{style:hl},pr:{style:hl},pb:{style:hl},pl:{style:hl},px:{style:hl},py:{style:hl},padding:{style:hl},paddingTop:{style:hl},paddingRight:{style:hl},paddingBottom:{style:hl},paddingLeft:{style:hl},paddingX:{style:hl},paddingY:{style:hl},paddingInline:{style:hl},paddingInlineStart:{style:hl},paddingInlineEnd:{style:hl},paddingBlock:{style:hl},paddingBlockStart:{style:hl},paddingBlockEnd:{style:hl},m:{style:dl},mt:{style:dl},mr:{style:dl},mb:{style:dl},ml:{style:dl},mx:{style:dl},my:{style:dl},margin:{style:dl},marginTop:{style:dl},marginRight:{style:dl},marginBottom:{style:dl},marginLeft:{style:dl},marginX:{style:dl},marginY:{style:dl},marginInline:{style:dl},marginInlineStart:{style:dl},marginInlineEnd:{style:dl},marginBlock:{style:dl},marginBlockStart:{style:dl},marginBlockEnd:{style:dl},displayPrint:{cssProperty:!1,transform:t=>({"@media print":{display:t}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:JD},rowGap:{style:t3},columnGap:{style:e3},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Qd},maxWidth:{style:mj},minWidth:{transform:Qd},height:{transform:Qd},maxHeight:{transform:Qd},minHeight:{transform:Qd},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};var r3=xHe;function _He(...t){const e=t.reduce((n,i)=>n.concat(Object.keys(i)),[]),r=new Set(e);return t.every(n=>r.size===Object.keys(n).length)}function bHe(t,e){return typeof t=="function"?t(e):t}function wHe(){function t(r,n,i,o){const a={[r]:n,theme:i},s=o[r];if(!s)return{[r]:n};const{cssProperty:l=r,themeKey:u,transform:p,style:m}=s;if(n==null)return null;const v=NC(i,u)||{};return m?m(a):ed(a,n,y=>{let _=KD(v,p,y);return y===_&&typeof y=="string"&&(_=KD(v,p,`${r}${y==="default"?"":Pr(y)}`,y)),l===!1?_:{[l]:_}})}function e(r){var n;const{sx:i,theme:o={}}=r||{};if(!i)return null;const a=(n=o.unstable_sxConfig)!=null?n:r3;function s(l){let u=l;if(typeof l=="function")u=l(o);else if(typeof l!="object")return l;if(!u)return null;const p=mie(o.breakpoints),m=Object.keys(p);let v=p;return Object.keys(u).forEach(x=>{const y=bHe(u[x],o);if(y!=null)if(typeof y=="object")if(a[x])v=CI(v,t(x,y,o,a));else{const _=ed({theme:o},y,w=>({[x]:w}));_He(_,y)?v[x]=e({sx:y,theme:o}):v=CI(v,_)}else v=CI(v,t(x,y,o,a))}),gie(m,v)}return Array.isArray(i)?i.map(s):s(i)}return e}const xie=wHe();xie.filterProps=["sx"];var n3=xie;const CHe=["sx"],EHe=t=>{var e,r;const n={systemProps:{},otherProps:{}},i=(e=t==null||(r=t.theme)==null?void 0:r.unstable_sxConfig)!=null?e:r3;return Object.keys(t).forEach(o=>{i[o]?n.systemProps[o]=t[o]:n.otherProps[o]=t[o]}),n};function SI(t){const{sx:e}=t,r=bn(t,CHe),{systemProps:n,otherProps:i}=EHe(r);let o;return Array.isArray(e)?o=[n,...e]:typeof e=="function"?o=(...a)=>{const s=e(...a);return eb(s)?Fe({},n,s):n}:o=Fe({},n,e),Fe({},i,{sx:o})}function _ie(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t))for(e=0;e<t.length;e++)t[e]&&(r=_ie(t[e]))&&(n&&(n+=" "),n+=r);else for(e in t)t[e]&&(n&&(n+=" "),n+=e);return n}function ln(){for(var t,e,r=0,n="";r<arguments.length;)(t=arguments[r++])&&(e=_ie(t))&&(n&&(n+=" "),n+=e);return n}const SHe=["values","unit","step"],THe=t=>{const e=Object.keys(t).map(r=>({key:r,val:t[r]}))||[];return e.sort((r,n)=>r.val-n.val),e.reduce((r,n)=>Fe({},r,{[n.key]:n.val}),{})};function PHe(t){const{values:e={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:r="px",step:n=5}=t,i=bn(t,SHe),o=THe(e),a=Object.keys(o);function s(v){return`@media (min-width:${typeof e[v]=="number"?e[v]:v}${r})`}function l(v){return`@media (max-width:${(typeof e[v]=="number"?e[v]:v)-n/100}${r})`}function u(v,x){const y=a.indexOf(x);return`@media (min-width:${typeof e[v]=="number"?e[v]:v}${r}) and (max-width:${(y!==-1&&typeof e[a[y]]=="number"?e[a[y]]:x)-n/100}${r})`}function p(v){return a.indexOf(v)+1<a.length?u(v,a[a.indexOf(v)+1]):s(v)}function m(v){const x=a.indexOf(v);return x===0?s(a[1]):x===a.length-1?l(a[x]):u(v,a[a.indexOf(v)+1]).replace("@media","@media not all and")}return Fe({keys:a,values:o,up:s,down:l,between:u,only:p,not:m,unit:r},i)}const IHe={borderRadius:4};var MHe=IHe;function AHe(t=8){if(t.mui)return t;const e=pj({spacing:t}),r=(...n)=>(n.length===0?[1]:n).map(o=>{const a=e(o);return typeof a=="number"?`${a}px`:a}).join(" ");return r.mui=!0,r}const RHe=["breakpoints","palette","spacing","shape"];function zC(t={},...e){const{breakpoints:r={},palette:n={},spacing:i,shape:o={}}=t,a=bn(t,RHe),s=PHe(r),l=AHe(i);let u=Zf({breakpoints:s,direction:"ltr",components:{},palette:Fe({mode:"light"},n),spacing:l,shape:Fe({},MHe,o)},a);return u=e.reduce((p,m)=>Zf(p,m),u),u.unstable_sxConfig=Fe({},r3,a==null?void 0:a.unstable_sxConfig),u.unstable_sx=function(m){return n3({sx:m,theme:this})},u}const kHe=Y.exports.createContext(null);var OHe=kHe;function LHe(){return Y.exports.useContext(OHe)}function DHe(t){return Object.keys(t).length===0}function gj(t=null){const e=LHe();return!e||DHe(e)?t:e}const NHe=zC();function i3(t=NHe){return gj(t)}const $He=["className","component"];function FHe(t={}){const{defaultTheme:e,defaultClassName:r="MuiBox-root",generateClassName:n}=t,i=hie("div",{shouldForwardProp:a=>a!=="theme"&&a!=="sx"&&a!=="as"})(n3);return Y.exports.forwardRef(function(s,l){const u=i3(e),p=SI(s),{className:m,component:v="div"}=p,x=bn(p,$He);return Kt(i,Fe({as:v,ref:l,className:ln(m,n?n(r):r),theme:u},x))})}const zHe=["variant"];function bie(t){return t.length===0}function wie(t){const{variant:e}=t,r=bn(t,zHe);let n=e||"";return Object.keys(r).sort().forEach(i=>{i==="color"?n+=bie(n)?t[i]:Pr(t[i]):n+=`${bie(n)?i:Pr(i)}${Pr(t[i].toString())}`}),n}const BHe=["name","slot","skipVariantsResolver","skipSx","overridesResolver"],jHe=["theme"],UHe=["theme"];function TI(t){return Object.keys(t).length===0}function VHe(t){return typeof t=="string"&&t.charCodeAt(0)>96}const HHe=(t,e)=>e.components&&e.components[t]&&e.components[t].styleOverrides?e.components[t].styleOverrides:null,WHe=(t,e)=>{let r=[];e&&e.components&&e.components[t]&&e.components[t].variants&&(r=e.components[t].variants);const n={};return r.forEach(i=>{const o=wie(i.props);n[o]=i.style}),n},GHe=(t,e,r,n)=>{var i,o;const{ownerState:a={}}=t,s=[],l=r==null||(i=r.components)==null||(o=i[n])==null?void 0:o.variants;return l&&l.forEach(u=>{let p=!0;Object.keys(u.props).forEach(m=>{a[m]!==u.props[m]&&t[m]!==u.props[m]&&(p=!1)}),p&&s.push(e[wie(u.props)])}),s};function PI(t){return t!=="ownerState"&&t!=="theme"&&t!=="sx"&&t!=="as"}const qHe=zC();function Cie(t={}){const{defaultTheme:e=qHe,rootShouldForwardProp:r=PI,slotShouldForwardProp:n=PI}=t,i=o=>{const a=TI(o.theme)?e:o.theme;return n3(Fe({},o,{theme:a}))};return i.__mui_systemSx=!0,(o,a={})=>{NVe(o,T=>T.filter(A=>!(A!=null&&A.__mui_systemSx)));const{name:s,slot:l,skipVariantsResolver:u,skipSx:p,overridesResolver:m}=a,v=bn(a,BHe),x=u!==void 0?u:l&&l!=="Root"||!1,y=p||!1;let _,w=PI;l==="Root"?w=r:l?w=n:VHe(o)&&(w=void 0);const C=hie(o,Fe({shouldForwardProp:w,label:_},v)),E=(T,...A)=>{const k=A?A.map(D=>typeof D=="function"&&D.__emotion_real!==D?H=>{let{theme:N}=H,j=bn(H,jHe);return D(Fe({theme:TI(N)?e:N},j))}:D):[];let X=T;s&&m&&k.push(D=>{const H=TI(D.theme)?e:D.theme,N=HHe(s,H);if(N){const j={};return Object.entries(N).forEach(([$,z])=>{j[$]=typeof z=="function"?z(Fe({},D,{theme:H})):z}),m(D,j)}return null}),s&&!x&&k.push(D=>{const H=TI(D.theme)?e:D.theme;return GHe(D,WHe(s,H),H,s)}),y||k.push(i);const Z=k.length-A.length;if(Array.isArray(T)&&Z>0){const D=new Array(Z).fill("");X=[...T,...D],X.raw=[...T.raw,...D]}else typeof T=="function"&&T.__emotion_real!==T&&(X=D=>{let{theme:H}=D,N=bn(D,UHe);return T(Fe({theme:TI(H)?e:H},N))});return C(X,...k)};return C.withConfig&&(E.withConfig=C.withConfig),E}}const XHe=Cie();var vj=XHe;function Eie(t){const{theme:e,name:r,props:n}=t;return!e||!e.components||!e.components[r]||!e.components[r].defaultProps?n:K7(e.components[r].defaultProps,n)}function o3({props:t,name:e,defaultTheme:r}){const n=i3(r);return Eie({theme:n,name:e,props:t})}function yj(t,e=0,r=1){return Math.min(Math.max(e,t),r)}function YHe(t){t=t.slice(1);const e=new RegExp(`.{1,${t.length>=6?2:1}}`,"g");let r=t.match(e);return r&&r[0].length===1&&(r=r.map(n=>n+n)),r?`rgb${r.length===4?"a":""}(${r.map((n,i)=>i<3?parseInt(n,16):Math.round(parseInt(n,16)/255*1e3)/1e3).join(", ")})`:""}function nb(t){if(t.type)return t;if(t.charAt(0)==="#")return nb(YHe(t));const e=t.indexOf("("),r=t.substring(0,e);if(["rgb","rgba","hsl","hsla","color"].indexOf(r)===-1)throw new Error(kx(9,t));let n=t.substring(e+1,t.length-1),i;if(r==="color"){if(n=n.split(" "),i=n.shift(),n.length===4&&n[3].charAt(0)==="/"&&(n[3]=n[3].slice(1)),["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(i)===-1)throw new Error(kx(10,i))}else n=n.split(",");return n=n.map(o=>parseFloat(o)),{type:r,values:n,colorSpace:i}}function s3(t){const{type:e,colorSpace:r}=t;let{values:n}=t;return e.indexOf("rgb")!==-1?n=n.map((i,o)=>o<3?parseInt(i,10):i):e.indexOf("hsl")!==-1&&(n[1]=`${n[1]}%`,n[2]=`${n[2]}%`),e.indexOf("color")!==-1?n=`${r} ${n.join(" ")}`:n=`${n.join(", ")}`,`${e}(${n})`}function KHe(t){t=nb(t);const{values:e}=t,r=e[0],n=e[1]/100,i=e[2]/100,o=n*Math.min(i,1-i),a=(u,p=(u+r/30)%12)=>i-o*Math.max(Math.min(p-3,9-p,1),-1);let s="rgb";const l=[Math.round(a(0)*255),Math.round(a(8)*255),Math.round(a(4)*255)];return t.type==="hsla"&&(s+="a",l.push(e[3])),s3({type:s,values:l})}function Sie(t){t=nb(t);let e=t.type==="hsl"||t.type==="hsla"?nb(KHe(t)).values:t.values;return e=e.map(r=>(t.type!=="color"&&(r/=255),r<=.03928?r/12.92:((r+.055)/1.055)**2.4)),Number((.2126*e[0]+.7152*e[1]+.0722*e[2]).toFixed(3))}function ZHe(t,e){const r=Sie(t),n=Sie(e);return(Math.max(r,n)+.05)/(Math.min(r,n)+.05)}function co(t,e){return t=nb(t),e=yj(e),(t.type==="rgb"||t.type==="hsl")&&(t.type+="a"),t.type==="color"?t.values[3]=`/${e}`:t.values[3]=e,s3(t)}function a3(t,e){if(t=nb(t),e=yj(e),t.type.indexOf("hsl")!==-1)t.values[2]*=1-e;else if(t.type.indexOf("rgb")!==-1||t.type.indexOf("color")!==-1)for(let r=0;r<3;r+=1)t.values[r]*=1-e;return s3(t)}function l3(t,e){if(t=nb(t),e=yj(e),t.type.indexOf("hsl")!==-1)t.values[2]+=(100-t.values[2])*e;else if(t.type.indexOf("rgb")!==-1)for(let r=0;r<3;r+=1)t.values[r]+=(255-t.values[r])*e;else if(t.type.indexOf("color")!==-1)for(let r=0;r<3;r+=1)t.values[r]+=(1-t.values[r])*e;return s3(t)}const QHe=["className","component","disableGutters","fixed","maxWidth","classes"],JHe=zC(),eWe=vj("div",{name:"MuiContainer",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,e[`maxWidth${Pr(String(r.maxWidth))}`],r.fixed&&e.fixed,r.disableGutters&&e.disableGutters]}}),tWe=t=>o3({props:t,name:"MuiContainer",defaultTheme:JHe}),rWe=(t,e)=>{const r=l=>Kn(e,l),{classes:n,fixed:i,disableGutters:o,maxWidth:a}=t,s={root:["root",a&&`maxWidth${Pr(String(a))}`,i&&"fixed",o&&"disableGutters"]};return Qn(s,r,n)};function nWe(t={}){const{createStyledComponent:e=eWe,useThemeProps:r=tWe,componentName:n="MuiContainer"}=t,i=e(({theme:a,ownerState:s})=>Fe({width:"100%",marginLeft:"auto",boxSizing:"border-box",marginRight:"auto",display:"block"},!s.disableGutters&&{paddingLeft:a.spacing(2),paddingRight:a.spacing(2),[a.breakpoints.up("sm")]:{paddingLeft:a.spacing(3),paddingRight:a.spacing(3)}}),({theme:a,ownerState:s})=>s.fixed&&Object.keys(a.breakpoints.values).reduce((l,u)=>{const p=u,m=a.breakpoints.values[p];return m!==0&&(l[a.breakpoints.up(p)]={maxWidth:`${m}${a.breakpoints.unit}`}),l},{}),({theme:a,ownerState:s})=>Fe({},s.maxWidth==="xs"&&{[a.breakpoints.up("xs")]:{maxWidth:Math.max(a.breakpoints.values.xs,444)}},s.maxWidth&&s.maxWidth!=="xs"&&{[a.breakpoints.up(s.maxWidth)]:{maxWidth:`${a.breakpoints.values[s.maxWidth]}${a.breakpoints.unit}`}}));return Y.exports.forwardRef(function(s,l){const u=r(s),{className:p,component:m="div",disableGutters:v=!1,fixed:x=!1,maxWidth:y="lg"}=u,_=bn(u,QHe),w=Fe({},u,{component:m,disableGutters:v,fixed:x,maxWidth:y}),C=rWe(w,n);return Kt(i,Fe({as:m,ownerState:w,className:ln(C.root,p),ref:l},_))})}function c3(t){return t.level>0&&t.container}function Tie(t){return function(r){return`var(--Grid-${r}Spacing${t.level||""})`}}function xj(t){return function(r){return t.level===0?`var(--Grid-${r}Spacing)`:`var(--Grid-${r}Spacing${t.level-1||""})`}}const iWe=(t,e)=>t.filter(r=>e.includes(r)),BC=(t,e,r)=>{const n=t.keys[0];Array.isArray(e)?e.forEach((i,o)=>{r((a,s)=>{o<=t.keys.length-1&&(o===0?Object.assign(a,s):a[t.up(t.keys[o])]=s)},i)}):e&&typeof e=="object"?(Object.keys(e).length>t.keys.length?t.keys:iWe(t.keys,Object.keys(e))).forEach(o=>{if(t.keys.indexOf(o)!==-1){const a=e[o];a!==void 0&&r((s,l)=>{n===o?Object.assign(s,l):s[t.up(o)]=l},a)}}):(typeof e=="number"||typeof e=="string")&&r((i,o)=>{Object.assign(i,o)},e)},oWe=({theme:t,ownerState:e})=>{const r=Tie(e),n={};return BC(t.breakpoints,e.gridSize,(i,o)=>{let a={};o===!0&&(a={flexBasis:0,flexGrow:1,maxWidth:"100%"}),o==="auto"&&(a={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"}),typeof o=="number"&&(a={flexGrow:0,flexBasis:"auto",width:`calc(100% * ${o} / var(--Grid-columns)${c3(e)?` + ${r("column")}`:""})`}),i(n,a)}),n},sWe=({theme:t,ownerState:e})=>{const r={};return BC(t.breakpoints,e.gridOffset,(n,i)=>{let o={};i==="auto"&&(o={marginLeft:"auto"}),typeof i=="number"&&(o={marginLeft:i===0?"0px":`calc(100% * ${i} / var(--Grid-columns))`}),n(r,o)}),r},aWe=({theme:t,ownerState:e})=>{if(!e.container)return{};const r={"--Grid-columns":12};return BC(t.breakpoints,e.columns,(n,i)=>{n(r,{"--Grid-columns":i})}),r},lWe=({theme:t,ownerState:e})=>{if(!e.container)return{};const r=xj(e),n=c3(e)?{[`--Grid-rowSpacing${e.level||""}`]:r("row")}:{};return BC(t.breakpoints,e.rowSpacing,(i,o)=>{var a;i(n,{[`--Grid-rowSpacing${e.level||""}`]:typeof o=="string"?o:(a=t.spacing)==null?void 0:a.call(t,o)})}),n},cWe=({theme:t,ownerState:e})=>{if(!e.container)return{};const r=xj(e),n=c3(e)?{[`--Grid-columnSpacing${e.level||""}`]:r("column")}:{};return BC(t.breakpoints,e.columnSpacing,(i,o)=>{var a;i(n,{[`--Grid-columnSpacing${e.level||""}`]:typeof o=="string"?o:(a=t.spacing)==null?void 0:a.call(t,o)})}),n},uWe=({theme:t,ownerState:e})=>{if(!e.container)return{};const r={};return BC(t.breakpoints,e.direction,(n,i)=>{n(r,{flexDirection:i})}),r},fWe=({ownerState:t})=>{const e=Tie(t),r=xj(t);return Fe({minWidth:0,boxSizing:"border-box"},t.container&&Fe({display:"flex",flexWrap:"wrap"},t.wrap&&t.wrap!=="wrap"&&{flexWrap:t.wrap},{margin:`calc(${e("row")} / -2) calc(${e("column")} / -2)`},t.disableEqualOverflow&&{margin:`calc(${e("row")} * -1) 0px 0px calc(${e("column")} * -1)`}),(!t.container||c3(t))&&Fe({padding:`calc(${r("row")} / 2) calc(${r("column")} / 2)`},(t.disableEqualOverflow||t.parentDisableEqualOverflow)&&{padding:`${r("row")} 0px 0px ${r("column")}`}))},dWe=t=>{const e=[];return Object.entries(t).forEach(([r,n])=>{n!==!1&&n!==void 0&&e.push(`grid-${r}-${String(n)}`)}),e},hWe=(t,e="xs")=>{function r(n){return n===void 0?!1:typeof n=="string"&&!Number.isNaN(Number(n))||typeof n=="number"&&n>0}if(r(t))return[`spacing-${e}-${String(t)}`];if(typeof t=="object"&&!Array.isArray(t)){const n=[];return Object.entries(t).forEach(([i,o])=>{r(o)&&n.push(`spacing-${i}-${String(o)}`)}),n}return[]},pWe=t=>t===void 0?[]:typeof t=="object"?Object.entries(t).map(([e,r])=>`direction-${e}-${r}`):[`direction-xs-${String(t)}`],mWe=["className","columns","container","component","direction","wrap","spacing","rowSpacing","columnSpacing","disableEqualOverflow"],gWe=zC(),vWe=vj("div",{name:"MuiGrid",slot:"Root",overridesResolver:(t,e)=>e.root});function yWe(t){return o3({props:t,name:"MuiGrid",defaultTheme:gWe})}function xWe(t={}){const{createStyledComponent:e=vWe,useThemeProps:r=yWe,componentName:n="MuiGrid"}=t,i=Y.exports.createContext(0),o=Y.exports.createContext(void 0),a=(u,p)=>{const{container:m,direction:v,spacing:x,wrap:y,gridSize:_}=u,w={root:["root",m&&"container",y!=="wrap"&&`wrap-xs-${String(y)}`,...pWe(v),...dWe(_),...m?hWe(x,p.breakpoints.keys[0]):[]]};return Qn(w,C=>Kn(n,C),{})},s=e(aWe,cWe,lWe,oWe,uWe,fWe,sWe);return Y.exports.forwardRef(function(p,m){var v,x,y,_,w,C,E,T;const A=i3(),k=r(p),X=SI(k),Z=Y.exports.useContext(i),W=Y.exports.useContext(o),{className:D,columns:H=12,container:N=!1,component:j="div",direction:$="row",wrap:z="wrap",spacing:O=0,rowSpacing:F=O,columnSpacing:G=O,disableEqualOverflow:q}=X,ee=bn(X,mWe);let re=q;Z&&q!==void 0&&(re=p.disableEqualOverflow);const ce={},fe={},J={};Object.entries(ee).forEach(([Ce,Pe])=>{A.breakpoints.values[Ce]!==void 0?ce[Ce]=Pe:A.breakpoints.values[Ce.replace("Offset","")]!==void 0?fe[Ce.replace("Offset","")]=Pe:J[Ce]=Pe});const oe=(v=p.columns)!=null?v:Z?void 0:H,ve=(x=p.spacing)!=null?x:Z?void 0:O,ye=(y=(_=p.rowSpacing)!=null?_:p.spacing)!=null?y:Z?void 0:F,xe=(w=(C=p.columnSpacing)!=null?C:p.spacing)!=null?w:Z?void 0:G,se=Fe({},X,{level:Z,columns:oe,container:N,direction:$,wrap:z,spacing:ve,rowSpacing:ye,columnSpacing:xe,gridSize:ce,gridOffset:fe,disableEqualOverflow:(E=(T=re)!=null?T:W)!=null?E:!1,parentDisableEqualOverflow:W}),me=a(se,A);let pe=Kt(s,Fe({ref:m,as:j,ownerState:se,className:ln(me.root,D)},J));return N&&(pe=Kt(i.Provider,{value:Z+1,children:pe})),re!==void 0&&re!==(W!=null?W:!1)&&(pe=Kt(o.Provider,{value:re,children:pe})),pe})}const _We=["component","direction","spacing","divider","children","className"],bWe=zC(),wWe=vj("div",{name:"MuiStack",slot:"Root",overridesResolver:(t,e)=>e.root});function CWe(t){return o3({props:t,name:"MuiStack",defaultTheme:bWe})}function EWe(t,e){const r=Y.exports.Children.toArray(t).filter(Boolean);return r.reduce((n,i,o)=>(n.push(i),o<r.length-1&&n.push(Y.exports.cloneElement(e,{key:`separator-${o}`})),n),[])}const SWe=t=>({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[t],TWe=({ownerState:t,theme:e})=>{let r=Fe({display:"flex",flexDirection:"column"},ed({theme:e},rb({values:t.direction,breakpoints:e.breakpoints.values}),n=>({flexDirection:n})));if(t.spacing){const n=pj(e),i=Object.keys(e.breakpoints.values).reduce((l,u)=>((typeof t.spacing=="object"&&t.spacing[u]!=null||typeof t.direction=="object"&&t.direction[u]!=null)&&(l[u]=!0),l),{}),o=rb({values:t.direction,base:i}),a=rb({values:t.spacing,base:i});typeof o=="object"&&Object.keys(o).forEach((l,u,p)=>{if(!o[l]){const v=u>0?o[p[u-1]]:"column";o[l]=v}}),r=Zf(r,ed({theme:e},a,(l,u)=>({"& > :not(style) + :not(style)":{margin:0,[`margin${SWe(u?o[u]:t.direction)}`]:$C(n,l)}})))}return r=$Ve(e.breakpoints,r),r};function PWe(t={}){const{createStyledComponent:e=wWe,useThemeProps:r=CWe,componentName:n="MuiStack"}=t,i=()=>Qn({root:["root"]},l=>Kn(n,l),{}),o=e(TWe);return Y.exports.forwardRef(function(l,u){const p=r(l),m=SI(p),{component:v="div",direction:x="column",spacing:y=0,divider:_,children:w,className:C}=m,E=bn(m,_We),T={direction:x,spacing:y},A=i();return Kt(o,Fe({as:v,ownerState:T,ref:u,className:ln(A.root,C)},E,{children:_?EWe(w,_):w}))})}function IWe(t,e){return Fe({toolbar:{minHeight:56,[t.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[t.up("sm")]:{minHeight:64}}},e)}const MWe=["mode","contrastThreshold","tonalOffset"],Pie={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:hI.white,default:hI.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},_j={text:{primary:hI.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:hI.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function Iie(t,e,r,n){const i=n.light||n,o=n.dark||n*1.5;t[e]||(t.hasOwnProperty(r)?t[e]=t[r]:e==="light"?t.light=l3(t.main,i):e==="dark"&&(t.dark=a3(t.main,o)))}function AWe(t="light"){return t==="dark"?{main:MC[200],light:MC[50],dark:MC[400]}:{main:MC[700],light:MC[400],dark:MC[800]}}function RWe(t="light"){return t==="dark"?{main:IC[200],light:IC[50],dark:IC[400]}:{main:IC[500],light:IC[300],dark:IC[700]}}function kWe(t="light"){return t==="dark"?{main:PC[500],light:PC[300],dark:PC[700]}:{main:PC[700],light:PC[400],dark:PC[800]}}function OWe(t="light"){return t==="dark"?{main:AC[400],light:AC[300],dark:AC[700]}:{main:AC[700],light:AC[500],dark:AC[900]}}function LWe(t="light"){return t==="dark"?{main:RC[400],light:RC[300],dark:RC[700]}:{main:RC[800],light:RC[500],dark:RC[900]}}function DWe(t="light"){return t==="dark"?{main:pI[400],light:pI[300],dark:pI[700]}:{main:"#ed6c02",light:pI[500],dark:pI[900]}}function NWe(t){const{mode:e="light",contrastThreshold:r=3,tonalOffset:n=.2}=t,i=bn(t,MWe),o=t.primary||AWe(e),a=t.secondary||RWe(e),s=t.error||kWe(e),l=t.info||OWe(e),u=t.success||LWe(e),p=t.warning||DWe(e);function m(_){return ZHe(_,_j.text.primary)>=r?_j.text.primary:Pie.text.primary}const v=({color:_,name:w,mainShade:C=500,lightShade:E=300,darkShade:T=700})=>{if(_=Fe({},_),!_.main&&_[C]&&(_.main=_[C]),!_.hasOwnProperty("main"))throw new Error(kx(11,w?` (${w})`:"",C));if(typeof _.main!="string")throw new Error(kx(12,w?` (${w})`:"",JSON.stringify(_.main)));return Iie(_,"light",E,n),Iie(_,"dark",T,n),_.contrastText||(_.contrastText=m(_.main)),_},x={dark:_j,light:Pie};return Zf(Fe({common:Fe({},hI),mode:e,primary:v({color:o,name:"primary"}),secondary:v({color:a,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:v({color:s,name:"error"}),warning:v({color:p,name:"warning"}),info:v({color:l,name:"info"}),success:v({color:u,name:"success"}),grey:vUe,contrastThreshold:r,getContrastText:m,augmentColor:v,tonalOffset:n},x[e]),i)}const $We=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function FWe(t){return Math.round(t*1e5)/1e5}const Mie={textTransform:"uppercase"},Aie='"Roboto", "Helvetica", "Arial", sans-serif';function zWe(t,e){const r=typeof e=="function"?e(t):e,{fontFamily:n=Aie,fontSize:i=14,fontWeightLight:o=300,fontWeightRegular:a=400,fontWeightMedium:s=500,fontWeightBold:l=700,htmlFontSize:u=16,allVariants:p,pxToRem:m}=r,v=bn(r,$We),x=i/14,y=m||(C=>`${C/u*x}rem`),_=(C,E,T,A,k)=>Fe({fontFamily:n,fontWeight:C,fontSize:y(E),lineHeight:T},n===Aie?{letterSpacing:`${FWe(A/E)}em`}:{},k,p),w={h1:_(o,96,1.167,-1.5),h2:_(o,60,1.2,-.5),h3:_(a,48,1.167,0),h4:_(a,34,1.235,.25),h5:_(a,24,1.334,0),h6:_(s,20,1.6,.15),subtitle1:_(a,16,1.75,.15),subtitle2:_(s,14,1.57,.1),body1:_(a,16,1.5,.15),body2:_(a,14,1.43,.15),button:_(s,14,1.75,.4,Mie),caption:_(a,12,1.66,.4),overline:_(a,12,2.66,1,Mie)};return Zf(Fe({htmlFontSize:u,pxToRem:y,fontFamily:n,fontSize:i,fontWeightLight:o,fontWeightRegular:a,fontWeightMedium:s,fontWeightBold:l},w),v,{clone:!1})}const BWe=.2,jWe=.14,UWe=.12;function Ma(...t){return[`${t[0]}px ${t[1]}px ${t[2]}px ${t[3]}px rgba(0,0,0,${BWe})`,`${t[4]}px ${t[5]}px ${t[6]}px ${t[7]}px rgba(0,0,0,${jWe})`,`${t[8]}px ${t[9]}px ${t[10]}px ${t[11]}px rgba(0,0,0,${UWe})`].join(",")}const VWe=["none",Ma(0,2,1,-1,0,1,1,0,0,1,3,0),Ma(0,3,1,-2,0,2,2,0,0,1,5,0),Ma(0,3,3,-2,0,3,4,0,0,1,8,0),Ma(0,2,4,-1,0,4,5,0,0,1,10,0),Ma(0,3,5,-1,0,5,8,0,0,1,14,0),Ma(0,3,5,-1,0,6,10,0,0,1,18,0),Ma(0,4,5,-2,0,7,10,1,0,2,16,1),Ma(0,5,5,-3,0,8,10,1,0,3,14,2),Ma(0,5,6,-3,0,9,12,1,0,3,16,2),Ma(0,6,6,-3,0,10,14,1,0,4,18,3),Ma(0,6,7,-4,0,11,15,1,0,4,20,3),Ma(0,7,8,-4,0,12,17,2,0,5,22,4),Ma(0,7,8,-4,0,13,19,2,0,5,24,4),Ma(0,7,9,-4,0,14,21,2,0,5,26,4),Ma(0,8,9,-5,0,15,22,2,0,6,28,5),Ma(0,8,10,-5,0,16,24,2,0,6,30,5),Ma(0,8,11,-5,0,17,26,2,0,6,32,5),Ma(0,9,11,-5,0,18,28,2,0,7,34,6),Ma(0,9,12,-6,0,19,29,2,0,7,36,6),Ma(0,10,13,-6,0,20,31,3,0,8,38,7),Ma(0,10,13,-6,0,21,33,3,0,8,40,7),Ma(0,10,14,-6,0,22,35,3,0,8,42,7),Ma(0,11,14,-7,0,23,36,3,0,9,44,8),Ma(0,11,15,-7,0,24,38,3,0,9,46,8)];var HWe=VWe;const WWe=["duration","easing","delay"],GWe={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},Rie={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function kie(t){return`${Math.round(t)}ms`}function qWe(t){if(!t)return 0;const e=t/36;return Math.round((4+15*e**.25+e/5)*10)}function XWe(t){const e=Fe({},GWe,t.easing),r=Fe({},Rie,t.duration);return Fe({getAutoHeightDuration:qWe,create:(i=["all"],o={})=>{const{duration:a=r.standard,easing:s=e.easeInOut,delay:l=0}=o;return bn(o,WWe),(Array.isArray(i)?i:[i]).map(u=>`${u} ${typeof a=="string"?a:kie(a)} ${s} ${typeof l=="string"?l:kie(l)}`).join(",")}},t,{easing:e,duration:r})}const YWe={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};var KWe=YWe;const ZWe=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function Oie(t={},...e){const{mixins:r={},palette:n={},transitions:i={},typography:o={}}=t,a=bn(t,ZWe);if(t.vars)throw new Error(kx(18));const s=NWe(n),l=zC(t);let u=Zf(l,{mixins:IWe(l.breakpoints,r),palette:s,shadows:HWe.slice(),typography:zWe(s,o),transitions:XWe(i),zIndex:Fe({},KWe)});return u=Zf(u,a),u=e.reduce((p,m)=>Zf(p,m),u),u.unstable_sxConfig=Fe({},r3,a==null?void 0:a.unstable_sxConfig),u.unstable_sx=function(m){return n3({sx:m,theme:this})},u}function QWe(t){return String(t).match(/[\d.\-+]*\s*(.*)/)[1]||""}function JWe(t){return parseFloat(t)}const eGe=Oie();var u3=eGe;function km(){return i3(u3)}function ti({props:t,name:e}){return o3({props:t,name:e,defaultTheme:u3})}const Jd=t=>PI(t)&&t!=="classes",f3=PI,tGe=Cie({defaultTheme:u3,rootShouldForwardProp:Jd});var Nr=tGe;const rGe=t=>{let e;return t<1?e=5.11916*t**2:e=4.5*Math.log(t+1)+2,(e/100).toFixed(2)};var Lie=rGe;function Lx(t){return typeof t=="string"}function II(t,e,r){return t===void 0||Lx(t)?e:Fe({},e,{ownerState:Fe({},e.ownerState,r)})}function nGe(t,e=[]){if(t===void 0)return{};const r={};return Object.keys(t).filter(n=>n.match(/^on[A-Z]/)&&typeof t[n]=="function"&&!e.includes(n)).forEach(n=>{r[n]=t[n]}),r}function bj(t,e){return typeof t=="function"?t(e):t}function Die(t){if(t===void 0)return{};const e={};return Object.keys(t).filter(r=>!(r.match(/^on[A-Z]/)&&typeof t[r]=="function")).forEach(r=>{e[r]=t[r]}),e}function iGe(t){const{getSlotProps:e,additionalProps:r,externalSlotProps:n,externalForwardedProps:i,className:o}=t;if(!e){const x=ln(i==null?void 0:i.className,n==null?void 0:n.className,o,r==null?void 0:r.className),y=Fe({},r==null?void 0:r.style,i==null?void 0:i.style,n==null?void 0:n.style),_=Fe({},r,i,n);return x.length>0&&(_.className=x),Object.keys(y).length>0&&(_.style=y),{props:_,internalRef:void 0}}const a=nGe(Fe({},i,n)),s=Die(n),l=Die(i),u=e(a),p=ln(u==null?void 0:u.className,r==null?void 0:r.className,o,i==null?void 0:i.className,n==null?void 0:n.className),m=Fe({},u==null?void 0:u.style,r==null?void 0:r.style,i==null?void 0:i.style,n==null?void 0:n.style),v=Fe({},u,r,l,s);return p.length>0&&(v.className=p),Object.keys(m).length>0&&(v.style=m),{props:v,internalRef:u.ref}}const oGe=["elementType","externalSlotProps","ownerState"];function Om(t){var e;const{elementType:r,externalSlotProps:n,ownerState:i}=t,o=bn(t,oGe),a=bj(n,i),{props:s,internalRef:l}=iGe(Fe({},o,{externalSlotProps:a})),u=ta(l,a==null?void 0:a.ref,(e=t.additionalProps)==null?void 0:e.ref);return II(r,Fe({},s,{ref:u}),i)}const sGe=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function aGe(t){const e=parseInt(t.getAttribute("tabindex")||"",10);return Number.isNaN(e)?t.contentEditable==="true"||(t.nodeName==="AUDIO"||t.nodeName==="VIDEO"||t.nodeName==="DETAILS")&&t.getAttribute("tabindex")===null?0:t.tabIndex:e}function lGe(t){if(t.tagName!=="INPUT"||t.type!=="radio"||!t.name)return!1;const e=n=>t.ownerDocument.querySelector(`input[type="radio"]${n}`);let r=e(`[name="${t.name}"]:checked`);return r||(r=e(`[name="${t.name}"]`)),r!==t}function cGe(t){return!(t.disabled||t.tagName==="INPUT"&&t.type==="hidden"||lGe(t))}function uGe(t){const e=[],r=[];return Array.from(t.querySelectorAll(sGe)).forEach((n,i)=>{const o=aGe(n);o===-1||!cGe(n)||(o===0?e.push(n):r.push({documentOrder:i,tabIndex:o,node:n}))}),r.sort((n,i)=>n.tabIndex===i.tabIndex?n.documentOrder-i.documentOrder:n.tabIndex-i.tabIndex).map(n=>n.node).concat(e)}function fGe(){return!0}function dGe(t){const{children:e,disableAutoFocus:r=!1,disableEnforceFocus:n=!1,disableRestoreFocus:i=!1,getTabbable:o=uGe,isEnabled:a=fGe,open:s}=t,l=Y.exports.useRef(!1),u=Y.exports.useRef(null),p=Y.exports.useRef(null),m=Y.exports.useRef(null),v=Y.exports.useRef(null),x=Y.exports.useRef(!1),y=Y.exports.useRef(null),_=ta(e.ref,y),w=Y.exports.useRef(null);Y.exports.useEffect(()=>{!s||!y.current||(x.current=!r)},[r,s]),Y.exports.useEffect(()=>{if(!s||!y.current)return;const T=wl(y.current);return y.current.contains(T.activeElement)||(y.current.hasAttribute("tabIndex")||y.current.setAttribute("tabIndex","-1"),x.current&&y.current.focus()),()=>{i||(m.current&&m.current.focus&&(l.current=!0,m.current.focus()),m.current=null)}},[s]),Y.exports.useEffect(()=>{if(!s||!y.current)return;const T=wl(y.current),A=Z=>{const{current:W}=y;if(W!==null){if(!T.hasFocus()||n||!a()||l.current){l.current=!1;return}if(!W.contains(T.activeElement)){if(Z&&v.current!==Z.target||T.activeElement!==v.current)v.current=null;else if(v.current!==null)return;if(!x.current)return;let N=[];if((T.activeElement===u.current||T.activeElement===p.current)&&(N=o(y.current)),N.length>0){var D,H;const j=Boolean(((D=w.current)==null?void 0:D.shiftKey)&&((H=w.current)==null?void 0:H.key)==="Tab"),$=N[0],z=N[N.length-1];typeof $!="string"&&typeof z!="string"&&(j?z.focus():$.focus())}else W.focus()}}},k=Z=>{w.current=Z,!(n||!a()||Z.key!=="Tab")&&T.activeElement===y.current&&Z.shiftKey&&(l.current=!0,p.current&&p.current.focus())};T.addEventListener("focusin",A),T.addEventListener("keydown",k,!0);const X=setInterval(()=>{T.activeElement&&T.activeElement.tagName==="BODY"&&A(null)},50);return()=>{clearInterval(X),T.removeEventListener("focusin",A),T.removeEventListener("keydown",k,!0)}},[r,n,i,a,s,o]);const C=T=>{m.current===null&&(m.current=T.relatedTarget),x.current=!0,v.current=T.target;const A=e.props.onFocus;A&&A(T)},E=T=>{m.current===null&&(m.current=T.relatedTarget),x.current=!0};return Ji(Y.exports.Fragment,{children:[Kt("div",{tabIndex:s?0:-1,onFocus:E,ref:u,"data-testid":"sentinelStart"}),Y.exports.cloneElement(e,{ref:_,onFocus:C}),Kt("div",{tabIndex:s?0:-1,onFocus:E,ref:p,"data-testid":"sentinelEnd"})]})}var td="top",ip="bottom",op="right",rd="left",wj="auto",MI=[td,ip,op,rd],jC="start",AI="end",hGe="clippingParents",Nie="viewport",RI="popper",pGe="reference",$ie=MI.reduce(function(t,e){return t.concat([e+"-"+jC,e+"-"+AI])},[]),Fie=[].concat(MI,[wj]).reduce(function(t,e){return t.concat([e,e+"-"+jC,e+"-"+AI])},[]),mGe="beforeRead",gGe="read",vGe="afterRead",yGe="beforeMain",xGe="main",_Ge="afterMain",bGe="beforeWrite",wGe="write",CGe="afterWrite",EGe=[mGe,gGe,vGe,yGe,xGe,_Ge,bGe,wGe,CGe];function Yg(t){return t?(t.nodeName||"").toLowerCase():null}function sp(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function ib(t){var e=sp(t).Element;return t instanceof e||t instanceof Element}function ap(t){var e=sp(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function Cj(t){if(typeof ShadowRoot=="undefined")return!1;var e=sp(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function SGe(t){var e=t.state;Object.keys(e.elements).forEach(function(r){var n=e.styles[r]||{},i=e.attributes[r]||{},o=e.elements[r];!ap(o)||!Yg(o)||(Object.assign(o.style,n),Object.keys(i).forEach(function(a){var s=i[a];s===!1?o.removeAttribute(a):o.setAttribute(a,s===!0?"":s)}))})}function TGe(t){var e=t.state,r={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,r.popper),e.styles=r,e.elements.arrow&&Object.assign(e.elements.arrow.style,r.arrow),function(){Object.keys(e.elements).forEach(function(n){var i=e.elements[n],o=e.attributes[n]||{},a=Object.keys(e.styles.hasOwnProperty(n)?e.styles[n]:r[n]),s=a.reduce(function(l,u){return l[u]="",l},{});!ap(i)||!Yg(i)||(Object.assign(i.style,s),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}var PGe={name:"applyStyles",enabled:!0,phase:"write",fn:SGe,effect:TGe,requires:["computeStyles"]};function Kg(t){return t.split("-")[0]}var ob=Math.max,d3=Math.min,UC=Math.round;function Ej(){var t=navigator.userAgentData;return t!=null&&t.brands?t.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function zie(){return!/^((?!chrome|android).)*safari/i.test(Ej())}function VC(t,e,r){e===void 0&&(e=!1),r===void 0&&(r=!1);var n=t.getBoundingClientRect(),i=1,o=1;e&&ap(t)&&(i=t.offsetWidth>0&&UC(n.width)/t.offsetWidth||1,o=t.offsetHeight>0&&UC(n.height)/t.offsetHeight||1);var a=ib(t)?sp(t):window,s=a.visualViewport,l=!zie()&&r,u=(n.left+(l&&s?s.offsetLeft:0))/i,p=(n.top+(l&&s?s.offsetTop:0))/o,m=n.width/i,v=n.height/o;return{width:m,height:v,top:p,right:u+m,bottom:p+v,left:u,x:u,y:p}}function Sj(t){var e=VC(t),r=t.offsetWidth,n=t.offsetHeight;return Math.abs(e.width-r)<=1&&(r=e.width),Math.abs(e.height-n)<=1&&(n=e.height),{x:t.offsetLeft,y:t.offsetTop,width:r,height:n}}function Bie(t,e){var r=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(r&&Cj(r)){var n=e;do{if(n&&t.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function Cy(t){return sp(t).getComputedStyle(t)}function IGe(t){return["table","td","th"].indexOf(Yg(t))>=0}function Dx(t){return((ib(t)?t.ownerDocument:t.document)||window.document).documentElement}function h3(t){return Yg(t)==="html"?t:t.assignedSlot||t.parentNode||(Cj(t)?t.host:null)||Dx(t)}function jie(t){return!ap(t)||Cy(t).position==="fixed"?null:t.offsetParent}function MGe(t){var e=/firefox/i.test(Ej()),r=/Trident/i.test(Ej());if(r&&ap(t)){var n=Cy(t);if(n.position==="fixed")return null}var i=h3(t);for(Cj(i)&&(i=i.host);ap(i)&&["html","body"].indexOf(Yg(i))<0;){var o=Cy(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||e&&o.willChange==="filter"||e&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function kI(t){for(var e=sp(t),r=jie(t);r&&IGe(r)&&Cy(r).position==="static";)r=jie(r);return r&&(Yg(r)==="html"||Yg(r)==="body"&&Cy(r).position==="static")?e:r||MGe(t)||e}function Tj(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function OI(t,e,r){return ob(t,d3(e,r))}function AGe(t,e,r){var n=OI(t,e,r);return n>r?r:n}function Uie(){return{top:0,right:0,bottom:0,left:0}}function Vie(t){return Object.assign({},Uie(),t)}function Hie(t,e){return e.reduce(function(r,n){return r[n]=t,r},{})}var RGe=function(e,r){return e=typeof e=="function"?e(Object.assign({},r.rects,{placement:r.placement})):e,Vie(typeof e!="number"?e:Hie(e,MI))};function kGe(t){var e,r=t.state,n=t.name,i=t.options,o=r.elements.arrow,a=r.modifiersData.popperOffsets,s=Kg(r.placement),l=Tj(s),u=[rd,op].indexOf(s)>=0,p=u?"height":"width";if(!(!o||!a)){var m=RGe(i.padding,r),v=Sj(o),x=l==="y"?td:rd,y=l==="y"?ip:op,_=r.rects.reference[p]+r.rects.reference[l]-a[l]-r.rects.popper[p],w=a[l]-r.rects.reference[l],C=kI(o),E=C?l==="y"?C.clientHeight||0:C.clientWidth||0:0,T=_/2-w/2,A=m[x],k=E-v[p]-m[y],X=E/2-v[p]/2+T,Z=OI(A,X,k),W=l;r.modifiersData[n]=(e={},e[W]=Z,e.centerOffset=Z-X,e)}}function OGe(t){var e=t.state,r=t.options,n=r.element,i=n===void 0?"[data-popper-arrow]":n;i!=null&&(typeof i=="string"&&(i=e.elements.popper.querySelector(i),!i)||!Bie(e.elements.popper,i)||(e.elements.arrow=i))}var LGe={name:"arrow",enabled:!0,phase:"main",fn:kGe,effect:OGe,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function HC(t){return t.split("-")[1]}var DGe={top:"auto",right:"auto",bottom:"auto",left:"auto"};function NGe(t){var e=t.x,r=t.y,n=window,i=n.devicePixelRatio||1;return{x:UC(e*i)/i||0,y:UC(r*i)/i||0}}function Wie(t){var e,r=t.popper,n=t.popperRect,i=t.placement,o=t.variation,a=t.offsets,s=t.position,l=t.gpuAcceleration,u=t.adaptive,p=t.roundOffsets,m=t.isFixed,v=a.x,x=v===void 0?0:v,y=a.y,_=y===void 0?0:y,w=typeof p=="function"?p({x,y:_}):{x,y:_};x=w.x,_=w.y;var C=a.hasOwnProperty("x"),E=a.hasOwnProperty("y"),T=rd,A=td,k=window;if(u){var X=kI(r),Z="clientHeight",W="clientWidth";if(X===sp(r)&&(X=Dx(r),Cy(X).position!=="static"&&s==="absolute"&&(Z="scrollHeight",W="scrollWidth")),X=X,i===td||(i===rd||i===op)&&o===AI){A=ip;var D=m&&X===k&&k.visualViewport?k.visualViewport.height:X[Z];_-=D-n.height,_*=l?1:-1}if(i===rd||(i===td||i===ip)&&o===AI){T=op;var H=m&&X===k&&k.visualViewport?k.visualViewport.width:X[W];x-=H-n.width,x*=l?1:-1}}var N=Object.assign({position:s},u&&DGe),j=p===!0?NGe({x,y:_}):{x,y:_};if(x=j.x,_=j.y,l){var $;return Object.assign({},N,($={},$[A]=E?"0":"",$[T]=C?"0":"",$.transform=(k.devicePixelRatio||1)<=1?"translate("+x+"px, "+_+"px)":"translate3d("+x+"px, "+_+"px, 0)",$))}return Object.assign({},N,(e={},e[A]=E?_+"px":"",e[T]=C?x+"px":"",e.transform="",e))}function $Ge(t){var e=t.state,r=t.options,n=r.gpuAcceleration,i=n===void 0?!0:n,o=r.adaptive,a=o===void 0?!0:o,s=r.roundOffsets,l=s===void 0?!0:s,u={placement:Kg(e.placement),variation:HC(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:i,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,Wie(Object.assign({},u,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:a,roundOffsets:l})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,Wie(Object.assign({},u,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}var FGe={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:$Ge,data:{}},p3={passive:!0};function zGe(t){var e=t.state,r=t.instance,n=t.options,i=n.scroll,o=i===void 0?!0:i,a=n.resize,s=a===void 0?!0:a,l=sp(e.elements.popper),u=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&u.forEach(function(p){p.addEventListener("scroll",r.update,p3)}),s&&l.addEventListener("resize",r.update,p3),function(){o&&u.forEach(function(p){p.removeEventListener("scroll",r.update,p3)}),s&&l.removeEventListener("resize",r.update,p3)}}var BGe={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:zGe,data:{}},jGe={left:"right",right:"left",bottom:"top",top:"bottom"};function m3(t){return t.replace(/left|right|bottom|top/g,function(e){return jGe[e]})}var UGe={start:"end",end:"start"};function Gie(t){return t.replace(/start|end/g,function(e){return UGe[e]})}function Pj(t){var e=sp(t),r=e.pageXOffset,n=e.pageYOffset;return{scrollLeft:r,scrollTop:n}}function Ij(t){return VC(Dx(t)).left+Pj(t).scrollLeft}function VGe(t,e){var r=sp(t),n=Dx(t),i=r.visualViewport,o=n.clientWidth,a=n.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;var u=zie();(u||!u&&e==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s+Ij(t),y:l}}function HGe(t){var e,r=Dx(t),n=Pj(t),i=(e=t.ownerDocument)==null?void 0:e.body,o=ob(r.scrollWidth,r.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=ob(r.scrollHeight,r.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-n.scrollLeft+Ij(t),l=-n.scrollTop;return Cy(i||r).direction==="rtl"&&(s+=ob(r.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function Mj(t){var e=Cy(t),r=e.overflow,n=e.overflowX,i=e.overflowY;return/auto|scroll|overlay|hidden/.test(r+i+n)}function qie(t){return["html","body","#document"].indexOf(Yg(t))>=0?t.ownerDocument.body:ap(t)&&Mj(t)?t:qie(h3(t))}function LI(t,e){var r;e===void 0&&(e=[]);var n=qie(t),i=n===((r=t.ownerDocument)==null?void 0:r.body),o=sp(n),a=i?[o].concat(o.visualViewport||[],Mj(n)?n:[]):n,s=e.concat(a);return i?s:s.concat(LI(h3(a)))}function Aj(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function WGe(t,e){var r=VC(t,!1,e==="fixed");return r.top=r.top+t.clientTop,r.left=r.left+t.clientLeft,r.bottom=r.top+t.clientHeight,r.right=r.left+t.clientWidth,r.width=t.clientWidth,r.height=t.clientHeight,r.x=r.left,r.y=r.top,r}function Xie(t,e,r){return e===Nie?Aj(VGe(t,r)):ib(e)?WGe(e,r):Aj(HGe(Dx(t)))}function GGe(t){var e=LI(h3(t)),r=["absolute","fixed"].indexOf(Cy(t).position)>=0,n=r&&ap(t)?kI(t):t;return ib(n)?e.filter(function(i){return ib(i)&&Bie(i,n)&&Yg(i)!=="body"}):[]}function qGe(t,e,r,n){var i=e==="clippingParents"?GGe(t):[].concat(e),o=[].concat(i,[r]),a=o[0],s=o.reduce(function(l,u){var p=Xie(t,u,n);return l.top=ob(p.top,l.top),l.right=d3(p.right,l.right),l.bottom=d3(p.bottom,l.bottom),l.left=ob(p.left,l.left),l},Xie(t,a,n));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function Yie(t){var e=t.reference,r=t.element,n=t.placement,i=n?Kg(n):null,o=n?HC(n):null,a=e.x+e.width/2-r.width/2,s=e.y+e.height/2-r.height/2,l;switch(i){case td:l={x:a,y:e.y-r.height};break;case ip:l={x:a,y:e.y+e.height};break;case op:l={x:e.x+e.width,y:s};break;case rd:l={x:e.x-r.width,y:s};break;default:l={x:e.x,y:e.y}}var u=i?Tj(i):null;if(u!=null){var p=u==="y"?"height":"width";switch(o){case jC:l[u]=l[u]-(e[p]/2-r[p]/2);break;case AI:l[u]=l[u]+(e[p]/2-r[p]/2);break}}return l}function DI(t,e){e===void 0&&(e={});var r=e,n=r.placement,i=n===void 0?t.placement:n,o=r.strategy,a=o===void 0?t.strategy:o,s=r.boundary,l=s===void 0?hGe:s,u=r.rootBoundary,p=u===void 0?Nie:u,m=r.elementContext,v=m===void 0?RI:m,x=r.altBoundary,y=x===void 0?!1:x,_=r.padding,w=_===void 0?0:_,C=Vie(typeof w!="number"?w:Hie(w,MI)),E=v===RI?pGe:RI,T=t.rects.popper,A=t.elements[y?E:v],k=qGe(ib(A)?A:A.contextElement||Dx(t.elements.popper),l,p,a),X=VC(t.elements.reference),Z=Yie({reference:X,element:T,strategy:"absolute",placement:i}),W=Aj(Object.assign({},T,Z)),D=v===RI?W:X,H={top:k.top-D.top+C.top,bottom:D.bottom-k.bottom+C.bottom,left:k.left-D.left+C.left,right:D.right-k.right+C.right},N=t.modifiersData.offset;if(v===RI&&N){var j=N[i];Object.keys(H).forEach(function($){var z=[op,ip].indexOf($)>=0?1:-1,O=[td,ip].indexOf($)>=0?"y":"x";H[$]+=j[O]*z})}return H}function XGe(t,e){e===void 0&&(e={});var r=e,n=r.placement,i=r.boundary,o=r.rootBoundary,a=r.padding,s=r.flipVariations,l=r.allowedAutoPlacements,u=l===void 0?Fie:l,p=HC(n),m=p?s?$ie:$ie.filter(function(y){return HC(y)===p}):MI,v=m.filter(function(y){return u.indexOf(y)>=0});v.length===0&&(v=m);var x=v.reduce(function(y,_){return y[_]=DI(t,{placement:_,boundary:i,rootBoundary:o,padding:a})[Kg(_)],y},{});return Object.keys(x).sort(function(y,_){return x[y]-x[_]})}function YGe(t){if(Kg(t)===wj)return[];var e=m3(t);return[Gie(t),e,Gie(e)]}function KGe(t){var e=t.state,r=t.options,n=t.name;if(!e.modifiersData[n]._skip){for(var i=r.mainAxis,o=i===void 0?!0:i,a=r.altAxis,s=a===void 0?!0:a,l=r.fallbackPlacements,u=r.padding,p=r.boundary,m=r.rootBoundary,v=r.altBoundary,x=r.flipVariations,y=x===void 0?!0:x,_=r.allowedAutoPlacements,w=e.options.placement,C=Kg(w),E=C===w,T=l||(E||!y?[m3(w)]:YGe(w)),A=[w].concat(T).reduce(function(oe,ve){return oe.concat(Kg(ve)===wj?XGe(e,{placement:ve,boundary:p,rootBoundary:m,padding:u,flipVariations:y,allowedAutoPlacements:_}):ve)},[]),k=e.rects.reference,X=e.rects.popper,Z=new Map,W=!0,D=A[0],H=0;H<A.length;H++){var N=A[H],j=Kg(N),$=HC(N)===jC,z=[td,ip].indexOf(j)>=0,O=z?"width":"height",F=DI(e,{placement:N,boundary:p,rootBoundary:m,altBoundary:v,padding:u}),G=z?$?op:rd:$?ip:td;k[O]>X[O]&&(G=m3(G));var q=m3(G),ee=[];if(o&&ee.push(F[j]<=0),s&&ee.push(F[G]<=0,F[q]<=0),ee.every(function(oe){return oe})){D=N,W=!1;break}Z.set(N,ee)}if(W)for(var re=y?3:1,ce=function(ve){var ye=A.find(function(xe){var se=Z.get(xe);if(se)return se.slice(0,ve).every(function(me){return me})});if(ye)return D=ye,"break"},fe=re;fe>0;fe--){var J=ce(fe);if(J==="break")break}e.placement!==D&&(e.modifiersData[n]._skip=!0,e.placement=D,e.reset=!0)}}var ZGe={name:"flip",enabled:!0,phase:"main",fn:KGe,requiresIfExists:["offset"],data:{_skip:!1}};function Kie(t,e,r){return r===void 0&&(r={x:0,y:0}),{top:t.top-e.height-r.y,right:t.right-e.width+r.x,bottom:t.bottom-e.height+r.y,left:t.left-e.width-r.x}}function Zie(t){return[td,op,ip,rd].some(function(e){return t[e]>=0})}function QGe(t){var e=t.state,r=t.name,n=e.rects.reference,i=e.rects.popper,o=e.modifiersData.preventOverflow,a=DI(e,{elementContext:"reference"}),s=DI(e,{altBoundary:!0}),l=Kie(a,n),u=Kie(s,i,o),p=Zie(l),m=Zie(u);e.modifiersData[r]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:p,hasPopperEscaped:m},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":p,"data-popper-escaped":m})}var JGe={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:QGe};function eqe(t,e,r){var n=Kg(t),i=[rd,td].indexOf(n)>=0?-1:1,o=typeof r=="function"?r(Object.assign({},e,{placement:t})):r,a=o[0],s=o[1];return a=a||0,s=(s||0)*i,[rd,op].indexOf(n)>=0?{x:s,y:a}:{x:a,y:s}}function tqe(t){var e=t.state,r=t.options,n=t.name,i=r.offset,o=i===void 0?[0,0]:i,a=Fie.reduce(function(p,m){return p[m]=eqe(m,e.rects,o),p},{}),s=a[e.placement],l=s.x,u=s.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=u),e.modifiersData[n]=a}var rqe={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:tqe};function nqe(t){var e=t.state,r=t.name;e.modifiersData[r]=Yie({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}var iqe={name:"popperOffsets",enabled:!0,phase:"read",fn:nqe,data:{}};function oqe(t){return t==="x"?"y":"x"}function sqe(t){var e=t.state,r=t.options,n=t.name,i=r.mainAxis,o=i===void 0?!0:i,a=r.altAxis,s=a===void 0?!1:a,l=r.boundary,u=r.rootBoundary,p=r.altBoundary,m=r.padding,v=r.tether,x=v===void 0?!0:v,y=r.tetherOffset,_=y===void 0?0:y,w=DI(e,{boundary:l,rootBoundary:u,padding:m,altBoundary:p}),C=Kg(e.placement),E=HC(e.placement),T=!E,A=Tj(C),k=oqe(A),X=e.modifiersData.popperOffsets,Z=e.rects.reference,W=e.rects.popper,D=typeof _=="function"?_(Object.assign({},e.rects,{placement:e.placement})):_,H=typeof D=="number"?{mainAxis:D,altAxis:D}:Object.assign({mainAxis:0,altAxis:0},D),N=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,j={x:0,y:0};if(!!X){if(o){var $,z=A==="y"?td:rd,O=A==="y"?ip:op,F=A==="y"?"height":"width",G=X[A],q=G+w[z],ee=G-w[O],re=x?-W[F]/2:0,ce=E===jC?Z[F]:W[F],fe=E===jC?-W[F]:-Z[F],J=e.elements.arrow,oe=x&&J?Sj(J):{width:0,height:0},ve=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:Uie(),ye=ve[z],xe=ve[O],se=OI(0,Z[F],oe[F]),me=T?Z[F]/2-re-se-ye-H.mainAxis:ce-se-ye-H.mainAxis,pe=T?-Z[F]/2+re+se+xe+H.mainAxis:fe+se+xe+H.mainAxis,Ce=e.elements.arrow&&kI(e.elements.arrow),Pe=Ce?A==="y"?Ce.clientTop||0:Ce.clientLeft||0:0,Re=($=N==null?void 0:N[A])!=null?$:0,ke=G+me-Re-Pe,ze=G+pe-Re,Ge=OI(x?d3(q,ke):q,G,x?ob(ee,ze):ee);X[A]=Ge,j[A]=Ge-G}if(s){var ht,Tt=A==="x"?td:rd,xt=A==="x"?ip:op,pt=X[k],It=k==="y"?"height":"width",Ie=pt+w[Tt],de=pt-w[xt],Te=[td,rd].indexOf(C)!==-1,Be=(ht=N==null?void 0:N[k])!=null?ht:0,Ke=Te?Ie:pt-Z[It]-W[It]-Be+H.altAxis,ot=Te?pt+Z[It]+W[It]-Be-H.altAxis:de,Ze=x&&Te?AGe(Ke,pt,ot):OI(x?Ke:Ie,pt,x?ot:de);X[k]=Ze,j[k]=Ze-pt}e.modifiersData[n]=j}}var aqe={name:"preventOverflow",enabled:!0,phase:"main",fn:sqe,requiresIfExists:["offset"]};function lqe(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function cqe(t){return t===sp(t)||!ap(t)?Pj(t):lqe(t)}function uqe(t){var e=t.getBoundingClientRect(),r=UC(e.width)/t.offsetWidth||1,n=UC(e.height)/t.offsetHeight||1;return r!==1||n!==1}function fqe(t,e,r){r===void 0&&(r=!1);var n=ap(e),i=ap(e)&&uqe(e),o=Dx(e),a=VC(t,i,r),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(n||!n&&!r)&&((Yg(e)!=="body"||Mj(o))&&(s=cqe(e)),ap(e)?(l=VC(e,!0),l.x+=e.clientLeft,l.y+=e.clientTop):o&&(l.x=Ij(o))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function dqe(t){var e=new Map,r=new Set,n=[];t.forEach(function(o){e.set(o.name,o)});function i(o){r.add(o.name);var a=[].concat(o.requires||[],o.requiresIfExists||[]);a.forEach(function(s){if(!r.has(s)){var l=e.get(s);l&&i(l)}}),n.push(o)}return t.forEach(function(o){r.has(o.name)||i(o)}),n}function hqe(t){var e=dqe(t);return EGe.reduce(function(r,n){return r.concat(e.filter(function(i){return i.phase===n}))},[])}function pqe(t){var e;return function(){return e||(e=new Promise(function(r){Promise.resolve().then(function(){e=void 0,r(t())})})),e}}function mqe(t){var e=t.reduce(function(r,n){var i=r[n.name];return r[n.name]=i?Object.assign({},i,n,{options:Object.assign({},i.options,n.options),data:Object.assign({},i.data,n.data)}):n,r},{});return Object.keys(e).map(function(r){return e[r]})}var Qie={placement:"bottom",modifiers:[],strategy:"absolute"};function Jie(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return!e.some(function(n){return!(n&&typeof n.getBoundingClientRect=="function")})}function gqe(t){t===void 0&&(t={});var e=t,r=e.defaultModifiers,n=r===void 0?[]:r,i=e.defaultOptions,o=i===void 0?Qie:i;return function(s,l,u){u===void 0&&(u=o);var p={placement:"bottom",orderedModifiers:[],options:Object.assign({},Qie,o),modifiersData:{},elements:{reference:s,popper:l},attributes:{},styles:{}},m=[],v=!1,x={state:p,setOptions:function(C){var E=typeof C=="function"?C(p.options):C;_(),p.options=Object.assign({},o,p.options,E),p.scrollParents={reference:ib(s)?LI(s):s.contextElement?LI(s.contextElement):[],popper:LI(l)};var T=hqe(mqe([].concat(n,p.options.modifiers)));return p.orderedModifiers=T.filter(function(A){return A.enabled}),y(),x.update()},forceUpdate:function(){if(!v){var C=p.elements,E=C.reference,T=C.popper;if(!!Jie(E,T)){p.rects={reference:fqe(E,kI(T),p.options.strategy==="fixed"),popper:Sj(T)},p.reset=!1,p.placement=p.options.placement,p.orderedModifiers.forEach(function(H){return p.modifiersData[H.name]=Object.assign({},H.data)});for(var A=0;A<p.orderedModifiers.length;A++){if(p.reset===!0){p.reset=!1,A=-1;continue}var k=p.orderedModifiers[A],X=k.fn,Z=k.options,W=Z===void 0?{}:Z,D=k.name;typeof X=="function"&&(p=X({state:p,options:W,name:D,instance:x})||p)}}}},update:pqe(function(){return new Promise(function(w){x.forceUpdate(),w(p)})}),destroy:function(){_(),v=!0}};if(!Jie(s,l))return x;x.setOptions(u).then(function(w){!v&&u.onFirstUpdate&&u.onFirstUpdate(w)});function y(){p.orderedModifiers.forEach(function(w){var C=w.name,E=w.options,T=E===void 0?{}:E,A=w.effect;if(typeof A=="function"){var k=A({state:p,name:C,instance:x,options:T}),X=function(){};m.push(k||X)}})}function _(){m.forEach(function(w){return w()}),m=[]}return x}}var vqe=[BGe,iqe,FGe,PGe,rqe,ZGe,aqe,LGe,JGe],yqe=gqe({defaultModifiers:vqe});function xqe(t){return typeof t=="function"?t():t}const _qe=Y.exports.forwardRef(function(e,r){const{children:n,container:i,disablePortal:o=!1}=e,[a,s]=Y.exports.useState(null),l=ta(Y.exports.isValidElement(n)?n.ref:null,r);if(np(()=>{o||s(xqe(i)||document.body)},[i,o]),np(()=>{if(a&&!o)return mI(r,a),()=>{mI(r,null)}},[r,a,o]),o){if(Y.exports.isValidElement(n)){const u={ref:l};return Y.exports.cloneElement(n,u)}return Kt(Y.exports.Fragment,{children:n})}return Kt(Y.exports.Fragment,{children:a&&Wa.exports.createPortal(n,a)})});var eoe=_qe;function bqe(t){return Kn("MuiPopper",t)}ei("MuiPopper",["root"]);const wqe=["anchorEl","children","component","direction","disablePortal","modifiers","open","ownerState","placement","popperOptions","popperRef","slotProps","slots","TransitionProps"],Cqe=["anchorEl","children","container","direction","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","style","transition","slotProps","slots"];function Eqe(t,e){if(e==="ltr")return t;switch(t){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return t}}function Rj(t){return typeof t=="function"?t():t}function Sqe(t){return t.nodeType!==void 0}const Tqe=()=>Qn({root:["root"]},bqe,{}),Pqe={},Iqe=Y.exports.forwardRef(function(e,r){var n;const{anchorEl:i,children:o,component:a,direction:s,disablePortal:l,modifiers:u,open:p,ownerState:m,placement:v,popperOptions:x,popperRef:y,slotProps:_={},slots:w={},TransitionProps:C}=e,E=bn(e,wqe),T=Y.exports.useRef(null),A=ta(T,r),k=Y.exports.useRef(null),X=ta(k,y),Z=Y.exports.useRef(X);np(()=>{Z.current=X},[X]),Y.exports.useImperativeHandle(y,()=>k.current,[]);const W=Eqe(v,s),[D,H]=Y.exports.useState(W),[N,j]=Y.exports.useState(Rj(i));Y.exports.useEffect(()=>{k.current&&k.current.forceUpdate()}),Y.exports.useEffect(()=>{i&&j(Rj(i))},[i]),np(()=>{if(!N||!p)return;const G=re=>{H(re.placement)};let q=[{name:"preventOverflow",options:{altBoundary:l}},{name:"flip",options:{altBoundary:l}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:re})=>{G(re)}}];u!=null&&(q=q.concat(u)),x&&x.modifiers!=null&&(q=q.concat(x.modifiers));const ee=yqe(N,T.current,Fe({placement:W},x,{modifiers:q}));return Z.current(ee),()=>{ee.destroy(),Z.current(null)}},[N,l,u,p,x,W]);const $={placement:D};C!==null&&($.TransitionProps=C);const z=Tqe(),O=(n=a!=null?a:w.root)!=null?n:"div",F=Om({elementType:O,externalSlotProps:_.root,externalForwardedProps:E,additionalProps:{role:"tooltip",ref:A},ownerState:Fe({},e,m),className:z.root});return Kt(O,Fe({},F,{children:typeof o=="function"?o($):o}))}),Mqe=Y.exports.forwardRef(function(e,r){const{anchorEl:n,children:i,container:o,direction:a="ltr",disablePortal:s=!1,keepMounted:l=!1,modifiers:u,open:p,placement:m="bottom",popperOptions:v=Pqe,popperRef:x,style:y,transition:_=!1,slotProps:w={},slots:C={}}=e,E=bn(e,Cqe),[T,A]=Y.exports.useState(!0),k=()=>{A(!1)},X=()=>{A(!0)};if(!l&&!p&&(!_||T))return null;let Z;if(o)Z=o;else if(n){const H=Rj(n);Z=H&&Sqe(H)?wl(H).body:wl(null).body}const W=!p&&l&&(!_||T)?"none":void 0,D=_?{in:p,onEnter:k,onExited:X}:void 0;return Kt(eoe,{disablePortal:s,container:Z,children:Kt(Iqe,Fe({anchorEl:n,direction:a,disablePortal:s,modifiers:u,ref:r,open:_?!T:p,placement:m,popperOptions:v,popperRef:x,slotProps:w,slots:C},E,{style:Fe({position:"fixed",top:0,left:0,display:W},y),TransitionProps:D,children:i}))})});var Aqe=Mqe;function Rqe(t){const e=wl(t);return e.body===t?rp(t).innerWidth>e.documentElement.clientWidth:t.scrollHeight>t.clientHeight}function NI(t,e){e?t.setAttribute("aria-hidden","true"):t.removeAttribute("aria-hidden")}function toe(t){return parseInt(rp(t).getComputedStyle(t).paddingRight,10)||0}function kqe(t){const r=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(t.tagName)!==-1,n=t.tagName==="INPUT"&&t.getAttribute("type")==="hidden";return r||n}function roe(t,e,r,n,i){const o=[e,r,...n];[].forEach.call(t.children,a=>{const s=o.indexOf(a)===-1,l=!kqe(a);s&&l&&NI(a,i)})}function kj(t,e){let r=-1;return t.some((n,i)=>e(n)?(r=i,!0):!1),r}function Oqe(t,e){const r=[],n=t.container;if(!e.disableScrollLock){if(Rqe(n)){const a=Vne(wl(n));r.push({value:n.style.paddingRight,property:"padding-right",el:n}),n.style.paddingRight=`${toe(n)+a}px`;const s=wl(n).querySelectorAll(".mui-fixed");[].forEach.call(s,l=>{r.push({value:l.style.paddingRight,property:"padding-right",el:l}),l.style.paddingRight=`${toe(l)+a}px`})}let o;if(n.parentNode instanceof DocumentFragment)o=wl(n).body;else{const a=n.parentElement,s=rp(n);o=(a==null?void 0:a.nodeName)==="HTML"&&s.getComputedStyle(a).overflowY==="scroll"?a:n}r.push({value:o.style.overflow,property:"overflow",el:o},{value:o.style.overflowX,property:"overflow-x",el:o},{value:o.style.overflowY,property:"overflow-y",el:o}),o.style.overflow="hidden"}return()=>{r.forEach(({value:o,el:a,property:s})=>{o?a.style.setProperty(s,o):a.style.removeProperty(s)})}}function Lqe(t){const e=[];return[].forEach.call(t.children,r=>{r.getAttribute("aria-hidden")==="true"&&e.push(r)}),e}class Dqe{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(e,r){let n=this.modals.indexOf(e);if(n!==-1)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&NI(e.modalRef,!1);const i=Lqe(r);roe(r,e.mount,e.modalRef,i,!0);const o=kj(this.containers,a=>a.container===r);return o!==-1?(this.containers[o].modals.push(e),n):(this.containers.push({modals:[e],container:r,restore:null,hiddenSiblings:i}),n)}mount(e,r){const n=kj(this.containers,o=>o.modals.indexOf(e)!==-1),i=this.containers[n];i.restore||(i.restore=Oqe(i,r))}remove(e,r=!0){const n=this.modals.indexOf(e);if(n===-1)return n;const i=kj(this.containers,a=>a.modals.indexOf(e)!==-1),o=this.containers[i];if(o.modals.splice(o.modals.indexOf(e),1),this.modals.splice(n,1),o.modals.length===0)o.restore&&o.restore(),e.modalRef&&NI(e.modalRef,r),roe(o.container,e.mount,e.modalRef,o.hiddenSiblings,!1),this.containers.splice(i,1);else{const a=o.modals[o.modals.length-1];a.modalRef&&NI(a.modalRef,!1)}return n}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}}function Nqe(t){return Kn("MuiModal",t)}ei("MuiModal",["root","hidden","backdrop"]);const $qe=["children","closeAfterTransition","component","container","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","manager","onBackdropClick","onClose","onKeyDown","open","onTransitionEnter","onTransitionExited","slotProps","slots"],Fqe=t=>{const{open:e,exited:r}=t;return Qn({root:["root",!e&&r&&"hidden"],backdrop:["backdrop"]},Nqe,void 0)};function zqe(t){return typeof t=="function"?t():t}function Bqe(t){return t?t.props.hasOwnProperty("in"):!1}const jqe=new Dqe,Uqe=Y.exports.forwardRef(function(e,r){var n,i;const{children:o,closeAfterTransition:a=!1,component:s,container:l,disableAutoFocus:u=!1,disableEnforceFocus:p=!1,disableEscapeKeyDown:m=!1,disablePortal:v=!1,disableRestoreFocus:x=!1,disableScrollLock:y=!1,hideBackdrop:_=!1,keepMounted:w=!1,manager:C=jqe,onBackdropClick:E,onClose:T,onKeyDown:A,open:k,onTransitionEnter:X,onTransitionExited:Z,slotProps:W={},slots:D={}}=e,H=bn(e,$qe),[N,j]=Y.exports.useState(!k),$=Y.exports.useRef({}),z=Y.exports.useRef(null),O=Y.exports.useRef(null),F=ta(O,r),G=Bqe(o),q=(n=e["aria-hidden"])!=null?n:!0,ee=()=>wl(z.current),re=()=>($.current.modalRef=O.current,$.current.mountNode=z.current,$.current),ce=()=>{C.mount(re(),{disableScrollLock:y}),O.current&&(O.current.scrollTop=0)},fe=bc(()=>{const ht=zqe(l)||ee().body;C.add(re(),ht),O.current&&ce()}),J=Y.exports.useCallback(()=>C.isTopModal(re()),[C]),oe=bc(ht=>{z.current=ht,!(!ht||!O.current)&&(k&&J()?ce():NI(O.current,q))}),ve=Y.exports.useCallback(()=>{C.remove(re(),q)},[C,q]);Y.exports.useEffect(()=>()=>{ve()},[ve]),Y.exports.useEffect(()=>{k?fe():(!G||!a)&&ve()},[k,ve,G,a,fe]);const ye=Fe({},e,{closeAfterTransition:a,disableAutoFocus:u,disableEnforceFocus:p,disableEscapeKeyDown:m,disablePortal:v,disableRestoreFocus:x,disableScrollLock:y,exited:N,hideBackdrop:_,keepMounted:w}),xe=Fqe(ye),se=()=>{j(!1),X&&X()},me=()=>{j(!0),Z&&Z(),a&&ve()},pe=ht=>{ht.target===ht.currentTarget&&(E&&E(ht),T&&T(ht,"backdropClick"))},Ce=ht=>{A&&A(ht),!(ht.key!=="Escape"||!J())&&(m||(ht.stopPropagation(),T&&T(ht,"escapeKeyDown")))},Pe={};o.props.tabIndex===void 0&&(Pe.tabIndex="-1"),G&&(Pe.onEnter=FD(se,o.props.onEnter),Pe.onExited=FD(me,o.props.onExited));const Re=(i=s!=null?s:D.root)!=null?i:"div",ke=Om({elementType:Re,externalSlotProps:W.root,externalForwardedProps:H,additionalProps:{ref:F,role:"presentation",onKeyDown:Ce},className:xe.root,ownerState:ye}),ze=D.backdrop,Ge=Om({elementType:ze,externalSlotProps:W.backdrop,additionalProps:{"aria-hidden":!0,onClick:pe,open:k},className:xe.backdrop,ownerState:ye});return!w&&!k&&(!G||N)?null:Kt(eoe,{ref:oe,container:l,disablePortal:v,children:Ji(Re,Fe({},ke,{children:[!_&&ze?Kt(ze,Fe({},Ge)):null,Kt(dGe,{disableEnforceFocus:p,disableAutoFocus:u,disableRestoreFocus:x,isEnabled:J,open:k,children:Y.exports.cloneElement(o,Pe)})]}))})});var Vqe=Uqe;const Hqe=2;function noe(t,e){return t-e}function $I(t,e,r){return t==null?e:Math.min(Math.max(e,t),r)}function ioe(t,e){var r;const{index:n}=(r=t.reduce((i,o,a)=>{const s=Math.abs(e-o);return i===null||s<i.distance||s===i.distance?{distance:s,index:a}:i},null))!=null?r:{};return n}function g3(t,e){if(e.current!==void 0&&t.changedTouches){const r=t;for(let n=0;n<r.changedTouches.length;n+=1){const i=r.changedTouches[n];if(i.identifier===e.current)return{x:i.clientX,y:i.clientY}}return!1}return{x:t.clientX,y:t.clientY}}function v3(t,e,r){return(t-e)*100/(r-e)}function Wqe(t,e,r){return(r-e)*t+e}function Gqe(t){if(Math.abs(t)<1){const r=t.toExponential().split("e-"),n=r[0].split(".")[1];return(n?n.length:0)+parseInt(r[1],10)}const e=t.toString().split(".")[1];return e?e.length:0}function qqe(t,e,r){const n=Math.round((t-r)/e)*e+r;return Number(n.toFixed(Gqe(e)))}function ooe({values:t,newValue:e,index:r}){const n=t.slice();return n[r]=e,n.sort(noe)}function y3({sliderRef:t,activeIndex:e,setActive:r}){var n,i;const o=wl(t.current);if(!((n=t.current)!=null&&n.contains(o.activeElement))||Number(o==null||(i=o.activeElement)==null?void 0:i.getAttribute("data-index"))!==e){var a;(a=t.current)==null||a.querySelector(`[type="range"][data-index="${e}"]`).focus()}r&&r(e)}const Xqe={horizontal:{offset:t=>({left:`${t}%`}),leap:t=>({width:`${t}%`})},"horizontal-reverse":{offset:t=>({right:`${t}%`}),leap:t=>({width:`${t}%`})},vertical:{offset:t=>({bottom:`${t}%`}),leap:t=>({height:`${t}%`})}},Yqe=t=>t;let x3;function Oj(){return x3===void 0&&(typeof CSS!="undefined"&&typeof CSS.supports=="function"?x3=CSS.supports("touch-action","none"):x3=!0),x3}function Kqe(t){const{"aria-labelledby":e,defaultValue:r,disabled:n=!1,disableSwap:i=!1,isRtl:o=!1,marks:a=!1,max:s=100,min:l=0,name:u,onChange:p,onChangeCommitted:m,orientation:v="horizontal",ref:x,scale:y=Yqe,step:_=1,tabIndex:w,value:C}=t,E=Y.exports.useRef(),[T,A]=Y.exports.useState(-1),[k,X]=Y.exports.useState(-1),[Z,W]=Y.exports.useState(!1),D=Y.exports.useRef(0),[H,N]=Rm({controlled:C,default:r!=null?r:l,name:"Slider"}),j=p&&((Te,Be,Ke)=>{const ot=Te.nativeEvent||Te,Ze=new ot.constructor(ot.type,ot);Object.defineProperty(Ze,"target",{writable:!0,value:{value:Be,name:u}}),p(Ze,Be,Ke)}),$=Array.isArray(H);let z=$?H.slice().sort(noe):[H];z=z.map(Te=>$I(Te,l,s));const O=a===!0&&_!==null?[...Array(Math.floor((s-l)/_)+1)].map((Te,Be)=>({value:l+_*Be})):a||[],F=O.map(Te=>Te.value),{isFocusVisibleRef:G,onBlur:q,onFocus:ee,ref:re}=vI(),[ce,fe]=Y.exports.useState(-1),J=Y.exports.useRef(),oe=ta(re,J),ve=ta(x,oe),ye=Te=>Be=>{var Ke;const ot=Number(Be.currentTarget.getAttribute("data-index"));ee(Be),G.current===!0&&fe(ot),X(ot),Te==null||(Ke=Te.onFocus)==null||Ke.call(Te,Be)},xe=Te=>Be=>{var Ke;q(Be),G.current===!1&&fe(-1),X(-1),Te==null||(Ke=Te.onBlur)==null||Ke.call(Te,Be)};np(()=>{if(n&&J.current.contains(document.activeElement)){var Te;(Te=document.activeElement)==null||Te.blur()}},[n]),n&&T!==-1&&A(-1),n&&ce!==-1&&fe(-1);const se=Te=>Be=>{var Ke;(Ke=Te.onChange)==null||Ke.call(Te,Be);const ot=Number(Be.currentTarget.getAttribute("data-index")),Ze=z[ot],Je=F.indexOf(Ze);let St=Be.target.valueAsNumber;if(O&&_==null&&(St=St<Ze?F[Je-1]:F[Je+1]),St=$I(St,l,s),O&&_==null){const er=F.indexOf(z[ot]);St=St<z[ot]?F[er-1]:F[er+1]}if($){i&&(St=$I(St,z[ot-1]||-1/0,z[ot+1]||1/0));const er=St;St=ooe({values:z,newValue:St,index:ot});let Ft=ot;i||(Ft=St.indexOf(er)),y3({sliderRef:J,activeIndex:Ft})}N(St),fe(ot),j&&j(Be,St,ot),m&&m(Be,St)},me=Y.exports.useRef();let pe=v;o&&v==="horizontal"&&(pe+="-reverse");const Ce=({finger:Te,move:Be=!1})=>{const{current:Ke}=J,{width:ot,height:Ze,bottom:Je,left:St}=Ke.getBoundingClientRect();let er;pe.indexOf("vertical")===0?er=(Je-Te.y)/Ze:er=(Te.x-St)/ot,pe.indexOf("-reverse")!==-1&&(er=1-er);let Ft;if(Ft=Wqe(er,l,s),_)Ft=qqe(Ft,_,l);else{const Er=ioe(F,Ft);Ft=F[Er]}Ft=$I(Ft,l,s);let Ut=0;if($){Be?Ut=me.current:Ut=ioe(z,Ft),i&&(Ft=$I(Ft,z[Ut-1]||-1/0,z[Ut+1]||1/0));const Er=Ft;Ft=ooe({values:z,newValue:Ft,index:Ut}),i&&Be||(Ut=Ft.indexOf(Er),me.current=Ut)}return{newValue:Ft,activeIndex:Ut}},Pe=bc(Te=>{const Be=g3(Te,E);if(!Be)return;if(D.current+=1,Te.type==="mousemove"&&Te.buttons===0){Re(Te);return}const{newValue:Ke,activeIndex:ot}=Ce({finger:Be,move:!0});y3({sliderRef:J,activeIndex:ot,setActive:A}),N(Ke),!Z&&D.current>Hqe&&W(!0),j&&Ke!==H&&j(Te,Ke,ot)}),Re=bc(Te=>{const Be=g3(Te,E);if(W(!1),!Be)return;const{newValue:Ke}=Ce({finger:Be,move:!0});A(-1),Te.type==="touchend"&&X(-1),m&&m(Te,Ke),E.current=void 0,ze()}),ke=bc(Te=>{if(n)return;Oj()||Te.preventDefault();const Be=Te.changedTouches[0];Be!=null&&(E.current=Be.identifier);const Ke=g3(Te,E);if(Ke!==!1){const{newValue:Ze,activeIndex:Je}=Ce({finger:Ke});y3({sliderRef:J,activeIndex:Je,setActive:A}),N(Ze),j&&j(Te,Ze,Je)}D.current=0;const ot=wl(J.current);ot.addEventListener("touchmove",Pe),ot.addEventListener("touchend",Re)}),ze=Y.exports.useCallback(()=>{const Te=wl(J.current);Te.removeEventListener("mousemove",Pe),Te.removeEventListener("mouseup",Re),Te.removeEventListener("touchmove",Pe),Te.removeEventListener("touchend",Re)},[Re,Pe]);Y.exports.useEffect(()=>{const{current:Te}=J;return Te.addEventListener("touchstart",ke,{passive:Oj()}),()=>{Te.removeEventListener("touchstart",ke,{passive:Oj()}),ze()}},[ze,ke]),Y.exports.useEffect(()=>{n&&ze()},[n,ze]);const Ge=Te=>Be=>{var Ke;if((Ke=Te.onMouseDown)==null||Ke.call(Te,Be),n||Be.defaultPrevented||Be.button!==0)return;Be.preventDefault();const ot=g3(Be,E);if(ot!==!1){const{newValue:Je,activeIndex:St}=Ce({finger:ot});y3({sliderRef:J,activeIndex:St,setActive:A}),N(Je),j&&j(Be,Je,St)}D.current=0;const Ze=wl(J.current);Ze.addEventListener("mousemove",Pe),Ze.addEventListener("mouseup",Re)},ht=v3($?z[0]:l,l,s),Tt=v3(z[z.length-1],l,s)-ht,xt=(Te={})=>{const Be={onMouseDown:Ge(Te||{})},Ke=Fe({},Te,Be);return Fe({ref:ve},Ke)},pt=Te=>Be=>{var Ke;(Ke=Te.onMouseOver)==null||Ke.call(Te,Be);const ot=Number(Be.currentTarget.getAttribute("data-index"));X(ot)},It=Te=>Be=>{var Ke;(Ke=Te.onMouseLeave)==null||Ke.call(Te,Be),X(-1)};return{active:T,axis:pe,axisProps:Xqe,dragging:Z,focusedThumbIndex:ce,getHiddenInputProps:(Te={})=>{var Be;const Ke={onChange:se(Te||{}),onFocus:ye(Te||{}),onBlur:xe(Te||{})},ot=Fe({},Te,Ke);return Fe({tabIndex:w,"aria-labelledby":e,"aria-orientation":v,"aria-valuemax":y(s),"aria-valuemin":y(l),name:u,type:"range",min:t.min,max:t.max,step:(Be=t.step)!=null?Be:void 0,disabled:n},ot,{style:Fe({},LUe,{direction:o?"rtl":"ltr",width:"100%",height:"100%"})})},getRootProps:xt,getThumbProps:(Te={})=>{const Be={onMouseOver:pt(Te||{}),onMouseLeave:It(Te||{})};return Fe({},Te,Be)},marks:O,open:k,range:$,trackLeap:Tt,trackOffset:ht,values:z}}const Zqe=["onChange","maxRows","minRows","style","value"];function _3(t){return parseInt(t,10)||0}const Qqe={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function soe(t){return t==null||Object.keys(t).length===0||t.outerHeightStyle===0&&!t.overflow}const Jqe=Y.exports.forwardRef(function(e,r){const{onChange:n,maxRows:i,minRows:o=1,style:a,value:s}=e,l=bn(e,Zqe),{current:u}=Y.exports.useRef(s!=null),p=Y.exports.useRef(null),m=ta(r,p),v=Y.exports.useRef(null),x=Y.exports.useRef(0),[y,_]=Y.exports.useState({outerHeightStyle:0}),w=Y.exports.useCallback(()=>{const k=p.current,Z=rp(k).getComputedStyle(k);if(Z.width==="0px")return{outerHeightStyle:0};const W=v.current;W.style.width=Z.width,W.value=k.value||e.placeholder||"x",W.value.slice(-1)===` `&&(W.value+=" ");const D=Z.boxSizing,H=_3(Z.paddingBottom)+_3(Z.paddingTop),N=_3(Z.borderBottomWidth)+_3(Z.borderTopWidth),j=W.scrollHeight;W.value="x";const $=W.scrollHeight;let z=j;o&&(z=Math.max(Number(o)*$,z)),i&&(z=Math.min(Number(i)*$,z)),z=Math.max(z,$);const O=z+(D==="border-box"?H+N:0),F=Math.abs(z-j)<=1;return{outerHeightStyle:O,overflow:F}},[i,o,e.placeholder]),C=(k,X)=>{const{outerHeightStyle:Z,overflow:W}=X;return x.current<20&&(Z>0&&Math.abs((k.outerHeightStyle||0)-Z)>1||k.overflow!==W)?(x.current+=1,{overflow:W,outerHeightStyle:Z}):k},E=Y.exports.useCallback(()=>{const k=w();soe(k)||_(X=>C(X,k))},[w]),T=()=>{const k=w();soe(k)||Wa.exports.flushSync(()=>{_(X=>C(X,k))})};Y.exports.useEffect(()=>{const k=tb(()=>{x.current=0,p.current&&T()});let X;const Z=p.current,W=rp(Z);return W.addEventListener("resize",k),typeof ResizeObserver!="undefined"&&(X=new ResizeObserver(k),X.observe(Z)),()=>{k.clear(),W.removeEventListener("resize",k),X&&X.disconnect()}}),np(()=>{E()}),Y.exports.useEffect(()=>{x.current=0},[s]);const A=k=>{x.current=0,u||E(),n&&n(k)};return Ji(Y.exports.Fragment,{children:[Kt("textarea",Fe({value:s,onChange:A,ref:m,rows:o,style:Fe({height:y.outerHeightStyle,overflow:y.overflow?"hidden":void 0},a)},l)),Kt("textarea",{"aria-hidden":!0,className:e.className,readOnly:!0,ref:v,tabIndex:-1,style:Fe({},Qqe.shadow,a,{padding:0})})]})});var eXe=Jqe;function aoe(t){return typeof t.normalize!="undefined"?t.normalize("NFD").replace(/[\u0300-\u036f]/g,""):t}function tXe(t={}){const{ignoreAccents:e=!0,ignoreCase:r=!0,limit:n,matchFrom:i="any",stringify:o,trim:a=!1}=t;return(s,{inputValue:l,getOptionLabel:u})=>{let p=a?l.trim():l;r&&(p=p.toLowerCase()),e&&(p=aoe(p));const m=p?s.filter(v=>{let x=(o||u)(v);return r&&(x=x.toLowerCase()),e&&(x=aoe(x)),i==="start"?x.indexOf(p)===0:x.indexOf(p)>-1}):s;return typeof n=="number"?m.slice(0,n):m}}function Lj(t,e){for(let r=0;r<t.length;r+=1)if(e(t[r]))return r;return-1}const rXe=tXe(),loe=5,nXe=t=>{var e;return t.current!==null&&((e=t.current.parentElement)==null?void 0:e.contains(document.activeElement))};function iXe(t){const{unstable_isActiveElementInListbox:e=nXe,unstable_classNamePrefix:r="Mui",autoComplete:n=!1,autoHighlight:i=!1,autoSelect:o=!1,blurOnSelect:a=!1,clearOnBlur:s=!t.freeSolo,clearOnEscape:l=!1,componentName:u="useAutocomplete",defaultValue:p=t.multiple?[]:null,disableClearable:m=!1,disableCloseOnSelect:v=!1,disabled:x,disabledItemsFocusable:y=!1,disableListWrap:_=!1,filterOptions:w=rXe,filterSelectedOptions:C=!1,freeSolo:E=!1,getOptionDisabled:T,getOptionLabel:A=$t=>{var Gt;return(Gt=$t.label)!=null?Gt:$t},groupBy:k,handleHomeEndKeys:X=!t.freeSolo,id:Z,includeInputInList:W=!1,inputValue:D,isOptionEqualToValue:H=($t,Gt)=>$t===Gt,multiple:N=!1,onChange:j,onClose:$,onHighlightChange:z,onInputChange:O,onOpen:F,open:G,openOnFocus:q=!1,options:ee,readOnly:re=!1,selectOnFocus:ce=!t.freeSolo,value:fe}=t,J=gI(Z);let oe=A;oe=$t=>{const Gt=A($t);return typeof Gt!="string"?String(Gt):Gt};const ve=Y.exports.useRef(!1),ye=Y.exports.useRef(!0),xe=Y.exports.useRef(null),se=Y.exports.useRef(null),[me,pe]=Y.exports.useState(null),[Ce,Pe]=Y.exports.useState(-1),Re=i?0:-1,ke=Y.exports.useRef(Re),[ze,Ge]=Rm({controlled:fe,default:p,name:u}),[ht,Tt]=Rm({controlled:D,default:"",name:u,state:"inputValue"}),[xt,pt]=Y.exports.useState(!1),It=Y.exports.useCallback(($t,Gt)=>{if(!(N?ze.length<Gt.length:Gt!==null)&&!s)return;let Br;if(N)Br="";else if(Gt==null)Br="";else{const Xr=oe(Gt);Br=typeof Xr=="string"?Xr:""}ht!==Br&&(Tt(Br),O&&O($t,Br,"reset"))},[oe,ht,N,O,Tt,s,ze]),[Ie,de]=Rm({controlled:G,default:!1,name:u,state:"open"}),[Te,Be]=Y.exports.useState(!0),Ke=!N&&ze!=null&&ht===oe(ze),ot=Ie&&!re,Ze=ot?w(ee.filter($t=>!(C&&(N?ze:[ze]).some(Gt=>Gt!==null&&H($t,Gt)))),{inputValue:Ke&&Te?"":ht,getOptionLabel:oe}):[],Je=kUe({filteredOptions:Ze,value:ze});Y.exports.useEffect(()=>{const $t=ze!==Je.value;xt&&!$t||E&&!$t||It(null,ze)},[ze,It,xt,Je.value,E]);const St=Ie&&Ze.length>0&&!re,er=bc($t=>{$t===-1?xe.current.focus():me.querySelector(`[data-tag-index="${$t}"]`).focus()});Y.exports.useEffect(()=>{N&&Ce>ze.length-1&&(Pe(-1),er(-1))},[ze,N,Ce,er]);function Ft($t,Gt){if(!se.current||$t===-1)return-1;let Ir=$t;for(;;){if(Gt==="next"&&Ir===Ze.length||Gt==="previous"&&Ir===-1)return-1;const Br=se.current.querySelector(`[data-option-index="${Ir}"]`),Xr=y?!1:!Br||Br.disabled||Br.getAttribute("aria-disabled")==="true";if(Br&&!Br.hasAttribute("tabindex")||Xr)Ir+=Gt==="next"?1:-1;else return Ir}}const Ut=bc(({event:$t,index:Gt,reason:Ir="auto"})=>{if(ke.current=Gt,Gt===-1?xe.current.removeAttribute("aria-activedescendant"):xe.current.setAttribute("aria-activedescendant",`${J}-option-${Gt}`),z&&z($t,Gt===-1?null:Ze[Gt],Ir),!se.current)return;const Br=se.current.querySelector(`[role="option"].${r}-focused`);Br&&(Br.classList.remove(`${r}-focused`),Br.classList.remove(`${r}-focusVisible`));const Xr=se.current.parentElement.querySelector('[role="listbox"]');if(!Xr)return;if(Gt===-1){Xr.scrollTop=0;return}const Vn=se.current.querySelector(`[data-option-index="${Gt}"]`);if(!!Vn&&(Vn.classList.add(`${r}-focused`),Ir==="keyboard"&&Vn.classList.add(`${r}-focusVisible`),Xr.scrollHeight>Xr.clientHeight&&Ir!=="mouse")){const Ln=Vn,br=Xr.clientHeight+Xr.scrollTop,oi=Ln.offsetTop+Ln.offsetHeight;oi>br?Xr.scrollTop=oi-Xr.clientHeight:Ln.offsetTop-Ln.offsetHeight*(k?1.3:0)<Xr.scrollTop&&(Xr.scrollTop=Ln.offsetTop-Ln.offsetHeight*(k?1.3:0))}}),Er=bc(({event:$t,diff:Gt,direction:Ir="next",reason:Br="auto"})=>{if(!ot)return;const Vn=Ft((()=>{const Ln=Ze.length-1;if(Gt==="reset")return Re;if(Gt==="start")return 0;if(Gt==="end")return Ln;const br=ke.current+Gt;return br<0?br===-1&&W?-1:_&&ke.current!==-1||Math.abs(Gt)>1?0:Ln:br>Ln?br===Ln+1&&W?-1:_||Math.abs(Gt)>1?Ln:0:br})(),Ir);if(Ut({index:Vn,reason:Br,event:$t}),n&&Gt!=="reset")if(Vn===-1)xe.current.value=ht;else{const Ln=oe(Ze[Vn]);xe.current.value=Ln,Ln.toLowerCase().indexOf(ht.toLowerCase())===0&&ht.length>0&&xe.current.setSelectionRange(ht.length,Ln.length)}}),kr=()=>{const $t=(Gt,Ir)=>{const Br=Gt?oe(Gt):"",Xr=Ir?oe(Ir):"";return Br===Xr};if(ke.current!==-1&&Je.filteredOptions&&Je.filteredOptions.length!==Ze.length&&(N?ze.length===Je.value.length&&Je.value.every((Gt,Ir)=>oe(ze[Ir])===oe(Gt)):$t(Je.value,ze))){const Gt=Je.filteredOptions[ke.current];if(Gt&&Ze.some(Br=>oe(Br)===oe(Gt)))return!0}return!1},mr=Y.exports.useCallback(()=>{if(!ot||kr())return;const $t=N?ze[0]:ze;if(Ze.length===0||$t==null){Er({diff:"reset"});return}if(!!se.current){if($t!=null){const Gt=Ze[ke.current];if(N&&Gt&&Lj(ze,Br=>H(Gt,Br))!==-1)return;const Ir=Lj(Ze,Br=>H(Br,$t));Ir===-1?Er({diff:"reset"}):Ut({index:Ir});return}if(ke.current>=Ze.length-1){Ut({index:Ze.length-1});return}Ut({index:ke.current})}},[Ze.length,N?!1:ze,C,Er,Ut,ot,ht,N]),Dt=bc($t=>{mI(se,$t),!!$t&&mr()});Y.exports.useEffect(()=>{mr()},[mr]);const Jr=$t=>{Ie||(de(!0),Be(!0),F&&F($t))},We=($t,Gt)=>{!Ie||(de(!1),$&&$($t,Gt))},Oe=($t,Gt,Ir,Br)=>{if(N){if(ze.length===Gt.length&&ze.every((Xr,Vn)=>Xr===Gt[Vn]))return}else if(ze===Gt)return;j&&j($t,Gt,Ir,Br),Ge(Gt)},$e=Y.exports.useRef(!1),Xe=($t,Gt,Ir="selectOption",Br="options")=>{let Xr=Ir,Vn=Gt;if(N){Vn=Array.isArray(ze)?ze.slice():[];const Ln=Lj(Vn,br=>H(Gt,br));Ln===-1?Vn.push(Gt):Br!=="freeSolo"&&(Vn.splice(Ln,1),Xr="removeOption")}It($t,Vn),Oe($t,Vn,Xr,{option:Gt}),!v&&(!$t||!$t.ctrlKey&&!$t.metaKey)&&We($t,Xr),(a===!0||a==="touch"&&$e.current||a==="mouse"&&!$e.current)&&xe.current.blur()};function tt($t,Gt){if($t===-1)return-1;let Ir=$t;for(;;){if(Gt==="next"&&Ir===ze.length||Gt==="previous"&&Ir===-1)return-1;const Br=me.querySelector(`[data-tag-index="${Ir}"]`);if(!Br||!Br.hasAttribute("tabindex")||Br.disabled||Br.getAttribute("aria-disabled")==="true")Ir+=Gt==="next"?1:-1;else return Ir}}const _t=($t,Gt)=>{if(!N)return;ht===""&&We($t,"toggleInput");let Ir=Ce;Ce===-1?ht===""&&Gt==="previous"&&(Ir=ze.length-1):(Ir+=Gt==="next"?1:-1,Ir<0&&(Ir=0),Ir===ze.length&&(Ir=-1)),Ir=tt(Ir,Gt),Pe(Ir),er(Ir)},Ot=$t=>{ve.current=!0,Tt(""),O&&O($t,"","clear"),Oe($t,N?[]:null,"clear")},Nt=$t=>Gt=>{if($t.onKeyDown&&$t.onKeyDown(Gt),!Gt.defaultMuiPrevented&&(Ce!==-1&&["ArrowLeft","ArrowRight"].indexOf(Gt.key)===-1&&(Pe(-1),er(-1)),Gt.which!==229))switch(Gt.key){case"Home":ot&&X&&(Gt.preventDefault(),Er({diff:"start",direction:"next",reason:"keyboard",event:Gt}));break;case"End":ot&&X&&(Gt.preventDefault(),Er({diff:"end",direction:"previous",reason:"keyboard",event:Gt}));break;case"PageUp":Gt.preventDefault(),Er({diff:-loe,direction:"previous",reason:"keyboard",event:Gt}),Jr(Gt);break;case"PageDown":Gt.preventDefault(),Er({diff:loe,direction:"next",reason:"keyboard",event:Gt}),Jr(Gt);break;case"ArrowDown":Gt.preventDefault(),Er({diff:1,direction:"next",reason:"keyboard",event:Gt}),Jr(Gt);break;case"ArrowUp":Gt.preventDefault(),Er({diff:-1,direction:"previous",reason:"keyboard",event:Gt}),Jr(Gt);break;case"ArrowLeft":_t(Gt,"previous");break;case"ArrowRight":_t(Gt,"next");break;case"Enter":if(ke.current!==-1&&ot){const Ir=Ze[ke.current],Br=T?T(Ir):!1;if(Gt.preventDefault(),Br)return;Xe(Gt,Ir,"selectOption"),n&&xe.current.setSelectionRange(xe.current.value.length,xe.current.value.length)}else E&&ht!==""&&Ke===!1&&(N&&Gt.preventDefault(),Xe(Gt,ht,"createOption","freeSolo"));break;case"Escape":ot?(Gt.preventDefault(),Gt.stopPropagation(),We(Gt,"escape")):l&&(ht!==""||N&&ze.length>0)&&(Gt.preventDefault(),Gt.stopPropagation(),Ot(Gt));break;case"Backspace":if(N&&!re&&ht===""&&ze.length>0){const Ir=Ce===-1?ze.length-1:Ce,Br=ze.slice();Br.splice(Ir,1),Oe(Gt,Br,"removeOption",{option:ze[Ir]})}break;case"Delete":if(N&&!re&&ht===""&&ze.length>0&&Ce!==-1){const Ir=Ce,Br=ze.slice();Br.splice(Ir,1),Oe(Gt,Br,"removeOption",{option:ze[Ir]})}break}},bt=$t=>{pt(!0),q&&!ve.current&&Jr($t)},Wt=$t=>{if(e(se)){xe.current.focus();return}pt(!1),ye.current=!0,ve.current=!1,o&&ke.current!==-1&&ot?Xe($t,Ze[ke.current],"blur"):o&&E&&ht!==""?Xe($t,ht,"blur","freeSolo"):s&&It($t,ze),We($t,"blur")},Sr=$t=>{const Gt=$t.target.value;ht!==Gt&&(Tt(Gt),Be(!1),O&&O($t,Gt,"input")),Gt===""?!m&&!N&&Oe($t,null,"clear"):Jr($t)},rr=$t=>{Ut({event:$t,index:Number($t.currentTarget.getAttribute("data-option-index")),reason:"mouse"})},tr=()=>{$e.current=!0},sn=$t=>{const Gt=Number($t.currentTarget.getAttribute("data-option-index"));Xe($t,Ze[Gt],"selectOption"),$e.current=!1},un=$t=>Gt=>{const Ir=ze.slice();Ir.splice($t,1),Oe(Gt,Ir,"removeOption",{option:ze[$t]})},Ye=$t=>{Ie?We($t,"toggleInput"):Jr($t)},Ve=$t=>{$t.target.getAttribute("id")!==J&&$t.preventDefault()},gt=()=>{xe.current.focus(),ce&&ye.current&&xe.current.selectionEnd-xe.current.selectionStart==0&&xe.current.select(),ye.current=!1},qt=$t=>{(ht===""||!Ie)&&Ye($t)};let Ht=E&&ht.length>0;Ht=Ht||(N?ze.length>0:ze!==null);let on=Ze;return k&&(on=Ze.reduce(($t,Gt,Ir)=>{const Br=k(Gt);return $t.length>0&&$t[$t.length-1].group===Br?$t[$t.length-1].options.push(Gt):$t.push({key:Ir,index:Ir,group:Br,options:[Gt]}),$t},[])),x&&xt&&Wt(),{getRootProps:($t={})=>Fe({"aria-owns":St?`${J}-listbox`:null},$t,{onKeyDown:Nt($t),onMouseDown:Ve,onClick:gt}),getInputLabelProps:()=>({id:`${J}-label`,htmlFor:J}),getInputProps:()=>({id:J,value:ht,onBlur:Wt,onFocus:bt,onChange:Sr,onMouseDown:qt,"aria-activedescendant":ot?"":null,"aria-autocomplete":n?"both":"list","aria-controls":St?`${J}-listbox`:void 0,"aria-expanded":St,autoComplete:"off",ref:xe,autoCapitalize:"none",spellCheck:"false",role:"combobox",disabled:x}),getClearProps:()=>({tabIndex:-1,onClick:Ot}),getPopupIndicatorProps:()=>({tabIndex:-1,onClick:Ye}),getTagProps:({index:$t})=>Fe({key:$t,"data-tag-index":$t,tabIndex:-1},!re&&{onDelete:un($t)}),getListboxProps:()=>({role:"listbox",id:`${J}-listbox`,"aria-labelledby":`${J}-label`,ref:Dt,onMouseDown:$t=>{$t.preventDefault()}}),getOptionProps:({index:$t,option:Gt})=>{const Ir=(N?ze:[ze]).some(Xr=>Xr!=null&&H(Gt,Xr)),Br=T?T(Gt):!1;return{key:oe(Gt),tabIndex:-1,role:"option",id:`${J}-option-${$t}`,onMouseOver:rr,onClick:sn,onTouchStart:tr,"data-option-index":$t,"aria-disabled":Br,"aria-selected":Ir}},id:J,inputValue:ht,value:ze,dirty:Ht,popupOpen:ot,focused:xt||Ce!==-1,anchorEl:me,setAnchorEl:pe,focusedTag:Ce,groupedOptions:on}}function oXe(t){return Kn("MuiSvgIcon",t)}ei("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const sXe=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],aXe=t=>{const{color:e,fontSize:r,classes:n}=t,i={root:["root",e!=="inherit"&&`color${Pr(e)}`,`fontSize${Pr(r)}`]};return Qn(i,oXe,n)},lXe=Nr("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,r.color!=="inherit"&&e[`color${Pr(r.color)}`],e[`fontSize${Pr(r.fontSize)}`]]}})(({theme:t,ownerState:e})=>{var r,n,i,o,a,s,l,u,p,m,v,x,y,_,w,C,E;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:"currentColor",flexShrink:0,transition:(r=t.transitions)==null||(n=r.create)==null?void 0:n.call(r,"fill",{duration:(i=t.transitions)==null||(o=i.duration)==null?void 0:o.shorter}),fontSize:{inherit:"inherit",small:((a=t.typography)==null||(s=a.pxToRem)==null?void 0:s.call(a,20))||"1.25rem",medium:((l=t.typography)==null||(u=l.pxToRem)==null?void 0:u.call(l,24))||"1.5rem",large:((p=t.typography)==null||(m=p.pxToRem)==null?void 0:m.call(p,35))||"2.1875rem"}[e.fontSize],color:(v=(x=(t.vars||t).palette)==null||(y=x[e.color])==null?void 0:y.main)!=null?v:{action:(_=(t.vars||t).palette)==null||(w=_.action)==null?void 0:w.active,disabled:(C=(t.vars||t).palette)==null||(E=C.action)==null?void 0:E.disabled,inherit:void 0}[e.color]}}),coe=Y.exports.forwardRef(function(e,r){const n=ti({props:e,name:"MuiSvgIcon"}),{children:i,className:o,color:a="inherit",component:s="svg",fontSize:l="medium",htmlColor:u,inheritViewBox:p=!1,titleAccess:m,viewBox:v="0 0 24 24"}=n,x=bn(n,sXe),y=Fe({},n,{color:a,component:s,fontSize:l,instanceFontSize:e.fontSize,inheritViewBox:p,viewBox:v}),_={};p||(_.viewBox=v);const w=aXe(y);return Ji(lXe,Fe({as:s,className:ln(w.root,o),focusable:"false",color:u,"aria-hidden":m?void 0:!0,role:m?"img":void 0,ref:r},_,x,{ownerState:y,children:[i,m?Kt("title",{children:m}):null]}))});coe.muiName="SvgIcon";var uoe=coe;function nd(t,e){function r(n,i){return Kt(uoe,Fe({"data-testid":`${e}Icon`,ref:i},n,{children:t}))}return r.muiName=uoe.muiName,Y.exports.memo(Y.exports.forwardRef(r))}const cXe={configure:t=>{Z7.configure(t)}};var uXe=Object.freeze(Object.defineProperty({__proto__:null,unstable_ClassNameGenerator:cXe,capitalize:Pr,createChainedFunction:FD,createSvgIcon:nd,debounce:tb,deprecatedPropType:_Ue,isMuiElement:zD,ownerDocument:wl,ownerWindow:rp,requirePropFactory:bUe,setRef:mI,unstable_useEnhancedEffect:np,unstable_useId:gI,unsupportedProp:EUe,useControlled:Rm,useEventCallback:bc,useForkRef:ta,useIsFocusVisible:vI},Symbol.toStringTag,{value:"Module"})),foe={disabled:!1},b3=Or.createContext(null),fXe=function(e){return e.scrollTop},FI="unmounted",sb="exited",ab="entering",WC="entered",Dj="exiting",Ey=function(t){Eu(e,t);function e(n,i){var o;o=t.call(this,n,i)||this;var a=i,s=a&&!a.isMounting?n.enter:n.appear,l;return o.appearStatus=null,n.in?s?(l=sb,o.appearStatus=ab):l=WC:n.unmountOnExit||n.mountOnEnter?l=FI:l=sb,o.state={status:l},o.nextCallback=null,o}e.getDerivedStateFromProps=function(i,o){var a=i.in;return a&&o.status===FI?{status:sb}:null};var r=e.prototype;return r.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},r.componentDidUpdate=function(i){var o=null;if(i!==this.props){var a=this.state.status;this.props.in?a!==ab&&a!==WC&&(o=ab):(a===ab||a===WC)&&(o=Dj)}this.updateStatus(!1,o)},r.componentWillUnmount=function(){this.cancelNextCallback()},r.getTimeouts=function(){var i=this.props.timeout,o,a,s;return o=a=s=i,i!=null&&typeof i!="number"&&(o=i.exit,a=i.enter,s=i.appear!==void 0?i.appear:a),{exit:o,enter:a,appear:s}},r.updateStatus=function(i,o){if(i===void 0&&(i=!1),o!==null)if(this.cancelNextCallback(),o===ab){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:M1.findDOMNode(this);a&&fXe(a)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===sb&&this.setState({status:FI})},r.performEnter=function(i){var o=this,a=this.props.enter,s=this.context?this.context.isMounting:i,l=this.props.nodeRef?[s]:[M1.findDOMNode(this),s],u=l[0],p=l[1],m=this.getTimeouts(),v=s?m.appear:m.enter;if(!i&&!a||foe.disabled){this.safeSetState({status:WC},function(){o.props.onEntered(u)});return}this.props.onEnter(u,p),this.safeSetState({status:ab},function(){o.props.onEntering(u,p),o.onTransitionEnd(v,function(){o.safeSetState({status:WC},function(){o.props.onEntered(u,p)})})})},r.performExit=function(){var i=this,o=this.props.exit,a=this.getTimeouts(),s=this.props.nodeRef?void 0:M1.findDOMNode(this);if(!o||foe.disabled){this.safeSetState({status:sb},function(){i.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:Dj},function(){i.props.onExiting(s),i.onTransitionEnd(a.exit,function(){i.safeSetState({status:sb},function(){i.props.onExited(s)})})})},r.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},r.safeSetState=function(i,o){o=this.setNextCallback(o),this.setState(i,o)},r.setNextCallback=function(i){var o=this,a=!0;return this.nextCallback=function(s){a&&(a=!1,o.nextCallback=null,i(s))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},r.onTransitionEnd=function(i,o){this.setNextCallback(o);var a=this.props.nodeRef?this.props.nodeRef.current:M1.findDOMNode(this),s=i==null&&!this.props.addEndListener;if(!a||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],u=l[0],p=l[1];this.props.addEndListener(u,p)}i!=null&&setTimeout(this.nextCallback,i)},r.render=function(){var i=this.state.status;if(i===FI)return null;var o=this.props,a=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var s=sf(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return Or.createElement(b3.Provider,{value:null},typeof a=="function"?a(i,s):Or.cloneElement(Or.Children.only(a),s))},e}(Or.Component);Ey.contextType=b3;Ey.propTypes={};function GC(){}Ey.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:GC,onEntering:GC,onEntered:GC,onExit:GC,onExiting:GC,onExited:GC};Ey.UNMOUNTED=FI;Ey.EXITED=sb;Ey.ENTERING=ab;Ey.ENTERED=WC;Ey.EXITING=Dj;var w3=Ey;function Nj(t,e){var r=function(o){return e&&Y.exports.isValidElement(o)?e(o):o},n=Object.create(null);return t&&Y.exports.Children.map(t,function(i){return i}).forEach(function(i){n[i.key]=r(i)}),n}function dXe(t,e){t=t||{},e=e||{};function r(p){return p in e?e[p]:t[p]}var n=Object.create(null),i=[];for(var o in t)o in e?i.length&&(n[o]=i,i=[]):i.push(o);var a,s={};for(var l in e){if(n[l])for(a=0;a<n[l].length;a++){var u=n[l][a];s[n[l][a]]=r(u)}s[l]=r(l)}for(a=0;a<i.length;a++)s[i[a]]=r(i[a]);return s}function lb(t,e,r){return r[e]!=null?r[e]:t.props[e]}function hXe(t,e){return Nj(t.children,function(r){return Y.exports.cloneElement(r,{onExited:e.bind(null,r),in:!0,appear:lb(r,"appear",t),enter:lb(r,"enter",t),exit:lb(r,"exit",t)})})}function pXe(t,e,r){var n=Nj(t.children),i=dXe(e,n);return Object.keys(i).forEach(function(o){var a=i[o];if(!!Y.exports.isValidElement(a)){var s=o in e,l=o in n,u=e[o],p=Y.exports.isValidElement(u)&&!u.props.in;l&&(!s||p)?i[o]=Y.exports.cloneElement(a,{onExited:r.bind(null,a),in:!0,exit:lb(a,"exit",t),enter:lb(a,"enter",t)}):!l&&s&&!p?i[o]=Y.exports.cloneElement(a,{in:!1}):l&&s&&Y.exports.isValidElement(u)&&(i[o]=Y.exports.cloneElement(a,{onExited:r.bind(null,a),in:u.props.in,exit:lb(a,"exit",t),enter:lb(a,"enter",t)}))}}),i}var mXe=Object.values||function(t){return Object.keys(t).map(function(e){return t[e]})},gXe={component:"div",childFactory:function(e){return e}},$j=function(t){Eu(e,t);function e(n,i){var o;o=t.call(this,n,i)||this;var a=o.handleExited.bind(lL(o));return o.state={contextValue:{isMounting:!0},handleExited:a,firstRender:!0},o}var r=e.prototype;return r.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},r.componentWillUnmount=function(){this.mounted=!1},e.getDerivedStateFromProps=function(i,o){var a=o.children,s=o.handleExited,l=o.firstRender;return{children:l?hXe(i,s):pXe(i,a,s),firstRender:!1}},r.handleExited=function(i,o){var a=Nj(this.props.children);i.key in a||(i.props.onExited&&i.props.onExited(o),this.mounted&&this.setState(function(s){var l=vt({},s.children);return delete l[i.key],{children:l}}))},r.render=function(){var i=this.props,o=i.component,a=i.childFactory,s=sf(i,["component","childFactory"]),l=this.state.contextValue,u=mXe(this.state.children).map(a);return delete s.appear,delete s.enter,delete s.exit,o===null?Or.createElement(b3.Provider,{value:l},u):Or.createElement(b3.Provider,{value:l},Or.createElement(o,s,u))},e}(Or.Component);$j.propTypes={};$j.defaultProps=gXe;var vXe=$j;const Fj=t=>t.scrollTop;function Nx(t,e){var r,n;const{timeout:i,easing:o,style:a={}}=t;return{duration:(r=a.transitionDuration)!=null?r:typeof i=="number"?i:i[e.mode]||0,easing:(n=a.transitionTimingFunction)!=null?n:typeof o=="object"?o[e.mode]:o,delay:a.transitionDelay}}function yXe(t){return Kn("MuiCollapse",t)}ei("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"]);const xXe=["addEndListener","children","className","collapsedSize","component","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","orientation","style","timeout","TransitionComponent"],_Xe=t=>{const{orientation:e,classes:r}=t,n={root:["root",`${e}`],entered:["entered"],hidden:["hidden"],wrapper:["wrapper",`${e}`],wrapperInner:["wrapperInner",`${e}`]};return Qn(n,yXe,r)},bXe=Nr("div",{name:"MuiCollapse",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,e[r.orientation],r.state==="entered"&&e.entered,r.state==="exited"&&!r.in&&r.collapsedSize==="0px"&&e.hidden]}})(({theme:t,ownerState:e})=>Fe({height:0,overflow:"hidden",transition:t.transitions.create("height")},e.orientation==="horizontal"&&{height:"auto",width:0,transition:t.transitions.create("width")},e.state==="entered"&&Fe({height:"auto",overflow:"visible"},e.orientation==="horizontal"&&{width:"auto"}),e.state==="exited"&&!e.in&&e.collapsedSize==="0px"&&{visibility:"hidden"})),wXe=Nr("div",{name:"MuiCollapse",slot:"Wrapper",overridesResolver:(t,e)=>e.wrapper})(({ownerState:t})=>Fe({display:"flex",width:"100%"},t.orientation==="horizontal"&&{width:"auto",height:"100%"})),CXe=Nr("div",{name:"MuiCollapse",slot:"WrapperInner",overridesResolver:(t,e)=>e.wrapperInner})(({ownerState:t})=>Fe({width:"100%"},t.orientation==="horizontal"&&{width:"auto",height:"100%"})),doe=Y.exports.forwardRef(function(e,r){const n=ti({props:e,name:"MuiCollapse"}),{addEndListener:i,children:o,className:a,collapsedSize:s="0px",component:l,easing:u,in:p,onEnter:m,onEntered:v,onEntering:x,onExit:y,onExited:_,onExiting:w,orientation:C="vertical",style:E,timeout:T=Rie.standard,TransitionComponent:A=w3}=n,k=bn(n,xXe),X=Fe({},n,{orientation:C,collapsedSize:s}),Z=_Xe(X),W=km(),D=Y.exports.useRef(),H=Y.exports.useRef(null),N=Y.exports.useRef(),j=typeof s=="number"?`${s}px`:s,$=C==="horizontal",z=$?"width":"height";Y.exports.useEffect(()=>()=>{clearTimeout(D.current)},[]);const O=Y.exports.useRef(null),F=ta(r,O),G=ye=>xe=>{if(ye){const se=O.current;xe===void 0?ye(se):ye(se,xe)}},q=()=>H.current?H.current[$?"clientWidth":"clientHeight"]:0,ee=G((ye,xe)=>{H.current&&$&&(H.current.style.position="absolute"),ye.style[z]=j,m&&m(ye,xe)}),re=G((ye,xe)=>{const se=q();H.current&&$&&(H.current.style.position="");const{duration:me,easing:pe}=Nx({style:E,timeout:T,easing:u},{mode:"enter"});if(T==="auto"){const Ce=W.transitions.getAutoHeightDuration(se);ye.style.transitionDuration=`${Ce}ms`,N.current=Ce}else ye.style.transitionDuration=typeof me=="string"?me:`${me}ms`;ye.style[z]=`${se}px`,ye.style.transitionTimingFunction=pe,x&&x(ye,xe)}),ce=G((ye,xe)=>{ye.style[z]="auto",v&&v(ye,xe)}),fe=G(ye=>{ye.style[z]=`${q()}px`,y&&y(ye)}),J=G(_),oe=G(ye=>{const xe=q(),{duration:se,easing:me}=Nx({style:E,timeout:T,easing:u},{mode:"exit"});if(T==="auto"){const pe=W.transitions.getAutoHeightDuration(xe);ye.style.transitionDuration=`${pe}ms`,N.current=pe}else ye.style.transitionDuration=typeof se=="string"?se:`${se}ms`;ye.style[z]=j,ye.style.transitionTimingFunction=me,w&&w(ye)});return Kt(A,Fe({in:p,onEnter:ee,onEntered:ce,onEntering:re,onExit:fe,onExited:J,onExiting:oe,addEndListener:ye=>{T==="auto"&&(D.current=setTimeout(ye,N.current||0)),i&&i(O.current,ye)},nodeRef:O,timeout:T==="auto"?null:T},k,{children:(ye,xe)=>Kt(bXe,Fe({as:l,className:ln(Z.root,a,{entered:Z.entered,exited:!p&&j==="0px"&&Z.hidden}[ye]),style:Fe({[$?"minWidth":"minHeight"]:j},E),ownerState:Fe({},X,{state:ye}),ref:F},xe,{children:Kt(wXe,{ownerState:Fe({},X,{state:ye}),className:Z.wrapper,ref:H,children:Kt(CXe,{ownerState:Fe({},X,{state:ye}),className:Z.wrapperInner,children:o})})}))}))});doe.muiSupportAuto=!0;var EXe=doe;function SXe(t){return Kn("MuiPaper",t)}ei("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const TXe=["className","component","elevation","square","variant"],PXe=t=>{const{square:e,elevation:r,variant:n,classes:i}=t,o={root:["root",n,!e&&"rounded",n==="elevation"&&`elevation${r}`]};return Qn(o,SXe,i)},IXe=Nr("div",{name:"MuiPaper",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,e[r.variant],!r.square&&e.rounded,r.variant==="elevation"&&e[`elevation${r.elevation}`]]}})(({theme:t,ownerState:e})=>{var r;return Fe({backgroundColor:(t.vars||t).palette.background.paper,color:(t.vars||t).palette.text.primary,transition:t.transitions.create("box-shadow")},!e.square&&{borderRadius:t.shape.borderRadius},e.variant==="outlined"&&{border:`1px solid ${(t.vars||t).palette.divider}`},e.variant==="elevation"&&Fe({boxShadow:(t.vars||t).shadows[e.elevation]},!t.vars&&t.palette.mode==="dark"&&{backgroundImage:`linear-gradient(${co("#fff",Lie(e.elevation))}, ${co("#fff",Lie(e.elevation))})`},t.vars&&{backgroundImage:(r=t.vars.overlays)==null?void 0:r[e.elevation]}))}),MXe=Y.exports.forwardRef(function(e,r){const n=ti({props:e,name:"MuiPaper"}),{className:i,component:o="div",elevation:a=1,square:s=!1,variant:l="elevation"}=n,u=bn(n,TXe),p=Fe({},n,{component:o,elevation:a,square:s,variant:l}),m=PXe(p);return Kt(IXe,Fe({as:o,ownerState:p,className:ln(m.root,i),ref:r},u))});var cb=MXe;const AXe=Y.exports.createContext({});var hoe=AXe;function RXe(t){return Kn("MuiAccordion",t)}const kXe=ei("MuiAccordion",["root","rounded","expanded","disabled","gutters","region"]);var C3=kXe;const OXe=["children","className","defaultExpanded","disabled","disableGutters","expanded","onChange","square","TransitionComponent","TransitionProps"],LXe=t=>{const{classes:e,square:r,expanded:n,disabled:i,disableGutters:o}=t;return Qn({root:["root",!r&&"rounded",n&&"expanded",i&&"disabled",!o&&"gutters"],region:["region"]},RXe,e)},DXe=Nr(cb,{name:"MuiAccordion",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[{[`& .${C3.region}`]:e.region},e.root,!r.square&&e.rounded,!r.disableGutters&&e.gutters]}})(({theme:t})=>{const e={duration:t.transitions.duration.shortest};return{position:"relative",transition:t.transitions.create(["margin"],e),overflowAnchor:"none","&:before":{position:"absolute",left:0,top:-1,right:0,height:1,content:'""',opacity:1,backgroundColor:(t.vars||t).palette.divider,transition:t.transitions.create(["opacity","background-color"],e)},"&:first-of-type":{"&:before":{display:"none"}},[`&.${C3.expanded}`]:{"&:before":{opacity:0},"&:first-of-type":{marginTop:0},"&:last-of-type":{marginBottom:0},"& + &":{"&:before":{display:"none"}}},[`&.${C3.disabled}`]:{backgroundColor:(t.vars||t).palette.action.disabledBackground}}},({theme:t,ownerState:e})=>Fe({},!e.square&&{borderRadius:0,"&:first-of-type":{borderTopLeftRadius:(t.vars||t).shape.borderRadius,borderTopRightRadius:(t.vars||t).shape.borderRadius},"&:last-of-type":{borderBottomLeftRadius:(t.vars||t).shape.borderRadius,borderBottomRightRadius:(t.vars||t).shape.borderRadius,"@supports (-ms-ime-align: auto)":{borderBottomLeftRadius:0,borderBottomRightRadius:0}}},!e.disableGutters&&{[`&.${C3.expanded}`]:{margin:"16px 0"}})),NXe=Y.exports.forwardRef(function(e,r){const n=ti({props:e,name:"MuiAccordion"}),{children:i,className:o,defaultExpanded:a=!1,disabled:s=!1,disableGutters:l=!1,expanded:u,onChange:p,square:m=!1,TransitionComponent:v=EXe,TransitionProps:x}=n,y=bn(n,OXe),[_,w]=Rm({controlled:u,default:a,name:"Accordion",state:"expanded"}),C=Y.exports.useCallback(Z=>{w(!_),p&&p(Z,!_)},[_,p,w]),[E,...T]=Y.exports.Children.toArray(i),A=Y.exports.useMemo(()=>({expanded:_,disabled:s,disableGutters:l,toggle:C}),[_,s,l,C]),k=Fe({},n,{square:m,disabled:s,disableGutters:l,expanded:_}),X=LXe(k);return Ji(DXe,Fe({className:ln(X.root,o),ref:r,ownerState:k,square:m},y,{children:[Kt(hoe.Provider,{value:A,children:E}),Kt(v,Fe({in:_,timeout:"auto"},x,{children:Kt("div",{"aria-labelledby":E.props.id,id:E.props["aria-controls"],role:"region",className:X.region,children:T})}))]}))});var IRt=NXe;function $Xe(t){return Kn("MuiAccordionDetails",t)}ei("MuiAccordionDetails",["root"]);const FXe=["className"],zXe=t=>{const{classes:e}=t;return Qn({root:["root"]},$Xe,e)},BXe=Nr("div",{name:"MuiAccordionDetails",slot:"Root",overridesResolver:(t,e)=>e.root})(({theme:t})=>({padding:t.spacing(1,2,2)})),jXe=Y.exports.forwardRef(function(e,r){const n=ti({props:e,name:"MuiAccordionDetails"}),{className:i}=n,o=bn(n,FXe),a=n,s=zXe(a);return Kt(BXe,Fe({className:ln(s.root,i),ref:r,ownerState:a},o))});var MRt=jXe;function UXe(t){const{className:e,classes:r,pulsate:n=!1,rippleX:i,rippleY:o,rippleSize:a,in:s,onExited:l,timeout:u}=t,[p,m]=Y.exports.useState(!1),v=ln(e,r.ripple,r.rippleVisible,n&&r.ripplePulsate),x={width:a,height:a,top:-(a/2)+o,left:-(a/2)+i},y=ln(r.child,p&&r.childLeaving,n&&r.childPulsate);return!s&&!p&&m(!0),Y.exports.useEffect(()=>{if(!s&&l!=null){const _=setTimeout(l,u);return()=>{clearTimeout(_)}}},[l,s,u]),Kt("span",{className:v,style:x,children:Kt("span",{className:y})})}const VXe=ei("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]);var lp=VXe;const HXe=["center","classes","className"];let E3=t=>t,poe,moe,goe,voe;const zj=550,WXe=80,GXe=qg(poe||(poe=E3` 0% { transform: scale(0); opacity: 0.1; } 100% { transform: scale(1); opacity: 0.3; } `)),qXe=qg(moe||(moe=E3` 0% { opacity: 1; } 100% { opacity: 0; } `)),XXe=qg(goe||(goe=E3` 0% { transform: scale(1); } 50% { transform: scale(0.92); } 100% { transform: scale(1); } `)),YXe=Nr("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),KXe=Nr(UXe,{name:"MuiTouchRipple",slot:"Ripple"})(voe||(voe=E3` opacity: 0; position: absolute; &.${0} { opacity: 0.3; transform: scale(1); animation-name: ${0}; animation-duration: ${0}ms; animation-timing-function: ${0}; } &.${0} { animation-duration: ${0}ms; } & .${0} { opacity: 1; display: block; width: 100%; height: 100%; border-radius: 50%; background-color: currentColor; } & .${0} { opacity: 0; animation-name: ${0}; animation-duration: ${0}ms; animation-timing-function: ${0}; } & .${0} { position: absolute; /* @noflip */ left: 0px; top: 0; animation-name: ${0}; animation-duration: 2500ms; animation-timing-function: ${0}; animation-iteration-count: infinite; animation-delay: 200ms; } `),lp.rippleVisible,GXe,zj,({theme:t})=>t.transitions.easing.easeInOut,lp.ripplePulsate,({theme:t})=>t.transitions.duration.shorter,lp.child,lp.childLeaving,qXe,zj,({theme:t})=>t.transitions.easing.easeInOut,lp.childPulsate,XXe,({theme:t})=>t.transitions.easing.easeInOut),ZXe=Y.exports.forwardRef(function(e,r){const n=ti({props:e,name:"MuiTouchRipple"}),{center:i=!1,classes:o={},className:a}=n,s=bn(n,HXe),[l,u]=Y.exports.useState([]),p=Y.exports.useRef(0),m=Y.exports.useRef(null);Y.exports.useEffect(()=>{m.current&&(m.current(),m.current=null)},[l]);const v=Y.exports.useRef(!1),x=Y.exports.useRef(null),y=Y.exports.useRef(null),_=Y.exports.useRef(null);Y.exports.useEffect(()=>()=>{clearTimeout(x.current)},[]);const w=Y.exports.useCallback(A=>{const{pulsate:k,rippleX:X,rippleY:Z,rippleSize:W,cb:D}=A;u(H=>[...H,Kt(KXe,{classes:{ripple:ln(o.ripple,lp.ripple),rippleVisible:ln(o.rippleVisible,lp.rippleVisible),ripplePulsate:ln(o.ripplePulsate,lp.ripplePulsate),child:ln(o.child,lp.child),childLeaving:ln(o.childLeaving,lp.childLeaving),childPulsate:ln(o.childPulsate,lp.childPulsate)},timeout:zj,pulsate:k,rippleX:X,rippleY:Z,rippleSize:W},p.current)]),p.current+=1,m.current=D},[o]),C=Y.exports.useCallback((A={},k={},X=()=>{})=>{const{pulsate:Z=!1,center:W=i||k.pulsate,fakeElement:D=!1}=k;if((A==null?void 0:A.type)==="mousedown"&&v.current){v.current=!1;return}(A==null?void 0:A.type)==="touchstart"&&(v.current=!0);const H=D?null:_.current,N=H?H.getBoundingClientRect():{width:0,height:0,left:0,top:0};let j,$,z;if(W||A===void 0||A.clientX===0&&A.clientY===0||!A.clientX&&!A.touches)j=Math.round(N.width/2),$=Math.round(N.height/2);else{const{clientX:O,clientY:F}=A.touches&&A.touches.length>0?A.touches[0]:A;j=Math.round(O-N.left),$=Math.round(F-N.top)}if(W)z=Math.sqrt((2*N.width**2+N.height**2)/3),z%2==0&&(z+=1);else{const O=Math.max(Math.abs((H?H.clientWidth:0)-j),j)*2+2,F=Math.max(Math.abs((H?H.clientHeight:0)-$),$)*2+2;z=Math.sqrt(O**2+F**2)}A!=null&&A.touches?y.current===null&&(y.current=()=>{w({pulsate:Z,rippleX:j,rippleY:$,rippleSize:z,cb:X})},x.current=setTimeout(()=>{y.current&&(y.current(),y.current=null)},WXe)):w({pulsate:Z,rippleX:j,rippleY:$,rippleSize:z,cb:X})},[i,w]),E=Y.exports.useCallback(()=>{C({},{pulsate:!0})},[C]),T=Y.exports.useCallback((A,k)=>{if(clearTimeout(x.current),(A==null?void 0:A.type)==="touchend"&&y.current){y.current(),y.current=null,x.current=setTimeout(()=>{T(A,k)});return}y.current=null,u(X=>X.length>0?X.slice(1):X),m.current=k},[]);return Y.exports.useImperativeHandle(r,()=>({pulsate:E,start:C,stop:T}),[E,C,T]),Kt(YXe,Fe({className:ln(lp.root,o.root,a),ref:_},s,{children:Kt(vXe,{component:null,exit:!0,children:l})}))});var QXe=ZXe;function JXe(t){return Kn("MuiButtonBase",t)}const eYe=ei("MuiButtonBase",["root","disabled","focusVisible"]);var tYe=eYe;const rYe=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],nYe=t=>{const{disabled:e,focusVisible:r,focusVisibleClassName:n,classes:i}=t,a=Qn({root:["root",e&&"disabled",r&&"focusVisible"]},JXe,i);return r&&n&&(a.root+=` ${n}`),a},iYe=Nr("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(t,e)=>e.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${tYe.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),oYe=Y.exports.forwardRef(function(e,r){const n=ti({props:e,name:"MuiButtonBase"}),{action:i,centerRipple:o=!1,children:a,className:s,component:l="button",disabled:u=!1,disableRipple:p=!1,disableTouchRipple:m=!1,focusRipple:v=!1,LinkComponent:x="a",onBlur:y,onClick:_,onContextMenu:w,onDragLeave:C,onFocus:E,onFocusVisible:T,onKeyDown:A,onKeyUp:k,onMouseDown:X,onMouseLeave:Z,onMouseUp:W,onTouchEnd:D,onTouchMove:H,onTouchStart:N,tabIndex:j=0,TouchRippleProps:$,touchRippleRef:z,type:O}=n,F=bn(n,rYe),G=Y.exports.useRef(null),q=Y.exports.useRef(null),ee=ta(q,z),{isFocusVisibleRef:re,onFocus:ce,onBlur:fe,ref:J}=vI(),[oe,ve]=Y.exports.useState(!1);u&&oe&&ve(!1),Y.exports.useImperativeHandle(i,()=>({focusVisible:()=>{ve(!0),G.current.focus()}}),[]);const[ye,xe]=Y.exports.useState(!1);Y.exports.useEffect(()=>{xe(!0)},[]);const se=ye&&!p&&!u;Y.exports.useEffect(()=>{oe&&v&&!p&&ye&&q.current.pulsate()},[p,v,oe,ye]);function me(Je,St,er=m){return bc(Ft=>(St&&St(Ft),!er&&q.current&&q.current[Je](Ft),!0))}const pe=me("start",X),Ce=me("stop",w),Pe=me("stop",C),Re=me("stop",W),ke=me("stop",Je=>{oe&&Je.preventDefault(),Z&&Z(Je)}),ze=me("start",N),Ge=me("stop",D),ht=me("stop",H),Tt=me("stop",Je=>{fe(Je),re.current===!1&&ve(!1),y&&y(Je)},!1),xt=bc(Je=>{G.current||(G.current=Je.currentTarget),ce(Je),re.current===!0&&(ve(!0),T&&T(Je)),E&&E(Je)}),pt=()=>{const Je=G.current;return l&&l!=="button"&&!(Je.tagName==="A"&&Je.href)},It=Y.exports.useRef(!1),Ie=bc(Je=>{v&&!It.current&&oe&&q.current&&Je.key===" "&&(It.current=!0,q.current.stop(Je,()=>{q.current.start(Je)})),Je.target===Je.currentTarget&&pt()&&Je.key===" "&&Je.preventDefault(),A&&A(Je),Je.target===Je.currentTarget&&pt()&&Je.key==="Enter"&&!u&&(Je.preventDefault(),_&&_(Je))}),de=bc(Je=>{v&&Je.key===" "&&q.current&&oe&&!Je.defaultPrevented&&(It.current=!1,q.current.stop(Je,()=>{q.current.pulsate(Je)})),k&&k(Je),_&&Je.target===Je.currentTarget&&pt()&&Je.key===" "&&!Je.defaultPrevented&&_(Je)});let Te=l;Te==="button"&&(F.href||F.to)&&(Te=x);const Be={};Te==="button"?(Be.type=O===void 0?"button":O,Be.disabled=u):(!F.href&&!F.to&&(Be.role="button"),u&&(Be["aria-disabled"]=u));const Ke=ta(r,J,G),ot=Fe({},n,{centerRipple:o,component:l,disabled:u,disableRipple:p,disableTouchRipple:m,focusRipple:v,tabIndex:j,focusVisible:oe}),Ze=nYe(ot);return Ji(iYe,Fe({as:Te,className:ln(Ze.root,s),ownerState:ot,onBlur:Tt,onClick:_,onContextMenu:Ce,onFocus:xt,onKeyDown:Ie,onKeyUp:de,onMouseDown:pe,onMouseLeave:ke,onMouseUp:Re,onDragLeave:Pe,onTouchEnd:Ge,onTouchMove:ht,onTouchStart:ze,ref:Ke,tabIndex:u?-1:j,type:O},Be,F,{children:[a,se?Kt(QXe,Fe({ref:ee,center:o},$)):null]}))});var Zg=oYe;function sYe(t){return Kn("MuiAccordionSummary",t)}const aYe=ei("MuiAccordionSummary",["root","expanded","focusVisible","disabled","gutters","contentGutters","content","expandIconWrapper"]);var qC=aYe;const lYe=["children","className","expandIcon","focusVisibleClassName","onClick"],cYe=t=>{const{classes:e,expanded:r,disabled:n,disableGutters:i}=t;return Qn({root:["root",r&&"expanded",n&&"disabled",!i&&"gutters"],focusVisible:["focusVisible"],content:["content",r&&"expanded",!i&&"contentGutters"],expandIconWrapper:["expandIconWrapper",r&&"expanded"]},sYe,e)},uYe=Nr(Zg,{name:"MuiAccordionSummary",slot:"Root",overridesResolver:(t,e)=>e.root})(({theme:t,ownerState:e})=>{const r={duration:t.transitions.duration.shortest};return Fe({display:"flex",minHeight:48,padding:t.spacing(0,2),transition:t.transitions.create(["min-height","background-color"],r),[`&.${qC.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`&.${qC.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity},[`&:hover:not(.${qC.disabled})`]:{cursor:"pointer"}},!e.disableGutters&&{[`&.${qC.expanded}`]:{minHeight:64}})}),fYe=Nr("div",{name:"MuiAccordionSummary",slot:"Content",overridesResolver:(t,e)=>e.content})(({theme:t,ownerState:e})=>Fe({display:"flex",flexGrow:1,margin:"12px 0"},!e.disableGutters&&{transition:t.transitions.create(["margin"],{duration:t.transitions.duration.shortest}),[`&.${qC.expanded}`]:{margin:"20px 0"}})),dYe=Nr("div",{name:"MuiAccordionSummary",slot:"ExpandIconWrapper",overridesResolver:(t,e)=>e.expandIconWrapper})(({theme:t})=>({display:"flex",color:(t.vars||t).palette.action.active,transform:"rotate(0deg)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shortest}),[`&.${qC.expanded}`]:{transform:"rotate(180deg)"}})),hYe=Y.exports.forwardRef(function(e,r){const n=ti({props:e,name:"MuiAccordionSummary"}),{children:i,className:o,expandIcon:a,focusVisibleClassName:s,onClick:l}=n,u=bn(n,lYe),{disabled:p=!1,disableGutters:m,expanded:v,toggle:x}=Y.exports.useContext(hoe),y=C=>{x&&x(C),l&&l(C)},_=Fe({},n,{expanded:v,disabled:p,disableGutters:m}),w=cYe(_);return Ji(uYe,Fe({focusRipple:!1,disableRipple:!0,disabled:p,component:"div","aria-expanded":v,className:ln(w.root,o),focusVisibleClassName:ln(w.focusVisible,s),onClick:y,ref:r,ownerState:_},u,{children:[Kt(fYe,{className:w.content,ownerState:_,children:i}),a&&Kt(dYe,{className:w.expandIconWrapper,ownerState:_,children:a})]}))});var ARt=hYe;function pYe(t){return Kn("MuiIconButton",t)}const mYe=ei("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]);var gYe=mYe;const vYe=["edge","children","className","color","disabled","disableFocusRipple","size"],yYe=t=>{const{classes:e,disabled:r,color:n,edge:i,size:o}=t,a={root:["root",r&&"disabled",n!=="default"&&`color${Pr(n)}`,i&&`edge${Pr(i)}`,`size${Pr(o)}`]};return Qn(a,pYe,e)},xYe=Nr(Zg,{name:"MuiIconButton",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,r.color!=="default"&&e[`color${Pr(r.color)}`],r.edge&&e[`edge${Pr(r.edge)}`],e[`size${Pr(r.size)}`]]}})(({theme:t,ownerState:e})=>Fe({textAlign:"center",flex:"0 0 auto",fontSize:t.typography.pxToRem(24),padding:8,borderRadius:"50%",overflow:"visible",color:(t.vars||t).palette.action.active,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest})},!e.disableRipple&&{"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.action.activeChannel} / ${t.vars.palette.action.hoverOpacity})`:co(t.palette.action.active,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},e.edge==="start"&&{marginLeft:e.size==="small"?-3:-12},e.edge==="end"&&{marginRight:e.size==="small"?-3:-12}),({theme:t,ownerState:e})=>{var r;const n=(r=(t.vars||t).palette)==null?void 0:r[e.color];return Fe({},e.color==="inherit"&&{color:"inherit"},e.color!=="inherit"&&e.color!=="default"&&Fe({color:n==null?void 0:n.main},!e.disableRipple&&{"&:hover":Fe({},n&&{backgroundColor:t.vars?`rgba(${n.mainChannel} / ${t.vars.palette.action.hoverOpacity})`:co(n.main,t.palette.action.hoverOpacity)},{"@media (hover: none)":{backgroundColor:"transparent"}})}),e.size==="small"&&{padding:5,fontSize:t.typography.pxToRem(18)},e.size==="large"&&{padding:12,fontSize:t.typography.pxToRem(28)},{[`&.${gYe.disabled}`]:{backgroundColor:"transparent",color:(t.vars||t).palette.action.disabled}})}),_Ye=Y.exports.forwardRef(function(e,r){const n=ti({props:e,name:"MuiIconButton"}),{edge:i=!1,children:o,className:a,color:s="default",disabled:l=!1,disableFocusRipple:u=!1,size:p="medium"}=n,m=bn(n,vYe),v=Fe({},n,{edge:i,color:s,disabled:l,disableFocusRipple:u,size:p}),x=yYe(v);return Kt(xYe,Fe({className:ln(x.root,a),centerRipple:!0,focusRipple:!u,disabled:l,ref:r,ownerState:v},m,{children:o}))});var yoe=_Ye,bYe=nd(Kt("path",{d:"M19 6.41L17.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"}),"Close");function wYe(t){return Kn("MuiTypography",t)}ei("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const CYe=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],EYe=t=>{const{align:e,gutterBottom:r,noWrap:n,paragraph:i,variant:o,classes:a}=t,s={root:["root",o,t.align!=="inherit"&&`align${Pr(e)}`,r&&"gutterBottom",n&&"noWrap",i&&"paragraph"]};return Qn(s,wYe,a)},SYe=Nr("span",{name:"MuiTypography",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,r.variant&&e[r.variant],r.align!=="inherit"&&e[`align${Pr(r.align)}`],r.noWrap&&e.noWrap,r.gutterBottom&&e.gutterBottom,r.paragraph&&e.paragraph]}})(({theme:t,ownerState:e})=>Fe({margin:0},e.variant&&t.typography[e.variant],e.align!=="inherit"&&{textAlign:e.align},e.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},e.gutterBottom&&{marginBottom:"0.35em"},e.paragraph&&{marginBottom:16})),xoe={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},TYe={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},PYe=t=>TYe[t]||t,IYe=Y.exports.forwardRef(function(e,r){const n=ti({props:e,name:"MuiTypography"}),i=PYe(n.color),o=SI(Fe({},n,{color:i})),{align:a="inherit",className:s,component:l,gutterBottom:u=!1,noWrap:p=!1,paragraph:m=!1,variant:v="body1",variantMapping:x=xoe}=o,y=bn(o,CYe),_=Fe({},o,{align:a,color:i,className:s,component:l,gutterBottom:u,noWrap:p,paragraph:m,variant:v,variantMapping:x}),w=l||(m?"p":x[v]||xoe[v])||"span",C=EYe(_);return Kt(SYe,Fe({as:w,ref:r,ownerState:_,className:ln(C.root,s)},y))});var $x=IYe;function MYe(t){return Kn("MuiAppBar",t)}ei("MuiAppBar",["root","positionFixed","positionAbsolute","positionSticky","positionStatic","positionRelative","colorDefault","colorPrimary","colorSecondary","colorInherit","colorTransparent"]);const AYe=["className","color","enableColorOnDark","position"],RYe=t=>{const{color:e,position:r,classes:n}=t,i={root:["root",`color${Pr(e)}`,`position${Pr(r)}`]};return Qn(i,MYe,n)},S3=(t,e)=>t?`${t==null?void 0:t.replace(")","")}, ${e})`:e,kYe=Nr(cb,{name:"MuiAppBar",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,e[`position${Pr(r.position)}`],e[`color${Pr(r.color)}`]]}})(({theme:t,ownerState:e})=>{const r=t.palette.mode==="light"?t.palette.grey[100]:t.palette.grey[900];return Fe({display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box",flexShrink:0},e.position==="fixed"&&{position:"fixed",zIndex:(t.vars||t).zIndex.appBar,top:0,left:"auto",right:0,"@media print":{position:"absolute"}},e.position==="absolute"&&{position:"absolute",zIndex:(t.vars||t).zIndex.appBar,top:0,left:"auto",right:0},e.position==="sticky"&&{position:"sticky",zIndex:(t.vars||t).zIndex.appBar,top:0,left:"auto",right:0},e.position==="static"&&{position:"static"},e.position==="relative"&&{position:"relative"},!t.vars&&Fe({},e.color==="default"&&{backgroundColor:r,color:t.palette.getContrastText(r)},e.color&&e.color!=="default"&&e.color!=="inherit"&&e.color!=="transparent"&&{backgroundColor:t.palette[e.color].main,color:t.palette[e.color].contrastText},e.color==="inherit"&&{color:"inherit"},t.palette.mode==="dark"&&!e.enableColorOnDark&&{backgroundColor:null,color:null},e.color==="transparent"&&Fe({backgroundColor:"transparent",color:"inherit"},t.palette.mode==="dark"&&{backgroundImage:"none"})),t.vars&&Fe({},e.color==="default"&&{"--AppBar-background":e.enableColorOnDark?t.vars.palette.AppBar.defaultBg:S3(t.vars.palette.AppBar.darkBg,t.vars.palette.AppBar.defaultBg),"--AppBar-color":e.enableColorOnDark?t.vars.palette.text.primary:S3(t.vars.palette.AppBar.darkColor,t.vars.palette.text.primary)},e.color&&!e.color.match(/^(default|inherit|transparent)$/)&&{"--AppBar-background":e.enableColorOnDark?t.vars.palette[e.color].main:S3(t.vars.palette.AppBar.darkBg,t.vars.palette[e.color].main),"--AppBar-color":e.enableColorOnDark?t.vars.palette[e.color].contrastText:S3(t.vars.palette.AppBar.darkColor,t.vars.palette[e.color].contrastText)},{backgroundColor:"var(--AppBar-background)",color:e.color==="inherit"?"inherit":"var(--AppBar-color)"},e.color==="transparent"&&{backgroundImage:"none",backgroundColor:"transparent",color:"inherit"}))}),OYe=Y.exports.forwardRef(function(e,r){const n=ti({props:e,name:"MuiAppBar"}),{className:i,color:o="primary",enableColorOnDark:a=!1,position:s="fixed"}=n,l=bn(n,AYe),u=Fe({},n,{color:o,position:s,enableColorOnDark:a}),p=RYe(u);return Kt(kYe,Fe({square:!0,component:"header",ownerState:u,elevation:4,className:ln(p.root,i,s==="fixed"&&"mui-fixed"),ref:r},l))});var RRt=OYe;const LYe=["components","componentsProps","slots","slotProps"],DYe=Nr(Aqe,{name:"MuiPopper",slot:"Root",overridesResolver:(t,e)=>e.root})({}),NYe=Y.exports.forwardRef(function(e,r){var n;const i=gj(),o=ti({props:e,name:"MuiPopper"}),{components:a,componentsProps:s,slots:l,slotProps:u}=o,p=bn(o,LYe),m=(n=l==null?void 0:l.root)!=null?n:a==null?void 0:a.Root;return Kt(DYe,Fe({direction:i==null?void 0:i.direction,slots:{root:m},slotProps:u!=null?u:s},p,{ref:r}))});var T3=NYe;function $Ye(t){return Kn("MuiListSubheader",t)}ei("MuiListSubheader",["root","colorPrimary","colorInherit","gutters","inset","sticky"]);const FYe=["className","color","component","disableGutters","disableSticky","inset"],zYe=t=>{const{classes:e,color:r,disableGutters:n,inset:i,disableSticky:o}=t,a={root:["root",r!=="default"&&`color${Pr(r)}`,!n&&"gutters",i&&"inset",!o&&"sticky"]};return Qn(a,$Ye,e)},BYe=Nr("li",{name:"MuiListSubheader",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,r.color!=="default"&&e[`color${Pr(r.color)}`],!r.disableGutters&&e.gutters,r.inset&&e.inset,!r.disableSticky&&e.sticky]}})(({theme:t,ownerState:e})=>Fe({boxSizing:"border-box",lineHeight:"48px",listStyle:"none",color:(t.vars||t).palette.text.secondary,fontFamily:t.typography.fontFamily,fontWeight:t.typography.fontWeightMedium,fontSize:t.typography.pxToRem(14)},e.color==="primary"&&{color:(t.vars||t).palette.primary.main},e.color==="inherit"&&{color:"inherit"},!e.disableGutters&&{paddingLeft:16,paddingRight:16},e.inset&&{paddingLeft:72},!e.disableSticky&&{position:"sticky",top:0,zIndex:1,backgroundColor:(t.vars||t).palette.background.paper})),_oe=Y.exports.forwardRef(function(e,r){const n=ti({props:e,name:"MuiListSubheader"}),{className:i,color:o="default",component:a="li",disableGutters:s=!1,disableSticky:l=!1,inset:u=!1}=n,p=bn(n,FYe),m=Fe({},n,{color:o,component:a,disableGutters:s,disableSticky:l,inset:u}),v=zYe(m);return Kt(BYe,Fe({as:a,className:ln(v.root,i),ref:r,ownerState:m},p))});_oe.muiSkipListHighlight=!0;var jYe=_oe,UYe=nd(Kt("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"}),"Cancel");function VYe(t){return Kn("MuiChip",t)}const HYe=ei("MuiChip",["root","sizeSmall","sizeMedium","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","disabled","clickable","clickableColorPrimary","clickableColorSecondary","deletable","deletableColorPrimary","deletableColorSecondary","outlined","filled","outlinedPrimary","outlinedSecondary","filledPrimary","filledSecondary","avatar","avatarSmall","avatarMedium","avatarColorPrimary","avatarColorSecondary","icon","iconSmall","iconMedium","iconColorPrimary","iconColorSecondary","label","labelSmall","labelMedium","deleteIcon","deleteIconSmall","deleteIconMedium","deleteIconColorPrimary","deleteIconColorSecondary","deleteIconOutlinedColorPrimary","deleteIconOutlinedColorSecondary","deleteIconFilledColorPrimary","deleteIconFilledColorSecondary","focusVisible"]);var as=HYe;const WYe=["avatar","className","clickable","color","component","deleteIcon","disabled","icon","label","onClick","onDelete","onKeyDown","onKeyUp","size","variant","tabIndex","skipFocusWhenDisabled"],GYe=t=>{const{classes:e,disabled:r,size:n,color:i,iconColor:o,onDelete:a,clickable:s,variant:l}=t,u={root:["root",l,r&&"disabled",`size${Pr(n)}`,`color${Pr(i)}`,s&&"clickable",s&&`clickableColor${Pr(i)}`,a&&"deletable",a&&`deletableColor${Pr(i)}`,`${l}${Pr(i)}`],label:["label",`label${Pr(n)}`],avatar:["avatar",`avatar${Pr(n)}`,`avatarColor${Pr(i)}`],icon:["icon",`icon${Pr(n)}`,`iconColor${Pr(o)}`],deleteIcon:["deleteIcon",`deleteIcon${Pr(n)}`,`deleteIconColor${Pr(i)}`,`deleteIcon${Pr(l)}Color${Pr(i)}`]};return Qn(u,VYe,e)},qYe=Nr("div",{name:"MuiChip",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t,{color:n,iconColor:i,clickable:o,onDelete:a,size:s,variant:l}=r;return[{[`& .${as.avatar}`]:e.avatar},{[`& .${as.avatar}`]:e[`avatar${Pr(s)}`]},{[`& .${as.avatar}`]:e[`avatarColor${Pr(n)}`]},{[`& .${as.icon}`]:e.icon},{[`& .${as.icon}`]:e[`icon${Pr(s)}`]},{[`& .${as.icon}`]:e[`iconColor${Pr(i)}`]},{[`& .${as.deleteIcon}`]:e.deleteIcon},{[`& .${as.deleteIcon}`]:e[`deleteIcon${Pr(s)}`]},{[`& .${as.deleteIcon}`]:e[`deleteIconColor${Pr(n)}`]},{[`& .${as.deleteIcon}`]:e[`deleteIcon${Pr(l)}Color${Pr(n)}`]},e.root,e[`size${Pr(s)}`],e[`color${Pr(n)}`],o&&e.clickable,o&&n!=="default"&&e[`clickableColor${Pr(n)})`],a&&e.deletable,a&&n!=="default"&&e[`deletableColor${Pr(n)}`],e[l],e[`${l}${Pr(n)}`]]}})(({theme:t,ownerState:e})=>{const r=co(t.palette.text.primary,.26),n=t.palette.mode==="light"?t.palette.grey[700]:t.palette.grey[300];return Fe({maxWidth:"100%",fontFamily:t.typography.fontFamily,fontSize:t.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,color:(t.vars||t).palette.text.primary,backgroundColor:(t.vars||t).palette.action.selected,borderRadius:32/2,whiteSpace:"nowrap",transition:t.transitions.create(["background-color","box-shadow"]),cursor:"default",outline:0,textDecoration:"none",border:0,padding:0,verticalAlign:"middle",boxSizing:"border-box",[`&.${as.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity,pointerEvents:"none"},[`& .${as.avatar}`]:{marginLeft:5,marginRight:-6,width:24,height:24,color:t.vars?t.vars.palette.Chip.defaultAvatarColor:n,fontSize:t.typography.pxToRem(12)},[`& .${as.avatarColorPrimary}`]:{color:(t.vars||t).palette.primary.contrastText,backgroundColor:(t.vars||t).palette.primary.dark},[`& .${as.avatarColorSecondary}`]:{color:(t.vars||t).palette.secondary.contrastText,backgroundColor:(t.vars||t).palette.secondary.dark},[`& .${as.avatarSmall}`]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:t.typography.pxToRem(10)},[`& .${as.icon}`]:Fe({marginLeft:5,marginRight:-6},e.size==="small"&&{fontSize:18,marginLeft:4,marginRight:-4},e.iconColor===e.color&&Fe({color:t.vars?t.vars.palette.Chip.defaultIconColor:n},e.color!=="default"&&{color:"inherit"})),[`& .${as.deleteIcon}`]:Fe({WebkitTapHighlightColor:"transparent",color:t.vars?`rgba(${t.vars.palette.text.primaryChannel} / 0.26)`:r,fontSize:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:t.vars?`rgba(${t.vars.palette.text.primaryChannel} / 0.4)`:co(r,.4)}},e.size==="small"&&{fontSize:16,marginRight:4,marginLeft:-4},e.color!=="default"&&{color:t.vars?`rgba(${t.vars.palette[e.color].contrastTextChannel} / 0.7)`:co(t.palette[e.color].contrastText,.7),"&:hover, &:active":{color:(t.vars||t).palette[e.color].contrastText}})},e.size==="small"&&{height:24},e.color!=="default"&&{backgroundColor:(t.vars||t).palette[e.color].main,color:(t.vars||t).palette[e.color].contrastText},e.onDelete&&{[`&.${as.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.action.selectedChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:co(t.palette.action.selected,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},e.onDelete&&e.color!=="default"&&{[`&.${as.focusVisible}`]:{backgroundColor:(t.vars||t).palette[e.color].dark}})},({theme:t,ownerState:e})=>Fe({},e.clickable&&{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.action.selectedChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:co(t.palette.action.selected,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity)},[`&.${as.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.action.selectedChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:co(t.palette.action.selected,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)},"&:active":{boxShadow:(t.vars||t).shadows[1]}},e.clickable&&e.color!=="default"&&{[`&:hover, &.${as.focusVisible}`]:{backgroundColor:(t.vars||t).palette[e.color].dark}}),({theme:t,ownerState:e})=>Fe({},e.variant==="outlined"&&{backgroundColor:"transparent",border:t.vars?`1px solid ${t.vars.palette.Chip.defaultBorder}`:`1px solid ${t.palette.mode==="light"?t.palette.grey[400]:t.palette.grey[700]}`,[`&.${as.clickable}:hover`]:{backgroundColor:(t.vars||t).palette.action.hover},[`&.${as.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`& .${as.avatar}`]:{marginLeft:4},[`& .${as.avatarSmall}`]:{marginLeft:2},[`& .${as.icon}`]:{marginLeft:4},[`& .${as.iconSmall}`]:{marginLeft:2},[`& .${as.deleteIcon}`]:{marginRight:5},[`& .${as.deleteIconSmall}`]:{marginRight:3}},e.variant==="outlined"&&e.color!=="default"&&{color:(t.vars||t).palette[e.color].main,border:`1px solid ${t.vars?`rgba(${t.vars.palette[e.color].mainChannel} / 0.7)`:co(t.palette[e.color].main,.7)}`,[`&.${as.clickable}:hover`]:{backgroundColor:t.vars?`rgba(${t.vars.palette[e.color].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:co(t.palette[e.color].main,t.palette.action.hoverOpacity)},[`&.${as.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette[e.color].mainChannel} / ${t.vars.palette.action.focusOpacity})`:co(t.palette[e.color].main,t.palette.action.focusOpacity)},[`& .${as.deleteIcon}`]:{color:t.vars?`rgba(${t.vars.palette[e.color].mainChannel} / 0.7)`:co(t.palette[e.color].main,.7),"&:hover, &:active":{color:(t.vars||t).palette[e.color].main}}})),XYe=Nr("span",{name:"MuiChip",slot:"Label",overridesResolver:(t,e)=>{const{ownerState:r}=t,{size:n}=r;return[e.label,e[`label${Pr(n)}`]]}})(({ownerState:t})=>Fe({overflow:"hidden",textOverflow:"ellipsis",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap"},t.size==="small"&&{paddingLeft:8,paddingRight:8}));function boe(t){return t.key==="Backspace"||t.key==="Delete"}const YYe=Y.exports.forwardRef(function(e,r){const n=ti({props:e,name:"MuiChip"}),{avatar:i,className:o,clickable:a,color:s="default",component:l,deleteIcon:u,disabled:p=!1,icon:m,label:v,onClick:x,onDelete:y,onKeyDown:_,onKeyUp:w,size:C="medium",variant:E="filled",tabIndex:T,skipFocusWhenDisabled:A=!1}=n,k=bn(n,WYe),X=Y.exports.useRef(null),Z=ta(X,r),W=ee=>{ee.stopPropagation(),y&&y(ee)},D=ee=>{ee.currentTarget===ee.target&&boe(ee)&&ee.preventDefault(),_&&_(ee)},H=ee=>{ee.currentTarget===ee.target&&(y&&boe(ee)?y(ee):ee.key==="Escape"&&X.current&&X.current.blur()),w&&w(ee)},N=a!==!1&&x?!0:a,j=N||y?Zg:l||"div",$=Fe({},n,{component:j,disabled:p,size:C,color:s,iconColor:Y.exports.isValidElement(m)&&m.props.color||s,onDelete:!!y,clickable:N,variant:E}),z=GYe($),O=j===Zg?Fe({component:l||"div",focusVisibleClassName:z.focusVisible},y&&{disableRipple:!0}):{};let F=null;y&&(F=u&&Y.exports.isValidElement(u)?Y.exports.cloneElement(u,{className:ln(u.props.className,z.deleteIcon),onClick:W}):Kt(UYe,{className:ln(z.deleteIcon),onClick:W}));let G=null;i&&Y.exports.isValidElement(i)&&(G=Y.exports.cloneElement(i,{className:ln(z.avatar,i.props.className)}));let q=null;return m&&Y.exports.isValidElement(m)&&(q=Y.exports.cloneElement(m,{className:ln(z.icon,m.props.className)})),Ji(qYe,Fe({as:j,className:ln(z.root,o),disabled:N&&p?!0:void 0,onClick:x,onKeyDown:D,onKeyUp:H,ref:Z,tabIndex:A&&p?-1:T,ownerState:$},O,k,{children:[G||q,Kt(XYe,{className:ln(z.label),ownerState:$,children:v}),F]}))});var KYe=YYe;function Fx({props:t,states:e,muiFormControl:r}){return e.reduce((n,i)=>(n[i]=t[i],r&&typeof t[i]=="undefined"&&(n[i]=r[i]),n),{})}const ZYe=Y.exports.createContext(void 0);var P3=ZYe;function Qg(){return Y.exports.useContext(P3)}function QYe(t){return Kt(DVe,Fe({},t,{defaultTheme:u3}))}function woe(t){return t!=null&&!(Array.isArray(t)&&t.length===0)}function Bj(t,e=!1){return t&&(woe(t.value)&&t.value!==""||e&&woe(t.defaultValue)&&t.defaultValue!=="")}function JYe(t){return t.startAdornment}function eKe(t){return Kn("MuiInputBase",t)}const tKe=ei("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]);var eh=tKe;const rKe=["aria-describedby","autoComplete","autoFocus","className","color","components","componentsProps","defaultValue","disabled","disableInjectingGlobalStyles","endAdornment","error","fullWidth","id","inputComponent","inputProps","inputRef","margin","maxRows","minRows","multiline","name","onBlur","onChange","onClick","onFocus","onKeyDown","onKeyUp","placeholder","readOnly","renderSuffix","rows","size","slotProps","slots","startAdornment","type","value"],I3=(t,e)=>{const{ownerState:r}=t;return[e.root,r.formControl&&e.formControl,r.startAdornment&&e.adornedStart,r.endAdornment&&e.adornedEnd,r.error&&e.error,r.size==="small"&&e.sizeSmall,r.multiline&&e.multiline,r.color&&e[`color${Pr(r.color)}`],r.fullWidth&&e.fullWidth,r.hiddenLabel&&e.hiddenLabel]},M3=(t,e)=>{const{ownerState:r}=t;return[e.input,r.size==="small"&&e.inputSizeSmall,r.multiline&&e.inputMultiline,r.type==="search"&&e.inputTypeSearch,r.startAdornment&&e.inputAdornedStart,r.endAdornment&&e.inputAdornedEnd,r.hiddenLabel&&e.inputHiddenLabel]},nKe=t=>{const{classes:e,color:r,disabled:n,error:i,endAdornment:o,focused:a,formControl:s,fullWidth:l,hiddenLabel:u,multiline:p,readOnly:m,size:v,startAdornment:x,type:y}=t,_={root:["root",`color${Pr(r)}`,n&&"disabled",i&&"error",l&&"fullWidth",a&&"focused",s&&"formControl",v==="small"&&"sizeSmall",p&&"multiline",x&&"adornedStart",o&&"adornedEnd",u&&"hiddenLabel",m&&"readOnly"],input:["input",n&&"disabled",y==="search"&&"inputTypeSearch",p&&"inputMultiline",v==="small"&&"inputSizeSmall",u&&"inputHiddenLabel",x&&"inputAdornedStart",o&&"inputAdornedEnd",m&&"readOnly"]};return Qn(_,eKe,e)},A3=Nr("div",{name:"MuiInputBase",slot:"Root",overridesResolver:I3})(({theme:t,ownerState:e})=>Fe({},t.typography.body1,{color:(t.vars||t).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${eh.disabled}`]:{color:(t.vars||t).palette.text.disabled,cursor:"default"}},e.multiline&&Fe({padding:"4px 0 5px"},e.size==="small"&&{paddingTop:1}),e.fullWidth&&{width:"100%"})),R3=Nr("input",{name:"MuiInputBase",slot:"Input",overridesResolver:M3})(({theme:t,ownerState:e})=>{const r=t.palette.mode==="light",n=Fe({color:"currentColor"},t.vars?{opacity:t.vars.opacity.inputPlaceholder}:{opacity:r?.42:.5},{transition:t.transitions.create("opacity",{duration:t.transitions.duration.shorter})}),i={opacity:"0 !important"},o=t.vars?{opacity:t.vars.opacity.inputPlaceholder}:{opacity:r?.42:.5};return Fe({font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%",animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&::-webkit-input-placeholder":n,"&::-moz-placeholder":n,"&:-ms-input-placeholder":n,"&::-ms-input-placeholder":n,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${eh.formControl} &`]:{"&::-webkit-input-placeholder":i,"&::-moz-placeholder":i,"&:-ms-input-placeholder":i,"&::-ms-input-placeholder":i,"&:focus::-webkit-input-placeholder":o,"&:focus::-moz-placeholder":o,"&:focus:-ms-input-placeholder":o,"&:focus::-ms-input-placeholder":o},[`&.${eh.disabled}`]:{opacity:1,WebkitTextFillColor:(t.vars||t).palette.text.disabled},"&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}},e.size==="small"&&{paddingTop:1},e.multiline&&{height:"auto",resize:"none",padding:0,paddingTop:0},e.type==="search"&&{MozAppearance:"textfield"})}),iKe=Kt(QYe,{styles:{"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}}),oKe=Y.exports.forwardRef(function(e,r){var n;const i=ti({props:e,name:"MuiInputBase"}),{"aria-describedby":o,autoComplete:a,autoFocus:s,className:l,components:u={},componentsProps:p={},defaultValue:m,disabled:v,disableInjectingGlobalStyles:x,endAdornment:y,fullWidth:_=!1,id:w,inputComponent:C="input",inputProps:E={},inputRef:T,maxRows:A,minRows:k,multiline:X=!1,name:Z,onBlur:W,onChange:D,onClick:H,onFocus:N,onKeyDown:j,onKeyUp:$,placeholder:z,readOnly:O,renderSuffix:F,rows:G,slotProps:q={},slots:ee={},startAdornment:re,type:ce="text",value:fe}=i,J=bn(i,rKe),oe=E.value!=null?E.value:fe,{current:ve}=Y.exports.useRef(oe!=null),ye=Y.exports.useRef(),xe=Y.exports.useCallback(Ze=>{},[]),se=ta(ye,T,E.ref,xe),[me,pe]=Y.exports.useState(!1),Ce=Qg(),Pe=Fx({props:i,muiFormControl:Ce,states:["color","disabled","error","hiddenLabel","size","required","filled"]});Pe.focused=Ce?Ce.focused:me,Y.exports.useEffect(()=>{!Ce&&v&&me&&(pe(!1),W&&W())},[Ce,v,me,W]);const Re=Ce&&Ce.onFilled,ke=Ce&&Ce.onEmpty,ze=Y.exports.useCallback(Ze=>{Bj(Ze)?Re&&Re():ke&&ke()},[Re,ke]);np(()=>{ve&&ze({value:oe})},[oe,ze,ve]);const Ge=Ze=>{if(Pe.disabled){Ze.stopPropagation();return}N&&N(Ze),E.onFocus&&E.onFocus(Ze),Ce&&Ce.onFocus?Ce.onFocus(Ze):pe(!0)},ht=Ze=>{W&&W(Ze),E.onBlur&&E.onBlur(Ze),Ce&&Ce.onBlur?Ce.onBlur(Ze):pe(!1)},Tt=(Ze,...Je)=>{if(!ve){const St=Ze.target||ye.current;if(St==null)throw new Error(kx(1));ze({value:St.value})}E.onChange&&E.onChange(Ze,...Je),D&&D(Ze,...Je)};Y.exports.useEffect(()=>{ze(ye.current)},[]);const xt=Ze=>{ye.current&&Ze.currentTarget===Ze.target&&ye.current.focus(),H&&H(Ze)};let pt=C,It=E;X&&pt==="input"&&(G?It=Fe({type:void 0,minRows:G,maxRows:G},It):It=Fe({type:void 0,maxRows:A,minRows:k},It),pt=eXe);const Ie=Ze=>{ze(Ze.animationName==="mui-auto-fill-cancel"?ye.current:{value:"x"})};Y.exports.useEffect(()=>{Ce&&Ce.setAdornedStart(Boolean(re))},[Ce,re]);const de=Fe({},i,{color:Pe.color||"primary",disabled:Pe.disabled,endAdornment:y,error:Pe.error,focused:Pe.focused,formControl:Ce,fullWidth:_,hiddenLabel:Pe.hiddenLabel,multiline:X,size:Pe.size,startAdornment:re,type:ce}),Te=nKe(de),Be=ee.root||u.Root||A3,Ke=q.root||p.root||{},ot=ee.input||u.Input||R3;return It=Fe({},It,(n=q.input)!=null?n:p.input),Ji(Y.exports.Fragment,{children:[!x&&iKe,Ji(Be,Fe({},Ke,!Lx(Be)&&{ownerState:Fe({},de,Ke.ownerState)},{ref:r,onClick:xt},J,{className:ln(Te.root,Ke.className,l,O&&"MuiInputBase-readOnly"),children:[re,Kt(P3.Provider,{value:null,children:Kt(ot,Fe({ownerState:de,"aria-invalid":Pe.error,"aria-describedby":o,autoComplete:a,autoFocus:s,defaultValue:m,disabled:Pe.disabled,id:w,onAnimationStart:Ie,name:Z,placeholder:z,readOnly:O,required:Pe.required,rows:G,value:oe,onKeyDown:j,onKeyUp:$,type:ce},It,!Lx(ot)&&{as:pt,ownerState:Fe({},de,It.ownerState)},{ref:se,className:ln(Te.input,It.className,O&&"MuiInputBase-readOnly"),onBlur:ht,onChange:Tt,onFocus:Ge}))}),y,F?F(Fe({},Pe,{startAdornment:re})):null]}))]})});var jj=oKe;function sKe(t){return Kn("MuiInput",t)}const aKe=Fe({},eh,ei("MuiInput",["root","underline","input"]));var zx=aKe;function lKe(t){return Kn("MuiOutlinedInput",t)}const cKe=Fe({},eh,ei("MuiOutlinedInput",["root","notchedOutline","input"]));var Jg=cKe;function uKe(t){return Kn("MuiFilledInput",t)}const fKe=Fe({},eh,ei("MuiFilledInput",["root","underline","input"]));var th=fKe,Coe=nd(Kt("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown");function dKe(t){return Kn("MuiAutocomplete",t)}const hKe=ei("MuiAutocomplete",["root","expanded","fullWidth","focused","focusVisible","tag","tagSizeSmall","tagSizeMedium","hasPopupIcon","hasClearIcon","inputRoot","input","inputFocused","endAdornment","clearIndicator","popupIndicator","popupIndicatorOpen","popper","popperDisablePortal","paper","listbox","loading","noOptions","option","groupLabel","groupUl"]);var Eo=hKe,Eoe,Soe;const pKe=["autoComplete","autoHighlight","autoSelect","blurOnSelect","ChipProps","className","clearIcon","clearOnBlur","clearOnEscape","clearText","closeText","componentsProps","defaultValue","disableClearable","disableCloseOnSelect","disabled","disabledItemsFocusable","disableListWrap","disablePortal","filterOptions","filterSelectedOptions","forcePopupIcon","freeSolo","fullWidth","getLimitTagsText","getOptionDisabled","getOptionLabel","isOptionEqualToValue","groupBy","handleHomeEndKeys","id","includeInputInList","inputValue","limitTags","ListboxComponent","ListboxProps","loading","loadingText","multiple","noOptionsText","onChange","onClose","onHighlightChange","onInputChange","onOpen","open","openOnFocus","openText","options","PaperComponent","PopperComponent","popupIcon","readOnly","renderGroup","renderInput","renderOption","renderTags","selectOnFocus","size","slotProps","value"],mKe=t=>{const{classes:e,disablePortal:r,expanded:n,focused:i,fullWidth:o,hasClearIcon:a,hasPopupIcon:s,inputFocused:l,popupOpen:u,size:p}=t,m={root:["root",n&&"expanded",i&&"focused",o&&"fullWidth",a&&"hasClearIcon",s&&"hasPopupIcon"],inputRoot:["inputRoot"],input:["input",l&&"inputFocused"],tag:["tag",`tagSize${Pr(p)}`],endAdornment:["endAdornment"],clearIndicator:["clearIndicator"],popupIndicator:["popupIndicator",u&&"popupIndicatorOpen"],popper:["popper",r&&"popperDisablePortal"],paper:["paper"],listbox:["listbox"],loading:["loading"],noOptions:["noOptions"],option:["option"],groupLabel:["groupLabel"],groupUl:["groupUl"]};return Qn(m,dKe,e)},gKe=Nr("div",{name:"MuiAutocomplete",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t,{fullWidth:n,hasClearIcon:i,hasPopupIcon:o,inputFocused:a,size:s}=r;return[{[`& .${Eo.tag}`]:e.tag},{[`& .${Eo.tag}`]:e[`tagSize${Pr(s)}`]},{[`& .${Eo.inputRoot}`]:e.inputRoot},{[`& .${Eo.input}`]:e.input},{[`& .${Eo.input}`]:a&&e.inputFocused},e.root,n&&e.fullWidth,o&&e.hasPopupIcon,i&&e.hasClearIcon]}})(({ownerState:t})=>Fe({[`&.${Eo.focused} .${Eo.clearIndicator}`]:{visibility:"visible"},"@media (pointer: fine)":{[`&:hover .${Eo.clearIndicator}`]:{visibility:"visible"}}},t.fullWidth&&{width:"100%"},{[`& .${Eo.tag}`]:Fe({margin:3,maxWidth:"calc(100% - 6px)"},t.size==="small"&&{margin:2,maxWidth:"calc(100% - 4px)"}),[`& .${Eo.inputRoot}`]:{flexWrap:"wrap",[`.${Eo.hasPopupIcon}&, .${Eo.hasClearIcon}&`]:{paddingRight:26+4},[`.${Eo.hasPopupIcon}.${Eo.hasClearIcon}&`]:{paddingRight:52+4},[`& .${Eo.input}`]:{width:0,minWidth:30}},[`& .${zx.root}`]:{paddingBottom:1,"& .MuiInput-input":{padding:"4px 4px 4px 0px"}},[`& .${zx.root}.${eh.sizeSmall}`]:{[`& .${zx.input}`]:{padding:"2px 4px 3px 0"}},[`& .${Jg.root}`]:{padding:9,[`.${Eo.hasPopupIcon}&, .${Eo.hasClearIcon}&`]:{paddingRight:26+4+9},[`.${Eo.hasPopupIcon}.${Eo.hasClearIcon}&`]:{paddingRight:52+4+9},[`& .${Eo.input}`]:{padding:"7.5px 4px 7.5px 6px"},[`& .${Eo.endAdornment}`]:{right:9}},[`& .${Jg.root}.${eh.sizeSmall}`]:{paddingTop:6,paddingBottom:6,paddingLeft:6,[`& .${Eo.input}`]:{padding:"2.5px 4px 2.5px 6px"}},[`& .${th.root}`]:{paddingTop:19,paddingLeft:8,[`.${Eo.hasPopupIcon}&, .${Eo.hasClearIcon}&`]:{paddingRight:26+4+9},[`.${Eo.hasPopupIcon}.${Eo.hasClearIcon}&`]:{paddingRight:52+4+9},[`& .${th.input}`]:{padding:"7px 4px"},[`& .${Eo.endAdornment}`]:{right:9}},[`& .${th.root}.${eh.sizeSmall}`]:{paddingBottom:1,[`& .${th.input}`]:{padding:"2.5px 4px"}},[`& .${eh.hiddenLabel}`]:{paddingTop:8},[`& .${th.root}.${eh.hiddenLabel}`]:{paddingTop:0,paddingBottom:0,[`& .${Eo.input}`]:{paddingTop:16,paddingBottom:17}},[`& .${th.root}.${eh.hiddenLabel}.${eh.sizeSmall}`]:{[`& .${Eo.input}`]:{paddingTop:8,paddingBottom:9}},[`& .${Eo.input}`]:Fe({flexGrow:1,textOverflow:"ellipsis",opacity:0},t.inputFocused&&{opacity:1})})),vKe=Nr("div",{name:"MuiAutocomplete",slot:"EndAdornment",overridesResolver:(t,e)=>e.endAdornment})({position:"absolute",right:0,top:"calc(50% - 14px)"}),yKe=Nr(yoe,{name:"MuiAutocomplete",slot:"ClearIndicator",overridesResolver:(t,e)=>e.clearIndicator})({marginRight:-2,padding:4,visibility:"hidden"}),xKe=Nr(yoe,{name:"MuiAutocomplete",slot:"PopupIndicator",overridesResolver:({ownerState:t},e)=>Fe({},e.popupIndicator,t.popupOpen&&e.popupIndicatorOpen)})(({ownerState:t})=>Fe({padding:2,marginRight:-2},t.popupOpen&&{transform:"rotate(180deg)"})),_Ke=Nr(T3,{name:"MuiAutocomplete",slot:"Popper",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[{[`& .${Eo.option}`]:e.option},e.popper,r.disablePortal&&e.popperDisablePortal]}})(({theme:t,ownerState:e})=>Fe({zIndex:(t.vars||t).zIndex.modal},e.disablePortal&&{position:"absolute"})),bKe=Nr(cb,{name:"MuiAutocomplete",slot:"Paper",overridesResolver:(t,e)=>e.paper})(({theme:t})=>Fe({},t.typography.body1,{overflow:"auto"})),wKe=Nr("div",{name:"MuiAutocomplete",slot:"Loading",overridesResolver:(t,e)=>e.loading})(({theme:t})=>({color:(t.vars||t).palette.text.secondary,padding:"14px 16px"})),CKe=Nr("div",{name:"MuiAutocomplete",slot:"NoOptions",overridesResolver:(t,e)=>e.noOptions})(({theme:t})=>({color:(t.vars||t).palette.text.secondary,padding:"14px 16px"})),EKe=Nr("div",{name:"MuiAutocomplete",slot:"Listbox",overridesResolver:(t,e)=>e.listbox})(({theme:t})=>({listStyle:"none",margin:0,padding:"8px 0",maxHeight:"40vh",overflow:"auto",position:"relative",[`& .${Eo.option}`]:{minHeight:48,display:"flex",overflow:"hidden",justifyContent:"flex-start",alignItems:"center",cursor:"pointer",paddingTop:6,boxSizing:"border-box",outline:"0",WebkitTapHighlightColor:"transparent",paddingBottom:6,paddingLeft:16,paddingRight:16,[t.breakpoints.up("sm")]:{minHeight:"auto"},[`&.${Eo.focused}`]:{backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},'&[aria-disabled="true"]':{opacity:(t.vars||t).palette.action.disabledOpacity,pointerEvents:"none"},[`&.${Eo.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},'&[aria-selected="true"]':{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:co(t.palette.primary.main,t.palette.action.selectedOpacity),[`&.${Eo.focused}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:co(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:(t.vars||t).palette.action.selected}},[`&.${Eo.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:co(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}}}})),SKe=Nr(jYe,{name:"MuiAutocomplete",slot:"GroupLabel",overridesResolver:(t,e)=>e.groupLabel})(({theme:t})=>({backgroundColor:(t.vars||t).palette.background.paper,top:-8})),TKe=Nr("ul",{name:"MuiAutocomplete",slot:"GroupUl",overridesResolver:(t,e)=>e.groupUl})({padding:0,[`& .${Eo.option}`]:{paddingLeft:24}}),PKe=Y.exports.forwardRef(function(e,r){var n,i,o,a;const s=ti({props:e,name:"MuiAutocomplete"}),{autoComplete:l=!1,autoHighlight:u=!1,autoSelect:p=!1,blurOnSelect:m=!1,ChipProps:v,className:x,clearIcon:y=Eoe||(Eoe=Kt(bYe,{fontSize:"small"})),clearOnBlur:_=!s.freeSolo,clearOnEscape:w=!1,clearText:C="Clear",closeText:E="Close",componentsProps:T={},defaultValue:A=s.multiple?[]:null,disableClearable:k=!1,disableCloseOnSelect:X=!1,disabled:Z=!1,disabledItemsFocusable:W=!1,disableListWrap:D=!1,disablePortal:H=!1,filterSelectedOptions:N=!1,forcePopupIcon:j="auto",freeSolo:$=!1,fullWidth:z=!1,getLimitTagsText:O=Ye=>`+${Ye}`,getOptionLabel:F=Ye=>{var Ve;return(Ve=Ye.label)!=null?Ve:Ye},groupBy:G,handleHomeEndKeys:q=!s.freeSolo,includeInputInList:ee=!1,limitTags:re=-1,ListboxComponent:ce="ul",ListboxProps:fe,loading:J=!1,loadingText:oe="Loading\u2026",multiple:ve=!1,noOptionsText:ye="No options",openOnFocus:xe=!1,openText:se="Open",PaperComponent:me=cb,PopperComponent:pe=T3,popupIcon:Ce=Soe||(Soe=Kt(Coe,{})),readOnly:Pe=!1,renderGroup:Re,renderInput:ke,renderOption:ze,renderTags:Ge,selectOnFocus:ht=!s.freeSolo,size:Tt="medium",slotProps:xt={}}=s,pt=bn(s,pKe),{getRootProps:It,getInputProps:Ie,getInputLabelProps:de,getPopupIndicatorProps:Te,getClearProps:Be,getTagProps:Ke,getListboxProps:ot,getOptionProps:Ze,value:Je,dirty:St,expanded:er,id:Ft,popupOpen:Ut,focused:Er,focusedTag:kr,anchorEl:mr,setAnchorEl:Dt,inputValue:Jr,groupedOptions:We}=iXe(Fe({},s,{componentName:"Autocomplete"})),Oe=!k&&!Z&&St&&!Pe,$e=(!$||j===!0)&&j!==!1,Xe=Fe({},s,{disablePortal:H,expanded:er,focused:Er,fullWidth:z,hasClearIcon:Oe,hasPopupIcon:$e,inputFocused:kr===-1,popupOpen:Ut,size:Tt}),tt=mKe(Xe);let _t;if(ve&&Je.length>0){const Ye=Ve=>Fe({className:tt.tag,disabled:Z},Ke(Ve));Ge?_t=Ge(Je,Ye,Xe):_t=Je.map((Ve,gt)=>Kt(KYe,Fe({label:F(Ve),size:Tt},Ye({index:gt}),v)))}if(re>-1&&Array.isArray(_t)){const Ye=_t.length-re;!Er&&Ye>0&&(_t=_t.splice(0,re),_t.push(Kt("span",{className:tt.tag,children:O(Ye)},_t.length)))}const Nt=Re||(Ye=>Ji("li",{children:[Kt(SKe,{className:tt.groupLabel,ownerState:Xe,component:"div",children:Ye.group}),Kt(TKe,{className:tt.groupUl,ownerState:Xe,children:Ye.children})]},Ye.key)),Wt=ze||((Ye,Ve)=>Kt("li",Fe({},Ye,{children:F(Ve)}))),Sr=(Ye,Ve)=>{const gt=Ze({option:Ye,index:Ve});return Wt(Fe({},gt,{className:tt.option}),Ye,{selected:gt["aria-selected"],index:Ve,inputValue:Jr})},rr=(n=xt.clearIndicator)!=null?n:T.clearIndicator,tr=(i=xt.paper)!=null?i:T.paper,sn=(o=xt.popper)!=null?o:T.popper,un=(a=xt.popupIndicator)!=null?a:T.popupIndicator;return Ji(Y.exports.Fragment,{children:[Kt(gKe,Fe({ref:r,className:ln(tt.root,x),ownerState:Xe},It(pt),{children:ke({id:Ft,disabled:Z,fullWidth:!0,size:Tt==="small"?"small":void 0,InputLabelProps:de(),InputProps:Fe({ref:Dt,className:tt.inputRoot,startAdornment:_t},(Oe||$e)&&{endAdornment:Ji(vKe,{className:tt.endAdornment,ownerState:Xe,children:[Oe?Kt(yKe,Fe({},Be(),{"aria-label":C,title:C,ownerState:Xe},rr,{className:ln(tt.clearIndicator,rr==null?void 0:rr.className),children:y})):null,$e?Kt(xKe,Fe({},Te(),{disabled:Z,"aria-label":Ut?E:se,title:Ut?E:se,ownerState:Xe},un,{className:ln(tt.popupIndicator,un==null?void 0:un.className),children:Ce})):null]})}),inputProps:Fe({className:tt.input,disabled:Z,readOnly:Pe},Ie())})})),mr?Kt(_Ke,Fe({as:pe,disablePortal:H,style:{width:mr?mr.clientWidth:null},ownerState:Xe,role:"presentation",anchorEl:mr,open:Ut},sn,{className:ln(tt.popper,sn==null?void 0:sn.className),children:Ji(bKe,Fe({ownerState:Xe,as:me},tr,{className:ln(tt.paper,tr==null?void 0:tr.className),children:[J&&We.length===0?Kt(wKe,{className:tt.loading,ownerState:Xe,children:oe}):null,We.length===0&&!$&&!J?Kt(CKe,{className:tt.noOptions,ownerState:Xe,role:"presentation",onMouseDown:Ye=>{Ye.preventDefault()},children:ye}):null,We.length>0?Kt(EKe,Fe({as:ce,className:tt.listbox,ownerState:Xe},ot(),fe,{children:We.map((Ye,Ve)=>G?Nt({key:Ye.key,group:Ye.group,children:Ye.options.map((gt,qt)=>Sr(gt,Ye.index+qt))}):Sr(Ye,Ve))})):null]}))})):null]})});var kRt=PKe;const IKe=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],MKe={entering:{opacity:1},entered:{opacity:1}},AKe=Y.exports.forwardRef(function(e,r){const n=km(),i={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:o,appear:a=!0,children:s,easing:l,in:u,onEnter:p,onEntered:m,onEntering:v,onExit:x,onExited:y,onExiting:_,style:w,timeout:C=i,TransitionComponent:E=w3}=e,T=bn(e,IKe),A=Y.exports.useRef(null),k=ta(A,s.ref,r),X=z=>O=>{if(z){const F=A.current;O===void 0?z(F):z(F,O)}},Z=X(v),W=X((z,O)=>{Fj(z);const F=Nx({style:w,timeout:C,easing:l},{mode:"enter"});z.style.webkitTransition=n.transitions.create("opacity",F),z.style.transition=n.transitions.create("opacity",F),p&&p(z,O)}),D=X(m),H=X(_),N=X(z=>{const O=Nx({style:w,timeout:C,easing:l},{mode:"exit"});z.style.webkitTransition=n.transitions.create("opacity",O),z.style.transition=n.transitions.create("opacity",O),x&&x(z)}),j=X(y);return Kt(E,Fe({appear:a,in:u,nodeRef:A,onEnter:W,onEntered:D,onEntering:Z,onExit:N,onExited:j,onExiting:H,addEndListener:z=>{o&&o(A.current,z)},timeout:C},T,{children:(z,O)=>Y.exports.cloneElement(s,Fe({style:Fe({opacity:0,visibility:z==="exited"&&!u?"hidden":void 0},MKe[z],w,s.props.style),ref:k},O))}))});var RKe=AKe;function kKe(t){return Kn("MuiBackdrop",t)}ei("MuiBackdrop",["root","invisible"]);const OKe=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],LKe=t=>{const{classes:e,invisible:r}=t;return Qn({root:["root",r&&"invisible"]},kKe,e)},DKe=Nr("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,r.invisible&&e.invisible]}})(({ownerState:t})=>Fe({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},t.invisible&&{backgroundColor:"transparent"})),NKe=Y.exports.forwardRef(function(e,r){var n,i,o;const a=ti({props:e,name:"MuiBackdrop"}),{children:s,className:l,component:u="div",components:p={},componentsProps:m={},invisible:v=!1,open:x,slotProps:y={},slots:_={},TransitionComponent:w=RKe,transitionDuration:C}=a,E=bn(a,OKe),T=Fe({},a,{component:u,invisible:v}),A=LKe(T),k=(n=y.root)!=null?n:m.root;return Kt(w,Fe({in:x,timeout:C},E,{children:Kt(DKe,Fe({"aria-hidden":!0},k,{as:(i=(o=_.root)!=null?o:p.Root)!=null?i:u,className:ln(A.root,l,k==null?void 0:k.className),ownerState:Fe({},T,k==null?void 0:k.ownerState),classes:A,ref:r,children:s}))}))});var $Ke=NKe;const FKe=Oie(),zKe=FHe({defaultTheme:FKe,defaultClassName:"MuiBox-root",generateClassName:Z7.generate});var ORt=zKe;function BKe(t){return Kn("MuiButton",t)}const jKe=ei("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]);var k3=jKe;const UKe=Y.exports.createContext({});var Toe=UKe;const VKe=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],HKe=t=>{const{color:e,disableElevation:r,fullWidth:n,size:i,variant:o,classes:a}=t,s={root:["root",o,`${o}${Pr(e)}`,`size${Pr(i)}`,`${o}Size${Pr(i)}`,e==="inherit"&&"colorInherit",r&&"disableElevation",n&&"fullWidth"],label:["label"],startIcon:["startIcon",`iconSize${Pr(i)}`],endIcon:["endIcon",`iconSize${Pr(i)}`]},l=Qn(s,BKe,a);return Fe({},a,l)},Poe=t=>Fe({},t.size==="small"&&{"& > *:nth-of-type(1)":{fontSize:18}},t.size==="medium"&&{"& > *:nth-of-type(1)":{fontSize:20}},t.size==="large"&&{"& > *:nth-of-type(1)":{fontSize:22}}),WKe=Nr(Zg,{shouldForwardProp:t=>Jd(t)||t==="classes",name:"MuiButton",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,e[r.variant],e[`${r.variant}${Pr(r.color)}`],e[`size${Pr(r.size)}`],e[`${r.variant}Size${Pr(r.size)}`],r.color==="inherit"&&e.colorInherit,r.disableElevation&&e.disableElevation,r.fullWidth&&e.fullWidth]}})(({theme:t,ownerState:e})=>{var r,n;return Fe({},t.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(t.vars||t).shape.borderRadius,transition:t.transitions.create(["background-color","box-shadow","border-color","color"],{duration:t.transitions.duration.short}),"&:hover":Fe({textDecoration:"none",backgroundColor:t.vars?`rgba(${t.vars.palette.text.primaryChannel} / ${t.vars.palette.action.hoverOpacity})`:co(t.palette.text.primary,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},e.variant==="text"&&e.color!=="inherit"&&{backgroundColor:t.vars?`rgba(${t.vars.palette[e.color].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:co(t.palette[e.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},e.variant==="outlined"&&e.color!=="inherit"&&{border:`1px solid ${(t.vars||t).palette[e.color].main}`,backgroundColor:t.vars?`rgba(${t.vars.palette[e.color].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:co(t.palette[e.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},e.variant==="contained"&&{backgroundColor:(t.vars||t).palette.grey.A100,boxShadow:(t.vars||t).shadows[4],"@media (hover: none)":{boxShadow:(t.vars||t).shadows[2],backgroundColor:(t.vars||t).palette.grey[300]}},e.variant==="contained"&&e.color!=="inherit"&&{backgroundColor:(t.vars||t).palette[e.color].dark,"@media (hover: none)":{backgroundColor:(t.vars||t).palette[e.color].main}}),"&:active":Fe({},e.variant==="contained"&&{boxShadow:(t.vars||t).shadows[8]}),[`&.${k3.focusVisible}`]:Fe({},e.variant==="contained"&&{boxShadow:(t.vars||t).shadows[6]}),[`&.${k3.disabled}`]:Fe({color:(t.vars||t).palette.action.disabled},e.variant==="outlined"&&{border:`1px solid ${(t.vars||t).palette.action.disabledBackground}`},e.variant==="contained"&&{color:(t.vars||t).palette.action.disabled,boxShadow:(t.vars||t).shadows[0],backgroundColor:(t.vars||t).palette.action.disabledBackground})},e.variant==="text"&&{padding:"6px 8px"},e.variant==="text"&&e.color!=="inherit"&&{color:(t.vars||t).palette[e.color].main},e.variant==="outlined"&&{padding:"5px 15px",border:"1px solid currentColor"},e.variant==="outlined"&&e.color!=="inherit"&&{color:(t.vars||t).palette[e.color].main,border:t.vars?`1px solid rgba(${t.vars.palette[e.color].mainChannel} / 0.5)`:`1px solid ${co(t.palette[e.color].main,.5)}`},e.variant==="contained"&&{color:t.vars?t.vars.palette.text.primary:(r=(n=t.palette).getContrastText)==null?void 0:r.call(n,t.palette.grey[300]),backgroundColor:(t.vars||t).palette.grey[300],boxShadow:(t.vars||t).shadows[2]},e.variant==="contained"&&e.color!=="inherit"&&{color:(t.vars||t).palette[e.color].contrastText,backgroundColor:(t.vars||t).palette[e.color].main},e.color==="inherit"&&{color:"inherit",borderColor:"currentColor"},e.size==="small"&&e.variant==="text"&&{padding:"4px 5px",fontSize:t.typography.pxToRem(13)},e.size==="large"&&e.variant==="text"&&{padding:"8px 11px",fontSize:t.typography.pxToRem(15)},e.size==="small"&&e.variant==="outlined"&&{padding:"3px 9px",fontSize:t.typography.pxToRem(13)},e.size==="large"&&e.variant==="outlined"&&{padding:"7px 21px",fontSize:t.typography.pxToRem(15)},e.size==="small"&&e.variant==="contained"&&{padding:"4px 10px",fontSize:t.typography.pxToRem(13)},e.size==="large"&&e.variant==="contained"&&{padding:"8px 22px",fontSize:t.typography.pxToRem(15)},e.fullWidth&&{width:"100%"})},({ownerState:t})=>t.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${k3.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${k3.disabled}`]:{boxShadow:"none"}}),GKe=Nr("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.startIcon,e[`iconSize${Pr(r.size)}`]]}})(({ownerState:t})=>Fe({display:"inherit",marginRight:8,marginLeft:-4},t.size==="small"&&{marginLeft:-2},Poe(t))),qKe=Nr("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.endIcon,e[`iconSize${Pr(r.size)}`]]}})(({ownerState:t})=>Fe({display:"inherit",marginRight:-4,marginLeft:8},t.size==="small"&&{marginRight:-2},Poe(t))),XKe=Y.exports.forwardRef(function(e,r){const n=Y.exports.useContext(Toe),i=K7(n,e),o=ti({props:i,name:"MuiButton"}),{children:a,color:s="primary",component:l="button",className:u,disabled:p=!1,disableElevation:m=!1,disableFocusRipple:v=!1,endIcon:x,focusVisibleClassName:y,fullWidth:_=!1,size:w="medium",startIcon:C,type:E,variant:T="text"}=o,A=bn(o,VKe),k=Fe({},o,{color:s,component:l,disabled:p,disableElevation:m,disableFocusRipple:v,fullWidth:_,size:w,type:E,variant:T}),X=HKe(k),Z=C&&Kt(GKe,{className:X.startIcon,ownerState:k,children:C}),W=x&&Kt(qKe,{className:X.endIcon,ownerState:k,children:x});return Ji(WKe,Fe({ownerState:k,className:ln(n.className,X.root,u),component:l,disabled:p,focusRipple:!v,focusVisibleClassName:ln(X.focusVisible,y),ref:r,type:E},A,{classes:X,children:[Z,a,W]}))});var LRt=XKe;function YKe(t){return Kn("MuiButtonGroup",t)}const KKe=ei("MuiButtonGroup",["root","contained","outlined","text","disableElevation","disabled","fullWidth","vertical","grouped","groupedHorizontal","groupedVertical","groupedText","groupedTextHorizontal","groupedTextVertical","groupedTextPrimary","groupedTextSecondary","groupedOutlined","groupedOutlinedHorizontal","groupedOutlinedVertical","groupedOutlinedPrimary","groupedOutlinedSecondary","groupedContained","groupedContainedHorizontal","groupedContainedVertical","groupedContainedPrimary","groupedContainedSecondary"]);var Bx=KKe;const ZKe=["children","className","color","component","disabled","disableElevation","disableFocusRipple","disableRipple","fullWidth","orientation","size","variant"],QKe=(t,e)=>{const{ownerState:r}=t;return[{[`& .${Bx.grouped}`]:e.grouped},{[`& .${Bx.grouped}`]:e[`grouped${Pr(r.orientation)}`]},{[`& .${Bx.grouped}`]:e[`grouped${Pr(r.variant)}`]},{[`& .${Bx.grouped}`]:e[`grouped${Pr(r.variant)}${Pr(r.orientation)}`]},{[`& .${Bx.grouped}`]:e[`grouped${Pr(r.variant)}${Pr(r.color)}`]},e.root,e[r.variant],r.disableElevation===!0&&e.disableElevation,r.fullWidth&&e.fullWidth,r.orientation==="vertical"&&e.vertical]},JKe=t=>{const{classes:e,color:r,disabled:n,disableElevation:i,fullWidth:o,orientation:a,variant:s}=t,l={root:["root",s,a==="vertical"&&"vertical",o&&"fullWidth",i&&"disableElevation"],grouped:["grouped",`grouped${Pr(a)}`,`grouped${Pr(s)}`,`grouped${Pr(s)}${Pr(a)}`,`grouped${Pr(s)}${Pr(r)}`,n&&"disabled"]};return Qn(l,YKe,e)},eZe=Nr("div",{name:"MuiButtonGroup",slot:"Root",overridesResolver:QKe})(({theme:t,ownerState:e})=>Fe({display:"inline-flex",borderRadius:(t.vars||t).shape.borderRadius},e.variant==="contained"&&{boxShadow:(t.vars||t).shadows[2]},e.disableElevation&&{boxShadow:"none"},e.fullWidth&&{width:"100%"},e.orientation==="vertical"&&{flexDirection:"column"},{[`& .${Bx.grouped}`]:Fe({minWidth:40,"&:not(:first-of-type)":Fe({},e.orientation==="horizontal"&&{borderTopLeftRadius:0,borderBottomLeftRadius:0},e.orientation==="vertical"&&{borderTopRightRadius:0,borderTopLeftRadius:0},e.variant==="outlined"&&e.orientation==="horizontal"&&{marginLeft:-1},e.variant==="outlined"&&e.orientation==="vertical"&&{marginTop:-1}),"&:not(:last-of-type)":Fe({},e.orientation==="horizontal"&&{borderTopRightRadius:0,borderBottomRightRadius:0},e.orientation==="vertical"&&{borderBottomRightRadius:0,borderBottomLeftRadius:0},e.variant==="text"&&e.orientation==="horizontal"&&{borderRight:t.vars?`1px solid rgba(${t.vars.palette.common.onBackgroundChannel} / 0.23)`:`1px solid ${t.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"}`},e.variant==="text"&&e.orientation==="vertical"&&{borderBottom:t.vars?`1px solid rgba(${t.vars.palette.common.onBackgroundChannel} / 0.23)`:`1px solid ${t.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"}`},e.variant==="text"&&e.color!=="inherit"&&{borderColor:t.vars?`rgba(${t.vars.palette[e.color].mainChannel} / 0.5)`:co(t.palette[e.color].main,.5)},e.variant==="outlined"&&e.orientation==="horizontal"&&{borderRightColor:"transparent"},e.variant==="outlined"&&e.orientation==="vertical"&&{borderBottomColor:"transparent"},e.variant==="contained"&&e.orientation==="horizontal"&&{borderRight:`1px solid ${(t.vars||t).palette.grey[400]}`,[`&.${Bx.disabled}`]:{borderRight:`1px solid ${(t.vars||t).palette.action.disabled}`}},e.variant==="contained"&&e.orientation==="vertical"&&{borderBottom:`1px solid ${(t.vars||t).palette.grey[400]}`,[`&.${Bx.disabled}`]:{borderBottom:`1px solid ${(t.vars||t).palette.action.disabled}`}},e.variant==="contained"&&e.color!=="inherit"&&{borderColor:(t.vars||t).palette[e.color].dark},{"&:hover":Fe({},e.variant==="outlined"&&e.orientation==="horizontal"&&{borderRightColor:"currentColor"},e.variant==="outlined"&&e.orientation==="vertical"&&{borderBottomColor:"currentColor"})}),"&:hover":Fe({},e.variant==="contained"&&{boxShadow:"none"})},e.variant==="contained"&&{boxShadow:"none"})})),tZe=Y.exports.forwardRef(function(e,r){const n=ti({props:e,name:"MuiButtonGroup"}),{children:i,className:o,color:a="primary",component:s="div",disabled:l=!1,disableElevation:u=!1,disableFocusRipple:p=!1,disableRipple:m=!1,fullWidth:v=!1,orientation:x="horizontal",size:y="medium",variant:_="outlined"}=n,w=bn(n,ZKe),C=Fe({},n,{color:a,component:s,disabled:l,disableElevation:u,disableFocusRipple:p,disableRipple:m,fullWidth:v,orientation:x,size:y,variant:_}),E=JKe(C),T=Y.exports.useMemo(()=>({className:E.grouped,color:a,disabled:l,disableElevation:u,disableFocusRipple:p,disableRipple:m,fullWidth:v,size:y,variant:_}),[a,l,u,p,m,v,y,_,E.grouped]);return Kt(eZe,Fe({as:s,role:"group",className:ln(E.root,o),ref:r,ownerState:C},w,{children:Kt(Toe.Provider,{value:T,children:i})}))});var DRt=tZe;function rZe(t){return Kn("PrivateSwitchBase",t)}ei("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const nZe=["autoFocus","checked","checkedIcon","className","defaultChecked","disabled","disableFocusRipple","edge","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"],iZe=t=>{const{classes:e,checked:r,disabled:n,edge:i}=t,o={root:["root",r&&"checked",n&&"disabled",i&&`edge${Pr(i)}`],input:["input"]};return Qn(o,rZe,e)},oZe=Nr(Zg)(({ownerState:t})=>Fe({padding:9,borderRadius:"50%"},t.edge==="start"&&{marginLeft:t.size==="small"?-3:-12},t.edge==="end"&&{marginRight:t.size==="small"?-3:-12})),sZe=Nr("input")({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),aZe=Y.exports.forwardRef(function(e,r){const{autoFocus:n,checked:i,checkedIcon:o,className:a,defaultChecked:s,disabled:l,disableFocusRipple:u=!1,edge:p=!1,icon:m,id:v,inputProps:x,inputRef:y,name:_,onBlur:w,onChange:C,onFocus:E,readOnly:T,required:A=!1,tabIndex:k,type:X,value:Z}=e,W=bn(e,nZe),[D,H]=Rm({controlled:i,default:Boolean(s),name:"SwitchBase",state:"checked"}),N=Qg(),j=ee=>{E&&E(ee),N&&N.onFocus&&N.onFocus(ee)},$=ee=>{w&&w(ee),N&&N.onBlur&&N.onBlur(ee)},z=ee=>{if(ee.nativeEvent.defaultPrevented)return;const re=ee.target.checked;H(re),C&&C(ee,re)};let O=l;N&&typeof O=="undefined"&&(O=N.disabled);const F=X==="checkbox"||X==="radio",G=Fe({},e,{checked:D,disabled:O,disableFocusRipple:u,edge:p}),q=iZe(G);return Ji(oZe,Fe({component:"span",className:ln(q.root,a),centerRipple:!0,focusRipple:!u,disabled:O,tabIndex:null,role:void 0,onFocus:j,onBlur:$,ownerState:G,ref:r},W,{children:[Kt(sZe,Fe({autoFocus:n,checked:i,defaultChecked:s,className:q.input,disabled:O,id:F?v:void 0,name:_,onChange:z,readOnly:T,ref:y,required:A,ownerState:G,tabIndex:k,type:X},X==="checkbox"&&Z===void 0?{}:{value:Z},x)),D?o:m]}))});var Ioe=aZe,lZe=nd(Kt("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"}),"CheckBoxOutlineBlank"),cZe=nd(Kt("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox"),uZe=nd(Kt("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-2 10H7v-2h10v2z"}),"IndeterminateCheckBox");function fZe(t){return Kn("MuiCheckbox",t)}const dZe=ei("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary"]);var Uj=dZe;const hZe=["checkedIcon","color","icon","indeterminate","indeterminateIcon","inputProps","size","className"],pZe=t=>{const{classes:e,indeterminate:r,color:n}=t,i={root:["root",r&&"indeterminate",`color${Pr(n)}`]},o=Qn(i,fZe,e);return Fe({},e,o)},mZe=Nr(Ioe,{shouldForwardProp:t=>Jd(t)||t==="classes",name:"MuiCheckbox",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,r.indeterminate&&e.indeterminate,r.color!=="default"&&e[`color${Pr(r.color)}`]]}})(({theme:t,ownerState:e})=>Fe({color:(t.vars||t).palette.text.secondary},!e.disableRipple&&{"&:hover":{backgroundColor:t.vars?`rgba(${e.color==="default"?t.vars.palette.action.activeChannel:t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.hoverOpacity})`:co(e.color==="default"?t.palette.action.active:t.palette[e.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},e.color!=="default"&&{[`&.${Uj.checked}, &.${Uj.indeterminate}`]:{color:(t.vars||t).palette[e.color].main},[`&.${Uj.disabled}`]:{color:(t.vars||t).palette.action.disabled}})),gZe=Kt(cZe,{}),vZe=Kt(lZe,{}),yZe=Kt(uZe,{}),xZe=Y.exports.forwardRef(function(e,r){var n,i;const o=ti({props:e,name:"MuiCheckbox"}),{checkedIcon:a=gZe,color:s="primary",icon:l=vZe,indeterminate:u=!1,indeterminateIcon:p=yZe,inputProps:m,size:v="medium",className:x}=o,y=bn(o,hZe),_=u?p:l,w=u?p:a,C=Fe({},o,{color:s,indeterminate:u,size:v}),E=pZe(C);return Kt(mZe,Fe({type:"checkbox",inputProps:Fe({"data-indeterminate":u},m),icon:Y.exports.cloneElement(_,{fontSize:(n=_.props.fontSize)!=null?n:v}),checkedIcon:Y.exports.cloneElement(w,{fontSize:(i=w.props.fontSize)!=null?i:v}),ownerState:C,ref:r,className:ln(E.root,x)},y,{classes:E}))});var NRt=xZe;function _Ze(t){return Kn("MuiCircularProgress",t)}ei("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const bZe=["className","color","disableShrink","size","style","thickness","value","variant"];let O3=t=>t,Moe,Aoe,Roe,koe;const jx=44,wZe=qg(Moe||(Moe=O3` 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } `)),CZe=qg(Aoe||(Aoe=O3` 0% { stroke-dasharray: 1px, 200px; stroke-dashoffset: 0; } 50% { stroke-dasharray: 100px, 200px; stroke-dashoffset: -15px; } 100% { stroke-dasharray: 100px, 200px; stroke-dashoffset: -125px; } `)),EZe=t=>{const{classes:e,variant:r,color:n,disableShrink:i}=t,o={root:["root",r,`color${Pr(n)}`],svg:["svg"],circle:["circle",`circle${Pr(r)}`,i&&"circleDisableShrink"]};return Qn(o,_Ze,e)},SZe=Nr("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,e[r.variant],e[`color${Pr(r.color)}`]]}})(({ownerState:t,theme:e})=>Fe({display:"inline-block"},t.variant==="determinate"&&{transition:e.transitions.create("transform")},t.color!=="inherit"&&{color:(e.vars||e).palette[t.color].main}),({ownerState:t})=>t.variant==="indeterminate"&&Ox(Roe||(Roe=O3` animation: ${0} 1.4s linear infinite; `),wZe)),TZe=Nr("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(t,e)=>e.svg})({display:"block"}),PZe=Nr("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.circle,e[`circle${Pr(r.variant)}`],r.disableShrink&&e.circleDisableShrink]}})(({ownerState:t,theme:e})=>Fe({stroke:"currentColor"},t.variant==="determinate"&&{transition:e.transitions.create("stroke-dashoffset")},t.variant==="indeterminate"&&{strokeDasharray:"80px, 200px",strokeDashoffset:0}),({ownerState:t})=>t.variant==="indeterminate"&&!t.disableShrink&&Ox(koe||(koe=O3` animation: ${0} 1.4s ease-in-out infinite; `),CZe)),IZe=Y.exports.forwardRef(function(e,r){const n=ti({props:e,name:"MuiCircularProgress"}),{className:i,color:o="primary",disableShrink:a=!1,size:s=40,style:l,thickness:u=3.6,value:p=0,variant:m="indeterminate"}=n,v=bn(n,bZe),x=Fe({},n,{color:o,disableShrink:a,size:s,thickness:u,value:p,variant:m}),y=EZe(x),_={},w={},C={};if(m==="determinate"){const E=2*Math.PI*((jx-u)/2);_.strokeDasharray=E.toFixed(3),C["aria-valuenow"]=Math.round(p),_.strokeDashoffset=`${((100-p)/100*E).toFixed(3)}px`,w.transform="rotate(-90deg)"}return Kt(SZe,Fe({className:ln(y.root,i),style:Fe({width:s,height:s},w,l),ownerState:x,ref:r,role:"progressbar"},C,v,{children:Kt(TZe,{className:y.svg,ownerState:x,viewBox:`${jx/2} ${jx/2} ${jx} ${jx}`,children:Kt(PZe,{className:y.circle,style:_,ownerState:x,cx:jx,cy:jx,r:(jx-u)/2,fill:"none",strokeWidth:u})})}))});var $Rt=IZe;const MZe=nWe({createStyledComponent:Nr("div",{name:"MuiContainer",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,e[`maxWidth${Pr(String(r.maxWidth))}`],r.fixed&&e.fixed,r.disableGutters&&e.disableGutters]}}),useThemeProps:t=>ti({props:t,name:"MuiContainer"})});var FRt=MZe;const AZe=["BackdropComponent","BackdropProps","classes","className","closeAfterTransition","children","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","slotProps","slots","theme"],RZe=Nr("div",{name:"MuiModal",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,!r.open&&r.exited&&e.hidden]}})(({theme:t,ownerState:e})=>Fe({position:"fixed",zIndex:(t.vars||t).zIndex.modal,right:0,bottom:0,top:0,left:0},!e.open&&e.exited&&{visibility:"hidden"})),kZe=Nr($Ke,{name:"MuiModal",slot:"Backdrop",overridesResolver:(t,e)=>e.backdrop})({zIndex:-1}),OZe=Y.exports.forwardRef(function(e,r){var n,i,o,a,s,l;const u=ti({name:"MuiModal",props:e}),{BackdropComponent:p=kZe,BackdropProps:m,classes:v,className:x,closeAfterTransition:y=!1,children:_,component:w,components:C={},componentsProps:E={},disableAutoFocus:T=!1,disableEnforceFocus:A=!1,disableEscapeKeyDown:k=!1,disablePortal:X=!1,disableRestoreFocus:Z=!1,disableScrollLock:W=!1,hideBackdrop:D=!1,keepMounted:H=!1,slotProps:N,slots:j,theme:$}=u,z=bn(u,AZe),[O,F]=Y.exports.useState(!0),G={closeAfterTransition:y,disableAutoFocus:T,disableEnforceFocus:A,disableEscapeKeyDown:k,disablePortal:X,disableRestoreFocus:Z,disableScrollLock:W,hideBackdrop:D,keepMounted:H},q=Fe({},u,G,{exited:O}),ee=(n=(i=j==null?void 0:j.root)!=null?i:C.Root)!=null?n:RZe,re=(o=(a=j==null?void 0:j.backdrop)!=null?a:C.Backdrop)!=null?o:p,ce=(s=N==null?void 0:N.root)!=null?s:E.root,fe=(l=N==null?void 0:N.backdrop)!=null?l:E.backdrop;return Kt(Vqe,Fe({slots:{root:ee,backdrop:re},slotProps:{root:()=>Fe({},bj(ce,q),!Lx(ee)&&{as:w,theme:$},{className:ln(x,ce==null?void 0:ce.className,v==null?void 0:v.root,!q.open&&q.exited&&(v==null?void 0:v.hidden))}),backdrop:()=>Fe({},m,bj(fe,q),{className:ln(fe==null?void 0:fe.className,v==null?void 0:v.backdrop)})},onTransitionEnter:()=>F(!1),onTransitionExited:()=>F(!0),ref:r},z,G,{children:_}))});var LZe=OZe;function DZe(t){return Kn("MuiDivider",t)}const NZe=ei("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]);var Ooe=NZe;const $Ze=["absolute","children","className","component","flexItem","light","orientation","role","textAlign","variant"],FZe=t=>{const{absolute:e,children:r,classes:n,flexItem:i,light:o,orientation:a,textAlign:s,variant:l}=t;return Qn({root:["root",e&&"absolute",l,o&&"light",a==="vertical"&&"vertical",i&&"flexItem",r&&"withChildren",r&&a==="vertical"&&"withChildrenVertical",s==="right"&&a!=="vertical"&&"textAlignRight",s==="left"&&a!=="vertical"&&"textAlignLeft"],wrapper:["wrapper",a==="vertical"&&"wrapperVertical"]},DZe,n)},zZe=Nr("div",{name:"MuiDivider",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,r.absolute&&e.absolute,e[r.variant],r.light&&e.light,r.orientation==="vertical"&&e.vertical,r.flexItem&&e.flexItem,r.children&&e.withChildren,r.children&&r.orientation==="vertical"&&e.withChildrenVertical,r.textAlign==="right"&&r.orientation!=="vertical"&&e.textAlignRight,r.textAlign==="left"&&r.orientation!=="vertical"&&e.textAlignLeft]}})(({theme:t,ownerState:e})=>Fe({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(t.vars||t).palette.divider,borderBottomWidth:"thin"},e.absolute&&{position:"absolute",bottom:0,left:0,width:"100%"},e.light&&{borderColor:t.vars?`rgba(${t.vars.palette.dividerChannel} / 0.08)`:co(t.palette.divider,.08)},e.variant==="inset"&&{marginLeft:72},e.variant==="middle"&&e.orientation==="horizontal"&&{marginLeft:t.spacing(2),marginRight:t.spacing(2)},e.variant==="middle"&&e.orientation==="vertical"&&{marginTop:t.spacing(1),marginBottom:t.spacing(1)},e.orientation==="vertical"&&{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"},e.flexItem&&{alignSelf:"stretch",height:"auto"}),({theme:t,ownerState:e})=>Fe({},e.children&&{display:"flex",whiteSpace:"nowrap",textAlign:"center",border:0,"&::before, &::after":{position:"relative",width:"100%",borderTop:`thin solid ${(t.vars||t).palette.divider}`,top:"50%",content:'""',transform:"translateY(50%)"}}),({theme:t,ownerState:e})=>Fe({},e.children&&e.orientation==="vertical"&&{flexDirection:"column","&::before, &::after":{height:"100%",top:"0%",left:"50%",borderTop:0,borderLeft:`thin solid ${(t.vars||t).palette.divider}`,transform:"translateX(0%)"}}),({ownerState:t})=>Fe({},t.textAlign==="right"&&t.orientation!=="vertical"&&{"&::before":{width:"90%"},"&::after":{width:"10%"}},t.textAlign==="left"&&t.orientation!=="vertical"&&{"&::before":{width:"10%"},"&::after":{width:"90%"}})),BZe=Nr("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.wrapper,r.orientation==="vertical"&&e.wrapperVertical]}})(({theme:t,ownerState:e})=>Fe({display:"inline-block",paddingLeft:`calc(${t.spacing(1)} * 1.2)`,paddingRight:`calc(${t.spacing(1)} * 1.2)`},e.orientation==="vertical"&&{paddingTop:`calc(${t.spacing(1)} * 1.2)`,paddingBottom:`calc(${t.spacing(1)} * 1.2)`})),jZe=Y.exports.forwardRef(function(e,r){const n=ti({props:e,name:"MuiDivider"}),{absolute:i=!1,children:o,className:a,component:s=o?"div":"hr",flexItem:l=!1,light:u=!1,orientation:p="horizontal",role:m=s!=="hr"?"separator":void 0,textAlign:v="center",variant:x="fullWidth"}=n,y=bn(n,$Ze),_=Fe({},n,{absolute:i,component:s,flexItem:l,light:u,orientation:p,role:m,textAlign:v,variant:x}),w=FZe(_);return Kt(zZe,Fe({as:s,className:ln(w.root,a),role:m,ref:r,ownerState:_},y,{children:o?Kt(BZe,{className:w.wrapper,ownerState:_,children:o}):null}))});var zRt=jZe;const UZe=["addEndListener","appear","children","container","direction","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function VZe(t,e,r){const n=e.getBoundingClientRect(),i=r&&r.getBoundingClientRect(),o=rp(e);let a;if(e.fakeTransform)a=e.fakeTransform;else{const u=o.getComputedStyle(e);a=u.getPropertyValue("-webkit-transform")||u.getPropertyValue("transform")}let s=0,l=0;if(a&&a!=="none"&&typeof a=="string"){const u=a.split("(")[1].split(")")[0].split(",");s=parseInt(u[4],10),l=parseInt(u[5],10)}return t==="left"?i?`translateX(${i.right+s-n.left}px)`:`translateX(${o.innerWidth+s-n.left}px)`:t==="right"?i?`translateX(-${n.right-i.left-s}px)`:`translateX(-${n.left+n.width-s}px)`:t==="up"?i?`translateY(${i.bottom+l-n.top}px)`:`translateY(${o.innerHeight+l-n.top}px)`:i?`translateY(-${n.top-i.top+n.height-l}px)`:`translateY(-${n.top+n.height-l}px)`}function HZe(t){return typeof t=="function"?t():t}function L3(t,e,r){const n=HZe(r),i=VZe(t,e,n);i&&(e.style.webkitTransform=i,e.style.transform=i)}const WZe=Y.exports.forwardRef(function(e,r){const n=km(),i={enter:n.transitions.easing.easeOut,exit:n.transitions.easing.sharp},o={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:a,appear:s=!0,children:l,container:u,direction:p="down",easing:m=i,in:v,onEnter:x,onEntered:y,onEntering:_,onExit:w,onExited:C,onExiting:E,style:T,timeout:A=o,TransitionComponent:k=w3}=e,X=bn(e,UZe),Z=Y.exports.useRef(null),W=ta(l.ref,Z,r),D=q=>ee=>{q&&(ee===void 0?q(Z.current):q(Z.current,ee))},H=D((q,ee)=>{L3(p,q,u),Fj(q),x&&x(q,ee)}),N=D((q,ee)=>{const re=Nx({timeout:A,style:T,easing:m},{mode:"enter"});q.style.webkitTransition=n.transitions.create("-webkit-transform",Fe({},re)),q.style.transition=n.transitions.create("transform",Fe({},re)),q.style.webkitTransform="none",q.style.transform="none",_&&_(q,ee)}),j=D(y),$=D(E),z=D(q=>{const ee=Nx({timeout:A,style:T,easing:m},{mode:"exit"});q.style.webkitTransition=n.transitions.create("-webkit-transform",ee),q.style.transition=n.transitions.create("transform",ee),L3(p,q,u),w&&w(q)}),O=D(q=>{q.style.webkitTransition="",q.style.transition="",C&&C(q)}),F=q=>{a&&a(Z.current,q)},G=Y.exports.useCallback(()=>{Z.current&&L3(p,Z.current,u)},[p,u]);return Y.exports.useEffect(()=>{if(v||p==="down"||p==="right")return;const q=tb(()=>{Z.current&&L3(p,Z.current,u)}),ee=rp(Z.current);return ee.addEventListener("resize",q),()=>{q.clear(),ee.removeEventListener("resize",q)}},[p,v,u]),Y.exports.useEffect(()=>{v||G()},[v,G]),Kt(k,Fe({nodeRef:Z,onEnter:H,onEntered:j,onEntering:N,onExit:z,onExited:O,onExiting:$,addEndListener:F,appear:s,in:v,timeout:A},X,{children:(q,ee)=>Y.exports.cloneElement(l,Fe({ref:W,style:Fe({visibility:q==="exited"&&!v?"hidden":void 0},T,l.props.style)},ee))}))});var BRt=WZe;function GZe(t){return Kn("MuiFab",t)}const qZe=ei("MuiFab",["root","primary","secondary","extended","circular","focusVisible","disabled","colorInherit","sizeSmall","sizeMedium","sizeLarge","info","error","warning","success"]);var Loe=qZe;const XZe=["children","className","color","component","disabled","disableFocusRipple","focusVisibleClassName","size","variant"],YZe=t=>{const{color:e,variant:r,classes:n,size:i}=t,o={root:["root",r,`size${Pr(i)}`,e==="inherit"?"colorInherit":e]},a=Qn(o,GZe,n);return Fe({},n,a)},KZe=Nr(Zg,{name:"MuiFab",slot:"Root",shouldForwardProp:t=>Jd(t)||t==="classes",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,e[r.variant],e[`size${Pr(r.size)}`],r.color==="inherit"&&e.colorInherit,e[Pr(r.size)],e[r.color]]}})(({theme:t,ownerState:e})=>{var r,n;return Fe({},t.typography.button,{minHeight:36,transition:t.transitions.create(["background-color","box-shadow","border-color"],{duration:t.transitions.duration.short}),borderRadius:"50%",padding:0,minWidth:0,width:56,height:56,zIndex:(t.vars||t).zIndex.fab,boxShadow:(t.vars||t).shadows[6],"&:active":{boxShadow:(t.vars||t).shadows[12]},color:t.vars?t.vars.palette.text.primary:(r=(n=t.palette).getContrastText)==null?void 0:r.call(n,t.palette.grey[300]),backgroundColor:(t.vars||t).palette.grey[300],"&:hover":{backgroundColor:(t.vars||t).palette.grey.A100,"@media (hover: none)":{backgroundColor:(t.vars||t).palette.grey[300]},textDecoration:"none"},[`&.${Loe.focusVisible}`]:{boxShadow:(t.vars||t).shadows[6]}},e.size==="small"&&{width:40,height:40},e.size==="medium"&&{width:48,height:48},e.variant==="extended"&&{borderRadius:48/2,padding:"0 16px",width:"auto",minHeight:"auto",minWidth:48,height:48},e.variant==="extended"&&e.size==="small"&&{width:"auto",padding:"0 8px",borderRadius:34/2,minWidth:34,height:34},e.variant==="extended"&&e.size==="medium"&&{width:"auto",padding:"0 16px",borderRadius:40/2,minWidth:40,height:40},e.color==="inherit"&&{color:"inherit"})},({theme:t,ownerState:e})=>Fe({},e.color!=="inherit"&&e.color!=="default"&&(t.vars||t).palette[e.color]!=null&&{color:(t.vars||t).palette[e.color].contrastText,backgroundColor:(t.vars||t).palette[e.color].main,"&:hover":{backgroundColor:(t.vars||t).palette[e.color].dark,"@media (hover: none)":{backgroundColor:(t.vars||t).palette[e.color].main}}}),({theme:t})=>({[`&.${Loe.disabled}`]:{color:(t.vars||t).palette.action.disabled,boxShadow:(t.vars||t).shadows[0],backgroundColor:(t.vars||t).palette.action.disabledBackground}})),ZZe=Y.exports.forwardRef(function(e,r){const n=ti({props:e,name:"MuiFab"}),{children:i,className:o,color:a="default",component:s="button",disabled:l=!1,disableFocusRipple:u=!1,focusVisibleClassName:p,size:m="large",variant:v="circular"}=n,x=bn(n,XZe),y=Fe({},n,{color:a,component:s,disabled:l,disableFocusRipple:u,size:m,variant:v}),_=YZe(y);return Kt(KZe,Fe({className:ln(_.root,o),component:s,disabled:l,focusRipple:!u,focusVisibleClassName:ln(_.focusVisible,p),ownerState:y,ref:r},x,{classes:_,children:i}))});var jRt=ZZe;const QZe=["disableUnderline","components","componentsProps","fullWidth","hiddenLabel","inputComponent","multiline","slotProps","slots","type"],JZe=t=>{const{classes:e,disableUnderline:r}=t,i=Qn({root:["root",!r&&"underline"],input:["input"]},uKe,e);return Fe({},e,i)},eQe=Nr(A3,{shouldForwardProp:t=>Jd(t)||t==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[...I3(t,e),!r.disableUnderline&&e.underline]}})(({theme:t,ownerState:e})=>{var r;const n=t.palette.mode==="light",i=n?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",o=n?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",a=n?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",s=n?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return Fe({position:"relative",backgroundColor:t.vars?t.vars.palette.FilledInput.bg:o,borderTopLeftRadius:(t.vars||t).shape.borderRadius,borderTopRightRadius:(t.vars||t).shape.borderRadius,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),"&:hover":{backgroundColor:t.vars?t.vars.palette.FilledInput.hoverBg:a,"@media (hover: none)":{backgroundColor:t.vars?t.vars.palette.FilledInput.bg:o}},[`&.${th.focused}`]:{backgroundColor:t.vars?t.vars.palette.FilledInput.bg:o},[`&.${th.disabled}`]:{backgroundColor:t.vars?t.vars.palette.FilledInput.disabledBg:s}},!e.disableUnderline&&{"&:after":{borderBottom:`2px solid ${(r=(t.vars||t).palette[e.color||"primary"])==null?void 0:r.main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${th.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${th.error}`]:{"&:before, &:after":{borderBottomColor:(t.vars||t).palette.error.main}},"&:before":{borderBottom:`1px solid ${t.vars?`rgba(${t.vars.palette.common.onBackgroundChannel} / ${t.vars.opacity.inputUnderline})`:i}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:t.transitions.create("border-bottom-color",{duration:t.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${th.disabled}, .${th.error}):before`]:{borderBottom:`1px solid ${(t.vars||t).palette.text.primary}`},[`&.${th.disabled}:before`]:{borderBottomStyle:"dotted"}},e.startAdornment&&{paddingLeft:12},e.endAdornment&&{paddingRight:12},e.multiline&&Fe({padding:"25px 12px 8px"},e.size==="small"&&{paddingTop:21,paddingBottom:4},e.hiddenLabel&&{paddingTop:16,paddingBottom:17}))}),tQe=Nr(R3,{name:"MuiFilledInput",slot:"Input",overridesResolver:M3})(({theme:t,ownerState:e})=>Fe({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12},!t.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:t.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:t.palette.mode==="light"?null:"#fff",caretColor:t.palette.mode==="light"?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},t.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[t.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},e.size==="small"&&{paddingTop:21,paddingBottom:4},e.hiddenLabel&&{paddingTop:16,paddingBottom:17},e.multiline&&{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0},e.startAdornment&&{paddingLeft:0},e.endAdornment&&{paddingRight:0},e.hiddenLabel&&e.size==="small"&&{paddingTop:8,paddingBottom:9})),Doe=Y.exports.forwardRef(function(e,r){var n,i,o,a;const s=ti({props:e,name:"MuiFilledInput"}),{components:l={},componentsProps:u,fullWidth:p=!1,inputComponent:m="input",multiline:v=!1,slotProps:x,slots:y={},type:_="text"}=s,w=bn(s,QZe),C=Fe({},s,{fullWidth:p,inputComponent:m,multiline:v,type:_}),E=JZe(s),T={root:{ownerState:C},input:{ownerState:C}},A=(x!=null?x:u)?Zf(x!=null?x:u,T):T,k=(n=(i=y.root)!=null?i:l.Root)!=null?n:eQe,X=(o=(a=y.input)!=null?a:l.Input)!=null?o:tQe;return Kt(jj,Fe({slots:{root:k,input:X},componentsProps:A,fullWidth:p,inputComponent:m,multiline:v,ref:r,type:_},w,{classes:E}))});Doe.muiName="Input";var Noe=Doe;function rQe(t){return Kn("MuiFormControl",t)}ei("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const nQe=["children","className","color","component","disabled","error","focused","fullWidth","hiddenLabel","margin","required","size","variant"],iQe=t=>{const{classes:e,margin:r,fullWidth:n}=t,i={root:["root",r!=="none"&&`margin${Pr(r)}`,n&&"fullWidth"]};return Qn(i,rQe,e)},oQe=Nr("div",{name:"MuiFormControl",slot:"Root",overridesResolver:({ownerState:t},e)=>Fe({},e.root,e[`margin${Pr(t.margin)}`],t.fullWidth&&e.fullWidth)})(({ownerState:t})=>Fe({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top"},t.margin==="normal"&&{marginTop:16,marginBottom:8},t.margin==="dense"&&{marginTop:8,marginBottom:4},t.fullWidth&&{width:"100%"})),sQe=Y.exports.forwardRef(function(e,r){const n=ti({props:e,name:"MuiFormControl"}),{children:i,className:o,color:a="primary",component:s="div",disabled:l=!1,error:u=!1,focused:p,fullWidth:m=!1,hiddenLabel:v=!1,margin:x="none",required:y=!1,size:_="medium",variant:w="outlined"}=n,C=bn(n,nQe),E=Fe({},n,{color:a,component:s,disabled:l,error:u,fullWidth:m,hiddenLabel:v,margin:x,required:y,size:_,variant:w}),T=iQe(E),[A,k]=Y.exports.useState(()=>{let $=!1;return i&&Y.exports.Children.forEach(i,z=>{if(!zD(z,["Input","Select"]))return;const O=zD(z,["Select"])?z.props.input:z;O&&JYe(O.props)&&($=!0)}),$}),[X,Z]=Y.exports.useState(()=>{let $=!1;return i&&Y.exports.Children.forEach(i,z=>{!zD(z,["Input","Select"])||Bj(z.props,!0)&&($=!0)}),$}),[W,D]=Y.exports.useState(!1);l&&W&&D(!1);const H=p!==void 0&&!l?p:W;let N;const j=Y.exports.useMemo(()=>({adornedStart:A,setAdornedStart:k,color:a,disabled:l,error:u,filled:X,focused:H,fullWidth:m,hiddenLabel:v,size:_,onBlur:()=>{D(!1)},onEmpty:()=>{Z(!1)},onFilled:()=>{Z(!0)},onFocus:()=>{D(!0)},registerEffect:N,required:y,variant:w}),[A,a,l,u,X,H,m,v,N,y,_,w]);return Kt(P3.Provider,{value:j,children:Kt(oQe,Fe({as:s,ownerState:E,className:ln(T.root,o),ref:r},C,{children:i}))})});var aQe=sQe;function lQe(t){return Kn("MuiFormControlLabel",t)}const cQe=ei("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error"]);var D3=cQe;const uQe=["checked","className","componentsProps","control","disabled","disableTypography","inputRef","label","labelPlacement","name","onChange","slotProps","value"],fQe=t=>{const{classes:e,disabled:r,labelPlacement:n,error:i}=t,o={root:["root",r&&"disabled",`labelPlacement${Pr(n)}`,i&&"error"],label:["label",r&&"disabled"]};return Qn(o,lQe,e)},dQe=Nr("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[{[`& .${D3.label}`]:e.label},e.root,e[`labelPlacement${Pr(r.labelPlacement)}`]]}})(({theme:t,ownerState:e})=>Fe({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,[`&.${D3.disabled}`]:{cursor:"default"}},e.labelPlacement==="start"&&{flexDirection:"row-reverse",marginLeft:16,marginRight:-11},e.labelPlacement==="top"&&{flexDirection:"column-reverse",marginLeft:16},e.labelPlacement==="bottom"&&{flexDirection:"column",marginLeft:16},{[`& .${D3.label}`]:{[`&.${D3.disabled}`]:{color:(t.vars||t).palette.text.disabled}}})),hQe=Y.exports.forwardRef(function(e,r){var n;const i=ti({props:e,name:"MuiFormControlLabel"}),{className:o,componentsProps:a={},control:s,disabled:l,disableTypography:u,label:p,labelPlacement:m="end",slotProps:v={}}=i,x=bn(i,uQe),y=Qg();let _=l;typeof _=="undefined"&&typeof s.props.disabled!="undefined"&&(_=s.props.disabled),typeof _=="undefined"&&y&&(_=y.disabled);const w={disabled:_};["checked","name","onChange","value","inputRef"].forEach(X=>{typeof s.props[X]=="undefined"&&typeof i[X]!="undefined"&&(w[X]=i[X])});const C=Fx({props:i,muiFormControl:y,states:["error"]}),E=Fe({},i,{disabled:_,labelPlacement:m,error:C.error}),T=fQe(E),A=(n=v.typography)!=null?n:a.typography;let k=p;return k!=null&&k.type!==$x&&!u&&(k=Kt($x,Fe({component:"span"},A,{className:ln(T.label,A==null?void 0:A.className),children:k}))),Ji(dQe,Fe({className:ln(T.root,o),ownerState:E,ref:r},x,{children:[Y.exports.cloneElement(s,w),k]}))});var URt=hQe;function pQe(t){return Kn("MuiFormGroup",t)}ei("MuiFormGroup",["root","row","error"]);const mQe=["className","row"],gQe=t=>{const{classes:e,row:r,error:n}=t;return Qn({root:["root",r&&"row",n&&"error"]},pQe,e)},vQe=Nr("div",{name:"MuiFormGroup",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,r.row&&e.row]}})(({ownerState:t})=>Fe({display:"flex",flexDirection:"column",flexWrap:"wrap"},t.row&&{flexDirection:"row"})),yQe=Y.exports.forwardRef(function(e,r){const n=ti({props:e,name:"MuiFormGroup"}),{className:i,row:o=!1}=n,a=bn(n,mQe),s=Qg(),l=Fx({props:n,muiFormControl:s,states:["error"]}),u=Fe({},n,{row:o,error:l.error}),p=gQe(u);return Kt(vQe,Fe({className:ln(p.root,i),ownerState:u,ref:r},a))});var xQe=yQe;function _Qe(t){return Kn("MuiFormHelperText",t)}const bQe=ei("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]);var $oe=bQe,Foe;const wQe=["children","className","component","disabled","error","filled","focused","margin","required","variant"],CQe=t=>{const{classes:e,contained:r,size:n,disabled:i,error:o,filled:a,focused:s,required:l}=t,u={root:["root",i&&"disabled",o&&"error",n&&`size${Pr(n)}`,r&&"contained",s&&"focused",a&&"filled",l&&"required"]};return Qn(u,_Qe,e)},EQe=Nr("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,r.size&&e[`size${Pr(r.size)}`],r.contained&&e.contained,r.filled&&e.filled]}})(({theme:t,ownerState:e})=>Fe({color:(t.vars||t).palette.text.secondary},t.typography.caption,{textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${$oe.disabled}`]:{color:(t.vars||t).palette.text.disabled},[`&.${$oe.error}`]:{color:(t.vars||t).palette.error.main}},e.size==="small"&&{marginTop:4},e.contained&&{marginLeft:14,marginRight:14})),SQe=Y.exports.forwardRef(function(e,r){const n=ti({props:e,name:"MuiFormHelperText"}),{children:i,className:o,component:a="p"}=n,s=bn(n,wQe),l=Qg(),u=Fx({props:n,muiFormControl:l,states:["variant","size","disabled","error","filled","focused","required"]}),p=Fe({},n,{component:a,contained:u.variant==="filled"||u.variant==="outlined",variant:u.variant,size:u.size,disabled:u.disabled,error:u.error,filled:u.filled,focused:u.focused,required:u.required}),m=CQe(p);return Kt(EQe,Fe({as:a,ownerState:p,className:ln(m.root,o),ref:r},s,{children:i===" "?Foe||(Foe=Kt("span",{className:"notranslate",children:"\u200B"})):i}))});var TQe=SQe;function PQe(t){return Kn("MuiFormLabel",t)}const IQe=ei("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]);var zI=IQe;const MQe=["children","className","color","component","disabled","error","filled","focused","required"],AQe=t=>{const{classes:e,color:r,focused:n,disabled:i,error:o,filled:a,required:s}=t,l={root:["root",`color${Pr(r)}`,i&&"disabled",o&&"error",a&&"filled",n&&"focused",s&&"required"],asterisk:["asterisk",o&&"error"]};return Qn(l,PQe,e)},RQe=Nr("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:({ownerState:t},e)=>Fe({},e.root,t.color==="secondary"&&e.colorSecondary,t.filled&&e.filled)})(({theme:t,ownerState:e})=>Fe({color:(t.vars||t).palette.text.secondary},t.typography.body1,{lineHeight:"1.4375em",padding:0,position:"relative",[`&.${zI.focused}`]:{color:(t.vars||t).palette[e.color].main},[`&.${zI.disabled}`]:{color:(t.vars||t).palette.text.disabled},[`&.${zI.error}`]:{color:(t.vars||t).palette.error.main}})),kQe=Nr("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(t,e)=>e.asterisk})(({theme:t})=>({[`&.${zI.error}`]:{color:(t.vars||t).palette.error.main}})),OQe=Y.exports.forwardRef(function(e,r){const n=ti({props:e,name:"MuiFormLabel"}),{children:i,className:o,component:a="label"}=n,s=bn(n,MQe),l=Qg(),u=Fx({props:n,muiFormControl:l,states:["color","required","focused","disabled","error","filled"]}),p=Fe({},n,{color:u.color||"primary",component:a,disabled:u.disabled,error:u.error,filled:u.filled,focused:u.focused,required:u.required}),m=AQe(p);return Ji(RQe,Fe({as:a,ownerState:p,className:ln(m.root,o),ref:r},s,{children:[i,u.required&&Ji(kQe,{ownerState:p,"aria-hidden":!0,className:m.asterisk,children:["\u2009","*"]})]}))});var LQe=OQe;const DQe=Y.exports.createContext();var zoe=DQe;function NQe(t){return Kn("MuiGrid",t)}const $Qe=[0,1,2,3,4,5,6,7,8,9,10],FQe=["column-reverse","column","row-reverse","row"],zQe=["nowrap","wrap-reverse","wrap"],BI=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12],jI=ei("MuiGrid",["root","container","item","zeroMinWidth",...$Qe.map(t=>`spacing-xs-${t}`),...FQe.map(t=>`direction-xs-${t}`),...zQe.map(t=>`wrap-xs-${t}`),...BI.map(t=>`grid-xs-${t}`),...BI.map(t=>`grid-sm-${t}`),...BI.map(t=>`grid-md-${t}`),...BI.map(t=>`grid-lg-${t}`),...BI.map(t=>`grid-xl-${t}`)]),BQe=["className","columns","columnSpacing","component","container","direction","item","rowSpacing","spacing","wrap","zeroMinWidth"];function XC(t){const e=parseFloat(t);return`${e}${String(t).replace(String(e),"")||"px"}`}function jQe({theme:t,ownerState:e}){let r;return t.breakpoints.keys.reduce((n,i)=>{let o={};if(e[i]&&(r=e[i]),!r)return n;if(r===!0)o={flexBasis:0,flexGrow:1,maxWidth:"100%"};else if(r==="auto")o={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"};else{const a=rb({values:e.columns,breakpoints:t.breakpoints.values}),s=typeof a=="object"?a[i]:a;if(s==null)return n;const l=`${Math.round(r/s*1e8)/1e6}%`;let u={};if(e.container&&e.item&&e.columnSpacing!==0){const p=t.spacing(e.columnSpacing);if(p!=="0px"){const m=`calc(${l} + ${XC(p)})`;u={flexBasis:m,maxWidth:m}}}o=Fe({flexBasis:l,flexGrow:0,maxWidth:l},u)}return t.breakpoints.values[i]===0?Object.assign(n,o):n[t.breakpoints.up(i)]=o,n},{})}function UQe({theme:t,ownerState:e}){const r=rb({values:e.direction,breakpoints:t.breakpoints.values});return ed({theme:t},r,n=>{const i={flexDirection:n};return n.indexOf("column")===0&&(i[`& > .${jI.item}`]={maxWidth:"none"}),i})}function Boe({breakpoints:t,values:e}){let r="";Object.keys(e).forEach(i=>{r===""&&e[i]!==0&&(r=i)});const n=Object.keys(t).sort((i,o)=>t[i]-t[o]);return n.slice(0,n.indexOf(r))}function VQe({theme:t,ownerState:e}){const{container:r,rowSpacing:n}=e;let i={};if(r&&n!==0){const o=rb({values:n,breakpoints:t.breakpoints.values});let a;typeof o=="object"&&(a=Boe({breakpoints:t.breakpoints.values,values:o})),i=ed({theme:t},o,(s,l)=>{var u;const p=t.spacing(s);return p!=="0px"?{marginTop:`-${XC(p)}`,[`& > .${jI.item}`]:{paddingTop:XC(p)}}:(u=a)!=null&&u.includes(l)?{}:{marginTop:0,[`& > .${jI.item}`]:{paddingTop:0}}})}return i}function HQe({theme:t,ownerState:e}){const{container:r,columnSpacing:n}=e;let i={};if(r&&n!==0){const o=rb({values:n,breakpoints:t.breakpoints.values});let a;typeof o=="object"&&(a=Boe({breakpoints:t.breakpoints.values,values:o})),i=ed({theme:t},o,(s,l)=>{var u;const p=t.spacing(s);return p!=="0px"?{width:`calc(100% + ${XC(p)})`,marginLeft:`-${XC(p)}`,[`& > .${jI.item}`]:{paddingLeft:XC(p)}}:(u=a)!=null&&u.includes(l)?{}:{width:"100%",marginLeft:0,[`& > .${jI.item}`]:{paddingLeft:0}}})}return i}function WQe(t,e,r={}){if(!t||t<=0)return[];if(typeof t=="string"&&!Number.isNaN(Number(t))||typeof t=="number")return[r[`spacing-xs-${String(t)}`]];const n=[];return e.forEach(i=>{const o=t[i];Number(o)>0&&n.push(r[`spacing-${i}-${String(o)}`])}),n}const GQe=Nr("div",{name:"MuiGrid",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t,{container:n,direction:i,item:o,spacing:a,wrap:s,zeroMinWidth:l,breakpoints:u}=r;let p=[];n&&(p=WQe(a,u,e));const m=[];return u.forEach(v=>{const x=r[v];x&&m.push(e[`grid-${v}-${String(x)}`])}),[e.root,n&&e.container,o&&e.item,l&&e.zeroMinWidth,...p,i!=="row"&&e[`direction-xs-${String(i)}`],s!=="wrap"&&e[`wrap-xs-${String(s)}`],...m]}})(({ownerState:t})=>Fe({boxSizing:"border-box"},t.container&&{display:"flex",flexWrap:"wrap",width:"100%"},t.item&&{margin:0},t.zeroMinWidth&&{minWidth:0},t.wrap!=="wrap"&&{flexWrap:t.wrap}),UQe,VQe,HQe,jQe);function qQe(t,e){if(!t||t<=0)return[];if(typeof t=="string"&&!Number.isNaN(Number(t))||typeof t=="number")return[`spacing-xs-${String(t)}`];const r=[];return e.forEach(n=>{const i=t[n];if(Number(i)>0){const o=`spacing-${n}-${String(i)}`;r.push(o)}}),r}const XQe=t=>{const{classes:e,container:r,direction:n,item:i,spacing:o,wrap:a,zeroMinWidth:s,breakpoints:l}=t;let u=[];r&&(u=qQe(o,l));const p=[];l.forEach(v=>{const x=t[v];x&&p.push(`grid-${v}-${String(x)}`)});const m={root:["root",r&&"container",i&&"item",s&&"zeroMinWidth",...u,n!=="row"&&`direction-xs-${String(n)}`,a!=="wrap"&&`wrap-xs-${String(a)}`,...p]};return Qn(m,NQe,e)},YQe=Y.exports.forwardRef(function(e,r){const n=ti({props:e,name:"MuiGrid"}),{breakpoints:i}=km(),o=SI(n),{className:a,columns:s,columnSpacing:l,component:u="div",container:p=!1,direction:m="row",item:v=!1,rowSpacing:x,spacing:y=0,wrap:_="wrap",zeroMinWidth:w=!1}=o,C=bn(o,BQe),E=x||y,T=l||y,A=Y.exports.useContext(zoe),k=p?s||12:A,X={},Z=Fe({},C);i.keys.forEach(H=>{C[H]!=null&&(X[H]=C[H],delete Z[H])});const W=Fe({},o,{columns:k,container:p,direction:m,item:v,rowSpacing:E,columnSpacing:T,wrap:_,zeroMinWidth:w,spacing:y},X,{breakpoints:i.keys}),D=XQe(W);return Kt(zoe.Provider,{value:k,children:Kt(GQe,Fe({ownerState:W,className:ln(D.root,a),as:u,ref:r},Z))})});var VRt=YQe;const KQe=xWe({createStyledComponent:Nr("div",{name:"MuiGrid2",overridesResolver:(t,e)=>e.root}),componentName:"MuiGrid2",useThemeProps:t=>ti({props:t,name:"MuiGrid2"})});var HRt=KQe;const ZQe=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function Vj(t){return`scale(${t}, ${t**2})`}const QQe={entering:{opacity:1,transform:Vj(1)},entered:{opacity:1,transform:"none"}},Hj=typeof navigator!="undefined"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),joe=Y.exports.forwardRef(function(e,r){const{addEndListener:n,appear:i=!0,children:o,easing:a,in:s,onEnter:l,onEntered:u,onEntering:p,onExit:m,onExited:v,onExiting:x,style:y,timeout:_="auto",TransitionComponent:w=w3}=e,C=bn(e,ZQe),E=Y.exports.useRef(),T=Y.exports.useRef(),A=km(),k=Y.exports.useRef(null),X=ta(k,o.ref,r),Z=O=>F=>{if(O){const G=k.current;F===void 0?O(G):O(G,F)}},W=Z(p),D=Z((O,F)=>{Fj(O);const{duration:G,delay:q,easing:ee}=Nx({style:y,timeout:_,easing:a},{mode:"enter"});let re;_==="auto"?(re=A.transitions.getAutoHeightDuration(O.clientHeight),T.current=re):re=G,O.style.transition=[A.transitions.create("opacity",{duration:re,delay:q}),A.transitions.create("transform",{duration:Hj?re:re*.666,delay:q,easing:ee})].join(","),l&&l(O,F)}),H=Z(u),N=Z(x),j=Z(O=>{const{duration:F,delay:G,easing:q}=Nx({style:y,timeout:_,easing:a},{mode:"exit"});let ee;_==="auto"?(ee=A.transitions.getAutoHeightDuration(O.clientHeight),T.current=ee):ee=F,O.style.transition=[A.transitions.create("opacity",{duration:ee,delay:G}),A.transitions.create("transform",{duration:Hj?ee:ee*.666,delay:Hj?G:G||ee*.333,easing:q})].join(","),O.style.opacity=0,O.style.transform=Vj(.75),m&&m(O)}),$=Z(v),z=O=>{_==="auto"&&(E.current=setTimeout(O,T.current||0)),n&&n(k.current,O)};return Y.exports.useEffect(()=>()=>{clearTimeout(E.current)},[]),Kt(w,Fe({appear:i,in:s,nodeRef:k,onEnter:D,onEntered:H,onEntering:W,onExit:j,onExited:$,onExiting:N,addEndListener:z,timeout:_==="auto"?null:_},C,{children:(O,F)=>Y.exports.cloneElement(o,Fe({style:Fe({opacity:0,transform:Vj(.75),visibility:O==="exited"&&!s?"hidden":void 0},QQe[O],y,o.props.style),ref:X},F))}))});joe.muiSupportAuto=!0;var Wj=joe;function JQe(t,e,r,n,i){const[o,a]=Y.exports.useState(()=>i&&r?r(t).matches:n?n(t).matches:e);return np(()=>{let s=!0;if(!r)return;const l=r(t),u=()=>{s&&a(l.matches)};return u(),l.addListener(u),()=>{s=!1,l.removeListener(u)}},[t,r]),o}const Uoe=B0["useSyncExternalStore"];function eJe(t,e,r,n,i){const o=Y.exports.useCallback(()=>e,[e]),a=Y.exports.useMemo(()=>{if(i&&r)return()=>r(t).matches;if(n!==null){const{matches:p}=n(t);return()=>p}return o},[o,t,n,i,r]),[s,l]=Y.exports.useMemo(()=>{if(r===null)return[o,()=>()=>{}];const p=r(t);return[()=>p.matches,m=>(p.addListener(m),()=>{p.removeListener(m)})]},[o,r,t]);return Uoe(l,s,a)}function WRt(t,e={}){const r=gj(),n=typeof window!="undefined"&&typeof window.matchMedia!="undefined",{defaultMatches:i=!1,matchMedia:o=n?window.matchMedia:null,ssrMatchMedia:a=null,noSsr:s=!1}=Eie({name:"MuiUseMediaQuery",props:e,theme:r});let l=typeof t=="function"?t(r):t;return l=l.replace(/^@media( ?)/m,""),(Uoe!==void 0?eJe:JQe)(l,i,o,a,s)}const tJe=["disableUnderline","components","componentsProps","fullWidth","inputComponent","multiline","slotProps","slots","type"],rJe=t=>{const{classes:e,disableUnderline:r}=t,i=Qn({root:["root",!r&&"underline"],input:["input"]},sKe,e);return Fe({},e,i)},nJe=Nr(A3,{shouldForwardProp:t=>Jd(t)||t==="classes",name:"MuiInput",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[...I3(t,e),!r.disableUnderline&&e.underline]}})(({theme:t,ownerState:e})=>{let n=t.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return t.vars&&(n=`rgba(${t.vars.palette.common.onBackgroundChannel} / ${t.vars.opacity.inputUnderline})`),Fe({position:"relative"},e.formControl&&{"label + &":{marginTop:16}},!e.disableUnderline&&{"&:after":{borderBottom:`2px solid ${(t.vars||t).palette[e.color].main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${zx.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${zx.error}`]:{"&:before, &:after":{borderBottomColor:(t.vars||t).palette.error.main}},"&:before":{borderBottom:`1px solid ${n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:t.transitions.create("border-bottom-color",{duration:t.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${zx.disabled}, .${zx.error}):before`]:{borderBottom:`2px solid ${(t.vars||t).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${n}`}},[`&.${zx.disabled}:before`]:{borderBottomStyle:"dotted"}})}),iJe=Nr(R3,{name:"MuiInput",slot:"Input",overridesResolver:M3})({}),Voe=Y.exports.forwardRef(function(e,r){var n,i,o,a;const s=ti({props:e,name:"MuiInput"}),{disableUnderline:l,components:u={},componentsProps:p,fullWidth:m=!1,inputComponent:v="input",multiline:x=!1,slotProps:y,slots:_={},type:w="text"}=s,C=bn(s,tJe),E=rJe(s),A={root:{ownerState:{disableUnderline:l}}},k=(y!=null?y:p)?Zf(y!=null?y:p,A):A,X=(n=(i=_.root)!=null?i:u.Root)!=null?n:nJe,Z=(o=(a=_.input)!=null?a:u.Input)!=null?o:iJe;return Kt(jj,Fe({slots:{root:X,input:Z},slotProps:k,fullWidth:m,inputComponent:v,multiline:x,ref:r,type:w},C,{classes:E}))});Voe.muiName="Input";var Hoe=Voe;function oJe(t){return Kn("MuiInputAdornment",t)}const sJe=ei("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);var Woe=sJe,Goe;const aJe=["children","className","component","disablePointerEvents","disableTypography","position","variant"],lJe=(t,e)=>{const{ownerState:r}=t;return[e.root,e[`position${Pr(r.position)}`],r.disablePointerEvents===!0&&e.disablePointerEvents,e[r.variant]]},cJe=t=>{const{classes:e,disablePointerEvents:r,hiddenLabel:n,position:i,size:o,variant:a}=t,s={root:["root",r&&"disablePointerEvents",i&&`position${Pr(i)}`,a,n&&"hiddenLabel",o&&`size${Pr(o)}`]};return Qn(s,oJe,e)},uJe=Nr("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:lJe})(({theme:t,ownerState:e})=>Fe({display:"flex",height:"0.01em",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(t.vars||t).palette.action.active},e.variant==="filled"&&{[`&.${Woe.positionStart}&:not(.${Woe.hiddenLabel})`]:{marginTop:16}},e.position==="start"&&{marginRight:8},e.position==="end"&&{marginLeft:8},e.disablePointerEvents===!0&&{pointerEvents:"none"})),fJe=Y.exports.forwardRef(function(e,r){const n=ti({props:e,name:"MuiInputAdornment"}),{children:i,className:o,component:a="div",disablePointerEvents:s=!1,disableTypography:l=!1,position:u,variant:p}=n,m=bn(n,aJe),v=Qg()||{};let x=p;p&&v.variant,v&&!x&&(x=v.variant);const y=Fe({},n,{hiddenLabel:v.hiddenLabel,size:v.size,disablePointerEvents:s,position:u,variant:x}),_=cJe(y);return Kt(P3.Provider,{value:null,children:Kt(uJe,Fe({as:a,ownerState:y,className:ln(_.root,o),ref:r},m,{children:typeof i=="string"&&!l?Kt($x,{color:"text.secondary",children:i}):Ji(Y.exports.Fragment,{children:[u==="start"?Goe||(Goe=Kt("span",{className:"notranslate",children:"\u200B"})):null,i]})}))})});var GRt=fJe;function dJe(t){return Kn("MuiInputLabel",t)}ei("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const hJe=["disableAnimation","margin","shrink","variant","className"],pJe=t=>{const{classes:e,formControl:r,size:n,shrink:i,disableAnimation:o,variant:a,required:s}=t,u=Qn({root:["root",r&&"formControl",!o&&"animated",i&&"shrink",n==="small"&&"sizeSmall",a],asterisk:[s&&"asterisk"]},dJe,e);return Fe({},e,u)},mJe=Nr(LQe,{shouldForwardProp:t=>Jd(t)||t==="classes",name:"MuiInputLabel",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[{[`& .${zI.asterisk}`]:e.asterisk},e.root,r.formControl&&e.formControl,r.size==="small"&&e.sizeSmall,r.shrink&&e.shrink,!r.disableAnimation&&e.animated,e[r.variant]]}})(({theme:t,ownerState:e})=>Fe({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%"},e.formControl&&{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"},e.size==="small"&&{transform:"translate(0, 17px) scale(1)"},e.shrink&&{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"},!e.disableAnimation&&{transition:t.transitions.create(["color","transform","max-width"],{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut})},e.variant==="filled"&&Fe({zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},e.size==="small"&&{transform:"translate(12px, 13px) scale(1)"},e.shrink&&Fe({userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"},e.size==="small"&&{transform:"translate(12px, 4px) scale(0.75)"})),e.variant==="outlined"&&Fe({zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},e.size==="small"&&{transform:"translate(14px, 9px) scale(1)"},e.shrink&&{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}))),gJe=Y.exports.forwardRef(function(e,r){const n=ti({name:"MuiInputLabel",props:e}),{disableAnimation:i=!1,shrink:o,className:a}=n,s=bn(n,hJe),l=Qg();let u=o;typeof u=="undefined"&&l&&(u=l.filled||l.focused||l.adornedStart);const p=Fx({props:n,muiFormControl:l,states:["size","variant","required"]}),m=Fe({},n,{disableAnimation:i,formControl:l,shrink:u,size:p.size,variant:p.variant,required:p.required}),v=pJe(m);return Kt(mJe,Fe({"data-shrink":u,ownerState:m,ref:r,className:ln(v.root,a)},s,{classes:v}))});var vJe=gJe;function yJe(t){return Kn("MuiLinearProgress",t)}ei("MuiLinearProgress",["root","colorPrimary","colorSecondary","determinate","indeterminate","buffer","query","dashed","dashedColorPrimary","dashedColorSecondary","bar","barColorPrimary","barColorSecondary","bar1Indeterminate","bar1Determinate","bar1Buffer","bar2Indeterminate","bar2Buffer"]);const xJe=["className","color","value","valueBuffer","variant"];let YC=t=>t,qoe,Xoe,Yoe,Koe,Zoe,Qoe;const Gj=4,_Je=qg(qoe||(qoe=YC` 0% { left: -35%; right: 100%; } 60% { left: 100%; right: -90%; } 100% { left: 100%; right: -90%; } `)),bJe=qg(Xoe||(Xoe=YC` 0% { left: -200%; right: 100%; } 60% { left: 107%; right: -8%; } 100% { left: 107%; right: -8%; } `)),wJe=qg(Yoe||(Yoe=YC` 0% { opacity: 1; background-position: 0 -23px; } 60% { opacity: 0; background-position: 0 -23px; } 100% { opacity: 1; background-position: -200px -23px; } `)),CJe=t=>{const{classes:e,variant:r,color:n}=t,i={root:["root",`color${Pr(n)}`,r],dashed:["dashed",`dashedColor${Pr(n)}`],bar1:["bar",`barColor${Pr(n)}`,(r==="indeterminate"||r==="query")&&"bar1Indeterminate",r==="determinate"&&"bar1Determinate",r==="buffer"&&"bar1Buffer"],bar2:["bar",r!=="buffer"&&`barColor${Pr(n)}`,r==="buffer"&&`color${Pr(n)}`,(r==="indeterminate"||r==="query")&&"bar2Indeterminate",r==="buffer"&&"bar2Buffer"]};return Qn(i,yJe,e)},qj=(t,e)=>e==="inherit"?"currentColor":t.vars?t.vars.palette.LinearProgress[`${e}Bg`]:t.palette.mode==="light"?l3(t.palette[e].main,.62):a3(t.palette[e].main,.5),EJe=Nr("span",{name:"MuiLinearProgress",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,e[`color${Pr(r.color)}`],e[r.variant]]}})(({ownerState:t,theme:e})=>Fe({position:"relative",overflow:"hidden",display:"block",height:4,zIndex:0,"@media print":{colorAdjust:"exact"},backgroundColor:qj(e,t.color)},t.color==="inherit"&&t.variant!=="buffer"&&{backgroundColor:"none","&::before":{content:'""',position:"absolute",left:0,top:0,right:0,bottom:0,backgroundColor:"currentColor",opacity:.3}},t.variant==="buffer"&&{backgroundColor:"transparent"},t.variant==="query"&&{transform:"rotate(180deg)"})),SJe=Nr("span",{name:"MuiLinearProgress",slot:"Dashed",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.dashed,e[`dashedColor${Pr(r.color)}`]]}})(({ownerState:t,theme:e})=>{const r=qj(e,t.color);return Fe({position:"absolute",marginTop:0,height:"100%",width:"100%"},t.color==="inherit"&&{opacity:.3},{backgroundImage:`radial-gradient(${r} 0%, ${r} 16%, transparent 42%)`,backgroundSize:"10px 10px",backgroundPosition:"0 -23px"})},Ox(Koe||(Koe=YC` animation: ${0} 3s infinite linear; `),wJe)),TJe=Nr("span",{name:"MuiLinearProgress",slot:"Bar1",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.bar,e[`barColor${Pr(r.color)}`],(r.variant==="indeterminate"||r.variant==="query")&&e.bar1Indeterminate,r.variant==="determinate"&&e.bar1Determinate,r.variant==="buffer"&&e.bar1Buffer]}})(({ownerState:t,theme:e})=>Fe({width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left",backgroundColor:t.color==="inherit"?"currentColor":(e.vars||e).palette[t.color].main},t.variant==="determinate"&&{transition:`transform .${Gj}s linear`},t.variant==="buffer"&&{zIndex:1,transition:`transform .${Gj}s linear`}),({ownerState:t})=>(t.variant==="indeterminate"||t.variant==="query")&&Ox(Zoe||(Zoe=YC` width: auto; animation: ${0} 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite; `),_Je)),PJe=Nr("span",{name:"MuiLinearProgress",slot:"Bar2",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.bar,e[`barColor${Pr(r.color)}`],(r.variant==="indeterminate"||r.variant==="query")&&e.bar2Indeterminate,r.variant==="buffer"&&e.bar2Buffer]}})(({ownerState:t,theme:e})=>Fe({width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left"},t.variant!=="buffer"&&{backgroundColor:t.color==="inherit"?"currentColor":(e.vars||e).palette[t.color].main},t.color==="inherit"&&{opacity:.3},t.variant==="buffer"&&{backgroundColor:qj(e,t.color),transition:`transform .${Gj}s linear`}),({ownerState:t})=>(t.variant==="indeterminate"||t.variant==="query")&&Ox(Qoe||(Qoe=YC` width: auto; animation: ${0} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite; `),bJe)),IJe=Y.exports.forwardRef(function(e,r){const n=ti({props:e,name:"MuiLinearProgress"}),{className:i,color:o="primary",value:a,valueBuffer:s,variant:l="indeterminate"}=n,u=bn(n,xJe),p=Fe({},n,{color:o,variant:l}),m=CJe(p),v=km(),x={},y={bar1:{},bar2:{}};if((l==="determinate"||l==="buffer")&&a!==void 0){x["aria-valuenow"]=Math.round(a),x["aria-valuemin"]=0,x["aria-valuemax"]=100;let _=a-100;v.direction==="rtl"&&(_=-_),y.bar1.transform=`translateX(${_}%)`}if(l==="buffer"&&s!==void 0){let _=(s||0)-100;v.direction==="rtl"&&(_=-_),y.bar2.transform=`translateX(${_}%)`}return Ji(EJe,Fe({className:ln(m.root,i),ownerState:p,role:"progressbar"},x,{ref:r},u,{children:[l==="buffer"?Kt(SJe,{className:m.dashed,ownerState:p}):null,Kt(TJe,{className:m.bar1,ownerState:p,style:y.bar1}),l==="determinate"?null:Kt(PJe,{className:m.bar2,ownerState:p,style:y.bar2})]}))});var MJe=IJe;function AJe(t){return Kn("MuiLink",t)}const RJe=ei("MuiLink",["root","underlineNone","underlineHover","underlineAlways","button","focusVisible"]);var kJe=RJe;const Joe={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},OJe=t=>Joe[t]||t,LJe=({theme:t,ownerState:e})=>{const r=OJe(e.color),n=NC(t,`palette.${r}`,!1)||e.color,i=NC(t,`palette.${r}Channel`);return"vars"in t&&i?`rgba(${i} / 0.4)`:co(n,.4)};var DJe=LJe;const NJe=["className","color","component","onBlur","onFocus","TypographyClasses","underline","variant","sx"],$Je=t=>{const{classes:e,component:r,focusVisible:n,underline:i}=t,o={root:["root",`underline${Pr(i)}`,r==="button"&&"button",n&&"focusVisible"]};return Qn(o,AJe,e)},FJe=Nr($x,{name:"MuiLink",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,e[`underline${Pr(r.underline)}`],r.component==="button"&&e.button]}})(({theme:t,ownerState:e})=>Fe({},e.underline==="none"&&{textDecoration:"none"},e.underline==="hover"&&{textDecoration:"none","&:hover":{textDecoration:"underline"}},e.underline==="always"&&Fe({textDecoration:"underline"},e.color!=="inherit"&&{textDecorationColor:DJe({theme:t,ownerState:e})},{"&:hover":{textDecorationColor:"inherit"}}),e.component==="button"&&{position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none","&::-moz-focus-inner":{borderStyle:"none"},[`&.${kJe.focusVisible}`]:{outline:"auto"}})),zJe=Y.exports.forwardRef(function(e,r){const n=ti({props:e,name:"MuiLink"}),{className:i,color:o="primary",component:a="a",onBlur:s,onFocus:l,TypographyClasses:u,underline:p="always",variant:m="inherit",sx:v}=n,x=bn(n,NJe),{isFocusVisibleRef:y,onBlur:_,onFocus:w,ref:C}=vI(),[E,T]=Y.exports.useState(!1),A=ta(r,C),k=D=>{_(D),y.current===!1&&T(!1),s&&s(D)},X=D=>{w(D),y.current===!0&&T(!0),l&&l(D)},Z=Fe({},n,{color:o,component:a,focusVisible:E,underline:p,variant:m}),W=$Je(Z);return Kt(FJe,Fe({color:o,className:ln(W.root,i),classes:u,component:a,onBlur:k,onFocus:X,ref:A,ownerState:Z,variant:m,sx:[...Object.keys(Joe).includes(o)?[]:[{color:o}],...Array.isArray(v)?v:[v]]},x))});var qRt=zJe;const BJe=Y.exports.createContext({});var N3=BJe;function jJe(t){return Kn("MuiList",t)}ei("MuiList",["root","padding","dense","subheader"]);const UJe=["children","className","component","dense","disablePadding","subheader"],VJe=t=>{const{classes:e,disablePadding:r,dense:n,subheader:i}=t;return Qn({root:["root",!r&&"padding",n&&"dense",i&&"subheader"]},jJe,e)},HJe=Nr("ul",{name:"MuiList",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,!r.disablePadding&&e.padding,r.dense&&e.dense,r.subheader&&e.subheader]}})(({ownerState:t})=>Fe({listStyle:"none",margin:0,padding:0,position:"relative"},!t.disablePadding&&{paddingTop:8,paddingBottom:8},t.subheader&&{paddingTop:0})),WJe=Y.exports.forwardRef(function(e,r){const n=ti({props:e,name:"MuiList"}),{children:i,className:o,component:a="ul",dense:s=!1,disablePadding:l=!1,subheader:u}=n,p=bn(n,UJe),m=Y.exports.useMemo(()=>({dense:s}),[s]),v=Fe({},n,{component:a,dense:s,disablePadding:l}),x=VJe(v);return Kt(N3.Provider,{value:m,children:Ji(HJe,Fe({as:a,className:ln(x.root,o),ref:r,ownerState:v},p,{children:[u,i]}))})});var GJe=WJe;const qJe=ei("MuiListItemIcon",["root","alignItemsFlexStart"]);var ese=qJe;function XJe(t){return Kn("MuiListItemText",t)}const YJe=ei("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]);var $3=YJe;const KJe=["children","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"],ZJe=t=>{const{classes:e,inset:r,primary:n,secondary:i,dense:o}=t;return Qn({root:["root",r&&"inset",o&&"dense",n&&i&&"multiline"],primary:["primary"],secondary:["secondary"]},XJe,e)},QJe=Nr("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[{[`& .${$3.primary}`]:e.primary},{[`& .${$3.secondary}`]:e.secondary},e.root,r.inset&&e.inset,r.primary&&r.secondary&&e.multiline,r.dense&&e.dense]}})(({ownerState:t})=>Fe({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},t.primary&&t.secondary&&{marginTop:6,marginBottom:6},t.inset&&{paddingLeft:56})),JJe=Y.exports.forwardRef(function(e,r){const n=ti({props:e,name:"MuiListItemText"}),{children:i,className:o,disableTypography:a=!1,inset:s=!1,primary:l,primaryTypographyProps:u,secondary:p,secondaryTypographyProps:m}=n,v=bn(n,KJe),{dense:x}=Y.exports.useContext(N3);let y=l!=null?l:i,_=p;const w=Fe({},n,{disableTypography:a,inset:s,primary:!!y,secondary:!!_,dense:x}),C=ZJe(w);return y!=null&&y.type!==$x&&!a&&(y=Kt($x,Fe({variant:x?"body2":"body1",className:C.primary,component:u!=null&&u.variant?void 0:"span",display:"block"},u,{children:y}))),_!=null&&_.type!==$x&&!a&&(_=Kt($x,Fe({variant:"body2",className:C.secondary,color:"text.secondary",display:"block"},m,{children:_}))),Ji(QJe,Fe({className:ln(C.root,o),ownerState:w,ref:r},v,{children:[y,_]}))});var XRt=JJe;const eet=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function Xj(t,e,r){return t===e?t.firstChild:e&&e.nextElementSibling?e.nextElementSibling:r?null:t.firstChild}function tse(t,e,r){return t===e?r?t.firstChild:t.lastChild:e&&e.previousElementSibling?e.previousElementSibling:r?null:t.lastChild}function rse(t,e){if(e===void 0)return!0;let r=t.innerText;return r===void 0&&(r=t.textContent),r=r.trim().toLowerCase(),r.length===0?!1:e.repeating?r[0]===e.keys[0]:r.indexOf(e.keys.join(""))===0}function UI(t,e,r,n,i,o){let a=!1,s=i(t,e,e?r:!1);for(;s;){if(s===t.firstChild){if(a)return!1;a=!0}const l=n?!1:s.disabled||s.getAttribute("aria-disabled")==="true";if(!s.hasAttribute("tabindex")||!rse(s,o)||l)s=i(t,s,r);else return s.focus(),!0}return!1}const tet=Y.exports.forwardRef(function(e,r){const{actions:n,autoFocus:i=!1,autoFocusItem:o=!1,children:a,className:s,disabledItemsFocusable:l=!1,disableListWrap:u=!1,onKeyDown:p,variant:m="selectedMenu"}=e,v=bn(e,eet),x=Y.exports.useRef(null),y=Y.exports.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});np(()=>{i&&x.current.focus()},[i]),Y.exports.useImperativeHandle(n,()=>({adjustStyleForScrollbar:(T,A)=>{const k=!x.current.style.width;if(T.clientHeight<x.current.clientHeight&&k){const X=`${Vne(wl(T))}px`;x.current.style[A.direction==="rtl"?"paddingLeft":"paddingRight"]=X,x.current.style.width=`calc(100% + ${X})`}return x.current}}),[]);const _=T=>{const A=x.current,k=T.key,X=wl(A).activeElement;if(k==="ArrowDown")T.preventDefault(),UI(A,X,u,l,Xj);else if(k==="ArrowUp")T.preventDefault(),UI(A,X,u,l,tse);else if(k==="Home")T.preventDefault(),UI(A,null,u,l,Xj);else if(k==="End")T.preventDefault(),UI(A,null,u,l,tse);else if(k.length===1){const Z=y.current,W=k.toLowerCase(),D=performance.now();Z.keys.length>0&&(D-Z.lastTime>500?(Z.keys=[],Z.repeating=!0,Z.previousKeyMatched=!0):Z.repeating&&W!==Z.keys[0]&&(Z.repeating=!1)),Z.lastTime=D,Z.keys.push(W);const H=X&&!Z.repeating&&rse(X,Z);Z.previousKeyMatched&&(H||UI(A,X,!1,l,Xj,Z))?T.preventDefault():Z.previousKeyMatched=!1}p&&p(T)},w=ta(x,r);let C=-1;Y.exports.Children.forEach(a,(T,A)=>{!Y.exports.isValidElement(T)||(T.props.disabled||(m==="selectedMenu"&&T.props.selected||C===-1)&&(C=A),C===A&&(T.props.disabled||T.props.muiSkipListHighlight||T.type.muiSkipListHighlight)&&(C+=1,C>=a.length&&(C=-1)))});const E=Y.exports.Children.map(a,(T,A)=>{if(A===C){const k={};return o&&(k.autoFocus=!0),T.props.tabIndex===void 0&&m==="selectedMenu"&&(k.tabIndex=0),Y.exports.cloneElement(T,k)}return T});return Kt(GJe,Fe({role:"menu",ref:w,className:s,onKeyDown:_,tabIndex:i?0:-1},v,{children:E}))});var ret=tet;function net(t){return Kn("MuiPopover",t)}ei("MuiPopover",["root","paper"]);const iet=["onEntering"],oet=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps"];function nse(t,e){let r=0;return typeof e=="number"?r=e:e==="center"?r=t.height/2:e==="bottom"&&(r=t.height),r}function ise(t,e){let r=0;return typeof e=="number"?r=e:e==="center"?r=t.width/2:e==="right"&&(r=t.width),r}function ose(t){return[t.horizontal,t.vertical].map(e=>typeof e=="number"?`${e}px`:e).join(" ")}function Yj(t){return typeof t=="function"?t():t}const set=t=>{const{classes:e}=t;return Qn({root:["root"],paper:["paper"]},net,e)},aet=Nr(LZe,{name:"MuiPopover",slot:"Root",overridesResolver:(t,e)=>e.root})({}),cet=Nr(cb,{name:"MuiPopover",slot:"Paper",overridesResolver:(t,e)=>e.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),uet=Y.exports.forwardRef(function(e,r){const n=ti({props:e,name:"MuiPopover"}),{action:i,anchorEl:o,anchorOrigin:a={vertical:"top",horizontal:"left"},anchorPosition:s,anchorReference:l="anchorEl",children:u,className:p,container:m,elevation:v=8,marginThreshold:x=16,open:y,PaperProps:_={},transformOrigin:w={vertical:"top",horizontal:"left"},TransitionComponent:C=Wj,transitionDuration:E="auto",TransitionProps:{onEntering:T}={}}=n,A=bn(n.TransitionProps,iet),k=bn(n,oet),X=Y.exports.useRef(),Z=ta(X,_.ref),W=Fe({},n,{anchorOrigin:a,anchorReference:l,elevation:v,marginThreshold:x,PaperProps:_,transformOrigin:w,TransitionComponent:C,transitionDuration:E,TransitionProps:A}),D=set(W),H=Y.exports.useCallback(()=>{if(l==="anchorPosition")return s;const re=Yj(o),fe=(re&&re.nodeType===1?re:wl(X.current).body).getBoundingClientRect();return{top:fe.top+nse(fe,a.vertical),left:fe.left+ise(fe,a.horizontal)}},[o,a.horizontal,a.vertical,s,l]),N=Y.exports.useCallback(re=>({vertical:nse(re,w.vertical),horizontal:ise(re,w.horizontal)}),[w.horizontal,w.vertical]),j=Y.exports.useCallback(re=>{const ce={width:re.offsetWidth,height:re.offsetHeight},fe=N(ce);if(l==="none")return{top:null,left:null,transformOrigin:ose(fe)};const J=H();let oe=J.top-fe.vertical,ve=J.left-fe.horizontal;const ye=oe+ce.height,xe=ve+ce.width,se=rp(Yj(o)),me=se.innerHeight-x,pe=se.innerWidth-x;if(oe<x){const Ce=oe-x;oe-=Ce,fe.vertical+=Ce}else if(ye>me){const Ce=ye-me;oe-=Ce,fe.vertical+=Ce}if(ve<x){const Ce=ve-x;ve-=Ce,fe.horizontal+=Ce}else if(xe>pe){const Ce=xe-pe;ve-=Ce,fe.horizontal+=Ce}return{top:`${Math.round(oe)}px`,left:`${Math.round(ve)}px`,transformOrigin:ose(fe)}},[o,l,H,N,x]),[$,z]=Y.exports.useState(y),O=Y.exports.useCallback(()=>{const re=X.current;if(!re)return;const ce=j(re);ce.top!==null&&(re.style.top=ce.top),ce.left!==null&&(re.style.left=ce.left),re.style.transformOrigin=ce.transformOrigin,z(!0)},[j]),F=(re,ce)=>{T&&T(re,ce),O()},G=()=>{z(!1)};Y.exports.useEffect(()=>{y&&O()}),Y.exports.useImperativeHandle(i,()=>y?{updatePosition:()=>{O()}}:null,[y,O]),Y.exports.useEffect(()=>{if(!y)return;const re=tb(()=>{O()}),ce=rp(o);return ce.addEventListener("resize",re),()=>{re.clear(),ce.removeEventListener("resize",re)}},[o,y,O]);let q=E;E==="auto"&&!C.muiSupportAuto&&(q=void 0);const ee=m||(o?wl(Yj(o)).body:void 0);return Kt(aet,Fe({BackdropProps:{invisible:!0},className:ln(D.root,p),container:ee,open:y,ref:r,ownerState:W},k,{children:Kt(C,Fe({appear:!0,in:y,onEntering:F,onExited:G,timeout:q},A,{children:Kt(cet,Fe({elevation:v},_,{ref:Z,className:ln(D.paper,_.className)},$?void 0:{style:Fe({},_.style,{opacity:0})},{ownerState:W,children:u}))}))}))});var fet=uet;function det(t){return Kn("MuiMenu",t)}ei("MuiMenu",["root","paper","list"]);const het=["onEntering"],pet=["autoFocus","children","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant"],met={vertical:"top",horizontal:"right"},get={vertical:"top",horizontal:"left"},vet=t=>{const{classes:e}=t;return Qn({root:["root"],paper:["paper"],list:["list"]},det,e)},yet=Nr(fet,{shouldForwardProp:t=>Jd(t)||t==="classes",name:"MuiMenu",slot:"Root",overridesResolver:(t,e)=>e.root})({}),xet=Nr(cb,{name:"MuiMenu",slot:"Paper",overridesResolver:(t,e)=>e.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),_et=Nr(ret,{name:"MuiMenu",slot:"List",overridesResolver:(t,e)=>e.list})({outline:0}),bet=Y.exports.forwardRef(function(e,r){const n=ti({props:e,name:"MuiMenu"}),{autoFocus:i=!0,children:o,disableAutoFocusItem:a=!1,MenuListProps:s={},onClose:l,open:u,PaperProps:p={},PopoverClasses:m,transitionDuration:v="auto",TransitionProps:{onEntering:x}={},variant:y="selectedMenu"}=n,_=bn(n.TransitionProps,het),w=bn(n,pet),C=km(),E=C.direction==="rtl",T=Fe({},n,{autoFocus:i,disableAutoFocusItem:a,MenuListProps:s,onEntering:x,PaperProps:p,transitionDuration:v,TransitionProps:_,variant:y}),A=vet(T),k=i&&!a&&u,X=Y.exports.useRef(null),Z=(H,N)=>{X.current&&X.current.adjustStyleForScrollbar(H,C),x&&x(H,N)},W=H=>{H.key==="Tab"&&(H.preventDefault(),l&&l(H,"tabKeyDown"))};let D=-1;return Y.exports.Children.map(o,(H,N)=>{!Y.exports.isValidElement(H)||H.props.disabled||(y==="selectedMenu"&&H.props.selected||D===-1)&&(D=N)}),Kt(yet,Fe({onClose:l,anchorOrigin:{vertical:"bottom",horizontal:E?"right":"left"},transformOrigin:E?met:get,PaperProps:Fe({as:xet},p,{classes:Fe({},p.classes,{root:A.paper})}),className:A.root,open:u,ref:r,transitionDuration:v,TransitionProps:Fe({onEntering:Z},_),ownerState:T},w,{classes:m,children:Kt(_et,Fe({onKeyDown:W,actions:X,autoFocus:i&&(D===-1||a),autoFocusItem:k,variant:y},s,{className:ln(A.list,s.className),children:o}))}))});var wet=bet;function Cet(t){return Kn("MuiMenuItem",t)}const Eet=ei("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]);var VI=Eet;const Tet=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],Pet=(t,e)=>{const{ownerState:r}=t;return[e.root,r.dense&&e.dense,r.divider&&e.divider,!r.disableGutters&&e.gutters]},Iet=t=>{const{disabled:e,dense:r,divider:n,disableGutters:i,selected:o,classes:a}=t,l=Qn({root:["root",r&&"dense",e&&"disabled",!i&&"gutters",n&&"divider",o&&"selected"]},Cet,a);return Fe({},a,l)},Met=Nr(Zg,{shouldForwardProp:t=>Jd(t)||t==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver:Pet})(({theme:t,ownerState:e})=>Fe({},t.typography.body1,{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap"},!e.disableGutters&&{paddingLeft:16,paddingRight:16},e.divider&&{borderBottom:`1px solid ${(t.vars||t).palette.divider}`,backgroundClip:"padding-box"},{"&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${VI.selected}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:co(t.palette.primary.main,t.palette.action.selectedOpacity),[`&.${VI.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:co(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},[`&.${VI.selected}:hover`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:co(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:co(t.palette.primary.main,t.palette.action.selectedOpacity)}},[`&.${VI.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`&.${VI.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity},[`& + .${Ooe.root}`]:{marginTop:t.spacing(1),marginBottom:t.spacing(1)},[`& + .${Ooe.inset}`]:{marginLeft:52},[`& .${$3.root}`]:{marginTop:0,marginBottom:0},[`& .${$3.inset}`]:{paddingLeft:36},[`& .${ese.root}`]:{minWidth:36}},!e.dense&&{[t.breakpoints.up("sm")]:{minHeight:"auto"}},e.dense&&Fe({minHeight:32,paddingTop:4,paddingBottom:4},t.typography.body2,{[`& .${ese.root} svg`]:{fontSize:"1.25rem"}}))),Aet=Y.exports.forwardRef(function(e,r){const n=ti({props:e,name:"MuiMenuItem"}),{autoFocus:i=!1,component:o="li",dense:a=!1,divider:s=!1,disableGutters:l=!1,focusVisibleClassName:u,role:p="menuitem",tabIndex:m,className:v}=n,x=bn(n,Tet),y=Y.exports.useContext(N3),_=Y.exports.useMemo(()=>({dense:a||y.dense||!1,disableGutters:l}),[y.dense,a,l]),w=Y.exports.useRef(null);np(()=>{i&&w.current&&w.current.focus()},[i]);const C=Fe({},n,{dense:_.dense,divider:s,disableGutters:l}),E=Iet(n),T=ta(w,r);let A;return n.disabled||(A=m!==void 0?m:-1),Kt(N3.Provider,{value:_,children:Kt(Met,Fe({ref:T,role:p,tabIndex:A,component:o,focusVisibleClassName:ln(E.focusVisible,u),className:ln(E.root,v)},x,{ownerState:C,classes:E}))})});var YRt=Aet;function Ret(t){return Kn("MuiMobileStepper",t)}ei("MuiMobileStepper",["root","positionBottom","positionTop","positionStatic","dots","dot","dotActive","progress"]);const ket=["activeStep","backButton","className","LinearProgressProps","nextButton","position","steps","variant"],Oet=t=>{const{classes:e,position:r}=t,n={root:["root",`position${Pr(r)}`],dots:["dots"],dot:["dot"],dotActive:["dotActive"],progress:["progress"]};return Qn(n,Ret,e)},Let=Nr(cb,{name:"MuiMobileStepper",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,e[`position${Pr(r.position)}`]]}})(({theme:t,ownerState:e})=>Fe({display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",background:(t.vars||t).palette.background.default,padding:8},e.position==="bottom"&&{position:"fixed",bottom:0,left:0,right:0,zIndex:(t.vars||t).zIndex.mobileStepper},e.position==="top"&&{position:"fixed",top:0,left:0,right:0,zIndex:(t.vars||t).zIndex.mobileStepper})),Det=Nr("div",{name:"MuiMobileStepper",slot:"Dots",overridesResolver:(t,e)=>e.dots})(({ownerState:t})=>Fe({},t.variant==="dots"&&{display:"flex",flexDirection:"row"})),Net=Nr("div",{name:"MuiMobileStepper",slot:"Dot",shouldForwardProp:t=>f3(t)&&t!=="dotActive",overridesResolver:(t,e)=>{const{dotActive:r}=t;return[e.dot,r&&e.dotActive]}})(({theme:t,ownerState:e,dotActive:r})=>Fe({},e.variant==="dots"&&Fe({transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest}),backgroundColor:(t.vars||t).palette.action.disabled,borderRadius:"50%",width:8,height:8,margin:"0 2px"},r&&{backgroundColor:(t.vars||t).palette.primary.main}))),$et=Nr(MJe,{name:"MuiMobileStepper",slot:"Progress",overridesResolver:(t,e)=>e.progress})(({ownerState:t})=>Fe({},t.variant==="progress"&&{width:"50%"})),Fet=Y.exports.forwardRef(function(e,r){const n=ti({props:e,name:"MuiMobileStepper"}),{activeStep:i=0,backButton:o,className:a,LinearProgressProps:s,nextButton:l,position:u="bottom",steps:p,variant:m="dots"}=n,v=bn(n,ket),x=Fe({},n,{activeStep:i,position:u,variant:m}),y=Oet(x);return Ji(Let,Fe({square:!0,elevation:0,className:ln(y.root,a),ref:r,ownerState:x},v,{children:[o,m==="text"&&Ji(Y.exports.Fragment,{children:[i+1," / ",p]}),m==="dots"&&Kt(Det,{ownerState:x,className:y.dots,children:[...new Array(p)].map((_,w)=>Kt(Net,{className:ln(y.dot,w===i&&y.dotActive),ownerState:x,dotActive:w===i},w))}),m==="progress"&&Kt($et,Fe({ownerState:x,className:y.progress,variant:"determinate",value:Math.ceil(i/(p-1)*100)},s)),l]}))});var KRt=Fet;function zet(t){return Kn("MuiNativeSelect",t)}const Bet=ei("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput"]);var Kj=Bet;const jet=["className","disabled","IconComponent","inputRef","variant"],Uet=t=>{const{classes:e,variant:r,disabled:n,multiple:i,open:o}=t,a={select:["select",r,n&&"disabled",i&&"multiple"],icon:["icon",`icon${Pr(r)}`,o&&"iconOpen",n&&"disabled"]};return Qn(a,zet,e)},sse=({ownerState:t,theme:e})=>Fe({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":Fe({},e.vars?{backgroundColor:`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.05)`}:{backgroundColor:e.palette.mode==="light"?"rgba(0, 0, 0, 0.05)":"rgba(255, 255, 255, 0.05)"},{borderRadius:0}),"&::-ms-expand":{display:"none"},[`&.${Kj.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(e.vars||e).palette.background.paper},"&&&":{paddingRight:24,minWidth:16}},t.variant==="filled"&&{"&&&":{paddingRight:32}},t.variant==="outlined"&&{borderRadius:(e.vars||e).shape.borderRadius,"&:focus":{borderRadius:(e.vars||e).shape.borderRadius},"&&&":{paddingRight:32}}),Vet=Nr("select",{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:Jd,overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.select,e[r.variant],{[`&.${Kj.multiple}`]:e.multiple}]}})(sse),ase=({ownerState:t,theme:e})=>Fe({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(e.vars||e).palette.action.active,[`&.${Kj.disabled}`]:{color:(e.vars||e).palette.action.disabled}},t.open&&{transform:"rotate(180deg)"},t.variant==="filled"&&{right:7},t.variant==="outlined"&&{right:7}),Het=Nr("svg",{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.icon,r.variant&&e[`icon${Pr(r.variant)}`],r.open&&e.iconOpen]}})(ase),Wet=Y.exports.forwardRef(function(e,r){const{className:n,disabled:i,IconComponent:o,inputRef:a,variant:s="standard"}=e,l=bn(e,jet),u=Fe({},e,{disabled:i,variant:s}),p=Uet(u);return Ji(Y.exports.Fragment,{children:[Kt(Vet,Fe({ownerState:u,className:ln(p.select,n),disabled:i,ref:a||r},l)),e.multiple?null:Kt(Het,{as:o,ownerState:u,className:p.icon})]})});var Get=Wet,lse;const qet=["children","classes","className","label","notched"],Xet=Nr("fieldset")({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),Yet=Nr("legend")(({ownerState:t,theme:e})=>Fe({float:"unset",width:"auto",overflow:"hidden"},!t.withLabel&&{padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})},t.withLabel&&Fe({display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:e.transitions.create("max-width",{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}},t.notched&&{maxWidth:"100%",transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})})));function Ket(t){const{className:e,label:r,notched:n}=t,i=bn(t,qet),o=r!=null&&r!=="",a=Fe({},t,{notched:n,withLabel:o});return Kt(Xet,Fe({"aria-hidden":!0,className:e,ownerState:a},i,{children:Kt(Yet,{ownerState:a,children:o?Kt("span",{children:r}):lse||(lse=Kt("span",{className:"notranslate",children:"\u200B"}))})}))}const Zet=["components","fullWidth","inputComponent","label","multiline","notched","slots","type"],Qet=t=>{const{classes:e}=t,n=Qn({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},lKe,e);return Fe({},e,n)},Jet=Nr(A3,{shouldForwardProp:t=>Jd(t)||t==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:I3})(({theme:t,ownerState:e})=>{const r=t.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return Fe({position:"relative",borderRadius:(t.vars||t).shape.borderRadius,[`&:hover .${Jg.notchedOutline}`]:{borderColor:(t.vars||t).palette.text.primary},"@media (hover: none)":{[`&:hover .${Jg.notchedOutline}`]:{borderColor:t.vars?`rgba(${t.vars.palette.common.onBackgroundChannel} / 0.23)`:r}},[`&.${Jg.focused} .${Jg.notchedOutline}`]:{borderColor:(t.vars||t).palette[e.color].main,borderWidth:2},[`&.${Jg.error} .${Jg.notchedOutline}`]:{borderColor:(t.vars||t).palette.error.main},[`&.${Jg.disabled} .${Jg.notchedOutline}`]:{borderColor:(t.vars||t).palette.action.disabled}},e.startAdornment&&{paddingLeft:14},e.endAdornment&&{paddingRight:14},e.multiline&&Fe({padding:"16.5px 14px"},e.size==="small"&&{padding:"8.5px 14px"}))}),ett=Nr(Ket,{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:(t,e)=>e.notchedOutline})(({theme:t})=>{const e=t.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:t.vars?`rgba(${t.vars.palette.common.onBackgroundChannel} / 0.23)`:e}}),ttt=Nr(R3,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:M3})(({theme:t,ownerState:e})=>Fe({padding:"16.5px 14px"},!t.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:t.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:t.palette.mode==="light"?null:"#fff",caretColor:t.palette.mode==="light"?null:"#fff",borderRadius:"inherit"}},t.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[t.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},e.size==="small"&&{padding:"8.5px 14px"},e.multiline&&{padding:0},e.startAdornment&&{paddingLeft:0},e.endAdornment&&{paddingRight:0})),cse=Y.exports.forwardRef(function(e,r){var n,i,o,a,s;const l=ti({props:e,name:"MuiOutlinedInput"}),{components:u={},fullWidth:p=!1,inputComponent:m="input",label:v,multiline:x=!1,notched:y,slots:_={},type:w="text"}=l,C=bn(l,Zet),E=Qet(l),T=Qg(),A=Fx({props:l,muiFormControl:T,states:["required"]}),k=Fe({},l,{color:A.color||"primary",disabled:A.disabled,error:A.error,focused:A.focused,formControl:T,fullWidth:p,hiddenLabel:A.hiddenLabel,multiline:x,size:A.size,type:w}),X=(n=(i=_.root)!=null?i:u.Root)!=null?n:Jet,Z=(o=(a=_.input)!=null?a:u.Input)!=null?o:ttt;return Kt(jj,Fe({slots:{root:X,input:Z},renderSuffix:W=>Kt(ett,{ownerState:k,className:E.notchedOutline,label:v!=null&&v!==""&&A.required?s||(s=Ji(Y.exports.Fragment,{children:[v,"\u2009","*"]})):v,notched:typeof y!="undefined"?y:Boolean(W.startAdornment||W.filled||W.focused)}),fullWidth:p,inputComponent:m,multiline:x,ref:r,type:w},C,{classes:Fe({},E,{notchedOutline:null})}))});cse.muiName="Input";var use=cse,rtt=nd(Kt("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"}),"RadioButtonUnchecked"),ntt=nd(Kt("path",{d:"M8.465 8.465C9.37 7.56 10.62 7 12 7C14.76 7 17 9.24 17 12C17 13.38 16.44 14.63 15.535 15.535C14.63 16.44 13.38 17 12 17C9.24 17 7 14.76 7 12C7 10.62 7.56 9.37 8.465 8.465Z"}),"RadioButtonChecked");const itt=Nr("span")({position:"relative",display:"flex"}),ott=Nr(rtt)({transform:"scale(1)"}),stt=Nr(ntt)(({theme:t,ownerState:e})=>Fe({left:0,position:"absolute",transform:"scale(0)",transition:t.transitions.create("transform",{easing:t.transitions.easing.easeIn,duration:t.transitions.duration.shortest})},e.checked&&{transform:"scale(1)",transition:t.transitions.create("transform",{easing:t.transitions.easing.easeOut,duration:t.transitions.duration.shortest})}));function fse(t){const{checked:e=!1,classes:r={},fontSize:n}=t,i=Fe({},t,{checked:e});return Ji(itt,{className:r.root,ownerState:i,children:[Kt(ott,{fontSize:n,className:r.background,ownerState:i}),Kt(stt,{fontSize:n,className:r.dot,ownerState:i})]})}const att=Y.exports.createContext(void 0);var dse=att;function ltt(){return Y.exports.useContext(dse)}function ctt(t){return Kn("MuiRadio",t)}const utt=ei("MuiRadio",["root","checked","disabled","colorPrimary","colorSecondary"]);var hse=utt;const ftt=["checked","checkedIcon","color","icon","name","onChange","size","className"],dtt=t=>{const{classes:e,color:r}=t,n={root:["root",`color${Pr(r)}`]};return Fe({},e,Qn(n,ctt,e))},htt=Nr(Ioe,{shouldForwardProp:t=>Jd(t)||t==="classes",name:"MuiRadio",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,e[`color${Pr(r.color)}`]]}})(({theme:t,ownerState:e})=>Fe({color:(t.vars||t).palette.text.secondary},!e.disableRipple&&{"&:hover":{backgroundColor:t.vars?`rgba(${e.color==="default"?t.vars.palette.action.activeChannel:t.vars.palette[e.color].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:co(e.color==="default"?t.palette.action.active:t.palette[e.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},e.color!=="default"&&{[`&.${hse.checked}`]:{color:(t.vars||t).palette[e.color].main}},{[`&.${hse.disabled}`]:{color:(t.vars||t).palette.action.disabled}}));function ptt(t,e){return typeof e=="object"&&e!==null?t===e:String(t)===String(e)}const pse=Kt(fse,{checked:!0}),mse=Kt(fse,{}),mtt=Y.exports.forwardRef(function(e,r){var n,i;const o=ti({props:e,name:"MuiRadio"}),{checked:a,checkedIcon:s=pse,color:l="primary",icon:u=mse,name:p,onChange:m,size:v="medium",className:x}=o,y=bn(o,ftt),_=Fe({},o,{color:l,size:v}),w=dtt(_),C=ltt();let E=a;const T=FD(m,C&&C.onChange);let A=p;return C&&(typeof E=="undefined"&&(E=ptt(C.value,o.value)),typeof A=="undefined"&&(A=C.name)),Kt(htt,Fe({type:"radio",icon:Y.exports.cloneElement(u,{fontSize:(n=mse.props.fontSize)!=null?n:v}),checkedIcon:Y.exports.cloneElement(s,{fontSize:(i=pse.props.fontSize)!=null?i:v}),ownerState:_,classes:w,name:A,checked:E,onChange:T,ref:r,className:ln(w.root,x)},y))});var ZRt=mtt;const gtt=["actions","children","defaultValue","name","onChange","value"],vtt=Y.exports.forwardRef(function(e,r){const{actions:n,children:i,defaultValue:o,name:a,onChange:s,value:l}=e,u=bn(e,gtt),p=Y.exports.useRef(null),[m,v]=Rm({controlled:l,default:o,name:"RadioGroup"});Y.exports.useImperativeHandle(n,()=>({focus:()=>{let w=p.current.querySelector("input:not(:disabled):checked");w||(w=p.current.querySelector("input:not(:disabled)")),w&&w.focus()}}),[]);const x=ta(r,p),y=gI(a),_=Y.exports.useMemo(()=>({name:y,onChange(w){v(w.target.value),s&&s(w,w.target.value)},value:m}),[y,s,v,m]);return Kt(dse.Provider,{value:_,children:Kt(xQe,Fe({role:"radiogroup",ref:x},u,{children:i}))})});var QRt=vtt;function ytt(t){return Kn("MuiSelect",t)}const xtt=ei("MuiSelect",["select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput"]);var F3=xtt,gse;const _tt=["aria-describedby","aria-label","autoFocus","autoWidth","children","className","defaultOpen","defaultValue","disabled","displayEmpty","IconComponent","inputRef","labelId","MenuProps","multiple","name","onBlur","onChange","onClose","onFocus","onOpen","open","readOnly","renderValue","SelectDisplayProps","tabIndex","type","value","variant"],btt=Nr("div",{name:"MuiSelect",slot:"Select",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[{[`&.${F3.select}`]:e.select},{[`&.${F3.select}`]:e[r.variant]},{[`&.${F3.multiple}`]:e.multiple}]}})(sse,{[`&.${F3.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),wtt=Nr("svg",{name:"MuiSelect",slot:"Icon",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.icon,r.variant&&e[`icon${Pr(r.variant)}`],r.open&&e.iconOpen]}})(ase),Ctt=Nr("input",{shouldForwardProp:t=>f3(t)&&t!=="classes",name:"MuiSelect",slot:"NativeInput",overridesResolver:(t,e)=>e.nativeInput})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function vse(t,e){return typeof e=="object"&&e!==null?t===e:String(t)===String(e)}function Ett(t){return t==null||typeof t=="string"&&!t.trim()}const Stt=t=>{const{classes:e,variant:r,disabled:n,multiple:i,open:o}=t,a={select:["select",r,n&&"disabled",i&&"multiple"],icon:["icon",`icon${Pr(r)}`,o&&"iconOpen",n&&"disabled"],nativeInput:["nativeInput"]};return Qn(a,ytt,e)},Ttt=Y.exports.forwardRef(function(e,r){const{"aria-describedby":n,"aria-label":i,autoFocus:o,autoWidth:a,children:s,className:l,defaultOpen:u,defaultValue:p,disabled:m,displayEmpty:v,IconComponent:x,inputRef:y,labelId:_,MenuProps:w={},multiple:C,name:E,onBlur:T,onChange:A,onClose:k,onFocus:X,onOpen:Z,open:W,readOnly:D,renderValue:H,SelectDisplayProps:N={},tabIndex:j,value:$,variant:z="standard"}=e,O=bn(e,_tt),[F,G]=Rm({controlled:$,default:p,name:"Select"}),[q,ee]=Rm({controlled:W,default:u,name:"Select"}),re=Y.exports.useRef(null),ce=Y.exports.useRef(null),[fe,J]=Y.exports.useState(null),{current:oe}=Y.exports.useRef(W!=null),[ve,ye]=Y.exports.useState(),xe=ta(r,y),se=Y.exports.useCallback(Je=>{ce.current=Je,Je&&J(Je)},[]),me=fe==null?void 0:fe.parentNode;Y.exports.useImperativeHandle(xe,()=>({focus:()=>{ce.current.focus()},node:re.current,value:F}),[F]),Y.exports.useEffect(()=>{u&&q&&fe&&!oe&&(ye(a?null:me.clientWidth),ce.current.focus())},[fe,a]),Y.exports.useEffect(()=>{o&&ce.current.focus()},[o]),Y.exports.useEffect(()=>{if(!_)return;const Je=wl(ce.current).getElementById(_);if(Je){const St=()=>{getSelection().isCollapsed&&ce.current.focus()};return Je.addEventListener("click",St),()=>{Je.removeEventListener("click",St)}}},[_]);const pe=(Je,St)=>{Je?Z&&Z(St):k&&k(St),oe||(ye(a?null:me.clientWidth),ee(Je))},Ce=Je=>{Je.button===0&&(Je.preventDefault(),ce.current.focus(),pe(!0,Je))},Pe=Je=>{pe(!1,Je)},Re=Y.exports.Children.toArray(s),ke=Je=>{const St=Re.map(Ft=>Ft.props.value).indexOf(Je.target.value);if(St===-1)return;const er=Re[St];G(er.props.value),A&&A(Je,er)},ze=Je=>St=>{let er;if(!!St.currentTarget.hasAttribute("tabindex")){if(C){er=Array.isArray(F)?F.slice():[];const Ft=F.indexOf(Je.props.value);Ft===-1?er.push(Je.props.value):er.splice(Ft,1)}else er=Je.props.value;if(Je.props.onClick&&Je.props.onClick(St),F!==er&&(G(er),A)){const Ft=St.nativeEvent||St,Ut=new Ft.constructor(Ft.type,Ft);Object.defineProperty(Ut,"target",{writable:!0,value:{value:er,name:E}}),A(Ut,Je)}C||pe(!1,St)}},Ge=Je=>{D||[" ","ArrowUp","ArrowDown","Enter"].indexOf(Je.key)!==-1&&(Je.preventDefault(),pe(!0,Je))},ht=fe!==null&&q,Tt=Je=>{!ht&&T&&(Object.defineProperty(Je,"target",{writable:!0,value:{value:F,name:E}}),T(Je))};delete O["aria-invalid"];let xt,pt;const It=[];let Ie=!1;(Bj({value:F})||v)&&(H?xt=H(F):Ie=!0);const de=Re.map(Je=>{if(!Y.exports.isValidElement(Je))return null;let St;if(C){if(!Array.isArray(F))throw new Error(kx(2));St=F.some(er=>vse(er,Je.props.value)),St&&Ie&&It.push(Je.props.children)}else St=vse(F,Je.props.value),St&&Ie&&(pt=Je.props.children);return Y.exports.cloneElement(Je,{"aria-selected":St?"true":"false",onClick:ze(Je),onKeyUp:er=>{er.key===" "&&er.preventDefault(),Je.props.onKeyUp&&Je.props.onKeyUp(er)},role:"option",selected:St,value:void 0,"data-value":Je.props.value})});Ie&&(C?It.length===0?xt=null:xt=It.reduce((Je,St,er)=>(Je.push(St),er<It.length-1&&Je.push(", "),Je),[]):xt=pt);let Te=ve;!a&&oe&&fe&&(Te=me.clientWidth);let Be;typeof j!="undefined"?Be=j:Be=m?null:0;const Ke=N.id||(E?`mui-component-select-${E}`:void 0),ot=Fe({},e,{variant:z,value:F,open:ht}),Ze=Stt(ot);return Ji(Y.exports.Fragment,{children:[Kt(btt,Fe({ref:se,tabIndex:Be,role:"button","aria-disabled":m?"true":void 0,"aria-expanded":ht?"true":"false","aria-haspopup":"listbox","aria-label":i,"aria-labelledby":[_,Ke].filter(Boolean).join(" ")||void 0,"aria-describedby":n,onKeyDown:Ge,onMouseDown:m||D?null:Ce,onBlur:Tt,onFocus:X},N,{ownerState:ot,className:ln(N.className,Ze.select,l),id:Ke,children:Ett(xt)?gse||(gse=Kt("span",{className:"notranslate",children:"\u200B"})):xt})),Kt(Ctt,Fe({value:Array.isArray(F)?F.join(","):F,name:E,ref:re,"aria-hidden":!0,onChange:ke,tabIndex:-1,disabled:m,className:Ze.nativeInput,autoFocus:o,ownerState:ot},O)),Kt(wtt,{as:x,className:Ze.icon,ownerState:ot}),Kt(wet,Fe({id:`menu-${E||""}`,anchorEl:me,open:ht,onClose:Pe,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}},w,{MenuListProps:Fe({"aria-labelledby":_,role:"listbox",disableListWrap:!0},w.MenuListProps),PaperProps:Fe({},w.PaperProps,{style:Fe({minWidth:Te},w.PaperProps!=null?w.PaperProps.style:null)}),children:de}))]})});var Ptt=Ttt,yse,xse;const Itt=["autoWidth","children","classes","className","defaultOpen","displayEmpty","IconComponent","id","input","inputProps","label","labelId","MenuProps","multiple","native","onClose","onOpen","open","renderValue","SelectDisplayProps","variant"],Mtt=t=>{const{classes:e}=t;return e},Zj={name:"MuiSelect",overridesResolver:(t,e)=>e.root,shouldForwardProp:t=>Jd(t)&&t!=="variant",slot:"Root"},Att=Nr(Hoe,Zj)(""),Rtt=Nr(use,Zj)(""),ktt=Nr(Noe,Zj)(""),_se=Y.exports.forwardRef(function(e,r){const n=ti({name:"MuiSelect",props:e}),{autoWidth:i=!1,children:o,classes:a={},className:s,defaultOpen:l=!1,displayEmpty:u=!1,IconComponent:p=Coe,id:m,input:v,inputProps:x,label:y,labelId:_,MenuProps:w,multiple:C=!1,native:E=!1,onClose:T,onOpen:A,open:k,renderValue:X,SelectDisplayProps:Z,variant:W="outlined"}=n,D=bn(n,Itt),H=E?Get:Ptt,N=Qg(),$=Fx({props:n,muiFormControl:N,states:["variant"]}).variant||W,z=v||{standard:yse||(yse=Kt(Att,{})),outlined:Kt(Rtt,{label:y}),filled:xse||(xse=Kt(ktt,{}))}[$],O=Fe({},n,{variant:$,classes:a}),F=Mtt(O),G=ta(r,z.ref);return Kt(Y.exports.Fragment,{children:Y.exports.cloneElement(z,Fe({inputComponent:H,inputProps:Fe({children:o,IconComponent:p,variant:$,type:void 0,multiple:C},E?{id:m}:{autoWidth:i,defaultOpen:l,displayEmpty:u,labelId:_,MenuProps:w,onClose:T,onOpen:A,open:k,renderValue:X,SelectDisplayProps:Fe({id:m},Z)},x,{classes:x?Zf(F,x.classes):F},v?v.props.inputProps:{})},C&&E&&$==="outlined"?{notched:!0}:{},{ref:G,className:ln(z.props.className,s)},!v&&{variant:$},D))})});_se.muiName="Select";var Ott=_se;function Ltt(t){return Kn("MuiSkeleton",t)}ei("MuiSkeleton",["root","text","rectangular","rounded","circular","pulse","wave","withChildren","fitContent","heightAuto"]);const Dtt=["animation","className","component","height","style","variant","width"];let z3=t=>t,bse,wse,Cse,Ese;const Ntt=t=>{const{classes:e,variant:r,animation:n,hasChildren:i,width:o,height:a}=t;return Qn({root:["root",r,n,i&&"withChildren",i&&!o&&"fitContent",i&&!a&&"heightAuto"]},Ltt,e)},$tt=qg(bse||(bse=z3` 0% { opacity: 1; } 50% { opacity: 0.4; } 100% { opacity: 1; } `)),Ftt=qg(wse||(wse=z3` 0% { transform: translateX(-100%); } 50% { /* +0.5s of delay between each loop */ transform: translateX(100%); } 100% { transform: translateX(100%); } `)),ztt=Nr("span",{name:"MuiSkeleton",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,e[r.variant],r.animation!==!1&&e[r.animation],r.hasChildren&&e.withChildren,r.hasChildren&&!r.width&&e.fitContent,r.hasChildren&&!r.height&&e.heightAuto]}})(({theme:t,ownerState:e})=>{const r=QWe(t.shape.borderRadius)||"px",n=JWe(t.shape.borderRadius);return Fe({display:"block",backgroundColor:t.vars?t.vars.palette.Skeleton.bg:co(t.palette.text.primary,t.palette.mode==="light"?.11:.13),height:"1.2em"},e.variant==="text"&&{marginTop:0,marginBottom:0,height:"auto",transformOrigin:"0 55%",transform:"scale(1, 0.60)",borderRadius:`${n}${r}/${Math.round(n/.6*10)/10}${r}`,"&:empty:before":{content:'"\\00a0"'}},e.variant==="circular"&&{borderRadius:"50%"},e.variant==="rounded"&&{borderRadius:(t.vars||t).shape.borderRadius},e.hasChildren&&{"& > *":{visibility:"hidden"}},e.hasChildren&&!e.width&&{maxWidth:"fit-content"},e.hasChildren&&!e.height&&{height:"auto"})},({ownerState:t})=>t.animation==="pulse"&&Ox(Cse||(Cse=z3` animation: ${0} 1.5s ease-in-out 0.5s infinite; `),$tt),({ownerState:t,theme:e})=>t.animation==="wave"&&Ox(Ese||(Ese=z3` position: relative; overflow: hidden; /* Fix bug in Safari https://bugs.webkit.org/show_bug.cgi?id=68196 */ -webkit-mask-image: -webkit-radial-gradient(white, black); &::after { animation: ${0} 1.6s linear 0.5s infinite; background: linear-gradient( 90deg, transparent, ${0}, transparent ); content: ''; position: absolute; transform: translateX(-100%); /* Avoid flash during server-side hydration */ bottom: 0; left: 0; right: 0; top: 0; } `),Ftt,(e.vars||e).palette.action.hover)),Btt=Y.exports.forwardRef(function(e,r){const n=ti({props:e,name:"MuiSkeleton"}),{animation:i="pulse",className:o,component:a="span",height:s,style:l,variant:u="text",width:p}=n,m=bn(n,Dtt),v=Fe({},n,{animation:i,component:a,variant:u,hasChildren:Boolean(m.children)}),x=Ntt(v);return Kt(ztt,Fe({as:a,ref:r,className:ln(x.root,o),ownerState:v},m,{style:Fe({width:p,height:s},l)}))});var JRt=Btt;const jtt=t=>!t||!Lx(t);var Utt=jtt;function Vtt(t){return Kn("MuiSlider",t)}const Htt=ei("MuiSlider",["root","active","colorPrimary","colorSecondary","disabled","dragging","focusVisible","mark","markActive","marked","markLabel","markLabelActive","rail","sizeSmall","thumb","thumbColorPrimary","thumbColorSecondary","track","trackInverted","trackFalse","thumbSizeSmall","valueLabel","valueLabelOpen","valueLabelCircle","valueLabelLabel","vertical"]);var Lm=Htt;const Wtt=t=>{const{open:e}=t;return{offset:ln(e&&Lm.valueLabelOpen),circle:Lm.valueLabelCircle,label:Lm.valueLabelLabel}};function Gtt(t){const{children:e,className:r,value:n}=t,i=Wtt(t);return e?Y.exports.cloneElement(e,{className:ln(e.props.className)},Ji(Y.exports.Fragment,{children:[e.props.children,Kt("span",{className:ln(i.offset,r),"aria-hidden":!0,children:Kt("span",{className:i.circle,children:Kt("span",{className:i.label,children:n})})})]})):null}const qtt=["aria-label","aria-valuetext","aria-labelledby","component","components","componentsProps","color","classes","className","disableSwap","disabled","getAriaLabel","getAriaValueText","marks","max","min","name","onChange","onChangeCommitted","orientation","size","step","scale","slotProps","slots","tabIndex","track","value","valueLabelDisplay","valueLabelFormat"];function Sse(t){return t}const Xtt=Nr("span",{name:"MuiSlider",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,e[`color${Pr(r.color)}`],r.size!=="medium"&&e[`size${Pr(r.size)}`],r.marked&&e.marked,r.orientation==="vertical"&&e.vertical,r.track==="inverted"&&e.trackInverted,r.track===!1&&e.trackFalse]}})(({theme:t,ownerState:e})=>Fe({borderRadius:12,boxSizing:"content-box",display:"inline-block",position:"relative",cursor:"pointer",touchAction:"none",color:(t.vars||t).palette[e.color].main,WebkitTapHighlightColor:"transparent"},e.orientation==="horizontal"&&Fe({height:4,width:"100%",padding:"13px 0","@media (pointer: coarse)":{padding:"20px 0"}},e.size==="small"&&{height:2},e.marked&&{marginBottom:20}),e.orientation==="vertical"&&Fe({height:"100%",width:4,padding:"0 13px","@media (pointer: coarse)":{padding:"0 20px"}},e.size==="small"&&{width:2},e.marked&&{marginRight:44}),{"@media print":{colorAdjust:"exact"},[`&.${Lm.disabled}`]:{pointerEvents:"none",cursor:"default",color:(t.vars||t).palette.grey[400]},[`&.${Lm.dragging}`]:{[`& .${Lm.thumb}, & .${Lm.track}`]:{transition:"none"}}})),Ytt=Nr("span",{name:"MuiSlider",slot:"Rail",overridesResolver:(t,e)=>e.rail})(({ownerState:t})=>Fe({display:"block",position:"absolute",borderRadius:"inherit",backgroundColor:"currentColor",opacity:.38},t.orientation==="horizontal"&&{width:"100%",height:"inherit",top:"50%",transform:"translateY(-50%)"},t.orientation==="vertical"&&{height:"100%",width:"inherit",left:"50%",transform:"translateX(-50%)"},t.track==="inverted"&&{opacity:1})),Ktt=Nr("span",{name:"MuiSlider",slot:"Track",overridesResolver:(t,e)=>e.track})(({theme:t,ownerState:e})=>{const r=t.palette.mode==="light"?l3(t.palette[e.color].main,.62):a3(t.palette[e.color].main,.5);return Fe({display:"block",position:"absolute",borderRadius:"inherit",border:"1px solid currentColor",backgroundColor:"currentColor",transition:t.transitions.create(["left","width","bottom","height"],{duration:t.transitions.duration.shortest})},e.size==="small"&&{border:"none"},e.orientation==="horizontal"&&{height:"inherit",top:"50%",transform:"translateY(-50%)"},e.orientation==="vertical"&&{width:"inherit",left:"50%",transform:"translateX(-50%)"},e.track===!1&&{display:"none"},e.track==="inverted"&&{backgroundColor:t.vars?t.vars.palette.Slider[`${e.color}Track`]:r,borderColor:t.vars?t.vars.palette.Slider[`${e.color}Track`]:r})}),Ztt=Nr("span",{name:"MuiSlider",slot:"Thumb",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.thumb,e[`thumbColor${Pr(r.color)}`],r.size!=="medium"&&e[`thumbSize${Pr(r.size)}`]]}})(({theme:t,ownerState:e})=>Fe({position:"absolute",width:20,height:20,boxSizing:"border-box",borderRadius:"50%",outline:0,backgroundColor:"currentColor",display:"flex",alignItems:"center",justifyContent:"center",transition:t.transitions.create(["box-shadow","left","bottom"],{duration:t.transitions.duration.shortest})},e.size==="small"&&{width:12,height:12},e.orientation==="horizontal"&&{top:"50%",transform:"translate(-50%, -50%)"},e.orientation==="vertical"&&{left:"50%",transform:"translate(-50%, 50%)"},{"&:before":Fe({position:"absolute",content:'""',borderRadius:"inherit",width:"100%",height:"100%",boxShadow:(t.vars||t).shadows[2]},e.size==="small"&&{boxShadow:"none"}),"&::after":{position:"absolute",content:'""',borderRadius:"50%",width:42,height:42,top:"50%",left:"50%",transform:"translate(-50%, -50%)"},[`&:hover, &.${Lm.focusVisible}`]:{boxShadow:`0px 0px 0px 8px ${t.vars?`rgba(${t.vars.palette[e.color].mainChannel} / 0.16)`:co(t.palette[e.color].main,.16)}`,"@media (hover: none)":{boxShadow:"none"}},[`&.${Lm.active}`]:{boxShadow:`0px 0px 0px 14px ${t.vars?`rgba(${t.vars.palette[e.color].mainChannel} / 0.16)`:co(t.palette[e.color].main,.16)}`},[`&.${Lm.disabled}`]:{"&:hover":{boxShadow:"none"}}})),Qtt=Nr(Gtt,{name:"MuiSlider",slot:"ValueLabel",overridesResolver:(t,e)=>e.valueLabel})(({theme:t,ownerState:e})=>Fe({[`&.${Lm.valueLabelOpen}`]:{transform:"translateY(-100%) scale(1)"},zIndex:1,whiteSpace:"nowrap"},t.typography.body2,{fontWeight:500,transition:t.transitions.create(["transform"],{duration:t.transitions.duration.shortest}),transform:"translateY(-100%) scale(0)",position:"absolute",backgroundColor:(t.vars||t).palette.grey[600],borderRadius:2,color:(t.vars||t).palette.common.white,display:"flex",alignItems:"center",justifyContent:"center",padding:"0.25rem 0.75rem"},e.orientation==="horizontal"&&{top:"-10px",transformOrigin:"bottom center","&:before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, 50%) rotate(45deg)",backgroundColor:"inherit",bottom:0,left:"50%"}},e.orientation==="vertical"&&{right:"30px",top:"24px",transformOrigin:"right center","&:before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, 50%) rotate(45deg)",backgroundColor:"inherit",right:"-20%",top:"25%"}},e.size==="small"&&{fontSize:t.typography.pxToRem(12),padding:"0.25rem 0.5rem"})),Jtt=Nr("span",{name:"MuiSlider",slot:"Mark",shouldForwardProp:t=>f3(t)&&t!=="markActive",overridesResolver:(t,e)=>{const{markActive:r}=t;return[e.mark,r&&e.markActive]}})(({theme:t,ownerState:e,markActive:r})=>Fe({position:"absolute",width:2,height:2,borderRadius:1,backgroundColor:"currentColor"},e.orientation==="horizontal"&&{top:"50%",transform:"translate(-1px, -50%)"},e.orientation==="vertical"&&{left:"50%",transform:"translate(-50%, 1px)"},r&&{backgroundColor:(t.vars||t).palette.background.paper,opacity:.8})),ert=Nr("span",{name:"MuiSlider",slot:"MarkLabel",shouldForwardProp:t=>f3(t)&&t!=="markLabelActive",overridesResolver:(t,e)=>e.markLabel})(({theme:t,ownerState:e,markLabelActive:r})=>Fe({},t.typography.body2,{color:(t.vars||t).palette.text.secondary,position:"absolute",whiteSpace:"nowrap"},e.orientation==="horizontal"&&{top:30,transform:"translateX(-50%)","@media (pointer: coarse)":{top:40}},e.orientation==="vertical"&&{left:36,transform:"translateY(50%)","@media (pointer: coarse)":{left:44}},r&&{color:(t.vars||t).palette.text.primary})),trt=t=>{const{disabled:e,dragging:r,marked:n,orientation:i,track:o,classes:a,color:s,size:l}=t,u={root:["root",e&&"disabled",r&&"dragging",n&&"marked",i==="vertical"&&"vertical",o==="inverted"&&"trackInverted",o===!1&&"trackFalse",s&&`color${Pr(s)}`,l&&`size${Pr(l)}`],rail:["rail"],track:["track"],mark:["mark"],markActive:["markActive"],markLabel:["markLabel"],markLabelActive:["markLabelActive"],valueLabel:["valueLabel"],thumb:["thumb",e&&"disabled",l&&`thumbSize${Pr(l)}`,s&&`thumbColor${Pr(s)}`],active:["active"],disabled:["disabled"],focusVisible:["focusVisible"]};return Qn(u,Vtt,a)},rrt=({children:t})=>t,nrt=Y.exports.forwardRef(function(e,r){var n,i,o,a,s,l,u,p,m,v,x,y,_,w,C,E,T,A,k,X,Z,W,D,H;const N=ti({props:e,name:"MuiSlider"}),$=km().direction==="rtl",{"aria-label":z,"aria-valuetext":O,"aria-labelledby":F,component:G="span",components:q={},componentsProps:ee={},color:re="primary",classes:ce,className:fe,disableSwap:J=!1,disabled:oe=!1,getAriaLabel:ve,getAriaValueText:ye,marks:xe=!1,max:se=100,min:me=0,orientation:pe="horizontal",size:Ce="medium",step:Pe=1,scale:Re=Sse,slotProps:ke,slots:ze,track:Ge="normal",valueLabelDisplay:ht="off",valueLabelFormat:Tt=Sse}=N,xt=bn(N,qtt),pt=Fe({},N,{isRtl:$,max:se,min:me,classes:ce,disabled:oe,disableSwap:J,orientation:pe,marks:xe,color:re,size:Ce,step:Pe,scale:Re,track:Ge,valueLabelDisplay:ht,valueLabelFormat:Tt}),{axisProps:It,getRootProps:Ie,getHiddenInputProps:de,getThumbProps:Te,open:Be,active:Ke,axis:ot,focusedThumbIndex:Ze,range:Je,dragging:St,marks:er,values:Ft,trackOffset:Ut,trackLeap:Er}=Kqe(Fe({},pt,{ref:r}));pt.marked=er.length>0&&er.some($t=>$t.label),pt.dragging=St,pt.focusedThumbIndex=Ze;const kr=trt(pt),mr=(n=(i=ze==null?void 0:ze.root)!=null?i:q.Root)!=null?n:Xtt,Dt=(o=(a=ze==null?void 0:ze.rail)!=null?a:q.Rail)!=null?o:Ytt,Jr=(s=(l=ze==null?void 0:ze.track)!=null?l:q.Track)!=null?s:Ktt,We=(u=(p=ze==null?void 0:ze.thumb)!=null?p:q.Thumb)!=null?u:Ztt,Oe=(m=(v=ze==null?void 0:ze.valueLabel)!=null?v:q.ValueLabel)!=null?m:Qtt,$e=(x=(y=ze==null?void 0:ze.mark)!=null?y:q.Mark)!=null?x:Jtt,Xe=(_=(w=ze==null?void 0:ze.markLabel)!=null?w:q.MarkLabel)!=null?_:ert,tt=(C=(E=ze==null?void 0:ze.input)!=null?E:q.Input)!=null?C:"input",_t=(T=ke==null?void 0:ke.root)!=null?T:ee.root,Ot=(A=ke==null?void 0:ke.rail)!=null?A:ee.rail,Nt=(k=ke==null?void 0:ke.track)!=null?k:ee.track,bt=(X=ke==null?void 0:ke.thumb)!=null?X:ee.thumb,Wt=(Z=ke==null?void 0:ke.valueLabel)!=null?Z:ee.valueLabel,Sr=(W=ke==null?void 0:ke.mark)!=null?W:ee.mark,rr=(D=ke==null?void 0:ke.markLabel)!=null?D:ee.markLabel,tr=(H=ke==null?void 0:ke.input)!=null?H:ee.input,sn=Om({elementType:mr,getSlotProps:Ie,externalSlotProps:_t,externalForwardedProps:xt,additionalProps:Fe({},Utt(mr)&&{as:G}),ownerState:Fe({},pt,_t==null?void 0:_t.ownerState),className:[kr.root,fe]}),un=Om({elementType:Dt,externalSlotProps:Ot,ownerState:pt,className:kr.rail}),Ye=Om({elementType:Jr,externalSlotProps:Nt,additionalProps:{style:Fe({},It[ot].offset(Ut),It[ot].leap(Er))},ownerState:Fe({},pt,Nt==null?void 0:Nt.ownerState),className:kr.track}),Ve=Om({elementType:We,getSlotProps:Te,externalSlotProps:bt,ownerState:Fe({},pt,bt==null?void 0:bt.ownerState),className:kr.thumb}),gt=Om({elementType:Oe,externalSlotProps:Wt,ownerState:Fe({},pt,Wt==null?void 0:Wt.ownerState),className:kr.valueLabel}),qt=Om({elementType:$e,externalSlotProps:Sr,ownerState:pt,className:kr.mark}),Ht=Om({elementType:Xe,externalSlotProps:rr,ownerState:pt,className:kr.markLabel}),on=Om({elementType:tt,getSlotProps:de,externalSlotProps:tr,ownerState:pt});return Ji(mr,Fe({},sn,{children:[Kt(Dt,Fe({},un)),Kt(Jr,Fe({},Ye)),er.filter($t=>$t.value>=me&&$t.value<=se).map(($t,Gt)=>{const Ir=v3($t.value,me,se),Br=It[ot].offset(Ir);let Xr;return Ge===!1?Xr=Ft.indexOf($t.value)!==-1:Xr=Ge==="normal"&&(Je?$t.value>=Ft[0]&&$t.value<=Ft[Ft.length-1]:$t.value<=Ft[0])||Ge==="inverted"&&(Je?$t.value<=Ft[0]||$t.value>=Ft[Ft.length-1]:$t.value>=Ft[0]),Ji(Y.exports.Fragment,{children:[Kt($e,Fe({"data-index":Gt},qt,!Lx($e)&&{markActive:Xr},{style:Fe({},Br,qt.style),className:ln(qt.className,Xr&&kr.markActive)})),$t.label!=null?Kt(Xe,Fe({"aria-hidden":!0,"data-index":Gt},Ht,!Lx(Xe)&&{markLabelActive:Xr},{style:Fe({},Br,Ht.style),className:ln(kr.markLabel,Ht.className,Xr&&kr.markLabelActive),children:$t.label})):null]},Gt)}),Ft.map(($t,Gt)=>{const Ir=v3($t,me,se),Br=It[ot].offset(Ir),Xr=ht==="off"?rrt:Oe;return Kt(Xr,Fe({},!Lx(Xr)&&{valueLabelFormat:Tt,valueLabelDisplay:ht,value:typeof Tt=="function"?Tt(Re($t),Gt):Tt,index:Gt,open:Be===Gt||Ke===Gt||ht==="on",disabled:oe},gt,{children:Kt(We,Fe({"data-index":Gt},Ve,{className:ln(kr.thumb,Ve.className,Ke===Gt&&kr.active,Ze===Gt&&kr.focusVisible),style:Fe({},Br,{pointerEvents:J&&Ke!==Gt?"none":void 0},Ve.style),children:Kt(tt,Fe({"data-index":Gt,"aria-label":ve?ve(Gt):z,"aria-valuenow":Re($t),"aria-labelledby":F,"aria-valuetext":ye?ye(Re($t),Gt):O,value:Ft[Gt]},on))}))}),Gt)})]}))});var ekt=nrt;function irt(t){return Kn("MuiTooltip",t)}const ort=ei("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]);var Ux=ort;const srt=["arrow","children","classes","components","componentsProps","describeChild","disableFocusListener","disableHoverListener","disableInteractive","disableTouchListener","enterDelay","enterNextDelay","enterTouchDelay","followCursor","id","leaveDelay","leaveTouchDelay","onClose","onOpen","open","placement","PopperComponent","PopperProps","slotProps","slots","title","TransitionComponent","TransitionProps"];function art(t){return Math.round(t*1e5)/1e5}const lrt=t=>{const{classes:e,disableInteractive:r,arrow:n,touch:i,placement:o}=t,a={popper:["popper",!r&&"popperInteractive",n&&"popperArrow"],tooltip:["tooltip",n&&"tooltipArrow",i&&"touch",`tooltipPlacement${Pr(o.split("-")[0])}`],arrow:["arrow"]};return Qn(a,irt,e)},crt=Nr(T3,{name:"MuiTooltip",slot:"Popper",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.popper,!r.disableInteractive&&e.popperInteractive,r.arrow&&e.popperArrow,!r.open&&e.popperClose]}})(({theme:t,ownerState:e,open:r})=>Fe({zIndex:(t.vars||t).zIndex.tooltip,pointerEvents:"none"},!e.disableInteractive&&{pointerEvents:"auto"},!r&&{pointerEvents:"none"},e.arrow&&{[`&[data-popper-placement*="bottom"] .${Ux.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${Ux.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${Ux.arrow}`]:Fe({},e.isRtl?{right:0,marginRight:"-0.71em"}:{left:0,marginLeft:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}}),[`&[data-popper-placement*="left"] .${Ux.arrow}`]:Fe({},e.isRtl?{left:0,marginLeft:"-0.71em"}:{right:0,marginRight:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}})})),urt=Nr("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.tooltip,r.touch&&e.touch,r.arrow&&e.tooltipArrow,e[`tooltipPlacement${Pr(r.placement.split("-")[0])}`]]}})(({theme:t,ownerState:e})=>Fe({backgroundColor:t.vars?t.vars.palette.Tooltip.bg:co(t.palette.grey[700],.92),borderRadius:(t.vars||t).shape.borderRadius,color:(t.vars||t).palette.common.white,fontFamily:t.typography.fontFamily,padding:"4px 8px",fontSize:t.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:t.typography.fontWeightMedium},e.arrow&&{position:"relative",margin:0},e.touch&&{padding:"8px 16px",fontSize:t.typography.pxToRem(14),lineHeight:`${art(16/14)}em`,fontWeight:t.typography.fontWeightRegular},{[`.${Ux.popper}[data-popper-placement*="left"] &`]:Fe({transformOrigin:"right center"},e.isRtl?Fe({marginLeft:"14px"},e.touch&&{marginLeft:"24px"}):Fe({marginRight:"14px"},e.touch&&{marginRight:"24px"})),[`.${Ux.popper}[data-popper-placement*="right"] &`]:Fe({transformOrigin:"left center"},e.isRtl?Fe({marginRight:"14px"},e.touch&&{marginRight:"24px"}):Fe({marginLeft:"14px"},e.touch&&{marginLeft:"24px"})),[`.${Ux.popper}[data-popper-placement*="top"] &`]:Fe({transformOrigin:"center bottom",marginBottom:"14px"},e.touch&&{marginBottom:"24px"}),[`.${Ux.popper}[data-popper-placement*="bottom"] &`]:Fe({transformOrigin:"center top",marginTop:"14px"},e.touch&&{marginTop:"24px"})})),frt=Nr("span",{name:"MuiTooltip",slot:"Arrow",overridesResolver:(t,e)=>e.arrow})(({theme:t})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:t.vars?t.vars.palette.Tooltip.bg:co(t.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}}));let B3=!1,Qj=null,HI={x:0,y:0};function j3(t,e){return r=>{e&&e(r),t(r)}}const drt=Y.exports.forwardRef(function(e,r){var n,i,o,a,s,l,u,p,m,v,x,y,_,w,C,E,T,A,k;const X=ti({props:e,name:"MuiTooltip"}),{arrow:Z=!1,children:W,components:D={},componentsProps:H={},describeChild:N=!1,disableFocusListener:j=!1,disableHoverListener:$=!1,disableInteractive:z=!1,disableTouchListener:O=!1,enterDelay:F=100,enterNextDelay:G=0,enterTouchDelay:q=700,followCursor:ee=!1,id:re,leaveDelay:ce=0,leaveTouchDelay:fe=1500,onClose:J,onOpen:oe,open:ve,placement:ye="bottom",PopperComponent:xe,PopperProps:se={},slotProps:me={},slots:pe={},title:Ce,TransitionComponent:Pe=Wj,TransitionProps:Re}=X,ke=bn(X,srt),ze=km(),Ge=ze.direction==="rtl",[ht,Tt]=Y.exports.useState(),[xt,pt]=Y.exports.useState(null),It=Y.exports.useRef(!1),Ie=z||ee,de=Y.exports.useRef(),Te=Y.exports.useRef(),Be=Y.exports.useRef(),Ke=Y.exports.useRef(),[ot,Ze]=Rm({controlled:ve,default:!1,name:"Tooltip",state:"open"});let Je=ot;const St=gI(re),er=Y.exports.useRef(),Ft=Y.exports.useCallback(()=>{er.current!==void 0&&(document.body.style.WebkitUserSelect=er.current,er.current=void 0),clearTimeout(Ke.current)},[]);Y.exports.useEffect(()=>()=>{clearTimeout(de.current),clearTimeout(Te.current),clearTimeout(Be.current),Ft()},[Ft]);const Ut=br=>{clearTimeout(Qj),B3=!0,Ze(!0),oe&&!Je&&oe(br)},Er=bc(br=>{clearTimeout(Qj),Qj=setTimeout(()=>{B3=!1},800+ce),Ze(!1),J&&Je&&J(br),clearTimeout(de.current),de.current=setTimeout(()=>{It.current=!1},ze.transitions.duration.shortest)}),kr=br=>{It.current&&br.type!=="touchstart"||(ht&&ht.removeAttribute("title"),clearTimeout(Te.current),clearTimeout(Be.current),F||B3&&G?Te.current=setTimeout(()=>{Ut(br)},B3?G:F):Ut(br))},mr=br=>{clearTimeout(Te.current),clearTimeout(Be.current),Be.current=setTimeout(()=>{Er(br)},ce)},{isFocusVisibleRef:Dt,onBlur:Jr,onFocus:We,ref:Oe}=vI(),[,$e]=Y.exports.useState(!1),Xe=br=>{Jr(br),Dt.current===!1&&($e(!1),mr(br))},tt=br=>{ht||Tt(br.currentTarget),We(br),Dt.current===!0&&($e(!0),kr(br))},_t=br=>{It.current=!0;const oi=W.props;oi.onTouchStart&&oi.onTouchStart(br)},Ot=kr,Nt=mr,bt=br=>{_t(br),clearTimeout(Be.current),clearTimeout(de.current),Ft(),er.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",Ke.current=setTimeout(()=>{document.body.style.WebkitUserSelect=er.current,kr(br)},q)},Wt=br=>{W.props.onTouchEnd&&W.props.onTouchEnd(br),Ft(),clearTimeout(Be.current),Be.current=setTimeout(()=>{Er(br)},fe)};Y.exports.useEffect(()=>{if(!Je)return;function br(oi){(oi.key==="Escape"||oi.key==="Esc")&&Er(oi)}return document.addEventListener("keydown",br),()=>{document.removeEventListener("keydown",br)}},[Er,Je]);const Sr=ta(W.ref,Oe,Tt,r);!Ce&&Ce!==0&&(Je=!1);const rr=Y.exports.useRef(),tr=br=>{const oi=W.props;oi.onMouseMove&&oi.onMouseMove(br),HI={x:br.clientX,y:br.clientY},rr.current&&rr.current.update()},sn={},un=typeof Ce=="string";N?(sn.title=!Je&&un&&!$?Ce:null,sn["aria-describedby"]=Je?St:null):(sn["aria-label"]=un?Ce:null,sn["aria-labelledby"]=Je&&!un?St:null);const Ye=Fe({},sn,ke,W.props,{className:ln(ke.className,W.props.className),onTouchStart:_t,ref:Sr},ee?{onMouseMove:tr}:{}),Ve={};O||(Ye.onTouchStart=bt,Ye.onTouchEnd=Wt),$||(Ye.onMouseOver=j3(Ot,Ye.onMouseOver),Ye.onMouseLeave=j3(Nt,Ye.onMouseLeave),Ie||(Ve.onMouseOver=Ot,Ve.onMouseLeave=Nt)),j||(Ye.onFocus=j3(tt,Ye.onFocus),Ye.onBlur=j3(Xe,Ye.onBlur),Ie||(Ve.onFocus=tt,Ve.onBlur=Xe));const gt=Y.exports.useMemo(()=>{var br;let oi=[{name:"arrow",enabled:Boolean(xt),options:{element:xt,padding:4}}];return(br=se.popperOptions)!=null&&br.modifiers&&(oi=oi.concat(se.popperOptions.modifiers)),Fe({},se.popperOptions,{modifiers:oi})},[xt,se]),qt=Fe({},X,{isRtl:Ge,arrow:Z,disableInteractive:Ie,placement:ye,PopperComponentProp:xe,touch:It.current}),Ht=lrt(qt),on=(n=(i=pe.popper)!=null?i:D.Popper)!=null?n:crt,$t=(o=(a=(s=pe.transition)!=null?s:D.Transition)!=null?a:Pe)!=null?o:Wj,Gt=(l=(u=pe.tooltip)!=null?u:D.Tooltip)!=null?l:urt,Ir=(p=(m=pe.arrow)!=null?m:D.Arrow)!=null?p:frt,Br=II(on,Fe({},se,(v=me.popper)!=null?v:H.popper,{className:ln(Ht.popper,se==null?void 0:se.className,(x=(y=me.popper)!=null?y:H.popper)==null?void 0:x.className)}),qt),Xr=II($t,Fe({},Re,(_=me.transition)!=null?_:H.transition),qt),Vn=II(Gt,Fe({},(w=me.tooltip)!=null?w:H.tooltip,{className:ln(Ht.tooltip,(C=(E=me.tooltip)!=null?E:H.tooltip)==null?void 0:C.className)}),qt),Ln=II(Ir,Fe({},(T=me.arrow)!=null?T:H.arrow,{className:ln(Ht.arrow,(A=(k=me.arrow)!=null?k:H.arrow)==null?void 0:A.className)}),qt);return Ji(Y.exports.Fragment,{children:[Y.exports.cloneElement(W,Ye),Kt(on,Fe({as:xe!=null?xe:T3,placement:ye,anchorEl:ee?{getBoundingClientRect:()=>({top:HI.y,left:HI.x,right:HI.x,bottom:HI.y,width:0,height:0})}:ht,popperRef:rr,open:ht?Je:!1,id:St,transition:!0},Ve,Br,{popperOptions:gt,children:({TransitionProps:br})=>Kt($t,Fe({timeout:ze.transitions.duration.shorter},br,Xr,{children:Ji(Gt,Fe({},Vn,{children:[Ce,Z?Kt(Ir,Fe({},Ln,{ref:pt})):null]}))}))}))]})});var tkt=drt;const hrt=PWe({createStyledComponent:Nr("div",{name:"MuiStack",slot:"Root",overridesResolver:(t,e)=>e.root}),useThemeProps:t=>ti({props:t,name:"MuiStack"})});var rkt=hrt;function prt(t){return Kn("MuiTab",t)}const mrt=ei("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper"]);var ub=mrt;const grt=["className","disabled","disableFocusRipple","fullWidth","icon","iconPosition","indicator","label","onChange","onClick","onFocus","selected","selectionFollowsFocus","textColor","value","wrapped"],vrt=t=>{const{classes:e,textColor:r,fullWidth:n,wrapped:i,icon:o,label:a,selected:s,disabled:l}=t,u={root:["root",o&&a&&"labelIcon",`textColor${Pr(r)}`,n&&"fullWidth",i&&"wrapped",s&&"selected",l&&"disabled"],iconWrapper:["iconWrapper"]};return Qn(u,prt,e)},yrt=Nr(Zg,{name:"MuiTab",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,r.label&&r.icon&&e.labelIcon,e[`textColor${Pr(r.textColor)}`],r.fullWidth&&e.fullWidth,r.wrapped&&e.wrapped]}})(({theme:t,ownerState:e})=>Fe({},t.typography.button,{maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center"},e.label&&{flexDirection:e.iconPosition==="top"||e.iconPosition==="bottom"?"column":"row"},{lineHeight:1.25},e.icon&&e.label&&{minHeight:72,paddingTop:9,paddingBottom:9,[`& > .${ub.iconWrapper}`]:Fe({},e.iconPosition==="top"&&{marginBottom:6},e.iconPosition==="bottom"&&{marginTop:6},e.iconPosition==="start"&&{marginRight:t.spacing(1)},e.iconPosition==="end"&&{marginLeft:t.spacing(1)})},e.textColor==="inherit"&&{color:"inherit",opacity:.6,[`&.${ub.selected}`]:{opacity:1},[`&.${ub.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity}},e.textColor==="primary"&&{color:(t.vars||t).palette.text.secondary,[`&.${ub.selected}`]:{color:(t.vars||t).palette.primary.main},[`&.${ub.disabled}`]:{color:(t.vars||t).palette.text.disabled}},e.textColor==="secondary"&&{color:(t.vars||t).palette.text.secondary,[`&.${ub.selected}`]:{color:(t.vars||t).palette.secondary.main},[`&.${ub.disabled}`]:{color:(t.vars||t).palette.text.disabled}},e.fullWidth&&{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"},e.wrapped&&{fontSize:t.typography.pxToRem(12)})),xrt=Y.exports.forwardRef(function(e,r){const n=ti({props:e,name:"MuiTab"}),{className:i,disabled:o=!1,disableFocusRipple:a=!1,fullWidth:s,icon:l,iconPosition:u="top",indicator:p,label:m,onChange:v,onClick:x,onFocus:y,selected:_,selectionFollowsFocus:w,textColor:C="inherit",value:E,wrapped:T=!1}=n,A=bn(n,grt),k=Fe({},n,{disabled:o,disableFocusRipple:a,selected:_,icon:!!l,iconPosition:u,label:!!m,fullWidth:s,textColor:C,wrapped:T}),X=vrt(k),Z=l&&m&&Y.exports.isValidElement(l)?Y.exports.cloneElement(l,{className:ln(X.iconWrapper,l.props.className)}):l,W=H=>{!_&&v&&v(H,E),x&&x(H)},D=H=>{w&&!_&&v&&v(H,E),y&&y(H)};return Ji(yrt,Fe({focusRipple:!a,className:ln(X.root,i),ref:r,role:"tab","aria-selected":_,disabled:o,onClick:W,onFocus:D,ownerState:k,tabIndex:_?0:-1},A,{children:[u==="top"||u==="start"?Ji(Y.exports.Fragment,{children:[Z,m]}):Ji(Y.exports.Fragment,{children:[m,Z]}),p]}))});var nkt=xrt;const _rt=Y.exports.createContext();var Tse=_rt;function brt(t){return Kn("MuiTable",t)}ei("MuiTable",["root","stickyHeader"]);const wrt=["className","component","padding","size","stickyHeader"],Crt=t=>{const{classes:e,stickyHeader:r}=t;return Qn({root:["root",r&&"stickyHeader"]},brt,e)},Ert=Nr("table",{name:"MuiTable",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,r.stickyHeader&&e.stickyHeader]}})(({theme:t,ownerState:e})=>Fe({display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,"& caption":Fe({},t.typography.body2,{padding:t.spacing(2),color:(t.vars||t).palette.text.secondary,textAlign:"left",captionSide:"bottom"})},e.stickyHeader&&{borderCollapse:"separate"})),Pse="table",Srt=Y.exports.forwardRef(function(e,r){const n=ti({props:e,name:"MuiTable"}),{className:i,component:o=Pse,padding:a="normal",size:s="medium",stickyHeader:l=!1}=n,u=bn(n,wrt),p=Fe({},n,{component:o,padding:a,size:s,stickyHeader:l}),m=Crt(p),v=Y.exports.useMemo(()=>({padding:a,size:s,stickyHeader:l}),[a,s,l]);return Kt(Tse.Provider,{value:v,children:Kt(Ert,Fe({as:o,role:o===Pse?null:"table",ref:r,className:ln(m.root,i),ownerState:p},u))})});var ikt=Srt;const Trt=Y.exports.createContext();var U3=Trt;function Prt(t){return Kn("MuiTableBody",t)}ei("MuiTableBody",["root"]);const Irt=["className","component"],Mrt=t=>{const{classes:e}=t;return Qn({root:["root"]},Prt,e)},Art=Nr("tbody",{name:"MuiTableBody",slot:"Root",overridesResolver:(t,e)=>e.root})({display:"table-row-group"}),Rrt={variant:"body"},Ise="tbody",krt=Y.exports.forwardRef(function(e,r){const n=ti({props:e,name:"MuiTableBody"}),{className:i,component:o=Ise}=n,a=bn(n,Irt),s=Fe({},n,{component:o}),l=Mrt(s);return Kt(U3.Provider,{value:Rrt,children:Kt(Art,Fe({className:ln(l.root,i),as:o,ref:r,role:o===Ise?null:"rowgroup",ownerState:s},a))})});var okt=krt;function Ort(t){return Kn("MuiTableCell",t)}const Lrt=ei("MuiTableCell",["root","head","body","footer","sizeSmall","sizeMedium","paddingCheckbox","paddingNone","alignLeft","alignCenter","alignRight","alignJustify","stickyHeader"]);var Drt=Lrt;const Nrt=["align","className","component","padding","scope","size","sortDirection","variant"],$rt=t=>{const{classes:e,variant:r,align:n,padding:i,size:o,stickyHeader:a}=t,s={root:["root",r,a&&"stickyHeader",n!=="inherit"&&`align${Pr(n)}`,i!=="normal"&&`padding${Pr(i)}`,`size${Pr(o)}`]};return Qn(s,Ort,e)},Frt=Nr("td",{name:"MuiTableCell",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,e[r.variant],e[`size${Pr(r.size)}`],r.padding!=="normal"&&e[`padding${Pr(r.padding)}`],r.align!=="inherit"&&e[`align${Pr(r.align)}`],r.stickyHeader&&e.stickyHeader]}})(({theme:t,ownerState:e})=>Fe({},t.typography.body2,{display:"table-cell",verticalAlign:"inherit",borderBottom:t.vars?`1px solid ${t.vars.palette.TableCell.border}`:`1px solid ${t.palette.mode==="light"?l3(co(t.palette.divider,1),.88):a3(co(t.palette.divider,1),.68)}`,textAlign:"left",padding:16},e.variant==="head"&&{color:(t.vars||t).palette.text.primary,lineHeight:t.typography.pxToRem(24),fontWeight:t.typography.fontWeightMedium},e.variant==="body"&&{color:(t.vars||t).palette.text.primary},e.variant==="footer"&&{color:(t.vars||t).palette.text.secondary,lineHeight:t.typography.pxToRem(21),fontSize:t.typography.pxToRem(12)},e.size==="small"&&{padding:"6px 16px",[`&.${Drt.paddingCheckbox}`]:{width:24,padding:"0 12px 0 16px","& > *":{padding:0}}},e.padding==="checkbox"&&{width:48,padding:"0 0 0 4px"},e.padding==="none"&&{padding:0},e.align==="left"&&{textAlign:"left"},e.align==="center"&&{textAlign:"center"},e.align==="right"&&{textAlign:"right",flexDirection:"row-reverse"},e.align==="justify"&&{textAlign:"justify"},e.stickyHeader&&{position:"sticky",top:0,zIndex:2,backgroundColor:(t.vars||t).palette.background.default})),zrt=Y.exports.forwardRef(function(e,r){const n=ti({props:e,name:"MuiTableCell"}),{align:i="inherit",className:o,component:a,padding:s,scope:l,size:u,sortDirection:p,variant:m}=n,v=bn(n,Nrt),x=Y.exports.useContext(Tse),y=Y.exports.useContext(U3),_=y&&y.variant==="head";let w;a?w=a:w=_?"th":"td";let C=l;w==="td"?C=void 0:!C&&_&&(C="col");const E=m||y&&y.variant,T=Fe({},n,{align:i,component:w,padding:s||(x&&x.padding?x.padding:"normal"),size:u||(x&&x.size?x.size:"medium"),sortDirection:p,stickyHeader:E==="head"&&x&&x.stickyHeader,variant:E}),A=$rt(T);let k=null;return p&&(k=p==="asc"?"ascending":"descending"),Kt(Frt,Fe({as:w,ref:r,className:ln(A.root,o),"aria-sort":k,scope:C,ownerState:T},v))});var skt=zrt;function Brt(t){return Kn("MuiTableContainer",t)}ei("MuiTableContainer",["root"]);const jrt=["className","component"],Urt=t=>{const{classes:e}=t;return Qn({root:["root"]},Brt,e)},Vrt=Nr("div",{name:"MuiTableContainer",slot:"Root",overridesResolver:(t,e)=>e.root})({width:"100%",overflowX:"auto"}),Hrt=Y.exports.forwardRef(function(e,r){const n=ti({props:e,name:"MuiTableContainer"}),{className:i,component:o="div"}=n,a=bn(n,jrt),s=Fe({},n,{component:o}),l=Urt(s);return Kt(Vrt,Fe({ref:r,as:o,className:ln(l.root,i),ownerState:s},a))});var akt=Hrt;function Wrt(t){return Kn("MuiTableHead",t)}ei("MuiTableHead",["root"]);const Grt=["className","component"],qrt=t=>{const{classes:e}=t;return Qn({root:["root"]},Wrt,e)},Xrt=Nr("thead",{name:"MuiTableHead",slot:"Root",overridesResolver:(t,e)=>e.root})({display:"table-header-group"}),Yrt={variant:"head"},Mse="thead",Krt=Y.exports.forwardRef(function(e,r){const n=ti({props:e,name:"MuiTableHead"}),{className:i,component:o=Mse}=n,a=bn(n,Grt),s=Fe({},n,{component:o}),l=qrt(s);return Kt(U3.Provider,{value:Yrt,children:Kt(Xrt,Fe({as:o,className:ln(l.root,i),ref:r,role:o===Mse?null:"rowgroup",ownerState:s},a))})});var lkt=Krt,Zrt=nd(Kt("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),Qrt=nd(Kt("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight");function Jrt(t){return Kn("MuiTableRow",t)}const ent=ei("MuiTableRow",["root","selected","hover","head","footer"]);var Ase=ent;const tnt=["className","component","hover","selected"],rnt=t=>{const{classes:e,selected:r,hover:n,head:i,footer:o}=t;return Qn({root:["root",r&&"selected",n&&"hover",i&&"head",o&&"footer"]},Jrt,e)},nnt=Nr("tr",{name:"MuiTableRow",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,r.head&&e.head,r.footer&&e.footer]}})(({theme:t})=>({color:"inherit",display:"table-row",verticalAlign:"middle",outline:0,[`&.${Ase.hover}:hover`]:{backgroundColor:(t.vars||t).palette.action.hover},[`&.${Ase.selected}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:co(t.palette.primary.main,t.palette.action.selectedOpacity),"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:co(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity)}}})),Rse="tr",int=Y.exports.forwardRef(function(e,r){const n=ti({props:e,name:"MuiTableRow"}),{className:i,component:o=Rse,hover:a=!1,selected:s=!1}=n,l=bn(n,tnt),u=Y.exports.useContext(U3),p=Fe({},n,{component:o,hover:a,selected:s,head:u&&u.variant==="head",footer:u&&u.variant==="footer"}),m=rnt(p);return Kt(nnt,Fe({as:o,ref:r,className:ln(m.root,i),role:o===Rse?null:"row",ownerState:p},l))});var ckt=int;function ont(t){return(1+Math.sin(Math.PI*t-Math.PI/2))/2}function snt(t,e,r,n={},i=()=>{}){const{ease:o=ont,duration:a=300}=n;let s=null;const l=e[t];let u=!1;const p=()=>{u=!0},m=v=>{if(u){i(new Error("Animation cancelled"));return}s===null&&(s=v);const x=Math.min(1,(v-s)/a);if(e[t]=o(x)*(r-l)+l,x>=1){requestAnimationFrame(()=>{i(null)});return}requestAnimationFrame(m)};return l===r?(i(new Error("Element already at target position")),p):(requestAnimationFrame(m),p)}const ant=["onChange"],lnt={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function cnt(t){const{onChange:e}=t,r=bn(t,ant),n=Y.exports.useRef(),i=Y.exports.useRef(null),o=()=>{n.current=i.current.offsetHeight-i.current.clientHeight};return Y.exports.useEffect(()=>{const a=tb(()=>{const l=n.current;o(),l!==n.current&&e(n.current)}),s=rp(i.current);return s.addEventListener("resize",a),()=>{a.clear(),s.removeEventListener("resize",a)}},[e]),Y.exports.useEffect(()=>{o(),e(n.current)},[e]),Kt("div",Fe({style:lnt,ref:i},r))}function unt(t){return Kn("MuiTabScrollButton",t)}const fnt=ei("MuiTabScrollButton",["root","vertical","horizontal","disabled"]);var dnt=fnt,kse,Ose;const hnt=["className","direction","orientation","disabled"],pnt=t=>{const{classes:e,orientation:r,disabled:n}=t;return Qn({root:["root",r,n&&"disabled"]},unt,e)},mnt=Nr(Zg,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,r.orientation&&e[r.orientation]]}})(({ownerState:t})=>Fe({width:40,flexShrink:0,opacity:.8,[`&.${dnt.disabled}`]:{opacity:0}},t.orientation==="vertical"&&{width:"100%",height:40,"& svg":{transform:`rotate(${t.isRtl?-90:90}deg)`}})),gnt=Y.exports.forwardRef(function(e,r){const n=ti({props:e,name:"MuiTabScrollButton"}),{className:i,direction:o}=n,a=bn(n,hnt),l=km().direction==="rtl",u=Fe({isRtl:l},n),p=pnt(u);return Kt(mnt,Fe({component:"div",className:ln(p.root,i),ref:r,role:null,ownerState:u,tabIndex:null},a,{children:o==="left"?kse||(kse=Kt(Zrt,{fontSize:"small"})):Ose||(Ose=Kt(Qrt,{fontSize:"small"}))}))});var vnt=gnt;function ynt(t){return Kn("MuiTabs",t)}const xnt=ei("MuiTabs",["root","vertical","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]);var Jj=xnt;const _nt=["aria-label","aria-labelledby","action","centered","children","className","component","allowScrollButtonsMobile","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","selectionFollowsFocus","TabIndicatorProps","TabScrollButtonProps","textColor","value","variant","visibleScrollbar"],Lse=(t,e)=>t===e?t.firstChild:e&&e.nextElementSibling?e.nextElementSibling:t.firstChild,Dse=(t,e)=>t===e?t.lastChild:e&&e.previousElementSibling?e.previousElementSibling:t.lastChild,V3=(t,e,r)=>{let n=!1,i=r(t,e);for(;i;){if(i===t.firstChild){if(n)return;n=!0}const o=i.disabled||i.getAttribute("aria-disabled")==="true";if(!i.hasAttribute("tabindex")||o)i=r(t,i);else{i.focus();return}}},bnt=t=>{const{vertical:e,fixed:r,hideScrollbar:n,scrollableX:i,scrollableY:o,centered:a,scrollButtonsHideMobile:s,classes:l}=t;return Qn({root:["root",e&&"vertical"],scroller:["scroller",r&&"fixed",n&&"hideScrollbar",i&&"scrollableX",o&&"scrollableY"],flexContainer:["flexContainer",e&&"flexContainerVertical",a&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",s&&"scrollButtonsHideMobile"],scrollableX:[i&&"scrollableX"],hideScrollbar:[n&&"hideScrollbar"]},ynt,l)},wnt=Nr("div",{name:"MuiTabs",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[{[`& .${Jj.scrollButtons}`]:e.scrollButtons},{[`& .${Jj.scrollButtons}`]:r.scrollButtonsHideMobile&&e.scrollButtonsHideMobile},e.root,r.vertical&&e.vertical]}})(({ownerState:t,theme:e})=>Fe({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex"},t.vertical&&{flexDirection:"column"},t.scrollButtonsHideMobile&&{[`& .${Jj.scrollButtons}`]:{[e.breakpoints.down("sm")]:{display:"none"}}})),Cnt=Nr("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.scroller,r.fixed&&e.fixed,r.hideScrollbar&&e.hideScrollbar,r.scrollableX&&e.scrollableX,r.scrollableY&&e.scrollableY]}})(({ownerState:t})=>Fe({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap"},t.fixed&&{overflowX:"hidden",width:"100%"},t.hideScrollbar&&{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},t.scrollableX&&{overflowX:"auto",overflowY:"hidden"},t.scrollableY&&{overflowY:"auto",overflowX:"hidden"})),Ent=Nr("div",{name:"MuiTabs",slot:"FlexContainer",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.flexContainer,r.vertical&&e.flexContainerVertical,r.centered&&e.centered]}})(({ownerState:t})=>Fe({display:"flex"},t.vertical&&{flexDirection:"column"},t.centered&&{justifyContent:"center"})),Snt=Nr("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:(t,e)=>e.indicator})(({ownerState:t,theme:e})=>Fe({position:"absolute",height:2,bottom:0,width:"100%",transition:e.transitions.create()},t.indicatorColor==="primary"&&{backgroundColor:(e.vars||e).palette.primary.main},t.indicatorColor==="secondary"&&{backgroundColor:(e.vars||e).palette.secondary.main},t.vertical&&{height:"100%",width:2,right:0})),Tnt=Nr(cnt,{name:"MuiTabs",slot:"ScrollbarSize"})({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),Nse={},Pnt=Y.exports.forwardRef(function(e,r){const n=ti({props:e,name:"MuiTabs"}),i=km(),o=i.direction==="rtl",{"aria-label":a,"aria-labelledby":s,action:l,centered:u=!1,children:p,className:m,component:v="div",allowScrollButtonsMobile:x=!1,indicatorColor:y="primary",onChange:_,orientation:w="horizontal",ScrollButtonComponent:C=vnt,scrollButtons:E="auto",selectionFollowsFocus:T,TabIndicatorProps:A={},TabScrollButtonProps:k={},textColor:X="primary",value:Z,variant:W="standard",visibleScrollbar:D=!1}=n,H=bn(n,_nt),N=W==="scrollable",j=w==="vertical",$=j?"scrollTop":"scrollLeft",z=j?"top":"left",O=j?"bottom":"right",F=j?"clientHeight":"clientWidth",G=j?"height":"width",q=Fe({},n,{component:v,allowScrollButtonsMobile:x,indicatorColor:y,orientation:w,vertical:j,scrollButtons:E,textColor:X,variant:W,visibleScrollbar:D,fixed:!N,hideScrollbar:N&&!D,scrollableX:N&&!j,scrollableY:N&&j,centered:u&&!N,scrollButtonsHideMobile:!x}),ee=bnt(q),[re,ce]=Y.exports.useState(!1),[fe,J]=Y.exports.useState(Nse),[oe,ve]=Y.exports.useState({start:!1,end:!1}),[ye,xe]=Y.exports.useState({overflow:"hidden",scrollbarWidth:0}),se=new Map,me=Y.exports.useRef(null),pe=Y.exports.useRef(null),Ce=()=>{const Ze=me.current;let Je;if(Ze){const er=Ze.getBoundingClientRect();Je={clientWidth:Ze.clientWidth,scrollLeft:Ze.scrollLeft,scrollTop:Ze.scrollTop,scrollLeftNormalized:Wne(Ze,i.direction),scrollWidth:Ze.scrollWidth,top:er.top,bottom:er.bottom,left:er.left,right:er.right}}let St;if(Ze&&Z!==!1){const er=pe.current.children;if(er.length>0){const Ft=er[se.get(Z)];St=Ft?Ft.getBoundingClientRect():null}}return{tabsMeta:Je,tabMeta:St}},Pe=bc(()=>{const{tabsMeta:Ze,tabMeta:Je}=Ce();let St=0,er;if(j)er="top",Je&&Ze&&(St=Je.top-Ze.top+Ze.scrollTop);else if(er=o?"right":"left",Je&&Ze){const Ut=o?Ze.scrollLeftNormalized+Ze.clientWidth-Ze.scrollWidth:Ze.scrollLeft;St=(o?-1:1)*(Je[er]-Ze[er]+Ut)}const Ft={[er]:St,[G]:Je?Je[G]:0};if(isNaN(fe[er])||isNaN(fe[G]))J(Ft);else{const Ut=Math.abs(fe[er]-Ft[er]),Er=Math.abs(fe[G]-Ft[G]);(Ut>=1||Er>=1)&&J(Ft)}}),Re=(Ze,{animation:Je=!0}={})=>{Je?snt($,me.current,Ze,{duration:i.transitions.duration.standard}):me.current[$]=Ze},ke=Ze=>{let Je=me.current[$];j?Je+=Ze:(Je+=Ze*(o?-1:1),Je*=o&&Hne()==="reverse"?-1:1),Re(Je)},ze=()=>{const Ze=me.current[F];let Je=0;const St=Array.from(pe.current.children);for(let er=0;er<St.length;er+=1){const Ft=St[er];if(Je+Ft[F]>Ze){er===0&&(Je=Ze);break}Je+=Ft[F]}return Je},Ge=()=>{ke(-1*ze())},ht=()=>{ke(ze())},Tt=Y.exports.useCallback(Ze=>{xe({overflow:null,scrollbarWidth:Ze})},[]),xt=()=>{const Ze={};Ze.scrollbarSizeListener=N?Kt(Tnt,{onChange:Tt,className:ln(ee.scrollableX,ee.hideScrollbar)}):null;const Je=oe.start||oe.end,St=N&&(E==="auto"&&Je||E===!0);return Ze.scrollButtonStart=St?Kt(C,Fe({orientation:w,direction:o?"right":"left",onClick:Ge,disabled:!oe.start},k,{className:ln(ee.scrollButtons,k.className)})):null,Ze.scrollButtonEnd=St?Kt(C,Fe({orientation:w,direction:o?"left":"right",onClick:ht,disabled:!oe.end},k,{className:ln(ee.scrollButtons,k.className)})):null,Ze},pt=bc(Ze=>{const{tabsMeta:Je,tabMeta:St}=Ce();if(!(!St||!Je)){if(St[z]<Je[z]){const er=Je[$]+(St[z]-Je[z]);Re(er,{animation:Ze})}else if(St[O]>Je[O]){const er=Je[$]+(St[O]-Je[O]);Re(er,{animation:Ze})}}}),It=bc(()=>{if(N&&E!==!1){const{scrollTop:Ze,scrollHeight:Je,clientHeight:St,scrollWidth:er,clientWidth:Ft}=me.current;let Ut,Er;if(j)Ut=Ze>1,Er=Ze<Je-St-1;else{const kr=Wne(me.current,i.direction);Ut=o?kr<er-Ft-1:kr>1,Er=o?kr>1:kr<er-Ft-1}(Ut!==oe.start||Er!==oe.end)&&ve({start:Ut,end:Er})}});Y.exports.useEffect(()=>{const Ze=tb(()=>{me.current&&(Pe(),It())}),Je=rp(me.current);Je.addEventListener("resize",Ze);let St;return typeof ResizeObserver!="undefined"&&(St=new ResizeObserver(Ze),Array.from(pe.current.children).forEach(er=>{St.observe(er)})),()=>{Ze.clear(),Je.removeEventListener("resize",Ze),St&&St.disconnect()}},[Pe,It]);const Ie=Y.exports.useMemo(()=>tb(()=>{It()}),[It]);Y.exports.useEffect(()=>()=>{Ie.clear()},[Ie]),Y.exports.useEffect(()=>{ce(!0)},[]),Y.exports.useEffect(()=>{Pe(),It()}),Y.exports.useEffect(()=>{pt(Nse!==fe)},[pt,fe]),Y.exports.useImperativeHandle(l,()=>({updateIndicator:Pe,updateScrollButtons:It}),[Pe,It]);const de=Kt(Snt,Fe({},A,{className:ln(ee.indicator,A.className),ownerState:q,style:Fe({},fe,A.style)}));let Te=0;const Be=Y.exports.Children.map(p,Ze=>{if(!Y.exports.isValidElement(Ze))return null;const Je=Ze.props.value===void 0?Te:Ze.props.value;se.set(Je,Te);const St=Je===Z;return Te+=1,Y.exports.cloneElement(Ze,Fe({fullWidth:W==="fullWidth",indicator:St&&!re&&de,selected:St,selectionFollowsFocus:T,onChange:_,textColor:X,value:Je},Te===1&&Z===!1&&!Ze.props.tabIndex?{tabIndex:0}:{}))}),Ke=Ze=>{const Je=pe.current,St=wl(Je).activeElement;if(St.getAttribute("role")!=="tab")return;let Ft=w==="horizontal"?"ArrowLeft":"ArrowUp",Ut=w==="horizontal"?"ArrowRight":"ArrowDown";switch(w==="horizontal"&&o&&(Ft="ArrowRight",Ut="ArrowLeft"),Ze.key){case Ft:Ze.preventDefault(),V3(Je,St,Dse);break;case Ut:Ze.preventDefault(),V3(Je,St,Lse);break;case"Home":Ze.preventDefault(),V3(Je,null,Lse);break;case"End":Ze.preventDefault(),V3(Je,null,Dse);break}},ot=xt();return Ji(wnt,Fe({className:ln(ee.root,m),ownerState:q,ref:r,as:v},H,{children:[ot.scrollButtonStart,ot.scrollbarSizeListener,Ji(Cnt,{className:ee.scroller,ownerState:q,style:{overflow:ye.overflow,[j?`margin${o?"Left":"Right"}`:"marginBottom"]:D?void 0:-ye.scrollbarWidth},ref:me,onScroll:Ie,children:[Kt(Ent,{"aria-label":a,"aria-labelledby":s,"aria-orientation":w==="vertical"?"vertical":null,className:ee.flexContainer,ownerState:q,onKeyDown:Ke,ref:pe,role:"tablist",children:Be}),re&&de]}),ot.scrollButtonEnd]}))});var ukt=Pnt;function Int(t){return Kn("MuiTextField",t)}ei("MuiTextField",["root"]);const Mnt=["autoComplete","autoFocus","children","className","color","defaultValue","disabled","error","FormHelperTextProps","fullWidth","helperText","id","InputLabelProps","inputProps","InputProps","inputRef","label","maxRows","minRows","multiline","name","onBlur","onChange","onFocus","placeholder","required","rows","select","SelectProps","type","value","variant"],Ant={standard:Hoe,filled:Noe,outlined:use},Rnt=t=>{const{classes:e}=t;return Qn({root:["root"]},Int,e)},knt=Nr(aQe,{name:"MuiTextField",slot:"Root",overridesResolver:(t,e)=>e.root})({}),Ont=Y.exports.forwardRef(function(e,r){const n=ti({props:e,name:"MuiTextField"}),{autoComplete:i,autoFocus:o=!1,children:a,className:s,color:l="primary",defaultValue:u,disabled:p=!1,error:m=!1,FormHelperTextProps:v,fullWidth:x=!1,helperText:y,id:_,InputLabelProps:w,inputProps:C,InputProps:E,inputRef:T,label:A,maxRows:k,minRows:X,multiline:Z=!1,name:W,onBlur:D,onChange:H,onFocus:N,placeholder:j,required:$=!1,rows:z,select:O=!1,SelectProps:F,type:G,value:q,variant:ee="outlined"}=n,re=bn(n,Mnt),ce=Fe({},n,{autoFocus:o,color:l,disabled:p,error:m,fullWidth:x,multiline:Z,required:$,select:O,variant:ee}),fe=Rnt(ce),J={};ee==="outlined"&&(w&&typeof w.shrink!="undefined"&&(J.notched=w.shrink),J.label=A),O&&((!F||!F.native)&&(J.id=void 0),J["aria-describedby"]=void 0);const oe=gI(_),ve=y&&oe?`${oe}-helper-text`:void 0,ye=A&&oe?`${oe}-label`:void 0,xe=Ant[ee],se=Kt(xe,Fe({"aria-describedby":ve,autoComplete:i,autoFocus:o,defaultValue:u,fullWidth:x,multiline:Z,name:W,rows:z,maxRows:k,minRows:X,type:G,value:q,id:oe,inputRef:T,onBlur:D,onChange:H,onFocus:N,placeholder:j,inputProps:C},J,E));return Ji(knt,Fe({className:ln(fe.root,s),disabled:p,error:m,fullWidth:x,ref:r,required:$,color:l,variant:ee,ownerState:ce},re,{children:[A!=null&&A!==""&&Kt(vJe,Fe({htmlFor:oe,id:ye},w,{children:A})),O?Kt(Ott,Fe({"aria-describedby":ve,id:oe,labelId:ye,value:q,input:se},F,{children:a})):se,y&&Kt(TQe,Fe({id:ve},v,{children:y}))]}))});var fkt=Ont,$se={exports:{}};/** * @license * Lodash <https://lodash.com/> * Copyright OpenJS Foundation and other contributors <https://openjsf.org/> * Released under MIT license <https://lodash.com/license> * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE> * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors */(function(t,e){(function(){var r,n="4.17.21",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",s="Invalid `variable` option passed into `_.template`",l="__lodash_hash_undefined__",u=500,p="__lodash_placeholder__",m=1,v=2,x=4,y=1,_=2,w=1,C=2,E=4,T=8,A=16,k=32,X=64,Z=128,W=256,D=512,H=30,N="...",j=800,$=16,z=1,O=2,F=3,G=1/0,q=9007199254740991,ee=17976931348623157e292,re=0/0,ce=4294967295,fe=ce-1,J=ce>>>1,oe=[["ary",Z],["bind",w],["bindKey",C],["curry",T],["curryRight",A],["flip",D],["partial",k],["partialRight",X],["rearg",W]],ve="[object Arguments]",ye="[object Array]",xe="[object AsyncFunction]",se="[object Boolean]",me="[object Date]",pe="[object DOMException]",Ce="[object Error]",Pe="[object Function]",Re="[object GeneratorFunction]",ke="[object Map]",ze="[object Number]",Ge="[object Null]",ht="[object Object]",Tt="[object Promise]",xt="[object Proxy]",pt="[object RegExp]",It="[object Set]",Ie="[object String]",de="[object Symbol]",Te="[object Undefined]",Be="[object WeakMap]",Ke="[object WeakSet]",ot="[object ArrayBuffer]",Ze="[object DataView]",Je="[object Float32Array]",St="[object Float64Array]",er="[object Int8Array]",Ft="[object Int16Array]",Ut="[object Int32Array]",Er="[object Uint8Array]",kr="[object Uint8ClampedArray]",mr="[object Uint16Array]",Dt="[object Uint32Array]",Jr=/\b__p \+= '';/g,We=/\b(__p \+=) '' \+/g,Oe=/(__e\(.*?\)|\b__t\)) \+\n'';/g,$e=/&(?:amp|lt|gt|quot|#39);/g,Xe=/[&<>"']/g,tt=RegExp($e.source),_t=RegExp(Xe.source),Ot=/<%-([\s\S]+?)%>/g,Nt=/<%([\s\S]+?)%>/g,bt=/<%=([\s\S]+?)%>/g,Wt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Sr=/^\w*$/,rr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,tr=/[\\^$.*+?()[\]{}|]/g,sn=RegExp(tr.source),un=/^\s+/,Ye=/\s/,Ve=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,gt=/\{\n\/\* \[wrapped with (.+)\] \*/,qt=/,? & /,Ht=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,on=/[()=,{}\[\]\/\s]/,$t=/\\(\\)?/g,Gt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ir=/\w*$/,Br=/^[-+]0x[0-9a-f]+$/i,Xr=/^0b[01]+$/i,Vn=/^\[object .+?Constructor\]$/,Ln=/^0o[0-7]+$/i,br=/^(?:0|[1-9]\d*)$/,oi=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Gi=/($^)/,pi=/['\n\r\u2028\u2029\\]/g,Ds="\\ud800-\\udfff",Xo="\\u0300-\\u036f",jo="\\ufe20-\\ufe2f",Qa="\\u20d0-\\u20ff",za=Xo+jo+Qa,es="\\u2700-\\u27bf",Pi="a-z\\xdf-\\xf6\\xf8-\\xff",Ns="\\xac\\xb1\\xd7\\xf7",dr="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Oi="\\u2000-\\u206f",Li=" \\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",ho="A-Z\\xc0-\\xd6\\xd8-\\xde",qs="\\ufe0e\\ufe0f",fn=Ns+dr+Oi+Li,an="['\u2019]",Dr="["+Ds+"]",Rn="["+fn+"]",zr="["+za+"]",Fn="\\d+",Tn="["+es+"]",ls="["+Pi+"]",Uo="[^"+Ds+fn+Fn+es+Pi+ho+"]",ri="\\ud83c[\\udffb-\\udfff]",$s="(?:"+zr+"|"+ri+")",le="[^"+Ds+"]",Se="(?:\\ud83c[\\udde6-\\uddff]){2}",Ue="[\\ud800-\\udbff][\\udc00-\\udfff]",Et="["+ho+"]",qe="\\u200d",et="(?:"+ls+"|"+Uo+")",ct="(?:"+Et+"|"+Uo+")",jt="(?:"+an+"(?:d|ll|m|re|s|t|ve))?",Xt="(?:"+an+"(?:D|LL|M|RE|S|T|VE))?",pr=$s+"?",zt="["+qs+"]?",Hr="(?:"+qe+"(?:"+[le,Se,Ue].join("|")+")"+zt+pr+")*",Zr="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",hn="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",gn=zt+pr+Hr,Bn="(?:"+[Tn,Se,Ue].join("|")+")"+gn,wr="(?:"+[le+zr+"?",zr,Se,Ue,Dr].join("|")+")",pn=RegExp(an,"g"),ci=RegExp(zr,"g"),fi=RegExp(ri+"(?="+ri+")|"+wr+gn,"g"),Lo=RegExp([Et+"?"+ls+"+"+jt+"(?="+[Rn,Et,"$"].join("|")+")",ct+"+"+Xt+"(?="+[Rn,Et+et,"$"].join("|")+")",Et+"?"+et+"+"+jt,Et+"+"+Xt,hn,Zr,Fn,Bn].join("|"),"g"),On=RegExp("["+qe+Ds+za+qs+"]"),ao=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Ja=["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"],$i=-1,_i={};_i[Je]=_i[St]=_i[er]=_i[Ft]=_i[Ut]=_i[Er]=_i[kr]=_i[mr]=_i[Dt]=!0,_i[ve]=_i[ye]=_i[ot]=_i[se]=_i[Ze]=_i[me]=_i[Ce]=_i[Pe]=_i[ke]=_i[ze]=_i[ht]=_i[pt]=_i[It]=_i[Ie]=_i[Be]=!1;var Hn={};Hn[ve]=Hn[ye]=Hn[ot]=Hn[Ze]=Hn[se]=Hn[me]=Hn[Je]=Hn[St]=Hn[er]=Hn[Ft]=Hn[Ut]=Hn[ke]=Hn[ze]=Hn[ht]=Hn[pt]=Hn[It]=Hn[Ie]=Hn[de]=Hn[Er]=Hn[kr]=Hn[mr]=Hn[Dt]=!0,Hn[Ce]=Hn[Pe]=Hn[Be]=!1;var wf={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},yd={"&":"&","<":"<",">":">",'"':""","'":"'"},ba={"&":"&","<":"<",">":">",""":'"',"'":"'"},ju={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},$p=parseFloat,A_=parseInt,Fp=typeof xl=="object"&&xl&&xl.Object===Object&&xl,Uu=typeof self=="object"&&self&&self.Object===Object&&self,Yo=Fp||Uu||Function("return this")(),Eh=e&&!e.nodeType&&e,Gl=Eh&&!0&&t&&!t.nodeType&&t,el=Gl&&Gl.exports===Eh,Cf=el&&Fp.process,Xs=function(){try{var Zt=Gl&&Gl.require&&Gl.require("util").types;return Zt||Cf&&Cf.binding&&Cf.binding("util")}catch{}}(),zp=Xs&&Xs.isArrayBuffer,Vu=Xs&&Xs.isDate,ru=Xs&&Xs.isMap,Bp=Xs&&Xs.isRegExp,xd=Xs&&Xs.isSet,Sh=Xs&&Xs.isTypedArray;function sa(Zt,gr,ir){switch(ir.length){case 0:return Zt.call(gr);case 1:return Zt.call(gr,ir[0]);case 2:return Zt.call(gr,ir[0],ir[1]);case 3:return Zt.call(gr,ir[0],ir[1],ir[2])}return Zt.apply(gr,ir)}function Th(Zt,gr,ir,In){for(var Zn=-1,lo=Zt==null?0:Zt.length;++Zn<lo;){var Mo=Zt[Zn];gr(In,Mo,ir(Mo),Zt)}return In}function gi(Zt,gr){for(var ir=-1,In=Zt==null?0:Zt.length;++ir<In&&gr(Zt[ir],ir,Zt)!==!1;);return Zt}function R_(Zt,gr){for(var ir=Zt==null?0:Zt.length;ir--&&gr(Zt[ir],ir,Zt)!==!1;);return Zt}function tg(Zt,gr){for(var ir=-1,In=Zt==null?0:Zt.length;++ir<In;)if(!gr(Zt[ir],ir,Zt))return!1;return!0}function Hu(Zt,gr){for(var ir=-1,In=Zt==null?0:Zt.length,Zn=0,lo=[];++ir<In;){var Mo=Zt[ir];gr(Mo,ir,Zt)&&(lo[Zn++]=Mo)}return lo}function _d(Zt,gr){var ir=Zt==null?0:Zt.length;return!!ir&&Ef(Zt,gr,0)>-1}function Ph(Zt,gr,ir){for(var In=-1,Zn=Zt==null?0:Zt.length;++In<Zn;)if(ir(gr,Zt[In]))return!0;return!1}function po(Zt,gr){for(var ir=-1,In=Zt==null?0:Zt.length,Zn=Array(In);++ir<In;)Zn[ir]=gr(Zt[ir],ir,Zt);return Zn}function Fs(Zt,gr){for(var ir=-1,In=gr.length,Zn=Zt.length;++ir<In;)Zt[Zn+ir]=gr[ir];return Zt}function lc(Zt,gr,ir,In){var Zn=-1,lo=Zt==null?0:Zt.length;for(In&&lo&&(ir=Zt[++Zn]);++Zn<lo;)ir=gr(ir,Zt[Zn],Zn,Zt);return ir}function Wu(Zt,gr,ir,In){var Zn=Zt==null?0:Zt.length;for(In&&Zn&&(ir=Zt[--Zn]);Zn--;)ir=gr(ir,Zt[Zn],Zn,Zt);return ir}function wa(Zt,gr){for(var ir=-1,In=Zt==null?0:Zt.length;++ir<In;)if(gr(Zt[ir],ir,Zt))return!0;return!1}var bd=Ii("length");function wd(Zt){return Zt.split("")}function Ih(Zt){return Zt.match(Ht)||[]}function Cd(Zt,gr,ir){var In;return ir(Zt,function(Zn,lo,Mo){if(gr(Zn,lo,Mo))return In=lo,!1}),In}function Ed(Zt,gr,ir,In){for(var Zn=Zt.length,lo=ir+(In?1:-1);In?lo--:++lo<Zn;)if(gr(Zt[lo],lo,Zt))return lo;return-1}function Ef(Zt,gr,ir){return gr===gr?Ys(Zt,gr,ir):Ed(Zt,Mh,ir)}function rg(Zt,gr,ir,In){for(var Zn=ir-1,lo=Zt.length;++Zn<lo;)if(In(Zt[Zn],gr))return Zn;return-1}function Mh(Zt){return Zt!==Zt}function jp(Zt,gr){var ir=Zt==null?0:Zt.length;return ir?ng(Zt,gr)/ir:re}function Ii(Zt){return function(gr){return gr==null?r:gr[Zt]}}function cc(Zt){return function(gr){return Zt==null?r:Zt[gr]}}function Ev(Zt,gr,ir,In,Zn){return Zn(Zt,function(lo,Mo,Zi){ir=In?(In=!1,lo):gr(ir,lo,Mo,Zi)}),ir}function nu(Zt,gr){var ir=Zt.length;for(Zt.sort(gr);ir--;)Zt[ir]=Zt[ir].value;return Zt}function ng(Zt,gr){for(var ir,In=-1,Zn=Zt.length;++In<Zn;){var lo=gr(Zt[In]);lo!==r&&(ir=ir===r?lo:ir+lo)}return ir}function gl(Zt,gr){for(var ir=-1,In=Array(Zt);++ir<Zt;)In[ir]=gr(ir);return In}function ig(Zt,gr){return po(gr,function(ir){return[ir,Zt[ir]]})}function a0(Zt){return Zt&&Zt.slice(0,ql(Zt)+1).replace(un,"")}function tl(Zt){return function(gr){return Zt(gr)}}function Up(Zt,gr){return po(gr,function(ir){return Zt[ir]})}function Sf(Zt,gr){return Zt.has(gr)}function Vp(Zt,gr){for(var ir=-1,In=Zt.length;++ir<In&&Ef(gr,Zt[ir],0)>-1;);return ir}function Hp(Zt,gr){for(var ir=Zt.length;ir--&&Ef(gr,Zt[ir],0)>-1;);return ir}function Tf(Zt,gr){for(var ir=Zt.length,In=0;ir--;)Zt[ir]===gr&&++In;return In}var Sv=cc(wf),l0=cc(yd);function Jt(Zt){return"\\"+ju[Zt]}function yr(Zt,gr){return Zt==null?r:Zt[gr]}function dn(Zt){return On.test(Zt)}function Wn(Zt){return ao.test(Zt)}function Do(Zt){for(var gr,ir=[];!(gr=Zt.next()).done;)ir.push(gr.value);return ir}function Di(Zt){var gr=-1,ir=Array(Zt.size);return Zt.forEach(function(In,Zn){ir[++gr]=[Zn,In]}),ir}function mo(Zt,gr){return function(ir){return Zt(gr(ir))}}function Io(Zt,gr){for(var ir=-1,In=Zt.length,Zn=0,lo=[];++ir<In;){var Mo=Zt[ir];(Mo===gr||Mo===p)&&(Zt[ir]=p,lo[Zn++]=ir)}return lo}function rl(Zt){var gr=-1,ir=Array(Zt.size);return Zt.forEach(function(In){ir[++gr]=In}),ir}function Ps(Zt){var gr=-1,ir=Array(Zt.size);return Zt.forEach(function(In){ir[++gr]=[In,In]}),ir}function Ys(Zt,gr,ir){for(var In=ir-1,Zn=Zt.length;++In<Zn;)if(Zt[In]===gr)return In;return-1}function uc(Zt,gr,ir){for(var In=ir+1;In--;)if(Zt[In]===gr)return In;return In}function Tl(Zt){return dn(Zt)?Wp(Zt):bd(Zt)}function Ko(Zt){return dn(Zt)?Pf(Zt):wd(Zt)}function ql(Zt){for(var gr=Zt.length;gr--&&Ye.test(Zt.charAt(gr)););return gr}var iu=cc(ba);function Wp(Zt){for(var gr=fi.lastIndex=0;fi.test(Zt);)++gr;return gr}function Pf(Zt){return Zt.match(fi)||[]}function Gp(Zt){return Zt.match(Lo)||[]}var og=function Zt(gr){gr=gr==null?Yo:Sd.defaults(Yo.Object(),gr,Sd.pick(Yo,Ja));var ir=gr.Array,In=gr.Date,Zn=gr.Error,lo=gr.Function,Mo=gr.Math,Zi=gr.Object,ou=gr.RegExp,qp=gr.String,nl=gr.TypeError,fc=ir.prototype,Xl=lo.prototype,If=Zi.prototype,Mf=gr["__core-js_shared__"],Pl=Xl.toString,Qi=If.hasOwnProperty,vl=0,Td=function(){var P=/[^.]+$/.exec(Mf&&Mf.keys&&Mf.keys.IE_PROTO||"");return P?"Symbol(src)_1."+P:""}(),Af=If.toString,su=Pl.call(Zi),sg=Yo._,c0=ou("^"+Pl.call(Qi).replace(tr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Xp=el?gr.Buffer:r,Ai=gr.Symbol,Ah=gr.Uint8Array,k_=Xp?Xp.allocUnsafe:r,Yp=mo(Zi.getPrototypeOf,Zi),Kp=Zi.create,O_=If.propertyIsEnumerable,Zp=fc.splice,Rf=Ai?Ai.isConcatSpreadable:r,ag=Ai?Ai.iterator:r,kf=Ai?Ai.toStringTag:r,Pd=function(){try{var P=wg(Zi,"defineProperty");return P({},"",{}),P}catch{}}(),lg=gr.clearTimeout!==Yo.clearTimeout&&gr.clearTimeout,L_=In&&In.now!==Yo.Date.now&&In.now,Tv=gr.setTimeout!==Yo.setTimeout&&gr.setTimeout,Rh=Mo.ceil,Qp=Mo.floor,cg=Zi.getOwnPropertySymbols,wn=Xp?Xp.isBuffer:r,au=gr.isFinite,tw=fc.join,Pv=mo(Zi.keys,Zi),zs=Mo.max,xo=Mo.min,Iv=In.now,u0=gr.parseInt,f0=Mo.random,d0=fc.reverse,h0=wg(gr,"DataView"),kh=wg(gr,"Map"),Oh=wg(gr,"Promise"),Lh=wg(gr,"Set"),Mv=wg(gr,"WeakMap"),ug=wg(Zi,"create"),Id=Mv&&new Mv,Dh={},D_=Hv(h0),N_=Hv(kh),p0=Hv(Oh),Av=Hv(Lh),Rv=Hv(Mv),fg=Ai?Ai.prototype:r,dg=fg?fg.valueOf:r,m0=fg?fg.toString:r;function nt(P){if(fa(P)&&!Ni(P)&&!(P instanceof ro)){if(P instanceof Lc)return P;if(Qi.call(P,"__wrapped__"))return P0(P)}return new Lc(P)}var Oc=function(){function P(){}return function(B){if(!Ks(B))return{};if(Kp)return Kp(B);P.prototype=B;var ie=new P;return P.prototype=r,ie}}();function kv(){}function Lc(P,B){this.__wrapped__=P,this.__actions__=[],this.__chain__=!!B,this.__index__=0,this.__values__=r}nt.templateSettings={escape:Ot,evaluate:Nt,interpolate:bt,variable:"",imports:{_:nt}},nt.prototype=kv.prototype,nt.prototype.constructor=nt,Lc.prototype=Oc(kv.prototype),Lc.prototype.constructor=Lc;function ro(P){this.__wrapped__=P,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=ce,this.__views__=[]}function rw(){var P=new ro(this.__wrapped__);return P.__actions__=Yl(this.__actions__),P.__dir__=this.__dir__,P.__filtered__=this.__filtered__,P.__iteratees__=Yl(this.__iteratees__),P.__takeCount__=this.__takeCount__,P.__views__=Yl(this.__views__),P}function $_(){if(this.__filtered__){var P=new ro(this);P.__dir__=-1,P.__filtered__=!0}else P=this.clone(),P.__dir__*=-1;return P}function nw(){var P=this.__wrapped__.value(),B=this.__dir__,ie=Ni(P),Ee=B<0,je=ie?P.length:0,lt=AS(0,je,this.__views__),Pt=lt.start,Bt=lt.end,nr=Bt-Pt,Ur=Ee?Bt:Pt-1,Gr=this.__iteratees__,rn=Gr.length,Mn=0,Xn=xo(nr,this.__takeCount__);if(!ie||!Ee&&je==nr&&Xn==nr)return _0(P,this.__actions__);var di=[];e:for(;nr--&&Mn<Xn;){Ur+=B;for(var Vi=-1,hi=P[Ur];++Vi<rn;){var no=Gr[Vi],go=no.iteratee,gu=no.type,Ea=go(hi);if(gu==O)hi=Ea;else if(!Ea){if(gu==z)continue e;break e}}di[Mn++]=hi}return di}ro.prototype=Oc(kv.prototype),ro.prototype.constructor=ro;function Nh(P){var B=-1,ie=P==null?0:P.length;for(this.clear();++B<ie;){var Ee=P[B];this.set(Ee[0],Ee[1])}}function Il(){this.__data__=ug?ug(null):{},this.size=0}function gS(P){var B=this.has(P)&&delete this.__data__[P];return this.size-=B?1:0,B}function iw(P){var B=this.__data__;if(ug){var ie=B[P];return ie===l?r:ie}return Qi.call(B,P)?B[P]:r}function vS(P){var B=this.__data__;return ug?B[P]!==r:Qi.call(B,P)}function yS(P,B){var ie=this.__data__;return this.size+=this.has(P)?0:1,ie[P]=ug&&B===r?l:B,this}Nh.prototype.clear=Il,Nh.prototype.delete=gS,Nh.prototype.get=iw,Nh.prototype.has=vS,Nh.prototype.set=yS;function Ca(P){var B=-1,ie=P==null?0:P.length;for(this.clear();++B<ie;){var Ee=P[B];this.set(Ee[0],Ee[1])}}function ow(){this.__data__=[],this.size=0}function xS(P){var B=this.__data__,ie=b(B,P);if(ie<0)return!1;var Ee=B.length-1;return ie==Ee?B.pop():Zp.call(B,ie,1),--this.size,!0}function Gu(P){var B=this.__data__,ie=b(B,P);return ie<0?r:B[ie][1]}function Of(P){return b(this.__data__,P)>-1}function Jp(P,B){var ie=this.__data__,Ee=b(ie,P);return Ee<0?(++this.size,ie.push([P,B])):ie[Ee][1]=B,this}Ca.prototype.clear=ow,Ca.prototype.delete=xS,Ca.prototype.get=Gu,Ca.prototype.has=Of,Ca.prototype.set=Jp;function lu(P){var B=-1,ie=P==null?0:P.length;for(this.clear();++B<ie;){var Ee=P[B];this.set(Ee[0],Ee[1])}}function Sn(){this.size=0,this.__data__={hash:new Nh,map:new(kh||Ca),string:new Nh}}function F_(P){var B=hw(this,P).delete(P);return this.size-=B?1:0,B}function z_(P){return hw(this,P).get(P)}function hg(P){return hw(this,P).has(P)}function em(P,B){var ie=hw(this,P),Ee=ie.size;return ie.set(P,B),this.size+=ie.size==Ee?0:1,this}lu.prototype.clear=Sn,lu.prototype.delete=F_,lu.prototype.get=z_,lu.prototype.has=hg,lu.prototype.set=em;function mn(P){var B=-1,ie=P==null?0:P.length;for(this.__data__=new lu;++B<ie;)this.add(P[B])}function B_(P){return this.__data__.set(P,l),this}function _S(P){return this.__data__.has(P)}mn.prototype.add=mn.prototype.push=B_,mn.prototype.has=_S;function cu(P){var B=this.__data__=new Ca(P);this.size=B.size}function j_(){this.__data__=new Ca,this.size=0}function sw(P){var B=this.__data__,ie=B.delete(P);return this.size=B.size,ie}function aw(P){return this.__data__.get(P)}function bS(P){return this.__data__.has(P)}function wS(P,B){var ie=this.__data__;if(ie instanceof Ca){var Ee=ie.__data__;if(!kh||Ee.length<i-1)return Ee.push([P,B]),this.size=++ie.size,this;ie=this.__data__=new lu(Ee)}return ie.set(P,B),this.size=ie.size,this}cu.prototype.clear=j_,cu.prototype.delete=sw,cu.prototype.get=aw,cu.prototype.has=bS,cu.prototype.set=wS;function g0(P,B){var ie=Ni(P),Ee=!ie&&Uh(P),je=!ie&&!Ee&&fm(P),lt=!ie&&!Ee&&!je&&Vh(P),Pt=ie||Ee||je||lt,Bt=Pt?gl(P.length,qp):[],nr=Bt.length;for(var Ur in P)(B||Qi.call(P,Ur))&&!(Pt&&(Ur=="length"||je&&(Ur=="offset"||Ur=="parent")||lt&&(Ur=="buffer"||Ur=="byteLength"||Ur=="byteOffset")||sl(Ur,nr)))&&Bt.push(Ur);return Bt}function v0(P){var B=P.length;return B?P[Df(0,B-1)]:r}function U_(P,B){return Z_(Yl(P),he(B,0,P.length))}function pg(P){return Z_(Yl(P))}function I(P,B,ie){(ie!==r&&!Nd(P[B],ie)||ie===r&&!(B in P))&&ne(P,B,ie)}function h(P,B,ie){var Ee=P[B];(!(Qi.call(P,B)&&Nd(Ee,ie))||ie===r&&!(B in P))&&ne(P,B,ie)}function b(P,B){for(var ie=P.length;ie--;)if(Nd(P[ie][0],B))return ie;return-1}function R(P,B,ie,Ee){return st(P,function(je,lt,Pt){B(Ee,je,ie(je),Pt)}),Ee}function U(P,B){return P&&ca(B,yl(B),P)}function K(P,B){return P&&ca(B,Ll(B),P)}function ne(P,B,ie){B=="__proto__"&&Pd?Pd(P,B,{configurable:!0,enumerable:!0,value:ie,writable:!0}):P[B]=ie}function ae(P,B){for(var ie=-1,Ee=B.length,je=ir(Ee),lt=P==null;++ie<Ee;)je[ie]=lt?r:Hw(P,B[ie]);return je}function he(P,B,ie){return P===P&&(ie!==r&&(P=P<=ie?P:ie),B!==r&&(P=P>=B?P:B)),P}function be(P,B,ie,Ee,je,lt){var Pt,Bt=B&m,nr=B&v,Ur=B&x;if(ie&&(Pt=je?ie(P,Ee,je,lt):ie(P)),Pt!==r)return Pt;if(!Ks(P))return P;var Gr=Ni(P);if(Gr){if(Pt=nR(P),!Bt)return Yl(P,Pt)}else{var rn=Al(P),Mn=rn==Pe||rn==Re;if(fm(P))return GA(P,Bt);if(rn==ht||rn==ve||Mn&&!je){if(Pt=nr||Mn?{}:Od(P),!Bt)return nr?QA(P,K(Pt,P)):ZA(P,U(Pt,P))}else{if(!Hn[rn])return je?P:{};Pt=E4(P,rn,Bt)}}lt||(lt=new cu);var Xn=lt.get(P);if(Xn)return Xn;lt.set(P,Pt),Yv(P)?P.forEach(function(hi){Pt.add(be(hi,B,ie,hi,P,lt))}):HR(P)&&P.forEach(function(hi,no){Pt.set(no,be(hi,B,ie,no,P,lt))});var di=Ur?nr?am:fw:nr?Ll:yl,Vi=Gr?r:di(P);return gi(Vi||P,function(hi,no){Vi&&(no=hi,hi=P[no]),h(Pt,no,be(hi,B,ie,no,P,lt))}),Pt}function we(P){var B=yl(P);return function(ie){return Le(ie,P,B)}}function Le(P,B,ie){var Ee=ie.length;if(P==null)return!Ee;for(P=Zi(P);Ee--;){var je=ie[Ee],lt=B[je],Pt=P[je];if(Pt===r&&!(je in P)||!lt(Pt))return!1}return!0}function He(P,B,ie){if(typeof P!="function")throw new nl(a);return lm(function(){P.apply(r,ie)},B)}function rt(P,B,ie,Ee){var je=-1,lt=_d,Pt=!0,Bt=P.length,nr=[],Ur=B.length;if(!Bt)return nr;ie&&(B=po(B,tl(ie))),Ee?(lt=Ph,Pt=!1):B.length>=i&&(lt=Sf,Pt=!1,B=new mn(B));e:for(;++je<Bt;){var Gr=P[je],rn=ie==null?Gr:ie(Gr);if(Gr=Ee||Gr!==0?Gr:0,Pt&&rn===rn){for(var Mn=Ur;Mn--;)if(B[Mn]===rn)continue e;nr.push(Gr)}else lt(B,rn,Ee)||nr.push(Gr)}return nr}var st=_g(At),at=_g(Yt,!0);function ut(P,B){var ie=!0;return st(P,function(Ee,je,lt){return ie=!!B(Ee,je,lt),ie}),ie}function De(P,B,ie){for(var Ee=-1,je=P.length;++Ee<je;){var lt=P[Ee],Pt=B(lt);if(Pt!=null&&(Bt===r?Pt===Pt&&!Qu(Pt):ie(Pt,Bt)))var Bt=Pt,nr=lt}return nr}function it(P,B,ie,Ee){var je=P.length;for(ie=Bi(ie),ie<0&&(ie=-ie>je?0:je+ie),Ee=Ee===r||Ee>je?je:Bi(Ee),Ee<0&&(Ee+=je),Ee=ie>Ee?0:tT(Ee);ie<Ee;)P[ie++]=B;return P}function yt(P,B){var ie=[];return st(P,function(Ee,je,lt){B(Ee,je,lt)&&ie.push(Ee)}),ie}function mt(P,B,ie,Ee,je){var lt=-1,Pt=P.length;for(ie||(ie=X_),je||(je=[]);++lt<Pt;){var Bt=P[lt];B>0&&ie(Bt)?B>1?mt(Bt,B-1,ie,Ee,je):Fs(je,Bt):Ee||(je[je.length]=Bt)}return je}var kt=b0(),Lt=b0(!0);function At(P,B){return P&&kt(P,B,yl)}function Yt(P,B){return P&&Lt(P,B,yl)}function Vt(P,B){return Hu(B,function(ie){return $f(P[ie])})}function or(P,B){B=Dc(B,P);for(var ie=0,Ee=B.length;P!=null&&ie<Ee;)P=P[Ld(B[ie++])];return ie&&ie==Ee?P:r}function Wr(P,B,ie){var Ee=B(P);return Ni(P)?Ee:Fs(Ee,ie(P))}function Qt(P){return P==null?P===r?Te:Ge:kf&&kf in Zi(P)?rR(P):LS(P)}function Tr(P,B){return P>B}function fr(P,B){return P!=null&&Qi.call(P,B)}function jr(P,B){return P!=null&&B in Zi(P)}function lr(P,B,ie){return P>=xo(B,ie)&&P<zs(B,ie)}function xr(P,B,ie){for(var Ee=ie?Ph:_d,je=P[0].length,lt=P.length,Pt=lt,Bt=ir(lt),nr=1/0,Ur=[];Pt--;){var Gr=P[Pt];Pt&&B&&(Gr=po(Gr,tl(B))),nr=xo(Gr.length,nr),Bt[Pt]=!ie&&(B||je>=120&&Gr.length>=120)?new mn(Pt&&Gr):r}Gr=P[0];var rn=-1,Mn=Bt[0];e:for(;++rn<je&&Ur.length<nr;){var Xn=Gr[rn],di=B?B(Xn):Xn;if(Xn=ie||Xn!==0?Xn:0,!(Mn?Sf(Mn,di):Ee(Ur,di,ie))){for(Pt=lt;--Pt;){var Vi=Bt[Pt];if(!(Vi?Sf(Vi,di):Ee(P[Pt],di,ie)))continue e}Mn&&Mn.push(di),Ur.push(Xn)}}return Ur}function qr(P,B,ie,Ee){return At(P,function(je,lt,Pt){B(Ee,ie(je),lt,Pt)}),Ee}function Rr(P,B,ie){B=Dc(B,P),P=Uv(P,B);var Ee=P==null?P:P[Ld(pu(B))];return Ee==null?r:sa(Ee,P,ie)}function Yr(P){return fa(P)&&Qt(P)==ve}function Nn(P){return fa(P)&&Qt(P)==ot}function li(P){return fa(P)&&Qt(P)==me}function Cn(P,B,ie,Ee,je){return P===B?!0:P==null||B==null||!fa(P)&&!fa(B)?P!==P&&B!==B:Gn(P,B,ie,Ee,Cn,je)}function Gn(P,B,ie,Ee,je,lt){var Pt=Ni(P),Bt=Ni(B),nr=Pt?ye:Al(P),Ur=Bt?ye:Al(B);nr=nr==ve?ht:nr,Ur=Ur==ve?ht:Ur;var Gr=nr==ht,rn=Ur==ht,Mn=nr==Ur;if(Mn&&fm(P)){if(!fm(B))return!1;Pt=!0,Gr=!1}if(Mn&&!Gr)return lt||(lt=new cu),Pt||Vh(P)?Nf(P,B,ie,Ee,je,lt):w4(P,B,nr,ie,Ee,je,lt);if(!(ie&y)){var Xn=Gr&&Qi.call(P,"__wrapped__"),di=rn&&Qi.call(B,"__wrapped__");if(Xn||di){var Vi=Xn?P.value():P,hi=di?B.value():B;return lt||(lt=new cu),je(Vi,hi,ie,Ee,lt)}}return Mn?(lt||(lt=new cu),C4(P,B,ie,Ee,je,lt)):!1}function Ri(P){return fa(P)&&Al(P)==ke}function bi(P,B,ie,Ee){var je=ie.length,lt=je,Pt=!Ee;if(P==null)return!lt;for(P=Zi(P);je--;){var Bt=ie[je];if(Pt&&Bt[2]?Bt[1]!==P[Bt[0]]:!(Bt[0]in P))return!1}for(;++je<lt;){Bt=ie[je];var nr=Bt[0],Ur=P[nr],Gr=Bt[1];if(Pt&&Bt[2]){if(Ur===r&&!(nr in P))return!1}else{var rn=new cu;if(Ee)var Mn=Ee(Ur,Gr,nr,P,B,rn);if(!(Mn===r?Cn(Gr,Ur,y|_,Ee,rn):Mn))return!1}}return!0}function An(P){if(!Ks(P)||S4(P))return!1;var B=$f(P)?c0:Vn;return B.test(Hv(P))}function _o(P){return fa(P)&&Qt(P)==pt}function Vo(P){return fa(P)&&Al(P)==It}function Ho(P){return fa(P)&&i1(P.length)&&!!_i[Qt(P)]}function No(P){return typeof P=="function"?P:P==null?Dl:typeof P=="object"?Ni(P)?$o(P[0],P[1]):cs(P):yk(P)}function il(P){if(!hu(P))return Pv(P);var B=[];for(var ie in Zi(P))Qi.call(P,ie)&&ie!="constructor"&&B.push(ie);return B}function ol(P){if(!Ks(P))return yw(P);var B=hu(P),ie=[];for(var Ee in P)Ee=="constructor"&&(B||!Qi.call(P,Ee))||ie.push(Ee);return ie}function dc(P,B){return P<B}function qu(P,B){var ie=-1,Ee=Ol(P)?ir(P.length):[];return st(P,function(je,lt,Pt){Ee[++ie]=B(je,lt,Pt)}),Ee}function cs(P){var B=MS(P);return B.length==1&&B[0][2]?OS(B[0][0],B[0][1]):function(ie){return ie===P||bi(ie,P,B)}}function $o(P,B){return RS(P)&&Cg(B)?OS(Ld(P),B):function(ie){var Ee=Hw(ie,P);return Ee===r&&Ee===B?Kl(ie,P):Cn(B,Ee,y|_)}}function qi(P,B,ie,Ee,je){P!==B&&kt(B,function(lt,Pt){if(je||(je=new cu),Ks(lt))aa(P,B,Pt,ie,qi,Ee,je);else{var Bt=Ee?Ee(T0(P,Pt),lt,Pt+"",P,B,je):r;Bt===r&&(Bt=lt),I(P,Pt,Bt)}},Ll)}function aa(P,B,ie,Ee,je,lt,Pt){var Bt=T0(P,ie),nr=T0(B,ie),Ur=Pt.get(nr);if(Ur){I(P,ie,Ur);return}var Gr=lt?lt(Bt,nr,ie+"",P,B,Pt):r,rn=Gr===r;if(rn){var Mn=Ni(nr),Xn=!Mn&&fm(nr),di=!Mn&&!Xn&&Vh(nr);Gr=nr,Mn||Xn||di?Ni(Bt)?Gr=Bt:Ms(Bt)?Gr=Yl(Bt):Xn?(rn=!1,Gr=GA(nr,!0)):di?(rn=!1,Gr=YA(nr,!0)):Gr=[]:Nc(nr)||Uh(nr)?(Gr=Bt,Uh(Bt)?Gr=Kv(Bt):(!Ks(Bt)||$f(Bt))&&(Gr=Od(nr))):rn=!1}rn&&(Pt.set(nr,Gr),je(Gr,nr,Ee,lt,Pt),Pt.delete(nr)),I(P,ie,Gr)}function Ml(P,B){var ie=P.length;if(!!ie)return B+=B<0?ie:0,sl(B,ie)?P[B]:r}function ts(P,B,ie){B.length?B=po(B,function(lt){return Ni(lt)?function(Pt){return or(Pt,lt.length===1?lt[0]:lt)}:lt}):B=[Dl];var Ee=-1;B=po(B,tl(ui()));var je=qu(P,function(lt,Pt,Bt){var nr=po(B,function(Ur){return Ur(lt)});return{criteria:nr,index:++Ee,value:lt}});return nu(je,function(lt,Pt){return la(lt,Pt,ie)})}function hc(P,B){return Ov(P,B,function(ie,Ee){return Kl(P,Ee)})}function Ov(P,B,ie){for(var Ee=-1,je=B.length,lt={};++Ee<je;){var Pt=B[Ee],Bt=or(P,Pt);ie(Bt,Pt)&&y0(lt,Dc(Pt,P),Bt)}return lt}function tm(P){return function(B){return or(B,P)}}function rm(P,B,ie,Ee){var je=Ee?rg:Ef,lt=-1,Pt=B.length,Bt=P;for(P===B&&(B=Yl(B)),ie&&(Bt=po(P,tl(ie)));++lt<Pt;)for(var nr=0,Ur=B[lt],Gr=ie?ie(Ur):Ur;(nr=je(Bt,Gr,nr,Ee))>-1;)Bt!==P&&Zp.call(Bt,nr,1),Zp.call(P,nr,1);return P}function Lf(P,B){for(var ie=P?B.length:0,Ee=ie-1;ie--;){var je=B[ie];if(ie==Ee||je!==lt){var lt=je;sl(je)?Zp.call(P,je,1):TS(P,je)}}return P}function Df(P,B){return P+Qp(f0()*(B-P+1))}function nm(P,B,ie,Ee){for(var je=-1,lt=zs(Rh((B-P)/(ie||1)),0),Pt=ir(lt);lt--;)Pt[Ee?lt:++je]=P,P+=ie;return Pt}function mg(P,B){var ie="";if(!P||B<1||B>q)return ie;do B%2&&(ie+=P),B=Qp(B/2),B&&(P+=P);while(B);return ie}function ki(P,B){return K_(jv(P,B,Dl),P+"")}function V_(P){return v0(Zv(P))}function UA(P,B){var ie=Zv(P);return Z_(ie,he(B,0,ie.length))}function y0(P,B,ie,Ee){if(!Ks(P))return P;B=Dc(B,P);for(var je=-1,lt=B.length,Pt=lt-1,Bt=P;Bt!=null&&++je<lt;){var nr=Ld(B[je]),Ur=ie;if(nr==="__proto__"||nr==="constructor"||nr==="prototype")return P;if(je!=Pt){var Gr=Bt[nr];Ur=Ee?Ee(Gr,nr,Bt):r,Ur===r&&(Ur=Ks(Gr)?Gr:sl(B[je+1])?[]:{})}h(Bt,nr,Ur),Bt=Bt[nr]}return P}var VA=Id?function(P,B){return Id.set(P,B),P}:Dl,CS=Pd?function(P,B){return Pd(P,"toString",{configurable:!0,enumerable:!1,value:pT(B),writable:!0})}:Dl;function lw(P){return Z_(Zv(P))}function Xu(P,B,ie){var Ee=-1,je=P.length;B<0&&(B=-B>je?0:je+B),ie=ie>je?je:ie,ie<0&&(ie+=je),je=B>ie?0:ie-B>>>0,B>>>=0;for(var lt=ir(je);++Ee<je;)lt[Ee]=P[Ee+B];return lt}function ES(P,B){var ie;return st(P,function(Ee,je,lt){return ie=B(Ee,je,lt),!ie}),!!ie}function Lv(P,B,ie){var Ee=0,je=P==null?Ee:P.length;if(typeof B=="number"&&B===B&&je<=J){for(;Ee<je;){var lt=Ee+je>>>1,Pt=P[lt];Pt!==null&&!Qu(Pt)&&(ie?Pt<=B:Pt<B)?Ee=lt+1:je=lt}return je}return Md(P,B,Dl,ie)}function Md(P,B,ie,Ee){var je=0,lt=P==null?0:P.length;if(lt===0)return 0;B=ie(B);for(var Pt=B!==B,Bt=B===null,nr=Qu(B),Ur=B===r;je<lt;){var Gr=Qp((je+lt)/2),rn=ie(P[Gr]),Mn=rn!==r,Xn=rn===null,di=rn===rn,Vi=Qu(rn);if(Pt)var hi=Ee||di;else Ur?hi=di&&(Ee||Mn):Bt?hi=di&&Mn&&(Ee||!Xn):nr?hi=di&&Mn&&!Xn&&(Ee||!Vi):Xn||Vi?hi=!1:hi=Ee?rn<=B:rn<B;hi?je=Gr+1:lt=Gr}return xo(lt,fe)}function H_(P,B){for(var ie=-1,Ee=P.length,je=0,lt=[];++ie<Ee;){var Pt=P[ie],Bt=B?B(Pt):Pt;if(!ie||!Nd(Bt,nr)){var nr=Bt;lt[je++]=Pt===0?0:Pt}}return lt}function SS(P){return typeof P=="number"?P:Qu(P)?re:+P}function uu(P){if(typeof P=="string")return P;if(Ni(P))return po(P,uu)+"";if(Qu(P))return m0?m0.call(P):"";var B=P+"";return B=="0"&&1/P==-G?"-0":B}function gg(P,B,ie){var Ee=-1,je=_d,lt=P.length,Pt=!0,Bt=[],nr=Bt;if(ie)Pt=!1,je=Ph;else if(lt>=i){var Ur=B?null:pc(P);if(Ur)return rl(Ur);Pt=!1,je=Sf,nr=new mn}else nr=B?[]:Bt;e:for(;++Ee<lt;){var Gr=P[Ee],rn=B?B(Gr):Gr;if(Gr=ie||Gr!==0?Gr:0,Pt&&rn===rn){for(var Mn=nr.length;Mn--;)if(nr[Mn]===rn)continue e;B&&nr.push(rn),Bt.push(Gr)}else je(nr,rn,ie)||(nr!==Bt&&nr.push(rn),Bt.push(Gr))}return Bt}function TS(P,B){return B=Dc(B,P),P=Uv(P,B),P==null||delete P[Ld(pu(B))]}function HA(P,B,ie,Ee){return y0(P,B,ie(or(P,B)),Ee)}function x0(P,B,ie,Ee){for(var je=P.length,lt=Ee?je:-1;(Ee?lt--:++lt<je)&&B(P[lt],lt,P););return ie?Xu(P,Ee?0:lt,Ee?lt+1:je):Xu(P,Ee?lt+1:0,Ee?je:lt)}function _0(P,B){var ie=P;return ie instanceof ro&&(ie=ie.value()),lc(B,function(Ee,je){return je.func.apply(je.thisArg,Fs([Ee],je.args))},ie)}function vg(P,B,ie){var Ee=P.length;if(Ee<2)return Ee?gg(P[0]):[];for(var je=-1,lt=ir(Ee);++je<Ee;)for(var Pt=P[je],Bt=-1;++Bt<Ee;)Bt!=je&&(lt[je]=rt(lt[je]||Pt,P[Bt],B,ie));return gg(mt(lt,1),B,ie)}function $h(P,B,ie){for(var Ee=-1,je=P.length,lt=B.length,Pt={};++Ee<je;){var Bt=Ee<lt?B[Ee]:r;ie(Pt,P[Ee],Bt)}return Pt}function Yu(P){return Ms(P)?P:[]}function Fh(P){return typeof P=="function"?P:Dl}function Dc(P,B){return Ni(P)?P:RS(P,B)?[P]:xw(rs(P))}var Dv=ki;function yg(P,B,ie){var Ee=P.length;return ie=ie===r?Ee:ie,!B&&ie>=Ee?P:Xu(P,B,ie)}var WA=lg||function(P){return Yo.clearTimeout(P)};function GA(P,B){if(B)return P.slice();var ie=P.length,Ee=k_?k_(ie):new P.constructor(ie);return P.copy(Ee),Ee}function PS(P){var B=new P.constructor(P.byteLength);return new Ah(B).set(new Ah(P)),B}function qA(P,B){var ie=B?PS(P.buffer):P.buffer;return new P.constructor(ie,P.byteOffset,P.byteLength)}function XA(P){var B=new P.constructor(P.source,Ir.exec(P));return B.lastIndex=P.lastIndex,B}function Ad(P){return dg?Zi(dg.call(P)):{}}function YA(P,B){var ie=B?PS(P.buffer):P.buffer;return new P.constructor(ie,P.byteOffset,P.length)}function KA(P,B){if(P!==B){var ie=P!==r,Ee=P===null,je=P===P,lt=Qu(P),Pt=B!==r,Bt=B===null,nr=B===B,Ur=Qu(B);if(!Bt&&!Ur&&!lt&&P>B||lt&&Pt&&nr&&!Bt&&!Ur||Ee&&Pt&&nr||!ie&&nr||!je)return 1;if(!Ee&&!lt&&!Ur&&P<B||Ur&&ie&&je&&!Ee&&!lt||Bt&&ie&&je||!Pt&&je||!nr)return-1}return 0}function la(P,B,ie){for(var Ee=-1,je=P.criteria,lt=B.criteria,Pt=je.length,Bt=ie.length;++Ee<Pt;){var nr=KA(je[Ee],lt[Ee]);if(nr){if(Ee>=Bt)return nr;var Ur=ie[Ee];return nr*(Ur=="desc"?-1:1)}}return P.index-B.index}function $n(P,B,ie,Ee){for(var je=-1,lt=P.length,Pt=ie.length,Bt=-1,nr=B.length,Ur=zs(lt-Pt,0),Gr=ir(nr+Ur),rn=!Ee;++Bt<nr;)Gr[Bt]=B[Bt];for(;++je<Pt;)(rn||je<lt)&&(Gr[ie[je]]=P[je]);for(;Ur--;)Gr[Bt++]=P[je++];return Gr}function im(P,B,ie,Ee){for(var je=-1,lt=P.length,Pt=-1,Bt=ie.length,nr=-1,Ur=B.length,Gr=zs(lt-Bt,0),rn=ir(Gr+Ur),Mn=!Ee;++je<Gr;)rn[je]=P[je];for(var Xn=je;++nr<Ur;)rn[Xn+nr]=B[nr];for(;++Pt<Bt;)(Mn||je<lt)&&(rn[Xn+ie[Pt]]=P[je++]);return rn}function Yl(P,B){var ie=-1,Ee=P.length;for(B||(B=ir(Ee));++ie<Ee;)B[ie]=P[ie];return B}function ca(P,B,ie,Ee){var je=!ie;ie||(ie={});for(var lt=-1,Pt=B.length;++lt<Pt;){var Bt=B[lt],nr=Ee?Ee(ie[Bt],P[Bt],Bt,ie,P):r;nr===r&&(nr=P[Bt]),je?ne(ie,Bt,nr):h(ie,Bt,nr)}return ie}function ZA(P,B){return ca(P,zv(P),B)}function QA(P,B){return ca(P,pw(P),B)}function fu(P,B){return function(ie,Ee){var je=Ni(ie)?Th:R,lt=B?B():{};return je(ie,P,ui(Ee,2),lt)}}function xg(P){return ki(function(B,ie){var Ee=-1,je=ie.length,lt=je>1?ie[je-1]:r,Pt=je>2?ie[2]:r;for(lt=P.length>3&&typeof lt=="function"?(je--,lt):r,Pt&&Is(ie[0],ie[1],Pt)&&(lt=je<3?r:lt,je=1),B=Zi(B);++Ee<je;){var Bt=ie[Ee];Bt&&P(B,Bt,Ee,lt)}return B})}function _g(P,B){return function(ie,Ee){if(ie==null)return ie;if(!Ol(ie))return P(ie,Ee);for(var je=ie.length,lt=B?je:-1,Pt=Zi(ie);(B?lt--:++lt<je)&&Ee(Pt[lt],lt,Pt)!==!1;);return ie}}function b0(P){return function(B,ie,Ee){for(var je=-1,lt=Zi(B),Pt=Ee(B),Bt=Pt.length;Bt--;){var nr=Pt[P?Bt:++je];if(ie(lt[nr],nr,lt)===!1)break}return B}}function Nv(P,B,ie){var Ee=B&w,je=w0(P);function lt(){var Pt=this&&this!==Yo&&this instanceof lt?je:P;return Pt.apply(Ee?ie:this,arguments)}return lt}function cw(P){return function(B){B=rs(B);var ie=dn(B)?Ko(B):r,Ee=ie?ie[0]:B.charAt(0),je=ie?yg(ie,1).join(""):B.slice(1);return Ee[P]()+je}}function om(P){return function(B){return lc(l1(uT(B).replace(pn,"")),P,"")}}function w0(P){return function(){var B=arguments;switch(B.length){case 0:return new P;case 1:return new P(B[0]);case 2:return new P(B[0],B[1]);case 3:return new P(B[0],B[1],B[2]);case 4:return new P(B[0],B[1],B[2],B[3]);case 5:return new P(B[0],B[1],B[2],B[3],B[4]);case 6:return new P(B[0],B[1],B[2],B[3],B[4],B[5]);case 7:return new P(B[0],B[1],B[2],B[3],B[4],B[5],B[6])}var ie=Oc(P.prototype),Ee=P.apply(ie,B);return Ks(Ee)?Ee:ie}}function JA(P,B,ie){var Ee=w0(P);function je(){for(var lt=arguments.length,Pt=ir(lt),Bt=lt,nr=Fv(je);Bt--;)Pt[Bt]=arguments[Bt];var Ur=lt<3&&Pt[0]!==nr&&Pt[lt-1]!==nr?[]:Io(Pt,nr);if(lt-=Ur.length,lt<ie)return du(P,B,W_,je.placeholder,r,Pt,Ur,r,r,ie-lt);var Gr=this&&this!==Yo&&this instanceof je?Ee:P;return sa(Gr,this,Pt)}return je}function eR(P){return function(B,ie,Ee){var je=Zi(B);if(!Ol(B)){var lt=ui(ie,3);B=yl(B),ie=function(Bt){return lt(je[Bt],Bt,je)}}var Pt=P(B,ie,Ee);return Pt>-1?je[lt?B[Pt]:Pt]:r}}function uw(P){return zh(function(B){var ie=B.length,Ee=ie,je=Lc.prototype.thru;for(P&&B.reverse();Ee--;){var lt=B[Ee];if(typeof lt!="function")throw new nl(a);if(je&&!Pt&&q_(lt)=="wrapper")var Pt=new Lc([],!0)}for(Ee=Pt?Ee:ie;++Ee<ie;){lt=B[Ee];var Bt=q_(lt),nr=Bt=="wrapper"?dw(lt):r;nr&&vw(nr[0])&&nr[1]==(Z|T|k|W)&&!nr[4].length&&nr[9]==1?Pt=Pt[q_(nr[0])].apply(Pt,nr[3]):Pt=lt.length==1&&vw(lt)?Pt[Bt]():Pt.thru(lt)}return function(){var Ur=arguments,Gr=Ur[0];if(Pt&&Ur.length==1&&Ni(Gr))return Pt.plant(Gr).value();for(var rn=0,Mn=ie?B[rn].apply(this,Ur):Gr;++rn<ie;)Mn=B[rn].call(this,Mn);return Mn}})}function W_(P,B,ie,Ee,je,lt,Pt,Bt,nr,Ur){var Gr=B&Z,rn=B&w,Mn=B&C,Xn=B&(T|A),di=B&D,Vi=Mn?r:w0(P);function hi(){for(var no=arguments.length,go=ir(no),gu=no;gu--;)go[gu]=arguments[gu];if(Xn)var Ea=Fv(hi),vu=Tf(go,Ea);if(Ee&&(go=$n(go,Ee,je,Xn)),lt&&(go=im(go,lt,Pt,Xn)),no-=vu,Xn&&no<Ur){var Ba=Io(go,Ea);return du(P,B,W_,hi.placeholder,ie,go,Ba,Bt,nr,Ur-no)}var zd=rn?ie:this,Ff=Mn?zd[P]:P;return no=go.length,Bt?go=Y_(go,Bt):di&&no>1&&go.reverse(),Gr&&nr<no&&(go.length=nr),this&&this!==Yo&&this instanceof hi&&(Ff=Vi||w0(Ff)),Ff.apply(zd,go)}return hi}function C0(P,B){return function(ie,Ee){return qr(ie,P,B(Ee),{})}}function sm(P,B){return function(ie,Ee){var je;if(ie===r&&Ee===r)return B;if(ie!==r&&(je=ie),Ee!==r){if(je===r)return Ee;typeof ie=="string"||typeof Ee=="string"?(ie=uu(ie),Ee=uu(Ee)):(ie=SS(ie),Ee=SS(Ee)),je=P(ie,Ee)}return je}}function Rd(P){return zh(function(B){return B=po(B,tl(ui())),ki(function(ie){var Ee=this;return P(B,function(je){return sa(je,Ee,ie)})})})}function E0(P,B){B=B===r?" ":uu(B);var ie=B.length;if(ie<2)return ie?mg(B,P):B;var Ee=mg(B,Rh(P/Tl(B)));return dn(B)?yg(Ko(Ee),0,P).join(""):Ee.slice(0,P)}function tR(P,B,ie,Ee){var je=B&w,lt=w0(P);function Pt(){for(var Bt=-1,nr=arguments.length,Ur=-1,Gr=Ee.length,rn=ir(Gr+nr),Mn=this&&this!==Yo&&this instanceof Pt?lt:P;++Ur<Gr;)rn[Ur]=Ee[Ur];for(;nr--;)rn[Ur++]=arguments[++Bt];return sa(Mn,je?ie:this,rn)}return Pt}function S0(P){return function(B,ie,Ee){return Ee&&typeof Ee!="number"&&Is(B,ie,Ee)&&(ie=Ee=r),B=$d(B),ie===r?(ie=B,B=0):ie=$d(ie),Ee=Ee===r?B<ie?1:-1:$d(Ee),nm(B,ie,Ee,P)}}function bg(P){return function(B,ie){return typeof B=="string"&&typeof ie=="string"||(B=ll(B),ie=ll(ie)),P(B,ie)}}function du(P,B,ie,Ee,je,lt,Pt,Bt,nr,Ur){var Gr=B&T,rn=Gr?Pt:r,Mn=Gr?r:Pt,Xn=Gr?lt:r,di=Gr?r:lt;B|=Gr?k:X,B&=~(Gr?X:k),B&E||(B&=~(w|C));var Vi=[P,B,je,Xn,rn,di,Mn,Bt,nr,Ur],hi=ie.apply(r,Vi);return vw(P)&&DS(hi,Vi),hi.placeholder=Ee,NS(hi,P,B)}function $v(P){var B=Mo[P];return function(ie,Ee){if(ie=ll(ie),Ee=Ee==null?0:xo(Bi(Ee),292),Ee&&au(ie)){var je=(rs(ie)+"e").split("e"),lt=B(je[0]+"e"+(+je[1]+Ee));return je=(rs(lt)+"e").split("e"),+(je[0]+"e"+(+je[1]-Ee))}return B(ie)}}var pc=Lh&&1/rl(new Lh([,-0]))[1]==G?function(P){return new Lh(P)}:mT;function Ku(P){return function(B){var ie=Al(B);return ie==ke?Di(B):ie==It?Ps(B):ig(B,P(B))}}function kd(P,B,ie,Ee,je,lt,Pt,Bt){var nr=B&C;if(!nr&&typeof P!="function")throw new nl(a);var Ur=Ee?Ee.length:0;if(Ur||(B&=~(k|X),Ee=je=r),Pt=Pt===r?Pt:zs(Bi(Pt),0),Bt=Bt===r?Bt:Bi(Bt),Ur-=je?je.length:0,B&X){var Gr=Ee,rn=je;Ee=je=r}var Mn=nr?r:dw(P),Xn=[P,B,ie,Ee,je,Gr,rn,lt,Pt,Bt];if(Mn&&T4(Xn,Mn),P=Xn[0],B=Xn[1],ie=Xn[2],Ee=Xn[3],je=Xn[4],Bt=Xn[9]=Xn[9]===r?nr?0:P.length:zs(Xn[9]-Ur,0),!Bt&&B&(T|A)&&(B&=~(T|A)),!B||B==w)var di=Nv(P,B,ie);else B==T||B==A?di=JA(P,B,Bt):(B==k||B==(w|k))&&!je.length?di=tR(P,B,ie,Ee):di=W_.apply(r,Xn);var Vi=Mn?VA:DS;return NS(Vi(di,Xn),P,B)}function Bs(P,B,ie,Ee){return P===r||Nd(P,If[ie])&&!Qi.call(Ee,ie)?B:P}function IS(P,B,ie,Ee,je,lt){return Ks(P)&&Ks(B)&&(lt.set(B,P),qi(P,B,r,IS,lt),lt.delete(B)),P}function G_(P){return Nc(P)?r:P}function Nf(P,B,ie,Ee,je,lt){var Pt=ie&y,Bt=P.length,nr=B.length;if(Bt!=nr&&!(Pt&&nr>Bt))return!1;var Ur=lt.get(P),Gr=lt.get(B);if(Ur&&Gr)return Ur==B&&Gr==P;var rn=-1,Mn=!0,Xn=ie&_?new mn:r;for(lt.set(P,B),lt.set(B,P);++rn<Bt;){var di=P[rn],Vi=B[rn];if(Ee)var hi=Pt?Ee(Vi,di,rn,B,P,lt):Ee(di,Vi,rn,P,B,lt);if(hi!==r){if(hi)continue;Mn=!1;break}if(Xn){if(!wa(B,function(no,go){if(!Sf(Xn,go)&&(di===no||je(di,no,ie,Ee,lt)))return Xn.push(go)})){Mn=!1;break}}else if(!(di===Vi||je(di,Vi,ie,Ee,lt))){Mn=!1;break}}return lt.delete(P),lt.delete(B),Mn}function w4(P,B,ie,Ee,je,lt,Pt){switch(ie){case Ze:if(P.byteLength!=B.byteLength||P.byteOffset!=B.byteOffset)return!1;P=P.buffer,B=B.buffer;case ot:return!(P.byteLength!=B.byteLength||!lt(new Ah(P),new Ah(B)));case se:case me:case ze:return Nd(+P,+B);case Ce:return P.name==B.name&&P.message==B.message;case pt:case Ie:return P==B+"";case ke:var Bt=Di;case It:var nr=Ee&y;if(Bt||(Bt=rl),P.size!=B.size&&!nr)return!1;var Ur=Pt.get(P);if(Ur)return Ur==B;Ee|=_,Pt.set(P,B);var Gr=Nf(Bt(P),Bt(B),Ee,je,lt,Pt);return Pt.delete(P),Gr;case de:if(dg)return dg.call(P)==dg.call(B)}return!1}function C4(P,B,ie,Ee,je,lt){var Pt=ie&y,Bt=fw(P),nr=Bt.length,Ur=fw(B),Gr=Ur.length;if(nr!=Gr&&!Pt)return!1;for(var rn=nr;rn--;){var Mn=Bt[rn];if(!(Pt?Mn in B:Qi.call(B,Mn)))return!1}var Xn=lt.get(P),di=lt.get(B);if(Xn&&di)return Xn==B&&di==P;var Vi=!0;lt.set(P,B),lt.set(B,P);for(var hi=Pt;++rn<nr;){Mn=Bt[rn];var no=P[Mn],go=B[Mn];if(Ee)var gu=Pt?Ee(go,no,Mn,B,P,lt):Ee(no,go,Mn,P,B,lt);if(!(gu===r?no===go||je(no,go,ie,Ee,lt):gu)){Vi=!1;break}hi||(hi=Mn=="constructor")}if(Vi&&!hi){var Ea=P.constructor,vu=B.constructor;Ea!=vu&&"constructor"in P&&"constructor"in B&&!(typeof Ea=="function"&&Ea instanceof Ea&&typeof vu=="function"&&vu instanceof vu)&&(Vi=!1)}return lt.delete(P),lt.delete(B),Vi}function zh(P){return K_(jv(P,r,_w),P+"")}function fw(P){return Wr(P,yl,zv)}function am(P){return Wr(P,Ll,pw)}var dw=Id?function(P){return Id.get(P)}:mT;function q_(P){for(var B=P.name+"",ie=Dh[B],Ee=Qi.call(Dh,B)?ie.length:0;Ee--;){var je=ie[Ee],lt=je.func;if(lt==null||lt==P)return je.name}return B}function Fv(P){var B=Qi.call(nt,"placeholder")?nt:P;return B.placeholder}function ui(){var P=nt.iteratee||Jv;return P=P===Jv?No:P,arguments.length?P(arguments[0],arguments[1]):P}function hw(P,B){var ie=P.__data__;return gw(B)?ie[typeof B=="string"?"string":"hash"]:ie.map}function MS(P){for(var B=yl(P),ie=B.length;ie--;){var Ee=B[ie],je=P[Ee];B[ie]=[Ee,je,Cg(je)]}return B}function wg(P,B){var ie=yr(P,B);return An(ie)?ie:r}function rR(P){var B=Qi.call(P,kf),ie=P[kf];try{P[kf]=r;var Ee=!0}catch{}var je=Af.call(P);return Ee&&(B?P[kf]=ie:delete P[kf]),je}var zv=cg?function(P){return P==null?[]:(P=Zi(P),Hu(cg(P),function(B){return O_.call(P,B)}))}:gT,pw=cg?function(P){for(var B=[];P;)Fs(B,zv(P)),P=Yp(P);return B}:gT,Al=Qt;(h0&&Al(new h0(new ArrayBuffer(1)))!=Ze||kh&&Al(new kh)!=ke||Oh&&Al(Oh.resolve())!=Tt||Lh&&Al(new Lh)!=It||Mv&&Al(new Mv)!=Be)&&(Al=function(P){var B=Qt(P),ie=B==ht?P.constructor:r,Ee=ie?Hv(ie):"";if(Ee)switch(Ee){case D_:return Ze;case N_:return ke;case p0:return Tt;case Av:return It;case Rv:return Be}return B});function AS(P,B,ie){for(var Ee=-1,je=ie.length;++Ee<je;){var lt=ie[Ee],Pt=lt.size;switch(lt.type){case"drop":P+=Pt;break;case"dropRight":B-=Pt;break;case"take":B=xo(B,P+Pt);break;case"takeRight":P=zs(P,B-Pt);break}}return{start:P,end:B}}function mc(P){var B=P.match(gt);return B?B[1].split(qt):[]}function mw(P,B,ie){B=Dc(B,P);for(var Ee=-1,je=B.length,lt=!1;++Ee<je;){var Pt=Ld(B[Ee]);if(!(lt=P!=null&&ie(P,Pt)))break;P=P[Pt]}return lt||++Ee!=je?lt:(je=P==null?0:P.length,!!je&&i1(je)&&sl(Pt,je)&&(Ni(P)||Uh(P)))}function nR(P){var B=P.length,ie=new P.constructor(B);return B&&typeof P[0]=="string"&&Qi.call(P,"index")&&(ie.index=P.index,ie.input=P.input),ie}function Od(P){return typeof P.constructor=="function"&&!hu(P)?Oc(Yp(P)):{}}function E4(P,B,ie){var Ee=P.constructor;switch(B){case ot:return PS(P);case se:case me:return new Ee(+P);case Ze:return qA(P,ie);case Je:case St:case er:case Ft:case Ut:case Er:case kr:case mr:case Dt:return YA(P,ie);case ke:return new Ee;case ze:case Ie:return new Ee(P);case pt:return XA(P);case It:return new Ee;case de:return Ad(P)}}function Bv(P,B){var ie=B.length;if(!ie)return P;var Ee=ie-1;return B[Ee]=(ie>1?"& ":"")+B[Ee],B=B.join(ie>2?", ":" "),P.replace(Ve,`{ /* [wrapped with `+B+`] */ `)}function X_(P){return Ni(P)||Uh(P)||!!(Rf&&P&&P[Rf])}function sl(P,B){var ie=typeof P;return B=B==null?q:B,!!B&&(ie=="number"||ie!="symbol"&&br.test(P))&&P>-1&&P%1==0&&P<B}function Is(P,B,ie){if(!Ks(ie))return!1;var Ee=typeof B;return(Ee=="number"?Ol(ie)&&sl(B,ie.length):Ee=="string"&&B in ie)?Nd(ie[B],P):!1}function RS(P,B){if(Ni(P))return!1;var ie=typeof P;return ie=="number"||ie=="symbol"||ie=="boolean"||P==null||Qu(P)?!0:Sr.test(P)||!Wt.test(P)||B!=null&&P in Zi(B)}function gw(P){var B=typeof P;return B=="string"||B=="number"||B=="symbol"||B=="boolean"?P!=="__proto__":P===null}function vw(P){var B=q_(P),ie=nt[B];if(typeof ie!="function"||!(B in ro.prototype))return!1;if(P===ie)return!0;var Ee=dw(ie);return!!Ee&&P===Ee[0]}function S4(P){return!!Td&&Td in P}var kS=Mf?$f:vT;function hu(P){var B=P&&P.constructor,ie=typeof B=="function"&&B.prototype||If;return P===ie}function Cg(P){return P===P&&!Ks(P)}function OS(P,B){return function(ie){return ie==null?!1:ie[P]===B&&(B!==r||P in Zi(ie))}}function iR(P){var B=Nw(P,function(Ee){return ie.size===u&&ie.clear(),Ee}),ie=B.cache;return B}function T4(P,B){var ie=P[1],Ee=B[1],je=ie|Ee,lt=je<(w|C|Z),Pt=Ee==Z&&ie==T||Ee==Z&&ie==W&&P[7].length<=B[8]||Ee==(Z|W)&&B[7].length<=B[8]&&ie==T;if(!(lt||Pt))return P;Ee&w&&(P[2]=B[2],je|=ie&w?0:E);var Bt=B[3];if(Bt){var nr=P[3];P[3]=nr?$n(nr,Bt,B[4]):Bt,P[4]=nr?Io(P[3],p):B[4]}return Bt=B[5],Bt&&(nr=P[5],P[5]=nr?im(nr,Bt,B[6]):Bt,P[6]=nr?Io(P[5],p):B[6]),Bt=B[7],Bt&&(P[7]=Bt),Ee&Z&&(P[8]=P[8]==null?B[8]:xo(P[8],B[8])),P[9]==null&&(P[9]=B[9]),P[0]=B[0],P[1]=je,P}function yw(P){var B=[];if(P!=null)for(var ie in Zi(P))B.push(ie);return B}function LS(P){return Af.call(P)}function jv(P,B,ie){return B=zs(B===r?P.length-1:B,0),function(){for(var Ee=arguments,je=-1,lt=zs(Ee.length-B,0),Pt=ir(lt);++je<lt;)Pt[je]=Ee[B+je];je=-1;for(var Bt=ir(B+1);++je<B;)Bt[je]=Ee[je];return Bt[B]=ie(Pt),sa(P,this,Bt)}}function Uv(P,B){return B.length<2?P:or(P,Xu(B,0,-1))}function Y_(P,B){for(var ie=P.length,Ee=xo(B.length,ie),je=Yl(P);Ee--;){var lt=B[Ee];P[Ee]=sl(lt,ie)?je[lt]:r}return P}function T0(P,B){if(!(B==="constructor"&&typeof P[B]=="function")&&B!="__proto__")return P[B]}var DS=Vv(VA),lm=Tv||function(P,B){return Yo.setTimeout(P,B)},K_=Vv(CS);function NS(P,B,ie){var Ee=B+"";return K_(P,Bv(Ee,P4(mc(Ee),ie)))}function Vv(P){var B=0,ie=0;return function(){var Ee=Iv(),je=$-(Ee-ie);if(ie=Ee,je>0){if(++B>=j)return arguments[0]}else B=0;return P.apply(r,arguments)}}function Z_(P,B){var ie=-1,Ee=P.length,je=Ee-1;for(B=B===r?Ee:B;++ie<B;){var lt=Df(ie,je),Pt=P[lt];P[lt]=P[ie],P[ie]=Pt}return P.length=B,P}var xw=iR(function(P){var B=[];return P.charCodeAt(0)===46&&B.push(""),P.replace(rr,function(ie,Ee,je,lt){B.push(je?lt.replace($t,"$1"):Ee||ie)}),B});function Ld(P){if(typeof P=="string"||Qu(P))return P;var B=P+"";return B=="0"&&1/P==-G?"-0":B}function Hv(P){if(P!=null){try{return Pl.call(P)}catch{}try{return P+""}catch{}}return""}function P4(P,B){return gi(oe,function(ie){var Ee="_."+ie[0];B&ie[1]&&!_d(P,Ee)&&P.push(Ee)}),P.sort()}function P0(P){if(P instanceof ro)return P.clone();var B=new Lc(P.__wrapped__,P.__chain__);return B.__actions__=Yl(P.__actions__),B.__index__=P.__index__,B.__values__=P.__values__,B}function oR(P,B,ie){(ie?Is(P,B,ie):B===r)?B=1:B=zs(Bi(B),0);var Ee=P==null?0:P.length;if(!Ee||B<1)return[];for(var je=0,lt=0,Pt=ir(Rh(Ee/B));je<Ee;)Pt[lt++]=Xu(P,je,je+=B);return Pt}function Eg(P){for(var B=-1,ie=P==null?0:P.length,Ee=0,je=[];++B<ie;){var lt=P[B];lt&&(je[Ee++]=lt)}return je}function Wo(){var P=arguments.length;if(!P)return[];for(var B=ir(P-1),ie=arguments[0],Ee=P;Ee--;)B[Ee-1]=arguments[Ee];return Fs(Ni(ie)?Yl(ie):[ie],mt(B,1))}var $S=ki(function(P,B){return Ms(P)?rt(P,mt(B,1,Ms,!0)):[]}),Bh=ki(function(P,B){var ie=pu(B);return Ms(ie)&&(ie=r),Ms(P)?rt(P,mt(B,1,Ms,!0),ui(ie,2)):[]}),jh=ki(function(P,B){var ie=pu(B);return Ms(ie)&&(ie=r),Ms(P)?rt(P,mt(B,1,Ms,!0),r,ie):[]});function Dd(P,B,ie){var Ee=P==null?0:P.length;return Ee?(B=ie||B===r?1:Bi(B),Xu(P,B<0?0:B,Ee)):[]}function Zu(P,B,ie){var Ee=P==null?0:P.length;return Ee?(B=ie||B===r?1:Bi(B),B=Ee-B,Xu(P,0,B<0?0:B)):[]}function Rl(P,B){return P&&P.length?x0(P,ui(B,3),!0,!0):[]}function sR(P,B){return P&&P.length?x0(P,ui(B,3),!0):[]}function kl(P,B,ie,Ee){var je=P==null?0:P.length;return je?(ie&&typeof ie!="number"&&Is(P,B,ie)&&(ie=0,Ee=je),it(P,B,ie,Ee)):[]}function FS(P,B,ie){var Ee=P==null?0:P.length;if(!Ee)return-1;var je=ie==null?0:Bi(ie);return je<0&&(je=zs(Ee+je,0)),Ed(P,ui(B,3),je)}function Wv(P,B,ie){var Ee=P==null?0:P.length;if(!Ee)return-1;var je=Ee-1;return ie!==r&&(je=Bi(ie),je=ie<0?zs(Ee+je,0):xo(je,Ee-1)),Ed(P,ui(B,3),je,!0)}function _w(P){var B=P==null?0:P.length;return B?mt(P,1):[]}function aR(P){var B=P==null?0:P.length;return B?mt(P,G):[]}function zS(P,B){var ie=P==null?0:P.length;return ie?(B=B===r?1:Bi(B),mt(P,B)):[]}function I4(P){for(var B=-1,ie=P==null?0:P.length,Ee={};++B<ie;){var je=P[B];Ee[je[0]]=je[1]}return Ee}function bw(P){return P&&P.length?P[0]:r}function lR(P,B,ie){var Ee=P==null?0:P.length;if(!Ee)return-1;var je=ie==null?0:Bi(ie);return je<0&&(je=zs(Ee+je,0)),Ef(P,B,je)}function M4(P){var B=P==null?0:P.length;return B?Xu(P,0,-1):[]}var cm=ki(function(P){var B=po(P,Yu);return B.length&&B[0]===P[0]?xr(B):[]}),Gv=ki(function(P){var B=pu(P),ie=po(P,Yu);return B===pu(ie)?B=r:ie.pop(),ie.length&&ie[0]===P[0]?xr(ie,ui(B,2)):[]}),ww=ki(function(P){var B=pu(P),ie=po(P,Yu);return B=typeof B=="function"?B:r,B&&ie.pop(),ie.length&&ie[0]===P[0]?xr(ie,r,B):[]});function Cw(P,B){return P==null?"":tw.call(P,B)}function pu(P){var B=P==null?0:P.length;return B?P[B-1]:r}function cR(P,B,ie){var Ee=P==null?0:P.length;if(!Ee)return-1;var je=Ee;return ie!==r&&(je=Bi(ie),je=je<0?zs(Ee+je,0):xo(je,Ee-1)),B===B?uc(P,B,je):Ed(P,Mh,je,!0)}function A4(P,B){return P&&P.length?Ml(P,Bi(B)):r}var uR=ki(fR);function fR(P,B){return P&&P.length&&B&&B.length?rm(P,B):P}function BS(P,B,ie){return P&&P.length&&B&&B.length?rm(P,B,ui(ie,2)):P}function R4(P,B,ie){return P&&P.length&&B&&B.length?rm(P,B,r,ie):P}var jS=zh(function(P,B){var ie=P==null?0:P.length,Ee=ae(P,B);return Lf(P,po(B,function(je){return sl(je,ie)?+je:je}).sort(KA)),Ee});function dR(P,B){var ie=[];if(!(P&&P.length))return ie;var Ee=-1,je=[],lt=P.length;for(B=ui(B,3);++Ee<lt;){var Pt=P[Ee];B(Pt,Ee,P)&&(ie.push(Pt),je.push(Ee))}return Lf(P,je),ie}function Ew(P){return P==null?P:d0.call(P)}function qv(P,B,ie){var Ee=P==null?0:P.length;return Ee?(ie&&typeof ie!="number"&&Is(P,B,ie)?(B=0,ie=Ee):(B=B==null?0:Bi(B),ie=ie===r?Ee:Bi(ie)),Xu(P,B,ie)):[]}function hR(P,B){return Lv(P,B)}function k4(P,B,ie){return Md(P,B,ui(ie,2))}function I0(P,B){var ie=P==null?0:P.length;if(ie){var Ee=Lv(P,B);if(Ee<ie&&Nd(P[Ee],B))return Ee}return-1}function Sw(P,B){return Lv(P,B,!0)}function pR(P,B,ie){return Md(P,B,ui(ie,2),!0)}function mR(P,B){var ie=P==null?0:P.length;if(ie){var Ee=Lv(P,B,!0)-1;if(Nd(P[Ee],B))return Ee}return-1}function O4(P){return P&&P.length?H_(P):[]}function L4(P,B){return P&&P.length?H_(P,ui(B,2)):[]}function gR(P){var B=P==null?0:P.length;return B?Xu(P,1,B):[]}function D4(P,B,ie){return P&&P.length?(B=ie||B===r?1:Bi(B),Xu(P,0,B<0?0:B)):[]}function vR(P,B,ie){var Ee=P==null?0:P.length;return Ee?(B=ie||B===r?1:Bi(B),B=Ee-B,Xu(P,B<0?0:B,Ee)):[]}function N4(P,B){return P&&P.length?x0(P,ui(B,3),!1,!0):[]}function $4(P,B){return P&&P.length?x0(P,ui(B,3)):[]}var yR=ki(function(P){return gg(mt(P,1,Ms,!0))}),xR=ki(function(P){var B=pu(P);return Ms(B)&&(B=r),gg(mt(P,1,Ms,!0),ui(B,2))}),_R=ki(function(P){var B=pu(P);return B=typeof B=="function"?B:r,gg(mt(P,1,Ms,!0),r,B)});function US(P){return P&&P.length?gg(P):[]}function um(P,B){return P&&P.length?gg(P,ui(B,2)):[]}function mu(P,B){return B=typeof B=="function"?B:r,P&&P.length?gg(P,r,B):[]}function VS(P){if(!(P&&P.length))return[];var B=0;return P=Hu(P,function(ie){if(Ms(ie))return B=zs(ie.length,B),!0}),gl(B,function(ie){return po(P,Ii(ie))})}function Tw(P,B){if(!(P&&P.length))return[];var ie=VS(P);return B==null?ie:po(ie,function(Ee){return sa(B,r,Ee)})}var F4=ki(function(P,B){return Ms(P)?rt(P,B):[]}),z4=ki(function(P){return vg(Hu(P,Ms))}),B4=ki(function(P){var B=pu(P);return Ms(B)&&(B=r),vg(Hu(P,Ms),ui(B,2))}),HS=ki(function(P){var B=pu(P);return B=typeof B=="function"?B:r,vg(Hu(P,Ms),r,B)}),Pw=ki(VS);function bR(P,B){return $h(P||[],B||[],h)}function Xv(P,B){return $h(P||[],B||[],y0)}var Q_=ki(function(P){var B=P.length,ie=B>1?P[B-1]:r;return ie=typeof ie=="function"?(P.pop(),ie):r,Tw(P,ie)});function wR(P){var B=nt(P);return B.__chain__=!0,B}function j4(P,B){return B(P),P}function Iw(P,B){return B(P)}var U4=zh(function(P){var B=P.length,ie=B?P[0]:0,Ee=this.__wrapped__,je=function(lt){return ae(lt,P)};return B>1||this.__actions__.length||!(Ee instanceof ro)||!sl(ie)?this.thru(je):(Ee=Ee.slice(ie,+ie+(B?1:0)),Ee.__actions__.push({func:Iw,args:[je],thisArg:r}),new Lc(Ee,this.__chain__).thru(function(lt){return B&&!lt.length&<.push(r),lt}))});function V4(){return wR(this)}function H4(){return new Lc(this.value(),this.__chain__)}function W4(){this.__values__===r&&(this.__values__=Go(this.value()));var P=this.__index__>=this.__values__.length,B=P?r:this.__values__[this.__index__++];return{done:P,value:B}}function WS(){return this}function G4(P){for(var B,ie=this;ie instanceof kv;){var Ee=P0(ie);Ee.__index__=0,Ee.__values__=r,B?je.__wrapped__=Ee:B=Ee;var je=Ee;ie=ie.__wrapped__}return je.__wrapped__=P,B}function M0(){var P=this.__wrapped__;if(P instanceof ro){var B=P;return this.__actions__.length&&(B=new ro(this)),B=B.reverse(),B.__actions__.push({func:Iw,args:[Ew],thisArg:r}),new Lc(B,this.__chain__)}return this.thru(Ew)}function q4(){return _0(this.__wrapped__,this.__actions__)}var ua=fu(function(P,B,ie){Qi.call(P,ie)?++P[ie]:ne(P,ie,1)});function Mw(P,B,ie){var Ee=Ni(P)?tg:ut;return ie&&Is(P,B,ie)&&(B=r),Ee(P,ui(B,3))}function CR(P,B){var ie=Ni(P)?Hu:yt;return ie(P,ui(B,3))}var Aw=eR(FS),Rw=eR(Wv);function J_(P,B){return mt(Sg(P,B),1)}function ER(P,B){return mt(Sg(P,B),G)}function SR(P,B,ie){return ie=ie===r?1:Bi(ie),mt(Sg(P,B),ie)}function A0(P,B){var ie=Ni(P)?gi:st;return ie(P,ui(B,3))}function kw(P,B){var ie=Ni(P)?R_:at;return ie(P,ui(B,3))}var GS=fu(function(P,B,ie){Qi.call(P,ie)?P[ie].push(B):ne(P,ie,[B])});function qS(P,B,ie,Ee){P=Ol(P)?P:Zv(P),ie=ie&&!Ee?Bi(ie):0;var je=P.length;return ie<0&&(ie=zs(je+ie,0)),Bw(P)?ie<=je&&P.indexOf(B,ie)>-1:!!je&&Ef(P,B,ie)>-1}var X4=ki(function(P,B,ie){var Ee=-1,je=typeof B=="function",lt=Ol(P)?ir(P.length):[];return st(P,function(Pt){lt[++Ee]=je?sa(B,Pt,ie):Rr(Pt,B,ie)}),lt}),TR=fu(function(P,B,ie){ne(P,ie,B)});function Sg(P,B){var ie=Ni(P)?po:qu;return ie(P,ui(B,3))}function Y4(P,B,ie,Ee){return P==null?[]:(Ni(B)||(B=B==null?[]:[B]),ie=Ee?r:ie,Ni(ie)||(ie=ie==null?[]:[ie]),ts(P,B,ie))}var XS=fu(function(P,B,ie){P[ie?0:1].push(B)},function(){return[[],[]]});function K4(P,B,ie){var Ee=Ni(P)?lc:Ev,je=arguments.length<3;return Ee(P,ui(B,4),ie,je,st)}function YS(P,B,ie){var Ee=Ni(P)?Wu:Ev,je=arguments.length<3;return Ee(P,ui(B,4),ie,je,at)}function KS(P,B){var ie=Ni(P)?Hu:yt;return ie(P,R0(ui(B,3)))}function Ow(P){var B=Ni(P)?v0:V_;return B(P)}function Z4(P,B,ie){(ie?Is(P,B,ie):B===r)?B=1:B=Bi(B);var Ee=Ni(P)?U_:UA;return Ee(P,B)}function Q4(P){var B=Ni(P)?pg:lw;return B(P)}function J4(P){if(P==null)return 0;if(Ol(P))return Bw(P)?Tl(P):P.length;var B=Al(P);return B==ke||B==It?P.size:il(P).length}function eF(P,B,ie){var Ee=Ni(P)?wa:ES;return ie&&Is(P,B,ie)&&(B=r),Ee(P,ui(B,3))}var tF=ki(function(P,B){if(P==null)return[];var ie=B.length;return ie>1&&Is(P,B[0],B[1])?B=[]:ie>2&&Is(B[0],B[1],B[2])&&(B=[B[0]]),ts(P,mt(B,1),[])}),Lw=L_||function(){return Yo.Date.now()};function Dw(P,B){if(typeof B!="function")throw new nl(a);return P=Bi(P),function(){if(--P<1)return B.apply(this,arguments)}}function PR(P,B,ie){return B=ie?r:B,B=P&&B==null?P.length:B,kd(P,Z,r,r,r,r,B)}function ZS(P,B){var ie;if(typeof B!="function")throw new nl(a);return P=Bi(P),function(){return--P>0&&(ie=B.apply(this,arguments)),P<=1&&(B=r),ie}}var Tg=ki(function(P,B,ie){var Ee=w;if(ie.length){var je=Io(ie,Fv(Tg));Ee|=k}return kd(P,Ee,B,ie,je)}),IR=ki(function(P,B,ie){var Ee=w|C;if(ie.length){var je=Io(ie,Fv(IR));Ee|=k}return kd(B,Ee,P,ie,je)});function MR(P,B,ie){B=ie?r:B;var Ee=kd(P,T,r,r,r,r,r,B);return Ee.placeholder=MR.placeholder,Ee}function AR(P,B,ie){B=ie?r:B;var Ee=kd(P,A,r,r,r,r,r,B);return Ee.placeholder=AR.placeholder,Ee}function QS(P,B,ie){var Ee,je,lt,Pt,Bt,nr,Ur=0,Gr=!1,rn=!1,Mn=!0;if(typeof P!="function")throw new nl(a);B=ll(B)||0,Ks(ie)&&(Gr=!!ie.leading,rn="maxWait"in ie,lt=rn?zs(ll(ie.maxWait)||0,B):lt,Mn="trailing"in ie?!!ie.trailing:Mn);function Xn(Ba){var zd=Ee,Ff=je;return Ee=je=r,Ur=Ba,Pt=P.apply(Ff,zd),Pt}function di(Ba){return Ur=Ba,Bt=lm(no,B),Gr?Xn(Ba):Pt}function Vi(Ba){var zd=Ba-nr,Ff=Ba-Ur,Ck=B-zd;return rn?xo(Ck,lt-Ff):Ck}function hi(Ba){var zd=Ba-nr,Ff=Ba-Ur;return nr===r||zd>=B||zd<0||rn&&Ff>=lt}function no(){var Ba=Lw();if(hi(Ba))return go(Ba);Bt=lm(no,Vi(Ba))}function go(Ba){return Bt=r,Mn&&Ee?Xn(Ba):(Ee=je=r,Pt)}function gu(){Bt!==r&&WA(Bt),Ur=0,Ee=nr=je=Bt=r}function Ea(){return Bt===r?Pt:go(Lw())}function vu(){var Ba=Lw(),zd=hi(Ba);if(Ee=arguments,je=this,nr=Ba,zd){if(Bt===r)return di(nr);if(rn)return WA(Bt),Bt=lm(no,B),Xn(nr)}return Bt===r&&(Bt=lm(no,B)),Pt}return vu.cancel=gu,vu.flush=Ea,vu}var RR=ki(function(P,B){return He(P,1,B)}),rF=ki(function(P,B,ie){return He(P,ll(B)||0,ie)});function nF(P){return kd(P,D)}function Nw(P,B){if(typeof P!="function"||B!=null&&typeof B!="function")throw new nl(a);var ie=function(){var Ee=arguments,je=B?B.apply(this,Ee):Ee[0],lt=ie.cache;if(lt.has(je))return lt.get(je);var Pt=P.apply(this,Ee);return ie.cache=lt.set(je,Pt)||lt,Pt};return ie.cache=new(Nw.Cache||lu),ie}Nw.Cache=lu;function R0(P){if(typeof P!="function")throw new nl(a);return function(){var B=arguments;switch(B.length){case 0:return!P.call(this);case 1:return!P.call(this,B[0]);case 2:return!P.call(this,B[0],B[1]);case 3:return!P.call(this,B[0],B[1],B[2])}return!P.apply(this,B)}}function $w(P){return ZS(2,P)}var Fw=Dv(function(P,B){B=B.length==1&&Ni(B[0])?po(B[0],tl(ui())):po(mt(B,1),tl(ui()));var ie=B.length;return ki(function(Ee){for(var je=-1,lt=xo(Ee.length,ie);++je<lt;)Ee[je]=B[je].call(this,Ee[je]);return sa(P,this,Ee)})}),JS=ki(function(P,B){var ie=Io(B,Fv(JS));return kd(P,k,r,B,ie)}),kR=ki(function(P,B){var ie=Io(B,Fv(kR));return kd(P,X,r,B,ie)}),e1=zh(function(P,B){return kd(P,W,r,r,r,B)});function t1(P,B){if(typeof P!="function")throw new nl(a);return B=B===r?B:Bi(B),ki(P,B)}function OR(P,B){if(typeof P!="function")throw new nl(a);return B=B==null?0:zs(Bi(B),0),ki(function(ie){var Ee=ie[B],je=yg(ie,0,B);return Ee&&Fs(je,Ee),sa(P,this,je)})}function r1(P,B,ie){var Ee=!0,je=!0;if(typeof P!="function")throw new nl(a);return Ks(ie)&&(Ee="leading"in ie?!!ie.leading:Ee,je="trailing"in ie?!!ie.trailing:je),QS(P,B,{leading:Ee,maxWait:B,trailing:je})}function LR(P){return PR(P,1)}function iF(P,B){return JS(Fh(B),P)}function DR(){if(!arguments.length)return[];var P=arguments[0];return Ni(P)?P:[P]}function NR(P){return be(P,x)}function $R(P,B){return B=typeof B=="function"?B:r,be(P,x,B)}function FR(P){return be(P,m|x)}function zR(P,B){return B=typeof B=="function"?B:r,be(P,m|x,B)}function BR(P,B){return B==null||Le(P,B,yl(B))}function Nd(P,B){return P===B||P!==P&&B!==B}var oF=bg(Tr),jR=bg(function(P,B){return P>=B}),Uh=Yr(function(){return arguments}())?Yr:function(P){return fa(P)&&Qi.call(P,"callee")&&!O_.call(P,"callee")},Ni=ir.isArray,gc=zp?tl(zp):Nn;function Ol(P){return P!=null&&i1(P.length)&&!$f(P)}function Ms(P){return fa(P)&&Ol(P)}function n1(P){return P===!0||P===!1||fa(P)&&Qt(P)==se}var fm=wn||vT,UR=Vu?tl(Vu):li;function sF(P){return fa(P)&&P.nodeType===1&&!Nc(P)}function aF(P){if(P==null)return!0;if(Ol(P)&&(Ni(P)||typeof P=="string"||typeof P.splice=="function"||fm(P)||Vh(P)||Uh(P)))return!P.length;var B=Al(P);if(B==ke||B==It)return!P.size;if(hu(P))return!il(P).length;for(var ie in P)if(Qi.call(P,ie))return!1;return!0}function lF(P,B){return Cn(P,B)}function cF(P,B,ie){ie=typeof ie=="function"?ie:r;var Ee=ie?ie(P,B):r;return Ee===r?Cn(P,B,r,ie):!!Ee}function eT(P){if(!fa(P))return!1;var B=Qt(P);return B==Ce||B==pe||typeof P.message=="string"&&typeof P.name=="string"&&!Nc(P)}function uF(P){return typeof P=="number"&&au(P)}function $f(P){if(!Ks(P))return!1;var B=Qt(P);return B==Pe||B==Re||B==xe||B==xt}function VR(P){return typeof P=="number"&&P==Bi(P)}function i1(P){return typeof P=="number"&&P>-1&&P%1==0&&P<=q}function Ks(P){var B=typeof P;return P!=null&&(B=="object"||B=="function")}function fa(P){return P!=null&&typeof P=="object"}var HR=ru?tl(ru):Ri;function fF(P,B){return P===B||bi(P,B,MS(B))}function dF(P,B,ie){return ie=typeof ie=="function"?ie:r,bi(P,B,MS(B),ie)}function hF(P){return al(P)&&P!=+P}function pF(P){if(kS(P))throw new Zn(o);return An(P)}function WR(P){return P===null}function mF(P){return P==null}function al(P){return typeof P=="number"||fa(P)&&Qt(P)==ze}function Nc(P){if(!fa(P)||Qt(P)!=ht)return!1;var B=Yp(P);if(B===null)return!0;var ie=Qi.call(B,"constructor")&&B.constructor;return typeof ie=="function"&&ie instanceof ie&&Pl.call(ie)==su}var o1=Bp?tl(Bp):_o;function zw(P){return VR(P)&&P>=-q&&P<=q}var Yv=xd?tl(xd):Vo;function Bw(P){return typeof P=="string"||!Ni(P)&&fa(P)&&Qt(P)==Ie}function Qu(P){return typeof P=="symbol"||fa(P)&&Qt(P)==de}var Vh=Sh?tl(Sh):Ho;function gF(P){return P===r}function vF(P){return fa(P)&&Al(P)==Be}function GR(P){return fa(P)&&Qt(P)==Ke}var qR=bg(dc),XR=bg(function(P,B){return P<=B});function Go(P){if(!P)return[];if(Ol(P))return Bw(P)?Ko(P):Yl(P);if(ag&&P[ag])return Do(P[ag]());var B=Al(P),ie=B==ke?Di:B==It?rl:Zv;return ie(P)}function $d(P){if(!P)return P===0?P:0;if(P=ll(P),P===G||P===-G){var B=P<0?-1:1;return B*ee}return P===P?P:0}function Bi(P){var B=$d(P),ie=B%1;return B===B?ie?B-ie:B:0}function tT(P){return P?he(Bi(P),0,ce):0}function ll(P){if(typeof P=="number")return P;if(Qu(P))return re;if(Ks(P)){var B=typeof P.valueOf=="function"?P.valueOf():P;P=Ks(B)?B+"":B}if(typeof P!="string")return P===0?P:+P;P=a0(P);var ie=Xr.test(P);return ie||Ln.test(P)?A_(P.slice(2),ie?2:8):Br.test(P)?re:+P}function Kv(P){return ca(P,Ll(P))}function YR(P){return P?he(Bi(P),-q,q):P===0?P:0}function rs(P){return P==null?"":uu(P)}var yF=xg(function(P,B){if(hu(B)||Ol(B)){ca(B,yl(B),P);return}for(var ie in B)Qi.call(B,ie)&&h(P,ie,B[ie])}),KR=xg(function(P,B){ca(B,Ll(B),P)}),jw=xg(function(P,B,ie,Ee){ca(B,Ll(B),P,Ee)}),xF=xg(function(P,B,ie,Ee){ca(B,yl(B),P,Ee)}),_F=zh(ae);function bF(P,B){var ie=Oc(P);return B==null?ie:U(ie,B)}var wF=ki(function(P,B){P=Zi(P);var ie=-1,Ee=B.length,je=Ee>2?B[2]:r;for(je&&Is(B[0],B[1],je)&&(Ee=1);++ie<Ee;)for(var lt=B[ie],Pt=Ll(lt),Bt=-1,nr=Pt.length;++Bt<nr;){var Ur=Pt[Bt],Gr=P[Ur];(Gr===r||Nd(Gr,If[Ur])&&!Qi.call(P,Ur))&&(P[Ur]=lt[Ur])}return P}),CF=ki(function(P){return P.push(r,IS),sa(JR,r,P)});function Uw(P,B){return Cd(P,ui(B,3),At)}function k0(P,B){return Cd(P,ui(B,3),Yt)}function ZR(P,B){return P==null?P:kt(P,ui(B,3),Ll)}function Vw(P,B){return P==null?P:Lt(P,ui(B,3),Ll)}function rT(P,B){return P&&At(P,ui(B,3))}function EF(P,B){return P&&Yt(P,ui(B,3))}function SF(P){return P==null?[]:Vt(P,yl(P))}function TF(P){return P==null?[]:Vt(P,Ll(P))}function Hw(P,B,ie){var Ee=P==null?r:or(P,B);return Ee===r?ie:Ee}function nT(P,B){return P!=null&&mw(P,B,fr)}function Kl(P,B){return P!=null&&mw(P,B,jr)}var iT=C0(function(P,B,ie){B!=null&&typeof B.toString!="function"&&(B=Af.call(B)),P[B]=ie},pT(Dl)),QR=C0(function(P,B,ie){B!=null&&typeof B.toString!="function"&&(B=Af.call(B)),Qi.call(P,B)?P[B].push(ie):P[B]=[ie]},ui),Ju=ki(Rr);function yl(P){return Ol(P)?g0(P):il(P)}function Ll(P){return Ol(P)?g0(P,!0):ol(P)}function O0(P,B){var ie={};return B=ui(B,3),At(P,function(Ee,je,lt){ne(ie,B(Ee,je,lt),Ee)}),ie}function oT(P,B){var ie={};return B=ui(B,3),At(P,function(Ee,je,lt){ne(ie,je,B(Ee,je,lt))}),ie}var Ww=xg(function(P,B,ie){qi(P,B,ie)}),JR=xg(function(P,B,ie,Ee){qi(P,B,ie,Ee)}),ek=zh(function(P,B){var ie={};if(P==null)return ie;var Ee=!1;B=po(B,function(lt){return lt=Dc(lt,P),Ee||(Ee=lt.length>1),lt}),ca(P,am(P),ie),Ee&&(ie=be(ie,m|v|x,G_));for(var je=B.length;je--;)TS(ie,B[je]);return ie});function tk(P,B){return sT(P,R0(ui(B)))}var PF=zh(function(P,B){return P==null?{}:hc(P,B)});function sT(P,B){if(P==null)return{};var ie=po(am(P),function(Ee){return[Ee]});return B=ui(B),Ov(P,ie,function(Ee,je){return B(Ee,je[0])})}function rk(P,B,ie){B=Dc(B,P);var Ee=-1,je=B.length;for(je||(je=1,P=r);++Ee<je;){var lt=P==null?r:P[Ld(B[Ee])];lt===r&&(Ee=je,lt=ie),P=$f(lt)?lt.call(P):lt}return P}function aT(P,B,ie){return P==null?P:y0(P,B,ie)}function nk(P,B,ie,Ee){return Ee=typeof Ee=="function"?Ee:r,P==null?P:y0(P,B,ie,Ee)}var ik=Ku(yl),lT=Ku(Ll);function dm(P,B,ie){var Ee=Ni(P),je=Ee||fm(P)||Vh(P);if(B=ui(B,4),ie==null){var lt=P&&P.constructor;je?ie=Ee?new lt:[]:Ks(P)?ie=$f(lt)?Oc(Yp(P)):{}:ie={}}return(je?gi:At)(P,function(Pt,Bt,nr){return B(ie,Pt,Bt,nr)}),ie}function ok(P,B){return P==null?!0:TS(P,B)}function sk(P,B,ie){return P==null?P:HA(P,B,Fh(ie))}function ak(P,B,ie,Ee){return Ee=typeof Ee=="function"?Ee:r,P==null?P:HA(P,B,Fh(ie),Ee)}function Zv(P){return P==null?[]:Up(P,yl(P))}function IF(P){return P==null?[]:Up(P,Ll(P))}function MF(P,B,ie){return ie===r&&(ie=B,B=r),ie!==r&&(ie=ll(ie),ie=ie===ie?ie:0),B!==r&&(B=ll(B),B=B===B?B:0),he(ll(P),B,ie)}function lk(P,B,ie){return B=$d(B),ie===r?(ie=B,B=0):ie=$d(ie),P=ll(P),lr(P,B,ie)}function ck(P,B,ie){if(ie&&typeof ie!="boolean"&&Is(P,B,ie)&&(B=ie=r),ie===r&&(typeof B=="boolean"?(ie=B,B=r):typeof P=="boolean"&&(ie=P,P=r)),P===r&&B===r?(P=0,B=1):(P=$d(P),B===r?(B=P,P=0):B=$d(B)),P>B){var Ee=P;P=B,B=Ee}if(ie||P%1||B%1){var je=f0();return xo(P+je*(B-P+$p("1e-"+((je+"").length-1))),B)}return Df(P,B)}var s1=om(function(P,B,ie){return B=B.toLowerCase(),P+(ie?cT(B):B)});function cT(P){return Yw(rs(P).toLowerCase())}function uT(P){return P=rs(P),P&&P.replace(oi,Sv).replace(ci,"")}function Fd(P,B,ie){P=rs(P),B=uu(B);var Ee=P.length;ie=ie===r?Ee:he(Bi(ie),0,Ee);var je=ie;return ie-=B.length,ie>=0&&P.slice(ie,je)==B}function fT(P){return P=rs(P),P&&_t.test(P)?P.replace(Xe,l0):P}function L0(P){return P=rs(P),P&&sn.test(P)?P.replace(tr,"\\$&"):P}var D0=om(function(P,B,ie){return P+(ie?"-":"")+B.toLowerCase()}),uk=om(function(P,B,ie){return P+(ie?" ":"")+B.toLowerCase()}),Gw=cw("toLowerCase");function fk(P,B,ie){P=rs(P),B=Bi(B);var Ee=B?Tl(P):0;if(!B||Ee>=B)return P;var je=(B-Ee)/2;return E0(Qp(je),ie)+P+E0(Rh(je),ie)}function qw(P,B,ie){P=rs(P),B=Bi(B);var Ee=B?Tl(P):0;return B&&Ee<B?P+E0(B-Ee,ie):P}function Xw(P,B,ie){P=rs(P),B=Bi(B);var Ee=B?Tl(P):0;return B&&Ee<B?E0(B-Ee,ie)+P:P}function AF(P,B,ie){return ie||B==null?B=0:B&&(B=+B),u0(rs(P).replace(un,""),B||0)}function RF(P,B,ie){return(ie?Is(P,B,ie):B===r)?B=1:B=Bi(B),mg(rs(P),B)}function kF(){var P=arguments,B=rs(P[0]);return P.length<3?B:B.replace(P[1],P[2])}var OF=om(function(P,B,ie){return P+(ie?"_":"")+B.toLowerCase()});function LF(P,B,ie){return ie&&typeof ie!="number"&&Is(P,B,ie)&&(B=ie=r),ie=ie===r?ce:ie>>>0,ie?(P=rs(P),P&&(typeof B=="string"||B!=null&&!o1(B))&&(B=uu(B),!B&&dn(P))?yg(Ko(P),0,ie):P.split(B,ie)):[]}var N0=om(function(P,B,ie){return P+(ie?" ":"")+Yw(B)});function $0(P,B,ie){return P=rs(P),ie=ie==null?0:he(Bi(ie),0,P.length),B=uu(B),P.slice(ie,ie+B.length)==B}function dT(P,B,ie){var Ee=nt.templateSettings;ie&&Is(P,B,ie)&&(B=r),P=rs(P),B=jw({},B,Ee,Bs);var je=jw({},B.imports,Ee.imports,Bs),lt=yl(je),Pt=Up(je,lt),Bt,nr,Ur=0,Gr=B.interpolate||Gi,rn="__p += '",Mn=ou((B.escape||Gi).source+"|"+Gr.source+"|"+(Gr===bt?Gt:Gi).source+"|"+(B.evaluate||Gi).source+"|$","g"),Xn="//# sourceURL="+(Qi.call(B,"sourceURL")?(B.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++$i+"]")+` `;P.replace(Mn,function(hi,no,go,gu,Ea,vu){return go||(go=gu),rn+=P.slice(Ur,vu).replace(pi,Jt),no&&(Bt=!0,rn+=`' + __e(`+no+`) + '`),Ea&&(nr=!0,rn+=`'; `+Ea+`; __p += '`),go&&(rn+=`' + ((__t = (`+go+`)) == null ? '' : __t) + '`),Ur=vu+hi.length,hi}),rn+=`'; `;var di=Qi.call(B,"variable")&&B.variable;if(!di)rn=`with (obj) { `+rn+` } `;else if(on.test(di))throw new Zn(s);rn=(nr?rn.replace(Jr,""):rn).replace(We,"$1").replace(Oe,"$1;"),rn="function("+(di||"obj")+`) { `+(di?"":`obj || (obj = {}); `)+"var __t, __p = ''"+(Bt?", __e = _.escape":"")+(nr?`, __j = Array.prototype.join; function print() { __p += __j.call(arguments, '') } `:`; `)+rn+`return __p }`;var Vi=Kw(function(){return lo(lt,Xn+"return "+rn).apply(r,Pt)});if(Vi.source=rn,eT(Vi))throw Vi;return Vi}function DF(P){return rs(P).toLowerCase()}function dk(P){return rs(P).toUpperCase()}function NF(P,B,ie){if(P=rs(P),P&&(ie||B===r))return a0(P);if(!P||!(B=uu(B)))return P;var Ee=Ko(P),je=Ko(B),lt=Vp(Ee,je),Pt=Hp(Ee,je)+1;return yg(Ee,lt,Pt).join("")}function hT(P,B,ie){if(P=rs(P),P&&(ie||B===r))return P.slice(0,ql(P)+1);if(!P||!(B=uu(B)))return P;var Ee=Ko(P),je=Hp(Ee,Ko(B))+1;return yg(Ee,0,je).join("")}function $F(P,B,ie){if(P=rs(P),P&&(ie||B===r))return P.replace(un,"");if(!P||!(B=uu(B)))return P;var Ee=Ko(P),je=Vp(Ee,Ko(B));return yg(Ee,je).join("")}function a1(P,B){var ie=H,Ee=N;if(Ks(B)){var je="separator"in B?B.separator:je;ie="length"in B?Bi(B.length):ie,Ee="omission"in B?uu(B.omission):Ee}P=rs(P);var lt=P.length;if(dn(P)){var Pt=Ko(P);lt=Pt.length}if(ie>=lt)return P;var Bt=ie-Tl(Ee);if(Bt<1)return Ee;var nr=Pt?yg(Pt,0,Bt).join(""):P.slice(0,Bt);if(je===r)return nr+Ee;if(Pt&&(Bt+=nr.length-Bt),o1(je)){if(P.slice(Bt).search(je)){var Ur,Gr=nr;for(je.global||(je=ou(je.source,rs(Ir.exec(je))+"g")),je.lastIndex=0;Ur=je.exec(Gr);)var rn=Ur.index;nr=nr.slice(0,rn===r?Bt:rn)}}else if(P.indexOf(uu(je),Bt)!=Bt){var Mn=nr.lastIndexOf(je);Mn>-1&&(nr=nr.slice(0,Mn))}return nr+Ee}function Pg(P){return P=rs(P),P&&tt.test(P)?P.replace($e,iu):P}var hk=om(function(P,B,ie){return P+(ie?" ":"")+B.toUpperCase()}),Yw=cw("toUpperCase");function l1(P,B,ie){return P=rs(P),B=ie?r:B,B===r?Wn(P)?Gp(P):Ih(P):P.match(B)||[]}var Kw=ki(function(P,B){try{return sa(P,r,B)}catch(ie){return eT(ie)?ie:new Zn(ie)}}),FF=zh(function(P,B){return gi(B,function(ie){ie=Ld(ie),ne(P,ie,Tg(P[ie],P))}),P});function pk(P){var B=P==null?0:P.length,ie=ui();return P=B?po(P,function(Ee){if(typeof Ee[1]!="function")throw new nl(a);return[ie(Ee[0]),Ee[1]]}):[],ki(function(Ee){for(var je=-1;++je<B;){var lt=P[je];if(sa(lt[0],this,Ee))return sa(lt[1],this,Ee)}})}function Qv(P){return we(be(P,m))}function pT(P){return function(){return P}}function Ig(P,B){return P==null||P!==P?B:P}var zF=uw(),c1=uw(!0);function Dl(P){return P}function Jv(P){return No(typeof P=="function"?P:be(P,m))}function u1(P){return cs(be(P,m))}function Zw(P,B){return $o(P,be(B,m))}var BF=ki(function(P,B){return function(ie){return Rr(ie,P,B)}}),jF=ki(function(P,B){return function(ie){return Rr(P,ie,B)}});function Mg(P,B,ie){var Ee=yl(B),je=Vt(B,Ee);ie==null&&!(Ks(B)&&(je.length||!Ee.length))&&(ie=B,B=P,P=this,je=Vt(B,yl(B)));var lt=!(Ks(ie)&&"chain"in ie)||!!ie.chain,Pt=$f(P);return gi(je,function(Bt){var nr=B[Bt];P[Bt]=nr,Pt&&(P.prototype[Bt]=function(){var Ur=this.__chain__;if(lt||Ur){var Gr=P(this.__wrapped__),rn=Gr.__actions__=Yl(this.__actions__);return rn.push({func:nr,args:arguments,thisArg:P}),Gr.__chain__=Ur,Gr}return nr.apply(P,Fs([this.value()],arguments))})}),P}function Qw(){return Yo._===this&&(Yo._=sg),this}function mT(){}function mk(P){return P=Bi(P),ki(function(B){return Ml(B,P)})}var gk=Rd(po),UF=Rd(tg),vk=Rd(wa);function yk(P){return RS(P)?Ii(Ld(P)):tm(P)}function xk(P){return function(B){return P==null?r:or(P,B)}}var VF=S0(),_k=S0(!0);function gT(){return[]}function vT(){return!1}function Jw(){return{}}function e2(){return""}function t2(){return!0}function HF(P,B){if(P=Bi(P),P<1||P>q)return[];var ie=ce,Ee=xo(P,ce);B=ui(B),P-=ce;for(var je=gl(Ee,B);++ie<P;)B(ie);return je}function yT(P){return Ni(P)?po(P,Ld):Qu(P)?[P]:Yl(xw(rs(P)))}function xT(P){var B=++vl;return rs(P)+B}var Ag=sm(function(P,B){return P+B},0),WF=$v("ceil"),_T=sm(function(P,B){return P/B},1),bk=$v("floor");function r2(P){return P&&P.length?De(P,Dl,Tr):r}function GF(P,B){return P&&P.length?De(P,ui(B,2),Tr):r}function qF(P){return jp(P,Dl)}function XF(P,B){return jp(P,ui(B,2))}function YF(P){return P&&P.length?De(P,Dl,dc):r}function bT(P,B){return P&&P.length?De(P,ui(B,2),dc):r}var KF=sm(function(P,B){return P*B},1),f1=$v("round"),ZF=sm(function(P,B){return P-B},0);function QF(P){return P&&P.length?ng(P,Dl):0}function wk(P,B){return P&&P.length?ng(P,ui(B,2)):0}return nt.after=Dw,nt.ary=PR,nt.assign=yF,nt.assignIn=KR,nt.assignInWith=jw,nt.assignWith=xF,nt.at=_F,nt.before=ZS,nt.bind=Tg,nt.bindAll=FF,nt.bindKey=IR,nt.castArray=DR,nt.chain=wR,nt.chunk=oR,nt.compact=Eg,nt.concat=Wo,nt.cond=pk,nt.conforms=Qv,nt.constant=pT,nt.countBy=ua,nt.create=bF,nt.curry=MR,nt.curryRight=AR,nt.debounce=QS,nt.defaults=wF,nt.defaultsDeep=CF,nt.defer=RR,nt.delay=rF,nt.difference=$S,nt.differenceBy=Bh,nt.differenceWith=jh,nt.drop=Dd,nt.dropRight=Zu,nt.dropRightWhile=Rl,nt.dropWhile=sR,nt.fill=kl,nt.filter=CR,nt.flatMap=J_,nt.flatMapDeep=ER,nt.flatMapDepth=SR,nt.flatten=_w,nt.flattenDeep=aR,nt.flattenDepth=zS,nt.flip=nF,nt.flow=zF,nt.flowRight=c1,nt.fromPairs=I4,nt.functions=SF,nt.functionsIn=TF,nt.groupBy=GS,nt.initial=M4,nt.intersection=cm,nt.intersectionBy=Gv,nt.intersectionWith=ww,nt.invert=iT,nt.invertBy=QR,nt.invokeMap=X4,nt.iteratee=Jv,nt.keyBy=TR,nt.keys=yl,nt.keysIn=Ll,nt.map=Sg,nt.mapKeys=O0,nt.mapValues=oT,nt.matches=u1,nt.matchesProperty=Zw,nt.memoize=Nw,nt.merge=Ww,nt.mergeWith=JR,nt.method=BF,nt.methodOf=jF,nt.mixin=Mg,nt.negate=R0,nt.nthArg=mk,nt.omit=ek,nt.omitBy=tk,nt.once=$w,nt.orderBy=Y4,nt.over=gk,nt.overArgs=Fw,nt.overEvery=UF,nt.overSome=vk,nt.partial=JS,nt.partialRight=kR,nt.partition=XS,nt.pick=PF,nt.pickBy=sT,nt.property=yk,nt.propertyOf=xk,nt.pull=uR,nt.pullAll=fR,nt.pullAllBy=BS,nt.pullAllWith=R4,nt.pullAt=jS,nt.range=VF,nt.rangeRight=_k,nt.rearg=e1,nt.reject=KS,nt.remove=dR,nt.rest=t1,nt.reverse=Ew,nt.sampleSize=Z4,nt.set=aT,nt.setWith=nk,nt.shuffle=Q4,nt.slice=qv,nt.sortBy=tF,nt.sortedUniq=O4,nt.sortedUniqBy=L4,nt.split=LF,nt.spread=OR,nt.tail=gR,nt.take=D4,nt.takeRight=vR,nt.takeRightWhile=N4,nt.takeWhile=$4,nt.tap=j4,nt.throttle=r1,nt.thru=Iw,nt.toArray=Go,nt.toPairs=ik,nt.toPairsIn=lT,nt.toPath=yT,nt.toPlainObject=Kv,nt.transform=dm,nt.unary=LR,nt.union=yR,nt.unionBy=xR,nt.unionWith=_R,nt.uniq=US,nt.uniqBy=um,nt.uniqWith=mu,nt.unset=ok,nt.unzip=VS,nt.unzipWith=Tw,nt.update=sk,nt.updateWith=ak,nt.values=Zv,nt.valuesIn=IF,nt.without=F4,nt.words=l1,nt.wrap=iF,nt.xor=z4,nt.xorBy=B4,nt.xorWith=HS,nt.zip=Pw,nt.zipObject=bR,nt.zipObjectDeep=Xv,nt.zipWith=Q_,nt.entries=ik,nt.entriesIn=lT,nt.extend=KR,nt.extendWith=jw,Mg(nt,nt),nt.add=Ag,nt.attempt=Kw,nt.camelCase=s1,nt.capitalize=cT,nt.ceil=WF,nt.clamp=MF,nt.clone=NR,nt.cloneDeep=FR,nt.cloneDeepWith=zR,nt.cloneWith=$R,nt.conformsTo=BR,nt.deburr=uT,nt.defaultTo=Ig,nt.divide=_T,nt.endsWith=Fd,nt.eq=Nd,nt.escape=fT,nt.escapeRegExp=L0,nt.every=Mw,nt.find=Aw,nt.findIndex=FS,nt.findKey=Uw,nt.findLast=Rw,nt.findLastIndex=Wv,nt.findLastKey=k0,nt.floor=bk,nt.forEach=A0,nt.forEachRight=kw,nt.forIn=ZR,nt.forInRight=Vw,nt.forOwn=rT,nt.forOwnRight=EF,nt.get=Hw,nt.gt=oF,nt.gte=jR,nt.has=nT,nt.hasIn=Kl,nt.head=bw,nt.identity=Dl,nt.includes=qS,nt.indexOf=lR,nt.inRange=lk,nt.invoke=Ju,nt.isArguments=Uh,nt.isArray=Ni,nt.isArrayBuffer=gc,nt.isArrayLike=Ol,nt.isArrayLikeObject=Ms,nt.isBoolean=n1,nt.isBuffer=fm,nt.isDate=UR,nt.isElement=sF,nt.isEmpty=aF,nt.isEqual=lF,nt.isEqualWith=cF,nt.isError=eT,nt.isFinite=uF,nt.isFunction=$f,nt.isInteger=VR,nt.isLength=i1,nt.isMap=HR,nt.isMatch=fF,nt.isMatchWith=dF,nt.isNaN=hF,nt.isNative=pF,nt.isNil=mF,nt.isNull=WR,nt.isNumber=al,nt.isObject=Ks,nt.isObjectLike=fa,nt.isPlainObject=Nc,nt.isRegExp=o1,nt.isSafeInteger=zw,nt.isSet=Yv,nt.isString=Bw,nt.isSymbol=Qu,nt.isTypedArray=Vh,nt.isUndefined=gF,nt.isWeakMap=vF,nt.isWeakSet=GR,nt.join=Cw,nt.kebabCase=D0,nt.last=pu,nt.lastIndexOf=cR,nt.lowerCase=uk,nt.lowerFirst=Gw,nt.lt=qR,nt.lte=XR,nt.max=r2,nt.maxBy=GF,nt.mean=qF,nt.meanBy=XF,nt.min=YF,nt.minBy=bT,nt.stubArray=gT,nt.stubFalse=vT,nt.stubObject=Jw,nt.stubString=e2,nt.stubTrue=t2,nt.multiply=KF,nt.nth=A4,nt.noConflict=Qw,nt.noop=mT,nt.now=Lw,nt.pad=fk,nt.padEnd=qw,nt.padStart=Xw,nt.parseInt=AF,nt.random=ck,nt.reduce=K4,nt.reduceRight=YS,nt.repeat=RF,nt.replace=kF,nt.result=rk,nt.round=f1,nt.runInContext=Zt,nt.sample=Ow,nt.size=J4,nt.snakeCase=OF,nt.some=eF,nt.sortedIndex=hR,nt.sortedIndexBy=k4,nt.sortedIndexOf=I0,nt.sortedLastIndex=Sw,nt.sortedLastIndexBy=pR,nt.sortedLastIndexOf=mR,nt.startCase=N0,nt.startsWith=$0,nt.subtract=ZF,nt.sum=QF,nt.sumBy=wk,nt.template=dT,nt.times=HF,nt.toFinite=$d,nt.toInteger=Bi,nt.toLength=tT,nt.toLower=DF,nt.toNumber=ll,nt.toSafeInteger=YR,nt.toString=rs,nt.toUpper=dk,nt.trim=NF,nt.trimEnd=hT,nt.trimStart=$F,nt.truncate=a1,nt.unescape=Pg,nt.uniqueId=xT,nt.upperCase=hk,nt.upperFirst=Yw,nt.each=A0,nt.eachRight=kw,nt.first=bw,Mg(nt,function(){var P={};return At(nt,function(B,ie){Qi.call(nt.prototype,ie)||(P[ie]=B)}),P}(),{chain:!1}),nt.VERSION=n,gi(["bind","bindKey","curry","curryRight","partial","partialRight"],function(P){nt[P].placeholder=nt}),gi(["drop","take"],function(P,B){ro.prototype[P]=function(ie){ie=ie===r?1:zs(Bi(ie),0);var Ee=this.__filtered__&&!B?new ro(this):this.clone();return Ee.__filtered__?Ee.__takeCount__=xo(ie,Ee.__takeCount__):Ee.__views__.push({size:xo(ie,ce),type:P+(Ee.__dir__<0?"Right":"")}),Ee},ro.prototype[P+"Right"]=function(ie){return this.reverse()[P](ie).reverse()}}),gi(["filter","map","takeWhile"],function(P,B){var ie=B+1,Ee=ie==z||ie==F;ro.prototype[P]=function(je){var lt=this.clone();return lt.__iteratees__.push({iteratee:ui(je,3),type:ie}),lt.__filtered__=lt.__filtered__||Ee,lt}}),gi(["head","last"],function(P,B){var ie="take"+(B?"Right":"");ro.prototype[P]=function(){return this[ie](1).value()[0]}}),gi(["initial","tail"],function(P,B){var ie="drop"+(B?"":"Right");ro.prototype[P]=function(){return this.__filtered__?new ro(this):this[ie](1)}}),ro.prototype.compact=function(){return this.filter(Dl)},ro.prototype.find=function(P){return this.filter(P).head()},ro.prototype.findLast=function(P){return this.reverse().find(P)},ro.prototype.invokeMap=ki(function(P,B){return typeof P=="function"?new ro(this):this.map(function(ie){return Rr(ie,P,B)})}),ro.prototype.reject=function(P){return this.filter(R0(ui(P)))},ro.prototype.slice=function(P,B){P=Bi(P);var ie=this;return ie.__filtered__&&(P>0||B<0)?new ro(ie):(P<0?ie=ie.takeRight(-P):P&&(ie=ie.drop(P)),B!==r&&(B=Bi(B),ie=B<0?ie.dropRight(-B):ie.take(B-P)),ie)},ro.prototype.takeRightWhile=function(P){return this.reverse().takeWhile(P).reverse()},ro.prototype.toArray=function(){return this.take(ce)},At(ro.prototype,function(P,B){var ie=/^(?:filter|find|map|reject)|While$/.test(B),Ee=/^(?:head|last)$/.test(B),je=nt[Ee?"take"+(B=="last"?"Right":""):B],lt=Ee||/^find/.test(B);!je||(nt.prototype[B]=function(){var Pt=this.__wrapped__,Bt=Ee?[1]:arguments,nr=Pt instanceof ro,Ur=Bt[0],Gr=nr||Ni(Pt),rn=function(no){var go=je.apply(nt,Fs([no],Bt));return Ee&&Mn?go[0]:go};Gr&&ie&&typeof Ur=="function"&&Ur.length!=1&&(nr=Gr=!1);var Mn=this.__chain__,Xn=!!this.__actions__.length,di=lt&&!Mn,Vi=nr&&!Xn;if(!lt&&Gr){Pt=Vi?Pt:new ro(this);var hi=P.apply(Pt,Bt);return hi.__actions__.push({func:Iw,args:[rn],thisArg:r}),new Lc(hi,Mn)}return di&&Vi?P.apply(this,Bt):(hi=this.thru(rn),di?Ee?hi.value()[0]:hi.value():hi)})}),gi(["pop","push","shift","sort","splice","unshift"],function(P){var B=fc[P],ie=/^(?:push|sort|unshift)$/.test(P)?"tap":"thru",Ee=/^(?:pop|shift)$/.test(P);nt.prototype[P]=function(){var je=arguments;if(Ee&&!this.__chain__){var lt=this.value();return B.apply(Ni(lt)?lt:[],je)}return this[ie](function(Pt){return B.apply(Ni(Pt)?Pt:[],je)})}}),At(ro.prototype,function(P,B){var ie=nt[B];if(ie){var Ee=ie.name+"";Qi.call(Dh,Ee)||(Dh[Ee]=[]),Dh[Ee].push({name:B,func:ie})}}),Dh[W_(r,C).name]=[{name:"wrapper",func:r}],ro.prototype.clone=rw,ro.prototype.reverse=$_,ro.prototype.value=nw,nt.prototype.at=U4,nt.prototype.chain=V4,nt.prototype.commit=H4,nt.prototype.next=W4,nt.prototype.plant=G4,nt.prototype.reverse=M0,nt.prototype.toJSON=nt.prototype.valueOf=nt.prototype.value=q4,nt.prototype.first=nt.prototype.head,ag&&(nt.prototype[ag]=WS),nt},Sd=og();Gl?((Gl.exports=Sd)._=Sd,Eh._=Sd):Yo._=Sd}).call(xl)})($se,$se.exports);/*! * Chart.js v3.9.1 * https://www.chartjs.org * (c) 2022 Chart.js Contributors * Released under the MIT License */function Sy(){}const Lnt=function(){let t=0;return function(){return t++}}();function Qo(t){return t===null||typeof t=="undefined"}function Es(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return e.slice(0,7)==="[object"&&e.slice(-6)==="Array]"}function uo(t){return t!==null&&Object.prototype.toString.call(t)==="[object Object]"}const Aa=t=>(typeof t=="number"||t instanceof Number)&&isFinite(+t);function cp(t,e){return Aa(t)?t:e}function Hi(t,e){return typeof t=="undefined"?e:t}const Dnt=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100:t/e,Fse=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100*e:+t;function Vs(t,e,r){if(t&&typeof t.call=="function")return t.apply(r,e)}function Ss(t,e,r,n){let i,o,a;if(Es(t))if(o=t.length,n)for(i=o-1;i>=0;i--)e.call(r,t[i],i);else for(i=0;i<o;i++)e.call(r,t[i],i);else if(uo(t))for(a=Object.keys(t),o=a.length,i=0;i<o;i++)e.call(r,t[a[i]],a[i])}function H3(t,e){let r,n,i,o;if(!t||!e||t.length!==e.length)return!1;for(r=0,n=t.length;r<n;++r)if(i=t[r],o=e[r],i.datasetIndex!==o.datasetIndex||i.index!==o.index)return!1;return!0}function W3(t){if(Es(t))return t.map(W3);if(uo(t)){const e=Object.create(null),r=Object.keys(t),n=r.length;let i=0;for(;i<n;++i)e[r[i]]=W3(t[r[i]]);return e}return t}function zse(t){return["__proto__","prototype","constructor"].indexOf(t)===-1}function Nnt(t,e,r,n){if(!zse(t))return;const i=e[t],o=r[t];uo(i)&&uo(o)?WI(i,o,n):e[t]=W3(o)}function WI(t,e,r){const n=Es(e)?e:[e],i=n.length;if(!uo(t))return t;r=r||{};const o=r.merger||Nnt;for(let a=0;a<i;++a){if(e=n[a],!uo(e))continue;const s=Object.keys(e);for(let l=0,u=s.length;l<u;++l)o(s[l],t,e,r)}return t}function GI(t,e){return WI(t,e,{merger:$nt})}function $nt(t,e,r){if(!zse(t))return;const n=e[t],i=r[t];uo(n)&&uo(i)?GI(n,i):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=W3(i))}const Bse={"":t=>t,x:t=>t.x,y:t=>t.y};function Vx(t,e){return(Bse[e]||(Bse[e]=Fnt(e)))(t)}function Fnt(t){const e=znt(t);return r=>{for(const n of e){if(n==="")break;r=r&&r[n]}return r}}function znt(t){const e=t.split("."),r=[];let n="";for(const i of e)n+=i,n.endsWith("\\")?n=n.slice(0,-1)+".":(r.push(n),n="");return r}function eU(t){return t.charAt(0).toUpperCase()+t.slice(1)}const up=t=>typeof t!="undefined",Hx=t=>typeof t=="function",jse=(t,e)=>{if(t.size!==e.size)return!1;for(const r of t)if(!e.has(r))return!1;return!0};function Bnt(t){return t.type==="mouseup"||t.type==="click"||t.type==="contextmenu"}const Ra=Math.PI,ks=2*Ra,jnt=ks+Ra,G3=Number.POSITIVE_INFINITY,Unt=Ra/180,pl=Ra/2,qI=Ra/4,Use=Ra*2/3,fp=Math.log10,ev=Math.sign;function Vse(t){const e=Math.round(t);t=XI(t,e,t/1e3)?e:t;const r=Math.pow(10,Math.floor(fp(t))),n=t/r;return(n<=1?1:n<=2?2:n<=5?5:10)*r}function Vnt(t){const e=[],r=Math.sqrt(t);let n;for(n=1;n<r;n++)t%n==0&&(e.push(n),e.push(t/n));return r===(r|0)&&e.push(r),e.sort((i,o)=>i-o).pop(),e}function KC(t){return!isNaN(parseFloat(t))&&isFinite(t)}function XI(t,e,r){return Math.abs(t-e)<r}function Hnt(t,e){const r=Math.round(t);return r-e<=t&&r+e>=t}function Hse(t,e,r){let n,i,o;for(n=0,i=t.length;n<i;n++)o=t[n][r],isNaN(o)||(e.min=Math.min(e.min,o),e.max=Math.max(e.max,o))}function dp(t){return t*(Ra/180)}function tU(t){return t*(180/Ra)}function Wse(t){if(!Aa(t))return;let e=1,r=0;for(;Math.round(t*e)/e!==t;)e*=10,r++;return r}function Gse(t,e){const r=e.x-t.x,n=e.y-t.y,i=Math.sqrt(r*r+n*n);let o=Math.atan2(n,r);return o<-.5*Ra&&(o+=ks),{angle:o,distance:i}}function q3(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Wnt(t,e){return(t-e+jnt)%ks-Ra}function rh(t){return(t%ks+ks)%ks}function YI(t,e,r,n){const i=rh(t),o=rh(e),a=rh(r),s=rh(o-i),l=rh(a-i),u=rh(i-o),p=rh(i-a);return i===o||i===a||n&&o===a||s>l&&u<p}function wc(t,e,r){return Math.max(e,Math.min(r,t))}function Gnt(t){return wc(t,-32768,32767)}function Ty(t,e,r,n=1e-6){return t>=Math.min(e,r)-n&&t<=Math.max(e,r)+n}function rU(t,e,r){r=r||(a=>t[a]<e);let n=t.length-1,i=0,o;for(;n-i>1;)o=i+n>>1,r(o)?i=o:n=o;return{lo:i,hi:n}}const Py=(t,e,r,n)=>rU(t,r,n?i=>t[i][e]<=r:i=>t[i][e]<r),qnt=(t,e,r)=>rU(t,r,n=>t[n][e]>=r);function Xnt(t,e,r){let n=0,i=t.length;for(;n<i&&t[n]<e;)n++;for(;i>n&&t[i-1]>r;)i--;return n>0||i<t.length?t.slice(n,i):t}const qse=["push","pop","shift","splice","unshift"];function Ynt(t,e){if(t._chartjs){t._chartjs.listeners.push(e);return}Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),qse.forEach(r=>{const n="_onData"+eU(r),i=t[r];Object.defineProperty(t,r,{configurable:!0,enumerable:!1,value(...o){const a=i.apply(this,o);return t._chartjs.listeners.forEach(s=>{typeof s[n]=="function"&&s[n](...o)}),a}})})}function Xse(t,e){const r=t._chartjs;if(!r)return;const n=r.listeners,i=n.indexOf(e);i!==-1&&n.splice(i,1),!(n.length>0)&&(qse.forEach(o=>{delete t[o]}),delete t._chartjs)}function Yse(t){const e=new Set;let r,n;for(r=0,n=t.length;r<n;++r)e.add(t[r]);return e.size===n?t:Array.from(e)}const Kse=function(){return typeof window=="undefined"?function(t){return t()}:window.requestAnimationFrame}();function Zse(t,e,r){const n=r||(a=>Array.prototype.slice.call(a));let i=!1,o=[];return function(...a){o=n(a),i||(i=!0,Kse.call(window,()=>{i=!1,t.apply(e,o)}))}}function Knt(t,e){let r;return function(...n){return e?(clearTimeout(r),r=setTimeout(t,e,n)):t.apply(this,n),e}}const nU=t=>t==="start"?"left":t==="end"?"right":"center",Mu=(t,e,r)=>t==="start"?e:t==="end"?r:(e+r)/2,Znt=(t,e,r,n)=>t===(n?"left":"right")?r:t==="center"?(e+r)/2:e;function Qse(t,e,r){const n=e.length;let i=0,o=n;if(t._sorted){const{iScale:a,_parsed:s}=t,l=a.axis,{min:u,max:p,minDefined:m,maxDefined:v}=a.getUserBounds();m&&(i=wc(Math.min(Py(s,a.axis,u).lo,r?n:Py(e,l,a.getPixelForValue(u)).lo),0,n-1)),v?o=wc(Math.max(Py(s,a.axis,p,!0).hi+1,r?0:Py(e,l,a.getPixelForValue(p),!0).hi+1),i,n)-i:o=n-i}return{start:i,count:o}}function Jse(t){const{xScale:e,yScale:r,_scaleRanges:n}=t,i={xmin:e.min,xmax:e.max,ymin:r.min,ymax:r.max};if(!n)return t._scaleRanges=i,!0;const o=n.xmin!==e.min||n.xmax!==e.max||n.ymin!==r.min||n.ymax!==r.max;return Object.assign(n,i),o}const X3=t=>t===0||t===1,eae=(t,e,r)=>-(Math.pow(2,10*(t-=1))*Math.sin((t-e)*ks/r)),tae=(t,e,r)=>Math.pow(2,-10*t)*Math.sin((t-e)*ks/r)+1,KI={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>-Math.cos(t*pl)+1,easeOutSine:t=>Math.sin(t*pl),easeInOutSine:t=>-.5*(Math.cos(Ra*t)-1),easeInExpo:t=>t===0?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>t===1?1:-Math.pow(2,-10*t)+1,easeInOutExpo:t=>X3(t)?t:t<.5?.5*Math.pow(2,10*(t*2-1)):.5*(-Math.pow(2,-10*(t*2-1))+2),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>X3(t)?t:eae(t,.075,.3),easeOutElastic:t=>X3(t)?t:tae(t,.075,.3),easeInOutElastic(t){const e=.1125,r=.45;return X3(t)?t:t<.5?.5*eae(t*2,e,r):.5+.5*tae(t*2-1,e,r)},easeInBack(t){const e=1.70158;return t*t*((e+1)*t-e)},easeOutBack(t){const e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?.5*(t*t*(((e*=1.525)+1)*t-e)):.5*((t-=2)*t*(((e*=1.525)+1)*t+e)+2)},easeInBounce:t=>1-KI.easeOutBounce(1-t),easeOutBounce(t){const e=7.5625,r=2.75;return t<1/r?e*t*t:t<2/r?e*(t-=1.5/r)*t+.75:t<2.5/r?e*(t-=2.25/r)*t+.9375:e*(t-=2.625/r)*t+.984375},easeInOutBounce:t=>t<.5?KI.easeInBounce(t*2)*.5:KI.easeOutBounce(t*2-1)*.5+.5};/*! * @kurkle/color v0.2.1 * https://github.com/kurkle/color#readme * (c) 2022 Jukka Kurkela * Released under the MIT License */function ZI(t){return t+.5|0}const Wx=(t,e,r)=>Math.max(Math.min(t,r),e);function QI(t){return Wx(ZI(t*2.55),0,255)}function Gx(t){return Wx(ZI(t*255),0,255)}function Iy(t){return Wx(ZI(t/2.55)/100,0,1)}function rae(t){return Wx(ZI(t*100),0,100)}const hp={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},iU=[..."0123456789ABCDEF"],Qnt=t=>iU[t&15],Jnt=t=>iU[(t&240)>>4]+iU[t&15],Y3=t=>(t&240)>>4==(t&15),eit=t=>Y3(t.r)&&Y3(t.g)&&Y3(t.b)&&Y3(t.a);function tit(t){var e=t.length,r;return t[0]==="#"&&(e===4||e===5?r={r:255&hp[t[1]]*17,g:255&hp[t[2]]*17,b:255&hp[t[3]]*17,a:e===5?hp[t[4]]*17:255}:(e===7||e===9)&&(r={r:hp[t[1]]<<4|hp[t[2]],g:hp[t[3]]<<4|hp[t[4]],b:hp[t[5]]<<4|hp[t[6]],a:e===9?hp[t[7]]<<4|hp[t[8]]:255})),r}const rit=(t,e)=>t<255?e(t):"";function nit(t){var e=eit(t)?Qnt:Jnt;return t?"#"+e(t.r)+e(t.g)+e(t.b)+rit(t.a,e):void 0}const iit=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function nae(t,e,r){const n=e*Math.min(r,1-r),i=(o,a=(o+t/30)%12)=>r-n*Math.max(Math.min(a-3,9-a,1),-1);return[i(0),i(8),i(4)]}function oit(t,e,r){const n=(i,o=(i+t/60)%6)=>r-r*e*Math.max(Math.min(o,4-o,1),0);return[n(5),n(3),n(1)]}function sit(t,e,r){const n=nae(t,1,.5);let i;for(e+r>1&&(i=1/(e+r),e*=i,r*=i),i=0;i<3;i++)n[i]*=1-e-r,n[i]+=e;return n}function ait(t,e,r,n,i){return t===i?(e-r)/n+(e<r?6:0):e===i?(r-t)/n+2:(t-e)/n+4}function oU(t){const e=255,r=t.r/e,n=t.g/e,i=t.b/e,o=Math.max(r,n,i),a=Math.min(r,n,i),s=(o+a)/2;let l,u,p;return o!==a&&(p=o-a,u=s>.5?p/(2-o-a):p/(o+a),l=ait(r,n,i,p,o),l=l*60+.5),[l|0,u||0,s]}function sU(t,e,r,n){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,r,n)).map(Gx)}function aU(t,e,r){return sU(nae,t,e,r)}function lit(t,e,r){return sU(sit,t,e,r)}function cit(t,e,r){return sU(oit,t,e,r)}function iae(t){return(t%360+360)%360}function uit(t){const e=iit.exec(t);let r=255,n;if(!e)return;e[5]!==n&&(r=e[6]?QI(+e[5]):Gx(+e[5]));const i=iae(+e[2]),o=+e[3]/100,a=+e[4]/100;return e[1]==="hwb"?n=lit(i,o,a):e[1]==="hsv"?n=cit(i,o,a):n=aU(i,o,a),{r:n[0],g:n[1],b:n[2],a:r}}function fit(t,e){var r=oU(t);r[0]=iae(r[0]+e),r=aU(r),t.r=r[0],t.g=r[1],t.b=r[2]}function dit(t){if(!t)return;const e=oU(t),r=e[0],n=rae(e[1]),i=rae(e[2]);return t.a<255?`hsla(${r}, ${n}%, ${i}%, ${Iy(t.a)})`:`hsl(${r}, ${n}%, ${i}%)`}const oae={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},sae={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function hit(){const t={},e=Object.keys(sae),r=Object.keys(oae);let n,i,o,a,s;for(n=0;n<e.length;n++){for(a=s=e[n],i=0;i<r.length;i++)o=r[i],s=s.replace(o,oae[o]);o=parseInt(sae[a],16),t[s]=[o>>16&255,o>>8&255,o&255]}return t}let K3;function pit(t){K3||(K3=hit(),K3.transparent=[0,0,0,0]);const e=K3[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:e.length===4?e[3]:255}}const mit=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function git(t){const e=mit.exec(t);let r=255,n,i,o;if(!!e){if(e[7]!==n){const a=+e[7];r=e[8]?QI(a):Wx(a*255,0,255)}return n=+e[1],i=+e[3],o=+e[5],n=255&(e[2]?QI(n):Wx(n,0,255)),i=255&(e[4]?QI(i):Wx(i,0,255)),o=255&(e[6]?QI(o):Wx(o,0,255)),{r:n,g:i,b:o,a:r}}}function vit(t){return t&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${Iy(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`)}const lU=t=>t<=.0031308?t*12.92:Math.pow(t,1/2.4)*1.055-.055,ZC=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function yit(t,e,r){const n=ZC(Iy(t.r)),i=ZC(Iy(t.g)),o=ZC(Iy(t.b));return{r:Gx(lU(n+r*(ZC(Iy(e.r))-n))),g:Gx(lU(i+r*(ZC(Iy(e.g))-i))),b:Gx(lU(o+r*(ZC(Iy(e.b))-o))),a:t.a+r*(e.a-t.a)}}function Z3(t,e,r){if(t){let n=oU(t);n[e]=Math.max(0,Math.min(n[e]+n[e]*r,e===0?360:1)),n=aU(n),t.r=n[0],t.g=n[1],t.b=n[2]}}function aae(t,e){return t&&Object.assign(e||{},t)}function lae(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=Gx(t[3]))):(e=aae(t,{r:0,g:0,b:0,a:1}),e.a=Gx(e.a)),e}function xit(t){return t.charAt(0)==="r"?git(t):uit(t)}class Q3{constructor(e){if(e instanceof Q3)return e;const r=typeof e;let n;r==="object"?n=lae(e):r==="string"&&(n=tit(e)||pit(e)||xit(e)),this._rgb=n,this._valid=!!n}get valid(){return this._valid}get rgb(){var e=aae(this._rgb);return e&&(e.a=Iy(e.a)),e}set rgb(e){this._rgb=lae(e)}rgbString(){return this._valid?vit(this._rgb):void 0}hexString(){return this._valid?nit(this._rgb):void 0}hslString(){return this._valid?dit(this._rgb):void 0}mix(e,r){if(e){const n=this.rgb,i=e.rgb;let o;const a=r===o?.5:r,s=2*a-1,l=n.a-i.a,u=((s*l==-1?s:(s+l)/(1+s*l))+1)/2;o=1-u,n.r=255&u*n.r+o*i.r+.5,n.g=255&u*n.g+o*i.g+.5,n.b=255&u*n.b+o*i.b+.5,n.a=a*n.a+(1-a)*i.a,this.rgb=n}return this}interpolate(e,r){return e&&(this._rgb=yit(this._rgb,e._rgb,r)),this}clone(){return new Q3(this.rgb)}alpha(e){return this._rgb.a=Gx(e),this}clearer(e){const r=this._rgb;return r.a*=1-e,this}greyscale(){const e=this._rgb,r=ZI(e.r*.3+e.g*.59+e.b*.11);return e.r=e.g=e.b=r,this}opaquer(e){const r=this._rgb;return r.a*=1+e,this}negate(){const e=this._rgb;return e.r=255-e.r,e.g=255-e.g,e.b=255-e.b,this}lighten(e){return Z3(this._rgb,2,e),this}darken(e){return Z3(this._rgb,2,-e),this}saturate(e){return Z3(this._rgb,1,e),this}desaturate(e){return Z3(this._rgb,1,-e),this}rotate(e){return fit(this._rgb,e),this}}function cae(t){return new Q3(t)}function uae(t){if(t&&typeof t=="object"){const e=t.toString();return e==="[object CanvasPattern]"||e==="[object CanvasGradient]"}return!1}function fae(t){return uae(t)?t:cae(t)}function cU(t){return uae(t)?t:cae(t).saturate(.5).darken(.1).hexString()}const fb=Object.create(null),uU=Object.create(null);function JI(t,e){if(!e)return t;const r=e.split(".");for(let n=0,i=r.length;n<i;++n){const o=r[n];t=t[o]||(t[o]=Object.create(null))}return t}function fU(t,e,r){return typeof e=="string"?WI(JI(t,e),r):WI(JI(t,""),e)}class _it{constructor(e){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=r=>r.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(r,n)=>cU(n.backgroundColor),this.hoverBorderColor=(r,n)=>cU(n.borderColor),this.hoverColor=(r,n)=>cU(n.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(e)}set(e,r){return fU(this,e,r)}get(e){return JI(this,e)}describe(e,r){return fU(uU,e,r)}override(e,r){return fU(fb,e,r)}route(e,r,n,i){const o=JI(this,e),a=JI(this,n),s="_"+r;Object.defineProperties(o,{[s]:{value:o[r],writable:!0},[r]:{enumerable:!0,get(){const l=this[s],u=a[i];return uo(l)?Object.assign({},u,l):Hi(l,u)},set(l){this[s]=l}}})}}var ko=new _it({_scriptable:t=>!t.startsWith("on"),_indexable:t=>t!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}});function dae(t){return!t||Qo(t.size)||Qo(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}function J3(t,e,r,n,i){let o=e[i];return o||(o=e[i]=t.measureText(i).width,r.push(i)),o>n&&(n=o),n}function bit(t,e,r,n){n=n||{};let i=n.data=n.data||{},o=n.garbageCollect=n.garbageCollect||[];n.font!==e&&(i=n.data={},o=n.garbageCollect=[],n.font=e),t.save(),t.font=e;let a=0;const s=r.length;let l,u,p,m,v;for(l=0;l<s;l++)if(m=r[l],m!=null&&Es(m)!==!0)a=J3(t,i,o,a,m);else if(Es(m))for(u=0,p=m.length;u<p;u++)v=m[u],v!=null&&!Es(v)&&(a=J3(t,i,o,a,v));t.restore();const x=o.length/2;if(x>r.length){for(l=0;l<x;l++)delete i[o[l]];o.splice(0,x)}return a}function db(t,e,r){const n=t.currentDevicePixelRatio,i=r!==0?Math.max(r/2,.5):0;return Math.round((e-i)*n)/n+i}function hae(t,e){e=e||t.getContext("2d"),e.save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore()}function dU(t,e,r,n){pae(t,e,r,n,null)}function pae(t,e,r,n,i){let o,a,s,l,u,p;const m=e.pointStyle,v=e.rotation,x=e.radius;let y=(v||0)*Unt;if(m&&typeof m=="object"&&(o=m.toString(),o==="[object HTMLImageElement]"||o==="[object HTMLCanvasElement]")){t.save(),t.translate(r,n),t.rotate(y),t.drawImage(m,-m.width/2,-m.height/2,m.width,m.height),t.restore();return}if(!(isNaN(x)||x<=0)){switch(t.beginPath(),m){default:i?t.ellipse(r,n,i/2,x,0,0,ks):t.arc(r,n,x,0,ks),t.closePath();break;case"triangle":t.moveTo(r+Math.sin(y)*x,n-Math.cos(y)*x),y+=Use,t.lineTo(r+Math.sin(y)*x,n-Math.cos(y)*x),y+=Use,t.lineTo(r+Math.sin(y)*x,n-Math.cos(y)*x),t.closePath();break;case"rectRounded":u=x*.516,l=x-u,a=Math.cos(y+qI)*l,s=Math.sin(y+qI)*l,t.arc(r-a,n-s,u,y-Ra,y-pl),t.arc(r+s,n-a,u,y-pl,y),t.arc(r+a,n+s,u,y,y+pl),t.arc(r-s,n+a,u,y+pl,y+Ra),t.closePath();break;case"rect":if(!v){l=Math.SQRT1_2*x,p=i?i/2:l,t.rect(r-p,n-l,2*p,2*l);break}y+=qI;case"rectRot":a=Math.cos(y)*x,s=Math.sin(y)*x,t.moveTo(r-a,n-s),t.lineTo(r+s,n-a),t.lineTo(r+a,n+s),t.lineTo(r-s,n+a),t.closePath();break;case"crossRot":y+=qI;case"cross":a=Math.cos(y)*x,s=Math.sin(y)*x,t.moveTo(r-a,n-s),t.lineTo(r+a,n+s),t.moveTo(r+s,n-a),t.lineTo(r-s,n+a);break;case"star":a=Math.cos(y)*x,s=Math.sin(y)*x,t.moveTo(r-a,n-s),t.lineTo(r+a,n+s),t.moveTo(r+s,n-a),t.lineTo(r-s,n+a),y+=qI,a=Math.cos(y)*x,s=Math.sin(y)*x,t.moveTo(r-a,n-s),t.lineTo(r+a,n+s),t.moveTo(r+s,n-a),t.lineTo(r-s,n+a);break;case"line":a=i?i/2:Math.cos(y)*x,s=Math.sin(y)*x,t.moveTo(r-a,n-s),t.lineTo(r+a,n+s);break;case"dash":t.moveTo(r,n),t.lineTo(r+Math.cos(y)*x,n+Math.sin(y)*x);break}t.fill(),e.borderWidth>0&&t.stroke()}}function eM(t,e,r){return r=r||.5,!e||t&&t.x>e.left-r&&t.x<e.right+r&&t.y>e.top-r&&t.y<e.bottom+r}function tM(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()}function rM(t){t.restore()}function wit(t,e,r,n,i){if(!e)return t.lineTo(r.x,r.y);if(i==="middle"){const o=(e.x+r.x)/2;t.lineTo(o,e.y),t.lineTo(o,r.y)}else i==="after"!=!!n?t.lineTo(e.x,r.y):t.lineTo(r.x,e.y);t.lineTo(r.x,r.y)}function Cit(t,e,r,n){if(!e)return t.lineTo(r.x,r.y);t.bezierCurveTo(n?e.cp1x:e.cp2x,n?e.cp1y:e.cp2y,n?r.cp2x:r.cp1x,n?r.cp2y:r.cp1y,r.x,r.y)}function hb(t,e,r,n,i,o={}){const a=Es(e)?e:[e],s=o.strokeWidth>0&&o.strokeColor!=="";let l,u;for(t.save(),t.font=i.string,Eit(t,o),l=0;l<a.length;++l)u=a[l],s&&(o.strokeColor&&(t.strokeStyle=o.strokeColor),Qo(o.strokeWidth)||(t.lineWidth=o.strokeWidth),t.strokeText(u,r,n,o.maxWidth)),t.fillText(u,r,n,o.maxWidth),Sit(t,r,n,u,o),n+=i.lineHeight;t.restore()}function Eit(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]),Qo(e.rotation)||t.rotate(e.rotation),e.color&&(t.fillStyle=e.color),e.textAlign&&(t.textAlign=e.textAlign),e.textBaseline&&(t.textBaseline=e.textBaseline)}function Sit(t,e,r,n,i){if(i.strikethrough||i.underline){const o=t.measureText(n),a=e-o.actualBoundingBoxLeft,s=e+o.actualBoundingBoxRight,l=r-o.actualBoundingBoxAscent,u=r+o.actualBoundingBoxDescent,p=i.strikethrough?(l+u)/2:u;t.strokeStyle=t.fillStyle,t.beginPath(),t.lineWidth=i.decorationWidth||2,t.moveTo(a,p),t.lineTo(s,p),t.stroke()}}function nM(t,e){const{x:r,y:n,w:i,h:o,radius:a}=e;t.arc(r+a.topLeft,n+a.topLeft,a.topLeft,-pl,Ra,!0),t.lineTo(r,n+o-a.bottomLeft),t.arc(r+a.bottomLeft,n+o-a.bottomLeft,a.bottomLeft,Ra,pl,!0),t.lineTo(r+i-a.bottomRight,n+o),t.arc(r+i-a.bottomRight,n+o-a.bottomRight,a.bottomRight,pl,0,!0),t.lineTo(r+i,n+a.topRight),t.arc(r+i-a.topRight,n+a.topRight,a.topRight,0,-pl,!0),t.lineTo(r+a.topLeft,n)}const Tit=new RegExp(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/),Pit=new RegExp(/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/);function Iit(t,e){const r=(""+t).match(Tit);if(!r||r[1]==="normal")return e*1.2;switch(t=+r[2],r[3]){case"px":return t;case"%":t/=100;break}return e*t}const Mit=t=>+t||0;function hU(t,e){const r={},n=uo(e),i=n?Object.keys(e):e,o=uo(t)?n?a=>Hi(t[a],t[e[a]]):a=>t[a]:()=>t;for(const a of i)r[a]=Mit(o(a));return r}function mae(t){return hU(t,{top:"y",right:"x",bottom:"y",left:"x"})}function pb(t){return hU(t,["topLeft","topRight","bottomLeft","bottomRight"])}function Au(t){const e=mae(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function ec(t,e){t=t||{},e=e||ko.font;let r=Hi(t.size,e.size);typeof r=="string"&&(r=parseInt(r,10));let n=Hi(t.style,e.style);n&&!(""+n).match(Pit)&&(console.warn('Invalid font style specified: "'+n+'"'),n="");const i={family:Hi(t.family,e.family),lineHeight:Iit(Hi(t.lineHeight,e.lineHeight),r),size:r,style:n,weight:Hi(t.weight,e.weight),string:""};return i.string=dae(i),i}function iM(t,e,r,n){let i=!0,o,a,s;for(o=0,a=t.length;o<a;++o)if(s=t[o],s!==void 0&&(e!==void 0&&typeof s=="function"&&(s=s(e),i=!1),r!==void 0&&Es(s)&&(s=s[r%s.length],i=!1),s!==void 0))return n&&!i&&(n.cacheable=!1),s}function Ait(t,e,r){const{min:n,max:i}=t,o=Fse(e,(i-n)/2),a=(s,l)=>r&&s===0?0:s+l;return{min:a(n,-Math.abs(o)),max:a(i,o)}}function qx(t,e){return Object.assign(Object.create(t),e)}function pU(t,e=[""],r=t,n,i=()=>t[0]){up(n)||(n=_ae("_fallback",t));const o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:r,_fallback:n,_getTarget:i,override:a=>pU([a,...t],e,r,n)};return new Proxy(o,{deleteProperty(a,s){return delete a[s],delete a._keys,delete t[0][s],!0},get(a,s){return vae(a,s,()=>Fit(s,e,t,a))},getOwnPropertyDescriptor(a,s){return Reflect.getOwnPropertyDescriptor(a._scopes[0],s)},getPrototypeOf(){return Reflect.getPrototypeOf(t[0])},has(a,s){return bae(a).includes(s)},ownKeys(a){return bae(a)},set(a,s,l){const u=a._storage||(a._storage=i());return a[s]=u[s]=l,delete a._keys,!0}})}function QC(t,e,r,n){const i={_cacheable:!1,_proxy:t,_context:e,_subProxy:r,_stack:new Set,_descriptors:gae(t,n),setContext:o=>QC(t,o,r,n),override:o=>QC(t.override(o),e,r,n)};return new Proxy(i,{deleteProperty(o,a){return delete o[a],delete t[a],!0},get(o,a,s){return vae(o,a,()=>kit(o,a,s))},getOwnPropertyDescriptor(o,a){return o._descriptors.allKeys?Reflect.has(t,a)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,a)},getPrototypeOf(){return Reflect.getPrototypeOf(t)},has(o,a){return Reflect.has(t,a)},ownKeys(){return Reflect.ownKeys(t)},set(o,a,s){return t[a]=s,delete o[a],!0}})}function gae(t,e={scriptable:!0,indexable:!0}){const{_scriptable:r=e.scriptable,_indexable:n=e.indexable,_allKeys:i=e.allKeys}=t;return{allKeys:i,scriptable:r,indexable:n,isScriptable:Hx(r)?r:()=>r,isIndexable:Hx(n)?n:()=>n}}const Rit=(t,e)=>t?t+eU(e):e,mU=(t,e)=>uo(e)&&t!=="adapters"&&(Object.getPrototypeOf(e)===null||e.constructor===Object);function vae(t,e,r){if(Object.prototype.hasOwnProperty.call(t,e))return t[e];const n=r();return t[e]=n,n}function kit(t,e,r){const{_proxy:n,_context:i,_subProxy:o,_descriptors:a}=t;let s=n[e];return Hx(s)&&a.isScriptable(e)&&(s=Oit(e,s,t,r)),Es(s)&&s.length&&(s=Lit(e,s,t,a.isIndexable)),mU(e,s)&&(s=QC(s,i,o&&o[e],a)),s}function Oit(t,e,r,n){const{_proxy:i,_context:o,_subProxy:a,_stack:s}=r;if(s.has(t))throw new Error("Recursion detected: "+Array.from(s).join("->")+"->"+t);return s.add(t),e=e(o,a||n),s.delete(t),mU(t,e)&&(e=gU(i._scopes,i,t,e)),e}function Lit(t,e,r,n){const{_proxy:i,_context:o,_subProxy:a,_descriptors:s}=r;if(up(o.index)&&n(t))e=e[o.index%e.length];else if(uo(e[0])){const l=e,u=i._scopes.filter(p=>p!==l);e=[];for(const p of l){const m=gU(u,i,t,p);e.push(QC(m,o,a&&a[t],s))}}return e}function yae(t,e,r){return Hx(t)?t(e,r):t}const Dit=(t,e)=>t===!0?e:typeof t=="string"?Vx(e,t):void 0;function Nit(t,e,r,n,i){for(const o of e){const a=Dit(r,o);if(a){t.add(a);const s=yae(a._fallback,r,i);if(up(s)&&s!==r&&s!==n)return s}else if(a===!1&&up(n)&&r!==n)return null}return!1}function gU(t,e,r,n){const i=e._rootScopes,o=yae(e._fallback,r,n),a=[...t,...i],s=new Set;s.add(n);let l=xae(s,a,r,o||r,n);return l===null||up(o)&&o!==r&&(l=xae(s,a,o,l,n),l===null)?!1:pU(Array.from(s),[""],i,o,()=>$it(e,r,n))}function xae(t,e,r,n,i){for(;r;)r=Nit(t,e,r,n,i);return r}function $it(t,e,r){const n=t._getTarget();e in n||(n[e]={});const i=n[e];return Es(i)&&uo(r)?r:i}function Fit(t,e,r,n){let i;for(const o of e)if(i=_ae(Rit(o,t),r),up(i))return mU(t,i)?gU(r,n,t,i):i}function _ae(t,e){for(const r of e){if(!r)continue;const n=r[t];if(up(n))return n}}function bae(t){let e=t._keys;return e||(e=t._keys=zit(t._scopes)),e}function zit(t){const e=new Set;for(const r of t)for(const n of Object.keys(r).filter(i=>!i.startsWith("_")))e.add(n);return Array.from(e)}function wae(t,e,r,n){const{iScale:i}=t,{key:o="r"}=this._parsing,a=new Array(n);let s,l,u,p;for(s=0,l=n;s<l;++s)u=s+r,p=e[u],a[s]={r:i.parse(Vx(p,o),u)};return a}const Bit=Number.EPSILON||1e-14,JC=(t,e)=>e<t.length&&!t[e].skip&&t[e],Cae=t=>t==="x"?"y":"x";function jit(t,e,r,n){const i=t.skip?e:t,o=e,a=r.skip?e:r,s=q3(o,i),l=q3(a,o);let u=s/(s+l),p=l/(s+l);u=isNaN(u)?0:u,p=isNaN(p)?0:p;const m=n*u,v=n*p;return{previous:{x:o.x-m*(a.x-i.x),y:o.y-m*(a.y-i.y)},next:{x:o.x+v*(a.x-i.x),y:o.y+v*(a.y-i.y)}}}function Uit(t,e,r){const n=t.length;let i,o,a,s,l,u=JC(t,0);for(let p=0;p<n-1;++p)if(l=u,u=JC(t,p+1),!(!l||!u)){if(XI(e[p],0,Bit)){r[p]=r[p+1]=0;continue}i=r[p]/e[p],o=r[p+1]/e[p],s=Math.pow(i,2)+Math.pow(o,2),!(s<=9)&&(a=3/Math.sqrt(s),r[p]=i*a*e[p],r[p+1]=o*a*e[p])}}function Vit(t,e,r="x"){const n=Cae(r),i=t.length;let o,a,s,l=JC(t,0);for(let u=0;u<i;++u){if(a=s,s=l,l=JC(t,u+1),!s)continue;const p=s[r],m=s[n];a&&(o=(p-a[r])/3,s[`cp1${r}`]=p-o,s[`cp1${n}`]=m-o*e[u]),l&&(o=(l[r]-p)/3,s[`cp2${r}`]=p+o,s[`cp2${n}`]=m+o*e[u])}}function Hit(t,e="x"){const r=Cae(e),n=t.length,i=Array(n).fill(0),o=Array(n);let a,s,l,u=JC(t,0);for(a=0;a<n;++a)if(s=l,l=u,u=JC(t,a+1),!!l){if(u){const p=u[e]-l[e];i[a]=p!==0?(u[r]-l[r])/p:0}o[a]=s?u?ev(i[a-1])!==ev(i[a])?0:(i[a-1]+i[a])/2:i[a-1]:i[a]}Uit(t,i,o),Vit(t,o,e)}function eN(t,e,r){return Math.max(Math.min(t,r),e)}function Wit(t,e){let r,n,i,o,a,s=eM(t[0],e);for(r=0,n=t.length;r<n;++r)a=o,o=s,s=r<n-1&&eM(t[r+1],e),!!o&&(i=t[r],a&&(i.cp1x=eN(i.cp1x,e.left,e.right),i.cp1y=eN(i.cp1y,e.top,e.bottom)),s&&(i.cp2x=eN(i.cp2x,e.left,e.right),i.cp2y=eN(i.cp2y,e.top,e.bottom)))}function Git(t,e,r,n,i){let o,a,s,l;if(e.spanGaps&&(t=t.filter(u=>!u.skip)),e.cubicInterpolationMode==="monotone")Hit(t,i);else{let u=n?t[t.length-1]:t[0];for(o=0,a=t.length;o<a;++o)s=t[o],l=jit(u,s,t[Math.min(o+1,a-(n?0:1))%a],e.tension),s.cp1x=l.previous.x,s.cp1y=l.previous.y,s.cp2x=l.next.x,s.cp2y=l.next.y,u=s}e.capBezierPoints&&Wit(t,r)}function Eae(){return typeof window!="undefined"&&typeof document!="undefined"}function vU(t){let e=t.parentNode;return e&&e.toString()==="[object ShadowRoot]"&&(e=e.host),e}function tN(t,e,r){let n;return typeof t=="string"?(n=parseInt(t,10),t.indexOf("%")!==-1&&(n=n/100*e.parentNode[r])):n=t,n}const rN=t=>window.getComputedStyle(t,null);function qit(t,e){return rN(t).getPropertyValue(e)}const Xit=["top","right","bottom","left"];function mb(t,e,r){const n={};r=r?"-"+r:"";for(let i=0;i<4;i++){const o=Xit[i];n[o]=parseFloat(t[e+"-"+o+r])||0}return n.width=n.left+n.right,n.height=n.top+n.bottom,n}const Yit=(t,e,r)=>(t>0||e>0)&&(!r||!r.shadowRoot);function Kit(t,e){const r=t.touches,n=r&&r.length?r[0]:t,{offsetX:i,offsetY:o}=n;let a=!1,s,l;if(Yit(i,o,t.target))s=i,l=o;else{const u=e.getBoundingClientRect();s=n.clientX-u.left,l=n.clientY-u.top,a=!0}return{x:s,y:l,box:a}}function gb(t,e){if("native"in t)return t;const{canvas:r,currentDevicePixelRatio:n}=e,i=rN(r),o=i.boxSizing==="border-box",a=mb(i,"padding"),s=mb(i,"border","width"),{x:l,y:u,box:p}=Kit(t,r),m=a.left+(p&&s.left),v=a.top+(p&&s.top);let{width:x,height:y}=e;return o&&(x-=a.width+s.width,y-=a.height+s.height),{x:Math.round((l-m)/x*r.width/n),y:Math.round((u-v)/y*r.height/n)}}function Zit(t,e,r){let n,i;if(e===void 0||r===void 0){const o=vU(t);if(!o)e=t.clientWidth,r=t.clientHeight;else{const a=o.getBoundingClientRect(),s=rN(o),l=mb(s,"border","width"),u=mb(s,"padding");e=a.width-u.width-l.width,r=a.height-u.height-l.height,n=tN(s.maxWidth,o,"clientWidth"),i=tN(s.maxHeight,o,"clientHeight")}}return{width:e,height:r,maxWidth:n||G3,maxHeight:i||G3}}const yU=t=>Math.round(t*10)/10;function Qit(t,e,r,n){const i=rN(t),o=mb(i,"margin"),a=tN(i.maxWidth,t,"clientWidth")||G3,s=tN(i.maxHeight,t,"clientHeight")||G3,l=Zit(t,e,r);let{width:u,height:p}=l;if(i.boxSizing==="content-box"){const m=mb(i,"border","width"),v=mb(i,"padding");u-=v.width+m.width,p-=v.height+m.height}return u=Math.max(0,u-o.width),p=Math.max(0,n?Math.floor(u/n):p-o.height),u=yU(Math.min(u,a,l.maxWidth)),p=yU(Math.min(p,s,l.maxHeight)),u&&!p&&(p=yU(u/2)),{width:u,height:p}}function Sae(t,e,r){const n=e||1,i=Math.floor(t.height*n),o=Math.floor(t.width*n);t.height=i/n,t.width=o/n;const a=t.canvas;return a.style&&(r||!a.style.height&&!a.style.width)&&(a.style.height=`${t.height}px`,a.style.width=`${t.width}px`),t.currentDevicePixelRatio!==n||a.height!==i||a.width!==o?(t.currentDevicePixelRatio=n,a.height=i,a.width=o,t.ctx.setTransform(n,0,0,n,0,0),!0):!1}const Jit=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch{}return t}();function Tae(t,e){const r=qit(t,e),n=r&&r.match(/^(\d+)(\.\d+)?px$/);return n?+n[1]:void 0}function vb(t,e,r,n){return{x:t.x+r*(e.x-t.x),y:t.y+r*(e.y-t.y)}}function eot(t,e,r,n){return{x:t.x+r*(e.x-t.x),y:n==="middle"?r<.5?t.y:e.y:n==="after"?r<1?t.y:e.y:r>0?e.y:t.y}}function tot(t,e,r,n){const i={x:t.cp2x,y:t.cp2y},o={x:e.cp1x,y:e.cp1y},a=vb(t,i,r),s=vb(i,o,r),l=vb(o,e,r),u=vb(a,s,r),p=vb(s,l,r);return vb(u,p,r)}const Pae=new Map;function rot(t,e){e=e||{};const r=t+JSON.stringify(e);let n=Pae.get(r);return n||(n=new Intl.NumberFormat(t,e),Pae.set(r,n)),n}function oM(t,e,r){return rot(e,r).format(t)}const not=function(t,e){return{x(r){return t+t+e-r},setWidth(r){e=r},textAlign(r){return r==="center"?r:r==="right"?"left":"right"},xPlus(r,n){return r-n},leftForLtr(r,n){return r-n}}},iot=function(){return{x(t){return t},setWidth(t){},textAlign(t){return t},xPlus(t,e){return t+e},leftForLtr(t,e){return t}}};function eE(t,e,r){return t?not(e,r):iot()}function Iae(t,e){let r,n;(e==="ltr"||e==="rtl")&&(r=t.canvas.style,n=[r.getPropertyValue("direction"),r.getPropertyPriority("direction")],r.setProperty("direction",e,"important"),t.prevTextDirection=n)}function Mae(t,e){e!==void 0&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function Aae(t){return t==="angle"?{between:YI,compare:Wnt,normalize:rh}:{between:Ty,compare:(e,r)=>e-r,normalize:e=>e}}function Rae({start:t,end:e,count:r,loop:n,style:i}){return{start:t%r,end:e%r,loop:n&&(e-t+1)%r==0,style:i}}function oot(t,e,r){const{property:n,start:i,end:o}=r,{between:a,normalize:s}=Aae(n),l=e.length;let{start:u,end:p,loop:m}=t,v,x;if(m){for(u+=l,p+=l,v=0,x=l;v<x&&a(s(e[u%l][n]),i,o);++v)u--,p--;u%=l,p%=l}return p<u&&(p+=l),{start:u,end:p,loop:m,style:t.style}}function kae(t,e,r){if(!r)return[t];const{property:n,start:i,end:o}=r,a=e.length,{compare:s,between:l,normalize:u}=Aae(n),{start:p,end:m,loop:v,style:x}=oot(t,e,r),y=[];let _=!1,w=null,C,E,T;const A=()=>l(i,T,C)&&s(i,T)!==0,k=()=>s(o,C)===0||l(o,T,C),X=()=>_||A(),Z=()=>!_||k();for(let W=p,D=p;W<=m;++W)E=e[W%a],!E.skip&&(C=u(E[n]),C!==T&&(_=l(C,i,o),w===null&&X()&&(w=s(C,i)===0?W:D),w!==null&&Z()&&(y.push(Rae({start:w,end:W,loop:v,count:a,style:x})),w=null),D=W,T=C));return w!==null&&y.push(Rae({start:w,end:m,loop:v,count:a,style:x})),y}function Oae(t,e){const r=[],n=t.segments;for(let i=0;i<n.length;i++){const o=kae(n[i],t.points,e);o.length&&r.push(...o)}return r}function sot(t,e,r,n){let i=0,o=e-1;if(r&&!n)for(;i<e&&!t[i].skip;)i++;for(;i<e&&t[i].skip;)i++;for(i%=e,r&&(o+=i);o>i&&t[o%e].skip;)o--;return o%=e,{start:i,end:o}}function aot(t,e,r,n){const i=t.length,o=[];let a=e,s=t[e],l;for(l=e+1;l<=r;++l){const u=t[l%i];u.skip||u.stop?s.skip||(n=!1,o.push({start:e%i,end:(l-1)%i,loop:n}),e=a=u.stop?l:null):(a=l,s.skip&&(e=l)),s=u}return a!==null&&o.push({start:e%i,end:a%i,loop:n}),o}function lot(t,e){const r=t.points,n=t.options.spanGaps,i=r.length;if(!i)return[];const o=!!t._loop,{start:a,end:s}=sot(r,i,o,n);if(n===!0)return Lae(t,[{start:a,end:s,loop:o}],r,e);const l=s<a?s+i:s,u=!!t._fullLoop&&a===0&&s===i-1;return Lae(t,aot(r,a,l,u),r,e)}function Lae(t,e,r,n){return!n||!n.setContext||!r?e:cot(t,e,r,n)}function cot(t,e,r,n){const i=t._chart.getContext(),o=Dae(t.options),{_datasetIndex:a,options:{spanGaps:s}}=t,l=r.length,u=[];let p=o,m=e[0].start,v=m;function x(y,_,w,C){const E=s?-1:1;if(y!==_){for(y+=l;r[y%l].skip;)y-=E;for(;r[_%l].skip;)_+=E;y%l!=_%l&&(u.push({start:y%l,end:_%l,loop:w,style:C}),p=C,m=_%l)}}for(const y of e){m=s?m:y.start;let _=r[m%l],w;for(v=m+1;v<=y.end;v++){const C=r[v%l];w=Dae(n.setContext(qx(i,{type:"segment",p0:_,p1:C,p0DataIndex:(v-1)%l,p1DataIndex:v%l,datasetIndex:a}))),uot(w,p)&&x(m,v-1,y.loop,p),_=C,p=w}m<v-1&&x(m,v-1,y.loop,p)}return u}function Dae(t){return{backgroundColor:t.backgroundColor,borderCapStyle:t.borderCapStyle,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderJoinStyle:t.borderJoinStyle,borderWidth:t.borderWidth,borderColor:t.borderColor}}function uot(t,e){return e&&JSON.stringify(t)!==JSON.stringify(e)}/*! * Chart.js v3.9.1 * https://www.chartjs.org * (c) 2022 Chart.js Contributors * Released under the MIT License */class fot{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,r,n,i){const o=r.listeners[i],a=r.duration;o.forEach(s=>s({chart:e,initial:r.initial,numSteps:a,currentStep:Math.min(n-r.start,a)}))}_refresh(){this._request||(this._running=!0,this._request=Kse.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let r=0;this._charts.forEach((n,i)=>{if(!n.running||!n.items.length)return;const o=n.items;let a=o.length-1,s=!1,l;for(;a>=0;--a)l=o[a],l._active?(l._total>n.duration&&(n.duration=l._total),l.tick(e),s=!0):(o[a]=o[o.length-1],o.pop());s&&(i.draw(),this._notify(i,n,e,"progress")),o.length||(n.running=!1,this._notify(i,n,e,"complete"),n.initial=!1),r+=o.length}),this._lastDate=e,r===0&&(this._running=!1)}_getAnims(e){const r=this._charts;let n=r.get(e);return n||(n={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},r.set(e,n)),n}listen(e,r,n){this._getAnims(e).listeners[r].push(n)}add(e,r){!r||!r.length||this._getAnims(e).items.push(...r)}has(e){return this._getAnims(e).items.length>0}start(e){const r=this._charts.get(e);!r||(r.running=!0,r.start=Date.now(),r.duration=r.items.reduce((n,i)=>Math.max(n,i._duration),0),this._refresh())}running(e){if(!this._running)return!1;const r=this._charts.get(e);return!(!r||!r.running||!r.items.length)}stop(e){const r=this._charts.get(e);if(!r||!r.items.length)return;const n=r.items;let i=n.length-1;for(;i>=0;--i)n[i].cancel();r.items=[],this._notify(e,r,Date.now(),"complete")}remove(e){return this._charts.delete(e)}}var My=new fot;const Nae="transparent",dot={boolean(t,e,r){return r>.5?e:t},color(t,e,r){const n=fae(t||Nae),i=n.valid&&fae(e||Nae);return i&&i.valid?i.mix(n,r).hexString():e},number(t,e,r){return t+(e-t)*r}};class hot{constructor(e,r,n,i){const o=r[n];i=iM([e.to,i,o,e.from]);const a=iM([e.from,o,i]);this._active=!0,this._fn=e.fn||dot[e.type||typeof a],this._easing=KI[e.easing]||KI.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=r,this._prop=n,this._from=a,this._to=i,this._promises=void 0}active(){return this._active}update(e,r,n){if(this._active){this._notify(!1);const i=this._target[this._prop],o=n-this._start,a=this._duration-o;this._start=n,this._duration=Math.floor(Math.max(a,e.duration)),this._total+=o,this._loop=!!e.loop,this._to=iM([e.to,r,i,e.from]),this._from=iM([e.from,i,r])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){const r=e-this._start,n=this._duration,i=this._prop,o=this._from,a=this._loop,s=this._to;let l;if(this._active=o!==s&&(a||r<n),!this._active){this._target[i]=s,this._notify(!0);return}if(r<0){this._target[i]=o;return}l=r/n%2,l=a&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[i]=this._fn(o,s,l)}wait(){const e=this._promises||(this._promises=[]);return new Promise((r,n)=>{e.push({res:r,rej:n})})}_notify(e){const r=e?"res":"rej",n=this._promises||[];for(let i=0;i<n.length;i++)n[i][r]()}}const pot=["x","y","borderWidth","radius","tension"],mot=["color","borderColor","backgroundColor"];ko.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0});const got=Object.keys(ko.animation);ko.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"});ko.set("animations",{colors:{type:"color",properties:mot},numbers:{type:"number",properties:pot}});ko.describe("animations",{_fallback:"animation"});ko.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>t|0}}}});class xU{constructor(e,r){this._chart=e,this._properties=new Map,this.configure(r)}configure(e){if(!uo(e))return;const r=this._properties;Object.getOwnPropertyNames(e).forEach(n=>{const i=e[n];if(!uo(i))return;const o={};for(const a of got)o[a]=i[a];(Es(i.properties)&&i.properties||[n]).forEach(a=>{(a===n||!r.has(a))&&r.set(a,o)})})}_animateOptions(e,r){const n=r.options,i=yot(e,n);if(!i)return[];const o=this._createAnimations(i,n);return n.$shared&&vot(e.options.$animations,n).then(()=>{e.options=n},()=>{}),o}_createAnimations(e,r){const n=this._properties,i=[],o=e.$animations||(e.$animations={}),a=Object.keys(r),s=Date.now();let l;for(l=a.length-1;l>=0;--l){const u=a[l];if(u.charAt(0)==="$")continue;if(u==="options"){i.push(...this._animateOptions(e,r));continue}const p=r[u];let m=o[u];const v=n.get(u);if(m)if(v&&m.active()){m.update(v,p,s);continue}else m.cancel();if(!v||!v.duration){e[u]=p;continue}o[u]=m=new hot(v,e,u,p),i.push(m)}return i}update(e,r){if(this._properties.size===0){Object.assign(e,r);return}const n=this._createAnimations(e,r);if(n.length)return My.add(this._chart,n),!0}}function vot(t,e){const r=[],n=Object.keys(e);for(let i=0;i<n.length;i++){const o=t[n[i]];o&&o.active()&&r.push(o.wait())}return Promise.all(r)}function yot(t,e){if(!e)return;let r=t.options;if(!r){t.options=e;return}return r.$shared&&(t.options=r=Object.assign({},r,{$shared:!1,$animations:{}})),r}function $ae(t,e){const r=t&&t.options||{},n=r.reverse,i=r.min===void 0?e:0,o=r.max===void 0?e:0;return{start:n?o:i,end:n?i:o}}function xot(t,e,r){if(r===!1)return!1;const n=$ae(t,r),i=$ae(e,r);return{top:i.end,right:n.end,bottom:i.start,left:n.start}}function _ot(t){let e,r,n,i;return uo(t)?(e=t.top,r=t.right,n=t.bottom,i=t.left):e=r=n=i=t,{top:e,right:r,bottom:n,left:i,disabled:t===!1}}function Fae(t,e){const r=[],n=t._getSortedDatasetMetas(e);let i,o;for(i=0,o=n.length;i<o;++i)r.push(n[i].index);return r}function zae(t,e,r,n={}){const i=t.keys,o=n.mode==="single";let a,s,l,u;if(e!==null){for(a=0,s=i.length;a<s;++a){if(l=+i[a],l===r){if(n.all)continue;break}u=t.values[l],Aa(u)&&(o||e===0||ev(e)===ev(u))&&(e+=u)}return e}}function bot(t){const e=Object.keys(t),r=new Array(e.length);let n,i,o;for(n=0,i=e.length;n<i;++n)o=e[n],r[n]={x:o,y:t[o]};return r}function Bae(t,e){const r=t&&t.options.stacked;return r||r===void 0&&e.stack!==void 0}function wot(t,e,r){return`${t.id}.${e.id}.${r.stack||r.type}`}function Cot(t){const{min:e,max:r,minDefined:n,maxDefined:i}=t.getUserBounds();return{min:n?e:Number.NEGATIVE_INFINITY,max:i?r:Number.POSITIVE_INFINITY}}function Eot(t,e,r){const n=t[e]||(t[e]={});return n[r]||(n[r]={})}function jae(t,e,r,n){for(const i of e.getMatchingVisibleMetas(n).reverse()){const o=t[i.index];if(r&&o>0||!r&&o<0)return i.index}return null}function Uae(t,e){const{chart:r,_cachedMeta:n}=t,i=r._stacks||(r._stacks={}),{iScale:o,vScale:a,index:s}=n,l=o.axis,u=a.axis,p=wot(o,a,n),m=e.length;let v;for(let x=0;x<m;++x){const y=e[x],{[l]:_,[u]:w}=y,C=y._stacks||(y._stacks={});v=C[u]=Eot(i,p,_),v[s]=w,v._top=jae(v,a,!0,n.type),v._bottom=jae(v,a,!1,n.type)}}function _U(t,e){const r=t.scales;return Object.keys(r).filter(n=>r[n].axis===e).shift()}function Sot(t,e){return qx(t,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function Tot(t,e,r){return qx(t,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:r,index:e,mode:"default",type:"data"})}function sM(t,e){const r=t.controller.index,n=t.vScale&&t.vScale.axis;if(!!n){e=e||t._parsed;for(const i of e){const o=i._stacks;if(!o||o[n]===void 0||o[n][r]===void 0)return;delete o[n][r]}}}const bU=t=>t==="reset"||t==="none",Vae=(t,e)=>e?t:Object.assign({},t),Pot=(t,e,r)=>t&&!e.hidden&&e._stacked&&{keys:Fae(r,!0),values:null};class Dm{constructor(e,r){this.chart=e,this._ctx=e.ctx,this.index=r,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.initialize()}initialize(){const e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=Bae(e.vScale,e),this.addElements()}updateIndex(e){this.index!==e&&sM(this._cachedMeta),this.index=e}linkScales(){const e=this.chart,r=this._cachedMeta,n=this.getDataset(),i=(m,v,x,y)=>m==="x"?v:m==="r"?y:x,o=r.xAxisID=Hi(n.xAxisID,_U(e,"x")),a=r.yAxisID=Hi(n.yAxisID,_U(e,"y")),s=r.rAxisID=Hi(n.rAxisID,_U(e,"r")),l=r.indexAxis,u=r.iAxisID=i(l,o,a,s),p=r.vAxisID=i(l,a,o,s);r.xScale=this.getScaleForId(o),r.yScale=this.getScaleForId(a),r.rScale=this.getScaleForId(s),r.iScale=this.getScaleForId(u),r.vScale=this.getScaleForId(p)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(e){return this.chart.scales[e]}_getOtherScale(e){const r=this._cachedMeta;return e===r.iScale?r.vScale:r.iScale}reset(){this._update("reset")}_destroy(){const e=this._cachedMeta;this._data&&Xse(this._data,this),e._stacked&&sM(e)}_dataCheck(){const e=this.getDataset(),r=e.data||(e.data=[]),n=this._data;if(uo(r))this._data=bot(r);else if(n!==r){if(n){Xse(n,this);const i=this._cachedMeta;sM(i),i._parsed=[]}r&&Object.isExtensible(r)&&Ynt(r,this),this._syncList=[],this._data=r}}addElements(){const e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}buildOrUpdateElements(e){const r=this._cachedMeta,n=this.getDataset();let i=!1;this._dataCheck();const o=r._stacked;r._stacked=Bae(r.vScale,r),r.stack!==n.stack&&(i=!0,sM(r),r.stack=n.stack),this._resyncElements(e),(i||o!==r._stacked)&&Uae(this,r._parsed)}configure(){const e=this.chart.config,r=e.datasetScopeKeys(this._type),n=e.getOptionScopes(this.getDataset(),r,!0);this.options=e.createResolver(n,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,r){const{_cachedMeta:n,_data:i}=this,{iScale:o,_stacked:a}=n,s=o.axis;let l=e===0&&r===i.length?!0:n._sorted,u=e>0&&n._parsed[e-1],p,m,v;if(this._parsing===!1)n._parsed=i,n._sorted=!0,v=i;else{Es(i[e])?v=this.parseArrayData(n,i,e,r):uo(i[e])?v=this.parseObjectData(n,i,e,r):v=this.parsePrimitiveData(n,i,e,r);const x=()=>m[s]===null||u&&m[s]<u[s];for(p=0;p<r;++p)n._parsed[p+e]=m=v[p],l&&(x()&&(l=!1),u=m);n._sorted=l}a&&Uae(this,v)}parsePrimitiveData(e,r,n,i){const{iScale:o,vScale:a}=e,s=o.axis,l=a.axis,u=o.getLabels(),p=o===a,m=new Array(i);let v,x,y;for(v=0,x=i;v<x;++v)y=v+n,m[v]={[s]:p||o.parse(u[y],y),[l]:a.parse(r[y],y)};return m}parseArrayData(e,r,n,i){const{xScale:o,yScale:a}=e,s=new Array(i);let l,u,p,m;for(l=0,u=i;l<u;++l)p=l+n,m=r[p],s[l]={x:o.parse(m[0],p),y:a.parse(m[1],p)};return s}parseObjectData(e,r,n,i){const{xScale:o,yScale:a}=e,{xAxisKey:s="x",yAxisKey:l="y"}=this._parsing,u=new Array(i);let p,m,v,x;for(p=0,m=i;p<m;++p)v=p+n,x=r[v],u[p]={x:o.parse(Vx(x,s),v),y:a.parse(Vx(x,l),v)};return u}getParsed(e){return this._cachedMeta._parsed[e]}getDataElement(e){return this._cachedMeta.data[e]}applyStack(e,r,n){const i=this.chart,o=this._cachedMeta,a=r[e.axis],s={keys:Fae(i,!0),values:r._stacks[e.axis]};return zae(s,a,o.index,{mode:n})}updateRangeFromParsed(e,r,n,i){const o=n[r.axis];let a=o===null?NaN:o;const s=i&&n._stacks[r.axis];i&&s&&(i.values=s,a=zae(i,o,this._cachedMeta.index)),e.min=Math.min(e.min,a),e.max=Math.max(e.max,a)}getMinMax(e,r){const n=this._cachedMeta,i=n._parsed,o=n._sorted&&e===n.iScale,a=i.length,s=this._getOtherScale(e),l=Pot(r,n,this.chart),u={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:p,max:m}=Cot(s);let v,x;function y(){x=i[v];const _=x[s.axis];return!Aa(x[e.axis])||p>_||m<_}for(v=0;v<a&&!(!y()&&(this.updateRangeFromParsed(u,e,x,l),o));++v);if(o){for(v=a-1;v>=0;--v)if(!y()){this.updateRangeFromParsed(u,e,x,l);break}}return u}getAllParsedValues(e){const r=this._cachedMeta._parsed,n=[];let i,o,a;for(i=0,o=r.length;i<o;++i)a=r[i][e.axis],Aa(a)&&n.push(a);return n}getMaxOverflow(){return!1}getLabelAndValue(e){const r=this._cachedMeta,n=r.iScale,i=r.vScale,o=this.getParsed(e);return{label:n?""+n.getLabelForValue(o[n.axis]):"",value:i?""+i.getLabelForValue(o[i.axis]):""}}_update(e){const r=this._cachedMeta;this.update(e||"default"),r._clip=_ot(Hi(this.options.clip,xot(r.xScale,r.yScale,this.getMaxOverflow())))}update(e){}draw(){const e=this._ctx,r=this.chart,n=this._cachedMeta,i=n.data||[],o=r.chartArea,a=[],s=this._drawStart||0,l=this._drawCount||i.length-s,u=this.options.drawActiveElementsOnTop;let p;for(n.dataset&&n.dataset.draw(e,o,s,l),p=s;p<s+l;++p){const m=i[p];m.hidden||(m.active&&u?a.push(m):m.draw(e,o))}for(p=0;p<a.length;++p)a[p].draw(e,o)}getStyle(e,r){const n=r?"active":"default";return e===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(n):this.resolveDataElementOptions(e||0,n)}getContext(e,r,n){const i=this.getDataset();let o;if(e>=0&&e<this._cachedMeta.data.length){const a=this._cachedMeta.data[e];o=a.$context||(a.$context=Tot(this.getContext(),e,a)),o.parsed=this.getParsed(e),o.raw=i.data[e],o.index=o.dataIndex=e}else o=this.$context||(this.$context=Sot(this.chart.getContext(),this.index)),o.dataset=i,o.index=o.datasetIndex=this.index;return o.active=!!r,o.mode=n,o}resolveDatasetElementOptions(e){return this._resolveElementOptions(this.datasetElementType.id,e)}resolveDataElementOptions(e,r){return this._resolveElementOptions(this.dataElementType.id,r,e)}_resolveElementOptions(e,r="default",n){const i=r==="active",o=this._cachedDataOpts,a=e+"-"+r,s=o[a],l=this.enableOptionSharing&&up(n);if(s)return Vae(s,l);const u=this.chart.config,p=u.datasetElementScopeKeys(this._type,e),m=i?[`${e}Hover`,"hover",e,""]:[e,""],v=u.getOptionScopes(this.getDataset(),p),x=Object.keys(ko.elements[e]),y=()=>this.getContext(n,i),_=u.resolveNamedOptions(v,x,y,m);return _.$shared&&(_.$shared=l,o[a]=Object.freeze(Vae(_,l))),_}_resolveAnimations(e,r,n){const i=this.chart,o=this._cachedDataOpts,a=`animation-${r}`,s=o[a];if(s)return s;let l;if(i.options.animation!==!1){const p=this.chart.config,m=p.datasetAnimationScopeKeys(this._type,r),v=p.getOptionScopes(this.getDataset(),m);l=p.createResolver(v,this.getContext(e,n,r))}const u=new xU(i,l&&l.animations);return l&&l._cacheable&&(o[a]=Object.freeze(u)),u}getSharedOptions(e){if(!!e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,r){return!r||bU(e)||this.chart._animationsDisabled}_getSharedOptions(e,r){const n=this.resolveDataElementOptions(e,r),i=this._sharedOptions,o=this.getSharedOptions(n),a=this.includeOptions(r,o)||o!==i;return this.updateSharedOptions(o,r,n),{sharedOptions:o,includeOptions:a}}updateElement(e,r,n,i){bU(i)?Object.assign(e,n):this._resolveAnimations(r,i).update(e,n)}updateSharedOptions(e,r,n){e&&!bU(r)&&this._resolveAnimations(void 0,r).update(e,n)}_setStyle(e,r,n,i){e.active=i;const o=this.getStyle(r,i);this._resolveAnimations(r,n,i).update(e,{options:!i&&this.getSharedOptions(o)||o})}removeHoverStyle(e,r,n){this._setStyle(e,n,"active",!1)}setHoverStyle(e,r,n){this._setStyle(e,n,"active",!0)}_removeDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!1)}_setDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!0)}_resyncElements(e){const r=this._data,n=this._cachedMeta.data;for(const[s,l,u]of this._syncList)this[s](l,u);this._syncList=[];const i=n.length,o=r.length,a=Math.min(o,i);a&&this.parse(0,a),o>i?this._insertElements(i,o-i,e):o<i&&this._removeElements(o,i-o)}_insertElements(e,r,n=!0){const i=this._cachedMeta,o=i.data,a=e+r;let s;const l=u=>{for(u.length+=r,s=u.length-1;s>=a;s--)u[s]=u[s-r]};for(l(o),s=e;s<a;++s)o[s]=new this.dataElementType;this._parsing&&l(i._parsed),this.parse(e,r),n&&this.updateElements(o,e,r,"reset")}updateElements(e,r,n,i){}_removeElements(e,r){const n=this._cachedMeta;if(this._parsing){const i=n._parsed.splice(e,r);n._stacked&&sM(n,i)}n.data.splice(e,r)}_sync(e){if(this._parsing)this._syncList.push(e);else{const[r,n,i]=e;this[r](n,i)}this.chart._dataChanges.push([this.index,...e])}_onDataPush(){const e=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-e,e])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(e,r){r&&this._sync(["_removeElements",e,r]);const n=arguments.length-2;n&&this._sync(["_insertElements",e,n])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}Dm.defaults={};Dm.prototype.datasetElementType=null;Dm.prototype.dataElementType=null;function Iot(t,e){if(!t._cache.$bar){const r=t.getMatchingVisibleMetas(e);let n=[];for(let i=0,o=r.length;i<o;i++)n=n.concat(r[i].controller.getAllParsedValues(t));t._cache.$bar=Yse(n.sort((i,o)=>i-o))}return t._cache.$bar}function Mot(t){const e=t.iScale,r=Iot(e,t.type);let n=e._length,i,o,a,s;const l=()=>{a===32767||a===-32768||(up(s)&&(n=Math.min(n,Math.abs(a-s)||n)),s=a)};for(i=0,o=r.length;i<o;++i)a=e.getPixelForValue(r[i]),l();for(s=void 0,i=0,o=e.ticks.length;i<o;++i)a=e.getPixelForTick(i),l();return n}function Aot(t,e,r,n){const i=r.barThickness;let o,a;return Qo(i)?(o=e.min*r.categoryPercentage,a=r.barPercentage):(o=i*n,a=1),{chunk:o/n,ratio:a,start:e.pixels[t]-o/2}}function Rot(t,e,r,n){const i=e.pixels,o=i[t];let a=t>0?i[t-1]:null,s=t<i.length-1?i[t+1]:null;const l=r.categoryPercentage;a===null&&(a=o-(s===null?e.end-e.start:s-o)),s===null&&(s=o+o-a);const u=o-(o-Math.min(a,s))/2*l;return{chunk:Math.abs(s-a)/2*l/n,ratio:r.barPercentage,start:u}}function kot(t,e,r,n){const i=r.parse(t[0],n),o=r.parse(t[1],n),a=Math.min(i,o),s=Math.max(i,o);let l=a,u=s;Math.abs(a)>Math.abs(s)&&(l=s,u=a),e[r.axis]=u,e._custom={barStart:l,barEnd:u,start:i,end:o,min:a,max:s}}function Hae(t,e,r,n){return Es(t)?kot(t,e,r,n):e[r.axis]=r.parse(t,n),e}function Wae(t,e,r,n){const i=t.iScale,o=t.vScale,a=i.getLabels(),s=i===o,l=[];let u,p,m,v;for(u=r,p=r+n;u<p;++u)v=e[u],m={},m[i.axis]=s||i.parse(a[u],u),l.push(Hae(v,m,o,u));return l}function wU(t){return t&&t.barStart!==void 0&&t.barEnd!==void 0}function Oot(t,e,r){return t!==0?ev(t):(e.isHorizontal()?1:-1)*(e.min>=r?1:-1)}function Lot(t){let e,r,n,i,o;return t.horizontal?(e=t.base>t.x,r="left",n="right"):(e=t.base<t.y,r="bottom",n="top"),e?(i="end",o="start"):(i="start",o="end"),{start:r,end:n,reverse:e,top:i,bottom:o}}function Dot(t,e,r,n){let i=e.borderSkipped;const o={};if(!i){t.borderSkipped=o;return}if(i===!0){t.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:a,end:s,reverse:l,top:u,bottom:p}=Lot(t);i==="middle"&&r&&(t.enableBorderRadius=!0,(r._top||0)===n?i=u:(r._bottom||0)===n?i=p:(o[Gae(p,a,s,l)]=!0,i=u)),o[Gae(i,a,s,l)]=!0,t.borderSkipped=o}function Gae(t,e,r,n){return n?(t=Not(t,e,r),t=qae(t,r,e)):t=qae(t,e,r),t}function Not(t,e,r){return t===e?r:t===r?e:t}function qae(t,e,r){return t==="start"?e:t==="end"?r:t}function $ot(t,{inflateAmount:e},r){t.inflateAmount=e==="auto"?r===1?.33:0:e}class nN extends Dm{parsePrimitiveData(e,r,n,i){return Wae(e,r,n,i)}parseArrayData(e,r,n,i){return Wae(e,r,n,i)}parseObjectData(e,r,n,i){const{iScale:o,vScale:a}=e,{xAxisKey:s="x",yAxisKey:l="y"}=this._parsing,u=o.axis==="x"?s:l,p=a.axis==="x"?s:l,m=[];let v,x,y,_;for(v=n,x=n+i;v<x;++v)_=r[v],y={},y[o.axis]=o.parse(Vx(_,u),v),m.push(Hae(Vx(_,p),y,a,v));return m}updateRangeFromParsed(e,r,n,i){super.updateRangeFromParsed(e,r,n,i);const o=n._custom;o&&r===this._cachedMeta.vScale&&(e.min=Math.min(e.min,o.min),e.max=Math.max(e.max,o.max))}getMaxOverflow(){return 0}getLabelAndValue(e){const r=this._cachedMeta,{iScale:n,vScale:i}=r,o=this.getParsed(e),a=o._custom,s=wU(a)?"["+a.start+", "+a.end+"]":""+i.getLabelForValue(o[i.axis]);return{label:""+n.getLabelForValue(o[n.axis]),value:s}}initialize(){this.enableOptionSharing=!0,super.initialize();const e=this._cachedMeta;e.stack=this.getDataset().stack}update(e){const r=this._cachedMeta;this.updateElements(r.data,0,r.data.length,e)}updateElements(e,r,n,i){const o=i==="reset",{index:a,_cachedMeta:{vScale:s}}=this,l=s.getBasePixel(),u=s.isHorizontal(),p=this._getRuler(),{sharedOptions:m,includeOptions:v}=this._getSharedOptions(r,i);for(let x=r;x<r+n;x++){const y=this.getParsed(x),_=o||Qo(y[s.axis])?{base:l,head:l}:this._calculateBarValuePixels(x),w=this._calculateBarIndexPixels(x,p),C=(y._stacks||{})[s.axis],E={horizontal:u,base:_.base,enableBorderRadius:!C||wU(y._custom)||a===C._top||a===C._bottom,x:u?_.head:w.center,y:u?w.center:_.head,height:u?w.size:Math.abs(_.size),width:u?Math.abs(_.size):w.size};v&&(E.options=m||this.resolveDataElementOptions(x,e[x].active?"active":i));const T=E.options||e[x].options;Dot(E,T,C,a),$ot(E,T,p.ratio),this.updateElement(e[x],x,E,i)}}_getStacks(e,r){const{iScale:n}=this._cachedMeta,i=n.getMatchingVisibleMetas(this._type).filter(l=>l.controller.options.grouped),o=n.options.stacked,a=[],s=l=>{const u=l.controller.getParsed(r),p=u&&u[l.vScale.axis];if(Qo(p)||isNaN(p))return!0};for(const l of i)if(!(r!==void 0&&s(l))&&((o===!1||a.indexOf(l.stack)===-1||o===void 0&&l.stack===void 0)&&a.push(l.stack),l.index===e))break;return a.length||a.push(void 0),a}_getStackCount(e){return this._getStacks(void 0,e).length}_getStackIndex(e,r,n){const i=this._getStacks(e,n),o=r!==void 0?i.indexOf(r):-1;return o===-1?i.length-1:o}_getRuler(){const e=this.options,r=this._cachedMeta,n=r.iScale,i=[];let o,a;for(o=0,a=r.data.length;o<a;++o)i.push(n.getPixelForValue(this.getParsed(o)[n.axis],o));const s=e.barThickness;return{min:s||Mot(r),pixels:i,start:n._startPixel,end:n._endPixel,stackCount:this._getStackCount(),scale:n,grouped:e.grouped,ratio:s?1:e.categoryPercentage*e.barPercentage}}_calculateBarValuePixels(e){const{_cachedMeta:{vScale:r,_stacked:n},options:{base:i,minBarLength:o}}=this,a=i||0,s=this.getParsed(e),l=s._custom,u=wU(l);let p=s[r.axis],m=0,v=n?this.applyStack(r,s,n):p,x,y;v!==p&&(m=v-p,v=p),u&&(p=l.barStart,v=l.barEnd-l.barStart,p!==0&&ev(p)!==ev(l.barEnd)&&(m=0),m+=p);const _=!Qo(i)&&!u?i:m;let w=r.getPixelForValue(_);if(this.chart.getDataVisibility(e)?x=r.getPixelForValue(m+v):x=w,y=x-w,Math.abs(y)<o){y=Oot(y,r,a)*o,p===a&&(w-=y/2);const C=r.getPixelForDecimal(0),E=r.getPixelForDecimal(1),T=Math.min(C,E),A=Math.max(C,E);w=Math.max(Math.min(w,A),T),x=w+y}if(w===r.getPixelForValue(a)){const C=ev(y)*r.getLineWidthForValue(a)/2;w+=C,y-=C}return{size:y,base:w,head:x,center:x+y/2}}_calculateBarIndexPixels(e,r){const n=r.scale,i=this.options,o=i.skipNull,a=Hi(i.maxBarThickness,1/0);let s,l;if(r.grouped){const u=o?this._getStackCount(e):r.stackCount,p=i.barThickness==="flex"?Rot(e,r,i,u):Aot(e,r,i,u),m=this._getStackIndex(this.index,this._cachedMeta.stack,o?e:void 0);s=p.start+p.chunk*m+p.chunk/2,l=Math.min(a,p.chunk*p.ratio)}else s=n.getPixelForValue(this.getParsed(e)[n.axis],e),l=Math.min(a,r.min*r.ratio);return{base:s-l/2,head:s+l/2,center:s,size:l}}draw(){const e=this._cachedMeta,r=e.vScale,n=e.data,i=n.length;let o=0;for(;o<i;++o)this.getParsed(o)[r.axis]!==null&&n[o].draw(this._ctx)}}nN.id="bar";nN.defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}};nN.overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};class iN extends Dm{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(e,r,n,i){const o=super.parsePrimitiveData(e,r,n,i);for(let a=0;a<o.length;a++)o[a]._custom=this.resolveDataElementOptions(a+n).radius;return o}parseArrayData(e,r,n,i){const o=super.parseArrayData(e,r,n,i);for(let a=0;a<o.length;a++){const s=r[n+a];o[a]._custom=Hi(s[2],this.resolveDataElementOptions(a+n).radius)}return o}parseObjectData(e,r,n,i){const o=super.parseObjectData(e,r,n,i);for(let a=0;a<o.length;a++){const s=r[n+a];o[a]._custom=Hi(s&&s.r&&+s.r,this.resolveDataElementOptions(a+n).radius)}return o}getMaxOverflow(){const e=this._cachedMeta.data;let r=0;for(let n=e.length-1;n>=0;--n)r=Math.max(r,e[n].size(this.resolveDataElementOptions(n))/2);return r>0&&r}getLabelAndValue(e){const r=this._cachedMeta,{xScale:n,yScale:i}=r,o=this.getParsed(e),a=n.getLabelForValue(o.x),s=i.getLabelForValue(o.y),l=o._custom;return{label:r.label,value:"("+a+", "+s+(l?", "+l:"")+")"}}update(e){const r=this._cachedMeta.data;this.updateElements(r,0,r.length,e)}updateElements(e,r,n,i){const o=i==="reset",{iScale:a,vScale:s}=this._cachedMeta,{sharedOptions:l,includeOptions:u}=this._getSharedOptions(r,i),p=a.axis,m=s.axis;for(let v=r;v<r+n;v++){const x=e[v],y=!o&&this.getParsed(v),_={},w=_[p]=o?a.getPixelForDecimal(.5):a.getPixelForValue(y[p]),C=_[m]=o?s.getBasePixel():s.getPixelForValue(y[m]);_.skip=isNaN(w)||isNaN(C),u&&(_.options=l||this.resolveDataElementOptions(v,x.active?"active":i),o&&(_.options.radius=0)),this.updateElement(x,v,_,i)}}resolveDataElementOptions(e,r){const n=this.getParsed(e);let i=super.resolveDataElementOptions(e,r);i.$shared&&(i=Object.assign({},i,{$shared:!1}));const o=i.radius;return r!=="active"&&(i.radius=0),i.radius+=Hi(n&&n._custom,o),i}}iN.id="bubble";iN.defaults={datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}};iN.overrides={scales:{x:{type:"linear"},y:{type:"linear"}},plugins:{tooltip:{callbacks:{title(){return""}}}}};function Fot(t,e,r){let n=1,i=1,o=0,a=0;if(e<ks){const s=t,l=s+e,u=Math.cos(s),p=Math.sin(s),m=Math.cos(l),v=Math.sin(l),x=(T,A,k)=>YI(T,s,l,!0)?1:Math.max(A,A*r,k,k*r),y=(T,A,k)=>YI(T,s,l,!0)?-1:Math.min(A,A*r,k,k*r),_=x(0,u,m),w=x(pl,p,v),C=y(Ra,u,m),E=y(Ra+pl,p,v);n=(_-C)/2,i=(w-E)/2,o=-(_+C)/2,a=-(w+E)/2}return{ratioX:n,ratioY:i,offsetX:o,offsetY:a}}class tE extends Dm{constructor(e,r){super(e,r);this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(e,r){const n=this.getDataset().data,i=this._cachedMeta;if(this._parsing===!1)i._parsed=n;else{let o=l=>+n[l];if(uo(n[e])){const{key:l="value"}=this._parsing;o=u=>+Vx(n[u],l)}let a,s;for(a=e,s=e+r;a<s;++a)i._parsed[a]=o(a)}}_getRotation(){return dp(this.options.rotation-90)}_getCircumference(){return dp(this.options.circumference)}_getRotationExtents(){let e=ks,r=-ks;for(let n=0;n<this.chart.data.datasets.length;++n)if(this.chart.isDatasetVisible(n)){const i=this.chart.getDatasetMeta(n).controller,o=i._getRotation(),a=i._getCircumference();e=Math.min(e,o),r=Math.max(r,o+a)}return{rotation:e,circumference:r-e}}update(e){const r=this.chart,{chartArea:n}=r,i=this._cachedMeta,o=i.data,a=this.getMaxBorderWidth()+this.getMaxOffset(o)+this.options.spacing,s=Math.max((Math.min(n.width,n.height)-a)/2,0),l=Math.min(Dnt(this.options.cutout,s),1),u=this._getRingWeight(this.index),{circumference:p,rotation:m}=this._getRotationExtents(),{ratioX:v,ratioY:x,offsetX:y,offsetY:_}=Fot(m,p,l),w=(n.width-a)/v,C=(n.height-a)/x,E=Math.max(Math.min(w,C)/2,0),T=Fse(this.options.radius,E),A=Math.max(T*l,0),k=(T-A)/this._getVisibleDatasetWeightTotal();this.offsetX=y*T,this.offsetY=_*T,i.total=this.calculateTotal(),this.outerRadius=T-k*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-k*u,0),this.updateElements(o,0,o.length,e)}_circumference(e,r){const n=this.options,i=this._cachedMeta,o=this._getCircumference();return r&&n.animation.animateRotate||!this.chart.getDataVisibility(e)||i._parsed[e]===null||i.data[e].hidden?0:this.calculateCircumference(i._parsed[e]*o/ks)}updateElements(e,r,n,i){const o=i==="reset",a=this.chart,s=a.chartArea,u=a.options.animation,p=(s.left+s.right)/2,m=(s.top+s.bottom)/2,v=o&&u.animateScale,x=v?0:this.innerRadius,y=v?0:this.outerRadius,{sharedOptions:_,includeOptions:w}=this._getSharedOptions(r,i);let C=this._getRotation(),E;for(E=0;E<r;++E)C+=this._circumference(E,o);for(E=r;E<r+n;++E){const T=this._circumference(E,o),A=e[E],k={x:p+this.offsetX,y:m+this.offsetY,startAngle:C,endAngle:C+T,circumference:T,outerRadius:y,innerRadius:x};w&&(k.options=_||this.resolveDataElementOptions(E,A.active?"active":i)),C+=T,this.updateElement(A,E,k,i)}}calculateTotal(){const e=this._cachedMeta,r=e.data;let n=0,i;for(i=0;i<r.length;i++){const o=e._parsed[i];o!==null&&!isNaN(o)&&this.chart.getDataVisibility(i)&&!r[i].hidden&&(n+=Math.abs(o))}return n}calculateCircumference(e){const r=this._cachedMeta.total;return r>0&&!isNaN(e)?ks*(Math.abs(e)/r):0}getLabelAndValue(e){const r=this._cachedMeta,n=this.chart,i=n.data.labels||[],o=oM(r._parsed[e],n.options.locale);return{label:i[e]||"",value:o}}getMaxBorderWidth(e){let r=0;const n=this.chart;let i,o,a,s,l;if(!e){for(i=0,o=n.data.datasets.length;i<o;++i)if(n.isDatasetVisible(i)){a=n.getDatasetMeta(i),e=a.data,s=a.controller;break}}if(!e)return 0;for(i=0,o=e.length;i<o;++i)l=s.resolveDataElementOptions(i),l.borderAlign!=="inner"&&(r=Math.max(r,l.borderWidth||0,l.hoverBorderWidth||0));return r}getMaxOffset(e){let r=0;for(let n=0,i=e.length;n<i;++n){const o=this.resolveDataElementOptions(n);r=Math.max(r,o.offset||0,o.hoverOffset||0)}return r}_getRingWeightOffset(e){let r=0;for(let n=0;n<e;++n)this.chart.isDatasetVisible(n)&&(r+=this._getRingWeight(n));return r}_getRingWeight(e){return Math.max(Hi(this.chart.data.datasets[e].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}tE.id="doughnut";tE.defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"};tE.descriptors={_scriptable:t=>t!=="spacing",_indexable:t=>t!=="spacing"};tE.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:r}}=t.legend.options;return e.labels.map((n,i)=>{const a=t.getDatasetMeta(0).controller.getStyle(i);return{text:n,fillStyle:a.backgroundColor,strokeStyle:a.borderColor,lineWidth:a.borderWidth,pointStyle:r,hidden:!t.getDataVisibility(i),index:i}})}return[]}},onClick(t,e,r){r.chart.toggleDataVisibility(e.index),r.chart.update()}},tooltip:{callbacks:{title(){return""},label(t){let e=t.label;const r=": "+t.formattedValue;return Es(e)?(e=e.slice(),e[0]+=r):e+=r,e}}}}};class oN extends Dm{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(e){const r=this._cachedMeta,{dataset:n,data:i=[],_dataset:o}=r,a=this.chart._animationsDisabled;let{start:s,count:l}=Qse(r,i,a);this._drawStart=s,this._drawCount=l,Jse(r)&&(s=0,l=i.length),n._chart=this.chart,n._datasetIndex=this.index,n._decimated=!!o._decimated,n.points=i;const u=this.resolveDatasetElementOptions(e);this.options.showLine||(u.borderWidth=0),u.segment=this.options.segment,this.updateElement(n,void 0,{animated:!a,options:u},e),this.updateElements(i,s,l,e)}updateElements(e,r,n,i){const o=i==="reset",{iScale:a,vScale:s,_stacked:l,_dataset:u}=this._cachedMeta,{sharedOptions:p,includeOptions:m}=this._getSharedOptions(r,i),v=a.axis,x=s.axis,{spanGaps:y,segment:_}=this.options,w=KC(y)?y:Number.POSITIVE_INFINITY,C=this.chart._animationsDisabled||o||i==="none";let E=r>0&&this.getParsed(r-1);for(let T=r;T<r+n;++T){const A=e[T],k=this.getParsed(T),X=C?A:{},Z=Qo(k[x]),W=X[v]=a.getPixelForValue(k[v],T),D=X[x]=o||Z?s.getBasePixel():s.getPixelForValue(l?this.applyStack(s,k,l):k[x],T);X.skip=isNaN(W)||isNaN(D)||Z,X.stop=T>0&&Math.abs(k[v]-E[v])>w,_&&(X.parsed=k,X.raw=u.data[T]),m&&(X.options=p||this.resolveDataElementOptions(T,A.active?"active":i)),C||this.updateElement(A,T,X,i),E=k}}getMaxOverflow(){const e=this._cachedMeta,r=e.dataset,n=r.options&&r.options.borderWidth||0,i=e.data||[];if(!i.length)return n;const o=i[0].size(this.resolveDataElementOptions(0)),a=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(n,o,a)/2}draw(){const e=this._cachedMeta;e.dataset.updateControlPoints(this.chart.chartArea,e.iScale.axis),super.draw()}}oN.id="line";oN.defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1};oN.overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};class sN extends Dm{constructor(e,r){super(e,r);this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(e){const r=this._cachedMeta,n=this.chart,i=n.data.labels||[],o=oM(r._parsed[e].r,n.options.locale);return{label:i[e]||"",value:o}}parseObjectData(e,r,n,i){return wae.bind(this)(e,r,n,i)}update(e){const r=this._cachedMeta.data;this._updateRadius(),this.updateElements(r,0,r.length,e)}getMinMax(){const e=this._cachedMeta,r={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return e.data.forEach((n,i)=>{const o=this.getParsed(i).r;!isNaN(o)&&this.chart.getDataVisibility(i)&&(o<r.min&&(r.min=o),o>r.max&&(r.max=o))}),r}_updateRadius(){const e=this.chart,r=e.chartArea,n=e.options,i=Math.min(r.right-r.left,r.bottom-r.top),o=Math.max(i/2,0),a=Math.max(n.cutoutPercentage?o/100*n.cutoutPercentage:1,0),s=(o-a)/e.getVisibleDatasetCount();this.outerRadius=o-s*this.index,this.innerRadius=this.outerRadius-s}updateElements(e,r,n,i){const o=i==="reset",a=this.chart,l=a.options.animation,u=this._cachedMeta.rScale,p=u.xCenter,m=u.yCenter,v=u.getIndexAngle(0)-.5*Ra;let x=v,y;const _=360/this.countVisibleElements();for(y=0;y<r;++y)x+=this._computeAngle(y,i,_);for(y=r;y<r+n;y++){const w=e[y];let C=x,E=x+this._computeAngle(y,i,_),T=a.getDataVisibility(y)?u.getDistanceFromCenterForValue(this.getParsed(y).r):0;x=E,o&&(l.animateScale&&(T=0),l.animateRotate&&(C=E=v));const A={x:p,y:m,innerRadius:0,outerRadius:T,startAngle:C,endAngle:E,options:this.resolveDataElementOptions(y,w.active?"active":i)};this.updateElement(w,y,A,i)}}countVisibleElements(){const e=this._cachedMeta;let r=0;return e.data.forEach((n,i)=>{!isNaN(this.getParsed(i).r)&&this.chart.getDataVisibility(i)&&r++}),r}_computeAngle(e,r,n){return this.chart.getDataVisibility(e)?dp(this.resolveDataElementOptions(e,r).angle||n):0}}sN.id="polarArea";sN.defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0};sN.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:r}}=t.legend.options;return e.labels.map((n,i)=>{const a=t.getDatasetMeta(0).controller.getStyle(i);return{text:n,fillStyle:a.backgroundColor,strokeStyle:a.borderColor,lineWidth:a.borderWidth,pointStyle:r,hidden:!t.getDataVisibility(i),index:i}})}return[]}},onClick(t,e,r){r.chart.toggleDataVisibility(e.index),r.chart.update()}},tooltip:{callbacks:{title(){return""},label(t){return t.chart.data.labels[t.dataIndex]+": "+t.formattedValue}}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};class CU extends tE{}CU.id="pie";CU.defaults={cutout:0,rotation:0,circumference:360,radius:"100%"};class aN extends Dm{getLabelAndValue(e){const r=this._cachedMeta.vScale,n=this.getParsed(e);return{label:r.getLabels()[e],value:""+r.getLabelForValue(n[r.axis])}}parseObjectData(e,r,n,i){return wae.bind(this)(e,r,n,i)}update(e){const r=this._cachedMeta,n=r.dataset,i=r.data||[],o=r.iScale.getLabels();if(n.points=i,e!=="resize"){const a=this.resolveDatasetElementOptions(e);this.options.showLine||(a.borderWidth=0);const s={_loop:!0,_fullLoop:o.length===i.length,options:a};this.updateElement(n,void 0,s,e)}this.updateElements(i,0,i.length,e)}updateElements(e,r,n,i){const o=this._cachedMeta.rScale,a=i==="reset";for(let s=r;s<r+n;s++){const l=e[s],u=this.resolveDataElementOptions(s,l.active?"active":i),p=o.getPointPositionForValue(s,this.getParsed(s).r),m=a?o.xCenter:p.x,v=a?o.yCenter:p.y,x={x:m,y:v,angle:p.angle,skip:isNaN(m)||isNaN(v),options:u};this.updateElement(l,s,x,i)}}}aN.id="radar";aN.defaults={datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}};aN.overrides={aspectRatio:1,scales:{r:{type:"radialLinear"}}};class id{constructor(){this.x=void 0,this.y=void 0,this.active=!1,this.options=void 0,this.$animations=void 0}tooltipPosition(e){const{x:r,y:n}=this.getProps(["x","y"],e);return{x:r,y:n}}hasValue(){return KC(this.x)&&KC(this.y)}getProps(e,r){const n=this.$animations;if(!r||!n)return this;const i={};return e.forEach(o=>{i[o]=n[o]&&n[o].active()?n[o]._to:this[o]}),i}}id.defaults={};id.defaultRoutes=void 0;const Xae={values(t){return Es(t)?t:""+t},numeric(t,e,r){if(t===0)return"0";const n=this.chart.options.locale;let i,o=t;if(r.length>1){const u=Math.max(Math.abs(r[0].value),Math.abs(r[r.length-1].value));(u<1e-4||u>1e15)&&(i="scientific"),o=zot(t,r)}const a=fp(Math.abs(o)),s=Math.max(Math.min(-1*Math.floor(a),20),0),l={notation:i,minimumFractionDigits:s,maximumFractionDigits:s};return Object.assign(l,this.options.ticks.format),oM(t,n,l)},logarithmic(t,e,r){if(t===0)return"0";const n=t/Math.pow(10,Math.floor(fp(t)));return n===1||n===2||n===5?Xae.numeric.call(this,t,e,r):""}};function zot(t,e){let r=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(r)>=1&&t!==Math.floor(t)&&(r=t-Math.floor(t)),r}var lN={formatters:Xae};ko.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",grace:0,grid:{display:!0,lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,e)=>e.lineWidth,tickColor:(t,e)=>e.color,offset:!1,borderDash:[],borderDashOffset:0,borderWidth:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:lN.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}});ko.route("scale.ticks","color","","color");ko.route("scale.grid","color","","borderColor");ko.route("scale.grid","borderColor","","borderColor");ko.route("scale.title","color","","color");ko.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"});ko.describe("scales",{_fallback:"scale"});ko.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"});function Bot(t,e){const r=t.options.ticks,n=r.maxTicksLimit||jot(t),i=r.major.enabled?Vot(e):[],o=i.length,a=i[0],s=i[o-1],l=[];if(o>n)return Hot(e,l,i,o/n),l;const u=Uot(i,e,n);if(o>0){let p,m;const v=o>1?Math.round((s-a)/(o-1)):null;for(cN(e,l,u,Qo(v)?0:a-v,a),p=0,m=o-1;p<m;p++)cN(e,l,u,i[p],i[p+1]);return cN(e,l,u,s,Qo(v)?e.length:s+v),l}return cN(e,l,u),l}function jot(t){const e=t.options.offset,r=t._tickSize(),n=t._length/r+(e?0:1),i=t._maxLength/r;return Math.floor(Math.min(n,i))}function Uot(t,e,r){const n=Wot(t),i=e.length/r;if(!n)return Math.max(i,1);const o=Vnt(n);for(let a=0,s=o.length-1;a<s;a++){const l=o[a];if(l>i)return l}return Math.max(i,1)}function Vot(t){const e=[];let r,n;for(r=0,n=t.length;r<n;r++)t[r].major&&e.push(r);return e}function Hot(t,e,r,n){let i=0,o=r[0],a;for(n=Math.ceil(n),a=0;a<t.length;a++)a===o&&(e.push(t[a]),i++,o=r[i*n])}function cN(t,e,r,n,i){const o=Hi(n,0),a=Math.min(Hi(i,t.length),t.length);let s=0,l,u,p;for(r=Math.ceil(r),i&&(l=i-n,r=l/Math.floor(l/r)),p=o;p<0;)s++,p=Math.round(o+s*r);for(u=Math.max(o,0);u<a;u++)u===p&&(e.push(t[u]),s++,p=Math.round(o+s*r))}function Wot(t){const e=t.length;let r,n;if(e<2)return!1;for(n=t[0],r=1;r<e;++r)if(t[r]-t[r-1]!==n)return!1;return n}const Got=t=>t==="left"?"right":t==="right"?"left":t,Yae=(t,e,r)=>e==="top"||e==="left"?t[e]+r:t[e]-r;function Kae(t,e){const r=[],n=t.length/e,i=t.length;let o=0;for(;o<i;o+=n)r.push(t[Math.floor(o)]);return r}function qot(t,e,r){const n=t.ticks.length,i=Math.min(e,n-1),o=t._startPixel,a=t._endPixel,s=1e-6;let l=t.getPixelForTick(i),u;if(!(r&&(n===1?u=Math.max(l-o,a-l):e===0?u=(t.getPixelForTick(1)-l)/2:u=(l-t.getPixelForTick(i-1))/2,l+=i<e?u:-u,l<o-s||l>a+s)))return l}function Xot(t,e){Ss(t,r=>{const n=r.gc,i=n.length/2;let o;if(i>e){for(o=0;o<i;++o)delete r.data[n[o]];n.splice(0,i)}})}function aM(t){return t.drawTicks?t.tickLength:0}function Zae(t,e){if(!t.display)return 0;const r=ec(t.font,e),n=Au(t.padding);return(Es(t.text)?t.text.length:1)*r.lineHeight+n.height}function Yot(t,e){return qx(t,{scale:e,type:"scale"})}function Kot(t,e,r){return qx(t,{tick:r,index:e,type:"tick"})}function Zot(t,e,r){let n=nU(t);return(r&&e!=="right"||!r&&e==="right")&&(n=Got(n)),n}function Qot(t,e,r,n){const{top:i,left:o,bottom:a,right:s,chart:l}=t,{chartArea:u,scales:p}=l;let m=0,v,x,y;const _=a-i,w=s-o;if(t.isHorizontal()){if(x=Mu(n,o,s),uo(r)){const C=Object.keys(r)[0],E=r[C];y=p[C].getPixelForValue(E)+_-e}else r==="center"?y=(u.bottom+u.top)/2+_-e:y=Yae(t,r,e);v=s-o}else{if(uo(r)){const C=Object.keys(r)[0],E=r[C];x=p[C].getPixelForValue(E)-w+e}else r==="center"?x=(u.left+u.right)/2-w+e:x=Yae(t,r,e);y=Mu(n,a,i),m=r==="left"?-pl:pl}return{titleX:x,titleY:y,maxWidth:v,rotation:m}}class yb extends id{constructor(e){super();this.id=e.id,this.type=e.type,this.options=void 0,this.ctx=e.ctx,this.chart=e.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(e){this.options=e.setContext(this.getContext()),this.axis=e.axis,this._userMin=this.parse(e.min),this._userMax=this.parse(e.max),this._suggestedMin=this.parse(e.suggestedMin),this._suggestedMax=this.parse(e.suggestedMax)}parse(e,r){return e}getUserBounds(){let{_userMin:e,_userMax:r,_suggestedMin:n,_suggestedMax:i}=this;return e=cp(e,Number.POSITIVE_INFINITY),r=cp(r,Number.NEGATIVE_INFINITY),n=cp(n,Number.POSITIVE_INFINITY),i=cp(i,Number.NEGATIVE_INFINITY),{min:cp(e,n),max:cp(r,i),minDefined:Aa(e),maxDefined:Aa(r)}}getMinMax(e){let{min:r,max:n,minDefined:i,maxDefined:o}=this.getUserBounds(),a;if(i&&o)return{min:r,max:n};const s=this.getMatchingVisibleMetas();for(let l=0,u=s.length;l<u;++l)a=s[l].controller.getMinMax(this,e),i||(r=Math.min(r,a.min)),o||(n=Math.max(n,a.max));return r=o&&r>n?n:r,n=i&&r>n?r:n,{min:cp(r,cp(n,r)),max:cp(n,cp(r,n))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){Vs(this.options.beforeUpdate,[this])}update(e,r,n){const{beginAtZero:i,grace:o,ticks:a}=this.options,s=a.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=r,this._margins=n=Object.assign({left:0,right:0,top:0,bottom:0},n),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+n.left+n.right:this.height+n.top+n.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=Ait(this,o,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=s<this.ticks.length;this._convertTicksToLabels(l?Kae(this.ticks,s):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),a.display&&(a.autoSkip||a.source==="auto")&&(this.ticks=Bot(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let e=this.options.reverse,r,n;this.isHorizontal()?(r=this.left,n=this.right):(r=this.top,n=this.bottom,e=!e),this._startPixel=r,this._endPixel=n,this._reversePixels=e,this._length=n-r,this._alignToPixels=this.options.alignToPixels}afterUpdate(){Vs(this.options.afterUpdate,[this])}beforeSetDimensions(){Vs(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){Vs(this.options.afterSetDimensions,[this])}_callHooks(e){this.chart.notifyPlugins(e,this.getContext()),Vs(this.options[e],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){Vs(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(e){const r=this.options.ticks;let n,i,o;for(n=0,i=e.length;n<i;n++)o=e[n],o.label=Vs(r.callback,[o.value,n,e],this)}afterTickToLabelConversion(){Vs(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){Vs(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const e=this.options,r=e.ticks,n=this.ticks.length,i=r.minRotation||0,o=r.maxRotation;let a=i,s,l,u;if(!this._isVisible()||!r.display||i>=o||n<=1||!this.isHorizontal()){this.labelRotation=i;return}const p=this._getLabelSizes(),m=p.widest.width,v=p.highest.height,x=wc(this.chart.width-m,0,this.maxWidth);s=e.offset?this.maxWidth/n:x/(n-1),m+6>s&&(s=x/(n-(e.offset?.5:1)),l=this.maxHeight-aM(e.grid)-r.padding-Zae(e.title,this.chart.options.font),u=Math.sqrt(m*m+v*v),a=tU(Math.min(Math.asin(wc((p.highest.height+6)/s,-1,1)),Math.asin(wc(l/u,-1,1))-Math.asin(wc(v/u,-1,1)))),a=Math.max(i,Math.min(o,a))),this.labelRotation=a}afterCalculateLabelRotation(){Vs(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){Vs(this.options.beforeFit,[this])}fit(){const e={width:0,height:0},{chart:r,options:{ticks:n,title:i,grid:o}}=this,a=this._isVisible(),s=this.isHorizontal();if(a){const l=Zae(i,r.options.font);if(s?(e.width=this.maxWidth,e.height=aM(o)+l):(e.height=this.maxHeight,e.width=aM(o)+l),n.display&&this.ticks.length){const{first:u,last:p,widest:m,highest:v}=this._getLabelSizes(),x=n.padding*2,y=dp(this.labelRotation),_=Math.cos(y),w=Math.sin(y);if(s){const C=n.mirror?0:w*m.width+_*v.height;e.height=Math.min(this.maxHeight,e.height+C+x)}else{const C=n.mirror?0:_*m.width+w*v.height;e.width=Math.min(this.maxWidth,e.width+C+x)}this._calculatePadding(u,p,w,_)}}this._handleMargins(),s?(this.width=this._length=r.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=r.height-this._margins.top-this._margins.bottom)}_calculatePadding(e,r,n,i){const{ticks:{align:o,padding:a},position:s}=this.options,l=this.labelRotation!==0,u=s!=="top"&&this.axis==="x";if(this.isHorizontal()){const p=this.getPixelForTick(0)-this.left,m=this.right-this.getPixelForTick(this.ticks.length-1);let v=0,x=0;l?u?(v=i*e.width,x=n*r.height):(v=n*e.height,x=i*r.width):o==="start"?x=r.width:o==="end"?v=e.width:o!=="inner"&&(v=e.width/2,x=r.width/2),this.paddingLeft=Math.max((v-p+a)*this.width/(this.width-p),0),this.paddingRight=Math.max((x-m+a)*this.width/(this.width-m),0)}else{let p=r.height/2,m=e.height/2;o==="start"?(p=0,m=e.height):o==="end"&&(p=r.height,m=0),this.paddingTop=p+a,this.paddingBottom=m+a}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){Vs(this.options.afterFit,[this])}isHorizontal(){const{axis:e,position:r}=this.options;return r==="top"||r==="bottom"||e==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){this.beforeTickToLabelConversion(),this.generateTickLabels(e);let r,n;for(r=0,n=e.length;r<n;r++)Qo(e[r].label)&&(e.splice(r,1),n--,r--);this.afterTickToLabelConversion()}_getLabelSizes(){let e=this._labelSizes;if(!e){const r=this.options.ticks.sampleSize;let n=this.ticks;r<n.length&&(n=Kae(n,r)),this._labelSizes=e=this._computeLabelSizes(n,n.length)}return e}_computeLabelSizes(e,r){const{ctx:n,_longestTextCache:i}=this,o=[],a=[];let s=0,l=0,u,p,m,v,x,y,_,w,C,E,T;for(u=0;u<r;++u){if(v=e[u].label,x=this._resolveTickFontOptions(u),n.font=y=x.string,_=i[y]=i[y]||{data:{},gc:[]},w=x.lineHeight,C=E=0,!Qo(v)&&!Es(v))C=J3(n,_.data,_.gc,C,v),E=w;else if(Es(v))for(p=0,m=v.length;p<m;++p)T=v[p],!Qo(T)&&!Es(T)&&(C=J3(n,_.data,_.gc,C,T),E+=w);o.push(C),a.push(E),s=Math.max(C,s),l=Math.max(E,l)}Xot(i,r);const A=o.indexOf(s),k=a.indexOf(l),X=Z=>({width:o[Z]||0,height:a[Z]||0});return{first:X(0),last:X(r-1),widest:X(A),highest:X(k),widths:o,heights:a}}getLabelForValue(e){return e}getPixelForValue(e,r){return NaN}getValueForPixel(e){}getPixelForTick(e){const r=this.ticks;return e<0||e>r.length-1?null:this.getPixelForValue(r[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);const r=this._startPixel+e*this._length;return Gnt(this._alignToPixels?db(this.chart,r,0):r)}getDecimalForPixel(e){const r=(e-this._startPixel)/this._length;return this._reversePixels?1-r:r}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:e,max:r}=this;return e<0&&r<0?r:e>0&&r>0?e:0}getContext(e){const r=this.ticks||[];if(e>=0&&e<r.length){const n=r[e];return n.$context||(n.$context=Kot(this.getContext(),e,n))}return this.$context||(this.$context=Yot(this.chart.getContext(),this))}_tickSize(){const e=this.options.ticks,r=dp(this.labelRotation),n=Math.abs(Math.cos(r)),i=Math.abs(Math.sin(r)),o=this._getLabelSizes(),a=e.autoSkipPadding||0,s=o?o.widest.width+a:0,l=o?o.highest.height+a:0;return this.isHorizontal()?l*n>s*i?s/n:l/i:l*i<s*n?l/n:s/i}_isVisible(){const e=this.options.display;return e!=="auto"?!!e:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(e){const r=this.axis,n=this.chart,i=this.options,{grid:o,position:a}=i,s=o.offset,l=this.isHorizontal(),p=this.ticks.length+(s?1:0),m=aM(o),v=[],x=o.setContext(this.getContext()),y=x.drawBorder?x.borderWidth:0,_=y/2,w=function(O){return db(n,O,y)};let C,E,T,A,k,X,Z,W,D,H,N,j;if(a==="top")C=w(this.bottom),X=this.bottom-m,W=C-_,H=w(e.top)+_,j=e.bottom;else if(a==="bottom")C=w(this.top),H=e.top,j=w(e.bottom)-_,X=C+_,W=this.top+m;else if(a==="left")C=w(this.right),k=this.right-m,Z=C-_,D=w(e.left)+_,N=e.right;else if(a==="right")C=w(this.left),D=e.left,N=w(e.right)-_,k=C+_,Z=this.left+m;else if(r==="x"){if(a==="center")C=w((e.top+e.bottom)/2+.5);else if(uo(a)){const O=Object.keys(a)[0],F=a[O];C=w(this.chart.scales[O].getPixelForValue(F))}H=e.top,j=e.bottom,X=C+_,W=X+m}else if(r==="y"){if(a==="center")C=w((e.left+e.right)/2);else if(uo(a)){const O=Object.keys(a)[0],F=a[O];C=w(this.chart.scales[O].getPixelForValue(F))}k=C-_,Z=k-m,D=e.left,N=e.right}const $=Hi(i.ticks.maxTicksLimit,p),z=Math.max(1,Math.ceil(p/$));for(E=0;E<p;E+=z){const O=o.setContext(this.getContext(E)),F=O.lineWidth,G=O.color,q=O.borderDash||[],ee=O.borderDashOffset,re=O.tickWidth,ce=O.tickColor,fe=O.tickBorderDash||[],J=O.tickBorderDashOffset;T=qot(this,E,s),T!==void 0&&(A=db(n,T,F),l?k=Z=D=N=A:X=W=H=j=A,v.push({tx1:k,ty1:X,tx2:Z,ty2:W,x1:D,y1:H,x2:N,y2:j,width:F,color:G,borderDash:q,borderDashOffset:ee,tickWidth:re,tickColor:ce,tickBorderDash:fe,tickBorderDashOffset:J}))}return this._ticksLength=p,this._borderValue=C,v}_computeLabelItems(e){const r=this.axis,n=this.options,{position:i,ticks:o}=n,a=this.isHorizontal(),s=this.ticks,{align:l,crossAlign:u,padding:p,mirror:m}=o,v=aM(n.grid),x=v+p,y=m?-p:x,_=-dp(this.labelRotation),w=[];let C,E,T,A,k,X,Z,W,D,H,N,j,$="middle";if(i==="top")X=this.bottom-y,Z=this._getXAxisLabelAlignment();else if(i==="bottom")X=this.top+y,Z=this._getXAxisLabelAlignment();else if(i==="left"){const O=this._getYAxisLabelAlignment(v);Z=O.textAlign,k=O.x}else if(i==="right"){const O=this._getYAxisLabelAlignment(v);Z=O.textAlign,k=O.x}else if(r==="x"){if(i==="center")X=(e.top+e.bottom)/2+x;else if(uo(i)){const O=Object.keys(i)[0],F=i[O];X=this.chart.scales[O].getPixelForValue(F)+x}Z=this._getXAxisLabelAlignment()}else if(r==="y"){if(i==="center")k=(e.left+e.right)/2-x;else if(uo(i)){const O=Object.keys(i)[0],F=i[O];k=this.chart.scales[O].getPixelForValue(F)}Z=this._getYAxisLabelAlignment(v).textAlign}r==="y"&&(l==="start"?$="top":l==="end"&&($="bottom"));const z=this._getLabelSizes();for(C=0,E=s.length;C<E;++C){T=s[C],A=T.label;const O=o.setContext(this.getContext(C));W=this.getPixelForTick(C)+o.labelOffset,D=this._resolveTickFontOptions(C),H=D.lineHeight,N=Es(A)?A.length:1;const F=N/2,G=O.color,q=O.textStrokeColor,ee=O.textStrokeWidth;let re=Z;a?(k=W,Z==="inner"&&(C===E-1?re=this.options.reverse?"left":"right":C===0?re=this.options.reverse?"right":"left":re="center"),i==="top"?u==="near"||_!==0?j=-N*H+H/2:u==="center"?j=-z.highest.height/2-F*H+H:j=-z.highest.height+H/2:u==="near"||_!==0?j=H/2:u==="center"?j=z.highest.height/2-F*H:j=z.highest.height-N*H,m&&(j*=-1)):(X=W,j=(1-N)*H/2);let ce;if(O.showLabelBackdrop){const fe=Au(O.backdropPadding),J=z.heights[C],oe=z.widths[C];let ve=X+j-fe.top,ye=k-fe.left;switch($){case"middle":ve-=J/2;break;case"bottom":ve-=J;break}switch(Z){case"center":ye-=oe/2;break;case"right":ye-=oe;break}ce={left:ye,top:ve,width:oe+fe.width,height:J+fe.height,color:O.backdropColor}}w.push({rotation:_,label:A,font:D,color:G,strokeColor:q,strokeWidth:ee,textOffset:j,textAlign:re,textBaseline:$,translation:[k,X],backdrop:ce})}return w}_getXAxisLabelAlignment(){const{position:e,ticks:r}=this.options;if(-dp(this.labelRotation))return e==="top"?"left":"right";let i="center";return r.align==="start"?i="left":r.align==="end"?i="right":r.align==="inner"&&(i="inner"),i}_getYAxisLabelAlignment(e){const{position:r,ticks:{crossAlign:n,mirror:i,padding:o}}=this.options,a=this._getLabelSizes(),s=e+o,l=a.widest.width;let u,p;return r==="left"?i?(p=this.right+o,n==="near"?u="left":n==="center"?(u="center",p+=l/2):(u="right",p+=l)):(p=this.right-s,n==="near"?u="right":n==="center"?(u="center",p-=l/2):(u="left",p=this.left)):r==="right"?i?(p=this.left+o,n==="near"?u="right":n==="center"?(u="center",p-=l/2):(u="left",p-=l)):(p=this.left+s,n==="near"?u="left":n==="center"?(u="center",p+=l/2):(u="right",p=this.right)):u="right",{textAlign:u,x:p}}_computeLabelArea(){if(this.options.ticks.mirror)return;const e=this.chart,r=this.options.position;if(r==="left"||r==="right")return{top:0,left:this.left,bottom:e.height,right:this.right};if(r==="top"||r==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:e.width}}drawBackground(){const{ctx:e,options:{backgroundColor:r},left:n,top:i,width:o,height:a}=this;r&&(e.save(),e.fillStyle=r,e.fillRect(n,i,o,a),e.restore())}getLineWidthForValue(e){const r=this.options.grid;if(!this._isVisible()||!r.display)return 0;const i=this.ticks.findIndex(o=>o.value===e);return i>=0?r.setContext(this.getContext(i)).lineWidth:0}drawGrid(e){const r=this.options.grid,n=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e));let o,a;const s=(l,u,p)=>{!p.width||!p.color||(n.save(),n.lineWidth=p.width,n.strokeStyle=p.color,n.setLineDash(p.borderDash||[]),n.lineDashOffset=p.borderDashOffset,n.beginPath(),n.moveTo(l.x,l.y),n.lineTo(u.x,u.y),n.stroke(),n.restore())};if(r.display)for(o=0,a=i.length;o<a;++o){const l=i[o];r.drawOnChartArea&&s({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),r.drawTicks&&s({x:l.tx1,y:l.ty1},{x:l.tx2,y:l.ty2},{color:l.tickColor,width:l.tickWidth,borderDash:l.tickBorderDash,borderDashOffset:l.tickBorderDashOffset})}}drawBorder(){const{chart:e,ctx:r,options:{grid:n}}=this,i=n.setContext(this.getContext()),o=n.drawBorder?i.borderWidth:0;if(!o)return;const a=n.setContext(this.getContext(0)).lineWidth,s=this._borderValue;let l,u,p,m;this.isHorizontal()?(l=db(e,this.left,o)-o/2,u=db(e,this.right,a)+a/2,p=m=s):(p=db(e,this.top,o)-o/2,m=db(e,this.bottom,a)+a/2,l=u=s),r.save(),r.lineWidth=i.borderWidth,r.strokeStyle=i.borderColor,r.beginPath(),r.moveTo(l,p),r.lineTo(u,m),r.stroke(),r.restore()}drawLabels(e){if(!this.options.ticks.display)return;const n=this.ctx,i=this._computeLabelArea();i&&tM(n,i);const o=this._labelItems||(this._labelItems=this._computeLabelItems(e));let a,s;for(a=0,s=o.length;a<s;++a){const l=o[a],u=l.font,p=l.label;l.backdrop&&(n.fillStyle=l.backdrop.color,n.fillRect(l.backdrop.left,l.backdrop.top,l.backdrop.width,l.backdrop.height));let m=l.textOffset;hb(n,p,0,m,u,l)}i&&rM(n)}drawTitle(){const{ctx:e,options:{position:r,title:n,reverse:i}}=this;if(!n.display)return;const o=ec(n.font),a=Au(n.padding),s=n.align;let l=o.lineHeight/2;r==="bottom"||r==="center"||uo(r)?(l+=a.bottom,Es(n.text)&&(l+=o.lineHeight*(n.text.length-1))):l+=a.top;const{titleX:u,titleY:p,maxWidth:m,rotation:v}=Qot(this,l,r,s);hb(e,n.text,0,0,o,{color:n.color,maxWidth:m,rotation:v,textAlign:Zot(s,r,i),textBaseline:"middle",translation:[u,p]})}draw(e){!this._isVisible()||(this.drawBackground(),this.drawGrid(e),this.drawBorder(),this.drawTitle(),this.drawLabels(e))}_layers(){const e=this.options,r=e.ticks&&e.ticks.z||0,n=Hi(e.grid&&e.grid.z,-1);return!this._isVisible()||this.draw!==yb.prototype.draw?[{z:r,draw:i=>{this.draw(i)}}]:[{z:n,draw:i=>{this.drawBackground(),this.drawGrid(i),this.drawTitle()}},{z:n+1,draw:()=>{this.drawBorder()}},{z:r,draw:i=>{this.drawLabels(i)}}]}getMatchingVisibleMetas(e){const r=this.chart.getSortedVisibleDatasetMetas(),n=this.axis+"AxisID",i=[];let o,a;for(o=0,a=r.length;o<a;++o){const s=r[o];s[n]===this.id&&(!e||s.type===e)&&i.push(s)}return i}_resolveTickFontOptions(e){const r=this.options.ticks.setContext(this.getContext(e));return ec(r.font)}_maxDigits(){const e=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/e}}class uN{constructor(e,r,n){this.type=e,this.scope=r,this.override=n,this.items=Object.create(null)}isForType(e){return Object.prototype.isPrototypeOf.call(this.type.prototype,e.prototype)}register(e){const r=Object.getPrototypeOf(e);let n;tst(r)&&(n=this.register(r));const i=this.items,o=e.id,a=this.scope+"."+o;if(!o)throw new Error("class does not have id: "+e);return o in i||(i[o]=e,Jot(e,a,n),this.override&&ko.override(e.id,e.overrides)),a}get(e){return this.items[e]}unregister(e){const r=this.items,n=e.id,i=this.scope;n in r&&delete r[n],i&&n in ko[i]&&(delete ko[i][n],this.override&&delete fb[n])}}function Jot(t,e,r){const n=WI(Object.create(null),[r?ko.get(r):{},ko.get(e),t.defaults]);ko.set(e,n),t.defaultRoutes&&est(e,t.defaultRoutes),t.descriptors&&ko.describe(e,t.descriptors)}function est(t,e){Object.keys(e).forEach(r=>{const n=r.split("."),i=n.pop(),o=[t].concat(n).join("."),a=e[r].split("."),s=a.pop(),l=a.join(".");ko.route(o,i,l,s)})}function tst(t){return"id"in t&&"defaults"in t}class rst{constructor(){this.controllers=new uN(Dm,"datasets",!0),this.elements=new uN(id,"elements"),this.plugins=new uN(Object,"plugins"),this.scales=new uN(yb,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...e){this._each("register",e)}remove(...e){this._each("unregister",e)}addControllers(...e){this._each("register",e,this.controllers)}addElements(...e){this._each("register",e,this.elements)}addPlugins(...e){this._each("register",e,this.plugins)}addScales(...e){this._each("register",e,this.scales)}getController(e){return this._get(e,this.controllers,"controller")}getElement(e){return this._get(e,this.elements,"element")}getPlugin(e){return this._get(e,this.plugins,"plugin")}getScale(e){return this._get(e,this.scales,"scale")}removeControllers(...e){this._each("unregister",e,this.controllers)}removeElements(...e){this._each("unregister",e,this.elements)}removePlugins(...e){this._each("unregister",e,this.plugins)}removeScales(...e){this._each("unregister",e,this.scales)}_each(e,r,n){[...r].forEach(i=>{const o=n||this._getRegistryForType(i);n||o.isForType(i)||o===this.plugins&&i.id?this._exec(e,o,i):Ss(i,a=>{const s=n||this._getRegistryForType(a);this._exec(e,s,a)})})}_exec(e,r,n){const i=eU(e);Vs(n["before"+i],[],n),r[e](n),Vs(n["after"+i],[],n)}_getRegistryForType(e){for(let r=0;r<this._typedRegistries.length;r++){const n=this._typedRegistries[r];if(n.isForType(e))return n}return this.plugins}_get(e,r,n){const i=r.get(e);if(i===void 0)throw new Error('"'+e+'" is not a registered '+n+".");return i}}var tv=new rst;class fN extends Dm{update(e){const r=this._cachedMeta,{data:n=[]}=r,i=this.chart._animationsDisabled;let{start:o,count:a}=Qse(r,n,i);if(this._drawStart=o,this._drawCount=a,Jse(r)&&(o=0,a=n.length),this.options.showLine){const{dataset:s,_dataset:l}=r;s._chart=this.chart,s._datasetIndex=this.index,s._decimated=!!l._decimated,s.points=n;const u=this.resolveDatasetElementOptions(e);u.segment=this.options.segment,this.updateElement(s,void 0,{animated:!i,options:u},e)}this.updateElements(n,o,a,e)}addElements(){const{showLine:e}=this.options;!this.datasetElementType&&e&&(this.datasetElementType=tv.getElement("line")),super.addElements()}updateElements(e,r,n,i){const o=i==="reset",{iScale:a,vScale:s,_stacked:l,_dataset:u}=this._cachedMeta,p=this.resolveDataElementOptions(r,i),m=this.getSharedOptions(p),v=this.includeOptions(i,m),x=a.axis,y=s.axis,{spanGaps:_,segment:w}=this.options,C=KC(_)?_:Number.POSITIVE_INFINITY,E=this.chart._animationsDisabled||o||i==="none";let T=r>0&&this.getParsed(r-1);for(let A=r;A<r+n;++A){const k=e[A],X=this.getParsed(A),Z=E?k:{},W=Qo(X[y]),D=Z[x]=a.getPixelForValue(X[x],A),H=Z[y]=o||W?s.getBasePixel():s.getPixelForValue(l?this.applyStack(s,X,l):X[y],A);Z.skip=isNaN(D)||isNaN(H)||W,Z.stop=A>0&&Math.abs(X[x]-T[x])>C,w&&(Z.parsed=X,Z.raw=u.data[A]),v&&(Z.options=m||this.resolveDataElementOptions(A,k.active?"active":i)),E||this.updateElement(k,A,Z,i),T=X}this.updateSharedOptions(m,i,p)}getMaxOverflow(){const e=this._cachedMeta,r=e.data||[];if(!this.options.showLine){let s=0;for(let l=r.length-1;l>=0;--l)s=Math.max(s,r[l].size(this.resolveDataElementOptions(l))/2);return s>0&&s}const n=e.dataset,i=n.options&&n.options.borderWidth||0;if(!r.length)return i;const o=r[0].size(this.resolveDataElementOptions(0)),a=r[r.length-1].size(this.resolveDataElementOptions(r.length-1));return Math.max(i,o,a)/2}}fN.id="scatter";fN.defaults={datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1};fN.overrides={interaction:{mode:"point"},plugins:{tooltip:{callbacks:{title(){return""},label(t){return"("+t.label+", "+t.formattedValue+")"}}}},scales:{x:{type:"linear"},y:{type:"linear"}}};var nst=Object.freeze({__proto__:null,BarController:nN,BubbleController:iN,DoughnutController:tE,LineController:oN,PolarAreaController:sN,PieController:CU,RadarController:aN,ScatterController:fN});function xb(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class EU{constructor(e){this.options=e||{}}init(e){}formats(){return xb()}parse(e,r){return xb()}format(e,r){return xb()}add(e,r,n){return xb()}diff(e,r,n){return xb()}startOf(e,r,n){return xb()}endOf(e,r){return xb()}}EU.override=function(t){Object.assign(EU.prototype,t)};var ist={_date:EU};function ost(t,e,r,n){const{controller:i,data:o,_sorted:a}=t,s=i._cachedMeta.iScale;if(s&&e===s.axis&&e!=="r"&&a&&o.length){const l=s._reversePixels?qnt:Py;if(n){if(i._sharedOptions){const u=o[0],p=typeof u.getRange=="function"&&u.getRange(e);if(p){const m=l(o,e,r-p),v=l(o,e,r+p);return{lo:m.lo,hi:v.hi}}}}else return l(o,e,r)}return{lo:0,hi:o.length-1}}function lM(t,e,r,n,i){const o=t.getSortedVisibleDatasetMetas(),a=r[e];for(let s=0,l=o.length;s<l;++s){const{index:u,data:p}=o[s],{lo:m,hi:v}=ost(o[s],e,a,i);for(let x=m;x<=v;++x){const y=p[x];y.skip||n(y,u,x)}}}function sst(t){const e=t.indexOf("x")!==-1,r=t.indexOf("y")!==-1;return function(n,i){const o=e?Math.abs(n.x-i.x):0,a=r?Math.abs(n.y-i.y):0;return Math.sqrt(Math.pow(o,2)+Math.pow(a,2))}}function SU(t,e,r,n,i){const o=[];return!i&&!t.isPointInArea(e)||lM(t,r,e,function(s,l,u){!i&&!eM(s,t.chartArea,0)||s.inRange(e.x,e.y,n)&&o.push({element:s,datasetIndex:l,index:u})},!0),o}function ast(t,e,r,n){let i=[];function o(a,s,l){const{startAngle:u,endAngle:p}=a.getProps(["startAngle","endAngle"],n),{angle:m}=Gse(a,{x:e.x,y:e.y});YI(m,u,p)&&i.push({element:a,datasetIndex:s,index:l})}return lM(t,r,e,o),i}function lst(t,e,r,n,i,o){let a=[];const s=sst(r);let l=Number.POSITIVE_INFINITY;function u(p,m,v){const x=p.inRange(e.x,e.y,i);if(n&&!x)return;const y=p.getCenterPoint(i);if(!(!!o||t.isPointInArea(y))&&!x)return;const w=s(e,y);w<l?(a=[{element:p,datasetIndex:m,index:v}],l=w):w===l&&a.push({element:p,datasetIndex:m,index:v})}return lM(t,r,e,u),a}function TU(t,e,r,n,i,o){return!o&&!t.isPointInArea(e)?[]:r==="r"&&!n?ast(t,e,r,i):lst(t,e,r,n,i,o)}function Qae(t,e,r,n,i){const o=[],a=r==="x"?"inXRange":"inYRange";let s=!1;return lM(t,r,e,(l,u,p)=>{l[a](e[r],i)&&(o.push({element:l,datasetIndex:u,index:p}),s=s||l.inRange(e.x,e.y,i))}),n&&!s?[]:o}var cst={evaluateInteractionItems:lM,modes:{index(t,e,r,n){const i=gb(e,t),o=r.axis||"x",a=r.includeInvisible||!1,s=r.intersect?SU(t,i,o,n,a):TU(t,i,o,!1,n,a),l=[];return s.length?(t.getSortedVisibleDatasetMetas().forEach(u=>{const p=s[0].index,m=u.data[p];m&&!m.skip&&l.push({element:m,datasetIndex:u.index,index:p})}),l):[]},dataset(t,e,r,n){const i=gb(e,t),o=r.axis||"xy",a=r.includeInvisible||!1;let s=r.intersect?SU(t,i,o,n,a):TU(t,i,o,!1,n,a);if(s.length>0){const l=s[0].datasetIndex,u=t.getDatasetMeta(l).data;s=[];for(let p=0;p<u.length;++p)s.push({element:u[p],datasetIndex:l,index:p})}return s},point(t,e,r,n){const i=gb(e,t),o=r.axis||"xy",a=r.includeInvisible||!1;return SU(t,i,o,n,a)},nearest(t,e,r,n){const i=gb(e,t),o=r.axis||"xy",a=r.includeInvisible||!1;return TU(t,i,o,r.intersect,n,a)},x(t,e,r,n){const i=gb(e,t);return Qae(t,i,"x",r.intersect,n)},y(t,e,r,n){const i=gb(e,t);return Qae(t,i,"y",r.intersect,n)}}};const Jae=["left","top","right","bottom"];function cM(t,e){return t.filter(r=>r.pos===e)}function ele(t,e){return t.filter(r=>Jae.indexOf(r.pos)===-1&&r.box.axis===e)}function uM(t,e){return t.sort((r,n)=>{const i=e?n:r,o=e?r:n;return i.weight===o.weight?i.index-o.index:i.weight-o.weight})}function ust(t){const e=[];let r,n,i,o,a,s;for(r=0,n=(t||[]).length;r<n;++r)i=t[r],{position:o,options:{stack:a,stackWeight:s=1}}=i,e.push({index:r,box:i,pos:o,horizontal:i.isHorizontal(),weight:i.weight,stack:a&&o+a,stackWeight:s});return e}function fst(t){const e={};for(const r of t){const{stack:n,pos:i,stackWeight:o}=r;if(!n||!Jae.includes(i))continue;const a=e[n]||(e[n]={count:0,placed:0,weight:0,size:0});a.count++,a.weight+=o}return e}function dst(t,e){const r=fst(t),{vBoxMaxWidth:n,hBoxMaxHeight:i}=e;let o,a,s;for(o=0,a=t.length;o<a;++o){s=t[o];const{fullSize:l}=s.box,u=r[s.stack],p=u&&s.stackWeight/u.weight;s.horizontal?(s.width=p?p*n:l&&e.availableWidth,s.height=i):(s.width=n,s.height=p?p*i:l&&e.availableHeight)}return r}function hst(t){const e=ust(t),r=uM(e.filter(u=>u.box.fullSize),!0),n=uM(cM(e,"left"),!0),i=uM(cM(e,"right")),o=uM(cM(e,"top"),!0),a=uM(cM(e,"bottom")),s=ele(e,"x"),l=ele(e,"y");return{fullSize:r,leftAndTop:n.concat(o),rightAndBottom:i.concat(l).concat(a).concat(s),chartArea:cM(e,"chartArea"),vertical:n.concat(i).concat(l),horizontal:o.concat(a).concat(s)}}function tle(t,e,r,n){return Math.max(t[r],e[r])+Math.max(t[n],e[n])}function rle(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function pst(t,e,r,n){const{pos:i,box:o}=r,a=t.maxPadding;if(!uo(i)){r.size&&(t[i]-=r.size);const m=n[r.stack]||{size:0,count:1};m.size=Math.max(m.size,r.horizontal?o.height:o.width),r.size=m.size/m.count,t[i]+=r.size}o.getPadding&&rle(a,o.getPadding());const s=Math.max(0,e.outerWidth-tle(a,t,"left","right")),l=Math.max(0,e.outerHeight-tle(a,t,"top","bottom")),u=s!==t.w,p=l!==t.h;return t.w=s,t.h=l,r.horizontal?{same:u,other:p}:{same:p,other:u}}function mst(t){const e=t.maxPadding;function r(n){const i=Math.max(e[n]-t[n],0);return t[n]+=i,i}t.y+=r("top"),t.x+=r("left"),r("right"),r("bottom")}function gst(t,e){const r=e.maxPadding;function n(i){const o={left:0,top:0,right:0,bottom:0};return i.forEach(a=>{o[a]=Math.max(e[a],r[a])}),o}return n(t?["left","right"]:["top","bottom"])}function fM(t,e,r,n){const i=[];let o,a,s,l,u,p;for(o=0,a=t.length,u=0;o<a;++o){s=t[o],l=s.box,l.update(s.width||e.w,s.height||e.h,gst(s.horizontal,e));const{same:m,other:v}=pst(e,r,s,n);u|=m&&i.length,p=p||v,l.fullSize||i.push(s)}return u&&fM(i,e,r,n)||p}function dN(t,e,r,n,i){t.top=r,t.left=e,t.right=e+n,t.bottom=r+i,t.width=n,t.height=i}function nle(t,e,r,n){const i=r.padding;let{x:o,y:a}=e;for(const s of t){const l=s.box,u=n[s.stack]||{count:1,placed:0,weight:1},p=s.stackWeight/u.weight||1;if(s.horizontal){const m=e.w*p,v=u.size||l.height;up(u.start)&&(a=u.start),l.fullSize?dN(l,i.left,a,r.outerWidth-i.right-i.left,v):dN(l,e.left+u.placed,a,m,v),u.start=a,u.placed+=m,a=l.bottom}else{const m=e.h*p,v=u.size||l.width;up(u.start)&&(o=u.start),l.fullSize?dN(l,o,i.top,v,r.outerHeight-i.bottom-i.top):dN(l,o,e.top+u.placed,v,m),u.start=o,u.placed+=m,o=l.right}}e.x=o,e.y=a}ko.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}});var Ru={addBox(t,e){t.boxes||(t.boxes=[]),e.fullSize=e.fullSize||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw(r){e.draw(r)}}]},t.boxes.push(e)},removeBox(t,e){const r=t.boxes?t.boxes.indexOf(e):-1;r!==-1&&t.boxes.splice(r,1)},configure(t,e,r){e.fullSize=r.fullSize,e.position=r.position,e.weight=r.weight},update(t,e,r,n){if(!t)return;const i=Au(t.options.layout.padding),o=Math.max(e-i.width,0),a=Math.max(r-i.height,0),s=hst(t.boxes),l=s.vertical,u=s.horizontal;Ss(t.boxes,_=>{typeof _.beforeLayout=="function"&&_.beforeLayout()});const p=l.reduce((_,w)=>w.box.options&&w.box.options.display===!1?_:_+1,0)||1,m=Object.freeze({outerWidth:e,outerHeight:r,padding:i,availableWidth:o,availableHeight:a,vBoxMaxWidth:o/2/p,hBoxMaxHeight:a/2}),v=Object.assign({},i);rle(v,Au(n));const x=Object.assign({maxPadding:v,w:o,h:a,x:i.left,y:i.top},i),y=dst(l.concat(u),m);fM(s.fullSize,x,m,y),fM(l,x,m,y),fM(u,x,m,y)&&fM(l,x,m,y),mst(x),nle(s.leftAndTop,x,m,y),x.x+=x.w,x.y+=x.h,nle(s.rightAndBottom,x,m,y),t.chartArea={left:x.left,top:x.top,right:x.left+x.w,bottom:x.top+x.h,height:x.h,width:x.w},Ss(s.chartArea,_=>{const w=_.box;Object.assign(w,t.chartArea),w.update(x.w,x.h,{left:0,top:0,right:0,bottom:0})})}};class ile{acquireContext(e,r){}releaseContext(e){return!1}addEventListener(e,r,n){}removeEventListener(e,r,n){}getDevicePixelRatio(){return 1}getMaximumSize(e,r,n,i){return r=Math.max(0,r||e.width),n=n||e.height,{width:r,height:Math.max(0,i?Math.floor(r/i):n)}}isAttached(e){return!0}updateConfig(e){}}class vst extends ile{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const hN="$chartjs",yst={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},ole=t=>t===null||t==="";function xst(t,e){const r=t.style,n=t.getAttribute("height"),i=t.getAttribute("width");if(t[hN]={initial:{height:n,width:i,style:{display:r.display,height:r.height,width:r.width}}},r.display=r.display||"block",r.boxSizing=r.boxSizing||"border-box",ole(i)){const o=Tae(t,"width");o!==void 0&&(t.width=o)}if(ole(n))if(t.style.height==="")t.height=t.width/(e||2);else{const o=Tae(t,"height");o!==void 0&&(t.height=o)}return t}const sle=Jit?{passive:!0}:!1;function _st(t,e,r){t.addEventListener(e,r,sle)}function bst(t,e,r){t.canvas.removeEventListener(e,r,sle)}function wst(t,e){const r=yst[t.type]||t.type,{x:n,y:i}=gb(t,e);return{type:r,chart:e,native:t,x:n!==void 0?n:null,y:i!==void 0?i:null}}function pN(t,e){for(const r of t)if(r===e||r.contains(e))return!0}function Cst(t,e,r){const n=t.canvas,i=new MutationObserver(o=>{let a=!1;for(const s of o)a=a||pN(s.addedNodes,n),a=a&&!pN(s.removedNodes,n);a&&r()});return i.observe(document,{childList:!0,subtree:!0}),i}function Est(t,e,r){const n=t.canvas,i=new MutationObserver(o=>{let a=!1;for(const s of o)a=a||pN(s.removedNodes,n),a=a&&!pN(s.addedNodes,n);a&&r()});return i.observe(document,{childList:!0,subtree:!0}),i}const dM=new Map;let ale=0;function lle(){const t=window.devicePixelRatio;t!==ale&&(ale=t,dM.forEach((e,r)=>{r.currentDevicePixelRatio!==t&&e()}))}function Sst(t,e){dM.size||window.addEventListener("resize",lle),dM.set(t,e)}function Tst(t){dM.delete(t),dM.size||window.removeEventListener("resize",lle)}function Pst(t,e,r){const n=t.canvas,i=n&&vU(n);if(!i)return;const o=Zse((s,l)=>{const u=i.clientWidth;r(s,l),u<i.clientWidth&&r()},window),a=new ResizeObserver(s=>{const l=s[0],u=l.contentRect.width,p=l.contentRect.height;u===0&&p===0||o(u,p)});return a.observe(i),Sst(t,o),a}function PU(t,e,r){r&&r.disconnect(),e==="resize"&&Tst(t)}function Ist(t,e,r){const n=t.canvas,i=Zse(o=>{t.ctx!==null&&r(wst(o,t))},t,o=>{const a=o[0];return[a,a.offsetX,a.offsetY]});return _st(n,e,i),i}class Mst extends ile{acquireContext(e,r){const n=e&&e.getContext&&e.getContext("2d");return n&&n.canvas===e?(xst(e,r),n):null}releaseContext(e){const r=e.canvas;if(!r[hN])return!1;const n=r[hN].initial;["height","width"].forEach(o=>{const a=n[o];Qo(a)?r.removeAttribute(o):r.setAttribute(o,a)});const i=n.style||{};return Object.keys(i).forEach(o=>{r.style[o]=i[o]}),r.width=r.width,delete r[hN],!0}addEventListener(e,r,n){this.removeEventListener(e,r);const i=e.$proxies||(e.$proxies={}),a={attach:Cst,detach:Est,resize:Pst}[r]||Ist;i[r]=a(e,r,n)}removeEventListener(e,r){const n=e.$proxies||(e.$proxies={}),i=n[r];if(!i)return;({attach:PU,detach:PU,resize:PU}[r]||bst)(e,r,i),n[r]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,r,n,i){return Qit(e,r,n,i)}isAttached(e){const r=vU(e);return!!(r&&r.isConnected)}}function Ast(t){return!Eae()||typeof OffscreenCanvas!="undefined"&&t instanceof OffscreenCanvas?vst:Mst}class Rst{constructor(){this._init=[]}notify(e,r,n,i){r==="beforeInit"&&(this._init=this._createDescriptors(e,!0),this._notify(this._init,e,"install"));const o=i?this._descriptors(e).filter(i):this._descriptors(e),a=this._notify(o,e,r,n);return r==="afterDestroy"&&(this._notify(o,e,"stop"),this._notify(this._init,e,"uninstall")),a}_notify(e,r,n,i){i=i||{};for(const o of e){const a=o.plugin,s=a[n],l=[r,i,o.options];if(Vs(s,l,a)===!1&&i.cancelable)return!1}return!0}invalidate(){Qo(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(e){if(this._cache)return this._cache;const r=this._cache=this._createDescriptors(e);return this._notifyStateChanges(e),r}_createDescriptors(e,r){const n=e&&e.config,i=Hi(n.options&&n.options.plugins,{}),o=kst(n);return i===!1&&!r?[]:Lst(e,o,i,r)}_notifyStateChanges(e){const r=this._oldCache||[],n=this._cache,i=(o,a)=>o.filter(s=>!a.some(l=>s.plugin.id===l.plugin.id));this._notify(i(r,n),e,"stop"),this._notify(i(n,r),e,"start")}}function kst(t){const e={},r=[],n=Object.keys(tv.plugins.items);for(let o=0;o<n.length;o++)r.push(tv.getPlugin(n[o]));const i=t.plugins||[];for(let o=0;o<i.length;o++){const a=i[o];r.indexOf(a)===-1&&(r.push(a),e[a.id]=!0)}return{plugins:r,localIds:e}}function Ost(t,e){return!e&&t===!1?null:t===!0?{}:t}function Lst(t,{plugins:e,localIds:r},n,i){const o=[],a=t.getContext();for(const s of e){const l=s.id,u=Ost(n[l],i);u!==null&&o.push({plugin:s,options:Dst(t.config,{plugin:s,local:r[l]},u,a)})}return o}function Dst(t,{plugin:e,local:r},n,i){const o=t.pluginScopeKeys(e),a=t.getOptionScopes(n,o);return r&&e.defaults&&a.push(e.defaults),t.createResolver(a,i,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function IU(t,e){const r=ko.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||r.indexAxis||"x"}function Nst(t,e){let r=t;return t==="_index_"?r=e:t==="_value_"&&(r=e==="x"?"y":"x"),r}function $st(t,e){return t===e?"_index_":"_value_"}function Fst(t){if(t==="top"||t==="bottom")return"x";if(t==="left"||t==="right")return"y"}function MU(t,e){return t==="x"||t==="y"?t:e.axis||Fst(e.position)||t.charAt(0).toLowerCase()}function zst(t,e){const r=fb[t.type]||{scales:{}},n=e.scales||{},i=IU(t.type,e),o=Object.create(null),a=Object.create(null);return Object.keys(n).forEach(s=>{const l=n[s];if(!uo(l))return console.error(`Invalid scale configuration for scale: ${s}`);if(l._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${s}`);const u=MU(s,l),p=$st(u,i),m=r.scales||{};o[u]=o[u]||s,a[s]=GI(Object.create(null),[{axis:u},l,m[u],m[p]])}),t.data.datasets.forEach(s=>{const l=s.type||t.type,u=s.indexAxis||IU(l,e),m=(fb[l]||{}).scales||{};Object.keys(m).forEach(v=>{const x=Nst(v,u),y=s[x+"AxisID"]||o[x]||x;a[y]=a[y]||Object.create(null),GI(a[y],[{axis:x},n[y],m[v]])})}),Object.keys(a).forEach(s=>{const l=a[s];GI(l,[ko.scales[l.type],ko.scale])}),a}function cle(t){const e=t.options||(t.options={});e.plugins=Hi(e.plugins,{}),e.scales=zst(t,e)}function ule(t){return t=t||{},t.datasets=t.datasets||[],t.labels=t.labels||[],t}function Bst(t){return t=t||{},t.data=ule(t.data),cle(t),t}const fle=new Map,dle=new Set;function mN(t,e){let r=fle.get(t);return r||(r=e(),fle.set(t,r),dle.add(r)),r}const hM=(t,e,r)=>{const n=Vx(e,r);n!==void 0&&t.add(n)};class jst{constructor(e){this._config=Bst(e),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(e){this._config.type=e}get data(){return this._config.data}set data(e){this._config.data=ule(e)}get options(){return this._config.options}set options(e){this._config.options=e}get plugins(){return this._config.plugins}update(){const e=this._config;this.clearCache(),cle(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return mN(e,()=>[[`datasets.${e}`,""]])}datasetAnimationScopeKeys(e,r){return mN(`${e}.transition.${r}`,()=>[[`datasets.${e}.transitions.${r}`,`transitions.${r}`],[`datasets.${e}`,""]])}datasetElementScopeKeys(e,r){return mN(`${e}-${r}`,()=>[[`datasets.${e}.elements.${r}`,`datasets.${e}`,`elements.${r}`,""]])}pluginScopeKeys(e){const r=e.id,n=this.type;return mN(`${n}-plugin-${r}`,()=>[[`plugins.${r}`,...e.additionalOptionScopes||[]]])}_cachedScopes(e,r){const n=this._scopeCache;let i=n.get(e);return(!i||r)&&(i=new Map,n.set(e,i)),i}getOptionScopes(e,r,n){const{options:i,type:o}=this,a=this._cachedScopes(e,n),s=a.get(r);if(s)return s;const l=new Set;r.forEach(p=>{e&&(l.add(e),p.forEach(m=>hM(l,e,m))),p.forEach(m=>hM(l,i,m)),p.forEach(m=>hM(l,fb[o]||{},m)),p.forEach(m=>hM(l,ko,m)),p.forEach(m=>hM(l,uU,m))});const u=Array.from(l);return u.length===0&&u.push(Object.create(null)),dle.has(r)&&a.set(r,u),u}chartOptionScopes(){const{options:e,type:r}=this;return[e,fb[r]||{},ko.datasets[r]||{},{type:r},ko,uU]}resolveNamedOptions(e,r,n,i=[""]){const o={$shared:!0},{resolver:a,subPrefixes:s}=hle(this._resolverCache,e,i);let l=a;if(Vst(a,r)){o.$shared=!1,n=Hx(n)?n():n;const u=this.createResolver(e,n,s);l=QC(a,n,u)}for(const u of r)o[u]=l[u];return o}createResolver(e,r,n=[""],i){const{resolver:o}=hle(this._resolverCache,e,n);return uo(r)?QC(o,r,void 0,i):o}}function hle(t,e,r){let n=t.get(e);n||(n=new Map,t.set(e,n));const i=r.join();let o=n.get(i);return o||(o={resolver:pU(e,r),subPrefixes:r.filter(s=>!s.toLowerCase().includes("hover"))},n.set(i,o)),o}const Ust=t=>uo(t)&&Object.getOwnPropertyNames(t).reduce((e,r)=>e||Hx(t[r]),!1);function Vst(t,e){const{isScriptable:r,isIndexable:n}=gae(t);for(const i of e){const o=r(i),a=n(i),s=(a||o)&&t[i];if(o&&(Hx(s)||Ust(s))||a&&Es(s))return!0}return!1}var Hst="3.9.1";const Wst=["top","bottom","left","right","chartArea"];function ple(t,e){return t==="top"||t==="bottom"||Wst.indexOf(t)===-1&&e==="x"}function mle(t,e){return function(r,n){return r[t]===n[t]?r[e]-n[e]:r[t]-n[t]}}function gle(t){const e=t.chart,r=e.options.animation;e.notifyPlugins("afterRender"),Vs(r&&r.onComplete,[t],e)}function Gst(t){const e=t.chart,r=e.options.animation;Vs(r&&r.onProgress,[t],e)}function vle(t){return Eae()&&typeof t=="string"?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const gN={},yle=t=>{const e=vle(t);return Object.values(gN).filter(r=>r.canvas===e).pop()};function qst(t,e,r){const n=Object.keys(t);for(const i of n){const o=+i;if(o>=e){const a=t[i];delete t[i],(r>0||o>e)&&(t[o+r]=a)}}}function Xst(t,e,r,n){return!r||t.type==="mouseout"?null:n?e:t}class rE{constructor(e,r){const n=this.config=new jst(r),i=vle(e),o=yle(i);if(o)throw new Error("Canvas is already in use. Chart with ID '"+o.id+"' must be destroyed before the canvas with ID '"+o.canvas.id+"' can be reused.");const a=n.createResolver(n.chartOptionScopes(),this.getContext());this.platform=new(n.platform||Ast(i)),this.platform.updateConfig(n);const s=this.platform.acquireContext(i,a.aspectRatio),l=s&&s.canvas,u=l&&l.height,p=l&&l.width;if(this.id=Lnt(),this.ctx=s,this.canvas=l,this.width=p,this.height=u,this._options=a,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new Rst,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=Knt(m=>this.update(m),a.resizeDelay||0),this._dataChanges=[],gN[this.id]=this,!s||!l){console.error("Failed to create chart: can't acquire context from the given item");return}My.listen(this,"complete",gle),My.listen(this,"progress",Gst),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:e,maintainAspectRatio:r},width:n,height:i,_aspectRatio:o}=this;return Qo(e)?r&&o?o:i?n/i:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Sae(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return hae(this.canvas,this.ctx),this}stop(){return My.stop(this),this}resize(e,r){My.running(this)?this._resizeBeforeDraw={width:e,height:r}:this._resize(e,r)}_resize(e,r){const n=this.options,i=this.canvas,o=n.maintainAspectRatio&&this.aspectRatio,a=this.platform.getMaximumSize(i,e,r,o),s=n.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=a.width,this.height=a.height,this._aspectRatio=this.aspectRatio,!!Sae(this,s,!0)&&(this.notifyPlugins("resize",{size:a}),Vs(n.onResize,[this,a],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const r=this.options.scales||{};Ss(r,(n,i)=>{n.id=i})}buildOrUpdateScales(){const e=this.options,r=e.scales,n=this.scales,i=Object.keys(n).reduce((a,s)=>(a[s]=!1,a),{});let o=[];r&&(o=o.concat(Object.keys(r).map(a=>{const s=r[a],l=MU(a,s),u=l==="r",p=l==="x";return{options:s,dposition:u?"chartArea":p?"bottom":"left",dtype:u?"radialLinear":p?"category":"linear"}}))),Ss(o,a=>{const s=a.options,l=s.id,u=MU(l,s),p=Hi(s.type,a.dtype);(s.position===void 0||ple(s.position,u)!==ple(a.dposition))&&(s.position=a.dposition),i[l]=!0;let m=null;if(l in n&&n[l].type===p)m=n[l];else{const v=tv.getScale(p);m=new v({id:l,type:p,ctx:this.ctx,chart:this}),n[m.id]=m}m.init(s,e)}),Ss(i,(a,s)=>{a||delete n[s]}),Ss(n,a=>{Ru.configure(this,a,a.options),Ru.addBox(this,a)})}_updateMetasets(){const e=this._metasets,r=this.data.datasets.length,n=e.length;if(e.sort((i,o)=>i.index-o.index),n>r){for(let i=r;i<n;++i)this._destroyDatasetMeta(i);e.splice(r,n-r)}this._sortedMetasets=e.slice(0).sort(mle("order","index"))}_removeUnreferencedMetasets(){const{_metasets:e,data:{datasets:r}}=this;e.length>r.length&&delete this._stacks,e.forEach((n,i)=>{r.filter(o=>o===n._dataset).length===0&&this._destroyDatasetMeta(i)})}buildOrUpdateControllers(){const e=[],r=this.data.datasets;let n,i;for(this._removeUnreferencedMetasets(),n=0,i=r.length;n<i;n++){const o=r[n];let a=this.getDatasetMeta(n);const s=o.type||this.config.type;if(a.type&&a.type!==s&&(this._destroyDatasetMeta(n),a=this.getDatasetMeta(n)),a.type=s,a.indexAxis=o.indexAxis||IU(s,this.options),a.order=o.order||0,a.index=n,a.label=""+o.label,a.visible=this.isDatasetVisible(n),a.controller)a.controller.updateIndex(n),a.controller.linkScales();else{const l=tv.getController(s),{datasetElementType:u,dataElementType:p}=ko.datasets[s];Object.assign(l.prototype,{dataElementType:tv.getElement(p),datasetElementType:u&&tv.getElement(u)}),a.controller=new l(this,n),e.push(a.controller)}}return this._updateMetasets(),e}_resetElements(){Ss(this.data.datasets,(e,r)=>{this.getDatasetMeta(r).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(e){const r=this.config;r.update();const n=this._options=r.createResolver(r.chartOptionScopes(),this.getContext()),i=this._animationsDisabled=!n.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:e,cancelable:!0})===!1)return;const o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let a=0;for(let u=0,p=this.data.datasets.length;u<p;u++){const{controller:m}=this.getDatasetMeta(u),v=!i&&o.indexOf(m)===-1;m.buildOrUpdateElements(v),a=Math.max(+m.getMaxOverflow(),a)}a=this._minPadding=n.layout.autoPadding?a:0,this._updateLayout(a),i||Ss(o,u=>{u.reset()}),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(mle("z","_idx"));const{_active:s,_lastEvent:l}=this;l?this._eventHandler(l,!0):s.length&&this._updateHoverStyles(s,s,!0),this.render()}_updateScales(){Ss(this.scales,e=>{Ru.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const e=this.options,r=new Set(Object.keys(this._listeners)),n=new Set(e.events);(!jse(r,n)||!!this._responsiveListeners!==e.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:e}=this,r=this._getUniformDataChanges()||[];for(const{method:n,start:i,count:o}of r){const a=n==="_removeElements"?-o:o;qst(e,i,a)}}_getUniformDataChanges(){const e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];const r=this.data.datasets.length,n=o=>new Set(e.filter(a=>a[0]===o).map((a,s)=>s+","+a.splice(1).join(","))),i=n(0);for(let o=1;o<r;o++)if(!jse(i,n(o)))return;return Array.from(i).map(o=>o.split(",")).map(o=>({method:o[1],start:+o[2],count:+o[3]}))}_updateLayout(e){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;Ru.update(this,this.width,this.height,e);const r=this.chartArea,n=r.width<=0||r.height<=0;this._layers=[],Ss(this.boxes,i=>{n&&i.position==="chartArea"||(i.configure&&i.configure(),this._layers.push(...i._layers()))},this),this._layers.forEach((i,o)=>{i._idx=o}),this.notifyPlugins("afterLayout")}_updateDatasets(e){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:!0})!==!1){for(let r=0,n=this.data.datasets.length;r<n;++r)this.getDatasetMeta(r).controller.configure();for(let r=0,n=this.data.datasets.length;r<n;++r)this._updateDataset(r,Hx(e)?e({datasetIndex:r}):e);this.notifyPlugins("afterDatasetsUpdate",{mode:e})}}_updateDataset(e,r){const n=this.getDatasetMeta(e),i={meta:n,index:e,mode:r,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",i)!==!1&&(n.controller._update(r),i.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",i))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(My.has(this)?this.attached&&!My.running(this)&&My.start(this):(this.draw(),gle({chart:this})))}draw(){let e;if(this._resizeBeforeDraw){const{width:n,height:i}=this._resizeBeforeDraw;this._resize(n,i),this._resizeBeforeDraw=null}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const r=this._layers;for(e=0;e<r.length&&r[e].z<=0;++e)r[e].draw(this.chartArea);for(this._drawDatasets();e<r.length;++e)r[e].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(e){const r=this._sortedMetasets,n=[];let i,o;for(i=0,o=r.length;i<o;++i){const a=r[i];(!e||a.visible)&&n.push(a)}return n}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const e=this.getSortedVisibleDatasetMetas();for(let r=e.length-1;r>=0;--r)this._drawDataset(e[r]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(e){const r=this.ctx,n=e._clip,i=!n.disabled,o=this.chartArea,a={meta:e,index:e.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",a)!==!1&&(i&&tM(r,{left:n.left===!1?0:o.left-n.left,right:n.right===!1?this.width:o.right+n.right,top:n.top===!1?0:o.top-n.top,bottom:n.bottom===!1?this.height:o.bottom+n.bottom}),e.controller.draw(),i&&rM(r),a.cancelable=!1,this.notifyPlugins("afterDatasetDraw",a))}isPointInArea(e){return eM(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,r,n,i){const o=cst.modes[r];return typeof o=="function"?o(this,e,n,i):[]}getDatasetMeta(e){const r=this.data.datasets[e],n=this._metasets;let i=n.filter(o=>o&&o._dataset===r).pop();return i||(i={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:r&&r.order||0,index:e,_dataset:r,_parsed:[],_sorted:!1},n.push(i)),i}getContext(){return this.$context||(this.$context=qx(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){const r=this.data.datasets[e];if(!r)return!1;const n=this.getDatasetMeta(e);return typeof n.hidden=="boolean"?!n.hidden:!r.hidden}setDatasetVisibility(e,r){const n=this.getDatasetMeta(e);n.hidden=!r}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,r,n){const i=n?"show":"hide",o=this.getDatasetMeta(e),a=o.controller._resolveAnimations(void 0,i);up(r)?(o.data[r].hidden=!n,this.update()):(this.setDatasetVisibility(e,n),a.update(o,{visible:n}),this.update(s=>s.datasetIndex===e?i:void 0))}hide(e,r){this._updateVisibility(e,r,!1)}show(e,r){this._updateVisibility(e,r,!0)}_destroyDatasetMeta(e){const r=this._metasets[e];r&&r.controller&&r.controller._destroy(),delete this._metasets[e]}_stop(){let e,r;for(this.stop(),My.remove(this),e=0,r=this.data.datasets.length;e<r;++e)this._destroyDatasetMeta(e)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:e,ctx:r}=this;this._stop(),this.config.clearCache(),e&&(this.unbindEvents(),hae(e,r),this.platform.releaseContext(r),this.canvas=null,this.ctx=null),this.notifyPlugins("destroy"),delete gN[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...e){return this.canvas.toDataURL(...e)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const e=this._listeners,r=this.platform,n=(o,a)=>{r.addEventListener(this,o,a),e[o]=a},i=(o,a,s)=>{o.offsetX=a,o.offsetY=s,this._eventHandler(o)};Ss(this.options.events,o=>n(o,i))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const e=this._responsiveListeners,r=this.platform,n=(l,u)=>{r.addEventListener(this,l,u),e[l]=u},i=(l,u)=>{e[l]&&(r.removeEventListener(this,l,u),delete e[l])},o=(l,u)=>{this.canvas&&this.resize(l,u)};let a;const s=()=>{i("attach",s),this.attached=!0,this.resize(),n("resize",o),n("detach",a)};a=()=>{this.attached=!1,i("resize",o),this._stop(),this._resize(0,0),n("attach",s)},r.isAttached(this.canvas)?s():a()}unbindEvents(){Ss(this._listeners,(e,r)=>{this.platform.removeEventListener(this,r,e)}),this._listeners={},Ss(this._responsiveListeners,(e,r)=>{this.platform.removeEventListener(this,r,e)}),this._responsiveListeners=void 0}updateHoverStyle(e,r,n){const i=n?"set":"remove";let o,a,s,l;for(r==="dataset"&&(o=this.getDatasetMeta(e[0].datasetIndex),o.controller["_"+i+"DatasetHoverStyle"]()),s=0,l=e.length;s<l;++s){a=e[s];const u=a&&this.getDatasetMeta(a.datasetIndex).controller;u&&u[i+"HoverStyle"](a.element,a.datasetIndex,a.index)}}getActiveElements(){return this._active||[]}setActiveElements(e){const r=this._active||[],n=e.map(({datasetIndex:o,index:a})=>{const s=this.getDatasetMeta(o);if(!s)throw new Error("No dataset found at index "+o);return{datasetIndex:o,element:s.data[a],index:a}});!H3(n,r)&&(this._active=n,this._lastEvent=null,this._updateHoverStyles(n,r))}notifyPlugins(e,r,n){return this._plugins.notify(this,e,r,n)}_updateHoverStyles(e,r,n){const i=this.options.hover,o=(l,u)=>l.filter(p=>!u.some(m=>p.datasetIndex===m.datasetIndex&&p.index===m.index)),a=o(r,e),s=n?e:o(e,r);a.length&&this.updateHoverStyle(a,i.mode,!1),s.length&&i.mode&&this.updateHoverStyle(s,i.mode,!0)}_eventHandler(e,r){const n={event:e,replay:r,cancelable:!0,inChartArea:this.isPointInArea(e)},i=a=>(a.options.events||this.options.events).includes(e.native.type);if(this.notifyPlugins("beforeEvent",n,i)===!1)return;const o=this._handleEvent(e,r,n.inChartArea);return n.cancelable=!1,this.notifyPlugins("afterEvent",n,i),(o||n.changed)&&this.render(),this}_handleEvent(e,r,n){const{_active:i=[],options:o}=this,a=r,s=this._getActiveElements(e,i,n,a),l=Bnt(e),u=Xst(e,this._lastEvent,n,l);n&&(this._lastEvent=null,Vs(o.onHover,[e,s,this],this),l&&Vs(o.onClick,[e,s,this],this));const p=!H3(s,i);return(p||r)&&(this._active=s,this._updateHoverStyles(s,i,r)),this._lastEvent=u,p}_getActiveElements(e,r,n,i){if(e.type==="mouseout")return[];if(!n)return r;const o=this.options.hover;return this.getElementsAtEventForMode(e,o.mode,o,i)}}const xle=()=>Ss(rE.instances,t=>t._plugins.invalidate()),Xx=!0;Object.defineProperties(rE,{defaults:{enumerable:Xx,value:ko},instances:{enumerable:Xx,value:gN},overrides:{enumerable:Xx,value:fb},registry:{enumerable:Xx,value:tv},version:{enumerable:Xx,value:Hst},getChart:{enumerable:Xx,value:yle},register:{enumerable:Xx,value:(...t)=>{tv.add(...t),xle()}},unregister:{enumerable:Xx,value:(...t)=>{tv.remove(...t),xle()}}});function _le(t,e,r){const{startAngle:n,pixelMargin:i,x:o,y:a,outerRadius:s,innerRadius:l}=e;let u=i/s;t.beginPath(),t.arc(o,a,s,n-u,r+u),l>i?(u=i/l,t.arc(o,a,l,r+u,n-u,!0)):t.arc(o,a,i,r+pl,n-pl),t.closePath(),t.clip()}function Yst(t){return hU(t,["outerStart","outerEnd","innerStart","innerEnd"])}function Kst(t,e,r,n){const i=Yst(t.options.borderRadius),o=(r-e)/2,a=Math.min(o,n*e/2),s=l=>{const u=(r-Math.min(o,l))*n/2;return wc(l,0,Math.min(o,u))};return{outerStart:s(i.outerStart),outerEnd:s(i.outerEnd),innerStart:wc(i.innerStart,0,a),innerEnd:wc(i.innerEnd,0,a)}}function nE(t,e,r,n){return{x:r+t*Math.cos(e),y:n+t*Math.sin(e)}}function AU(t,e,r,n,i,o){const{x:a,y:s,startAngle:l,pixelMargin:u,innerRadius:p}=e,m=Math.max(e.outerRadius+n+r-u,0),v=p>0?p+n+r+u:0;let x=0;const y=i-l;if(n){const O=p>0?p-n:0,F=m>0?m-n:0,G=(O+F)/2,q=G!==0?y*G/(G+n):y;x=(y-q)/2}const _=Math.max(.001,y*m-r/Ra)/m,w=(y-_)/2,C=l+w+x,E=i-w-x,{outerStart:T,outerEnd:A,innerStart:k,innerEnd:X}=Kst(e,v,m,E-C),Z=m-T,W=m-A,D=C+T/Z,H=E-A/W,N=v+k,j=v+X,$=C+k/N,z=E-X/j;if(t.beginPath(),o){if(t.arc(a,s,m,D,H),A>0){const G=nE(W,H,a,s);t.arc(G.x,G.y,A,H,E+pl)}const O=nE(j,E,a,s);if(t.lineTo(O.x,O.y),X>0){const G=nE(j,z,a,s);t.arc(G.x,G.y,X,E+pl,z+Math.PI)}if(t.arc(a,s,v,E-X/v,C+k/v,!0),k>0){const G=nE(N,$,a,s);t.arc(G.x,G.y,k,$+Math.PI,C-pl)}const F=nE(Z,C,a,s);if(t.lineTo(F.x,F.y),T>0){const G=nE(Z,D,a,s);t.arc(G.x,G.y,T,C-pl,D)}}else{t.moveTo(a,s);const O=Math.cos(D)*m+a,F=Math.sin(D)*m+s;t.lineTo(O,F);const G=Math.cos(H)*m+a,q=Math.sin(H)*m+s;t.lineTo(G,q)}t.closePath()}function Zst(t,e,r,n,i){const{fullCircles:o,startAngle:a,circumference:s}=e;let l=e.endAngle;if(o){AU(t,e,r,n,a+ks,i);for(let u=0;u<o;++u)t.fill();isNaN(s)||(l=a+s%ks,s%ks==0&&(l+=ks))}return AU(t,e,r,n,l,i),t.fill(),l}function Qst(t,e,r){const{x:n,y:i,startAngle:o,pixelMargin:a,fullCircles:s}=e,l=Math.max(e.outerRadius-a,0),u=e.innerRadius+a;let p;for(r&&_le(t,e,o+ks),t.beginPath(),t.arc(n,i,u,o+ks,o,!0),p=0;p<s;++p)t.stroke();for(t.beginPath(),t.arc(n,i,l,o,o+ks),p=0;p<s;++p)t.stroke()}function Jst(t,e,r,n,i,o){const{options:a}=e,{borderWidth:s,borderJoinStyle:l}=a,u=a.borderAlign==="inner";!s||(u?(t.lineWidth=s*2,t.lineJoin=l||"round"):(t.lineWidth=s,t.lineJoin=l||"bevel"),e.fullCircles&&Qst(t,e,u),u&&_le(t,e,i),AU(t,e,r,n,i,o),t.stroke())}class vN extends id{constructor(e){super();this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,e&&Object.assign(this,e)}inRange(e,r,n){const i=this.getProps(["x","y"],n),{angle:o,distance:a}=Gse(i,{x:e,y:r}),{startAngle:s,endAngle:l,innerRadius:u,outerRadius:p,circumference:m}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],n),v=this.options.spacing/2,y=Hi(m,l-s)>=ks||YI(o,s,l),_=Ty(a,u+v,p+v);return y&&_}getCenterPoint(e){const{x:r,y:n,startAngle:i,endAngle:o,innerRadius:a,outerRadius:s}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius","circumference"],e),{offset:l,spacing:u}=this.options,p=(i+o)/2,m=(a+s+u+l)/2;return{x:r+Math.cos(p)*m,y:n+Math.sin(p)*m}}tooltipPosition(e){return this.getCenterPoint(e)}draw(e){const{options:r,circumference:n}=this,i=(r.offset||0)/2,o=(r.spacing||0)/2,a=r.circular;if(this.pixelMargin=r.borderAlign==="inner"?.33:0,this.fullCircles=n>ks?Math.floor(n/ks):0,n===0||this.innerRadius<0||this.outerRadius<0)return;e.save();let s=0;if(i){s=i/2;const u=(this.startAngle+this.endAngle)/2;e.translate(Math.cos(u)*s,Math.sin(u)*s),this.circumference>=Ra&&(s=i)}e.fillStyle=r.backgroundColor,e.strokeStyle=r.borderColor;const l=Zst(e,this,s,o,a);Jst(e,this,s,o,l,a),e.restore()}}vN.id="arc";vN.defaults={borderAlign:"center",borderColor:"#fff",borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0};vN.defaultRoutes={backgroundColor:"backgroundColor"};function ble(t,e,r=e){t.lineCap=Hi(r.borderCapStyle,e.borderCapStyle),t.setLineDash(Hi(r.borderDash,e.borderDash)),t.lineDashOffset=Hi(r.borderDashOffset,e.borderDashOffset),t.lineJoin=Hi(r.borderJoinStyle,e.borderJoinStyle),t.lineWidth=Hi(r.borderWidth,e.borderWidth),t.strokeStyle=Hi(r.borderColor,e.borderColor)}function eat(t,e,r){t.lineTo(r.x,r.y)}function tat(t){return t.stepped?wit:t.tension||t.cubicInterpolationMode==="monotone"?Cit:eat}function wle(t,e,r={}){const n=t.length,{start:i=0,end:o=n-1}=r,{start:a,end:s}=e,l=Math.max(i,a),u=Math.min(o,s),p=i<a&&o<a||i>s&&o>s;return{count:n,start:l,loop:e.loop,ilen:u<l&&!p?n+u-l:u-l}}function rat(t,e,r,n){const{points:i,options:o}=e,{count:a,start:s,loop:l,ilen:u}=wle(i,r,n),p=tat(o);let{move:m=!0,reverse:v}=n||{},x,y,_;for(x=0;x<=u;++x)y=i[(s+(v?u-x:x))%a],!y.skip&&(m?(t.moveTo(y.x,y.y),m=!1):p(t,_,y,v,o.stepped),_=y);return l&&(y=i[(s+(v?u:0))%a],p(t,_,y,v,o.stepped)),!!l}function nat(t,e,r,n){const i=e.points,{count:o,start:a,ilen:s}=wle(i,r,n),{move:l=!0,reverse:u}=n||{};let p=0,m=0,v,x,y,_,w,C;const E=A=>(a+(u?s-A:A))%o,T=()=>{_!==w&&(t.lineTo(p,w),t.lineTo(p,_),t.lineTo(p,C))};for(l&&(x=i[E(0)],t.moveTo(x.x,x.y)),v=0;v<=s;++v){if(x=i[E(v)],x.skip)continue;const A=x.x,k=x.y,X=A|0;X===y?(k<_?_=k:k>w&&(w=k),p=(m*p+A)/++m):(T(),t.lineTo(A,k),y=X,m=0,_=w=k),C=k}T()}function RU(t){const e=t.options,r=e.borderDash&&e.borderDash.length;return!t._decimated&&!t._loop&&!e.tension&&e.cubicInterpolationMode!=="monotone"&&!e.stepped&&!r?nat:rat}function iat(t){return t.stepped?eot:t.tension||t.cubicInterpolationMode==="monotone"?tot:vb}function oat(t,e,r,n){let i=e._path;i||(i=e._path=new Path2D,e.path(i,r,n)&&i.closePath()),ble(t,e.options),t.stroke(i)}function sat(t,e,r,n){const{segments:i,options:o}=e,a=RU(e);for(const s of i)ble(t,o,s.style),t.beginPath(),a(t,e,s,{start:r,end:r+n-1})&&t.closePath(),t.stroke()}const aat=typeof Path2D=="function";function lat(t,e,r,n){aat&&!e.options.segment?oat(t,e,r,n):sat(t,e,r,n)}class Yx extends id{constructor(e){super();this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,e&&Object.assign(this,e)}updateControlPoints(e,r){const n=this.options;if((n.tension||n.cubicInterpolationMode==="monotone")&&!n.stepped&&!this._pointsUpdated){const i=n.spanGaps?this._loop:this._fullLoop;Git(this._points,n,e,i,r),this._pointsUpdated=!0}}set points(e){this._points=e,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=lot(this,this.options.segment))}first(){const e=this.segments,r=this.points;return e.length&&r[e[0].start]}last(){const e=this.segments,r=this.points,n=e.length;return n&&r[e[n-1].end]}interpolate(e,r){const n=this.options,i=e[r],o=this.points,a=Oae(this,{property:r,start:i,end:i});if(!a.length)return;const s=[],l=iat(n);let u,p;for(u=0,p=a.length;u<p;++u){const{start:m,end:v}=a[u],x=o[m],y=o[v];if(x===y){s.push(x);continue}const _=Math.abs((i-x[r])/(y[r]-x[r])),w=l(x,y,_,n.stepped);w[r]=e[r],s.push(w)}return s.length===1?s[0]:s}pathSegment(e,r,n){return RU(this)(e,this,r,n)}path(e,r,n){const i=this.segments,o=RU(this);let a=this._loop;r=r||0,n=n||this.points.length-r;for(const s of i)a&=o(e,this,s,{start:r,end:r+n-1});return!!a}draw(e,r,n,i){const o=this.options||{};(this.points||[]).length&&o.borderWidth&&(e.save(),lat(e,this,n,i),e.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}Yx.id="line";Yx.defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};Yx.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};Yx.descriptors={_scriptable:!0,_indexable:t=>t!=="borderDash"&&t!=="fill"};function Cle(t,e,r,n){const i=t.options,{[r]:o}=t.getProps([r],n);return Math.abs(e-o)<i.radius+i.hitRadius}class yN extends id{constructor(e){super();this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,e&&Object.assign(this,e)}inRange(e,r,n){const i=this.options,{x:o,y:a}=this.getProps(["x","y"],n);return Math.pow(e-o,2)+Math.pow(r-a,2)<Math.pow(i.hitRadius+i.radius,2)}inXRange(e,r){return Cle(this,e,"x",r)}inYRange(e,r){return Cle(this,e,"y",r)}getCenterPoint(e){const{x:r,y:n}=this.getProps(["x","y"],e);return{x:r,y:n}}size(e){e=e||this.options||{};let r=e.radius||0;r=Math.max(r,r&&e.hoverRadius||0);const n=r&&e.borderWidth||0;return(r+n)*2}draw(e,r){const n=this.options;this.skip||n.radius<.1||!eM(this,r,this.size(n)/2)||(e.strokeStyle=n.borderColor,e.lineWidth=n.borderWidth,e.fillStyle=n.backgroundColor,dU(e,n,this.x,this.y))}getRange(){const e=this.options||{};return e.radius+e.hitRadius}}yN.id="point";yN.defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0};yN.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};function Ele(t,e){const{x:r,y:n,base:i,width:o,height:a}=t.getProps(["x","y","base","width","height"],e);let s,l,u,p,m;return t.horizontal?(m=a/2,s=Math.min(r,i),l=Math.max(r,i),u=n-m,p=n+m):(m=o/2,s=r-m,l=r+m,u=Math.min(n,i),p=Math.max(n,i)),{left:s,top:u,right:l,bottom:p}}function Kx(t,e,r,n){return t?0:wc(e,r,n)}function cat(t,e,r){const n=t.options.borderWidth,i=t.borderSkipped,o=mae(n);return{t:Kx(i.top,o.top,0,r),r:Kx(i.right,o.right,0,e),b:Kx(i.bottom,o.bottom,0,r),l:Kx(i.left,o.left,0,e)}}function uat(t,e,r){const{enableBorderRadius:n}=t.getProps(["enableBorderRadius"]),i=t.options.borderRadius,o=pb(i),a=Math.min(e,r),s=t.borderSkipped,l=n||uo(i);return{topLeft:Kx(!l||s.top||s.left,o.topLeft,0,a),topRight:Kx(!l||s.top||s.right,o.topRight,0,a),bottomLeft:Kx(!l||s.bottom||s.left,o.bottomLeft,0,a),bottomRight:Kx(!l||s.bottom||s.right,o.bottomRight,0,a)}}function fat(t){const e=Ele(t),r=e.right-e.left,n=e.bottom-e.top,i=cat(t,r/2,n/2),o=uat(t,r/2,n/2);return{outer:{x:e.left,y:e.top,w:r,h:n,radius:o},inner:{x:e.left+i.l,y:e.top+i.t,w:r-i.l-i.r,h:n-i.t-i.b,radius:{topLeft:Math.max(0,o.topLeft-Math.max(i.t,i.l)),topRight:Math.max(0,o.topRight-Math.max(i.t,i.r)),bottomLeft:Math.max(0,o.bottomLeft-Math.max(i.b,i.l)),bottomRight:Math.max(0,o.bottomRight-Math.max(i.b,i.r))}}}}function kU(t,e,r,n){const i=e===null,o=r===null,s=t&&!(i&&o)&&Ele(t,n);return s&&(i||Ty(e,s.left,s.right))&&(o||Ty(r,s.top,s.bottom))}function dat(t){return t.topLeft||t.topRight||t.bottomLeft||t.bottomRight}function hat(t,e){t.rect(e.x,e.y,e.w,e.h)}function OU(t,e,r={}){const n=t.x!==r.x?-e:0,i=t.y!==r.y?-e:0,o=(t.x+t.w!==r.x+r.w?e:0)-n,a=(t.y+t.h!==r.y+r.h?e:0)-i;return{x:t.x+n,y:t.y+i,w:t.w+o,h:t.h+a,radius:t.radius}}class xN extends id{constructor(e){super();this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,e&&Object.assign(this,e)}draw(e){const{inflateAmount:r,options:{borderColor:n,backgroundColor:i}}=this,{inner:o,outer:a}=fat(this),s=dat(a.radius)?nM:hat;e.save(),(a.w!==o.w||a.h!==o.h)&&(e.beginPath(),s(e,OU(a,r,o)),e.clip(),s(e,OU(o,-r,a)),e.fillStyle=n,e.fill("evenodd")),e.beginPath(),s(e,OU(o,r)),e.fillStyle=i,e.fill(),e.restore()}inRange(e,r,n){return kU(this,e,r,n)}inXRange(e,r){return kU(this,e,null,r)}inYRange(e,r){return kU(this,null,e,r)}getCenterPoint(e){const{x:r,y:n,base:i,horizontal:o}=this.getProps(["x","y","base","horizontal"],e);return{x:o?(r+i)/2:r,y:o?n:(n+i)/2}}getRange(e){return e==="x"?this.width/2:this.height/2}}xN.id="bar";xN.defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0};xN.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};var pat=Object.freeze({__proto__:null,ArcElement:vN,LineElement:Yx,PointElement:yN,BarElement:xN});function mat(t,e,r,n,i){const o=i.samples||n;if(o>=r)return t.slice(e,e+r);const a=[],s=(r-2)/(o-2);let l=0;const u=e+r-1;let p=e,m,v,x,y,_;for(a[l++]=t[p],m=0;m<o-2;m++){let w=0,C=0,E;const T=Math.floor((m+1)*s)+1+e,A=Math.min(Math.floor((m+2)*s)+1,r)+e,k=A-T;for(E=T;E<A;E++)w+=t[E].x,C+=t[E].y;w/=k,C/=k;const X=Math.floor(m*s)+1+e,Z=Math.min(Math.floor((m+1)*s)+1,r)+e,{x:W,y:D}=t[p];for(x=y=-1,E=X;E<Z;E++)y=.5*Math.abs((W-w)*(t[E].y-D)-(W-t[E].x)*(C-D)),y>x&&(x=y,v=t[E],_=E);a[l++]=v,p=_}return a[l++]=t[u],a}function gat(t,e,r,n){let i=0,o=0,a,s,l,u,p,m,v,x,y,_;const w=[],C=e+r-1,E=t[e].x,A=t[C].x-E;for(a=e;a<e+r;++a){s=t[a],l=(s.x-E)/A*n,u=s.y;const k=l|0;if(k===p)u<y?(y=u,m=a):u>_&&(_=u,v=a),i=(o*i+s.x)/++o;else{const X=a-1;if(!Qo(m)&&!Qo(v)){const Z=Math.min(m,v),W=Math.max(m,v);Z!==x&&Z!==X&&w.push(ul(io({},t[Z]),{x:i})),W!==x&&W!==X&&w.push(ul(io({},t[W]),{x:i}))}a>0&&X!==x&&w.push(t[X]),w.push(s),p=k,o=0,y=_=u,m=v=x=a}}return w}function Sle(t){if(t._decimated){const e=t._data;delete t._decimated,delete t._data,Object.defineProperty(t,"data",{value:e})}}function Tle(t){t.data.datasets.forEach(e=>{Sle(e)})}function vat(t,e){const r=e.length;let n=0,i;const{iScale:o}=t,{min:a,max:s,minDefined:l,maxDefined:u}=o.getUserBounds();return l&&(n=wc(Py(e,o.axis,a).lo,0,r-1)),u?i=wc(Py(e,o.axis,s).hi+1,n,r)-n:i=r-n,{start:n,count:i}}var yat={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(t,e,r)=>{if(!r.enabled){Tle(t);return}const n=t.width;t.data.datasets.forEach((i,o)=>{const{_data:a,indexAxis:s}=i,l=t.getDatasetMeta(o),u=a||i.data;if(iM([s,t.options.indexAxis])==="y"||!l.controller.supportsDecimation)return;const p=t.scales[l.xAxisID];if(p.type!=="linear"&&p.type!=="time"||t.options.parsing)return;let{start:m,count:v}=vat(l,u);const x=r.threshold||4*n;if(v<=x){Sle(i);return}Qo(a)&&(i._data=u,delete i.data,Object.defineProperty(i,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(_){this._data=_}}));let y;switch(r.algorithm){case"lttb":y=mat(u,m,v,n,r);break;case"min-max":y=gat(u,m,v,n);break;default:throw new Error(`Unsupported decimation algorithm '${r.algorithm}'`)}i._decimated=y})},destroy(t){Tle(t)}};function xat(t,e,r){const n=t.segments,i=t.points,o=e.points,a=[];for(const s of n){let{start:l,end:u}=s;u=DU(l,u,i);const p=LU(r,i[l],i[u],s.loop);if(!e.segments){a.push({source:s,target:p,start:i[l],end:i[u]});continue}const m=Oae(e,p);for(const v of m){const x=LU(r,o[v.start],o[v.end],v.loop),y=kae(s,i,x);for(const _ of y)a.push({source:_,target:v,start:{[r]:Ple(p,x,"start",Math.max)},end:{[r]:Ple(p,x,"end",Math.min)}})}}return a}function LU(t,e,r,n){if(n)return;let i=e[t],o=r[t];return t==="angle"&&(i=rh(i),o=rh(o)),{property:t,start:i,end:o}}function _at(t,e){const{x:r=null,y:n=null}=t||{},i=e.points,o=[];return e.segments.forEach(({start:a,end:s})=>{s=DU(a,s,i);const l=i[a],u=i[s];n!==null?(o.push({x:l.x,y:n}),o.push({x:u.x,y:n})):r!==null&&(o.push({x:r,y:l.y}),o.push({x:r,y:u.y}))}),o}function DU(t,e,r){for(;e>t;e--){const n=r[e];if(!isNaN(n.x)&&!isNaN(n.y))break}return e}function Ple(t,e,r,n){return t&&e?n(t[r],e[r]):t?t[r]:e?e[r]:0}function Ile(t,e){let r=[],n=!1;return Es(t)?(n=!0,r=t):r=_at(t,e),r.length?new Yx({points:r,options:{tension:0},_loop:n,_fullLoop:n}):null}function Mle(t){return t&&t.fill!==!1}function bat(t,e,r){let i=t[e].fill;const o=[e];let a;if(!r)return i;for(;i!==!1&&o.indexOf(i)===-1;){if(!Aa(i))return i;if(a=t[i],!a)return!1;if(a.visible)return i;o.push(i),i=a.fill}return!1}function wat(t,e,r){const n=Tat(t);if(uo(n))return isNaN(n.value)?!1:n;let i=parseFloat(n);return Aa(i)&&Math.floor(i)===i?Cat(n[0],e,i,r):["origin","start","end","stack","shape"].indexOf(n)>=0&&n}function Cat(t,e,r,n){return(t==="-"||t==="+")&&(r=e+r),r===e||r<0||r>=n?!1:r}function Eat(t,e){let r=null;return t==="start"?r=e.bottom:t==="end"?r=e.top:uo(t)?r=e.getPixelForValue(t.value):e.getBasePixel&&(r=e.getBasePixel()),r}function Sat(t,e,r){let n;return t==="start"?n=r:t==="end"?n=e.options.reverse?e.min:e.max:uo(t)?n=t.value:n=e.getBaseValue(),n}function Tat(t){const e=t.options,r=e.fill;let n=Hi(r&&r.target,r);return n===void 0&&(n=!!e.backgroundColor),n===!1||n===null?!1:n===!0?"origin":n}function Pat(t){const{scale:e,index:r,line:n}=t,i=[],o=n.segments,a=n.points,s=Iat(e,r);s.push(Ile({x:null,y:e.bottom},n));for(let l=0;l<o.length;l++){const u=o[l];for(let p=u.start;p<=u.end;p++)Mat(i,a[p],s)}return new Yx({points:i,options:{}})}function Iat(t,e){const r=[],n=t.getMatchingVisibleMetas("line");for(let i=0;i<n.length;i++){const o=n[i];if(o.index===e)break;o.hidden||r.unshift(o.dataset)}return r}function Mat(t,e,r){const n=[];for(let i=0;i<r.length;i++){const o=r[i],{first:a,last:s,point:l}=Aat(o,e,"x");if(!(!l||a&&s)){if(a)n.unshift(l);else if(t.push(l),!s)break}}t.push(...n)}function Aat(t,e,r){const n=t.interpolate(e,r);if(!n)return{};const i=n[r],o=t.segments,a=t.points;let s=!1,l=!1;for(let u=0;u<o.length;u++){const p=o[u],m=a[p.start][r],v=a[p.end][r];if(Ty(i,m,v)){s=i===m,l=i===v;break}}return{first:s,last:l,point:n}}class Ale{constructor(e){this.x=e.x,this.y=e.y,this.radius=e.radius}pathSegment(e,r,n){const{x:i,y:o,radius:a}=this;return r=r||{start:0,end:ks},e.arc(i,o,a,r.end,r.start,!0),!n.bounds}interpolate(e){const{x:r,y:n,radius:i}=this,o=e.angle;return{x:r+Math.cos(o)*i,y:n+Math.sin(o)*i,angle:o}}}function Rat(t){const{chart:e,fill:r,line:n}=t;if(Aa(r))return kat(e,r);if(r==="stack")return Pat(t);if(r==="shape")return!0;const i=Oat(t);return i instanceof Ale?i:Ile(i,n)}function kat(t,e){const r=t.getDatasetMeta(e);return r&&t.isDatasetVisible(e)?r.dataset:null}function Oat(t){return(t.scale||{}).getPointPositionForValue?Dat(t):Lat(t)}function Lat(t){const{scale:e={},fill:r}=t,n=Eat(r,e);if(Aa(n)){const i=e.isHorizontal();return{x:i?n:null,y:i?null:n}}return null}function Dat(t){const{scale:e,fill:r}=t,n=e.options,i=e.getLabels().length,o=n.reverse?e.max:e.min,a=Sat(r,e,o),s=[];if(n.grid.circular){const l=e.getPointPositionForValue(0,o);return new Ale({x:l.x,y:l.y,radius:e.getDistanceFromCenterForValue(a)})}for(let l=0;l<i;++l)s.push(e.getPointPositionForValue(l,a));return s}function NU(t,e,r){const n=Rat(e),{line:i,scale:o,axis:a}=e,s=i.options,l=s.fill,u=s.backgroundColor,{above:p=u,below:m=u}=l||{};n&&i.points.length&&(tM(t,r),Nat(t,{line:i,target:n,above:p,below:m,area:r,scale:o,axis:a}),rM(t))}function Nat(t,e){const{line:r,target:n,above:i,below:o,area:a,scale:s}=e,l=r._loop?"angle":e.axis;t.save(),l==="x"&&o!==i&&(Rle(t,n,a.top),kle(t,{line:r,target:n,color:i,scale:s,property:l}),t.restore(),t.save(),Rle(t,n,a.bottom)),kle(t,{line:r,target:n,color:o,scale:s,property:l}),t.restore()}function Rle(t,e,r){const{segments:n,points:i}=e;let o=!0,a=!1;t.beginPath();for(const s of n){const{start:l,end:u}=s,p=i[l],m=i[DU(l,u,i)];o?(t.moveTo(p.x,p.y),o=!1):(t.lineTo(p.x,r),t.lineTo(p.x,p.y)),a=!!e.pathSegment(t,s,{move:a}),a?t.closePath():t.lineTo(m.x,r)}t.lineTo(e.first().x,r),t.closePath(),t.clip()}function kle(t,e){const{line:r,target:n,property:i,color:o,scale:a}=e,s=xat(r,n,i);for(const{source:l,target:u,start:p,end:m}of s){const{style:{backgroundColor:v=o}={}}=l,x=n!==!0;t.save(),t.fillStyle=v,$at(t,a,x&&LU(i,p,m)),t.beginPath();const y=!!r.pathSegment(t,l);let _;if(x){y?t.closePath():Ole(t,n,m,i);const w=!!n.pathSegment(t,u,{move:y,reverse:!0});_=y&&w,_||Ole(t,n,p,i)}t.closePath(),t.fill(_?"evenodd":"nonzero"),t.restore()}}function $at(t,e,r){const{top:n,bottom:i}=e.chart.chartArea,{property:o,start:a,end:s}=r||{};o==="x"&&(t.beginPath(),t.rect(a,n,s-a,i-n),t.clip())}function Ole(t,e,r,n){const i=e.interpolate(r,n);i&&t.lineTo(i.x,i.y)}var Fat={id:"filler",afterDatasetsUpdate(t,e,r){const n=(t.data.datasets||[]).length,i=[];let o,a,s,l;for(a=0;a<n;++a)o=t.getDatasetMeta(a),s=o.dataset,l=null,s&&s.options&&s instanceof Yx&&(l={visible:t.isDatasetVisible(a),index:a,fill:wat(s,a,n),chart:t,axis:o.controller.options.indexAxis,scale:o.vScale,line:s}),o.$filler=l,i.push(l);for(a=0;a<n;++a)l=i[a],!(!l||l.fill===!1)&&(l.fill=bat(i,a,r.propagate))},beforeDraw(t,e,r){const n=r.drawTime==="beforeDraw",i=t.getSortedVisibleDatasetMetas(),o=t.chartArea;for(let a=i.length-1;a>=0;--a){const s=i[a].$filler;!s||(s.line.updateControlPoints(o,s.axis),n&&s.fill&&NU(t.ctx,s,o))}},beforeDatasetsDraw(t,e,r){if(r.drawTime!=="beforeDatasetsDraw")return;const n=t.getSortedVisibleDatasetMetas();for(let i=n.length-1;i>=0;--i){const o=n[i].$filler;Mle(o)&&NU(t.ctx,o,t.chartArea)}},beforeDatasetDraw(t,e,r){const n=e.meta.$filler;!Mle(n)||r.drawTime!=="beforeDatasetDraw"||NU(t.ctx,n,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const Lle=(t,e)=>{let{boxHeight:r=e,boxWidth:n=e}=t;return t.usePointStyle&&(r=Math.min(r,e),n=t.pointStyleWidth||Math.min(n,e)),{boxWidth:n,boxHeight:r,itemHeight:Math.max(e,r)}},zat=(t,e)=>t!==null&&e!==null&&t.datasetIndex===e.datasetIndex&&t.index===e.index;class Dle extends id{constructor(e){super();this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,r,n){this.maxWidth=e,this.maxHeight=r,this._margins=n,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const e=this.options.labels||{};let r=Vs(e.generateLabels,[this.chart],this)||[];e.filter&&(r=r.filter(n=>e.filter(n,this.chart.data))),e.sort&&(r=r.sort((n,i)=>e.sort(n,i,this.chart.data))),this.options.reverse&&r.reverse(),this.legendItems=r}fit(){const{options:e,ctx:r}=this;if(!e.display){this.width=this.height=0;return}const n=e.labels,i=ec(n.font),o=i.size,a=this._computeTitleHeight(),{boxWidth:s,itemHeight:l}=Lle(n,o);let u,p;r.font=i.string,this.isHorizontal()?(u=this.maxWidth,p=this._fitRows(a,o,s,l)+10):(p=this.maxHeight,u=this._fitCols(a,o,s,l)+10),this.width=Math.min(u,e.maxWidth||this.maxWidth),this.height=Math.min(p,e.maxHeight||this.maxHeight)}_fitRows(e,r,n,i){const{ctx:o,maxWidth:a,options:{labels:{padding:s}}}=this,l=this.legendHitBoxes=[],u=this.lineWidths=[0],p=i+s;let m=e;o.textAlign="left",o.textBaseline="middle";let v=-1,x=-p;return this.legendItems.forEach((y,_)=>{const w=n+r/2+o.measureText(y.text).width;(_===0||u[u.length-1]+w+2*s>a)&&(m+=p,u[u.length-(_>0?0:1)]=0,x+=p,v++),l[_]={left:0,top:x,row:v,width:w,height:i},u[u.length-1]+=w+s}),m}_fitCols(e,r,n,i){const{ctx:o,maxHeight:a,options:{labels:{padding:s}}}=this,l=this.legendHitBoxes=[],u=this.columnSizes=[],p=a-e;let m=s,v=0,x=0,y=0,_=0;return this.legendItems.forEach((w,C)=>{const E=n+r/2+o.measureText(w.text).width;C>0&&x+i+2*s>p&&(m+=v+s,u.push({width:v,height:x}),y+=v+s,_++,v=x=0),l[C]={left:y,top:x,col:_,width:E,height:i},v=Math.max(v,E),x+=i+s}),m+=v,u.push({width:v,height:x}),m}adjustHitBoxes(){if(!this.options.display)return;const e=this._computeTitleHeight(),{legendHitBoxes:r,options:{align:n,labels:{padding:i},rtl:o}}=this,a=eE(o,this.left,this.width);if(this.isHorizontal()){let s=0,l=Mu(n,this.left+i,this.right-this.lineWidths[s]);for(const u of r)s!==u.row&&(s=u.row,l=Mu(n,this.left+i,this.right-this.lineWidths[s])),u.top+=this.top+e+i,u.left=a.leftForLtr(a.x(l),u.width),l+=u.width+i}else{let s=0,l=Mu(n,this.top+e+i,this.bottom-this.columnSizes[s].height);for(const u of r)u.col!==s&&(s=u.col,l=Mu(n,this.top+e+i,this.bottom-this.columnSizes[s].height)),u.top=l,u.left+=this.left+i,u.left=a.leftForLtr(a.x(u.left),u.width),l+=u.height+i}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const e=this.ctx;tM(e,this),this._draw(),rM(e)}}_draw(){const{options:e,columnSizes:r,lineWidths:n,ctx:i}=this,{align:o,labels:a}=e,s=ko.color,l=eE(e.rtl,this.left,this.width),u=ec(a.font),{color:p,padding:m}=a,v=u.size,x=v/2;let y;this.drawTitle(),i.textAlign=l.textAlign("left"),i.textBaseline="middle",i.lineWidth=.5,i.font=u.string;const{boxWidth:_,boxHeight:w,itemHeight:C}=Lle(a,v),E=function(Z,W,D){if(isNaN(_)||_<=0||isNaN(w)||w<0)return;i.save();const H=Hi(D.lineWidth,1);if(i.fillStyle=Hi(D.fillStyle,s),i.lineCap=Hi(D.lineCap,"butt"),i.lineDashOffset=Hi(D.lineDashOffset,0),i.lineJoin=Hi(D.lineJoin,"miter"),i.lineWidth=H,i.strokeStyle=Hi(D.strokeStyle,s),i.setLineDash(Hi(D.lineDash,[])),a.usePointStyle){const N={radius:w*Math.SQRT2/2,pointStyle:D.pointStyle,rotation:D.rotation,borderWidth:H},j=l.xPlus(Z,_/2),$=W+x;pae(i,N,j,$,a.pointStyleWidth&&_)}else{const N=W+Math.max((v-w)/2,0),j=l.leftForLtr(Z,_),$=pb(D.borderRadius);i.beginPath(),Object.values($).some(z=>z!==0)?nM(i,{x:j,y:N,w:_,h:w,radius:$}):i.rect(j,N,_,w),i.fill(),H!==0&&i.stroke()}i.restore()},T=function(Z,W,D){hb(i,D.text,Z,W+C/2,u,{strikethrough:D.hidden,textAlign:l.textAlign(D.textAlign)})},A=this.isHorizontal(),k=this._computeTitleHeight();A?y={x:Mu(o,this.left+m,this.right-n[0]),y:this.top+m+k,line:0}:y={x:this.left+m,y:Mu(o,this.top+k+m,this.bottom-r[0].height),line:0},Iae(this.ctx,e.textDirection);const X=C+m;this.legendItems.forEach((Z,W)=>{i.strokeStyle=Z.fontColor||p,i.fillStyle=Z.fontColor||p;const D=i.measureText(Z.text).width,H=l.textAlign(Z.textAlign||(Z.textAlign=a.textAlign)),N=_+x+D;let j=y.x,$=y.y;l.setWidth(this.width),A?W>0&&j+N+m>this.right&&($=y.y+=X,y.line++,j=y.x=Mu(o,this.left+m,this.right-n[y.line])):W>0&&$+X>this.bottom&&(j=y.x=j+r[y.line].width+m,y.line++,$=y.y=Mu(o,this.top+k+m,this.bottom-r[y.line].height));const z=l.x(j);E(z,$,Z),j=Znt(H,j+_+x,A?j+N:this.right,e.rtl),T(l.x(j),$,Z),A?y.x+=N+m:y.y+=X}),Mae(this.ctx,e.textDirection)}drawTitle(){const e=this.options,r=e.title,n=ec(r.font),i=Au(r.padding);if(!r.display)return;const o=eE(e.rtl,this.left,this.width),a=this.ctx,s=r.position,l=n.size/2,u=i.top+l;let p,m=this.left,v=this.width;if(this.isHorizontal())v=Math.max(...this.lineWidths),p=this.top+u,m=Mu(e.align,m,this.right-v);else{const y=this.columnSizes.reduce((_,w)=>Math.max(_,w.height),0);p=u+Mu(e.align,this.top,this.bottom-y-e.labels.padding-this._computeTitleHeight())}const x=Mu(s,m,m+v);a.textAlign=o.textAlign(nU(s)),a.textBaseline="middle",a.strokeStyle=r.color,a.fillStyle=r.color,a.font=n.string,hb(a,r.text,x,p,n)}_computeTitleHeight(){const e=this.options.title,r=ec(e.font),n=Au(e.padding);return e.display?r.lineHeight+n.height:0}_getLegendItemAt(e,r){let n,i,o;if(Ty(e,this.left,this.right)&&Ty(r,this.top,this.bottom)){for(o=this.legendHitBoxes,n=0;n<o.length;++n)if(i=o[n],Ty(e,i.left,i.left+i.width)&&Ty(r,i.top,i.top+i.height))return this.legendItems[n]}return null}handleEvent(e){const r=this.options;if(!Bat(e.type,r))return;const n=this._getLegendItemAt(e.x,e.y);if(e.type==="mousemove"||e.type==="mouseout"){const i=this._hoveredItem,o=zat(i,n);i&&!o&&Vs(r.onLeave,[e,i,this],this),this._hoveredItem=n,n&&!o&&Vs(r.onHover,[e,n,this],this)}else n&&Vs(r.onClick,[e,n,this],this)}}function Bat(t,e){return!!((t==="mousemove"||t==="mouseout")&&(e.onHover||e.onLeave)||e.onClick&&(t==="click"||t==="mouseup"))}var jat={id:"legend",_element:Dle,start(t,e,r){const n=t.legend=new Dle({ctx:t.ctx,options:r,chart:t});Ru.configure(t,n,r),Ru.addBox(t,n)},stop(t){Ru.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,r){const n=t.legend;Ru.configure(t,n,r),n.options=r},afterUpdate(t){const e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,r){const n=e.datasetIndex,i=r.chart;i.isDatasetVisible(n)?(i.hide(n),e.hidden=!0):(i.show(n),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:r,pointStyle:n,textAlign:i,color:o}}=t.legend.options;return t._getSortedDatasetMetas().map(a=>{const s=a.controller.getStyle(r?0:void 0),l=Au(s.borderWidth);return{text:e[a.index].label,fillStyle:s.backgroundColor,fontColor:o,hidden:!a.visible,lineCap:s.borderCapStyle,lineDash:s.borderDash,lineDashOffset:s.borderDashOffset,lineJoin:s.borderJoinStyle,lineWidth:(l.width+l.height)/4,strokeStyle:s.borderColor,pointStyle:n||s.pointStyle,rotation:s.rotation,textAlign:i||s.textAlign,borderRadius:0,datasetIndex:a.index}},this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};class $U extends id{constructor(e){super();this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,r){const n=this.options;if(this.left=0,this.top=0,!n.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=e,this.height=this.bottom=r;const i=Es(n.text)?n.text.length:1;this._padding=Au(n.padding);const o=i*ec(n.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=o:this.width=o}isHorizontal(){const e=this.options.position;return e==="top"||e==="bottom"}_drawArgs(e){const{top:r,left:n,bottom:i,right:o,options:a}=this,s=a.align;let l=0,u,p,m;return this.isHorizontal()?(p=Mu(s,n,o),m=r+e,u=o-n):(a.position==="left"?(p=n+e,m=Mu(s,i,r),l=Ra*-.5):(p=o-e,m=Mu(s,r,i),l=Ra*.5),u=i-r),{titleX:p,titleY:m,maxWidth:u,rotation:l}}draw(){const e=this.ctx,r=this.options;if(!r.display)return;const n=ec(r.font),o=n.lineHeight/2+this._padding.top,{titleX:a,titleY:s,maxWidth:l,rotation:u}=this._drawArgs(o);hb(e,r.text,0,0,n,{color:r.color,maxWidth:l,rotation:u,textAlign:nU(r.align),textBaseline:"middle",translation:[a,s]})}}function Uat(t,e){const r=new $U({ctx:t.ctx,options:e,chart:t});Ru.configure(t,r,e),Ru.addBox(t,r),t.titleBlock=r}var Vat={id:"title",_element:$U,start(t,e,r){Uat(t,r)},stop(t){const e=t.titleBlock;Ru.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,r){const n=t.titleBlock;Ru.configure(t,n,r),n.options=r},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const _N=new WeakMap;var Hat={id:"subtitle",start(t,e,r){const n=new $U({ctx:t.ctx,options:r,chart:t});Ru.configure(t,n,r),Ru.addBox(t,n),_N.set(t,n)},stop(t){Ru.removeBox(t,_N.get(t)),_N.delete(t)},beforeUpdate(t,e,r){const n=_N.get(t);Ru.configure(t,n,r),n.options=r},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const pM={average(t){if(!t.length)return!1;let e,r,n=0,i=0,o=0;for(e=0,r=t.length;e<r;++e){const a=t[e].element;if(a&&a.hasValue()){const s=a.tooltipPosition();n+=s.x,i+=s.y,++o}}return{x:n/o,y:i/o}},nearest(t,e){if(!t.length)return!1;let r=e.x,n=e.y,i=Number.POSITIVE_INFINITY,o,a,s;for(o=0,a=t.length;o<a;++o){const l=t[o].element;if(l&&l.hasValue()){const u=l.getCenterPoint(),p=q3(e,u);p<i&&(i=p,s=l)}}if(s){const l=s.tooltipPosition();r=l.x,n=l.y}return{x:r,y:n}}};function rv(t,e){return e&&(Es(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function Ay(t){return(typeof t=="string"||t instanceof String)&&t.indexOf(` `)>-1?t.split(` `):t}function Wat(t,e){const{element:r,datasetIndex:n,index:i}=e,o=t.getDatasetMeta(n).controller,{label:a,value:s}=o.getLabelAndValue(i);return{chart:t,label:a,parsed:o.getParsed(i),raw:t.data.datasets[n].data[i],formattedValue:s,dataset:o.getDataset(),dataIndex:i,datasetIndex:n,element:r}}function Nle(t,e){const r=t.chart.ctx,{body:n,footer:i,title:o}=t,{boxWidth:a,boxHeight:s}=e,l=ec(e.bodyFont),u=ec(e.titleFont),p=ec(e.footerFont),m=o.length,v=i.length,x=n.length,y=Au(e.padding);let _=y.height,w=0,C=n.reduce((A,k)=>A+k.before.length+k.lines.length+k.after.length,0);if(C+=t.beforeBody.length+t.afterBody.length,m&&(_+=m*u.lineHeight+(m-1)*e.titleSpacing+e.titleMarginBottom),C){const A=e.displayColors?Math.max(s,l.lineHeight):l.lineHeight;_+=x*A+(C-x)*l.lineHeight+(C-1)*e.bodySpacing}v&&(_+=e.footerMarginTop+v*p.lineHeight+(v-1)*e.footerSpacing);let E=0;const T=function(A){w=Math.max(w,r.measureText(A).width+E)};return r.save(),r.font=u.string,Ss(t.title,T),r.font=l.string,Ss(t.beforeBody.concat(t.afterBody),T),E=e.displayColors?a+2+e.boxPadding:0,Ss(n,A=>{Ss(A.before,T),Ss(A.lines,T),Ss(A.after,T)}),E=0,r.font=p.string,Ss(t.footer,T),r.restore(),w+=y.width,{width:w,height:_}}function Gat(t,e){const{y:r,height:n}=e;return r<n/2?"top":r>t.height-n/2?"bottom":"center"}function qat(t,e,r,n){const{x:i,width:o}=n,a=r.caretSize+r.caretPadding;if(t==="left"&&i+o+a>e.width||t==="right"&&i-o-a<0)return!0}function Xat(t,e,r,n){const{x:i,width:o}=r,{width:a,chartArea:{left:s,right:l}}=t;let u="center";return n==="center"?u=i<=(s+l)/2?"left":"right":i<=o/2?u="left":i>=a-o/2&&(u="right"),qat(u,t,e,r)&&(u="center"),u}function $le(t,e,r){const n=r.yAlign||e.yAlign||Gat(t,r);return{xAlign:r.xAlign||e.xAlign||Xat(t,e,r,n),yAlign:n}}function Yat(t,e){let{x:r,width:n}=t;return e==="right"?r-=n:e==="center"&&(r-=n/2),r}function Kat(t,e,r){let{y:n,height:i}=t;return e==="top"?n+=r:e==="bottom"?n-=i+r:n-=i/2,n}function Fle(t,e,r,n){const{caretSize:i,caretPadding:o,cornerRadius:a}=t,{xAlign:s,yAlign:l}=r,u=i+o,{topLeft:p,topRight:m,bottomLeft:v,bottomRight:x}=pb(a);let y=Yat(e,s);const _=Kat(e,l,u);return l==="center"?s==="left"?y+=u:s==="right"&&(y-=u):s==="left"?y-=Math.max(p,v)+i:s==="right"&&(y+=Math.max(m,x)+i),{x:wc(y,0,n.width-e.width),y:wc(_,0,n.height-e.height)}}function bN(t,e,r){const n=Au(r.padding);return e==="center"?t.x+t.width/2:e==="right"?t.x+t.width-n.right:t.x+n.left}function zle(t){return rv([],Ay(t))}function Zat(t,e,r){return qx(t,{tooltip:e,tooltipItems:r,type:"tooltip"})}function Ble(t,e){const r=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return r?t.override(r):t}class FU extends id{constructor(e){super();this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=e.chart||e._chart,this._chart=this.chart,this.options=e.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const e=this._cachedAnimations;if(e)return e;const r=this.chart,n=this.options.setContext(this.getContext()),i=n.enabled&&r.options.animation&&n.animations,o=new xU(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=Zat(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,r){const{callbacks:n}=r,i=n.beforeTitle.apply(this,[e]),o=n.title.apply(this,[e]),a=n.afterTitle.apply(this,[e]);let s=[];return s=rv(s,Ay(i)),s=rv(s,Ay(o)),s=rv(s,Ay(a)),s}getBeforeBody(e,r){return zle(r.callbacks.beforeBody.apply(this,[e]))}getBody(e,r){const{callbacks:n}=r,i=[];return Ss(e,o=>{const a={before:[],lines:[],after:[]},s=Ble(n,o);rv(a.before,Ay(s.beforeLabel.call(this,o))),rv(a.lines,s.label.call(this,o)),rv(a.after,Ay(s.afterLabel.call(this,o))),i.push(a)}),i}getAfterBody(e,r){return zle(r.callbacks.afterBody.apply(this,[e]))}getFooter(e,r){const{callbacks:n}=r,i=n.beforeFooter.apply(this,[e]),o=n.footer.apply(this,[e]),a=n.afterFooter.apply(this,[e]);let s=[];return s=rv(s,Ay(i)),s=rv(s,Ay(o)),s=rv(s,Ay(a)),s}_createItems(e){const r=this._active,n=this.chart.data,i=[],o=[],a=[];let s=[],l,u;for(l=0,u=r.length;l<u;++l)s.push(Wat(this.chart,r[l]));return e.filter&&(s=s.filter((p,m,v)=>e.filter(p,m,v,n))),e.itemSort&&(s=s.sort((p,m)=>e.itemSort(p,m,n))),Ss(s,p=>{const m=Ble(e.callbacks,p);i.push(m.labelColor.call(this,p)),o.push(m.labelPointStyle.call(this,p)),a.push(m.labelTextColor.call(this,p))}),this.labelColors=i,this.labelPointStyles=o,this.labelTextColors=a,this.dataPoints=s,s}update(e,r){const n=this.options.setContext(this.getContext()),i=this._active;let o,a=[];if(!i.length)this.opacity!==0&&(o={opacity:0});else{const s=pM[n.position].call(this,i,this._eventPosition);a=this._createItems(n),this.title=this.getTitle(a,n),this.beforeBody=this.getBeforeBody(a,n),this.body=this.getBody(a,n),this.afterBody=this.getAfterBody(a,n),this.footer=this.getFooter(a,n);const l=this._size=Nle(this,n),u=Object.assign({},s,l),p=$le(this.chart,n,u),m=Fle(n,u,p,this.chart);this.xAlign=p.xAlign,this.yAlign=p.yAlign,o={opacity:1,x:m.x,y:m.y,width:l.width,height:l.height,caretX:s.x,caretY:s.y}}this._tooltipItems=a,this.$context=void 0,o&&this._resolveAnimations().update(this,o),e&&n.external&&n.external.call(this,{chart:this.chart,tooltip:this,replay:r})}drawCaret(e,r,n,i){const o=this.getCaretPosition(e,n,i);r.lineTo(o.x1,o.y1),r.lineTo(o.x2,o.y2),r.lineTo(o.x3,o.y3)}getCaretPosition(e,r,n){const{xAlign:i,yAlign:o}=this,{caretSize:a,cornerRadius:s}=n,{topLeft:l,topRight:u,bottomLeft:p,bottomRight:m}=pb(s),{x:v,y:x}=e,{width:y,height:_}=r;let w,C,E,T,A,k;return o==="center"?(A=x+_/2,i==="left"?(w=v,C=w-a,T=A+a,k=A-a):(w=v+y,C=w+a,T=A-a,k=A+a),E=w):(i==="left"?C=v+Math.max(l,p)+a:i==="right"?C=v+y-Math.max(u,m)-a:C=this.caretX,o==="top"?(T=x,A=T-a,w=C-a,E=C+a):(T=x+_,A=T+a,w=C+a,E=C-a),k=T),{x1:w,x2:C,x3:E,y1:T,y2:A,y3:k}}drawTitle(e,r,n){const i=this.title,o=i.length;let a,s,l;if(o){const u=eE(n.rtl,this.x,this.width);for(e.x=bN(this,n.titleAlign,n),r.textAlign=u.textAlign(n.titleAlign),r.textBaseline="middle",a=ec(n.titleFont),s=n.titleSpacing,r.fillStyle=n.titleColor,r.font=a.string,l=0;l<o;++l)r.fillText(i[l],u.x(e.x),e.y+a.lineHeight/2),e.y+=a.lineHeight+s,l+1===o&&(e.y+=n.titleMarginBottom-s)}}_drawColorBox(e,r,n,i,o){const a=this.labelColors[n],s=this.labelPointStyles[n],{boxHeight:l,boxWidth:u,boxPadding:p}=o,m=ec(o.bodyFont),v=bN(this,"left",o),x=i.x(v),y=l<m.lineHeight?(m.lineHeight-l)/2:0,_=r.y+y;if(o.usePointStyle){const w={radius:Math.min(u,l)/2,pointStyle:s.pointStyle,rotation:s.rotation,borderWidth:1},C=i.leftForLtr(x,u)+u/2,E=_+l/2;e.strokeStyle=o.multiKeyBackground,e.fillStyle=o.multiKeyBackground,dU(e,w,C,E),e.strokeStyle=a.borderColor,e.fillStyle=a.backgroundColor,dU(e,w,C,E)}else{e.lineWidth=uo(a.borderWidth)?Math.max(...Object.values(a.borderWidth)):a.borderWidth||1,e.strokeStyle=a.borderColor,e.setLineDash(a.borderDash||[]),e.lineDashOffset=a.borderDashOffset||0;const w=i.leftForLtr(x,u-p),C=i.leftForLtr(i.xPlus(x,1),u-p-2),E=pb(a.borderRadius);Object.values(E).some(T=>T!==0)?(e.beginPath(),e.fillStyle=o.multiKeyBackground,nM(e,{x:w,y:_,w:u,h:l,radius:E}),e.fill(),e.stroke(),e.fillStyle=a.backgroundColor,e.beginPath(),nM(e,{x:C,y:_+1,w:u-2,h:l-2,radius:E}),e.fill()):(e.fillStyle=o.multiKeyBackground,e.fillRect(w,_,u,l),e.strokeRect(w,_,u,l),e.fillStyle=a.backgroundColor,e.fillRect(C,_+1,u-2,l-2))}e.fillStyle=this.labelTextColors[n]}drawBody(e,r,n){const{body:i}=this,{bodySpacing:o,bodyAlign:a,displayColors:s,boxHeight:l,boxWidth:u,boxPadding:p}=n,m=ec(n.bodyFont);let v=m.lineHeight,x=0;const y=eE(n.rtl,this.x,this.width),_=function(W){r.fillText(W,y.x(e.x+x),e.y+v/2),e.y+=v+o},w=y.textAlign(a);let C,E,T,A,k,X,Z;for(r.textAlign=a,r.textBaseline="middle",r.font=m.string,e.x=bN(this,w,n),r.fillStyle=n.bodyColor,Ss(this.beforeBody,_),x=s&&w!=="right"?a==="center"?u/2+p:u+2+p:0,A=0,X=i.length;A<X;++A){for(C=i[A],E=this.labelTextColors[A],r.fillStyle=E,Ss(C.before,_),T=C.lines,s&&T.length&&(this._drawColorBox(r,e,A,y,n),v=Math.max(m.lineHeight,l)),k=0,Z=T.length;k<Z;++k)_(T[k]),v=m.lineHeight;Ss(C.after,_)}x=0,v=m.lineHeight,Ss(this.afterBody,_),e.y-=o}drawFooter(e,r,n){const i=this.footer,o=i.length;let a,s;if(o){const l=eE(n.rtl,this.x,this.width);for(e.x=bN(this,n.footerAlign,n),e.y+=n.footerMarginTop,r.textAlign=l.textAlign(n.footerAlign),r.textBaseline="middle",a=ec(n.footerFont),r.fillStyle=n.footerColor,r.font=a.string,s=0;s<o;++s)r.fillText(i[s],l.x(e.x),e.y+a.lineHeight/2),e.y+=a.lineHeight+n.footerSpacing}}drawBackground(e,r,n,i){const{xAlign:o,yAlign:a}=this,{x:s,y:l}=e,{width:u,height:p}=n,{topLeft:m,topRight:v,bottomLeft:x,bottomRight:y}=pb(i.cornerRadius);r.fillStyle=i.backgroundColor,r.strokeStyle=i.borderColor,r.lineWidth=i.borderWidth,r.beginPath(),r.moveTo(s+m,l),a==="top"&&this.drawCaret(e,r,n,i),r.lineTo(s+u-v,l),r.quadraticCurveTo(s+u,l,s+u,l+v),a==="center"&&o==="right"&&this.drawCaret(e,r,n,i),r.lineTo(s+u,l+p-y),r.quadraticCurveTo(s+u,l+p,s+u-y,l+p),a==="bottom"&&this.drawCaret(e,r,n,i),r.lineTo(s+x,l+p),r.quadraticCurveTo(s,l+p,s,l+p-x),a==="center"&&o==="left"&&this.drawCaret(e,r,n,i),r.lineTo(s,l+m),r.quadraticCurveTo(s,l,s+m,l),r.closePath(),r.fill(),i.borderWidth>0&&r.stroke()}_updateAnimationTarget(e){const r=this.chart,n=this.$animations,i=n&&n.x,o=n&&n.y;if(i||o){const a=pM[e.position].call(this,this._active,this._eventPosition);if(!a)return;const s=this._size=Nle(this,e),l=Object.assign({},a,this._size),u=$le(r,e,l),p=Fle(e,l,u,r);(i._to!==p.x||o._to!==p.y)&&(this.xAlign=u.xAlign,this.yAlign=u.yAlign,this.width=s.width,this.height=s.height,this.caretX=a.x,this.caretY=a.y,this._resolveAnimations().update(this,p))}}_willRender(){return!!this.opacity}draw(e){const r=this.options.setContext(this.getContext());let n=this.opacity;if(!n)return;this._updateAnimationTarget(r);const i={width:this.width,height:this.height},o={x:this.x,y:this.y};n=Math.abs(n)<.001?0:n;const a=Au(r.padding),s=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;r.enabled&&s&&(e.save(),e.globalAlpha=n,this.drawBackground(o,e,i,r),Iae(e,r.textDirection),o.y+=a.top,this.drawTitle(o,e,r),this.drawBody(o,e,r),this.drawFooter(o,e,r),Mae(e,r.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,r){const n=this._active,i=e.map(({datasetIndex:s,index:l})=>{const u=this.chart.getDatasetMeta(s);if(!u)throw new Error("Cannot find a dataset at index "+s);return{datasetIndex:s,element:u.data[l],index:l}}),o=!H3(n,i),a=this._positionChanged(i,r);(o||a)&&(this._active=i,this._eventPosition=r,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,r,n=!0){if(r&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const i=this.options,o=this._active||[],a=this._getActiveElements(e,o,r,n),s=this._positionChanged(a,e),l=r||!H3(a,o)||s;return l&&(this._active=a,(i.enabled||i.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,r))),l}_getActiveElements(e,r,n,i){const o=this.options;if(e.type==="mouseout")return[];if(!i)return r;const a=this.chart.getElementsAtEventForMode(e,o.mode,o,n);return o.reverse&&a.reverse(),a}_positionChanged(e,r){const{caretX:n,caretY:i,options:o}=this,a=pM[o.position].call(this,e,r);return a!==!1&&(n!==a.x||i!==a.y)}}FU.positioners=pM;var Qat={id:"tooltip",_element:FU,positioners:pM,afterInit(t,e,r){r&&(t.tooltip=new FU({chart:t,options:r}))},beforeUpdate(t,e,r){t.tooltip&&t.tooltip.initialize(r)},reset(t,e,r){t.tooltip&&t.tooltip.initialize(r)},afterDraw(t){const e=t.tooltip;if(e&&e._willRender()){const r={tooltip:e};if(t.notifyPlugins("beforeTooltipDraw",r)===!1)return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",r)}},afterEvent(t,e){if(t.tooltip){const r=e.replay;t.tooltip.handleEvent(e.event,r,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:{beforeTitle:Sy,title(t){if(t.length>0){const e=t[0],r=e.chart.data.labels,n=r?r.length:0;if(this&&this.options&&this.options.mode==="dataset")return e.dataset.label||"";if(e.label)return e.label;if(n>0&&e.dataIndex<n)return r[e.dataIndex]}return""},afterTitle:Sy,beforeBody:Sy,beforeLabel:Sy,label(t){if(this&&this.options&&this.options.mode==="dataset")return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");const r=t.formattedValue;return Qo(r)||(e+=r),e},labelColor(t){const r=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{borderColor:r.borderColor,backgroundColor:r.backgroundColor,borderWidth:r.borderWidth,borderDash:r.borderDash,borderDashOffset:r.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){const r=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:r.pointStyle,rotation:r.rotation}},afterLabel:Sy,afterBody:Sy,beforeFooter:Sy,footer:Sy,afterFooter:Sy}},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>t!=="filter"&&t!=="itemSort"&&t!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},Jat=Object.freeze({__proto__:null,Decimation:yat,Filler:Fat,Legend:jat,SubTitle:Hat,Title:Vat,Tooltip:Qat});const elt=(t,e,r,n)=>(typeof e=="string"?(r=t.push(e)-1,n.unshift({index:r,label:e})):isNaN(e)&&(r=null),r);function tlt(t,e,r,n){const i=t.indexOf(e);if(i===-1)return elt(t,e,r,n);const o=t.lastIndexOf(e);return i!==o?r:i}const rlt=(t,e)=>t===null?null:wc(Math.round(t),0,e);class wN extends yb{constructor(e){super(e);this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(e){const r=this._addedLabels;if(r.length){const n=this.getLabels();for(const{index:i,label:o}of r)n[i]===o&&n.splice(i,1);this._addedLabels=[]}super.init(e)}parse(e,r){if(Qo(e))return null;const n=this.getLabels();return r=isFinite(r)&&n[r]===e?r:tlt(n,e,Hi(r,e),this._addedLabels),rlt(r,n.length-1)}determineDataLimits(){const{minDefined:e,maxDefined:r}=this.getUserBounds();let{min:n,max:i}=this.getMinMax(!0);this.options.bounds==="ticks"&&(e||(n=0),r||(i=this.getLabels().length-1)),this.min=n,this.max=i}buildTicks(){const e=this.min,r=this.max,n=this.options.offset,i=[];let o=this.getLabels();o=e===0&&r===o.length-1?o:o.slice(e,r+1),this._valueRange=Math.max(o.length-(n?0:1),1),this._startValue=this.min-(n?.5:0);for(let a=e;a<=r;a++)i.push({value:a});return i}getLabelForValue(e){const r=this.getLabels();return e>=0&&e<r.length?r[e]:e}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(e){return typeof e!="number"&&(e=this.parse(e)),e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getPixelForTick(e){const r=this.ticks;return e<0||e>r.length-1?null:this.getPixelForValue(r[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}}wN.id="category";wN.defaults={ticks:{callback:wN.prototype.getLabelForValue}};function nlt(t,e){const r=[],n=1e-14,{bounds:i,step:o,min:a,max:s,precision:l,count:u,maxTicks:p,maxDigits:m,includeBounds:v}=t,x=o||1,y=p-1,{min:_,max:w}=e,C=!Qo(a),E=!Qo(s),T=!Qo(u),A=(w-_)/(m+1);let k=Vse((w-_)/y/x)*x,X,Z,W,D;if(k<n&&!C&&!E)return[{value:_},{value:w}];D=Math.ceil(w/k)-Math.floor(_/k),D>y&&(k=Vse(D*k/y/x)*x),Qo(l)||(X=Math.pow(10,l),k=Math.ceil(k*X)/X),i==="ticks"?(Z=Math.floor(_/k)*k,W=Math.ceil(w/k)*k):(Z=_,W=w),C&&E&&o&&Hnt((s-a)/o,k/1e3)?(D=Math.round(Math.min((s-a)/k,p)),k=(s-a)/D,Z=a,W=s):T?(Z=C?a:Z,W=E?s:W,D=u-1,k=(W-Z)/D):(D=(W-Z)/k,XI(D,Math.round(D),k/1e3)?D=Math.round(D):D=Math.ceil(D));const H=Math.max(Wse(k),Wse(Z));X=Math.pow(10,Qo(l)?H:l),Z=Math.round(Z*X)/X,W=Math.round(W*X)/X;let N=0;for(C&&(v&&Z!==a?(r.push({value:a}),Z<a&&N++,XI(Math.round((Z+N*k)*X)/X,a,jle(a,A,t))&&N++):Z<a&&N++);N<D;++N)r.push({value:Math.round((Z+N*k)*X)/X});return E&&v&&W!==s?r.length&&XI(r[r.length-1].value,s,jle(s,A,t))?r[r.length-1].value=s:r.push({value:s}):(!E||W===s)&&r.push({value:W}),r}function jle(t,e,{horizontal:r,minRotation:n}){const i=dp(n),o=(r?Math.sin(i):Math.cos(i))||.001,a=.75*e*(""+t).length;return Math.min(e/o,a)}class CN extends yb{constructor(e){super(e);this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(e,r){return Qo(e)||(typeof e=="number"||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){const{beginAtZero:e}=this.options,{minDefined:r,maxDefined:n}=this.getUserBounds();let{min:i,max:o}=this;const a=l=>i=r?i:l,s=l=>o=n?o:l;if(e){const l=ev(i),u=ev(o);l<0&&u<0?s(0):l>0&&u>0&&a(0)}if(i===o){let l=1;(o>=Number.MAX_SAFE_INTEGER||i<=Number.MIN_SAFE_INTEGER)&&(l=Math.abs(o*.05)),s(o+l),e||a(i-l)}this.min=i,this.max=o}getTickLimit(){const e=this.options.ticks;let{maxTicksLimit:r,stepSize:n}=e,i;return n?(i=Math.ceil(this.max/n)-Math.floor(this.min/n)+1,i>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${n} would result generating up to ${i} ticks. Limiting to 1000.`),i=1e3)):(i=this.computeTickLimit(),r=r||11),r&&(i=Math.min(r,i)),i}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const e=this.options,r=e.ticks;let n=this.getTickLimit();n=Math.max(2,n);const i={maxTicks:n,bounds:e.bounds,min:e.min,max:e.max,precision:r.precision,step:r.stepSize,count:r.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:r.minRotation||0,includeBounds:r.includeBounds!==!1},o=this._range||this,a=nlt(i,o);return e.bounds==="ticks"&&Hse(a,this,"value"),e.reverse?(a.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),a}configure(){const e=this.ticks;let r=this.min,n=this.max;if(super.configure(),this.options.offset&&e.length){const i=(n-r)/Math.max(e.length-1,1)/2;r-=i,n+=i}this._startValue=r,this._endValue=n,this._valueRange=n-r}getLabelForValue(e){return oM(e,this.chart.options.locale,this.options.ticks.format)}}class zU extends CN{determineDataLimits(){const{min:e,max:r}=this.getMinMax(!0);this.min=Aa(e)?e:0,this.max=Aa(r)?r:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),r=e?this.width:this.height,n=dp(this.options.ticks.minRotation),i=(e?Math.sin(n):Math.cos(n))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(r/Math.min(40,o.lineHeight/i))}getPixelForValue(e){return e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}}zU.id="linear";zU.defaults={ticks:{callback:lN.formatters.numeric}};function Ule(t){return t/Math.pow(10,Math.floor(fp(t)))===1}function ilt(t,e){const r=Math.floor(fp(e.max)),n=Math.ceil(e.max/Math.pow(10,r)),i=[];let o=cp(t.min,Math.pow(10,Math.floor(fp(e.min)))),a=Math.floor(fp(o)),s=Math.floor(o/Math.pow(10,a)),l=a<0?Math.pow(10,Math.abs(a)):1;do i.push({value:o,major:Ule(o)}),++s,s===10&&(s=1,++a,l=a>=0?1:l),o=Math.round(s*Math.pow(10,a)*l)/l;while(a<r||a===r&&s<n);const u=cp(t.max,o);return i.push({value:u,major:Ule(o)}),i}class BU extends yb{constructor(e){super(e);this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(e,r){const n=CN.prototype.parse.apply(this,[e,r]);if(n===0){this._zero=!0;return}return Aa(n)&&n>0?n:null}determineDataLimits(){const{min:e,max:r}=this.getMinMax(!0);this.min=Aa(e)?Math.max(0,e):null,this.max=Aa(r)?Math.max(0,r):null,this.options.beginAtZero&&(this._zero=!0),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:e,maxDefined:r}=this.getUserBounds();let n=this.min,i=this.max;const o=l=>n=e?n:l,a=l=>i=r?i:l,s=(l,u)=>Math.pow(10,Math.floor(fp(l))+u);n===i&&(n<=0?(o(1),a(10)):(o(s(n,-1)),a(s(i,1)))),n<=0&&o(s(i,-1)),i<=0&&a(s(n,1)),this._zero&&this.min!==this._suggestedMin&&n===s(this.min,0)&&o(s(n,-1)),this.min=n,this.max=i}buildTicks(){const e=this.options,r={min:this._userMin,max:this._userMax},n=ilt(r,this);return e.bounds==="ticks"&&Hse(n,this,"value"),e.reverse?(n.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),n}getLabelForValue(e){return e===void 0?"0":oM(e,this.chart.options.locale,this.options.ticks.format)}configure(){const e=this.min;super.configure(),this._startValue=fp(e),this._valueRange=fp(this.max)-fp(e)}getPixelForValue(e){return(e===void 0||e===0)&&(e=this.min),e===null||isNaN(e)?NaN:this.getPixelForDecimal(e===this.min?0:(fp(e)-this._startValue)/this._valueRange)}getValueForPixel(e){const r=this.getDecimalForPixel(e);return Math.pow(10,this._startValue+r*this._valueRange)}}BU.id="logarithmic";BU.defaults={ticks:{callback:lN.formatters.logarithmic,major:{enabled:!0}}};function jU(t){const e=t.ticks;if(e.display&&t.display){const r=Au(e.backdropPadding);return Hi(e.font&&e.font.size,ko.font.size)+r.height}return 0}function olt(t,e,r){return r=Es(r)?r:[r],{w:bit(t,e.string,r),h:r.length*e.lineHeight}}function Vle(t,e,r,n,i){return t===n||t===i?{start:e-r/2,end:e+r/2}:t<n||t>i?{start:e-r,end:e}:{start:e,end:e+r}}function slt(t){const e={l:t.left+t._padding.left,r:t.right-t._padding.right,t:t.top+t._padding.top,b:t.bottom-t._padding.bottom},r=Object.assign({},e),n=[],i=[],o=t._pointLabels.length,a=t.options.pointLabels,s=a.centerPointLabels?Ra/o:0;for(let l=0;l<o;l++){const u=a.setContext(t.getPointLabelContext(l));i[l]=u.padding;const p=t.getPointPosition(l,t.drawingArea+i[l],s),m=ec(u.font),v=olt(t.ctx,m,t._pointLabels[l]);n[l]=v;const x=rh(t.getIndexAngle(l)+s),y=Math.round(tU(x)),_=Vle(y,p.x,v.w,0,180),w=Vle(y,p.y,v.h,90,270);alt(r,e,x,_,w)}t.setCenterPoint(e.l-r.l,r.r-e.r,e.t-r.t,r.b-e.b),t._pointLabelItems=llt(t,n,i)}function alt(t,e,r,n,i){const o=Math.abs(Math.sin(r)),a=Math.abs(Math.cos(r));let s=0,l=0;n.start<e.l?(s=(e.l-n.start)/o,t.l=Math.min(t.l,e.l-s)):n.end>e.r&&(s=(n.end-e.r)/o,t.r=Math.max(t.r,e.r+s)),i.start<e.t?(l=(e.t-i.start)/a,t.t=Math.min(t.t,e.t-l)):i.end>e.b&&(l=(i.end-e.b)/a,t.b=Math.max(t.b,e.b+l))}function llt(t,e,r){const n=[],i=t._pointLabels.length,o=t.options,a=jU(o)/2,s=t.drawingArea,l=o.pointLabels.centerPointLabels?Ra/i:0;for(let u=0;u<i;u++){const p=t.getPointPosition(u,s+a+r[u],l),m=Math.round(tU(rh(p.angle+pl))),v=e[u],x=flt(p.y,v.h,m),y=clt(m),_=ult(p.x,v.w,y);n.push({x:p.x,y:x,textAlign:y,left:_,top:x,right:_+v.w,bottom:x+v.h})}return n}function clt(t){return t===0||t===180?"center":t<180?"left":"right"}function ult(t,e,r){return r==="right"?t-=e:r==="center"&&(t-=e/2),t}function flt(t,e,r){return r===90||r===270?t-=e/2:(r>270||r<90)&&(t-=e),t}function dlt(t,e){const{ctx:r,options:{pointLabels:n}}=t;for(let i=e-1;i>=0;i--){const o=n.setContext(t.getPointLabelContext(i)),a=ec(o.font),{x:s,y:l,textAlign:u,left:p,top:m,right:v,bottom:x}=t._pointLabelItems[i],{backdropColor:y}=o;if(!Qo(y)){const _=pb(o.borderRadius),w=Au(o.backdropPadding);r.fillStyle=y;const C=p-w.left,E=m-w.top,T=v-p+w.width,A=x-m+w.height;Object.values(_).some(k=>k!==0)?(r.beginPath(),nM(r,{x:C,y:E,w:T,h:A,radius:_}),r.fill()):r.fillRect(C,E,T,A)}hb(r,t._pointLabels[i],s,l+a.lineHeight/2,a,{color:o.color,textAlign:u,textBaseline:"middle"})}}function Hle(t,e,r,n){const{ctx:i}=t;if(r)i.arc(t.xCenter,t.yCenter,e,0,ks);else{let o=t.getPointPosition(0,e);i.moveTo(o.x,o.y);for(let a=1;a<n;a++)o=t.getPointPosition(a,e),i.lineTo(o.x,o.y)}}function hlt(t,e,r,n){const i=t.ctx,o=e.circular,{color:a,lineWidth:s}=e;!o&&!n||!a||!s||r<0||(i.save(),i.strokeStyle=a,i.lineWidth=s,i.setLineDash(e.borderDash),i.lineDashOffset=e.borderDashOffset,i.beginPath(),Hle(t,r,o,n),i.closePath(),i.stroke(),i.restore())}function plt(t,e,r){return qx(t,{label:r,index:e,type:"pointLabel"})}class mM extends CN{constructor(e){super(e);this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const e=this._padding=Au(jU(this.options)/2),r=this.width=this.maxWidth-e.width,n=this.height=this.maxHeight-e.height;this.xCenter=Math.floor(this.left+r/2+e.left),this.yCenter=Math.floor(this.top+n/2+e.top),this.drawingArea=Math.floor(Math.min(r,n)/2)}determineDataLimits(){const{min:e,max:r}=this.getMinMax(!1);this.min=Aa(e)&&!isNaN(e)?e:0,this.max=Aa(r)&&!isNaN(r)?r:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/jU(this.options))}generateTickLabels(e){CN.prototype.generateTickLabels.call(this,e),this._pointLabels=this.getLabels().map((r,n)=>{const i=Vs(this.options.pointLabels.callback,[r,n],this);return i||i===0?i:""}).filter((r,n)=>this.chart.getDataVisibility(n))}fit(){const e=this.options;e.display&&e.pointLabels.display?slt(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(e,r,n,i){this.xCenter+=Math.floor((e-r)/2),this.yCenter+=Math.floor((n-i)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(e,r,n,i))}getIndexAngle(e){const r=ks/(this._pointLabels.length||1),n=this.options.startAngle||0;return rh(e*r+dp(n))}getDistanceFromCenterForValue(e){if(Qo(e))return NaN;const r=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-e)*r:(e-this.min)*r}getValueForDistanceFromCenter(e){if(Qo(e))return NaN;const r=e/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-r:this.min+r}getPointLabelContext(e){const r=this._pointLabels||[];if(e>=0&&e<r.length){const n=r[e];return plt(this.getContext(),e,n)}}getPointPosition(e,r,n=0){const i=this.getIndexAngle(e)-pl+n;return{x:Math.cos(i)*r+this.xCenter,y:Math.sin(i)*r+this.yCenter,angle:i}}getPointPositionForValue(e,r){return this.getPointPosition(e,this.getDistanceFromCenterForValue(r))}getBasePosition(e){return this.getPointPositionForValue(e||0,this.getBaseValue())}getPointLabelPosition(e){const{left:r,top:n,right:i,bottom:o}=this._pointLabelItems[e];return{left:r,top:n,right:i,bottom:o}}drawBackground(){const{backgroundColor:e,grid:{circular:r}}=this.options;if(e){const n=this.ctx;n.save(),n.beginPath(),Hle(this,this.getDistanceFromCenterForValue(this._endValue),r,this._pointLabels.length),n.closePath(),n.fillStyle=e,n.fill(),n.restore()}}drawGrid(){const e=this.ctx,r=this.options,{angleLines:n,grid:i}=r,o=this._pointLabels.length;let a,s,l;if(r.pointLabels.display&&dlt(this,o),i.display&&this.ticks.forEach((u,p)=>{if(p!==0){s=this.getDistanceFromCenterForValue(u.value);const m=i.setContext(this.getContext(p-1));hlt(this,m,s,o)}}),n.display){for(e.save(),a=o-1;a>=0;a--){const u=n.setContext(this.getPointLabelContext(a)),{color:p,lineWidth:m}=u;!m||!p||(e.lineWidth=m,e.strokeStyle=p,e.setLineDash(u.borderDash),e.lineDashOffset=u.borderDashOffset,s=this.getDistanceFromCenterForValue(r.ticks.reverse?this.min:this.max),l=this.getPointPosition(a,s),e.beginPath(),e.moveTo(this.xCenter,this.yCenter),e.lineTo(l.x,l.y),e.stroke())}e.restore()}}drawBorder(){}drawLabels(){const e=this.ctx,r=this.options,n=r.ticks;if(!n.display)return;const i=this.getIndexAngle(0);let o,a;e.save(),e.translate(this.xCenter,this.yCenter),e.rotate(i),e.textAlign="center",e.textBaseline="middle",this.ticks.forEach((s,l)=>{if(l===0&&!r.reverse)return;const u=n.setContext(this.getContext(l)),p=ec(u.font);if(o=this.getDistanceFromCenterForValue(this.ticks[l].value),u.showLabelBackdrop){e.font=p.string,a=e.measureText(s.label).width,e.fillStyle=u.backdropColor;const m=Au(u.backdropPadding);e.fillRect(-a/2-m.left,-o-p.size/2-m.top,a+m.width,p.size+m.height)}hb(e,s.label,0,-o,p,{color:u.color})}),e.restore()}drawTitle(){}}mM.id="radialLinear";mM.defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:lN.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(t){return t},padding:5,centerPointLabels:!1}};mM.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"};mM.descriptors={angleLines:{_fallback:"grid"}};const EN={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},od=Object.keys(EN);function mlt(t,e){return t-e}function Wle(t,e){if(Qo(e))return null;const r=t._adapter,{parser:n,round:i,isoWeekday:o}=t._parseOpts;let a=e;return typeof n=="function"&&(a=n(a)),Aa(a)||(a=typeof n=="string"?r.parse(a,n):r.parse(a)),a===null?null:(i&&(a=i==="week"&&(KC(o)||o===!0)?r.startOf(a,"isoWeek",o):r.startOf(a,i)),+a)}function Gle(t,e,r,n){const i=od.length;for(let o=od.indexOf(t);o<i-1;++o){const a=EN[od[o]],s=a.steps?a.steps:Number.MAX_SAFE_INTEGER;if(a.common&&Math.ceil((r-e)/(s*a.size))<=n)return od[o]}return od[i-1]}function glt(t,e,r,n,i){for(let o=od.length-1;o>=od.indexOf(r);o--){const a=od[o];if(EN[a].common&&t._adapter.diff(i,n,a)>=e-1)return a}return od[r?od.indexOf(r):0]}function vlt(t){for(let e=od.indexOf(t)+1,r=od.length;e<r;++e)if(EN[od[e]].common)return od[e]}function qle(t,e,r){if(!r)t[e]=!0;else if(r.length){const{lo:n,hi:i}=rU(r,e),o=r[n]>=e?r[n]:r[i];t[o]=!0}}function ylt(t,e,r,n){const i=t._adapter,o=+i.startOf(e[0].value,n),a=e[e.length-1].value;let s,l;for(s=o;s<=a;s=+i.add(s,1,n))l=r[s],l>=0&&(e[l].major=!0);return e}function Xle(t,e,r){const n=[],i={},o=e.length;let a,s;for(a=0;a<o;++a)s=e[a],i[s]=a,n.push({value:s,major:!1});return o===0||!r?n:ylt(t,n,i,r)}class gM extends yb{constructor(e){super(e);this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(e,r){const n=e.time||(e.time={}),i=this._adapter=new ist._date(e.adapters.date);i.init(r),GI(n.displayFormats,i.formats()),this._parseOpts={parser:n.parser,round:n.round,isoWeekday:n.isoWeekday},super.init(e),this._normalized=r.normalized}parse(e,r){return e===void 0?null:Wle(this,e)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const e=this.options,r=this._adapter,n=e.time.unit||"day";let{min:i,max:o,minDefined:a,maxDefined:s}=this.getUserBounds();function l(u){!a&&!isNaN(u.min)&&(i=Math.min(i,u.min)),!s&&!isNaN(u.max)&&(o=Math.max(o,u.max))}(!a||!s)&&(l(this._getLabelBounds()),(e.bounds!=="ticks"||e.ticks.source!=="labels")&&l(this.getMinMax(!1))),i=Aa(i)&&!isNaN(i)?i:+r.startOf(Date.now(),n),o=Aa(o)&&!isNaN(o)?o:+r.endOf(Date.now(),n)+1,this.min=Math.min(i,o-1),this.max=Math.max(i+1,o)}_getLabelBounds(){const e=this.getLabelTimestamps();let r=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY;return e.length&&(r=e[0],n=e[e.length-1]),{min:r,max:n}}buildTicks(){const e=this.options,r=e.time,n=e.ticks,i=n.source==="labels"?this.getLabelTimestamps():this._generate();e.bounds==="ticks"&&i.length&&(this.min=this._userMin||i[0],this.max=this._userMax||i[i.length-1]);const o=this.min,a=this.max,s=Xnt(i,o,a);return this._unit=r.unit||(n.autoSkip?Gle(r.minUnit,this.min,this.max,this._getLabelCapacity(o)):glt(this,s.length,r.minUnit,this.min,this.max)),this._majorUnit=!n.major.enabled||this._unit==="year"?void 0:vlt(this._unit),this.initOffsets(i),e.reverse&&s.reverse(),Xle(this,s,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(e=>+e.value))}initOffsets(e){let r=0,n=0,i,o;this.options.offset&&e.length&&(i=this.getDecimalForValue(e[0]),e.length===1?r=1-i:r=(this.getDecimalForValue(e[1])-i)/2,o=this.getDecimalForValue(e[e.length-1]),e.length===1?n=o:n=(o-this.getDecimalForValue(e[e.length-2]))/2);const a=e.length<3?.5:.25;r=wc(r,0,a),n=wc(n,0,a),this._offsets={start:r,end:n,factor:1/(r+1+n)}}_generate(){const e=this._adapter,r=this.min,n=this.max,i=this.options,o=i.time,a=o.unit||Gle(o.minUnit,r,n,this._getLabelCapacity(r)),s=Hi(o.stepSize,1),l=a==="week"?o.isoWeekday:!1,u=KC(l)||l===!0,p={};let m=r,v,x;if(u&&(m=+e.startOf(m,"isoWeek",l)),m=+e.startOf(m,u?"day":a),e.diff(n,r,a)>1e5*s)throw new Error(r+" and "+n+" are too far apart with stepSize of "+s+" "+a);const y=i.ticks.source==="data"&&this.getDataTimestamps();for(v=m,x=0;v<n;v=+e.add(v,s,a),x++)qle(p,v,y);return(v===n||i.bounds==="ticks"||x===1)&&qle(p,v,y),Object.keys(p).sort((_,w)=>_-w).map(_=>+_)}getLabelForValue(e){const r=this._adapter,n=this.options.time;return n.tooltipFormat?r.format(e,n.tooltipFormat):r.format(e,n.displayFormats.datetime)}_tickFormatFunction(e,r,n,i){const o=this.options,a=o.time.displayFormats,s=this._unit,l=this._majorUnit,u=s&&a[s],p=l&&a[l],m=n[r],v=l&&p&&m&&m.major,x=this._adapter.format(e,i||(v?p:u)),y=o.ticks.callback;return y?Vs(y,[x,r,n],this):x}generateTickLabels(e){let r,n,i;for(r=0,n=e.length;r<n;++r)i=e[r],i.label=this._tickFormatFunction(i.value,r,e)}getDecimalForValue(e){return e===null?NaN:(e-this.min)/(this.max-this.min)}getPixelForValue(e){const r=this._offsets,n=this.getDecimalForValue(e);return this.getPixelForDecimal((r.start+n)*r.factor)}getValueForPixel(e){const r=this._offsets,n=this.getDecimalForPixel(e)/r.factor-r.end;return this.min+n*(this.max-this.min)}_getLabelSize(e){const r=this.options.ticks,n=this.ctx.measureText(e).width,i=dp(this.isHorizontal()?r.maxRotation:r.minRotation),o=Math.cos(i),a=Math.sin(i),s=this._resolveTickFontOptions(0).size;return{w:n*o+s*a,h:n*a+s*o}}_getLabelCapacity(e){const r=this.options.time,n=r.displayFormats,i=n[r.unit]||n.millisecond,o=this._tickFormatFunction(e,0,Xle(this,[e],this._majorUnit),i),a=this._getLabelSize(o),s=Math.floor(this.isHorizontal()?this.width/a.w:this.height/a.h)-1;return s>0?s:1}getDataTimestamps(){let e=this._cache.data||[],r,n;if(e.length)return e;const i=this.getMatchingVisibleMetas();if(this._normalized&&i.length)return this._cache.data=i[0].controller.getAllParsedValues(this);for(r=0,n=i.length;r<n;++r)e=e.concat(i[r].controller.getAllParsedValues(this));return this._cache.data=this.normalize(e)}getLabelTimestamps(){const e=this._cache.labels||[];let r,n;if(e.length)return e;const i=this.getLabels();for(r=0,n=i.length;r<n;++r)e.push(Wle(this,i[r]));return this._cache.labels=this._normalized?e:this.normalize(e)}normalize(e){return Yse(e.sort(mlt))}}gM.id="time";gM.defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",major:{enabled:!1}}};function SN(t,e,r){let n=0,i=t.length-1,o,a,s,l;r?(e>=t[n].pos&&e<=t[i].pos&&({lo:n,hi:i}=Py(t,"pos",e)),{pos:o,time:s}=t[n],{pos:a,time:l}=t[i]):(e>=t[n].time&&e<=t[i].time&&({lo:n,hi:i}=Py(t,"time",e)),{time:o,pos:s}=t[n],{time:a,pos:l}=t[i]);const u=a-o;return u?s+(l-s)*(e-o)/u:s}class UU extends gM{constructor(e){super(e);this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const e=this._getTimestampsForTable(),r=this._table=this.buildLookupTable(e);this._minPos=SN(r,this.min),this._tableRange=SN(r,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){const{min:r,max:n}=this,i=[],o=[];let a,s,l,u,p;for(a=0,s=e.length;a<s;++a)u=e[a],u>=r&&u<=n&&i.push(u);if(i.length<2)return[{time:r,pos:0},{time:n,pos:1}];for(a=0,s=i.length;a<s;++a)p=i[a+1],l=i[a-1],u=i[a],Math.round((p+l)/2)!==u&&o.push({time:u,pos:a/(s-1)});return o}_getTimestampsForTable(){let e=this._cache.all||[];if(e.length)return e;const r=this.getDataTimestamps(),n=this.getLabelTimestamps();return r.length&&n.length?e=this.normalize(r.concat(n)):e=r.length?r:n,e=this._cache.all=e,e}getDecimalForValue(e){return(SN(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){const r=this._offsets,n=this.getDecimalForPixel(e)/r.factor-r.end;return SN(this._table,n*this._tableRange+this._minPos,!0)}}UU.id="timeseries";UU.defaults=gM.defaults;var xlt=Object.freeze({__proto__:null,CategoryScale:wN,LinearScale:zU,LogarithmicScale:BU,RadialLinearScale:mM,TimeScale:gM,TimeSeriesScale:UU});const _lt=[nst,pat,Jat,xlt];/*! * @kurkle/color v0.1.9 * https://github.com/kurkle/color#readme * (c) 2020 Jukka Kurkela * Released under the MIT License */const pp={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},VU="0123456789ABCDEF",blt=t=>VU[t&15],wlt=t=>VU[(t&240)>>4]+VU[t&15],TN=t=>(t&240)>>4==(t&15);function Clt(t){return TN(t.r)&&TN(t.g)&&TN(t.b)&&TN(t.a)}function Elt(t){var e=t.length,r;return t[0]==="#"&&(e===4||e===5?r={r:255&pp[t[1]]*17,g:255&pp[t[2]]*17,b:255&pp[t[3]]*17,a:e===5?pp[t[4]]*17:255}:(e===7||e===9)&&(r={r:pp[t[1]]<<4|pp[t[2]],g:pp[t[3]]<<4|pp[t[4]],b:pp[t[5]]<<4|pp[t[6]],a:e===9?pp[t[7]]<<4|pp[t[8]]:255})),r}function Slt(t){var e=Clt(t)?blt:wlt;return t&&"#"+e(t.r)+e(t.g)+e(t.b)+(t.a<255?e(t.a):"")}function vM(t){return t+.5|0}const PN=(t,e,r)=>Math.max(Math.min(t,r),e);function yM(t){return PN(vM(t*2.55),0,255)}function xM(t){return PN(vM(t*255),0,255)}function HU(t){return PN(vM(t/2.55)/100,0,1)}function Yle(t){return PN(vM(t*100),0,100)}const Tlt=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function Plt(t){const e=Tlt.exec(t);let r=255,n,i,o;if(!!e){if(e[7]!==n){const a=+e[7];r=255&(e[8]?yM(a):a*255)}return n=+e[1],i=+e[3],o=+e[5],n=255&(e[2]?yM(n):n),i=255&(e[4]?yM(i):i),o=255&(e[6]?yM(o):o),{r:n,g:i,b:o,a:r}}}function Ilt(t){return t&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${HU(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`)}const Mlt=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Kle(t,e,r){const n=e*Math.min(r,1-r),i=(o,a=(o+t/30)%12)=>r-n*Math.max(Math.min(a-3,9-a,1),-1);return[i(0),i(8),i(4)]}function Alt(t,e,r){const n=(i,o=(i+t/60)%6)=>r-r*e*Math.max(Math.min(o,4-o,1),0);return[n(5),n(3),n(1)]}function Rlt(t,e,r){const n=Kle(t,1,.5);let i;for(e+r>1&&(i=1/(e+r),e*=i,r*=i),i=0;i<3;i++)n[i]*=1-e-r,n[i]+=e;return n}function WU(t){const e=255,r=t.r/e,n=t.g/e,i=t.b/e,o=Math.max(r,n,i),a=Math.min(r,n,i),s=(o+a)/2;let l,u,p;return o!==a&&(p=o-a,u=s>.5?p/(2-o-a):p/(o+a),l=o===r?(n-i)/p+(n<i?6:0):o===n?(i-r)/p+2:(r-n)/p+4,l=l*60+.5),[l|0,u||0,s]}function GU(t,e,r,n){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,r,n)).map(xM)}function qU(t,e,r){return GU(Kle,t,e,r)}function klt(t,e,r){return GU(Rlt,t,e,r)}function Olt(t,e,r){return GU(Alt,t,e,r)}function Zle(t){return(t%360+360)%360}function Llt(t){const e=Mlt.exec(t);let r=255,n;if(!e)return;e[5]!==n&&(r=e[6]?yM(+e[5]):xM(+e[5]));const i=Zle(+e[2]),o=+e[3]/100,a=+e[4]/100;return e[1]==="hwb"?n=klt(i,o,a):e[1]==="hsv"?n=Olt(i,o,a):n=qU(i,o,a),{r:n[0],g:n[1],b:n[2],a:r}}function Dlt(t,e){var r=WU(t);r[0]=Zle(r[0]+e),r=qU(r),t.r=r[0],t.g=r[1],t.b=r[2]}function Nlt(t){if(!t)return;const e=WU(t),r=e[0],n=Yle(e[1]),i=Yle(e[2]);return t.a<255?`hsla(${r}, ${n}%, ${i}%, ${HU(t.a)})`:`hsl(${r}, ${n}%, ${i}%)`}const Qle={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},Jle={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function $lt(){const t={},e=Object.keys(Jle),r=Object.keys(Qle);let n,i,o,a,s;for(n=0;n<e.length;n++){for(a=s=e[n],i=0;i<r.length;i++)o=r[i],s=s.replace(o,Qle[o]);o=parseInt(Jle[a],16),t[s]=[o>>16&255,o>>8&255,o&255]}return t}let IN;function Flt(t){IN||(IN=$lt(),IN.transparent=[0,0,0,0]);const e=IN[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:e.length===4?e[3]:255}}function MN(t,e,r){if(t){let n=WU(t);n[e]=Math.max(0,Math.min(n[e]+n[e]*r,e===0?360:1)),n=qU(n),t.r=n[0],t.g=n[1],t.b=n[2]}}function ece(t,e){return t&&Object.assign(e||{},t)}function tce(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=xM(t[3]))):(e=ece(t,{r:0,g:0,b:0,a:1}),e.a=xM(e.a)),e}function zlt(t){return t.charAt(0)==="r"?Plt(t):Llt(t)}class AN{constructor(e){if(e instanceof AN)return e;const r=typeof e;let n;r==="object"?n=tce(e):r==="string"&&(n=Elt(e)||Flt(e)||zlt(e)),this._rgb=n,this._valid=!!n}get valid(){return this._valid}get rgb(){var e=ece(this._rgb);return e&&(e.a=HU(e.a)),e}set rgb(e){this._rgb=tce(e)}rgbString(){return this._valid?Ilt(this._rgb):this._rgb}hexString(){return this._valid?Slt(this._rgb):this._rgb}hslString(){return this._valid?Nlt(this._rgb):this._rgb}mix(e,r){const n=this;if(e){const i=n.rgb,o=e.rgb;let a;const s=r===a?.5:r,l=2*s-1,u=i.a-o.a,p=((l*u==-1?l:(l+u)/(1+l*u))+1)/2;a=1-p,i.r=255&p*i.r+a*o.r+.5,i.g=255&p*i.g+a*o.g+.5,i.b=255&p*i.b+a*o.b+.5,i.a=s*i.a+(1-s)*o.a,n.rgb=i}return n}clone(){return new AN(this.rgb)}alpha(e){return this._rgb.a=xM(e),this}clearer(e){const r=this._rgb;return r.a*=1-e,this}greyscale(){const e=this._rgb,r=vM(e.r*.3+e.g*.59+e.b*.11);return e.r=e.g=e.b=r,this}opaquer(e){const r=this._rgb;return r.a*=1+e,this}negate(){const e=this._rgb;return e.r=255-e.r,e.g=255-e.g,e.b=255-e.b,this}lighten(e){return MN(this._rgb,2,e),this}darken(e){return MN(this._rgb,2,-e),this}saturate(e){return MN(this._rgb,1,e),this}desaturate(e){return MN(this._rgb,1,-e),this}rotate(e){return Dlt(this._rgb,e),this}}function dkt(t){return new AN(t)}rE.register(..._lt);var Blt=KL,jlt=xx,Ult=ZL,Vlt=vx,Hlt=$L,Wlt=yx,Glt=Object.prototype,qlt=Glt.hasOwnProperty,Xlt=Ult(function(t,e){if(Hlt(e)||Vlt(e)){jlt(e,Wlt(e),t);return}for(var r in e)qlt.call(e,r)&&Blt(t,r,e[r])}),hkt=Xlt,Ylt=W1,Klt=vx,Zlt=yx;function Qlt(t){return function(e,r,n){var i=Object(e);if(!Klt(e)){var o=Ylt(r);e=Zlt(e),r=function(s){return o(i[s],s,i)}}var a=t(e,r,n);return a>-1?i[o?e[a]:a]:void 0}}var Jlt=Qlt;function ect(t,e,r,n){for(var i=t.length,o=r+(n?1:-1);n?o--:++o<i;)if(e(t[o],o,t))return o;return-1}var tct=ect,rct=tct,nct=W1,ict=yte,oct=Math.max;function sct(t,e,r){var n=t==null?0:t.length;if(!n)return-1;var i=r==null?0:ict(r);return i<0&&(i=oct(n+i,0)),rct(t,nct(e),i)}var act=sct,lct=Jlt,cct=act,uct=lct(cct),pkt=uct;const rce="label";function nce(t,e){typeof t=="function"?t(e):t&&(t.current=e)}function fct(t,e){const r=t.options;r&&e&&Object.assign(r,e)}function ice(t,e){t.labels=e}function oce(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:rce;const n=[];t.datasets=e.map(i=>{const o=t.datasets.find(a=>a[r]===i[r]);return!o||!i.data||n.includes(o)?io({},i):(n.push(o),Object.assign(o,i),o)})}function dct(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:rce;const r={labels:[],datasets:[]};return ice(r,t.labels),oce(r,t.datasets,e),r}function hct(t,e){const C=t,{height:r=150,width:n=300,redraw:i=!1,datasetIdKey:o,type:a,data:s,options:l,plugins:u=[],fallbackContent:p,updateMode:m}=C,v=z0(C,["height","width","redraw","datasetIdKey","type","data","options","plugins","fallbackContent","updateMode"]),x=Y.exports.useRef(null),y=Y.exports.useRef(),_=()=>{!x.current||(y.current=new rE(x.current,{type:a,data:dct(s,o),options:l&&io({},l),plugins:u}),nce(e,y.current))},w=()=>{nce(e,null),y.current&&(y.current.destroy(),y.current=null)};return Y.exports.useEffect(()=>{!i&&y.current&&l&&fct(y.current,l)},[i,l]),Y.exports.useEffect(()=>{!i&&y.current&&ice(y.current.config.data,s.labels)},[i,s.labels]),Y.exports.useEffect(()=>{!i&&y.current&&s.datasets&&oce(y.current.config.data,s.datasets,o)},[i,s.datasets]),Y.exports.useEffect(()=>{!y.current||(i?(w(),setTimeout(_)):y.current.update(m))},[i,l,s.labels,s.datasets,m]),Y.exports.useEffect(()=>{!y.current||(w(),setTimeout(_))},[a]),Y.exports.useEffect(()=>(_(),()=>w()),[]),Kt("canvas",ul(io({},Object.assign({ref:x,role:"img",height:r,width:n},v)),{children:p}))}const mkt=Y.exports.forwardRef(hct);var pct=KL,mct=aC,gct=DL,sce=Yf,vct=lC;function yct(t,e,r,n){if(!sce(t))return t;e=mct(e,t);for(var i=-1,o=e.length,a=o-1,s=t;s!=null&&++i<o;){var l=vct(e[i]),u=r;if(l==="__proto__"||l==="constructor"||l==="prototype")return t;if(i!=a){var p=s[l];u=n?n(p,l,s):void 0,u===void 0&&(u=sce(p)?p:gct(e[i+1])?[]:{})}pct(s,l,u),s=s[l]}return t}var ace=yct,xct=ace;function _ct(t,e,r){return t==null?t:xct(t,e,r)}var gkt=_ct,vkt=Ro(Y.exports.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 3c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm0 14.2c-2.5 0-4.71-1.28-6-3.22.03-1.99 4-3.08 6-3.08 1.99 0 5.97 1.09 6 3.08-1.29 1.94-3.5 3.22-6 3.22z"})),ykt=Ro(Y.exports.createElement("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"})),xkt=Ro(Y.exports.createElement("path",{d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"})),_kt=Ro(Y.exports.createElement("path",{d:"M19 6.41L17.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"})),bkt=Ro(Y.exports.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"})),wkt=Ro(Y.exports.createElement("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 00-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"})),Ckt=Ro(Y.exports.createElement("path",{d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})),Ekt=Ro(Y.exports.createElement("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm-1 4l6 6v10c0 1.1-.9 2-2 2H7.99C6.89 23 6 22.1 6 21l.01-14c0-1.1.89-2 1.99-2h7zm-1 7h5.5L14 6.5V12z"})),Skt=Ro(Y.exports.createElement("path",{d:"M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z"})),Tkt=Ro(Y.exports.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"})),Pkt=Ro(Y.exports.createElement("path",{d:"M11 7h2v2h-2zm0 4h2v6h-2zm1-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"})),Ikt=Ro(Y.exports.createElement("path",{d:"M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"})),Mkt=Ro(Y.exports.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"})),Akt=Ro(Y.exports.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-2zM9 6c0-1.66 1.34-3 3-3s3 1.34 3 3v2H9V6zm9 14H6V10h12v10zm-6-3c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2z"})),Rkt=Ro(Y.exports.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.41 16.09V20h-2.67v-1.93c-1.71-.36-3.16-1.46-3.27-3.4h1.96c.1 1.05.82 1.87 2.65 1.87 1.96 0 2.4-.98 2.4-1.59 0-.83-.44-1.61-2.67-2.14-2.48-.6-4.18-1.62-4.18-3.67 0-1.72 1.39-2.84 3.11-3.21V4h2.67v1.95c1.86.45 2.79 1.86 2.85 3.39H14.3c-.05-1.11-.64-1.87-2.22-1.87-1.5 0-2.4.68-2.4 1.64 0 .84.65 1.39 2.67 1.91s4.18 1.39 4.18 3.91c-.01 1.83-1.38 2.83-3.12 3.16z"})),kkt=Ro(Y.exports.createElement("path",{d:"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"})),Okt=Ro(Y.exports.createElement("path",{d:"M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7l-4-4zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3zm3-10H5V5h10v4z"})),Lkt=Ro(Y.exports.createElement("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 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"})),Dkt=Ro(Y.exports.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-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"})),XU={exports:{}};/** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */(function(t,e){(function(r,n){n(e)})(xl,function(r){function n(){for(var Ye=arguments.length,Ve=Array(Ye),gt=0;gt<Ye;gt++)Ve[gt]=arguments[gt];if(Ve.length>1){Ve[0]=Ve[0].slice(0,-1);for(var qt=Ve.length-1,Ht=1;Ht<qt;++Ht)Ve[Ht]=Ve[Ht].slice(1,-1);return Ve[qt]=Ve[qt].slice(1),Ve.join("")}else return Ve[0]}function i(Ye){return"(?:"+Ye+")"}function o(Ye){return Ye===void 0?"undefined":Ye===null?"null":Object.prototype.toString.call(Ye).split(" ").pop().split("]").shift().toLowerCase()}function a(Ye){return Ye.toUpperCase()}function s(Ye){return Ye!=null?Ye instanceof Array?Ye:typeof Ye.length!="number"||Ye.split||Ye.setInterval||Ye.call?[Ye]:Array.prototype.slice.call(Ye):[]}function l(Ye,Ve){var gt=Ye;if(Ve)for(var qt in Ve)gt[qt]=Ve[qt];return gt}function u(Ye){var Ve="[A-Za-z]",gt="[0-9]",qt=n(gt,"[A-Fa-f]"),Ht=i(i("%[EFef]"+qt+"%"+qt+qt+"%"+qt+qt)+"|"+i("%[89A-Fa-f]"+qt+"%"+qt+qt)+"|"+i("%"+qt+qt)),on="[\\:\\/\\?\\#\\[\\]\\@]",$t="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",Gt=n(on,$t),Ir=Ye?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]",Br=Ye?"[\\uE000-\\uF8FF]":"[]",Xr=n(Ve,gt,"[\\-\\.\\_\\~]",Ir);i(Ve+n(Ve,gt,"[\\+\\-\\.]")+"*"),i(i(Ht+"|"+n(Xr,$t,"[\\:]"))+"*");var Vn=i(i("25[0-5]")+"|"+i("2[0-4]"+gt)+"|"+i("1"+gt+gt)+"|"+i("0?[1-9]"+gt)+"|0?0?"+gt),Ln=i(Vn+"\\."+Vn+"\\."+Vn+"\\."+Vn),br=i(qt+"{1,4}"),oi=i(i(br+"\\:"+br)+"|"+Ln),Gi=i(i(br+"\\:")+"{6}"+oi),pi=i("\\:\\:"+i(br+"\\:")+"{5}"+oi),Ds=i(i(br)+"?\\:\\:"+i(br+"\\:")+"{4}"+oi),Xo=i(i(i(br+"\\:")+"{0,1}"+br)+"?\\:\\:"+i(br+"\\:")+"{3}"+oi),jo=i(i(i(br+"\\:")+"{0,2}"+br)+"?\\:\\:"+i(br+"\\:")+"{2}"+oi),Qa=i(i(i(br+"\\:")+"{0,3}"+br)+"?\\:\\:"+br+"\\:"+oi),za=i(i(i(br+"\\:")+"{0,4}"+br)+"?\\:\\:"+oi),es=i(i(i(br+"\\:")+"{0,5}"+br)+"?\\:\\:"+br),Pi=i(i(i(br+"\\:")+"{0,6}"+br)+"?\\:\\:"),Ns=i([Gi,pi,Ds,Xo,jo,Qa,za,es,Pi].join("|")),dr=i(i(Xr+"|"+Ht)+"+");i("[vV]"+qt+"+\\."+n(Xr,$t,"[\\:]")+"+"),i(i(Ht+"|"+n(Xr,$t))+"*");var Oi=i(Ht+"|"+n(Xr,$t,"[\\:\\@]"));return i(i(Ht+"|"+n(Xr,$t,"[\\@]"))+"+"),i(i(Oi+"|"+n("[\\/\\?]",Br))+"*"),{NOT_SCHEME:new RegExp(n("[^]",Ve,gt,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(n("[^\\%\\:]",Xr,$t),"g"),NOT_HOST:new RegExp(n("[^\\%\\[\\]\\:]",Xr,$t),"g"),NOT_PATH:new RegExp(n("[^\\%\\/\\:\\@]",Xr,$t),"g"),NOT_PATH_NOSCHEME:new RegExp(n("[^\\%\\/\\@]",Xr,$t),"g"),NOT_QUERY:new RegExp(n("[^\\%]",Xr,$t,"[\\:\\@\\/\\?]",Br),"g"),NOT_FRAGMENT:new RegExp(n("[^\\%]",Xr,$t,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(n("[^]",Xr,$t),"g"),UNRESERVED:new RegExp(Xr,"g"),OTHER_CHARS:new RegExp(n("[^\\%]",Xr,Gt),"g"),PCT_ENCODED:new RegExp(Ht,"g"),IPV4ADDRESS:new RegExp("^("+Ln+")$"),IPV6ADDRESS:new RegExp("^\\[?("+Ns+")"+i(i("\\%25|\\%(?!"+qt+"{2})")+"("+dr+")")+"?\\]?$")}}var p=u(!1),m=u(!0),v=function(){function Ye(Ve,gt){var qt=[],Ht=!0,on=!1,$t=void 0;try{for(var Gt=Ve[Symbol.iterator](),Ir;!(Ht=(Ir=Gt.next()).done)&&(qt.push(Ir.value),!(gt&&qt.length===gt));Ht=!0);}catch(Br){on=!0,$t=Br}finally{try{!Ht&&Gt.return&&Gt.return()}finally{if(on)throw $t}}return qt}return function(Ve,gt){if(Array.isArray(Ve))return Ve;if(Symbol.iterator in Object(Ve))return Ye(Ve,gt);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),x=function(Ye){if(Array.isArray(Ye)){for(var Ve=0,gt=Array(Ye.length);Ve<Ye.length;Ve++)gt[Ve]=Ye[Ve];return gt}else return Array.from(Ye)},y=2147483647,_=36,w=1,C=26,E=38,T=700,A=72,k=128,X="-",Z=/^xn--/,W=/[^\0-\x7E]/,D=/[\x2E\u3002\uFF0E\uFF61]/g,H={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},N=_-w,j=Math.floor,$=String.fromCharCode;function z(Ye){throw new RangeError(H[Ye])}function O(Ye,Ve){for(var gt=[],qt=Ye.length;qt--;)gt[qt]=Ve(Ye[qt]);return gt}function F(Ye,Ve){var gt=Ye.split("@"),qt="";gt.length>1&&(qt=gt[0]+"@",Ye=gt[1]),Ye=Ye.replace(D,".");var Ht=Ye.split("."),on=O(Ht,Ve).join(".");return qt+on}function G(Ye){for(var Ve=[],gt=0,qt=Ye.length;gt<qt;){var Ht=Ye.charCodeAt(gt++);if(Ht>=55296&&Ht<=56319&><qt){var on=Ye.charCodeAt(gt++);(on&64512)==56320?Ve.push(((Ht&1023)<<10)+(on&1023)+65536):(Ve.push(Ht),gt--)}else Ve.push(Ht)}return Ve}var q=function(Ve){return String.fromCodePoint.apply(String,x(Ve))},ee=function(Ve){return Ve-48<10?Ve-22:Ve-65<26?Ve-65:Ve-97<26?Ve-97:_},re=function(Ve,gt){return Ve+22+75*(Ve<26)-((gt!=0)<<5)},ce=function(Ve,gt,qt){var Ht=0;for(Ve=qt?j(Ve/T):Ve>>1,Ve+=j(Ve/gt);Ve>N*C>>1;Ht+=_)Ve=j(Ve/N);return j(Ht+(N+1)*Ve/(Ve+E))},fe=function(Ve){var gt=[],qt=Ve.length,Ht=0,on=k,$t=A,Gt=Ve.lastIndexOf(X);Gt<0&&(Gt=0);for(var Ir=0;Ir<Gt;++Ir)Ve.charCodeAt(Ir)>=128&&z("not-basic"),gt.push(Ve.charCodeAt(Ir));for(var Br=Gt>0?Gt+1:0;Br<qt;){for(var Xr=Ht,Vn=1,Ln=_;;Ln+=_){Br>=qt&&z("invalid-input");var br=ee(Ve.charCodeAt(Br++));(br>=_||br>j((y-Ht)/Vn))&&z("overflow"),Ht+=br*Vn;var oi=Ln<=$t?w:Ln>=$t+C?C:Ln-$t;if(br<oi)break;var Gi=_-oi;Vn>j(y/Gi)&&z("overflow"),Vn*=Gi}var pi=gt.length+1;$t=ce(Ht-Xr,pi,Xr==0),j(Ht/pi)>y-on&&z("overflow"),on+=j(Ht/pi),Ht%=pi,gt.splice(Ht++,0,on)}return String.fromCodePoint.apply(String,gt)},J=function(Ve){var gt=[];Ve=G(Ve);var qt=Ve.length,Ht=k,on=0,$t=A,Gt=!0,Ir=!1,Br=void 0;try{for(var Xr=Ve[Symbol.iterator](),Vn;!(Gt=(Vn=Xr.next()).done);Gt=!0){var Ln=Vn.value;Ln<128&>.push($(Ln))}}catch(zr){Ir=!0,Br=zr}finally{try{!Gt&&Xr.return&&Xr.return()}finally{if(Ir)throw Br}}var br=gt.length,oi=br;for(br&>.push(X);oi<qt;){var Gi=y,pi=!0,Ds=!1,Xo=void 0;try{for(var jo=Ve[Symbol.iterator](),Qa;!(pi=(Qa=jo.next()).done);pi=!0){var za=Qa.value;za>=Ht&&za<Gi&&(Gi=za)}}catch(zr){Ds=!0,Xo=zr}finally{try{!pi&&jo.return&&jo.return()}finally{if(Ds)throw Xo}}var es=oi+1;Gi-Ht>j((y-on)/es)&&z("overflow"),on+=(Gi-Ht)*es,Ht=Gi;var Pi=!0,Ns=!1,dr=void 0;try{for(var Oi=Ve[Symbol.iterator](),Li;!(Pi=(Li=Oi.next()).done);Pi=!0){var ho=Li.value;if(ho<Ht&&++on>y&&z("overflow"),ho==Ht){for(var qs=on,fn=_;;fn+=_){var an=fn<=$t?w:fn>=$t+C?C:fn-$t;if(qs<an)break;var Dr=qs-an,Rn=_-an;gt.push($(re(an+Dr%Rn,0))),qs=j(Dr/Rn)}gt.push($(re(qs,0))),$t=ce(on,es,oi==br),on=0,++oi}}}catch(zr){Ns=!0,dr=zr}finally{try{!Pi&&Oi.return&&Oi.return()}finally{if(Ns)throw dr}}++on,++Ht}return gt.join("")},oe=function(Ve){return F(Ve,function(gt){return Z.test(gt)?fe(gt.slice(4).toLowerCase()):gt})},ve=function(Ve){return F(Ve,function(gt){return W.test(gt)?"xn--"+J(gt):gt})},ye={version:"2.1.0",ucs2:{decode:G,encode:q},decode:fe,encode:J,toASCII:ve,toUnicode:oe},xe={};function se(Ye){var Ve=Ye.charCodeAt(0),gt=void 0;return Ve<16?gt="%0"+Ve.toString(16).toUpperCase():Ve<128?gt="%"+Ve.toString(16).toUpperCase():Ve<2048?gt="%"+(Ve>>6|192).toString(16).toUpperCase()+"%"+(Ve&63|128).toString(16).toUpperCase():gt="%"+(Ve>>12|224).toString(16).toUpperCase()+"%"+(Ve>>6&63|128).toString(16).toUpperCase()+"%"+(Ve&63|128).toString(16).toUpperCase(),gt}function me(Ye){for(var Ve="",gt=0,qt=Ye.length;gt<qt;){var Ht=parseInt(Ye.substr(gt+1,2),16);if(Ht<128)Ve+=String.fromCharCode(Ht),gt+=3;else if(Ht>=194&&Ht<224){if(qt-gt>=6){var on=parseInt(Ye.substr(gt+4,2),16);Ve+=String.fromCharCode((Ht&31)<<6|on&63)}else Ve+=Ye.substr(gt,6);gt+=6}else if(Ht>=224){if(qt-gt>=9){var $t=parseInt(Ye.substr(gt+4,2),16),Gt=parseInt(Ye.substr(gt+7,2),16);Ve+=String.fromCharCode((Ht&15)<<12|($t&63)<<6|Gt&63)}else Ve+=Ye.substr(gt,9);gt+=9}else Ve+=Ye.substr(gt,3),gt+=3}return Ve}function pe(Ye,Ve){function gt(qt){var Ht=me(qt);return Ht.match(Ve.UNRESERVED)?Ht:qt}return Ye.scheme&&(Ye.scheme=String(Ye.scheme).replace(Ve.PCT_ENCODED,gt).toLowerCase().replace(Ve.NOT_SCHEME,"")),Ye.userinfo!==void 0&&(Ye.userinfo=String(Ye.userinfo).replace(Ve.PCT_ENCODED,gt).replace(Ve.NOT_USERINFO,se).replace(Ve.PCT_ENCODED,a)),Ye.host!==void 0&&(Ye.host=String(Ye.host).replace(Ve.PCT_ENCODED,gt).toLowerCase().replace(Ve.NOT_HOST,se).replace(Ve.PCT_ENCODED,a)),Ye.path!==void 0&&(Ye.path=String(Ye.path).replace(Ve.PCT_ENCODED,gt).replace(Ye.scheme?Ve.NOT_PATH:Ve.NOT_PATH_NOSCHEME,se).replace(Ve.PCT_ENCODED,a)),Ye.query!==void 0&&(Ye.query=String(Ye.query).replace(Ve.PCT_ENCODED,gt).replace(Ve.NOT_QUERY,se).replace(Ve.PCT_ENCODED,a)),Ye.fragment!==void 0&&(Ye.fragment=String(Ye.fragment).replace(Ve.PCT_ENCODED,gt).replace(Ve.NOT_FRAGMENT,se).replace(Ve.PCT_ENCODED,a)),Ye}function Ce(Ye){return Ye.replace(/^0*(.*)/,"$1")||"0"}function Pe(Ye,Ve){var gt=Ye.match(Ve.IPV4ADDRESS)||[],qt=v(gt,2),Ht=qt[1];return Ht?Ht.split(".").map(Ce).join("."):Ye}function Re(Ye,Ve){var gt=Ye.match(Ve.IPV6ADDRESS)||[],qt=v(gt,3),Ht=qt[1],on=qt[2];if(Ht){for(var $t=Ht.toLowerCase().split("::").reverse(),Gt=v($t,2),Ir=Gt[0],Br=Gt[1],Xr=Br?Br.split(":").map(Ce):[],Vn=Ir.split(":").map(Ce),Ln=Ve.IPV4ADDRESS.test(Vn[Vn.length-1]),br=Ln?7:8,oi=Vn.length-br,Gi=Array(br),pi=0;pi<br;++pi)Gi[pi]=Xr[pi]||Vn[oi+pi]||"";Ln&&(Gi[br-1]=Pe(Gi[br-1],Ve));var Ds=Gi.reduce(function(es,Pi,Ns){if(!Pi||Pi==="0"){var dr=es[es.length-1];dr&&dr.index+dr.length===Ns?dr.length++:es.push({index:Ns,length:1})}return es},[]),Xo=Ds.sort(function(es,Pi){return Pi.length-es.length})[0],jo=void 0;if(Xo&&Xo.length>1){var Qa=Gi.slice(0,Xo.index),za=Gi.slice(Xo.index+Xo.length);jo=Qa.join(":")+"::"+za.join(":")}else jo=Gi.join(":");return on&&(jo+="%"+on),jo}else return Ye}var ke=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,ze="".match(/(){0}/)[1]===void 0;function Ge(Ye){var Ve=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},gt={},qt=Ve.iri!==!1?m:p;Ve.reference==="suffix"&&(Ye=(Ve.scheme?Ve.scheme+":":"")+"//"+Ye);var Ht=Ye.match(ke);if(Ht){ze?(gt.scheme=Ht[1],gt.userinfo=Ht[3],gt.host=Ht[4],gt.port=parseInt(Ht[5],10),gt.path=Ht[6]||"",gt.query=Ht[7],gt.fragment=Ht[8],isNaN(gt.port)&&(gt.port=Ht[5])):(gt.scheme=Ht[1]||void 0,gt.userinfo=Ye.indexOf("@")!==-1?Ht[3]:void 0,gt.host=Ye.indexOf("//")!==-1?Ht[4]:void 0,gt.port=parseInt(Ht[5],10),gt.path=Ht[6]||"",gt.query=Ye.indexOf("?")!==-1?Ht[7]:void 0,gt.fragment=Ye.indexOf("#")!==-1?Ht[8]:void 0,isNaN(gt.port)&&(gt.port=Ye.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?Ht[4]:void 0)),gt.host&&(gt.host=Re(Pe(gt.host,qt),qt)),gt.scheme===void 0&>.userinfo===void 0&>.host===void 0&>.port===void 0&&!gt.path&>.query===void 0?gt.reference="same-document":gt.scheme===void 0?gt.reference="relative":gt.fragment===void 0?gt.reference="absolute":gt.reference="uri",Ve.reference&&Ve.reference!=="suffix"&&Ve.reference!==gt.reference&&(gt.error=gt.error||"URI is not a "+Ve.reference+" reference.");var on=xe[(Ve.scheme||gt.scheme||"").toLowerCase()];if(!Ve.unicodeSupport&&(!on||!on.unicodeSupport)){if(gt.host&&(Ve.domainHost||on&&on.domainHost))try{gt.host=ye.toASCII(gt.host.replace(qt.PCT_ENCODED,me).toLowerCase())}catch($t){gt.error=gt.error||"Host's domain name can not be converted to ASCII via punycode: "+$t}pe(gt,p)}else pe(gt,qt);on&&on.parse&&on.parse(gt,Ve)}else gt.error=gt.error||"URI can not be parsed.";return gt}function ht(Ye,Ve){var gt=Ve.iri!==!1?m:p,qt=[];return Ye.userinfo!==void 0&&(qt.push(Ye.userinfo),qt.push("@")),Ye.host!==void 0&&qt.push(Re(Pe(String(Ye.host),gt),gt).replace(gt.IPV6ADDRESS,function(Ht,on,$t){return"["+on+($t?"%25"+$t:"")+"]"})),(typeof Ye.port=="number"||typeof Ye.port=="string")&&(qt.push(":"),qt.push(String(Ye.port))),qt.length?qt.join(""):void 0}var Tt=/^\.\.?\//,xt=/^\/\.(\/|$)/,pt=/^\/\.\.(\/|$)/,It=/^\/?(?:.|\n)*?(?=\/|$)/;function Ie(Ye){for(var Ve=[];Ye.length;)if(Ye.match(Tt))Ye=Ye.replace(Tt,"");else if(Ye.match(xt))Ye=Ye.replace(xt,"/");else if(Ye.match(pt))Ye=Ye.replace(pt,"/"),Ve.pop();else if(Ye==="."||Ye==="..")Ye="";else{var gt=Ye.match(It);if(gt){var qt=gt[0];Ye=Ye.slice(qt.length),Ve.push(qt)}else throw new Error("Unexpected dot segment condition")}return Ve.join("")}function de(Ye){var Ve=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},gt=Ve.iri?m:p,qt=[],Ht=xe[(Ve.scheme||Ye.scheme||"").toLowerCase()];if(Ht&&Ht.serialize&&Ht.serialize(Ye,Ve),Ye.host&&!gt.IPV6ADDRESS.test(Ye.host)){if(Ve.domainHost||Ht&&Ht.domainHost)try{Ye.host=Ve.iri?ye.toUnicode(Ye.host):ye.toASCII(Ye.host.replace(gt.PCT_ENCODED,me).toLowerCase())}catch(Gt){Ye.error=Ye.error||"Host's domain name can not be converted to "+(Ve.iri?"Unicode":"ASCII")+" via punycode: "+Gt}}pe(Ye,gt),Ve.reference!=="suffix"&&Ye.scheme&&(qt.push(Ye.scheme),qt.push(":"));var on=ht(Ye,Ve);if(on!==void 0&&(Ve.reference!=="suffix"&&qt.push("//"),qt.push(on),Ye.path&&Ye.path.charAt(0)!=="/"&&qt.push("/")),Ye.path!==void 0){var $t=Ye.path;!Ve.absolutePath&&(!Ht||!Ht.absolutePath)&&($t=Ie($t)),on===void 0&&($t=$t.replace(/^\/\//,"/%2F")),qt.push($t)}return Ye.query!==void 0&&(qt.push("?"),qt.push(Ye.query)),Ye.fragment!==void 0&&(qt.push("#"),qt.push(Ye.fragment)),qt.join("")}function Te(Ye,Ve){var gt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},qt=arguments[3],Ht={};return qt||(Ye=Ge(de(Ye,gt),gt),Ve=Ge(de(Ve,gt),gt)),gt=gt||{},!gt.tolerant&&Ve.scheme?(Ht.scheme=Ve.scheme,Ht.userinfo=Ve.userinfo,Ht.host=Ve.host,Ht.port=Ve.port,Ht.path=Ie(Ve.path||""),Ht.query=Ve.query):(Ve.userinfo!==void 0||Ve.host!==void 0||Ve.port!==void 0?(Ht.userinfo=Ve.userinfo,Ht.host=Ve.host,Ht.port=Ve.port,Ht.path=Ie(Ve.path||""),Ht.query=Ve.query):(Ve.path?(Ve.path.charAt(0)==="/"?Ht.path=Ie(Ve.path):((Ye.userinfo!==void 0||Ye.host!==void 0||Ye.port!==void 0)&&!Ye.path?Ht.path="/"+Ve.path:Ye.path?Ht.path=Ye.path.slice(0,Ye.path.lastIndexOf("/")+1)+Ve.path:Ht.path=Ve.path,Ht.path=Ie(Ht.path)),Ht.query=Ve.query):(Ht.path=Ye.path,Ve.query!==void 0?Ht.query=Ve.query:Ht.query=Ye.query),Ht.userinfo=Ye.userinfo,Ht.host=Ye.host,Ht.port=Ye.port),Ht.scheme=Ye.scheme),Ht.fragment=Ve.fragment,Ht}function Be(Ye,Ve,gt){var qt=l({scheme:"null"},gt);return de(Te(Ge(Ye,qt),Ge(Ve,qt),qt,!0),qt)}function Ke(Ye,Ve){return typeof Ye=="string"?Ye=de(Ge(Ye,Ve),Ve):o(Ye)==="object"&&(Ye=Ge(de(Ye,Ve),Ve)),Ye}function ot(Ye,Ve,gt){return typeof Ye=="string"?Ye=de(Ge(Ye,gt),gt):o(Ye)==="object"&&(Ye=de(Ye,gt)),typeof Ve=="string"?Ve=de(Ge(Ve,gt),gt):o(Ve)==="object"&&(Ve=de(Ve,gt)),Ye===Ve}function Ze(Ye,Ve){return Ye&&Ye.toString().replace(!Ve||!Ve.iri?p.ESCAPE:m.ESCAPE,se)}function Je(Ye,Ve){return Ye&&Ye.toString().replace(!Ve||!Ve.iri?p.PCT_ENCODED:m.PCT_ENCODED,me)}var St={scheme:"http",domainHost:!0,parse:function(Ve,gt){return Ve.host||(Ve.error=Ve.error||"HTTP URIs must have a host."),Ve},serialize:function(Ve,gt){var qt=String(Ve.scheme).toLowerCase()==="https";return(Ve.port===(qt?443:80)||Ve.port==="")&&(Ve.port=void 0),Ve.path||(Ve.path="/"),Ve}},er={scheme:"https",domainHost:St.domainHost,parse:St.parse,serialize:St.serialize};function Ft(Ye){return typeof Ye.secure=="boolean"?Ye.secure:String(Ye.scheme).toLowerCase()==="wss"}var Ut={scheme:"ws",domainHost:!0,parse:function(Ve,gt){var qt=Ve;return qt.secure=Ft(qt),qt.resourceName=(qt.path||"/")+(qt.query?"?"+qt.query:""),qt.path=void 0,qt.query=void 0,qt},serialize:function(Ve,gt){if((Ve.port===(Ft(Ve)?443:80)||Ve.port==="")&&(Ve.port=void 0),typeof Ve.secure=="boolean"&&(Ve.scheme=Ve.secure?"wss":"ws",Ve.secure=void 0),Ve.resourceName){var qt=Ve.resourceName.split("?"),Ht=v(qt,2),on=Ht[0],$t=Ht[1];Ve.path=on&&on!=="/"?on:void 0,Ve.query=$t,Ve.resourceName=void 0}return Ve.fragment=void 0,Ve}},Er={scheme:"wss",domainHost:Ut.domainHost,parse:Ut.parse,serialize:Ut.serialize},kr={},mr="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",Dt="[0-9A-Fa-f]",Jr=i(i("%[EFef]"+Dt+"%"+Dt+Dt+"%"+Dt+Dt)+"|"+i("%[89A-Fa-f]"+Dt+"%"+Dt+Dt)+"|"+i("%"+Dt+Dt)),We="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",Oe="[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",$e=n(Oe,'[\\"\\\\]'),Xe="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",tt=new RegExp(mr,"g"),_t=new RegExp(Jr,"g"),Ot=new RegExp(n("[^]",We,"[\\.]",'[\\"]',$e),"g"),Nt=new RegExp(n("[^]",mr,Xe),"g"),bt=Nt;function Wt(Ye){var Ve=me(Ye);return Ve.match(tt)?Ve:Ye}var Sr={scheme:"mailto",parse:function(Ve,gt){var qt=Ve,Ht=qt.to=qt.path?qt.path.split(","):[];if(qt.path=void 0,qt.query){for(var on=!1,$t={},Gt=qt.query.split("&"),Ir=0,Br=Gt.length;Ir<Br;++Ir){var Xr=Gt[Ir].split("=");switch(Xr[0]){case"to":for(var Vn=Xr[1].split(","),Ln=0,br=Vn.length;Ln<br;++Ln)Ht.push(Vn[Ln]);break;case"subject":qt.subject=Je(Xr[1],gt);break;case"body":qt.body=Je(Xr[1],gt);break;default:on=!0,$t[Je(Xr[0],gt)]=Je(Xr[1],gt);break}}on&&(qt.headers=$t)}qt.query=void 0;for(var oi=0,Gi=Ht.length;oi<Gi;++oi){var pi=Ht[oi].split("@");if(pi[0]=Je(pi[0]),gt.unicodeSupport)pi[1]=Je(pi[1],gt).toLowerCase();else try{pi[1]=ye.toASCII(Je(pi[1],gt).toLowerCase())}catch(Ds){qt.error=qt.error||"Email address's domain name can not be converted to ASCII via punycode: "+Ds}Ht[oi]=pi.join("@")}return qt},serialize:function(Ve,gt){var qt=Ve,Ht=s(Ve.to);if(Ht){for(var on=0,$t=Ht.length;on<$t;++on){var Gt=String(Ht[on]),Ir=Gt.lastIndexOf("@"),Br=Gt.slice(0,Ir).replace(_t,Wt).replace(_t,a).replace(Ot,se),Xr=Gt.slice(Ir+1);try{Xr=gt.iri?ye.toUnicode(Xr):ye.toASCII(Je(Xr,gt).toLowerCase())}catch(oi){qt.error=qt.error||"Email address's domain name can not be converted to "+(gt.iri?"Unicode":"ASCII")+" via punycode: "+oi}Ht[on]=Br+"@"+Xr}qt.path=Ht.join(",")}var Vn=Ve.headers=Ve.headers||{};Ve.subject&&(Vn.subject=Ve.subject),Ve.body&&(Vn.body=Ve.body);var Ln=[];for(var br in Vn)Vn[br]!==kr[br]&&Ln.push(br.replace(_t,Wt).replace(_t,a).replace(Nt,se)+"="+Vn[br].replace(_t,Wt).replace(_t,a).replace(bt,se));return Ln.length&&(qt.query=Ln.join("&")),qt}},rr=/^([^\:]+)\:(.*)/,tr={scheme:"urn",parse:function(Ve,gt){var qt=Ve.path&&Ve.path.match(rr),Ht=Ve;if(qt){var on=gt.scheme||Ht.scheme||"urn",$t=qt[1].toLowerCase(),Gt=qt[2],Ir=on+":"+(gt.nid||$t),Br=xe[Ir];Ht.nid=$t,Ht.nss=Gt,Ht.path=void 0,Br&&(Ht=Br.parse(Ht,gt))}else Ht.error=Ht.error||"URN can not be parsed.";return Ht},serialize:function(Ve,gt){var qt=gt.scheme||Ve.scheme||"urn",Ht=Ve.nid,on=qt+":"+(gt.nid||Ht),$t=xe[on];$t&&(Ve=$t.serialize(Ve,gt));var Gt=Ve,Ir=Ve.nss;return Gt.path=(Ht||gt.nid)+":"+Ir,Gt}},sn=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,un={scheme:"urn:uuid",parse:function(Ve,gt){var qt=Ve;return qt.uuid=qt.nss,qt.nss=void 0,!gt.tolerant&&(!qt.uuid||!qt.uuid.match(sn))&&(qt.error=qt.error||"UUID is not valid."),qt},serialize:function(Ve,gt){var qt=Ve;return qt.nss=(Ve.uuid||"").toLowerCase(),qt}};xe[St.scheme]=St,xe[er.scheme]=er,xe[Ut.scheme]=Ut,xe[Er.scheme]=Er,xe[Sr.scheme]=Sr,xe[tr.scheme]=tr,xe[un.scheme]=un,r.SCHEMES=xe,r.pctEncChar=se,r.pctDecChars=me,r.parse=Ge,r.removeDotSegments=Ie,r.serialize=de,r.resolveComponents=Te,r.resolve=Be,r.normalize=Ke,r.equal=ot,r.escapeComponent=Ze,r.unescapeComponent=Je,Object.defineProperty(r,"__esModule",{value:!0})})})(XU,XU.exports);var YU=function t(e,r){if(e===r)return!0;if(e&&r&&typeof e=="object"&&typeof r=="object"){if(e.constructor!==r.constructor)return!1;var n,i,o;if(Array.isArray(e)){if(n=e.length,n!=r.length)return!1;for(i=n;i--!=0;)if(!t(e[i],r[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if(o=Object.keys(e),n=o.length,n!==Object.keys(r).length)return!1;for(i=n;i--!=0;)if(!Object.prototype.hasOwnProperty.call(r,o[i]))return!1;for(i=n;i--!=0;){var a=o[i];if(!t(e[a],r[a]))return!1}return!0}return e!==e&&r!==r},bct=function(e){for(var r=0,n=e.length,i=0,o;i<n;)r++,o=e.charCodeAt(i++),o>=55296&&o<=56319&&i<n&&(o=e.charCodeAt(i),(o&64512)==56320&&i++);return r},iE={copy:wct,checkDataType:KU,checkDataTypes:Cct,coerceToTypes:Ect,toHash:ZU,getProperty:QU,escapeQuotes:JU,equal:YU,ucs2length:bct,varOccurences:Pct,varReplace:Ict,schemaHasRules:Mct,schemaHasRulesExcept:Act,schemaUnknownRules:Rct,toQuotedString:eV,getPathExpr:kct,getPath:Oct,getData:Nct,unescapeFragment:$ct,unescapeJsonPointer:rV,escapeFragment:Fct,escapeJsonPointer:tV};function wct(t,e){e=e||{};for(var r in t)e[r]=t[r];return e}function KU(t,e,r,n){var i=n?" !== ":" === ",o=n?" || ":" && ",a=n?"!":"",s=n?"":"!";switch(t){case"null":return e+i+"null";case"array":return a+"Array.isArray("+e+")";case"object":return"("+a+e+o+"typeof "+e+i+'"object"'+o+s+"Array.isArray("+e+"))";case"integer":return"(typeof "+e+i+'"number"'+o+s+"("+e+" % 1)"+o+e+i+e+(r?o+a+"isFinite("+e+")":"")+")";case"number":return"(typeof "+e+i+'"'+t+'"'+(r?o+a+"isFinite("+e+")":"")+")";default:return"typeof "+e+i+'"'+t+'"'}}function Cct(t,e,r){switch(t.length){case 1:return KU(t[0],e,r,!0);default:var n="",i=ZU(t);i.array&&i.object&&(n=i.null?"(":"(!"+e+" || ",n+="typeof "+e+' !== "object")',delete i.null,delete i.array,delete i.object),i.number&&delete i.integer;for(var o in i)n+=(n?" && ":"")+KU(o,e,r,!0);return n}}var lce=ZU(["string","number","integer","boolean","null"]);function Ect(t,e){if(Array.isArray(e)){for(var r=[],n=0;n<e.length;n++){var i=e[n];(lce[i]||t==="array"&&i==="array")&&(r[r.length]=i)}if(r.length)return r}else{if(lce[e])return[e];if(t==="array"&&e==="array")return["array"]}}function ZU(t){for(var e={},r=0;r<t.length;r++)e[t[r]]=!0;return e}var Sct=/^[a-z$_][a-z$_0-9]*$/i,Tct=/'|\\/g;function QU(t){return typeof t=="number"?"["+t+"]":Sct.test(t)?"."+t:"['"+JU(t)+"']"}function JU(t){return t.replace(Tct,"\\$&").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\f/g,"\\f").replace(/\t/g,"\\t")}function Pct(t,e){e+="[^0-9]";var r=t.match(new RegExp(e,"g"));return r?r.length:0}function Ict(t,e,r){return e+="([^0-9])",r=r.replace(/\$/g,"$$$$"),t.replace(new RegExp(e,"g"),r+"$1")}function Mct(t,e){if(typeof t=="boolean")return!t;for(var r in t)if(e[r])return!0}function Act(t,e,r){if(typeof t=="boolean")return!t&&r!="not";for(var n in t)if(n!=r&&e[n])return!0}function Rct(t,e){if(typeof t!="boolean"){for(var r in t)if(!e[r])return r}}function eV(t){return"'"+JU(t)+"'"}function kct(t,e,r,n){var i=r?"'/' + "+e+(n?"":".replace(/~/g, '~0').replace(/\\//g, '~1')"):n?"'[' + "+e+" + ']'":"'[\\'' + "+e+" + '\\']'";return cce(t,i)}function Oct(t,e,r){var n=eV(r?"/"+tV(e):QU(e));return cce(t,n)}var Lct=/^\/(?:[^~]|~0|~1)*$/,Dct=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Nct(t,e,r){var n,i,o,a;if(t==="")return"rootData";if(t[0]=="/"){if(!Lct.test(t))throw new Error("Invalid JSON-pointer: "+t);i=t,o="rootData"}else{if(a=t.match(Dct),!a)throw new Error("Invalid JSON-pointer: "+t);if(n=+a[1],i=a[2],i=="#"){if(n>=e)throw new Error("Cannot access property/index "+n+" levels up, current level is "+e);return r[e-n]}if(n>e)throw new Error("Cannot access data "+n+" levels up, current level is "+e);if(o="data"+(e-n||""),!i)return o}for(var s=o,l=i.split("/"),u=0;u<l.length;u++){var p=l[u];p&&(o+=QU(rV(p)),s+=" && "+o)}return s}function cce(t,e){return t=='""'?e:(t+" + "+e).replace(/([^\\])' \+ '/g,"$1")}function $ct(t){return rV(decodeURIComponent(t))}function Fct(t){return encodeURIComponent(tV(t))}function tV(t){return t.replace(/~/g,"~0").replace(/\//g,"~1")}function rV(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}var zct=iE,uce=Bct;function Bct(t){zct.copy(t,this)}var fce={exports:{}},Zx=fce.exports=function(t,e,r){typeof e=="function"&&(r=e,e={}),r=e.cb||r;var n=typeof r=="function"?r:r.pre||function(){},i=r.post||function(){};RN(e,n,i,t,"",t)};Zx.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0};Zx.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};Zx.propsKeywords={definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};Zx.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function RN(t,e,r,n,i,o,a,s,l,u){if(n&&typeof n=="object"&&!Array.isArray(n)){e(n,i,o,a,s,l,u);for(var p in n){var m=n[p];if(Array.isArray(m)){if(p in Zx.arrayKeywords)for(var v=0;v<m.length;v++)RN(t,e,r,m[v],i+"/"+p+"/"+v,o,i,p,n,v)}else if(p in Zx.propsKeywords){if(m&&typeof m=="object")for(var x in m)RN(t,e,r,m[x],i+"/"+p+"/"+jct(x),o,i,p,n,x)}else(p in Zx.keywords||t.allKeys&&!(p in Zx.skipKeywords))&&RN(t,e,r,m,i+"/"+p,o,i,p,n)}r(n,i,o,a,s,l,u)}}function jct(t){return t.replace(/~/g,"~0").replace(/\//g,"~1")}var _M=XU.exports,dce=YU,kN=iE,ON=uce,Uct=fce.exports,nV=Qx;Qx.normalizeId=Jx;Qx.fullPath=DN;Qx.url=NN;Qx.ids=qct;Qx.inlineRef=iV;Qx.schema=LN;function Qx(t,e,r){var n=this._refs[r];if(typeof n=="string")if(this._refs[n])n=this._refs[n];else return Qx.call(this,t,e,n);if(n=n||this._schemas[r],n instanceof ON)return iV(n.schema,this._opts.inlineRefs)?n.schema:n.validate||this._compile(n);var i=LN.call(this,e,r),o,a,s;return i&&(o=i.schema,e=i.root,s=i.baseId),o instanceof ON?a=o.validate||t.call(this,o.schema,e,void 0,s):o!==void 0&&(a=iV(o,this._opts.inlineRefs)?o:t.call(this,o,e,void 0,s)),a}function LN(t,e){var r=_M.parse(e),n=pce(r),i=DN(this._getId(t.schema));if(Object.keys(t.schema).length===0||n!==i){var o=Jx(n),a=this._refs[o];if(typeof a=="string")return Vct.call(this,t,a,r);if(a instanceof ON)a.validate||this._compile(a),t=a;else if(a=this._schemas[o],a instanceof ON){if(a.validate||this._compile(a),o==Jx(e))return{schema:a,root:t,baseId:i};t=a}else return;if(!t.schema)return;i=DN(this._getId(t.schema))}return hce.call(this,r,i,t.schema,t)}function Vct(t,e,r){var n=LN.call(this,t,e);if(n){var i=n.schema,o=n.baseId;t=n.root;var a=this._getId(i);return a&&(o=NN(o,a)),hce.call(this,r,o,i,t)}}var Hct=kN.toHash(["properties","patternProperties","enum","dependencies","definitions"]);function hce(t,e,r,n){if(t.fragment=t.fragment||"",t.fragment.slice(0,1)=="/"){for(var i=t.fragment.split("/"),o=1;o<i.length;o++){var a=i[o];if(a){if(a=kN.unescapeFragment(a),r=r[a],r===void 0)break;var s;if(!Hct[a]&&(s=this._getId(r),s&&(e=NN(e,s)),r.$ref)){var l=NN(e,r.$ref),u=LN.call(this,n,l);u&&(r=u.schema,n=u.root,e=u.baseId)}}}if(r!==void 0&&r!==n.schema)return{schema:r,root:n,baseId:e}}}var Wct=kN.toHash(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum"]);function iV(t,e){if(e===!1)return!1;if(e===void 0||e===!0)return oV(t);if(e)return sV(t)<=e}function oV(t){var e;if(Array.isArray(t)){for(var r=0;r<t.length;r++)if(e=t[r],typeof e=="object"&&!oV(e))return!1}else for(var n in t)if(n=="$ref"||(e=t[n],typeof e=="object"&&!oV(e)))return!1;return!0}function sV(t){var e=0,r;if(Array.isArray(t)){for(var n=0;n<t.length;n++)if(r=t[n],typeof r=="object"&&(e+=sV(r)),e==1/0)return 1/0}else for(var i in t){if(i=="$ref")return 1/0;if(Wct[i])e++;else if(r=t[i],typeof r=="object"&&(e+=sV(r)+1),e==1/0)return 1/0}return e}function DN(t,e){e!==!1&&(t=Jx(t));var r=_M.parse(t);return pce(r)}function pce(t){return _M.serialize(t).split("#")[0]+"#"}var Gct=/#\/?$/;function Jx(t){return t?t.replace(Gct,""):""}function NN(t,e){return e=Jx(e),_M.resolve(t,e)}function qct(t){var e=Jx(this._getId(t)),r={"":e},n={"":DN(e,!1)},i={},o=this;return Uct(t,{allKeys:!0},function(a,s,l,u,p,m,v){if(s!==""){var x=o._getId(a),y=r[u],_=n[u]+"/"+p;if(v!==void 0&&(_+="/"+(typeof v=="number"?v:kN.escapeFragment(v))),typeof x=="string"){x=y=Jx(y?_M.resolve(y,x):x);var w=o._refs[x];if(typeof w=="string"&&(w=o._refs[w]),w&&w.schema){if(!dce(a,w.schema))throw new Error('id "'+x+'" resolves to more than one schema')}else if(x!=Jx(_))if(x[0]=="#"){if(i[x]&&!dce(a,i[x]))throw new Error('id "'+x+'" resolves to more than one schema');i[x]=a}else o._refs[x]=_}r[s]=y,n[s]=_}}),i}var aV=nV,lV={Validation:mce(Xct),MissingRef:mce(cV)};function Xct(t){this.message="validation failed",this.errors=t,this.ajv=this.validation=!0}cV.message=function(t,e){return"can't resolve reference "+e+" from id "+t};function cV(t,e,r){this.message=r||cV.message(t,e),this.missingRef=aV.url(t,e),this.missingSchema=aV.normalizeId(aV.fullPath(this.missingRef))}function mce(t){return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}var gce=function(t,e){e||(e={}),typeof e=="function"&&(e={cmp:e});var r=typeof e.cycles=="boolean"?e.cycles:!1,n=e.cmp&&function(o){return function(a){return function(s,l){var u={key:s,value:a[s]},p={key:l,value:a[l]};return o(u,p)}}}(e.cmp),i=[];return function o(a){if(a&&a.toJSON&&typeof a.toJSON=="function"&&(a=a.toJSON()),a!==void 0){if(typeof a=="number")return isFinite(a)?""+a:"null";if(typeof a!="object")return JSON.stringify(a);var s,l;if(Array.isArray(a)){for(l="[",s=0;s<a.length;s++)s&&(l+=","),l+=o(a[s])||"null";return l+"]"}if(a===null)return"null";if(i.indexOf(a)!==-1){if(r)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}var u=i.push(a)-1,p=Object.keys(a).sort(n&&n(a));for(l="",s=0;s<p.length;s++){var m=p[s],v=o(a[m]);!v||(l&&(l+=","),l+=JSON.stringify(m)+":"+v)}return i.splice(u,1),"{"+l+"}"}}(t)},vce=function(e,r,n){var i="",o=e.schema.$async===!0,a=e.util.schemaHasRulesExcept(e.schema,e.RULES.all,"$ref"),s=e.self._getId(e.schema);if(e.opts.strictKeywords){var l=e.util.schemaUnknownRules(e.schema,e.RULES.keywords);if(l){var u="unknown keyword: "+l;if(e.opts.strictKeywords==="log")e.logger.warn(u);else throw new Error(u)}}if(e.isTop&&(i+=" var validate = ",o&&(e.async=!0,i+="async "),i+="function(data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; ",s&&(e.opts.sourceCode||e.opts.processCode)&&(i+=" "+("/*# sourceURL="+s+" */")+" ")),typeof e.schema=="boolean"||!(a||e.schema.$ref)){var r="false schema",p=e.level,m=e.dataLevel,v=e.schema[r],x=e.schemaPath+e.util.getProperty(r),y=e.errSchemaPath+"/"+r,k=!e.opts.allErrors,W,_="data"+(m||""),A="valid"+p;if(e.schema===!1){e.isTop?k=!0:i+=" var "+A+" = false; ";var w=w||[];w.push(i),i="",e.createErrors!==!1?(i+=" { keyword: '"+(W||"false schema")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(y)+" , params: {} ",e.opts.messages!==!1&&(i+=" , message: 'boolean schema is false' "),e.opts.verbose&&(i+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+_+" "),i+=" } "):i+=" {} ";var C=i;i=w.pop(),!e.compositeRule&&k?e.async?i+=" throw new ValidationError(["+C+"]); ":i+=" validate.errors = ["+C+"]; return false; ":i+=" var err = "+C+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else e.isTop?o?i+=" return data; ":i+=" validate.errors = null; return true; ":i+=" var "+A+" = true; ";return e.isTop&&(i+=" }; return validate; "),i}if(e.isTop){var E=e.isTop,p=e.level=0,m=e.dataLevel=0,_="data";if(e.rootId=e.resolve.fullPath(e.self._getId(e.root.schema)),e.baseId=e.baseId||e.rootId,delete e.isTop,e.dataPathArr=[""],e.schema.default!==void 0&&e.opts.useDefaults&&e.opts.strictDefaults){var T="default is ignored in the schema root";if(e.opts.strictDefaults==="log")e.logger.warn(T);else throw new Error(T)}i+=" var vErrors = null; ",i+=" var errors = 0; ",i+=" if (rootData === undefined) rootData = data; "}else{var p=e.level,m=e.dataLevel,_="data"+(m||"");if(s&&(e.baseId=e.resolve.url(e.baseId,s)),o&&!e.async)throw new Error("async schema in sync schema");i+=" var errs_"+p+" = errors;"}var A="valid"+p,k=!e.opts.allErrors,X="",Z="",W,D=e.schema.type,H=Array.isArray(D);if(D&&e.opts.nullable&&e.schema.nullable===!0&&(H?D.indexOf("null")==-1&&(D=D.concat("null")):D!="null"&&(D=[D,"null"],H=!0)),H&&D.length==1&&(D=D[0],H=!1),e.schema.$ref&&a){if(e.opts.extendRefs=="fail")throw new Error('$ref: validation keywords used in schema at path "'+e.errSchemaPath+'" (see option extendRefs)');e.opts.extendRefs!==!0&&(a=!1,e.logger.warn('$ref: keywords ignored in schema at path "'+e.errSchemaPath+'"'))}if(e.schema.$comment&&e.opts.$comment&&(i+=" "+e.RULES.all.$comment.code(e,"$comment")),D){if(e.opts.coerceTypes)var N=e.util.coerceToTypes(e.opts.coerceTypes,D);var j=e.RULES.types[D];if(N||H||j===!0||j&&!xt(j)){var x=e.schemaPath+".type",y=e.errSchemaPath+"/type",x=e.schemaPath+".type",y=e.errSchemaPath+"/type",$=H?"checkDataTypes":"checkDataType";if(i+=" if ("+e.util[$](D,_,e.opts.strictNumbers,!0)+") { ",N){var z="dataType"+p,O="coerced"+p;i+=" var "+z+" = typeof "+_+"; var "+O+" = undefined; ",e.opts.coerceTypes=="array"&&(i+=" if ("+z+" == 'object' && Array.isArray("+_+") && "+_+".length == 1) { "+_+" = "+_+"[0]; "+z+" = typeof "+_+"; if ("+e.util.checkDataType(e.schema.type,_,e.opts.strictNumbers)+") "+O+" = "+_+"; } "),i+=" if ("+O+" !== undefined) ; ";var F=N;if(F)for(var G,q=-1,ee=F.length-1;q<ee;)G=F[q+=1],G=="string"?i+=" else if ("+z+" == 'number' || "+z+" == 'boolean') "+O+" = '' + "+_+"; else if ("+_+" === null) "+O+" = ''; ":G=="number"||G=="integer"?(i+=" else if ("+z+" == 'boolean' || "+_+" === null || ("+z+" == 'string' && "+_+" && "+_+" == +"+_+" ",G=="integer"&&(i+=" && !("+_+" % 1)"),i+=")) "+O+" = +"+_+"; "):G=="boolean"?i+=" else if ("+_+" === 'false' || "+_+" === 0 || "+_+" === null) "+O+" = false; else if ("+_+" === 'true' || "+_+" === 1) "+O+" = true; ":G=="null"?i+=" else if ("+_+" === '' || "+_+" === 0 || "+_+" === false) "+O+" = null; ":e.opts.coerceTypes=="array"&&G=="array"&&(i+=" else if ("+z+" == 'string' || "+z+" == 'number' || "+z+" == 'boolean' || "+_+" == null) "+O+" = ["+_+"]; ");i+=" else { ";var w=w||[];w.push(i),i="",e.createErrors!==!1?(i+=" { keyword: '"+(W||"type")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(y)+" , params: { type: '",H?i+=""+D.join(","):i+=""+D,i+="' } ",e.opts.messages!==!1&&(i+=" , message: 'should be ",H?i+=""+D.join(","):i+=""+D,i+="' "),e.opts.verbose&&(i+=" , schema: validate.schema"+x+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+_+" "),i+=" } "):i+=" {} ";var C=i;i=w.pop(),!e.compositeRule&&k?e.async?i+=" throw new ValidationError(["+C+"]); ":i+=" validate.errors = ["+C+"]; return false; ":i+=" var err = "+C+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } if ("+O+" !== undefined) { ";var re=m?"data"+(m-1||""):"parentData",ce=m?e.dataPathArr[m]:"parentDataProperty";i+=" "+_+" = "+O+"; ",m||(i+="if ("+re+" !== undefined)"),i+=" "+re+"["+ce+"] = "+O+"; } "}else{var w=w||[];w.push(i),i="",e.createErrors!==!1?(i+=" { keyword: '"+(W||"type")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(y)+" , params: { type: '",H?i+=""+D.join(","):i+=""+D,i+="' } ",e.opts.messages!==!1&&(i+=" , message: 'should be ",H?i+=""+D.join(","):i+=""+D,i+="' "),e.opts.verbose&&(i+=" , schema: validate.schema"+x+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+_+" "),i+=" } "):i+=" {} ";var C=i;i=w.pop(),!e.compositeRule&&k?e.async?i+=" throw new ValidationError(["+C+"]); ":i+=" validate.errors = ["+C+"]; return false; ":i+=" var err = "+C+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}i+=" } "}}if(e.schema.$ref&&!a)i+=" "+e.RULES.all.$ref.code(e,"$ref")+" ",k&&(i+=" } if (errors === ",E?i+="0":i+="errs_"+p,i+=") { ",Z+="}");else{var fe=e.RULES;if(fe){for(var j,J=-1,oe=fe.length-1;J<oe;)if(j=fe[J+=1],xt(j)){if(j.type&&(i+=" if ("+e.util.checkDataType(j.type,_,e.opts.strictNumbers)+") { "),e.opts.useDefaults){if(j.type=="object"&&e.schema.properties){var v=e.schema.properties,ve=Object.keys(v),ye=ve;if(ye)for(var xe,se=-1,me=ye.length-1;se<me;){xe=ye[se+=1];var pe=v[xe];if(pe.default!==void 0){var Ce=_+e.util.getProperty(xe);if(e.compositeRule){if(e.opts.strictDefaults){var T="default is ignored for: "+Ce;if(e.opts.strictDefaults==="log")e.logger.warn(T);else throw new Error(T)}}else i+=" if ("+Ce+" === undefined ",e.opts.useDefaults=="empty"&&(i+=" || "+Ce+" === null || "+Ce+" === '' "),i+=" ) "+Ce+" = ",e.opts.useDefaults=="shared"?i+=" "+e.useDefault(pe.default)+" ":i+=" "+JSON.stringify(pe.default)+" ",i+="; "}}}else if(j.type=="array"&&Array.isArray(e.schema.items)){var Pe=e.schema.items;if(Pe){for(var pe,q=-1,Re=Pe.length-1;q<Re;)if(pe=Pe[q+=1],pe.default!==void 0){var Ce=_+"["+q+"]";if(e.compositeRule){if(e.opts.strictDefaults){var T="default is ignored for: "+Ce;if(e.opts.strictDefaults==="log")e.logger.warn(T);else throw new Error(T)}}else i+=" if ("+Ce+" === undefined ",e.opts.useDefaults=="empty"&&(i+=" || "+Ce+" === null || "+Ce+" === '' "),i+=" ) "+Ce+" = ",e.opts.useDefaults=="shared"?i+=" "+e.useDefault(pe.default)+" ":i+=" "+JSON.stringify(pe.default)+" ",i+="; "}}}}var ke=j.rules;if(ke){for(var ze,Ge=-1,ht=ke.length-1;Ge<ht;)if(ze=ke[Ge+=1],pt(ze)){var Tt=ze.code(e,ze.keyword,j.type);Tt&&(i+=" "+Tt+" ",k&&(X+="}"))}}if(k&&(i+=" "+X+" ",X=""),j.type&&(i+=" } ",D&&D===j.type&&!N)){i+=" else { ";var x=e.schemaPath+".type",y=e.errSchemaPath+"/type",w=w||[];w.push(i),i="",e.createErrors!==!1?(i+=" { keyword: '"+(W||"type")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(y)+" , params: { type: '",H?i+=""+D.join(","):i+=""+D,i+="' } ",e.opts.messages!==!1&&(i+=" , message: 'should be ",H?i+=""+D.join(","):i+=""+D,i+="' "),e.opts.verbose&&(i+=" , schema: validate.schema"+x+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+_+" "),i+=" } "):i+=" {} ";var C=i;i=w.pop(),!e.compositeRule&&k?e.async?i+=" throw new ValidationError(["+C+"]); ":i+=" validate.errors = ["+C+"]; return false; ":i+=" var err = "+C+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } "}k&&(i+=" if (errors === ",E?i+="0":i+="errs_"+p,i+=") { ",Z+="}")}}}k&&(i+=" "+Z+" "),E?(o?(i+=" if (errors === 0) return data; ",i+=" else throw new ValidationError(vErrors); "):(i+=" validate.errors = vErrors; ",i+=" return errors === 0; "),i+=" }; return validate;"):i+=" var "+A+" = errors === errs_"+p+";";function xt(Ie){for(var de=Ie.rules,Te=0;Te<de.length;Te++)if(pt(de[Te]))return!0}function pt(Ie){return e.schema[Ie.keyword]!==void 0||Ie.implements&&It(Ie)}function It(Ie){for(var de=Ie.implements,Te=0;Te<de.length;Te++)if(e.schema[de[Te]]!==void 0)return!0}return i},$N=nV,FN=iE,yce=lV,Yct=gce,xce=vce,Kct=FN.ucs2length,Zct=YU,Qct=yce.Validation,Jct=uV;function uV(t,e,r,n){var i=this,o=this._opts,a=[void 0],s={},l=[],u={},p=[],m={},v=[];e=e||{schema:t,refVal:a,refs:s};var x=eut.call(this,t,e,n),y=this._compilations[x.index];if(x.compiling)return y.callValidate=T;var _=this._formats,w=this.RULES;try{var C=A(t,e,r,n);y.validate=C;var E=y.callValidate;return E&&(E.schema=C.schema,E.errors=null,E.refs=C.refs,E.refVal=C.refVal,E.root=C.root,E.$async=C.$async,o.sourceCode&&(E.source=C.source)),C}finally{tut.call(this,t,e,n)}function T(){var $=y.validate,z=$.apply(this,arguments);return T.errors=$.errors,z}function A($,z,O,F){var G=!z||z&&z.schema==$;if(z.schema!=e.schema)return uV.call(i,$,z,O,F);var q=$.$async===!0,ee=xce({isTop:!0,schema:$,isRoot:G,baseId:F,root:z,schemaPath:"",errSchemaPath:"#",errorPath:'""',MissingRefError:yce.MissingRef,RULES:w,validate:xce,util:FN,resolve:$N,resolveRef:k,usePattern:H,useDefault:N,useCustomRule:j,opts:o,formats:_,logger:i.logger,self:i});ee=zN(a,iut)+zN(l,rut)+zN(p,nut)+zN(v,out)+ee,o.processCode&&(ee=o.processCode(ee,$));var re;try{var ce=new Function("self","RULES","formats","root","refVal","defaults","customRules","equal","ucs2length","ValidationError",ee);re=ce(i,w,_,e,a,p,v,Zct,Kct,Qct),a[0]=re}catch(fe){throw i.logger.error("Error compiling schema, function code:",ee),fe}return re.schema=$,re.errors=null,re.refs=s,re.refVal=a,re.root=G?re:z,q&&(re.$async=!0),o.sourceCode===!0&&(re.source={code:ee,patterns:l,defaults:p}),re}function k($,z,O){z=$N.url($,z);var F=s[z],G,q;if(F!==void 0)return G=a[F],q="refVal["+F+"]",D(G,q);if(!O&&e.refs){var ee=e.refs[z];if(ee!==void 0)return G=e.refVal[ee],q=X(z,G),D(G,q)}q=X(z);var re=$N.call(i,A,e,z);if(re===void 0){var ce=r&&r[z];ce&&(re=$N.inlineRef(ce,o.inlineRefs)?ce:uV.call(i,ce,e,r,$))}if(re===void 0)Z(z);else return W(z,re),D(re,q)}function X($,z){var O=a.length;return a[O]=z,s[$]=O,"refVal"+O}function Z($){delete s[$]}function W($,z){var O=s[$];a[O]=z}function D($,z){return typeof $=="object"||typeof $=="boolean"?{code:z,schema:$,inline:!0}:{code:z,$async:$&&!!$.$async}}function H($){var z=u[$];return z===void 0&&(z=u[$]=l.length,l[z]=$),"pattern"+z}function N($){switch(typeof $){case"boolean":case"number":return""+$;case"string":return FN.toQuotedString($);case"object":if($===null)return"null";var z=Yct($),O=m[z];return O===void 0&&(O=m[z]=p.length,p[O]=$),"default"+O}}function j($,z,O,F){if(i._opts.validateSchema!==!1){var G=$.definition.dependencies;if(G&&!G.every(function(ye){return Object.prototype.hasOwnProperty.call(O,ye)}))throw new Error("parent schema must have all required keywords: "+G.join(","));var q=$.definition.validateSchema;if(q){var ee=q(z);if(!ee){var re="keyword schema is invalid: "+i.errorsText(q.errors);if(i._opts.validateSchema=="log")i.logger.error(re);else throw new Error(re)}}}var ce=$.definition.compile,fe=$.definition.inline,J=$.definition.macro,oe;if(ce)oe=ce.call(i,z,O,F);else if(J)oe=J.call(i,z,O,F),o.validateSchema!==!1&&i.validateSchema(oe,!0);else if(fe)oe=fe.call(i,F,$.keyword,z,O);else if(oe=$.definition.validate,!oe)return;if(oe===void 0)throw new Error('custom keyword "'+$.keyword+'"failed to compile');var ve=v.length;return v[ve]=oe,{code:"customRule"+ve,validate:oe}}}function eut(t,e,r){var n=_ce.call(this,t,e,r);return n>=0?{index:n,compiling:!0}:(n=this._compilations.length,this._compilations[n]={schema:t,root:e,baseId:r},{index:n,compiling:!1})}function tut(t,e,r){var n=_ce.call(this,t,e,r);n>=0&&this._compilations.splice(n,1)}function _ce(t,e,r){for(var n=0;n<this._compilations.length;n++){var i=this._compilations[n];if(i.schema==t&&i.root==e&&i.baseId==r)return n}return-1}function rut(t,e){return"var pattern"+t+" = new RegExp("+FN.toQuotedString(e[t])+");"}function nut(t){return"var default"+t+" = defaults["+t+"];"}function iut(t,e){return e[t]===void 0?"":"var refVal"+t+" = refVal["+t+"];"}function out(t){return"var customRule"+t+" = customRules["+t+"];"}function zN(t,e){if(!t.length)return"";for(var r="",n=0;n<t.length;n++)r+=e(n,t);return r}var bce={exports:{}},BN=bce.exports=function(){this._cache={}};BN.prototype.put=function(e,r){this._cache[e]=r};BN.prototype.get=function(e){return this._cache[e]};BN.prototype.del=function(e){delete this._cache[e]};BN.prototype.clear=function(){this._cache={}};var sut=iE,aut=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,lut=[0,31,28,31,30,31,30,31,31,30,31,30,31],cut=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i,wce=/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,uut=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,fut=/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,Cce=/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,Ece=/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i,Sce=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,Tce=/^(?:\/(?:[^~/]|~0|~1)*)*$/,Pce=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,Ice=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,dut=jN;function jN(t){return t=t=="full"?"full":"fast",sut.copy(jN[t])}jN.fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,"date-time":/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,"uri-template":Cce,url:Ece,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,hostname:wce,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:Rce,uuid:Sce,"json-pointer":Tce,"json-pointer-uri-fragment":Pce,"relative-json-pointer":Ice};jN.full={date:Mce,time:Ace,"date-time":mut,uri:vut,"uri-reference":fut,"uri-template":Cce,url:Ece,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:wce,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:Rce,uuid:Sce,"json-pointer":Tce,"json-pointer-uri-fragment":Pce,"relative-json-pointer":Ice};function hut(t){return t%4==0&&(t%100!=0||t%400==0)}function Mce(t){var e=t.match(aut);if(!e)return!1;var r=+e[1],n=+e[2],i=+e[3];return n>=1&&n<=12&&i>=1&&i<=(n==2&&hut(r)?29:lut[n])}function Ace(t,e){var r=t.match(cut);if(!r)return!1;var n=r[1],i=r[2],o=r[3],a=r[5];return(n<=23&&i<=59&&o<=59||n==23&&i==59&&o==60)&&(!e||a)}var put=/t|\s/i;function mut(t){var e=t.split(put);return e.length==2&&Mce(e[0])&&Ace(e[1],!0)}var gut=/\/|:/;function vut(t){return gut.test(t)&&uut.test(t)}var yut=/[^\\]\\Z/;function Rce(t){if(yut.test(t))return!1;try{return new RegExp(t),!0}catch{return!1}}var xut=function(e,r,n){var i=" ",o=e.level,a=e.dataLevel,s=e.schema[r],l=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,p="data"+(a||""),m="valid"+o,v,x;if(s=="#"||s=="#/")e.isRoot?(v=e.async,x="validate"):(v=e.root.schema.$async===!0,x="root.refVal[0]");else{var y=e.resolveRef(e.baseId,s,e.isRoot);if(y===void 0){var _=e.MissingRefError.message(e.baseId,s);if(e.opts.missingRefs=="fail"){e.logger.error(_);var w=w||[];w.push(i),i="",e.createErrors!==!1?(i+=" { keyword: '$ref' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { ref: '"+e.util.escapeQuotes(s)+"' } ",e.opts.messages!==!1&&(i+=" , message: 'can\\'t resolve reference "+e.util.escapeQuotes(s)+"' "),e.opts.verbose&&(i+=" , schema: "+e.util.toQuotedString(s)+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "),i+=" } "):i+=" {} ";var C=i;i=w.pop(),!e.compositeRule&&u?e.async?i+=" throw new ValidationError(["+C+"]); ":i+=" validate.errors = ["+C+"]; return false; ":i+=" var err = "+C+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",u&&(i+=" if (false) { ")}else if(e.opts.missingRefs=="ignore")e.logger.warn(_),u&&(i+=" if (true) { ");else throw new e.MissingRefError(e.baseId,s,_)}else if(y.inline){var E=e.util.copy(e);E.level++;var T="valid"+E.level;E.schema=y.schema,E.schemaPath="",E.errSchemaPath=s;var A=e.validate(E).replace(/validate\.schema/g,y.code);i+=" "+A+" ",u&&(i+=" if ("+T+") { ")}else v=y.$async===!0||e.async&&y.$async!==!1,x=y.code}if(x){var w=w||[];w.push(i),i="",e.opts.passContext?i+=" "+x+".call(this, ":i+=" "+x+"( ",i+=" "+p+", (dataPath || '')",e.errorPath!='""'&&(i+=" + "+e.errorPath);var k=a?"data"+(a-1||""):"parentData",X=a?e.dataPathArr[a]:"parentDataProperty";i+=" , "+k+" , "+X+", rootData) ";var Z=i;if(i=w.pop(),v){if(!e.async)throw new Error("async schema referenced by sync schema");u&&(i+=" var "+m+"; "),i+=" try { await "+Z+"; ",u&&(i+=" "+m+" = true; "),i+=" } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; ",u&&(i+=" "+m+" = false; "),i+=" } ",u&&(i+=" if ("+m+") { ")}else i+=" if (!"+Z+") { if (vErrors === null) vErrors = "+x+".errors; else vErrors = vErrors.concat("+x+".errors); errors = vErrors.length; } ",u&&(i+=" else { ")}return i},_ut=function(e,r,n){var i=" ",o=e.schema[r],a=e.schemaPath+e.util.getProperty(r),s=e.errSchemaPath+"/"+r,l=!e.opts.allErrors,u=e.util.copy(e),p="";u.level++;var m="valid"+u.level,v=u.baseId,x=!0,y=o;if(y)for(var _,w=-1,C=y.length-1;w<C;)_=y[w+=1],(e.opts.strictKeywords?typeof _=="object"&&Object.keys(_).length>0||_===!1:e.util.schemaHasRules(_,e.RULES.all))&&(x=!1,u.schema=_,u.schemaPath=a+"["+w+"]",u.errSchemaPath=s+"/"+w,i+=" "+e.validate(u)+" ",u.baseId=v,l&&(i+=" if ("+m+") { ",p+="}"));return l&&(x?i+=" if (true) { ":i+=" "+p.slice(0,-1)+" "),i},but=function(e,r,n){var i=" ",o=e.level,a=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,p=!e.opts.allErrors,m="data"+(a||""),v="valid"+o,x="errs__"+o,y=e.util.copy(e),_="";y.level++;var w="valid"+y.level,C=s.every(function(W){return e.opts.strictKeywords?typeof W=="object"&&Object.keys(W).length>0||W===!1:e.util.schemaHasRules(W,e.RULES.all)});if(C){var E=y.baseId;i+=" var "+x+" = errors; var "+v+" = false; ";var T=e.compositeRule;e.compositeRule=y.compositeRule=!0;var A=s;if(A)for(var k,X=-1,Z=A.length-1;X<Z;)k=A[X+=1],y.schema=k,y.schemaPath=l+"["+X+"]",y.errSchemaPath=u+"/"+X,i+=" "+e.validate(y)+" ",y.baseId=E,i+=" "+v+" = "+v+" || "+w+"; if (!"+v+") { ",_+="}";e.compositeRule=y.compositeRule=T,i+=" "+_+" if (!"+v+") { var err = ",e.createErrors!==!1?(i+=" { keyword: 'anyOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: {} ",e.opts.messages!==!1&&(i+=" , message: 'should match some schema in anyOf' "),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+m+" "),i+=" } "):i+=" {} ",i+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&p&&(e.async?i+=" throw new ValidationError(vErrors); ":i+=" validate.errors = vErrors; return false; "),i+=" } else { errors = "+x+"; if (vErrors !== null) { if ("+x+") vErrors.length = "+x+"; else vErrors = null; } ",e.opts.allErrors&&(i+=" } ")}else p&&(i+=" if (true) { ");return i},wut=function(e,r,n){var i=" ",o=e.schema[r],a=e.errSchemaPath+"/"+r;e.opts.allErrors;var s=e.util.toQuotedString(o);return e.opts.$comment===!0?i+=" console.log("+s+");":typeof e.opts.$comment=="function"&&(i+=" self._opts.$comment("+s+", "+e.util.toQuotedString(a)+", validate.root.schema);"),i},Cut=function(e,r,n){var i=" ",o=e.level,a=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,p=!e.opts.allErrors,m="data"+(a||""),v="valid"+o,x=e.opts.$data&&s&&s.$data;x&&(i+=" var schema"+o+" = "+e.util.getData(s.$data,a,e.dataPathArr)+"; "),x||(i+=" var schema"+o+" = validate.schema"+l+";"),i+="var "+v+" = equal("+m+", schema"+o+"); if (!"+v+") { ";var y=y||[];y.push(i),i="",e.createErrors!==!1?(i+=" { keyword: 'const' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { allowedValue: schema"+o+" } ",e.opts.messages!==!1&&(i+=" , message: 'should be equal to constant' "),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+m+" "),i+=" } "):i+=" {} ";var _=i;return i=y.pop(),!e.compositeRule&&p?e.async?i+=" throw new ValidationError(["+_+"]); ":i+=" validate.errors = ["+_+"]; return false; ":i+=" var err = "+_+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" }",p&&(i+=" else { "),i},Eut=function(e,r,n){var i=" ",o=e.level,a=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,p=!e.opts.allErrors,m="data"+(a||""),v="valid"+o,x="errs__"+o,y=e.util.copy(e),_="";y.level++;var w="valid"+y.level,C="i"+o,E=y.dataLevel=e.dataLevel+1,T="data"+E,A=e.baseId,k=e.opts.strictKeywords?typeof s=="object"&&Object.keys(s).length>0||s===!1:e.util.schemaHasRules(s,e.RULES.all);if(i+="var "+x+" = errors;var "+v+";",k){var X=e.compositeRule;e.compositeRule=y.compositeRule=!0,y.schema=s,y.schemaPath=l,y.errSchemaPath=u,i+=" var "+w+" = false; for (var "+C+" = 0; "+C+" < "+m+".length; "+C+"++) { ",y.errorPath=e.util.getPathExpr(e.errorPath,C,e.opts.jsonPointers,!0);var Z=m+"["+C+"]";y.dataPathArr[E]=C;var W=e.validate(y);y.baseId=A,e.util.varOccurences(W,T)<2?i+=" "+e.util.varReplace(W,T,Z)+" ":i+=" var "+T+" = "+Z+"; "+W+" ",i+=" if ("+w+") break; } ",e.compositeRule=y.compositeRule=X,i+=" "+_+" if (!"+w+") {"}else i+=" if ("+m+".length == 0) {";var D=D||[];D.push(i),i="",e.createErrors!==!1?(i+=" { keyword: 'contains' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: {} ",e.opts.messages!==!1&&(i+=" , message: 'should contain a valid item' "),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+m+" "),i+=" } "):i+=" {} ";var H=i;return i=D.pop(),!e.compositeRule&&p?e.async?i+=" throw new ValidationError(["+H+"]); ":i+=" validate.errors = ["+H+"]; return false; ":i+=" var err = "+H+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } else { ",k&&(i+=" errors = "+x+"; if (vErrors !== null) { if ("+x+") vErrors.length = "+x+"; else vErrors = null; } "),e.opts.allErrors&&(i+=" } "),i},Sut=function(e,r,n){var i=" ",o=e.level,a=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,p=!e.opts.allErrors,m="data"+(a||""),v="errs__"+o,x=e.util.copy(e),y="";x.level++;var _="valid"+x.level,w={},C={},E=e.opts.ownProperties;for(X in s)if(X!="__proto__"){var T=s[X],A=Array.isArray(T)?C:w;A[X]=T}i+="var "+v+" = errors;";var k=e.errorPath;i+="var missing"+o+";";for(var X in C)if(A=C[X],A.length){if(i+=" if ( "+m+e.util.getProperty(X)+" !== undefined ",E&&(i+=" && Object.prototype.hasOwnProperty.call("+m+", '"+e.util.escapeQuotes(X)+"') "),p){i+=" && ( ";var Z=A;if(Z)for(var W,D=-1,H=Z.length-1;D<H;){W=Z[D+=1],D&&(i+=" || ");var N=e.util.getProperty(W),j=m+N;i+=" ( ( "+j+" === undefined ",E&&(i+=" || ! Object.prototype.hasOwnProperty.call("+m+", '"+e.util.escapeQuotes(W)+"') "),i+=") && (missing"+o+" = "+e.util.toQuotedString(e.opts.jsonPointers?W:N)+") ) "}i+=")) { ";var $="missing"+o,z="' + "+$+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(k,$,!0):k+" + "+$);var O=O||[];O.push(i),i="",e.createErrors!==!1?(i+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { property: '"+e.util.escapeQuotes(X)+"', missingProperty: '"+z+"', depsCount: "+A.length+", deps: '"+e.util.escapeQuotes(A.length==1?A[0]:A.join(", "))+"' } ",e.opts.messages!==!1&&(i+=" , message: 'should have ",A.length==1?i+="property "+e.util.escapeQuotes(A[0]):i+="properties "+e.util.escapeQuotes(A.join(", ")),i+=" when property "+e.util.escapeQuotes(X)+" is present' "),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+m+" "),i+=" } "):i+=" {} ";var F=i;i=O.pop(),!e.compositeRule&&p?e.async?i+=" throw new ValidationError(["+F+"]); ":i+=" validate.errors = ["+F+"]; return false; ":i+=" var err = "+F+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else{i+=" ) { ";var G=A;if(G)for(var W,q=-1,ee=G.length-1;q<ee;){W=G[q+=1];var N=e.util.getProperty(W),z=e.util.escapeQuotes(W),j=m+N;e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(k,W,e.opts.jsonPointers)),i+=" if ( "+j+" === undefined ",E&&(i+=" || ! Object.prototype.hasOwnProperty.call("+m+", '"+e.util.escapeQuotes(W)+"') "),i+=") { var err = ",e.createErrors!==!1?(i+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { property: '"+e.util.escapeQuotes(X)+"', missingProperty: '"+z+"', depsCount: "+A.length+", deps: '"+e.util.escapeQuotes(A.length==1?A[0]:A.join(", "))+"' } ",e.opts.messages!==!1&&(i+=" , message: 'should have ",A.length==1?i+="property "+e.util.escapeQuotes(A[0]):i+="properties "+e.util.escapeQuotes(A.join(", ")),i+=" when property "+e.util.escapeQuotes(X)+" is present' "),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+m+" "),i+=" } "):i+=" {} ",i+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}i+=" } ",p&&(y+="}",i+=" else { ")}e.errorPath=k;var re=x.baseId;for(var X in w){var T=w[X];(e.opts.strictKeywords?typeof T=="object"&&Object.keys(T).length>0||T===!1:e.util.schemaHasRules(T,e.RULES.all))&&(i+=" "+_+" = true; if ( "+m+e.util.getProperty(X)+" !== undefined ",E&&(i+=" && Object.prototype.hasOwnProperty.call("+m+", '"+e.util.escapeQuotes(X)+"') "),i+=") { ",x.schema=T,x.schemaPath=l+e.util.getProperty(X),x.errSchemaPath=u+"/"+e.util.escapeFragment(X),i+=" "+e.validate(x)+" ",x.baseId=re,i+=" } ",p&&(i+=" if ("+_+") { ",y+="}"))}return p&&(i+=" "+y+" if ("+v+" == errors) {"),i},Tut=function(e,r,n){var i=" ",o=e.level,a=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,p=!e.opts.allErrors,m="data"+(a||""),v="valid"+o,x=e.opts.$data&&s&&s.$data;x&&(i+=" var schema"+o+" = "+e.util.getData(s.$data,a,e.dataPathArr)+"; ");var y="i"+o,_="schema"+o;x||(i+=" var "+_+" = validate.schema"+l+";"),i+="var "+v+";",x&&(i+=" if (schema"+o+" === undefined) "+v+" = true; else if (!Array.isArray(schema"+o+")) "+v+" = false; else {"),i+=""+v+" = false;for (var "+y+"=0; "+y+"<"+_+".length; "+y+"++) if (equal("+m+", "+_+"["+y+"])) { "+v+" = true; break; }",x&&(i+=" } "),i+=" if (!"+v+") { ";var w=w||[];w.push(i),i="",e.createErrors!==!1?(i+=" { keyword: 'enum' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { allowedValues: schema"+o+" } ",e.opts.messages!==!1&&(i+=" , message: 'should be equal to one of the allowed values' "),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+m+" "),i+=" } "):i+=" {} ";var C=i;return i=w.pop(),!e.compositeRule&&p?e.async?i+=" throw new ValidationError(["+C+"]); ":i+=" validate.errors = ["+C+"]; return false; ":i+=" var err = "+C+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" }",p&&(i+=" else { "),i},Put=function(e,r,n){var i=" ",o=e.level,a=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,p=!e.opts.allErrors,m="data"+(a||"");if(e.opts.format===!1)return p&&(i+=" if (true) { "),i;var v=e.opts.$data&&s&&s.$data,x;v?(i+=" var schema"+o+" = "+e.util.getData(s.$data,a,e.dataPathArr)+"; ",x="schema"+o):x=s;var y=e.opts.unknownFormats,_=Array.isArray(y);if(v){var w="format"+o,C="isObject"+o,E="formatType"+o;i+=" var "+w+" = formats["+x+"]; var "+C+" = typeof "+w+" == 'object' && !("+w+" instanceof RegExp) && "+w+".validate; var "+E+" = "+C+" && "+w+".type || 'string'; if ("+C+") { ",e.async&&(i+=" var async"+o+" = "+w+".async; "),i+=" "+w+" = "+w+".validate; } if ( ",v&&(i+=" ("+x+" !== undefined && typeof "+x+" != 'string') || "),i+=" (",y!="ignore"&&(i+=" ("+x+" && !"+w+" ",_&&(i+=" && self._opts.unknownFormats.indexOf("+x+") == -1 "),i+=") || "),i+=" ("+w+" && "+E+" == '"+n+"' && !(typeof "+w+" == 'function' ? ",e.async?i+=" (async"+o+" ? await "+w+"("+m+") : "+w+"("+m+")) ":i+=" "+w+"("+m+") ",i+=" : "+w+".test("+m+"))))) {"}else{var w=e.formats[s];if(!w){if(y=="ignore")return e.logger.warn('unknown format "'+s+'" ignored in schema at path "'+e.errSchemaPath+'"'),p&&(i+=" if (true) { "),i;if(_&&y.indexOf(s)>=0)return p&&(i+=" if (true) { "),i;throw new Error('unknown format "'+s+'" is used in schema at path "'+e.errSchemaPath+'"')}var C=typeof w=="object"&&!(w instanceof RegExp)&&w.validate,E=C&&w.type||"string";if(C){var T=w.async===!0;w=w.validate}if(E!=n)return p&&(i+=" if (true) { "),i;if(T){if(!e.async)throw new Error("async format in sync schema");var A="formats"+e.util.getProperty(s)+".validate";i+=" if (!(await "+A+"("+m+"))) { "}else{i+=" if (! ";var A="formats"+e.util.getProperty(s);C&&(A+=".validate"),typeof w=="function"?i+=" "+A+"("+m+") ":i+=" "+A+".test("+m+") ",i+=") { "}}var k=k||[];k.push(i),i="",e.createErrors!==!1?(i+=" { keyword: 'format' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { format: ",v?i+=""+x:i+=""+e.util.toQuotedString(s),i+=" } ",e.opts.messages!==!1&&(i+=` , message: 'should match format "`,v?i+="' + "+x+" + '":i+=""+e.util.escapeQuotes(s),i+=`"' `),e.opts.verbose&&(i+=" , schema: ",v?i+="validate.schema"+l:i+=""+e.util.toQuotedString(s),i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+m+" "),i+=" } "):i+=" {} ";var X=i;return i=k.pop(),!e.compositeRule&&p?e.async?i+=" throw new ValidationError(["+X+"]); ":i+=" validate.errors = ["+X+"]; return false; ":i+=" var err = "+X+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } ",p&&(i+=" else { "),i},Iut=function(e,r,n){var i=" ",o=e.level,a=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,p=!e.opts.allErrors,m="data"+(a||""),v="valid"+o,x="errs__"+o,y=e.util.copy(e);y.level++;var _="valid"+y.level,w=e.schema.then,C=e.schema.else,E=w!==void 0&&(e.opts.strictKeywords?typeof w=="object"&&Object.keys(w).length>0||w===!1:e.util.schemaHasRules(w,e.RULES.all)),T=C!==void 0&&(e.opts.strictKeywords?typeof C=="object"&&Object.keys(C).length>0||C===!1:e.util.schemaHasRules(C,e.RULES.all)),A=y.baseId;if(E||T){var k;y.createErrors=!1,y.schema=s,y.schemaPath=l,y.errSchemaPath=u,i+=" var "+x+" = errors; var "+v+" = true; ";var X=e.compositeRule;e.compositeRule=y.compositeRule=!0,i+=" "+e.validate(y)+" ",y.baseId=A,y.createErrors=!0,i+=" errors = "+x+"; if (vErrors !== null) { if ("+x+") vErrors.length = "+x+"; else vErrors = null; } ",e.compositeRule=y.compositeRule=X,E?(i+=" if ("+_+") { ",y.schema=e.schema.then,y.schemaPath=e.schemaPath+".then",y.errSchemaPath=e.errSchemaPath+"/then",i+=" "+e.validate(y)+" ",y.baseId=A,i+=" "+v+" = "+_+"; ",E&&T?(k="ifClause"+o,i+=" var "+k+" = 'then'; "):k="'then'",i+=" } ",T&&(i+=" else { ")):i+=" if (!"+_+") { ",T&&(y.schema=e.schema.else,y.schemaPath=e.schemaPath+".else",y.errSchemaPath=e.errSchemaPath+"/else",i+=" "+e.validate(y)+" ",y.baseId=A,i+=" "+v+" = "+_+"; ",E&&T?(k="ifClause"+o,i+=" var "+k+" = 'else'; "):k="'else'",i+=" } "),i+=" if (!"+v+") { var err = ",e.createErrors!==!1?(i+=" { keyword: 'if' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { failingKeyword: "+k+" } ",e.opts.messages!==!1&&(i+=` , message: 'should match "' + `+k+` + '" schema' `),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+m+" "),i+=" } "):i+=" {} ",i+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&p&&(e.async?i+=" throw new ValidationError(vErrors); ":i+=" validate.errors = vErrors; return false; "),i+=" } ",p&&(i+=" else { ")}else p&&(i+=" if (true) { ");return i},Mut=function(e,r,n){var i=" ",o=e.level,a=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,p=!e.opts.allErrors,m="data"+(a||""),v="valid"+o,x="errs__"+o,y=e.util.copy(e),_="";y.level++;var w="valid"+y.level,C="i"+o,E=y.dataLevel=e.dataLevel+1,T="data"+E,A=e.baseId;if(i+="var "+x+" = errors;var "+v+";",Array.isArray(s)){var k=e.schema.additionalItems;if(k===!1){i+=" "+v+" = "+m+".length <= "+s.length+"; ";var X=u;u=e.errSchemaPath+"/additionalItems",i+=" if (!"+v+") { ";var Z=Z||[];Z.push(i),i="",e.createErrors!==!1?(i+=" { keyword: 'additionalItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { limit: "+s.length+" } ",e.opts.messages!==!1&&(i+=" , message: 'should NOT have more than "+s.length+" items' "),e.opts.verbose&&(i+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+m+" "),i+=" } "):i+=" {} ";var W=i;i=Z.pop(),!e.compositeRule&&p?e.async?i+=" throw new ValidationError(["+W+"]); ":i+=" validate.errors = ["+W+"]; return false; ":i+=" var err = "+W+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } ",u=X,p&&(_+="}",i+=" else { ")}var D=s;if(D){for(var H,N=-1,j=D.length-1;N<j;)if(H=D[N+=1],e.opts.strictKeywords?typeof H=="object"&&Object.keys(H).length>0||H===!1:e.util.schemaHasRules(H,e.RULES.all)){i+=" "+w+" = true; if ("+m+".length > "+N+") { ";var $=m+"["+N+"]";y.schema=H,y.schemaPath=l+"["+N+"]",y.errSchemaPath=u+"/"+N,y.errorPath=e.util.getPathExpr(e.errorPath,N,e.opts.jsonPointers,!0),y.dataPathArr[E]=N;var z=e.validate(y);y.baseId=A,e.util.varOccurences(z,T)<2?i+=" "+e.util.varReplace(z,T,$)+" ":i+=" var "+T+" = "+$+"; "+z+" ",i+=" } ",p&&(i+=" if ("+w+") { ",_+="}")}}if(typeof k=="object"&&(e.opts.strictKeywords?typeof k=="object"&&Object.keys(k).length>0||k===!1:e.util.schemaHasRules(k,e.RULES.all))){y.schema=k,y.schemaPath=e.schemaPath+".additionalItems",y.errSchemaPath=e.errSchemaPath+"/additionalItems",i+=" "+w+" = true; if ("+m+".length > "+s.length+") { for (var "+C+" = "+s.length+"; "+C+" < "+m+".length; "+C+"++) { ",y.errorPath=e.util.getPathExpr(e.errorPath,C,e.opts.jsonPointers,!0);var $=m+"["+C+"]";y.dataPathArr[E]=C;var z=e.validate(y);y.baseId=A,e.util.varOccurences(z,T)<2?i+=" "+e.util.varReplace(z,T,$)+" ":i+=" var "+T+" = "+$+"; "+z+" ",p&&(i+=" if (!"+w+") break; "),i+=" } } ",p&&(i+=" if ("+w+") { ",_+="}")}}else if(e.opts.strictKeywords?typeof s=="object"&&Object.keys(s).length>0||s===!1:e.util.schemaHasRules(s,e.RULES.all)){y.schema=s,y.schemaPath=l,y.errSchemaPath=u,i+=" for (var "+C+" = "+0+"; "+C+" < "+m+".length; "+C+"++) { ",y.errorPath=e.util.getPathExpr(e.errorPath,C,e.opts.jsonPointers,!0);var $=m+"["+C+"]";y.dataPathArr[E]=C;var z=e.validate(y);y.baseId=A,e.util.varOccurences(z,T)<2?i+=" "+e.util.varReplace(z,T,$)+" ":i+=" var "+T+" = "+$+"; "+z+" ",p&&(i+=" if (!"+w+") break; "),i+=" }"}return p&&(i+=" "+_+" if ("+x+" == errors) {"),i},kce=function(e,r,n){var i=" ",o=e.level,a=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,p=!e.opts.allErrors,m,v="data"+(a||""),x=e.opts.$data&&s&&s.$data,y;x?(i+=" var schema"+o+" = "+e.util.getData(s.$data,a,e.dataPathArr)+"; ",y="schema"+o):y=s;var _=r=="maximum",w=_?"exclusiveMaximum":"exclusiveMinimum",C=e.schema[w],E=e.opts.$data&&C&&C.$data,T=_?"<":">",A=_?">":"<",m=void 0;if(!(x||typeof s=="number"||s===void 0))throw new Error(r+" must be number");if(!(E||C===void 0||typeof C=="number"||typeof C=="boolean"))throw new Error(w+" must be number or boolean");if(E){var k=e.util.getData(C.$data,a,e.dataPathArr),X="exclusive"+o,Z="exclType"+o,W="exclIsNumber"+o,D="op"+o,H="' + "+D+" + '";i+=" var schemaExcl"+o+" = "+k+"; ",k="schemaExcl"+o,i+=" var "+X+"; var "+Z+" = typeof "+k+"; if ("+Z+" != 'boolean' && "+Z+" != 'undefined' && "+Z+" != 'number') { ";var m=w,N=N||[];N.push(i),i="",e.createErrors!==!1?(i+=" { keyword: '"+(m||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: {} ",e.opts.messages!==!1&&(i+=" , message: '"+w+" should be boolean' "),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+v+" "),i+=" } "):i+=" {} ";var j=i;i=N.pop(),!e.compositeRule&&p?e.async?i+=" throw new ValidationError(["+j+"]); ":i+=" validate.errors = ["+j+"]; return false; ":i+=" var err = "+j+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } else if ( ",x&&(i+=" ("+y+" !== undefined && typeof "+y+" != 'number') || "),i+=" "+Z+" == 'number' ? ( ("+X+" = "+y+" === undefined || "+k+" "+T+"= "+y+") ? "+v+" "+A+"= "+k+" : "+v+" "+A+" "+y+" ) : ( ("+X+" = "+k+" === true) ? "+v+" "+A+"= "+y+" : "+v+" "+A+" "+y+" ) || "+v+" !== "+v+") { var op"+o+" = "+X+" ? '"+T+"' : '"+T+"='; ",s===void 0&&(m=w,u=e.errSchemaPath+"/"+w,y=k,x=E)}else{var W=typeof C=="number",H=T;if(W&&x){var D="'"+H+"'";i+=" if ( ",x&&(i+=" ("+y+" !== undefined && typeof "+y+" != 'number') || "),i+=" ( "+y+" === undefined || "+C+" "+T+"= "+y+" ? "+v+" "+A+"= "+C+" : "+v+" "+A+" "+y+" ) || "+v+" !== "+v+") { "}else{W&&s===void 0?(X=!0,m=w,u=e.errSchemaPath+"/"+w,y=C,A+="="):(W&&(y=Math[_?"min":"max"](C,s)),C===(W?y:!0)?(X=!0,m=w,u=e.errSchemaPath+"/"+w,A+="="):(X=!1,H+="="));var D="'"+H+"'";i+=" if ( ",x&&(i+=" ("+y+" !== undefined && typeof "+y+" != 'number') || "),i+=" "+v+" "+A+" "+y+" || "+v+" !== "+v+") { "}}m=m||r;var N=N||[];N.push(i),i="",e.createErrors!==!1?(i+=" { keyword: '"+(m||"_limit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { comparison: "+D+", limit: "+y+", exclusive: "+X+" } ",e.opts.messages!==!1&&(i+=" , message: 'should be "+H+" ",x?i+="' + "+y:i+=""+y+"'"),e.opts.verbose&&(i+=" , schema: ",x?i+="validate.schema"+l:i+=""+s,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+v+" "),i+=" } "):i+=" {} ";var j=i;return i=N.pop(),!e.compositeRule&&p?e.async?i+=" throw new ValidationError(["+j+"]); ":i+=" validate.errors = ["+j+"]; return false; ":i+=" var err = "+j+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } ",p&&(i+=" else { "),i},Oce=function(e,r,n){var i=" ",o=e.level,a=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,p=!e.opts.allErrors,m,v="data"+(a||""),x=e.opts.$data&&s&&s.$data,y;if(x?(i+=" var schema"+o+" = "+e.util.getData(s.$data,a,e.dataPathArr)+"; ",y="schema"+o):y=s,!(x||typeof s=="number"))throw new Error(r+" must be number");var _=r=="maxItems"?">":"<";i+="if ( ",x&&(i+=" ("+y+" !== undefined && typeof "+y+" != 'number') || "),i+=" "+v+".length "+_+" "+y+") { ";var m=r,w=w||[];w.push(i),i="",e.createErrors!==!1?(i+=" { keyword: '"+(m||"_limitItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { limit: "+y+" } ",e.opts.messages!==!1&&(i+=" , message: 'should NOT have ",r=="maxItems"?i+="more":i+="fewer",i+=" than ",x?i+="' + "+y+" + '":i+=""+s,i+=" items' "),e.opts.verbose&&(i+=" , schema: ",x?i+="validate.schema"+l:i+=""+s,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+v+" "),i+=" } "):i+=" {} ";var C=i;return i=w.pop(),!e.compositeRule&&p?e.async?i+=" throw new ValidationError(["+C+"]); ":i+=" validate.errors = ["+C+"]; return false; ":i+=" var err = "+C+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",p&&(i+=" else { "),i},Lce=function(e,r,n){var i=" ",o=e.level,a=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,p=!e.opts.allErrors,m,v="data"+(a||""),x=e.opts.$data&&s&&s.$data,y;if(x?(i+=" var schema"+o+" = "+e.util.getData(s.$data,a,e.dataPathArr)+"; ",y="schema"+o):y=s,!(x||typeof s=="number"))throw new Error(r+" must be number");var _=r=="maxLength"?">":"<";i+="if ( ",x&&(i+=" ("+y+" !== undefined && typeof "+y+" != 'number') || "),e.opts.unicode===!1?i+=" "+v+".length ":i+=" ucs2length("+v+") ",i+=" "+_+" "+y+") { ";var m=r,w=w||[];w.push(i),i="",e.createErrors!==!1?(i+=" { keyword: '"+(m||"_limitLength")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { limit: "+y+" } ",e.opts.messages!==!1&&(i+=" , message: 'should NOT be ",r=="maxLength"?i+="longer":i+="shorter",i+=" than ",x?i+="' + "+y+" + '":i+=""+s,i+=" characters' "),e.opts.verbose&&(i+=" , schema: ",x?i+="validate.schema"+l:i+=""+s,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+v+" "),i+=" } "):i+=" {} ";var C=i;return i=w.pop(),!e.compositeRule&&p?e.async?i+=" throw new ValidationError(["+C+"]); ":i+=" validate.errors = ["+C+"]; return false; ":i+=" var err = "+C+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",p&&(i+=" else { "),i},Dce=function(e,r,n){var i=" ",o=e.level,a=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,p=!e.opts.allErrors,m,v="data"+(a||""),x=e.opts.$data&&s&&s.$data,y;if(x?(i+=" var schema"+o+" = "+e.util.getData(s.$data,a,e.dataPathArr)+"; ",y="schema"+o):y=s,!(x||typeof s=="number"))throw new Error(r+" must be number");var _=r=="maxProperties"?">":"<";i+="if ( ",x&&(i+=" ("+y+" !== undefined && typeof "+y+" != 'number') || "),i+=" Object.keys("+v+").length "+_+" "+y+") { ";var m=r,w=w||[];w.push(i),i="",e.createErrors!==!1?(i+=" { keyword: '"+(m||"_limitProperties")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { limit: "+y+" } ",e.opts.messages!==!1&&(i+=" , message: 'should NOT have ",r=="maxProperties"?i+="more":i+="fewer",i+=" than ",x?i+="' + "+y+" + '":i+=""+s,i+=" properties' "),e.opts.verbose&&(i+=" , schema: ",x?i+="validate.schema"+l:i+=""+s,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+v+" "),i+=" } "):i+=" {} ";var C=i;return i=w.pop(),!e.compositeRule&&p?e.async?i+=" throw new ValidationError(["+C+"]); ":i+=" validate.errors = ["+C+"]; return false; ":i+=" var err = "+C+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",p&&(i+=" else { "),i},Aut=function(e,r,n){var i=" ",o=e.level,a=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,p=!e.opts.allErrors,m="data"+(a||""),v=e.opts.$data&&s&&s.$data,x;if(v?(i+=" var schema"+o+" = "+e.util.getData(s.$data,a,e.dataPathArr)+"; ",x="schema"+o):x=s,!(v||typeof s=="number"))throw new Error(r+" must be number");i+="var division"+o+";if (",v&&(i+=" "+x+" !== undefined && ( typeof "+x+" != 'number' || "),i+=" (division"+o+" = "+m+" / "+x+", ",e.opts.multipleOfPrecision?i+=" Math.abs(Math.round(division"+o+") - division"+o+") > 1e-"+e.opts.multipleOfPrecision+" ":i+=" division"+o+" !== parseInt(division"+o+") ",i+=" ) ",v&&(i+=" ) "),i+=" ) { ";var y=y||[];y.push(i),i="",e.createErrors!==!1?(i+=" { keyword: 'multipleOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { multipleOf: "+x+" } ",e.opts.messages!==!1&&(i+=" , message: 'should be multiple of ",v?i+="' + "+x:i+=""+x+"'"),e.opts.verbose&&(i+=" , schema: ",v?i+="validate.schema"+l:i+=""+s,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+m+" "),i+=" } "):i+=" {} ";var _=i;return i=y.pop(),!e.compositeRule&&p?e.async?i+=" throw new ValidationError(["+_+"]); ":i+=" validate.errors = ["+_+"]; return false; ":i+=" var err = "+_+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",p&&(i+=" else { "),i},Rut=function(e,r,n){var i=" ",o=e.level,a=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,p=!e.opts.allErrors,m="data"+(a||""),v="errs__"+o,x=e.util.copy(e);x.level++;var y="valid"+x.level;if(e.opts.strictKeywords?typeof s=="object"&&Object.keys(s).length>0||s===!1:e.util.schemaHasRules(s,e.RULES.all)){x.schema=s,x.schemaPath=l,x.errSchemaPath=u,i+=" var "+v+" = errors; ";var _=e.compositeRule;e.compositeRule=x.compositeRule=!0,x.createErrors=!1;var w;x.opts.allErrors&&(w=x.opts.allErrors,x.opts.allErrors=!1),i+=" "+e.validate(x)+" ",x.createErrors=!0,w&&(x.opts.allErrors=w),e.compositeRule=x.compositeRule=_,i+=" if ("+y+") { ";var C=C||[];C.push(i),i="",e.createErrors!==!1?(i+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: {} ",e.opts.messages!==!1&&(i+=" , message: 'should NOT be valid' "),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+m+" "),i+=" } "):i+=" {} ";var E=i;i=C.pop(),!e.compositeRule&&p?e.async?i+=" throw new ValidationError(["+E+"]); ":i+=" validate.errors = ["+E+"]; return false; ":i+=" var err = "+E+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } else { errors = "+v+"; if (vErrors !== null) { if ("+v+") vErrors.length = "+v+"; else vErrors = null; } ",e.opts.allErrors&&(i+=" } ")}else i+=" var err = ",e.createErrors!==!1?(i+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: {} ",e.opts.messages!==!1&&(i+=" , message: 'should NOT be valid' "),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+m+" "),i+=" } "):i+=" {} ",i+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",p&&(i+=" if (false) { ");return i},kut=function(e,r,n){var i=" ",o=e.level,a=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,p=!e.opts.allErrors,m="data"+(a||""),v="valid"+o,x="errs__"+o,y=e.util.copy(e),_="";y.level++;var w="valid"+y.level,C=y.baseId,E="prevValid"+o,T="passingSchemas"+o;i+="var "+x+" = errors , "+E+" = false , "+v+" = false , "+T+" = null; ";var A=e.compositeRule;e.compositeRule=y.compositeRule=!0;var k=s;if(k)for(var X,Z=-1,W=k.length-1;Z<W;)X=k[Z+=1],(e.opts.strictKeywords?typeof X=="object"&&Object.keys(X).length>0||X===!1:e.util.schemaHasRules(X,e.RULES.all))?(y.schema=X,y.schemaPath=l+"["+Z+"]",y.errSchemaPath=u+"/"+Z,i+=" "+e.validate(y)+" ",y.baseId=C):i+=" var "+w+" = true; ",Z&&(i+=" if ("+w+" && "+E+") { "+v+" = false; "+T+" = ["+T+", "+Z+"]; } else { ",_+="}"),i+=" if ("+w+") { "+v+" = "+E+" = true; "+T+" = "+Z+"; }";return e.compositeRule=y.compositeRule=A,i+=""+_+"if (!"+v+") { var err = ",e.createErrors!==!1?(i+=" { keyword: 'oneOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { passingSchemas: "+T+" } ",e.opts.messages!==!1&&(i+=" , message: 'should match exactly one schema in oneOf' "),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+m+" "),i+=" } "):i+=" {} ",i+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&p&&(e.async?i+=" throw new ValidationError(vErrors); ":i+=" validate.errors = vErrors; return false; "),i+="} else { errors = "+x+"; if (vErrors !== null) { if ("+x+") vErrors.length = "+x+"; else vErrors = null; }",e.opts.allErrors&&(i+=" } "),i},Out=function(e,r,n){var i=" ",o=e.level,a=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,p=!e.opts.allErrors,m="data"+(a||""),v=e.opts.$data&&s&&s.$data,x;v?(i+=" var schema"+o+" = "+e.util.getData(s.$data,a,e.dataPathArr)+"; ",x="schema"+o):x=s;var y=v?"(new RegExp("+x+"))":e.usePattern(s);i+="if ( ",v&&(i+=" ("+x+" !== undefined && typeof "+x+" != 'string') || "),i+=" !"+y+".test("+m+") ) { ";var _=_||[];_.push(i),i="",e.createErrors!==!1?(i+=" { keyword: 'pattern' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { pattern: ",v?i+=""+x:i+=""+e.util.toQuotedString(s),i+=" } ",e.opts.messages!==!1&&(i+=` , message: 'should match pattern "`,v?i+="' + "+x+" + '":i+=""+e.util.escapeQuotes(s),i+=`"' `),e.opts.verbose&&(i+=" , schema: ",v?i+="validate.schema"+l:i+=""+e.util.toQuotedString(s),i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+m+" "),i+=" } "):i+=" {} ";var w=i;return i=_.pop(),!e.compositeRule&&p?e.async?i+=" throw new ValidationError(["+w+"]); ":i+=" validate.errors = ["+w+"]; return false; ":i+=" var err = "+w+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",p&&(i+=" else { "),i},Lut=function(e,r,n){var i=" ",o=e.level,a=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,p=!e.opts.allErrors,m="data"+(a||""),v="errs__"+o,x=e.util.copy(e),y="";x.level++;var _="valid"+x.level,w="key"+o,C="idx"+o,E=x.dataLevel=e.dataLevel+1,T="data"+E,A="dataProperties"+o,k=Object.keys(s||{}).filter(q),X=e.schema.patternProperties||{},Z=Object.keys(X).filter(q),W=e.schema.additionalProperties,D=k.length||Z.length,H=W===!1,N=typeof W=="object"&&Object.keys(W).length,j=e.opts.removeAdditional,$=H||N||j,z=e.opts.ownProperties,O=e.baseId,F=e.schema.required;if(F&&!(e.opts.$data&&F.$data)&&F.length<e.opts.loopRequired)var G=e.util.toHash(F);function q(ot){return ot!=="__proto__"}if(i+="var "+v+" = errors;var "+_+" = true;",z&&(i+=" var "+A+" = undefined;"),$){if(z?i+=" "+A+" = "+A+" || Object.keys("+m+"); for (var "+C+"=0; "+C+"<"+A+".length; "+C+"++) { var "+w+" = "+A+"["+C+"]; ":i+=" for (var "+w+" in "+m+") { ",D){if(i+=" var isAdditional"+o+" = !(false ",k.length)if(k.length>8)i+=" || validate.schema"+l+".hasOwnProperty("+w+") ";else{var ee=k;if(ee)for(var re,ce=-1,fe=ee.length-1;ce<fe;)re=ee[ce+=1],i+=" || "+w+" == "+e.util.toQuotedString(re)+" "}if(Z.length){var J=Z;if(J)for(var oe,ve=-1,ye=J.length-1;ve<ye;)oe=J[ve+=1],i+=" || "+e.usePattern(oe)+".test("+w+") "}i+=" ); if (isAdditional"+o+") { "}if(j=="all")i+=" delete "+m+"["+w+"]; ";else{var xe=e.errorPath,se="' + "+w+" + '";if(e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(e.errorPath,w,e.opts.jsonPointers)),H)if(j)i+=" delete "+m+"["+w+"]; ";else{i+=" "+_+" = false; ";var me=u;u=e.errSchemaPath+"/additionalProperties";var pe=pe||[];pe.push(i),i="",e.createErrors!==!1?(i+=" { keyword: 'additionalProperties' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { additionalProperty: '"+se+"' } ",e.opts.messages!==!1&&(i+=" , message: '",e.opts._errorDataPathProperty?i+="is an invalid additional property":i+="should NOT have additional properties",i+="' "),e.opts.verbose&&(i+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+m+" "),i+=" } "):i+=" {} ";var Ce=i;i=pe.pop(),!e.compositeRule&&p?e.async?i+=" throw new ValidationError(["+Ce+"]); ":i+=" validate.errors = ["+Ce+"]; return false; ":i+=" var err = "+Ce+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",u=me,p&&(i+=" break; ")}else if(N)if(j=="failing"){i+=" var "+v+" = errors; ";var Pe=e.compositeRule;e.compositeRule=x.compositeRule=!0,x.schema=W,x.schemaPath=e.schemaPath+".additionalProperties",x.errSchemaPath=e.errSchemaPath+"/additionalProperties",x.errorPath=e.opts._errorDataPathProperty?e.errorPath:e.util.getPathExpr(e.errorPath,w,e.opts.jsonPointers);var Re=m+"["+w+"]";x.dataPathArr[E]=w;var ke=e.validate(x);x.baseId=O,e.util.varOccurences(ke,T)<2?i+=" "+e.util.varReplace(ke,T,Re)+" ":i+=" var "+T+" = "+Re+"; "+ke+" ",i+=" if (!"+_+") { errors = "+v+"; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete "+m+"["+w+"]; } ",e.compositeRule=x.compositeRule=Pe}else{x.schema=W,x.schemaPath=e.schemaPath+".additionalProperties",x.errSchemaPath=e.errSchemaPath+"/additionalProperties",x.errorPath=e.opts._errorDataPathProperty?e.errorPath:e.util.getPathExpr(e.errorPath,w,e.opts.jsonPointers);var Re=m+"["+w+"]";x.dataPathArr[E]=w;var ke=e.validate(x);x.baseId=O,e.util.varOccurences(ke,T)<2?i+=" "+e.util.varReplace(ke,T,Re)+" ":i+=" var "+T+" = "+Re+"; "+ke+" ",p&&(i+=" if (!"+_+") break; ")}e.errorPath=xe}D&&(i+=" } "),i+=" } ",p&&(i+=" if ("+_+") { ",y+="}")}var ze=e.opts.useDefaults&&!e.compositeRule;if(k.length){var Ge=k;if(Ge)for(var re,ht=-1,Tt=Ge.length-1;ht<Tt;){re=Ge[ht+=1];var xt=s[re];if(e.opts.strictKeywords?typeof xt=="object"&&Object.keys(xt).length>0||xt===!1:e.util.schemaHasRules(xt,e.RULES.all)){var pt=e.util.getProperty(re),Re=m+pt,It=ze&&xt.default!==void 0;x.schema=xt,x.schemaPath=l+pt,x.errSchemaPath=u+"/"+e.util.escapeFragment(re),x.errorPath=e.util.getPath(e.errorPath,re,e.opts.jsonPointers),x.dataPathArr[E]=e.util.toQuotedString(re);var ke=e.validate(x);if(x.baseId=O,e.util.varOccurences(ke,T)<2){ke=e.util.varReplace(ke,T,Re);var Ie=Re}else{var Ie=T;i+=" var "+T+" = "+Re+"; "}if(It)i+=" "+ke+" ";else{if(G&&G[re]){i+=" if ( "+Ie+" === undefined ",z&&(i+=" || ! Object.prototype.hasOwnProperty.call("+m+", '"+e.util.escapeQuotes(re)+"') "),i+=") { "+_+" = false; ";var xe=e.errorPath,me=u,de=e.util.escapeQuotes(re);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(xe,re,e.opts.jsonPointers)),u=e.errSchemaPath+"/required";var pe=pe||[];pe.push(i),i="",e.createErrors!==!1?(i+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { missingProperty: '"+de+"' } ",e.opts.messages!==!1&&(i+=" , message: '",e.opts._errorDataPathProperty?i+="is a required property":i+="should have required property \\'"+de+"\\'",i+="' "),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+m+" "),i+=" } "):i+=" {} ";var Ce=i;i=pe.pop(),!e.compositeRule&&p?e.async?i+=" throw new ValidationError(["+Ce+"]); ":i+=" validate.errors = ["+Ce+"]; return false; ":i+=" var err = "+Ce+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",u=me,e.errorPath=xe,i+=" } else { "}else p?(i+=" if ( "+Ie+" === undefined ",z&&(i+=" || ! Object.prototype.hasOwnProperty.call("+m+", '"+e.util.escapeQuotes(re)+"') "),i+=") { "+_+" = true; } else { "):(i+=" if ("+Ie+" !== undefined ",z&&(i+=" && Object.prototype.hasOwnProperty.call("+m+", '"+e.util.escapeQuotes(re)+"') "),i+=" ) { ");i+=" "+ke+" } "}}p&&(i+=" if ("+_+") { ",y+="}")}}if(Z.length){var Te=Z;if(Te)for(var oe,Be=-1,Ke=Te.length-1;Be<Ke;){oe=Te[Be+=1];var xt=X[oe];if(e.opts.strictKeywords?typeof xt=="object"&&Object.keys(xt).length>0||xt===!1:e.util.schemaHasRules(xt,e.RULES.all)){x.schema=xt,x.schemaPath=e.schemaPath+".patternProperties"+e.util.getProperty(oe),x.errSchemaPath=e.errSchemaPath+"/patternProperties/"+e.util.escapeFragment(oe),z?i+=" "+A+" = "+A+" || Object.keys("+m+"); for (var "+C+"=0; "+C+"<"+A+".length; "+C+"++) { var "+w+" = "+A+"["+C+"]; ":i+=" for (var "+w+" in "+m+") { ",i+=" if ("+e.usePattern(oe)+".test("+w+")) { ",x.errorPath=e.util.getPathExpr(e.errorPath,w,e.opts.jsonPointers);var Re=m+"["+w+"]";x.dataPathArr[E]=w;var ke=e.validate(x);x.baseId=O,e.util.varOccurences(ke,T)<2?i+=" "+e.util.varReplace(ke,T,Re)+" ":i+=" var "+T+" = "+Re+"; "+ke+" ",p&&(i+=" if (!"+_+") break; "),i+=" } ",p&&(i+=" else "+_+" = true; "),i+=" } ",p&&(i+=" if ("+_+") { ",y+="}")}}}return p&&(i+=" "+y+" if ("+v+" == errors) {"),i},Dut=function(e,r,n){var i=" ",o=e.level,a=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,p=!e.opts.allErrors,m="data"+(a||""),v="errs__"+o,x=e.util.copy(e),y="";x.level++;var _="valid"+x.level;if(i+="var "+v+" = errors;",e.opts.strictKeywords?typeof s=="object"&&Object.keys(s).length>0||s===!1:e.util.schemaHasRules(s,e.RULES.all)){x.schema=s,x.schemaPath=l,x.errSchemaPath=u;var w="key"+o,C="idx"+o,E="i"+o,T="' + "+w+" + '",A=x.dataLevel=e.dataLevel+1,k="data"+A,X="dataProperties"+o,Z=e.opts.ownProperties,W=e.baseId;Z&&(i+=" var "+X+" = undefined; "),Z?i+=" "+X+" = "+X+" || Object.keys("+m+"); for (var "+C+"=0; "+C+"<"+X+".length; "+C+"++) { var "+w+" = "+X+"["+C+"]; ":i+=" for (var "+w+" in "+m+") { ",i+=" var startErrs"+o+" = errors; ";var D=w,H=e.compositeRule;e.compositeRule=x.compositeRule=!0;var N=e.validate(x);x.baseId=W,e.util.varOccurences(N,k)<2?i+=" "+e.util.varReplace(N,k,D)+" ":i+=" var "+k+" = "+D+"; "+N+" ",e.compositeRule=x.compositeRule=H,i+=" if (!"+_+") { for (var "+E+"=startErrs"+o+"; "+E+"<errors; "+E+"++) { vErrors["+E+"].propertyName = "+w+"; } var err = ",e.createErrors!==!1?(i+=" { keyword: 'propertyNames' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { propertyName: '"+T+"' } ",e.opts.messages!==!1&&(i+=" , message: 'property name \\'"+T+"\\' is invalid' "),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+m+" "),i+=" } "):i+=" {} ",i+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&p&&(e.async?i+=" throw new ValidationError(vErrors); ":i+=" validate.errors = vErrors; return false; "),p&&(i+=" break; "),i+=" } }"}return p&&(i+=" "+y+" if ("+v+" == errors) {"),i},Nut=function(e,r,n){var i=" ",o=e.level,a=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,p=!e.opts.allErrors,m="data"+(a||""),v="valid"+o,x=e.opts.$data&&s&&s.$data;x&&(i+=" var schema"+o+" = "+e.util.getData(s.$data,a,e.dataPathArr)+"; ");var y="schema"+o;if(!x)if(s.length<e.opts.loopRequired&&e.schema.properties&&Object.keys(e.schema.properties).length){var _=[],w=s;if(w)for(var C,E=-1,T=w.length-1;E<T;){C=w[E+=1];var A=e.schema.properties[C];A&&(e.opts.strictKeywords?typeof A=="object"&&Object.keys(A).length>0||A===!1:e.util.schemaHasRules(A,e.RULES.all))||(_[_.length]=C)}}else var _=s;if(x||_.length){var k=e.errorPath,X=x||_.length>=e.opts.loopRequired,Z=e.opts.ownProperties;if(p)if(i+=" var missing"+o+"; ",X){x||(i+=" var "+y+" = validate.schema"+l+"; ");var W="i"+o,D="schema"+o+"["+W+"]",H="' + "+D+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(k,D,e.opts.jsonPointers)),i+=" var "+v+" = true; ",x&&(i+=" if (schema"+o+" === undefined) "+v+" = true; else if (!Array.isArray(schema"+o+")) "+v+" = false; else {"),i+=" for (var "+W+" = 0; "+W+" < "+y+".length; "+W+"++) { "+v+" = "+m+"["+y+"["+W+"]] !== undefined ",Z&&(i+=" && Object.prototype.hasOwnProperty.call("+m+", "+y+"["+W+"]) "),i+="; if (!"+v+") break; } ",x&&(i+=" } "),i+=" if (!"+v+") { ";var N=N||[];N.push(i),i="",e.createErrors!==!1?(i+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { missingProperty: '"+H+"' } ",e.opts.messages!==!1&&(i+=" , message: '",e.opts._errorDataPathProperty?i+="is a required property":i+="should have required property \\'"+H+"\\'",i+="' "),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+m+" "),i+=" } "):i+=" {} ";var j=i;i=N.pop(),!e.compositeRule&&p?e.async?i+=" throw new ValidationError(["+j+"]); ":i+=" validate.errors = ["+j+"]; return false; ":i+=" var err = "+j+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } else { "}else{i+=" if ( ";var $=_;if($)for(var z,W=-1,O=$.length-1;W<O;){z=$[W+=1],W&&(i+=" || ");var F=e.util.getProperty(z),G=m+F;i+=" ( ( "+G+" === undefined ",Z&&(i+=" || ! Object.prototype.hasOwnProperty.call("+m+", '"+e.util.escapeQuotes(z)+"') "),i+=") && (missing"+o+" = "+e.util.toQuotedString(e.opts.jsonPointers?z:F)+") ) "}i+=") { ";var D="missing"+o,H="' + "+D+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(k,D,!0):k+" + "+D);var N=N||[];N.push(i),i="",e.createErrors!==!1?(i+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { missingProperty: '"+H+"' } ",e.opts.messages!==!1&&(i+=" , message: '",e.opts._errorDataPathProperty?i+="is a required property":i+="should have required property \\'"+H+"\\'",i+="' "),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+m+" "),i+=" } "):i+=" {} ";var j=i;i=N.pop(),!e.compositeRule&&p?e.async?i+=" throw new ValidationError(["+j+"]); ":i+=" validate.errors = ["+j+"]; return false; ":i+=" var err = "+j+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } else { "}else if(X){x||(i+=" var "+y+" = validate.schema"+l+"; ");var W="i"+o,D="schema"+o+"["+W+"]",H="' + "+D+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(k,D,e.opts.jsonPointers)),x&&(i+=" if ("+y+" && !Array.isArray("+y+")) { var err = ",e.createErrors!==!1?(i+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { missingProperty: '"+H+"' } ",e.opts.messages!==!1&&(i+=" , message: '",e.opts._errorDataPathProperty?i+="is a required property":i+="should have required property \\'"+H+"\\'",i+="' "),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+m+" "),i+=" } "):i+=" {} ",i+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if ("+y+" !== undefined) { "),i+=" for (var "+W+" = 0; "+W+" < "+y+".length; "+W+"++) { if ("+m+"["+y+"["+W+"]] === undefined ",Z&&(i+=" || ! Object.prototype.hasOwnProperty.call("+m+", "+y+"["+W+"]) "),i+=") { var err = ",e.createErrors!==!1?(i+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { missingProperty: '"+H+"' } ",e.opts.messages!==!1&&(i+=" , message: '",e.opts._errorDataPathProperty?i+="is a required property":i+="should have required property \\'"+H+"\\'",i+="' "),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+m+" "),i+=" } "):i+=" {} ",i+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } ",x&&(i+=" } ")}else{var q=_;if(q)for(var z,ee=-1,re=q.length-1;ee<re;){z=q[ee+=1];var F=e.util.getProperty(z),H=e.util.escapeQuotes(z),G=m+F;e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(k,z,e.opts.jsonPointers)),i+=" if ( "+G+" === undefined ",Z&&(i+=" || ! Object.prototype.hasOwnProperty.call("+m+", '"+e.util.escapeQuotes(z)+"') "),i+=") { var err = ",e.createErrors!==!1?(i+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { missingProperty: '"+H+"' } ",e.opts.messages!==!1&&(i+=" , message: '",e.opts._errorDataPathProperty?i+="is a required property":i+="should have required property \\'"+H+"\\'",i+="' "),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+m+" "),i+=" } "):i+=" {} ",i+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}e.errorPath=k}else p&&(i+=" if (true) {");return i},$ut=function(e,r,n){var i=" ",o=e.level,a=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,p=!e.opts.allErrors,m="data"+(a||""),v="valid"+o,x=e.opts.$data&&s&&s.$data,y;if(x?(i+=" var schema"+o+" = "+e.util.getData(s.$data,a,e.dataPathArr)+"; ",y="schema"+o):y=s,(s||x)&&e.opts.uniqueItems!==!1){x&&(i+=" var "+v+"; if ("+y+" === false || "+y+" === undefined) "+v+" = true; else if (typeof "+y+" != 'boolean') "+v+" = false; else { "),i+=" var i = "+m+".length , "+v+" = true , j; if (i > 1) { ";var _=e.schema.items&&e.schema.items.type,w=Array.isArray(_);if(!_||_=="object"||_=="array"||w&&(_.indexOf("object")>=0||_.indexOf("array")>=0))i+=" outer: for (;i--;) { for (j = i; j--;) { if (equal("+m+"[i], "+m+"[j])) { "+v+" = false; break outer; } } } ";else{i+=" var itemIndices = {}, item; for (;i--;) { var item = "+m+"[i]; ";var C="checkDataType"+(w?"s":"");i+=" if ("+e.util[C](_,"item",e.opts.strictNumbers,!0)+") continue; ",w&&(i+=` if (typeof item == 'string') item = '"' + item; `),i+=" if (typeof itemIndices[item] == 'number') { "+v+" = false; j = itemIndices[item]; break; } itemIndices[item] = i; } "}i+=" } ",x&&(i+=" } "),i+=" if (!"+v+") { ";var E=E||[];E.push(i),i="",e.createErrors!==!1?(i+=" { keyword: 'uniqueItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { i: i, j: j } ",e.opts.messages!==!1&&(i+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "),e.opts.verbose&&(i+=" , schema: ",x?i+="validate.schema"+l:i+=""+s,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+m+" "),i+=" } "):i+=" {} ";var T=i;i=E.pop(),!e.compositeRule&&p?e.async?i+=" throw new ValidationError(["+T+"]); ":i+=" validate.errors = ["+T+"]; return false; ":i+=" var err = "+T+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } ",p&&(i+=" else { ")}else p&&(i+=" if (true) { ");return i},Fut={$ref:xut,allOf:_ut,anyOf:but,$comment:wut,const:Cut,contains:Eut,dependencies:Sut,enum:Tut,format:Put,if:Iut,items:Mut,maximum:kce,minimum:kce,maxItems:Oce,minItems:Oce,maxLength:Lce,minLength:Lce,maxProperties:Dce,minProperties:Dce,multipleOf:Aut,not:Rut,oneOf:kut,pattern:Out,properties:Lut,propertyNames:Dut,required:Nut,uniqueItems:$ut,validate:vce},Nce=Fut,fV=iE.toHash,zut=function(){var e=[{type:"number",rules:[{maximum:["exclusiveMaximum"]},{minimum:["exclusiveMinimum"]},"multipleOf","format"]},{type:"string",rules:["maxLength","minLength","pattern","format"]},{type:"array",rules:["maxItems","minItems","items","contains","uniqueItems"]},{type:"object",rules:["maxProperties","minProperties","required","dependencies","propertyNames",{properties:["additionalProperties","patternProperties"]}]},{rules:["$ref","const","enum","not","anyOf","oneOf","allOf","if"]}],r=["type","$comment"],n=["$schema","$id","id","$data","$async","title","description","default","definitions","examples","readOnly","writeOnly","contentMediaType","contentEncoding","additionalItems","then","else"],i=["number","integer","string","array","object","boolean","null"];return e.all=fV(r),e.types=fV(i),e.forEach(function(o){o.rules=o.rules.map(function(a){var s;if(typeof a=="object"){var l=Object.keys(a)[0];s=a[l],a=l,s.forEach(function(p){r.push(p),e.all[p]=!0})}r.push(a);var u=e.all[a]={keyword:a,code:Nce[a],implements:s};return u}),e.all.$comment={keyword:"$comment",code:Nce.$comment},o.type&&(e.types[o.type]=o)}),e.keywords=fV(r.concat(n)),e.custom={},e},$ce=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","additionalItems","maxItems","minItems","uniqueItems","maxProperties","minProperties","required","additionalProperties","enum","format","const"],But=function(t,e){for(var r=0;r<e.length;r++){t=JSON.parse(JSON.stringify(t));var n=e[r].split("/"),i=t,o;for(o=1;o<n.length;o++)i=i[n[o]];for(o=0;o<$ce.length;o++){var a=$ce[o],s=i[a];s&&(i[a]={anyOf:[s,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]})}}return t},jut=lV.MissingRef,Uut=Fce;function Fce(t,e,r){var n=this;if(typeof this._opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");typeof e=="function"&&(r=e,e=void 0);var i=o(t).then(function(){var s=n._addSchema(t,void 0,e);return s.validate||a(s)});return r&&i.then(function(s){r(null,s)},r),i;function o(s){var l=s.$schema;return l&&!n.getSchema(l)?Fce.call(n,{$ref:l},!0):Promise.resolve()}function a(s){try{return n._compile(s)}catch(u){if(u instanceof jut)return l(u);throw u}function l(u){var p=u.missingSchema;if(x(p))throw new Error("Schema "+p+" is loaded but "+u.missingRef+" cannot be resolved");var m=n._loadingSchemas[p];return m||(m=n._loadingSchemas[p]=n._opts.loadSchema(p),m.then(v,v)),m.then(function(y){if(!x(p))return o(y).then(function(){x(p)||n.addSchema(y,p,void 0,e)})}).then(function(){return a(s)});function v(){delete n._loadingSchemas[p]}function x(y){return n._refs[y]||n._schemas[y]}}}}var Vut=function(e,r,n){var i=" ",o=e.level,a=e.dataLevel,s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),u=e.errSchemaPath+"/"+r,p=!e.opts.allErrors,m,v="data"+(a||""),x="valid"+o,y="errs__"+o,_=e.opts.$data&&s&&s.$data,w;_?(i+=" var schema"+o+" = "+e.util.getData(s.$data,a,e.dataPathArr)+"; ",w="schema"+o):w=s;var C=this,E="definition"+o,T=C.definition,A="",k,X,Z,W,D;if(_&&T.$data){D="keywordValidate"+o;var H=T.validateSchema;i+=" var "+E+" = RULES.custom['"+r+"'].definition; var "+D+" = "+E+".validate;"}else{if(W=e.useCustomRule(C,s,e.schema,e),!W)return;w="validate.schema"+l,D=W.code,k=T.compile,X=T.inline,Z=T.macro}var N=D+".errors",j="i"+o,$="ruleErr"+o,z=T.async;if(z&&!e.async)throw new Error("async keyword in sync schema");if(X||Z||(i+=""+N+" = null;"),i+="var "+y+" = errors;var "+x+";",_&&T.$data&&(A+="}",i+=" if ("+w+" === undefined) { "+x+" = true; } else { ",H&&(A+="}",i+=" "+x+" = "+E+".validateSchema("+w+"); if ("+x+") { ")),X)T.statements?i+=" "+W.validate+" ":i+=" "+x+" = "+W.validate+"; ";else if(Z){var O=e.util.copy(e),A="";O.level++;var F="valid"+O.level;O.schema=W.validate,O.schemaPath="";var G=e.compositeRule;e.compositeRule=O.compositeRule=!0;var q=e.validate(O).replace(/validate\.schema/g,D);e.compositeRule=O.compositeRule=G,i+=" "+q}else{var ee=ee||[];ee.push(i),i="",i+=" "+D+".call( ",e.opts.passContext?i+="this":i+="self",k||T.schema===!1?i+=" , "+v+" ":i+=" , "+w+" , "+v+" , validate.schema"+e.schemaPath+" ",i+=" , (dataPath || '')",e.errorPath!='""'&&(i+=" + "+e.errorPath);var re=a?"data"+(a-1||""):"parentData",ce=a?e.dataPathArr[a]:"parentDataProperty";i+=" , "+re+" , "+ce+" , rootData ) ";var fe=i;i=ee.pop(),T.errors===!1?(i+=" "+x+" = ",z&&(i+="await "),i+=""+fe+"; "):z?(N="customErrors"+o,i+=" var "+N+" = null; try { "+x+" = await "+fe+"; } catch (e) { "+x+" = false; if (e instanceof ValidationError) "+N+" = e.errors; else throw e; } "):i+=" "+N+" = null; "+x+" = "+fe+"; "}if(T.modifying&&(i+=" if ("+re+") "+v+" = "+re+"["+ce+"];"),i+=""+A,T.valid)p&&(i+=" if (true) { ");else{i+=" if ( ",T.valid===void 0?(i+=" !",Z?i+=""+F:i+=""+x):i+=" "+!T.valid+" ",i+=") { ",m=C.keyword;var ee=ee||[];ee.push(i),i="";var ee=ee||[];ee.push(i),i="",e.createErrors!==!1?(i+=" { keyword: '"+(m||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { keyword: '"+C.keyword+"' } ",e.opts.messages!==!1&&(i+=` , message: 'should pass "`+C.keyword+`" keyword validation' `),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+v+" "),i+=" } "):i+=" {} ";var J=i;i=ee.pop(),!e.compositeRule&&p?e.async?i+=" throw new ValidationError(["+J+"]); ":i+=" validate.errors = ["+J+"]; return false; ":i+=" var err = "+J+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";var oe=i;i=ee.pop(),X?T.errors?T.errors!="full"&&(i+=" for (var "+j+"="+y+"; "+j+"<errors; "+j+"++) { var "+$+" = vErrors["+j+"]; if ("+$+".dataPath === undefined) "+$+".dataPath = (dataPath || '') + "+e.errorPath+"; if ("+$+".schemaPath === undefined) { "+$+'.schemaPath = "'+u+'"; } ',e.opts.verbose&&(i+=" "+$+".schema = "+w+"; "+$+".data = "+v+"; "),i+=" } "):T.errors===!1?i+=" "+oe+" ":(i+=" if ("+y+" == errors) { "+oe+" } else { for (var "+j+"="+y+"; "+j+"<errors; "+j+"++) { var "+$+" = vErrors["+j+"]; if ("+$+".dataPath === undefined) "+$+".dataPath = (dataPath || '') + "+e.errorPath+"; if ("+$+".schemaPath === undefined) { "+$+'.schemaPath = "'+u+'"; } ',e.opts.verbose&&(i+=" "+$+".schema = "+w+"; "+$+".data = "+v+"; "),i+=" } } "):Z?(i+=" var err = ",e.createErrors!==!1?(i+=" { keyword: '"+(m||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { keyword: '"+C.keyword+"' } ",e.opts.messages!==!1&&(i+=` , message: 'should pass "`+C.keyword+`" keyword validation' `),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+v+" "),i+=" } "):i+=" {} ",i+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&p&&(e.async?i+=" throw new ValidationError(vErrors); ":i+=" validate.errors = vErrors; return false; ")):T.errors===!1?i+=" "+oe+" ":(i+=" if (Array.isArray("+N+")) { if (vErrors === null) vErrors = "+N+"; else vErrors = vErrors.concat("+N+"); errors = vErrors.length; for (var "+j+"="+y+"; "+j+"<errors; "+j+"++) { var "+$+" = vErrors["+j+"]; if ("+$+".dataPath === undefined) "+$+".dataPath = (dataPath || '') + "+e.errorPath+"; "+$+'.schemaPath = "'+u+'"; ',e.opts.verbose&&(i+=" "+$+".schema = "+w+"; "+$+".data = "+v+"; "),i+=" } } else { "+oe+" } "),i+=" } ",p&&(i+=" else { ")}return i};const Hut="http://json-schema.org/draft-07/schema#",Wut="http://json-schema.org/draft-07/schema#",Gut="Core schema meta-schema",qut={schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},Xut=["object","boolean"],Yut={$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}};var zce={$schema:Hut,$id:Wut,title:Gut,definitions:qut,type:Xut,properties:Yut,default:!0},Bce=zce,Kut={$id:"https://github.com/ajv-validator/ajv/blob/master/lib/definition_schema.js",definitions:{simpleTypes:Bce.definitions.simpleTypes},type:"object",dependencies:{schema:["validate"],$data:["validate"],statements:["inline"],valid:{not:{required:["macro"]}}},properties:{type:Bce.properties.type,schema:{type:"boolean"},statements:{type:"boolean"},dependencies:{type:"array",items:{type:"string"}},metaSchema:{type:"object"},modifying:{type:"boolean"},valid:{type:"boolean"},$data:{type:"boolean"},async:{type:"boolean"},errors:{anyOf:[{type:"boolean"},{const:"full"}]}}},Zut=/^[a-z_$][a-z0-9_$-]*$/i,Qut=Vut,Jut=Kut,eft={add:tft,get:rft,remove:nft,validate:dV};function tft(t,e){var r=this.RULES;if(r.keywords[t])throw new Error("Keyword "+t+" is already defined");if(!Zut.test(t))throw new Error("Keyword "+t+" is not a valid identifier");if(e){this.validateKeyword(e,!0);var n=e.type;if(Array.isArray(n))for(var i=0;i<n.length;i++)a(t,n[i],e);else a(t,n,e);var o=e.metaSchema;o&&(e.$data&&this._opts.$data&&(o={anyOf:[o,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]}),e.validateSchema=this.compile(o,!0))}r.keywords[t]=r.all[t]=!0;function a(s,l,u){for(var p,m=0;m<r.length;m++){var v=r[m];if(v.type==l){p=v;break}}p||(p={type:l,rules:[]},r.push(p));var x={keyword:s,definition:u,custom:!0,code:Qut,implements:u.implements};p.rules.push(x),r.custom[s]=x}return this}function rft(t){var e=this.RULES.custom[t];return e?e.definition:this.RULES.keywords[t]||!1}function nft(t){var e=this.RULES;delete e.keywords[t],delete e.all[t],delete e.custom[t];for(var r=0;r<e.length;r++)for(var n=e[r].rules,i=0;i<n.length;i++)if(n[i].keyword==t){n.splice(i,1);break}return this}function dV(t,e){dV.errors=null;var r=this._validateKeyword=this._validateKeyword||this.compile(Jut,!0);if(r(t))return!0;if(dV.errors=r.errors,e)throw new Error("custom keyword definition is invalid: "+this.errorsText(r.errors));return!1}const ift="http://json-schema.org/draft-07/schema#",oft="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",sft="Meta-schema for $data reference (JSON Schema extension proposal)",aft="object",lft=["$data"],cft={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},uft=!1;var fft={$schema:ift,$id:oft,description:sft,type:aft,required:lft,properties:cft,additionalProperties:uft},jce=Jct,_b=nV,dft=bce.exports,Uce=uce,hft=gce,pft=dut,mft=zut,Vce=But,Hce=iE,Nkt=ml;ml.prototype.validate=vft;ml.prototype.compile=yft;ml.prototype.addSchema=xft;ml.prototype.addMetaSchema=_ft;ml.prototype.validateSchema=bft;ml.prototype.getSchema=Cft;ml.prototype.removeSchema=Sft;ml.prototype.addFormat=Oft;ml.prototype.errorsText=kft;ml.prototype._addSchema=Tft;ml.prototype._compile=Pft;ml.prototype.compileAsync=Uut;var UN=eft;ml.prototype.addKeyword=UN.add;ml.prototype.getKeyword=UN.get;ml.prototype.removeKeyword=UN.remove;ml.prototype.validateKeyword=UN.validate;var Wce=lV;ml.ValidationError=Wce.Validation;ml.MissingRefError=Wce.MissingRef;ml.$dataMetaSchema=Vce;var VN="http://json-schema.org/draft-07/schema",Gce=["removeAdditional","useDefaults","coerceTypes","strictDefaults"],gft=["/properties"];function ml(t){if(!(this instanceof ml))return new ml(t);t=this._opts=Hce.copy(t)||{},zft(this),this._schemas={},this._refs={},this._fragments={},this._formats=pft(t.format),this._cache=t.cache||new dft,this._loadingSchemas={},this._compilations=[],this.RULES=mft(),this._getId=Ift(t),t.loopRequired=t.loopRequired||1/0,t.errorDataPath=="property"&&(t._errorDataPathProperty=!0),t.serialize===void 0&&(t.serialize=hft),this._metaOpts=Fft(this),t.formats&&Nft(this),t.keywords&&$ft(this),Lft(this),typeof t.meta=="object"&&this.addMetaSchema(t.meta),t.nullable&&this.addKeyword("nullable",{metaSchema:{type:"boolean"}}),Dft(this)}function vft(t,e){var r;if(typeof t=="string"){if(r=this.getSchema(t),!r)throw new Error('no schema with key or ref "'+t+'"')}else{var n=this._addSchema(t);r=n.validate||this._compile(n)}var i=r(e);return r.$async!==!0&&(this.errors=r.errors),i}function yft(t,e){var r=this._addSchema(t,void 0,e);return r.validate||this._compile(r)}function xft(t,e,r,n){if(Array.isArray(t)){for(var i=0;i<t.length;i++)this.addSchema(t[i],void 0,r,n);return this}var o=this._getId(t);if(o!==void 0&&typeof o!="string")throw new Error("schema id must be string");return e=_b.normalizeId(e||o),Xce(this,e),this._schemas[e]=this._addSchema(t,r,n,!0),this}function _ft(t,e,r){return this.addSchema(t,e,r,!0),this}function bft(t,e){var r=t.$schema;if(r!==void 0&&typeof r!="string")throw new Error("$schema must be a string");if(r=r||this._opts.defaultMeta||wft(this),!r)return this.logger.warn("meta-schema not available"),this.errors=null,!0;var n=this.validate(r,t);if(!n&&e){var i="schema is invalid: "+this.errorsText();if(this._opts.validateSchema=="log")this.logger.error(i);else throw new Error(i)}return n}function wft(t){var e=t._opts.meta;return t._opts.defaultMeta=typeof e=="object"?t._getId(e)||e:t.getSchema(VN)?VN:void 0,t._opts.defaultMeta}function Cft(t){var e=qce(this,t);switch(typeof e){case"object":return e.validate||this._compile(e);case"string":return this.getSchema(e);case"undefined":return Eft(this,t)}}function Eft(t,e){var r=_b.schema.call(t,{schema:{}},e);if(r){var n=r.schema,i=r.root,o=r.baseId,a=jce.call(t,n,i,void 0,o);return t._fragments[e]=new Uce({ref:e,fragment:!0,schema:n,root:i,baseId:o,validate:a}),a}}function qce(t,e){return e=_b.normalizeId(e),t._schemas[e]||t._refs[e]||t._fragments[e]}function Sft(t){if(t instanceof RegExp)return HN(this,this._schemas,t),HN(this,this._refs,t),this;switch(typeof t){case"undefined":return HN(this,this._schemas),HN(this,this._refs),this._cache.clear(),this;case"string":var e=qce(this,t);return e&&this._cache.del(e.cacheKey),delete this._schemas[t],delete this._refs[t],this;case"object":var r=this._opts.serialize,n=r?r(t):t;this._cache.del(n);var i=this._getId(t);i&&(i=_b.normalizeId(i),delete this._schemas[i],delete this._refs[i])}return this}function HN(t,e,r){for(var n in e){var i=e[n];!i.meta&&(!r||r.test(n))&&(t._cache.del(i.cacheKey),delete e[n])}}function Tft(t,e,r,n){if(typeof t!="object"&&typeof t!="boolean")throw new Error("schema should be object or boolean");var i=this._opts.serialize,o=i?i(t):t,a=this._cache.get(o);if(a)return a;n=n||this._opts.addUsedSchema!==!1;var s=_b.normalizeId(this._getId(t));s&&n&&Xce(this,s);var l=this._opts.validateSchema!==!1&&!e,u;l&&!(u=s&&s==_b.normalizeId(t.$schema))&&this.validateSchema(t,!0);var p=_b.ids.call(this,t),m=new Uce({id:s,schema:t,localRefs:p,cacheKey:o,meta:r});return s[0]!="#"&&n&&(this._refs[s]=m),this._cache.put(o,m),l&&u&&this.validateSchema(t,!0),m}function Pft(t,e){if(t.compiling)return t.validate=i,i.schema=t.schema,i.errors=null,i.root=e||i,t.schema.$async===!0&&(i.$async=!0),i;t.compiling=!0;var r;t.meta&&(r=this._opts,this._opts=this._metaOpts);var n;try{n=jce.call(this,t.schema,e,t.localRefs)}catch(o){throw delete t.validate,o}finally{t.compiling=!1,t.meta&&(this._opts=r)}return t.validate=n,t.refs=n.refs,t.refVal=n.refVal,t.root=n.root,n;function i(){var o=t.validate,a=o.apply(this,arguments);return i.errors=o.errors,a}}function Ift(t){switch(t.schemaId){case"auto":return Rft;case"id":return Mft;default:return Aft}}function Mft(t){return t.$id&&this.logger.warn("schema $id ignored",t.$id),t.id}function Aft(t){return t.id&&this.logger.warn("schema id ignored",t.id),t.$id}function Rft(t){if(t.$id&&t.id&&t.$id!=t.id)throw new Error("schema $id is different from id");return t.$id||t.id}function kft(t,e){if(t=t||this.errors,!t)return"No errors";e=e||{};for(var r=e.separator===void 0?", ":e.separator,n=e.dataVar===void 0?"data":e.dataVar,i="",o=0;o<t.length;o++){var a=t[o];a&&(i+=n+a.dataPath+" "+a.message+r)}return i.slice(0,-r.length)}function Oft(t,e){return typeof e=="string"&&(e=new RegExp(e)),this._formats[t]=e,this}function Lft(t){var e;if(t._opts.$data&&(e=fft,t.addMetaSchema(e,e.$id,!0)),t._opts.meta!==!1){var r=zce;t._opts.$data&&(r=Vce(r,gft)),t.addMetaSchema(r,VN,!0),t._refs["http://json-schema.org/schema"]=VN}}function Dft(t){var e=t._opts.schemas;if(!!e)if(Array.isArray(e))t.addSchema(e);else for(var r in e)t.addSchema(e[r],r)}function Nft(t){for(var e in t._opts.formats){var r=t._opts.formats[e];t.addFormat(e,r)}}function $ft(t){for(var e in t._opts.keywords){var r=t._opts.keywords[e];t.addKeyword(e,r)}}function Xce(t,e){if(t._schemas[e]||t._refs[e])throw new Error('schema with key or id "'+e+'" already exists')}function Fft(t){for(var e=Hce.copy(t._opts),r=0;r<Gce.length;r++)delete e[Gce[r]];return e}function zft(t){var e=t._opts.logger;if(e===!1)t.logger={log:hV,warn:hV,error:hV};else{if(e===void 0&&(e=console),!(typeof e=="object"&&e.log&&e.warn&&e.error))throw new Error("logger must implement log, warn and error methods");t.logger=e}}function hV(){}function eo(t){for(var e=t.length/6|0,r=new Array(e),n=0;n<e;)r[n]="#"+t.slice(n*6,++n*6);return r}var Bft=eo("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),jft=eo("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),Uft=eo("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),Vft=eo("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),Hft=eo("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),Wft=eo("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),Gft=eo("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),qft=eo("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),Xft=eo("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),Yft=eo("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function WN(t,e,r){t.prototype=e.prototype=r,r.constructor=t}function pV(t,e){var r=Object.create(t.prototype);for(var n in e)r[n]=e[n];return r}function oE(){}var bb=.7,sE=1/bb,aE="\\s*([+-]?\\d+)\\s*",bM="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",nv="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Kft=/^#([0-9a-f]{3,8})$/,Zft=new RegExp("^rgb\\("+[aE,aE,aE]+"\\)$"),Qft=new RegExp("^rgb\\("+[nv,nv,nv]+"\\)$"),Jft=new RegExp("^rgba\\("+[aE,aE,aE,bM]+"\\)$"),edt=new RegExp("^rgba\\("+[nv,nv,nv,bM]+"\\)$"),tdt=new RegExp("^hsl\\("+[bM,nv,nv]+"\\)$"),rdt=new RegExp("^hsla\\("+[bM,nv,nv,bM]+"\\)$"),Yce={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};WN(oE,wM,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:Kce,formatHex:Kce,formatHsl:ndt,formatRgb:Zce,toString:Zce});function Kce(){return this.rgb().formatHex()}function ndt(){return nue(this).formatHsl()}function Zce(){return this.rgb().formatRgb()}function wM(t){var e,r;return t=(t+"").trim().toLowerCase(),(e=Kft.exec(t))?(r=e[1].length,e=parseInt(e[1],16),r===6?Qce(e):r===3?new lf(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):r===8?GN(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):r===4?GN(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=Zft.exec(t))?new lf(e[1],e[2],e[3],1):(e=Qft.exec(t))?new lf(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=Jft.exec(t))?GN(e[1],e[2],e[3],e[4]):(e=edt.exec(t))?GN(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=tdt.exec(t))?rue(e[1],e[2]/100,e[3]/100,1):(e=rdt.exec(t))?rue(e[1],e[2]/100,e[3]/100,e[4]):Yce.hasOwnProperty(t)?Qce(Yce[t]):t==="transparent"?new lf(NaN,NaN,NaN,0):null}function Qce(t){return new lf(t>>16&255,t>>8&255,t&255,1)}function GN(t,e,r,n){return n<=0&&(t=e=r=NaN),new lf(t,e,r,n)}function Jce(t){return t instanceof oE||(t=wM(t)),t?(t=t.rgb(),new lf(t.r,t.g,t.b,t.opacity)):new lf}function CM(t,e,r,n){return arguments.length===1?Jce(t):new lf(t,e,r,n==null?1:n)}function lf(t,e,r,n){this.r=+t,this.g=+e,this.b=+r,this.opacity=+n}WN(lf,CM,pV(oE,{brighter:function(t){return t=t==null?sE:Math.pow(sE,t),new lf(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=t==null?bb:Math.pow(bb,t),new lf(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:eue,formatHex:eue,formatRgb:tue,toString:tue}));function eue(){return"#"+mV(this.r)+mV(this.g)+mV(this.b)}function tue(){var t=this.opacity;return t=isNaN(t)?1:Math.max(0,Math.min(1,t)),(t===1?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(t===1?")":", "+t+")")}function mV(t){return t=Math.max(0,Math.min(255,Math.round(t)||0)),(t<16?"0":"")+t.toString(16)}function rue(t,e,r,n){return n<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new iv(t,e,r,n)}function nue(t){if(t instanceof iv)return new iv(t.h,t.s,t.l,t.opacity);if(t instanceof oE||(t=wM(t)),!t)return new iv;if(t instanceof iv)return t;t=t.rgb();var e=t.r/255,r=t.g/255,n=t.b/255,i=Math.min(e,r,n),o=Math.max(e,r,n),a=NaN,s=o-i,l=(o+i)/2;return s?(e===o?a=(r-n)/s+(r<n)*6:r===o?a=(n-e)/s+2:a=(e-r)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new iv(a,s,l,t.opacity)}function idt(t,e,r,n){return arguments.length===1?nue(t):new iv(t,e,r,n==null?1:n)}function iv(t,e,r,n){this.h=+t,this.s=+e,this.l=+r,this.opacity=+n}WN(iv,idt,pV(oE,{brighter:function(t){return t=t==null?sE:Math.pow(sE,t),new iv(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=t==null?bb:Math.pow(bb,t),new iv(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*e,i=2*r-n;return new lf(gV(t>=240?t-240:t+120,i,n),gV(t,i,n),gV(t<120?t+240:t-120,i,n),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return t=isNaN(t)?1:Math.max(0,Math.min(1,t)),(t===1?"hsl(":"hsla(")+(this.h||0)+", "+(this.s||0)*100+"%, "+(this.l||0)*100+"%"+(t===1?")":", "+t+")")}}));function gV(t,e,r){return(t<60?e+(r-e)*t/60:t<180?r:t<240?e+(r-e)*(240-t)/60:e)*255}var odt=Math.PI/180,sdt=180/Math.PI,iue=-.14861,vV=1.78277,yV=-.29227,qN=-.90649,EM=1.97294,oue=EM*qN,sue=EM*vV,aue=vV*yV-qN*iue;function adt(t){if(t instanceof wb)return new wb(t.h,t.s,t.l,t.opacity);t instanceof lf||(t=Jce(t));var e=t.r/255,r=t.g/255,n=t.b/255,i=(aue*n+oue*e-sue*r)/(aue+oue-sue),o=n-i,a=(EM*(r-i)-yV*o)/qN,s=Math.sqrt(a*a+o*o)/(EM*i*(1-i)),l=s?Math.atan2(a,o)*sdt-120:NaN;return new wb(l<0?l+360:l,s,i,t.opacity)}function ov(t,e,r,n){return arguments.length===1?adt(t):new wb(t,e,r,n==null?1:n)}function wb(t,e,r,n){this.h=+t,this.s=+e,this.l=+r,this.opacity=+n}WN(wb,ov,pV(oE,{brighter:function(t){return t=t==null?sE:Math.pow(sE,t),new wb(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=t==null?bb:Math.pow(bb,t),new wb(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*odt,e=+this.l,r=isNaN(this.s)?0:this.s*e*(1-e),n=Math.cos(t),i=Math.sin(t);return new lf(255*(e+r*(iue*n+vV*i)),255*(e+r*(yV*n+qN*i)),255*(e+r*(EM*n)),this.opacity)}}));function ldt(t,e,r,n,i){var o=t*t,a=o*t;return((1-3*t+3*o-a)*e+(4-6*o+3*a)*r+(1+3*t+3*o-3*a)*n+a*i)/6}function cdt(t){var e=t.length-1;return function(r){var n=r<=0?r=0:r>=1?(r=1,e-1):Math.floor(r*e),i=t[n],o=t[n+1],a=n>0?t[n-1]:2*i-o,s=n<e-1?t[n+2]:2*o-i;return ldt((r-n/e)*e,a,i,o,s)}}function xV(t){return function(){return t}}function lue(t,e){return function(r){return t+r*e}}function udt(t,e,r){return t=Math.pow(t,r),e=Math.pow(e,r)-t,r=1/r,function(n){return Math.pow(t+n*e,r)}}function fdt(t,e){var r=e-t;return r?lue(t,r>180||r<-180?r-360*Math.round(r/360):r):xV(isNaN(t)?e:t)}function ddt(t){return(t=+t)==1?lE:function(e,r){return r-e?udt(e,r,t):xV(isNaN(e)?r:e)}}function lE(t,e){var r=e-t;return r?lue(t,r):xV(isNaN(t)?e:t)}var cue=function t(e){var r=ddt(e);function n(i,o){var a=r((i=CM(i)).r,(o=CM(o)).r),s=r(i.g,o.g),l=r(i.b,o.b),u=lE(i.opacity,o.opacity);return function(p){return i.r=a(p),i.g=s(p),i.b=l(p),i.opacity=u(p),i+""}}return n.gamma=t,n}(1);function hdt(t){return function(e){var r=e.length,n=new Array(r),i=new Array(r),o=new Array(r),a,s;for(a=0;a<r;++a)s=CM(e[a]),n[a]=s.r||0,i[a]=s.g||0,o[a]=s.b||0;return n=t(n),i=t(i),o=t(o),s.opacity=1,function(l){return s.r=n(l),s.g=i(l),s.b=o(l),s+""}}}var pdt=hdt(cdt);function e_(t,e){return t=+t,e=+e,function(r){return t*(1-r)+e*r}}var _V=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,bV=new RegExp(_V.source,"g");function mdt(t){return function(){return t}}function gdt(t){return function(e){return t(e)+""}}function vdt(t,e){var r=_V.lastIndex=bV.lastIndex=0,n,i,o,a=-1,s=[],l=[];for(t=t+"",e=e+"";(n=_V.exec(t))&&(i=bV.exec(e));)(o=i.index)>r&&(o=e.slice(r,o),s[a]?s[a]+=o:s[++a]=o),(n=n[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,l.push({i:a,x:e_(n,i)})),r=bV.lastIndex;return r<e.length&&(o=e.slice(r),s[a]?s[a]+=o:s[++a]=o),s.length<2?l[0]?gdt(l[0].x):mdt(e):(e=l.length,function(u){for(var p=0,m;p<e;++p)s[(m=l[p]).i]=m.x(u);return s.join("")})}var uue=180/Math.PI,wV={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function fue(t,e,r,n,i,o){var a,s,l;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(l=t*r+e*n)&&(r-=t*l,n-=e*l),(s=Math.sqrt(r*r+n*n))&&(r/=s,n/=s,l/=s),t*n<e*r&&(t=-t,e=-e,l=-l,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(e,t)*uue,skewX:Math.atan(l)*uue,scaleX:a,scaleY:s}}var SM,CV,due,XN;function ydt(t){return t==="none"?wV:(SM||(SM=document.createElement("DIV"),CV=document.documentElement,due=document.defaultView),SM.style.transform=t,t=due.getComputedStyle(CV.appendChild(SM),null).getPropertyValue("transform"),CV.removeChild(SM),t=t.slice(7,-1).split(","),fue(+t[0],+t[1],+t[2],+t[3],+t[4],+t[5]))}function xdt(t){return t==null||(XN||(XN=document.createElementNS("http://www.w3.org/2000/svg","g")),XN.setAttribute("transform",t),!(t=XN.transform.baseVal.consolidate()))?wV:(t=t.matrix,fue(t.a,t.b,t.c,t.d,t.e,t.f))}function hue(t,e,r,n){function i(u){return u.length?u.pop()+" ":""}function o(u,p,m,v,x,y){if(u!==m||p!==v){var _=x.push("translate(",null,e,null,r);y.push({i:_-4,x:e_(u,m)},{i:_-2,x:e_(p,v)})}else(m||v)&&x.push("translate("+m+e+v+r)}function a(u,p,m,v){u!==p?(u-p>180?p+=360:p-u>180&&(u+=360),v.push({i:m.push(i(m)+"rotate(",null,n)-2,x:e_(u,p)})):p&&m.push(i(m)+"rotate("+p+n)}function s(u,p,m,v){u!==p?v.push({i:m.push(i(m)+"skewX(",null,n)-2,x:e_(u,p)}):p&&m.push(i(m)+"skewX("+p+n)}function l(u,p,m,v,x,y){if(u!==m||p!==v){var _=x.push(i(x)+"scale(",null,",",null,")");y.push({i:_-4,x:e_(u,m)},{i:_-2,x:e_(p,v)})}else(m!==1||v!==1)&&x.push(i(x)+"scale("+m+","+v+")")}return function(u,p){var m=[],v=[];return u=t(u),p=t(p),o(u.translateX,u.translateY,p.translateX,p.translateY,m,v),a(u.rotate,p.rotate,m,v),s(u.skewX,p.skewX,m,v),l(u.scaleX,u.scaleY,p.scaleX,p.scaleY,m,v),u=p=null,function(x){for(var y=-1,_=v.length,w;++y<_;)m[(w=v[y]).i]=w.x(x);return m.join("")}}}var _dt=hue(ydt,"px, ","px)","deg)"),bdt=hue(xdt,", ",")",")");function pue(t){return function e(r){r=+r;function n(i,o){var a=t((i=ov(i)).h,(o=ov(o)).h),s=lE(i.s,o.s),l=lE(i.l,o.l),u=lE(i.opacity,o.opacity);return function(p){return i.h=a(p),i.s=s(p),i.l=l(Math.pow(p,r)),i.opacity=u(p),i+""}}return n.gamma=e,n}(1)}pue(fdt);var EV=pue(lE);function Hs(t){return pdt(t[t.length-1])}var mue=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(eo),wdt=Hs(mue),gue=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(eo),Cdt=Hs(gue),vue=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(eo),Edt=Hs(vue),yue=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(eo),Sdt=Hs(yue),xue=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(eo),Tdt=Hs(xue),_ue=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(eo),Pdt=Hs(_ue),bue=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(eo),Idt=Hs(bue),wue=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(eo),Mdt=Hs(wue),Cue=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(eo),Adt=Hs(Cue),Eue=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(eo),Rdt=Hs(Eue),Sue=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(eo),kdt=Hs(Sue),Tue=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(eo),Odt=Hs(Tue),Pue=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(eo),Ldt=Hs(Pue),Iue=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(eo),Ddt=Hs(Iue),Mue=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(eo),Ndt=Hs(Mue),Aue=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(eo),$dt=Hs(Aue),Rue=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(eo),Fdt=Hs(Rue),kue=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(eo),zdt=Hs(kue),Oue=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(eo),Bdt=Hs(Oue),Lue=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(eo),jdt=Hs(Lue),Due=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(eo),Udt=Hs(Due),Nue=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(eo),Vdt=Hs(Nue),$ue=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(eo),Hdt=Hs($ue),Fue=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(eo),Wdt=Hs(Fue),zue=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(eo),Gdt=Hs(zue),Bue=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(eo),qdt=Hs(Bue),jue=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(eo),Xdt=Hs(jue);function Ydt(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-t*(35.34-t*(2381.73-t*(6402.7-t*(7024.72-t*2710.57)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+t*(170.73+t*(52.82-t*(131.46-t*(176.58-t*67.37)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+t*(442.36-t*(2482.43-t*(6167.24-t*(6614.94-t*2475.67)))))))+")"}var Kdt=EV(ov(300,.5,0),ov(-240,.5,1)),Zdt=EV(ov(-100,.75,.35),ov(80,1.5,.8)),Qdt=EV(ov(260,.75,.35),ov(80,1.5,.8)),YN=ov();function Jdt(t){(t<0||t>1)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return YN.h=360*t-100,YN.s=1.5-1.5*e,YN.l=.8-.9*e,YN+""}var KN=CM(),eht=Math.PI/3,tht=Math.PI*2/3;function rht(t){var e;return t=(.5-t)*Math.PI,KN.r=255*(e=Math.sin(t))*e,KN.g=255*(e=Math.sin(t+eht))*e,KN.b=255*(e=Math.sin(t+tht))*e,KN+""}function nht(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+t*(1172.33-t*(10793.56-t*(33300.12-t*(38394.49-t*14825.05)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+t*(557.33+t*(1225.33-t*(3574.96-t*(1073.77+t*707.56)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+t*(3211.1-t*(15327.97-t*(27814-t*(22569.18-t*6838.66)))))))+")"}function ZN(t){var e=t.length;return function(r){return t[Math.max(0,Math.min(e-1,Math.floor(r*e)))]}}var iht=ZN(eo("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),oht=ZN(eo("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),sht=ZN(eo("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),aht=ZN(eo("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921")),$kt=Object.freeze(Object.defineProperty({__proto__:null,schemeCategory10:Bft,schemeAccent:jft,schemeDark2:Uft,schemePaired:Vft,schemePastel1:Hft,schemePastel2:Wft,schemeSet1:Gft,schemeSet2:qft,schemeSet3:Xft,schemeTableau10:Yft,interpolateBrBG:wdt,schemeBrBG:mue,interpolatePRGn:Cdt,schemePRGn:gue,interpolatePiYG:Edt,schemePiYG:vue,interpolatePuOr:Sdt,schemePuOr:yue,interpolateRdBu:Tdt,schemeRdBu:xue,interpolateRdGy:Pdt,schemeRdGy:_ue,interpolateRdYlBu:Idt,schemeRdYlBu:bue,interpolateRdYlGn:Mdt,schemeRdYlGn:wue,interpolateSpectral:Adt,schemeSpectral:Cue,interpolateBuGn:Rdt,schemeBuGn:Eue,interpolateBuPu:kdt,schemeBuPu:Sue,interpolateGnBu:Odt,schemeGnBu:Tue,interpolateOrRd:Ldt,schemeOrRd:Pue,interpolatePuBuGn:Ddt,schemePuBuGn:Iue,interpolatePuBu:Ndt,schemePuBu:Mue,interpolatePuRd:$dt,schemePuRd:Aue,interpolateRdPu:Fdt,schemeRdPu:Rue,interpolateYlGnBu:zdt,schemeYlGnBu:kue,interpolateYlGn:Bdt,schemeYlGn:Oue,interpolateYlOrBr:jdt,schemeYlOrBr:Lue,interpolateYlOrRd:Udt,schemeYlOrRd:Due,interpolateBlues:Vdt,schemeBlues:Nue,interpolateGreens:Hdt,schemeGreens:$ue,interpolateGreys:Wdt,schemeGreys:Fue,interpolatePurples:Gdt,schemePurples:zue,interpolateReds:qdt,schemeReds:Bue,interpolateOranges:Xdt,schemeOranges:jue,interpolateCividis:Ydt,interpolateCubehelixDefault:Kdt,interpolateRainbow:Jdt,interpolateWarm:Zdt,interpolateCool:Qdt,interpolateSinebow:rht,interpolateTurbo:nht,interpolateViridis:iht,interpolateMagma:oht,interpolateInferno:sht,interpolatePlasma:aht},Symbol.toStringTag,{value:"Module"}));function Uue(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function lht(t){return t.length===1&&(t=cht(t)),{left:function(e,r,n,i){for(n==null&&(n=0),i==null&&(i=e.length);n<i;){var o=n+i>>>1;t(e[o],r)<0?n=o+1:i=o}return n},right:function(e,r,n,i){for(n==null&&(n=0),i==null&&(i=e.length);n<i;){var o=n+i>>>1;t(e[o],r)>0?i=o:n=o+1}return n}}}function cht(t){return function(e,r){return Uue(t(e),r)}}var uht=lht(Uue),fht=uht.right;function dht(t,e){return[t,e]}function Fkt(t,e,r){var n=t.length,i=e.length,o=new Array(n*i),a,s,l,u;for(r==null&&(r=dht),a=l=0;a<n;++a)for(u=t[a],s=0;s<i;++s,++l)o[l]=r(u,e[s]);return o}function zkt(t,e,r){t=+t,e=+e,r=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+r;for(var n=-1,i=Math.max(0,Math.ceil((e-t)/r))|0,o=new Array(i);++n<i;)o[n]=t+n*r;return o}var hht={value:function(){}};function Vue(){for(var t=0,e=arguments.length,r={},n;t<e;++t){if(!(n=arguments[t]+"")||n in r||/[\s.]/.test(n))throw new Error("illegal type: "+n);r[n]=[]}return new QN(r)}function QN(t){this._=t}function pht(t,e){return t.trim().split(/^|\s+/).map(function(r){var n="",i=r.indexOf(".");if(i>=0&&(n=r.slice(i+1),r=r.slice(0,i)),r&&!e.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:n}})}QN.prototype=Vue.prototype={constructor:QN,on:function(t,e){var r=this._,n=pht(t+"",r),i,o=-1,a=n.length;if(arguments.length<2){for(;++o<a;)if((i=(t=n[o]).type)&&(i=mht(r[i],t.name)))return i;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++o<a;)if(i=(t=n[o]).type)r[i]=Hue(r[i],t.name,e);else if(e==null)for(i in r)r[i]=Hue(r[i],t.name,null);return this},copy:function(){var t={},e=this._;for(var r in e)t[r]=e[r].slice();return new QN(t)},call:function(t,e){if((i=arguments.length-2)>0)for(var r=new Array(i),n=0,i,o;n<i;++n)r[n]=arguments[n+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=this._[t],n=0,i=o.length;n<i;++n)o[n].value.apply(e,r)},apply:function(t,e,r){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var n=this._[t],i=0,o=n.length;i<o;++i)n[i].value.apply(e,r)}};function mht(t,e){for(var r=0,n=t.length,i;r<n;++r)if((i=t[r]).name===e)return i.value}function Hue(t,e,r){for(var n=0,i=t.length;n<i;++n)if(t[n].name===e){t[n]=hht,t=t.slice(0,n).concat(t.slice(n+1));break}return r!=null&&t.push({name:e,value:r}),t}var SV="http://www.w3.org/1999/xhtml",Wue={svg:"http://www.w3.org/2000/svg",xhtml:SV,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function JN(t){var e=t+="",r=e.indexOf(":");return r>=0&&(e=t.slice(0,r))!=="xmlns"&&(t=t.slice(r+1)),Wue.hasOwnProperty(e)?{space:Wue[e],local:t}:t}function ght(t){return function(){var e=this.ownerDocument,r=this.namespaceURI;return r===SV&&e.documentElement.namespaceURI===SV?e.createElement(t):e.createElementNS(r,t)}}function vht(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Gue(t){var e=JN(t);return(e.local?vht:ght)(e)}function yht(){}function TV(t){return t==null?yht:function(){return this.querySelector(t)}}function xht(t){typeof t!="function"&&(t=TV(t));for(var e=this._groups,r=e.length,n=new Array(r),i=0;i<r;++i)for(var o=e[i],a=o.length,s=n[i]=new Array(a),l,u,p=0;p<a;++p)(l=o[p])&&(u=t.call(l,l.__data__,p,o))&&("__data__"in l&&(u.__data__=l.__data__),s[p]=u);return new Nm(n,this._parents)}function _ht(){return[]}function que(t){return t==null?_ht:function(){return this.querySelectorAll(t)}}function bht(t){typeof t!="function"&&(t=que(t));for(var e=this._groups,r=e.length,n=[],i=[],o=0;o<r;++o)for(var a=e[o],s=a.length,l,u=0;u<s;++u)(l=a[u])&&(n.push(t.call(l,l.__data__,u,a)),i.push(l));return new Nm(n,i)}function Xue(t){return function(){return this.matches(t)}}function wht(t){typeof t!="function"&&(t=Xue(t));for(var e=this._groups,r=e.length,n=new Array(r),i=0;i<r;++i)for(var o=e[i],a=o.length,s=n[i]=[],l,u=0;u<a;++u)(l=o[u])&&t.call(l,l.__data__,u,o)&&s.push(l);return new Nm(n,this._parents)}function Yue(t){return new Array(t.length)}function Cht(){return new Nm(this._enter||this._groups.map(Yue),this._parents)}function e5(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}e5.prototype={constructor:e5,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function Eht(t){return function(){return t}}var Kue="$";function Sht(t,e,r,n,i,o){for(var a=0,s,l=e.length,u=o.length;a<u;++a)(s=e[a])?(s.__data__=o[a],n[a]=s):r[a]=new e5(t,o[a]);for(;a<l;++a)(s=e[a])&&(i[a]=s)}function Tht(t,e,r,n,i,o,a){var s,l,u={},p=e.length,m=o.length,v=new Array(p),x;for(s=0;s<p;++s)(l=e[s])&&(v[s]=x=Kue+a.call(l,l.__data__,s,e),x in u?i[s]=l:u[x]=l);for(s=0;s<m;++s)x=Kue+a.call(t,o[s],s,o),(l=u[x])?(n[s]=l,l.__data__=o[s],u[x]=null):r[s]=new e5(t,o[s]);for(s=0;s<p;++s)(l=e[s])&&u[v[s]]===l&&(i[s]=l)}function Pht(t,e){if(!t)return x=new Array(this.size()),u=-1,this.each(function(X){x[++u]=X}),x;var r=e?Tht:Sht,n=this._parents,i=this._groups;typeof t!="function"&&(t=Eht(t));for(var o=i.length,a=new Array(o),s=new Array(o),l=new Array(o),u=0;u<o;++u){var p=n[u],m=i[u],v=m.length,x=t.call(p,p&&p.__data__,u,n),y=x.length,_=s[u]=new Array(y),w=a[u]=new Array(y),C=l[u]=new Array(v);r(p,m,_,w,C,x,e);for(var E=0,T=0,A,k;E<y;++E)if(A=_[E]){for(E>=T&&(T=E+1);!(k=w[T])&&++T<y;);A._next=k||null}}return a=new Nm(a,n),a._enter=s,a._exit=l,a}function Iht(){return new Nm(this._exit||this._groups.map(Yue),this._parents)}function Mht(t,e,r){var n=this.enter(),i=this,o=this.exit();return n=typeof t=="function"?t(n):n.append(t+""),e!=null&&(i=e(i)),r==null?o.remove():r(o),n&&i?n.merge(i).order():i}function Aht(t){for(var e=this._groups,r=t._groups,n=e.length,i=r.length,o=Math.min(n,i),a=new Array(n),s=0;s<o;++s)for(var l=e[s],u=r[s],p=l.length,m=a[s]=new Array(p),v,x=0;x<p;++x)(v=l[x]||u[x])&&(m[x]=v);for(;s<n;++s)a[s]=e[s];return new Nm(a,this._parents)}function Rht(){for(var t=this._groups,e=-1,r=t.length;++e<r;)for(var n=t[e],i=n.length-1,o=n[i],a;--i>=0;)(a=n[i])&&(o&&a.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(a,o),o=a);return this}function kht(t){t||(t=Oht);function e(m,v){return m&&v?t(m.__data__,v.__data__):!m-!v}for(var r=this._groups,n=r.length,i=new Array(n),o=0;o<n;++o){for(var a=r[o],s=a.length,l=i[o]=new Array(s),u,p=0;p<s;++p)(u=a[p])&&(l[p]=u);l.sort(e)}return new Nm(i,this._parents).order()}function Oht(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function Lht(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function Dht(){var t=new Array(this.size()),e=-1;return this.each(function(){t[++e]=this}),t}function Nht(){for(var t=this._groups,e=0,r=t.length;e<r;++e)for(var n=t[e],i=0,o=n.length;i<o;++i){var a=n[i];if(a)return a}return null}function $ht(){var t=0;return this.each(function(){++t}),t}function Fht(){return!this.node()}function zht(t){for(var e=this._groups,r=0,n=e.length;r<n;++r)for(var i=e[r],o=0,a=i.length,s;o<a;++o)(s=i[o])&&t.call(s,s.__data__,o,i);return this}function Bht(t){return function(){this.removeAttribute(t)}}function jht(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Uht(t,e){return function(){this.setAttribute(t,e)}}function Vht(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Hht(t,e){return function(){var r=e.apply(this,arguments);r==null?this.removeAttribute(t):this.setAttribute(t,r)}}function Wht(t,e){return function(){var r=e.apply(this,arguments);r==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,r)}}function Ght(t,e){var r=JN(t);if(arguments.length<2){var n=this.node();return r.local?n.getAttributeNS(r.space,r.local):n.getAttribute(r)}return this.each((e==null?r.local?jht:Bht:typeof e=="function"?r.local?Wht:Hht:r.local?Vht:Uht)(r,e))}function Zue(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function qht(t){return function(){this.style.removeProperty(t)}}function Xht(t,e,r){return function(){this.style.setProperty(t,e,r)}}function Yht(t,e,r){return function(){var n=e.apply(this,arguments);n==null?this.style.removeProperty(t):this.style.setProperty(t,n,r)}}function Kht(t,e,r){return arguments.length>1?this.each((e==null?qht:typeof e=="function"?Yht:Xht)(t,e,r==null?"":r)):cE(this.node(),t)}function cE(t,e){return t.style.getPropertyValue(e)||Zue(t).getComputedStyle(t,null).getPropertyValue(e)}function Zht(t){return function(){delete this[t]}}function Qht(t,e){return function(){this[t]=e}}function Jht(t,e){return function(){var r=e.apply(this,arguments);r==null?delete this[t]:this[t]=r}}function ept(t,e){return arguments.length>1?this.each((e==null?Zht:typeof e=="function"?Jht:Qht)(t,e)):this.node()[t]}function Que(t){return t.trim().split(/^|\s+/)}function PV(t){return t.classList||new Jue(t)}function Jue(t){this._node=t,this._names=Que(t.getAttribute("class")||"")}Jue.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function efe(t,e){for(var r=PV(t),n=-1,i=e.length;++n<i;)r.add(e[n])}function tfe(t,e){for(var r=PV(t),n=-1,i=e.length;++n<i;)r.remove(e[n])}function tpt(t){return function(){efe(this,t)}}function rpt(t){return function(){tfe(this,t)}}function npt(t,e){return function(){(e.apply(this,arguments)?efe:tfe)(this,t)}}function ipt(t,e){var r=Que(t+"");if(arguments.length<2){for(var n=PV(this.node()),i=-1,o=r.length;++i<o;)if(!n.contains(r[i]))return!1;return!0}return this.each((typeof e=="function"?npt:e?tpt:rpt)(r,e))}function opt(){this.textContent=""}function spt(t){return function(){this.textContent=t}}function apt(t){return function(){var e=t.apply(this,arguments);this.textContent=e==null?"":e}}function lpt(t){return arguments.length?this.each(t==null?opt:(typeof t=="function"?apt:spt)(t)):this.node().textContent}function cpt(){this.innerHTML=""}function upt(t){return function(){this.innerHTML=t}}function fpt(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e==null?"":e}}function dpt(t){return arguments.length?this.each(t==null?cpt:(typeof t=="function"?fpt:upt)(t)):this.node().innerHTML}function hpt(){this.nextSibling&&this.parentNode.appendChild(this)}function ppt(){return this.each(hpt)}function mpt(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function gpt(){return this.each(mpt)}function vpt(t){var e=typeof t=="function"?t:Gue(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function ypt(){return null}function xpt(t,e){var r=typeof t=="function"?t:Gue(t),n=e==null?ypt:typeof e=="function"?e:TV(e);return this.select(function(){return this.insertBefore(r.apply(this,arguments),n.apply(this,arguments)||null)})}function _pt(){var t=this.parentNode;t&&t.removeChild(this)}function bpt(){return this.each(_pt)}function wpt(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Cpt(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Ept(t){return this.select(t?Cpt:wpt)}function Spt(t){return arguments.length?this.property("__data__",t):this.node().__data__}var rfe={};if(typeof document!="undefined"){var Tpt=document.documentElement;"onmouseenter"in Tpt||(rfe={mouseenter:"mouseover",mouseleave:"mouseout"})}function Ppt(t,e,r){return t=nfe(t,e,r),function(n){var i=n.relatedTarget;(!i||i!==this&&!(i.compareDocumentPosition(this)&8))&&t.call(this,n)}}function nfe(t,e,r){return function(n){try{t.call(this,this.__data__,e,r)}finally{}}}function Ipt(t){return t.trim().split(/^|\s+/).map(function(e){var r="",n=e.indexOf(".");return n>=0&&(r=e.slice(n+1),e=e.slice(0,n)),{type:e,name:r}})}function Mpt(t){return function(){var e=this.__on;if(!!e){for(var r=0,n=-1,i=e.length,o;r<i;++r)o=e[r],(!t.type||o.type===t.type)&&o.name===t.name?this.removeEventListener(o.type,o.listener,o.capture):e[++n]=o;++n?e.length=n:delete this.__on}}}function Apt(t,e,r){var n=rfe.hasOwnProperty(t.type)?Ppt:nfe;return function(i,o,a){var s=this.__on,l,u=n(e,o,a);if(s){for(var p=0,m=s.length;p<m;++p)if((l=s[p]).type===t.type&&l.name===t.name){this.removeEventListener(l.type,l.listener,l.capture),this.addEventListener(l.type,l.listener=u,l.capture=r),l.value=e;return}}this.addEventListener(t.type,u,r),l={type:t.type,name:t.name,value:e,listener:u,capture:r},s?s.push(l):this.__on=[l]}}function Rpt(t,e,r){var n=Ipt(t+""),i,o=n.length,a;if(arguments.length<2){var s=this.node().__on;if(s){for(var l=0,u=s.length,p;l<u;++l)for(i=0,p=s[l];i<o;++i)if((a=n[i]).type===p.type&&a.name===p.name)return p.value}return}for(s=e?Apt:Mpt,r==null&&(r=!1),i=0;i<o;++i)this.each(s(n[i],e,r));return this}function ife(t,e,r){var n=Zue(t),i=n.CustomEvent;typeof i=="function"?i=new i(e,r):(i=n.document.createEvent("Event"),r?(i.initEvent(e,r.bubbles,r.cancelable),i.detail=r.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function kpt(t,e){return function(){return ife(this,t,e)}}function Opt(t,e){return function(){return ife(this,t,e.apply(this,arguments))}}function Lpt(t,e){return this.each((typeof e=="function"?Opt:kpt)(t,e))}var Dpt=[null];function Nm(t,e){this._groups=t,this._parents=e}function TM(){return new Nm([[document.documentElement]],Dpt)}Nm.prototype=TM.prototype={constructor:Nm,select:xht,selectAll:bht,filter:wht,data:Pht,enter:Cht,exit:Iht,join:Mht,merge:Aht,order:Rht,sort:kht,call:Lht,nodes:Dht,node:Nht,size:$ht,empty:Fht,each:zht,attr:Ght,style:Kht,property:ept,classed:ipt,text:lpt,html:dpt,raise:ppt,lower:gpt,append:vpt,insert:xpt,remove:bpt,clone:Ept,datum:Spt,on:Rpt,dispatch:Lpt};var uE=0,PM=0,IM=0,ofe=1e3,t5,MM,r5=0,Cb=0,n5=0,AM=typeof performance=="object"&&performance.now?performance:Date,sfe=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function i5(){return Cb||(sfe(Npt),Cb=AM.now()+n5)}function Npt(){Cb=0}function o5(){this._call=this._time=this._next=null}o5.prototype=afe.prototype={constructor:o5,restart:function(t,e,r){if(typeof t!="function")throw new TypeError("callback is not a function");r=(r==null?i5():+r)+(e==null?0:+e),!this._next&&MM!==this&&(MM?MM._next=this:t5=this,MM=this),this._call=t,this._time=r,IV()},stop:function(){this._call&&(this._call=null,this._time=1/0,IV())}};function afe(t,e,r){var n=new o5;return n.restart(t,e,r),n}function $pt(){i5(),++uE;for(var t=t5,e;t;)(e=Cb-t._time)>=0&&t._call.call(null,e),t=t._next;--uE}function lfe(){Cb=(r5=AM.now())+n5,uE=PM=0;try{$pt()}finally{uE=0,zpt(),Cb=0}}function Fpt(){var t=AM.now(),e=t-r5;e>ofe&&(n5-=e,r5=t)}function zpt(){for(var t,e=t5,r,n=1/0;e;)e._call?(n>e._time&&(n=e._time),t=e,e=e._next):(r=e._next,e._next=null,e=t?t._next=r:t5=r);MM=t,IV(n)}function IV(t){if(!uE){PM&&(PM=clearTimeout(PM));var e=t-Cb;e>24?(t<1/0&&(PM=setTimeout(lfe,t-AM.now()-n5)),IM&&(IM=clearInterval(IM))):(IM||(r5=AM.now(),IM=setInterval(Fpt,ofe)),uE=1,sfe(lfe))}}function cfe(t,e,r){var n=new o5;return e=e==null?0:+e,n.restart(function(i){n.stop(),t(i+e)},e,r),n}var Bpt=Vue("start","end","cancel","interrupt"),jpt=[],ufe=0,ffe=1,MV=2,s5=3,dfe=4,AV=5,a5=6;function l5(t,e,r,n,i,o){var a=t.__transition;if(!a)t.__transition={};else if(r in a)return;Upt(t,r,{name:e,index:n,group:i,on:Bpt,tween:jpt,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:ufe})}function RV(t,e){var r=$m(t,e);if(r.state>ufe)throw new Error("too late; already scheduled");return r}function Ry(t,e){var r=$m(t,e);if(r.state>s5)throw new Error("too late; already running");return r}function $m(t,e){var r=t.__transition;if(!r||!(r=r[e]))throw new Error("transition not found");return r}function Upt(t,e,r){var n=t.__transition,i;n[e]=r,r.timer=afe(o,0,r.time);function o(u){r.state=ffe,r.timer.restart(a,r.delay,r.time),r.delay<=u&&a(u-r.delay)}function a(u){var p,m,v,x;if(r.state!==ffe)return l();for(p in n)if(x=n[p],x.name===r.name){if(x.state===s5)return cfe(a);x.state===dfe?(x.state=a5,x.timer.stop(),x.on.call("interrupt",t,t.__data__,x.index,x.group),delete n[p]):+p<e&&(x.state=a5,x.timer.stop(),x.on.call("cancel",t,t.__data__,x.index,x.group),delete n[p])}if(cfe(function(){r.state===s5&&(r.state=dfe,r.timer.restart(s,r.delay,r.time),s(u))}),r.state=MV,r.on.call("start",t,t.__data__,r.index,r.group),r.state===MV){for(r.state=s5,i=new Array(v=r.tween.length),p=0,m=-1;p<v;++p)(x=r.tween[p].value.call(t,t.__data__,r.index,r.group))&&(i[++m]=x);i.length=m+1}}function s(u){for(var p=u<r.duration?r.ease.call(null,u/r.duration):(r.timer.restart(l),r.state=AV,1),m=-1,v=i.length;++m<v;)i[m].call(t,p);r.state===AV&&(r.on.call("end",t,t.__data__,r.index,r.group),l())}function l(){r.state=a5,r.timer.stop(),delete n[e];for(var u in n)return;delete t.__transition}}function Vpt(t,e){var r=t.__transition,n,i,o=!0,a;if(!!r){e=e==null?null:e+"";for(a in r){if((n=r[a]).name!==e){o=!1;continue}i=n.state>MV&&n.state<AV,n.state=a5,n.timer.stop(),n.on.call(i?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete r[a]}o&&delete t.__transition}}function Hpt(t){return this.each(function(){Vpt(this,t)})}function Wpt(t,e){var r,n;return function(){var i=Ry(this,t),o=i.tween;if(o!==r){n=r=o;for(var a=0,s=n.length;a<s;++a)if(n[a].name===e){n=n.slice(),n.splice(a,1);break}}i.tween=n}}function Gpt(t,e,r){var n,i;if(typeof r!="function")throw new Error;return function(){var o=Ry(this,t),a=o.tween;if(a!==n){i=(n=a).slice();for(var s={name:e,value:r},l=0,u=i.length;l<u;++l)if(i[l].name===e){i[l]=s;break}l===u&&i.push(s)}o.tween=i}}function qpt(t,e){var r=this._id;if(t+="",arguments.length<2){for(var n=$m(this.node(),r).tween,i=0,o=n.length,a;i<o;++i)if((a=n[i]).name===t)return a.value;return null}return this.each((e==null?Wpt:Gpt)(r,t,e))}function kV(t,e,r){var n=t._id;return t.each(function(){var i=Ry(this,n);(i.value||(i.value={}))[e]=r.apply(this,arguments)}),function(i){return $m(i,n).value[e]}}function hfe(t,e){var r;return(typeof e=="number"?e_:e instanceof wM?cue:(r=wM(e))?(e=r,cue):vdt)(t,e)}function Xpt(t){return function(){this.removeAttribute(t)}}function Ypt(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Kpt(t,e,r){var n,i=r+"",o;return function(){var a=this.getAttribute(t);return a===i?null:a===n?o:o=e(n=a,r)}}function Zpt(t,e,r){var n,i=r+"",o;return function(){var a=this.getAttributeNS(t.space,t.local);return a===i?null:a===n?o:o=e(n=a,r)}}function Qpt(t,e,r){var n,i,o;return function(){var a,s=r(this),l;return s==null?void this.removeAttribute(t):(a=this.getAttribute(t),l=s+"",a===l?null:a===n&&l===i?o:(i=l,o=e(n=a,s)))}}function Jpt(t,e,r){var n,i,o;return function(){var a,s=r(this),l;return s==null?void this.removeAttributeNS(t.space,t.local):(a=this.getAttributeNS(t.space,t.local),l=s+"",a===l?null:a===n&&l===i?o:(i=l,o=e(n=a,s)))}}function emt(t,e){var r=JN(t),n=r==="transform"?bdt:hfe;return this.attrTween(t,typeof e=="function"?(r.local?Jpt:Qpt)(r,n,kV(this,"attr."+t,e)):e==null?(r.local?Ypt:Xpt)(r):(r.local?Zpt:Kpt)(r,n,e))}function tmt(t,e){return function(r){this.setAttribute(t,e.call(this,r))}}function rmt(t,e){return function(r){this.setAttributeNS(t.space,t.local,e.call(this,r))}}function nmt(t,e){var r,n;function i(){var o=e.apply(this,arguments);return o!==n&&(r=(n=o)&&rmt(t,o)),r}return i._value=e,i}function imt(t,e){var r,n;function i(){var o=e.apply(this,arguments);return o!==n&&(r=(n=o)&&tmt(t,o)),r}return i._value=e,i}function omt(t,e){var r="attr."+t;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(e==null)return this.tween(r,null);if(typeof e!="function")throw new Error;var n=JN(t);return this.tween(r,(n.local?nmt:imt)(n,e))}function smt(t,e){return function(){RV(this,t).delay=+e.apply(this,arguments)}}function amt(t,e){return e=+e,function(){RV(this,t).delay=e}}function lmt(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?smt:amt)(e,t)):$m(this.node(),e).delay}function cmt(t,e){return function(){Ry(this,t).duration=+e.apply(this,arguments)}}function umt(t,e){return e=+e,function(){Ry(this,t).duration=e}}function fmt(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?cmt:umt)(e,t)):$m(this.node(),e).duration}function dmt(t,e){if(typeof e!="function")throw new Error;return function(){Ry(this,t).ease=e}}function hmt(t){var e=this._id;return arguments.length?this.each(dmt(e,t)):$m(this.node(),e).ease}function pmt(t){typeof t!="function"&&(t=Xue(t));for(var e=this._groups,r=e.length,n=new Array(r),i=0;i<r;++i)for(var o=e[i],a=o.length,s=n[i]=[],l,u=0;u<a;++u)(l=o[u])&&t.call(l,l.__data__,u,o)&&s.push(l);return new ky(n,this._parents,this._name,this._id)}function mmt(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,r=t._groups,n=e.length,i=r.length,o=Math.min(n,i),a=new Array(n),s=0;s<o;++s)for(var l=e[s],u=r[s],p=l.length,m=a[s]=new Array(p),v,x=0;x<p;++x)(v=l[x]||u[x])&&(m[x]=v);for(;s<n;++s)a[s]=e[s];return new ky(a,this._parents,this._name,this._id)}function gmt(t){return(t+"").trim().split(/^|\s+/).every(function(e){var r=e.indexOf(".");return r>=0&&(e=e.slice(0,r)),!e||e==="start"})}function vmt(t,e,r){var n,i,o=gmt(e)?RV:Ry;return function(){var a=o(this,t),s=a.on;s!==n&&(i=(n=s).copy()).on(e,r),a.on=i}}function ymt(t,e){var r=this._id;return arguments.length<2?$m(this.node(),r).on.on(t):this.each(vmt(r,t,e))}function xmt(t){return function(){var e=this.parentNode;for(var r in this.__transition)if(+r!==t)return;e&&e.removeChild(this)}}function _mt(){return this.on("end.remove",xmt(this._id))}function bmt(t){var e=this._name,r=this._id;typeof t!="function"&&(t=TV(t));for(var n=this._groups,i=n.length,o=new Array(i),a=0;a<i;++a)for(var s=n[a],l=s.length,u=o[a]=new Array(l),p,m,v=0;v<l;++v)(p=s[v])&&(m=t.call(p,p.__data__,v,s))&&("__data__"in p&&(m.__data__=p.__data__),u[v]=m,l5(u[v],e,r,v,u,$m(p,r)));return new ky(o,this._parents,e,r)}function wmt(t){var e=this._name,r=this._id;typeof t!="function"&&(t=que(t));for(var n=this._groups,i=n.length,o=[],a=[],s=0;s<i;++s)for(var l=n[s],u=l.length,p,m=0;m<u;++m)if(p=l[m]){for(var v=t.call(p,p.__data__,m,l),x,y=$m(p,r),_=0,w=v.length;_<w;++_)(x=v[_])&&l5(x,e,r,_,v,y);o.push(v),a.push(p)}return new ky(o,a,e,r)}var Cmt=TM.prototype.constructor;function Emt(){return new Cmt(this._groups,this._parents)}function Smt(t,e){var r,n,i;return function(){var o=cE(this,t),a=(this.style.removeProperty(t),cE(this,t));return o===a?null:o===r&&a===n?i:i=e(r=o,n=a)}}function pfe(t){return function(){this.style.removeProperty(t)}}function Tmt(t,e,r){var n,i=r+"",o;return function(){var a=cE(this,t);return a===i?null:a===n?o:o=e(n=a,r)}}function Pmt(t,e,r){var n,i,o;return function(){var a=cE(this,t),s=r(this),l=s+"";return s==null&&(l=s=(this.style.removeProperty(t),cE(this,t))),a===l?null:a===n&&l===i?o:(i=l,o=e(n=a,s))}}function Imt(t,e){var r,n,i,o="style."+e,a="end."+o,s;return function(){var l=Ry(this,t),u=l.on,p=l.value[o]==null?s||(s=pfe(e)):void 0;(u!==r||i!==p)&&(n=(r=u).copy()).on(a,i=p),l.on=n}}function Mmt(t,e,r){var n=(t+="")==="transform"?_dt:hfe;return e==null?this.styleTween(t,Smt(t,n)).on("end.style."+t,pfe(t)):typeof e=="function"?this.styleTween(t,Pmt(t,n,kV(this,"style."+t,e))).each(Imt(this._id,t)):this.styleTween(t,Tmt(t,n,e),r).on("end.style."+t,null)}function Amt(t,e,r){return function(n){this.style.setProperty(t,e.call(this,n),r)}}function Rmt(t,e,r){var n,i;function o(){var a=e.apply(this,arguments);return a!==i&&(n=(i=a)&&Amt(t,a,r)),n}return o._value=e,o}function kmt(t,e,r){var n="style."+(t+="");if(arguments.length<2)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;return this.tween(n,Rmt(t,e,r==null?"":r))}function Omt(t){return function(){this.textContent=t}}function Lmt(t){return function(){var e=t(this);this.textContent=e==null?"":e}}function Dmt(t){return this.tween("text",typeof t=="function"?Lmt(kV(this,"text",t)):Omt(t==null?"":t+""))}function Nmt(t){return function(e){this.textContent=t.call(this,e)}}function $mt(t){var e,r;function n(){var i=t.apply(this,arguments);return i!==r&&(e=(r=i)&&Nmt(i)),e}return n._value=t,n}function Fmt(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(t==null)return this.tween(e,null);if(typeof t!="function")throw new Error;return this.tween(e,$mt(t))}function zmt(){for(var t=this._name,e=this._id,r=mfe(),n=this._groups,i=n.length,o=0;o<i;++o)for(var a=n[o],s=a.length,l,u=0;u<s;++u)if(l=a[u]){var p=$m(l,e);l5(l,t,r,u,a,{time:p.time+p.delay+p.duration,delay:0,duration:p.duration,ease:p.ease})}return new ky(n,this._parents,t,r)}function Bmt(){var t,e,r=this,n=r._id,i=r.size();return new Promise(function(o,a){var s={value:a},l={value:function(){--i==0&&o()}};r.each(function(){var u=Ry(this,n),p=u.on;p!==t&&(e=(t=p).copy(),e._.cancel.push(s),e._.interrupt.push(s),e._.end.push(l)),u.on=e})})}var jmt=0;function ky(t,e,r,n){this._groups=t,this._parents=e,this._name=r,this._id=n}function mfe(){return++jmt}var fE=TM.prototype;ky.prototype={constructor:ky,select:bmt,selectAll:wmt,filter:pmt,merge:mmt,selection:Emt,transition:zmt,call:fE.call,nodes:fE.nodes,node:fE.node,size:fE.size,empty:fE.empty,each:fE.each,on:ymt,attr:emt,attrTween:omt,style:Mmt,styleTween:kmt,text:Dmt,textTween:Fmt,remove:_mt,tween:qpt,delay:lmt,duration:fmt,ease:hmt,end:Bmt};function Umt(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var OV={time:null,delay:0,duration:250,ease:Umt};function Vmt(t,e){for(var r;!(r=t.__transition)||!(r=r[e]);)if(!(t=t.parentNode))return OV.time=i5(),OV;return r}function Hmt(t){var e,r;t instanceof ky?(e=t._id,t=t._name):(e=mfe(),(r=OV).time=i5(),t=t==null?null:t+"");for(var n=this._groups,i=n.length,o=0;o<i;++o)for(var a=n[o],s=a.length,l,u=0;u<s;++u)(l=a[u])&&l5(l,t,e,u,a,r||Vmt(l,e));return new ky(n,this._parents,t,e)}TM.prototype.interrupt=Hpt;TM.prototype.transition=Hmt;var mp="$";function c5(){}c5.prototype=gfe.prototype={constructor:c5,has:function(t){return mp+t in this},get:function(t){return this[mp+t]},set:function(t,e){return this[mp+t]=e,this},remove:function(t){var e=mp+t;return e in this&&delete this[e]},clear:function(){for(var t in this)t[0]===mp&&delete this[t]},keys:function(){var t=[];for(var e in this)e[0]===mp&&t.push(e.slice(1));return t},values:function(){var t=[];for(var e in this)e[0]===mp&&t.push(this[e]);return t},entries:function(){var t=[];for(var e in this)e[0]===mp&&t.push({key:e.slice(1),value:this[e]});return t},size:function(){var t=0;for(var e in this)e[0]===mp&&++t;return t},empty:function(){for(var t in this)if(t[0]===mp)return!1;return!0},each:function(t){for(var e in this)e[0]===mp&&t(this[e],e.slice(1),this)}};function gfe(t,e){var r=new c5;if(t instanceof c5)t.each(function(s,l){r.set(l,s)});else if(Array.isArray(t)){var n=-1,i=t.length,o;if(e==null)for(;++n<i;)r.set(n,t[n]);else for(;++n<i;)r.set(e(o=t[n],n,t),o)}else if(t)for(var a in t)r.set(a,t[a]);return r}function vfe(){}var Eb=gfe.prototype;vfe.prototype={constructor:vfe,has:Eb.has,add:function(t){return t+="",this[mp+t]=t,this},remove:Eb.remove,clear:Eb.clear,values:Eb.keys,size:Eb.size,empty:Eb.empty,each:Eb.each};function dE(){return Math.random()}(function t(e){function r(n,i){return n=n==null?0:+n,i=i==null?1:+i,arguments.length===1?(i=n,n=0):i-=n,function(){return e()*i+n}}return r.source=t,r})(dE);var Wmt=function t(e){function r(n,i){var o,a;return n=n==null?0:+n,i=i==null?1:+i,function(){var s;if(o!=null)s=o,o=null;else do o=e()*2-1,s=e()*2-1,a=o*o+s*s;while(!a||a>1);return n+i*s*Math.sqrt(-2*Math.log(a)/a)}}return r.source=t,r}(dE);(function t(e){function r(){var n=Wmt.source(e).apply(this,arguments);return function(){return Math.exp(n())}}return r.source=t,r})(dE);var Gmt=function t(e){function r(n){return function(){for(var i=0,o=0;o<n;++o)i+=e();return i}}return r.source=t,r}(dE);(function t(e){function r(n){var i=Gmt.source(e)(n);return function(){return i()/n}}return r.source=t,r})(dE);(function t(e){function r(n){return function(){return-Math.log(1-e())/n}}return r.source=t,r})(dE);function qmt(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}var Xmt=Array.prototype,yfe=Xmt.slice;function Ymt(){var t=[.5],e=[0,1],r,n=1;function i(o){return o<=o?e[fht(t,o,0,n)]:r}return i.domain=function(o){return arguments.length?(t=yfe.call(o),n=Math.min(t.length,e.length-1),i):t.slice()},i.range=function(o){return arguments.length?(e=yfe.call(o),n=Math.min(t.length,e.length-1),i):e.slice()},i.invertExtent=function(o){var a=e.indexOf(o);return[t[a-1],t[a]]},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return Ymt().domain(t).range(e).unknown(r)},qmt.apply(i,arguments)}function u5(){this._=null}function f5(t){t.U=t.C=t.L=t.R=t.P=t.N=null}u5.prototype={constructor:u5,insert:function(t,e){var r,n,i;if(t){if(e.P=t,e.N=t.N,t.N&&(t.N.P=e),t.N=e,t.R){for(t=t.R;t.L;)t=t.L;t.L=e}else t.R=e;r=t}else this._?(t=xfe(this._),e.P=null,e.N=t,t.P=t.L=e,r=t):(e.P=e.N=null,this._=e,r=null);for(e.L=e.R=null,e.U=r,e.C=!0,t=e;r&&r.C;)n=r.U,r===n.L?(i=n.R,i&&i.C?(r.C=i.C=!1,n.C=!0,t=n):(t===r.R&&(RM(this,r),t=r,r=t.U),r.C=!1,n.C=!0,kM(this,n))):(i=n.L,i&&i.C?(r.C=i.C=!1,n.C=!0,t=n):(t===r.L&&(kM(this,r),t=r,r=t.U),r.C=!1,n.C=!0,RM(this,n))),r=t.U;this._.C=!1},remove:function(t){t.N&&(t.N.P=t.P),t.P&&(t.P.N=t.N),t.N=t.P=null;var e=t.U,r,n=t.L,i=t.R,o,a;if(n?i?o=xfe(i):o=n:o=i,e?e.L===t?e.L=o:e.R=o:this._=o,n&&i?(a=o.C,o.C=t.C,o.L=n,n.U=o,o!==i?(e=o.U,o.U=t.U,t=o.R,e.L=t,o.R=i,i.U=o):(o.U=e,e=o,t=o.R)):(a=t.C,t=o),t&&(t.U=e),!a){if(t&&t.C){t.C=!1;return}do{if(t===this._)break;if(t===e.L){if(r=e.R,r.C&&(r.C=!1,e.C=!0,RM(this,e),r=e.R),r.L&&r.L.C||r.R&&r.R.C){(!r.R||!r.R.C)&&(r.L.C=!1,r.C=!0,kM(this,r),r=e.R),r.C=e.C,e.C=r.R.C=!1,RM(this,e),t=this._;break}}else if(r=e.L,r.C&&(r.C=!1,e.C=!0,kM(this,e),r=e.L),r.L&&r.L.C||r.R&&r.R.C){(!r.L||!r.L.C)&&(r.R.C=!1,r.C=!0,RM(this,r),r=e.L),r.C=e.C,e.C=r.L.C=!1,kM(this,e),t=this._;break}r.C=!0,t=e,e=e.U}while(!t.C);t&&(t.C=!1)}}};function RM(t,e){var r=e,n=e.R,i=r.U;i?i.L===r?i.L=n:i.R=n:t._=n,n.U=i,r.U=n,r.R=n.L,r.R&&(r.R.U=r),n.L=r}function kM(t,e){var r=e,n=e.L,i=r.U;i?i.L===r?i.L=n:i.R=n:t._=n,n.U=i,r.U=n,r.L=n.R,r.L&&(r.L.U=r),n.R=r}function xfe(t){for(;t.L;)t=t.L;return t}function OM(t,e,r,n){var i=[null,null],o=ku.push(i)-1;return i.left=t,i.right=e,r&&d5(i,t,e,r),n&&d5(i,e,t,n),nh[t.index].halfedges.push(o),nh[e.index].halfedges.push(o),i}function LM(t,e,r){var n=[e,r];return n.left=t,n}function d5(t,e,r,n){!t[0]&&!t[1]?(t[0]=n,t.left=e,t.right=r):t.left===r?t[1]=n:t[0]=n}function Kmt(t,e,r,n,i){var o=t[0],a=t[1],s=o[0],l=o[1],u=a[0],p=a[1],m=0,v=1,x=u-s,y=p-l,_;if(_=e-s,!(!x&&_>0)){if(_/=x,x<0){if(_<m)return;_<v&&(v=_)}else if(x>0){if(_>v)return;_>m&&(m=_)}if(_=n-s,!(!x&&_<0)){if(_/=x,x<0){if(_>v)return;_>m&&(m=_)}else if(x>0){if(_<m)return;_<v&&(v=_)}if(_=r-l,!(!y&&_>0)){if(_/=y,y<0){if(_<m)return;_<v&&(v=_)}else if(y>0){if(_>v)return;_>m&&(m=_)}if(_=i-l,!(!y&&_<0)){if(_/=y,y<0){if(_>v)return;_>m&&(m=_)}else if(y>0){if(_<m)return;_<v&&(v=_)}return!(m>0)&&!(v<1)||(m>0&&(t[0]=[s+m*x,l+m*y]),v<1&&(t[1]=[s+v*x,l+v*y])),!0}}}}}function Zmt(t,e,r,n,i){var o=t[1];if(o)return!0;var a=t[0],s=t.left,l=t.right,u=s[0],p=s[1],m=l[0],v=l[1],x=(u+m)/2,y=(p+v)/2,_,w;if(v===p){if(x<e||x>=n)return;if(u>m){if(!a)a=[x,r];else if(a[1]>=i)return;o=[x,i]}else{if(!a)a=[x,i];else if(a[1]<r)return;o=[x,r]}}else if(_=(u-m)/(v-p),w=y-_*x,_<-1||_>1)if(u>m){if(!a)a=[(r-w)/_,r];else if(a[1]>=i)return;o=[(i-w)/_,i]}else{if(!a)a=[(i-w)/_,i];else if(a[1]<r)return;o=[(r-w)/_,r]}else if(p<v){if(!a)a=[e,_*e+w];else if(a[0]>=n)return;o=[n,_*n+w]}else{if(!a)a=[n,_*n+w];else if(a[0]<e)return;o=[e,_*e+w]}return t[0]=a,t[1]=o,!0}function Qmt(t,e,r,n){for(var i=ku.length,o;i--;)(!Zmt(o=ku[i],t,e,r,n)||!Kmt(o,t,e,r,n)||!(Math.abs(o[0][0]-o[1][0])>ka||Math.abs(o[0][1]-o[1][1])>ka))&&delete ku[i]}function Jmt(t){return nh[t.index]={site:t,halfedges:[]}}function egt(t,e){var r=t.site,n=e.left,i=e.right;return r===i&&(i=n,n=r),i?Math.atan2(i[1]-n[1],i[0]-n[0]):(r===n?(n=e[1],i=e[0]):(n=e[0],i=e[1]),Math.atan2(n[0]-i[0],i[1]-n[1]))}function _fe(t,e){return e[+(e.left!==t.site)]}function tgt(t,e){return e[+(e.left===t.site)]}function rgt(){for(var t=0,e=nh.length,r,n,i,o;t<e;++t)if((r=nh[t])&&(o=(n=r.halfedges).length)){var a=new Array(o),s=new Array(o);for(i=0;i<o;++i)a[i]=i,s[i]=egt(r,ku[n[i]]);for(a.sort(function(l,u){return s[u]-s[l]}),i=0;i<o;++i)s[i]=n[a[i]];for(i=0;i<o;++i)n[i]=s[i]}}function ngt(t,e,r,n){var i=nh.length,o,a,s,l,u,p,m,v,x,y,_,w,C=!0;for(o=0;o<i;++o)if(a=nh[o]){for(s=a.site,u=a.halfedges,l=u.length;l--;)ku[u[l]]||u.splice(l,1);for(l=0,p=u.length;l<p;)y=tgt(a,ku[u[l]]),_=y[0],w=y[1],m=_fe(a,ku[u[++l%p]]),v=m[0],x=m[1],(Math.abs(_-v)>ka||Math.abs(w-x)>ka)&&(u.splice(l,0,ku.push(LM(s,y,Math.abs(_-t)<ka&&n-w>ka?[t,Math.abs(v-t)<ka?x:n]:Math.abs(w-n)<ka&&r-_>ka?[Math.abs(x-n)<ka?v:r,n]:Math.abs(_-r)<ka&&w-e>ka?[r,Math.abs(v-r)<ka?x:e]:Math.abs(w-e)<ka&&_-t>ka?[Math.abs(x-e)<ka?v:t,e]:null))-1),++p);p&&(C=!1)}if(C){var E,T,A,k=1/0;for(o=0,C=null;o<i;++o)(a=nh[o])&&(s=a.site,E=s[0]-t,T=s[1]-e,A=E*E+T*T,A<k&&(k=A,C=a));if(C){var X=[t,e],Z=[t,n],W=[r,n],D=[r,e];C.halfedges.push(ku.push(LM(s=C.site,X,Z))-1,ku.push(LM(s,Z,W))-1,ku.push(LM(s,W,D))-1,ku.push(LM(s,D,X))-1)}}for(o=0;o<i;++o)(a=nh[o])&&(a.halfedges.length||delete nh[o])}var bfe=[],LV;function igt(){f5(this),this.x=this.y=this.arc=this.site=this.cy=null}function hE(t){var e=t.P,r=t.N;if(!(!e||!r)){var n=e.site,i=t.site,o=r.site;if(n!==o){var a=i[0],s=i[1],l=n[0]-a,u=n[1]-s,p=o[0]-a,m=o[1]-s,v=2*(l*m-u*p);if(!(v>=-cgt)){var x=l*l+u*u,y=p*p+m*m,_=(m*x-u*y)/v,w=(l*y-p*x)/v,C=bfe.pop()||new igt;C.arc=t,C.site=i,C.x=_+a,C.y=(C.cy=w+s)+Math.sqrt(_*_+w*w),t.circle=C;for(var E=null,T=DM._;T;)if(C.y<T.y||C.y===T.y&&C.x<=T.x)if(T.L)T=T.L;else{E=T.P;break}else if(T.R)T=T.R;else{E=T;break}DM.insert(E,C),E||(LV=C)}}}}function pE(t){var e=t.circle;e&&(e.P||(LV=e.N),DM.remove(e),bfe.push(e),f5(e),t.circle=null)}var wfe=[];function ogt(){f5(this),this.edge=this.site=this.circle=null}function Cfe(t){var e=wfe.pop()||new ogt;return e.site=t,e}function DV(t){pE(t),mE.remove(t),wfe.push(t),f5(t)}function sgt(t){var e=t.circle,r=e.x,n=e.cy,i=[r,n],o=t.P,a=t.N,s=[t];DV(t);for(var l=o;l.circle&&Math.abs(r-l.circle.x)<ka&&Math.abs(n-l.circle.cy)<ka;)o=l.P,s.unshift(l),DV(l),l=o;s.unshift(l),pE(l);for(var u=a;u.circle&&Math.abs(r-u.circle.x)<ka&&Math.abs(n-u.circle.cy)<ka;)a=u.N,s.push(u),DV(u),u=a;s.push(u),pE(u);var p=s.length,m;for(m=1;m<p;++m)u=s[m],l=s[m-1],d5(u.edge,l.site,u.site,i);l=s[0],u=s[p-1],u.edge=OM(l.site,u.site,null,i),hE(l),hE(u)}function agt(t){for(var e=t[0],r=t[1],n,i,o,a,s=mE._;s;)if(o=Efe(s,r)-e,o>ka)s=s.L;else if(a=e-lgt(s,r),a>ka){if(!s.R){n=s;break}s=s.R}else{o>-ka?(n=s.P,i=s):a>-ka?(n=s,i=s.N):n=i=s;break}Jmt(t);var l=Cfe(t);if(mE.insert(n,l),!(!n&&!i)){if(n===i){pE(n),i=Cfe(n.site),mE.insert(l,i),l.edge=i.edge=OM(n.site,l.site),hE(n),hE(i);return}if(!i){l.edge=OM(n.site,l.site);return}pE(n),pE(i);var u=n.site,p=u[0],m=u[1],v=t[0]-p,x=t[1]-m,y=i.site,_=y[0]-p,w=y[1]-m,C=2*(v*w-x*_),E=v*v+x*x,T=_*_+w*w,A=[(w*E-x*T)/C+p,(v*T-_*E)/C+m];d5(i.edge,u,y,A),l.edge=OM(u,t,null,A),i.edge=OM(t,y,null,A),hE(n),hE(i)}}function Efe(t,e){var r=t.site,n=r[0],i=r[1],o=i-e;if(!o)return n;var a=t.P;if(!a)return-1/0;r=a.site;var s=r[0],l=r[1],u=l-e;if(!u)return s;var p=s-n,m=1/o-1/u,v=p/u;return m?(-v+Math.sqrt(v*v-2*m*(p*p/(-2*u)-l+u/2+i-o/2)))/m+n:(n+s)/2}function lgt(t,e){var r=t.N;if(r)return Efe(r,e);var n=t.site;return n[1]===e?n[0]:1/0}var ka=1e-6,cgt=1e-12,mE,nh,DM,ku;function ugt(t,e,r){return(t[0]-r[0])*(e[1]-t[1])-(t[0]-e[0])*(r[1]-t[1])}function fgt(t,e){return e[1]-t[1]||e[0]-t[0]}function Sfe(t,e){var r=t.sort(fgt).pop(),n,i,o;for(ku=[],nh=new Array(t.length),mE=new u5,DM=new u5;;)if(o=LV,r&&(!o||r[1]<o.y||r[1]===o.y&&r[0]<o.x))(r[0]!==n||r[1]!==i)&&(agt(r),n=r[0],i=r[1]),r=t.pop();else if(o)sgt(o.arc);else break;if(rgt(),e){var a=+e[0][0],s=+e[0][1],l=+e[1][0],u=+e[1][1];Qmt(a,s,l,u),ngt(a,s,l,u)}this.edges=ku,this.cells=nh,mE=DM=ku=nh=null}Sfe.prototype={constructor:Sfe,polygons:function(){var t=this.edges;return this.cells.map(function(e){var r=e.halfedges.map(function(n){return _fe(e,t[n])});return r.data=e.site.data,r})},triangles:function(){var t=[],e=this.edges;return this.cells.forEach(function(r,n){if(!!(s=(o=r.halfedges).length))for(var i=r.site,o,a=-1,s,l,u=e[o[s-1]],p=u.left===i?u.right:u.left;++a<s;)l=p,u=e[o[a]],p=u.left===i?u.right:u.left,l&&p&&n<l.index&&n<p.index&&ugt(i,l,p)<0&&t.push([i.data,l.data,p.data])}),t},links:function(){return this.edges.filter(function(t){return t.right}).map(function(t){return{source:t.left.data,target:t.right.data}})},find:function(t,e,r){for(var n=this,i,o=n._found||0,a=n.cells.length,s;!(s=n.cells[o]);)if(++o>=a)return null;var l=t-s.site[0],u=e-s.site[1],p=l*l+u*u;do s=n.cells[i=o],o=null,s.halfedges.forEach(function(m){var v=n.edges[m],x=v.left;if(!((x===s.site||!x)&&!(x=v.right))){var y=t-x[0],_=e-x[1],w=y*y+_*_;w<p&&(p=w,o=x.index)}});while(o!==null);return n._found=i,r==null||p<=r*r?s.site:null}};function gE(t,e,r){this.k=t,this.x=e,this.y=r}gE.prototype={constructor:gE,scale:function(t){return t===1?this:new gE(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new gE(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};new gE(1,0,0);gE.prototype;const Tfe=Y.exports.createContext(null);function Bkt(){var t;const e=(t=Y.exports.useContext(Tfe))===null||t===void 0?void 0:t.maps,r=Y.exports.useContext(Sb);return Y.exports.useMemo(()=>ul(io({},e),{current:r==null?void 0:r.map}),[e,r])}function dgt(t){const e=t.clone();return e.pixelsToGLUnits=t.pixelsToGLUnits,e}function Pfe(t){return{longitude:t.center.lng,latitude:t.center.lat,zoom:t.zoom,pitch:t.pitch,bearing:t.bearing,padding:t.padding}}function Ife(t,e){const r=e.viewState||e;let n=!1;if("longitude"in r&&"latitude"in r){const i=t.center;t.center=new i.constructor(r.longitude,r.latitude),n=n||i!==t.center}if("zoom"in r){const i=t.zoom;t.zoom=r.zoom,n=n||i!==t.zoom}if("bearing"in r){const i=t.bearing;t.bearing=r.bearing,n=n||i!==t.bearing}if("pitch"in r){const i=t.pitch;t.pitch=r.pitch,n=n||i!==t.pitch}return r.padding&&!t.isPaddingEqual(r.padding)&&(n=!0,t.padding=r.padding),n}const hgt=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function Mfe(t){if(!t)return null;if(typeof t=="string"||("toJS"in t&&(t=t.toJS()),!t.layers))return t;const e={};for(const n of t.layers)e[n.id]=n;const r=t.layers.map(n=>{const i=e[n.ref];let o=null;if("interactive"in n&&(o=io({},n),delete o.interactive),i){o=o||io({},n),delete o.ref;for(const a of hgt)a in i&&(o[a]=i[a])}return o||n});return ul(io({},t),{layers:r})}function pgt(t,e){const r=Array.isArray(t)?t[0]:t?t.x:0,n=Array.isArray(t)?t[1]:t?t.y:0,i=Array.isArray(e)?e[0]:e?e.x:0,o=Array.isArray(e)?e[1]:e?e.y:0;return r===i&&n===o}function gp(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 r=0;r<t.length;r++)if(!gp(t[r],e[r]))return!1;return!0}else if(Array.isArray(e))return!1;if(typeof t=="object"&&typeof e=="object"){const r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;for(const i of r)if(!e.hasOwnProperty(i)||!gp(t[i],e[i]))return!1;return!0}return!1}const Afe={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"},NV={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"},Rfe={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"},mgt=["minZoom","maxZoom","minPitch","maxPitch","maxBounds","projection","renderWorldCopies"],ggt=["scrollZoom","boxZoom","dragRotate","dragPan","keyboard","doubleClickZoom","touchZoomRotate","touchPitch"];class vE{constructor(e,r,n){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 o=this.props[Rfe[i.type]];o&&o(i)},this._onPointerEvent=i=>{(i.type==="mousemove"||i.type==="mouseout")&&this._updateHover(i);const o=this.props[Afe[i.type]];if(o){if(this.props.interactiveLayerIds&&i.type!=="mouseover"&&i.type!=="mouseout"){const a=this._hoveredFeatures||this._map.queryRenderedFeatures(i.point,{layers:this.props.interactiveLayerIds});i.features=a}o(i),delete i.features}},this._onCameraEvent=i=>{if(!this._internalUpdate){const o=this.props[NV[i.type]];o&&o(i)}i.type in this._deferredEvents&&(this._deferredEvents[i.type]=!1)},this._MapClass=e,this.props=r,this._initialize(n)}get map(){return this._map}get transform(){return this._renderTransform}setProps(e){const r=this.props;this.props=e;const n=this._updateSettings(e,r);n&&this._createShadowTransform(this._map);const i=this._updateSize(e),o=this._updateViewState(e,!0);this._updateStyle(e,r),this._updateStyleComponents(e,r),this._updateHandlers(e,r),(n||i||o&&!this._map.isMoving())&&this.redraw()}static reuse(e,r){const n=vE.savedMaps.pop();if(!n)return null;const i=n.map,o=i.getContainer();for(r.className=o.className;o.childNodes.length>0;)r.appendChild(o.childNodes[0]);i._container=r,n.setProps(ul(io({},e),{styleDiffing:!1})),i.resize();const{initialViewState:a}=e;return a&&(a.bounds?i.fitBounds(a.bounds,ul(io({},a.fitBoundsOptions),{duration:0})):n._updateViewState(a,!1)),i.isStyleLoaded()?i.fire("load"):i.once("styledata",()=>i.fire("load")),n}_initialize(e){const{props:r}=this,n=ul(io(io({},r),r.initialViewState),{accessToken:r.mapboxAccessToken||vgt()||null,container:e,style:Mfe(r.mapStyle)}),i=n.initialViewState||n.viewState||n;if(Object.assign(n,{center:[i.longitude||0,i.latitude||0],zoom:i.zoom||0,pitch:i.pitch||0,bearing:i.bearing||0}),r.gl){const u=HTMLCanvasElement.prototype.getContext;HTMLCanvasElement.prototype.getContext=()=>(HTMLCanvasElement.prototype.getContext=u,r.gl)}const o=new this._MapClass(n);i.padding&&o.setPadding(i.padding),r.cursor&&(o.getCanvas().style.cursor=r.cursor),this._createShadowTransform(o);const a=o._render;o._render=u=>{this._inRender=!0,a.call(o,u),this._inRender=!1};const s=o._renderTaskQueue.run;o._renderTaskQueue.run=u=>{s.call(o._renderTaskQueue,u),this._onBeforeRepaint()},o.on("render",()=>this._onAfterRepaint());const l=o.fire;o.fire=this._fireEvent.bind(this,l),o.on("resize",()=>{this._renderTransform.resize(o.transform.width,o.transform.height)}),o.on("styledata",()=>this._updateStyleComponents(this.props,{})),o.on("sourcedata",()=>this._updateStyleComponents(this.props,{}));for(const u in Afe)o.on(u,this._onPointerEvent);for(const u in NV)o.on(u,this._onCameraEvent);for(const u in Rfe)o.on(u,this._onEvent);this._map=o}recycle(){const r=this.map.getContainer().querySelector("[mapboxgl-children]");r==null||r.remove(),vE.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 r=dgt(e.transform);e.painter.transform=r,this._renderTransform=r}_updateSize(e){const{viewState:r}=e;if(r){const n=this._map;if(r.width!==n.transform.width||r.height!==n.transform.height)return n.resize(),!0}return!1}_updateViewState(e,r){if(this._internalUpdate)return!1;const n=this._map,i=this._renderTransform,{zoom:o,pitch:a,bearing:s}=i,l=n.isMoving();l&&(i.cameraElevationReference="sea");const u=Ife(i,io(io({},Pfe(n.transform)),e));if(l&&(i.cameraElevationReference="ground"),u&&r){const p=this._deferredEvents;p.move=!0,p.zoom||(p.zoom=o!==i.zoom),p.rotate||(p.rotate=s!==i.bearing),p.pitch||(p.pitch=a!==i.pitch)}return l||Ife(n.transform,e),u}_updateSettings(e,r){const n=this._map;let i=!1;for(const o of mgt)o in e&&!gp(e[o],r[o])&&(i=!0,n[`set${o[0].toUpperCase()}${o.slice(1)}`](e[o]));return i}_updateStyle(e,r){if(e.cursor!==r.cursor&&(this._map.getCanvas().style.cursor=e.cursor),e.mapStyle!==r.mapStyle){const n={diff:e.styleDiffing};return"localIdeographFontFamily"in e&&(n.localIdeographFontFamily=e.localIdeographFontFamily),this._map.setStyle(Mfe(e.mapStyle),n),!0}return!1}_updateStyleComponents(e,r){const n=this._map;let i=!1;return n.style.loaded()&&("light"in e&&!gp(e.light,r.light)&&(i=!0,n.setLight(e.light)),"fog"in e&&!gp(e.fog,r.fog)&&(i=!0,n.setFog(e.fog)),"terrain"in e&&!gp(e.terrain,r.terrain)&&(!e.terrain||n.getSource(e.terrain.source))&&(i=!0,n.setTerrain(e.terrain))),i}_updateHandlers(e,r){const n=this._map;let i=!1;for(const o of ggt){const a=e[o];gp(a,r[o])||(i=!0,a?n[o].enable(a):n[o].disable())}return i}_updateHover(e){var r;const{props:n}=this;if(n.interactiveLayerIds&&(n.onMouseMove||n.onMouseEnter||n.onMouseLeave)){const o=e.type,a=((r=this._hoveredFeatures)===null||r===void 0?void 0:r.length)>0;let s;if(o==="mousemove")try{s=this._map.queryRenderedFeatures(e.point,{layers:n.interactiveLayerIds})}catch{s=[]}else s=[];const l=s.length>0;!l&&a&&(e.type="mouseleave",this._onPointerEvent(e)),this._hoveredFeatures=s,l&&!a&&(e.type="mouseenter",this._onPointerEvent(e)),e.type=o}else this._hoveredFeatures=null}_fireEvent(e,r,n){const i=this._map,o=i.transform,a=typeof r=="string"?r:r.type;return a==="move"&&this._updateViewState(this.props,!1),a in NV&&(typeof r=="object"&&(r.viewState=Pfe(o)),this._map.isMoving())?(i.transform=this._renderTransform,e.call(i,r,n),i.transform=o,i):(e.call(i,r,n),i)}_onBeforeRepaint(){const e=this._map;this._internalUpdate=!0;for(const n in this._deferredEvents)this._deferredEvents[n]&&e.fire(n);this._internalUpdate=!1;const r=this._map.transform;this._map.transform=this._renderTransform,this._onAfterRepaint=()=>{this._map.transform=r}}}vE.savedMaps=[];function vgt(){let t=null;if(typeof location!="undefined"){const e=/access_token=([^&\/]*)/.exec(location.search);t=e&&e[1]}try{t=t||{}.MapboxAccessToken}catch{}try{t=t||{}.REACT_APP_MAPBOX_ACCESS_TOKEN}catch{}return t}const ygt=["setMaxBounds","setMinZoom","setMaxZoom","setMinPitch","setMaxPitch","setRenderWorldCopies","setProjection","setStyle","addSource","removeSource","addLayer","removeLayer","setLayerZoomRange","setFilter","setPaintProperty","setLayoutProperty","setLight","setTerrain","setFog","remove"];function xgt(t,e){if(!t)return null;const r=t.map,n={getMap:()=>r,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:i=>t.transform.locationPoint(e.LngLat.convert(i)),unproject:i=>t.transform.pointLocation(e.Point.convert(i)),queryTerrainElevation:(i,o)=>{const a=r.transform;r.transform=t.transform;const s=r.queryTerrainElevation(i,o);return r.transform=a,s}};for(const i of _gt(r))!(i in n)&&!ygt.includes(i)&&(n[i]=r[i].bind(r));return n}function _gt(t){const e=new Set;let r=t;for(;r;){for(const n of Object.getOwnPropertyNames(r))n[0]!=="_"&&typeof t[n]=="function"&&n!=="fire"&&n!=="setEventedParent"&&e.add(n);r=Object.getPrototypeOf(r)}return Array.from(e)}const bgt=typeof document!="undefined"?Y.exports.useLayoutEffect:Y.exports.useEffect,wgt=["baseApiUrl","maxParallelImageRequests","workerClass","workerCount","workerUrl"];function Cgt(t,e){for(const r of wgt)r in e&&(t[r]=e[r]);e.RTLTextPlugin&&t.getRTLTextPluginStatus&&t.getRTLTextPluginStatus()==="unavailable"&&t.setRTLTextPlugin(e.RTLTextPlugin,r=>{r&&console.error(r)},!1)}const Sb=Y.exports.createContext(null),Egt={minZoom:0,maxZoom:22,minPitch:0,maxPitch:60,scrollZoom:!0,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,touchPitch:!0,mapStyle:{version:8,sources:{},layers:[]},styleDiffing:!0,projection:"mercator",renderWorldCopies:!0,onError:t=>console.error(t.error),RTLTextPlugin:"https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-rtl-text/v0.2.3/mapbox-gl-rtl-text.js"},kfe=Y.exports.forwardRef((t,e)=>{const r=Y.exports.useContext(Tfe),[n,i]=Y.exports.useState(null),o=Y.exports.useRef(),{current:a}=Y.exports.useRef({mapLib:null,map:null});Y.exports.useEffect(()=>{const l=t.mapLib;let u=!0,p;return Promise.resolve(l||Promise.resolve().then(function(){return zgt})).then(m=>{if(!!u){if(m.Map||(m=m.default),!m||!m.Map)throw new Error("Invalid mapLib");if(m.supported(t))Cgt(m,t),t.reuseMaps&&(p=vE.reuse(t,o.current)),p||(p=new vE(m.Map,t,o.current)),a.map=xgt(p,m),a.mapLib=m,i(p),r==null||r.onMapMount(a.map,t.id);else throw new Error("Map is not supported by this browser")}}).catch(m=>{t.onError({type:"error",target:null,originalEvent:null,error:m})}),()=>{u=!1,p&&(r==null||r.onMapUnmount(t.id),t.reuseMaps?p.recycle():p.destroy())}},[]),bgt(()=>{n&&n.setProps(t)}),Y.exports.useImperativeHandle(e,()=>a.map,[n]);const s=Y.exports.useMemo(()=>io({position:"relative",width:"100%",height:"100%"},t.style),[t.style]);return Y.exports.createElement("div",{id:t.id,ref:o,style:s},n&&Y.exports.createElement(Sb.Provider,{value:a},Y.exports.createElement("div",{"mapboxgl-children":""},t.children)))});kfe.displayName="Map";kfe.defaultProps=Egt;const Sgt=/box|flex|grid|column|lineHeight|fontWeight|opacity|order|tabSize|zIndex/;function Tb(t,e){if(!t||!e)return;const r=t.style;for(const n in e){const i=e[n];Number.isFinite(i)&&!Sgt.test(n)?r[n]=`${i}px`:r[n]=i}}const Tgt={draggable:!1,popup:null,rotation:0,rotationAlignment:"auto",pitchAlignment:"auto"};function Ofe(t){const{map:e,mapLib:r}=Y.exports.useContext(Sb),n=Y.exports.useRef({props:t});n.current.props=t;const i=Y.exports.useMemo(()=>{let o=!1;Y.exports.Children.forEach(t.children,l=>{l&&(o=!0)});const a=ul(io({},t),{element:o?document.createElement("div"):null}),s=new r.Marker(a).setLngLat([t.longitude,t.latitude]);return s.getElement().addEventListener("click",l=>{var u,p;(p=(u=n.current.props).onClick)===null||p===void 0||p.call(u,{type:"click",target:s,originalEvent:l})}),s.on("dragstart",l=>{var u,p;const m=l;m.lngLat=i.getLngLat(),(p=(u=n.current.props).onDragStart)===null||p===void 0||p.call(u,m)}),s.on("drag",l=>{var u,p;const m=l;m.lngLat=i.getLngLat(),(p=(u=n.current.props).onDrag)===null||p===void 0||p.call(u,m)}),s.on("dragend",l=>{var u,p;const m=l;m.lngLat=i.getLngLat(),(p=(u=n.current.props).onDragEnd)===null||p===void 0||p.call(u,m)}),s},[]);return Y.exports.useEffect(()=>(i.addTo(e.getMap()),()=>{i.remove()}),[]),Y.exports.useEffect(()=>{Tb(i.getElement(),t.style)},[t.style]),(i.getLngLat().lng!==t.longitude||i.getLngLat().lat!==t.latitude)&&i.setLngLat([t.longitude,t.latitude]),t.offset&&!pgt(i.getOffset(),t.offset)&&i.setOffset(t.offset),i.isDraggable()!==t.draggable&&i.setDraggable(t.draggable),i.getRotation()!==t.rotation&&i.setRotation(t.rotation),i.getRotationAlignment()!==t.rotationAlignment&&i.setRotationAlignment(t.rotationAlignment),i.getPitchAlignment()!==t.pitchAlignment&&i.setPitchAlignment(t.pitchAlignment),i.getPopup()!==t.popup&&i.setPopup(t.popup),Wa.exports.createPortal(t.children,i.getElement())}Ofe.defaultProps=Tgt;Y.exports.memo(Ofe);function Lfe(t){return new Set(t?t.trim().split(/\s+/):[])}function Pgt(t){const{map:e,mapLib:r}=Y.exports.useContext(Sb),n=Y.exports.useMemo(()=>document.createElement("div"),[]),i=Y.exports.useRef({props:t});i.current.props=t;const o=Y.exports.useMemo(()=>{const a=io({},t),s=new r.Popup(a).setLngLat([t.longitude,t.latitude]);return s.once("open",l=>{var u,p;(p=(u=i.current.props).onOpen)===null||p===void 0||p.call(u,l)}),s},[]);if(Y.exports.useEffect(()=>{const a=s=>{var l,u;(u=(l=i.current.props).onClose)===null||u===void 0||u.call(l,s)};return o.on("close",a),o.setDOMContent(n).addTo(e.getMap()),()=>{o.off("close",a),o.isOpen()&&o.remove()}},[]),Y.exports.useEffect(()=>{Tb(o.getElement(),t.style)},[t.style]),o.isOpen()&&((o.getLngLat().lng!==t.longitude||o.getLngLat().lat!==t.latitude)&&o.setLngLat([t.longitude,t.latitude]),t.offset&&!gp(o.options.offset,t.offset)&&o.setOffset(t.offset),(o.options.anchor!==t.anchor||o.options.maxWidth!==t.maxWidth)&&(o.options.anchor=t.anchor,o.setMaxWidth(t.maxWidth)),o.options.className!==t.className)){const a=Lfe(o.options.className),s=Lfe(t.className);for(const l of a)s.has(l)||o.removeClassName(l);for(const l of s)a.has(l)||o.addClassName(l);o.options.className=t.className}return Wa.exports.createPortal(t.children,n)}Y.exports.memo(Pgt);function NM(t,e,r,n){const i=Y.exports.useContext(Sb),o=Y.exports.useMemo(()=>t(i),[]);return Y.exports.useEffect(()=>{const a=n||r||e,s=typeof e=="function"&&typeof r=="function"?e:null,l=typeof r=="function"?r:typeof e=="function"?e:null,{map:u}=i;return u.hasControl(o)||(u.addControl(o,a==null?void 0:a.position),s&&s(i)),()=>{l&&l(i),u.hasControl(o)&&u.removeControl(o)}},[]),o}function Igt(t){const e=NM(({mapLib:r})=>new r.AttributionControl(t),{position:t.position});return Y.exports.useEffect(()=>{Tb(e._container,t.style)},[t.style]),null}Y.exports.memo(Igt);function Mgt(t){const e=NM(({mapLib:r})=>new r.FullscreenControl({container:t.containerId&&document.getElementById(t.containerId)}),{position:t.position});return Y.exports.useEffect(()=>{Tb(e._controlContainer,t.style)},[t.style]),null}Y.exports.memo(Mgt);const Dfe=Y.exports.forwardRef((t,e)=>{const r=Y.exports.useRef({props:t}),n=NM(({mapLib:i})=>{const o=new i.GeolocateControl(t),a=o._setupUI;return o._setupUI=s=>{o._container.hasChildNodes()||a(s)},o.on("geolocate",s=>{var l,u;(u=(l=r.current.props).onGeolocate)===null||u===void 0||u.call(l,s)}),o.on("error",s=>{var l,u;(u=(l=r.current.props).onError)===null||u===void 0||u.call(l,s)}),o.on("outofmaxbounds",s=>{var l,u;(u=(l=r.current.props).onOutOfMaxBounds)===null||u===void 0||u.call(l,s)}),o.on("trackuserlocationstart",s=>{var l,u;(u=(l=r.current.props).onTrackUserLocationStart)===null||u===void 0||u.call(l,s)}),o.on("trackuserlocationend",s=>{var l,u;(u=(l=r.current.props).onTrackUserLocationEnd)===null||u===void 0||u.call(l,s)}),o},{position:t.position});return r.current.props=t,Y.exports.useImperativeHandle(e,()=>({trigger:()=>n.trigger()}),[]),Y.exports.useEffect(()=>{Tb(n._container,t.style)},[t.style]),null});Dfe.displayName="GeolocateControl";Y.exports.memo(Dfe);function Agt(t){const e=NM(({mapLib:r})=>new r.NavigationControl(t),{position:t.position});return Y.exports.useEffect(()=>{Tb(e._container,t.style)},[t.style]),null}Y.exports.memo(Agt);const Rgt={unit:"metric",maxWidth:100};function Nfe(t){const e=NM(({mapLib:r})=>new r.ScaleControl(t),{position:t.position});return(e.options.unit!==t.unit||e.options.maxWidth!==t.maxWidth)&&(e.options.maxWidth=t.maxWidth,e.setUnit(t.unit)),Y.exports.useEffect(()=>{Tb(e._container,t.style)},[t.style]),null}Nfe.defaultProps=Rgt;Y.exports.memo(Nfe);function h5(t,e){if(!t)throw new Error(e)}let kgt=0;function Ogt(t,e,r){if(t.style&&t.style._loaded){const n=io({},r);return delete n.id,delete n.children,t.addSource(e,n),t.getSource(e)}return null}function Lgt(t,e,r){h5(e.id===r.id,"source id changed"),h5(e.type===r.type,"source type changed");let n="",i=0;for(const a in e)a!=="children"&&a!=="id"&&!gp(r[a],e[a])&&(n=a,i++);if(!i)return;const o=e.type;if(o==="geojson")t.setData(e.data);else if(o==="image")t.updateImage({url:e.url,coordinates:e.coordinates});else if((o==="canvas"||o==="video")&&i===1&&n==="coordinates")t.setCoordinates(e.coordinates);else if(o==="vector"&&"setUrl"in t)switch(n){case"url":t.setUrl(e.url);break;case"tiles":t.setTiles(e.tiles);break}else console.warn(`Unable to update <Source> prop: ${n}`)}function jkt(t){const e=Y.exports.useContext(Sb).map.getMap(),r=Y.exports.useRef(t),[,n]=Y.exports.useState(0),i=Y.exports.useMemo(()=>t.id||`jsx-source-${kgt++}`,[]);Y.exports.useEffect(()=>{if(e){const a=()=>setTimeout(()=>n(s=>s+1),0);return e.on("styledata",a),a(),()=>{var s;if(e.off("styledata",a),e.style&&e.style._loaded&&e.getSource(i)){const l=(s=e.getStyle())===null||s===void 0?void 0:s.layers;if(l)for(const u of l)u.source===i&&e.removeLayer(u.id);e.removeSource(i)}}}},[e]);let o=e&&e.style&&e.getSource(i);return o?Lgt(o,t,r.current):o=Ogt(e,i,t),r.current=t,o&&Y.exports.Children.map(t.children,a=>a&&Y.exports.cloneElement(a,{source:i}))||null}function Dgt(t,e,r,n){if(h5(r.id===n.id,"layer id changed"),h5(r.type===n.type,"layer type changed"),r.type==="custom"||n.type==="custom")return;const{layout:i={},paint:o={},filter:a,minzoom:s,maxzoom:l,beforeId:u}=r;if(u!==n.beforeId&&t.moveLayer(e,u),i!==n.layout){const p=n.layout||{};for(const m in i)gp(i[m],p[m])||t.setLayoutProperty(e,m,i[m]);for(const m in p)i.hasOwnProperty(m)||t.setLayoutProperty(e,m,void 0)}if(o!==n.paint){const p=n.paint||{};for(const m in o)gp(o[m],p[m])||t.setPaintProperty(e,m,o[m]);for(const m in p)o.hasOwnProperty(m)||t.setPaintProperty(e,m,void 0)}gp(a,n.filter)||t.setFilter(e,a),(s!==n.minzoom||l!==n.maxzoom)&&t.setLayerZoomRange(e,s,l)}function Ngt(t,e,r){if(t.style&&t.style._loaded&&(!("source"in r)||t.getSource(r.source))){const n=ul(io({},r),{id:e});delete n.beforeId,t.addLayer(n,r.beforeId)}}let $gt=0;function Ukt(t){const e=Y.exports.useContext(Sb).map.getMap(),r=Y.exports.useRef(t),[,n]=Y.exports.useState(0),i=Y.exports.useMemo(()=>t.id||`jsx-layer-${$gt++}`,[]);if(Y.exports.useEffect(()=>{if(e){const a=()=>n(s=>s+1);return e.on("styledata",a),a(),()=>{e.off("styledata",a),e.style&&e.style._loaded&&e.getLayer(i)&&e.removeLayer(i)}}},[e]),e&&e.style&&e.getLayer(i))try{Dgt(e,i,t,r.current)}catch(a){console.warn(a)}else Ngt(e,i,t);return r.current=t,null}var $V={exports:{}};(function(t,e){(function(r,n){t.exports=n()})(xl,function(){var r,n,i;function o(s,l){if(!r)r=l;else if(!n)n=l;else{var u="self.onerror = function() { console.error('An error occurred while parsing the WebWorker bundle. This is most likely due to improper transpilation by Babel; please see https://docs.mapbox.com/mapbox-gl-js/guides/install/#transpiling'); }; var sharedChunk = {}; ("+r+")(sharedChunk); ("+n+")(sharedChunk); self.onerror = null;",p={};r(p),i=l(p),typeof window!="undefined"&&window&&window.URL&&window.URL.createObjectURL&&(i.workerUrl=window.URL.createObjectURL(new Blob([u],{type:"text/javascript"})))}}o(["exports"],function(s){var l=typeof self!="undefined"?self:{},u="2.15.0";let p;const m={API_URL:"https://api.mapbox.com",get API_URL_REGEX(){if(p==null){const f=/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;try{p={}.API_URL_REGEX!=null?new RegExp({}.API_URL_REGEX):f}catch{p=f}}return p},get API_TILEJSON_REGEX(){return/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/v[0-9]*\/.*\.json.*$)/i},get API_SPRITE_REGEX(){return/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/styles\/v[0-9]*\/)(.*\/sprite.*\..*$)/i},get API_FONTS_REGEX(){return/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/fonts\/v[0-9]*\/)(.*\.pbf.*$)/i},get API_STYLE_REGEX(){return/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/styles\/v[0-9]*\/)(.*$)/i},get API_CDN_URL_REGEX(){return/^((https?:)?\/\/)?api\.mapbox\.c(n|om)(\/mapbox-gl-js\/)(.*$)/i},get EVENTS_URL(){if(!m.API_URL)return null;try{const f=new URL(m.API_URL);return f.hostname==="api.mapbox.cn"?"https://events.mapbox.cn/events/v2":f.hostname==="api.mapbox.com"?"https://events.mapbox.com/events/v2":null}catch{return null}},SESSION_PATH:"/map-sessions/v1",FEEDBACK_URL:"https://apps.mapbox.com/feedback",TILE_URL_VERSION:"v4",RASTER_URL_PREFIX:"raster/v1",REQUIRE_ACCESS_TOKEN:!0,ACCESS_TOKEN:null,MAX_PARALLEL_IMAGE_REQUESTS:16},v={supported:!1,testSupport:function(f){!_&&y&&(w?C(f):x=f)}};let x,y,_=!1,w=!1;function C(f){const c=f.createTexture();f.bindTexture(f.TEXTURE_2D,c);try{if(f.texImage2D(f.TEXTURE_2D,0,f.RGBA,f.RGBA,f.UNSIGNED_BYTE,y),f.isContextLost())return;v.supported=!0}catch{}f.deleteTexture(c),_=!0}l.document&&(y=l.document.createElement("img"),y.onload=function(){x&&C(x),x=null,w=!0},y.onerror=function(){_=!0,x=null},y.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");const E="01";function T(f){return f&&f.__esModule&&Object.prototype.hasOwnProperty.call(f,"default")?f.default:f}var A=k;function k(f,c,d,g){this.cx=3*f,this.bx=3*(d-f)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*c,this.by=3*(g-c)-this.cy,this.ay=1-this.cy-this.by,this.p1x=f,this.p1y=c,this.p2x=d,this.p2y=g}k.prototype={sampleCurveX:function(f){return((this.ax*f+this.bx)*f+this.cx)*f},sampleCurveY:function(f){return((this.ay*f+this.by)*f+this.cy)*f},sampleCurveDerivativeX:function(f){return(3*this.ax*f+2*this.bx)*f+this.cx},solveCurveX:function(f,c){if(c===void 0&&(c=1e-6),f<0)return 0;if(f>1)return 1;for(var d=f,g=0;g<8;g++){var S=this.sampleCurveX(d)-f;if(Math.abs(S)<c)return d;var M=this.sampleCurveDerivativeX(d);if(Math.abs(M)<1e-6)break;d-=S/M}var L=0,V=1;for(d=f,g=0;g<20&&(S=this.sampleCurveX(d),!(Math.abs(S-f)<c));g++)f>S?L=d:V=d,d=.5*(V-L)+L;return d},solve:function(f,c){return this.sampleCurveY(this.solveCurveX(f,c))}};var X=T(A),Z=W;function W(f,c){this.x=f,this.y=c}W.prototype={clone:function(){return new W(this.x,this.y)},add:function(f){return this.clone()._add(f)},sub:function(f){return this.clone()._sub(f)},multByPoint:function(f){return this.clone()._multByPoint(f)},divByPoint:function(f){return this.clone()._divByPoint(f)},mult:function(f){return this.clone()._mult(f)},div:function(f){return this.clone()._div(f)},rotate:function(f){return this.clone()._rotate(f)},rotateAround:function(f,c){return this.clone()._rotateAround(f,c)},matMult:function(f){return this.clone()._matMult(f)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(f){return this.x===f.x&&this.y===f.y},dist:function(f){return Math.sqrt(this.distSqr(f))},distSqr:function(f){var c=f.x-this.x,d=f.y-this.y;return c*c+d*d},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(f){return Math.atan2(this.y-f.y,this.x-f.x)},angleWith:function(f){return this.angleWithSep(f.x,f.y)},angleWithSep:function(f,c){return Math.atan2(this.x*c-this.y*f,this.x*f+this.y*c)},_matMult:function(f){var c=f[2]*this.x+f[3]*this.y;return this.x=f[0]*this.x+f[1]*this.y,this.y=c,this},_add:function(f){return this.x+=f.x,this.y+=f.y,this},_sub:function(f){return this.x-=f.x,this.y-=f.y,this},_mult:function(f){return this.x*=f,this.y*=f,this},_div:function(f){return this.x/=f,this.y/=f,this},_multByPoint:function(f){return this.x*=f.x,this.y*=f.y,this},_divByPoint:function(f){return this.x/=f.x,this.y/=f.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var f=this.y;return this.y=this.x,this.x=-f,this},_rotate:function(f){var c=Math.cos(f),d=Math.sin(f),g=d*this.x+c*this.y;return this.x=c*this.x-d*this.y,this.y=g,this},_rotateAround:function(f,c){var d=Math.cos(f),g=Math.sin(f),S=c.y+g*(this.x-c.x)+d*(this.y-c.y);return this.x=c.x+d*(this.x-c.x)-g*(this.y-c.y),this.y=S,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},W.convert=function(f){return f instanceof W?f:Array.isArray(f)?new W(f[0],f[1]):f};var D=T(Z);const H=Math.PI/180,N=180/Math.PI;function j(f){return f*H}function $(f){return f*N}const z=[[0,0],[1,0],[1,1],[0,1]];function O(f){if(f<=0)return 0;if(f>=1)return 1;const c=f*f,d=c*f;return 4*(f<.5?d:3*(f-c)+d-.75)}function F(f,c,d,g){const S=new X(f,c,d,g);return function(M){return S.solve(M)}}const G=F(.25,.1,.25,1);function q(f,c,d){return Math.min(d,Math.max(c,f))}function ee(f,c,d){return(d=q((d-f)/(c-f),0,1))*d*(3-2*d)}function re(f,c,d){const g=d-c,S=((f-c)%g+g)%g+c;return S===c?d:S}function ce(f,c,d){if(!f.length)return d(null,[]);let g=f.length;const S=new Array(f.length);let M=null;f.forEach((L,V)=>{c(L,(Q,te)=>{Q&&(M=Q),S[V]=te,--g==0&&d(M,S)})})}function fe(f){const c=[];for(const d in f)c.push(f[d]);return c}function J(f,...c){for(const d of c)for(const g in d)f[g]=d[g];return f}let oe=1;function ve(){return oe++}function ye(){return function f(c){return c?(c^Math.random()*(16>>c/4)).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,f)}()}function xe(f){return f<=1?1:Math.pow(2,Math.ceil(Math.log(f)/Math.LN2))}function se(f){return!!f&&/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(f)}function me(f,c){f.forEach(d=>{c[d]&&(c[d]=c[d].bind(c))})}function pe(f,c){return f.indexOf(c,f.length-c.length)!==-1}function Ce(f,c,d){const g={};for(const S in f)g[S]=c.call(d||this,f[S],S,f);return g}function Pe(f,c,d){const g={};for(const S in f)c.call(d||this,f[S],S,f)&&(g[S]=f[S]);return g}function Re(f){return Array.isArray(f)?f.map(Re):typeof f=="object"&&f?Ce(f,Re):f}const ke={};function ze(f){ke[f]||(typeof console!="undefined"&&console.warn(f),ke[f]=!0)}function Ge(f,c,d){return(d.y-f.y)*(c.x-f.x)>(c.y-f.y)*(d.x-f.x)}function ht(f){let c=0;for(let d,g,S=0,M=f.length,L=M-1;S<M;L=S++)d=f[S],g=f[L],c+=(g.x-d.x)*(d.y+g.y);return c}function Tt(){return typeof WorkerGlobalScope!="undefined"&&typeof self!="undefined"&&self instanceof WorkerGlobalScope}function xt(f){const c={};if(f.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(d,g,S,M)=>{const L=S||M;return c[g]=!L||L.toLowerCase(),""}),c["max-age"]){const d=parseInt(c["max-age"],10);isNaN(d)?delete c["max-age"]:c["max-age"]=d}return c}let pt=null;function It(f){if(pt==null){const c=f.navigator?f.navigator.userAgent:null;pt=!!f.safari||!(!c||!(/\b(iPad|iPhone|iPod)\b/.test(c)||c.match("Safari")&&!c.match("Chrome")))}return pt}function Ie(f){try{const c=l[f];return c.setItem("_mapbox_test_",1),c.removeItem("_mapbox_test_"),!0}catch{return!1}}function de(f,c){return[f[4*c],f[4*c+1],f[4*c+2],f[4*c+3]]}const Te="mapbox-tiles";let Be=500,Ke=50,ot,Ze;function Je(){try{return l.caches}catch{}}function St(){Je()&&!ot&&(ot=l.caches.open(Te))}function er(f){const c=f.indexOf("?");if(c<0)return f;const d=function(S){const M=S.indexOf("?");return M>0?S.slice(M+1).split("&"):[]}(f),g=d.filter(S=>{const M=S.split("=");return M[0]==="language"||M[0]==="worldview"});return g.length?`${f.slice(0,c)}?${g.join("&")}`:f.slice(0,c)}let Ft=1/0;const Ut={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Image:"Image"};typeof Object.freeze=="function"&&Object.freeze(Ut);class Er extends Error{constructor(c,d,g){d===401&&Ot(g)&&(c+=": you may have provided an invalid Mapbox access token. See https://docs.mapbox.com/api/overview/#access-tokens-and-token-scopes"),super(c),this.status=d,this.url=g}toString(){return`${this.name}: ${this.message} (${this.status}): ${this.url}`}}const kr=Tt()?()=>self.worker&&self.worker.referrer:()=>(l.location.protocol==="blob:"?l.parent:l).location.href,mr=function(f,c){if(!(/^file:/.test(d=f.url)||/^file:/.test(kr())&&!/^\w+:/.test(d))){if(l.fetch&&l.Request&&l.AbortController&&l.Request.prototype.hasOwnProperty("signal"))return function(g,S){const M=new l.AbortController,L=new l.Request(g.url,{method:g.method||"GET",body:g.body,credentials:g.credentials,headers:g.headers,referrer:kr(),referrerPolicy:g.referrerPolicy,signal:M.signal});let V=!1,Q=!1;const te=(ue=L.url).indexOf("sku=")>0&&Ot(ue);var ue;g.type==="json"&&L.headers.set("Accept","application/json");const ge=(Me,Ae,Ne)=>{if(Q)return;if(Me&&Me.message!=="SecurityError"&&ze(Me.toString()),Ae&&Ne)return _e(Ae);const Qe=Date.now();l.fetch(L).then(ft=>{if(ft.ok){const Ct=te?ft.clone():null;return _e(ft,Ct,Qe)}return S(new Er(ft.statusText,ft.status,g.url))}).catch(ft=>{ft.name!=="AbortError"&&S(new Error(`${ft.message} ${g.url}`))})},_e=(Me,Ae,Ne)=>{(g.type==="arrayBuffer"?Me.arrayBuffer():g.type==="json"?Me.json():Me.text()).then(Qe=>{Q||(Ae&&Ne&&function(ft,Ct,dt){if(St(),!ot)return;const wt={status:Ct.status,statusText:Ct.statusText,headers:new l.Headers};Ct.headers.forEach((cr,sr)=>wt.headers.set(sr,cr));const Rt=xt(Ct.headers.get("Cache-Control")||"");if(Rt["no-store"])return;Rt["max-age"]&&wt.headers.set("Expires",new Date(dt+1e3*Rt["max-age"]).toUTCString());const Mt=wt.headers.get("Expires");Mt&&(new Date(Mt).getTime()-dt<42e4||function(cr,sr){if(Ze===void 0)try{new Response(new ReadableStream),Ze=!0}catch{Ze=!1}Ze?sr(cr.body):cr.blob().then(sr)}(Ct,cr=>{const sr=new l.Response(cr,wt);St(),ot&&ot.then(Cr=>Cr.put(er(ft.url),sr)).catch(Cr=>ze(Cr.message))}))}(L,Ae,Ne),V=!0,S(null,Qe,Me.headers.get("Cache-Control"),Me.headers.get("Expires")))}).catch(Qe=>{Q||S(new Error(Qe.message))})};return te?function(Me,Ae){if(St(),!ot)return Ae(null);const Ne=er(Me.url);ot.then(Qe=>{Qe.match(Ne).then(ft=>{const Ct=function(dt){if(!dt)return!1;const wt=new Date(dt.headers.get("Expires")||0),Rt=xt(dt.headers.get("Cache-Control")||"");return wt>Date.now()&&!Rt["no-cache"]}(ft);Qe.delete(Ne),Ct&&Qe.put(Ne,ft.clone()),Ae(null,ft,Ct)}).catch(Ae)}).catch(Ae)}(L,ge):ge(null,null),{cancel:()=>{Q=!0,V||M.abort()}}}(f,c);if(Tt()&&self.worker&&self.worker.actor)return self.worker.actor.send("getResource",f,c,void 0,!0)}var d;return function(g,S){const M=new l.XMLHttpRequest;M.open(g.method||"GET",g.url,!0),g.type==="arrayBuffer"&&(M.responseType="arraybuffer");for(const L in g.headers)M.setRequestHeader(L,g.headers[L]);return g.type==="json"&&(M.responseType="text",M.setRequestHeader("Accept","application/json")),M.withCredentials=g.credentials==="include",M.onerror=()=>{S(new Error(M.statusText))},M.onload=()=>{if((M.status>=200&&M.status<300||M.status===0)&&M.response!==null){let L=M.response;if(g.type==="json")try{L=JSON.parse(M.response)}catch(V){return S(V)}S(null,L,M.getResponseHeader("Cache-Control"),M.getResponseHeader("Expires"))}else S(new Er(M.statusText,M.status,g.url))},M.send(g.body),{cancel:()=>M.abort()}}(f,c)},Dt=function(f,c){return mr(J(f,{type:"arrayBuffer"}),c)};function Jr(f){const c=l.document.createElement("a");return c.href=f,c.protocol===l.document.location.protocol&&c.host===l.document.location.host}const We="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";let Oe,$e;Oe=[],$e=0;const Xe=function(f,c){if(v.supported&&(f.headers||(f.headers={}),f.headers.accept="image/webp,*/*"),$e>=m.MAX_PARALLEL_IMAGE_REQUESTS){const M={requestParameters:f,callback:c,cancelled:!1,cancel(){this.cancelled=!0}};return Oe.push(M),M}$e++;let d=!1;const g=()=>{if(!d)for(d=!0,$e--;Oe.length&&$e<m.MAX_PARALLEL_IMAGE_REQUESTS;){const M=Oe.shift(),{requestParameters:L,callback:V,cancelled:Q}=M;Q||(M.cancel=Xe(L,V).cancel)}},S=Dt(f,(M,L,V,Q)=>{g(),M?c(M):L&&(l.createImageBitmap?function(te,ue){const ge=new l.Blob([new Uint8Array(te)],{type:"image/png"});l.createImageBitmap(ge).then(_e=>{ue(null,_e)}).catch(_e=>{ue(new Error(`Could not load image because of ${_e.message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`))})}(L,(te,ue)=>c(te,ue,V,Q)):function(te,ue){const ge=new l.Image,_e=l.URL;ge.onload=()=>{ue(null,ge),_e.revokeObjectURL(ge.src),ge.onload=null,l.requestAnimationFrame(()=>{ge.src=We})},ge.onerror=()=>ue(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."));const Me=new l.Blob([new Uint8Array(te)],{type:"image/png"});ge.src=te.byteLength?_e.createObjectURL(Me):We}(L,(te,ue)=>c(te,ue,V,Q)))});return{cancel:()=>{S.cancel(),g()}}},tt="NO_ACCESS_TOKEN";function _t(f){return f.indexOf("mapbox:")===0}function Ot(f){return m.API_URL_REGEX.test(f)}function Nt(f){return m.API_CDN_URL_REGEX.test(f)}function bt(f){return m.API_STYLE_REGEX.test(f)&&!Wt(f)}function Wt(f){return m.API_SPRITE_REGEX.test(f)}const Sr=/^(\w+):\/\/([^/?]*)(\/[^?]+)?\??(.+)?/;function rr(f){const c=f.match(Sr);if(!c)throw new Error("Unable to parse URL object");return{protocol:c[1],authority:c[2],path:c[3]||"/",params:c[4]?c[4].split("&"):[]}}function tr(f){const c=f.params.length?`?${f.params.join("&")}`:"";return`${f.protocol}://${f.authority}${f.path}${c}`}const sn="mapbox.eventData";function un(f){if(!f)return null;const c=f.split(".");if(!c||c.length!==3)return null;try{return JSON.parse(decodeURIComponent(l.atob(c[1]).split("").map(d=>"%"+("00"+d.charCodeAt(0).toString(16)).slice(-2)).join("")))}catch{return null}}class Ye{constructor(c){this.type=c,this.anonId=null,this.eventData={},this.queue=[],this.pendingRequest=null}getStorageKey(c){const d=un(m.ACCESS_TOKEN);let g="";return g=d&&d.u?l.btoa(encodeURIComponent(d.u).replace(/%([0-9A-F]{2})/g,(S,M)=>String.fromCharCode(Number("0x"+M)))):m.ACCESS_TOKEN||"",c?`${sn}.${c}:${g}`:`${sn}:${g}`}fetchEventData(){const c=Ie("localStorage"),d=this.getStorageKey(),g=this.getStorageKey("uuid");if(c)try{const S=l.localStorage.getItem(d);S&&(this.eventData=JSON.parse(S));const M=l.localStorage.getItem(g);M&&(this.anonId=M)}catch{ze("Unable to read from LocalStorage")}}saveEventData(){const c=Ie("localStorage"),d=this.getStorageKey(),g=this.getStorageKey("uuid");if(c)try{l.localStorage.setItem(g,this.anonId),Object.keys(this.eventData).length>=1&&l.localStorage.setItem(d,JSON.stringify(this.eventData))}catch{ze("Unable to write to LocalStorage")}}processRequests(c){}postEvent(c,d,g,S){if(!m.EVENTS_URL)return;const M=rr(m.EVENTS_URL);M.params.push(`access_token=${S||m.ACCESS_TOKEN||""}`);const L={event:this.type,created:new Date(c).toISOString()},V=d?J(L,d):L,Q={url:tr(M),headers:{"Content-Type":"text/plain"},body:JSON.stringify([V])};this.pendingRequest=function(te,ue){return mr(J(te,{method:"POST"}),ue)}(Q,te=>{this.pendingRequest=null,g(te),this.saveEventData(),this.processRequests(S)})}queueRequest(c,d){this.queue.push(c),this.processRequests(d)}}const Ve=new class extends Ye{constructor(f){super("appUserTurnstile"),this._customAccessToken=f}postTurnstileEvent(f,c){m.EVENTS_URL&&m.ACCESS_TOKEN&&Array.isArray(f)&&f.some(d=>_t(d)||Ot(d))&&this.queueRequest(Date.now(),c)}processRequests(f){if(this.pendingRequest||this.queue.length===0)return;this.anonId&&this.eventData.lastSuccess&&this.eventData.tokenU||this.fetchEventData();const c=un(m.ACCESS_TOKEN),d=c?c.u:m.ACCESS_TOKEN;let g=d!==this.eventData.tokenU;se(this.anonId)||(this.anonId=ye(),g=!0);const S=this.queue.shift();if(this.eventData.lastSuccess){const M=new Date(this.eventData.lastSuccess),L=new Date(S),V=(S-this.eventData.lastSuccess)/864e5;g=g||V>=1||V<-1||M.getDate()!==L.getDate()}else g=!0;g?this.postEvent(S,{sdkIdentifier:"mapbox-gl-js",sdkVersion:u,skuId:E,"enabled.telemetry":!1,userId:this.anonId},M=>{M||(this.eventData.lastSuccess=S,this.eventData.tokenU=d)},f):this.processRequests()}},gt=Ve.postTurnstileEvent.bind(Ve),qt=new class extends Ye{constructor(){super("map.load"),this.success={},this.skuToken=""}postMapLoadEvent(f,c,d,g){this.skuToken=c,this.errorCb=g,m.EVENTS_URL&&(d||m.ACCESS_TOKEN?this.queueRequest({id:f,timestamp:Date.now()},d):this.errorCb(new Error(tt)))}processRequests(f){if(this.pendingRequest||this.queue.length===0)return;const{id:c,timestamp:d}=this.queue.shift();c&&this.success[c]||(this.anonId||this.fetchEventData(),se(this.anonId)||(this.anonId=ye()),this.postEvent(d,{sdkIdentifier:"mapbox-gl-js",sdkVersion:u,skuId:E,skuToken:this.skuToken,userId:this.anonId},g=>{g?this.errorCb(g):c&&(this.success[c]=!0)},f))}},Ht=qt.postMapLoadEvent.bind(qt),on=new class extends Ye{constructor(){super("gljs.performance")}postPerformanceEvent(f,c){m.EVENTS_URL&&(f||m.ACCESS_TOKEN)&&this.queueRequest({timestamp:Date.now(),performanceData:c},f)}processRequests(f){if(this.pendingRequest||this.queue.length===0)return;const{timestamp:c,performanceData:d}=this.queue.shift(),g=function(S){const M=l.performance.getEntriesByType("resource"),L=l.performance.getEntriesByType("mark"),V=function(_e){const Me={};if(_e){for(const Ae in _e)if(Ae!=="other")for(const Ne of _e[Ae]){const Qe=`${Ae}ResolveRangeMin`,ft=`${Ae}ResolveRangeMax`,Ct=`${Ae}RequestCount`,dt=`${Ae}RequestCachedCount`;Me[Qe]=Math.min(Me[Qe]||1/0,Ne.startTime),Me[ft]=Math.max(Me[ft]||-1/0,Ne.responseEnd);const wt=Rt=>{Me[Rt]===void 0&&(Me[Rt]=0),++Me[Rt]};Ne.transferSize!==void 0&&Ne.transferSize===0&&wt(dt),wt(Ct)}}return Me}(function(_e,Me){const Ae={};if(_e)for(const Ne of _e){const Qe=Me(Ne);Ae[Qe]===void 0&&(Ae[Qe]=[]),Ae[Qe].push(Ne)}return Ae}(M,Ln)),Q=l.devicePixelRatio,te=l.navigator.connection||l.navigator.mozConnection||l.navigator.webkitConnection,ue={counters:[],metadata:[],attributes:[]},ge=(_e,Me,Ae)=>{Ae!=null&&_e.push({name:Me,value:Ae.toString()})};for(const _e in V)ge(ue.counters,_e,V[_e]);if(S.interactionRange[0]!==1/0&&S.interactionRange[1]!==-1/0&&(ge(ue.counters,"interactionRangeMin",S.interactionRange[0]),ge(ue.counters,"interactionRangeMax",S.interactionRange[1])),L)for(const _e of Object.keys(Xr)){const Me=Xr[_e],Ae=L.find(Ne=>Ne.name===Me);Ae&&ge(ue.counters,Me,Ae.startTime)}return ge(ue.counters,"visibilityHidden",S.visibilityHidden),ge(ue.attributes,"style",function(_e){if(_e)for(const Me of _e){const Ae=Me.name.split("?")[0];if(bt(Ae)){const Ne=Ae.split("/").slice(-2);if(Ne.length===2)return`mapbox://styles/${Ne[0]}/${Ne[1]}`}}}(M)),ge(ue.attributes,"terrainEnabled",S.terrainEnabled?"true":"false"),ge(ue.attributes,"fogEnabled",S.fogEnabled?"true":"false"),ge(ue.attributes,"projection",S.projection),ge(ue.attributes,"zoom",S.zoom),ge(ue.metadata,"devicePixelRatio",Q),ge(ue.metadata,"connectionEffectiveType",te?te.effectiveType:void 0),ge(ue.metadata,"navigatorUserAgent",l.navigator.userAgent),ge(ue.metadata,"screenWidth",l.screen.width),ge(ue.metadata,"screenHeight",l.screen.height),ge(ue.metadata,"windowWidth",l.innerWidth),ge(ue.metadata,"windowHeight",l.innerHeight),ge(ue.metadata,"mapWidth",S.width/Q),ge(ue.metadata,"mapHeight",S.height/Q),ge(ue.metadata,"webglRenderer",S.renderer),ge(ue.metadata,"webglVendor",S.vendor),ge(ue.metadata,"sdkVersion",u),ge(ue.metadata,"sdkIdentifier","mapbox-gl-js"),ue}(d);for(const S of g.metadata);for(const S of g.counters);for(const S of g.attributes);this.postEvent(c,g,()=>{},f)}},$t=on.postPerformanceEvent.bind(on),Gt=new class extends Ye{constructor(){super("map.auth"),this.success={},this.skuToken=""}getSession(f,c,d,g){if(!m.API_URL||!m.SESSION_PATH)return;const S=rr(m.API_URL+m.SESSION_PATH);S.params.push(`sku=${c||""}`),S.params.push(`access_token=${g||m.ACCESS_TOKEN||""}`);const M={url:tr(S),headers:{"Content-Type":"text/plain"}};this.pendingRequest=function(L,V){return mr(J(L,{method:"GET"}),V)}(M,L=>{this.pendingRequest=null,d(L),this.saveEventData(),this.processRequests(g)})}getSessionAPI(f,c,d,g){this.skuToken=c,this.errorCb=g,m.SESSION_PATH&&m.API_URL&&(d||m.ACCESS_TOKEN?this.queueRequest({id:f,timestamp:Date.now()},d):this.errorCb(new Error(tt)))}processRequests(f){if(this.pendingRequest||this.queue.length===0)return;const{id:c,timestamp:d}=this.queue.shift();c&&this.success[c]||this.getSession(d,this.skuToken,g=>{g?this.errorCb(g):c&&(this.success[c]=!0)},f)}},Ir=Gt.getSessionAPI.bind(Gt),Br=new Set,Xr={create:"create",load:"load",fullLoad:"fullLoad"},Vn={mark(f){l.performance.mark(f)},measure(f,c,d){l.performance.measure(f,c,d)}};function Ln(f){const c=f.name.split("?")[0];return Nt(c)&&c.includes("mapbox-gl.js")?"javascript":Nt(c)&&c.includes("mapbox-gl.css")?"css":function(d){return m.API_FONTS_REGEX.test(d)}(c)?"fontRange":Wt(c)?"sprite":bt(c)?"style":function(d){return m.API_TILEJSON_REGEX.test(d)}(c)?"tilejson":"other"}const br=l.performance;function oi(f){const c=f?f.url.toString():void 0;return br.getEntriesByName(c)}let Gi,pi,Ds,Xo;const jo={now:()=>Ds!==void 0?Ds:l.performance.now(),setNow(f){Ds=f},restoreNow(){Ds=void 0},frame(f){const c=l.requestAnimationFrame(f);return{cancel:()=>l.cancelAnimationFrame(c)}},getImageData(f,c=0){const{width:d,height:g}=f;Xo||(Xo=l.document.createElement("canvas"));const S=Xo.getContext("2d",{willReadFrequently:!0});if(!S)throw new Error("failed to create canvas 2d context");return(d>Xo.width||g>Xo.height)&&(Xo.width=d,Xo.height=g),S.clearRect(-c,-c,d+2*c,g+2*c),S.drawImage(f,0,0,d,g),S.getImageData(-c,-c,d+2*c,g+2*c)},resolveURL:f=>(Gi||(Gi=l.document.createElement("a")),Gi.href=f,Gi.href),get devicePixelRatio(){return l.devicePixelRatio},get prefersReducedMotion(){return!!l.matchMedia&&(pi==null&&(pi=l.matchMedia("(prefers-reduced-motion: reduce)")),pi.matches)}};function Qa(f,c,d){d[f]&&d[f].indexOf(c)!==-1||(d[f]=d[f]||[],d[f].push(c))}function za(f,c,d){if(d&&d[f]){const g=d[f].indexOf(c);g!==-1&&d[f].splice(g,1)}}class es{constructor(c,d={}){J(this,d),this.type=c}}class Pi extends es{constructor(c,d={}){super("error",J({error:c},d))}}class Ns{on(c,d){return this._listeners=this._listeners||{},Qa(c,d,this._listeners),this}off(c,d){return za(c,d,this._listeners),za(c,d,this._oneTimeListeners),this}once(c,d){return d?(this._oneTimeListeners=this._oneTimeListeners||{},Qa(c,d,this._oneTimeListeners),this):new Promise(g=>this.once(c,g))}fire(c,d){typeof c=="string"&&(c=new es(c,d||{}));const g=c.type;if(this.listens(g)){c.target=this;const S=this._listeners&&this._listeners[g]?this._listeners[g].slice():[];for(const V of S)V.call(this,c);const M=this._oneTimeListeners&&this._oneTimeListeners[g]?this._oneTimeListeners[g].slice():[];for(const V of M)za(g,V,this._oneTimeListeners),V.call(this,c);const L=this._eventedParent;L&&(J(c,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),L.fire(c))}else c instanceof Pi&&console.error(c.error);return this}listens(c){return!!(this._listeners&&this._listeners[c]&&this._listeners[c].length>0||this._oneTimeListeners&&this._oneTimeListeners[c]&&this._oneTimeListeners[c].length>0||this._eventedParent&&this._eventedParent.listens(c))}setEventedParent(c,d){return this._eventedParent=c,this._eventedParentData=d,this}}var dr=JSON.parse('{"$version":8,"$root":{"version":{"required":true,"type":"enum","values":[8]},"name":{"type":"string"},"metadata":{"type":"*"},"center":{"type":"array","value":"number"},"zoom":{"type":"number"},"bearing":{"type":"number","default":0,"period":360,"units":"degrees"},"pitch":{"type":"number","default":0,"units":"degrees"},"light":{"type":"light"},"terrain":{"type":"terrain"},"fog":{"type":"fog"},"sources":{"required":true,"type":"sources"},"sprite":{"type":"string"},"glyphs":{"type":"string"},"transition":{"type":"transition"},"projection":{"type":"projection"},"layers":{"required":true,"type":"array","value":"layer"}},"sources":{"*":{"type":"source"}},"source":["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],"source_vector":{"type":{"required":true,"type":"enum","values":{"vector":{}}},"url":{"type":"string"},"tiles":{"type":"array","value":"string"},"bounds":{"type":"array","value":"number","length":4,"default":[-180,-85.051129,180,85.051129]},"scheme":{"type":"enum","values":{"xyz":{},"tms":{}},"default":"xyz"},"minzoom":{"type":"number","default":0},"maxzoom":{"type":"number","default":22},"attribution":{"type":"string"},"promoteId":{"type":"promoteId"},"volatile":{"type":"boolean","default":false},"*":{"type":"*"}},"source_raster":{"type":{"required":true,"type":"enum","values":{"raster":{}}},"url":{"type":"string"},"tiles":{"type":"array","value":"string"},"bounds":{"type":"array","value":"number","length":4,"default":[-180,-85.051129,180,85.051129]},"minzoom":{"type":"number","default":0},"maxzoom":{"type":"number","default":22},"tileSize":{"type":"number","default":512,"units":"pixels"},"scheme":{"type":"enum","values":{"xyz":{},"tms":{}},"default":"xyz"},"attribution":{"type":"string"},"volatile":{"type":"boolean","default":false},"*":{"type":"*"}},"source_raster_dem":{"type":{"required":true,"type":"enum","values":{"raster-dem":{}}},"url":{"type":"string"},"tiles":{"type":"array","value":"string"},"bounds":{"type":"array","value":"number","length":4,"default":[-180,-85.051129,180,85.051129]},"minzoom":{"type":"number","default":0},"maxzoom":{"type":"number","default":22},"tileSize":{"type":"number","default":512,"units":"pixels"},"attribution":{"type":"string"},"encoding":{"type":"enum","values":{"terrarium":{},"mapbox":{}},"default":"mapbox"},"volatile":{"type":"boolean","default":false},"*":{"type":"*"}},"source_geojson":{"type":{"required":true,"type":"enum","values":{"geojson":{}}},"data":{"type":"*"},"maxzoom":{"type":"number","default":18},"attribution":{"type":"string"},"buffer":{"type":"number","default":128,"maximum":512,"minimum":0},"filter":{"type":"*"},"tolerance":{"type":"number","default":0.375},"cluster":{"type":"boolean","default":false},"clusterRadius":{"type":"number","default":50,"minimum":0},"clusterMaxZoom":{"type":"number"},"clusterMinPoints":{"type":"number"},"clusterProperties":{"type":"*"},"lineMetrics":{"type":"boolean","default":false},"generateId":{"type":"boolean","default":false},"promoteId":{"type":"promoteId"}},"source_video":{"type":{"required":true,"type":"enum","values":{"video":{}}},"urls":{"required":true,"type":"array","value":"string"},"coordinates":{"required":true,"type":"array","length":4,"value":{"type":"array","length":2,"value":"number"}}},"source_image":{"type":{"required":true,"type":"enum","values":{"image":{}}},"url":{"required":true,"type":"string"},"coordinates":{"required":true,"type":"array","length":4,"value":{"type":"array","length":2,"value":"number"}}},"layer":{"id":{"type":"string","required":true},"type":{"type":"enum","values":{"fill":{},"line":{},"symbol":{},"circle":{},"heatmap":{},"fill-extrusion":{},"raster":{},"hillshade":{},"background":{},"sky":{}},"required":true},"metadata":{"type":"*"},"source":{"type":"string"},"source-layer":{"type":"string"},"minzoom":{"type":"number","minimum":0,"maximum":24},"maxzoom":{"type":"number","minimum":0,"maximum":24},"filter":{"type":"filter"},"layout":{"type":"layout"},"paint":{"type":"paint"}},"layout":["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background","layout_sky"],"layout_background":{"visibility":{"type":"enum","values":{"visible":{},"none":{}},"default":"visible","property-type":"constant"}},"layout_sky":{"visibility":{"type":"enum","values":{"visible":{},"none":{}},"default":"visible","property-type":"constant"}},"layout_fill":{"fill-sort-key":{"type":"number","expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"visibility":{"type":"enum","values":{"visible":{},"none":{}},"default":"visible","property-type":"constant"}},"layout_circle":{"circle-sort-key":{"type":"number","expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"visibility":{"type":"enum","values":{"visible":{},"none":{}},"default":"visible","property-type":"constant"}},"layout_heatmap":{"visibility":{"type":"enum","values":{"visible":{},"none":{}},"default":"visible","property-type":"constant"}},"layout_fill-extrusion":{"visibility":{"type":"enum","values":{"visible":{},"none":{}},"default":"visible","property-type":"constant"},"fill-extrusion-edge-radius":{"type":"number","private":true,"default":0,"minimum":0,"maximum":1,"property-type":"constant"}},"layout_line":{"line-cap":{"type":"enum","values":{"butt":{},"round":{},"square":{}},"default":"butt","expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"line-join":{"type":"enum","values":{"bevel":{},"round":{},"miter":{}},"default":"miter","expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{"type":"number","default":2,"requires":[{"line-join":"miter"}],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"line-round-limit":{"type":"number","default":1.05,"requires":[{"line-join":"round"}],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"line-sort-key":{"type":"number","expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"visibility":{"type":"enum","values":{"visible":{},"none":{}},"default":"visible","property-type":"constant"}},"layout_symbol":{"symbol-placement":{"type":"enum","values":{"point":{},"line":{},"line-center":{}},"default":"point","expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"symbol-spacing":{"type":"number","default":250,"minimum":1,"units":"pixels","requires":[{"symbol-placement":"line"}],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{"type":"boolean","default":false,"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{"type":"number","expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{"type":"enum","values":{"auto":{},"viewport-y":{},"source":{}},"default":"auto","expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{"type":"boolean","default":false,"requires":["icon-image"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{"type":"boolean","default":false,"requires":["icon-image"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"icon-optional":{"type":"boolean","default":false,"requires":["icon-image","text-field"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{"type":"enum","values":{"map":{},"viewport":{},"auto":{}},"default":"auto","requires":["icon-image"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"icon-size":{"type":"number","default":1,"minimum":0,"units":"factor of the original icon size","requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{"type":"enum","values":{"none":{},"width":{},"height":{},"both":{}},"default":"none","requires":["icon-image","text-field"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{"type":"array","value":"number","length":4,"default":[0,0,0,0],"units":"pixels","requires":["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"icon-image":{"type":"resolvedImage","tokens":true,"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{"type":"number","default":0,"period":360,"units":"degrees","requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{"type":"number","default":2,"minimum":0,"units":"pixels","requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{"type":"boolean","default":false,"requires":["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"icon-offset":{"type":"array","value":"number","length":2,"default":[0,0],"requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{"type":"enum","values":{"center":{},"left":{},"right":{},"top":{},"bottom":{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},"default":"center","requires":["icon-image"],"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{"type":"enum","values":{"map":{},"viewport":{},"auto":{}},"default":"auto","requires":["icon-image"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{"type":"enum","values":{"map":{},"viewport":{},"auto":{}},"default":"auto","requires":["text-field"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{"type":"enum","values":{"map":{},"viewport":{},"auto":{}},"default":"auto","requires":["text-field"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-field":{"type":"formatted","default":"","tokens":true,"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-font":{"type":"array","value":"string","default":["Open Sans Regular","Arial Unicode MS Regular"],"requires":["text-field"],"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-size":{"type":"number","default":16,"minimum":0,"units":"pixels","requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{"type":"number","default":10,"minimum":0,"units":"ems","requires":["text-field",{"symbol-placement":["point"]}],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{"type":"number","default":1.2,"units":"ems","requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-letter-spacing":{"type":"number","default":0,"units":"ems","requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-justify":{"type":"enum","values":{"auto":{},"left":{},"center":{},"right":{}},"default":"center","requires":["text-field"],"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{"type":"number","units":"ems","default":0,"requires":["text-field"],"property-type":"data-driven","expression":{"interpolated":true,"parameters":["zoom","feature"]}},"text-variable-anchor":{"type":"array","value":"enum","values":{"center":{},"left":{},"right":{},"top":{},"bottom":{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},"requires":["text-field",{"symbol-placement":["point"]}],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-anchor":{"type":"enum","values":{"center":{},"left":{},"right":{},"top":{},"bottom":{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},"default":"center","requires":["text-field",{"!":"text-variable-anchor"}],"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{"type":"number","default":45,"units":"degrees","requires":["text-field",{"symbol-placement":["line","line-center"]}],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"text-writing-mode":{"type":"array","value":"enum","values":{"horizontal":{},"vertical":{}},"requires":["text-field"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-rotate":{"type":"number","default":0,"period":360,"units":"degrees","requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-padding":{"type":"number","default":2,"minimum":0,"units":"pixels","requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"text-keep-upright":{"type":"boolean","default":true,"requires":["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-transform":{"type":"enum","values":{"none":{},"uppercase":{},"lowercase":{}},"default":"none","requires":["text-field"],"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-offset":{"type":"array","value":"number","units":"ems","length":2,"default":[0,0],"requires":["text-field",{"!":"text-radial-offset"}],"expression":{"interpolated":true,"parameters":["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{"type":"boolean","default":false,"requires":["text-field"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{"type":"boolean","default":false,"requires":["text-field"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-optional":{"type":"boolean","default":false,"requires":["text-field","icon-image"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"visibility":{"type":"enum","values":{"visible":{},"none":{}},"default":"visible","property-type":"constant"}},"layout_raster":{"visibility":{"type":"enum","values":{"visible":{},"none":{}},"default":"visible","property-type":"constant"}},"layout_hillshade":{"visibility":{"type":"enum","values":{"visible":{},"none":{}},"default":"visible","property-type":"constant"}},"filter":{"type":"array","value":"*"},"filter_symbol":{"type":"boolean","default":false,"transition":false,"property-type":"data-driven","expression":{"interpolated":false,"parameters":["zoom","feature","pitch","distance-from-center"]}},"filter_fill":{"type":"boolean","default":false,"transition":false,"property-type":"data-driven","expression":{"interpolated":false,"parameters":["zoom","feature"]}},"filter_line":{"type":"boolean","default":false,"transition":false,"property-type":"data-driven","expression":{"interpolated":false,"parameters":["zoom","feature"]}},"filter_circle":{"type":"boolean","default":false,"transition":false,"property-type":"data-driven","expression":{"interpolated":false,"parameters":["zoom","feature"]}},"filter_fill-extrusion":{"type":"boolean","default":false,"transition":false,"property-type":"data-driven","expression":{"interpolated":false,"parameters":["zoom","feature"]}},"filter_heatmap":{"type":"boolean","default":false,"transition":false,"property-type":"data-driven","expression":{"interpolated":false,"parameters":["zoom","feature"]}},"filter_operator":{"type":"enum","values":{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},"in":{},"!in":{},"all":{},"any":{},"none":{},"has":{},"!has":{},"within":{}}},"geometry_type":{"type":"enum","values":{"Point":{},"LineString":{},"Polygon":{}}},"function":{"expression":{"type":"expression"},"stops":{"type":"array","value":"function_stop"},"base":{"type":"number","default":1,"minimum":0},"property":{"type":"string","default":"$zoom"},"type":{"type":"enum","values":{"identity":{},"exponential":{},"interval":{},"categorical":{}},"default":"exponential"},"colorSpace":{"type":"enum","values":{"rgb":{},"lab":{},"hcl":{}},"default":"rgb"},"default":{"type":"*","required":false}},"function_stop":{"type":"array","minimum":0,"maximum":24,"value":["number","color"],"length":2},"expression":{"type":"array","value":"*","minimum":1},"fog":{"range":{"type":"array","default":[0.5,10],"minimum":-20,"maximum":20,"length":2,"value":"number","property-type":"data-constant","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"color":{"type":"color","property-type":"data-constant","default":"#ffffff","expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"high-color":{"type":"color","property-type":"data-constant","default":"#245cdf","expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"space-color":{"type":"color","property-type":"data-constant","default":["interpolate",["linear"],["zoom"],4,"#010b19",7,"#367ab9"],"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"horizon-blend":{"type":"number","property-type":"data-constant","default":["interpolate",["linear"],["zoom"],4,0.2,7,0.1],"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"star-intensity":{"type":"number","property-type":"data-constant","default":["interpolate",["linear"],["zoom"],5,0.35,6,0],"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true}},"light":{"anchor":{"type":"enum","default":"viewport","values":{"map":{},"viewport":{}},"property-type":"data-constant","transition":false,"expression":{"interpolated":false,"parameters":["zoom"]}},"position":{"type":"array","default":[1.15,210,30],"length":3,"value":"number","property-type":"data-constant","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]}},"color":{"type":"color","property-type":"data-constant","default":"#ffffff","expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"intensity":{"type":"number","property-type":"data-constant","default":0.5,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true}},"projection":{"name":{"type":"enum","values":{"albers":{},"equalEarth":{},"equirectangular":{},"lambertConformalConic":{},"mercator":{},"naturalEarth":{},"winkelTripel":{},"globe":{}},"default":"mercator","required":true},"center":{"type":"array","length":2,"value":"number","property-type":"data-constant","minimum":[-180,-90],"maximum":[180,90],"transition":false,"requires":[{"name":["albers","lambertConformalConic"]}]},"parallels":{"type":"array","length":2,"value":"number","property-type":"data-constant","minimum":[-90,-90],"maximum":[90,90],"transition":false,"requires":[{"name":["albers","lambertConformalConic"]}]}},"terrain":{"source":{"type":"string","required":true},"exaggeration":{"type":"number","property-type":"data-constant","default":1,"minimum":0,"maximum":1000,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true,"requires":["source"]}},"paint":["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background","paint_sky"],"paint_fill":{"fill-antialias":{"type":"boolean","default":true,"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"fill-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{"type":"color","default":"#000000","transition":true,"requires":[{"!":"fill-pattern"}],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{"type":"color","transition":true,"requires":[{"!":"fill-pattern"},{"fill-antialias":true}],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{"type":"enum","values":{"map":{},"viewport":{}},"default":"map","requires":["fill-translate"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"fill-pattern":{"type":"resolvedImage","transition":false,"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{"type":"color","default":"#000000","transition":true,"requires":[{"!":"fill-extrusion-pattern"}],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{"type":"enum","values":{"map":{},"viewport":{}},"default":"map","requires":["fill-extrusion-translate"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{"type":"resolvedImage","transition":false,"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"fill-extrusion-height":{"type":"number","default":0,"minimum":0,"units":"meters","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{"type":"number","default":0,"minimum":0,"units":"meters","transition":true,"requires":["fill-extrusion-height"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{"type":"boolean","default":true,"transition":false,"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"fill-extrusion-ambient-occlusion-intensity":{"property-type":"data-constant","type":"number","private":true,"default":0,"minimum":0,"maximum":1,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true},"fill-extrusion-ambient-occlusion-radius":{"property-type":"data-constant","type":"number","private":true,"default":3,"minimum":0,"expression":{"interpolated":true,"parameters":["zoom"]},"transition":true,"requires":["fill-extrusion-edge-radius"]},"fill-extrusion-rounded-roof":{"type":"boolean","default":true,"requires":["fill-extrusion-edge-radius"],"transition":false,"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"}},"paint_line":{"line-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{"type":"color","default":"#000000","transition":true,"requires":[{"!":"line-pattern"}],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{"type":"enum","values":{"map":{},"viewport":{}},"default":"map","requires":["line-translate"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"line-width":{"type":"number","default":1,"minimum":0,"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{"type":"number","default":0,"minimum":0,"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{"type":"number","default":0,"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{"type":"number","default":0,"minimum":0,"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{"type":"array","value":"number","minimum":0,"transition":false,"units":"line widths","requires":[{"!":"line-pattern"}],"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"line-pattern":{"type":"resolvedImage","transition":false,"expression":{"interpolated":false,"parameters":["zoom","feature"]},"property-type":"data-driven"},"line-gradient":{"type":"color","transition":false,"requires":[{"!":"line-pattern"},{"source":"geojson","has":{"lineMetrics":true}}],"expression":{"interpolated":true,"parameters":["line-progress"]},"property-type":"color-ramp"},"line-trim-offset":{"type":"array","value":"number","length":2,"default":[0,0],"minimum":[0,0],"maximum":[1,1],"transition":false,"requires":[{"source":"geojson","has":{"lineMetrics":true}}],"property-type":"constant"}},"paint_circle":{"circle-radius":{"type":"number","default":5,"minimum":0,"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{"type":"number","default":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{"type":"enum","values":{"map":{},"viewport":{}},"default":"map","requires":["circle-translate"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{"type":"enum","values":{"map":{},"viewport":{}},"default":"map","expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{"type":"enum","values":{"map":{},"viewport":{}},"default":"viewport","expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{"type":"number","default":0,"minimum":0,"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"}},"paint_heatmap":{"heatmap-radius":{"type":"number","default":30,"minimum":1,"transition":true,"units":"pixels","expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{"type":"number","default":1,"minimum":0,"transition":false,"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{"type":"number","default":1,"minimum":0,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"heatmap-color":{"type":"color","default":["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",0.1,"royalblue",0.3,"cyan",0.5,"lime",0.7,"yellow",1,"red"],"transition":false,"expression":{"interpolated":true,"parameters":["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"}},"paint_symbol":{"icon-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{"type":"color","default":"#000000","transition":true,"requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{"type":"color","default":"rgba(0, 0, 0, 0)","transition":true,"requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{"type":"number","default":0,"minimum":0,"transition":true,"units":"pixels","requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{"type":"number","default":0,"minimum":0,"transition":true,"units":"pixels","requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"units":"pixels","requires":["icon-image"],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{"type":"enum","values":{"map":{},"viewport":{}},"default":"map","requires":["icon-image","icon-translate"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"text-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{"type":"color","default":"#000000","transition":true,"overridable":true,"requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{"type":"color","default":"rgba(0, 0, 0, 0)","transition":true,"requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{"type":"number","default":0,"minimum":0,"transition":true,"units":"pixels","requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{"type":"number","default":0,"minimum":0,"transition":true,"units":"pixels","requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{"type":"array","value":"number","length":2,"default":[0,0],"transition":true,"units":"pixels","requires":["text-field"],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{"type":"enum","values":{"map":{},"viewport":{}},"default":"map","requires":["text-field","text-translate"],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"}},"paint_raster":{"raster-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{"type":"number","default":0,"period":360,"transition":true,"units":"degrees","expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{"type":"number","default":0,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-saturation":{"type":"number","default":0,"minimum":-1,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-contrast":{"type":"number","default":0,"minimum":-1,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"raster-resampling":{"type":"enum","values":{"linear":{},"nearest":{}},"default":"linear","expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{"type":"number","default":300,"minimum":0,"transition":false,"units":"milliseconds","expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"}},"paint_hillshade":{"hillshade-illumination-direction":{"type":"number","default":335,"minimum":0,"maximum":359,"transition":false,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{"type":"enum","values":{"map":{},"viewport":{}},"default":"viewport","expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{"type":"number","default":0.5,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{"type":"color","default":"#FFFFFF","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{"type":"color","default":"#000000","transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"}},"paint_background":{"background-color":{"type":"color","default":"#000000","transition":true,"requires":[{"!":"background-pattern"}],"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"},"background-pattern":{"type":"resolvedImage","transition":false,"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"background-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"}},"paint_sky":{"sky-type":{"type":"enum","values":{"gradient":{},"atmosphere":{}},"default":"atmosphere","expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"sky-atmosphere-sun":{"type":"array","value":"number","length":2,"units":"degrees","minimum":[0,0],"maximum":[360,180],"transition":false,"requires":[{"sky-type":"atmosphere"}],"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"sky-atmosphere-sun-intensity":{"type":"number","requires":[{"sky-type":"atmosphere"}],"default":10,"minimum":0,"maximum":100,"transition":false,"property-type":"data-constant"},"sky-gradient-center":{"type":"array","requires":[{"sky-type":"gradient"}],"value":"number","default":[0,0],"length":2,"units":"degrees","minimum":[0,0],"maximum":[360,180],"transition":false,"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"sky-gradient-radius":{"type":"number","requires":[{"sky-type":"gradient"}],"default":90,"minimum":0,"maximum":180,"transition":false,"expression":{"interpolated":false,"parameters":["zoom"]},"property-type":"data-constant"},"sky-gradient":{"type":"color","default":["interpolate",["linear"],["sky-radial-progress"],0.8,"#87ceeb",1,"white"],"transition":false,"requires":[{"sky-type":"gradient"}],"expression":{"interpolated":true,"parameters":["sky-radial-progress"]},"property-type":"color-ramp"},"sky-atmosphere-halo-color":{"type":"color","default":"white","transition":false,"requires":[{"sky-type":"atmosphere"}],"property-type":"data-constant"},"sky-atmosphere-color":{"type":"color","default":"white","transition":false,"requires":[{"sky-type":"atmosphere"}],"property-type":"data-constant"},"sky-opacity":{"type":"number","default":1,"minimum":0,"maximum":1,"transition":true,"expression":{"interpolated":true,"parameters":["zoom"]},"property-type":"data-constant"}},"transition":{"duration":{"type":"number","default":300,"minimum":0,"units":"milliseconds"},"delay":{"type":"number","default":0,"minimum":0,"units":"milliseconds"}},"property-type":{"data-driven":{"type":"property-type"},"color-ramp":{"type":"property-type"},"data-constant":{"type":"property-type"},"constant":{"type":"property-type"}},"promoteId":{"*":{"type":"string"}}}');function Oi(f,...c){for(const d of c)for(const g in d)f[g]=d[g];return f}function Li(f){return f instanceof Number||f instanceof String||f instanceof Boolean?f.valueOf():f}function ho(f){if(Array.isArray(f))return f.map(ho);if(f instanceof Object&&!(f instanceof Number||f instanceof String||f instanceof Boolean)){const c={};for(const d in f)c[d]=ho(f[d]);return c}return Li(f)}class qs extends Error{constructor(c,d){super(d),this.message=d,this.key=c}}var fn=qs;class an{constructor(c,d=[]){this.parent=c,this.bindings={};for(const[g,S]of d)this.bindings[g]=S}concat(c){return new an(this,c)}get(c){if(this.bindings[c])return this.bindings[c];if(this.parent)return this.parent.get(c);throw new Error(`${c} not found in scope.`)}has(c){return!!this.bindings[c]||!!this.parent&&this.parent.has(c)}}var Dr=an;const Rn={kind:"null"},zr={kind:"number"},Fn={kind:"string"},Tn={kind:"boolean"},ls={kind:"color"},Uo={kind:"object"},ri={kind:"value"},$s={kind:"collator"},le={kind:"formatted"},Se={kind:"resolvedImage"};function Ue(f,c){return{kind:"array",itemType:f,N:c}}function Et(f){if(f.kind==="array"){const c=Et(f.itemType);return typeof f.N=="number"?`array<${c}, ${f.N}>`:f.itemType.kind==="value"?"array":`array<${c}>`}return f.kind}const qe=[Rn,zr,Fn,Tn,ls,le,Uo,Ue(ri),Se];function et(f,c){if(c.kind==="error")return null;if(f.kind==="array"){if(c.kind==="array"&&(c.N===0&&c.itemType.kind==="value"||!et(f.itemType,c.itemType))&&(typeof f.N!="number"||f.N===c.N))return null}else{if(f.kind===c.kind)return null;if(f.kind==="value"){for(const d of qe)if(!et(d,c))return null}}return`Expected ${Et(f)} but found ${Et(c)} instead.`}function ct(f,c){return c.some(d=>d.kind===f.kind)}function jt(f,c){return c.some(d=>d==="null"?f===null:d==="array"?Array.isArray(f):d==="object"?f&&!Array.isArray(f)&&typeof f=="object":d===typeof f)}var Xt,pr={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],rebeccapurple:[102,51,153,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function zt(f){return(f=Math.round(f))<0?0:f>255?255:f}function Hr(f){return zt(f[f.length-1]==="%"?parseFloat(f)/100*255:parseInt(f))}function Zr(f){return(c=f[f.length-1]==="%"?parseFloat(f)/100:parseFloat(f))<0?0:c>1?1:c;var c}function hn(f,c,d){return d<0?d+=1:d>1&&(d-=1),6*d<1?f+(c-f)*d*6:2*d<1?c:3*d<2?f+(c-f)*(2/3-d)*6:f}try{Xt={}.parseCSSColor=function(f){var c,d=f.replace(/ /g,"").toLowerCase();if(d in pr)return pr[d].slice();if(d[0]==="#")return d.length===4?(c=parseInt(d.substr(1),16))>=0&&c<=4095?[(3840&c)>>4|(3840&c)>>8,240&c|(240&c)>>4,15&c|(15&c)<<4,1]:null:d.length===7&&(c=parseInt(d.substr(1),16))>=0&&c<=16777215?[(16711680&c)>>16,(65280&c)>>8,255&c,1]:null;var g=d.indexOf("("),S=d.indexOf(")");if(g!==-1&&S+1===d.length){var M=d.substr(0,g),L=d.substr(g+1,S-(g+1)).split(","),V=1;switch(M){case"rgba":if(L.length!==4)return null;V=Zr(L.pop());case"rgb":return L.length!==3?null:[Hr(L[0]),Hr(L[1]),Hr(L[2]),V];case"hsla":if(L.length!==4)return null;V=Zr(L.pop());case"hsl":if(L.length!==3)return null;var Q=(parseFloat(L[0])%360+360)%360/360,te=Zr(L[1]),ue=Zr(L[2]),ge=ue<=.5?ue*(te+1):ue+te-ue*te,_e=2*ue-ge;return[zt(255*hn(_e,ge,Q+1/3)),zt(255*hn(_e,ge,Q)),zt(255*hn(_e,ge,Q-1/3)),V];default:return null}}return null}}catch{}class gn{constructor(c,d,g,S=1){this.r=c,this.g=d,this.b=g,this.a=S}static parse(c){if(!c)return;if(c instanceof gn)return c;if(typeof c!="string")return;const d=Xt(c);return d?new gn(d[0]/255*d[3],d[1]/255*d[3],d[2]/255*d[3],d[3]):void 0}toString(){const[c,d,g,S]=this.toArray();return`rgba(${Math.round(c)},${Math.round(d)},${Math.round(g)},${S})`}toArray(){const{r:c,g:d,b:g,a:S}=this;return S===0?[0,0,0,0]:[255*c/S,255*d/S,255*g/S,S]}toArray01(){const{r:c,g:d,b:g,a:S}=this;return S===0?[0,0,0,0]:[c/S,d/S,g/S,S]}toArray01PremultipliedAlpha(){const{r:c,g:d,b:g,a:S}=this;return[c,d,g,S]}}gn.black=new gn(0,0,0,1),gn.white=new gn(1,1,1,1),gn.transparent=new gn(0,0,0,0),gn.red=new gn(1,0,0,1),gn.blue=new gn(0,0,1,1);var Bn=gn;class wr{constructor(c,d,g){this.sensitivity=c?d?"variant":"case":d?"accent":"base",this.locale=g,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(c,d){return this.collator.compare(c,d)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class pn{constructor(c,d,g,S,M){this.text=c.normalize?c.normalize():c,this.image=d,this.scale=g,this.fontStack=S,this.textColor=M}}class ci{constructor(c){this.sections=c}static fromString(c){return new ci([new pn(c,null,null,null,null)])}isEmpty(){return this.sections.length===0||!this.sections.some(c=>c.text.length!==0||c.image&&c.image.name.length!==0)}static factory(c){return c instanceof ci?c:ci.fromString(c)}toString(){return this.sections.length===0?"":this.sections.map(c=>c.text).join("")}serialize(){const c=["format"];for(const d of this.sections){if(d.image){c.push(["image",d.image.name]);continue}c.push(d.text);const g={};d.fontStack&&(g["text-font"]=["literal",d.fontStack.split(",")]),d.scale&&(g["font-scale"]=d.scale),d.textColor&&(g["text-color"]=["rgba"].concat(d.textColor.toArray())),c.push(g)}return c}}class fi{constructor(c){this.name=c.name,this.available=c.available}toString(){return this.name}static fromString(c){return c?new fi({name:c,available:!1}):null}serialize(){return["image",this.name]}}function Lo(f,c,d,g){return typeof f=="number"&&f>=0&&f<=255&&typeof c=="number"&&c>=0&&c<=255&&typeof d=="number"&&d>=0&&d<=255?g===void 0||typeof g=="number"&&g>=0&&g<=1?null:`Invalid rgba value [${[f,c,d,g].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof g=="number"?[f,c,d,g]:[f,c,d]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function On(f){if(f===null||typeof f=="string"||typeof f=="boolean"||typeof f=="number"||f instanceof Bn||f instanceof wr||f instanceof ci||f instanceof fi)return!0;if(Array.isArray(f)){for(const c of f)if(!On(c))return!1;return!0}if(typeof f=="object"){for(const c in f)if(!On(f[c]))return!1;return!0}return!1}function ao(f){if(f===null)return Rn;if(typeof f=="string")return Fn;if(typeof f=="boolean")return Tn;if(typeof f=="number")return zr;if(f instanceof Bn)return ls;if(f instanceof wr)return $s;if(f instanceof ci)return le;if(f instanceof fi)return Se;if(Array.isArray(f)){const c=f.length;let d;for(const g of f){const S=ao(g);if(d){if(d===S)continue;d=ri;break}d=S}return Ue(d||ri,c)}return Uo}function Ja(f){const c=typeof f;return f===null?"":c==="string"||c==="number"||c==="boolean"?String(f):f instanceof Bn||f instanceof ci||f instanceof fi?f.toString():JSON.stringify(f)}class $i{constructor(c,d){this.type=c,this.value=d}static parse(c,d){if(c.length!==2)return d.error(`'literal' expression requires exactly one argument, but found ${c.length-1} instead.`);if(!On(c[1]))return d.error("invalid value");const g=c[1];let S=ao(g);const M=d.expectedType;return S.kind!=="array"||S.N!==0||!M||M.kind!=="array"||typeof M.N=="number"&&M.N!==0||(S=M),new $i(S,g)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}serialize(){return this.type.kind==="array"||this.type.kind==="object"?["literal",this.value]:this.value instanceof Bn?["rgba"].concat(this.value.toArray()):this.value instanceof ci?this.value.serialize():this.value}}var _i=$i,Hn=class{constructor(f){this.name="ExpressionEvaluationError",this.message=f}toJSON(){return this.message}};const wf={string:Fn,number:zr,boolean:Tn,object:Uo};class yd{constructor(c,d){this.type=c,this.args=d}static parse(c,d){if(c.length<2)return d.error("Expected at least one argument.");let g,S=1;const M=c[0];if(M==="array"){let V,Q;if(c.length>2){const te=c[1];if(typeof te!="string"||!(te in wf)||te==="object")return d.error('The item type argument of "array" must be one of string, number, boolean',1);V=wf[te],S++}else V=ri;if(c.length>3){if(c[2]!==null&&(typeof c[2]!="number"||c[2]<0||c[2]!==Math.floor(c[2])))return d.error('The length argument to "array" must be a positive integer literal',2);Q=c[2],S++}g=Ue(V,Q)}else g=wf[M];const L=[];for(;S<c.length;S++){const V=d.parse(c[S],S,ri);if(!V)return null;L.push(V)}return new yd(g,L)}evaluate(c){for(let d=0;d<this.args.length;d++){const g=this.args[d].evaluate(c);if(!et(this.type,ao(g)))return g;if(d===this.args.length-1)throw new Hn(`Expected value to be of type ${Et(this.type)}, but found ${Et(ao(g))} instead.`)}return null}eachChild(c){this.args.forEach(c)}outputDefined(){return this.args.every(c=>c.outputDefined())}serialize(){const c=this.type,d=[c.kind];if(c.kind==="array"){const g=c.itemType;if(g.kind==="string"||g.kind==="number"||g.kind==="boolean"){d.push(g.kind);const S=c.N;(typeof S=="number"||this.args.length>1)&&d.push(S)}}return d.concat(this.args.map(g=>g.serialize()))}}var ba=yd;class ju{constructor(c){this.type=le,this.sections=c}static parse(c,d){if(c.length<2)return d.error("Expected at least one argument.");const g=c[1];if(!Array.isArray(g)&&typeof g=="object")return d.error("First argument must be an image or text section.");const S=[];let M=!1;for(let L=1;L<=c.length-1;++L){const V=c[L];if(M&&typeof V=="object"&&!Array.isArray(V)){M=!1;let Q=null;if(V["font-scale"]&&(Q=d.parse(V["font-scale"],1,zr),!Q))return null;let te=null;if(V["text-font"]&&(te=d.parse(V["text-font"],1,Ue(Fn)),!te))return null;let ue=null;if(V["text-color"]&&(ue=d.parse(V["text-color"],1,ls),!ue))return null;const ge=S[S.length-1];ge.scale=Q,ge.font=te,ge.textColor=ue}else{const Q=d.parse(c[L],1,ri);if(!Q)return null;const te=Q.type.kind;if(te!=="string"&&te!=="value"&&te!=="null"&&te!=="resolvedImage")return d.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");M=!0,S.push({content:Q,scale:null,font:null,textColor:null})}}return new ju(S)}evaluate(c){return new ci(this.sections.map(d=>{const g=d.content.evaluate(c);return ao(g)===Se?new pn("",g,null,null,null):new pn(Ja(g),null,d.scale?d.scale.evaluate(c):null,d.font?d.font.evaluate(c).join(","):null,d.textColor?d.textColor.evaluate(c):null)}))}eachChild(c){for(const d of this.sections)c(d.content),d.scale&&c(d.scale),d.font&&c(d.font),d.textColor&&c(d.textColor)}outputDefined(){return!1}serialize(){const c=["format"];for(const d of this.sections){c.push(d.content.serialize());const g={};d.scale&&(g["font-scale"]=d.scale.serialize()),d.font&&(g["text-font"]=d.font.serialize()),d.textColor&&(g["text-color"]=d.textColor.serialize()),c.push(g)}return c}}class $p{constructor(c){this.type=Se,this.input=c}static parse(c,d){if(c.length!==2)return d.error("Expected two arguments.");const g=d.parse(c[1],1,Fn);return g?new $p(g):d.error("No image name provided.")}evaluate(c){const d=this.input.evaluate(c),g=fi.fromString(d);return g&&c.availableImages&&(g.available=c.availableImages.indexOf(d)>-1),g}eachChild(c){c(this.input)}outputDefined(){return!1}serialize(){return["image",this.input.serialize()]}}const A_={"to-boolean":Tn,"to-color":ls,"to-number":zr,"to-string":Fn};class Fp{constructor(c,d){this.type=c,this.args=d}static parse(c,d){if(c.length<2)return d.error("Expected at least one argument.");const g=c[0];if((g==="to-boolean"||g==="to-string")&&c.length!==2)return d.error("Expected one argument.");const S=A_[g],M=[];for(let L=1;L<c.length;L++){const V=d.parse(c[L],L,ri);if(!V)return null;M.push(V)}return new Fp(S,M)}evaluate(c){if(this.type.kind==="boolean")return Boolean(this.args[0].evaluate(c));if(this.type.kind==="color"){let d,g;for(const S of this.args){if(d=S.evaluate(c),g=null,d instanceof Bn)return d;if(typeof d=="string"){const M=c.parseColor(d);if(M)return M}else if(Array.isArray(d)&&(g=d.length<3||d.length>4?`Invalid rbga value ${JSON.stringify(d)}: expected an array containing either three or four numeric values.`:Lo(d[0],d[1],d[2],d[3]),!g))return new Bn(d[0]/255,d[1]/255,d[2]/255,d[3])}throw new Hn(g||`Could not parse color from value '${typeof d=="string"?d:String(JSON.stringify(d))}'`)}if(this.type.kind==="number"){let d=null;for(const g of this.args){if(d=g.evaluate(c),d===null)return 0;const S=Number(d);if(!isNaN(S))return S}throw new Hn(`Could not convert ${JSON.stringify(d)} to number.`)}return this.type.kind==="formatted"?ci.fromString(Ja(this.args[0].evaluate(c))):this.type.kind==="resolvedImage"?fi.fromString(Ja(this.args[0].evaluate(c))):Ja(this.args[0].evaluate(c))}eachChild(c){this.args.forEach(c)}outputDefined(){return this.args.every(c=>c.outputDefined())}serialize(){if(this.type.kind==="formatted")return new ju([{content:this.args[0],scale:null,font:null,textColor:null}]).serialize();if(this.type.kind==="resolvedImage")return new $p(this.args[0]).serialize();const c=[`to-${this.type.kind}`];return this.eachChild(d=>{c.push(d.serialize())}),c}}var Uu=Fp;const Yo=["Unknown","Point","LineString","Polygon"];var Eh=class{constructor(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null,this.featureTileCoord=null,this.featureDistanceData=null}id(){return this.feature&&this.feature.id!==void 0?this.feature.id:null}geometryType(){return this.feature?typeof this.feature.type=="number"?Yo[this.feature.type]:this.feature.type:null}geometry(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null}canonicalID(){return this.canonical}properties(){return this.feature&&this.feature.properties||{}}distanceFromCenter(){if(this.featureTileCoord&&this.featureDistanceData){const f=this.featureDistanceData.center,c=this.featureDistanceData.scale,{x:d,y:g}=this.featureTileCoord;return this.featureDistanceData.bearing[0]*(d*c-f[0])+this.featureDistanceData.bearing[1]*(g*c-f[1])}return 0}parseColor(f){let c=this._parseColorCache[f];return c||(c=this._parseColorCache[f]=Bn.parse(f)),c}};class Gl{constructor(c,d,g,S){this.name=c,this.type=d,this._evaluate=g,this.args=S}evaluate(c){return this._evaluate(c,this.args)}eachChild(c){this.args.forEach(c)}outputDefined(){return!1}serialize(){return[this.name].concat(this.args.map(c=>c.serialize()))}static parse(c,d){const g=c[0],S=Gl.definitions[g];if(!S)return d.error(`Unknown expression "${g}". If you wanted a literal array, use ["literal", [...]].`,0);const M=Array.isArray(S)?S[0]:S.type,L=Array.isArray(S)?[[S[1],S[2]]]:S.overloads,V=L.filter(([te])=>!Array.isArray(te)||te.length===c.length-1);let Q=null;for(const[te,ue]of V){Q=new Ed(d.registry,d.path,null,d.scope);const ge=[];let _e=!1;for(let Me=1;Me<c.length;Me++){const Ae=c[Me],Ne=Array.isArray(te)?te[Me-1]:te.type,Qe=Q.parse(Ae,1+ge.length,Ne);if(!Qe){_e=!0;break}ge.push(Qe)}if(!_e)if(Array.isArray(te)&&te.length!==ge.length)Q.error(`Expected ${te.length} arguments, but found ${ge.length} instead.`);else{for(let Me=0;Me<ge.length;Me++){const Ae=Array.isArray(te)?te[Me]:te.type,Ne=ge[Me];Q.concat(Me+1).checkSubtype(Ae,Ne.type)}if(Q.errors.length===0)return new Gl(g,M,ue,ge)}}if(V.length===1)d.errors.push(...Q.errors);else{const te=(V.length?V:L).map(([ge])=>{return _e=ge,Array.isArray(_e)?`(${_e.map(Et).join(", ")})`:`(${Et(_e.type)}...)`;var _e}).join(" | "),ue=[];for(let ge=1;ge<c.length;ge++){const _e=d.parse(c[ge],1+ue.length);if(!_e)return null;ue.push(Et(_e.type))}d.error(`Expected arguments of type ${te}, but found (${ue.join(", ")}) instead.`)}return null}static register(c,d){Gl.definitions=d;for(const g in d)c[g]=Gl}}var el=Gl;class Cf{constructor(c,d,g){this.type=$s,this.locale=g,this.caseSensitive=c,this.diacriticSensitive=d}static parse(c,d){if(c.length!==2)return d.error("Expected one argument.");const g=c[1];if(typeof g!="object"||Array.isArray(g))return d.error("Collator options argument must be an object.");const S=d.parse(g["case-sensitive"]!==void 0&&g["case-sensitive"],1,Tn);if(!S)return null;const M=d.parse(g["diacritic-sensitive"]!==void 0&&g["diacritic-sensitive"],1,Tn);if(!M)return null;let L=null;return g.locale&&(L=d.parse(g.locale,1,Fn),!L)?null:new Cf(S,M,L)}evaluate(c){return new wr(this.caseSensitive.evaluate(c),this.diacriticSensitive.evaluate(c),this.locale?this.locale.evaluate(c):null)}eachChild(c){c(this.caseSensitive),c(this.diacriticSensitive),this.locale&&c(this.locale)}outputDefined(){return!1}serialize(){const c={};return c["case-sensitive"]=this.caseSensitive.serialize(),c["diacritic-sensitive"]=this.diacriticSensitive.serialize(),this.locale&&(c.locale=this.locale.serialize()),["collator",c]}}const Xs=8192;function zp(f,c){f[0]=Math.min(f[0],c[0]),f[1]=Math.min(f[1],c[1]),f[2]=Math.max(f[2],c[0]),f[3]=Math.max(f[3],c[1])}function Vu(f,c){return!(f[0]<=c[0]||f[2]>=c[2]||f[1]<=c[1]||f[3]>=c[3])}function ru(f,c){const d=(180+f[0])/360,g=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+f[1]*Math.PI/360)))/360,S=Math.pow(2,c.z);return[Math.round(d*S*Xs),Math.round(g*S*Xs)]}function Bp(f,c,d){const g=f[0]-c[0],S=f[1]-c[1],M=f[0]-d[0],L=f[1]-d[1];return g*L-M*S==0&&g*M<=0&&S*L<=0}function xd(f,c){let d=!1;for(let L=0,V=c.length;L<V;L++){const Q=c[L];for(let te=0,ue=Q.length;te<ue-1;te++){if(Bp(f,Q[te],Q[te+1]))return!1;(S=Q[te])[1]>(g=f)[1]!=(M=Q[te+1])[1]>g[1]&&g[0]<(M[0]-S[0])*(g[1]-S[1])/(M[1]-S[1])+S[0]&&(d=!d)}}var g,S,M;return d}function Sh(f,c){for(let d=0;d<c.length;d++)if(xd(f,c[d]))return!0;return!1}function sa(f,c,d,g){const S=g[0]-d[0],M=g[1]-d[1],L=(f[0]-d[0])*M-S*(f[1]-d[1]),V=(c[0]-d[0])*M-S*(c[1]-d[1]);return L>0&&V<0||L<0&&V>0}function Th(f,c,d){for(const te of d)for(let ue=0;ue<te.length-1;++ue)if((V=[(L=te[ue+1])[0]-(M=te[ue])[0],L[1]-M[1]])[0]*(Q=[(S=c)[0]-(g=f)[0],S[1]-g[1]])[1]-V[1]*Q[0]!=0&&sa(g,S,M,L)&&sa(M,L,g,S))return!0;var g,S,M,L,V,Q;return!1}function gi(f,c){for(let d=0;d<f.length;++d)if(!xd(f[d],c))return!1;for(let d=0;d<f.length-1;++d)if(Th(f[d],f[d+1],c))return!1;return!0}function R_(f,c){for(let d=0;d<c.length;d++)if(gi(f,c[d]))return!0;return!1}function tg(f,c,d){const g=[];for(let S=0;S<f.length;S++){const M=[];for(let L=0;L<f[S].length;L++){const V=ru(f[S][L],d);zp(c,V),M.push(V)}g.push(M)}return g}function Hu(f,c,d){const g=[];for(let S=0;S<f.length;S++){const M=tg(f[S],c,d);g.push(M)}return g}function _d(f,c,d,g){if(f[0]<d[0]||f[0]>d[2]){const S=.5*g;let M=f[0]-d[0]>S?-g:d[0]-f[0]>S?g:0;M===0&&(M=f[0]-d[2]>S?-g:d[2]-f[0]>S?g:0),f[0]+=M}zp(c,f)}function Ph(f,c,d,g){const S=Math.pow(2,g.z)*Xs,M=[g.x*Xs,g.y*Xs],L=[];if(!f)return L;for(const V of f)for(const Q of V){const te=[Q.x+M[0],Q.y+M[1]];_d(te,c,d,S),L.push(te)}return L}function po(f,c,d,g){const S=Math.pow(2,g.z)*Xs,M=[g.x*Xs,g.y*Xs],L=[];if(!f)return L;for(const Q of f){const te=[];for(const ue of Q){const ge=[ue.x+M[0],ue.y+M[1]];zp(c,ge),te.push(ge)}L.push(te)}if(c[2]-c[0]<=S/2){(V=c)[0]=V[1]=1/0,V[2]=V[3]=-1/0;for(const Q of L)for(const te of Q)_d(te,c,d,S)}var V;return L}class Fs{constructor(c,d){this.type=Tn,this.geojson=c,this.geometries=d}static parse(c,d){if(c.length!==2)return d.error(`'within' expression requires exactly one argument, but found ${c.length-1} instead.`);if(On(c[1])){const g=c[1];if(g.type==="FeatureCollection")for(let S=0;S<g.features.length;++S){const M=g.features[S].geometry.type;if(M==="Polygon"||M==="MultiPolygon")return new Fs(g,g.features[S].geometry)}else if(g.type==="Feature"){const S=g.geometry.type;if(S==="Polygon"||S==="MultiPolygon")return new Fs(g,g.geometry)}else if(g.type==="Polygon"||g.type==="MultiPolygon")return new Fs(g,g)}return d.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(c){if(c.geometry()!=null&&c.canonicalID()!=null){if(c.geometryType()==="Point")return function(d,g){const S=[1/0,1/0,-1/0,-1/0],M=[1/0,1/0,-1/0,-1/0],L=d.canonicalID();if(!L)return!1;if(g.type==="Polygon"){const V=tg(g.coordinates,M,L),Q=Ph(d.geometry(),S,M,L);if(!Vu(S,M))return!1;for(const te of Q)if(!xd(te,V))return!1}if(g.type==="MultiPolygon"){const V=Hu(g.coordinates,M,L),Q=Ph(d.geometry(),S,M,L);if(!Vu(S,M))return!1;for(const te of Q)if(!Sh(te,V))return!1}return!0}(c,this.geometries);if(c.geometryType()==="LineString")return function(d,g){const S=[1/0,1/0,-1/0,-1/0],M=[1/0,1/0,-1/0,-1/0],L=d.canonicalID();if(!L)return!1;if(g.type==="Polygon"){const V=tg(g.coordinates,M,L),Q=po(d.geometry(),S,M,L);if(!Vu(S,M))return!1;for(const te of Q)if(!gi(te,V))return!1}if(g.type==="MultiPolygon"){const V=Hu(g.coordinates,M,L),Q=po(d.geometry(),S,M,L);if(!Vu(S,M))return!1;for(const te of Q)if(!R_(te,V))return!1}return!0}(c,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}serialize(){return["within",this.geojson]}}var lc=Fs;function Wu(f){if(f instanceof el&&(f.name==="get"&&f.args.length===1||f.name==="feature-state"||f.name==="has"&&f.args.length===1||f.name==="properties"||f.name==="geometry-type"||f.name==="id"||/^filter-/.test(f.name))||f instanceof lc)return!1;let c=!0;return f.eachChild(d=>{c&&!Wu(d)&&(c=!1)}),c}function wa(f){if(f instanceof el&&f.name==="feature-state")return!1;let c=!0;return f.eachChild(d=>{c&&!wa(d)&&(c=!1)}),c}function bd(f,c){if(f instanceof el&&c.indexOf(f.name)>=0)return!1;let d=!0;return f.eachChild(g=>{d&&!bd(g,c)&&(d=!1)}),d}class wd{constructor(c,d){this.type=d.type,this.name=c,this.boundExpression=d}static parse(c,d){if(c.length!==2||typeof c[1]!="string")return d.error("'var' expression requires exactly one string literal argument.");const g=c[1];return d.scope.has(g)?new wd(g,d.scope.get(g)):d.error(`Unknown variable "${g}". Make sure "${g}" has been bound in an enclosing "let" expression before using it.`,1)}evaluate(c){return this.boundExpression.evaluate(c)}eachChild(){}outputDefined(){return!1}serialize(){return["var",this.name]}}var Ih=wd;class Cd{constructor(c,d=[],g,S=new Dr,M=[]){this.registry=c,this.path=d,this.key=d.map(L=>`[${L}]`).join(""),this.scope=S,this.errors=M,this.expectedType=g}parse(c,d,g,S,M={}){return d?this.concat(d,g,S)._parse(c,M):this._parse(c,M)}_parse(c,d){function g(S,M,L){return L==="assert"?new ba(M,[S]):L==="coerce"?new Uu(M,[S]):S}if(c!==null&&typeof c!="string"&&typeof c!="boolean"&&typeof c!="number"||(c=["literal",c]),Array.isArray(c)){if(c.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');const S=c[0];if(typeof S!="string")return this.error(`Expression name must be a string, but found ${typeof S} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;const M=this.registry[S];if(M){let L=M.parse(c,this);if(!L)return null;if(this.expectedType){const V=this.expectedType,Q=L.type;if(V.kind!=="string"&&V.kind!=="number"&&V.kind!=="boolean"&&V.kind!=="object"&&V.kind!=="array"||Q.kind!=="value")if(V.kind!=="color"&&V.kind!=="formatted"&&V.kind!=="resolvedImage"||Q.kind!=="value"&&Q.kind!=="string"){if(this.checkSubtype(V,Q))return null}else L=g(L,V,d.typeAnnotation||"coerce");else L=g(L,V,d.typeAnnotation||"assert")}if(!(L instanceof _i)&&L.type.kind!=="resolvedImage"&&Ef(L)){const V=new Eh;try{L=new _i(L.type,L.evaluate(V))}catch(Q){return this.error(Q.message),null}}return L}return this.error(`Unknown expression "${S}". If you wanted a literal array, use ["literal", [...]].`,0)}return this.error(c===void 0?"'undefined' value invalid. Use null instead.":typeof c=="object"?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof c} instead.`)}concat(c,d,g){const S=typeof c=="number"?this.path.concat(c):this.path,M=g?this.scope.concat(g):this.scope;return new Cd(this.registry,S,d||null,M,this.errors)}error(c,...d){const g=`${this.key}${d.map(S=>`[${S}]`).join("")}`;this.errors.push(new fn(g,c))}checkSubtype(c,d){const g=et(c,d);return g&&this.error(g),g}}var Ed=Cd;function Ef(f){if(f instanceof Ih)return Ef(f.boundExpression);if(f instanceof el&&f.name==="error"||f instanceof Cf||f instanceof lc)return!1;const c=f instanceof Uu||f instanceof ba;let d=!0;return f.eachChild(g=>{d=c?d&&Ef(g):d&&g instanceof _i}),!!d&&Wu(f)&&bd(f,["zoom","heatmap-density","line-progress","sky-radial-progress","accumulated","is-supported-script","pitch","distance-from-center"])}function rg(f,c){const d=f.length-1;let g,S,M=0,L=d,V=0;for(;M<=L;)if(V=Math.floor((M+L)/2),g=f[V],S=f[V+1],g<=c){if(V===d||c<S)return V;M=V+1}else{if(!(g>c))throw new Hn("Input is not a number.");L=V-1}return 0}class Mh{constructor(c,d,g){this.type=c,this.input=d,this.labels=[],this.outputs=[];for(const[S,M]of g)this.labels.push(S),this.outputs.push(M)}static parse(c,d){if(c.length-1<4)return d.error(`Expected at least 4 arguments, but found only ${c.length-1}.`);if((c.length-1)%2!=0)return d.error("Expected an even number of arguments.");const g=d.parse(c[1],1,zr);if(!g)return null;const S=[];let M=null;d.expectedType&&d.expectedType.kind!=="value"&&(M=d.expectedType);for(let L=1;L<c.length;L+=2){const V=L===1?-1/0:c[L],Q=c[L+1],te=L,ue=L+1;if(typeof V!="number")return d.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',te);if(S.length&&S[S.length-1][0]>=V)return d.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',te);const ge=d.parse(Q,ue,M);if(!ge)return null;M=M||ge.type,S.push([V,ge])}return new Mh(M,g,S)}evaluate(c){const d=this.labels,g=this.outputs;if(d.length===1)return g[0].evaluate(c);const S=this.input.evaluate(c);if(S<=d[0])return g[0].evaluate(c);const M=d.length;return S>=d[M-1]?g[M-1].evaluate(c):g[rg(d,S)].evaluate(c)}eachChild(c){c(this.input);for(const d of this.outputs)c(d)}outputDefined(){return this.outputs.every(c=>c.outputDefined())}serialize(){const c=["step",this.input.serialize()];for(let d=0;d<this.labels.length;d++)d>0&&c.push(this.labels[d]),c.push(this.outputs[d].serialize());return c}}var jp=Mh;function Ii(f,c,d){return f*(1-d)+c*d}var cc=Object.freeze({__proto__:null,array:function(f,c,d){return f.map((g,S)=>Ii(g,c[S],d))},color:function(f,c,d){return new Bn(Ii(f.r,c.r,d),Ii(f.g,c.g,d),Ii(f.b,c.b,d),Ii(f.a,c.a,d))},number:Ii});const Ev=.95047,nu=1.08883,ng=4/29,gl=6/29,ig=3*gl*gl,a0=gl*gl*gl,tl=Math.PI/180,Up=180/Math.PI;function Sf(f){return f>a0?Math.pow(f,1/3):f/ig+ng}function Vp(f){return f>gl?f*f*f:ig*(f-ng)}function Hp(f){return 255*(f<=.0031308?12.92*f:1.055*Math.pow(f,1/2.4)-.055)}function Tf(f){return(f/=255)<=.04045?f/12.92:Math.pow((f+.055)/1.055,2.4)}function Sv(f){const c=Tf(f.r),d=Tf(f.g),g=Tf(f.b),S=Sf((.4124564*c+.3575761*d+.1804375*g)/Ev),M=Sf((.2126729*c+.7151522*d+.072175*g)/1);return{l:116*M-16,a:500*(S-M),b:200*(M-Sf((.0193339*c+.119192*d+.9503041*g)/nu)),alpha:f.a}}function l0(f){let c=(f.l+16)/116,d=isNaN(f.a)?c:c+f.a/500,g=isNaN(f.b)?c:c-f.b/200;return c=1*Vp(c),d=Ev*Vp(d),g=nu*Vp(g),new Bn(Hp(3.2404542*d-1.5371385*c-.4985314*g),Hp(-.969266*d+1.8760108*c+.041556*g),Hp(.0556434*d-.2040259*c+1.0572252*g),f.alpha)}function Jt(f,c,d){const g=c-f;return f+d*(g>180||g<-180?g-360*Math.round(g/360):g)}const yr={forward:Sv,reverse:l0,interpolate:function(f,c,d){return{l:Ii(f.l,c.l,d),a:Ii(f.a,c.a,d),b:Ii(f.b,c.b,d),alpha:Ii(f.alpha,c.alpha,d)}}},dn={forward:function(f){const{l:c,a:d,b:g}=Sv(f),S=Math.atan2(g,d)*Up;return{h:S<0?S+360:S,c:Math.sqrt(d*d+g*g),l:c,alpha:f.a}},reverse:function(f){const c=f.h*tl,d=f.c;return l0({l:f.l,a:Math.cos(c)*d,b:Math.sin(c)*d,alpha:f.alpha})},interpolate:function(f,c,d){return{h:Jt(f.h,c.h,d),c:Ii(f.c,c.c,d),l:Ii(f.l,c.l,d),alpha:Ii(f.alpha,c.alpha,d)}}};var Wn=Object.freeze({__proto__:null,hcl:dn,lab:yr});class Do{constructor(c,d,g,S,M){this.type=c,this.operator=d,this.interpolation=g,this.input=S,this.labels=[],this.outputs=[];for(const[L,V]of M)this.labels.push(L),this.outputs.push(V)}static interpolationFactor(c,d,g,S){let M=0;if(c.name==="exponential")M=Di(d,c.base,g,S);else if(c.name==="linear")M=Di(d,1,g,S);else if(c.name==="cubic-bezier"){const L=c.controlPoints;M=new X(L[0],L[1],L[2],L[3]).solve(Di(d,1,g,S))}return M}static parse(c,d){let[g,S,M,...L]=c;if(!Array.isArray(S)||S.length===0)return d.error("Expected an interpolation type expression.",1);if(S[0]==="linear")S={name:"linear"};else if(S[0]==="exponential"){const te=S[1];if(typeof te!="number")return d.error("Exponential interpolation requires a numeric base.",1,1);S={name:"exponential",base:te}}else{if(S[0]!=="cubic-bezier")return d.error(`Unknown interpolation type ${String(S[0])}`,1,0);{const te=S.slice(1);if(te.length!==4||te.some(ue=>typeof ue!="number"||ue<0||ue>1))return d.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);S={name:"cubic-bezier",controlPoints:te}}}if(c.length-1<4)return d.error(`Expected at least 4 arguments, but found only ${c.length-1}.`);if((c.length-1)%2!=0)return d.error("Expected an even number of arguments.");if(M=d.parse(M,2,zr),!M)return null;const V=[];let Q=null;g==="interpolate-hcl"||g==="interpolate-lab"?Q=ls:d.expectedType&&d.expectedType.kind!=="value"&&(Q=d.expectedType);for(let te=0;te<L.length;te+=2){const ue=L[te],ge=L[te+1],_e=te+3,Me=te+4;if(typeof ue!="number")return d.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',_e);if(V.length&&V[V.length-1][0]>=ue)return d.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',_e);const Ae=d.parse(ge,Me,Q);if(!Ae)return null;Q=Q||Ae.type,V.push([ue,Ae])}return Q.kind==="number"||Q.kind==="color"||Q.kind==="array"&&Q.itemType.kind==="number"&&typeof Q.N=="number"?new Do(Q,g,S,M,V):d.error(`Type ${Et(Q)} is not interpolatable.`)}evaluate(c){const d=this.labels,g=this.outputs;if(d.length===1)return g[0].evaluate(c);const S=this.input.evaluate(c);if(S<=d[0])return g[0].evaluate(c);const M=d.length;if(S>=d[M-1])return g[M-1].evaluate(c);const L=rg(d,S),V=Do.interpolationFactor(this.interpolation,S,d[L],d[L+1]),Q=g[L].evaluate(c),te=g[L+1].evaluate(c);return this.operator==="interpolate"?cc[this.type.kind.toLowerCase()](Q,te,V):this.operator==="interpolate-hcl"?dn.reverse(dn.interpolate(dn.forward(Q),dn.forward(te),V)):yr.reverse(yr.interpolate(yr.forward(Q),yr.forward(te),V))}eachChild(c){c(this.input);for(const d of this.outputs)c(d)}outputDefined(){return this.outputs.every(c=>c.outputDefined())}serialize(){let c;c=this.interpolation.name==="linear"?["linear"]:this.interpolation.name==="exponential"?this.interpolation.base===1?["linear"]:["exponential",this.interpolation.base]:["cubic-bezier"].concat(this.interpolation.controlPoints);const d=[this.operator,c,this.input.serialize()];for(let g=0;g<this.labels.length;g++)d.push(this.labels[g],this.outputs[g].serialize());return d}}function Di(f,c,d,g){const S=g-d,M=f-d;return S===0?0:c===1?M/S:(Math.pow(c,M)-1)/(Math.pow(c,S)-1)}var mo=Do;class Io{constructor(c,d){this.type=c,this.args=d}static parse(c,d){if(c.length<2)return d.error("Expectected at least one argument.");let g=null;const S=d.expectedType;S&&S.kind!=="value"&&(g=S);const M=[];for(const V of c.slice(1)){const Q=d.parse(V,1+M.length,g,void 0,{typeAnnotation:"omit"});if(!Q)return null;g=g||Q.type,M.push(Q)}const L=S&&M.some(V=>et(S,V.type));return new Io(L?ri:g,M)}evaluate(c){let d,g=null,S=0;for(const M of this.args){if(S++,g=M.evaluate(c),g&&g instanceof fi&&!g.available&&(d||(d=g),g=null,S===this.args.length))return d;if(g!==null)break}return g}eachChild(c){this.args.forEach(c)}outputDefined(){return this.args.every(c=>c.outputDefined())}serialize(){const c=["coalesce"];return this.eachChild(d=>{c.push(d.serialize())}),c}}var rl=Io;class Ps{constructor(c,d){this.type=d.type,this.bindings=[].concat(c),this.result=d}evaluate(c){return this.result.evaluate(c)}eachChild(c){for(const d of this.bindings)c(d[1]);c(this.result)}static parse(c,d){if(c.length<4)return d.error(`Expected at least 3 arguments, but found ${c.length-1} instead.`);const g=[];for(let M=1;M<c.length-1;M+=2){const L=c[M];if(typeof L!="string")return d.error(`Expected string, but found ${typeof L} instead.`,M);if(/[^a-zA-Z0-9_]/.test(L))return d.error("Variable names must contain only alphanumeric characters or '_'.",M);const V=d.parse(c[M+1],M+1);if(!V)return null;g.push([L,V])}const S=d.parse(c[c.length-1],c.length-1,d.expectedType,g);return S?new Ps(g,S):null}outputDefined(){return this.result.outputDefined()}serialize(){const c=["let"];for(const[d,g]of this.bindings)c.push(d,g.serialize());return c.push(this.result.serialize()),c}}var Ys=Ps;class uc{constructor(c,d,g){this.type=c,this.index=d,this.input=g}static parse(c,d){if(c.length!==3)return d.error(`Expected 2 arguments, but found ${c.length-1} instead.`);const g=d.parse(c[1],1,zr),S=d.parse(c[2],2,Ue(d.expectedType||ri));return g&&S?new uc(S.type.itemType,g,S):null}evaluate(c){const d=this.index.evaluate(c),g=this.input.evaluate(c);if(d<0)throw new Hn(`Array index out of bounds: ${d} < 0.`);if(d>=g.length)throw new Hn(`Array index out of bounds: ${d} > ${g.length-1}.`);if(d!==Math.floor(d))throw new Hn(`Array index must be an integer, but found ${d} instead.`);return g[d]}eachChild(c){c(this.index),c(this.input)}outputDefined(){return!1}serialize(){return["at",this.index.serialize(),this.input.serialize()]}}var Tl=uc;class Ko{constructor(c,d){this.type=Tn,this.needle=c,this.haystack=d}static parse(c,d){if(c.length!==3)return d.error(`Expected 2 arguments, but found ${c.length-1} instead.`);const g=d.parse(c[1],1,ri),S=d.parse(c[2],2,ri);return g&&S?ct(g.type,[Tn,Fn,zr,Rn,ri])?new Ko(g,S):d.error(`Expected first argument to be of type boolean, string, number or null, but found ${Et(g.type)} instead`):null}evaluate(c){const d=this.needle.evaluate(c),g=this.haystack.evaluate(c);if(g==null)return!1;if(!jt(d,["boolean","string","number","null"]))throw new Hn(`Expected first argument to be of type boolean, string, number or null, but found ${Et(ao(d))} instead.`);if(!jt(g,["string","array"]))throw new Hn(`Expected second argument to be of type array or string, but found ${Et(ao(g))} instead.`);return g.indexOf(d)>=0}eachChild(c){c(this.needle),c(this.haystack)}outputDefined(){return!0}serialize(){return["in",this.needle.serialize(),this.haystack.serialize()]}}var ql=Ko;class iu{constructor(c,d,g){this.type=zr,this.needle=c,this.haystack=d,this.fromIndex=g}static parse(c,d){if(c.length<=2||c.length>=5)return d.error(`Expected 3 or 4 arguments, but found ${c.length-1} instead.`);const g=d.parse(c[1],1,ri),S=d.parse(c[2],2,ri);if(!g||!S)return null;if(!ct(g.type,[Tn,Fn,zr,Rn,ri]))return d.error(`Expected first argument to be of type boolean, string, number or null, but found ${Et(g.type)} instead`);if(c.length===4){const M=d.parse(c[3],3,zr);return M?new iu(g,S,M):null}return new iu(g,S)}evaluate(c){const d=this.needle.evaluate(c),g=this.haystack.evaluate(c);if(!jt(d,["boolean","string","number","null"]))throw new Hn(`Expected first argument to be of type boolean, string, number or null, but found ${Et(ao(d))} instead.`);if(!jt(g,["string","array"]))throw new Hn(`Expected second argument to be of type array or string, but found ${Et(ao(g))} instead.`);if(this.fromIndex){const S=this.fromIndex.evaluate(c);return g.indexOf(d,S)}return g.indexOf(d)}eachChild(c){c(this.needle),c(this.haystack),this.fromIndex&&c(this.fromIndex)}outputDefined(){return!1}serialize(){if(this.fromIndex!=null&&this.fromIndex!==void 0){const c=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),c]}return["index-of",this.needle.serialize(),this.haystack.serialize()]}}var Wp=iu;class Pf{constructor(c,d,g,S,M,L){this.inputType=c,this.type=d,this.input=g,this.cases=S,this.outputs=M,this.otherwise=L}static parse(c,d){if(c.length<5)return d.error(`Expected at least 4 arguments, but found only ${c.length-1}.`);if(c.length%2!=1)return d.error("Expected an even number of arguments.");let g,S;d.expectedType&&d.expectedType.kind!=="value"&&(S=d.expectedType);const M={},L=[];for(let te=2;te<c.length-1;te+=2){let ue=c[te];const ge=c[te+1];Array.isArray(ue)||(ue=[ue]);const _e=d.concat(te);if(ue.length===0)return _e.error("Expected at least one branch label.");for(const Ae of ue){if(typeof Ae!="number"&&typeof Ae!="string")return _e.error("Branch labels must be numbers or strings.");if(typeof Ae=="number"&&Math.abs(Ae)>Number.MAX_SAFE_INTEGER)return _e.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof Ae=="number"&&Math.floor(Ae)!==Ae)return _e.error("Numeric branch labels must be integer values.");if(g){if(_e.checkSubtype(g,ao(Ae)))return null}else g=ao(Ae);if(M[String(Ae)]!==void 0)return _e.error("Branch labels must be unique.");M[String(Ae)]=L.length}const Me=d.parse(ge,te,S);if(!Me)return null;S=S||Me.type,L.push(Me)}const V=d.parse(c[1],1,ri);if(!V)return null;const Q=d.parse(c[c.length-1],c.length-1,S);return Q?V.type.kind!=="value"&&d.concat(1).checkSubtype(g,V.type)?null:new Pf(g,S,V,M,L,Q):null}evaluate(c){const d=this.input.evaluate(c);return(ao(d)===this.inputType&&this.outputs[this.cases[d]]||this.otherwise).evaluate(c)}eachChild(c){c(this.input),this.outputs.forEach(c),c(this.otherwise)}outputDefined(){return this.outputs.every(c=>c.outputDefined())&&this.otherwise.outputDefined()}serialize(){const c=["match",this.input.serialize()],d=Object.keys(this.cases).sort(),g=[],S={};for(const L of d){const V=S[this.cases[L]];V===void 0?(S[this.cases[L]]=g.length,g.push([this.cases[L],[L]])):g[V][1].push(L)}const M=L=>this.inputType.kind==="number"?Number(L):L;for(const[L,V]of g)c.push(V.length===1?M(V[0]):V.map(M)),c.push(this.outputs[L].serialize());return c.push(this.otherwise.serialize()),c}}var Gp=Pf;class og{constructor(c,d,g){this.type=c,this.branches=d,this.otherwise=g}static parse(c,d){if(c.length<4)return d.error(`Expected at least 3 arguments, but found only ${c.length-1}.`);if(c.length%2!=0)return d.error("Expected an odd number of arguments.");let g;d.expectedType&&d.expectedType.kind!=="value"&&(g=d.expectedType);const S=[];for(let L=1;L<c.length-1;L+=2){const V=d.parse(c[L],L,Tn);if(!V)return null;const Q=d.parse(c[L+1],L+1,g);if(!Q)return null;S.push([V,Q]),g=g||Q.type}const M=d.parse(c[c.length-1],c.length-1,g);return M?new og(g,S,M):null}evaluate(c){for(const[d,g]of this.branches)if(d.evaluate(c))return g.evaluate(c);return this.otherwise.evaluate(c)}eachChild(c){for(const[d,g]of this.branches)c(d),c(g);c(this.otherwise)}outputDefined(){return this.branches.every(([c,d])=>d.outputDefined())&&this.otherwise.outputDefined()}serialize(){const c=["case"];return this.eachChild(d=>{c.push(d.serialize())}),c}}var Sd=og;class Zt{constructor(c,d,g,S){this.type=c,this.input=d,this.beginIndex=g,this.endIndex=S}static parse(c,d){if(c.length<=2||c.length>=5)return d.error(`Expected 3 or 4 arguments, but found ${c.length-1} instead.`);const g=d.parse(c[1],1,ri),S=d.parse(c[2],2,zr);if(!g||!S)return null;if(!ct(g.type,[Ue(ri),Fn,ri]))return d.error(`Expected first argument to be of type array or string, but found ${Et(g.type)} instead`);if(c.length===4){const M=d.parse(c[3],3,zr);return M?new Zt(g.type,g,S,M):null}return new Zt(g.type,g,S)}evaluate(c){const d=this.input.evaluate(c),g=this.beginIndex.evaluate(c);if(!jt(d,["string","array"]))throw new Hn(`Expected first argument to be of type array or string, but found ${Et(ao(d))} instead.`);if(this.endIndex){const S=this.endIndex.evaluate(c);return d.slice(g,S)}return d.slice(g)}eachChild(c){c(this.input),c(this.beginIndex),this.endIndex&&c(this.endIndex)}outputDefined(){return!1}serialize(){if(this.endIndex!=null&&this.endIndex!==void 0){const c=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),c]}return["slice",this.input.serialize(),this.beginIndex.serialize()]}}var gr=Zt;function ir(f,c){return f==="=="||f==="!="?c.kind==="boolean"||c.kind==="string"||c.kind==="number"||c.kind==="null"||c.kind==="value":c.kind==="string"||c.kind==="number"||c.kind==="value"}function In(f,c,d,g){return g.compare(c,d)===0}function Zn(f,c,d){const g=f!=="=="&&f!=="!=";return class $fe{constructor(M,L,V){this.type=Tn,this.lhs=M,this.rhs=L,this.collator=V,this.hasUntypedArgument=M.type.kind==="value"||L.type.kind==="value"}static parse(M,L){if(M.length!==3&&M.length!==4)return L.error("Expected two or three arguments.");const V=M[0];let Q=L.parse(M[1],1,ri);if(!Q)return null;if(!ir(V,Q.type))return L.concat(1).error(`"${V}" comparisons are not supported for type '${Et(Q.type)}'.`);let te=L.parse(M[2],2,ri);if(!te)return null;if(!ir(V,te.type))return L.concat(2).error(`"${V}" comparisons are not supported for type '${Et(te.type)}'.`);if(Q.type.kind!==te.type.kind&&Q.type.kind!=="value"&&te.type.kind!=="value")return L.error(`Cannot compare types '${Et(Q.type)}' and '${Et(te.type)}'.`);g&&(Q.type.kind==="value"&&te.type.kind!=="value"?Q=new ba(te.type,[Q]):Q.type.kind!=="value"&&te.type.kind==="value"&&(te=new ba(Q.type,[te])));let ue=null;if(M.length===4){if(Q.type.kind!=="string"&&te.type.kind!=="string"&&Q.type.kind!=="value"&&te.type.kind!=="value")return L.error("Cannot use collator to compare non-string types.");if(ue=L.parse(M[3],3,$s),!ue)return null}return new $fe(Q,te,ue)}evaluate(M){const L=this.lhs.evaluate(M),V=this.rhs.evaluate(M);if(g&&this.hasUntypedArgument){const Q=ao(L),te=ao(V);if(Q.kind!==te.kind||Q.kind!=="string"&&Q.kind!=="number")throw new Hn(`Expected arguments for "${f}" to be (string, string) or (number, number), but found (${Q.kind}, ${te.kind}) instead.`)}if(this.collator&&!g&&this.hasUntypedArgument){const Q=ao(L),te=ao(V);if(Q.kind!=="string"||te.kind!=="string")return c(M,L,V)}return this.collator?d(M,L,V,this.collator.evaluate(M)):c(M,L,V)}eachChild(M){M(this.lhs),M(this.rhs),this.collator&&M(this.collator)}outputDefined(){return!0}serialize(){const M=[f];return this.eachChild(L=>{M.push(L.serialize())}),M}}}const lo=Zn("==",function(f,c,d){return c===d},In),Mo=Zn("!=",function(f,c,d){return c!==d},function(f,c,d,g){return!In(0,c,d,g)}),Zi=Zn("<",function(f,c,d){return c<d},function(f,c,d,g){return g.compare(c,d)<0}),ou=Zn(">",function(f,c,d){return c>d},function(f,c,d,g){return g.compare(c,d)>0}),qp=Zn("<=",function(f,c,d){return c<=d},function(f,c,d,g){return g.compare(c,d)<=0}),nl=Zn(">=",function(f,c,d){return c>=d},function(f,c,d,g){return g.compare(c,d)>=0});class fc{constructor(c,d,g,S,M,L){this.type=Fn,this.number=c,this.locale=d,this.currency=g,this.unit=S,this.minFractionDigits=M,this.maxFractionDigits=L}static parse(c,d){if(c.length!==3)return d.error("Expected two arguments.");const g=d.parse(c[1],1,zr);if(!g)return null;const S=c[2];if(typeof S!="object"||Array.isArray(S))return d.error("NumberFormat options argument must be an object.");let M=null;if(S.locale&&(M=d.parse(S.locale,1,Fn),!M))return null;let L=null;if(S.currency&&(L=d.parse(S.currency,1,Fn),!L))return null;let V=null;if(S.unit&&(V=d.parse(S.unit,1,Fn),!V))return null;let Q=null;if(S["min-fraction-digits"]&&(Q=d.parse(S["min-fraction-digits"],1,zr),!Q))return null;let te=null;return S["max-fraction-digits"]&&(te=d.parse(S["max-fraction-digits"],1,zr),!te)?null:new fc(g,M,L,V,Q,te)}evaluate(c){return new Intl.NumberFormat(this.locale?this.locale.evaluate(c):[],{style:(this.currency?"currency":this.unit&&"unit")||"decimal",currency:this.currency?this.currency.evaluate(c):void 0,unit:this.unit?this.unit.evaluate(c):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(c):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(c):void 0}).format(this.number.evaluate(c))}eachChild(c){c(this.number),this.locale&&c(this.locale),this.currency&&c(this.currency),this.unit&&c(this.unit),this.minFractionDigits&&c(this.minFractionDigits),this.maxFractionDigits&&c(this.maxFractionDigits)}outputDefined(){return!1}serialize(){const c={};return this.locale&&(c.locale=this.locale.serialize()),this.currency&&(c.currency=this.currency.serialize()),this.unit&&(c.unit=this.unit.serialize()),this.minFractionDigits&&(c["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(c["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),c]}}class Xl{constructor(c){this.type=zr,this.input=c}static parse(c,d){if(c.length!==2)return d.error(`Expected 1 argument, but found ${c.length-1} instead.`);const g=d.parse(c[1],1);return g?g.type.kind!=="array"&&g.type.kind!=="string"&&g.type.kind!=="value"?d.error(`Expected argument of type string or array, but found ${Et(g.type)} instead.`):new Xl(g):null}evaluate(c){const d=this.input.evaluate(c);if(typeof d=="string"||Array.isArray(d))return d.length;throw new Hn(`Expected value to be of type string or array, but found ${Et(ao(d))} instead.`)}eachChild(c){c(this.input)}outputDefined(){return!1}serialize(){const c=["length"];return this.eachChild(d=>{c.push(d.serialize())}),c}}const If={"==":lo,"!=":Mo,">":ou,"<":Zi,">=":nl,"<=":qp,array:ba,at:Tl,boolean:ba,case:Sd,coalesce:rl,collator:Cf,format:ju,image:$p,in:ql,"index-of":Wp,interpolate:mo,"interpolate-hcl":mo,"interpolate-lab":mo,length:Xl,let:Ys,literal:_i,match:Gp,number:ba,"number-format":fc,object:ba,slice:gr,step:jp,string:ba,"to-boolean":Uu,"to-color":Uu,"to-number":Uu,"to-string":Uu,var:Ih,within:lc};function Mf(f,[c,d,g,S]){c=c.evaluate(f),d=d.evaluate(f),g=g.evaluate(f);const M=S?S.evaluate(f):1,L=Lo(c,d,g,M);if(L)throw new Hn(L);return new Bn(c/255*M,d/255*M,g/255*M,M)}function Pl(f,c){return f in c}function Qi(f,c){const d=c[f];return d===void 0?null:d}function vl(f){return{type:f}}el.register(If,{error:[{kind:"error"},[Fn],(f,[c])=>{throw new Hn(c.evaluate(f))}],typeof:[Fn,[ri],(f,[c])=>Et(ao(c.evaluate(f)))],"to-rgba":[Ue(zr,4),[ls],(f,[c])=>c.evaluate(f).toArray()],rgb:[ls,[zr,zr,zr],Mf],rgba:[ls,[zr,zr,zr,zr],Mf],has:{type:Tn,overloads:[[[Fn],(f,[c])=>Pl(c.evaluate(f),f.properties())],[[Fn,Uo],(f,[c,d])=>Pl(c.evaluate(f),d.evaluate(f))]]},get:{type:ri,overloads:[[[Fn],(f,[c])=>Qi(c.evaluate(f),f.properties())],[[Fn,Uo],(f,[c,d])=>Qi(c.evaluate(f),d.evaluate(f))]]},"feature-state":[ri,[Fn],(f,[c])=>Qi(c.evaluate(f),f.featureState||{})],properties:[Uo,[],f=>f.properties()],"geometry-type":[Fn,[],f=>f.geometryType()],id:[ri,[],f=>f.id()],zoom:[zr,[],f=>f.globals.zoom],pitch:[zr,[],f=>f.globals.pitch||0],"distance-from-center":[zr,[],f=>f.distanceFromCenter()],"heatmap-density":[zr,[],f=>f.globals.heatmapDensity||0],"line-progress":[zr,[],f=>f.globals.lineProgress||0],"sky-radial-progress":[zr,[],f=>f.globals.skyRadialProgress||0],accumulated:[ri,[],f=>f.globals.accumulated===void 0?null:f.globals.accumulated],"+":[zr,vl(zr),(f,c)=>{let d=0;for(const g of c)d+=g.evaluate(f);return d}],"*":[zr,vl(zr),(f,c)=>{let d=1;for(const g of c)d*=g.evaluate(f);return d}],"-":{type:zr,overloads:[[[zr,zr],(f,[c,d])=>c.evaluate(f)-d.evaluate(f)],[[zr],(f,[c])=>-c.evaluate(f)]]},"/":[zr,[zr,zr],(f,[c,d])=>c.evaluate(f)/d.evaluate(f)],"%":[zr,[zr,zr],(f,[c,d])=>c.evaluate(f)%d.evaluate(f)],ln2:[zr,[],()=>Math.LN2],pi:[zr,[],()=>Math.PI],e:[zr,[],()=>Math.E],"^":[zr,[zr,zr],(f,[c,d])=>Math.pow(c.evaluate(f),d.evaluate(f))],sqrt:[zr,[zr],(f,[c])=>Math.sqrt(c.evaluate(f))],log10:[zr,[zr],(f,[c])=>Math.log(c.evaluate(f))/Math.LN10],ln:[zr,[zr],(f,[c])=>Math.log(c.evaluate(f))],log2:[zr,[zr],(f,[c])=>Math.log(c.evaluate(f))/Math.LN2],sin:[zr,[zr],(f,[c])=>Math.sin(c.evaluate(f))],cos:[zr,[zr],(f,[c])=>Math.cos(c.evaluate(f))],tan:[zr,[zr],(f,[c])=>Math.tan(c.evaluate(f))],asin:[zr,[zr],(f,[c])=>Math.asin(c.evaluate(f))],acos:[zr,[zr],(f,[c])=>Math.acos(c.evaluate(f))],atan:[zr,[zr],(f,[c])=>Math.atan(c.evaluate(f))],min:[zr,vl(zr),(f,c)=>Math.min(...c.map(d=>d.evaluate(f)))],max:[zr,vl(zr),(f,c)=>Math.max(...c.map(d=>d.evaluate(f)))],abs:[zr,[zr],(f,[c])=>Math.abs(c.evaluate(f))],round:[zr,[zr],(f,[c])=>{const d=c.evaluate(f);return d<0?-Math.round(-d):Math.round(d)}],floor:[zr,[zr],(f,[c])=>Math.floor(c.evaluate(f))],ceil:[zr,[zr],(f,[c])=>Math.ceil(c.evaluate(f))],"filter-==":[Tn,[Fn,ri],(f,[c,d])=>f.properties()[c.value]===d.value],"filter-id-==":[Tn,[ri],(f,[c])=>f.id()===c.value],"filter-type-==":[Tn,[Fn],(f,[c])=>f.geometryType()===c.value],"filter-<":[Tn,[Fn,ri],(f,[c,d])=>{const g=f.properties()[c.value],S=d.value;return typeof g==typeof S&&g<S}],"filter-id-<":[Tn,[ri],(f,[c])=>{const d=f.id(),g=c.value;return typeof d==typeof g&&d<g}],"filter->":[Tn,[Fn,ri],(f,[c,d])=>{const g=f.properties()[c.value],S=d.value;return typeof g==typeof S&&g>S}],"filter-id->":[Tn,[ri],(f,[c])=>{const d=f.id(),g=c.value;return typeof d==typeof g&&d>g}],"filter-<=":[Tn,[Fn,ri],(f,[c,d])=>{const g=f.properties()[c.value],S=d.value;return typeof g==typeof S&&g<=S}],"filter-id-<=":[Tn,[ri],(f,[c])=>{const d=f.id(),g=c.value;return typeof d==typeof g&&d<=g}],"filter->=":[Tn,[Fn,ri],(f,[c,d])=>{const g=f.properties()[c.value],S=d.value;return typeof g==typeof S&&g>=S}],"filter-id->=":[Tn,[ri],(f,[c])=>{const d=f.id(),g=c.value;return typeof d==typeof g&&d>=g}],"filter-has":[Tn,[ri],(f,[c])=>c.value in f.properties()],"filter-has-id":[Tn,[],f=>f.id()!==null&&f.id()!==void 0],"filter-type-in":[Tn,[Ue(Fn)],(f,[c])=>c.value.indexOf(f.geometryType())>=0],"filter-id-in":[Tn,[Ue(ri)],(f,[c])=>c.value.indexOf(f.id())>=0],"filter-in-small":[Tn,[Fn,Ue(ri)],(f,[c,d])=>d.value.indexOf(f.properties()[c.value])>=0],"filter-in-large":[Tn,[Fn,Ue(ri)],(f,[c,d])=>function(g,S,M,L){for(;M<=L;){const V=M+L>>1;if(S[V]===g)return!0;S[V]>g?L=V-1:M=V+1}return!1}(f.properties()[c.value],d.value,0,d.value.length-1)],all:{type:Tn,overloads:[[[Tn,Tn],(f,[c,d])=>c.evaluate(f)&&d.evaluate(f)],[vl(Tn),(f,c)=>{for(const d of c)if(!d.evaluate(f))return!1;return!0}]]},any:{type:Tn,overloads:[[[Tn,Tn],(f,[c,d])=>c.evaluate(f)||d.evaluate(f)],[vl(Tn),(f,c)=>{for(const d of c)if(d.evaluate(f))return!0;return!1}]]},"!":[Tn,[Tn],(f,[c])=>!c.evaluate(f)],"is-supported-script":[Tn,[Fn],(f,[c])=>{const d=f.globals&&f.globals.isSupportedScript;return!d||d(c.evaluate(f))}],upcase:[Fn,[Fn],(f,[c])=>c.evaluate(f).toUpperCase()],downcase:[Fn,[Fn],(f,[c])=>c.evaluate(f).toLowerCase()],concat:[Fn,vl(ri),(f,c)=>c.map(d=>Ja(d.evaluate(f))).join("")],"resolved-locale":[Fn,[$s],(f,[c])=>c.evaluate(f).resolvedLocale()]});var Td=If;function Af(f){return{result:"success",value:f}}function su(f){return{result:"error",value:f}}function sg(f){return f["property-type"]==="data-driven"}function c0(f){return!!f.expression&&f.expression.parameters.indexOf("zoom")>-1}function Xp(f){return!!f.expression&&f.expression.interpolated}function Ai(f){return f instanceof Number?"number":f instanceof String?"string":f instanceof Boolean?"boolean":Array.isArray(f)?"array":f===null?"null":typeof f}function Ah(f){return typeof f=="object"&&f!==null&&!Array.isArray(f)}function k_(f){return f}function Yp(f,c){const d=c.type==="color",g=f.stops&&typeof f.stops[0][0]=="object",S=g||!(g||f.property!==void 0),M=f.type||(Xp(c)?"exponential":"interval");if(d&&((f=Oi({},f)).stops&&(f.stops=f.stops.map(te=>[te[0],Bn.parse(te[1])])),f.default=Bn.parse(f.default?f.default:c.default)),f.colorSpace&&f.colorSpace!=="rgb"&&!Wn[f.colorSpace])throw new Error(`Unknown color space: ${f.colorSpace}`);let L,V,Q;if(M==="exponential")L=Rf;else if(M==="interval")L=Zp;else if(M==="categorical"){L=O_,V=Object.create(null);for(const te of f.stops)V[te[0]]=te[1];Q=typeof f.stops[0][0]}else{if(M!=="identity")throw new Error(`Unknown function type "${M}"`);L=ag}if(g){const te={},ue=[];for(let Me=0;Me<f.stops.length;Me++){const Ae=f.stops[Me],Ne=Ae[0].zoom;te[Ne]===void 0&&(te[Ne]={zoom:Ne,type:f.type,property:f.property,default:f.default,stops:[]},ue.push(Ne)),te[Ne].stops.push([Ae[0].value,Ae[1]])}const ge=[];for(const Me of ue)ge.push([te[Me].zoom,Yp(te[Me],c)]);const _e={name:"linear"};return{kind:"composite",interpolationType:_e,interpolationFactor:mo.interpolationFactor.bind(void 0,_e),zoomStops:ge.map(Me=>Me[0]),evaluate:({zoom:Me},Ae)=>Rf({stops:ge,base:f.base},c,Me).evaluate(Me,Ae)}}if(S){const te=M==="exponential"?{name:"exponential",base:f.base!==void 0?f.base:1}:null;return{kind:"camera",interpolationType:te,interpolationFactor:mo.interpolationFactor.bind(void 0,te),zoomStops:f.stops.map(ue=>ue[0]),evaluate:({zoom:ue})=>L(f,c,ue,V,Q)}}return{kind:"source",evaluate(te,ue){const ge=ue&&ue.properties?ue.properties[f.property]:void 0;return ge===void 0?Kp(f.default,c.default):L(f,c,ge,V,Q)}}}function Kp(f,c,d){return f!==void 0?f:c!==void 0?c:d!==void 0?d:void 0}function O_(f,c,d,g,S){return Kp(typeof d===S?g[d]:void 0,f.default,c.default)}function Zp(f,c,d){if(Ai(d)!=="number")return Kp(f.default,c.default);const g=f.stops.length;if(g===1||d<=f.stops[0][0])return f.stops[0][1];if(d>=f.stops[g-1][0])return f.stops[g-1][1];const S=rg(f.stops.map(M=>M[0]),d);return f.stops[S][1]}function Rf(f,c,d){const g=f.base!==void 0?f.base:1;if(Ai(d)!=="number")return Kp(f.default,c.default);const S=f.stops.length;if(S===1||d<=f.stops[0][0])return f.stops[0][1];if(d>=f.stops[S-1][0])return f.stops[S-1][1];const M=rg(f.stops.map(ue=>ue[0]),d),L=function(ue,ge,_e,Me){const Ae=Me-_e,Ne=ue-_e;return Ae===0?0:ge===1?Ne/Ae:(Math.pow(ge,Ne)-1)/(Math.pow(ge,Ae)-1)}(d,g,f.stops[M][0],f.stops[M+1][0]),V=f.stops[M][1],Q=f.stops[M+1][1];let te=cc[c.type]||k_;if(f.colorSpace&&f.colorSpace!=="rgb"){const ue=Wn[f.colorSpace];te=(ge,_e)=>ue.reverse(ue.interpolate(ue.forward(ge),ue.forward(_e),L))}return typeof V.evaluate=="function"?{evaluate(...ue){const ge=V.evaluate.apply(void 0,ue),_e=Q.evaluate.apply(void 0,ue);if(ge!==void 0&&_e!==void 0)return te(ge,_e,L)}}:te(V,Q,L)}function ag(f,c,d){return c.type==="color"?d=Bn.parse(d):c.type==="formatted"?d=ci.fromString(d.toString()):c.type==="resolvedImage"?d=fi.fromString(d.toString()):Ai(d)===c.type||c.type==="enum"&&c.values[d]||(d=void 0),Kp(d,f.default,c.default)}class kf{constructor(c,d){this.expression=c,this._warningHistory={},this._evaluator=new Eh,this._defaultValue=d?function(g){return g.type==="color"&&(Ah(g.default)||Array.isArray(g.default))?new Bn(0,0,0,0):g.type==="color"?Bn.parse(g.default)||null:g.default===void 0?null:g.default}(d):null,this._enumValues=d&&d.type==="enum"?d.values:null}evaluateWithoutErrorHandling(c,d,g,S,M,L,V,Q){return this._evaluator.globals=c,this._evaluator.feature=d,this._evaluator.featureState=g,this._evaluator.canonical=S||null,this._evaluator.availableImages=M||null,this._evaluator.formattedSection=L,this._evaluator.featureTileCoord=V||null,this._evaluator.featureDistanceData=Q||null,this.expression.evaluate(this._evaluator)}evaluate(c,d,g,S,M,L,V,Q){this._evaluator.globals=c,this._evaluator.feature=d||null,this._evaluator.featureState=g||null,this._evaluator.canonical=S||null,this._evaluator.availableImages=M||null,this._evaluator.formattedSection=L||null,this._evaluator.featureTileCoord=V||null,this._evaluator.featureDistanceData=Q||null;try{const te=this.expression.evaluate(this._evaluator);if(te==null||typeof te=="number"&&te!=te)return this._defaultValue;if(this._enumValues&&!(te in this._enumValues))throw new Hn(`Expected value to be one of ${Object.keys(this._enumValues).map(ue=>JSON.stringify(ue)).join(", ")}, but found ${JSON.stringify(te)} instead.`);return te}catch(te){return this._warningHistory[te.message]||(this._warningHistory[te.message]=!0,typeof console!="undefined"&&console.warn(te.message)),this._defaultValue}}}function Pd(f){return Array.isArray(f)&&f.length>0&&typeof f[0]=="string"&&f[0]in Td}function lg(f,c){const d=new Ed(Td,[],c?function(S){const M={color:ls,string:Fn,number:zr,enum:Fn,boolean:Tn,formatted:le,resolvedImage:Se};return S.type==="array"?Ue(M[S.value]||ri,S.length):M[S.type]}(c):void 0),g=d.parse(f,void 0,void 0,void 0,c&&c.type==="string"?{typeAnnotation:"coerce"}:void 0);return g?Af(new kf(g,c)):su(d.errors)}class L_{constructor(c,d){this.kind=c,this._styleExpression=d,this.isStateDependent=c!=="constant"&&!wa(d.expression)}evaluateWithoutErrorHandling(c,d,g,S,M,L){return this._styleExpression.evaluateWithoutErrorHandling(c,d,g,S,M,L)}evaluate(c,d,g,S,M,L){return this._styleExpression.evaluate(c,d,g,S,M,L)}}class Tv{constructor(c,d,g,S){this.kind=c,this.zoomStops=g,this._styleExpression=d,this.isStateDependent=c!=="camera"&&!wa(d.expression),this.interpolationType=S}evaluateWithoutErrorHandling(c,d,g,S,M,L){return this._styleExpression.evaluateWithoutErrorHandling(c,d,g,S,M,L)}evaluate(c,d,g,S,M,L){return this._styleExpression.evaluate(c,d,g,S,M,L)}interpolationFactor(c,d,g){return this.interpolationType?mo.interpolationFactor(this.interpolationType,c,d,g):0}}function Rh(f,c){if((f=lg(f,c)).result==="error")return f;const d=f.value.expression,g=Wu(d);if(!g&&!sg(c))return su([new fn("","data expressions not supported")]);const S=bd(d,["zoom","pitch","distance-from-center"]);if(!S&&!c0(c))return su([new fn("","zoom expressions not supported")]);const M=cg(d);return M||S?M instanceof fn?su([M]):M instanceof mo&&!Xp(c)?su([new fn("",'"interpolate" expressions cannot be used with this property')]):Af(M?new Tv(g?"camera":"composite",f.value,M.labels,M instanceof mo?M.interpolation:void 0):new L_(g?"constant":"source",f.value)):su([new fn("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class Qp{constructor(c,d){this._parameters=c,this._specification=d,Oi(this,Yp(this._parameters,this._specification))}static deserialize(c){return new Qp(c._parameters,c._specification)}static serialize(c){return{_parameters:c._parameters,_specification:c._specification}}}function cg(f){let c=null;if(f instanceof Ys)c=cg(f.result);else if(f instanceof rl){for(const d of f.args)if(c=cg(d),c)break}else(f instanceof jp||f instanceof mo)&&f.input instanceof el&&f.input.name==="zoom"&&(c=f);return c instanceof fn||f.eachChild(d=>{const g=cg(d);g instanceof fn?c=g:!c&&g?c=new fn("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):c&&g&&c!==g&&(c=new fn("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),c}class wn{constructor(c,d,g,S){this.message=(c?`${c}: `:"")+g,S&&(this.identifier=S),d!=null&&d.__line__&&(this.line=d.__line__)}}function au(f){const c=f.key,d=f.value,g=f.valueSpec||{},S=f.objectElementValidators||{},M=f.style,L=f.styleSpec;let V=[];const Q=Ai(d);if(Q!=="object")return[new wn(c,d,`object expected, ${Q} found`)];for(const te in d){const ue=te.split(".")[0];let ge;S[ue]?ge=S[ue]:g[ue]?ge=Il:S["*"]?ge=S["*"]:g["*"]&&(ge=Il),ge?V=V.concat(ge({key:(c&&`${c}.`)+te,value:d[te],valueSpec:g[ue]||g["*"],style:M,styleSpec:L,object:d,objectKey:te},d)):V.push(new wn(c,d[te],`unknown property "${te}"`))}for(const te in g)S[te]||g[te].required&&g[te].default===void 0&&d[te]===void 0&&V.push(new wn(c,d,`missing required property "${te}"`));return V}function tw(f){const c=f.value,d=f.valueSpec,g=f.style,S=f.styleSpec,M=f.key,L=f.arrayElementValidator||Il;if(Ai(c)!=="array")return[new wn(M,c,`array expected, ${Ai(c)} found`)];if(d.length&&c.length!==d.length)return[new wn(M,c,`array length ${d.length} expected, length ${c.length} found`)];if(d["min-length"]&&c.length<d["min-length"])return[new wn(M,c,`array length at least ${d["min-length"]} expected, length ${c.length} found`)];let V={type:d.value,values:d.values,minimum:d.minimum,maximum:d.maximum,function:void 0};S.$version<7&&(V.function=d.function),Ai(d.value)==="object"&&(V=d.value);let Q=[];for(let te=0;te<c.length;te++)Q=Q.concat(L({array:c,arrayIndex:te,value:c[te],valueSpec:V,style:g,styleSpec:S,key:`${M}[${te}]`}));return Q}function Pv(f){const c=f.key,d=f.value,g=f.valueSpec;let S=Ai(d);if(S==="number"&&d!=d&&(S="NaN"),S!=="number")return[new wn(c,d,`number expected, ${S} found`)];if("minimum"in g){let M=g.minimum;if(Ai(g.minimum)==="array"&&(M=g.minimum[f.arrayIndex]),d<M)return[new wn(c,d,`${d} is less than the minimum value ${M}`)]}if("maximum"in g){let M=g.maximum;if(Ai(g.maximum)==="array"&&(M=g.maximum[f.arrayIndex]),d>M)return[new wn(c,d,`${d} is greater than the maximum value ${M}`)]}return[]}function zs(f){const c=f.valueSpec,d=Li(f.value.type);let g,S,M,L={};const V=d!=="categorical"&&f.value.property===void 0,Q=!V,te=Ai(f.value.stops)==="array"&&Ai(f.value.stops[0])==="array"&&Ai(f.value.stops[0][0])==="object",ue=au({key:f.key,value:f.value,valueSpec:f.styleSpec.function,style:f.style,styleSpec:f.styleSpec,objectElementValidators:{stops:function(Me){if(d==="identity")return[new wn(Me.key,Me.value,'identity function may not have a "stops" property')];let Ae=[];const Ne=Me.value;return Ae=Ae.concat(tw({key:Me.key,value:Ne,valueSpec:Me.valueSpec,style:Me.style,styleSpec:Me.styleSpec,arrayElementValidator:ge})),Ai(Ne)==="array"&&Ne.length===0&&Ae.push(new wn(Me.key,Ne,"array must have at least one stop")),Ae},default:function(Me){return Il({key:Me.key,value:Me.value,valueSpec:c,style:Me.style,styleSpec:Me.styleSpec})}}});return d==="identity"&&V&&ue.push(new wn(f.key,f.value,'missing required property "property"')),d==="identity"||f.value.stops||ue.push(new wn(f.key,f.value,'missing required property "stops"')),d==="exponential"&&f.valueSpec.expression&&!Xp(f.valueSpec)&&ue.push(new wn(f.key,f.value,"exponential functions not supported")),f.styleSpec.$version>=8&&(Q&&!sg(f.valueSpec)?ue.push(new wn(f.key,f.value,"property functions not supported")):V&&!c0(f.valueSpec)&&ue.push(new wn(f.key,f.value,"zoom functions not supported"))),d!=="categorical"&&!te||f.value.property!==void 0||ue.push(new wn(f.key,f.value,'"property" property is required')),ue;function ge(Me){let Ae=[];const Ne=Me.value,Qe=Me.key;if(Ai(Ne)!=="array")return[new wn(Qe,Ne,`array expected, ${Ai(Ne)} found`)];if(Ne.length!==2)return[new wn(Qe,Ne,`array length 2 expected, length ${Ne.length} found`)];if(te){if(Ai(Ne[0])!=="object")return[new wn(Qe,Ne,`object expected, ${Ai(Ne[0])} found`)];if(Ne[0].zoom===void 0)return[new wn(Qe,Ne,"object stop key must have zoom")];if(Ne[0].value===void 0)return[new wn(Qe,Ne,"object stop key must have value")];const ft=Li(Ne[0].zoom);if(typeof ft!="number")return[new wn(Qe,Ne[0].zoom,"stop zoom values must be numbers")];if(M&&M>ft)return[new wn(Qe,Ne[0].zoom,"stop zoom values must appear in ascending order")];ft!==M&&(M=ft,S=void 0,L={}),Ae=Ae.concat(au({key:`${Qe}[0]`,value:Ne[0],valueSpec:{zoom:{}},style:Me.style,styleSpec:Me.styleSpec,objectElementValidators:{zoom:Pv,value:_e}}))}else Ae=Ae.concat(_e({key:`${Qe}[0]`,value:Ne[0],valueSpec:{},style:Me.style,styleSpec:Me.styleSpec},Ne));return Pd(ho(Ne[1]))?Ae.concat([new wn(`${Qe}[1]`,Ne[1],"expressions are not allowed in function stops.")]):Ae.concat(Il({key:`${Qe}[1]`,value:Ne[1],valueSpec:c,style:Me.style,styleSpec:Me.styleSpec}))}function _e(Me,Ae){const Ne=Ai(Me.value),Qe=Li(Me.value),ft=Me.value!==null?Me.value:Ae;if(g){if(Ne!==g)return[new wn(Me.key,ft,`${Ne} stop domain type must match previous stop domain type ${g}`)]}else g=Ne;if(Ne!=="number"&&Ne!=="string"&&Ne!=="boolean"&&typeof Qe!="number"&&typeof Qe!="string"&&typeof Qe!="boolean")return[new wn(Me.key,ft,"stop domain value must be a number, string, or boolean")];if(Ne!=="number"&&d!=="categorical"){let Ct=`number expected, ${Ne} found`;return sg(c)&&d===void 0&&(Ct+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new wn(Me.key,ft,Ct)]}return d!=="categorical"||Ne!=="number"||typeof Qe=="number"&&isFinite(Qe)&&Math.floor(Qe)===Qe?d!=="categorical"&&Ne==="number"&&typeof Qe=="number"&&typeof S=="number"&&S!==void 0&&Qe<S?[new wn(Me.key,ft,"stop domain values must appear in ascending order")]:(S=Qe,d==="categorical"&&Qe in L?[new wn(Me.key,ft,"stop domain values must be unique")]:(L[Qe]=!0,[])):[new wn(Me.key,ft,`integer expected, found ${String(Qe)}`)]}}function xo(f){const c=(f.expressionContext==="property"?Rh:lg)(ho(f.value),f.valueSpec);if(c.result==="error")return c.value.map(g=>new wn(`${f.key}${g.key}`,f.value,g.message));const d=c.value.expression||c.value._styleExpression.expression;if(f.expressionContext==="property"&&f.propertyKey==="text-font"&&!d.outputDefined())return[new wn(f.key,f.value,`Invalid data expression for "${f.propertyKey}". Output values must be contained as literals within the expression.`)];if(f.expressionContext==="property"&&f.propertyType==="layout"&&!wa(d))return[new wn(f.key,f.value,'"feature-state" data expressions are not supported with layout properties.')];if(f.expressionContext==="filter")return Iv(d,f);if(f.expressionContext&&f.expressionContext.indexOf("cluster")===0){if(!bd(d,["zoom","feature-state"]))return[new wn(f.key,f.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(f.expressionContext==="cluster-initial"&&!Wu(d))return[new wn(f.key,f.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function Iv(f,c){const d=new Set(["zoom","feature-state","pitch","distance-from-center"]);if(c.valueSpec&&c.valueSpec.expression)for(const S of c.valueSpec.expression.parameters)d.delete(S);if(d.size===0)return[];const g=[];return f instanceof el&&d.has(f.name)?[new wn(c.key,c.value,`["${f.name}"] expression is not supported in a filter for a ${c.object.type} layer with id: ${c.object.id}`)]:(f.eachChild(S=>{g.push(...Iv(S,c))}),g)}function u0(f){const c=f.key,d=f.value,g=f.valueSpec,S=[];return Array.isArray(g.values)?g.values.indexOf(Li(d))===-1&&S.push(new wn(c,d,`expected one of [${g.values.join(", ")}], ${JSON.stringify(d)} found`)):Object.keys(g.values).indexOf(Li(d))===-1&&S.push(new wn(c,d,`expected one of [${Object.keys(g.values).join(", ")}], ${JSON.stringify(d)} found`)),S}function f0(f){if(f===!0||f===!1)return!0;if(!Array.isArray(f)||f.length===0)return!1;switch(f[0]){case"has":return f.length>=2&&f[1]!=="$id"&&f[1]!=="$type";case"in":return f.length>=3&&(typeof f[1]!="string"||Array.isArray(f[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return f.length!==3||Array.isArray(f[1])||Array.isArray(f[2]);case"any":case"all":for(const c of f.slice(1))if(!f0(c)&&typeof c!="boolean")return!1;return!0;default:return!0}}function d0(f,c="fill"){if(f==null)return{filter:()=>!0,needGeometry:!1,needFeature:!1};f0(f)||(f=Id(f));const d=f;let g=!0;try{g=function(te){if(!Oh(te))return te;let ue=ho(te);return kh(ue),ue=h0(ue),ue}(d)}catch{console.warn(`Failed to extract static filter. Filter will continue working, but at higher memory usage and slower framerate. This is most likely a bug, please report this via https://github.com/mapbox/mapbox-gl-js/issues/new?assignees=&labels=&template=Bug_report.md and paste the contents of this message in the report. Thank you! Filter Expression: ${JSON.stringify(d,null,2)} `)}const S=dr[`filter_${c}`],M=lg(g,S);let L=null;if(M.result==="error")throw new Error(M.value.map(te=>`${te.key}: ${te.message}`).join(", "));L=(te,ue,ge)=>M.value.evaluate(te,ue,{},ge);let V=null,Q=null;if(g!==d){const te=lg(d,S);if(te.result==="error")throw new Error(te.value.map(ue=>`${ue.key}: ${ue.message}`).join(", "));V=(ue,ge,_e,Me,Ae)=>te.value.evaluate(ue,ge,{},_e,void 0,void 0,Me,Ae),Q=!Wu(te.value.expression)}return{filter:L,dynamicFilter:V||void 0,needGeometry:ug(g),needFeature:!!Q}}function h0(f){if(!Array.isArray(f))return f;const c=function(d){if(Lh.has(d[0])){for(let g=1;g<d.length;g++)if(Oh(d[g]))return!0}return d}(f);return c===!0?c:c.map(d=>h0(d))}function kh(f){let c=!1;const d=[];if(f[0]==="case"){for(let g=1;g<f.length-1;g+=2)c=c||Oh(f[g]),d.push(f[g+1]);d.push(f[f.length-1])}else if(f[0]==="match"){c=c||Oh(f[1]);for(let g=2;g<f.length-1;g+=2)d.push(f[g+1]);d.push(f[f.length-1])}else if(f[0]==="step"){c=c||Oh(f[1]);for(let g=1;g<f.length-1;g+=2)d.push(f[g+1])}c&&(f.length=0,f.push("any",...d));for(let g=1;g<f.length;g++)kh(f[g])}function Oh(f){if(!Array.isArray(f))return!1;if((c=f[0])==="pitch"||c==="distance-from-center")return!0;var c;for(let d=1;d<f.length;d++)if(Oh(f[d]))return!0;return!1}const Lh=new Set(["in","==","!=",">",">=","<","<=","to-boolean"]);function Mv(f,c){return f<c?-1:f>c?1:0}function ug(f){if(!Array.isArray(f))return!1;if(f[0]==="within")return!0;for(let c=1;c<f.length;c++)if(ug(f[c]))return!0;return!1}function Id(f){if(!f)return!0;const c=f[0];return f.length<=1?c!=="any":c==="=="?Dh(f[1],f[2],"=="):c==="!="?p0(Dh(f[1],f[2],"==")):c==="<"||c===">"||c==="<="||c===">="?Dh(f[1],f[2],c):c==="any"?(d=f.slice(1),["any"].concat(d.map(Id))):c==="all"?["all"].concat(f.slice(1).map(Id)):c==="none"?["all"].concat(f.slice(1).map(Id).map(p0)):c==="in"?D_(f[1],f.slice(2)):c==="!in"?p0(D_(f[1],f.slice(2))):c==="has"?N_(f[1]):c==="!has"?p0(N_(f[1])):c!=="within"||f;var d}function Dh(f,c,d){switch(f){case"$type":return[`filter-type-${d}`,c];case"$id":return[`filter-id-${d}`,c];default:return[`filter-${d}`,f,c]}}function D_(f,c){if(c.length===0)return!1;switch(f){case"$type":return["filter-type-in",["literal",c]];case"$id":return["filter-id-in",["literal",c]];default:return c.length>200&&!c.some(d=>typeof d!=typeof c[0])?["filter-in-large",f,["literal",c.sort(Mv)]]:["filter-in-small",f,["literal",c]]}}function N_(f){switch(f){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",f]}}function p0(f){return["!",f]}function Av(f){return f0(ho(f.value))?xo(Oi({},f,{expressionContext:"filter",valueSpec:f.styleSpec[`filter_${f.layerType||"fill"}`]})):Rv(f)}function Rv(f){const c=f.value,d=f.key;if(Ai(c)!=="array")return[new wn(d,c,`array expected, ${Ai(c)} found`)];const g=f.styleSpec;let S,M=[];if(c.length<1)return[new wn(d,c,"filter array must have at least 1 element")];switch(M=M.concat(u0({key:`${d}[0]`,value:c[0],valueSpec:g.filter_operator,style:f.style,styleSpec:f.styleSpec})),Li(c[0])){case"<":case"<=":case">":case">=":c.length>=2&&Li(c[1])==="$type"&&M.push(new wn(d,c,`"$type" cannot be use with operator "${c[0]}"`));case"==":case"!=":c.length!==3&&M.push(new wn(d,c,`filter array for operator "${c[0]}" must have 3 elements`));case"in":case"!in":c.length>=2&&(S=Ai(c[1]),S!=="string"&&M.push(new wn(`${d}[1]`,c[1],`string expected, ${S} found`)));for(let L=2;L<c.length;L++)S=Ai(c[L]),Li(c[1])==="$type"?M=M.concat(u0({key:`${d}[${L}]`,value:c[L],valueSpec:g.geometry_type,style:f.style,styleSpec:f.styleSpec})):S!=="string"&&S!=="number"&&S!=="boolean"&&M.push(new wn(`${d}[${L}]`,c[L],`string, number, or boolean expected, ${S} found`));break;case"any":case"all":case"none":for(let L=1;L<c.length;L++)M=M.concat(Rv({key:`${d}[${L}]`,value:c[L],style:f.style,styleSpec:f.styleSpec}));break;case"has":case"!has":S=Ai(c[1]),c.length!==2?M.push(new wn(d,c,`filter array for "${c[0]}" operator must have 2 elements`)):S!=="string"&&M.push(new wn(`${d}[1]`,c[1],`string expected, ${S} found`));break;case"within":S=Ai(c[1]),c.length!==2?M.push(new wn(d,c,`filter array for "${c[0]}" operator must have 2 elements`)):S!=="object"&&M.push(new wn(`${d}[1]`,c[1],`object expected, ${S} found`))}return M}function fg(f,c){const d=f.key,g=f.style,S=f.styleSpec,M=f.value,L=f.objectKey,V=S[`${c}_${f.layerType}`];if(!V)return[];const Q=L.match(/^(.*)-transition$/);if(c==="paint"&&Q&&V[Q[1]]&&V[Q[1]].transition)return Il({key:d,value:M,valueSpec:S.transition,style:g,styleSpec:S});const te=f.valueSpec||V[L];if(!te)return[new wn(d,M,`unknown property "${L}"`)];let ue;if(Ai(M)==="string"&&sg(te)&&!te.tokens&&(ue=/^{([^}]+)}$/.exec(M))){const _e=`\`{ "type": "identity", "property": ${ue?JSON.stringify(ue[1]):'"_"'} }\``;return[new wn(d,M,`"${L}" does not support interpolation syntax Use an identity property function instead: ${_e}.`)]}const ge=[];return f.layerType==="symbol"&&(L==="text-field"&&g&&!g.glyphs&&ge.push(new wn(d,M,'use of "text-field" requires a style "glyphs" property')),L==="text-font"&&Ah(ho(M))&&Li(M.type)==="identity"&&ge.push(new wn(d,M,'"text-font" does not support identity functions'))),ge.concat(Il({key:f.key,value:M,valueSpec:te,style:g,styleSpec:S,expressionContext:"property",propertyType:c,propertyKey:L}))}function dg(f){return fg(f,"paint")}function m0(f){return fg(f,"layout")}function nt(f){let c=[];const d=f.value,g=f.key,S=f.style,M=f.styleSpec;d.type||d.ref||c.push(new wn(g,d,'either "type" or "ref" is required'));let L=Li(d.type);const V=Li(d.ref);if(d.id){const Q=Li(d.id);for(let te=0;te<f.arrayIndex;te++){const ue=S.layers[te];Li(ue.id)===Q&&c.push(new wn(g,d.id,`duplicate layer id "${d.id}", previously used at line ${ue.id.__line__}`))}}if("ref"in d){let Q;["type","source","source-layer","filter","layout"].forEach(te=>{te in d&&c.push(new wn(g,d[te],`"${te}" is prohibited for ref layers`))}),S.layers.forEach(te=>{Li(te.id)===V&&(Q=te)}),Q?Q.ref?c.push(new wn(g,d.ref,"ref cannot reference another ref layer")):L=Li(Q.type):typeof V=="string"&&c.push(new wn(g,d.ref,`ref layer "${V}" not found`))}else if(L!=="background"&&L!=="sky")if(d.source){const Q=S.sources&&S.sources[d.source],te=Q&&Li(Q.type);Q?te==="vector"&&L==="raster"?c.push(new wn(g,d.source,`layer "${d.id}" requires a raster source`)):te==="raster"&&L!=="raster"?c.push(new wn(g,d.source,`layer "${d.id}" requires a vector source`)):te!=="vector"||d["source-layer"]?te==="raster-dem"&&L!=="hillshade"?c.push(new wn(g,d.source,"raster-dem source can only be used with layer type 'hillshade'.")):L!=="line"||!d.paint||!d.paint["line-gradient"]&&!d.paint["line-trim-offset"]||te==="geojson"&&Q.lineMetrics||c.push(new wn(g,d,`layer "${d.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):c.push(new wn(g,d,`layer "${d.id}" must specify a "source-layer"`)):c.push(new wn(g,d.source,`source "${d.source}" not found`))}else c.push(new wn(g,d,'missing required property "source"'));return c=c.concat(au({key:g,value:d,valueSpec:M.layer,style:f.style,styleSpec:f.styleSpec,objectElementValidators:{"*":()=>[],type:()=>Il({key:`${g}.type`,value:d.type,valueSpec:M.layer.type,style:f.style,styleSpec:f.styleSpec,object:d,objectKey:"type"}),filter:Q=>Av(Oi({layerType:L},Q)),layout:Q=>au({layer:d,key:Q.key,value:Q.value,valueSpec:{},style:Q.style,styleSpec:Q.styleSpec,objectElementValidators:{"*":te=>m0(Oi({layerType:L},te))}}),paint:Q=>au({layer:d,key:Q.key,value:Q.value,valueSpec:{},style:Q.style,styleSpec:Q.styleSpec,objectElementValidators:{"*":te=>dg(Oi({layerType:L},te))}})}})),c}function Oc(f){const c=f.value,d=f.key,g=Ai(c);return g!=="string"?[new wn(d,c,`string expected, ${g} found`)]:[]}const kv={promoteId:function({key:f,value:c}){if(Ai(c)==="string")return Oc({key:f,value:c});{const d=[];for(const g in c)d.push(...Oc({key:`${f}.${g}`,value:c[g]}));return d}}};function Lc(f){const c=f.value,d=f.key,g=f.styleSpec,S=f.style;if(!c.type)return[new wn(d,c,'"type" is required')];const M=Li(c.type);let L;switch(M){case"vector":case"raster":case"raster-dem":return L=au({key:d,value:c,valueSpec:g[`source_${M.replace("-","_")}`],style:f.style,styleSpec:g,objectElementValidators:kv}),L;case"geojson":if(L=au({key:d,value:c,valueSpec:g.source_geojson,style:S,styleSpec:g,objectElementValidators:kv}),c.cluster)for(const V in c.clusterProperties){const[Q,te]=c.clusterProperties[V],ue=typeof Q=="string"?[Q,["accumulated"],["get",V]]:Q;L.push(...xo({key:`${d}.${V}.map`,value:te,expressionContext:"cluster-map"})),L.push(...xo({key:`${d}.${V}.reduce`,value:ue,expressionContext:"cluster-reduce"}))}return L;case"video":return au({key:d,value:c,valueSpec:g.source_video,style:S,styleSpec:g});case"image":return au({key:d,value:c,valueSpec:g.source_image,style:S,styleSpec:g});case"canvas":return[new wn(d,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return u0({key:`${d}.type`,value:c.type,valueSpec:{values:ro(g)},style:S,styleSpec:g})}}function ro(f){return f.source.reduce((c,d)=>{const g=f[d];return g.type.type==="enum"&&(c=c.concat(Object.keys(g.type.values))),c},[])}function rw(f){const c=f.value,d=f.styleSpec,g=d.light,S=f.style;let M=[];const L=Ai(c);if(c===void 0)return M;if(L!=="object")return M=M.concat([new wn("light",c,`object expected, ${L} found`)]),M;for(const V in c){const Q=V.match(/^(.*)-transition$/);M=M.concat(Q&&g[Q[1]]&&g[Q[1]].transition?Il({key:V,value:c[V],valueSpec:d.transition,style:S,styleSpec:d}):g[V]?Il({key:V,value:c[V],valueSpec:g[V],style:S,styleSpec:d}):[new wn(V,c[V],`unknown property "${V}"`)])}return M}function $_(f){const c=f.value,d=f.key,g=f.style,S=f.styleSpec,M=S.terrain;let L=[];const V=Ai(c);if(c===void 0)return L;if(V!=="object")return L=L.concat([new wn("terrain",c,`object expected, ${V} found`)]),L;for(const Q in c){const te=Q.match(/^(.*)-transition$/);L=L.concat(te&&M[te[1]]&&M[te[1]].transition?Il({key:Q,value:c[Q],valueSpec:S.transition,style:g,styleSpec:S}):M[Q]?Il({key:Q,value:c[Q],valueSpec:M[Q],style:g,styleSpec:S}):[new wn(Q,c[Q],`unknown property "${Q}"`)])}if(c.source){const Q=g.sources&&g.sources[c.source],te=Q&&Li(Q.type);Q?te!=="raster-dem"&&L.push(new wn(d,c.source,`terrain cannot be used with a source of type ${String(te)}, it only be used with a "raster-dem" source type`)):L.push(new wn(d,c.source,`source "${c.source}" not found`))}else L.push(new wn(d,c,'terrain is missing required property "source"'));return L}function nw(f){const c=f.value,d=f.style,g=f.styleSpec,S=g.fog;let M=[];const L=Ai(c);if(c===void 0)return M;if(L!=="object")return M=M.concat([new wn("fog",c,`object expected, ${L} found`)]),M;for(const V in c){const Q=V.match(/^(.*)-transition$/);M=M.concat(Q&&S[Q[1]]&&S[Q[1]].transition?Il({key:V,value:c[V],valueSpec:g.transition,style:d,styleSpec:g}):S[V]?Il({key:V,value:c[V],valueSpec:S[V],style:d,styleSpec:g}):[new wn(V,c[V],`unknown property "${V}"`)])}return M}const Nh={"*":()=>[],array:tw,boolean:function(f){const c=f.value,d=f.key,g=Ai(c);return g!=="boolean"?[new wn(d,c,`boolean expected, ${g} found`)]:[]},number:Pv,color:function(f){const c=f.key,d=f.value,g=Ai(d);return g!=="string"?[new wn(c,d,`color expected, ${g} found`)]:Xt(d)===null?[new wn(c,d,`color expected, "${d}" found`)]:[]},enum:u0,filter:Av,function:zs,layer:nt,object:au,source:Lc,light:rw,terrain:$_,fog:nw,string:Oc,formatted:function(f){return Oc(f).length===0?[]:xo(f)},resolvedImage:function(f){return Oc(f).length===0?[]:xo(f)},projection:function(f){const c=f.value,d=f.styleSpec,g=d.projection,S=f.style;let M=[];const L=Ai(c);if(L==="object")for(const V in c)M=M.concat(Il({key:V,value:c[V],valueSpec:g[V],style:S,styleSpec:d}));else L!=="string"&&(M=M.concat([new wn("projection",c,`object or string expected, ${L} found`)]));return M}};function Il(f){const c=f.value,d=f.valueSpec,g=f.styleSpec;return d.expression&&Ah(Li(c))?zs(f):d.expression&&Pd(ho(c))?xo(f):d.type&&Nh[d.type]?Nh[d.type](f):au(Oi({},f,{valueSpec:d.type?g[d.type]:d}))}function gS(f){const c=f.value,d=f.key,g=Oc(f);return g.length||(c.indexOf("{fontstack}")===-1&&g.push(new wn(d,c,'"glyphs" url must include a "{fontstack}" token')),c.indexOf("{range}")===-1&&g.push(new wn(d,c,'"glyphs" url must include a "{range}" token'))),g}function iw(f,c=dr){return Ca(Il({key:"",value:f,valueSpec:c.$root,styleSpec:c,style:f,objectElementValidators:{glyphs:gS,"*":()=>[]}}))}const vS=f=>Ca(dg(f)),yS=f=>Ca(m0(f));function Ca(f){return f.slice().sort((c,d)=>c.line&&d.line?c.line-d.line:0)}function ow(f,c){let d=!1;if(c&&c.length)for(const g of c)f.fire(new Pi(new Error(g.message))),d=!0;return d}var xS=Of,Gu=3;function Of(f,c,d){var g=this.cells=[];if(f instanceof ArrayBuffer){this.arrayBuffer=f;var S=new Int32Array(this.arrayBuffer);f=S[0],this.d=(c=S[1])+2*(d=S[2]);for(var M=0;M<this.d*this.d;M++){var L=S[Gu+M],V=S[Gu+M+1];g.push(L===V?null:S.subarray(L,V))}var Q=S[Gu+g.length+1];this.keys=S.subarray(S[Gu+g.length],Q),this.bboxes=S.subarray(Q),this.insert=this._insertReadonly}else{this.d=c+2*d;for(var te=0;te<this.d*this.d;te++)g.push([]);this.keys=[],this.bboxes=[]}this.n=c,this.extent=f,this.padding=d,this.scale=c/f,this.uid=0;var ue=d/c*f;this.min=-ue,this.max=f+ue}Of.prototype.insert=function(f,c,d,g,S){this._forEachCell(c,d,g,S,this._insertCell,this.uid++),this.keys.push(f),this.bboxes.push(c),this.bboxes.push(d),this.bboxes.push(g),this.bboxes.push(S)},Of.prototype._insertReadonly=function(){throw"Cannot insert into a GridIndex created from an ArrayBuffer."},Of.prototype._insertCell=function(f,c,d,g,S,M){this.cells[S].push(M)},Of.prototype.query=function(f,c,d,g,S){var M=this.min,L=this.max;if(f<=M&&c<=M&&L<=d&&L<=g&&!S)return Array.prototype.slice.call(this.keys);var V=[];return this._forEachCell(f,c,d,g,this._queryCell,V,{},S),V},Of.prototype._queryCell=function(f,c,d,g,S,M,L,V){var Q=this.cells[S];if(Q!==null)for(var te=this.keys,ue=this.bboxes,ge=0;ge<Q.length;ge++){var _e=Q[ge];if(L[_e]===void 0){var Me=4*_e;(V?V(ue[Me+0],ue[Me+1],ue[Me+2],ue[Me+3]):f<=ue[Me+2]&&c<=ue[Me+3]&&d>=ue[Me+0]&&g>=ue[Me+1])?(L[_e]=!0,M.push(te[_e])):L[_e]=!1}}},Of.prototype._forEachCell=function(f,c,d,g,S,M,L,V){for(var Q=this._convertToCellCoord(f),te=this._convertToCellCoord(c),ue=this._convertToCellCoord(d),ge=this._convertToCellCoord(g),_e=Q;_e<=ue;_e++)for(var Me=te;Me<=ge;Me++){var Ae=this.d*Me+_e;if((!V||V(this._convertFromCellCoord(_e),this._convertFromCellCoord(Me),this._convertFromCellCoord(_e+1),this._convertFromCellCoord(Me+1)))&&S.call(this,f,c,d,g,Ae,M,L,V))return}},Of.prototype._convertFromCellCoord=function(f){return(f-this.padding)/this.scale},Of.prototype._convertToCellCoord=function(f){return Math.max(0,Math.min(this.d-1,Math.floor(f*this.scale)+this.padding))},Of.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var f=this.cells,c=Gu+this.cells.length+1+1,d=0,g=0;g<this.cells.length;g++)d+=this.cells[g].length;var S=new Int32Array(c+d+this.keys.length+this.bboxes.length);S[0]=this.extent,S[1]=this.n,S[2]=this.padding;for(var M=c,L=0;L<f.length;L++){var V=f[L];S[Gu+L]=M,S.set(V,M),M+=V.length}return S[Gu+f.length]=M,S.set(this.keys,M),S[Gu+f.length+1]=M+=this.keys.length,S.set(this.bboxes,M),M+=this.bboxes.length,S.buffer};var Jp=T(xS);const lu={};function Sn(f,c,d={}){Object.defineProperty(f,"_classRegistryKey",{value:c,writeable:!1}),lu[c]={klass:f,omit:d.omit||[]}}Sn(Object,"Object"),Jp.serialize=function(f,c){const d=f.toArrayBuffer();return c&&c.push(d),{buffer:d}},Jp.deserialize=function(f){return new Jp(f.buffer)},Object.defineProperty(Jp,"name",{value:"Grid"}),Sn(Jp,"Grid"),Sn(Bn,"Color"),Sn(Error,"Error"),Sn(Er,"AJAXError"),Sn(fi,"ResolvedImage"),Sn(Qp,"StylePropertyFunction"),Sn(kf,"StyleExpression",{omit:["_evaluator"]}),Sn(Tv,"ZoomDependentExpression"),Sn(L_,"ZoomConstantExpression"),Sn(el,"CompoundExpression",{omit:["_evaluate"]});for(const f in Td)lu[Td[f]._classRegistryKey]||Sn(Td[f],`Expression${f}`);function F_(f){return f&&typeof ArrayBuffer!="undefined"&&(f instanceof ArrayBuffer||f.constructor&&f.constructor.name==="ArrayBuffer")}function z_(f){return l.ImageBitmap&&f instanceof l.ImageBitmap}function hg(f,c){if(f==null||typeof f=="boolean"||typeof f=="number"||typeof f=="string"||f instanceof Boolean||f instanceof Number||f instanceof String||f instanceof Date||f instanceof RegExp)return f;if(F_(f)||z_(f))return c&&c.push(f),f;if(ArrayBuffer.isView(f)){const d=f;return c&&c.push(d.buffer),d}if(f instanceof l.ImageData)return c&&c.push(f.data.buffer),f;if(Array.isArray(f)){const d=[];for(const g of f)d.push(hg(g,c));return d}if(typeof f=="object"){const d=f.constructor,g=d._classRegistryKey;if(!g)throw new Error(`can't serialize object of unregistered class ${g}`);const S=d.serialize?d.serialize(f,c):{};if(!d.serialize){for(const M in f)f.hasOwnProperty(M)&&(lu[g].omit.indexOf(M)>=0||(S[M]=hg(f[M],c)));f instanceof Error&&(S.message=f.message)}if(S.$name)throw new Error("$name property is reserved for worker serialization logic.");return g!=="Object"&&(S.$name=g),S}throw new Error("can't serialize object of type "+typeof f)}function em(f){if(f==null||typeof f=="boolean"||typeof f=="number"||typeof f=="string"||f instanceof Boolean||f instanceof Number||f instanceof String||f instanceof Date||f instanceof RegExp||F_(f)||z_(f)||ArrayBuffer.isView(f)||f instanceof l.ImageData)return f;if(Array.isArray(f))return f.map(em);if(typeof f=="object"){const c=f.$name||"Object",{klass:d}=lu[c];if(!d)throw new Error(`can't deserialize unregistered class ${c}`);if(d.deserialize)return d.deserialize(f);const g=Object.create(d.prototype);for(const S of Object.keys(f))S!=="$name"&&(g[S]=em(f[S]));return g}throw new Error("can't deserialize object of type "+typeof f)}const mn={"Latin-1 Supplement":f=>f>=128&&f<=255,Arabic:f=>f>=1536&&f<=1791,"Arabic Supplement":f=>f>=1872&&f<=1919,"Arabic Extended-A":f=>f>=2208&&f<=2303,"Hangul Jamo":f=>f>=4352&&f<=4607,"Unified Canadian Aboriginal Syllabics":f=>f>=5120&&f<=5759,Khmer:f=>f>=6016&&f<=6143,"Unified Canadian Aboriginal Syllabics Extended":f=>f>=6320&&f<=6399,"General Punctuation":f=>f>=8192&&f<=8303,"Letterlike Symbols":f=>f>=8448&&f<=8527,"Number Forms":f=>f>=8528&&f<=8591,"Miscellaneous Technical":f=>f>=8960&&f<=9215,"Control Pictures":f=>f>=9216&&f<=9279,"Optical Character Recognition":f=>f>=9280&&f<=9311,"Enclosed Alphanumerics":f=>f>=9312&&f<=9471,"Geometric Shapes":f=>f>=9632&&f<=9727,"Miscellaneous Symbols":f=>f>=9728&&f<=9983,"Miscellaneous Symbols and Arrows":f=>f>=11008&&f<=11263,"CJK Radicals Supplement":f=>f>=11904&&f<=12031,"Kangxi Radicals":f=>f>=12032&&f<=12255,"Ideographic Description Characters":f=>f>=12272&&f<=12287,"CJK Symbols and Punctuation":f=>f>=12288&&f<=12351,Hiragana:f=>f>=12352&&f<=12447,Katakana:f=>f>=12448&&f<=12543,Bopomofo:f=>f>=12544&&f<=12591,"Hangul Compatibility Jamo":f=>f>=12592&&f<=12687,Kanbun:f=>f>=12688&&f<=12703,"Bopomofo Extended":f=>f>=12704&&f<=12735,"CJK Strokes":f=>f>=12736&&f<=12783,"Katakana Phonetic Extensions":f=>f>=12784&&f<=12799,"Enclosed CJK Letters and Months":f=>f>=12800&&f<=13055,"CJK Compatibility":f=>f>=13056&&f<=13311,"CJK Unified Ideographs Extension A":f=>f>=13312&&f<=19903,"Yijing Hexagram Symbols":f=>f>=19904&&f<=19967,"CJK Unified Ideographs":f=>f>=19968&&f<=40959,"Yi Syllables":f=>f>=40960&&f<=42127,"Yi Radicals":f=>f>=42128&&f<=42191,"Hangul Jamo Extended-A":f=>f>=43360&&f<=43391,"Hangul Syllables":f=>f>=44032&&f<=55215,"Hangul Jamo Extended-B":f=>f>=55216&&f<=55295,"Private Use Area":f=>f>=57344&&f<=63743,"CJK Compatibility Ideographs":f=>f>=63744&&f<=64255,"Arabic Presentation Forms-A":f=>f>=64336&&f<=65023,"Vertical Forms":f=>f>=65040&&f<=65055,"CJK Compatibility Forms":f=>f>=65072&&f<=65103,"Small Form Variants":f=>f>=65104&&f<=65135,"Arabic Presentation Forms-B":f=>f>=65136&&f<=65279,"Halfwidth and Fullwidth Forms":f=>f>=65280&&f<=65519};function B_(f){for(const c of f)if(j_(c.charCodeAt(0)))return!0;return!1}function _S(f){for(const c of f)if(!cu(c.charCodeAt(0)))return!1;return!0}function cu(f){return!(mn.Arabic(f)||mn["Arabic Supplement"](f)||mn["Arabic Extended-A"](f)||mn["Arabic Presentation Forms-A"](f)||mn["Arabic Presentation Forms-B"](f))}function j_(f){return!(f!==746&&f!==747&&(f<4352||!(mn["Bopomofo Extended"](f)||mn.Bopomofo(f)||mn["CJK Compatibility Forms"](f)&&!(f>=65097&&f<=65103)||mn["CJK Compatibility Ideographs"](f)||mn["CJK Compatibility"](f)||mn["CJK Radicals Supplement"](f)||mn["CJK Strokes"](f)||!(!mn["CJK Symbols and Punctuation"](f)||f>=12296&&f<=12305||f>=12308&&f<=12319||f===12336)||mn["CJK Unified Ideographs Extension A"](f)||mn["CJK Unified Ideographs"](f)||mn["Enclosed CJK Letters and Months"](f)||mn["Hangul Compatibility Jamo"](f)||mn["Hangul Jamo Extended-A"](f)||mn["Hangul Jamo Extended-B"](f)||mn["Hangul Jamo"](f)||mn["Hangul Syllables"](f)||mn.Hiragana(f)||mn["Ideographic Description Characters"](f)||mn.Kanbun(f)||mn["Kangxi Radicals"](f)||mn["Katakana Phonetic Extensions"](f)||mn.Katakana(f)&&f!==12540||!(!mn["Halfwidth and Fullwidth Forms"](f)||f===65288||f===65289||f===65293||f>=65306&&f<=65310||f===65339||f===65341||f===65343||f>=65371&&f<=65503||f===65507||f>=65512&&f<=65519)||!(!mn["Small Form Variants"](f)||f>=65112&&f<=65118||f>=65123&&f<=65126)||mn["Unified Canadian Aboriginal Syllabics"](f)||mn["Unified Canadian Aboriginal Syllabics Extended"](f)||mn["Vertical Forms"](f)||mn["Yijing Hexagram Symbols"](f)||mn["Yi Syllables"](f)||mn["Yi Radicals"](f))))}function sw(f){return!(j_(f)||function(c){return!!(mn["Latin-1 Supplement"](c)&&(c===167||c===169||c===174||c===177||c===188||c===189||c===190||c===215||c===247)||mn["General Punctuation"](c)&&(c===8214||c===8224||c===8225||c===8240||c===8241||c===8251||c===8252||c===8258||c===8263||c===8264||c===8265||c===8273)||mn["Letterlike Symbols"](c)||mn["Number Forms"](c)||mn["Miscellaneous Technical"](c)&&(c>=8960&&c<=8967||c>=8972&&c<=8991||c>=8996&&c<=9e3||c===9003||c>=9085&&c<=9114||c>=9150&&c<=9165||c===9167||c>=9169&&c<=9179||c>=9186&&c<=9215)||mn["Control Pictures"](c)&&c!==9251||mn["Optical Character Recognition"](c)||mn["Enclosed Alphanumerics"](c)||mn["Geometric Shapes"](c)||mn["Miscellaneous Symbols"](c)&&!(c>=9754&&c<=9759)||mn["Miscellaneous Symbols and Arrows"](c)&&(c>=11026&&c<=11055||c>=11088&&c<=11097||c>=11192&&c<=11243)||mn["CJK Symbols and Punctuation"](c)||mn.Katakana(c)||mn["Private Use Area"](c)||mn["CJK Compatibility Forms"](c)||mn["Small Form Variants"](c)||mn["Halfwidth and Fullwidth Forms"](c)||c===8734||c===8756||c===8757||c>=9984&&c<=10087||c>=10102&&c<=10131||c===65532||c===65533)}(f))}function aw(f){return f>=1424&&f<=2303||mn["Arabic Presentation Forms-A"](f)||mn["Arabic Presentation Forms-B"](f)}function bS(f,c){return!(!c&&aw(f)||f>=2304&&f<=3583||f>=3840&&f<=4255||mn.Khmer(f))}function wS(f){for(const c of f)if(aw(c.charCodeAt(0)))return!0;return!1}const g0="deferred",v0="loading",U_="loaded";let pg=null,I="unavailable",h=null;const b=function(f){f&&typeof f=="string"&&f.indexOf("NetworkError")>-1&&(I="error"),pg&&pg(f)};function R(){U.fire(new es("pluginStateChange",{pluginStatus:I,pluginURL:h}))}const U=new Ns,K=function(){return I},ne=function(){if(I!==g0||!h)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");I=v0,R(),h&&Dt({url:h},f=>{f?b(f):(I=U_,R())})},ae={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:()=>I===U_||ae.applyArabicShaping!=null,isLoading:()=>I===v0,setState(f){I=f.pluginStatus,h=f.pluginURL},isParsed:()=>ae.applyArabicShaping!=null&&ae.processBidirectionalText!=null&&ae.processStyledBidirectionalText!=null,getPluginURL:()=>h};class he{constructor(c,d){this.zoom=c,d?(this.now=d.now,this.fadeDuration=d.fadeDuration,this.transition=d.transition,this.pitch=d.pitch):(this.now=0,this.fadeDuration=0,this.transition={},this.pitch=0)}isSupportedScript(c){return function(d,g){for(const S of d)if(!bS(S.charCodeAt(0),g))return!1;return!0}(c,ae.isLoaded())}}class be{constructor(c,d){this.property=c,this.value=d,this.expression=function(g,S){if(Ah(g))return new Qp(g,S);if(Pd(g)){const M=Rh(g,S);if(M.result==="error")throw new Error(M.value.map(L=>`${L.key}: ${L.message}`).join(", "));return M.value}{let M=g;return typeof g=="string"&&S.type==="color"&&(M=Bn.parse(g)),{kind:"constant",evaluate:()=>M}}}(d===void 0?c.specification.default:d,c.specification)}isDataDriven(){return this.expression.kind==="source"||this.expression.kind==="composite"}possiblyEvaluate(c,d,g){return this.property.possiblyEvaluate(this,c,d,g)}}class we{constructor(c){this.property=c,this.value=new be(c,void 0)}transitioned(c,d){return new He(this.property,this.value,d,J({},c.transition,this.transition),c.now)}untransitioned(){return new He(this.property,this.value,null,{},0)}}class Le{constructor(c){this._properties=c,this._values=Object.create(c.defaultTransitionablePropertyValues)}getValue(c){return Re(this._values[c].value.value)}setValue(c,d){this._values.hasOwnProperty(c)||(this._values[c]=new we(this._values[c].property)),this._values[c].value=new be(this._values[c].property,d===null?void 0:Re(d))}getTransition(c){return Re(this._values[c].transition)}setTransition(c,d){this._values.hasOwnProperty(c)||(this._values[c]=new we(this._values[c].property)),this._values[c].transition=Re(d)||void 0}serialize(){const c={};for(const d of Object.keys(this._values)){const g=this.getValue(d);g!==void 0&&(c[d]=g);const S=this.getTransition(d);S!==void 0&&(c[`${d}-transition`]=S)}return c}transitioned(c,d){const g=new rt(this._properties);for(const S of Object.keys(this._values))g._values[S]=this._values[S].transitioned(c,d._values[S]);return g}untransitioned(){const c=new rt(this._properties);for(const d of Object.keys(this._values))c._values[d]=this._values[d].untransitioned();return c}}class He{constructor(c,d,g,S,M){const L=S.delay||0,V=S.duration||0;M=M||0,this.property=c,this.value=d,this.begin=M+L,this.end=this.begin+V,c.specification.transition&&(S.delay||S.duration)&&(this.prior=g)}possiblyEvaluate(c,d,g){const S=c.now||0,M=this.value.possiblyEvaluate(c,d,g),L=this.prior;if(L){if(S>this.end)return this.prior=null,M;if(this.value.isDataDriven())return this.prior=null,M;if(S<this.begin)return L.possiblyEvaluate(c,d,g);{const V=(S-this.begin)/(this.end-this.begin);return this.property.interpolate(L.possiblyEvaluate(c,d,g),M,O(V))}}return M}}class rt{constructor(c){this._properties=c,this._values=Object.create(c.defaultTransitioningPropertyValues)}possiblyEvaluate(c,d,g){const S=new ut(this._properties);for(const M of Object.keys(this._values))S._values[M]=this._values[M].possiblyEvaluate(c,d,g);return S}hasTransition(){for(const c of Object.keys(this._values))if(this._values[c].prior)return!0;return!1}}class st{constructor(c){this._properties=c,this._values=Object.create(c.defaultPropertyValues)}getValue(c){return Re(this._values[c].value)}setValue(c,d){this._values[c]=new be(this._values[c].property,d===null?void 0:Re(d))}serialize(){const c={};for(const d of Object.keys(this._values)){const g=this.getValue(d);g!==void 0&&(c[d]=g)}return c}possiblyEvaluate(c,d,g){const S=new ut(this._properties);for(const M of Object.keys(this._values))S._values[M]=this._values[M].possiblyEvaluate(c,d,g);return S}}class at{constructor(c,d,g){this.property=c,this.value=d,this.parameters=g}isConstant(){return this.value.kind==="constant"}constantOr(c){return this.value.kind==="constant"?this.value.value:c}evaluate(c,d,g,S){return this.property.evaluate(this.value,this.parameters,c,d,g,S)}}class ut{constructor(c){this._properties=c,this._values=Object.create(c.defaultPossiblyEvaluatedValues)}get(c){return this._values[c]}}class De{constructor(c){this.specification=c}possiblyEvaluate(c,d){return c.expression.evaluate(d)}interpolate(c,d,g){const S=cc[this.specification.type];return S?S(c,d,g):c}}class it{constructor(c,d){this.specification=c,this.overrides=d}possiblyEvaluate(c,d,g,S){return new at(this,c.expression.kind==="constant"||c.expression.kind==="camera"?{kind:"constant",value:c.expression.evaluate(d,null,{},g,S)}:c.expression,d)}interpolate(c,d,g){if(c.value.kind!=="constant"||d.value.kind!=="constant")return c;if(c.value.value===void 0||d.value.value===void 0)return new at(this,{kind:"constant",value:void 0},c.parameters);const S=cc[this.specification.type];return S?new at(this,{kind:"constant",value:S(c.value.value,d.value.value,g)},c.parameters):c}evaluate(c,d,g,S,M,L){return c.kind==="constant"?c.value:c.evaluate(d,g,S,M,L)}}class yt{constructor(c){this.specification=c}possiblyEvaluate(c,d,g,S){return!!c.expression.evaluate(d,null,{},g,S)}interpolate(){return!1}}class mt{constructor(c){this.properties=c,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];const d=new he(0,{});for(const g in c){const S=c[g];S.specification.overridable&&this.overridableProperties.push(g);const M=this.defaultPropertyValues[g]=new be(S,void 0),L=this.defaultTransitionablePropertyValues[g]=new we(S);this.defaultTransitioningPropertyValues[g]=L.untransitioned(),this.defaultPossiblyEvaluatedValues[g]=M.possiblyEvaluate(d)}}}function kt(f,c){return 256*(f=q(Math.floor(f),0,255))+q(Math.floor(c),0,255)}Sn(it,"DataDrivenProperty"),Sn(De,"DataConstantProperty"),Sn(yt,"ColorRampProperty");const Lt={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};class At{constructor(c,d){this._structArray=c,this._pos1=d*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}}class Yt{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(c,d){return c._trim(),d&&(c.isTransferred=!0,d.push(c.arrayBuffer)),{length:c.length,arrayBuffer:c.arrayBuffer}}static deserialize(c){const d=Object.create(this.prototype);return d.arrayBuffer=c.arrayBuffer,d.length=c.length,d.capacity=c.arrayBuffer.byteLength/d.bytesPerElement,d._refreshViews(),d}_trim(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())}clear(){this.length=0}resize(c){this.reserve(c),this.length=c}reserve(c){if(c>this.capacity){this.capacity=Math.max(c,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);const d=this.uint8;this._refreshViews(),d&&this.uint8.set(d)}}_refreshViews(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")}destroy(){this.int8=this.uint8=this.int16=this.uint16=this.int32=this.uint32=this.float32=null,this.arrayBuffer=null}}function Vt(f,c=1){let d=0,g=0;return{members:f.map(S=>{const M=Lt[S.type].BYTES_PER_ELEMENT,L=d=or(d,Math.max(c,M)),V=S.components||1;return g=Math.max(g,M),d+=M*V,{name:S.name,type:S.type,components:V,offset:L}}),size:or(d,Math.max(g,c)),alignment:c}}function or(f,c){return Math.ceil(f/c)*c}class Wr extends Yt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(c,d){const g=this.length;return this.resize(g+1),this.emplace(g,c,d)}emplace(c,d,g){const S=2*c;return this.int16[S+0]=d,this.int16[S+1]=g,c}}Wr.prototype.bytesPerElement=4,Sn(Wr,"StructArrayLayout2i4");class Qt extends Yt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(c,d,g){const S=this.length;return this.resize(S+1),this.emplace(S,c,d,g)}emplace(c,d,g,S){const M=3*c;return this.int16[M+0]=d,this.int16[M+1]=g,this.int16[M+2]=S,c}}Qt.prototype.bytesPerElement=6,Sn(Qt,"StructArrayLayout3i6");class Tr extends Yt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(c,d,g,S){const M=this.length;return this.resize(M+1),this.emplace(M,c,d,g,S)}emplace(c,d,g,S,M){const L=4*c;return this.int16[L+0]=d,this.int16[L+1]=g,this.int16[L+2]=S,this.int16[L+3]=M,c}}Tr.prototype.bytesPerElement=8,Sn(Tr,"StructArrayLayout4i8");class fr extends Yt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(c,d,g,S,M,L,V){const Q=this.length;return this.resize(Q+1),this.emplace(Q,c,d,g,S,M,L,V)}emplace(c,d,g,S,M,L,V,Q){const te=6*c,ue=12*c,ge=3*c;return this.int16[te+0]=d,this.int16[te+1]=g,this.uint8[ue+4]=S,this.uint8[ue+5]=M,this.uint8[ue+6]=L,this.uint8[ue+7]=V,this.float32[ge+2]=Q,c}}fr.prototype.bytesPerElement=12,Sn(fr,"StructArrayLayout2i4ub1f12");class jr extends Yt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(c,d,g,S){const M=this.length;return this.resize(M+1),this.emplace(M,c,d,g,S)}emplace(c,d,g,S,M){const L=4*c;return this.float32[L+0]=d,this.float32[L+1]=g,this.float32[L+2]=S,this.float32[L+3]=M,c}}jr.prototype.bytesPerElement=16,Sn(jr,"StructArrayLayout4f16");class lr extends Yt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(c,d,g,S,M){const L=this.length;return this.resize(L+1),this.emplace(L,c,d,g,S,M)}emplace(c,d,g,S,M,L){const V=6*c,Q=3*c;return this.uint16[V+0]=d,this.uint16[V+1]=g,this.uint16[V+2]=S,this.uint16[V+3]=M,this.float32[Q+2]=L,c}}lr.prototype.bytesPerElement=12,Sn(lr,"StructArrayLayout4ui1f12");class xr extends Yt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(c,d,g,S){const M=this.length;return this.resize(M+1),this.emplace(M,c,d,g,S)}emplace(c,d,g,S,M){const L=4*c;return this.uint16[L+0]=d,this.uint16[L+1]=g,this.uint16[L+2]=S,this.uint16[L+3]=M,c}}xr.prototype.bytesPerElement=8,Sn(xr,"StructArrayLayout4ui8");class qr extends Yt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(c,d,g,S,M,L){const V=this.length;return this.resize(V+1),this.emplace(V,c,d,g,S,M,L)}emplace(c,d,g,S,M,L,V){const Q=6*c;return this.int16[Q+0]=d,this.int16[Q+1]=g,this.int16[Q+2]=S,this.int16[Q+3]=M,this.int16[Q+4]=L,this.int16[Q+5]=V,c}}qr.prototype.bytesPerElement=12,Sn(qr,"StructArrayLayout6i12");class Rr extends Yt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(c,d,g,S,M,L,V,Q,te,ue,ge,_e){const Me=this.length;return this.resize(Me+1),this.emplace(Me,c,d,g,S,M,L,V,Q,te,ue,ge,_e)}emplace(c,d,g,S,M,L,V,Q,te,ue,ge,_e,Me){const Ae=12*c;return this.int16[Ae+0]=d,this.int16[Ae+1]=g,this.int16[Ae+2]=S,this.int16[Ae+3]=M,this.uint16[Ae+4]=L,this.uint16[Ae+5]=V,this.uint16[Ae+6]=Q,this.uint16[Ae+7]=te,this.int16[Ae+8]=ue,this.int16[Ae+9]=ge,this.int16[Ae+10]=_e,this.int16[Ae+11]=Me,c}}Rr.prototype.bytesPerElement=24,Sn(Rr,"StructArrayLayout4i4ui4i24");class Yr extends Yt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(c,d,g,S,M,L){const V=this.length;return this.resize(V+1),this.emplace(V,c,d,g,S,M,L)}emplace(c,d,g,S,M,L,V){const Q=10*c,te=5*c;return this.int16[Q+0]=d,this.int16[Q+1]=g,this.int16[Q+2]=S,this.float32[te+2]=M,this.float32[te+3]=L,this.float32[te+4]=V,c}}Yr.prototype.bytesPerElement=20,Sn(Yr,"StructArrayLayout3i3f20");class Nn extends Yt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(c){const d=this.length;return this.resize(d+1),this.emplace(d,c)}emplace(c,d){return this.uint32[1*c+0]=d,c}}Nn.prototype.bytesPerElement=4,Sn(Nn,"StructArrayLayout1ul4");class li extends Yt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(c,d,g,S,M,L,V,Q,te,ue,ge,_e,Me){const Ae=this.length;return this.resize(Ae+1),this.emplace(Ae,c,d,g,S,M,L,V,Q,te,ue,ge,_e,Me)}emplace(c,d,g,S,M,L,V,Q,te,ue,ge,_e,Me,Ae){const Ne=20*c,Qe=10*c;return this.int16[Ne+0]=d,this.int16[Ne+1]=g,this.int16[Ne+2]=S,this.int16[Ne+3]=M,this.int16[Ne+4]=L,this.float32[Qe+3]=V,this.float32[Qe+4]=Q,this.float32[Qe+5]=te,this.float32[Qe+6]=ue,this.int16[Ne+14]=ge,this.uint32[Qe+8]=_e,this.uint16[Ne+18]=Me,this.uint16[Ne+19]=Ae,c}}li.prototype.bytesPerElement=40,Sn(li,"StructArrayLayout5i4f1i1ul2ui40");class Cn extends Yt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(c,d,g,S,M,L,V){const Q=this.length;return this.resize(Q+1),this.emplace(Q,c,d,g,S,M,L,V)}emplace(c,d,g,S,M,L,V,Q){const te=8*c;return this.int16[te+0]=d,this.int16[te+1]=g,this.int16[te+2]=S,this.int16[te+4]=M,this.int16[te+5]=L,this.int16[te+6]=V,this.int16[te+7]=Q,c}}Cn.prototype.bytesPerElement=16,Sn(Cn,"StructArrayLayout3i2i2i16");class Gn extends Yt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(c,d,g,S,M){const L=this.length;return this.resize(L+1),this.emplace(L,c,d,g,S,M)}emplace(c,d,g,S,M,L){const V=4*c,Q=8*c;return this.float32[V+0]=d,this.float32[V+1]=g,this.float32[V+2]=S,this.int16[Q+6]=M,this.int16[Q+7]=L,c}}Gn.prototype.bytesPerElement=16,Sn(Gn,"StructArrayLayout2f1f2i16");class Ri extends Yt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(c,d,g,S){const M=this.length;return this.resize(M+1),this.emplace(M,c,d,g,S)}emplace(c,d,g,S,M){const L=12*c,V=3*c;return this.uint8[L+0]=d,this.uint8[L+1]=g,this.float32[V+1]=S,this.float32[V+2]=M,c}}Ri.prototype.bytesPerElement=12,Sn(Ri,"StructArrayLayout2ub2f12");class bi extends Yt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(c,d,g){const S=this.length;return this.resize(S+1),this.emplace(S,c,d,g)}emplace(c,d,g,S){const M=3*c;return this.float32[M+0]=d,this.float32[M+1]=g,this.float32[M+2]=S,c}}bi.prototype.bytesPerElement=12,Sn(bi,"StructArrayLayout3f12");class An extends Yt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(c,d,g){const S=this.length;return this.resize(S+1),this.emplace(S,c,d,g)}emplace(c,d,g,S){const M=3*c;return this.uint16[M+0]=d,this.uint16[M+1]=g,this.uint16[M+2]=S,c}}An.prototype.bytesPerElement=6,Sn(An,"StructArrayLayout3ui6");class _o extends Yt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(c,d,g,S,M,L,V,Q,te,ue,ge,_e,Me,Ae,Ne,Qe,ft,Ct,dt,wt,Rt){const Mt=this.length;return this.resize(Mt+1),this.emplace(Mt,c,d,g,S,M,L,V,Q,te,ue,ge,_e,Me,Ae,Ne,Qe,ft,Ct,dt,wt,Rt)}emplace(c,d,g,S,M,L,V,Q,te,ue,ge,_e,Me,Ae,Ne,Qe,ft,Ct,dt,wt,Rt,Mt){const cr=30*c,sr=15*c,Cr=60*c;return this.int16[cr+0]=d,this.int16[cr+1]=g,this.int16[cr+2]=S,this.float32[sr+2]=M,this.float32[sr+3]=L,this.uint16[cr+8]=V,this.uint16[cr+9]=Q,this.uint32[sr+5]=te,this.uint32[sr+6]=ue,this.uint32[sr+7]=ge,this.uint16[cr+16]=_e,this.uint16[cr+17]=Me,this.uint16[cr+18]=Ae,this.float32[sr+10]=Ne,this.float32[sr+11]=Qe,this.uint8[Cr+48]=ft,this.uint8[Cr+49]=Ct,this.uint8[Cr+50]=dt,this.uint32[sr+13]=wt,this.int16[cr+28]=Rt,this.uint8[Cr+58]=Mt,c}}_o.prototype.bytesPerElement=60,Sn(_o,"StructArrayLayout3i2f2ui3ul3ui2f3ub1ul1i1ub60");class Vo extends Yt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(c,d,g,S,M,L,V,Q,te,ue,ge,_e,Me,Ae,Ne,Qe,ft,Ct,dt,wt,Rt,Mt,cr,sr,Cr,Kr,hr,Mr,Ar,$r){const Qr=this.length;return this.resize(Qr+1),this.emplace(Qr,c,d,g,S,M,L,V,Q,te,ue,ge,_e,Me,Ae,Ne,Qe,ft,Ct,dt,wt,Rt,Mt,cr,sr,Cr,Kr,hr,Mr,Ar,$r)}emplace(c,d,g,S,M,L,V,Q,te,ue,ge,_e,Me,Ae,Ne,Qe,ft,Ct,dt,wt,Rt,Mt,cr,sr,Cr,Kr,hr,Mr,Ar,$r,Qr){const _r=38*c,yn=19*c;return this.int16[_r+0]=d,this.int16[_r+1]=g,this.int16[_r+2]=S,this.float32[yn+2]=M,this.float32[yn+3]=L,this.int16[_r+8]=V,this.int16[_r+9]=Q,this.int16[_r+10]=te,this.int16[_r+11]=ue,this.int16[_r+12]=ge,this.int16[_r+13]=_e,this.uint16[_r+14]=Me,this.uint16[_r+15]=Ae,this.uint16[_r+16]=Ne,this.uint16[_r+17]=Qe,this.uint16[_r+18]=ft,this.uint16[_r+19]=Ct,this.uint16[_r+20]=dt,this.uint16[_r+21]=wt,this.uint16[_r+22]=Rt,this.uint16[_r+23]=Mt,this.uint16[_r+24]=cr,this.uint16[_r+25]=sr,this.uint16[_r+26]=Cr,this.uint16[_r+27]=Kr,this.uint16[_r+28]=hr,this.uint32[yn+15]=Mr,this.float32[yn+16]=Ar,this.float32[yn+17]=$r,this.float32[yn+18]=Qr,c}}Vo.prototype.bytesPerElement=76,Sn(Vo,"StructArrayLayout3i2f6i15ui1ul3f76");class Ho extends Yt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(c){const d=this.length;return this.resize(d+1),this.emplace(d,c)}emplace(c,d){return this.float32[1*c+0]=d,c}}Ho.prototype.bytesPerElement=4,Sn(Ho,"StructArrayLayout1f4");class No extends Yt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(c,d,g,S,M){const L=this.length;return this.resize(L+1),this.emplace(L,c,d,g,S,M)}emplace(c,d,g,S,M,L){const V=5*c;return this.float32[V+0]=d,this.float32[V+1]=g,this.float32[V+2]=S,this.float32[V+3]=M,this.float32[V+4]=L,c}}No.prototype.bytesPerElement=20,Sn(No,"StructArrayLayout5f20");class il extends Yt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(c,d,g,S){const M=this.length;return this.resize(M+1),this.emplace(M,c,d,g,S)}emplace(c,d,g,S,M){const L=6*c;return this.uint32[3*c+0]=d,this.uint16[L+2]=g,this.uint16[L+3]=S,this.uint16[L+4]=M,c}}il.prototype.bytesPerElement=12,Sn(il,"StructArrayLayout1ul3ui12");class ol extends Yt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(c,d){const g=this.length;return this.resize(g+1),this.emplace(g,c,d)}emplace(c,d,g){const S=2*c;return this.uint16[S+0]=d,this.uint16[S+1]=g,c}}ol.prototype.bytesPerElement=4,Sn(ol,"StructArrayLayout2ui4");class dc extends Yt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(c){const d=this.length;return this.resize(d+1),this.emplace(d,c)}emplace(c,d){return this.uint16[1*c+0]=d,c}}dc.prototype.bytesPerElement=2,Sn(dc,"StructArrayLayout1ui2");class qu extends Yt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(c,d){const g=this.length;return this.resize(g+1),this.emplace(g,c,d)}emplace(c,d,g){const S=2*c;return this.float32[S+0]=d,this.float32[S+1]=g,c}}qu.prototype.bytesPerElement=8,Sn(qu,"StructArrayLayout2f8");class cs extends At{get projectedAnchorX(){return this._structArray.int16[this._pos2+0]}get projectedAnchorY(){return this._structArray.int16[this._pos2+1]}get projectedAnchorZ(){return this._structArray.int16[this._pos2+2]}get tileAnchorX(){return this._structArray.int16[this._pos2+3]}get tileAnchorY(){return this._structArray.int16[this._pos2+4]}get x1(){return this._structArray.float32[this._pos4+3]}get y1(){return this._structArray.float32[this._pos4+4]}get x2(){return this._structArray.float32[this._pos4+5]}get y2(){return this._structArray.float32[this._pos4+6]}get padding(){return this._structArray.int16[this._pos2+14]}get featureIndex(){return this._structArray.uint32[this._pos4+8]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+18]}get bucketIndex(){return this._structArray.uint16[this._pos2+19]}}cs.prototype.size=40;class $o extends li{get(c){return new cs(this,c)}}Sn($o,"CollisionBoxArray");class qi extends At{get projectedAnchorX(){return this._structArray.int16[this._pos2+0]}get projectedAnchorY(){return this._structArray.int16[this._pos2+1]}get projectedAnchorZ(){return this._structArray.int16[this._pos2+2]}get tileAnchorX(){return this._structArray.float32[this._pos4+2]}get tileAnchorY(){return this._structArray.float32[this._pos4+3]}get glyphStartIndex(){return this._structArray.uint16[this._pos2+8]}get numGlyphs(){return this._structArray.uint16[this._pos2+9]}get vertexStartIndex(){return this._structArray.uint32[this._pos4+5]}get lineStartIndex(){return this._structArray.uint32[this._pos4+6]}get lineLength(){return this._structArray.uint32[this._pos4+7]}get segment(){return this._structArray.uint16[this._pos2+16]}get lowerSize(){return this._structArray.uint16[this._pos2+17]}get upperSize(){return this._structArray.uint16[this._pos2+18]}get lineOffsetX(){return this._structArray.float32[this._pos4+10]}get lineOffsetY(){return this._structArray.float32[this._pos4+11]}get writingMode(){return this._structArray.uint8[this._pos1+48]}get placedOrientation(){return this._structArray.uint8[this._pos1+49]}set placedOrientation(c){this._structArray.uint8[this._pos1+49]=c}get hidden(){return this._structArray.uint8[this._pos1+50]}set hidden(c){this._structArray.uint8[this._pos1+50]=c}get crossTileID(){return this._structArray.uint32[this._pos4+13]}set crossTileID(c){this._structArray.uint32[this._pos4+13]=c}get associatedIconIndex(){return this._structArray.int16[this._pos2+28]}get flipState(){return this._structArray.uint8[this._pos1+58]}set flipState(c){this._structArray.uint8[this._pos1+58]=c}}qi.prototype.size=60;class aa extends _o{get(c){return new qi(this,c)}}Sn(aa,"PlacedSymbolArray");class Ml extends At{get projectedAnchorX(){return this._structArray.int16[this._pos2+0]}get projectedAnchorY(){return this._structArray.int16[this._pos2+1]}get projectedAnchorZ(){return this._structArray.int16[this._pos2+2]}get tileAnchorX(){return this._structArray.float32[this._pos4+2]}get tileAnchorY(){return this._structArray.float32[this._pos4+3]}get rightJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+8]}get centerJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+9]}get leftJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+10]}get verticalPlacedTextSymbolIndex(){return this._structArray.int16[this._pos2+11]}get placedIconSymbolIndex(){return this._structArray.int16[this._pos2+12]}get verticalPlacedIconSymbolIndex(){return this._structArray.int16[this._pos2+13]}get key(){return this._structArray.uint16[this._pos2+14]}get textBoxStartIndex(){return this._structArray.uint16[this._pos2+15]}get textBoxEndIndex(){return this._structArray.uint16[this._pos2+16]}get verticalTextBoxStartIndex(){return this._structArray.uint16[this._pos2+17]}get verticalTextBoxEndIndex(){return this._structArray.uint16[this._pos2+18]}get iconBoxStartIndex(){return this._structArray.uint16[this._pos2+19]}get iconBoxEndIndex(){return this._structArray.uint16[this._pos2+20]}get verticalIconBoxStartIndex(){return this._structArray.uint16[this._pos2+21]}get verticalIconBoxEndIndex(){return this._structArray.uint16[this._pos2+22]}get featureIndex(){return this._structArray.uint16[this._pos2+23]}get numHorizontalGlyphVertices(){return this._structArray.uint16[this._pos2+24]}get numVerticalGlyphVertices(){return this._structArray.uint16[this._pos2+25]}get numIconVertices(){return this._structArray.uint16[this._pos2+26]}get numVerticalIconVertices(){return this._structArray.uint16[this._pos2+27]}get useRuntimeCollisionCircles(){return this._structArray.uint16[this._pos2+28]}get crossTileID(){return this._structArray.uint32[this._pos4+15]}set crossTileID(c){this._structArray.uint32[this._pos4+15]=c}get textOffset0(){return this._structArray.float32[this._pos4+16]}get textOffset1(){return this._structArray.float32[this._pos4+17]}get collisionCircleDiameter(){return this._structArray.float32[this._pos4+18]}}Ml.prototype.size=76;class ts extends Vo{get(c){return new Ml(this,c)}}Sn(ts,"SymbolInstanceArray");class hc extends Ho{getoffsetX(c){return this.float32[1*c+0]}}Sn(hc,"GlyphOffsetArray");class Ov extends Wr{getx(c){return this.int16[2*c+0]}gety(c){return this.int16[2*c+1]}}Sn(Ov,"SymbolLineVertexArray");class tm extends At{get featureIndex(){return this._structArray.uint32[this._pos4+0]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+2]}get bucketIndex(){return this._structArray.uint16[this._pos2+3]}get layoutVertexArrayOffset(){return this._structArray.uint16[this._pos2+4]}}tm.prototype.size=12;class rm extends il{get(c){return new tm(this,c)}}Sn(rm,"FeatureIndexArray");class Lf extends ol{geta_centroid_pos0(c){return this.uint16[2*c+0]}geta_centroid_pos1(c){return this.uint16[2*c+1]}}Sn(Lf,"FillExtrusionCentroidArray");const Df=Vt([{name:"a_pattern",components:4,type:"Uint16"},{name:"a_pixel_ratio",components:1,type:"Float32"}]),nm=Vt([{name:"a_dash",components:4,type:"Uint16"}]);var mg={exports:{}},ki={exports:{}};ki.exports=function(f,c){var d,g,S,M,L,V,Q,te;for(g=f.length-(d=3&f.length),S=c,L=3432918353,V=461845907,te=0;te<g;)Q=255&f.charCodeAt(te)|(255&f.charCodeAt(++te))<<8|(255&f.charCodeAt(++te))<<16|(255&f.charCodeAt(++te))<<24,++te,S=27492+(65535&(M=5*(65535&(S=(S^=Q=(65535&(Q=(Q=(65535&Q)*L+(((Q>>>16)*L&65535)<<16)&4294967295)<<15|Q>>>17))*V+(((Q>>>16)*V&65535)<<16)&4294967295)<<13|S>>>19))+((5*(S>>>16)&65535)<<16)&4294967295))+((58964+(M>>>16)&65535)<<16);switch(Q=0,d){case 3:Q^=(255&f.charCodeAt(te+2))<<16;case 2:Q^=(255&f.charCodeAt(te+1))<<8;case 1:S^=Q=(65535&(Q=(Q=(65535&(Q^=255&f.charCodeAt(te)))*L+(((Q>>>16)*L&65535)<<16)&4294967295)<<15|Q>>>17))*V+(((Q>>>16)*V&65535)<<16)&4294967295}return S^=f.length,S=2246822507*(65535&(S^=S>>>16))+((2246822507*(S>>>16)&65535)<<16)&4294967295,S=3266489909*(65535&(S^=S>>>13))+((3266489909*(S>>>16)&65535)<<16)&4294967295,(S^=S>>>16)>>>0};var V_=ki.exports,UA={exports:{}};UA.exports=function(f,c){for(var d,g=f.length,S=c^g,M=0;g>=4;)d=1540483477*(65535&(d=255&f.charCodeAt(M)|(255&f.charCodeAt(++M))<<8|(255&f.charCodeAt(++M))<<16|(255&f.charCodeAt(++M))<<24))+((1540483477*(d>>>16)&65535)<<16),S=1540483477*(65535&S)+((1540483477*(S>>>16)&65535)<<16)^(d=1540483477*(65535&(d^=d>>>24))+((1540483477*(d>>>16)&65535)<<16)),g-=4,++M;switch(g){case 3:S^=(255&f.charCodeAt(M+2))<<16;case 2:S^=(255&f.charCodeAt(M+1))<<8;case 1:S=1540483477*(65535&(S^=255&f.charCodeAt(M)))+((1540483477*(S>>>16)&65535)<<16)}return S=1540483477*(65535&(S^=S>>>13))+((1540483477*(S>>>16)&65535)<<16),(S^=S>>>15)>>>0};var y0=V_,VA=UA.exports;mg.exports=y0,mg.exports.murmur3=y0,mg.exports.murmur2=VA;var CS=T(mg.exports);class lw{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(c,d,g,S){this.ids.push(Xu(c)),this.positions.push(d,g,S)}getPositions(c){const d=Xu(c);let g=0,S=this.ids.length-1;for(;g<S;){const L=g+S>>1;this.ids[L]>=d?S=L:g=L+1}const M=[];for(;this.ids[g]===d;)M.push({index:this.positions[3*g],start:this.positions[3*g+1],end:this.positions[3*g+2]}),g++;return M}static serialize(c,d){const g=new Float64Array(c.ids),S=new Uint32Array(c.positions);return ES(g,S,0,g.length-1),d&&d.push(g.buffer,S.buffer),{ids:g,positions:S}}static deserialize(c){const d=new lw;return d.ids=c.ids,d.positions=c.positions,d.indexed=!0,d}}function Xu(f){const c=+f;return!isNaN(c)&&Number.MIN_SAFE_INTEGER<=c&&c<=Number.MAX_SAFE_INTEGER?c:CS(String(f))}function ES(f,c,d,g){for(;d<g;){const S=f[d+g>>1];let M=d-1,L=g+1;for(;;){do M++;while(f[M]<S);do L--;while(f[L]>S);if(M>=L)break;Lv(f,M,L),Lv(c,3*M,3*L),Lv(c,3*M+1,3*L+1),Lv(c,3*M+2,3*L+2)}L-d<g-L?(ES(f,c,d,L),d=L+1):(ES(f,c,L+1,g),g=L)}}function Lv(f,c,d){const g=f[c];f[c]=f[d],f[d]=g}Sn(lw,"FeaturePositionMap");class Md{constructor(c){this.gl=c.gl,this.initialized=!1}fetchUniformLocation(c,d){return this.location||this.initialized||(this.location=this.gl.getUniformLocation(c,d),this.initialized=!0),!!this.location}}class H_ extends Md{constructor(c){super(c),this.current=0}set(c,d,g){this.fetchUniformLocation(c,d)&&this.current!==g&&(this.current=g,this.gl.uniform1f(this.location,g))}}class SS extends Md{constructor(c){super(c),this.current=[0,0,0,0]}set(c,d,g){this.fetchUniformLocation(c,d)&&(g[0]===this.current[0]&&g[1]===this.current[1]&&g[2]===this.current[2]&&g[3]===this.current[3]||(this.current=g,this.gl.uniform4f(this.location,g[0],g[1],g[2],g[3])))}}class uu extends Md{constructor(c){super(c),this.current=Bn.transparent}set(c,d,g){this.fetchUniformLocation(c,d)&&(g.r===this.current.r&&g.g===this.current.g&&g.b===this.current.b&&g.a===this.current.a||(this.current=g,this.gl.uniform4f(this.location,g.r,g.g,g.b,g.a)))}}const gg=new Float32Array(16),TS=new Float32Array(9),HA=new Float32Array(4);function x0(f){return[kt(255*f.r,255*f.g),kt(255*f.b,255*f.a)]}class _0{constructor(c,d,g){this.value=c,this.uniformNames=d.map(S=>`u_${S}`),this.type=g}setUniform(c,d,g,S,M){d.set(c,M,S.constantOr(this.value))}getBinding(c,d){return this.type==="color"?new uu(c):new H_(c)}}class vg{constructor(c,d){this.uniformNames=d.map(g=>`u_${g}`),this.pattern=null,this.pixelRatio=1}setConstantPatternPositions(c){this.pixelRatio=c.pixelRatio||1,this.pattern=c.tl.concat(c.br)}setUniform(c,d,g,S,M){const L=M==="u_pattern"||M==="u_dash"?this.pattern:M==="u_pixel_ratio"?this.pixelRatio:null;L&&d.set(c,M,L)}getBinding(c,d){return d==="u_pattern"||d==="u_dash"?new SS(c):new H_(c)}}class $h{constructor(c,d,g,S){this.expression=c,this.type=g,this.maxValue=0,this.paintVertexAttributes=d.map(M=>({name:`a_${M}`,type:"Float32",components:g==="color"?2:1,offset:0})),this.paintVertexArray=new S}populatePaintArray(c,d,g,S,M,L){const V=this.paintVertexArray.length,Q=this.expression.evaluate(new he(0),d,{},M,S,L);this.paintVertexArray.resize(c),this._setPaintValue(V,c,Q)}updatePaintArray(c,d,g,S,M){const L=this.expression.evaluate({zoom:0},g,S,void 0,M);this._setPaintValue(c,d,L)}_setPaintValue(c,d,g){if(this.type==="color"){const S=x0(g);for(let M=c;M<d;M++)this.paintVertexArray.emplace(M,S[0],S[1])}else{for(let S=c;S<d;S++)this.paintVertexArray.emplace(S,g);this.maxValue=Math.max(this.maxValue,Math.abs(g))}}upload(c){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=c.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))}destroy(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()}}class Yu{constructor(c,d,g,S,M,L){this.expression=c,this.uniformNames=d.map(V=>`u_${V}_t`),this.type=g,this.useIntegerZoom=S,this.zoom=M,this.maxValue=0,this.paintVertexAttributes=d.map(V=>({name:`a_${V}`,type:"Float32",components:g==="color"?4:2,offset:0})),this.paintVertexArray=new L}populatePaintArray(c,d,g,S,M,L){const V=this.expression.evaluate(new he(this.zoom),d,{},M,S,L),Q=this.expression.evaluate(new he(this.zoom+1),d,{},M,S,L),te=this.paintVertexArray.length;this.paintVertexArray.resize(c),this._setPaintValue(te,c,V,Q)}updatePaintArray(c,d,g,S,M){const L=this.expression.evaluate({zoom:this.zoom},g,S,void 0,M),V=this.expression.evaluate({zoom:this.zoom+1},g,S,void 0,M);this._setPaintValue(c,d,L,V)}_setPaintValue(c,d,g,S){if(this.type==="color"){const M=x0(g),L=x0(S);for(let V=c;V<d;V++)this.paintVertexArray.emplace(V,M[0],M[1],L[0],L[1])}else{for(let M=c;M<d;M++)this.paintVertexArray.emplace(M,g,S);this.maxValue=Math.max(this.maxValue,Math.abs(g),Math.abs(S))}}upload(c){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=c.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))}destroy(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()}setUniform(c,d,g,S,M){const L=this.useIntegerZoom?Math.floor(g.zoom):g.zoom,V=q(this.expression.interpolationFactor(L,this.zoom,this.zoom+1),0,1);d.set(c,M,V)}getBinding(c,d){return new H_(c)}}class Fh{constructor(c,d,g,S,M){this.expression=c,this.layerId=M,this.paintVertexAttributes=(g==="array"?nm:Df).members;for(let L=0;L<d.length;++L);this.paintVertexArray=new S}populatePaintArray(c,d,g){const S=this.paintVertexArray.length;this.paintVertexArray.resize(c),this._setPaintValues(S,c,d.patterns&&d.patterns[this.layerId],g)}updatePaintArray(c,d,g,S,M,L){this._setPaintValues(c,d,g.patterns&&g.patterns[this.layerId],L)}_setPaintValues(c,d,g,S){if(!S||!g)return;const M=S[g];if(!M)return;const{tl:L,br:V,pixelRatio:Q}=M;for(let te=c;te<d;te++)this.paintVertexArray.emplace(te,L[0],L[1],V[0],V[1],Q)}upload(c){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer=c.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))}destroy(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()}}class Dc{constructor(c,d,g=()=>!0){this.binders={},this._buffers=[];const S=[];for(const M in c.paint._values){if(!g(M))continue;const L=c.paint.get(M);if(!(L instanceof at&&sg(L.property.specification)))continue;const V=WA(M,c.type),Q=L.value,te=L.property.specification.type,ue=!!L.property.useIntegerZoom,ge=M==="line-dasharray"||M.endsWith("pattern"),_e=M==="line-dasharray"&&c.layout.get("line-cap").value.kind!=="constant";if(Q.kind!=="constant"||_e)if(Q.kind==="source"||_e||ge){const Me=qA(M,te,"source");this.binders[M]=ge?new Fh(Q,V,te,Me,c.id):new $h(Q,V,te,Me),S.push(`/a_${M}`)}else{const Me=qA(M,te,"composite");this.binders[M]=new Yu(Q,V,te,ue,d,Me),S.push(`/z_${M}`)}else this.binders[M]=ge?new vg(Q.value,V):new _0(Q.value,V,te),S.push(`/u_${M}`)}this.cacheKey=S.sort().join("")}getMaxValue(c){const d=this.binders[c];return d instanceof $h||d instanceof Yu?d.maxValue:0}populatePaintArrays(c,d,g,S,M,L){for(const V in this.binders){const Q=this.binders[V];(Q instanceof $h||Q instanceof Yu||Q instanceof Fh)&&Q.populatePaintArray(c,d,g,S,M,L)}}setConstantPatternPositions(c){for(const d in this.binders){const g=this.binders[d];g instanceof vg&&g.setConstantPatternPositions(c)}}updatePaintArrays(c,d,g,S,M,L){let V=!1;for(const Q in c){const te=d.getPositions(Q);for(const ue of te){const ge=g.feature(ue.index);for(const _e in this.binders){const Me=this.binders[_e];if((Me instanceof $h||Me instanceof Yu||Me instanceof Fh)&&Me.expression.isStateDependent===!0){const Ae=S.paint.get(_e);Me.expression=Ae.value,Me.updatePaintArray(ue.start,ue.end,ge,c[Q],M,L),V=!0}}}}return V}defines(){const c=[];for(const d in this.binders){const g=this.binders[d];(g instanceof _0||g instanceof vg)&&c.push(...g.uniformNames.map(S=>`#define HAS_UNIFORM_${S}`))}return c}getBinderAttributes(){const c=[];for(const d in this.binders){const g=this.binders[d];if(g instanceof $h||g instanceof Yu||g instanceof Fh)for(let S=0;S<g.paintVertexAttributes.length;S++)c.push(g.paintVertexAttributes[S].name)}return c}getBinderUniforms(){const c=[];for(const d in this.binders){const g=this.binders[d];if(g instanceof _0||g instanceof vg||g instanceof Yu)for(const S of g.uniformNames)c.push(S)}return c}getPaintVertexBuffers(){return this._buffers}getUniforms(c){const d=[];for(const g in this.binders){const S=this.binders[g];if(S instanceof _0||S instanceof vg||S instanceof Yu)for(const M of S.uniformNames)d.push({name:M,property:g,binding:S.getBinding(c,M)})}return d}setUniforms(c,d,g,S,M){for(const{name:L,property:V,binding:Q}of g)this.binders[V].setUniform(c,Q,M,S.get(V),L)}updatePaintBuffers(){this._buffers=[];for(const c in this.binders){const d=this.binders[c];(d instanceof $h||d instanceof Yu||d instanceof Fh)&&d.paintVertexBuffer&&this._buffers.push(d.paintVertexBuffer)}}upload(c){for(const d in this.binders){const g=this.binders[d];(g instanceof $h||g instanceof Yu||g instanceof Fh)&&g.upload(c)}this.updatePaintBuffers()}destroy(){for(const c in this.binders){const d=this.binders[c];(d instanceof $h||d instanceof Yu||d instanceof Fh)&&d.destroy()}}}class Dv{constructor(c,d,g=()=>!0){this.programConfigurations={};for(const S of c)this.programConfigurations[S.id]=new Dc(S,d,g);this.needsUpload=!1,this._featureMap=new lw,this._bufferOffset=0}populatePaintArrays(c,d,g,S,M,L,V){for(const Q in this.programConfigurations)this.programConfigurations[Q].populatePaintArrays(c,d,S,M,L,V);d.id!==void 0&&this._featureMap.add(d.id,g,this._bufferOffset,c),this._bufferOffset=c,this.needsUpload=!0}updatePaintArrays(c,d,g,S,M){for(const L of g)this.needsUpload=this.programConfigurations[L.id].updatePaintArrays(c,this._featureMap,d,L,S,M)||this.needsUpload}get(c){return this.programConfigurations[c]}upload(c){if(this.needsUpload){for(const d in this.programConfigurations)this.programConfigurations[d].upload(c);this.needsUpload=!1}}destroy(){for(const c in this.programConfigurations)this.programConfigurations[c].destroy()}}const yg={"text-opacity":["opacity"],"icon-opacity":["opacity"],"text-color":["fill_color"],"icon-color":["fill_color"],"text-halo-color":["halo_color"],"icon-halo-color":["halo_color"],"text-halo-blur":["halo_blur"],"icon-halo-blur":["halo_blur"],"text-halo-width":["halo_width"],"icon-halo-width":["halo_width"],"line-gap-width":["gapwidth"],"line-pattern":["pattern","pixel_ratio"],"fill-pattern":["pattern","pixel_ratio"],"fill-extrusion-pattern":["pattern","pixel_ratio"],"line-dasharray":["dash"]};function WA(f,c){return yg[f]||[f.replace(`${c}-`,"").replace(/-/g,"_")]}const GA={"line-pattern":{source:lr,composite:lr},"fill-pattern":{source:lr,composite:lr},"fill-extrusion-pattern":{source:lr,composite:lr},"line-dasharray":{source:xr,composite:xr}},PS={color:{source:qu,composite:jr},number:{source:Ho,composite:qu}};function qA(f,c,d){const g=GA[f];return g&&g[d]||PS[c][d]}Sn(_0,"ConstantBinder"),Sn(vg,"PatternConstantBinder"),Sn($h,"SourceExpressionBinder"),Sn(Fh,"PatternCompositeBinder"),Sn(Yu,"CompositeExpressionBinder"),Sn(Dc,"ProgramConfiguration",{omit:["_buffers"]}),Sn(Dv,"ProgramConfigurationSet");const XA="-transition";class Ad extends Ns{constructor(c,d){if(super(),this.id=c.id,this.type=c.type,this._featureFilter={filter:()=>!0,needGeometry:!1,needFeature:!1},this._filterCompiled=!1,c.type!=="custom"&&(this.metadata=c.metadata,this.minzoom=c.minzoom,this.maxzoom=c.maxzoom,c.type!=="background"&&c.type!=="sky"&&(this.source=c.source,this.sourceLayer=c["source-layer"],this.filter=c.filter),d.layout&&(this._unevaluatedLayout=new st(d.layout)),d.paint)){this._transitionablePaint=new Le(d.paint);for(const g in c.paint)this.setPaintProperty(g,c.paint[g],{validate:!1});for(const g in c.layout)this.setLayoutProperty(g,c.layout[g],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new ut(d.paint)}}getLayoutProperty(c){return c==="visibility"?this.visibility:this._unevaluatedLayout.getValue(c)}setLayoutProperty(c,d,g={}){d!=null&&this._validate(yS,`layers.${this.id}.layout.${c}`,c,d,g)||(c!=="visibility"?this._unevaluatedLayout.setValue(c,d):this.visibility=d)}getPaintProperty(c){return pe(c,XA)?this._transitionablePaint.getTransition(c.slice(0,-11)):this._transitionablePaint.getValue(c)}setPaintProperty(c,d,g={}){if(d!=null&&this._validate(vS,`layers.${this.id}.paint.${c}`,c,d,g))return!1;if(pe(c,XA))return this._transitionablePaint.setTransition(c.slice(0,-11),d||void 0),!1;{const S=this._transitionablePaint._values[c],M=S.value.isDataDriven(),L=S.value;this._transitionablePaint.setValue(c,d),this._handleSpecialPaintPropertyUpdate(c);const V=this._transitionablePaint._values[c].value,Q=V.isDataDriven(),te=pe(c,"pattern")||c==="line-dasharray";return Q||M||te||this._handleOverridablePaintPropertyUpdate(c,L,V)}}_handleSpecialPaintPropertyUpdate(c){}getProgramIds(){return null}getProgramConfiguration(c){return null}_handleOverridablePaintPropertyUpdate(c,d,g){return!1}isHidden(c){return!!(this.minzoom&&c<this.minzoom)||!!(this.maxzoom&&c>=this.maxzoom)||this.visibility==="none"}updateTransitions(c){this._transitioningPaint=this._transitionablePaint.transitioned(c,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculate(c,d){this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(c,void 0,d)),this.paint=this._transitioningPaint.possiblyEvaluate(c,void 0,d)}serialize(){const c={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility&&(c.layout=c.layout||{},c.layout.visibility=this.visibility),Pe(c,(d,g)=>!(d===void 0||g==="layout"&&!Object.keys(d).length||g==="paint"&&!Object.keys(d).length))}_validate(c,d,g,S,M={}){return(!M||M.validate!==!1)&&ow(this,c.call(iw,{key:d,layerType:this.type,objectKey:g,value:S,styleSpec:dr,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isSky(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(const c in this.paint._values){const d=this.paint.get(c);if(d instanceof at&&sg(d.property.specification)&&(d.value.kind==="source"||d.value.kind==="composite")&&d.value.isStateDependent)return!0}return!1}compileFilter(){this._filterCompiled||(this._featureFilter=d0(this.filter),this._filterCompiled=!0)}invalidateCompiledFilter(){this._filterCompiled=!1}dynamicFilter(){return this._featureFilter.dynamicFilter}dynamicFilterNeedsFeature(){return this._featureFilter.needFeature}}const YA=Vt([{name:"a_pos",components:2,type:"Int16"}],4),KA=Vt([{name:"a_pos_3",components:3,type:"Int16"},{name:"a_pos_normal_3",components:3,type:"Int16"}]);class la{constructor(c=[]){this.segments=c}prepareSegment(c,d,g,S){let M=this.segments[this.segments.length-1];return c>la.MAX_VERTEX_ARRAY_LENGTH&&ze(`Max vertices per segment is ${la.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${c}`),(!M||M.vertexLength+c>la.MAX_VERTEX_ARRAY_LENGTH||M.sortKey!==S)&&(M={vertexOffset:d.length,primitiveOffset:g.length,vertexLength:0,primitiveLength:0},S!==void 0&&(M.sortKey=S),this.segments.push(M)),M}get(){return this.segments}destroy(){for(const c of this.segments)for(const d in c.vaos)c.vaos[d].destroy()}static simpleSegment(c,d,g,S){return new la([{vertexOffset:c,primitiveOffset:d,vertexLength:g,primitiveLength:S,vaos:{},sortKey:0}])}}la.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,Sn(la,"SegmentVector");var $n=8192;class im{constructor(c,d){c&&(d?this.setSouthWest(c).setNorthEast(d):c.length===4?this.setSouthWest([c[0],c[1]]).setNorthEast([c[2],c[3]]):this.setSouthWest(c[0]).setNorthEast(c[1]))}setNorthEast(c){return this._ne=c instanceof Wo?new Wo(c.lng,c.lat):Wo.convert(c),this}setSouthWest(c){return this._sw=c instanceof Wo?new Wo(c.lng,c.lat):Wo.convert(c),this}extend(c){const d=this._sw,g=this._ne;let S,M;if(c instanceof Wo)S=c,M=c;else{if(!(c instanceof im))return Array.isArray(c)?c.length===4||c.every(Array.isArray)?this.extend(im.convert(c)):this.extend(Wo.convert(c)):typeof c=="object"&&c!==null&&c.hasOwnProperty("lat")&&(c.hasOwnProperty("lon")||c.hasOwnProperty("lng"))?this.extend(Wo.convert(c)):this;if(S=c._sw,M=c._ne,!S||!M)return this}return d||g?(d.lng=Math.min(S.lng,d.lng),d.lat=Math.min(S.lat,d.lat),g.lng=Math.max(M.lng,g.lng),g.lat=Math.max(M.lat,g.lat)):(this._sw=new Wo(S.lng,S.lat),this._ne=new Wo(M.lng,M.lat)),this}getCenter(){return new Wo((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)}getSouthWest(){return this._sw}getNorthEast(){return this._ne}getNorthWest(){return new Wo(this.getWest(),this.getNorth())}getSouthEast(){return new Wo(this.getEast(),this.getSouth())}getWest(){return this._sw.lng}getSouth(){return this._sw.lat}getEast(){return this._ne.lng}getNorth(){return this._ne.lat}toArray(){return[this._sw.toArray(),this._ne.toArray()]}toString(){return`LngLatBounds(${this._sw.toString()}, ${this._ne.toString()})`}isEmpty(){return!(this._sw&&this._ne)}contains(c){const{lng:d,lat:g}=Wo.convert(c);let S=this._sw.lng<=d&&d<=this._ne.lng;return this._sw.lng>this._ne.lng&&(S=this._sw.lng>=d&&d>=this._ne.lng),this._sw.lat<=g&&g<=this._ne.lat&&S}static convert(c){return!c||c instanceof im?c:new im(c)}}var Yl=1e-6,ca=typeof Float32Array!="undefined"?Float32Array:Array;function ZA(){var f=new ca(9);return ca!=Float32Array&&(f[1]=0,f[2]=0,f[3]=0,f[5]=0,f[6]=0,f[7]=0),f[0]=1,f[4]=1,f[8]=1,f}function QA(f,c,d){var g=c[0],S=c[1],M=c[2],L=c[3],V=c[4],Q=c[5],te=c[6],ue=c[7],ge=c[8],_e=d[0],Me=d[1],Ae=d[2],Ne=d[3],Qe=d[4],ft=d[5],Ct=d[6],dt=d[7],wt=d[8];return f[0]=_e*g+Me*L+Ae*te,f[1]=_e*S+Me*V+Ae*ue,f[2]=_e*M+Me*Q+Ae*ge,f[3]=Ne*g+Qe*L+ft*te,f[4]=Ne*S+Qe*V+ft*ue,f[5]=Ne*M+Qe*Q+ft*ge,f[6]=Ct*g+dt*L+wt*te,f[7]=Ct*S+dt*V+wt*ue,f[8]=Ct*M+dt*Q+wt*ge,f}function fu(f){return f[0]=1,f[1]=0,f[2]=0,f[3]=0,f[4]=0,f[5]=1,f[6]=0,f[7]=0,f[8]=0,f[9]=0,f[10]=1,f[11]=0,f[12]=0,f[13]=0,f[14]=0,f[15]=1,f}function xg(f,c){var d=c[0],g=c[1],S=c[2],M=c[3],L=c[4],V=c[5],Q=c[6],te=c[7],ue=c[8],ge=c[9],_e=c[10],Me=c[11],Ae=c[12],Ne=c[13],Qe=c[14],ft=c[15],Ct=d*V-g*L,dt=d*Q-S*L,wt=d*te-M*L,Rt=g*Q-S*V,Mt=g*te-M*V,cr=S*te-M*Q,sr=ue*Ne-ge*Ae,Cr=ue*Qe-_e*Ae,Kr=ue*ft-Me*Ae,hr=ge*Qe-_e*Ne,Mr=ge*ft-Me*Ne,Ar=_e*ft-Me*Qe,$r=Ct*Ar-dt*Mr+wt*hr+Rt*Kr-Mt*Cr+cr*sr;return $r?(f[0]=(V*Ar-Q*Mr+te*hr)*($r=1/$r),f[1]=(S*Mr-g*Ar-M*hr)*$r,f[2]=(Ne*cr-Qe*Mt+ft*Rt)*$r,f[3]=(_e*Mt-ge*cr-Me*Rt)*$r,f[4]=(Q*Kr-L*Ar-te*Cr)*$r,f[5]=(d*Ar-S*Kr+M*Cr)*$r,f[6]=(Qe*wt-Ae*cr-ft*dt)*$r,f[7]=(ue*cr-_e*wt+Me*dt)*$r,f[8]=(L*Mr-V*Kr+te*sr)*$r,f[9]=(g*Kr-d*Mr-M*sr)*$r,f[10]=(Ae*Mt-Ne*wt+ft*Ct)*$r,f[11]=(ge*wt-ue*Mt-Me*Ct)*$r,f[12]=(V*Cr-L*hr-Q*sr)*$r,f[13]=(d*hr-g*Cr+S*sr)*$r,f[14]=(Ne*dt-Ae*Rt-Qe*Ct)*$r,f[15]=(ue*Rt-ge*dt+_e*Ct)*$r,f):null}function _g(f,c,d){var g=c[0],S=c[1],M=c[2],L=c[3],V=c[4],Q=c[5],te=c[6],ue=c[7],ge=c[8],_e=c[9],Me=c[10],Ae=c[11],Ne=c[12],Qe=c[13],ft=c[14],Ct=c[15],dt=d[0],wt=d[1],Rt=d[2],Mt=d[3];return f[0]=dt*g+wt*V+Rt*ge+Mt*Ne,f[1]=dt*S+wt*Q+Rt*_e+Mt*Qe,f[2]=dt*M+wt*te+Rt*Me+Mt*ft,f[3]=dt*L+wt*ue+Rt*Ae+Mt*Ct,f[4]=(dt=d[4])*g+(wt=d[5])*V+(Rt=d[6])*ge+(Mt=d[7])*Ne,f[5]=dt*S+wt*Q+Rt*_e+Mt*Qe,f[6]=dt*M+wt*te+Rt*Me+Mt*ft,f[7]=dt*L+wt*ue+Rt*Ae+Mt*Ct,f[8]=(dt=d[8])*g+(wt=d[9])*V+(Rt=d[10])*ge+(Mt=d[11])*Ne,f[9]=dt*S+wt*Q+Rt*_e+Mt*Qe,f[10]=dt*M+wt*te+Rt*Me+Mt*ft,f[11]=dt*L+wt*ue+Rt*Ae+Mt*Ct,f[12]=(dt=d[12])*g+(wt=d[13])*V+(Rt=d[14])*ge+(Mt=d[15])*Ne,f[13]=dt*S+wt*Q+Rt*_e+Mt*Qe,f[14]=dt*M+wt*te+Rt*Me+Mt*ft,f[15]=dt*L+wt*ue+Rt*Ae+Mt*Ct,f}function b0(f,c,d){var g,S,M,L,V,Q,te,ue,ge,_e,Me,Ae,Ne=d[0],Qe=d[1],ft=d[2];return c===f?(f[12]=c[0]*Ne+c[4]*Qe+c[8]*ft+c[12],f[13]=c[1]*Ne+c[5]*Qe+c[9]*ft+c[13],f[14]=c[2]*Ne+c[6]*Qe+c[10]*ft+c[14],f[15]=c[3]*Ne+c[7]*Qe+c[11]*ft+c[15]):(S=c[1],M=c[2],L=c[3],V=c[4],Q=c[5],te=c[6],ue=c[7],ge=c[8],_e=c[9],Me=c[10],Ae=c[11],f[0]=g=c[0],f[1]=S,f[2]=M,f[3]=L,f[4]=V,f[5]=Q,f[6]=te,f[7]=ue,f[8]=ge,f[9]=_e,f[10]=Me,f[11]=Ae,f[12]=g*Ne+V*Qe+ge*ft+c[12],f[13]=S*Ne+Q*Qe+_e*ft+c[13],f[14]=M*Ne+te*Qe+Me*ft+c[14],f[15]=L*Ne+ue*Qe+Ae*ft+c[15]),f}function Nv(f,c,d){var g=d[0],S=d[1],M=d[2];return f[0]=c[0]*g,f[1]=c[1]*g,f[2]=c[2]*g,f[3]=c[3]*g,f[4]=c[4]*S,f[5]=c[5]*S,f[6]=c[6]*S,f[7]=c[7]*S,f[8]=c[8]*M,f[9]=c[9]*M,f[10]=c[10]*M,f[11]=c[11]*M,f[12]=c[12],f[13]=c[13],f[14]=c[14],f[15]=c[15],f}function cw(f,c,d){var g=Math.sin(d),S=Math.cos(d),M=c[4],L=c[5],V=c[6],Q=c[7],te=c[8],ue=c[9],ge=c[10],_e=c[11];return c!==f&&(f[0]=c[0],f[1]=c[1],f[2]=c[2],f[3]=c[3],f[12]=c[12],f[13]=c[13],f[14]=c[14],f[15]=c[15]),f[4]=M*S+te*g,f[5]=L*S+ue*g,f[6]=V*S+ge*g,f[7]=Q*S+_e*g,f[8]=te*S-M*g,f[9]=ue*S-L*g,f[10]=ge*S-V*g,f[11]=_e*S-Q*g,f}function om(f,c,d){var g=Math.sin(d),S=Math.cos(d),M=c[0],L=c[1],V=c[2],Q=c[3],te=c[8],ue=c[9],ge=c[10],_e=c[11];return c!==f&&(f[4]=c[4],f[5]=c[5],f[6]=c[6],f[7]=c[7],f[12]=c[12],f[13]=c[13],f[14]=c[14],f[15]=c[15]),f[0]=M*S-te*g,f[1]=L*S-ue*g,f[2]=V*S-ge*g,f[3]=Q*S-_e*g,f[8]=M*g+te*S,f[9]=L*g+ue*S,f[10]=V*g+ge*S,f[11]=Q*g+_e*S,f}function w0(f,c){return f[0]=c[0],f[1]=0,f[2]=0,f[3]=0,f[4]=0,f[5]=c[1],f[6]=0,f[7]=0,f[8]=0,f[9]=0,f[10]=c[2],f[11]=0,f[12]=0,f[13]=0,f[14]=0,f[15]=1,f}function JA(f,c,d){var g,S,M,L=d[0],V=d[1],Q=d[2],te=Math.hypot(L,V,Q);return te<Yl?null:(L*=te=1/te,V*=te,Q*=te,g=Math.sin(c),S=Math.cos(c),f[0]=L*L*(M=1-S)+S,f[1]=V*L*M+Q*g,f[2]=Q*L*M-V*g,f[3]=0,f[4]=L*V*M-Q*g,f[5]=V*V*M+S,f[6]=Q*V*M+L*g,f[7]=0,f[8]=L*Q*M+V*g,f[9]=V*Q*M-L*g,f[10]=Q*Q*M+S,f[11]=0,f[12]=0,f[13]=0,f[14]=0,f[15]=1,f)}Math.hypot||(Math.hypot=function(){for(var f=0,c=arguments.length;c--;)f+=arguments[c]*arguments[c];return Math.sqrt(f)});var eR=_g;function uw(){var f=new ca(3);return ca!=Float32Array&&(f[0]=0,f[1]=0,f[2]=0),f}function W_(f){var c=new ca(3);return c[0]=f[0],c[1]=f[1],c[2]=f[2],c}function C0(f){return Math.hypot(f[0],f[1],f[2])}function sm(f,c,d){var g=new ca(3);return g[0]=f,g[1]=c,g[2]=d,g}function Rd(f,c,d){return f[0]=c[0]+d[0],f[1]=c[1]+d[1],f[2]=c[2]+d[2],f}function E0(f,c,d){return f[0]=c[0]-d[0],f[1]=c[1]-d[1],f[2]=c[2]-d[2],f}function tR(f,c,d){return f[0]=c[0]*d[0],f[1]=c[1]*d[1],f[2]=c[2]*d[2],f}function S0(f,c,d){return f[0]=Math.min(c[0],d[0]),f[1]=Math.min(c[1],d[1]),f[2]=Math.min(c[2],d[2]),f}function bg(f,c,d){return f[0]=Math.max(c[0],d[0]),f[1]=Math.max(c[1],d[1]),f[2]=Math.max(c[2],d[2]),f}function du(f,c,d){return f[0]=c[0]*d,f[1]=c[1]*d,f[2]=c[2]*d,f}function $v(f,c,d,g){return f[0]=c[0]+d[0]*g,f[1]=c[1]+d[1]*g,f[2]=c[2]+d[2]*g,f}function pc(f,c){var d=c[0],g=c[1],S=c[2],M=d*d+g*g+S*S;return M>0&&(M=1/Math.sqrt(M)),f[0]=c[0]*M,f[1]=c[1]*M,f[2]=c[2]*M,f}function Ku(f,c){return f[0]*c[0]+f[1]*c[1]+f[2]*c[2]}function kd(f,c,d){var g=c[0],S=c[1],M=c[2],L=d[0],V=d[1],Q=d[2];return f[0]=S*Q-M*V,f[1]=M*L-g*Q,f[2]=g*V-S*L,f}function Bs(f,c,d){var g=c[0],S=c[1],M=c[2],L=d[3]*g+d[7]*S+d[11]*M+d[15];return f[0]=(d[0]*g+d[4]*S+d[8]*M+d[12])/(L=L||1),f[1]=(d[1]*g+d[5]*S+d[9]*M+d[13])/L,f[2]=(d[2]*g+d[6]*S+d[10]*M+d[14])/L,f}function IS(f,c,d){var g=d[0],S=d[1],M=d[2],L=c[0],V=c[1],Q=c[2],te=S*Q-M*V,ue=M*L-g*Q,ge=g*V-S*L,_e=S*ge-M*ue,Me=M*te-g*ge,Ae=g*ue-S*te,Ne=2*d[3];return ue*=Ne,ge*=Ne,Me*=2,Ae*=2,f[0]=L+(te*=Ne)+(_e*=2),f[1]=V+ue+Me,f[2]=Q+ge+Ae,f}var G_,Nf=E0,w4=tR,C4=C0;function zh(f,c,d){return f[0]=c[0]*d,f[1]=c[1]*d,f[2]=c[2]*d,f[3]=c[3]*d,f}function fw(f,c){var d=c[0],g=c[1],S=c[2],M=c[3],L=d*d+g*g+S*S+M*M;return L>0&&(L=1/Math.sqrt(L)),f[0]=d*L,f[1]=g*L,f[2]=S*L,f[3]=M*L,f}function am(f,c,d){var g=c[0],S=c[1],M=c[2],L=c[3];return f[0]=d[0]*g+d[4]*S+d[8]*M+d[12]*L,f[1]=d[1]*g+d[5]*S+d[9]*M+d[13]*L,f[2]=d[2]*g+d[6]*S+d[10]*M+d[14]*L,f[3]=d[3]*g+d[7]*S+d[11]*M+d[15]*L,f}function dw(){var f=new ca(4);return ca!=Float32Array&&(f[0]=0,f[1]=0,f[2]=0),f[3]=1,f}function q_(f){return f[0]=0,f[1]=0,f[2]=0,f[3]=1,f}function Fv(f,c,d){d*=.5;var g=c[0],S=c[1],M=c[2],L=c[3],V=Math.sin(d),Q=Math.cos(d);return f[0]=g*Q+L*V,f[1]=S*Q+M*V,f[2]=M*Q-S*V,f[3]=L*Q-g*V,f}function ui(f,c,d){d*=.5;var g=c[0],S=c[1],M=c[2],L=c[3],V=Math.sin(d),Q=Math.cos(d);return f[0]=g*Q-M*V,f[1]=S*Q+L*V,f[2]=M*Q+g*V,f[3]=L*Q-S*V,f}uw(),G_=new ca(4),ca!=Float32Array&&(G_[0]=0,G_[1]=0,G_[2]=0,G_[3]=0);var hw=fw;uw(),sm(1,0,0),sm(0,1,0),dw(),dw(),ZA();const MS=Vt([{type:"Float32",name:"a_globe_pos",components:3},{type:"Float32",name:"a_uv",components:2}]),{members:wg}=MS,rR=Vt([{name:"a_pos_3",components:3,type:"Int16"}]);var zv=Vt([{name:"a_pos",type:"Int16",components:2}]);class pw{constructor(c,d){this.pos=c,this.dir=d}intersectsPlane(c,d,g){const S=Ku(d,this.dir);if(Math.abs(S)<1e-6)return!1;const M=((c[0]-this.pos[0])*d[0]+(c[1]-this.pos[1])*d[1]+(c[2]-this.pos[2])*d[2])/S;return g[0]=this.pos[0]+this.dir[0]*M,g[1]=this.pos[1]+this.dir[1]*M,g[2]=this.pos[2]+this.dir[2]*M,!0}closestPointOnSphere(c,d,g){if(function(Me,Ae){var Ne=Me[0],Qe=Me[1],ft=Me[2],Ct=Ae[0],dt=Ae[1],wt=Ae[2];return Math.abs(Ne-Ct)<=Yl*Math.max(1,Math.abs(Ne),Math.abs(Ct))&&Math.abs(Qe-dt)<=Yl*Math.max(1,Math.abs(Qe),Math.abs(dt))&&Math.abs(ft-wt)<=Yl*Math.max(1,Math.abs(ft),Math.abs(wt))}(this.pos,c)||d===0)return g[0]=g[1]=g[2]=0,!1;const[S,M,L]=this.dir,V=this.pos[0]-c[0],Q=this.pos[1]-c[1],te=this.pos[2]-c[2],ue=S*S+M*M+L*L,ge=2*(V*S+Q*M+te*L),_e=ge*ge-4*ue*(V*V+Q*Q+te*te-d*d);if(_e<0){const Me=Math.max(-ge/2,0),Ae=V+S*Me,Ne=Q+M*Me,Qe=te+L*Me,ft=Math.hypot(Ae,Ne,Qe);return g[0]=Ae*d/ft,g[1]=Ne*d/ft,g[2]=Qe*d/ft,!1}{const Me=(-ge-Math.sqrt(_e))/(2*ue);if(Me<0){const Ae=Math.hypot(V,Q,te);return g[0]=V*d/Ae,g[1]=Q*d/Ae,g[2]=te*d/Ae,!1}return g[0]=V+S*Me,g[1]=Q+M*Me,g[2]=te+L*Me,!0}}}class Al{constructor(c,d,g,S,M){this.TL=c,this.TR=d,this.BR=g,this.BL=S,this.horizon=M}static fromInvProjectionMatrix(c,d,g){const S=[-1,1,1],M=[1,1,1],L=[1,-1,1],V=[-1,-1,1],Q=Bs(S,S,c),te=Bs(M,M,c),ue=Bs(L,L,c),ge=Bs(V,V,c);return new Al(Q,te,ue,ge,d/g)}}class AS{constructor(c,d){this.points=c,this.planes=d}static fromInvProjectionMatrix(c,d,g,S){const M=Math.pow(2,g),L=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]].map(Q=>{const te=am([],Q,c),ue=1/te[3]/d*M;return function(ge,_e,Me){return ge[0]=_e[0]*Me[0],ge[1]=_e[1]*Me[1],ge[2]=_e[2]*Me[2],ge[3]=_e[3]*Me[3],ge}(te,te,[ue,ue,S?1/te[3]:ue,ue])}),V=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(Q=>{const te=pc([],kd([],Nf([],L[Q[0]],L[Q[1]]),Nf([],L[Q[2]],L[Q[1]]))),ue=-Ku(te,L[Q[1]]);return te.concat(ue)});return new AS(L,V)}}class mc{static fromPoints(c){const d=[1/0,1/0,1/0],g=[-1/0,-1/0,-1/0];for(const S of c)S0(d,d,S),bg(g,g,S);return new mc(d,g)}static applyTransform(c,d){const g=c.getCorners();for(let S=0;S<g.length;++S)Bs(g[S],g[S],d);return mc.fromPoints(g)}constructor(c,d){this.min=c,this.max=d,this.center=du([],Rd([],this.min,this.max),.5)}quadrant(c){const d=[c%2==0,c<2],g=W_(this.min),S=W_(this.max);for(let M=0;M<d.length;M++)g[M]=d[M]?this.min[M]:this.center[M],S[M]=d[M]?this.center[M]:this.max[M];return S[2]=this.max[2],new mc(g,S)}distanceX(c){return Math.max(Math.min(this.max[0],c[0]),this.min[0])-c[0]}distanceY(c){return Math.max(Math.min(this.max[1],c[1]),this.min[1])-c[1]}distanceZ(c){return Math.max(Math.min(this.max[2],c[2]),this.min[2])-c[2]}getCorners(){const c=this.min,d=this.max;return[[c[0],c[1],c[2]],[d[0],c[1],c[2]],[d[0],d[1],c[2]],[c[0],d[1],c[2]],[c[0],c[1],d[2]],[d[0],c[1],d[2]],[d[0],d[1],d[2]],[c[0],d[1],d[2]]]}intersects(c){const d=this.getCorners();let g=!0;for(let S=0;S<c.planes.length;S++){const M=c.planes[S];let L=0;for(let V=0;V<d.length;V++)L+=Ku(M,d[V])+M[3]>=0;if(L===0)return 0;L!==d.length&&(g=!1)}if(g)return 2;for(let S=0;S<3;S++){let M=Number.MAX_VALUE,L=-Number.MAX_VALUE;for(let V=0;V<c.points.length;V++){const Q=c.points[V][S]-this.min[S];M=Math.min(M,Q),L=Math.max(L,Q)}if(L<0||M>this.max[S]-this.min[S])return 0}return 1}}const mw=5,nR=6,Od=$n/Math.PI/2,E4=16383,Bv=64,X_=[Bv,32,16],sl=-Od,Is=Od,RS=[new mc([sl,sl,sl],[Is,Is,Is]),new mc([sl,sl,sl],[0,0,Is]),new mc([0,sl,sl],[Is,0,Is]),new mc([sl,0,sl],[0,Is,Is]),new mc([0,0,sl],[Is,Is,Is])];function gw(f){return f*Od/P0}function vw(f,c,d,g=!0){const S=du([],f._camera.position,f.worldSize),M=[c,d,1,1];am(M,M,f.pixelMatrixInverse),zh(M,M,1/M[3]);const L=pc([],Nf([],M,S)),V=f.globeMatrix,Q=[V[12],V[13],V[14]],te=Nf([],Q,S),ue=C0(te),ge=pc([],te),_e=f.worldSize/(2*Math.PI),Me=Ku(ge,L),Ae=Math.asin(_e/ue);if(Ae<Math.acos(Me)){if(!g)return null;const Kr=[],hr=[];du(Kr,L,ue/Me),pc(hr,Nf(hr,Kr,te)),pc(L,Rd(L,te,du(L,hr,Math.tan(Ae)*ue)))}const Ne=[];new pw(S,L).closestPointOnSphere(Q,_e,Ne);const Qe=pc([],de(V,0)),ft=pc([],de(V,1)),Ct=pc([],de(V,2)),dt=Ku(Qe,Ne),wt=Ku(ft,Ne),Rt=Ku(Ct,Ne),Mt=$(Math.asin(-wt/_e));let cr=$(Math.atan2(dt,Rt));cr=f.center.lng+function(Kr,hr){const Mr=(hr-Kr+180)%360-180;return Mr<-180?Mr+360:Mr}(f.center.lng,cr);const sr=Bh(cr),Cr=q(jh(Mt),0,1);return new Wv(sr,Cr)}class S4{constructor(c,d,g){this.a=Nf([],c,g),this.b=Nf([],d,g),this.center=g;const S=pc([],this.a),M=pc([],this.b);this.angle=Math.acos(Ku(S,M))}}function kS(f,c){if(f.angle===0)return null;let d;return d=f.a[c]===0?1/f.angle*.5*Math.PI:1/f.angle*Math.atan(f.b[c]/f.a[c]/Math.sin(f.angle)-1/Math.tan(f.angle)),d<0||d>1?null:function(g,S,M,L){const V=Math.sin(M);return g*(Math.sin((1-L)*M)/V)+S*(Math.sin(L*M)/V)}(f.a[c],f.b[c],f.angle,q(d,0,1))+f.center[c]}function hu(f){if(f.z<=1)return RS[f.z+2*f.y+f.x];const c=LS(yw(f));return mc.fromPoints(c)}function Cg(f,c,d){return du(f,f,1-d),$v(f,f,c,d)}function OS(f,c){const d=Vv(c.zoom);if(d===0)return hu(f);const g=yw(f),S=LS(g),M=Bh(g.getWest())*c.worldSize,L=Bh(g.getEast())*c.worldSize,V=jh(g.getNorth())*c.worldSize,Q=jh(g.getSouth())*c.worldSize,te=[M,V,0],ue=[L,V,0],ge=[M,Q,0],_e=[L,Q,0],Me=xg([],c.globeMatrix);return Bs(te,te,Me),Bs(ue,ue,Me),Bs(ge,ge,Me),Bs(_e,_e,Me),S[0]=Cg(S[0],ge,d),S[1]=Cg(S[1],_e,d),S[2]=Cg(S[2],ue,d),S[3]=Cg(S[3],te,d),mc.fromPoints(S)}function iR(f,c,d){for(const g of f)Bs(g,g,c),du(g,g,d)}function T4(f,c,d){const g=c/f.worldSize,S=f.globeMatrix;if(d.z<=1){const sr=hu(d).getCorners();return iR(sr,S,g),mc.fromPoints(sr)}const M=yw(d),L=LS(M);iR(L,S,g);const V=Number.MAX_VALUE,Q=[-V,-V,-V],te=[V,V,V];if(M.contains(f.center)){for(const Kr of L)S0(te,te,Kr),bg(Q,Q,Kr);Q[2]=0;const sr=f.point,Cr=[sr.x*g,sr.y*g,0];return S0(te,te,Cr),bg(Q,Q,Cr),new mc(te,Q)}const ue=[S[12]*g,S[13]*g,S[14]*g],ge=M.getCenter(),_e=q(f.center.lat,-kl,kl),Me=q(ge.lat,-kl,kl),Ae=Bh(f.center.lng),Ne=jh(_e);let Qe=Ae-Bh(ge.lng);const ft=Ne-jh(Me);Qe>.5?Qe-=1:Qe<-.5&&(Qe+=1);let Ct=0;Math.abs(Qe)>Math.abs(ft)?Ct=Qe>=0?1:3:(Ct=ft>=0?0:2,$v(ue,ue,[S[4]*g,S[5]*g,S[6]*g],-Math.sin(j(ft>=0?M.getSouth():M.getNorth()))*Od));const dt=L[Ct],wt=L[(Ct+1)%4],Rt=new S4(dt,wt,ue),Mt=[kS(Rt,0)||dt[0],kS(Rt,1)||dt[1],kS(Rt,2)||dt[2]],cr=Vv(f.zoom);if(cr>0){const sr=function({x:Kr,y:hr,z:Mr},Ar,$r,Qr,_r){const yn=1/(1<<Mr);let Pn=Kr*yn,_n=Pn+yn,vi=hr*yn,en=vi+yn,zn=0;const yi=(Pn+_n)/2-Qr;return yi>.5?zn=-1:yi<-.5&&(zn=1),Pn=((Pn+zn)*Ar-(Qr*=Ar))*$r+Qr,_n=((_n+zn)*Ar-Qr)*$r+Qr,vi=(vi*Ar-(_r*=Ar))*$r+_r,en=(en*Ar-_r)*$r+_r,[[Pn,en,0],[_n,en,0],[_n,vi,0],[Pn,vi,0]]}(d,c,f._pixelsPerMercatorPixel,Ae,Ne);for(let Kr=0;Kr<L.length;Kr++)Cg(L[Kr],sr[Kr],cr);const Cr=Rd([],sr[Ct],sr[(Ct+1)%4]);du(Cr,Cr,.5),Cg(Mt,Cr,cr)}for(const sr of L)S0(te,te,sr),bg(Q,Q,sr);return te[2]=Math.min(dt[2],wt[2]),S0(te,te,Mt),bg(Q,Q,Mt),new mc(te,Q)}function yw({x:f,y:c,z:d}){const g=1/(1<<d),S=new Wo(Zu(f*g),Rl((c+1)*g)),M=new Wo(Zu((f+1)*g),Rl(c*g));return new im(S,M)}function LS(f){const c=j(f.getNorth()),d=j(f.getSouth()),g=Math.cos(c),S=Math.cos(d),M=Math.sin(c),L=Math.sin(d),V=f.getWest(),Q=f.getEast();return[jv(S,L,V),jv(S,L,Q),jv(g,M,Q),jv(g,M,V)]}function jv(f,c,d,g=Od){return d=j(d),[f*Math.sin(d)*g,-c*g,f*Math.cos(d)*g]}function Uv(f,c,d){return jv(Math.cos(j(f)),Math.sin(j(f)),c,d)}function Y_(f,c,d,g){const S=1<<d.z,M=(f/$n+d.x)/S;return Uv(Rl((c/$n+d.y)/S),Zu(M),g)}function T0({min:f,max:c}){return E4/Math.max(c[0]-f[0],c[1]-f[1],c[2]-f[2])}const DS=new Float64Array(16);function lm(f){const c=T0(f),d=w0(DS,[c,c,c]);return b0(d,d,((g=[])[0]=-(S=f.min)[0],g[1]=-S[1],g[2]=-S[2],g));var g,S}function K_(f){const c=(g=f.min,(d=DS)[0]=1,d[1]=0,d[2]=0,d[3]=0,d[4]=0,d[5]=1,d[6]=0,d[7]=0,d[8]=0,d[9]=0,d[10]=1,d[11]=0,d[12]=g[0],d[13]=g[1],d[14]=g[2],d[15]=1,d);var d,g;const S=1/T0(f);return Nv(c,c,[S,S,S])}function NS(f,c,d,g,S){const M=function(Q){const te=$n/(2*Math.PI);return Q/(2*Math.PI)/te}(d),L=[f,c,-d/(2*Math.PI)],V=fu(new Float64Array(16));return b0(V,V,L),Nv(V,V,[M,M,M]),cw(V,V,j(-S)),om(V,V,j(-g)),V}function Vv(f){return ee(mw,nR,f)}function Z_(f,c){const d=Uv(c.lat,c.lng),g=function(Ae){const Ne=Uv(Ae._center.lat,Ae._center.lng);let Qe=kd([],sm(0,1,0),Ne);const ft=JA([],-Ae.angle,Ne);Qe=Bs(Qe,Qe,ft),JA(ft,-Ae._pitch,Qe);const Ct=pc([],Ne);return du(Ct,Ct,gw(Ae.cameraToCenterDistance/Ae.pixelsPerMeter)),Bs(Ct,Ct,ft),Rd([],Ne,Ct)}(f);return L=(S=E0([],g,d))[0],V=S[1],Q=S[2],te=(M=d)[0],ue=M[1],ge=M[2],Me=(_e=Math.sqrt(L*L+V*V+Q*Q)*Math.sqrt(te*te+ue*ue+ge*ge))&&Ku(S,M)/_e,Math.acos(Math.min(Math.max(Me,-1),1));var S,M,L,V,Q,te,ue,ge,_e,Me}function xw(f,c){return Z_(f,c)>Math.PI/2*1.01}const Ld=j(85),Hv=Math.cos(Ld),P4=Math.sin(Ld),P0=63710088e-1,oR=2*Math.PI*P0;class Eg{constructor(c,d){if(isNaN(c)||isNaN(d))throw new Error(`Invalid LngLat object: (${c}, ${d})`);if(this.lng=+c,this.lat=+d,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new Eg(re(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(c){const d=Math.PI/180,g=this.lat*d,S=c.lat*d,M=Math.sin(g)*Math.sin(S)+Math.cos(g)*Math.cos(S)*Math.cos((c.lng-this.lng)*d);return P0*Math.acos(Math.min(M,1))}toBounds(c=0){const d=360*c/40075017,g=d/Math.cos(Math.PI/180*this.lat);return new im(new Eg(this.lng-g,this.lat-d),new Eg(this.lng+g,this.lat+d))}toEcef(c){const d=gw(c);return Uv(this.lat,this.lng,Od+d)}static convert(c){if(c instanceof Eg)return c;if(Array.isArray(c)&&(c.length===2||c.length===3))return new Eg(Number(c[0]),Number(c[1]));if(!Array.isArray(c)&&typeof c=="object"&&c!==null)return new Eg(Number("lng"in c?c.lng:c.lon),Number(c.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: <lng>, lat: <lat>}, an object {lon: <lng>, lat: <lat>}, or an array of [<lng>, <lat>]")}}var Wo=Eg;function $S(f){return oR*Math.cos(f*Math.PI/180)}function Bh(f){return(180+f)/360}function jh(f){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+f*Math.PI/360)))/360}function Dd(f,c){return f/$S(c)}function Zu(f){return 360*f-180}function Rl(f){return 360/Math.PI*Math.atan(Math.exp((180-360*f)*Math.PI/180))-90}function sR(f,c){return f*$S(Rl(c))}const kl=85.051129;function FS(f){return 1/Math.cos(f*Math.PI/180)}class Wv{constructor(c,d,g=0){this.x=+c,this.y=+d,this.z=+g}static fromLngLat(c,d=0){const g=Wo.convert(c);return new Wv(Bh(g.lng),jh(g.lat),Dd(d,g.lat))}toLngLat(){return new Wo(Zu(this.x),Rl(this.y))}toAltitude(){return sR(this.z,this.y)}meterInMercatorCoordinateUnits(){return 1/oR*FS(Rl(this.y))}}function _w(f,c,d,g,S,M,L,V,Q){const te=(c+g)/2,ue=(d+S)/2,ge=new D(te,ue);V(ge),function(_e,Me,Ae,Ne,Qe,ft){const Ct=Ae-Qe,dt=Ne-ft;return Math.abs((Ne-Me)*Ct-(Ae-_e)*dt)/Math.hypot(Ct,dt)}(ge.x,ge.y,M.x,M.y,L.x,L.y)>=Q?(_w(f,c,d,te,ue,M,ge,V,Q),_w(f,te,ue,g,S,ge,L,V,Q)):f.push(L)}function aR(f,c,d){let g=f[0],S=g.x,M=g.y;c(g);const L=[g];for(let V=1;V<f.length;V++){const Q=f[V],{x:te,y:ue}=Q;c(Q),_w(L,S,M,te,ue,g,Q,c,d),S=te,M=ue,g=Q}return L}function zS(f,c,d,g){if(g(c,d)){const S=c.add(d)._mult(.5);zS(f,c,S,g),zS(f,S,d,g)}else f.push(d)}function I4(f,c){let d=f[0];const g=[d];for(let S=1;S<f.length;S++){const M=f[S];zS(g,d,M,c),d=M}return g}const bw=Math.pow(2,14)-1,lR=-bw-1;function M4(f,c){const d=Math.round(f.x*c),g=Math.round(f.y*c);return f.x=q(d,lR,bw),f.y=q(g,lR,bw),(d<f.x||d>f.x+1||g<f.y||g>f.y+1)&&ze("Geometry exceeds allowed extent, reduce your vector tile buffer size"),f}function cm(f,c,d){const g=f.loadGeometry(),S=f.extent,M=$n/S;if(c&&d&&d.projection.isReprojectedInTileSpace){const L=1<<c.z,{scale:V,x:Q,y:te,projection:ue}=d,ge=_e=>{const Me=Zu((c.x+_e.x/S)/L),Ae=Rl((c.y+_e.y/S)/L),Ne=ue.project(Me,Ae);_e.x=(Ne.x*V-Q)*S,_e.y=(Ne.y*V-te)*S};for(let _e=0;_e<g.length;_e++)if(f.type!==1)g[_e]=aR(g[_e],ge,1);else{const Me=[];for(const Ae of g[_e])Ae.x<0||Ae.x>=S||Ae.y<0||Ae.y>=S||(ge(Ae),Me.push(Ae));g[_e]=Me}}for(const L of g)for(const V of L)M4(V,M);return g}function Gv(f,c){return{type:f.type,id:f.id,properties:f.properties,geometry:c?cm(f):[]}}function ww(f,c,d,g,S){f.emplaceBack(2*c+(g+1)/2,2*d+(S+1)/2)}function Cw(f,c,d){const g=16384;f.emplaceBack(c.x,c.y,c.z,d[0]*g,d[1]*g,d[2]*g)}class pu{constructor(c){this.zoom=c.zoom,this.overscaling=c.overscaling,this.layers=c.layers,this.layerIds=this.layers.map(d=>d.id),this.index=c.index,this.hasPattern=!1,this.projection=c.projection,this.layoutVertexArray=new Wr,this.indexArray=new An,this.segments=new la,this.programConfigurations=new Dv(c.layers,c.zoom),this.stateDependentLayerIds=this.layers.filter(d=>d.isStateDependent()).map(d=>d.id)}populate(c,d,g,S){const M=this.layers[0],L=[];let V=null;M.type==="circle"&&(V=M.layout.get("circle-sort-key"));for(const{feature:te,id:ue,index:ge,sourceLayerIndex:_e}of c){const Me=this.layers[0]._featureFilter.needGeometry,Ae=Gv(te,Me);if(!this.layers[0]._featureFilter.filter(new he(this.zoom),Ae,g))continue;const Ne=V?V.evaluate(Ae,{},g):void 0,Qe={id:ue,properties:te.properties,type:te.type,sourceLayerIndex:_e,index:ge,geometry:Me?Ae.geometry:cm(te,g,S),patterns:{},sortKey:Ne};L.push(Qe)}V&&L.sort((te,ue)=>te.sortKey-ue.sortKey);let Q=null;S.projection.name==="globe"&&(this.globeExtVertexArray=new qr,Q=S.projection);for(const te of L){const{geometry:ue,index:ge,sourceLayerIndex:_e}=te,Me=c[ge].feature;this.addFeature(te,ue,ge,d.availableImages,g,Q),d.featureIndex.insert(Me,ue,ge,_e,this.index)}}update(c,d,g,S){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(c,d,this.stateDependentLayers,g,S)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(c){this.uploaded||(this.layoutVertexBuffer=c.createVertexBuffer(this.layoutVertexArray,YA.members),this.indexBuffer=c.createIndexBuffer(this.indexArray),this.globeExtVertexArray&&(this.globeExtVertexBuffer=c.createVertexBuffer(this.globeExtVertexArray,KA.members))),this.programConfigurations.upload(c),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.globeExtVertexBuffer&&this.globeExtVertexBuffer.destroy())}addFeature(c,d,g,S,M,L){for(const V of d)for(const Q of V){const te=Q.x,ue=Q.y;if(te<0||te>=$n||ue<0||ue>=$n)continue;if(L){const Me=L.projectTilePoint(te,ue,M),Ae=L.upVector(M,te,ue),Ne=this.globeExtVertexArray;Cw(Ne,Me,Ae),Cw(Ne,Me,Ae),Cw(Ne,Me,Ae),Cw(Ne,Me,Ae)}const ge=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,c.sortKey),_e=ge.vertexLength;ww(this.layoutVertexArray,te,ue,-1,-1),ww(this.layoutVertexArray,te,ue,1,-1),ww(this.layoutVertexArray,te,ue,1,1),ww(this.layoutVertexArray,te,ue,-1,1),this.indexArray.emplaceBack(_e,_e+1,_e+2),this.indexArray.emplaceBack(_e,_e+2,_e+3),ge.vertexLength+=4,ge.primitiveLength+=2}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,c,g,{},S,M)}}function cR(f,c){for(let d=0;d<f.length;d++)if(qv(c,f[d]))return!0;for(let d=0;d<c.length;d++)if(qv(f,c[d]))return!0;return!!BS(f,c)}function A4(f,c,d){return!!qv(f,c)||!!jS(c,f,d)}function uR(f,c){if(f.length===1)return Ew(c,f[0]);for(let d=0;d<c.length;d++){const g=c[d];for(let S=0;S<g.length;S++)if(qv(f,g[S]))return!0}for(let d=0;d<f.length;d++)if(Ew(c,f[d]))return!0;for(let d=0;d<c.length;d++)if(BS(f,c[d]))return!0;return!1}function fR(f,c,d){if(f.length>1){if(BS(f,c))return!0;for(let g=0;g<c.length;g++)if(jS(c[g],f,d))return!0}for(let g=0;g<f.length;g++)if(jS(f[g],c,d))return!0;return!1}function BS(f,c){if(f.length===0||c.length===0)return!1;for(let d=0;d<f.length-1;d++){const g=f[d],S=f[d+1];for(let M=0;M<c.length-1;M++)if(R4(g,S,c[M],c[M+1]))return!0}return!1}function R4(f,c,d,g){return Ge(f,d,g)!==Ge(c,d,g)&&Ge(f,c,d)!==Ge(f,c,g)}function jS(f,c,d){const g=d*d;if(c.length===1)return f.distSqr(c[0])<g;for(let S=1;S<c.length;S++)if(dR(f,c[S-1],c[S])<g)return!0;return!1}function dR(f,c,d){const g=c.distSqr(d);if(g===0)return f.distSqr(c);const S=((f.x-c.x)*(d.x-c.x)+(f.y-c.y)*(d.y-c.y))/g;return f.distSqr(S<0?c:S>1?d:d.sub(c)._mult(S)._add(c))}function Ew(f,c){let d,g,S,M=!1;for(let L=0;L<f.length;L++){d=f[L];for(let V=0,Q=d.length-1;V<d.length;Q=V++)g=d[V],S=d[Q],g.y>c.y!=S.y>c.y&&c.x<(S.x-g.x)*(c.y-g.y)/(S.y-g.y)+g.x&&(M=!M)}return M}function qv(f,c){let d=!1;for(let g=0,S=f.length-1;g<f.length;S=g++){const M=f[g],L=f[S];M.y>c.y!=L.y>c.y&&c.x<(L.x-M.x)*(c.y-M.y)/(L.y-M.y)+M.x&&(d=!d)}return d}function hR(f,c,d,g,S){for(const L of f)if(c<=L.x&&d<=L.y&&g>=L.x&&S>=L.y)return!0;const M=[new D(c,d),new D(c,S),new D(g,S),new D(g,d)];if(f.length>2){for(const L of M)if(qv(f,L))return!0}for(let L=0;L<f.length-1;L++)if(k4(f[L],f[L+1],M))return!0;return!1}function k4(f,c,d){const g=d[0],S=d[2];if(f.x<g.x&&c.x<g.x||f.x>S.x&&c.x>S.x||f.y<g.y&&c.y<g.y||f.y>S.y&&c.y>S.y)return!1;const M=Ge(f,c,d[0]);return M!==Ge(f,c,d[1])||M!==Ge(f,c,d[2])||M!==Ge(f,c,d[3])}function I0(f,c,d){const g=c.paint.get(f).value;return g.kind==="constant"?g.value:d.programConfigurations.get(c.id).getMaxValue(f)}function Sw(f){return Math.sqrt(f[0]*f[0]+f[1]*f[1])}function pR(f,c,d,g,S){if(!c[0]&&!c[1])return f;const M=D.convert(c)._mult(S);d==="viewport"&&M._rotate(-g);const L=[];for(let V=0;V<f.length;V++)L.push(f[V].sub(M));return L}function mR(f,c,d,g){const S=D.convert(f)._mult(g);return c==="viewport"&&S._rotate(-d),S}Sn(pu,"CircleBucket",{omit:["layers"]});const O4=new mt({"circle-sort-key":new it(dr.layout_circle["circle-sort-key"])});var L4={paint:new mt({"circle-radius":new it(dr.paint_circle["circle-radius"]),"circle-color":new it(dr.paint_circle["circle-color"]),"circle-blur":new it(dr.paint_circle["circle-blur"]),"circle-opacity":new it(dr.paint_circle["circle-opacity"]),"circle-translate":new De(dr.paint_circle["circle-translate"]),"circle-translate-anchor":new De(dr.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new De(dr.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new De(dr.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new it(dr.paint_circle["circle-stroke-width"]),"circle-stroke-color":new it(dr.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new it(dr.paint_circle["circle-stroke-opacity"])}),layout:O4};function gR(f,c,d,g,S,M,L,V,Q){if(M&&f.queryGeometry.isAboveHorizon)return!1;M&&(Q*=f.pixelToTileUnitsFactor);const te=f.tileID.canonical,ue=d.projection.upVectorScale(te,d.center.lat,d.worldSize).metersToTile;for(const ge of c)for(const _e of ge){const Me=_e.add(V),Ae=S&&d.elevation?d.elevation.exaggeration()*S.getElevationAt(Me.x,Me.y,!0):0,Ne=d.projection.projectTilePoint(Me.x,Me.y,te);if(Ae>0){const dt=d.projection.upVector(te,Me.x,Me.y);Ne.x+=dt[0]*ue*Ae,Ne.y+=dt[1]*ue*Ae,Ne.z+=dt[2]*ue*Ae}const Qe=M?Me:D4(Ne.x,Ne.y,Ne.z,g),ft=M?f.tilespaceRays.map(dt=>$4(dt,Ae)):f.queryGeometry.screenGeometry,Ct=am([],[Ne.x,Ne.y,Ne.z,1],g);if(!L&&M?Q*=Ct[3]/d.cameraToCenterDistance:L&&!M&&(Q*=d.cameraToCenterDistance/Ct[3]),M){const dt=Rl((_e.y/$n+te.y)/(1<<te.z));Q/=d.projection.pixelsPerMeter(dt,1)/Dd(1,dt)}if(A4(ft,Qe,Q))return!0}return!1}function D4(f,c,d,g){const S=am([],[f,c,d,1],g);return new D(S[0]/S[3],S[1]/S[3])}const vR=sm(0,0,0),N4=sm(0,0,1);function $4(f,c){const d=uw();return vR[2]=c,f.intersectsPlane(vR,N4,d),new D(d[0],d[1])}class yR extends pu{}function xR(f,{width:c,height:d},g,S){if(S){if(S instanceof Uint8ClampedArray)S=new Uint8Array(S.buffer);else if(S.length!==c*d*g)throw new RangeError("mismatched image size")}else S=new Uint8Array(c*d*g);return f.width=c,f.height=d,f.data=S,f}function _R(f,c,d){const{width:g,height:S}=c;g===f.width&&S===f.height||(US(f,c,{x:0,y:0},{x:0,y:0},{width:Math.min(f.width,g),height:Math.min(f.height,S)},d),f.width=g,f.height=S,f.data=c.data)}function US(f,c,d,g,S,M){if(S.width===0||S.height===0)return c;if(S.width>f.width||S.height>f.height||d.x>f.width-S.width||d.y>f.height-S.height)throw new RangeError("out of range source coordinates for image copy");if(S.width>c.width||S.height>c.height||g.x>c.width-S.width||g.y>c.height-S.height)throw new RangeError("out of range destination coordinates for image copy");const L=f.data,V=c.data;for(let Q=0;Q<S.height;Q++){const te=((d.y+Q)*f.width+d.x)*M,ue=((g.y+Q)*c.width+g.x)*M;for(let ge=0;ge<S.width*M;ge++)V[ue+ge]=L[te+ge]}return c}Sn(yR,"HeatmapBucket",{omit:["layers"]});class um{constructor(c,d){xR(this,c,1,d)}resize(c){_R(this,new um(c),1)}clone(){return new um({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(c,d,g,S,M){US(c,d,g,S,M,1)}}class mu{constructor(c,d){xR(this,c,4,d)}resize(c){_R(this,new mu(c),4)}replace(c,d){d?this.data.set(c):this.data=c instanceof Uint8ClampedArray?new Uint8Array(c.buffer):c}clone(){return new mu({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(c,d,g,S,M){US(c,d,g,S,M,4)}}Sn(um,"AlphaImage"),Sn(mu,"RGBAImage");var VS={paint:new mt({"heatmap-radius":new it(dr.paint_heatmap["heatmap-radius"]),"heatmap-weight":new it(dr.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new De(dr.paint_heatmap["heatmap-intensity"]),"heatmap-color":new yt(dr.paint_heatmap["heatmap-color"]),"heatmap-opacity":new De(dr.paint_heatmap["heatmap-opacity"])})};function Tw(f){const c={},d=f.resolution||256,g=f.clips?f.clips.length:1,S=f.image||new mu({width:d,height:g}),M=(L,V,Q)=>{c[f.evaluationKey]=Q;const te=f.expression.evaluate(c);S.data[L+V+0]=Math.floor(255*te.r/te.a),S.data[L+V+1]=Math.floor(255*te.g/te.a),S.data[L+V+2]=Math.floor(255*te.b/te.a),S.data[L+V+3]=Math.floor(255*te.a)};if(f.clips)for(let L=0,V=0;L<g;++L,V+=4*d)for(let Q=0,te=0;Q<d;Q++,te+=4){const ue=Q/(d-1),{start:ge,end:_e}=f.clips[L];M(V,te,ge*(1-ue)+_e*ue)}else for(let L=0,V=0;L<d;L++,V+=4)M(0,V,L/(d-1));return S}var F4={paint:new mt({"hillshade-illumination-direction":new De(dr.paint_hillshade["hillshade-illumination-direction"]),"hillshade-illumination-anchor":new De(dr.paint_hillshade["hillshade-illumination-anchor"]),"hillshade-exaggeration":new De(dr.paint_hillshade["hillshade-exaggeration"]),"hillshade-shadow-color":new De(dr.paint_hillshade["hillshade-shadow-color"]),"hillshade-highlight-color":new De(dr.paint_hillshade["hillshade-highlight-color"]),"hillshade-accent-color":new De(dr.paint_hillshade["hillshade-accent-color"])})};const z4=Vt([{name:"a_pos",components:2,type:"Int16"}],4),{members:B4}=z4;var HS={exports:{}};function Pw(f,c,d){d=d||2;var g,S,M,L,V,Q,te,ue=c&&c.length,ge=ue?c[0]*d:f.length,_e=bR(f,0,ge,d,!0),Me=[];if(!_e||_e.next===_e.prev)return Me;if(ue&&(_e=function(Ne,Qe,ft,Ct){var dt,wt,Rt,Mt=[];for(dt=0,wt=Qe.length;dt<wt;dt++)(Rt=bR(Ne,Qe[dt]*Ct,dt<wt-1?Qe[dt+1]*Ct:Ne.length,Ct,!1))===Rt.next&&(Rt.steiner=!0),Mt.push(G4(Rt));for(Mt.sort(V4),dt=0;dt<Mt.length;dt++)ft=H4(Mt[dt],ft);return ft}(f,c,_e,d)),f.length>80*d){g=M=f[0],S=L=f[1];for(var Ae=d;Ae<ge;Ae+=d)(V=f[Ae])<g&&(g=V),(Q=f[Ae+1])<S&&(S=Q),V>M&&(M=V),Q>L&&(L=Q);te=(te=Math.max(M-g,L-S))!==0?32767/te:0}return Q_(_e,Me,d,g,S,te,0),Me}function bR(f,c,d,g,S){var M,L;if(S===GS(f,c,d,g)>0)for(M=c;M<d;M+=g)L=SR(M,f[M],f[M+1],L);else for(M=d-g;M>=c;M-=g)L=SR(M,f[M],f[M+1],L);return L&&Mw(L,L.next)&&(A0(L),L=L.next),L}function Xv(f,c){if(!f)return f;c||(c=f);var d,g=f;do if(d=!1,g.steiner||!Mw(g,g.next)&&ua(g.prev,g,g.next)!==0)g=g.next;else{if(A0(g),(g=c=g.prev)===g.next)break;d=!0}while(d||g!==c);return c}function Q_(f,c,d,g,S,M,L){if(f){!L&&M&&function(ue,ge,_e,Me){var Ae=ue;do Ae.z===0&&(Ae.z=WS(Ae.x,Ae.y,ge,_e,Me)),Ae.prevZ=Ae.prev,Ae.nextZ=Ae.next,Ae=Ae.next;while(Ae!==ue);Ae.prevZ.nextZ=null,Ae.prevZ=null,function(Ne){var Qe,ft,Ct,dt,wt,Rt,Mt,cr,sr=1;do{for(ft=Ne,Ne=null,wt=null,Rt=0;ft;){for(Rt++,Ct=ft,Mt=0,Qe=0;Qe<sr&&(Mt++,Ct=Ct.nextZ);Qe++);for(cr=sr;Mt>0||cr>0&&Ct;)Mt!==0&&(cr===0||!Ct||ft.z<=Ct.z)?(dt=ft,ft=ft.nextZ,Mt--):(dt=Ct,Ct=Ct.nextZ,cr--),wt?wt.nextZ=dt:Ne=dt,dt.prevZ=wt,wt=dt;ft=Ct}wt.nextZ=null,sr*=2}while(Rt>1)}(Ae)}(f,g,S,M);for(var V,Q,te=f;f.prev!==f.next;)if(V=f.prev,Q=f.next,M?j4(f,g,S,M):wR(f))c.push(V.i/d|0),c.push(f.i/d|0),c.push(Q.i/d|0),A0(f),f=Q.next,te=Q.next;else if((f=Q)===te){L?L===1?Q_(f=Iw(Xv(f),c,d),c,d,g,S,M,2):L===2&&U4(f,c,d,g,S,M):Q_(Xv(f),c,d,g,S,M,1);break}}}function wR(f){var c=f.prev,d=f,g=f.next;if(ua(c,d,g)>=0)return!1;for(var S=c.x,M=d.x,L=g.x,V=c.y,Q=d.y,te=g.y,ue=S<M?S<L?S:L:M<L?M:L,ge=V<Q?V<te?V:te:Q<te?Q:te,_e=S>M?S>L?S:L:M>L?M:L,Me=V>Q?V>te?V:te:Q>te?Q:te,Ae=g.next;Ae!==c;){if(Ae.x>=ue&&Ae.x<=_e&&Ae.y>=ge&&Ae.y<=Me&&M0(S,V,M,Q,L,te,Ae.x,Ae.y)&&ua(Ae.prev,Ae,Ae.next)>=0)return!1;Ae=Ae.next}return!0}function j4(f,c,d,g){var S=f.prev,M=f,L=f.next;if(ua(S,M,L)>=0)return!1;for(var V=S.x,Q=M.x,te=L.x,ue=S.y,ge=M.y,_e=L.y,Me=V<Q?V<te?V:te:Q<te?Q:te,Ae=ue<ge?ue<_e?ue:_e:ge<_e?ge:_e,Ne=V>Q?V>te?V:te:Q>te?Q:te,Qe=ue>ge?ue>_e?ue:_e:ge>_e?ge:_e,ft=WS(Me,Ae,c,d,g),Ct=WS(Ne,Qe,c,d,g),dt=f.prevZ,wt=f.nextZ;dt&&dt.z>=ft&&wt&&wt.z<=Ct;){if(dt.x>=Me&&dt.x<=Ne&&dt.y>=Ae&&dt.y<=Qe&&dt!==S&&dt!==L&&M0(V,ue,Q,ge,te,_e,dt.x,dt.y)&&ua(dt.prev,dt,dt.next)>=0||(dt=dt.prevZ,wt.x>=Me&&wt.x<=Ne&&wt.y>=Ae&&wt.y<=Qe&&wt!==S&&wt!==L&&M0(V,ue,Q,ge,te,_e,wt.x,wt.y)&&ua(wt.prev,wt,wt.next)>=0))return!1;wt=wt.nextZ}for(;dt&&dt.z>=ft;){if(dt.x>=Me&&dt.x<=Ne&&dt.y>=Ae&&dt.y<=Qe&&dt!==S&&dt!==L&&M0(V,ue,Q,ge,te,_e,dt.x,dt.y)&&ua(dt.prev,dt,dt.next)>=0)return!1;dt=dt.prevZ}for(;wt&&wt.z<=Ct;){if(wt.x>=Me&&wt.x<=Ne&&wt.y>=Ae&&wt.y<=Qe&&wt!==S&&wt!==L&&M0(V,ue,Q,ge,te,_e,wt.x,wt.y)&&ua(wt.prev,wt,wt.next)>=0)return!1;wt=wt.nextZ}return!0}function Iw(f,c,d){var g=f;do{var S=g.prev,M=g.next.next;!Mw(S,M)&&CR(S,g,g.next,M)&&J_(S,M)&&J_(M,S)&&(c.push(S.i/d|0),c.push(g.i/d|0),c.push(M.i/d|0),A0(g),A0(g.next),g=f=M),g=g.next}while(g!==f);return Xv(g)}function U4(f,c,d,g,S,M){var L=f;do{for(var V=L.next.next;V!==L.prev;){if(L.i!==V.i&&q4(L,V)){var Q=ER(L,V);return L=Xv(L,L.next),Q=Xv(Q,Q.next),Q_(L,c,d,g,S,M,0),void Q_(Q,c,d,g,S,M,0)}V=V.next}L=L.next}while(L!==f)}function V4(f,c){return f.x-c.x}function H4(f,c){var d=function(S,M){var L,V=M,Q=S.x,te=S.y,ue=-1/0;do{if(te<=V.y&&te>=V.next.y&&V.next.y!==V.y){var ge=V.x+(te-V.y)*(V.next.x-V.x)/(V.next.y-V.y);if(ge<=Q&&ge>ue&&(ue=ge,L=V.x<V.next.x?V:V.next,ge===Q))return L}V=V.next}while(V!==M);if(!L)return null;var _e,Me=L,Ae=L.x,Ne=L.y,Qe=1/0;V=L;do Q>=V.x&&V.x>=Ae&&Q!==V.x&&M0(te<Ne?Q:ue,te,Ae,Ne,te<Ne?ue:Q,te,V.x,V.y)&&(_e=Math.abs(te-V.y)/(Q-V.x),J_(V,S)&&(_e<Qe||_e===Qe&&(V.x>L.x||V.x===L.x&&W4(L,V)))&&(L=V,Qe=_e)),V=V.next;while(V!==Me);return L}(f,c);if(!d)return c;var g=ER(d,f);return Xv(g,g.next),Xv(d,d.next)}function W4(f,c){return ua(f.prev,f,c.prev)<0&&ua(c.next,f,f.next)<0}function WS(f,c,d,g,S){return(f=1431655765&((f=858993459&((f=252645135&((f=16711935&((f=(f-d)*S|0)|f<<8))|f<<4))|f<<2))|f<<1))|(c=1431655765&((c=858993459&((c=252645135&((c=16711935&((c=(c-g)*S|0)|c<<8))|c<<4))|c<<2))|c<<1))<<1}function G4(f){var c=f,d=f;do(c.x<d.x||c.x===d.x&&c.y<d.y)&&(d=c),c=c.next;while(c!==f);return d}function M0(f,c,d,g,S,M,L,V){return(S-L)*(c-V)>=(f-L)*(M-V)&&(f-L)*(g-V)>=(d-L)*(c-V)&&(d-L)*(M-V)>=(S-L)*(g-V)}function q4(f,c){return f.next.i!==c.i&&f.prev.i!==c.i&&!function(d,g){var S=d;do{if(S.i!==d.i&&S.next.i!==d.i&&S.i!==g.i&&S.next.i!==g.i&&CR(S,S.next,d,g))return!0;S=S.next}while(S!==d);return!1}(f,c)&&(J_(f,c)&&J_(c,f)&&function(d,g){var S=d,M=!1,L=(d.x+g.x)/2,V=(d.y+g.y)/2;do S.y>V!=S.next.y>V&&S.next.y!==S.y&&L<(S.next.x-S.x)*(V-S.y)/(S.next.y-S.y)+S.x&&(M=!M),S=S.next;while(S!==d);return M}(f,c)&&(ua(f.prev,f,c.prev)||ua(f,c.prev,c))||Mw(f,c)&&ua(f.prev,f,f.next)>0&&ua(c.prev,c,c.next)>0)}function ua(f,c,d){return(c.y-f.y)*(d.x-c.x)-(c.x-f.x)*(d.y-c.y)}function Mw(f,c){return f.x===c.x&&f.y===c.y}function CR(f,c,d,g){var S=Rw(ua(f,c,d)),M=Rw(ua(f,c,g)),L=Rw(ua(d,g,f)),V=Rw(ua(d,g,c));return S!==M&&L!==V||!(S!==0||!Aw(f,d,c))||!(M!==0||!Aw(f,g,c))||!(L!==0||!Aw(d,f,g))||!(V!==0||!Aw(d,c,g))}function Aw(f,c,d){return c.x<=Math.max(f.x,d.x)&&c.x>=Math.min(f.x,d.x)&&c.y<=Math.max(f.y,d.y)&&c.y>=Math.min(f.y,d.y)}function Rw(f){return f>0?1:f<0?-1:0}function J_(f,c){return ua(f.prev,f,f.next)<0?ua(f,c,f.next)>=0&&ua(f,f.prev,c)>=0:ua(f,c,f.prev)<0||ua(f,f.next,c)<0}function ER(f,c){var d=new kw(f.i,f.x,f.y),g=new kw(c.i,c.x,c.y),S=f.next,M=c.prev;return f.next=c,c.prev=f,d.next=S,S.prev=d,g.next=d,d.prev=g,M.next=g,g.prev=M,g}function SR(f,c,d,g){var S=new kw(f,c,d);return g?(S.next=g.next,S.prev=g,g.next.prev=S,g.next=S):(S.prev=S,S.next=S),S}function A0(f){f.next.prev=f.prev,f.prev.next=f.next,f.prevZ&&(f.prevZ.nextZ=f.nextZ),f.nextZ&&(f.nextZ.prevZ=f.prevZ)}function kw(f,c,d){this.i=f,this.x=c,this.y=d,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function GS(f,c,d,g){for(var S=0,M=c,L=d-g;M<d;M+=g)S+=(f[L]-f[M])*(f[M+1]+f[L+1]),L=M;return S}HS.exports=Pw,HS.exports.default=Pw,Pw.deviation=function(f,c,d,g){var S=c&&c.length,M=Math.abs(GS(f,0,S?c[0]*d:f.length,d));if(S)for(var L=0,V=c.length;L<V;L++)M-=Math.abs(GS(f,c[L]*d,L<V-1?c[L+1]*d:f.length,d));var Q=0;for(L=0;L<g.length;L+=3){var te=g[L]*d,ue=g[L+1]*d,ge=g[L+2]*d;Q+=Math.abs((f[te]-f[ge])*(f[ue+1]-f[te+1])-(f[te]-f[ue])*(f[ge+1]-f[te+1]))}return M===0&&Q===0?0:Math.abs((Q-M)/M)},Pw.flatten=function(f){for(var c=f[0][0].length,d={vertices:[],holes:[],dimensions:c},g=0,S=0;S<f.length;S++){for(var M=0;M<f[S].length;M++)for(var L=0;L<c;L++)d.vertices.push(f[S][M][L]);S>0&&d.holes.push(g+=f[S-1].length)}return d};var qS=T(HS.exports);function X4(f,c,d,g,S){TR(f,c,d||0,g||f.length-1,S||Y4)}function TR(f,c,d,g,S){for(;g>d;){if(g-d>600){var M=g-d+1,L=c-d+1,V=Math.log(M),Q=.5*Math.exp(2*V/3),te=.5*Math.sqrt(V*Q*(M-Q)/M)*(L-M/2<0?-1:1);TR(f,c,Math.max(d,Math.floor(c-L*Q/M+te)),Math.min(g,Math.floor(c+(M-L)*Q/M+te)),S)}var ue=f[c],ge=d,_e=g;for(Sg(f,d,c),S(f[g],ue)>0&&Sg(f,d,g);ge<_e;){for(Sg(f,ge,_e),ge++,_e--;S(f[ge],ue)<0;)ge++;for(;S(f[_e],ue)>0;)_e--}S(f[d],ue)===0?Sg(f,d,_e):Sg(f,++_e,g),_e<=c&&(d=_e+1),c<=_e&&(g=_e-1)}}function Sg(f,c,d){var g=f[c];f[c]=f[d],f[d]=g}function Y4(f,c){return f<c?-1:f>c?1:0}function XS(f,c){const d=f.length;if(d<=1)return[f];const g=[];let S,M;for(let L=0;L<d;L++){const V=ht(f[L]);V!==0&&(f[L].area=Math.abs(V),M===void 0&&(M=V<0),M===V<0?(S&&g.push(S),S=[f[L]]):S.push(f[L]))}if(S&&g.push(S),c>1)for(let L=0;L<g.length;L++)g[L].length<=c||(X4(g[L],c,1,g[L].length-1,K4),g[L]=g[L].slice(0,c));return g}function K4(f,c){return c.area-f.area}function YS(f,c,d){const g=d.patternDependencies;let S=!1;for(const M of c){const L=M.paint.get(`${f}-pattern`);L.isConstant()||(S=!0);const V=L.constantOr(null);V&&(S=!0,g[V]=!0)}return S}function KS(f,c,d,g,S){const M=S.patternDependencies;for(const L of c){const V=L.paint.get(`${f}-pattern`).value;if(V.kind!=="constant"){let Q=V.evaluate({zoom:g},d,{},S.availableImages);Q=Q&&Q.name?Q.name:Q,M[Q]=!0,d.patterns[L.id]=Q}}return d}class Ow{constructor(c){this.zoom=c.zoom,this.overscaling=c.overscaling,this.layers=c.layers,this.layerIds=this.layers.map(d=>d.id),this.index=c.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new Wr,this.indexArray=new An,this.indexArray2=new ol,this.programConfigurations=new Dv(c.layers,c.zoom),this.segments=new la,this.segments2=new la,this.stateDependentLayerIds=this.layers.filter(d=>d.isStateDependent()).map(d=>d.id),this.projection=c.projection}populate(c,d,g,S){this.hasPattern=YS("fill",this.layers,d);const M=this.layers[0].layout.get("fill-sort-key"),L=[];for(const{feature:V,id:Q,index:te,sourceLayerIndex:ue}of c){const ge=this.layers[0]._featureFilter.needGeometry,_e=Gv(V,ge);if(!this.layers[0]._featureFilter.filter(new he(this.zoom),_e,g))continue;const Me=M?M.evaluate(_e,{},g,d.availableImages):void 0,Ae={id:Q,properties:V.properties,type:V.type,sourceLayerIndex:ue,index:te,geometry:ge?_e.geometry:cm(V,g,S),patterns:{},sortKey:Me};L.push(Ae)}M&&L.sort((V,Q)=>V.sortKey-Q.sortKey);for(const V of L){const{geometry:Q,index:te,sourceLayerIndex:ue}=V;if(this.hasPattern){const ge=KS("fill",this.layers,V,this.zoom,d);this.patternFeatures.push(ge)}else this.addFeature(V,Q,te,g,{},d.availableImages);d.featureIndex.insert(c[te].feature,Q,te,ue,this.index)}}update(c,d,g,S){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(c,d,this.stateDependentLayers,g,S)}addFeatures(c,d,g,S,M){for(const L of this.patternFeatures)this.addFeature(L,L.geometry,L.index,d,g,S)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(c){this.uploaded||(this.layoutVertexBuffer=c.createVertexBuffer(this.layoutVertexArray,B4),this.indexBuffer=c.createIndexBuffer(this.indexArray),this.indexBuffer2=c.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(c),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())}addFeature(c,d,g,S,M,L=[]){for(const V of XS(d,500)){let Q=0;for(const Ae of V)Q+=Ae.length;const te=this.segments.prepareSegment(Q,this.layoutVertexArray,this.indexArray),ue=te.vertexLength,ge=[],_e=[];for(const Ae of V){if(Ae.length===0)continue;Ae!==V[0]&&_e.push(ge.length/2);const Ne=this.segments2.prepareSegment(Ae.length,this.layoutVertexArray,this.indexArray2),Qe=Ne.vertexLength;this.layoutVertexArray.emplaceBack(Ae[0].x,Ae[0].y),this.indexArray2.emplaceBack(Qe+Ae.length-1,Qe),ge.push(Ae[0].x),ge.push(Ae[0].y);for(let ft=1;ft<Ae.length;ft++)this.layoutVertexArray.emplaceBack(Ae[ft].x,Ae[ft].y),this.indexArray2.emplaceBack(Qe+ft-1,Qe+ft),ge.push(Ae[ft].x),ge.push(Ae[ft].y);Ne.vertexLength+=Ae.length,Ne.primitiveLength+=Ae.length}const Me=qS(ge,_e);for(let Ae=0;Ae<Me.length;Ae+=3)this.indexArray.emplaceBack(ue+Me[Ae],ue+Me[Ae+1],ue+Me[Ae+2]);te.vertexLength+=Q,te.primitiveLength+=Me.length/3}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,c,g,M,L,S)}}Sn(Ow,"FillBucket",{omit:["layers","patternFeatures"]});const Z4=new mt({"fill-sort-key":new it(dr.layout_fill["fill-sort-key"])});var Q4={paint:new mt({"fill-antialias":new De(dr.paint_fill["fill-antialias"]),"fill-opacity":new it(dr.paint_fill["fill-opacity"]),"fill-color":new it(dr.paint_fill["fill-color"]),"fill-outline-color":new it(dr.paint_fill["fill-outline-color"]),"fill-translate":new De(dr.paint_fill["fill-translate"]),"fill-translate-anchor":new De(dr.paint_fill["fill-translate-anchor"]),"fill-pattern":new it(dr.paint_fill["fill-pattern"])}),layout:Z4};const J4=Vt([{name:"a_pos_normal_ed",components:4,type:"Int16"}]),eF=Vt([{name:"a_centroid_pos",components:2,type:"Uint16"}]),tF=Vt([{name:"a_pos_3",components:3,type:"Int16"},{name:"a_pos_normal_3",components:3,type:"Int16"}]),{members:Lw}=J4;var Dw={},PR=Z,ZS=Tg;function Tg(f,c,d,g,S){this.properties={},this.extent=d,this.type=0,this._pbf=f,this._geometry=-1,this._keys=g,this._values=S,f.readFields(IR,this,c)}function IR(f,c,d){f==1?c.id=d.readVarint():f==2?function(g,S){for(var M=g.readVarint()+g.pos;g.pos<M;){var L=S._keys[g.readVarint()],V=S._values[g.readVarint()];S.properties[L]=V}}(d,c):f==3?c.type=d.readVarint():f==4&&(c._geometry=d.pos)}function MR(f){for(var c,d,g=0,S=0,M=f.length,L=M-1;S<M;L=S++)g+=((d=f[L]).x-(c=f[S]).x)*(c.y+d.y);return g}Tg.types=["Unknown","Point","LineString","Polygon"],Tg.prototype.loadGeometry=function(){var f=this._pbf;f.pos=this._geometry;for(var c,d=f.readVarint()+f.pos,g=1,S=0,M=0,L=0,V=[];f.pos<d;){if(S<=0){var Q=f.readVarint();g=7&Q,S=Q>>3}if(S--,g===1||g===2)M+=f.readSVarint(),L+=f.readSVarint(),g===1&&(c&&V.push(c),c=[]),c.push(new PR(M,L));else{if(g!==7)throw new Error("unknown command "+g);c&&c.push(c[0].clone())}}return c&&V.push(c),V},Tg.prototype.bbox=function(){var f=this._pbf;f.pos=this._geometry;for(var c=f.readVarint()+f.pos,d=1,g=0,S=0,M=0,L=1/0,V=-1/0,Q=1/0,te=-1/0;f.pos<c;){if(g<=0){var ue=f.readVarint();d=7&ue,g=ue>>3}if(g--,d===1||d===2)(S+=f.readSVarint())<L&&(L=S),S>V&&(V=S),(M+=f.readSVarint())<Q&&(Q=M),M>te&&(te=M);else if(d!==7)throw new Error("unknown command "+d)}return[L,Q,V,te]},Tg.prototype.toGeoJSON=function(f,c,d){var g,S,M=this.extent*Math.pow(2,d),L=this.extent*f,V=this.extent*c,Q=this.loadGeometry(),te=Tg.types[this.type];function ue(Me){for(var Ae=0;Ae<Me.length;Ae++){var Ne=Me[Ae];Me[Ae]=[360*(Ne.x+L)/M-180,360/Math.PI*Math.atan(Math.exp((180-360*(Ne.y+V)/M)*Math.PI/180))-90]}}switch(this.type){case 1:var ge=[];for(g=0;g<Q.length;g++)ge[g]=Q[g][0];ue(Q=ge);break;case 2:for(g=0;g<Q.length;g++)ue(Q[g]);break;case 3:for(Q=function(Me){var Ae=Me.length;if(Ae<=1)return[Me];for(var Ne,Qe,ft=[],Ct=0;Ct<Ae;Ct++){var dt=MR(Me[Ct]);dt!==0&&(Qe===void 0&&(Qe=dt<0),Qe===dt<0?(Ne&&ft.push(Ne),Ne=[Me[Ct]]):Ne.push(Me[Ct]))}return Ne&&ft.push(Ne),ft}(Q),g=0;g<Q.length;g++)for(S=0;S<Q[g].length;S++)ue(Q[g][S])}Q.length===1?Q=Q[0]:te="Multi"+te;var _e={type:"Feature",geometry:{type:te,coordinates:Q},properties:this.properties};return"id"in this&&(_e.id=this.id),_e};var AR=ZS,QS=RR;function RR(f,c){this.version=1,this.name=null,this.extent=4096,this.length=0,this._pbf=f,this._keys=[],this._values=[],this._features=[],f.readFields(rF,this,c),this.length=this._features.length}function rF(f,c,d){f===15?c.version=d.readVarint():f===1?c.name=d.readString():f===5?c.extent=d.readVarint():f===2?c._features.push(d.pos):f===3?c._keys.push(d.readString()):f===4&&c._values.push(function(g){for(var S=null,M=g.readVarint()+g.pos;g.pos<M;){var L=g.readVarint()>>3;S=L===1?g.readString():L===2?g.readFloat():L===3?g.readDouble():L===4?g.readVarint64():L===5?g.readVarint():L===6?g.readSVarint():L===7?g.readBoolean():null}return S}(d))}RR.prototype.feature=function(f){if(f<0||f>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[f];var c=this._pbf.readVarint()+this._pbf.pos;return new AR(this._pbf,c,this.extent,this._keys,this._values)};var nF=QS;function Nw(f,c,d){if(f===3){var g=new nF(d,d.readVarint()+d.pos);g.length&&(c[g.name]=g)}}var R0=Dw.VectorTile=function(f,c){this.layers=f.readFields(Nw,{},c)},$w=Dw.VectorTileFeature=ZS;function Fw(f,c,d,g){const S=[],M=g===0?(L,V,Q,te,ue,ge)=>{L.push(new D(ge,Q+(ge-V)/(te-V)*(ue-Q)))}:(L,V,Q,te,ue,ge)=>{L.push(new D(V+(ge-Q)/(ue-Q)*(te-V),ge))};for(const L of f){const V=[];for(const Q of L){if(Q.length<=2)continue;const te=[];for(let _e=0;_e<Q.length-1;_e++){const Me=Q[_e].x,Ae=Q[_e].y,Ne=Q[_e+1].x,Qe=Q[_e+1].y,ft=g===0?Me:Ae,Ct=g===0?Ne:Qe;ft<c?Ct>c&&M(te,Me,Ae,Ne,Qe,c):ft>d?Ct<d&&M(te,Me,Ae,Ne,Qe,d):te.push(Q[_e]),Ct<c&&ft>=c&&M(te,Me,Ae,Ne,Qe,c),Ct>d&&ft<=d&&M(te,Me,Ae,Ne,Qe,d)}let ue=Q[Q.length-1];const ge=g===0?ue.x:ue.y;ge>=c&&ge<=d&&te.push(ue),te.length&&(ue=te[te.length-1],te[0].x===ue.x&&te[0].y===ue.y||te.push(te[0]),V.push(te))}V.length&&S.push(V)}return S}Dw.VectorTileLayer=QS;const JS=$w.types,kR=Math.pow(2,13);function e1(f,c,d,g,S,M,L,V){f.emplaceBack((c<<1)+L,(d<<1)+M,(Math.floor(g*kR)<<1)+S,Math.round(V))}function t1(f,c,d){const g=16384;f.emplaceBack(c.x,c.y,c.z,d[0]*g,d[1]*g,d[2]*g)}class OR{constructor(){this.acc=new D(0,0),this.polyCount=[]}startRing(c){this.currentPolyCount={edges:0,top:0},this.polyCount.push(this.currentPolyCount),this.min||(this.min=new D(c.x,c.y),this.max=new D(c.x,c.y))}append(c,d){this.currentPolyCount.edges++,this.acc._add(c);const g=this.min,S=this.max;c.x<g.x?g.x=c.x:c.x>S.x&&(S.x=c.x),c.y<g.y?g.y=c.y:c.y>S.y&&(S.y=c.y),((c.x===0||c.x===$n)&&c.x===d.x)!=((c.y===0||c.y===$n)&&c.y===d.y)&&this.processBorderOverlap(c,d),d.x<0!=c.x<0&&this.addBorderIntersection(0,Ii(d.y,c.y,(0-d.x)/(c.x-d.x))),d.x>$n!=c.x>$n&&this.addBorderIntersection(1,Ii(d.y,c.y,($n-d.x)/(c.x-d.x))),d.y<0!=c.y<0&&this.addBorderIntersection(2,Ii(d.x,c.x,(0-d.y)/(c.y-d.y))),d.y>$n!=c.y>$n&&this.addBorderIntersection(3,Ii(d.x,c.x,($n-d.y)/(c.y-d.y)))}addBorderIntersection(c,d){this.borders||(this.borders=[[Number.MAX_VALUE,-Number.MAX_VALUE],[Number.MAX_VALUE,-Number.MAX_VALUE],[Number.MAX_VALUE,-Number.MAX_VALUE],[Number.MAX_VALUE,-Number.MAX_VALUE]]);const g=this.borders[c];d<g[0]&&(g[0]=d),d>g[1]&&(g[1]=d)}processBorderOverlap(c,d){if(c.x===d.x){if(c.y===d.y)return;const g=c.x===0?0:1;this.addBorderIntersection(g,d.y),this.addBorderIntersection(g,c.y)}else{const g=c.y===0?2:3;this.addBorderIntersection(g,d.x),this.addBorderIntersection(g,c.x)}}centroid(){const c=this.polyCount.reduce((d,g)=>d+g.edges,0);return c!==0?this.acc.div(c)._round():new D(0,0)}span(){return new D(this.max.x-this.min.x,this.max.y-this.min.y)}intersectsCount(){return this.borders.reduce((c,d)=>c+ +(d[0]!==Number.MAX_VALUE),0)}}class r1{constructor(c){this.zoom=c.zoom,this.canonical=c.canonical,this.overscaling=c.overscaling,this.layers=c.layers,this.layerIds=this.layers.map(d=>d.id),this.index=c.index,this.hasPattern=!1,this.edgeRadius=0,this.projection=c.projection,this.layoutVertexArray=new Tr,this.centroidVertexArray=new Lf,this.indexArray=new An,this.programConfigurations=new Dv(c.layers,c.zoom),this.segments=new la,this.stateDependentLayerIds=this.layers.filter(d=>d.isStateDependent()).map(d=>d.id),this.enableTerrain=c.enableTerrain}populate(c,d,g,S){this.features=[],this.hasPattern=YS("fill-extrusion",this.layers,d),this.featuresOnBorder=[],this.borders=[[],[],[],[]],this.borderDoneWithNeighborZ=[-1,-1,-1,-1],this.tileToMeter=function(M){const L=Math.exp(Math.PI*(1-M.y/(1<<M.z)*2));return 80150034*L/(L*L+1)/$n/(1<<M.z)}(g),this.edgeRadius=this.layers[0].layout.get("fill-extrusion-edge-radius")/this.tileToMeter;for(const{feature:M,id:L,index:V,sourceLayerIndex:Q}of c){const te=this.layers[0]._featureFilter.needGeometry,ue=Gv(M,te);if(!this.layers[0]._featureFilter.filter(new he(this.zoom),ue,g))continue;const ge={id:L,sourceLayerIndex:Q,index:V,geometry:te?ue.geometry:cm(M,g,S),properties:M.properties,type:M.type,patterns:{}},_e=this.layoutVertexArray.length;this.hasPattern?this.features.push(KS("fill-extrusion",this.layers,ge,this.zoom,d)):this.addFeature(ge,ge.geometry,V,g,{},d.availableImages,S),d.featureIndex.insert(M,ge.geometry,V,Q,this.index,_e)}this.sortBorders()}addFeatures(c,d,g,S,M){for(const L of this.features){const{geometry:V}=L;this.addFeature(L,V,L.index,d,g,S,M)}this.sortBorders()}update(c,d,g,S){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(c,d,this.stateDependentLayers,g,S)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(c){this.uploaded||(this.layoutVertexBuffer=c.createVertexBuffer(this.layoutVertexArray,Lw),this.indexBuffer=c.createIndexBuffer(this.indexArray),this.layoutVertexExtArray&&(this.layoutVertexExtBuffer=c.createVertexBuffer(this.layoutVertexExtArray,tF.members,!0))),this.programConfigurations.upload(c),this.uploaded=!0}uploadCentroid(c){this.centroidVertexArray.length!==0&&(this.centroidVertexBuffer?this.needsCentroidUpdate&&this.centroidVertexBuffer.updateData(this.centroidVertexArray):this.centroidVertexBuffer=c.createVertexBuffer(this.centroidVertexArray,eF.members,!0),this.needsCentroidUpdate=!1)}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.centroidVertexBuffer&&this.centroidVertexBuffer.destroy(),this.layoutVertexExtBuffer&&this.layoutVertexExtBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}addFeature(c,d,g,S,M,L,V){const Q=[new D(0,0),new D($n,$n)],te=V.projection,ue=te.name==="globe",ge=this.enableTerrain&&!ue?new OR:null,_e=JS[c.type]==="Polygon";ue&&!this.layoutVertexExtArray&&(this.layoutVertexExtArray=new qr);const Me=XS(d,500);for(let ft=Me.length-1;ft>=0;ft--){const Ct=Me[ft];(Ct.length===0||(Ae=Ct[0]).every(dt=>dt.x<=0)||Ae.every(dt=>dt.x>=$n)||Ae.every(dt=>dt.y<=0)||Ae.every(dt=>dt.y>=$n))&&Me.splice(ft,1)}var Ae;let Ne;if(ue)Ne=BR(Me,Q,S);else{Ne=[];for(const ft of Me)Ne.push({polygon:ft,bounds:Q})}const Qe=_e?this.edgeRadius:0;for(const{polygon:ft,bounds:Ct}of Ne){let dt=0,wt=0;for(const Mt of ft)_e&&!Mt[0].equals(Mt[Mt.length-1])&&Mt.push(Mt[0]),wt+=_e?Mt.length-1:Mt.length;const Rt=this.segments.prepareSegment((_e?5:4)*wt,this.layoutVertexArray,this.indexArray);if(_e){const Mt=[],cr=[];dt=Rt.vertexLength;for(const Cr of ft){let Kr,hr;Cr.length&&Cr!==ft[0]&&cr.push(Mt.length/2),Kr=Cr[1].sub(Cr[0])._perp()._unit();for(let Mr=1;Mr<Cr.length;Mr++){const Ar=Cr[Mr],$r=Cr[Mr===Cr.length-1?1:Mr+1];let{x:Qr,y:_r}=Ar;if(Qe){hr=$r.sub(Ar)._perp()._unit();const yn=Kr.add(hr)._unit(),Pn=Qe*Math.min(4,1/(Kr.x*yn.x+Kr.y*yn.y));Qr+=Pn*yn.x,_r+=Pn*yn.y,Kr=hr}e1(this.layoutVertexArray,Qr,_r,0,0,1,1,0),Rt.vertexLength++,Mt.push(Ar.x,Ar.y),ue&&t1(this.layoutVertexExtArray,te.projectTilePoint(Qr,_r,S),te.upVector(S,Qr,_r))}}const sr=qS(Mt,cr);for(let Cr=0;Cr<sr.length;Cr+=3)this.indexArray.emplaceBack(dt+sr[Cr],dt+sr[Cr+2],dt+sr[Cr+1]),Rt.primitiveLength++}for(const Mt of ft){ge&&Mt.length&&ge.startRing(Mt[0]);let cr,sr,Cr,Kr=Mt.length>4&&$R(Mt[Mt.length-2],Mt[0],Mt[1]),hr=Qe?iF(Mt[Mt.length-2],Mt[0],Mt[1],Qe):0;sr=Mt[1].sub(Mt[0])._perp()._unit();let Mr=!0;for(let Ar=1,$r=0;Ar<Mt.length;Ar++){let Qr=Mt[Ar-1],_r=Mt[Ar];const yn=Mt[Ar===Mt.length-1?1:Ar+1];if(ge&&_e&&ge.currentPolyCount.top++,NR(_r,Qr,Ct)){Qe&&(sr=yn.sub(_r)._perp()._unit(),Mr=!Mr);continue}ge&&ge.append(_r,Qr);const Pn=_r.sub(Qr)._perp(),_n=Pn.x/(Math.abs(Pn.x)+Math.abs(Pn.y)),vi=Pn.y>0?1:0,en=Qr.dist(_r);if($r+en>32768&&($r=0),Qe){Cr=yn.sub(_r)._perp()._unit();let xi=DR(Qr,_r,yn,LR(sr,Cr),Qe);isNaN(xi)&&(xi=0);const Jn=_r.sub(Qr)._unit();Qr=Qr.add(Jn.mult(hr))._round(),_r=_r.add(Jn.mult(-xi))._round(),hr=xi,sr=Cr}const zn=Rt.vertexLength,yi=Mt.length>4&&$R(Qr,_r,yn);let vo=FR($r,Kr,Mr);if(e1(this.layoutVertexArray,Qr.x,Qr.y,_n,vi,0,0,vo),e1(this.layoutVertexArray,Qr.x,Qr.y,_n,vi,0,1,vo),$r+=en,vo=FR($r,yi,!Mr),Kr=yi,e1(this.layoutVertexArray,_r.x,_r.y,_n,vi,0,0,vo),e1(this.layoutVertexArray,_r.x,_r.y,_n,vi,0,1,vo),Rt.vertexLength+=4,this.indexArray.emplaceBack(zn+0,zn+1,zn+2),this.indexArray.emplaceBack(zn+1,zn+3,zn+2),Rt.primitiveLength+=2,Qe){const xi=dt+(Ar===1?Mt.length-2:Ar-2),Jn=Ar===1?dt:xi+1;if(this.indexArray.emplaceBack(zn+1,xi,zn+3),this.indexArray.emplaceBack(xi,Jn,zn+3),Rt.primitiveLength+=2,cr===void 0&&(cr=zn),!NR(yn,Mt[Ar],Ct)){const gs=Ar===Mt.length-1?cr:Rt.vertexLength;this.indexArray.emplaceBack(zn+2,zn+3,gs),this.indexArray.emplaceBack(zn+3,gs+1,gs),this.indexArray.emplaceBack(zn+3,Jn,gs+1),Rt.primitiveLength+=3}Mr=!Mr}if(ue){const xi=this.layoutVertexExtArray,Jn=te.projectTilePoint(Qr.x,Qr.y,S),gs=te.projectTilePoint(_r.x,_r.y,S),wi=te.upVector(S,Qr.x,Qr.y),Ci=te.upVector(S,_r.x,_r.y);t1(xi,Jn,wi),t1(xi,Jn,wi),t1(xi,gs,Ci),t1(xi,gs,Ci)}}_e&&(dt+=Mt.length-1)}}if(ge&&ge.polyCount.length>0){if(ge.borders){ge.vertexArrayOffset=this.centroidVertexArray.length;const ft=ge.borders,Ct=this.featuresOnBorder.push(ge)-1;for(let dt=0;dt<4;dt++)ft[dt][0]!==Number.MAX_VALUE&&this.borders[dt].push(Ct)}this.encodeCentroid(ge.borders?void 0:ge.centroid(),ge)}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,c,g,M,L,S)}sortBorders(){for(let c=0;c<4;c++)this.borders[c].sort((d,g)=>this.featuresOnBorder[d].borders[c][0]-this.featuresOnBorder[g].borders[c][0])}encodeCentroid(c,d,g=!0){let S,M;if(c)if(c.y!==0){const V=d.span()._mult(this.tileToMeter);S=(Math.max(c.x,1)<<3)+Math.min(7,Math.round(V.x/10)),M=(Math.max(c.y,1)<<3)+Math.min(7,Math.round(V.y/10))}else S=Math.ceil(7*(c.x+450)),M=0;else S=0,M=+g;let L=g?this.centroidVertexArray.length:d.vertexArrayOffset;for(const V of d.polyCount){g&&this.centroidVertexArray.resize(this.centroidVertexArray.length+4*V.edges+V.top);for(let Q=0;Q<V.top;Q++)this.centroidVertexArray.emplace(L++,S,M);for(let Q=0;Q<2*V.edges;Q++)this.centroidVertexArray.emplace(L++,0,M),this.centroidVertexArray.emplace(L++,S,M)}}}function LR(f,c){const d=f.add(c)._unit();return f.x*d.x+f.y*d.y}function iF(f,c,d,g){const S=c.sub(f)._perp()._unit(),M=d.sub(c)._perp()._unit();return DR(f,c,d,LR(S,M),g)}function DR(f,c,d,g,S){const M=Math.sqrt(1-g*g);return Math.min(f.dist(c)/3,c.dist(d)/3,S*M/g)}function NR(f,c,d){return f.x<d[0].x&&c.x<d[0].x||f.x>d[1].x&&c.x>d[1].x||f.y<d[0].y&&c.y<d[0].y||f.y>d[1].y&&c.y>d[1].y}function $R(f,c,d){if(f.x<0||f.x>=$n||c.x<0||c.x>=$n||d.x<0||d.x>=$n)return!1;const g=d.sub(c),S=g.perp(),M=f.sub(c);return(g.x*M.x+g.y*M.y)/Math.sqrt((g.x*g.x+g.y*g.y)*(M.x*M.x+M.y*M.y))>-.866&&S.x*M.x+S.y*M.y<0}function FR(f,c,d){const g=c?2|f:-3&f;return d?1|g:-2&g}function zR(){const f=Math.PI/32,c=Math.tan(f),d=P0;return d*Math.sqrt(1+2*c*c)-d}function BR(f,c,d){const g=1<<d.z,S=Zu(d.x/g),M=Zu((d.x+1)/g),L=Rl(d.y/g),V=Rl((d.y+1)/g);return function(Q,te,ue,ge,_e=0,Me){const Ae=[];if(!Q.length||!ue||!ge)return Ae;const Ne=(Mt,cr)=>{for(const sr of Mt)Ae.push({polygon:sr,bounds:cr})},Qe=Math.ceil(Math.log2(ue)),ft=Math.ceil(Math.log2(ge)),Ct=Qe-ft,dt=[];for(let Mt=0;Mt<Math.abs(Ct);Mt++)dt.push(Ct>0?0:1);for(let Mt=0;Mt<Math.min(Qe,ft);Mt++)dt.push(0),dt.push(1);let wt=Q;if(wt=Fw(wt,te[0].y-_e,te[1].y+_e,1),wt=Fw(wt,te[0].x-_e,te[1].x+_e,0),!wt.length)return Ae;const Rt=[];for(dt.length?Rt.push({polygons:wt,bounds:te,depth:0}):Ne(wt,te);Rt.length;){const Mt=Rt.pop(),cr=Mt.depth,sr=dt[cr],Cr=Mt.bounds[0],Kr=Mt.bounds[1],hr=sr===0?Cr.x:Cr.y,Mr=sr===0?Kr.x:Kr.y,Ar=Me?Me(sr,hr,Mr):.5*(hr+Mr),$r=Fw(Mt.polygons,hr-_e,Ar+_e,sr),Qr=Fw(Mt.polygons,Ar-_e,Mr+_e,sr);if($r.length){const _r=[Cr,new D(sr===0?Ar:Kr.x,sr===1?Ar:Kr.y)];dt.length>cr+1?Rt.push({polygons:$r,bounds:_r,depth:cr+1}):Ne($r,_r)}if(Qr.length){const _r=[new D(sr===0?Ar:Cr.x,sr===1?Ar:Cr.y),Kr];dt.length>cr+1?Rt.push({polygons:Qr,bounds:_r,depth:cr+1}):Ne(Qr,_r)}}return Ae}(f,c,Math.ceil((M-S)/11.25),Math.ceil((L-V)/11.25),1,(Q,te,ue)=>{if(Q===0)return .5*(te+ue);{const ge=Rl((d.y+te/$n)/g);return(jh(.5*(Rl((d.y+ue/$n)/g)+ge))*g-d.y)*$n}})}Sn(r1,"FillExtrusionBucket",{omit:["layers","features"]}),Sn(OR,"PartMetadata");const Nd=new mt({"fill-extrusion-edge-radius":new De(dr["layout_fill-extrusion"]["fill-extrusion-edge-radius"])});var oF={paint:new mt({"fill-extrusion-opacity":new De(dr["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new it(dr["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new De(dr["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new De(dr["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new it(dr["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new it(dr["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new it(dr["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new De(dr["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"]),"fill-extrusion-ambient-occlusion-intensity":new De(dr["paint_fill-extrusion"]["fill-extrusion-ambient-occlusion-intensity"]),"fill-extrusion-ambient-occlusion-radius":new De(dr["paint_fill-extrusion"]["fill-extrusion-ambient-occlusion-radius"]),"fill-extrusion-rounded-roof":new De(dr["paint_fill-extrusion"]["fill-extrusion-rounded-roof"])}),layout:Nd};function jR(f,c,d){var g=2*Math.PI*6378137/256/Math.pow(2,d);return[f*g-2*Math.PI*6378137/2,c*g-2*Math.PI*6378137/2]}class Uh{constructor(c,d,g){this.z=c,this.x=d,this.y=g,this.key=Ol(0,c,c,d,g)}equals(c){return this.z===c.z&&this.x===c.x&&this.y===c.y}url(c,d){const g=function(M,L,V){var Q=jR(256*M,256*(L=Math.pow(2,V)-L-1),V),te=jR(256*(M+1),256*(L+1),V);return Q[0]+","+Q[1]+","+te[0]+","+te[1]}(this.x,this.y,this.z),S=function(M,L,V){let Q,te="";for(let ue=M;ue>0;ue--)Q=1<<ue-1,te+=(L&Q?1:0)+(V&Q?2:0);return te}(this.z,this.x,this.y);return c[(this.x+this.y)%c.length].replace("{prefix}",(this.x%16).toString(16)+(this.y%16).toString(16)).replace(/{z}/g,String(this.z)).replace(/{x}/g,String(this.x)).replace(/{y}/g,String(d==="tms"?Math.pow(2,this.z)-this.y-1:this.y)).replace("{quadkey}",S).replace("{bbox-epsg-3857}",g)}toString(){return`${this.z}/${this.x}/${this.y}`}}class Ni{constructor(c,d){this.wrap=c,this.canonical=d,this.key=Ol(c,d.z,d.z,d.x,d.y)}}class gc{constructor(c,d,g,S,M){this.overscaledZ=c,this.wrap=d,this.canonical=new Uh(g,+S,+M),this.key=d===0&&c===g?this.canonical.key:Ol(d,c,g,S,M)}equals(c){return this.overscaledZ===c.overscaledZ&&this.wrap===c.wrap&&this.canonical.equals(c.canonical)}scaledTo(c){const d=this.canonical.z-c;return c>this.canonical.z?new gc(c,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new gc(c,this.wrap,c,this.canonical.x>>d,this.canonical.y>>d)}calculateScaledKey(c,d=!0){if(this.overscaledZ===c&&d)return this.key;if(c>this.canonical.z)return Ol(this.wrap*+d,c,this.canonical.z,this.canonical.x,this.canonical.y);{const g=this.canonical.z-c;return Ol(this.wrap*+d,c,c,this.canonical.x>>g,this.canonical.y>>g)}}isChildOf(c){if(c.wrap!==this.wrap)return!1;const d=this.canonical.z-c.canonical.z;return c.overscaledZ===0||c.overscaledZ<this.overscaledZ&&c.canonical.x===this.canonical.x>>d&&c.canonical.y===this.canonical.y>>d}children(c){if(this.overscaledZ>=c)return[new gc(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];const d=this.canonical.z+1,g=2*this.canonical.x,S=2*this.canonical.y;return[new gc(d,this.wrap,d,g,S),new gc(d,this.wrap,d,g+1,S),new gc(d,this.wrap,d,g,S+1),new gc(d,this.wrap,d,g+1,S+1)]}isLessThan(c){return this.wrap<c.wrap||!(this.wrap>c.wrap)&&(this.overscaledZ<c.overscaledZ||!(this.overscaledZ>c.overscaledZ)&&(this.canonical.x<c.canonical.x||!(this.canonical.x>c.canonical.x)&&this.canonical.y<c.canonical.y))}wrapped(){return new gc(this.overscaledZ,0,this.canonical.z,this.canonical.x,this.canonical.y)}unwrapTo(c){return new gc(this.overscaledZ,c,this.canonical.z,this.canonical.x,this.canonical.y)}overscaleFactor(){return Math.pow(2,this.overscaledZ-this.canonical.z)}toUnwrapped(){return new Ni(this.wrap,this.canonical)}toString(){return`${this.overscaledZ}/${this.canonical.x}/${this.canonical.y}`}}function Ol(f,c,d,g,S){const M=1<<Math.min(d,22);let L=M*(S%M)+g%M;return f&&d<22&&(L+=M*M*((f<0?-2*f-1:2*f)%(1<<2*(22-d)))),16*(32*L+d)+(c-d)}Sn(Uh,"CanonicalTileID"),Sn(gc,"OverscaledTileID",{omit:["projMatrix"]});class Ms extends D{constructor(c,d,g){super(c,d),this.z=g}}function n1(f,c){return f.x*c.x+f.y*c.y}function fm(f,c){if(f.length===1){let d=0;const g=c[d++];let S;for(;!S||g.equals(S);)if(S=c[d++],!S)return 1/0;for(;d<c.length;d++){const M=c[d],L=f[0],V=S.sub(g),Q=M.sub(g),te=L.sub(g),ue=n1(V,V),ge=n1(V,Q),_e=n1(Q,Q),Me=n1(te,V),Ae=n1(te,Q),Ne=ue*_e-ge*ge,Qe=(_e*Me-ge*Ae)/Ne,ft=(ue*Ae-ge*Me)/Ne,Ct=g.z*(1-Qe-ft)+S.z*Qe+M.z*ft;if(isFinite(Ct))return Ct}return 1/0}{let d=1/0;for(const g of c)d=Math.min(d,g.z);return d}}function UR(f,c,d,g,S,M,L,V){const Q=L*S.getElevationAt(f,c,!0,!0),te=M[0]!==0,ue=te?M[1]===0?L*(M[0]/7-450):L*function(ge,_e,Me){const Ae=Math.floor(_e[0]/8),Ne=Math.floor(_e[1]/8),Qe=10*(_e[0]-8*Ae),ft=10*(_e[1]-8*Ne),Ct=ge.getElevationAt(Ae,Ne,!0,!0),dt=ge.getMeterToDEM(Me),wt=Math.floor(.5*(Qe*dt-1)),Rt=Math.floor(.5*(ft*dt-1)),Mt=ge.tileCoordToPixel(Ae,Ne),cr=2*wt+1,sr=2*Rt+1,Cr=function(Qr,_r,yn,Pn,_n){return[Qr.getElevationAtPixel(_r,yn,!0),Qr.getElevationAtPixel(_r+_n,yn,!0),Qr.getElevationAtPixel(_r,yn+_n,!0),Qr.getElevationAtPixel(_r+Pn,yn+_n,!0)]}(ge,Mt.x-wt,Mt.y-Rt,cr,sr),Kr=Math.abs(Cr[0]-Cr[1]),hr=Math.abs(Cr[2]-Cr[3]),Mr=Math.abs(Cr[0]-Cr[2])+Math.abs(Cr[1]-Cr[3]),Ar=Math.min(.25,.5*dt*(Kr+hr)/cr),$r=Math.min(.25,.5*dt*Mr/sr);return Ct+Math.max(Ar*Qe,$r*ft)}(S,M,V):Q;return{base:Q+(d===0)?-1:d,top:te?Math.max(ue+g,Q+d+2):Q+g}}const sF=Vt([{name:"a_pos_normal",components:2,type:"Int16"},{name:"a_data",components:4,type:"Uint8"},{name:"a_linesofar",components:1,type:"Float32"}],4),{members:aF}=sF,lF=Vt([{name:"a_packed",components:4,type:"Float32"}]),{members:cF}=lF,eT=$w.types,uF=Math.cos(Math.PI/180*37.5);class $f{constructor(c){this.zoom=c.zoom,this.overscaling=c.overscaling,this.layers=c.layers,this.layerIds=this.layers.map(d=>d.id),this.index=c.index,this.projection=c.projection,this.hasPattern=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers.forEach(d=>{this.gradients[d.id]={}}),this.layoutVertexArray=new fr,this.layoutVertexArray2=new jr,this.indexArray=new An,this.programConfigurations=new Dv(c.layers,c.zoom),this.segments=new la,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(d=>d.isStateDependent()).map(d=>d.id)}populate(c,d,g,S){this.hasPattern=YS("line",this.layers,d);const M=this.layers[0].layout.get("line-sort-key"),L=[];for(const{feature:ue,id:ge,index:_e,sourceLayerIndex:Me}of c){const Ae=this.layers[0]._featureFilter.needGeometry,Ne=Gv(ue,Ae);if(!this.layers[0]._featureFilter.filter(new he(this.zoom),Ne,g))continue;const Qe=M?M.evaluate(Ne,{},g):void 0,ft={id:ge,properties:ue.properties,type:ue.type,sourceLayerIndex:Me,index:_e,geometry:Ae?Ne.geometry:cm(ue,g,S),patterns:{},sortKey:Qe};L.push(ft)}M&&L.sort((ue,ge)=>ue.sortKey-ge.sortKey);const{lineAtlas:V,featureIndex:Q}=d,te=this.addConstantDashes(V);for(const ue of L){const{geometry:ge,index:_e,sourceLayerIndex:Me}=ue;if(te&&this.addFeatureDashes(ue,V),this.hasPattern){const Ae=KS("line",this.layers,ue,this.zoom,d);this.patternFeatures.push(Ae)}else this.addFeature(ue,ge,_e,g,V.positions,d.availableImages);Q.insert(c[_e].feature,ge,_e,Me,this.index)}}addConstantDashes(c){let d=!1;for(const g of this.layers){const S=g.paint.get("line-dasharray").value,M=g.layout.get("line-cap").value;if(S.kind!=="constant"||M.kind!=="constant")d=!0;else{const L=M.value,V=S.value;if(!V)continue;c.addDash(V,L)}}return d}addFeatureDashes(c,d){const g=this.zoom;for(const S of this.layers){const M=S.paint.get("line-dasharray").value,L=S.layout.get("line-cap").value;if(M.kind==="constant"&&L.kind==="constant")continue;let V,Q;if(M.kind==="constant"){if(V=M.value,!V)continue}else V=M.evaluate({zoom:g},c);Q=L.kind==="constant"?L.value:L.evaluate({zoom:g},c),d.addDash(V,Q),c.patterns[S.id]=d.getKey(V,Q)}}update(c,d,g,S){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(c,d,this.stateDependentLayers,g,S)}addFeatures(c,d,g,S,M){for(const L of this.patternFeatures)this.addFeature(L,L.geometry,L.index,d,g,S)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(c){this.uploaded||(this.layoutVertexArray2.length!==0&&(this.layoutVertexBuffer2=c.createVertexBuffer(this.layoutVertexArray2,cF)),this.layoutVertexBuffer=c.createVertexBuffer(this.layoutVertexArray,aF),this.indexBuffer=c.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(c),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(c){if(c.properties&&c.properties.hasOwnProperty("mapbox_clip_start")&&c.properties.hasOwnProperty("mapbox_clip_end"))return{start:+c.properties.mapbox_clip_start,end:+c.properties.mapbox_clip_end}}addFeature(c,d,g,S,M,L){const V=this.layers[0].layout,Q=V.get("line-join").evaluate(c,{}),te=V.get("line-cap").evaluate(c,{}),ue=V.get("line-miter-limit"),ge=V.get("line-round-limit");this.lineClips=this.lineFeatureClips(c);for(const _e of d)this.addLine(_e,c,Q,te,ue,ge);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,c,g,M,L,S)}addLine(c,d,g,S,M,L){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,this.lineSoFar=0,this.lineClips){this.lineClipsArray.push(this.lineClips);for(let ft=0;ft<c.length-1;ft++)this.totalDistance+=c[ft].dist(c[ft+1]);this.updateScaledDistance(),this.maxLineLength=Math.max(this.maxLineLength,this.totalDistance)}const V=eT[d.type]==="Polygon";let Q=c.length;for(;Q>=2&&c[Q-1].equals(c[Q-2]);)Q--;let te=0;for(;te<Q-1&&c[te].equals(c[te+1]);)te++;if(Q<(V?3:2))return;g==="bevel"&&(M=1.05);const ue=this.overscaling<=16?15*$n/(512*this.overscaling):0,ge=this.segments.prepareSegment(10*Q,this.layoutVertexArray,this.indexArray);let _e,Me,Ae,Ne,Qe;this.e1=this.e2=-1,V&&(_e=c[Q-2],Qe=c[te].sub(_e)._unit()._perp());for(let ft=te;ft<Q;ft++){if(Ae=ft===Q-1?V?c[te+1]:void 0:c[ft+1],Ae&&c[ft].equals(Ae))continue;Qe&&(Ne=Qe),_e&&(Me=_e),_e=c[ft],Qe=Ae?Ae.sub(_e)._unit()._perp():Ne,Ne=Ne||Qe;let Ct=Ne.add(Qe);Ct.x===0&&Ct.y===0||Ct._unit();const dt=Ne.x*Qe.x+Ne.y*Qe.y,wt=Ct.x*Qe.x+Ct.y*Qe.y,Rt=wt!==0?1/wt:1/0,Mt=2*Math.sqrt(2-2*wt),cr=wt<uF&&Me&&Ae,sr=Ne.x*Qe.y-Ne.y*Qe.x>0;if(cr&&ft>te){const hr=_e.dist(Me);if(hr>2*ue){const Mr=_e.sub(_e.sub(Me)._mult(ue/hr)._round());this.updateDistance(Me,Mr),this.addCurrentVertex(Mr,Ne,0,0,ge),Me=Mr}}const Cr=Me&&Ae;let Kr=Cr?g:V?"butt":S;if(Cr&&Kr==="round"&&(Rt<L?Kr="miter":Rt<=2&&(Kr="fakeround")),Kr==="miter"&&Rt>M&&(Kr="bevel"),Kr==="bevel"&&(Rt>2&&(Kr="flipbevel"),Rt<M&&(Kr="miter")),Me&&this.updateDistance(Me,_e),Kr==="miter")Ct._mult(Rt),this.addCurrentVertex(_e,Ct,0,0,ge);else if(Kr==="flipbevel"){if(Rt>100)Ct=Qe.mult(-1);else{const hr=Rt*Ne.add(Qe).mag()/Ne.sub(Qe).mag();Ct._perp()._mult(hr*(sr?-1:1))}this.addCurrentVertex(_e,Ct,0,0,ge),this.addCurrentVertex(_e,Ct.mult(-1),0,0,ge)}else if(Kr==="bevel"||Kr==="fakeround"){const hr=-Math.sqrt(Rt*Rt-1),Mr=sr?hr:0,Ar=sr?0:hr;if(Me&&this.addCurrentVertex(_e,Ne,Mr,Ar,ge),Kr==="fakeround"){const $r=Math.round(180*Mt/Math.PI/20);for(let Qr=1;Qr<$r;Qr++){let _r=Qr/$r;if(_r!==.5){const Pn=_r-.5;_r+=_r*Pn*(_r-1)*((1.0904+dt*(dt*(3.55645-1.43519*dt)-3.2452))*Pn*Pn+(.848013+dt*(.215638*dt-1.06021)))}const yn=Qe.sub(Ne)._mult(_r)._add(Ne)._unit()._mult(sr?-1:1);this.addHalfVertex(_e,yn.x,yn.y,!1,sr,0,ge)}}Ae&&this.addCurrentVertex(_e,Qe,-Mr,-Ar,ge)}else if(Kr==="butt")this.addCurrentVertex(_e,Ct,0,0,ge);else if(Kr==="square"){const hr=Me?1:-1;Me||this.addCurrentVertex(_e,Ct,hr,hr,ge),this.addCurrentVertex(_e,Ct,0,0,ge),Me&&this.addCurrentVertex(_e,Ct,hr,hr,ge)}else Kr==="round"&&(Me&&(this.addCurrentVertex(_e,Ne,0,0,ge),this.addCurrentVertex(_e,Ne,1,1,ge,!0)),Ae&&(this.addCurrentVertex(_e,Qe,-1,-1,ge,!0),this.addCurrentVertex(_e,Qe,0,0,ge)));if(cr&&ft<Q-1){const hr=_e.dist(Ae);if(hr>2*ue){const Mr=_e.add(Ae.sub(_e)._mult(ue/hr)._round());this.updateDistance(_e,Mr),this.addCurrentVertex(Mr,Qe,0,0,ge),_e=Mr}}}}addCurrentVertex(c,d,g,S,M,L=!1){const V=d.y*S-d.x,Q=-d.y-d.x*S;this.addHalfVertex(c,d.x+d.y*g,d.y-d.x*g,L,!1,g,M),this.addHalfVertex(c,V,Q,L,!0,-S,M)}addHalfVertex({x:c,y:d},g,S,M,L,V,Q){this.layoutVertexArray.emplaceBack((c<<1)+(M?1:0),(d<<1)+(L?1:0),Math.round(63*g)+128,Math.round(63*S)+128,1+(V===0?0:V<0?-1:1),0,this.lineSoFar),this.lineClips&&this.layoutVertexArray2.emplaceBack(this.scaledDistance,this.lineClipsArray.length,this.lineClips.start,this.lineClips.end);const te=Q.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,te),Q.primitiveLength++),L?this.e2=te:this.e1=te}updateScaledDistance(){if(this.lineClips){const c=this.totalDistance/(this.lineClips.end-this.lineClips.start);this.scaledDistance=this.distance/this.totalDistance,this.lineSoFar=c*this.lineClips.start+this.distance}else this.lineSoFar=this.distance}updateDistance(c,d){this.distance+=c.dist(d),this.updateScaledDistance()}}Sn($f,"LineBucket",{omit:["layers","patternFeatures"]});const VR=new mt({"line-cap":new it(dr.layout_line["line-cap"]),"line-join":new it(dr.layout_line["line-join"]),"line-miter-limit":new De(dr.layout_line["line-miter-limit"]),"line-round-limit":new De(dr.layout_line["line-round-limit"]),"line-sort-key":new it(dr.layout_line["line-sort-key"])});var i1={paint:new mt({"line-opacity":new it(dr.paint_line["line-opacity"]),"line-color":new it(dr.paint_line["line-color"]),"line-translate":new De(dr.paint_line["line-translate"]),"line-translate-anchor":new De(dr.paint_line["line-translate-anchor"]),"line-width":new it(dr.paint_line["line-width"]),"line-gap-width":new it(dr.paint_line["line-gap-width"]),"line-offset":new it(dr.paint_line["line-offset"]),"line-blur":new it(dr.paint_line["line-blur"]),"line-dasharray":new it(dr.paint_line["line-dasharray"]),"line-pattern":new it(dr.paint_line["line-pattern"]),"line-gradient":new yt(dr.paint_line["line-gradient"]),"line-trim-offset":new De(dr.paint_line["line-trim-offset"])}),layout:VR};const Ks=new class extends it{possiblyEvaluate(f,c){return c=new he(Math.floor(c.zoom),{now:c.now,fadeDuration:c.fadeDuration,transition:c.transition}),super.possiblyEvaluate(f,c)}evaluate(f,c,d,g){return c=J({},c,{zoom:Math.floor(c.zoom)}),super.evaluate(f,c,d,g)}}(i1.paint.properties["line-width"].specification);function fa(f,c){return c>0?c+2*f:f}Ks.useIntegerZoom=!0;const HR=Vt([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_tex_size",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),fF=Vt([{name:"a_globe_anchor",components:3,type:"Int16"},{name:"a_globe_normal",components:3,type:"Float32"}],4),dF=Vt([{name:"a_projected_pos",components:4,type:"Float32"}],4);Vt([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);const hF=Vt([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"}]),pF=Vt([{name:"a_size_scale",components:1,type:"Float32"},{name:"a_padding",components:2,type:"Float32"}]);Vt([{type:"Int16",name:"projectedAnchorX"},{type:"Int16",name:"projectedAnchorY"},{type:"Int16",name:"projectedAnchorZ"},{type:"Int16",name:"tileAnchorX"},{type:"Int16",name:"tileAnchorY"},{type:"Float32",name:"x1"},{type:"Float32",name:"y1"},{type:"Float32",name:"x2"},{type:"Float32",name:"y2"},{type:"Int16",name:"padding"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"}]);const WR=Vt([{name:"a_pos",components:3,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),mF=Vt([{name:"a_pos_2f",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);Vt([{name:"triangle",components:3,type:"Uint16"}]),Vt([{type:"Int16",name:"projectedAnchorX"},{type:"Int16",name:"projectedAnchorY"},{type:"Int16",name:"projectedAnchorZ"},{type:"Float32",name:"tileAnchorX"},{type:"Float32",name:"tileAnchorY"},{type:"Uint16",name:"glyphStartIndex"},{type:"Uint16",name:"numGlyphs"},{type:"Uint32",name:"vertexStartIndex"},{type:"Uint32",name:"lineStartIndex"},{type:"Uint32",name:"lineLength"},{type:"Uint16",name:"segment"},{type:"Uint16",name:"lowerSize"},{type:"Uint16",name:"upperSize"},{type:"Float32",name:"lineOffsetX"},{type:"Float32",name:"lineOffsetY"},{type:"Uint8",name:"writingMode"},{type:"Uint8",name:"placedOrientation"},{type:"Uint8",name:"hidden"},{type:"Uint32",name:"crossTileID"},{type:"Int16",name:"associatedIconIndex"},{type:"Uint8",name:"flipState"}]),Vt([{type:"Int16",name:"projectedAnchorX"},{type:"Int16",name:"projectedAnchorY"},{type:"Int16",name:"projectedAnchorZ"},{type:"Float32",name:"tileAnchorX"},{type:"Float32",name:"tileAnchorY"},{type:"Int16",name:"rightJustifiedTextSymbolIndex"},{type:"Int16",name:"centerJustifiedTextSymbolIndex"},{type:"Int16",name:"leftJustifiedTextSymbolIndex"},{type:"Int16",name:"verticalPlacedTextSymbolIndex"},{type:"Int16",name:"placedIconSymbolIndex"},{type:"Int16",name:"verticalPlacedIconSymbolIndex"},{type:"Uint16",name:"key"},{type:"Uint16",name:"textBoxStartIndex"},{type:"Uint16",name:"textBoxEndIndex"},{type:"Uint16",name:"verticalTextBoxStartIndex"},{type:"Uint16",name:"verticalTextBoxEndIndex"},{type:"Uint16",name:"iconBoxStartIndex"},{type:"Uint16",name:"iconBoxEndIndex"},{type:"Uint16",name:"verticalIconBoxStartIndex"},{type:"Uint16",name:"verticalIconBoxEndIndex"},{type:"Uint16",name:"featureIndex"},{type:"Uint16",name:"numHorizontalGlyphVertices"},{type:"Uint16",name:"numVerticalGlyphVertices"},{type:"Uint16",name:"numIconVertices"},{type:"Uint16",name:"numVerticalIconVertices"},{type:"Uint16",name:"useRuntimeCollisionCircles"},{type:"Uint32",name:"crossTileID"},{type:"Float32",components:2,name:"textOffset"},{type:"Float32",name:"collisionCircleDiameter"}]),Vt([{type:"Float32",name:"offsetX"}]),Vt([{type:"Int16",name:"x"},{type:"Int16",name:"y"}]);var al=24;const Nc=128;function o1(f,c){const{expression:d}=c;if(d.kind==="constant")return{kind:"constant",layoutSize:d.evaluate(new he(f+1))};if(d.kind==="source")return{kind:"source"};{const{zoomStops:g,interpolationType:S}=d;let M=0;for(;M<g.length&&g[M]<=f;)M++;M=Math.max(0,M-1);let L=M;for(;L<g.length&&g[L]<f+1;)L++;L=Math.min(g.length-1,L);const V=g[M],Q=g[L];return d.kind==="composite"?{kind:"composite",minZoom:V,maxZoom:Q,interpolationType:S}:{kind:"camera",minZoom:V,maxZoom:Q,minSize:d.evaluate(new he(V)),maxSize:d.evaluate(new he(Q)),interpolationType:S}}}function zw(f,{uSize:c,uSizeT:d},{lowerSize:g,upperSize:S}){return f.kind==="source"?g/Nc:f.kind==="composite"?Ii(g/Nc,S/Nc,d):c}function Yv(f,c){let d=0,g=0;if(f.kind==="constant")g=f.layoutSize;else if(f.kind!=="source"){const{interpolationType:S,minZoom:M,maxZoom:L}=f,V=S?q(mo.interpolationFactor(S,c,M,L),0,1):0;f.kind==="camera"?g=Ii(f.minSize,f.maxSize,V):d=V}return{uSizeT:d,uSize:g}}var Bw=Object.freeze({__proto__:null,SIZE_PACK_FACTOR:Nc,evaluateSizeForFeature:zw,evaluateSizeForZoom:Yv,getSizeData:o1});function Qu(f,c,d){return f.sections.forEach(g=>{g.text=function(S,M,L){const V=M.layout.get("text-transform").evaluate(L,{});return V==="uppercase"?S=S.toLocaleUpperCase():V==="lowercase"&&(S=S.toLocaleLowerCase()),ae.applyArabicShaping&&(S=ae.applyArabicShaping(S)),S}(g.text,c,d)}),f}const Vh={"!":"\uFE15","#":"\uFF03",$:"\uFF04","%":"\uFF05","&":"\uFF06","(":"\uFE35",")":"\uFE36","*":"\uFF0A","+":"\uFF0B",",":"\uFE10","-":"\uFE32",".":"\u30FB","/":"\uFF0F",":":"\uFE13",";":"\uFE14","<":"\uFE3F","=":"\uFF1D",">":"\uFE40","?":"\uFE16","@":"\uFF20","[":"\uFE47","\\":"\uFF3C","]":"\uFE48","^":"\uFF3E",_:"\uFE33","`":"\uFF40","{":"\uFE37","|":"\u2015","}":"\uFE38","~":"\uFF5E","\xA2":"\uFFE0","\xA3":"\uFFE1","\xA5":"\uFFE5","\xA6":"\uFFE4","\xAC":"\uFFE2","\xAF":"\uFFE3","\u2013":"\uFE32","\u2014":"\uFE31","\u2018":"\uFE43","\u2019":"\uFE44","\u201C":"\uFE41","\u201D":"\uFE42","\u2026":"\uFE19","\u2027":"\u30FB","\u20A9":"\uFFE6","\u3001":"\uFE11","\u3002":"\uFE12","\u3008":"\uFE3F","\u3009":"\uFE40","\u300A":"\uFE3D","\u300B":"\uFE3E","\u300C":"\uFE41","\u300D":"\uFE42","\u300E":"\uFE43","\u300F":"\uFE44","\u3010":"\uFE3B","\u3011":"\uFE3C","\u3014":"\uFE39","\u3015":"\uFE3A","\u3016":"\uFE17","\u3017":"\uFE18","\uFF01":"\uFE15","\uFF08":"\uFE35","\uFF09":"\uFE36","\uFF0C":"\uFE10","\uFF0D":"\uFE32","\uFF0E":"\u30FB","\uFF1A":"\uFE13","\uFF1B":"\uFE14","\uFF1C":"\uFE3F","\uFF1E":"\uFE40","\uFF1F":"\uFE16","\uFF3B":"\uFE47","\uFF3D":"\uFE48","\uFF3F":"\uFE33","\uFF5B":"\uFE37","\uFF5C":"\u2015","\uFF5D":"\uFE38","\uFF5F":"\uFE35","\uFF60":"\uFE36","\uFF61":"\uFE12","\uFF62":"\uFE41","\uFF63":"\uFE42","\u2190":"\u2191","\u2192":"\u2193"};function gF(f){return f==="\uFE36"||f==="\uFE48"||f==="\uFE38"||f==="\uFE44"||f==="\uFE42"||f==="\uFE3E"||f==="\uFE3C"||f==="\uFE3A"||f==="\uFE18"||f==="\uFE40"||f==="\uFE10"||f==="\uFE13"||f==="\uFE14"||f==="\uFF40"||f==="\uFFE3"||f==="\uFE11"||f==="\uFE12"}function vF(f){return f==="\uFE35"||f==="\uFE47"||f==="\uFE37"||f==="\uFE43"||f==="\uFE41"||f==="\uFE3D"||f==="\uFE3B"||f==="\uFE39"||f==="\uFE17"||f==="\uFE3F"}var GR=Go,qR=function(f,c,d,g,S){var M,L,V=8*S-g-1,Q=(1<<V)-1,te=Q>>1,ue=-7,ge=d?S-1:0,_e=d?-1:1,Me=f[c+ge];for(ge+=_e,M=Me&(1<<-ue)-1,Me>>=-ue,ue+=V;ue>0;M=256*M+f[c+ge],ge+=_e,ue-=8);for(L=M&(1<<-ue)-1,M>>=-ue,ue+=g;ue>0;L=256*L+f[c+ge],ge+=_e,ue-=8);if(M===0)M=1-te;else{if(M===Q)return L?NaN:1/0*(Me?-1:1);L+=Math.pow(2,g),M-=te}return(Me?-1:1)*L*Math.pow(2,M-g)},XR=function(f,c,d,g,S,M){var L,V,Q,te=8*M-S-1,ue=(1<<te)-1,ge=ue>>1,_e=S===23?Math.pow(2,-24)-Math.pow(2,-77):0,Me=g?0:M-1,Ae=g?1:-1,Ne=c<0||c===0&&1/c<0?1:0;for(c=Math.abs(c),isNaN(c)||c===1/0?(V=isNaN(c)?1:0,L=ue):(L=Math.floor(Math.log(c)/Math.LN2),c*(Q=Math.pow(2,-L))<1&&(L--,Q*=2),(c+=L+ge>=1?_e/Q:_e*Math.pow(2,1-ge))*Q>=2&&(L++,Q/=2),L+ge>=ue?(V=0,L=ue):L+ge>=1?(V=(c*Q-1)*Math.pow(2,S),L+=ge):(V=c*Math.pow(2,ge-1)*Math.pow(2,S),L=0));S>=8;f[d+Me]=255&V,Me+=Ae,V/=256,S-=8);for(L=L<<S|V,te+=S;te>0;f[d+Me]=255&L,Me+=Ae,L/=256,te-=8);f[d+Me-Ae]|=128*Ne};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */function Go(f){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(f)?f:new Uint8Array(f||0),this.pos=0,this.type=0,this.length=this.buf.length}Go.Varint=0,Go.Fixed64=1,Go.Bytes=2,Go.Fixed32=5;var $d=4294967296,Bi=1/$d,tT=typeof TextDecoder=="undefined"?null:new TextDecoder("utf8");function ll(f){return f.type===Go.Bytes?f.readVarint()+f.pos:f.pos+1}function Kv(f,c,d){return d?4294967296*c+(f>>>0):4294967296*(c>>>0)+(f>>>0)}function YR(f,c,d){var g=c<=16383?1:c<=2097151?2:c<=268435455?3:Math.floor(Math.log(c)/(7*Math.LN2));d.realloc(g);for(var S=d.pos-1;S>=f;S--)d.buf[S+g]=d.buf[S]}function rs(f,c){for(var d=0;d<f.length;d++)c.writeVarint(f[d])}function yF(f,c){for(var d=0;d<f.length;d++)c.writeSVarint(f[d])}function KR(f,c){for(var d=0;d<f.length;d++)c.writeFloat(f[d])}function jw(f,c){for(var d=0;d<f.length;d++)c.writeDouble(f[d])}function xF(f,c){for(var d=0;d<f.length;d++)c.writeBoolean(f[d])}function _F(f,c){for(var d=0;d<f.length;d++)c.writeFixed32(f[d])}function bF(f,c){for(var d=0;d<f.length;d++)c.writeSFixed32(f[d])}function wF(f,c){for(var d=0;d<f.length;d++)c.writeFixed64(f[d])}function CF(f,c){for(var d=0;d<f.length;d++)c.writeSFixed64(f[d])}function Uw(f,c){return(f[c]|f[c+1]<<8|f[c+2]<<16)+16777216*f[c+3]}function k0(f,c,d){f[d]=c,f[d+1]=c>>>8,f[d+2]=c>>>16,f[d+3]=c>>>24}function ZR(f,c){return(f[c]|f[c+1]<<8|f[c+2]<<16)+(f[c+3]<<24)}Go.prototype={destroy:function(){this.buf=null},readFields:function(f,c,d){for(d=d||this.length;this.pos<d;){var g=this.readVarint(),S=g>>3,M=this.pos;this.type=7&g,f(S,c,this),this.pos===M&&this.skip(g)}return c},readMessage:function(f,c){return this.readFields(f,c,this.readVarint()+this.pos)},readFixed32:function(){var f=Uw(this.buf,this.pos);return this.pos+=4,f},readSFixed32:function(){var f=ZR(this.buf,this.pos);return this.pos+=4,f},readFixed64:function(){var f=Uw(this.buf,this.pos)+Uw(this.buf,this.pos+4)*$d;return this.pos+=8,f},readSFixed64:function(){var f=Uw(this.buf,this.pos)+ZR(this.buf,this.pos+4)*$d;return this.pos+=8,f},readFloat:function(){var f=qR(this.buf,this.pos,!0,23,4);return this.pos+=4,f},readDouble:function(){var f=qR(this.buf,this.pos,!0,52,8);return this.pos+=8,f},readVarint:function(f){var c,d,g=this.buf;return c=127&(d=g[this.pos++]),d<128?c:(c|=(127&(d=g[this.pos++]))<<7,d<128?c:(c|=(127&(d=g[this.pos++]))<<14,d<128?c:(c|=(127&(d=g[this.pos++]))<<21,d<128?c:function(S,M,L){var V,Q,te=L.buf;if(V=(112&(Q=te[L.pos++]))>>4,Q<128||(V|=(127&(Q=te[L.pos++]))<<3,Q<128)||(V|=(127&(Q=te[L.pos++]))<<10,Q<128)||(V|=(127&(Q=te[L.pos++]))<<17,Q<128)||(V|=(127&(Q=te[L.pos++]))<<24,Q<128)||(V|=(1&(Q=te[L.pos++]))<<31,Q<128))return Kv(S,V,M);throw new Error("Expected varint not more than 10 bytes")}(c|=(15&(d=g[this.pos]))<<28,f,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var f=this.readVarint();return f%2==1?(f+1)/-2:f/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var f=this.readVarint()+this.pos,c=this.pos;return this.pos=f,f-c>=12&&tT?function(d,g,S){return tT.decode(d.subarray(g,S))}(this.buf,c,f):function(d,g,S){for(var M="",L=g;L<S;){var V,Q,te,ue=d[L],ge=null,_e=ue>239?4:ue>223?3:ue>191?2:1;if(L+_e>S)break;_e===1?ue<128&&(ge=ue):_e===2?(192&(V=d[L+1]))==128&&(ge=(31&ue)<<6|63&V)<=127&&(ge=null):_e===3?(Q=d[L+2],(192&(V=d[L+1]))==128&&(192&Q)==128&&((ge=(15&ue)<<12|(63&V)<<6|63&Q)<=2047||ge>=55296&&ge<=57343)&&(ge=null)):_e===4&&(Q=d[L+2],te=d[L+3],(192&(V=d[L+1]))==128&&(192&Q)==128&&(192&te)==128&&((ge=(15&ue)<<18|(63&V)<<12|(63&Q)<<6|63&te)<=65535||ge>=1114112)&&(ge=null)),ge===null?(ge=65533,_e=1):ge>65535&&(ge-=65536,M+=String.fromCharCode(ge>>>10&1023|55296),ge=56320|1023&ge),M+=String.fromCharCode(ge),L+=_e}return M}(this.buf,c,f)},readBytes:function(){var f=this.readVarint()+this.pos,c=this.buf.subarray(this.pos,f);return this.pos=f,c},readPackedVarint:function(f,c){if(this.type!==Go.Bytes)return f.push(this.readVarint(c));var d=ll(this);for(f=f||[];this.pos<d;)f.push(this.readVarint(c));return f},readPackedSVarint:function(f){if(this.type!==Go.Bytes)return f.push(this.readSVarint());var c=ll(this);for(f=f||[];this.pos<c;)f.push(this.readSVarint());return f},readPackedBoolean:function(f){if(this.type!==Go.Bytes)return f.push(this.readBoolean());var c=ll(this);for(f=f||[];this.pos<c;)f.push(this.readBoolean());return f},readPackedFloat:function(f){if(this.type!==Go.Bytes)return f.push(this.readFloat());var c=ll(this);for(f=f||[];this.pos<c;)f.push(this.readFloat());return f},readPackedDouble:function(f){if(this.type!==Go.Bytes)return f.push(this.readDouble());var c=ll(this);for(f=f||[];this.pos<c;)f.push(this.readDouble());return f},readPackedFixed32:function(f){if(this.type!==Go.Bytes)return f.push(this.readFixed32());var c=ll(this);for(f=f||[];this.pos<c;)f.push(this.readFixed32());return f},readPackedSFixed32:function(f){if(this.type!==Go.Bytes)return f.push(this.readSFixed32());var c=ll(this);for(f=f||[];this.pos<c;)f.push(this.readSFixed32());return f},readPackedFixed64:function(f){if(this.type!==Go.Bytes)return f.push(this.readFixed64());var c=ll(this);for(f=f||[];this.pos<c;)f.push(this.readFixed64());return f},readPackedSFixed64:function(f){if(this.type!==Go.Bytes)return f.push(this.readSFixed64());var c=ll(this);for(f=f||[];this.pos<c;)f.push(this.readSFixed64());return f},skip:function(f){var c=7&f;if(c===Go.Varint)for(;this.buf[this.pos++]>127;);else if(c===Go.Bytes)this.pos=this.readVarint()+this.pos;else if(c===Go.Fixed32)this.pos+=4;else{if(c!==Go.Fixed64)throw new Error("Unimplemented type: "+c);this.pos+=8}},writeTag:function(f,c){this.writeVarint(f<<3|c)},realloc:function(f){for(var c=this.length||16;c<this.pos+f;)c*=2;if(c!==this.length){var d=new Uint8Array(c);d.set(this.buf),this.buf=d,this.length=c}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(f){this.realloc(4),k0(this.buf,f,this.pos),this.pos+=4},writeSFixed32:function(f){this.realloc(4),k0(this.buf,f,this.pos),this.pos+=4},writeFixed64:function(f){this.realloc(8),k0(this.buf,-1&f,this.pos),k0(this.buf,Math.floor(f*Bi),this.pos+4),this.pos+=8},writeSFixed64:function(f){this.realloc(8),k0(this.buf,-1&f,this.pos),k0(this.buf,Math.floor(f*Bi),this.pos+4),this.pos+=8},writeVarint:function(f){(f=+f||0)>268435455||f<0?function(c,d){var g,S;if(c>=0?(g=c%4294967296|0,S=c/4294967296|0):(S=~(-c/4294967296),4294967295^(g=~(-c%4294967296))?g=g+1|0:(g=0,S=S+1|0)),c>=18446744073709552e3||c<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");d.realloc(10),function(M,L,V){V.buf[V.pos++]=127&M|128,M>>>=7,V.buf[V.pos++]=127&M|128,M>>>=7,V.buf[V.pos++]=127&M|128,M>>>=7,V.buf[V.pos++]=127&M|128,V.buf[V.pos]=127&(M>>>=7)}(g,0,d),function(M,L){var V=(7&M)<<4;L.buf[L.pos++]|=V|((M>>>=3)?128:0),M&&(L.buf[L.pos++]=127&M|((M>>>=7)?128:0),M&&(L.buf[L.pos++]=127&M|((M>>>=7)?128:0),M&&(L.buf[L.pos++]=127&M|((M>>>=7)?128:0),M&&(L.buf[L.pos++]=127&M|((M>>>=7)?128:0),M&&(L.buf[L.pos++]=127&M)))))}(S,d)}(f,this):(this.realloc(4),this.buf[this.pos++]=127&f|(f>127?128:0),f<=127||(this.buf[this.pos++]=127&(f>>>=7)|(f>127?128:0),f<=127||(this.buf[this.pos++]=127&(f>>>=7)|(f>127?128:0),f<=127||(this.buf[this.pos++]=f>>>7&127))))},writeSVarint:function(f){this.writeVarint(f<0?2*-f-1:2*f)},writeBoolean:function(f){this.writeVarint(Boolean(f))},writeString:function(f){f=String(f),this.realloc(4*f.length),this.pos++;var c=this.pos;this.pos=function(g,S,M){for(var L,V,Q=0;Q<S.length;Q++){if((L=S.charCodeAt(Q))>55295&&L<57344){if(!V){L>56319||Q+1===S.length?(g[M++]=239,g[M++]=191,g[M++]=189):V=L;continue}if(L<56320){g[M++]=239,g[M++]=191,g[M++]=189,V=L;continue}L=V-55296<<10|L-56320|65536,V=null}else V&&(g[M++]=239,g[M++]=191,g[M++]=189,V=null);L<128?g[M++]=L:(L<2048?g[M++]=L>>6|192:(L<65536?g[M++]=L>>12|224:(g[M++]=L>>18|240,g[M++]=L>>12&63|128),g[M++]=L>>6&63|128),g[M++]=63&L|128)}return M}(this.buf,f,this.pos);var d=this.pos-c;d>=128&&YR(c,d,this),this.pos=c-1,this.writeVarint(d),this.pos+=d},writeFloat:function(f){this.realloc(4),XR(this.buf,f,this.pos,!0,23,4),this.pos+=4},writeDouble:function(f){this.realloc(8),XR(this.buf,f,this.pos,!0,52,8),this.pos+=8},writeBytes:function(f){var c=f.length;this.writeVarint(c),this.realloc(c);for(var d=0;d<c;d++)this.buf[this.pos++]=f[d]},writeRawMessage:function(f,c){this.pos++;var d=this.pos;f(c,this);var g=this.pos-d;g>=128&&YR(d,g,this),this.pos=d-1,this.writeVarint(g),this.pos+=g},writeMessage:function(f,c,d){this.writeTag(f,Go.Bytes),this.writeRawMessage(c,d)},writePackedVarint:function(f,c){c.length&&this.writeMessage(f,rs,c)},writePackedSVarint:function(f,c){c.length&&this.writeMessage(f,yF,c)},writePackedBoolean:function(f,c){c.length&&this.writeMessage(f,xF,c)},writePackedFloat:function(f,c){c.length&&this.writeMessage(f,KR,c)},writePackedDouble:function(f,c){c.length&&this.writeMessage(f,jw,c)},writePackedFixed32:function(f,c){c.length&&this.writeMessage(f,_F,c)},writePackedSFixed32:function(f,c){c.length&&this.writeMessage(f,bF,c)},writePackedFixed64:function(f,c){c.length&&this.writeMessage(f,wF,c)},writePackedSFixed64:function(f,c){c.length&&this.writeMessage(f,CF,c)},writeBytesField:function(f,c){this.writeTag(f,Go.Bytes),this.writeBytes(c)},writeFixed32Field:function(f,c){this.writeTag(f,Go.Fixed32),this.writeFixed32(c)},writeSFixed32Field:function(f,c){this.writeTag(f,Go.Fixed32),this.writeSFixed32(c)},writeFixed64Field:function(f,c){this.writeTag(f,Go.Fixed64),this.writeFixed64(c)},writeSFixed64Field:function(f,c){this.writeTag(f,Go.Fixed64),this.writeSFixed64(c)},writeVarintField:function(f,c){this.writeTag(f,Go.Varint),this.writeVarint(c)},writeSVarintField:function(f,c){this.writeTag(f,Go.Varint),this.writeSVarint(c)},writeStringField:function(f,c){this.writeTag(f,Go.Bytes),this.writeString(c)},writeFloatField:function(f,c){this.writeTag(f,Go.Fixed32),this.writeFloat(c)},writeDoubleField:function(f,c){this.writeTag(f,Go.Fixed64),this.writeDouble(c)},writeBooleanField:function(f,c){this.writeVarintField(f,Boolean(c))}};var Vw=T(GR);const rT=3;function EF(f,c,d){c.glyphs=[],f===1&&d.readMessage(SF,c)}function SF(f,c,d){if(f===3){const{id:g,bitmap:S,width:M,height:L,left:V,top:Q,advance:te}=d.readMessage(TF,{});c.glyphs.push({id:g,bitmap:new um({width:M+2*rT,height:L+2*rT},S),metrics:{width:M,height:L,left:V,top:Q,advance:te}})}else f===4?c.ascender=d.readSVarint():f===5&&(c.descender=d.readSVarint())}function TF(f,c,d){f===1?c.id=d.readVarint():f===2?c.bitmap=d.readBytes():f===3?c.width=d.readVarint():f===4?c.height=d.readVarint():f===5?c.left=d.readSVarint():f===6?c.top=d.readSVarint():f===7&&(c.advance=d.readVarint())}const Hw=rT;function nT(f){let c=0,d=0;for(const L of f)c+=L.w*L.h,d=Math.max(d,L.w);f.sort((L,V)=>V.h-L.h);const g=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(c/.95)),d),h:1/0}];let S=0,M=0;for(const L of f)for(let V=g.length-1;V>=0;V--){const Q=g[V];if(!(L.w>Q.w||L.h>Q.h)){if(L.x=Q.x,L.y=Q.y,M=Math.max(M,L.y+L.h),S=Math.max(S,L.x+L.w),L.w===Q.w&&L.h===Q.h){const te=g.pop();V<g.length&&(g[V]=te)}else L.h===Q.h?(Q.x+=L.w,Q.w-=L.w):L.w===Q.w?(Q.y+=L.h,Q.h-=L.h):(g.push({x:Q.x+L.w,y:Q.y,w:Q.w-L.w,h:L.h}),Q.y+=L.h,Q.h-=L.h);break}}return{w:S,h:M,fill:c/(S*M)||0}}const Kl=1;class iT{constructor(c,{pixelRatio:d,version:g,stretchX:S,stretchY:M,content:L}){this.paddedRect=c,this.pixelRatio=d,this.stretchX=S,this.stretchY=M,this.content=L,this.version=g}get tl(){return[this.paddedRect.x+Kl,this.paddedRect.y+Kl]}get br(){return[this.paddedRect.x+this.paddedRect.w-Kl,this.paddedRect.y+this.paddedRect.h-Kl]}get displaySize(){return[(this.paddedRect.w-2*Kl)/this.pixelRatio,(this.paddedRect.h-2*Kl)/this.pixelRatio]}}class QR{constructor(c,d){const g={},S={};this.haveRenderCallbacks=[];const M=[];this.addImages(c,g,M),this.addImages(d,S,M);const{w:L,h:V}=nT(M),Q=new mu({width:L||1,height:V||1});for(const te in c){const ue=c[te],ge=g[te].paddedRect;mu.copy(ue.data,Q,{x:0,y:0},{x:ge.x+Kl,y:ge.y+Kl},ue.data)}for(const te in d){const ue=d[te],ge=S[te].paddedRect,_e=ge.x+Kl,Me=ge.y+Kl,Ae=ue.data.width,Ne=ue.data.height;mu.copy(ue.data,Q,{x:0,y:0},{x:_e,y:Me},ue.data),mu.copy(ue.data,Q,{x:0,y:Ne-1},{x:_e,y:Me-1},{width:Ae,height:1}),mu.copy(ue.data,Q,{x:0,y:0},{x:_e,y:Me+Ne},{width:Ae,height:1}),mu.copy(ue.data,Q,{x:Ae-1,y:0},{x:_e-1,y:Me},{width:1,height:Ne}),mu.copy(ue.data,Q,{x:0,y:0},{x:_e+Ae,y:Me},{width:1,height:Ne})}this.image=Q,this.iconPositions=g,this.patternPositions=S}addImages(c,d,g){for(const S in c){const M=c[S],L={x:0,y:0,w:M.data.width+2*Kl,h:M.data.height+2*Kl};g.push(L),d[S]=new iT(L,M),M.hasRenderCallback&&this.haveRenderCallbacks.push(S)}}patchUpdatedImages(c,d){this.haveRenderCallbacks=this.haveRenderCallbacks.filter(g=>c.hasImage(g)),c.dispatchRenderCallbacks(this.haveRenderCallbacks);for(const g in c.updatedImages)this.patchUpdatedImage(this.iconPositions[g],c.getImage(g),d),this.patchUpdatedImage(this.patternPositions[g],c.getImage(g),d)}patchUpdatedImage(c,d,g){if(!c||!d||c.version===d.version)return;c.version=d.version;const[S,M]=c.tl;g.update(d.data,void 0,{x:S,y:M})}}Sn(iT,"ImagePosition"),Sn(QR,"ImageAtlas");const Ju={horizontal:1,vertical:2,horizontalOnly:3},yl=-17;class Ll{constructor(){this.scale=1,this.fontStack="",this.imageName=null}static forText(c,d){const g=new Ll;return g.scale=c||1,g.fontStack=d,g}static forImage(c){const d=new Ll;return d.imageName=c,d}}class O0{constructor(){this.text="",this.sectionIndex=[],this.sections=[],this.imageSectionID=null}static fromFeature(c,d){const g=new O0;for(let S=0;S<c.sections.length;S++){const M=c.sections[S];M.image?g.addImageSection(M):g.addTextSection(M,d)}return g}length(){return this.text.length}getSection(c){return this.sections[this.sectionIndex[c]]}getSections(){return this.sections}getSectionIndex(c){return this.sectionIndex[c]}getCharCode(c){return this.text.charCodeAt(c)}verticalizePunctuation(c){this.text=function(d,g){let S="";for(let M=0;M<d.length;M++){const L=d.charCodeAt(M+1)||null,V=d.charCodeAt(M-1)||null;S+=!g&&(L&&sw(L)&&!Vh[d[M+1]]||V&&sw(V)&&!Vh[d[M-1]])||!Vh[d[M]]?d[M]:Vh[d[M]]}return S}(this.text,c)}trim(){let c=0;for(let g=0;g<this.text.length&&Ww[this.text.charCodeAt(g)];g++)c++;let d=this.text.length;for(let g=this.text.length-1;g>=0&&g>=c&&Ww[this.text.charCodeAt(g)];g--)d--;this.text=this.text.substring(c,d),this.sectionIndex=this.sectionIndex.slice(c,d)}substring(c,d){const g=new O0;return g.text=this.text.substring(c,d),g.sectionIndex=this.sectionIndex.slice(c,d),g.sections=this.sections,g}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce((c,d)=>Math.max(c,this.sections[d].scale),0)}addTextSection(c,d){this.text+=c.text,this.sections.push(Ll.forText(c.scale,c.fontStack||d));const g=this.sections.length-1;for(let S=0;S<c.text.length;++S)this.sectionIndex.push(g)}addImageSection(c){const d=c.image?c.image.name:"";if(d.length===0)return void ze("Can't add FormattedSection with an empty image.");const g=this.getNextImageSectionCharCode();g?(this.text+=String.fromCharCode(g),this.sections.push(Ll.forImage(d)),this.sectionIndex.push(this.sections.length-1)):ze("Reached maximum number of images 6401")}getNextImageSectionCharCode(){return this.imageSectionID?this.imageSectionID>=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}}function oT(f,c,d,g,S,M,L,V,Q,te,ue,ge,_e,Me,Ae){const Ne=O0.fromFeature(f,S);ge===Ju.vertical&&Ne.verticalizePunctuation(_e);let Qe=[];const ft=function(Mt,cr,sr,Cr,Kr,hr){if(!Mt)return[];const Mr=[],Ar=function(yn,Pn,_n,vi,en,zn){let yi=0;for(let vo=0;vo<yn.length();vo++){const xi=yn.getSection(vo);yi+=ek(yn.getCharCode(vo),xi,vi,en,Pn,zn)}return yi/Math.max(1,Math.ceil(yi/_n))}(Mt,cr,sr,Cr,Kr,hr),$r=Mt.text.indexOf("\u200B")>=0;let Qr=0;for(let yn=0;yn<Mt.length();yn++){const Pn=Mt.getSection(yn),_n=Mt.getCharCode(yn);if(Ww[_n]||(Qr+=ek(_n,Pn,Cr,Kr,cr,hr)),yn<Mt.length()-1){const vi=!((_r=_n)<11904||!(mn["Bopomofo Extended"](_r)||mn.Bopomofo(_r)||mn["CJK Compatibility Forms"](_r)||mn["CJK Compatibility Ideographs"](_r)||mn["CJK Compatibility"](_r)||mn["CJK Radicals Supplement"](_r)||mn["CJK Strokes"](_r)||mn["CJK Symbols and Punctuation"](_r)||mn["CJK Unified Ideographs Extension A"](_r)||mn["CJK Unified Ideographs"](_r)||mn["Enclosed CJK Letters and Months"](_r)||mn["Halfwidth and Fullwidth Forms"](_r)||mn.Hiragana(_r)||mn["Ideographic Description Characters"](_r)||mn["Kangxi Radicals"](_r)||mn["Katakana Phonetic Extensions"](_r)||mn.Katakana(_r)||mn["Vertical Forms"](_r)||mn["Yi Radicals"](_r)||mn["Yi Syllables"](_r)));(JR[_n]||vi||Pn.imageName)&&Mr.push(sT(yn+1,Qr,Ar,Mr,PF(_n,Mt.getCharCode(yn+1),vi&&$r),!1))}}var _r;return rk(sT(Mt.length(),Qr,Ar,Mr,0,!0))}(Ne,te,M,c,g,Me),{processBidirectionalText:Ct,processStyledBidirectionalText:dt}=ae;if(Ct&&Ne.sections.length===1){const Mt=Ct(Ne.toString(),ft);for(const cr of Mt){const sr=new O0;sr.text=cr,sr.sections=Ne.sections;for(let Cr=0;Cr<cr.length;Cr++)sr.sectionIndex.push(0);Qe.push(sr)}}else if(dt){const Mt=dt(Ne.text,Ne.sectionIndex,ft);for(const cr of Mt){const sr=new O0;sr.text=cr[0],sr.sectionIndex=cr[1],sr.sections=Ne.sections,Qe.push(sr)}}else Qe=function(Mt,cr){const sr=[],Cr=Mt.text;let Kr=0;for(const hr of cr)sr.push(Mt.substring(Kr,hr)),Kr=hr;return Kr<Cr.length&&sr.push(Mt.substring(Kr,Cr.length)),sr}(Ne,ft);const wt=[],Rt={positionedLines:wt,text:Ne.toString(),top:ue[1],bottom:ue[1],left:ue[0],right:ue[0],writingMode:ge,iconsInText:!1,verticalizable:!1,hasBaseline:!1};return function(Mt,cr,sr,Cr,Kr,hr,Mr,Ar,$r,Qr,_r,yn){let Pn=0,_n=0,vi=0;const en=Ar==="right"?1:Ar==="left"?0:.5;let zn=!1;for(const wi of Kr){const Ci=wi.getSections();for(const ns of Ci){if(ns.imageName)continue;const us=cr[ns.fontStack];if(us&&(zn=us.ascender!==void 0&&us.descender!==void 0,!zn))break}if(!zn)break}let yi=0;for(const wi of Kr){wi.trim();const Ci=wi.getMaxScale(),ns=(Ci-1)*al,us={positionedGlyphs:[],lineOffset:0};Mt.positionedLines[yi]=us;const fs=us.positionedGlyphs;let is=0;if(!wi.length()){_n+=hr,++yi;continue}let js=0,da=0;for(let os=0;os<wi.length();os++){const cl=wi.getSection(os),Ua=wi.getSectionIndex(os),Zs=wi.getCharCode(os);let bo=cl.scale,Va=null,ds=null,yu=null,Ha=al,Zl=0;const Nl=!($r===Ju.horizontal||!_r&&!j_(Zs)||_r&&(Ww[Zs]||(vo=Zs,mn.Arabic(vo)||mn["Arabic Supplement"](vo)||mn["Arabic Extended-A"](vo)||mn["Arabic Presentation Forms-A"](vo)||mn["Arabic Presentation Forms-B"](vo))));if(cl.imageName){const xu=Cr[cl.imageName];if(!xu)continue;yu=cl.imageName,Mt.iconsInText=Mt.iconsInText||!0,ds=xu.paddedRect;const $l=xu.displaySize;bo=bo*al/yn,Va={width:$l[0],height:$l[1],left:Kl,top:-Hw,advance:Nl?$l[1]:$l[0],localGlyph:!1},Zl=zn?-Va.height*bo:yl+Ci*al-$l[1]*bo,Ha=Va.advance;const pm=(Nl?$l[0]:$l[1])*bo-al*Ci;pm>0&&pm>is&&(is=pm)}else{const xu=sr[cl.fontStack];if(!xu)continue;xu[Zs]&&(ds=xu[Zs]);const $l=cr[cl.fontStack];if(!$l)continue;const pm=$l.glyphs[Zs];if(!pm)continue;if(Va=pm.metrics,Ha=Zs!==8203?al:0,zn){const i2=$l.ascender!==void 0?Math.abs($l.ascender):0,ET=$l.descender!==void 0?Math.abs($l.descender):0,ST=(i2+ET)*bo;js<ST&&(js=ST,da=(i2-ET)/2*bo),Zl=-i2*bo}else Zl=yl+(Ci-bo)*al}Nl?(Mt.verticalizable=!0,fs.push({glyph:Zs,imageName:yu,x:Pn,y:_n+Zl,vertical:Nl,scale:bo,localGlyph:Va.localGlyph,fontStack:cl.fontStack,sectionIndex:Ua,metrics:Va,rect:ds}),Pn+=Ha*bo+Qr):(fs.push({glyph:Zs,imageName:yu,x:Pn,y:_n+Zl,vertical:Nl,scale:bo,localGlyph:Va.localGlyph,fontStack:cl.fontStack,sectionIndex:Ua,metrics:Va,rect:ds}),Pn+=Va.advance*bo+Qr)}fs.length!==0&&(vi=Math.max(Pn-Qr,vi),zn?nk(fs,en,is,da,hr*Ci/2):nk(fs,en,is,0,hr/2)),Pn=0;const ja=hr*Ci+is;us.lineOffset=Math.max(is,ns),_n+=ja,++yi}var vo;const xi=_n,{horizontalAlign:Jn,verticalAlign:gs}=aT(Mr);(function(wi,Ci,ns,us,fs,is){const js=(Ci-ns)*fs,da=-is*us;for(const ja of wi)for(const os of ja.positionedGlyphs)os.x+=js,os.y+=da})(Mt.positionedLines,en,Jn,gs,vi,xi),Mt.top+=-gs*xi,Mt.bottom=Mt.top+xi,Mt.left+=-Jn*vi,Mt.right=Mt.left+vi,Mt.hasBaseline=zn}(Rt,c,d,g,Qe,L,V,Q,ge,te,_e,Ae),!function(Mt){for(const cr of Mt)if(cr.positionedGlyphs.length!==0)return!1;return!0}(wt)&&Rt}const Ww={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},JR={10:!0,32:!0,38:!0,40:!0,41:!0,43:!0,45:!0,47:!0,173:!0,183:!0,8203:!0,8208:!0,8211:!0,8231:!0};function ek(f,c,d,g,S,M){if(c.imageName){const L=g[c.imageName];return L?L.displaySize[0]*c.scale*al/M+S:0}{const L=d[c.fontStack],V=L&&L.glyphs[f];return V?V.metrics.advance*c.scale+S:0}}function tk(f,c,d,g){const S=Math.pow(f-c,2);return g?f<c?S/2:2*S:S+Math.abs(d)*d}function PF(f,c,d){let g=0;return f===10&&(g-=1e4),d&&(g+=150),f!==40&&f!==65288||(g+=50),c!==41&&c!==65289||(g+=50),g}function sT(f,c,d,g,S,M){let L=null,V=tk(c,d,S,M);for(const Q of g){const te=tk(c-Q.x,d,S,M)+Q.badness;te<=V&&(L=Q,V=te)}return{index:f,x:c,priorBreak:L,badness:V}}function rk(f){return f?rk(f.priorBreak).concat(f.index):[]}function aT(f){let c=.5,d=.5;switch(f){case"right":case"top-right":case"bottom-right":c=1;break;case"left":case"top-left":case"bottom-left":c=0}switch(f){case"bottom":case"bottom-right":case"bottom-left":d=1;break;case"top":case"top-right":case"top-left":d=0}return{horizontalAlign:c,verticalAlign:d}}function nk(f,c,d,g,S){if(!(c||d||g||S))return;const M=f.length-1,L=f[M],V=(L.x+L.metrics.advance*L.scale)*c;for(let Q=0;Q<=M;Q++)f[Q].x-=V,f[Q].y+=d+g+S}function ik(f,c,d){const{horizontalAlign:g,verticalAlign:S}=aT(d),M=c[0]-f.displaySize[0]*g,L=c[1]-f.displaySize[1]*S;return{image:f,top:L,bottom:L+f.displaySize[1],left:M,right:M+f.displaySize[0]}}function lT(f,c,d,g,S,M){const L=f.image;let V;if(L.content){const Qe=L.content,ft=L.pixelRatio||1;V=[Qe[0]/ft,Qe[1]/ft,L.displaySize[0]-Qe[2]/ft,L.displaySize[1]-Qe[3]/ft]}const Q=c.left*M,te=c.right*M;let ue,ge,_e,Me;d==="width"||d==="both"?(Me=S[0]+Q-g[3],ge=S[0]+te+g[1]):(Me=S[0]+(Q+te-L.displaySize[0])/2,ge=Me+L.displaySize[0]);const Ae=c.top*M,Ne=c.bottom*M;return d==="height"||d==="both"?(ue=S[1]+Ae-g[0],_e=S[1]+Ne+g[2]):(ue=S[1]+(Ae+Ne-L.displaySize[1])/2,_e=ue+L.displaySize[1]),{image:L,top:ue,right:ge,bottom:_e,left:Me,collisionPadding:V}}class dm extends D{constructor(c,d,g,S,M){super(c,d),this.angle=S,this.z=g,M!==void 0&&(this.segment=M)}clone(){return new dm(this.x,this.y,this.z,this.angle,this.segment)}}function ok(f,c,d,g,S){if(c.segment===void 0)return!0;let M=c,L=c.segment+1,V=0;for(;V>-d/2;){if(L--,L<0)return!1;V-=f[L].dist(M),M=f[L]}V+=f[L].dist(f[L+1]),L++;const Q=[];let te=0;for(;V<d/2;){const ue=f[L],ge=f[L+1];if(!ge)return!1;let _e=f[L-1].angleTo(ue)-ue.angleTo(ge);for(_e=Math.abs((_e+3*Math.PI)%(2*Math.PI)-Math.PI),Q.push({distance:V,angleDelta:_e}),te+=_e;V-Q[0].distance>g;)te-=Q.shift().angleDelta;if(te>S)return!1;L++,V+=ue.dist(ge)}return!0}function sk(f){let c=0;for(let d=0;d<f.length-1;d++)c+=f[d].dist(f[d+1]);return c}function ak(f,c,d){return f?.6*c*d:0}function Zv(f,c){return Math.max(f?f.right-f.left:0,c?c.right-c.left:0)}function IF(f,c,d,g,S,M){const L=ak(d,S,M),V=Zv(d,g)*M;let Q=0;const te=sk(f)/2;for(let ue=0;ue<f.length-1;ue++){const ge=f[ue],_e=f[ue+1],Me=ge.dist(_e);if(Q+Me>te){const Ae=(te-Q)/Me,Ne=Ii(ge.x,_e.x,Ae),Qe=Ii(ge.y,_e.y,Ae),ft=new dm(Ne,Qe,0,_e.angleTo(ge),ue);return!L||ok(f,ft,V,L,c)?ft:void 0}Q+=Me}}function MF(f,c,d,g,S,M,L,V,Q){const te=ak(g,M,L),ue=Zv(g,S),ge=ue*L,_e=f[0].x===0||f[0].x===Q||f[0].y===0||f[0].y===Q;return c-ge<c/4&&(c=ge+c/4),lk(f,_e?c/2*V%c:(ue/2+2*M)*L*V%c,c,te,d,ge,_e,!1,Q)}function lk(f,c,d,g,S,M,L,V,Q){const te=M/2,ue=sk(f);let ge=0,_e=c-d,Me=[];for(let Ae=0;Ae<f.length-1;Ae++){const Ne=f[Ae],Qe=f[Ae+1],ft=Ne.dist(Qe),Ct=Qe.angleTo(Ne);for(;_e+d<ge+ft;){_e+=d;const dt=(_e-ge)/ft,wt=Ii(Ne.x,Qe.x,dt),Rt=Ii(Ne.y,Qe.y,dt);if(wt>=0&&wt<Q&&Rt>=0&&Rt<Q&&_e-te>=0&&_e+te<=ue){const Mt=new dm(wt,Rt,0,Ct,Ae);Mt._round(),g&&!ok(f,Mt,M,g,S)||Me.push(Mt)}}ge+=ft}return V||Me.length||L||(Me=lk(f,ge/2,d,g,S,M,L,!0,Q)),Me}function ck(f,c,d,g,S){const M=[];for(let L=0;L<f.length;L++){const V=f[L];let Q;for(let te=0;te<V.length-1;te++){let ue=V[te],ge=V[te+1];ue.x<c&&ge.x<c||(ue.x<c?ue=new D(c,ue.y+(c-ue.x)/(ge.x-ue.x)*(ge.y-ue.y))._round():ge.x<c&&(ge=new D(c,ue.y+(c-ue.x)/(ge.x-ue.x)*(ge.y-ue.y))._round()),ue.y<d&&ge.y<d||(ue.y<d?ue=new D(ue.x+(d-ue.y)/(ge.y-ue.y)*(ge.x-ue.x),d)._round():ge.y<d&&(ge=new D(ue.x+(d-ue.y)/(ge.y-ue.y)*(ge.x-ue.x),d)._round()),ue.x>=g&&ge.x>=g||(ue.x>=g?ue=new D(g,ue.y+(g-ue.x)/(ge.x-ue.x)*(ge.y-ue.y))._round():ge.x>=g&&(ge=new D(g,ue.y+(g-ue.x)/(ge.x-ue.x)*(ge.y-ue.y))._round()),ue.y>=S&&ge.y>=S||(ue.y>=S?ue=new D(ue.x+(S-ue.y)/(ge.y-ue.y)*(ge.x-ue.x),S)._round():ge.y>=S&&(ge=new D(ue.x+(S-ue.y)/(ge.y-ue.y)*(ge.x-ue.x),S)._round()),Q&&ue.equals(Q[Q.length-1])||(Q=[ue],M.push(Q)),Q.push(ge)))))}}return M}Sn(dm,"Anchor");const s1=1e20;function cT(f,c,d,g,S,M,L,V,Q){for(let te=c;te<c+g;te++)uT(f,d*M+te,M,S,L,V,Q);for(let te=d;te<d+S;te++)uT(f,te*M+c,1,g,L,V,Q)}function uT(f,c,d,g,S,M,L){M[0]=0,L[0]=-s1,L[1]=s1,S[0]=f[c];for(let V=1,Q=0,te=0;V<g;V++){S[V]=f[c+V*d];const ue=V*V;do{const ge=M[Q];te=(S[V]-S[ge]+ue-ge*ge)/(V-ge)/2}while(te<=L[Q]&&--Q>-1);Q++,M[Q]=V,L[Q]=te,L[Q+1]=s1}for(let V=0,Q=0;V<g;V++){for(;L[Q+1]<V;)Q++;const te=M[Q],ue=V-te;f[c+V*d]=S[te]+ue*ue}}const Fd=2,fT={none:0,ideographs:1,all:2};class L0{constructor(c,d,g){this.requestManager=c,this.localGlyphMode=d,this.localFontFamily=g,this.entries={},this.localGlyphs={200:{},400:{},500:{},900:{}}}setURL(c){this.url=c}getGlyphs(c,d){const g=[];for(const S in c)for(const M of c[S])g.push({stack:S,id:M});ce(g,({stack:S,id:M},L)=>{let V=this.entries[S];V||(V=this.entries[S]={glyphs:{},requests:{},ranges:{},ascender:void 0,descender:void 0});let Q=V.glyphs[M];if(Q!==void 0)return void L(null,{stack:S,id:M,glyph:Q});if(Q=this._tinySDF(V,S,M),Q)return V.glyphs[M]=Q,void L(null,{stack:S,id:M,glyph:Q});const te=Math.floor(M/256);if(256*te>65535)return void L(new Error("glyphs > 65535 not supported"));if(V.ranges[te])return void L(null,{stack:S,id:M,glyph:Q});let ue=V.requests[te];ue||(ue=V.requests[te]=[],L0.loadGlyphRange(S,te,this.url,this.requestManager,(ge,_e)=>{if(_e){V.ascender=_e.ascender,V.descender=_e.descender;for(const Me in _e.glyphs)this._doesCharSupportLocalGlyph(+Me)||(V.glyphs[+Me]=_e.glyphs[+Me]);V.ranges[te]=!0}for(const Me of ue)Me(ge,_e);delete V.requests[te]})),ue.push((ge,_e)=>{ge?L(ge):_e&&L(null,{stack:S,id:M,glyph:_e.glyphs[M]||null})})},(S,M)=>{if(S)d(S);else if(M){const L={};for(const{stack:V,id:Q,glyph:te}of M)L[V]===void 0&&(L[V]={}),L[V].glyphs===void 0&&(L[V].glyphs={}),L[V].glyphs[Q]=te&&{id:te.id,bitmap:te.bitmap.clone(),metrics:te.metrics},L[V].ascender=this.entries[V].ascender,L[V].descender=this.entries[V].descender;d(null,L)}})}_doesCharSupportLocalGlyph(c){return this.localGlyphMode!==fT.none&&(this.localGlyphMode===fT.all?!!this.localFontFamily:!!this.localFontFamily&&(mn["CJK Unified Ideographs"](c)||mn["Hangul Syllables"](c)||mn.Hiragana(c)||mn.Katakana(c)||mn["CJK Symbols and Punctuation"](c)))}_tinySDF(c,d,g){const S=this.localFontFamily;if(!S||!this._doesCharSupportLocalGlyph(g))return;let M=c.tinySDF;if(!M){let Ne="400";/bold/i.test(d)?Ne="900":/medium/i.test(d)?Ne="500":/light/i.test(d)&&(Ne="200"),M=c.tinySDF=new L0.TinySDF({fontFamily:S,fontWeight:Ne,fontSize:24*Fd,buffer:3*Fd,radius:8*Fd}),M.fontWeight=Ne}if(this.localGlyphs[M.fontWeight][g])return this.localGlyphs[M.fontWeight][g];const L=String.fromCharCode(g),{data:V,width:Q,height:te,glyphWidth:ue,glyphHeight:ge,glyphLeft:_e,glyphTop:Me,glyphAdvance:Ae}=M.draw(L);return this.localGlyphs[M.fontWeight][g]={id:g,bitmap:new um({width:Q,height:te},V),metrics:{width:ue/Fd,height:ge/Fd,left:_e/Fd,top:Me/Fd-27,advance:Ae/Fd,localGlyph:!0}}}}L0.loadGlyphRange=function(f,c,d,g,S){const M=256*c,L=M+255,V=g.transformRequest(g.normalizeGlyphsURL(d).replace("{fontstack}",f).replace("{range}",`${M}-${L}`),Ut.Glyphs);Dt(V,(Q,te)=>{if(Q)S(Q);else if(te){const ue={},ge=function(_e){return new Vw(_e).readFields(EF,{})}(te);for(const _e of ge.glyphs)ue[_e.id]=_e;S(null,{glyphs:ue,ascender:ge.ascender,descender:ge.descender})}})},L0.TinySDF=class{constructor({fontSize:f=24,buffer:c=3,radius:d=8,cutoff:g=.25,fontFamily:S="sans-serif",fontWeight:M="normal",fontStyle:L="normal"}={}){this.buffer=c,this.cutoff=g,this.radius=d;const V=this.size=f+4*c,Q=this._createCanvas(V),te=this.ctx=Q.getContext("2d",{willReadFrequently:!0});te.font=`${L} ${M} ${f}px ${S}`,te.textBaseline="alphabetic",te.textAlign="left",te.fillStyle="black",this.gridOuter=new Float64Array(V*V),this.gridInner=new Float64Array(V*V),this.f=new Float64Array(V),this.z=new Float64Array(V+1),this.v=new Uint16Array(V)}_createCanvas(f){const c=document.createElement("canvas");return c.width=c.height=f,c}draw(f){const{width:c,actualBoundingBoxAscent:d,actualBoundingBoxDescent:g,actualBoundingBoxLeft:S,actualBoundingBoxRight:M}=this.ctx.measureText(f),L=Math.ceil(d),V=Math.max(0,Math.min(this.size-this.buffer,Math.ceil(M-S))),Q=Math.min(this.size-this.buffer,L+Math.ceil(g)),te=V+2*this.buffer,ue=Q+2*this.buffer,ge=Math.max(te*ue,0),_e=new Uint8ClampedArray(ge),Me={data:_e,width:te,height:ue,glyphWidth:V,glyphHeight:Q,glyphTop:L,glyphLeft:0,glyphAdvance:c};if(V===0||Q===0)return Me;const{ctx:Ae,buffer:Ne,gridInner:Qe,gridOuter:ft}=this;Ae.clearRect(Ne,Ne,V,Q),Ae.fillText(f,Ne,Ne+L);const Ct=Ae.getImageData(Ne,Ne,V,Q);ft.fill(s1,0,ge),Qe.fill(0,0,ge);for(let dt=0;dt<Q;dt++)for(let wt=0;wt<V;wt++){const Rt=Ct.data[4*(dt*V+wt)+3]/255;if(Rt===0)continue;const Mt=(dt+Ne)*te+wt+Ne;if(Rt===1)ft[Mt]=0,Qe[Mt]=s1;else{const cr=.5-Rt;ft[Mt]=cr>0?cr*cr:0,Qe[Mt]=cr<0?cr*cr:0}}cT(ft,0,0,te,ue,te,this.f,this.v,this.z),cT(Qe,Ne,Ne,V,Q,te,this.f,this.v,this.z);for(let dt=0;dt<ge;dt++){const wt=Math.sqrt(ft[dt])-Math.sqrt(Qe[dt]);_e[dt]=Math.round(255-255*(wt/this.radius+this.cutoff))}return Me}};const D0=Kl;function uk(f,c,d,g){const S=[],M=f.image,L=M.pixelRatio,V=M.paddedRect.w-2*D0,Q=M.paddedRect.h-2*D0,te=f.right-f.left,ue=f.bottom-f.top,ge=M.stretchX||[[0,V]],_e=M.stretchY||[[0,Q]],Me=(hr,Mr)=>hr+Mr[1]-Mr[0],Ae=ge.reduce(Me,0),Ne=_e.reduce(Me,0),Qe=V-Ae,ft=Q-Ne;let Ct=0,dt=Ae,wt=0,Rt=Ne,Mt=0,cr=Qe,sr=0,Cr=ft;if(M.content&&g){const hr=M.content;Ct=Gw(ge,0,hr[0]),wt=Gw(_e,0,hr[1]),dt=Gw(ge,hr[0],hr[2]),Rt=Gw(_e,hr[1],hr[3]),Mt=hr[0]-Ct,sr=hr[1]-wt,cr=hr[2]-hr[0]-dt,Cr=hr[3]-hr[1]-Rt}const Kr=(hr,Mr,Ar,$r)=>{const Qr=qw(hr.stretch-Ct,dt,te,f.left),_r=Xw(hr.fixed-Mt,cr,hr.stretch,Ae),yn=qw(Mr.stretch-wt,Rt,ue,f.top),Pn=Xw(Mr.fixed-sr,Cr,Mr.stretch,Ne),_n=qw(Ar.stretch-Ct,dt,te,f.left),vi=Xw(Ar.fixed-Mt,cr,Ar.stretch,Ae),en=qw($r.stretch-wt,Rt,ue,f.top),zn=Xw($r.fixed-sr,Cr,$r.stretch,Ne),yi=new D(Qr,yn),vo=new D(_n,yn),xi=new D(_n,en),Jn=new D(Qr,en),gs=new D(_r/L,Pn/L),wi=new D(vi/L,zn/L),Ci=c*Math.PI/180;if(Ci){const fs=Math.sin(Ci),is=Math.cos(Ci),js=[is,-fs,fs,is];yi._matMult(js),vo._matMult(js),Jn._matMult(js),xi._matMult(js)}const ns=hr.stretch+hr.fixed,us=Mr.stretch+Mr.fixed;return{tl:yi,tr:vo,bl:Jn,br:xi,tex:{x:M.paddedRect.x+D0+ns,y:M.paddedRect.y+D0+us,w:Ar.stretch+Ar.fixed-ns,h:$r.stretch+$r.fixed-us},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:gs,pixelOffsetBR:wi,minFontScaleX:cr/L/te,minFontScaleY:Cr/L/ue,isSDF:d}};if(g&&(M.stretchX||M.stretchY)){const hr=fk(ge,Qe,Ae),Mr=fk(_e,ft,Ne);for(let Ar=0;Ar<hr.length-1;Ar++){const $r=hr[Ar],Qr=hr[Ar+1];for(let _r=0;_r<Mr.length-1;_r++)S.push(Kr($r,Mr[_r],Qr,Mr[_r+1]))}}else S.push(Kr({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:V+1},{fixed:0,stretch:Q+1}));return S}function Gw(f,c,d){let g=0;for(const S of f)g+=Math.max(c,Math.min(d,S[1]))-Math.max(c,Math.min(d,S[0]));return g}function fk(f,c,d){const g=[{fixed:-D0,stretch:0}];for(const[S,M]of f){const L=g[g.length-1];g.push({fixed:S-L.stretch,stretch:L.stretch}),g.push({fixed:S-L.stretch,stretch:L.stretch+(M-S)})}return g.push({fixed:c+D0,stretch:d}),g}function qw(f,c,d,g){return f/c*d+g}function Xw(f,c,d,g){return f-c*d/g}function AF(f,c,d,g){const S=c+f.positionedLines[g].lineOffset;return g===0?d+S/2:d+(S+(c+f.positionedLines[g-1].lineOffset))/2}class RF{constructor(c=[],d=kF){if(this.data=c,this.length=this.data.length,this.compare=d,this.length>0)for(let g=(this.length>>1)-1;g>=0;g--)this._down(g)}push(c){this.data.push(c),this.length++,this._up(this.length-1)}pop(){if(this.length===0)return;const c=this.data[0],d=this.data.pop();return this.length--,this.length>0&&(this.data[0]=d,this._down(0)),c}peek(){return this.data[0]}_up(c){const{data:d,compare:g}=this,S=d[c];for(;c>0;){const M=c-1>>1,L=d[M];if(g(S,L)>=0)break;d[c]=L,c=M}d[c]=S}_down(c){const{data:d,compare:g}=this,S=this.length>>1,M=d[c];for(;c<S;){let L=1+(c<<1),V=d[L];const Q=L+1;if(Q<this.length&&g(d[Q],V)<0&&(L=Q,V=d[Q]),g(V,M)>=0)break;d[c]=V,c=L}d[c]=M}}function kF(f,c){return f<c?-1:f>c?1:0}function OF(f,c=1,d=!1){let g=1/0,S=1/0,M=-1/0,L=-1/0;const V=f[0];for(let Me=0;Me<V.length;Me++){const Ae=V[Me];(!Me||Ae.x<g)&&(g=Ae.x),(!Me||Ae.y<S)&&(S=Ae.y),(!Me||Ae.x>M)&&(M=Ae.x),(!Me||Ae.y>L)&&(L=Ae.y)}const Q=Math.min(M-g,L-S);let te=Q/2;const ue=new RF([],LF);if(Q===0)return new D(g,S);for(let Me=g;Me<M;Me+=Q)for(let Ae=S;Ae<L;Ae+=Q)ue.push(new N0(Me+te,Ae+te,te,f));let ge=function(Me){let Ae=0,Ne=0,Qe=0;const ft=Me[0];for(let Ct=0,dt=ft.length,wt=dt-1;Ct<dt;wt=Ct++){const Rt=ft[Ct],Mt=ft[wt],cr=Rt.x*Mt.y-Mt.x*Rt.y;Ne+=(Rt.x+Mt.x)*cr,Qe+=(Rt.y+Mt.y)*cr,Ae+=3*cr}return new N0(Ne/Ae,Qe/Ae,0,Me)}(f),_e=ue.length;for(;ue.length;){const Me=ue.pop();(Me.d>ge.d||!ge.d)&&(ge=Me,d&&console.log("found best %d after %d probes",Math.round(1e4*Me.d)/1e4,_e)),Me.max-ge.d<=c||(te=Me.h/2,ue.push(new N0(Me.p.x-te,Me.p.y-te,te,f)),ue.push(new N0(Me.p.x+te,Me.p.y-te,te,f)),ue.push(new N0(Me.p.x-te,Me.p.y+te,te,f)),ue.push(new N0(Me.p.x+te,Me.p.y+te,te,f)),_e+=4)}return d&&(console.log(`num probes: ${_e}`),console.log(`best distance: ${ge.d}`)),ge.p}function LF(f,c){return c.max-f.max}class N0{constructor(c,d,g,S){this.p=new D(c,d),this.h=g,this.d=function(M,L){let V=!1,Q=1/0;for(let te=0;te<L.length;te++){const ue=L[te];for(let ge=0,_e=ue.length,Me=_e-1;ge<_e;Me=ge++){const Ae=ue[ge],Ne=ue[Me];Ae.y>M.y!=Ne.y>M.y&&M.x<(Ne.x-Ae.x)*(M.y-Ae.y)/(Ne.y-Ae.y)+Ae.x&&(V=!V),Q=Math.min(Q,dR(M,Ae,Ne))}}return(V?1:-1)*Math.sqrt(Q)}(this.p,S),this.max=this.d+this.h*Math.SQRT2}}const $0=7,dT=Number.POSITIVE_INFINITY,DF=Math.sqrt(2);function dk(f,[c,d]){let g=0,S=0;if(d===dT){c<0&&(c=0);const M=c/DF;switch(f){case"top-right":case"top-left":S=M-$0;break;case"bottom-right":case"bottom-left":S=-M+$0;break;case"bottom":S=-c+$0;break;case"top":S=c-$0}switch(f){case"top-right":case"bottom-right":g=-M;break;case"top-left":case"bottom-left":g=M;break;case"left":g=c;break;case"right":g=-c}}else{switch(c=Math.abs(c),d=Math.abs(d),f){case"top-right":case"top-left":case"top":S=d-$0;break;case"bottom-right":case"bottom-left":case"bottom":S=-d+$0}switch(f){case"top-right":case"bottom-right":case"right":g=-c;break;case"top-left":case"bottom-left":case"left":g=c}}return[g,S]}function NF(f,c,d,g,S,M,L,V,Q,te){f.createArrays(),f.tilePixelRatio=$n/(512*f.overscaling),f.compareText={},f.iconsNeedLinear=!1;const ue=f.layers[0].layout,ge=f.layers[0]._unevaluatedLayout._values,_e={};if(f.textSizeData.kind==="composite"){const{minZoom:Ne,maxZoom:Qe}=f.textSizeData;_e.compositeTextSizes=[ge["text-size"].possiblyEvaluate(new he(Ne),V),ge["text-size"].possiblyEvaluate(new he(Qe),V)]}if(f.iconSizeData.kind==="composite"){const{minZoom:Ne,maxZoom:Qe}=f.iconSizeData;_e.compositeIconSizes=[ge["icon-size"].possiblyEvaluate(new he(Ne),V),ge["icon-size"].possiblyEvaluate(new he(Qe),V)]}_e.layoutTextSize=ge["text-size"].possiblyEvaluate(new he(Q+1),V),_e.layoutIconSize=ge["icon-size"].possiblyEvaluate(new he(Q+1),V),_e.textMaxSize=ge["text-size"].possiblyEvaluate(new he(18),V);const Me=ue.get("text-rotation-alignment")==="map"&&ue.get("symbol-placement")!=="point",Ae=ue.get("text-size");for(const Ne of f.features){const Qe=ue.get("text-font").evaluate(Ne,{},V).join(","),ft=Ae.evaluate(Ne,{},V),Ct=_e.layoutTextSize.evaluate(Ne,{},V),dt=(_e.layoutIconSize.evaluate(Ne,{},V),{horizontal:{},vertical:void 0}),wt=Ne.text;let Rt,Mt=[0,0];if(wt){const Cr=wt.toString(),Kr=ue.get("text-letter-spacing").evaluate(Ne,{},V)*al,hr=ue.get("text-line-height").evaluate(Ne,{},V)*al,Mr=_S(Cr)?Kr:0,Ar=ue.get("text-anchor").evaluate(Ne,{},V),$r=ue.get("text-variable-anchor");if(!$r){const _n=ue.get("text-radial-offset").evaluate(Ne,{},V);Mt=_n?dk(Ar,[_n*al,dT]):ue.get("text-offset").evaluate(Ne,{},V).map(vi=>vi*al)}let Qr=Me?"center":ue.get("text-justify").evaluate(Ne,{},V);const _r=ue.get("symbol-placement")==="point",yn=_r?ue.get("text-max-width").evaluate(Ne,{},V)*al:1/0,Pn=_n=>{f.allowVerticalPlacement&&B_(Cr)&&(dt.vertical=oT(wt,c,d,S,Qe,yn,hr,Ar,_n,Mr,Mt,Ju.vertical,!0,Ct,ft))};if(!Me&&$r){const _n=Qr==="auto"?$r.map(en=>hT(en)):[Qr];let vi=!1;for(let en=0;en<_n.length;en++){const zn=_n[en];if(!dt.horizontal[zn])if(vi)dt.horizontal[zn]=dt.horizontal[0];else{const yi=oT(wt,c,d,S,Qe,yn,hr,"center",zn,Mr,Mt,Ju.horizontal,!1,Ct,ft);yi&&(dt.horizontal[zn]=yi,vi=yi.positionedLines.length===1)}}Pn("left")}else{if(Qr==="auto"&&(Qr=hT(Ar)),_r||ue.get("text-writing-mode").indexOf("horizontal")>=0||!B_(Cr)){const _n=oT(wt,c,d,S,Qe,yn,hr,Ar,Qr,Mr,Mt,Ju.horizontal,!1,Ct,ft);_n&&(dt.horizontal[Qr]=_n)}Pn(_r?"left":Qr)}}let cr=!1;if(Ne.icon&&Ne.icon.name){const Cr=g[Ne.icon.name];Cr&&(Rt=ik(S[Ne.icon.name],ue.get("icon-offset").evaluate(Ne,{},V),ue.get("icon-anchor").evaluate(Ne,{},V)),cr=Cr.sdf,f.sdfIcons===void 0?f.sdfIcons=Cr.sdf:f.sdfIcons!==Cr.sdf&&ze("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"),(Cr.pixelRatio!==f.pixelRatio||ue.get("icon-rotate").constantOr(1)!==0)&&(f.iconsNeedLinear=!0))}const sr=Yw(dt.horizontal)||dt.vertical;f.iconsInText||(f.iconsInText=!!sr&&sr.iconsInText),(sr||Rt)&&$F(f,Ne,dt,Rt,g,_e,Ct,0,Mt,cr,L,V,te)}M&&f.generateCollisionDebugBuffers(Q,f.collisionBoxArray)}function hT(f){switch(f){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function $F(f,c,d,g,S,M,L,V,Q,te,ue,ge,_e){let Me=M.textMaxSize.evaluate(c,{},ge);Me===void 0&&(Me=L);const Ae=f.layers[0].layout,Ne=Ae.get("icon-offset").evaluate(c,{},ge),Qe=Yw(d.horizontal)||d.vertical,ft=_e.name==="globe",Ct=al,dt=L/Ct,wt=f.tilePixelRatio*Me/Ct,Rt=(Ar=f.overscaling,f.zoom>18&&Ar>2&&(Ar>>=1),Math.max($n/(512*Ar),1)*Ae.get("symbol-spacing")),Mt=Ae.get("text-padding")*f.tilePixelRatio,cr=Ae.get("icon-padding")*f.tilePixelRatio,sr=j(Ae.get("text-max-angle")),Cr=Ae.get("text-rotation-alignment")==="map"&&Ae.get("symbol-placement")!=="point",Kr=Ae.get("icon-rotation-alignment")==="map"&&Ae.get("symbol-placement")!=="point",hr=Ae.get("symbol-placement"),Mr=Rt/2;var Ar;const $r=Ae.get("icon-text-fit");let Qr;g&&$r!=="none"&&(f.allowVerticalPlacement&&d.vertical&&(Qr=lT(g,d.vertical,$r,Ae.get("icon-text-fit-padding"),Ne,dt)),Qe&&(g=lT(g,Qe,$r,Ae.get("icon-text-fit-padding"),Ne,dt)));const _r=(yn,Pn,_n)=>{if(Pn.x<0||Pn.x>=$n||Pn.y<0||Pn.y>=$n)return;let vi=null;if(ft){const{x:en,y:zn,z:yi}=_e.projectTilePoint(Pn.x,Pn.y,_n);vi={anchor:new dm(en,zn,yi,0,void 0),up:_e.upVector(_n,Pn.x,Pn.y)}}(function(en,zn,yi,vo,xi,Jn,gs,wi,Ci,ns,us,fs,is,js,da,ja,os,cl,Ua,Zs,bo,Va,ds,yu,Ha){const Zl=en.addToLineVertexArray(zn,vo);let Nl,xu,$l,pm,i2,ET,ST,uq=0,fq=0,dq=0,hq=0,az=-1,lz=-1;const kg={};let pq=CS("");const h1=yi?yi.anchor:zn;let cz=0,uz=0;if(Ci._unevaluatedLayout.getValue("text-radial-offset")===void 0?[cz,uz]=Ci.layout.get("text-offset").evaluate(bo,{},Ha).map(zf=>zf*al):(cz=Ci.layout.get("text-radial-offset").evaluate(bo,{},Ha)*al,uz=dT),en.allowVerticalPlacement&&xi.vertical){const zf=xi.vertical;if(da)ET=Kw(zf),wi&&(ST=Kw(wi));else{const Bf=Ci.layout.get("text-rotate").evaluate(bo,{},Ha)+90;$l=l1(ns,h1,zn,us,fs,is,zf,js,Bf,ja),wi&&(pm=l1(ns,h1,zn,us,fs,is,wi,cl,Bf))}}if(Jn){const zf=Ci.layout.get("icon-rotate").evaluate(bo,{},Ha),Bf=Ci.layout.get("icon-text-fit")!=="none",TT=uk(Jn,zf,ds,Bf),dz=wi?uk(wi,zf,ds,Bf):void 0;xu=l1(ns,h1,zn,us,fs,is,Jn,cl,zf),uq=4*TT.length;const mq=en.iconSizeData;let p1=null;mq.kind==="source"?(p1=[Nc*Ci.layout.get("icon-size").evaluate(bo,{},Ha)],p1[0]>Pg&&ze(`${en.layerIds[0]}: Value for "icon-size" is >= ${a1}. Reduce your "icon-size".`)):mq.kind==="composite"&&(p1=[Nc*Va.compositeIconSizes[0].evaluate(bo,{},Ha),Nc*Va.compositeIconSizes[1].evaluate(bo,{},Ha)],(p1[0]>Pg||p1[1]>Pg)&&ze(`${en.layerIds[0]}: Value for "icon-size" is >= ${a1}. Reduce your "icon-size".`)),en.addSymbols(en.icon,TT,p1,Zs,Ua,bo,!1,yi,zn,Zl.lineStartIndex,Zl.lineLength,-1,yu,Ha),az=en.icon.placedSymbolArray.length-1,dz&&(fq=4*dz.length,en.addSymbols(en.icon,dz,p1,Zs,Ua,bo,Ju.vertical,yi,zn,Zl.lineStartIndex,Zl.lineLength,-1,yu,Ha),lz=en.icon.placedSymbolArray.length-1)}for(const zf in xi.horizontal){const Bf=xi.horizontal[zf];Nl||(pq=CS(Bf.text),da?i2=Kw(Bf):Nl=l1(ns,h1,zn,us,fs,is,Bf,js,Ci.layout.get("text-rotate").evaluate(bo,{},Ha),ja));const TT=Bf.positionedLines.length===1;if(dq+=hk(en,yi,zn,Bf,gs,Ci,da,bo,ja,Zl,xi.vertical?Ju.horizontal:Ju.horizontalOnly,TT?Object.keys(xi.horizontal):[zf],kg,az,Va,yu,Ha),TT)break}xi.vertical&&(hq+=hk(en,yi,zn,xi.vertical,gs,Ci,da,bo,ja,Zl,Ju.vertical,["vertical"],kg,lz,Va,yu,Ha));let F0=-1;const fz=(zf,Bf)=>zf?Math.max(zf,Bf):Bf;F0=fz(i2,F0),F0=fz(ET,F0),F0=fz(ST,F0);const Kve=F0>-1?1:0;en.glyphOffsetArray.length>=Ag.MAX_GLYPHS&&ze("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),bo.sortKey!==void 0&&en.addToSortKeyRanges(en.symbolInstances.length,bo.sortKey),en.symbolInstances.emplaceBack(h1.x,h1.y,h1.z,zn.x,zn.y,kg.right>=0?kg.right:-1,kg.center>=0?kg.center:-1,kg.left>=0?kg.left:-1,kg.vertical>=0?kg.vertical:-1,az,lz,pq,Nl!==void 0?Nl:en.collisionBoxArray.length,Nl!==void 0?Nl+1:en.collisionBoxArray.length,$l!==void 0?$l:en.collisionBoxArray.length,$l!==void 0?$l+1:en.collisionBoxArray.length,xu!==void 0?xu:en.collisionBoxArray.length,xu!==void 0?xu+1:en.collisionBoxArray.length,pm||en.collisionBoxArray.length,pm?pm+1:en.collisionBoxArray.length,us,dq,hq,uq,fq,Kve,0,cz,uz,F0)})(f,Pn,vi,yn,d,g,S,Qr,f.layers[0],f.collisionBoxArray,c.index,c.sourceLayerIndex,f.index,Mt,Cr,Q,0,cr,Kr,Ne,c,M,te,ue,ge)};if(hr==="line")for(const yn of ck(c.geometry,0,0,$n,$n)){const Pn=MF(yn,Rt,sr,d.vertical||Qe,g,Ct,wt,f.overscaling,$n);for(const _n of Pn)Qe&&FF(f,Qe.text,Mr,_n)||_r(yn,_n,ge)}else if(hr==="line-center"){for(const yn of c.geometry)if(yn.length>1){const Pn=IF(yn,sr,d.vertical||Qe,g,Ct,wt);Pn&&_r(yn,Pn,ge)}}else if(c.type==="Polygon")for(const yn of XS(c.geometry,0)){const Pn=OF(yn,16);_r(yn[0],new dm(Pn.x,Pn.y,0,0,void 0),ge)}else if(c.type==="LineString")for(const yn of c.geometry)_r(yn,new dm(yn[0].x,yn[0].y,0,0,void 0),ge);else if(c.type==="Point")for(const yn of c.geometry)for(const Pn of yn)_r([Pn],new dm(Pn.x,Pn.y,0,0,void 0),ge)}const a1=255,Pg=a1*Nc;function hk(f,c,d,g,S,M,L,V,Q,te,ue,ge,_e,Me,Ae,Ne,Qe){const ft=function(wt,Rt,Mt,cr,sr,Cr,Kr,hr){const Mr=[];if(Rt.positionedLines.length===0)return Mr;const Ar=cr.layout.get("text-rotate").evaluate(Cr,{})*Math.PI/180,$r=function(_n){const vi=_n[0],en=_n[1],zn=vi*en;return zn>0?[vi,-en]:zn<0?[-vi,en]:vi===0?[en,vi]:[en,-vi]}(Mt);let Qr=Math.abs(Rt.top-Rt.bottom);for(const _n of Rt.positionedLines)Qr-=_n.lineOffset;const _r=Rt.positionedLines.length,yn=Qr/_r;let Pn=Rt.top-Mt[1];for(let _n=0;_n<_r;++_n){const vi=Rt.positionedLines[_n];Pn=AF(Rt,yn,Pn,_n);for(const en of vi.positionedGlyphs){if(!en.rect)continue;const zn=en.rect||{};let yi=Hw+1,vo=!0,xi=1,Jn=0;if(en.imageName){const ds=Kr[en.imageName];if(!ds)continue;if(ds.sdf){ze("SDF images are not supported in formatted text and will be ignored.");continue}vo=!1,xi=ds.pixelRatio,yi=Kl/xi}const gs=(sr||hr)&&en.vertical,wi=en.metrics.advance*en.scale/2,Ci=en.metrics,ns=en.rect;if(ns===null)continue;hr&&Rt.verticalizable&&(Jn=en.imageName?wi-en.metrics.width*en.scale/2:0);const us=sr?[en.x+wi,en.y]:[0,0];let fs=[0,0],is=[0,0],js=!1;sr||(gs?(is=[en.x+wi+$r[0],en.y+$r[1]-Jn],js=!0):fs=[en.x+wi+Mt[0],en.y+Mt[1]-Jn]);const da=ns.w*en.scale/(xi*(en.localGlyph?Fd:1)),ja=ns.h*en.scale/(xi*(en.localGlyph?Fd:1));let os,cl,Ua,Zs;if(gs){const ds=en.y-Pn,yu=new D(-wi,wi-ds),Ha=-Math.PI/2,Zl=new D(...is);os=new D(-wi+fs[0],fs[1]),os._rotateAround(Ha,yu)._add(Zl),os.x+=-ds+wi,os.y-=(Ci.left-yi)*en.scale;const Nl=en.imageName?Ci.advance*en.scale:al*en.scale,xu=String.fromCharCode(en.glyph);gF(xu)?os.x+=(1-yi)*en.scale:vF(xu)?os.x+=Nl-Ci.height*en.scale+(-yi-1)*en.scale:os.x+=en.imageName||Ci.width+2*yi===ns.w&&Ci.height+2*yi===ns.h?(Nl-ja)/2:(Nl-(Ci.height+2*yi)*en.scale)/2,cl=new D(os.x,os.y-da),Ua=new D(os.x+ja,os.y),Zs=new D(os.x+ja,os.y-da)}else{const ds=(Ci.left-yi)*en.scale-wi+fs[0],yu=(-Ci.top-yi)*en.scale+fs[1],Ha=ds+da,Zl=yu+ja;os=new D(ds,yu),cl=new D(Ha,yu),Ua=new D(ds,Zl),Zs=new D(Ha,Zl)}if(Ar){let ds;ds=sr?new D(0,0):js?new D($r[0],$r[1]):new D(Mt[0],Mt[1]),os._rotateAround(Ar,ds),cl._rotateAround(Ar,ds),Ua._rotateAround(Ar,ds),Zs._rotateAround(Ar,ds)}const bo=new D(0,0),Va=new D(0,0);Mr.push({tl:os,tr:cl,bl:Ua,br:Zs,tex:zn,writingMode:Rt.writingMode,glyphOffset:us,sectionIndex:en.sectionIndex,isSDF:vo,pixelOffsetTL:bo,pixelOffsetBR:Va,minFontScaleX:0,minFontScaleY:0})}}return Mr}(0,g,Q,M,L,V,S,f.allowVerticalPlacement),Ct=f.textSizeData;let dt=null;Ct.kind==="source"?(dt=[Nc*M.layout.get("text-size").evaluate(V,{},Qe)],dt[0]>Pg&&ze(`${f.layerIds[0]}: Value for "text-size" is >= ${a1}. Reduce your "text-size".`)):Ct.kind==="composite"&&(dt=[Nc*Ae.compositeTextSizes[0].evaluate(V,{},Qe),Nc*Ae.compositeTextSizes[1].evaluate(V,{},Qe)],(dt[0]>Pg||dt[1]>Pg)&&ze(`${f.layerIds[0]}: Value for "text-size" is >= ${a1}. Reduce your "text-size".`)),f.addSymbols(f.text,ft,dt,Q,L,V,ue,c,d,te.lineStartIndex,te.lineLength,Me,Ne,Qe);for(const wt of ge)_e[wt]=f.text.placedSymbolArray.length-1;return 4*ft.length}function Yw(f){for(const c in f)return f[c];return null}function l1(f,c,d,g,S,M,L,V,Q,te){let ue=L.top,ge=L.bottom,_e=L.left,Me=L.right;const Ae=L.collisionPadding;if(Ae&&(_e-=Ae[0],ue-=Ae[1],Me+=Ae[2],ge+=Ae[3]),Q){const Ne=new D(_e,ue),Qe=new D(Me,ue),ft=new D(_e,ge),Ct=new D(Me,ge),dt=j(Q);let wt=new D(0,0);te&&(wt=new D(te[0],te[1])),Ne._rotateAround(dt,wt),Qe._rotateAround(dt,wt),ft._rotateAround(dt,wt),Ct._rotateAround(dt,wt),_e=Math.min(Ne.x,Qe.x,ft.x,Ct.x),Me=Math.max(Ne.x,Qe.x,ft.x,Ct.x),ue=Math.min(Ne.y,Qe.y,ft.y,Ct.y),ge=Math.max(Ne.y,Qe.y,ft.y,Ct.y)}return f.emplaceBack(c.x,c.y,c.z,d.x,d.y,_e,ue,Me,ge,V,g,S,M),f.length-1}function Kw(f){f.collisionPadding&&(f.top-=f.collisionPadding[1],f.bottom+=f.collisionPadding[3]);const c=f.bottom-f.top;return c>0?Math.max(10,c):null}function FF(f,c,d,g){const S=f.compareText;if(c in S){const M=S[c];for(let L=M.length-1;L>=0;L--)if(g.dist(M[L])<d)return!0}else S[c]=[];return S[c].push(g),!1}function pk(f,c){const d=f.fovAboveCenter,g=f.elevation?f.elevation.getMinElevationBelowMSL()*c:0,S=(f._camera.position[2]*f.worldSize-g)/Math.cos(f._pitch),M=Math.sin(d)*S/Math.sin(Math.max(Math.PI/2-f._pitch-d,.01)),L=Math.sin(f._pitch)*M+S;return Math.min(1.01*L,S*(1/f._horizonShift))}function Qv(f,c){if(!c.isReprojectedInTileSpace)return{scale:1<<f.z,x:f.x,y:f.y,x2:f.x+1,y2:f.y+1,projection:c};const d=Math.pow(2,-f.z),g=f.x*d,S=(f.x+1)*d,M=f.y*d,L=(f.y+1)*d,V=Zu(g),Q=Zu(S),te=Rl(M),ue=Rl(L),ge=c.project(V,te),_e=c.project(Q,te),Me=c.project(Q,ue),Ae=c.project(V,ue);let Ne=Math.min(ge.x,_e.x,Me.x,Ae.x),Qe=Math.min(ge.y,_e.y,Me.y,Ae.y),ft=Math.max(ge.x,_e.x,Me.x,Ae.x),Ct=Math.max(ge.y,_e.y,Me.y,Ae.y);const dt=d/16;function wt(Mt,cr,sr,Cr,Kr,hr){const Mr=(sr+Kr)/2,Ar=(Cr+hr)/2,$r=c.project(Zu(Mr),Rl(Ar)),Qr=Math.max(0,Ne-$r.x,Qe-$r.y,$r.x-ft,$r.y-Ct);Ne=Math.min(Ne,$r.x),ft=Math.max(ft,$r.x),Qe=Math.min(Qe,$r.y),Ct=Math.max(Ct,$r.y),Qr>dt&&(wt(Mt,$r,sr,Cr,Mr,Ar),wt($r,cr,Mr,Ar,Kr,hr))}wt(ge,_e,g,M,S,M),wt(_e,Me,S,M,S,L),wt(Me,Ae,S,L,g,L),wt(Ae,ge,g,L,g,M),Ne-=dt,Qe-=dt,ft+=dt,Ct+=dt;const Rt=1/Math.max(ft-Ne,Ct-Qe);return{scale:Rt,x:Ne*Rt,y:Qe*Rt,x2:ft*Rt,y2:Ct*Rt,projection:c}}const pT=fu(new Float32Array(16));class Ig{constructor(c){this.spec=c,this.name=c.name,this.wrap=!1,this.requiresDraping=!1,this.supportsWorldCopies=!1,this.supportsTerrain=!1,this.supportsFog=!1,this.supportsFreeCamera=!1,this.zAxisUnit="meters",this.isReprojectedInTileSpace=!0,this.unsupportedLayers=["custom"],this.center=[0,0],this.range=[3.5,7]}project(c,d){return{x:0,y:0,z:0}}unproject(c,d){return new Wo(0,0)}projectTilePoint(c,d,g){return{x:c,y:d,z:0}}locationPoint(c,d,g=!0){return c._coordinatePoint(c.locationCoordinate(d),g)}pixelsPerMeter(c,d){return Dd(1,c)*d}pixelSpaceConversion(c,d,g){return 1}farthestPixelDistance(c){return pk(c,c.pixelsPerMeter)}pointCoordinate(c,d,g,S){const M=c.horizonLineFromTop(!1),L=new D(d,Math.max(M,g));return c.rayIntersectionCoordinate(c.pointRayIntersection(L,S))}pointCoordinate3D(c,d,g){const S=new D(d,g);if(c.elevation)return c.elevation.pointCoordinate(S);{const M=this.pointCoordinate(c,S.x,S.y,0);return[M.x,M.y,M.z]}}isPointAboveHorizon(c,d){if(c.elevation)return!this.pointCoordinate3D(c,d.x,d.y);const g=c.horizonLineFromTop();return d.y<g}createInversionMatrix(c,d){return pT}createTileMatrix(c,d,g){let S,M,L;const V=g.canonical,Q=fu(new Float64Array(16));if(this.isReprojectedInTileSpace){const te=Qv(V,this);S=1,M=te.x+g.wrap*te.scale,L=te.y,Nv(Q,Q,[S/te.scale,S/te.scale,c.pixelsPerMeter/d])}else S=d/c.zoomScale(V.z),M=(V.x+Math.pow(2,V.z)*g.wrap)*S,L=V.y*S;return b0(Q,Q,[M,L,0]),Nv(Q,Q,[S/$n,S/$n,1]),Q}upVector(c,d,g){return[0,0,1]}upVectorScale(c,d,g){return{metersToTile:1}}}class zF extends Ig{constructor(c){super(c),this.range=[4,7],this.center=c.center||[-96,37.5];const[d,g]=this.parallels=c.parallels||[29.5,45.5],S=Math.sin(j(d));this.n=(S+Math.sin(j(g)))/2,this.c=1+S*(2*this.n-S),this.r0=Math.sqrt(this.c)/this.n}project(c,d){const{n:g,c:S,r0:M}=this,L=j(c-this.center[0]),V=j(d),Q=Math.sqrt(S-2*g*Math.sin(V))/g;return{x:Q*Math.sin(L*g),y:Q*Math.cos(L*g)-M,z:0}}unproject(c,d){const{n:g,c:S,r0:M}=this,L=M+d;let V=Math.atan2(c,Math.abs(L))*Math.sign(L);L*g<0&&(V-=Math.PI*Math.sign(c)*Math.sign(L));const Q=j(this.center[0])*g;V=re(V,-Math.PI-Q,Math.PI-Q);const te=q($(V/g)+this.center[0],-180,180),ue=Math.asin(q((S-(c*c+L*L)*g*g)/(2*g),-1,1)),ge=q($(ue),-kl,kl);return new Wo(te,ge)}}const c1=1.340264,Dl=-.081106,Jv=893e-6,u1=.003796,Zw=Math.sqrt(3)/2;class BF extends Ig{project(c,d){d=d/180*Math.PI,c=c/180*Math.PI;const g=Math.asin(Zw*Math.sin(d)),S=g*g,M=S*S*S;return{x:.5*(c*Math.cos(g)/(Zw*(c1+3*Dl*S+M*(7*Jv+9*u1*S)))/Math.PI+.5),y:1-.5*(g*(c1+Dl*S+M*(Jv+u1*S))/Math.PI+1),z:0}}unproject(c,d){c=(2*c-.5)*Math.PI;let g=d=(2*(1-d)-1)*Math.PI,S=g*g,M=S*S*S;for(let ue,ge,_e,Me=0;Me<12&&(ge=g*(c1+Dl*S+M*(Jv+u1*S))-d,_e=c1+3*Dl*S+M*(7*Jv+9*u1*S),ue=ge/_e,g=q(g-ue,-Math.PI/3,Math.PI/3),S=g*g,M=S*S*S,!(Math.abs(ue)<1e-12));++Me);const L=Zw*c*(c1+3*Dl*S+M*(7*Jv+9*u1*S))/Math.cos(g),V=Math.asin(Math.sin(g)/Zw),Q=q(180*L/Math.PI,-180,180),te=q(180*V/Math.PI,-kl,kl);return new Wo(Q,te)}}class jF extends Ig{constructor(c){super(c),this.wrap=!0,this.supportsWorldCopies=!0}project(c,d){return{x:.5+c/360,y:.5-d/360,z:0}}unproject(c,d){const g=360*(c-.5),S=q(360*(.5-d),-kl,kl);return new Wo(g,S)}}const Mg=Math.PI/2;function Qw(f){return Math.tan((Mg+f)/2)}class mT extends Ig{constructor(c){super(c),this.center=c.center||[0,30];const[d,g]=this.parallels=c.parallels||[30,30];let S=j(d),M=j(g);this.southernCenter=S+M<0,this.southernCenter&&(S=-S,M=-M);const L=Math.cos(S),V=Qw(S);this.n=S===M?Math.sin(S):Math.log(L/Math.cos(M))/Math.log(Qw(M)/V),this.f=L*Math.pow(Qw(S),this.n)/this.n}project(c,d){d=j(d),this.southernCenter&&(d=-d),c=j(c-this.center[0]);const g=1e-6,{n:S,f:M}=this;M>0?d<-Mg+g&&(d=-Mg+g):d>Mg-g&&(d=Mg-g);const L=M/Math.pow(Qw(d),S);let V=L*Math.sin(S*c),Q=M-L*Math.cos(S*c);return V=.5*(V/Math.PI+.5),Q=.5*(Q/Math.PI+.5),{x:V,y:this.southernCenter?Q:1-Q,z:0}}unproject(c,d){c=(2*c-.5)*Math.PI,this.southernCenter&&(d=1-d),d=(2*(1-d)-.5)*Math.PI;const{n:g,f:S}=this,M=S-d,L=Math.sign(M),V=Math.sign(g)*Math.sqrt(c*c+M*M);let Q=Math.atan2(c,Math.abs(M))*L;M*g<0&&(Q-=Math.PI*Math.sign(c)*L);const te=q($(Q/g)+this.center[0],-180,180),ue=q($(2*Math.atan(Math.pow(S/V,1/g))-Mg),-kl,kl);return new Wo(te,this.southernCenter?-ue:ue)}}class mk extends Ig{constructor(c){super(c),this.wrap=!0,this.supportsWorldCopies=!0,this.supportsTerrain=!0,this.supportsFog=!0,this.supportsFreeCamera=!0,this.isReprojectedInTileSpace=!1,this.unsupportedLayers=[],this.range=null}project(c,d){return{x:Bh(c),y:jh(d),z:0}}unproject(c,d){const g=Zu(c),S=Rl(d);return new Wo(g,S)}}const gk=j(kl);class UF extends Ig{project(c,d){const g=(d=j(d))*d,S=g*g;return{x:.5*((c=j(c))*(.8707-.131979*g+S*(S*(.003971*g-.001529*S)-.013791))/Math.PI+.5),y:1-.5*(d*(1.007226+g*(.015085+S*(.028874*g-.044475-.005916*S)))/Math.PI+1),z:0}}unproject(c,d){c=(2*c-.5)*Math.PI;let g=d=(2*(1-d)-1)*Math.PI,S=25,M=0,L=g*g;do{L=g*g;const te=L*L;M=(g*(1.007226+L*(.015085+te*(.028874*L-.044475-.005916*te)))-d)/(1.007226+L*(.045255+te*(.259866*L-.311325-.005916*11*te))),g=q(g-M,-gk,gk)}while(Math.abs(M)>1e-6&&--S>0);L=g*g;const V=q($(c/(.8707+L*(L*(L*L*L*(.003971-.001529*L)-.013791)-.131979))),-180,180),Q=$(g);return new Wo(V,Q)}}const vk=j(kl);class yk extends Ig{project(c,d){d=j(d),c=j(c);const g=Math.cos(d),S=2/Math.PI,M=Math.acos(g*Math.cos(c/2)),L=Math.sin(M)/M,V=.5*(c*S+2*g*Math.sin(c/2)/L)||0,Q=.5*(d+Math.sin(d)/L)||0;return{x:.5*(V/Math.PI+.5),y:1-.5*(Q/Math.PI+1),z:0}}unproject(c,d){let g=c=(2*c-.5)*Math.PI,S=d=(2*(1-d)-1)*Math.PI,M=25;const L=1e-6;let V=0,Q=0;do{const te=Math.cos(S),ue=Math.sin(S),ge=2*ue*te,_e=ue*ue,Me=te*te,Ae=Math.cos(g/2),Ne=Math.sin(g/2),Qe=2*Ae*Ne,ft=Ne*Ne,Ct=1-Me*Ae*Ae,dt=Ct?1/Ct:0,wt=Ct?Math.acos(te*Ae)*Math.sqrt(1/Ct):0,Rt=.5*(2*wt*te*Ne+2*g/Math.PI)-c,Mt=.5*(wt*ue+S)-d,cr=.5*dt*(Me*ft+wt*te*Ae*_e)+1/Math.PI,sr=dt*(Qe*ge/4-wt*ue*Ne),Cr=.125*dt*(ge*Ne-wt*ue*Me*Qe),Kr=.5*dt*(_e*Ae+wt*ft*te)+.5,hr=sr*Cr-Kr*cr;V=(Mt*sr-Rt*Kr)/hr,Q=(Rt*Cr-Mt*cr)/hr,g=q(g-V,-Math.PI,Math.PI),S=q(S-Q,-vk,vk)}while((Math.abs(V)>L||Math.abs(Q)>L)&&--M>0);return new Wo($(g),$(S))}}class xk extends Ig{constructor(c){super(c),this.center=c.center||[0,0],this.parallels=c.parallels||[0,0],this.cosPhi=Math.max(.01,Math.cos(j(this.parallels[0]))),this.scale=1/(2*Math.max(Math.PI*this.cosPhi,1/this.cosPhi)),this.wrap=!0,this.supportsWorldCopies=!0}project(c,d){const{scale:g,cosPhi:S}=this;return{x:j(c)*S*g+.5,y:-Math.sin(j(d))/S*g+.5,z:0}}unproject(c,d){const{scale:g,cosPhi:S}=this,M=-(d-.5)/g,L=q($((c-.5)/g)/S,-180,180),V=Math.asin(q(M*S,-1,1)),Q=q($(V),-kl,kl);return new Wo(L,Q)}}class VF extends mk{constructor(c){super(c),this.requiresDraping=!0,this.supportsWorldCopies=!1,this.supportsFog=!0,this.zAxisUnit="pixels",this.unsupportedLayers=["debug"],this.range=[3,5]}projectTilePoint(c,d,g){const S=Y_(c,d,g);return Bs(S,S,lm(hu(g))),{x:S[0],y:S[1],z:S[2]}}locationPoint(c,d){const g=Uv(d.lat,d.lng),S=pc([],g),M=c.elevation?c.elevation.getAtPointOrZero(c.locationCoordinate(d),c._centerAltitude):c._centerAltitude;$v(g,g,S,Dd(1,0)*$n*M);const L=fu(new Float64Array(16));return _g(L,c.pixelMatrix,c.globeMatrix),Bs(g,g,L),new D(g[0],g[1])}pixelsPerMeter(c,d){return Dd(1,0)*d}pixelSpaceConversion(c,d,g){const S=Dd(1,c)*d,M=Ii(Dd(1,45)*d,S,g);return this.pixelsPerMeter(c,d)/M}createTileMatrix(c,d,g){const S=K_(hu(g.canonical));return _g(new Float64Array(16),c.globeMatrix,S)}createInversionMatrix(c,d){const{center:g}=c,S=lm(hu(d));return om(S,S,j(g.lng)),cw(S,S,j(g.lat)),Nv(S,S,[c._pixelsPerMercatorPixel,c._pixelsPerMercatorPixel,1]),Float32Array.from(S)}pointCoordinate(c,d,g,S){return vw(c,d,g,!0)||new Wv(0,0)}pointCoordinate3D(c,d,g){const S=this.pointCoordinate(c,d,g,0);return[S.x,S.y,S.z]}isPointAboveHorizon(c,d){return!vw(c,d.x,d.y,!1)}farthestPixelDistance(c){const d=function(S,M){const L=S.cameraToCenterDistance,V=S._centerAltitude*M,Q=S._camera,te=S._camera.forward(),ue=Rd([],du([],te,-L),[0,0,V]),ge=S.worldSize/(2*Math.PI),_e=[0,0,-ge],Me=S.width/S.height,Ae=Math.tan(S.fovAboveCenter),Ne=du([],Q.up(),Ae),Qe=du([],Q.right(),Ae*Me),ft=pc([],Rd([],Rd([],te,Ne),Qe)),Ct=[];let dt;if(new pw(ue,ft).closestPointOnSphere(_e,ge,Ct)){const wt=Rd([],Ct,_e),Rt=Nf([],wt,ue);dt=Math.cos(S.fovAboveCenter)*C0(Rt)}else{const wt=Nf([],ue,_e),Rt=Nf([],_e,ue);pc(Rt,Rt);const Mt=C0(wt)-ge;dt=Math.sqrt(Mt*(Mt+2*ge));const cr=Math.acos(dt/(ge+Mt))-Math.acos(Ku(te,Rt));dt*=Math.cos(cr)}return 1.01*dt}(c,this.pixelsPerMeter(c.center.lat,c.worldSize)),g=Vv(c.zoom);if(g>0){const S=pk(c,Dd(1,c.center.lat)*c.worldSize),M=c.worldSize/(2*Math.PI),L=Math.max(c.width,c.height)/c.worldSize*Math.PI;return Ii(d,S+M*(1-Math.cos(L)),Math.pow(g,10))}return d}upVector(c,d,g){return Y_(d,g,c,1)}upVectorScale(c){return{metersToTile:gw(T0(hu(c)))}}}function _k(f){const c=f.parallels,d=!!c&&Math.abs(c[0]+c[1])<.01;switch(f.name){case"mercator":return new mk(f);case"equirectangular":return new jF(f);case"naturalEarth":return new UF(f);case"equalEarth":return new BF(f);case"winkelTripel":return new yk(f);case"albers":return d?new xk(f):new zF(f);case"lambertConformalConic":return d?new xk(f):new mT(f);case"globe":return new VF(f)}throw new Error(`Invalid projection name: ${f.name}`)}const gT=$w.types,vT=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}];function Jw(f,c,d,g,S,M,L,V,Q,te,ue,ge,_e){const Me=V?Math.min(Pg,Math.round(V[0])):0,Ae=V?Math.min(Pg,Math.round(V[1])):0;f.emplaceBack(c,d,Math.round(32*g),Math.round(32*S),M,L,(Me<<1)+(Q?1:0),Ae,16*te,16*ue,256*ge,256*_e)}function e2(f,c,d,g,S,M,L){f.emplaceBack(c,d,g,S,M,L)}function t2(f,c,d,g,S){f.emplaceBack(c,d,g,S),f.emplaceBack(c,d,g,S),f.emplaceBack(c,d,g,S),f.emplaceBack(c,d,g,S)}function HF(f){for(const c of f.sections)if(wS(c.text))return!0;return!1}class yT{constructor(c){this.layoutVertexArray=new Rr,this.indexArray=new An,this.programConfigurations=c,this.segments=new la,this.dynamicLayoutVertexArray=new jr,this.opacityVertexArray=new Nn,this.placedSymbolArray=new aa,this.globeExtVertexArray=new Yr}isEmpty(){return this.layoutVertexArray.length===0&&this.indexArray.length===0&&this.dynamicLayoutVertexArray.length===0&&this.opacityVertexArray.length===0}upload(c,d,g,S){this.isEmpty()||(g&&(this.layoutVertexBuffer=c.createVertexBuffer(this.layoutVertexArray,HR.members),this.indexBuffer=c.createIndexBuffer(this.indexArray,d),this.dynamicLayoutVertexBuffer=c.createVertexBuffer(this.dynamicLayoutVertexArray,dF.members,!0),this.opacityVertexBuffer=c.createVertexBuffer(this.opacityVertexArray,vT,!0),this.globeExtVertexArray.length>0&&(this.globeExtVertexBuffer=c.createVertexBuffer(this.globeExtVertexArray,fF.members,!0)),this.opacityVertexBuffer.itemSize=1),(g||S)&&this.programConfigurations.upload(c))}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.dynamicLayoutVertexBuffer.destroy(),this.opacityVertexBuffer.destroy(),this.globeExtVertexBuffer&&this.globeExtVertexBuffer.destroy())}}Sn(yT,"SymbolBuffers");class xT{constructor(c,d,g){this.layoutVertexArray=new c,this.layoutAttributes=d,this.indexArray=new g,this.segments=new la,this.collisionVertexArray=new Ri,this.collisionVertexArrayExt=new bi}upload(c){this.layoutVertexBuffer=c.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=c.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=c.createVertexBuffer(this.collisionVertexArray,hF.members,!0),this.collisionVertexBufferExt=c.createVertexBuffer(this.collisionVertexArrayExt,pF.members,!0)}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy(),this.collisionVertexBufferExt.destroy())}}Sn(xT,"CollisionBuffers");class Ag{constructor(c){this.collisionBoxArray=c.collisionBoxArray,this.zoom=c.zoom,this.overscaling=c.overscaling,this.layers=c.layers,this.layerIds=this.layers.map(L=>L.id),this.index=c.index,this.pixelRatio=c.pixelRatio,this.sourceLayerIndex=c.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.fullyClipped=!1,this.sortKeyRanges=[],this.collisionCircleArray=[],this.placementInvProjMatrix=fu([]),this.placementViewportMatrix=fu([]);const d=this.layers[0]._unevaluatedLayout._values;this.textSizeData=o1(this.zoom,d["text-size"]),this.iconSizeData=o1(this.zoom,d["icon-size"]);const g=this.layers[0].layout,S=g.get("symbol-sort-key"),M=g.get("symbol-z-order");this.canOverlap=g.get("text-allow-overlap")||g.get("icon-allow-overlap")||g.get("text-ignore-placement")||g.get("icon-ignore-placement"),this.sortFeaturesByKey=M!=="viewport-y"&&S.constantOr(1)!==void 0,this.sortFeaturesByY=(M==="viewport-y"||M==="auto"&&!this.sortFeaturesByKey)&&this.canOverlap,this.writingModes=g.get("text-writing-mode").map(L=>Ju[L]),this.stateDependentLayerIds=this.layers.filter(L=>L.isStateDependent()).map(L=>L.id),this.sourceID=c.sourceID,this.projection=c.projection}createArrays(){this.text=new yT(new Dv(this.layers,this.zoom,c=>/^text/.test(c))),this.icon=new yT(new Dv(this.layers,this.zoom,c=>/^icon/.test(c))),this.glyphOffsetArray=new hc,this.lineVertexArray=new Ov,this.symbolInstances=new ts}calculateGlyphDependencies(c,d,g,S,M){for(let L=0;L<c.length;L++)if(d[c.charCodeAt(L)]=!0,S&&M){const V=Vh[c.charAt(L)];V&&(d[V.charCodeAt(0)]=!0)}}populate(c,d,g,S){const M=this.layers[0],L=M.layout,V=this.projection.name==="globe",Q=L.get("text-font"),te=L.get("text-field"),ue=L.get("icon-image"),ge=(te.value.kind!=="constant"||te.value.value instanceof ci&&!te.value.value.isEmpty()||te.value.value.toString().length>0)&&(Q.value.kind!=="constant"||Q.value.value.length>0),_e=ue.value.kind!=="constant"||!!ue.value.value||Object.keys(ue.parameters).length>0,Me=L.get("symbol-sort-key");if(this.features=[],!ge&&!_e)return;const Ae=d.iconDependencies,Ne=d.glyphDependencies,Qe=d.availableImages,ft=new he(this.zoom);for(const{feature:Ct,id:dt,index:wt,sourceLayerIndex:Rt}of c){const Mt=M._featureFilter.needGeometry,cr=Gv(Ct,Mt);if(!M._featureFilter.filter(ft,cr,g))continue;if(Mt||(cr.geometry=cm(Ct,g,S)),V&&Ct.type!==1&&g.z<=5){const hr=cr.geometry,Mr=.98078528056,Ar=($r,Qr)=>Ku(Y_($r.x,$r.y,g,1),Y_(Qr.x,Qr.y,g,1))<Mr;for(let $r=0;$r<hr.length;$r++)hr[$r]=I4(hr[$r],Ar)}let sr,Cr;if(ge){const hr=M.getValueAndResolveTokens("text-field",cr,g,Qe),Mr=ci.factory(hr);HF(Mr)&&(this.hasRTLText=!0),(!this.hasRTLText||K()==="unavailable"||this.hasRTLText&&ae.isParsed())&&(sr=Qu(Mr,M,cr))}if(_e){const hr=M.getValueAndResolveTokens("icon-image",cr,g,Qe);Cr=hr instanceof fi?hr:fi.fromString(hr)}if(!sr&&!Cr)continue;const Kr=this.sortFeaturesByKey?Me.evaluate(cr,{},g):void 0;if(this.features.push({id:dt,text:sr,icon:Cr,index:wt,sourceLayerIndex:Rt,geometry:cr.geometry,properties:Ct.properties,type:gT[Ct.type],sortKey:Kr}),Cr&&(Ae[Cr.name]=!0),sr){const hr=Q.evaluate(cr,{},g).join(","),Mr=L.get("text-rotation-alignment")==="map"&&L.get("symbol-placement")!=="point";this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(Ju.vertical)>=0;for(const Ar of sr.sections)if(Ar.image)Ae[Ar.image.name]=!0;else{const $r=B_(sr.toString()),Qr=Ar.fontStack||hr,_r=Ne[Qr]=Ne[Qr]||{};this.calculateGlyphDependencies(Ar.text,_r,Mr,this.allowVerticalPlacement,$r)}}}L.get("symbol-placement")==="line"&&(this.features=function(Ct){const dt={},wt={},Rt=[];let Mt=0;function cr(hr){Rt.push(Ct[hr]),Mt++}function sr(hr,Mr,Ar){const $r=wt[hr];return delete wt[hr],wt[Mr]=$r,Rt[$r].geometry[0].pop(),Rt[$r].geometry[0]=Rt[$r].geometry[0].concat(Ar[0]),$r}function Cr(hr,Mr,Ar){const $r=dt[Mr];return delete dt[Mr],dt[hr]=$r,Rt[$r].geometry[0].shift(),Rt[$r].geometry[0]=Ar[0].concat(Rt[$r].geometry[0]),$r}function Kr(hr,Mr,Ar){const $r=Ar?Mr[0][Mr[0].length-1]:Mr[0][0];return`${hr}:${$r.x}:${$r.y}`}for(let hr=0;hr<Ct.length;hr++){const Mr=Ct[hr],Ar=Mr.geometry,$r=Mr.text?Mr.text.toString():null;if(!$r){cr(hr);continue}const Qr=Kr($r,Ar),_r=Kr($r,Ar,!0);if(Qr in wt&&_r in dt&&wt[Qr]!==dt[_r]){const yn=Cr(Qr,_r,Ar),Pn=sr(Qr,_r,Rt[yn].geometry);delete dt[Qr],delete wt[_r],wt[Kr($r,Rt[Pn].geometry,!0)]=Pn,Rt[yn].geometry=null}else Qr in wt?sr(Qr,_r,Ar):_r in dt?Cr(Qr,_r,Ar):(cr(hr),dt[Qr]=Mt-1,wt[_r]=Mt-1)}return Rt.filter(hr=>hr.geometry)}(this.features)),this.sortFeaturesByKey&&this.features.sort((Ct,dt)=>Ct.sortKey-dt.sortKey)}update(c,d,g,S){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(c,d,this.layers,g,S),this.icon.programConfigurations.updatePaintArrays(c,d,this.layers,g,S))}isEmpty(){return this.symbolInstances.length===0&&!this.hasRTLText}uploadPending(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload}upload(c){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(c),this.iconCollisionBox.upload(c)),this.text.upload(c,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(c,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0}destroyDebugData(){this.textCollisionBox.destroy(),this.iconCollisionBox.destroy()}getProjection(){return this.projectionInstance||(this.projectionInstance=_k(this.projection)),this.projectionInstance}destroy(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData()}addToLineVertexArray(c,d){const g=this.lineVertexArray.length;if(c.segment!==void 0)for(const{x:S,y:M}of d)this.lineVertexArray.emplaceBack(S,M);return{lineStartIndex:g,lineLength:this.lineVertexArray.length-g}}addSymbols(c,d,g,S,M,L,V,Q,te,ue,ge,_e,Me,Ae){const Ne=c.indexArray,Qe=c.layoutVertexArray,ft=c.globeExtVertexArray,Ct=c.segments.prepareSegment(4*d.length,Qe,Ne,this.canOverlap?L.sortKey:void 0),dt=this.glyphOffsetArray.length,wt=Ct.vertexLength,Rt=this.allowVerticalPlacement&&V===Ju.vertical?Math.PI/2:0,Mt=L.text&&L.text.sections;for(let sr=0;sr<d.length;sr++){const{tl:Cr,tr:Kr,bl:hr,br:Mr,tex:Ar,pixelOffsetTL:$r,pixelOffsetBR:Qr,minFontScaleX:_r,minFontScaleY:yn,glyphOffset:Pn,isSDF:_n,sectionIndex:vi}=d[sr],en=Ct.vertexLength,zn=Pn[1];if(Jw(Qe,te.x,te.y,Cr.x,zn+Cr.y,Ar.x,Ar.y,g,_n,$r.x,$r.y,_r,yn),Jw(Qe,te.x,te.y,Kr.x,zn+Kr.y,Ar.x+Ar.w,Ar.y,g,_n,Qr.x,$r.y,_r,yn),Jw(Qe,te.x,te.y,hr.x,zn+hr.y,Ar.x,Ar.y+Ar.h,g,_n,$r.x,Qr.y,_r,yn),Jw(Qe,te.x,te.y,Mr.x,zn+Mr.y,Ar.x+Ar.w,Ar.y+Ar.h,g,_n,Qr.x,Qr.y,_r,yn),Q){const{x:yi,y:vo,z:xi}=Q.anchor,[Jn,gs,wi]=Q.up;e2(ft,yi,vo,xi,Jn,gs,wi),e2(ft,yi,vo,xi,Jn,gs,wi),e2(ft,yi,vo,xi,Jn,gs,wi),e2(ft,yi,vo,xi,Jn,gs,wi),t2(c.dynamicLayoutVertexArray,yi,vo,xi,Rt)}else t2(c.dynamicLayoutVertexArray,te.x,te.y,te.z,Rt);Ne.emplaceBack(en,en+1,en+2),Ne.emplaceBack(en+1,en+2,en+3),Ct.vertexLength+=4,Ct.primitiveLength+=2,this.glyphOffsetArray.emplaceBack(Pn[0]),sr!==d.length-1&&vi===d[sr+1].sectionIndex||c.programConfigurations.populatePaintArrays(Qe.length,L,L.index,{},Me,Ae,Mt&&Mt[vi])}const cr=Q?Q.anchor:te;c.placedSymbolArray.emplaceBack(cr.x,cr.y,cr.z,te.x,te.y,dt,this.glyphOffsetArray.length-dt,wt,ue,ge,te.segment,g?g[0]:0,g?g[1]:0,S[0],S[1],V,0,!1,0,_e,0)}_commitLayoutVertex(c,d,g,S,M,L,V){c.emplaceBack(d,g,S,M,L,Math.round(V.x),Math.round(V.y))}_addCollisionDebugVertices(c,d,g,S,M,L,V){const Q=g.segments.prepareSegment(4,g.layoutVertexArray,g.indexArray),te=Q.vertexLength,ue=V.tileAnchorX,ge=V.tileAnchorY;for(let Me=0;Me<4;Me++)g.collisionVertexArray.emplaceBack(0,0,0,0);g.collisionVertexArrayExt.emplaceBack(d,-c.padding,-c.padding),g.collisionVertexArrayExt.emplaceBack(d,c.padding,-c.padding),g.collisionVertexArrayExt.emplaceBack(d,c.padding,c.padding),g.collisionVertexArrayExt.emplaceBack(d,-c.padding,c.padding),this._commitLayoutVertex(g.layoutVertexArray,S,M,L,ue,ge,new D(c.x1,c.y1)),this._commitLayoutVertex(g.layoutVertexArray,S,M,L,ue,ge,new D(c.x2,c.y1)),this._commitLayoutVertex(g.layoutVertexArray,S,M,L,ue,ge,new D(c.x2,c.y2)),this._commitLayoutVertex(g.layoutVertexArray,S,M,L,ue,ge,new D(c.x1,c.y2)),Q.vertexLength+=4;const _e=g.indexArray;_e.emplaceBack(te,te+1),_e.emplaceBack(te+1,te+2),_e.emplaceBack(te+2,te+3),_e.emplaceBack(te+3,te),Q.primitiveLength+=4}_addTextDebugCollisionBoxes(c,d,g,S,M,L){for(let V=S;V<M;V++){const Q=g.get(V),te=this.getSymbolInstanceTextSize(c,L,d,V);this._addCollisionDebugVertices(Q,te,this.textCollisionBox,Q.projectedAnchorX,Q.projectedAnchorY,Q.projectedAnchorZ,L)}}_addIconDebugCollisionBoxes(c,d,g,S,M,L){for(let V=S;V<M;V++){const Q=g.get(V),te=this.getSymbolInstanceIconSize(c,d,L.placedIconSymbolIndex);this._addCollisionDebugVertices(Q,te,this.iconCollisionBox,Q.projectedAnchorX,Q.projectedAnchorY,Q.projectedAnchorZ,L)}}generateCollisionDebugBuffers(c,d){this.hasDebugData()&&this.destroyDebugData(),this.textCollisionBox=new xT(Cn,WR.members,ol),this.iconCollisionBox=new xT(Cn,WR.members,ol);const g=Yv(this.iconSizeData,c),S=Yv(this.textSizeData,c);for(let M=0;M<this.symbolInstances.length;M++){const L=this.symbolInstances.get(M);this._addTextDebugCollisionBoxes(S,c,d,L.textBoxStartIndex,L.textBoxEndIndex,L),this._addTextDebugCollisionBoxes(S,c,d,L.verticalTextBoxStartIndex,L.verticalTextBoxEndIndex,L),this._addIconDebugCollisionBoxes(g,c,d,L.iconBoxStartIndex,L.iconBoxEndIndex,L),this._addIconDebugCollisionBoxes(g,c,d,L.verticalIconBoxStartIndex,L.verticalIconBoxEndIndex,L)}}getSymbolInstanceTextSize(c,d,g,S){const M=this.text.placedSymbolArray.get(d.rightJustifiedTextSymbolIndex>=0?d.rightJustifiedTextSymbolIndex:d.centerJustifiedTextSymbolIndex>=0?d.centerJustifiedTextSymbolIndex:d.leftJustifiedTextSymbolIndex>=0?d.leftJustifiedTextSymbolIndex:d.verticalPlacedTextSymbolIndex>=0?d.verticalPlacedTextSymbolIndex:S),L=zw(this.textSizeData,c,M)/al;return this.tilePixelRatio*L}getSymbolInstanceIconSize(c,d,g){const S=this.icon.placedSymbolArray.get(g),M=zw(this.iconSizeData,c,S);return this.tilePixelRatio*M}_commitDebugCollisionVertexUpdate(c,d,g){c.emplaceBack(d,-g,-g),c.emplaceBack(d,g,-g),c.emplaceBack(d,g,g),c.emplaceBack(d,-g,g)}_updateTextDebugCollisionBoxes(c,d,g,S,M,L){for(let V=S;V<M;V++){const Q=g.get(V),te=this.getSymbolInstanceTextSize(c,L,d,V);this._commitDebugCollisionVertexUpdate(this.textCollisionBox.collisionVertexArrayExt,te,Q.padding)}}_updateIconDebugCollisionBoxes(c,d,g,S,M,L){for(let V=S;V<M;V++){const Q=g.get(V),te=this.getSymbolInstanceIconSize(c,d,L);this._commitDebugCollisionVertexUpdate(this.iconCollisionBox.collisionVertexArrayExt,te,Q.padding)}}updateCollisionDebugBuffers(c,d){if(!this.hasDebugData())return;this.hasTextCollisionBoxData()&&this.textCollisionBox.collisionVertexArrayExt.clear(),this.hasIconCollisionBoxData()&&this.iconCollisionBox.collisionVertexArrayExt.clear();const g=Yv(this.iconSizeData,c),S=Yv(this.textSizeData,c);for(let M=0;M<this.symbolInstances.length;M++){const L=this.symbolInstances.get(M);this._updateTextDebugCollisionBoxes(S,c,d,L.textBoxStartIndex,L.textBoxEndIndex,L),this._updateTextDebugCollisionBoxes(S,c,d,L.verticalTextBoxStartIndex,L.verticalTextBoxEndIndex,L),this._updateIconDebugCollisionBoxes(g,c,d,L.iconBoxStartIndex,L.iconBoxEndIndex,L.placedIconSymbolIndex),this._updateIconDebugCollisionBoxes(g,c,d,L.verticalIconBoxStartIndex,L.verticalIconBoxEndIndex,L.placedIconSymbolIndex)}this.hasTextCollisionBoxData()&&this.textCollisionBox.collisionVertexBufferExt&&this.textCollisionBox.collisionVertexBufferExt.updateData(this.textCollisionBox.collisionVertexArrayExt),this.hasIconCollisionBoxData()&&this.iconCollisionBox.collisionVertexBufferExt&&this.iconCollisionBox.collisionVertexBufferExt.updateData(this.iconCollisionBox.collisionVertexArrayExt)}_deserializeCollisionBoxesForSymbol(c,d,g,S,M,L,V,Q,te){const ue={};if(d<g){const{x1:ge,y1:_e,x2:Me,y2:Ae,padding:Ne,projectedAnchorX:Qe,projectedAnchorY:ft,projectedAnchorZ:Ct,tileAnchorX:dt,tileAnchorY:wt,featureIndex:Rt}=c.get(d);ue.textBox={x1:ge,y1:_e,x2:Me,y2:Ae,padding:Ne,projectedAnchorX:Qe,projectedAnchorY:ft,projectedAnchorZ:Ct,tileAnchorX:dt,tileAnchorY:wt},ue.textFeatureIndex=Rt}if(S<M){const{x1:ge,y1:_e,x2:Me,y2:Ae,padding:Ne,projectedAnchorX:Qe,projectedAnchorY:ft,projectedAnchorZ:Ct,tileAnchorX:dt,tileAnchorY:wt,featureIndex:Rt}=c.get(S);ue.verticalTextBox={x1:ge,y1:_e,x2:Me,y2:Ae,padding:Ne,projectedAnchorX:Qe,projectedAnchorY:ft,projectedAnchorZ:Ct,tileAnchorX:dt,tileAnchorY:wt},ue.verticalTextFeatureIndex=Rt}if(L<V){const{x1:ge,y1:_e,x2:Me,y2:Ae,padding:Ne,projectedAnchorX:Qe,projectedAnchorY:ft,projectedAnchorZ:Ct,tileAnchorX:dt,tileAnchorY:wt,featureIndex:Rt}=c.get(L);ue.iconBox={x1:ge,y1:_e,x2:Me,y2:Ae,padding:Ne,projectedAnchorX:Qe,projectedAnchorY:ft,projectedAnchorZ:Ct,tileAnchorX:dt,tileAnchorY:wt},ue.iconFeatureIndex=Rt}if(Q<te){const{x1:ge,y1:_e,x2:Me,y2:Ae,padding:Ne,projectedAnchorX:Qe,projectedAnchorY:ft,projectedAnchorZ:Ct,tileAnchorX:dt,tileAnchorY:wt,featureIndex:Rt}=c.get(Q);ue.verticalIconBox={x1:ge,y1:_e,x2:Me,y2:Ae,padding:Ne,projectedAnchorX:Qe,projectedAnchorY:ft,projectedAnchorZ:Ct,tileAnchorX:dt,tileAnchorY:wt},ue.verticalIconFeatureIndex=Rt}return ue}deserializeCollisionBoxes(c){this.collisionArrays=[];for(let d=0;d<this.symbolInstances.length;d++){const g=this.symbolInstances.get(d);this.collisionArrays.push(this._deserializeCollisionBoxesForSymbol(c,g.textBoxStartIndex,g.textBoxEndIndex,g.verticalTextBoxStartIndex,g.verticalTextBoxEndIndex,g.iconBoxStartIndex,g.iconBoxEndIndex,g.verticalIconBoxStartIndex,g.verticalIconBoxEndIndex))}}hasTextData(){return this.text.segments.get().length>0}hasIconData(){return this.icon.segments.get().length>0}hasDebugData(){return this.textCollisionBox&&this.iconCollisionBox}hasTextCollisionBoxData(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0}hasIconCollisionBoxData(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0}addIndicesForPlacedSymbol(c,d){const g=c.placedSymbolArray.get(d),S=g.vertexStartIndex+4*g.numGlyphs;for(let M=g.vertexStartIndex;M<S;M+=4)c.indexArray.emplaceBack(M,M+1,M+2),c.indexArray.emplaceBack(M+1,M+2,M+3)}getSortedSymbolIndexes(c){if(this.sortedAngle===c&&this.symbolInstanceIndexes!==void 0)return this.symbolInstanceIndexes;const d=Math.sin(c),g=Math.cos(c),S=[],M=[],L=[];for(let V=0;V<this.symbolInstances.length;++V){L.push(V);const Q=this.symbolInstances.get(V);S.push(0|Math.round(d*Q.tileAnchorX+g*Q.tileAnchorY)),M.push(Q.featureIndex)}return L.sort((V,Q)=>S[V]-S[Q]||M[Q]-M[V]),L}addToSortKeyRanges(c,d){const g=this.sortKeyRanges[this.sortKeyRanges.length-1];g&&g.sortKey===d?g.symbolInstanceEnd=c+1:this.sortKeyRanges.push({sortKey:d,symbolInstanceStart:c,symbolInstanceEnd:c+1})}sortFeatures(c){if(this.sortFeaturesByY&&this.sortedAngle!==c&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(c),this.sortedAngle=c,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(const d of this.symbolInstanceIndexes){const g=this.symbolInstances.get(d);this.featureSortOrder.push(g.featureIndex);const{rightJustifiedTextSymbolIndex:S,centerJustifiedTextSymbolIndex:M,leftJustifiedTextSymbolIndex:L,verticalPlacedTextSymbolIndex:V,placedIconSymbolIndex:Q,verticalPlacedIconSymbolIndex:te}=g;S>=0&&this.addIndicesForPlacedSymbol(this.text,S),M>=0&&M!==S&&this.addIndicesForPlacedSymbol(this.text,M),L>=0&&L!==M&&L!==S&&this.addIndicesForPlacedSymbol(this.text,L),V>=0&&this.addIndicesForPlacedSymbol(this.text,V),Q>=0&&this.addIndicesForPlacedSymbol(this.icon,Q),te>=0&&this.addIndicesForPlacedSymbol(this.icon,te)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}Sn(Ag,"SymbolBucket",{omit:["layers","collisionBoxArray","features","compareText"]}),Ag.MAX_GLYPHS=65535,Ag.addDynamicAttributes=t2;const WF=new mt({"symbol-placement":new De(dr.layout_symbol["symbol-placement"]),"symbol-spacing":new De(dr.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new De(dr.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new it(dr.layout_symbol["symbol-sort-key"]),"symbol-z-order":new De(dr.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new De(dr.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new De(dr.layout_symbol["icon-ignore-placement"]),"icon-optional":new De(dr.layout_symbol["icon-optional"]),"icon-rotation-alignment":new De(dr.layout_symbol["icon-rotation-alignment"]),"icon-size":new it(dr.layout_symbol["icon-size"]),"icon-text-fit":new De(dr.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new De(dr.layout_symbol["icon-text-fit-padding"]),"icon-image":new it(dr.layout_symbol["icon-image"]),"icon-rotate":new it(dr.layout_symbol["icon-rotate"]),"icon-padding":new De(dr.layout_symbol["icon-padding"]),"icon-keep-upright":new De(dr.layout_symbol["icon-keep-upright"]),"icon-offset":new it(dr.layout_symbol["icon-offset"]),"icon-anchor":new it(dr.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new De(dr.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new De(dr.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new De(dr.layout_symbol["text-rotation-alignment"]),"text-field":new it(dr.layout_symbol["text-field"]),"text-font":new it(dr.layout_symbol["text-font"]),"text-size":new it(dr.layout_symbol["text-size"]),"text-max-width":new it(dr.layout_symbol["text-max-width"]),"text-line-height":new it(dr.layout_symbol["text-line-height"]),"text-letter-spacing":new it(dr.layout_symbol["text-letter-spacing"]),"text-justify":new it(dr.layout_symbol["text-justify"]),"text-radial-offset":new it(dr.layout_symbol["text-radial-offset"]),"text-variable-anchor":new De(dr.layout_symbol["text-variable-anchor"]),"text-anchor":new it(dr.layout_symbol["text-anchor"]),"text-max-angle":new De(dr.layout_symbol["text-max-angle"]),"text-writing-mode":new De(dr.layout_symbol["text-writing-mode"]),"text-rotate":new it(dr.layout_symbol["text-rotate"]),"text-padding":new De(dr.layout_symbol["text-padding"]),"text-keep-upright":new De(dr.layout_symbol["text-keep-upright"]),"text-transform":new it(dr.layout_symbol["text-transform"]),"text-offset":new it(dr.layout_symbol["text-offset"]),"text-allow-overlap":new De(dr.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new De(dr.layout_symbol["text-ignore-placement"]),"text-optional":new De(dr.layout_symbol["text-optional"])});var _T={paint:new mt({"icon-opacity":new it(dr.paint_symbol["icon-opacity"]),"icon-color":new it(dr.paint_symbol["icon-color"]),"icon-halo-color":new it(dr.paint_symbol["icon-halo-color"]),"icon-halo-width":new it(dr.paint_symbol["icon-halo-width"]),"icon-halo-blur":new it(dr.paint_symbol["icon-halo-blur"]),"icon-translate":new De(dr.paint_symbol["icon-translate"]),"icon-translate-anchor":new De(dr.paint_symbol["icon-translate-anchor"]),"text-opacity":new it(dr.paint_symbol["text-opacity"]),"text-color":new it(dr.paint_symbol["text-color"],{runtimeType:ls,getOverride:f=>f.textColor,hasOverride:f=>!!f.textColor}),"text-halo-color":new it(dr.paint_symbol["text-halo-color"]),"text-halo-width":new it(dr.paint_symbol["text-halo-width"]),"text-halo-blur":new it(dr.paint_symbol["text-halo-blur"]),"text-translate":new De(dr.paint_symbol["text-translate"]),"text-translate-anchor":new De(dr.paint_symbol["text-translate-anchor"])}),layout:WF};class bk{constructor(c){this.type=c.property.overrides?c.property.overrides.runtimeType:Rn,this.defaultValue=c}evaluate(c){if(c.formattedSection){const d=this.defaultValue.property.overrides;if(d&&d.hasOverride(c.formattedSection))return d.getOverride(c.formattedSection)}return c.feature&&c.featureState?this.defaultValue.evaluate(c.feature,c.featureState):this.defaultValue.property.specification.default}eachChild(c){this.defaultValue.isConstant()||c(this.defaultValue.value._styleExpression.expression)}outputDefined(){return!1}serialize(){return null}}Sn(bk,"FormatSectionOverride",{omit:["defaultValue"]});class r2 extends Ad{constructor(c){super(c,_T)}recalculate(c,d){super.recalculate(c,d),this.layout.get("icon-rotation-alignment")==="auto"&&(this.layout._values["icon-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-rotation-alignment")==="auto"&&(this.layout._values["text-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-pitch-alignment")==="auto"&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")),this.layout.get("icon-pitch-alignment")==="auto"&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment"));const g=this.layout.get("text-writing-mode");if(g){const S=[];for(const M of g)S.indexOf(M)<0&&S.push(M);this.layout._values["text-writing-mode"]=S}else this.layout._values["text-writing-mode"]=this.layout.get("symbol-placement")==="point"?["horizontal"]:["horizontal","vertical"];this._setPaintOverrides()}getValueAndResolveTokens(c,d,g,S){const M=this.layout.get(c).evaluate(d,{},g,S),L=this._unevaluatedLayout._values[c];return L.isDataDriven()||Pd(L.value)||!M?M:function(V,Q){return Q.replace(/{([^{}]+)}/g,(te,ue)=>ue in V?String(V[ue]):"")}(d.properties,M)}createBucket(c){return new Ag(c)}queryRadius(){return 0}queryIntersectsFeature(){return!1}_setPaintOverrides(){for(const c of _T.paint.overridableProperties){if(!r2.hasPaintOverride(this.layout,c))continue;const d=this.paint.get(c),g=new bk(d),S=new kf(g,d.property.specification);let M=null;M=d.value.kind==="constant"||d.value.kind==="source"?new L_("source",S):new Tv("composite",S,d.value.zoomStops,d.value._interpolationType),this.paint._values[c]=new at(d.property,M,d.parameters)}}_handleOverridablePaintPropertyUpdate(c,d,g){return!(!this.layout||d.isDataDriven()||g.isDataDriven())&&r2.hasPaintOverride(this.layout,c)}static hasPaintOverride(c,d){const g=c.get("text-field"),S=_T.paint.properties[d];let M=!1;const L=V=>{for(const Q of V)if(S.overrides&&S.overrides.hasOverride(Q))return void(M=!0)};if(g.value.kind==="constant"&&g.value.value instanceof ci)L(g.value.value.sections);else if(g.value.kind==="source"){const V=te=>{M||(te instanceof _i&&ao(te.value)===le?L(te.value.sections):te instanceof ju?L(te.sections):te.eachChild(V))},Q=g.value;Q._styleExpression&&V(Q._styleExpression.expression)}return M}getProgramConfiguration(c){return new Dc(this,c)}}var GF={paint:new mt({"background-color":new De(dr.paint_background["background-color"]),"background-pattern":new De(dr.paint_background["background-pattern"]),"background-opacity":new De(dr.paint_background["background-opacity"])})},qF={paint:new mt({"raster-opacity":new De(dr.paint_raster["raster-opacity"]),"raster-hue-rotate":new De(dr.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new De(dr.paint_raster["raster-brightness-min"]),"raster-brightness-max":new De(dr.paint_raster["raster-brightness-max"]),"raster-saturation":new De(dr.paint_raster["raster-saturation"]),"raster-contrast":new De(dr.paint_raster["raster-contrast"]),"raster-resampling":new De(dr.paint_raster["raster-resampling"]),"raster-fade-duration":new De(dr.paint_raster["raster-fade-duration"])})};class XF extends Ad{constructor(c){super(c,{}),this.implementation=c}is3D(){return this.implementation.renderingMode==="3d"}hasOffscreenPass(){return this.implementation.prerender!==void 0}isLayerDraped(){return this.implementation.renderToTile!==void 0}shouldRedrape(){return!!this.implementation.shouldRerenderTiles&&this.implementation.shouldRerenderTiles()}recalculate(){}updateTransitions(){}hasTransition(){return!1}serialize(){}onAdd(c){this.implementation.onAdd&&this.implementation.onAdd(c,c.painter.context.gl)}onRemove(c){this.implementation.onRemove&&this.implementation.onRemove(c,c.painter.context.gl)}}var YF={paint:new mt({"sky-type":new De(dr.paint_sky["sky-type"]),"sky-atmosphere-sun":new De(dr.paint_sky["sky-atmosphere-sun"]),"sky-atmosphere-sun-intensity":new De(dr.paint_sky["sky-atmosphere-sun-intensity"]),"sky-gradient-center":new De(dr.paint_sky["sky-gradient-center"]),"sky-gradient-radius":new De(dr.paint_sky["sky-gradient-radius"]),"sky-gradient":new yt(dr.paint_sky["sky-gradient"]),"sky-atmosphere-halo-color":new De(dr.paint_sky["sky-atmosphere-halo-color"]),"sky-atmosphere-color":new De(dr.paint_sky["sky-atmosphere-color"]),"sky-opacity":new De(dr.paint_sky["sky-opacity"])})};function bT(f,c,d){const g=[0,0,1],S=q_([]);return ui(S,S,d?-j(f)+Math.PI:j(f)),Fv(S,S,-j(c)),IS(g,g,S),pc(g,g)}const KF={circle:class extends Ad{constructor(f){super(f,L4)}createBucket(f){return new pu(f)}queryRadius(f){const c=f;return I0("circle-radius",this,c)+I0("circle-stroke-width",this,c)+Sw(this.paint.get("circle-translate"))}queryIntersectsFeature(f,c,d,g,S,M,L,V){const Q=mR(this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),M.angle,f.pixelToTileUnitsFactor),te=this.paint.get("circle-radius").evaluate(c,d)+this.paint.get("circle-stroke-width").evaluate(c,d);return gR(f,g,M,L,V,this.paint.get("circle-pitch-alignment")==="map",this.paint.get("circle-pitch-scale")==="map",Q,te)}getProgramIds(){return["circle"]}getProgramConfiguration(f){return new Dc(this,f)}},heatmap:class extends Ad{createBucket(f){return new yR(f)}constructor(f){super(f,VS),this._updateColorRamp()}_handleSpecialPaintPropertyUpdate(f){f==="heatmap-color"&&this._updateColorRamp()}_updateColorRamp(){this.colorRamp=Tw({expression:this._transitionablePaint._values["heatmap-color"].value.expression,evaluationKey:"heatmapDensity",image:this.colorRamp}),this.colorRampTexture=null}resize(){this.heatmapFbo&&(this.heatmapFbo.destroy(),this.heatmapFbo=null)}queryRadius(f){return I0("heatmap-radius",this,f)}queryIntersectsFeature(f,c,d,g,S,M,L,V){const Q=this.paint.get("heatmap-radius").evaluate(c,d);return gR(f,g,M,L,V,!0,!0,new D(0,0),Q)}hasOffscreenPass(){return this.paint.get("heatmap-opacity")!==0&&this.visibility!=="none"}getProgramIds(){return["heatmap","heatmapTexture"]}getProgramConfiguration(f){return new Dc(this,f)}},hillshade:class extends Ad{constructor(f){super(f,F4)}hasOffscreenPass(){return this.paint.get("hillshade-exaggeration")!==0&&this.visibility!=="none"}getProgramIds(){return["hillshade","hillshadePrepare"]}},fill:class extends Ad{constructor(f){super(f,Q4)}getProgramIds(){const f=this.paint.get("fill-pattern"),c=f&&f.constantOr(1),d=[c?"fillPattern":"fill"];return this.paint.get("fill-antialias")&&d.push(c&&!this.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline"),d}getProgramConfiguration(f){return new Dc(this,f)}recalculate(f,c){super.recalculate(f,c);const d=this.paint._values["fill-outline-color"];d.value.kind==="constant"&&d.value.value===void 0&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])}createBucket(f){return new Ow(f)}queryRadius(){return Sw(this.paint.get("fill-translate"))}queryIntersectsFeature(f,c,d,g,S,M){return!f.queryGeometry.isAboveHorizon&&uR(pR(f.tilespaceGeometry,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),M.angle,f.pixelToTileUnitsFactor),g)}isTileClipped(){return!0}},"fill-extrusion":class extends Ad{constructor(f){super(f,oF)}createBucket(f){return new r1(f)}queryRadius(){return Sw(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}getProgramIds(){return[this.paint.get("fill-extrusion-pattern").constantOr(1)?"fillExtrusionPattern":"fillExtrusion"]}getProgramConfiguration(f){return new Dc(this,f)}queryIntersectsFeature(f,c,d,g,S,M,L,V,Q){const te=mR(this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),M.angle,f.pixelToTileUnitsFactor),ue=this.paint.get("fill-extrusion-height").evaluate(c,d),ge=this.paint.get("fill-extrusion-base").evaluate(c,d),_e=[0,0],Me=V&&M.elevation,Ae=M.elevation?M.elevation.exaggeration():1,Ne=f.tile.getBucket(this);if(Me&&Ne instanceof r1){const wt=Ne.centroidVertexArray,Rt=Q+1;Rt<wt.length&&(_e[0]=wt.geta_centroid_pos0(Rt),_e[1]=wt.geta_centroid_pos1(Rt))}if(_e[0]===0&&_e[1]===1)return!1;M.projection.name==="globe"&&(g=BR([g],[new D(0,0),new D($n,$n)],f.tileID.canonical).map(wt=>wt.polygon).flat());const Qe=Me?V:null,[ft,Ct]=function(wt,Rt,Mt,cr,sr,Cr,Kr,hr,Mr,Ar,$r){return wt.projection.name==="globe"?function(Qr,_r,yn,Pn,_n,vi,en,zn,yi,vo,xi){const Jn=[],gs=[],wi=Qr.projection.upVectorScale(xi,Qr.center.lat,Qr.worldSize).metersToTile,Ci=[0,0,0,1],ns=[0,0,0,1],us=(is,js,da,ja)=>{is[0]=js,is[1]=da,is[2]=ja,is[3]=1},fs=zR();yn>0&&(yn+=fs),Pn+=fs;for(const is of _r){const js=[],da=[];for(const ja of is){const os=ja.x+_n.x,cl=ja.y+_n.y,Ua=Qr.projection.projectTilePoint(os,cl,xi),Zs=Qr.projection.upVector(xi,ja.x,ja.y);let bo=yn,Va=Pn;if(en){const ds=UR(os,cl,yn,Pn,en,zn,yi,vo);bo+=ds.base,Va+=ds.top}yn!==0?us(Ci,Ua.x+Zs[0]*wi*bo,Ua.y+Zs[1]*wi*bo,Ua.z+Zs[2]*wi*bo):us(Ci,Ua.x,Ua.y,Ua.z),us(ns,Ua.x+Zs[0]*wi*Va,Ua.y+Zs[1]*wi*Va,Ua.z+Zs[2]*wi*Va),Bs(Ci,Ci,vi),Bs(ns,ns,vi),js.push(new Ms(Ci[0],Ci[1],Ci[2])),da.push(new Ms(ns[0],ns[1],ns[2]))}Jn.push(js),gs.push(da)}return[Jn,gs]}(wt,Rt,Mt,cr,sr,Cr,Kr,hr,Mr,Ar,$r):Kr?function(Qr,_r,yn,Pn,_n,vi,en,zn,yi){const vo=[],xi=[],Jn=[0,0,0,1];for(const gs of Qr){const wi=[],Ci=[];for(const ns of gs){const us=ns.x+Pn.x,fs=ns.y+Pn.y,is=UR(us,fs,_r,yn,vi,en,zn,yi);Jn[0]=us,Jn[1]=fs,Jn[2]=is.base,Jn[3]=1,am(Jn,Jn,_n),Jn[3]=Math.max(Jn[3],1e-5);const js=new Ms(Jn[0]/Jn[3],Jn[1]/Jn[3],Jn[2]/Jn[3]);Jn[0]=us,Jn[1]=fs,Jn[2]=is.top,Jn[3]=1,am(Jn,Jn,_n),Jn[3]=Math.max(Jn[3],1e-5);const da=new Ms(Jn[0]/Jn[3],Jn[1]/Jn[3],Jn[2]/Jn[3]);wi.push(js),Ci.push(da)}vo.push(wi),xi.push(Ci)}return[vo,xi]}(Rt,Mt,cr,sr,Cr,Kr,hr,Mr,Ar):function(Qr,_r,yn,Pn,_n){const vi=[],en=[],zn=_n[8]*_r,yi=_n[9]*_r,vo=_n[10]*_r,xi=_n[11]*_r,Jn=_n[8]*yn,gs=_n[9]*yn,wi=_n[10]*yn,Ci=_n[11]*yn;for(const ns of Qr){const us=[],fs=[];for(const is of ns){const js=is.x+Pn.x,da=is.y+Pn.y,ja=_n[0]*js+_n[4]*da+_n[12],os=_n[1]*js+_n[5]*da+_n[13],cl=_n[2]*js+_n[6]*da+_n[14],Ua=_n[3]*js+_n[7]*da+_n[15],Zs=ja+zn,bo=os+yi,Va=cl+vo,ds=Math.max(Ua+xi,1e-5),yu=ja+Jn,Ha=os+gs,Zl=cl+wi,Nl=Math.max(Ua+Ci,1e-5);us.push(new Ms(Zs/ds,bo/ds,Va/ds)),fs.push(new Ms(yu/Nl,Ha/Nl,Zl/Nl))}vi.push(us),en.push(fs)}return[vi,en]}(Rt,Mt,cr,sr,Cr)}(M,g,ge,ue,te,L,Qe,_e,Ae,M.center.lat,f.tileID.canonical),dt=f.queryGeometry;return function(wt,Rt,Mt){let cr=1/0;uR(Mt,Rt)&&(cr=fm(Mt,Rt[0]));for(let sr=0;sr<Rt.length;sr++){const Cr=Rt[sr],Kr=wt[sr];for(let hr=0;hr<Cr.length-1;hr++){const Mr=Cr[hr],Ar=[Mr,Cr[hr+1],Kr[hr+1],Kr[hr],Mr];cR(Mt,Ar)&&(cr=Math.min(cr,fm(Mt,Ar)))}}return cr!==1/0&&cr}(ft,Ct,dt.isPointQuery()?dt.screenBounds:dt.screenGeometry)}},line:class extends Ad{constructor(f){super(f,i1),this.gradientVersion=0}_handleSpecialPaintPropertyUpdate(f){if(f==="line-gradient"){const c=this._transitionablePaint._values["line-gradient"].value.expression;this.stepInterpolant=c._styleExpression&&c._styleExpression.expression instanceof jp,this.gradientVersion=(this.gradientVersion+1)%Number.MAX_SAFE_INTEGER}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}widthExpression(){return this._transitionablePaint._values["line-width"].value.expression}recalculate(f,c){super.recalculate(f,c),this.paint._values["line-floorwidth"]=Ks.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,f)}createBucket(f){return new $f(f)}getProgramIds(){return[this.paint.get("line-pattern").constantOr(1)?"linePattern":"line"]}getProgramConfiguration(f){return new Dc(this,f)}queryRadius(f){const c=f,d=fa(I0("line-width",this,c),I0("line-gap-width",this,c)),g=I0("line-offset",this,c);return d/2+Math.abs(g)+Sw(this.paint.get("line-translate"))}queryIntersectsFeature(f,c,d,g,S,M){if(f.queryGeometry.isAboveHorizon)return!1;const L=pR(f.tilespaceGeometry,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),M.angle,f.pixelToTileUnitsFactor),V=f.pixelToTileUnitsFactor/2*fa(this.paint.get("line-width").evaluate(c,d),this.paint.get("line-gap-width").evaluate(c,d)),Q=this.paint.get("line-offset").evaluate(c,d);return Q&&(g=function(te,ue){const ge=[],_e=new D(0,0);for(let Me=0;Me<te.length;Me++){const Ae=te[Me],Ne=[];for(let Qe=0;Qe<Ae.length;Qe++){const ft=Ae[Qe],Ct=Ae[Qe+1],dt=Qe===0?_e:ft.sub(Ae[Qe-1])._unit()._perp(),wt=Qe===Ae.length-1?_e:Ct.sub(ft)._unit()._perp(),Rt=dt._add(wt)._unit();Rt._mult(1/(Rt.x*wt.x+Rt.y*wt.y)),Ne.push(Rt._mult(ue)._add(ft))}ge.push(Ne)}return ge}(g,Q*f.pixelToTileUnitsFactor)),function(te,ue,ge){for(let _e=0;_e<ue.length;_e++){const Me=ue[_e];if(te.length>=3){for(let Ae=0;Ae<Me.length;Ae++)if(qv(te,Me[Ae]))return!0}if(fR(te,Me,ge))return!0}return!1}(L,g,V)}isTileClipped(){return!0}},symbol:r2,background:class extends Ad{constructor(f){super(f,GF)}getProgramIds(){return[this.paint.get("background-pattern")?"backgroundPattern":"background"]}},raster:class extends Ad{constructor(f){super(f,qF)}getProgramIds(){return["raster"]}},sky:class extends Ad{constructor(f){super(f,YF),this._updateColorRamp()}_handleSpecialPaintPropertyUpdate(f){f==="sky-gradient"?this._updateColorRamp():f!=="sky-atmosphere-sun"&&f!=="sky-atmosphere-halo-color"&&f!=="sky-atmosphere-color"&&f!=="sky-atmosphere-sun-intensity"||(this._skyboxInvalidated=!0)}_updateColorRamp(){this.colorRamp=Tw({expression:this._transitionablePaint._values["sky-gradient"].value.expression,evaluationKey:"skyRadialProgress"}),this.colorRampTexture&&(this.colorRampTexture.destroy(),this.colorRampTexture=null)}needsSkyboxCapture(f){if(this._skyboxInvalidated||!this.skyboxTexture||!this.skyboxGeometry)return!0;if(!this.paint.get("sky-atmosphere-sun")){const c=f.style.light.properties.get("position");return this._lightPosition.azimuthal!==c.azimuthal||this._lightPosition.polar!==c.polar}return!1}getCenter(f,c){if(this.paint.get("sky-type")==="atmosphere"){const g=this.paint.get("sky-atmosphere-sun"),S=!g,M=f.style.light,L=M.properties.get("position");return S&&M.properties.get("anchor")==="viewport"&&ze("The sun direction is attached to a light with viewport anchor, lighting may behave unexpectedly."),S?bT(L.azimuthal,90-L.polar,c):bT(g[0],90-g[1],c)}const d=this.paint.get("sky-gradient-center");return bT(d[0],90-d[1],c)}is3D(){return!1}isSky(){return!0}markSkyboxValid(f){this._skyboxInvalidated=!1,this._lightPosition=f.style.light.properties.get("position")}hasOffscreenPass(){return!0}getProgramIds(){const f=this.paint.get("sky-type");return f==="atmosphere"?["skyboxCapture","skybox"]:f==="gradient"?["skyboxGradient"]:null}}};class f1{constructor(c,d,g,S){this.context=c,this.format=g,this.texture=c.gl.createTexture(),this.update(d,S)}update(c,d,g){const{width:S,height:M}=c,{context:L}=this,{gl:V}=L,{HTMLImageElement:Q,HTMLCanvasElement:te,HTMLVideoElement:ue,ImageData:ge,ImageBitmap:_e}=l;if(V.bindTexture(V.TEXTURE_2D,this.texture),L.pixelStoreUnpackFlipY.set(!1),L.pixelStoreUnpack.set(1),L.pixelStoreUnpackPremultiplyAlpha.set(this.format===V.RGBA&&(!d||d.premultiply!==!1)),g||this.size&&this.size[0]===S&&this.size[1]===M){const{x:Me,y:Ae}=g||{x:0,y:0};c instanceof Q||c instanceof te||c instanceof ue||c instanceof ge||_e&&c instanceof _e?V.texSubImage2D(V.TEXTURE_2D,0,Me,Ae,V.RGBA,V.UNSIGNED_BYTE,c):V.texSubImage2D(V.TEXTURE_2D,0,Me,Ae,S,M,V.RGBA,V.UNSIGNED_BYTE,c.data)}else this.size=[S,M],c instanceof Q||c instanceof te||c instanceof ue||c instanceof ge||_e&&c instanceof _e?V.texImage2D(V.TEXTURE_2D,0,this.format,this.format,V.UNSIGNED_BYTE,c):V.texImage2D(V.TEXTURE_2D,0,this.format,S,M,0,this.format,V.UNSIGNED_BYTE,c.data);this.useMipmap=Boolean(d&&d.useMipmap&&this.isSizePowerOfTwo()),this.useMipmap&&V.generateMipmap(V.TEXTURE_2D)}bind(c,d){const{context:g}=this,{gl:S}=g;S.bindTexture(S.TEXTURE_2D,this.texture),c!==this.filter&&(S.texParameteri(S.TEXTURE_2D,S.TEXTURE_MAG_FILTER,c),S.texParameteri(S.TEXTURE_2D,S.TEXTURE_MIN_FILTER,this.useMipmap?c===S.NEAREST?S.NEAREST_MIPMAP_NEAREST:S.LINEAR_MIPMAP_NEAREST:c),this.filter=c),d!==this.wrap&&(S.texParameteri(S.TEXTURE_2D,S.TEXTURE_WRAP_S,d),S.texParameteri(S.TEXTURE_2D,S.TEXTURE_WRAP_T,d),this.wrap=d)}isSizePowerOfTwo(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0}destroy(){const{gl:c}=this.context;c.deleteTexture(this.texture),this.texture=null}}class ZF{constructor(c){this._callback=c,this._triggered=!1,typeof MessageChannel!="undefined"&&(this._channel=new MessageChannel,this._channel.port2.onmessage=()=>{this._triggered=!1,this._callback()})}trigger(){this._triggered||(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout(()=>{this._triggered=!1,this._callback()},0))}remove(){this._channel=void 0,this._callback=()=>{}}}class QF{constructor(){this.tasks={},this.taskQueue=[],me(["process"],this),this.invoker=new ZF(this.process),this.nextId=0}add(c,d){const g=this.nextId++,S=function({type:M,isSymbolTile:L,zoom:V}){return V=V||0,M==="message"?0:M!=="maybePrepare"||L?M!=="parseTile"||L?M==="parseTile"&&L?300-V:M==="maybePrepare"&&L?400-V:500:200-V:100-V}(d);if(S===0){Tt();try{c()}finally{}return{cancel:()=>{}}}return this.tasks[g]={fn:c,metadata:d,priority:S,id:g},this.taskQueue.push(g),this.invoker.trigger(),{cancel:()=>{delete this.tasks[g]}}}process(){Tt();try{if(this.taskQueue=this.taskQueue.filter(g=>!!this.tasks[g]),!this.taskQueue.length)return;const c=this.pick();if(c===null)return;const d=this.tasks[c];if(delete this.tasks[c],this.taskQueue.length&&this.invoker.trigger(),!d)return;d.fn()}finally{}}pick(){let c=null,d=1/0;for(let S=0;S<this.taskQueue.length;S++){const M=this.tasks[this.taskQueue[S]];M.priority<d&&(d=M.priority,c=S)}if(c===null)return null;const g=this.taskQueue[c];return this.taskQueue.splice(c,1),g}remove(){this.invoker.remove()}}class wk{constructor(c){this._stringToNumber={},this._numberToString=[];for(let d=0;d<c.length;d++){const g=c[d];this._stringToNumber[g]=d,this._numberToString[d]=g}}encode(c){return this._stringToNumber[c]}decode(c){return this._numberToString[c]}}const P=["tile","layer","source","sourceLayer","state"];class B{constructor(c,d,g,S,M){this.type="Feature",this._vectorTileFeature=c,this._z=d,this._x=g,this._y=S,this.properties=c.properties,this.id=M}get geometry(){return this._geometry===void 0&&(this._geometry=this._vectorTileFeature.toGeoJSON(this._x,this._y,this._z).geometry),this._geometry}set geometry(c){this._geometry=c}toJSON(){const c={type:"Feature",state:void 0,geometry:this.geometry,properties:this.properties};this.id!==void 0&&(c.id=this.id);for(const d of P)this[d]!==void 0&&(c[d]=this[d]);return c}}const ie=32,Ee=33,je=new Uint16Array(8184);for(let f=0;f<2046;f++){let c=f+2,d=0,g=0,S=0,M=0,L=0,V=0;for(1&c?S=M=L=ie:d=g=V=ie;(c>>=1)>1;){const te=d+S>>1,ue=g+M>>1;1&c?(S=d,M=g,d=L,g=V):(d=S,g=M,S=L,M=V),L=te,V=ue}const Q=4*f;je[Q+0]=d,je[Q+1]=g,je[Q+2]=S,je[Q+3]=M}const lt=new Uint16Array(2178),Pt=new Uint8Array(1089),Bt=new Uint16Array(1089);function nr(f){return f===0?-.03125:f===32?.03125:0}var Ur=Vt([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]);const Gr={type:2,extent:$n,loadGeometry:()=>[[new D(0,0),new D($n+1,0),new D($n+1,$n+1),new D(0,$n+1),new D(0,0)]]};class rn{constructor(c,d,g,S,M){this.tileID=c,this.uid=ve(),this.uses=0,this.tileSize=d,this.tileZoom=g,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.isRaster=M,this.expiredRequestCount=0,this.state="loading",S&&S.transform&&(this.projection=S.transform.projection)}registerFadeDuration(c){const d=c+this.timeAdded;d<jo.now()||this.fadeEndTime&&d<this.fadeEndTime||(this.fadeEndTime=d)}wasRequested(){return this.state==="errored"||this.state==="loaded"||this.state==="reloading"}get tileTransform(){return this._tileTransform||(this._tileTransform=Qv(this.tileID.canonical,this.projection)),this._tileTransform}loadVectorData(c,d,g){if(this.unloadVectorData(),this.state="loaded",c){c.featureIndex&&(this.latestFeatureIndex=c.featureIndex,c.rawTileData?(this.latestRawTileData=c.rawTileData,this.latestFeatureIndex.rawTileData=c.rawTileData):this.latestRawTileData&&(this.latestFeatureIndex.rawTileData=this.latestRawTileData)),this.collisionBoxArray=c.collisionBoxArray,this.buckets=function(S,M){const L={};if(!M)return L;for(const V of S){const Q=V.layerIds.map(te=>M.getLayer(te)).filter(Boolean);if(Q.length!==0){V.layers=Q,V.stateDependentLayerIds&&(V.stateDependentLayers=V.stateDependentLayerIds.map(te=>Q.filter(ue=>ue.id===te)[0]));for(const te of Q)L[te.id]=V}}return L}(c.buckets,d.style),this.hasSymbolBuckets=!1;for(const S in this.buckets){const M=this.buckets[S];if(M instanceof Ag){if(this.hasSymbolBuckets=!0,!g)break;M.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(const S in this.buckets){const M=this.buckets[S];if(M instanceof Ag&&M.hasRTLText){this.hasRTLText=!0,ae.isLoading()||ae.isLoaded()||K()!=="deferred"||ne();break}}this.queryPadding=0;for(const S in this.buckets){const M=this.buckets[S];this.queryPadding=Math.max(this.queryPadding,d.style.getLayer(S).queryRadius(M))}c.imageAtlas&&(this.imageAtlas=c.imageAtlas),c.glyphAtlasImage&&(this.glyphAtlasImage=c.glyphAtlasImage),c.lineAtlas&&(this.lineAtlas=c.lineAtlas)}else this.collisionBoxArray=new $o}unloadVectorData(){if(this.hasData()){for(const c in this.buckets)this.buckets[c].destroy();this.buckets={},this.imageAtlas&&(this.imageAtlas=null),this.lineAtlas&&(this.lineAtlas=null),this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.lineAtlasTexture&&this.lineAtlasTexture.destroy(),this._tileBoundsBuffer&&(this._tileBoundsBuffer.destroy(),this._tileBoundsIndexBuffer.destroy(),this._tileBoundsSegments.destroy(),this._tileBoundsBuffer=null),this._tileDebugBuffer&&(this._tileDebugBuffer.destroy(),this._tileDebugSegments.destroy(),this._tileDebugBuffer=null),this._tileDebugIndexBuffer&&(this._tileDebugIndexBuffer.destroy(),this._tileDebugIndexBuffer=null),this._globeTileDebugBorderBuffer&&(this._globeTileDebugBorderBuffer.destroy(),this._globeTileDebugBorderBuffer=null),this._tileDebugTextBuffer&&(this._tileDebugTextBuffer.destroy(),this._tileDebugTextSegments.destroy(),this._tileDebugTextIndexBuffer.destroy(),this._tileDebugTextBuffer=null),this._globeTileDebugTextBuffer&&(this._globeTileDebugTextBuffer.destroy(),this._globeTileDebugTextBuffer=null),this.latestFeatureIndex=null,this.state="unloaded"}}getBucket(c){return this.buckets[c.id]}upload(c){for(const g in this.buckets){const S=this.buckets[g];S.uploadPending()&&S.upload(c)}const d=c.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new f1(c,this.imageAtlas.image,d.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new f1(c,this.glyphAtlasImage,d.ALPHA),this.glyphAtlasImage=null),this.lineAtlas&&!this.lineAtlas.uploaded&&(this.lineAtlasTexture=new f1(c,this.lineAtlas.image,d.ALPHA),this.lineAtlas.uploaded=!0)}prepare(c){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(c,this.imageAtlasTexture)}queryRenderedFeatures(c,d,g,S,M,L,V,Q){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({tileResult:S,pixelPosMatrix:V,transform:L,params:M,tileTransform:this.tileTransform},c,d,g):{}}querySourceFeatures(c,d){const g=this.latestFeatureIndex;if(!g||!g.rawTileData)return;const S=g.loadVTLayers(),M=d?d.sourceLayer:"",L=S._geojsonTileLayer||S[M];if(!L)return;const V=d0(d&&d.filter),{z:Q,x:te,y:ue}=this.tileID.canonical,ge={z:Q,x:te,y:ue};for(let _e=0;_e<L.length;_e++){const Me=L.feature(_e);if(V.needGeometry){const Qe=Gv(Me,!0);if(!V.filter(new he(this.tileID.overscaledZ),Qe,this.tileID.canonical))continue}else if(!V.filter(new he(this.tileID.overscaledZ),Me))continue;const Ae=g.getId(Me,M),Ne=new B(Me,Q,te,ue,Ae);Ne.tile=ge,c.push(Ne)}}hasData(){return this.state==="loaded"||this.state==="reloading"||this.state==="expired"}patternsLoaded(){return!!this.imageAtlas&&!!Object.keys(this.imageAtlas.patternPositions).length}setExpiryData(c){const d=this.expirationTime;if(c.cacheControl){const g=xt(c.cacheControl);g["max-age"]&&(this.expirationTime=Date.now()+1e3*g["max-age"])}else c.expires&&(this.expirationTime=new Date(c.expires).getTime());if(this.expirationTime){const g=Date.now();let S=!1;if(this.expirationTime>g)S=!1;else if(d)if(this.expirationTime<d)S=!0;else{const M=this.expirationTime-d;M?this.expirationTime=g+Math.max(M,3e4):S=!0}else S=!0;S?(this.expiredRequestCount++,this.state="expired"):this.expiredRequestCount=0}}getExpiryTimeout(){if(this.expirationTime)return this.expiredRequestCount?1e3*(1<<Math.min(this.expiredRequestCount-1,31)):Math.min(this.expirationTime-new Date().getTime(),Math.pow(2,31)-1)}setFeatureState(c,d){if(!this.latestFeatureIndex||!this.latestFeatureIndex.rawTileData||Object.keys(c).length===0||!d)return;const g=this.latestFeatureIndex.loadVTLayers(),S=d.style.listImages();for(const M in this.buckets){if(!d.style.hasLayer(M))continue;const L=this.buckets[M],V=L.layers[0].sourceLayer||"_geojsonTileLayer",Q=g[V],te=c[V];if(!Q||!te||Object.keys(te).length===0)continue;if(L.update(te,Q,S,this.imageAtlas&&this.imageAtlas.patternPositions||{}),L instanceof $f||L instanceof Ow){const ge=d.style._getSourceCache(L.layers[0].source);d._terrain&&d._terrain.enabled&&ge&&L.programConfigurations.needsUpload&&d._terrain._clearRenderCacheForTile(ge.id,this.tileID)}const ue=d&&d.style&&d.style.getLayer(M);ue&&(this.queryPadding=Math.max(this.queryPadding,ue.queryRadius(L)))}}holdingForFade(){return this.symbolFadeHoldUntil!==void 0}symbolFadeFinished(){return!this.symbolFadeHoldUntil||this.symbolFadeHoldUntil<jo.now()}clearFadeHold(){this.symbolFadeHoldUntil=void 0}setHoldDuration(c){this.symbolFadeHoldUntil=jo.now()+c}setTexture(c,d){const g=d.context,S=g.gl;this.texture=this.texture||d.getTileTexture(c.width),this.texture?this.texture.update(c,{useMipmap:!0}):(this.texture=new f1(g,c,S.RGBA,{useMipmap:!0}),this.texture.bind(S.LINEAR,S.CLAMP_TO_EDGE))}setDependencies(c,d){const g={};for(const S of d)g[S]=!0;this.dependencies[c]=g}hasDependency(c,d){for(const g of c){const S=this.dependencies[g];if(S){for(const M of d)if(S[M])return!0}}return!1}clearQueryDebugViz(){}_makeDebugTileBoundsBuffers(c,d){if(!d||d.name==="mercator"||this._tileDebugBuffer)return;const g=cm(Gr,this.tileID.canonical,this.tileTransform)[0],S=new Wr,M=new dc;for(let L=0;L<g.length;L++){const{x:V,y:Q}=g[L];S.emplaceBack(V,Q),M.emplaceBack(L)}M.emplaceBack(0),this._tileDebugIndexBuffer=c.createIndexBuffer(M),this._tileDebugBuffer=c.createVertexBuffer(S,zv.members),this._tileDebugSegments=la.simpleSegment(0,0,S.length,M.length)}_makeTileBoundsBuffers(c,d){if(this._tileBoundsBuffer||!d||d.name==="mercator")return;const g=cm(Gr,this.tileID.canonical,this.tileTransform)[0];let S,M;if(this.isRaster){const L=function(V,Q){const te=Qv(V,Q),ue=Math.pow(2,V.z);for(let Qe=0;Qe<Ee;Qe++)for(let ft=0;ft<Ee;ft++){const Ct=Zu((V.x+(ft+nr(ft))/ie)/ue),dt=Rl((V.y+(Qe+nr(Qe))/ie)/ue),wt=Q.project(Ct,dt),Rt=Qe*Ee+ft;lt[2*Rt+0]=Math.round((wt.x*te.scale-te.x)*$n),lt[2*Rt+1]=Math.round((wt.y*te.scale-te.y)*$n)}Pt.fill(0),Bt.fill(0);for(let Qe=2045;Qe>=0;Qe--){const ft=4*Qe,Ct=je[ft+0],dt=je[ft+1],wt=je[ft+2],Rt=je[ft+3],Mt=Ct+wt>>1,cr=dt+Rt>>1,sr=Mt+cr-dt,Cr=cr+Ct-Mt,Kr=dt*Ee+Ct,hr=Rt*Ee+wt,Mr=cr*Ee+Mt,Ar=Math.hypot((lt[2*Kr+0]+lt[2*hr+0])/2-lt[2*Mr+0],(lt[2*Kr+1]+lt[2*hr+1])/2-lt[2*Mr+1])>=16;Pt[Mr]=Pt[Mr]||(Ar?1:0),Qe<1022&&(Pt[Mr]=Pt[Mr]||Pt[(dt+Cr>>1)*Ee+(Ct+sr>>1)]||Pt[(Rt+Cr>>1)*Ee+(wt+sr>>1)])}const ge=new Tr,_e=new An;let Me=0;function Ae(Qe,ft){const Ct=ft*Ee+Qe;return Bt[Ct]===0&&(ge.emplaceBack(lt[2*Ct+0],lt[2*Ct+1],Qe*$n/ie,ft*$n/ie),Bt[Ct]=++Me),Bt[Ct]-1}function Ne(Qe,ft,Ct,dt,wt,Rt){const Mt=Qe+Ct>>1,cr=ft+dt>>1;if(Math.abs(Qe-wt)+Math.abs(ft-Rt)>1&&Pt[cr*Ee+Mt])Ne(wt,Rt,Qe,ft,Mt,cr),Ne(Ct,dt,wt,Rt,Mt,cr);else{const sr=Ae(Qe,ft),Cr=Ae(Ct,dt),Kr=Ae(wt,Rt);_e.emplaceBack(sr,Cr,Kr)}}return Ne(0,0,ie,ie,ie,0),Ne(ie,ie,0,0,0,ie),{vertices:ge,indices:_e}}(this.tileID.canonical,d);S=L.vertices,M=L.indices}else{S=new Tr,M=new An;for(const{x:V,y:Q}of g)S.emplaceBack(V,Q,0,0);const L=qS(S.int16,void 0,4);for(let V=0;V<L.length;V+=3)M.emplaceBack(L[V],L[V+1],L[V+2])}this._tileBoundsBuffer=c.createVertexBuffer(S,Ur.members),this._tileBoundsIndexBuffer=c.createIndexBuffer(M),this._tileBoundsSegments=la.simpleSegment(0,0,S.length,M.length)}_makeGlobeTileDebugBuffers(c,d){const g=d.projection;if(!g||g.name!=="globe"||d.freezeTileCoverage)return;const S=this.tileID.canonical,M=lm(OS(S,d)),L=Vv(d.zoom);let V;L>0&&(V=xg(new Float64Array(16),d.globeMatrix)),this._makeGlobeTileDebugBorderBuffer(c,S,d,M,V,L),this._makeGlobeTileDebugTextBuffer(c,S,d,M,V,L)}_globePoint(c,d,g,S,M,L,V){let Q=Y_(c,d,g);if(L){const te=1<<g.z,ue=Bh(S.center.lng),ge=jh(S.center.lat),_e=(g.x+.5)/te-ue;let Me=0;_e>.5?Me=-1:_e<-.5&&(Me=1);let Ae=(c/$n+g.x)/te+Me,Ne=(d/$n+g.y)/te;Ae=(Ae-ue)*S._pixelsPerMercatorPixel+ue,Ne=(Ne-ge)*S._pixelsPerMercatorPixel+ge;const Qe=[Ae*S.worldSize,Ne*S.worldSize,0];Bs(Qe,Qe,L),Q=Cg(Q,Qe,V)}return Bs(Q,Q,M)}_makeGlobeTileDebugBorderBuffer(c,d,g,S,M,L){const V=new Wr,Q=new dc,te=new Qt,ue=(_e,Me,Ae,Ne,Qe)=>{const ft=(Ae-_e)/(Qe-1),Ct=(Ne-Me)/(Qe-1),dt=V.length;for(let wt=0;wt<Qe;wt++){const Rt=_e+wt*ft,Mt=Me+wt*Ct;V.emplaceBack(Rt,Mt);const cr=this._globePoint(Rt,Mt,d,g,S,M,L);te.emplaceBack(cr[0],cr[1],cr[2]),Q.emplaceBack(dt+wt)}},ge=$n;ue(0,0,ge,0,16),ue(ge,0,ge,ge,16),ue(ge,ge,0,ge,16),ue(0,ge,0,0,16),this._tileDebugIndexBuffer=c.createIndexBuffer(Q),this._tileDebugBuffer=c.createVertexBuffer(V,zv.members),this._globeTileDebugBorderBuffer=c.createVertexBuffer(te,rR.members),this._tileDebugSegments=la.simpleSegment(0,0,V.length,Q.length)}_makeGlobeTileDebugTextBuffer(c,d,g,S,M,L){const V=$n/4,Q=new Wr,te=new An,ue=new Qt,ge=25;te.reserve(32),Q.reserve(ge),ue.reserve(ge);const _e=(Me,Ae)=>ge*Me+Ae;for(let Me=0;Me<ge;Me++){const Ae=Me*V;for(let Ne=0;Ne<ge;Ne++){const Qe=Ne*V;Q.emplaceBack(Qe,Ae);const ft=this._globePoint(Qe,Ae,d,g,S,M,L);ue.emplaceBack(ft[0],ft[1],ft[2])}}for(let Me=0;Me<4;Me++)for(let Ae=0;Ae<4;Ae++){const Ne=_e(Me,Ae),Qe=_e(Me,Ae+1),ft=_e(Me+1,Ae),Ct=_e(Me+1,Ae+1);te.emplaceBack(Ne,Qe,ft),te.emplaceBack(ft,Qe,Ct)}this._tileDebugTextIndexBuffer=c.createIndexBuffer(te),this._tileDebugTextBuffer=c.createVertexBuffer(Q,zv.members),this._globeTileDebugTextBuffer=c.createVertexBuffer(ue,rR.members),this._tileDebugTextSegments=la.simpleSegment(0,0,ge,32)}}class Mn{constructor(){this.state={},this.stateChanges={},this.deletedStates={}}updateState(c,d,g){const S=String(d);if(this.stateChanges[c]=this.stateChanges[c]||{},this.stateChanges[c][S]=this.stateChanges[c][S]||{},J(this.stateChanges[c][S],g),this.deletedStates[c]===null){this.deletedStates[c]={};for(const M in this.state[c])M!==S&&(this.deletedStates[c][M]=null)}else if(this.deletedStates[c]&&this.deletedStates[c][S]===null){this.deletedStates[c][S]={};for(const M in this.state[c][S])g[M]||(this.deletedStates[c][S][M]=null)}else for(const M in g)this.deletedStates[c]&&this.deletedStates[c][S]&&this.deletedStates[c][S][M]===null&&delete this.deletedStates[c][S][M]}removeFeatureState(c,d,g){if(this.deletedStates[c]===null)return;const S=String(d);if(this.deletedStates[c]=this.deletedStates[c]||{},g&&d!==void 0)this.deletedStates[c][S]!==null&&(this.deletedStates[c][S]=this.deletedStates[c][S]||{},this.deletedStates[c][S][g]=null);else if(d!==void 0)if(this.stateChanges[c]&&this.stateChanges[c][S])for(g in this.deletedStates[c][S]={},this.stateChanges[c][S])this.deletedStates[c][S][g]=null;else this.deletedStates[c][S]=null;else this.deletedStates[c]=null}getState(c,d){const g=String(d),S=J({},(this.state[c]||{})[g],(this.stateChanges[c]||{})[g]);if(this.deletedStates[c]===null)return{};if(this.deletedStates[c]){const M=this.deletedStates[c][d];if(M===null)return{};for(const L in M)delete S[L]}return S}initializeTileState(c,d){c.setFeatureState(this.state,d)}coalesceChanges(c,d){const g={};for(const S in this.stateChanges){this.state[S]=this.state[S]||{};const M={};for(const L in this.stateChanges[S])this.state[S][L]||(this.state[S][L]={}),J(this.state[S][L],this.stateChanges[S][L]),M[L]=this.state[S][L];g[S]=M}for(const S in this.deletedStates){this.state[S]=this.state[S]||{};const M={};if(this.deletedStates[S]===null)for(const L in this.state[S])M[L]={},this.state[S][L]={};else for(const L in this.deletedStates[S]){if(this.deletedStates[S][L]===null)this.state[S][L]={};else if(this.state[S][L])for(const V of Object.keys(this.deletedStates[S][L]))delete this.state[S][L][V];M[L]=this.state[S][L]}g[S]=g[S]||{},J(g[S],M)}if(this.stateChanges={},this.deletedStates={},Object.keys(g).length!==0)for(const S in c)c[S].setFeatureState(g,d)}}class Xn{constructor(c){this.size=c,this.minimums=[],this.maximums=[],this.leaves=[]}getElevation(c,d){const g=this.toIdx(c,d);return{min:this.minimums[g],max:this.maximums[g]}}isLeaf(c,d){return this.leaves[this.toIdx(c,d)]}toIdx(c,d){return d*this.size+c}}function di(f,c,d,g){let S=0,M=Number.MAX_VALUE;for(let L=0;L<3;L++)if(Math.abs(g[L])<1e-15){if(d[L]<f[L]||d[L]>c[L])return null}else{const V=1/g[L];let Q=(f[L]-d[L])*V,te=(c[L]-d[L])*V;if(Q>te){const ue=Q;Q=te,te=ue}if(Q>S&&(S=Q),te<M&&(M=te),S>M)return null}return S}function Vi(f,c,d,g,S,M,L,V,Q,te,ue){const ge=g-f,_e=S-c,Me=M-d,Ae=L-f,Ne=V-c,Qe=Q-d,ft=ue[1]*Qe-ue[2]*Ne,Ct=ue[2]*Ae-ue[0]*Qe,dt=ue[0]*Ne-ue[1]*Ae,wt=ge*ft+_e*Ct+Me*dt;if(Math.abs(wt)<1e-15)return null;const Rt=1/wt,Mt=te[0]-f,cr=te[1]-c,sr=te[2]-d,Cr=(Mt*ft+cr*Ct+sr*dt)*Rt;if(Cr<0||Cr>1)return null;const Kr=cr*Me-sr*_e,hr=sr*ge-Mt*Me,Mr=Mt*_e-cr*ge,Ar=(ue[0]*Kr+ue[1]*hr+ue[2]*Mr)*Rt;return Ar<0||Cr+Ar>1?null:(Ae*Kr+Ne*hr+Qe*Mr)*Rt}function hi(f,c,d){return(f-c)/(d-c)}function no(f,c,d,g,S,M,L,V,Q){const te=1<<d,ue=M-g,ge=L-S,_e=(f+1)/te*ue+g,Me=(c+0)/te*ge+S,Ae=(c+1)/te*ge+S;V[0]=(f+0)/te*ue+g,V[1]=Me,Q[0]=_e,Q[1]=Ae}class go{constructor(c){if(this.maximums=[],this.minimums=[],this.leaves=[],this.childOffsets=[],this.nodeCount=0,this.dem=c,this._siblingOffset=[[0,0],[1,0],[0,1],[1,1]],!this.dem)return;const d=function(M){const L=Math.ceil(Math.log2(M.dim/8)),V=[];let Q=Math.ceil(Math.pow(2,L));const te=1/Q,ue=(Me,Ae,Ne,Qe,ft)=>{const Ct=Qe?1:0,dt=(Me+1)*Ne-Ct,wt=Ae*Ne,Rt=(Ae+1)*Ne-Ct;ft[0]=Me*Ne,ft[1]=wt,ft[2]=dt,ft[3]=Rt};let ge=new Xn(Q);const _e=[];for(let Me=0;Me<Q*Q;Me++){ue(Me%Q,Math.floor(Me/Q),te,!1,_e);const Ae=Ea(_e[0],_e[1],M),Ne=Ea(_e[2],_e[1],M),Qe=Ea(_e[2],_e[3],M),ft=Ea(_e[0],_e[3],M);ge.minimums.push(Math.min(Ae,Ne,Qe,ft)),ge.maximums.push(Math.max(Ae,Ne,Qe,ft)),ge.leaves.push(1)}for(V.push(ge),Q/=2;Q>=1;Q/=2){const Me=V[V.length-1];ge=new Xn(Q);for(let Ae=0;Ae<Q*Q;Ae++){ue(Ae%Q,Math.floor(Ae/Q),2,!0,_e);const Ne=Me.getElevation(_e[0],_e[1]),Qe=Me.getElevation(_e[2],_e[1]),ft=Me.getElevation(_e[2],_e[3]),Ct=Me.getElevation(_e[0],_e[3]),dt=Me.isLeaf(_e[0],_e[1]),wt=Me.isLeaf(_e[2],_e[1]),Rt=Me.isLeaf(_e[2],_e[3]),Mt=Me.isLeaf(_e[0],_e[3]),cr=Math.min(Ne.min,Qe.min,ft.min,Ct.min),sr=Math.max(Ne.max,Qe.max,ft.max,Ct.max),Cr=dt&&wt&&Rt&&Mt;ge.maximums.push(sr),ge.minimums.push(cr),ge.leaves.push(sr-cr<=5&&Cr?1:0)}V.push(ge)}return V}(this.dem),g=d.length-1,S=d[g];this._addNode(S.minimums[0],S.maximums[0],S.leaves[0]),this._construct(d,0,0,g,0)}raycastRoot(c,d,g,S,M,L,V=1){return di([c,d,-100],[g,S,this.maximums[0]*V],M,L)}raycast(c,d,g,S,M,L,V=1){if(!this.nodeCount)return null;const Q=this.raycastRoot(c,d,g,S,M,L,V);if(Q==null)return null;const te=[],ue=[],ge=[],_e=[],Me=[{idx:0,t:Q,nodex:0,nodey:0,depth:0}];for(;Me.length>0;){const{idx:Ae,t:Ne,nodex:Qe,nodey:ft,depth:Ct}=Me.pop();if(this.leaves[Ae]){no(Qe,ft,Ct,c,d,g,S,ge,_e);const wt=1<<Ct,Rt=(Qe+0)/wt,Mt=(Qe+1)/wt,cr=(ft+0)/wt,sr=(ft+1)/wt,Cr=Ea(Rt,cr,this.dem)*V,Kr=Ea(Mt,cr,this.dem)*V,hr=Ea(Mt,sr,this.dem)*V,Mr=Ea(Rt,sr,this.dem)*V,Ar=Vi(ge[0],ge[1],Cr,_e[0],ge[1],Kr,_e[0],_e[1],hr,M,L),$r=Vi(_e[0],_e[1],hr,ge[0],_e[1],Mr,ge[0],ge[1],Cr,M,L),Qr=Math.min(Ar!==null?Ar:Number.MAX_VALUE,$r!==null?$r:Number.MAX_VALUE);if(Qr!==Number.MAX_VALUE)return Qr;{const _r=$v([],M,L,Ne);if(gu(Cr,Kr,Mr,hr,hi(_r[0],ge[0],_e[0]),hi(_r[1],ge[1],_e[1]))>=_r[2])return Ne}continue}let dt=0;for(let wt=0;wt<this._siblingOffset.length;wt++){no((Qe<<1)+this._siblingOffset[wt][0],(ft<<1)+this._siblingOffset[wt][1],Ct+1,c,d,g,S,ge,_e),ge[2]=-100,_e[2]=this.maximums[this.childOffsets[Ae]+wt]*V;const Rt=di(ge,_e,M,L);if(Rt!=null){const Mt=Rt;te[wt]=Mt;let cr=!1;for(let sr=0;sr<dt&&!cr;sr++)Mt>=te[ue[sr]]&&(ue.splice(sr,0,wt),cr=!0);cr||(ue[dt]=wt),dt++}}for(let wt=0;wt<dt;wt++){const Rt=ue[wt];Me.push({idx:this.childOffsets[Ae]+Rt,t:te[Rt],nodex:(Qe<<1)+this._siblingOffset[Rt][0],nodey:(ft<<1)+this._siblingOffset[Rt][1],depth:Ct+1})}}return null}_addNode(c,d,g){return this.minimums.push(c),this.maximums.push(d),this.leaves.push(g),this.childOffsets.push(0),this.nodeCount++}_construct(c,d,g,S,M){if(c[S].isLeaf(d,g)===1)return;this.childOffsets[M]||(this.childOffsets[M]=this.nodeCount);const L=S-1,V=c[L];let Q=0,te=0;for(let ue=0;ue<this._siblingOffset.length;ue++){const ge=2*d+this._siblingOffset[ue][0],_e=2*g+this._siblingOffset[ue][1],Me=V.getElevation(ge,_e),Ae=V.isLeaf(ge,_e),Ne=this._addNode(Me.min,Me.max,Ae);Ae&&(Q|=1<<ue),te||(te=Ne)}for(let ue=0;ue<this._siblingOffset.length;ue++)Q&1<<ue||this._construct(c,2*d+this._siblingOffset[ue][0],2*g+this._siblingOffset[ue][1],L,te+ue)}}function gu(f,c,d,g,S,M){return Ii(Ii(f,d,M),Ii(c,g,M),S)}function Ea(f,c,d){const g=d.dim,S=q(f*g-.5,0,g-1),M=q(c*g-.5,0,g-1),L=Math.floor(S),V=Math.floor(M),Q=Math.min(L+1,g-1),te=Math.min(V+1,g-1);return gu(d.get(L,V),d.get(Q,V),d.get(L,te),d.get(Q,te),S-L,M-V)}const vu={mapbox:[6553.6,25.6,.1,1e4],terrarium:[256,1,1/256,32768]};function Ba(f,c,d){return(256*f*256+256*c+d)/10-1e4}function zd(f,c,d){return 256*f+c+d/256-32768}class Ff{get tree(){return this._tree||this._buildQuadTree(),this._tree}constructor(c,d,g,S=!1,M=!1){if(this.uid=c,d.height!==d.width)throw new RangeError("DEM tiles must be square");if(g&&g!=="mapbox"&&g!=="terrarium")return ze(`"${g}" is not a valid encoding type. Valid types include "mapbox" and "terrarium".`);this.stride=d.height;const L=this.dim=d.height-2,V=new Uint32Array(d.data.buffer);if(this.pixels=new Uint8Array(d.data.buffer),this.encoding=g||"mapbox",this.borderReady=S,!S){for(let Q=0;Q<L;Q++)V[this._idx(-1,Q)]=V[this._idx(0,Q)],V[this._idx(L,Q)]=V[this._idx(L-1,Q)],V[this._idx(Q,-1)]=V[this._idx(Q,0)],V[this._idx(Q,L)]=V[this._idx(Q,L-1)];V[this._idx(-1,-1)]=V[this._idx(0,0)],V[this._idx(L,-1)]=V[this._idx(L-1,0)],V[this._idx(-1,L)]=V[this._idx(0,L-1)],V[this._idx(L,L)]=V[this._idx(L-1,L-1)],M&&this._buildQuadTree()}}_buildQuadTree(){this._tree=new go(this)}get(c,d,g=!1){g&&(c=q(c,-1,this.dim),d=q(d,-1,this.dim));const S=4*this._idx(c,d);return(this.encoding==="terrarium"?zd:Ba)(this.pixels[S],this.pixels[S+1],this.pixels[S+2])}static getUnpackVector(c){return vu[c]}get unpackVector(){return vu[this.encoding]}_idx(c,d){if(c<-1||c>=this.dim+1||d<-1||d>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(d+1)*this.stride+(c+1)}static pack(c,d){const g=[0,0,0,0],S=Ff.getUnpackVector(d);let M=Math.floor((c+S[3])/S[2]);return g[2]=M%256,M=Math.floor(M/256),g[1]=M%256,M=Math.floor(M/256),g[0]=M,g}getPixels(){return new mu({width:this.stride,height:this.stride},this.pixels)}backfillBorder(c,d,g){if(this.dim!==c.dim)throw new Error("dem dimension mismatch");let S=d*this.dim,M=d*this.dim+this.dim,L=g*this.dim,V=g*this.dim+this.dim;switch(d){case-1:S=M-1;break;case 1:M=S+1}switch(g){case-1:L=V-1;break;case 1:V=L+1}const Q=-d*this.dim,te=-g*this.dim;for(let ue=L;ue<V;ue++)for(let ge=S;ge<M;ge++){const _e=4*this._idx(ge,ue),Me=4*this._idx(ge+Q,ue+te);this.pixels[_e+0]=c.pixels[Me+0],this.pixels[_e+1]=c.pixels[Me+1],this.pixels[_e+2]=c.pixels[Me+2],this.pixels[_e+3]=c.pixels[Me+3]}}onDeserialize(){this._tree&&(this._tree.dem=this)}}Sn(Ff,"DEMData"),Sn(go,"DemMinMaxQuadTree",{omit:["dem"]});class Ck{constructor(c,d){this.max=c,this.onRemove=d,this.reset()}reset(){for(const c in this.data)for(const d of this.data[c])d.timeout&&clearTimeout(d.timeout),this.onRemove(d.value);return this.data={},this.order=[],this}add(c,d,g){const S=c.wrapped().key;this.data[S]===void 0&&(this.data[S]=[]);const M={value:d,timeout:void 0};if(g!==void 0&&(M.timeout=setTimeout(()=>{this.remove(c,M)},g)),this.data[S].push(M),this.order.push(S),this.order.length>this.max){const L=this._getAndRemoveByKey(this.order[0]);L&&this.onRemove(L)}return this}has(c){return c.wrapped().key in this.data}getAndRemove(c){return this.has(c)?this._getAndRemoveByKey(c.wrapped().key):null}_getAndRemoveByKey(c){const d=this.data[c].shift();return d.timeout&&clearTimeout(d.timeout),this.data[c].length===0&&delete this.data[c],this.order.splice(this.order.indexOf(c),1),d.value}getByKey(c){const d=this.data[c];return d?d[0].value:null}get(c){return this.has(c)?this.data[c.wrapped().key][0].value:null}remove(c,d){if(!this.has(c))return this;const g=c.wrapped().key,S=d===void 0?0:this.data[g].indexOf(d),M=this.data[g][S];return this.data[g].splice(S,1),M.timeout&&clearTimeout(M.timeout),this.data[g].length===0&&delete this.data[g],this.onRemove(M.value),this.order.splice(this.order.indexOf(g),1),this}setMaxSize(c){for(this.max=c;this.order.length>this.max;){const d=this._getAndRemoveByKey(this.order[0]);d&&this.onRemove(d)}return this}filter(c){const d=[];for(const g in this.data)for(const S of this.data[g])c(S.value)||d.push(S);for(const g of d)this.remove(g.value.tileID,g)}}class n2{constructor(c,d,g){this.func=c,this.mask=d,this.range=g}}n2.ReadOnly=!1,n2.ReadWrite=!0,n2.disabled=new n2(519,n2.ReadOnly,[0,1]);const JF=7680;class ez{constructor(c,d,g,S,M,L){this.test=c,this.ref=d,this.mask=g,this.fail=S,this.depthFail=M,this.pass=L}}ez.disabled=new ez({func:519,mask:0},0,0,JF,JF,JF);class Rg{constructor(c,d,g){this.blendFunction=c,this.blendColor=d,this.mask=g}}Rg.Replace=[1,0],Rg.disabled=new Rg(Rg.Replace,Bn.transparent,[!1,!1,!1,!1]),Rg.unblended=new Rg(Rg.Replace,Bn.transparent,[!0,!0,!0,!0]),Rg.alphaBlended=new Rg([1,771],Bn.transparent,[!0,!0,!0,!0]);const tz=1029,rz=2305;class hm{constructor(c,d,g){this.enable=c,this.mode=d,this.frontFace=g}}hm.disabled=new hm(!1,tz,rz),hm.backCCW=new hm(!0,tz,rz),hm.backCW=new hm(!0,tz,2304),hm.frontCW=new hm(!0,1028,2304),hm.frontCCW=new hm(!0,1028,rz);class d1 extends Ns{constructor(c,d,g){super(),this.id=c,this._onlySymbols=g,d.on("data",S=>{S.dataType==="source"&&S.sourceDataType==="metadata"&&(this._sourceLoaded=!0),this._sourceLoaded&&!this._paused&&S.dataType==="source"&&S.sourceDataType==="content"&&(this.reload(),this.transform&&this.update(this.transform))}),d.on("error",()=>{this._sourceErrored=!0}),this._source=d,this._tiles={},this._cache=new Ck(0,this._unloadTile.bind(this)),this._timers={},this._cacheTimers={},this._minTileCacheSize=d.minTileCacheSize,this._maxTileCacheSize=d.maxTileCacheSize,this._loadedParentTiles={},this._coveredTiles={},this._state=new Mn,this._isRaster=this._source.type==="raster"||this._source.type==="raster-dem"||this._source.type==="custom"&&this._source._dataType==="raster"}onAdd(c){this.map=c,this._minTileCacheSize=this._minTileCacheSize===void 0&&c?c._minTileCacheSize:this._minTileCacheSize,this._maxTileCacheSize=this._maxTileCacheSize===void 0&&c?c._maxTileCacheSize:this._maxTileCacheSize}loaded(){if(this._sourceErrored)return!0;if(!this._sourceLoaded||!this._source.loaded())return!1;for(const c in this._tiles){const d=this._tiles[c];if(d.state!=="loaded"&&d.state!=="errored")return!1}return!0}getSource(){return this._source}pause(){this._paused=!0}resume(){if(!this._paused)return;const c=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,c&&this.reload(),this.transform&&this.update(this.transform)}_loadTile(c,d){return c.isSymbolTile=this._onlySymbols,this._source.loadTile(c,d)}_unloadTile(c){if(this._source.unloadTile)return this._source.unloadTile(c,()=>{})}_abortTile(c){if(this._source.abortTile)return this._source.abortTile(c,()=>{})}serialize(){return this._source.serialize()}prepare(c){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null);for(const d in this._tiles){const g=this._tiles[d];g.upload(c),g.prepare(this.map.style.imageManager)}}getIds(){return fe(this._tiles).map(c=>c.tileID).sort(QG).map(c=>c.key)}getRenderableIds(c){const d=[];for(const g in this._tiles)this._isIdRenderable(+g,c)&&d.push(this._tiles[g]);return c?d.sort((g,S)=>{const M=g.tileID,L=S.tileID,V=new D(M.canonical.x,M.canonical.y)._rotate(this.transform.angle),Q=new D(L.canonical.x,L.canonical.y)._rotate(this.transform.angle);return M.overscaledZ-L.overscaledZ||Q.y-V.y||Q.x-V.x}).map(g=>g.tileID.key):d.map(g=>g.tileID).sort(QG).map(g=>g.key)}hasRenderableParent(c){const d=this.findLoadedParent(c,0);return!!d&&this._isIdRenderable(d.tileID.key)}_isIdRenderable(c,d){return this._tiles[c]&&this._tiles[c].hasData()&&!this._coveredTiles[c]&&(d||!this._tiles[c].holdingForFade())}reload(){if(this._paused)this._shouldReloadOnResume=!0;else{this._cache.reset();for(const c in this._tiles)this._tiles[c].state!=="errored"&&this._reloadTile(+c,"reloading")}}_reloadTile(c,d){const g=this._tiles[c];g&&(g.state!=="loading"&&(g.state=d),this._loadTile(g,this._tileLoaded.bind(this,g,c,d)))}_tileLoaded(c,d,g,S){if(S)if(c.state="errored",S.status!==404)this._source.fire(new Pi(S,{tile:c}));else if(this._source.type==="raster-dem"&&this.usedForTerrain&&this.map.painter.terrain){const M=this.map.painter.terrain;this.update(this.transform,M.getScaledDemTileSize(),!0),M.resetTileLookupCache(this.id)}else this.update(this.transform);else c.timeAdded=jo.now(),g==="expired"&&(c.refreshedUponExpiration=!0),this._setTileReloadTimer(d,c),this._source.type==="raster-dem"&&c.dem&&this._backfillDEM(c),this._state.initializeTileState(c,this.map?this.map.painter:null),this._source.fire(new es("data",{dataType:"source",tile:c,coord:c.tileID,sourceCacheId:this.id}))}_backfillDEM(c){const d=this.getRenderableIds();for(let S=0;S<d.length;S++){const M=d[S];if(c.neighboringTiles&&c.neighboringTiles[M]){const L=this.getTileByID(M);g(c,L),g(L,c)}}function g(S,M){if(!S.dem||S.dem.borderReady)return;S.needsHillshadePrepare=!0,S.needsDEMTextureUpload=!0;let L=M.tileID.canonical.x-S.tileID.canonical.x;const V=M.tileID.canonical.y-S.tileID.canonical.y,Q=Math.pow(2,S.tileID.canonical.z),te=M.tileID.key;L===0&&V===0||Math.abs(V)>1||(Math.abs(L)>1&&(Math.abs(L+Q)===1?L+=Q:Math.abs(L-Q)===1&&(L-=Q)),M.dem&&S.dem&&(S.dem.backfillBorder(M.dem,L,V),S.neighboringTiles&&S.neighboringTiles[te]&&(S.neighboringTiles[te].backfilled=!0)))}}getTile(c){return this.getTileByID(c.key)}getTileByID(c){return this._tiles[c]}_retainLoadedChildren(c,d,g,S){for(const M in this._tiles){let L=this._tiles[M];if(S[M]||!L.hasData()||L.tileID.overscaledZ<=d||L.tileID.overscaledZ>g)continue;let V=L.tileID;for(;L&&L.tileID.overscaledZ>d+1;){const te=L.tileID.scaledTo(L.tileID.overscaledZ-1);L=this._tiles[te.key],L&&L.hasData()&&(V=te)}let Q=V;for(;Q.overscaledZ>d;)if(Q=Q.scaledTo(Q.overscaledZ-1),c[Q.key]){S[V.key]=V;break}}}findLoadedParent(c,d){if(c.key in this._loadedParentTiles){const g=this._loadedParentTiles[c.key];return g&&g.tileID.overscaledZ>=d?g:null}for(let g=c.overscaledZ-1;g>=d;g--){const S=c.scaledTo(g),M=this._getLoadedTile(S);if(M)return M}}_getLoadedTile(c){const d=this._tiles[c.key];return d&&d.hasData()?d:this._cache.getByKey(this._source.reparseOverscaled?c.wrapped().key:c.canonical.key)}updateCacheSize(c,d){d=d||this._source.tileSize;const g=Math.ceil(c.width/d)+1,S=Math.ceil(c.height/d)+1,M=Math.floor(g*S*5),L=typeof this._minTileCacheSize=="number"?Math.max(this._minTileCacheSize,M):M,V=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,L):L;this._cache.setMaxSize(V)}handleWrapJump(c){const d=Math.round((c-(this._prevLng===void 0?c:this._prevLng))/360);if(this._prevLng=c,d){const g={};for(const S in this._tiles){const M=this._tiles[S];M.tileID=M.tileID.unwrapTo(M.tileID.wrap+d),g[M.tileID.key]=M}this._tiles=g;for(const S in this._timers)clearTimeout(this._timers[S]),delete this._timers[S];for(const S in this._tiles)this._setTileReloadTimer(+S,this._tiles[S])}}update(c,d,g){if(this.transform=c,!this._sourceLoaded||this._paused||this.transform.freezeTileCoverage||this.usedForTerrain&&!g)return;let S;this.updateCacheSize(c,d),this.transform.projection.name!=="globe"&&this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used||this.usedForTerrain?this._source.tileID?S=c.getVisibleUnwrappedCoordinates(this._source.tileID).map(V=>new gc(V.canonical.z,V.wrap,V.canonical.z,V.canonical.x,V.canonical.y)):(S=c.coveringTiles({tileSize:d||this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom&&!g,reparseOverscaled:this._source.reparseOverscaled,isTerrainDEM:this.usedForTerrain}),this._source.hasTile&&(S=S.filter(V=>this._source.hasTile(V)))):S=[];const M=this._updateRetainedTiles(S);if(JG(this._source.type)&&S.length!==0){const V={},Q={},te=Object.keys(M);for(const ge of te){const _e=M[ge],Me=this._tiles[ge];if(!Me||Me.fadeEndTime&&Me.fadeEndTime<=jo.now())continue;const Ae=this.findLoadedParent(_e,Math.max(_e.overscaledZ-d1.maxOverzooming,this._source.minzoom));Ae&&(this._addTile(Ae.tileID),V[Ae.tileID.key]=Ae.tileID),Q[ge]=_e}const ue=S[S.length-1].overscaledZ;for(const ge in this._tiles){const _e=this._tiles[ge];if(M[ge]||!_e.hasData())continue;let Me=_e.tileID;for(;Me.overscaledZ>ue;){Me=Me.scaledTo(Me.overscaledZ-1);const Ae=this._tiles[Me.key];if(Ae&&Ae.hasData()&&Q[Me.key]){M[ge]=_e.tileID;break}}}for(const ge in V)M[ge]||(this._coveredTiles[ge]=!0,M[ge]=V[ge])}for(const V in M)this._tiles[V].clearFadeHold();const L=function(V,Q){const te=[];for(const ue in V)ue in Q||te.push(ue);return te}(this._tiles,M);for(const V of L){const Q=this._tiles[V];Q.hasSymbolBuckets&&!Q.holdingForFade()?Q.setHoldDuration(this.map._fadeDuration):Q.hasSymbolBuckets&&!Q.symbolFadeFinished()||this._removeTile(+V)}this._updateLoadedParentTileCache(),this._onlySymbols&&this._source.afterUpdate&&this._source.afterUpdate()}releaseSymbolFadeTiles(){for(const c in this._tiles)this._tiles[c].holdingForFade()&&this._removeTile(+c)}_updateRetainedTiles(c){const d={};if(c.length===0)return d;const g={},S=c.reduce((te,ue)=>Math.min(te,ue.overscaledZ),1/0),M=c[0].overscaledZ,L=Math.max(M-d1.maxOverzooming,this._source.minzoom),V=Math.max(M+d1.maxUnderzooming,this._source.minzoom),Q={};for(const te of c){const ue=this._addTile(te);d[te.key]=te,ue.hasData()||S<this._source.maxzoom&&(Q[te.key]=te)}this._retainLoadedChildren(Q,S,V,d);for(const te of c){let ue=this._tiles[te.key];if(ue.hasData())continue;if(te.canonical.z>=this._source.maxzoom){const _e=te.children(this._source.maxzoom)[0],Me=this.getTile(_e);if(Me&&Me.hasData()){d[_e.key]=_e;continue}}else{const _e=te.children(this._source.maxzoom);if(d[_e[0].key]&&d[_e[1].key]&&d[_e[2].key]&&d[_e[3].key])continue}let ge=ue.wasRequested();for(let _e=te.overscaledZ-1;_e>=L;--_e){const Me=te.scaledTo(_e);if(g[Me.key]||(g[Me.key]=!0,ue=this.getTile(Me),!ue&&ge&&(ue=this._addTile(Me)),ue&&(d[Me.key]=Me,ge=ue.wasRequested(),ue.hasData())))break}}return d}_updateLoadedParentTileCache(){this._loadedParentTiles={};for(const c in this._tiles){const d=[];let g,S=this._tiles[c].tileID;for(;S.overscaledZ>0;){if(S.key in this._loadedParentTiles){g=this._loadedParentTiles[S.key];break}d.push(S.key);const M=S.scaledTo(S.overscaledZ-1);if(g=this._getLoadedTile(M),g)break;S=M}for(const M of d)this._loadedParentTiles[M]=g}}_addTile(c){let d=this._tiles[c.key];if(d)return d;d=this._cache.getAndRemove(c),d&&(this._setTileReloadTimer(c.key,d),d.tileID=c,this._state.initializeTileState(d,this.map?this.map.painter:null),this._cacheTimers[c.key]&&(clearTimeout(this._cacheTimers[c.key]),delete this._cacheTimers[c.key],this._setTileReloadTimer(c.key,d)));const g=Boolean(d);if(!g){const S=this.map?this.map.painter:null;d=new rn(c,this._source.tileSize*c.overscaleFactor(),this.transform.tileZoom,S,this._isRaster),this._loadTile(d,this._tileLoaded.bind(this,d,c.key,d.state))}return d?(d.uses++,this._tiles[c.key]=d,g||this._source.fire(new es("dataloading",{tile:d,coord:d.tileID,dataType:"source"})),d):null}_setTileReloadTimer(c,d){c in this._timers&&(clearTimeout(this._timers[c]),delete this._timers[c]);const g=d.getExpiryTimeout();g&&(this._timers[c]=setTimeout(()=>{this._reloadTile(c,"expired"),delete this._timers[c]},g))}_removeTile(c){const d=this._tiles[c];d&&(d.uses--,delete this._tiles[c],this._timers[c]&&(clearTimeout(this._timers[c]),delete this._timers[c]),d.uses>0||(d.hasData()&&d.state!=="reloading"?this._cache.add(d.tileID,d,d.getExpiryTimeout()):(d.aborted=!0,this._abortTile(d),this._unloadTile(d))))}clearTiles(){this._shouldReloadOnResume=!1,this._paused=!1;for(const c in this._tiles)this._removeTile(+c);this._source._clear&&this._source._clear(),this._cache.reset(),this.map&&this.usedForTerrain&&this.map.painter.terrain&&this.map.painter.terrain.resetTileLookupCache(this.id)}tilesIn(c,d,g){const S=[],M=this.transform;if(!M)return S;const L=M.projection.name==="globe",V=Bh(M.center.lng);for(const Q in this._tiles){const te=this._tiles[Q];if(g&&te.clearQueryDebugViz(),te.holdingForFade())continue;let ue;if(L){const ge=te.tileID.canonical;if(ge.z===0){const _e=[Math.abs(q(V,...wT(ge,-1))-V),Math.abs(q(V,...wT(ge,1))-V)];ue=[0,2*_e.indexOf(Math.min(..._e))-1]}else{const _e=[Math.abs(q(V,...wT(ge,-1))-V),Math.abs(q(V,...wT(ge,0))-V),Math.abs(q(V,...wT(ge,1))-V)];ue=[_e.indexOf(Math.min(..._e))-1]}}else ue=[0];for(const ge of ue){const _e=c.containsTile(te,M,d,ge);_e&&S.push(_e)}}return S}getVisibleCoordinates(c){const d=this.getRenderableIds(c).map(g=>this._tiles[g].tileID);for(const g of d)g.projMatrix=this.transform.calculateProjMatrix(g.toUnwrapped());return d}hasTransition(){if(this._source.hasTransition())return!0;if(JG(this._source.type))for(const c in this._tiles){const d=this._tiles[c];if(d.fadeEndTime!==void 0&&d.fadeEndTime>=jo.now())return!0}return!1}setFeatureState(c,d,g){this._state.updateState(c=c||"_geojsonTileLayer",d,g)}removeFeatureState(c,d,g){this._state.removeFeatureState(c=c||"_geojsonTileLayer",d,g)}getFeatureState(c,d){return this._state.getState(c=c||"_geojsonTileLayer",d)}setDependencies(c,d,g){const S=this._tiles[c];S&&S.setDependencies(d,g)}reloadTilesForDependencies(c,d){for(const g in this._tiles)this._tiles[g].hasDependency(c,d)&&this._reloadTile(+g,"reloading");this._cache.filter(g=>!g.hasDependency(c,d))}_preloadTiles(c,d){if(!this._sourceLoaded){const V=()=>{this._sourceLoaded&&(this._source.off("data",V),this._preloadTiles(c,d))};return void this._source.on("data",V)}const g=new Map,S=Array.isArray(c)?c:[c],M=this.map.painter.terrain,L=this.usedForTerrain&&M?M.getScaledDemTileSize():this._source.tileSize;for(const V of S){const Q=V.coveringTiles({tileSize:L,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom&&!this.usedForTerrain,reparseOverscaled:this._source.reparseOverscaled,isTerrainDEM:this.usedForTerrain});for(const te of Q)g.set(te.key,te);this.usedForTerrain&&V.updateElevation(!1)}ce(Array.from(g.values()),(V,Q)=>{const te=new rn(V,this._source.tileSize*V.overscaleFactor(),this.transform.tileZoom,this.map.painter,this._isRaster);this._loadTile(te,ue=>{this._source.type==="raster-dem"&&te.dem&&this._backfillDEM(te),Q(ue,te)})},d)}}function QG(f,c){const d=Math.abs(2*f.wrap)-+(f.wrap<0),g=Math.abs(2*c.wrap)-+(c.wrap<0);return f.overscaledZ-c.overscaledZ||g-d||c.canonical.y-f.canonical.y||c.canonical.x-f.canonical.x}function JG(f){return f==="raster"||f==="image"||f==="video"||f==="custom"}function wT(f,c){const d=1<<f.z;return[f.x/d+c,(f.x+1)/d+c]}d1.maxOverzooming=10,d1.maxUnderzooming=3;class Ek{constructor(c,d,g){this._demTile=c,this._dem=this._demTile.dem,this._scale=d,this._offset=g}static create(c,d,g){const S=g||c.findDEMTileFor(d);if(!S||!S.dem)return;const M=S.dem,L=S.tileID,V=1<<d.canonical.z-L.canonical.z;return new Ek(S,S.tileSize/$n/V,[(d.canonical.x/V-L.canonical.x)*M.dim,(d.canonical.y/V-L.canonical.y)*M.dim])}tileCoordToPixel(c,d){const g=d*this._scale+this._offset[1],S=Math.floor(c*this._scale+this._offset[0]),M=Math.floor(g);return new D(S,M)}getElevationAt(c,d,g,S){const M=c*this._scale+this._offset[0],L=d*this._scale+this._offset[1],V=Math.floor(M),Q=Math.floor(L),te=this._dem;return S=!!S,g?Ii(Ii(te.get(V,Q,S),te.get(V,Q+1,S),L-Q),Ii(te.get(V+1,Q,S),te.get(V+1,Q+1,S),L-Q),M-V):te.get(V,Q,S)}getElevationAtPixel(c,d,g){return this._dem.get(c,d,!!g)}getMeterToDEM(c){return(1<<this._demTile.tileID.canonical.z)*Dd(1,c)*this._dem.stride}}class eq{constructor(c,d){this.tileID=c,this.x=c.canonical.x,this.y=c.canonical.y,this.z=c.canonical.z,this.grid=new Jp($n,16,0),this.featureIndexArray=new rm,this.promoteId=d}insert(c,d,g,S,M,L=0){const V=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(g,S,M,L);const Q=this.grid;for(let te=0;te<d.length;te++){const ue=d[te],ge=[1/0,1/0,-1/0,-1/0];for(let _e=0;_e<ue.length;_e++){const Me=ue[_e];ge[0]=Math.min(ge[0],Me.x),ge[1]=Math.min(ge[1],Me.y),ge[2]=Math.max(ge[2],Me.x),ge[3]=Math.max(ge[3],Me.y)}ge[0]<$n&&ge[1]<$n&&ge[2]>=0&&ge[3]>=0&&Q.insert(V,ge[0],ge[1],ge[2],ge[3])}}loadVTLayers(){if(!this.vtLayers){this.vtLayers=new R0(new Vw(this.rawTileData)).layers,this.sourceLayerCoder=new wk(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"]),this.vtFeatures={};for(const c in this.vtLayers)this.vtFeatures[c]=[]}return this.vtLayers}query(c,d,g,S){this.loadVTLayers();const M=c.params||{},L=d0(M.filter),V=c.tileResult,Q=c.transform,te=V.bufferedTilespaceBounds,ue=this.grid.query(te.min.x,te.min.y,te.max.x,te.max.y,(Ae,Ne,Qe,ft)=>hR(V.bufferedTilespaceGeometry,Ae,Ne,Qe,ft));ue.sort(Xve);let ge=null;Q.elevation&&ue.length>0&&(ge=Ek.create(Q.elevation,this.tileID));const _e={};let Me;for(let Ae=0;Ae<ue.length;Ae++){const Ne=ue[Ae];if(Ne===Me)continue;Me=Ne;const Qe=this.featureIndexArray.get(Ne);let ft=null;this.loadMatchingFeature(_e,Qe,L,M.layers,M.availableImages,d,g,S,(Ct,dt,wt,Rt=0)=>(ft||(ft=cm(Ct,this.tileID.canonical,c.tileTransform)),dt.queryIntersectsFeature(V,Ct,wt,ft,this.z,c.transform,c.pixelPosMatrix,ge,Rt)))}return _e}loadMatchingFeature(c,d,g,S,M,L,V,Q,te){const{featureIndex:ue,bucketIndex:ge,sourceLayerIndex:_e,layoutVertexArrayOffset:Me}=d,Ae=this.bucketLayerIDs[ge];if(S&&!function(Ct,dt){for(let wt=0;wt<Ct.length;wt++)if(dt.indexOf(Ct[wt])>=0)return!0;return!1}(S,Ae))return;const Ne=this.sourceLayerCoder.decode(_e),Qe=this.vtLayers[Ne].feature(ue);if(g.needGeometry){const Ct=Gv(Qe,!0);if(!g.filter(new he(this.tileID.overscaledZ),Ct,this.tileID.canonical))return}else if(!g.filter(new he(this.tileID.overscaledZ),Qe))return;const ft=this.getId(Qe,Ne);for(let Ct=0;Ct<Ae.length;Ct++){const dt=Ae[Ct];if(S&&S.indexOf(dt)<0)continue;const wt=L[dt];if(!wt)continue;let Rt={};ft!==void 0&&Q&&(Rt=Q.getState(wt.sourceLayer||"_geojsonTileLayer",ft));const Mt=J({},V[dt]);Mt.paint=tq(Mt.paint,wt.paint,Qe,Rt,M),Mt.layout=tq(Mt.layout,wt.layout,Qe,Rt,M);const cr=!te||te(Qe,wt,Rt,Me);if(!cr)continue;const sr=new B(Qe,this.z,this.x,this.y,ft);sr.layer=Mt;let Cr=c[dt];Cr===void 0&&(Cr=c[dt]=[]),Cr.push({featureIndex:ue,feature:sr,intersectionZ:cr})}}lookupSymbolFeatures(c,d,g,S,M,L,V,Q){const te={};this.loadVTLayers();const ue=d0(M);for(const ge of c)this.loadMatchingFeature(te,{bucketIndex:g,sourceLayerIndex:S,featureIndex:ge,layoutVertexArrayOffset:0},ue,L,V,Q,d);return te}loadFeature(c){const{featureIndex:d,sourceLayerIndex:g}=c;this.loadVTLayers();const S=this.sourceLayerCoder.decode(g),M=this.vtFeatures[S];if(M[d])return M[d];const L=this.vtLayers[S].feature(d);return M[d]=L,L}hasLayer(c){for(const d of this.bucketLayerIDs)for(const g of d)if(c===g)return!0;return!1}getId(c,d){let g=c.id;if(this.promoteId){const S=typeof this.promoteId=="string"?this.promoteId:this.promoteId[d];S!=null&&(g=c.properties[S]),typeof g=="boolean"&&(g=Number(g))}return g}}function tq(f,c,d,g,S){return Ce(f,(M,L)=>{const V=c instanceof ut?c.get(L):null;return V&&V.evaluate?V.evaluate(d,g,S):V})}function Xve(f,c){return c-f}Sn(eq,"FeatureIndex",{omit:["rawTileData","sourceLayerCoder"]});class rq{constructor(c,d){this.width=c,this.height=d,this.nextRow=0,this.image=new um({width:c,height:d}),this.positions={},this.uploaded=!1}getDash(c,d){const g=this.getKey(c,d);return this.positions[g]}trim(){const c=this.width,d=this.height=xe(this.nextRow);this.image.resize({width:c,height:d})}getKey(c,d){return c.join(",")+d}getDashRanges(c,d,g){const S=[];let M=c.length%2==1?-c[c.length-1]*g:0,L=c[0]*g,V=!0;S.push({left:M,right:L,isDash:V,zeroLength:c[0]===0});let Q=c[0];for(let te=1;te<c.length;te++){V=!V;const ue=c[te];M=Q*g,Q+=ue,L=Q*g,S.push({left:M,right:L,isDash:V,zeroLength:ue===0})}return S}addRoundDash(c,d,g){const S=d/2;for(let M=-g;M<=g;M++){const L=this.width*(this.nextRow+g+M);let V=0,Q=c[V];for(let te=0;te<this.width;te++){te/Q.right>1&&(Q=c[++V]);const ue=Math.abs(te-Q.left),ge=Math.abs(te-Q.right),_e=Math.min(ue,ge);let Me;const Ae=M/g*(S+1);if(Q.isDash){const Ne=S-Math.abs(Ae);Me=Math.sqrt(_e*_e+Ne*Ne)}else Me=S-Math.sqrt(_e*_e+Ae*Ae);this.image.data[L+te]=Math.max(0,Math.min(255,Me+128))}}}addRegularDash(c,d){for(let Q=c.length-1;Q>=0;--Q){const te=c[Q],ue=c[Q+1];te.zeroLength?c.splice(Q,1):ue&&ue.isDash===te.isDash&&(ue.left=te.left,c.splice(Q,1))}const g=c[0],S=c[c.length-1];g.isDash===S.isDash&&(g.left=S.left-this.width,S.right=g.right+this.width);const M=this.width*this.nextRow;let L=0,V=c[L];for(let Q=0;Q<this.width;Q++){Q/V.right>1&&(V=c[++L]);const te=Math.abs(Q-V.left),ue=Math.abs(Q-V.right),ge=Math.min(te,ue);this.image.data[M+Q]=Math.max(0,Math.min(255,(V.isDash?ge:-ge)+d+128))}}addDash(c,d){const g=this.getKey(c,d);if(this.positions[g])return this.positions[g];const S=d==="round",M=S?7:0,L=2*M+1;if(this.nextRow+L>this.height)return ze("LineAtlas out of space"),null;c.length===0&&c.push(1);let V=0;for(let ue=0;ue<c.length;ue++)c[ue]<0&&(ze("Negative value is found in line dasharray, replacing values with 0"),c[ue]=0),V+=c[ue];if(V!==0){const ue=this.width/V,ge=this.getDashRanges(c,this.width,ue);S?this.addRoundDash(ge,ue,M):this.addRegularDash(ge,d==="square"?.5*ue:0)}const Q=this.nextRow+M;this.nextRow+=L;const te={tl:[Q,M],br:[V,0]};return this.positions[g]=te,te}}Sn(rq,"LineAtlas");const nq=1*Fd;class iq{constructor(c){const d={},g=[];for(const V in c){const Q=c[V],te=d[V]={};for(const ue in Q.glyphs){const ge=Q.glyphs[+ue];if(!ge||ge.bitmap.width===0||ge.bitmap.height===0)continue;const _e=ge.metrics.localGlyph?nq:1,Me={x:0,y:0,w:ge.bitmap.width+2*_e,h:ge.bitmap.height+2*_e};g.push(Me),te[ue]=Me}}const{w:S,h:M}=nT(g),L=new um({width:S||1,height:M||1});for(const V in c){const Q=c[V];for(const te in Q.glyphs){const ue=Q.glyphs[+te];if(!ue||ue.bitmap.width===0||ue.bitmap.height===0)continue;const ge=d[V][te],_e=ue.metrics.localGlyph?nq:1;um.copy(ue.bitmap,L,{x:0,y:0},{x:ge.x+_e,y:ge.y+_e},ue.bitmap)}}this.image=L,this.positions=d}}Sn(iq,"GlyphAtlas");class Yve{constructor(c){this.tileID=new gc(c.tileID.overscaledZ,c.tileID.wrap,c.tileID.canonical.z,c.tileID.canonical.x,c.tileID.canonical.y),this.tileZoom=c.tileZoom,this.uid=c.uid,this.zoom=c.zoom,this.canonical=c.tileID.canonical,this.pixelRatio=c.pixelRatio,this.tileSize=c.tileSize,this.source=c.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=c.showCollisionBoxes,this.collectResourceTiming=!!c.collectResourceTiming,this.returnDependencies=!!c.returnDependencies,this.promoteId=c.promoteId,this.enableTerrain=!!c.enableTerrain,this.isSymbolTile=c.isSymbolTile,this.tileTransform=Qv(c.tileID.canonical,c.projection),this.projection=c.projection}parse(c,d,g,S,M){this.status="parsing",this.data=c,this.collisionBoxArray=new $o;const L=new wk(Object.keys(c.layers).sort()),V=new eq(this.tileID,this.promoteId);V.bucketLayerIDs=[];const Q={},te=new rq(256,256),ue={featureIndex:V,iconDependencies:{},patternDependencies:{},glyphDependencies:{},lineAtlas:te,availableImages:g},ge=d.familiesBySource[this.source];for(const Rt in ge){const Mt=c.layers[Rt];if(!Mt)continue;let cr=!1,sr=!1;for(const hr of ge[Rt])hr[0].type==="symbol"?cr=!0:sr=!0;if(this.isSymbolTile===!0&&!cr||this.isSymbolTile===!1&&!sr)continue;Mt.version===1&&ze(`Vector tile source "${this.source}" layer "${Rt}" does not use vector tile spec v2 and therefore may have some rendering errors.`);const Cr=L.encode(Rt),Kr=[];for(let hr=0;hr<Mt.length;hr++){const Mr=Mt.feature(hr),Ar=V.getId(Mr,Rt);Kr.push({feature:Mr,id:Ar,index:hr,sourceLayerIndex:Cr})}for(const hr of ge[Rt]){const Mr=hr[0];this.isSymbolTile!==void 0&&Mr.type==="symbol"!==this.isSymbolTile||Mr.minzoom&&this.zoom<Math.floor(Mr.minzoom)||Mr.maxzoom&&this.zoom>=Mr.maxzoom||Mr.visibility!=="none"&&(nz(hr,this.zoom,g),(Q[Mr.id]=Mr.createBucket({index:V.bucketLayerIDs.length,layers:hr,zoom:this.zoom,canonical:this.canonical,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:Cr,sourceID:this.source,enableTerrain:this.enableTerrain,projection:this.projection.spec,availableImages:g})).populate(Kr,ue,this.tileID.canonical,this.tileTransform),V.bucketLayerIDs.push(hr.map(Ar=>Ar.id)))}}let _e,Me,Ae,Ne;te.trim();const Qe={type:"maybePrepare",isSymbolTile:this.isSymbolTile,zoom:this.zoom},ft=()=>{if(_e)return M(_e);if(Me&&Ae&&Ne){const Rt=new iq(Me),Mt=new QR(Ae,Ne);for(const cr in Q){const sr=Q[cr];sr instanceof Ag?(nz(sr.layers,this.zoom,g),NF(sr,Me,Rt.positions,Ae,Mt.iconPositions,this.showCollisionBoxes,g,this.tileID.canonical,this.tileZoom,this.projection)):sr.hasPattern&&(sr instanceof $f||sr instanceof Ow||sr instanceof r1)&&(nz(sr.layers,this.zoom,g),sr.addFeatures(ue,this.tileID.canonical,Mt.patternPositions,g,this.tileTransform))}this.status="done",M(null,{buckets:fe(Q).filter(cr=>!cr.isEmpty()),featureIndex:V,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:Rt.image,lineAtlas:te,imageAtlas:Mt,glyphMap:this.returnDependencies?Me:null,iconMap:this.returnDependencies?Ae:null,glyphPositions:this.returnDependencies?Rt.positions:null})}},Ct=Ce(ue.glyphDependencies,Rt=>Object.keys(Rt).map(Number));Object.keys(Ct).length?S.send("getGlyphs",{uid:this.uid,stacks:Ct},(Rt,Mt)=>{_e||(_e=Rt,Me=Mt,ft())},void 0,!1,Qe):Me={};const dt=Object.keys(ue.iconDependencies);dt.length?S.send("getImages",{icons:dt,source:this.source,tileID:this.tileID,type:"icons"},(Rt,Mt)=>{_e||(_e=Rt,Ae=Mt,ft())},void 0,!1,Qe):Ae={};const wt=Object.keys(ue.patternDependencies);wt.length?S.send("getImages",{icons:wt,source:this.source,tileID:this.tileID,type:"patterns"},(Rt,Mt)=>{_e||(_e=Rt,Ne=Mt,ft())},void 0,!1,Qe):Ne={},ft()}}function nz(f,c,d){const g=new he(c);for(const S of f)S.recalculate(g,d)}class oq{constructor(c){this.entries={},this.scheduler=c}request(c,d,g,S){const M=this.entries[c]=this.entries[c]||{callbacks:[]};if(M.result){const[L,V]=M.result;return this.scheduler?this.scheduler.add(()=>{S(L,V)},d):S(L,V),()=>{}}return M.callbacks.push(S),M.cancel||(M.cancel=g((L,V)=>{M.result=[L,V];for(const Q of M.callbacks)this.scheduler?this.scheduler.add(()=>{Q(L,V)},d):Q(L,V);setTimeout(()=>delete this.entries[c],3e3)})),()=>{M.result||(M.callbacks=M.callbacks.filter(L=>L!==S),M.callbacks.length||(M.cancel(),delete this.entries[c]))}}}function sq(f,c,d){const g=JSON.stringify(f.request);return f.data&&(this.deduped.entries[g]={result:[null,f.data]}),this.deduped.request(g,{type:"parseTile",isSymbolTile:f.isSymbolTile,zoom:f.tileZoom},S=>{const M=Dt(f.request,(L,V,Q,te)=>{L?S(L):V&&S(null,{vectorTile:d?void 0:new R0(new Vw(V)),rawData:V,cacheControl:Q,expires:te})});return()=>{M.cancel(),S()}},c)}const aq=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array];class iz{static from(c){if(!(c instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");const[d,g]=new Uint8Array(c,0,2);if(d!==219)throw new Error("Data does not appear to be in a KDBush format.");const S=g>>4;if(S!==1)throw new Error(`Got v${S} data when expected v1.`);const M=aq[15&g];if(!M)throw new Error("Unrecognized array type.");const[L]=new Uint16Array(c,2,1),[V]=new Uint32Array(c,4,1);return new iz(V,L,M,c)}constructor(c,d=64,g=Float64Array,S){if(isNaN(c)||c<0)throw new Error(`Unpexpected numItems value: ${c}.`);this.numItems=+c,this.nodeSize=Math.min(Math.max(+d,2),65535),this.ArrayType=g,this.IndexArrayType=c<65536?Uint16Array:Uint32Array;const M=aq.indexOf(this.ArrayType),L=2*c*this.ArrayType.BYTES_PER_ELEMENT,V=c*this.IndexArrayType.BYTES_PER_ELEMENT,Q=(8-V%8)%8;if(M<0)throw new Error(`Unexpected typed array class: ${g}.`);S&&S instanceof ArrayBuffer?(this.data=S,this.ids=new this.IndexArrayType(this.data,8,c),this.coords=new this.ArrayType(this.data,8+V+Q,2*c),this._pos=2*c,this._finished=!0):(this.data=new ArrayBuffer(8+L+V+Q),this.ids=new this.IndexArrayType(this.data,8,c),this.coords=new this.ArrayType(this.data,8+V+Q,2*c),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+M]),new Uint16Array(this.data,2,1)[0]=d,new Uint32Array(this.data,4,1)[0]=c)}add(c,d){const g=this._pos>>1;return this.ids[g]=g,this.coords[this._pos++]=c,this.coords[this._pos++]=d,g}finish(){const c=this._pos>>1;if(c!==this.numItems)throw new Error(`Added ${c} items when expected ${this.numItems}.`);return oz(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(c,d,g,S){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:M,coords:L,nodeSize:V}=this,Q=[0,M.length-1,0],te=[];for(;Q.length;){const ue=Q.pop()||0,ge=Q.pop()||0,_e=Q.pop()||0;if(ge-_e<=V){for(let Qe=_e;Qe<=ge;Qe++){const ft=L[2*Qe],Ct=L[2*Qe+1];ft>=c&&ft<=g&&Ct>=d&&Ct<=S&&te.push(M[Qe])}continue}const Me=_e+ge>>1,Ae=L[2*Me],Ne=L[2*Me+1];Ae>=c&&Ae<=g&&Ne>=d&&Ne<=S&&te.push(M[Me]),(ue===0?c<=Ae:d<=Ne)&&(Q.push(_e),Q.push(Me-1),Q.push(1-ue)),(ue===0?g>=Ae:S>=Ne)&&(Q.push(Me+1),Q.push(ge),Q.push(1-ue))}return te}within(c,d,g){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:S,coords:M,nodeSize:L}=this,V=[0,S.length-1,0],Q=[],te=g*g;for(;V.length;){const ue=V.pop()||0,ge=V.pop()||0,_e=V.pop()||0;if(ge-_e<=L){for(let Qe=_e;Qe<=ge;Qe++)cq(M[2*Qe],M[2*Qe+1],c,d)<=te&&Q.push(S[Qe]);continue}const Me=_e+ge>>1,Ae=M[2*Me],Ne=M[2*Me+1];cq(Ae,Ne,c,d)<=te&&Q.push(S[Me]),(ue===0?c-g<=Ae:d-g<=Ne)&&(V.push(_e),V.push(Me-1),V.push(1-ue)),(ue===0?c+g>=Ae:d+g>=Ne)&&(V.push(Me+1),V.push(ge),V.push(1-ue))}return Q}}function oz(f,c,d,g,S,M){if(S-g<=d)return;const L=g+S>>1;lq(f,c,L,g,S,M),oz(f,c,d,g,L-1,1-M),oz(f,c,d,L+1,S,1-M)}function lq(f,c,d,g,S,M){for(;S>g;){if(S-g>600){const te=S-g+1,ue=d-g+1,ge=Math.log(te),_e=.5*Math.exp(2*ge/3),Me=.5*Math.sqrt(ge*_e*(te-_e)/te)*(ue-te/2<0?-1:1);lq(f,c,d,Math.max(g,Math.floor(d-ue*_e/te+Me)),Math.min(S,Math.floor(d+(te-ue)*_e/te+Me)),M)}const L=c[2*d+M];let V=g,Q=S;for(CT(f,c,g,d),c[2*S+M]>L&&CT(f,c,g,S);V<Q;){for(CT(f,c,V,Q),V++,Q--;c[2*V+M]<L;)V++;for(;c[2*Q+M]>L;)Q--}c[2*g+M]===L?CT(f,c,g,Q):(Q++,CT(f,c,Q,S)),Q<=d&&(g=Q+1),d<=Q&&(S=Q-1)}}function CT(f,c,d,g){sz(f,d,g),sz(c,2*d,2*g),sz(c,2*d+1,2*g+1)}function sz(f,c,d){const g=f[c];f[c]=f[d],f[d]=g}function cq(f,c,d,g){const S=f-d,M=c-g;return S*S+M*M}s.ARRAY_TYPE=ca,s.AUTH_ERR_MSG=tt,s.Aabb=mc,s.Actor=class{constructor(f,c,d){this.target=f,this.parent=c,this.mapId=d,this.callbacks={},this.cancelCallbacks={},me(["receive"],this),this.target.addEventListener("message",this.receive,!1),this.globalScope=Tt()?f:l,this.scheduler=new QF}send(f,c,d,g,S=!1,M){const L=Math.round(1e18*Math.random()).toString(36).substring(0,10);d&&(d.metadata=M,this.callbacks[L]=d);const V=It(this.globalScope)?void 0:[];return this.target.postMessage({id:L,type:f,hasCallback:!!d,targetMapId:g,mustQueue:S,sourceMapId:this.mapId,data:hg(c,V)},V),{cancel:()=>{d&&delete this.callbacks[L],this.target.postMessage({id:L,type:"<cancel>",targetMapId:g,sourceMapId:this.mapId})}}}receive(f){const c=f.data,d=c.id;if(d&&(!c.targetMapId||this.mapId===c.targetMapId))if(c.type==="<cancel>"){const g=this.cancelCallbacks[d];delete this.cancelCallbacks[d],g&&g.cancel()}else if(c.mustQueue||Tt()){const g=this.callbacks[d];this.cancelCallbacks[d]=this.scheduler.add(()=>this.processTask(d,c),g&&g.metadata||{type:"message"})}else this.processTask(d,c)}processTask(f,c){if(c.type==="<response>"){const d=this.callbacks[f];delete this.callbacks[f],d&&(c.error?d(em(c.error)):d(null,em(c.data)))}else{const d=It(this.globalScope)?void 0:[],g=c.hasCallback?(M,L)=>{delete this.cancelCallbacks[f],this.target.postMessage({id:f,type:"<response>",sourceMapId:this.mapId,error:M?hg(M):null,data:hg(L,d)},d)}:M=>{},S=em(c.data);if(this.parent[c.type])this.parent[c.type](c.sourceMapId,S,g);else if(this.parent.getWorkerSource){const M=c.type.split(".");this.parent.getWorkerSource(c.sourceMapId,M[0],S.source)[M[1]](S,g)}else g(new Error(`Could not find function ${c.type}`))}}remove(){this.scheduler.remove(),this.target.removeEventListener("message",this.receive,!1)}},s.CanonicalTileID=Uh,s.Color=Bn,s.ColorMode=Rg,s.CullFaceMode=hm,s.DEMData=Ff,s.DataConstantProperty=De,s.DedupedRequest=oq,s.DepthMode=n2,s.EXTENT=$n,s.Elevation=class{isDataAvailableAtPoint(f){const c=this._source();if(this.isUsingMockSource()||!c||f.y<0||f.y>1)return!1;const d=c.getSource().maxzoom,g=1<<d,S=Math.floor(f.x),M=Math.floor((f.x-S)*g),L=Math.floor(f.y*g),V=this.findDEMTileFor(new gc(d,S,d,M,L));return!(!V||!V.dem)}getAtPointOrZero(f,c=0){return this.getAtPoint(f,c)||0}getAtPoint(f,c,d=!0){if(this.isUsingMockSource())return null;c==null&&(c=null);const g=this._source();if(!g||f.y<0||f.y>1)return c;const S=g.getSource().maxzoom,M=1<<S,L=Math.floor(f.x),V=f.x-L,Q=new gc(S,L,S,Math.floor(V*M),Math.floor(f.y*M)),te=this.findDEMTileFor(Q);if(!te||!te.dem)return c;const ue=te.dem,ge=1<<te.tileID.canonical.z,_e=(V*ge-te.tileID.canonical.x)*ue.dim,Me=(f.y*ge-te.tileID.canonical.y)*ue.dim,Ae=Math.floor(_e),Ne=Math.floor(Me);return(d?this.exaggeration():1)*Ii(Ii(ue.get(Ae,Ne),ue.get(Ae,Ne+1),Me-Ne),Ii(ue.get(Ae+1,Ne),ue.get(Ae+1,Ne+1),Me-Ne),_e-Ae)}getAtTileOffset(f,c,d){const g=1<<f.canonical.z;return this.getAtPointOrZero(new Wv(f.wrap+(f.canonical.x+c/$n)/g,(f.canonical.y+d/$n)/g))}getAtTileOffsetFunc(f,c,d,g){return S=>{const M=this.getAtTileOffset(f,S.x,S.y),L=g.upVector(f.canonical,S.x,S.y);return du(L,L,M*g.upVectorScale(f.canonical,c,d).metersToTile),L}}getForTilePoints(f,c,d,g){if(this.isUsingMockSource())return!1;const S=Ek.create(this,f,g);return!!S&&(c.forEach(M=>{M[2]=this.exaggeration()*S.getElevationAt(M[0],M[1],d)}),!0)}getMinMaxForTile(f){if(this.isUsingMockSource())return null;const c=this.findDEMTileFor(f);if(!c||!c.dem)return null;const d=c.dem.tree,g=c.tileID,S=1<<f.canonical.z-g.canonical.z;let M=f.canonical.x/S-g.canonical.x,L=f.canonical.y/S-g.canonical.y,V=0;for(let Q=0;Q<f.canonical.z-g.canonical.z&&!d.leaves[V];Q++){M*=2,L*=2;const te=2*Math.floor(L)+Math.floor(M);V=d.childOffsets[V]+te,M%=1,L%=1}return{min:this.exaggeration()*d.minimums[V],max:this.exaggeration()*d.maximums[V]}}getMinElevationBelowMSL(){throw new Error("Pure virtual method called.")}raycast(f,c,d){throw new Error("Pure virtual method called.")}pointCoordinate(f){throw new Error("Pure virtual method called.")}_source(){throw new Error("Pure virtual method called.")}isUsingMockSource(){throw new Error("Pure virtual method called.")}exaggeration(){throw new Error("Pure virtual method called.")}findDEMTileFor(f){throw new Error("Pure virtual method called.")}get visibleDemTiles(){throw new Error("Getter must be implemented in subclass.")}},s.ErrorEvent=Pi,s.EvaluationParameters=he,s.Event=es,s.Evented=Ns,s.FillExtrusionBucket=r1,s.Frustum=AS,s.FrustumCorners=Al,s.GLOBE_RADIUS=Od,s.GLOBE_SCALE_MATCH_LATITUDE=45,s.GLOBE_ZOOM_THRESHOLD_MAX=nR,s.GLOBE_ZOOM_THRESHOLD_MIN=mw,s.GlobeSharedBuffers=class{constructor(f){this._createGrid(f),this._createPoles(f)}destroy(){this._poleIndexBuffer.destroy(),this._gridBuffer.destroy(),this._gridIndexBuffer.destroy(),this._poleNorthVertexBuffer.destroy(),this._poleSouthVertexBuffer.destroy();for(const f of this._poleSegments)f.destroy();for(const f of this._gridSegments)f.withSkirts.destroy(),f.withoutSkirts.destroy();if(this._wireframeIndexBuffer){this._wireframeIndexBuffer.destroy();for(const f of this._wireframeSegments)f.destroy()}}_fillGridMeshWithLods(f,c){const d=new Wr,g=new An,S=[],M=f+1+2,L=c[0]+1,V=c[0]+1+(1+c.length),Q=(te,ue,ge)=>{let _e=te===M-1?te-2:te===0?te:te-1;return _e+=ge?24575:0,[_e,ue]};for(let te=0;te<M;++te)d.emplaceBack(...Q(te,0,!0));for(let te=0;te<L;++te)for(let ue=0;ue<M;++ue)d.emplaceBack(...Q(ue,te,(ue===0||ue===M-1)&&!0));for(let te=0;te<c.length;++te){const ue=c[te];for(let ge=0;ge<M;++ge)d.emplaceBack(...Q(ge,ue,!0))}for(let te=0;te<c.length;++te){const ue=g.length,ge=c[te]+1+2,_e=new An;for(let Ne=0;Ne<ge-1;Ne++){const Qe=Ne===ge-2,ft=Qe?M*(V-c.length+te-Ne):M;for(let Ct=0;Ct<M-1;Ct++){const dt=Ne*M+Ct;Ne===0||Qe||Ct===0||Ct===M-2?(_e.emplaceBack(dt+1,dt,dt+ft),_e.emplaceBack(dt+ft,dt+ft+1,dt+1)):(g.emplaceBack(dt+1,dt,dt+ft),g.emplaceBack(dt+ft,dt+ft+1,dt+1))}}const Me=la.simpleSegment(0,ue,d.length,g.length-ue);for(let Ne=0;Ne<_e.uint16.length;Ne+=3)g.emplaceBack(_e.uint16[Ne],_e.uint16[Ne+1],_e.uint16[Ne+2]);const Ae=la.simpleSegment(0,ue,d.length,g.length-ue);S.push({withoutSkirts:Me,withSkirts:Ae})}return{vertices:d,indices:g,segments:S}}_createGrid(f){const c=this._fillGridMeshWithLods(Bv,X_);this._gridSegments=c.segments,this._gridBuffer=f.createVertexBuffer(c.vertices,zv.members),this._gridIndexBuffer=f.createIndexBuffer(c.indices,!0)}_createPoles(f){const c=new An;for(let S=0;S<=Bv;S++)c.emplaceBack(0,S+1,S+2);this._poleIndexBuffer=f.createIndexBuffer(c,!0);const d=new No,g=new No;this._poleSegments=[];for(let S=0,M=0;S<mw;S++){const L=360/(1<<S);d.emplaceBack(0,-Od,0,.5,0),g.emplaceBack(0,-Od,0,.5,1);for(let V=0;V<=Bv;V++){const Q=V/Bv,te=Ii(0,L,Q),[ue,ge,_e]=jv(Hv,P4,te,Od);d.emplaceBack(ue,ge,_e,Q,0),g.emplaceBack(ue,ge,_e,Q,1)}this._poleSegments.push(la.simpleSegment(M,0,66,64)),M+=66}this._poleNorthVertexBuffer=f.createVertexBuffer(d,wg,!1),this._poleSouthVertexBuffer=f.createVertexBuffer(g,wg,!1)}getGridBuffers(f,c){return[this._gridBuffer,this._gridIndexBuffer,c?this._gridSegments[f].withSkirts:this._gridSegments[f].withoutSkirts]}getPoleBuffers(f){return[this._poleNorthVertexBuffer,this._poleSouthVertexBuffer,this._poleIndexBuffer,this._poleSegments[f]]}getWirefameBuffers(f,c){if(!this._wireframeSegments){const d=new ol,g=Bv,S=g+1+2,M=1;this._wireframeSegments=[];for(let L=0,V=0;L<X_.length;L++){const Q=X_[L];for(let ue=M;ue<Q+M;ue++)for(let ge=M;ge<g+M;ge++){const _e=ue*S+ge;d.emplaceBack(_e,_e+1),d.emplaceBack(_e,_e+S),d.emplaceBack(_e,_e+S+1)}const te=Q*g*3;this._wireframeSegments.push(la.simpleSegment(0,V,(Q+1)*S,te)),V+=te}this._wireframeIndexBuffer=f.createIndexBuffer(d)}return[this._gridBuffer,this._wireframeIndexBuffer,this._wireframeSegments[c]]}},s.GlyphManager=L0,s.ImagePosition=iT,s.KDBush=iz,s.LivePerformanceUtils=Vn,s.LngLat=Wo,s.LngLatBounds=im,s.LocalGlyphMode=fT,s.MAX_MERCATOR_LATITUDE=kl,s.MercatorCoordinate=Wv,s.ONE_EM=al,s.OverscaledTileID=gc,s.PerformanceMarkers=Xr,s.Point=D,s.Properties=mt,s.RGBAImage=mu,s.Ray=pw,s.RequestManager=class{constructor(f,c,d){this._transformRequestFn=f,this._customAccessToken=c,this._silenceAuthErrors=!!d,this._createSkuToken()}_createSkuToken(){const f=function(){let c="";for(let d=0;d<10;d++)c+="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"[Math.floor(62*Math.random())];return{token:["1",E,c].join(""),tokenExpiresAt:Date.now()+432e5}}();this._skuToken=f.token,this._skuTokenExpiresAt=f.tokenExpiresAt}_isSkuTokenExpired(){return Date.now()>this._skuTokenExpiresAt}transformRequest(f,c){return this._transformRequestFn&&this._transformRequestFn(f,c)||{url:f}}normalizeStyleURL(f,c){if(!_t(f))return f;const d=rr(f);return d.path=`/styles/v1${d.path}`,this._makeAPIURL(d,this._customAccessToken||c)}normalizeGlyphsURL(f,c){if(!_t(f))return f;const d=rr(f);return d.path=`/fonts/v1${d.path}`,this._makeAPIURL(d,this._customAccessToken||c)}normalizeSourceURL(f,c,d,g){if(!_t(f))return f;const S=rr(f);return S.path=`/v4/${S.authority}.json`,S.params.push("secure"),d&&S.params.push(`language=${d}`),g&&S.params.push(`worldview=${g}`),this._makeAPIURL(S,this._customAccessToken||c)}normalizeSpriteURL(f,c,d,g){const S=rr(f);return _t(f)?(S.path=`/styles/v1${S.path}/sprite${c}${d}`,this._makeAPIURL(S,this._customAccessToken||g)):(S.path+=`${c}${d}`,tr(S))}normalizeTileURL(f,c,d){if(this._isSkuTokenExpired()&&this._createSkuToken(),f&&!_t(f))return f;const g=rr(f);g.path=g.path.replace(/(\.(png|jpg)\d*)(?=$)/,`${c||d&&g.authority!=="raster"&&d===512?"@2x":""}${v.supported?".webp":"$1"}`),g.authority==="raster"?g.path=`/${m.RASTER_URL_PREFIX}${g.path}`:(g.path=g.path.replace(/^.+\/v4\//,"/"),g.path=`/${m.TILE_URL_VERSION}${g.path}`);const S=this._customAccessToken||function(M){for(const L of M){const V=L.match(/^access_token=(.*)$/);if(V)return V[1]}return null}(g.params)||m.ACCESS_TOKEN;return m.REQUIRE_ACCESS_TOKEN&&S&&this._skuToken&&g.params.push(`sku=${this._skuToken}`),this._makeAPIURL(g,S)}canonicalizeTileURL(f,c){const d=rr(f);if(!d.path.match(/^(\/v4\/|\/raster\/v1\/)/)||!d.path.match(/\.[\w]+$/))return f;let g="mapbox://";d.path.match(/^\/raster\/v1\//)?g+=`raster/${d.path.replace(`/${m.RASTER_URL_PREFIX}/`,"")}`:g+=`tiles/${d.path.replace(`/${m.TILE_URL_VERSION}/`,"")}`;let S=d.params;return c&&(S=S.filter(M=>!M.match(/^access_token=/))),S.length&&(g+=`?${S.join("&")}`),g}canonicalizeTileset(f,c){const d=!!c&&_t(c),g=[];for(const S of f.tiles||[])Ot(S)?g.push(this.canonicalizeTileURL(S,d)):g.push(S);return g}_makeAPIURL(f,c){const d="See https://docs.mapbox.com/api/overview/#access-tokens-and-token-scopes",g=rr(m.API_URL);if(f.protocol=g.protocol,f.authority=g.authority,f.protocol==="http"){const S=f.params.indexOf("secure");S>=0&&f.params.splice(S,1)}if(g.path!=="/"&&(f.path=`${g.path}${f.path}`),!m.REQUIRE_ACCESS_TOKEN)return tr(f);if(c=c||m.ACCESS_TOKEN,!this._silenceAuthErrors){if(!c)throw new Error(`An API access token is required to use Mapbox GL. ${d}`);if(c[0]==="s")throw new Error(`Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). ${d}`)}return f.params=f.params.filter(S=>S.indexOf("access_token")===-1),f.params.push(`access_token=${c||""}`),tr(f)}},s.ResourceType=Ut,s.SegmentVector=la,s.SourceCache=d1,s.StencilMode=ez,s.StructArrayLayout1ui2=dc,s.StructArrayLayout2f1f2i16=Gn,s.StructArrayLayout2i4=Wr,s.StructArrayLayout2ui4=ol,s.StructArrayLayout3f12=bi,s.StructArrayLayout3ui6=An,s.StructArrayLayout4i8=Tr,s.StructArrayLayout5f20=No,s.Texture=f1,s.Tile=rn,s.Transitionable=Le,s.Uniform1f=H_,s.Uniform1i=class extends Md{constructor(f){super(f),this.current=0}set(f,c,d){this.fetchUniformLocation(f,c)&&this.current!==d&&(this.current=d,this.gl.uniform1i(this.location,d))}},s.Uniform2f=class extends Md{constructor(f){super(f),this.current=[0,0]}set(f,c,d){this.fetchUniformLocation(f,c)&&(d[0]===this.current[0]&&d[1]===this.current[1]||(this.current=d,this.gl.uniform2f(this.location,d[0],d[1])))}},s.Uniform3f=class extends Md{constructor(f){super(f),this.current=[0,0,0]}set(f,c,d){this.fetchUniformLocation(f,c)&&(d[0]===this.current[0]&&d[1]===this.current[1]&&d[2]===this.current[2]||(this.current=d,this.gl.uniform3f(this.location,d[0],d[1],d[2])))}},s.Uniform4f=SS,s.UniformColor=uu,s.UniformMatrix2f=class extends Md{constructor(f){super(f),this.current=HA}set(f,c,d){if(this.fetchUniformLocation(f,c)){for(let g=0;g<4;g++)if(d[g]!==this.current[g]){this.current=d,this.gl.uniformMatrix2fv(this.location,!1,d);break}}}},s.UniformMatrix3f=class extends Md{constructor(f){super(f),this.current=TS}set(f,c,d){if(this.fetchUniformLocation(f,c)){for(let g=0;g<9;g++)if(d[g]!==this.current[g]){this.current=d,this.gl.uniformMatrix3fv(this.location,!1,d);break}}}},s.UniformMatrix4f=class extends Md{constructor(f){super(f),this.current=gg}set(f,c,d){if(this.fetchUniformLocation(f,c)){if(d[12]!==this.current[12]||d[0]!==this.current[0])return this.current=d,void this.gl.uniformMatrix4fv(this.location,!1,d);for(let g=1;g<16;g++)if(d[g]!==this.current[g]){this.current=d,this.gl.uniformMatrix4fv(this.location,!1,d);break}}}},s.UnwrappedTileID=Ni,s.ValidationError=wn,s.VectorTileFeature=$w,s.VectorTileWorkerSource=class extends Ns{constructor(f,c,d,g,S){super(),this.actor=f,this.layerIndex=c,this.availableImages=d,this.loadVectorData=S||sq,this.loading={},this.loaded={},this.deduped=new oq(f.scheduler),this.isSpriteLoaded=g,this.scheduler=f.scheduler}loadTile(f,c){const d=f.uid,g=f&&f.request,S=g&&g.collectResourceTiming,M=this.loading[d]=new Yve(f);M.abort=this.loadVectorData(f,(L,V)=>{const Q=!this.loading[d];if(delete this.loading[d],Q||L||!V)return M.status="done",Q||(this.loaded[d]=M),c(L);const te=V.rawData,ue={};V.expires&&(ue.expires=V.expires),V.cacheControl&&(ue.cacheControl=V.cacheControl),M.vectorTile=V.vectorTile||new R0(new Vw(te));const ge=()=>{M.parse(M.vectorTile,this.layerIndex,this.availableImages,this.actor,(_e,Me)=>{if(_e||!Me)return c(_e);const Ae={};if(S){const Ne=oi(g);Ne.length>0&&(Ae.resourceTiming=JSON.parse(JSON.stringify(Ne)))}c(null,J({rawTileData:te.slice(0)},Me,ue,Ae))})};this.isSpriteLoaded?ge():this.once("isSpriteLoaded",()=>{this.scheduler?this.scheduler.add(ge,{type:"parseTile",isSymbolTile:f.isSymbolTile,zoom:f.tileZoom}):ge()}),this.loaded=this.loaded||{},this.loaded[d]=M})}reloadTile(f,c){const d=this.loaded,g=f.uid,S=this;if(d&&d[g]){const M=d[g];M.showCollisionBoxes=f.showCollisionBoxes,M.enableTerrain=!!f.enableTerrain,M.projection=f.projection,M.tileTransform=Qv(f.tileID.canonical,f.projection);const L=(V,Q)=>{const te=M.reloadCallback;te&&(delete M.reloadCallback,M.parse(M.vectorTile,S.layerIndex,this.availableImages,S.actor,te)),c(V,Q)};M.status==="parsing"?M.reloadCallback=L:M.status==="done"&&(M.vectorTile?M.parse(M.vectorTile,this.layerIndex,this.availableImages,this.actor,L):L())}}abortTile(f,c){const d=f.uid,g=this.loading[d];g&&(g.abort&&g.abort(),delete this.loading[d]),c()}removeTile(f,c){const d=this.loaded,g=f.uid;d&&d[g]&&delete d[g],c()}},s.WritingMode=Ju,s.ZoomDependentExpression=Tv,s.add=Rd,s.addDynamicAttributes=t2,s.adjoint=function(f,c){var d=c[0],g=c[1],S=c[2],M=c[3],L=c[4],V=c[5],Q=c[6],te=c[7],ue=c[8];return f[0]=L*ue-V*te,f[1]=S*te-g*ue,f[2]=g*V-S*L,f[3]=V*Q-M*ue,f[4]=d*ue-S*Q,f[5]=S*M-d*V,f[6]=M*te-L*Q,f[7]=g*Q-d*te,f[8]=d*L-g*M,f},s.asyncAll=ce,s.bezier=F,s.bindAll=me,s.boundsAttributes=Ur,s.bufferConvexPolygon=function(f,c){const d=[];for(let g=0;g<f.length;g++){const S=re(g-1,-1,f.length-1),M=re(g+1,-1,f.length-1),L=f[g],V=f[M],Q=f[S].sub(L).unit(),te=V.sub(L).unit(),ue=te.angleWithSep(Q.x,Q.y),ge=Q.add(te).unit().mult(-1*c/Math.sin(ue/2));d.push(L.add(ge))}return d},s.cacheEntryPossiblyAdded=function(f){Ft++,Ft>Ke&&(f.getActor().send("enforceCacheSizeLimit",Be),Ft=0)},s.calculateGlobeLabelMatrix=function(f,c){const{x:d,y:g}=f.point,S=NS(d,g,f.worldSize/f._pixelsPerMercatorPixel,0,0);return _g(S,S,K_(hu(c)))},s.calculateGlobeMatrix=function(f){const{x:c,y:d}=f.point,{lng:g,lat:S}=f._center;return NS(c,d,f.worldSize,g,S)},s.calculateGlobeMercatorMatrix=function(f){const c=f.pixelsPerMeter,d=c/Dd(1,f.center.lat),g=fu(new Float64Array(16));return b0(g,g,[f.point.x,f.point.y,0]),Nv(g,g,[d,d,c]),Float32Array.from(g)},s.circumferenceAtLatitude=$S,s.clamp=q,s.clearTileCache=function(f){if(!Je())return;const c=l.caches.delete(Te);f&&c.catch(f).then(()=>f())},s.clipLine=ck,s.clone=function(f){var c=new ca(16);return c[0]=f[0],c[1]=f[1],c[2]=f[2],c[3]=f[3],c[4]=f[4],c[5]=f[5],c[6]=f[6],c[7]=f[7],c[8]=f[8],c[9]=f[9],c[10]=f[10],c[11]=f[11],c[12]=f[12],c[13]=f[13],c[14]=f[14],c[15]=f[15],c},s.clone$1=Re,s.collisionCircleLayout=mF,s.config=m,s.conjugate=function(f,c){return f[0]=-c[0],f[1]=-c[1],f[2]=-c[2],f[3]=c[3],f},s.create=function(){var f=new ca(16);return ca!=Float32Array&&(f[1]=0,f[2]=0,f[3]=0,f[4]=0,f[6]=0,f[7]=0,f[8]=0,f[9]=0,f[11]=0,f[12]=0,f[13]=0,f[14]=0),f[0]=1,f[5]=1,f[10]=1,f[15]=1,f},s.create$1=ZA,s.createExpression=lg,s.createLayout=Vt,s.createStyleLayer=function(f){return f.type==="custom"?new XF(f):new KF[f.type](f)},s.cross=kd,s.degToRad=j,s.distance=function(f,c){return Math.hypot(c[0]-f[0],c[1]-f[1],c[2]-f[2])},s.div=function(f,c,d){return f[0]=c[0]/d[0],f[1]=c[1]/d[1],f[2]=c[2]/d[2],f},s.dot=Ku,s.earthRadius=P0,s.ease=G,s.easeCubicInOut=O,s.ecefToLatLng=function([f,c,d]){const g=Math.hypot(f,c,d),S=Math.atan2(f,d),M=.5*Math.PI-Math.acos(-c/g);return new Wo($(S),$(M))},s.emitValidationErrors=ow,s.endsWith=pe,s.enforceCacheSizeLimit=function(f){St(),ot&&ot.then(c=>{c.keys().then(d=>{for(let g=0;g<d.length-f;g++)c.delete(d[g])})})},s.evaluateSizeForFeature=zw,s.evaluateSizeForZoom=Yv,s.evaluateVariableOffset=dk,s.evented=U,s.exactEquals=function(f,c){return f[0]===c[0]&&f[1]===c[1]&&f[2]===c[2]&&f[3]===c[3]},s.exactEquals$1=function(f,c){return f[0]===c[0]&&f[1]===c[1]&&f[2]===c[2]},s.exported=jo,s.exported$1=v,s.extend=J,s.extend$1=Oi,s.fillExtrusionHeightLift=zR,s.filterObject=Pe,s.fromMat4=function(f,c){return f[0]=c[0],f[1]=c[1],f[2]=c[2],f[3]=c[4],f[4]=c[5],f[5]=c[6],f[6]=c[8],f[7]=c[9],f[8]=c[10],f},s.fromQuat=function(f,c){var d=c[0],g=c[1],S=c[2],M=c[3],L=d+d,V=g+g,Q=S+S,te=d*L,ue=g*L,ge=g*V,_e=S*L,Me=S*V,Ae=S*Q,Ne=M*L,Qe=M*V,ft=M*Q;return f[0]=1-ge-Ae,f[1]=ue+ft,f[2]=_e-Qe,f[3]=0,f[4]=ue-ft,f[5]=1-te-Ae,f[6]=Me+Ne,f[7]=0,f[8]=_e+Qe,f[9]=Me-Ne,f[10]=1-te-ge,f[11]=0,f[12]=0,f[13]=0,f[14]=0,f[15]=1,f},s.fromRotation=function(f,c){var d=Math.sin(c),g=Math.cos(c);return f[0]=g,f[1]=d,f[2]=0,f[3]=-d,f[4]=g,f[5]=0,f[6]=0,f[7]=0,f[8]=1,f},s.fromScaling=w0,s.furthestTileCorner=function(f){const c=Math.round((f+45+360)%360/90)%4;return z[c]},s.getAABBPointSquareDist=function(f,c,d){let g=0;for(let S=0;S<2;++S){const M=d?d[S]:0;f[S]>M&&(g+=(f[S]-M)*(f[S]-M)),c[S]<M&&(g+=(M-c[S])*(M-c[S]))}return g},s.getAnchorAlignment=aT,s.getAnchorJustification=hT,s.getBounds=function(f){let c=1/0,d=1/0,g=-1/0,S=-1/0;for(const M of f)c=Math.min(c,M.x),d=Math.min(d,M.y),g=Math.max(g,M.x),S=Math.max(S,M.y);return{min:new D(c,d),max:new D(g,S)}},s.getColumn=de,s.getDefaultExportFromCjs=T,s.getGridMatrix=function(f,c,d,g){const S=c.getNorth(),M=c.getSouth(),L=c.getWest(),V=c.getEast(),Q=1<<f.z,te=V-L,ue=S-M,ge=te/Bv,_e=-ue/X_[d],Me=[0,ge,0,_e,0,0,S,L,0];if(f.z>0){const Ae=180/g;QA(Me,Me,[Ae/te+1,0,0,0,Ae/ue+1,0,-.5*Ae/ge,.5*Ae/_e,1])}return Me[2]=Q,Me[5]=f.x,Me[8]=f.y,Me},s.getImage=Xe,s.getJSON=function(f,c){return mr(J(f,{type:"json"}),c)},s.getLatitudinalLod=function(f){const c=kl-5;f=q(f,-c,c)/c*90;const d=Math.pow(Math.abs(Math.sin(j(f))),3);return Math.round(d*(X_.length-1))},s.getMapSessionAPI=Ir,s.getPerformanceMeasurement=oi,s.getProjection=_k,s.getRTLTextPluginStatus=K,s.getReferrer=kr,s.getTilePoint=function(f,{x:c,y:d},g=0){return new D(((c-g)*f.scale-f.x)*$n,(d*f.scale-f.y)*$n)},s.getTileVec3=function(f,c,d=0){return sm(((c.x-d)*f.scale-f.x)*$n,(c.y*f.scale-f.y)*$n,sR(c.z,c.y))},s.getVideo=function(f,c){const d=l.document.createElement("video");d.muted=!0,d.onloadstart=function(){c(null,d)};for(let g=0;g<f.length;g++){const S=l.document.createElement("source");Jr(f[g])||(d.crossOrigin="Anonymous"),S.src=f[g],d.appendChild(S)}return{cancel:()=>{}}},s.globeCenterToScreenPoint=function(f){const c=[0,0,0],d=fu(new Float64Array(16));return _g(d,f.pixelMatrix,f.globeMatrix),Bs(c,c,d),new D(c[0],c[1])},s.globeDenormalizeECEF=K_,s.globeECEFOrigin=function(f,c){const d=[0,0,0];return Bs(d,d,lm(hu(c.canonical))),Bs(d,d,f),d},s.globeMetersToEcef=gw,s.globeNormalizeECEF=lm,s.globePixelsToTileUnits=function(f,c){return $n/(512*Math.pow(2,f))*T0(hu(c))},s.globePoleMatrixForTile=function(f,c,d){const g=fu(new Float64Array(16)),S=(c/(1<<f)-.5)*Math.PI*2;return om(g,d.globeMatrix,S),Float32Array.from(g)},s.globeTileBounds=hu,s.globeTiltAtLngLat=Z_,s.globeToMercatorTransition=Vv,s.globeUseCustomAntiAliasing=function(f,c,d){const g=Vv(d.zoom),S=f.style.map._antialias,M=!!c.extStandardDerivatives,L=c.extStandardDerivativesForceOff||f.terrain&&f.terrain.exaggeration()>0;return g===0&&!S&&!L&&M},s.identity=fu,s.identity$1=q_,s.invert=xg,s.isFullscreen=function(){return!!l.document.fullscreenElement||!!l.document.webkitFullscreenElement},s.isLngLatBehindGlobe=xw,s.isMapAuthenticated=function(f){return Br.has(f)},s.isMapboxURL=_t,s.isSafariWithAntialiasingBug=function(f){const c=f.navigator?f.navigator.userAgent:null;return!!It(f)&&c&&(c.match("Version/15.4")||c.match("Version/15.5")||c.match(/CPU (OS|iPhone OS) (15_4|15_5) like Mac OS X/))},s.latFromMercatorY=Rl,s.latLngToECEF=Uv,s.len=C4,s.length=C0,s.length$1=function(f){return Math.hypot(f[0],f[1],f[2],f[3])},s.lngFromMercatorX=Zu,s.loadVectorTile=sq,s.makeRequest=mr,s.mapValue=function(f,c,d,g,S){return q((f-c)/(d-c)*(S-g)+g,g,S)},s.mercatorScale=FS,s.mercatorXfromLng=Bh,s.mercatorYfromLat=jh,s.mercatorZfromAltitude=Dd,s.mul=eR,s.mul$1=w4,s.multiply=_g,s.multiply$1=QA,s.multiply$2=tR,s.nextPowerOfTwo=xe,s.normalize=pc,s.normalize$1=hw,s.normalize$2=fw,s.number=Ii,s.ortho=function(f,c,d,g,S,M,L){var V=1/(c-d),Q=1/(g-S),te=1/(M-L);return f[0]=-2*V,f[1]=0,f[2]=0,f[3]=0,f[4]=0,f[5]=-2*Q,f[6]=0,f[7]=0,f[8]=0,f[9]=0,f[10]=2*te,f[11]=0,f[12]=(c+d)*V,f[13]=(S+g)*Q,f[14]=(L+M)*te,f[15]=1,f},s.pbf=GR,s.perspective=function(f,c,d,g,S){var M,L=1/Math.tan(c/2);return f[0]=L/d,f[1]=0,f[2]=0,f[3]=0,f[4]=0,f[5]=L,f[6]=0,f[7]=0,f[8]=0,f[9]=0,f[11]=-1,f[12]=0,f[13]=0,f[15]=0,S!=null&&S!==1/0?(f[10]=(S+g)*(M=1/(g-S)),f[14]=2*S*g*M):(f[10]=-1,f[14]=-2*g),f},s.pick=function(f,c){const d={};for(let g=0;g<c.length;g++){const S=c[g];S in f&&(d[S]=f[S])}return d},s.plugin=ae,s.pointGeometry=Z,s.polesInViewport=function(f){const c=fu(new Float64Array(16));_g(c,f.pixelMatrix,f.globeMatrix);const d=[0,sl,0],g=[0,Is,0];return Bs(d,d,c),Bs(g,g,c),[d[0]>0&&d[0]<=f.width&&d[1]>0&&d[1]<=f.height&&!xw(f,new Wo(f.center.lat,90)),g[0]>0&&g[0]<=f.width&&g[1]>0&&g[1]<=f.height&&!xw(f,new Wo(f.center.lat,-90))]},s.polygonContainsPoint=qv,s.polygonIntersectsBox=hR,s.polygonIntersectsPolygon=cR,s.polygonizeBounds=function(f,c,d=0,g=!0){const S=new D(d,d),M=f.sub(S),L=c.add(S),V=[M,new D(L.x,M.y),L,new D(M.x,L.y)];return g&&V.push(M.clone()),V},s.posAttributes=zv,s.postMapLoadEvent=Ht,s.postPerformanceEvent=$t,s.postTurnstileEvent=gt,s.potpack=nT,s.prevPowerOfTwo=function(f){return f<=1?1:Math.pow(2,Math.floor(Math.log(f)/Math.LN2))},s.radToDeg=$,s.refProperties=["type","source","source-layer","minzoom","maxzoom","filter","layout"],s.registerForPluginStateChange=function(f){return f({pluginStatus:I,pluginURL:h}),U.on("pluginStateChange",f),f},s.removeAuthState=function(f){Br.delete(f)},s.renderColorRamp=Tw,s.resample=aR,s.rotateX=cw,s.rotateX$1=Fv,s.rotateY=om,s.rotateY$1=ui,s.rotateZ=function(f,c,d){var g=Math.sin(d),S=Math.cos(d),M=c[0],L=c[1],V=c[2],Q=c[3],te=c[4],ue=c[5],ge=c[6],_e=c[7];return c!==f&&(f[8]=c[8],f[9]=c[9],f[10]=c[10],f[11]=c[11],f[12]=c[12],f[13]=c[13],f[14]=c[14],f[15]=c[15]),f[0]=M*S+te*g,f[1]=L*S+ue*g,f[2]=V*S+ge*g,f[3]=Q*S+_e*g,f[4]=te*S-M*g,f[5]=ue*S-L*g,f[6]=ge*S-V*g,f[7]=_e*S-Q*g,f},s.rotateZ$1=function(f,c,d){d*=.5;var g=c[0],S=c[1],M=c[2],L=c[3],V=Math.sin(d),Q=Math.cos(d);return f[0]=g*Q+S*V,f[1]=S*Q-g*V,f[2]=M*Q+L*V,f[3]=L*Q-M*V,f},s.scale=Nv,s.scale$1=zh,s.scale$2=du,s.scaleAndAdd=$v,s.set=function(f,c,d,g){return f[0]=c,f[1]=d,f[2]=g,f},s.setCacheLimits=function(f,c){Be=f,Ke=c},s.setColumn=function(f,c,d){f[4*c+0]=d[0],f[4*c+1]=d[1],f[4*c+2]=d[2],f[4*c+3]=d[3]},s.setRTLTextPlugin=function(f,c,d=!1){if(I===g0||I===v0||I===U_)throw new Error("setRTLTextPlugin cannot be called multiple times.");h=jo.resolveURL(f),I=g0,pg=c,R(),d||ne()},s.smoothstep=ee,s.spec=dr,s.squaredLength=function(f){var c=f[0],d=f[1],g=f[2];return c*c+d*d+g*g},s.storeAuthState=function(f,c){c?Br.add(f):Br.delete(f)},s.sub=Nf,s.subtract=E0,s.symbolSize=Bw,s.tileAABB=function(f,c,d,g,S,M,L,V,Q){if(Q.name==="globe")return T4(f,c,new Uh(d,g,S));const te=Qv({z:d,x:g,y:S},Q);return new mc([(M+te.x/te.scale)*c,c*(te.y/te.scale),L],[(M+te.x2/te.scale)*c,c*(te.y2/te.scale),V])},s.tileCornersToBounds=yw,s.tileTransform=Qv,s.transformMat3=function(f,c,d){var g=c[0],S=c[1],M=c[2];return f[0]=g*d[0]+S*d[3]+M*d[6],f[1]=g*d[1]+S*d[4]+M*d[7],f[2]=g*d[2]+S*d[5]+M*d[8],f},s.transformMat4=Bs,s.transformMat4$1=am,s.transformQuat=IS,s.transitionTileAABBinECEF=OS,s.translate=b0,s.transpose=function(f,c){if(f===c){var d=c[1],g=c[2],S=c[5];f[1]=c[3],f[2]=c[6],f[3]=d,f[5]=c[7],f[6]=g,f[7]=S}else f[0]=c[0],f[1]=c[3],f[2]=c[6],f[3]=c[1],f[4]=c[4],f[5]=c[7],f[6]=c[2],f[7]=c[5],f[8]=c[8];return f},s.triggerPluginCompletionEvent=b,s.uniqueId=ve,s.updateGlobeVertexNormal=function(f,c,d,g,S){const M=5*c+2;f.float32[M+0]=d,f.float32[M+1]=g,f.float32[M+2]=S},s.validateCustomStyleLayer=function(f){const c=[],d=f.id;return d===void 0&&c.push({message:`layers.${d}: missing required property "id"`}),f.render===void 0&&c.push({message:`layers.${d}: missing required method "render"`}),f.renderingMode&&f.renderingMode!=="2d"&&f.renderingMode!=="3d"&&c.push({message:`layers.${d}: property "renderingMode" must be either "2d" or "3d"`}),c},s.validateFilter=f=>Ca(Av(f)),s.validateFog=f=>Ca(nw(f)),s.validateLayer=f=>Ca(nt(f)),s.validateLight=f=>Ca(rw(f)),s.validateSource=f=>Ca(Lc(f)),s.validateStyle=iw,s.validateTerrain=f=>Ca($_(f)),s.values=fe,s.vectorTile=Dw,s.version=u,s.warnOnce=ze,s.window=l,s.wrap=re}),o(["./shared"],function(s){function l(We){if(typeof We=="number"||typeof We=="boolean"||typeof We=="string"||We==null)return JSON.stringify(We);if(Array.isArray(We)){let $e="[";for(const Xe of We)$e+=`${l(Xe)},`;return`${$e}]`}let Oe="{";for(const $e of Object.keys(We).sort())Oe+=`${$e}:${l(We[$e])},`;return`${Oe}}`}function u(We){let Oe="";for(const $e of s.refProperties)Oe+=`/${l(We[$e])}`;return Oe}class p{constructor(Oe){this.keyCache={},Oe&&this.replace(Oe)}replace(Oe){this._layerConfigs={},this._layers={},this.update(Oe,[])}update(Oe,$e){for(const tt of Oe)this._layerConfigs[tt.id]=tt,(this._layers[tt.id]=s.createStyleLayer(tt)).compileFilter(),this.keyCache[tt.id]&&delete this.keyCache[tt.id];for(const tt of $e)delete this.keyCache[tt],delete this._layerConfigs[tt],delete this._layers[tt];this.familiesBySource={};const Xe=function(tt,_t){const Ot={};for(let bt=0;bt<tt.length;bt++){const Wt=_t&&_t[tt[bt].id]||u(tt[bt]);_t&&(_t[tt[bt].id]=Wt);let Sr=Ot[Wt];Sr||(Sr=Ot[Wt]=[]),Sr.push(tt[bt])}const Nt=[];for(const bt in Ot)Nt.push(Ot[bt]);return Nt}(s.values(this._layerConfigs),this.keyCache);for(const tt of Xe){const _t=tt.map(rr=>this._layers[rr.id]),Ot=_t[0];if(Ot.visibility==="none")continue;const Nt=Ot.source||"";let bt=this.familiesBySource[Nt];bt||(bt=this.familiesBySource[Nt]={});const Wt=Ot.sourceLayer||"_geojsonTileLayer";let Sr=bt[Wt];Sr||(Sr=bt[Wt]=[]),Sr.push(_t)}}}class m{loadTile(Oe,$e){const{uid:Xe,encoding:tt,rawImageData:_t,padding:Ot,buildQuadTree:Nt}=Oe,bt=s.window.ImageBitmap&&_t instanceof s.window.ImageBitmap?this.getImageData(_t,Ot):_t;$e(null,new s.DEMData(Xe,bt,tt,Ot<1,Nt))}getImageData(Oe,$e){this.offscreenCanvas&&this.offscreenCanvasContext||(this.offscreenCanvas=new OffscreenCanvas(Oe.width,Oe.height),this.offscreenCanvasContext=this.offscreenCanvas.getContext("2d",{willReadFrequently:!0})),this.offscreenCanvas.width=Oe.width,this.offscreenCanvas.height=Oe.height,this.offscreenCanvasContext.drawImage(Oe,0,0,Oe.width,Oe.height);const Xe=this.offscreenCanvasContext.getImageData(-$e,-$e,Oe.width+2*$e,Oe.height+2*$e);return this.offscreenCanvasContext.clearRect(0,0,this.offscreenCanvas.width,this.offscreenCanvas.height),Xe}}function v(We,Oe){if(We.length!==0){x(We[0],Oe);for(var $e=1;$e<We.length;$e++)x(We[$e],!Oe)}}function x(We,Oe){for(var $e=0,Xe=0,tt=0,_t=We.length,Ot=_t-1;tt<_t;Ot=tt++){var Nt=(We[tt][0]-We[Ot][0])*(We[Ot][1]+We[tt][1]),bt=$e+Nt;Xe+=Math.abs($e)>=Math.abs(Nt)?$e-bt+Nt:Nt-bt+$e,$e=bt}$e+Xe>=0!=!!Oe&&We.reverse()}var y=s.getDefaultExportFromCjs(function We(Oe,$e){var Xe,tt=Oe&&Oe.type;if(tt==="FeatureCollection")for(Xe=0;Xe<Oe.features.length;Xe++)We(Oe.features[Xe],$e);else if(tt==="GeometryCollection")for(Xe=0;Xe<Oe.geometries.length;Xe++)We(Oe.geometries[Xe],$e);else if(tt==="Feature")We(Oe.geometry,$e);else if(tt==="Polygon")v(Oe.coordinates,$e);else if(tt==="MultiPolygon")for(Xe=0;Xe<Oe.coordinates.length;Xe++)v(Oe.coordinates[Xe],$e);return Oe});const _=s.VectorTileFeature.prototype.toGeoJSON;var w={exports:{}},C=s.pointGeometry,E=s.vectorTile.VectorTileFeature,T=A;function A(We,Oe){this.options=Oe||{},this.features=We,this.length=We.length}function k(We,Oe){this.id=typeof We.id=="number"?We.id:void 0,this.type=We.type,this.rawGeometry=We.type===1?[We.geometry]:We.geometry,this.properties=We.tags,this.extent=Oe||4096}A.prototype.feature=function(We){return new k(this.features[We],this.options.extent)},k.prototype.loadGeometry=function(){var We=this.rawGeometry;this.geometry=[];for(var Oe=0;Oe<We.length;Oe++){for(var $e=We[Oe],Xe=[],tt=0;tt<$e.length;tt++)Xe.push(new C($e[tt][0],$e[tt][1]));this.geometry.push(Xe)}return this.geometry},k.prototype.bbox=function(){this.geometry||this.loadGeometry();for(var We=this.geometry,Oe=1/0,$e=-1/0,Xe=1/0,tt=-1/0,_t=0;_t<We.length;_t++)for(var Ot=We[_t],Nt=0;Nt<Ot.length;Nt++){var bt=Ot[Nt];Oe=Math.min(Oe,bt.x),$e=Math.max($e,bt.x),Xe=Math.min(Xe,bt.y),tt=Math.max(tt,bt.y)}return[Oe,Xe,$e,tt]},k.prototype.toGeoJSON=E.prototype.toGeoJSON;var X=s.pbf,Z=T;function W(We){var Oe=new X;return function($e,Xe){for(var tt in $e.layers)Xe.writeMessage(3,D,$e.layers[tt])}(We,Oe),Oe.finish()}function D(We,Oe){var $e;Oe.writeVarintField(15,We.version||1),Oe.writeStringField(1,We.name||""),Oe.writeVarintField(5,We.extent||4096);var Xe={keys:[],values:[],keycache:{},valuecache:{}};for($e=0;$e<We.length;$e++)Xe.feature=We.feature($e),Oe.writeMessage(2,H,Xe);var tt=Xe.keys;for($e=0;$e<tt.length;$e++)Oe.writeStringField(3,tt[$e]);var _t=Xe.values;for($e=0;$e<_t.length;$e++)Oe.writeMessage(4,O,_t[$e])}function H(We,Oe){var $e=We.feature;$e.id!==void 0&&Oe.writeVarintField(1,$e.id),Oe.writeMessage(2,N,We),Oe.writeVarintField(3,$e.type),Oe.writeMessage(4,z,$e)}function N(We,Oe){var $e=We.feature,Xe=We.keys,tt=We.values,_t=We.keycache,Ot=We.valuecache;for(var Nt in $e.properties){var bt=$e.properties[Nt],Wt=_t[Nt];if(bt!==null){Wt===void 0&&(Xe.push(Nt),_t[Nt]=Wt=Xe.length-1),Oe.writeVarint(Wt);var Sr=typeof bt;Sr!=="string"&&Sr!=="boolean"&&Sr!=="number"&&(bt=JSON.stringify(bt));var rr=Sr+":"+bt,tr=Ot[rr];tr===void 0&&(tt.push(bt),Ot[rr]=tr=tt.length-1),Oe.writeVarint(tr)}}}function j(We,Oe){return(Oe<<3)+(7&We)}function $(We){return We<<1^We>>31}function z(We,Oe){for(var $e=We.loadGeometry(),Xe=We.type,tt=0,_t=0,Ot=$e.length,Nt=0;Nt<Ot;Nt++){var bt=$e[Nt],Wt=1;Xe===1&&(Wt=bt.length),Oe.writeVarint(j(1,Wt));for(var Sr=Xe===3?bt.length-1:bt.length,rr=0;rr<Sr;rr++){rr===1&&Xe!==1&&Oe.writeVarint(j(2,Sr-1));var tr=bt[rr].x-tt,sn=bt[rr].y-_t;Oe.writeVarint($(tr)),Oe.writeVarint($(sn)),tt+=tr,_t+=sn}Xe===3&&Oe.writeVarint(j(7,1))}}function O(We,Oe){var $e=typeof We;$e==="string"?Oe.writeStringField(1,We):$e==="boolean"?Oe.writeBooleanField(7,We):$e==="number"&&(We%1!=0?Oe.writeDoubleField(3,We):We<0?Oe.writeSVarintField(6,We):Oe.writeVarintField(5,We))}w.exports=W,w.exports.fromVectorTileJs=W,w.exports.fromGeojsonVt=function(We,Oe){Oe=Oe||{};var $e={};for(var Xe in We)$e[Xe]=new Z(We[Xe].features,Oe),$e[Xe].name=Xe,$e[Xe].version=Oe.version,$e[Xe].extent=Oe.extent;return W({layers:$e})},w.exports.GeoJSONWrapper=Z;var F=s.getDefaultExportFromCjs(w.exports);const G={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:We=>We},q=Math.fround||(ee=new Float32Array(1),We=>(ee[0]=+We,ee[0]));var ee;const re=3,ce=5,fe=6;class J{constructor(Oe){this.options=Object.assign(Object.create(G),Oe),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(Oe){const{log:$e,minZoom:Xe,maxZoom:tt}=this.options;$e&&console.time("total time");const _t=`prepare ${Oe.length} points`;$e&&console.time(_t),this.points=Oe;const Ot=[];for(let bt=0;bt<Oe.length;bt++){const Wt=Oe[bt];if(!Wt.geometry)continue;const[Sr,rr]=Wt.geometry.coordinates,tr=q(ye(Sr)),sn=q(xe(rr));Ot.push(tr,sn,1/0,bt,-1,1),this.options.reduce&&Ot.push(0)}let Nt=this.trees[tt+1]=this._createTree(Ot);$e&&console.timeEnd(_t);for(let bt=tt;bt>=Xe;bt--){const Wt=+Date.now();Nt=this.trees[bt]=this._createTree(this._cluster(Nt,bt)),$e&&console.log("z%d: %d clusters in %dms",bt,Nt.numItems,+Date.now()-Wt)}return $e&&console.timeEnd("total time"),this}getClusters(Oe,$e){let Xe=((Oe[0]+180)%360+360)%360-180;const tt=Math.max(-90,Math.min(90,Oe[1]));let _t=Oe[2]===180?180:((Oe[2]+180)%360+360)%360-180;const Ot=Math.max(-90,Math.min(90,Oe[3]));if(Oe[2]-Oe[0]>=360)Xe=-180,_t=180;else if(Xe>_t){const rr=this.getClusters([Xe,tt,180,Ot],$e),tr=this.getClusters([-180,tt,_t,Ot],$e);return rr.concat(tr)}const Nt=this.trees[this._limitZoom($e)],bt=Nt.range(ye(Xe),xe(Ot),ye(_t),xe(tt)),Wt=Nt.data,Sr=[];for(const rr of bt){const tr=this.stride*rr;Sr.push(Wt[tr+ce]>1?oe(Wt,tr,this.clusterProps):this.points[Wt[tr+re]])}return Sr}getChildren(Oe){const $e=this._getOriginId(Oe),Xe=this._getOriginZoom(Oe),tt="No cluster with the specified id.",_t=this.trees[Xe];if(!_t)throw new Error(tt);const Ot=_t.data;if($e*this.stride>=Ot.length)throw new Error(tt);const Nt=this.options.radius/(this.options.extent*Math.pow(2,Xe-1)),bt=_t.within(Ot[$e*this.stride],Ot[$e*this.stride+1],Nt),Wt=[];for(const Sr of bt){const rr=Sr*this.stride;Ot[rr+4]===Oe&&Wt.push(Ot[rr+ce]>1?oe(Ot,rr,this.clusterProps):this.points[Ot[rr+re]])}if(Wt.length===0)throw new Error(tt);return Wt}getLeaves(Oe,$e,Xe){const tt=[];return this._appendLeaves(tt,Oe,$e=$e||10,Xe=Xe||0,0),tt}getTile(Oe,$e,Xe){const tt=this.trees[this._limitZoom(Oe)],_t=Math.pow(2,Oe),{extent:Ot,radius:Nt}=this.options,bt=Nt/Ot,Wt=(Xe-bt)/_t,Sr=(Xe+1+bt)/_t,rr={features:[]};return this._addTileFeatures(tt.range(($e-bt)/_t,Wt,($e+1+bt)/_t,Sr),tt.data,$e,Xe,_t,rr),$e===0&&this._addTileFeatures(tt.range(1-bt/_t,Wt,1,Sr),tt.data,_t,Xe,_t,rr),$e===_t-1&&this._addTileFeatures(tt.range(0,Wt,bt/_t,Sr),tt.data,-1,Xe,_t,rr),rr.features.length?rr:null}getClusterExpansionZoom(Oe){let $e=this._getOriginZoom(Oe)-1;for(;$e<=this.options.maxZoom;){const Xe=this.getChildren(Oe);if($e++,Xe.length!==1)break;Oe=Xe[0].properties.cluster_id}return $e}_appendLeaves(Oe,$e,Xe,tt,_t){const Ot=this.getChildren($e);for(const Nt of Ot){const bt=Nt.properties;if(bt&&bt.cluster?_t+bt.point_count<=tt?_t+=bt.point_count:_t=this._appendLeaves(Oe,bt.cluster_id,Xe,tt,_t):_t<tt?_t++:Oe.push(Nt),Oe.length===Xe)break}return _t}_createTree(Oe){const $e=new s.KDBush(Oe.length/this.stride|0,this.options.nodeSize,Float32Array);for(let Xe=0;Xe<Oe.length;Xe+=this.stride)$e.add(Oe[Xe],Oe[Xe+1]);return $e.finish(),$e.data=Oe,$e}_addTileFeatures(Oe,$e,Xe,tt,_t,Ot){for(const Nt of Oe){const bt=Nt*this.stride,Wt=$e[bt+ce]>1;let Sr,rr,tr;if(Wt)Sr=ve($e,bt,this.clusterProps),rr=$e[bt],tr=$e[bt+1];else{const Ye=this.points[$e[bt+re]];Sr=Ye.properties;const[Ve,gt]=Ye.geometry.coordinates;rr=ye(Ve),tr=xe(gt)}const sn={type:1,geometry:[[Math.round(this.options.extent*(rr*_t-Xe)),Math.round(this.options.extent*(tr*_t-tt))]],tags:Sr};let un;un=Wt||this.options.generateId?$e[bt+re]:this.points[$e[bt+re]].id,un!==void 0&&(sn.id=un),Ot.features.push(sn)}}_limitZoom(Oe){return Math.max(this.options.minZoom,Math.min(Math.floor(+Oe),this.options.maxZoom+1))}_cluster(Oe,$e){const{radius:Xe,extent:tt,reduce:_t,minPoints:Ot}=this.options,Nt=Xe/(tt*Math.pow(2,$e)),bt=Oe.data,Wt=[],Sr=this.stride;for(let rr=0;rr<bt.length;rr+=Sr){if(bt[rr+2]<=$e)continue;bt[rr+2]=$e;const tr=bt[rr],sn=bt[rr+1],un=Oe.within(bt[rr],bt[rr+1],Nt),Ye=bt[rr+ce];let Ve=Ye;for(const gt of un){const qt=gt*Sr;bt[qt+2]>$e&&(Ve+=bt[qt+ce])}if(Ve>Ye&&Ve>=Ot){let gt,qt=tr*Ye,Ht=sn*Ye,on=-1;const $t=((rr/Sr|0)<<5)+($e+1)+this.points.length;for(const Gt of un){const Ir=Gt*Sr;if(bt[Ir+2]<=$e)continue;bt[Ir+2]=$e;const Br=bt[Ir+ce];qt+=bt[Ir]*Br,Ht+=bt[Ir+1]*Br,bt[Ir+4]=$t,_t&&(gt||(gt=this._map(bt,rr,!0),on=this.clusterProps.length,this.clusterProps.push(gt)),_t(gt,this._map(bt,Ir)))}bt[rr+4]=$t,Wt.push(qt/Ve,Ht/Ve,1/0,$t,-1,Ve),_t&&Wt.push(on)}else{for(let gt=0;gt<Sr;gt++)Wt.push(bt[rr+gt]);if(Ve>1)for(const gt of un){const qt=gt*Sr;if(!(bt[qt+2]<=$e)){bt[qt+2]=$e;for(let Ht=0;Ht<Sr;Ht++)Wt.push(bt[qt+Ht])}}}}return Wt}_getOriginId(Oe){return Oe-this.points.length>>5}_getOriginZoom(Oe){return(Oe-this.points.length)%32}_map(Oe,$e,Xe){if(Oe[$e+ce]>1){const Ot=this.clusterProps[Oe[$e+fe]];return Xe?Object.assign({},Ot):Ot}const tt=this.points[Oe[$e+re]].properties,_t=this.options.map(tt);return Xe&&_t===tt?Object.assign({},_t):_t}}function oe(We,Oe,$e){return{type:"Feature",id:We[Oe+re],properties:ve(We,Oe,$e),geometry:{type:"Point",coordinates:[(Xe=We[Oe],360*(Xe-.5)),se(We[Oe+1])]}};var Xe}function ve(We,Oe,$e){const Xe=We[Oe+ce],tt=Xe>=1e4?`${Math.round(Xe/1e3)}k`:Xe>=1e3?Math.round(Xe/100)/10+"k":Xe,_t=We[Oe+fe],Ot=_t===-1?{}:Object.assign({},$e[_t]);return Object.assign(Ot,{cluster:!0,cluster_id:We[Oe+re],point_count:Xe,point_count_abbreviated:tt})}function ye(We){return We/360+.5}function xe(We){const Oe=Math.sin(We*Math.PI/180),$e=.5-.25*Math.log((1+Oe)/(1-Oe))/Math.PI;return $e<0?0:$e>1?1:$e}function se(We){const Oe=(180-360*We)*Math.PI/180;return 360*Math.atan(Math.exp(Oe))/Math.PI-90}function me(We,Oe,$e,Xe){for(var tt,_t=Xe,Ot=$e-Oe>>1,Nt=$e-Oe,bt=We[Oe],Wt=We[Oe+1],Sr=We[$e],rr=We[$e+1],tr=Oe+3;tr<$e;tr+=3){var sn=pe(We[tr],We[tr+1],bt,Wt,Sr,rr);if(sn>_t)tt=tr,_t=sn;else if(sn===_t){var un=Math.abs(tr-Ot);un<Nt&&(tt=tr,Nt=un)}}_t>Xe&&(tt-Oe>3&&me(We,Oe,tt,Xe),We[tt+2]=_t,$e-tt>3&&me(We,tt,$e,Xe))}function pe(We,Oe,$e,Xe,tt,_t){var Ot=tt-$e,Nt=_t-Xe;if(Ot!==0||Nt!==0){var bt=((We-$e)*Ot+(Oe-Xe)*Nt)/(Ot*Ot+Nt*Nt);bt>1?($e=tt,Xe=_t):bt>0&&($e+=Ot*bt,Xe+=Nt*bt)}return(Ot=We-$e)*Ot+(Nt=Oe-Xe)*Nt}function Ce(We,Oe,$e,Xe){var tt={id:We===void 0?null:We,type:Oe,geometry:$e,tags:Xe,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return function(_t){var Ot=_t.geometry,Nt=_t.type;if(Nt==="Point"||Nt==="MultiPoint"||Nt==="LineString")Pe(_t,Ot);else if(Nt==="Polygon"||Nt==="MultiLineString")for(var bt=0;bt<Ot.length;bt++)Pe(_t,Ot[bt]);else if(Nt==="MultiPolygon")for(bt=0;bt<Ot.length;bt++)for(var Wt=0;Wt<Ot[bt].length;Wt++)Pe(_t,Ot[bt][Wt])}(tt),tt}function Pe(We,Oe){for(var $e=0;$e<Oe.length;$e+=3)We.minX=Math.min(We.minX,Oe[$e]),We.minY=Math.min(We.minY,Oe[$e+1]),We.maxX=Math.max(We.maxX,Oe[$e]),We.maxY=Math.max(We.maxY,Oe[$e+1])}function Re(We,Oe,$e,Xe){if(Oe.geometry){var tt=Oe.geometry.coordinates,_t=Oe.geometry.type,Ot=Math.pow($e.tolerance/((1<<$e.maxZoom)*$e.extent),2),Nt=[],bt=Oe.id;if($e.promoteId?bt=Oe.properties[$e.promoteId]:$e.generateId&&(bt=Xe||0),_t==="Point")ke(tt,Nt);else if(_t==="MultiPoint")for(var Wt=0;Wt<tt.length;Wt++)ke(tt[Wt],Nt);else if(_t==="LineString")ze(tt,Nt,Ot,!1);else if(_t==="MultiLineString"){if($e.lineMetrics){for(Wt=0;Wt<tt.length;Wt++)ze(tt[Wt],Nt=[],Ot,!1),We.push(Ce(bt,"LineString",Nt,Oe.properties));return}Ge(tt,Nt,Ot,!1)}else if(_t==="Polygon")Ge(tt,Nt,Ot,!0);else{if(_t!=="MultiPolygon"){if(_t==="GeometryCollection"){for(Wt=0;Wt<Oe.geometry.geometries.length;Wt++)Re(We,{id:bt,geometry:Oe.geometry.geometries[Wt],properties:Oe.properties},$e,Xe);return}throw new Error("Input data is not a valid GeoJSON object.")}for(Wt=0;Wt<tt.length;Wt++){var Sr=[];Ge(tt[Wt],Sr,Ot,!0),Nt.push(Sr)}}We.push(Ce(bt,_t,Nt,Oe.properties))}}function ke(We,Oe){Oe.push(ht(We[0])),Oe.push(Tt(We[1])),Oe.push(0)}function ze(We,Oe,$e,Xe){for(var tt,_t,Ot=0,Nt=0;Nt<We.length;Nt++){var bt=ht(We[Nt][0]),Wt=Tt(We[Nt][1]);Oe.push(bt),Oe.push(Wt),Oe.push(0),Nt>0&&(Ot+=Xe?(tt*Wt-bt*_t)/2:Math.sqrt(Math.pow(bt-tt,2)+Math.pow(Wt-_t,2))),tt=bt,_t=Wt}var Sr=Oe.length-3;Oe[2]=1,me(Oe,0,Sr,$e),Oe[Sr+2]=1,Oe.size=Math.abs(Ot),Oe.start=0,Oe.end=Oe.size}function Ge(We,Oe,$e,Xe){for(var tt=0;tt<We.length;tt++){var _t=[];ze(We[tt],_t,$e,Xe),Oe.push(_t)}}function ht(We){return We/360+.5}function Tt(We){var Oe=Math.sin(We*Math.PI/180),$e=.5-.25*Math.log((1+Oe)/(1-Oe))/Math.PI;return $e<0?0:$e>1?1:$e}function xt(We,Oe,$e,Xe,tt,_t,Ot,Nt){if(Xe/=Oe,_t>=($e/=Oe)&&Ot<Xe)return We;if(Ot<$e||_t>=Xe)return null;for(var bt=[],Wt=0;Wt<We.length;Wt++){var Sr=We[Wt],rr=Sr.geometry,tr=Sr.type,sn=tt===0?Sr.minX:Sr.minY,un=tt===0?Sr.maxX:Sr.maxY;if(sn>=$e&&un<Xe)bt.push(Sr);else if(!(un<$e||sn>=Xe)){var Ye=[];if(tr==="Point"||tr==="MultiPoint")pt(rr,Ye,$e,Xe,tt);else if(tr==="LineString")It(rr,Ye,$e,Xe,tt,!1,Nt.lineMetrics);else if(tr==="MultiLineString")de(rr,Ye,$e,Xe,tt,!1);else if(tr==="Polygon")de(rr,Ye,$e,Xe,tt,!0);else if(tr==="MultiPolygon")for(var Ve=0;Ve<rr.length;Ve++){var gt=[];de(rr[Ve],gt,$e,Xe,tt,!0),gt.length&&Ye.push(gt)}if(Ye.length){if(Nt.lineMetrics&&tr==="LineString"){for(Ve=0;Ve<Ye.length;Ve++)bt.push(Ce(Sr.id,tr,Ye[Ve],Sr.tags));continue}tr!=="LineString"&&tr!=="MultiLineString"||(Ye.length===1?(tr="LineString",Ye=Ye[0]):tr="MultiLineString"),tr!=="Point"&&tr!=="MultiPoint"||(tr=Ye.length===3?"Point":"MultiPoint"),bt.push(Ce(Sr.id,tr,Ye,Sr.tags))}}}return bt.length?bt:null}function pt(We,Oe,$e,Xe,tt){for(var _t=0;_t<We.length;_t+=3){var Ot=We[_t+tt];Ot>=$e&&Ot<=Xe&&(Oe.push(We[_t]),Oe.push(We[_t+1]),Oe.push(We[_t+2]))}}function It(We,Oe,$e,Xe,tt,_t,Ot){for(var Nt,bt,Wt=Ie(We),Sr=tt===0?Be:Ke,rr=We.start,tr=0;tr<We.length-3;tr+=3){var sn=We[tr],un=We[tr+1],Ye=We[tr+2],Ve=We[tr+3],gt=We[tr+4],qt=tt===0?sn:un,Ht=tt===0?Ve:gt,on=!1;Ot&&(Nt=Math.sqrt(Math.pow(sn-Ve,2)+Math.pow(un-gt,2))),qt<$e?Ht>$e&&(bt=Sr(Wt,sn,un,Ve,gt,$e),Ot&&(Wt.start=rr+Nt*bt)):qt>Xe?Ht<Xe&&(bt=Sr(Wt,sn,un,Ve,gt,Xe),Ot&&(Wt.start=rr+Nt*bt)):Te(Wt,sn,un,Ye),Ht<$e&&qt>=$e&&(bt=Sr(Wt,sn,un,Ve,gt,$e),on=!0),Ht>Xe&&qt<=Xe&&(bt=Sr(Wt,sn,un,Ve,gt,Xe),on=!0),!_t&&on&&(Ot&&(Wt.end=rr+Nt*bt),Oe.push(Wt),Wt=Ie(We)),Ot&&(rr+=Nt)}var $t=We.length-3;sn=We[$t],un=We[$t+1],Ye=We[$t+2],(qt=tt===0?sn:un)>=$e&&qt<=Xe&&Te(Wt,sn,un,Ye),$t=Wt.length-3,_t&&$t>=3&&(Wt[$t]!==Wt[0]||Wt[$t+1]!==Wt[1])&&Te(Wt,Wt[0],Wt[1],Wt[2]),Wt.length&&Oe.push(Wt)}function Ie(We){var Oe=[];return Oe.size=We.size,Oe.start=We.start,Oe.end=We.end,Oe}function de(We,Oe,$e,Xe,tt,_t){for(var Ot=0;Ot<We.length;Ot++)It(We[Ot],Oe,$e,Xe,tt,_t,!1)}function Te(We,Oe,$e,Xe){We.push(Oe),We.push($e),We.push(Xe)}function Be(We,Oe,$e,Xe,tt,_t){var Ot=(_t-Oe)/(Xe-Oe);return We.push(_t),We.push($e+(tt-$e)*Ot),We.push(1),Ot}function Ke(We,Oe,$e,Xe,tt,_t){var Ot=(_t-$e)/(tt-$e);return We.push(Oe+(Xe-Oe)*Ot),We.push(_t),We.push(1),Ot}function ot(We,Oe){for(var $e=[],Xe=0;Xe<We.length;Xe++){var tt,_t=We[Xe],Ot=_t.type;if(Ot==="Point"||Ot==="MultiPoint"||Ot==="LineString")tt=Ze(_t.geometry,Oe);else if(Ot==="MultiLineString"||Ot==="Polygon"){tt=[];for(var Nt=0;Nt<_t.geometry.length;Nt++)tt.push(Ze(_t.geometry[Nt],Oe))}else if(Ot==="MultiPolygon")for(tt=[],Nt=0;Nt<_t.geometry.length;Nt++){for(var bt=[],Wt=0;Wt<_t.geometry[Nt].length;Wt++)bt.push(Ze(_t.geometry[Nt][Wt],Oe));tt.push(bt)}$e.push(Ce(_t.id,Ot,tt,_t.tags))}return $e}function Ze(We,Oe){var $e=[];$e.size=We.size,We.start!==void 0&&($e.start=We.start,$e.end=We.end);for(var Xe=0;Xe<We.length;Xe+=3)$e.push(We[Xe]+Oe,We[Xe+1],We[Xe+2]);return $e}function Je(We,Oe){if(We.transformed)return We;var $e,Xe,tt,_t=1<<We.z,Ot=We.x,Nt=We.y;for($e=0;$e<We.features.length;$e++){var bt=We.features[$e],Wt=bt.geometry,Sr=bt.type;if(bt.geometry=[],Sr===1)for(Xe=0;Xe<Wt.length;Xe+=2)bt.geometry.push(St(Wt[Xe],Wt[Xe+1],Oe,_t,Ot,Nt));else for(Xe=0;Xe<Wt.length;Xe++){var rr=[];for(tt=0;tt<Wt[Xe].length;tt+=2)rr.push(St(Wt[Xe][tt],Wt[Xe][tt+1],Oe,_t,Ot,Nt));bt.geometry.push(rr)}}return We.transformed=!0,We}function St(We,Oe,$e,Xe,tt,_t){return[Math.round($e*(We*Xe-tt)),Math.round($e*(Oe*Xe-_t))]}function er(We,Oe,$e,Xe,tt){for(var _t=Oe===tt.maxZoom?0:tt.tolerance/((1<<Oe)*tt.extent),Ot={features:[],numPoints:0,numSimplified:0,numFeatures:0,source:null,x:$e,y:Xe,z:Oe,transformed:!1,minX:2,minY:1,maxX:-1,maxY:0},Nt=0;Nt<We.length;Nt++){Ot.numFeatures++,Ft(Ot,We[Nt],_t,tt);var bt=We[Nt].minX,Wt=We[Nt].minY,Sr=We[Nt].maxX,rr=We[Nt].maxY;bt<Ot.minX&&(Ot.minX=bt),Wt<Ot.minY&&(Ot.minY=Wt),Sr>Ot.maxX&&(Ot.maxX=Sr),rr>Ot.maxY&&(Ot.maxY=rr)}return Ot}function Ft(We,Oe,$e,Xe){var tt=Oe.geometry,_t=Oe.type,Ot=[];if(_t==="Point"||_t==="MultiPoint")for(var Nt=0;Nt<tt.length;Nt+=3)Ot.push(tt[Nt]),Ot.push(tt[Nt+1]),We.numPoints++,We.numSimplified++;else if(_t==="LineString")Ut(Ot,tt,We,$e,!1,!1);else if(_t==="MultiLineString"||_t==="Polygon")for(Nt=0;Nt<tt.length;Nt++)Ut(Ot,tt[Nt],We,$e,_t==="Polygon",Nt===0);else if(_t==="MultiPolygon")for(var bt=0;bt<tt.length;bt++){var Wt=tt[bt];for(Nt=0;Nt<Wt.length;Nt++)Ut(Ot,Wt[Nt],We,$e,!0,Nt===0)}if(Ot.length){var Sr=Oe.tags||null;if(_t==="LineString"&&Xe.lineMetrics){for(var rr in Sr={},Oe.tags)Sr[rr]=Oe.tags[rr];Sr.mapbox_clip_start=tt.start/tt.size,Sr.mapbox_clip_end=tt.end/tt.size}var tr={geometry:Ot,type:_t==="Polygon"||_t==="MultiPolygon"?3:_t==="LineString"||_t==="MultiLineString"?2:1,tags:Sr};Oe.id!==null&&(tr.id=Oe.id),We.features.push(tr)}}function Ut(We,Oe,$e,Xe,tt,_t){var Ot=Xe*Xe;if(Xe>0&&Oe.size<(tt?Ot:Xe))$e.numPoints+=Oe.length/3;else{for(var Nt=[],bt=0;bt<Oe.length;bt+=3)(Xe===0||Oe[bt+2]>Ot)&&($e.numSimplified++,Nt.push(Oe[bt]),Nt.push(Oe[bt+1])),$e.numPoints++;tt&&function(Wt,Sr){for(var rr=0,tr=0,sn=Wt.length,un=sn-2;tr<sn;un=tr,tr+=2)rr+=(Wt[tr]-Wt[un])*(Wt[tr+1]+Wt[un+1]);if(rr>0===Sr)for(tr=0,sn=Wt.length;tr<sn/2;tr+=2){var Ye=Wt[tr],Ve=Wt[tr+1];Wt[tr]=Wt[sn-2-tr],Wt[tr+1]=Wt[sn-1-tr],Wt[sn-2-tr]=Ye,Wt[sn-1-tr]=Ve}}(Nt,_t),We.push(Nt)}}function Er(We,Oe){var $e=(Oe=this.options=function(tt,_t){for(var Ot in _t)tt[Ot]=_t[Ot];return tt}(Object.create(this.options),Oe)).debug;if($e&&console.time("preprocess data"),Oe.maxZoom<0||Oe.maxZoom>24)throw new Error("maxZoom should be in the 0-24 range");if(Oe.promoteId&&Oe.generateId)throw new Error("promoteId and generateId cannot be used together.");var Xe=function(tt,_t){var Ot=[];if(tt.type==="FeatureCollection")for(var Nt=0;Nt<tt.features.length;Nt++)Re(Ot,tt.features[Nt],_t,Nt);else Re(Ot,tt.type==="Feature"?tt:{geometry:tt},_t);return Ot}(We,Oe);this.tiles={},this.tileCoords=[],$e&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",Oe.indexMaxZoom,Oe.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),Xe=function(tt,_t){var Ot=_t.buffer/_t.extent,Nt=tt,bt=xt(tt,1,-1-Ot,Ot,0,-1,2,_t),Wt=xt(tt,1,1-Ot,2+Ot,0,-1,2,_t);return(bt||Wt)&&(Nt=xt(tt,1,-Ot,1+Ot,0,-1,2,_t)||[],bt&&(Nt=ot(bt,1).concat(Nt)),Wt&&(Nt=Nt.concat(ot(Wt,-1)))),Nt}(Xe,Oe),Xe.length&&this.splitTile(Xe,0,0,0),$e&&(Xe.length&&console.log("features: %d, points: %d",this.tiles[0].numFeatures,this.tiles[0].numPoints),console.timeEnd("generate tiles"),console.log("tiles generated:",this.total,JSON.stringify(this.stats)))}function kr(We,Oe,$e){return 32*((1<<We)*$e+Oe)+We}function mr(We,Oe){const $e=We.tileID.canonical;if(!this._geoJSONIndex)return Oe(null,null);const Xe=this._geoJSONIndex.getTile($e.z,$e.x,$e.y);if(!Xe)return Oe(null,null);const tt=new class{constructor(Ot){this.layers={_geojsonTileLayer:this},this.name="_geojsonTileLayer",this.extent=s.EXTENT,this.length=Ot.length,this._features=Ot}feature(Ot){return new class{constructor(Nt){this._feature=Nt,this.extent=s.EXTENT,this.type=Nt.type,this.properties=Nt.tags,"id"in Nt&&!isNaN(Nt.id)&&(this.id=parseInt(Nt.id,10))}loadGeometry(){if(this._feature.type===1){const Nt=[];for(const bt of this._feature.geometry)Nt.push([new s.Point(bt[0],bt[1])]);return Nt}{const Nt=[];for(const bt of this._feature.geometry){const Wt=[];for(const Sr of bt)Wt.push(new s.Point(Sr[0],Sr[1]));Nt.push(Wt)}return Nt}}toGeoJSON(Nt,bt,Wt){return _.call(this,Nt,bt,Wt)}}(this._features[Ot])}}(Xe.features);let _t=F(tt);_t.byteOffset===0&&_t.byteLength===_t.buffer.byteLength||(_t=new Uint8Array(_t)),Oe(null,{vectorTile:tt,rawData:_t.buffer})}Er.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},Er.prototype.splitTile=function(We,Oe,$e,Xe,tt,_t,Ot){for(var Nt=[We,Oe,$e,Xe],bt=this.options,Wt=bt.debug;Nt.length;){Xe=Nt.pop(),$e=Nt.pop(),Oe=Nt.pop(),We=Nt.pop();var Sr=1<<Oe,rr=kr(Oe,$e,Xe),tr=this.tiles[rr];if(!tr&&(Wt>1&&console.time("creation"),tr=this.tiles[rr]=er(We,Oe,$e,Xe,bt),this.tileCoords.push({z:Oe,x:$e,y:Xe}),Wt)){Wt>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",Oe,$e,Xe,tr.numFeatures,tr.numPoints,tr.numSimplified),console.timeEnd("creation"));var sn="z"+Oe;this.stats[sn]=(this.stats[sn]||0)+1,this.total++}if(tr.source=We,tt){if(Oe===bt.maxZoom||Oe===tt)continue;var un=1<<tt-Oe;if($e!==Math.floor(_t/un)||Xe!==Math.floor(Ot/un))continue}else if(Oe===bt.indexMaxZoom||tr.numPoints<=bt.indexMaxPoints)continue;if(tr.source=null,We.length!==0){Wt>1&&console.time("clipping");var Ye,Ve,gt,qt,Ht,on,$t=.5*bt.buffer/bt.extent,Gt=.5-$t,Ir=.5+$t,Br=1+$t;Ye=Ve=gt=qt=null,Ht=xt(We,Sr,$e-$t,$e+Ir,0,tr.minX,tr.maxX,bt),on=xt(We,Sr,$e+Gt,$e+Br,0,tr.minX,tr.maxX,bt),We=null,Ht&&(Ye=xt(Ht,Sr,Xe-$t,Xe+Ir,1,tr.minY,tr.maxY,bt),Ve=xt(Ht,Sr,Xe+Gt,Xe+Br,1,tr.minY,tr.maxY,bt),Ht=null),on&&(gt=xt(on,Sr,Xe-$t,Xe+Ir,1,tr.minY,tr.maxY,bt),qt=xt(on,Sr,Xe+Gt,Xe+Br,1,tr.minY,tr.maxY,bt),on=null),Wt>1&&console.timeEnd("clipping"),Nt.push(Ye||[],Oe+1,2*$e,2*Xe),Nt.push(Ve||[],Oe+1,2*$e,2*Xe+1),Nt.push(gt||[],Oe+1,2*$e+1,2*Xe),Nt.push(qt||[],Oe+1,2*$e+1,2*Xe+1)}}},Er.prototype.getTile=function(We,Oe,$e){var Xe=this.options,tt=Xe.extent,_t=Xe.debug;if(We<0||We>24)return null;var Ot=1<<We,Nt=kr(We,Oe=(Oe%Ot+Ot)%Ot,$e);if(this.tiles[Nt])return Je(this.tiles[Nt],tt);_t>1&&console.log("drilling down to z%d-%d-%d",We,Oe,$e);for(var bt,Wt=We,Sr=Oe,rr=$e;!bt&&Wt>0;)Wt--,Sr=Math.floor(Sr/2),rr=Math.floor(rr/2),bt=this.tiles[kr(Wt,Sr,rr)];return bt&&bt.source?(_t>1&&console.log("found parent tile z%d-%d-%d",Wt,Sr,rr),_t>1&&console.time("drilling down"),this.splitTile(bt.source,Wt,Sr,rr,We,Oe,$e),_t>1&&console.timeEnd("drilling down"),this.tiles[Nt]?Je(this.tiles[Nt],tt):null):null};class Dt extends s.VectorTileWorkerSource{constructor(Oe,$e,Xe,tt,_t){super(Oe,$e,Xe,tt,mr),_t&&(this.loadGeoJSON=_t)}loadData(Oe,$e){const Xe=Oe&&Oe.request,tt=Xe&&Xe.collectResourceTiming;this.loadGeoJSON(Oe,(_t,Ot)=>{if(_t||!Ot)return $e(_t);if(typeof Ot!="object")return $e(new Error(`Input data given to '${Oe.source}' is not a valid GeoJSON object.`));{y(Ot,!0);try{if(Oe.filter){const bt=s.createExpression(Oe.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if(bt.result==="error")throw new Error(bt.value.map(Sr=>`${Sr.key}: ${Sr.message}`).join(", "));const Wt=Ot.features.filter(Sr=>bt.value.evaluate({zoom:0},Sr));Ot={type:"FeatureCollection",features:Wt}}this._geoJSONIndex=Oe.cluster?new J(function({superclusterOptions:bt,clusterProperties:Wt}){if(!Wt||!bt)return bt;const Sr={},rr={},tr={accumulated:null,zoom:0},sn={properties:null},un=Object.keys(Wt);for(const Ye of un){const[Ve,gt]=Wt[Ye],qt=s.createExpression(gt),Ht=s.createExpression(typeof Ve=="string"?[Ve,["accumulated"],["get",Ye]]:Ve);Sr[Ye]=qt.value,rr[Ye]=Ht.value}return bt.map=Ye=>{sn.properties=Ye;const Ve={};for(const gt of un)Ve[gt]=Sr[gt].evaluate(tr,sn);return Ve},bt.reduce=(Ye,Ve)=>{sn.properties=Ve;for(const gt of un)tr.accumulated=Ye[gt],Ye[gt]=rr[gt].evaluate(tr,sn)},bt}(Oe)).load(Ot.features):function(bt,Wt){return new Er(bt,Wt)}(Ot,Oe.geojsonVtOptions)}catch(bt){return $e(bt)}this.loaded={};const Nt={};if(tt){const bt=s.getPerformanceMeasurement(Xe);bt&&(Nt.resourceTiming={},Nt.resourceTiming[Oe.source]=JSON.parse(JSON.stringify(bt)))}$e(null,Nt)}})}reloadTile(Oe,$e){const Xe=this.loaded;return Xe&&Xe[Oe.uid]?super.reloadTile(Oe,$e):this.loadTile(Oe,$e)}loadGeoJSON(Oe,$e){if(Oe.request)s.getJSON(Oe.request,$e);else{if(typeof Oe.data!="string")return $e(new Error(`Input data given to '${Oe.source}' is not a valid GeoJSON object.`));try{return $e(null,JSON.parse(Oe.data))}catch{return $e(new Error(`Input data given to '${Oe.source}' is not a valid GeoJSON object.`))}}}getClusterExpansionZoom(Oe,$e){try{$e(null,this._geoJSONIndex.getClusterExpansionZoom(Oe.clusterId))}catch(Xe){$e(Xe)}}getClusterChildren(Oe,$e){try{$e(null,this._geoJSONIndex.getChildren(Oe.clusterId))}catch(Xe){$e(Xe)}}getClusterLeaves(Oe,$e){try{$e(null,this._geoJSONIndex.getLeaves(Oe.clusterId,Oe.limit,Oe.offset))}catch(Xe){$e(Xe)}}}class Jr{constructor(Oe){this.self=Oe,this.actor=new s.Actor(Oe,this),this.layerIndexes={},this.availableImages={},this.isSpriteLoaded={},this.projections={},this.defaultProjection=s.getProjection({name:"mercator"}),this.workerSourceTypes={vector:s.VectorTileWorkerSource,geojson:Dt},this.workerSources={},this.demWorkerSources={},this.self.registerWorkerSource=($e,Xe)=>{if(this.workerSourceTypes[$e])throw new Error(`Worker source with name "${$e}" already registered.`);this.workerSourceTypes[$e]=Xe},this.self.registerRTLTextPlugin=$e=>{if(s.plugin.isParsed())throw new Error("RTL text plugin already registered.");s.plugin.applyArabicShaping=$e.applyArabicShaping,s.plugin.processBidirectionalText=$e.processBidirectionalText,s.plugin.processStyledBidirectionalText=$e.processStyledBidirectionalText}}clearCaches(Oe,$e,Xe){delete this.layerIndexes[Oe],delete this.availableImages[Oe],delete this.workerSources[Oe],delete this.demWorkerSources[Oe],Xe()}checkIfReady(Oe,$e,Xe){Xe()}setReferrer(Oe,$e){this.referrer=$e}spriteLoaded(Oe,$e){this.isSpriteLoaded[Oe]=$e;for(const Xe in this.workerSources[Oe]){const tt=this.workerSources[Oe][Xe];for(const _t in tt)tt[_t]instanceof s.VectorTileWorkerSource&&(tt[_t].isSpriteLoaded=$e,tt[_t].fire(new s.Event("isSpriteLoaded")))}}setImages(Oe,$e,Xe){this.availableImages[Oe]=$e;for(const tt in this.workerSources[Oe]){const _t=this.workerSources[Oe][tt];for(const Ot in _t)_t[Ot].availableImages=$e}Xe()}enableTerrain(Oe,$e,Xe){this.terrain=$e,Xe()}setProjection(Oe,$e){this.projections[Oe]=s.getProjection($e)}setLayers(Oe,$e,Xe){this.getLayerIndex(Oe).replace($e),Xe()}updateLayers(Oe,$e,Xe){this.getLayerIndex(Oe).update($e.layers,$e.removedIds),Xe()}loadTile(Oe,$e,Xe){const tt=this.enableTerrain?s.extend({enableTerrain:this.terrain},$e):$e;tt.projection=this.projections[Oe]||this.defaultProjection,this.getWorkerSource(Oe,$e.type,$e.source).loadTile(tt,Xe)}loadDEMTile(Oe,$e,Xe){const tt=this.enableTerrain?s.extend({buildQuadTree:this.terrain},$e):$e;this.getDEMWorkerSource(Oe,$e.source).loadTile(tt,Xe)}reloadTile(Oe,$e,Xe){const tt=this.enableTerrain?s.extend({enableTerrain:this.terrain},$e):$e;tt.projection=this.projections[Oe]||this.defaultProjection,this.getWorkerSource(Oe,$e.type,$e.source).reloadTile(tt,Xe)}abortTile(Oe,$e,Xe){this.getWorkerSource(Oe,$e.type,$e.source).abortTile($e,Xe)}removeTile(Oe,$e,Xe){this.getWorkerSource(Oe,$e.type,$e.source).removeTile($e,Xe)}removeSource(Oe,$e,Xe){if(!this.workerSources[Oe]||!this.workerSources[Oe][$e.type]||!this.workerSources[Oe][$e.type][$e.source])return;const tt=this.workerSources[Oe][$e.type][$e.source];delete this.workerSources[Oe][$e.type][$e.source],tt.removeSource!==void 0?tt.removeSource($e,Xe):Xe()}loadWorkerSource(Oe,$e,Xe){try{this.self.importScripts($e.url),Xe()}catch(tt){Xe(tt.toString())}}syncRTLPluginState(Oe,$e,Xe){try{s.plugin.setState($e);const tt=s.plugin.getPluginURL();if(s.plugin.isLoaded()&&!s.plugin.isParsed()&&tt!=null){this.self.importScripts(tt);const _t=s.plugin.isParsed();Xe(_t?void 0:new Error(`RTL Text Plugin failed to import scripts from ${tt}`),_t)}}catch(tt){Xe(tt.toString())}}getAvailableImages(Oe){let $e=this.availableImages[Oe];return $e||($e=[]),$e}getLayerIndex(Oe){let $e=this.layerIndexes[Oe];return $e||($e=this.layerIndexes[Oe]=new p),$e}getWorkerSource(Oe,$e,Xe){if(this.workerSources[Oe]||(this.workerSources[Oe]={}),this.workerSources[Oe][$e]||(this.workerSources[Oe][$e]={}),!this.workerSources[Oe][$e][Xe]){const tt={send:(_t,Ot,Nt,bt,Wt,Sr)=>{this.actor.send(_t,Ot,Nt,Oe,Wt,Sr)},scheduler:this.actor.scheduler};this.workerSources[Oe][$e][Xe]=new this.workerSourceTypes[$e](tt,this.getLayerIndex(Oe),this.getAvailableImages(Oe),this.isSpriteLoaded[Oe])}return this.workerSources[Oe][$e][Xe]}getDEMWorkerSource(Oe,$e){return this.demWorkerSources[Oe]||(this.demWorkerSources[Oe]={}),this.demWorkerSources[Oe][$e]||(this.demWorkerSources[Oe][$e]=new m),this.demWorkerSources[Oe][$e]}enforceCacheSizeLimit(Oe,$e){s.enforceCacheSizeLimit($e)}getWorkerPerformanceMetrics(Oe,$e,Xe){Xe(void 0,void 0)}}return typeof WorkerGlobalScope!="undefined"&&typeof self!="undefined"&&self instanceof WorkerGlobalScope&&(self.worker=new Jr(self)),Jr}),o(["./shared"],function(s){function l(I,h){if(Array.isArray(I)){if(!Array.isArray(h)||I.length!==h.length)return!1;for(let b=0;b<I.length;b++)if(!l(I[b],h[b]))return!1;return!0}if(typeof I=="object"&&I!==null&&h!==null){if(typeof h!="object"||Object.keys(I).length!==Object.keys(h).length)return!1;for(const b in I)if(!l(I[b],h[b]))return!1;return!0}return I===h}var u=p;function p(I){return!function(h){return typeof window=="undefined"||typeof document=="undefined"?"not a browser":Array.prototype&&Array.prototype.every&&Array.prototype.filter&&Array.prototype.forEach&&Array.prototype.indexOf&&Array.prototype.lastIndexOf&&Array.prototype.map&&Array.prototype.some&&Array.prototype.reduce&&Array.prototype.reduceRight&&Array.isArray?Function.prototype&&Function.prototype.bind?Object.keys&&Object.create&&Object.getPrototypeOf&&Object.getOwnPropertyNames&&Object.isSealed&&Object.isFrozen&&Object.isExtensible&&Object.getOwnPropertyDescriptor&&Object.defineProperty&&Object.defineProperties&&Object.seal&&Object.freeze&&Object.preventExtensions?"JSON"in window&&"parse"in JSON&&"stringify"in JSON?function(){if(!("Worker"in window&&"Blob"in window&&"URL"in window))return!1;var R,U,K=new Blob([""],{type:"text/javascript"}),ne=URL.createObjectURL(K);try{U=new Worker(ne),R=!0}catch{R=!1}return U&&U.terminate(),URL.revokeObjectURL(ne),R}()?"Uint8ClampedArray"in window?ArrayBuffer.isView?function(){var R=document.createElement("canvas");R.width=R.height=1;var U=R.getContext("2d");if(!U)return!1;var K=U.getImageData(0,0,1,1);return K&&K.width===R.width}()?(m[b=h&&h.failIfMajorPerformanceCaveat]===void 0&&(m[b]=function(R){var U,K=function(ne){var ae=document.createElement("canvas"),he=Object.create(p.webGLContextAttributes);return he.failIfMajorPerformanceCaveat=ne,ae.getContext("webgl",he)||ae.getContext("experimental-webgl",he)}(R);if(!K)return!1;try{U=K.createShader(K.VERTEX_SHADER)}catch{return!1}return!(!U||K.isContextLost())&&(K.shaderSource(U,"void main() {}"),K.compileShader(U),K.getShaderParameter(U,K.COMPILE_STATUS)===!0)}(b)),m[b]?document.documentMode?"insufficient ECMAScript 6 support":void 0:"insufficient WebGL support"):"insufficient Canvas/getImageData support":"insufficient ArrayBuffer support":"insufficient Uint8ClampedArray support":"insufficient worker support":"insufficient JSON support":"insufficient Object support":"insufficient Function support":"insufficent Array support";var b}(I)}var m={};function v(I,h,b){const R=s.window.document.createElement(I);return h!==void 0&&(R.className=h),b&&b.appendChild(R),R}function x(I,h,b){const R=s.window.document.createElementNS("http://www.w3.org/2000/svg",I);for(const U of Object.keys(h))R.setAttributeNS(null,U,h[U]);return b&&b.appendChild(R),R}p.webGLContextAttributes={antialias:!1,alpha:!0,stencil:!0,depth:!0};const y=s.window.document&&s.window.document.documentElement.style,_=y&&y.userSelect!==void 0?"userSelect":"WebkitUserSelect";let w;function C(){y&&_&&(w=y[_],y[_]="none")}function E(){y&&_&&(y[_]=w)}function T(I){I.preventDefault(),I.stopPropagation(),s.window.removeEventListener("click",T,!0)}function A(){s.window.addEventListener("click",T,!0),s.window.setTimeout(()=>{s.window.removeEventListener("click",T,!0)},0)}function k(I,h){const b=I.getBoundingClientRect();return W(I,b,h)}function X(I,h){const b=I.getBoundingClientRect(),R=[];for(let U=0;U<h.length;U++)R.push(W(I,b,h[U]));return R}function Z(I){return s.window.InstallTrigger!==void 0&&I.button===2&&I.ctrlKey&&s.window.navigator.platform.toUpperCase().indexOf("MAC")>=0?0:I.button}function W(I,h,b){const R=I.offsetWidth===h.width?1:I.offsetWidth/h.width;return new s.Point((b.clientX-h.left)*R,(b.clientY-h.top)*R)}function D(I,h){var b=h[0],R=h[1],U=h[2],K=h[3],ne=b*K-U*R;return ne?(I[0]=K*(ne=1/ne),I[1]=-R*ne,I[2]=-U*ne,I[3]=b*ne,I):null}function H(I){const{userImage:h}=I;return!!(h&&h.render&&h.render())&&(I.data.replace(new Uint8Array(h.data.buffer)),!0)}class N extends s.Evented{constructor(){super(),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new s.RGBAImage({width:1,height:1}),this.dirty=!0}isLoaded(){return this.loaded}setLoaded(h){if(this.loaded!==h&&(this.loaded=h,h)){for(const{ids:b,callback:R}of this.requestors)this._notify(b,R);this.requestors=[]}}hasImage(h){return!!this.getImage(h)}getImage(h){return this.images[h]}addImage(h,b){this._validate(h,b)&&(this.images[h]=b)}_validate(h,b){let R=!0;return this._validateStretch(b.stretchX,b.data&&b.data.width)||(this.fire(new s.ErrorEvent(new Error(`Image "${h}" has invalid "stretchX" value`))),R=!1),this._validateStretch(b.stretchY,b.data&&b.data.height)||(this.fire(new s.ErrorEvent(new Error(`Image "${h}" has invalid "stretchY" value`))),R=!1),this._validateContent(b.content,b)||(this.fire(new s.ErrorEvent(new Error(`Image "${h}" has invalid "content" value`))),R=!1),R}_validateStretch(h,b){if(!h)return!0;let R=0;for(const U of h){if(U[0]<R||U[1]<U[0]||b<U[1])return!1;R=U[1]}return!0}_validateContent(h,b){return!(h&&(h.length!==4||h[0]<0||b.data.width<h[0]||h[1]<0||b.data.height<h[1]||h[2]<0||b.data.width<h[2]||h[3]<0||b.data.height<h[3]||h[2]<h[0]||h[3]<h[1]))}updateImage(h,b){b.version=this.images[h].version+1,this.images[h]=b,this.updatedImages[h]=!0}removeImage(h){const b=this.images[h];delete this.images[h],delete this.patterns[h],b.userImage&&b.userImage.onRemove&&b.userImage.onRemove()}listImages(){return Object.keys(this.images)}getImages(h,b){let R=!0;if(!this.isLoaded())for(const U of h)this.images[U]||(R=!1);this.isLoaded()||R?this._notify(h,b):this.requestors.push({ids:h,callback:b})}_notify(h,b){const R={};for(const U of h){this.images[U]||this.fire(new s.Event("styleimagemissing",{id:U}));const K=this.images[U];K?R[U]={data:K.data.clone(),pixelRatio:K.pixelRatio,sdf:K.sdf,version:K.version,stretchX:K.stretchX,stretchY:K.stretchY,content:K.content,hasRenderCallback:Boolean(K.userImage&&K.userImage.render)}:s.warnOnce(`Image "${U}" could not be loaded. Please make sure you have added the image with map.addImage() or a "sprite" property in your style. You can provide missing images by listening for the "styleimagemissing" map event.`)}b(null,R)}getPixelSize(){const{width:h,height:b}=this.atlasImage;return{width:h,height:b}}getPattern(h){const b=this.patterns[h],R=this.getImage(h);if(!R)return null;if(b&&b.position.version===R.version)return b.position;if(b)b.position.version=R.version;else{const U={w:R.data.width+2,h:R.data.height+2,x:0,y:0},K=new s.ImagePosition(U,R);this.patterns[h]={bin:U,position:K}}return this._updatePatternAtlas(),this.patterns[h].position}bind(h){const b=h.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new s.Texture(h,this.atlasImage,b.RGBA),this.atlasTexture&&this.atlasTexture.bind(b.LINEAR,b.CLAMP_TO_EDGE)}_updatePatternAtlas(){const h=[];for(const K in this.patterns)h.push(this.patterns[K].bin);const{w:b,h:R}=s.potpack(h),U=this.atlasImage;U.resize({width:b||1,height:R||1});for(const K in this.patterns){const{bin:ne}=this.patterns[K],ae=ne.x+1,he=ne.y+1,be=this.images[K].data,we=be.width,Le=be.height;s.RGBAImage.copy(be,U,{x:0,y:0},{x:ae,y:he},{width:we,height:Le}),s.RGBAImage.copy(be,U,{x:0,y:Le-1},{x:ae,y:he-1},{width:we,height:1}),s.RGBAImage.copy(be,U,{x:0,y:0},{x:ae,y:he+Le},{width:we,height:1}),s.RGBAImage.copy(be,U,{x:we-1,y:0},{x:ae-1,y:he},{width:1,height:Le}),s.RGBAImage.copy(be,U,{x:0,y:0},{x:ae+we,y:he},{width:1,height:Le})}this.dirty=!0}beginFrame(){this.callbackDispatchedThisFrame={}}dispatchRenderCallbacks(h){for(const b of h){if(this.callbackDispatchedThisFrame[b])continue;this.callbackDispatchedThisFrame[b]=!0;const R=this.images[b];H(R)&&this.updateImage(b,R)}}}const j=new s.Properties({anchor:new s.DataConstantProperty(s.spec.light.anchor),position:new class{constructor(){this.specification=s.spec.light.position}possiblyEvaluate(I,h){return function([b,R,U]){const K=s.degToRad(R+90),ne=s.degToRad(U);return{x:b*Math.cos(K)*Math.sin(ne),y:b*Math.sin(K)*Math.sin(ne),z:b*Math.cos(ne),azimuthal:R,polar:U}}(I.expression.evaluate(h))}interpolate(I,h,b){return{x:s.number(I.x,h.x,b),y:s.number(I.y,h.y,b),z:s.number(I.z,h.z,b),azimuthal:s.number(I.azimuthal,h.azimuthal,b),polar:s.number(I.polar,h.polar,b)}}},color:new s.DataConstantProperty(s.spec.light.color),intensity:new s.DataConstantProperty(s.spec.light.intensity)});class $ extends s.Evented{constructor(h){super(),this._transitionable=new s.Transitionable(j),this.setLight(h),this._transitioning=this._transitionable.untransitioned()}getLight(){return this._transitionable.serialize()}setLight(h,b={}){if(!this._validate(s.validateLight,h,b))for(const R in h){const U=h[R];s.endsWith(R,"-transition")?this._transitionable.setTransition(R.slice(0,-11),U):this._transitionable.setValue(R,U)}}updateTransitions(h){this._transitioning=this._transitionable.transitioned(h,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()}recalculate(h){this.properties=this._transitioning.possiblyEvaluate(h)}_validate(h,b,R){return(!R||R.validate!==!1)&&s.emitValidationErrors(this,h.call(s.validateStyle,s.extend({value:b,style:{glyphs:!0,sprite:!0},styleSpec:s.spec})))}}const z=new s.Properties({source:new s.DataConstantProperty(s.spec.terrain.source),exaggeration:new s.DataConstantProperty(s.spec.terrain.exaggeration)});let O=class extends s.Evented{constructor(I,h){super(),this._transitionable=new s.Transitionable(z),this.set(I),this._transitioning=this._transitionable.untransitioned(),this.drapeRenderMode=h}get(){return this._transitionable.serialize()}set(I){for(const h in I){const b=I[h];s.endsWith(h,"-transition")?this._transitionable.setTransition(h.slice(0,-11),b):this._transitionable.setValue(h,b)}}updateTransitions(I){this._transitioning=this._transitionable.transitioned(I,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()}recalculate(I){this.properties=this._transitioning.possiblyEvaluate(I)}};function F(I,h,b,R){const U=s.smoothstep(45,65,b),[K,ne]=G(I,R),ae=s.length(h);let he=1-Math.min(1,Math.exp((ae-K)/(ne-K)*-6));return he*=he*he,he=Math.min(1,1.00747*he),he*U*I.alpha}function G(I,h){const b=.5/Math.tan(.5*h);return[I.range[0]+b,I.range[1]+b]}const q=new s.Properties({range:new s.DataConstantProperty(s.spec.fog.range),color:new s.DataConstantProperty(s.spec.fog.color),"high-color":new s.DataConstantProperty(s.spec.fog["high-color"]),"space-color":new s.DataConstantProperty(s.spec.fog["space-color"]),"horizon-blend":new s.DataConstantProperty(s.spec.fog["horizon-blend"]),"star-intensity":new s.DataConstantProperty(s.spec.fog["star-intensity"])});class ee extends s.Evented{constructor(h,b){super(),this._transitionable=new s.Transitionable(q),this.set(h),this._transitioning=this._transitionable.untransitioned(),this._transform=b}get state(){const h=this._transform,b=h.projection.name==="globe",R=s.globeToMercatorTransition(h.zoom),U=this.properties.get("range"),K=[.5,3];return{range:b?[s.number(K[0],U[0],R),s.number(K[1],U[1],R)]:U,horizonBlend:this.properties.get("horizon-blend"),alpha:this.properties.get("color").a}}get(){return this._transitionable.serialize()}set(h,b={}){if(!this._validate(s.validateFog,h,b)){for(const R of Object.keys(s.spec.fog))h&&h[R]===void 0&&(h[R]=s.spec.fog[R].default);for(const R in h){const U=h[R];s.endsWith(R,"-transition")?this._transitionable.setTransition(R.slice(0,-11),U):this._transitionable.setValue(R,U)}}}getOpacity(h){if(!this._transform.projection.supportsFog)return 0;const b=this.properties&&this.properties.get("color")||1;return(this._transform.projection.name==="globe"?1:s.smoothstep(45,65,h))*b.a}getOpacityAtLatLng(h,b){return this._transform.projection.supportsFog?function(R,U,K){const ne=s.MercatorCoordinate.fromLngLat(U),ae=K.elevation?K.elevation.getAtPointOrZero(ne):0,he=[ne.x,ne.y,ae];return s.transformMat4(he,he,K.mercatorFogMatrix),F(R,he,K.pitch,K._fov)}(this.state,h,b):0}getFovAdjustedRange(h){return this._transform.projection.supportsFog?G(this.state,h):[0,1]}updateTransitions(h){this._transitioning=this._transitionable.transitioned(h,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()}recalculate(h){this.properties=this._transitioning.possiblyEvaluate(h)}_validate(h,b,R){return(!R||R.validate!==!1)&&s.emitValidationErrors(this,h.call(s.validateStyle,s.extend({value:b,style:{glyphs:!0,sprite:!0},styleSpec:s.spec})))}}class re{constructor(h,b){this.workerPool=h,this.actors=[],this.currentActor=0,this.id=s.uniqueId();const R=this.workerPool.acquire(this.id);for(let U=0;U<R.length;U++){const K=new re.Actor(R[U],b,this.id);K.name=`Worker ${U}`,this.actors.push(K)}this.ready=!1,this.broadcast("checkIfReady",null,()=>{this.ready=!0})}broadcast(h,b,R){s.asyncAll(this.actors,(U,K)=>{U.send(h,b,K)},R=R||function(){})}getActor(){return this.currentActor=(this.currentActor+1)%this.actors.length,this.actors[this.currentActor]}remove(){this.actors.forEach(h=>{h.remove()}),this.actors=[],this.workerPool.release(this.id)}}function ce(I,h,b){return h*(s.EXTENT/(I.tileSize*Math.pow(2,b-I.tileID.overscaledZ)))}re.Actor=s.Actor;class fe{constructor(h,b,R,U){this.screenBounds=h,this.cameraPoint=b,this._screenRaycastCache={},this._cameraRaycastCache={},this.isAboveHorizon=R,this.screenGeometry=this.bufferedScreenGeometry(0),this.screenGeometryMercator=this._bufferedScreenMercator(0,U)}static createFromScreenPoints(h,b){let R,U;if(h instanceof s.Point||typeof h[0]=="number"){const K=s.Point.convert(h);R=[K],U=b.isPointAboveHorizon(K)}else{const K=s.Point.convert(h[0]),ne=s.Point.convert(h[1]);R=[K,ne],U=s.polygonizeBounds(K,ne).every(ae=>b.isPointAboveHorizon(ae))}return new fe(R,b.getCameraPoint(),U,b)}isPointQuery(){return this.screenBounds.length===1}bufferedScreenGeometry(h){return s.polygonizeBounds(this.screenBounds[0],this.screenBounds.length===1?this.screenBounds[0]:this.screenBounds[1],h)}bufferedCameraGeometry(h){const b=this.screenBounds[0],R=this.screenBounds.length===1?this.screenBounds[0].add(new s.Point(1,1)):this.screenBounds[1],U=s.polygonizeBounds(b,R,0,!1);return this.cameraPoint.y>R.y&&(this.cameraPoint.x>b.x&&this.cameraPoint.x<R.x?U.splice(3,0,this.cameraPoint):this.cameraPoint.x>=R.x?U[2]=this.cameraPoint:this.cameraPoint.x<=b.x&&(U[3]=this.cameraPoint)),s.bufferConvexPolygon(U,h)}bufferedCameraGeometryGlobe(h){const b=this.screenBounds[0],R=this.screenBounds.length===1?this.screenBounds[0].add(new s.Point(1,1)):this.screenBounds[1],U=s.polygonizeBounds(b,R,h),K=this.cameraPoint.clone();switch(3*((K.y>b.y)+(K.y>R.y))+((K.x>b.x)+(K.x>R.x))){case 0:U[0]=K,U[4]=K.clone();break;case 1:U.splice(1,0,K);break;case 2:U[1]=K;break;case 3:U.splice(4,0,K);break;case 5:U.splice(2,0,K);break;case 6:U[3]=K;break;case 7:U.splice(3,0,K);break;case 8:U[2]=K}return U}containsTile(h,b,R,U=0){const K=h.queryPadding/b._pixelsPerMercatorPixel+1,ne=R?this._bufferedCameraMercator(K,b):this._bufferedScreenMercator(K,b);let ae=h.tileID.wrap+(ne.unwrapped?U:0);const he=ne.polygon.map(ut=>s.getTilePoint(h.tileTransform,ut,ae));if(!s.polygonIntersectsBox(he,0,0,s.EXTENT,s.EXTENT))return;ae=h.tileID.wrap+(this.screenGeometryMercator.unwrapped?U:0);const be=this.screenGeometryMercator.polygon.map(ut=>s.getTileVec3(h.tileTransform,ut,ae)),we=be.map(ut=>new s.Point(ut[0],ut[1])),Le=b.getFreeCameraOptions().position||new s.MercatorCoordinate(0,0,0),He=s.getTileVec3(h.tileTransform,Le,ae),rt=be.map(ut=>{const De=s.sub(ut,ut,He);return s.normalize(De,De),new s.Ray(He,De)}),st=ce(h,1,b.zoom)*b._pixelsPerMercatorPixel;return{queryGeometry:this,tilespaceGeometry:we,tilespaceRays:rt,bufferedTilespaceGeometry:he,bufferedTilespaceBounds:(at=s.getBounds(he),at.min.x=s.clamp(at.min.x,0,s.EXTENT),at.min.y=s.clamp(at.min.y,0,s.EXTENT),at.max.x=s.clamp(at.max.x,0,s.EXTENT),at.max.y=s.clamp(at.max.y,0,s.EXTENT),at),tile:h,tileID:h.tileID,pixelToTileUnitsFactor:st};var at}_bufferedScreenMercator(h,b){const R=ve(h);if(this._screenRaycastCache[R])return this._screenRaycastCache[R];{let U;return U=b.projection.name==="globe"?this._projectAndResample(this.bufferedScreenGeometry(h),b):{polygon:this.bufferedScreenGeometry(h).map(K=>b.pointCoordinate3D(K)),unwrapped:!0},this._screenRaycastCache[R]=U,U}}_bufferedCameraMercator(h,b){const R=ve(h);if(this._cameraRaycastCache[R])return this._cameraRaycastCache[R];{let U;return U=b.projection.name==="globe"?this._projectAndResample(this.bufferedCameraGeometryGlobe(h),b):{polygon:this.bufferedCameraGeometry(h).map(K=>b.pointCoordinate3D(K)),unwrapped:!0},this._cameraRaycastCache[R]=U,U}}_projectAndResample(h,b){const R=function(K,ne){const ae=s.multiply([],ne.pixelMatrix,ne.globeMatrix),he=[0,-s.GLOBE_RADIUS,0,1],be=[0,s.GLOBE_RADIUS,0,1],we=[0,0,0,1];s.transformMat4$1(he,he,ae),s.transformMat4$1(be,be,ae),s.transformMat4$1(we,we,ae);const Le=new s.Point(he[0]/he[3],he[1]/he[3]),He=new s.Point(be[0]/be[3],be[1]/be[3]),rt=s.polygonContainsPoint(K,Le)&&he[3]<we[3],st=s.polygonContainsPoint(K,He)&&be[3]<we[3];if(!rt&&!st)return null;const at=function(At,Yt,Vt){for(let or=1;or<At.length;or++){const Wr=oe(Yt.pointCoordinate3D(At[or-1]).x),Qt=oe(Yt.pointCoordinate3D(At[or]).x);if(Vt<0){if(Wr<Qt)return{idx:or,t:-Wr/(Qt-1-Wr)}}else if(Qt<Wr)return{idx:or,t:(1-Wr)/(Qt+1-Wr)}}return null}(K,ne,rt?-1:1);if(!at)return null;const{idx:ut,t:De}=at;let it=ut>1?J(K.slice(0,ut),ne):[],yt=ut<K.length?J(K.slice(ut),ne):[];it=it.map(At=>new s.Point(oe(At.x),At.y)),yt=yt.map(At=>new s.Point(oe(At.x),At.y));const mt=[...it];mt.length===0&&mt.push(yt[yt.length-1]);const kt=s.number(mt[mt.length-1].y,(yt.length===0?it[0]:yt[0]).y,De);let Lt;return Lt=rt?[new s.Point(0,kt),new s.Point(0,0),new s.Point(1,0),new s.Point(1,kt)]:[new s.Point(1,kt),new s.Point(1,1),new s.Point(0,1),new s.Point(0,kt)],mt.push(...Lt),yt.length===0?mt.push(it[0]):mt.push(...yt),{polygon:mt.map(At=>new s.MercatorCoordinate(At.x,At.y)),unwrapped:!1}}(h,b);if(R)return R;const U=function(K,ne){let ae=!1,he=-1/0,be=0;for(let Le=0;Le<K.length-1;Le++)K[Le].x>he&&(he=K[Le].x,be=Le);for(let Le=0;Le<K.length-1;Le++){const He=(be+Le)%(K.length-1),rt=K[He],st=K[He+1];Math.abs(rt.x-st.x)>.5&&(rt.x<st.x?(rt.x+=1,He===0&&(K[K.length-1].x+=1)):(st.x+=1,He+1===K.length-1&&(K[0].x+=1)),ae=!0)}const we=s.mercatorXfromLng(ne.center.lng);return ae&&we<Math.abs(we-1)&&K.forEach(Le=>{Le.x-=1}),{polygon:K,unwrapped:ae}}(J(h,b).map(K=>new s.Point(oe(K.x),K.y)),b);return{polygon:U.polygon.map(K=>new s.MercatorCoordinate(K.x,K.y)),unwrapped:U.unwrapped}}}function J(I,h){return s.resample(I,b=>{const R=h.pointCoordinate3D(b);b.x=R.x,b.y=R.y},1/256)}function oe(I){return I<0?1+I%1:I%1}function ve(I){return 100*I|0}function ye(I,h,b,R,U){const K=function(ne,ae){if(ne)return U(ne);if(ae){I.url&&ae.tiles&&I.tiles&&delete I.tiles;const he=s.pick(s.extend(ae,I),["tiles","minzoom","maxzoom","attribution","mapbox_logo","bounds","scheme","tileSize","encoding"]);ae.vector_layers&&(he.vectorLayers=ae.vector_layers,he.vectorLayerIds=he.vectorLayers.map(be=>be.id)),he.tiles=h.canonicalizeTileset(he,I.url),U(null,he)}};return I.url?s.getJSON(h.transformRequest(h.normalizeSourceURL(I.url,null,b,R),s.ResourceType.Source),K):s.exported.frame(()=>K(null,I))}class xe{constructor(h,b,R){this.bounds=s.LngLatBounds.convert(this.validateBounds(h)),this.minzoom=b||0,this.maxzoom=R||24}validateBounds(h){return Array.isArray(h)&&h.length===4?[Math.max(-180,h[0]),Math.max(-90,h[1]),Math.min(180,h[2]),Math.min(90,h[3])]:[-180,-90,180,90]}contains(h){const b=Math.pow(2,h.z),R=Math.floor(s.mercatorXfromLng(this.bounds.getWest())*b),U=Math.floor(s.mercatorYfromLat(this.bounds.getNorth())*b),K=Math.ceil(s.mercatorXfromLng(this.bounds.getEast())*b),ne=Math.ceil(s.mercatorYfromLat(this.bounds.getSouth())*b);return h.x>=R&&h.x<K&&h.y>=U&&h.y<ne}}class se{constructor(h,b,R){this.context=h;const U=h.gl;this.buffer=U.createBuffer(),this.dynamicDraw=Boolean(R),this.context.unbindVAO(),h.bindElementBuffer.set(this.buffer),U.bufferData(U.ELEMENT_ARRAY_BUFFER,b.arrayBuffer,this.dynamicDraw?U.DYNAMIC_DRAW:U.STATIC_DRAW),this.dynamicDraw||b.destroy()}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(h){const b=this.context.gl;this.context.unbindVAO(),this.bind(),b.bufferSubData(b.ELEMENT_ARRAY_BUFFER,0,h.arrayBuffer)}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}const me={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class pe{constructor(h,b,R,U){this.length=b.length,this.attributes=R,this.itemSize=b.bytesPerElement,this.dynamicDraw=U,this.context=h;const K=h.gl;this.buffer=K.createBuffer(),h.bindVertexBuffer.set(this.buffer),K.bufferData(K.ARRAY_BUFFER,b.arrayBuffer,this.dynamicDraw?K.DYNAMIC_DRAW:K.STATIC_DRAW),this.dynamicDraw||b.destroy()}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(h){const b=this.context.gl;this.bind(),b.bufferSubData(b.ARRAY_BUFFER,0,h.arrayBuffer)}enableAttributes(h,b){for(let R=0;R<this.attributes.length;R++){const U=b.attributes[this.attributes[R].name];U!==void 0&&h.enableVertexAttribArray(U)}}setVertexAttribPointers(h,b,R){for(let U=0;U<this.attributes.length;U++){const K=this.attributes[U],ne=b.attributes[K.name];ne!==void 0&&h.vertexAttribPointer(ne,K.components,h[me[K.type]],!1,this.itemSize,K.offset+this.itemSize*(R||0))}}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}class Ce{constructor(h){this.gl=h.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1}get(){return this.current}set(h){}getDefault(){return this.default}setDefault(){this.set(this.default)}}class Pe extends Ce{getDefault(){return s.Color.transparent}set(h){const b=this.current;(h.r!==b.r||h.g!==b.g||h.b!==b.b||h.a!==b.a||this.dirty)&&(this.gl.clearColor(h.r,h.g,h.b,h.a),this.current=h,this.dirty=!1)}}class Re extends Ce{getDefault(){return 1}set(h){(h!==this.current||this.dirty)&&(this.gl.clearDepth(h),this.current=h,this.dirty=!1)}}class ke extends Ce{getDefault(){return 0}set(h){(h!==this.current||this.dirty)&&(this.gl.clearStencil(h),this.current=h,this.dirty=!1)}}class ze extends Ce{getDefault(){return[!0,!0,!0,!0]}set(h){const b=this.current;(h[0]!==b[0]||h[1]!==b[1]||h[2]!==b[2]||h[3]!==b[3]||this.dirty)&&(this.gl.colorMask(h[0],h[1],h[2],h[3]),this.current=h,this.dirty=!1)}}class Ge extends Ce{getDefault(){return!0}set(h){(h!==this.current||this.dirty)&&(this.gl.depthMask(h),this.current=h,this.dirty=!1)}}class ht extends Ce{getDefault(){return 255}set(h){(h!==this.current||this.dirty)&&(this.gl.stencilMask(h),this.current=h,this.dirty=!1)}}class Tt extends Ce{getDefault(){return{func:this.gl.ALWAYS,ref:0,mask:255}}set(h){const b=this.current;(h.func!==b.func||h.ref!==b.ref||h.mask!==b.mask||this.dirty)&&(this.gl.stencilFunc(h.func,h.ref,h.mask),this.current=h,this.dirty=!1)}}class xt extends Ce{getDefault(){const h=this.gl;return[h.KEEP,h.KEEP,h.KEEP]}set(h){const b=this.current;(h[0]!==b[0]||h[1]!==b[1]||h[2]!==b[2]||this.dirty)&&(this.gl.stencilOp(h[0],h[1],h[2]),this.current=h,this.dirty=!1)}}class pt extends Ce{getDefault(){return!1}set(h){if(h===this.current&&!this.dirty)return;const b=this.gl;h?b.enable(b.STENCIL_TEST):b.disable(b.STENCIL_TEST),this.current=h,this.dirty=!1}}class It extends Ce{getDefault(){return[0,1]}set(h){const b=this.current;(h[0]!==b[0]||h[1]!==b[1]||this.dirty)&&(this.gl.depthRange(h[0],h[1]),this.current=h,this.dirty=!1)}}class Ie extends Ce{getDefault(){return!1}set(h){if(h===this.current&&!this.dirty)return;const b=this.gl;h?b.enable(b.DEPTH_TEST):b.disable(b.DEPTH_TEST),this.current=h,this.dirty=!1}}class de extends Ce{getDefault(){return this.gl.LESS}set(h){(h!==this.current||this.dirty)&&(this.gl.depthFunc(h),this.current=h,this.dirty=!1)}}class Te extends Ce{getDefault(){return!1}set(h){if(h===this.current&&!this.dirty)return;const b=this.gl;h?b.enable(b.BLEND):b.disable(b.BLEND),this.current=h,this.dirty=!1}}class Be extends Ce{getDefault(){const h=this.gl;return[h.ONE,h.ZERO]}set(h){const b=this.current;(h[0]!==b[0]||h[1]!==b[1]||this.dirty)&&(this.gl.blendFunc(h[0],h[1]),this.current=h,this.dirty=!1)}}class Ke extends Ce{getDefault(){return s.Color.transparent}set(h){const b=this.current;(h.r!==b.r||h.g!==b.g||h.b!==b.b||h.a!==b.a||this.dirty)&&(this.gl.blendColor(h.r,h.g,h.b,h.a),this.current=h,this.dirty=!1)}}class ot extends Ce{getDefault(){return this.gl.FUNC_ADD}set(h){(h!==this.current||this.dirty)&&(this.gl.blendEquation(h),this.current=h,this.dirty=!1)}}class Ze extends Ce{getDefault(){return!1}set(h){if(h===this.current&&!this.dirty)return;const b=this.gl;h?b.enable(b.CULL_FACE):b.disable(b.CULL_FACE),this.current=h,this.dirty=!1}}class Je extends Ce{getDefault(){return this.gl.BACK}set(h){(h!==this.current||this.dirty)&&(this.gl.cullFace(h),this.current=h,this.dirty=!1)}}class St extends Ce{getDefault(){return this.gl.CCW}set(h){(h!==this.current||this.dirty)&&(this.gl.frontFace(h),this.current=h,this.dirty=!1)}}let er,Ft=class extends Ce{getDefault(){return null}set(I){(I!==this.current||this.dirty)&&(this.gl.useProgram(I),this.current=I,this.dirty=!1)}};class Ut extends Ce{getDefault(){return this.gl.TEXTURE0}set(h){(h!==this.current||this.dirty)&&(this.gl.activeTexture(h),this.current=h,this.dirty=!1)}}class Er extends Ce{getDefault(){const h=this.gl;return[0,0,h.drawingBufferWidth,h.drawingBufferHeight]}set(h){const b=this.current;(h[0]!==b[0]||h[1]!==b[1]||h[2]!==b[2]||h[3]!==b[3]||this.dirty)&&(this.gl.viewport(h[0],h[1],h[2],h[3]),this.current=h,this.dirty=!1)}}class kr extends Ce{getDefault(){return null}set(h){if(h===this.current&&!this.dirty)return;const b=this.gl;b.bindFramebuffer(b.FRAMEBUFFER,h),this.current=h,this.dirty=!1}}class mr extends Ce{getDefault(){return null}set(h){if(h===this.current&&!this.dirty)return;const b=this.gl;b.bindRenderbuffer(b.RENDERBUFFER,h),this.current=h,this.dirty=!1}}class Dt extends Ce{getDefault(){return null}set(h){if(h===this.current&&!this.dirty)return;const b=this.gl;b.bindTexture(b.TEXTURE_2D,h),this.current=h,this.dirty=!1}}class Jr extends Ce{getDefault(){return null}set(h){if(h===this.current&&!this.dirty)return;const b=this.gl;b.bindBuffer(b.ARRAY_BUFFER,h),this.current=h,this.dirty=!1}}class We extends Ce{getDefault(){return null}set(h){const b=this.gl;b.bindBuffer(b.ELEMENT_ARRAY_BUFFER,h),this.current=h,this.dirty=!1}}class Oe extends Ce{constructor(h){super(h),this.vao=h.extVertexArrayObject}getDefault(){return null}set(h){this.vao&&(h!==this.current||this.dirty)&&(this.vao.bindVertexArrayOES(h),this.current=h,this.dirty=!1)}}class $e extends Ce{getDefault(){return 4}set(h){if(h===this.current&&!this.dirty)return;const b=this.gl;b.pixelStorei(b.UNPACK_ALIGNMENT,h),this.current=h,this.dirty=!1}}class Xe extends Ce{getDefault(){return!1}set(h){if(h===this.current&&!this.dirty)return;const b=this.gl;b.pixelStorei(b.UNPACK_PREMULTIPLY_ALPHA_WEBGL,h),this.current=h,this.dirty=!1}}class tt extends Ce{getDefault(){return!1}set(h){if(h===this.current&&!this.dirty)return;const b=this.gl;b.pixelStorei(b.UNPACK_FLIP_Y_WEBGL,h),this.current=h,this.dirty=!1}}class _t extends Ce{constructor(h,b){super(h),this.context=h,this.parent=b}getDefault(){return null}}class Ot extends _t{setDirty(){this.dirty=!0}set(h){if(h===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const b=this.gl;b.framebufferTexture2D(b.FRAMEBUFFER,b.COLOR_ATTACHMENT0,b.TEXTURE_2D,h,0),this.current=h,this.dirty=!1}}class Nt extends _t{attachment(){return this.gl.DEPTH_ATTACHMENT}set(h){if(h===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const b=this.gl;b.framebufferRenderbuffer(b.FRAMEBUFFER,this.attachment(),b.RENDERBUFFER,h),this.current=h,this.dirty=!1}}class bt extends Nt{attachment(){return this.gl.DEPTH_STENCIL_ATTACHMENT}}class Wt{constructor(h,b,R,U){this.context=h,this.width=b,this.height=R;const K=this.framebuffer=h.gl.createFramebuffer();this.colorAttachment=new Ot(h,K),U&&(this.depthAttachment=new Nt(h,K))}destroy(){const h=this.context.gl,b=this.colorAttachment.get();if(b&&h.deleteTexture(b),this.depthAttachment){const R=this.depthAttachment.get();R&&h.deleteRenderbuffer(R)}h.deleteFramebuffer(this.framebuffer)}}class Sr{constructor(h,b=!1){if(this.gl=h,this.isWebGL2=b,this.extVertexArrayObject=this.gl.getExtension("OES_vertex_array_object"),b){const R=h;this.extVertexArrayObject={createVertexArrayOES:R.createVertexArray.bind(h),deleteVertexArrayOES:R.deleteVertexArray.bind(h),bindVertexArrayOES:R.bindVertexArray.bind(h)}}this.clearColor=new Pe(this),this.clearDepth=new Re(this),this.clearStencil=new ke(this),this.colorMask=new ze(this),this.depthMask=new Ge(this),this.stencilMask=new ht(this),this.stencilFunc=new Tt(this),this.stencilOp=new xt(this),this.stencilTest=new pt(this),this.depthRange=new It(this),this.depthTest=new Ie(this),this.depthFunc=new de(this),this.blend=new Te(this),this.blendFunc=new Be(this),this.blendColor=new Ke(this),this.blendEquation=new ot(this),this.cullFace=new Ze(this),this.cullFaceSide=new Je(this),this.frontFace=new St(this),this.program=new Ft(this),this.activeTexture=new Ut(this),this.viewport=new Er(this),this.bindFramebuffer=new kr(this),this.bindRenderbuffer=new mr(this),this.bindTexture=new Dt(this),this.bindVertexBuffer=new Jr(this),this.bindElementBuffer=new We(this),this.bindVertexArrayOES=this.extVertexArrayObject&&new Oe(this),this.pixelStoreUnpack=new $e(this),this.pixelStoreUnpackPremultiplyAlpha=new Xe(this),this.pixelStoreUnpackFlipY=new tt(this),this.extTextureFilterAnisotropic=h.getExtension("EXT_texture_filter_anisotropic")||h.getExtension("MOZ_EXT_texture_filter_anisotropic")||h.getExtension("WEBKIT_EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=h.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.extTextureFilterAnisotropicForceOff=!1,this.extStandardDerivativesForceOff=!1,this.extDebugRendererInfo=h.getExtension("WEBGL_debug_renderer_info"),this.extDebugRendererInfo&&(this.renderer=h.getParameter(this.extDebugRendererInfo.UNMASKED_RENDERER_WEBGL),this.vendor=h.getParameter(this.extDebugRendererInfo.UNMASKED_VENDOR_WEBGL)),b||(this.extTextureHalfFloat=h.getExtension("OES_texture_half_float")),(b||this.extTextureHalfFloat&&h.getExtension("OES_texture_half_float_linear"))&&(this.extRenderToTextureHalfFloat=h.getExtension("EXT_color_buffer_half_float")),this.extStandardDerivatives=b||h.getExtension("OES_standard_derivatives"),this.extTimerQuery=h.getExtension("EXT_disjoint_timer_query"),this.maxTextureSize=h.getParameter(h.MAX_TEXTURE_SIZE)}setDefault(){this.unbindVAO(),this.clearColor.setDefault(),this.clearDepth.setDefault(),this.clearStencil.setDefault(),this.colorMask.setDefault(),this.depthMask.setDefault(),this.stencilMask.setDefault(),this.stencilFunc.setDefault(),this.stencilOp.setDefault(),this.stencilTest.setDefault(),this.depthRange.setDefault(),this.depthTest.setDefault(),this.depthFunc.setDefault(),this.blend.setDefault(),this.blendFunc.setDefault(),this.blendColor.setDefault(),this.blendEquation.setDefault(),this.cullFace.setDefault(),this.cullFaceSide.setDefault(),this.frontFace.setDefault(),this.program.setDefault(),this.activeTexture.setDefault(),this.bindFramebuffer.setDefault(),this.pixelStoreUnpack.setDefault(),this.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.pixelStoreUnpackFlipY.setDefault()}setDirty(){this.clearColor.dirty=!0,this.clearDepth.dirty=!0,this.clearStencil.dirty=!0,this.colorMask.dirty=!0,this.depthMask.dirty=!0,this.stencilMask.dirty=!0,this.stencilFunc.dirty=!0,this.stencilOp.dirty=!0,this.stencilTest.dirty=!0,this.depthRange.dirty=!0,this.depthTest.dirty=!0,this.depthFunc.dirty=!0,this.blend.dirty=!0,this.blendFunc.dirty=!0,this.blendColor.dirty=!0,this.blendEquation.dirty=!0,this.cullFace.dirty=!0,this.cullFaceSide.dirty=!0,this.frontFace.dirty=!0,this.program.dirty=!0,this.activeTexture.dirty=!0,this.viewport.dirty=!0,this.bindFramebuffer.dirty=!0,this.bindRenderbuffer.dirty=!0,this.bindTexture.dirty=!0,this.bindVertexBuffer.dirty=!0,this.bindElementBuffer.dirty=!0,this.extVertexArrayObject&&(this.bindVertexArrayOES.dirty=!0),this.pixelStoreUnpack.dirty=!0,this.pixelStoreUnpackPremultiplyAlpha.dirty=!0,this.pixelStoreUnpackFlipY.dirty=!0}createIndexBuffer(h,b){return new se(this,h,b)}createVertexBuffer(h,b,R){return new pe(this,h,b,R)}createRenderbuffer(h,b,R){const U=this.gl,K=U.createRenderbuffer();return this.bindRenderbuffer.set(K),U.renderbufferStorage(U.RENDERBUFFER,h,b,R),this.bindRenderbuffer.set(null),K}createFramebuffer(h,b,R){return new Wt(this,h,b,R)}clear({color:h,depth:b,stencil:R}){const U=this.gl;let K=0;h&&(K|=U.COLOR_BUFFER_BIT,this.clearColor.set(h),this.colorMask.set([!0,!0,!0,!0])),b!==void 0&&(K|=U.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(b),this.depthMask.set(!0)),R!==void 0&&(K|=U.STENCIL_BUFFER_BIT,this.clearStencil.set(R),this.stencilMask.set(255)),U.clear(K)}setCullFace(h){h.enable===!1?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(h.mode),this.frontFace.set(h.frontFace))}setDepthMode(h){h.func!==this.gl.ALWAYS||h.mask?(this.depthTest.set(!0),this.depthFunc.set(h.func),this.depthMask.set(h.mask),this.depthRange.set(h.range)):this.depthTest.set(!1)}setStencilMode(h){h.test.func!==this.gl.ALWAYS||h.mask?(this.stencilTest.set(!0),this.stencilMask.set(h.mask),this.stencilOp.set([h.fail,h.depthFail,h.pass]),this.stencilFunc.set({func:h.test.func,ref:h.ref,mask:h.test.mask})):this.stencilTest.set(!1)}setColorMode(h){l(h.blendFunction,s.ColorMode.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(h.blendFunction),this.blendColor.set(h.blendColor)),this.colorMask.set(h.mask)}unbindVAO(){this.extVertexArrayObject&&this.bindVertexArrayOES.set(null)}}class rr extends s.Evented{constructor(h,b,R,U){if(super(),this.id=h,this.dispatcher=R,this.type="vector",this.minzoom=0,this.maxzoom=22,this.scheme="xyz",this.tileSize=512,this.reparseOverscaled=!0,this.isTileClipped=!0,this._loaded=!1,s.extend(this,s.pick(b,["url","scheme","tileSize","promoteId"])),this._options=s.extend({type:"vector"},b),this._collectResourceTiming=b.collectResourceTiming,this.tileSize!==512)throw new Error("vector tile sources must have a tileSize of 512");this.setEventedParent(U),this._tileWorkers={},this._deduped=new s.DedupedRequest}load(h){this._loaded=!1,this.fire(new s.Event("dataloading",{dataType:"source"}));const b=Array.isArray(this.map._language)?this.map._language.join():this.map._language,R=this.map._worldview;this._tileJSONRequest=ye(this._options,this.map._requestManager,b,R,(U,K)=>{this._tileJSONRequest=null,this._loaded=!0,U?(b&&console.warn(`Ensure that your requested language string is a valid BCP-47 code or list of codes. Found: ${b}`),R&&R.length!==2&&console.warn(`Requested worldview strings must be a valid ISO alpha-2 code. Found: ${R}`),this.fire(new s.ErrorEvent(U))):K&&(s.extend(this,K),K.bounds&&(this.tileBounds=new xe(K.bounds,this.minzoom,this.maxzoom)),s.postTurnstileEvent(K.tiles,this.map._requestManager._customAccessToken),this.fire(new s.Event("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new s.Event("data",{dataType:"source",sourceDataType:"content"}))),h&&h(U)})}loaded(){return this._loaded}hasTile(h){return!this.tileBounds||this.tileBounds.contains(h.canonical)}onAdd(h){this.map=h,this.load()}reload(){this.cancelTileJSONRequest(),this.load(()=>this.map.style._clearSource(this.id))}setTiles(h){return this._options.tiles=h,this.reload(),this}setUrl(h){return this.url=h,this._options.url=h,this.reload(),this}onRemove(){this.cancelTileJSONRequest()}serialize(){return s.extend({},this._options)}loadTile(h,b){const R=this.map._requestManager.normalizeTileURL(h.tileID.canonical.url(this.tiles,this.scheme)),U={request:this.map._requestManager.transformRequest(R,s.ResourceType.Tile),data:void 0,uid:h.uid,tileID:h.tileID,tileZoom:h.tileZoom,zoom:h.tileID.overscaledZ,tileSize:this.tileSize*h.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:s.exported.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId,isSymbolTile:h.isSymbolTile};if(U.request.collectResourceTiming=this._collectResourceTiming,h.actor&&h.state!=="expired")h.state==="loading"?h.reloadCallback=b:h.request=h.actor.send("reloadTile",U,K.bind(this));else if(h.actor=this._tileWorkers[R]=this._tileWorkers[R]||this.dispatcher.getActor(),this.dispatcher.ready)h.request=h.actor.send("loadTile",U,K.bind(this),void 0,!0);else{const ne=s.loadVectorTile.call({deduped:this._deduped},U,(ae,he)=>{ae||!he?K.call(this,ae):(U.data={cacheControl:he.cacheControl,expires:he.expires,rawData:he.rawData.slice(0)},h.actor&&h.actor.send("loadTile",U,K.bind(this),void 0,!0))},!0);h.request={cancel:ne}}function K(ne,ae){return delete h.request,h.aborted?b(null):ne&&ne.status!==404?b(ne):(ae&&ae.resourceTiming&&(h.resourceTiming=ae.resourceTiming),this.map._refreshExpiredTiles&&ae&&h.setExpiryData(ae),h.loadVectorData(ae,this.map.painter),s.cacheEntryPossiblyAdded(this.dispatcher),b(null),void(h.reloadCallback&&(this.loadTile(h,h.reloadCallback),h.reloadCallback=null)))}}abortTile(h){h.request&&(h.request.cancel(),delete h.request),h.actor&&h.actor.send("abortTile",{uid:h.uid,type:this.type,source:this.id})}unloadTile(h){h.unloadVectorData(),h.actor&&h.actor.send("removeTile",{uid:h.uid,type:this.type,source:this.id})}hasTransition(){return!1}afterUpdate(){this._tileWorkers={}}cancelTileJSONRequest(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)}}class tr extends s.Evented{constructor(h,b,R,U){super(),this.id=h,this.dispatcher=R,this.setEventedParent(U),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=s.extend({type:"raster"},b),s.extend(this,s.pick(b,["url","scheme","tileSize"]))}load(h){this._loaded=!1,this.fire(new s.Event("dataloading",{dataType:"source"})),this._tileJSONRequest=ye(this._options,this.map._requestManager,null,null,(b,R)=>{this._tileJSONRequest=null,this._loaded=!0,b?this.fire(new s.ErrorEvent(b)):R&&(s.extend(this,R),R.bounds&&(this.tileBounds=new xe(R.bounds,this.minzoom,this.maxzoom)),s.postTurnstileEvent(R.tiles),this.fire(new s.Event("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new s.Event("data",{dataType:"source",sourceDataType:"content"}))),h&&h(b)})}loaded(){return this._loaded}onAdd(h){this.map=h,this.load()}reload(){this.cancelTileJSONRequest(),this.load(()=>this.map.style._clearSource(this.id))}setTiles(h){return this._options.tiles=h,this.reload(),this}setUrl(h){return this.url=h,this._options.url=h,this.reload(),this}onRemove(){this.cancelTileJSONRequest()}serialize(){return s.extend({},this._options)}hasTile(h){return!this.tileBounds||this.tileBounds.contains(h.canonical)}loadTile(h,b){const R=s.exported.devicePixelRatio>=2,U=this.map._requestManager.normalizeTileURL(h.tileID.canonical.url(this.tiles,this.scheme),R,this.tileSize);h.request=s.getImage(this.map._requestManager.transformRequest(U,s.ResourceType.Tile),(K,ne,ae,he)=>(delete h.request,h.aborted?(h.state="unloaded",b(null)):K?(h.state="errored",b(K)):ne?(this.map._refreshExpiredTiles&&h.setExpiryData({cacheControl:ae,expires:he}),h.setTexture(ne,this.map.painter),h.state="loaded",s.cacheEntryPossiblyAdded(this.dispatcher),void b(null)):b(null)))}static loadTileData(h,b,R){h.setTexture(b,R)}static unloadTileData(h,b){h.texture&&b.saveTileTexture(h.texture)}abortTile(h,b){h.request&&(h.request.cancel(),delete h.request),b()}unloadTile(h,b){h.texture&&this.map.painter.saveTileTexture(h.texture),b()}hasTransition(){return!1}cancelTileJSONRequest(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)}}function sn(I,h,b,R,U,K,ne,ae){const he=[I,b,U,h,R,K,1,1,1],be=[ne,ae,1],we=s.adjoint([],he),[Le,He,rt]=s.transformMat3(be,be,s.transpose(we,we));return s.multiply$1(he,[Le,0,0,0,He,0,0,0,rt],he)}class un extends s.Evented{constructor(h,b,R,U){super(),this.id=h,this.dispatcher=R,this.coordinates=b.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(U),this.options=b,this._dirty=!1}load(h,b){this._loaded=b||!1,this.fire(new s.Event("dataloading",{dataType:"source"})),this.url=this.options.url,this._imageRequest=s.getImage(this.map._requestManager.transformRequest(this.url,s.ResourceType.Image),(R,U)=>{if(this._imageRequest=null,this._loaded=!0,R)this.fire(new s.ErrorEvent(R));else if(U){const{HTMLImageElement:K}=s.window;this.image=U instanceof K?s.exported.getImageData(U):U,this._dirty=!0,this.width=this.image.width,this.height=this.image.height,h&&(this.coordinates=h),this._finishLoading()}})}loaded(){return this._loaded}updateImage(h){return this.image&&h.url?(this._imageRequest&&h.url!==this.options.url&&(this._imageRequest.cancel(),this._imageRequest=null),this.options.url=h.url,this.load(h.coordinates,this._loaded),this):this}_finishLoading(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new s.Event("data",{dataType:"source",sourceDataType:"metadata"})))}onAdd(h){this.map=h,this.load()}onRemove(){this._imageRequest&&(this._imageRequest.cancel(),this._imageRequest=null),this.texture&&this.texture.destroy()}setCoordinates(h){this.coordinates=h,this._boundsArray=void 0;const b=h.map(s.MercatorCoordinate.fromLngLat);return this.tileID=function(R){let U=1/0,K=1/0,ne=-1/0,ae=-1/0;for(const Le of R)U=Math.min(U,Le.x),K=Math.min(K,Le.y),ne=Math.max(ne,Le.x),ae=Math.max(ae,Le.y);const he=Math.max(ne-U,ae-K),be=Math.max(0,Math.floor(-Math.log(he)/Math.LN2)),we=Math.pow(2,be);return new s.CanonicalTileID(be,Math.floor((U+ne)/2*we),Math.floor((K+ae)/2*we))}(b),this.minzoom=this.maxzoom=this.tileID.z,this.fire(new s.Event("data",{dataType:"source",sourceDataType:"content"})),this}_clear(){this._boundsArray=void 0}_prepareData(h){for(const he in this.tiles){const be=this.tiles[he];be.state!=="loaded"&&(be.state="loaded",be.texture=this.texture)}if(this._boundsArray)return;const b=s.tileTransform(this.tileID,this.map.transform.projection),[R,U,K,ne]=this.coordinates.map(he=>{const be=b.projection.project(he[0],he[1]);return s.getTilePoint(b,be)._round()});this.perspectiveTransform=function(he,be,we,Le,He,rt,st,at,ut,De){const it=sn(0,0,he,0,0,be,he,be),yt=sn(we,Le,He,rt,st,at,ut,De);return s.multiply$1(yt,s.adjoint(it,it),yt),[yt[6]/yt[8]*he/s.EXTENT,yt[7]/yt[8]*be/s.EXTENT]}(this.width,this.height,R.x,R.y,U.x,U.y,ne.x,ne.y,K.x,K.y);const ae=this._boundsArray=new s.StructArrayLayout4i8;ae.emplaceBack(R.x,R.y,0,0),ae.emplaceBack(U.x,U.y,s.EXTENT,0),ae.emplaceBack(ne.x,ne.y,0,s.EXTENT),ae.emplaceBack(K.x,K.y,s.EXTENT,s.EXTENT),this.boundsBuffer&&this.boundsBuffer.destroy(),this.boundsBuffer=h.createVertexBuffer(ae,s.boundsAttributes.members),this.boundsSegments=s.SegmentVector.simpleSegment(0,0,4,2)}prepare(){if(Object.keys(this.tiles).length===0||!this.image)return;const h=this.map.painter.context,b=h.gl;this._dirty&&(this.texture?this.texture.update(this.image):(this.texture=new s.Texture(h,this.image,b.RGBA),this.texture.bind(b.LINEAR,b.CLAMP_TO_EDGE)),this._dirty=!1),this._prepareData(h)}loadTile(h,b){this.tileID&&this.tileID.equals(h.tileID.canonical)?(this.tiles[String(h.tileID.wrap)]=h,h.buckets={},b(null)):(h.state="errored",b(null))}serialize(){return{type:"image",url:this.options.url,coordinates:this.coordinates}}hasTransition(){return!1}}const Ye={vector:rr,raster:tr,"raster-dem":class extends tr{constructor(I,h,b,R){super(I,h,b,R),this.type="raster-dem",this.maxzoom=22,this._options=s.extend({type:"raster-dem"},h),this.encoding=h.encoding||"mapbox"}loadTile(I,h){const b=this.map._requestManager.normalizeTileURL(I.tileID.canonical.url(this.tiles,this.scheme),!1,this.tileSize);function R(U,K){U&&(I.state="errored",h(U)),K&&(I.dem=K,I.dem.onDeserialize(),I.needsHillshadePrepare=!0,I.needsDEMTextureUpload=!0,I.state="loaded",h(null))}I.request=s.getImage(this.map._requestManager.transformRequest(b,s.ResourceType.Tile),function(U,K,ne,ae){if(delete I.request,I.aborted)I.state="unloaded",h(null);else if(U)I.state="errored",h(U);else if(K){this.map._refreshExpiredTiles&&I.setExpiryData({cacheControl:ne,expires:ae});const he=s.window.ImageBitmap&&K instanceof s.window.ImageBitmap&&(er==null&&(er=s.window.OffscreenCanvas&&new s.window.OffscreenCanvas(1,1).getContext("2d")&&typeof s.window.createImageBitmap=="function"),er),be=1-(K.width-s.prevPowerOfTwo(K.width))/2;be<1||I.neighboringTiles||(I.neighboringTiles=this._getNeighboringTiles(I.tileID));const we=he?K:s.exported.getImageData(K,be),Le={uid:I.uid,coord:I.tileID,source:this.id,rawImageData:we,encoding:this.encoding,padding:be};I.actor&&I.state!=="expired"||(I.actor=this.dispatcher.getActor(),I.actor.send("loadDEMTile",Le,R.bind(this),void 0,!0))}}.bind(this))}_getNeighboringTiles(I){const h=I.canonical,b=Math.pow(2,h.z),R=(h.x-1+b)%b,U=h.x===0?I.wrap-1:I.wrap,K=(h.x+1+b)%b,ne=h.x+1===b?I.wrap+1:I.wrap,ae={};return ae[new s.OverscaledTileID(I.overscaledZ,U,h.z,R,h.y).key]={backfilled:!1},ae[new s.OverscaledTileID(I.overscaledZ,ne,h.z,K,h.y).key]={backfilled:!1},h.y>0&&(ae[new s.OverscaledTileID(I.overscaledZ,U,h.z,R,h.y-1).key]={backfilled:!1},ae[new s.OverscaledTileID(I.overscaledZ,I.wrap,h.z,h.x,h.y-1).key]={backfilled:!1},ae[new s.OverscaledTileID(I.overscaledZ,ne,h.z,K,h.y-1).key]={backfilled:!1}),h.y+1<b&&(ae[new s.OverscaledTileID(I.overscaledZ,U,h.z,R,h.y+1).key]={backfilled:!1},ae[new s.OverscaledTileID(I.overscaledZ,I.wrap,h.z,h.x,h.y+1).key]={backfilled:!1},ae[new s.OverscaledTileID(I.overscaledZ,ne,h.z,K,h.y+1).key]={backfilled:!1}),ae}unloadTile(I){I.demTexture&&this.map.painter.saveTileTexture(I.demTexture),I.fbo&&(I.fbo.destroy(),delete I.fbo),I.dem&&delete I.dem,delete I.neighboringTiles,I.state="unloaded"}},geojson:class extends s.Evented{constructor(I,h,b,R){super(),this.id=I,this.type="geojson",this.minzoom=0,this.maxzoom=18,this.tileSize=512,this.isTileClipped=!0,this.reparseOverscaled=!0,this._loaded=!1,this.actor=b.getActor(),this.setEventedParent(R),this._data=h.data,this._options=s.extend({},h),this._collectResourceTiming=h.collectResourceTiming,h.maxzoom!==void 0&&(this.maxzoom=h.maxzoom),h.type&&(this.type=h.type),h.attribution&&(this.attribution=h.attribution),this.promoteId=h.promoteId;const U=s.EXTENT/this.tileSize;this.workerOptions=s.extend({source:this.id,cluster:h.cluster||!1,geojsonVtOptions:{buffer:(h.buffer!==void 0?h.buffer:128)*U,tolerance:(h.tolerance!==void 0?h.tolerance:.375)*U,extent:s.EXTENT,maxZoom:this.maxzoom,lineMetrics:h.lineMetrics||!1,generateId:h.generateId||!1},superclusterOptions:{maxZoom:h.clusterMaxZoom!==void 0?h.clusterMaxZoom:this.maxzoom-1,minPoints:Math.max(2,h.clusterMinPoints||2),extent:s.EXTENT,radius:(h.clusterRadius!==void 0?h.clusterRadius:50)*U,log:!1,generateId:h.generateId||!1},clusterProperties:h.clusterProperties,filter:h.filter},h.workerOptions)}onAdd(I){this.map=I,this.setData(this._data)}setData(I){return this._data=I,this._updateWorkerData(),this}getClusterExpansionZoom(I,h){return this.actor.send("geojson.getClusterExpansionZoom",{clusterId:I,source:this.id},h),this}getClusterChildren(I,h){return this.actor.send("geojson.getClusterChildren",{clusterId:I,source:this.id},h),this}getClusterLeaves(I,h,b,R){return this.actor.send("geojson.getClusterLeaves",{source:this.id,clusterId:I,limit:h,offset:b},R),this}_updateWorkerData(){if(this._pendingLoad)return void(this._coalesce=!0);this.fire(new s.Event("dataloading",{dataType:"source"})),this._loaded=!1;const I=s.extend({},this.workerOptions),h=this._data;typeof h=="string"?(I.request=this.map._requestManager.transformRequest(s.exported.resolveURL(h),s.ResourceType.Source),I.request.collectResourceTiming=this._collectResourceTiming):I.data=JSON.stringify(h),this._pendingLoad=this.actor.send(`${this.type}.loadData`,I,(b,R)=>{if(this._loaded=!0,this._pendingLoad=null,b)this.fire(new s.ErrorEvent(b));else{const U={dataType:"source",sourceDataType:this._metadataFired?"content":"metadata"};this._collectResourceTiming&&R&&R.resourceTiming&&R.resourceTiming[this.id]&&(U.resourceTiming=R.resourceTiming[this.id]),this.fire(new s.Event("data",U)),this._metadataFired=!0}this._coalesce&&(this._updateWorkerData(),this._coalesce=!1)})}loaded(){return this._loaded}loadTile(I,h){const b=I.actor?"reloadTile":"loadTile";I.actor=this.actor,I.request=this.actor.send(b,{type:this.type,uid:I.uid,tileID:I.tileID,tileZoom:I.tileZoom,zoom:I.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:s.exported.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId},(R,U)=>(delete I.request,I.unloadVectorData(),I.aborted?h(null):R?h(R):(I.loadVectorData(U,this.map.painter,b==="reloadTile"),h(null))),void 0,b==="loadTile")}abortTile(I){I.request&&(I.request.cancel(),delete I.request),I.aborted=!0}unloadTile(I){I.unloadVectorData(),this.actor.send("removeTile",{uid:I.uid,type:this.type,source:this.id})}onRemove(){this._pendingLoad&&this._pendingLoad.cancel()}serialize(){return s.extend({},this._options,{type:this.type,data:this._data})}hasTransition(){return!1}},video:class extends un{constructor(I,h,b,R){super(I,h,b,R),this.roundZoom=!0,this.type="video",this.options=h}load(){this._loaded=!1;const I=this.options;this.urls=[];for(const h of I.urls)this.urls.push(this.map._requestManager.transformRequest(h,s.ResourceType.Source).url);s.getVideo(this.urls,(h,b)=>{this._loaded=!0,h?this.fire(new s.ErrorEvent(h)):b&&(this.video=b,this.video.loop=!0,this.video.setAttribute("playsinline",""),this.video.addEventListener("playing",()=>{this.map.triggerRepaint()}),this.map&&this.video.play(),this._finishLoading())})}pause(){this.video&&this.video.pause()}play(){this.video&&this.video.play()}seek(I){if(this.video){const h=this.video.seekable;I<h.start(0)||I>h.end(0)?this.fire(new s.ErrorEvent(new s.ValidationError(`sources.${this.id}`,null,`Playback for this video can be set only between the ${h.start(0)} and ${h.end(0)}-second mark.`))):this.video.currentTime=I}}getVideo(){return this.video}onAdd(I){this.map||(this.map=I,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))}prepare(){if(Object.keys(this.tiles).length===0||this.video.readyState<2)return;const I=this.map.painter.context,h=I.gl;this.texture?this.video.paused||(this.texture.bind(h.LINEAR,h.CLAMP_TO_EDGE),h.texSubImage2D(h.TEXTURE_2D,0,0,0,h.RGBA,h.UNSIGNED_BYTE,this.video)):(this.texture=new s.Texture(I,this.video,h.RGBA),this.texture.bind(h.LINEAR,h.CLAMP_TO_EDGE),this.width=this.video.videoWidth,this.height=this.video.videoHeight),this._prepareData(I)}serialize(){return{type:"video",urls:this.urls,coordinates:this.coordinates}}hasTransition(){return this.video&&!this.video.paused}},image:un,canvas:class extends un{constructor(I,h,b,R){super(I,h,b,R),h.coordinates?Array.isArray(h.coordinates)&&h.coordinates.length===4&&!h.coordinates.some(U=>!Array.isArray(U)||U.length!==2||U.some(K=>typeof K!="number"))||this.fire(new s.ErrorEvent(new s.ValidationError(`sources.${I}`,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new s.ErrorEvent(new s.ValidationError(`sources.${I}`,null,'missing required property "coordinates"'))),h.animate&&typeof h.animate!="boolean"&&this.fire(new s.ErrorEvent(new s.ValidationError(`sources.${I}`,null,'optional "animate" property must be a boolean value'))),h.canvas?typeof h.canvas=="string"||h.canvas instanceof s.window.HTMLCanvasElement||this.fire(new s.ErrorEvent(new s.ValidationError(`sources.${I}`,null,'"canvas" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new s.ErrorEvent(new s.ValidationError(`sources.${I}`,null,'missing required property "canvas"'))),this.options=h,this.animate=h.animate===void 0||h.animate}load(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof s.window.HTMLCanvasElement?this.options.canvas:s.window.document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new s.ErrorEvent(new Error("Canvas dimensions cannot be less than or equal to zero."))):(this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading())}getCanvas(){return this.canvas}onAdd(I){this.map=I,this.load(),this.canvas&&this.animate&&this.play()}onRemove(){this.pause()}prepare(){let I=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,I=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,I=!0),this._hasInvalidDimensions()||Object.keys(this.tiles).length===0)return;const h=this.map.painter.context;this.texture?(I||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new s.Texture(h,this.canvas,h.gl.RGBA,{premultiply:!0}),this._prepareData(h)}serialize(){return{type:"canvas",coordinates:this.coordinates}}hasTransition(){return this._playing}_hasInvalidDimensions(){for(const I of[this.canvas.width,this.canvas.height])if(isNaN(I)||I<=0)return!0;return!1}},custom:class extends s.Evented{constructor(I,h,b,R){super(),this.id=I,this.type="custom",this._dataType="raster",this._dispatcher=b,this._implementation=h,this.setEventedParent(R),this.scheme="xyz",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this._loaded=!1,this.roundZoom=!0,this._implementation||this.fire(new s.ErrorEvent(new Error(`Missing implementation for ${this.id} custom source`))),this._implementation.loadTile||this.fire(new s.ErrorEvent(new Error(`Missing loadTile implementation for ${this.id} custom source`))),this._implementation.bounds&&(this.tileBounds=new xe(this._implementation.bounds,this.minzoom,this.maxzoom)),h.update=this._update.bind(this),h.clearTiles=this._clearTiles.bind(this),h.coveringTiles=this._coveringTiles.bind(this),s.extend(this,s.pick(h,["dataType","scheme","minzoom","maxzoom","tileSize","attribution","minTileCacheSize","maxTileCacheSize"]))}serialize(){return s.pick(this,["type","scheme","minzoom","maxzoom","tileSize","attribution"])}load(){this._loaded=!0,this.fire(new s.Event("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new s.Event("data",{dataType:"source",sourceDataType:"content"}))}loaded(){return this._loaded}onAdd(I){this._map=I,this._loaded=!1,this.fire(new s.Event("dataloading",{dataType:"source"})),this._implementation.onAdd&&this._implementation.onAdd(I),this.load()}onRemove(I){this._implementation.onRemove&&this._implementation.onRemove(I)}hasTile(I){if(this._implementation.hasTile){const{x:h,y:b,z:R}=I.canonical;return this._implementation.hasTile({x:h,y:b,z:R})}return!this.tileBounds||this.tileBounds.contains(I.canonical)}loadTile(I,h){const{x:b,y:R,z:U}=I.tileID.canonical,K=new s.window.AbortController;I.request=Promise.resolve(this._implementation.loadTile({x:b,y:R,z:U},{signal:K.signal})).then(function(ne){return delete I.request,I.aborted?(I.state="unloaded",h(null)):ne===void 0?(I.state="errored",h(null)):ne===null?(this.loadTileData(I,{width:this.tileSize,height:this.tileSize,data:null}),I.state="loaded",h(null)):function(ae){return ae instanceof s.window.ImageData||ae instanceof s.window.HTMLCanvasElement||ae instanceof s.window.ImageBitmap||ae instanceof s.window.HTMLImageElement}(ne)?(this.loadTileData(I,ne),I.state="loaded",void h(null)):(I.state="errored",h(new Error(`Can't infer data type for ${this.id}, only raster data supported at the moment`)))}.bind(this)).catch(ne=>{ne.code!==20&&(I.state="errored",h(ne))}),I.request.cancel=()=>K.abort()}loadTileData(I,h){tr.loadTileData(I,h,this._map.painter)}unloadTileData(I){tr.unloadTileData(I,this._map.painter)}unloadTile(I,h){if(this.unloadTileData(I),this._implementation.unloadTile){const{x:b,y:R,z:U}=I.tileID.canonical;this._implementation.unloadTile({x:b,y:R,z:U})}h()}abortTile(I,h){I.request&&I.request.cancel&&(I.request.cancel(),delete I.request),h()}hasTransition(){return!1}_coveringTiles(){return this._map.transform.coveringTiles({tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,roundZoom:this.roundZoom}).map(I=>({x:I.canonical.x,y:I.canonical.y,z:I.canonical.z}))}_clearTiles(){this._map.style._clearSource(this.id)}_update(){this.fire(new s.Event("data",{dataType:"source",sourceDataType:"content"}))}}},Ve=function(I,h,b,R){const U=new Ye[h.type](I,h,b,R);if(U.id!==I)throw new Error(`Expected Source id to be ${I} instead of ${U.id}`);return s.bindAll(["load","abort","unload","serialize","prepare"],U),U};function gt(I,h){const b=s.identity([]);return s.scale(b,b,[.5*I.width,.5*-I.height,1]),s.translate(b,b,[1,-1,0]),s.multiply(b,b,I.calculateProjMatrix(h.toUnwrapped())),Float32Array.from(b)}function qt(I,h,b,R,U,K,ne,ae=!1){const he=I.tilesIn(R,ne,ae);he.sort(on);const be=[];for(const Le of he)be.push({wrappedTileID:Le.tile.tileID.wrapped().key,queryResults:Le.tile.queryRenderedFeatures(h,b,I._state,Le,U,K,gt(I.transform,Le.tile.tileID),ae)});const we=function(Le){const He={},rt={};for(const st of Le){const at=st.queryResults,ut=st.wrappedTileID,De=rt[ut]=rt[ut]||{};for(const it in at){const yt=at[it],mt=De[it]=De[it]||{},kt=He[it]=He[it]||[];for(const Lt of yt)mt[Lt.featureIndex]||(mt[Lt.featureIndex]=!0,kt.push(Lt))}}return He}(be);for(const Le in we)we[Le].forEach(He=>{const rt=He.feature,st=rt.layer;st&&st.type!=="background"&&st.type!=="sky"&&(rt.source=st.source,st["source-layer"]&&(rt.sourceLayer=st["source-layer"]),rt.state=rt.id!==void 0?I.getFeatureState(st["source-layer"],rt.id):{})});return we}function Ht(I,h){const b=I.getRenderableIds().map(K=>I.getTileByID(K)),R=[],U={};for(let K=0;K<b.length;K++){const ne=b[K],ae=ne.tileID.canonical.key;U[ae]||(U[ae]=!0,ne.querySourceFeatures(R,h))}return R}function on(I,h){const b=I.tileID,R=h.tileID;return b.overscaledZ-R.overscaledZ||b.canonical.y-R.canonical.y||b.wrap-R.wrap||b.canonical.x-R.canonical.x}function $t(){return pg.workerClass!=null?new pg.workerClass:new s.window.Worker(pg.workerUrl)}const Gt="mapboxgl_preloaded_worker_pool";class Ir{constructor(){this.active={}}acquire(h){if(!this.workers)for(this.workers=[];this.workers.length<Ir.workerCount;)this.workers.push(new $t);return this.active[h]=!0,this.workers.slice()}release(h){delete this.active[h],this.numActive()===0&&(this.workers.forEach(b=>{b.terminate()}),this.workers=null)}isPreloaded(){return!!this.active[Gt]}numActive(){return Object.keys(this.active).length}}let Br;function Xr(){return Br||(Br=new Ir),Br}function Vn(I,h){const b={};for(const R in I)R!=="ref"&&(b[R]=I[R]);return s.refProperties.forEach(R=>{R in h&&(b[R]=h[R])}),b}function Ln(I){I=I.slice();const h=Object.create(null);for(let b=0;b<I.length;b++)h[I[b].id]=I[b];for(let b=0;b<I.length;b++)"ref"in I[b]&&(I[b]=Vn(I[b],h[I[b].ref]));return I}Ir.workerCount=2;const br={setStyle:"setStyle",addLayer:"addLayer",removeLayer:"removeLayer",setPaintProperty:"setPaintProperty",setLayoutProperty:"setLayoutProperty",setFilter:"setFilter",addSource:"addSource",removeSource:"removeSource",setGeoJSONSourceData:"setGeoJSONSourceData",setLayerZoomRange:"setLayerZoomRange",setLayerProperty:"setLayerProperty",setCenter:"setCenter",setZoom:"setZoom",setBearing:"setBearing",setPitch:"setPitch",setSprite:"setSprite",setGlyphs:"setGlyphs",setTransition:"setTransition",setLight:"setLight",setTerrain:"setTerrain",setFog:"setFog",setProjection:"setProjection"};function oi(I,h,b){b.push({command:br.addSource,args:[I,h[I]]})}function Gi(I,h,b){h.push({command:br.removeSource,args:[I]}),b[I]=!0}function pi(I,h,b,R){Gi(I,b,R),oi(I,h,b)}function Ds(I,h,b){let R;for(R in I[b])if(I[b].hasOwnProperty(R)&&R!=="data"&&!l(I[b][R],h[b][R]))return!1;for(R in h[b])if(h[b].hasOwnProperty(R)&&R!=="data"&&!l(I[b][R],h[b][R]))return!1;return!0}function Xo(I,h,b,R,U,K){let ne;for(ne in h=h||{},I=I||{})I.hasOwnProperty(ne)&&(l(I[ne],h[ne])||b.push({command:K,args:[R,ne,h[ne],U]}));for(ne in h)h.hasOwnProperty(ne)&&!I.hasOwnProperty(ne)&&(l(I[ne],h[ne])||b.push({command:K,args:[R,ne,h[ne],U]}))}function jo(I){return I.id}function Qa(I,h){return I[h.id]=h,I}class za{constructor(h,b){this.reset(h,b)}reset(h,b){this.points=h||[],this._distances=[0];for(let R=1;R<this.points.length;R++)this._distances[R]=this._distances[R-1]+this.points[R].dist(this.points[R-1]);this.length=this._distances[this._distances.length-1],this.padding=Math.min(b||0,.5*this.length),this.paddedLength=this.length-2*this.padding}lerp(h){if(this.points.length===1)return this.points[0];h=s.clamp(h,0,1);let b=1,R=this._distances[b];const U=h*this.paddedLength+this.padding;for(;R<U&&b<this._distances.length;)R=this._distances[++b];const K=b-1,ne=this._distances[K],ae=R-ne,he=ae>0?(U-ne)/ae:0;return this.points[K].mult(1-he).add(this.points[b].mult(he))}}class es{constructor(h,b,R){const U=this.boxCells=[],K=this.circleCells=[];this.xCellCount=Math.ceil(h/R),this.yCellCount=Math.ceil(b/R);for(let ne=0;ne<this.xCellCount*this.yCellCount;ne++)U.push([]),K.push([]);this.circleKeys=[],this.boxKeys=[],this.bboxes=[],this.circles=[],this.width=h,this.height=b,this.xScale=this.xCellCount/h,this.yScale=this.yCellCount/b,this.boxUid=0,this.circleUid=0}keysLength(){return this.boxKeys.length+this.circleKeys.length}insert(h,b,R,U,K){this._forEachCell(b,R,U,K,this._insertBoxCell,this.boxUid++),this.boxKeys.push(h),this.bboxes.push(b),this.bboxes.push(R),this.bboxes.push(U),this.bboxes.push(K)}insertCircle(h,b,R,U){this._forEachCell(b-U,R-U,b+U,R+U,this._insertCircleCell,this.circleUid++),this.circleKeys.push(h),this.circles.push(b),this.circles.push(R),this.circles.push(U)}_insertBoxCell(h,b,R,U,K,ne){this.boxCells[K].push(ne)}_insertCircleCell(h,b,R,U,K,ne){this.circleCells[K].push(ne)}_query(h,b,R,U,K,ne){if(R<0||h>this.width||U<0||b>this.height)return!K&&[];const ae=[];if(h<=0&&b<=0&&this.width<=R&&this.height<=U){if(K)return!0;for(let he=0;he<this.boxKeys.length;he++)ae.push({key:this.boxKeys[he],x1:this.bboxes[4*he],y1:this.bboxes[4*he+1],x2:this.bboxes[4*he+2],y2:this.bboxes[4*he+3]});for(let he=0;he<this.circleKeys.length;he++){const be=this.circles[3*he],we=this.circles[3*he+1],Le=this.circles[3*he+2];ae.push({key:this.circleKeys[he],x1:be-Le,y1:we-Le,x2:be+Le,y2:we+Le})}return ne?ae.filter(ne):ae}return this._forEachCell(h,b,R,U,this._queryCell,ae,{hitTest:K,seenUids:{box:{},circle:{}}},ne),K?ae.length>0:ae}_queryCircle(h,b,R,U,K){const ne=h-R,ae=h+R,he=b-R,be=b+R;if(ae<0||ne>this.width||be<0||he>this.height)return!U&&[];const we=[];return this._forEachCell(ne,he,ae,be,this._queryCellCircle,we,{hitTest:U,circle:{x:h,y:b,radius:R},seenUids:{box:{},circle:{}}},K),U?we.length>0:we}query(h,b,R,U,K){return this._query(h,b,R,U,!1,K)}hitTest(h,b,R,U,K){return this._query(h,b,R,U,!0,K)}hitTestCircle(h,b,R,U){return this._queryCircle(h,b,R,!0,U)}_queryCell(h,b,R,U,K,ne,ae,he){const be=ae.seenUids,we=this.boxCells[K];if(we!==null){const He=this.bboxes;for(const rt of we)if(!be.box[rt]){be.box[rt]=!0;const st=4*rt;if(h<=He[st+2]&&b<=He[st+3]&&R>=He[st+0]&&U>=He[st+1]&&(!he||he(this.boxKeys[rt]))){if(ae.hitTest)return ne.push(!0),!0;ne.push({key:this.boxKeys[rt],x1:He[st],y1:He[st+1],x2:He[st+2],y2:He[st+3]})}}}const Le=this.circleCells[K];if(Le!==null){const He=this.circles;for(const rt of Le)if(!be.circle[rt]){be.circle[rt]=!0;const st=3*rt;if(this._circleAndRectCollide(He[st],He[st+1],He[st+2],h,b,R,U)&&(!he||he(this.circleKeys[rt]))){if(ae.hitTest)return ne.push(!0),!0;{const at=He[st],ut=He[st+1],De=He[st+2];ne.push({key:this.circleKeys[rt],x1:at-De,y1:ut-De,x2:at+De,y2:ut+De})}}}}}_queryCellCircle(h,b,R,U,K,ne,ae,he){const be=ae.circle,we=ae.seenUids,Le=this.boxCells[K];if(Le!==null){const rt=this.bboxes;for(const st of Le)if(!we.box[st]){we.box[st]=!0;const at=4*st;if(this._circleAndRectCollide(be.x,be.y,be.radius,rt[at+0],rt[at+1],rt[at+2],rt[at+3])&&(!he||he(this.boxKeys[st])))return ne.push(!0),!0}}const He=this.circleCells[K];if(He!==null){const rt=this.circles;for(const st of He)if(!we.circle[st]){we.circle[st]=!0;const at=3*st;if(this._circlesCollide(rt[at],rt[at+1],rt[at+2],be.x,be.y,be.radius)&&(!he||he(this.circleKeys[st])))return ne.push(!0),!0}}}_forEachCell(h,b,R,U,K,ne,ae,he){const be=this._convertToXCellCoord(h),we=this._convertToYCellCoord(b),Le=this._convertToXCellCoord(R),He=this._convertToYCellCoord(U);for(let rt=be;rt<=Le;rt++)for(let st=we;st<=He;st++)if(K.call(this,h,b,R,U,this.xCellCount*st+rt,ne,ae,he))return}_convertToXCellCoord(h){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(h*this.xScale)))}_convertToYCellCoord(h){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(h*this.yScale)))}_circlesCollide(h,b,R,U,K,ne){const ae=U-h,he=K-b,be=R+ne;return be*be>ae*ae+he*he}_circleAndRectCollide(h,b,R,U,K,ne,ae){const he=(ne-U)/2,be=Math.abs(h-(U+he));if(be>he+R)return!1;const we=(ae-K)/2,Le=Math.abs(b-(K+we));if(Le>we+R)return!1;if(be<=he||Le<=we)return!0;const He=be-he,rt=Le-we;return He*He+rt*rt<=R*R}}const Pi={unknown:0,flipRequired:1,flipNotRequired:2},Ns=Math.tan(85*Math.PI/180);function dr(I,h,b,R,U,K,ne){const ae=s.create();if(b)if(K.name==="globe"){const he=s.calculateGlobeLabelMatrix(U,h);s.multiply(ae,ae,he)}else{const he=D([],ne);ae[0]=he[0],ae[1]=he[1],ae[4]=he[2],ae[5]=he[3],R||s.rotateZ(ae,ae,U.angle)}else s.multiply(ae,U.labelPlaneMatrix,I);return ae}function Oi(I,h,b,R,U,K,ne){const ae=dr(I,h,b,R,U,K,ne);return K.name==="globe"&&b||(ae[2]=ae[6]=ae[10]=ae[14]=0),ae}function Li(I,h,b,R,U,K,ne){if(b){if(K.name==="globe"){const ae=dr(I,h,b,R,U,K,ne);return s.invert(ae,ae),s.multiply(ae,I,ae),ae}{const ae=s.clone(I),he=s.identity([]);return he[0]=ne[0],he[1]=ne[1],he[4]=ne[2],he[5]=ne[3],s.multiply(ae,ae,he),R||s.rotateZ(ae,ae,-U.angle),ae}}return U.glCoordMatrix}function ho(I,h,b,R){const U=[I,h,b,1];b?s.transformMat4$1(U,U,R):ri(U,U,R);const K=U[3];return U[0]/=K,U[1]/=K,U[2]/=K,U}function qs(I,h){return Math.min(.5+I/h*.5,1.5)}function fn(I,h){const b=I[0]/I[3],R=I[1]/I[3];return b>=-h[0]&&b<=h[0]&&R>=-h[1]&&R<=h[1]}function an(I,h,b,R,U,K,ne,ae,he,be){const we=b.transform,Le=R?I.textSizeData:I.iconSizeData,He=s.evaluateSizeForZoom(Le,b.transform.zoom),rt=we.projection.name==="globe",st=[256/b.width*2+1,256/b.height*2+1],at=R?I.text.dynamicLayoutVertexArray:I.icon.dynamicLayoutVertexArray;at.clear();let ut=null;rt&&(ut=R?I.text.globeExtVertexArray:I.icon.globeExtVertexArray);const De=I.lineVertexArray,it=R?I.text.placedSymbolArray:I.icon.placedSymbolArray,yt=b.transform.width/b.transform.height;let mt,kt=!1;for(let Lt=0;Lt<it.length;Lt++){const At=it.get(Lt),{numGlyphs:Yt,writingMode:Vt}=At;if(Vt!==s.WritingMode.vertical||kt||mt===s.WritingMode.horizontal||(kt=!0),mt=Vt,(At.hidden||Vt===s.WritingMode.vertical)&&!kt){Uo(Yt,at);continue}kt=!1;const or=new s.Point(At.tileAnchorX,At.tileAnchorY);let{x:Wr,y:Qt,z:Tr}=we.projection.projectTilePoint(or.x,or.y,be.canonical);if(he){const[li,Cn,Gn]=he(or);Wr+=li,Qt+=Cn,Tr+=Gn}const fr=[Wr,Qt,Tr,1];if(s.transformMat4$1(fr,fr,h),!fn(fr,st)){Uo(Yt,at);continue}const jr=qs(b.transform.cameraToCenterDistance,fr[3]),lr=s.evaluateSizeForFeature(Le,He,At),xr=ne?lr/jr:lr*jr,qr=ho(Wr,Qt,Tr,U);if(qr[3]<=0){Uo(Yt,at);continue}let Rr={};const Yr=ne?null:he,Nn=zr(At,xr,!1,ae,h,U,K,I.glyphOffsetArray,De,at,ut,qr,or,Rr,yt,Yr,we.projection,be,ne);kt=Nn.useVertical,Yr&&Nn.needsFlipping&&(Rr={}),(Nn.notEnoughRoom||kt||Nn.needsFlipping&&zr(At,xr,!0,ae,h,U,K,I.glyphOffsetArray,De,at,ut,qr,or,Rr,yt,Yr,we.projection,be,ne).notEnoughRoom)&&Uo(Yt,at)}R?(I.text.dynamicLayoutVertexBuffer.updateData(at),ut&&I.text.globeExtVertexBuffer.updateData(ut)):(I.icon.dynamicLayoutVertexBuffer.updateData(at),ut&&I.icon.globeExtVertexBuffer.updateData(ut))}function Dr(I,h,b,R,U,K,ne,ae,he,be,we,Le,He,rt,st,at){const{lineStartIndex:ut,glyphStartIndex:De,segment:it}=ae,yt=De+ae.numGlyphs,mt=ut+ae.lineLength,kt=h.getoffsetX(De),Lt=h.getoffsetX(yt-1),At=ls(I*kt,b,R,U,K,ne,it,ut,mt,he,be,we,Le,He,!0,rt,st,at);if(!At)return null;const Yt=ls(I*Lt,b,R,U,K,ne,it,ut,mt,he,be,we,Le,He,!0,rt,st,at);return Yt?{first:At,last:Yt}:null}function Rn(I,h,b,R){return I===s.WritingMode.horizontal&&Math.abs(R)>Math.abs(b)?{useVertical:!0}:I===s.WritingMode.vertical?R>0?{needsFlipping:!0}:null:h!==Pi.unknown&&function(U,K){return U===0||Math.abs(K/U)>Ns}(b,R)?h===Pi.flipRequired?{needsFlipping:!0}:null:b<0?{needsFlipping:!0}:null}function zr(I,h,b,R,U,K,ne,ae,he,be,we,Le,He,rt,st,at,ut,De,it){const yt=h/24,mt=I.lineOffsetX*yt,kt=I.lineOffsetY*yt,{lineStartIndex:Lt,glyphStartIndex:At,numGlyphs:Yt,segment:Vt,writingMode:or,flipState:Wr}=I,Qt=Lt+I.lineLength,Tr=fr=>{if(we){const[qr,Rr,Yr]=fr.up,Nn=be.length;s.updateGlobeVertexNormal(we,Nn+0,qr,Rr,Yr),s.updateGlobeVertexNormal(we,Nn+1,qr,Rr,Yr),s.updateGlobeVertexNormal(we,Nn+2,qr,Rr,Yr),s.updateGlobeVertexNormal(we,Nn+3,qr,Rr,Yr)}const[jr,lr,xr]=fr.point;s.addDynamicAttributes(be,jr,lr,xr,fr.angle)};if(Yt>1){const fr=Dr(yt,ae,mt,kt,b,Le,He,I,he,K,rt,at,!1,ut,De,it);if(!fr)return{notEnoughRoom:!0};if(R&&!b){let[jr,lr,xr]=fr.first.point,[qr,Rr,Yr]=fr.last.point;[jr,lr]=ho(jr,lr,xr,ne),[qr,Rr]=ho(qr,Rr,Yr,ne);const Nn=Rn(or,Wr,(qr-jr)*st,Rr-lr);if(I.flipState=Nn&&Nn.needsFlipping?Pi.flipRequired:Pi.flipNotRequired,Nn)return Nn}Tr(fr.first);for(let jr=At+1;jr<At+Yt-1;jr++){const lr=ls(yt*ae.getoffsetX(jr),mt,kt,b,Le,He,Vt,Lt,Qt,he,K,rt,at,!1,!1,ut,De,it);if(!lr)return be.length-=4*(jr-At),{notEnoughRoom:!0};Tr(lr)}Tr(fr.last)}else{if(R&&!b){const jr=ho(He.x,He.y,0,U),lr=Lt+Vt+1,xr=new s.Point(he.getx(lr),he.gety(lr)),qr=ho(xr.x,xr.y,0,U),Rr=qr[3]>0?qr:Tn(He,xr,jr,1,U,void 0,ut,De.canonical),Yr=Rn(or,Wr,(Rr[0]-jr[0])*st,Rr[1]-jr[1]);if(I.flipState=Yr&&Yr.needsFlipping?Pi.flipRequired:Pi.flipNotRequired,Yr)return Yr}const fr=ls(yt*ae.getoffsetX(At),mt,kt,b,Le,He,Vt,Lt,Qt,he,K,rt,at,!1,!1,ut,De,it);if(!fr)return{notEnoughRoom:!0};Tr(fr)}return{}}function Fn(I,h,b,R,U){const{x:K,y:ne,z:ae}=R.projectTilePoint(I.x,I.y,h);if(!U)return ho(K,ne,ae,b);const[he,be,we]=U(I);return ho(K+he,ne+be,ae+we,b)}function Tn(I,h,b,R,U,K,ne,ae){const he=Fn(I.sub(h)._unit()._add(I),ae,U,ne,K);return s.sub(he,b,he),s.normalize(he,he),s.scaleAndAdd(he,b,he,R)}function ls(I,h,b,R,U,K,ne,ae,he,be,we,Le,He,rt,st,at,ut,De){const it=R?I-h:I+h;let yt=it>0?1:-1,mt=0;R&&(yt*=-1,mt=Math.PI),yt<0&&(mt+=Math.PI);let kt=ae+ne+(yt>0?0:1)|0,Lt=U,At=U,Yt=0,Vt=0;const or=Math.abs(it),Wr=[],Qt=[];let Tr=K,fr=Tr;const jr=()=>Tn(fr,Tr,At,or-Yt+1,we,He,at,ut.canonical);for(;Yt+Vt<=or;){if(kt+=yt,kt<ae||kt>=he)return null;if(At=Lt,fr=Tr,Wr.push(At),rt&&Qt.push(fr),Tr=new s.Point(be.getx(kt),be.gety(kt)),Lt=Le[kt],!Lt){const Gn=Fn(Tr,ut.canonical,we,at,He);Lt=Gn[3]>0?Le[kt]=Gn:jr()}Yt+=Vt,Vt=s.distance(At,Lt)}st&&He&&(Le[kt]&&(Lt=jr(),Vt=s.distance(At,Lt)),Le[kt]=Lt);const lr=(or-Yt)/Vt,xr=Tr.sub(fr)._mult(lr)._add(fr),qr=s.sub([],Lt,At),Rr=s.scaleAndAdd([],At,qr,lr);let Yr=[0,0,1],Nn=qr[0],li=qr[1];if(De&&(Yr=at.upVector(ut.canonical,xr.x,xr.y),Yr[0]!==0||Yr[1]!==0||Yr[2]!==1)){const Gn=[Yr[2],0,-Yr[0]],Ri=s.cross([],Yr,Gn);s.normalize(Gn,Gn),s.normalize(Ri,Ri),Nn=s.dot(qr,Gn),li=s.dot(qr,Ri)}if(b){const Gn=s.cross([],Yr,qr);s.normalize(Gn,Gn),s.scaleAndAdd(Rr,Rr,Gn,b*yt)}const Cn=mt+Math.atan2(li,Nn);return Wr.push(Rr),rt&&Qt.push(xr),{point:Rr,angle:Cn,path:Wr,tilePath:Qt,up:Yr}}function Uo(I,h){const b=h.length,R=b+4*I;h.resize(R),h.float32.fill(-1/0,4*b,4*R)}function ri(I,h,b){const R=h[0],U=h[1];return I[0]=b[0]*R+b[4]*U+b[12],I[1]=b[1]*R+b[5]*U+b[13],I[3]=b[3]*R+b[7]*U+b[15],I}const $s=100;class le{constructor(h,b,R=new es(h.width+200,h.height+200,25),U=new es(h.width+200,h.height+200,25)){this.transform=h,this.grid=R,this.ignoredGrid=U,this.pitchfactor=Math.cos(h._pitch)*h.cameraToCenterDistance,this.screenRightBoundary=h.width+$s,this.screenBottomBoundary=h.height+$s,this.gridRightBoundary=h.width+200,this.gridBottomBoundary=h.height+200,this.fogState=b}placeCollisionBox(h,b,R,U,K,ne,ae,he){let be=R.projectedAnchorX,we=R.projectedAnchorY,Le=R.projectedAnchorZ;const He=R.elevation,rt=R.tileID,st=h.getProjection();if(He&&rt){const[Lt,At,Yt]=st.upVector(rt.canonical,R.tileAnchorX,R.tileAnchorY),Vt=st.upVectorScale(rt.canonical,this.transform.center.lat,this.transform.worldSize).metersToTile;be+=Lt*He*Vt,we+=At*He*Vt,Le+=Yt*He*Vt}const at=this.projectAndGetPerspectiveRatio(ae,be,we,Le,R.tileID,st.name==="globe"||!!He||this.transform.pitch>0,st),ut=ne*at.perspectiveRatio,De=(R.x1*b+U.x-R.padding)*ut+at.point.x,it=(R.y1*b+U.y-R.padding)*ut+at.point.y,yt=(R.x2*b+U.x+R.padding)*ut+at.point.x,mt=(R.y2*b+U.y+R.padding)*ut+at.point.y,kt=at.perspectiveRatio<=.55||at.occluded;return!this.isInsideGrid(De,it,yt,mt)||!K&&this.grid.hitTest(De,it,yt,mt,he)||kt?{box:[],offscreen:!1,occluded:at.occluded}:{box:[De,it,yt,mt],offscreen:this.isOffscreen(De,it,yt,mt),occluded:!1}}placeCollisionCircles(h,b,R,U,K,ne,ae,he,be,we,Le,He,rt,st,at){const ut=[],De=this.transform.elevation,it=h.getProjection(),yt=De?De.getAtTileOffsetFunc(at,this.transform.center.lat,this.transform.worldSize,it):null,mt=new s.Point(R.tileAnchorX,R.tileAnchorY);let{x:kt,y:Lt,z:At}=it.projectTilePoint(mt.x,mt.y,at.canonical);if(yt){const[xr,qr,Rr]=yt(mt);kt+=xr,Lt+=qr,At+=Rr}const Yt=it.name==="globe",Vt=this.projectAndGetPerspectiveRatio(ae,kt,Lt,At,at,Yt||!!De||this.transform.pitch>0,it),{perspectiveRatio:or}=Vt,Wr=(Le?ne/or:ne*or)/s.ONE_EM,Qt=ho(kt,Lt,At,he),Tr=Vt.signedDistanceFromCamera>0?Dr(Wr,K,R.lineOffsetX*Wr,R.lineOffsetY*Wr,!1,Qt,mt,R,U,he,{},De&&!Le?yt:null,Le&&!!De,it,at,Le):null;let fr=!1,jr=!1,lr=!0;if(Tr&&!Vt.occluded){const xr=.5*rt*or+st,qr=new s.Point(-100,-100),Rr=new s.Point(this.screenRightBoundary,this.screenBottomBoundary),Yr=new za,{first:Nn,last:li}=Tr,Cn=Nn.path.length;let Gn=[];for(let An=Cn-1;An>=1;An--)Gn.push(Nn.path[An]);for(let An=1;An<li.path.length;An++)Gn.push(li.path[An]);const Ri=2.5*xr;be&&(Gn=Gn.map(([An,_o,Vo],Ho)=>(yt&&!Yt&&(Vo=yt(Ho<Cn-1?Nn.tilePath[Cn-1-Ho]:li.tilePath[Ho-Cn+2])[2]),ho(An,_o,Vo,be))),Gn.some(An=>An[3]<=0)&&(Gn=[]));let bi=[];if(Gn.length>0){let An=1/0,_o=-1/0,Vo=1/0,Ho=-1/0;for(const No of Gn)An=Math.min(An,No[0]),Vo=Math.min(Vo,No[1]),_o=Math.max(_o,No[0]),Ho=Math.max(Ho,No[1]);_o>=qr.x&&An<=Rr.x&&Ho>=qr.y&&Vo<=Rr.y&&(bi=[Gn.map(No=>new s.Point(No[0],No[1]))],(An<qr.x||_o>Rr.x||Vo<qr.y||Ho>Rr.y)&&(bi=s.clipLine(bi,qr.x,qr.y,Rr.x,Rr.y)))}for(const An of bi){Yr.reset(An,.25*xr);let _o=0;_o=Yr.length<=.5*xr?1:Math.ceil(Yr.paddedLength/Ri)+1;for(let Vo=0;Vo<_o;Vo++){const Ho=Vo/Math.max(_o-1,1),No=Yr.lerp(Ho),il=No.x+$s,ol=No.y+$s;ut.push(il,ol,xr,0);const dc=il-xr,qu=ol-xr,cs=il+xr,$o=ol+xr;if(lr=lr&&this.isOffscreen(dc,qu,cs,$o),jr=jr||this.isInsideGrid(dc,qu,cs,$o),!b&&this.grid.hitTestCircle(il,ol,xr,He)&&(fr=!0,!we))return{circles:[],offscreen:!1,collisionDetected:fr,occluded:!1}}}}return{circles:!we&&fr||!jr?[]:ut,offscreen:lr,collisionDetected:fr,occluded:Vt.occluded}}queryRenderedSymbols(h){if(h.length===0||this.grid.keysLength()===0&&this.ignoredGrid.keysLength()===0)return{};const b=[];let R=1/0,U=1/0,K=-1/0,ne=-1/0;for(const we of h){const Le=new s.Point(we.x+$s,we.y+$s);R=Math.min(R,Le.x),U=Math.min(U,Le.y),K=Math.max(K,Le.x),ne=Math.max(ne,Le.y),b.push(Le)}const ae=this.grid.query(R,U,K,ne).concat(this.ignoredGrid.query(R,U,K,ne)),he={},be={};for(const we of ae){const Le=we.key;if(he[Le.bucketInstanceId]===void 0&&(he[Le.bucketInstanceId]={}),he[Le.bucketInstanceId][Le.featureIndex])continue;const He=[new s.Point(we.x1,we.y1),new s.Point(we.x2,we.y1),new s.Point(we.x2,we.y2),new s.Point(we.x1,we.y2)];s.polygonIntersectsPolygon(b,He)&&(he[Le.bucketInstanceId][Le.featureIndex]=!0,be[Le.bucketInstanceId]===void 0&&(be[Le.bucketInstanceId]=[]),be[Le.bucketInstanceId].push(Le.featureIndex))}return be}insertCollisionBox(h,b,R,U,K){(b?this.ignoredGrid:this.grid).insert({bucketInstanceId:R,featureIndex:U,collisionGroupID:K},h[0],h[1],h[2],h[3])}insertCollisionCircles(h,b,R,U,K){const ne=b?this.ignoredGrid:this.grid,ae={bucketInstanceId:R,featureIndex:U,collisionGroupID:K};for(let he=0;he<h.length;he+=4)ne.insertCircle(ae,h[he],h[he+1],h[he+2])}projectAndGetPerspectiveRatio(h,b,R,U,K,ne,ae){const he=[b,R,U,1];let be=!1;U||this.transform.pitch>0?(s.transformMat4$1(he,he,h),this.fogState&&K&&ae.name!=="globe"&&(be=function(He,rt,st,at,ut,De){const it=De.calculateFogTileMatrix(ut),yt=[rt,st,at];return s.transformMat4(yt,yt,it),F(He,yt,De.pitch,De._fov)}(this.fogState,b,R,U,K.toUnwrapped(),this.transform)>.9)):ri(he,he,h);const we=he[3];return{point:new s.Point((he[0]/we+1)/2*this.transform.width+$s,(-he[1]/we+1)/2*this.transform.height+$s),perspectiveRatio:Math.min(.5+this.transform.getCameraToCenterDistance(ae)/we*.5,1.5),signedDistanceFromCamera:we,occluded:ne&&he[2]>we||be}}isOffscreen(h,b,R,U){return R<$s||h>=this.screenRightBoundary||U<$s||b>this.screenBottomBoundary}isInsideGrid(h,b,R,U){return R>=0&&h<this.gridRightBoundary&&U>=0&&b<this.gridBottomBoundary}getViewportMatrix(){const h=s.identity([]);return s.translate(h,h,[-100,-100,0]),h}}function Se(I,h,b){const R=h.createTileMatrix(I,I.worldSize,b.toUnwrapped());return s.multiply(new Float32Array(16),I.projMatrix,R)}function Ue(I,h,b){if(h.projection.name===b.projection.name)return I.projMatrix;const R=b.clone();return R.setProjection(h.projection),Se(R,h.getProjection(),I)}function Et(I,h,b){return h.name===b.projection.name?I.projMatrix:Se(b,h,I)}class qe{constructor(h,b,R,U){this.opacity=h?Math.max(0,Math.min(1,h.opacity+(h.placed?b:-b))):U&&R?1:0,this.placed=R}isHidden(){return this.opacity===0&&!this.placed}}class et{constructor(h,b,R,U,K,ne=!1){this.text=new qe(h?h.text:null,b,R,K),this.icon=new qe(h?h.icon:null,b,U,K),this.clipped=ne}isHidden(){return this.text.isHidden()&&this.icon.isHidden()}}class ct{constructor(h,b,R,U=!1){this.text=h,this.icon=b,this.skipFade=R,this.clipped=U}}class jt{constructor(){this.invProjMatrix=s.create(),this.viewportMatrix=s.create(),this.circles=[]}}class Xt{constructor(h,b,R,U,K){this.bucketInstanceId=h,this.featureIndex=b,this.sourceLayerIndex=R,this.bucketIndex=U,this.tileID=K}}class pr{constructor(h){this.crossSourceCollisions=h,this.maxGroupID=0,this.collisionGroups={}}get(h){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[h]){const b=++this.maxGroupID;this.collisionGroups[h]={ID:b,predicate:R=>R.collisionGroupID===b}}return this.collisionGroups[h]}}function zt(I,h,b,R,U){const{horizontalAlign:K,verticalAlign:ne}=s.getAnchorAlignment(I),ae=-(K-.5)*h,he=-(ne-.5)*b,be=s.evaluateVariableOffset(I,R);return new s.Point(ae+be[0]*U,he+be[1]*U)}function Hr(I,h,b,R,U){const K=new s.Point(I,h);return b&&K._rotate(R?U:-U),K}class Zr{constructor(h,b,R,U,K){this.transform=h.clone(),this.projection=h.projection.name,this.collisionIndex=new le(this.transform,K),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=b,this.retainedQueryData={},this.collisionGroups=new pr(R),this.collisionCircleArrays={},this.prevPlacement=U,U&&(U.prevPlacement=void 0),this.placedOrientations={}}getBucketParts(h,b,R,U){const K=R.getBucket(b),ne=R.latestFeatureIndex;if(!K||!ne||b.id!==K.layerIds[0])return;const ae=K.layers[0].layout,he=R.collisionBoxArray,be=Math.pow(2,this.transform.zoom-R.tileID.overscaledZ),we=R.tileSize/s.EXTENT,Le=R.tileID.toUnwrapped();this.transform.setProjection(K.projection);const He=(rt=R.tileID,st=K.getProjection(),at=this.transform,st.name===this.projection?at.calculateProjMatrix(rt.toUnwrapped()):Se(at,st,rt));var rt,st,at;const ut=ae.get("text-pitch-alignment")==="map",De=ae.get("text-rotation-alignment")==="map";b.compileFilter();const it=b.dynamicFilter(),yt=b.dynamicFilterNeedsFeature(),mt=this.transform.calculatePixelsToTileUnitsMatrix(R),kt=Oi(He,R.tileID.canonical,ut,De,this.transform,K.getProjection(),mt);let Lt=null;if(ut){const Vt=Li(He,R.tileID.canonical,ut,De,this.transform,K.getProjection(),mt);Lt=s.multiply([],this.transform.labelPlaneMatrix,Vt)}let At=null;it&&R.latestFeatureIndex&&(At={unwrappedTileID:Le,dynamicFilter:it,dynamicFilterNeedsFeature:yt,featureIndex:R.latestFeatureIndex}),this.retainedQueryData[K.bucketInstanceId]=new Xt(K.bucketInstanceId,ne,K.sourceLayerIndex,K.index,R.tileID);const Yt={bucket:K,layout:ae,posMatrix:He,textLabelPlaneMatrix:kt,labelToScreenMatrix:Lt,clippingData:At,scale:be,textPixelRatio:we,holdingForFade:R.holdingForFade(),collisionBoxArray:he,partiallyEvaluatedTextSize:s.evaluateSizeForZoom(K.textSizeData,this.transform.zoom),partiallyEvaluatedIconSize:s.evaluateSizeForZoom(K.iconSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(K.sourceID)};if(U)for(const Vt of K.sortKeyRanges){const{sortKey:or,symbolInstanceStart:Wr,symbolInstanceEnd:Qt}=Vt;h.push({sortKey:or,symbolInstanceStart:Wr,symbolInstanceEnd:Qt,parameters:Yt})}else h.push({symbolInstanceStart:0,symbolInstanceEnd:K.symbolInstances.length,parameters:Yt})}attemptAnchorPlacement(h,b,R,U,K,ne,ae,he,be,we,Le,He,rt,st,at,ut,De,it){const{textOffset0:yt,textOffset1:mt,crossTileID:kt}=He,Lt=[yt,mt],At=zt(h,R,U,Lt,K),Yt=this.collisionIndex.placeCollisionBox(st,K,b,Hr(At.x,At.y,ne,ae,this.transform.angle),Le,he,be,we.predicate);if(ut){const Vt=st.getSymbolInstanceIconSize(it,this.transform.zoom,He.placedIconSymbolIndex);if(this.collisionIndex.placeCollisionBox(st,Vt,ut,Hr(At.x,At.y,ne,ae,this.transform.angle),Le,he,be,we.predicate).box.length===0)return}if(Yt.box.length>0){let Vt;return this.prevPlacement&&this.prevPlacement.variableOffsets[kt]&&this.prevPlacement.placements[kt]&&this.prevPlacement.placements[kt].text&&(Vt=this.prevPlacement.variableOffsets[kt].anchor),this.variableOffsets[kt]={textOffset:Lt,width:R,height:U,anchor:h,textScale:K,prevAnchor:Vt},this.markUsedJustification(st,h,He,at),st.allowVerticalPlacement&&(this.markUsedOrientation(st,at,He),this.placedOrientations[kt]=at),{shift:At,placedGlyphBoxes:Yt}}}placeLayerBucketPart(h,b,R,U){const{bucket:K,layout:ne,posMatrix:ae,textLabelPlaneMatrix:he,labelToScreenMatrix:be,clippingData:we,textPixelRatio:Le,holdingForFade:He,collisionBoxArray:rt,partiallyEvaluatedTextSize:st,partiallyEvaluatedIconSize:at,collisionGroup:ut}=h.parameters,De=ne.get("text-optional"),it=ne.get("icon-optional"),yt=ne.get("text-allow-overlap"),mt=ne.get("icon-allow-overlap"),kt=ne.get("text-rotation-alignment")==="map",Lt=ne.get("text-pitch-alignment")==="map",At=ne.get("icon-text-fit")!=="none",Yt=ne.get("symbol-z-order")==="viewport-y";this.transform.setProjection(K.projection);let Vt=yt&&(mt||!K.hasIconData()||it),or=mt&&(yt||!K.hasTextData()||De);!K.collisionArrays&&rt&&K.deserializeCollisionBoxes(rt),R&&U&&K.updateCollisionDebugBuffers(this.transform.zoom,rt);const Wr=(Qt,Tr,fr)=>{const{crossTileID:jr,numVerticalGlyphVertices:lr}=Qt;if(we){const cs={zoom:this.transform.zoom,pitch:this.transform.pitch};let $o=null;if(we.dynamicFilterNeedsFeature){const qi=this.retainedQueryData[K.bucketInstanceId];$o=we.featureIndex.loadFeature({featureIndex:Qt.featureIndex,bucketIndex:qi.bucketIndex,sourceLayerIndex:qi.sourceLayerIndex,layoutVertexArrayOffset:0})}if(!(0,we.dynamicFilter)(cs,$o,this.retainedQueryData[K.bucketInstanceId].tileID.canonical,new s.Point(Qt.tileAnchorX,Qt.tileAnchorY),this.transform.calculateDistanceTileData(we.unwrappedTileID)))return this.placements[jr]=new ct(!1,!1,!1,!0),void b.add(jr)}if(b.has(jr))return;if(He)return void(this.placements[jr]=new ct(!1,!1,!1));let xr=!1,qr=!1,Rr=!0,Yr=!1,Nn=!1,li=null,Cn={box:null,offscreen:null,occluded:null},Gn={box:null,offscreen:null,occluded:null},Ri=null,bi=null,An=null,_o=0,Vo=0,Ho=0;fr.textFeatureIndex?_o=fr.textFeatureIndex:Qt.useRuntimeCollisionCircles&&(_o=Qt.featureIndex),fr.verticalTextFeatureIndex&&(Vo=fr.verticalTextFeatureIndex);const No=cs=>{cs.tileID=this.retainedQueryData[K.bucketInstanceId].tileID;const $o=this.transform.elevation;($o||cs.elevation)&&(cs.elevation=$o?$o.getAtTileOffset(cs.tileID,cs.tileAnchorX,cs.tileAnchorY):0)},il=fr.textBox;if(il){No(il);const cs=qi=>{let aa=s.WritingMode.horizontal;if(K.allowVerticalPlacement&&!qi&&this.prevPlacement){const Ml=this.prevPlacement.placedOrientations[jr];Ml&&(this.placedOrientations[jr]=Ml,aa=Ml,this.markUsedOrientation(K,aa,Qt))}return aa},$o=(qi,aa)=>{if(K.allowVerticalPlacement&&lr>0&&fr.verticalTextBox){for(const Ml of K.writingModes)if(Ml===s.WritingMode.vertical?(Cn=aa(),Gn=Cn):Cn=qi(),Cn&&Cn.box&&Cn.box.length)break}else Cn=qi()};if(ne.get("text-variable-anchor")){let qi=ne.get("text-variable-anchor");if(this.prevPlacement&&this.prevPlacement.variableOffsets[jr]){const ts=this.prevPlacement.variableOffsets[jr];qi.indexOf(ts.anchor)>0&&(qi=qi.filter(hc=>hc!==ts.anchor),qi.unshift(ts.anchor))}const aa=(ts,hc,Ov)=>{const tm=K.getSymbolInstanceTextSize(st,Qt,this.transform.zoom,Tr),rm=(ts.x2-ts.x1)*tm+2*ts.padding,Lf=(ts.y2-ts.y1)*tm+2*ts.padding,Df=At&&!mt?hc:null;Df&&No(Df);let nm={box:[],offscreen:!1,occluded:!1};const mg=yt?2*qi.length:qi.length;for(let ki=0;ki<mg;++ki){const V_=this.attemptAnchorPlacement(qi[ki%qi.length],ts,rm,Lf,tm,kt,Lt,Le,ae,ut,ki>=qi.length,Qt,Tr,K,Ov,Df,st,at);if(V_&&(nm=V_.placedGlyphBoxes,nm&&nm.box&&nm.box.length)){xr=!0,li=V_.shift;break}}return nm};$o(()=>aa(il,fr.iconBox,s.WritingMode.horizontal),()=>{const ts=fr.verticalTextBox;return ts&&No(ts),K.allowVerticalPlacement&&!(Cn&&Cn.box&&Cn.box.length)&&lr>0&&ts?aa(ts,fr.verticalIconBox,s.WritingMode.vertical):{box:null,offscreen:null,occluded:null}}),Cn&&(xr=Cn.box,Rr=Cn.offscreen,Yr=Cn.occluded);const Ml=cs(!(!Cn||!Cn.box));if(!xr&&this.prevPlacement){const ts=this.prevPlacement.variableOffsets[jr];ts&&(this.variableOffsets[jr]=ts,this.markUsedJustification(K,ts.anchor,Qt,Ml))}}else{const qi=(aa,Ml)=>{const ts=K.getSymbolInstanceTextSize(st,Qt,this.transform.zoom,Tr),hc=this.collisionIndex.placeCollisionBox(K,ts,aa,new s.Point(0,0),yt,Le,ae,ut.predicate);return hc&&hc.box&&hc.box.length&&(this.markUsedOrientation(K,Ml,Qt),this.placedOrientations[jr]=Ml),hc};$o(()=>qi(il,s.WritingMode.horizontal),()=>{const aa=fr.verticalTextBox;return K.allowVerticalPlacement&&lr>0&&aa?(No(aa),qi(aa,s.WritingMode.vertical)):{box:null,offscreen:null,occluded:null}}),cs(!!(Cn&&Cn.box&&Cn.box.length))}}if(Ri=Cn,xr=Ri&&Ri.box&&Ri.box.length>0,Rr=Ri&&Ri.offscreen,Yr=Ri&&Ri.occluded,Qt.useRuntimeCollisionCircles){const cs=K.text.placedSymbolArray.get(Qt.centerJustifiedTextSymbolIndex>=0?Qt.centerJustifiedTextSymbolIndex:Qt.verticalPlacedTextSymbolIndex),$o=s.evaluateSizeForFeature(K.textSizeData,st,cs),qi=ne.get("text-padding");bi=this.collisionIndex.placeCollisionCircles(K,yt,cs,K.lineVertexArray,K.glyphOffsetArray,$o,ae,he,be,R,Lt,ut.predicate,Qt.collisionCircleDiameter*$o/s.ONE_EM,qi,this.retainedQueryData[K.bucketInstanceId].tileID),xr=yt||bi.circles.length>0&&!bi.collisionDetected,Rr=Rr&&bi.offscreen,Yr=bi.occluded}if(fr.iconFeatureIndex&&(Ho=fr.iconFeatureIndex),fr.iconBox){const cs=$o=>{No($o);const qi=At&&li?Hr(li.x,li.y,kt,Lt,this.transform.angle):new s.Point(0,0),aa=K.getSymbolInstanceIconSize(at,this.transform.zoom,Qt.placedIconSymbolIndex);return this.collisionIndex.placeCollisionBox(K,aa,$o,qi,mt,Le,ae,ut.predicate)};Gn&&Gn.box&&Gn.box.length&&fr.verticalIconBox?(An=cs(fr.verticalIconBox),qr=An.box.length>0):(An=cs(fr.iconBox),qr=An.box.length>0),Rr=Rr&&An.offscreen,Nn=An.occluded}const ol=De||Qt.numHorizontalGlyphVertices===0&&lr===0,dc=it||Qt.numIconVertices===0;if(ol||dc?dc?ol||(qr=qr&&xr):xr=qr&&xr:qr=xr=qr&&xr,xr&&Ri&&Ri.box&&this.collisionIndex.insertCollisionBox(Ri.box,ne.get("text-ignore-placement"),K.bucketInstanceId,Gn&&Gn.box&&Vo?Vo:_o,ut.ID),qr&&An&&this.collisionIndex.insertCollisionBox(An.box,ne.get("icon-ignore-placement"),K.bucketInstanceId,Ho,ut.ID),bi&&(xr&&this.collisionIndex.insertCollisionCircles(bi.circles,ne.get("text-ignore-placement"),K.bucketInstanceId,_o,ut.ID),R)){const cs=K.bucketInstanceId;let $o=this.collisionCircleArrays[cs];$o===void 0&&($o=this.collisionCircleArrays[cs]=new jt);for(let qi=0;qi<bi.circles.length;qi+=4)$o.circles.push(bi.circles[qi+0]),$o.circles.push(bi.circles[qi+1]),$o.circles.push(bi.circles[qi+2]),$o.circles.push(bi.collisionDetected?1:0)}const qu=K.projection.name!=="globe";Vt=Vt&&(qu||!Yr),or=or&&(qu||!Nn),this.placements[jr]=new ct(xr||Vt,qr||or,Rr||K.justReloaded),b.add(jr)};if(Yt){const Qt=K.getSortedSymbolIndexes(this.transform.angle);for(let Tr=Qt.length-1;Tr>=0;--Tr){const fr=Qt[Tr];Wr(K.symbolInstances.get(fr),fr,K.collisionArrays[fr])}}else for(let Qt=h.symbolInstanceStart;Qt<h.symbolInstanceEnd;Qt++)Wr(K.symbolInstances.get(Qt),Qt,K.collisionArrays[Qt]);if(R&&K.bucketInstanceId in this.collisionCircleArrays){const Qt=this.collisionCircleArrays[K.bucketInstanceId];s.invert(Qt.invProjMatrix,ae),Qt.viewportMatrix=this.collisionIndex.getViewportMatrix()}K.justReloaded=!1}markUsedJustification(h,b,R,U){const{leftJustifiedTextSymbolIndex:K,centerJustifiedTextSymbolIndex:ne,rightJustifiedTextSymbolIndex:ae,verticalPlacedTextSymbolIndex:he,crossTileID:be}=R,we=s.getAnchorJustification(b),Le=U===s.WritingMode.vertical?he:we==="left"?K:we==="center"?ne:we==="right"?ae:-1;K>=0&&(h.text.placedSymbolArray.get(K).crossTileID=Le>=0&&K!==Le?0:be),ne>=0&&(h.text.placedSymbolArray.get(ne).crossTileID=Le>=0&&ne!==Le?0:be),ae>=0&&(h.text.placedSymbolArray.get(ae).crossTileID=Le>=0&&ae!==Le?0:be),he>=0&&(h.text.placedSymbolArray.get(he).crossTileID=Le>=0&&he!==Le?0:be)}markUsedOrientation(h,b,R){const U=b===s.WritingMode.horizontal||b===s.WritingMode.horizontalOnly?b:0,K=b===s.WritingMode.vertical?b:0,{leftJustifiedTextSymbolIndex:ne,centerJustifiedTextSymbolIndex:ae,rightJustifiedTextSymbolIndex:he,verticalPlacedTextSymbolIndex:be}=R,we=h.text.placedSymbolArray;ne>=0&&(we.get(ne).placedOrientation=U),ae>=0&&(we.get(ae).placedOrientation=U),he>=0&&(we.get(he).placedOrientation=U),be>=0&&(we.get(be).placedOrientation=K)}commit(h){this.commitTime=h,this.zoomAtLastRecencyCheck=this.transform.zoom;const b=this.prevPlacement;let R=!1;this.prevZoomAdjustment=b?b.zoomAdjustment(this.transform.zoom):0;const U=b?b.symbolFadeChange(h):1,K=b?b.opacities:{},ne=b?b.variableOffsets:{},ae=b?b.placedOrientations:{};for(const he in this.placements){const be=this.placements[he],we=K[he];we?(this.opacities[he]=new et(we,U,be.text,be.icon,null,be.clipped),R=R||be.text!==we.text.placed||be.icon!==we.icon.placed):(this.opacities[he]=new et(null,U,be.text,be.icon,be.skipFade,be.clipped),R=R||be.text||be.icon)}for(const he in K){const be=K[he];if(!this.opacities[he]){const we=new et(be,U,!1,!1);we.isHidden()||(this.opacities[he]=we,R=R||be.text.placed||be.icon.placed)}}for(const he in ne)this.variableOffsets[he]||!this.opacities[he]||this.opacities[he].isHidden()||(this.variableOffsets[he]=ne[he]);for(const he in ae)this.placedOrientations[he]||!this.opacities[he]||this.opacities[he].isHidden()||(this.placedOrientations[he]=ae[he]);R?this.lastPlacementChangeTime=h:typeof this.lastPlacementChangeTime!="number"&&(this.lastPlacementChangeTime=b?b.lastPlacementChangeTime:h)}updateLayerOpacities(h,b){const R=new Set;for(const U of b){const K=U.getBucket(h);K&&U.latestFeatureIndex&&h.id===K.layerIds[0]&&this.updateBucketOpacities(K,R,U.collisionBoxArray)}}updateBucketOpacities(h,b,R){h.hasTextData()&&h.text.opacityVertexArray.clear(),h.hasIconData()&&h.icon.opacityVertexArray.clear(),h.hasIconCollisionBoxData()&&h.iconCollisionBox.collisionVertexArray.clear(),h.hasTextCollisionBoxData()&&h.textCollisionBox.collisionVertexArray.clear();const U=h.layers[0].layout,K=!!h.layers[0].dynamicFilter(),ne=new et(null,0,!1,!1,!0),ae=U.get("text-allow-overlap"),he=U.get("icon-allow-overlap"),be=U.get("text-variable-anchor"),we=U.get("text-rotation-alignment")==="map",Le=U.get("text-pitch-alignment")==="map",He=U.get("icon-text-fit")!=="none",rt=new et(null,0,ae&&(he||!h.hasIconData()||U.get("icon-optional")),he&&(ae||!h.hasTextData()||U.get("text-optional")),!0);!h.collisionArrays&&R&&(h.hasIconCollisionBoxData()||h.hasTextCollisionBoxData())&&h.deserializeCollisionBoxes(R);const st=(ut,De,it)=>{for(let yt=0;yt<De/4;yt++)ut.opacityVertexArray.emplaceBack(it)};let at=0;for(let ut=0;ut<h.symbolInstances.length;ut++){const De=h.symbolInstances.get(ut),{numHorizontalGlyphVertices:it,numVerticalGlyphVertices:yt,crossTileID:mt,numIconVertices:kt}=De,Lt=b.has(mt);let At=this.opacities[mt];Lt?At=ne:At||(At=rt,this.opacities[mt]=At),b.add(mt);const Yt=it>0||yt>0,Vt=kt>0,or=this.placedOrientations[mt],Wr=or===s.WritingMode.vertical,Qt=or===s.WritingMode.horizontal||or===s.WritingMode.horizontalOnly;if(!Yt&&!Vt||At.isHidden()||at++,Yt){const Tr=On(At.text);st(h.text,it,Wr?ao:Tr),st(h.text,yt,Qt?ao:Tr);const fr=At.text.isHidden(),{leftJustifiedTextSymbolIndex:jr,centerJustifiedTextSymbolIndex:lr,rightJustifiedTextSymbolIndex:xr,verticalPlacedTextSymbolIndex:qr}=De,Rr=h.text.placedSymbolArray,Yr=fr||Wr?1:0;jr>=0&&(Rr.get(jr).hidden=Yr),lr>=0&&(Rr.get(lr).hidden=Yr),xr>=0&&(Rr.get(xr).hidden=Yr),qr>=0&&(Rr.get(qr).hidden=fr||Qt?1:0);const Nn=this.variableOffsets[mt];Nn&&this.markUsedJustification(h,Nn.anchor,De,or);const li=this.placedOrientations[mt];li&&(this.markUsedJustification(h,"left",De,li),this.markUsedOrientation(h,li,De))}if(Vt){const Tr=On(At.icon),{placedIconSymbolIndex:fr,verticalPlacedIconSymbolIndex:jr}=De,lr=h.icon.placedSymbolArray,xr=At.icon.isHidden()?1:0;fr>=0&&(st(h.icon,kt,Wr?ao:Tr),lr.get(fr).hidden=xr),jr>=0&&(st(h.icon,De.numVerticalIconVertices,Qt?ao:Tr),lr.get(jr).hidden=xr)}if(h.hasIconCollisionBoxData()||h.hasTextCollisionBoxData()){const Tr=h.collisionArrays[ut];if(Tr){let fr=new s.Point(0,0),jr=!0;if(Tr.textBox||Tr.verticalTextBox){if(be){const xr=this.variableOffsets[mt];xr?(fr=zt(xr.anchor,xr.width,xr.height,xr.textOffset,xr.textScale),we&&fr._rotate(Le?this.transform.angle:-this.transform.angle)):jr=!1}K&&(jr=!At.clipped),Tr.textBox&&hn(h.textCollisionBox.collisionVertexArray,At.text.placed,!jr||Wr,fr.x,fr.y),Tr.verticalTextBox&&hn(h.textCollisionBox.collisionVertexArray,At.text.placed,!jr||Qt,fr.x,fr.y)}const lr=jr&&Boolean(!Qt&&Tr.verticalIconBox);Tr.iconBox&&hn(h.iconCollisionBox.collisionVertexArray,At.icon.placed,lr,He?fr.x:0,He?fr.y:0),Tr.verticalIconBox&&hn(h.iconCollisionBox.collisionVertexArray,At.icon.placed,!lr,He?fr.x:0,He?fr.y:0)}}}if(h.fullyClipped=at===0,h.sortFeatures(this.transform.angle),this.retainedQueryData[h.bucketInstanceId]&&(this.retainedQueryData[h.bucketInstanceId].featureSortOrder=h.featureSortOrder),h.hasTextData()&&h.text.opacityVertexBuffer&&h.text.opacityVertexBuffer.updateData(h.text.opacityVertexArray),h.hasIconData()&&h.icon.opacityVertexBuffer&&h.icon.opacityVertexBuffer.updateData(h.icon.opacityVertexArray),h.hasIconCollisionBoxData()&&h.iconCollisionBox.collisionVertexBuffer&&h.iconCollisionBox.collisionVertexBuffer.updateData(h.iconCollisionBox.collisionVertexArray),h.hasTextCollisionBoxData()&&h.textCollisionBox.collisionVertexBuffer&&h.textCollisionBox.collisionVertexBuffer.updateData(h.textCollisionBox.collisionVertexArray),h.bucketInstanceId in this.collisionCircleArrays){const ut=this.collisionCircleArrays[h.bucketInstanceId];h.placementInvProjMatrix=ut.invProjMatrix,h.placementViewportMatrix=ut.viewportMatrix,h.collisionCircleArray=ut.circles,delete this.collisionCircleArrays[h.bucketInstanceId]}}symbolFadeChange(h){return this.fadeDuration===0?1:(h-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(h){return Math.max(0,(this.transform.zoom-h)/1.5)}hasTransitions(h){return this.stale||h-this.lastPlacementChangeTime<this.fadeDuration}stillRecent(h,b){const R=this.zoomAtLastRecencyCheck===b?1-this.zoomAdjustment(b):1;return this.zoomAtLastRecencyCheck=b,this.commitTime+this.fadeDuration*R>h}setStale(){this.stale=!0}}function hn(I,h,b,R,U){I.emplaceBack(h?1:0,b?1:0,R||0,U||0),I.emplaceBack(h?1:0,b?1:0,R||0,U||0),I.emplaceBack(h?1:0,b?1:0,R||0,U||0),I.emplaceBack(h?1:0,b?1:0,R||0,U||0)}const gn=Math.pow(2,25),Bn=Math.pow(2,24),wr=Math.pow(2,17),pn=Math.pow(2,16),ci=Math.pow(2,9),fi=Math.pow(2,8),Lo=Math.pow(2,1);function On(I){if(I.opacity===0&&!I.placed)return 0;if(I.opacity===1&&I.placed)return 4294967295;const h=I.placed?1:0,b=Math.floor(127*I.opacity);return b*gn+h*Bn+b*wr+h*pn+b*ci+h*fi+b*Lo+h}const ao=0;class Ja{constructor(h){this._sortAcrossTiles=h.layout.get("symbol-z-order")!=="viewport-y"&&h.layout.get("symbol-sort-key").constantOr(1)!==void 0,this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs=new Set,this._bucketParts=[]}continuePlacement(h,b,R,U,K){const ne=this._bucketParts;for(;this._currentTileIndex<h.length;)if(b.getBucketParts(ne,U,h[this._currentTileIndex],this._sortAcrossTiles),this._currentTileIndex++,K())return!0;for(this._sortAcrossTiles&&(this._sortAcrossTiles=!1,ne.sort((ae,he)=>ae.sortKey-he.sortKey));this._currentPartIndex<ne.length;){const ae=ne[this._currentPartIndex];if(b.placeLayerBucketPart(ae,this._seenCrossTileIDs,R,ae.symbolInstanceStart===0),this._currentPartIndex++,K())return!0}return!1}}class $i{constructor(h,b,R,U,K,ne,ae,he){this.placement=new Zr(h,K,ne,ae,he),this._currentPlacementIndex=b.length-1,this._forceFullPlacement=R,this._showCollisionBoxes=U,this._done=!1}isDone(){return this._done}continuePlacement(h,b,R){const U=s.exported.now(),K=()=>{const ne=s.exported.now()-U;return!this._forceFullPlacement&&ne>2};for(;this._currentPlacementIndex>=0;){const ne=b[h[this._currentPlacementIndex]],ae=this.placement.collisionIndex.transform.zoom;if(ne.type==="symbol"&&(!ne.minzoom||ne.minzoom<=ae)&&(!ne.maxzoom||ne.maxzoom>ae)){if(this._inProgressLayer||(this._inProgressLayer=new Ja(ne)),this._inProgressLayer.continuePlacement(R[ne.source],this.placement,this._showCollisionBoxes,ne,K))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(h){return this.placement.commit(h),this.placement}}const _i=512/s.EXTENT/2;class Hn{constructor(h,b,R){this.tileID=h,this.bucketInstanceId=R,this.index=new s.KDBush(b.length,16,Int32Array),this.keys=[],this.crossTileIDs=[];const U=h.canonical.x*s.EXTENT,K=h.canonical.y*s.EXTENT;for(let ne=0;ne<b.length;ne++){const{key:ae,crossTileID:he,tileAnchorX:be,tileAnchorY:we}=b.get(ne),Le=Math.floor((U+be)*_i),He=Math.floor((K+we)*_i);this.index.add(Le,He),this.keys.push(ae),this.crossTileIDs.push(he)}this.index.finish()}findMatches(h,b,R){const U=this.tileID.canonical.z<b.canonical.z?1:Math.pow(2,this.tileID.canonical.z-b.canonical.z),K=_i/Math.pow(2,b.canonical.z-this.tileID.canonical.z),ne=b.canonical.x*s.EXTENT,ae=b.canonical.y*s.EXTENT;for(let he=0;he<h.length;he++){const be=h.get(he);if(be.crossTileID)continue;const{key:we,tileAnchorX:Le,tileAnchorY:He}=be,rt=Math.floor((ne+Le)*K),st=Math.floor((ae+He)*K),at=this.index.range(rt-U,st-U,rt+U,st+U);for(const ut of at){const De=this.crossTileIDs[ut];if(this.keys[ut]===we&&!R.has(De)){R.add(De),be.crossTileID=De;break}}}}}class wf{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}}class yd{constructor(){this.indexes={},this.usedCrossTileIDs={},this.lng=0}handleWrapJump(h){const b=Math.round((h-this.lng)/360);if(b!==0)for(const R in this.indexes){const U=this.indexes[R],K={};for(const ne in U){const ae=U[ne];ae.tileID=ae.tileID.unwrapTo(ae.tileID.wrap+b),K[ae.tileID.key]=ae}this.indexes[R]=K}this.lng=h}addBucket(h,b,R){if(this.indexes[h.overscaledZ]&&this.indexes[h.overscaledZ][h.key]){if(this.indexes[h.overscaledZ][h.key].bucketInstanceId===b.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(h.overscaledZ,this.indexes[h.overscaledZ][h.key])}for(let K=0;K<b.symbolInstances.length;K++)b.symbolInstances.get(K).crossTileID=0;this.usedCrossTileIDs[h.overscaledZ]||(this.usedCrossTileIDs[h.overscaledZ]=new Set);const U=this.usedCrossTileIDs[h.overscaledZ];for(const K in this.indexes){const ne=this.indexes[K];if(Number(K)>h.overscaledZ)for(const ae in ne){const he=ne[ae];he.tileID.isChildOf(h)&&he.findMatches(b.symbolInstances,h,U)}else{const ae=ne[h.scaledTo(Number(K)).key];ae&&ae.findMatches(b.symbolInstances,h,U)}}for(let K=0;K<b.symbolInstances.length;K++){const ne=b.symbolInstances.get(K);ne.crossTileID||(ne.crossTileID=R.generate(),U.add(ne.crossTileID))}return this.indexes[h.overscaledZ]===void 0&&(this.indexes[h.overscaledZ]={}),this.indexes[h.overscaledZ][h.key]=new Hn(h,b.symbolInstances,b.bucketInstanceId),!0}removeBucketCrossTileIDs(h,b){for(const R of b.crossTileIDs)this.usedCrossTileIDs[h].delete(R)}removeStaleBuckets(h){let b=!1;for(const R in this.indexes){const U=this.indexes[R];for(const K in U)h[U[K].bucketInstanceId]||(this.removeBucketCrossTileIDs(R,U[K]),delete U[K],b=!0)}return b}}class ba{constructor(){this.layerIndexes={},this.crossTileIDs=new wf,this.maxBucketInstanceId=0,this.bucketsInCurrentPlacement={}}addLayer(h,b,R,U){let K=this.layerIndexes[h.id];K===void 0&&(K=this.layerIndexes[h.id]=new yd);let ne=!1;const ae={};U.name!=="globe"&&K.handleWrapJump(R);for(const he of b){const be=he.getBucket(h);be&&h.id===be.layerIds[0]&&(be.bucketInstanceId||(be.bucketInstanceId=++this.maxBucketInstanceId),K.addBucket(he.tileID,be,this.crossTileIDs)&&(ne=!0),ae[be.bucketInstanceId]=!0)}return K.removeStaleBuckets(ae)&&(ne=!0),ne}pruneUnusedLayers(h){const b={};h.forEach(R=>{b[R]=!0});for(const R in this.layerIndexes)b[R]||delete this.layerIndexes[R]}}const ju=(I,h)=>s.emitValidationErrors(I,h&&h.filter(b=>b.identifier!=="source.canvas")),$p=s.pick(br,["addLayer","removeLayer","setPaintProperty","setLayoutProperty","setFilter","addSource","removeSource","setLayerZoomRange","setLight","setTransition","setGeoJSONSourceData","setTerrain","setFog","setProjection"]),A_=s.pick(br,["setCenter","setZoom","setBearing","setPitch"]),Fp={version:8,layers:[],sources:{}},Uu={fill:!0,line:!0,background:!0,hillshade:!0,raster:!0};class Yo extends s.Evented{constructor(h,b={}){super(),this.map=h,this.dispatcher=new re(Xr(),this),this.imageManager=new N,this.imageManager.setEventedParent(this),this.glyphManager=new s.GlyphManager(h._requestManager,b.localFontFamily?s.LocalGlyphMode.all:b.localIdeographFontFamily?s.LocalGlyphMode.ideographs:s.LocalGlyphMode.none,b.localFontFamily||b.localIdeographFontFamily),this.crossTileSymbolIndex=new ba,this._layers={},this._num3DLayers=0,this._numSymbolLayers=0,this._numCircleLayers=0,this._serializedLayers={},this._sourceCaches={},this._otherSourceCaches={},this._symbolSourceCaches={},this._loaded=!1,this._availableImages=[],this._order=[],this._drapedFirstOrder=[],this._markersNeedUpdate=!1,this._resetUpdates(),this.dispatcher.broadcast("setReferrer",s.getReferrer());const R=this;this._rtlTextPluginCallback=Yo.registerForPluginStateChange(U=>{R.dispatcher.broadcast("syncRTLPluginState",{pluginStatus:U.pluginStatus,pluginURL:U.pluginURL},(K,ne)=>{if(s.triggerPluginCompletionEvent(K),ne&&ne.every(ae=>ae))for(const ae in R._sourceCaches){const he=R._sourceCaches[ae],be=he.getSource().type;be!=="vector"&&be!=="geojson"||he.reload()}})}),this.on("data",U=>{if(U.dataType!=="source"||U.sourceDataType!=="metadata")return;const K=this.getSource(U.sourceId);if(K&&K.vectorLayerIds)for(const ne in this._layers){const ae=this._layers[ne];ae.source===K.id&&this._validateLayer(ae)}})}loadURL(h,b={}){this.fire(new s.Event("dataloading",{dataType:"style"}));const R=typeof b.validate=="boolean"?b.validate:!s.isMapboxURL(h);h=this.map._requestManager.normalizeStyleURL(h,b.accessToken);const U=this.map._requestManager.transformRequest(h,s.ResourceType.Style);this._request=s.getJSON(U,(K,ne)=>{this._request=null,K?this.fire(new s.ErrorEvent(K)):ne&&this._load(ne,R)})}loadJSON(h,b={}){this.fire(new s.Event("dataloading",{dataType:"style"})),this._request=s.exported.frame(()=>{this._request=null,this._load(h,b.validate!==!1)})}loadEmpty(){this.fire(new s.Event("dataloading",{dataType:"style"})),this._load(Fp,!1)}_updateLayerCount(h,b){const R=b?1:-1;h.is3D()&&(this._num3DLayers+=R),h.type==="circle"&&(this._numCircleLayers+=R),h.type==="symbol"&&(this._numSymbolLayers+=R)}_load(h,b){if(b&&ju(this,s.validateStyle(h)))return;this._loaded=!0,this.stylesheet=s.clone$1(h),this._updateMapProjection();for(const U in h.sources)this.addSource(U,h.sources[U],{validate:!1});this._changed=!1,h.sprite?this._loadSprite(h.sprite):(this.imageManager.setLoaded(!0),this.dispatcher.broadcast("spriteLoaded",!0)),this.glyphManager.setURL(h.glyphs);const R=Ln(this.stylesheet.layers);this._order=R.map(U=>U.id),this._layers={},this._serializedLayers={};for(const U of R){const K=s.createStyleLayer(U);K.setEventedParent(this,{layer:{id:K.id}}),this._layers[K.id]=K,this._serializedLayers[K.id]=K.serialize(),this._updateLayerCount(K,!0)}this.dispatcher.broadcast("setLayers",this._serializeLayers(this._order)),this.light=new $(this.stylesheet.light),this.stylesheet.terrain&&!this.terrainSetForDrapingOnly()&&this._createTerrain(this.stylesheet.terrain,1),this.stylesheet.fog&&this._createFog(this.stylesheet.fog),this._updateDrapeFirstLayers(),this.fire(new s.Event("data",{dataType:"style"})),this.fire(new s.Event("style.load"))}terrainSetForDrapingOnly(){return!!this.terrain&&this.terrain.drapeRenderMode===0}setProjection(h){h?this.stylesheet.projection=h:delete this.stylesheet.projection,this._updateMapProjection()}applyProjectionUpdate(){this._loaded&&(this.dispatcher.broadcast("setProjection",this.map.transform.projectionOptions),this.map.transform.projection.requiresDraping?this.getTerrain()||this.stylesheet.terrain||this.setTerrainForDraping():this.terrainSetForDrapingOnly()&&this.setTerrain(null))}_updateMapProjection(){this.map._useExplicitProjection?this.applyProjectionUpdate():this.map._prioritizeAndUpdateProjection(null,this.stylesheet.projection)}_loadSprite(h){this._spriteRequest=function(b,R,U){let K,ne,ae;const he=s.exported.devicePixelRatio>1?"@2x":"";let be=s.getJSON(R.transformRequest(R.normalizeSpriteURL(b,he,".json"),s.ResourceType.SpriteJSON),(He,rt)=>{be=null,ae||(ae=He,K=rt,Le())}),we=s.getImage(R.transformRequest(R.normalizeSpriteURL(b,he,".png"),s.ResourceType.SpriteImage),(He,rt)=>{we=null,ae||(ae=He,ne=rt,Le())});function Le(){if(ae)U(ae);else if(K&&ne){const He=s.exported.getImageData(ne),rt={};for(const st in K){const{width:at,height:ut,x:De,y:it,sdf:yt,pixelRatio:mt,stretchX:kt,stretchY:Lt,content:At}=K[st],Yt=new s.RGBAImage({width:at,height:ut});s.RGBAImage.copy(He,Yt,{x:De,y:it},{x:0,y:0},{width:at,height:ut}),rt[st]={data:Yt,pixelRatio:mt,sdf:yt,stretchX:kt,stretchY:Lt,content:At}}U(null,rt)}}return{cancel(){be&&(be.cancel(),be=null),we&&(we.cancel(),we=null)}}}(h,this.map._requestManager,(b,R)=>{if(this._spriteRequest=null,b)this.fire(new s.ErrorEvent(b));else if(R)for(const U in R)this.imageManager.addImage(U,R[U]);this.imageManager.setLoaded(!0),this._availableImages=this.imageManager.listImages(),this.dispatcher.broadcast("setImages",this._availableImages),this.dispatcher.broadcast("spriteLoaded",!0),this.fire(new s.Event("data",{dataType:"style"}))})}_validateLayer(h){const b=this.getSource(h.source);if(!b)return;const R=h.sourceLayer;R&&(b.type==="geojson"||b.vectorLayerIds&&b.vectorLayerIds.indexOf(R)===-1)&&this.fire(new s.ErrorEvent(new Error(`Source layer "${R}" does not exist on source "${b.id}" as specified by style layer "${h.id}"`)))}loaded(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(const h in this._sourceCaches)if(!this._sourceCaches[h].loaded())return!1;return!!this.imageManager.isLoaded()}_serializeLayers(h){const b=[];for(const R of h){const U=this._layers[R];U.type!=="custom"&&b.push(U.serialize())}return b}hasTransitions(){if(this.light&&this.light.hasTransition()||this.fog&&this.fog.hasTransition())return!0;for(const h in this._sourceCaches)if(this._sourceCaches[h].hasTransition())return!0;for(const h in this._layers)if(this._layers[h].hasTransition())return!0;return!1}get order(){return this.map._optimizeForTerrain&&this.terrain?this._drapedFirstOrder:this._order}isLayerDraped(h){return!!this.terrain&&(typeof h.isLayerDraped=="function"?h.isLayerDraped():Uu[h.type])}_checkLoaded(){if(!this._loaded)throw new Error("Style is not done loading")}update(h){if(!this._loaded)return;const b=this._changed;if(this._changed){const U=Object.keys(this._updatedLayers),K=Object.keys(this._removedLayers);(U.length||K.length)&&this._updateWorkerLayers(U,K);for(const ne in this._updatedSources){const ae=this._updatedSources[ne];ae==="reload"?this._reloadSource(ne):ae==="clear"&&this._clearSource(ne)}this._updateTilesForChangedImages();for(const ne in this._updatedPaintProps)this._layers[ne].updateTransitions(h);this.light.updateTransitions(h),this.fog&&this.fog.updateTransitions(h),this._resetUpdates()}const R={};for(const U in this._sourceCaches){const K=this._sourceCaches[U];R[U]=K.used,K.used=!1}for(const U of this._order){const K=this._layers[U];if(K.recalculate(h,this._availableImages),!K.isHidden(h.zoom)){const ae=this._getLayerSourceCache(K);ae&&(ae.used=!0)}const ne=this.map.painter;if(ne){const ae=K.getProgramIds();if(!ae)continue;const he=K.getProgramConfiguration(h.zoom);for(const be of ae)ne.useProgram(be,he)}}for(const U in R){const K=this._sourceCaches[U];R[U]!==K.used&&K.getSource().fire(new s.Event("data",{sourceDataType:"visibility",dataType:"source",sourceId:K.getSource().id}))}this.light.recalculate(h),this.terrain&&this.terrain.recalculate(h),this.fog&&this.fog.recalculate(h),this.z=h.zoom,this._markersNeedUpdate&&(this._updateMarkersOpacity(),this._markersNeedUpdate=!1),b&&this.fire(new s.Event("data",{dataType:"style"}))}_updateTilesForChangedImages(){const h=Object.keys(this._changedImages);if(h.length){for(const b in this._sourceCaches)this._sourceCaches[b].reloadTilesForDependencies(["icons","patterns"],h);this._changedImages={}}}_updateWorkerLayers(h,b){this.dispatcher.broadcast("updateLayers",{layers:this._serializeLayers(h),removedIds:b})}_resetUpdates(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={}}setState(h){if(this._checkLoaded(),ju(this,s.validateStyle(h)))return!1;(h=s.clone$1(h)).layers=Ln(h.layers);const b=function(U,K){if(!U)return[{command:br.setStyle,args:[K]}];let ne=[];try{if(!l(U.version,K.version))return[{command:br.setStyle,args:[K]}];l(U.center,K.center)||ne.push({command:br.setCenter,args:[K.center]}),l(U.zoom,K.zoom)||ne.push({command:br.setZoom,args:[K.zoom]}),l(U.bearing,K.bearing)||ne.push({command:br.setBearing,args:[K.bearing]}),l(U.pitch,K.pitch)||ne.push({command:br.setPitch,args:[K.pitch]}),l(U.sprite,K.sprite)||ne.push({command:br.setSprite,args:[K.sprite]}),l(U.glyphs,K.glyphs)||ne.push({command:br.setGlyphs,args:[K.glyphs]}),l(U.transition,K.transition)||ne.push({command:br.setTransition,args:[K.transition]}),l(U.light,K.light)||ne.push({command:br.setLight,args:[K.light]}),l(U.fog,K.fog)||ne.push({command:br.setFog,args:[K.fog]}),l(U.projection,K.projection)||ne.push({command:br.setProjection,args:[K.projection]});const ae={},he=[];(function(Le,He,rt,st){let at;for(at in He=He||{},Le=Le||{})Le.hasOwnProperty(at)&&(He.hasOwnProperty(at)||Gi(at,rt,st));for(at in He){if(!He.hasOwnProperty(at))continue;const ut=He[at];Le.hasOwnProperty(at)?l(Le[at],ut)||(Le[at].type==="geojson"&&ut.type==="geojson"&&Ds(Le,He,at)?rt.push({command:br.setGeoJSONSourceData,args:[at,ut.data]}):pi(at,He,rt,st)):oi(at,He,rt)}})(U.sources,K.sources,he,ae);const be=[];U.layers&&U.layers.forEach(Le=>{Le.source&&ae[Le.source]?ne.push({command:br.removeLayer,args:[Le.id]}):be.push(Le)});let we=U.terrain;we&&ae[we.source]&&(ne.push({command:br.setTerrain,args:[void 0]}),we=void 0),ne=ne.concat(he),l(we,K.terrain)||ne.push({command:br.setTerrain,args:[K.terrain]}),function(Le,He,rt){He=He||[];const st=(Le=Le||[]).map(jo),at=He.map(jo),ut=Le.reduce(Qa,{}),De=He.reduce(Qa,{}),it=st.slice(),yt=Object.create(null);let mt,kt,Lt,At,Yt,Vt,or;for(mt=0,kt=0;mt<st.length;mt++)Lt=st[mt],De.hasOwnProperty(Lt)?kt++:(rt.push({command:br.removeLayer,args:[Lt]}),it.splice(it.indexOf(Lt,kt),1));for(mt=0,kt=0;mt<at.length;mt++)Lt=at[at.length-1-mt],it[it.length-1-mt]!==Lt&&(ut.hasOwnProperty(Lt)?(rt.push({command:br.removeLayer,args:[Lt]}),it.splice(it.lastIndexOf(Lt,it.length-kt),1)):kt++,Vt=it[it.length-mt],rt.push({command:br.addLayer,args:[De[Lt],Vt]}),it.splice(it.length-mt,0,Lt),yt[Lt]=!0);for(mt=0;mt<at.length;mt++)if(Lt=at[mt],At=ut[Lt],Yt=De[Lt],!yt[Lt]&&!l(At,Yt))if(l(At.source,Yt.source)&&l(At["source-layer"],Yt["source-layer"])&&l(At.type,Yt.type)){for(or in Xo(At.layout,Yt.layout,rt,Lt,null,br.setLayoutProperty),Xo(At.paint,Yt.paint,rt,Lt,null,br.setPaintProperty),l(At.filter,Yt.filter)||rt.push({command:br.setFilter,args:[Lt,Yt.filter]}),l(At.minzoom,Yt.minzoom)&&l(At.maxzoom,Yt.maxzoom)||rt.push({command:br.setLayerZoomRange,args:[Lt,Yt.minzoom,Yt.maxzoom]}),At)At.hasOwnProperty(or)&&or!=="layout"&&or!=="paint"&&or!=="filter"&&or!=="metadata"&&or!=="minzoom"&&or!=="maxzoom"&&(or.indexOf("paint.")===0?Xo(At[or],Yt[or],rt,Lt,or.slice(6),br.setPaintProperty):l(At[or],Yt[or])||rt.push({command:br.setLayerProperty,args:[Lt,or,Yt[or]]}));for(or in Yt)Yt.hasOwnProperty(or)&&!At.hasOwnProperty(or)&&or!=="layout"&&or!=="paint"&&or!=="filter"&&or!=="metadata"&&or!=="minzoom"&&or!=="maxzoom"&&(or.indexOf("paint.")===0?Xo(At[or],Yt[or],rt,Lt,or.slice(6),br.setPaintProperty):l(At[or],Yt[or])||rt.push({command:br.setLayerProperty,args:[Lt,or,Yt[or]]}))}else rt.push({command:br.removeLayer,args:[Lt]}),Vt=it[it.lastIndexOf(Lt)+1],rt.push({command:br.addLayer,args:[Yt,Vt]})}(be,K.layers,ne)}catch(ae){console.warn("Unable to compute style diff:",ae),ne=[{command:br.setStyle,args:[K]}]}return ne}(this.serialize(),h).filter(U=>!(U.command in A_));if(b.length===0)return!1;const R=b.filter(U=>!(U.command in $p));if(R.length>0)throw new Error(`Unimplemented: ${R.map(U=>U.command).join(", ")}.`);return b.forEach(U=>{U.command!=="setTransition"&&U.command!=="setProjection"&&this[U.command].apply(this,U.args)}),this.stylesheet=h,this._updateMapProjection(),!0}addImage(h,b){return this.getImage(h)?this.fire(new s.ErrorEvent(new Error("An image with this name already exists."))):(this.imageManager.addImage(h,b),this._afterImageUpdated(h),this)}updateImage(h,b){this.imageManager.updateImage(h,b)}getImage(h){return this.imageManager.getImage(h)}removeImage(h){return this.getImage(h)?(this.imageManager.removeImage(h),this._afterImageUpdated(h),this):this.fire(new s.ErrorEvent(new Error("No image with this name exists.")))}_afterImageUpdated(h){this._availableImages=this.imageManager.listImages(),this._changedImages[h]=!0,this._changed=!0,this.dispatcher.broadcast("setImages",this._availableImages),this.fire(new s.Event("data",{dataType:"style"}))}listImages(){return this._checkLoaded(),this._availableImages.slice()}addSource(h,b,R={}){if(this._checkLoaded(),this.getSource(h)!==void 0)throw new Error("There is already a source with this ID");if(!b.type)throw new Error(`The type property must be defined, but only the following properties were given: ${Object.keys(b).join(", ")}.`);if(["vector","raster","geojson","video","image"].indexOf(b.type)>=0&&this._validate(s.validateSource,`sources.${h}`,b,null,R))return;this.map&&this.map._collectResourceTiming&&(b.collectResourceTiming=!0);const U=Ve(h,b,this.dispatcher,this);U.setEventedParent(this,()=>({isSourceLoaded:this._isSourceCacheLoaded(h),source:U.serialize(),sourceId:h}));const K=ne=>{const ae=(ne?"symbol:":"other:")+h,he=this._sourceCaches[ae]=new s.SourceCache(ae,U,ne);(ne?this._symbolSourceCaches:this._otherSourceCaches)[h]=he,he.style=this,he.onAdd(this.map)};K(!1),b.type!=="vector"&&b.type!=="geojson"||K(!0),U.onAdd&&U.onAdd(this.map),this._changed=!0}removeSource(h){this._checkLoaded();const b=this.getSource(h);if(!b)throw new Error("There is no source with this ID");for(const U in this._layers)if(this._layers[U].source===h)return this.fire(new s.ErrorEvent(new Error(`Source "${h}" cannot be removed while layer "${U}" is using it.`)));if(this.terrain&&this.terrain.get().source===h)return this.fire(new s.ErrorEvent(new Error(`Source "${h}" cannot be removed while terrain is using it.`)));const R=this._getSourceCaches(h);for(const U of R)delete this._sourceCaches[U.id],delete this._updatedSources[U.id],U.fire(new s.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:U.getSource().id})),U.setEventedParent(null),U.clearTiles();return delete this._otherSourceCaches[h],delete this._symbolSourceCaches[h],b.setEventedParent(null),b.onRemove&&b.onRemove(this.map),this._changed=!0,this}setGeoJSONSourceData(h,b){this._checkLoaded(),this.getSource(h).setData(b),this._changed=!0}getSource(h){const b=this._getSourceCache(h);return b&&b.getSource()}_getSources(){const h=[];for(const b in this._otherSourceCaches){const R=this._getSourceCache(b);R&&h.push(R.getSource())}return h}addLayer(h,b,R={}){this._checkLoaded();const U=h.id;if(this.getLayer(U))return void this.fire(new s.ErrorEvent(new Error(`Layer with id "${U}" already exists on this map`)));let K;if(h.type==="custom"){if(ju(this,s.validateCustomStyleLayer(h)))return;K=s.createStyleLayer(h)}else{if(typeof h.source=="object"&&(this.addSource(U,h.source),h=s.clone$1(h),h=s.extend(h,{source:U})),this._validate(s.validateLayer,`layers.${U}`,h,{arrayIndex:-1},R))return;K=s.createStyleLayer(h),this._validateLayer(K),K.setEventedParent(this,{layer:{id:U}}),this._serializedLayers[K.id]=K.serialize(),this._updateLayerCount(K,!0)}const ne=b?this._order.indexOf(b):this._order.length;if(b&&ne===-1)return void this.fire(new s.ErrorEvent(new Error(`Layer with id "${b}" does not exist on this map.`)));this._order.splice(ne,0,U),this._layerOrderChanged=!0,this._layers[U]=K;const ae=this._getLayerSourceCache(K);if(this._removedLayers[U]&&K.source&&ae&&K.type!=="custom"){const he=this._removedLayers[U];delete this._removedLayers[U],he.type!==K.type?this._updatedSources[K.source]="clear":(this._updatedSources[K.source]="reload",ae.pause())}this._updateLayer(K),K.onAdd&&K.onAdd(this.map),this._updateDrapeFirstLayers()}moveLayer(h,b){if(this._checkLoaded(),this._changed=!0,!this._layers[h])return void this.fire(new s.ErrorEvent(new Error(`The layer '${h}' does not exist in the map's style and cannot be moved.`)));if(h===b)return;const R=this._order.indexOf(h);this._order.splice(R,1);const U=b?this._order.indexOf(b):this._order.length;b&&U===-1?this.fire(new s.ErrorEvent(new Error(`Layer with id "${b}" does not exist on this map.`))):(this._order.splice(U,0,h),this._layerOrderChanged=!0,this._updateDrapeFirstLayers())}removeLayer(h){this._checkLoaded();const b=this._layers[h];if(!b)return void this.fire(new s.ErrorEvent(new Error(`The layer '${h}' does not exist in the map's style and cannot be removed.`)));b.setEventedParent(null),this._updateLayerCount(b,!1);const R=this._order.indexOf(h);this._order.splice(R,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[h]=b,delete this._layers[h],delete this._serializedLayers[h],delete this._updatedLayers[h],delete this._updatedPaintProps[h],b.onRemove&&b.onRemove(this.map),this._updateDrapeFirstLayers()}getLayer(h){return this._layers[h]}hasLayer(h){return h in this._layers}hasLayerType(h){for(const b in this._layers)if(this._layers[b].type===h)return!0;return!1}setLayerZoomRange(h,b,R){this._checkLoaded();const U=this.getLayer(h);U?U.minzoom===b&&U.maxzoom===R||(b!=null&&(U.minzoom=b),R!=null&&(U.maxzoom=R),this._updateLayer(U)):this.fire(new s.ErrorEvent(new Error(`The layer '${h}' does not exist in the map's style and cannot have zoom extent.`)))}setFilter(h,b,R={}){this._checkLoaded();const U=this.getLayer(h);if(U){if(!l(U.filter,b))return b==null?(U.filter=void 0,void this._updateLayer(U)):void(this._validate(s.validateFilter,`layers.${U.id}.filter`,b,{layerType:U.type},R)||(U.filter=s.clone$1(b),this._updateLayer(U)))}else this.fire(new s.ErrorEvent(new Error(`The layer '${h}' does not exist in the map's style and cannot be filtered.`)))}getFilter(h){const b=this.getLayer(h);return b&&s.clone$1(b.filter)}setLayoutProperty(h,b,R,U={}){this._checkLoaded();const K=this.getLayer(h);K?l(K.getLayoutProperty(b),R)||(K.setLayoutProperty(b,R,U),this._updateLayer(K)):this.fire(new s.ErrorEvent(new Error(`The layer '${h}' does not exist in the map's style and cannot be styled.`)))}getLayoutProperty(h,b){const R=this.getLayer(h);if(R)return R.getLayoutProperty(b);this.fire(new s.ErrorEvent(new Error(`The layer '${h}' does not exist in the map's style.`)))}setPaintProperty(h,b,R,U={}){this._checkLoaded();const K=this.getLayer(h);K?l(K.getPaintProperty(b),R)||(K.setPaintProperty(b,R,U)&&this._updateLayer(K),this._changed=!0,this._updatedPaintProps[h]=!0):this.fire(new s.ErrorEvent(new Error(`The layer '${h}' does not exist in the map's style and cannot be styled.`)))}getPaintProperty(h,b){const R=this.getLayer(h);return R&&R.getPaintProperty(b)}setFeatureState(h,b){this._checkLoaded();const R=h.source,U=h.sourceLayer,K=this.getSource(R);if(!K)return void this.fire(new s.ErrorEvent(new Error(`The source '${R}' does not exist in the map's style.`)));const ne=K.type;if(ne==="geojson"&&U)return void this.fire(new s.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter.")));if(ne==="vector"&&!U)return void this.fire(new s.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));h.id===void 0&&this.fire(new s.ErrorEvent(new Error("The feature id parameter must be provided.")));const ae=this._getSourceCaches(R);for(const he of ae)he.setFeatureState(U,h.id,b)}removeFeatureState(h,b){this._checkLoaded();const R=h.source,U=this.getSource(R);if(!U)return void this.fire(new s.ErrorEvent(new Error(`The source '${R}' does not exist in the map's style.`)));const K=U.type,ne=K==="vector"?h.sourceLayer:void 0;if(K==="vector"&&!ne)return void this.fire(new s.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));if(b&&typeof h.id!="string"&&typeof h.id!="number")return void this.fire(new s.ErrorEvent(new Error("A feature id is required to remove its specific state property.")));const ae=this._getSourceCaches(R);for(const he of ae)he.removeFeatureState(ne,h.id,b)}getFeatureState(h){this._checkLoaded();const b=h.source,R=h.sourceLayer,U=this.getSource(b);if(U){if(U.type!=="vector"||R)return h.id===void 0&&this.fire(new s.ErrorEvent(new Error("The feature id parameter must be provided."))),this._getSourceCaches(b)[0].getFeatureState(R,h.id);this.fire(new s.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new s.ErrorEvent(new Error(`The source '${b}' does not exist in the map's style.`)))}getTransition(){return s.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)}serialize(){const h={};for(const b in this._sourceCaches){const R=this._sourceCaches[b].getSource();h[R.id]||(h[R.id]=R.serialize())}return s.filterObject({version:this.stylesheet.version,name:this.stylesheet.name,metadata:this.stylesheet.metadata,light:this.stylesheet.light,terrain:this.getTerrain()||void 0,fog:this.stylesheet.fog,center:this.stylesheet.center,zoom:this.stylesheet.zoom,bearing:this.stylesheet.bearing,pitch:this.stylesheet.pitch,sprite:this.stylesheet.sprite,glyphs:this.stylesheet.glyphs,transition:this.stylesheet.transition,projection:this.stylesheet.projection,sources:h,layers:this._serializeLayers(this._order)},b=>b!==void 0)}_updateLayer(h){this._updatedLayers[h.id]=!0;const b=this._getLayerSourceCache(h);h.source&&!this._updatedSources[h.source]&&b&&b.getSource().type!=="raster"&&(this._updatedSources[h.source]="reload",b.pause()),this._changed=!0,h.invalidateCompiledFilter()}_flattenAndSortRenderedFeatures(h){const b=ne=>this._layers[ne].type==="fill-extrusion",R={},U=[];for(let ne=this._order.length-1;ne>=0;ne--){const ae=this._order[ne];if(b(ae)){R[ae]=ne;for(const he of h){const be=he[ae];if(be)for(const we of be)U.push(we)}}}U.sort((ne,ae)=>ae.intersectionZ-ne.intersectionZ);const K=[];for(let ne=this._order.length-1;ne>=0;ne--){const ae=this._order[ne];if(b(ae))for(let he=U.length-1;he>=0;he--){const be=U[he].feature;if(R[be.layer.id]<ne)break;K.push(be),U.pop()}else for(const he of h){const be=he[ae];if(be)for(const we of be)K.push(we.feature)}}return K}queryRenderedFeatures(h,b,R){b&&b.filter&&this._validate(s.validateFilter,"queryRenderedFeatures.filter",b.filter,null,b);const U={};if(b&&b.layers){if(!Array.isArray(b.layers))return this.fire(new s.ErrorEvent(new Error("parameters.layers must be an Array."))),[];for(const he of b.layers){const be=this._layers[he];if(!be)return this.fire(new s.ErrorEvent(new Error(`The layer '${he}' does not exist in the map's style and cannot be queried for features.`))),[];U[be.source]=!0}}const K=[];b.availableImages=this._availableImages;const ne=b&&b.layers?b.layers.some(he=>{const be=this.getLayer(he);return be&&be.is3D()}):this.has3DLayers(),ae=fe.createFromScreenPoints(h,R);for(const he in this._sourceCaches){const be=this._sourceCaches[he].getSource().id;b.layers&&!U[be]||K.push(qt(this._sourceCaches[he],this._layers,this._serializedLayers,ae,b,R,ne,!!this.map._showQueryGeometry))}return this.placement&&K.push(function(he,be,we,Le,He,rt,st){const at={},ut=rt.queryRenderedSymbols(Le),De=[];for(const it of Object.keys(ut).map(Number))De.push(st[it]);De.sort(on);for(const it of De){const yt=it.featureIndex.lookupSymbolFeatures(ut[it.bucketInstanceId],be,it.bucketIndex,it.sourceLayerIndex,He.filter,He.layers,He.availableImages,he);for(const mt in yt){const kt=at[mt]=at[mt]||[],Lt=yt[mt];Lt.sort((At,Yt)=>{const Vt=it.featureSortOrder;if(Vt){const or=Vt.indexOf(At.featureIndex);return Vt.indexOf(Yt.featureIndex)-or}return Yt.featureIndex-At.featureIndex});for(const At of Lt)kt.push(At)}}for(const it in at)at[it].forEach(yt=>{const mt=yt.feature,kt=we(he[it]);if(!kt)return;const Lt=kt.getFeatureState(mt.layer["source-layer"],mt.id);mt.source=mt.layer.source,mt.layer["source-layer"]&&(mt.sourceLayer=mt.layer["source-layer"]),mt.state=Lt});return at}(this._layers,this._serializedLayers,this._getLayerSourceCache.bind(this),ae.screenGeometry,b,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(K)}querySourceFeatures(h,b){b&&b.filter&&this._validate(s.validateFilter,"querySourceFeatures.filter",b.filter,null,b);const R=this._getSourceCaches(h);let U=[];for(const K of R)U=U.concat(Ht(K,b));return U}addSourceType(h,b,R){return Yo.getSourceType(h)?R(new Error(`A source type called "${h}" already exists.`)):(Yo.setSourceType(h,b),b.workerSourceURL?void this.dispatcher.broadcast("loadWorkerSource",{name:h,url:b.workerSourceURL},R):R(null,null))}getLight(){return this.light.getLight()}setLight(h,b={}){this._checkLoaded();const R=this.light.getLight();let U=!1;for(const ne in h)if(!l(h[ne],R[ne])){U=!0;break}if(!U)return;const K=this._setTransitionParameters({duration:300,delay:0});this.light.setLight(h,b),this.light.updateTransitions(K)}getTerrain(){return this.terrain&&this.terrain.drapeRenderMode===1?this.terrain.get():null}setTerrainForDraping(){this.setTerrain({source:"",exaggeration:0},0)}setTerrain(h,b=1){if(this._checkLoaded(),!h)return delete this.terrain,delete this.stylesheet.terrain,this.dispatcher.broadcast("enableTerrain",!1),this._force3DLayerUpdate(),void(this._markersNeedUpdate=!0);let R=h;if(b===1){if(typeof R.source=="object"){const U="terrain-dem-src";this.addSource(U,R.source),R=s.clone$1(R),R=s.extend(R,{source:U})}if(this._validate(s.validateTerrain,"terrain",R))return}if(!this.terrain||this.terrain&&b!==this.terrain.drapeRenderMode){if(!R)return;this._createTerrain(R,b)}else{const U=this.terrain,K=U.get();for(const ne of Object.keys(s.spec.terrain))!R.hasOwnProperty(ne)&&s.spec.terrain[ne].default&&(R[ne]=s.spec.terrain[ne].default);for(const ne in R)if(!l(R[ne],K[ne])){U.set(R),this.stylesheet.terrain=R;const ae=this._setTransitionParameters({duration:0});U.updateTransitions(ae);break}}this._updateDrapeFirstLayers(),this._markersNeedUpdate=!0}_createFog(h){const b=this.fog=new ee(h,this.map.transform);this.stylesheet.fog=h;const R=this._setTransitionParameters({duration:0});b.updateTransitions(R)}_updateMarkersOpacity(){this.map._markers.length!==0&&this.map._requestDomTask(()=>{for(const h of this.map._markers)h._evaluateOpacity()})}getFog(){return this.fog?this.fog.get():null}setFog(h){if(this._checkLoaded(),!h)return delete this.fog,delete this.stylesheet.fog,void(this._markersNeedUpdate=!0);if(this.fog){const b=this.fog,R=b.get();Object.keys(h).length===0&&b.set(h);for(const U in h)if(!l(h[U],R[U])){b.set(h),this.stylesheet.fog=h;const K=this._setTransitionParameters({duration:0});b.updateTransitions(K);break}}else this._createFog(h);this._markersNeedUpdate=!0}_setTransitionParameters(h){return{now:s.exported.now(),transition:s.extend(h,this.stylesheet.transition)}}_updateDrapeFirstLayers(){if(!this.map._optimizeForTerrain||!this.terrain)return;const h=this._order.filter(R=>this.isLayerDraped(this._layers[R])),b=this._order.filter(R=>!this.isLayerDraped(this._layers[R]));this._drapedFirstOrder=[],this._drapedFirstOrder.push(...h),this._drapedFirstOrder.push(...b)}_createTerrain(h,b){const R=this.terrain=new O(h,b);this.stylesheet.terrain=h,this.dispatcher.broadcast("enableTerrain",!this.terrainSetForDrapingOnly()),this._force3DLayerUpdate();const U=this._setTransitionParameters({duration:0});R.updateTransitions(U)}_force3DLayerUpdate(){for(const h in this._layers){const b=this._layers[h];b.type==="fill-extrusion"&&this._updateLayer(b)}}_forceSymbolLayerUpdate(){for(const h in this._layers){const b=this._layers[h];b.type==="symbol"&&this._updateLayer(b)}}_validate(h,b,R,U,K={}){return(!K||K.validate!==!1)&&ju(this,h.call(s.validateStyle,s.extend({key:b,style:this.serialize(),value:R,styleSpec:s.spec},U)))}_remove(){this._request&&(this._request.cancel(),this._request=null),this._spriteRequest&&(this._spriteRequest.cancel(),this._spriteRequest=null),s.evented.off("pluginStateChange",this._rtlTextPluginCallback);for(const h in this._layers)this._layers[h].setEventedParent(null);for(const h in this._sourceCaches)this._sourceCaches[h].clearTiles(),this._sourceCaches[h].setEventedParent(null);this.imageManager.setEventedParent(null),this.setEventedParent(null),this.dispatcher.remove()}_clearSource(h){const b=this._getSourceCaches(h);for(const R of b)R.clearTiles()}_reloadSource(h){const b=this._getSourceCaches(h);for(const R of b)R.resume(),R.reload()}_reloadSources(){for(const h of this._getSources())h.reload&&h.reload()}_updateSources(h){for(const b in this._sourceCaches)this._sourceCaches[b].update(h)}_generateCollisionBoxes(){for(const h in this._sourceCaches){const b=this._sourceCaches[h];b.resume(),b.reload()}}_updatePlacement(h,b,R,U,K=!1){let ne=!1,ae=!1;const he={};for(const be of this._order){const we=this._layers[be];if(we.type!=="symbol")continue;if(!he[we.source]){const He=this._getLayerSourceCache(we);if(!He)continue;he[we.source]=He.getRenderableIds(!0).map(rt=>He.getTileByID(rt)).sort((rt,st)=>st.tileID.overscaledZ-rt.tileID.overscaledZ||(rt.tileID.isLessThan(st.tileID)?-1:1))}const Le=this.crossTileSymbolIndex.addLayer(we,he[we.source],h.center.lng,h.projection);ne=ne||Le}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),K=K||this._layerOrderChanged||R===0,this._layerOrderChanged&&this.fire(new s.Event("neworder")),(K||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(s.exported.now(),h.zoom))&&(this.pauseablePlacement=new $i(h,this._order,K,b,R,U,this.placement,this.fog&&h.projection.supportsFog?this.fog.state:null),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,he),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(s.exported.now()),ae=!0),ne&&this.pauseablePlacement.placement.setStale()),ae||ne)for(const be of this._order){const we=this._layers[be];we.type==="symbol"&&this.placement.updateLayerOpacities(we,he[we.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(s.exported.now())}_releaseSymbolFadeTiles(){for(const h in this._sourceCaches)this._sourceCaches[h].releaseSymbolFadeTiles()}getImages(h,b,R){this.imageManager.getImages(b.icons,R),this._updateTilesForChangedImages();const U=K=>{K&&K.setDependencies(b.tileID.key,b.type,b.icons)};U(this._otherSourceCaches[b.source]),U(this._symbolSourceCaches[b.source])}getGlyphs(h,b,R){this.glyphManager.getGlyphs(b.stacks,R)}getResource(h,b,R){return s.makeRequest(b,R)}_getSourceCache(h){return this._otherSourceCaches[h]}_getLayerSourceCache(h){return h.type==="symbol"?this._symbolSourceCaches[h.source]:this._otherSourceCaches[h.source]}_getSourceCaches(h){const b=[];return this._otherSourceCaches[h]&&b.push(this._otherSourceCaches[h]),this._symbolSourceCaches[h]&&b.push(this._symbolSourceCaches[h]),b}_isSourceCacheLoaded(h){const b=this._getSourceCaches(h);return b.length===0?(this.fire(new s.ErrorEvent(new Error(`There is no source with ID '${h}'`))),!1):b.every(R=>R.loaded())}has3DLayers(){return this._num3DLayers>0}hasSymbolLayers(){return this._numSymbolLayers>0}hasCircleLayers(){return this._numCircleLayers>0}_clearWorkerCaches(){this.dispatcher.broadcast("clearCaches")}destroy(){this._clearWorkerCaches(),this.terrainSetForDrapingOnly()&&(delete this.terrain,delete this.stylesheet.terrain)}}Yo.getSourceType=function(I){return Ye[I]},Yo.setSourceType=function(I,h){Ye[I]=h},Yo.registerForPluginStateChange=s.registerForPluginStateChange;var Eh=` #define EPSILON 0.0000001 #define PI 3.141592653589793 #define EXTENT 8192.0 #define HALF_PI PI/2.0 #define QUARTER_PI PI/4.0 #define RAD_TO_DEG 180.0/PI #define DEG_TO_RAD PI/180.0 #define GLOBE_RADIUS EXTENT/PI/2.0`,Gl="attribute highp vec3 a_pos_3f;uniform lowp mat4 u_matrix;varying highp vec3 v_uv;void main() {const mat3 half_neg_pi_around_x=mat3(1.0,0.0, 0.0,0.0,0.0,-1.0,0.0,1.0, 0.0);v_uv=half_neg_pi_around_x*a_pos_3f;vec4 pos=u_matrix*vec4(a_pos_3f,1.0);gl_Position=pos.xyww;}",el=` #define ELEVATION_SCALE 7.0 #define ELEVATION_OFFSET 450.0 #ifdef PROJECTION_GLOBE_VIEW uniform vec3 u_tile_tl_up;uniform vec3 u_tile_tr_up;uniform vec3 u_tile_br_up;uniform vec3 u_tile_bl_up;uniform float u_tile_up_scale;vec3 elevationVector(vec2 pos) {vec2 uv=pos/EXTENT;vec3 up=normalize(mix( mix(u_tile_tl_up,u_tile_tr_up,uv.xxx),mix(u_tile_bl_up,u_tile_br_up,uv.xxx),uv.yyy));return up*u_tile_up_scale;} #else vec3 elevationVector(vec2 pos) { return vec3(0,0,1); } #endif const float skirtOffset=24575.0;vec3 decomposeToPosAndSkirt(vec2 posWithComposedSkirt) {float skirt=float(posWithComposedSkirt.x >=skirtOffset);vec2 pos=posWithComposedSkirt-vec2(skirt*skirtOffset,0.0);return vec3(pos,skirt);} #ifdef TERRAIN #ifdef TERRAIN_DEM_FLOAT_FORMAT uniform highp sampler2D u_dem;uniform highp sampler2D u_dem_prev; #else uniform sampler2D u_dem;uniform sampler2D u_dem_prev; #endif uniform vec4 u_dem_unpack;uniform vec2 u_dem_tl;uniform vec2 u_dem_tl_prev;uniform float u_dem_scale;uniform float u_dem_scale_prev;uniform float u_dem_size;uniform float u_dem_lerp;uniform float u_exaggeration;uniform float u_meter_to_dem;uniform mat4 u_label_plane_matrix_inv;uniform sampler2D u_depth;uniform vec2 u_depth_size_inv;vec4 tileUvToDemSample(vec2 uv,float dem_size,float dem_scale,vec2 dem_tl) {vec2 pos=dem_size*(uv*dem_scale+dem_tl)+1.0;vec2 f=fract(pos);return vec4((pos-f+0.5)/(dem_size+2.0),f);}float decodeElevation(vec4 v) {return dot(vec4(v.xyz*255.0,-1.0),u_dem_unpack);}float currentElevation(vec2 apos) { #ifdef TERRAIN_DEM_FLOAT_FORMAT vec2 pos=(u_dem_size*(apos/8192.0*u_dem_scale+u_dem_tl)+1.5)/(u_dem_size+2.0);return u_exaggeration*texture2D(u_dem,pos).a; #else float dd=1.0/(u_dem_size+2.0);vec4 r=tileUvToDemSample(apos/8192.0,u_dem_size,u_dem_scale,u_dem_tl);vec2 pos=r.xy;vec2 f=r.zw;float tl=decodeElevation(texture2D(u_dem,pos)); #ifdef TERRAIN_DEM_NEAREST_FILTER return u_exaggeration*tl; #endif float tr=decodeElevation(texture2D(u_dem,pos+vec2(dd,0.0)));float bl=decodeElevation(texture2D(u_dem,pos+vec2(0.0,dd)));float br=decodeElevation(texture2D(u_dem,pos+vec2(dd,dd)));return u_exaggeration*mix(mix(tl,tr,f.x),mix(bl,br,f.x),f.y); #endif }float prevElevation(vec2 apos) { #ifdef TERRAIN_DEM_FLOAT_FORMAT vec2 pos=(u_dem_size*(apos/8192.0*u_dem_scale_prev+u_dem_tl_prev)+1.5)/(u_dem_size+2.0);return u_exaggeration*texture2D(u_dem_prev,pos).a; #else float dd=1.0/(u_dem_size+2.0);vec4 r=tileUvToDemSample(apos/8192.0,u_dem_size,u_dem_scale_prev,u_dem_tl_prev);vec2 pos=r.xy;vec2 f=r.zw;float tl=decodeElevation(texture2D(u_dem_prev,pos));float tr=decodeElevation(texture2D(u_dem_prev,pos+vec2(dd,0.0)));float bl=decodeElevation(texture2D(u_dem_prev,pos+vec2(0.0,dd)));float br=decodeElevation(texture2D(u_dem_prev,pos+vec2(dd,dd)));return u_exaggeration*mix(mix(tl,tr,f.x),mix(bl,br,f.x),f.y); #endif } #ifdef TERRAIN_VERTEX_MORPHING float elevation(vec2 apos) { #ifdef ZERO_EXAGGERATION return 0.0; #endif float nextElevation=currentElevation(apos);float prevElevation=prevElevation(apos);return mix(prevElevation,nextElevation,u_dem_lerp);} #else float elevation(vec2 apos) { #ifdef ZERO_EXAGGERATION return 0.0; #endif return currentElevation(apos);} #endif highp float unpack_depth(highp vec4 rgba_depth) {const highp vec4 bit_shift=vec4(1.0/(255.0*255.0*255.0),1.0/(255.0*255.0),1.0/255.0,1.0);return dot(rgba_depth,bit_shift)*2.0-1.0;}bool isOccluded(vec4 frag) {vec3 coord=frag.xyz/frag.w;float depth=unpack_depth(texture2D(u_depth,(coord.xy+1.0)*0.5));return coord.z > depth+0.0005;}float occlusionFade(vec4 frag) {vec3 coord=frag.xyz/frag.w;vec3 df=vec3(5.0*u_depth_size_inv,0.0);vec2 uv=0.5*coord.xy+0.5;vec4 depth=vec4( unpack_depth(texture2D(u_depth,uv-df.xz)),unpack_depth(texture2D(u_depth,uv+df.xz)),unpack_depth(texture2D(u_depth,uv-df.zy)),unpack_depth(texture2D(u_depth,uv+df.zy)) );return dot(vec4(0.25),vec4(1.0)-clamp(300.0*(vec4(coord.z-0.001)-depth),0.0,1.0));}vec4 fourSample(vec2 pos,vec2 off) { #ifdef TERRAIN_DEM_FLOAT_FORMAT float tl=texture2D(u_dem,pos).a;float tr=texture2D(u_dem,pos+vec2(off.x,0.0)).a;float bl=texture2D(u_dem,pos+vec2(0.0,off.y)).a;float br=texture2D(u_dem,pos+off).a; #else vec4 demtl=vec4(texture2D(u_dem,pos).xyz*255.0,-1.0);float tl=dot(demtl,u_dem_unpack);vec4 demtr=vec4(texture2D(u_dem,pos+vec2(off.x,0.0)).xyz*255.0,-1.0);float tr=dot(demtr,u_dem_unpack);vec4 dembl=vec4(texture2D(u_dem,pos+vec2(0.0,off.y)).xyz*255.0,-1.0);float bl=dot(dembl,u_dem_unpack);vec4 dembr=vec4(texture2D(u_dem,pos+off).xyz*255.0,-1.0);float br=dot(dembr,u_dem_unpack); #endif return vec4(tl,tr,bl,br);}float flatElevation(vec2 pack) {vec2 apos=floor(pack/8.0);vec2 span=10.0*(pack-apos*8.0);vec2 uvTex=(apos-vec2(1.0,1.0))/8190.0;float size=u_dem_size+2.0;float dd=1.0/size;vec2 pos=u_dem_size*(uvTex*u_dem_scale+u_dem_tl)+1.0;vec2 f=fract(pos);pos=(pos-f+0.5)*dd;vec4 h=fourSample(pos,vec2(dd));float z=mix(mix(h.x,h.y,f.x),mix(h.z,h.w,f.x),f.y);vec2 w=floor(0.5*(span*u_meter_to_dem-1.0));vec2 d=dd*w;h=fourSample(pos-d,2.0*d+vec2(dd));vec4 diff=abs(h.xzxy-h.ywzw);vec2 slope=min(vec2(0.25),u_meter_to_dem*0.5*(diff.xz+diff.yw)/(2.0*w+vec2(1.0)));vec2 fix=slope*span;float base=z+max(fix.x,fix.y);return u_exaggeration*base;}float elevationFromUint16(float word) {return u_exaggeration*(word/ELEVATION_SCALE-ELEVATION_OFFSET);} #else float elevation(vec2 pos) { return 0.0; }bool isOccluded(vec4 frag) { return false; }float occlusionFade(vec4 frag) { return 1.0; } #endif`,Cf=`#ifdef FOG uniform mediump vec4 u_fog_color;uniform mediump vec2 u_fog_range;uniform mediump float u_fog_horizon_blend;uniform mediump mat4 u_fog_matrix;varying vec3 v_fog_pos;float fog_range(float depth) {return (depth-u_fog_range[0])/(u_fog_range[1]-u_fog_range[0]);}float fog_horizon_blending(vec3 camera_dir) {float t=max(0.0,camera_dir.z/u_fog_horizon_blend);return u_fog_color.a*exp(-3.0*t*t);}float fog_opacity(float t) {const float decay=6.0;float falloff=1.0-min(1.0,exp(-decay*t));falloff*=falloff*falloff;return u_fog_color.a*min(1.0,1.00747*falloff);}vec3 fog_position(vec3 pos) {return (u_fog_matrix*vec4(pos,1.0)).xyz;}vec3 fog_position(vec2 pos) {return fog_position(vec3(pos,0.0));}float fog(vec3 pos) {float depth=length(pos);float opacity=fog_opacity(fog_range(depth));return opacity*fog_horizon_blending(pos/depth);} #endif`,Xs=`#ifdef FOG uniform mediump vec4 u_fog_color;uniform mediump vec2 u_fog_range;uniform mediump float u_fog_horizon_blend;uniform mediump float u_fog_temporal_offset;varying vec3 v_fog_pos;uniform highp vec3 u_frustum_tl;uniform highp vec3 u_frustum_tr;uniform highp vec3 u_frustum_br;uniform highp vec3 u_frustum_bl;uniform highp vec3 u_globe_pos;uniform highp float u_globe_radius;uniform highp vec2 u_viewport;uniform float u_globe_transition;uniform int u_is_globe;float fog_range(float depth) {return (depth-u_fog_range[0])/(u_fog_range[1]-u_fog_range[0]);}float fog_horizon_blending(vec3 camera_dir) {float t=max(0.0,camera_dir.z/u_fog_horizon_blend);return u_fog_color.a*exp(-3.0*t*t);}float fog_opacity(float t) {const float decay=6.0;float falloff=1.0-min(1.0,exp(-decay*t));falloff*=falloff*falloff;return u_fog_color.a*min(1.0,1.00747*falloff);}float globe_glow_progress() {highp vec2 uv=gl_FragCoord.xy/u_viewport;highp vec3 ray_dir=mix( mix(u_frustum_tl,u_frustum_tr,uv.x),mix(u_frustum_bl,u_frustum_br,uv.x),1.0-uv.y);highp vec3 dir=normalize(ray_dir);highp vec3 closest_point=dot(u_globe_pos,dir)*dir;highp float sdf=length(closest_point-u_globe_pos)/u_globe_radius;return sdf+PI*0.5;}float fog_opacity(vec3 pos) {float depth=length(pos);return fog_opacity(fog_range(depth));}vec3 fog_apply(vec3 color,vec3 pos) {float depth=length(pos);float opacity;if (u_is_globe==1) {float glow_progress=globe_glow_progress();float t=mix(glow_progress,depth,u_globe_transition);opacity=fog_opacity(fog_range(t));} else {opacity=fog_opacity(fog_range(depth));opacity*=fog_horizon_blending(pos/depth);}return mix(color,u_fog_color.rgb,opacity);}vec4 fog_apply_from_vert(vec4 color,float fog_opac) {float alpha=EPSILON+color.a;color.rgb=mix(color.rgb/alpha,u_fog_color.rgb,fog_opac)*alpha;return color;}vec3 fog_apply_sky_gradient(vec3 camera_ray,vec3 sky_color) {float horizon_blend=fog_horizon_blending(normalize(camera_ray));return mix(sky_color,u_fog_color.rgb,horizon_blend);}vec4 fog_apply_premultiplied(vec4 color,vec3 pos) {float alpha=EPSILON+color.a;color.rgb=fog_apply(color.rgb/alpha,pos)*alpha;return color;}vec3 fog_dither(vec3 color) {vec2 dither_seed=gl_FragCoord.xy+u_fog_temporal_offset;return dither(color,dither_seed);}vec4 fog_dither(vec4 color) {return vec4(fog_dither(color.rgb),color.a);} #endif`;let zp={},Vu={};const ru=[];Th(Eh,ru),Th(el,ru),Th(Cf,ru),Th(Xs,ru),zp=gi("",el),Vu=gi(Xs,Cf);const Bp=gi(` #if __VERSION__ >=300 #define varying in #define gl_FragColor glFragColor #define texture2D texture #define textureCube texture out vec4 glFragColor; #endif highp vec3 hash(highp vec2 p) {highp vec3 p3=fract(p.xyx*vec3(443.8975,397.2973,491.1871));p3+=dot(p3,p3.yxz+19.19);return fract((p3.xxy+p3.yzz)*p3.zyx);}vec3 dither(vec3 color,highp vec2 seed) {vec3 rnd=hash(seed)+hash(seed+0.59374)-0.5;return color+rnd/255.0;}highp float unpack_depth(highp vec4 rgba_depth) {const highp vec4 bit_shift=vec4(1.0/(255.0*255.0*255.0),1.0/(255.0*255.0),1.0/255.0,1.0);return dot(rgba_depth,bit_shift)*2.0-1.0;}highp vec4 pack_depth(highp float ndc_z) {highp float depth=ndc_z*0.5+0.5;const highp vec4 bit_shift=vec4(255.0*255.0*255.0,255.0*255.0,255.0,1.0);const highp vec4 bit_mask =vec4(0.0,1.0/255.0,1.0/255.0,1.0/255.0);highp vec4 res=fract(depth*bit_shift);res-=res.xxyz*bit_mask;return res;}`,` #if __VERSION__ >=300 #define attribute in #define varying out #define texture2D texture #endif float wrap(float n,float min,float max) {float d=max-min;float w=mod(mod(n-min,d)+d,d)+min;return (w==min) ? max : w;} #ifdef PROJECTION_GLOBE_VIEW vec3 mercator_tile_position(mat4 matrix,vec2 tile_anchor,vec3 tile_id,vec2 mercator_center) { #ifndef PROJECTED_POS_ON_VIEWPORT float tiles=tile_id.z;vec2 mercator=(tile_anchor/EXTENT+tile_id.xy)/tiles;mercator-=mercator_center;mercator.x=wrap(mercator.x,-0.5,0.5);vec4 mercator_tile=vec4(mercator.xy*EXTENT,EXTENT/(2.0*PI),1.0);mercator_tile=matrix*mercator_tile;return mercator_tile.xyz; #else return vec3(0.0); #endif }vec3 mix_globe_mercator(vec3 globe,vec3 mercator,float t) {return mix(globe,mercator,t);}mat3 globe_mercator_surface_vectors(vec3 pos_normal,vec3 up_dir,float zoom_transition) {vec3 normal=zoom_transition==0.0 ? pos_normal : normalize(mix(pos_normal,up_dir,zoom_transition));vec3 xAxis=normalize(vec3(normal.z,0.0,-normal.x));vec3 yAxis=normalize(cross(normal,xAxis));return mat3(xAxis,yAxis,normal);} #endif vec2 unpack_float(const float packedValue) {int packedIntValue=int(packedValue);int v0=packedIntValue/256;return vec2(v0,packedIntValue-v0*256);}vec2 unpack_opacity(const float packedOpacity) {int intOpacity=int(packedOpacity)/2;return vec2(float(intOpacity)/127.0,mod(packedOpacity,2.0));}vec4 decode_color(const vec2 encodedColor) {return vec4( unpack_float(encodedColor[0])/255.0,unpack_float(encodedColor[1])/255.0 );}float unpack_mix_vec2(const vec2 packedValue,const float t) {return mix(packedValue[0],packedValue[1],t);}vec4 unpack_mix_color(const vec4 packedColors,const float t) {vec4 minColor=decode_color(vec2(packedColors[0],packedColors[1]));vec4 maxColor=decode_color(vec2(packedColors[2],packedColors[3]));return mix(minColor,maxColor,t);}vec2 get_pattern_pos(const vec2 pixel_coord_upper,const vec2 pixel_coord_lower,const vec2 pattern_size,const float tile_units_to_pixels,const vec2 pos) {vec2 offset=mod(mod(mod(pixel_coord_upper,pattern_size)*256.0,pattern_size)*256.0+pixel_coord_lower,pattern_size);return (tile_units_to_pixels*pos+offset)/pattern_size;}const vec4 AWAY=vec4(-1000.0,-1000.0,-1000.0,1);//Normalized device coordinate that is not rendered.`),xd=Eh,Sh=` #ifdef GL_ES precision mediump float; #else #if !defined(lowp) #define lowp #endif #if !defined(mediump) #define mediump #endif #if !defined(highp) #define highp #endif #endif`;var sa={background:gi(`uniform vec4 u_color;uniform float u_opacity; #ifdef LIGHTING_3D_MODE varying vec4 v_color; #endif void main() {vec4 out_color; #ifdef LIGHTING_3D_MODE out_color=v_color; #else out_color=u_color; #endif #ifdef FOG out_color=fog_dither(fog_apply_premultiplied(out_color,v_fog_pos)); #endif gl_FragColor=out_color*u_opacity; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,`attribute vec2 a_pos;uniform mat4 u_matrix; #ifdef LIGHTING_3D_MODE uniform vec4 u_color;varying vec4 v_color; #endif void main() {gl_Position=u_matrix*vec4(a_pos,0,1); #ifdef LIGHTING_3D_MODE v_color=apply_lighting(u_color); #endif #ifdef FOG v_fog_pos=fog_position(a_pos); #endif }`),backgroundPattern:gi(`uniform vec2 u_pattern_tl;uniform vec2 u_pattern_br;uniform vec2 u_texsize;uniform float u_opacity;uniform sampler2D u_image;varying vec2 v_pos;void main() {vec2 imagecoord=mod(v_pos,1.0);vec2 pos=mix(u_pattern_tl/u_texsize,u_pattern_br/u_texsize,imagecoord);vec4 out_color=texture2D(u_image,pos); #ifdef LIGHTING_3D_MODE out_color=apply_lighting(out_color); #endif #ifdef FOG out_color=fog_dither(fog_apply_premultiplied(out_color,v_fog_pos)); #endif gl_FragColor=out_color*u_opacity; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,`uniform mat4 u_matrix;uniform vec2 u_pattern_size;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_tile_units_to_pixels;attribute vec2 a_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_pattern_size,u_tile_units_to_pixels,a_pos); #ifdef FOG v_fog_pos=fog_position(a_pos); #endif }`),circle:gi(`varying vec3 v_data;varying float v_visibility; #pragma mapbox: define highp vec4 color #pragma mapbox: define mediump float radius #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity #pragma mapbox: define highp vec4 stroke_color #pragma mapbox: define mediump float stroke_width #pragma mapbox: define lowp float stroke_opacity void main() { #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize mediump float radius #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize highp vec4 stroke_color #pragma mapbox: initialize mediump float stroke_width #pragma mapbox: initialize lowp float stroke_opacity vec2 extrude=v_data.xy;float extrude_length=length(extrude);lowp float antialiasblur=v_data.z;float antialiased_blur=-max(blur,antialiasblur);float opacity_t=smoothstep(0.0,antialiased_blur,extrude_length-1.0);float color_t=stroke_width < 0.01 ? 0.0 : smoothstep( antialiased_blur,0.0,extrude_length-radius/(radius+stroke_width) );vec4 out_color=mix(color*opacity,stroke_color*stroke_opacity,color_t); #ifdef LIGHTING_3D_MODE out_color=apply_lighting(out_color); #endif #ifdef FOG out_color=fog_apply_premultiplied(out_color,v_fog_pos); #endif gl_FragColor=out_color*(v_visibility*opacity_t); #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,`#define NUM_VISIBILITY_RINGS 2 #define INV_SQRT2 0.70710678 #define ELEVATION_BIAS 0.0001 #define NUM_SAMPLES_PER_RING 16 uniform mat4 u_matrix;uniform mat2 u_extrude_scale;uniform lowp float u_device_pixel_ratio;uniform highp float u_camera_to_center_distance;attribute vec2 a_pos; #ifdef PROJECTION_GLOBE_VIEW attribute vec3 a_pos_3;attribute vec3 a_pos_normal_3;uniform mat4 u_inv_rot_matrix;uniform vec2 u_merc_center;uniform vec3 u_tile_id;uniform float u_zoom_transition;uniform vec3 u_up_dir; #endif varying vec3 v_data;varying float v_visibility; #pragma mapbox: define highp vec4 color #pragma mapbox: define mediump float radius #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity #pragma mapbox: define highp vec4 stroke_color #pragma mapbox: define mediump float stroke_width #pragma mapbox: define lowp float stroke_opacity vec2 calc_offset(vec2 extrusion,float radius,float stroke_width, float view_scale) {return extrusion*(radius+stroke_width)*u_extrude_scale*view_scale;}float cantilevered_elevation(vec2 pos,float radius,float stroke_width,float view_scale) {vec2 c1=pos+calc_offset(vec2(-1,-1),radius,stroke_width,view_scale);vec2 c2=pos+calc_offset(vec2(1,-1),radius,stroke_width,view_scale);vec2 c3=pos+calc_offset(vec2(1,1),radius,stroke_width,view_scale);vec2 c4=pos+calc_offset(vec2(-1,1),radius,stroke_width,view_scale);float h1=elevation(c1)+ELEVATION_BIAS;float h2=elevation(c2)+ELEVATION_BIAS;float h3=elevation(c3)+ELEVATION_BIAS;float h4=elevation(c4)+ELEVATION_BIAS;return max(h4,max(h3,max(h1,h2)));}float circle_elevation(vec2 pos) { #if defined(TERRAIN) return elevation(pos)+ELEVATION_BIAS; #else return 0.0; #endif }vec4 project_vertex(vec2 extrusion,vec4 world_center,vec4 projected_center,float radius,float stroke_width, float view_scale,mat3 surface_vectors) {vec2 sample_offset=calc_offset(extrusion,radius,stroke_width,view_scale); #ifdef PITCH_WITH_MAP #ifdef PROJECTION_GLOBE_VIEW return u_matrix*( world_center+vec4(sample_offset.x*surface_vectors[0]+sample_offset.y*surface_vectors[1],0) ); #else return u_matrix*( world_center+vec4(sample_offset,0,0) ); #endif #else return projected_center+vec4(sample_offset,0,0); #endif }float get_sample_step() { #ifdef PITCH_WITH_MAP return 2.0*PI/float(NUM_SAMPLES_PER_RING); #else return PI/float(NUM_SAMPLES_PER_RING); #endif }void main(void) { #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize mediump float radius #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize highp vec4 stroke_color #pragma mapbox: initialize mediump float stroke_width #pragma mapbox: initialize lowp float stroke_opacity vec2 extrude=vec2(mod(a_pos,2.0)*2.0-1.0);vec2 circle_center=floor(a_pos*0.5);vec4 world_center;mat3 surface_vectors; #ifdef PROJECTION_GLOBE_VIEW vec3 pos_normal_3=a_pos_normal_3/16384.0;surface_vectors=globe_mercator_surface_vectors(pos_normal_3,u_up_dir,u_zoom_transition);vec3 surface_extrusion=extrude.x*surface_vectors[0]+extrude.y*surface_vectors[1];vec3 globe_elevation=elevationVector(circle_center)*circle_elevation(circle_center);vec3 globe_pos=a_pos_3+surface_extrusion+globe_elevation;vec3 mercator_elevation=u_up_dir*u_tile_up_scale*circle_elevation(circle_center);vec3 merc_pos=mercator_tile_position(u_inv_rot_matrix,circle_center,u_tile_id,u_merc_center)+surface_extrusion+mercator_elevation;vec3 pos=mix_globe_mercator(globe_pos,merc_pos,u_zoom_transition);world_center=vec4(pos,1); #else surface_vectors=mat3(1.0);float height=circle_elevation(circle_center);world_center=vec4(circle_center,height,1); #endif vec4 projected_center=u_matrix*world_center;float view_scale=0.0; #ifdef PITCH_WITH_MAP #ifdef SCALE_WITH_MAP view_scale=1.0; #else view_scale=projected_center.w/u_camera_to_center_distance; #endif #else #ifdef SCALE_WITH_MAP view_scale=u_camera_to_center_distance; #else view_scale=projected_center.w; #endif #endif gl_Position=project_vertex(extrude,world_center,projected_center,radius,stroke_width,view_scale,surface_vectors);float visibility=0.0; #ifdef TERRAIN float step=get_sample_step();vec4 occlusion_world_center;vec4 occlusion_projected_center; #ifdef PITCH_WITH_MAP float cantilevered_height=cantilevered_elevation(circle_center,radius,stroke_width,view_scale);occlusion_world_center=vec4(circle_center,cantilevered_height,1);occlusion_projected_center=u_matrix*occlusion_world_center; #else occlusion_world_center=world_center;occlusion_projected_center=projected_center; #endif for(int ring=0; ring < NUM_VISIBILITY_RINGS; ring++) {float scale=(float(ring)+1.0)/float(NUM_VISIBILITY_RINGS);for(int i=0; i < NUM_SAMPLES_PER_RING; i++) {vec2 extrusion=vec2(cos(step*float(i)),-sin(step*float(i)))*scale;vec4 frag_pos=project_vertex(extrusion,occlusion_world_center,occlusion_projected_center,radius,stroke_width,view_scale,surface_vectors);visibility+=float(!isOccluded(frag_pos));}}visibility/=float(NUM_VISIBILITY_RINGS)*float(NUM_SAMPLES_PER_RING); #else visibility=1.0; #endif #ifdef PROJECTION_GLOBE_VIEW visibility=1.0; #endif v_visibility=visibility;lowp float antialiasblur=1.0/u_device_pixel_ratio/(radius+stroke_width);v_data=vec3(extrude.x,extrude.y,antialiasblur); #ifdef FOG v_fog_pos=fog_position(world_center.xyz); #endif }`),clippingMask:gi("void main() {gl_FragColor=vec4(1.0);}","attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),heatmap:gi(`uniform highp float u_intensity;varying vec2 v_extrude; #pragma mapbox: define highp float weight #define GAUSS_COEF 0.3989422804014327 void main() { #pragma mapbox: initialize highp float weight float d=-0.5*3.0*3.0*dot(v_extrude,v_extrude);float val=weight*u_intensity*GAUSS_COEF*exp(d);gl_FragColor=vec4(val,1.0,1.0,1.0); #ifdef FOG if (u_is_globe==0) {gl_FragColor.r*=pow(1.0-fog_opacity(v_fog_pos),2.0);} #endif #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,`uniform mat4 u_matrix;uniform float u_extrude_scale;uniform float u_opacity;uniform float u_intensity;attribute vec2 a_pos; #ifdef PROJECTION_GLOBE_VIEW attribute vec3 a_pos_3;attribute vec3 a_pos_normal_3;uniform mat4 u_inv_rot_matrix;uniform vec2 u_merc_center;uniform vec3 u_tile_id;uniform float u_zoom_transition;uniform vec3 u_up_dir; #endif varying vec2 v_extrude; #pragma mapbox: define highp float weight #pragma mapbox: define mediump float radius const highp float ZERO=1.0/255.0/16.0; #define GAUSS_COEF 0.3989422804014327 void main(void) { #pragma mapbox: initialize highp float weight #pragma mapbox: initialize mediump float radius vec2 unscaled_extrude=vec2(mod(a_pos,2.0)*2.0-1.0);float S=sqrt(-2.0*log(ZERO/weight/u_intensity/GAUSS_COEF))/3.0;v_extrude=S*unscaled_extrude;vec2 extrude=v_extrude*radius*u_extrude_scale;vec2 tilePos=floor(a_pos*0.5);vec3 pos; #ifdef PROJECTION_GLOBE_VIEW vec3 pos_normal_3=a_pos_normal_3/16384.0;mat3 surface_vectors=globe_mercator_surface_vectors(pos_normal_3,u_up_dir,u_zoom_transition);vec3 surface_extrusion=extrude.x*surface_vectors[0]+extrude.y*surface_vectors[1];vec3 globe_elevation=elevationVector(tilePos)*elevation(tilePos);vec3 globe_pos=a_pos_3+surface_extrusion+globe_elevation;vec3 mercator_elevation=u_up_dir*u_tile_up_scale*elevation(tilePos);vec3 merc_pos=mercator_tile_position(u_inv_rot_matrix,tilePos,u_tile_id,u_merc_center)+surface_extrusion+mercator_elevation;pos=mix_globe_mercator(globe_pos,merc_pos,u_zoom_transition); #else pos=vec3(tilePos+extrude,elevation(tilePos)); #endif gl_Position=u_matrix*vec4(pos,1); #ifdef FOG v_fog_pos=fog_position(pos); #endif }`),heatmapTexture:gi(`uniform sampler2D u_image;uniform sampler2D u_color_ramp;uniform float u_opacity;varying vec2 v_pos;void main() {float t=texture2D(u_image,v_pos).r;vec4 color=texture2D(u_color_ramp,vec2(t,0.5));gl_FragColor=color*u_opacity; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(0.0); #endif }`,"attribute vec2 a_pos;varying vec2 v_pos;void main() {gl_Position=vec4(a_pos,0,1);v_pos=a_pos*0.5+0.5;}"),collisionBox:gi("varying float v_placed;varying float v_notUsed;void main() {vec4 red =vec4(1.0,0.0,0.0,1.0);vec4 blue=vec4(0.0,0.0,1.0,0.5);gl_FragColor =mix(red,blue,step(0.5,v_placed))*0.5;gl_FragColor*=mix(1.0,0.1,step(0.5,v_notUsed));}",`attribute vec3 a_pos;attribute vec2 a_anchor_pos;attribute vec2 a_extrude;attribute vec2 a_placed;attribute vec2 a_shift;attribute float a_size_scale;attribute vec2 a_padding;uniform mat4 u_matrix;uniform vec2 u_extrude_scale;uniform float u_camera_to_center_distance;varying float v_placed;varying float v_notUsed;void main() {vec4 projectedPoint=u_matrix*vec4(a_pos+elevationVector(a_anchor_pos)*elevation(a_anchor_pos),1);highp float camera_to_anchor_distance=projectedPoint.w;highp float collision_perspective_ratio=clamp( 0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,1.5);gl_Position=projectedPoint;gl_Position.xy+=(a_extrude*a_size_scale+a_shift+a_padding)*u_extrude_scale*gl_Position.w*collision_perspective_ratio;v_placed=a_placed.x;v_notUsed=a_placed.y;}`),collisionCircle:gi("varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;void main() {float alpha=0.5*min(v_perspective_ratio,1.0);float stroke_radius=0.9*max(v_perspective_ratio,1.0);float distance_to_center=length(v_extrude);float distance_to_edge=abs(distance_to_center-v_radius);float opacity_t=smoothstep(-stroke_radius,0.0,-distance_to_edge);vec4 color=mix(vec4(0.0,0.0,1.0,0.5),vec4(1.0,0.0,0.0,1.0),v_collision);gl_FragColor=color*alpha*opacity_t;}",`attribute vec2 a_pos_2f;attribute float a_radius;attribute vec2 a_flags;uniform mat4 u_matrix;uniform mat4 u_inv_matrix;uniform vec2 u_viewport_size;uniform float u_camera_to_center_distance;varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;vec3 toTilePosition(vec2 screenPos) {vec4 rayStart=u_inv_matrix*vec4(screenPos,-1.0,1.0);vec4 rayEnd =u_inv_matrix*vec4(screenPos, 1.0,1.0);rayStart.xyz/=rayStart.w;rayEnd.xyz /=rayEnd.w;highp float t=(0.0-rayStart.z)/(rayEnd.z-rayStart.z);return mix(rayStart.xyz,rayEnd.xyz,t);}void main() {vec2 quadCenterPos=a_pos_2f;float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2( mix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));vec2 quadVertexExtent=quadVertexOffset*radius;vec3 tilePos=toTilePosition(quadCenterPos);vec4 clipPos=u_matrix*vec4(tilePos,1.0);highp float camera_to_anchor_distance=clipPos.w;highp float collision_perspective_ratio=clamp( 0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_perspective_ratio=collision_perspective_ratio;v_collision=collision;gl_Position=vec4(clipPos.xyz/clipPos.w,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}`),debug:gi("uniform highp vec4 u_color;uniform sampler2D u_overlay;varying vec2 v_uv;void main() {vec4 overlay_color=texture2D(u_overlay,v_uv);gl_FragColor=mix(u_color,overlay_color,overlay_color.a);}",`attribute vec2 a_pos; #ifdef PROJECTION_GLOBE_VIEW attribute vec3 a_pos_3; #endif varying vec2 v_uv;uniform mat4 u_matrix;uniform float u_overlay_scale;void main() {float h=elevation(a_pos);v_uv=a_pos/8192.0; #ifdef PROJECTION_GLOBE_VIEW gl_Position=u_matrix*vec4(a_pos_3+elevationVector(a_pos)*h,1); #else gl_Position=u_matrix*vec4(a_pos*u_overlay_scale,h,1); #endif }`),fill:gi(`#pragma mapbox: define highp vec4 color #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize lowp float opacity vec4 out_color=color; #ifdef LIGHTING_3D_MODE out_color=apply_lighting(out_color); #endif #ifdef FOG out_color=fog_dither(fog_apply_premultiplied(out_color,v_fog_pos)); #endif gl_FragColor=out_color*opacity; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,`attribute vec2 a_pos;uniform mat4 u_matrix; #pragma mapbox: define highp vec4 color #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize lowp float opacity gl_Position=u_matrix*vec4(a_pos,0,1); #ifdef FOG v_fog_pos=fog_position(a_pos); #endif }`),fillOutline:gi(`varying vec2 v_pos; #pragma mapbox: define highp vec4 outline_color #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize highp vec4 outline_color #pragma mapbox: initialize lowp float opacity float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);vec4 out_color=outline_color; #ifdef LIGHTING_3D_MODE out_color=apply_lighting(out_color); #endif #ifdef FOG out_color=fog_dither(fog_apply_premultiplied(out_color,v_fog_pos)); #endif gl_FragColor=out_color*(alpha*opacity); #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,`attribute vec2 a_pos;uniform mat4 u_matrix;uniform vec2 u_world;varying vec2 v_pos; #pragma mapbox: define highp vec4 outline_color #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize highp vec4 outline_color #pragma mapbox: initialize lowp float opacity gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world; #ifdef FOG v_fog_pos=fog_position(a_pos); #endif }`),fillOutlinePattern:gi(`uniform vec2 u_texsize;uniform sampler2D u_image;varying vec2 v_pos;varying vec2 v_pos_world; #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp vec4 pattern void main() { #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize mediump vec4 pattern vec2 pattern_tl=pattern.xy;vec2 pattern_br=pattern.zw;vec2 imagecoord=mod(v_pos,1.0);vec2 pos=mix(pattern_tl/u_texsize,pattern_br/u_texsize,imagecoord);float dist=length(v_pos_world-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);vec4 out_color=texture2D(u_image,pos); #ifdef LIGHTING_3D_MODE out_color=apply_lighting(out_color); #endif #ifdef FOG out_color=fog_dither(fog_apply_premultiplied(out_color,v_fog_pos)); #endif gl_FragColor=out_color*(alpha*opacity); #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,`uniform mat4 u_matrix;uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_tile_units_to_pixels;attribute vec2 a_pos;varying vec2 v_pos;varying vec2 v_pos_world; #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp vec4 pattern #pragma mapbox: define lowp float pixel_ratio void main() { #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize mediump vec4 pattern #pragma mapbox: initialize lowp float pixel_ratio vec2 pattern_tl=pattern.xy;vec2 pattern_br=pattern.zw;gl_Position=u_matrix*vec4(a_pos,0,1);vec2 display_size=(pattern_br-pattern_tl)/pixel_ratio;v_pos=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,display_size,u_tile_units_to_pixels,a_pos);v_pos_world=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world; #ifdef FOG v_fog_pos=fog_position(a_pos); #endif }`),fillPattern:gi(`uniform vec2 u_texsize;uniform sampler2D u_image;varying vec2 v_pos; #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp vec4 pattern void main() { #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize mediump vec4 pattern vec2 pattern_tl=pattern.xy;vec2 pattern_br=pattern.zw;vec2 imagecoord=mod(v_pos,1.0);vec2 pos=mix(pattern_tl/u_texsize,pattern_br/u_texsize,imagecoord);vec4 out_color=texture2D(u_image,pos); #ifdef LIGHTING_3D_MODE out_color=apply_lighting(out_color); #endif #ifdef FOG out_color=fog_dither(fog_apply_premultiplied(out_color,v_fog_pos)); #endif gl_FragColor=out_color*opacity; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,`uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_tile_units_to_pixels;attribute vec2 a_pos;varying vec2 v_pos; #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp vec4 pattern #pragma mapbox: define lowp float pixel_ratio void main() { #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize mediump vec4 pattern #pragma mapbox: initialize lowp float pixel_ratio vec2 pattern_tl=pattern.xy;vec2 pattern_br=pattern.zw;vec2 display_size=(pattern_br-pattern_tl)/pixel_ratio;gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,display_size,u_tile_units_to_pixels,a_pos); #ifdef FOG v_fog_pos=fog_position(a_pos); #endif }`),fillExtrusion:gi(`varying vec4 v_color; #ifdef RENDER_SHADOWS varying highp vec4 v_pos_light_view_0;varying highp vec4 v_pos_light_view_1;varying float v_depth; #endif #ifdef FAUX_AO uniform lowp vec2 u_ao;varying vec3 v_ao; #endif #ifdef ZERO_ROOF_RADIUS varying vec4 v_roof_color; #endif #if defined(ZERO_ROOF_RADIUS) || defined(RENDER_SHADOWS) varying highp vec3 v_normal; #endif void main() { #if defined(ZERO_ROOF_RADIUS) || defined(RENDER_SHADOWS) vec3 normal=v_normal; #endif float z;vec4 color; #ifdef ZERO_ROOF_RADIUS z=float(normal.z > 0.00001);color=mix(v_color,v_roof_color,z); #else color=v_color; #endif #ifdef FAUX_AO float intensity=u_ao[0];float h=max(0.0,v_ao.z);float h_floors=h/u_ao[1];float y_shade=1.0-0.9*intensity*min(v_ao.y,1.0);float shade=(1.0-0.08*intensity)*(y_shade+(1.0-y_shade)*(1.0-pow(1.0-min(h_floors/16.0,1.0),16.0)))+0.08*intensity*min(h_floors/160.0,1.0);float concave=v_ao.x*v_ao.x; #ifdef ZERO_ROOF_RADIUS concave*=(1.0-z); #endif float x_shade=mix(1.0,mix(0.6,0.75,min(h_floors/30.0,1.0)),intensity)+0.1*intensity*min(h,1.0);shade*=mix(1.0,x_shade*x_shade*x_shade,concave);color.rgb=color.rgb*shade; #endif #ifdef RENDER_SHADOWS #ifdef ZERO_ROOF_RADIUS normal=mix(normal,vec3(0.0,0.0,1.0),z); #endif color.xyz=shadowed_color_normal(color.xyz,normalize(normal),v_pos_light_view_0,v_pos_light_view_1,v_depth); #endif #ifdef FOG color=fog_dither(fog_apply_premultiplied(color,v_fog_pos)); #endif gl_FragColor=color; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,`uniform mat4 u_matrix;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform float u_edge_radius;attribute vec4 a_pos_normal_ed;attribute vec2 a_centroid_pos; #ifdef PROJECTION_GLOBE_VIEW attribute vec3 a_pos_3;attribute vec3 a_pos_normal_3;uniform mat4 u_inv_rot_matrix;uniform vec2 u_merc_center;uniform vec3 u_tile_id;uniform float u_zoom_transition;uniform vec3 u_up_dir;uniform float u_height_lift; #endif varying vec4 v_color; #ifdef RENDER_SHADOWS uniform mat4 u_light_matrix_0;uniform mat4 u_light_matrix_1;varying highp vec4 v_pos_light_view_0;varying highp vec4 v_pos_light_view_1;varying float v_depth; #endif #ifdef ZERO_ROOF_RADIUS varying vec4 v_roof_color; #endif #if defined(ZERO_ROOF_RADIUS) || defined(RENDER_SHADOWS) varying highp vec3 v_normal; #endif #ifdef FAUX_AO uniform lowp vec2 u_ao;varying vec3 v_ao; #endif #pragma mapbox: define highp float base #pragma mapbox: define highp float height #pragma mapbox: define highp vec4 color void main() { #pragma mapbox: initialize highp float base #pragma mapbox: initialize highp float height #pragma mapbox: initialize highp vec4 color vec4 pos_nx=floor(a_pos_normal_ed*0.5);vec4 top_up_ny_start=a_pos_normal_ed-2.0*pos_nx;vec3 top_up_ny=top_up_ny_start.xyz;float x_normal=pos_nx.z/8192.0;vec3 normal=top_up_ny.y==1.0 ? vec3(0.0,0.0,1.0) : normalize(vec3(x_normal,(2.0*top_up_ny.z-1.0)*(1.0-abs(x_normal)),0.0)); #if defined(ZERO_ROOF_RADIUS) || defined(RENDER_SHADOWS) v_normal=normal; #endif base=max(0.0,base);height=max(0.0,top_up_ny.y==0.0 && top_up_ny.x==1.0 ? height-u_edge_radius : height);float t=top_up_ny.x;vec2 centroid_pos=vec2(0.0); #if defined(HAS_CENTROID) || defined(TERRAIN) centroid_pos=a_centroid_pos; #endif float ele=0.0;float h=0.0;float c_ele;vec3 pos; #ifdef TERRAIN bool flat_roof=centroid_pos.x !=0.0 && t > 0.0;ele=elevation(pos_nx.xy);c_ele=flat_roof ? centroid_pos.y==0.0 ? elevationFromUint16(centroid_pos.x) : flatElevation(centroid_pos) : ele;h=flat_roof ? max(c_ele+height,ele+base+2.0) : ele+(t > 0.0 ? height : base==0.0 ?-5.0 : base);pos=vec3(pos_nx.xy,h); #else h=t > 0.0 ? height : base;pos=vec3(pos_nx.xy,h); #endif #ifdef PROJECTION_GLOBE_VIEW float lift=float((t+base) > 0.0)*u_height_lift;h+=lift;vec3 globe_normal=normalize(mix(a_pos_normal_3/16384.0,u_up_dir,u_zoom_transition));vec3 globe_pos=a_pos_3+globe_normal*(u_tile_up_scale*h);vec3 merc_pos=mercator_tile_position(u_inv_rot_matrix,pos.xy,u_tile_id,u_merc_center)+u_up_dir*u_tile_up_scale*pos.z;pos=mix_globe_mercator(globe_pos,merc_pos,u_zoom_transition); #endif float hidden=float(centroid_pos.x==0.0 && centroid_pos.y==1.0);gl_Position=mix(u_matrix*vec4(pos,1),AWAY,hidden); #ifdef RENDER_SHADOWS v_pos_light_view_0=u_light_matrix_0*vec4(pos,1);v_pos_light_view_1=u_light_matrix_1*vec4(pos,1);v_depth=gl_Position.w; #endif float NdotL=0.0;float colorvalue=0.0; #ifdef LIGHTING_3D_MODE NdotL=calculate_NdotL(normal); #else colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;NdotL=clamp(dot(normal,u_lightpos),0.0,1.0);NdotL=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),NdotL); #endif if (normal.y !=0.0) {float r=0.84; #ifndef LIGHTING_3D_MODE r=mix(0.7,0.98,1.0-u_lightintensity); #endif NdotL*=( (1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),r,1.0)));}v_color=vec4(0.0,0.0,0.0,1.0); #ifdef FAUX_AO float concave=pos_nx.w-floor(pos_nx.w*0.5)*2.0;float start=top_up_ny_start.w;float y_ground=1.0-clamp(t+base,0.0,1.0);float top_height=height; #ifdef TERRAIN top_height=mix(max(c_ele+height,ele+base+2.0),ele+height,float(centroid_pos.x==0.0))-ele;y_ground+=y_ground*5.0/max(3.0,top_height); #endif v_ao=vec3(mix(concave,-concave,start),y_ground,h-ele);NdotL*=(1.0+0.05*(1.0-top_up_ny.y)*u_ao[0]); #ifdef PROJECTION_GLOBE_VIEW top_height+=u_height_lift; #endif gl_Position.z-=(0.0000006*(min(top_height,500.)+2.0*min(base,500.0)+60.0*concave+3.0*start))*gl_Position.w; #endif #ifdef LIGHTING_3D_MODE v_color=apply_lighting(color,NdotL); #else v_color.rgb+=clamp(color.rgb*NdotL*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0)); #endif v_color*=u_opacity; #ifdef ZERO_ROOF_RADIUS v_roof_color=vec4(0.0,0.0,0.0,1.0); #ifdef LIGHTING_3D_MODE v_roof_color=apply_lighting(color,calculate_NdotL(vec3(0.0,0.0,1.0))); #else float roofNdotL=clamp(u_lightpos.z,0.0,1.0);roofNdotL=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),roofNdotL);v_roof_color.rgb+=clamp(color.rgb*roofNdotL*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0)); #endif v_roof_color*=u_opacity; #endif #ifdef FOG v_fog_pos=fog_position(pos); #endif }`),fillExtrusionPattern:gi(`uniform vec2 u_texsize;uniform sampler2D u_image; #ifdef FAUX_AO uniform lowp vec2 u_ao;varying vec3 v_ao; #endif #ifdef LIGHTING_3D_MODE varying float v_NdotL; #endif varying vec2 v_pos;varying vec4 v_lighting;uniform lowp float u_opacity; #pragma mapbox: define lowp float base #pragma mapbox: define lowp float height #pragma mapbox: define lowp vec4 pattern #pragma mapbox: define lowp float pixel_ratio void main() { #pragma mapbox: initialize lowp float base #pragma mapbox: initialize lowp float height #pragma mapbox: initialize mediump vec4 pattern #pragma mapbox: initialize lowp float pixel_ratio vec2 pattern_tl=pattern.xy;vec2 pattern_br=pattern.zw;vec2 imagecoord=mod(v_pos,1.0);vec2 pos=mix(pattern_tl/u_texsize,pattern_br/u_texsize,imagecoord);vec4 out_color=texture2D(u_image,pos); #ifdef LIGHTING_3D_MODE out_color=apply_lighting(out_color,v_NdotL)*u_opacity; #else out_color=out_color*v_lighting; #endif #ifdef FAUX_AO float intensity=u_ao[0];float h=max(0.0,v_ao.z);float h_floors=h/u_ao[1];float y_shade=1.0-0.9*intensity*min(v_ao.y,1.0);float shade=(1.0-0.08*intensity)*(y_shade+(1.0-y_shade)*(1.0-pow(1.0-min(h_floors/16.0,1.0),16.0)))+0.08*intensity*min(h_floors/160.0,1.0);float concave=v_ao.x*v_ao.x;float x_shade=mix(1.0,mix(0.6,0.75,min(h_floors/30.0,1.0)),intensity)+0.1*intensity*min(h,1.0);shade*=mix(1.0,x_shade*x_shade*x_shade,concave);out_color.rgb=out_color.rgb*shade; #endif #ifdef FOG out_color=fog_dither(fog_apply_premultiplied(out_color,v_fog_pos)); #endif gl_FragColor=out_color; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,`uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform float u_tile_units_to_pixels;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;attribute vec4 a_pos_normal_ed;attribute vec2 a_centroid_pos; #ifdef PROJECTION_GLOBE_VIEW attribute vec3 a_pos_3;attribute vec3 a_pos_normal_3;uniform mat4 u_inv_rot_matrix;uniform vec2 u_merc_center;uniform vec3 u_tile_id;uniform float u_zoom_transition;uniform vec3 u_up_dir;uniform float u_height_lift; #endif varying vec2 v_pos;varying vec4 v_lighting; #ifdef FAUX_AO uniform lowp vec2 u_ao;varying vec3 v_ao; #endif #ifdef LIGHTING_3D_MODE varying float v_NdotL; #endif #pragma mapbox: define lowp float base #pragma mapbox: define lowp float height #pragma mapbox: define lowp vec4 pattern #pragma mapbox: define lowp float pixel_ratio void main() { #pragma mapbox: initialize lowp float base #pragma mapbox: initialize lowp float height #pragma mapbox: initialize mediump vec4 pattern #pragma mapbox: initialize lowp float pixel_ratio vec2 pattern_tl=pattern.xy;vec2 pattern_br=pattern.zw;vec4 pos_nx=floor(a_pos_normal_ed*0.5);mediump vec4 top_up_ny_start=a_pos_normal_ed-2.0*pos_nx;mediump vec3 top_up_ny=top_up_ny_start.xyz;float x_normal=pos_nx.z/8192.0;vec3 normal=top_up_ny.y==1.0 ? vec3(0.0,0.0,1.0) : normalize(vec3(x_normal,(2.0*top_up_ny.z-1.0)*(1.0-abs(x_normal)),0.0));float edgedistance=a_pos_normal_ed.w;vec2 display_size=(pattern_br-pattern_tl)/pixel_ratio;base=max(0.0,base);height=max(0.0,height);float t=top_up_ny.x;float z=t > 0.0 ? height : base;vec2 centroid_pos=vec2(0.0); #if defined(HAS_CENTROID) || defined(TERRAIN) centroid_pos=a_centroid_pos; #endif float ele=0.0;float h=z;vec3 p;float c_ele; #ifdef TERRAIN bool flat_roof=centroid_pos.x !=0.0 && t > 0.0;ele=elevation(pos_nx.xy);c_ele=flat_roof ? centroid_pos.y==0.0 ? elevationFromUint16(centroid_pos.x) : flatElevation(centroid_pos) : ele;h=flat_roof ? max(c_ele+height,ele+base+2.0) : ele+(t > 0.0 ? height : base==0.0 ?-5.0 : base);p=vec3(pos_nx.xy,h); #else p=vec3(pos_nx.xy,z); #endif #ifdef PROJECTION_GLOBE_VIEW float lift=float((t+base) > 0.0)*u_height_lift;h+=lift;vec3 globe_normal=normalize(mix(a_pos_normal_3/16384.0,u_up_dir,u_zoom_transition));vec3 globe_pos=a_pos_3+globe_normal*(u_tile_up_scale*(p.z+lift));vec3 merc_pos=mercator_tile_position(u_inv_rot_matrix,p.xy,u_tile_id,u_merc_center)+u_up_dir*u_tile_up_scale*p.z;p=mix_globe_mercator(globe_pos,merc_pos,u_zoom_transition); #endif float hidden=float(centroid_pos.x==0.0 && centroid_pos.y==1.0);gl_Position=mix(u_matrix*vec4(p,1),AWAY,hidden);vec2 pos=normal.z==1.0 ? pos_nx.xy : vec2(edgedistance,z*u_height_factor);v_pos=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,display_size,u_tile_units_to_pixels,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float NdotL=0.0; #ifdef LIGHTING_3D_MODE NdotL=calculate_NdotL(normal); #else NdotL=clamp(dot(normal,u_lightpos),0.0,1.0);NdotL=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),NdotL); #endif if (normal.y !=0.0) {float r=0.84; #ifndef LIGHTING_3D_MODE r=mix(0.7,0.98,1.0-u_lightintensity); #endif NdotL*=( (1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),r,1.0)));} #ifdef FAUX_AO float concave=pos_nx.w-floor(pos_nx.w*0.5)*2.0;float start=top_up_ny_start.w;float y_ground=1.0-clamp(t+base,0.0,1.0);float top_height=height; #ifdef TERRAIN top_height=mix(max(c_ele+height,ele+base+2.0),ele+height,float(centroid_pos.x==0.0))-ele;y_ground+=y_ground*5.0/max(3.0,top_height); #endif v_ao=vec3(mix(concave,-concave,start),y_ground,h-ele);NdotL*=(1.0+0.05*(1.0-top_up_ny.y)*u_ao[0]); #ifdef PROJECTION_GLOBE_VIEW top_height+=u_height_lift; #endif gl_Position.z-=(0.0000006*(min(top_height,500.)+2.0*min(base,500.0)+60.0*concave+3.0*start))*gl_Position.w; #endif #ifdef LIGHTING_3D_MODE v_NdotL=NdotL; #else v_lighting.rgb+=clamp(NdotL*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity; #endif #ifdef FOG v_fog_pos=fog_position(p); #endif }`),hillshadePrepare:gi(`#ifdef GL_ES precision highp float; #endif uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform vec4 u_unpack;float getElevation(vec2 coord) { #ifdef TERRAIN_DEM_FLOAT_FORMAT return texture2D(u_image,coord).a/4.0; #else vec4 data=texture2D(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack)/4.0; #endif }void main() {vec2 epsilon=1.0/u_dimension;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y));float b=getElevation(v_pos+vec2(0,-epsilon.y));float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y));float d=getElevation(v_pos+vec2(-epsilon.x,0));float e=getElevation(v_pos+vec2(epsilon.x,0));float f=getElevation(v_pos+vec2(-epsilon.x,epsilon.y));float g=getElevation(v_pos+vec2(0,epsilon.y));float h=getElevation(v_pos+vec2(epsilon.x,epsilon.y));float exaggerationFactor=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;float exaggeration=u_zoom < 15.0 ? (u_zoom-15.0)*exaggerationFactor : 0.0;vec2 deriv=vec2( (c+e+e+h)-(a+d+d+f),(f+g+g+h)-(a+b+b+c) )/pow(2.0,exaggeration+(19.2562-u_zoom));gl_FragColor=clamp(vec4( deriv.x/2.0+0.5,deriv.y/2.0+0.5,1.0,1.0),0.0,1.0); #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,"uniform mat4 u_matrix;uniform vec2 u_dimension;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}"),hillshade:gi(`uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_latrange;uniform vec2 u_light;uniform vec4 u_shadow;uniform vec4 u_highlight;uniform vec4 u_accent;void main() {vec4 pixel=texture2D(u_image,v_pos);vec2 deriv=((pixel.rg*2.0)-1.0);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));float slope=atan(1.25*length(deriv)/scaleFactor);float aspect=deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);float intensity=u_light.x;float azimuth=u_light.y+PI;float base=1.875-intensity*1.75;float maxValue=0.5*PI;float scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);float shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);vec4 shade_color=mix(u_shadow,u_highlight,shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);gl_FragColor=accent_color*(1.0-shade_color.a)+shade_color; #ifdef LIGHTING_3D_MODE gl_FragColor=apply_lighting(gl_FragColor); #endif #ifdef FOG gl_FragColor=fog_dither(fog_apply_premultiplied(gl_FragColor,v_fog_pos)); #endif #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,`uniform mat4 u_matrix;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=a_texture_pos/8192.0; #ifdef FOG v_fog_pos=fog_position(a_pos); #endif }`),line:gi(`uniform lowp float u_device_pixel_ratio;uniform float u_alpha_discard_threshold;uniform highp vec2 u_trim_offset;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;varying highp vec4 v_uv; #ifdef RENDER_LINE_DASH uniform sampler2D u_dash_image;varying vec2 v_tex; #endif #ifdef RENDER_LINE_GRADIENT uniform sampler2D u_gradient_image; #endif uniform float u_border_width;uniform vec4 u_border_color;float luminance(vec3 c) {return (c.r+c.r+c.b+c.g+c.g+c.g)*0.1667;} #pragma mapbox: define highp vec4 color #pragma mapbox: define lowp float floorwidth #pragma mapbox: define lowp vec4 dash #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity float linearstep(float edge0,float edge1,float x) {return clamp((x-edge0)/(edge1-edge0),0.0,1.0);}void main() { #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize lowp float floorwidth #pragma mapbox: initialize lowp vec4 dash #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0); #ifdef RENDER_LINE_DASH float sdfdist=texture2D(u_dash_image,v_tex).a;float sdfgamma=1.0/(2.0*u_device_pixel_ratio)/dash.z;alpha*=linearstep(0.5-sdfgamma/floorwidth,0.5+sdfgamma/floorwidth,sdfdist); #endif highp vec4 out_color; #ifdef RENDER_LINE_GRADIENT out_color=texture2D(u_gradient_image,v_uv.xy); #else out_color=color; #endif float trimmed=1.0; #ifdef RENDER_LINE_TRIM_OFFSET highp float start=v_uv[2];highp float end=v_uv[3];highp float trim_start=u_trim_offset[0];highp float trim_end=u_trim_offset[1];highp float line_progress=(start+(v_uv.x)*(end-start));if (trim_end > trim_start) {if (line_progress <=trim_end && line_progress >=trim_start) {out_color=vec4(0,0,0,0);trimmed=0.0;}} #endif #ifdef LIGHTING_3D_MODE out_color=apply_lighting(out_color); #endif #ifdef FOG out_color=fog_dither(fog_apply_premultiplied(out_color,v_fog_pos)); #endif #ifdef RENDER_LINE_ALPHA_DISCARD if (alpha < u_alpha_discard_threshold) {discard;} #endif #ifdef RENDER_LINE_BORDER float edgeBlur=(u_border_width+1.0/u_device_pixel_ratio);float alpha2=clamp(min(dist-(v_width2.t-edgeBlur),v_width2.s-dist)/edgeBlur,0.0,1.0);if (alpha2 < 1.) {float smoothAlpha=smoothstep(0.6,1.0,alpha2); #ifdef RENDER_LINE_BORDER_AUTO float Y=(out_color.a > 0.01) ? luminance(out_color.rgb/out_color.a) : 1.;float adjustment=(Y > 0.) ? 0.5/Y : 0.45;if (out_color.a > 0.25 && Y < 0.25) {vec3 borderColor=(Y > 0.) ? out_color.rgb : vec3(1,1,1)*out_color.a;out_color.rgb=out_color.rgb+borderColor*(adjustment*(1.0-smoothAlpha));} else {out_color.rgb*=(0.6 +0.4*smoothAlpha);} #else out_color.rgb=mix(u_border_color.rgb*u_border_color.a*trimmed,out_color.rgb,smoothAlpha); #endif } #endif gl_FragColor=out_color*(alpha*opacity); #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,` #define EXTRUDE_SCALE 0.015873016 attribute vec2 a_pos_normal;attribute vec4 a_data; #if defined(RENDER_LINE_GRADIENT) || defined(RENDER_LINE_TRIM_OFFSET) attribute highp vec4 a_packed; #endif #ifdef RENDER_LINE_DASH attribute float a_linesofar; #endif uniform mat4 u_matrix;uniform mat2 u_pixels_to_tile_units;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp vec4 v_uv; #ifdef RENDER_LINE_DASH uniform vec2 u_texsize;uniform float u_tile_units_to_pixels;varying vec2 v_tex; #endif #ifdef RENDER_LINE_GRADIENT uniform float u_image_height; #endif #pragma mapbox: define highp vec4 color #pragma mapbox: define lowp float floorwidth #pragma mapbox: define lowp vec4 dash #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity #pragma mapbox: define mediump float gapwidth #pragma mapbox: define lowp float offset #pragma mapbox: define mediump float width void main() { #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize lowp float floorwidth #pragma mapbox: initialize lowp vec4 dash #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize mediump float gapwidth #pragma mapbox: initialize lowp float offset #pragma mapbox: initialize mediump float width float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*EXTRUDE_SCALE;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*EXTRUDE_SCALE*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist*u_pixels_to_tile_units,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2*u_pixels_to_tile_units,0.0,1.0)+projected_extrude; #ifndef RENDER_TO_TEXTURE float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; #else v_gamma_scale=1.0; #endif #if defined(RENDER_LINE_GRADIENT) || defined(RENDER_LINE_TRIM_OFFSET) float a_uv_x=a_packed[0];float a_split_index=a_packed[1];highp float a_clip_start=a_packed[2];highp float a_clip_end=a_packed[3]; #ifdef RENDER_LINE_GRADIENT highp float texel_height=1.0/u_image_height;highp float half_texel_height=0.5*texel_height;v_uv=vec4(a_uv_x,a_split_index*texel_height-half_texel_height,a_clip_start,a_clip_end); #else v_uv=vec4(a_uv_x,0.0,a_clip_start,a_clip_end); #endif #endif #ifdef RENDER_LINE_DASH float scale=dash.z==0.0 ? 0.0 : u_tile_units_to_pixels/dash.z;float height=dash.y;v_tex=vec2(a_linesofar*scale/floorwidth,(-normal.y*height+dash.x+0.5)/u_texsize.y); #endif v_width2=vec2(outset,inset); #ifdef FOG v_fog_pos=fog_position(pos); #endif }`),linePattern:gi(`uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_tile_units_to_pixels;uniform sampler2D u_image;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width; #pragma mapbox: define lowp vec4 pattern #pragma mapbox: define lowp float pixel_ratio #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize mediump vec4 pattern #pragma mapbox: initialize lowp float pixel_ratio #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity vec2 pattern_tl=pattern.xy;vec2 pattern_br=pattern.zw;vec2 display_size=(pattern_br-pattern_tl)/pixel_ratio;vec2 pattern_size=vec2(display_size.x/u_tile_units_to_pixels,display_size.y);float aspect=display_size.y/v_width;float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x=mod(v_linesofar/pattern_size.x*aspect,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos=mix(pattern_tl*texel_size-texel_size,pattern_br*texel_size+texel_size,vec2(x,y));vec4 color=texture2D(u_image,pos); #ifdef LIGHTING_3D_MODE color=apply_lighting(color); #endif #ifdef FOG color=fog_dither(fog_apply_premultiplied(color,v_fog_pos)); #endif gl_FragColor=color*(alpha*opacity); #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,` #define scale 0.015873016 attribute vec2 a_pos_normal;attribute vec4 a_data;attribute float a_linesofar;uniform mat4 u_matrix;uniform vec2 u_units_to_pixels;uniform mat2 u_pixels_to_tile_units;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width; #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp float offset #pragma mapbox: define mediump float gapwidth #pragma mapbox: define mediump float width #pragma mapbox: define lowp float floorwidth #pragma mapbox: define lowp vec4 pattern #pragma mapbox: define lowp float pixel_ratio void main() { #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize lowp float offset #pragma mapbox: initialize mediump float gapwidth #pragma mapbox: initialize mediump float width #pragma mapbox: initialize lowp float floorwidth #pragma mapbox: initialize mediump vec4 pattern #pragma mapbox: initialize lowp float pixel_ratio float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist*u_pixels_to_tile_units,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2*u_pixels_to_tile_units,0.0,1.0)+projected_extrude; #ifndef RENDER_TO_TEXTURE float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; #else v_gamma_scale=1.0; #endif v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth; #ifdef FOG v_fog_pos=fog_position(pos); #endif }`),raster:gi(`uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;varying vec2 v_pos0;varying vec2 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture2D(u_image0,v_pos0);vec4 color1=texture2D(u_image1,v_pos1);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3( dot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);vec3 out_color=mix(u_high_vec,u_low_vec,rgb); #ifdef LIGHTING_3D_MODE out_color=apply_lighting(out_color); #endif #ifdef FOG out_color=fog_dither(fog_apply(out_color,v_fog_pos)); #endif gl_FragColor=vec4(out_color*color.a,color.a); #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,`uniform mat4 u_matrix;uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform vec2 u_perspective_transform;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos0;varying vec2 v_pos1;void main() {float w=1.0+dot(a_texture_pos,u_perspective_transform);gl_Position=u_matrix*vec4(a_pos*w,0,w);v_pos0=a_texture_pos/8192.0;v_pos1=(v_pos0*u_scale_parent)+u_tl_parent; #ifdef FOG v_fog_pos=fog_position(a_pos); #endif }`),symbolIcon:gi(`uniform sampler2D u_texture;varying vec2 v_tex;varying float v_fade_opacity; #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize lowp float opacity lowp float alpha=opacity*v_fade_opacity;gl_FragColor=texture2D(u_texture,v_tex)*alpha; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,`attribute vec4 a_pos_offset;attribute vec4 a_tex_size;attribute vec4 a_pixeloffset;attribute vec4 a_projected_pos;attribute float a_fade_opacity; #ifdef PROJECTION_GLOBE_VIEW attribute vec3 a_globe_anchor;attribute vec3 a_globe_normal; #endif uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;uniform vec3 u_up_vector; #ifdef PROJECTION_GLOBE_VIEW uniform vec3 u_tile_id;uniform mat4 u_inv_rot_matrix;uniform vec2 u_merc_center;uniform vec3 u_camera_forward;uniform float u_zoom_transition;uniform vec3 u_ecef_origin;uniform mat4 u_tile_matrix; #endif varying vec2 v_tex;varying float v_fade_opacity; #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize lowp float opacity vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_tex_size.xy;vec2 a_size=a_tex_size.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_min_font_scale=a_pixeloffset.zw/256.0;highp float segment_angle=-a_projected_pos[3];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 tile_anchor=a_pos;vec3 h=elevationVector(tile_anchor)*elevation(tile_anchor);float globe_occlusion_fade;vec3 world_pos;vec3 mercator_pos; #ifdef PROJECTION_GLOBE_VIEW mercator_pos=mercator_tile_position(u_inv_rot_matrix,tile_anchor,u_tile_id,u_merc_center);world_pos=mix_globe_mercator(a_globe_anchor+h,mercator_pos,u_zoom_transition);vec4 ecef_point=u_tile_matrix*vec4(world_pos,1.0);vec3 origin_to_point=ecef_point.xyz-u_ecef_origin;globe_occlusion_fade=dot(origin_to_point,u_camera_forward) >=0.0 ? 0.0 : 1.0; #else world_pos=vec3(tile_anchor,0)+h;globe_occlusion_fade=1.0; #endif vec4 projected_point=u_matrix*vec4(world_pos,1);highp float camera_to_anchor_distance=projected_point.w;highp float distance_ratio=u_pitch_with_map ? camera_to_anchor_distance/u_camera_to_center_distance : u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp( 0.5+0.5*distance_ratio,0.0,1.5);size*=perspective_ratio;float font_scale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjected_point; #ifdef PROJECTION_GLOBE_VIEW vec3 displacement=vec3(a_globe_normal.z,0,-a_globe_normal.x);offsetProjected_point=u_matrix*vec4(a_globe_anchor+displacement,1); #else offsetProjected_point=u_matrix*vec4(tile_anchor+vec2(1,0),0,1); #endif vec2 a=projected_point.xy/projected_point.w;vec2 b=offsetProjected_point.xy/offsetProjected_point.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}vec4 projected_pos; #ifdef PROJECTION_GLOBE_VIEW vec3 proj_pos=mix_globe_mercator(a_projected_pos.xyz+h,mercator_pos,u_zoom_transition);projected_pos=u_label_plane_matrix*vec4(proj_pos,1.0); #else projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,h.z,1.0); #endif highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);float z=0.0;vec2 offset=rotation_matrix*(a_offset/32.0*max(a_min_font_scale,font_scale)+a_pxoffset/16.0); #ifdef TERRAIN #ifdef PITCH_WITH_MAP_TERRAIN vec4 tile_pos=u_label_plane_matrix_inv*vec4(a_projected_pos.xy+offset,0.0,1.0);z=elevation(tile_pos.xy); #endif #endif float occlusion_fade=occlusionFade(projected_point)*globe_occlusion_fade; #ifdef PROJECTION_GLOBE_VIEW vec3 xAxis=u_pitch_with_map ? normalize(cross(a_globe_normal,u_up_vector)) : vec3(1,0,0);vec3 yAxis=u_pitch_with_map ? normalize(cross(a_globe_normal,xAxis)) : vec3(0,1,0);gl_Position=mix(u_coord_matrix*vec4(projected_pos.xyz/projected_pos.w+xAxis*offset.x+yAxis*offset.y,1.0),AWAY,float(projected_point.w <=0.0 || occlusion_fade==0.0)); #else gl_Position=mix(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+offset,z,1.0),AWAY,float(projected_point.w <=0.0 || occlusion_fade==0.0)); #endif float projection_transition_fade=1.0; #if defined(PROJECTED_POS_ON_VIEWPORT) && defined(PROJECTION_GLOBE_VIEW) projection_transition_fade=1.0-step(EPSILON,u_zoom_transition); #endif v_tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;v_fade_opacity=max(0.0,min(occlusion_fade,fade_opacity[0]+fade_change))*projection_transition_fade;}`),symbolSDF:gi(`#define SDF_PX 8.0 uniform bool u_is_halo;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;uniform bool u_is_text;varying vec2 v_data0;varying vec3 v_data1; #pragma mapbox: define highp vec4 fill_color #pragma mapbox: define highp vec4 halo_color #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp float halo_width #pragma mapbox: define lowp float halo_blur void main() { #pragma mapbox: initialize highp vec4 fill_color #pragma mapbox: initialize highp vec4 halo_color #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize lowp float halo_width #pragma mapbox: initialize lowp float halo_blur float EDGE_GAMMA=0.105/u_device_pixel_ratio;vec2 tex=v_data0.xy;float gamma_scale=v_data1.x;float size=v_data1.y;float fade_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity); #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,`attribute vec4 a_pos_offset;attribute vec4 a_tex_size;attribute vec4 a_pixeloffset;attribute vec4 a_projected_pos;attribute float a_fade_opacity; #ifdef PROJECTION_GLOBE_VIEW attribute vec3 a_globe_anchor;attribute vec3 a_globe_normal; #endif uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec3 u_up_vector; #ifdef PROJECTION_GLOBE_VIEW uniform vec3 u_tile_id;uniform mat4 u_inv_rot_matrix;uniform vec2 u_merc_center;uniform vec3 u_camera_forward;uniform float u_zoom_transition;uniform vec3 u_ecef_origin;uniform mat4 u_tile_matrix; #endif varying vec2 v_data0;varying vec3 v_data1; #pragma mapbox: define highp vec4 fill_color #pragma mapbox: define highp vec4 halo_color #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp float halo_width #pragma mapbox: define lowp float halo_blur void main() { #pragma mapbox: initialize highp vec4 fill_color #pragma mapbox: initialize highp vec4 halo_color #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize lowp float halo_width #pragma mapbox: initialize lowp float halo_blur vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_tex_size.xy;vec2 a_size=a_tex_size.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;highp float segment_angle=-a_projected_pos[3];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 tile_anchor=a_pos;vec3 h=elevationVector(tile_anchor)*elevation(tile_anchor);float globe_occlusion_fade;vec3 world_pos;vec3 mercator_pos; #ifdef PROJECTION_GLOBE_VIEW mercator_pos=mercator_tile_position(u_inv_rot_matrix,tile_anchor,u_tile_id,u_merc_center);world_pos=mix_globe_mercator(a_globe_anchor+h,mercator_pos,u_zoom_transition);vec4 ecef_point=u_tile_matrix*vec4(world_pos,1.0);vec3 origin_to_point=ecef_point.xyz-u_ecef_origin;globe_occlusion_fade=dot(origin_to_point,u_camera_forward) >=0.0 ? 0.0 : 1.0; #else world_pos=vec3(tile_anchor,0)+h;globe_occlusion_fade=1.0; #endif vec4 projected_point=u_matrix*vec4(world_pos,1);highp float camera_to_anchor_distance=projected_point.w;highp float distance_ratio=u_pitch_with_map ? camera_to_anchor_distance/u_camera_to_center_distance : u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp( 0.5+0.5*distance_ratio,0.0,1.5);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetprojected_point; #ifdef PROJECTION_GLOBE_VIEW vec3 displacement=vec3(a_globe_normal.z,0,-a_globe_normal.x);offsetprojected_point=u_matrix*vec4(a_globe_anchor+displacement,1); #else offsetprojected_point=u_matrix*vec4(tile_anchor+vec2(1,0),0,1); #endif vec2 a=projected_point.xy/projected_point.w;vec2 b=offsetprojected_point.xy/offsetprojected_point.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}vec4 projected_pos; #ifdef PROJECTION_GLOBE_VIEW vec3 proj_pos=mix_globe_mercator(a_projected_pos.xyz+h,mercator_pos,u_zoom_transition);projected_pos=u_label_plane_matrix*vec4(proj_pos,1.0); #else projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,h.z,1.0); #endif highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);float z=0.0;vec2 offset=rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset); #ifdef TERRAIN #ifdef PITCH_WITH_MAP_TERRAIN vec4 tile_pos=u_label_plane_matrix_inv*vec4(a_projected_pos.xy+offset,0.0,1.0);z=elevation(tile_pos.xy); #endif #endif float occlusion_fade=occlusionFade(projected_point)*globe_occlusion_fade; #ifdef PROJECTION_GLOBE_VIEW vec3 xAxis=u_pitch_with_map ? normalize(cross(a_globe_normal,u_up_vector)) : vec3(1,0,0);vec3 yAxis=u_pitch_with_map ? normalize(cross(a_globe_normal,xAxis)) : vec3(0,1,0);gl_Position=mix(u_coord_matrix*vec4(projected_pos.xyz/projected_pos.w+xAxis*offset.x+yAxis*offset.y,1.0),AWAY,float(projected_point.w <=0.0 || occlusion_fade==0.0)); #else gl_Position=mix(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+offset,z,1.0),AWAY,float(projected_point.w <=0.0 || occlusion_fade==0.0)); #endif float gamma_scale=gl_Position.w;float projection_transition_fade=1.0; #if defined(PROJECTED_POS_ON_VIEWPORT) && defined(PROJECTION_GLOBE_VIEW) projection_transition_fade=1.0-step(EPSILON,u_zoom_transition); #endif vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(occlusion_fade,fade_opacity[0]+fade_change));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity*projection_transition_fade);}`),symbolTextAndIcon:gi(`#define SDF_PX 8.0 #define SDF 1.0 #define ICON 0.0 uniform bool u_is_halo;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;varying vec4 v_data0;varying vec4 v_data1; #pragma mapbox: define highp vec4 fill_color #pragma mapbox: define highp vec4 halo_color #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp float halo_width #pragma mapbox: define lowp float halo_blur void main() { #pragma mapbox: initialize highp vec4 fill_color #pragma mapbox: initialize highp vec4 halo_color #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize lowp float halo_width #pragma mapbox: initialize lowp float halo_blur float fade_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;gl_FragColor=texture2D(u_texture_icon,tex_icon)*alpha; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif return;}vec2 tex=v_data0.xy;float EDGE_GAMMA=0.105/u_device_pixel_ratio;float gamma_scale=v_data1.x;float size=v_data1.y;float fontScale=size/24.0;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity); #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,`attribute vec4 a_pos_offset;attribute vec4 a_tex_size;attribute vec4 a_projected_pos;attribute float a_fade_opacity; #ifdef PROJECTION_GLOBE_VIEW attribute vec3 a_globe_anchor;attribute vec3 a_globe_normal; #endif uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec3 u_up_vector;uniform vec2 u_texsize_icon; #ifdef PROJECTION_GLOBE_VIEW uniform vec3 u_tile_id;uniform mat4 u_inv_rot_matrix;uniform vec2 u_merc_center;uniform vec3 u_camera_forward;uniform float u_zoom_transition;uniform vec3 u_ecef_origin;uniform mat4 u_tile_matrix; #endif varying vec4 v_data0;varying vec4 v_data1; #pragma mapbox: define highp vec4 fill_color #pragma mapbox: define highp vec4 halo_color #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp float halo_width #pragma mapbox: define lowp float halo_blur void main() { #pragma mapbox: initialize highp vec4 fill_color #pragma mapbox: initialize highp vec4 halo_color #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize lowp float halo_width #pragma mapbox: initialize lowp float halo_blur vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_tex_size.xy;vec2 a_size=a_tex_size.zw;float a_size_min=floor(a_size[0]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;highp float segment_angle=-a_projected_pos[3];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 tile_anchor=a_pos;vec3 h=elevationVector(tile_anchor)*elevation(tile_anchor);float globe_occlusion_fade;vec3 world_pos;vec3 mercator_pos; #ifdef PROJECTION_GLOBE_VIEW mercator_pos=mercator_tile_position(u_inv_rot_matrix,tile_anchor,u_tile_id,u_merc_center);world_pos=mix_globe_mercator(a_globe_anchor+h,mercator_pos,u_zoom_transition);vec4 ecef_point=u_tile_matrix*vec4(world_pos,1.0);vec3 origin_to_point=ecef_point.xyz-u_ecef_origin;globe_occlusion_fade=dot(origin_to_point,u_camera_forward) >=0.0 ? 0.0 : 1.0; #else world_pos=vec3(tile_anchor,0)+h;globe_occlusion_fade=1.0; #endif vec4 projected_point=u_matrix*vec4(world_pos,1);highp float camera_to_anchor_distance=projected_point.w;highp float distance_ratio=u_pitch_with_map ? camera_to_anchor_distance/u_camera_to_center_distance : u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp( 0.5+0.5*distance_ratio,0.0,1.5);size*=perspective_ratio;float font_scale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offset_projected_point=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projected_point.xy/projected_point.w;vec2 b=offset_projected_point.xy/offset_projected_point.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}vec4 projected_pos; #ifdef PROJECTION_GLOBE_VIEW vec3 proj_pos=mix_globe_mercator(a_projected_pos.xyz+h,mercator_pos,u_zoom_transition);projected_pos=u_label_plane_matrix*vec4(proj_pos,1.0); #else projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,h.z,1.0); #endif highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);float z=0.0;vec2 offset=rotation_matrix*(a_offset/32.0*font_scale); #ifdef TERRAIN #ifdef PITCH_WITH_MAP_TERRAIN vec4 tile_pos=u_label_plane_matrix_inv*vec4(a_projected_pos.xy+offset,0.0,1.0);z=elevation(tile_pos.xy); #endif #endif float occlusion_fade=occlusionFade(projected_point)*globe_occlusion_fade; #ifdef PROJECTION_GLOBE_VIEW vec3 xAxis=u_pitch_with_map ? normalize(cross(a_globe_normal,u_up_vector)) : vec3(1,0,0);vec3 yAxis=u_pitch_with_map ? normalize(cross(a_globe_normal,xAxis)) : vec3(0,1,0);gl_Position=mix(u_coord_matrix*vec4(projected_pos.xyz/projected_pos.w+xAxis*offset.x+yAxis*offset.y,1.0),AWAY,float(projected_point.w <=0.0 || occlusion_fade==0.0)); #else gl_Position=mix(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+offset,z,1.0),AWAY,float(projected_point.w <=0.0 || occlusion_fade==0.0)); #endif float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(occlusion_fade,fade_opacity[0]+fade_change));float projection_transition_fade=1.0; #if defined(PROJECTED_POS_ON_VIEWPORT) && defined(PROJECTION_GLOBE_VIEW) projection_transition_fade=1.0-step(EPSILON,u_zoom_transition); #endif v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity*projection_transition_fade,is_sdf);}`),terrainRaster:gi(`uniform sampler2D u_image0;varying vec2 v_pos0; #ifdef FOG varying float v_fog_opacity; #endif #ifdef RENDER_SHADOWS varying vec4 v_pos_light_view_0;varying vec4 v_pos_light_view_1;varying float v_depth; #endif void main() {vec4 color=texture2D(u_image0,v_pos0); #ifdef RENDER_SHADOWS color.xyz=shadowed_color(color.xyz,v_pos_light_view_0,v_pos_light_view_1,v_depth); #endif #ifdef FOG #ifdef ZERO_EXAGGERATION color=fog_dither(fog_apply_premultiplied(color,v_fog_pos)); #else color=fog_dither(fog_apply_from_vert(color,v_fog_opacity)); #endif #endif gl_FragColor=color; #ifdef TERRAIN_WIREFRAME gl_FragColor=vec4(1.0,0.0,0.0,0.8); #endif #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,`uniform mat4 u_matrix;uniform float u_skirt_height;attribute vec2 a_pos;varying vec2 v_pos0; #ifdef FOG varying float v_fog_opacity; #endif #ifdef RENDER_SHADOWS uniform mat4 u_light_matrix_0;uniform mat4 u_light_matrix_1;varying vec4 v_pos_light_view_0;varying vec4 v_pos_light_view_1;varying float v_depth; #endif const float wireframeOffset=0.00015;void main() {vec3 decomposedPosAndSkirt=decomposeToPosAndSkirt(a_pos);float skirt=decomposedPosAndSkirt.z;vec2 decodedPos=decomposedPosAndSkirt.xy;float elevation=elevation(decodedPos)-skirt*u_skirt_height; #ifdef TERRAIN_WIREFRAME elevation+=wireframeOffset; #endif v_pos0=decodedPos/8192.0;gl_Position=u_matrix*vec4(decodedPos,elevation,1.0); #ifdef FOG #ifdef ZERO_EXAGGERATION v_fog_pos=fog_position(decodedPos); #else v_fog_opacity=fog(fog_position(vec3(decodedPos,elevation))); #endif #endif #ifdef RENDER_SHADOWS vec3 pos=vec3(decodedPos,elevation);v_pos_light_view_0=u_light_matrix_0*vec4(pos,1.);v_pos_light_view_1=u_light_matrix_1*vec4(pos,1.);v_depth=gl_Position.w; #endif }`),terrainDepth:gi(`#ifdef GL_ES precision highp float; #endif varying float v_depth;void main() {gl_FragColor=pack_depth(v_depth);}`,"uniform mat4 u_matrix;attribute vec2 a_pos;varying float v_depth;void main() {float elevation=elevation(a_pos);gl_Position=u_matrix*vec4(a_pos,elevation,1.0);v_depth=gl_Position.z/gl_Position.w;}"),skybox:gi(` varying lowp vec3 v_uv;uniform lowp samplerCube u_cubemap;uniform lowp float u_opacity;uniform highp float u_temporal_offset;uniform highp vec3 u_sun_direction;float sun_disk(highp vec3 ray_direction,highp vec3 sun_direction) {highp float cos_angle=dot(normalize(ray_direction),sun_direction);const highp float cos_sun_angular_diameter=0.99996192306;const highp float smoothstep_delta=1e-5;return smoothstep( cos_sun_angular_diameter-smoothstep_delta,cos_sun_angular_diameter+smoothstep_delta,cos_angle);}float map(float value,float start,float end,float new_start,float new_end) {return ((value-start)*(new_end-new_start))/(end-start)+new_start;}void main() {vec3 uv=v_uv;const float y_bias=0.015;uv.y+=y_bias;uv.y=pow(abs(uv.y),1.0/5.0);uv.y=map(uv.y,0.0,1.0,-1.0,1.0);vec3 sky_color=textureCube(u_cubemap,uv).rgb; #ifdef FOG sky_color=fog_apply_sky_gradient(v_uv.xzy,sky_color); #endif sky_color.rgb=dither(sky_color.rgb,gl_FragCoord.xy+u_temporal_offset);sky_color+=0.1*sun_disk(v_uv,u_sun_direction);gl_FragColor=vec4(sky_color*u_opacity,u_opacity); #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,Gl),skyboxGradient:gi(`varying highp vec3 v_uv;uniform lowp sampler2D u_color_ramp;uniform highp vec3 u_center_direction;uniform lowp float u_radius;uniform lowp float u_opacity;uniform highp float u_temporal_offset;void main() {float progress=acos(dot(normalize(v_uv),u_center_direction))/u_radius;vec4 color=texture2D(u_color_ramp,vec2(progress,0.5)); #ifdef FOG color.rgb=fog_apply_sky_gradient(v_uv.xzy,color.rgb/color.a)*color.a; #endif color*=u_opacity;color.rgb=dither(color.rgb,gl_FragCoord.xy+u_temporal_offset);gl_FragColor=color; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,Gl),skyboxCapture:gi(` varying highp vec3 v_position;uniform highp float u_sun_intensity;uniform highp float u_luminance;uniform lowp vec3 u_sun_direction;uniform highp vec4 u_color_tint_r;uniform highp vec4 u_color_tint_m; #ifdef GL_ES precision highp float; #endif #define BETA_R vec3(5.5e-6,13.0e-6,22.4e-6) #define BETA_M vec3(21e-6,21e-6,21e-6) #define MIE_G 0.76 #define DENSITY_HEIGHT_SCALE_R 8000.0 #define DENSITY_HEIGHT_SCALE_M 1200.0 #define PLANET_RADIUS 6360e3 #define ATMOSPHERE_RADIUS 6420e3 #define SAMPLE_STEPS 10 #define DENSITY_STEPS 4 float ray_sphere_exit(vec3 orig,vec3 dir,float radius) {float a=dot(dir,dir);float b=2.0*dot(dir,orig);float c=dot(orig,orig)-radius*radius;float d=sqrt(b*b-4.0*a*c);return (-b+d)/(2.0*a);}vec3 extinction(vec2 density) {return exp(-vec3(BETA_R*u_color_tint_r.a*density.x+BETA_M*u_color_tint_m.a*density.y));}vec2 local_density(vec3 point) {float height=max(length(point)-PLANET_RADIUS,0.0);float exp_r=exp(-height/DENSITY_HEIGHT_SCALE_R);float exp_m=exp(-height/DENSITY_HEIGHT_SCALE_M);return vec2(exp_r,exp_m);}float phase_ray(float cos_angle) {return (3.0/(16.0*PI))*(1.0+cos_angle*cos_angle);}float phase_mie(float cos_angle) {return (3.0/(8.0*PI))*((1.0-MIE_G*MIE_G)*(1.0+cos_angle*cos_angle))/((2.0+MIE_G*MIE_G)*pow(1.0+MIE_G*MIE_G-2.0*MIE_G*cos_angle,1.5));}vec2 density_to_atmosphere(vec3 point,vec3 light_dir) {float ray_len=ray_sphere_exit(point,light_dir,ATMOSPHERE_RADIUS);float step_len=ray_len/float(DENSITY_STEPS);vec2 density_point_to_atmosphere=vec2(0.0);for (int i=0; i < DENSITY_STEPS;++i) {vec3 point_on_ray=point+light_dir*((float(i)+0.5)*step_len);density_point_to_atmosphere+=local_density(point_on_ray)*step_len;;}return density_point_to_atmosphere;}vec3 atmosphere(vec3 ray_dir,vec3 sun_direction,float sun_intensity) {vec2 density_orig_to_point=vec2(0.0);vec3 scatter_r=vec3(0.0);vec3 scatter_m=vec3(0.0);vec3 origin=vec3(0.0,PLANET_RADIUS,0.0);float ray_len=ray_sphere_exit(origin,ray_dir,ATMOSPHERE_RADIUS);float step_len=ray_len/float(SAMPLE_STEPS);for (int i=0; i < SAMPLE_STEPS;++i) {vec3 point_on_ray=origin+ray_dir*((float(i)+0.5)*step_len);vec2 density=local_density(point_on_ray)*step_len;density_orig_to_point+=density;vec2 density_point_to_atmosphere=density_to_atmosphere(point_on_ray,sun_direction);vec2 density_orig_to_atmosphere=density_orig_to_point+density_point_to_atmosphere;vec3 extinction=extinction(density_orig_to_atmosphere);scatter_r+=density.x*extinction;scatter_m+=density.y*extinction;}float cos_angle=dot(ray_dir,sun_direction);float phase_r=phase_ray(cos_angle);float phase_m=phase_mie(cos_angle);vec3 beta_r=BETA_R*u_color_tint_r.rgb*u_color_tint_r.a;vec3 beta_m=BETA_M*u_color_tint_m.rgb*u_color_tint_m.a;return (scatter_r*phase_r*beta_r+scatter_m*phase_m*beta_m)*sun_intensity;}const float A=0.15;const float B=0.50;const float C=0.10;const float D=0.20;const float E=0.02;const float F=0.30;vec3 uncharted2_tonemap(vec3 x) {return ((x*(A*x+C*B)+D*E)/(x*(A*x+B)+D*F))-E/F;}void main() {vec3 ray_direction=v_position;ray_direction.y=pow(ray_direction.y,5.0);const float y_bias=0.015;ray_direction.y+=y_bias;vec3 color=atmosphere(normalize(ray_direction),u_sun_direction,u_sun_intensity);float white_scale=1.0748724675633854;color=uncharted2_tonemap((log2(2.0/pow(u_luminance,4.0)))*color)*white_scale;gl_FragColor=vec4(color,1.0);}`,"attribute highp vec3 a_pos_3f;uniform mat3 u_matrix_3f;varying highp vec3 v_position;float map(float value,float start,float end,float new_start,float new_end) {return ((value-start)*(new_end-new_start))/(end-start)+new_start;}void main() {vec4 pos=vec4(u_matrix_3f*a_pos_3f,1.0);v_position=pos.xyz;v_position.y*=-1.0;v_position.y=map(v_position.y,-1.0,1.0,0.0,1.0);gl_Position=vec4(a_pos_3f.xy,0.0,1.0);}"),globeRaster:gi(`uniform sampler2D u_image0;varying vec2 v_pos0; #ifndef FOG uniform highp vec3 u_frustum_tl;uniform highp vec3 u_frustum_tr;uniform highp vec3 u_frustum_br;uniform highp vec3 u_frustum_bl;uniform highp vec3 u_globe_pos;uniform highp float u_globe_radius;uniform vec2 u_viewport; #endif void main() {vec4 color; #ifdef CUSTOM_ANTIALIASING vec2 uv=gl_FragCoord.xy/u_viewport;highp vec3 ray_dir=mix( mix(u_frustum_tl,u_frustum_tr,uv.x),mix(u_frustum_bl,u_frustum_br,uv.x),1.0-uv.y);vec3 dir=normalize(ray_dir);vec3 closest_point=dot(u_globe_pos,dir)*dir;float norm_dist_from_center=1.0-length(closest_point-u_globe_pos)/u_globe_radius;const float antialias_pixel=2.0;float antialias_factor=antialias_pixel*fwidth(norm_dist_from_center);float antialias=smoothstep(0.0,antialias_factor,norm_dist_from_center);vec4 raster=texture2D(u_image0,v_pos0);color=vec4(raster.rgb*antialias,raster.a*antialias); #else color=texture2D(u_image0,v_pos0); #endif #ifdef FOG color=fog_dither(fog_apply_premultiplied(color,v_fog_pos)); #endif gl_FragColor=color; #ifdef TERRAIN_WIREFRAME gl_FragColor=vec4(1.0,0.0,0.0,0.8); #endif #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,`uniform mat4 u_proj_matrix;uniform mat4 u_normalize_matrix;uniform mat4 u_globe_matrix;uniform mat4 u_merc_matrix;uniform float u_zoom_transition;uniform vec2 u_merc_center;uniform mat3 u_grid_matrix;uniform float u_skirt_height; #ifdef GLOBE_POLES attribute vec3 a_globe_pos;attribute vec2 a_uv; #else attribute vec2 a_pos; #endif varying vec2 v_pos0;const float wireframeOffset=1e3;float mercatorXfromLng(float lng) {return (180.0+lng)/360.0;}float mercatorYfromLat(float lat) {return (180.0-(RAD_TO_DEG*log(tan(QUARTER_PI+lat/2.0*DEG_TO_RAD))))/360.0;}vec3 latLngToECEF(vec2 latLng) {latLng=DEG_TO_RAD*latLng;float cosLat=cos(latLng[0]);float sinLat=sin(latLng[0]);float cosLng=cos(latLng[1]);float sinLng=sin(latLng[1]);float sx=cosLat*sinLng*GLOBE_RADIUS;float sy=-sinLat*GLOBE_RADIUS;float sz=cosLat*cosLng*GLOBE_RADIUS;return vec3(sx,sy,sz);}void main() { #ifdef GLOBE_POLES vec3 globe_pos=a_globe_pos;vec2 uv=a_uv; #else float tiles=u_grid_matrix[0][2];float idx=u_grid_matrix[1][2];float idy=u_grid_matrix[2][2];vec3 decomposed_pos_and_skirt=decomposeToPosAndSkirt(a_pos);vec3 latLng=u_grid_matrix*vec3(decomposed_pos_and_skirt.xy,1.0);float mercatorY=mercatorYfromLat(latLng[0]);float uvY=mercatorY*tiles-idy;float mercatorX=mercatorXfromLng(latLng[1]);float uvX=mercatorX*tiles-idx;vec3 globe_pos=latLngToECEF(latLng.xy);vec2 merc_pos=vec2(mercatorX,mercatorY);vec2 uv=vec2(uvX,uvY); #endif v_pos0=uv;vec2 tile_pos=uv*EXTENT;vec3 globe_derived_up_vector=normalize(globe_pos)*u_tile_up_scale; #ifdef GLOBE_POLES vec3 up_vector=globe_derived_up_vector; #else vec3 up_vector=elevationVector(tile_pos); #endif float height=elevation(tile_pos); #ifdef TERRAIN_WIREFRAME height+=wireframeOffset; #endif globe_pos+=up_vector*height; #ifndef GLOBE_POLES globe_pos-=globe_derived_up_vector*u_skirt_height*decomposed_pos_and_skirt.z; #endif #ifdef GLOBE_POLES vec4 interpolated_pos=u_globe_matrix*vec4(globe_pos,1.0); #else vec4 globe_world_pos=u_globe_matrix*vec4(globe_pos,1.0);vec4 merc_world_pos=vec4(0.0);if (u_zoom_transition > 0.0) {merc_world_pos=vec4(merc_pos,height-u_skirt_height*decomposed_pos_and_skirt.z,1.0);merc_world_pos.xy-=u_merc_center;merc_world_pos.x=wrap(merc_world_pos.x,-0.5,0.5);merc_world_pos=u_merc_matrix*merc_world_pos;}vec4 interpolated_pos=vec4(mix(globe_world_pos.xyz,merc_world_pos.xyz,u_zoom_transition),1.0); #endif gl_Position=u_proj_matrix*interpolated_pos; #ifdef FOG v_fog_pos=fog_position((u_normalize_matrix*vec4(globe_pos,1.0)).xyz); #endif }`),globeAtmosphere:gi(`uniform float u_transition;uniform highp float u_fadeout_range;uniform highp float u_temporal_offset;uniform vec3 u_start_color;uniform vec4 u_color;uniform vec4 u_space_color;uniform vec4 u_high_color;uniform float u_star_intensity;uniform float u_star_size;uniform float u_star_density;uniform float u_horizon_angle;uniform mat4 u_rotation_matrix;varying highp vec3 v_ray_dir;varying highp vec3 v_horizon_dir;highp float random(highp vec3 p) {p=fract(p*vec3(23.2342,97.1231,91.2342));p+=dot(p.zxy,p.yxz+123.1234);return fract(p.x*p.y);}float stars(vec3 p,float scale,vec2 offset) {vec2 uv_scale=(u_viewport/u_star_size)*scale;vec3 position=vec3(p.xy*uv_scale+offset*u_viewport,p.z);vec3 q=fract(position)-0.5;vec3 id=floor(position);float random_visibility=step(random(id),u_star_density);float circle=smoothstep(0.5+u_star_intensity,0.5,length(q));return circle*random_visibility;}void main() {highp vec3 dir=normalize(v_ray_dir);float globe_pos_dot_dir; #ifdef PROJECTION_GLOBE_VIEW globe_pos_dot_dir=dot(u_globe_pos,dir);highp vec3 closest_point_forward=abs(globe_pos_dot_dir)*dir;float norm_dist_from_center=length(closest_point_forward-u_globe_pos)/u_globe_radius;if (norm_dist_from_center < 0.98) {discard;return;} #endif highp vec3 horizon_dir=normalize(v_horizon_dir);float horizon_angle_mercator=dir.y < horizon_dir.y ? 0.0 : max(acos(dot(dir,horizon_dir)),0.0);float horizon_angle; #ifdef PROJECTION_GLOBE_VIEW highp vec3 closest_point=globe_pos_dot_dir*dir;float closest_point_to_center=length(closest_point-u_globe_pos);float theta=asin(clamp(closest_point_to_center/length(u_globe_pos),-1.0,1.0));horizon_angle=globe_pos_dot_dir < 0.0 ? PI-theta-u_horizon_angle : theta-u_horizon_angle;float angle_t=pow(u_transition,10.0);horizon_angle=mix(horizon_angle,horizon_angle_mercator,angle_t); #else horizon_angle=horizon_angle_mercator; #endif horizon_angle/=PI;float t=exp(-horizon_angle/u_fadeout_range);float alpha_0=u_color.a;float alpha_1=u_high_color.a;float alpha_2=u_space_color.a;vec3 color_stop_0=u_color.rgb;vec3 color_stop_1=u_high_color.rgb;vec3 color_stop_2=u_space_color.rgb;vec3 c0=mix(color_stop_2,color_stop_1,alpha_1);vec3 c1=mix(c0,color_stop_0,alpha_0);vec3 c2=mix(c0,c1,t);vec3 c =mix(color_stop_2,c2,t);float a0=mix(alpha_2,1.0,alpha_1);float a1=mix(a0,1.0,alpha_0);float a2=mix(a0,a1,t);float a =mix(alpha_2,a2,t);vec2 uv=gl_FragCoord.xy/u_viewport-0.5;float aspect_ratio=u_viewport.x/u_viewport.y;vec4 uv_dir=vec4(normalize(vec3(uv.x*aspect_ratio,uv.y,1.0)),1.0);uv_dir=u_rotation_matrix*uv_dir;vec3 n=abs(uv_dir.xyz);vec2 uv_remap=(n.x > n.y && n.x > n.z) ? uv_dir.yz/uv_dir.x: (n.y > n.x && n.y > n.z) ? uv_dir.zx/uv_dir.y: uv_dir.xy/uv_dir.z;uv_remap.x/=aspect_ratio;vec3 D=vec3(uv_remap,1.0);highp float star_field=0.0;if (u_star_intensity > 0.0) {star_field+=stars(D,1.2,vec2(0.0,0.0));star_field+=stars(D,1.0,vec2(1.0,0.0));star_field+=stars(D,0.8,vec2(0.0,1.0));star_field+=stars(D,0.6,vec2(1.0,1.0));star_field*=(1.0-pow(t,0.25+(1.0-u_high_color.a)*0.75));c+=star_field*alpha_2;}c=dither(c,gl_FragCoord.xy+u_temporal_offset);gl_FragColor=vec4(c,a);}`,`attribute vec3 a_pos;attribute vec2 a_uv;uniform vec3 u_frustum_tl;uniform vec3 u_frustum_tr;uniform vec3 u_frustum_br;uniform vec3 u_frustum_bl;uniform float u_horizon;varying highp vec3 v_ray_dir;varying highp vec3 v_horizon_dir;void main() {v_ray_dir=mix( mix(u_frustum_tl,u_frustum_tr,a_uv.x),mix(u_frustum_bl,u_frustum_br,a_uv.x),a_uv.y);v_horizon_dir=mix( mix(u_frustum_tl,u_frustum_bl,u_horizon),mix(u_frustum_tr,u_frustum_br,u_horizon),a_uv.x);gl_Position=vec4(a_pos,1.0);}`)};function Th(I,h){const b=I.replace(/\s*\/\/[^\n]*\n/g,` `).split(` `);for(let R of b)if(R=R.trim(),R[0]==="#"&&R.includes("if")&&!R.includes("endif")){R=R.replace("#","").replace(/ifdef|ifndef|elif|if/g,"").replace(/!|defined|\(|\)|\|\||&&/g,"").replace(/\s+/g," ").trim();const U=R.split(" ");for(const K of U)h.includes(K)||h.push(K)}}function gi(I,h){const b=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,R=h.match(/attribute (highp |mediump |lowp )?([\w]+) ([\w]+)/g),U={},K=[...ru];return Th(I,K),Th(h,K),{fragmentSource:I=I.replace(b,(ne,ae,he,be,we)=>(U[we]=!0,ae==="define"?` #ifndef HAS_UNIFORM_u_${we} varying ${he} ${be} ${we}; #else uniform ${he} ${be} u_${we}; #endif `:` #ifdef HAS_UNIFORM_u_${we} ${he} ${be} ${we} = u_${we}; #endif `)),vertexSource:h=h.replace(b,(ne,ae,he,be,we)=>{const Le=be==="float"?"vec2":"vec4",He=we.match(/color/)?"color":Le;return U[we]?ae==="define"?` #ifndef HAS_UNIFORM_u_${we} uniform lowp float u_${we}_t; attribute ${he} ${Le} a_${we}; varying ${he} ${be} ${we}; #else uniform ${he} ${be} u_${we}; #endif `:He==="vec4"?` #ifndef HAS_UNIFORM_u_${we} ${we} = a_${we}; #else ${he} ${be} ${we} = u_${we}; #endif `:` #ifndef HAS_UNIFORM_u_${we} ${we} = unpack_mix_${He}(a_${we}, u_${we}_t); #else ${he} ${be} ${we} = u_${we}; #endif `:ae==="define"?` #ifndef HAS_UNIFORM_u_${we} uniform lowp float u_${we}_t; attribute ${he} ${Le} a_${we}; #else uniform ${he} ${be} u_${we}; #endif `:He==="vec4"?` #ifndef HAS_UNIFORM_u_${we} ${he} ${be} ${we} = a_${we}; #else ${he} ${be} ${we} = u_${we}; #endif `:` #ifndef HAS_UNIFORM_u_${we} ${he} ${be} ${we} = unpack_mix_${He}(a_${we}, u_${we}_t); #else ${he} ${be} ${we} = u_${we}; #endif `}),staticAttributes:R,usedDefines:K}}class R_{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffers=[],this.vao=null}bind(h,b,R,U,K,ne,ae){this.context=h;let he=this.boundPaintVertexBuffers.length!==U.length;for(let we=0;!he&&we<U.length;we++)this.boundPaintVertexBuffers[we]!==U[we]&&(he=!0);let be=this.boundDynamicVertexBuffers.length!==ae.length;for(let we=0;!be&&we<ae.length;we++)this.boundDynamicVertexBuffers[we]!==ae[we]&&(be=!0);if(!h.extVertexArrayObject||!this.vao||this.boundProgram!==b||this.boundLayoutVertexBuffer!==R||he||be||this.boundIndexBuffer!==K||this.boundVertexOffset!==ne)this.freshBind(b,R,U,K,ne,ae);else{h.bindVertexArrayOES.set(this.vao);for(const we of ae)we&&we.bind();K&&K.dynamicDraw&&K.bind()}}freshBind(h,b,R,U,K,ne){let ae;const he=h.numAttributes,be=this.context,we=be.gl;if(be.extVertexArrayObject)this.vao&&this.destroy(),this.vao=be.extVertexArrayObject.createVertexArrayOES(),be.bindVertexArrayOES.set(this.vao),ae=0,this.boundProgram=h,this.boundLayoutVertexBuffer=b,this.boundPaintVertexBuffers=R,this.boundIndexBuffer=U,this.boundVertexOffset=K,this.boundDynamicVertexBuffers=ne;else{ae=be.currentNumAttributes||0;for(let Le=he;Le<ae;Le++)we.disableVertexAttribArray(Le)}b.enableAttributes(we,h),b.bind(),b.setVertexAttribPointers(we,h,K);for(const Le of R)Le.enableAttributes(we,h),Le.bind(),Le.setVertexAttribPointers(we,h,K);for(const Le of ne)Le&&(Le.enableAttributes(we,h),Le.bind(),Le.setVertexAttribPointers(we,h,K));U&&U.bind(),be.currentNumAttributes=he}destroy(){this.vao&&(this.context.extVertexArrayObject.deleteVertexArrayOES(this.vao),this.vao=null)}}function tg(I,h){const b=Math.pow(2,h.canonical.z),R=h.canonical.y;return[new s.MercatorCoordinate(0,R/b).toLngLat().lat,new s.MercatorCoordinate(0,(R+1)/b).toLngLat().lat]}function Hu(I,h,b,R,U,K,ne){const ae=I.context,he=ae.gl,be=b.fbo;if(!be)return;I.prepareDrawTile();const we=I.useProgram("hillshade");ae.activeTexture.set(he.TEXTURE0),he.bindTexture(he.TEXTURE_2D,be.colorAttachment.get());const Le=((at,ut,De,it)=>{const yt=De.paint.get("hillshade-shadow-color"),mt=De.paint.get("hillshade-highlight-color"),kt=De.paint.get("hillshade-accent-color");let Lt=De.paint.get("hillshade-illumination-direction")*(Math.PI/180);De.paint.get("hillshade-illumination-anchor")==="viewport"&&(Lt-=at.transform.angle);const At=!at.options.moving;return{u_matrix:it||at.transform.calculateProjMatrix(ut.tileID.toUnwrapped(),At),u_image:0,u_latrange:tg(0,ut.tileID),u_light:[De.paint.get("hillshade-exaggeration"),Lt],u_shadow:yt,u_highlight:mt,u_accent:kt}})(I,b,R,I.terrain?h.projMatrix:null);I.prepareDrawProgram(ae,we,h.toUnwrapped());const{tileBoundsBuffer:He,tileBoundsIndexBuffer:rt,tileBoundsSegments:st}=I.getTileBoundsBuffers(b);we.draw(ae,he.TRIANGLES,U,K,ne,s.CullFaceMode.disabled,Le,R.id,He,rt,st)}function _d(I,h,b){if(!h.needsDEMTextureUpload)return;const R=I.context,U=R.gl;R.pixelStoreUnpackPremultiplyAlpha.set(!1),h.demTexture=h.demTexture||I.getTileTexture(b.stride);const K=b.getPixels();h.demTexture?h.demTexture.update(K,{premultiply:!1}):h.demTexture=new s.Texture(R,K,U.RGBA,{premultiply:!1}),h.needsDEMTextureUpload=!1}function Ph(I,h,b,R,U,K){const ne=I.context,ae=ne.gl;if(!h.dem)return;const he=h.dem;if(ne.activeTexture.set(ae.TEXTURE1),_d(I,h,he),!h.demTexture)return;h.demTexture.bind(ae.NEAREST,ae.CLAMP_TO_EDGE);const be=he.dim;ne.activeTexture.set(ae.TEXTURE0);let we=h.fbo;if(!we){const st=new s.Texture(ne,{width:be,height:be,data:null},ae.RGBA);st.bind(ae.LINEAR,ae.CLAMP_TO_EDGE),we=h.fbo=ne.createFramebuffer(be,be,!0),we.colorAttachment.set(st.texture)}ne.bindFramebuffer.set(we.framebuffer),ne.viewport.set([0,0,be,be]);const{tileBoundsBuffer:Le,tileBoundsIndexBuffer:He,tileBoundsSegments:rt}=I.getMercatorTileBoundsBuffers();I.useProgram("hillshadePrepare").draw(ne,ae.TRIANGLES,R,U,K,s.CullFaceMode.disabled,((st,at)=>{const ut=at.stride,De=s.create();return s.ortho(De,0,s.EXTENT,-s.EXTENT,0,0,1),s.translate(De,De,[0,-s.EXTENT,0]),{u_matrix:De,u_image:1,u_dimension:[ut,ut],u_zoom:st.overscaledZ,u_unpack:at.unpackVector}})(h.tileID,he),b.id,Le,He,rt),h.needsHillshadePrepare=!1}const po=I=>({u_matrix:new s.UniformMatrix4f(I),u_image0:new s.Uniform1i(I),u_skirt_height:new s.Uniform1f(I)}),Fs=(I,h)=>({u_matrix:I,u_image0:0,u_skirt_height:h}),lc=(I,h,b,R,U,K,ne,ae,he,be,we,Le,He,rt,st)=>({u_proj_matrix:Float32Array.from(I),u_globe_matrix:h,u_normalize_matrix:Float32Array.from(R),u_merc_matrix:b,u_zoom_transition:U,u_merc_center:K,u_image0:0,u_frustum_tl:ne,u_frustum_tr:ae,u_frustum_br:he,u_frustum_bl:be,u_globe_pos:we,u_globe_radius:Le,u_viewport:He,u_grid_matrix:st?Float32Array.from(st):new Float32Array(9),u_skirt_height:rt});function Wu(I,h){return I!=null&&h!=null&&!(!I.hasData()||!h.hasData())&&I.demTexture!=null&&h.demTexture!=null&&I.tileID.key!==h.tileID.key}const wa=new class{constructor(){this.operations={}}newMorphing(I,h,b,R,U){if(I in this.operations){const K=this.operations[I];K.to.tileID.key!==b.tileID.key&&(K.queued=b)}else this.operations[I]={startTime:R,phase:0,duration:U,from:h,to:b,queued:null}}getMorphValuesForProxy(I){if(!(I in this.operations))return null;const h=this.operations[I];return{from:h.from,to:h.to,phase:h.phase}}update(I){for(const h in this.operations){const b=this.operations[h];for(b.phase=(I-b.startTime)/b.duration;b.phase>=1||!this._validOp(b);)if(!this._nextOp(b,I)){delete this.operations[h];break}}}_nextOp(I,h){return!!I.queued&&(I.from=I.to,I.to=I.queued,I.queued=null,I.phase=0,I.startTime=h,!0)}_validOp(I){return I.from.hasData()&&I.to.hasData()}},bd={0:null,1:"TERRAIN_VERTEX_MORPHING",2:"TERRAIN_WIREFRAME"};function wd(I){return 6*Math.pow(1.5,22-I)}function Ih(I,h){const b=1<<I.z;return!h&&(I.x===0||I.x===b-1)||I.y===0||I.y===b-1}const Cd=I=>({u_matrix:I});function Ed(I,h,b,R,U){if(U>0){const K=s.exported.now(),ne=(K-I.timeAdded)/U,ae=h?(K-h.timeAdded)/U:-1,he=b.getSource(),be=R.coveringZoomLevel({tileSize:he.tileSize,roundZoom:he.roundZoom}),we=!h||Math.abs(h.tileID.overscaledZ-be)>Math.abs(I.tileID.overscaledZ-be),Le=we&&I.refreshedUponExpiration?1:s.clamp(we?ne:1-ae,0,1);return I.refreshedUponExpiration&&ne>=1&&(I.refreshedUponExpiration=!1),h?{opacity:1,mix:1-Le}:{opacity:Le,mix:0}}return{opacity:1,mix:0}}class Ef extends s.SourceCache{constructor(h){const b={type:"raster-dem",maxzoom:h.transform.maxZoom},R=new re(Xr(),null),U=Ve("mock-dem",b,R,h.style);super("mock-dem",U,!1),U.setEventedParent(this),this._sourceLoaded=!0}_loadTile(h,b){h.state="loaded",b(null)}}class rg extends s.SourceCache{constructor(h){const b=Ve("proxy",{type:"geojson",maxzoom:h.transform.maxZoom},new re(Xr(),null),h.style);super("proxy",b,!1),b.setEventedParent(this),this.map=this.getSource().map=h,this.used=this._sourceLoaded=!0,this.renderCache=[],this.renderCachePool=[],this.proxyCachedFBO={}}update(h,b,R){if(h.freezeTileCoverage)return;this.transform=h;const U=h.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}).reduce((K,ne)=>{if(K[ne.key]="",!this._tiles[ne.key]){const ae=new s.Tile(ne,this._source.tileSize*ne.overscaleFactor(),h.tileZoom);ae.state="loaded",this._tiles[ne.key]=ae}return K},{});for(const K in this._tiles)K in U||(this.freeFBO(K),this._tiles[K].unloadVectorData(),delete this._tiles[K])}freeFBO(h){const b=this.proxyCachedFBO[h];if(b!==void 0){const R=Object.values(b);this.renderCachePool.push(...R),delete this.proxyCachedFBO[h]}}deallocRenderCache(){this.renderCache.forEach(h=>h.fb.destroy()),this.renderCache=[],this.renderCachePool=[],this.proxyCachedFBO={}}}class Mh extends s.OverscaledTileID{constructor(h,b,R){super(h.overscaledZ,h.wrap,h.canonical.z,h.canonical.x,h.canonical.y),this.proxyTileKey=b,this.projMatrix=R}}class jp extends s.Elevation{constructor(h,b){super(),this.painter=h,this.terrainTileForTile={},this.prevTerrainTileForTile={};const[R,U,K]=function(he){const be=new s.StructArrayLayout2i4,we=new s.StructArrayLayout3ui6,Le=131;be.reserve(17161),we.reserve(33800);const He=s.EXTENT/128,rt=s.EXTENT+He/2,st=rt+He;for(let ut=-He;ut<st;ut+=He)for(let De=-He;De<st;De+=He){const it=De<0||De>rt||ut<0||ut>rt?24575:0,yt=s.clamp(Math.round(De),0,s.EXTENT),mt=s.clamp(Math.round(ut),0,s.EXTENT);be.emplaceBack(yt+it,mt)}const at=(ut,De)=>{const it=De*Le+ut;we.emplaceBack(it+1,it,it+Le),we.emplaceBack(it+Le,it+Le+1,it+1)};for(let ut=1;ut<129;ut++)for(let De=1;De<129;De++)at(De,ut);return[0,129].forEach(ut=>{for(let De=0;De<130;De++)at(De,ut),at(ut,De)}),[be,we,32768]}(),ne=h.context;this.gridBuffer=ne.createVertexBuffer(R,s.posAttributes.members),this.gridIndexBuffer=ne.createIndexBuffer(U),this.gridSegments=s.SegmentVector.simpleSegment(0,0,R.length,U.length),this.gridNoSkirtSegments=s.SegmentVector.simpleSegment(0,0,R.length,K),this.proxyCoords=[],this.proxiedCoords={},this._visibleDemTiles=[],this._drapedRenderBatches=[],this._sourceTilesOverlap={},this.proxySourceCache=new rg(b.map),this.orthoMatrix=s.create(),s.ortho(this.orthoMatrix,this.painter.transform.projection.name==="globe"?.015:0,s.EXTENT,0,s.EXTENT,0,1);const ae=ne.gl;this._overlapStencilMode=new s.StencilMode({func:ae.GEQUAL,mask:255},0,255,ae.KEEP,ae.KEEP,ae.REPLACE),this._previousZoom=h.transform.zoom,this.pool=[],this._findCoveringTileCache={},this._tilesDirty={},this.style=b,this._useVertexMorphing=!0,this._exaggeration=1,this._mockSourceCache=new Ef(b.map)}set style(h){h.on("data",this._onStyleDataEvent.bind(this)),h.on("neworder",this._checkRenderCacheEfficiency.bind(this)),this._style=h,this._checkRenderCacheEfficiency(),this._style.map.on("moveend",()=>{this._clearLineLayersFromRenderCache()})}update(h,b,R){if(h&&h.terrain){this._style!==h&&(this.style=h),this.enabled=!0;const U=h.terrain.properties;this.sourceCache=h.terrain.drapeRenderMode===0?this._mockSourceCache:h._getSourceCache(U.get("source")),this._exaggeration=U.get("exaggeration");const K=()=>{this.sourceCache.used&&s.warnOnce(`Raster DEM source '${this.sourceCache.id}' is used both for terrain and as layer source. This leads to lower resolution of hillshade. For full hillshade resolution but higher memory consumption, define another raster DEM source.`);const ne=this.getScaledDemTileSize();this.sourceCache.update(b,ne,!0),this.resetTileLookupCache(this.sourceCache.id)};this.sourceCache.usedForTerrain||(this.resetTileLookupCache(this.sourceCache.id),this.sourceCache.usedForTerrain=!0,K(),this._initializing=!0),K(),b.updateElevation(!0,R),this.resetTileLookupCache(this.proxySourceCache.id),this.proxySourceCache.update(b),this._emptyDEMTextureDirty=!0}else this._disable()}resetTileLookupCache(h){this._findCoveringTileCache[h]={}}getScaledDemTileSize(){return this.sourceCache.getSource().tileSize/128*this.proxySourceCache.getSource().tileSize}_checkRenderCacheEfficiency(){const h=this.renderCacheEfficiency(this._style);this._style.map._optimizeForTerrain||h.efficiency!==100&&s.warnOnce(`Terrain render cache efficiency is not optimal (${h.efficiency}%) and performance may be affected negatively, consider placing all background, fill and line layers before layer with id '${h.firstUndrapedLayer}' or create a map using optimizeForTerrain: true option.`)}_onStyleDataEvent(h){h.coord&&h.dataType==="source"?this._clearRenderCacheForTile(h.sourceCacheId,h.coord):h.dataType==="style"&&(this._invalidateRenderCache=!0)}_disable(){if(this.enabled&&(this.enabled=!1,this._sharedDepthStencil=void 0,this.proxySourceCache.deallocRenderCache(),this._style))for(const h in this._style._sourceCaches)this._style._sourceCaches[h].usedForTerrain=!1}destroy(){this._disable(),this._emptyDEMTexture&&this._emptyDEMTexture.destroy(),this._emptyDepthBufferTexture&&this._emptyDepthBufferTexture.destroy(),this.pool.forEach(h=>h.fb.destroy()),this.pool=[],this._depthFBO&&(this._depthFBO.destroy(),this._depthFBO=void 0,this._depthTexture=void 0)}_source(){return this.enabled?this.sourceCache:null}isUsingMockSource(){return this.sourceCache===this._mockSourceCache}exaggeration(){return this._exaggeration}get visibleDemTiles(){return this._visibleDemTiles}get drapeBufferSize(){const h=2*this.proxySourceCache.getSource().tileSize;return[h,h]}set useVertexMorphing(h){this._useVertexMorphing=h}updateTileBinding(h){if(!this.enabled)return;this.prevTerrainTileForTile=this.terrainTileForTile;const b=this.proxySourceCache,R=this.painter.transform;this._initializing&&(this._initializing=R._centerAltitude===0&&this.getAtPointOrZero(s.MercatorCoordinate.fromLngLat(R.center),-1)===-1,this._emptyDEMTextureDirty=!this._initializing);const U=this.proxyCoords=b.getIds().map(he=>{const be=b.getTileByID(he).tileID;return be.projMatrix=R.calculateProjMatrix(be.toUnwrapped()),be});(function(he,be){const we=be.transform.pointCoordinate(be.transform.getCameraPoint()),Le=new s.Point(we.x,we.y);he.sort((He,rt)=>{if(rt.overscaledZ-He.overscaledZ)return rt.overscaledZ-He.overscaledZ;const st=new s.Point(He.canonical.x+(1<<He.canonical.z)*He.wrap,He.canonical.y),at=new s.Point(rt.canonical.x+(1<<rt.canonical.z)*rt.wrap,rt.canonical.y),ut=Le.mult(1<<He.canonical.z);return ut.x-=.5,ut.y-=.5,ut.distSqr(st)-ut.distSqr(at)})})(U,this.painter),this._previousZoom=R.zoom;const K=this.proxyToSource||{};this.proxyToSource={},U.forEach(he=>{this.proxyToSource[he.key]={}}),this.terrainTileForTile={};const ne=this._style._sourceCaches;for(const he in ne){const be=ne[he];if(!be.used||(be!==this.sourceCache&&this.resetTileLookupCache(be.id),this._setupProxiedCoordsForOrtho(be,h[he],K),be.usedForTerrain))continue;const we=h[he];be.getSource().reparseOverscaled&&this._assignTerrainTiles(we)}this.proxiedCoords[b.id]=U.map(he=>new Mh(he,he.key,this.orthoMatrix)),this._assignTerrainTiles(U),this._prepareDEMTextures(),this._setupDrapedRenderBatches(),this._initFBOPool(),this._setupRenderCache(K),this.renderingToTexture=!1,this._updateTimestamp=s.exported.now();const ae={};this._visibleDemTiles=[];for(const he of this.proxyCoords){const be=this.terrainTileForTile[he.key];if(!be)continue;const we=be.tileID.key;we in ae||(this._visibleDemTiles.push(be),ae[we]=we)}}_assignTerrainTiles(h){this._initializing||h.forEach(b=>{if(this.terrainTileForTile[b.key])return;const R=this._findTileCoveringTileID(b,this.sourceCache);R&&(this.terrainTileForTile[b.key]=R)})}_prepareDEMTextures(){const h=this.painter.context,b=h.gl;for(const R in this.terrainTileForTile){const U=this.terrainTileForTile[R],K=U.dem;!K||U.demTexture&&!U.needsDEMTextureUpload||(h.activeTexture.set(b.TEXTURE1),_d(this.painter,U,K))}}_prepareDemTileUniforms(h,b,R,U){if(!b||b.demTexture==null)return!1;const K=h.tileID.canonical,ne=Math.pow(2,b.tileID.canonical.z-K.z),ae=U||"";return R[`u_dem_tl${ae}`]=[K.x*ne%1,K.y*ne%1],R[`u_dem_scale${ae}`]=ne,!0}get emptyDEMTexture(){return!this._emptyDEMTextureDirty&&this._emptyDEMTexture?this._emptyDEMTexture:this._updateEmptyDEMTexture()}get emptyDepthBufferTexture(){const h=this.painter.context,b=h.gl;if(!this._emptyDepthBufferTexture){const R=new s.RGBAImage({width:1,height:1},Uint8Array.of(255,255,255,255));this._emptyDepthBufferTexture=new s.Texture(h,R,b.RGBA,{premultiply:!1})}return this._emptyDepthBufferTexture}_getLoadedAreaMinimum(){let h=0;const b=this._visibleDemTiles.reduce((R,U)=>{if(!U.dem)return R;const K=U.dem.tree.minimums[0];return K>0&&h++,R+K},0);return h?b/h:0}_updateEmptyDEMTexture(){const h=this.painter.context,b=h.gl;h.activeTexture.set(b.TEXTURE2);const R=this._getLoadedAreaMinimum(),U=new s.RGBAImage({width:1,height:1},new Uint8Array(s.DEMData.pack(R,this.sourceCache.getSource().encoding)));this._emptyDEMTextureDirty=!1;let K=this._emptyDEMTexture;return K?K.update(U,{premultiply:!1}):K=this._emptyDEMTexture=new s.Texture(h,U,b.RGBA,{premultiply:!1}),K}setupElevationDraw(h,b,R){const U=this.painter.context,K=U.gl,ne=(ae=this.sourceCache.getSource().encoding,{u_dem:2,u_dem_prev:4,u_dem_unpack:s.DEMData.getUnpackVector(ae),u_dem_tl:[0,0],u_dem_tl_prev:[0,0],u_dem_scale:0,u_dem_scale_prev:0,u_dem_size:0,u_dem_lerp:1,u_depth:3,u_depth_size_inv:[0,0],u_exaggeration:0});var ae;ne.u_dem_size=this.sourceCache.getSource().tileSize,ne.u_exaggeration=this.exaggeration();let he=null,be=null,we=1;if(R&&R.morphing&&this._useVertexMorphing){const Le=R.morphing.srcDemTile,He=R.morphing.dstDemTile;we=R.morphing.phase,Le&&He&&(this._prepareDemTileUniforms(h,Le,ne,"_prev")&&(be=Le),this._prepareDemTileUniforms(h,He,ne)&&(he=He))}if(be&&he?(U.activeTexture.set(K.TEXTURE2),he.demTexture.bind(K.NEAREST,K.CLAMP_TO_EDGE,K.NEAREST),U.activeTexture.set(K.TEXTURE4),be.demTexture.bind(K.NEAREST,K.CLAMP_TO_EDGE,K.NEAREST),ne.u_dem_lerp=we):(he=this.terrainTileForTile[h.tileID.key],U.activeTexture.set(K.TEXTURE2),(this._prepareDemTileUniforms(h,he,ne)?he.demTexture:this.emptyDEMTexture).bind(K.NEAREST,K.CLAMP_TO_EDGE)),U.activeTexture.set(K.TEXTURE3),R&&R.useDepthForOcclusion?(this._depthTexture&&this._depthTexture.bind(K.NEAREST,K.CLAMP_TO_EDGE),this._depthFBO&&(ne.u_depth_size_inv=[1/this._depthFBO.width,1/this._depthFBO.height])):(this.emptyDepthBufferTexture.bind(K.NEAREST,K.CLAMP_TO_EDGE),ne.u_depth_size_inv=[1,1]),R&&R.useMeterToDem&&he){const Le=(1<<he.tileID.canonical.z)*s.mercatorZfromAltitude(1,this.painter.transform.center.lat)*this.sourceCache.getSource().tileSize;ne.u_meter_to_dem=Le}if(R&&R.labelPlaneMatrixInv&&(ne.u_label_plane_matrix_inv=R.labelPlaneMatrixInv),b.setTerrainUniformValues(U,ne),this.painter.transform.projection.name==="globe"){const Le=this.globeUniformValues(this.painter.transform,h.tileID.canonical,R&&R.useDenormalizedUpVectorScale);b.setGlobeUniformValues(U,Le)}}globeUniformValues(h,b,R){const U=h.projection;return{u_tile_tl_up:U.upVector(b,0,0),u_tile_tr_up:U.upVector(b,s.EXTENT,0),u_tile_br_up:U.upVector(b,s.EXTENT,s.EXTENT),u_tile_bl_up:U.upVector(b,0,s.EXTENT),u_tile_up_scale:R?s.globeMetersToEcef(1):U.upVectorScale(b,h.center.lat,h.worldSize).metersToTile}}renderToBackBuffer(h){const b=this.painter,R=this.painter.context;h.length!==0&&(R.bindFramebuffer.set(null),R.viewport.set([0,0,b.width,b.height]),b.gpuTimingDeferredRenderStart(),this.renderingToTexture=!1,function(U,K,ne,ae,he){if(U.transform.projection.name==="globe")(function(be,we,Le,He,rt){const st=be.context,at=st.gl;let ut,De;const it=be.options.showTerrainWireframe?2:0,yt=be.transform,mt=s.globeUseCustomAntiAliasing(be,st,yt),kt=(jr,lr)=>{if(De===jr)return;const xr=[bd[jr],"PROJECTION_GLOBE_VIEW"];mt&&xr.push("CUSTOM_ANTIALIASING"),lr&&xr.push(bd[it]),ut=be.useProgram("globeRaster",null,xr),De=jr},Lt=be.colorModeForRenderPass(),At=new s.DepthMode(at.LEQUAL,s.DepthMode.ReadWrite,be.depthRangeFor3D);wa.update(rt);const Yt=s.calculateGlobeMercatorMatrix(yt),Vt=[s.mercatorXfromLng(yt.center.lng),s.mercatorYfromLat(yt.center.lat)],or=it?[!1,!0]:[!1],Wr=be.globeSharedBuffers,Qt=[yt.width*s.exported.devicePixelRatio,yt.height*s.exported.devicePixelRatio],Tr=Float32Array.from(yt.globeMatrix),fr={useDenormalizedUpVectorScale:!0};if(or.forEach(jr=>{const lr=be.transform,xr=wd(lr.zoom)*we.exaggeration();De=-1;const qr=jr?at.LINES:at.TRIANGLES;for(const Rr of He){const Yr=Le.getTile(Rr),Nn=s.StencilMode.disabled,li=we.prevTerrainTileForTile[Rr.key],Cn=we.terrainTileForTile[Rr.key];Wu(li,Cn)&&wa.newMorphing(Rr.key,li,Cn,rt,250),st.activeTexture.set(at.TEXTURE0),Yr.texture.bind(at.LINEAR,at.CLAMP_TO_EDGE);const Gn=wa.getMorphValuesForProxy(Rr.key),Ri=Gn?1:0;Gn&&s.extend$1(fr,{morphing:{srcDemTile:Gn.from,dstDemTile:Gn.to,phase:s.easeCubicInOut(Gn.phase)}});const bi=s.tileCornersToBounds(Rr.canonical),An=s.getLatitudinalLod(bi.getCenter().lat),_o=s.getGridMatrix(Rr.canonical,bi,An,lr.worldSize/lr._pixelsPerMercatorPixel),Vo=s.globeNormalizeECEF(s.globeTileBounds(Rr.canonical)),Ho=lc(lr.projMatrix,Tr,Yt,Vo,s.globeToMercatorTransition(lr.zoom),Vt,lr.frustumCorners.TL,lr.frustumCorners.TR,lr.frustumCorners.BR,lr.frustumCorners.BL,lr.globeCenterInViewSpace,lr.globeRadius,Qt,xr,_o);if(kt(Ri,jr),we.setupElevationDraw(Yr,ut,fr),be.prepareDrawProgram(st,ut,Rr.toUnwrapped()),Wr){const[No,il,ol]=jr?Wr.getWirefameBuffers(be.context,An):Wr.getGridBuffers(An,xr!==0);ut.draw(st,qr,At,Nn,Lt,s.CullFaceMode.backCCW,Ho,"globe_raster",No,il,ol)}}}),Wr){const jr=["GLOBE_POLES","PROJECTION_GLOBE_VIEW"];mt&&jr.push("CUSTOM_ANTIALIASING"),ut=be.useProgram("globeRaster",null,jr);for(const lr of He){const{x:xr,y:qr,z:Rr}=lr.canonical,Yr=qr===0,Nn=qr===(1<<Rr)-1,[li,Cn,Gn,Ri]=Wr.getPoleBuffers(Rr);if(Ri&&(Yr||Nn)){const bi=Le.getTile(lr);st.activeTexture.set(at.TEXTURE0),bi.texture.bind(at.LINEAR,at.CLAMP_TO_EDGE);let An=s.globePoleMatrixForTile(Rr,xr,yt);const _o=s.globeNormalizeECEF(s.globeTileBounds(lr.canonical)),Vo=(Ho,No)=>Ho.draw(st,at.TRIANGLES,At,s.StencilMode.disabled,Lt,s.CullFaceMode.disabled,lc(yt.projMatrix,An,An,_o,0,Vt,yt.frustumCorners.TL,yt.frustumCorners.TR,yt.frustumCorners.BR,yt.frustumCorners.BL,yt.globeCenterInViewSpace,yt.globeRadius,Qt,0),"globe_pole_raster",No,Gn,Ri);we.setupElevationDraw(bi,ut,fr),be.prepareDrawProgram(st,ut,lr.toUnwrapped()),Yr&&Vo(ut,li),Nn&&(An=s.scale(s.create(),An,[1,-1,1]),Vo(ut,Cn))}}}})(U,K,ne,ae,he);else{const be=U.context,we=be.gl;let Le,He;const rt=U.options.showTerrainWireframe?2:0,st=(yt,mt)=>{if(He===yt)return;const kt=[bd[yt]];mt&&kt.push(bd[rt]),Le=U.useProgram("terrainRaster",null,kt),He=yt},at=U.colorModeForRenderPass(),ut=new s.DepthMode(we.LEQUAL,s.DepthMode.ReadWrite,U.depthRangeFor3D);wa.update(he);const De=U.transform,it=wd(De.zoom)*K.exaggeration();(rt?[!1,!0]:[!1]).forEach(yt=>{He=-1;const mt=yt?we.LINES:we.TRIANGLES,[kt,Lt]=yt?K.getWirefameBuffer():[K.gridIndexBuffer,K.gridSegments];for(const At of ae){const Yt=ne.getTile(At),Vt=s.StencilMode.disabled,or=K.prevTerrainTileForTile[At.key],Wr=K.terrainTileForTile[At.key];Wu(or,Wr)&&wa.newMorphing(At.key,or,Wr,he,250),be.activeTexture.set(we.TEXTURE0),Yt.texture.bind(we.LINEAR,we.CLAMP_TO_EDGE,we.LINEAR_MIPMAP_NEAREST);const Qt=wa.getMorphValuesForProxy(At.key),Tr=Qt?1:0;let fr;Qt&&(fr={morphing:{srcDemTile:Qt.from,dstDemTile:Qt.to,phase:s.easeCubicInOut(Qt.phase)}});const jr=Fs(At.projMatrix,Ih(At.canonical,De.renderWorldCopies)?it/10:it);st(Tr,yt),K.setupElevationDraw(Yt,Le,fr),U.prepareDrawProgram(be,Le,At.toUnwrapped()),Le.draw(be,mt,ut,Vt,at,s.CullFaceMode.backCCW,jr,"terrain_raster",K.gridBuffer,kt,Lt)}})}}(b,this,this.proxySourceCache,h,this._updateTimestamp),this.renderingToTexture=!0,b.gpuTimingDeferredRenderEnd(),h.splice(0,h.length))}renderBatch(h){if(this._drapedRenderBatches.length===0)return h+1;this.renderingToTexture=!0;const b=this.painter,R=this.painter.context,U=this.proxySourceCache,K=this.proxiedCoords[U.id],ne=this._drapedRenderBatches.shift(),ae=[],he=b.style.order;let be=0;for(const we of K){const Le=U.getTileByID(we.proxyTileKey),He=U.proxyCachedFBO[we.key]?U.proxyCachedFBO[we.key][h]:void 0,rt=He!==void 0?U.renderCache[He]:this.pool[be++],st=He!==void 0;if(Le.texture=rt.tex,st&&!rt.dirty){ae.push(Le.tileID);continue}let at;R.bindFramebuffer.set(rt.fb.framebuffer),this.renderedToTile=!1,rt.dirty&&(R.clear({color:s.Color.transparent,stencil:0}),rt.dirty=!1);for(let ut=ne.start;ut<=ne.end;++ut){const De=b.style._layers[he[ut]];if(De.isHidden(b.transform.zoom))continue;const it=b.style._getLayerSourceCache(De),yt=it?this.proxyToSource[we.key][it.id]:[we];if(!yt)continue;const mt=yt;R.viewport.set([0,0,rt.fb.width,rt.fb.height]),at!==(it?it.id:null)&&(this._setupStencil(rt,yt,De,it),at=it?it.id:null),b.renderLayer(b,it,De,mt)}this.renderedToTile?(rt.dirty=!0,ae.push(Le.tileID)):st||--be,be===5&&(be=0,this.renderToBackBuffer(ae))}return this.renderToBackBuffer(ae),this.renderingToTexture=!1,R.bindFramebuffer.set(null),R.viewport.set([0,0,b.width,b.height]),ne.end+1}postRender(){}renderCacheEfficiency(h){const b=h.order.length;if(b===0)return{efficiency:100};let R,U=0,K=0,ne=!1;for(let ae=0;ae<b;++ae){const he=h._layers[h.order[ae]];this._style.isLayerDraped(he)?(ne&&++U,++K):ne||(ne=!0,R=he.id)}return K===0?{efficiency:100}:{efficiency:100*(1-U/K),firstUndrapedLayer:R}}getMinElevationBelowMSL(){let h=0;return this._visibleDemTiles.filter(b=>b.dem).forEach(b=>{h=Math.min(h,b.dem.tree.minimums[0])}),h===0?h:(h-30)*this._exaggeration}raycast(h,b,R){if(!this._visibleDemTiles)return null;const U=this._visibleDemTiles.filter(K=>K.dem).map(K=>{const ne=K.tileID,ae=1<<ne.overscaledZ,{x:he,y:be}=ne.canonical,we=he/ae,Le=(he+1)/ae,He=be/ae,rt=(be+1)/ae;return{minx:we,miny:He,maxx:Le,maxy:rt,t:K.dem.tree.raycastRoot(we,He,Le,rt,h,b,R),tile:K}});U.sort((K,ne)=>(K.t!==null?K.t:Number.MAX_VALUE)-(ne.t!==null?ne.t:Number.MAX_VALUE));for(const K of U){if(K.t==null)return null;const ne=K.tile.dem.tree.raycast(K.minx,K.miny,K.maxx,K.maxy,h,b,R);if(ne!=null)return ne}return null}_createFBO(){const h=this.painter.context,b=h.gl,R=this.drapeBufferSize;h.activeTexture.set(b.TEXTURE0);const U=new s.Texture(h,{width:R[0],height:R[1],data:null},b.RGBA);U.bind(b.LINEAR,b.CLAMP_TO_EDGE);const K=h.createFramebuffer(R[0],R[1],!1);return K.colorAttachment.set(U.texture),K.depthAttachment=new bt(h,K.framebuffer),this._sharedDepthStencil===void 0?(this._sharedDepthStencil=h.createRenderbuffer(h.gl.DEPTH_STENCIL,R[0],R[1]),this._stencilRef=0,K.depthAttachment.set(this._sharedDepthStencil),h.clear({stencil:0})):K.depthAttachment.set(this._sharedDepthStencil),h.extTextureFilterAnisotropic&&!h.extTextureFilterAnisotropicForceOff&&b.texParameterf(b.TEXTURE_2D,h.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,h.extTextureFilterAnisotropicMax),{fb:K,tex:U,dirty:!1}}_initFBOPool(){for(;this.pool.length<Math.min(5,this.proxyCoords.length);)this.pool.push(this._createFBO())}_shouldDisableRenderCache(){if(this._style.light&&this._style.light.hasTransition())return!0;for(const h in this._style._sourceCaches)if(this._style._sourceCaches[h].hasTransition())return!0;return this._style.order.some(h=>{const b=this._style._layers[h],R=b.isHidden(this.painter.transform.zoom);return b.type==="custom"?!R&&b.shouldRedrape():!R&&b.hasTransition()})}_clearLineLayersFromRenderCache(){let h=!1;for(const R of this._style._getSources())if(R instanceof rr){h=!0;break}if(!h)return;const b={};for(let R=0;R<this._style.order.length;++R){const U=this._style._layers[this._style.order[R]],K=this._style._getLayerSourceCache(U);if(K&&!b[K.id]&&!U.isHidden(this.painter.transform.zoom)&&U.type==="line"&&U.widthExpression()instanceof s.ZoomDependentExpression){b[K.id]=!0;for(const ne of this.proxyCoords){const ae=this.proxyToSource[ne.key][K.id];if(ae)for(const he of ae)this._clearRenderCacheForTile(K.id,he)}}}}_clearRasterLayersFromRenderCache(){let h=!1;for(const R in this._style._sourceCaches)if(this._style._sourceCaches[R]._source instanceof tr){h=!0;break}if(!h)return;const b={};for(let R=0;R<this._style.order.length;++R){const U=this._style._layers[this._style.order[R]],K=this._style._getLayerSourceCache(U);if(!K||b[K.id]||U.isHidden(this.painter.transform.zoom)||U.type!=="raster")continue;const ne=U.paint.get("raster-fade-duration");for(const ae of this.proxyCoords){const he=this.proxyToSource[ae.key][K.id];if(he)for(const be of he){const we=Ed(K.getTile(be),K.findLoadedParent(be,0),K,this.painter.transform,ne);(we.opacity!==1||we.mix!==0)&&this._clearRenderCacheForTile(K.id,be)}}}}_setupDrapedRenderBatches(){const h=this._style.order,b=h.length;if(b===0)return;const R=[];let U,K=0,ne=this._style._layers[h[K]];for(;!this._style.isLayerDraped(ne)&&ne.isHidden(this.painter.transform.zoom)&&++K<b;)ne=this._style._layers[h[K]];for(;K<b;++K){const ae=this._style._layers[h[K]];ae.isHidden(this.painter.transform.zoom)||(this._style.isLayerDraped(ae)?U===void 0&&(U=K):U!==void 0&&(R.push({start:U,end:K-1}),U=void 0))}U!==void 0&&R.push({start:U,end:K-1}),this._drapedRenderBatches=R}_setupRenderCache(h){const b=this.proxySourceCache;if(this._shouldDisableRenderCache()||this._invalidateRenderCache){if(this._invalidateRenderCache=!1,b.renderCache.length>b.renderCachePool.length){const ne=Object.values(b.proxyCachedFBO);b.proxyCachedFBO={};for(let ae=0;ae<ne.length;++ae){const he=Object.values(ne[ae]);b.renderCachePool.push(...he)}}return}this._clearRasterLayersFromRenderCache();const R=this.proxyCoords,U=this._tilesDirty;for(let ne=R.length-1;ne>=0;ne--){const ae=R[ne];if(b.getTileByID(ae.key),b.proxyCachedFBO[ae.key]!==void 0){const he=h[ae.key],be=this.proxyToSource[ae.key];let we=0;for(const Le in be){const He=be[Le],rt=he[Le];if(!rt||rt.length!==He.length||He.some((st,at)=>st!==rt[at]||U[Le]&&U[Le].hasOwnProperty(st.key))){we=-1;break}++we}for(const Le in b.proxyCachedFBO[ae.key])b.renderCache[b.proxyCachedFBO[ae.key][Le]].dirty=we<0||we!==Object.values(he).length}}const K=[...this._drapedRenderBatches];K.sort((ne,ae)=>ae.end-ae.start-(ne.end-ne.start));for(const ne of K)for(const ae of R){if(b.proxyCachedFBO[ae.key])continue;let he=b.renderCachePool.pop();he===void 0&&b.renderCache.length<50&&(he=b.renderCache.length,b.renderCache.push(this._createFBO())),he!==void 0&&(b.proxyCachedFBO[ae.key]={},b.proxyCachedFBO[ae.key][ne.start]=he,b.renderCache[he].dirty=!0)}this._tilesDirty={}}_setupStencil(h,b,R,U){if(!U||!this._sourceTilesOverlap[U.id])return void(this._overlapStencilType&&(this._overlapStencilType=!1));const K=this.painter.context,ne=K.gl;if(b.length<=1)return void(this._overlapStencilType=!1);let ae;if(R.isTileClipped())ae=b.length,this._overlapStencilMode.test={func:ne.EQUAL,mask:255},this._overlapStencilType="Clip";else{if(!(b[0].overscaledZ>b[b.length-1].overscaledZ))return void(this._overlapStencilType=!1);ae=1,this._overlapStencilMode.test={func:ne.GREATER,mask:255},this._overlapStencilType="Mask"}this._stencilRef+ae>255&&(K.clear({stencil:0}),this._stencilRef=0),this._stencilRef+=ae,this._overlapStencilMode.ref=this._stencilRef,R.isTileClipped()&&this._renderTileClippingMasks(b,this._overlapStencilMode.ref)}clipOrMaskOverlapStencilType(){return this._overlapStencilType==="Clip"||this._overlapStencilType==="Mask"}stencilModeForRTTOverlap(h){return this.renderingToTexture&&this._overlapStencilType?(this._overlapStencilType==="Clip"&&(this._overlapStencilMode.ref=this.painter._tileClippingMaskIDs[h.key]),this._overlapStencilMode):s.StencilMode.disabled}_renderTileClippingMasks(h,b){const R=this.painter,U=this.painter.context,K=U.gl;R._tileClippingMaskIDs={},U.setColorMode(s.ColorMode.disabled),U.setDepthMode(s.DepthMode.disabled);const ne=R.useProgram("clippingMask");for(const ae of h){const he=R._tileClippingMaskIDs[ae.key]=--b;ne.draw(U,K.TRIANGLES,s.DepthMode.disabled,new s.StencilMode({func:K.ALWAYS,mask:0},he,255,K.KEEP,K.KEEP,K.REPLACE),s.ColorMode.disabled,s.CullFaceMode.disabled,Cd(ae.projMatrix),"$clipping",R.tileExtentBuffer,R.quadTriangleIndexBuffer,R.tileExtentSegments)}}pointCoordinate(h){const b=this.painter.transform;if(h.x<0||h.x>b.width||h.y<0||h.y>b.height)return null;const R=[h.x,h.y,1,1];s.transformMat4$1(R,R,b.pixelMatrixInverse),s.scale$1(R,R,1/R[3]),R[0]/=b.worldSize,R[1]/=b.worldSize;const U=b._camera.position,K=s.mercatorZfromAltitude(1,b.center.lat),ne=[U[0],U[1],U[2]/K,0],ae=s.subtract([],R.slice(0,3),ne);s.normalize(ae,ae);const he=this.raycast(ne,ae,this._exaggeration);return he!==null&&he?(s.scaleAndAdd(ne,ne,ae,he),ne[3]=ne[2],ne[2]*=K,ne):null}drawDepth(){const h=this.painter,b=h.context,R=this.proxySourceCache,U=Math.ceil(h.width),K=Math.ceil(h.height);if(!this._depthFBO||this._depthFBO.width===U&&this._depthFBO.height===K||(this._depthFBO.destroy(),this._depthFBO=void 0,this._depthTexture=void 0),!this._depthFBO){const ne=b.gl,ae=b.createFramebuffer(U,K,!0);b.activeTexture.set(ne.TEXTURE0);const he=new s.Texture(b,{width:U,height:K,data:null},ne.RGBA);he.bind(ne.NEAREST,ne.CLAMP_TO_EDGE),ae.colorAttachment.set(he.texture);const be=b.createRenderbuffer(b.gl.DEPTH_COMPONENT16,U,K);ae.depthAttachment.set(be),this._depthFBO=ae,this._depthTexture=he}b.bindFramebuffer.set(this._depthFBO.framebuffer),b.viewport.set([0,0,U,K]),function(ne,ae,he,be){if(ne.transform.projection.name==="globe")return;const we=ne.context,Le=we.gl;we.clear({depth:1});const He=ne.useProgram("terrainDepth"),rt=new s.DepthMode(Le.LESS,s.DepthMode.ReadWrite,ne.depthRangeFor3D);for(const st of be){const at=he.getTile(st),ut=Fs(st.projMatrix,0);ae.setupElevationDraw(at,He),He.draw(we,Le.TRIANGLES,rt,s.StencilMode.disabled,s.ColorMode.unblended,s.CullFaceMode.backCCW,ut,"terrain_depth",ae.gridBuffer,ae.gridIndexBuffer,ae.gridNoSkirtSegments)}}(h,this,R,this.proxyCoords)}_setupProxiedCoordsForOrtho(h,b,R){if(h.getSource()instanceof un)return this._setupProxiedCoordsForImageSource(h,b,R);this._findCoveringTileCache[h.id]=this._findCoveringTileCache[h.id]||{};const U=this.proxiedCoords[h.id]=[],K=this.proxyCoords;for(let ae=0;ae<K.length;ae++){const he=K[ae],be=this._findTileCoveringTileID(he,h);if(be){const we=this._createProxiedId(he,be,R[he.key]&&R[he.key][h.id]);U.push(we),this.proxyToSource[he.key][h.id]=[we]}}let ne=!1;for(let ae=0;ae<b.length;ae++){const he=h.getTile(b[ae]);if(!he||!he.hasData())continue;const be=this._findTileCoveringTileID(he.tileID,this.proxySourceCache);if(be&&be.tileID.canonical.z!==he.tileID.canonical.z){const we=this.proxyToSource[be.tileID.key][h.id],Le=this._createProxiedId(be.tileID,he,R[be.tileID.key]&&R[be.tileID.key][h.id]);we?we.splice(we.length-1,0,Le):this.proxyToSource[be.tileID.key][h.id]=[Le],U.push(Le),ne=!0}}this._sourceTilesOverlap[h.id]=ne}_setupProxiedCoordsForImageSource(h,b,R){if(!h.getSource().loaded())return;const U=this.proxiedCoords[h.id]=[],K=this.proxyCoords,ne=h.getSource(),ae=new s.Point(ne.tileID.x,ne.tileID.y)._div(1<<ne.tileID.z),he=ne.coordinates.map(s.MercatorCoordinate.fromLngLat).reduce((we,Le)=>(we.min.x=Math.min(we.min.x,Le.x-ae.x),we.min.y=Math.min(we.min.y,Le.y-ae.y),we.max.x=Math.max(we.max.x,Le.x-ae.x),we.max.y=Math.max(we.max.y,Le.y-ae.y),we),{min:new s.Point(Number.MAX_VALUE,Number.MAX_VALUE),max:new s.Point(-Number.MAX_VALUE,-Number.MAX_VALUE)}),be=(we,Le)=>{const He=we.wrap+we.canonical.x/(1<<we.canonical.z),rt=we.canonical.y/(1<<we.canonical.z),st=s.EXTENT/(1<<we.canonical.z),at=Le.wrap+Le.canonical.x/(1<<Le.canonical.z),ut=Le.canonical.y/(1<<Le.canonical.z);return He+st<at+he.min.x||He>at+he.max.x||rt+st<ut+he.min.y||rt>ut+he.max.y};for(let we=0;we<K.length;we++){const Le=K[we];for(let He=0;He<b.length;He++){const rt=h.getTile(b[He]);if(!rt||!rt.hasData()||be(Le,rt.tileID))continue;const st=this._createProxiedId(Le,rt,R[Le.key]&&R[Le.key][h.id]),at=this.proxyToSource[Le.key][h.id];at?at.push(st):this.proxyToSource[Le.key][h.id]=[st],U.push(st)}}}_createProxiedId(h,b,R){let U=this.orthoMatrix;if(R){const K=R.find(ne=>ne.key===b.tileID.key);if(K)return K}if(b.tileID.key!==h.key){const K=h.canonical.z-b.tileID.canonical.z;let ne,ae,he;U=s.create();const be=b.tileID.wrap-h.wrap<<h.overscaledZ;K>0?(ne=s.EXTENT>>K,ae=ne*((b.tileID.canonical.x<<K)-h.canonical.x+be),he=ne*((b.tileID.canonical.y<<K)-h.canonical.y)):(ne=s.EXTENT<<-K,ae=s.EXTENT*(b.tileID.canonical.x-(h.canonical.x+be<<-K)),he=s.EXTENT*(b.tileID.canonical.y-(h.canonical.y<<-K))),s.ortho(U,0,ne,0,ne,0,1),s.translate(U,U,[ae,he,0])}return new Mh(b.tileID,h.key,U)}_findTileCoveringTileID(h,b){let R=b.getTile(h);if(R&&R.hasData())return R;const U=this._findCoveringTileCache[b.id],K=U[h.key];if(R=K?b.getTileByID(K):null,R&&R.hasData()||K===null)return R;let ne=R?R.tileID:h,ae=ne.overscaledZ;const he=b.getSource().minzoom,be=[];if(!K){const Le=b.getSource().maxzoom;if(h.canonical.z>=Le){const He=h.canonical.z-Le;b.getSource().reparseOverscaled?(ae=Math.max(h.canonical.z+2,b.transform.tileZoom),ne=new s.OverscaledTileID(ae,h.wrap,Le,h.canonical.x>>He,h.canonical.y>>He)):He!==0&&(ae=Le,ne=new s.OverscaledTileID(ae,h.wrap,Le,h.canonical.x>>He,h.canonical.y>>He))}ne.key!==h.key&&(be.push(ne.key),R=b.getTile(ne))}const we=Le=>{be.forEach(He=>{U[He]=Le}),be.length=0};for(ae-=1;ae>=he&&(!R||!R.hasData());ae--){R&&we(R.tileID.key);const Le=ne.calculateScaledKey(ae);if(R=b.getTileByID(Le),R&&R.hasData())break;const He=U[Le];if(He===null)break;He===void 0?be.push(Le):R=b.getTileByID(He)}return we(R?R.tileID.key:null),R&&R.hasData()?R:null}findDEMTileFor(h){return this.enabled?this._findTileCoveringTileID(h,this.sourceCache):null}prepareDrawTile(){this.renderedToTile=!0}_clearRenderCacheForTile(h,b){let R=this._tilesDirty[h];R||(R=this._tilesDirty[h]={}),R[b.key]=!0}getWirefameBuffer(){if(!this.wireframeSegments){const h=function(b){let R=0;const U=new s.StructArrayLayout2ui4,K=131;for(let ne=1;ne<129;ne++){for(let ae=1;ae<129;ae++)R=ne*K+ae,U.emplaceBack(R,R+1),U.emplaceBack(R,R+K),U.emplaceBack(R+1,R+K),ne===128&&U.emplaceBack(R+K,R+K+1);U.emplaceBack(R+1,R+1+K)}return U}();this.wireframeIndexBuffer=this.painter.context.createIndexBuffer(h),this.wireframeSegments=s.SegmentVector.simpleSegment(0,0,this.gridBuffer.length,h.length)}return[this.wireframeIndexBuffer,this.wireframeSegments]}}class Ii{static cacheKey(h,b,R,U){let K=`${b}${U?U.cacheKey:""}`;for(const ne of R)h.usedDefines.includes(ne)&&(K+=`/${ne}`);return K}constructor(h,b,R,U,K,ne){const ae=h.gl;this.program=ae.createProgram();const he=function(De){const it=[];for(let yt=0;yt<De.length;yt++){if(De[yt]===null)continue;const mt=De[yt].split(" ");it.push(mt.pop())}return it}(R.staticAttributes),be=U?U.getBinderAttributes():[],we=he.concat(be);let Le=U?U.defines():[];Le=Le.concat(ne.map(De=>`#define ${De}`));const He=h.isWebGL2?`#version 300 es `:"",rt=He+Le.concat(h.extStandardDerivatives&&He.length===0?`#extension GL_OES_standard_derivatives : enable `.concat(Sh):Sh,Sh,xd,Bp.fragmentSource,Vu.fragmentSource,R.fragmentSource).join(` `),st=He+Le.concat(` #ifdef GL_ES precision highp float; #else #if !defined(lowp) #define lowp #endif #if !defined(mediump) #define mediump #endif #if !defined(highp) #define highp #endif #endif`,xd,Bp.vertexSource,Vu.vertexSource,zp.vertexSource,R.vertexSource).join(` `),at=ae.createShader(ae.FRAGMENT_SHADER);if(ae.isContextLost())return void(this.failedToCreate=!0);ae.shaderSource(at,rt),ae.compileShader(at),ae.attachShader(this.program,at);const ut=ae.createShader(ae.VERTEX_SHADER);if(ae.isContextLost())this.failedToCreate=!0;else{ae.shaderSource(ut,st),ae.compileShader(ut),ae.attachShader(this.program,ut),this.attributes={},this.numAttributes=we.length;for(let De=0;De<this.numAttributes;De++)we[De]&&(ae.bindAttribLocation(this.program,De,we[De]),this.attributes[we[De]]=De);ae.linkProgram(this.program),ae.deleteShader(ut),ae.deleteShader(at),this.fixedUniforms=K(h),this.binderUniforms=U?U.getUniforms(h):[],ne.includes("TERRAIN")&&(this.terrainUniforms=(De=>({u_dem:new s.Uniform1i(De),u_dem_prev:new s.Uniform1i(De),u_dem_unpack:new s.Uniform4f(De),u_dem_tl:new s.Uniform2f(De),u_dem_scale:new s.Uniform1f(De),u_dem_tl_prev:new s.Uniform2f(De),u_dem_scale_prev:new s.Uniform1f(De),u_dem_size:new s.Uniform1f(De),u_dem_lerp:new s.Uniform1f(De),u_exaggeration:new s.Uniform1f(De),u_depth:new s.Uniform1i(De),u_depth_size_inv:new s.Uniform2f(De),u_meter_to_dem:new s.Uniform1f(De),u_label_plane_matrix_inv:new s.UniformMatrix4f(De)}))(h)),ne.includes("GLOBE")&&(this.globeUniforms=(De=>({u_tile_tl_up:new s.Uniform3f(De),u_tile_tr_up:new s.Uniform3f(De),u_tile_br_up:new s.Uniform3f(De),u_tile_bl_up:new s.Uniform3f(De),u_tile_up_scale:new s.Uniform1f(De)}))(h)),ne.includes("FOG")&&(this.fogUniforms=(De=>({u_fog_matrix:new s.UniformMatrix4f(De),u_fog_range:new s.Uniform2f(De),u_fog_color:new s.Uniform4f(De),u_fog_horizon_blend:new s.Uniform1f(De),u_fog_temporal_offset:new s.Uniform1f(De),u_frustum_tl:new s.Uniform3f(De),u_frustum_tr:new s.Uniform3f(De),u_frustum_br:new s.Uniform3f(De),u_frustum_bl:new s.Uniform3f(De),u_globe_pos:new s.Uniform3f(De),u_globe_radius:new s.Uniform1f(De),u_globe_transition:new s.Uniform1f(De),u_is_globe:new s.Uniform1i(De),u_viewport:new s.Uniform2f(De)}))(h))}}setTerrainUniformValues(h,b){if(!this.terrainUniforms)return;const R=this.terrainUniforms;if(!this.failedToCreate){h.program.set(this.program);for(const U in b)R[U]&&R[U].set(this.program,U,b[U])}}setGlobeUniformValues(h,b){if(!this.globeUniforms)return;const R=this.globeUniforms;if(!this.failedToCreate){h.program.set(this.program);for(const U in b)R[U]&&R[U].set(this.program,U,b[U])}}setFogUniformValues(h,b){if(!this.fogUniforms)return;const R=this.fogUniforms;if(!this.failedToCreate){h.program.set(this.program);for(const U in b)R[U].set(this.program,U,b[U])}}draw(h,b,R,U,K,ne,ae,he,be,we,Le,He,rt,st,at){const ut=h.gl;if(this.failedToCreate)return;h.program.set(this.program),h.setDepthMode(R),h.setStencilMode(U),h.setColorMode(K),h.setCullFace(ne);for(const it of Object.keys(this.fixedUniforms))this.fixedUniforms[it].set(this.program,it,ae[it]);st&&st.setUniforms(this.program,h,this.binderUniforms,He,{zoom:rt});const De={[ut.LINES]:2,[ut.TRIANGLES]:3,[ut.LINE_STRIP]:1}[b];for(const it of Le.get()){const yt=it.vaos||(it.vaos={});(yt[he]||(yt[he]=new R_)).bind(h,this,be,st?st.getPaintVertexBuffers():[],we,it.vertexOffset,at||[]),ut.drawElements(b,it.primitiveLength*De,ut.UNSIGNED_SHORT,it.primitiveOffset*De*2)}}}function cc(I,h){const b=Math.pow(2,h.tileID.overscaledZ),R=h.tileSize*Math.pow(2,I.transform.tileZoom)/b,U=R*(h.tileID.canonical.x+h.tileID.wrap*b),K=R*h.tileID.canonical.y;return{u_image:0,u_texsize:h.imageAtlasTexture.size,u_tile_units_to_pixels:1/ce(h,1,I.transform.tileZoom),u_pixel_coord_upper:[U>>16,K>>16],u_pixel_coord_lower:[65535&U,65535&K]}}const Ev=s.create(),nu=(I,h,b,R,U,K,ne,ae,he,be,we)=>{const Le=h.style.light,He=Le.properties.get("position"),rt=[He.x,He.y,He.z],st=s.create$1();Le.properties.get("anchor")==="viewport"&&(s.fromRotation(st,-h.transform.angle),s.transformMat3(rt,rt,st));const at=Le.properties.get("color"),ut=h.transform,De={u_matrix:I,u_lightpos:rt,u_lightintensity:Le.properties.get("intensity"),u_lightcolor:[at.r,at.g,at.b],u_vertical_gradient:+b,u_opacity:R,u_tile_id:[0,0,0],u_zoom_transition:0,u_inv_rot_matrix:Ev,u_merc_center:[0,0],u_up_dir:[0,0,0],u_height_lift:0,u_ao:U,u_edge_radius:K};return ut.projection.name==="globe"&&(De.u_tile_id=[ne.canonical.x,ne.canonical.y,1<<ne.canonical.z],De.u_zoom_transition=he,De.u_inv_rot_matrix=we,De.u_merc_center=be,De.u_up_dir=ut.projection.upVector(new s.CanonicalTileID(0,0,0),be[0]*s.EXTENT,be[1]*s.EXTENT),De.u_height_lift=ae),De},ng=(I,h,b,R,U,K,ne,ae,he,be,we,Le)=>{const He=nu(I,h,b,R,U,K,ne,he,be,we,Le),rt={u_height_factor:-Math.pow(2,ne.overscaledZ)/ae.tileSize/8};return s.extend(He,cc(h,ae),rt)},gl=I=>({u_matrix:I}),ig=(I,h,b)=>s.extend(gl(I),cc(h,b)),a0=(I,h)=>({u_matrix:I,u_world:h}),tl=(I,h,b,R)=>s.extend(ig(I,h,b),{u_world:R}),Up=s.create(),Sf=(I,h,b,R,U,K)=>{const ne=I.transform,ae=ne.projection.name==="globe";let he;if(K.paint.get("circle-pitch-alignment")==="map")if(ae){const we=s.globePixelsToTileUnits(ne.zoom,h.canonical)*ne._pixelsPerMercatorPixel;he=Float32Array.from([we,0,0,we])}else he=ne.calculatePixelsToTileUnitsMatrix(b);else he=new Float32Array([ne.pixelsToGLUnits[0],0,0,ne.pixelsToGLUnits[1]]);const be={u_camera_to_center_distance:ne.cameraToCenterDistance,u_matrix:I.translatePosMatrix(h.projMatrix,b,K.paint.get("circle-translate"),K.paint.get("circle-translate-anchor")),u_device_pixel_ratio:s.exported.devicePixelRatio,u_extrude_scale:he,u_inv_rot_matrix:Up,u_merc_center:[0,0],u_tile_id:[0,0,0],u_zoom_transition:0,u_up_dir:[0,0,0]};if(ae){be.u_inv_rot_matrix=R,be.u_merc_center=U,be.u_tile_id=[h.canonical.x,h.canonical.y,1<<h.canonical.z],be.u_zoom_transition=s.globeToMercatorTransition(ne.zoom);const we=U[0]*s.EXTENT,Le=U[1]*s.EXTENT;be.u_up_dir=ne.projection.upVector(new s.CanonicalTileID(0,0,0),we,Le)}return be},Vp=I=>{const h=[];return I.paint.get("circle-pitch-alignment")==="map"&&h.push("PITCH_WITH_MAP"),I.paint.get("circle-pitch-scale")==="map"&&h.push("SCALE_WITH_MAP"),h},Hp=(I,h,b,R)=>{const U=s.EXTENT/b.tileSize;return{u_matrix:I,u_camera_to_center_distance:h.getCameraToCenterDistance(R),u_extrude_scale:[h.pixelsToGLUnits[0]/U,h.pixelsToGLUnits[1]/U]}},Tf=(I,h,b=1)=>({u_matrix:I,u_color:h,u_overlay:0,u_overlay_scale:b}),Sv=s.create(),l0=(I,h,b,R,U,K,ne)=>{const ae=I.transform,he=ae.projection.name==="globe",be=he?s.globePixelsToTileUnits(ae.zoom,h.canonical)*ae._pixelsPerMercatorPixel:ce(b,1,K),we={u_matrix:h.projMatrix,u_extrude_scale:be,u_intensity:ne,u_inv_rot_matrix:Sv,u_merc_center:[0,0],u_tile_id:[0,0,0],u_zoom_transition:0,u_up_dir:[0,0,0]};if(he){we.u_inv_rot_matrix=R,we.u_merc_center=U,we.u_tile_id=[h.canonical.x,h.canonical.y,1<<h.canonical.z],we.u_zoom_transition=s.globeToMercatorTransition(ae.zoom);const Le=U[0]*s.EXTENT,He=U[1]*s.EXTENT;we.u_up_dir=ae.projection.upVector(new s.CanonicalTileID(0,0,0),Le,He)}return we},Jt=(I,h,b,R,U,K,ne)=>{const ae=I.transform,he=ae.calculatePixelsToTileUnitsMatrix(h);return{u_matrix:Wn(I,h,b,R),u_pixels_to_tile_units:he,u_device_pixel_ratio:K,u_units_to_pixels:[1/ae.pixelsToGLUnits[0],1/ae.pixelsToGLUnits[1]],u_dash_image:0,u_gradient_image:1,u_image_height:U,u_texsize:Do(b)?h.lineAtlasTexture.size:[0,0],u_tile_units_to_pixels:dn(h,I.transform),u_alpha_discard_threshold:0,u_trim_offset:ne}},yr=(I,h,b,R,U)=>{const K=I.transform;return{u_matrix:Wn(I,h,b,R),u_texsize:h.imageAtlasTexture.size,u_pixels_to_tile_units:K.calculatePixelsToTileUnitsMatrix(h),u_device_pixel_ratio:U,u_image:0,u_tile_units_to_pixels:dn(h,K),u_units_to_pixels:[1/K.pixelsToGLUnits[0],1/K.pixelsToGLUnits[1]],u_alpha_discard_threshold:0}};function dn(I,h){return 1/ce(I,1,h.tileZoom)}function Wn(I,h,b,R){return I.translatePosMatrix(R||h.tileID.projMatrix,h,b.paint.get("line-translate"),b.paint.get("line-translate-anchor"))}function Do(I){const h=I.paint.get("line-dasharray").value;return h.value||h.kind!=="constant"}const Di=(I,h,b,R,U,K)=>{return{u_matrix:I,u_tl_parent:h,u_scale_parent:b,u_fade_t:R.mix,u_opacity:R.opacity*U.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:U.paint.get("raster-brightness-min"),u_brightness_high:U.paint.get("raster-brightness-max"),u_saturation_factor:(ae=U.paint.get("raster-saturation"),ae>0?1-1/(1.001-ae):-ae),u_contrast_factor:(ne=U.paint.get("raster-contrast"),ne>0?1/(1-ne):1+ne),u_spin_weights:mo(U.paint.get("raster-hue-rotate")),u_perspective_transform:K};var ne,ae};function mo(I){I*=Math.PI/180;const h=Math.sin(I),b=Math.cos(I);return[(2*b+1)/3,(-Math.sqrt(3)*h-b+1)/3,(Math.sqrt(3)*h-b+1)/3]}const Io=s.create(),rl=(I,h,b,R,U,K,ne,ae,he,be,we,Le,He,rt,st,at)=>{const ut=U.transform,De={u_is_size_zoom_constant:+(I==="constant"||I==="source"),u_is_size_feature_constant:+(I==="constant"||I==="camera"),u_size_t:h?h.uSizeT:0,u_size:h?h.uSize:0,u_camera_to_center_distance:ut.cameraToCenterDistance,u_rotate_symbol:+b,u_aspect_ratio:ut.width/ut.height,u_fade_change:U.options.fadeDuration?U.symbolFadeChange:1,u_matrix:K,u_label_plane_matrix:ne,u_coord_matrix:ae,u_is_text:+he,u_pitch_with_map:+R,u_texsize:be,u_texture:0,u_tile_id:[0,0,0],u_zoom_transition:0,u_inv_rot_matrix:Io,u_merc_center:[0,0],u_camera_forward:[0,0,0],u_ecef_origin:[0,0,0],u_tile_matrix:Io,u_up_vector:[0,-1,0]};return at.name==="globe"&&(De.u_tile_id=[we.canonical.x,we.canonical.y,1<<we.canonical.z],De.u_zoom_transition=Le,De.u_inv_rot_matrix=rt,De.u_merc_center=He,De.u_camera_forward=ut._camera.forward(),De.u_ecef_origin=s.globeECEFOrigin(ut.globeMatrix,we.toUnwrapped()),De.u_tile_matrix=Float32Array.from(ut.globeMatrix),De.u_up_vector=st),De},Ps=(I,h,b,R,U,K,ne,ae,he,be,we,Le,He,rt,st,at,ut)=>s.extend(rl(I,h,b,R,U,K,ne,ae,he,be,Le,He,rt,st,at,ut),{u_gamma_scale:R?U.transform.cameraToCenterDistance*Math.cos(U.terrain?0:U.transform._pitch):1,u_device_pixel_ratio:s.exported.devicePixelRatio,u_is_halo:+we}),Ys=(I,h,b,R,U,K,ne,ae,he,be,we,Le,He,rt,st,at)=>s.extend(Ps(I,h,b,R,U,K,ne,ae,!0,he,!0,we,Le,He,rt,st,at),{u_texsize_icon:be,u_texture_icon:1}),uc=(I,h,b)=>({u_matrix:I,u_opacity:h,u_color:b}),Tl=(I,h,b,R,U)=>s.extend(function(K,ne,ae){const he=ne.imageManager.getPattern(K.toString()),{width:be,height:we}=ne.imageManager.getPixelSize(),Le=Math.pow(2,ae.tileID.overscaledZ),He=ae.tileSize*Math.pow(2,ne.transform.tileZoom)/Le,rt=He*(ae.tileID.canonical.x+ae.tileID.wrap*Le),st=He*ae.tileID.canonical.y;return{u_image:0,u_pattern_tl:he.tl,u_pattern_br:he.br,u_texsize:[be,we],u_pattern_size:he.displaySize,u_tile_units_to_pixels:1/ce(ae,1,ne.transform.tileZoom),u_pixel_coord_upper:[rt>>16,st>>16],u_pixel_coord_lower:[65535&rt,65535&st]}}(R,b,U),{u_matrix:I,u_opacity:h}),Ko={fillExtrusion:I=>({u_matrix:new s.UniformMatrix4f(I),u_lightpos:new s.Uniform3f(I),u_lightintensity:new s.Uniform1f(I),u_lightcolor:new s.Uniform3f(I),u_vertical_gradient:new s.Uniform1f(I),u_opacity:new s.Uniform1f(I),u_edge_radius:new s.Uniform1f(I),u_ao:new s.Uniform2f(I),u_tile_id:new s.Uniform3f(I),u_zoom_transition:new s.Uniform1f(I),u_inv_rot_matrix:new s.UniformMatrix4f(I),u_merc_center:new s.Uniform2f(I),u_up_dir:new s.Uniform3f(I),u_height_lift:new s.Uniform1f(I)}),fillExtrusionPattern:I=>({u_matrix:new s.UniformMatrix4f(I),u_lightpos:new s.Uniform3f(I),u_lightintensity:new s.Uniform1f(I),u_lightcolor:new s.Uniform3f(I),u_vertical_gradient:new s.Uniform1f(I),u_height_factor:new s.Uniform1f(I),u_edge_radius:new s.Uniform1f(I),u_ao:new s.Uniform2f(I),u_tile_id:new s.Uniform3f(I),u_zoom_transition:new s.Uniform1f(I),u_inv_rot_matrix:new s.UniformMatrix4f(I),u_merc_center:new s.Uniform2f(I),u_up_dir:new s.Uniform3f(I),u_height_lift:new s.Uniform1f(I),u_image:new s.Uniform1i(I),u_texsize:new s.Uniform2f(I),u_pixel_coord_upper:new s.Uniform2f(I),u_pixel_coord_lower:new s.Uniform2f(I),u_tile_units_to_pixels:new s.Uniform1f(I),u_opacity:new s.Uniform1f(I)}),fill:I=>({u_matrix:new s.UniformMatrix4f(I)}),fillPattern:I=>({u_matrix:new s.UniformMatrix4f(I),u_image:new s.Uniform1i(I),u_texsize:new s.Uniform2f(I),u_pixel_coord_upper:new s.Uniform2f(I),u_pixel_coord_lower:new s.Uniform2f(I),u_tile_units_to_pixels:new s.Uniform1f(I)}),fillOutline:I=>({u_matrix:new s.UniformMatrix4f(I),u_world:new s.Uniform2f(I)}),fillOutlinePattern:I=>({u_matrix:new s.UniformMatrix4f(I),u_world:new s.Uniform2f(I),u_image:new s.Uniform1i(I),u_texsize:new s.Uniform2f(I),u_pixel_coord_upper:new s.Uniform2f(I),u_pixel_coord_lower:new s.Uniform2f(I),u_tile_units_to_pixels:new s.Uniform1f(I)}),circle:I=>({u_camera_to_center_distance:new s.Uniform1f(I),u_extrude_scale:new s.UniformMatrix2f(I),u_device_pixel_ratio:new s.Uniform1f(I),u_matrix:new s.UniformMatrix4f(I),u_inv_rot_matrix:new s.UniformMatrix4f(I),u_merc_center:new s.Uniform2f(I),u_tile_id:new s.Uniform3f(I),u_zoom_transition:new s.Uniform1f(I),u_up_dir:new s.Uniform3f(I)}),collisionBox:I=>({u_matrix:new s.UniformMatrix4f(I),u_camera_to_center_distance:new s.Uniform1f(I),u_extrude_scale:new s.Uniform2f(I)}),collisionCircle:I=>({u_matrix:new s.UniformMatrix4f(I),u_inv_matrix:new s.UniformMatrix4f(I),u_camera_to_center_distance:new s.Uniform1f(I),u_viewport_size:new s.Uniform2f(I)}),debug:I=>({u_color:new s.UniformColor(I),u_matrix:new s.UniformMatrix4f(I),u_overlay:new s.Uniform1i(I),u_overlay_scale:new s.Uniform1f(I)}),clippingMask:I=>({u_matrix:new s.UniformMatrix4f(I)}),heatmap:I=>({u_extrude_scale:new s.Uniform1f(I),u_intensity:new s.Uniform1f(I),u_matrix:new s.UniformMatrix4f(I),u_inv_rot_matrix:new s.UniformMatrix4f(I),u_merc_center:new s.Uniform2f(I),u_tile_id:new s.Uniform3f(I),u_zoom_transition:new s.Uniform1f(I),u_up_dir:new s.Uniform3f(I)}),heatmapTexture:I=>({u_image:new s.Uniform1i(I),u_color_ramp:new s.Uniform1i(I),u_opacity:new s.Uniform1f(I)}),hillshade:I=>({u_matrix:new s.UniformMatrix4f(I),u_image:new s.Uniform1i(I),u_latrange:new s.Uniform2f(I),u_light:new s.Uniform2f(I),u_shadow:new s.UniformColor(I),u_highlight:new s.UniformColor(I),u_accent:new s.UniformColor(I)}),hillshadePrepare:I=>({u_matrix:new s.UniformMatrix4f(I),u_image:new s.Uniform1i(I),u_dimension:new s.Uniform2f(I),u_zoom:new s.Uniform1f(I),u_unpack:new s.Uniform4f(I)}),line:I=>({u_matrix:new s.UniformMatrix4f(I),u_pixels_to_tile_units:new s.UniformMatrix2f(I),u_device_pixel_ratio:new s.Uniform1f(I),u_units_to_pixels:new s.Uniform2f(I),u_dash_image:new s.Uniform1i(I),u_gradient_image:new s.Uniform1i(I),u_image_height:new s.Uniform1f(I),u_texsize:new s.Uniform2f(I),u_tile_units_to_pixels:new s.Uniform1f(I),u_alpha_discard_threshold:new s.Uniform1f(I),u_trim_offset:new s.Uniform2f(I)}),linePattern:I=>({u_matrix:new s.UniformMatrix4f(I),u_texsize:new s.Uniform2f(I),u_pixels_to_tile_units:new s.UniformMatrix2f(I),u_device_pixel_ratio:new s.Uniform1f(I),u_image:new s.Uniform1i(I),u_units_to_pixels:new s.Uniform2f(I),u_tile_units_to_pixels:new s.Uniform1f(I),u_alpha_discard_threshold:new s.Uniform1f(I)}),raster:I=>({u_matrix:new s.UniformMatrix4f(I),u_tl_parent:new s.Uniform2f(I),u_scale_parent:new s.Uniform1f(I),u_fade_t:new s.Uniform1f(I),u_opacity:new s.Uniform1f(I),u_image0:new s.Uniform1i(I),u_image1:new s.Uniform1i(I),u_brightness_low:new s.Uniform1f(I),u_brightness_high:new s.Uniform1f(I),u_saturation_factor:new s.Uniform1f(I),u_contrast_factor:new s.Uniform1f(I),u_spin_weights:new s.Uniform3f(I),u_perspective_transform:new s.Uniform2f(I)}),symbolIcon:I=>({u_is_size_zoom_constant:new s.Uniform1i(I),u_is_size_feature_constant:new s.Uniform1i(I),u_size_t:new s.Uniform1f(I),u_size:new s.Uniform1f(I),u_camera_to_center_distance:new s.Uniform1f(I),u_rotate_symbol:new s.Uniform1i(I),u_aspect_ratio:new s.Uniform1f(I),u_fade_change:new s.Uniform1f(I),u_matrix:new s.UniformMatrix4f(I),u_label_plane_matrix:new s.UniformMatrix4f(I),u_coord_matrix:new s.UniformMatrix4f(I),u_is_text:new s.Uniform1i(I),u_pitch_with_map:new s.Uniform1i(I),u_texsize:new s.Uniform2f(I),u_tile_id:new s.Uniform3f(I),u_zoom_transition:new s.Uniform1f(I),u_inv_rot_matrix:new s.UniformMatrix4f(I),u_merc_center:new s.Uniform2f(I),u_camera_forward:new s.Uniform3f(I),u_tile_matrix:new s.UniformMatrix4f(I),u_up_vector:new s.Uniform3f(I),u_ecef_origin:new s.Uniform3f(I),u_texture:new s.Uniform1i(I)}),symbolSDF:I=>({u_is_size_zoom_constant:new s.Uniform1i(I),u_is_size_feature_constant:new s.Uniform1i(I),u_size_t:new s.Uniform1f(I),u_size:new s.Uniform1f(I),u_camera_to_center_distance:new s.Uniform1f(I),u_rotate_symbol:new s.Uniform1i(I),u_aspect_ratio:new s.Uniform1f(I),u_fade_change:new s.Uniform1f(I),u_matrix:new s.UniformMatrix4f(I),u_label_plane_matrix:new s.UniformMatrix4f(I),u_coord_matrix:new s.UniformMatrix4f(I),u_is_text:new s.Uniform1i(I),u_pitch_with_map:new s.Uniform1i(I),u_texsize:new s.Uniform2f(I),u_texture:new s.Uniform1i(I),u_gamma_scale:new s.Uniform1f(I),u_device_pixel_ratio:new s.Uniform1f(I),u_tile_id:new s.Uniform3f(I),u_zoom_transition:new s.Uniform1f(I),u_inv_rot_matrix:new s.UniformMatrix4f(I),u_merc_center:new s.Uniform2f(I),u_camera_forward:new s.Uniform3f(I),u_tile_matrix:new s.UniformMatrix4f(I),u_up_vector:new s.Uniform3f(I),u_ecef_origin:new s.Uniform3f(I),u_is_halo:new s.Uniform1i(I)}),symbolTextAndIcon:I=>({u_is_size_zoom_constant:new s.Uniform1i(I),u_is_size_feature_constant:new s.Uniform1i(I),u_size_t:new s.Uniform1f(I),u_size:new s.Uniform1f(I),u_camera_to_center_distance:new s.Uniform1f(I),u_rotate_symbol:new s.Uniform1i(I),u_aspect_ratio:new s.Uniform1f(I),u_fade_change:new s.Uniform1f(I),u_matrix:new s.UniformMatrix4f(I),u_label_plane_matrix:new s.UniformMatrix4f(I),u_coord_matrix:new s.UniformMatrix4f(I),u_is_text:new s.Uniform1i(I),u_pitch_with_map:new s.Uniform1i(I),u_texsize:new s.Uniform2f(I),u_texsize_icon:new s.Uniform2f(I),u_texture:new s.Uniform1i(I),u_texture_icon:new s.Uniform1i(I),u_gamma_scale:new s.Uniform1f(I),u_device_pixel_ratio:new s.Uniform1f(I),u_is_halo:new s.Uniform1i(I)}),background:I=>({u_matrix:new s.UniformMatrix4f(I),u_opacity:new s.Uniform1f(I),u_color:new s.UniformColor(I)}),backgroundPattern:I=>({u_matrix:new s.UniformMatrix4f(I),u_opacity:new s.Uniform1f(I),u_image:new s.Uniform1i(I),u_pattern_tl:new s.Uniform2f(I),u_pattern_br:new s.Uniform2f(I),u_texsize:new s.Uniform2f(I),u_pattern_size:new s.Uniform2f(I),u_pixel_coord_upper:new s.Uniform2f(I),u_pixel_coord_lower:new s.Uniform2f(I),u_tile_units_to_pixels:new s.Uniform1f(I)}),terrainRaster:po,terrainDepth:po,skybox:I=>({u_matrix:new s.UniformMatrix4f(I),u_sun_direction:new s.Uniform3f(I),u_cubemap:new s.Uniform1i(I),u_opacity:new s.Uniform1f(I),u_temporal_offset:new s.Uniform1f(I)}),skyboxGradient:I=>({u_matrix:new s.UniformMatrix4f(I),u_color_ramp:new s.Uniform1i(I),u_center_direction:new s.Uniform3f(I),u_radius:new s.Uniform1f(I),u_opacity:new s.Uniform1f(I),u_temporal_offset:new s.Uniform1f(I)}),skyboxCapture:I=>({u_matrix_3f:new s.UniformMatrix3f(I),u_sun_direction:new s.Uniform3f(I),u_sun_intensity:new s.Uniform1f(I),u_color_tint_r:new s.Uniform4f(I),u_color_tint_m:new s.Uniform4f(I),u_luminance:new s.Uniform1f(I)}),globeRaster:I=>({u_proj_matrix:new s.UniformMatrix4f(I),u_globe_matrix:new s.UniformMatrix4f(I),u_normalize_matrix:new s.UniformMatrix4f(I),u_merc_matrix:new s.UniformMatrix4f(I),u_zoom_transition:new s.Uniform1f(I),u_merc_center:new s.Uniform2f(I),u_image0:new s.Uniform1i(I),u_grid_matrix:new s.UniformMatrix3f(I),u_skirt_height:new s.Uniform1f(I),u_frustum_tl:new s.Uniform3f(I),u_frustum_tr:new s.Uniform3f(I),u_frustum_br:new s.Uniform3f(I),u_frustum_bl:new s.Uniform3f(I),u_globe_pos:new s.Uniform3f(I),u_globe_radius:new s.Uniform1f(I),u_viewport:new s.Uniform2f(I)}),globeAtmosphere:I=>({u_frustum_tl:new s.Uniform3f(I),u_frustum_tr:new s.Uniform3f(I),u_frustum_br:new s.Uniform3f(I),u_frustum_bl:new s.Uniform3f(I),u_horizon:new s.Uniform1f(I),u_transition:new s.Uniform1f(I),u_fadeout_range:new s.Uniform1f(I),u_color:new s.Uniform4f(I),u_high_color:new s.Uniform4f(I),u_space_color:new s.Uniform4f(I),u_star_intensity:new s.Uniform1f(I),u_star_density:new s.Uniform1f(I),u_star_size:new s.Uniform1f(I),u_temporal_offset:new s.Uniform1f(I),u_horizon_angle:new s.Uniform1f(I),u_rotation_matrix:new s.UniformMatrix4f(I)})};let ql;function iu(I,h,b,R,U,K,ne){const ae=I.context,he=ae.gl,be=I.transform,we=I.useProgram("collisionBox"),Le=[];let He=0,rt=0;for(let mt=0;mt<R.length;mt++){const kt=R[mt],Lt=h.getTile(kt),At=Lt.getBucket(b);if(!At)continue;const Yt=Ue(kt,At,be);let Vt=Yt;U[0]===0&&U[1]===0||(Vt=I.translatePosMatrix(Yt,Lt,U,K));const or=ne?At.textCollisionBox:At.iconCollisionBox,Wr=At.collisionCircleArray;if(Wr.length>0){const Qt=s.create(),Tr=Vt;s.mul(Qt,At.placementInvProjMatrix,be.glCoordMatrix),s.mul(Qt,Qt,At.placementViewportMatrix),Le.push({circleArray:Wr,circleOffset:rt,transform:Tr,invTransform:Qt,projection:At.getProjection()}),He+=Wr.length/4,rt=He}or&&(I.terrain&&I.terrain.setupElevationDraw(Lt,we),we.draw(ae,he.LINES,s.DepthMode.disabled,s.StencilMode.disabled,I.colorModeForRenderPass(),s.CullFaceMode.disabled,Hp(Vt,be,Lt,At.getProjection()),b.id,or.layoutVertexBuffer,or.indexBuffer,or.segments,null,be.zoom,null,[or.collisionVertexBuffer,or.collisionVertexBufferExt]))}if(!ne||!Le.length)return;const st=I.useProgram("collisionCircle"),at=new s.StructArrayLayout2f1f2i16;at.resize(4*He),at._trim();let ut=0;for(const mt of Le)for(let kt=0;kt<mt.circleArray.length/4;kt++){const Lt=4*kt,At=mt.circleArray[Lt+0],Yt=mt.circleArray[Lt+1],Vt=mt.circleArray[Lt+2],or=mt.circleArray[Lt+3];at.emplace(ut++,At,Yt,Vt,or,0),at.emplace(ut++,At,Yt,Vt,or,1),at.emplace(ut++,At,Yt,Vt,or,2),at.emplace(ut++,At,Yt,Vt,or,3)}(!ql||ql.length<2*He)&&(ql=function(mt){const kt=2*mt,Lt=new s.StructArrayLayout3ui6;Lt.resize(kt),Lt._trim();for(let At=0;At<kt;At++){const Yt=6*At;Lt.uint16[Yt+0]=4*At+0,Lt.uint16[Yt+1]=4*At+1,Lt.uint16[Yt+2]=4*At+2,Lt.uint16[Yt+3]=4*At+2,Lt.uint16[Yt+4]=4*At+3,Lt.uint16[Yt+5]=4*At+0}return Lt}(He));const De=ae.createIndexBuffer(ql,!0),it=ae.createVertexBuffer(at,s.collisionCircleLayout.members,!0);for(const mt of Le){const kt={u_matrix:mt.transform,u_inv_matrix:mt.invTransform,u_camera_to_center_distance:(yt=be).getCameraToCenterDistance(mt.projection),u_viewport_size:[yt.width,yt.height]};st.draw(ae,he.TRIANGLES,s.DepthMode.disabled,s.StencilMode.disabled,I.colorModeForRenderPass(),s.CullFaceMode.disabled,kt,b.id,it,De,s.SegmentVector.simpleSegment(0,2*mt.circleOffset,mt.circleArray.length,mt.circleArray.length/2),null,be.zoom)}var yt;it.destroy(),De.destroy()}const Wp=s.create();function Pf({width:I,height:h,anchor:b,textOffset:R,textScale:U},K){const{horizontalAlign:ne,verticalAlign:ae}=s.getAnchorAlignment(b),he=-(ne-.5)*I,be=-(ae-.5)*h,we=s.evaluateVariableOffset(b,R);return new s.Point((he/U+we[0])*K,(be/U+we[1])*K)}function Gp(I,h,b,R,U,K,ne,ae,he,be,we){const Le=I.text.placedSymbolArray,He=I.text.dynamicLayoutVertexArray,rt=I.icon.dynamicLayoutVertexArray,st={},at=I.getProjection(),ut=Et(ae,at,K),De=K.elevation,it=at.upVectorScale(ae.canonical,K.center.lat,K.worldSize).metersToTile;He.clear();for(let yt=0;yt<Le.length;yt++){const mt=Le.get(yt),{tileAnchorX:kt,tileAnchorY:Lt,numGlyphs:At}=mt,Yt=mt.hidden||!mt.crossTileID||I.allowVerticalPlacement&&!mt.placedOrientation?null:R[mt.crossTileID];if(Yt){let Vt=0,or=0,Wr=0;if(De){const Yr=De?De.getAtTileOffset(ae,kt,Lt):0,[Nn,li,Cn]=at.upVector(ae.canonical,kt,Lt);Vt=Yr*Nn*it,or=Yr*li*it,Wr=Yr*Cn*it}let[Qt,Tr,fr,jr]=ho(mt.projectedAnchorX+Vt,mt.projectedAnchorY+or,mt.projectedAnchorZ+Wr,b?ut:ne);const lr=qs(K.getCameraToCenterDistance(at),jr);let xr=U.evaluateSizeForFeature(I.textSizeData,be,mt)*lr/s.ONE_EM;b&&(xr*=I.tilePixelRatio/he);const qr=Pf(Yt,xr);b?({x:Qt,y:Tr,z:fr}=at.projectTilePoint(kt+qr.x,Lt+qr.y,ae.canonical),[Qt,Tr,fr]=ho(Qt+Vt,Tr+or,fr+Wr,ne)):(h&&qr._rotate(-K.angle),Qt+=qr.x,Tr+=qr.y,fr=0);const Rr=I.allowVerticalPlacement&&mt.placedOrientation===s.WritingMode.vertical?Math.PI/2:0;for(let Yr=0;Yr<At;Yr++)s.addDynamicAttributes(He,Qt,Tr,fr,Rr);we&&mt.associatedIconIndex>=0&&(st[mt.associatedIconIndex]={x:Qt,y:Tr,z:fr,angle:Rr})}else Uo(At,He)}if(we){rt.clear();const yt=I.icon.placedSymbolArray;for(let mt=0;mt<yt.length;mt++){const kt=yt.get(mt),{numGlyphs:Lt}=kt,At=st[mt];if(kt.hidden||!At)Uo(Lt,rt);else{const{x:Yt,y:Vt,z:or,angle:Wr}=At;for(let Qt=0;Qt<Lt;Qt++)s.addDynamicAttributes(rt,Yt,Vt,or,Wr)}}I.icon.dynamicLayoutVertexBuffer.updateData(rt)}I.text.dynamicLayoutVertexBuffer.updateData(He)}function og(I,h,b){return b.iconsInText&&h?"symbolTextAndIcon":I?"symbolSDF":"symbolIcon"}function Sd(I,h,b,R,U,K,ne,ae,he,be,we,Le){const He=I.context,rt=He.gl,st=I.transform,at=ae==="map",ut=he==="map",De=at&&b.layout.get("symbol-placement")!=="point",it=at&&!ut&&!De,yt=b.layout.get("symbol-sort-key").constantOr(1)!==void 0;let mt=!1;const kt=I.depthModeForSublayer(0,s.DepthMode.ReadOnly),Lt=[s.mercatorXfromLng(st.center.lng),s.mercatorYfromLat(st.center.lat)],At=b.layout.get("text-variable-anchor"),Yt=st.projection.name==="globe",Vt=[],or=[0,-1,0];let Wr=or;!Yt&&!st.mercatorFromTransition||at||(Wr=function(Qt){const Tr=Qt._camera.getWorldToCamera(Qt.worldSize,1),fr=s.multiply([],Tr,Qt.globeMatrix);s.invert(fr,fr);const jr=[0,0,0],lr=[0,1,0,0];return s.transformMat4$1(lr,lr,fr),jr[0]=lr[0],jr[1]=lr[1],jr[2]=lr[2],s.normalize(jr,jr),jr}(st));for(const Qt of R){const Tr=h.getTile(Qt),fr=Tr.getBucket(b);if(!fr||fr.projection.name==="mercator"&&Yt)continue;const jr=U?fr.text:fr.icon;if(!jr||fr.fullyClipped||!jr.segments.get().length)continue;const lr=jr.programConfigurations.get(b.id),xr=U||fr.sdfIcons,qr=U?fr.textSizeData:fr.iconSizeData,Rr=ut||st.pitch!==0,Yr=s.evaluateSizeForZoom(qr,st.zoom);let Nn,li,Cn,Gn,Ri=[0,0],bi=null;if(U)li=Tr.glyphAtlasTexture,Cn=rt.LINEAR,Nn=Tr.glyphAtlasTexture.size,fr.iconsInText&&(Ri=Tr.imageAtlasTexture.size,bi=Tr.imageAtlasTexture,Gn=Rr||I.options.rotating||I.options.zooming||qr.kind==="composite"||qr.kind==="camera"?rt.LINEAR:rt.NEAREST);else{const Lf=b.layout.get("icon-size").constantOr(0)!==1||fr.iconsNeedLinear;li=Tr.imageAtlasTexture,Cn=xr||I.options.rotating||I.options.zooming||Lf||Rr?rt.LINEAR:rt.NEAREST,Nn=Tr.imageAtlasTexture.size}const An=fr.projection.name==="globe",_o=An?Wr:or,Vo=An?s.globeToMercatorTransition(st.zoom):0,Ho=Et(Qt,fr.getProjection(),st),No=st.calculatePixelsToTileUnitsMatrix(Tr),il=dr(Ho,Tr.tileID.canonical,ut,at,st,fr.getProjection(),No),ol=I.terrain&&ut&&De?s.invert(s.create(),il):Wp,dc=Li(Ho,Tr.tileID.canonical,ut,at,st,fr.getProjection(),No),qu=At&&fr.hasTextData(),cs=b.layout.get("icon-text-fit")!=="none"&&qu&&fr.hasIconData();if(De){const Lf=st.elevation,Df=Lf?Lf.getAtTileOffsetFunc(Qt,st.center.lat,st.worldSize,fr.getProjection()):null,nm=Oi(Ho,Tr.tileID.canonical,ut,at,st,fr.getProjection(),No);an(fr,Ho,I,U,nm,dc,ut,be,Df,Qt)}const $o=De||U&&At||cs,qi=I.translatePosMatrix(Ho,Tr,K,ne),aa=$o?Wp:il,Ml=I.translatePosMatrix(dc,Tr,K,ne,!0),ts=fr.getProjection().createInversionMatrix(st,Qt.canonical),hc=[];I.terrainRenderModeElevated()&&ut&&hc.push("PITCH_WITH_MAP_TERRAIN"),An&&hc.push("PROJECTION_GLOBE_VIEW"),$o&&hc.push("PROJECTED_POS_ON_VIEWPORT");const Ov=xr&&b.paint.get(U?"text-halo-width":"icon-halo-width").constantOr(1)!==0;let tm;tm=xr?fr.iconsInText?Ys(qr.kind,Yr,it,ut,I,qi,aa,Ml,Nn,Ri,Qt,Vo,Lt,ts,_o,fr.getProjection()):Ps(qr.kind,Yr,it,ut,I,qi,aa,Ml,U,Nn,!0,Qt,Vo,Lt,ts,_o,fr.getProjection()):rl(qr.kind,Yr,it,ut,I,qi,aa,Ml,U,Nn,Qt,Vo,Lt,ts,_o,fr.getProjection());const rm={program:I.useProgram(og(xr,U,fr),lr,hc),buffers:jr,uniformValues:tm,atlasTexture:li,atlasTextureIcon:bi,atlasInterpolation:Cn,atlasInterpolationIcon:Gn,isSDF:xr,hasHalo:Ov,tile:Tr,labelPlaneMatrixInv:ol};if(yt&&fr.canOverlap){mt=!0;const Lf=jr.segments.get();for(const Df of Lf)Vt.push({segments:new s.SegmentVector([Df]),sortKey:Df.sortKey,state:rm})}else Vt.push({segments:jr.segments,sortKey:0,state:rm})}mt&&Vt.sort((Qt,Tr)=>Qt.sortKey-Tr.sortKey);for(const Qt of Vt){const Tr=Qt.state;if(I.terrain&&I.terrain.setupElevationDraw(Tr.tile,Tr.program,{useDepthForOcclusion:!Yt,labelPlaneMatrixInv:Tr.labelPlaneMatrixInv}),He.activeTexture.set(rt.TEXTURE0),Tr.atlasTexture.bind(Tr.atlasInterpolation,rt.CLAMP_TO_EDGE),Tr.atlasTextureIcon&&(He.activeTexture.set(rt.TEXTURE1),Tr.atlasTextureIcon&&Tr.atlasTextureIcon.bind(Tr.atlasInterpolationIcon,rt.CLAMP_TO_EDGE)),Tr.isSDF){const fr=Tr.uniformValues;Tr.hasHalo&&(fr.u_is_halo=1,Zt(Tr.buffers,Qt.segments,b,I,Tr.program,kt,we,Le,fr)),fr.u_is_halo=0}Zt(Tr.buffers,Qt.segments,b,I,Tr.program,kt,we,Le,Tr.uniformValues)}}function Zt(I,h,b,R,U,K,ne,ae,he){const be=R.context,we=[I.dynamicLayoutVertexBuffer,I.opacityVertexBuffer,I.globeExtVertexBuffer];U.draw(be,be.gl.TRIANGLES,K,ne,ae,s.CullFaceMode.disabled,he,b.id,I.layoutVertexBuffer,I.indexBuffer,h,b.paint,R.transform.zoom,I.programConfigurations.get(b.id),we)}function gr(I,h,b,R,U,K,ne){const ae=I.context.gl,he=b.paint.get("fill-pattern"),be=he&&he.constantOr(1);let we,Le,He,rt,st;ne?(Le=be&&!b.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",we=ae.LINES):(Le=be?"fillPattern":"fill",we=ae.TRIANGLES);for(const at of R){const ut=h.getTile(at);if(be&&!ut.patternsLoaded())continue;const De=ut.getBucket(b);if(!De)continue;I.prepareDrawTile();const it=De.programConfigurations.get(b.id),yt=I.useProgram(Le,it);be&&(I.context.activeTexture.set(ae.TEXTURE0),ut.imageAtlasTexture.bind(ae.LINEAR,ae.CLAMP_TO_EDGE),it.updatePaintBuffers());const mt=he.constantOr(null);if(mt&&ut.imageAtlas){const Lt=ut.imageAtlas.patternPositions[mt.toString()];Lt&&it.setConstantPatternPositions(Lt)}const kt=I.translatePosMatrix(at.projMatrix,ut,b.paint.get("fill-translate"),b.paint.get("fill-translate-anchor"));if(ne){rt=De.indexBuffer2,st=De.segments2;const Lt=I.terrain&&I.terrain.renderingToTexture?I.terrain.drapeBufferSize:[ae.drawingBufferWidth,ae.drawingBufferHeight];He=Le==="fillOutlinePattern"&&be?tl(kt,I,ut,Lt):a0(kt,Lt)}else rt=De.indexBuffer,st=De.segments,He=be?ig(kt,I,ut):gl(kt);I.prepareDrawProgram(I.context,yt,at.toUnwrapped()),yt.draw(I.context,we,U,I.stencilModeForClipping(at),K,s.CullFaceMode.disabled,He,b.id,De.layoutVertexBuffer,rt,st,b.paint,I.transform.zoom,it)}}function ir(I,h,b,R,U,K,ne){const ae=I.context,he=ae.gl,be=I.transform,we=b.paint.get("fill-extrusion-pattern"),Le=we.constantOr(1),He=b.paint.get("fill-extrusion-opacity"),rt=[b.paint.get("fill-extrusion-ambient-occlusion-intensity"),b.paint.get("fill-extrusion-ambient-occlusion-radius")],st=b.layout.get("fill-extrusion-edge-radius"),at=st>0&&!b.paint.get("fill-extrusion-rounded-roof"),ut=at?0:st,De=be.projection.name==="globe"?s.fillExtrusionHeightLift():0,it=be.projection.name==="globe",yt=it?s.globeToMercatorTransition(be.zoom):0,mt=[s.mercatorXfromLng(be.center.lng),s.mercatorYfromLat(be.center.lat)],kt=[];it&&kt.push("PROJECTION_GLOBE_VIEW"),rt[0]>0&&kt.push("FAUX_AO"),at&&kt.push("ZERO_ROOF_RADIUS");for(const Lt of R){const At=h.getTile(Lt),Yt=At.getBucket(b);if(!Yt||Yt.projection.name!==be.projection.name)continue;const Vt=Yt.programConfigurations.get(b.id),or=I.useProgram(Le?"fillExtrusionPattern":"fillExtrusion",Vt,kt);if(I.terrain){const xr=I.terrain;if(I.style.terrainSetForDrapingOnly())xr.setupElevationDraw(At,or,{useMeterToDem:!0});else{if(!Yt.enableTerrain)continue;if(xr.setupElevationDraw(At,or,{useMeterToDem:!0}),In(ae,h,Lt,Yt,b,xr),!Yt.centroidVertexBuffer){const qr=or.attributes.a_centroid_pos;qr!==void 0&&he.vertexAttrib2f(qr,0,0)}}}Le&&(I.context.activeTexture.set(he.TEXTURE0),At.imageAtlasTexture.bind(he.LINEAR,he.CLAMP_TO_EDGE),Vt.updatePaintBuffers());const Wr=we.constantOr(null);if(Wr&&At.imageAtlas){const xr=At.imageAtlas.patternPositions[Wr.toString()];xr&&Vt.setConstantPatternPositions(xr)}const Qt=I.translatePosMatrix(Lt.projMatrix,At,b.paint.get("fill-extrusion-translate"),b.paint.get("fill-extrusion-translate-anchor")),Tr=be.projection.createInversionMatrix(be,Lt.canonical),fr=b.paint.get("fill-extrusion-vertical-gradient"),jr=Le?ng(Qt,I,fr,He,rt,ut,Lt,At,De,yt,mt,Tr):nu(Qt,I,fr,He,rt,ut,Lt,De,yt,mt,Tr);I.prepareDrawProgram(ae,or,Lt.toUnwrapped());const lr=[];I.terrain&&lr.push(Yt.centroidVertexBuffer),it&&lr.push(Yt.layoutVertexExtBuffer),or.draw(ae,ae.gl.TRIANGLES,U,K,ne,s.CullFaceMode.backCCW,jr,b.id,Yt.layoutVertexBuffer,Yt.indexBuffer,Yt.segments,b.paint,I.transform.zoom,Vt,lr)}}function In(I,h,b,R,U,K){const ne=[De=>{let it=De.canonical.x-1,yt=De.wrap;return it<0&&(it=(1<<De.canonical.z)-1,yt--),new s.OverscaledTileID(De.overscaledZ,yt,De.canonical.z,it,De.canonical.y)},De=>{let it=De.canonical.x+1,yt=De.wrap;return it===1<<De.canonical.z&&(it=0,yt++),new s.OverscaledTileID(De.overscaledZ,yt,De.canonical.z,it,De.canonical.y)},De=>new s.OverscaledTileID(De.overscaledZ,De.wrap,De.canonical.z,De.canonical.x,(De.canonical.y===0?1<<De.canonical.z:De.canonical.y)-1),De=>new s.OverscaledTileID(De.overscaledZ,De.wrap,De.canonical.z,De.canonical.x,De.canonical.y===(1<<De.canonical.z)-1?0:De.canonical.y+1)],ae=De=>{const it=h.getSource().minzoom,yt=kt=>{const Lt=h.getTileByID(kt);if(Lt&&Lt.hasData())return Lt.getBucket(U)},mt=[0,-1,1];for(const kt of mt){if(De.overscaledZ+kt<it)continue;const Lt=yt(De.calculateScaledKey(De.overscaledZ+kt));if(Lt)return Lt}},he=[0,0,0],be=(De,it)=>(he[0]=Math.min(De.min.y,it.min.y),he[1]=Math.max(De.max.y,it.max.y),he[2]=s.EXTENT-it.min.x>De.max.x?it.min.x-s.EXTENT:De.max.x,he),we=(De,it)=>(he[0]=Math.min(De.min.x,it.min.x),he[1]=Math.max(De.max.x,it.max.x),he[2]=s.EXTENT-it.min.y>De.max.y?it.min.y-s.EXTENT:De.max.y,he),Le=[(De,it)=>be(De,it),(De,it)=>be(it,De),(De,it)=>we(De,it),(De,it)=>we(it,De)],He=new s.Point(0,0);let rt,st,at;const ut=(De,it,yt,mt,kt)=>{const Lt=[[mt?yt:De,mt?De:yt,0],[mt?yt:it,mt?it:yt,0]],At=kt<0?s.EXTENT+kt:kt,Yt=[mt?At:(De+it)/2,mt?(De+it)/2:At,0];return yt===0&&kt<0||yt!==0&&kt>0?K.getForTilePoints(at,[Yt],!0,st):Lt.push(Yt),K.getForTilePoints(b,Lt,!0,rt),Math.max(Lt[0][2],Lt[1][2],Yt[2])/K.exaggeration()};for(let De=0;De<4;De++){const it=(De<2?1:5)-De,yt=R.borders[De];if(yt.length===0)continue;const mt=at=ne[De](b),kt=ae(mt);if(!(kt&&kt instanceof s.FillExtrusionBucket&&kt.enableTerrain)||R.borderDoneWithNeighborZ[De]===kt.canonical.z&&kt.borderDoneWithNeighborZ[it]===R.canonical.z||(st=K.findDEMTileFor(mt),!st||!st.dem))continue;if(!rt){const Vt=K.findDEMTileFor(b);if(!Vt||!Vt.dem)return;rt=Vt}const Lt=kt.borders[it];let At=0;const Yt=kt.borderDoneWithNeighborZ[it]!==R.canonical.z;if(R.canonical.z===kt.canonical.z){for(let Vt=0;Vt<yt.length;Vt++){const or=R.featuresOnBorder[yt[Vt]],Wr=or.borders[De];let Qt;for(;At<Lt.length&&(Qt=kt.featuresOnBorder[Lt[At]],!(Qt.borders[it][1]>Wr[0]+3));)Yt&&kt.encodeCentroid(void 0,Qt,!1),At++;if(Qt&&At<Lt.length){const Tr=At;let fr=0;for(;!(Qt.borders[it][0]>Wr[1]-3)&&(fr++,++At!==Lt.length);)Qt=kt.featuresOnBorder[Lt[At]];if(Qt=kt.featuresOnBorder[Lt[Tr]],or.intersectsCount()>1||Qt.intersectsCount()>1||fr!==1){fr!==1&&(At=Tr),R.encodeCentroid(void 0,or,!1),Yt&&kt.encodeCentroid(void 0,Qt,!1);continue}const jr=Le[De](or,Qt),lr=De%2?s.EXTENT-1:0;He.x=ut(jr[0],Math.min(s.EXTENT-1,jr[1]),lr,De<2,jr[2]),He.y=0,R.encodeCentroid(He,or,!1),Yt&&kt.encodeCentroid(He,Qt,!1)}else R.encodeCentroid(void 0,or,!1)}R.borderDoneWithNeighborZ[De]=kt.canonical.z,R.needsCentroidUpdate=!0,Yt&&(kt.borderDoneWithNeighborZ[it]=R.canonical.z,kt.needsCentroidUpdate=!0)}else{for(const Vt of yt)R.encodeCentroid(void 0,R.featuresOnBorder[Vt],!1);if(Yt){for(const Vt of Lt)kt.encodeCentroid(void 0,kt.featuresOnBorder[Vt],!1);kt.borderDoneWithNeighborZ[it]=R.canonical.z,kt.needsCentroidUpdate=!0}R.borderDoneWithNeighborZ[De]=kt.canonical.z,R.needsCentroidUpdate=!0}}(R.needsCentroidUpdate||!R.centroidVertexBuffer&&R.centroidVertexArray.length!==0)&&R.uploadCentroid(I)}const Zn=new s.Color(1,0,0,1),lo=new s.Color(0,1,0,1),Mo=new s.Color(0,0,1,1),Zi=new s.Color(1,0,1,1),ou=new s.Color(0,1,1,1);function qp(I,h,b){const R=I.context,U=I.transform,K=R.gl,ne=U.projection.name==="globe",ae=ne?["PROJECTION_GLOBE_VIEW"]:null;let he=b.projMatrix;if(ne&&s.globeToMercatorTransition(U.zoom)>0){const or=s.transitionTileAABBinECEF(b.canonical,U),Wr=s.globeDenormalizeECEF(or);he=s.multiply(new Float32Array(16),U.globeMatrix,Wr),s.multiply(he,U.projMatrix,he)}const be=I.useProgram("debug",null,ae),we=h.getTileByID(b.key);I.terrain&&I.terrain.setupElevationDraw(we,be);const Le=s.DepthMode.disabled,He=s.StencilMode.disabled,rt=I.colorModeForRenderPass(),st="$debug";R.activeTexture.set(K.TEXTURE0),I.emptyTexture.bind(K.LINEAR,K.CLAMP_TO_EDGE),ne?we._makeGlobeTileDebugBuffers(I.context,U):we._makeDebugTileBoundsBuffers(I.context,U.projection);const at=we._tileDebugBuffer||I.debugBuffer,ut=we._tileDebugIndexBuffer||I.debugIndexBuffer,De=we._tileDebugSegments||I.debugSegments;be.draw(R,K.LINE_STRIP,Le,He,rt,s.CullFaceMode.disabled,Tf(he,s.Color.red),st,at,ut,De,null,null,null,[we._globeTileDebugBorderBuffer]);const it=we.latestRawTileData,yt=Math.floor((it&&it.byteLength||0)/1024),mt=h.getTile(b).tileSize,kt=512/Math.min(mt,512)*(b.overscaledZ/U.zoom)*.5;let Lt=b.canonical.toString();b.overscaledZ!==b.canonical.z&&(Lt+=` => ${b.overscaledZ}`),Lt+=` ${yt}kb`,function(or,Wr){or.initDebugOverlayCanvas();const Qt=or.debugOverlayCanvas,Tr=or.context.gl,fr=or.debugOverlayCanvas.getContext("2d");fr.clearRect(0,0,Qt.width,Qt.height),fr.shadowColor="white",fr.shadowBlur=2,fr.lineWidth=1.5,fr.strokeStyle="white",fr.textBaseline="top",fr.font="bold 36px Open Sans, sans-serif",fr.fillText(Wr,5,5),fr.strokeText(Wr,5,5),or.debugOverlayTexture.update(Qt),or.debugOverlayTexture.bind(Tr.LINEAR,Tr.CLAMP_TO_EDGE)}(I,Lt);const At=we._tileDebugTextBuffer||I.debugBuffer,Yt=we._tileDebugTextIndexBuffer||I.quadTriangleIndexBuffer,Vt=we._tileDebugTextSegments||I.debugSegments;be.draw(R,K.TRIANGLES,Le,He,s.ColorMode.alphaBlended,s.CullFaceMode.disabled,Tf(he,s.Color.transparent,kt),st,At,Yt,Vt,null,null,null,[we._globeTileDebugTextBuffer])}function nl(I,h,b,R){Xl(I,0,h+b/2,I.transform.width,b,R)}function fc(I,h,b,R){Xl(I,h-b/2,0,b,I.transform.height,R)}function Xl(I,h,b,R,U,K){const ne=I.context,ae=ne.gl;ae.enable(ae.SCISSOR_TEST),ae.scissor(h*s.exported.devicePixelRatio,b*s.exported.devicePixelRatio,R*s.exported.devicePixelRatio,U*s.exported.devicePixelRatio),ne.clear({color:K}),ae.disable(ae.SCISSOR_TEST)}const If=s.createLayout([{name:"a_pos_3f",components:3,type:"Float32"}]),{members:Mf}=If;function Pl(I,h,b,R){I.emplaceBack(h,b,R)}class Qi{constructor(h){this.vertexArray=new s.StructArrayLayout3f12,this.indices=new s.StructArrayLayout3ui6,Pl(this.vertexArray,-1,-1,1),Pl(this.vertexArray,1,-1,1),Pl(this.vertexArray,-1,1,1),Pl(this.vertexArray,1,1,1),Pl(this.vertexArray,-1,-1,-1),Pl(this.vertexArray,1,-1,-1),Pl(this.vertexArray,-1,1,-1),Pl(this.vertexArray,1,1,-1),this.indices.emplaceBack(5,1,3),this.indices.emplaceBack(3,7,5),this.indices.emplaceBack(6,2,0),this.indices.emplaceBack(0,4,6),this.indices.emplaceBack(2,6,7),this.indices.emplaceBack(7,3,2),this.indices.emplaceBack(5,4,0),this.indices.emplaceBack(0,1,5),this.indices.emplaceBack(0,2,3),this.indices.emplaceBack(3,1,0),this.indices.emplaceBack(7,6,4),this.indices.emplaceBack(4,5,7),this.vertexBuffer=h.createVertexBuffer(this.vertexArray,Mf),this.indexBuffer=h.createIndexBuffer(this.indices),this.segment=s.SegmentVector.simpleSegment(0,0,36,12)}}function vl(I,h,b,R,U,K){const ne=I.gl,ae=h.paint.get("sky-atmosphere-color"),he=h.paint.get("sky-atmosphere-halo-color"),be=h.paint.get("sky-atmosphere-sun-intensity"),we=((Le,He,rt,st,at)=>({u_matrix_3f:Le,u_sun_direction:He,u_sun_intensity:rt,u_color_tint_r:[st.r,st.g,st.b,st.a],u_color_tint_m:[at.r,at.g,at.b,at.a],u_luminance:5e-5}))(s.fromMat4(s.create$1(),R),U,be,ae,he);ne.framebufferTexture2D(ne.FRAMEBUFFER,ne.COLOR_ATTACHMENT0,ne.TEXTURE_CUBE_MAP_POSITIVE_X+K,h.skyboxTexture,0),b.draw(I,ne.TRIANGLES,s.DepthMode.disabled,s.StencilMode.disabled,s.ColorMode.unblended,s.CullFaceMode.frontCW,we,"skyboxCapture",h.skyboxGeometry.vertexBuffer,h.skyboxGeometry.indexBuffer,h.skyboxGeometry.segment)}const Td=s.createLayout([{type:"Float32",name:"a_pos",components:3},{type:"Float32",name:"a_uv",components:2}]);class Af{constructor(h){const b=new s.StructArrayLayout5f20;b.emplaceBack(-1,1,1,0,0),b.emplaceBack(1,1,1,1,0),b.emplaceBack(1,-1,1,1,1),b.emplaceBack(-1,-1,1,0,1);const R=new s.StructArrayLayout3ui6;R.emplaceBack(0,1,2),R.emplaceBack(2,3,0),this.vertexBuffer=h.createVertexBuffer(b,Td.members),this.indexBuffer=h.createIndexBuffer(R),this.segments=s.SegmentVector.simpleSegment(0,0,4,2)}destroy(){this.vertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy()}}const su={symbol:function(I,h,b,R,U){if(I.renderPass!=="translucent")return;const K=s.StencilMode.disabled,ne=I.colorModeForRenderPass();b.layout.get("text-variable-anchor")&&function(ae,he,be,we,Le,He,rt){const st=he.transform,at=Le==="map",ut=He==="map";for(const De of ae){const it=we.getTile(De),yt=it.getBucket(be);if(!yt||!yt.text||!yt.text.segments.get().length)continue;const mt=s.evaluateSizeForZoom(yt.textSizeData,st.zoom),kt=Et(De,yt.getProjection(),st),Lt=st.calculatePixelsToTileUnitsMatrix(it),At=dr(kt,it.tileID.canonical,ut,at,st,yt.getProjection(),Lt),Yt=be.layout.get("icon-text-fit")!=="none"&&yt.hasIconData();if(mt){const Vt=Math.pow(2,st.zoom-it.tileID.overscaledZ);Gp(yt,at,ut,rt,s.symbolSize,st,At,De,Vt,mt,Yt)}}}(R,I,b,h,b.layout.get("text-rotation-alignment"),b.layout.get("text-pitch-alignment"),U),b.paint.get("icon-opacity").constantOr(1)!==0&&Sd(I,h,b,R,!1,b.paint.get("icon-translate"),b.paint.get("icon-translate-anchor"),b.layout.get("icon-rotation-alignment"),b.layout.get("icon-pitch-alignment"),b.layout.get("icon-keep-upright"),K,ne),b.paint.get("text-opacity").constantOr(1)!==0&&Sd(I,h,b,R,!0,b.paint.get("text-translate"),b.paint.get("text-translate-anchor"),b.layout.get("text-rotation-alignment"),b.layout.get("text-pitch-alignment"),b.layout.get("text-keep-upright"),K,ne),h.map.showCollisionBoxes&&(iu(I,h,b,R,b.paint.get("text-translate"),b.paint.get("text-translate-anchor"),!0),iu(I,h,b,R,b.paint.get("icon-translate"),b.paint.get("icon-translate-anchor"),!1))},circle:function(I,h,b,R){if(I.renderPass!=="translucent")return;const U=b.paint.get("circle-opacity"),K=b.paint.get("circle-stroke-width"),ne=b.paint.get("circle-stroke-opacity"),ae=b.layout.get("circle-sort-key").constantOr(1)!==void 0;if(U.constantOr(1)===0&&(K.constantOr(1)===0||ne.constantOr(1)===0))return;const he=I.context,be=he.gl,we=I.transform,Le=I.depthModeForSublayer(0,s.DepthMode.ReadOnly),He=s.StencilMode.disabled,rt=I.colorModeForRenderPass(),st=we.projection.name==="globe",at=[s.mercatorXfromLng(we.center.lng),s.mercatorYfromLat(we.center.lat)],ut=[];for(let it=0;it<R.length;it++){const yt=R[it],mt=h.getTile(yt),kt=mt.getBucket(b);if(!kt||kt.projection.name!==we.projection.name)continue;const Lt=kt.programConfigurations.get(b.id),At=Vp(b);st&&At.push("PROJECTION_GLOBE_VIEW");const Yt=I.useProgram("circle",Lt,At),Vt=kt.layoutVertexBuffer,or=kt.globeExtVertexBuffer,Wr=kt.indexBuffer,Qt=we.projection.createInversionMatrix(we,yt.canonical),Tr={programConfiguration:Lt,program:Yt,layoutVertexBuffer:Vt,globeExtVertexBuffer:or,indexBuffer:Wr,uniformValues:Sf(I,yt,mt,Qt,at,b),tile:mt};if(ae){const fr=kt.segments.get();for(const jr of fr)ut.push({segments:new s.SegmentVector([jr]),sortKey:jr.sortKey,state:Tr})}else ut.push({segments:kt.segments,sortKey:0,state:Tr})}ae&&ut.sort((it,yt)=>it.sortKey-yt.sortKey);const De={useDepthForOcclusion:!st};for(const it of ut){const{programConfiguration:yt,program:mt,layoutVertexBuffer:kt,globeExtVertexBuffer:Lt,indexBuffer:At,uniformValues:Yt,tile:Vt}=it.state,or=it.segments;I.terrain&&I.terrain.setupElevationDraw(Vt,mt,De),I.prepareDrawProgram(he,mt,Vt.tileID.toUnwrapped()),mt.draw(he,be.TRIANGLES,Le,He,rt,s.CullFaceMode.disabled,Yt,b.id,kt,At,or,b.paint,we.zoom,yt,[Lt])}},heatmap:function(I,h,b,R){if(b.paint.get("heatmap-opacity")!==0)if(I.renderPass==="offscreen"){const U=I.context,K=U.gl,ne=s.StencilMode.disabled,ae=new s.ColorMode([K.ONE,K.ONE],s.Color.transparent,[!0,!0,!0,!0]);(function(rt,st,at,ut){const De=rt.gl,it=st.width*ut,yt=st.height*ut;rt.activeTexture.set(De.TEXTURE1),rt.viewport.set([0,0,it,yt]);let mt=at.heatmapFbo;if(!mt||mt&&(mt.width!==it||mt.height!==yt)){mt&&mt.destroy();const kt=De.createTexture();De.bindTexture(De.TEXTURE_2D,kt),De.texParameteri(De.TEXTURE_2D,De.TEXTURE_WRAP_S,De.CLAMP_TO_EDGE),De.texParameteri(De.TEXTURE_2D,De.TEXTURE_WRAP_T,De.CLAMP_TO_EDGE),De.texParameteri(De.TEXTURE_2D,De.TEXTURE_MIN_FILTER,De.LINEAR),De.texParameteri(De.TEXTURE_2D,De.TEXTURE_MAG_FILTER,De.LINEAR),mt=at.heatmapFbo=rt.createFramebuffer(it,yt,!1),function(Lt,At,Yt,Vt,or,Wr){const Qt=Lt.gl;Qt.texImage2D(Qt.TEXTURE_2D,0,Lt.isWebGL2&&Lt.extRenderToTextureHalfFloat?Qt.RGBA16F:Qt.RGBA,or,Wr,0,Qt.RGBA,Lt.extRenderToTextureHalfFloat?Lt.isWebGL2?Qt.HALF_FLOAT:Lt.extTextureHalfFloat.HALF_FLOAT_OES:Qt.UNSIGNED_BYTE,null),Vt.colorAttachment.set(Yt)}(rt,0,kt,mt,it,yt)}else De.bindTexture(De.TEXTURE_2D,mt.colorAttachment.get()),rt.bindFramebuffer.set(mt.framebuffer)})(U,I,b,I.transform.projection.name==="globe"?.5:.25),U.clear({color:s.Color.transparent});const he=I.transform,be=he.projection.name==="globe",we=be?["PROJECTION_GLOBE_VIEW"]:null,Le=be?s.CullFaceMode.frontCCW:s.CullFaceMode.disabled,He=[s.mercatorXfromLng(he.center.lng),s.mercatorYfromLat(he.center.lat)];for(let rt=0;rt<R.length;rt++){const st=R[rt];if(h.hasRenderableParent(st))continue;const at=h.getTile(st),ut=at.getBucket(b);if(!ut||ut.projection.name!==he.projection.name)continue;const De=ut.programConfigurations.get(b.id),it=I.useProgram("heatmap",De,we),{zoom:yt}=I.transform;I.terrain&&I.terrain.setupElevationDraw(at,it),I.prepareDrawProgram(U,it,st.toUnwrapped());const mt=he.projection.createInversionMatrix(he,st.canonical);it.draw(U,K.TRIANGLES,s.DepthMode.disabled,ne,ae,Le,l0(I,st,at,mt,He,yt,b.paint.get("heatmap-intensity")),b.id,ut.layoutVertexBuffer,ut.indexBuffer,ut.segments,b.paint,I.transform.zoom,De,be?[ut.globeExtVertexBuffer]:null)}U.viewport.set([0,0,I.width,I.height])}else I.renderPass==="translucent"&&(I.context.setColorMode(I.colorModeForRenderPass()),function(U,K){const ne=U.context,ae=ne.gl,he=K.heatmapFbo;if(!he)return;ne.activeTexture.set(ae.TEXTURE0),ae.bindTexture(ae.TEXTURE_2D,he.colorAttachment.get()),ne.activeTexture.set(ae.TEXTURE1);let be=K.colorRampTexture;be||(be=K.colorRampTexture=new s.Texture(ne,K.colorRamp,ae.RGBA)),be.bind(ae.LINEAR,ae.CLAMP_TO_EDGE),U.useProgram("heatmapTexture").draw(ne,ae.TRIANGLES,s.DepthMode.disabled,s.StencilMode.disabled,U.colorModeForRenderPass(),s.CullFaceMode.disabled,((we,Le,He,rt)=>({u_image:0,u_color_ramp:1,u_opacity:Le.paint.get("heatmap-opacity")}))(0,K),K.id,U.viewportBuffer,U.quadTriangleIndexBuffer,U.viewportSegments,K.paint,U.transform.zoom)}(I,b))},line:function(I,h,b,R){if(I.renderPass!=="translucent")return;const U=b.paint.get("line-opacity"),K=b.paint.get("line-width");if(U.constantOr(1)===0||K.constantOr(1)===0)return;const ne=I.depthModeForSublayer(0,s.DepthMode.ReadOnly),ae=I.colorModeForRenderPass(),he=I.terrain&&I.terrain.renderingToTexture?1:s.exported.devicePixelRatio,be=b.paint.get("line-dasharray"),we=be.constantOr(1),Le=b.layout.get("line-cap"),He=b.paint.get("line-pattern"),rt=He.constantOr(1),st=b.paint.get("line-gradient"),at=rt?"linePattern":"line",ut=I.context,De=ut.gl,it=(mt=>{const kt=[];Do(mt)&&kt.push("RENDER_LINE_DASH"),mt.paint.get("line-gradient")&&kt.push("RENDER_LINE_GRADIENT");const Lt=mt.paint.get("line-trim-offset");Lt[0]===0&&Lt[1]===0||kt.push("RENDER_LINE_TRIM_OFFSET");const At=mt.paint.get("line-pattern").constantOr(1),Yt=mt.paint.get("line-opacity").constantOr(1)!==1;return!At&&Yt&&kt.push("RENDER_LINE_ALPHA_DISCARD"),kt})(b);let yt=it.includes("RENDER_LINE_ALPHA_DISCARD");I.terrain&&I.terrain.clipOrMaskOverlapStencilType()&&(yt=!1);for(const mt of R){const kt=h.getTile(mt);if(rt&&!kt.patternsLoaded())continue;const Lt=kt.getBucket(b);if(!Lt)continue;I.prepareDrawTile();const At=Lt.programConfigurations.get(b.id),Yt=I.useProgram(at,At,it),Vt=He.constantOr(null);if(Vt&&kt.imageAtlas){const xr=kt.imageAtlas.patternPositions[Vt.toString()];xr&&At.setConstantPatternPositions(xr)}const or=be.constantOr(null),Wr=Le.constantOr(null);if(!rt&&or&&Wr&&kt.lineAtlas){const xr=kt.lineAtlas.getDash(or,Wr);xr&&At.setConstantPatternPositions(xr)}let[Qt,Tr]=b.paint.get("line-trim-offset");if(Wr==="round"||Wr==="square"){const xr=1;Qt!==Tr&&(Qt===0&&(Qt-=xr),Tr===1&&(Tr+=xr))}const fr=I.terrain?mt.projMatrix:null,jr=rt?yr(I,kt,b,fr,he):Jt(I,kt,b,fr,Lt.lineClipsArray.length,he,[Qt,Tr]);if(st){const xr=Lt.gradients[b.id];let qr=xr.texture;if(b.gradientVersion!==xr.version){let Rr=256;if(b.stepInterpolant){const Yr=h.getSource().maxzoom,Nn=mt.canonical.z===Yr?Math.ceil(1<<I.transform.maxZoom-mt.canonical.z):1;Rr=s.clamp(s.nextPowerOfTwo(Lt.maxLineLength/s.EXTENT*1024*Nn),256,ut.maxTextureSize)}xr.gradient=s.renderColorRamp({expression:b.gradientExpression(),evaluationKey:"lineProgress",resolution:Rr,image:xr.gradient||void 0,clips:Lt.lineClipsArray}),xr.texture?xr.texture.update(xr.gradient):xr.texture=new s.Texture(ut,xr.gradient,De.RGBA),xr.version=b.gradientVersion,qr=xr.texture}ut.activeTexture.set(De.TEXTURE1),qr.bind(b.stepInterpolant?De.NEAREST:De.LINEAR,De.CLAMP_TO_EDGE)}we&&(ut.activeTexture.set(De.TEXTURE0),kt.lineAtlasTexture.bind(De.LINEAR,De.REPEAT),At.updatePaintBuffers()),rt&&(ut.activeTexture.set(De.TEXTURE0),kt.imageAtlasTexture.bind(De.LINEAR,De.CLAMP_TO_EDGE),At.updatePaintBuffers()),I.prepareDrawProgram(ut,Yt,mt.toUnwrapped());const lr=xr=>{Yt.draw(ut,De.TRIANGLES,ne,xr,ae,s.CullFaceMode.disabled,jr,b.id,Lt.layoutVertexBuffer,Lt.indexBuffer,Lt.segments,b.paint,I.transform.zoom,At,[Lt.layoutVertexBuffer2])};if(yt){const xr=I.stencilModeForClipping(mt).ref;xr===0&&I.terrain&&ut.clear({stencil:0});const qr={func:De.EQUAL,mask:255};jr.u_alpha_discard_threshold=.8,lr(new s.StencilMode(qr,xr,255,De.KEEP,De.KEEP,De.INVERT)),jr.u_alpha_discard_threshold=0,lr(new s.StencilMode(qr,xr,255,De.KEEP,De.KEEP,De.KEEP))}else lr(I.stencilModeForClipping(mt))}yt&&(I.resetStencilClippingMasks(),I.terrain&&ut.clear({stencil:0}))},fill:function(I,h,b,R){const U=b.paint.get("fill-color"),K=b.paint.get("fill-opacity");if(K.constantOr(1)===0)return;const ne=I.colorModeForRenderPass(),ae=b.paint.get("fill-pattern"),he=I.opaquePassEnabledForLayer()&&!ae.constantOr(1)&&U.constantOr(s.Color.transparent).a===1&&K.constantOr(0)===1?"opaque":"translucent";if(I.renderPass===he){const be=I.depthModeForSublayer(1,I.renderPass==="opaque"?s.DepthMode.ReadWrite:s.DepthMode.ReadOnly);gr(I,h,b,R,be,ne,!1)}if(I.renderPass==="translucent"&&b.paint.get("fill-antialias")){const be=I.depthModeForSublayer(b.getPaintProperty("fill-outline-color")?2:0,s.DepthMode.ReadOnly);gr(I,h,b,R,be,ne,!0)}},"fill-extrusion":function(I,h,b,R){const U=b.paint.get("fill-extrusion-opacity");if(U!==0&&I.renderPass==="translucent"){const K=new s.DepthMode(I.context.gl.LEQUAL,s.DepthMode.ReadWrite,I.depthRangeFor3D);if(U!==1||b.paint.get("fill-extrusion-pattern").constantOr(1))ir(I,h,b,R,K,s.StencilMode.disabled,s.ColorMode.disabled),ir(I,h,b,R,K,I.stencilModeFor3D(),I.colorModeForRenderPass()),I.resetStencilClippingMasks();else{const ne=I.colorModeForRenderPass();ir(I,h,b,R,K,s.StencilMode.disabled,ne)}}},hillshade:function(I,h,b,R){if(I.renderPass!=="offscreen"&&I.renderPass!=="translucent")return;const U=I.context,K=I.depthModeForSublayer(0,s.DepthMode.ReadOnly),ne=I.colorModeForRenderPass(),ae=I.terrain&&I.terrain.renderingToTexture,[he,be]=I.renderPass!=="translucent"||ae?[{},R]:I.stencilConfigForOverlap(R);for(const we of be){const Le=h.getTile(we);if(Le.needsHillshadePrepare&&I.renderPass==="offscreen")Ph(I,Le,b,K,s.StencilMode.disabled,ne);else if(I.renderPass==="translucent"){const He=ae&&I.terrain?I.terrain.stencilModeForRTTOverlap(we):he[we.overscaledZ];Hu(I,we,Le,b,K,He,ne)}}U.viewport.set([0,0,I.width,I.height]),I.resetStencilClippingMasks()},raster:function(I,h,b,R,U,K){if(I.renderPass!=="translucent"||b.paint.get("raster-opacity")===0||!R.length)return;const ne=I.context,ae=ne.gl,he=h.getSource(),be=I.useProgram("raster"),we=I.colorModeForRenderPass(),Le=I.terrain&&I.terrain.renderingToTexture,[He,rt]=he instanceof un||Le?[{},R]:I.stencilConfigForOverlap(R),st=rt[rt.length-1].overscaledZ,at=!I.options.moving;for(const ut of rt){const De=Le?s.DepthMode.disabled:I.depthModeForSublayer(ut.overscaledZ-st,b.paint.get("raster-opacity")===1?s.DepthMode.ReadWrite:s.DepthMode.ReadOnly,ae.LESS),it=ut.toUnwrapped(),yt=h.getTile(ut);if(Le&&(!yt||!yt.hasData()))continue;const mt=Le?ut.projMatrix:I.transform.calculateProjMatrix(it,at),kt=I.terrain&&Le?I.terrain.stencilModeForRTTOverlap(ut):He[ut.overscaledZ],Lt=K?0:b.paint.get("raster-fade-duration");yt.registerFadeDuration(Lt);const At=h.findLoadedParent(ut,0),Yt=Ed(yt,At,h,I.transform,Lt);let Vt,or;I.terrain&&I.terrain.prepareDrawTile();const Wr=b.paint.get("raster-resampling")==="nearest"?ae.NEAREST:ae.LINEAR;ne.activeTexture.set(ae.TEXTURE0),yt.texture.bind(Wr,ae.CLAMP_TO_EDGE),ne.activeTexture.set(ae.TEXTURE1),At?(At.texture.bind(Wr,ae.CLAMP_TO_EDGE),Vt=Math.pow(2,At.tileID.overscaledZ-yt.tileID.overscaledZ),or=[yt.tileID.canonical.x*Vt%1,yt.tileID.canonical.y*Vt%1]):yt.texture.bind(Wr,ae.CLAMP_TO_EDGE),yt.texture.useMipmap&&ne.extTextureFilterAnisotropic&&I.transform.pitch>20&&ae.texParameterf(ae.TEXTURE_2D,ne.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,ne.extTextureFilterAnisotropicMax);const Qt=Di(mt,or||[0,0],Vt||1,Yt,b,he instanceof un?he.perspectiveTransform:[0,0]);if(I.prepareDrawProgram(ne,be,it),he instanceof un)he.boundsBuffer&&he.boundsSegments&&be.draw(ne,ae.TRIANGLES,De,s.StencilMode.disabled,we,s.CullFaceMode.disabled,Qt,b.id,he.boundsBuffer,I.quadTriangleIndexBuffer,he.boundsSegments);else{const{tileBoundsBuffer:Tr,tileBoundsIndexBuffer:fr,tileBoundsSegments:jr}=I.getTileBoundsBuffers(yt);be.draw(ne,ae.TRIANGLES,De,kt,we,s.CullFaceMode.disabled,Qt,b.id,Tr,fr,jr)}}I.resetStencilClippingMasks()},background:function(I,h,b,R){const U=b.paint.get("background-color"),K=b.paint.get("background-opacity");if(K===0)return;const ne=I.context,ae=ne.gl,he=I.transform,be=he.tileSize,we=b.paint.get("background-pattern");if(I.isPatternMissing(we))return;const Le=!we&&U.a===1&&K===1&&I.opaquePassEnabledForLayer()?"opaque":"translucent";if(I.renderPass!==Le)return;const He=s.StencilMode.disabled,rt=I.depthModeForSublayer(0,Le==="opaque"?s.DepthMode.ReadWrite:s.DepthMode.ReadOnly),st=I.colorModeForRenderPass(),at=I.useProgram(we?"backgroundPattern":"background");let ut,De=R;De||(ut=I.getBackgroundTiles(),De=Object.values(ut).map(it=>it.tileID)),we&&(ne.activeTexture.set(ae.TEXTURE0),I.imageManager.bind(I.context));for(const it of De){const yt=it.toUnwrapped(),mt=R?it.projMatrix:I.transform.calculateProjMatrix(yt);I.prepareDrawTile();const kt=h?h.getTile(it):ut?ut[it.key]:new s.Tile(it,be,he.zoom,I),Lt=we?Tl(mt,K,I,we,{tileID:it,tileSize:be}):uc(mt,K,U);I.prepareDrawProgram(ne,at,yt);const{tileBoundsBuffer:At,tileBoundsIndexBuffer:Yt,tileBoundsSegments:Vt}=I.getTileBoundsBuffers(kt);at.draw(ne,ae.TRIANGLES,rt,He,st,s.CullFaceMode.disabled,Lt,b.id,At,Yt,Vt)}},sky:function(I,h,b){const R=I.transform,U=R.projection.name==="mercator"||R.projection.name==="globe"?1:s.smoothstep(7,8,R.zoom),K=b.paint.get("sky-opacity")*U;if(K===0)return;const ne=I.context,ae=b.paint.get("sky-type"),he=new s.DepthMode(ne.gl.LEQUAL,s.DepthMode.ReadOnly,[0,1]),be=I.frameCounter/1e3%1;ae==="atmosphere"?I.renderPass==="offscreen"?b.needsSkyboxCapture(I)&&(function(we,Le,He,rt){const st=we.context,at=st.gl;let ut=Le.skyboxFbo;if(!ut){ut=Le.skyboxFbo=st.createFramebuffer(32,32,!1),Le.skyboxGeometry=new Qi(st),Le.skyboxTexture=st.gl.createTexture(),at.bindTexture(at.TEXTURE_CUBE_MAP,Le.skyboxTexture),at.texParameteri(at.TEXTURE_CUBE_MAP,at.TEXTURE_WRAP_S,at.CLAMP_TO_EDGE),at.texParameteri(at.TEXTURE_CUBE_MAP,at.TEXTURE_WRAP_T,at.CLAMP_TO_EDGE),at.texParameteri(at.TEXTURE_CUBE_MAP,at.TEXTURE_MIN_FILTER,at.LINEAR),at.texParameteri(at.TEXTURE_CUBE_MAP,at.TEXTURE_MAG_FILTER,at.LINEAR);for(let mt=0;mt<6;++mt)at.texImage2D(at.TEXTURE_CUBE_MAP_POSITIVE_X+mt,0,at.RGBA,32,32,0,at.RGBA,at.UNSIGNED_BYTE,null)}st.bindFramebuffer.set(ut.framebuffer),st.viewport.set([0,0,32,32]);const De=Le.getCenter(we,!0),it=we.useProgram("skyboxCapture"),yt=new Float64Array(16);s.identity(yt),s.rotateY(yt,yt,.5*-Math.PI),vl(st,Le,it,yt,De,0),s.identity(yt),s.rotateY(yt,yt,.5*Math.PI),vl(st,Le,it,yt,De,1),s.identity(yt),s.rotateX(yt,yt,.5*-Math.PI),vl(st,Le,it,yt,De,2),s.identity(yt),s.rotateX(yt,yt,.5*Math.PI),vl(st,Le,it,yt,De,3),s.identity(yt),vl(st,Le,it,yt,De,4),s.identity(yt),s.rotateY(yt,yt,Math.PI),vl(st,Le,it,yt,De,5),st.viewport.set([0,0,we.width,we.height])}(I,b),b.markSkyboxValid(I)):I.renderPass==="sky"&&function(we,Le,He,rt,st){const at=we.context,ut=at.gl,De=we.transform,it=we.useProgram("skybox");at.activeTexture.set(ut.TEXTURE0),ut.bindTexture(ut.TEXTURE_CUBE_MAP,Le.skyboxTexture);const yt=((mt,kt,Lt,At,Yt)=>({u_matrix:mt,u_sun_direction:kt,u_cubemap:0,u_opacity:At,u_temporal_offset:Yt}))(De.skyboxMatrix,Le.getCenter(we,!1),0,rt,st);we.prepareDrawProgram(at,it),it.draw(at,ut.TRIANGLES,He,s.StencilMode.disabled,we.colorModeForRenderPass(),s.CullFaceMode.backCW,yt,"skybox",Le.skyboxGeometry.vertexBuffer,Le.skyboxGeometry.indexBuffer,Le.skyboxGeometry.segment)}(I,b,he,K,be):ae==="gradient"&&I.renderPass==="sky"&&function(we,Le,He,rt,st){const at=we.context,ut=at.gl,De=we.transform,it=we.useProgram("skyboxGradient");Le.skyboxGeometry||(Le.skyboxGeometry=new Qi(at)),at.activeTexture.set(ut.TEXTURE0);let yt=Le.colorRampTexture;yt||(yt=Le.colorRampTexture=new s.Texture(at,Le.colorRamp,ut.RGBA)),yt.bind(ut.LINEAR,ut.CLAMP_TO_EDGE);const mt=((kt,Lt,At,Yt,Vt)=>({u_matrix:kt,u_color_ramp:0,u_center_direction:Lt,u_radius:s.degToRad(At),u_opacity:Yt,u_temporal_offset:Vt}))(De.skyboxMatrix,Le.getCenter(we,!1),Le.paint.get("sky-gradient-radius"),rt,st);we.prepareDrawProgram(at,it),it.draw(at,ut.TRIANGLES,He,s.StencilMode.disabled,we.colorModeForRenderPass(),s.CullFaceMode.backCW,mt,"skyboxGradient",Le.skyboxGeometry.vertexBuffer,Le.skyboxGeometry.indexBuffer,Le.skyboxGeometry.segment)}(I,b,he,K,be)},debug:function(I,h,b){for(let R=0;R<b.length;R++)qp(I,h,b[R])},custom:function(I,h,b,R){const U=I.context,K=b.implementation;if(!I.transform.projection.unsupportedLayers||!I.transform.projection.unsupportedLayers.includes("custom")||I.terrain&&(I.terrain.renderingToTexture||I.renderPass==="offscreen")&&b.isLayerDraped()){if(I.renderPass==="offscreen"){const ne=K.prerender;if(ne){if(I.setCustomLayerDefaults(),U.setColorMode(I.colorModeForRenderPass()),I.transform.projection.name==="globe"){const ae=I.transform.pointMerc;ne.call(K,U.gl,I.transform.customLayerMatrix(),I.transform.getProjection(),I.transform.globeToMercatorMatrix(),s.globeToMercatorTransition(I.transform.zoom),[ae.x,ae.y],I.transform.pixelsPerMeterRatio)}else ne.call(K,U.gl,I.transform.customLayerMatrix());U.setDirty(),I.setBaseState()}}else if(I.renderPass==="translucent"){if(I.terrain&&I.terrain.renderingToTexture){const ae=K.renderToTile;if(ae){const he=R[0].canonical,be=new s.MercatorCoordinate(he.x+R[0].wrap*(1<<he.z),he.y,he.z);U.setDepthMode(s.DepthMode.disabled),U.setStencilMode(s.StencilMode.disabled),U.setColorMode(I.colorModeForRenderPass()),I.setCustomLayerDefaults(),ae.call(K,U.gl,be),U.setDirty(),I.setBaseState()}return}I.setCustomLayerDefaults(),U.setColorMode(I.colorModeForRenderPass()),U.setStencilMode(s.StencilMode.disabled);const ne=K.renderingMode==="3d"?new s.DepthMode(I.context.gl.LEQUAL,s.DepthMode.ReadWrite,I.depthRangeFor3D):I.depthModeForSublayer(0,s.DepthMode.ReadOnly);if(U.setDepthMode(ne),I.transform.projection.name==="globe"){const ae=I.transform.pointMerc;K.render(U.gl,I.transform.customLayerMatrix(),I.transform.getProjection(),I.transform.globeToMercatorMatrix(),s.globeToMercatorTransition(I.transform.zoom),[ae.x,ae.y],I.transform.pixelsPerMeterRatio)}else K.render(U.gl,I.transform.customLayerMatrix());U.setDirty(),I.setBaseState(),U.bindFramebuffer.set(null)}}else s.warnOnce("Custom layers are not yet supported with this projection. Use mercator or globe to enable usage of custom layers.")}};class sg{constructor(h,b,R=!1){this.context=new Sr(h,R),this.transform=b,this._tileTextures={},this.frameCopies=[],this.loadTimeStamps=[],this.setup(),this.numSublayers=s.SourceCache.maxUnderzooming+s.SourceCache.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.deferredRenderGpuTimeQueries=[],this.gpuTimers={},this.frameCounter=0,this._backgroundTiles={}}updateTerrain(h,b){const R=!!h&&!!h.terrain&&this.transform.projection.supportsTerrain;if(!(R||this._terrain&&this._terrain.enabled))return;this._terrain||(this._terrain=new jp(this,h));const U=this._terrain;this.transform.elevation=R?U:null,U.update(h,this.transform,b)}_updateFog(h){const b=h.fog;if(!b||this.transform.projection.name==="globe"||b.getOpacity(this.transform.pitch)<1||b.properties.get("horizon-blend")<.03)return void(this.transform.fogCullDistSq=null);const[R,U]=b.getFovAdjustedRange(this.transform._fov);if(R>U)return void(this.transform.fogCullDistSq=null);const K=R+.78*(U-R);this.transform.fogCullDistSq=K*K}get terrain(){return this.transform._terrainEnabled()&&this._terrain&&this._terrain.enabled?this._terrain:null}resize(h,b){if(this.width=h*s.exported.devicePixelRatio,this.height=b*s.exported.devicePixelRatio,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(const R of this.style.order)this.style._layers[R].resize()}setup(){const h=this.context,b=new s.StructArrayLayout2i4;b.emplaceBack(0,0),b.emplaceBack(s.EXTENT,0),b.emplaceBack(0,s.EXTENT),b.emplaceBack(s.EXTENT,s.EXTENT),this.tileExtentBuffer=h.createVertexBuffer(b,s.posAttributes.members),this.tileExtentSegments=s.SegmentVector.simpleSegment(0,0,4,2);const R=new s.StructArrayLayout2i4;R.emplaceBack(0,0),R.emplaceBack(s.EXTENT,0),R.emplaceBack(0,s.EXTENT),R.emplaceBack(s.EXTENT,s.EXTENT),this.debugBuffer=h.createVertexBuffer(R,s.posAttributes.members),this.debugSegments=s.SegmentVector.simpleSegment(0,0,4,5);const U=new s.StructArrayLayout2i4;U.emplaceBack(-1,-1),U.emplaceBack(1,-1),U.emplaceBack(-1,1),U.emplaceBack(1,1),this.viewportBuffer=h.createVertexBuffer(U,s.posAttributes.members),this.viewportSegments=s.SegmentVector.simpleSegment(0,0,4,2);const K=new s.StructArrayLayout4i8;K.emplaceBack(0,0,0,0),K.emplaceBack(s.EXTENT,0,s.EXTENT,0),K.emplaceBack(0,s.EXTENT,0,s.EXTENT),K.emplaceBack(s.EXTENT,s.EXTENT,s.EXTENT,s.EXTENT),this.mercatorBoundsBuffer=h.createVertexBuffer(K,s.boundsAttributes.members),this.mercatorBoundsSegments=s.SegmentVector.simpleSegment(0,0,4,2);const ne=new s.StructArrayLayout3ui6;ne.emplaceBack(0,1,2),ne.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=h.createIndexBuffer(ne);const ae=new s.StructArrayLayout1ui2;for(const be of[0,1,3,2,0])ae.emplaceBack(be);this.debugIndexBuffer=h.createIndexBuffer(ae),this.emptyTexture=new s.Texture(h,new s.RGBAImage({width:1,height:1},Uint8Array.of(0,0,0,0)),h.gl.RGBA),this.identityMat=s.create();const he=this.context.gl;this.stencilClearMode=new s.StencilMode({func:he.ALWAYS,mask:0},0,255,he.ZERO,he.ZERO,he.ZERO),this.loadTimeStamps.push(s.window.performance.now()),this.atmosphereBuffer=new Af(this.context)}getMercatorTileBoundsBuffers(){return{tileBoundsBuffer:this.mercatorBoundsBuffer,tileBoundsIndexBuffer:this.quadTriangleIndexBuffer,tileBoundsSegments:this.mercatorBoundsSegments}}getTileBoundsBuffers(h){return h._makeTileBoundsBuffers(this.context,this.transform.projection),h._tileBoundsBuffer?{tileBoundsBuffer:h._tileBoundsBuffer,tileBoundsIndexBuffer:h._tileBoundsIndexBuffer,tileBoundsSegments:h._tileBoundsSegments}:this.getMercatorTileBoundsBuffers()}clearStencil(){const h=this.context,b=h.gl;this.nextStencilID=1,this.currentStencilSource=void 0,this._tileClippingMaskIDs={},this.useProgram("clippingMask").draw(h,b.TRIANGLES,s.DepthMode.disabled,this.stencilClearMode,s.ColorMode.disabled,s.CullFaceMode.disabled,Cd(this.identityMat),"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}resetStencilClippingMasks(){this.terrain||(this.currentStencilSource=void 0,this._tileClippingMaskIDs={})}_renderTileClippingMasks(h,b,R){if(!b||this.currentStencilSource===b.id||!h.isTileClipped()||!R||R.length===0)return;if(this._tileClippingMaskIDs&&!this.terrain){let ae=!1;for(const he of R)if(this._tileClippingMaskIDs[he.key]===void 0){ae=!0;break}if(!ae)return}this.currentStencilSource=b.id;const U=this.context,K=U.gl;this.nextStencilID+R.length>256&&this.clearStencil(),U.setColorMode(s.ColorMode.disabled),U.setDepthMode(s.DepthMode.disabled);const ne=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(const ae of R){const he=b.getTile(ae),be=this._tileClippingMaskIDs[ae.key]=this.nextStencilID++,{tileBoundsBuffer:we,tileBoundsIndexBuffer:Le,tileBoundsSegments:He}=this.getTileBoundsBuffers(he);ne.draw(U,K.TRIANGLES,s.DepthMode.disabled,new s.StencilMode({func:K.ALWAYS,mask:0},be,255,K.KEEP,K.KEEP,K.REPLACE),s.ColorMode.disabled,s.CullFaceMode.disabled,Cd(ae.projMatrix),"$clipping",we,Le,He)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();const h=this.nextStencilID++,b=this.context.gl;return new s.StencilMode({func:b.NOTEQUAL,mask:255},h,255,b.KEEP,b.KEEP,b.REPLACE)}stencilModeForClipping(h){if(this.terrain)return this.terrain.stencilModeForRTTOverlap(h);const b=this.context.gl;return new s.StencilMode({func:b.EQUAL,mask:255},this._tileClippingMaskIDs[h.key],0,b.KEEP,b.KEEP,b.REPLACE)}stencilConfigForOverlap(h){const b=this.context.gl,R=h.sort((ne,ae)=>ae.overscaledZ-ne.overscaledZ),U=R[R.length-1].overscaledZ,K=R[0].overscaledZ-U+1;if(K>1){this.currentStencilSource=void 0,this.nextStencilID+K>256&&this.clearStencil();const ne={};for(let ae=0;ae<K;ae++)ne[ae+U]=new s.StencilMode({func:b.GEQUAL,mask:255},ae+this.nextStencilID,255,b.KEEP,b.KEEP,b.REPLACE);return this.nextStencilID+=K,[ne,R]}return[{[U]:s.StencilMode.disabled},R]}colorModeForRenderPass(){const h=this.context.gl;if(this._showOverdrawInspector){const b=1/8;return new s.ColorMode([h.CONSTANT_COLOR,h.ONE],new s.Color(b,b,b,0),[!0,!0,!0,!0])}return this.renderPass==="opaque"?s.ColorMode.unblended:s.ColorMode.alphaBlended}depthModeForSublayer(h,b,R){if(!this.opaquePassEnabledForLayer())return s.DepthMode.disabled;const U=1-((1+this.currentLayer)*this.numSublayers+h)*this.depthEpsilon;return new s.DepthMode(R||this.context.gl.LEQUAL,b,[U,U])}opaquePassEnabledForLayer(){return this.currentLayer<this.opaquePassCutoff}render(h,b){this.style=h,this.options=b,this.imageManager=h.imageManager,this.glyphManager=h.glyphManager,this.symbolFadeChange=h.placement.symbolFadeChange(s.exported.now()),this.imageManager.beginFrame();const R=this.style.order,U=this.style._sourceCaches;for(const be in U){const we=U[be];we.used&&we.prepare(this.context)}const K={},ne={},ae={};for(const be in U){const we=U[be];K[be]=we.getVisibleCoordinates(),ne[be]=K[be].slice().reverse(),ae[be]=we.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(let be=0;be<R.length;be++)if(this.style._layers[R[be]].is3D()){this.opaquePassCutoff=be;break}if(this.terrain&&(this.terrain.updateTileBinding(ae),this.opaquePassCutoff=0),this.transform.projection.name!=="globe"||this.globeSharedBuffers||(this.globeSharedBuffers=new s.GlobeSharedBuffers(this.context)),!s.isMapAuthenticated(this.context.gl))return;this.renderPass="offscreen";for(const be of R){const we=this.style._layers[be],Le=h._getLayerSourceCache(we);if(!we.hasOffscreenPass()||we.isHidden(this.transform.zoom))continue;const He=Le?ne[Le.id]:void 0;(we.type==="custom"||we.isSky()||He&&He.length)&&this.renderLayer(this,Le,we,He)}this.depthRangeFor3D=[0,1-(h.order.length+2)*this.numSublayers*this.depthEpsilon];const he=this.terrain;if(he&&(this.style.hasSymbolLayers()||this.style.hasCircleLayers())&&he.drawDepth(),this.context.bindFramebuffer.set(null),this.context.viewport.set([0,0,this.width,this.height]),this.context.clear({color:b.showOverdrawInspector?s.Color.black:s.Color.transparent,depth:1}),this.clearStencil(),this._showOverdrawInspector=b.showOverdrawInspector,this.renderPass="opaque",!this.terrain)for(this.currentLayer=R.length-1;this.currentLayer>=0;this.currentLayer--){const be=this.style._layers[R[this.currentLayer]],we=h._getLayerSourceCache(be);if(be.isSky())continue;const Le=we?ne[we.id]:void 0;this._renderTileClippingMasks(be,we,Le),this.renderLayer(this,we,be,Le)}if(this.style.fog&&this.transform.projection.supportsFog&&function(be,we){const Le=be.context,He=Le.gl,rt=be.transform,st=new s.DepthMode(He.LEQUAL,s.DepthMode.ReadOnly,[0,1]),at=be.useProgram("globeAtmosphere",null,rt.projection.name==="globe"?["PROJECTION_GLOBE_VIEW","FOG"]:["FOG"]),ut=s.globeToMercatorTransition(rt.zoom),De=we.properties.get("color").toArray01(),it=we.properties.get("high-color").toArray01(),yt=we.properties.get("space-color").toArray01PremultipliedAlpha(),mt=s.identity$1([]);s.rotateY$1(mt,mt,-s.degToRad(rt._center.lng)),s.rotateX$1(mt,mt,s.degToRad(rt._center.lat)),s.rotateZ$1(mt,mt,rt.angle),s.rotateX$1(mt,mt,-rt._pitch);const kt=s.fromQuat(new Float32Array(16),mt),Lt=s.mapValue(we.properties.get("star-intensity"),0,1,0,.25),At=5e-4,Yt=s.mapValue(we.properties.get("horizon-blend"),0,1,At,.25),Vt=s.globeUseCustomAntiAliasing(be,Le,rt)&&Yt===At?rt.worldSize/(2*Math.PI*1.025)-1:rt.globeRadius,or=be.frameCounter/1e3%1,Wr=s.length(rt.globeCenterInViewSpace),Qt=Math.sqrt(Math.pow(Wr,2)-Math.pow(Vt,2)),Tr=Math.acos(Qt/Wr),fr=((lr,xr,qr,Rr,Yr,Nn,li,Cn,Gn,Ri,bi,An,_o,Vo)=>({u_frustum_tl:lr,u_frustum_tr:xr,u_frustum_br:qr,u_frustum_bl:Rr,u_horizon:Yr,u_transition:Nn,u_fadeout_range:li,u_color:Cn,u_high_color:Gn,u_space_color:Ri,u_star_intensity:bi,u_star_size:5*s.exported.devicePixelRatio,u_star_density:0,u_temporal_offset:An,u_horizon_angle:_o,u_rotation_matrix:Vo}))(rt.frustumCorners.TL,rt.frustumCorners.TR,rt.frustumCorners.BR,rt.frustumCorners.BL,rt.frustumCorners.horizon,ut,Yt,De,it,yt,Lt,or,Tr,kt);be.prepareDrawProgram(Le,at);const jr=be.atmosphereBuffer;jr&&at.draw(Le,He.TRIANGLES,st,s.StencilMode.disabled,s.ColorMode.alphaBlended,s.CullFaceMode.backCW,fr,"skybox",jr.vertexBuffer,jr.indexBuffer,jr.segments)}(this,this.style.fog),this.renderPass="sky",(s.globeToMercatorTransition(this.transform.zoom)>0||this.transform.projection.name!=="globe")&&this.transform.isHorizonVisible())for(this.currentLayer=0;this.currentLayer<R.length;this.currentLayer++){const be=this.style._layers[R[this.currentLayer]],we=h._getLayerSourceCache(be);be.isSky()&&this.renderLayer(this,we,be,we?ne[we.id]:void 0)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer<R.length;){const be=this.style._layers[R[this.currentLayer]],we=h._getLayerSourceCache(be);if(be.isSky()){++this.currentLayer;continue}if(this.terrain&&this.style.isLayerDraped(be)){if(be.isHidden(this.transform.zoom)){++this.currentLayer;continue}this.currentLayer=this.terrain.renderBatch(this.currentLayer);continue}const Le=we?(be.type==="symbol"?ae:ne)[we.id]:void 0;this._renderTileClippingMasks(be,we,we?K[we.id]:void 0),this.renderLayer(this,we,be,Le),++this.currentLayer}if(this.terrain&&this.terrain.postRender(),this.options.showTileBoundaries||this.options.showQueryGeometry||this.options.showTileAABBs){let be=null;s.values(this.style._layers).forEach(we=>{const Le=h._getLayerSourceCache(we);Le&&!we.isHidden(this.transform.zoom)&&(!be||be.getSource().maxzoom<Le.getSource().maxzoom)&&(be=Le)}),be&&this.options.showTileBoundaries&&su.debug(this,be,be.getVisibleCoordinates())}this.options.showPadding&&function(be){const we=be.transform.padding;nl(be,be.transform.height-(we.top||0),3,Zn),nl(be,we.bottom||0,3,lo),fc(be,we.left||0,3,Mo),fc(be,be.transform.width-(we.right||0),3,Zi);const Le=be.transform.centerPoint;(function(He,rt,st,at){Xl(He,rt-1,st-10,2,20,at),Xl(He,rt-10,st-1,20,2,at)})(be,Le.x,be.transform.height-Le.y,ou)}(this),this.context.setDefault(),this.frameCounter=(this.frameCounter+1)%Number.MAX_SAFE_INTEGER,this.tileLoaded&&this.options.speedIndexTiming&&(this.loadTimeStamps.push(s.window.performance.now()),this.saveCanvasCopy())}renderLayer(h,b,R,U){R.isHidden(this.transform.zoom)||(R.type==="background"||R.type==="sky"||R.type==="custom"||U&&U.length)&&(this.id=R.id,this.gpuTimingStart(R),(!h.transform.projection.unsupportedLayers||!h.transform.projection.unsupportedLayers.includes(R.type)||h.terrain&&R.type==="custom")&&su[R.type](h,b,R,U,this.style.placement.variableOffsets,this.options.isInitialLoad),this.gpuTimingEnd())}gpuTimingStart(h){if(!this.options.gpuTiming)return;const b=this.context.extTimerQuery;let R=this.gpuTimers[h.id];R||(R=this.gpuTimers[h.id]={calls:0,cpuTime:0,query:b.createQueryEXT()}),R.calls++,b.beginQueryEXT(b.TIME_ELAPSED_EXT,R.query)}gpuTimingDeferredRenderStart(){if(this.options.gpuTimingDeferredRender){const h=this.context.extTimerQuery,b=h.createQueryEXT();this.deferredRenderGpuTimeQueries.push(b),h.beginQueryEXT(h.TIME_ELAPSED_EXT,b)}}gpuTimingDeferredRenderEnd(){if(!this.options.gpuTimingDeferredRender)return;const h=this.context.extTimerQuery;h.endQueryEXT(h.TIME_ELAPSED_EXT)}gpuTimingEnd(){if(!this.options.gpuTiming)return;const h=this.context.extTimerQuery;h.endQueryEXT(h.TIME_ELAPSED_EXT)}collectGpuTimers(){const h=this.gpuTimers;return this.gpuTimers={},h}collectDeferredRenderGpuQueries(){const h=this.deferredRenderGpuTimeQueries;return this.deferredRenderGpuTimeQueries=[],h}queryGpuTimers(h){const b={};for(const R in h){const U=h[R],K=this.context.extTimerQuery,ne=K.getQueryObjectEXT(U.query,K.QUERY_RESULT_EXT)/1e6;K.deleteQueryEXT(U.query),b[R]=ne}return b}queryGpuTimeDeferredRender(h){if(!this.options.gpuTimingDeferredRender)return 0;const b=this.context.extTimerQuery;let R=0;for(const U of h)R+=b.getQueryObjectEXT(U,b.QUERY_RESULT_EXT)/1e6,b.deleteQueryEXT(U);return R}translatePosMatrix(h,b,R,U,K){if(!R[0]&&!R[1])return h;const ne=K?U==="map"?this.transform.angle:0:U==="viewport"?-this.transform.angle:0;if(ne){const be=Math.sin(ne),we=Math.cos(ne);R=[R[0]*we-R[1]*be,R[0]*be+R[1]*we]}const ae=[K?R[0]:ce(b,R[0],this.transform.zoom),K?R[1]:ce(b,R[1],this.transform.zoom),0],he=new Float32Array(16);return s.translate(he,h,ae),he}saveTileTexture(h){const b=this._tileTextures[h.size[0]];b?b.push(h):this._tileTextures[h.size[0]]=[h]}getTileTexture(h){const b=this._tileTextures[h];return b&&b.length>0?b.pop():null}isPatternMissing(h){return h===null||h!==void 0&&!this.imageManager.getPattern(h.toString())}terrainRenderModeElevated(){return this.style&&!!this.style.getTerrain()&&!!this.terrain&&!this.terrain.renderingToTexture}currentGlobalDefines(){const h=this.terrain&&this.terrain.renderingToTexture,b=this.terrain&&this.terrain.exaggeration()===0,R=this.style&&this.style.fog,U=[];return this.terrainRenderModeElevated()&&U.push("TERRAIN"),this.transform.projection.name==="globe"&&U.push("GLOBE"),b&&U.push("ZERO_EXAGGERATION"),R&&!h&&R.getOpacity(this.transform.pitch)!==0&&U.push("FOG"),h&&U.push("RENDER_TO_TEXTURE"),this._showOverdrawInspector&&U.push("OVERDRAW_INSPECTOR"),U}useProgram(h,b,R){this.cache=this.cache||{};const U=R||[],K=this.currentGlobalDefines().concat(U),ne=Ii.cacheKey(sa[h],h,K,b);return this.cache[ne]||(this.cache[ne]=new Ii(this.context,h,sa[h],b,Ko[h],K)),this.cache[ne]}setCustomLayerDefaults(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.frontFace.setDefault(),this.context.cullFaceSide.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()}setBaseState(){const h=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(h.FUNC_ADD)}initDebugOverlayCanvas(){this.debugOverlayCanvas==null&&(this.debugOverlayCanvas=s.window.document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new s.Texture(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))}destroy(){this._terrain&&this._terrain.destroy(),this.globeSharedBuffers&&this.globeSharedBuffers.destroy(),this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy(),this.atmosphereBuffer&&this.atmosphereBuffer.destroy()}prepareDrawTile(){this.terrain&&this.terrain.prepareDrawTile()}prepareDrawProgram(h,b,R){if(this.terrain&&this.terrain.renderingToTexture)return;const U=this.style.fog;if(U){const K=U.getOpacity(this.transform.pitch),ne=((ae,he,be,we,Le,He,rt,st,at,ut,De)=>{const it=ae.transform,yt=he.properties.get("color").toArray01();yt[3]=we;const mt=ae.frameCounter/1e3%1;return{u_fog_matrix:be?it.calculateFogTileMatrix(be):ae.identityMat,u_fog_range:he.getFovAdjustedRange(it._fov),u_fog_color:yt,u_fog_horizon_blend:he.properties.get("horizon-blend"),u_fog_temporal_offset:mt,u_frustum_tl:Le,u_frustum_tr:He,u_frustum_br:rt,u_frustum_bl:st,u_globe_pos:at,u_globe_radius:ut,u_viewport:De,u_globe_transition:s.globeToMercatorTransition(it.zoom),u_is_globe:+(it.projection.name==="globe")}})(this,U,R,K,this.transform.frustumCorners.TL,this.transform.frustumCorners.TR,this.transform.frustumCorners.BR,this.transform.frustumCorners.BL,this.transform.globeCenterInViewSpace,this.transform.globeRadius,[this.transform.width*s.exported.devicePixelRatio,this.transform.height*s.exported.devicePixelRatio]);b.setFogUniformValues(h,ne)}}setTileLoadedFlag(h){this.tileLoaded=h}saveCanvasCopy(){const h=this.canvasCopy();h&&(this.frameCopies.push(h),this.tileLoaded=!1)}canvasCopy(){const h=this.context.gl,b=h.createTexture();return h.bindTexture(h.TEXTURE_2D,b),h.copyTexImage2D(h.TEXTURE_2D,0,h.RGBA,0,0,h.drawingBufferWidth,h.drawingBufferHeight,0),b}getCanvasCopiesAndTimestamps(){return{canvasCopies:this.frameCopies,timeStamps:this.loadTimeStamps}}averageElevationNeedsEasing(){if(!this.transform._elevation)return!1;const h=this.style&&this.style.fog;return!!h&&h.getOpacity(this.transform.pitch)!==0}getBackgroundTiles(){const h=this._backgroundTiles,b=this._backgroundTiles={},R=this.transform.coveringTiles({tileSize:512});for(const U of R)b[U.key]=h[U.key]||new s.Tile(U,512,this.transform.tileZoom,this);return b}clearBackgroundTiles(){this._backgroundTiles={}}}class c0{constructor(h=0,b=0,R=0,U=0){if(isNaN(h)||h<0||isNaN(b)||b<0||isNaN(R)||R<0||isNaN(U)||U<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=h,this.bottom=b,this.left=R,this.right=U}interpolate(h,b,R){return b.top!=null&&h.top!=null&&(this.top=s.number(h.top,b.top,R)),b.bottom!=null&&h.bottom!=null&&(this.bottom=s.number(h.bottom,b.bottom,R)),b.left!=null&&h.left!=null&&(this.left=s.number(h.left,b.left,R)),b.right!=null&&h.right!=null&&(this.right=s.number(h.right,b.right,R)),this}getCenter(h,b){const R=s.clamp((this.left+h-this.right)/2,0,h),U=s.clamp((this.top+b-this.bottom)/2,0,b);return new s.Point(R,U)}equals(h){return this.top===h.top&&this.bottom===h.bottom&&this.left===h.left&&this.right===h.right}clone(){return new c0(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}function Xp(I,h){const b=s.getColumn(I,3);s.fromQuat(I,h),s.setColumn(I,3,b)}function Ai(I,h){const b=s.identity$1([]);return s.rotateZ$1(b,b,-h),s.rotateX$1(b,b,-I),b}function Ah(I,h){const b=[I[0],I[1],0],R=[h[0],h[1],0];if(s.length(b)>=1e-15){const ne=s.normalize([],b);s.scale$2(R,ne,s.dot(R,ne)),h[0]=R[0],h[1]=R[1]}const U=s.cross([],h,I);if(s.len(U)<1e-15)return null;const K=Math.atan2(-U[1],U[0]);return Ai(Math.atan2(Math.sqrt(I[0]*I[0]+I[1]*I[1]),-I[2]),K)}class k_{constructor(h,b){this.position=h,this.orientation=b}get position(){return this._position}set position(h){if(h){const b=h instanceof s.MercatorCoordinate?h:new s.MercatorCoordinate(h[0],h[1],h[2]);this._renderWorldCopies&&(b.x=s.wrap(b.x,0,1)),this._position=b}else this._position=null}lookAtPoint(h,b){if(this.orientation=null,!this.position)return;const R=this.position,U=this._elevation?this._elevation.getAtPointOrZero(s.MercatorCoordinate.fromLngLat(h)):0,K=s.MercatorCoordinate.fromLngLat(h,U),ne=[K.x-R.x,K.y-R.y,K.z-R.z];b||(b=[0,0,1]),b[2]=Math.abs(b[2]),this.orientation=Ah(ne,b)}setPitchBearing(h,b){this.orientation=Ai(s.degToRad(h),s.degToRad(-b))}}class Yp{constructor(h,b){this._transform=s.identity([]),this.orientation=b,this.position=h}get mercatorPosition(){const h=this.position;return new s.MercatorCoordinate(h[0],h[1],h[2])}get position(){const h=s.getColumn(this._transform,3);return[h[0],h[1],h[2]]}set position(h){var b;h&&s.setColumn(this._transform,3,[(b=h)[0],b[1],b[2],1])}get orientation(){return this._orientation}set orientation(h){this._orientation=h||s.identity$1([]),h&&Xp(this._transform,this._orientation)}getPitchBearing(){const h=this.forward(),b=this.right();return{bearing:Math.atan2(-b[1],b[0]),pitch:Math.atan2(Math.sqrt(h[0]*h[0]+h[1]*h[1]),-h[2])}}setPitchBearing(h,b){this._orientation=Ai(h,b),Xp(this._transform,this._orientation)}forward(){const h=s.getColumn(this._transform,2);return[-h[0],-h[1],-h[2]]}up(){const h=s.getColumn(this._transform,1);return[-h[0],-h[1],-h[2]]}right(){const h=s.getColumn(this._transform,0);return[h[0],h[1],h[2]]}getCameraToWorld(h,b){const R=new Float64Array(16);return s.invert(R,this.getWorldToCamera(h,b)),R}getWorldToCameraPosition(h,b,R){const U=this.position;s.scale$2(U,U,-h);const K=new Float64Array(16);return s.fromScaling(K,[R,R,R]),s.translate(K,K,U),K[10]*=b,K}getWorldToCamera(h,b){const R=new Float64Array(16),U=new Float64Array(4),K=this.position;return s.conjugate(U,this._orientation),s.scale$2(K,K,-h),s.fromQuat(R,U),s.translate(R,R,K),R[1]*=-1,R[5]*=-1,R[9]*=-1,R[13]*=-1,R[8]*=b,R[9]*=b,R[10]*=b,R[11]*=b,R}getCameraToClipPerspective(h,b,R,U){const K=new Float64Array(16);return s.perspective(K,h,b,R,U),K}getDistanceToElevation(h,b=!1){const R=h===0?0:s.mercatorZfromAltitude(h,b?s.latFromMercatorY(this.position[1]):this.position[1]),U=this.forward();return(R-this.position[2])/U[2]}clone(){return new Yp([...this.position],[...this.orientation])}}function Kp(I,h){const b=Zp(I.projection,I.zoom,I.width,I.height),R=function(K,ne,ae,he,be){const we=new s.LngLat(ae.lng-180*Rf,ae.lat),Le=new s.LngLat(ae.lng+180*Rf,ae.lat),He=K.project(we.lng,we.lat),rt=K.project(Le.lng,Le.lat),st=-Math.atan2(rt.y-He.y,rt.x-He.x),at=s.MercatorCoordinate.fromLngLat(ae);at.y=s.clamp(at.y,-1+Rf,1-Rf);const ut=at.toLngLat(),De=K.project(ut.lng,ut.lat),it=s.MercatorCoordinate.fromLngLat(ut);it.x+=Rf;const yt=it.toLngLat(),mt=K.project(yt.lng,yt.lat),kt=kf(mt.x-De.x,mt.y-De.y,st),Lt=s.MercatorCoordinate.fromLngLat(ut);Lt.y+=Rf;const At=Lt.toLngLat(),Yt=K.project(At.lng,At.lat),Vt=kf(Yt.x-De.x,Yt.y-De.y,st),or=Math.abs(kt.x)/Math.abs(Vt.y),Wr=s.identity([]);s.rotateZ(Wr,Wr,-st*(1-(be?0:he)));const Qt=s.identity([]);return s.scale(Qt,Qt,[1,1-(1-or)*he,1]),Qt[4]=-Vt.x/Vt.y*he,s.rotateZ(Qt,Qt,st),s.multiply(Qt,Wr,Qt),Qt}(I.projection,0,I.center,b,h),U=O_(I);return s.scale(R,R,[U,U,1]),R}function O_(I){const h=I.projection,b=Zp(I.projection,I.zoom,I.width,I.height),R=ag(h,I.center),U=ag(h,s.LngLat.convert(h.center));return Math.pow(2,R*b+(1-b)*U)}function Zp(I,h,b,R,U=1/0){const K=I.range;if(!K)return 0;const ne=Math.min(U,Math.max(b,R)),ae=Math.log(ne/1024)/Math.LN2;return s.smoothstep(K[0]+ae,K[1]+ae,h)}const Rf=1/4e4;function ag(I,h){const b=s.clamp(h.lat,-s.MAX_MERCATOR_LATITUDE,s.MAX_MERCATOR_LATITUDE),R=new s.LngLat(h.lng-180*Rf,b),U=new s.LngLat(h.lng+180*Rf,b),K=I.project(R.lng,b),ne=I.project(U.lng,b),ae=s.MercatorCoordinate.fromLngLat(R),he=s.MercatorCoordinate.fromLngLat(U),be=ne.x-K.x,we=ne.y-K.y,Le=he.x-ae.x,He=he.y-ae.y,rt=Math.sqrt((Le*Le+He*He)/(be*be+we*we));return Math.log(rt)/Math.LN2}function kf(I,h,b){const R=Math.cos(b),U=Math.sin(b);return{x:I*R-h*U,y:I*U+h*R}}class Pd{constructor(h,b,R,U,K,ne,ae){this.tileSize=512,this._renderWorldCopies=K===void 0||K,this._minZoom=h||0,this._maxZoom=b||22,this._minPitch=R==null?0:R,this._maxPitch=U==null?60:U,this.setProjection(ne),this.setMaxBounds(ae),this.width=0,this.height=0,this._center=new s.LngLat(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._nearZ=0,this._farZ=0,this._unmodified=!0,this._edgeInsets=new c0,this._projMatrixCache={},this._alignedProjMatrixCache={},this._fogTileMatrixCache={},this._distanceTileDataCache={},this._camera=new Yp,this._centerAltitude=0,this._averageElevation=0,this.cameraElevationReference="ground",this._pixelsPerMercatorPixel=1,this.globeRadius=0,this.globeCenterInViewSpace=[0,0,0],this._horizonShift=.1}clone(){const h=new Pd(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies,this.getProjection());return h._elevation=this._elevation,h._centerAltitude=this._centerAltitude,h._centerAltitudeValidForExaggeration=this._centerAltitudeValidForExaggeration,h.tileSize=this.tileSize,h.mercatorFromTransition=this.mercatorFromTransition,h.width=this.width,h.height=this.height,h.cameraElevationReference=this.cameraElevationReference,h._center=this._center,h._setZoom(this.zoom),h._seaLevelZoom=this._seaLevelZoom,h.angle=this.angle,h._fov=this._fov,h._pitch=this._pitch,h._nearZ=this._nearZ,h._farZ=this._farZ,h._averageElevation=this._averageElevation,h._unmodified=this._unmodified,h._edgeInsets=this._edgeInsets.clone(),h._camera=this._camera.clone(),h._calcMatrices(),h.freezeTileCoverage=this.freezeTileCoverage,h.frustumCorners=this.frustumCorners,h}get elevation(){return this._elevation}set elevation(h){this._elevation!==h&&(this._elevation=h,this._updateCameraOnTerrain(),this._calcMatrices())}updateElevation(h,b=!1){const R=this._elevation&&this._elevation.exaggeration()!==this._centerAltitudeValidForExaggeration;(this._seaLevelZoom==null||R)&&this._updateCameraOnTerrain(),(h||R)&&this._constrainCamera(b),this._calcMatrices()}getProjection(){return s.pick(this.projection,["name","center","parallels"])}setProjection(h){this.projectionOptions=h||{name:"mercator"};const b=this.projection?this.getProjection():void 0;this.projection=s.getProjection(this.projectionOptions);const R=!l(b,this.getProjection());return R&&this._calcMatrices(),this.mercatorFromTransition=!1,R}setMercatorFromTransition(){const h=this.projection.name;this.mercatorFromTransition=!0,this.projectionOptions={name:"mercator"},this.projection=s.getProjection({name:"mercator"});const b=h!==this.projection.name;return b&&this._calcMatrices(),b}get minZoom(){return this._minZoom}set minZoom(h){this._minZoom!==h&&(this._minZoom=h,this.zoom=Math.max(this.zoom,h))}get maxZoom(){return this._maxZoom}set maxZoom(h){this._maxZoom!==h&&(this._maxZoom=h,this.zoom=Math.min(this.zoom,h))}get minPitch(){return this._minPitch}set minPitch(h){this._minPitch!==h&&(this._minPitch=h,this.pitch=Math.max(this.pitch,h))}get maxPitch(){return this._maxPitch}set maxPitch(h){this._maxPitch!==h&&(this._maxPitch=h,this.pitch=Math.min(this.pitch,h))}get renderWorldCopies(){return this._renderWorldCopies&&this.projection.supportsWorldCopies===!0}set renderWorldCopies(h){h===void 0?h=!0:h===null&&(h=!1),this._renderWorldCopies=h}get worldSize(){return this.tileSize*this.scale}get cameraWorldSizeForFog(){const h=Math.max(this._camera.getDistanceToElevation(this._averageElevation),Number.EPSILON);return this._worldSizeFromZoom(this._zoomFromMercatorZ(h))}get cameraWorldSize(){const h=Math.max(this._camera.getDistanceToElevation(this._averageElevation,!0),Number.EPSILON);return this._worldSizeFromZoom(this._zoomFromMercatorZ(h))}get pixelsPerMeter(){return this.projection.pixelsPerMeter(this.center.lat,this.worldSize)}get cameraPixelsPerMeter(){return s.mercatorZfromAltitude(this.center.lat,this.cameraWorldSizeForFog)}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new s.Point(this.width,this.height)}get bearing(){return s.wrap(this.rotation,-180,180)}set bearing(h){this.rotation=h}get rotation(){return-this.angle/Math.PI*180}set rotation(h){const b=-h*Math.PI/180;var R;this.angle!==b&&(this._unmodified=!1,this.angle=b,this._calcMatrices(),this.rotationMatrix=(R=new s.ARRAY_TYPE(4),s.ARRAY_TYPE!=Float32Array&&(R[1]=0,R[2]=0),R[0]=1,R[3]=1,R),function(U,K,ne){var ae=K[0],he=K[1],be=K[2],we=K[3],Le=Math.sin(ne),He=Math.cos(ne);U[0]=ae*He+be*Le,U[1]=he*He+we*Le,U[2]=ae*-Le+be*He,U[3]=he*-Le+we*He}(this.rotationMatrix,this.rotationMatrix,this.angle))}get pitch(){return this._pitch/Math.PI*180}set pitch(h){const b=s.clamp(h,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==b&&(this._unmodified=!1,this._pitch=b,this._calcMatrices())}get aspect(){return this.width/this.height}get fov(){return this._fov/Math.PI*180}get fovX(){return this._fov}get fovY(){const h=1/Math.tan(.5*this.fovX);return 2*Math.atan(1/this.aspect/h)}set fov(h){h=Math.max(.01,Math.min(60,h)),this._fov!==h&&(this._unmodified=!1,this._fov=s.degToRad(h),this._calcMatrices())}get averageElevation(){return this._averageElevation}set averageElevation(h){this._averageElevation=h,this._calcFogMatrices(),this._distanceTileDataCache={}}get zoom(){return this._zoom}set zoom(h){const b=Math.min(Math.max(h,this.minZoom),this.maxZoom);this._zoom!==b&&(this._unmodified=!1,this._setZoom(b),this._updateSeaLevelZoom(),this._constrain(),this._calcMatrices())}_setZoom(h){this._zoom=h,this.scale=this.zoomScale(h),this.tileZoom=Math.floor(h),this.zoomFraction=h-this.tileZoom}_updateCameraOnTerrain(){if(!this._elevation||!this._elevation.isDataAvailableAtPoint(this.locationCoordinate(this.center)))return this._centerAltitude=0,this._seaLevelZoom=null,void(this._centerAltitudeValidForExaggeration=void 0);const h=this._elevation;this._centerAltitude=h.getAtPointOrZero(this.locationCoordinate(this.center)),this._centerAltitudeValidForExaggeration=h.exaggeration(),this._updateSeaLevelZoom()}_updateSeaLevelZoom(){this._centerAltitudeValidForExaggeration!==void 0&&(this._seaLevelZoom=this._zoomFromMercatorZ((this.pixelsPerMeter*this._centerAltitude+this.cameraToCenterDistance)/this.worldSize))}sampleAverageElevation(){if(!this._elevation)return 0;const h=this._elevation,b=[[.5,.2],[.3,.5],[.5,.5],[.7,.5],[.5,.8]],R=this.horizonLineFromTop();let U=0,K=0;for(let ne=0;ne<b.length;ne++){const ae=new s.Point(b[ne][0]*this.width,R+b[ne][1]*(this.height-R)),he=h.pointCoordinate(ae);if(!he)continue;const be=1/Math.hypot(he[0]-this._camera.position[0],he[1]-this._camera.position[1]);U+=he[3]*be,K+=be}return K===0?NaN:U/K}get center(){return this._center}set center(h){h.lat===this._center.lat&&h.lng===this._center.lng||(this._unmodified=!1,this._center=h,this._terrainEnabled()&&(this.cameraElevationReference==="ground"?this._updateCameraOnTerrain():this._updateZoomFromElevation()),this._constrain(),this._calcMatrices())}_updateZoomFromElevation(){if(this._seaLevelZoom==null||!this._elevation)return;const h=this._seaLevelZoom,b=this._elevation.getAtPointOrZero(this.locationCoordinate(this.center)),R=this.pixelsPerMeter/this.worldSize*b,U=this._mercatorZfromZoom(h),K=this._mercatorZfromZoom(this._maxZoom),ne=Math.max(U-R,K);this._setZoom(this._zoomFromMercatorZ(ne))}get padding(){return this._edgeInsets.toJSON()}set padding(h){this._edgeInsets.equals(h)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,h,1),this._calcMatrices())}computeZoomRelativeTo(h){const b=this.rayIntersectionCoordinate(this.pointRayIntersection(this.centerPoint,h.toAltitude()));let R;R=h.z<this._camera.position[2]?[b.x,b.y,b.z]:[h.x,h.y,h.z];const U=s.length(s.sub([],this._camera.position,R));return s.clamp(this._zoomFromMercatorZ(U),this._minZoom,this._maxZoom)}setFreeCameraOptions(h){if(!this.height||!h.position&&!h.orientation)return;this._updateCameraState();let b=!1;if(h.orientation&&!s.exactEquals(h.orientation,this._camera.orientation)&&(b=this._setCameraOrientation(h.orientation)),h.position){const R=[h.position.x,h.position.y,h.position.z];s.exactEquals$1(R,this._camera.position)||(this._setCameraPosition(R),b=!0)}b&&(this._updateStateFromCamera(),this.recenterOnTerrain())}getFreeCameraOptions(){this._updateCameraState();const h=this._camera.position,b=new k_;return b.position=new s.MercatorCoordinate(h[0],h[1],h[2]),b.orientation=this._camera.orientation,b._elevation=this.elevation,b._renderWorldCopies=this.renderWorldCopies,b}_setCameraOrientation(h){if(!s.length$1(h))return!1;s.normalize$1(h,h);const b=s.transformQuat([],[0,0,-1],h),R=s.transformQuat([],[0,-1,0],h);if(R[2]<0)return!1;const U=Ah(b,R);return!!U&&(this._camera.orientation=U,!0)}_setCameraPosition(h){const b=this.zoomScale(this.minZoom)*this.tileSize,R=this.zoomScale(this.maxZoom)*this.tileSize,U=this.cameraToCenterDistance;h[2]=s.clamp(h[2],U/R,U/b),this._camera.position=h}get centerPoint(){return this._edgeInsets.getCenter(this.width,this.height)}get fovAboveCenter(){return this._fov*(.5+this.centerOffset.y/this.height)}isPaddingEqual(h){return this._edgeInsets.equals(h)}interpolatePadding(h,b,R){this._unmodified=!1,this._edgeInsets.interpolate(h,b,R),this._constrain(),this._calcMatrices()}coveringZoomLevel(h){const b=(h.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/h.tileSize));return Math.max(0,b)}getVisibleUnwrappedCoordinates(h){const b=[new s.UnwrappedTileID(0,h)];if(this.renderWorldCopies){const R=this.pointCoordinate(new s.Point(0,0)),U=this.pointCoordinate(new s.Point(this.width,0)),K=this.pointCoordinate(new s.Point(this.width,this.height)),ne=this.pointCoordinate(new s.Point(0,this.height)),ae=Math.floor(Math.min(R.x,U.x,K.x,ne.x)),he=Math.floor(Math.max(R.x,U.x,K.x,ne.x)),be=1;for(let we=ae-be;we<=he+be;we++)we!==0&&b.push(new s.UnwrappedTileID(we,h))}return b}coveringTiles(h){let b=this.coveringZoomLevel(h);const R=b,U=this.elevation&&!h.isTerrainDEM,K=this.projection.name==="mercator";if(h.minzoom!==void 0&&b<h.minzoom)return[];h.maxzoom!==void 0&&b>h.maxzoom&&(b=h.maxzoom);const ne=this.locationCoordinate(this.center),ae=this.center.lat,he=1<<b,be=[he*ne.x,he*ne.y,0],we=this.projection.name==="globe",Le=!we,He=s.Frustum.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,b,Le),rt=we?this._camera.mercatorPosition:this.pointCoordinate(this.getCameraPoint()),st=he*s.mercatorZfromAltitude(1,this.center.lat),at=this._camera.position[2]/s.mercatorZfromAltitude(1,this.center.lat),ut=[he*rt.x,he*rt.y,at*(Le?1:st)],De=this.cameraToCenterDistance/h.tileSize*(h.roundZoom?1:.502),it=this.pitch<=60&&this._edgeInsets.top<=this._edgeInsets.bottom&&!this._elevation&&!this.projection.isReprojectedInTileSpace?b:0,yt=h.isTerrainDEM&&this._elevation?1e4*this._elevation.exaggeration():this._centerAltitude,mt=h.isTerrainDEM?-yt:this._elevation?this._elevation.getMinElevationBelowMSL():0,kt=this.projection.isReprojectedInTileSpace?O_(this):1,Lt=lr=>{const xr=1/4e4,qr=new s.MercatorCoordinate(lr.x+xr,lr.y,lr.z),Rr=new s.MercatorCoordinate(lr.x,lr.y+xr,lr.z),Yr=lr.toLngLat(),Nn=qr.toLngLat(),li=Rr.toLngLat(),Cn=this.locationCoordinate(Yr),Gn=this.locationCoordinate(Nn),Ri=this.locationCoordinate(li),bi=Math.hypot(Gn.x-Cn.x,Gn.y-Cn.y),An=Math.hypot(Ri.x-Cn.x,Ri.y-Cn.y);return Math.sqrt(bi*An)*kt/xr},At=lr=>{const xr=yt,qr=mt;return{aabb:s.tileAABB(this,he,0,0,0,lr,qr,xr,this.projection),zoom:0,x:0,y:0,minZ:qr,maxZ:xr,wrap:lr,fullyVisible:!1}},Yt=[];let Vt=[];const or=b,Wr=h.reparseOverscaled?R:b,Qt=lr=>lr*lr,Tr=Qt((at-this._centerAltitude)*st),fr=lr=>{if(!this._elevation||!lr.tileID||!K)return;const xr=this._elevation.getMinMaxForTile(lr.tileID),qr=lr.aabb;xr?(qr.min[2]=xr.min,qr.max[2]=xr.max,qr.center[2]=(qr.min[2]+qr.max[2])/2):(lr.shouldSplit=jr(lr),lr.shouldSplit||(qr.min[2]=qr.max[2]=qr.center[2]=this._centerAltitude))},jr=lr=>{if(lr.zoom<it)return!0;if(lr.zoom===or)return!1;if(lr.shouldSplit!=null)return lr.shouldSplit;const xr=lr.aabb.distanceX(ut),qr=lr.aabb.distanceY(ut);let Rr=Tr,Yr=1;if(we){Rr=Qt(lr.aabb.distanceZ(ut));const Cn=Math.pow(2,lr.zoom),Gn=s.latFromMercatorY((lr.y+1)/Cn),Ri=s.latFromMercatorY(lr.y/Cn),bi=Math.min(Math.max(ae,Gn),Ri),An=s.circumferenceAtLatitude(bi)/s.circumferenceAtLatitude(ae);if(Yr=bi===ae?1/Math.max(1,this._mercatorScaleRatio-.3):Math.min(1,An/this._mercatorScaleRatio),this.zoom<=s.GLOBE_ZOOM_THRESHOLD_MIN&&lr.zoom===or-1&&An>=.9)return!0}else if(U&&(Rr=Qt(lr.aabb.distanceZ(ut)*st)),this.projection.isReprojectedInTileSpace&&R<=5){const Cn=Math.pow(2,lr.zoom),Gn=Lt(new s.MercatorCoordinate((lr.x+.5)/Cn,(lr.y+.5)/Cn));Yr=Gn>.85?1:Gn}const Nn=xr*xr+qr*qr+Rr,li=Qt((1<<or-lr.zoom)*De*Yr*((Cn,Gn)=>{if(Gn*Qt(.707)<Cn)return 1;const Ri=Math.sqrt(Gn/Cn);return Ri/(1.4144271570014144+(Math.pow(1.1,Ri-1.4144271570014144+1)-1)/(1.1-1)-1)})(Math.max(Rr,Tr),Nn));return Nn<li};if(this.renderWorldCopies)for(let lr=1;lr<=3;lr++)Yt.push(At(-lr)),Yt.push(At(lr));for(Yt.push(At(0));Yt.length>0;){const lr=Yt.pop(),xr=lr.x,qr=lr.y;let Rr=lr.fullyVisible;if(!Rr){const Yr=lr.aabb.intersects(He);if(Yr===0)continue;Rr=Yr===2}if(lr.zoom!==or&&jr(lr))for(let Yr=0;Yr<4;Yr++){const Nn=(xr<<1)+Yr%2,li=(qr<<1)+(Yr>>1),Cn={aabb:K?lr.aabb.quadrant(Yr):s.tileAABB(this,he,lr.zoom+1,Nn,li,lr.wrap,lr.minZ,lr.maxZ,this.projection),zoom:lr.zoom+1,x:Nn,y:li,wrap:lr.wrap,fullyVisible:Rr,tileID:void 0,shouldSplit:void 0,minZ:lr.minZ,maxZ:lr.maxZ};U&&!we&&(Cn.tileID=new s.OverscaledTileID(lr.zoom+1===or?Wr:lr.zoom+1,lr.wrap,lr.zoom+1,Nn,li),fr(Cn)),Yt.push(Cn)}else{const Yr=lr.zoom===or?Wr:lr.zoom;if(h.minzoom&&h.minzoom>Yr)continue;const Nn=be[0]-(.5+xr+(lr.wrap<<lr.zoom))*(1<<b-lr.zoom),li=be[1]-.5-qr,Cn=lr.tileID?lr.tileID:new s.OverscaledTileID(Yr,lr.wrap,lr.zoom,xr,qr);Vt.push({tileID:Cn,distanceSq:Nn*Nn+li*li})}}if(this.fogCullDistSq){const lr=this.fogCullDistSq,xr=this.horizonLineFromTop();Vt=Vt.filter(qr=>{const Rr=[0,0,0,1],Yr=[s.EXTENT,s.EXTENT,0,1],Nn=this.calculateFogTileMatrix(qr.tileID.toUnwrapped());s.transformMat4$1(Rr,Rr,Nn),s.transformMat4$1(Yr,Yr,Nn);const li=s.getAABBPointSquareDist(Rr,Yr);if(li===0)return!0;let Cn=!1;const Gn=this._elevation;if(Gn&&li>lr&&xr!==0){const Ri=this.calculateProjMatrix(qr.tileID.toUnwrapped());let bi;h.isTerrainDEM||(bi=Gn.getMinMaxForTile(qr.tileID)),bi||(bi={min:mt,max:yt});const An=s.furthestTileCorner(this.rotation),_o=[An[0]*s.EXTENT,An[1]*s.EXTENT,bi.max];s.transformMat4(_o,_o,Ri),Cn=(1-_o[1])*this.height*.5<xr}return li<lr||Cn})}return Vt.sort((lr,xr)=>lr.distanceSq-xr.distanceSq).map(lr=>lr.tileID)}resize(h,b){this.width=h,this.height=b,this.pixelsToGLUnits=[2/h,-2/b],this._constrain(),this._calcMatrices()}get unmodified(){return this._unmodified}zoomScale(h){return Math.pow(2,h)}scaleZoom(h){return Math.log(h)/Math.LN2}project(h){const b=s.clamp(h.lat,-s.MAX_MERCATOR_LATITUDE,s.MAX_MERCATOR_LATITUDE),R=this.projection.project(h.lng,b);return new s.Point(R.x*this.worldSize,R.y*this.worldSize)}unproject(h){return this.projection.unproject(h.x/this.worldSize,h.y/this.worldSize)}get point(){return this.project(this.center)}get pointMerc(){return this.point._div(this.worldSize)}get pixelsPerMeterRatio(){return this.pixelsPerMeter/s.mercatorZfromAltitude(1,this.center.lat)/this.worldSize}setLocationAtPoint(h,b){let R,U;const K=this.centerPoint;if(this.projection.name==="globe"){const ae=this.worldSize;R=(b.x-K.x)/ae,U=(b.y-K.y)/ae}else{const ae=this.pointCoordinate(b),he=this.pointCoordinate(K);R=ae.x-he.x,U=ae.y-he.y}const ne=this.locationCoordinate(h);this.setLocation(new s.MercatorCoordinate(ne.x-R,ne.y-U))}setLocation(h){this.center=this.coordinateLocation(h),this.projection.wrap&&(this.center=this.center.wrap())}locationPoint(h){return this.projection.locationPoint(this,h)}locationPoint3D(h){return this.projection.locationPoint(this,h,!0)}pointLocation(h){return this.coordinateLocation(this.pointCoordinate(h))}pointLocation3D(h){return this.coordinateLocation(this.pointCoordinate3D(h))}locationCoordinate(h,b){const R=b?s.mercatorZfromAltitude(b,h.lat):void 0,U=this.projection.project(h.lng,h.lat);return new s.MercatorCoordinate(U.x,U.y,R)}coordinateLocation(h){return this.projection.unproject(h.x,h.y)}pointRayIntersection(h,b){const R=b!=null?b:this._centerAltitude,U=[h.x,h.y,0,1],K=[h.x,h.y,1,1];s.transformMat4$1(U,U,this.pixelMatrixInverse),s.transformMat4$1(K,K,this.pixelMatrixInverse);const ne=K[3];s.scale$1(U,U,1/U[3]),s.scale$1(K,K,1/ne);const ae=U[2],he=K[2];return{p0:U,p1:K,t:ae===he?0:(R-ae)/(he-ae)}}screenPointToMercatorRay(h){const b=[h.x,h.y,0,1],R=[h.x,h.y,1,1];return s.transformMat4$1(b,b,this.pixelMatrixInverse),s.transformMat4$1(R,R,this.pixelMatrixInverse),s.scale$1(b,b,1/b[3]),s.scale$1(R,R,1/R[3]),b[2]=s.mercatorZfromAltitude(b[2],this._center.lat)*this.worldSize,R[2]=s.mercatorZfromAltitude(R[2],this._center.lat)*this.worldSize,s.scale$1(b,b,1/this.worldSize),s.scale$1(R,R,1/this.worldSize),new s.Ray([b[0],b[1],b[2]],s.normalize([],s.sub([],R,b)))}rayIntersectionCoordinate(h){const{p0:b,p1:R,t:U}=h,K=s.mercatorZfromAltitude(b[2],this._center.lat),ne=s.mercatorZfromAltitude(R[2],this._center.lat);return new s.MercatorCoordinate(s.number(b[0],R[0],U)/this.worldSize,s.number(b[1],R[1],U)/this.worldSize,s.number(K,ne,U))}pointCoordinate(h,b=this._centerAltitude){return this.projection.pointCoordinate(this,h.x,h.y,b)}pointCoordinate3D(h){if(!this.elevation)return this.pointCoordinate(h);let b=this.projection.pointCoordinate3D(this,h.x,h.y);if(b)return new s.MercatorCoordinate(b[0],b[1],b[2]);let R=0,U=this.horizonLineFromTop();if(h.y>U)return this.pointCoordinate(h);const K=.02*U,ne=h.clone();for(let ae=0;ae<10&&U-R>K;ae++){ne.y=s.number(R,U,.66);const he=this.projection.pointCoordinate3D(this,ne.x,ne.y);he?(U=ne.y,b=he):R=ne.y}return b?new s.MercatorCoordinate(b[0],b[1],b[2]):this.pointCoordinate(h)}isPointAboveHorizon(h){return this.projection.isPointAboveHorizon(this,h)}isPointOnSurface(h){if(h.y<0||h.y>this.height||h.x<0||h.x>this.width)return!1;if(this.elevation||this.zoom>=s.GLOBE_ZOOM_THRESHOLD_MAX)return!this.isPointAboveHorizon(h);const b=this.pointCoordinate(h);return b.y>=0&&b.y<=1}_coordinatePoint(h,b){const R=b&&this.elevation?this.elevation.getAtPointOrZero(h,this._centerAltitude):this._centerAltitude,U=[h.x*this.worldSize,h.y*this.worldSize,R+h.toAltitude(),1];return s.transformMat4$1(U,U,this.pixelMatrix),U[3]>0?new s.Point(U[0]/U[3],U[1]/U[3]):new s.Point(Number.MAX_VALUE,Number.MAX_VALUE)}_getBoundsNonRectangular(){const{top:h,left:b}=this._edgeInsets,R=this.height-this._edgeInsets.bottom,U=this.width-this._edgeInsets.right,K=this.pointLocation3D(new s.Point(b,h)),ne=this.pointLocation3D(new s.Point(U,h)),ae=this.pointLocation3D(new s.Point(U,R)),he=this.pointLocation3D(new s.Point(b,R));let be=Math.min(K.lng,ne.lng,ae.lng,he.lng),we=Math.max(K.lng,ne.lng,ae.lng,he.lng),Le=Math.min(K.lat,ne.lat,ae.lat,he.lat),He=Math.max(K.lat,ne.lat,ae.lat,he.lat);const rt=Math.pow(2,-this.zoom)/16*270,st=this.projection.name==="globe"?1:4,at=(ut,De,it,yt,mt)=>{const kt=(ut+it)/2,Lt=(De+yt)/2,At=new s.Point(kt,Lt),{lng:Yt,lat:Vt}=this.pointLocation3D(At),or=Math.max(0,be-Yt,Le-Vt,Yt-we,Vt-He);be=Math.min(be,Yt),we=Math.max(we,Yt),Le=Math.min(Le,Vt),He=Math.max(He,Vt),(mt<st||or>rt)&&(at(ut,De,kt,Lt,mt+1),at(kt,Lt,it,yt,mt+1))};if(at(b,h,U,h,1),at(U,h,U,R,1),at(U,R,b,R,1),at(b,R,b,h,1),this.projection.name==="globe"){const[ut,De]=s.polesInViewport(this);ut?(He=90,we=180,be=-180):De&&(Le=-90,we=180,be=-180)}return new s.LngLatBounds(new s.LngLat(be,Le),new s.LngLat(we,He))}_getBoundsRectangular(h,b){const{top:R,left:U}=this._edgeInsets,K=this.height-this._edgeInsets.bottom,ne=this.width-this._edgeInsets.right,ae=new s.Point(U,R),he=new s.Point(ne,R),be=new s.Point(ne,K),we=new s.Point(U,K);let Le=this.pointCoordinate(ae,h),He=this.pointCoordinate(he,h);const rt=this.pointCoordinate(be,b),st=this.pointCoordinate(we,b),at=(ut,De)=>(De.y-ut.y)/(De.x-ut.x);return Le.y>1&&He.y>=0?Le=new s.MercatorCoordinate((1-st.y)/at(st,Le)+st.x,1):Le.y<0&&He.y<=1&&(Le=new s.MercatorCoordinate(-st.y/at(st,Le)+st.x,0)),He.y>1&&Le.y>=0?He=new s.MercatorCoordinate((1-rt.y)/at(rt,He)+rt.x,1):He.y<0&&Le.y<=1&&(He=new s.MercatorCoordinate(-rt.y/at(rt,He)+rt.x,0)),new s.LngLatBounds().extend(this.coordinateLocation(Le)).extend(this.coordinateLocation(He)).extend(this.coordinateLocation(st)).extend(this.coordinateLocation(rt))}_getBoundsRectangularTerrain(){const h=this.elevation;if(!h.visibleDemTiles.length||h.isUsingMockSource())return this._getBoundsRectangular(0,0);const b=h.visibleDemTiles.reduce((R,U)=>{if(U.dem){const K=U.dem.tree;R.min=Math.min(R.min,K.minimums[0]),R.max=Math.max(R.max,K.maximums[0])}return R},{min:Number.MAX_VALUE,max:0});return this._getBoundsRectangular(b.min*h.exaggeration(),b.max*h.exaggeration())}getBounds(){return this.projection.name==="mercator"||this.projection.name==="equirectangular"?this._terrainEnabled()?this._getBoundsRectangularTerrain():this._getBoundsRectangular(0,0):this._getBoundsNonRectangular()}horizonLineFromTop(h=!0){const b=this.height/2/Math.tan(this._fov/2)/Math.tan(Math.max(this._pitch,.1))+this.centerOffset.y,R=this.height/2-b*(1-this._horizonShift);return h?Math.max(0,R):R}getMaxBounds(){return this.maxBounds}setMaxBounds(h){this.maxBounds=h,this.minLat=-s.MAX_MERCATOR_LATITUDE,this.maxLat=s.MAX_MERCATOR_LATITUDE,this.minLng=-180,this.maxLng=180,h&&(this.minLat=h.getSouth(),this.maxLat=h.getNorth(),this.minLng=h.getWest(),this.maxLng=h.getEast(),this.maxLng<this.minLng&&(this.maxLng+=360)),this.worldMinX=s.mercatorXfromLng(this.minLng)*this.tileSize,this.worldMaxX=s.mercatorXfromLng(this.maxLng)*this.tileSize,this.worldMinY=s.mercatorYfromLat(this.maxLat)*this.tileSize,this.worldMaxY=s.mercatorYfromLat(this.minLat)*this.tileSize,this._constrain()}calculatePosMatrix(h,b){return this.projection.createTileMatrix(this,b,h)}calculateDistanceTileData(h){const b=h.key,R=this._distanceTileDataCache;if(R[b])return R[b];const U=h.canonical,K=1/this.height,ne=this.cameraWorldSize,ae=ne/this.zoomScale(U.z),he=(U.x+Math.pow(2,U.z)*h.wrap)*ae,be=U.y*ae,we=this.point;we.x*=ne/this.worldSize,we.y*=ne/this.worldSize;const Le=this.angle,He=Math.sin(-Le),rt=-Math.cos(-Le);return R[b]={bearing:[He,rt],center:[(we.x-he)*K,(we.y-be)*K],scale:ae/s.EXTENT*K},R[b]}calculateFogTileMatrix(h){const b=h.key,R=this._fogTileMatrixCache;if(R[b])return R[b];const U=this.projection.createTileMatrix(this,this.cameraWorldSizeForFog,h);return s.multiply(U,this.worldToFogMatrix,U),R[b]=new Float32Array(U),R[b]}calculateProjMatrix(h,b=!1){const R=h.key,U=b?this._alignedProjMatrixCache:this._projMatrixCache;if(U[R])return U[R];const K=this.calculatePosMatrix(h,this.worldSize);return s.multiply(K,this.projection.isReprojectedInTileSpace?this.mercatorMatrix:b?this.alignedProjMatrix:this.projMatrix,K),U[R]=new Float32Array(K),U[R]}calculatePixelsToTileUnitsMatrix(h){const b=h.tileID.key,R=this._pixelsToTileUnitsCache;if(R[b])return R[b];const U=function(K,ne){const{scale:ae}=K.tileTransform,he=ae*s.EXTENT/(K.tileSize*Math.pow(2,ne.zoom-K.tileID.overscaledZ+K.tileID.canonical.z));return be=new Float32Array(4),He=(we=ne.inverseAdjustmentMatrix)[1],rt=we[2],st=we[3],ut=(Le=[he,he])[1],be[0]=we[0]*(at=Le[0]),be[1]=He*at,be[2]=rt*ut,be[3]=st*ut,be;var be,we,Le,He,rt,st,at,ut}(h,this);return R[b]=U,R[b]}customLayerMatrix(){return this.mercatorMatrix.slice()}globeToMercatorMatrix(){if(this.projection.name==="globe"){const h=1/this.worldSize,b=s.fromScaling([],[h,h,h]);return s.multiply(b,b,this.globeMatrix),b}}recenterOnTerrain(){if(!this._elevation||this.projection.name==="globe")return;const h=this._elevation;this._updateCameraState();const b=s.mercatorZfromAltitude(1,this._center.lat)*this.worldSize,R=this._computeCameraPosition(b),U=this._camera.forward(),K=s.mercatorZfromAltitude(1,this._center.lat);R[2]/=K,U[2]/=K,s.normalize(U,U);const ne=h.raycast(R,U,h.exaggeration());if(ne){const ae=s.scaleAndAdd([],R,U,ne),he=new s.MercatorCoordinate(ae[0],ae[1],s.mercatorZfromAltitude(ae[2],s.latFromMercatorY(ae[1]))),be=(he.z+s.length([he.x-R[0],he.y-R[1],he.z-R[2]*K]))*this._pixelsPerMercatorPixel;this._seaLevelZoom=this._zoomFromMercatorZ(be),this._centerAltitude=he.toAltitude(),this._center=this.coordinateLocation(he),this._updateZoomFromElevation(),this._constrain(),this._calcMatrices()}}_constrainCamera(h=!1){if(!this._elevation)return;const b=this._elevation,R=s.mercatorZfromAltitude(1,this._center.lat)*this.worldSize,U=this._computeCameraPosition(R),K=b.getAtPointOrZero(new s.MercatorCoordinate(...U)),ne=this.pixelsPerMeter/this.worldSize*K,ae=this._minimumHeightOverTerrain(),he=U[2]-ne;if(he<=ae)if(he<0||h){const be=this.locationCoordinate(this._center,this._centerAltitude),we=[U[0],U[1],be.z-U[2]],Le=s.length(we);we[2]-=(ae-he)/this._pixelsPerMercatorPixel;const He=s.length(we);if(He===0)return;s.scale$2(we,we,Le/He*this._pixelsPerMercatorPixel),this._camera.position=[U[0],U[1],be.z*this._pixelsPerMercatorPixel-we[2]],this._updateStateFromCamera()}else this._isCameraConstrained=!0}_constrain(){if(!this.center||!this.width||!this.height||this._constraining)return;this._constraining=!0;const h=this.projection.name==="globe"||this.mercatorFromTransition;if(this.projection.isReprojectedInTileSpace||h){const He=this.center;return He.lat=s.clamp(He.lat,this.minLat,this.maxLat),(this.maxBounds||!this.renderWorldCopies&&!h)&&(He.lng=s.clamp(He.lng,this.minLng,this.maxLng)),this.center=He,void(this._constraining=!1)}const b=this._unmodified,{x:R,y:U}=this.point;let K=0,ne=R,ae=U;const he=this.width/2,be=this.height/2,we=this.worldMinY*this.scale,Le=this.worldMaxY*this.scale;if(U-be<we&&(ae=we+be),U+be>Le&&(ae=Le-be),Le-we<this.height&&(K=Math.max(K,this.height/(Le-we)),ae=(Le+we)/2),this.maxBounds||!this._renderWorldCopies||!this.projection.wrap){const He=this.worldMinX*this.scale,rt=this.worldMaxX*this.scale,st=this.worldSize/2-(He+rt)/2;ne=(R+st+this.worldSize)%this.worldSize-st,ne-he<He&&(ne=He+he),ne+he>rt&&(ne=rt-he),rt-He<this.width&&(K=Math.max(K,this.width/(rt-He)),ne=(rt+He)/2)}ne===R&&ae===U||(this.center=this.unproject(new s.Point(ne,ae))),K&&(this.zoom+=this.scaleZoom(K)),this._constrainCamera(),this._unmodified=b,this._constraining=!1}_minZoomForBounds(){let h=Math.max(0,this.scaleZoom(this.height/(this.worldMaxY-this.worldMinY)));return this.maxBounds&&(h=Math.max(h,this.scaleZoom(this.width/(this.worldMaxX-this.worldMinX)))),h}_maxCameraBoundsDistance(){return this._mercatorZfromZoom(this._minZoomForBounds())}_calcMatrices(){if(!this.height)return;const h=this.centerOffset,b=this.pixelsPerMeter;this.projection.name==="globe"&&(this._mercatorScaleRatio=s.mercatorZfromAltitude(1,this.center.lat)/s.mercatorZfromAltitude(1,s.GLOBE_SCALE_MATCH_LATITUDE));const R=Zp(this.projection,this.zoom,this.width,this.height,1024);this._pixelsPerMercatorPixel=this.projection.pixelSpaceConversion(this.center.lat,this.worldSize,R),this.cameraToCenterDistance=.5/Math.tan(.5*this._fov)*this.height*this._pixelsPerMercatorPixel,this._updateCameraState(),this._farZ=this.projection.farthestPixelDistance(this),this._nearZ=this.height/50;const U=this.projection.zAxisUnit==="meters"?b:1,K=this._camera.getWorldToCamera(this.worldSize,U),ne=this._camera.getCameraToClipPerspective(this._fov,this.width/this.height,this._nearZ,this._farZ);ne[8]=2*-h.x/this.width,ne[9]=2*h.y/this.height;let ae=s.mul([],ne,K);if(this.projection.isReprojectedInTileSpace){const Lt=this.locationCoordinate(this.center),At=s.identity([]);s.translate(At,At,[Lt.x*this.worldSize,Lt.y*this.worldSize,0]),s.multiply(At,At,Kp(this)),s.translate(At,At,[-Lt.x*this.worldSize,-Lt.y*this.worldSize,0]),s.multiply(ae,ae,At),this.inverseAdjustmentMatrix=function(Yt){const Vt=Kp(Yt,!0);return D([],[Vt[0],Vt[1],Vt[4],Vt[5]])}(this)}else this.inverseAdjustmentMatrix=[1,0,0,1];this.mercatorMatrix=s.scale([],ae,[this.worldSize,this.worldSize,this.worldSize/U,1]),this.projMatrix=ae,this.invProjMatrix=s.invert(new Float64Array(16),this.projMatrix);const he=s.invert([],ne);this.frustumCorners=s.FrustumCorners.fromInvProjectionMatrix(he,this.horizonLineFromTop(),this.height);const be=new Float32Array(16);s.identity(be),s.scale(be,be,[1,-1,1]),s.rotateX(be,be,this._pitch),s.rotateZ(be,be,this.angle);const we=s.perspective(new Float32Array(16),this._fov,this.width/this.height,this._nearZ,this._farZ),Le=(Math.PI/2-this._pitch)*(this.height/this._fov)*this._horizonShift;we[8]=2*-h.x/this.width,we[9]=2*(h.y+Le)/this.height,this.skyboxMatrix=s.multiply(be,we,be);const He=this.point,rt=He.x,st=He.y,at=this.width%2/2,ut=this.height%2/2,De=Math.cos(this.angle),it=Math.sin(this.angle),yt=rt-Math.round(rt)+De*at+it*ut,mt=st-Math.round(st)+De*ut+it*at,kt=new Float64Array(ae);if(s.translate(kt,kt,[yt>.5?yt-1:yt,mt>.5?mt-1:mt,0]),this.alignedProjMatrix=kt,ae=s.create(),s.scale(ae,ae,[this.width/2,-this.height/2,1]),s.translate(ae,ae,[1,-1,0]),this.labelPlaneMatrix=ae,ae=s.create(),s.scale(ae,ae,[1,-1,1]),s.translate(ae,ae,[-1,-1,0]),s.scale(ae,ae,[2/this.width,2/this.height,1]),this.glCoordMatrix=ae,this.pixelMatrix=s.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),this._calcFogMatrices(),this._distanceTileDataCache={},ae=s.invert(new Float64Array(16),this.pixelMatrix),!ae)throw new Error("failed to invert matrix");if(this.pixelMatrixInverse=ae,this.projection.name==="globe"||this.mercatorFromTransition){this.globeMatrix=s.calculateGlobeMatrix(this);const Lt=[this.globeMatrix[12],this.globeMatrix[13],this.globeMatrix[14]];this.globeCenterInViewSpace=s.transformMat4(Lt,Lt,K),this.globeRadius=this.worldSize/2/Math.PI-1}else this.globeMatrix=ae;this._projMatrixCache={},this._alignedProjMatrixCache={},this._pixelsToTileUnitsCache={}}_calcFogMatrices(){this._fogTileMatrixCache={};const h=this.cameraWorldSizeForFog,b=this.cameraPixelsPerMeter,R=this._camera.position,U=1/this.height/this._pixelsPerMercatorPixel,K=[h,h,b];s.scale$2(K,K,U),s.scale$2(R,R,-1),s.multiply$2(R,R,K);const ne=s.create();s.translate(ne,ne,R),s.scale(ne,ne,K),this.mercatorFogMatrix=ne,this.worldToFogMatrix=this._camera.getWorldToCameraPosition(h,b,U)}_computeCameraPosition(h){const b=(h=h||this.pixelsPerMeter)/this.pixelsPerMeter,R=this._camera.forward(),U=this.point,K=this._mercatorZfromZoom(this._seaLevelZoom?this._seaLevelZoom:this._zoom)*b-h/this.worldSize*this._centerAltitude;return[U.x/this.worldSize-R[0]*K,U.y/this.worldSize-R[1]*K,h/this.worldSize*this._centerAltitude-R[2]*K]}_updateCameraState(){this.height&&(this._camera.setPitchBearing(this._pitch,this.angle),this._camera.position=this._computeCameraPosition())}_translateCameraConstrained(h){const b=this._maxCameraBoundsDistance()*Math.cos(this._pitch),R=this._camera.position[2],U=h[2];let K=1;this.projection.wrap&&(this.center=this.center.wrap()),U>0&&(K=Math.min((b-R)/U,1)),this._camera.position=s.scaleAndAdd([],this._camera.position,h,K),this._updateStateFromCamera()}_updateStateFromCamera(){const h=this._camera.position,b=this._camera.forward(),{pitch:R,bearing:U}=this._camera.getPitchBearing(),K=s.mercatorZfromAltitude(this._centerAltitude,this.center.lat)*this._pixelsPerMercatorPixel,ne=this._mercatorZfromZoom(this._maxZoom)*Math.cos(s.degToRad(this._maxPitch)),ae=Math.max((h[2]-K)/Math.cos(R),ne),he=this._zoomFromMercatorZ(ae);s.scaleAndAdd(h,h,b,ae),this._pitch=s.clamp(R,s.degToRad(this.minPitch),s.degToRad(this.maxPitch)),this.angle=s.wrap(U,-Math.PI,Math.PI),this._setZoom(s.clamp(he,this._minZoom,this._maxZoom)),this._updateSeaLevelZoom(),this._center=this.coordinateLocation(new s.MercatorCoordinate(h[0],h[1],h[2])),this._unmodified=!1,this._constrain(),this._calcMatrices()}_worldSizeFromZoom(h){return Math.pow(2,h)*this.tileSize}_mercatorZfromZoom(h){return this.cameraToCenterDistance/this._worldSizeFromZoom(h)}_minimumHeightOverTerrain(){const h=Math.min((this._seaLevelZoom!=null?this._seaLevelZoom:this._zoom)+4,this._maxZoom);return this._mercatorZfromZoom(h)}_zoomFromMercatorZ(h){return this.scaleZoom(this.cameraToCenterDistance/(h*this.tileSize))}zoomFromMercatorZAdjusted(h){let b=0,R=s.GLOBE_ZOOM_THRESHOLD_MAX,U=0,K=1/0;for(;R-b>1e-6&&R>b;){const ne=b+.5*(R-b),ae=this.tileSize*Math.pow(2,ne),he=this.getCameraToCenterDistance(this.projection,ne,ae),be=this.scaleZoom(he/(h*this.tileSize)),we=Math.abs(ne-be);we<K&&(K=we,U=ne),ne<be?b=ne:R=ne}return U}_terrainEnabled(){return!(!this._elevation||!this.projection.supportsTerrain&&(s.warnOnce("Terrain is not yet supported with alternate projections. Use mercator or globe to enable terrain."),1))}anyCornerOffEdge(h,b){const R=Math.min(h.x,b.x),U=Math.max(h.x,b.x),K=Math.min(h.y,b.y),ne=Math.max(h.y,b.y);if(K<this.horizonLineFromTop(!1))return!0;if(this.projection.name!=="mercator")return!1;const ae=[new s.Point(R,K),new s.Point(U,ne),new s.Point(R,ne),new s.Point(U,K)],he=this.renderWorldCopies?-3:0,be=this.renderWorldCopies?4:1;for(const we of ae){const Le=this.pointRayIntersection(we);if(Le.t<0)return!0;const He=this.rayIntersectionCoordinate(Le);if(He.x<he||He.y<0||He.x>be||He.y>1)return!0}return!1}isHorizonVisible(){return this.pitch+s.radToDeg(this.fovAboveCenter)>88||this.anyCornerOffEdge(new s.Point(0,0),new s.Point(this.width,this.height))}zoomDeltaToMovement(h,b){const R=s.length(s.sub([],this._camera.position,h)),U=this._zoomFromMercatorZ(R)+b;return R-this._mercatorZfromZoom(U)}getCameraPoint(){if(this.projection.name==="globe"){const h=function([b,R,U],K){const ne=[b,R,U,1];s.transformMat4$1(ne,ne,K);const ae=ne[3]=Math.max(ne[3],1e-6);return ne[0]/=ae,ne[1]/=ae,ne[2]/=ae,ne}([this.globeMatrix[12],this.globeMatrix[13],this.globeMatrix[14]],this.pixelMatrix);return new s.Point(h[0],h[1])}{const h=Math.tan(this._pitch)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new s.Point(0,h))}}getCameraToCenterDistance(h,b=this.zoom,R=this.worldSize){const U=Zp(h,b,this.width,this.height,1024),K=h.pixelSpaceConversion(this.center.lat,R,U);return .5/Math.tan(.5*this._fov)*this.height*K}getWorldToCameraMatrix(){const h=this._camera.getWorldToCamera(this.worldSize,this.projection.zAxisUnit==="meters"?this.pixelsPerMeter:1);return this.projection.name==="globe"&&s.multiply(h,h,this.globeMatrix),h}}function lg(I,h){let b=!1,R=null;const U=()=>{R=null,b&&(I(),R=setTimeout(U,h),b=!1)};return()=>(b=!0,R||U(),R)}class L_{constructor(h){this._hashName=h&&encodeURIComponent(h),s.bindAll(["_getCurrentHash","_onHashChange","_updateHash"],this),this._updateHash=lg(this._updateHashUnthrottled.bind(this),300)}addTo(h){return this._map=h,s.window.addEventListener("hashchange",this._onHashChange,!1),h.on("moveend",this._updateHash),this}remove(){return this._map?(this._map.off("moveend",this._updateHash),s.window.removeEventListener("hashchange",this._onHashChange,!1),clearTimeout(this._updateHash()),this._map=void 0,this):this}getHashString(){const h=this._map;if(!h)return"";const b=Tv(h);if(this._hashName){const R=this._hashName;let U=!1;const K=s.window.location.hash.slice(1).split("&").map(ne=>{const ae=ne.split("=")[0];return ae===R?(U=!0,`${ae}=${b}`):ne}).filter(ne=>ne);return U||K.push(`${R}=${b}`),`#${K.join("&")}`}return`#${b}`}_getCurrentHash(){const h=s.window.location.hash.replace("#","");if(this._hashName){let b;return h.split("&").map(R=>R.split("=")).forEach(R=>{R[0]===this._hashName&&(b=R)}),(b&&b[1]||"").split("/")}return h.split("/")}_onHashChange(){const h=this._map;if(!h)return!1;const b=this._getCurrentHash();if(b.length>=3&&!b.some(R=>isNaN(R))){const R=h.dragRotate.isEnabled()&&h.touchZoomRotate.isEnabled()?+(b[3]||0):h.getBearing();return h.jumpTo({center:[+b[2],+b[1]],zoom:+b[0],bearing:R,pitch:+(b[4]||0)}),!0}return!1}_updateHashUnthrottled(){const h=s.window.location.href.replace(/(#.+)?$/,this.getHashString());s.window.history.replaceState(s.window.history.state,null,h)}}function Tv(I,h){const b=I.getCenter(),R=Math.round(100*I.getZoom())/100,U=Math.ceil((R*Math.LN2+Math.log(512/360/.5))/Math.LN10),K=Math.pow(10,U),ne=Math.round(b.lng*K)/K,ae=Math.round(b.lat*K)/K,he=I.getBearing(),be=I.getPitch();let we=h?`/${ne}/${ae}/${R}`:`${R}/${ae}/${ne}`;return(he||be)&&(we+="/"+Math.round(10*he)/10),be&&(we+=`/${Math.round(be)}`),we}const Rh={linearity:.3,easing:s.bezier(0,0,.3,1)},Qp=s.extend({deceleration:2500,maxSpeed:1400},Rh),cg=s.extend({deceleration:20,maxSpeed:1400},Rh),wn=s.extend({deceleration:1e3,maxSpeed:360},Rh),au=s.extend({deceleration:1e3,maxSpeed:90},Rh);class tw{constructor(h){this._map=h,this.clear()}clear(){this._inertiaBuffer=[]}record(h){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:s.exported.now(),settings:h})}_drainInertiaBuffer(){const h=this._inertiaBuffer,b=s.exported.now();for(;h.length>0&&b-h[0].time>160;)h.shift()}_onMoveEnd(h){if(this._map._prefersReducedMotion()||(this._drainInertiaBuffer(),this._inertiaBuffer.length<2))return;const b={zoom:0,bearing:0,pitch:0,pan:new s.Point(0,0),pinchAround:void 0,around:void 0};for(const{settings:K}of this._inertiaBuffer)b.zoom+=K.zoomDelta||0,b.bearing+=K.bearingDelta||0,b.pitch+=K.pitchDelta||0,K.panDelta&&b.pan._add(K.panDelta),K.around&&(b.around=K.around),K.pinchAround&&(b.pinchAround=K.pinchAround);const R=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,U={};if(b.pan.mag()){const K=zs(b.pan.mag(),R,s.extend({},Qp,h||{}));U.offset=b.pan.mult(K.amount/b.pan.mag()),U.center=this._map.transform.center,Pv(U,K)}if(b.zoom){const K=zs(b.zoom,R,cg);U.zoom=this._map.transform.zoom+K.amount,Pv(U,K)}if(b.bearing){const K=zs(b.bearing,R,wn);U.bearing=this._map.transform.bearing+s.clamp(K.amount,-179,179),Pv(U,K)}if(b.pitch){const K=zs(b.pitch,R,au);U.pitch=this._map.transform.pitch+K.amount,Pv(U,K)}if(U.zoom||U.bearing){const K=b.pinchAround===void 0?b.around:b.pinchAround;U.around=K?this._map.unproject(K):this._map.getCenter()}return this.clear(),U.noMoveStart=!0,U}}function Pv(I,h){(!I.duration||I.duration<h.duration)&&(I.duration=h.duration,I.easing=h.easing)}function zs(I,h,b){const{maxSpeed:R,linearity:U,deceleration:K}=b,ne=s.clamp(I*U/(h/1e3),-R,R),ae=Math.abs(ne)/(K*U);return{easing:b.easing,duration:1e3*ae,amount:ne*(ae/2)}}class xo extends s.Event{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(h,b,R,U={}){const K=k(b.getCanvasContainer(),R),ne=b.unproject(K);super(h,s.extend({point:K,lngLat:ne,originalEvent:R},U)),this._defaultPrevented=!1,this.target=b}}class Iv extends s.Event{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(h,b,R){const U=h==="touchend"?R.changedTouches:R.touches,K=X(b.getCanvasContainer(),U),ne=K.map(he=>b.unproject(he)),ae=K.reduce((he,be,we,Le)=>he.add(be.div(Le.length)),new s.Point(0,0));super(h,{points:K,point:ae,lngLats:ne,lngLat:b.unproject(ae),originalEvent:R}),this._defaultPrevented=!1}}class u0 extends s.Event{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(h,b,R){super(h,{originalEvent:R}),this._defaultPrevented=!1}}class f0{constructor(h,b){this._map=h,this._clickTolerance=b.clickTolerance}reset(){this._mousedownPos=void 0}wheel(h){return this._firePreventable(new u0(h.type,this._map,h))}mousedown(h,b){return this._mousedownPos=b,this._firePreventable(new xo(h.type,this._map,h))}mouseup(h){this._map.fire(new xo(h.type,this._map,h))}preclick(h){const b=s.extend({},h);b.type="preclick",this._map.fire(new xo(b.type,this._map,b))}click(h,b){this._mousedownPos&&this._mousedownPos.dist(b)>=this._clickTolerance||(this.preclick(h),this._map.fire(new xo(h.type,this._map,h)))}dblclick(h){return this._firePreventable(new xo(h.type,this._map,h))}mouseover(h){this._map.fire(new xo(h.type,this._map,h))}mouseout(h){this._map.fire(new xo(h.type,this._map,h))}touchstart(h){return this._firePreventable(new Iv(h.type,this._map,h))}touchmove(h){this._map.fire(new Iv(h.type,this._map,h))}touchend(h){this._map.fire(new Iv(h.type,this._map,h))}touchcancel(h){this._map.fire(new Iv(h.type,this._map,h))}_firePreventable(h){if(this._map.fire(h),h.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class d0{constructor(h){this._map=h}reset(){this._delayContextMenu=!1,this._contextMenuEvent=void 0}mousemove(h){this._map.fire(new xo(h.type,this._map,h))}mousedown(){this._delayContextMenu=!0}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new xo("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(h){this._delayContextMenu?this._contextMenuEvent=h:this._map.fire(new xo(h.type,this._map,h)),this._map.listens("contextmenu")&&h.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class h0{constructor(h,b){this._map=h,this._el=h.getCanvasContainer(),this._container=h.getContainer(),this._clickTolerance=b.clickTolerance||1}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(h,b){this.isEnabled()&&h.shiftKey&&h.button===0&&(C(),this._startPos=this._lastPos=b,this._active=!0)}mousemoveWindow(h,b){if(!this._active)return;const R=b,U=this._startPos,K=this._lastPos;if(!U||!K||K.equals(R)||!this._box&&R.dist(U)<this._clickTolerance)return;this._lastPos=R,this._box||(this._box=v("div","mapboxgl-boxzoom",this._container),this._container.classList.add("mapboxgl-crosshair"),this._fireEvent("boxzoomstart",h));const ne=Math.min(U.x,R.x),ae=Math.max(U.x,R.x),he=Math.min(U.y,R.y),be=Math.max(U.y,R.y);this._map._requestDomTask(()=>{this._box&&(this._box.style.transform=`translate(${ne}px,${he}px)`,this._box.style.width=ae-ne+"px",this._box.style.height=be-he+"px")})}mouseupWindow(h,b){if(!this._active)return;const R=this._startPos,U=b;if(R&&h.button===0){if(this.reset(),A(),R.x!==U.x||R.y!==U.y)return this._map.fire(new s.Event("boxzoomend",{originalEvent:h})),{cameraAnimation:K=>K.fitScreenCoordinates(R,U,this._map.getBearing(),{linear:!1})};this._fireEvent("boxzoomcancel",h)}}keydown(h){this._active&&h.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",h))}blur(){this.reset()}reset(){this._active=!1,this._container.classList.remove("mapboxgl-crosshair"),this._box&&(this._box.remove(),this._box=null),E(),delete this._startPos,delete this._lastPos}_fireEvent(h,b){return this._map.fire(new s.Event(h,{originalEvent:b}))}}function kh(I,h){const b={};for(let R=0;R<I.length;R++)b[I[R].identifier]=h[R];return b}class Oh{constructor(h){this.reset(),this.numTouches=h.numTouches}reset(){this.centroid=void 0,this.startTime=0,this.touches={},this.aborted=!1}touchstart(h,b,R){(this.centroid||R.length>this.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===0&&(this.startTime=h.timeStamp),R.length===this.numTouches&&(this.centroid=function(U){const K=new s.Point(0,0);for(const ne of U)K._add(ne);return K.div(U.length)}(b),this.touches=kh(R,b)))}touchmove(h,b,R){if(this.aborted||!this.centroid)return;const U=kh(R,b);for(const K in this.touches){const ne=U[K];(!ne||ne.dist(this.touches[K])>30)&&(this.aborted=!0)}}touchend(h,b,R){if((!this.centroid||h.timeStamp-this.startTime>500)&&(this.aborted=!0),R.length===0){const U=!this.aborted&&this.centroid;if(this.reset(),U)return U}}}class Lh{constructor(h){this.singleTap=new Oh(h),this.numTaps=h.numTaps,this.reset()}reset(){this.lastTime=1/0,this.lastTap=void 0,this.count=0,this.singleTap.reset()}touchstart(h,b,R){this.singleTap.touchstart(h,b,R)}touchmove(h,b,R){this.singleTap.touchmove(h,b,R)}touchend(h,b,R){const U=this.singleTap.touchend(h,b,R);if(U){const K=h.timeStamp-this.lastTime<500,ne=!this.lastTap||this.lastTap.dist(U)<30;if(K&&ne||this.reset(),this.count++,this.lastTime=h.timeStamp,this.lastTap=U,this.count===this.numTaps)return this.reset(),U}}}class Mv{constructor(){this._zoomIn=new Lh({numTouches:1,numTaps:2}),this._zoomOut=new Lh({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(h,b,R){this._zoomIn.touchstart(h,b,R),this._zoomOut.touchstart(h,b,R)}touchmove(h,b,R){this._zoomIn.touchmove(h,b,R),this._zoomOut.touchmove(h,b,R)}touchend(h,b,R){const U=this._zoomIn.touchend(h,b,R),K=this._zoomOut.touchend(h,b,R);return U?(this._active=!0,h.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:ne=>ne.easeTo({duration:300,zoom:ne.getZoom()+1,around:ne.unproject(U)},{originalEvent:h})}):K?(this._active=!0,h.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:ne=>ne.easeTo({duration:300,zoom:ne.getZoom()-1,around:ne.unproject(K)},{originalEvent:h})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}const ug={0:1,2:2};class Id{constructor(h){this.reset(),this._clickTolerance=h.clickTolerance||1}blur(){this.reset()}reset(){this._active=!1,this._moved=!1,this._lastPoint=void 0,this._eventButton=void 0}_correctButton(h,b){return!1}_move(h,b){return{}}mousedown(h,b){if(this._lastPoint)return;const R=Z(h);this._correctButton(h,R)&&(this._lastPoint=b,this._eventButton=R)}mousemoveWindow(h,b){const R=this._lastPoint;if(R){if(h.preventDefault(),this._eventButton!=null&&function(U,K){const ne=ug[K];return U.buttons===void 0||(U.buttons&ne)!==ne}(h,this._eventButton))this.reset();else if(this._moved||!(b.dist(R)<this._clickTolerance))return this._moved=!0,this._lastPoint=b,this._move(R,b)}}mouseupWindow(h){this._lastPoint&&Z(h)===this._eventButton&&(this._moved&&A(),this.reset())}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Dh extends Id{mousedown(h,b){super.mousedown(h,b),this._lastPoint&&(this._active=!0)}_correctButton(h,b){return b===0&&!h.ctrlKey}_move(h,b){return{around:b,panDelta:b.sub(h)}}}class D_ extends Id{_correctButton(h,b){return b===0&&h.ctrlKey||b===2}_move(h,b){const R=.8*(b.x-h.x);if(R)return this._active=!0,{bearingDelta:R}}contextmenu(h){h.preventDefault()}}class N_ extends Id{_correctButton(h,b){return b===0&&h.ctrlKey||b===2}_move(h,b){const R=-.5*(b.y-h.y);if(R)return this._active=!0,{pitchDelta:R}}contextmenu(h){h.preventDefault()}}class p0{constructor(h,b){this._map=h,this._el=h.getCanvasContainer(),this._minTouches=1,this._clickTolerance=b.clickTolerance||1,this.reset(),s.bindAll(["_addTouchPanBlocker","_showTouchPanBlockerAlert"],this)}reset(){this._active=!1,this._touches={},this._sum=new s.Point(0,0)}touchstart(h,b,R){return this._calculateTransform(h,b,R)}touchmove(h,b,R){if(this._active&&!(R.length<this._minTouches)){if(this._map._cooperativeGestures&&!this._map.isMoving()){if(R.length===1&&!s.isFullscreen())return void this._showTouchPanBlockerAlert();this._alertContainer.style.visibility!=="hidden"&&(this._alertContainer.style.visibility="hidden",clearTimeout(this._alertTimer))}return h.cancelable&&h.preventDefault(),this._calculateTransform(h,b,R)}}touchend(h,b,R){this._calculateTransform(h,b,R),this._active&&R.length<this._minTouches&&this.reset()}touchcancel(){this.reset()}_calculateTransform(h,b,R){R.length>0&&(this._active=!0);const U=kh(R,b),K=new s.Point(0,0),ne=new s.Point(0,0);let ae=0;for(const be in U){const we=U[be],Le=this._touches[be];Le&&(K._add(we),ne._add(we.sub(Le)),ae++,U[be]=we)}if(this._touches=U,ae<this._minTouches||!ne.mag())return;const he=ne.div(ae);return this._sum._add(he),this._sum.mag()<this._clickTolerance?void 0:{around:K.div(ae),panDelta:he}}enable(){this._enabled=!0,this._map._cooperativeGestures&&(this._addTouchPanBlocker(),this._el.classList.add("mapboxgl-touch-pan-blocker-override","mapboxgl-scrollable-page"))}disable(){this._enabled=!1,this._map._cooperativeGestures&&(clearTimeout(this._alertTimer),this._alertContainer.remove(),this._el.classList.remove("mapboxgl-touch-pan-blocker-override","mapboxgl-scrollable-page")),this.reset()}isEnabled(){return!!this._enabled}isActive(){return!!this._active}_addTouchPanBlocker(){this._map&&!this._alertContainer&&(this._alertContainer=v("div","mapboxgl-touch-pan-blocker",this._map._container),this._alertContainer.textContent=this._map._getUIString("TouchPanBlocker.Message"),this._alertContainer.style.fontSize=`${Math.max(10,Math.min(24,Math.floor(.05*this._el.clientWidth)))}px`)}_showTouchPanBlockerAlert(){this._alertContainer.style.visibility="visible",this._alertContainer.classList.add("mapboxgl-touch-pan-blocker-show"),this._alertContainer.setAttribute("role","alert"),clearTimeout(this._alertTimer),this._alertTimer=setTimeout(()=>{this._alertContainer.classList.remove("mapboxgl-touch-pan-blocker-show"),this._alertContainer.setAttribute("role","null")},500)}}class Av{constructor(){this.reset()}reset(){this._active=!1,this._firstTwoTouches=void 0}_start(h){}_move(h,b,R){return{}}touchstart(h,b,R){this._firstTwoTouches||R.length<2||(this._firstTwoTouches=[R[0].identifier,R[1].identifier],this._start([b[0],b[1]]))}touchmove(h,b,R){const U=this._firstTwoTouches;if(!U)return;h.preventDefault();const[K,ne]=U,ae=Rv(R,b,K),he=Rv(R,b,ne);if(!ae||!he)return;const be=this._aroundCenter?null:ae.add(he).div(2);return this._move([ae,he],be,h)}touchend(h,b,R){if(!this._firstTwoTouches)return;const[U,K]=this._firstTwoTouches,ne=Rv(R,b,U),ae=Rv(R,b,K);ne&&ae||(this._active&&A(),this.reset())}touchcancel(){this.reset()}enable(h){this._enabled=!0,this._aroundCenter=!!h&&h.around==="center"}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}function Rv(I,h,b){for(let R=0;R<I.length;R++)if(I[R].identifier===b)return h[R]}function fg(I,h){return Math.log(I/h)/Math.LN2}class dg extends Av{reset(){super.reset(),this._distance=0,this._startDistance=0}_start(h){this._startDistance=this._distance=h[0].dist(h[1])}_move(h,b){const R=this._distance;if(this._distance=h[0].dist(h[1]),this._active||!(Math.abs(fg(this._distance,this._startDistance))<.1))return this._active=!0,{zoomDelta:fg(this._distance,R),pinchAround:b}}}function m0(I,h){return 180*I.angleWith(h)/Math.PI}class nt extends Av{reset(){super.reset(),this._minDiameter=0,this._startVector=void 0,this._vector=void 0}_start(h){this._startVector=this._vector=h[0].sub(h[1]),this._minDiameter=h[0].dist(h[1])}_move(h,b){const R=this._vector;if(this._vector=h[0].sub(h[1]),R&&(this._active||!this._isBelowThreshold(this._vector)))return this._active=!0,{bearingDelta:m0(this._vector,R),pinchAround:b}}_isBelowThreshold(h){this._minDiameter=Math.min(this._minDiameter,h.mag());const b=25/(Math.PI*this._minDiameter)*360,R=this._startVector;if(!R)return!1;const U=m0(h,R);return Math.abs(U)<b}}function Oc(I){return Math.abs(I.y)>Math.abs(I.x)}class kv extends Av{constructor(h){super(),this._map=h}reset(){super.reset(),this._valid=void 0,this._firstMove=void 0,this._lastPoints=void 0}_start(h){this._lastPoints=h,Oc(h[0].sub(h[1]))&&(this._valid=!1)}_move(h,b,R){const U=this._lastPoints;if(!U)return;const K=h[0].sub(U[0]),ne=h[1].sub(U[1]);return this._map._cooperativeGestures&&!s.isFullscreen()&&R.touches.length<3||(this._valid=this.gestureBeginsVertically(K,ne,R.timeStamp),!this._valid)?void 0:(this._lastPoints=h,this._active=!0,{pitchDelta:(K.y+ne.y)/2*-.5})}gestureBeginsVertically(h,b,R){if(this._valid!==void 0)return this._valid;const U=h.mag()>=2,K=b.mag()>=2;if(!U&&!K)return;if(!U||!K)return this._firstMove==null&&(this._firstMove=R),R-this._firstMove<100&&void 0;const ne=h.y>0==b.y>0;return Oc(h)&&Oc(b)&&ne}}const Lc={panStep:100,bearingStep:15,pitchStep:10};class ro{constructor(){const h=Lc;this._panStep=h.panStep,this._bearingStep=h.bearingStep,this._pitchStep=h.pitchStep,this._rotationDisabled=!1}blur(){this.reset()}reset(){this._active=!1}keydown(h){if(h.altKey||h.ctrlKey||h.metaKey)return;let b=0,R=0,U=0,K=0,ne=0;switch(h.keyCode){case 61:case 107:case 171:case 187:b=1;break;case 189:case 109:case 173:b=-1;break;case 37:h.shiftKey?R=-1:(h.preventDefault(),K=-1);break;case 39:h.shiftKey?R=1:(h.preventDefault(),K=1);break;case 38:h.shiftKey?U=1:(h.preventDefault(),ne=-1);break;case 40:h.shiftKey?U=-1:(h.preventDefault(),ne=1);break;default:return}return this._rotationDisabled&&(R=0,U=0),{cameraAnimation:ae=>{const he=ae.getZoom();ae.easeTo({duration:300,easeId:"keyboardHandler",easing:rw,zoom:b?Math.round(he)+b*(h.shiftKey?2:1):he,bearing:ae.getBearing()+R*this._bearingStep,pitch:ae.getPitch()+U*this._pitchStep,offset:[-K*this._panStep,-ne*this._panStep],center:ae.getCenter()},{originalEvent:h})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}disableRotation(){this._rotationDisabled=!0}enableRotation(){this._rotationDisabled=!1}}function rw(I){return I*(2-I)}const $_=4.000244140625;class nw{constructor(h,b){this._map=h,this._el=h.getCanvasContainer(),this._handler=b,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=.0022222222222222222,s.bindAll(["_onTimeout","_addScrollZoomBlocker","_showBlockerAlert"],this)}setZoomRate(h){this._defaultZoomRate=h}setWheelZoomRate(h){this._wheelZoomRate=h}isEnabled(){return!!this._enabled}isActive(){return this._active||this._finishTimeout!==void 0}isZooming(){return!!this._zooming}enable(h){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!h&&h.around==="center",this._map._cooperativeGestures&&this._addScrollZoomBlocker())}disable(){this.isEnabled()&&(this._enabled=!1,this._map._cooperativeGestures&&(clearTimeout(this._alertTimer),this._alertContainer.remove()))}wheel(h){if(!this.isEnabled())return;if(this._map._cooperativeGestures){if(!(h.ctrlKey||h.metaKey||this.isZooming()||s.isFullscreen()))return void this._showBlockerAlert();this._alertContainer.style.visibility!=="hidden"&&(this._alertContainer.style.visibility="hidden",clearTimeout(this._alertTimer))}let b=h.deltaMode===s.window.WheelEvent.DOM_DELTA_LINE?40*h.deltaY:h.deltaY;const R=s.exported.now(),U=R-(this._lastWheelEventTime||0);this._lastWheelEventTime=R,b!==0&&b%$_==0?this._type="wheel":b!==0&&Math.abs(b)<4?this._type="trackpad":U>400?(this._type=null,this._lastValue=b,this._timeout=setTimeout(this._onTimeout,40,h)):this._type||(this._type=Math.abs(U*b)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,b+=this._lastValue)),h.shiftKey&&b&&(b/=4),this._type&&(this._lastWheelEvent=h,this._delta-=b,this._active||this._start(h)),h.preventDefault()}_onTimeout(h){this._type="wheel",this._delta-=this._lastValue,this._active||this._start(h)}_start(h){if(!this._delta)return;this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);const b=k(this._el,h);this._aroundPoint=this._aroundCenter?this._map.transform.centerPoint:b,this._aroundCoord=this._map.transform.pointCoordinate3D(this._aroundPoint),this._targetZoom=void 0,this._frameId||(this._frameId=!0,this._handler._triggerRenderFrame())}renderFrame(){if(!this._frameId||(this._frameId=null,!this.isActive()))return;const h=this._map.transform;this._type==="wheel"&&h.projection.wrap&&(h._center.lng>=180||h._center.lng<=-180)&&(this._prevEase=null,this._easing=null,this._lastWheelEvent=null,this._lastWheelEventTime=0);const b=()=>h._terrainEnabled()&&this._aroundCoord?h.computeZoomRelativeTo(this._aroundCoord):h.zoom;if(this._delta!==0){const he=this._type==="wheel"&&Math.abs(this._delta)>$_?this._wheelZoomRate:this._defaultZoomRate;let be=2/(1+Math.exp(-Math.abs(this._delta*he)));this._delta<0&&be!==0&&(be=1/be);const we=b(),Le=Math.pow(2,we),He=typeof this._targetZoom=="number"?h.zoomScale(this._targetZoom):Le;this._targetZoom=Math.min(h.maxZoom,Math.max(h.minZoom,h.scaleZoom(He*be))),this._type==="wheel"&&(this._startZoom=we,this._easing=this._smoothOutEasing(200)),this._delta=0}const R=typeof this._targetZoom=="number"?this._targetZoom:b(),U=this._startZoom,K=this._easing;let ne,ae=!1;if(this._type==="wheel"&&U&&K){const he=Math.min((s.exported.now()-this._lastWheelEventTime)/200,1),be=K(he);ne=s.number(U,R,be),he<1?this._frameId||(this._frameId=!0):ae=!0}else ne=R,ae=!0;return this._active=!0,ae&&(this._active=!1,this._finishTimeout=setTimeout(()=>{this._zooming=!1,this._handler._triggerRenderFrame(),delete this._targetZoom,delete this._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!ae,zoomDelta:ne-b(),around:this._aroundPoint,aroundCoord:this._aroundCoord,originalEvent:this._lastWheelEvent}}_smoothOutEasing(h){let b=s.ease;if(this._prevEase){const R=this._prevEase,U=(s.exported.now()-R.start)/R.duration,K=R.easing(U+.01)-R.easing(U),ne=.27/Math.sqrt(K*K+1e-4)*.01,ae=Math.sqrt(.0729-ne*ne);b=s.bezier(ne,ae,.25,1)}return this._prevEase={start:s.exported.now(),duration:h,easing:b},b}blur(){this.reset()}reset(){this._active=!1}_addScrollZoomBlocker(){this._map&&!this._alertContainer&&(this._alertContainer=v("div","mapboxgl-scroll-zoom-blocker",this._map._container),this._alertContainer.textContent=/(Mac|iPad)/i.test(s.window.navigator.userAgent)?this._map._getUIString("ScrollZoomBlocker.CmdMessage"):this._map._getUIString("ScrollZoomBlocker.CtrlMessage"),this._alertContainer.style.fontSize=`${Math.max(10,Math.min(24,Math.floor(.05*this._el.clientWidth)))}px`)}_showBlockerAlert(){this._alertContainer.style.visibility="visible",this._alertContainer.classList.add("mapboxgl-scroll-zoom-blocker-show"),this._alertContainer.setAttribute("role","alert"),clearTimeout(this._alertTimer),this._alertTimer=setTimeout(()=>{this._alertContainer.classList.remove("mapboxgl-scroll-zoom-blocker-show"),this._alertContainer.setAttribute("role","null")},200)}}class Nh{constructor(h,b){this._clickZoom=h,this._tapZoom=b}enable(){this._clickZoom.enable(),this._tapZoom.enable()}disable(){this._clickZoom.disable(),this._tapZoom.disable()}isEnabled(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()}isActive(){return this._clickZoom.isActive()||this._tapZoom.isActive()}}class Il{constructor(){this.reset()}reset(){this._active=!1}blur(){this.reset()}dblclick(h,b){return h.preventDefault(),{cameraAnimation:R=>{R.easeTo({duration:300,zoom:R.getZoom()+(h.shiftKey?-1:1),around:R.unproject(b)},{originalEvent:h})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class gS{constructor(){this._tap=new Lh({numTouches:1,numTaps:1}),this.reset()}reset(){this._active=!1,this._swipePoint=void 0,this._swipeTouch=0,this._tapTime=0,this._tap.reset()}touchstart(h,b,R){this._swipePoint||(this._tapTime&&h.timeStamp-this._tapTime>500&&this.reset(),this._tapTime?R.length>0&&(this._swipePoint=b[0],this._swipeTouch=R[0].identifier):this._tap.touchstart(h,b,R))}touchmove(h,b,R){if(this._tapTime){if(this._swipePoint){if(R[0].identifier!==this._swipeTouch)return;const U=b[0],K=U.y-this._swipePoint.y;return this._swipePoint=U,h.preventDefault(),this._active=!0,{zoomDelta:K/128}}}else this._tap.touchmove(h,b,R)}touchend(h,b,R){this._tapTime?this._swipePoint&&R.length===0&&this.reset():this._tap.touchend(h,b,R)&&(this._tapTime=h.timeStamp)}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class iw{constructor(h,b,R){this._el=h,this._mousePan=b,this._touchPan=R}enable(h){this._inertiaOptions=h||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("mapboxgl-touch-drag-pan")}disable(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("mapboxgl-touch-drag-pan")}isEnabled(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()}isActive(){return this._mousePan.isActive()||this._touchPan.isActive()}}class vS{constructor(h,b,R){this._pitchWithRotate=h.pitchWithRotate,this._mouseRotate=b,this._mousePitch=R}enable(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()}disable(){this._mouseRotate.disable(),this._mousePitch.disable()}isEnabled(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())}isActive(){return this._mouseRotate.isActive()||this._mousePitch.isActive()}}class yS{constructor(h,b,R,U){this._el=h,this._touchZoom=b,this._touchRotate=R,this._tapDragZoom=U,this._rotationDisabled=!1,this._enabled=!0}enable(h){this._touchZoom.enable(h),this._rotationDisabled||this._touchRotate.enable(h),this._tapDragZoom.enable(),this._el.classList.add("mapboxgl-touch-zoom-rotate")}disable(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("mapboxgl-touch-zoom-rotate")}isEnabled(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()}isActive(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()}disableRotation(){this._rotationDisabled=!0,this._touchRotate.disable()}enableRotation(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()}}const Ca=I=>I.zoom||I.drag||I.pitch||I.rotate;class ow extends s.Event{}class xS{constructor(){this.constants=[1,1,.01],this.radius=0}setup(h,b){const R=s.sub([],b,h);this.radius=s.length(R[2]<0?s.div([],R,this.constants):[R[0],R[1],0])}projectRay(h){s.div(h,h,this.constants),s.normalize(h,h),s.mul$1(h,h,this.constants);const b=s.scale$2([],h,this.radius);if(b[2]>0){const R=s.scale$2([],[0,0,1],s.dot(b,[0,0,1])),U=s.scale$2([],s.normalize([],[b[0],b[1],0]),this.radius),K=s.add([],b,s.scale$2([],s.sub([],s.add([],U,R),b),2));b[0]=K[0],b[1]=K[1]}return b}}function Gu(I){return I.panDelta&&I.panDelta.mag()||I.zoomDelta||I.bearingDelta||I.pitchDelta}class Of{constructor(h,b){this._map=h,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new tw(h),this._bearingSnap=b.bearingSnap,this._previousActiveHandlers={},this._trackingEllipsoid=new xS,this._dragOrigin=null,this._eventsInProgress={},this._addDefaultHandlers(b),s.bindAll(["handleEvent","handleWindowEvent"],this);const R=this._el;this._listeners=[[R,"touchstart",{passive:!0}],[R,"touchmove",{passive:!1}],[R,"touchend",void 0],[R,"touchcancel",void 0],[R,"mousedown",void 0],[R,"mousemove",void 0],[R,"mouseup",void 0],[s.window.document,"mousemove",{capture:!0}],[s.window.document,"mouseup",void 0],[R,"mouseover",void 0],[R,"mouseout",void 0],[R,"dblclick",void 0],[R,"click",void 0],[R,"keydown",{capture:!1}],[R,"keyup",void 0],[R,"wheel",{passive:!1}],[R,"contextmenu",void 0],[s.window,"blur",void 0]];for(const[U,K,ne]of this._listeners)U.addEventListener(K,U===s.window.document?this.handleWindowEvent:this.handleEvent,ne)}destroy(){for(const[h,b,R]of this._listeners)h.removeEventListener(b,h===s.window.document?this.handleWindowEvent:this.handleEvent,R)}_addDefaultHandlers(h){const b=this._map,R=b.getCanvasContainer();this._add("mapEvent",new f0(b,h));const U=b.boxZoom=new h0(b,h);this._add("boxZoom",U);const K=new Mv,ne=new Il;b.doubleClickZoom=new Nh(ne,K),this._add("tapZoom",K),this._add("clickZoom",ne);const ae=new gS;this._add("tapDragZoom",ae);const he=b.touchPitch=new kv(b);this._add("touchPitch",he);const be=new D_(h),we=new N_(h);b.dragRotate=new vS(h,be,we),this._add("mouseRotate",be,["mousePitch"]),this._add("mousePitch",we,["mouseRotate"]);const Le=new Dh(h),He=new p0(b,h);b.dragPan=new iw(R,Le,He),this._add("mousePan",Le),this._add("touchPan",He,["touchZoom","touchRotate"]);const rt=new nt,st=new dg;b.touchZoomRotate=new yS(R,st,rt,ae),this._add("touchRotate",rt,["touchPan","touchZoom"]),this._add("touchZoom",st,["touchPan","touchRotate"]),this._add("blockableMapEvent",new d0(b));const at=b.scrollZoom=new nw(b,this);this._add("scrollZoom",at,["mousePan"]);const ut=b.keyboard=new ro;this._add("keyboard",ut);for(const De of["boxZoom","doubleClickZoom","tapDragZoom","touchPitch","dragRotate","dragPan","touchZoomRotate","scrollZoom","keyboard"])h.interactive&&h[De]&&b[De].enable(h[De])}_add(h,b,R){this._handlers.push({handlerName:h,handler:b,allowed:R}),this._handlersById[h]=b}stop(h){if(!this._updatingCamera){for(const{handler:b}of this._handlers)b.reset();this._inertia.clear(),this._fireEvents({},{},h),this._changes=[]}}isActive(){for(const{handler:h}of this._handlers)if(h.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return!!Ca(this._eventsInProgress)||this.isZooming()}_isDragging(){return!!this._eventsInProgress.drag}_blockedByActive(h,b,R){for(const U in h)if(U!==R&&(!b||b.indexOf(U)<0))return!0;return!1}handleWindowEvent(h){this.handleEvent(h,`${h.type}Window`)}_getMapTouches(h){const b=[];for(const R of h)this._el.contains(R.target)&&b.push(R);return b}handleEvent(h,b){this._updatingCamera=!0;const R=h.type==="renderFrame",U=R?void 0:h,K={needsRenderFrame:!1},ne={},ae={},he=h.touches?this._getMapTouches(h.touches):void 0,be=he?X(this._el,he):R?void 0:k(this._el,h);for(const{handlerName:He,handler:rt,allowed:st}of this._handlers){if(!rt.isEnabled())continue;let at;this._blockedByActive(ae,st,He)?rt.reset():rt[b||h.type]&&(at=rt[b||h.type](h,be,he),this.mergeHandlerResult(K,ne,at,He,U),at&&at.needsRenderFrame&&this._triggerRenderFrame()),(at||rt.isActive())&&(ae[He]=rt)}const we={};for(const He in this._previousActiveHandlers)ae[He]||(we[He]=U);this._previousActiveHandlers=ae,(Object.keys(we).length||Gu(K))&&(this._changes.push([K,ne,we]),this._triggerRenderFrame()),(Object.keys(ae).length||Gu(K))&&this._map._stop(!0),this._updatingCamera=!1;const{cameraAnimation:Le}=K;Le&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],Le(this._map))}mergeHandlerResult(h,b,R,U,K){if(!R)return;s.extend(h,R);const ne={handlerName:U,originalEvent:R.originalEvent||K};R.zoomDelta!==void 0&&(b.zoom=ne),R.panDelta!==void 0&&(b.drag=ne),R.pitchDelta!==void 0&&(b.pitch=ne),R.bearingDelta!==void 0&&(b.rotate=ne)}_applyChanges(){const h={},b={},R={};for(const[U,K,ne]of this._changes)U.panDelta&&(h.panDelta=(h.panDelta||new s.Point(0,0))._add(U.panDelta)),U.zoomDelta&&(h.zoomDelta=(h.zoomDelta||0)+U.zoomDelta),U.bearingDelta&&(h.bearingDelta=(h.bearingDelta||0)+U.bearingDelta),U.pitchDelta&&(h.pitchDelta=(h.pitchDelta||0)+U.pitchDelta),U.around!==void 0&&(h.around=U.around),U.aroundCoord!==void 0&&(h.aroundCoord=U.aroundCoord),U.pinchAround!==void 0&&(h.pinchAround=U.pinchAround),U.noInertia&&(h.noInertia=U.noInertia),s.extend(b,K),s.extend(R,ne);this._updateMapTransform(h,b,R),this._changes=[]}_updateMapTransform(h,b,R){const U=this._map,K=U.transform,ne=it=>[it.x,it.y,it.z];if((it=>{const yt=this._eventsInProgress.drag;return yt&&!this._handlersById[yt.handlerName].isActive()})()&&!Gu(h)){const it=K.zoom;K.cameraElevationReference="sea",K.recenterOnTerrain(),K.cameraElevationReference="ground",it!==K.zoom&&this._map._update(!0)}if(K._isCameraConstrained&&U._stop(!0),!Gu(h))return void this._fireEvents(b,R,!0);let{panDelta:ae,zoomDelta:he,bearingDelta:be,pitchDelta:we,around:Le,aroundCoord:He,pinchAround:rt}=h;K._isCameraConstrained&&(he>0&&(he=0),K._isCameraConstrained=!1),rt!==void 0&&(Le=rt),(he||(it=>b[it]&&!this._eventsInProgress[it])("drag"))&&Le&&(this._dragOrigin=ne(K.pointCoordinate3D(Le)),this._trackingEllipsoid.setup(K._camera.position,this._dragOrigin)),K.cameraElevationReference="sea",U._stop(!0),Le=Le||U.transform.centerPoint,be&&(K.bearing+=be),we&&(K.pitch+=we),K._updateCameraState();const st=[0,0,0];if(ae)if(K.projection.name==="mercator"){const it=this._trackingEllipsoid.projectRay(K.screenPointToMercatorRay(Le).dir),yt=this._trackingEllipsoid.projectRay(K.screenPointToMercatorRay(Le.sub(ae)).dir);st[0]=yt[0]-it[0],st[1]=yt[1]-it[1]}else{const it=K.pointCoordinate(Le);if(K.projection.name==="globe"){ae=ae.rotate(-K.angle);const yt=K._pixelsPerMercatorPixel/K.worldSize;st[0]=-ae.x*s.mercatorScale(s.latFromMercatorY(it.y))*yt,st[1]=-ae.y*s.mercatorScale(K.center.lat)*yt}else{const yt=K.pointCoordinate(Le.sub(ae));it&&yt&&(st[0]=yt.x-it.x,st[1]=yt.y-it.y)}}const at=K.zoom,ut=[0,0,0];if(he){const it=ne(He||K.pointCoordinate3D(Le)),yt={dir:s.normalize([],s.sub([],it,K._camera.position))};if(yt.dir[2]<0){const mt=K.zoomDeltaToMovement(it,he);s.scale$2(ut,yt.dir,mt)}}const De=s.add(st,st,ut);K._translateCameraConstrained(De),he&&Math.abs(K.zoom-at)>1e-4&&K.recenterOnTerrain(),K.cameraElevationReference="ground",this._map._update(),h.noInertia||this._inertia.record(h),this._fireEvents(b,R,!0)}_fireEvents(h,b,R){const U=Ca(this._eventsInProgress),K=Ca(h),ne={};for(const we in h){const{originalEvent:Le}=h[we];this._eventsInProgress[we]||(ne[`${we}start`]=Le),this._eventsInProgress[we]=h[we]}!U&&K&&this._fireEvent("movestart",K.originalEvent);for(const we in ne)this._fireEvent(we,ne[we]);K&&this._fireEvent("move",K.originalEvent);for(const we in h){const{originalEvent:Le}=h[we];this._fireEvent(we,Le)}const ae={};let he;for(const we in this._eventsInProgress){const{handlerName:Le,originalEvent:He}=this._eventsInProgress[we];this._handlersById[Le].isActive()||(delete this._eventsInProgress[we],he=b[Le]||He,ae[`${we}end`]=he)}for(const we in ae)this._fireEvent(we,ae[we]);const be=Ca(this._eventsInProgress);if(R&&(U||K)&&!be){this._updatingCamera=!0;const we=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),Le=He=>He!==0&&-this._bearingSnap<He&&He<this._bearingSnap;we?(Le(we.bearing||this._map.getBearing())&&(we.bearing=0),this._map.easeTo(we,{originalEvent:he})):(this._map.fire(new s.Event("moveend",{originalEvent:he})),Le(this._map.getBearing())&&this._map.resetNorth()),this._updatingCamera=!1}}_fireEvent(h,b){this._map.fire(new s.Event(h,b?{originalEvent:b}:{}))}_requestFrame(){return this._map.triggerRepaint(),this._map._renderTaskQueue.add(h=>{this._frameId=void 0,this.handleEvent(new ow("renderFrame",{timeStamp:h})),this._applyChanges()})}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}}const Jp="map.setFreeCameraOptions(...) and map.getFreeCameraOptions() are not yet supported for non-mercator projections.";class lu extends s.Evented{constructor(h,b){super(),this._moving=!1,this._zooming=!1,this.transform=h,this._bearingSnap=b.bearingSnap,this._respectPrefersReducedMotion=b.respectPrefersReducedMotion!==!1,s.bindAll(["_renderFrameCallback"],this)}getCenter(){return new s.LngLat(this.transform.center.lng,this.transform.center.lat)}setCenter(h,b){return this.jumpTo({center:h},b)}panBy(h,b,R){return h=s.Point.convert(h).mult(-1),this.panTo(this.transform.center,s.extend({offset:h},b),R)}panTo(h,b,R){return this.easeTo(s.extend({center:h},b),R)}getZoom(){return this.transform.zoom}setZoom(h,b){return this.jumpTo({zoom:h},b),this}zoomTo(h,b,R){return this.easeTo(s.extend({zoom:h},b),R)}zoomIn(h,b){return this.zoomTo(this.getZoom()+1,h,b),this}zoomOut(h,b){return this.zoomTo(this.getZoom()-1,h,b),this}getBearing(){return this.transform.bearing}setBearing(h,b){return this.jumpTo({bearing:h},b),this}getPadding(){return this.transform.padding}setPadding(h,b){return this.jumpTo({padding:h},b),this}rotateTo(h,b,R){return this.easeTo(s.extend({bearing:h},b),R)}resetNorth(h,b){return this.rotateTo(0,s.extend({duration:1e3},h),b),this}resetNorthPitch(h,b){return this.easeTo(s.extend({bearing:0,pitch:0,duration:1e3},h),b),this}snapToNorth(h,b){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(h,b):this}getPitch(){return this.transform.pitch}setPitch(h,b){return this.jumpTo({pitch:h},b),this}cameraForBounds(h,b){h=s.LngLatBounds.convert(h);const R=b&&b.bearing||0,U=b&&b.pitch||0,K=h.getNorthWest(),ne=h.getSouthEast();return this._cameraForBounds(this.transform,K,ne,R,U,b)}_extendCameraOptions(h){const b={top:0,bottom:0,right:0,left:0};if(typeof(h=s.extend({padding:b,offset:[0,0],maxZoom:this.transform.maxZoom},h)).padding=="number"){const R=h.padding;h.padding={top:R,bottom:R,right:R,left:R}}return h.padding=s.extend(b,h.padding),h}_minimumAABBFrustumDistance(h,b){const R=b.max[0]-b.min[0],U=b.max[1]-b.min[1];return R/U>h.aspect?R/(2*Math.tan(.5*h.fovX)*h.aspect):U/(2*Math.tan(.5*h.fovY)*h.aspect)}_cameraForBoundsOnGlobe(h,b,R,U,K,ne){const ae=h.clone(),he=this._extendCameraOptions(ne);ae.bearing=U,ae.pitch=K;const be=s.LngLat.convert(b),we=s.LngLat.convert(R),Le=.5*(be.lat+we.lat),He=.5*(be.lng+we.lng),rt=s.latLngToECEF(Le,He),st=s.normalize([],rt),at=s.normalize([],s.cross([],st,[0,1,0])),ut=s.cross([],at,st),De=[at[0],at[1],at[2],0,ut[0],ut[1],ut[2],0,st[0],st[1],st[2],0,0,0,0,1],it=[rt,s.latLngToECEF(be.lat,be.lng),s.latLngToECEF(we.lat,be.lng),s.latLngToECEF(we.lat,we.lng),s.latLngToECEF(be.lat,we.lng),s.latLngToECEF(Le,be.lng),s.latLngToECEF(Le,we.lng),s.latLngToECEF(be.lat,He),s.latLngToECEF(we.lat,He)];let yt=s.Aabb.fromPoints(it.map(Rr=>[s.dot(at,Rr),s.dot(ut,Rr),s.dot(st,Rr)]));const mt=s.transformMat4([],yt.center,De);s.squaredLength(mt)===0&&s.set(mt,0,0,1),s.normalize(mt,mt),s.scale$2(mt,mt,s.GLOBE_RADIUS),ae.center=s.ecefToLatLng(mt);const kt=ae.getWorldToCameraMatrix(),Lt=s.invert(new Float64Array(16),kt);yt=s.Aabb.applyTransform(yt,s.multiply([],kt,De)),s.transformMat4(mt,mt,kt);const At=.5*(yt.max[2]-yt.min[2]),Yt=this._minimumAABBFrustumDistance(ae,yt),Vt=s.scale$2([],[0,0,1],At),or=s.add(Vt,mt,Vt),Wr=Yt+(ae.pitch===0?0:s.distance(mt,or)),Qt=ae.globeCenterInViewSpace,Tr=s.sub([],mt,[Qt[0],Qt[1],Qt[2]]);s.normalize(Tr,Tr),s.scale$2(Tr,Tr,Wr);const fr=s.add([],mt,Tr);s.transformMat4(fr,fr,Lt);const jr=s.earthRadius/s.GLOBE_RADIUS,lr=s.length(fr),xr=s.mercatorZfromAltitude(Math.max(lr*jr-s.earthRadius,Number.EPSILON),0),qr=Math.min(ae.zoomFromMercatorZAdjusted(xr),he.maxZoom);return qr>.5*(s.GLOBE_ZOOM_THRESHOLD_MIN+s.GLOBE_ZOOM_THRESHOLD_MAX)?(ae.setProjection({name:"mercator"}),ae.zoom=qr,this._cameraForBounds(ae,b,R,U,K,ne)):{center:ae.center,zoom:qr,bearing:U,pitch:K}}queryTerrainElevation(h,b){const R=this.transform.elevation;return R?(b=s.extend({},{exaggerated:!0},b),R.getAtPoint(s.MercatorCoordinate.fromLngLat(h),null,b.exaggerated)):null}_cameraForBounds(h,b,R,U,K,ne){if(h.projection.name==="globe")return this._cameraForBoundsOnGlobe(h,b,R,U,K,ne);const ae=h.clone(),he=this._extendCameraOptions(ne),be=ae.padding;ae.bearing=U,ae.pitch=K;const we=s.LngLat.convert(b),Le=s.LngLat.convert(R),He=new s.LngLat(we.lng,Le.lat),rt=new s.LngLat(Le.lng,we.lat),st=ae.project(we),at=ae.project(Le),ut=this.queryTerrainElevation(we),De=this.queryTerrainElevation(Le),it=this.queryTerrainElevation(He),yt=this.queryTerrainElevation(rt),mt=[[st.x,st.y,Math.min(ut||0,De||0,it||0,yt||0)],[at.x,at.y,Math.max(ut||0,De||0,it||0,yt||0)]];let kt=s.Aabb.fromPoints(mt);const Lt=ae.getWorldToCameraMatrix(),At=s.invert(new Float64Array(16),Lt);kt=s.Aabb.applyTransform(kt,Lt);const Yt=s.sub([],kt.max,kt.min),Vt=be.left||0,or=be.right||0,Wr=be.bottom||0,Qt=be.top||0,{left:Tr,right:fr,top:jr,bottom:lr}=he.padding,xr=.5*(Vt+or),qr=.5*(Qt+Wr),Rr=Math.min(ae.scaleZoom(ae.scale*Math.min((ae.width-(Vt+or+Tr+fr))/Yt[0],(ae.height-(Wr+Qt+lr+jr))/Yt[1])),he.maxZoom),Yr=ae.scale/ae.zoomScale(Rr);kt=new s.Aabb([kt.min[0]-(Tr+xr)*Yr,kt.min[1]-(lr+qr)*Yr,kt.min[2]],[kt.max[0]+(fr+xr)*Yr,kt.max[1]+(jr+qr)*Yr,kt.max[2]]);const Nn=.5*Yt[2],li=this._minimumAABBFrustumDistance(ae,kt),Cn=[0,0,1,0];s.transformMat4$1(Cn,Cn,Lt),s.normalize$2(Cn,Cn);const Gn=s.scale$2([],Cn,li+Nn),Ri=s.add([],kt.center,Gn),bi=(typeof he.offset.x=="number"&&typeof he.offset.y=="number"?new s.Point(he.offset.x,he.offset.y):s.Point.convert(he.offset)).rotate(-s.degToRad(U));kt.center[0]-=bi.x*Yr,kt.center[1]+=bi.y*Yr,s.transformMat4(kt.center,kt.center,At),s.transformMat4(Ri,Ri,At);const An=[kt.center[0],kt.center[1],Ri[2]*ae.pixelsPerMeter];s.scale$2(An,An,1/ae.worldSize);const _o=s.lngFromMercatorX(An[0]),Vo=s.latFromMercatorY(An[1]),Ho=Math.min(ae._zoomFromMercatorZ(An[2]),he.maxZoom),No=new s.LngLat(_o,Vo);return ae.mercatorFromTransition&&Ho<.5*(s.GLOBE_ZOOM_THRESHOLD_MIN+s.GLOBE_ZOOM_THRESHOLD_MAX)?(ae.setProjection({name:"globe"}),ae.zoom=Ho,this._cameraForBounds(ae,b,R,U,K,ne)):{center:No,zoom:Ho,bearing:U,pitch:K}}fitBounds(h,b,R){const U=this.cameraForBounds(h,b);return this._fitInternal(U,b,R)}fitScreenCoordinates(h,b,R,U,K){const ne=s.Point.convert(h),ae=s.Point.convert(b),he=new s.Point(Math.min(ne.x,ae.x),Math.min(ne.y,ae.y)),be=new s.Point(Math.max(ne.x,ae.x),Math.max(ne.y,ae.y));if(this.transform.projection.name==="mercator"&&this.transform.anyCornerOffEdge(ne,ae))return this;const we=this.transform.pointLocation3D(he),Le=this.transform.pointLocation3D(be),He=this.transform.pointLocation3D(new s.Point(he.x,be.y)),rt=this.transform.pointLocation3D(new s.Point(be.x,he.y)),st=[Math.min(we.lng,Le.lng,He.lng,rt.lng),Math.min(we.lat,Le.lat,He.lat,rt.lat)],at=[Math.max(we.lng,Le.lng,He.lng,rt.lng),Math.max(we.lat,Le.lat,He.lat,rt.lat)],ut=U&&U.pitch?U.pitch:this.getPitch(),De=this._cameraForBounds(this.transform,st,at,R,ut,U);return this._fitInternal(De,U,K)}_fitInternal(h,b,R){return h?(delete(b=s.extend(h,b)).padding,b.linear?this.easeTo(b,R):this.flyTo(b,R)):this}jumpTo(h,b){this.stop();const R=h.preloadOnly?this.transform.clone():this.transform;let U=!1,K=!1,ne=!1;return"zoom"in h&&R.zoom!==+h.zoom&&(U=!0,R.zoom=+h.zoom),h.center!==void 0&&(R.center=s.LngLat.convert(h.center)),"bearing"in h&&R.bearing!==+h.bearing&&(K=!0,R.bearing=+h.bearing),"pitch"in h&&R.pitch!==+h.pitch&&(ne=!0,R.pitch=+h.pitch),h.padding==null||R.isPaddingEqual(h.padding)||(R.padding=h.padding),h.preloadOnly?(this._preloadTiles(R),this):(this.fire(new s.Event("movestart",b)).fire(new s.Event("move",b)),U&&this.fire(new s.Event("zoomstart",b)).fire(new s.Event("zoom",b)).fire(new s.Event("zoomend",b)),K&&this.fire(new s.Event("rotatestart",b)).fire(new s.Event("rotate",b)).fire(new s.Event("rotateend",b)),ne&&this.fire(new s.Event("pitchstart",b)).fire(new s.Event("pitch",b)).fire(new s.Event("pitchend",b)),this.fire(new s.Event("moveend",b)))}getFreeCameraOptions(){return this.transform.projection.supportsFreeCamera||s.warnOnce(Jp),this.transform.getFreeCameraOptions()}setFreeCameraOptions(h,b){const R=this.transform;if(!R.projection.supportsFreeCamera)return s.warnOnce(Jp),this;this.stop();const U=R.zoom,K=R.pitch,ne=R.bearing;R.setFreeCameraOptions(h);const ae=U!==R.zoom,he=K!==R.pitch,be=ne!==R.bearing;return this.fire(new s.Event("movestart",b)).fire(new s.Event("move",b)),ae&&this.fire(new s.Event("zoomstart",b)).fire(new s.Event("zoom",b)).fire(new s.Event("zoomend",b)),be&&this.fire(new s.Event("rotatestart",b)).fire(new s.Event("rotate",b)).fire(new s.Event("rotateend",b)),he&&this.fire(new s.Event("pitchstart",b)).fire(new s.Event("pitch",b)).fire(new s.Event("pitchend",b)),this.fire(new s.Event("moveend",b)),this}easeTo(h,b){this._stop(!1,h.easeId),((h=s.extend({offset:[0,0],duration:500,easing:s.ease},h)).animate===!1||this._prefersReducedMotion(h))&&(h.duration=0);const R=this.transform,U=this.getZoom(),K=this.getBearing(),ne=this.getPitch(),ae=this.getPadding(),he="zoom"in h?+h.zoom:U,be="bearing"in h?this._normalizeBearing(h.bearing,K):K,we="pitch"in h?+h.pitch:ne,Le="padding"in h?h.padding:R.padding,He=s.Point.convert(h.offset);let rt,st,at;if(R.projection.name==="globe"){const Vt=s.MercatorCoordinate.fromLngLat(R.center),or=He.rotate(-R.angle);Vt.x+=or.x/R.worldSize,Vt.y+=or.y/R.worldSize;const Wr=Vt.toLngLat(),Qt=s.LngLat.convert(h.center||Wr);this._normalizeCenter(Qt),rt=R.centerPoint.add(or),st=new s.Point(Vt.x,Vt.y).mult(R.worldSize),at=new s.Point(s.mercatorXfromLng(Qt.lng),s.mercatorYfromLat(Qt.lat)).mult(R.worldSize).sub(st)}else{rt=R.centerPoint.add(He);const Vt=R.pointLocation(rt),or=s.LngLat.convert(h.center||Vt);this._normalizeCenter(or),st=R.project(Vt),at=R.project(or).sub(st)}const ut=R.zoomScale(he-U);let De,it;h.around&&(De=s.LngLat.convert(h.around),it=R.locationPoint(De));const yt=this._zooming||he!==U,mt=this._rotating||K!==be,kt=this._pitching||we!==ne,Lt=!R.isPaddingEqual(Le),At=Vt=>or=>{if(yt&&(Vt.zoom=s.number(U,he,or)),mt&&(Vt.bearing=s.number(K,be,or)),kt&&(Vt.pitch=s.number(ne,we,or)),Lt&&(Vt.interpolatePadding(ae,Le,or),rt=Vt.centerPoint.add(He)),De)Vt.setLocationAtPoint(De,it);else{const Wr=Vt.zoomScale(Vt.zoom-U),Qt=he>U?Math.min(2,ut):Math.max(.5,ut),Tr=Math.pow(Qt,1-or),fr=Vt.unproject(st.add(at.mult(or*Tr)).mult(Wr));Vt.setLocationAtPoint(Vt.renderWorldCopies?fr.wrap():fr,rt)}return h.preloadOnly||this._fireMoveEvents(b),Vt};if(h.preloadOnly){const Vt=this._emulate(At,h.duration,R);return this._preloadTiles(Vt),this}const Yt={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching};return this._zooming=yt,this._rotating=mt,this._pitching=kt,this._padding=Lt,this._easeId=h.easeId,this._prepareEase(b,h.noMoveStart,Yt),this._ease(At(R),Vt=>{R.recenterOnTerrain(),this._afterEase(b,Vt)},h),this}_prepareEase(h,b,R={}){this._moving=!0,this.transform.cameraElevationReference="sea",b||R.moving||this.fire(new s.Event("movestart",h)),this._zooming&&!R.zooming&&this.fire(new s.Event("zoomstart",h)),this._rotating&&!R.rotating&&this.fire(new s.Event("rotatestart",h)),this._pitching&&!R.pitching&&this.fire(new s.Event("pitchstart",h))}_fireMoveEvents(h){this.fire(new s.Event("move",h)),this._zooming&&this.fire(new s.Event("zoom",h)),this._rotating&&this.fire(new s.Event("rotate",h)),this._pitching&&this.fire(new s.Event("pitch",h))}_afterEase(h,b){if(this._easeId&&b&&this._easeId===b)return;this._easeId=void 0,this.transform.cameraElevationReference="ground";const R=this._zooming,U=this._rotating,K=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,R&&this.fire(new s.Event("zoomend",h)),U&&this.fire(new s.Event("rotateend",h)),K&&this.fire(new s.Event("pitchend",h)),this.fire(new s.Event("moveend",h))}flyTo(h,b){if(this._prefersReducedMotion(h)){const Rr=s.pick(h,["center","zoom","bearing","pitch","around"]);return this.jumpTo(Rr,b)}this.stop(),h=s.extend({offset:[0,0],speed:1.2,curve:1.42,easing:s.ease},h);const R=this.transform,U=this.getZoom(),K=this.getBearing(),ne=this.getPitch(),ae=this.getPadding(),he="zoom"in h?s.clamp(+h.zoom,R.minZoom,R.maxZoom):U,be="bearing"in h?this._normalizeBearing(h.bearing,K):K,we="pitch"in h?+h.pitch:ne,Le="padding"in h?h.padding:R.padding,He=R.zoomScale(he-U),rt=s.Point.convert(h.offset);let st=R.centerPoint.add(rt);const at=R.pointLocation(st),ut=s.LngLat.convert(h.center||at);this._normalizeCenter(ut);const De=R.project(at),it=R.project(ut).sub(De);let yt=h.curve;const mt=Math.max(R.width,R.height),kt=mt/He,Lt=it.mag();if("minZoom"in h){const Rr=s.clamp(Math.min(h.minZoom,U,he),R.minZoom,R.maxZoom),Yr=mt/R.zoomScale(Rr-U);yt=Math.sqrt(Yr/Lt*2)}const At=yt*yt;function Yt(Rr){const Yr=(kt*kt-mt*mt+(Rr?-1:1)*At*At*Lt*Lt)/(2*(Rr?kt:mt)*At*Lt);return Math.log(Math.sqrt(Yr*Yr+1)-Yr)}function Vt(Rr){return(Math.exp(Rr)-Math.exp(-Rr))/2}function or(Rr){return(Math.exp(Rr)+Math.exp(-Rr))/2}const Wr=Yt(0);let Qt=function(Rr){return or(Wr)/or(Wr+yt*Rr)},Tr=function(Rr){return mt*((or(Wr)*(Vt(Yr=Wr+yt*Rr)/or(Yr))-Vt(Wr))/At)/Lt;var Yr},fr=(Yt(1)-Wr)/yt;if(Math.abs(Lt)<1e-6||!isFinite(fr)){if(Math.abs(mt-kt)<1e-6)return this.easeTo(h,b);const Rr=kt<mt?-1:1;fr=Math.abs(Math.log(kt/mt))/yt,Tr=function(){return 0},Qt=function(Yr){return Math.exp(Rr*yt*Yr)}}h.duration="duration"in h?+h.duration:1e3*fr/("screenSpeed"in h?+h.screenSpeed/yt:+h.speed),h.maxDuration&&h.duration>h.maxDuration&&(h.duration=0);const jr=K!==be,lr=we!==ne,xr=!R.isPaddingEqual(Le),qr=Rr=>Yr=>{const Nn=Yr*fr,li=1/Qt(Nn);Rr.zoom=Yr===1?he:U+Rr.scaleZoom(li),jr&&(Rr.bearing=s.number(K,be,Yr)),lr&&(Rr.pitch=s.number(ne,we,Yr)),xr&&(Rr.interpolatePadding(ae,Le,Yr),st=Rr.centerPoint.add(rt));const Cn=Yr===1?ut:Rr.unproject(De.add(it.mult(Tr(Nn))).mult(li));return Rr.setLocationAtPoint(Rr.renderWorldCopies?Cn.wrap():Cn,st),Rr._updateCameraOnTerrain(),h.preloadOnly||this._fireMoveEvents(b),Rr};if(h.preloadOnly){const Rr=this._emulate(qr,h.duration,R);return this._preloadTiles(Rr),this}return this._zooming=!0,this._rotating=jr,this._pitching=lr,this._padding=xr,this._prepareEase(b,!1),this._ease(qr(R),()=>this._afterEase(b),h),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(h,b){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),this._easeFrameId=void 0,this._onEaseFrame=void 0),this._onEaseEnd){const R=this._onEaseEnd;this._onEaseEnd=void 0,R.call(this,b)}if(!h){const R=this.handlers;R&&R.stop(!1)}return this}_ease(h,b,R){R.animate===!1||R.duration===0?(h(1),b()):(this._easeStart=s.exported.now(),this._easeOptions=R,this._onEaseFrame=h,this._onEaseEnd=b,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_renderFrameCallback(){const h=Math.min((s.exported.now()-this._easeStart)/this._easeOptions.duration,1),b=this._onEaseFrame;b&&b(this._easeOptions.easing(h)),h<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()}_normalizeBearing(h,b){h=s.wrap(h,-180,180);const R=Math.abs(h-b);return Math.abs(h-360-b)<R&&(h-=360),Math.abs(h+360-b)<R&&(h+=360),h}_normalizeCenter(h){const b=this.transform;if(!b.renderWorldCopies||b.maxBounds)return;const R=h.lng-b.center.lng;h.lng+=R>180?-360:R<-180?360:0}_prefersReducedMotion(h){return this._respectPrefersReducedMotion&&s.exported.prefersReducedMotion&&!(h&&h.essential)}_emulate(h,b,R){const U=Math.ceil(15*b/1e3),K=[],ne=h(R.clone());for(let ae=0;ae<=U;ae++){const he=ne(ae/U);K.push(he.clone())}return K}}class Sn{constructor(h={}){this.options=h,s.bindAll(["_toggleAttribution","_updateEditLink","_updateData","_updateCompact"],this)}getDefaultPosition(){return"bottom-right"}onAdd(h){const b=this.options&&this.options.compact;return this._map=h,this._container=v("div","mapboxgl-ctrl mapboxgl-ctrl-attrib"),this._compactButton=v("button","mapboxgl-ctrl-attrib-button",this._container),v("span","mapboxgl-ctrl-icon",this._compactButton).setAttribute("aria-hidden","true"),this._compactButton.type="button",this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=v("div","mapboxgl-ctrl-attrib-inner",this._container),this._innerContainer.setAttribute("role","list"),b&&this._container.classList.add("mapboxgl-compact"),this._updateAttributions(),this._updateEditLink(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("moveend",this._updateEditLink),b===void 0&&(this._map.on("resize",this._updateCompact),this._updateCompact()),this._container}onRemove(){this._container.remove(),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("moveend",this._updateEditLink),this._map.off("resize",this._updateCompact),this._map=void 0,this._attribHTML=void 0}_setElementTitle(h,b){const R=this._map._getUIString(`AttributionControl.${b}`);h.setAttribute("aria-label",R),h.removeAttribute("title"),h.firstElementChild&&h.firstElementChild.setAttribute("title",R)}_toggleAttribution(){this._container.classList.contains("mapboxgl-compact-show")?(this._container.classList.remove("mapboxgl-compact-show"),this._compactButton.setAttribute("aria-expanded","false")):(this._container.classList.add("mapboxgl-compact-show"),this._compactButton.setAttribute("aria-expanded","true"))}_updateEditLink(){let h=this._editLink;h||(h=this._editLink=this._container.querySelector(".mapbox-improve-map"));const b=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:this._map._requestManager._customAccessToken||s.config.ACCESS_TOKEN}];if(h){const R=b.reduce((U,K,ne)=>(K.value&&(U+=`${K.key}=${K.value}${ne<b.length-1?"&":""}`),U),"?");h.href=`${s.config.FEEDBACK_URL}/${R}#${Tv(this._map,!0)}`,h.rel="noopener nofollow",this._setElementTitle(h,"MapFeedback")}}_updateData(h){!h||h.sourceDataType!=="metadata"&&h.sourceDataType!=="visibility"&&h.dataType!=="style"||(this._updateAttributions(),this._updateEditLink())}_updateAttributions(){if(!this._map.style)return;let h=[];if(this._map.style.stylesheet){const U=this._map.style.stylesheet;this.styleOwner=U.owner,this.styleId=U.id}const b=this._map.style._sourceCaches;for(const U in b){const K=b[U];if(K.used){const ne=K.getSource();ne.attribution&&h.indexOf(ne.attribution)<0&&h.push(ne.attribution)}}h.sort((U,K)=>U.length-K.length),h=h.filter((U,K)=>{for(let ne=K+1;ne<h.length;ne++)if(h[ne].indexOf(U)>=0)return!1;return!0}),this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?h=[...this.options.customAttribution,...h]:h.unshift(this.options.customAttribution));const R=h.join(" | ");R!==this._attribHTML&&(this._attribHTML=R,h.length?(this._innerContainer.innerHTML=R,this._container.classList.remove("mapboxgl-attrib-empty")):this._container.classList.add("mapboxgl-attrib-empty"),this._editLink=null)}_updateCompact(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact","mapboxgl-compact-show")}}class F_{constructor(){s.bindAll(["_updateLogo","_updateCompact"],this)}onAdd(h){this._map=h,this._container=v("div","mapboxgl-ctrl");const b=v("a","mapboxgl-ctrl-logo");return b.target="_blank",b.rel="noopener nofollow",b.href="https://www.mapbox.com/",b.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),b.setAttribute("rel","noopener nofollow"),this._container.appendChild(b),this._container.style.display="none",this._map.on("sourcedata",this._updateLogo),this._updateLogo(),this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){this._container.remove(),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)}getDefaultPosition(){return"bottom-left"}_updateLogo(h){h&&h.sourceDataType!=="metadata"||(this._container.style.display=this._logoRequired()?"block":"none")}_logoRequired(){if(!this._map.style)return!0;const h=this._map.style._sourceCaches;if(Object.entries(h).length===0)return!0;for(const b in h){const R=h[b].getSource();if(R.hasOwnProperty("mapbox_logo")&&!R.mapbox_logo)return!1}return!0}_updateCompact(){const h=this._container.children;if(h.length){const b=h[0];this._map.getCanvasContainer().offsetWidth<250?b.classList.add("mapboxgl-compact"):b.classList.remove("mapboxgl-compact")}}}class z_{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(h){const b=++this._id;return this._queue.push({callback:h,id:b,cancelled:!1}),b}remove(h){const b=this._currentlyRunning,R=b?this._queue.concat(b):this._queue;for(const U of R)if(U.id===h)return void(U.cancelled=!0)}run(h=0){const b=this._currentlyRunning=this._queue;this._queue=[];for(const R of b)if(!R.cancelled&&(R.callback(h),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}function hg(I,h,b){if(I=new s.LngLat(I.lng,I.lat),h){const R=new s.LngLat(I.lng-360,I.lat),U=new s.LngLat(I.lng+360,I.lat),K=360*Math.ceil(Math.abs(I.lng-b.center.lng)/360),ne=b.locationPoint(I).distSqr(h),ae=h.x<0||h.y<0||h.x>b.width||h.y>b.height;b.locationPoint(R).distSqr(h)<ne&&(ae||Math.abs(R.lng-b.center.lng)<K)?I=R:b.locationPoint(U).distSqr(h)<ne&&(ae||Math.abs(U.lng-b.center.lng)<K)&&(I=U)}for(;Math.abs(I.lng-b.center.lng)>180;){const R=b.locationPoint(I);if(R.x>=0&&R.y>=0&&R.x<=b.width&&R.y<=b.height)break;I.lng>b.center.lng?I.lng-=360:I.lng+=360}return I}const em={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};class mn extends s.Evented{constructor(h,b){if(super(),(h instanceof s.window.HTMLElement||b)&&(h=s.extend({element:h},b)),s.bindAll(["_update","_onMove","_onUp","_addDragHandler","_onMapClick","_onKeyPress","_clearFadeTimer"],this),this._anchor=h&&h.anchor||"center",this._color=h&&h.color||"#3FB1CE",this._scale=h&&h.scale||1,this._draggable=h&&h.draggable||!1,this._clickTolerance=h&&h.clickTolerance||0,this._isDragging=!1,this._state="inactive",this._rotation=h&&h.rotation||0,this._rotationAlignment=h&&h.rotationAlignment||"auto",this._pitchAlignment=h&&h.pitchAlignment&&h.pitchAlignment||"auto",this._updateMoving=()=>this._update(!0),this._occludedOpacity=h&&h.occludedOpacity||.2,h&&h.element)this._element=h.element,this._offset=s.Point.convert(h&&h.offset||[0,0]);else{this._defaultMarker=!0,this._element=v("div");const U=41,K=27,ne=x("svg",{display:"block",height:U*this._scale+"px",width:K*this._scale+"px",viewBox:`0 0 ${K} ${U}`},this._element),ae=x("radialGradient",{id:"shadowGradient"},x("defs",{},ne));x("stop",{offset:"10%","stop-opacity":.4},ae),x("stop",{offset:"100%","stop-opacity":.05},ae),x("ellipse",{cx:13.5,cy:34.8,rx:10.5,ry:5.25,fill:"url(#shadowGradient)"},ne),x("path",{fill:this._color,d:"M27,13.5C27,19.07 20.25,27 14.75,34.5C14.02,35.5 12.98,35.5 12.25,34.5C6.75,27 0,19.22 0,13.5C0,6.04 6.04,0 13.5,0C20.96,0 27,6.04 27,13.5Z"},ne),x("path",{opacity:.25,d:"M13.5,0C6.04,0 0,6.04 0,13.5C0,19.22 6.75,27 12.25,34.5C13,35.52 14.02,35.5 14.75,34.5C20.25,27 27,19.07 27,13.5C27,6.04 20.96,0 13.5,0ZM13.5,1C20.42,1 26,6.58 26,13.5C26,15.9 24.5,19.18 22.22,22.74C19.95,26.3 16.71,30.14 13.94,33.91C13.74,34.18 13.61,34.32 13.5,34.44C13.39,34.32 13.26,34.18 13.06,33.91C10.28,30.13 7.41,26.31 5.02,22.77C2.62,19.23 1,15.95 1,13.5C1,6.58 6.58,1 13.5,1Z"},ne),x("circle",{fill:"white",cx:13.5,cy:13.5,r:5.5},ne),this._offset=s.Point.convert(h&&h.offset||[0,-14])}this._element.hasAttribute("aria-label")||this._element.setAttribute("aria-label","Map marker"),this._element.classList.add("mapboxgl-marker"),this._element.addEventListener("dragstart",U=>{U.preventDefault()}),this._element.addEventListener("mousedown",U=>{U.preventDefault()});const R=this._element.classList;for(const U in em)R.remove(`mapboxgl-marker-anchor-${U}`);R.add(`mapboxgl-marker-anchor-${this._anchor}`),this._popup=null}addTo(h){return h===this._map||(this.remove(),this._map=h,h.getCanvasContainer().appendChild(this._element),h.on("move",this._updateMoving),h.on("moveend",this._update),h.on("remove",this._clearFadeTimer),h._addMarker(this),this.setDraggable(this._draggable),this._update(),h.on("click",this._onMapClick)),this}remove(){const h=this._map;return h&&(h.off("click",this._onMapClick),h.off("move",this._updateMoving),h.off("moveend",this._update),h.off("mousedown",this._addDragHandler),h.off("touchstart",this._addDragHandler),h.off("mouseup",this._onUp),h.off("touchend",this._onUp),h.off("mousemove",this._onMove),h.off("touchmove",this._onMove),h.off("remove",this._clearFadeTimer),h._removeMarker(this),this._map=void 0),this._clearFadeTimer(),this._element.remove(),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(h){return this._lngLat=s.LngLat.convert(h),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(!0),this}getElement(){return this._element}setPopup(h){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeAttribute("role"),this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),h){if(!("offset"in h.options)){const b=38.1,R=13.5,U=Math.sqrt(Math.pow(R,2)/2);h.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-b],"bottom-left":[U,-1*(b-R+U)],"bottom-right":[-U,-1*(b-R+U)],left:[R,-1*(b-R)],right:[-R,-1*(b-R)]}:this._offset}this._popup=h,h._marker=this,this._lngLat&&this._popup.setLngLat(this._lngLat),this._element.setAttribute("role","button"),this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress),this._element.setAttribute("aria-expanded","false")}return this}_onKeyPress(h){const b=h.code,R=h.charCode||h.keyCode;b!=="Space"&&b!=="Enter"&&R!==32&&R!==13||this.togglePopup()}_onMapClick(h){const b=h.originalEvent.target,R=this._element;this._popup&&(b===R||R.contains(b))&&this.togglePopup()}getPopup(){return this._popup}togglePopup(){const h=this._popup;return h?(h.isOpen()?(h.remove(),this._element.setAttribute("aria-expanded","false")):this._map&&(h.addTo(this._map),this._element.setAttribute("aria-expanded","true")),this):this}_behindTerrain(){const h=this._map,b=this._pos;if(!h||!b)return!1;const R=h.unproject(b),U=h.getFreeCameraOptions();if(!U.position)return!1;const K=U.position.toLngLat();return K.distanceTo(R)<.9*K.distanceTo(this._lngLat)}_evaluateOpacity(){const h=this._map;if(!h)return;const b=this._pos;if(!b||b.x<0||b.x>h.transform.width||b.y<0||b.y>h.transform.height)return void this._clearFadeTimer();const R=h.unproject(b);let U;h._showingGlobe()&&s.isLngLatBehindGlobe(h.transform,this._lngLat)?U=0:(U=1-h._queryFogOpacity(R),h.transform._terrainEnabled()&&h.getTerrain()&&this._behindTerrain()&&(U*=this._occludedOpacity)),this._element.style.opacity=`${U}`,this._element.style.pointerEvents=U>0?"auto":"none",this._popup&&this._popup._setOpacity(U),this._fadeTimer=null}_clearFadeTimer(){this._fadeTimer&&(clearTimeout(this._fadeTimer),this._fadeTimer=null)}_updateDOM(){const h=this._pos;if(!h||!this._map)return;const b=this._offset.mult(this._scale);this._element.style.transform=` translate(${h.x}px,${h.y}px) ${em[this._anchor]} ${this._calculateXYTransform()} ${this._calculateZTransform()} translate(${b.x}px,${b.y}px) `}_calculateXYTransform(){const h=this._pos,b=this._map,R=this.getPitchAlignment();if(!b||!h||R!=="map")return"";if(!b._showingGlobe()){const he=b.getPitch();return he?`rotateX(${he}deg)`:""}const U=s.radToDeg(s.globeTiltAtLngLat(b.transform,this._lngLat)),K=h.sub(s.globeCenterToScreenPoint(b.transform)),ne=Math.abs(K.x)+Math.abs(K.y);if(ne===0)return"";const ae=U/ne;return`rotateX(${-K.y*ae}deg) rotateY(${K.x*ae}deg)`}_calculateZTransform(){const h=this._pos,b=this._map;if(!b||!h)return"";let R=0;const U=this.getRotationAlignment();if(U==="map")if(b._showingGlobe()){const K=b.project(new s.LngLat(this._lngLat.lng,this._lngLat.lat+.001)),ne=b.project(new s.LngLat(this._lngLat.lng,this._lngLat.lat-.001)).sub(K);R=s.radToDeg(Math.atan2(ne.y,ne.x))-90}else R=-b.getBearing();else if(U==="horizon"){const K=s.smoothstep(4,6,b.getZoom()),ne=s.globeCenterToScreenPoint(b.transform);ne.y+=K*b.transform.height;const ae=h.sub(ne),he=s.radToDeg(Math.atan2(ae.y,ae.x));R=(he>90?he-270:he+90)*(1-K)}return R+=this._rotation,R?`rotateZ(${R}deg)`:""}_update(h){s.window.cancelAnimationFrame(this._updateFrameId);const b=this._map;b&&(b.transform.renderWorldCopies&&(this._lngLat=hg(this._lngLat,this._pos,b.transform)),this._pos=b.project(this._lngLat),h===!0?this._updateFrameId=s.window.requestAnimationFrame(()=>{this._element&&this._pos&&this._anchor&&(this._pos=this._pos.round(),this._updateDOM())}):this._pos=this._pos.round(),b._requestDomTask(()=>{this._map&&(this._element&&this._pos&&this._anchor&&this._updateDOM(),(b._showingGlobe()||b.getTerrain()||b.getFog())&&!this._fadeTimer&&(this._fadeTimer=setTimeout(this._evaluateOpacity.bind(this),60)))}))}getOffset(){return this._offset}setOffset(h){return this._offset=s.Point.convert(h),this._update(),this}_onMove(h){const b=this._map;if(!b)return;const R=this._pointerdownPos,U=this._positionDelta;if(R&&U){if(!this._isDragging){const K=this._clickTolerance||b._clickTolerance;if(h.point.dist(R)<K)return;this._isDragging=!0}this._pos=h.point.sub(U),this._lngLat=b.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none",this._state==="pending"&&(this._state="active",this.fire(new s.Event("dragstart"))),this.fire(new s.Event("drag"))}}_onUp(){this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1;const h=this._map;h&&(h.off("mousemove",this._onMove),h.off("touchmove",this._onMove)),this._state==="active"&&this.fire(new s.Event("dragend")),this._state="inactive"}_addDragHandler(h){const b=this._map,R=this._pos;b&&R&&this._element.contains(h.originalEvent.target)&&(h.preventDefault(),this._positionDelta=h.point.sub(R),this._pointerdownPos=h.point,this._state="pending",b.on("mousemove",this._onMove),b.on("touchmove",this._onMove),b.once("mouseup",this._onUp),b.once("touchend",this._onUp))}setDraggable(h){this._draggable=!!h;const b=this._map;return b&&(h?(b.on("mousedown",this._addDragHandler),b.on("touchstart",this._addDragHandler)):(b.off("mousedown",this._addDragHandler),b.off("touchstart",this._addDragHandler))),this}isDraggable(){return this._draggable}setRotation(h){return this._rotation=h||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(h){return this._rotationAlignment=h||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment==="auto"||this._rotationAlignment==="horizon"&&this._map&&!this._map._showingGlobe()?"viewport":this._rotationAlignment}setPitchAlignment(h){return this._pitchAlignment=h||"auto",this._update(),this}getPitchAlignment(){return this._pitchAlignment==="auto"?this.getRotationAlignment():this._pitchAlignment}setOccludedOpacity(h){return this._occludedOpacity=h||.2,this._update(),this}getOccludedOpacity(){return this._occludedOpacity}}const B_={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px"},_S=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");function cu(I=new s.Point(0,0),h="bottom"){if(typeof I=="number"){const b=Math.round(Math.sqrt(.5*Math.pow(I,2)));switch(h){case"top":return new s.Point(0,I);case"top-left":return new s.Point(b,b);case"top-right":return new s.Point(-b,b);case"bottom":return new s.Point(0,-I);case"bottom-left":return new s.Point(b,-b);case"bottom-right":return new s.Point(-b,-b);case"left":return new s.Point(I,0);case"right":return new s.Point(-I,0)}return new s.Point(0,0)}return I instanceof s.Point||Array.isArray(I)?s.Point.convert(I):s.Point.convert(I[h]||[0,0])}class j_{constructor(h){this.jumpTo(h)}getValue(h){if(h<=this._startTime)return this._start;if(h>=this._endTime)return this._end;const b=s.easeCubicInOut((h-this._startTime)/(this._endTime-this._startTime));return this._start*(1-b)+this._end*b}isEasing(h){return h>=this._startTime&&h<=this._endTime}jumpTo(h){this._startTime=-1/0,this._endTime=-1/0,this._start=h,this._end=h}easeTo(h,b,R){this._start=this.getValue(b),this._end=h,this._startTime=b,this._endTime=b+R}}const sw={"AttributionControl.ToggleAttribution":"Toggle attribution","AttributionControl.MapFeedback":"Map feedback","FullscreenControl.Enter":"Enter fullscreen","FullscreenControl.Exit":"Exit fullscreen","GeolocateControl.FindMyLocation":"Find my location","GeolocateControl.LocationNotAvailable":"Location not available","LogoControl.Title":"Mapbox logo","Map.Title":"Map","NavigationControl.ResetBearing":"Reset bearing to north","NavigationControl.ZoomIn":"Zoom in","NavigationControl.ZoomOut":"Zoom out","ScrollZoomBlocker.CtrlMessage":"Use ctrl + scroll to zoom the map","ScrollZoomBlocker.CmdMessage":"Use \u2318 + scroll to zoom the map","TouchPanBlocker.Message":"Use two fingers to move the map"},aw={center:[0,0],zoom:0,bearing:0,pitch:0,minZoom:-2,maxZoom:22,minPitch:0,maxPitch:85,interactive:!0,scrollZoom:!0,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,touchPitch:!0,cooperativeGestures:!1,performanceMetricsCollection:!0,bearingSnap:7,clickTolerance:3,pitchWithRotate:!0,hash:!1,attributionControl:!0,failIfMajorPerformanceCaveat:!1,preserveDrawingBuffer:!1,trackResize:!0,optimizeForTerrain:!0,renderWorldCopies:!0,refreshExpiredTiles:!0,minTileCacheSize:null,maxTileCacheSize:null,localIdeographFontFamily:"sans-serif",localFontFamily:null,transformRequest:null,accessToken:null,fadeDuration:300,respectPrefersReducedMotion:!0,crossSourceCollisions:!0},bS={showCompass:!0,showZoom:!0,visualizePitch:!1};class wS{constructor(h,b,R=!1){this._clickTolerance=10,this.element=b,this.mouseRotate=new D_({clickTolerance:h.dragRotate._mouseRotate._clickTolerance}),this.map=h,R&&(this.mousePitch=new N_({clickTolerance:h.dragRotate._mousePitch._clickTolerance})),s.bindAll(["mousedown","mousemove","mouseup","touchstart","touchmove","touchend","reset"],this),b.addEventListener("mousedown",this.mousedown),b.addEventListener("touchstart",this.touchstart,{passive:!1}),b.addEventListener("touchmove",this.touchmove),b.addEventListener("touchend",this.touchend),b.addEventListener("touchcancel",this.reset)}down(h,b){this.mouseRotate.mousedown(h,b),this.mousePitch&&this.mousePitch.mousedown(h,b),C()}move(h,b){const R=this.map,U=this.mouseRotate.mousemoveWindow(h,b),K=U&&U.bearingDelta;if(K&&R.setBearing(R.getBearing()+K),this.mousePitch){const ne=this.mousePitch.mousemoveWindow(h,b),ae=ne&&ne.pitchDelta;ae&&R.setPitch(R.getPitch()+ae)}}off(){const h=this.element;h.removeEventListener("mousedown",this.mousedown),h.removeEventListener("touchstart",this.touchstart,{passive:!1}),h.removeEventListener("touchmove",this.touchmove),h.removeEventListener("touchend",this.touchend),h.removeEventListener("touchcancel",this.reset),this.offTemp()}offTemp(){E(),s.window.removeEventListener("mousemove",this.mousemove),s.window.removeEventListener("mouseup",this.mouseup)}mousedown(h){this.down(s.extend({},h,{ctrlKey:!0,preventDefault:()=>h.preventDefault()}),k(this.element,h)),s.window.addEventListener("mousemove",this.mousemove),s.window.addEventListener("mouseup",this.mouseup)}mousemove(h){this.move(h,k(this.element,h))}mouseup(h){this.mouseRotate.mouseupWindow(h),this.mousePitch&&this.mousePitch.mouseupWindow(h),this.offTemp()}touchstart(h){h.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=X(this.element,h.targetTouches)[0],this.down({type:"mousedown",button:0,ctrlKey:!0,preventDefault:()=>h.preventDefault()},this._startPos))}touchmove(h){h.targetTouches.length!==1?this.reset():(this._lastPos=X(this.element,h.targetTouches)[0],this.move({preventDefault:()=>h.preventDefault()},this._lastPos))}touchend(h){h.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)<this._clickTolerance&&this.element.click(),this.reset()}reset(){this.mouseRotate.reset(),this.mousePitch&&this.mousePitch.reset(),delete this._startPos,delete this._lastPos,this.offTemp()}}const g0={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0,showUserHeading:!1},v0={maxWidth:100,unit:"metric"},U_={kilometer:"km",meter:"m",mile:"mi",foot:"ft","nautical-mile":"nm"},pg={version:s.version,supported:u,setRTLTextPlugin:s.setRTLTextPlugin,getRTLTextPluginStatus:s.getRTLTextPluginStatus,Map:class extends lu{constructor(I){if(s.LivePerformanceUtils.mark(s.PerformanceMarkers.create),(I=s.extend({},aw,I)).minZoom!=null&&I.maxZoom!=null&&I.minZoom>I.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(I.minPitch!=null&&I.maxPitch!=null&&I.minPitch>I.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(I.minPitch!=null&&I.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(I.maxPitch!=null&&I.maxPitch>85)throw new Error("maxPitch must be less than or equal to 85");if(I.antialias&&s.isSafariWithAntialiasingBug(s.window)&&(I.antialias=!1,s.warnOnce("Antialiasing is disabled for this WebGL context to avoid browser bug: https://github.com/mapbox/mapbox-gl-js/issues/11609")),super(new Pd(I.minZoom,I.maxZoom,I.minPitch,I.maxPitch,I.renderWorldCopies),I),this._interactive=I.interactive,this._minTileCacheSize=I.minTileCacheSize,this._maxTileCacheSize=I.maxTileCacheSize,this._failIfMajorPerformanceCaveat=I.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=I.preserveDrawingBuffer,this._antialias=I.antialias,this._useWebGL2=I.useWebGL2,this._trackResize=I.trackResize,this._bearingSnap=I.bearingSnap,this._refreshExpiredTiles=I.refreshExpiredTiles,this._fadeDuration=I.fadeDuration,this._isInitialLoad=!0,this._crossSourceCollisions=I.crossSourceCollisions,this._collectResourceTiming=I.collectResourceTiming,this._optimizeForTerrain=I.optimizeForTerrain,this._language=this._parseLanguage(I.language),this._worldview=I.worldview,this._renderTaskQueue=new z_,this._domRenderTaskQueue=new z_,this._controls=[],this._markers=[],this._popups=[],this._mapId=s.uniqueId(),this._locale=s.extend({},sw,I.locale),this._clickTolerance=I.clickTolerance,this._cooperativeGestures=I.cooperativeGestures,this._performanceMetricsCollection=I.performanceMetricsCollection,this._containerWidth=0,this._containerHeight=0,this._averageElevationLastSampledAt=-1/0,this._averageElevationExaggeration=0,this._averageElevation=new j_(0),this._interactionRange=[1/0,-1/0],this._visibilityHidden=0,this._useExplicitProjection=!1,this._requestManager=new s.RequestManager(I.transformRequest,I.accessToken,I.testMode),this._silenceAuthErrors=!!I.testMode,typeof I.container=="string"){if(this._container=s.window.document.getElementById(I.container),!this._container)throw new Error(`Container '${I.container}' not found.`)}else{if(!(I.container instanceof s.window.HTMLElement))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=I.container}if(this._container.childNodes.length>0&&s.warnOnce("The map container element should be empty, otherwise the map's interactivity will be negatively impacted. If you want to display a message when WebGL is not supported, use the Mapbox GL Supported plugin instead."),I.maxBounds&&this.setMaxBounds(I.maxBounds),s.bindAll(["_onWindowOnline","_onWindowResize","_onVisibilityChange","_onMapScroll","_contextLost","_contextRestored"],this),this._setupContainer(),this._setupPainter(),this.painter===void 0)throw new Error("Failed to initialize WebGL.");this.on("move",()=>this._update(!1)),this.on("moveend",()=>this._update(!1)),this.on("zoom",()=>this._update(!0)),s.window!==void 0&&(s.window.addEventListener("online",this._onWindowOnline,!1),s.window.addEventListener("resize",this._onWindowResize,!1),s.window.addEventListener("orientationchange",this._onWindowResize,!1),s.window.addEventListener("webkitfullscreenchange",this._onWindowResize,!1),s.window.addEventListener("visibilitychange",this._onVisibilityChange,!1)),this.handlers=new Of(this,I),this._localFontFamily=I.localFontFamily,this._localIdeographFontFamily=I.localIdeographFontFamily,I.style&&this.setStyle(I.style,{localFontFamily:this._localFontFamily,localIdeographFontFamily:this._localIdeographFontFamily}),I.projection&&this.setProjection(I.projection),this._hash=I.hash&&new L_(typeof I.hash=="string"&&I.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:I.center,zoom:I.zoom,bearing:I.bearing,pitch:I.pitch}),I.bounds&&(this.resize(),this.fitBounds(I.bounds,s.extend({},I.fitBoundsOptions,{duration:0})))),this.resize(),I.attributionControl&&this.addControl(new Sn({customAttribution:I.customAttribution})),this._logoControl=new F_,this.addControl(this._logoControl,I.logoPosition),this.on("style.load",()=>{this.transform.unmodified&&this.jumpTo(this.style.stylesheet)}),this.on("data",h=>{this._update(h.dataType==="style"),this.fire(new s.Event(`${h.dataType}data`,h))}),this.on("dataloading",h=>{this.fire(new s.Event(`${h.dataType}dataloading`,h))})}_getMapId(){return this._mapId}addControl(I,h){if(h===void 0&&(h=I.getDefaultPosition?I.getDefaultPosition():"top-right"),!I||!I.onAdd)return this.fire(new s.ErrorEvent(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));const b=I.onAdd(this);this._controls.push(I);const R=this._controlPositions[h];return h.indexOf("bottom")!==-1?R.insertBefore(b,R.firstChild):R.appendChild(b),this}removeControl(I){if(!I||!I.onRemove)return this.fire(new s.ErrorEvent(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));const h=this._controls.indexOf(I);return h>-1&&this._controls.splice(h,1),I.onRemove(this),this}hasControl(I){return this._controls.indexOf(I)>-1}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}resize(I){if(this._updateContainerDimensions(),this._containerWidth===this.transform.width&&this._containerHeight===this.transform.height)return this;this._resizeCanvas(this._containerWidth,this._containerHeight),this.transform.resize(this._containerWidth,this._containerHeight),this.painter.resize(Math.ceil(this._containerWidth),Math.ceil(this._containerHeight));const h=!this._moving;return h&&this.fire(new s.Event("movestart",I)).fire(new s.Event("move",I)),this.fire(new s.Event("resize",I)),h&&this.fire(new s.Event("moveend",I)),this}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()||null}setMaxBounds(I){return this.transform.setMaxBounds(s.LngLatBounds.convert(I)),this._update()}setMinZoom(I){if((I=I==null?-2:I)>=-2&&I<=this.transform.maxZoom)return this.transform.minZoom=I,this._update(),this.getZoom()<I?this.setZoom(I):this.fire(new s.Event("zoomstart")).fire(new s.Event("zoom")).fire(new s.Event("zoomend")),this;throw new Error("minZoom must be between -2 and the current maxZoom, inclusive")}getMinZoom(){return this.transform.minZoom}setMaxZoom(I){if((I=I==null?22:I)>=this.transform.minZoom)return this.transform.maxZoom=I,this._update(),this.getZoom()>I?this.setZoom(I):this.fire(new s.Event("zoomstart")).fire(new s.Event("zoom")).fire(new s.Event("zoomend")),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(I){if((I=I==null?0:I)<0)throw new Error("minPitch must be greater than or equal to 0");if(I>=0&&I<=this.transform.maxPitch)return this.transform.minPitch=I,this._update(),this.getPitch()<I?this.setPitch(I):this.fire(new s.Event("pitchstart")).fire(new s.Event("pitch")).fire(new s.Event("pitchend")),this;throw new Error("minPitch must be between 0 and the current maxPitch, inclusive")}getMinPitch(){return this.transform.minPitch}setMaxPitch(I){if((I=I==null?85:I)>85)throw new Error("maxPitch must be less than or equal to 85");if(I>=this.transform.minPitch)return this.transform.maxPitch=I,this._update(),this.getPitch()>I?this.setPitch(I):this.fire(new s.Event("pitchstart")).fire(new s.Event("pitch")).fire(new s.Event("pitchend")),this;throw new Error("maxPitch must be greater than or equal to minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(I){return this.transform.renderWorldCopies=I,this.transform.renderWorldCopies||this._forceMarkerAndPopupUpdate(!0),this._update()}getLanguage(){return this._language}_parseLanguage(I){return I==="auto"?s.window.navigator.language:Array.isArray(I)?I.length===0?void 0:I.map(h=>h==="auto"?s.window.navigator.language:h):I}setLanguage(I){const h=this._parseLanguage(I);if(!this.style||h===this._language)return this;this._language=h,this.style._reloadSources();for(const b of this._controls)b._setLanguage&&b._setLanguage(this._language);return this}getWorldview(){return this._worldview}setWorldview(I){return this.style&&I!==this._worldview?(this._worldview=I,this.style._reloadSources(),this):this}getProjection(){return this.transform.mercatorFromTransition?{name:"globe",center:[0,0]}:this.transform.getProjection()}_showingGlobe(){return this.transform.projection.name==="globe"}setProjection(I){return this._lazyInitEmptyStyle(),I?typeof I=="string"&&(I={name:I}):I=null,this._useExplicitProjection=!!I,this._prioritizeAndUpdateProjection(I,this.style.stylesheet?this.style.stylesheet.projection:null)}_updateProjectionTransition(){if(this.getProjection().name!=="globe")return;const I=this.transform,h=I.projection.name;let b;h==="globe"&&I.zoom>=s.GLOBE_ZOOM_THRESHOLD_MAX?(I.setMercatorFromTransition(),b=!0):h==="mercator"&&I.zoom<s.GLOBE_ZOOM_THRESHOLD_MAX&&(I.setProjection({name:"globe"}),b=!0),b&&(this.style.applyProjectionUpdate(),this.style._forceSymbolLayerUpdate())}_prioritizeAndUpdateProjection(I,h){return this._updateProjection(I||h||{name:"mercator"})}_updateProjection(I){let h;if(h=I.name==="globe"&&this.transform.zoom>=s.GLOBE_ZOOM_THRESHOLD_MAX?this.transform.setMercatorFromTransition():this.transform.setProjection(I),this.style.applyProjectionUpdate(),h){this.painter.clearBackgroundTiles();for(const b in this.style._sourceCaches)this.style._sourceCaches[b].clearTiles();this._update(!0),this._forceMarkerAndPopupUpdate(!0)}return this}project(I){return this.transform.locationPoint3D(s.LngLat.convert(I))}unproject(I){return this.transform.pointLocation3D(s.Point.convert(I))}isMoving(){return this._moving||this.handlers&&this.handlers.isMoving()||!1}isZooming(){return this._zooming||this.handlers&&this.handlers.isZooming()||!1}isRotating(){return this._rotating||this.handlers&&this.handlers.isRotating()||!1}_isDragging(){return this.handlers&&this.handlers._isDragging()||!1}_createDelegatedListener(I,h,b){if(I==="mouseenter"||I==="mouseover"){let R=!1;const U=ne=>{const ae=h.filter(be=>this.getLayer(be)),he=ae.length?this.queryRenderedFeatures(ne.point,{layers:ae}):[];he.length?R||(R=!0,b.call(this,new xo(I,this,ne.originalEvent,{features:he}))):R=!1},K=()=>{R=!1};return{layers:new Set(h),listener:b,delegates:{mousemove:U,mouseout:K}}}if(I==="mouseleave"||I==="mouseout"){let R=!1;const U=ne=>{const ae=h.filter(he=>this.getLayer(he));(ae.length?this.queryRenderedFeatures(ne.point,{layers:ae}):[]).length?R=!0:R&&(R=!1,b.call(this,new xo(I,this,ne.originalEvent)))},K=ne=>{R&&(R=!1,b.call(this,new xo(I,this,ne.originalEvent)))};return{layers:new Set(h),listener:b,delegates:{mousemove:U,mouseout:K}}}{const R=U=>{const K=h.filter(ae=>this.getLayer(ae)),ne=K.length?this.queryRenderedFeatures(U.point,{layers:K}):[];ne.length&&(U.features=ne,b.call(this,U),delete U.features)};return{layers:new Set(h),listener:b,delegates:{[I]:R}}}}on(I,h,b){if(b===void 0)return super.on(I,h);Array.isArray(h)||(h=[h]);const R=this._createDelegatedListener(I,h,b);this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[I]=this._delegatedListeners[I]||[],this._delegatedListeners[I].push(R);for(const U in R.delegates)this.on(U,R.delegates[U]);return this}once(I,h,b){if(b===void 0)return super.once(I,h);Array.isArray(h)||(h=[h]);const R=this._createDelegatedListener(I,h,b);for(const U in R.delegates)this.once(U,R.delegates[U]);return this}off(I,h,b){if(b===void 0)return super.off(I,h);h=new Set(Array.isArray(h)?h:[h]);const R=(K,ne)=>{if(K.size!==ne.size)return!1;for(const ae of K)if(!ne.has(ae))return!1;return!0},U=this._delegatedListeners?this._delegatedListeners[I]:void 0;return U&&(K=>{for(let ne=0;ne<K.length;ne++){const ae=K[ne];if(ae.listener===b&&R(ae.layers,h)){for(const he in ae.delegates)this.off(he,ae.delegates[he]);return K.splice(ne,1),this}}})(U),this}queryRenderedFeatures(I,h){return this.style?(h!==void 0||I===void 0||I instanceof s.Point||Array.isArray(I)||(h=I,I=void 0),this.style.queryRenderedFeatures(I=I||[[0,0],[this.transform.width,this.transform.height]],h=h||{},this.transform)):[]}querySourceFeatures(I,h){return this.style.querySourceFeatures(I,h)}isPointOnSurface(I){const{name:h}=this.transform.projection;return h!=="globe"&&h!=="mercator"&&s.warnOnce(`${h} projection does not support isPointOnSurface, this API may behave unexpectedly.`),this.transform.isPointOnSurface(s.Point.convert(I))}setStyle(I,h){return(h=s.extend({},{localIdeographFontFamily:this._localIdeographFontFamily,localFontFamily:this._localFontFamily},h)).diff!==!1&&h.localIdeographFontFamily===this._localIdeographFontFamily&&h.localFontFamily===this._localFontFamily&&this.style&&I?(this._diffStyle(I,h),this):(this._localIdeographFontFamily=h.localIdeographFontFamily,this._localFontFamily=h.localFontFamily,this._updateStyle(I,h))}_getUIString(I){const h=this._locale[I];if(h==null)throw new Error(`Missing UI string '${I}'`);return h}_updateStyle(I,h){return this.style&&(this.style.setEventedParent(null),this.style._remove(),this.style=void 0),I&&(this.style=new Yo(this,h||{}),this.style.setEventedParent(this,{style:this.style}),typeof I=="string"?this.style.loadURL(I):this.style.loadJSON(I)),this._updateTerrain(),this}_lazyInitEmptyStyle(){this.style||(this.style=new Yo(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(I,h){if(typeof I=="string"){const b=this._requestManager.normalizeStyleURL(I),R=this._requestManager.transformRequest(b,s.ResourceType.Style);s.getJSON(R,(U,K)=>{U?this.fire(new s.ErrorEvent(U)):K&&this._updateDiff(K,h)})}else typeof I=="object"&&this._updateDiff(I,h)}_updateDiff(I,h){try{this.style.setState(I)&&this._update(!0)}catch(b){s.warnOnce(`Unable to perform style diff: ${b.message||b.error||b}. Rebuilding the style from scratch.`),this._updateStyle(I,h)}}getStyle(){if(this.style)return this.style.serialize()}isStyleLoaded(){return this.style?this.style.loaded():(s.warnOnce("There is no style added to the map."),!1)}addSource(I,h){return this._lazyInitEmptyStyle(),this.style.addSource(I,h),this._update(!0)}isSourceLoaded(I){return!!this.style&&this.style._isSourceCacheLoaded(I)}areTilesLoaded(){const I=this.style&&this.style._sourceCaches;for(const h in I){const b=I[h]._tiles;for(const R in b){const U=b[R];if(U.state!=="loaded"&&U.state!=="errored")return!1}}return!0}addSourceType(I,h,b){this._lazyInitEmptyStyle(),this.style.addSourceType(I,h,b)}removeSource(I){return this.style.removeSource(I),this._updateTerrain(),this._update(!0)}getSource(I){return this.style.getSource(I)}addImage(I,h,{pixelRatio:b=1,sdf:R=!1,stretchX:U,stretchY:K,content:ne}={}){if(this._lazyInitEmptyStyle(),h instanceof s.window.HTMLImageElement||s.window.ImageBitmap&&h instanceof s.window.ImageBitmap){const{width:ae,height:he,data:be}=s.exported.getImageData(h);this.style.addImage(I,{data:new s.RGBAImage({width:ae,height:he},be),pixelRatio:b,stretchX:U,stretchY:K,content:ne,sdf:R,version:0})}else if(h.width===void 0||h.height===void 0)this.fire(new s.ErrorEvent(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));else{const{width:ae,height:he}=h,be=h;this.style.addImage(I,{data:new s.RGBAImage({width:ae,height:he},new Uint8Array(be.data)),pixelRatio:b,stretchX:U,stretchY:K,content:ne,sdf:R,version:0,userImage:be}),be.onAdd&&be.onAdd(this,I)}}updateImage(I,h){const b=this.style.getImage(I);if(!b)return void this.fire(new s.ErrorEvent(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));const R=h instanceof s.window.HTMLImageElement||s.window.ImageBitmap&&h instanceof s.window.ImageBitmap?s.exported.getImageData(h):h,{width:U,height:K}=R;U!==void 0&&K!==void 0?U===b.data.width&&K===b.data.height?(b.data.replace(R.data,!(h instanceof s.window.HTMLImageElement||s.window.ImageBitmap&&h instanceof s.window.ImageBitmap)),this.style.updateImage(I,b)):this.fire(new s.ErrorEvent(new Error(`The width and height of the updated image (${U}, ${K}) must be that same as the previous version of the image (${b.data.width}, ${b.data.height})`))):this.fire(new s.ErrorEvent(new Error("Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")))}hasImage(I){return I?!!this.style.getImage(I):(this.fire(new s.ErrorEvent(new Error("Missing required image id"))),!1)}removeImage(I){this.style.removeImage(I)}loadImage(I,h){s.getImage(this._requestManager.transformRequest(I,s.ResourceType.Image),(b,R)=>{h(b,R instanceof s.window.HTMLImageElement?s.exported.getImageData(R):R)})}listImages(){return this.style.listImages()}addLayer(I,h){return this._lazyInitEmptyStyle(),this.style.addLayer(I,h),this._update(!0)}moveLayer(I,h){return this.style.moveLayer(I,h),this._update(!0)}removeLayer(I){return this.style.removeLayer(I),this._update(!0)}getLayer(I){return this.style.getLayer(I)}setLayerZoomRange(I,h,b){return this.style.setLayerZoomRange(I,h,b),this._update(!0)}setFilter(I,h,b={}){return this.style.setFilter(I,h,b),this._update(!0)}getFilter(I){return this.style.getFilter(I)}setPaintProperty(I,h,b,R={}){return this.style.setPaintProperty(I,h,b,R),this._update(!0)}getPaintProperty(I,h){return this.style.getPaintProperty(I,h)}setLayoutProperty(I,h,b,R={}){return this.style.setLayoutProperty(I,h,b,R),this._update(!0)}getLayoutProperty(I,h){return this.style.getLayoutProperty(I,h)}setLight(I,h={}){return this._lazyInitEmptyStyle(),this.style.setLight(I,h),this._update(!0)}getLight(){return this.style.getLight()}setTerrain(I){return this._lazyInitEmptyStyle(),!I&&this.transform.projection.requiresDraping?this.style.setTerrainForDraping():this.style.setTerrain(I),this._averageElevationLastSampledAt=-1/0,this._update(!0)}getTerrain(){return this.style?this.style.getTerrain():null}setFog(I){return this._lazyInitEmptyStyle(),this.style.setFog(I),this._update(!0)}getFog(){return this.style?this.style.getFog():null}_queryFogOpacity(I){return this.style&&this.style.fog?this.style.fog.getOpacityAtLatLng(s.LngLat.convert(I),this.transform):0}setFeatureState(I,h){return this.style.setFeatureState(I,h),this._update()}removeFeatureState(I,h){return this.style.removeFeatureState(I,h),this._update()}getFeatureState(I){return this.style.getFeatureState(I)}_updateContainerDimensions(){if(!this._container)return;const I=this._container.getBoundingClientRect().width||400,h=this._container.getBoundingClientRect().height||300;let b,R,U,K=this._container;for(;K&&(!R||!U);){const ne=s.window.getComputedStyle(K).transform;ne&&ne!=="none"&&(b=ne.match(/matrix.*\((.+)\)/)[1].split(", "),b[0]&&b[0]!=="0"&&b[0]!=="1"&&(R=b[0]),b[3]&&b[3]!=="0"&&b[3]!=="1"&&(U=b[3])),K=K.parentElement}this._containerWidth=R?Math.abs(I/R):I,this._containerHeight=U?Math.abs(h/U):h}_detectMissingCSS(){s.window.getComputedStyle(this._missingCSSCanary).getPropertyValue("background-color")!=="rgb(250, 128, 114)"&&s.warnOnce("This page appears to be missing CSS declarations for Mapbox GL JS, which may cause the map to display incorrectly. Please ensure your page includes mapbox-gl.css, as described in https://www.mapbox.com/mapbox-gl-js/api/.")}_setupContainer(){const I=this._container;I.classList.add("mapboxgl-map"),(this._missingCSSCanary=v("div","mapboxgl-canary",I)).style.visibility="hidden",this._detectMissingCSS();const h=this._canvasContainer=v("div","mapboxgl-canvas-container",I);this._interactive&&h.classList.add("mapboxgl-interactive"),this._canvas=v("canvas","mapboxgl-canvas",h),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex","0"),this._canvas.setAttribute("aria-label",this._getUIString("Map.Title")),this._canvas.setAttribute("role","region"),this._updateContainerDimensions(),this._resizeCanvas(this._containerWidth,this._containerHeight);const b=this._controlContainer=v("div","mapboxgl-control-container",I),R=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(U=>{R[U]=v("div",`mapboxgl-ctrl-${U}`,b)}),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(I,h){const b=s.exported.devicePixelRatio||1;this._canvas.width=b*Math.ceil(I),this._canvas.height=b*Math.ceil(h),this._canvas.style.width=`${I}px`,this._canvas.style.height=`${h}px`}_addMarker(I){this._markers.push(I)}_removeMarker(I){const h=this._markers.indexOf(I);h!==-1&&this._markers.splice(h,1)}_addPopup(I){this._popups.push(I)}_removePopup(I){const h=this._popups.indexOf(I);h!==-1&&this._popups.splice(h,1)}_setupPainter(){const I=s.extend({},u.webGLContextAttributes,{failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1}),h=this._useWebGL2&&this._canvas.getContext("webgl2",I),b=h||this._canvas.getContext("webgl",I)||this._canvas.getContext("experimental-webgl",I);b?(this._useWebGL2&&!h&&s.warnOnce("Failed to create WebGL 2 context. Using WebGL 1."),s.storeAuthState(b,!0),this.painter=new sg(b,this.transform,!!h),this.on("data",R=>{R.dataType==="source"&&this.painter.setTileLoadedFlag(!0)}),s.exported$1.testSupport(b)):this.fire(new s.ErrorEvent(new Error("Failed to initialize WebGL")))}_contextLost(I){I.preventDefault(),this._frame&&(this._frame.cancel(),this._frame=null),this.fire(new s.Event("webglcontextlost",{originalEvent:I}))}_contextRestored(I){this._setupPainter(),this.resize(),this._update(),this.fire(new s.Event("webglcontextrestored",{originalEvent:I}))}_onMapScroll(I){if(I.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(I){return this.style?(this._styleDirty=this._styleDirty||I,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(I){return this._update(),this._renderTaskQueue.add(I)}_cancelRenderFrame(I){this._renderTaskQueue.remove(I)}_requestDomTask(I){!this.loaded()||this.loaded()&&!this.isMoving()?I():this._domRenderTaskQueue.add(I)}_render(I){let h;const b=this.painter.context.extTimerQuery,R=s.exported.now();if(this.listens("gpu-timing-frame")&&(h=b.createQueryEXT(),b.beginQueryEXT(b.TIME_ELAPSED_EXT,h)),this.painter.context.setDirty(),this.painter.setBaseState(),(this.isMoving()||this.isRotating()||this.isZooming())&&(this._interactionRange[0]=Math.min(this._interactionRange[0],s.window.performance.now()),this._interactionRange[1]=Math.max(this._interactionRange[1],s.window.performance.now())),this._renderTaskQueue.run(I),this._domRenderTaskQueue.run(I),this._removed)return;this._updateProjectionTransition();const U=this._isInitialLoad?0:this._fadeDuration;if(this.style&&this._styleDirty){this._styleDirty=!1;const ae=this.transform.zoom,he=this.transform.pitch,be=s.exported.now(),we=new s.EvaluationParameters(ae,{now:be,fadeDuration:U,pitch:he,transition:this.style.getTransition()});this.style.update(we)}this.style&&this.style.fog&&this.style.fog.hasTransition()&&(this.style._markersNeedUpdate=!0,this._sourcesDirty=!0);let K=!1;if(this.style&&this._sourcesDirty?(this._sourcesDirty=!1,this.painter._updateFog(this.style),this._updateTerrain(),K=this._updateAverageElevation(R),this.style._updateSources(this.transform),this._forceMarkerAndPopupUpdate()):K=this._updateAverageElevation(R),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,U,this._crossSourceCollisions),this.style&&this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showTerrainWireframe:this.showTerrainWireframe,showOverdrawInspector:this._showOverdrawInspector,showQueryGeometry:!!this._showQueryGeometry,showTileAABBs:this.showTileAABBs,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:U,isInitialLoad:this._isInitialLoad,showPadding:this.showPadding,gpuTiming:!!this.listens("gpu-timing-layer"),gpuTimingDeferredRender:!!this.listens("gpu-timing-deferred-render"),speedIndexTiming:this.speedIndexTiming}),this.fire(new s.Event("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,this.fire(new s.Event("load"))),this.style&&this.style.hasTransitions()&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles(),h){const ae=s.exported.now()-R;b.endQueryEXT(b.TIME_ELAPSED_EXT,h),setTimeout(()=>{const he=b.getQueryObjectEXT(h,b.QUERY_RESULT_EXT)/1e6;b.deleteQueryEXT(h),this.fire(new s.Event("gpu-timing-frame",{cpuTime:ae,gpuTime:he})),s.window.performance.mark("frame-gpu",{startTime:R,detail:{gpuTime:he}})},50)}if(this.listens("gpu-timing-layer")){const ae=this.painter.collectGpuTimers();setTimeout(()=>{const he=this.painter.queryGpuTimers(ae);this.fire(new s.Event("gpu-timing-layer",{layerTimes:he}))},50)}if(this.listens("gpu-timing-deferred-render")){const ae=this.painter.collectDeferredRenderGpuQueries();setTimeout(()=>{const he=this.painter.queryGpuTimeDeferredRender(ae);this.fire(new s.Event("gpu-timing-deferred-render",{gpuTime:he}))},50)}const ne=this._sourcesDirty||this._styleDirty||this._placementDirty||K;if(ne||this._repaint)this.triggerRepaint();else{const ae=!this.isMoving()&&this.loaded();if(ae&&(K=this._updateAverageElevation(R,!0)),K)this.triggerRepaint();else if(this._triggerFrame(!1),ae&&(this.fire(new s.Event("idle")),this._isInitialLoad=!1,this.speedIndexTiming)){const he=this._calculateSpeedIndex();this.fire(new s.Event("speedindexcompleted",{speedIndex:he})),this.speedIndexTiming=!1}}!this._loaded||this._fullyLoaded||ne||(this._fullyLoaded=!0,s.LivePerformanceUtils.mark(s.PerformanceMarkers.fullLoad),this._performanceMetricsCollection&&s.postPerformanceEvent(this._requestManager._customAccessToken,{width:this.painter.width,height:this.painter.height,interactionRange:this._interactionRange,visibilityHidden:this._visibilityHidden,terrainEnabled:!!this.painter.style.getTerrain(),fogEnabled:!!this.painter.style.getFog(),projection:this.getProjection().name,zoom:this.transform.zoom,renderer:this.painter.context.renderer,vendor:this.painter.context.vendor}),this._authenticate())}_forceMarkerAndPopupUpdate(I){for(const h of this._markers)I&&!this.getRenderWorldCopies()&&(h._lngLat=h._lngLat.wrap()),h._update();for(const h of this._popups)!I||this.getRenderWorldCopies()||h._trackPointer||(h._lngLat=h._lngLat.wrap()),h._update()}_updateAverageElevation(I,h=!1){const b=R=>(this.transform.averageElevation=R,this._update(!1),!0);if(!this.painter.averageElevationNeedsEasing())return this.transform.averageElevation!==0&&b(0);if((h||I-this._averageElevationLastSampledAt>500)&&!this._averageElevation.isEasing(I)){const R=this.transform.averageElevation;let U=this.transform.sampleAverageElevation(),K=!1;this.transform.elevation&&(K=this.transform.elevation.exaggeration()!==this._averageElevationExaggeration,this._averageElevationExaggeration=this.transform.elevation.exaggeration()),isNaN(U)?U=0:this._averageElevationLastSampledAt=I;const ne=Math.abs(R-U);if(ne>1){if(this._isInitialLoad||K)return this._averageElevation.jumpTo(U),b(U);this._averageElevation.easeTo(U,I,300)}else if(ne>1e-4)return this._averageElevation.jumpTo(U),b(U)}return!!this._averageElevation.isEasing(I)&&b(this._averageElevation.getValue(I))}_authenticate(){s.getMapSessionAPI(this._getMapId(),this._requestManager._skuToken,this._requestManager._customAccessToken,I=>{if(I&&(I.message===s.AUTH_ERR_MSG||I.status===401)){const h=this.painter.context.gl;s.storeAuthState(h,!1),this._logoControl instanceof F_&&this._logoControl._updateLogo(),h&&h.clear(h.DEPTH_BUFFER_BIT|h.COLOR_BUFFER_BIT|h.STENCIL_BUFFER_BIT),this._silenceAuthErrors||this.fire(new s.ErrorEvent(new Error("A valid Mapbox access token is required to use Mapbox GL JS. To create an account or a new access token, visit https://account.mapbox.com/")))}}),s.postMapLoadEvent(this._getMapId(),this._requestManager._skuToken,this._requestManager._customAccessToken,()=>{})}_updateTerrain(){const I=this._isDragging();this.painter.updateTerrain(this.style,I)}_calculateSpeedIndex(){const I=this.painter.canvasCopy(),h=this.painter.getCanvasCopiesAndTimestamps();h.timeStamps.push(performance.now());const b=this.painter.context.gl,R=b.createFramebuffer();function U(K){b.framebufferTexture2D(b.FRAMEBUFFER,b.COLOR_ATTACHMENT0,b.TEXTURE_2D,K,0);const ne=new Uint8Array(b.drawingBufferWidth*b.drawingBufferHeight*4);return b.readPixels(0,0,b.drawingBufferWidth,b.drawingBufferHeight,b.RGBA,b.UNSIGNED_BYTE,ne),ne}return b.bindFramebuffer(b.FRAMEBUFFER,R),this._canvasPixelComparison(U(I),h.canvasCopies.map(U),h.timeStamps)}_canvasPixelComparison(I,h,b){let R=b[1]-b[0];const U=I.length/4;for(let K=0;K<h.length;K++){const ne=h[K];let ae=0;for(let he=0;he<ne.length;he+=4)ne[he]===I[he]&&ne[he+1]===I[he+1]&&ne[he+2]===I[he+2]&&ne[he+3]===I[he+3]&&(ae+=1);R+=(b[K+2]-b[K+1])*(1-ae/U)}return R}remove(){this._hash&&this._hash.remove();for(const h of this._controls)h.onRemove(this);this._controls=[],this._frame&&(this._frame.cancel(),this._frame=null),this._renderTaskQueue.clear(),this._domRenderTaskQueue.clear(),this.style&&this.style.destroy(),this.painter.destroy(),this.handlers&&this.handlers.destroy(),this.handlers=void 0,this.setStyle(null),s.window!==void 0&&(s.window.removeEventListener("resize",this._onWindowResize,!1),s.window.removeEventListener("orientationchange",this._onWindowResize,!1),s.window.removeEventListener("webkitfullscreenchange",this._onWindowResize,!1),s.window.removeEventListener("online",this._onWindowOnline,!1),s.window.removeEventListener("visibilitychange",this._onVisibilityChange,!1));const I=this.painter.context.gl.getExtension("WEBGL_lose_context");I&&I.loseContext(),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvasContainer.remove(),this._controlContainer.remove(),this._missingCSSCanary.remove(),this._canvas=void 0,this._canvasContainer=void 0,this._controlContainer=void 0,this._missingCSSCanary=void 0,this._container.classList.remove("mapboxgl-map"),this._container.removeEventListener("scroll",this._onMapScroll,!1),s.removeAuthState(this.painter.context.gl),this._removed=!0,this.fire(new s.Event("remove"))}triggerRepaint(){this._triggerFrame(!0)}_triggerFrame(I){this._renderNextFrame=this._renderNextFrame||I,this.style&&!this._frame&&(this._frame=s.exported.frame(h=>{const b=!!this._renderNextFrame;this._frame=null,this._renderNextFrame=null,b&&this._render(h)}))}_preloadTiles(I){const h=this.style?Object.values(this.style._sourceCaches):[];return s.asyncAll(h,(b,R)=>b._preloadTiles(I,R),()=>{this.triggerRepaint()}),this}_onWindowOnline(){this._update()}_onWindowResize(I){this._trackResize&&this.resize({originalEvent:I})._update()}_onVisibilityChange(){s.window.document.visibilityState==="hidden"&&this._visibilityHidden++}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(I){this._showTileBoundaries!==I&&(this._showTileBoundaries=I,this._update())}get showTerrainWireframe(){return!!this._showTerrainWireframe}set showTerrainWireframe(I){this._showTerrainWireframe!==I&&(this._showTerrainWireframe=I,this._update())}get speedIndexTiming(){return!!this._speedIndexTiming}set speedIndexTiming(I){this._speedIndexTiming!==I&&(this._speedIndexTiming=I,this._update())}get showPadding(){return!!this._showPadding}set showPadding(I){this._showPadding!==I&&(this._showPadding=I,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(I){this._showCollisionBoxes!==I&&(this._showCollisionBoxes=I,I?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(I){this._showOverdrawInspector!==I&&(this._showOverdrawInspector=I,this._update())}get repaint(){return!!this._repaint}set repaint(I){this._repaint!==I&&(this._repaint=I,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(I){this._vertices=I,this._update()}get showTileAABBs(){return!!this._showTileAABBs}set showTileAABBs(I){this._showTileAABBs!==I&&(this._showTileAABBs=I,I&&this._update())}_setCacheLimits(I,h){s.setCacheLimits(I,h)}get version(){return s.version}},NavigationControl:class{constructor(I){this.options=s.extend({},bS,I),this._container=v("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._container.addEventListener("contextmenu",h=>h.preventDefault()),this.options.showZoom&&(s.bindAll(["_setButtonTitle","_updateZoomButtons"],this),this._zoomInButton=this._createButton("mapboxgl-ctrl-zoom-in",h=>{this._map&&this._map.zoomIn({},{originalEvent:h})}),v("span","mapboxgl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("mapboxgl-ctrl-zoom-out",h=>{this._map&&this._map.zoomOut({},{originalEvent:h})}),v("span","mapboxgl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(s.bindAll(["_rotateCompassArrow"],this),this._compass=this._createButton("mapboxgl-ctrl-compass",h=>{const b=this._map;b&&(this.options.visualizePitch?b.resetNorthPitch({},{originalEvent:h}):b.resetNorth({},{originalEvent:h}))}),this._compassIcon=v("span","mapboxgl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}_updateZoomButtons(){const I=this._map;if(!I)return;const h=I.getZoom(),b=h===I.getMaxZoom(),R=h===I.getMinZoom();this._zoomInButton.disabled=b,this._zoomOutButton.disabled=R,this._zoomInButton.setAttribute("aria-disabled",b.toString()),this._zoomOutButton.setAttribute("aria-disabled",R.toString())}_rotateCompassArrow(){const I=this._map;if(!I)return;const h=this.options.visualizePitch?`scale(${1/Math.pow(Math.cos(I.transform.pitch*(Math.PI/180)),.5)}) rotateX(${I.transform.pitch}deg) rotateZ(${I.transform.angle*(180/Math.PI)}deg)`:`rotate(${I.transform.angle*(180/Math.PI)}deg)`;I._requestDomTask(()=>{this._compassIcon&&(this._compassIcon.style.transform=h)})}onAdd(I){return this._map=I,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),I.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&I.on("pitch",this._rotateCompassArrow),I.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new wS(I,this._compass,this.options.visualizePitch)),this._container}onRemove(){const I=this._map;I&&(this._container.remove(),this.options.showZoom&&I.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&I.off("pitch",this._rotateCompassArrow),I.off("rotate",this._rotateCompassArrow),this._handler&&this._handler.off(),this._handler=void 0),this._map=void 0)}_createButton(I,h){const b=v("button",I,this._container);return b.type="button",b.addEventListener("click",h),b}_setButtonTitle(I,h){if(!this._map)return;const b=this._map._getUIString(`NavigationControl.${h}`);I.setAttribute("aria-label",b),I.firstElementChild&&I.firstElementChild.setAttribute("title",b)}},GeolocateControl:class extends s.Evented{constructor(I){super(),this.options=s.extend({geolocation:s.window.navigator.geolocation},g0,I),s.bindAll(["_onSuccess","_onError","_onZoom","_finish","_setupUI","_updateCamera","_updateMarker","_updateMarkerRotation","_onDeviceOrientation"],this),this._updateMarkerRotationThrottled=lg(this._updateMarkerRotation,20),this._numberOfWatches=0}onAdd(I){return this._map=I,this._container=v("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkGeolocationSupport(this._setupUI),this._container}onRemove(){this._geolocationWatchID!==void 0&&(this.options.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),this._container.remove(),this._map.off("zoom",this._onZoom),this._map=void 0,this._numberOfWatches=0,this._noTimeout=!1}_checkGeolocationSupport(I){const h=(b=!!this.options.geolocation)=>{this._supportsGeolocation=b,I(b)};this._supportsGeolocation!==void 0?I(this._supportsGeolocation):s.window.navigator.permissions!==void 0?s.window.navigator.permissions.query({name:"geolocation"}).then(b=>h(b.state!=="denied")).catch(()=>h()):h()}_isOutOfMapMaxBounds(I){const h=this._map.getMaxBounds(),b=I.coords;return!!h&&(b.longitude<h.getWest()||b.longitude>h.getEast()||b.latitude<h.getSouth()||b.latitude>h.getNorth())}_setErrorState(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting")}}_onSuccess(I){if(this._map){if(this._isOutOfMapMaxBounds(I))return this._setErrorState(),this.fire(new s.Event("outofmaxbounds",I)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=I,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background")}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(I),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(I),this.options.showUserLocation&&this._dotElement.classList.remove("mapboxgl-user-location-dot-stale"),this.fire(new s.Event("geolocate",I)),this._finish()}}_updateCamera(I){const h=new s.LngLat(I.coords.longitude,I.coords.latitude),b=I.coords.accuracy,R=this._map.getBearing(),U=s.extend({bearing:R},this.options.fitBoundsOptions);this._map.fitBounds(h.toBounds(b),U,{geolocateSource:!0})}_updateMarker(I){if(I){const h=new s.LngLat(I.coords.longitude,I.coords.latitude);this._accuracyCircleMarker.setLngLat(h).addTo(this._map),this._userLocationDotMarker.setLngLat(h).addTo(this._map),this._accuracy=I.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()}_updateCircleRadius(){const I=this._map.transform,h=s.mercatorZfromAltitude(1,I._center.lat)*I.worldSize,b=Math.ceil(2*this._accuracy*h);this._circleElement.style.width=`${b}px`,this._circleElement.style.height=`${b}px`}_onZoom(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}_updateMarkerRotation(){this._userLocationDotMarker&&typeof this._heading=="number"?(this._userLocationDotMarker.setRotation(this._heading),this._dotElement.classList.add("mapboxgl-user-location-show-heading")):(this._dotElement.classList.remove("mapboxgl-user-location-show-heading"),this._userLocationDotMarker.setRotation(0))}_onError(I){if(this._map){if(this.options.trackUserLocation)if(I.code===1){this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;const h=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.setAttribute("aria-label",h),this._geolocateButton.firstElementChild&&this._geolocateButton.firstElementChild.setAttribute("title",h),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(I.code===3&&this._noTimeout)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire(new s.Event("error",I)),this._finish()}}_finish(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0}_setupUI(I){if(this._map!==void 0){if(this._container.addEventListener("contextmenu",h=>h.preventDefault()),this._geolocateButton=v("button","mapboxgl-ctrl-geolocate",this._container),v("span","mapboxgl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",I===!1){s.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled.");const h=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.setAttribute("aria-label",h),this._geolocateButton.firstElementChild&&this._geolocateButton.firstElementChild.setAttribute("title",h)}else{const h=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.setAttribute("aria-label",h),this._geolocateButton.firstElementChild&&this._geolocateButton.firstElementChild.setAttribute("title",h)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=v("div","mapboxgl-user-location"),this._dotElement.appendChild(v("div","mapboxgl-user-location-dot")),this._dotElement.appendChild(v("div","mapboxgl-user-location-heading")),this._userLocationDotMarker=new mn({element:this._dotElement,rotationAlignment:"map",pitchAlignment:"map"}),this._circleElement=v("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new mn({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",this.trigger.bind(this)),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",h=>{h.geolocateSource||this._watchState!=="ACTIVE_LOCK"||h.originalEvent&&h.originalEvent.type==="resize"||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this.fire(new s.Event("trackuserlocationend")))})}}_onDeviceOrientation(I){this._userLocationDotMarker&&(I.webkitCompassHeading?this._heading=I.webkitCompassHeading:I.absolute===!0&&(this._heading=-1*I.alpha),this._updateMarkerRotationThrottled())}trigger(){if(!this._setup)return s.warnOnce("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new s.Event("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":this._numberOfWatches--,this._noTimeout=!1,this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this.fire(new s.Event("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new s.Event("trackuserlocationstart"))}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"BACKGROUND":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background");break;case"BACKGROUND_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error")}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){let I;this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),this._numberOfWatches++,this._numberOfWatches>1?(I={maximumAge:6e5,timeout:0},this._noTimeout=!0):(I=this.options.positionOptions,this._noTimeout=!1),this._geolocationWatchID=this.options.geolocation.watchPosition(this._onSuccess,this._onError,I),this.options.showUserHeading&&this._addDeviceOrientationListener()}}else this.options.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0}_addDeviceOrientationListener(){const I=()=>{s.window.addEventListener("ondeviceorientationabsolute"in s.window?"deviceorientationabsolute":"deviceorientation",this._onDeviceOrientation)};s.window.DeviceMotionEvent!==void 0&&typeof s.window.DeviceMotionEvent.requestPermission=="function"?DeviceOrientationEvent.requestPermission().then(h=>{h==="granted"&&I()}).catch(console.error):I()}_clearWatch(){this.options.geolocation.clearWatch(this._geolocationWatchID),s.window.removeEventListener("deviceorientation",this._onDeviceOrientation),s.window.removeEventListener("deviceorientationabsolute",this._onDeviceOrientation),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)}},AttributionControl:Sn,ScaleControl:class{constructor(I){this.options=s.extend({},v0,I),this._isNumberFormatSupported=function(){try{return new Intl.NumberFormat("en",{style:"unit",unitDisplay:"short",unit:"meter"}),!0}catch{return!1}}(),s.bindAll(["_update","_setScale","setUnit"],this)}getDefaultPosition(){return"bottom-left"}_update(){const I=this.options.maxWidth||100,h=this._map,b=h._containerHeight/2,R=h._containerWidth/2-I/2,U=h.unproject([R,b]),K=h.unproject([R+I,b]),ne=U.distanceTo(K);if(this.options.unit==="imperial"){const ae=3.2808*ne;ae>5280?this._setScale(I,ae/5280,"mile"):this._setScale(I,ae,"foot")}else this.options.unit==="nautical"?this._setScale(I,ne/1852,"nautical-mile"):ne>=1e3?this._setScale(I,ne/1e3,"kilometer"):this._setScale(I,ne,"meter")}_setScale(I,h,b){this._map._requestDomTask(()=>{const R=function(K){const ne=Math.pow(10,`${Math.floor(K)}`.length-1);let ae=K/ne;return ae=ae>=10?10:ae>=5?5:ae>=3?3:ae>=2?2:ae>=1?1:function(he){const be=Math.pow(10,Math.ceil(-Math.log(he)/Math.LN10));return Math.round(he*be)/be}(ae),ne*ae}(h),U=R/h;this._container.innerHTML=this._isNumberFormatSupported&&b!=="nautical-mile"?new Intl.NumberFormat(this._language,{style:"unit",unitDisplay:"short",unit:b}).format(R):`${R} ${U_[b]}`,this._container.style.width=I*U+"px"})}onAdd(I){return this._map=I,this._language=I.getLanguage(),this._container=v("div","mapboxgl-ctrl mapboxgl-ctrl-scale",I.getContainer()),this._container.dir="auto",this._map.on("move",this._update),this._update(),this._container}onRemove(){this._container.remove(),this._map.off("move",this._update),this._map=void 0}_setLanguage(I){this._language=I,this._update()}setUnit(I){this.options.unit=I,this._update()}},FullscreenControl:class{constructor(I){this._fullscreen=!1,I&&I.container&&(I.container instanceof s.window.HTMLElement?this._container=I.container:s.warnOnce("Full screen control 'container' must be a DOM element.")),s.bindAll(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in s.window.document?this._fullscreenchange="fullscreenchange":"onwebkitfullscreenchange"in s.window.document&&(this._fullscreenchange="webkitfullscreenchange")}onAdd(I){return this._map=I,this._container||(this._container=this._map.getContainer()),this._controlContainer=v("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",s.warnOnce("This device does not support fullscreen mode.")),this._controlContainer}onRemove(){this._controlContainer.remove(),this._map=null,s.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)}_checkFullscreenSupport(){return!(!s.window.document.fullscreenEnabled&&!s.window.document.webkitFullscreenEnabled)}_setupUI(){const I=this._fullscreenButton=v("button","mapboxgl-ctrl-fullscreen",this._controlContainer);v("span","mapboxgl-ctrl-icon",I).setAttribute("aria-hidden","true"),I.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),s.window.document.addEventListener(this._fullscreenchange,this._changeIcon)}_updateTitle(){const I=this._getTitle();this._fullscreenButton.setAttribute("aria-label",I),this._fullscreenButton.firstElementChild&&this._fullscreenButton.firstElementChild.setAttribute("title",I)}_getTitle(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")}_isFullscreen(){return this._fullscreen}_changeIcon(){(s.window.document.fullscreenElement||s.window.document.webkitFullscreenElement)===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("mapboxgl-ctrl-shrink"),this._fullscreenButton.classList.toggle("mapboxgl-ctrl-fullscreen"),this._updateTitle())}_onClickFullscreen(){this._isFullscreen()?s.window.document.exitFullscreen?s.window.document.exitFullscreen():s.window.document.webkitCancelFullScreen&&s.window.document.webkitCancelFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.webkitRequestFullscreen&&this._container.webkitRequestFullscreen()}},Popup:class extends s.Evented{constructor(I){super(),this.options=s.extend(Object.create(B_),I),s.bindAll(["_update","_onClose","remove","_onMouseEvent"],this),this._classList=new Set(I&&I.className?I.className.trim().split(/\s+/):[])}addTo(I){return this._map&&this.remove(),this._map=I,this.options.closeOnClick&&I.on("preclick",this._onClose),this.options.closeOnMove&&I.on("move",this._onClose),I.on("remove",this.remove),this._update(),I._addPopup(this),this._focusFirstElement(),this._trackPointer?(I.on("mousemove",this._onMouseEvent),I.on("mouseup",this._onMouseEvent),I._canvasContainer.classList.add("mapboxgl-track-pointer")):I.on("move",this._update),this.fire(new s.Event("open")),this}isOpen(){return!!this._map}remove(){this._content&&this._content.remove(),this._container&&(this._container.remove(),this._container=void 0);const I=this._map;return I&&(I.off("move",this._update),I.off("move",this._onClose),I.off("preclick",this._onClose),I.off("click",this._onClose),I.off("remove",this.remove),I.off("mousemove",this._onMouseEvent),I.off("mouseup",this._onMouseEvent),I.off("drag",this._onMouseEvent),I._canvasContainer&&I._canvasContainer.classList.remove("mapboxgl-track-pointer"),I._removePopup(this),this._map=void 0),this.fire(new s.Event("close")),this}getLngLat(){return this._lngLat}setLngLat(I){this._lngLat=s.LngLat.convert(I),this._pos=null,this._trackPointer=!1,this._update();const h=this._map;return h&&(h.on("move",this._update),h.off("mousemove",this._onMouseEvent),h._canvasContainer.classList.remove("mapboxgl-track-pointer")),this}trackPointer(){this._trackPointer=!0,this._pos=null,this._update();const I=this._map;return I&&(I.off("move",this._update),I.on("mousemove",this._onMouseEvent),I.on("drag",this._onMouseEvent),I._canvasContainer.classList.add("mapboxgl-track-pointer")),this}getElement(){return this._container}setText(I){return this.setDOMContent(s.window.document.createTextNode(I))}setHTML(I){const h=s.window.document.createDocumentFragment(),b=s.window.document.createElement("body");let R;for(b.innerHTML=I;R=b.firstChild,R;)h.appendChild(R);return this.setDOMContent(h)}getMaxWidth(){return this._container&&this._container.style.maxWidth}setMaxWidth(I){return this.options.maxWidth=I,this._update(),this}setDOMContent(I){let h=this._content;if(h)for(;h.hasChildNodes();)h.firstChild&&h.removeChild(h.firstChild);else h=this._content=v("div","mapboxgl-popup-content",this._container||void 0);if(h.appendChild(I),this.options.closeButton){const b=this._closeButton=v("button","mapboxgl-popup-close-button",h);b.type="button",b.setAttribute("aria-label","Close popup"),b.setAttribute("aria-hidden","true"),b.innerHTML="×",b.addEventListener("click",this._onClose)}return this._update(),this._focusFirstElement(),this}addClassName(I){return this._classList.add(I),this._updateClassList(),this}removeClassName(I){return this._classList.delete(I),this._updateClassList(),this}setOffset(I){return this.options.offset=I,this._update(),this}toggleClassName(I){let h;return this._classList.delete(I)?h=!1:(this._classList.add(I),h=!0),this._updateClassList(),h}_onMouseEvent(I){this._update(I.point)}_getAnchor(I){if(this.options.anchor)return this.options.anchor;const h=this._map,b=this._container,R=this._pos;if(!h||!b||!R)return"bottom";const U=b.offsetWidth,K=b.offsetHeight,ne=R.x<U/2,ae=R.x>h.transform.width-U/2;if(R.y+I<K)return ne?"top-left":ae?"top-right":"top";if(R.y>h.transform.height-K){if(ne)return"bottom-left";if(ae)return"bottom-right"}return ne?"left":ae?"right":"bottom"}_updateClassList(){const I=this._container;if(!I)return;const h=[...this._classList];h.push("mapboxgl-popup"),this._anchor&&h.push(`mapboxgl-popup-anchor-${this._anchor}`),this._trackPointer&&h.push("mapboxgl-popup-track-pointer"),I.className=h.join(" ")}_update(I){const h=this._map,b=this._content;if(!h||!this._lngLat&&!this._trackPointer||!b)return;let R=this._container;if(R||(R=this._container=v("div","mapboxgl-popup",h.getContainer()),this._tip=v("div","mapboxgl-popup-tip",R),R.appendChild(b)),this.options.maxWidth&&R.style.maxWidth!==this.options.maxWidth&&(R.style.maxWidth=this.options.maxWidth),h.transform.renderWorldCopies&&!this._trackPointer&&(this._lngLat=hg(this._lngLat,this._pos,h.transform)),!this._trackPointer||I){const U=this._pos=this._trackPointer&&I?I:h.project(this._lngLat),K=cu(this.options.offset),ne=this._anchor=this._getAnchor(K.y),ae=cu(this.options.offset,ne),he=U.add(ae).round();h._requestDomTask(()=>{this._container&&ne&&(this._container.style.transform=`${em[ne]} translate(${he.x}px,${he.y}px)`)})}if(!this._marker&&h._showingGlobe()){const U=s.isLngLatBehindGlobe(h.transform,this._lngLat)?0:1;this._setOpacity(U)}this._updateClassList()}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;const I=this._container.querySelector(_S);I&&I.focus()}_onClose(){this.remove()}_setOpacity(I){this._container&&(this._container.style.opacity=`${I}`),this._content&&(this._content.style.pointerEvents=I?"auto":"none")}},Marker:mn,Style:Yo,LngLat:s.LngLat,LngLatBounds:s.LngLatBounds,Point:s.Point,MercatorCoordinate:s.MercatorCoordinate,FreeCameraOptions:k_,Evented:s.Evented,config:s.config,prewarm:function(){Xr().acquire(Gt)},clearPrewarmedResources:function(){const I=Br;I&&(I.isPreloaded()&&I.numActive()===1?(I.release(Gt),Br=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},get accessToken(){return s.config.ACCESS_TOKEN},set accessToken(I){s.config.ACCESS_TOKEN=I},get baseApiUrl(){return s.config.API_URL},set baseApiUrl(I){s.config.API_URL=I},get workerCount(){return Ir.workerCount},set workerCount(I){Ir.workerCount=I},get maxParallelImageRequests(){return s.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(I){s.config.MAX_PARALLEL_IMAGE_REQUESTS=I},clearStorage(I){s.clearTileCache(I)},workerUrl:"",workerClass:null,setNow:s.exported.setNow,restoreNow:s.exported.restoreNow};return pg});var a=i;return a})})($V);var Fgt=Tk($V.exports),zgt=hz({__proto__:null,default:Fgt},[$V.exports]);function Bgt(t){var e=Y.exports.useRef(t),r=Y.exports.useRef(0);return vC(t,e.current)||(e.current=t,r.current+=1),Y.exports.useMemo(function(){return e.current},[r.current])}function Vkt(t,e){return Y.exports.useEffect(t,Bgt(e))}var jgt={black:"#000",white:"#fff"},p5=jgt,Ugt={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},FV=Ugt,Vgt={50:"#fce4ec",100:"#f8bbd0",200:"#f48fb1",300:"#f06292",400:"#ec407a",500:"#e91e63",600:"#d81b60",700:"#c2185b",800:"#ad1457",900:"#880e4f",A100:"#ff80ab",A200:"#ff4081",A400:"#f50057",A700:"#c51162"},zV=Vgt,Hgt={50:"#e8eaf6",100:"#c5cae9",200:"#9fa8da",300:"#7986cb",400:"#5c6bc0",500:"#3f51b5",600:"#3949ab",700:"#303f9f",800:"#283593",900:"#1a237e",A100:"#8c9eff",A200:"#536dfe",A400:"#3d5afe",A700:"#304ffe"},BV=Hgt,Wgt={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},jV=Wgt,Ggt={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},UV=Ggt,qgt={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},VV=qgt,Xgt={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#d5d5d5",A200:"#aaaaaa",A400:"#303030",A700:"#616161"},HV=Xgt;function WV(t){return t&&A1(t)==="object"&&t.constructor===Object}function yE(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{clone:!0},n=r.clone?vt({},t):t;return WV(t)&&WV(e)&&Object.keys(e).forEach(function(i){i!=="__proto__"&&(WV(e[i])&&i in t?n[i]=yE(t[i],e[i],r):n[i]=e[i])}),n}function m5(t){for(var e="https://material-ui.com/production-error/?code="+t,r=1;r<arguments.length;r+=1)e+="&args[]="+encodeURIComponent(arguments[r]);return"Minified Material-UI error #"+t+"; visit "+e+" for the full message."}function Ffe(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1;return Math.min(Math.max(e,t),r)}function Ygt(t){t=t.substr(1);var e=new RegExp(".{1,".concat(t.length>=6?2:1,"}"),"g"),r=t.match(e);return r&&r[0].length===1&&(r=r.map(function(n){return n+n})),r?"rgb".concat(r.length===4?"a":"","(").concat(r.map(function(n,i){return i<3?parseInt(n,16):Math.round(parseInt(n,16)/255*1e3)/1e3}).join(", "),")"):""}function Kgt(t){t=xE(t);var e=t,r=e.values,n=r[0],i=r[1]/100,o=r[2]/100,a=i*Math.min(o,1-o),s=function(m){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:(m+n/30)%12;return o-a*Math.max(Math.min(v-3,9-v,1),-1)},l="rgb",u=[Math.round(s(0)*255),Math.round(s(8)*255),Math.round(s(4)*255)];return t.type==="hsla"&&(l+="a",u.push(r[3])),GV({type:l,values:u})}function xE(t){if(t.type)return t;if(t.charAt(0)==="#")return xE(Ygt(t));var e=t.indexOf("("),r=t.substring(0,e);if(["rgb","rgba","hsl","hsla"].indexOf(r)===-1)throw new Error(m5(3,t));var n=t.substring(e+1,t.length-1).split(",");return n=n.map(function(i){return parseFloat(i)}),{type:r,values:n}}function GV(t){var e=t.type,r=t.values;return e.indexOf("rgb")!==-1?r=r.map(function(n,i){return i<3?parseInt(n,10):n}):e.indexOf("hsl")!==-1&&(r[1]="".concat(r[1],"%"),r[2]="".concat(r[2],"%")),"".concat(e,"(").concat(r.join(", "),")")}function Zgt(t,e){var r=zfe(t),n=zfe(e);return(Math.max(r,n)+.05)/(Math.min(r,n)+.05)}function zfe(t){t=xE(t);var e=t.type==="hsl"?xE(Kgt(t)).values:t.values;return e=e.map(function(r){return r/=255,r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4)}),Number((.2126*e[0]+.7152*e[1]+.0722*e[2]).toFixed(3))}function Qgt(t,e){if(t=xE(t),e=Ffe(e),t.type.indexOf("hsl")!==-1)t.values[2]*=1-e;else if(t.type.indexOf("rgb")!==-1)for(var r=0;r<3;r+=1)t.values[r]*=1-e;return GV(t)}function Jgt(t,e){if(t=xE(t),e=Ffe(e),t.type.indexOf("hsl")!==-1)t.values[2]+=(100-t.values[2])*e;else if(t.type.indexOf("rgb")!==-1)for(var r=0;r<3;r+=1)t.values[r]+=(255-t.values[r])*e;return GV(t)}var t_=["xs","sm","md","lg","xl"];function evt(t){var e=t.values,r=e===void 0?{xs:0,sm:600,md:960,lg:1280,xl:1920}:e,n=t.unit,i=n===void 0?"px":n,o=t.step,a=o===void 0?5:o,s=nn(t,["values","unit","step"]);function l(x){var y=typeof r[x]=="number"?r[x]:x;return"@media (min-width:".concat(y).concat(i,")")}function u(x){var y=t_.indexOf(x)+1,_=r[t_[y]];if(y===t_.length)return l("xs");var w=typeof _=="number"&&y>0?_:x;return"@media (max-width:".concat(w-a/100).concat(i,")")}function p(x,y){var _=t_.indexOf(y);return _===t_.length-1?l(x):"@media (min-width:".concat(typeof r[x]=="number"?r[x]:x).concat(i,") and ")+"(max-width:".concat((_!==-1&&typeof r[t_[_+1]]=="number"?r[t_[_+1]]:y)-a/100).concat(i,")")}function m(x){return p(x,x)}function v(x){return r[x]}return vt({keys:t_,values:r,up:l,down:u,between:p,only:m,width:v},s)}function tvt(t,e,r){var n;return vt({gutters:function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return console.warn(["Material-UI: theme.mixins.gutters() is deprecated.","You can use the source of the mixin directly:",` paddingLeft: theme.spacing(2), paddingRight: theme.spacing(2), [theme.breakpoints.up('sm')]: { paddingLeft: theme.spacing(3), paddingRight: theme.spacing(3), }, `].join(` `)),vt({paddingLeft:e(2),paddingRight:e(2)},o,Fi({},t.up("sm"),vt({paddingLeft:e(3),paddingRight:e(3)},o[t.up("sm")])))},toolbar:(n={minHeight:56},Fi(n,"".concat(t.up("xs")," and (orientation: landscape)"),{minHeight:48}),Fi(n,t.up("sm"),{minHeight:64}),n)},r)}var Bfe={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.54)",disabled:"rgba(0, 0, 0, 0.38)",hint:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:p5.white,default:HV[50]},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},qV={text:{primary:p5.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",hint:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:HV[800],default:"#303030"},action:{active:p5.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function jfe(t,e,r,n){var i=n.light||n,o=n.dark||n*1.5;t[e]||(t.hasOwnProperty(r)?t[e]=t[r]:e==="light"?t.light=Jgt(t.main,i):e==="dark"&&(t.dark=Qgt(t.main,o)))}function rvt(t){var e=t.primary,r=e===void 0?{light:BV[300],main:BV[500],dark:BV[700]}:e,n=t.secondary,i=n===void 0?{light:zV.A200,main:zV.A400,dark:zV.A700}:n,o=t.error,a=o===void 0?{light:FV[300],main:FV[500],dark:FV[700]}:o,s=t.warning,l=s===void 0?{light:VV[300],main:VV[500],dark:VV[700]}:s,u=t.info,p=u===void 0?{light:jV[300],main:jV[500],dark:jV[700]}:u,m=t.success,v=m===void 0?{light:UV[300],main:UV[500],dark:UV[700]}:m,x=t.type,y=x===void 0?"light":x,_=t.contrastThreshold,w=_===void 0?3:_,C=t.tonalOffset,E=C===void 0?.2:C,T=nn(t,["primary","secondary","error","warning","info","success","type","contrastThreshold","tonalOffset"]);function A(W){var D=Zgt(W,qV.text.primary)>=w?qV.text.primary:Bfe.text.primary;return D}var k=function(D){var H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:500,N=arguments.length>2&&arguments[2]!==void 0?arguments[2]:300,j=arguments.length>3&&arguments[3]!==void 0?arguments[3]:700;if(D=vt({},D),!D.main&&D[H]&&(D.main=D[H]),!D.main)throw new Error(m5(4,H));if(typeof D.main!="string")throw new Error(m5(5,JSON.stringify(D.main)));return jfe(D,"light",N,E),jfe(D,"dark",j,E),D.contrastText||(D.contrastText=A(D.main)),D},X={dark:qV,light:Bfe},Z=yE(vt({common:p5,type:y,primary:k(r),secondary:k(i,"A400","A200","A700"),error:k(a),warning:k(l),info:k(p),success:k(v),grey:HV,contrastThreshold:w,getContrastText:A,augmentColor:k,tonalOffset:E},X[y]),T);return Z}function Ufe(t){return Math.round(t*1e5)/1e5}function nvt(t){return Ufe(t)}var Vfe={textTransform:"uppercase"},Hfe='"Roboto", "Helvetica", "Arial", sans-serif';function ivt(t,e){var r=typeof e=="function"?e(t):e,n=r.fontFamily,i=n===void 0?Hfe:n,o=r.fontSize,a=o===void 0?14:o,s=r.fontWeightLight,l=s===void 0?300:s,u=r.fontWeightRegular,p=u===void 0?400:u,m=r.fontWeightMedium,v=m===void 0?500:m,x=r.fontWeightBold,y=x===void 0?700:x,_=r.htmlFontSize,w=_===void 0?16:_,C=r.allVariants,E=r.pxToRem,T=nn(r,["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"]),A=a/14,k=E||function(W){return"".concat(W/w*A,"rem")},X=function(D,H,N,j,$){return vt({fontFamily:i,fontWeight:D,fontSize:k(H),lineHeight:N},i===Hfe?{letterSpacing:"".concat(Ufe(j/H),"em")}:{},$,C)},Z={h1:X(l,96,1.167,-1.5),h2:X(l,60,1.2,-.5),h3:X(p,48,1.167,0),h4:X(p,34,1.235,.25),h5:X(p,24,1.334,0),h6:X(v,20,1.6,.15),subtitle1:X(p,16,1.75,.15),subtitle2:X(v,14,1.57,.1),body1:X(p,16,1.5,.15),body2:X(p,14,1.43,.15),button:X(v,14,1.75,.4,Vfe),caption:X(p,12,1.66,.4),overline:X(p,12,2.66,1,Vfe)};return yE(vt({htmlFontSize:w,pxToRem:k,round:nvt,fontFamily:i,fontSize:a,fontWeightLight:l,fontWeightRegular:p,fontWeightMedium:v,fontWeightBold:y},Z),T,{clone:!1})}var ovt=.2,svt=.14,avt=.12;function Oa(){return["".concat(arguments.length<=0?void 0:arguments[0],"px ").concat(arguments.length<=1?void 0:arguments[1],"px ").concat(arguments.length<=2?void 0:arguments[2],"px ").concat(arguments.length<=3?void 0:arguments[3],"px rgba(0,0,0,").concat(ovt,")"),"".concat(arguments.length<=4?void 0:arguments[4],"px ").concat(arguments.length<=5?void 0:arguments[5],"px ").concat(arguments.length<=6?void 0:arguments[6],"px ").concat(arguments.length<=7?void 0:arguments[7],"px rgba(0,0,0,").concat(svt,")"),"".concat(arguments.length<=8?void 0:arguments[8],"px ").concat(arguments.length<=9?void 0:arguments[9],"px ").concat(arguments.length<=10?void 0:arguments[10],"px ").concat(arguments.length<=11?void 0:arguments[11],"px rgba(0,0,0,").concat(avt,")")].join(",")}var lvt=["none",Oa(0,2,1,-1,0,1,1,0,0,1,3,0),Oa(0,3,1,-2,0,2,2,0,0,1,5,0),Oa(0,3,3,-2,0,3,4,0,0,1,8,0),Oa(0,2,4,-1,0,4,5,0,0,1,10,0),Oa(0,3,5,-1,0,5,8,0,0,1,14,0),Oa(0,3,5,-1,0,6,10,0,0,1,18,0),Oa(0,4,5,-2,0,7,10,1,0,2,16,1),Oa(0,5,5,-3,0,8,10,1,0,3,14,2),Oa(0,5,6,-3,0,9,12,1,0,3,16,2),Oa(0,6,6,-3,0,10,14,1,0,4,18,3),Oa(0,6,7,-4,0,11,15,1,0,4,20,3),Oa(0,7,8,-4,0,12,17,2,0,5,22,4),Oa(0,7,8,-4,0,13,19,2,0,5,24,4),Oa(0,7,9,-4,0,14,21,2,0,5,26,4),Oa(0,8,9,-5,0,15,22,2,0,6,28,5),Oa(0,8,10,-5,0,16,24,2,0,6,30,5),Oa(0,8,11,-5,0,17,26,2,0,6,32,5),Oa(0,9,11,-5,0,18,28,2,0,7,34,6),Oa(0,9,12,-6,0,19,29,2,0,7,36,6),Oa(0,10,13,-6,0,20,31,3,0,8,38,7),Oa(0,10,13,-6,0,21,33,3,0,8,40,7),Oa(0,10,14,-6,0,22,35,3,0,8,42,7),Oa(0,11,14,-7,0,23,36,3,0,9,44,8),Oa(0,11,15,-7,0,24,38,3,0,9,46,8)],cvt=lvt,uvt={borderRadius:4},fvt=uvt;function dvt(t){var e=t.spacing||8;return typeof e=="number"?function(r){return e*r}:Array.isArray(e)?function(r){return e[r]}:typeof e=="function"?e:function(){}}function hvt(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:8;if(t.mui)return t;var e=dvt({spacing:t}),r=function(){for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return o.length===0?e(1):o.length===1?e(o[0]):o.map(function(s){if(typeof s=="string")return s;var l=e(s);return typeof l=="number"?"".concat(l,"px"):l}).join(" ")};return Object.defineProperty(r,"unit",{get:function(){return t}}),r.mui=!0,r}var Wfe={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},Gfe={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function qfe(t){return"".concat(Math.round(t),"ms")}var pvt={easing:Wfe,duration:Gfe,create:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:["all"],r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=r.duration,i=n===void 0?Gfe.standard:n,o=r.easing,a=o===void 0?Wfe.easeInOut:o,s=r.delay,l=s===void 0?0:s;return nn(r,["duration","easing","delay"]),(Array.isArray(e)?e:[e]).map(function(u){return"".concat(u," ").concat(typeof i=="string"?i:qfe(i)," ").concat(a," ").concat(typeof l=="string"?l:qfe(l))}).join(",")},getAutoHeightDuration:function(e){if(!e)return 0;var r=e/36;return Math.round((4+15*Math.pow(r,.25)+r/5)*10)}},mvt={mobileStepper:1e3,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},gvt=mvt;function vvt(){for(var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=t.breakpoints,r=e===void 0?{}:e,n=t.mixins,i=n===void 0?{}:n,o=t.palette,a=o===void 0?{}:o,s=t.spacing,l=t.typography,u=l===void 0?{}:l,p=nn(t,["breakpoints","mixins","palette","spacing","typography"]),m=rvt(a),v=evt(r),x=hvt(s),y=yE({breakpoints:v,direction:"ltr",mixins:tvt(v,x,i),overrides:{},palette:m,props:{},shadows:cvt,typography:ivt(m,u),spacing:x,shape:fvt,transitions:pvt,zIndex:gvt},p),_=arguments.length,w=new Array(_>1?_-1:0),C=1;C<_;C++)w[C-1]=arguments[C];return y=w.reduce(function(E,T){return yE(E,T)},y),y}var yvt=typeof Symbol=="function"&&Symbol.for,xvt=yvt?Symbol.for("mui.nested"):"__THEME_NESTED__",_vt=["checked","disabled","error","focused","focusVisible","required","expanded","selected"];function bvt(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=t.disableGlobal,r=e===void 0?!1:e,n=t.productionPrefix,i=n===void 0?"jss":n,o=t.seed,a=o===void 0?"":o,s=a===""?"":"".concat(a,"-"),l=0,u=function(){return l+=1,l};return function(p,m){var v=m.options.name;if(v&&v.indexOf("Mui")===0&&!m.options.link&&!r){if(_vt.indexOf(p.key)!==-1)return"Mui-".concat(p.key);var x="".concat(s).concat(v,"-").concat(p.key);return!m.options.theme[xvt]||a!==""?x:"".concat(x,"-").concat(u())}return"".concat(s).concat(i).concat(u())}}function wvt(t){var e=t.theme,r=t.name,n=t.props;if(!e||!e.props||!e.props[r])return n;var i=e.props[r],o;for(o in i)n[o]===void 0&&(n[o]=i[o]);return n}function Cvt(){return{plugins:[aQ(),cQ(),fQ(),hQ(),mQ(),typeof window=="undefined"?null:wQ(),CQ()]}}function Xfe(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=t.baseClasses,r=t.newClasses;if(t.Component,!r)return e;var n=vt({},e);return Object.keys(r).forEach(function(i){r[i]&&(n[i]="".concat(e[i]," ").concat(r[i]))}),n}var Evt={set:function(e,r,n,i){var o=e.get(r);o||(o=new Map,e.set(r,o)),o.set(n,i)},get:function(e,r,n){var i=e.get(r);return i?i.get(n):void 0},delete:function(e,r,n){var i=e.get(r);i.delete(n)}},_E=Evt,Svt=Or.createContext(null),Tvt=Svt;function Yfe(){var t=Or.useContext(Tvt);return t}var Pvt=x8(Cvt()),Ivt=bvt(),Mvt=new Map,Avt={disableGeneration:!1,generateClassName:Ivt,jss:Pvt,sheetsCache:null,sheetsManager:Mvt,sheetsRegistry:null},Rvt=Or.createContext(Avt),Kfe=-1e9;function kvt(){return Kfe+=1,Kfe}var Ovt={},Lvt=Ovt;function Dvt(t){var e=typeof t=="function";return{create:function(n,i){var o;try{o=e?t(n):t}catch(l){throw l}if(!i||!n.overrides||!n.overrides[i])return o;var a=n.overrides[i],s=vt({},o);return Object.keys(a).forEach(function(l){s[l]=yE(s[l],a[l])}),s},options:{}}}function Nvt(t,e,r){var n=t.state,i=t.stylesOptions;if(i.disableGeneration)return e||{};n.cacheClasses||(n.cacheClasses={value:null,lastProp:null,lastJSS:{}});var o=!1;return n.classes!==n.cacheClasses.lastJSS&&(n.cacheClasses.lastJSS=n.classes,o=!0),e!==n.cacheClasses.lastProp&&(n.cacheClasses.lastProp=e,o=!0),o&&(n.cacheClasses.value=Xfe({baseClasses:n.cacheClasses.lastJSS,newClasses:e,Component:r})),n.cacheClasses.value}function $vt(t,e){var r=t.state,n=t.theme,i=t.stylesOptions,o=t.stylesCreator,a=t.name;if(!i.disableGeneration){var s=_E.get(i.sheetsManager,o,n);s||(s={refs:0,staticSheet:null,dynamicStyles:null},_E.set(i.sheetsManager,o,n,s));var l=vt({},o.options,i,{theme:n,flip:typeof i.flip=="boolean"?i.flip:n.direction==="rtl"});l.generateId=l.serverGenerateClassName||l.generateClassName;var u=i.sheetsRegistry;if(s.refs===0){var p;i.sheetsCache&&(p=_E.get(i.sheetsCache,o,n));var m=o.create(n,a);p||(p=i.jss.createStyleSheet(m,vt({link:!1},l)),p.attach(),i.sheetsCache&&_E.set(i.sheetsCache,o,n,p)),u&&u.add(p),s.staticSheet=p,s.dynamicStyles=b8(m)}if(s.dynamicStyles){var v=i.jss.createStyleSheet(s.dynamicStyles,vt({link:!0},l));v.update(e),v.attach(),r.dynamicSheet=v,r.classes=Xfe({baseClasses:s.staticSheet.classes,newClasses:v.classes}),u&&u.add(v)}else r.classes=s.staticSheet.classes;s.refs+=1}}function Fvt(t,e){var r=t.state;r.dynamicSheet&&r.dynamicSheet.update(e)}function zvt(t){var e=t.state,r=t.theme,n=t.stylesOptions,i=t.stylesCreator;if(!n.disableGeneration){var o=_E.get(n.sheetsManager,i,r);o.refs-=1;var a=n.sheetsRegistry;o.refs===0&&(_E.delete(n.sheetsManager,i,r),n.jss.removeStyleSheet(o.staticSheet),a&&a.remove(o.staticSheet)),e.dynamicSheet&&(n.jss.removeStyleSheet(e.dynamicSheet),a&&a.remove(e.dynamicSheet))}}function Bvt(t,e){var r=Or.useRef([]),n,i=Or.useMemo(function(){return{}},e);r.current!==i&&(r.current=i,n=t()),Or.useEffect(function(){return function(){n&&n()}},[i])}function Zfe(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=e.name,n=e.classNamePrefix,i=e.Component,o=e.defaultTheme,a=o===void 0?Lvt:o,s=nn(e,["name","classNamePrefix","Component","defaultTheme"]),l=Dvt(t),u=r||n||"makeStyles";l.options={index:kvt(),name:r,meta:u,classNamePrefix:u};var p=function(){var v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},x=Yfe()||a,y=vt({},Or.useContext(Rvt),s),_=Or.useRef(),w=Or.useRef();Bvt(function(){var E={name:r,state:{},stylesCreator:l,stylesOptions:y,theme:x};return $vt(E,v),w.current=!1,_.current=E,function(){zvt(E)}},[x,l]),Or.useEffect(function(){w.current&&Fvt(_.current,v),w.current=!0});var C=Nvt(_.current,v.classes,i);return C};return p}var jvt=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function(n){var i=r.defaultTheme,o=r.withTheme,a=o===void 0?!1:o,s=r.name,l=nn(r,["defaultTheme","withTheme","name"]),u=s,p=Zfe(e,vt({defaultTheme:i,Component:n,name:s||n.displayName,classNamePrefix:u},l)),m=Or.forwardRef(function(x,y){x.classes;var _=x.innerRef,w=nn(x,["classes","innerRef"]),C=p(vt({},n.defaultProps,x)),E,T=w;return(typeof s=="string"||a)&&(E=Yfe()||i,s&&(T=wvt({theme:E,name:s,props:w})),a&&!T.theme&&(T.theme=E)),Or.createElement(n,vt({ref:_||y,classes:C},T))});return D2(m,n),m}},Uvt=jvt,Vvt=vvt(),Qfe=Vvt;function Hkt(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Zfe(t,vt({defaultTheme:Qfe},e))}function Hvt(t,e){return Uvt(t,vt({defaultTheme:Qfe},e))}function XV(t){if(typeof t!="string")throw new Error(m5(7));return t.charAt(0).toUpperCase()+t.slice(1)}var Wvt=function(e){return{root:{margin:0},body2:e.typography.body2,body1:e.typography.body1,caption:e.typography.caption,button:e.typography.button,h1:e.typography.h1,h2:e.typography.h2,h3:e.typography.h3,h4:e.typography.h4,h5:e.typography.h5,h6:e.typography.h6,subtitle1:e.typography.subtitle1,subtitle2:e.typography.subtitle2,overline:e.typography.overline,srOnly:{position:"absolute",height:1,width:1,overflow:"hidden"},alignLeft:{textAlign:"left"},alignCenter:{textAlign:"center"},alignRight:{textAlign:"right"},alignJustify:{textAlign:"justify"},noWrap:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},gutterBottom:{marginBottom:"0.35em"},paragraph:{marginBottom:16},colorInherit:{color:"inherit"},colorPrimary:{color:e.palette.primary.main},colorSecondary:{color:e.palette.secondary.main},colorTextPrimary:{color:e.palette.text.primary},colorTextSecondary:{color:e.palette.text.secondary},colorError:{color:e.palette.error.main},displayInline:{display:"inline"},displayBlock:{display:"block"}}},Jfe={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p"},Gvt=Y.exports.forwardRef(function(e,r){var n=e.align,i=n===void 0?"inherit":n,o=e.classes,a=e.className,s=e.color,l=s===void 0?"initial":s,u=e.component,p=e.display,m=p===void 0?"initial":p,v=e.gutterBottom,x=v===void 0?!1:v,y=e.noWrap,_=y===void 0?!1:y,w=e.paragraph,C=w===void 0?!1:w,E=e.variant,T=E===void 0?"body1":E,A=e.variantMapping,k=A===void 0?Jfe:A,X=nn(e,["align","classes","className","color","component","display","gutterBottom","noWrap","paragraph","variant","variantMapping"]),Z=u||(C?"p":k[T]||Jfe[T])||"span";return Y.exports.createElement(Z,vt({className:Lr(o.root,a,T!=="inherit"&&o[T],l!=="initial"&&o["color".concat(XV(l))],_&&o.noWrap,x&&o.gutterBottom,C&&o.paragraph,i!=="inherit"&&o["align".concat(XV(i))],m!=="initial"&&o["display".concat(XV(m))]),ref:r},X))}),Wkt=Hvt(Wvt,{name:"MuiTypography"})(Gvt),qvt="Expected a function";function Xvt(t){if(typeof t!="function")throw new TypeError(qvt);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}var Yvt=Xvt,Kvt=ZP,Zvt=ace,Qvt=aC;function Jvt(t,e,r){for(var n=-1,i=e.length,o={};++n<i;){var a=e[n],s=Kvt(t,a);r(s,a)&&Zvt(o,Qvt(a,t),s)}return o}var eyt=Jvt,tyt=KP,ryt=W1,nyt=eyt,iyt=W7;function oyt(t,e){if(t==null)return{};var r=tyt(iyt(t),function(n){return[n]});return e=ryt(e),nyt(t,r,function(n,i){return e(n,i[0])})}var syt=oyt,ayt=W1,lyt=Yvt,cyt=syt;function uyt(t,e){return cyt(t,lyt(ayt(e)))}var Gkt=uyt;function fyt(t,e){var r=t.getCenter(),n=t.getZoom(),i=t.getBearing(),o=t.getPitch();e.forEach(function(a){a.jumpTo({center:r,zoom:n,bearing:i,pitch:o})})}function dyt(){var t,e=arguments.length;if(e===1)t=arguments[0];else{t=[];for(var r=0;r<e;r++)t.push(arguments[r])}var n=[];t.forEach(function(s,l){n[l]=a.bind(null,s,t.filter(function(u,p){return p!==l}))});function i(){t.forEach(function(s,l){s.on("move",n[l])})}function o(){t.forEach(function(s,l){s.off("move",n[l])})}function a(s,l){o(),fyt(s,l),i()}return i(),function(){o(),n=[]}}var qkt=dyt,ede={exports:{}},bE=typeof Reflect=="object"?Reflect:null,tde=bE&&typeof bE.apply=="function"?bE.apply:function(e,r,n){return Function.prototype.apply.call(e,r,n)},g5;bE&&typeof bE.ownKeys=="function"?g5=bE.ownKeys:Object.getOwnPropertySymbols?g5=function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:g5=function(e){return Object.getOwnPropertyNames(e)};function hyt(t){console&&console.warn&&console.warn(t)}var rde=Number.isNaN||function(e){return e!==e};function Os(){Os.init.call(this)}ede.exports=Os;ede.exports.once=vyt;Os.EventEmitter=Os;Os.prototype._events=void 0;Os.prototype._eventsCount=0;Os.prototype._maxListeners=void 0;var nde=10;function v5(t){if(typeof t!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}Object.defineProperty(Os,"defaultMaxListeners",{enumerable:!0,get:function(){return nde},set:function(t){if(typeof t!="number"||t<0||rde(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");nde=t}});Os.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0};Os.prototype.setMaxListeners=function(e){if(typeof e!="number"||e<0||rde(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this};function ide(t){return t._maxListeners===void 0?Os.defaultMaxListeners:t._maxListeners}Os.prototype.getMaxListeners=function(){return ide(this)};Os.prototype.emit=function(e){for(var r=[],n=1;n<arguments.length;n++)r.push(arguments[n]);var i=e==="error",o=this._events;if(o!==void 0)i=i&&o.error===void 0;else if(!i)return!1;if(i){var a;if(r.length>0&&(a=r[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var l=o[e];if(l===void 0)return!1;if(typeof l=="function")tde(l,this,r);else for(var u=l.length,p=cde(l,u),n=0;n<u;++n)tde(p[n],this,r);return!0};function ode(t,e,r,n){var i,o,a;if(v5(r),o=t._events,o===void 0?(o=t._events=Object.create(null),t._eventsCount=0):(o.newListener!==void 0&&(t.emit("newListener",e,r.listener?r.listener:r),o=t._events),a=o[e]),a===void 0)a=o[e]=r,++t._eventsCount;else if(typeof a=="function"?a=o[e]=n?[r,a]:[a,r]:n?a.unshift(r):a.push(r),i=ide(t),i>0&&a.length>i&&!a.warned){a.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=t,s.type=e,s.count=a.length,hyt(s)}return t}Os.prototype.addListener=function(e,r){return ode(this,e,r,!1)};Os.prototype.on=Os.prototype.addListener;Os.prototype.prependListener=function(e,r){return ode(this,e,r,!0)};function pyt(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function sde(t,e,r){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},i=pyt.bind(n);return i.listener=r,n.wrapFn=i,i}Os.prototype.once=function(e,r){return v5(r),this.on(e,sde(this,e,r)),this};Os.prototype.prependOnceListener=function(e,r){return v5(r),this.prependListener(e,sde(this,e,r)),this};Os.prototype.removeListener=function(e,r){var n,i,o,a,s;if(v5(r),i=this._events,i===void 0)return this;if(n=i[e],n===void 0)return this;if(n===r||n.listener===r)--this._eventsCount==0?this._events=Object.create(null):(delete i[e],i.removeListener&&this.emit("removeListener",e,n.listener||r));else if(typeof n!="function"){for(o=-1,a=n.length-1;a>=0;a--)if(n[a]===r||n[a].listener===r){s=n[a].listener,o=a;break}if(o<0)return this;o===0?n.shift():myt(n,o),n.length===1&&(i[e]=n[0]),i.removeListener!==void 0&&this.emit("removeListener",e,s||r)}return this};Os.prototype.off=Os.prototype.removeListener;Os.prototype.removeAllListeners=function(e){var r,n,i;if(n=this._events,n===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[e]!==void 0&&(--this._eventsCount==0?this._events=Object.create(null):delete n[e]),this;if(arguments.length===0){var o=Object.keys(n),a;for(i=0;i<o.length;++i)a=o[i],a!=="removeListener"&&this.removeAllListeners(a);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(r=n[e],typeof r=="function")this.removeListener(e,r);else if(r!==void 0)for(i=r.length-1;i>=0;i--)this.removeListener(e,r[i]);return this};function ade(t,e,r){var n=t._events;if(n===void 0)return[];var i=n[e];return i===void 0?[]:typeof i=="function"?r?[i.listener||i]:[i]:r?gyt(i):cde(i,i.length)}Os.prototype.listeners=function(e){return ade(this,e,!0)};Os.prototype.rawListeners=function(e){return ade(this,e,!1)};Os.listenerCount=function(t,e){return typeof t.listenerCount=="function"?t.listenerCount(e):lde.call(t,e)};Os.prototype.listenerCount=lde;function lde(t){var e=this._events;if(e!==void 0){var r=e[t];if(typeof r=="function")return 1;if(r!==void 0)return r.length}return 0}Os.prototype.eventNames=function(){return this._eventsCount>0?g5(this._events):[]};function cde(t,e){for(var r=new Array(e),n=0;n<e;++n)r[n]=t[n];return r}function myt(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}function gyt(t){for(var e=new Array(t.length),r=0;r<e.length;++r)e[r]=t[r].listener||t[r];return e}function vyt(t,e){return new Promise(function(r,n){function i(a){t.removeListener(e,o),n(a)}function o(){typeof t.removeListener=="function"&&t.removeListener("error",i),r([].slice.call(arguments))}ude(t,e,o,{once:!0}),e!=="error"&&yyt(t,i,{once:!0})})}function yyt(t,e,r){typeof t.on=="function"&&ude(t,"error",e,r)}function ude(t,e,r,n){if(typeof t.on=="function")n.once?t.once(e,r):t.on(e,r);else if(typeof t.addEventListener=="function")t.addEventListener(e,function i(o){n.once&&t.removeEventListener(e,i),r(o)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t)}var fde={exports:{}};(function(t,e){(function(r,n){t.exports=n()})(xl,function(){var r=function(le,Se){var Ue={drag:[],click:[],mousemove:[],mousedown:[],mouseup:[],mouseout:[],keydown:[],keyup:[],touchstart:[],touchmove:[],touchend:[],tap:[]},Et={on:function(et,ct,jt){if(Ue[et]===void 0)throw new Error("Invalid event type: "+et);Ue[et].push({selector:ct,fn:jt})},render:function(et){Se.store.featureChanged(et)}},qe=function(et,ct){for(var jt=Ue[et],Xt=jt.length;Xt--;){var pr=jt[Xt];if(pr.selector(ct)){pr.fn.call(Et,ct)||Se.store.render(),Se.ui.updateMapClasses();break}}};return le.start.call(Et),{render:le.render,stop:function(){le.stop&&le.stop()},trash:function(){le.trash&&(le.trash(),Se.store.render())},combineFeatures:function(){le.combineFeatures&&le.combineFeatures()},uncombineFeatures:function(){le.uncombineFeatures&&le.uncombineFeatures()},drag:function(et){qe("drag",et)},click:function(et){qe("click",et)},mousemove:function(et){qe("mousemove",et)},mousedown:function(et){qe("mousedown",et)},mouseup:function(et){qe("mouseup",et)},mouseout:function(et){qe("mouseout",et)},keydown:function(et){qe("keydown",et)},keyup:function(et){qe("keyup",et)},touchstart:function(et){qe("touchstart",et)},touchmove:function(et){qe("touchmove",et)},touchend:function(et){qe("touchend",et)},tap:function(et){qe("tap",et)}}},n=6378137;function i(le){var Se=0;if(le&&le.length>0){Se+=Math.abs(o(le[0]));for(var Ue=1;Ue<le.length;Ue++)Se-=Math.abs(o(le[Ue]))}return Se}function o(le){var Se,Ue,Et,qe,et,ct,jt=0,Xt=le.length;if(Xt>2){for(ct=0;ct<Xt;ct++)ct===Xt-2?(Et=Xt-2,qe=Xt-1,et=0):ct===Xt-1?(Et=Xt-1,qe=0,et=1):(Et=ct,qe=ct+1,et=ct+2),Se=le[Et],Ue=le[qe],jt+=(a(le[et][0])-a(Se[0]))*Math.sin(a(Ue[1]));jt=jt*n*n/2}return jt}function a(le){return le*Math.PI/180}var s={geometry:function le(Se){var Ue,Et=0;switch(Se.type){case"Polygon":return i(Se.coordinates);case"MultiPolygon":for(Ue=0;Ue<Se.coordinates.length;Ue++)Et+=i(Se.coordinates[Ue]);return Et;case"Point":case"MultiPoint":case"LineString":case"MultiLineString":return 0;case"GeometryCollection":for(Ue=0;Ue<Se.geometries.length;Ue++)Et+=le(Se.geometries[Ue]);return Et}},ring:o},l="mapboxgl-ctrl",u="mapbox-gl-draw_ctrl-draw-btn",p="mapbox-gl-draw_line",m="mapbox-gl-draw_polygon",v="mapbox-gl-draw_point",x="mapbox-gl-draw_trash",y="mapbox-gl-draw_combine",_="mapbox-gl-draw_uncombine",w="mapboxgl-ctrl-group",C="active",E="mapbox-gl-draw_boxselect",T="mapbox-gl-draw-hot",A="mapbox-gl-draw-cold",k="add",X="move",Z="drag",W="pointer",D="none",H={POLYGON:"polygon",LINE:"line_string",POINT:"point"},N="Feature",j="Polygon",$="LineString",z="Point",O="FeatureCollection",F="Multi",G="MultiPoint",q="MultiLineString",ee="MultiPolygon",re={DRAW_LINE_STRING:"draw_line_string",DRAW_POLYGON:"draw_polygon",DRAW_POINT:"draw_point",SIMPLE_SELECT:"simple_select",DIRECT_SELECT:"direct_select",STATIC:"static"},ce="draw.create",fe="draw.delete",J="draw.update",oe="draw.selectionchange",ve="draw.modechange",ye="draw.actionable",xe="draw.render",se="draw.combine",me="draw.uncombine",pe="move",Ce="change_coordinates",Pe="feature",Re="midpoint",ke="vertex",ze="true",Ge="false",ht=["scrollZoom","boxZoom","dragRotate","dragPan","keyboard","doubleClickZoom","touchZoomRotate"],Tt={Point:0,LineString:1,Polygon:2};function xt(le,Se){var Ue=Tt[le.geometry.type]-Tt[Se.geometry.type];return Ue===0&&le.geometry.type===j?le.area-Se.area:Ue}function pt(le){if(this._items={},this._nums={},this._length=le?le.length:0,le)for(var Se=0,Ue=le.length;Se<Ue;Se++)this.add(le[Se]),le[Se]!==void 0&&(typeof le[Se]=="string"?this._items[le[Se]]=Se:this._nums[le[Se]]=Se)}pt.prototype.add=function(le){return this.has(le)||(this._length++,typeof le=="string"?this._items[le]=this._length:this._nums[le]=this._length),this},pt.prototype.delete=function(le){return this.has(le)===!1||(this._length--,delete this._items[le],delete this._nums[le]),this},pt.prototype.has=function(le){return(typeof le=="string"||typeof le=="number")&&(this._items[le]!==void 0||this._nums[le]!==void 0)},pt.prototype.values=function(){var le=this,Se=[];return Object.keys(this._items).forEach(function(Ue){Se.push({k:Ue,v:le._items[Ue]})}),Object.keys(this._nums).forEach(function(Ue){Se.push({k:JSON.parse(Ue),v:le._nums[Ue]})}),Se.sort(function(Ue,Et){return Ue.v-Et.v}).map(function(Ue){return Ue.k})},pt.prototype.clear=function(){return this._length=0,this._items={},this._nums={},this};var It=[Pe,Re,ke],Ie={click:function(le,Se,Ue){return de(le,Se,Ue,Ue.options.clickBuffer)},touch:function(le,Se,Ue){return de(le,Se,Ue,Ue.options.touchBuffer)}};function de(le,Se,Ue,Et){if(Ue.map===null)return[];var qe=le?function(pr,zt){return zt===void 0&&(zt=0),[[pr.point.x-zt,pr.point.y-zt],[pr.point.x+zt,pr.point.y+zt]]}(le,Et):Se,et={};Ue.options.styles&&(et.layers=Ue.options.styles.map(function(pr){return pr.id}));var ct=Ue.map.queryRenderedFeatures(qe,et).filter(function(pr){return It.indexOf(pr.properties.meta)!==-1}),jt=new pt,Xt=[];return ct.forEach(function(pr){var zt=pr.properties.id;jt.has(zt)||(jt.add(zt),Xt.push(pr))}),function(pr){return pr.map(function(zt){return zt.geometry.type===j&&(zt.area=s.geometry({type:N,property:{},geometry:zt.geometry})),zt}).sort(xt).map(function(zt){return delete zt.area,zt})}(Xt)}function Te(le,Se){var Ue=Ie.click(le,null,Se),Et={mouse:D};return Ue[0]&&(Et.mouse=Ue[0].properties.active===ze?X:W,Et.feature=Ue[0].properties.meta),Se.events.currentModeName().indexOf("draw")!==-1&&(Et.mouse=k),Se.ui.queueMapClasses(Et),Se.ui.updateMapClasses(),Ue[0]}function Be(le,Se){var Ue=le.x-Se.x,Et=le.y-Se.y;return Math.sqrt(Ue*Ue+Et*Et)}function Ke(le,Se,Ue){Ue===void 0&&(Ue={});var Et=Ue.fineTolerance!=null?Ue.fineTolerance:4,qe=Ue.grossTolerance!=null?Ue.grossTolerance:12,et=Ue.interval!=null?Ue.interval:500;le.point=le.point||Se.point,le.time=le.time||Se.time;var ct=Be(le.point,Se.point);return ct<Et||ct<qe&&Se.time-le.time<et}function ot(le,Se,Ue){Ue===void 0&&(Ue={});var Et=Ue.tolerance!=null?Ue.tolerance:25,qe=Ue.interval!=null?Ue.interval:250;return le.point=le.point||Se.point,le.time=le.time||Se.time,Be(le.point,Se.point)<Et&&Se.time-le.time<qe}function Ze(le,Se){return le(Se={exports:{}},Se.exports),Se.exports}var Je=Ze(function(le){var Se=le.exports=function(Ue,Et){if(Et||(Et=16),Ue===void 0&&(Ue=128),Ue<=0)return"0";for(var qe=Math.log(Math.pow(2,Ue))/Math.log(Et),et=2;qe===1/0;et*=2)qe=Math.log(Math.pow(2,Ue/et))/Math.log(Et)*et;var ct=qe-Math.floor(qe),jt="";for(et=0;et<Math.floor(qe);et++)jt=Math.floor(Math.random()*Et).toString(Et)+jt;if(ct){var Xt=Math.pow(Et,ct);jt=Math.floor(Math.random()*Xt).toString(Et)+jt}var pr=parseInt(jt,Et);return pr!==1/0&&pr>=Math.pow(2,Ue)?Se(Ue,Et):jt};Se.rack=function(Ue,Et,qe){var et=function(jt){var Xt=0;do{if(Xt++>10){if(!qe)throw new Error("too many ID collisions, use more bits");Ue+=qe}var pr=Se(Ue,Et)}while(Object.hasOwnProperty.call(ct,pr));return ct[pr]=jt,pr},ct=et.hats={};return et.get=function(jt){return et.hats[jt]},et.set=function(jt,Xt){return et.hats[jt]=Xt,et},et.bits=Ue||128,et.base=Et||16,et}}),St=function(le,Se){this.ctx=le,this.properties=Se.properties||{},this.coordinates=Se.geometry.coordinates,this.id=Se.id||Je(),this.type=Se.geometry.type};St.prototype.changed=function(){this.ctx.store.featureChanged(this.id)},St.prototype.incomingCoords=function(le){this.setCoordinates(le)},St.prototype.setCoordinates=function(le){this.coordinates=le,this.changed()},St.prototype.getCoordinates=function(){return JSON.parse(JSON.stringify(this.coordinates))},St.prototype.setProperty=function(le,Se){this.properties[le]=Se},St.prototype.toGeoJSON=function(){return JSON.parse(JSON.stringify({id:this.id,type:N,properties:this.properties,geometry:{coordinates:this.getCoordinates(),type:this.type}}))},St.prototype.internal=function(le){var Se={id:this.id,meta:Pe,"meta:type":this.type,active:Ge,mode:le};if(this.ctx.options.userProperties)for(var Ue in this.properties)Se["user_"+Ue]=this.properties[Ue];return{type:N,properties:Se,geometry:{coordinates:this.getCoordinates(),type:this.type}}};var er=function(le,Se){St.call(this,le,Se)};(er.prototype=Object.create(St.prototype)).isValid=function(){return typeof this.coordinates[0]=="number"&&typeof this.coordinates[1]=="number"},er.prototype.updateCoordinate=function(le,Se,Ue){this.coordinates=arguments.length===3?[Se,Ue]:[le,Se],this.changed()},er.prototype.getCoordinate=function(){return this.getCoordinates()};var Ft=function(le,Se){St.call(this,le,Se)};(Ft.prototype=Object.create(St.prototype)).isValid=function(){return this.coordinates.length>1},Ft.prototype.addCoordinate=function(le,Se,Ue){this.changed();var Et=parseInt(le,10);this.coordinates.splice(Et,0,[Se,Ue])},Ft.prototype.getCoordinate=function(le){var Se=parseInt(le,10);return JSON.parse(JSON.stringify(this.coordinates[Se]))},Ft.prototype.removeCoordinate=function(le){this.changed(),this.coordinates.splice(parseInt(le,10),1)},Ft.prototype.updateCoordinate=function(le,Se,Ue){var Et=parseInt(le,10);this.coordinates[Et]=[Se,Ue],this.changed()};var Ut=function(le,Se){St.call(this,le,Se),this.coordinates=this.coordinates.map(function(Ue){return Ue.slice(0,-1)})};(Ut.prototype=Object.create(St.prototype)).isValid=function(){return this.coordinates.length!==0&&this.coordinates.every(function(le){return le.length>2})},Ut.prototype.incomingCoords=function(le){this.coordinates=le.map(function(Se){return Se.slice(0,-1)}),this.changed()},Ut.prototype.setCoordinates=function(le){this.coordinates=le,this.changed()},Ut.prototype.addCoordinate=function(le,Se,Ue){this.changed();var Et=le.split(".").map(function(qe){return parseInt(qe,10)});this.coordinates[Et[0]].splice(Et[1],0,[Se,Ue])},Ut.prototype.removeCoordinate=function(le){this.changed();var Se=le.split(".").map(function(Et){return parseInt(Et,10)}),Ue=this.coordinates[Se[0]];Ue&&(Ue.splice(Se[1],1),Ue.length<3&&this.coordinates.splice(Se[0],1))},Ut.prototype.getCoordinate=function(le){var Se=le.split(".").map(function(Et){return parseInt(Et,10)}),Ue=this.coordinates[Se[0]];return JSON.parse(JSON.stringify(Ue[Se[1]]))},Ut.prototype.getCoordinates=function(){return this.coordinates.map(function(le){return le.concat([le[0]])})},Ut.prototype.updateCoordinate=function(le,Se,Ue){this.changed();var Et=le.split("."),qe=parseInt(Et[0],10),et=parseInt(Et[1],10);this.coordinates[qe]===void 0&&(this.coordinates[qe]=[]),this.coordinates[qe][et]=[Se,Ue]};var Er={MultiPoint:er,MultiLineString:Ft,MultiPolygon:Ut},kr=function(le,Se,Ue,Et,qe){var et=Ue.split("."),ct=parseInt(et[0],10),jt=et[1]?et.slice(1).join("."):null;return le[ct][Se](jt,Et,qe)},mr=function(le,Se){if(St.call(this,le,Se),delete this.coordinates,this.model=Er[Se.geometry.type],this.model===void 0)throw new TypeError(Se.geometry.type+" is not a valid type");this.features=this._coordinatesToFeatures(Se.geometry.coordinates)};function Dt(le){this.map=le.map,this.drawConfig=JSON.parse(JSON.stringify(le.options||{})),this._ctx=le}(mr.prototype=Object.create(St.prototype))._coordinatesToFeatures=function(le){var Se=this,Ue=this.model.bind(this);return le.map(function(Et){return new Ue(Se.ctx,{id:Je(),type:N,properties:{},geometry:{coordinates:Et,type:Se.type.replace("Multi","")}})})},mr.prototype.isValid=function(){return this.features.every(function(le){return le.isValid()})},mr.prototype.setCoordinates=function(le){this.features=this._coordinatesToFeatures(le),this.changed()},mr.prototype.getCoordinate=function(le){return kr(this.features,"getCoordinate",le)},mr.prototype.getCoordinates=function(){return JSON.parse(JSON.stringify(this.features.map(function(le){return le.type===j?le.getCoordinates():le.coordinates})))},mr.prototype.updateCoordinate=function(le,Se,Ue){kr(this.features,"updateCoordinate",le,Se,Ue),this.changed()},mr.prototype.addCoordinate=function(le,Se,Ue){kr(this.features,"addCoordinate",le,Se,Ue),this.changed()},mr.prototype.removeCoordinate=function(le){kr(this.features,"removeCoordinate",le),this.changed()},mr.prototype.getFeatures=function(){return this.features},Dt.prototype.setSelected=function(le){return this._ctx.store.setSelected(le)},Dt.prototype.setSelectedCoordinates=function(le){var Se=this;this._ctx.store.setSelectedCoordinates(le),le.reduce(function(Ue,Et){return Ue[Et.feature_id]===void 0&&(Ue[Et.feature_id]=!0,Se._ctx.store.get(Et.feature_id).changed()),Ue},{})},Dt.prototype.getSelected=function(){return this._ctx.store.getSelected()},Dt.prototype.getSelectedIds=function(){return this._ctx.store.getSelectedIds()},Dt.prototype.isSelected=function(le){return this._ctx.store.isSelected(le)},Dt.prototype.getFeature=function(le){return this._ctx.store.get(le)},Dt.prototype.select=function(le){return this._ctx.store.select(le)},Dt.prototype.deselect=function(le){return this._ctx.store.deselect(le)},Dt.prototype.deleteFeature=function(le,Se){return Se===void 0&&(Se={}),this._ctx.store.delete(le,Se)},Dt.prototype.addFeature=function(le){return this._ctx.store.add(le)},Dt.prototype.clearSelectedFeatures=function(){return this._ctx.store.clearSelected()},Dt.prototype.clearSelectedCoordinates=function(){return this._ctx.store.clearSelectedCoordinates()},Dt.prototype.setActionableState=function(le){le===void 0&&(le={});var Se={trash:le.trash||!1,combineFeatures:le.combineFeatures||!1,uncombineFeatures:le.uncombineFeatures||!1};return this._ctx.events.actionable(Se)},Dt.prototype.changeMode=function(le,Se,Ue){return Se===void 0&&(Se={}),Ue===void 0&&(Ue={}),this._ctx.events.changeMode(le,Se,Ue)},Dt.prototype.updateUIClasses=function(le){return this._ctx.ui.queueMapClasses(le)},Dt.prototype.activateUIButton=function(le){return this._ctx.ui.setActiveButton(le)},Dt.prototype.featuresAt=function(le,Se,Ue){if(Ue===void 0&&(Ue="click"),Ue!=="click"&&Ue!=="touch")throw new Error("invalid buffer type");return Ie[Ue](le,Se,this._ctx)},Dt.prototype.newFeature=function(le){var Se=le.geometry.type;return Se===z?new er(this._ctx,le):Se===$?new Ft(this._ctx,le):Se===j?new Ut(this._ctx,le):new mr(this._ctx,le)},Dt.prototype.isInstanceOf=function(le,Se){if(le===z)return Se instanceof er;if(le===$)return Se instanceof Ft;if(le===j)return Se instanceof Ut;if(le==="MultiFeature")return Se instanceof mr;throw new Error("Unknown feature class: "+le)},Dt.prototype.doRender=function(le){return this._ctx.store.featureChanged(le)},Dt.prototype.onSetup=function(){},Dt.prototype.onDrag=function(){},Dt.prototype.onClick=function(){},Dt.prototype.onMouseMove=function(){},Dt.prototype.onMouseDown=function(){},Dt.prototype.onMouseUp=function(){},Dt.prototype.onMouseOut=function(){},Dt.prototype.onKeyUp=function(){},Dt.prototype.onKeyDown=function(){},Dt.prototype.onTouchStart=function(){},Dt.prototype.onTouchMove=function(){},Dt.prototype.onTouchEnd=function(){},Dt.prototype.onTap=function(){},Dt.prototype.onStop=function(){},Dt.prototype.onTrash=function(){},Dt.prototype.onCombineFeature=function(){},Dt.prototype.onUncombineFeature=function(){},Dt.prototype.toDisplayFeatures=function(){throw new Error("You must overwrite toDisplayFeatures")};var Jr={drag:"onDrag",click:"onClick",mousemove:"onMouseMove",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseout:"onMouseOut",keyup:"onKeyUp",keydown:"onKeyDown",touchstart:"onTouchStart",touchmove:"onTouchMove",touchend:"onTouchEnd",tap:"onTap"},We=Object.keys(Jr);function Oe(le){var Se=Object.keys(le);return function(Ue,Et){Et===void 0&&(Et={});var qe={},et=Se.reduce(function(ct,jt){return ct[jt]=le[jt],ct},new Dt(Ue));return{start:function(){var ct=this;qe=et.onSetup(Et),We.forEach(function(jt){var Xt,pr=Jr[jt],zt=function(){return!1};le[pr]&&(zt=function(){return!0}),ct.on(jt,zt,(Xt=pr,function(Hr){return et[Xt](qe,Hr)}))})},stop:function(){et.onStop(qe)},trash:function(){et.onTrash(qe)},combineFeatures:function(){et.onCombineFeatures(qe)},uncombineFeatures:function(){et.onUncombineFeatures(qe)},render:function(ct,jt){et.toDisplayFeatures(qe,ct,jt)}}}}function $e(le){return[].concat(le).filter(function(Se){return Se!==void 0})}function Xe(){var le=this;if(!(le.ctx.map&&le.ctx.map.getSource(T)!==void 0))return Xt();var Se=le.ctx.events.currentModeName();le.ctx.ui.queueMapClasses({mode:Se});var Ue=[],Et=[];le.isDirty?Et=le.getAllIds():(Ue=le.getChangedIds().filter(function(pr){return le.get(pr)!==void 0}),Et=le.sources.hot.filter(function(pr){return pr.properties.id&&Ue.indexOf(pr.properties.id)===-1&&le.get(pr.properties.id)!==void 0}).map(function(pr){return pr.properties.id})),le.sources.hot=[];var qe=le.sources.cold.length;le.sources.cold=le.isDirty?[]:le.sources.cold.filter(function(pr){var zt=pr.properties.id||pr.properties.parent;return Ue.indexOf(zt)===-1});var et=qe!==le.sources.cold.length||Et.length>0;function ct(pr,zt){var Hr=le.get(pr).internal(Se);le.ctx.events.currentModeRender(Hr,function(Zr){le.sources[zt].push(Zr)})}if(Ue.forEach(function(pr){return ct(pr,"hot")}),Et.forEach(function(pr){return ct(pr,"cold")}),et&&le.ctx.map.getSource(A).setData({type:O,features:le.sources.cold}),le.ctx.map.getSource(T).setData({type:O,features:le.sources.hot}),le._emitSelectionChange&&(le.ctx.map.fire(oe,{features:le.getSelected().map(function(pr){return pr.toGeoJSON()}),points:le.getSelectedCoordinates().map(function(pr){return{type:N,properties:{},geometry:{type:z,coordinates:pr.coordinates}}})}),le._emitSelectionChange=!1),le._deletedFeaturesToEmit.length){var jt=le._deletedFeaturesToEmit.map(function(pr){return pr.toGeoJSON()});le._deletedFeaturesToEmit=[],le.ctx.map.fire(fe,{features:jt})}function Xt(){le.isDirty=!1,le.clearChangedIds()}Xt(),le.ctx.map.fire(xe,{})}function tt(le){var Se,Ue=this;this._features={},this._featureIds=new pt,this._selectedFeatureIds=new pt,this._selectedCoordinates=[],this._changedFeatureIds=new pt,this._deletedFeaturesToEmit=[],this._emitSelectionChange=!1,this._mapInitialConfig={},this.ctx=le,this.sources={hot:[],cold:[]},this.render=function(){Se||(Se=requestAnimationFrame(function(){Se=null,Xe.call(Ue)}))},this.isDirty=!1}function _t(le,Se){var Ue=le._selectedCoordinates.filter(function(Et){return le._selectedFeatureIds.has(Et.feature_id)});le._selectedCoordinates.length===Ue.length||Se.silent||(le._emitSelectionChange=!0),le._selectedCoordinates=Ue}tt.prototype.createRenderBatch=function(){var le=this,Se=this.render,Ue=0;return this.render=function(){Ue++},function(){le.render=Se,Ue>0&&le.render()}},tt.prototype.setDirty=function(){return this.isDirty=!0,this},tt.prototype.featureChanged=function(le){return this._changedFeatureIds.add(le),this},tt.prototype.getChangedIds=function(){return this._changedFeatureIds.values()},tt.prototype.clearChangedIds=function(){return this._changedFeatureIds.clear(),this},tt.prototype.getAllIds=function(){return this._featureIds.values()},tt.prototype.add=function(le){return this.featureChanged(le.id),this._features[le.id]=le,this._featureIds.add(le.id),this},tt.prototype.delete=function(le,Se){var Ue=this;return Se===void 0&&(Se={}),$e(le).forEach(function(Et){Ue._featureIds.has(Et)&&(Ue._featureIds.delete(Et),Ue._selectedFeatureIds.delete(Et),Se.silent||Ue._deletedFeaturesToEmit.indexOf(Ue._features[Et])===-1&&Ue._deletedFeaturesToEmit.push(Ue._features[Et]),delete Ue._features[Et],Ue.isDirty=!0)}),_t(this,Se),this},tt.prototype.get=function(le){return this._features[le]},tt.prototype.getAll=function(){var le=this;return Object.keys(this._features).map(function(Se){return le._features[Se]})},tt.prototype.select=function(le,Se){var Ue=this;return Se===void 0&&(Se={}),$e(le).forEach(function(Et){Ue._selectedFeatureIds.has(Et)||(Ue._selectedFeatureIds.add(Et),Ue._changedFeatureIds.add(Et),Se.silent||(Ue._emitSelectionChange=!0))}),this},tt.prototype.deselect=function(le,Se){var Ue=this;return Se===void 0&&(Se={}),$e(le).forEach(function(Et){Ue._selectedFeatureIds.has(Et)&&(Ue._selectedFeatureIds.delete(Et),Ue._changedFeatureIds.add(Et),Se.silent||(Ue._emitSelectionChange=!0))}),_t(this,Se),this},tt.prototype.clearSelected=function(le){return le===void 0&&(le={}),this.deselect(this._selectedFeatureIds.values(),{silent:le.silent}),this},tt.prototype.setSelected=function(le,Se){var Ue=this;return Se===void 0&&(Se={}),le=$e(le),this.deselect(this._selectedFeatureIds.values().filter(function(Et){return le.indexOf(Et)===-1}),{silent:Se.silent}),this.select(le.filter(function(Et){return!Ue._selectedFeatureIds.has(Et)}),{silent:Se.silent}),this},tt.prototype.setSelectedCoordinates=function(le){return this._selectedCoordinates=le,this._emitSelectionChange=!0,this},tt.prototype.clearSelectedCoordinates=function(){return this._selectedCoordinates=[],this._emitSelectionChange=!0,this},tt.prototype.getSelectedIds=function(){return this._selectedFeatureIds.values()},tt.prototype.getSelected=function(){var le=this;return this._selectedFeatureIds.values().map(function(Se){return le.get(Se)})},tt.prototype.getSelectedCoordinates=function(){var le=this;return this._selectedCoordinates.map(function(Se){return{coordinates:le.get(Se.feature_id).getCoordinate(Se.coord_path)}})},tt.prototype.isSelected=function(le){return this._selectedFeatureIds.has(le)},tt.prototype.setFeatureProperty=function(le,Se,Ue){this.get(le).setProperty(Se,Ue),this.featureChanged(le)},tt.prototype.storeMapConfig=function(){var le=this;ht.forEach(function(Se){le.ctx.map[Se]&&(le._mapInitialConfig[Se]=le.ctx.map[Se].isEnabled())})},tt.prototype.restoreMapConfig=function(){var le=this;Object.keys(this._mapInitialConfig).forEach(function(Se){le._mapInitialConfig[Se]?le.ctx.map[Se].enable():le.ctx.map[Se].disable()})},tt.prototype.getInitialConfigValue=function(le){return this._mapInitialConfig[le]===void 0||this._mapInitialConfig[le]};var Ot=function(){for(var le=arguments,Se={},Ue=0;Ue<arguments.length;Ue++){var Et=le[Ue];for(var qe in Et)Nt.call(Et,qe)&&(Se[qe]=Et[qe])}return Se},Nt=Object.prototype.hasOwnProperty,bt=["mode","feature","mouse"];function Wt(le){var Se=null,Ue=null,Et={onRemove:function(){return le.map.off("load",Et.connect),clearInterval(Ue),Et.removeLayers(),le.store.restoreMapConfig(),le.ui.removeButtons(),le.events.removeEventListeners(),le.ui.clearMapClasses(),le.map=null,le.container=null,le.store=null,Se&&Se.parentNode&&Se.parentNode.removeChild(Se),Se=null,this},connect:function(){le.map.off("load",Et.connect),clearInterval(Ue),Et.addLayers(),le.store.storeMapConfig(),le.events.addEventListeners()},onAdd:function(qe){var et=qe.fire;return qe.fire=function(ct,jt){var Xt=arguments;return et.length===1&&arguments.length!==1&&(Xt=[Ot({},{type:ct},jt)]),et.apply(qe,Xt)},le.map=qe,le.events=function(ct){var jt=Object.keys(ct.options.modes).reduce(function(wr,pn){return wr[pn]=Oe(ct.options.modes[pn]),wr},{}),Xt={},pr={},zt={},Hr=null,Zr=null;zt.drag=function(wr,pn){pn({point:wr.point,time:new Date().getTime()})?(ct.ui.queueMapClasses({mouse:Z}),Zr.drag(wr)):wr.originalEvent.stopPropagation()},zt.mousedrag=function(wr){zt.drag(wr,function(pn){return!Ke(Xt,pn)})},zt.touchdrag=function(wr){zt.drag(wr,function(pn){return!ot(pr,pn)})},zt.mousemove=function(wr){if((wr.originalEvent.buttons!==void 0?wr.originalEvent.buttons:wr.originalEvent.which)===1)return zt.mousedrag(wr);var pn=Te(wr,ct);wr.featureTarget=pn,Zr.mousemove(wr)},zt.mousedown=function(wr){Xt={time:new Date().getTime(),point:wr.point};var pn=Te(wr,ct);wr.featureTarget=pn,Zr.mousedown(wr)},zt.mouseup=function(wr){var pn=Te(wr,ct);wr.featureTarget=pn,Ke(Xt,{point:wr.point,time:new Date().getTime()})?Zr.click(wr):Zr.mouseup(wr)},zt.mouseout=function(wr){Zr.mouseout(wr)},zt.touchstart=function(wr){if(wr.originalEvent.preventDefault(),ct.options.touchEnabled){pr={time:new Date().getTime(),point:wr.point};var pn=Ie.touch(wr,null,ct)[0];wr.featureTarget=pn,Zr.touchstart(wr)}},zt.touchmove=function(wr){if(wr.originalEvent.preventDefault(),ct.options.touchEnabled)return Zr.touchmove(wr),zt.touchdrag(wr)},zt.touchend=function(wr){if(wr.originalEvent.preventDefault(),ct.options.touchEnabled){var pn=Ie.touch(wr,null,ct)[0];wr.featureTarget=pn,ot(pr,{time:new Date().getTime(),point:wr.point})?Zr.tap(wr):Zr.touchend(wr)}};var hn=function(wr){return!(wr===8||wr===46||wr>=48&&wr<=57)};function gn(wr,pn,ci){ci===void 0&&(ci={}),Zr.stop();var fi=jt[wr];if(fi===void 0)throw new Error(wr+" is not valid");Hr=wr;var Lo=fi(ct,pn);Zr=r(Lo,ct),ci.silent||ct.map.fire(ve,{mode:wr}),ct.store.setDirty(),ct.store.render()}zt.keydown=function(wr){(wr.srcElement||wr.target).classList[0]==="mapboxgl-canvas"&&(wr.keyCode!==8&&wr.keyCode!==46||!ct.options.controls.trash?hn(wr.keyCode)?Zr.keydown(wr):wr.keyCode===49&&ct.options.controls.point?gn(re.DRAW_POINT):wr.keyCode===50&&ct.options.controls.line_string?gn(re.DRAW_LINE_STRING):wr.keyCode===51&&ct.options.controls.polygon&&gn(re.DRAW_POLYGON):(wr.preventDefault(),Zr.trash()))},zt.keyup=function(wr){hn(wr.keyCode)&&Zr.keyup(wr)},zt.zoomend=function(){ct.store.changeZoom()},zt.data=function(wr){if(wr.dataType==="style"){var pn=ct.setup,ci=ct.map,fi=ct.options,Lo=ct.store;fi.styles.some(function(On){return ci.getLayer(On.id)})||(pn.addLayers(),Lo.setDirty(),Lo.render())}};var Bn={trash:!1,combineFeatures:!1,uncombineFeatures:!1};return{start:function(){Hr=ct.options.defaultMode,Zr=r(jt[Hr](ct),ct)},changeMode:gn,actionable:function(wr){var pn=!1;Object.keys(wr).forEach(function(ci){if(Bn[ci]===void 0)throw new Error("Invalid action type");Bn[ci]!==wr[ci]&&(pn=!0),Bn[ci]=wr[ci]}),pn&&ct.map.fire(ye,{actions:Bn})},currentModeName:function(){return Hr},currentModeRender:function(wr,pn){return Zr.render(wr,pn)},fire:function(wr,pn){zt[wr]&&zt[wr](pn)},addEventListeners:function(){ct.map.on("mousemove",zt.mousemove),ct.map.on("mousedown",zt.mousedown),ct.map.on("mouseup",zt.mouseup),ct.map.on("data",zt.data),ct.map.on("touchmove",zt.touchmove),ct.map.on("touchstart",zt.touchstart),ct.map.on("touchend",zt.touchend),ct.container.addEventListener("mouseout",zt.mouseout),ct.options.keybindings&&(ct.container.addEventListener("keydown",zt.keydown),ct.container.addEventListener("keyup",zt.keyup))},removeEventListeners:function(){ct.map.off("mousemove",zt.mousemove),ct.map.off("mousedown",zt.mousedown),ct.map.off("mouseup",zt.mouseup),ct.map.off("data",zt.data),ct.map.off("touchmove",zt.touchmove),ct.map.off("touchstart",zt.touchstart),ct.map.off("touchend",zt.touchend),ct.container.removeEventListener("mouseout",zt.mouseout),ct.options.keybindings&&(ct.container.removeEventListener("keydown",zt.keydown),ct.container.removeEventListener("keyup",zt.keyup))},trash:function(wr){Zr.trash(wr)},combineFeatures:function(){Zr.combineFeatures()},uncombineFeatures:function(){Zr.uncombineFeatures()},getMode:function(){return Hr}}}(le),le.ui=function(ct){var jt={},Xt=null,pr={mode:null,feature:null,mouse:null},zt={mode:null,feature:null,mouse:null};function Hr(wr){zt=Ot(zt,wr)}function Zr(){var wr,pn;if(ct.container){var ci=[],fi=[];bt.forEach(function(Lo){zt[Lo]!==pr[Lo]&&(ci.push(Lo+"-"+pr[Lo]),zt[Lo]!==null&&fi.push(Lo+"-"+zt[Lo]))}),ci.length>0&&(wr=ct.container.classList).remove.apply(wr,ci),fi.length>0&&(pn=ct.container.classList).add.apply(pn,fi),pr=Ot(pr,zt)}}function hn(wr,pn){pn===void 0&&(pn={});var ci=document.createElement("button");return ci.className=u+" "+pn.className,ci.setAttribute("title",pn.title),pn.container.appendChild(ci),ci.addEventListener("click",function(fi){if(fi.preventDefault(),fi.stopPropagation(),fi.target===Xt)return gn(),void pn.onDeactivate();Bn(wr),pn.onActivate()},!0),ci}function gn(){Xt&&(Xt.classList.remove(C),Xt=null)}function Bn(wr){gn();var pn=jt[wr];pn&&pn&&wr!=="trash"&&(pn.classList.add(C),Xt=pn)}return{setActiveButton:Bn,queueMapClasses:Hr,updateMapClasses:Zr,clearMapClasses:function(){Hr({mode:null,feature:null,mouse:null}),Zr()},addButtons:function(){var wr=ct.options.controls,pn=document.createElement("div");return pn.className=w+" "+l,wr&&(wr[H.LINE]&&(jt[H.LINE]=hn(H.LINE,{container:pn,className:p,title:"LineString tool "+(ct.options.keybindings?"(l)":""),onActivate:function(){return ct.events.changeMode(re.DRAW_LINE_STRING)},onDeactivate:function(){return ct.events.trash()}})),wr[H.POLYGON]&&(jt[H.POLYGON]=hn(H.POLYGON,{container:pn,className:m,title:"Polygon tool "+(ct.options.keybindings?"(p)":""),onActivate:function(){return ct.events.changeMode(re.DRAW_POLYGON)},onDeactivate:function(){return ct.events.trash()}})),wr[H.POINT]&&(jt[H.POINT]=hn(H.POINT,{container:pn,className:v,title:"Marker tool "+(ct.options.keybindings?"(m)":""),onActivate:function(){return ct.events.changeMode(re.DRAW_POINT)},onDeactivate:function(){return ct.events.trash()}})),wr.trash&&(jt.trash=hn("trash",{container:pn,className:x,title:"Delete",onActivate:function(){ct.events.trash()}})),wr.combine_features&&(jt.combine_features=hn("combineFeatures",{container:pn,className:y,title:"Combine",onActivate:function(){ct.events.combineFeatures()}})),wr.uncombine_features&&(jt.uncombine_features=hn("uncombineFeatures",{container:pn,className:_,title:"Uncombine",onActivate:function(){ct.events.uncombineFeatures()}}))),pn},removeButtons:function(){Object.keys(jt).forEach(function(wr){var pn=jt[wr];pn.parentNode&&pn.parentNode.removeChild(pn),delete jt[wr]})}}}(le),le.container=qe.getContainer(),le.store=new tt(le),Se=le.ui.addButtons(),le.options.boxSelect&&(qe.boxZoom.disable(),qe.dragPan.disable(),qe.dragPan.enable()),qe.loaded()?Et.connect():(qe.on("load",Et.connect),Ue=setInterval(function(){qe.loaded()&&Et.connect()},16)),le.events.start(),Se},addLayers:function(){le.map.addSource(A,{data:{type:O,features:[]},type:"geojson"}),le.map.addSource(T,{data:{type:O,features:[]},type:"geojson"}),le.options.styles.forEach(function(qe){le.map.addLayer(qe)}),le.store.setDirty(!0),le.store.render()},removeLayers:function(){le.options.styles.forEach(function(qe){le.map.getLayer(qe.id)&&le.map.removeLayer(qe.id)}),le.map.getSource(A)&&le.map.removeSource(A),le.map.getSource(T)&&le.map.removeSource(T)}};return le.setup=Et,Et}function Sr(le){return function(Se){var Ue=Se.featureTarget;return!!Ue&&!!Ue.properties&&Ue.properties.meta===le}}function rr(le){return!!le.featureTarget&&!!le.featureTarget.properties&&le.featureTarget.properties.active===ze&&le.featureTarget.properties.meta===Pe}function tr(le){return!!le.featureTarget&&!!le.featureTarget.properties&&le.featureTarget.properties.active===Ge&&le.featureTarget.properties.meta===Pe}function sn(le){return le.featureTarget===void 0}function un(le){var Se=le.featureTarget;return!!Se&&!!Se.properties&&Se.properties.meta===ke}function Ye(le){return!!le.originalEvent&&le.originalEvent.shiftKey===!0}function Ve(le){return le.keyCode===27}function gt(le){return le.keyCode===13}var qt=Ht;function Ht(le,Se){this.x=le,this.y=Se}function on(le,Se){var Ue=Se.getBoundingClientRect();return new qt(le.clientX-Ue.left-(Se.clientLeft||0),le.clientY-Ue.top-(Se.clientTop||0))}function $t(le,Se,Ue,Et){return{type:N,properties:{meta:ke,parent:le,coord_path:Ue,active:Et?ze:Ge},geometry:{type:z,coordinates:Se}}}function Gt(le,Se,Ue){Se===void 0&&(Se={}),Ue===void 0&&(Ue=null);var Et,qe=le.geometry,et=qe.type,ct=qe.coordinates,jt=le.properties&&le.properties.id,Xt=[];function pr(Hr,Zr){var hn="",gn=null;Hr.forEach(function(Bn,wr){var pn=Zr!=null?Zr+"."+wr:String(wr),ci=$t(jt,Bn,pn,zt(pn));if(Se.midpoints&&gn){var fi=function(On,ao,Ja){var $i=ao.geometry.coordinates,_i=Ja.geometry.coordinates;if($i[1]>85||$i[1]<-85||_i[1]>85||_i[1]<-85)return null;var Hn={lng:($i[0]+_i[0])/2,lat:($i[1]+_i[1])/2};return{type:N,properties:{meta:Re,parent:On,lng:Hn.lng,lat:Hn.lat,coord_path:Ja.properties.coord_path},geometry:{type:z,coordinates:[Hn.lng,Hn.lat]}}}(jt,gn,ci);fi&&Xt.push(fi)}gn=ci;var Lo=JSON.stringify(Bn);hn!==Lo&&Xt.push(ci),wr===0&&(hn=Lo)})}function zt(Hr){return!!Se.selectedPaths&&Se.selectedPaths.indexOf(Hr)!==-1}return et===z?Xt.push($t(jt,ct,Ue,zt(Ue))):et===j?ct.forEach(function(Hr,Zr){pr(Hr,Ue!==null?Ue+"."+Zr:String(Zr))}):et===$?pr(ct,Ue):et.indexOf(F)===0&&(Et=et.replace(F,""),ct.forEach(function(Hr,Zr){var hn={type:N,properties:le.properties,geometry:{type:Et,coordinates:Hr}};Xt=Xt.concat(Gt(hn,Se,Zr))})),Xt}Ht.prototype={clone:function(){return new Ht(this.x,this.y)},add:function(le){return this.clone()._add(le)},sub:function(le){return this.clone()._sub(le)},multByPoint:function(le){return this.clone()._multByPoint(le)},divByPoint:function(le){return this.clone()._divByPoint(le)},mult:function(le){return this.clone()._mult(le)},div:function(le){return this.clone()._div(le)},rotate:function(le){return this.clone()._rotate(le)},rotateAround:function(le,Se){return this.clone()._rotateAround(le,Se)},matMult:function(le){return this.clone()._matMult(le)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(le){return this.x===le.x&&this.y===le.y},dist:function(le){return Math.sqrt(this.distSqr(le))},distSqr:function(le){var Se=le.x-this.x,Ue=le.y-this.y;return Se*Se+Ue*Ue},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(le){return Math.atan2(this.y-le.y,this.x-le.x)},angleWith:function(le){return this.angleWithSep(le.x,le.y)},angleWithSep:function(le,Se){return Math.atan2(this.x*Se-this.y*le,this.x*le+this.y*Se)},_matMult:function(le){var Se=le[0]*this.x+le[1]*this.y,Ue=le[2]*this.x+le[3]*this.y;return this.x=Se,this.y=Ue,this},_add:function(le){return this.x+=le.x,this.y+=le.y,this},_sub:function(le){return this.x-=le.x,this.y-=le.y,this},_mult:function(le){return this.x*=le,this.y*=le,this},_div:function(le){return this.x/=le,this.y/=le,this},_multByPoint:function(le){return this.x*=le.x,this.y*=le.y,this},_divByPoint:function(le){return this.x/=le.x,this.y/=le.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var le=this.y;return this.y=this.x,this.x=-le,this},_rotate:function(le){var Se=Math.cos(le),Ue=Math.sin(le),Et=Se*this.x-Ue*this.y,qe=Ue*this.x+Se*this.y;return this.x=Et,this.y=qe,this},_rotateAround:function(le,Se){var Ue=Math.cos(le),Et=Math.sin(le),qe=Se.x+Ue*(this.x-Se.x)-Et*(this.y-Se.y),et=Se.y+Et*(this.x-Se.x)+Ue*(this.y-Se.y);return this.x=qe,this.y=et,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},Ht.convert=function(le){return le instanceof Ht?le:Array.isArray(le)?new Ht(le[0],le[1]):le};var Ir=function(le){setTimeout(function(){le.map&&le.map.doubleClickZoom&&le._ctx&&le._ctx.store&&le._ctx.store.getInitialConfigValue&&le._ctx.store.getInitialConfigValue("doubleClickZoom")&&le.map.doubleClickZoom.enable()},0)},Br=function(le){setTimeout(function(){le.map&&le.map.doubleClickZoom&&le.map.doubleClickZoom.disable()},0)},Xr=function(le){if(!le||!le.type)return null;var Se=Vn[le.type];if(!Se)return null;if(Se==="geometry")return{type:"FeatureCollection",features:[{type:"Feature",properties:{},geometry:le}]};if(Se==="feature")return{type:"FeatureCollection",features:[le]};if(Se==="featurecollection")return le},Vn={Point:"geometry",MultiPoint:"geometry",LineString:"geometry",MultiLineString:"geometry",Polygon:"geometry",MultiPolygon:"geometry",GeometryCollection:"geometry",Feature:"feature",FeatureCollection:"featurecollection"};function Ln(le){switch(le&&le.type||null){case"FeatureCollection":return le.features=le.features.reduce(function(Se,Ue){return Se.concat(Ln(Ue))},[]),le;case"Feature":return le.geometry?Ln(le.geometry).map(function(Se){var Ue={type:"Feature",properties:JSON.parse(JSON.stringify(le.properties)),geometry:Se};return le.id!==void 0&&(Ue.id=le.id),Ue}):[le];case"MultiPoint":return le.coordinates.map(function(Se){return{type:"Point",coordinates:Se}});case"MultiPolygon":return le.coordinates.map(function(Se){return{type:"Polygon",coordinates:Se}});case"MultiLineString":return le.coordinates.map(function(Se){return{type:"LineString",coordinates:Se}});case"GeometryCollection":return le.geometries.map(Ln).reduce(function(Se,Ue){return Se.concat(Ue)},[]);case"Point":case"Polygon":case"LineString":return[le]}}var br=function(le){if(!le)return[];var Se=Ln(Xr(le)),Ue=[];return Se.features.forEach(function(Et){Et.geometry&&(Ue=Ue.concat(function qe(et){return Array.isArray(et)&&et.length&&typeof et[0]=="number"?[et]:et.reduce(function(ct,jt){return Array.isArray(jt)&&Array.isArray(jt[0])?ct.concat(qe(jt)):(ct.push(jt),ct)},[])}(Et.geometry.coordinates)))}),Ue},oi=Ze(function(le){var Se=le.exports=function(zt){return new Ue(zt)};function Ue(zt){this.value=zt}function Et(zt,Hr,Zr){var hn=[],gn=[],Bn=!0;return function wr(pn){var ci=Zr?qe(pn):pn,fi={},Lo=!0,On={node:ci,node_:pn,path:[].concat(hn),parent:gn[gn.length-1],parents:gn,key:hn.slice(-1)[0],isRoot:hn.length===0,level:hn.length,circular:null,update:function($i,_i){On.isRoot||(On.parent.node[On.key]=$i),On.node=$i,_i&&(Lo=!1)},delete:function($i){delete On.parent.node[On.key],$i&&(Lo=!1)},remove:function($i){jt(On.parent.node)?On.parent.node.splice(On.key,1):delete On.parent.node[On.key],$i&&(Lo=!1)},keys:null,before:function($i){fi.before=$i},after:function($i){fi.after=$i},pre:function($i){fi.pre=$i},post:function($i){fi.post=$i},stop:function(){Bn=!1},block:function(){Lo=!1}};if(!Bn)return On;function ao(){if(typeof On.node=="object"&&On.node!==null){On.keys&&On.node_===On.node||(On.keys=et(On.node)),On.isLeaf=On.keys.length==0;for(var $i=0;$i<gn.length;$i++)if(gn[$i].node_===pn){On.circular=gn[$i];break}}else On.isLeaf=!0,On.keys=null;On.notLeaf=!On.isLeaf,On.notRoot=!On.isRoot}ao();var Ja=Hr.call(On,On.node);return Ja!==void 0&&On.update&&On.update(Ja),fi.before&&fi.before.call(On,On.node),Lo&&(typeof On.node!="object"||On.node===null||On.circular||(gn.push(On),ao(),Xt(On.keys,function($i,_i){hn.push($i),fi.pre&&fi.pre.call(On,On.node[$i],$i);var Hn=wr(On.node[$i]);Zr&&pr.call(On.node,$i)&&(On.node[$i]=Hn.node),Hn.isLast=_i==On.keys.length-1,Hn.isFirst=_i==0,fi.post&&fi.post.call(On,Hn),hn.pop()}),gn.pop()),fi.after&&fi.after.call(On,On.node)),On}(zt).node}function qe(zt){if(typeof zt=="object"&&zt!==null){var Hr;if(jt(zt))Hr=[];else if(ct(zt)==="[object Date]")Hr=new Date(zt.getTime?zt.getTime():zt);else if(function(gn){return ct(gn)==="[object RegExp]"}(zt))Hr=new RegExp(zt);else if(function(gn){return ct(gn)==="[object Error]"}(zt))Hr={message:zt.message};else if(function(gn){return ct(gn)==="[object Boolean]"}(zt))Hr=new Boolean(zt);else if(function(gn){return ct(gn)==="[object Number]"}(zt))Hr=new Number(zt);else if(function(gn){return ct(gn)==="[object String]"}(zt))Hr=new String(zt);else if(Object.create&&Object.getPrototypeOf)Hr=Object.create(Object.getPrototypeOf(zt));else if(zt.constructor===Object)Hr={};else{var Zr=zt.constructor&&zt.constructor.prototype||zt.__proto__||{},hn=function(){};hn.prototype=Zr,Hr=new hn}return Xt(et(zt),function(gn){Hr[gn]=zt[gn]}),Hr}return zt}Ue.prototype.get=function(zt){for(var Hr=this.value,Zr=0;Zr<zt.length;Zr++){var hn=zt[Zr];if(!Hr||!pr.call(Hr,hn)){Hr=void 0;break}Hr=Hr[hn]}return Hr},Ue.prototype.has=function(zt){for(var Hr=this.value,Zr=0;Zr<zt.length;Zr++){var hn=zt[Zr];if(!Hr||!pr.call(Hr,hn))return!1;Hr=Hr[hn]}return!0},Ue.prototype.set=function(zt,Hr){for(var Zr=this.value,hn=0;hn<zt.length-1;hn++){var gn=zt[hn];pr.call(Zr,gn)||(Zr[gn]={}),Zr=Zr[gn]}return Zr[zt[hn]]=Hr,Hr},Ue.prototype.map=function(zt){return Et(this.value,zt,!0)},Ue.prototype.forEach=function(zt){return this.value=Et(this.value,zt,!1),this.value},Ue.prototype.reduce=function(zt,Hr){var Zr=arguments.length===1,hn=Zr?this.value:Hr;return this.forEach(function(gn){this.isRoot&&Zr||(hn=zt.call(this,hn,gn))}),hn},Ue.prototype.paths=function(){var zt=[];return this.forEach(function(Hr){zt.push(this.path)}),zt},Ue.prototype.nodes=function(){var zt=[];return this.forEach(function(Hr){zt.push(this.node)}),zt},Ue.prototype.clone=function(){var zt=[],Hr=[];return function Zr(hn){for(var gn=0;gn<zt.length;gn++)if(zt[gn]===hn)return Hr[gn];if(typeof hn=="object"&&hn!==null){var Bn=qe(hn);return zt.push(hn),Hr.push(Bn),Xt(et(hn),function(wr){Bn[wr]=Zr(hn[wr])}),zt.pop(),Hr.pop(),Bn}return hn}(this.value)};var et=Object.keys||function(zt){var Hr=[];for(var Zr in zt)Hr.push(Zr);return Hr};function ct(zt){return Object.prototype.toString.call(zt)}var jt=Array.isArray||function(zt){return Object.prototype.toString.call(zt)==="[object Array]"},Xt=function(zt,Hr){if(zt.forEach)return zt.forEach(Hr);for(var Zr=0;Zr<zt.length;Zr++)Hr(zt[Zr],Zr,zt)};Xt(et(Ue.prototype),function(zt){Se[zt]=function(Hr){var Zr=[].slice.call(arguments,1),hn=new Ue(Hr);return hn[zt].apply(hn,Zr)}});var pr=Object.hasOwnProperty||function(zt,Hr){return Hr in zt}}),Gi=pi;function pi(le){if(!(this instanceof pi))return new pi(le);this._bbox=le||[1/0,1/0,-1/0,-1/0],this._valid=!!le}pi.prototype.include=function(le){return this._valid=!0,this._bbox[0]=Math.min(this._bbox[0],le[0]),this._bbox[1]=Math.min(this._bbox[1],le[1]),this._bbox[2]=Math.max(this._bbox[2],le[0]),this._bbox[3]=Math.max(this._bbox[3],le[1]),this},pi.prototype.equals=function(le){var Se;return Se=le instanceof pi?le.bbox():le,this._bbox[0]==Se[0]&&this._bbox[1]==Se[1]&&this._bbox[2]==Se[2]&&this._bbox[3]==Se[3]},pi.prototype.center=function(le){return this._valid?[(this._bbox[0]+this._bbox[2])/2,(this._bbox[1]+this._bbox[3])/2]:null},pi.prototype.union=function(le){var Se;return this._valid=!0,Se=le instanceof pi?le.bbox():le,this._bbox[0]=Math.min(this._bbox[0],Se[0]),this._bbox[1]=Math.min(this._bbox[1],Se[1]),this._bbox[2]=Math.max(this._bbox[2],Se[2]),this._bbox[3]=Math.max(this._bbox[3],Se[3]),this},pi.prototype.bbox=function(){return this._valid?this._bbox:null},pi.prototype.contains=function(le){if(!le)return this._fastContains();if(!this._valid)return null;var Se=le[0],Ue=le[1];return this._bbox[0]<=Se&&this._bbox[1]<=Ue&&this._bbox[2]>=Se&&this._bbox[3]>=Ue},pi.prototype.intersect=function(le){return this._valid?(Se=le instanceof pi?le.bbox():le,!(this._bbox[0]>Se[2]||this._bbox[2]<Se[0]||this._bbox[3]<Se[1]||this._bbox[1]>Se[3])):null;var Se},pi.prototype._fastContains=function(){if(!this._valid)return new Function("return null;");var le="return "+this._bbox[0]+"<= ll[0] &&"+this._bbox[1]+"<= ll[1] &&"+this._bbox[2]+">= ll[0] &&"+this._bbox[3]+">= ll[1]";return new Function("ll",le)},pi.prototype.polygon=function(){return this._valid?{type:"Polygon",coordinates:[[[this._bbox[0],this._bbox[1]],[this._bbox[2],this._bbox[1]],[this._bbox[2],this._bbox[3]],[this._bbox[0],this._bbox[3]],[this._bbox[0],this._bbox[1]]]]}:null};var Ds={features:["FeatureCollection"],coordinates:["Point","MultiPoint","LineString","MultiLineString","Polygon","MultiPolygon"],geometry:["Feature"],geometries:["GeometryCollection"]},Xo=Object.keys(Ds),jo=function(le){return Qa(le).bbox()};function Qa(le){for(var Se=Gi(),Ue=br(le),Et=0;Et<Ue.length;Et++)Se.include(Ue[Et]);return Se}jo.polygon=function(le){return Qa(le).polygon()},jo.bboxify=function(le){return oi(le).map(function(Se){Se&&Xo.some(function(Ue){return!!Se[Ue]&&Ds[Ue].indexOf(Se.type)!==-1})&&(Se.bbox=Qa(Se).bbox(),this.update(Se))})};function za(le,Se){var Ue=-90,Et=90,qe=-90,et=90,ct=270,jt=-270;le.forEach(function(pr){var zt=jo(pr),Hr=zt[1],Zr=zt[3],hn=zt[0],gn=zt[2];Hr>Ue&&(Ue=Hr),Zr<Et&&(Et=Zr),Zr>qe&&(qe=Zr),Hr<et&&(et=Hr),hn<ct&&(ct=hn),gn>jt&&(jt=gn)});var Xt=Se;return Ue+Xt.lat>85&&(Xt.lat=85-Ue),qe+Xt.lat>90&&(Xt.lat=90-qe),Et+Xt.lat<-85&&(Xt.lat=-85-Et),et+Xt.lat<-90&&(Xt.lat=-90-et),ct+Xt.lng<=-270&&(Xt.lng+=360*Math.ceil(Math.abs(Xt.lng)/360)),jt+Xt.lng>=270&&(Xt.lng-=360*Math.ceil(Math.abs(Xt.lng)/360)),Xt}function es(le,Se){var Ue=za(le.map(function(Et){return Et.toGeoJSON()}),Se);le.forEach(function(Et){var qe,et=Et.getCoordinates(),ct=function(Xt){var pr={lng:Xt[0]+Ue.lng,lat:Xt[1]+Ue.lat};return[pr.lng,pr.lat]},jt=function(Xt){return Xt.map(function(pr){return ct(pr)})};Et.type===z?qe=ct(et):Et.type===$||Et.type===G?qe=et.map(ct):Et.type===j||Et.type===q?qe=et.map(jt):Et.type===ee&&(qe=et.map(function(Xt){return Xt.map(function(pr){return jt(pr)})})),Et.incomingCoords(qe)})}var Pi={onSetup:function(le){var Se=this,Ue={dragMoveLocation:null,boxSelectStartLocation:null,boxSelectElement:void 0,boxSelecting:!1,canBoxSelect:!1,dragMoving:!1,canDragMove:!1,initiallySelectedFeatureIds:le.featureIds||[]};return this.setSelected(Ue.initiallySelectedFeatureIds.filter(function(Et){return Se.getFeature(Et)!==void 0})),this.fireActionable(),this.setActionableState({combineFeatures:!0,uncombineFeatures:!0,trash:!0}),Ue},fireUpdate:function(){this.map.fire(J,{action:pe,features:this.getSelected().map(function(le){return le.toGeoJSON()})})},fireActionable:function(){var le=this,Se=this.getSelected(),Ue=Se.filter(function(jt){return le.isInstanceOf("MultiFeature",jt)}),Et=!1;if(Se.length>1){Et=!0;var qe=Se[0].type.replace("Multi","");Se.forEach(function(jt){jt.type.replace("Multi","")!==qe&&(Et=!1)})}var et=Ue.length>0,ct=Se.length>0;this.setActionableState({combineFeatures:Et,uncombineFeatures:et,trash:ct})},getUniqueIds:function(le){return le.length?le.map(function(Se){return Se.properties.id}).filter(function(Se){return Se!==void 0}).reduce(function(Se,Ue){return Se.add(Ue),Se},new pt).values():[]},stopExtendedInteractions:function(le){le.boxSelectElement&&(le.boxSelectElement.parentNode&&le.boxSelectElement.parentNode.removeChild(le.boxSelectElement),le.boxSelectElement=null),this.map.dragPan.enable(),le.boxSelecting=!1,le.canBoxSelect=!1,le.dragMoving=!1,le.canDragMove=!1},onStop:function(){Ir(this)},onMouseMove:function(le){return this.stopExtendedInteractions(le),!0},onMouseOut:function(le){return!le.dragMoving||this.fireUpdate()}};Pi.onTap=Pi.onClick=function(le,Se){return sn(Se)?this.clickAnywhere(le,Se):Sr(ke)(Se)?this.clickOnVertex(le,Se):function(Ue){return!!Ue.featureTarget&&!!Ue.featureTarget.properties&&Ue.featureTarget.properties.meta===Pe}(Se)?this.clickOnFeature(le,Se):void 0},Pi.clickAnywhere=function(le){var Se=this,Ue=this.getSelectedIds();Ue.length&&(this.clearSelectedFeatures(),Ue.forEach(function(Et){return Se.doRender(Et)})),Ir(this),this.stopExtendedInteractions(le)},Pi.clickOnVertex=function(le,Se){this.changeMode(re.DIRECT_SELECT,{featureId:Se.featureTarget.properties.parent,coordPath:Se.featureTarget.properties.coord_path,startPos:Se.lngLat}),this.updateUIClasses({mouse:X})},Pi.startOnActiveFeature=function(le,Se){this.stopExtendedInteractions(le),this.map.dragPan.disable(),this.doRender(Se.featureTarget.properties.id),le.canDragMove=!0,le.dragMoveLocation=Se.lngLat},Pi.clickOnFeature=function(le,Se){var Ue=this;Br(this),this.stopExtendedInteractions(le);var Et=Ye(Se),qe=this.getSelectedIds(),et=Se.featureTarget.properties.id,ct=this.isSelected(et);if(!Et&&ct&&this.getFeature(et).type!==z)return this.changeMode(re.DIRECT_SELECT,{featureId:et});ct&&Et?(this.deselect(et),this.updateUIClasses({mouse:W}),qe.length===1&&Ir(this)):!ct&&Et?(this.select(et),this.updateUIClasses({mouse:X})):ct||Et||(qe.forEach(function(jt){return Ue.doRender(jt)}),this.setSelected(et),this.updateUIClasses({mouse:X})),this.doRender(et)},Pi.onMouseDown=function(le,Se){return rr(Se)?this.startOnActiveFeature(le,Se):this.drawConfig.boxSelect&&function(Ue){return!!Ue.originalEvent&&!!Ue.originalEvent.shiftKey&&Ue.originalEvent.button===0}(Se)?this.startBoxSelect(le,Se):void 0},Pi.startBoxSelect=function(le,Se){this.stopExtendedInteractions(le),this.map.dragPan.disable(),le.boxSelectStartLocation=on(Se.originalEvent,this.map.getContainer()),le.canBoxSelect=!0},Pi.onTouchStart=function(le,Se){if(rr(Se))return this.startOnActiveFeature(le,Se)},Pi.onDrag=function(le,Se){return le.canDragMove?this.dragMove(le,Se):this.drawConfig.boxSelect&&le.canBoxSelect?this.whileBoxSelect(le,Se):void 0},Pi.whileBoxSelect=function(le,Se){le.boxSelecting=!0,this.updateUIClasses({mouse:k}),le.boxSelectElement||(le.boxSelectElement=document.createElement("div"),le.boxSelectElement.classList.add(E),this.map.getContainer().appendChild(le.boxSelectElement));var Ue=on(Se.originalEvent,this.map.getContainer()),Et=Math.min(le.boxSelectStartLocation.x,Ue.x),qe=Math.max(le.boxSelectStartLocation.x,Ue.x),et=Math.min(le.boxSelectStartLocation.y,Ue.y),ct=Math.max(le.boxSelectStartLocation.y,Ue.y),jt="translate("+Et+"px, "+et+"px)";le.boxSelectElement.style.transform=jt,le.boxSelectElement.style.WebkitTransform=jt,le.boxSelectElement.style.width=qe-Et+"px",le.boxSelectElement.style.height=ct-et+"px"},Pi.dragMove=function(le,Se){le.dragMoving=!0,Se.originalEvent.stopPropagation();var Ue={lng:Se.lngLat.lng-le.dragMoveLocation.lng,lat:Se.lngLat.lat-le.dragMoveLocation.lat};es(this.getSelected(),Ue),le.dragMoveLocation=Se.lngLat},Pi.onMouseUp=function(le,Se){var Ue=this;if(le.dragMoving)this.fireUpdate();else if(le.boxSelecting){var Et=[le.boxSelectStartLocation,on(Se.originalEvent,this.map.getContainer())],qe=this.featuresAt(null,Et,"click"),et=this.getUniqueIds(qe).filter(function(ct){return!Ue.isSelected(ct)});et.length&&(this.select(et),et.forEach(function(ct){return Ue.doRender(ct)}),this.updateUIClasses({mouse:X}))}this.stopExtendedInteractions(le)},Pi.toDisplayFeatures=function(le,Se,Ue){Se.properties.active=this.isSelected(Se.properties.id)?ze:Ge,Ue(Se),this.fireActionable(),Se.properties.active===ze&&Se.geometry.type!==z&&Gt(Se).forEach(Ue)},Pi.onTrash=function(){this.deleteFeature(this.getSelectedIds()),this.fireActionable()},Pi.onCombineFeatures=function(){var le=this.getSelected();if(!(le.length===0||le.length<2)){for(var Se=[],Ue=[],Et=le[0].type.replace("Multi",""),qe=0;qe<le.length;qe++){var et=le[qe];if(et.type.replace("Multi","")!==Et)return;et.type.includes("Multi")?et.getCoordinates().forEach(function(jt){Se.push(jt)}):Se.push(et.getCoordinates()),Ue.push(et.toGeoJSON())}if(Ue.length>1){var ct=this.newFeature({type:N,properties:Ue[0].properties,geometry:{type:"Multi"+Et,coordinates:Se}});this.addFeature(ct),this.deleteFeature(this.getSelectedIds(),{silent:!0}),this.setSelected([ct.id]),this.map.fire(se,{createdFeatures:[ct.toGeoJSON()],deletedFeatures:Ue})}this.fireActionable()}},Pi.onUncombineFeatures=function(){var le=this,Se=this.getSelected();if(Se.length!==0){for(var Ue=[],Et=[],qe=function(ct){var jt=Se[ct];le.isInstanceOf("MultiFeature",jt)&&(jt.getFeatures().forEach(function(Xt){le.addFeature(Xt),Xt.properties=jt.properties,Ue.push(Xt.toGeoJSON()),le.select([Xt.id])}),le.deleteFeature(jt.id,{silent:!0}),Et.push(jt.toGeoJSON()))},et=0;et<Se.length;et++)qe(et);Ue.length>1&&this.map.fire(me,{createdFeatures:Ue,deletedFeatures:Et}),this.fireActionable()}};var Ns=Sr(ke),dr=Sr(Re),Oi={fireUpdate:function(){this.map.fire(J,{action:Ce,features:this.getSelected().map(function(le){return le.toGeoJSON()})})},fireActionable:function(le){this.setActionableState({combineFeatures:!1,uncombineFeatures:!1,trash:le.selectedCoordPaths.length>0})},startDragging:function(le,Se){this.map.dragPan.disable(),le.canDragMove=!0,le.dragMoveLocation=Se.lngLat},stopDragging:function(le){this.map.dragPan.enable(),le.dragMoving=!1,le.canDragMove=!1,le.dragMoveLocation=null},onVertex:function(le,Se){this.startDragging(le,Se);var Ue=Se.featureTarget.properties,Et=le.selectedCoordPaths.indexOf(Ue.coord_path);Ye(Se)||Et!==-1?Ye(Se)&&Et===-1&&le.selectedCoordPaths.push(Ue.coord_path):le.selectedCoordPaths=[Ue.coord_path];var qe=this.pathsToCoordinates(le.featureId,le.selectedCoordPaths);this.setSelectedCoordinates(qe)},onMidpoint:function(le,Se){this.startDragging(le,Se);var Ue=Se.featureTarget.properties;le.feature.addCoordinate(Ue.coord_path,Ue.lng,Ue.lat),this.fireUpdate(),le.selectedCoordPaths=[Ue.coord_path]},pathsToCoordinates:function(le,Se){return Se.map(function(Ue){return{feature_id:le,coord_path:Ue}})},onFeature:function(le,Se){le.selectedCoordPaths.length===0?this.startDragging(le,Se):this.stopDragging(le)},dragFeature:function(le,Se,Ue){es(this.getSelected(),Ue),le.dragMoveLocation=Se.lngLat},dragVertex:function(le,Se,Ue){for(var Et=le.selectedCoordPaths.map(function(jt){return le.feature.getCoordinate(jt)}),qe=za(Et.map(function(jt){return{type:N,properties:{},geometry:{type:z,coordinates:jt}}}),Ue),et=0;et<Et.length;et++){var ct=Et[et];le.feature.updateCoordinate(le.selectedCoordPaths[et],ct[0]+qe.lng,ct[1]+qe.lat)}},clickNoTarget:function(){this.changeMode(re.SIMPLE_SELECT)},clickInactive:function(){this.changeMode(re.SIMPLE_SELECT)},clickActiveFeature:function(le){le.selectedCoordPaths=[],this.clearSelectedCoordinates(),le.feature.changed()},onSetup:function(le){var Se=le.featureId,Ue=this.getFeature(Se);if(!Ue)throw new Error("You must provide a featureId to enter direct_select mode");if(Ue.type===z)throw new TypeError("direct_select mode doesn't handle point features");var Et={featureId:Se,feature:Ue,dragMoveLocation:le.startPos||null,dragMoving:!1,canDragMove:!1,selectedCoordPaths:le.coordPath?[le.coordPath]:[]};return this.setSelectedCoordinates(this.pathsToCoordinates(Se,Et.selectedCoordPaths)),this.setSelected(Se),Br(this),this.setActionableState({trash:!0}),Et},onStop:function(){Ir(this),this.clearSelectedCoordinates()},toDisplayFeatures:function(le,Se,Ue){le.featureId===Se.properties.id?(Se.properties.active=ze,Ue(Se),Gt(Se,{map:this.map,midpoints:!0,selectedPaths:le.selectedCoordPaths}).forEach(Ue)):(Se.properties.active=Ge,Ue(Se)),this.fireActionable(le)},onTrash:function(le){le.selectedCoordPaths.sort(function(Se,Ue){return Ue.localeCompare(Se,"en",{numeric:!0})}).forEach(function(Se){return le.feature.removeCoordinate(Se)}),this.fireUpdate(),le.selectedCoordPaths=[],this.clearSelectedCoordinates(),this.fireActionable(le),le.feature.isValid()===!1&&(this.deleteFeature([le.featureId]),this.changeMode(re.SIMPLE_SELECT,{}))},onMouseMove:function(le,Se){var Ue=rr(Se),Et=Ns(Se),qe=le.selectedCoordPaths.length===0;return Ue&&qe||Et&&!qe?this.updateUIClasses({mouse:X}):this.updateUIClasses({mouse:D}),this.stopDragging(le),!0},onMouseOut:function(le){return le.dragMoving&&this.fireUpdate(),!0}};Oi.onTouchStart=Oi.onMouseDown=function(le,Se){return Ns(Se)?this.onVertex(le,Se):rr(Se)?this.onFeature(le,Se):dr(Se)?this.onMidpoint(le,Se):void 0},Oi.onDrag=function(le,Se){if(le.canDragMove===!0){le.dragMoving=!0,Se.originalEvent.stopPropagation();var Ue={lng:Se.lngLat.lng-le.dragMoveLocation.lng,lat:Se.lngLat.lat-le.dragMoveLocation.lat};le.selectedCoordPaths.length>0?this.dragVertex(le,Se,Ue):this.dragFeature(le,Se,Ue),le.dragMoveLocation=Se.lngLat}},Oi.onClick=function(le,Se){return sn(Se)?this.clickNoTarget(le,Se):rr(Se)?this.clickActiveFeature(le,Se):tr(Se)?this.clickInactive(le,Se):void this.stopDragging(le)},Oi.onTap=function(le,Se){return sn(Se)?this.clickNoTarget(le,Se):rr(Se)?this.clickActiveFeature(le,Se):tr(Se)?this.clickInactive(le,Se):void 0},Oi.onTouchEnd=Oi.onMouseUp=function(le){le.dragMoving&&this.fireUpdate(),this.stopDragging(le)};var Li={};function ho(le,Se){return!!le.lngLat&&le.lngLat.lng===Se[0]&&le.lngLat.lat===Se[1]}Li.onSetup=function(){var le=this.newFeature({type:N,properties:{},geometry:{type:z,coordinates:[]}});return this.addFeature(le),this.clearSelectedFeatures(),this.updateUIClasses({mouse:k}),this.activateUIButton(H.POINT),this.setActionableState({trash:!0}),{point:le}},Li.stopDrawingAndRemove=function(le){this.deleteFeature([le.point.id],{silent:!0}),this.changeMode(re.SIMPLE_SELECT)},Li.onTap=Li.onClick=function(le,Se){this.updateUIClasses({mouse:X}),le.point.updateCoordinate("",Se.lngLat.lng,Se.lngLat.lat),this.map.fire(ce,{features:[le.point.toGeoJSON()]}),this.changeMode(re.SIMPLE_SELECT,{featureIds:[le.point.id]})},Li.onStop=function(le){this.activateUIButton(),le.point.getCoordinate().length||this.deleteFeature([le.point.id],{silent:!0})},Li.toDisplayFeatures=function(le,Se,Ue){var Et=Se.properties.id===le.point.id;if(Se.properties.active=Et?ze:Ge,!Et)return Ue(Se)},Li.onTrash=Li.stopDrawingAndRemove,Li.onKeyUp=function(le,Se){if(Ve(Se)||gt(Se))return this.stopDrawingAndRemove(le,Se)};var qs={onSetup:function(){var le=this.newFeature({type:N,properties:{},geometry:{type:j,coordinates:[[]]}});return this.addFeature(le),this.clearSelectedFeatures(),Br(this),this.updateUIClasses({mouse:k}),this.activateUIButton(H.POLYGON),this.setActionableState({trash:!0}),{polygon:le,currentVertexPosition:0}},clickAnywhere:function(le,Se){if(le.currentVertexPosition>0&&ho(Se,le.polygon.coordinates[0][le.currentVertexPosition-1]))return this.changeMode(re.SIMPLE_SELECT,{featureIds:[le.polygon.id]});this.updateUIClasses({mouse:k}),le.polygon.updateCoordinate("0."+le.currentVertexPosition,Se.lngLat.lng,Se.lngLat.lat),le.currentVertexPosition++,le.polygon.updateCoordinate("0."+le.currentVertexPosition,Se.lngLat.lng,Se.lngLat.lat)},clickOnVertex:function(le){return this.changeMode(re.SIMPLE_SELECT,{featureIds:[le.polygon.id]})},onMouseMove:function(le,Se){le.polygon.updateCoordinate("0."+le.currentVertexPosition,Se.lngLat.lng,Se.lngLat.lat),un(Se)&&this.updateUIClasses({mouse:W})}};qs.onTap=qs.onClick=function(le,Se){return un(Se)?this.clickOnVertex(le,Se):this.clickAnywhere(le,Se)},qs.onKeyUp=function(le,Se){Ve(Se)?(this.deleteFeature([le.polygon.id],{silent:!0}),this.changeMode(re.SIMPLE_SELECT)):gt(Se)&&this.changeMode(re.SIMPLE_SELECT,{featureIds:[le.polygon.id]})},qs.onStop=function(le){this.updateUIClasses({mouse:D}),Ir(this),this.activateUIButton(),this.getFeature(le.polygon.id)!==void 0&&(le.polygon.removeCoordinate("0."+le.currentVertexPosition),le.polygon.isValid()?this.map.fire(ce,{features:[le.polygon.toGeoJSON()]}):(this.deleteFeature([le.polygon.id],{silent:!0}),this.changeMode(re.SIMPLE_SELECT,{},{silent:!0})))},qs.toDisplayFeatures=function(le,Se,Ue){var Et=Se.properties.id===le.polygon.id;if(Se.properties.active=Et?ze:Ge,!Et)return Ue(Se);if(Se.geometry.coordinates.length!==0){var qe=Se.geometry.coordinates[0].length;if(!(qe<3)){if(Se.properties.meta=Pe,Ue($t(le.polygon.id,Se.geometry.coordinates[0][0],"0.0",!1)),qe>3){var et=Se.geometry.coordinates[0].length-3;Ue($t(le.polygon.id,Se.geometry.coordinates[0][et],"0."+et,!1))}if(qe<=4){var ct=[[Se.geometry.coordinates[0][0][0],Se.geometry.coordinates[0][0][1]],[Se.geometry.coordinates[0][1][0],Se.geometry.coordinates[0][1][1]]];if(Ue({type:N,properties:Se.properties,geometry:{coordinates:ct,type:$}}),qe===3)return}return Ue(Se)}}},qs.onTrash=function(le){this.deleteFeature([le.polygon.id],{silent:!0}),this.changeMode(re.SIMPLE_SELECT)};var fn={onSetup:function(le){var Se,Ue,Et=(le=le||{}).featureId,qe="forward";if(Et){if(!(Se=this.getFeature(Et)))throw new Error("Could not find a feature with the provided featureId");var et=le.from;if(et&&et.type==="Feature"&&et.geometry&&et.geometry.type==="Point"&&(et=et.geometry),et&&et.type==="Point"&&et.coordinates&&et.coordinates.length===2&&(et=et.coordinates),!et||!Array.isArray(et))throw new Error("Please use the `from` property to indicate which point to continue the line from");var ct=Se.coordinates.length-1;if(Se.coordinates[ct][0]===et[0]&&Se.coordinates[ct][1]===et[1])Ue=ct+1,Se.addCoordinate.apply(Se,[Ue].concat(Se.coordinates[ct]));else{if(Se.coordinates[0][0]!==et[0]||Se.coordinates[0][1]!==et[1])throw new Error("`from` should match the point at either the start or the end of the provided LineString");qe="backwards",Ue=0,Se.addCoordinate.apply(Se,[Ue].concat(Se.coordinates[0]))}}else Se=this.newFeature({type:N,properties:{},geometry:{type:$,coordinates:[]}}),Ue=0,this.addFeature(Se);return this.clearSelectedFeatures(),Br(this),this.updateUIClasses({mouse:k}),this.activateUIButton(H.LINE),this.setActionableState({trash:!0}),{line:Se,currentVertexPosition:Ue,direction:qe}},clickAnywhere:function(le,Se){if(le.currentVertexPosition>0&&ho(Se,le.line.coordinates[le.currentVertexPosition-1])||le.direction==="backwards"&&ho(Se,le.line.coordinates[le.currentVertexPosition+1]))return this.changeMode(re.SIMPLE_SELECT,{featureIds:[le.line.id]});this.updateUIClasses({mouse:k}),le.line.updateCoordinate(le.currentVertexPosition,Se.lngLat.lng,Se.lngLat.lat),le.direction==="forward"?(le.currentVertexPosition++,le.line.updateCoordinate(le.currentVertexPosition,Se.lngLat.lng,Se.lngLat.lat)):le.line.addCoordinate(0,Se.lngLat.lng,Se.lngLat.lat)},clickOnVertex:function(le){return this.changeMode(re.SIMPLE_SELECT,{featureIds:[le.line.id]})},onMouseMove:function(le,Se){le.line.updateCoordinate(le.currentVertexPosition,Se.lngLat.lng,Se.lngLat.lat),un(Se)&&this.updateUIClasses({mouse:W})}};fn.onTap=fn.onClick=function(le,Se){if(un(Se))return this.clickOnVertex(le,Se);this.clickAnywhere(le,Se)},fn.onKeyUp=function(le,Se){gt(Se)?this.changeMode(re.SIMPLE_SELECT,{featureIds:[le.line.id]}):Ve(Se)&&(this.deleteFeature([le.line.id],{silent:!0}),this.changeMode(re.SIMPLE_SELECT))},fn.onStop=function(le){Ir(this),this.activateUIButton(),this.getFeature(le.line.id)!==void 0&&(le.line.removeCoordinate(""+le.currentVertexPosition),le.line.isValid()?this.map.fire(ce,{features:[le.line.toGeoJSON()]}):(this.deleteFeature([le.line.id],{silent:!0}),this.changeMode(re.SIMPLE_SELECT,{},{silent:!0})))},fn.onTrash=function(le){this.deleteFeature([le.line.id],{silent:!0}),this.changeMode(re.SIMPLE_SELECT)},fn.toDisplayFeatures=function(le,Se,Ue){var Et=Se.properties.id===le.line.id;if(Se.properties.active=Et?ze:Ge,!Et)return Ue(Se);Se.geometry.coordinates.length<2||(Se.properties.meta=Pe,Ue($t(le.line.id,Se.geometry.coordinates[le.direction==="forward"?Se.geometry.coordinates.length-2:1],""+(le.direction==="forward"?Se.geometry.coordinates.length-2:1),!1)),Ue(Se))};var an={simple_select:Pi,direct_select:Oi,draw_point:Li,draw_polygon:qs,draw_line_string:fn},Dr={defaultMode:re.SIMPLE_SELECT,keybindings:!0,touchEnabled:!0,clickBuffer:2,touchBuffer:25,boxSelect:!0,displayControlsDefault:!0,styles:[{id:"gl-draw-polygon-fill-inactive",type:"fill",filter:["all",["==","active","false"],["==","$type","Polygon"],["!=","mode","static"]],paint:{"fill-color":"#3bb2d0","fill-outline-color":"#3bb2d0","fill-opacity":.1}},{id:"gl-draw-polygon-fill-active",type:"fill",filter:["all",["==","active","true"],["==","$type","Polygon"]],paint:{"fill-color":"#fbb03b","fill-outline-color":"#fbb03b","fill-opacity":.1}},{id:"gl-draw-polygon-midpoint",type:"circle",filter:["all",["==","$type","Point"],["==","meta","midpoint"]],paint:{"circle-radius":3,"circle-color":"#fbb03b"}},{id:"gl-draw-polygon-stroke-inactive",type:"line",filter:["all",["==","active","false"],["==","$type","Polygon"],["!=","mode","static"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#3bb2d0","line-width":2}},{id:"gl-draw-polygon-stroke-active",type:"line",filter:["all",["==","active","true"],["==","$type","Polygon"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#fbb03b","line-dasharray":[.2,2],"line-width":2}},{id:"gl-draw-line-inactive",type:"line",filter:["all",["==","active","false"],["==","$type","LineString"],["!=","mode","static"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#3bb2d0","line-width":2}},{id:"gl-draw-line-active",type:"line",filter:["all",["==","$type","LineString"],["==","active","true"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#fbb03b","line-dasharray":[.2,2],"line-width":2}},{id:"gl-draw-polygon-and-line-vertex-stroke-inactive",type:"circle",filter:["all",["==","meta","vertex"],["==","$type","Point"],["!=","mode","static"]],paint:{"circle-radius":5,"circle-color":"#fff"}},{id:"gl-draw-polygon-and-line-vertex-inactive",type:"circle",filter:["all",["==","meta","vertex"],["==","$type","Point"],["!=","mode","static"]],paint:{"circle-radius":3,"circle-color":"#fbb03b"}},{id:"gl-draw-point-point-stroke-inactive",type:"circle",filter:["all",["==","active","false"],["==","$type","Point"],["==","meta","feature"],["!=","mode","static"]],paint:{"circle-radius":5,"circle-opacity":1,"circle-color":"#fff"}},{id:"gl-draw-point-inactive",type:"circle",filter:["all",["==","active","false"],["==","$type","Point"],["==","meta","feature"],["!=","mode","static"]],paint:{"circle-radius":3,"circle-color":"#3bb2d0"}},{id:"gl-draw-point-stroke-active",type:"circle",filter:["all",["==","$type","Point"],["==","active","true"],["!=","meta","midpoint"]],paint:{"circle-radius":7,"circle-color":"#fff"}},{id:"gl-draw-point-active",type:"circle",filter:["all",["==","$type","Point"],["!=","meta","midpoint"],["==","active","true"]],paint:{"circle-radius":5,"circle-color":"#fbb03b"}},{id:"gl-draw-polygon-fill-static",type:"fill",filter:["all",["==","mode","static"],["==","$type","Polygon"]],paint:{"fill-color":"#404040","fill-outline-color":"#404040","fill-opacity":.1}},{id:"gl-draw-polygon-stroke-static",type:"line",filter:["all",["==","mode","static"],["==","$type","Polygon"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#404040","line-width":2}},{id:"gl-draw-line-static",type:"line",filter:["all",["==","mode","static"],["==","$type","LineString"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#404040","line-width":2}},{id:"gl-draw-point-static",type:"circle",filter:["all",["==","mode","static"],["==","$type","Point"]],paint:{"circle-radius":5,"circle-color":"#404040"}}],modes:an,controls:{},userProperties:!1},Rn={point:!0,line_string:!0,polygon:!0,trash:!0,combine_features:!0,uncombine_features:!0},zr={point:!1,line_string:!1,polygon:!1,trash:!1,combine_features:!1,uncombine_features:!1};function Fn(le,Se){return le.map(function(Ue){return Ue.source?Ue:Ot(Ue,{id:Ue.id+"."+Se,source:Se==="hot"?T:A})})}var Tn=Ze(function(le,Se){var Ue="[object Arguments]",Et="[object Map]",qe="[object Object]",et="[object Set]",ct=/^\[object .+?Constructor\]$/,jt=/^(?:0|[1-9]\d*)$/,Xt={};Xt["[object Float32Array]"]=Xt["[object Float64Array]"]=Xt["[object Int8Array]"]=Xt["[object Int16Array]"]=Xt["[object Int32Array]"]=Xt["[object Uint8Array]"]=Xt["[object Uint8ClampedArray]"]=Xt["[object Uint16Array]"]=Xt["[object Uint32Array]"]=!0,Xt[Ue]=Xt["[object Array]"]=Xt["[object ArrayBuffer]"]=Xt["[object Boolean]"]=Xt["[object DataView]"]=Xt["[object Date]"]=Xt["[object Error]"]=Xt["[object Function]"]=Xt[Et]=Xt["[object Number]"]=Xt[qe]=Xt["[object RegExp]"]=Xt[et]=Xt["[object String]"]=Xt["[object WeakMap]"]=!1;var pr=typeof xl=="object"&&xl&&xl.Object===Object&&xl,zt=typeof self=="object"&&self&&self.Object===Object&&self,Hr=pr||zt||Function("return this")(),Zr=Se&&!Se.nodeType&&Se,hn=Zr&&le&&!le.nodeType&&le,gn=hn&&hn.exports===Zr,Bn=gn&&pr.process,wr=function(){try{return Bn&&Bn.binding&&Bn.binding("util")}catch{}}(),pn=wr&&wr.isTypedArray;function ci(Jt,yr){for(var dn=-1,Wn=Jt==null?0:Jt.length;++dn<Wn;)if(yr(Jt[dn],dn,Jt))return!0;return!1}function fi(Jt){var yr=-1,dn=Array(Jt.size);return Jt.forEach(function(Wn,Do){dn[++yr]=[Do,Wn]}),dn}function Lo(Jt){var yr=-1,dn=Array(Jt.size);return Jt.forEach(function(Wn){dn[++yr]=Wn}),dn}var On,ao,Ja,$i=Array.prototype,_i=Function.prototype,Hn=Object.prototype,wf=Hr["__core-js_shared__"],yd=_i.toString,ba=Hn.hasOwnProperty,ju=(On=/[^.]+$/.exec(wf&&wf.keys&&wf.keys.IE_PROTO||""))?"Symbol(src)_1."+On:"",$p=Hn.toString,A_=RegExp("^"+yd.call(ba).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Fp=gn?Hr.Buffer:void 0,Uu=Hr.Symbol,Yo=Hr.Uint8Array,Eh=Hn.propertyIsEnumerable,Gl=$i.splice,el=Uu?Uu.toStringTag:void 0,Cf=Object.getOwnPropertySymbols,Xs=Fp?Fp.isBuffer:void 0,zp=(ao=Object.keys,Ja=Object,function(Jt){return ao(Ja(Jt))}),Vu=cc(Hr,"DataView"),ru=cc(Hr,"Map"),Bp=cc(Hr,"Promise"),xd=cc(Hr,"Set"),Sh=cc(Hr,"WeakMap"),sa=cc(Object,"create"),Th=gl(Vu),gi=gl(ru),R_=gl(Bp),tg=gl(xd),Hu=gl(Sh),_d=Uu?Uu.prototype:void 0,Ph=_d?_d.valueOf:void 0;function po(Jt){var yr=-1,dn=Jt==null?0:Jt.length;for(this.clear();++yr<dn;){var Wn=Jt[yr];this.set(Wn[0],Wn[1])}}function Fs(Jt){var yr=-1,dn=Jt==null?0:Jt.length;for(this.clear();++yr<dn;){var Wn=Jt[yr];this.set(Wn[0],Wn[1])}}function lc(Jt){var yr=-1,dn=Jt==null?0:Jt.length;for(this.clear();++yr<dn;){var Wn=Jt[yr];this.set(Wn[0],Wn[1])}}function Wu(Jt){var yr=-1,dn=Jt==null?0:Jt.length;for(this.__data__=new lc;++yr<dn;)this.add(Jt[yr])}function wa(Jt){var yr=this.__data__=new Fs(Jt);this.size=yr.size}function bd(Jt,yr){var dn=tl(Jt),Wn=!dn&&a0(Jt),Do=!dn&&!Wn&&Up(Jt),Di=!dn&&!Wn&&!Do&&Sv(Jt),mo=dn||Wn||Do||Di,Io=mo?function(Ys,uc){for(var Tl=-1,Ko=Array(Ys);++Tl<Ys;)Ko[Tl]=uc(Tl);return Ko}(Jt.length,String):[],rl=Io.length;for(var Ps in Jt)!yr&&!ba.call(Jt,Ps)||mo&&(Ps=="length"||Do&&(Ps=="offset"||Ps=="parent")||Di&&(Ps=="buffer"||Ps=="byteLength"||Ps=="byteOffset")||ng(Ps,rl))||Io.push(Ps);return Io}function wd(Jt,yr){for(var dn=Jt.length;dn--;)if(ig(Jt[dn][0],yr))return dn;return-1}function Ih(Jt){return Jt==null?Jt===void 0?"[object Undefined]":"[object Null]":el&&el in Object(Jt)?function(yr){var dn=ba.call(yr,el),Wn=yr[el];try{yr[el]=void 0;var Do=!0}catch{}var Di=$p.call(yr);return Do&&(dn?yr[el]=Wn:delete yr[el]),Di}(Jt):function(yr){return $p.call(yr)}(Jt)}function Cd(Jt){return Tf(Jt)&&Ih(Jt)==Ue}function Ed(Jt,yr,dn,Wn,Do){return Jt===yr||(Jt==null||yr==null||!Tf(Jt)&&!Tf(yr)?Jt!=Jt&&yr!=yr:function(Di,mo,Io,rl,Ps,Ys){var uc=tl(Di),Tl=tl(mo),Ko=uc?"[object Array]":nu(Di),ql=Tl?"[object Array]":nu(mo),iu=(Ko=Ko==Ue?qe:Ko)==qe,Wp=(ql=ql==Ue?qe:ql)==qe,Pf=Ko==ql;if(Pf&&Up(Di)){if(!Up(mo))return!1;uc=!0,iu=!1}if(Pf&&!iu)return Ys||(Ys=new wa),uc||Sv(Di)?Mh(Di,mo,Io,rl,Ps,Ys):function(gr,ir,In,Zn,lo,Mo,Zi){switch(In){case"[object DataView]":if(gr.byteLength!=ir.byteLength||gr.byteOffset!=ir.byteOffset)return!1;gr=gr.buffer,ir=ir.buffer;case"[object ArrayBuffer]":return!(gr.byteLength!=ir.byteLength||!Mo(new Yo(gr),new Yo(ir)));case"[object Boolean]":case"[object Date]":case"[object Number]":return ig(+gr,+ir);case"[object Error]":return gr.name==ir.name&&gr.message==ir.message;case"[object RegExp]":case"[object String]":return gr==ir+"";case Et:var ou=fi;case et:var qp=1&Zn;if(ou||(ou=Lo),gr.size!=ir.size&&!qp)return!1;var nl=Zi.get(gr);if(nl)return nl==ir;Zn|=2,Zi.set(gr,ir);var fc=Mh(ou(gr),ou(ir),Zn,lo,Mo,Zi);return Zi.delete(gr),fc;case"[object Symbol]":if(Ph)return Ph.call(gr)==Ph.call(ir)}return!1}(Di,mo,Ko,Io,rl,Ps,Ys);if(!(1&Io)){var Gp=iu&&ba.call(Di,"__wrapped__"),og=Wp&&ba.call(mo,"__wrapped__");if(Gp||og){var Sd=Gp?Di.value():Di,Zt=og?mo.value():mo;return Ys||(Ys=new wa),Ps(Sd,Zt,Io,rl,Ys)}}return Pf?(Ys||(Ys=new wa),function(gr,ir,In,Zn,lo,Mo){var Zi=1&In,ou=jp(gr),qp=ou.length,nl=jp(ir).length;if(qp!=nl&&!Zi)return!1;for(var fc=qp;fc--;){var Xl=ou[fc];if(!(Zi?Xl in ir:ba.call(ir,Xl)))return!1}var If=Mo.get(gr);if(If&&Mo.get(ir))return If==ir;var Mf=!0;Mo.set(gr,ir),Mo.set(ir,gr);for(var Pl=Zi;++fc<qp;){Xl=ou[fc];var Qi=gr[Xl],vl=ir[Xl];if(Zn)var Td=Zi?Zn(vl,Qi,Xl,ir,gr,Mo):Zn(Qi,vl,Xl,gr,ir,Mo);if(!(Td===void 0?Qi===vl||lo(Qi,vl,In,Zn,Mo):Td)){Mf=!1;break}Pl||(Pl=Xl=="constructor")}if(Mf&&!Pl){var Af=gr.constructor,su=ir.constructor;Af==su||!("constructor"in gr)||!("constructor"in ir)||typeof Af=="function"&&Af instanceof Af&&typeof su=="function"&&su instanceof su||(Mf=!1)}return Mo.delete(gr),Mo.delete(ir),Mf}(Di,mo,Io,rl,Ps,Ys)):!1}(Jt,yr,dn,Wn,Ed,Do))}function Ef(Jt){return!(!Hp(Jt)||function(yr){return!!ju&&ju in yr}(Jt))&&(Sf(Jt)?A_:ct).test(gl(Jt))}function rg(Jt){if(dn=(yr=Jt)&&yr.constructor,Wn=typeof dn=="function"&&dn.prototype||Hn,yr!==Wn)return zp(Jt);var yr,dn,Wn,Do=[];for(var Di in Object(Jt))ba.call(Jt,Di)&&Di!="constructor"&&Do.push(Di);return Do}function Mh(Jt,yr,dn,Wn,Do,Di){var mo=1&dn,Io=Jt.length,rl=yr.length;if(Io!=rl&&!(mo&&rl>Io))return!1;var Ps=Di.get(Jt);if(Ps&&Di.get(yr))return Ps==yr;var Ys=-1,uc=!0,Tl=2&dn?new Wu:void 0;for(Di.set(Jt,yr),Di.set(yr,Jt);++Ys<Io;){var Ko=Jt[Ys],ql=yr[Ys];if(Wn)var iu=mo?Wn(ql,Ko,Ys,yr,Jt,Di):Wn(Ko,ql,Ys,Jt,yr,Di);if(iu!==void 0){if(iu)continue;uc=!1;break}if(Tl){if(!ci(yr,function(Wp,Pf){if(Gp=Pf,!Tl.has(Gp)&&(Ko===Wp||Do(Ko,Wp,dn,Wn,Di)))return Tl.push(Pf);var Gp})){uc=!1;break}}else if(Ko!==ql&&!Do(Ko,ql,dn,Wn,Di)){uc=!1;break}}return Di.delete(Jt),Di.delete(yr),uc}function jp(Jt){return function(yr,dn,Wn){var Do=dn(yr);return tl(yr)?Do:function(Di,mo){for(var Io=-1,rl=mo.length,Ps=Di.length;++Io<rl;)Di[Ps+Io]=mo[Io];return Di}(Do,Wn(yr))}(Jt,l0,Ev)}function Ii(Jt,yr){var dn,Wn,Do=Jt.__data__;return((Wn=typeof(dn=yr))=="string"||Wn=="number"||Wn=="symbol"||Wn=="boolean"?dn!=="__proto__":dn===null)?Do[typeof yr=="string"?"string":"hash"]:Do.map}function cc(Jt,yr){var dn=function(Wn,Do){return Wn==null?void 0:Wn[Do]}(Jt,yr);return Ef(dn)?dn:void 0}po.prototype.clear=function(){this.__data__=sa?sa(null):{},this.size=0},po.prototype.delete=function(Jt){var yr=this.has(Jt)&&delete this.__data__[Jt];return this.size-=yr?1:0,yr},po.prototype.get=function(Jt){var yr=this.__data__;if(sa){var dn=yr[Jt];return dn==="__lodash_hash_undefined__"?void 0:dn}return ba.call(yr,Jt)?yr[Jt]:void 0},po.prototype.has=function(Jt){var yr=this.__data__;return sa?yr[Jt]!==void 0:ba.call(yr,Jt)},po.prototype.set=function(Jt,yr){var dn=this.__data__;return this.size+=this.has(Jt)?0:1,dn[Jt]=sa&&yr===void 0?"__lodash_hash_undefined__":yr,this},Fs.prototype.clear=function(){this.__data__=[],this.size=0},Fs.prototype.delete=function(Jt){var yr=this.__data__,dn=wd(yr,Jt);return!(dn<0)&&(dn==yr.length-1?yr.pop():Gl.call(yr,dn,1),--this.size,!0)},Fs.prototype.get=function(Jt){var yr=this.__data__,dn=wd(yr,Jt);return dn<0?void 0:yr[dn][1]},Fs.prototype.has=function(Jt){return wd(this.__data__,Jt)>-1},Fs.prototype.set=function(Jt,yr){var dn=this.__data__,Wn=wd(dn,Jt);return Wn<0?(++this.size,dn.push([Jt,yr])):dn[Wn][1]=yr,this},lc.prototype.clear=function(){this.size=0,this.__data__={hash:new po,map:new(ru||Fs),string:new po}},lc.prototype.delete=function(Jt){var yr=Ii(this,Jt).delete(Jt);return this.size-=yr?1:0,yr},lc.prototype.get=function(Jt){return Ii(this,Jt).get(Jt)},lc.prototype.has=function(Jt){return Ii(this,Jt).has(Jt)},lc.prototype.set=function(Jt,yr){var dn=Ii(this,Jt),Wn=dn.size;return dn.set(Jt,yr),this.size+=dn.size==Wn?0:1,this},Wu.prototype.add=Wu.prototype.push=function(Jt){return this.__data__.set(Jt,"__lodash_hash_undefined__"),this},Wu.prototype.has=function(Jt){return this.__data__.has(Jt)},wa.prototype.clear=function(){this.__data__=new Fs,this.size=0},wa.prototype.delete=function(Jt){var yr=this.__data__,dn=yr.delete(Jt);return this.size=yr.size,dn},wa.prototype.get=function(Jt){return this.__data__.get(Jt)},wa.prototype.has=function(Jt){return this.__data__.has(Jt)},wa.prototype.set=function(Jt,yr){var dn=this.__data__;if(dn instanceof Fs){var Wn=dn.__data__;if(!ru||Wn.length<199)return Wn.push([Jt,yr]),this.size=++dn.size,this;dn=this.__data__=new lc(Wn)}return dn.set(Jt,yr),this.size=dn.size,this};var Ev=Cf?function(Jt){return Jt==null?[]:(Jt=Object(Jt),function(yr,dn){for(var Wn=-1,Do=yr==null?0:yr.length,Di=0,mo=[];++Wn<Do;){var Io=yr[Wn];dn(Io,Wn,yr)&&(mo[Di++]=Io)}return mo}(Cf(Jt),function(yr){return Eh.call(Jt,yr)}))}:function(){return[]},nu=Ih;function ng(Jt,yr){return!!(yr=yr==null?9007199254740991:yr)&&(typeof Jt=="number"||jt.test(Jt))&&Jt>-1&&Jt%1==0&&Jt<yr}function gl(Jt){if(Jt!=null){try{return yd.call(Jt)}catch{}try{return Jt+""}catch{}}return""}function ig(Jt,yr){return Jt===yr||Jt!=Jt&&yr!=yr}(Vu&&nu(new Vu(new ArrayBuffer(1)))!="[object DataView]"||ru&&nu(new ru)!=Et||Bp&&nu(Bp.resolve())!="[object Promise]"||xd&&nu(new xd)!=et||Sh&&nu(new Sh)!="[object WeakMap]")&&(nu=function(Jt){var yr=Ih(Jt),dn=yr==qe?Jt.constructor:void 0,Wn=dn?gl(dn):"";if(Wn)switch(Wn){case Th:return"[object DataView]";case gi:return Et;case R_:return"[object Promise]";case tg:return et;case Hu:return"[object WeakMap]"}return yr});var a0=Cd(function(){return arguments}())?Cd:function(Jt){return Tf(Jt)&&ba.call(Jt,"callee")&&!Eh.call(Jt,"callee")},tl=Array.isArray,Up=Xs||function(){return!1};function Sf(Jt){if(!Hp(Jt))return!1;var yr=Ih(Jt);return yr=="[object Function]"||yr=="[object GeneratorFunction]"||yr=="[object AsyncFunction]"||yr=="[object Proxy]"}function Vp(Jt){return typeof Jt=="number"&&Jt>-1&&Jt%1==0&&Jt<=9007199254740991}function Hp(Jt){var yr=typeof Jt;return Jt!=null&&(yr=="object"||yr=="function")}function Tf(Jt){return Jt!=null&&typeof Jt=="object"}var Sv=pn?function(Jt){return function(yr){return Jt(yr)}}(pn):function(Jt){return Tf(Jt)&&Vp(Jt.length)&&!!Xt[Ih(Jt)]};function l0(Jt){return(yr=Jt)!=null&&Vp(yr.length)&&!Sf(yr)?bd(Jt):rg(Jt);var yr}le.exports=function(Jt,yr){return Ed(Jt,yr)}}),ls={Polygon:Ut,LineString:Ft,Point:er,MultiPolygon:mr,MultiLineString:mr,MultiPoint:mr};function Uo(le,Se){return Se.modes=re,Se.getFeatureIdsAt=function(Ue){return Ie.click({point:Ue},null,le).map(function(Et){return Et.properties.id})},Se.getSelectedIds=function(){return le.store.getSelectedIds()},Se.getSelected=function(){return{type:O,features:le.store.getSelectedIds().map(function(Ue){return le.store.get(Ue)}).map(function(Ue){return Ue.toGeoJSON()})}},Se.getSelectedPoints=function(){return{type:O,features:le.store.getSelectedCoordinates().map(function(Ue){return{type:N,properties:{},geometry:{type:z,coordinates:Ue.coordinates}}})}},Se.set=function(Ue){if(Ue.type===void 0||Ue.type!==O||!Array.isArray(Ue.features))throw new Error("Invalid FeatureCollection");var Et=le.store.createRenderBatch(),qe=le.store.getAllIds().slice(),et=Se.add(Ue),ct=new pt(et);return(qe=qe.filter(function(jt){return!ct.has(jt)})).length&&Se.delete(qe),Et(),et},Se.add=function(Ue){var Et=JSON.parse(JSON.stringify(Xr(Ue))).features.map(function(qe){if(qe.id=qe.id||Je(),qe.geometry===null)throw new Error("Invalid geometry: null");if(le.store.get(qe.id)===void 0||le.store.get(qe.id).type!==qe.geometry.type){var et=ls[qe.geometry.type];if(et===void 0)throw new Error("Invalid geometry type: "+qe.geometry.type+".");var ct=new et(le,qe);le.store.add(ct)}else{var jt=le.store.get(qe.id);jt.properties=qe.properties,Tn(jt.getCoordinates(),qe.geometry.coordinates)||jt.incomingCoords(qe.geometry.coordinates)}return qe.id});return le.store.render(),Et},Se.get=function(Ue){var Et=le.store.get(Ue);if(Et)return Et.toGeoJSON()},Se.getAll=function(){return{type:O,features:le.store.getAll().map(function(Ue){return Ue.toGeoJSON()})}},Se.delete=function(Ue){return le.store.delete(Ue,{silent:!0}),Se.getMode()!==re.DIRECT_SELECT||le.store.getSelectedIds().length?le.store.render():le.events.changeMode(re.SIMPLE_SELECT,void 0,{silent:!0}),Se},Se.deleteAll=function(){return le.store.delete(le.store.getAllIds(),{silent:!0}),Se.getMode()===re.DIRECT_SELECT?le.events.changeMode(re.SIMPLE_SELECT,void 0,{silent:!0}):le.store.render(),Se},Se.changeMode=function(Ue,Et){return Et===void 0&&(Et={}),Ue===re.SIMPLE_SELECT&&Se.getMode()===re.SIMPLE_SELECT?(qe=Et.featureIds||[],et=le.store.getSelectedIds(),qe.length===et.length&&JSON.stringify(qe.map(function(ct){return ct}).sort())===JSON.stringify(et.map(function(ct){return ct}).sort())||(le.store.setSelected(Et.featureIds,{silent:!0}),le.store.render()),Se):(Ue===re.DIRECT_SELECT&&Se.getMode()===re.DIRECT_SELECT&&Et.featureId===le.store.getSelectedIds()[0]||le.events.changeMode(Ue,Et,{silent:!0}),Se);var qe,et},Se.getMode=function(){return le.events.getMode()},Se.trash=function(){return le.events.trash({silent:!0}),Se},Se.combineFeatures=function(){return le.events.combineFeatures({silent:!0}),Se},Se.uncombineFeatures=function(){return le.events.uncombineFeatures({silent:!0}),Se},Se.setFeatureProperty=function(Ue,Et,qe){return le.store.setFeatureProperty(Ue,Et,qe),Se},Se}var ri=function(le,Se){var Ue={options:le=function(qe){qe===void 0&&(qe={});var et=Ot(qe);return qe.controls||(et.controls={}),qe.displayControlsDefault===!1?et.controls=Ot(zr,qe.controls):et.controls=Ot(Rn,qe.controls),(et=Ot(Dr,et)).styles=Fn(et.styles,"cold").concat(Fn(et.styles,"hot")),et}(le)};Se=Uo(Ue,Se),Ue.api=Se;var Et=Wt(Ue);return Se.onAdd=Et.onAdd,Se.onRemove=Et.onRemove,Se.types=H,Se.options=le,Se};function $s(le){ri(le,this)}return $s.modes=an,$s})})(fde);var Xkt=fde.exports,Ou=63710088e-1,YV={meters:Ou,metres:Ou,millimeters:Ou*1e3,millimetres:Ou*1e3,centimeters:Ou*100,centimetres:Ou*100,kilometers:Ou/1e3,kilometres:Ou/1e3,miles:Ou/1609.344,nauticalmiles:Ou/1852,inches:Ou*39.37,yards:Ou/1.0936,feet:Ou*3.28084,radians:1,degrees:Ou/111325},xyt={meters:1,metres:1,millimeters:1e3,millimetres:1e3,centimeters:100,centimetres:100,kilometers:1/1e3,kilometres:1/1e3,miles:1/1609.344,nauticalmiles:1/1852,inches:39.37,yards:1/1.0936,feet:3.28084,radians:1/Ou,degrees:1/111325},KV={meters:1,metres:1,millimeters:1e6,millimetres:1e6,centimeters:1e4,centimetres:1e4,kilometers:1e-6,kilometres:1e-6,acres:247105e-9,miles:386e-9,yards:1.195990046,feet:10.763910417,inches:1550.003100006};function sv(t,e,r){if(r=r||{},!Fm(r))throw new Error("options is invalid");var n=r.bbox,i=r.id;if(t===void 0)throw new Error("geometry is required");if(e&&e.constructor!==Object)throw new Error("properties must be an Object");n&&FM(n),i&&eH(i);var o={type:"Feature"};return i&&(o.id=i),n&&(o.bbox=n),o.properties=e||{},o.geometry=t,o}function _yt(t,e,r){if(r=r||{},!Fm(r))throw new Error("options is invalid");var n=r.bbox;if(!t)throw new Error("type is required");if(!e)throw new Error("coordinates is required");if(!Array.isArray(e))throw new Error("coordinates must be an Array");n&&FM(n);var i;switch(t){case"Point":i=wE(e).geometry;break;case"LineString":i=EE(e).geometry;break;case"Polygon":i=CE(e).geometry;break;case"MultiPoint":i=ZV(e).geometry;break;case"MultiLineString":i=dde(e).geometry;break;case"MultiPolygon":i=hde(e).geometry;break;default:throw new Error(t+" is invalid")}return n&&(i.bbox=n),i}function wE(t,e,r){if(!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!Cc(t[0])||!Cc(t[1]))throw new Error("coordinates must contain numbers");return sv({type:"Point",coordinates:t},e,r)}function byt(t,e,r){if(!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");return Oy(t.map(function(n){return wE(n,e)}),r)}function CE(t,e,r){if(!t)throw new Error("coordinates is required");for(var n=0;n<t.length;n++){var i=t[n];if(i.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var o=0;o<i[i.length-1].length;o++){if(n===0&&o===0&&!Cc(i[0][0])||!Cc(i[0][1]))throw new Error("coordinates must contain numbers");if(i[i.length-1][o]!==i[0][o])throw new Error("First and last Position are not equivalent.")}}return sv({type:"Polygon",coordinates:t},e,r)}function wyt(t,e,r){if(!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");return Oy(t.map(function(n){return CE(n,e)}),r)}function EE(t,e,r){if(!t)throw new Error("coordinates is required");if(t.length<2)throw new Error("coordinates must be an array of two or more positions");if(!Cc(t[0][1])||!Cc(t[0][1]))throw new Error("coordinates must contain numbers");return sv({type:"LineString",coordinates:t},e,r)}function Cyt(t,e,r){if(!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");return Oy(t.map(function(n){return EE(n,e)}),r)}function Oy(t,e){if(e=e||{},!Fm(e))throw new Error("options is invalid");var r=e.bbox,n=e.id;if(!t)throw new Error("No features passed");if(!Array.isArray(t))throw new Error("features must be an Array");r&&FM(r),n&&eH(n);var i={type:"FeatureCollection"};return n&&(i.id=n),r&&(i.bbox=r),i.features=t,i}function dde(t,e,r){if(!t)throw new Error("coordinates is required");return sv({type:"MultiLineString",coordinates:t},e,r)}function ZV(t,e,r){if(!t)throw new Error("coordinates is required");return sv({type:"MultiPoint",coordinates:t},e,r)}function hde(t,e,r){if(!t)throw new Error("coordinates is required");return sv({type:"MultiPolygon",coordinates:t},e,r)}function Eyt(t,e,r){if(!t)throw new Error("geometries is required");if(!Array.isArray(t))throw new Error("geometries must be an Array");return sv({type:"GeometryCollection",geometries:t},e,r)}function Syt(t,e){if(t==null||isNaN(t))throw new Error("num is required");if(e&&!(e>=0))throw new Error("precision must be a positive number");var r=Math.pow(10,e||0);return Math.round(t*r)/r}function QV(t,e){if(t==null)throw new Error("radians is required");if(e&&typeof e!="string")throw new Error("units must be a string");var r=YV[e||"kilometers"];if(!r)throw new Error(e+" units is invalid");return t*r}function JV(t,e){if(t==null)throw new Error("distance is required");if(e&&typeof e!="string")throw new Error("units must be a string");var r=YV[e||"kilometers"];if(!r)throw new Error(e+" units is invalid");return t/r}function Tyt(t,e){return pde(JV(t,e))}function Pyt(t){if(t==null)throw new Error("bearing is required");var e=t%360;return e<0&&(e+=360),e}function pde(t){if(t==null)throw new Error("radians is required");var e=t%(2*Math.PI);return e*180/Math.PI}function $M(t){if(t==null)throw new Error("degrees is required");var e=t%360;return e*Math.PI/180}function Iyt(t,e,r){if(t==null)throw new Error("length is required");if(!(t>=0))throw new Error("length must be a positive number");return QV(JV(t,e),r||"kilometers")}function Myt(t,e,r){if(t==null)throw new Error("area is required");if(!(t>=0))throw new Error("area must be a positive number");var n=KV[e||"meters"];if(!n)throw new Error("invalid original units");var i=KV[r||"kilometers"];if(!i)throw new Error("invalid final units");return t/n*i}function Cc(t){return!isNaN(t)&&t!==null&&!Array.isArray(t)}function Fm(t){return!!t&&t.constructor===Object}function FM(t){if(!t)throw new Error("bbox is required");if(!Array.isArray(t))throw new Error("bbox must be an Array");if(t.length!==4&&t.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");t.forEach(function(e){if(!Cc(e))throw new Error("bbox must only contain numbers")})}function eH(t){if(!t)throw new Error("id is required");if(["string","number"].indexOf(typeof t)===-1)throw new Error("id must be a number or a string")}function Ayt(){throw new Error("method has been renamed to `radiansToDegrees`")}function Ryt(){throw new Error("method has been renamed to `degreesToRadians`")}function kyt(){throw new Error("method has been renamed to `lengthToDegrees`")}function Oyt(){throw new Error("method has been renamed to `lengthToRadians`")}function Lyt(){throw new Error("method has been renamed to `radiansToLength`")}function Dyt(){throw new Error("method has been renamed to `bearingToAzimuth`")}function Nyt(){throw new Error("method has been renamed to `convertLength`")}Object.freeze({earthRadius:Ou,factors:YV,unitsFactors:xyt,areaFactors:KV,feature:sv,geometry:_yt,point:wE,points:byt,polygon:CE,polygons:wyt,lineString:EE,lineStrings:Cyt,featureCollection:Oy,multiLineString:dde,multiPoint:ZV,multiPolygon:hde,geometryCollection:Eyt,round:Syt,radiansToLength:QV,lengthToRadians:JV,lengthToDegrees:Tyt,bearingToAzimuth:Pyt,radiansToDegrees:pde,degreesToRadians:$M,convertLength:Iyt,convertArea:Myt,isNumber:Cc,isObject:Fm,validateBBox:FM,validateId:eH,radians2degrees:Ayt,degrees2radians:Ryt,distanceToDegrees:kyt,distanceToRadians:Oyt,radiansToDistance:Lyt,bearingToAngle:Dyt,convertDistance:Nyt});function SE(t,e,r){if(t!==null)for(var n,i,o,a,s,l,u,p=0,m=0,v,x=t.type,y=x==="FeatureCollection",_=x==="Feature",w=y?t.features.length:1,C=0;C<w;C++){u=y?t.features[C].geometry:_?t.geometry:t,v=u?u.type==="GeometryCollection":!1,s=v?u.geometries.length:1;for(var E=0;E<s;E++){var T=0,A=0;if(a=v?u.geometries[E]:u,a!==null){l=a.coordinates;var k=a.type;switch(p=r&&(k==="Polygon"||k==="MultiPolygon")?1:0,k){case null:break;case"Point":e(l,m,C,T,A),m++,T++;break;case"LineString":case"MultiPoint":for(n=0;n<l.length;n++)e(l[n],m,C,T,A),m++,k==="MultiPoint"&&T++;k==="LineString"&&T++;break;case"Polygon":case"MultiLineString":for(n=0;n<l.length;n++){for(i=0;i<l[n].length-p;i++)e(l[n][i],m,C,T,A),m++;k==="MultiLineString"&&T++,k==="Polygon"&&A++}k==="Polygon"&&T++;break;case"MultiPolygon":for(n=0;n<l.length;n++){for(k==="MultiPolygon"&&(A=0),i=0;i<l[n].length;i++){for(o=0;o<l[n][i].length-p;o++)e(l[n][i][o],m,C,T,A),m++;A++}T++}break;case"GeometryCollection":for(n=0;n<a.geometries.length;n++)SE(a.geometries[n],e,r);break;default:throw new Error("Unknown Geometry Type")}}}}}function mde(t,e,r,n){var i=r;return SE(t,function(o,a,s,l,u){a===0&&r===void 0?i=o:i=e(i,o,a,s,l,u)},n),i}function gde(t,e){var r;switch(t.type){case"FeatureCollection":for(r=0;r<t.features.length;r++)e(t.features[r].properties,r);break;case"Feature":e(t.properties,0);break}}function $yt(t,e,r){var n=r;return gde(t,function(i,o){o===0&&r===void 0?n=i:n=e(n,i,o)}),n}function y5(t,e){if(t.type==="Feature")e(t,0);else if(t.type==="FeatureCollection")for(var r=0;r<t.features.length;r++)e(t.features[r],r)}function Fyt(t,e,r){var n=r;return y5(t,function(i,o){o===0&&r===void 0?n=i:n=e(n,i,o)}),n}function zyt(t){var e=[];return SE(t,function(r){e.push(r)}),e}function tH(t,e){var r,n,i,o,a,s,l,u,p,m,v=0,x=t.type==="FeatureCollection",y=t.type==="Feature",_=x?t.features.length:1;for(r=0;r<_;r++){for(s=x?t.features[r].geometry:y?t.geometry:t,u=x?t.features[r].properties:y?t.properties:{},p=x?t.features[r].bbox:y?t.bbox:void 0,m=x?t.features[r].id:y?t.id:void 0,l=s?s.type==="GeometryCollection":!1,a=l?s.geometries.length:1,i=0;i<a;i++){if(o=l?s.geometries[i]:s,o===null){e(null,v,u,p,m);continue}switch(o.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{e(o,v,u,p,m);break}case"GeometryCollection":{for(n=0;n<o.geometries.length;n++)e(o.geometries[n],v,u,p,m);break}default:throw new Error("Unknown Geometry Type")}}v++}}function Byt(t,e,r){var n=r;return tH(t,function(i,o,a,s,l){o===0&&r===void 0?n=i:n=e(n,i,o,a,s,l)}),n}function x5(t,e){tH(t,function(r,n,i,o,a){var s=r===null?null:r.type;switch(s){case null:case"Point":case"LineString":case"Polygon":e(sv(r,i,{bbox:o,id:a}),n,0);return}var l;switch(s){case"MultiPoint":l="Point";break;case"MultiLineString":l="LineString";break;case"MultiPolygon":l="Polygon";break}r.coordinates.forEach(function(u,p){var m={type:l,coordinates:u};e(sv(m,i),n,p)})})}function jyt(t,e,r){var n=r;return x5(t,function(i,o,a){o===0&&a===0&&r===void 0?n=i:n=e(n,i,o,a)}),n}function vde(t,e){x5(t,function(r,n,i){var o=0;if(!!r.geometry){var a=r.geometry.type;a==="Point"||a==="MultiPoint"||mde(r,function(s,l,u,p,m,v){var x=EE([s,l],r.properties);return e(x,n,i,v,o),o++,l})}})}function yde(t,e,r){var n=r,i=!1;return vde(t,function(o,a,s,l,u){i===!1&&r===void 0?n=o:n=e(n,o,a,s,l,u),i=!0}),n}function xde(t,e){if(!t)throw new Error("geojson is required");x5(t,function(r,n,i){if(r.geometry!==null){var o=r.geometry.type,a=r.geometry.coordinates;switch(o){case"LineString":e(r,n,i,0,0);break;case"Polygon":for(var s=0;s<a.length;s++)e(EE(a[s],r.properties),n,i,s);break}}})}function Uyt(t,e,r){var n=r;return xde(t,function(i,o,a,s){o===0&&r===void 0?n=i:n=e(n,i,o,a,s)}),n}Object.freeze({coordEach:SE,coordReduce:mde,propEach:gde,propReduce:$yt,featureEach:y5,featureReduce:Fyt,coordAll:zyt,geomEach:tH,geomReduce:Byt,flattenEach:x5,flattenReduce:jyt,segmentEach:vde,segmentReduce:yde,lineEach:xde,lineReduce:Uyt});function Vyt(t){var e=[1/0,1/0,-1/0,-1/0];return SE(t,function(r){e[0]>r[0]&&(e[0]=r[0]),e[1]>r[1]&&(e[1]=r[1]),e[2]<r[0]&&(e[2]=r[0]),e[3]<r[1]&&(e[3]=r[1])}),e}function _5(t){if(!t)throw new Error("obj is required");var e=rH(t);if(e.length>1&&Cc(e[0])&&Cc(e[1]))return e;throw new Error("Coordinate is not a valid Point")}function rH(t){if(!t)throw new Error("obj is required");var e;if(t.length?e=t:t.coordinates?e=t.coordinates:t.geometry&&t.geometry.coordinates&&(e=t.geometry.coordinates),e)return nH(e),e;throw new Error("No valid coordinates")}function nH(t){if(t.length>1&&Cc(t[0])&&Cc(t[1]))return!0;if(Array.isArray(t[0])&&t[0].length)return nH(t[0]);throw new Error("coordinates must only contain numbers")}function Hyt(t,e,r){if(!e||!r)throw new Error("type and name required");if(!t||t.type!==e)throw new Error("Invalid input to "+r+": must be a "+e+", given "+t.type)}function Wyt(t,e,r){if(!t)throw new Error("No feature passed");if(!r)throw new Error(".featureOf() requires a name");if(!t||t.type!=="Feature"||!t.geometry)throw new Error("Invalid input to "+r+", Feature with geometry required");if(!t.geometry||t.geometry.type!==e)throw new Error("Invalid input to "+r+": must be a "+e+", given "+t.geometry.type)}function Gyt(t,e,r){if(!t)throw new Error("No featureCollection passed");if(!r)throw new Error(".collectionOf() requires a name");if(!t||t.type!=="FeatureCollection")throw new Error("Invalid input to "+r+", FeatureCollection required");for(var n=0;n<t.features.length;n++){var i=t.features[n];if(!i||i.type!=="Feature"||!i.geometry)throw new Error("Invalid input to "+r+", Feature with geometry required");if(!i.geometry||i.geometry.type!==e)throw new Error("Invalid input to "+r+": must be a "+e+", given "+i.geometry.type)}}function qyt(t){if(!t)throw new Error("geojson is required");if(t.geometry!==void 0)return t.geometry;if(t.coordinates||t.geometries)return t;throw new Error("geojson must be a valid Feature or Geometry Object")}function Xyt(){throw new Error("invariant.getGeomType has been deprecated in v5.0 in favor of invariant.getType")}function Yyt(t,e){if(!t)throw new Error((e||"geojson")+" is required");if(t.geometry&&t.geometry.type)return t.geometry.type;if(t.type)return t.type;throw new Error((e||"geojson")+" is invalid")}Object.freeze({getCoord:_5,getCoords:rH,containsNumber:nH,geojsonType:Hyt,featureOf:Wyt,collectionOf:Gyt,getGeom:qyt,getGeomType:Xyt,getType:Yyt});var Kyt=_de;function _de(t,e,r,n,i){for(r=r||0,n=n||t.length-1,i=i||Zyt;n>r;){if(n-r>600){var o=n-r+1,a=e-r+1,s=Math.log(o),l=.5*Math.exp(2*s/3),u=.5*Math.sqrt(s*l*(o-l)/o)*(a-o/2<0?-1:1),p=Math.max(r,Math.floor(e-a*l/o+u)),m=Math.min(n,Math.floor(e+(o-a)*l/o+u));_de(t,e,p,m,i)}var v=t[e],x=r,y=n;for(zM(t,r,e),i(t[n],v)>0&&zM(t,r,n);x<y;){for(zM(t,x,y),x++,y--;i(t[x],v)<0;)x++;for(;i(t[y],v)>0;)y--}i(t[r],v)===0?zM(t,r,y):(y++,zM(t,y,n)),y<=e&&(r=y+1),e<=y&&(n=y-1)}}function zM(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function Zyt(t,e){return t<e?-1:t>e?1:0}var bde=b5;function b5(t,e){if(!(this instanceof b5))return new b5(t,e);this._maxEntries=Math.max(4,t||9),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),e&&this._initFormat(e),this.clear()}b5.prototype={all:function(){return this._all(this.data,[])},search:function(t){var e=this.data,r=[],n=this.toBBox;if(!C5(t,e))return r;for(var i=[],o,a,s,l;e;){for(o=0,a=e.children.length;o<a;o++)s=e.children[o],l=e.leaf?n(s):s,C5(t,l)&&(e.leaf?r.push(s):oH(t,l)?this._all(s,r):i.push(s));e=i.pop()}return r},collides:function(t){var e=this.data,r=this.toBBox;if(!C5(t,e))return!1;for(var n=[],i,o,a,s;e;){for(i=0,o=e.children.length;i<o;i++)if(a=e.children[i],s=e.leaf?r(a):a,C5(t,s)){if(e.leaf||oH(t,s))return!0;n.push(a)}e=n.pop()}return!1},load:function(t){if(!(t&&t.length))return this;if(t.length<this._minEntries){for(var e=0,r=t.length;e<r;e++)this.insert(t[e]);return this}var n=this._build(t.slice(),0,t.length-1,0);if(!this.data.children.length)this.data=n;else if(this.data.height===n.height)this._splitRoot(this.data,n);else{if(this.data.height<n.height){var i=this.data;this.data=n,n=i}this._insert(n,this.data.height-n.height-1,!0)}return this},insert:function(t){return t&&this._insert(t,this.data.height-1),this},clear:function(){return this.data=PE([]),this},remove:function(t,e){if(!t)return this;for(var r=this.data,n=this.toBBox(t),i=[],o=[],a,s,l,u;r||i.length;){if(r||(r=i.pop(),s=i[i.length-1],a=o.pop(),u=!0),r.leaf&&(l=Qyt(t,r.children,e),l!==-1))return r.children.splice(l,1),i.push(r),this._condense(i),this;!u&&!r.leaf&&oH(r,n)?(i.push(r),o.push(a),a=0,s=r,r=r.children[0]):s?(a++,r=s.children[a],u=!1):r=null}return this},toBBox:function(t){return t},compareMinX:wde,compareMinY:Cde,toJSON:function(){return this.data},fromJSON:function(t){return this.data=t,this},_all:function(t,e){for(var r=[];t;)t.leaf?e.push.apply(e,t.children):r.push.apply(r,t.children),t=r.pop();return e},_build:function(t,e,r,n){var i=r-e+1,o=this._maxEntries,a;if(i<=o)return a=PE(t.slice(e,r+1)),TE(a,this.toBBox),a;n||(n=Math.ceil(Math.log(i)/Math.log(o)),o=Math.ceil(i/Math.pow(o,n-1))),a=PE([]),a.leaf=!1,a.height=n;var s=Math.ceil(i/o),l=s*Math.ceil(Math.sqrt(o)),u,p,m,v;for(Ede(t,e,r,l,this.compareMinX),u=e;u<=r;u+=l)for(m=Math.min(u+l-1,r),Ede(t,u,m,s,this.compareMinY),p=u;p<=m;p+=s)v=Math.min(p+s-1,m),a.children.push(this._build(t,p,v,n-1));return TE(a,this.toBBox),a},_chooseSubtree:function(t,e,r,n){for(var i,o,a,s,l,u,p,m;n.push(e),!(e.leaf||n.length-1===r);){for(p=m=1/0,i=0,o=e.children.length;i<o;i++)a=e.children[i],l=iH(a),u=Jyt(t,a)-l,u<m?(m=u,p=l<p?l:p,s=a):u===m&&l<p&&(p=l,s=a);e=s||e.children[0]}return e},_insert:function(t,e,r){var n=this.toBBox,i=r?t:n(t),o=[],a=this._chooseSubtree(i,this.data,e,o);for(a.children.push(t),jM(a,i);e>=0&&o[e].children.length>this._maxEntries;)this._split(o,e),e--;this._adjustParentBBoxes(i,o,e)},_split:function(t,e){var r=t[e],n=r.children.length,i=this._minEntries;this._chooseSplitAxis(r,i,n);var o=this._chooseSplitIndex(r,i,n),a=PE(r.children.splice(o,r.children.length-o));a.height=r.height,a.leaf=r.leaf,TE(r,this.toBBox),TE(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(r,a)},_splitRoot:function(t,e){this.data=PE([t,e]),this.data.height=t.height+1,this.data.leaf=!1,TE(this.data,this.toBBox)},_chooseSplitIndex:function(t,e,r){var n,i,o,a,s,l,u,p;for(l=u=1/0,n=e;n<=r-e;n++)i=BM(t,0,n,this.toBBox),o=BM(t,n,r,this.toBBox),a=e0t(i,o),s=iH(i)+iH(o),a<l?(l=a,p=n,u=s<u?s:u):a===l&&s<u&&(u=s,p=n);return p},_chooseSplitAxis:function(t,e,r){var n=t.leaf?this.compareMinX:wde,i=t.leaf?this.compareMinY:Cde,o=this._allDistMargin(t,e,r,n),a=this._allDistMargin(t,e,r,i);o<a&&t.children.sort(n)},_allDistMargin:function(t,e,r,n){t.children.sort(n);var i=this.toBBox,o=BM(t,0,e,i),a=BM(t,r-e,r,i),s=w5(o)+w5(a),l,u;for(l=e;l<r-e;l++)u=t.children[l],jM(o,t.leaf?i(u):u),s+=w5(o);for(l=r-e-1;l>=e;l--)u=t.children[l],jM(a,t.leaf?i(u):u),s+=w5(a);return s},_adjustParentBBoxes:function(t,e,r){for(var n=r;n>=0;n--)jM(e[n],t)},_condense:function(t){for(var e=t.length-1,r;e>=0;e--)t[e].children.length===0?e>0?(r=t[e-1].children,r.splice(r.indexOf(t[e]),1)):this.clear():TE(t[e],this.toBBox)},_initFormat:function(t){var e=["return a"," - b",";"];this.compareMinX=new Function("a","b",e.join(t[0])),this.compareMinY=new Function("a","b",e.join(t[1])),this.toBBox=new Function("a","return {minX: a"+t[0]+", minY: a"+t[1]+", maxX: a"+t[2]+", maxY: a"+t[3]+"};")}};function Qyt(t,e,r){if(!r)return e.indexOf(t);for(var n=0;n<e.length;n++)if(r(t,e[n]))return n;return-1}function TE(t,e){BM(t,0,t.children.length,e,t)}function BM(t,e,r,n,i){i||(i=PE(null)),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(var o=e,a;o<r;o++)a=t.children[o],jM(i,t.leaf?n(a):a);return i}function jM(t,e){return t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY),t}function wde(t,e){return t.minX-e.minX}function Cde(t,e){return t.minY-e.minY}function iH(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function w5(t){return t.maxX-t.minX+(t.maxY-t.minY)}function Jyt(t,e){return(Math.max(e.maxX,t.maxX)-Math.min(e.minX,t.minX))*(Math.max(e.maxY,t.maxY)-Math.min(e.minY,t.minY))}function e0t(t,e){var r=Math.max(t.minX,e.minX),n=Math.max(t.minY,e.minY),i=Math.min(t.maxX,e.maxX),o=Math.min(t.maxY,e.maxY);return Math.max(0,i-r)*Math.max(0,o-n)}function oH(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function C5(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function PE(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function Ede(t,e,r,n,i){for(var o=[e,r],a;o.length;)r=o.pop(),e=o.pop(),!(r-e<=n)&&(a=e+Math.ceil((r-e)/n/2)*n,Kyt(t,a,e,r,i),o.push(e,a,a,r))}function Ly(t,e){return e={exports:{}},t(e,e.exports),e.exports}var E5=t0t,Sde=+(Math.pow(2,27)+1);function t0t(t,e,r){var n=t*e,i=Sde*t,o=i-t,a=i-o,s=t-a,l=Sde*e,u=l-e,p=l-u,m=e-p,v=n-a*p,x=v-s*p,y=x-a*m,_=s*m-y;return r?(r[0]=_,r[1]=n,r):[_,n]}var r0t=i0t;function n0t(t,e){var r=t+e,n=r-t,i=r-n,o=e-n,a=t-i,s=a+o;return s?[s,r]:[r]}function i0t(t,e){var r=t.length|0,n=e.length|0;if(r===1&&n===1)return n0t(t[0],e[0]);var i=r+n,o=new Array(i),a=0,s=0,l=0,u=Math.abs,p=t[s],m=u(p),v=e[l],x=u(v),y,_;m<x?(_=p,s+=1,s<r&&(p=t[s],m=u(p))):(_=v,l+=1,l<n&&(v=e[l],x=u(v))),s<r&&m<x||l>=n?(y=p,s+=1,s<r&&(p=t[s],m=u(p))):(y=v,l+=1,l<n&&(v=e[l],x=u(v)));for(var w=y+_,C=w-y,E=_-C,T=E,A=w,k,X,Z,W,D;s<r&&l<n;)m<x?(y=p,s+=1,s<r&&(p=t[s],m=u(p))):(y=v,l+=1,l<n&&(v=e[l],x=u(v))),_=T,w=y+_,C=w-y,E=_-C,E&&(o[a++]=E),k=A+w,X=k-A,Z=k-X,W=w-X,D=A-Z,T=D+W,A=k;for(;s<r;)y=p,_=T,w=y+_,C=w-y,E=_-C,E&&(o[a++]=E),k=A+w,X=k-A,Z=k-X,W=w-X,D=A-Z,T=D+W,A=k,s+=1,s<r&&(p=t[s]);for(;l<n;)y=v,_=T,w=y+_,C=w-y,E=_-C,E&&(o[a++]=E),k=A+w,X=k-A,Z=k-X,W=w-X,D=A-Z,T=D+W,A=k,l+=1,l<n&&(v=e[l]);return T&&(o[a++]=T),A&&(o[a++]=A),a||(o[a++]=0),o.length=a,o}var o0t=s0t;function s0t(t,e,r){var n=t+e,i=n-t,o=n-i,a=e-i,s=t-o;return r?(r[0]=s+a,r[1]=n,r):[s+a,n]}var a0t=l0t;function l0t(t,e){var r=t.length;if(r===1){var n=E5(t[0],e);return n[0]?n:[n[1]]}var i=new Array(2*r),o=[.1,.1],a=[.1,.1],s=0;E5(t[0],e,o),o[0]&&(i[s++]=o[0]);for(var l=1;l<r;++l){E5(t[l],e,a);var u=o[1];o0t(u,a[0],o),o[0]&&(i[s++]=o[0]);var p=a[1],m=o[1],v=p+m,x=v-p,y=m-x;o[1]=v,y&&(i[s++]=y)}return o[1]&&(i[s++]=o[1]),s===0&&(i[s++]=0),i.length=s,i}var c0t=f0t;function u0t(t,e){var r=t+e,n=r-t,i=r-n,o=e-n,a=t-i,s=a+o;return s?[s,r]:[r]}function f0t(t,e){var r=t.length|0,n=e.length|0;if(r===1&&n===1)return u0t(t[0],-e[0]);var i=r+n,o=new Array(i),a=0,s=0,l=0,u=Math.abs,p=t[s],m=u(p),v=-e[l],x=u(v),y,_;m<x?(_=p,s+=1,s<r&&(p=t[s],m=u(p))):(_=v,l+=1,l<n&&(v=-e[l],x=u(v))),s<r&&m<x||l>=n?(y=p,s+=1,s<r&&(p=t[s],m=u(p))):(y=v,l+=1,l<n&&(v=-e[l],x=u(v)));for(var w=y+_,C=w-y,E=_-C,T=E,A=w,k,X,Z,W,D;s<r&&l<n;)m<x?(y=p,s+=1,s<r&&(p=t[s],m=u(p))):(y=v,l+=1,l<n&&(v=-e[l],x=u(v))),_=T,w=y+_,C=w-y,E=_-C,E&&(o[a++]=E),k=A+w,X=k-A,Z=k-X,W=w-X,D=A-Z,T=D+W,A=k;for(;s<r;)y=p,_=T,w=y+_,C=w-y,E=_-C,E&&(o[a++]=E),k=A+w,X=k-A,Z=k-X,W=w-X,D=A-Z,T=D+W,A=k,s+=1,s<r&&(p=t[s]);for(;l<n;)y=v,_=T,w=y+_,C=w-y,E=_-C,E&&(o[a++]=E),k=A+w,X=k-A,Z=k-X,W=w-X,D=A-Z,T=D+W,A=k,l+=1,l<n&&(v=-e[l]);return T&&(o[a++]=T),A&&(o[a++]=A),a||(o[a++]=0),o.length=a,o}var Tde=Ly(function(t){var e=5,r=11102230246251565e-32,n=(3+16*r)*r,i=(7+56*r)*r;function o(w,C){for(var E=new Array(w.length-1),T=1;T<w.length;++T)for(var A=E[T-1]=new Array(w.length-1),k=0,X=0;k<w.length;++k)k!==C&&(A[X++]=w[T][k]);return E}function a(w){for(var C=new Array(w),E=0;E<w;++E){C[E]=new Array(w);for(var T=0;T<w;++T)C[E][T]=["m",T,"[",w-E-1,"]"].join("")}return C}function s(w){return w&1?"-":""}function l(w){if(w.length===1)return w[0];if(w.length===2)return["sum(",w[0],",",w[1],")"].join("");var C=w.length>>1;return["sum(",l(w.slice(0,C)),",",l(w.slice(C)),")"].join("")}function u(w){if(w.length===2)return[["sum(prod(",w[0][0],",",w[1][1],"),prod(-",w[0][1],",",w[1][0],"))"].join("")];for(var C=[],E=0;E<w.length;++E)C.push(["scale(",l(u(o(w,E))),",",s(E),w[0][E],")"].join(""));return C}function p(w){for(var C=[],E=[],T=a(w),A=[],k=0;k<w;++k)(k&1)==0?C.push.apply(C,u(o(T,k))):E.push.apply(E,u(o(T,k))),A.push("m"+k);var X=l(C),Z=l(E),W="orientation"+w+"Exact",D=["function ",W,"(",A.join(),"){var p=",X,",n=",Z,",d=sub(p,n);return d[d.length-1];};return ",W].join(""),H=new Function("sum","prod","scale","sub",D);return H(r0t,E5,a0t,c0t)}var m=p(3),v=p(4),x=[function(){return 0},function(){return 0},function(C,E){return E[0]-C[0]},function(C,E,T){var A=(C[1]-T[1])*(E[0]-T[0]),k=(C[0]-T[0])*(E[1]-T[1]),X=A-k,Z;if(A>0){if(k<=0)return X;Z=A+k}else if(A<0){if(k>=0)return X;Z=-(A+k)}else return X;var W=n*Z;return X>=W||X<=-W?X:m(C,E,T)},function(C,E,T,A){var k=C[0]-A[0],X=E[0]-A[0],Z=T[0]-A[0],W=C[1]-A[1],D=E[1]-A[1],H=T[1]-A[1],N=C[2]-A[2],j=E[2]-A[2],$=T[2]-A[2],z=X*H,O=Z*D,F=Z*W,G=k*H,q=k*D,ee=X*W,re=N*(z-O)+j*(F-G)+$*(q-ee),ce=(Math.abs(z)+Math.abs(O))*Math.abs(N)+(Math.abs(F)+Math.abs(G))*Math.abs(j)+(Math.abs(q)+Math.abs(ee))*Math.abs($),fe=i*ce;return re>fe||-re>fe?re:v(C,E,T,A)}];function y(w){var C=x[w.length];return C||(C=x[w.length]=p(w.length)),C.apply(void 0,w)}function _(){for(;x.length<=e;)x.push(p(x.length));for(var w=[],C=["slow"],E=0;E<=e;++E)w.push("a"+E),C.push("o"+E);for(var T=["function getOrientation(",w.join(),"){switch(arguments.length){case 0:case 1:return 0;"],E=2;E<=e;++E)T.push("case ",E,":return o",E,"(",w.slice(0,E).join(),");");T.push("}var s=new Array(arguments.length);for(var i=0;i<arguments.length;++i){s[i]=arguments[i]};return slow(s);}return getOrientation"),C.push(T.join(""));var A=Function.apply(void 0,C);t.exports=A.apply(void 0,[y].concat(x));for(var E=0;E<=e;++E)t.exports[E]=x[E]}_()}),d0t=h0t,Pde=Tde[3];function h0t(t){var e=t.length;if(e<3){for(var u=new Array(e),r=0;r<e;++r)u[r]=r;return e===2&&t[0][0]===t[1][0]&&t[0][1]===t[1][1]?[0]:u}for(var n=new Array(e),r=0;r<e;++r)n[r]=r;n.sort(function(x,y){var _=t[x][0]-t[y][0];return _||t[x][1]-t[y][1]});for(var i=[n[0],n[1]],o=[n[0],n[1]],r=2;r<e;++r){for(var a=n[r],s=t[a],l=i.length;l>1&&Pde(t[i[l-2]],t[i[l-1]],s)<=0;)l-=1,i.pop();for(i.push(a),l=o.length;l>1&&Pde(t[o[l-2]],t[o[l-1]],s)>=0;)l-=1,o.pop();o.push(a)}for(var u=new Array(o.length+i.length-2),p=0,r=0,m=i.length;r<m;++r)u[p++]=i[r];for(var v=o.length-2;v>0;--v)u[p++]=o[v];return u}var Ide=UM,p0t=UM;function UM(t,e){if(!(this instanceof UM))return new UM(t,e);if(this.data=t||[],this.length=this.data.length,this.compare=e||m0t,this.length>0)for(var r=(this.length>>1)-1;r>=0;r--)this._down(r)}function m0t(t,e){return t<e?-1:t>e?1:0}UM.prototype={push:function(t){this.data.push(t),this.length++,this._up(this.length-1)},pop:function(){if(this.length!==0){var t=this.data[0];return this.length--,this.length>0&&(this.data[0]=this.data[this.length],this._down(0)),this.data.pop(),t}},peek:function(){return this.data[0]},_up:function(t){for(var e=this.data,r=this.compare,n=e[t];t>0;){var i=t-1>>1,o=e[i];if(r(n,o)>=0)break;e[t]=o,t=i}e[t]=n},_down:function(t){for(var e=this.data,r=this.compare,n=this.length>>1,i=e[t];t<n;){var o=(t<<1)+1,a=o+1,s=e[o];if(a<this.length&&r(e[a],s)<0&&(o=a,s=e[a]),r(s,i)>=0)break;e[t]=s,t=o}e[t]=i}};Ide.default=p0t;var g0t=function(t,e){for(var r=t[0],n=t[1],i=!1,o=0,a=e.length-1;o<e.length;a=o++){var s=e[o][0],l=e[o][1],u=e[a][0],p=e[a][1],m=l>n!=p>n&&r<(u-s)*(n-l)/(p-l)+s;m&&(i=!i)}return i},S5=Tde[3],v0t=Mde,y0t=Mde;function Mde(t,e,r){e=Math.max(0,e===void 0?2:e),r=r||0;for(var n=C0t(t),i=bde(16,["[0]","[1]","[0]","[1]"]).load(t),o=[],a=0,s;a<n.length;a++){var l=n[a];i.remove(l),s=kde(l,s),o.push(s)}var u=bde(16);for(a=0;a<o.length;a++)u.insert(sH(o[a]));for(var p=e*e,m=r*r;o.length;){var v=o.shift(),x=v.p,y=v.next.p,_=aH(x,y);if(!(_<m)){var w=_/p;l=x0t(i,v.prev.p,x,y,v.next.next.p,w,u),l&&Math.min(aH(l,x),aH(l,y))<=w&&(o.push(v),o.push(kde(l,v)),i.remove(l),u.remove(v),u.insert(sH(v)),u.insert(sH(v.next)))}}v=s;var C=[];do C.push(v.p),v=v.next;while(v!==s);return C.push(v.p),C}function x0t(t,e,r,n,i,o,a){for(var s=new Ide(null,_0t),l=t.data;l;){for(var u=0;u<l.children.length;u++){var p=l.children[u],m=l.leaf?lH(p,r,n):b0t(r,n,p);m>o||s.push({node:p,dist:m})}for(;s.length&&!s.peek().node.children;){var v=s.pop(),x=v.node,y=lH(x,e,r),_=lH(x,n,i);if(v.dist<y&&v.dist<_&&Rde(r,x,a)&&Rde(n,x,a))return x}l=s.pop(),l&&(l=l.node)}return null}function _0t(t,e){return t.dist-e.dist}function b0t(t,e,r){if(Ade(t,r)||Ade(e,r))return 0;var n=T5(t[0],t[1],e[0],e[1],r.minX,r.minY,r.maxX,r.minY);if(n===0)return 0;var i=T5(t[0],t[1],e[0],e[1],r.minX,r.minY,r.minX,r.maxY);if(i===0)return 0;var o=T5(t[0],t[1],e[0],e[1],r.maxX,r.minY,r.maxX,r.maxY);if(o===0)return 0;var a=T5(t[0],t[1],e[0],e[1],r.minX,r.maxY,r.maxX,r.maxY);return a===0?0:Math.min(n,i,o,a)}function Ade(t,e){return t[0]>=e.minX&&t[0]<=e.maxX&&t[1]>=e.minY&&t[1]<=e.maxY}function Rde(t,e,r){for(var n=Math.min(t[0],e[0]),i=Math.min(t[1],e[1]),o=Math.max(t[0],e[0]),a=Math.max(t[1],e[1]),s=r.search({minX:n,minY:i,maxX:o,maxY:a}),l=0;l<s.length;l++)if(w0t(s[l].p,s[l].next.p,t,e))return!1;return!0}function w0t(t,e,r,n){return t!==n&&e!==r&&S5(t,e,r)>0!=S5(t,e,n)>0&&S5(r,n,t)>0!=S5(r,n,e)>0}function sH(t){var e=t.p,r=t.next.p;return t.minX=Math.min(e[0],r[0]),t.minY=Math.min(e[1],r[1]),t.maxX=Math.max(e[0],r[0]),t.maxY=Math.max(e[1],r[1]),t}function C0t(t){for(var e=t[0],r=t[0],n=t[0],i=t[0],o=0;o<t.length;o++){var a=t[o];a[0]<e[0]&&(e=a),a[0]>n[0]&&(n=a),a[1]<r[1]&&(r=a),a[1]>i[1]&&(i=a)}var s=[e,r,n,i],l=s.slice();for(o=0;o<t.length;o++)g0t(t[o],s)||l.push(t[o]);var u=d0t(l),p=[];for(o=0;o<u.length;o++)p.push(l[u[o]]);return p}function kde(t,e){var r={p:t,prev:null,next:null,minX:0,minY:0,maxX:0,maxY:0};return e?(r.next=e.next,r.prev=e,e.next.prev=r,e.next=r):(r.prev=r,r.next=r),r}function aH(t,e){var r=t[0]-e[0],n=t[1]-e[1];return r*r+n*n}function lH(t,e,r){var n=e[0],i=e[1],o=r[0]-n,a=r[1]-i;if(o!==0||a!==0){var s=((t[0]-n)*o+(t[1]-i)*a)/(o*o+a*a);s>1?(n=r[0],i=r[1]):s>0&&(n+=o*s,i+=a*s)}return o=t[0]-n,a=t[1]-i,o*o+a*a}function T5(t,e,r,n,i,o,a,s){var l=r-t,u=n-e,p=a-i,m=s-o,v=t-i,x=e-o,y=l*l+u*u,_=l*p+u*m,w=p*p+m*m,C=l*v+u*x,E=p*v+m*x,T=y*w-_*_,A,k,X,Z,W=T,D=T;T===0?(k=0,W=1,Z=E,D=w):(k=_*E-w*C,Z=y*E-_*C,k<0?(k=0,Z=E,D=w):k>W&&(k=W,Z=E+_,D=w)),Z<0?(Z=0,-C<0?k=0:-C>y?k=W:(k=-C,W=y)):Z>D&&(Z=D,-C+_<0?k=0:-C+_>y?k=W:(k=-C+_,W=y)),A=k===0?0:k/W,X=Z===0?0:Z/D;var H=(1-A)*t+A*r,N=(1-A)*e+A*n,j=(1-X)*i+X*a,$=(1-X)*o+X*s,z=j-H,O=$-N;return z*z+O*O}v0t.default=y0t;function Ode(t,e,r){if(r=r||{},typeof r!="object")throw new Error("options is invalid");var n=r.ignoreBoundary;if(!t)throw new Error("point is required");if(!e)throw new Error("polygon is required");var i=_5(t),o=rH(e),a=e.geometry?e.geometry.type:e.type,s=e.bbox;if(s&&E0t(i,s)===!1)return!1;a==="Polygon"&&(o=[o]);for(var l=0,u=!1;l<o.length&&!u;l++)if(Lde(i,o[l][0],n)){for(var p=!1,m=1;m<o[l].length&&!p;)Lde(i,o[l][m],!n)&&(p=!0),m++;p||(u=!0)}return u}function Lde(t,e,r){var n=!1;e[0][0]===e[e.length-1][0]&&e[0][1]===e[e.length-1][1]&&(e=e.slice(0,e.length-1));for(var i=0,o=e.length-1;i<e.length;o=i++){var a=e[i][0],s=e[i][1],l=e[o][0],u=e[o][1],p=t[1]*(a-l)+s*(l-t[0])+u*(t[0]-a)==0&&(a-t[0])*(l-t[0])<=0&&(s-t[1])*(u-t[1])<=0;if(p)return!r;var m=s>t[1]!=u>t[1]&&t[0]<(l-a)*(t[1]-s)/(u-s)+a;m&&(n=!n)}return n}function E0t(t,e){return e[0]<=t[0]&&e[1]<=t[1]&&e[2]>=t[0]&&e[3]>=t[1]}function S0t(t,e,r){if(r=r||{},!Fm(r))throw new Error("options is invalid");var n=r.units,i=_5(t),o=_5(e),a=$M(o[1]-i[1]),s=$M(o[0]-i[0]),l=$M(i[1]),u=$M(o[1]),p=Math.pow(Math.sin(a/2),2)+Math.pow(Math.sin(s/2),2)*Math.cos(l)*Math.cos(u);return QV(2*Math.atan2(Math.sqrt(p),Math.sqrt(1-p)),n)}function T0t(t){if(!t)throw new Error("geojson is required");switch(t.type){case"Feature":return Dde(t);case"FeatureCollection":return P0t(t);case"Point":case"LineString":case"Polygon":case"MultiPoint":case"MultiLineString":case"MultiPolygon":case"GeometryCollection":return cH(t);default:throw new Error("unknown GeoJSON type")}}function Dde(t){var e={type:"Feature"};return Object.keys(t).forEach(function(r){switch(r){case"type":case"properties":case"geometry":return;default:e[r]=t[r]}}),e.properties=Nde(t.properties),e.geometry=cH(t.geometry),e}function Nde(t){var e={};return t&&Object.keys(t).forEach(function(r){var n=t[r];typeof n=="object"?n===null?e[r]=null:n.length?e[r]=n.map(function(i){return i}):e[r]=Nde(n):e[r]=n}),e}function P0t(t){var e={type:"FeatureCollection"};return Object.keys(t).forEach(function(r){switch(r){case"type":case"features":return;default:e[r]=t[r]}}),e.features=t.features.map(function(r){return Dde(r)}),e}function cH(t){var e={type:t.type};return t.bbox&&(e.bbox=t.bbox),t.type==="GeometryCollection"?(e.geometries=t.geometries.map(function(r){return cH(r)}),e):(e.coordinates=$de(t.coordinates),e)}function $de(t){return typeof t[0]!="object"?t.slice():t.map(function(e){return $de(e)})}function I0t(t){FM(t);var e=Number(t[0]),r=Number(t[1]),n=Number(t[2]),i=Number(t[3]);if(t.length===6)throw new Error("@turf/bbox-polygon does not support BBox with 6 positions");var o=[e,r],a=[e,i],s=[n,i],l=[n,r];return CE([[o,l,s,a,o]])}function M0t(t){return I0t(Vyt(t))}var A0t=P5,R0t=P5;function P5(t,e,r){r=r||2;var n=e&&e.length,i=n?e[0]*r:t.length,o=Fde(t,0,i,r,!0),a=[];if(!o)return a;var s,l,u,p,m,v,x;if(n&&(o=N0t(t,e,o,r)),t.length>80*r){s=u=t[0],l=p=t[1];for(var y=r;y<i;y+=r)m=t[y],v=t[y+1],m<s&&(s=m),v<l&&(l=v),m>u&&(u=m),v>p&&(p=v);x=Math.max(u-s,p-l),x=x!==0?1/x:0}return HM(o,a,r,s,l,x),a}function Fde(t,e,r,n,i){var o,a;if(i===dH(t,e,r,n)>0)for(o=e;o<r;o+=n)a=jde(o,t[o],t[o+1],a);else for(o=r-n;o>=e;o-=n)a=jde(o,t[o],t[o+1],a);return a&&Pb(a,a.next)&&(GM(a),a=a.next),a}function VM(t,e){if(!t)return t;e||(e=t);var r=t,n;do if(n=!1,!r.steiner&&(Pb(r,r.next)||cf(r.prev,r,r.next)===0)){if(GM(r),r=e=r.prev,r===r.next)break;n=!0}else r=r.next;while(n||r!==e);return e}function HM(t,e,r,n,i,o,a){if(!!t){!a&&o&&B0t(t,n,i,o);for(var s=t,l,u;t.prev!==t.next;){if(l=t.prev,u=t.next,o?O0t(t,n,i,o):k0t(t)){e.push(l.i/r),e.push(t.i/r),e.push(u.i/r),GM(t),t=u.next,s=u.next;continue}if(t=u,t===s){a?a===1?(t=L0t(t,e,r),HM(t,e,r,n,i,o,2)):a===2&&D0t(t,e,r,n,i,o):HM(VM(t),e,r,n,i,o,1);break}}}}function k0t(t){var e=t.prev,r=t,n=t.next;if(cf(e,r,n)>=0)return!1;for(var i=t.next.next;i!==t.prev;){if(I5(e.x,e.y,r.x,r.y,n.x,n.y,i.x,i.y)&&cf(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function O0t(t,e,r,n){var i=t.prev,o=t,a=t.next;if(cf(i,o,a)>=0)return!1;for(var s=i.x<o.x?i.x<a.x?i.x:a.x:o.x<a.x?o.x:a.x,l=i.y<o.y?i.y<a.y?i.y:a.y:o.y<a.y?o.y:a.y,u=i.x>o.x?i.x>a.x?i.x:a.x:o.x>a.x?o.x:a.x,p=i.y>o.y?i.y>a.y?i.y:a.y:o.y>a.y?o.y:a.y,m=uH(s,l,e,r,n),v=uH(u,p,e,r,n),x=t.nextZ;x&&x.z<=v;){if(x!==t.prev&&x!==t.next&&I5(i.x,i.y,o.x,o.y,a.x,a.y,x.x,x.y)&&cf(x.prev,x,x.next)>=0)return!1;x=x.nextZ}for(x=t.prevZ;x&&x.z>=m;){if(x!==t.prev&&x!==t.next&&I5(i.x,i.y,o.x,o.y,a.x,a.y,x.x,x.y)&&cf(x.prev,x,x.next)>=0)return!1;x=x.prevZ}return!0}function L0t(t,e,r){var n=t;do{var i=n.prev,o=n.next.next;!Pb(i,o)&&zde(i,n,n.next,o)&&WM(i,o)&&WM(o,i)&&(e.push(i.i/r),e.push(n.i/r),e.push(o.i/r),GM(n),GM(n.next),n=t=o),n=n.next}while(n!==t);return n}function D0t(t,e,r,n,i,o){var a=t;do{for(var s=a.next.next;s!==a.prev;){if(a.i!==s.i&&V0t(a,s)){var l=Bde(a,s);a=VM(a,a.next),l=VM(l,l.next),HM(a,e,r,n,i,o),HM(l,e,r,n,i,o);return}s=s.next}a=a.next}while(a!==t)}function N0t(t,e,r,n){var i=[],o,a,s,l,u;for(o=0,a=e.length;o<a;o++)s=e[o]*n,l=o<a-1?e[o+1]*n:t.length,u=Fde(t,s,l,n,!1),u===u.next&&(u.steiner=!0),i.push(U0t(u));for(i.sort($0t),o=0;o<i.length;o++)F0t(i[o],r),r=VM(r,r.next);return r}function $0t(t,e){return t.x-e.x}function F0t(t,e){if(e=z0t(t,e),e){var r=Bde(e,t);VM(r,r.next)}}function z0t(t,e){var r=e,n=t.x,i=t.y,o=-1/0,a;do{if(i<=r.y&&i>=r.next.y&&r.next.y!==r.y){var s=r.x+(i-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(s<=n&&s>o){if(o=s,s===n){if(i===r.y)return r;if(i===r.next.y)return r.next}a=r.x<r.next.x?r:r.next}}r=r.next}while(r!==e);if(!a)return null;if(n===o)return a.prev;var l=a,u=a.x,p=a.y,m=1/0,v;for(r=a.next;r!==l;)n>=r.x&&r.x>=u&&n!==r.x&&I5(i<p?n:o,i,u,p,i<p?o:n,i,r.x,r.y)&&(v=Math.abs(i-r.y)/(n-r.x),(v<m||v===m&&r.x>a.x)&&WM(r,t)&&(a=r,m=v)),r=r.next;return a}function B0t(t,e,r,n){var i=t;do i.z===null&&(i.z=uH(i.x,i.y,e,r,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next;while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,j0t(i)}function j0t(t){var e,r,n,i,o,a,s,l,u=1;do{for(r=t,t=null,o=null,a=0;r;){for(a++,n=r,s=0,e=0;e<u&&(s++,n=n.nextZ,!!n);e++);for(l=u;s>0||l>0&&n;)s!==0&&(l===0||!n||r.z<=n.z)?(i=r,r=r.nextZ,s--):(i=n,n=n.nextZ,l--),o?o.nextZ=i:t=i,i.prevZ=o,o=i;r=n}o.nextZ=null,u*=2}while(a>1);return t}function uH(t,e,r,n,i){return t=32767*(t-r)*i,e=32767*(e-n)*i,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t|e<<1}function U0t(t){var e=t,r=t;do e.x<r.x&&(r=e),e=e.next;while(e!==t);return r}function I5(t,e,r,n,i,o,a,s){return(i-a)*(e-s)-(t-a)*(o-s)>=0&&(t-a)*(n-s)-(r-a)*(e-s)>=0&&(r-a)*(o-s)-(i-a)*(n-s)>=0}function V0t(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!H0t(t,e)&&WM(t,e)&&WM(e,t)&&W0t(t,e)}function cf(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function Pb(t,e){return t.x===e.x&&t.y===e.y}function zde(t,e,r,n){return Pb(t,e)&&Pb(r,n)||Pb(t,n)&&Pb(r,e)?!0:cf(t,e,r)>0!=cf(t,e,n)>0&&cf(r,n,t)>0!=cf(r,n,e)>0}function H0t(t,e){var r=t;do{if(r.i!==t.i&&r.next.i!==t.i&&r.i!==e.i&&r.next.i!==e.i&&zde(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}function WM(t,e){return cf(t.prev,t,t.next)<0?cf(t,e,t.next)>=0&&cf(t,t.prev,e)>=0:cf(t,e,t.prev)<0||cf(t,t.next,e)<0}function W0t(t,e){var r=t,n=!1,i=(t.x+e.x)/2,o=(t.y+e.y)/2;do r.y>o!=r.next.y>o&&r.next.y!==r.y&&i<(r.next.x-r.x)*(o-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next;while(r!==t);return n}function Bde(t,e){var r=new fH(t.i,t.x,t.y),n=new fH(e.i,e.x,e.y),i=t.next,o=e.prev;return t.next=e,e.prev=t,r.next=i,i.prev=r,n.next=r,r.prev=n,o.next=n,n.prev=o,n}function jde(t,e,r,n){var i=new fH(t,e,r);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function GM(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function fH(t,e,r){this.i=t,this.x=e,this.y=r,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}P5.deviation=function(t,e,r,n){var i=e&&e.length,o=i?e[0]*r:t.length,a=Math.abs(dH(t,0,o,r));if(i)for(var s=0,l=e.length;s<l;s++){var u=e[s]*r,p=s<l-1?e[s+1]*r:t.length;a-=Math.abs(dH(t,u,p,r))}var m=0;for(s=0;s<n.length;s+=3){var v=n[s]*r,x=n[s+1]*r,y=n[s+2]*r;m+=Math.abs((t[v]-t[y])*(t[x+1]-t[v+1])-(t[v]-t[x])*(t[y+1]-t[v+1]))}return a===0&&m===0?0:Math.abs((m-a)/a)};function dH(t,e,r,n){for(var i=0,o=e,a=r-n;o<r;o+=n)i+=(t[a]-t[o])*(t[o+1]+t[a+1]),a=o;return i}P5.flatten=function(t){for(var e=t[0][0].length,r={vertices:[],holes:[],dimensions:e},n=0,i=0;i<t.length;i++){for(var o=0;o<t[i].length;o++)for(var a=0;a<e;a++)r.vertices.push(t[i][o][a]);i>0&&(n+=t[i-1].length,r.holes.push(n))}return r};A0t.default=R0t;function G0t(t,e){return Ude(t,"mercator",e)}function q0t(t,e){return Ude(t,"wgs84",e)}function Ude(t,e,r){if(r=r||{},!Fm(r))throw new Error("options is invalid");var n=r.mutate;if(!t)throw new Error("geojson is required");return Array.isArray(t)&&Cc(t[0])?t=e==="mercator"?Vde(t):Hde(t):(n!==!0&&(t=T0t(t)),SE(t,function(i){var o=e==="mercator"?Vde(i):Hde(i);i[0]=o[0],i[1]=o[1]})),t}function Vde(t){var e=Math.PI/180,r=6378137,n=20037508342789244e-9,i=Math.abs(t[0])<=180?t[0]:t[0]-X0t(t[0])*360,o=[r*i*e,r*Math.log(Math.tan(Math.PI*.25+.5*t[1]*e))];return o[0]>n&&(o[0]=n),o[0]<-n&&(o[0]=-n),o[1]>n&&(o[1]=n),o[1]<-n&&(o[1]=-n),o}function Hde(t){var e=180/Math.PI,r=6378137;return[t[0]*e/r,(Math.PI*.5-2*Math.atan(Math.exp(-t[1]/r)))*e]}function X0t(t){return t<0?-1:t>0?1:0}Object.freeze({toMercator:G0t,toWgs84:q0t});function Ykt(t,e){if(e=e||{},!Fm(e))throw new Error("options is invalid");if(!t)throw new Error("geojson is required");return yde(t,function(r,n){var i=n.geometry.coordinates;return r+S0t(i[0],i[1],e)},0)}Number.prototype.modulo=function(t){return(this%t+t)%t};hH.polyline=hH;hH.polygon=Y0t;function hH(t,e,r){var n=t.length,i=IE(t[0],e),o=[],a,s,l,u,p;for(r||(r=[]),a=1;a<n;a++){for(s=t[a-1],l=t[a],u=p=IE(l,e);;)if(i|u){if(i&u)break;i?(s=pH(s,l,i,e),i=IE(s,e)):(l=pH(s,l,u,e),u=IE(l,e))}else{o.push(s),u!==p?(o.push(l),a<n-1&&(r.push(o),o=[])):a===n-1&&o.push(l);break}i=p}return o.length&&r.push(o),r}function Y0t(t,e){var r,n,i,o,a,s,l;for(n=1;n<=8;n*=2){for(r=[],i=t[t.length-1],o=!(IE(i,e)&n),a=0;a<t.length;a++)s=t[a],l=!(IE(s,e)&n),l!==o&&r.push(pH(i,s,n,e)),l&&r.push(s),i=s,o=l;if(t=r,!t.length)break}return r}function pH(t,e,r,n){return r&8?[t[0]+(e[0]-t[0])*(n[3]-t[1])/(e[1]-t[1]),n[3]]:r&4?[t[0]+(e[0]-t[0])*(n[1]-t[1])/(e[1]-t[1]),n[1]]:r&2?[n[2],t[1]+(e[1]-t[1])*(n[2]-t[0])/(e[0]-t[0])]:r&1?[n[0],t[1]+(e[1]-t[1])*(n[0]-t[0])/(e[0]-t[0])]:null}function IE(t,e){var r=0;return t[0]<e[0]?r|=1:t[0]>e[2]&&(r|=2),t[1]<e[1]?r|=4:t[1]>e[3]&&(r|=8),r}function K0t(t,e,r){var n=e[0]-t[0],i=e[1]-t[1],o=r[0]-e[0],a=r[1]-e[1];return Math.sign(n*a-o*i)}function Z0t(t,e){var r=t.geometry.coordinates.map(function(a){return a[0]}),n=t.geometry.coordinates.map(function(a){return a[1]}),i=e.geometry.coordinates.map(function(a){return a[0]}),o=e.geometry.coordinates.map(function(a){return a[1]});return Math.max(null,r)===Math.max(null,i)&&Math.max(null,n)===Math.max(null,o)&&Math.min(null,r)===Math.min(null,i)&&Math.min(null,n)===Math.min(null,o)}function Wde(t,e){return e.geometry.coordinates[0].every(function(r){return Ode(wE(r),t)})}function Q0t(t,e){return t[0]===e[0]&&t[1]===e[1]}var ih=function(){this.edges=[],this.polygon=void 0,this.envelope=void 0},Gde={length:{configurable:!0}};ih.prototype.push=function(e){this[this.edges.length]=e,this.edges.push(e),this.polygon=this.envelope=void 0};ih.prototype.get=function(e){return this.edges[e]};Gde.length.get=function(){return this.edges.length};ih.prototype.forEach=function(e){this.edges.forEach(e)};ih.prototype.map=function(e){return this.edges.map(e)};ih.prototype.some=function(e){return this.edges.some(e)};ih.prototype.isValid=function(){return!0};ih.prototype.isHole=function(){var e=this,r=this.edges.reduce(function(a,s,l){return s.from.coordinates[1]>e.edges[a].from.coordinates[1]&&(a=l),a},0),n=(r===0?this.length:r)-1,i=(r+1)%this.length,o=K0t(this.edges[n].from.coordinates,this.edges[r].from.coordinates,this.edges[i].from.coordinates);return o===0?this.edges[n].from.coordinates[0]>this.edges[i].from.coordinates[0]:o>0};ih.prototype.toMultiPoint=function(){return ZV(this.edges.map(function(e){return e.from.coordinates}))};ih.prototype.toPolygon=function(){if(this.polygon)return this.polygon;var e=this.edges.map(function(r){return r.from.coordinates});return e.push(this.edges[0].from.coordinates),this.polygon=CE([e])};ih.prototype.getEnvelope=function(){return this.envelope?this.envelope:this.envelope=M0t(this.toPolygon())};ih.findEdgeRingContaining=function(e,r){var n=e.getEnvelope(),i,o;return r.forEach(function(a){var s=a.getEnvelope();if(o&&(i=o.getEnvelope()),!Z0t(s,n)&&Wde(s,n)){var l=e.map(function(u){return u.from.coordinates}).find(function(u){return!a.some(function(p){return Q0t(u,p.from.coordinates)})});l&&a.inside(wE(l))&&(!o||Wde(i,s))&&(o=a)}}),o};ih.prototype.inside=function(e){return Ode(e,this.toPolygon())};Object.defineProperties(ih.prototype,Gde);var mH=Ly(function(t,e){e=t.exports=typeof Object.keys=="function"?Object.keys:r,e.shim=r;function r(n){var i=[];for(var o in n)i.push(o);return i}});mH.shim;var M5=Ly(function(t,e){var r=function(){return Object.prototype.toString.call(arguments)}()=="[object Arguments]";e=t.exports=r?n:i,e.supported=n;function n(o){return Object.prototype.toString.call(o)=="[object Arguments]"}e.unsupported=i;function i(o){return o&&typeof o=="object"&&typeof o.length=="number"&&Object.prototype.hasOwnProperty.call(o,"callee")&&!Object.prototype.propertyIsEnumerable.call(o,"callee")||!1}});M5.supported;M5.unsupported;Ly(function(t){var e=Array.prototype.slice,r=t.exports=function(a,s,l){return l||(l={}),a===s?!0:a instanceof Date&&s instanceof Date?a.getTime()===s.getTime():!a||!s||typeof a!="object"&&typeof s!="object"?l.strict?a===s:a==s:o(a,s,l)};function n(a){return a==null}function i(a){return!(!a||typeof a!="object"||typeof a.length!="number"||typeof a.copy!="function"||typeof a.slice!="function"||a.length>0&&typeof a[0]!="number")}function o(a,s,l){var u,p;if(n(a)||n(s)||a.prototype!==s.prototype)return!1;if(M5(a))return M5(s)?(a=e.call(a),s=e.call(s),r(a,s,l)):!1;if(i(a)){if(!i(s)||a.length!==s.length)return!1;for(u=0;u<a.length;u++)if(a[u]!==s[u])return!1;return!0}try{var m=mH(a),v=mH(s)}catch{return!1}if(m.length!=v.length)return!1;for(m.sort(),v.sort(),u=m.length-1;u>=0;u--)if(m[u]!=v[u])return!1;for(u=m.length-1;u>=0;u--)if(p=m[u],!r(a[p],s[p],l))return!1;return typeof a==typeof s}});var J0t=Ly(function(t){function e(r,n,i,o){this.dataset=[],this.epsilon=1,this.minPts=2,this.distance=this._euclideanDistance,this.clusters=[],this.noise=[],this._visited=[],this._assigned=[],this._datasetLength=0,this._init(r,n,i,o)}e.prototype.run=function(r,n,i,o){this._init(r,n,i,o);for(var a=0;a<this._datasetLength;a++)if(this._visited[a]!==1){this._visited[a]=1;var s=this._regionQuery(a);if(s.length<this.minPts)this.noise.push(a);else{var l=this.clusters.length;this.clusters.push([]),this._addToCluster(a,l),this._expandCluster(l,s)}}return this.clusters},e.prototype._init=function(r,n,i,o){if(r){if(!(r instanceof Array))throw Error("Dataset must be of type array, "+typeof r+" given");this.dataset=r,this.clusters=[],this.noise=[],this._datasetLength=r.length,this._visited=new Array(this._datasetLength),this._assigned=new Array(this._datasetLength)}n&&(this.epsilon=n),i&&(this.minPts=i),o&&(this.distance=o)},e.prototype._expandCluster=function(r,n){for(var i=0;i<n.length;i++){var o=n[i];if(this._visited[o]!==1){this._visited[o]=1;var a=this._regionQuery(o);a.length>=this.minPts&&(n=this._mergeArrays(n,a))}this._assigned[o]!==1&&this._addToCluster(o,r)}},e.prototype._addToCluster=function(r,n){this.clusters[n].push(r),this._assigned[r]=1},e.prototype._regionQuery=function(r){for(var n=[],i=0;i<this._datasetLength;i++){var o=this.distance(this.dataset[r],this.dataset[i]);o<this.epsilon&&n.push(i)}return n},e.prototype._mergeArrays=function(r,n){for(var i=n.length,o=0;o<i;o++){var a=n[o];r.indexOf(a)<0&&r.push(a)}return r},e.prototype._euclideanDistance=function(r,n){for(var i=0,o=Math.min(r.length,n.length);o--;)i+=(r[o]-n[o])*(r[o]-n[o]);return Math.sqrt(i)},t.exports&&(t.exports=e)}),ext=Ly(function(t){function e(r,n,i){this.k=3,this.dataset=[],this.assignments=[],this.centroids=[],this.init(r,n,i)}e.prototype.init=function(r,n,i){this.assignments=[],this.centroids=[],typeof r!="undefined"&&(this.dataset=r),typeof n!="undefined"&&(this.k=n),typeof i!="undefined"&&(this.distance=i)},e.prototype.run=function(r,n){this.init(r,n);for(var i=this.dataset.length,o=0;o<this.k;o++)this.centroids[o]=this.randomCentroid();for(var a=!0;a;){a=this.assign();for(var s=0;s<this.k;s++){for(var l=new Array(v),u=0,p=0;p<v;p++)l[p]=0;for(var m=0;m<i;m++){var v=this.dataset[m].length;if(s===this.assignments[m]){for(var p=0;p<v;p++)l[p]+=this.dataset[m][p];u++}}if(u>0){for(var p=0;p<v;p++)l[p]/=u;this.centroids[s]=l}else this.centroids[s]=this.randomCentroid(),a=!0}}return this.getClusters()},e.prototype.randomCentroid=function(){var r=this.dataset.length-1,n,i;do i=Math.round(Math.random()*r),n=this.dataset[i];while(this.centroids.indexOf(n)>=0);return n},e.prototype.assign=function(){for(var r=!1,n=this.dataset.length,i,o=0;o<n;o++)i=this.argmin(this.dataset[o],this.centroids,this.distance),i!=this.assignments[o]&&(this.assignments[o]=i,r=!0);return r},e.prototype.getClusters=function(){for(var r=new Array(this.k),n,i=0;i<this.assignments.length;i++)n=this.assignments[i],typeof r[n]=="undefined"&&(r[n]=[]),r[n].push(i);return r},e.prototype.argmin=function(r,n,i){for(var o=Number.MAX_VALUE,a=0,s=n.length,l,u=0;u<s;u++)l=i(r,n[u]),l<o&&(o=l,a=u);return a},e.prototype.distance=function(r,n){for(var i=0,o=Math.min(r.length,n.length);o--;){var a=r[o]-n[o];i+=a*a}return Math.sqrt(i)},t.exports&&(t.exports=e)}),qde=Ly(function(t){function e(r,n,i){this._queue=[],this._priorities=[],this._sorting="desc",this._init(r,n,i)}e.prototype.insert=function(r,n){for(var i=this._queue.length,o=i;o--;){var a=this._priorities[o];this._sorting==="desc"?n>a&&(i=o):n<a&&(i=o)}this._insertAt(r,n,i)},e.prototype.remove=function(r){for(var n=this._queue.length;n--;){var i=this._queue[n];if(r===i){this._queue.splice(n,1),this._priorities.splice(n,1);break}}},e.prototype.forEach=function(r){this._queue.forEach(r)},e.prototype.getElements=function(){return this._queue},e.prototype.getElementPriority=function(r){return this._priorities[r]},e.prototype.getPriorities=function(){return this._priorities},e.prototype.getElementsWithPriorities=function(){for(var r=[],n=0,i=this._queue.length;n<i;n++)r.push([this._queue[n],this._priorities[n]]);return r},e.prototype._init=function(r,n,i){if(r&&n){if(this._queue=[],this._priorities=[],r.length!==n.length)throw new Error("Arrays must have the same length");for(var o=0;o<r.length;o++)this.insert(r[o],n[o])}i&&(this._sorting=i)},e.prototype._insertAt=function(r,n,i){this._queue.length===i?(this._queue.push(r),this._priorities.push(n)):(this._queue.splice(i,0,r),this._priorities.splice(i,0,n))},t.exports&&(t.exports=e)}),txt=Ly(function(t){if(t.exports)var e=qde;function r(n,i,o,a){this.epsilon=1,this.minPts=1,this.distance=this._euclideanDistance,this._reachability=[],this._processed=[],this._coreDistance=0,this._orderedList=[],this._init(n,i,o,a)}r.prototype.run=function(n,i,o,a){this._init(n,i,o,a);for(var s=0,l=this.dataset.length;s<l;s++)if(this._processed[s]!==1){this._processed[s]=1,this.clusters.push([s]);var u=this.clusters.length-1;this._orderedList.push(s);var p=new e(null,null,"asc"),m=this._regionQuery(s);this._distanceToCore(s)!==void 0&&(this._updateQueue(s,m,p),this._expandCluster(u,p))}return this.clusters},r.prototype.getReachabilityPlot=function(){for(var n=[],i=0,o=this._orderedList.length;i<o;i++){var a=this._orderedList[i],s=this._reachability[a];n.push([a,s])}return n},r.prototype._init=function(n,i,o,a){if(n){if(!(n instanceof Array))throw Error("Dataset must be of type array, "+typeof n+" given");this.dataset=n,this.clusters=[],this._reachability=new Array(this.dataset.length),this._processed=new Array(this.dataset.length),this._coreDistance=0,this._orderedList=[]}i&&(this.epsilon=i),o&&(this.minPts=o),a&&(this.distance=a)},r.prototype._updateQueue=function(n,i,o){var a=this;this._coreDistance=this._distanceToCore(n),i.forEach(function(s){if(a._processed[s]===void 0){var l=a.distance(a.dataset[n],a.dataset[s]),u=Math.max(a._coreDistance,l);a._reachability[s]===void 0?(a._reachability[s]=u,o.insert(s,u)):u<a._reachability[s]&&(a._reachability[s]=u,o.remove(s),o.insert(s,u))}})},r.prototype._expandCluster=function(n,i){for(var o=i.getElements(),a=0,s=o.length;a<s;a++){var l=o[a];if(this._processed[l]===void 0){var u=this._regionQuery(l);this._processed[l]=1,this.clusters[n].push(l),this._orderedList.push(l),this._distanceToCore(l)!==void 0&&(this._updateQueue(l,u,i),this._expandCluster(n,i))}}},r.prototype._distanceToCore=function(n){for(var i=this.epsilon,o=0;o<i;o++){var a=this._regionQuery(n,o);if(a.length>=this.minPts)return o}},r.prototype._regionQuery=function(n,i){i=i||this.epsilon;for(var o=[],a=0,s=this.dataset.length;a<s;a++)this.distance(this.dataset[n],this.dataset[a])<i&&o.push(a);return o},r.prototype._euclideanDistance=function(n,i){for(var o=0,a=Math.min(n.length,i.length);a--;)o+=(n[a]-i[a])*(n[a]-i[a]);return Math.sqrt(o)},t.exports&&(t.exports=r)}),A5=Ly(function(t){t.exports&&(t.exports={DBSCAN:J0t,KMEANS:ext,OPTICS:txt,PriorityQueue:qde})});A5.DBSCAN;A5.KMEANS;A5.OPTICS;A5.PriorityQueue;function R5(){this._=null}function k5(t){t.U=t.C=t.L=t.R=t.P=t.N=null}R5.prototype={constructor:R5,insert:function(t,e){var r,n,i;if(t){if(e.P=t,e.N=t.N,t.N&&(t.N.P=e),t.N=e,t.R){for(t=t.R;t.L;)t=t.L;t.L=e}else t.R=e;r=t}else this._?(t=Xde(this._),e.P=null,e.N=t,t.P=t.L=e,r=t):(e.P=e.N=null,this._=e,r=null);for(e.L=e.R=null,e.U=r,e.C=!0,t=e;r&&r.C;)n=r.U,r===n.L?(i=n.R,i&&i.C?(r.C=i.C=!1,n.C=!0,t=n):(t===r.R&&(qM(this,r),t=r,r=t.U),r.C=!1,n.C=!0,XM(this,n))):(i=n.L,i&&i.C?(r.C=i.C=!1,n.C=!0,t=n):(t===r.L&&(XM(this,r),t=r,r=t.U),r.C=!1,n.C=!0,qM(this,n))),r=t.U;this._.C=!1},remove:function(t){t.N&&(t.N.P=t.P),t.P&&(t.P.N=t.N),t.N=t.P=null;var e=t.U,r,n=t.L,i=t.R,o,a;if(n?i?o=Xde(i):o=n:o=i,e?e.L===t?e.L=o:e.R=o:this._=o,n&&i?(a=o.C,o.C=t.C,o.L=n,n.U=o,o!==i?(e=o.U,o.U=t.U,t=o.R,e.L=t,o.R=i,i.U=o):(o.U=e,e=o,t=o.R)):(a=t.C,t=o),t&&(t.U=e),!a){if(t&&t.C){t.C=!1;return}do{if(t===this._)break;if(t===e.L){if(r=e.R,r.C&&(r.C=!1,e.C=!0,qM(this,e),r=e.R),r.L&&r.L.C||r.R&&r.R.C){(!r.R||!r.R.C)&&(r.L.C=!1,r.C=!0,XM(this,r),r=e.R),r.C=e.C,e.C=r.R.C=!1,qM(this,e),t=this._;break}}else if(r=e.L,r.C&&(r.C=!1,e.C=!0,XM(this,e),r=e.L),r.L&&r.L.C||r.R&&r.R.C){(!r.L||!r.L.C)&&(r.R.C=!1,r.C=!0,qM(this,r),r=e.L),r.C=e.C,e.C=r.L.C=!1,XM(this,e),t=this._;break}r.C=!0,t=e,e=e.U}while(!t.C);t&&(t.C=!1)}}};function qM(t,e){var r=e,n=e.R,i=r.U;i?i.L===r?i.L=n:i.R=n:t._=n,n.U=i,r.U=n,r.R=n.L,r.R&&(r.R.U=r),n.L=r}function XM(t,e){var r=e,n=e.L,i=r.U;i?i.L===r?i.L=n:i.R=n:t._=n,n.U=i,r.U=n,r.L=n.R,r.L&&(r.L.U=r),n.R=r}function Xde(t){for(;t.L;)t=t.L;return t}function YM(t,e,r,n){var i=[null,null],o=Lu.push(i)-1;return i.left=t,i.right=e,r&&O5(i,t,e,r),n&&O5(i,e,t,n),oh[t.index].halfedges.push(o),oh[e.index].halfedges.push(o),i}function KM(t,e,r){var n=[e,r];return n.left=t,n}function O5(t,e,r,n){!t[0]&&!t[1]?(t[0]=n,t.left=e,t.right=r):t.left===r?t[1]=n:t[0]=n}function rxt(t,e,r,n,i){var o=t[0],a=t[1],s=o[0],l=o[1],u=a[0],p=a[1],m=0,v=1,x=u-s,y=p-l,_;if(_=e-s,!(!x&&_>0)){if(_/=x,x<0){if(_<m)return;_<v&&(v=_)}else if(x>0){if(_>v)return;_>m&&(m=_)}if(_=n-s,!(!x&&_<0)){if(_/=x,x<0){if(_>v)return;_>m&&(m=_)}else if(x>0){if(_<m)return;_<v&&(v=_)}if(_=r-l,!(!y&&_>0)){if(_/=y,y<0){if(_<m)return;_<v&&(v=_)}else if(y>0){if(_>v)return;_>m&&(m=_)}if(_=i-l,!(!y&&_<0)){if(_/=y,y<0){if(_>v)return;_>m&&(m=_)}else if(y>0){if(_<m)return;_<v&&(v=_)}return!(m>0)&&!(v<1)||(m>0&&(t[0]=[s+m*x,l+m*y]),v<1&&(t[1]=[s+v*x,l+v*y])),!0}}}}}function nxt(t,e,r,n,i){var o=t[1];if(o)return!0;var a=t[0],s=t.left,l=t.right,u=s[0],p=s[1],m=l[0],v=l[1],x=(u+m)/2,y=(p+v)/2,_,w;if(v===p){if(x<e||x>=n)return;if(u>m){if(!a)a=[x,r];else if(a[1]>=i)return;o=[x,i]}else{if(!a)a=[x,i];else if(a[1]<r)return;o=[x,r]}}else if(_=(u-m)/(v-p),w=y-_*x,_<-1||_>1)if(u>m){if(!a)a=[(r-w)/_,r];else if(a[1]>=i)return;o=[(i-w)/_,i]}else{if(!a)a=[(i-w)/_,i];else if(a[1]<r)return;o=[(r-w)/_,r]}else if(p<v){if(!a)a=[e,_*e+w];else if(a[0]>=n)return;o=[n,_*n+w]}else{if(!a)a=[n,_*n+w];else if(a[0]<e)return;o=[e,_*e+w]}return t[0]=a,t[1]=o,!0}function ixt(t,e,r,n){for(var i=Lu.length,o;i--;)(!nxt(o=Lu[i],t,e,r,n)||!rxt(o,t,e,r,n)||!(Math.abs(o[0][0]-o[1][0])>La||Math.abs(o[0][1]-o[1][1])>La))&&delete Lu[i]}function oxt(t){return oh[t.index]={site:t,halfedges:[]}}function sxt(t,e){var r=t.site,n=e.left,i=e.right;return r===i&&(i=n,n=r),i?Math.atan2(i[1]-n[1],i[0]-n[0]):(r===n?(n=e[1],i=e[0]):(n=e[0],i=e[1]),Math.atan2(n[0]-i[0],i[1]-n[1]))}function Yde(t,e){return e[+(e.left!==t.site)]}function axt(t,e){return e[+(e.left===t.site)]}function lxt(){for(var t=0,e=oh.length,r,n,i,o;t<e;++t)if((r=oh[t])&&(o=(n=r.halfedges).length)){var a=new Array(o),s=new Array(o);for(i=0;i<o;++i)a[i]=i,s[i]=sxt(r,Lu[n[i]]);for(a.sort(function(l,u){return s[u]-s[l]}),i=0;i<o;++i)s[i]=n[a[i]];for(i=0;i<o;++i)n[i]=s[i]}}function cxt(t,e,r,n){var i=oh.length,o,a,s,l,u,p,m,v,x,y,_,w,C=!0;for(o=0;o<i;++o)if(a=oh[o]){for(s=a.site,u=a.halfedges,l=u.length;l--;)Lu[u[l]]||u.splice(l,1);for(l=0,p=u.length;l<p;)y=axt(a,Lu[u[l]]),_=y[0],w=y[1],m=Yde(a,Lu[u[++l%p]]),v=m[0],x=m[1],(Math.abs(_-v)>La||Math.abs(w-x)>La)&&(u.splice(l,0,Lu.push(KM(s,y,Math.abs(_-t)<La&&n-w>La?[t,Math.abs(v-t)<La?x:n]:Math.abs(w-n)<La&&r-_>La?[Math.abs(x-n)<La?v:r,n]:Math.abs(_-r)<La&&w-e>La?[r,Math.abs(v-r)<La?x:e]:Math.abs(w-e)<La&&_-t>La?[Math.abs(x-e)<La?v:t,e]:null))-1),++p);p&&(C=!1)}if(C){var E,T,A,k=1/0;for(o=0,C=null;o<i;++o)(a=oh[o])&&(s=a.site,E=s[0]-t,T=s[1]-e,A=E*E+T*T,A<k&&(k=A,C=a));if(C){var X=[t,e],Z=[t,n],W=[r,n],D=[r,e];C.halfedges.push(Lu.push(KM(s=C.site,X,Z))-1,Lu.push(KM(s,Z,W))-1,Lu.push(KM(s,W,D))-1,Lu.push(KM(s,D,X))-1)}}for(o=0;o<i;++o)(a=oh[o])&&(a.halfedges.length||delete oh[o])}var Kde=[],gH;function uxt(){k5(this),this.x=this.y=this.arc=this.site=this.cy=null}function ME(t){var e=t.P,r=t.N;if(!(!e||!r)){var n=e.site,i=t.site,o=r.site;if(n!==o){var a=i[0],s=i[1],l=n[0]-a,u=n[1]-s,p=o[0]-a,m=o[1]-s,v=2*(l*m-u*p);if(!(v>=-mxt)){var x=l*l+u*u,y=p*p+m*m,_=(m*x-u*y)/v,w=(l*y-p*x)/v,C=Kde.pop()||new uxt;C.arc=t,C.site=i,C.x=_+a,C.y=(C.cy=w+s)+Math.sqrt(_*_+w*w),t.circle=C;for(var E=null,T=ZM._;T;)if(C.y<T.y||C.y===T.y&&C.x<=T.x)if(T.L)T=T.L;else{E=T.P;break}else if(T.R)T=T.R;else{E=T;break}ZM.insert(E,C),E||(gH=C)}}}}function AE(t){var e=t.circle;e&&(e.P||(gH=e.N),ZM.remove(e),Kde.push(e),k5(e),t.circle=null)}var Zde=[];function fxt(){k5(this),this.edge=this.site=this.circle=null}function Qde(t){var e=Zde.pop()||new fxt;return e.site=t,e}function vH(t){AE(t),RE.remove(t),Zde.push(t),k5(t)}function dxt(t){var e=t.circle,r=e.x,n=e.cy,i=[r,n],o=t.P,a=t.N,s=[t];vH(t);for(var l=o;l.circle&&Math.abs(r-l.circle.x)<La&&Math.abs(n-l.circle.cy)<La;)o=l.P,s.unshift(l),vH(l),l=o;s.unshift(l),AE(l);for(var u=a;u.circle&&Math.abs(r-u.circle.x)<La&&Math.abs(n-u.circle.cy)<La;)a=u.N,s.push(u),vH(u),u=a;s.push(u),AE(u);var p=s.length,m;for(m=1;m<p;++m)u=s[m],l=s[m-1],O5(u.edge,l.site,u.site,i);l=s[0],u=s[p-1],u.edge=YM(l.site,u.site,null,i),ME(l),ME(u)}function hxt(t){for(var e=t[0],r=t[1],n,i,o,a,s=RE._;s;)if(o=Jde(s,r)-e,o>La)s=s.L;else if(a=e-pxt(s,r),a>La){if(!s.R){n=s;break}s=s.R}else{o>-La?(n=s.P,i=s):a>-La?(n=s,i=s.N):n=i=s;break}oxt(t);var l=Qde(t);if(RE.insert(n,l),!(!n&&!i)){if(n===i){AE(n),i=Qde(n.site),RE.insert(l,i),l.edge=i.edge=YM(n.site,l.site),ME(n),ME(i);return}if(!i){l.edge=YM(n.site,l.site);return}AE(n),AE(i);var u=n.site,p=u[0],m=u[1],v=t[0]-p,x=t[1]-m,y=i.site,_=y[0]-p,w=y[1]-m,C=2*(v*w-x*_),E=v*v+x*x,T=_*_+w*w,A=[(w*E-x*T)/C+p,(v*T-_*E)/C+m];O5(i.edge,u,y,A),l.edge=YM(u,t,null,A),i.edge=YM(t,y,null,A),ME(n),ME(i)}}function Jde(t,e){var r=t.site,n=r[0],i=r[1],o=i-e;if(!o)return n;var a=t.P;if(!a)return-1/0;r=a.site;var s=r[0],l=r[1],u=l-e;if(!u)return s;var p=s-n,m=1/o-1/u,v=p/u;return m?(-v+Math.sqrt(v*v-2*m*(p*p/(-2*u)-l+u/2+i-o/2)))/m+n:(n+s)/2}function pxt(t,e){var r=t.N;if(r)return Jde(r,e);var n=t.site;return n[1]===e?n[0]:1/0}var La=1e-6,mxt=1e-12,RE,oh,ZM,Lu;function gxt(t,e,r){return(t[0]-r[0])*(e[1]-t[1])-(t[0]-e[0])*(r[1]-t[1])}function vxt(t,e){return e[1]-t[1]||e[0]-t[0]}function ehe(t,e){var r=t.sort(vxt).pop(),n,i,o;for(Lu=[],oh=new Array(t.length),RE=new R5,ZM=new R5;;)if(o=gH,r&&(!o||r[1]<o.y||r[1]===o.y&&r[0]<o.x))(r[0]!==n||r[1]!==i)&&(hxt(r),n=r[0],i=r[1]),r=t.pop();else if(o)dxt(o.arc);else break;if(lxt(),e){var a=+e[0][0],s=+e[0][1],l=+e[1][0],u=+e[1][1];ixt(a,s,l,u),cxt(a,s,l,u)}this.edges=Lu,this.cells=oh,RE=ZM=Lu=oh=null}ehe.prototype={constructor:ehe,polygons:function(){var t=this.edges;return this.cells.map(function(e){var r=e.halfedges.map(function(n){return Yde(e,t[n])});return r.data=e.site.data,r})},triangles:function(){var t=[],e=this.edges;return this.cells.forEach(function(r,n){if(!!(s=(o=r.halfedges).length))for(var i=r.site,o,a=-1,s,l,u=e[o[s-1]],p=u.left===i?u.right:u.left;++a<s;)l=p,u=e[o[a]],p=u.left===i?u.right:u.left,l&&p&&n<l.index&&n<p.index&&gxt(i,l,p)<0&&t.push([i.data,l.data,p.data])}),t},links:function(){return this.edges.filter(function(t){return t.right}).map(function(t){return{source:t.left.data,target:t.right.data}})},find:function(t,e,r){for(var n=this,i,o=n._found||0,a=n.cells.length,s;!(s=n.cells[o]);)if(++o>=a)return null;var l=t-s.site[0],u=e-s.site[1],p=l*l+u*u;do s=n.cells[i=o],o=null,s.halfedges.forEach(function(m){var v=n.edges[m],x=v.left;if(!((x===s.site||!x)&&!(x=v.right))){var y=t-x[0],_=e-x[1],w=y*y+_*_;w<p&&(p=w,o=x.index)}});while(o!==null);return n._found=i,r==null||p<=r*r?s.site:null}};function L5(t){if(Fm(t)&&(t=t.bbox),t&&!Array.isArray(t))throw new Error("bbox is invalid");return t?Ext(t):[wxt(),Cxt()]}function yxt(t,e){if(e=e||{},!Fm(e))throw new Error("options is invalid");var r=e.bbox;t==null&&(t=1);for(var n=[],i=0;i<t;i++)n.push(wE(L5(r)));return Oy(n)}function xxt(t,e){if(e=e||{},!Fm(e))throw new Error("options is invalid");var r=e.bbox,n=e.num_vertices,i=e.max_radial_length;t==null&&(t=1),Cc(n)||(n=10),Cc(i)||(i=10);for(var o=[],a=0;a<t;a++){var s=[],l=Array.apply(null,new Array(n+1)).map(Math.random);l.forEach(u),l.forEach(p),s[s.length-1]=s[0],s=s.map(bxt(L5(r))),o.push(CE([s]))}function u(m,v,x){x[v]=v>0?m+x[v-1]:m}function p(m){m=m*2*Math.PI/l[l.length-1];var v=Math.random();s.push([v*i*Math.sin(m),v*i*Math.cos(m)])}return Oy(o)}function _xt(t,e){if(e=e||{},!Fm(e))throw new Error("options is invalid");var r=e.bbox,n=e.num_vertices,i=e.max_length,o=e.max_rotation;t==null&&(t=1),(!Cc(n)||n<2)&&(n=10),Cc(i)||(i=1e-4),Cc(o)||(o=Math.PI/8);for(var a=[],s=0;s<t;s++){for(var l=L5(r),u=[l],p=0;p<n-1;p++){var m=p===0?Math.random()*2*Math.PI:Math.tan((u[p][1]-u[p-1][1])/(u[p][0]-u[p-1][0])),v=m+(Math.random()-.5)*o*2,x=Math.random()*i;u.push([u[p][0]+x*Math.cos(v),u[p][1]+x*Math.sin(v)])}a.push(EE(u))}return Oy(a)}function bxt(t){return function(e){return[e[0]+t[0],e[1]+t[1]]}}function the(){return Math.random()-.5}function wxt(){return the()*360}function Cxt(){return the()*180}function Ext(t){return[Math.random()*(t[2]-t[0])+t[0],Math.random()*(t[3]-t[1])+t[1]]}Object.freeze({randomPosition:L5,randomPoint:yxt,randomPolygon:xxt,randomLineString:_xt});function Sxt(t,e){if(!t)throw new Error("geojson is required");if(t.type!=="FeatureCollection")throw new Error("geojson must be a FeatureCollection");if(e==null)throw new Error("filter is required");var r=[];return y5(t,function(n){yH(n.properties,e)&&r.push(n)}),Oy(r)}function rhe(t,e,r){if(!t)throw new Error("geojson is required");if(t.type!=="FeatureCollection")throw new Error("geojson must be a FeatureCollection");if(e==null)throw new Error("property is required");for(var n=nhe(t,e),i=Object.keys(n),o=0;o<i.length;o++){for(var a=i[o],s=n[a],l=[],u=0;u<s.length;u++)l.push(t.features[s[u]]);r(Oy(l),a,o)}}function Txt(t,e,r,n){var i=n;return rhe(t,e,function(o,a,s){s===0&&n===void 0?i=o:i=r(i,o,a,s)}),i}function nhe(t,e){var r={};return y5(t,function(n,i){var o=n.properties||{};if(o.hasOwnProperty(e)){var a=o[e];r.hasOwnProperty(a)?r[a].push(i):r[a]=[i]}}),r}function yH(t,e){if(t===void 0)return!1;var r=typeof e;if(r==="number"||r==="string")return t.hasOwnProperty(e);if(Array.isArray(e)){for(var n=0;n<e.length;n++)if(!yH(t,e[n]))return!1;return!0}else return ihe(t,e)}function ihe(t,e){for(var r=Object.keys(e),n=0;n<r.length;n++){var i=r[n];if(t[i]!==e[i])return!1}return!0}function Pxt(t,e){if(!e)return{};if(!e.length)return{};for(var r={},n=0;n<e.length;n++){var i=e[n];t.hasOwnProperty(i)&&(r[i]=t[i])}return r}Object.freeze({getCluster:Sxt,clusterEach:rhe,clusterReduce:Txt,createBins:nhe,applyFilter:yH,propertiesContainsFilter:ihe,filterProperties:Pxt});"fill"in Array.prototype||Object.defineProperty(Array.prototype,"fill",{configurable:!0,value:function(e){if(this===void 0||this===null)throw new TypeError(this+" is not an object");var r=Object(this),n=Math.max(Math.min(r.length,9007199254740991),0)||0,i=1 in arguments&&parseInt(Number(arguments[1]),10)||0;i=i<0?Math.max(n+i,0):Math.min(i,n);var o=2 in arguments&&arguments[2]!==void 0?parseInt(Number(arguments[2]),10)||0:n;for(o=o<0?Math.max(n+arguments[2],0):Math.min(o,n);i<o;)r[i]=e,++i;return r},writable:!0});Number.isFinite=Number.isFinite||function(t){return typeof t=="number"&&isFinite(t)};Number.isInteger=Number.isInteger||function(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t};Number.parseFloat=Number.parseFloat||parseFloat;Number.isNaN=Number.isNaN||function(t){return t!==t};Math.trunc=Math.trunc||function(t){return t<0?Math.ceil(t):Math.floor(t)};var Ib=function(){};Ib.prototype.interfaces_=function(){return[]};Ib.prototype.getClass=function(){return Ib};Ib.prototype.equalsWithTolerance=function(e,r,n){return Math.abs(e-r)<=n};var Ls=function(){},mi=function(){},ohe={MAX_VALUE:{configurable:!0}};mi.isNaN=function(e){return Number.isNaN(e)};mi.doubleToLongBits=function(e){return e};mi.longBitsToDouble=function(e){return e};mi.isInfinite=function(e){return!Number.isFinite(e)};ohe.MAX_VALUE.get=function(){return Number.MAX_VALUE};Object.defineProperties(mi,ohe);var sd=function(){},D5=function(){},kE=function(){};function ad(){}var ar=function t(){if(this.x=null,this.y=null,this.z=null,arguments.length===0)this.x=0,this.y=0,this.z=t.NULL_ORDINATE;else if(arguments.length===1){var e=arguments[0];this.x=e.x,this.y=e.y,this.z=e.z}else arguments.length===2?(this.x=arguments[0],this.y=arguments[1],this.z=t.NULL_ORDINATE):arguments.length===3&&(this.x=arguments[0],this.y=arguments[1],this.z=arguments[2])},Mb={DimensionalComparator:{configurable:!0},serialVersionUID:{configurable:!0},NULL_ORDINATE:{configurable:!0},X:{configurable:!0},Y:{configurable:!0},Z:{configurable:!0}};ar.prototype.setOrdinate=function(e,r){switch(e){case ar.X:this.x=r;break;case ar.Y:this.y=r;break;case ar.Z:this.z=r;break;default:throw new Ls}};ar.prototype.equals2D=function(){if(arguments.length===1){var e=arguments[0];return!(this.x!==e.x||this.y!==e.y)}else if(arguments.length===2){var r=arguments[0],n=arguments[1];return!(!Ib.equalsWithTolerance(this.x,r.x,n)||!Ib.equalsWithTolerance(this.y,r.y,n))}};ar.prototype.getOrdinate=function(e){switch(e){case ar.X:return this.x;case ar.Y:return this.y;case ar.Z:return this.z}throw new Ls};ar.prototype.equals3D=function(e){return this.x===e.x&&this.y===e.y&&(this.z===e.z||mi.isNaN(this.z))&&mi.isNaN(e.z)};ar.prototype.equals=function(e){return e instanceof ar?this.equals2D(e):!1};ar.prototype.equalInZ=function(e,r){return Ib.equalsWithTolerance(this.z,e.z,r)};ar.prototype.compareTo=function(e){var r=e;return this.x<r.x?-1:this.x>r.x?1:this.y<r.y?-1:this.y>r.y?1:0};ar.prototype.clone=function(){};ar.prototype.copy=function(){return new ar(this)};ar.prototype.toString=function(){return"("+this.x+", "+this.y+", "+this.z+")"};ar.prototype.distance3D=function(e){var r=this.x-e.x,n=this.y-e.y,i=this.z-e.z;return Math.sqrt(r*r+n*n+i*i)};ar.prototype.distance=function(e){var r=this.x-e.x,n=this.y-e.y;return Math.sqrt(r*r+n*n)};ar.prototype.hashCode=function(){var e=17;return e=37*e+ar.hashCode(this.x),e=37*e+ar.hashCode(this.y),e};ar.prototype.setCoordinate=function(e){this.x=e.x,this.y=e.y,this.z=e.z};ar.prototype.interfaces_=function(){return[sd,D5,ad]};ar.prototype.getClass=function(){return ar};ar.hashCode=function(){if(arguments.length===1){var e=arguments[0],r=mi.doubleToLongBits(e);return Math.trunc((r^r)>>>32)}};Mb.DimensionalComparator.get=function(){return Dy};Mb.serialVersionUID.get=function(){return 6683108902428367e3};Mb.NULL_ORDINATE.get=function(){return mi.NaN};Mb.X.get=function(){return 0};Mb.Y.get=function(){return 1};Mb.Z.get=function(){return 2};Object.defineProperties(ar,Mb);var Dy=function(e){if(this._dimensionsToTest=2,arguments.length!==0){if(arguments.length===1){var r=arguments[0];if(r!==2&&r!==3)throw new Ls;this._dimensionsToTest=r}}};Dy.prototype.compare=function(e,r){var n=e,i=r,o=Dy.compare(n.x,i.x);if(o!==0)return o;var a=Dy.compare(n.y,i.y);if(a!==0)return a;if(this._dimensionsToTest<=2)return 0;var s=Dy.compare(n.z,i.z);return s};Dy.prototype.interfaces_=function(){return[kE]};Dy.prototype.getClass=function(){return Dy};Dy.compare=function(e,r){return e<r?-1:e>r?1:mi.isNaN(e)?mi.isNaN(r)?0:-1:mi.isNaN(r)?1:0};var OE=function(){};OE.prototype.create=function(){};OE.prototype.interfaces_=function(){return[]};OE.prototype.getClass=function(){return OE};var ur=function(){},QM={INTERIOR:{configurable:!0},BOUNDARY:{configurable:!0},EXTERIOR:{configurable:!0},NONE:{configurable:!0}};ur.prototype.interfaces_=function(){return[]};ur.prototype.getClass=function(){return ur};ur.toLocationSymbol=function(e){switch(e){case ur.EXTERIOR:return"e";case ur.BOUNDARY:return"b";case ur.INTERIOR:return"i";case ur.NONE:return"-"}throw new Ls};QM.INTERIOR.get=function(){return 0};QM.BOUNDARY.get=function(){return 1};QM.EXTERIOR.get=function(){return 2};QM.NONE.get=function(){return-1};Object.defineProperties(ur,QM);var ai=function(t,e){return t.interfaces_&&t.interfaces_().indexOf(e)>-1},uf=function(){},she={LOG_10:{configurable:!0}};uf.prototype.interfaces_=function(){return[]};uf.prototype.getClass=function(){return uf};uf.log10=function(e){var r=Math.log(e);return mi.isInfinite(r)||mi.isNaN(r)?r:r/uf.LOG_10};uf.min=function(e,r,n,i){var o=e;return r<o&&(o=r),n<o&&(o=n),i<o&&(o=i),o};uf.clamp=function(){if(typeof arguments[2]=="number"&&typeof arguments[0]=="number"&&typeof arguments[1]=="number"){var e=arguments[0],r=arguments[1],n=arguments[2];return e<r?r:e>n?n:e}else if(Number.isInteger(arguments[2])&&Number.isInteger(arguments[0])&&Number.isInteger(arguments[1])){var i=arguments[0],o=arguments[1],a=arguments[2];return i<o?o:i>a?a:i}};uf.wrap=function(e,r){return e<0?r- -e%r:e%r};uf.max=function(){if(arguments.length===3){var e=arguments[0],r=arguments[1],n=arguments[2],i=e;return r>i&&(i=r),n>i&&(i=n),i}else if(arguments.length===4){var o=arguments[0],a=arguments[1],s=arguments[2],l=arguments[3],u=o;return a>u&&(u=a),s>u&&(u=s),l>u&&(u=l),u}};uf.average=function(e,r){return(e+r)/2};she.LOG_10.get=function(){return Math.log(10)};Object.defineProperties(uf,she);var vp=function(e){this.str=e};vp.prototype.append=function(e){this.str+=e};vp.prototype.setCharAt=function(e,r){this.str=this.str.substr(0,e)+r+this.str.substr(e+1)};vp.prototype.toString=function(e){return this.str};var yp=function(e){this.value=e};yp.prototype.intValue=function(){return this.value};yp.prototype.compareTo=function(e){return this.value<e?-1:this.value>e?1:0};yp.isNaN=function(e){return Number.isNaN(e)};var JM=function(){};JM.isWhitespace=function(e){return e<=32&&e>=0||e===127};JM.toUpperCase=function(e){return e.toUpperCase()};var vr=function t(){if(this._hi=0,this._lo=0,arguments.length===0)this.init(0);else if(arguments.length===1){if(typeof arguments[0]=="number"){var e=arguments[0];this.init(e)}else if(arguments[0]instanceof t){var r=arguments[0];this.init(r)}else if(typeof arguments[0]=="string"){var n=arguments[0];t.call(this,t.parse(n))}}else if(arguments.length===2){var i=arguments[0],o=arguments[1];this.init(i,o)}},sh={PI:{configurable:!0},TWO_PI:{configurable:!0},PI_2:{configurable:!0},E:{configurable:!0},NaN:{configurable:!0},EPS:{configurable:!0},SPLIT:{configurable:!0},MAX_PRINT_DIGITS:{configurable:!0},TEN:{configurable:!0},ONE:{configurable:!0},SCI_NOT_EXPONENT_CHAR:{configurable:!0},SCI_NOT_ZERO:{configurable:!0}};vr.prototype.le=function(e){return(this._hi<e._hi||this._hi===e._hi)&&this._lo<=e._lo};vr.prototype.extractSignificantDigits=function(e,r){var n=this.abs(),i=vr.magnitude(n._hi),o=vr.TEN.pow(i);n=n.divide(o),n.gt(vr.TEN)?(n=n.divide(vr.TEN),i+=1):n.lt(vr.ONE)&&(n=n.multiply(vr.TEN),i-=1);for(var a=i+1,s=new vp,l=vr.MAX_PRINT_DIGITS-1,u=0;u<=l;u++){e&&u===a&&s.append(".");var p=Math.trunc(n._hi);if(p<0)break;var m=!1,v=0;p>9?(m=!0,v="9"):v="0"+p,s.append(v),n=n.subtract(vr.valueOf(p)).multiply(vr.TEN),m&&n.selfAdd(vr.TEN);var x=!0,y=vr.magnitude(n._hi);if(y<0&&Math.abs(y)>=l-u&&(x=!1),!x)break}return r[0]=i,s.toString()};vr.prototype.sqr=function(){return this.multiply(this)};vr.prototype.doubleValue=function(){return this._hi+this._lo};vr.prototype.subtract=function(){if(arguments[0]instanceof vr){var e=arguments[0];return this.add(e.negate())}else if(typeof arguments[0]=="number"){var r=arguments[0];return this.add(-r)}};vr.prototype.equals=function(){if(arguments.length===1){var e=arguments[0];return this._hi===e._hi&&this._lo===e._lo}};vr.prototype.isZero=function(){return this._hi===0&&this._lo===0};vr.prototype.selfSubtract=function(){if(arguments[0]instanceof vr){var e=arguments[0];return this.isNaN()?this:this.selfAdd(-e._hi,-e._lo)}else if(typeof arguments[0]=="number"){var r=arguments[0];return this.isNaN()?this:this.selfAdd(-r,0)}};vr.prototype.getSpecialNumberString=function(){return this.isZero()?"0.0":this.isNaN()?"NaN ":null};vr.prototype.min=function(e){return this.le(e)?this:e};vr.prototype.selfDivide=function(){if(arguments.length===1){if(arguments[0]instanceof vr){var e=arguments[0];return this.selfDivide(e._hi,e._lo)}else if(typeof arguments[0]=="number"){var r=arguments[0];return this.selfDivide(r,0)}}else if(arguments.length===2){var n=arguments[0],i=arguments[1],o=null,a=null,s=null,l=null,u=null,p=null,m=null,v=null;return u=this._hi/n,p=vr.SPLIT*u,o=p-u,v=vr.SPLIT*n,o=p-o,a=u-o,s=v-n,m=u*n,s=v-s,l=n-s,v=o*s-m+o*l+a*s+a*l,p=(this._hi-m-v+this._lo-u*i)/n,v=u+p,this._hi=v,this._lo=u-v+p,this}};vr.prototype.dump=function(){return"DD<"+this._hi+", "+this._lo+">"};vr.prototype.divide=function(){if(arguments[0]instanceof vr){var e=arguments[0],r=null,n=null,i=null,o=null,a=null,s=null,l=null,u=null;a=this._hi/e._hi,s=vr.SPLIT*a,r=s-a,u=vr.SPLIT*e._hi,r=s-r,n=a-r,i=u-e._hi,l=a*e._hi,i=u-i,o=e._hi-i,u=r*i-l+r*o+n*i+n*o,s=(this._hi-l-u+this._lo-a*e._lo)/e._hi,u=a+s;var p=u,m=a-u+s;return new vr(p,m)}else if(typeof arguments[0]=="number"){var v=arguments[0];return mi.isNaN(v)?vr.createNaN():vr.copy(this).selfDivide(v,0)}};vr.prototype.ge=function(e){return(this._hi>e._hi||this._hi===e._hi)&&this._lo>=e._lo};vr.prototype.pow=function(e){if(e===0)return vr.valueOf(1);var r=new vr(this),n=vr.valueOf(1),i=Math.abs(e);if(i>1)for(;i>0;)i%2==1&&n.selfMultiply(r),i/=2,i>0&&(r=r.sqr());else n=r;return e<0?n.reciprocal():n};vr.prototype.ceil=function(){if(this.isNaN())return vr.NaN;var e=Math.ceil(this._hi),r=0;return e===this._hi&&(r=Math.ceil(this._lo)),new vr(e,r)};vr.prototype.compareTo=function(e){var r=e;return this._hi<r._hi?-1:this._hi>r._hi?1:this._lo<r._lo?-1:this._lo>r._lo?1:0};vr.prototype.rint=function(){if(this.isNaN())return this;var e=this.add(.5);return e.floor()};vr.prototype.setValue=function(){if(arguments[0]instanceof vr){var e=arguments[0];return this.init(e),this}else if(typeof arguments[0]=="number"){var r=arguments[0];return this.init(r),this}};vr.prototype.max=function(e){return this.ge(e)?this:e};vr.prototype.sqrt=function(){if(this.isZero())return vr.valueOf(0);if(this.isNegative())return vr.NaN;var e=1/Math.sqrt(this._hi),r=this._hi*e,n=vr.valueOf(r),i=this.subtract(n.sqr()),o=i._hi*(e*.5);return n.add(o)};vr.prototype.selfAdd=function(){if(arguments.length===1){if(arguments[0]instanceof vr){var e=arguments[0];return this.selfAdd(e._hi,e._lo)}else if(typeof arguments[0]=="number"){var r=arguments[0],n=null,i=null,o=null,a=null,s=null,l=null;return o=this._hi+r,s=o-this._hi,a=o-s,a=r-s+(this._hi-a),l=a+this._lo,n=o+l,i=l+(o-n),this._hi=n+i,this._lo=i+(n-this._hi),this}}else if(arguments.length===2){var u=arguments[0],p=arguments[1],m=null,v=null,x=null,y=null,_=null,w=null,C=null,E=null;_=this._hi+u,x=this._lo+p,C=_-this._hi,E=x-this._lo,w=_-C,y=x-E,w=u-C+(this._hi-w),y=p-E+(this._lo-y),C=w+x,m=_+C,v=C+(_-m),C=y+v;var T=m+C,A=C+(m-T);return this._hi=T,this._lo=A,this}};vr.prototype.selfMultiply=function(){if(arguments.length===1){if(arguments[0]instanceof vr){var e=arguments[0];return this.selfMultiply(e._hi,e._lo)}else if(typeof arguments[0]=="number"){var r=arguments[0];return this.selfMultiply(r,0)}}else if(arguments.length===2){var n=arguments[0],i=arguments[1],o=null,a=null,s=null,l=null,u=null,p=null;u=vr.SPLIT*this._hi,o=u-this._hi,p=vr.SPLIT*n,o=u-o,a=this._hi-o,s=p-n,u=this._hi*n,s=p-s,l=n-s,p=o*s-u+o*l+a*s+a*l+(this._hi*i+this._lo*n);var m=u+p;o=u-m;var v=p+o;return this._hi=m,this._lo=v,this}};vr.prototype.selfSqr=function(){return this.selfMultiply(this)};vr.prototype.floor=function(){if(this.isNaN())return vr.NaN;var e=Math.floor(this._hi),r=0;return e===this._hi&&(r=Math.floor(this._lo)),new vr(e,r)};vr.prototype.negate=function(){return this.isNaN()?this:new vr(-this._hi,-this._lo)};vr.prototype.clone=function(){};vr.prototype.multiply=function(){if(arguments[0]instanceof vr){var e=arguments[0];return e.isNaN()?vr.createNaN():vr.copy(this).selfMultiply(e)}else if(typeof arguments[0]=="number"){var r=arguments[0];return mi.isNaN(r)?vr.createNaN():vr.copy(this).selfMultiply(r,0)}};vr.prototype.isNaN=function(){return mi.isNaN(this._hi)};vr.prototype.intValue=function(){return Math.trunc(this._hi)};vr.prototype.toString=function(){var e=vr.magnitude(this._hi);return e>=-3&&e<=20?this.toStandardNotation():this.toSciNotation()};vr.prototype.toStandardNotation=function(){var e=this.getSpecialNumberString();if(e!==null)return e;var r=new Array(1).fill(null),n=this.extractSignificantDigits(!0,r),i=r[0]+1,o=n;if(n.charAt(0)===".")o="0"+n;else if(i<0)o="0."+vr.stringOfChar("0",-i)+n;else if(n.indexOf(".")===-1){var a=i-n.length,s=vr.stringOfChar("0",a);o=n+s+".0"}return this.isNegative()?"-"+o:o};vr.prototype.reciprocal=function(){var e=null,r=null,n=null,i=null,o=null,a=null,s=null,l=null;o=1/this._hi,a=vr.SPLIT*o,e=a-o,l=vr.SPLIT*this._hi,e=a-e,r=o-e,n=l-this._hi,s=o*this._hi,n=l-n,i=this._hi-n,l=e*n-s+e*i+r*n+r*i,a=(1-s-l-o*this._lo)/this._hi;var u=o+a,p=o-u+a;return new vr(u,p)};vr.prototype.toSciNotation=function(){if(this.isZero())return vr.SCI_NOT_ZERO;var e=this.getSpecialNumberString();if(e!==null)return e;var r=new Array(1).fill(null),n=this.extractSignificantDigits(!1,r),i=vr.SCI_NOT_EXPONENT_CHAR+r[0];if(n.charAt(0)==="0")throw new Error("Found leading zero: "+n);var o="";n.length>1&&(o=n.substring(1));var a=n.charAt(0)+"."+o;return this.isNegative()?"-"+a+i:a+i};vr.prototype.abs=function(){return this.isNaN()?vr.NaN:this.isNegative()?this.negate():new vr(this)};vr.prototype.isPositive=function(){return(this._hi>0||this._hi===0)&&this._lo>0};vr.prototype.lt=function(e){return(this._hi<e._hi||this._hi===e._hi)&&this._lo<e._lo};vr.prototype.add=function(){if(arguments[0]instanceof vr){var e=arguments[0];return vr.copy(this).selfAdd(e)}else if(typeof arguments[0]=="number"){var r=arguments[0];return vr.copy(this).selfAdd(r)}};vr.prototype.init=function(){if(arguments.length===1){if(typeof arguments[0]=="number"){var e=arguments[0];this._hi=e,this._lo=0}else if(arguments[0]instanceof vr){var r=arguments[0];this._hi=r._hi,this._lo=r._lo}}else if(arguments.length===2){var n=arguments[0],i=arguments[1];this._hi=n,this._lo=i}};vr.prototype.gt=function(e){return(this._hi>e._hi||this._hi===e._hi)&&this._lo>e._lo};vr.prototype.isNegative=function(){return(this._hi<0||this._hi===0)&&this._lo<0};vr.prototype.trunc=function(){return this.isNaN()?vr.NaN:this.isPositive()?this.floor():this.ceil()};vr.prototype.signum=function(){return this._hi>0?1:this._hi<0?-1:this._lo>0?1:this._lo<0?-1:0};vr.prototype.interfaces_=function(){return[ad,sd,D5]};vr.prototype.getClass=function(){return vr};vr.sqr=function(e){return vr.valueOf(e).selfMultiply(e)};vr.valueOf=function(){if(typeof arguments[0]=="string"){var e=arguments[0];return vr.parse(e)}else if(typeof arguments[0]=="number"){var r=arguments[0];return new vr(r)}};vr.sqrt=function(e){return vr.valueOf(e).sqrt()};vr.parse=function(e){for(var r=0,n=e.length;JM.isWhitespace(e.charAt(r));)r++;var i=!1;if(r<n){var o=e.charAt(r);(o==="-"||o==="+")&&(r++,o==="-"&&(i=!0))}for(var a=new vr,s=0,l=0,u=0;!(r>=n);){var p=e.charAt(r);if(r++,JM.isDigit(p)){var m=p-"0";a.selfMultiply(vr.TEN),a.selfAdd(m),s++;continue}if(p==="."){l=s;continue}if(p==="e"||p==="E"){var v=e.substring(r);try{u=yp.parseInt(v)}catch(C){throw C instanceof Error?new Error("Invalid exponent "+v+" in string "+e):C}finally{}break}throw new Error("Unexpected character '"+p+"' at position "+r+" in string "+e)}var x=a,y=s-l-u;if(y===0)x=a;else if(y>0){var _=vr.TEN.pow(y);x=a.divide(_)}else if(y<0){var w=vr.TEN.pow(-y);x=a.multiply(w)}return i?x.negate():x};vr.createNaN=function(){return new vr(mi.NaN,mi.NaN)};vr.copy=function(e){return new vr(e)};vr.magnitude=function(e){var r=Math.abs(e),n=Math.log(r)/Math.log(10),i=Math.trunc(Math.floor(n)),o=Math.pow(10,i);return o*10<=r&&(i+=1),i};vr.stringOfChar=function(e,r){for(var n=new vp,i=0;i<r;i++)n.append(e);return n.toString()};sh.PI.get=function(){return new vr(3.141592653589793,12246467991473532e-32)};sh.TWO_PI.get=function(){return new vr(6.283185307179586,24492935982947064e-32)};sh.PI_2.get=function(){return new vr(1.5707963267948966,6123233995736766e-32)};sh.E.get=function(){return new vr(2.718281828459045,14456468917292502e-32)};sh.NaN.get=function(){return new vr(mi.NaN,mi.NaN)};sh.EPS.get=function(){return 123259516440783e-46};sh.SPLIT.get=function(){return 134217729};sh.MAX_PRINT_DIGITS.get=function(){return 32};sh.TEN.get=function(){return vr.valueOf(10)};sh.ONE.get=function(){return vr.valueOf(1)};sh.SCI_NOT_EXPONENT_CHAR.get=function(){return"E"};sh.SCI_NOT_ZERO.get=function(){return"0.0E0"};Object.defineProperties(vr,sh);var qc=function(){},ahe={DP_SAFE_EPSILON:{configurable:!0}};qc.prototype.interfaces_=function(){return[]};qc.prototype.getClass=function(){return qc};qc.orientationIndex=function(e,r,n){var i=qc.orientationIndexFilter(e,r,n);if(i<=1)return i;var o=vr.valueOf(r.x).selfAdd(-e.x),a=vr.valueOf(r.y).selfAdd(-e.y),s=vr.valueOf(n.x).selfAdd(-r.x),l=vr.valueOf(n.y).selfAdd(-r.y);return o.selfMultiply(l).selfSubtract(a.selfMultiply(s)).signum()};qc.signOfDet2x2=function(e,r,n,i){var o=e.multiply(i).selfSubtract(r.multiply(n));return o.signum()};qc.intersection=function(e,r,n,i){var o=vr.valueOf(i.y).selfSubtract(n.y).selfMultiply(vr.valueOf(r.x).selfSubtract(e.x)),a=vr.valueOf(i.x).selfSubtract(n.x).selfMultiply(vr.valueOf(r.y).selfSubtract(e.y)),s=o.subtract(a),l=vr.valueOf(i.x).selfSubtract(n.x).selfMultiply(vr.valueOf(e.y).selfSubtract(n.y)),u=vr.valueOf(i.y).selfSubtract(n.y).selfMultiply(vr.valueOf(e.x).selfSubtract(n.x)),p=l.subtract(u),m=p.selfDivide(s).doubleValue(),v=vr.valueOf(e.x).selfAdd(vr.valueOf(r.x).selfSubtract(e.x).selfMultiply(m)).doubleValue(),x=vr.valueOf(r.x).selfSubtract(e.x).selfMultiply(vr.valueOf(e.y).selfSubtract(n.y)),y=vr.valueOf(r.y).selfSubtract(e.y).selfMultiply(vr.valueOf(e.x).selfSubtract(n.x)),_=x.subtract(y),w=_.selfDivide(s).doubleValue(),C=vr.valueOf(n.y).selfAdd(vr.valueOf(i.y).selfSubtract(n.y).selfMultiply(w)).doubleValue();return new ar(v,C)};qc.orientationIndexFilter=function(e,r,n){var i=null,o=(e.x-n.x)*(r.y-n.y),a=(e.y-n.y)*(r.x-n.x),s=o-a;if(o>0){if(a<=0)return qc.signum(s);i=o+a}else if(o<0){if(a>=0)return qc.signum(s);i=-o-a}else return qc.signum(s);var l=qc.DP_SAFE_EPSILON*i;return s>=l||-s>=l?qc.signum(s):2};qc.signum=function(e){return e>0?1:e<0?-1:0};ahe.DP_SAFE_EPSILON.get=function(){return 1e-15};Object.defineProperties(qc,ahe);var so=function(){},eA={X:{configurable:!0},Y:{configurable:!0},Z:{configurable:!0},M:{configurable:!0}};eA.X.get=function(){return 0};eA.Y.get=function(){return 1};eA.Z.get=function(){return 2};eA.M.get=function(){return 3};so.prototype.setOrdinate=function(e,r,n){};so.prototype.size=function(){};so.prototype.getOrdinate=function(e,r){};so.prototype.getCoordinate=function(){};so.prototype.getCoordinateCopy=function(e){};so.prototype.getDimension=function(){};so.prototype.getX=function(e){};so.prototype.clone=function(){};so.prototype.expandEnvelope=function(e){};so.prototype.copy=function(){};so.prototype.getY=function(e){};so.prototype.toCoordinateArray=function(){};so.prototype.interfaces_=function(){return[D5]};so.prototype.getClass=function(){return so};Object.defineProperties(so,eA);var lhe=function(){},LE=function(t){function e(){t.call(this,"Projective point not representable on the Cartesian plane.")}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(lhe),Bl=function(){};Bl.arraycopy=function(e,r,n,i,o){for(var a=0,s=r;s<r+o;s++)n[i+a]=e[s],a++};Bl.getProperty=function(e){return{"line.separator":` `}[e]};var ah=function t(){if(this.x=null,this.y=null,this.w=null,arguments.length===0)this.x=0,this.y=0,this.w=1;else if(arguments.length===1){var e=arguments[0];this.x=e.x,this.y=e.y,this.w=1}else if(arguments.length===2){if(typeof arguments[0]=="number"&&typeof arguments[1]=="number"){var r=arguments[0],n=arguments[1];this.x=r,this.y=n,this.w=1}else if(arguments[0]instanceof t&&arguments[1]instanceof t){var i=arguments[0],o=arguments[1];this.x=i.y*o.w-o.y*i.w,this.y=o.x*i.w-i.x*o.w,this.w=i.x*o.y-o.x*i.y}else if(arguments[0]instanceof ar&&arguments[1]instanceof ar){var a=arguments[0],s=arguments[1];this.x=a.y-s.y,this.y=s.x-a.x,this.w=a.x*s.y-s.x*a.y}}else if(arguments.length===3){var l=arguments[0],u=arguments[1],p=arguments[2];this.x=l,this.y=u,this.w=p}else if(arguments.length===4){var m=arguments[0],v=arguments[1],x=arguments[2],y=arguments[3],_=m.y-v.y,w=v.x-m.x,C=m.x*v.y-v.x*m.y,E=x.y-y.y,T=y.x-x.x,A=x.x*y.y-y.x*x.y;this.x=w*A-T*C,this.y=E*C-_*A,this.w=_*T-E*w}};ah.prototype.getY=function(){var e=this.y/this.w;if(mi.isNaN(e)||mi.isInfinite(e))throw new LE;return e};ah.prototype.getX=function(){var e=this.x/this.w;if(mi.isNaN(e)||mi.isInfinite(e))throw new LE;return e};ah.prototype.getCoordinate=function(){var e=new ar;return e.x=this.getX(),e.y=this.getY(),e};ah.prototype.interfaces_=function(){return[]};ah.prototype.getClass=function(){return ah};ah.intersection=function(e,r,n,i){var o=e.y-r.y,a=r.x-e.x,s=e.x*r.y-r.x*e.y,l=n.y-i.y,u=i.x-n.x,p=n.x*i.y-i.x*n.y,m=a*p-u*s,v=l*s-o*p,x=o*u-l*a,y=m/x,_=v/x;if(mi.isNaN(y)||mi.isInfinite(y)||mi.isNaN(_)||mi.isInfinite(_))throw new LE;return new ar(y,_)};var Un=function t(){if(this._minx=null,this._maxx=null,this._miny=null,this._maxy=null,arguments.length===0)this.init();else if(arguments.length===1){if(arguments[0]instanceof ar){var e=arguments[0];this.init(e.x,e.x,e.y,e.y)}else if(arguments[0]instanceof t){var r=arguments[0];this.init(r)}}else if(arguments.length===2){var n=arguments[0],i=arguments[1];this.init(n.x,i.x,n.y,i.y)}else if(arguments.length===4){var o=arguments[0],a=arguments[1],s=arguments[2],l=arguments[3];this.init(o,a,s,l)}},che={serialVersionUID:{configurable:!0}};Un.prototype.getArea=function(){return this.getWidth()*this.getHeight()};Un.prototype.equals=function(e){if(!(e instanceof Un))return!1;var r=e;return this.isNull()?r.isNull():this._maxx===r.getMaxX()&&this._maxy===r.getMaxY()&&this._minx===r.getMinX()&&this._miny===r.getMinY()};Un.prototype.intersection=function(e){if(this.isNull()||e.isNull()||!this.intersects(e))return new Un;var r=this._minx>e._minx?this._minx:e._minx,n=this._miny>e._miny?this._miny:e._miny,i=this._maxx<e._maxx?this._maxx:e._maxx,o=this._maxy<e._maxy?this._maxy:e._maxy;return new Un(r,i,n,o)};Un.prototype.isNull=function(){return this._maxx<this._minx};Un.prototype.getMaxX=function(){return this._maxx};Un.prototype.covers=function(){if(arguments.length===1){if(arguments[0]instanceof ar){var e=arguments[0];return this.covers(e.x,e.y)}else if(arguments[0]instanceof Un){var r=arguments[0];return this.isNull()||r.isNull()?!1:r.getMinX()>=this._minx&&r.getMaxX()<=this._maxx&&r.getMinY()>=this._miny&&r.getMaxY()<=this._maxy}}else if(arguments.length===2){var n=arguments[0],i=arguments[1];return this.isNull()?!1:n>=this._minx&&n<=this._maxx&&i>=this._miny&&i<=this._maxy}};Un.prototype.intersects=function(){if(arguments.length===1){if(arguments[0]instanceof Un){var e=arguments[0];return this.isNull()||e.isNull()?!1:!(e._minx>this._maxx||e._maxx<this._minx||e._miny>this._maxy||e._maxy<this._miny)}else if(arguments[0]instanceof ar){var r=arguments[0];return this.intersects(r.x,r.y)}}else if(arguments.length===2){var n=arguments[0],i=arguments[1];return this.isNull()?!1:!(n>this._maxx||n<this._minx||i>this._maxy||i<this._miny)}};Un.prototype.getMinY=function(){return this._miny};Un.prototype.getMinX=function(){return this._minx};Un.prototype.expandToInclude=function(){if(arguments.length===1){if(arguments[0]instanceof ar){var e=arguments[0];this.expandToInclude(e.x,e.y)}else if(arguments[0]instanceof Un){var r=arguments[0];if(r.isNull())return null;this.isNull()?(this._minx=r.getMinX(),this._maxx=r.getMaxX(),this._miny=r.getMinY(),this._maxy=r.getMaxY()):(r._minx<this._minx&&(this._minx=r._minx),r._maxx>this._maxx&&(this._maxx=r._maxx),r._miny<this._miny&&(this._miny=r._miny),r._maxy>this._maxy&&(this._maxy=r._maxy))}}else if(arguments.length===2){var n=arguments[0],i=arguments[1];this.isNull()?(this._minx=n,this._maxx=n,this._miny=i,this._maxy=i):(n<this._minx&&(this._minx=n),n>this._maxx&&(this._maxx=n),i<this._miny&&(this._miny=i),i>this._maxy&&(this._maxy=i))}};Un.prototype.minExtent=function(){if(this.isNull())return 0;var e=this.getWidth(),r=this.getHeight();return e<r?e:r};Un.prototype.getWidth=function(){return this.isNull()?0:this._maxx-this._minx};Un.prototype.compareTo=function(e){var r=e;return this.isNull()?r.isNull()?0:-1:r.isNull()?1:this._minx<r._minx?-1:this._minx>r._minx?1:this._miny<r._miny?-1:this._miny>r._miny?1:this._maxx<r._maxx?-1:this._maxx>r._maxx?1:this._maxy<r._maxy?-1:this._maxy>r._maxy?1:0};Un.prototype.translate=function(e,r){if(this.isNull())return null;this.init(this.getMinX()+e,this.getMaxX()+e,this.getMinY()+r,this.getMaxY()+r)};Un.prototype.toString=function(){return"Env["+this._minx+" : "+this._maxx+", "+this._miny+" : "+this._maxy+"]"};Un.prototype.setToNull=function(){this._minx=0,this._maxx=-1,this._miny=0,this._maxy=-1};Un.prototype.getHeight=function(){return this.isNull()?0:this._maxy-this._miny};Un.prototype.maxExtent=function(){if(this.isNull())return 0;var e=this.getWidth(),r=this.getHeight();return e>r?e:r};Un.prototype.expandBy=function(){if(arguments.length===1){var e=arguments[0];this.expandBy(e,e)}else if(arguments.length===2){var r=arguments[0],n=arguments[1];if(this.isNull())return null;this._minx-=r,this._maxx+=r,this._miny-=n,this._maxy+=n,(this._minx>this._maxx||this._miny>this._maxy)&&this.setToNull()}};Un.prototype.contains=function(){if(arguments.length===1){if(arguments[0]instanceof Un){var e=arguments[0];return this.covers(e)}else if(arguments[0]instanceof ar){var r=arguments[0];return this.covers(r)}}else if(arguments.length===2){var n=arguments[0],i=arguments[1];return this.covers(n,i)}};Un.prototype.centre=function(){return this.isNull()?null:new ar((this.getMinX()+this.getMaxX())/2,(this.getMinY()+this.getMaxY())/2)};Un.prototype.init=function(){if(arguments.length===0)this.setToNull();else if(arguments.length===1){if(arguments[0]instanceof ar){var e=arguments[0];this.init(e.x,e.x,e.y,e.y)}else if(arguments[0]instanceof Un){var r=arguments[0];this._minx=r._minx,this._maxx=r._maxx,this._miny=r._miny,this._maxy=r._maxy}}else if(arguments.length===2){var n=arguments[0],i=arguments[1];this.init(n.x,i.x,n.y,i.y)}else if(arguments.length===4){var o=arguments[0],a=arguments[1],s=arguments[2],l=arguments[3];o<a?(this._minx=o,this._maxx=a):(this._minx=a,this._maxx=o),s<l?(this._miny=s,this._maxy=l):(this._miny=l,this._maxy=s)}};Un.prototype.getMaxY=function(){return this._maxy};Un.prototype.distance=function(e){if(this.intersects(e))return 0;var r=0;this._maxx<e._minx?r=e._minx-this._maxx:this._minx>e._maxx&&(r=this._minx-e._maxx);var n=0;return this._maxy<e._miny?n=e._miny-this._maxy:this._miny>e._maxy&&(n=this._miny-e._maxy),r===0?n:n===0?r:Math.sqrt(r*r+n*n)};Un.prototype.hashCode=function(){var e=17;return e=37*e+ar.hashCode(this._minx),e=37*e+ar.hashCode(this._maxx),e=37*e+ar.hashCode(this._miny),e=37*e+ar.hashCode(this._maxy),e};Un.prototype.interfaces_=function(){return[sd,ad]};Un.prototype.getClass=function(){return Un};Un.intersects=function(){if(arguments.length===3){var e=arguments[0],r=arguments[1],n=arguments[2];return n.x>=(e.x<r.x?e.x:r.x)&&n.x<=(e.x>r.x?e.x:r.x)&&n.y>=(e.y<r.y?e.y:r.y)&&n.y<=(e.y>r.y?e.y:r.y)}else if(arguments.length===4){var i=arguments[0],o=arguments[1],a=arguments[2],s=arguments[3],l=Math.min(a.x,s.x),u=Math.max(a.x,s.x),p=Math.min(i.x,o.x),m=Math.max(i.x,o.x);return!(p>u||m<l||(l=Math.min(a.y,s.y),u=Math.max(a.y,s.y),p=Math.min(i.y,o.y),m=Math.max(i.y,o.y),p>u)||m<l)}};che.serialVersionUID.get=function(){return 5873921885273102e3};Object.defineProperties(Un,che);var xp={typeStr:/^\s*(\w+)\s*\(\s*(.*)\s*\)\s*$/,emptyTypeStr:/^\s*(\w+)\s*EMPTY\s*$/,spaces:/\s+/,parenComma:/\)\s*,\s*\(/,doubleParenComma:/\)\s*\)\s*,\s*\(\s*\(/,trimParens:/^\s*\(?(.*?)\)?\s*$/},N5=function(e){this.geometryFactory=e||new Yi};N5.prototype.read=function(e){var r,n,i;e=e.replace(/[\n\r]/g," ");var o=xp.typeStr.exec(e);if(e.search("EMPTY")!==-1&&(o=xp.emptyTypeStr.exec(e),o[2]=void 0),o&&(n=o[1].toLowerCase(),i=o[2],DE[n]&&(r=DE[n].apply(this,[i]))),r===void 0)throw new Error("Could not parse WKT "+e);return r};N5.prototype.write=function(e){return this.extractGeometry(e)};N5.prototype.extractGeometry=function(e){var r=e.getGeometryType().toLowerCase();if(!av[r])return null;var n=r.toUpperCase(),i;return e.isEmpty()?i=n+" EMPTY":i=n+"("+av[r].apply(this,[e])+")",i};var av={coordinate:function(e){return e.x+" "+e.y},point:function(e){return av.coordinate.call(this,e._coordinates._coordinates[0])},multipoint:function(e){for(var r=this,n=[],i=0,o=e._geometries.length;i<o;++i)n.push("("+av.point.apply(r,[e._geometries[i]])+")");return n.join(",")},linestring:function(e){for(var r=this,n=[],i=0,o=e._points._coordinates.length;i<o;++i)n.push(av.coordinate.apply(r,[e._points._coordinates[i]]));return n.join(",")},linearring:function(e){for(var r=this,n=[],i=0,o=e._points._coordinates.length;i<o;++i)n.push(av.coordinate.apply(r,[e._points._coordinates[i]]));return n.join(",")},multilinestring:function(e){for(var r=this,n=[],i=0,o=e._geometries.length;i<o;++i)n.push("("+av.linestring.apply(r,[e._geometries[i]])+")");return n.join(",")},polygon:function(e){var r=this,n=[];n.push("("+av.linestring.apply(this,[e._shell])+")");for(var i=0,o=e._holes.length;i<o;++i)n.push("("+av.linestring.apply(r,[e._holes[i]])+")");return n.join(",")},multipolygon:function(e){for(var r=this,n=[],i=0,o=e._geometries.length;i<o;++i)n.push("("+av.polygon.apply(r,[e._geometries[i]])+")");return n.join(",")},geometrycollection:function(e){for(var r=this,n=[],i=0,o=e._geometries.length;i<o;++i)n.push(r.extractGeometry(e._geometries[i]));return n.join(",")}},DE={point:function(e){if(e===void 0)return this.geometryFactory.createPoint();var r=e.trim().split(xp.spaces);return this.geometryFactory.createPoint(new ar(Number.parseFloat(r[0]),Number.parseFloat(r[1])))},multipoint:function(e){var r=this;if(e===void 0)return this.geometryFactory.createMultiPoint();for(var n,i=e.trim().split(","),o=[],a=0,s=i.length;a<s;++a)n=i[a].replace(xp.trimParens,"$1"),o.push(DE.point.apply(r,[n]));return this.geometryFactory.createMultiPoint(o)},linestring:function(e){if(e===void 0)return this.geometryFactory.createLineString();for(var r=e.trim().split(","),n=[],i,o=0,a=r.length;o<a;++o)i=r[o].trim().split(xp.spaces),n.push(new ar(Number.parseFloat(i[0]),Number.parseFloat(i[1])));return this.geometryFactory.createLineString(n)},linearring:function(e){if(e===void 0)return this.geometryFactory.createLinearRing();for(var r=e.trim().split(","),n=[],i,o=0,a=r.length;o<a;++o)i=r[o].trim().split(xp.spaces),n.push(new ar(Number.parseFloat(i[0]),Number.parseFloat(i[1])));return this.geometryFactory.createLinearRing(n)},multilinestring:function(e){var r=this;if(e===void 0)return this.geometryFactory.createMultiLineString();for(var n,i=e.trim().split(xp.parenComma),o=[],a=0,s=i.length;a<s;++a)n=i[a].replace(xp.trimParens,"$1"),o.push(DE.linestring.apply(r,[n]));return this.geometryFactory.createMultiLineString(o)},polygon:function(e){var r=this;if(e===void 0)return this.geometryFactory.createPolygon();for(var n,i,o,a=e.trim().split(xp.parenComma),s,l=[],u=0,p=a.length;u<p;++u)n=a[u].replace(xp.trimParens,"$1"),i=DE.linestring.apply(r,[n]),o=r.geometryFactory.createLinearRing(i._points),u===0?s=o:l.push(o);return this.geometryFactory.createPolygon(s,l)},multipolygon:function(e){var r=this;if(e===void 0)return this.geometryFactory.createMultiPolygon();for(var n,i=e.trim().split(xp.doubleParenComma),o=[],a=0,s=i.length;a<s;++a)n=i[a].replace(xp.trimParens,"$1"),o.push(DE.polygon.apply(r,[n]));return this.geometryFactory.createMultiPolygon(o)},geometrycollection:function(e){var r=this;if(e===void 0)return this.geometryFactory.createGeometryCollection();e=e.replace(/,\s*([A-Za-z])/g,"|$1");for(var n=e.trim().split("|"),i=[],o=0,a=n.length;o<a;++o)i.push(r.read(n[o]));return this.geometryFactory.createGeometryCollection(i)}},lh=function(e){this.parser=new N5(e)};lh.prototype.write=function(e){return this.parser.write(e)};lh.toLineString=function(e,r){if(arguments.length!==2)throw new Error("Not implemented");return"LINESTRING ( "+e.x+" "+e.y+", "+r.x+" "+r.y+" )"};var lv=function(t){function e(r){t.call(this,r),this.name="RuntimeException",this.message=r,this.stack=new t().stack}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Error),$5=function(t){function e(){if(t.call(this),arguments.length===0)t.call(this);else if(arguments.length===1){var r=arguments[0];t.call(this,r)}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(lv),Ti=function(){};Ti.prototype.interfaces_=function(){return[]};Ti.prototype.getClass=function(){return Ti};Ti.shouldNeverReachHere=function(){if(arguments.length===0)Ti.shouldNeverReachHere(null);else if(arguments.length===1){var e=arguments[0];throw new $5("Should never reach here"+(e!==null?": "+e:""))}};Ti.isTrue=function(){var e,r;if(arguments.length===1)e=arguments[0],Ti.isTrue(e,null);else if(arguments.length===2&&(e=arguments[0],r=arguments[1],!e))throw r===null?new $5:new $5(r)};Ti.equals=function(){var e,r,n;if(arguments.length===2)e=arguments[0],r=arguments[1],Ti.equals(e,r,null);else if(arguments.length===3&&(e=arguments[0],r=arguments[1],n=arguments[2],!r.equals(e)))throw new $5("Expected "+e+" but encountered "+r+(n!==null?": "+n:""))};var Ws=function(){this._result=null,this._inputLines=Array(2).fill().map(function(){return Array(2)}),this._intPt=new Array(2).fill(null),this._intLineIndex=null,this._isProper=null,this._pa=null,this._pb=null,this._precisionModel=null,this._intPt[0]=new ar,this._intPt[1]=new ar,this._pa=this._intPt[0],this._pb=this._intPt[1],this._result=0},Ab={DONT_INTERSECT:{configurable:!0},DO_INTERSECT:{configurable:!0},COLLINEAR:{configurable:!0},NO_INTERSECTION:{configurable:!0},POINT_INTERSECTION:{configurable:!0},COLLINEAR_INTERSECTION:{configurable:!0}};Ws.prototype.getIndexAlongSegment=function(e,r){return this.computeIntLineIndex(),this._intLineIndex[e][r]};Ws.prototype.getTopologySummary=function(){var e=new vp;return this.isEndPoint()&&e.append(" endpoint"),this._isProper&&e.append(" proper"),this.isCollinear()&&e.append(" collinear"),e.toString()};Ws.prototype.computeIntersection=function(e,r,n,i){this._inputLines[0][0]=e,this._inputLines[0][1]=r,this._inputLines[1][0]=n,this._inputLines[1][1]=i,this._result=this.computeIntersect(e,r,n,i)};Ws.prototype.getIntersectionNum=function(){return this._result};Ws.prototype.computeIntLineIndex=function(){if(arguments.length===0)this._intLineIndex===null&&(this._intLineIndex=Array(2).fill().map(function(){return Array(2)}),this.computeIntLineIndex(0),this.computeIntLineIndex(1));else if(arguments.length===1){var e=arguments[0],r=this.getEdgeDistance(e,0),n=this.getEdgeDistance(e,1);r>n?(this._intLineIndex[e][0]=0,this._intLineIndex[e][1]=1):(this._intLineIndex[e][0]=1,this._intLineIndex[e][1]=0)}};Ws.prototype.isProper=function(){return this.hasIntersection()&&this._isProper};Ws.prototype.setPrecisionModel=function(e){this._precisionModel=e};Ws.prototype.isInteriorIntersection=function(){var e=this;if(arguments.length===0)return!!(this.isInteriorIntersection(0)||this.isInteriorIntersection(1));if(arguments.length===1){for(var r=arguments[0],n=0;n<this._result;n++)if(!(e._intPt[n].equals2D(e._inputLines[r][0])||e._intPt[n].equals2D(e._inputLines[r][1])))return!0;return!1}};Ws.prototype.getIntersection=function(e){return this._intPt[e]};Ws.prototype.isEndPoint=function(){return this.hasIntersection()&&!this._isProper};Ws.prototype.hasIntersection=function(){return this._result!==Ws.NO_INTERSECTION};Ws.prototype.getEdgeDistance=function(e,r){var n=Ws.computeEdgeDistance(this._intPt[r],this._inputLines[e][0],this._inputLines[e][1]);return n};Ws.prototype.isCollinear=function(){return this._result===Ws.COLLINEAR_INTERSECTION};Ws.prototype.toString=function(){return lh.toLineString(this._inputLines[0][0],this._inputLines[0][1])+" - "+lh.toLineString(this._inputLines[1][0],this._inputLines[1][1])+this.getTopologySummary()};Ws.prototype.getEndpoint=function(e,r){return this._inputLines[e][r]};Ws.prototype.isIntersection=function(e){for(var r=this,n=0;n<this._result;n++)if(r._intPt[n].equals2D(e))return!0;return!1};Ws.prototype.getIntersectionAlongSegment=function(e,r){return this.computeIntLineIndex(),this._intPt[this._intLineIndex[e][r]]};Ws.prototype.interfaces_=function(){return[]};Ws.prototype.getClass=function(){return Ws};Ws.computeEdgeDistance=function(e,r,n){var i=Math.abs(n.x-r.x),o=Math.abs(n.y-r.y),a=-1;if(e.equals(r))a=0;else if(e.equals(n))i>o?a=i:a=o;else{var s=Math.abs(e.x-r.x),l=Math.abs(e.y-r.y);i>o?a=s:a=l,a===0&&!e.equals(r)&&(a=Math.max(s,l))}return Ti.isTrue(!(a===0&&!e.equals(r)),"Bad distance calculation"),a};Ws.nonRobustComputeEdgeDistance=function(e,r,n){var i=e.x-r.x,o=e.y-r.y,a=Math.sqrt(i*i+o*o);return Ti.isTrue(!(a===0&&!e.equals(r)),"Invalid distance calculation"),a};Ab.DONT_INTERSECT.get=function(){return 0};Ab.DO_INTERSECT.get=function(){return 1};Ab.COLLINEAR.get=function(){return 2};Ab.NO_INTERSECTION.get=function(){return 0};Ab.POINT_INTERSECTION.get=function(){return 1};Ab.COLLINEAR_INTERSECTION.get=function(){return 2};Object.defineProperties(Ws,Ab);var r_=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.isInSegmentEnvelopes=function(n){var i=new Un(this._inputLines[0][0],this._inputLines[0][1]),o=new Un(this._inputLines[1][0],this._inputLines[1][1]);return i.contains(n)&&o.contains(n)},e.prototype.computeIntersection=function(){if(arguments.length===3){var n=arguments[0],i=arguments[1],o=arguments[2];if(this._isProper=!1,Un.intersects(i,o,n)&&En.orientationIndex(i,o,n)===0&&En.orientationIndex(o,i,n)===0)return this._isProper=!0,(n.equals(i)||n.equals(o))&&(this._isProper=!1),this._result=t.POINT_INTERSECTION,null;this._result=t.NO_INTERSECTION}else return t.prototype.computeIntersection.apply(this,arguments)},e.prototype.normalizeToMinimum=function(n,i,o,a,s){s.x=this.smallestInAbsValue(n.x,i.x,o.x,a.x),s.y=this.smallestInAbsValue(n.y,i.y,o.y,a.y),n.x-=s.x,n.y-=s.y,i.x-=s.x,i.y-=s.y,o.x-=s.x,o.y-=s.y,a.x-=s.x,a.y-=s.y},e.prototype.safeHCoordinateIntersection=function(n,i,o,a){var s=null;try{s=ah.intersection(n,i,o,a)}catch(l){if(l instanceof LE)s=e.nearestEndpoint(n,i,o,a);else throw l}finally{}return s},e.prototype.intersection=function(n,i,o,a){var s=this.intersectionWithNormalization(n,i,o,a);return this.isInSegmentEnvelopes(s)||(s=new ar(e.nearestEndpoint(n,i,o,a))),this._precisionModel!==null&&this._precisionModel.makePrecise(s),s},e.prototype.smallestInAbsValue=function(n,i,o,a){var s=n,l=Math.abs(s);return Math.abs(i)<l&&(s=i,l=Math.abs(i)),Math.abs(o)<l&&(s=o,l=Math.abs(o)),Math.abs(a)<l&&(s=a),s},e.prototype.checkDD=function(n,i,o,a,s){var l=qc.intersection(n,i,o,a),u=this.isInSegmentEnvelopes(l);Bl.out.println("DD in env = "+u+" --------------------- "+l),s.distance(l)>1e-4&&Bl.out.println("Distance = "+s.distance(l))},e.prototype.intersectionWithNormalization=function(n,i,o,a){var s=new ar(n),l=new ar(i),u=new ar(o),p=new ar(a),m=new ar;this.normalizeToEnvCentre(s,l,u,p,m);var v=this.safeHCoordinateIntersection(s,l,u,p);return v.x+=m.x,v.y+=m.y,v},e.prototype.computeCollinearIntersection=function(n,i,o,a){var s=Un.intersects(n,i,o),l=Un.intersects(n,i,a),u=Un.intersects(o,a,n),p=Un.intersects(o,a,i);return s&&l?(this._intPt[0]=o,this._intPt[1]=a,t.COLLINEAR_INTERSECTION):u&&p?(this._intPt[0]=n,this._intPt[1]=i,t.COLLINEAR_INTERSECTION):s&&u?(this._intPt[0]=o,this._intPt[1]=n,o.equals(n)&&!l&&!p?t.POINT_INTERSECTION:t.COLLINEAR_INTERSECTION):s&&p?(this._intPt[0]=o,this._intPt[1]=i,o.equals(i)&&!l&&!u?t.POINT_INTERSECTION:t.COLLINEAR_INTERSECTION):l&&u?(this._intPt[0]=a,this._intPt[1]=n,a.equals(n)&&!s&&!p?t.POINT_INTERSECTION:t.COLLINEAR_INTERSECTION):l&&p?(this._intPt[0]=a,this._intPt[1]=i,a.equals(i)&&!s&&!u?t.POINT_INTERSECTION:t.COLLINEAR_INTERSECTION):t.NO_INTERSECTION},e.prototype.normalizeToEnvCentre=function(n,i,o,a,s){var l=n.x<i.x?n.x:i.x,u=n.y<i.y?n.y:i.y,p=n.x>i.x?n.x:i.x,m=n.y>i.y?n.y:i.y,v=o.x<a.x?o.x:a.x,x=o.y<a.y?o.y:a.y,y=o.x>a.x?o.x:a.x,_=o.y>a.y?o.y:a.y,w=l>v?l:v,C=p<y?p:y,E=u>x?u:x,T=m<_?m:_,A=(w+C)/2,k=(E+T)/2;s.x=A,s.y=k,n.x-=s.x,n.y-=s.y,i.x-=s.x,i.y-=s.y,o.x-=s.x,o.y-=s.y,a.x-=s.x,a.y-=s.y},e.prototype.computeIntersect=function(n,i,o,a){if(this._isProper=!1,!Un.intersects(n,i,o,a))return t.NO_INTERSECTION;var s=En.orientationIndex(n,i,o),l=En.orientationIndex(n,i,a);if(s>0&&l>0||s<0&&l<0)return t.NO_INTERSECTION;var u=En.orientationIndex(o,a,n),p=En.orientationIndex(o,a,i);if(u>0&&p>0||u<0&&p<0)return t.NO_INTERSECTION;var m=s===0&&l===0&&u===0&&p===0;return m?this.computeCollinearIntersection(n,i,o,a):(s===0||l===0||u===0||p===0?(this._isProper=!1,n.equals2D(o)||n.equals2D(a)?this._intPt[0]=n:i.equals2D(o)||i.equals2D(a)?this._intPt[0]=i:s===0?this._intPt[0]=new ar(o):l===0?this._intPt[0]=new ar(a):u===0?this._intPt[0]=new ar(n):p===0&&(this._intPt[0]=new ar(i))):(this._isProper=!0,this._intPt[0]=this.intersection(n,i,o,a)),t.POINT_INTERSECTION)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e.nearestEndpoint=function(n,i,o,a){var s=n,l=En.distancePointLine(n,o,a),u=En.distancePointLine(i,o,a);return u<l&&(l=u,s=i),u=En.distancePointLine(o,n,i),u<l&&(l=u,s=o),u=En.distancePointLine(a,n,i),u<l&&(l=u,s=a),s},e}(Ws),Rb=function(){};Rb.prototype.interfaces_=function(){return[]};Rb.prototype.getClass=function(){return Rb};Rb.orientationIndex=function(e,r,n){var i=r.x-e.x,o=r.y-e.y,a=n.x-r.x,s=n.y-r.y;return Rb.signOfDet2x2(i,o,a,s)};Rb.signOfDet2x2=function(e,r,n,i){var o=null,a=null,s=null;if(o=1,e===0||i===0)return r===0||n===0?0:r>0?n>0?-o:o:n>0?o:-o;if(r===0||n===0)return i>0?e>0?o:-o:e>0?-o:o;if(r>0?i>0?r<=i||(o=-o,a=e,e=n,n=a,a=r,r=i,i=a):r<=-i?(o=-o,n=-n,i=-i):(a=e,e=-n,n=a,a=r,r=-i,i=a):i>0?-r<=i?(o=-o,e=-e,r=-r):(a=-e,e=n,n=a,a=-r,r=i,i=a):r>=i?(e=-e,r=-r,n=-n,i=-i):(o=-o,a=-e,e=-n,n=a,a=-r,r=-i,i=a),e>0)if(n>0){if(!(e<=n))return o}else return o;else{if(n>0)return-o;if(e>=n)o=-o,e=-e,n=-n;else return-o}for(;;){if(s=Math.floor(n/e),n=n-s*e,i=i-s*r,i<0)return-o;if(i>r)return o;if(e>n+n){if(r<i+i)return o}else{if(r>i+i)return-o;n=e-n,i=r-i,o=-o}if(i===0)return n===0?0:-o;if(n===0||(s=Math.floor(e/n),e=e-s*n,r=r-s*i,r<0))return o;if(r>i)return-o;if(n>e+e){if(i<r+r)return-o}else{if(i>r+r)return o;e=n-e,r=i-r,o=-o}if(r===0)return e===0?0:o;if(e===0)return-o}};var _p=function(){this._p=null,this._crossingCount=0,this._isPointOnSegment=!1;var e=arguments[0];this._p=e};_p.prototype.countSegment=function(e,r){if(e.x<this._p.x&&r.x<this._p.x)return null;if(this._p.x===r.x&&this._p.y===r.y)return this._isPointOnSegment=!0,null;if(e.y===this._p.y&&r.y===this._p.y){var n=e.x,i=r.x;return n>i&&(n=r.x,i=e.x),this._p.x>=n&&this._p.x<=i&&(this._isPointOnSegment=!0),null}if(e.y>this._p.y&&r.y<=this._p.y||r.y>this._p.y&&e.y<=this._p.y){var o=e.x-this._p.x,a=e.y-this._p.y,s=r.x-this._p.x,l=r.y-this._p.y,u=Rb.signOfDet2x2(o,a,s,l);if(u===0)return this._isPointOnSegment=!0,null;l<a&&(u=-u),u>0&&this._crossingCount++}};_p.prototype.isPointInPolygon=function(){return this.getLocation()!==ur.EXTERIOR};_p.prototype.getLocation=function(){return this._isPointOnSegment?ur.BOUNDARY:this._crossingCount%2==1?ur.INTERIOR:ur.EXTERIOR};_p.prototype.isOnSegment=function(){return this._isPointOnSegment};_p.prototype.interfaces_=function(){return[]};_p.prototype.getClass=function(){return _p};_p.locatePointInRing=function(){if(arguments[0]instanceof ar&&ai(arguments[1],so)){for(var e=arguments[0],r=arguments[1],n=new _p(e),i=new ar,o=new ar,a=1;a<r.size();a++)if(r.getCoordinate(a,i),r.getCoordinate(a-1,o),n.countSegment(i,o),n.isOnSegment())return n.getLocation();return n.getLocation()}else if(arguments[0]instanceof ar&&arguments[1]instanceof Array){for(var s=arguments[0],l=arguments[1],u=new _p(s),p=1;p<l.length;p++){var m=l[p],v=l[p-1];if(u.countSegment(m,v),u.isOnSegment())return u.getLocation()}return u.getLocation()}};var En=function(){},kb={CLOCKWISE:{configurable:!0},RIGHT:{configurable:!0},COUNTERCLOCKWISE:{configurable:!0},LEFT:{configurable:!0},COLLINEAR:{configurable:!0},STRAIGHT:{configurable:!0}};En.prototype.interfaces_=function(){return[]};En.prototype.getClass=function(){return En};En.orientationIndex=function(e,r,n){return qc.orientationIndex(e,r,n)};En.signedArea=function(){if(arguments[0]instanceof Array){var e=arguments[0];if(e.length<3)return 0;for(var r=0,n=e[0].x,i=1;i<e.length-1;i++){var o=e[i].x-n,a=e[i+1].y,s=e[i-1].y;r+=o*(s-a)}return r/2}else if(ai(arguments[0],so)){var l=arguments[0],u=l.size();if(u<3)return 0;var p=new ar,m=new ar,v=new ar;l.getCoordinate(0,m),l.getCoordinate(1,v);var x=m.x;v.x-=x;for(var y=0,_=1;_<u-1;_++)p.y=m.y,m.x=v.x,m.y=v.y,l.getCoordinate(_+1,v),v.x-=x,y+=m.x*(p.y-v.y);return y/2}};En.distanceLineLine=function(e,r,n,i){if(e.equals(r))return En.distancePointLine(e,n,i);if(n.equals(i))return En.distancePointLine(i,e,r);var o=!1;if(!Un.intersects(e,r,n,i))o=!0;else{var a=(r.x-e.x)*(i.y-n.y)-(r.y-e.y)*(i.x-n.x);if(a===0)o=!0;else{var s=(e.y-n.y)*(i.x-n.x)-(e.x-n.x)*(i.y-n.y),l=(e.y-n.y)*(r.x-e.x)-(e.x-n.x)*(r.y-e.y),u=l/a,p=s/a;(p<0||p>1||u<0||u>1)&&(o=!0)}}return o?uf.min(En.distancePointLine(e,n,i),En.distancePointLine(r,n,i),En.distancePointLine(n,e,r),En.distancePointLine(i,e,r)):0};En.isPointInRing=function(e,r){return En.locatePointInRing(e,r)!==ur.EXTERIOR};En.computeLength=function(e){var r=e.size();if(r<=1)return 0;var n=0,i=new ar;e.getCoordinate(0,i);for(var o=i.x,a=i.y,s=1;s<r;s++){e.getCoordinate(s,i);var l=i.x,u=i.y,p=l-o,m=u-a;n+=Math.sqrt(p*p+m*m),o=l,a=u}return n};En.isCCW=function(e){var r=e.length-1;if(r<3)throw new Ls;for(var n=e[0],i=0,o=1;o<=r;o++){var a=e[o];a.y>n.y&&(n=a,i=o)}var s=i;do s=s-1,s<0&&(s=r);while(e[s].equals2D(n)&&s!==i);var l=i;do l=(l+1)%r;while(e[l].equals2D(n)&&l!==i);var u=e[s],p=e[l];if(u.equals2D(n)||p.equals2D(n)||u.equals2D(p))return!1;var m=En.computeOrientation(u,n,p),v=!1;return m===0?v=u.x>p.x:v=m>0,v};En.locatePointInRing=function(e,r){return _p.locatePointInRing(e,r)};En.distancePointLinePerpendicular=function(e,r,n){var i=(n.x-r.x)*(n.x-r.x)+(n.y-r.y)*(n.y-r.y),o=((r.y-e.y)*(n.x-r.x)-(r.x-e.x)*(n.y-r.y))/i;return Math.abs(o)*Math.sqrt(i)};En.computeOrientation=function(e,r,n){return En.orientationIndex(e,r,n)};En.distancePointLine=function(){if(arguments.length===2){var e=arguments[0],r=arguments[1];if(r.length===0)throw new Ls;for(var n=e.distance(r[0]),i=0;i<r.length-1;i++){var o=En.distancePointLine(e,r[i],r[i+1]);o<n&&(n=o)}return n}else if(arguments.length===3){var a=arguments[0],s=arguments[1],l=arguments[2];if(s.x===l.x&&s.y===l.y)return a.distance(s);var u=(l.x-s.x)*(l.x-s.x)+(l.y-s.y)*(l.y-s.y),p=((a.x-s.x)*(l.x-s.x)+(a.y-s.y)*(l.y-s.y))/u;if(p<=0)return a.distance(s);if(p>=1)return a.distance(l);var m=((s.y-a.y)*(l.x-s.x)-(s.x-a.x)*(l.y-s.y))/u;return Math.abs(m)*Math.sqrt(u)}};En.isOnLine=function(e,r){for(var n=new r_,i=1;i<r.length;i++){var o=r[i-1],a=r[i];if(n.computeIntersection(e,o,a),n.hasIntersection())return!0}return!1};kb.CLOCKWISE.get=function(){return-1};kb.RIGHT.get=function(){return En.CLOCKWISE};kb.COUNTERCLOCKWISE.get=function(){return 1};kb.LEFT.get=function(){return En.COUNTERCLOCKWISE};kb.COLLINEAR.get=function(){return 0};kb.STRAIGHT.get=function(){return En.COLLINEAR};Object.defineProperties(En,kb);var cv=function(){};cv.prototype.filter=function(e){};cv.prototype.interfaces_=function(){return[]};cv.prototype.getClass=function(){return cv};var si=function(){var e=arguments[0];this._envelope=null,this._factory=null,this._SRID=null,this._userData=null,this._factory=e,this._SRID=e.getSRID()},zm={serialVersionUID:{configurable:!0},SORTINDEX_POINT:{configurable:!0},SORTINDEX_MULTIPOINT:{configurable:!0},SORTINDEX_LINESTRING:{configurable:!0},SORTINDEX_LINEARRING:{configurable:!0},SORTINDEX_MULTILINESTRING:{configurable:!0},SORTINDEX_POLYGON:{configurable:!0},SORTINDEX_MULTIPOLYGON:{configurable:!0},SORTINDEX_GEOMETRYCOLLECTION:{configurable:!0},geometryChangedFilter:{configurable:!0}};si.prototype.isGeometryCollection=function(){return this.getSortIndex()===si.SORTINDEX_GEOMETRYCOLLECTION};si.prototype.getFactory=function(){return this._factory};si.prototype.getGeometryN=function(e){return this};si.prototype.getArea=function(){return 0};si.prototype.isRectangle=function(){return!1};si.prototype.equals=function(){if(arguments[0]instanceof si){var e=arguments[0];return e===null?!1:this.equalsTopo(e)}else if(arguments[0]instanceof Object){var r=arguments[0];if(!(r instanceof si))return!1;var n=r;return this.equalsExact(n)}};si.prototype.equalsExact=function(e){return this===e||this.equalsExact(e,0)};si.prototype.geometryChanged=function(){this.apply(si.geometryChangedFilter)};si.prototype.geometryChangedAction=function(){this._envelope=null};si.prototype.equalsNorm=function(e){return e===null?!1:this.norm().equalsExact(e.norm())};si.prototype.getLength=function(){return 0};si.prototype.getNumGeometries=function(){return 1};si.prototype.compareTo=function(){if(arguments.length===1){var e=arguments[0],r=e;return this.getSortIndex()!==r.getSortIndex()?this.getSortIndex()-r.getSortIndex():this.isEmpty()&&r.isEmpty()?0:this.isEmpty()?-1:r.isEmpty()?1:this.compareToSameClass(e)}else if(arguments.length===2){var n=arguments[0],i=arguments[1];return this.getSortIndex()!==n.getSortIndex()?this.getSortIndex()-n.getSortIndex():this.isEmpty()&&n.isEmpty()?0:this.isEmpty()?-1:n.isEmpty()?1:this.compareToSameClass(n,i)}};si.prototype.getUserData=function(){return this._userData};si.prototype.getSRID=function(){return this._SRID};si.prototype.getEnvelope=function(){return this.getFactory().toGeometry(this.getEnvelopeInternal())};si.prototype.checkNotGeometryCollection=function(e){if(e.getSortIndex()===si.SORTINDEX_GEOMETRYCOLLECTION)throw new Ls};si.prototype.equal=function(e,r,n){return n===0?e.equals(r):e.distance(r)<=n};si.prototype.norm=function(){var e=this.copy();return e.normalize(),e};si.prototype.getPrecisionModel=function(){return this._factory.getPrecisionModel()};si.prototype.getEnvelopeInternal=function(){return this._envelope===null&&(this._envelope=this.computeEnvelopeInternal()),new Un(this._envelope)};si.prototype.setSRID=function(e){this._SRID=e};si.prototype.setUserData=function(e){this._userData=e};si.prototype.compare=function(e,r){for(var n=e.iterator(),i=r.iterator();n.hasNext()&&i.hasNext();){var o=n.next(),a=i.next(),s=o.compareTo(a);if(s!==0)return s}return n.hasNext()?1:i.hasNext()?-1:0};si.prototype.hashCode=function(){return this.getEnvelopeInternal().hashCode()};si.prototype.isGeometryCollectionOrDerived=function(){return this.getSortIndex()===si.SORTINDEX_GEOMETRYCOLLECTION||this.getSortIndex()===si.SORTINDEX_MULTIPOINT||this.getSortIndex()===si.SORTINDEX_MULTILINESTRING||this.getSortIndex()===si.SORTINDEX_MULTIPOLYGON};si.prototype.interfaces_=function(){return[D5,sd,ad]};si.prototype.getClass=function(){return si};si.hasNonEmptyElements=function(e){for(var r=0;r<e.length;r++)if(!e[r].isEmpty())return!0;return!1};si.hasNullElements=function(e){for(var r=0;r<e.length;r++)if(e[r]===null)return!0;return!1};zm.serialVersionUID.get=function(){return 8763622679187377e3};zm.SORTINDEX_POINT.get=function(){return 0};zm.SORTINDEX_MULTIPOINT.get=function(){return 1};zm.SORTINDEX_LINESTRING.get=function(){return 2};zm.SORTINDEX_LINEARRING.get=function(){return 3};zm.SORTINDEX_MULTILINESTRING.get=function(){return 4};zm.SORTINDEX_POLYGON.get=function(){return 5};zm.SORTINDEX_MULTIPOLYGON.get=function(){return 6};zm.SORTINDEX_GEOMETRYCOLLECTION.get=function(){return 7};zm.geometryChangedFilter.get=function(){return xH};Object.defineProperties(si,zm);var xH=function(){};xH.interfaces_=function(){return[cv]};xH.filter=function(e){e.geometryChangedAction()};var Bm=function(){};Bm.prototype.filter=function(e){};Bm.prototype.interfaces_=function(){return[]};Bm.prototype.getClass=function(){return Bm};var ld=function(){},uv={Mod2BoundaryNodeRule:{configurable:!0},EndPointBoundaryNodeRule:{configurable:!0},MultiValentEndPointBoundaryNodeRule:{configurable:!0},MonoValentEndPointBoundaryNodeRule:{configurable:!0},MOD2_BOUNDARY_RULE:{configurable:!0},ENDPOINT_BOUNDARY_RULE:{configurable:!0},MULTIVALENT_ENDPOINT_BOUNDARY_RULE:{configurable:!0},MONOVALENT_ENDPOINT_BOUNDARY_RULE:{configurable:!0},OGC_SFS_BOUNDARY_RULE:{configurable:!0}};ld.prototype.isInBoundary=function(e){};ld.prototype.interfaces_=function(){return[]};ld.prototype.getClass=function(){return ld};uv.Mod2BoundaryNodeRule.get=function(){return NE};uv.EndPointBoundaryNodeRule.get=function(){return $E};uv.MultiValentEndPointBoundaryNodeRule.get=function(){return FE};uv.MonoValentEndPointBoundaryNodeRule.get=function(){return zE};uv.MOD2_BOUNDARY_RULE.get=function(){return new NE};uv.ENDPOINT_BOUNDARY_RULE.get=function(){return new $E};uv.MULTIVALENT_ENDPOINT_BOUNDARY_RULE.get=function(){return new FE};uv.MONOVALENT_ENDPOINT_BOUNDARY_RULE.get=function(){return new zE};uv.OGC_SFS_BOUNDARY_RULE.get=function(){return ld.MOD2_BOUNDARY_RULE};Object.defineProperties(ld,uv);var NE=function(){};NE.prototype.isInBoundary=function(e){return e%2==1};NE.prototype.interfaces_=function(){return[ld]};NE.prototype.getClass=function(){return NE};var $E=function(){};$E.prototype.isInBoundary=function(e){return e>0};$E.prototype.interfaces_=function(){return[ld]};$E.prototype.getClass=function(){return $E};var FE=function(){};FE.prototype.isInBoundary=function(e){return e>1};FE.prototype.interfaces_=function(){return[ld]};FE.prototype.getClass=function(){return FE};var zE=function(){};zE.prototype.isInBoundary=function(e){return e===1};zE.prototype.interfaces_=function(){return[ld]};zE.prototype.getClass=function(){return zE};var Ya=function(){};Ya.prototype.add=function(){};Ya.prototype.addAll=function(){};Ya.prototype.isEmpty=function(){};Ya.prototype.iterator=function(){};Ya.prototype.size=function(){};Ya.prototype.toArray=function(){};Ya.prototype.remove=function(){};var Ixt=function(t){function e(n){t.call(this),this.message=n||""}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={name:{configurable:!0}};return r.name.get=function(){return"IndexOutOfBoundsException"},Object.defineProperties(e,r),e}(Error),BE=function(){};BE.prototype.hasNext=function(){};BE.prototype.next=function(){};BE.prototype.remove=function(){};var ch=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(){},e.prototype.set=function(){},e.prototype.isEmpty=function(){},e}(Ya);function jE(t){this.message=t||""}jE.prototype=new Error;jE.prototype.name="NoSuchElementException";var xn=function(t){function e(){t.call(this),this.array_=[],arguments[0]instanceof Ya&&this.addAll(arguments[0])}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.ensureCapacity=function(){},e.prototype.interfaces_=function(){return[t,Ya]},e.prototype.add=function(n){return arguments.length===1?this.array_.push(n):this.array_.splice(arguments[0],arguments[1]),!0},e.prototype.clear=function(){this.array_=[]},e.prototype.addAll=function(n){for(var i=this,o=n.iterator();o.hasNext();)i.add(o.next());return!0},e.prototype.set=function(n,i){var o=this.array_[n];return this.array_[n]=i,o},e.prototype.iterator=function(){return new Mxt(this)},e.prototype.get=function(n){if(n<0||n>=this.size())throw new Ixt;return this.array_[n]},e.prototype.isEmpty=function(){return this.array_.length===0},e.prototype.size=function(){return this.array_.length},e.prototype.toArray=function(){for(var n=this,i=[],o=0,a=this.array_.length;o<a;o++)i.push(n.array_[o]);return i},e.prototype.remove=function(n){for(var i=this,o=!1,a=0,s=this.array_.length;a<s;a++)if(i.array_[a]===n){i.array_.splice(a,1),o=!0;break}return o},e}(ch),Mxt=function(t){function e(r){t.call(this),this.arrayList_=r,this.position_=0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.next=function(){if(this.position_===this.arrayList_.size())throw new jE;return this.arrayList_.get(this.position_++)},e.prototype.hasNext=function(){return this.position_<this.arrayList_.size()},e.prototype.set=function(n){return this.arrayList_.set(this.position_-1,n)},e.prototype.remove=function(){this.arrayList_.remove(this.arrayList_.get(this.position_))},e}(BE),tA=function(t){function e(){if(t.call(this),arguments.length!==0){if(arguments.length===1){var n=arguments[0];this.ensureCapacity(n.length),this.add(n,!0)}else if(arguments.length===2){var i=arguments[0],o=arguments[1];this.ensureCapacity(i.length),this.add(i,o)}}}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={coordArrayType:{configurable:!0}};return r.coordArrayType.get=function(){return new Array(0).fill(null)},e.prototype.getCoordinate=function(i){return this.get(i)},e.prototype.addAll=function(){var i=this;if(arguments.length===2){for(var o=arguments[0],a=arguments[1],s=!1,l=o.iterator();l.hasNext();)i.add(l.next(),a),s=!0;return s}else return t.prototype.addAll.apply(this,arguments)},e.prototype.clone=function(){for(var i=this,o=t.prototype.clone.call(this),a=0;a<this.size();a++)o.add(a,i.get(a).copy());return o},e.prototype.toCoordinateArray=function(){return this.toArray(e.coordArrayType)},e.prototype.add=function(){var i=this;if(arguments.length===1){var o=arguments[0];t.prototype.add.call(this,o)}else if(arguments.length===2){if(arguments[0]instanceof Array&&typeof arguments[1]=="boolean"){var a=arguments[0],s=arguments[1];return this.add(a,s,!0),!0}else if(arguments[0]instanceof ar&&typeof arguments[1]=="boolean"){var l=arguments[0],u=arguments[1];if(!u&&this.size()>=1){var p=this.get(this.size()-1);if(p.equals2D(l))return null}t.prototype.add.call(this,l)}else if(arguments[0]instanceof Object&&typeof arguments[1]=="boolean"){var m=arguments[0],v=arguments[1];return this.add(m,v),!0}}else if(arguments.length===3){if(typeof arguments[2]=="boolean"&&arguments[0]instanceof Array&&typeof arguments[1]=="boolean"){var x=arguments[0],y=arguments[1],_=arguments[2];if(_)for(var w=0;w<x.length;w++)i.add(x[w],y);else for(var C=x.length-1;C>=0;C--)i.add(x[C],y);return!0}else if(typeof arguments[2]=="boolean"&&Number.isInteger(arguments[0])&&arguments[1]instanceof ar){var E=arguments[0],T=arguments[1],A=arguments[2];if(!A){var k=this.size();if(k>0){if(E>0){var X=this.get(E-1);if(X.equals2D(T))return null}if(E<k){var Z=this.get(E);if(Z.equals2D(T))return null}}}t.prototype.add.call(this,E,T)}}else if(arguments.length===4){var W=arguments[0],D=arguments[1],H=arguments[2],N=arguments[3],j=1;H>N&&(j=-1);for(var $=H;$!==N;$+=j)i.add(W[$],D);return!0}},e.prototype.closeRing=function(){this.size()>0&&this.add(new ar(this.get(0)),!1)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},Object.defineProperties(e,r),e}(xn),Ui=function(){},F5={ForwardComparator:{configurable:!0},BidirectionalComparator:{configurable:!0},coordArrayType:{configurable:!0}};F5.ForwardComparator.get=function(){return rA};F5.BidirectionalComparator.get=function(){return UE};F5.coordArrayType.get=function(){return new Array(0).fill(null)};Ui.prototype.interfaces_=function(){return[]};Ui.prototype.getClass=function(){return Ui};Ui.isRing=function(e){return!(e.length<4||!e[0].equals2D(e[e.length-1]))};Ui.ptNotInList=function(e,r){for(var n=0;n<e.length;n++){var i=e[n];if(Ui.indexOf(i,r)<0)return i}return null};Ui.scroll=function(e,r){var n=Ui.indexOf(r,e);if(n<0)return null;var i=new Array(e.length).fill(null);Bl.arraycopy(e,n,i,0,e.length-n),Bl.arraycopy(e,0,i,e.length-n,n),Bl.arraycopy(i,0,e,0,e.length)};Ui.equals=function(){if(arguments.length===2){var e=arguments[0],r=arguments[1];if(e===r)return!0;if(e===null||r===null||e.length!==r.length)return!1;for(var n=0;n<e.length;n++)if(!e[n].equals(r[n]))return!1;return!0}else if(arguments.length===3){var i=arguments[0],o=arguments[1],a=arguments[2];if(i===o)return!0;if(i===null||o===null||i.length!==o.length)return!1;for(var s=0;s<i.length;s++)if(a.compare(i[s],o[s])!==0)return!1;return!0}};Ui.intersection=function(e,r){for(var n=new tA,i=0;i<e.length;i++)r.intersects(e[i])&&n.add(e[i],!0);return n.toCoordinateArray()};Ui.hasRepeatedPoints=function(e){for(var r=1;r<e.length;r++)if(e[r-1].equals(e[r]))return!0;return!1};Ui.removeRepeatedPoints=function(e){if(!Ui.hasRepeatedPoints(e))return e;var r=new tA(e,!1);return r.toCoordinateArray()};Ui.reverse=function(e){for(var r=e.length-1,n=Math.trunc(r/2),i=0;i<=n;i++){var o=e[i];e[i]=e[r-i],e[r-i]=o}};Ui.removeNull=function(e){for(var r=0,n=0;n<e.length;n++)e[n]!==null&&r++;var i=new Array(r).fill(null);if(r===0)return i;for(var o=0,a=0;a<e.length;a++)e[a]!==null&&(i[o++]=e[a]);return i};Ui.copyDeep=function(){if(arguments.length===1){for(var e=arguments[0],r=new Array(e.length).fill(null),n=0;n<e.length;n++)r[n]=new ar(e[n]);return r}else if(arguments.length===5)for(var i=arguments[0],o=arguments[1],a=arguments[2],s=arguments[3],l=arguments[4],u=0;u<l;u++)a[s+u]=new ar(i[o+u])};Ui.isEqualReversed=function(e,r){for(var n=0;n<e.length;n++){var i=e[n],o=r[e.length-n-1];if(i.compareTo(o)!==0)return!1}return!0};Ui.envelope=function(e){for(var r=new Un,n=0;n<e.length;n++)r.expandToInclude(e[n]);return r};Ui.toCoordinateArray=function(e){return e.toArray(Ui.coordArrayType)};Ui.atLeastNCoordinatesOrNothing=function(e,r){return r.length>=e?r:[]};Ui.indexOf=function(e,r){for(var n=0;n<r.length;n++)if(e.equals(r[n]))return n;return-1};Ui.increasingDirection=function(e){for(var r=0;r<Math.trunc(e.length/2);r++){var n=e.length-1-r,i=e[r].compareTo(e[n]);if(i!==0)return i}return 1};Ui.compare=function(e,r){for(var n=0;n<e.length&&n<r.length;){var i=e[n].compareTo(r[n]);if(i!==0)return i;n++}return n<r.length?-1:n<e.length?1:0};Ui.minCoordinate=function(e){for(var r=null,n=0;n<e.length;n++)(r===null||r.compareTo(e[n])>0)&&(r=e[n]);return r};Ui.extract=function(e,r,n){r=uf.clamp(r,0,e.length),n=uf.clamp(n,-1,e.length);var i=n-r+1;n<0&&(i=0),r>=e.length&&(i=0),n<r&&(i=0);var o=new Array(i).fill(null);if(i===0)return o;for(var a=0,s=r;s<=n;s++)o[a++]=e[s];return o};Object.defineProperties(Ui,F5);var rA=function(){};rA.prototype.compare=function(e,r){var n=e,i=r;return Ui.compare(n,i)};rA.prototype.interfaces_=function(){return[kE]};rA.prototype.getClass=function(){return rA};var UE=function(){};UE.prototype.compare=function(e,r){var n=e,i=r;if(n.length<i.length)return-1;if(n.length>i.length)return 1;if(n.length===0)return 0;var o=Ui.compare(n,i),a=Ui.isEqualReversed(n,i);return a?0:o};UE.prototype.OLDcompare=function(e,r){var n=e,i=r;if(n.length<i.length)return-1;if(n.length>i.length)return 1;if(n.length===0)return 0;for(var o=Ui.increasingDirection(n),a=Ui.increasingDirection(i),s=o>0?0:n.length-1,l=a>0?0:n.length-1,u=0;u<n.length;u++){var p=n[s].compareTo(i[l]);if(p!==0)return p;s+=o,l+=a}return 0};UE.prototype.interfaces_=function(){return[kE]};UE.prototype.getClass=function(){return UE};var Ob=function(){};Ob.prototype.get=function(){};Ob.prototype.put=function(){};Ob.prototype.size=function(){};Ob.prototype.values=function(){};Ob.prototype.entrySet=function(){};var Axt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Ob);function nA(t){this.message=t||""}nA.prototype=new Error;nA.prototype.name="OperationNotSupported";function z5(){}z5.prototype=new Ya;z5.prototype.contains=function(){};var _H=function(t){function e(){t.call(this),this.array_=[],arguments[0]instanceof Ya&&this.addAll(arguments[0])}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.contains=function(n){for(var i=this,o=0,a=this.array_.length;o<a;o++){var s=i.array_[o];if(s===n)return!0}return!1},e.prototype.add=function(n){return this.contains(n)?!1:(this.array_.push(n),!0)},e.prototype.addAll=function(n){for(var i=this,o=n.iterator();o.hasNext();)i.add(o.next());return!0},e.prototype.remove=function(n){throw new Error},e.prototype.size=function(){return this.array_.length},e.prototype.isEmpty=function(){return this.array_.length===0},e.prototype.toArray=function(){for(var n=this,i=[],o=0,a=this.array_.length;o<a;o++)i.push(n.array_[o]);return i},e.prototype.iterator=function(){return new Rxt(this)},e}(z5),Rxt=function(t){function e(r){t.call(this),this.hashSet_=r,this.position_=0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.next=function(){if(this.position_===this.hashSet_.size())throw new jE;return this.hashSet_.array_[this.position_++]},e.prototype.hasNext=function(){return this.position_<this.hashSet_.size()},e.prototype.remove=function(){throw new nA},e}(BE),fv=0,n_=1;function uhe(t){return t===null?fv:t.color}function ps(t){return t===null?null:t.parent}function dv(t,e){t!==null&&(t.color=e)}function bH(t){return t===null?null:t.left}function fhe(t){return t===null?null:t.right}function tc(){this.root_=null,this.size_=0}tc.prototype=new Axt;tc.prototype.get=function(t){for(var e=this.root_;e!==null;){var r=t.compareTo(e.key);if(r<0)e=e.left;else if(r>0)e=e.right;else return e.value}return null};tc.prototype.put=function(t,e){if(this.root_===null)return this.root_={key:t,value:e,left:null,right:null,parent:null,color:fv,getValue:function(){return this.value},getKey:function(){return this.key}},this.size_=1,null;var r=this.root_,n,i;do if(n=r,i=t.compareTo(r.key),i<0)r=r.left;else if(i>0)r=r.right;else{var o=r.value;return r.value=e,o}while(r!==null);var a={key:t,left:null,right:null,value:e,parent:n,color:fv,getValue:function(){return this.value},getKey:function(){return this.key}};return i<0?n.left=a:n.right=a,this.fixAfterInsertion(a),this.size_++,null};tc.prototype.fixAfterInsertion=function(t){var e=this;for(t.color=n_;t!=null&&t!==this.root_&&t.parent.color===n_;)if(ps(t)===bH(ps(ps(t)))){var r=fhe(ps(ps(t)));uhe(r)===n_?(dv(ps(t),fv),dv(r,fv),dv(ps(ps(t)),n_),t=ps(ps(t))):(t===fhe(ps(t))&&(t=ps(t),e.rotateLeft(t)),dv(ps(t),fv),dv(ps(ps(t)),n_),e.rotateRight(ps(ps(t))))}else{var n=bH(ps(ps(t)));uhe(n)===n_?(dv(ps(t),fv),dv(n,fv),dv(ps(ps(t)),n_),t=ps(ps(t))):(t===bH(ps(t))&&(t=ps(t),e.rotateRight(t)),dv(ps(t),fv),dv(ps(ps(t)),n_),e.rotateLeft(ps(ps(t))))}this.root_.color=fv};tc.prototype.values=function(){var t=new xn,e=this.getFirstEntry();if(e!==null)for(t.add(e.value);(e=tc.successor(e))!==null;)t.add(e.value);return t};tc.prototype.entrySet=function(){var t=new _H,e=this.getFirstEntry();if(e!==null)for(t.add(e);(e=tc.successor(e))!==null;)t.add(e);return t};tc.prototype.rotateLeft=function(t){if(t!=null){var e=t.right;t.right=e.left,e.left!=null&&(e.left.parent=t),e.parent=t.parent,t.parent===null?this.root_=e:t.parent.left===t?t.parent.left=e:t.parent.right=e,e.left=t,t.parent=e}};tc.prototype.rotateRight=function(t){if(t!=null){var e=t.left;t.left=e.right,e.right!=null&&(e.right.parent=t),e.parent=t.parent,t.parent===null?this.root_=e:t.parent.right===t?t.parent.right=e:t.parent.left=e,e.right=t,t.parent=e}};tc.prototype.getFirstEntry=function(){var t=this.root_;if(t!=null)for(;t.left!=null;)t=t.left;return t};tc.successor=function(t){if(t===null)return null;if(t.right!==null){for(var e=t.right;e.left!==null;)e=e.left;return e}else{for(var r=t.parent,n=t;r!==null&&n===r.right;)n=r,r=r.parent;return r}};tc.prototype.size=function(){return this.size_};var iA=function(){};iA.prototype.interfaces_=function(){return[]};iA.prototype.getClass=function(){return iA};function dhe(){}dhe.prototype=new z5;function bp(){this.array_=[],arguments[0]instanceof Ya&&this.addAll(arguments[0])}bp.prototype=new dhe;bp.prototype.contains=function(t){for(var e=this,r=0,n=this.array_.length;r<n;r++){var i=e.array_[r];if(i.compareTo(t)===0)return!0}return!1};bp.prototype.add=function(t){var e=this;if(this.contains(t))return!1;for(var r=0,n=this.array_.length;r<n;r++){var i=e.array_[r];if(i.compareTo(t)===1)return e.array_.splice(r,0,t),!0}return this.array_.push(t),!0};bp.prototype.addAll=function(t){for(var e=this,r=t.iterator();r.hasNext();)e.add(r.next());return!0};bp.prototype.remove=function(t){throw new nA};bp.prototype.size=function(){return this.array_.length};bp.prototype.isEmpty=function(){return this.array_.length===0};bp.prototype.toArray=function(){for(var t=this,e=[],r=0,n=this.array_.length;r<n;r++)e.push(t.array_[r]);return e};bp.prototype.iterator=function(){return new B5(this)};var B5=function(t){this.treeSet_=t,this.position_=0};B5.prototype.next=function(){if(this.position_===this.treeSet_.size())throw new jE;return this.treeSet_.array_[this.position_++]};B5.prototype.hasNext=function(){return this.position_<this.treeSet_.size()};B5.prototype.remove=function(){throw new nA};var i_=function(){};i_.sort=function(){var e=arguments[0],r,n,i,o;if(arguments.length===1)o=function(s,l){return s.compareTo(l)},e.sort(o);else if(arguments.length===2)i=arguments[1],o=function(s,l){return i.compare(s,l)},e.sort(o);else if(arguments.length===3){n=e.slice(arguments[1],arguments[2]),n.sort();var a=e.slice(0,arguments[1]).concat(n,e.slice(arguments[2],e.length));for(e.splice(0,e.length),r=0;r<a.length;r++)e.push(a[r])}else if(arguments.length===4)for(n=e.slice(arguments[1],arguments[2]),i=arguments[3],o=function(s,l){return i.compare(s,l)},n.sort(o),a=e.slice(0,arguments[1]).concat(n,e.slice(arguments[2],e.length)),e.splice(0,e.length),r=0;r<a.length;r++)e.push(a[r])};i_.asList=function(e){for(var r=new xn,n=0,i=e.length;n<i;n++)r.add(e[n]);return r};var So=function(){},uh={P:{configurable:!0},L:{configurable:!0},A:{configurable:!0},FALSE:{configurable:!0},TRUE:{configurable:!0},DONTCARE:{configurable:!0},SYM_FALSE:{configurable:!0},SYM_TRUE:{configurable:!0},SYM_DONTCARE:{configurable:!0},SYM_P:{configurable:!0},SYM_L:{configurable:!0},SYM_A:{configurable:!0}};uh.P.get=function(){return 0};uh.L.get=function(){return 1};uh.A.get=function(){return 2};uh.FALSE.get=function(){return-1};uh.TRUE.get=function(){return-2};uh.DONTCARE.get=function(){return-3};uh.SYM_FALSE.get=function(){return"F"};uh.SYM_TRUE.get=function(){return"T"};uh.SYM_DONTCARE.get=function(){return"*"};uh.SYM_P.get=function(){return"0"};uh.SYM_L.get=function(){return"1"};uh.SYM_A.get=function(){return"2"};So.prototype.interfaces_=function(){return[]};So.prototype.getClass=function(){return So};So.toDimensionSymbol=function(e){switch(e){case So.FALSE:return So.SYM_FALSE;case So.TRUE:return So.SYM_TRUE;case So.DONTCARE:return So.SYM_DONTCARE;case So.P:return So.SYM_P;case So.L:return So.SYM_L;case So.A:return So.SYM_A}throw new Ls};So.toDimensionValue=function(e){switch(JM.toUpperCase(e)){case So.SYM_FALSE:return So.FALSE;case So.SYM_TRUE:return So.TRUE;case So.SYM_DONTCARE:return So.DONTCARE;case So.SYM_P:return So.P;case So.SYM_L:return So.L;case So.SYM_A:return So.A}throw new Ls};Object.defineProperties(So,uh);var wp=function(){};wp.prototype.filter=function(e){};wp.prototype.interfaces_=function(){return[]};wp.prototype.getClass=function(){return wp};var fh=function(){};fh.prototype.filter=function(e,r){};fh.prototype.isDone=function(){};fh.prototype.isGeometryChanged=function(){};fh.prototype.interfaces_=function(){return[]};fh.prototype.getClass=function(){return fh};var Ec=function(t){function e(n,i){if(t.call(this,i),this._geometries=n||[],t.hasNullElements(this._geometries))throw new Ls}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={serialVersionUID:{configurable:!0}};return e.prototype.computeEnvelopeInternal=function(){for(var i=this,o=new Un,a=0;a<this._geometries.length;a++)o.expandToInclude(i._geometries[a].getEnvelopeInternal());return o},e.prototype.getGeometryN=function(i){return this._geometries[i]},e.prototype.getSortIndex=function(){return t.SORTINDEX_GEOMETRYCOLLECTION},e.prototype.getCoordinates=function(){for(var i=this,o=new Array(this.getNumPoints()).fill(null),a=-1,s=0;s<this._geometries.length;s++)for(var l=i._geometries[s].getCoordinates(),u=0;u<l.length;u++)a++,o[a]=l[u];return o},e.prototype.getArea=function(){for(var i=this,o=0,a=0;a<this._geometries.length;a++)o+=i._geometries[a].getArea();return o},e.prototype.equalsExact=function(){var i=this;if(arguments.length===2){var o=arguments[0],a=arguments[1];if(!this.isEquivalentClass(o))return!1;var s=o;if(this._geometries.length!==s._geometries.length)return!1;for(var l=0;l<this._geometries.length;l++)if(!i._geometries[l].equalsExact(s._geometries[l],a))return!1;return!0}else return t.prototype.equalsExact.apply(this,arguments)},e.prototype.normalize=function(){for(var i=this,o=0;o<this._geometries.length;o++)i._geometries[o].normalize();i_.sort(this._geometries)},e.prototype.getCoordinate=function(){return this.isEmpty()?null:this._geometries[0].getCoordinate()},e.prototype.getBoundaryDimension=function(){for(var i=this,o=So.FALSE,a=0;a<this._geometries.length;a++)o=Math.max(o,i._geometries[a].getBoundaryDimension());return o},e.prototype.getDimension=function(){for(var i=this,o=So.FALSE,a=0;a<this._geometries.length;a++)o=Math.max(o,i._geometries[a].getDimension());return o},e.prototype.getLength=function(){for(var i=this,o=0,a=0;a<this._geometries.length;a++)o+=i._geometries[a].getLength();return o},e.prototype.getNumPoints=function(){for(var i=this,o=0,a=0;a<this._geometries.length;a++)o+=i._geometries[a].getNumPoints();return o},e.prototype.getNumGeometries=function(){return this._geometries.length},e.prototype.reverse=function(){for(var i=this,o=this._geometries.length,a=new Array(o).fill(null),s=0;s<this._geometries.length;s++)a[s]=i._geometries[s].reverse();return this.getFactory().createGeometryCollection(a)},e.prototype.compareToSameClass=function(){var i=this;if(arguments.length===1){var o=arguments[0],a=new bp(i_.asList(this._geometries)),s=new bp(i_.asList(o._geometries));return this.compare(a,s)}else if(arguments.length===2){for(var l=arguments[0],u=arguments[1],p=l,m=this.getNumGeometries(),v=p.getNumGeometries(),x=0;x<m&&x<v;){var y=i.getGeometryN(x),_=p.getGeometryN(x),w=y.compareToSameClass(_,u);if(w!==0)return w;x++}return x<m?1:x<v?-1:0}},e.prototype.apply=function(){var i=this;if(ai(arguments[0],Bm))for(var o=arguments[0],a=0;a<this._geometries.length;a++)i._geometries[a].apply(o);else if(ai(arguments[0],fh)){var s=arguments[0];if(this._geometries.length===0)return null;for(var l=0;l<this._geometries.length&&(i._geometries[l].apply(s),!s.isDone());l++);s.isGeometryChanged()&&this.geometryChanged()}else if(ai(arguments[0],wp)){var u=arguments[0];u.filter(this);for(var p=0;p<this._geometries.length;p++)i._geometries[p].apply(u)}else if(ai(arguments[0],cv)){var m=arguments[0];m.filter(this);for(var v=0;v<this._geometries.length;v++)i._geometries[v].apply(m)}},e.prototype.getBoundary=function(){return this.checkNotGeometryCollection(this),Ti.shouldNeverReachHere(),null},e.prototype.clone=function(){var i=this,o=t.prototype.clone.call(this);o._geometries=new Array(this._geometries.length).fill(null);for(var a=0;a<this._geometries.length;a++)o._geometries[a]=i._geometries[a].clone();return o},e.prototype.getGeometryType=function(){return"GeometryCollection"},e.prototype.copy=function(){for(var i=this,o=new Array(this._geometries.length).fill(null),a=0;a<o.length;a++)o[a]=i._geometries[a].copy();return new e(o,this._factory)},e.prototype.isEmpty=function(){for(var i=this,o=0;o<this._geometries.length;o++)if(!i._geometries[o].isEmpty())return!1;return!0},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},r.serialVersionUID.get=function(){return-5694727726395021e3},Object.defineProperties(e,r),e}(si),o_=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={serialVersionUID:{configurable:!0}};return e.prototype.getSortIndex=function(){return si.SORTINDEX_MULTILINESTRING},e.prototype.equalsExact=function(){if(arguments.length===2){var i=arguments[0],o=arguments[1];return this.isEquivalentClass(i)?t.prototype.equalsExact.call(this,i,o):!1}else return t.prototype.equalsExact.apply(this,arguments)},e.prototype.getBoundaryDimension=function(){return this.isClosed()?So.FALSE:0},e.prototype.isClosed=function(){var i=this;if(this.isEmpty())return!1;for(var o=0;o<this._geometries.length;o++)if(!i._geometries[o].isClosed())return!1;return!0},e.prototype.getDimension=function(){return 1},e.prototype.reverse=function(){for(var i=this,o=this._geometries.length,a=new Array(o).fill(null),s=0;s<this._geometries.length;s++)a[o-1-s]=i._geometries[s].reverse();return this.getFactory().createMultiLineString(a)},e.prototype.getBoundary=function(){return new cd(this).getBoundary()},e.prototype.getGeometryType=function(){return"MultiLineString"},e.prototype.copy=function(){for(var i=this,o=new Array(this._geometries.length).fill(null),a=0;a<o.length;a++)o[a]=i._geometries[a].copy();return new e(o,this._factory)},e.prototype.interfaces_=function(){return[iA]},e.prototype.getClass=function(){return e},r.serialVersionUID.get=function(){return 8166665132445434e3},Object.defineProperties(e,r),e}(Ec),cd=function(){if(this._geom=null,this._geomFact=null,this._bnRule=null,this._endpointMap=null,arguments.length===1){var e=arguments[0],r=ld.MOD2_BOUNDARY_RULE;this._geom=e,this._geomFact=e.getFactory(),this._bnRule=r}else if(arguments.length===2){var n=arguments[0],i=arguments[1];this._geom=n,this._geomFact=n.getFactory(),this._bnRule=i}};cd.prototype.boundaryMultiLineString=function(e){if(this._geom.isEmpty())return this.getEmptyMultiPoint();var r=this.computeBoundaryCoordinates(e);return r.length===1?this._geomFact.createPoint(r[0]):this._geomFact.createMultiPointFromCoords(r)};cd.prototype.getBoundary=function(){return this._geom instanceof ra?this.boundaryLineString(this._geom):this._geom instanceof o_?this.boundaryMultiLineString(this._geom):this._geom.getBoundary()};cd.prototype.boundaryLineString=function(e){if(this._geom.isEmpty())return this.getEmptyMultiPoint();if(e.isClosed()){var r=this._bnRule.isInBoundary(2);return r?e.getStartPoint():this._geomFact.createMultiPoint()}return this._geomFact.createMultiPoint([e.getStartPoint(),e.getEndPoint()])};cd.prototype.getEmptyMultiPoint=function(){return this._geomFact.createMultiPoint()};cd.prototype.computeBoundaryCoordinates=function(e){var r=this,n=new xn;this._endpointMap=new tc;for(var i=0;i<e.getNumGeometries();i++){var o=e.getGeometryN(i);o.getNumPoints()!==0&&(r.addEndpoint(o.getCoordinateN(0)),r.addEndpoint(o.getCoordinateN(o.getNumPoints()-1)))}for(var a=this._endpointMap.entrySet().iterator();a.hasNext();){var s=a.next(),l=s.getValue(),u=l.count;r._bnRule.isInBoundary(u)&&n.add(s.getKey())}return Ui.toCoordinateArray(n)};cd.prototype.addEndpoint=function(e){var r=this._endpointMap.get(e);r===null&&(r=new j5,this._endpointMap.put(e,r)),r.count++};cd.prototype.interfaces_=function(){return[]};cd.prototype.getClass=function(){return cd};cd.getBoundary=function(){if(arguments.length===1){var e=arguments[0],r=new cd(e);return r.getBoundary()}else if(arguments.length===2){var n=arguments[0],i=arguments[1],o=new cd(n,i);return o.getBoundary()}};var j5=function(){this.count=null};j5.prototype.interfaces_=function(){return[]};j5.prototype.getClass=function(){return j5};function kxt(){}function Oxt(){}var Lxt=function(){};function Dxt(){}function Nxt(){}function $xt(){}var ud=function(){},wH={NEWLINE:{configurable:!0},SIMPLE_ORDINATE_FORMAT:{configurable:!0}};ud.prototype.interfaces_=function(){return[]};ud.prototype.getClass=function(){return ud};ud.chars=function(e,r){for(var n=new Array(r).fill(null),i=0;i<r;i++)n[i]=e;return String(n)};ud.getStackTrace=function(){if(arguments.length===1){var e=arguments[0],r=new Dxt,n=new kxt;return e.printStackTrace(n),r.toString()}else if(arguments.length===2){var i=arguments[0],o=arguments[1],a="";new Oxt(ud.getStackTrace(i));for(var s=new $xt,l=0;l<o;l++)try{a+=s.readLine()+ud.NEWLINE}catch(u){if(u instanceof Nxt)Ti.shouldNeverReachHere();else throw u}finally{}return a}};ud.split=function(e,r){for(var n=r.length,i=new xn,o=""+e,a=o.indexOf(r);a>=0;){var s=o.substring(0,a);i.add(s),o=o.substring(a+n),a=o.indexOf(r)}o.length>0&&i.add(o);for(var l=new Array(i.size()).fill(null),u=0;u<l.length;u++)l[u]=i.get(u);return l};ud.toString=function(){if(arguments.length===1){var e=arguments[0];return ud.SIMPLE_ORDINATE_FORMAT.format(e)}};ud.spaces=function(e){return ud.chars(" ",e)};wH.NEWLINE.get=function(){return Bl.getProperty("line.separator")};wH.SIMPLE_ORDINATE_FORMAT.get=function(){return new Lxt};Object.defineProperties(ud,wH);var ga=function(){};ga.prototype.interfaces_=function(){return[]};ga.prototype.getClass=function(){return ga};ga.copyCoord=function(e,r,n,i){for(var o=Math.min(e.getDimension(),n.getDimension()),a=0;a<o;a++)n.setOrdinate(i,a,e.getOrdinate(r,a))};ga.isRing=function(e){var r=e.size();return r===0?!0:r<=3?!1:e.getOrdinate(0,so.X)===e.getOrdinate(r-1,so.X)&&e.getOrdinate(0,so.Y)===e.getOrdinate(r-1,so.Y)};ga.isEqual=function(e,r){var n=e.size(),i=r.size();if(n!==i)return!1;for(var o=Math.min(e.getDimension(),r.getDimension()),a=0;a<n;a++)for(var s=0;s<o;s++){var l=e.getOrdinate(a,s),u=r.getOrdinate(a,s);if(e.getOrdinate(a,s)!==r.getOrdinate(a,s)&&!(mi.isNaN(l)&&mi.isNaN(u)))return!1}return!0};ga.extend=function(e,r,n){var i=e.create(n,r.getDimension()),o=r.size();if(ga.copy(r,0,i,0,o),o>0)for(var a=o;a<n;a++)ga.copy(r,o-1,i,a,1);return i};ga.reverse=function(e){for(var r=e.size()-1,n=Math.trunc(r/2),i=0;i<=n;i++)ga.swap(e,i,r-i)};ga.swap=function(e,r,n){if(r===n)return null;for(var i=0;i<e.getDimension();i++){var o=e.getOrdinate(r,i);e.setOrdinate(r,i,e.getOrdinate(n,i)),e.setOrdinate(n,i,o)}};ga.copy=function(e,r,n,i,o){for(var a=0;a<o;a++)ga.copyCoord(e,r+a,n,i+a)};ga.toString=function(){if(arguments.length===1){var e=arguments[0],r=e.size();if(r===0)return"()";var n=e.getDimension(),i=new vp;i.append("(");for(var o=0;o<r;o++){o>0&&i.append(" ");for(var a=0;a<n;a++)a>0&&i.append(","),i.append(ud.toString(e.getOrdinate(o,a)))}return i.append(")"),i.toString()}};ga.ensureValidRing=function(e,r){var n=r.size();if(n===0)return r;if(n<=3)return ga.createClosedRing(e,r,4);var i=r.getOrdinate(0,so.X)===r.getOrdinate(n-1,so.X)&&r.getOrdinate(0,so.Y)===r.getOrdinate(n-1,so.Y);return i?r:ga.createClosedRing(e,r,n+1)};ga.createClosedRing=function(e,r,n){var i=e.create(n,r.getDimension()),o=r.size();ga.copy(r,0,i,0,o);for(var a=o;a<n;a++)ga.copy(r,0,i,a,1);return i};var ra=function(t){function e(n,i){t.call(this,i),this._points=null,this.init(n)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={serialVersionUID:{configurable:!0}};return e.prototype.computeEnvelopeInternal=function(){return this.isEmpty()?new Un:this._points.expandEnvelope(new Un)},e.prototype.isRing=function(){return this.isClosed()&&this.isSimple()},e.prototype.getSortIndex=function(){return t.SORTINDEX_LINESTRING},e.prototype.getCoordinates=function(){return this._points.toCoordinateArray()},e.prototype.equalsExact=function(){var i=this;if(arguments.length===2){var o=arguments[0],a=arguments[1];if(!this.isEquivalentClass(o))return!1;var s=o;if(this._points.size()!==s._points.size())return!1;for(var l=0;l<this._points.size();l++)if(!i.equal(i._points.getCoordinate(l),s._points.getCoordinate(l),a))return!1;return!0}else return t.prototype.equalsExact.apply(this,arguments)},e.prototype.normalize=function(){for(var i=this,o=0;o<Math.trunc(this._points.size()/2);o++){var a=i._points.size()-1-o;if(!i._points.getCoordinate(o).equals(i._points.getCoordinate(a)))return i._points.getCoordinate(o).compareTo(i._points.getCoordinate(a))>0&&ga.reverse(i._points),null}},e.prototype.getCoordinate=function(){return this.isEmpty()?null:this._points.getCoordinate(0)},e.prototype.getBoundaryDimension=function(){return this.isClosed()?So.FALSE:0},e.prototype.isClosed=function(){return this.isEmpty()?!1:this.getCoordinateN(0).equals2D(this.getCoordinateN(this.getNumPoints()-1))},e.prototype.getEndPoint=function(){return this.isEmpty()?null:this.getPointN(this.getNumPoints()-1)},e.prototype.getDimension=function(){return 1},e.prototype.getLength=function(){return En.computeLength(this._points)},e.prototype.getNumPoints=function(){return this._points.size()},e.prototype.reverse=function(){var i=this._points.copy();ga.reverse(i);var o=this.getFactory().createLineString(i);return o},e.prototype.compareToSameClass=function(){var i=this;if(arguments.length===1){for(var o=arguments[0],a=o,s=0,l=0;s<this._points.size()&&l<a._points.size();){var u=i._points.getCoordinate(s).compareTo(a._points.getCoordinate(l));if(u!==0)return u;s++,l++}return s<this._points.size()?1:l<a._points.size()?-1:0}else if(arguments.length===2){var p=arguments[0],m=arguments[1],v=p;return m.compare(this._points,v._points)}},e.prototype.apply=function(){var i=this;if(ai(arguments[0],Bm))for(var o=arguments[0],a=0;a<this._points.size();a++)o.filter(i._points.getCoordinate(a));else if(ai(arguments[0],fh)){var s=arguments[0];if(this._points.size()===0)return null;for(var l=0;l<this._points.size()&&(s.filter(i._points,l),!s.isDone());l++);s.isGeometryChanged()&&this.geometryChanged()}else if(ai(arguments[0],wp)){var u=arguments[0];u.filter(this)}else if(ai(arguments[0],cv)){var p=arguments[0];p.filter(this)}},e.prototype.getBoundary=function(){return new cd(this).getBoundary()},e.prototype.isEquivalentClass=function(i){return i instanceof e},e.prototype.clone=function(){var i=t.prototype.clone.call(this);return i._points=this._points.clone(),i},e.prototype.getCoordinateN=function(i){return this._points.getCoordinate(i)},e.prototype.getGeometryType=function(){return"LineString"},e.prototype.copy=function(){return new e(this._points.copy(),this._factory)},e.prototype.getCoordinateSequence=function(){return this._points},e.prototype.isEmpty=function(){return this._points.size()===0},e.prototype.init=function(i){if(i===null&&(i=this.getFactory().getCoordinateSequenceFactory().create([])),i.size()===1)throw new Ls("Invalid number of points in LineString (found "+i.size()+" - must be 0 or >= 2)");this._points=i},e.prototype.isCoordinate=function(i){for(var o=this,a=0;a<this._points.size();a++)if(o._points.getCoordinate(a).equals(i))return!0;return!1},e.prototype.getStartPoint=function(){return this.isEmpty()?null:this.getPointN(0)},e.prototype.getPointN=function(i){return this.getFactory().createPoint(this._points.getCoordinate(i))},e.prototype.interfaces_=function(){return[iA]},e.prototype.getClass=function(){return e},r.serialVersionUID.get=function(){return 3110669828065365500},Object.defineProperties(e,r),e}(si),oA=function(){};oA.prototype.interfaces_=function(){return[]};oA.prototype.getClass=function(){return oA};var Du=function(t){function e(n,i){t.call(this,i),this._coordinates=n||null,this.init(this._coordinates)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={serialVersionUID:{configurable:!0}};return e.prototype.computeEnvelopeInternal=function(){if(this.isEmpty())return new Un;var i=new Un;return i.expandToInclude(this._coordinates.getX(0),this._coordinates.getY(0)),i},e.prototype.getSortIndex=function(){return t.SORTINDEX_POINT},e.prototype.getCoordinates=function(){return this.isEmpty()?[]:[this.getCoordinate()]},e.prototype.equalsExact=function(){if(arguments.length===2){var i=arguments[0],o=arguments[1];return this.isEquivalentClass(i)?this.isEmpty()&&i.isEmpty()?!0:this.isEmpty()!==i.isEmpty()?!1:this.equal(i.getCoordinate(),this.getCoordinate(),o):!1}else return t.prototype.equalsExact.apply(this,arguments)},e.prototype.normalize=function(){},e.prototype.getCoordinate=function(){return this._coordinates.size()!==0?this._coordinates.getCoordinate(0):null},e.prototype.getBoundaryDimension=function(){return So.FALSE},e.prototype.getDimension=function(){return 0},e.prototype.getNumPoints=function(){return this.isEmpty()?0:1},e.prototype.reverse=function(){return this.copy()},e.prototype.getX=function(){if(this.getCoordinate()===null)throw new Error("getX called on empty Point");return this.getCoordinate().x},e.prototype.compareToSameClass=function(){if(arguments.length===1){var i=arguments[0],o=i;return this.getCoordinate().compareTo(o.getCoordinate())}else if(arguments.length===2){var a=arguments[0],s=arguments[1],l=a;return s.compare(this._coordinates,l._coordinates)}},e.prototype.apply=function(){if(ai(arguments[0],Bm)){var i=arguments[0];if(this.isEmpty())return null;i.filter(this.getCoordinate())}else if(ai(arguments[0],fh)){var o=arguments[0];if(this.isEmpty())return null;o.filter(this._coordinates,0),o.isGeometryChanged()&&this.geometryChanged()}else if(ai(arguments[0],wp)){var a=arguments[0];a.filter(this)}else if(ai(arguments[0],cv)){var s=arguments[0];s.filter(this)}},e.prototype.getBoundary=function(){return this.getFactory().createGeometryCollection(null)},e.prototype.clone=function(){var i=t.prototype.clone.call(this);return i._coordinates=this._coordinates.clone(),i},e.prototype.getGeometryType=function(){return"Point"},e.prototype.copy=function(){return new e(this._coordinates.copy(),this._factory)},e.prototype.getCoordinateSequence=function(){return this._coordinates},e.prototype.getY=function(){if(this.getCoordinate()===null)throw new Error("getY called on empty Point");return this.getCoordinate().y},e.prototype.isEmpty=function(){return this._coordinates.size()===0},e.prototype.init=function(i){i===null&&(i=this.getFactory().getCoordinateSequenceFactory().create([])),Ti.isTrue(i.size()<=1),this._coordinates=i},e.prototype.isSimple=function(){return!0},e.prototype.interfaces_=function(){return[oA]},e.prototype.getClass=function(){return e},r.serialVersionUID.get=function(){return 4902022702746615e3},Object.defineProperties(e,r),e}(si),Ny=function(){};Ny.prototype.interfaces_=function(){return[]};Ny.prototype.getClass=function(){return Ny};var Ka=function(t){function e(n,i,o){if(t.call(this,o),this._shell=null,this._holes=null,n===null&&(n=this.getFactory().createLinearRing()),i===null&&(i=[]),t.hasNullElements(i))throw new Ls;if(n.isEmpty()&&t.hasNonEmptyElements(i))throw new Ls;this._shell=n,this._holes=i}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={serialVersionUID:{configurable:!0}};return e.prototype.computeEnvelopeInternal=function(){return this._shell.getEnvelopeInternal()},e.prototype.getSortIndex=function(){return t.SORTINDEX_POLYGON},e.prototype.getCoordinates=function(){var i=this;if(this.isEmpty())return[];for(var o=new Array(this.getNumPoints()).fill(null),a=-1,s=this._shell.getCoordinates(),l=0;l<s.length;l++)a++,o[a]=s[l];for(var u=0;u<this._holes.length;u++)for(var p=i._holes[u].getCoordinates(),m=0;m<p.length;m++)a++,o[a]=p[m];return o},e.prototype.getArea=function(){var i=this,o=0;o+=Math.abs(En.signedArea(this._shell.getCoordinateSequence()));for(var a=0;a<this._holes.length;a++)o-=Math.abs(En.signedArea(i._holes[a].getCoordinateSequence()));return o},e.prototype.isRectangle=function(){if(this.getNumInteriorRing()!==0||this._shell===null||this._shell.getNumPoints()!==5)return!1;for(var i=this._shell.getCoordinateSequence(),o=this.getEnvelopeInternal(),a=0;a<5;a++){var s=i.getX(a);if(!(s===o.getMinX()||s===o.getMaxX()))return!1;var l=i.getY(a);if(!(l===o.getMinY()||l===o.getMaxY()))return!1}for(var u=i.getX(0),p=i.getY(0),m=1;m<=4;m++){var v=i.getX(m),x=i.getY(m),y=v!==u,_=x!==p;if(y===_)return!1;u=v,p=x}return!0},e.prototype.equalsExact=function(){var i=this;if(arguments.length===2){var o=arguments[0],a=arguments[1];if(!this.isEquivalentClass(o))return!1;var s=o,l=this._shell,u=s._shell;if(!l.equalsExact(u,a)||this._holes.length!==s._holes.length)return!1;for(var p=0;p<this._holes.length;p++)if(!i._holes[p].equalsExact(s._holes[p],a))return!1;return!0}else return t.prototype.equalsExact.apply(this,arguments)},e.prototype.normalize=function(){var i=this;if(arguments.length===0){this.normalize(this._shell,!0);for(var o=0;o<this._holes.length;o++)i.normalize(i._holes[o],!1);i_.sort(this._holes)}else if(arguments.length===2){var a=arguments[0],s=arguments[1];if(a.isEmpty())return null;var l=new Array(a.getCoordinates().length-1).fill(null);Bl.arraycopy(a.getCoordinates(),0,l,0,l.length);var u=Ui.minCoordinate(a.getCoordinates());Ui.scroll(l,u),Bl.arraycopy(l,0,a.getCoordinates(),0,l.length),a.getCoordinates()[l.length]=l[0],En.isCCW(a.getCoordinates())===s&&Ui.reverse(a.getCoordinates())}},e.prototype.getCoordinate=function(){return this._shell.getCoordinate()},e.prototype.getNumInteriorRing=function(){return this._holes.length},e.prototype.getBoundaryDimension=function(){return 1},e.prototype.getDimension=function(){return 2},e.prototype.getLength=function(){var i=this,o=0;o+=this._shell.getLength();for(var a=0;a<this._holes.length;a++)o+=i._holes[a].getLength();return o},e.prototype.getNumPoints=function(){for(var i=this,o=this._shell.getNumPoints(),a=0;a<this._holes.length;a++)o+=i._holes[a].getNumPoints();return o},e.prototype.reverse=function(){var i=this,o=this.copy();o._shell=this._shell.copy().reverse(),o._holes=new Array(this._holes.length).fill(null);for(var a=0;a<this._holes.length;a++)o._holes[a]=i._holes[a].copy().reverse();return o},e.prototype.convexHull=function(){return this.getExteriorRing().convexHull()},e.prototype.compareToSameClass=function(){var i=this;if(arguments.length===1){var o=arguments[0],a=this._shell,s=o._shell;return a.compareToSameClass(s)}else if(arguments.length===2){var l=arguments[0],u=arguments[1],p=l,m=this._shell,v=p._shell,x=m.compareToSameClass(v,u);if(x!==0)return x;for(var y=this.getNumInteriorRing(),_=p.getNumInteriorRing(),w=0;w<y&&w<_;){var C=i.getInteriorRingN(w),E=p.getInteriorRingN(w),T=C.compareToSameClass(E,u);if(T!==0)return T;w++}return w<y?1:w<_?-1:0}},e.prototype.apply=function(i){var o=this;if(ai(i,Bm)){this._shell.apply(i);for(var a=0;a<this._holes.length;a++)o._holes[a].apply(i)}else if(ai(i,fh)){if(this._shell.apply(i),!i.isDone())for(var s=0;s<this._holes.length&&(o._holes[s].apply(i),!i.isDone());s++);i.isGeometryChanged()&&this.geometryChanged()}else if(ai(i,wp))i.filter(this);else if(ai(i,cv)){i.filter(this),this._shell.apply(i);for(var l=0;l<this._holes.length;l++)o._holes[l].apply(i)}},e.prototype.getBoundary=function(){var i=this;if(this.isEmpty())return this.getFactory().createMultiLineString();var o=new Array(this._holes.length+1).fill(null);o[0]=this._shell;for(var a=0;a<this._holes.length;a++)o[a+1]=i._holes[a];return o.length<=1?this.getFactory().createLinearRing(o[0].getCoordinateSequence()):this.getFactory().createMultiLineString(o)},e.prototype.clone=function(){var i=this,o=t.prototype.clone.call(this);o._shell=this._shell.clone(),o._holes=new Array(this._holes.length).fill(null);for(var a=0;a<this._holes.length;a++)o._holes[a]=i._holes[a].clone();return o},e.prototype.getGeometryType=function(){return"Polygon"},e.prototype.copy=function(){for(var i=this,o=this._shell.copy(),a=new Array(this._holes.length).fill(null),s=0;s<a.length;s++)a[s]=i._holes[s].copy();return new e(o,a,this._factory)},e.prototype.getExteriorRing=function(){return this._shell},e.prototype.isEmpty=function(){return this._shell.isEmpty()},e.prototype.getInteriorRingN=function(i){return this._holes[i]},e.prototype.interfaces_=function(){return[Ny]},e.prototype.getClass=function(){return e},r.serialVersionUID.get=function(){return-3494792200821764600},Object.defineProperties(e,r),e}(si),VE=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={serialVersionUID:{configurable:!0}};return e.prototype.getSortIndex=function(){return si.SORTINDEX_MULTIPOINT},e.prototype.isValid=function(){return!0},e.prototype.equalsExact=function(){if(arguments.length===2){var i=arguments[0],o=arguments[1];return this.isEquivalentClass(i)?t.prototype.equalsExact.call(this,i,o):!1}else return t.prototype.equalsExact.apply(this,arguments)},e.prototype.getCoordinate=function(){if(arguments.length===1){var i=arguments[0];return this._geometries[i].getCoordinate()}else return t.prototype.getCoordinate.apply(this,arguments)},e.prototype.getBoundaryDimension=function(){return So.FALSE},e.prototype.getDimension=function(){return 0},e.prototype.getBoundary=function(){return this.getFactory().createGeometryCollection(null)},e.prototype.getGeometryType=function(){return"MultiPoint"},e.prototype.copy=function(){for(var i=this,o=new Array(this._geometries.length).fill(null),a=0;a<o.length;a++)o[a]=i._geometries[a].copy();return new e(o,this._factory)},e.prototype.interfaces_=function(){return[oA]},e.prototype.getClass=function(){return e},r.serialVersionUID.get=function(){return-8048474874175356e3},Object.defineProperties(e,r),e}(Ec),jm=function(t){function e(n,i){n instanceof ar&&i instanceof Yi&&(n=i.getCoordinateSequenceFactory().create(n)),t.call(this,n,i),this.validateConstruction()}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={MINIMUM_VALID_SIZE:{configurable:!0},serialVersionUID:{configurable:!0}};return e.prototype.getSortIndex=function(){return si.SORTINDEX_LINEARRING},e.prototype.getBoundaryDimension=function(){return So.FALSE},e.prototype.isClosed=function(){return this.isEmpty()?!0:t.prototype.isClosed.call(this)},e.prototype.reverse=function(){var i=this._points.copy();ga.reverse(i);var o=this.getFactory().createLinearRing(i);return o},e.prototype.validateConstruction=function(){if(!this.isEmpty()&&!t.prototype.isClosed.call(this))throw new Ls;if(this.getCoordinateSequence().size()>=1&&this.getCoordinateSequence().size()<e.MINIMUM_VALID_SIZE)throw new Ls("Invalid number of points in LinearRing (found "+this.getCoordinateSequence().size()+" - must be 0 or >= 4)")},e.prototype.getGeometryType=function(){return"LinearRing"},e.prototype.copy=function(){return new e(this._points.copy(),this._factory)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},r.MINIMUM_VALID_SIZE.get=function(){return 4},r.serialVersionUID.get=function(){return-4261142084085851600},Object.defineProperties(e,r),e}(ra),Um=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={serialVersionUID:{configurable:!0}};return e.prototype.getSortIndex=function(){return si.SORTINDEX_MULTIPOLYGON},e.prototype.equalsExact=function(){if(arguments.length===2){var i=arguments[0],o=arguments[1];return this.isEquivalentClass(i)?t.prototype.equalsExact.call(this,i,o):!1}else return t.prototype.equalsExact.apply(this,arguments)},e.prototype.getBoundaryDimension=function(){return 1},e.prototype.getDimension=function(){return 2},e.prototype.reverse=function(){for(var i=this,o=this._geometries.length,a=new Array(o).fill(null),s=0;s<this._geometries.length;s++)a[s]=i._geometries[s].reverse();return this.getFactory().createMultiPolygon(a)},e.prototype.getBoundary=function(){var i=this;if(this.isEmpty())return this.getFactory().createMultiLineString();for(var o=new xn,a=0;a<this._geometries.length;a++)for(var s=i._geometries[a],l=s.getBoundary(),u=0;u<l.getNumGeometries();u++)o.add(l.getGeometryN(u));var p=new Array(o.size()).fill(null);return this.getFactory().createMultiLineString(o.toArray(p))},e.prototype.getGeometryType=function(){return"MultiPolygon"},e.prototype.copy=function(){for(var i=this,o=new Array(this._geometries.length).fill(null),a=0;a<o.length;a++)o[a]=i._geometries[a].copy();return new e(o,this._factory)},e.prototype.interfaces_=function(){return[Ny]},e.prototype.getClass=function(){return e},r.serialVersionUID.get=function(){return-551033529766975900},Object.defineProperties(e,r),e}(Ec),fd=function(e){this._factory=e||null,this._isUserDataCopied=!1},U5={NoOpGeometryOperation:{configurable:!0},CoordinateOperation:{configurable:!0},CoordinateSequenceOperation:{configurable:!0}};fd.prototype.setCopyUserData=function(e){this._isUserDataCopied=e};fd.prototype.edit=function(e,r){if(e===null)return null;var n=this.editInternal(e,r);return this._isUserDataCopied&&n.setUserData(e.getUserData()),n};fd.prototype.editInternal=function(e,r){return this._factory===null&&(this._factory=e.getFactory()),e instanceof Ec?this.editGeometryCollection(e,r):e instanceof Ka?this.editPolygon(e,r):e instanceof Du?r.edit(e,this._factory):e instanceof ra?r.edit(e,this._factory):(Ti.shouldNeverReachHere("Unsupported Geometry class: "+e.getClass().getName()),null)};fd.prototype.editGeometryCollection=function(e,r){for(var n=this,i=r.edit(e,this._factory),o=new xn,a=0;a<i.getNumGeometries();a++){var s=n.edit(i.getGeometryN(a),r);s===null||s.isEmpty()||o.add(s)}return i.getClass()===VE?this._factory.createMultiPoint(o.toArray([])):i.getClass()===o_?this._factory.createMultiLineString(o.toArray([])):i.getClass()===Um?this._factory.createMultiPolygon(o.toArray([])):this._factory.createGeometryCollection(o.toArray([]))};fd.prototype.editPolygon=function(e,r){var n=this,i=r.edit(e,this._factory);if(i===null&&(i=this._factory.createPolygon(null)),i.isEmpty())return i;var o=this.edit(i.getExteriorRing(),r);if(o===null||o.isEmpty())return this._factory.createPolygon();for(var a=new xn,s=0;s<i.getNumInteriorRing();s++){var l=n.edit(i.getInteriorRingN(s),r);l===null||l.isEmpty()||a.add(l)}return this._factory.createPolygon(o,a.toArray([]))};fd.prototype.interfaces_=function(){return[]};fd.prototype.getClass=function(){return fd};fd.GeometryEditorOperation=function(){};U5.NoOpGeometryOperation.get=function(){return sA};U5.CoordinateOperation.get=function(){return aA};U5.CoordinateSequenceOperation.get=function(){return lA};Object.defineProperties(fd,U5);var sA=function(){};sA.prototype.edit=function(e,r){return e};sA.prototype.interfaces_=function(){return[fd.GeometryEditorOperation]};sA.prototype.getClass=function(){return sA};var aA=function(){};aA.prototype.edit=function(e,r){var n=this.editCoordinates(e.getCoordinates(),e);return n===null?e:e instanceof jm?r.createLinearRing(n):e instanceof ra?r.createLineString(n):e instanceof Du?n.length>0?r.createPoint(n[0]):r.createPoint():e};aA.prototype.interfaces_=function(){return[fd.GeometryEditorOperation]};aA.prototype.getClass=function(){return aA};var lA=function(){};lA.prototype.edit=function(e,r){return e instanceof jm?r.createLinearRing(this.edit(e.getCoordinateSequence(),e)):e instanceof ra?r.createLineString(this.edit(e.getCoordinateSequence(),e)):e instanceof Du?r.createPoint(this.edit(e.getCoordinateSequence(),e)):e};lA.prototype.interfaces_=function(){return[fd.GeometryEditorOperation]};lA.prototype.getClass=function(){return lA};var va=function(){var e=this;if(this._dimension=3,this._coordinates=null,arguments.length===1){if(arguments[0]instanceof Array)this._coordinates=arguments[0],this._dimension=3;else if(Number.isInteger(arguments[0])){var r=arguments[0];this._coordinates=new Array(r).fill(null);for(var n=0;n<r;n++)e._coordinates[n]=new ar}else if(ai(arguments[0],so)){var i=arguments[0];if(i===null)return this._coordinates=new Array(0).fill(null),null;this._dimension=i.getDimension(),this._coordinates=new Array(i.size()).fill(null);for(var o=0;o<this._coordinates.length;o++)e._coordinates[o]=i.getCoordinateCopy(o)}}else if(arguments.length===2){if(arguments[0]instanceof Array&&Number.isInteger(arguments[1])){var a=arguments[0],s=arguments[1];this._coordinates=a,this._dimension=s,a===null&&(this._coordinates=new Array(0).fill(null))}else if(Number.isInteger(arguments[0])&&Number.isInteger(arguments[1])){var l=arguments[0],u=arguments[1];this._coordinates=new Array(l).fill(null),this._dimension=u;for(var p=0;p<l;p++)e._coordinates[p]=new ar}}},hhe={serialVersionUID:{configurable:!0}};va.prototype.setOrdinate=function(e,r,n){switch(r){case so.X:this._coordinates[e].x=n;break;case so.Y:this._coordinates[e].y=n;break;case so.Z:this._coordinates[e].z=n;break;default:throw new Ls}};va.prototype.size=function(){return this._coordinates.length};va.prototype.getOrdinate=function(e,r){switch(r){case so.X:return this._coordinates[e].x;case so.Y:return this._coordinates[e].y;case so.Z:return this._coordinates[e].z}return mi.NaN};va.prototype.getCoordinate=function(){if(arguments.length===1){var e=arguments[0];return this._coordinates[e]}else if(arguments.length===2){var r=arguments[0],n=arguments[1];n.x=this._coordinates[r].x,n.y=this._coordinates[r].y,n.z=this._coordinates[r].z}};va.prototype.getCoordinateCopy=function(e){return new ar(this._coordinates[e])};va.prototype.getDimension=function(){return this._dimension};va.prototype.getX=function(e){return this._coordinates[e].x};va.prototype.clone=function(){for(var e=this,r=new Array(this.size()).fill(null),n=0;n<this._coordinates.length;n++)r[n]=e._coordinates[n].clone();return new va(r,this._dimension)};va.prototype.expandEnvelope=function(e){for(var r=this,n=0;n<this._coordinates.length;n++)e.expandToInclude(r._coordinates[n]);return e};va.prototype.copy=function(){for(var e=this,r=new Array(this.size()).fill(null),n=0;n<this._coordinates.length;n++)r[n]=e._coordinates[n].copy();return new va(r,this._dimension)};va.prototype.toString=function(){var e=this;if(this._coordinates.length>0){var r=new vp(17*this._coordinates.length);r.append("("),r.append(this._coordinates[0]);for(var n=1;n<this._coordinates.length;n++)r.append(", "),r.append(e._coordinates[n]);return r.append(")"),r.toString()}else return"()"};va.prototype.getY=function(e){return this._coordinates[e].y};va.prototype.toCoordinateArray=function(){return this._coordinates};va.prototype.interfaces_=function(){return[so,ad]};va.prototype.getClass=function(){return va};hhe.serialVersionUID.get=function(){return-915438501601840600};Object.defineProperties(va,hhe);var Vm=function(){},CH={serialVersionUID:{configurable:!0},instanceObject:{configurable:!0}};Vm.prototype.readResolve=function(){return Vm.instance()};Vm.prototype.create=function(){if(arguments.length===1){if(arguments[0]instanceof Array){var e=arguments[0];return new va(e)}else if(ai(arguments[0],so)){var r=arguments[0];return new va(r)}}else if(arguments.length===2){var n=arguments[0],i=arguments[1];return i>3&&(i=3),i<2?new va(n):new va(n,i)}};Vm.prototype.interfaces_=function(){return[OE,ad]};Vm.prototype.getClass=function(){return Vm};Vm.instance=function(){return Vm.instanceObject};CH.serialVersionUID.get=function(){return-4099577099607551500};CH.instanceObject.get=function(){return new Vm};Object.defineProperties(Vm,CH);var phe=function(t){function e(){t.call(this),this.map_=new Map}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(n){return this.map_.get(n)||null},e.prototype.put=function(n,i){return this.map_.set(n,i),i},e.prototype.values=function(){for(var n=new xn,i=this.map_.values(),o=i.next();!o.done;)n.add(o.value),o=i.next();return n},e.prototype.entrySet=function(){var n=new _H;return this.map_.entries().forEach(function(i){return n.add(i)}),n},e.prototype.size=function(){return this.map_.size()},e}(Ob),Oo=function t(){if(this._modelType=null,this._scale=null,arguments.length===0)this._modelType=t.FLOATING;else if(arguments.length===1){if(arguments[0]instanceof Cp){var e=arguments[0];this._modelType=e,e===t.FIXED&&this.setScale(1)}else if(typeof arguments[0]=="number"){var r=arguments[0];this._modelType=t.FIXED,this.setScale(r)}else if(arguments[0]instanceof t){var n=arguments[0];this._modelType=n._modelType,this._scale=n._scale}}},EH={serialVersionUID:{configurable:!0},maximumPreciseValue:{configurable:!0}};Oo.prototype.equals=function(e){if(!(e instanceof Oo))return!1;var r=e;return this._modelType===r._modelType&&this._scale===r._scale};Oo.prototype.compareTo=function(e){var r=e,n=this.getMaximumSignificantDigits(),i=r.getMaximumSignificantDigits();return new yp(n).compareTo(new yp(i))};Oo.prototype.getScale=function(){return this._scale};Oo.prototype.isFloating=function(){return this._modelType===Oo.FLOATING||this._modelType===Oo.FLOATING_SINGLE};Oo.prototype.getType=function(){return this._modelType};Oo.prototype.toString=function(){var e="UNKNOWN";return this._modelType===Oo.FLOATING?e="Floating":this._modelType===Oo.FLOATING_SINGLE?e="Floating-Single":this._modelType===Oo.FIXED&&(e="Fixed (Scale="+this.getScale()+")"),e};Oo.prototype.makePrecise=function(){if(typeof arguments[0]=="number"){var e=arguments[0];if(mi.isNaN(e))return e;if(this._modelType===Oo.FLOATING_SINGLE){var r=e;return r}return this._modelType===Oo.FIXED?Math.round(e*this._scale)/this._scale:e}else if(arguments[0]instanceof ar){var n=arguments[0];if(this._modelType===Oo.FLOATING)return null;n.x=this.makePrecise(n.x),n.y=this.makePrecise(n.y)}};Oo.prototype.getMaximumSignificantDigits=function(){var e=16;return this._modelType===Oo.FLOATING?e=16:this._modelType===Oo.FLOATING_SINGLE?e=6:this._modelType===Oo.FIXED&&(e=1+Math.trunc(Math.ceil(Math.log(this.getScale())/Math.log(10)))),e};Oo.prototype.setScale=function(e){this._scale=Math.abs(e)};Oo.prototype.interfaces_=function(){return[ad,sd]};Oo.prototype.getClass=function(){return Oo};Oo.mostPrecise=function(e,r){return e.compareTo(r)>=0?e:r};EH.serialVersionUID.get=function(){return 7777263578777804e3};EH.maximumPreciseValue.get=function(){return 9007199254740992};Object.defineProperties(Oo,EH);var Cp=function t(e){this._name=e||null,t.nameToTypeMap.put(e,this)},SH={serialVersionUID:{configurable:!0},nameToTypeMap:{configurable:!0}};Cp.prototype.readResolve=function(){return Cp.nameToTypeMap.get(this._name)};Cp.prototype.toString=function(){return this._name};Cp.prototype.interfaces_=function(){return[ad]};Cp.prototype.getClass=function(){return Cp};SH.serialVersionUID.get=function(){return-552860263173159e4};SH.nameToTypeMap.get=function(){return new phe};Object.defineProperties(Cp,SH);Oo.Type=Cp;Oo.FIXED=new Cp("FIXED");Oo.FLOATING=new Cp("FLOATING");Oo.FLOATING_SINGLE=new Cp("FLOATING SINGLE");var Yi=function t(){this._precisionModel=new Oo,this._SRID=0,this._coordinateSequenceFactory=t.getDefaultCoordinateSequenceFactory(),arguments.length===0||(arguments.length===1?ai(arguments[0],OE)?this._coordinateSequenceFactory=arguments[0]:arguments[0]instanceof Oo&&(this._precisionModel=arguments[0]):arguments.length===2?(this._precisionModel=arguments[0],this._SRID=arguments[1]):arguments.length===3&&(this._precisionModel=arguments[0],this._SRID=arguments[1],this._coordinateSequenceFactory=arguments[2]))},mhe={serialVersionUID:{configurable:!0}};Yi.prototype.toGeometry=function(e){return e.isNull()?this.createPoint(null):e.getMinX()===e.getMaxX()&&e.getMinY()===e.getMaxY()?this.createPoint(new ar(e.getMinX(),e.getMinY())):e.getMinX()===e.getMaxX()||e.getMinY()===e.getMaxY()?this.createLineString([new ar(e.getMinX(),e.getMinY()),new ar(e.getMaxX(),e.getMaxY())]):this.createPolygon(this.createLinearRing([new ar(e.getMinX(),e.getMinY()),new ar(e.getMinX(),e.getMaxY()),new ar(e.getMaxX(),e.getMaxY()),new ar(e.getMaxX(),e.getMinY()),new ar(e.getMinX(),e.getMinY())]),null)};Yi.prototype.createLineString=function(e){if(e){if(e instanceof Array)return new ra(this.getCoordinateSequenceFactory().create(e),this);if(ai(e,so))return new ra(e,this)}else return new ra(this.getCoordinateSequenceFactory().create([]),this)};Yi.prototype.createMultiLineString=function(){if(arguments.length===0)return new o_(null,this);if(arguments.length===1){var e=arguments[0];return new o_(e,this)}};Yi.prototype.buildGeometry=function(e){for(var r=null,n=!1,i=!1,o=e.iterator();o.hasNext();){var a=o.next(),s=a.getClass();r===null&&(r=s),s!==r&&(n=!0),a.isGeometryCollectionOrDerived()&&(i=!0)}if(r===null)return this.createGeometryCollection();if(n||i)return this.createGeometryCollection(Yi.toGeometryArray(e));var l=e.iterator().next(),u=e.size()>1;if(u){if(l instanceof Ka)return this.createMultiPolygon(Yi.toPolygonArray(e));if(l instanceof ra)return this.createMultiLineString(Yi.toLineStringArray(e));if(l instanceof Du)return this.createMultiPoint(Yi.toPointArray(e));Ti.shouldNeverReachHere("Unhandled class: "+l.getClass().getName())}return l};Yi.prototype.createMultiPointFromCoords=function(e){return this.createMultiPoint(e!==null?this.getCoordinateSequenceFactory().create(e):null)};Yi.prototype.createPoint=function(){if(arguments.length===0)return this.createPoint(this.getCoordinateSequenceFactory().create([]));if(arguments.length===1){if(arguments[0]instanceof ar){var e=arguments[0];return this.createPoint(e!==null?this.getCoordinateSequenceFactory().create([e]):null)}else if(ai(arguments[0],so)){var r=arguments[0];return new Du(r,this)}}};Yi.prototype.getCoordinateSequenceFactory=function(){return this._coordinateSequenceFactory};Yi.prototype.createPolygon=function(){if(arguments.length===0)return new Ka(null,null,this);if(arguments.length===1){if(ai(arguments[0],so)){var e=arguments[0];return this.createPolygon(this.createLinearRing(e))}else if(arguments[0]instanceof Array){var r=arguments[0];return this.createPolygon(this.createLinearRing(r))}else if(arguments[0]instanceof jm){var n=arguments[0];return this.createPolygon(n,null)}}else if(arguments.length===2){var i=arguments[0],o=arguments[1];return new Ka(i,o,this)}};Yi.prototype.getSRID=function(){return this._SRID};Yi.prototype.createGeometryCollection=function(){if(arguments.length===0)return new Ec(null,this);if(arguments.length===1){var e=arguments[0];return new Ec(e,this)}};Yi.prototype.createGeometry=function(e){var r=new fd(this);return r.edit(e,{edit:function(){if(arguments.length===2){var n=arguments[0];return this._coordinateSequenceFactory.create(n)}}})};Yi.prototype.getPrecisionModel=function(){return this._precisionModel};Yi.prototype.createLinearRing=function(){if(arguments.length===0)return this.createLinearRing(this.getCoordinateSequenceFactory().create([]));if(arguments.length===1){if(arguments[0]instanceof Array){var e=arguments[0];return this.createLinearRing(e!==null?this.getCoordinateSequenceFactory().create(e):null)}else if(ai(arguments[0],so)){var r=arguments[0];return new jm(r,this)}}};Yi.prototype.createMultiPolygon=function(){if(arguments.length===0)return new Um(null,this);if(arguments.length===1){var e=arguments[0];return new Um(e,this)}};Yi.prototype.createMultiPoint=function(){var e=this;if(arguments.length===0)return new VE(null,this);if(arguments.length===1){if(arguments[0]instanceof Array){var r=arguments[0];return new VE(r,this)}else if(arguments[0]instanceof Array){var n=arguments[0];return this.createMultiPoint(n!==null?this.getCoordinateSequenceFactory().create(n):null)}else if(ai(arguments[0],so)){var i=arguments[0];if(i===null)return this.createMultiPoint(new Array(0).fill(null));for(var o=new Array(i.size()).fill(null),a=0;a<i.size();a++){var s=e.getCoordinateSequenceFactory().create(1,i.getDimension());ga.copy(i,a,s,0,1),o[a]=e.createPoint(s)}return this.createMultiPoint(o)}}};Yi.prototype.interfaces_=function(){return[ad]};Yi.prototype.getClass=function(){return Yi};Yi.toMultiPolygonArray=function(e){var r=new Array(e.size()).fill(null);return e.toArray(r)};Yi.toGeometryArray=function(e){if(e===null)return null;var r=new Array(e.size()).fill(null);return e.toArray(r)};Yi.getDefaultCoordinateSequenceFactory=function(){return Vm.instance()};Yi.toMultiLineStringArray=function(e){var r=new Array(e.size()).fill(null);return e.toArray(r)};Yi.toLineStringArray=function(e){var r=new Array(e.size()).fill(null);return e.toArray(r)};Yi.toMultiPointArray=function(e){var r=new Array(e.size()).fill(null);return e.toArray(r)};Yi.toLinearRingArray=function(e){var r=new Array(e.size()).fill(null);return e.toArray(r)};Yi.toPointArray=function(e){var r=new Array(e.size()).fill(null);return e.toArray(r)};Yi.toPolygonArray=function(e){var r=new Array(e.size()).fill(null);return e.toArray(r)};Yi.createPointFromInternalCoord=function(e,r){return r.getPrecisionModel().makePrecise(e),r.getFactory().createPoint(e)};mhe.serialVersionUID.get=function(){return-6820524753094096e3};Object.defineProperties(Yi,mhe);var cn=function(){},V5={ON:{configurable:!0},LEFT:{configurable:!0},RIGHT:{configurable:!0}};cn.prototype.interfaces_=function(){return[]};cn.prototype.getClass=function(){return cn};cn.opposite=function(e){return e===cn.LEFT?cn.RIGHT:e===cn.RIGHT?cn.LEFT:e};V5.ON.get=function(){return 0};V5.LEFT.get=function(){return 1};V5.RIGHT.get=function(){return 2};Object.defineProperties(cn,V5);function H5(t){this.message=t||""}H5.prototype=new Error;H5.prototype.name="EmptyStackException";function Ep(){this.array_=[]}Ep.prototype=new ch;Ep.prototype.add=function(t){return this.array_.push(t),!0};Ep.prototype.get=function(t){if(t<0||t>=this.size())throw new Error;return this.array_[t]};Ep.prototype.push=function(t){return this.array_.push(t),t};Ep.prototype.pop=function(t){if(this.array_.length===0)throw new H5;return this.array_.pop()};Ep.prototype.peek=function(){if(this.array_.length===0)throw new H5;return this.array_[this.array_.length-1]};Ep.prototype.empty=function(){return this.array_.length===0};Ep.prototype.isEmpty=function(){return this.empty()};Ep.prototype.search=function(t){return this.array_.indexOf(t)};Ep.prototype.size=function(){return this.array_.length};Ep.prototype.toArray=function(){for(var t=this,e=[],r=0,n=this.array_.length;r<n;r++)e.push(t.array_[r]);return e};var Sp=function(){this._minIndex=-1,this._minCoord=null,this._minDe=null,this._orientedDe=null};Sp.prototype.getCoordinate=function(){return this._minCoord};Sp.prototype.getRightmostSide=function(e,r){var n=this.getRightmostSideOfSegment(e,r);return n<0&&(n=this.getRightmostSideOfSegment(e,r-1)),n<0&&(this._minCoord=null,this.checkForRightmostCoordinate(e)),n};Sp.prototype.findRightmostEdgeAtVertex=function(){var e=this._minDe.getEdge().getCoordinates();Ti.isTrue(this._minIndex>0&&this._minIndex<e.length,"rightmost point expected to be interior vertex of edge");var r=e[this._minIndex-1],n=e[this._minIndex+1],i=En.computeOrientation(this._minCoord,n,r),o=!1;(r.y<this._minCoord.y&&n.y<this._minCoord.y&&i===En.COUNTERCLOCKWISE||r.y>this._minCoord.y&&n.y>this._minCoord.y&&i===En.CLOCKWISE)&&(o=!0),o&&(this._minIndex=this._minIndex-1)};Sp.prototype.getRightmostSideOfSegment=function(e,r){var n=e.getEdge(),i=n.getCoordinates();if(r<0||r+1>=i.length||i[r].y===i[r+1].y)return-1;var o=cn.LEFT;return i[r].y<i[r+1].y&&(o=cn.RIGHT),o};Sp.prototype.getEdge=function(){return this._orientedDe};Sp.prototype.checkForRightmostCoordinate=function(e){for(var r=this,n=e.getEdge().getCoordinates(),i=0;i<n.length-1;i++)(r._minCoord===null||n[i].x>r._minCoord.x)&&(r._minDe=e,r._minIndex=i,r._minCoord=n[i])};Sp.prototype.findRightmostEdgeAtNode=function(){var e=this._minDe.getNode(),r=e.getEdges();this._minDe=r.getRightmostEdge(),this._minDe.isForward()||(this._minDe=this._minDe.getSym(),this._minIndex=this._minDe.getEdge().getCoordinates().length-1)};Sp.prototype.findEdge=function(e){for(var r=this,n=e.iterator();n.hasNext();){var i=n.next();!i.isForward()||r.checkForRightmostCoordinate(i)}Ti.isTrue(this._minIndex!==0||this._minCoord.equals(this._minDe.getCoordinate()),"inconsistency in rightmost processing"),this._minIndex===0?this.findRightmostEdgeAtNode():this.findRightmostEdgeAtVertex(),this._orientedDe=this._minDe;var o=this.getRightmostSide(this._minDe,this._minIndex);o===cn.LEFT&&(this._orientedDe=this._minDe.getSym())};Sp.prototype.interfaces_=function(){return[]};Sp.prototype.getClass=function(){return Sp};var hv=function(t){function e(r,n){t.call(this,e.msgWithCoord(r,n)),this.pt=n?new ar(n):null,this.name="TopologyException"}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getCoordinate=function(){return this.pt},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e.msgWithCoord=function(n,i){return i?n:n+" [ "+i+" ]"},e}(lv),W5=function(){this.array_=[]};W5.prototype.addLast=function(e){this.array_.push(e)};W5.prototype.removeFirst=function(){return this.array_.shift()};W5.prototype.isEmpty=function(){return this.array_.length===0};var Sc=function(){this._finder=null,this._dirEdgeList=new xn,this._nodes=new xn,this._rightMostCoord=null,this._env=null,this._finder=new Sp};Sc.prototype.clearVisitedEdges=function(){for(var e=this._dirEdgeList.iterator();e.hasNext();){var r=e.next();r.setVisited(!1)}};Sc.prototype.getRightmostCoordinate=function(){return this._rightMostCoord};Sc.prototype.computeNodeDepth=function(e){for(var r=this,n=null,i=e.getEdges().iterator();i.hasNext();){var o=i.next();if(o.isVisited()||o.getSym().isVisited()){n=o;break}}if(n===null)throw new hv("unable to find edge to compute depths at "+e.getCoordinate());e.getEdges().computeDepths(n);for(var a=e.getEdges().iterator();a.hasNext();){var s=a.next();s.setVisited(!0),r.copySymDepths(s)}};Sc.prototype.computeDepth=function(e){this.clearVisitedEdges();var r=this._finder.getEdge();r.setEdgeDepths(cn.RIGHT,e),this.copySymDepths(r),this.computeDepths(r)};Sc.prototype.create=function(e){this.addReachable(e),this._finder.findEdge(this._dirEdgeList),this._rightMostCoord=this._finder.getCoordinate()};Sc.prototype.findResultEdges=function(){for(var e=this._dirEdgeList.iterator();e.hasNext();){var r=e.next();r.getDepth(cn.RIGHT)>=1&&r.getDepth(cn.LEFT)<=0&&!r.isInteriorAreaEdge()&&r.setInResult(!0)}};Sc.prototype.computeDepths=function(e){var r=this,n=new _H,i=new W5,o=e.getNode();for(i.addLast(o),n.add(o),e.setVisited(!0);!i.isEmpty();){var a=i.removeFirst();n.add(a),r.computeNodeDepth(a);for(var s=a.getEdges().iterator();s.hasNext();){var l=s.next(),u=l.getSym();if(!u.isVisited()){var p=u.getNode();n.contains(p)||(i.addLast(p),n.add(p))}}}};Sc.prototype.compareTo=function(e){var r=e;return this._rightMostCoord.x<r._rightMostCoord.x?-1:this._rightMostCoord.x>r._rightMostCoord.x?1:0};Sc.prototype.getEnvelope=function(){if(this._env===null){for(var e=new Un,r=this._dirEdgeList.iterator();r.hasNext();)for(var n=r.next(),i=n.getEdge().getCoordinates(),o=0;o<i.length-1;o++)e.expandToInclude(i[o]);this._env=e}return this._env};Sc.prototype.addReachable=function(e){var r=this,n=new Ep;for(n.add(e);!n.empty();){var i=n.pop();r.add(i,n)}};Sc.prototype.copySymDepths=function(e){var r=e.getSym();r.setDepth(cn.LEFT,e.getDepth(cn.RIGHT)),r.setDepth(cn.RIGHT,e.getDepth(cn.LEFT))};Sc.prototype.add=function(e,r){var n=this;e.setVisited(!0),this._nodes.add(e);for(var i=e.getEdges().iterator();i.hasNext();){var o=i.next();n._dirEdgeList.add(o);var a=o.getSym(),s=a.getNode();s.isVisited()||r.push(s)}};Sc.prototype.getNodes=function(){return this._nodes};Sc.prototype.getDirectedEdges=function(){return this._dirEdgeList};Sc.prototype.interfaces_=function(){return[sd]};Sc.prototype.getClass=function(){return Sc};var ms=function t(){var e=this;if(this.location=null,arguments.length===1){if(arguments[0]instanceof Array){var r=arguments[0];this.init(r.length)}else if(Number.isInteger(arguments[0])){var n=arguments[0];this.init(1),this.location[cn.ON]=n}else if(arguments[0]instanceof t){var i=arguments[0];if(this.init(i.location.length),i!==null)for(var o=0;o<this.location.length;o++)e.location[o]=i.location[o]}}else if(arguments.length===3){var a=arguments[0],s=arguments[1],l=arguments[2];this.init(3),this.location[cn.ON]=a,this.location[cn.LEFT]=s,this.location[cn.RIGHT]=l}};ms.prototype.setAllLocations=function(e){for(var r=this,n=0;n<this.location.length;n++)r.location[n]=e};ms.prototype.isNull=function(){for(var e=this,r=0;r<this.location.length;r++)if(e.location[r]!==ur.NONE)return!1;return!0};ms.prototype.setAllLocationsIfNull=function(e){for(var r=this,n=0;n<this.location.length;n++)r.location[n]===ur.NONE&&(r.location[n]=e)};ms.prototype.isLine=function(){return this.location.length===1};ms.prototype.merge=function(e){var r=this;if(e.location.length>this.location.length){var n=new Array(3).fill(null);n[cn.ON]=this.location[cn.ON],n[cn.LEFT]=ur.NONE,n[cn.RIGHT]=ur.NONE,this.location=n}for(var i=0;i<this.location.length;i++)r.location[i]===ur.NONE&&i<e.location.length&&(r.location[i]=e.location[i])};ms.prototype.getLocations=function(){return this.location};ms.prototype.flip=function(){if(this.location.length<=1)return null;var e=this.location[cn.LEFT];this.location[cn.LEFT]=this.location[cn.RIGHT],this.location[cn.RIGHT]=e};ms.prototype.toString=function(){var e=new vp;return this.location.length>1&&e.append(ur.toLocationSymbol(this.location[cn.LEFT])),e.append(ur.toLocationSymbol(this.location[cn.ON])),this.location.length>1&&e.append(ur.toLocationSymbol(this.location[cn.RIGHT])),e.toString()};ms.prototype.setLocations=function(e,r,n){this.location[cn.ON]=e,this.location[cn.LEFT]=r,this.location[cn.RIGHT]=n};ms.prototype.get=function(e){return e<this.location.length?this.location[e]:ur.NONE};ms.prototype.isArea=function(){return this.location.length>1};ms.prototype.isAnyNull=function(){for(var e=this,r=0;r<this.location.length;r++)if(e.location[r]===ur.NONE)return!0;return!1};ms.prototype.setLocation=function(){if(arguments.length===1){var e=arguments[0];this.setLocation(cn.ON,e)}else if(arguments.length===2){var r=arguments[0],n=arguments[1];this.location[r]=n}};ms.prototype.init=function(e){this.location=new Array(e).fill(null),this.setAllLocations(ur.NONE)};ms.prototype.isEqualOnSide=function(e,r){return this.location[r]===e.location[r]};ms.prototype.allPositionsEqual=function(e){for(var r=this,n=0;n<this.location.length;n++)if(r.location[n]!==e)return!1;return!0};ms.prototype.interfaces_=function(){return[]};ms.prototype.getClass=function(){return ms};var Bo=function t(){if(this.elt=new Array(2).fill(null),arguments.length===1){if(Number.isInteger(arguments[0])){var e=arguments[0];this.elt[0]=new ms(e),this.elt[1]=new ms(e)}else if(arguments[0]instanceof t){var r=arguments[0];this.elt[0]=new ms(r.elt[0]),this.elt[1]=new ms(r.elt[1])}}else if(arguments.length===2){var n=arguments[0],i=arguments[1];this.elt[0]=new ms(ur.NONE),this.elt[1]=new ms(ur.NONE),this.elt[n].setLocation(i)}else if(arguments.length===3){var o=arguments[0],a=arguments[1],s=arguments[2];this.elt[0]=new ms(o,a,s),this.elt[1]=new ms(o,a,s)}else if(arguments.length===4){var l=arguments[0],u=arguments[1],p=arguments[2],m=arguments[3];this.elt[0]=new ms(ur.NONE,ur.NONE,ur.NONE),this.elt[1]=new ms(ur.NONE,ur.NONE,ur.NONE),this.elt[l].setLocations(u,p,m)}};Bo.prototype.getGeometryCount=function(){var e=0;return this.elt[0].isNull()||e++,this.elt[1].isNull()||e++,e};Bo.prototype.setAllLocations=function(e,r){this.elt[e].setAllLocations(r)};Bo.prototype.isNull=function(e){return this.elt[e].isNull()};Bo.prototype.setAllLocationsIfNull=function(){if(arguments.length===1){var e=arguments[0];this.setAllLocationsIfNull(0,e),this.setAllLocationsIfNull(1,e)}else if(arguments.length===2){var r=arguments[0],n=arguments[1];this.elt[r].setAllLocationsIfNull(n)}};Bo.prototype.isLine=function(e){return this.elt[e].isLine()};Bo.prototype.merge=function(e){for(var r=this,n=0;n<2;n++)r.elt[n]===null&&e.elt[n]!==null?r.elt[n]=new ms(e.elt[n]):r.elt[n].merge(e.elt[n])};Bo.prototype.flip=function(){this.elt[0].flip(),this.elt[1].flip()};Bo.prototype.getLocation=function(){if(arguments.length===1){var e=arguments[0];return this.elt[e].get(cn.ON)}else if(arguments.length===2){var r=arguments[0],n=arguments[1];return this.elt[r].get(n)}};Bo.prototype.toString=function(){var e=new vp;return this.elt[0]!==null&&(e.append("A:"),e.append(this.elt[0].toString())),this.elt[1]!==null&&(e.append(" B:"),e.append(this.elt[1].toString())),e.toString()};Bo.prototype.isArea=function(){if(arguments.length===0)return this.elt[0].isArea()||this.elt[1].isArea();if(arguments.length===1){var e=arguments[0];return this.elt[e].isArea()}};Bo.prototype.isAnyNull=function(e){return this.elt[e].isAnyNull()};Bo.prototype.setLocation=function(){if(arguments.length===2){var e=arguments[0],r=arguments[1];this.elt[e].setLocation(cn.ON,r)}else if(arguments.length===3){var n=arguments[0],i=arguments[1],o=arguments[2];this.elt[n].setLocation(i,o)}};Bo.prototype.isEqualOnSide=function(e,r){return this.elt[0].isEqualOnSide(e.elt[0],r)&&this.elt[1].isEqualOnSide(e.elt[1],r)};Bo.prototype.allPositionsEqual=function(e,r){return this.elt[e].allPositionsEqual(r)};Bo.prototype.toLine=function(e){this.elt[e].isArea()&&(this.elt[e]=new ms(this.elt[e].location[0]))};Bo.prototype.interfaces_=function(){return[]};Bo.prototype.getClass=function(){return Bo};Bo.toLineLabel=function(e){for(var r=new Bo(ur.NONE),n=0;n<2;n++)r.setLocation(n,e.getLocation(n));return r};var Da=function(){this._startDe=null,this._maxNodeDegree=-1,this._edges=new xn,this._pts=new xn,this._label=new Bo(ur.NONE),this._ring=null,this._isHole=null,this._shell=null,this._holes=new xn,this._geometryFactory=null;var e=arguments[0],r=arguments[1];this._geometryFactory=r,this.computePoints(e),this.computeRing()};Da.prototype.computeRing=function(){var e=this;if(this._ring!==null)return null;for(var r=new Array(this._pts.size()).fill(null),n=0;n<this._pts.size();n++)r[n]=e._pts.get(n);this._ring=this._geometryFactory.createLinearRing(r),this._isHole=En.isCCW(this._ring.getCoordinates())};Da.prototype.isIsolated=function(){return this._label.getGeometryCount()===1};Da.prototype.computePoints=function(e){var r=this;this._startDe=e;var n=e,i=!0;do{if(n===null)throw new hv("Found null DirectedEdge");if(n.getEdgeRing()===r)throw new hv("Directed Edge visited twice during ring-building at "+n.getCoordinate());r._edges.add(n);var o=n.getLabel();Ti.isTrue(o.isArea()),r.mergeLabel(o),r.addPoints(n.getEdge(),n.isForward(),i),i=!1,r.setEdgeRing(n,r),n=r.getNext(n)}while(n!==this._startDe)};Da.prototype.getLinearRing=function(){return this._ring};Da.prototype.getCoordinate=function(e){return this._pts.get(e)};Da.prototype.computeMaxNodeDegree=function(){var e=this;this._maxNodeDegree=0;var r=this._startDe;do{var n=r.getNode(),i=n.getEdges().getOutgoingDegree(e);i>e._maxNodeDegree&&(e._maxNodeDegree=i),r=e.getNext(r)}while(r!==this._startDe);this._maxNodeDegree*=2};Da.prototype.addPoints=function(e,r,n){var i=this,o=e.getCoordinates();if(r){var a=1;n&&(a=0);for(var s=a;s<o.length;s++)i._pts.add(o[s])}else{var l=o.length-2;n&&(l=o.length-1);for(var u=l;u>=0;u--)i._pts.add(o[u])}};Da.prototype.isHole=function(){return this._isHole};Da.prototype.setInResult=function(){var e=this._startDe;do e.getEdge().setInResult(!0),e=e.getNext();while(e!==this._startDe)};Da.prototype.containsPoint=function(e){var r=this.getLinearRing(),n=r.getEnvelopeInternal();if(!n.contains(e)||!En.isPointInRing(e,r.getCoordinates()))return!1;for(var i=this._holes.iterator();i.hasNext();){var o=i.next();if(o.containsPoint(e))return!1}return!0};Da.prototype.addHole=function(e){this._holes.add(e)};Da.prototype.isShell=function(){return this._shell===null};Da.prototype.getLabel=function(){return this._label};Da.prototype.getEdges=function(){return this._edges};Da.prototype.getMaxNodeDegree=function(){return this._maxNodeDegree<0&&this.computeMaxNodeDegree(),this._maxNodeDegree};Da.prototype.getShell=function(){return this._shell};Da.prototype.mergeLabel=function(){if(arguments.length===1){var e=arguments[0];this.mergeLabel(e,0),this.mergeLabel(e,1)}else if(arguments.length===2){var r=arguments[0],n=arguments[1],i=r.getLocation(n,cn.RIGHT);if(i===ur.NONE)return null;if(this._label.getLocation(n)===ur.NONE)return this._label.setLocation(n,i),null}};Da.prototype.setShell=function(e){this._shell=e,e!==null&&e.addHole(this)};Da.prototype.toPolygon=function(e){for(var r=this,n=new Array(this._holes.size()).fill(null),i=0;i<this._holes.size();i++)n[i]=r._holes.get(i).getLinearRing();var o=e.createPolygon(this.getLinearRing(),n);return o};Da.prototype.interfaces_=function(){return[]};Da.prototype.getClass=function(){return Da};var Fxt=function(t){function e(){var r=arguments[0],n=arguments[1];t.call(this,r,n)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setEdgeRing=function(n,i){n.setMinEdgeRing(i)},e.prototype.getNext=function(n){return n.getNextMin()},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Da),zxt=function(t){function e(){var r=arguments[0],n=arguments[1];t.call(this,r,n)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.buildMinimalRings=function(){var n=this,i=new xn,o=this._startDe;do{if(o.getMinEdgeRing()===null){var a=new Fxt(o,n._geometryFactory);i.add(a)}o=o.getNext()}while(o!==this._startDe);return i},e.prototype.setEdgeRing=function(n,i){n.setEdgeRing(i)},e.prototype.linkDirectedEdgesForMinimalEdgeRings=function(){var n=this,i=this._startDe;do{var o=i.getNode();o.getEdges().linkMinimalDirectedEdges(n),i=i.getNext()}while(i!==this._startDe)},e.prototype.getNext=function(n){return n.getNext()},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Da),ff=function(){if(this._label=null,this._isInResult=!1,this._isCovered=!1,this._isCoveredSet=!1,this._isVisited=!1,arguments.length!==0){if(arguments.length===1){var e=arguments[0];this._label=e}}};ff.prototype.setVisited=function(e){this._isVisited=e};ff.prototype.setInResult=function(e){this._isInResult=e};ff.prototype.isCovered=function(){return this._isCovered};ff.prototype.isCoveredSet=function(){return this._isCoveredSet};ff.prototype.setLabel=function(e){this._label=e};ff.prototype.getLabel=function(){return this._label};ff.prototype.setCovered=function(e){this._isCovered=e,this._isCoveredSet=!0};ff.prototype.updateIM=function(e){Ti.isTrue(this._label.getGeometryCount()>=2,"found partial label"),this.computeIM(e)};ff.prototype.isInResult=function(){return this._isInResult};ff.prototype.isVisited=function(){return this._isVisited};ff.prototype.interfaces_=function(){return[]};ff.prototype.getClass=function(){return ff};var G5=function(t){function e(){t.call(this),this._coord=null,this._edges=null;var r=arguments[0],n=arguments[1];this._coord=r,this._edges=n,this._label=new Bo(0,ur.NONE)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.isIncidentEdgeInResult=function(){for(var n=this.getEdges().getEdges().iterator();n.hasNext();){var i=n.next();if(i.getEdge().isInResult())return!0}return!1},e.prototype.isIsolated=function(){return this._label.getGeometryCount()===1},e.prototype.getCoordinate=function(){return this._coord},e.prototype.print=function(n){n.println("node "+this._coord+" lbl: "+this._label)},e.prototype.computeIM=function(n){},e.prototype.computeMergedLocation=function(n,i){var o=ur.NONE;if(o=this._label.getLocation(i),!n.isNull(i)){var a=n.getLocation(i);o!==ur.BOUNDARY&&(o=a)}return o},e.prototype.setLabel=function(){if(arguments.length===2){var n=arguments[0],i=arguments[1];this._label===null?this._label=new Bo(n,i):this._label.setLocation(n,i)}else return t.prototype.setLabel.apply(this,arguments)},e.prototype.getEdges=function(){return this._edges},e.prototype.mergeLabel=function(){var n=this;if(arguments[0]instanceof e){var i=arguments[0];this.mergeLabel(i._label)}else if(arguments[0]instanceof Bo)for(var o=arguments[0],a=0;a<2;a++){var s=n.computeMergedLocation(o,a),l=n._label.getLocation(a);l===ur.NONE&&n._label.setLocation(a,s)}},e.prototype.add=function(n){this._edges.insert(n),n.setNode(this)},e.prototype.setLabelBoundary=function(n){if(this._label===null)return null;var i=ur.NONE;this._label!==null&&(i=this._label.getLocation(n));var o=null;switch(i){case ur.BOUNDARY:o=ur.INTERIOR;break;case ur.INTERIOR:o=ur.BOUNDARY;break;default:o=ur.BOUNDARY;break}this._label.setLocation(n,o)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(ff),Tp=function(){this.nodeMap=new tc,this.nodeFact=null;var e=arguments[0];this.nodeFact=e};Tp.prototype.find=function(e){return this.nodeMap.get(e)};Tp.prototype.addNode=function(){if(arguments[0]instanceof ar){var e=arguments[0],r=this.nodeMap.get(e);return r===null&&(r=this.nodeFact.createNode(e),this.nodeMap.put(e,r)),r}else if(arguments[0]instanceof G5){var n=arguments[0],i=this.nodeMap.get(n.getCoordinate());return i===null?(this.nodeMap.put(n.getCoordinate(),n),n):(i.mergeLabel(n),i)}};Tp.prototype.print=function(e){for(var r=this.iterator();r.hasNext();){var n=r.next();n.print(e)}};Tp.prototype.iterator=function(){return this.nodeMap.values().iterator()};Tp.prototype.values=function(){return this.nodeMap.values()};Tp.prototype.getBoundaryNodes=function(e){for(var r=new xn,n=this.iterator();n.hasNext();){var i=n.next();i.getLabel().getLocation(e)===ur.BOUNDARY&&r.add(i)}return r};Tp.prototype.add=function(e){var r=e.getCoordinate(),n=this.addNode(r);n.add(e)};Tp.prototype.interfaces_=function(){return[]};Tp.prototype.getClass=function(){return Tp};var Jo=function(){},cA={NE:{configurable:!0},NW:{configurable:!0},SW:{configurable:!0},SE:{configurable:!0}};Jo.prototype.interfaces_=function(){return[]};Jo.prototype.getClass=function(){return Jo};Jo.isNorthern=function(e){return e===Jo.NE||e===Jo.NW};Jo.isOpposite=function(e,r){if(e===r)return!1;var n=(e-r+4)%4;return n===2};Jo.commonHalfPlane=function(e,r){if(e===r)return e;var n=(e-r+4)%4;if(n===2)return-1;var i=e<r?e:r,o=e>r?e:r;return i===0&&o===3?3:i};Jo.isInHalfPlane=function(e,r){return r===Jo.SE?e===Jo.SE||e===Jo.SW:e===r||e===r+1};Jo.quadrant=function(){if(typeof arguments[0]=="number"&&typeof arguments[1]=="number"){var e=arguments[0],r=arguments[1];if(e===0&&r===0)throw new Ls;return e>=0?r>=0?Jo.NE:Jo.SE:r>=0?Jo.NW:Jo.SW}else if(arguments[0]instanceof ar&&arguments[1]instanceof ar){var n=arguments[0],i=arguments[1];if(i.x===n.x&&i.y===n.y)throw new Ls;return i.x>=n.x?i.y>=n.y?Jo.NE:Jo.SE:i.y>=n.y?Jo.NW:Jo.SW}};cA.NE.get=function(){return 0};cA.NW.get=function(){return 1};cA.SW.get=function(){return 2};cA.SE.get=function(){return 3};Object.defineProperties(Jo,cA);var rc=function(){if(this._edge=null,this._label=null,this._node=null,this._p0=null,this._p1=null,this._dx=null,this._dy=null,this._quadrant=null,arguments.length===1){var e=arguments[0];this._edge=e}else if(arguments.length===3){var r=arguments[0],n=arguments[1],i=arguments[2],o=null;this._edge=r,this.init(n,i),this._label=o}else if(arguments.length===4){var a=arguments[0],s=arguments[1],l=arguments[2],u=arguments[3];this._edge=a,this.init(s,l),this._label=u}};rc.prototype.compareDirection=function(e){return this._dx===e._dx&&this._dy===e._dy?0:this._quadrant>e._quadrant?1:this._quadrant<e._quadrant?-1:En.computeOrientation(e._p0,e._p1,this._p1)};rc.prototype.getDy=function(){return this._dy};rc.prototype.getCoordinate=function(){return this._p0};rc.prototype.setNode=function(e){this._node=e};rc.prototype.print=function(e){var r=Math.atan2(this._dy,this._dx),n=this.getClass().getName(),i=n.lastIndexOf("."),o=n.substring(i+1);e.print(" "+o+": "+this._p0+" - "+this._p1+" "+this._quadrant+":"+r+" "+this._label)};rc.prototype.compareTo=function(e){var r=e;return this.compareDirection(r)};rc.prototype.getDirectedCoordinate=function(){return this._p1};rc.prototype.getDx=function(){return this._dx};rc.prototype.getLabel=function(){return this._label};rc.prototype.getEdge=function(){return this._edge};rc.prototype.getQuadrant=function(){return this._quadrant};rc.prototype.getNode=function(){return this._node};rc.prototype.toString=function(){var e=Math.atan2(this._dy,this._dx),r=this.getClass().getName(),n=r.lastIndexOf("."),i=r.substring(n+1);return" "+i+": "+this._p0+" - "+this._p1+" "+this._quadrant+":"+e+" "+this._label};rc.prototype.computeLabel=function(e){};rc.prototype.init=function(e,r){this._p0=e,this._p1=r,this._dx=r.x-e.x,this._dy=r.y-e.y,this._quadrant=Jo.quadrant(this._dx,this._dy),Ti.isTrue(!(this._dx===0&&this._dy===0),"EdgeEnd with identical endpoints found")};rc.prototype.interfaces_=function(){return[sd]};rc.prototype.getClass=function(){return rc};var TH=function(t){function e(){var r=arguments[0],n=arguments[1];if(t.call(this,r),this._isForward=null,this._isInResult=!1,this._isVisited=!1,this._sym=null,this._next=null,this._nextMin=null,this._edgeRing=null,this._minEdgeRing=null,this._depth=[0,-999,-999],this._isForward=n,n)this.init(r.getCoordinate(0),r.getCoordinate(1));else{var i=r.getNumPoints()-1;this.init(r.getCoordinate(i),r.getCoordinate(i-1))}this.computeDirectedLabel()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getNextMin=function(){return this._nextMin},e.prototype.getDepth=function(n){return this._depth[n]},e.prototype.setVisited=function(n){this._isVisited=n},e.prototype.computeDirectedLabel=function(){this._label=new Bo(this._edge.getLabel()),this._isForward||this._label.flip()},e.prototype.getNext=function(){return this._next},e.prototype.setDepth=function(n,i){if(this._depth[n]!==-999&&this._depth[n]!==i)throw new hv("assigned depths do not match",this.getCoordinate());this._depth[n]=i},e.prototype.isInteriorAreaEdge=function(){for(var n=this,i=!0,o=0;o<2;o++)n._label.isArea(o)&&n._label.getLocation(o,cn.LEFT)===ur.INTERIOR&&n._label.getLocation(o,cn.RIGHT)===ur.INTERIOR||(i=!1);return i},e.prototype.setNextMin=function(n){this._nextMin=n},e.prototype.print=function(n){t.prototype.print.call(this,n),n.print(" "+this._depth[cn.LEFT]+"/"+this._depth[cn.RIGHT]),n.print(" ("+this.getDepthDelta()+")"),this._isInResult&&n.print(" inResult")},e.prototype.setMinEdgeRing=function(n){this._minEdgeRing=n},e.prototype.isLineEdge=function(){var n=this._label.isLine(0)||this._label.isLine(1),i=!this._label.isArea(0)||this._label.allPositionsEqual(0,ur.EXTERIOR),o=!this._label.isArea(1)||this._label.allPositionsEqual(1,ur.EXTERIOR);return n&&i&&o},e.prototype.setEdgeRing=function(n){this._edgeRing=n},e.prototype.getMinEdgeRing=function(){return this._minEdgeRing},e.prototype.getDepthDelta=function(){var n=this._edge.getDepthDelta();return this._isForward||(n=-n),n},e.prototype.setInResult=function(n){this._isInResult=n},e.prototype.getSym=function(){return this._sym},e.prototype.isForward=function(){return this._isForward},e.prototype.getEdge=function(){return this._edge},e.prototype.printEdge=function(n){this.print(n),n.print(" "),this._isForward?this._edge.print(n):this._edge.printReverse(n)},e.prototype.setSym=function(n){this._sym=n},e.prototype.setVisitedEdge=function(n){this.setVisited(n),this._sym.setVisited(n)},e.prototype.setEdgeDepths=function(n,i){var o=this.getEdge().getDepthDelta();this._isForward||(o=-o);var a=1;n===cn.LEFT&&(a=-1);var s=cn.opposite(n),l=o*a,u=i+l;this.setDepth(n,i),this.setDepth(s,u)},e.prototype.getEdgeRing=function(){return this._edgeRing},e.prototype.isInResult=function(){return this._isInResult},e.prototype.setNext=function(n){this._next=n},e.prototype.isVisited=function(){return this._isVisited},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e.depthFactor=function(n,i){return n===ur.EXTERIOR&&i===ur.INTERIOR?1:n===ur.INTERIOR&&i===ur.EXTERIOR?-1:0},e}(rc),HE=function(){};HE.prototype.createNode=function(e){return new G5(e,null)};HE.prototype.interfaces_=function(){return[]};HE.prototype.getClass=function(){return HE};var Gs=function(){if(this._edges=new xn,this._nodes=null,this._edgeEndList=new xn,arguments.length===0)this._nodes=new Tp(new HE);else if(arguments.length===1){var e=arguments[0];this._nodes=new Tp(e)}};Gs.prototype.printEdges=function(e){var r=this;e.println("Edges:");for(var n=0;n<this._edges.size();n++){e.println("edge "+n+":");var i=r._edges.get(n);i.print(e),i.eiList.print(e)}};Gs.prototype.find=function(e){return this._nodes.find(e)};Gs.prototype.addNode=function(){if(arguments[0]instanceof G5){var e=arguments[0];return this._nodes.addNode(e)}else if(arguments[0]instanceof ar){var r=arguments[0];return this._nodes.addNode(r)}};Gs.prototype.getNodeIterator=function(){return this._nodes.iterator()};Gs.prototype.linkResultDirectedEdges=function(){for(var e=this._nodes.iterator();e.hasNext();){var r=e.next();r.getEdges().linkResultDirectedEdges()}};Gs.prototype.debugPrintln=function(e){Bl.out.println(e)};Gs.prototype.isBoundaryNode=function(e,r){var n=this._nodes.find(r);if(n===null)return!1;var i=n.getLabel();return i!==null&&i.getLocation(e)===ur.BOUNDARY};Gs.prototype.linkAllDirectedEdges=function(){for(var e=this._nodes.iterator();e.hasNext();){var r=e.next();r.getEdges().linkAllDirectedEdges()}};Gs.prototype.matchInSameDirection=function(e,r,n,i){return e.equals(n)?En.computeOrientation(e,r,i)===En.COLLINEAR&&Jo.quadrant(e,r)===Jo.quadrant(n,i):!1};Gs.prototype.getEdgeEnds=function(){return this._edgeEndList};Gs.prototype.debugPrint=function(e){Bl.out.print(e)};Gs.prototype.getEdgeIterator=function(){return this._edges.iterator()};Gs.prototype.findEdgeInSameDirection=function(e,r){for(var n=this,i=0;i<this._edges.size();i++){var o=n._edges.get(i),a=o.getCoordinates();if(n.matchInSameDirection(e,r,a[0],a[1])||n.matchInSameDirection(e,r,a[a.length-1],a[a.length-2]))return o}return null};Gs.prototype.insertEdge=function(e){this._edges.add(e)};Gs.prototype.findEdgeEnd=function(e){for(var r=this.getEdgeEnds().iterator();r.hasNext();){var n=r.next();if(n.getEdge()===e)return n}return null};Gs.prototype.addEdges=function(e){for(var r=this,n=e.iterator();n.hasNext();){var i=n.next();r._edges.add(i);var o=new TH(i,!0),a=new TH(i,!1);o.setSym(a),a.setSym(o),r.add(o),r.add(a)}};Gs.prototype.add=function(e){this._nodes.add(e),this._edgeEndList.add(e)};Gs.prototype.getNodes=function(){return this._nodes.values()};Gs.prototype.findEdge=function(e,r){for(var n=this,i=0;i<this._edges.size();i++){var o=n._edges.get(i),a=o.getCoordinates();if(e.equals(a[0])&&r.equals(a[1]))return o}return null};Gs.prototype.interfaces_=function(){return[]};Gs.prototype.getClass=function(){return Gs};Gs.linkResultDirectedEdges=function(e){for(var r=e.iterator();r.hasNext();){var n=r.next();n.getEdges().linkResultDirectedEdges()}};var Nu=function(){this._geometryFactory=null,this._shellList=new xn;var e=arguments[0];this._geometryFactory=e};Nu.prototype.sortShellsAndHoles=function(e,r,n){for(var i=e.iterator();i.hasNext();){var o=i.next();o.isHole()?n.add(o):r.add(o)}};Nu.prototype.computePolygons=function(e){for(var r=this,n=new xn,i=e.iterator();i.hasNext();){var o=i.next(),a=o.toPolygon(r._geometryFactory);n.add(a)}return n};Nu.prototype.placeFreeHoles=function(e,r){for(var n=this,i=r.iterator();i.hasNext();){var o=i.next();if(o.getShell()===null){var a=n.findEdgeRingContaining(o,e);if(a===null)throw new hv("unable to assign hole to a shell",o.getCoordinate(0));o.setShell(a)}}};Nu.prototype.buildMinimalEdgeRings=function(e,r,n){for(var i=this,o=new xn,a=e.iterator();a.hasNext();){var s=a.next();if(s.getMaxNodeDegree()>2){s.linkDirectedEdgesForMinimalEdgeRings();var l=s.buildMinimalRings(),u=i.findShell(l);u!==null?(i.placePolygonHoles(u,l),r.add(u)):n.addAll(l)}else o.add(s)}return o};Nu.prototype.containsPoint=function(e){for(var r=this._shellList.iterator();r.hasNext();){var n=r.next();if(n.containsPoint(e))return!0}return!1};Nu.prototype.buildMaximalEdgeRings=function(e){for(var r=this,n=new xn,i=e.iterator();i.hasNext();){var o=i.next();if(o.isInResult()&&o.getLabel().isArea()&&o.getEdgeRing()===null){var a=new zxt(o,r._geometryFactory);n.add(a),a.setInResult()}}return n};Nu.prototype.placePolygonHoles=function(e,r){for(var n=r.iterator();n.hasNext();){var i=n.next();i.isHole()&&i.setShell(e)}};Nu.prototype.getPolygons=function(){var e=this.computePolygons(this._shellList);return e};Nu.prototype.findEdgeRingContaining=function(e,r){for(var n=e.getLinearRing(),i=n.getEnvelopeInternal(),o=n.getCoordinateN(0),a=null,s=null,l=r.iterator();l.hasNext();){var u=l.next(),p=u.getLinearRing(),m=p.getEnvelopeInternal();a!==null&&(s=a.getLinearRing().getEnvelopeInternal());var v=!1;m.contains(i)&&En.isPointInRing(o,p.getCoordinates())&&(v=!0),v&&(a===null||s.contains(m))&&(a=u)}return a};Nu.prototype.findShell=function(e){for(var r=0,n=null,i=e.iterator();i.hasNext();){var o=i.next();o.isHole()||(n=o,r++)}return Ti.isTrue(r<=1,"found two shells in MinimalEdgeRing list"),n};Nu.prototype.add=function(){if(arguments.length===1){var e=arguments[0];this.add(e.getEdgeEnds(),e.getNodes())}else if(arguments.length===2){var r=arguments[0],n=arguments[1];Gs.linkResultDirectedEdges(n);var i=this.buildMaximalEdgeRings(r),o=new xn,a=this.buildMinimalEdgeRings(i,this._shellList,o);this.sortShellsAndHoles(a,this._shellList,o),this.placeFreeHoles(this._shellList,o)}};Nu.prototype.interfaces_=function(){return[]};Nu.prototype.getClass=function(){return Nu};var WE=function(){};WE.prototype.getBounds=function(){};WE.prototype.interfaces_=function(){return[]};WE.prototype.getClass=function(){return WE};var dh=function(){this._bounds=null,this._item=null;var e=arguments[0],r=arguments[1];this._bounds=e,this._item=r};dh.prototype.getItem=function(){return this._item};dh.prototype.getBounds=function(){return this._bounds};dh.prototype.interfaces_=function(){return[WE,ad]};dh.prototype.getClass=function(){return dh};var pv=function(){this._size=null,this._items=null,this._size=0,this._items=new xn,this._items.add(null)};pv.prototype.poll=function(){if(this.isEmpty())return null;var e=this._items.get(1);return this._items.set(1,this._items.get(this._size)),this._size-=1,this.reorder(1),e};pv.prototype.size=function(){return this._size};pv.prototype.reorder=function(e){for(var r=this,n=null,i=this._items.get(e);e*2<=this._size&&(n=e*2,n!==r._size&&r._items.get(n+1).compareTo(r._items.get(n))<0&&n++,r._items.get(n).compareTo(i)<0);e=n)r._items.set(e,r._items.get(n));this._items.set(e,i)};pv.prototype.clear=function(){this._size=0,this._items.clear()};pv.prototype.isEmpty=function(){return this._size===0};pv.prototype.add=function(e){var r=this;this._items.add(null),this._size+=1;var n=this._size;for(this._items.set(0,e);e.compareTo(this._items.get(Math.trunc(n/2)))<0;n/=2)r._items.set(n,r._items.get(Math.trunc(n/2)));this._items.set(n,e)};pv.prototype.interfaces_=function(){return[]};pv.prototype.getClass=function(){return pv};var $y=function(){};$y.prototype.visitItem=function(e){};$y.prototype.interfaces_=function(){return[]};$y.prototype.getClass=function(){return $y};var Lb=function(){};Lb.prototype.insert=function(e,r){};Lb.prototype.remove=function(e,r){};Lb.prototype.query=function(){};Lb.prototype.interfaces_=function(){return[]};Lb.prototype.getClass=function(){return Lb};var Za=function(){if(this._childBoundables=new xn,this._bounds=null,this._level=null,arguments.length!==0){if(arguments.length===1){var e=arguments[0];this._level=e}}},ghe={serialVersionUID:{configurable:!0}};Za.prototype.getLevel=function(){return this._level};Za.prototype.size=function(){return this._childBoundables.size()};Za.prototype.getChildBoundables=function(){return this._childBoundables};Za.prototype.addChildBoundable=function(e){Ti.isTrue(this._bounds===null),this._childBoundables.add(e)};Za.prototype.isEmpty=function(){return this._childBoundables.isEmpty()};Za.prototype.getBounds=function(){return this._bounds===null&&(this._bounds=this.computeBounds()),this._bounds};Za.prototype.interfaces_=function(){return[WE,ad]};Za.prototype.getClass=function(){return Za};ghe.serialVersionUID.get=function(){return 6493722185909574e3};Object.defineProperties(Za,ghe);var hh=function(){};hh.reverseOrder=function(){return{compare:function(r,n){return n.compareTo(r)}}};hh.min=function(e){return hh.sort(e),e.get(0)};hh.sort=function(e,r){var n=e.toArray();r?i_.sort(n,r):i_.sort(n);for(var i=e.iterator(),o=0,a=n.length;o<a;o++)i.next(),i.set(n[o])};hh.singletonList=function(e){var r=new xn;return r.add(e),r};var Na=function(){this._boundable1=null,this._boundable2=null,this._distance=null,this._itemDistance=null;var e=arguments[0],r=arguments[1],n=arguments[2];this._boundable1=e,this._boundable2=r,this._itemDistance=n,this._distance=this.distance()};Na.prototype.expandToQueue=function(e,r){var n=Na.isComposite(this._boundable1),i=Na.isComposite(this._boundable2);if(n&&i)return Na.area(this._boundable1)>Na.area(this._boundable2)?(this.expand(this._boundable1,this._boundable2,e,r),null):(this.expand(this._boundable2,this._boundable1,e,r),null);if(n)return this.expand(this._boundable1,this._boundable2,e,r),null;if(i)return this.expand(this._boundable2,this._boundable1,e,r),null;throw new Ls};Na.prototype.isLeaves=function(){return!(Na.isComposite(this._boundable1)||Na.isComposite(this._boundable2))};Na.prototype.compareTo=function(e){var r=e;return this._distance<r._distance?-1:this._distance>r._distance?1:0};Na.prototype.expand=function(e,r,n,i){for(var o=this,a=e.getChildBoundables(),s=a.iterator();s.hasNext();){var l=s.next(),u=new Na(l,r,o._itemDistance);u.getDistance()<i&&n.add(u)}};Na.prototype.getBoundable=function(e){return e===0?this._boundable1:this._boundable2};Na.prototype.getDistance=function(){return this._distance};Na.prototype.distance=function(){return this.isLeaves()?this._itemDistance.distance(this._boundable1,this._boundable2):this._boundable1.getBounds().distance(this._boundable2.getBounds())};Na.prototype.interfaces_=function(){return[sd]};Na.prototype.getClass=function(){return Na};Na.area=function(e){return e.getBounds().getArea()};Na.isComposite=function(e){return e instanceof Za};var Cl=function t(){if(this._root=null,this._built=!1,this._itemBoundables=new xn,this._nodeCapacity=null,arguments.length===0){var e=t.DEFAULT_NODE_CAPACITY;this._nodeCapacity=e}else if(arguments.length===1){var r=arguments[0];Ti.isTrue(r>1,"Node capacity must be greater than 1"),this._nodeCapacity=r}},q5={IntersectsOp:{configurable:!0},serialVersionUID:{configurable:!0},DEFAULT_NODE_CAPACITY:{configurable:!0}};Cl.prototype.getNodeCapacity=function(){return this._nodeCapacity};Cl.prototype.lastNode=function(e){return e.get(e.size()-1)};Cl.prototype.size=function(){var e=this;if(arguments.length===0)return this.isEmpty()?0:(this.build(),this.size(this._root));if(arguments.length===1){for(var r=arguments[0],n=0,i=r.getChildBoundables().iterator();i.hasNext();){var o=i.next();o instanceof Za?n+=e.size(o):o instanceof dh&&(n+=1)}return n}};Cl.prototype.removeItem=function(e,r){for(var n=null,i=e.getChildBoundables().iterator();i.hasNext();){var o=i.next();o instanceof dh&&o.getItem()===r&&(n=o)}return n!==null?(e.getChildBoundables().remove(n),!0):!1};Cl.prototype.itemsTree=function(){var e=this;if(arguments.length===0){this.build();var r=this.itemsTree(this._root);return r===null?new xn:r}else if(arguments.length===1){for(var n=arguments[0],i=new xn,o=n.getChildBoundables().iterator();o.hasNext();){var a=o.next();if(a instanceof Za){var s=e.itemsTree(a);s!==null&&i.add(s)}else a instanceof dh?i.add(a.getItem()):Ti.shouldNeverReachHere()}return i.size()<=0?null:i}};Cl.prototype.insert=function(e,r){Ti.isTrue(!this._built,"Cannot insert items into an STR packed R-tree after it has been built."),this._itemBoundables.add(new dh(e,r))};Cl.prototype.boundablesAtLevel=function(){var e=this;if(arguments.length===1){var r=arguments[0],n=new xn;return this.boundablesAtLevel(r,this._root,n),n}else if(arguments.length===3){var i=arguments[0],o=arguments[1],a=arguments[2];if(Ti.isTrue(i>-2),o.getLevel()===i)return a.add(o),null;for(var s=o.getChildBoundables().iterator();s.hasNext();){var l=s.next();l instanceof Za?e.boundablesAtLevel(i,l,a):(Ti.isTrue(l instanceof dh),i===-1&&a.add(l))}return null}};Cl.prototype.query=function(){var e=this;if(arguments.length===1){var r=arguments[0];this.build();var n=new xn;return this.isEmpty()||this.getIntersectsOp().intersects(this._root.getBounds(),r)&&this.query(r,this._root,n),n}else if(arguments.length===2){var i=arguments[0],o=arguments[1];if(this.build(),this.isEmpty())return null;this.getIntersectsOp().intersects(this._root.getBounds(),i)&&this.query(i,this._root,o)}else if(arguments.length===3){if(ai(arguments[2],$y)&&arguments[0]instanceof Object&&arguments[1]instanceof Za)for(var a=arguments[0],s=arguments[1],l=arguments[2],u=s.getChildBoundables(),p=0;p<u.size();p++){var m=u.get(p);!e.getIntersectsOp().intersects(m.getBounds(),a)||(m instanceof Za?e.query(a,m,l):m instanceof dh?l.visitItem(m.getItem()):Ti.shouldNeverReachHere())}else if(ai(arguments[2],ch)&&arguments[0]instanceof Object&&arguments[1]instanceof Za)for(var v=arguments[0],x=arguments[1],y=arguments[2],_=x.getChildBoundables(),w=0;w<_.size();w++){var C=_.get(w);!e.getIntersectsOp().intersects(C.getBounds(),v)||(C instanceof Za?e.query(v,C,y):C instanceof dh?y.add(C.getItem()):Ti.shouldNeverReachHere())}}};Cl.prototype.build=function(){if(this._built)return null;this._root=this._itemBoundables.isEmpty()?this.createNode(0):this.createHigherLevels(this._itemBoundables,-1),this._itemBoundables=null,this._built=!0};Cl.prototype.getRoot=function(){return this.build(),this._root};Cl.prototype.remove=function(){var e=this;if(arguments.length===2){var r=arguments[0],n=arguments[1];return this.build(),this.getIntersectsOp().intersects(this._root.getBounds(),r)?this.remove(r,this._root,n):!1}else if(arguments.length===3){var i=arguments[0],o=arguments[1],a=arguments[2],s=this.removeItem(o,a);if(s)return!0;for(var l=null,u=o.getChildBoundables().iterator();u.hasNext();){var p=u.next();if(!!e.getIntersectsOp().intersects(p.getBounds(),i)&&p instanceof Za&&(s=e.remove(i,p,a),s)){l=p;break}}return l!==null&&l.getChildBoundables().isEmpty()&&o.getChildBoundables().remove(l),s}};Cl.prototype.createHigherLevels=function(e,r){Ti.isTrue(!e.isEmpty());var n=this.createParentBoundables(e,r+1);return n.size()===1?n.get(0):this.createHigherLevels(n,r+1)};Cl.prototype.depth=function(){var e=this;if(arguments.length===0)return this.isEmpty()?0:(this.build(),this.depth(this._root));if(arguments.length===1){for(var r=arguments[0],n=0,i=r.getChildBoundables().iterator();i.hasNext();){var o=i.next();if(o instanceof Za){var a=e.depth(o);a>n&&(n=a)}}return n+1}};Cl.prototype.createParentBoundables=function(e,r){var n=this;Ti.isTrue(!e.isEmpty());var i=new xn;i.add(this.createNode(r));var o=new xn(e);hh.sort(o,this.getComparator());for(var a=o.iterator();a.hasNext();){var s=a.next();n.lastNode(i).getChildBoundables().size()===n.getNodeCapacity()&&i.add(n.createNode(r)),n.lastNode(i).addChildBoundable(s)}return i};Cl.prototype.isEmpty=function(){return this._built?this._root.isEmpty():this._itemBoundables.isEmpty()};Cl.prototype.interfaces_=function(){return[ad]};Cl.prototype.getClass=function(){return Cl};Cl.compareDoubles=function(e,r){return e>r?1:e<r?-1:0};q5.IntersectsOp.get=function(){return Bxt};q5.serialVersionUID.get=function(){return-3886435814360241e3};q5.DEFAULT_NODE_CAPACITY.get=function(){return 10};Object.defineProperties(Cl,q5);var Bxt=function(){},GE=function(){};GE.prototype.distance=function(e,r){};GE.prototype.interfaces_=function(){return[]};GE.prototype.getClass=function(){return GE};var vhe=function(t){function e(n){n=n||e.DEFAULT_NODE_CAPACITY,t.call(this,n)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={STRtreeNode:{configurable:!0},serialVersionUID:{configurable:!0},xComparator:{configurable:!0},yComparator:{configurable:!0},intersectsOp:{configurable:!0},DEFAULT_NODE_CAPACITY:{configurable:!0}};return e.prototype.createParentBoundablesFromVerticalSlices=function(i,o){var a=this;Ti.isTrue(i.length>0);for(var s=new xn,l=0;l<i.length;l++)s.addAll(a.createParentBoundablesFromVerticalSlice(i[l],o));return s},e.prototype.createNode=function(i){return new yhe(i)},e.prototype.size=function(){return arguments.length===0?t.prototype.size.call(this):t.prototype.size.apply(this,arguments)},e.prototype.insert=function(){if(arguments.length===2){var i=arguments[0],o=arguments[1];if(i.isNull())return null;t.prototype.insert.call(this,i,o)}else return t.prototype.insert.apply(this,arguments)},e.prototype.getIntersectsOp=function(){return e.intersectsOp},e.prototype.verticalSlices=function(i,o){for(var a=Math.trunc(Math.ceil(i.size()/o)),s=new Array(o).fill(null),l=i.iterator(),u=0;u<o;u++){s[u]=new xn;for(var p=0;l.hasNext()&&p<a;){var m=l.next();s[u].add(m),p++}}return s},e.prototype.query=function(){if(arguments.length===1){var i=arguments[0];return t.prototype.query.call(this,i)}else if(arguments.length===2){var o=arguments[0],a=arguments[1];t.prototype.query.call(this,o,a)}else if(arguments.length===3){if(ai(arguments[2],$y)&&arguments[0]instanceof Object&&arguments[1]instanceof Za){var s=arguments[0],l=arguments[1],u=arguments[2];t.prototype.query.call(this,s,l,u)}else if(ai(arguments[2],ch)&&arguments[0]instanceof Object&&arguments[1]instanceof Za){var p=arguments[0],m=arguments[1],v=arguments[2];t.prototype.query.call(this,p,m,v)}}},e.prototype.getComparator=function(){return e.yComparator},e.prototype.createParentBoundablesFromVerticalSlice=function(i,o){return t.prototype.createParentBoundables.call(this,i,o)},e.prototype.remove=function(){if(arguments.length===2){var i=arguments[0],o=arguments[1];return t.prototype.remove.call(this,i,o)}else return t.prototype.remove.apply(this,arguments)},e.prototype.depth=function(){return arguments.length===0?t.prototype.depth.call(this):t.prototype.depth.apply(this,arguments)},e.prototype.createParentBoundables=function(i,o){Ti.isTrue(!i.isEmpty());var a=Math.trunc(Math.ceil(i.size()/this.getNodeCapacity())),s=new xn(i);hh.sort(s,e.xComparator);var l=this.verticalSlices(s,Math.trunc(Math.ceil(Math.sqrt(a))));return this.createParentBoundablesFromVerticalSlices(l,o)},e.prototype.nearestNeighbour=function(){if(arguments.length===1){if(ai(arguments[0],GE)){var i=arguments[0],o=new Na(this.getRoot(),this.getRoot(),i);return this.nearestNeighbour(o)}else if(arguments[0]instanceof Na){var a=arguments[0];return this.nearestNeighbour(a,mi.POSITIVE_INFINITY)}}else if(arguments.length===2){if(arguments[0]instanceof e&&ai(arguments[1],GE)){var s=arguments[0],l=arguments[1],u=new Na(this.getRoot(),s.getRoot(),l);return this.nearestNeighbour(u)}else if(arguments[0]instanceof Na&&typeof arguments[1]=="number"){var p=arguments[0],m=arguments[1],v=m,x=null,y=new pv;for(y.add(p);!y.isEmpty()&&v>0;){var _=y.poll(),w=_.getDistance();if(w>=v)break;_.isLeaves()?(v=w,x=_):_.expandToQueue(y,v)}return[x.getBoundable(0).getItem(),x.getBoundable(1).getItem()]}}else if(arguments.length===3){var C=arguments[0],E=arguments[1],T=arguments[2],A=new dh(C,E),k=new Na(this.getRoot(),A,T);return this.nearestNeighbour(k)[0]}},e.prototype.interfaces_=function(){return[Lb,ad]},e.prototype.getClass=function(){return e},e.centreX=function(i){return e.avg(i.getMinX(),i.getMaxX())},e.avg=function(i,o){return(i+o)/2},e.centreY=function(i){return e.avg(i.getMinY(),i.getMaxY())},r.STRtreeNode.get=function(){return yhe},r.serialVersionUID.get=function(){return 259274702368956900},r.xComparator.get=function(){return{interfaces_:function(){return[kE]},compare:function(n,i){return t.compareDoubles(e.centreX(n.getBounds()),e.centreX(i.getBounds()))}}},r.yComparator.get=function(){return{interfaces_:function(){return[kE]},compare:function(n,i){return t.compareDoubles(e.centreY(n.getBounds()),e.centreY(i.getBounds()))}}},r.intersectsOp.get=function(){return{interfaces_:function(){return[t.IntersectsOp]},intersects:function(n,i){return n.intersects(i)}}},r.DEFAULT_NODE_CAPACITY.get=function(){return 10},Object.defineProperties(e,r),e}(Cl),yhe=function(t){function e(){var r=arguments[0];t.call(this,r)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.computeBounds=function(){for(var n=null,i=this.getChildBoundables().iterator();i.hasNext();){var o=i.next();n===null?n=new Un(o.getBounds()):n.expandToInclude(o.getBounds())}return n},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Za),Xc=function(){};Xc.prototype.interfaces_=function(){return[]};Xc.prototype.getClass=function(){return Xc};Xc.relativeSign=function(e,r){return e<r?-1:e>r?1:0};Xc.compare=function(e,r,n){if(r.equals2D(n))return 0;var i=Xc.relativeSign(r.x,n.x),o=Xc.relativeSign(r.y,n.y);switch(e){case 0:return Xc.compareValue(i,o);case 1:return Xc.compareValue(o,i);case 2:return Xc.compareValue(o,-i);case 3:return Xc.compareValue(-i,o);case 4:return Xc.compareValue(-i,-o);case 5:return Xc.compareValue(-o,-i);case 6:return Xc.compareValue(-o,i);case 7:return Xc.compareValue(i,-o)}return Ti.shouldNeverReachHere("invalid octant value"),0};Xc.compareValue=function(e,r){return e<0?-1:e>0?1:r<0?-1:r>0?1:0};var Fy=function(){this._segString=null,this.coord=null,this.segmentIndex=null,this._segmentOctant=null,this._isInterior=null;var e=arguments[0],r=arguments[1],n=arguments[2],i=arguments[3];this._segString=e,this.coord=new ar(r),this.segmentIndex=n,this._segmentOctant=i,this._isInterior=!r.equals2D(e.getCoordinate(n))};Fy.prototype.getCoordinate=function(){return this.coord};Fy.prototype.print=function(e){e.print(this.coord),e.print(" seg # = "+this.segmentIndex)};Fy.prototype.compareTo=function(e){var r=e;return this.segmentIndex<r.segmentIndex?-1:this.segmentIndex>r.segmentIndex?1:this.coord.equals2D(r.coord)?0:Xc.compare(this._segmentOctant,this.coord,r.coord)};Fy.prototype.isEndPoint=function(e){return this.segmentIndex===0&&!this._isInterior||this.segmentIndex===e};Fy.prototype.isInterior=function(){return this._isInterior};Fy.prototype.interfaces_=function(){return[sd]};Fy.prototype.getClass=function(){return Fy};var Tc=function(){this._nodeMap=new tc,this._edge=null;var e=arguments[0];this._edge=e};Tc.prototype.getSplitCoordinates=function(){var e=this,r=new tA;this.addEndpoints();for(var n=this.iterator(),i=n.next();n.hasNext();){var o=n.next();e.addEdgeCoordinates(i,o,r),i=o}return r.toCoordinateArray()};Tc.prototype.addCollapsedNodes=function(){var e=this,r=new xn;this.findCollapsesFromInsertedNodes(r),this.findCollapsesFromExistingVertices(r);for(var n=r.iterator();n.hasNext();){var i=n.next().intValue();e.add(e._edge.getCoordinate(i),i)}};Tc.prototype.print=function(e){e.println("Intersections:");for(var r=this.iterator();r.hasNext();){var n=r.next();n.print(e)}};Tc.prototype.findCollapsesFromExistingVertices=function(e){for(var r=this,n=0;n<this._edge.size()-2;n++){var i=r._edge.getCoordinate(n),o=r._edge.getCoordinate(n+2);i.equals2D(o)&&e.add(new yp(n+1))}};Tc.prototype.addEdgeCoordinates=function(e,r,n){var i=this,o=this._edge.getCoordinate(r.segmentIndex),a=r.isInterior()||!r.coord.equals2D(o);n.add(new ar(e.coord),!1);for(var s=e.segmentIndex+1;s<=r.segmentIndex;s++)n.add(i._edge.getCoordinate(s));a&&n.add(new ar(r.coord))};Tc.prototype.iterator=function(){return this._nodeMap.values().iterator()};Tc.prototype.addSplitEdges=function(e){var r=this;this.addEndpoints(),this.addCollapsedNodes();for(var n=this.iterator(),i=n.next();n.hasNext();){var o=n.next(),a=r.createSplitEdge(i,o);e.add(a),i=o}};Tc.prototype.findCollapseIndex=function(e,r,n){if(!e.coord.equals2D(r.coord))return!1;var i=r.segmentIndex-e.segmentIndex;return r.isInterior()||i--,i===1?(n[0]=e.segmentIndex+1,!0):!1};Tc.prototype.findCollapsesFromInsertedNodes=function(e){for(var r=this,n=new Array(1).fill(null),i=this.iterator(),o=i.next();i.hasNext();){var a=i.next(),s=r.findCollapseIndex(o,a,n);s&&e.add(new yp(n[0])),o=a}};Tc.prototype.getEdge=function(){return this._edge};Tc.prototype.addEndpoints=function(){var e=this._edge.size()-1;this.add(this._edge.getCoordinate(0),0),this.add(this._edge.getCoordinate(e),e)};Tc.prototype.createSplitEdge=function(e,r){var n=this,i=r.segmentIndex-e.segmentIndex+2,o=this._edge.getCoordinate(r.segmentIndex),a=r.isInterior()||!r.coord.equals2D(o);a||i--;var s=new Array(i).fill(null),l=0;s[l++]=new ar(e.coord);for(var u=e.segmentIndex+1;u<=r.segmentIndex;u++)s[l++]=n._edge.getCoordinate(u);return a&&(s[l]=new ar(r.coord)),new ya(s,this._edge.getData())};Tc.prototype.add=function(e,r){var n=new Fy(this._edge,e,r,this._edge.getSegmentOctant(r)),i=this._nodeMap.get(n);return i!==null?(Ti.isTrue(i.coord.equals2D(e),"Found equal nodes with different coordinates"),i):(this._nodeMap.put(n,n),n)};Tc.prototype.checkSplitEdgesCorrectness=function(e){var r=this._edge.getCoordinates(),n=e.get(0),i=n.getCoordinate(0);if(!i.equals2D(r[0]))throw new lv("bad split edge start point at "+i);var o=e.get(e.size()-1),a=o.getCoordinates(),s=a[a.length-1];if(!s.equals2D(r[r.length-1]))throw new lv("bad split edge end point at "+s)};Tc.prototype.interfaces_=function(){return[]};Tc.prototype.getClass=function(){return Tc};var Db=function(){};Db.prototype.interfaces_=function(){return[]};Db.prototype.getClass=function(){return Db};Db.octant=function(){if(typeof arguments[0]=="number"&&typeof arguments[1]=="number"){var e=arguments[0],r=arguments[1];if(e===0&&r===0)throw new Ls;var n=Math.abs(e),i=Math.abs(r);return e>=0?r>=0?n>=i?0:1:n>=i?7:6:r>=0?n>=i?3:2:n>=i?4:5}else if(arguments[0]instanceof ar&&arguments[1]instanceof ar){var o=arguments[0],a=arguments[1],s=a.x-o.x,l=a.y-o.y;if(s===0&&l===0)throw new Ls;return Db.octant(s,l)}};var Hm=function(){};Hm.prototype.getCoordinates=function(){};Hm.prototype.size=function(){};Hm.prototype.getCoordinate=function(e){};Hm.prototype.isClosed=function(){};Hm.prototype.setData=function(e){};Hm.prototype.getData=function(){};Hm.prototype.interfaces_=function(){return[]};Hm.prototype.getClass=function(){return Hm};var uA=function(){};uA.prototype.addIntersection=function(e,r){};uA.prototype.interfaces_=function(){return[Hm]};uA.prototype.getClass=function(){return uA};var ya=function(){this._nodeList=new Tc(this),this._pts=null,this._data=null;var e=arguments[0],r=arguments[1];this._pts=e,this._data=r};ya.prototype.getCoordinates=function(){return this._pts};ya.prototype.size=function(){return this._pts.length};ya.prototype.getCoordinate=function(e){return this._pts[e]};ya.prototype.isClosed=function(){return this._pts[0].equals(this._pts[this._pts.length-1])};ya.prototype.getSegmentOctant=function(e){return e===this._pts.length-1?-1:this.safeOctant(this.getCoordinate(e),this.getCoordinate(e+1))};ya.prototype.setData=function(e){this._data=e};ya.prototype.safeOctant=function(e,r){return e.equals2D(r)?0:Db.octant(e,r)};ya.prototype.getData=function(){return this._data};ya.prototype.addIntersection=function(){if(arguments.length===2){var e=arguments[0],r=arguments[1];this.addIntersectionNode(e,r)}else if(arguments.length===4){var n=arguments[0],i=arguments[1],o=arguments[3],a=new ar(n.getIntersection(o));this.addIntersection(a,i)}};ya.prototype.toString=function(){return lh.toLineString(new va(this._pts))};ya.prototype.getNodeList=function(){return this._nodeList};ya.prototype.addIntersectionNode=function(e,r){var n=r,i=n+1;if(i<this._pts.length){var o=this._pts[i];e.equals2D(o)&&(n=i)}var a=this._nodeList.add(e,n);return a};ya.prototype.addIntersections=function(e,r,n){for(var i=this,o=0;o<e.getIntersectionNum();o++)i.addIntersection(e,r,n,o)};ya.prototype.interfaces_=function(){return[uA]};ya.prototype.getClass=function(){return ya};ya.getNodedSubstrings=function(){if(arguments.length===1){var e=arguments[0],r=new xn;return ya.getNodedSubstrings(e,r),r}else if(arguments.length===2)for(var n=arguments[0],i=arguments[1],o=n.iterator();o.hasNext();){var a=o.next();a.getNodeList().addSplitEdges(i)}};var qn=function(){if(this.p0=null,this.p1=null,arguments.length===0)this.p0=new ar,this.p1=new ar;else if(arguments.length===1){var e=arguments[0];this.p0=new ar(e.p0),this.p1=new ar(e.p1)}else if(arguments.length===2)this.p0=arguments[0],this.p1=arguments[1];else if(arguments.length===4){var r=arguments[0],n=arguments[1],i=arguments[2],o=arguments[3];this.p0=new ar(r,n),this.p1=new ar(i,o)}},xhe={serialVersionUID:{configurable:!0}};qn.prototype.minX=function(){return Math.min(this.p0.x,this.p1.x)};qn.prototype.orientationIndex=function(){if(arguments[0]instanceof qn){var e=arguments[0],r=En.orientationIndex(this.p0,this.p1,e.p0),n=En.orientationIndex(this.p0,this.p1,e.p1);return r>=0&&n>=0||r<=0&&n<=0?Math.max(r,n):0}else if(arguments[0]instanceof ar){var i=arguments[0];return En.orientationIndex(this.p0,this.p1,i)}};qn.prototype.toGeometry=function(e){return e.createLineString([this.p0,this.p1])};qn.prototype.isVertical=function(){return this.p0.x===this.p1.x};qn.prototype.equals=function(e){if(!(e instanceof qn))return!1;var r=e;return this.p0.equals(r.p0)&&this.p1.equals(r.p1)};qn.prototype.intersection=function(e){var r=new r_;return r.computeIntersection(this.p0,this.p1,e.p0,e.p1),r.hasIntersection()?r.getIntersection(0):null};qn.prototype.project=function(){if(arguments[0]instanceof ar){var e=arguments[0];if(e.equals(this.p0)||e.equals(this.p1))return new ar(e);var r=this.projectionFactor(e),n=new ar;return n.x=this.p0.x+r*(this.p1.x-this.p0.x),n.y=this.p0.y+r*(this.p1.y-this.p0.y),n}else if(arguments[0]instanceof qn){var i=arguments[0],o=this.projectionFactor(i.p0),a=this.projectionFactor(i.p1);if(o>=1&&a>=1||o<=0&&a<=0)return null;var s=this.project(i.p0);o<0&&(s=this.p0),o>1&&(s=this.p1);var l=this.project(i.p1);return a<0&&(l=this.p0),a>1&&(l=this.p1),new qn(s,l)}};qn.prototype.normalize=function(){this.p1.compareTo(this.p0)<0&&this.reverse()};qn.prototype.angle=function(){return Math.atan2(this.p1.y-this.p0.y,this.p1.x-this.p0.x)};qn.prototype.getCoordinate=function(e){return e===0?this.p0:this.p1};qn.prototype.distancePerpendicular=function(e){return En.distancePointLinePerpendicular(e,this.p0,this.p1)};qn.prototype.minY=function(){return Math.min(this.p0.y,this.p1.y)};qn.prototype.midPoint=function(){return qn.midPoint(this.p0,this.p1)};qn.prototype.projectionFactor=function(e){if(e.equals(this.p0))return 0;if(e.equals(this.p1))return 1;var r=this.p1.x-this.p0.x,n=this.p1.y-this.p0.y,i=r*r+n*n;if(i<=0)return mi.NaN;var o=((e.x-this.p0.x)*r+(e.y-this.p0.y)*n)/i;return o};qn.prototype.closestPoints=function(e){var r=this.intersection(e);if(r!==null)return[r,r];var n=new Array(2).fill(null),i=mi.MAX_VALUE,o=null,a=this.closestPoint(e.p0);i=a.distance(e.p0),n[0]=a,n[1]=e.p0;var s=this.closestPoint(e.p1);o=s.distance(e.p1),o<i&&(i=o,n[0]=s,n[1]=e.p1);var l=e.closestPoint(this.p0);o=l.distance(this.p0),o<i&&(i=o,n[0]=this.p0,n[1]=l);var u=e.closestPoint(this.p1);return o=u.distance(this.p1),o<i&&(i=o,n[0]=this.p1,n[1]=u),n};qn.prototype.closestPoint=function(e){var r=this.projectionFactor(e);if(r>0&&r<1)return this.project(e);var n=this.p0.distance(e),i=this.p1.distance(e);return n<i?this.p0:this.p1};qn.prototype.maxX=function(){return Math.max(this.p0.x,this.p1.x)};qn.prototype.getLength=function(){return this.p0.distance(this.p1)};qn.prototype.compareTo=function(e){var r=e,n=this.p0.compareTo(r.p0);return n!==0?n:this.p1.compareTo(r.p1)};qn.prototype.reverse=function(){var e=this.p0;this.p0=this.p1,this.p1=e};qn.prototype.equalsTopo=function(e){return this.p0.equals(e.p0)&&(this.p1.equals(e.p1)||this.p0.equals(e.p1))&&this.p1.equals(e.p0)};qn.prototype.lineIntersection=function(e){try{var r=ah.intersection(this.p0,this.p1,e.p0,e.p1);return r}catch(n){if(!(n instanceof LE))throw n}finally{}return null};qn.prototype.maxY=function(){return Math.max(this.p0.y,this.p1.y)};qn.prototype.pointAlongOffset=function(e,r){var n=this.p0.x+e*(this.p1.x-this.p0.x),i=this.p0.y+e*(this.p1.y-this.p0.y),o=this.p1.x-this.p0.x,a=this.p1.y-this.p0.y,s=Math.sqrt(o*o+a*a),l=0,u=0;if(r!==0){if(s<=0)throw new Error("Cannot compute offset from zero-length line segment");l=r*o/s,u=r*a/s}var p=n-u,m=i+l,v=new ar(p,m);return v};qn.prototype.setCoordinates=function(){if(arguments.length===1){var e=arguments[0];this.setCoordinates(e.p0,e.p1)}else if(arguments.length===2){var r=arguments[0],n=arguments[1];this.p0.x=r.x,this.p0.y=r.y,this.p1.x=n.x,this.p1.y=n.y}};qn.prototype.segmentFraction=function(e){var r=this.projectionFactor(e);return r<0?r=0:(r>1||mi.isNaN(r))&&(r=1),r};qn.prototype.toString=function(){return"LINESTRING( "+this.p0.x+" "+this.p0.y+", "+this.p1.x+" "+this.p1.y+")"};qn.prototype.isHorizontal=function(){return this.p0.y===this.p1.y};qn.prototype.distance=function(){if(arguments[0]instanceof qn){var e=arguments[0];return En.distanceLineLine(this.p0,this.p1,e.p0,e.p1)}else if(arguments[0]instanceof ar){var r=arguments[0];return En.distancePointLine(r,this.p0,this.p1)}};qn.prototype.pointAlong=function(e){var r=new ar;return r.x=this.p0.x+e*(this.p1.x-this.p0.x),r.y=this.p0.y+e*(this.p1.y-this.p0.y),r};qn.prototype.hashCode=function(){var e=mi.doubleToLongBits(this.p0.x);e^=mi.doubleToLongBits(this.p0.y)*31;var r=Math.trunc(e)^Math.trunc(e>>32),n=mi.doubleToLongBits(this.p1.x);n^=mi.doubleToLongBits(this.p1.y)*31;var i=Math.trunc(n)^Math.trunc(n>>32);return r^i};qn.prototype.interfaces_=function(){return[sd,ad]};qn.prototype.getClass=function(){return qn};qn.midPoint=function(e,r){return new ar((e.x+r.x)/2,(e.y+r.y)/2)};xhe.serialVersionUID.get=function(){return 3252005833466256400};Object.defineProperties(qn,xhe);var fA=function(){this.tempEnv1=new Un,this.tempEnv2=new Un,this._overlapSeg1=new qn,this._overlapSeg2=new qn};fA.prototype.overlap=function(){if(arguments.length!==2){if(arguments.length===4){var e=arguments[0],r=arguments[1],n=arguments[2],i=arguments[3];e.getLineSegment(r,this._overlapSeg1),n.getLineSegment(i,this._overlapSeg2),this.overlap(this._overlapSeg1,this._overlapSeg2)}}};fA.prototype.interfaces_=function(){return[]};fA.prototype.getClass=function(){return fA};var $u=function(){this._pts=null,this._start=null,this._end=null,this._env=null,this._context=null,this._id=null;var e=arguments[0],r=arguments[1],n=arguments[2],i=arguments[3];this._pts=e,this._start=r,this._end=n,this._context=i};$u.prototype.getLineSegment=function(e,r){r.p0=this._pts[e],r.p1=this._pts[e+1]};$u.prototype.computeSelect=function(e,r,n,i){var o=this._pts[r],a=this._pts[n];if(i.tempEnv1.init(o,a),n-r==1)return i.select(this,r),null;if(!e.intersects(i.tempEnv1))return null;var s=Math.trunc((r+n)/2);r<s&&this.computeSelect(e,r,s,i),s<n&&this.computeSelect(e,s,n,i)};$u.prototype.getCoordinates=function(){for(var e=this,r=new Array(this._end-this._start+1).fill(null),n=0,i=this._start;i<=this._end;i++)r[n++]=e._pts[i];return r};$u.prototype.computeOverlaps=function(e,r){this.computeOverlapsInternal(this._start,this._end,e,e._start,e._end,r)};$u.prototype.setId=function(e){this._id=e};$u.prototype.select=function(e,r){this.computeSelect(e,this._start,this._end,r)};$u.prototype.getEnvelope=function(){if(this._env===null){var e=this._pts[this._start],r=this._pts[this._end];this._env=new Un(e,r)}return this._env};$u.prototype.getEndIndex=function(){return this._end};$u.prototype.getStartIndex=function(){return this._start};$u.prototype.getContext=function(){return this._context};$u.prototype.getId=function(){return this._id};$u.prototype.computeOverlapsInternal=function(e,r,n,i,o,a){var s=this._pts[e],l=this._pts[r],u=n._pts[i],p=n._pts[o];if(r-e==1&&o-i==1)return a.overlap(this,e,n,i),null;if(a.tempEnv1.init(s,l),a.tempEnv2.init(u,p),!a.tempEnv1.intersects(a.tempEnv2))return null;var m=Math.trunc((e+r)/2),v=Math.trunc((i+o)/2);e<m&&(i<v&&this.computeOverlapsInternal(e,m,n,i,v,a),v<o&&this.computeOverlapsInternal(e,m,n,v,o,a)),m<r&&(i<v&&this.computeOverlapsInternal(m,r,n,i,v,a),v<o&&this.computeOverlapsInternal(m,r,n,v,o,a))};$u.prototype.interfaces_=function(){return[]};$u.prototype.getClass=function(){return $u};var Pp=function(){};Pp.prototype.interfaces_=function(){return[]};Pp.prototype.getClass=function(){return Pp};Pp.getChainStartIndices=function(e){var r=0,n=new xn;n.add(new yp(r));do{var i=Pp.findChainEnd(e,r);n.add(new yp(i)),r=i}while(r<e.length-1);var o=Pp.toIntArray(n);return o};Pp.findChainEnd=function(e,r){for(var n=r;n<e.length-1&&e[n].equals2D(e[n+1]);)n++;if(n>=e.length-1)return e.length-1;for(var i=Jo.quadrant(e[n],e[n+1]),o=r+1;o<e.length;){if(!e[o-1].equals2D(e[o])){var a=Jo.quadrant(e[o-1],e[o]);if(a!==i)break}o++}return o-1};Pp.getChains=function(){if(arguments.length===1){var e=arguments[0];return Pp.getChains(e,null)}else if(arguments.length===2){for(var r=arguments[0],n=arguments[1],i=new xn,o=Pp.getChainStartIndices(r),a=0;a<o.length-1;a++){var s=new $u(r,o[a],o[a+1],n);i.add(s)}return i}};Pp.toIntArray=function(e){for(var r=new Array(e.size()).fill(null),n=0;n<r.length;n++)r[n]=e.get(n).intValue();return r};var s_=function(){};s_.prototype.computeNodes=function(e){};s_.prototype.getNodedSubstrings=function(){};s_.prototype.interfaces_=function(){return[]};s_.prototype.getClass=function(){return s_};var dA=function(){if(this._segInt=null,arguments.length!==0){if(arguments.length===1){var e=arguments[0];this.setSegmentIntersector(e)}}};dA.prototype.setSegmentIntersector=function(e){this._segInt=e};dA.prototype.interfaces_=function(){return[s_]};dA.prototype.getClass=function(){return dA};var PH=function(t){function e(n){n?t.call(this,n):t.call(this),this._monoChains=new xn,this._index=new vhe,this._idCounter=0,this._nodedSegStrings=null,this._nOverlaps=0}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={SegmentOverlapAction:{configurable:!0}};return e.prototype.getMonotoneChains=function(){return this._monoChains},e.prototype.getNodedSubstrings=function(){return ya.getNodedSubstrings(this._nodedSegStrings)},e.prototype.getIndex=function(){return this._index},e.prototype.add=function(i){for(var o=this,a=Pp.getChains(i.getCoordinates(),i),s=a.iterator();s.hasNext();){var l=s.next();l.setId(o._idCounter++),o._index.insert(l.getEnvelope(),l),o._monoChains.add(l)}},e.prototype.computeNodes=function(i){var o=this;this._nodedSegStrings=i;for(var a=i.iterator();a.hasNext();)o.add(a.next());this.intersectChains()},e.prototype.intersectChains=function(){for(var i=this,o=new _he(this._segInt),a=this._monoChains.iterator();a.hasNext();)for(var s=a.next(),l=i._index.query(s.getEnvelope()),u=l.iterator();u.hasNext();){var p=u.next();if(p.getId()>s.getId()&&(s.computeOverlaps(p,o),i._nOverlaps++),i._segInt.isDone())return null}},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},r.SegmentOverlapAction.get=function(){return _he},Object.defineProperties(e,r),e}(dA),_he=function(t){function e(){t.call(this),this._si=null;var r=arguments[0];this._si=r}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.overlap=function(){if(arguments.length===4){var n=arguments[0],i=arguments[1],o=arguments[2],a=arguments[3],s=n.getContext(),l=o.getContext();this._si.processIntersections(s,i,l,a)}else return t.prototype.overlap.apply(this,arguments)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(fA),To=function t(){if(this._quadrantSegments=t.DEFAULT_QUADRANT_SEGMENTS,this._endCapStyle=t.CAP_ROUND,this._joinStyle=t.JOIN_ROUND,this._mitreLimit=t.DEFAULT_MITRE_LIMIT,this._isSingleSided=!1,this._simplifyFactor=t.DEFAULT_SIMPLIFY_FACTOR,arguments.length!==0){if(arguments.length===1){var e=arguments[0];this.setQuadrantSegments(e)}else if(arguments.length===2){var r=arguments[0],n=arguments[1];this.setQuadrantSegments(r),this.setEndCapStyle(n)}else if(arguments.length===4){var i=arguments[0],o=arguments[1],a=arguments[2],s=arguments[3];this.setQuadrantSegments(i),this.setEndCapStyle(o),this.setJoinStyle(a),this.setMitreLimit(s)}}},mv={CAP_ROUND:{configurable:!0},CAP_FLAT:{configurable:!0},CAP_SQUARE:{configurable:!0},JOIN_ROUND:{configurable:!0},JOIN_MITRE:{configurable:!0},JOIN_BEVEL:{configurable:!0},DEFAULT_QUADRANT_SEGMENTS:{configurable:!0},DEFAULT_MITRE_LIMIT:{configurable:!0},DEFAULT_SIMPLIFY_FACTOR:{configurable:!0}};To.prototype.getEndCapStyle=function(){return this._endCapStyle};To.prototype.isSingleSided=function(){return this._isSingleSided};To.prototype.setQuadrantSegments=function(e){this._quadrantSegments=e,this._quadrantSegments===0&&(this._joinStyle=To.JOIN_BEVEL),this._quadrantSegments<0&&(this._joinStyle=To.JOIN_MITRE,this._mitreLimit=Math.abs(this._quadrantSegments)),e<=0&&(this._quadrantSegments=1),this._joinStyle!==To.JOIN_ROUND&&(this._quadrantSegments=To.DEFAULT_QUADRANT_SEGMENTS)};To.prototype.getJoinStyle=function(){return this._joinStyle};To.prototype.setJoinStyle=function(e){this._joinStyle=e};To.prototype.setSimplifyFactor=function(e){this._simplifyFactor=e<0?0:e};To.prototype.getSimplifyFactor=function(){return this._simplifyFactor};To.prototype.getQuadrantSegments=function(){return this._quadrantSegments};To.prototype.setEndCapStyle=function(e){this._endCapStyle=e};To.prototype.getMitreLimit=function(){return this._mitreLimit};To.prototype.setMitreLimit=function(e){this._mitreLimit=e};To.prototype.setSingleSided=function(e){this._isSingleSided=e};To.prototype.interfaces_=function(){return[]};To.prototype.getClass=function(){return To};To.bufferDistanceError=function(e){var r=Math.PI/2/e;return 1-Math.cos(r/2)};mv.CAP_ROUND.get=function(){return 1};mv.CAP_FLAT.get=function(){return 2};mv.CAP_SQUARE.get=function(){return 3};mv.JOIN_ROUND.get=function(){return 1};mv.JOIN_MITRE.get=function(){return 2};mv.JOIN_BEVEL.get=function(){return 3};mv.DEFAULT_QUADRANT_SEGMENTS.get=function(){return 8};mv.DEFAULT_MITRE_LIMIT.get=function(){return 5};mv.DEFAULT_SIMPLIFY_FACTOR.get=function(){return .01};Object.defineProperties(To,mv);var na=function(e){this._distanceTol=null,this._isDeleted=null,this._angleOrientation=En.COUNTERCLOCKWISE,this._inputLine=e||null},hA={INIT:{configurable:!0},DELETE:{configurable:!0},KEEP:{configurable:!0},NUM_PTS_TO_CHECK:{configurable:!0}};na.prototype.isDeletable=function(e,r,n,i){var o=this._inputLine[e],a=this._inputLine[r],s=this._inputLine[n];return!this.isConcave(o,a,s)||!this.isShallow(o,a,s,i)?!1:this.isShallowSampled(o,a,e,n,i)};na.prototype.deleteShallowConcavities=function(){for(var e=this,r=1,n=this.findNextNonDeletedIndex(r),i=this.findNextNonDeletedIndex(n),o=!1;i<this._inputLine.length;){var a=!1;e.isDeletable(r,n,i,e._distanceTol)&&(e._isDeleted[n]=na.DELETE,a=!0,o=!0),a?r=i:r=n,n=e.findNextNonDeletedIndex(r),i=e.findNextNonDeletedIndex(n)}return o};na.prototype.isShallowConcavity=function(e,r,n,i){var o=En.computeOrientation(e,r,n),a=o===this._angleOrientation;if(!a)return!1;var s=En.distancePointLine(r,e,n);return s<i};na.prototype.isShallowSampled=function(e,r,n,i,o){var a=this,s=Math.trunc((i-n)/na.NUM_PTS_TO_CHECK);s<=0&&(s=1);for(var l=n;l<i;l+=s)if(!a.isShallow(e,r,a._inputLine[l],o))return!1;return!0};na.prototype.isConcave=function(e,r,n){var i=En.computeOrientation(e,r,n),o=i===this._angleOrientation;return o};na.prototype.simplify=function(e){var r=this;this._distanceTol=Math.abs(e),e<0&&(this._angleOrientation=En.CLOCKWISE),this._isDeleted=new Array(this._inputLine.length).fill(null);var n=!1;do n=r.deleteShallowConcavities();while(n);return this.collapseLine()};na.prototype.findNextNonDeletedIndex=function(e){for(var r=e+1;r<this._inputLine.length&&this._isDeleted[r]===na.DELETE;)r++;return r};na.prototype.isShallow=function(e,r,n,i){var o=En.distancePointLine(r,e,n);return o<i};na.prototype.collapseLine=function(){for(var e=this,r=new tA,n=0;n<this._inputLine.length;n++)e._isDeleted[n]!==na.DELETE&&r.add(e._inputLine[n]);return r.toCoordinateArray()};na.prototype.interfaces_=function(){return[]};na.prototype.getClass=function(){return na};na.simplify=function(e,r){var n=new na(e);return n.simplify(r)};hA.INIT.get=function(){return 0};hA.DELETE.get=function(){return 1};hA.KEEP.get=function(){return 1};hA.NUM_PTS_TO_CHECK.get=function(){return 10};Object.defineProperties(na,hA);var df=function(){this._ptList=null,this._precisionModel=null,this._minimimVertexDistance=0,this._ptList=new xn},bhe={COORDINATE_ARRAY_TYPE:{configurable:!0}};df.prototype.getCoordinates=function(){var e=this._ptList.toArray(df.COORDINATE_ARRAY_TYPE);return e};df.prototype.setPrecisionModel=function(e){this._precisionModel=e};df.prototype.addPt=function(e){var r=new ar(e);if(this._precisionModel.makePrecise(r),this.isRedundant(r))return null;this._ptList.add(r)};df.prototype.revere=function(){};df.prototype.addPts=function(e,r){var n=this;if(r)for(var i=0;i<e.length;i++)n.addPt(e[i]);else for(var o=e.length-1;o>=0;o--)n.addPt(e[o])};df.prototype.isRedundant=function(e){if(this._ptList.size()<1)return!1;var r=this._ptList.get(this._ptList.size()-1),n=e.distance(r);return n<this._minimimVertexDistance};df.prototype.toString=function(){var e=new Yi,r=e.createLineString(this.getCoordinates());return r.toString()};df.prototype.closeRing=function(){if(this._ptList.size()<1)return null;var e=new ar(this._ptList.get(0)),r=this._ptList.get(this._ptList.size()-1);if(e.equals(r))return null;this._ptList.add(e)};df.prototype.setMinimumVertexDistance=function(e){this._minimimVertexDistance=e};df.prototype.interfaces_=function(){return[]};df.prototype.getClass=function(){return df};bhe.COORDINATE_ARRAY_TYPE.get=function(){return new Array(0).fill(null)};Object.defineProperties(df,bhe);var to=function(){},Nb={PI_TIMES_2:{configurable:!0},PI_OVER_2:{configurable:!0},PI_OVER_4:{configurable:!0},COUNTERCLOCKWISE:{configurable:!0},CLOCKWISE:{configurable:!0},NONE:{configurable:!0}};to.prototype.interfaces_=function(){return[]};to.prototype.getClass=function(){return to};to.toDegrees=function(e){return e*180/Math.PI};to.normalize=function(e){for(;e>Math.PI;)e-=to.PI_TIMES_2;for(;e<=-Math.PI;)e+=to.PI_TIMES_2;return e};to.angle=function(){if(arguments.length===1){var e=arguments[0];return Math.atan2(e.y,e.x)}else if(arguments.length===2){var r=arguments[0],n=arguments[1],i=n.x-r.x,o=n.y-r.y;return Math.atan2(o,i)}};to.isAcute=function(e,r,n){var i=e.x-r.x,o=e.y-r.y,a=n.x-r.x,s=n.y-r.y,l=i*a+o*s;return l>0};to.isObtuse=function(e,r,n){var i=e.x-r.x,o=e.y-r.y,a=n.x-r.x,s=n.y-r.y,l=i*a+o*s;return l<0};to.interiorAngle=function(e,r,n){var i=to.angle(r,e),o=to.angle(r,n);return Math.abs(o-i)};to.normalizePositive=function(e){if(e<0){for(;e<0;)e+=to.PI_TIMES_2;e>=to.PI_TIMES_2&&(e=0)}else{for(;e>=to.PI_TIMES_2;)e-=to.PI_TIMES_2;e<0&&(e=0)}return e};to.angleBetween=function(e,r,n){var i=to.angle(r,e),o=to.angle(r,n);return to.diff(i,o)};to.diff=function(e,r){var n=null;return e<r?n=r-e:n=e-r,n>Math.PI&&(n=2*Math.PI-n),n};to.toRadians=function(e){return e*Math.PI/180};to.getTurn=function(e,r){var n=Math.sin(r-e);return n>0?to.COUNTERCLOCKWISE:n<0?to.CLOCKWISE:to.NONE};to.angleBetweenOriented=function(e,r,n){var i=to.angle(r,e),o=to.angle(r,n),a=o-i;return a<=-Math.PI?a+to.PI_TIMES_2:a>Math.PI?a-to.PI_TIMES_2:a};Nb.PI_TIMES_2.get=function(){return 2*Math.PI};Nb.PI_OVER_2.get=function(){return Math.PI/2};Nb.PI_OVER_4.get=function(){return Math.PI/4};Nb.COUNTERCLOCKWISE.get=function(){return En.COUNTERCLOCKWISE};Nb.CLOCKWISE.get=function(){return En.CLOCKWISE};Nb.NONE.get=function(){return En.COLLINEAR};Object.defineProperties(to,Nb);var Ts=function t(){this._maxCurveSegmentError=0,this._filletAngleQuantum=null,this._closingSegLengthFactor=1,this._segList=null,this._distance=0,this._precisionModel=null,this._bufParams=null,this._li=null,this._s0=null,this._s1=null,this._s2=null,this._seg0=new qn,this._seg1=new qn,this._offset0=new qn,this._offset1=new qn,this._side=0,this._hasNarrowConcaveAngle=!1;var e=arguments[0],r=arguments[1],n=arguments[2];this._precisionModel=e,this._bufParams=r,this._li=new r_,this._filletAngleQuantum=Math.PI/2/r.getQuadrantSegments(),r.getQuadrantSegments()>=8&&r.getJoinStyle()===To.JOIN_ROUND&&(this._closingSegLengthFactor=t.MAX_CLOSING_SEG_LEN_FACTOR),this.init(n)},pA={OFFSET_SEGMENT_SEPARATION_FACTOR:{configurable:!0},INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR:{configurable:!0},CURVE_VERTEX_SNAP_DISTANCE_FACTOR:{configurable:!0},MAX_CLOSING_SEG_LEN_FACTOR:{configurable:!0}};Ts.prototype.addNextSegment=function(e,r){if(this._s0=this._s1,this._s1=this._s2,this._s2=e,this._seg0.setCoordinates(this._s0,this._s1),this.computeOffsetSegment(this._seg0,this._side,this._distance,this._offset0),this._seg1.setCoordinates(this._s1,this._s2),this.computeOffsetSegment(this._seg1,this._side,this._distance,this._offset1),this._s1.equals(this._s2))return null;var n=En.computeOrientation(this._s0,this._s1,this._s2),i=n===En.CLOCKWISE&&this._side===cn.LEFT||n===En.COUNTERCLOCKWISE&&this._side===cn.RIGHT;n===0?this.addCollinear(r):i?this.addOutsideTurn(n,r):this.addInsideTurn(n,r)};Ts.prototype.addLineEndCap=function(e,r){var n=new qn(e,r),i=new qn;this.computeOffsetSegment(n,cn.LEFT,this._distance,i);var o=new qn;this.computeOffsetSegment(n,cn.RIGHT,this._distance,o);var a=r.x-e.x,s=r.y-e.y,l=Math.atan2(s,a);switch(this._bufParams.getEndCapStyle()){case To.CAP_ROUND:this._segList.addPt(i.p1),this.addFilletArc(r,l+Math.PI/2,l-Math.PI/2,En.CLOCKWISE,this._distance),this._segList.addPt(o.p1);break;case To.CAP_FLAT:this._segList.addPt(i.p1),this._segList.addPt(o.p1);break;case To.CAP_SQUARE:var u=new ar;u.x=Math.abs(this._distance)*Math.cos(l),u.y=Math.abs(this._distance)*Math.sin(l);var p=new ar(i.p1.x+u.x,i.p1.y+u.y),m=new ar(o.p1.x+u.x,o.p1.y+u.y);this._segList.addPt(p),this._segList.addPt(m);break}};Ts.prototype.getCoordinates=function(){var e=this._segList.getCoordinates();return e};Ts.prototype.addMitreJoin=function(e,r,n,i){var o=!0,a=null;try{a=ah.intersection(r.p0,r.p1,n.p0,n.p1);var s=i<=0?1:a.distance(e)/Math.abs(i);s>this._bufParams.getMitreLimit()&&(o=!1)}catch(l){if(l instanceof LE)a=new ar(0,0),o=!1;else throw l}finally{}o?this._segList.addPt(a):this.addLimitedMitreJoin(r,n,i,this._bufParams.getMitreLimit())};Ts.prototype.addFilletCorner=function(e,r,n,i,o){var a=r.x-e.x,s=r.y-e.y,l=Math.atan2(s,a),u=n.x-e.x,p=n.y-e.y,m=Math.atan2(p,u);i===En.CLOCKWISE?l<=m&&(l+=2*Math.PI):l>=m&&(l-=2*Math.PI),this._segList.addPt(r),this.addFilletArc(e,l,m,i,o),this._segList.addPt(n)};Ts.prototype.addOutsideTurn=function(e,r){if(this._offset0.p1.distance(this._offset1.p0)<this._distance*Ts.OFFSET_SEGMENT_SEPARATION_FACTOR)return this._segList.addPt(this._offset0.p1),null;this._bufParams.getJoinStyle()===To.JOIN_MITRE?this.addMitreJoin(this._s1,this._offset0,this._offset1,this._distance):this._bufParams.getJoinStyle()===To.JOIN_BEVEL?this.addBevelJoin(this._offset0,this._offset1):(r&&this._segList.addPt(this._offset0.p1),this.addFilletCorner(this._s1,this._offset0.p1,this._offset1.p0,e,this._distance),this._segList.addPt(this._offset1.p0))};Ts.prototype.createSquare=function(e){this._segList.addPt(new ar(e.x+this._distance,e.y+this._distance)),this._segList.addPt(new ar(e.x+this._distance,e.y-this._distance)),this._segList.addPt(new ar(e.x-this._distance,e.y-this._distance)),this._segList.addPt(new ar(e.x-this._distance,e.y+this._distance)),this._segList.closeRing()};Ts.prototype.addSegments=function(e,r){this._segList.addPts(e,r)};Ts.prototype.addFirstSegment=function(){this._segList.addPt(this._offset1.p0)};Ts.prototype.addLastSegment=function(){this._segList.addPt(this._offset1.p1)};Ts.prototype.initSideSegments=function(e,r,n){this._s1=e,this._s2=r,this._side=n,this._seg1.setCoordinates(e,r),this.computeOffsetSegment(this._seg1,n,this._distance,this._offset1)};Ts.prototype.addLimitedMitreJoin=function(e,r,n,i){var o=this._seg0.p1,a=to.angle(o,this._seg0.p0),s=to.angleBetweenOriented(this._seg0.p0,o,this._seg1.p1),l=s/2,u=to.normalize(a+l),p=to.normalize(u+Math.PI),m=i*n,v=m*Math.abs(Math.sin(l)),x=n-v,y=o.x+m*Math.cos(p),_=o.y+m*Math.sin(p),w=new ar(y,_),C=new qn(o,w),E=C.pointAlongOffset(1,x),T=C.pointAlongOffset(1,-x);this._side===cn.LEFT?(this._segList.addPt(E),this._segList.addPt(T)):(this._segList.addPt(T),this._segList.addPt(E))};Ts.prototype.computeOffsetSegment=function(e,r,n,i){var o=r===cn.LEFT?1:-1,a=e.p1.x-e.p0.x,s=e.p1.y-e.p0.y,l=Math.sqrt(a*a+s*s),u=o*n*a/l,p=o*n*s/l;i.p0.x=e.p0.x-p,i.p0.y=e.p0.y+u,i.p1.x=e.p1.x-p,i.p1.y=e.p1.y+u};Ts.prototype.addFilletArc=function(e,r,n,i,o){var a=this,s=i===En.CLOCKWISE?-1:1,l=Math.abs(r-n),u=Math.trunc(l/this._filletAngleQuantum+.5);if(u<1)return null;for(var p=0,m=l/u,v=p,x=new ar;v<l;){var y=r+s*v;x.x=e.x+o*Math.cos(y),x.y=e.y+o*Math.sin(y),a._segList.addPt(x),v+=m}};Ts.prototype.addInsideTurn=function(e,r){if(this._li.computeIntersection(this._offset0.p0,this._offset0.p1,this._offset1.p0,this._offset1.p1),this._li.hasIntersection())this._segList.addPt(this._li.getIntersection(0));else if(this._hasNarrowConcaveAngle=!0,this._offset0.p1.distance(this._offset1.p0)<this._distance*Ts.INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR)this._segList.addPt(this._offset0.p1);else{if(this._segList.addPt(this._offset0.p1),this._closingSegLengthFactor>0){var n=new ar((this._closingSegLengthFactor*this._offset0.p1.x+this._s1.x)/(this._closingSegLengthFactor+1),(this._closingSegLengthFactor*this._offset0.p1.y+this._s1.y)/(this._closingSegLengthFactor+1));this._segList.addPt(n);var i=new ar((this._closingSegLengthFactor*this._offset1.p0.x+this._s1.x)/(this._closingSegLengthFactor+1),(this._closingSegLengthFactor*this._offset1.p0.y+this._s1.y)/(this._closingSegLengthFactor+1));this._segList.addPt(i)}else this._segList.addPt(this._s1);this._segList.addPt(this._offset1.p0)}};Ts.prototype.createCircle=function(e){var r=new ar(e.x+this._distance,e.y);this._segList.addPt(r),this.addFilletArc(e,0,2*Math.PI,-1,this._distance),this._segList.closeRing()};Ts.prototype.addBevelJoin=function(e,r){this._segList.addPt(e.p1),this._segList.addPt(r.p0)};Ts.prototype.init=function(e){this._distance=e,this._maxCurveSegmentError=e*(1-Math.cos(this._filletAngleQuantum/2)),this._segList=new df,this._segList.setPrecisionModel(this._precisionModel),this._segList.setMinimumVertexDistance(e*Ts.CURVE_VERTEX_SNAP_DISTANCE_FACTOR)};Ts.prototype.addCollinear=function(e){this._li.computeIntersection(this._s0,this._s1,this._s1,this._s2);var r=this._li.getIntersectionNum();r>=2&&(this._bufParams.getJoinStyle()===To.JOIN_BEVEL||this._bufParams.getJoinStyle()===To.JOIN_MITRE?(e&&this._segList.addPt(this._offset0.p1),this._segList.addPt(this._offset1.p0)):this.addFilletCorner(this._s1,this._offset0.p1,this._offset1.p0,En.CLOCKWISE,this._distance))};Ts.prototype.closeRing=function(){this._segList.closeRing()};Ts.prototype.hasNarrowConcaveAngle=function(){return this._hasNarrowConcaveAngle};Ts.prototype.interfaces_=function(){return[]};Ts.prototype.getClass=function(){return Ts};pA.OFFSET_SEGMENT_SEPARATION_FACTOR.get=function(){return .001};pA.INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR.get=function(){return .001};pA.CURVE_VERTEX_SNAP_DISTANCE_FACTOR.get=function(){return 1e-6};pA.MAX_CLOSING_SEG_LEN_FACTOR.get=function(){return 80};Object.defineProperties(Ts,pA);var Yc=function(){this._distance=0,this._precisionModel=null,this._bufParams=null;var e=arguments[0],r=arguments[1];this._precisionModel=e,this._bufParams=r};Yc.prototype.getOffsetCurve=function(e,r){if(this._distance=r,r===0)return null;var n=r<0,i=Math.abs(r),o=this.getSegGen(i);e.length<=1?this.computePointCurve(e[0],o):this.computeOffsetCurve(e,n,o);var a=o.getCoordinates();return n&&Ui.reverse(a),a};Yc.prototype.computeSingleSidedBufferCurve=function(e,r,n){var i=this.simplifyTolerance(this._distance);if(r){n.addSegments(e,!0);var o=na.simplify(e,-i),a=o.length-1;n.initSideSegments(o[a],o[a-1],cn.LEFT),n.addFirstSegment();for(var s=a-2;s>=0;s--)n.addNextSegment(o[s],!0)}else{n.addSegments(e,!1);var l=na.simplify(e,i),u=l.length-1;n.initSideSegments(l[0],l[1],cn.LEFT),n.addFirstSegment();for(var p=2;p<=u;p++)n.addNextSegment(l[p],!0)}n.addLastSegment(),n.closeRing()};Yc.prototype.computeRingBufferCurve=function(e,r,n){var i=this.simplifyTolerance(this._distance);r===cn.RIGHT&&(i=-i);var o=na.simplify(e,i),a=o.length-1;n.initSideSegments(o[a-1],o[0],r);for(var s=1;s<=a;s++){var l=s!==1;n.addNextSegment(o[s],l)}n.closeRing()};Yc.prototype.computeLineBufferCurve=function(e,r){var n=this.simplifyTolerance(this._distance),i=na.simplify(e,n),o=i.length-1;r.initSideSegments(i[0],i[1],cn.LEFT);for(var a=2;a<=o;a++)r.addNextSegment(i[a],!0);r.addLastSegment(),r.addLineEndCap(i[o-1],i[o]);var s=na.simplify(e,-n),l=s.length-1;r.initSideSegments(s[l],s[l-1],cn.LEFT);for(var u=l-2;u>=0;u--)r.addNextSegment(s[u],!0);r.addLastSegment(),r.addLineEndCap(s[1],s[0]),r.closeRing()};Yc.prototype.computePointCurve=function(e,r){switch(this._bufParams.getEndCapStyle()){case To.CAP_ROUND:r.createCircle(e);break;case To.CAP_SQUARE:r.createSquare(e);break}};Yc.prototype.getLineCurve=function(e,r){if(this._distance=r,r<0&&!this._bufParams.isSingleSided()||r===0)return null;var n=Math.abs(r),i=this.getSegGen(n);if(e.length<=1)this.computePointCurve(e[0],i);else if(this._bufParams.isSingleSided()){var o=r<0;this.computeSingleSidedBufferCurve(e,o,i)}else this.computeLineBufferCurve(e,i);var a=i.getCoordinates();return a};Yc.prototype.getBufferParameters=function(){return this._bufParams};Yc.prototype.simplifyTolerance=function(e){return e*this._bufParams.getSimplifyFactor()};Yc.prototype.getRingCurve=function(e,r,n){if(this._distance=n,e.length<=2)return this.getLineCurve(e,n);if(n===0)return Yc.copyCoordinates(e);var i=this.getSegGen(n);return this.computeRingBufferCurve(e,r,i),i.getCoordinates()};Yc.prototype.computeOffsetCurve=function(e,r,n){var i=this.simplifyTolerance(this._distance);if(r){var o=na.simplify(e,-i),a=o.length-1;n.initSideSegments(o[a],o[a-1],cn.LEFT),n.addFirstSegment();for(var s=a-2;s>=0;s--)n.addNextSegment(o[s],!0)}else{var l=na.simplify(e,i),u=l.length-1;n.initSideSegments(l[0],l[1],cn.LEFT),n.addFirstSegment();for(var p=2;p<=u;p++)n.addNextSegment(l[p],!0)}n.addLastSegment()};Yc.prototype.getSegGen=function(e){return new Ts(this._precisionModel,this._bufParams,e)};Yc.prototype.interfaces_=function(){return[]};Yc.prototype.getClass=function(){return Yc};Yc.copyCoordinates=function(e){for(var r=new Array(e.length).fill(null),n=0;n<r.length;n++)r[n]=new ar(e[n]);return r};var $b=function(){this._subgraphs=null,this._seg=new qn,this._cga=new En;var e=arguments[0];this._subgraphs=e},whe={DepthSegment:{configurable:!0}};$b.prototype.findStabbedSegments=function(){var e=this;if(arguments.length===1){for(var r=arguments[0],n=new xn,i=this._subgraphs.iterator();i.hasNext();){var o=i.next(),a=o.getEnvelope();r.y<a.getMinY()||r.y>a.getMaxY()||e.findStabbedSegments(r,o.getDirectedEdges(),n)}return n}else if(arguments.length===3){if(ai(arguments[2],ch)&&arguments[0]instanceof ar&&arguments[1]instanceof TH)for(var s=arguments[0],l=arguments[1],u=arguments[2],p=l.getEdge().getCoordinates(),m=0;m<p.length-1;m++){e._seg.p0=p[m],e._seg.p1=p[m+1],e._seg.p0.y>e._seg.p1.y&&e._seg.reverse();var v=Math.max(e._seg.p0.x,e._seg.p1.x);if(!(v<s.x)&&!e._seg.isHorizontal()&&!(s.y<e._seg.p0.y||s.y>e._seg.p1.y)&&En.computeOrientation(e._seg.p0,e._seg.p1,s)!==En.RIGHT){var x=l.getDepth(cn.LEFT);e._seg.p0.equals(p[m])||(x=l.getDepth(cn.RIGHT));var y=new a_(e._seg,x);u.add(y)}}else if(ai(arguments[2],ch)&&arguments[0]instanceof ar&&ai(arguments[1],ch))for(var _=arguments[0],w=arguments[1],C=arguments[2],E=w.iterator();E.hasNext();){var T=E.next();!T.isForward()||e.findStabbedSegments(_,T,C)}}};$b.prototype.getDepth=function(e){var r=this.findStabbedSegments(e);if(r.size()===0)return 0;var n=hh.min(r);return n._leftDepth};$b.prototype.interfaces_=function(){return[]};$b.prototype.getClass=function(){return $b};whe.DepthSegment.get=function(){return a_};Object.defineProperties($b,whe);var a_=function(){this._upwardSeg=null,this._leftDepth=null;var e=arguments[0],r=arguments[1];this._upwardSeg=new qn(e),this._leftDepth=r};a_.prototype.compareTo=function(e){var r=e;if(this._upwardSeg.minX()>=r._upwardSeg.maxX())return 1;if(this._upwardSeg.maxX()<=r._upwardSeg.minX())return-1;var n=this._upwardSeg.orientationIndex(r._upwardSeg);return n!==0||(n=-1*r._upwardSeg.orientationIndex(this._upwardSeg),n!==0)?n:this._upwardSeg.compareTo(r._upwardSeg)};a_.prototype.compareX=function(e,r){var n=e.p0.compareTo(r.p0);return n!==0?n:e.p1.compareTo(r.p1)};a_.prototype.toString=function(){return this._upwardSeg.toString()};a_.prototype.interfaces_=function(){return[sd]};a_.prototype.getClass=function(){return a_};var Po=function(e,r,n){this.p0=e||null,this.p1=r||null,this.p2=n||null};Po.prototype.area=function(){return Po.area(this.p0,this.p1,this.p2)};Po.prototype.signedArea=function(){return Po.signedArea(this.p0,this.p1,this.p2)};Po.prototype.interpolateZ=function(e){if(e===null)throw new Ls;return Po.interpolateZ(e,this.p0,this.p1,this.p2)};Po.prototype.longestSideLength=function(){return Po.longestSideLength(this.p0,this.p1,this.p2)};Po.prototype.isAcute=function(){return Po.isAcute(this.p0,this.p1,this.p2)};Po.prototype.circumcentre=function(){return Po.circumcentre(this.p0,this.p1,this.p2)};Po.prototype.area3D=function(){return Po.area3D(this.p0,this.p1,this.p2)};Po.prototype.centroid=function(){return Po.centroid(this.p0,this.p1,this.p2)};Po.prototype.inCentre=function(){return Po.inCentre(this.p0,this.p1,this.p2)};Po.prototype.interfaces_=function(){return[]};Po.prototype.getClass=function(){return Po};Po.area=function(e,r,n){return Math.abs(((n.x-e.x)*(r.y-e.y)-(r.x-e.x)*(n.y-e.y))/2)};Po.signedArea=function(e,r,n){return((n.x-e.x)*(r.y-e.y)-(r.x-e.x)*(n.y-e.y))/2};Po.det=function(e,r,n,i){return e*i-r*n};Po.interpolateZ=function(e,r,n,i){var o=r.x,a=r.y,s=n.x-o,l=i.x-o,u=n.y-a,p=i.y-a,m=s*p-l*u,v=e.x-o,x=e.y-a,y=(p*v-l*x)/m,_=(-u*v+s*x)/m,w=r.z+y*(n.z-r.z)+_*(i.z-r.z);return w};Po.longestSideLength=function(e,r,n){var i=e.distance(r),o=r.distance(n),a=n.distance(e),s=i;return o>s&&(s=o),a>s&&(s=a),s};Po.isAcute=function(e,r,n){return!(!to.isAcute(e,r,n)||!to.isAcute(r,n,e)||!to.isAcute(n,e,r))};Po.circumcentre=function(e,r,n){var i=n.x,o=n.y,a=e.x-i,s=e.y-o,l=r.x-i,u=r.y-o,p=2*Po.det(a,s,l,u),m=Po.det(s,a*a+s*s,u,l*l+u*u),v=Po.det(a,a*a+s*s,l,l*l+u*u),x=i-m/p,y=o+v/p;return new ar(x,y)};Po.perpendicularBisector=function(e,r){var n=r.x-e.x,i=r.y-e.y,o=new ah(e.x+n/2,e.y+i/2,1),a=new ah(e.x-i+n/2,e.y+n+i/2,1);return new ah(o,a)};Po.angleBisector=function(e,r,n){var i=r.distance(e),o=r.distance(n),a=i/(i+o),s=n.x-e.x,l=n.y-e.y,u=new ar(e.x+a*s,e.y+a*l);return u};Po.area3D=function(e,r,n){var i=r.x-e.x,o=r.y-e.y,a=r.z-e.z,s=n.x-e.x,l=n.y-e.y,u=n.z-e.z,p=o*u-a*l,m=a*s-i*u,v=i*l-o*s,x=p*p+m*m+v*v,y=Math.sqrt(x)/2;return y};Po.centroid=function(e,r,n){var i=(e.x+r.x+n.x)/3,o=(e.y+r.y+n.y)/3;return new ar(i,o)};Po.inCentre=function(e,r,n){var i=r.distance(n),o=e.distance(n),a=e.distance(r),s=i+o+a,l=(i*e.x+o*r.x+a*n.x)/s,u=(i*e.y+o*r.y+a*n.y)/s;return new ar(l,u)};var dd=function(){this._inputGeom=null,this._distance=null,this._curveBuilder=null,this._curveList=new xn;var e=arguments[0],r=arguments[1],n=arguments[2];this._inputGeom=e,this._distance=r,this._curveBuilder=n};dd.prototype.addPoint=function(e){if(this._distance<=0)return null;var r=e.getCoordinates(),n=this._curveBuilder.getLineCurve(r,this._distance);this.addCurve(n,ur.EXTERIOR,ur.INTERIOR)};dd.prototype.addPolygon=function(e){var r=this,n=this._distance,i=cn.LEFT;this._distance<0&&(n=-this._distance,i=cn.RIGHT);var o=e.getExteriorRing(),a=Ui.removeRepeatedPoints(o.getCoordinates());if(this._distance<0&&this.isErodedCompletely(o,this._distance)||this._distance<=0&&a.length<3)return null;this.addPolygonRing(a,n,i,ur.EXTERIOR,ur.INTERIOR);for(var s=0;s<e.getNumInteriorRing();s++){var l=e.getInteriorRingN(s),u=Ui.removeRepeatedPoints(l.getCoordinates());r._distance>0&&r.isErodedCompletely(l,-r._distance)||r.addPolygonRing(u,n,cn.opposite(i),ur.INTERIOR,ur.EXTERIOR)}};dd.prototype.isTriangleErodedCompletely=function(e,r){var n=new Po(e[0],e[1],e[2]),i=n.inCentre(),o=En.distancePointLine(i,n.p0,n.p1);return o<Math.abs(r)};dd.prototype.addLineString=function(e){if(this._distance<=0&&!this._curveBuilder.getBufferParameters().isSingleSided())return null;var r=Ui.removeRepeatedPoints(e.getCoordinates()),n=this._curveBuilder.getLineCurve(r,this._distance);this.addCurve(n,ur.EXTERIOR,ur.INTERIOR)};dd.prototype.addCurve=function(e,r,n){if(e===null||e.length<2)return null;var i=new ya(e,new Bo(0,ur.BOUNDARY,r,n));this._curveList.add(i)};dd.prototype.getCurves=function(){return this.add(this._inputGeom),this._curveList};dd.prototype.addPolygonRing=function(e,r,n,i,o){if(r===0&&e.length<jm.MINIMUM_VALID_SIZE)return null;var a=i,s=o;e.length>=jm.MINIMUM_VALID_SIZE&&En.isCCW(e)&&(a=o,s=i,n=cn.opposite(n));var l=this._curveBuilder.getRingCurve(e,n,r);this.addCurve(l,a,s)};dd.prototype.add=function(e){if(e.isEmpty())return null;e instanceof Ka?this.addPolygon(e):e instanceof ra?this.addLineString(e):e instanceof Du?this.addPoint(e):e instanceof VE?this.addCollection(e):e instanceof o_?this.addCollection(e):e instanceof Um?this.addCollection(e):e instanceof Ec&&this.addCollection(e)};dd.prototype.isErodedCompletely=function(e,r){var n=e.getCoordinates();if(n.length<4)return r<0;if(n.length===4)return this.isTriangleErodedCompletely(n,r);var i=e.getEnvelopeInternal(),o=Math.min(i.getHeight(),i.getWidth());return r<0&&2*Math.abs(r)>o};dd.prototype.addCollection=function(e){for(var r=this,n=0;n<e.getNumGeometries();n++){var i=e.getGeometryN(n);r.add(i)}};dd.prototype.interfaces_=function(){return[]};dd.prototype.getClass=function(){return dd};var qE=function(){};qE.prototype.locate=function(e){};qE.prototype.interfaces_=function(){return[]};qE.prototype.getClass=function(){return qE};var Wm=function(){this._parent=null,this._atStart=null,this._max=null,this._index=null,this._subcollectionIterator=null;var e=arguments[0];this._parent=e,this._atStart=!0,this._index=0,this._max=e.getNumGeometries()};Wm.prototype.next=function(){if(this._atStart)return this._atStart=!1,Wm.isAtomic(this._parent)&&this._index++,this._parent;if(this._subcollectionIterator!==null){if(this._subcollectionIterator.hasNext())return this._subcollectionIterator.next();this._subcollectionIterator=null}if(this._index>=this._max)throw new jE;var e=this._parent.getGeometryN(this._index++);return e instanceof Ec?(this._subcollectionIterator=new Wm(e),this._subcollectionIterator.next()):e};Wm.prototype.remove=function(){throw new Error(this.getClass().getName())};Wm.prototype.hasNext=function(){if(this._atStart)return!0;if(this._subcollectionIterator!==null){if(this._subcollectionIterator.hasNext())return!0;this._subcollectionIterator=null}return!(this._index>=this._max)};Wm.prototype.interfaces_=function(){return[BE]};Wm.prototype.getClass=function(){return Wm};Wm.isAtomic=function(e){return!(e instanceof Ec)};var hf=function(){this._geom=null;var e=arguments[0];this._geom=e};hf.prototype.locate=function(e){return hf.locate(e,this._geom)};hf.prototype.interfaces_=function(){return[qE]};hf.prototype.getClass=function(){return hf};hf.isPointInRing=function(e,r){return r.getEnvelopeInternal().intersects(e)?En.isPointInRing(e,r.getCoordinates()):!1};hf.containsPointInPolygon=function(e,r){if(r.isEmpty())return!1;var n=r.getExteriorRing();if(!hf.isPointInRing(e,n))return!1;for(var i=0;i<r.getNumInteriorRing();i++){var o=r.getInteriorRingN(i);if(hf.isPointInRing(e,o))return!1}return!0};hf.containsPoint=function(e,r){if(r instanceof Ka)return hf.containsPointInPolygon(e,r);if(r instanceof Ec)for(var n=new Wm(r);n.hasNext();){var i=n.next();if(i!==r&&hf.containsPoint(e,i))return!0}return!1};hf.locate=function(e,r){return r.isEmpty()?ur.EXTERIOR:hf.containsPoint(e,r)?ur.INTERIOR:ur.EXTERIOR};var nc=function(){this._edgeMap=new tc,this._edgeList=null,this._ptInAreaLocation=[ur.NONE,ur.NONE]};nc.prototype.getNextCW=function(e){this.getEdges();var r=this._edgeList.indexOf(e),n=r-1;return r===0&&(n=this._edgeList.size()-1),this._edgeList.get(n)};nc.prototype.propagateSideLabels=function(e){for(var r=ur.NONE,n=this.iterator();n.hasNext();){var i=n.next(),o=i.getLabel();o.isArea(e)&&o.getLocation(e,cn.LEFT)!==ur.NONE&&(r=o.getLocation(e,cn.LEFT))}if(r===ur.NONE)return null;for(var a=r,s=this.iterator();s.hasNext();){var l=s.next(),u=l.getLabel();if(u.getLocation(e,cn.ON)===ur.NONE&&u.setLocation(e,cn.ON,a),u.isArea(e)){var p=u.getLocation(e,cn.LEFT),m=u.getLocation(e,cn.RIGHT);if(m!==ur.NONE){if(m!==a)throw new hv("side location conflict",l.getCoordinate());p===ur.NONE&&Ti.shouldNeverReachHere("found single null side (at "+l.getCoordinate()+")"),a=p}else Ti.isTrue(u.getLocation(e,cn.LEFT)===ur.NONE,"found single null side"),u.setLocation(e,cn.RIGHT,a),u.setLocation(e,cn.LEFT,a)}}};nc.prototype.getCoordinate=function(){var e=this.iterator();if(!e.hasNext())return null;var r=e.next();return r.getCoordinate()};nc.prototype.print=function(e){Bl.out.println("EdgeEndStar: "+this.getCoordinate());for(var r=this.iterator();r.hasNext();){var n=r.next();n.print(e)}};nc.prototype.isAreaLabelsConsistent=function(e){return this.computeEdgeEndLabels(e.getBoundaryNodeRule()),this.checkAreaLabelsConsistent(0)};nc.prototype.checkAreaLabelsConsistent=function(e){var r=this.getEdges();if(r.size()<=0)return!0;var n=r.size()-1,i=r.get(n).getLabel(),o=i.getLocation(e,cn.LEFT);Ti.isTrue(o!==ur.NONE,"Found unlabelled area edge");for(var a=o,s=this.iterator();s.hasNext();){var l=s.next(),u=l.getLabel();Ti.isTrue(u.isArea(e),"Found non-area edge");var p=u.getLocation(e,cn.LEFT),m=u.getLocation(e,cn.RIGHT);if(p===m||m!==a)return!1;a=p}return!0};nc.prototype.findIndex=function(e){var r=this;this.iterator();for(var n=0;n<this._edgeList.size();n++){var i=r._edgeList.get(n);if(i===e)return n}return-1};nc.prototype.iterator=function(){return this.getEdges().iterator()};nc.prototype.getEdges=function(){return this._edgeList===null&&(this._edgeList=new xn(this._edgeMap.values())),this._edgeList};nc.prototype.getLocation=function(e,r,n){return this._ptInAreaLocation[e]===ur.NONE&&(this._ptInAreaLocation[e]=hf.locate(r,n[e].getGeometry())),this._ptInAreaLocation[e]};nc.prototype.toString=function(){var e=new vp;e.append("EdgeEndStar: "+this.getCoordinate()),e.append(` `);for(var r=this.iterator();r.hasNext();){var n=r.next();e.append(n),e.append(` `)}return e.toString()};nc.prototype.computeEdgeEndLabels=function(e){for(var r=this.iterator();r.hasNext();){var n=r.next();n.computeLabel(e)}};nc.prototype.computeLabelling=function(e){var r=this;this.computeEdgeEndLabels(e[0].getBoundaryNodeRule()),this.propagateSideLabels(0),this.propagateSideLabels(1);for(var n=[!1,!1],i=this.iterator();i.hasNext();)for(var o=i.next(),a=o.getLabel(),s=0;s<2;s++)a.isLine(s)&&a.getLocation(s)===ur.BOUNDARY&&(n[s]=!0);for(var l=this.iterator();l.hasNext();)for(var u=l.next(),p=u.getLabel(),m=0;m<2;m++)if(p.isAnyNull(m)){var v=ur.NONE;if(n[m])v=ur.EXTERIOR;else{var x=u.getCoordinate();v=r.getLocation(m,x,e)}p.setAllLocationsIfNull(m,v)}};nc.prototype.getDegree=function(){return this._edgeMap.size()};nc.prototype.insertEdgeEnd=function(e,r){this._edgeMap.put(e,r),this._edgeList=null};nc.prototype.interfaces_=function(){return[]};nc.prototype.getClass=function(){return nc};var jxt=function(t){function e(){t.call(this),this._resultAreaEdgeList=null,this._label=null,this._SCANNING_FOR_INCOMING=1,this._LINKING_TO_OUTGOING=2}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.linkResultDirectedEdges=function(){var n=this;this.getResultAreaEdges();for(var i=null,o=null,a=this._SCANNING_FOR_INCOMING,s=0;s<this._resultAreaEdgeList.size();s++){var l=n._resultAreaEdgeList.get(s),u=l.getSym();if(!!l.getLabel().isArea())switch(i===null&&l.isInResult()&&(i=l),a){case n._SCANNING_FOR_INCOMING:if(!u.isInResult())continue;o=u,a=n._LINKING_TO_OUTGOING;break;case n._LINKING_TO_OUTGOING:if(!l.isInResult())continue;o.setNext(l),a=n._SCANNING_FOR_INCOMING;break}}if(a===this._LINKING_TO_OUTGOING){if(i===null)throw new hv("no outgoing dirEdge found",this.getCoordinate());Ti.isTrue(i.isInResult(),"unable to link last incoming dirEdge"),o.setNext(i)}},e.prototype.insert=function(n){var i=n;this.insertEdgeEnd(i,i)},e.prototype.getRightmostEdge=function(){var n=this.getEdges(),i=n.size();if(i<1)return null;var o=n.get(0);if(i===1)return o;var a=n.get(i-1),s=o.getQuadrant(),l=a.getQuadrant();return Jo.isNorthern(s)&&Jo.isNorthern(l)?o:!Jo.isNorthern(s)&&!Jo.isNorthern(l)?a:o.getDy()!==0?o:a.getDy()!==0?a:(Ti.shouldNeverReachHere("found two horizontal edges incident on node"),null)},e.prototype.print=function(n){Bl.out.println("DirectedEdgeStar: "+this.getCoordinate());for(var i=this.iterator();i.hasNext();){var o=i.next();n.print("out "),o.print(n),n.println(),n.print("in "),o.getSym().print(n),n.println()}},e.prototype.getResultAreaEdges=function(){var n=this;if(this._resultAreaEdgeList!==null)return this._resultAreaEdgeList;this._resultAreaEdgeList=new xn;for(var i=this.iterator();i.hasNext();){var o=i.next();(o.isInResult()||o.getSym().isInResult())&&n._resultAreaEdgeList.add(o)}return this._resultAreaEdgeList},e.prototype.updateLabelling=function(n){for(var i=this.iterator();i.hasNext();){var o=i.next(),a=o.getLabel();a.setAllLocationsIfNull(0,n.getLocation(0)),a.setAllLocationsIfNull(1,n.getLocation(1))}},e.prototype.linkAllDirectedEdges=function(){var n=this;this.getEdges();for(var i=null,o=null,a=this._edgeList.size()-1;a>=0;a--){var s=n._edgeList.get(a),l=s.getSym();o===null&&(o=l),i!==null&&l.setNext(i),i=s}o.setNext(i)},e.prototype.computeDepths=function(){var n=this;if(arguments.length===1){var i=arguments[0],o=this.findIndex(i),a=i.getDepth(cn.LEFT),s=i.getDepth(cn.RIGHT),l=this.computeDepths(o+1,this._edgeList.size(),a),u=this.computeDepths(0,o,l);if(u!==s)throw new hv("depth mismatch at "+i.getCoordinate())}else if(arguments.length===3){for(var p=arguments[0],m=arguments[1],v=arguments[2],x=v,y=p;y<m;y++){var _=n._edgeList.get(y);_.setEdgeDepths(cn.RIGHT,x),x=_.getDepth(cn.LEFT)}return x}},e.prototype.mergeSymLabels=function(){for(var n=this.iterator();n.hasNext();){var i=n.next(),o=i.getLabel();o.merge(i.getSym().getLabel())}},e.prototype.linkMinimalDirectedEdges=function(n){for(var i=this,o=null,a=null,s=this._SCANNING_FOR_INCOMING,l=this._resultAreaEdgeList.size()-1;l>=0;l--){var u=i._resultAreaEdgeList.get(l),p=u.getSym();switch(o===null&&u.getEdgeRing()===n&&(o=u),s){case i._SCANNING_FOR_INCOMING:if(p.getEdgeRing()!==n)continue;a=p,s=i._LINKING_TO_OUTGOING;break;case i._LINKING_TO_OUTGOING:if(u.getEdgeRing()!==n)continue;a.setNextMin(u),s=i._SCANNING_FOR_INCOMING;break}}s===this._LINKING_TO_OUTGOING&&(Ti.isTrue(o!==null,"found null for first outgoing dirEdge"),Ti.isTrue(o.getEdgeRing()===n,"unable to link last incoming dirEdge"),a.setNextMin(o))},e.prototype.getOutgoingDegree=function(){if(arguments.length===0){for(var n=0,i=this.iterator();i.hasNext();){var o=i.next();o.isInResult()&&n++}return n}else if(arguments.length===1){for(var a=arguments[0],s=0,l=this.iterator();l.hasNext();){var u=l.next();u.getEdgeRing()===a&&s++}return s}},e.prototype.getLabel=function(){return this._label},e.prototype.findCoveredLineEdges=function(){for(var n=ur.NONE,i=this.iterator();i.hasNext();){var o=i.next(),a=o.getSym();if(!o.isLineEdge()){if(o.isInResult()){n=ur.INTERIOR;break}if(a.isInResult()){n=ur.EXTERIOR;break}}}if(n===ur.NONE)return null;for(var s=n,l=this.iterator();l.hasNext();){var u=l.next(),p=u.getSym();u.isLineEdge()?u.getEdge().setCovered(s===ur.INTERIOR):(u.isInResult()&&(s=ur.EXTERIOR),p.isInResult()&&(s=ur.INTERIOR))}},e.prototype.computeLabelling=function(n){var i=this;t.prototype.computeLabelling.call(this,n),this._label=new Bo(ur.NONE);for(var o=this.iterator();o.hasNext();)for(var a=o.next(),s=a.getEdge(),l=s.getLabel(),u=0;u<2;u++){var p=l.getLocation(u);(p===ur.INTERIOR||p===ur.BOUNDARY)&&i._label.setLocation(u,ur.INTERIOR)}},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(nc),Che=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createNode=function(n){return new G5(n,new jxt)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(HE),zy=function t(){this._pts=null,this._orientation=null;var e=arguments[0];this._pts=e,this._orientation=t.orientation(e)};zy.prototype.compareTo=function(e){var r=e,n=zy.compareOriented(this._pts,this._orientation,r._pts,r._orientation);return n};zy.prototype.interfaces_=function(){return[sd]};zy.prototype.getClass=function(){return zy};zy.orientation=function(e){return Ui.increasingDirection(e)===1};zy.compareOriented=function(e,r,n,i){for(var o=r?1:-1,a=i?1:-1,s=r?e.length:-1,l=i?n.length:-1,u=r?0:e.length-1,p=i?0:n.length-1;;){var m=e[u].compareTo(n[p]);if(m!==0)return m;u+=o,p+=a;var v=u===s,x=p===l;if(v&&!x)return-1;if(!v&&x)return 1;if(v&&x)return 0}};var ph=function(){this._edges=new xn,this._ocaMap=new tc};ph.prototype.print=function(e){var r=this;e.print("MULTILINESTRING ( ");for(var n=0;n<this._edges.size();n++){var i=r._edges.get(n);n>0&&e.print(","),e.print("(");for(var o=i.getCoordinates(),a=0;a<o.length;a++)a>0&&e.print(","),e.print(o[a].x+" "+o[a].y);e.println(")")}e.print(") ")};ph.prototype.addAll=function(e){for(var r=this,n=e.iterator();n.hasNext();)r.add(n.next())};ph.prototype.findEdgeIndex=function(e){for(var r=this,n=0;n<this._edges.size();n++)if(r._edges.get(n).equals(e))return n;return-1};ph.prototype.iterator=function(){return this._edges.iterator()};ph.prototype.getEdges=function(){return this._edges};ph.prototype.get=function(e){return this._edges.get(e)};ph.prototype.findEqualEdge=function(e){var r=new zy(e.getCoordinates()),n=this._ocaMap.get(r);return n};ph.prototype.add=function(e){this._edges.add(e);var r=new zy(e.getCoordinates());this._ocaMap.put(r,e)};ph.prototype.interfaces_=function(){return[]};ph.prototype.getClass=function(){return ph};var l_=function(){};l_.prototype.processIntersections=function(e,r,n,i){};l_.prototype.isDone=function(){};l_.prototype.interfaces_=function(){return[]};l_.prototype.getClass=function(){return l_};var pf=function(){this._hasIntersection=!1,this._hasProper=!1,this._hasProperInterior=!1,this._hasInterior=!1,this._properIntersectionPoint=null,this._li=null,this._isSelfIntersection=null,this.numIntersections=0,this.numInteriorIntersections=0,this.numProperIntersections=0,this.numTests=0;var e=arguments[0];this._li=e};pf.prototype.isTrivialIntersection=function(e,r,n,i){if(e===n&&this._li.getIntersectionNum()===1){if(pf.isAdjacentSegments(r,i))return!0;if(e.isClosed()){var o=e.size()-1;if(r===0&&i===o||i===0&&r===o)return!0}}return!1};pf.prototype.getProperIntersectionPoint=function(){return this._properIntersectionPoint};pf.prototype.hasProperInteriorIntersection=function(){return this._hasProperInterior};pf.prototype.getLineIntersector=function(){return this._li};pf.prototype.hasProperIntersection=function(){return this._hasProper};pf.prototype.processIntersections=function(e,r,n,i){if(e===n&&r===i)return null;this.numTests++;var o=e.getCoordinates()[r],a=e.getCoordinates()[r+1],s=n.getCoordinates()[i],l=n.getCoordinates()[i+1];this._li.computeIntersection(o,a,s,l),this._li.hasIntersection()&&(this.numIntersections++,this._li.isInteriorIntersection()&&(this.numInteriorIntersections++,this._hasInterior=!0),this.isTrivialIntersection(e,r,n,i)||(this._hasIntersection=!0,e.addIntersections(this._li,r,0),n.addIntersections(this._li,i,1),this._li.isProper()&&(this.numProperIntersections++,this._hasProper=!0,this._hasProperInterior=!0)))};pf.prototype.hasIntersection=function(){return this._hasIntersection};pf.prototype.isDone=function(){return!1};pf.prototype.hasInteriorIntersection=function(){return this._hasInterior};pf.prototype.interfaces_=function(){return[l_]};pf.prototype.getClass=function(){return pf};pf.isAdjacentSegments=function(e,r){return Math.abs(e-r)===1};var Ip=function(){this.coord=null,this.segmentIndex=null,this.dist=null;var e=arguments[0],r=arguments[1],n=arguments[2];this.coord=new ar(e),this.segmentIndex=r,this.dist=n};Ip.prototype.getSegmentIndex=function(){return this.segmentIndex};Ip.prototype.getCoordinate=function(){return this.coord};Ip.prototype.print=function(e){e.print(this.coord),e.print(" seg # = "+this.segmentIndex),e.println(" dist = "+this.dist)};Ip.prototype.compareTo=function(e){var r=e;return this.compare(r.segmentIndex,r.dist)};Ip.prototype.isEndPoint=function(e){return this.segmentIndex===0&&this.dist===0||this.segmentIndex===e};Ip.prototype.toString=function(){return this.coord+" seg # = "+this.segmentIndex+" dist = "+this.dist};Ip.prototype.getDistance=function(){return this.dist};Ip.prototype.compare=function(e,r){return this.segmentIndex<e?-1:this.segmentIndex>e?1:this.dist<r?-1:this.dist>r?1:0};Ip.prototype.interfaces_=function(){return[sd]};Ip.prototype.getClass=function(){return Ip};var Gm=function(){this._nodeMap=new tc,this.edge=null;var e=arguments[0];this.edge=e};Gm.prototype.print=function(e){e.println("Intersections:");for(var r=this.iterator();r.hasNext();){var n=r.next();n.print(e)}};Gm.prototype.iterator=function(){return this._nodeMap.values().iterator()};Gm.prototype.addSplitEdges=function(e){var r=this;this.addEndpoints();for(var n=this.iterator(),i=n.next();n.hasNext();){var o=n.next(),a=r.createSplitEdge(i,o);e.add(a),i=o}};Gm.prototype.addEndpoints=function(){var e=this.edge.pts.length-1;this.add(this.edge.pts[0],0,0),this.add(this.edge.pts[e],e,0)};Gm.prototype.createSplitEdge=function(e,r){var n=this,i=r.segmentIndex-e.segmentIndex+2,o=this.edge.pts[r.segmentIndex],a=r.dist>0||!r.coord.equals2D(o);a||i--;var s=new Array(i).fill(null),l=0;s[l++]=new ar(e.coord);for(var u=e.segmentIndex+1;u<=r.segmentIndex;u++)s[l++]=n.edge.pts[u];return a&&(s[l]=r.coord),new X5(s,new Bo(this.edge._label))};Gm.prototype.add=function(e,r,n){var i=new Ip(e,r,n),o=this._nodeMap.get(i);return o!==null?o:(this._nodeMap.put(i,i),i)};Gm.prototype.isIntersection=function(e){for(var r=this.iterator();r.hasNext();){var n=r.next();if(n.coord.equals(e))return!0}return!1};Gm.prototype.interfaces_=function(){return[]};Gm.prototype.getClass=function(){return Gm};var c_=function(){};c_.prototype.getChainStartIndices=function(e){var r=this,n=0,i=new xn;i.add(new yp(n));do{var o=r.findChainEnd(e,n);i.add(new yp(o)),n=o}while(n<e.length-1);var a=c_.toIntArray(i);return a};c_.prototype.findChainEnd=function(e,r){for(var n=Jo.quadrant(e[r],e[r+1]),i=r+1;i<e.length;){var o=Jo.quadrant(e[i-1],e[i]);if(o!==n)break;i++}return i-1};c_.prototype.interfaces_=function(){return[]};c_.prototype.getClass=function(){return c_};c_.toIntArray=function(e){for(var r=new Array(e.size()).fill(null),n=0;n<r.length;n++)r[n]=e.get(n).intValue();return r};var gv=function(){this.e=null,this.pts=null,this.startIndex=null,this.env1=new Un,this.env2=new Un;var e=arguments[0];this.e=e,this.pts=e.getCoordinates();var r=new c_;this.startIndex=r.getChainStartIndices(this.pts)};gv.prototype.getCoordinates=function(){return this.pts};gv.prototype.getMaxX=function(e){var r=this.pts[this.startIndex[e]].x,n=this.pts[this.startIndex[e+1]].x;return r>n?r:n};gv.prototype.getMinX=function(e){var r=this.pts[this.startIndex[e]].x,n=this.pts[this.startIndex[e+1]].x;return r<n?r:n};gv.prototype.computeIntersectsForChain=function(){if(arguments.length===4){var e=arguments[0],r=arguments[1],n=arguments[2],i=arguments[3];this.computeIntersectsForChain(this.startIndex[e],this.startIndex[e+1],r,r.startIndex[n],r.startIndex[n+1],i)}else if(arguments.length===6){var o=arguments[0],a=arguments[1],s=arguments[2],l=arguments[3],u=arguments[4],p=arguments[5],m=this.pts[o],v=this.pts[a],x=s.pts[l],y=s.pts[u];if(a-o==1&&u-l==1)return p.addIntersections(this.e,o,s.e,l),null;if(this.env1.init(m,v),this.env2.init(x,y),!this.env1.intersects(this.env2))return null;var _=Math.trunc((o+a)/2),w=Math.trunc((l+u)/2);o<_&&(l<w&&this.computeIntersectsForChain(o,_,s,l,w,p),w<u&&this.computeIntersectsForChain(o,_,s,w,u,p)),_<a&&(l<w&&this.computeIntersectsForChain(_,a,s,l,w,p),w<u&&this.computeIntersectsForChain(_,a,s,w,u,p))}};gv.prototype.getStartIndexes=function(){return this.startIndex};gv.prototype.computeIntersects=function(e,r){for(var n=this,i=0;i<this.startIndex.length-1;i++)for(var o=0;o<e.startIndex.length-1;o++)n.computeIntersectsForChain(i,e,o,r)};gv.prototype.interfaces_=function(){return[]};gv.prototype.getClass=function(){return gv};var jl=function t(){var e=this;this._depth=Array(2).fill().map(function(){return Array(3)});for(var r=0;r<2;r++)for(var n=0;n<3;n++)e._depth[r][n]=t.NULL_VALUE},Ehe={NULL_VALUE:{configurable:!0}};jl.prototype.getDepth=function(e,r){return this._depth[e][r]};jl.prototype.setDepth=function(e,r,n){this._depth[e][r]=n};jl.prototype.isNull=function(){var e=this;if(arguments.length===0){for(var r=0;r<2;r++)for(var n=0;n<3;n++)if(e._depth[r][n]!==jl.NULL_VALUE)return!1;return!0}else if(arguments.length===1){var i=arguments[0];return this._depth[i][1]===jl.NULL_VALUE}else if(arguments.length===2){var o=arguments[0],a=arguments[1];return this._depth[o][a]===jl.NULL_VALUE}};jl.prototype.normalize=function(){for(var e=this,r=0;r<2;r++)if(!e.isNull(r)){var n=e._depth[r][1];e._depth[r][2]<n&&(n=e._depth[r][2]),n<0&&(n=0);for(var i=1;i<3;i++){var o=0;e._depth[r][i]>n&&(o=1),e._depth[r][i]=o}}};jl.prototype.getDelta=function(e){return this._depth[e][cn.RIGHT]-this._depth[e][cn.LEFT]};jl.prototype.getLocation=function(e,r){return this._depth[e][r]<=0?ur.EXTERIOR:ur.INTERIOR};jl.prototype.toString=function(){return"A: "+this._depth[0][1]+","+this._depth[0][2]+" B: "+this._depth[1][1]+","+this._depth[1][2]};jl.prototype.add=function(){var e=this;if(arguments.length===1)for(var r=arguments[0],n=0;n<2;n++)for(var i=1;i<3;i++){var o=r.getLocation(n,i);(o===ur.EXTERIOR||o===ur.INTERIOR)&&(e.isNull(n,i)?e._depth[n][i]=jl.depthAtLocation(o):e._depth[n][i]+=jl.depthAtLocation(o))}else if(arguments.length===3){var a=arguments[0],s=arguments[1],l=arguments[2];l===ur.INTERIOR&&this._depth[a][s]++}};jl.prototype.interfaces_=function(){return[]};jl.prototype.getClass=function(){return jl};jl.depthAtLocation=function(e){return e===ur.EXTERIOR?0:e===ur.INTERIOR?1:jl.NULL_VALUE};Ehe.NULL_VALUE.get=function(){return-1};Object.defineProperties(jl,Ehe);var X5=function(t){function e(){if(t.call(this),this.pts=null,this._env=null,this.eiList=new Gm(this),this._name=null,this._mce=null,this._isIsolated=!0,this._depth=new jl,this._depthDelta=0,arguments.length===1){var r=arguments[0];e.call(this,r,null)}else if(arguments.length===2){var n=arguments[0],i=arguments[1];this.pts=n,this._label=i}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDepth=function(){return this._depth},e.prototype.getCollapsedEdge=function(){var n=new Array(2).fill(null);n[0]=this.pts[0],n[1]=this.pts[1];var i=new e(n,Bo.toLineLabel(this._label));return i},e.prototype.isIsolated=function(){return this._isIsolated},e.prototype.getCoordinates=function(){return this.pts},e.prototype.setIsolated=function(n){this._isIsolated=n},e.prototype.setName=function(n){this._name=n},e.prototype.equals=function(n){var i=this;if(!(n instanceof e))return!1;var o=n;if(this.pts.length!==o.pts.length)return!1;for(var a=!0,s=!0,l=this.pts.length,u=0;u<this.pts.length;u++)if(i.pts[u].equals2D(o.pts[u])||(a=!1),i.pts[u].equals2D(o.pts[--l])||(s=!1),!a&&!s)return!1;return!0},e.prototype.getCoordinate=function(){if(arguments.length===0)return this.pts.length>0?this.pts[0]:null;if(arguments.length===1){var n=arguments[0];return this.pts[n]}},e.prototype.print=function(n){var i=this;n.print("edge "+this._name+": "),n.print("LINESTRING (");for(var o=0;o<this.pts.length;o++)o>0&&n.print(","),n.print(i.pts[o].x+" "+i.pts[o].y);n.print(") "+this._label+" "+this._depthDelta)},e.prototype.computeIM=function(n){e.updateIM(this._label,n)},e.prototype.isCollapsed=function(){return!this._label.isArea()||this.pts.length!==3?!1:!!this.pts[0].equals(this.pts[2])},e.prototype.isClosed=function(){return this.pts[0].equals(this.pts[this.pts.length-1])},e.prototype.getMaximumSegmentIndex=function(){return this.pts.length-1},e.prototype.getDepthDelta=function(){return this._depthDelta},e.prototype.getNumPoints=function(){return this.pts.length},e.prototype.printReverse=function(n){var i=this;n.print("edge "+this._name+": ");for(var o=this.pts.length-1;o>=0;o--)n.print(i.pts[o]+" ");n.println("")},e.prototype.getMonotoneChainEdge=function(){return this._mce===null&&(this._mce=new gv(this)),this._mce},e.prototype.getEnvelope=function(){var n=this;if(this._env===null){this._env=new Un;for(var i=0;i<this.pts.length;i++)n._env.expandToInclude(n.pts[i])}return this._env},e.prototype.addIntersection=function(n,i,o,a){var s=new ar(n.getIntersection(a)),l=i,u=n.getEdgeDistance(o,a),p=l+1;if(p<this.pts.length){var m=this.pts[p];s.equals2D(m)&&(l=p,u=0)}this.eiList.add(s,l,u)},e.prototype.toString=function(){var n=this,i=new vp;i.append("edge "+this._name+": "),i.append("LINESTRING (");for(var o=0;o<this.pts.length;o++)o>0&&i.append(","),i.append(n.pts[o].x+" "+n.pts[o].y);return i.append(") "+this._label+" "+this._depthDelta),i.toString()},e.prototype.isPointwiseEqual=function(n){var i=this;if(this.pts.length!==n.pts.length)return!1;for(var o=0;o<this.pts.length;o++)if(!i.pts[o].equals2D(n.pts[o]))return!1;return!0},e.prototype.setDepthDelta=function(n){this._depthDelta=n},e.prototype.getEdgeIntersectionList=function(){return this.eiList},e.prototype.addIntersections=function(n,i,o){for(var a=this,s=0;s<n.getIntersectionNum();s++)a.addIntersection(n,i,o,s)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e.updateIM=function(){if(arguments.length===2){var n=arguments[0],i=arguments[1];i.setAtLeastIfValid(n.getLocation(0,cn.ON),n.getLocation(1,cn.ON),1),n.isArea()&&(i.setAtLeastIfValid(n.getLocation(0,cn.LEFT),n.getLocation(1,cn.LEFT),2),i.setAtLeastIfValid(n.getLocation(0,cn.RIGHT),n.getLocation(1,cn.RIGHT),2))}else return t.prototype.updateIM.apply(this,arguments)},e}(ff),Pc=function(e){this._workingPrecisionModel=null,this._workingNoder=null,this._geomFact=null,this._graph=null,this._edgeList=new ph,this._bufParams=e||null};Pc.prototype.setWorkingPrecisionModel=function(e){this._workingPrecisionModel=e};Pc.prototype.insertUniqueEdge=function(e){var r=this._edgeList.findEqualEdge(e);if(r!==null){var n=r.getLabel(),i=e.getLabel();r.isPointwiseEqual(e)||(i=new Bo(e.getLabel()),i.flip()),n.merge(i);var o=Pc.depthDelta(i),a=r.getDepthDelta(),s=a+o;r.setDepthDelta(s)}else this._edgeList.add(e),e.setDepthDelta(Pc.depthDelta(e.getLabel()))};Pc.prototype.buildSubgraphs=function(e,r){for(var n=new xn,i=e.iterator();i.hasNext();){var o=i.next(),a=o.getRightmostCoordinate(),s=new $b(n),l=s.getDepth(a);o.computeDepth(l),o.findResultEdges(),n.add(o),r.add(o.getDirectedEdges(),o.getNodes())}};Pc.prototype.createSubgraphs=function(e){for(var r=new xn,n=e.getNodes().iterator();n.hasNext();){var i=n.next();if(!i.isVisited()){var o=new Sc;o.create(i),r.add(o)}}return hh.sort(r,hh.reverseOrder()),r};Pc.prototype.createEmptyResultGeometry=function(){var e=this._geomFact.createPolygon();return e};Pc.prototype.getNoder=function(e){if(this._workingNoder!==null)return this._workingNoder;var r=new PH,n=new r_;return n.setPrecisionModel(e),r.setSegmentIntersector(new pf(n)),r};Pc.prototype.buffer=function(e,r){var n=this._workingPrecisionModel;n===null&&(n=e.getPrecisionModel()),this._geomFact=e.getFactory();var i=new Yc(n,this._bufParams),o=new dd(e,r,i),a=o.getCurves();if(a.size()<=0)return this.createEmptyResultGeometry();this.computeNodedEdges(a,n),this._graph=new Gs(new Che),this._graph.addEdges(this._edgeList.getEdges());var s=this.createSubgraphs(this._graph),l=new Nu(this._geomFact);this.buildSubgraphs(s,l);var u=l.getPolygons();if(u.size()<=0)return this.createEmptyResultGeometry();var p=this._geomFact.buildGeometry(u);return p};Pc.prototype.computeNodedEdges=function(e,r){var n=this,i=this.getNoder(r);i.computeNodes(e);for(var o=i.getNodedSubstrings(),a=o.iterator();a.hasNext();){var s=a.next(),l=s.getCoordinates();if(!(l.length===2&&l[0].equals2D(l[1]))){var u=s.getData(),p=new X5(s.getCoordinates(),new Bo(u));n.insertUniqueEdge(p)}}};Pc.prototype.setNoder=function(e){this._workingNoder=e};Pc.prototype.interfaces_=function(){return[]};Pc.prototype.getClass=function(){return Pc};Pc.depthDelta=function(e){var r=e.getLocation(0,cn.LEFT),n=e.getLocation(0,cn.RIGHT);return r===ur.INTERIOR&&n===ur.EXTERIOR?1:r===ur.EXTERIOR&&n===ur.INTERIOR?-1:0};Pc.convertSegStrings=function(e){for(var r=new Yi,n=new xn;e.hasNext();){var i=e.next(),o=r.createLineString(i.getCoordinates());n.add(o)}return r.buildGeometry(n)};var By=function(){if(this._noder=null,this._scaleFactor=null,this._offsetX=null,this._offsetY=null,this._isScaled=!1,arguments.length===2){var e=arguments[0],r=arguments[1];this._noder=e,this._scaleFactor=r,this._offsetX=0,this._offsetY=0,this._isScaled=!this.isIntegerPrecision()}else if(arguments.length===4){var n=arguments[0],i=arguments[1],o=arguments[2],a=arguments[3];this._noder=n,this._scaleFactor=i,this._offsetX=o,this._offsetY=a,this._isScaled=!this.isIntegerPrecision()}};By.prototype.rescale=function(){var e=this;if(ai(arguments[0],Ya))for(var r=arguments[0],n=r.iterator();n.hasNext();){var i=n.next();e.rescale(i.getCoordinates())}else if(arguments[0]instanceof Array){for(var o=arguments[0],a=0;a<o.length;a++)o[a].x=o[a].x/e._scaleFactor+e._offsetX,o[a].y=o[a].y/e._scaleFactor+e._offsetY;o.length===2&&o[0].equals2D(o[1])&&Bl.out.println(o)}};By.prototype.scale=function(){var e=this;if(ai(arguments[0],Ya)){for(var r=arguments[0],n=new xn,i=r.iterator();i.hasNext();){var o=i.next();n.add(new ya(e.scale(o.getCoordinates()),o.getData()))}return n}else if(arguments[0]instanceof Array){for(var a=arguments[0],s=new Array(a.length).fill(null),l=0;l<a.length;l++)s[l]=new ar(Math.round((a[l].x-e._offsetX)*e._scaleFactor),Math.round((a[l].y-e._offsetY)*e._scaleFactor),a[l].z);var u=Ui.removeRepeatedPoints(s);return u}};By.prototype.isIntegerPrecision=function(){return this._scaleFactor===1};By.prototype.getNodedSubstrings=function(){var e=this._noder.getNodedSubstrings();return this._isScaled&&this.rescale(e),e};By.prototype.computeNodes=function(e){var r=e;this._isScaled&&(r=this.scale(e)),this._noder.computeNodes(r)};By.prototype.interfaces_=function(){return[s_]};By.prototype.getClass=function(){return By};var Mp=function(){this._li=new r_,this._segStrings=null;var e=arguments[0];this._segStrings=e},She={fact:{configurable:!0}};Mp.prototype.checkEndPtVertexIntersections=function(){var e=this;if(arguments.length===0)for(var r=this._segStrings.iterator();r.hasNext();){var n=r.next(),i=n.getCoordinates();e.checkEndPtVertexIntersections(i[0],e._segStrings),e.checkEndPtVertexIntersections(i[i.length-1],e._segStrings)}else if(arguments.length===2){for(var o=arguments[0],a=arguments[1],s=a.iterator();s.hasNext();)for(var l=s.next(),u=l.getCoordinates(),p=1;p<u.length-1;p++)if(u[p].equals(o))throw new lv("found endpt/interior pt intersection at index "+p+" :pt "+o)}};Mp.prototype.checkInteriorIntersections=function(){var e=this;if(arguments.length===0)for(var r=this._segStrings.iterator();r.hasNext();)for(var n=r.next(),i=this._segStrings.iterator();i.hasNext();){var o=i.next();e.checkInteriorIntersections(n,o)}else if(arguments.length===2)for(var a=arguments[0],s=arguments[1],l=a.getCoordinates(),u=s.getCoordinates(),p=0;p<l.length-1;p++)for(var m=0;m<u.length-1;m++)e.checkInteriorIntersections(a,p,s,m);else if(arguments.length===4){var v=arguments[0],x=arguments[1],y=arguments[2],_=arguments[3];if(v===y&&x===_)return null;var w=v.getCoordinates()[x],C=v.getCoordinates()[x+1],E=y.getCoordinates()[_],T=y.getCoordinates()[_+1];if(this._li.computeIntersection(w,C,E,T),this._li.hasIntersection()&&(this._li.isProper()||this.hasInteriorIntersection(this._li,w,C)||this.hasInteriorIntersection(this._li,E,T)))throw new lv("found non-noded intersection at "+w+"-"+C+" and "+E+"-"+T)}};Mp.prototype.checkValid=function(){this.checkEndPtVertexIntersections(),this.checkInteriorIntersections(),this.checkCollapses()};Mp.prototype.checkCollapses=function(){var e=this;if(arguments.length===0)for(var r=this._segStrings.iterator();r.hasNext();){var n=r.next();e.checkCollapses(n)}else if(arguments.length===1)for(var i=arguments[0],o=i.getCoordinates(),a=0;a<o.length-2;a++)e.checkCollapse(o[a],o[a+1],o[a+2])};Mp.prototype.hasInteriorIntersection=function(e,r,n){for(var i=0;i<e.getIntersectionNum();i++){var o=e.getIntersection(i);if(!(o.equals(r)||o.equals(n)))return!0}return!1};Mp.prototype.checkCollapse=function(e,r,n){if(e.equals(n))throw new lv("found non-noded collapse at "+Mp.fact.createLineString([e,r,n]))};Mp.prototype.interfaces_=function(){return[]};Mp.prototype.getClass=function(){return Mp};She.fact.get=function(){return new Yi};Object.defineProperties(Mp,She);var Kc=function(){this._li=null,this._pt=null,this._originalPt=null,this._ptScaled=null,this._p0Scaled=null,this._p1Scaled=null,this._scaleFactor=null,this._minx=null,this._maxx=null,this._miny=null,this._maxy=null,this._corner=new Array(4).fill(null),this._safeEnv=null;var e=arguments[0],r=arguments[1],n=arguments[2];if(this._originalPt=e,this._pt=e,this._scaleFactor=r,this._li=n,r<=0)throw new Ls;r!==1&&(this._pt=new ar(this.scale(e.x),this.scale(e.y)),this._p0Scaled=new ar,this._p1Scaled=new ar),this.initCorners(this._pt)},The={SAFE_ENV_EXPANSION_FACTOR:{configurable:!0}};Kc.prototype.intersectsScaled=function(e,r){var n=Math.min(e.x,r.x),i=Math.max(e.x,r.x),o=Math.min(e.y,r.y),a=Math.max(e.y,r.y),s=this._maxx<n||this._minx>i||this._maxy<o||this._miny>a;if(s)return!1;var l=this.intersectsToleranceSquare(e,r);return Ti.isTrue(!(s&&l),"Found bad envelope test"),l};Kc.prototype.initCorners=function(e){var r=.5;this._minx=e.x-r,this._maxx=e.x+r,this._miny=e.y-r,this._maxy=e.y+r,this._corner[0]=new ar(this._maxx,this._maxy),this._corner[1]=new ar(this._minx,this._maxy),this._corner[2]=new ar(this._minx,this._miny),this._corner[3]=new ar(this._maxx,this._miny)};Kc.prototype.intersects=function(e,r){return this._scaleFactor===1?this.intersectsScaled(e,r):(this.copyScaled(e,this._p0Scaled),this.copyScaled(r,this._p1Scaled),this.intersectsScaled(this._p0Scaled,this._p1Scaled))};Kc.prototype.scale=function(e){return Math.round(e*this._scaleFactor)};Kc.prototype.getCoordinate=function(){return this._originalPt};Kc.prototype.copyScaled=function(e,r){r.x=this.scale(e.x),r.y=this.scale(e.y)};Kc.prototype.getSafeEnvelope=function(){if(this._safeEnv===null){var e=Kc.SAFE_ENV_EXPANSION_FACTOR/this._scaleFactor;this._safeEnv=new Un(this._originalPt.x-e,this._originalPt.x+e,this._originalPt.y-e,this._originalPt.y+e)}return this._safeEnv};Kc.prototype.intersectsPixelClosure=function(e,r){return this._li.computeIntersection(e,r,this._corner[0],this._corner[1]),!!(this._li.hasIntersection()||(this._li.computeIntersection(e,r,this._corner[1],this._corner[2]),this._li.hasIntersection())||(this._li.computeIntersection(e,r,this._corner[2],this._corner[3]),this._li.hasIntersection())||(this._li.computeIntersection(e,r,this._corner[3],this._corner[0]),this._li.hasIntersection()))};Kc.prototype.intersectsToleranceSquare=function(e,r){var n=!1,i=!1;return this._li.computeIntersection(e,r,this._corner[0],this._corner[1]),!!(this._li.isProper()||(this._li.computeIntersection(e,r,this._corner[1],this._corner[2]),this._li.isProper())||(this._li.hasIntersection()&&(n=!0),this._li.computeIntersection(e,r,this._corner[2],this._corner[3]),this._li.isProper())||(this._li.hasIntersection()&&(i=!0),this._li.computeIntersection(e,r,this._corner[3],this._corner[0]),this._li.isProper())||n&&i||e.equals(this._pt)||r.equals(this._pt))};Kc.prototype.addSnappedNode=function(e,r){var n=e.getCoordinate(r),i=e.getCoordinate(r+1);return this.intersects(n,i)?(e.addIntersection(this.getCoordinate(),r),!0):!1};Kc.prototype.interfaces_=function(){return[]};Kc.prototype.getClass=function(){return Kc};The.SAFE_ENV_EXPANSION_FACTOR.get=function(){return .75};Object.defineProperties(Kc,The);var mA=function(){this.tempEnv1=new Un,this.selectedSegment=new qn};mA.prototype.select=function(){if(arguments.length!==1){if(arguments.length===2){var e=arguments[0],r=arguments[1];e.getLineSegment(r,this.selectedSegment),this.select(this.selectedSegment)}}};mA.prototype.interfaces_=function(){return[]};mA.prototype.getClass=function(){return mA};var XE=function(){this._index=null;var e=arguments[0];this._index=e},Phe={HotPixelSnapAction:{configurable:!0}};XE.prototype.snap=function(){if(arguments.length===1){var e=arguments[0];return this.snap(e,null,-1)}else if(arguments.length===3){var r=arguments[0],n=arguments[1],i=arguments[2],o=r.getSafeEnvelope(),a=new Ihe(r,n,i);return this._index.query(o,{interfaces_:function(){return[$y]},visitItem:function(s){var l=s;l.select(o,a)}}),a.isNodeAdded()}};XE.prototype.interfaces_=function(){return[]};XE.prototype.getClass=function(){return XE};Phe.HotPixelSnapAction.get=function(){return Ihe};Object.defineProperties(XE,Phe);var Ihe=function(t){function e(){t.call(this),this._hotPixel=null,this._parentEdge=null,this._hotPixelVertexIndex=null,this._isNodeAdded=!1;var r=arguments[0],n=arguments[1],i=arguments[2];this._hotPixel=r,this._parentEdge=n,this._hotPixelVertexIndex=i}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.isNodeAdded=function(){return this._isNodeAdded},e.prototype.select=function(){if(arguments.length===2){var n=arguments[0],i=arguments[1],o=n.getContext();if(this._parentEdge!==null&&o===this._parentEdge&&i===this._hotPixelVertexIndex)return null;this._isNodeAdded=this._hotPixel.addSnappedNode(o,i)}else return t.prototype.select.apply(this,arguments)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(mA),Fb=function(){this._li=null,this._interiorIntersections=null;var e=arguments[0];this._li=e,this._interiorIntersections=new xn};Fb.prototype.processIntersections=function(e,r,n,i){var o=this;if(e===n&&r===i)return null;var a=e.getCoordinates()[r],s=e.getCoordinates()[r+1],l=n.getCoordinates()[i],u=n.getCoordinates()[i+1];if(this._li.computeIntersection(a,s,l,u),this._li.hasIntersection()&&this._li.isInteriorIntersection()){for(var p=0;p<this._li.getIntersectionNum();p++)o._interiorIntersections.add(o._li.getIntersection(p));e.addIntersections(this._li,r,0),n.addIntersections(this._li,i,1)}};Fb.prototype.isDone=function(){return!1};Fb.prototype.getInteriorIntersections=function(){return this._interiorIntersections};Fb.prototype.interfaces_=function(){return[l_]};Fb.prototype.getClass=function(){return Fb};var qm=function(){this._pm=null,this._li=null,this._scaleFactor=null,this._noder=null,this._pointSnapper=null,this._nodedSegStrings=null;var e=arguments[0];this._pm=e,this._li=new r_,this._li.setPrecisionModel(e),this._scaleFactor=e.getScale()};qm.prototype.checkCorrectness=function(e){var r=ya.getNodedSubstrings(e),n=new Mp(r);try{n.checkValid()}catch(i){if(i instanceof lhe)i.printStackTrace();else throw i}finally{}};qm.prototype.getNodedSubstrings=function(){return ya.getNodedSubstrings(this._nodedSegStrings)};qm.prototype.snapRound=function(e,r){var n=this.findInteriorIntersections(e,r);this.computeIntersectionSnaps(n),this.computeVertexSnaps(e)};qm.prototype.findInteriorIntersections=function(e,r){var n=new Fb(r);return this._noder.setSegmentIntersector(n),this._noder.computeNodes(e),n.getInteriorIntersections()};qm.prototype.computeVertexSnaps=function(){var e=this;if(ai(arguments[0],Ya))for(var r=arguments[0],n=r.iterator();n.hasNext();){var i=n.next();e.computeVertexSnaps(i)}else if(arguments[0]instanceof ya)for(var o=arguments[0],a=o.getCoordinates(),s=0;s<a.length;s++){var l=new Kc(a[s],e._scaleFactor,e._li),u=e._pointSnapper.snap(l,o,s);u&&o.addIntersection(a[s],s)}};qm.prototype.computeNodes=function(e){this._nodedSegStrings=e,this._noder=new PH,this._pointSnapper=new XE(this._noder.getIndex()),this.snapRound(e,this._li)};qm.prototype.computeIntersectionSnaps=function(e){for(var r=this,n=e.iterator();n.hasNext();){var i=n.next(),o=new Kc(i,r._scaleFactor,r._li);r._pointSnapper.snap(o)}};qm.prototype.interfaces_=function(){return[s_]};qm.prototype.getClass=function(){return qm};var ic=function(){if(this._argGeom=null,this._distance=null,this._bufParams=new To,this._resultGeometry=null,this._saveException=null,arguments.length===1){var e=arguments[0];this._argGeom=e}else if(arguments.length===2){var r=arguments[0],n=arguments[1];this._argGeom=r,this._bufParams=n}},YE={CAP_ROUND:{configurable:!0},CAP_BUTT:{configurable:!0},CAP_FLAT:{configurable:!0},CAP_SQUARE:{configurable:!0},MAX_PRECISION_DIGITS:{configurable:!0}};ic.prototype.bufferFixedPrecision=function(e){var r=new By(new qm(new Oo(1)),e.getScale()),n=new Pc(this._bufParams);n.setWorkingPrecisionModel(e),n.setNoder(r),this._resultGeometry=n.buffer(this._argGeom,this._distance)};ic.prototype.bufferReducedPrecision=function(){var e=this;if(arguments.length===0){for(var r=ic.MAX_PRECISION_DIGITS;r>=0;r--){try{e.bufferReducedPrecision(r)}catch(a){if(a instanceof hv)e._saveException=a;else throw a}finally{}if(e._resultGeometry!==null)return null}throw this._saveException}else if(arguments.length===1){var n=arguments[0],i=ic.precisionScaleFactor(this._argGeom,this._distance,n),o=new Oo(i);this.bufferFixedPrecision(o)}};ic.prototype.computeGeometry=function(){if(this.bufferOriginalPrecision(),this._resultGeometry!==null)return null;var e=this._argGeom.getFactory().getPrecisionModel();e.getType()===Oo.FIXED?this.bufferFixedPrecision(e):this.bufferReducedPrecision()};ic.prototype.setQuadrantSegments=function(e){this._bufParams.setQuadrantSegments(e)};ic.prototype.bufferOriginalPrecision=function(){try{var e=new Pc(this._bufParams);this._resultGeometry=e.buffer(this._argGeom,this._distance)}catch(r){if(r instanceof lv)this._saveException=r;else throw r}finally{}};ic.prototype.getResultGeometry=function(e){return this._distance=e,this.computeGeometry(),this._resultGeometry};ic.prototype.setEndCapStyle=function(e){this._bufParams.setEndCapStyle(e)};ic.prototype.interfaces_=function(){return[]};ic.prototype.getClass=function(){return ic};ic.bufferOp=function(){if(arguments.length===2){var e=arguments[0],r=arguments[1],n=new ic(e),i=n.getResultGeometry(r);return i}else if(arguments.length===3){if(Number.isInteger(arguments[2])&&arguments[0]instanceof si&&typeof arguments[1]=="number"){var o=arguments[0],a=arguments[1],s=arguments[2],l=new ic(o);l.setQuadrantSegments(s);var u=l.getResultGeometry(a);return u}else if(arguments[2]instanceof To&&arguments[0]instanceof si&&typeof arguments[1]=="number"){var p=arguments[0],m=arguments[1],v=arguments[2],x=new ic(p,v),y=x.getResultGeometry(m);return y}}else if(arguments.length===4){var _=arguments[0],w=arguments[1],C=arguments[2],E=arguments[3],T=new ic(_);T.setQuadrantSegments(C),T.setEndCapStyle(E);var A=T.getResultGeometry(w);return A}};ic.precisionScaleFactor=function(e,r,n){var i=e.getEnvelopeInternal(),o=uf.max(Math.abs(i.getMaxX()),Math.abs(i.getMaxY()),Math.abs(i.getMinX()),Math.abs(i.getMinY())),a=r>0?r:0,s=o+2*a,l=Math.trunc(Math.log(s)/Math.log(10)+1),u=n-l,p=Math.pow(10,u);return p};YE.CAP_ROUND.get=function(){return To.CAP_ROUND};YE.CAP_BUTT.get=function(){return To.CAP_FLAT};YE.CAP_FLAT.get=function(){return To.CAP_FLAT};YE.CAP_SQUARE.get=function(){return To.CAP_SQUARE};YE.MAX_PRECISION_DIGITS.get=function(){return 12};Object.defineProperties(ic,YE);var Ic=function(){this._pt=[new ar,new ar],this._distance=mi.NaN,this._isNull=!0};Ic.prototype.getCoordinates=function(){return this._pt};Ic.prototype.getCoordinate=function(e){return this._pt[e]};Ic.prototype.setMinimum=function(){if(arguments.length===1){var e=arguments[0];this.setMinimum(e._pt[0],e._pt[1])}else if(arguments.length===2){var r=arguments[0],n=arguments[1];if(this._isNull)return this.initialize(r,n),null;var i=r.distance(n);i<this._distance&&this.initialize(r,n,i)}};Ic.prototype.initialize=function(){if(arguments.length===0)this._isNull=!0;else if(arguments.length===2){var e=arguments[0],r=arguments[1];this._pt[0].setCoordinate(e),this._pt[1].setCoordinate(r),this._distance=e.distance(r),this._isNull=!1}else if(arguments.length===3){var n=arguments[0],i=arguments[1],o=arguments[2];this._pt[0].setCoordinate(n),this._pt[1].setCoordinate(i),this._distance=o,this._isNull=!1}};Ic.prototype.getDistance=function(){return this._distance};Ic.prototype.setMaximum=function(){if(arguments.length===1){var e=arguments[0];this.setMaximum(e._pt[0],e._pt[1])}else if(arguments.length===2){var r=arguments[0],n=arguments[1];if(this._isNull)return this.initialize(r,n),null;var i=r.distance(n);i>this._distance&&this.initialize(r,n,i)}};Ic.prototype.interfaces_=function(){return[]};Ic.prototype.getClass=function(){return Ic};var Xm=function(){};Xm.prototype.interfaces_=function(){return[]};Xm.prototype.getClass=function(){return Xm};Xm.computeDistance=function(){if(arguments[2]instanceof Ic&&arguments[0]instanceof ra&&arguments[1]instanceof ar)for(var e=arguments[0],r=arguments[1],n=arguments[2],i=e.getCoordinates(),o=new qn,a=0;a<i.length-1;a++){o.setCoordinates(i[a],i[a+1]);var s=o.closestPoint(r);n.setMinimum(s,r)}else if(arguments[2]instanceof Ic&&arguments[0]instanceof Ka&&arguments[1]instanceof ar){var l=arguments[0],u=arguments[1],p=arguments[2];Xm.computeDistance(l.getExteriorRing(),u,p);for(var m=0;m<l.getNumInteriorRing();m++)Xm.computeDistance(l.getInteriorRingN(m),u,p)}else if(arguments[2]instanceof Ic&&arguments[0]instanceof si&&arguments[1]instanceof ar){var v=arguments[0],x=arguments[1],y=arguments[2];if(v instanceof ra)Xm.computeDistance(v,x,y);else if(v instanceof Ka)Xm.computeDistance(v,x,y);else if(v instanceof Ec)for(var _=v,w=0;w<_.getNumGeometries();w++){var C=_.getGeometryN(w);Xm.computeDistance(C,x,y)}else y.setMinimum(v.getCoordinate(),x)}else if(arguments[2]instanceof Ic&&arguments[0]instanceof qn&&arguments[1]instanceof ar){var E=arguments[0],T=arguments[1],A=arguments[2],k=E.closestPoint(T);A.setMinimum(k,T)}};var u_=function(e){this._maxPtDist=new Ic,this._inputGeom=e||null},IH={MaxPointDistanceFilter:{configurable:!0},MaxMidpointDistanceFilter:{configurable:!0}};u_.prototype.computeMaxMidpointDistance=function(e){var r=new jy(this._inputGeom);e.apply(r),this._maxPtDist.setMaximum(r.getMaxPointDistance())};u_.prototype.computeMaxVertexDistance=function(e){var r=new zb(this._inputGeom);e.apply(r),this._maxPtDist.setMaximum(r.getMaxPointDistance())};u_.prototype.findDistance=function(e){return this.computeMaxVertexDistance(e),this.computeMaxMidpointDistance(e),this._maxPtDist.getDistance()};u_.prototype.getDistancePoints=function(){return this._maxPtDist};u_.prototype.interfaces_=function(){return[]};u_.prototype.getClass=function(){return u_};IH.MaxPointDistanceFilter.get=function(){return zb};IH.MaxMidpointDistanceFilter.get=function(){return jy};Object.defineProperties(u_,IH);var zb=function(e){this._maxPtDist=new Ic,this._minPtDist=new Ic,this._geom=e||null};zb.prototype.filter=function(e){this._minPtDist.initialize(),Xm.computeDistance(this._geom,e,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)};zb.prototype.getMaxPointDistance=function(){return this._maxPtDist};zb.prototype.interfaces_=function(){return[Bm]};zb.prototype.getClass=function(){return zb};var jy=function(e){this._maxPtDist=new Ic,this._minPtDist=new Ic,this._geom=e||null};jy.prototype.filter=function(e,r){if(r===0)return null;var n=e.getCoordinate(r-1),i=e.getCoordinate(r),o=new ar((n.x+i.x)/2,(n.y+i.y)/2);this._minPtDist.initialize(),Xm.computeDistance(this._geom,o,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)};jy.prototype.isDone=function(){return!1};jy.prototype.isGeometryChanged=function(){return!1};jy.prototype.getMaxPointDistance=function(){return this._maxPtDist};jy.prototype.interfaces_=function(){return[fh]};jy.prototype.getClass=function(){return jy};var vv=function(e){this._comps=e||null};vv.prototype.filter=function(e){e instanceof Ka&&this._comps.add(e)};vv.prototype.interfaces_=function(){return[wp]};vv.prototype.getClass=function(){return vv};vv.getPolygons=function(){if(arguments.length===1){var e=arguments[0];return vv.getPolygons(e,new xn)}else if(arguments.length===2){var r=arguments[0],n=arguments[1];return r instanceof Ka?n.add(r):r instanceof Ec&&r.apply(new vv(n)),n}};var Ul=function(){if(this._lines=null,this._isForcedToLineString=!1,arguments.length===1){var e=arguments[0];this._lines=e}else if(arguments.length===2){var r=arguments[0],n=arguments[1];this._lines=r,this._isForcedToLineString=n}};Ul.prototype.filter=function(e){if(this._isForcedToLineString&&e instanceof jm){var r=e.getFactory().createLineString(e.getCoordinateSequence());return this._lines.add(r),null}e instanceof ra&&this._lines.add(e)};Ul.prototype.setForceToLineString=function(e){this._isForcedToLineString=e};Ul.prototype.interfaces_=function(){return[cv]};Ul.prototype.getClass=function(){return Ul};Ul.getGeometry=function(){if(arguments.length===1){var e=arguments[0];return e.getFactory().buildGeometry(Ul.getLines(e))}else if(arguments.length===2){var r=arguments[0],n=arguments[1];return r.getFactory().buildGeometry(Ul.getLines(r,n))}};Ul.getLines=function(){if(arguments.length===1){var e=arguments[0];return Ul.getLines(e,!1)}else if(arguments.length===2){if(ai(arguments[0],Ya)&&ai(arguments[1],Ya)){for(var r=arguments[0],n=arguments[1],i=r.iterator();i.hasNext();){var o=i.next();Ul.getLines(o,n)}return n}else if(arguments[0]instanceof si&&typeof arguments[1]=="boolean"){var a=arguments[0],s=arguments[1],l=new xn;return a.apply(new Ul(l,s)),l}else if(arguments[0]instanceof si&&ai(arguments[1],Ya)){var u=arguments[0],p=arguments[1];return u instanceof ra?p.add(u):u.apply(new Ul(p)),p}}else if(arguments.length===3){if(typeof arguments[2]=="boolean"&&ai(arguments[0],Ya)&&ai(arguments[1],Ya)){for(var m=arguments[0],v=arguments[1],x=arguments[2],y=m.iterator();y.hasNext();){var _=y.next();Ul.getLines(_,v,x)}return v}else if(typeof arguments[2]=="boolean"&&arguments[0]instanceof si&&ai(arguments[1],Ya)){var w=arguments[0],C=arguments[1],E=arguments[2];return w.apply(new Ul(C,E)),C}}};var mh=function(){if(this._boundaryRule=ld.OGC_SFS_BOUNDARY_RULE,this._isIn=null,this._numBoundaries=null,arguments.length!==0){if(arguments.length===1){var e=arguments[0];if(e===null)throw new Ls;this._boundaryRule=e}}};mh.prototype.locateInternal=function(){var e=this;if(arguments[0]instanceof ar&&arguments[1]instanceof Ka){var r=arguments[0],n=arguments[1];if(n.isEmpty())return ur.EXTERIOR;var i=n.getExteriorRing(),o=this.locateInPolygonRing(r,i);if(o===ur.EXTERIOR)return ur.EXTERIOR;if(o===ur.BOUNDARY)return ur.BOUNDARY;for(var a=0;a<n.getNumInteriorRing();a++){var s=n.getInteriorRingN(a),l=e.locateInPolygonRing(r,s);if(l===ur.INTERIOR)return ur.EXTERIOR;if(l===ur.BOUNDARY)return ur.BOUNDARY}return ur.INTERIOR}else if(arguments[0]instanceof ar&&arguments[1]instanceof ra){var u=arguments[0],p=arguments[1];if(!p.getEnvelopeInternal().intersects(u))return ur.EXTERIOR;var m=p.getCoordinates();return!p.isClosed()&&(u.equals(m[0])||u.equals(m[m.length-1]))?ur.BOUNDARY:En.isOnLine(u,m)?ur.INTERIOR:ur.EXTERIOR}else if(arguments[0]instanceof ar&&arguments[1]instanceof Du){var v=arguments[0],x=arguments[1],y=x.getCoordinate();return y.equals2D(v)?ur.INTERIOR:ur.EXTERIOR}};mh.prototype.locateInPolygonRing=function(e,r){return r.getEnvelopeInternal().intersects(e)?En.locatePointInRing(e,r.getCoordinates()):ur.EXTERIOR};mh.prototype.intersects=function(e,r){return this.locate(e,r)!==ur.EXTERIOR};mh.prototype.updateLocationInfo=function(e){e===ur.INTERIOR&&(this._isIn=!0),e===ur.BOUNDARY&&this._numBoundaries++};mh.prototype.computeLocation=function(e,r){var n=this;if(r instanceof Du&&this.updateLocationInfo(this.locateInternal(e,r)),r instanceof ra)this.updateLocationInfo(this.locateInternal(e,r));else if(r instanceof Ka)this.updateLocationInfo(this.locateInternal(e,r));else if(r instanceof o_)for(var i=r,o=0;o<i.getNumGeometries();o++){var a=i.getGeometryN(o);n.updateLocationInfo(n.locateInternal(e,a))}else if(r instanceof Um)for(var s=r,l=0;l<s.getNumGeometries();l++){var u=s.getGeometryN(l);n.updateLocationInfo(n.locateInternal(e,u))}else if(r instanceof Ec)for(var p=new Wm(r);p.hasNext();){var m=p.next();m!==r&&n.computeLocation(e,m)}};mh.prototype.locate=function(e,r){return r.isEmpty()?ur.EXTERIOR:r instanceof ra?this.locateInternal(e,r):r instanceof Ka?this.locateInternal(e,r):(this._isIn=!1,this._numBoundaries=0,this.computeLocation(e,r),this._boundaryRule.isInBoundary(this._numBoundaries)?ur.BOUNDARY:this._numBoundaries>0||this._isIn?ur.INTERIOR:ur.EXTERIOR)};mh.prototype.interfaces_=function(){return[]};mh.prototype.getClass=function(){return mh};var Mc=function t(){if(this._component=null,this._segIndex=null,this._pt=null,arguments.length===2){var e=arguments[0],r=arguments[1];t.call(this,e,t.INSIDE_AREA,r)}else if(arguments.length===3){var n=arguments[0],i=arguments[1],o=arguments[2];this._component=n,this._segIndex=i,this._pt=o}},Mhe={INSIDE_AREA:{configurable:!0}};Mc.prototype.isInsideArea=function(){return this._segIndex===Mc.INSIDE_AREA};Mc.prototype.getCoordinate=function(){return this._pt};Mc.prototype.getGeometryComponent=function(){return this._component};Mc.prototype.getSegmentIndex=function(){return this._segIndex};Mc.prototype.interfaces_=function(){return[]};Mc.prototype.getClass=function(){return Mc};Mhe.INSIDE_AREA.get=function(){return-1};Object.defineProperties(Mc,Mhe);var Uy=function(e){this._pts=e||null};Uy.prototype.filter=function(e){e instanceof Du&&this._pts.add(e)};Uy.prototype.interfaces_=function(){return[wp]};Uy.prototype.getClass=function(){return Uy};Uy.getPoints=function(){if(arguments.length===1){var e=arguments[0];return e instanceof Du?hh.singletonList(e):Uy.getPoints(e,new xn)}else if(arguments.length===2){var r=arguments[0],n=arguments[1];return r instanceof Du?n.add(r):r instanceof Ec&&r.apply(new Uy(n)),n}};var Bb=function(){this._locations=null;var e=arguments[0];this._locations=e};Bb.prototype.filter=function(e){(e instanceof Du||e instanceof ra||e instanceof Ka)&&this._locations.add(new Mc(e,0,e.getCoordinate()))};Bb.prototype.interfaces_=function(){return[wp]};Bb.prototype.getClass=function(){return Bb};Bb.getLocations=function(e){var r=new xn;return e.apply(new Bb(r)),r};var Vl=function(){if(this._geom=null,this._terminateDistance=0,this._ptLocator=new mh,this._minDistanceLocation=null,this._minDistance=mi.MAX_VALUE,arguments.length===2){var e=arguments[0],r=arguments[1];this._geom=[e,r],this._terminateDistance=0}else if(arguments.length===3){var n=arguments[0],i=arguments[1],o=arguments[2];this._geom=new Array(2).fill(null),this._geom[0]=n,this._geom[1]=i,this._terminateDistance=o}};Vl.prototype.computeContainmentDistance=function(){var e=this;if(arguments.length===0){var r=new Array(2).fill(null);if(this.computeContainmentDistance(0,r),this._minDistance<=this._terminateDistance)return null;this.computeContainmentDistance(1,r)}else if(arguments.length===2){var n=arguments[0],i=arguments[1],o=1-n,a=vv.getPolygons(this._geom[n]);if(a.size()>0){var s=Bb.getLocations(this._geom[o]);if(this.computeContainmentDistance(s,a,i),this._minDistance<=this._terminateDistance)return this._minDistanceLocation[o]=i[0],this._minDistanceLocation[n]=i[1],null}}else if(arguments.length===3){if(arguments[2]instanceof Array&&ai(arguments[0],ch)&&ai(arguments[1],ch)){for(var l=arguments[0],u=arguments[1],p=arguments[2],m=0;m<l.size();m++)for(var v=l.get(m),x=0;x<u.size();x++)if(e.computeContainmentDistance(v,u.get(x),p),e._minDistance<=e._terminateDistance)return null}else if(arguments[2]instanceof Array&&arguments[0]instanceof Mc&&arguments[1]instanceof Ka){var y=arguments[0],_=arguments[1],w=arguments[2],C=y.getCoordinate();if(ur.EXTERIOR!==this._ptLocator.locate(C,_))return this._minDistance=0,w[0]=y,w[1]=new Mc(_,C),null}}};Vl.prototype.computeMinDistanceLinesPoints=function(e,r,n){for(var i=this,o=0;o<e.size();o++)for(var a=e.get(o),s=0;s<r.size();s++){var l=r.get(s);if(i.computeMinDistance(a,l,n),i._minDistance<=i._terminateDistance)return null}};Vl.prototype.computeFacetDistance=function(){var e=new Array(2).fill(null),r=Ul.getLines(this._geom[0]),n=Ul.getLines(this._geom[1]),i=Uy.getPoints(this._geom[0]),o=Uy.getPoints(this._geom[1]);if(this.computeMinDistanceLines(r,n,e),this.updateMinDistance(e,!1),this._minDistance<=this._terminateDistance||(e[0]=null,e[1]=null,this.computeMinDistanceLinesPoints(r,o,e),this.updateMinDistance(e,!1),this._minDistance<=this._terminateDistance)||(e[0]=null,e[1]=null,this.computeMinDistanceLinesPoints(n,i,e),this.updateMinDistance(e,!0),this._minDistance<=this._terminateDistance))return null;e[0]=null,e[1]=null,this.computeMinDistancePoints(i,o,e),this.updateMinDistance(e,!1)};Vl.prototype.nearestLocations=function(){return this.computeMinDistance(),this._minDistanceLocation};Vl.prototype.updateMinDistance=function(e,r){if(e[0]===null)return null;r?(this._minDistanceLocation[0]=e[1],this._minDistanceLocation[1]=e[0]):(this._minDistanceLocation[0]=e[0],this._minDistanceLocation[1]=e[1])};Vl.prototype.nearestPoints=function(){this.computeMinDistance();var e=[this._minDistanceLocation[0].getCoordinate(),this._minDistanceLocation[1].getCoordinate()];return e};Vl.prototype.computeMinDistance=function(){var e=this;if(arguments.length===0){if(this._minDistanceLocation!==null||(this._minDistanceLocation=new Array(2).fill(null),this.computeContainmentDistance(),this._minDistance<=this._terminateDistance))return null;this.computeFacetDistance()}else if(arguments.length===3){if(arguments[2]instanceof Array&&arguments[0]instanceof ra&&arguments[1]instanceof Du){var r=arguments[0],n=arguments[1],i=arguments[2];if(r.getEnvelopeInternal().distance(n.getEnvelopeInternal())>this._minDistance)return null;for(var o=r.getCoordinates(),a=n.getCoordinate(),s=0;s<o.length-1;s++){var l=En.distancePointLine(a,o[s],o[s+1]);if(l<e._minDistance){e._minDistance=l;var u=new qn(o[s],o[s+1]),p=u.closestPoint(a);i[0]=new Mc(r,s,p),i[1]=new Mc(n,0,a)}if(e._minDistance<=e._terminateDistance)return null}}else if(arguments[2]instanceof Array&&arguments[0]instanceof ra&&arguments[1]instanceof ra){var m=arguments[0],v=arguments[1],x=arguments[2];if(m.getEnvelopeInternal().distance(v.getEnvelopeInternal())>this._minDistance)return null;for(var y=m.getCoordinates(),_=v.getCoordinates(),w=0;w<y.length-1;w++)for(var C=0;C<_.length-1;C++){var E=En.distanceLineLine(y[w],y[w+1],_[C],_[C+1]);if(E<e._minDistance){e._minDistance=E;var T=new qn(y[w],y[w+1]),A=new qn(_[C],_[C+1]),k=T.closestPoints(A);x[0]=new Mc(m,w,k[0]),x[1]=new Mc(v,C,k[1])}if(e._minDistance<=e._terminateDistance)return null}}}};Vl.prototype.computeMinDistancePoints=function(e,r,n){for(var i=this,o=0;o<e.size();o++)for(var a=e.get(o),s=0;s<r.size();s++){var l=r.get(s),u=a.getCoordinate().distance(l.getCoordinate());if(u<i._minDistance&&(i._minDistance=u,n[0]=new Mc(a,0,a.getCoordinate()),n[1]=new Mc(l,0,l.getCoordinate())),i._minDistance<=i._terminateDistance)return null}};Vl.prototype.distance=function(){if(this._geom[0]===null||this._geom[1]===null)throw new Ls;return this._geom[0].isEmpty()||this._geom[1].isEmpty()?0:(this.computeMinDistance(),this._minDistance)};Vl.prototype.computeMinDistanceLines=function(e,r,n){for(var i=this,o=0;o<e.size();o++)for(var a=e.get(o),s=0;s<r.size();s++){var l=r.get(s);if(i.computeMinDistance(a,l,n),i._minDistance<=i._terminateDistance)return null}};Vl.prototype.interfaces_=function(){return[]};Vl.prototype.getClass=function(){return Vl};Vl.distance=function(e,r){var n=new Vl(e,r);return n.distance()};Vl.isWithinDistance=function(e,r,n){var i=new Vl(e,r,n);return i.distance()<=n};Vl.nearestPoints=function(e,r){var n=new Vl(e,r);return n.nearestPoints()};var oc=function(){this._pt=[new ar,new ar],this._distance=mi.NaN,this._isNull=!0};oc.prototype.getCoordinates=function(){return this._pt};oc.prototype.getCoordinate=function(e){return this._pt[e]};oc.prototype.setMinimum=function(){if(arguments.length===1){var e=arguments[0];this.setMinimum(e._pt[0],e._pt[1])}else if(arguments.length===2){var r=arguments[0],n=arguments[1];if(this._isNull)return this.initialize(r,n),null;var i=r.distance(n);i<this._distance&&this.initialize(r,n,i)}};oc.prototype.initialize=function(){if(arguments.length===0)this._isNull=!0;else if(arguments.length===2){var e=arguments[0],r=arguments[1];this._pt[0].setCoordinate(e),this._pt[1].setCoordinate(r),this._distance=e.distance(r),this._isNull=!1}else if(arguments.length===3){var n=arguments[0],i=arguments[1],o=arguments[2];this._pt[0].setCoordinate(n),this._pt[1].setCoordinate(i),this._distance=o,this._isNull=!1}};oc.prototype.toString=function(){return lh.toLineString(this._pt[0],this._pt[1])};oc.prototype.getDistance=function(){return this._distance};oc.prototype.setMaximum=function(){if(arguments.length===1){var e=arguments[0];this.setMaximum(e._pt[0],e._pt[1])}else if(arguments.length===2){var r=arguments[0],n=arguments[1];if(this._isNull)return this.initialize(r,n),null;var i=r.distance(n);i>this._distance&&this.initialize(r,n,i)}};oc.prototype.interfaces_=function(){return[]};oc.prototype.getClass=function(){return oc};var Ap=function(){};Ap.prototype.interfaces_=function(){return[]};Ap.prototype.getClass=function(){return Ap};Ap.computeDistance=function(){if(arguments[2]instanceof oc&&arguments[0]instanceof ra&&arguments[1]instanceof ar)for(var e=arguments[0],r=arguments[1],n=arguments[2],i=new qn,o=e.getCoordinates(),a=0;a<o.length-1;a++){i.setCoordinates(o[a],o[a+1]);var s=i.closestPoint(r);n.setMinimum(s,r)}else if(arguments[2]instanceof oc&&arguments[0]instanceof Ka&&arguments[1]instanceof ar){var l=arguments[0],u=arguments[1],p=arguments[2];Ap.computeDistance(l.getExteriorRing(),u,p);for(var m=0;m<l.getNumInteriorRing();m++)Ap.computeDistance(l.getInteriorRingN(m),u,p)}else if(arguments[2]instanceof oc&&arguments[0]instanceof si&&arguments[1]instanceof ar){var v=arguments[0],x=arguments[1],y=arguments[2];if(v instanceof ra)Ap.computeDistance(v,x,y);else if(v instanceof Ka)Ap.computeDistance(v,x,y);else if(v instanceof Ec)for(var _=v,w=0;w<_.getNumGeometries();w++){var C=_.getGeometryN(w);Ap.computeDistance(C,x,y)}else y.setMinimum(v.getCoordinate(),x)}else if(arguments[2]instanceof oc&&arguments[0]instanceof qn&&arguments[1]instanceof ar){var E=arguments[0],T=arguments[1],A=arguments[2],k=E.closestPoint(T);A.setMinimum(k,T)}};var hd=function(){this._g0=null,this._g1=null,this._ptDist=new oc,this._densifyFrac=0;var e=arguments[0],r=arguments[1];this._g0=e,this._g1=r},MH={MaxPointDistanceFilter:{configurable:!0},MaxDensifiedByFractionDistanceFilter:{configurable:!0}};hd.prototype.getCoordinates=function(){return this._ptDist.getCoordinates()};hd.prototype.setDensifyFraction=function(e){if(e>1||e<=0)throw new Ls;this._densifyFrac=e};hd.prototype.compute=function(e,r){this.computeOrientedDistance(e,r,this._ptDist),this.computeOrientedDistance(r,e,this._ptDist)};hd.prototype.distance=function(){return this.compute(this._g0,this._g1),this._ptDist.getDistance()};hd.prototype.computeOrientedDistance=function(e,r,n){var i=new jb(r);if(e.apply(i),n.setMaximum(i.getMaxPointDistance()),this._densifyFrac>0){var o=new Vy(r,this._densifyFrac);e.apply(o),n.setMaximum(o.getMaxPointDistance())}};hd.prototype.orientedDistance=function(){return this.computeOrientedDistance(this._g0,this._g1,this._ptDist),this._ptDist.getDistance()};hd.prototype.interfaces_=function(){return[]};hd.prototype.getClass=function(){return hd};hd.distance=function(){if(arguments.length===2){var e=arguments[0],r=arguments[1],n=new hd(e,r);return n.distance()}else if(arguments.length===3){var i=arguments[0],o=arguments[1],a=arguments[2],s=new hd(i,o);return s.setDensifyFraction(a),s.distance()}};MH.MaxPointDistanceFilter.get=function(){return jb};MH.MaxDensifiedByFractionDistanceFilter.get=function(){return Vy};Object.defineProperties(hd,MH);var jb=function(){this._maxPtDist=new oc,this._minPtDist=new oc,this._euclideanDist=new Ap,this._geom=null;var e=arguments[0];this._geom=e};jb.prototype.filter=function(e){this._minPtDist.initialize(),Ap.computeDistance(this._geom,e,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)};jb.prototype.getMaxPointDistance=function(){return this._maxPtDist};jb.prototype.interfaces_=function(){return[Bm]};jb.prototype.getClass=function(){return jb};var Vy=function(){this._maxPtDist=new oc,this._minPtDist=new oc,this._geom=null,this._numSubSegs=0;var e=arguments[0],r=arguments[1];this._geom=e,this._numSubSegs=Math.trunc(Math.round(1/r))};Vy.prototype.filter=function(e,r){var n=this;if(r===0)return null;for(var i=e.getCoordinate(r-1),o=e.getCoordinate(r),a=(o.x-i.x)/this._numSubSegs,s=(o.y-i.y)/this._numSubSegs,l=0;l<this._numSubSegs;l++){var u=i.x+l*a,p=i.y+l*s,m=new ar(u,p);n._minPtDist.initialize(),Ap.computeDistance(n._geom,m,n._minPtDist),n._maxPtDist.setMaximum(n._minPtDist)}};Vy.prototype.isDone=function(){return!1};Vy.prototype.isGeometryChanged=function(){return!1};Vy.prototype.getMaxPointDistance=function(){return this._maxPtDist};Vy.prototype.interfaces_=function(){return[fh]};Vy.prototype.getClass=function(){return Vy};var Fu=function(e,r,n){this._minValidDistance=null,this._maxValidDistance=null,this._minDistanceFound=null,this._maxDistanceFound=null,this._isValid=!0,this._errMsg=null,this._errorLocation=null,this._errorIndicator=null,this._input=e||null,this._bufDistance=r||null,this._result=n||null},AH={VERBOSE:{configurable:!0},MAX_DISTANCE_DIFF_FRAC:{configurable:!0}};Fu.prototype.checkMaximumDistance=function(e,r,n){var i=new hd(r,e);if(i.setDensifyFraction(.25),this._maxDistanceFound=i.orientedDistance(),this._maxDistanceFound>n){this._isValid=!1;var o=i.getCoordinates();this._errorLocation=o[1],this._errorIndicator=e.getFactory().createLineString(o),this._errMsg="Distance between buffer curve and input is too large ("+this._maxDistanceFound+" at "+lh.toLineString(o[0],o[1])+")"}};Fu.prototype.isValid=function(){var e=Math.abs(this._bufDistance),r=Fu.MAX_DISTANCE_DIFF_FRAC*e;return this._minValidDistance=e-r,this._maxValidDistance=e+r,this._input.isEmpty()||this._result.isEmpty()?!0:(this._bufDistance>0?this.checkPositiveValid():this.checkNegativeValid(),Fu.VERBOSE&&Bl.out.println("Min Dist= "+this._minDistanceFound+" err= "+(1-this._minDistanceFound/this._bufDistance)+" Max Dist= "+this._maxDistanceFound+" err= "+(this._maxDistanceFound/this._bufDistance-1)),this._isValid)};Fu.prototype.checkNegativeValid=function(){if(!(this._input instanceof Ka||this._input instanceof Um||this._input instanceof Ec))return null;var e=this.getPolygonLines(this._input);if(this.checkMinimumDistance(e,this._result,this._minValidDistance),!this._isValid)return null;this.checkMaximumDistance(e,this._result,this._maxValidDistance)};Fu.prototype.getErrorIndicator=function(){return this._errorIndicator};Fu.prototype.checkMinimumDistance=function(e,r,n){var i=new Vl(e,r,n);if(this._minDistanceFound=i.distance(),this._minDistanceFound<n){this._isValid=!1;var o=i.nearestPoints();this._errorLocation=i.nearestPoints()[1],this._errorIndicator=e.getFactory().createLineString(o),this._errMsg="Distance between buffer curve and input is too small ("+this._minDistanceFound+" at "+lh.toLineString(o[0],o[1])+" )"}};Fu.prototype.checkPositiveValid=function(){var e=this._result.getBoundary();if(this.checkMinimumDistance(this._input,e,this._minValidDistance),!this._isValid)return null;this.checkMaximumDistance(this._input,e,this._maxValidDistance)};Fu.prototype.getErrorLocation=function(){return this._errorLocation};Fu.prototype.getPolygonLines=function(e){for(var r=new xn,n=new Ul(r),i=vv.getPolygons(e),o=i.iterator();o.hasNext();){var a=o.next();a.apply(n)}return e.getFactory().buildGeometry(r)};Fu.prototype.getErrorMessage=function(){return this._errMsg};Fu.prototype.interfaces_=function(){return[]};Fu.prototype.getClass=function(){return Fu};AH.VERBOSE.get=function(){return!1};AH.MAX_DISTANCE_DIFF_FRAC.get=function(){return .012};Object.defineProperties(Fu,AH);var Hl=function(e,r,n){this._isValid=!0,this._errorMsg=null,this._errorLocation=null,this._errorIndicator=null,this._input=e||null,this._distance=r||null,this._result=n||null},RH={VERBOSE:{configurable:!0},MAX_ENV_DIFF_FRAC:{configurable:!0}};Hl.prototype.isValid=function(){return this.checkPolygonal(),this._isValid?(this.checkExpectedEmpty(),this._isValid?(this.checkEnvelope(),this._isValid?(this.checkArea(),this._isValid?(this.checkDistance(),this._isValid):this._isValid):this._isValid):this._isValid):this._isValid};Hl.prototype.checkEnvelope=function(){if(this._distance<0)return null;var e=this._distance*Hl.MAX_ENV_DIFF_FRAC;e===0&&(e=.001);var r=new Un(this._input.getEnvelopeInternal());r.expandBy(this._distance);var n=new Un(this._result.getEnvelopeInternal());n.expandBy(e),n.contains(r)||(this._isValid=!1,this._errorMsg="Buffer envelope is incorrect",this._errorIndicator=this._input.getFactory().toGeometry(n)),this.report("Envelope")};Hl.prototype.checkDistance=function(){var e=new Fu(this._input,this._distance,this._result);e.isValid()||(this._isValid=!1,this._errorMsg=e.getErrorMessage(),this._errorLocation=e.getErrorLocation(),this._errorIndicator=e.getErrorIndicator()),this.report("Distance")};Hl.prototype.checkArea=function(){var e=this._input.getArea(),r=this._result.getArea();this._distance>0&&e>r&&(this._isValid=!1,this._errorMsg="Area of positive buffer is smaller than input",this._errorIndicator=this._result),this._distance<0&&e<r&&(this._isValid=!1,this._errorMsg="Area of negative buffer is larger than input",this._errorIndicator=this._result),this.report("Area")};Hl.prototype.checkPolygonal=function(){this._result instanceof Ka||this._result instanceof Um||(this._isValid=!1),this._errorMsg="Result is not polygonal",this._errorIndicator=this._result,this.report("Polygonal")};Hl.prototype.getErrorIndicator=function(){return this._errorIndicator};Hl.prototype.getErrorLocation=function(){return this._errorLocation};Hl.prototype.checkExpectedEmpty=function(){if(this._input.getDimension()>=2||this._distance>0)return null;this._result.isEmpty()||(this._isValid=!1,this._errorMsg="Result is non-empty",this._errorIndicator=this._result),this.report("ExpectedEmpty")};Hl.prototype.report=function(e){if(!Hl.VERBOSE)return null;Bl.out.println("Check "+e+": "+(this._isValid?"passed":"FAILED"))};Hl.prototype.getErrorMessage=function(){return this._errorMsg};Hl.prototype.interfaces_=function(){return[]};Hl.prototype.getClass=function(){return Hl};Hl.isValidMsg=function(e,r,n){var i=new Hl(e,r,n);return i.isValid()?null:i.getErrorMessage()};Hl.isValid=function(e,r,n){var i=new Hl(e,r,n);return!!i.isValid()};RH.VERBOSE.get=function(){return!1};RH.MAX_ENV_DIFF_FRAC.get=function(){return .012};Object.defineProperties(Hl,RH);var Rp=function(){this._pts=null,this._data=null;var e=arguments[0],r=arguments[1];this._pts=e,this._data=r};Rp.prototype.getCoordinates=function(){return this._pts};Rp.prototype.size=function(){return this._pts.length};Rp.prototype.getCoordinate=function(e){return this._pts[e]};Rp.prototype.isClosed=function(){return this._pts[0].equals(this._pts[this._pts.length-1])};Rp.prototype.getSegmentOctant=function(e){return e===this._pts.length-1?-1:Db.octant(this.getCoordinate(e),this.getCoordinate(e+1))};Rp.prototype.setData=function(e){this._data=e};Rp.prototype.getData=function(){return this._data};Rp.prototype.toString=function(){return lh.toLineString(new va(this._pts))};Rp.prototype.interfaces_=function(){return[Hm]};Rp.prototype.getClass=function(){return Rp};var El=function(){this._findAllIntersections=!1,this._isCheckEndSegmentsOnly=!1,this._li=null,this._interiorIntersection=null,this._intSegments=null,this._intersections=new xn,this._intersectionCount=0,this._keepIntersections=!0;var e=arguments[0];this._li=e,this._interiorIntersection=null};El.prototype.getInteriorIntersection=function(){return this._interiorIntersection};El.prototype.setCheckEndSegmentsOnly=function(e){this._isCheckEndSegmentsOnly=e};El.prototype.getIntersectionSegments=function(){return this._intSegments};El.prototype.count=function(){return this._intersectionCount};El.prototype.getIntersections=function(){return this._intersections};El.prototype.setFindAllIntersections=function(e){this._findAllIntersections=e};El.prototype.setKeepIntersections=function(e){this._keepIntersections=e};El.prototype.processIntersections=function(e,r,n,i){if(!this._findAllIntersections&&this.hasIntersection()||e===n&&r===i)return null;if(this._isCheckEndSegmentsOnly){var o=this.isEndSegment(e,r)||this.isEndSegment(n,i);if(!o)return null}var a=e.getCoordinates()[r],s=e.getCoordinates()[r+1],l=n.getCoordinates()[i],u=n.getCoordinates()[i+1];this._li.computeIntersection(a,s,l,u),this._li.hasIntersection()&&this._li.isInteriorIntersection()&&(this._intSegments=new Array(4).fill(null),this._intSegments[0]=a,this._intSegments[1]=s,this._intSegments[2]=l,this._intSegments[3]=u,this._interiorIntersection=this._li.getIntersection(0),this._keepIntersections&&this._intersections.add(this._interiorIntersection),this._intersectionCount++)};El.prototype.isEndSegment=function(e,r){return r===0||r>=e.size()-2};El.prototype.hasIntersection=function(){return this._interiorIntersection!==null};El.prototype.isDone=function(){return this._findAllIntersections?!1:this._interiorIntersection!==null};El.prototype.interfaces_=function(){return[l_]};El.prototype.getClass=function(){return El};El.createAllIntersectionsFinder=function(e){var r=new El(e);return r.setFindAllIntersections(!0),r};El.createAnyIntersectionFinder=function(e){return new El(e)};El.createIntersectionCounter=function(e){var r=new El(e);return r.setFindAllIntersections(!0),r.setKeepIntersections(!1),r};var gh=function(){this._li=new r_,this._segStrings=null,this._findAllIntersections=!1,this._segInt=null,this._isValid=!0;var e=arguments[0];this._segStrings=e};gh.prototype.execute=function(){if(this._segInt!==null)return null;this.checkInteriorIntersections()};gh.prototype.getIntersections=function(){return this._segInt.getIntersections()};gh.prototype.isValid=function(){return this.execute(),this._isValid};gh.prototype.setFindAllIntersections=function(e){this._findAllIntersections=e};gh.prototype.checkInteriorIntersections=function(){this._isValid=!0,this._segInt=new El(this._li),this._segInt.setFindAllIntersections(this._findAllIntersections);var e=new PH;if(e.setSegmentIntersector(this._segInt),e.computeNodes(this._segStrings),this._segInt.hasIntersection())return this._isValid=!1,null};gh.prototype.checkValid=function(){if(this.execute(),!this._isValid)throw new hv(this.getErrorMessage(),this._segInt.getInteriorIntersection())};gh.prototype.getErrorMessage=function(){if(this._isValid)return"no intersections found";var e=this._segInt.getIntersectionSegments();return"found non-noded intersection between "+lh.toLineString(e[0],e[1])+" and "+lh.toLineString(e[2],e[3])};gh.prototype.interfaces_=function(){return[]};gh.prototype.getClass=function(){return gh};gh.computeIntersections=function(e){var r=new gh(e);return r.setFindAllIntersections(!0),r.isValid(),r.getIntersections()};var f_=function t(){this._nv=null;var e=arguments[0];this._nv=new gh(t.toSegmentStrings(e))};f_.prototype.checkValid=function(){this._nv.checkValid()};f_.prototype.interfaces_=function(){return[]};f_.prototype.getClass=function(){return f_};f_.toSegmentStrings=function(e){for(var r=new xn,n=e.iterator();n.hasNext();){var i=n.next();r.add(new Rp(i.getCoordinates(),i))}return r};f_.checkValid=function(e){var r=new f_(e);r.checkValid()};var Ub=function(e){this._mapOp=e};Ub.prototype.map=function(e){for(var r=this,n=new xn,i=0;i<e.getNumGeometries();i++){var o=r._mapOp.map(e.getGeometryN(i));o.isEmpty()||n.add(o)}return e.getFactory().createGeometryCollection(Yi.toGeometryArray(n))};Ub.prototype.interfaces_=function(){return[]};Ub.prototype.getClass=function(){return Ub};Ub.map=function(e,r){var n=new Ub(r);return n.map(e)};var kp=function(){this._op=null,this._geometryFactory=null,this._ptLocator=null,this._lineEdgesList=new xn,this._resultLineList=new xn;var e=arguments[0],r=arguments[1],n=arguments[2];this._op=e,this._geometryFactory=r,this._ptLocator=n};kp.prototype.collectLines=function(e){for(var r=this,n=this._op.getGraph().getEdgeEnds().iterator();n.hasNext();){var i=n.next();r.collectLineEdge(i,e,r._lineEdgesList),r.collectBoundaryTouchEdge(i,e,r._lineEdgesList)}};kp.prototype.labelIsolatedLine=function(e,r){var n=this._ptLocator.locate(e.getCoordinate(),this._op.getArgGeometry(r));e.getLabel().setLocation(r,n)};kp.prototype.build=function(e){return this.findCoveredLineEdges(),this.collectLines(e),this.buildLines(e),this._resultLineList};kp.prototype.collectLineEdge=function(e,r,n){var i=e.getLabel(),o=e.getEdge();e.isLineEdge()&&!e.isVisited()&&Ei.isResultOfOp(i,r)&&!o.isCovered()&&(n.add(o),e.setVisitedEdge(!0))};kp.prototype.findCoveredLineEdges=function(){for(var e=this,r=this._op.getGraph().getNodes().iterator();r.hasNext();){var n=r.next();n.getEdges().findCoveredLineEdges()}for(var i=this._op.getGraph().getEdgeEnds().iterator();i.hasNext();){var o=i.next(),a=o.getEdge();if(o.isLineEdge()&&!a.isCoveredSet()){var s=e._op.isCoveredByA(o.getCoordinate());a.setCovered(s)}}};kp.prototype.labelIsolatedLines=function(e){for(var r=this,n=e.iterator();n.hasNext();){var i=n.next(),o=i.getLabel();i.isIsolated()&&(o.isNull(0)?r.labelIsolatedLine(i,0):r.labelIsolatedLine(i,1))}};kp.prototype.buildLines=function(e){for(var r=this,n=this._lineEdgesList.iterator();n.hasNext();){var i=n.next(),o=r._geometryFactory.createLineString(i.getCoordinates());r._resultLineList.add(o),i.setInResult(!0)}};kp.prototype.collectBoundaryTouchEdge=function(e,r,n){var i=e.getLabel();if(e.isLineEdge()||e.isVisited()||e.isInteriorAreaEdge()||e.getEdge().isInResult())return null;Ti.isTrue(!(e.isInResult()||e.getSym().isInResult())||!e.getEdge().isInResult()),Ei.isResultOfOp(i,r)&&r===Ei.INTERSECTION&&(n.add(e.getEdge()),e.setVisitedEdge(!0))};kp.prototype.interfaces_=function(){return[]};kp.prototype.getClass=function(){return kp};var Vb=function(){this._op=null,this._geometryFactory=null,this._resultPointList=new xn;var e=arguments[0],r=arguments[1];this._op=e,this._geometryFactory=r};Vb.prototype.filterCoveredNodeToPoint=function(e){var r=e.getCoordinate();if(!this._op.isCoveredByLA(r)){var n=this._geometryFactory.createPoint(r);this._resultPointList.add(n)}};Vb.prototype.extractNonCoveredResultNodes=function(e){for(var r=this,n=this._op.getGraph().getNodes().iterator();n.hasNext();){var i=n.next();if(!i.isInResult()&&!i.isIncidentEdgeInResult()&&(i.getEdges().getDegree()===0||e===Ei.INTERSECTION)){var o=i.getLabel();Ei.isResultOfOp(o,e)&&r.filterCoveredNodeToPoint(i)}}};Vb.prototype.build=function(e){return this.extractNonCoveredResultNodes(e),this._resultPointList};Vb.prototype.interfaces_=function(){return[]};Vb.prototype.getClass=function(){return Vb};var Zc=function(){this._inputGeom=null,this._factory=null,this._pruneEmptyGeometry=!0,this._preserveGeometryCollectionType=!0,this._preserveCollections=!1,this._preserveType=!1};Zc.prototype.transformPoint=function(e,r){return this._factory.createPoint(this.transformCoordinates(e.getCoordinateSequence(),e))};Zc.prototype.transformPolygon=function(e,r){var n=this,i=!0,o=this.transformLinearRing(e.getExteriorRing(),e);(o===null||!(o instanceof jm)||o.isEmpty())&&(i=!1);for(var a=new xn,s=0;s<e.getNumInteriorRing();s++){var l=n.transformLinearRing(e.getInteriorRingN(s),e);l===null||l.isEmpty()||(l instanceof jm||(i=!1),a.add(l))}if(i)return this._factory.createPolygon(o,a.toArray([]));var u=new xn;return o!==null&&u.add(o),u.addAll(a),this._factory.buildGeometry(u)};Zc.prototype.createCoordinateSequence=function(e){return this._factory.getCoordinateSequenceFactory().create(e)};Zc.prototype.getInputGeometry=function(){return this._inputGeom};Zc.prototype.transformMultiLineString=function(e,r){for(var n=this,i=new xn,o=0;o<e.getNumGeometries();o++){var a=n.transformLineString(e.getGeometryN(o),e);a!==null&&(a.isEmpty()||i.add(a))}return this._factory.buildGeometry(i)};Zc.prototype.transformCoordinates=function(e,r){return this.copy(e)};Zc.prototype.transformLineString=function(e,r){return this._factory.createLineString(this.transformCoordinates(e.getCoordinateSequence(),e))};Zc.prototype.transformMultiPoint=function(e,r){for(var n=this,i=new xn,o=0;o<e.getNumGeometries();o++){var a=n.transformPoint(e.getGeometryN(o),e);a!==null&&(a.isEmpty()||i.add(a))}return this._factory.buildGeometry(i)};Zc.prototype.transformMultiPolygon=function(e,r){for(var n=this,i=new xn,o=0;o<e.getNumGeometries();o++){var a=n.transformPolygon(e.getGeometryN(o),e);a!==null&&(a.isEmpty()||i.add(a))}return this._factory.buildGeometry(i)};Zc.prototype.copy=function(e){return e.copy()};Zc.prototype.transformGeometryCollection=function(e,r){for(var n=this,i=new xn,o=0;o<e.getNumGeometries();o++){var a=n.transform(e.getGeometryN(o));a!==null&&(n._pruneEmptyGeometry&&a.isEmpty()||i.add(a))}return this._preserveGeometryCollectionType?this._factory.createGeometryCollection(Yi.toGeometryArray(i)):this._factory.buildGeometry(i)};Zc.prototype.transform=function(e){if(this._inputGeom=e,this._factory=e.getFactory(),e instanceof Du)return this.transformPoint(e,null);if(e instanceof VE)return this.transformMultiPoint(e,null);if(e instanceof jm)return this.transformLinearRing(e,null);if(e instanceof ra)return this.transformLineString(e,null);if(e instanceof o_)return this.transformMultiLineString(e,null);if(e instanceof Ka)return this.transformPolygon(e,null);if(e instanceof Um)return this.transformMultiPolygon(e,null);if(e instanceof Ec)return this.transformGeometryCollection(e,null);throw new Ls("Unknown Geometry subtype: "+e.getClass().getName())};Zc.prototype.transformLinearRing=function(e,r){var n=this.transformCoordinates(e.getCoordinateSequence(),e);if(n===null)return this._factory.createLinearRing(null);var i=n.size();return i>0&&i<4&&!this._preserveType?this._factory.createLineString(n):this._factory.createLinearRing(n)};Zc.prototype.interfaces_=function(){return[]};Zc.prototype.getClass=function(){return Zc};var Ym=function t(){if(this._snapTolerance=0,this._srcPts=null,this._seg=new qn,this._allowSnappingToSourceVertices=!1,this._isClosed=!1,arguments[0]instanceof ra&&typeof arguments[1]=="number"){var e=arguments[0],r=arguments[1];t.call(this,e.getCoordinates(),r)}else if(arguments[0]instanceof Array&&typeof arguments[1]=="number"){var n=arguments[0],i=arguments[1];this._srcPts=n,this._isClosed=t.isClosed(n),this._snapTolerance=i}};Ym.prototype.snapVertices=function(e,r){for(var n=this,i=this._isClosed?e.size()-1:e.size(),o=0;o<i;o++){var a=e.get(o),s=n.findSnapForVertex(a,r);s!==null&&(e.set(o,new ar(s)),o===0&&n._isClosed&&e.set(e.size()-1,new ar(s)))}};Ym.prototype.findSnapForVertex=function(e,r){for(var n=this,i=0;i<r.length;i++){if(e.equals2D(r[i]))return null;if(e.distance(r[i])<n._snapTolerance)return r[i]}return null};Ym.prototype.snapTo=function(e){var r=new tA(this._srcPts);this.snapVertices(r,e),this.snapSegments(r,e);var n=r.toCoordinateArray();return n};Ym.prototype.snapSegments=function(e,r){var n=this;if(r.length===0)return null;var i=r.length;r[0].equals2D(r[r.length-1])&&(i=r.length-1);for(var o=0;o<i;o++){var a=r[o],s=n.findSegmentIndexToSnap(a,e);s>=0&&e.add(s+1,new ar(a),!1)}};Ym.prototype.findSegmentIndexToSnap=function(e,r){for(var n=this,i=mi.MAX_VALUE,o=-1,a=0;a<r.size()-1;a++){if(n._seg.p0=r.get(a),n._seg.p1=r.get(a+1),n._seg.p0.equals2D(e)||n._seg.p1.equals2D(e)){if(n._allowSnappingToSourceVertices)continue;return-1}var s=n._seg.distance(e);s<n._snapTolerance&&s<i&&(i=s,o=a)}return o};Ym.prototype.setAllowSnappingToSourceVertices=function(e){this._allowSnappingToSourceVertices=e};Ym.prototype.interfaces_=function(){return[]};Ym.prototype.getClass=function(){return Ym};Ym.isClosed=function(e){return e.length<=1?!1:e[0].equals2D(e[e.length-1])};var xa=function(e){this._srcGeom=e||null},Ahe={SNAP_PRECISION_FACTOR:{configurable:!0}};xa.prototype.snapTo=function(e,r){var n=this.extractTargetCoordinates(e),i=new Rhe(r,n);return i.transform(this._srcGeom)};xa.prototype.snapToSelf=function(e,r){var n=this.extractTargetCoordinates(this._srcGeom),i=new Rhe(e,n,!0),o=i.transform(this._srcGeom),a=o;return r&&ai(a,Ny)&&(a=o.buffer(0)),a};xa.prototype.computeSnapTolerance=function(e){var r=this.computeMinimumSegmentLength(e),n=r/10;return n};xa.prototype.extractTargetCoordinates=function(e){for(var r=new bp,n=e.getCoordinates(),i=0;i<n.length;i++)r.add(n[i]);return r.toArray(new Array(0).fill(null))};xa.prototype.computeMinimumSegmentLength=function(e){for(var r=mi.MAX_VALUE,n=0;n<e.length-1;n++){var i=e[n].distance(e[n+1]);i<r&&(r=i)}return r};xa.prototype.interfaces_=function(){return[]};xa.prototype.getClass=function(){return xa};xa.snap=function(e,r,n){var i=new Array(2).fill(null),o=new xa(e);i[0]=o.snapTo(r,n);var a=new xa(r);return i[1]=a.snapTo(i[0],n),i};xa.computeOverlaySnapTolerance=function(){if(arguments.length===1){var e=arguments[0],r=xa.computeSizeBasedSnapTolerance(e),n=e.getPrecisionModel();if(n.getType()===Oo.FIXED){var i=1/n.getScale()*2/1.415;i>r&&(r=i)}return r}else if(arguments.length===2){var o=arguments[0],a=arguments[1];return Math.min(xa.computeOverlaySnapTolerance(o),xa.computeOverlaySnapTolerance(a))}};xa.computeSizeBasedSnapTolerance=function(e){var r=e.getEnvelopeInternal(),n=Math.min(r.getHeight(),r.getWidth()),i=n*xa.SNAP_PRECISION_FACTOR;return i};xa.snapToSelf=function(e,r,n){var i=new xa(e);return i.snapToSelf(r,n)};Ahe.SNAP_PRECISION_FACTOR.get=function(){return 1e-9};Object.defineProperties(xa,Ahe);var Rhe=function(t){function e(r,n,i){t.call(this),this._snapTolerance=r||null,this._snapPts=n||null,this._isSelfSnap=i!==void 0?i:!1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.snapLine=function(n,i){var o=new Ym(n,this._snapTolerance);return o.setAllowSnappingToSourceVertices(this._isSelfSnap),o.snapTo(i)},e.prototype.transformCoordinates=function(n,i){var o=n.toCoordinateArray(),a=this.snapLine(o,this._snapPts);return this._factory.getCoordinateSequenceFactory().create(a)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Zc),Ac=function(){this._isFirst=!0,this._commonMantissaBitsCount=53,this._commonBits=0,this._commonSignExp=null};Ac.prototype.getCommon=function(){return mi.longBitsToDouble(this._commonBits)};Ac.prototype.add=function(e){var r=mi.doubleToLongBits(e);if(this._isFirst)return this._commonBits=r,this._commonSignExp=Ac.signExpBits(this._commonBits),this._isFirst=!1,null;var n=Ac.signExpBits(r);if(n!==this._commonSignExp)return this._commonBits=0,null;this._commonMantissaBitsCount=Ac.numCommonMostSigMantissaBits(this._commonBits,r),this._commonBits=Ac.zeroLowerBits(this._commonBits,64-(12+this._commonMantissaBitsCount))};Ac.prototype.toString=function(){if(arguments.length===1){var e=arguments[0],r=mi.longBitsToDouble(e),n=mi.toBinaryString(e),i="0000000000000000000000000000000000000000000000000000000000000000"+n,o=i.substring(i.length-64),a=o.substring(0,1)+" "+o.substring(1,12)+"(exp) "+o.substring(12)+" [ "+r+" ]";return a}};Ac.prototype.interfaces_=function(){return[]};Ac.prototype.getClass=function(){return Ac};Ac.getBit=function(e,r){var n=1<<r;return(e&n)!=0?1:0};Ac.signExpBits=function(e){return e>>52};Ac.zeroLowerBits=function(e,r){var n=(1<<r)-1,i=~n,o=e&i;return o};Ac.numCommonMostSigMantissaBits=function(e,r){for(var n=0,i=52;i>=0;i--){if(Ac.getBit(e,i)!==Ac.getBit(r,i))return n;n++}return 52};var Hy=function(){this._commonCoord=null,this._ccFilter=new Hb},kH={CommonCoordinateFilter:{configurable:!0},Translater:{configurable:!0}};Hy.prototype.addCommonBits=function(e){var r=new Wy(this._commonCoord);e.apply(r),e.geometryChanged()};Hy.prototype.removeCommonBits=function(e){if(this._commonCoord.x===0&&this._commonCoord.y===0)return e;var r=new ar(this._commonCoord);r.x=-r.x,r.y=-r.y;var n=new Wy(r);return e.apply(n),e.geometryChanged(),e};Hy.prototype.getCommonCoordinate=function(){return this._commonCoord};Hy.prototype.add=function(e){e.apply(this._ccFilter),this._commonCoord=this._ccFilter.getCommonCoordinate()};Hy.prototype.interfaces_=function(){return[]};Hy.prototype.getClass=function(){return Hy};kH.CommonCoordinateFilter.get=function(){return Hb};kH.Translater.get=function(){return Wy};Object.defineProperties(Hy,kH);var Hb=function(){this._commonBitsX=new Ac,this._commonBitsY=new Ac};Hb.prototype.filter=function(e){this._commonBitsX.add(e.x),this._commonBitsY.add(e.y)};Hb.prototype.getCommonCoordinate=function(){return new ar(this._commonBitsX.getCommon(),this._commonBitsY.getCommon())};Hb.prototype.interfaces_=function(){return[Bm]};Hb.prototype.getClass=function(){return Hb};var Wy=function(){this.trans=null;var e=arguments[0];this.trans=e};Wy.prototype.filter=function(e,r){var n=e.getOrdinate(r,0)+this.trans.x,i=e.getOrdinate(r,1)+this.trans.y;e.setOrdinate(r,0,n),e.setOrdinate(r,1,i)};Wy.prototype.isDone=function(){return!1};Wy.prototype.isGeometryChanged=function(){return!0};Wy.prototype.interfaces_=function(){return[fh]};Wy.prototype.getClass=function(){return Wy};var Sl=function(e,r){this._geom=new Array(2).fill(null),this._snapTolerance=null,this._cbr=null,this._geom[0]=e,this._geom[1]=r,this.computeSnapTolerance()};Sl.prototype.selfSnap=function(e){var r=new xa(e),n=r.snapTo(e,this._snapTolerance);return n};Sl.prototype.removeCommonBits=function(e){this._cbr=new Hy,this._cbr.add(e[0]),this._cbr.add(e[1]);var r=new Array(2).fill(null);return r[0]=this._cbr.removeCommonBits(e[0].copy()),r[1]=this._cbr.removeCommonBits(e[1].copy()),r};Sl.prototype.prepareResult=function(e){return this._cbr.addCommonBits(e),e};Sl.prototype.getResultGeometry=function(e){var r=this.snap(this._geom),n=Ei.overlayOp(r[0],r[1],e);return this.prepareResult(n)};Sl.prototype.checkValid=function(e){e.isValid()||Bl.out.println("Snapped geometry is invalid")};Sl.prototype.computeSnapTolerance=function(){this._snapTolerance=xa.computeOverlaySnapTolerance(this._geom[0],this._geom[1])};Sl.prototype.snap=function(e){var r=this.removeCommonBits(e),n=xa.snap(r[0],r[1],this._snapTolerance);return n};Sl.prototype.interfaces_=function(){return[]};Sl.prototype.getClass=function(){return Sl};Sl.overlayOp=function(e,r,n){var i=new Sl(e,r);return i.getResultGeometry(n)};Sl.union=function(e,r){return Sl.overlayOp(e,r,Ei.UNION)};Sl.intersection=function(e,r){return Sl.overlayOp(e,r,Ei.INTERSECTION)};Sl.symDifference=function(e,r){return Sl.overlayOp(e,r,Ei.SYMDIFFERENCE)};Sl.difference=function(e,r){return Sl.overlayOp(e,r,Ei.DIFFERENCE)};var Rc=function(e,r){this._geom=new Array(2).fill(null),this._geom[0]=e,this._geom[1]=r};Rc.prototype.getResultGeometry=function(e){var r=null,n=!1,i=null;try{r=Ei.overlayOp(this._geom[0],this._geom[1],e);var o=!0;o&&(n=!0)}catch(a){if(a instanceof lv)i=a;else throw a}finally{}if(!n)try{r=Sl.overlayOp(this._geom[0],this._geom[1],e)}catch(a){throw a instanceof lv?i:a}finally{}return r};Rc.prototype.interfaces_=function(){return[]};Rc.prototype.getClass=function(){return Rc};Rc.overlayOp=function(e,r,n){var i=new Rc(e,r);return i.getResultGeometry(n)};Rc.union=function(e,r){return Rc.overlayOp(e,r,Ei.UNION)};Rc.intersection=function(e,r){return Rc.overlayOp(e,r,Ei.INTERSECTION)};Rc.symDifference=function(e,r){return Rc.overlayOp(e,r,Ei.SYMDIFFERENCE)};Rc.difference=function(e,r){return Rc.overlayOp(e,r,Ei.DIFFERENCE)};var gA=function(){this.mce=null,this.chainIndex=null;var e=arguments[0],r=arguments[1];this.mce=e,this.chainIndex=r};gA.prototype.computeIntersections=function(e,r){this.mce.computeIntersectsForChain(this.chainIndex,e.mce,e.chainIndex,r)};gA.prototype.interfaces_=function(){return[]};gA.prototype.getClass=function(){return gA};var zu=function t(){if(this._label=null,this._xValue=null,this._eventType=null,this._insertEvent=null,this._deleteEventIndex=null,this._obj=null,arguments.length===2){var e=arguments[0],r=arguments[1];this._eventType=t.DELETE,this._xValue=e,this._insertEvent=r}else if(arguments.length===3){var n=arguments[0],i=arguments[1],o=arguments[2];this._eventType=t.INSERT,this._label=n,this._xValue=i,this._obj=o}},OH={INSERT:{configurable:!0},DELETE:{configurable:!0}};zu.prototype.isDelete=function(){return this._eventType===zu.DELETE};zu.prototype.setDeleteEventIndex=function(e){this._deleteEventIndex=e};zu.prototype.getObject=function(){return this._obj};zu.prototype.compareTo=function(e){var r=e;return this._xValue<r._xValue?-1:this._xValue>r._xValue?1:this._eventType<r._eventType?-1:this._eventType>r._eventType?1:0};zu.prototype.getInsertEvent=function(){return this._insertEvent};zu.prototype.isInsert=function(){return this._eventType===zu.INSERT};zu.prototype.isSameLabel=function(e){return this._label===null?!1:this._label===e._label};zu.prototype.getDeleteEventIndex=function(){return this._deleteEventIndex};zu.prototype.interfaces_=function(){return[sd]};zu.prototype.getClass=function(){return zu};OH.INSERT.get=function(){return 1};OH.DELETE.get=function(){return 2};Object.defineProperties(zu,OH);var Y5=function(){};Y5.prototype.interfaces_=function(){return[]};Y5.prototype.getClass=function(){return Y5};var Wl=function(){this._hasIntersection=!1,this._hasProper=!1,this._hasProperInterior=!1,this._properIntersectionPoint=null,this._li=null,this._includeProper=null,this._recordIsolated=null,this._isSelfIntersection=null,this._numIntersections=0,this.numTests=0,this._bdyNodes=null,this._isDone=!1,this._isDoneWhenProperInt=!1;var e=arguments[0],r=arguments[1],n=arguments[2];this._li=e,this._includeProper=r,this._recordIsolated=n};Wl.prototype.isTrivialIntersection=function(e,r,n,i){if(e===n&&this._li.getIntersectionNum()===1){if(Wl.isAdjacentSegments(r,i))return!0;if(e.isClosed()){var o=e.getNumPoints()-1;if(r===0&&i===o||i===0&&r===o)return!0}}return!1};Wl.prototype.getProperIntersectionPoint=function(){return this._properIntersectionPoint};Wl.prototype.setIsDoneIfProperInt=function(e){this._isDoneWhenProperInt=e};Wl.prototype.hasProperInteriorIntersection=function(){return this._hasProperInterior};Wl.prototype.isBoundaryPointInternal=function(e,r){for(var n=r.iterator();n.hasNext();){var i=n.next(),o=i.getCoordinate();if(e.isIntersection(o))return!0}return!1};Wl.prototype.hasProperIntersection=function(){return this._hasProper};Wl.prototype.hasIntersection=function(){return this._hasIntersection};Wl.prototype.isDone=function(){return this._isDone};Wl.prototype.isBoundaryPoint=function(e,r){return r===null?!1:!!(this.isBoundaryPointInternal(e,r[0])||this.isBoundaryPointInternal(e,r[1]))};Wl.prototype.setBoundaryNodes=function(e,r){this._bdyNodes=new Array(2).fill(null),this._bdyNodes[0]=e,this._bdyNodes[1]=r};Wl.prototype.addIntersections=function(e,r,n,i){if(e===n&&r===i)return null;this.numTests++;var o=e.getCoordinates()[r],a=e.getCoordinates()[r+1],s=n.getCoordinates()[i],l=n.getCoordinates()[i+1];this._li.computeIntersection(o,a,s,l),this._li.hasIntersection()&&(this._recordIsolated&&(e.setIsolated(!1),n.setIsolated(!1)),this._numIntersections++,this.isTrivialIntersection(e,r,n,i)||(this._hasIntersection=!0,(this._includeProper||!this._li.isProper())&&(e.addIntersections(this._li,r,0),n.addIntersections(this._li,i,1)),this._li.isProper()&&(this._properIntersectionPoint=this._li.getIntersection(0).copy(),this._hasProper=!0,this._isDoneWhenProperInt&&(this._isDone=!0),this.isBoundaryPoint(this._li,this._bdyNodes)||(this._hasProperInterior=!0))))};Wl.prototype.interfaces_=function(){return[]};Wl.prototype.getClass=function(){return Wl};Wl.isAdjacentSegments=function(e,r){return Math.abs(e-r)===1};var Uxt=function(t){function e(){t.call(this),this.events=new xn,this.nOverlaps=null}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.prepareEvents=function(){var n=this;hh.sort(this.events);for(var i=0;i<this.events.size();i++){var o=n.events.get(i);o.isDelete()&&o.getInsertEvent().setDeleteEventIndex(i)}},e.prototype.computeIntersections=function(){var n=this;if(arguments.length===1){var i=arguments[0];this.nOverlaps=0,this.prepareEvents();for(var o=0;o<this.events.size();o++){var a=n.events.get(o);if(a.isInsert()&&n.processOverlaps(o,a.getDeleteEventIndex(),a,i),i.isDone())break}}else if(arguments.length===3){if(arguments[2]instanceof Wl&&ai(arguments[0],ch)&&ai(arguments[1],ch)){var s=arguments[0],l=arguments[1],u=arguments[2];this.addEdges(s,s),this.addEdges(l,l),this.computeIntersections(u)}else if(typeof arguments[2]=="boolean"&&ai(arguments[0],ch)&&arguments[1]instanceof Wl){var p=arguments[0],m=arguments[1],v=arguments[2];v?this.addEdges(p,null):this.addEdges(p),this.computeIntersections(m)}}},e.prototype.addEdge=function(n,i){for(var o=this,a=n.getMonotoneChainEdge(),s=a.getStartIndexes(),l=0;l<s.length-1;l++){var u=new gA(a,l),p=new zu(i,a.getMinX(l),u);o.events.add(p),o.events.add(new zu(a.getMaxX(l),p))}},e.prototype.processOverlaps=function(n,i,o,a){for(var s=this,l=o.getObject(),u=n;u<i;u++){var p=s.events.get(u);if(p.isInsert()){var m=p.getObject();o.isSameLabel(p)||(l.computeIntersections(m,a),s.nOverlaps++)}}},e.prototype.addEdges=function(){var n=this;if(arguments.length===1)for(var i=arguments[0],o=i.iterator();o.hasNext();){var a=o.next();n.addEdge(a,a)}else if(arguments.length===2)for(var s=arguments[0],l=arguments[1],u=s.iterator();u.hasNext();){var p=u.next();n.addEdge(p,l)}},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Y5),Km=function(){this._min=mi.POSITIVE_INFINITY,this._max=mi.NEGATIVE_INFINITY},khe={NodeComparator:{configurable:!0}};Km.prototype.getMin=function(){return this._min};Km.prototype.intersects=function(e,r){return!(this._min>r||this._max<e)};Km.prototype.getMax=function(){return this._max};Km.prototype.toString=function(){return lh.toLineString(new ar(this._min,0),new ar(this._max,0))};Km.prototype.interfaces_=function(){return[]};Km.prototype.getClass=function(){return Km};khe.NodeComparator.get=function(){return vA};Object.defineProperties(Km,khe);var vA=function(){};vA.prototype.compare=function(e,r){var n=e,i=r,o=(n._min+n._max)/2,a=(i._min+i._max)/2;return o<a?-1:o>a?1:0};vA.prototype.interfaces_=function(){return[kE]};vA.prototype.getClass=function(){return vA};var Vxt=function(t){function e(){t.call(this),this._item=null;var r=arguments[0],n=arguments[1],i=arguments[2];this._min=r,this._max=n,this._item=i}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.query=function(n,i,o){if(!this.intersects(n,i))return null;o.visitItem(this._item)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Km),Hxt=function(t){function e(){t.call(this),this._node1=null,this._node2=null;var r=arguments[0],n=arguments[1];this._node1=r,this._node2=n,this.buildExtent(this._node1,this._node2)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.buildExtent=function(n,i){this._min=Math.min(n._min,i._min),this._max=Math.max(n._max,i._max)},e.prototype.query=function(n,i,o){if(!this.intersects(n,i))return null;this._node1!==null&&this._node1.query(n,i,o),this._node2!==null&&this._node2.query(n,i,o)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Km),Zm=function(){this._leaves=new xn,this._root=null,this._level=0};Zm.prototype.buildTree=function(){var e=this;hh.sort(this._leaves,new Km.NodeComparator);for(var r=this._leaves,n=null,i=new xn;;){if(e.buildLevel(r,i),i.size()===1)return i.get(0);n=r,r=i,i=n}};Zm.prototype.insert=function(e,r,n){if(this._root!==null)throw new Error("Index cannot be added to once it has been queried");this._leaves.add(new Vxt(e,r,n))};Zm.prototype.query=function(e,r,n){this.init(),this._root.query(e,r,n)};Zm.prototype.buildRoot=function(){if(this._root!==null)return null;this._root=this.buildTree()};Zm.prototype.printNode=function(e){Bl.out.println(lh.toLineString(new ar(e._min,this._level),new ar(e._max,this._level)))};Zm.prototype.init=function(){if(this._root!==null)return null;this.buildRoot()};Zm.prototype.buildLevel=function(e,r){this._level++,r.clear();for(var n=0;n<e.size();n+=2){var i=e.get(n),o=n+1<e.size()?e.get(n):null;if(o===null)r.add(i);else{var a=new Hxt(e.get(n),e.get(n+1));r.add(a)}}};Zm.prototype.interfaces_=function(){return[]};Zm.prototype.getClass=function(){return Zm};var KE=function(){this._items=new xn};KE.prototype.visitItem=function(e){this._items.add(e)};KE.prototype.getItems=function(){return this._items};KE.prototype.interfaces_=function(){return[$y]};KE.prototype.getClass=function(){return KE};var ZE=function(){this._index=null;var e=arguments[0];if(!ai(e,Ny))throw new Ls;this._index=new d_(e)},LH={SegmentVisitor:{configurable:!0},IntervalIndexedGeometry:{configurable:!0}};ZE.prototype.locate=function(e){var r=new _p(e),n=new QE(r);return this._index.query(e.y,e.y,n),r.getLocation()};ZE.prototype.interfaces_=function(){return[qE]};ZE.prototype.getClass=function(){return ZE};LH.SegmentVisitor.get=function(){return QE};LH.IntervalIndexedGeometry.get=function(){return d_};Object.defineProperties(ZE,LH);var QE=function(){this._counter=null;var e=arguments[0];this._counter=e};QE.prototype.visitItem=function(e){var r=e;this._counter.countSegment(r.getCoordinate(0),r.getCoordinate(1))};QE.prototype.interfaces_=function(){return[$y]};QE.prototype.getClass=function(){return QE};var d_=function(){this._index=new Zm;var e=arguments[0];this.init(e)};d_.prototype.init=function(e){for(var r=this,n=Ul.getLines(e),i=n.iterator();i.hasNext();){var o=i.next(),a=o.getCoordinates();r.addLine(a)}};d_.prototype.addLine=function(e){for(var r=this,n=1;n<e.length;n++){var i=new qn(e[n-1],e[n]),o=Math.min(i.p0.y,i.p1.y),a=Math.max(i.p0.y,i.p1.y);r._index.insert(o,a,i)}};d_.prototype.query=function(){if(arguments.length===2){var e=arguments[0],r=arguments[1],n=new KE;return this._index.query(e,r,n),n.getItems()}else if(arguments.length===3){var i=arguments[0],o=arguments[1],a=arguments[2];this._index.query(i,o,a)}};d_.prototype.interfaces_=function(){return[]};d_.prototype.getClass=function(){return d_};var yA=function(t){function e(){if(t.call(this),this._parentGeom=null,this._lineEdgeMap=new phe,this._boundaryNodeRule=null,this._useBoundaryDeterminationRule=!0,this._argIndex=null,this._boundaryNodes=null,this._hasTooFewPoints=!1,this._invalidPoint=null,this._areaPtLocator=null,this._ptLocator=new mh,arguments.length===2){var r=arguments[0],n=arguments[1],i=ld.OGC_SFS_BOUNDARY_RULE;this._argIndex=r,this._parentGeom=n,this._boundaryNodeRule=i,n!==null&&this.add(n)}else if(arguments.length===3){var o=arguments[0],a=arguments[1],s=arguments[2];this._argIndex=o,this._parentGeom=a,this._boundaryNodeRule=s,a!==null&&this.add(a)}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.insertBoundaryPoint=function(n,i){var o=this._nodes.addNode(i),a=o.getLabel(),s=1,l=ur.NONE;l=a.getLocation(n,cn.ON),l===ur.BOUNDARY&&s++;var u=e.determineBoundary(this._boundaryNodeRule,s);a.setLocation(n,u)},e.prototype.computeSelfNodes=function(){if(arguments.length===2){var n=arguments[0],i=arguments[1];return this.computeSelfNodes(n,i,!1)}else if(arguments.length===3){var o=arguments[0],a=arguments[1],s=arguments[2],l=new Wl(o,!0,!1);l.setIsDoneIfProperInt(s);var u=this.createEdgeSetIntersector(),p=this._parentGeom instanceof jm||this._parentGeom instanceof Ka||this._parentGeom instanceof Um,m=a||!p;return u.computeIntersections(this._edges,l,m),this.addSelfIntersectionNodes(this._argIndex),l}},e.prototype.computeSplitEdges=function(n){for(var i=this._edges.iterator();i.hasNext();){var o=i.next();o.eiList.addSplitEdges(n)}},e.prototype.computeEdgeIntersections=function(n,i,o){var a=new Wl(i,o,!0);a.setBoundaryNodes(this.getBoundaryNodes(),n.getBoundaryNodes());var s=this.createEdgeSetIntersector();return s.computeIntersections(this._edges,n._edges,a),a},e.prototype.getGeometry=function(){return this._parentGeom},e.prototype.getBoundaryNodeRule=function(){return this._boundaryNodeRule},e.prototype.hasTooFewPoints=function(){return this._hasTooFewPoints},e.prototype.addPoint=function(){if(arguments[0]instanceof Du){var n=arguments[0],i=n.getCoordinate();this.insertPoint(this._argIndex,i,ur.INTERIOR)}else if(arguments[0]instanceof ar){var o=arguments[0];this.insertPoint(this._argIndex,o,ur.INTERIOR)}},e.prototype.addPolygon=function(n){var i=this;this.addPolygonRing(n.getExteriorRing(),ur.EXTERIOR,ur.INTERIOR);for(var o=0;o<n.getNumInteriorRing();o++){var a=n.getInteriorRingN(o);i.addPolygonRing(a,ur.INTERIOR,ur.EXTERIOR)}},e.prototype.addEdge=function(n){this.insertEdge(n);var i=n.getCoordinates();this.insertPoint(this._argIndex,i[0],ur.BOUNDARY),this.insertPoint(this._argIndex,i[i.length-1],ur.BOUNDARY)},e.prototype.addLineString=function(n){var i=Ui.removeRepeatedPoints(n.getCoordinates());if(i.length<2)return this._hasTooFewPoints=!0,this._invalidPoint=i[0],null;var o=new X5(i,new Bo(this._argIndex,ur.INTERIOR));this._lineEdgeMap.put(n,o),this.insertEdge(o),Ti.isTrue(i.length>=2,"found LineString with single point"),this.insertBoundaryPoint(this._argIndex,i[0]),this.insertBoundaryPoint(this._argIndex,i[i.length-1])},e.prototype.getInvalidPoint=function(){return this._invalidPoint},e.prototype.getBoundaryPoints=function(){for(var n=this.getBoundaryNodes(),i=new Array(n.size()).fill(null),o=0,a=n.iterator();a.hasNext();){var s=a.next();i[o++]=s.getCoordinate().copy()}return i},e.prototype.getBoundaryNodes=function(){return this._boundaryNodes===null&&(this._boundaryNodes=this._nodes.getBoundaryNodes(this._argIndex)),this._boundaryNodes},e.prototype.addSelfIntersectionNode=function(n,i,o){if(this.isBoundaryNode(n,i))return null;o===ur.BOUNDARY&&this._useBoundaryDeterminationRule?this.insertBoundaryPoint(n,i):this.insertPoint(n,i,o)},e.prototype.addPolygonRing=function(n,i,o){if(n.isEmpty())return null;var a=Ui.removeRepeatedPoints(n.getCoordinates());if(a.length<4)return this._hasTooFewPoints=!0,this._invalidPoint=a[0],null;var s=i,l=o;En.isCCW(a)&&(s=o,l=i);var u=new X5(a,new Bo(this._argIndex,ur.BOUNDARY,s,l));this._lineEdgeMap.put(n,u),this.insertEdge(u),this.insertPoint(this._argIndex,a[0],ur.BOUNDARY)},e.prototype.insertPoint=function(n,i,o){var a=this._nodes.addNode(i),s=a.getLabel();s===null?a._label=new Bo(n,o):s.setLocation(n,o)},e.prototype.createEdgeSetIntersector=function(){return new Uxt},e.prototype.addSelfIntersectionNodes=function(n){for(var i=this,o=this._edges.iterator();o.hasNext();)for(var a=o.next(),s=a.getLabel().getLocation(n),l=a.eiList.iterator();l.hasNext();){var u=l.next();i.addSelfIntersectionNode(n,u.coord,s)}},e.prototype.add=function(){if(arguments.length===1){var n=arguments[0];if(n.isEmpty())return null;if(n instanceof Um&&(this._useBoundaryDeterminationRule=!1),n instanceof Ka)this.addPolygon(n);else if(n instanceof ra)this.addLineString(n);else if(n instanceof Du)this.addPoint(n);else if(n instanceof VE)this.addCollection(n);else if(n instanceof o_)this.addCollection(n);else if(n instanceof Um)this.addCollection(n);else if(n instanceof Ec)this.addCollection(n);else throw new Error(n.getClass().getName())}else return t.prototype.add.apply(this,arguments)},e.prototype.addCollection=function(n){for(var i=this,o=0;o<n.getNumGeometries();o++){var a=n.getGeometryN(o);i.add(a)}},e.prototype.locate=function(n){return ai(this._parentGeom,Ny)&&this._parentGeom.getNumGeometries()>50?(this._areaPtLocator===null&&(this._areaPtLocator=new ZE(this._parentGeom)),this._areaPtLocator.locate(n)):this._ptLocator.locate(n,this._parentGeom)},e.prototype.findEdge=function(){if(arguments.length===1){var n=arguments[0];return this._lineEdgeMap.get(n)}else return t.prototype.findEdge.apply(this,arguments)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e.determineBoundary=function(n,i){return n.isInBoundary(i)?ur.BOUNDARY:ur.INTERIOR},e}(Gs),JE=function(){if(this._li=new r_,this._resultPrecisionModel=null,this._arg=null,arguments.length===1){var e=arguments[0];this.setComputationPrecision(e.getPrecisionModel()),this._arg=new Array(1).fill(null),this._arg[0]=new yA(0,e)}else if(arguments.length===2){var r=arguments[0],n=arguments[1],i=ld.OGC_SFS_BOUNDARY_RULE;r.getPrecisionModel().compareTo(n.getPrecisionModel())>=0?this.setComputationPrecision(r.getPrecisionModel()):this.setComputationPrecision(n.getPrecisionModel()),this._arg=new Array(2).fill(null),this._arg[0]=new yA(0,r,i),this._arg[1]=new yA(1,n,i)}else if(arguments.length===3){var o=arguments[0],a=arguments[1],s=arguments[2];o.getPrecisionModel().compareTo(a.getPrecisionModel())>=0?this.setComputationPrecision(o.getPrecisionModel()):this.setComputationPrecision(a.getPrecisionModel()),this._arg=new Array(2).fill(null),this._arg[0]=new yA(0,o,s),this._arg[1]=new yA(1,a,s)}};JE.prototype.getArgGeometry=function(e){return this._arg[e].getGeometry()};JE.prototype.setComputationPrecision=function(e){this._resultPrecisionModel=e,this._li.setPrecisionModel(this._resultPrecisionModel)};JE.prototype.interfaces_=function(){return[]};JE.prototype.getClass=function(){return JE};var h_=function(){};h_.prototype.interfaces_=function(){return[]};h_.prototype.getClass=function(){return h_};h_.map=function(){if(arguments[0]instanceof si&&ai(arguments[1],h_.MapOp)){for(var e=arguments[0],r=arguments[1],n=new xn,i=0;i<e.getNumGeometries();i++){var o=r.map(e.getGeometryN(i));o!==null&&n.add(o)}return e.getFactory().buildGeometry(n)}else if(ai(arguments[0],Ya)&&ai(arguments[1],h_.MapOp)){for(var a=arguments[0],s=arguments[1],l=new xn,u=a.iterator();u.hasNext();){var p=u.next(),m=s.map(p);m!==null&&l.add(m)}return l}};h_.MapOp=function(){};var Ei=function(t){function e(){var r=arguments[0],n=arguments[1];t.call(this,r,n),this._ptLocator=new mh,this._geomFact=null,this._resultGeom=null,this._graph=null,this._edgeList=new ph,this._resultPolyList=new xn,this._resultLineList=new xn,this._resultPointList=new xn,this._graph=new Gs(new Che),this._geomFact=r.getFactory()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.insertUniqueEdge=function(n){var i=this._edgeList.findEqualEdge(n);if(i!==null){var o=i.getLabel(),a=n.getLabel();i.isPointwiseEqual(n)||(a=new Bo(n.getLabel()),a.flip());var s=i.getDepth();s.isNull()&&s.add(o),s.add(a),o.merge(a)}else this._edgeList.add(n)},e.prototype.getGraph=function(){return this._graph},e.prototype.cancelDuplicateResultEdges=function(){for(var n=this._graph.getEdgeEnds().iterator();n.hasNext();){var i=n.next(),o=i.getSym();i.isInResult()&&o.isInResult()&&(i.setInResult(!1),o.setInResult(!1))}},e.prototype.isCoveredByLA=function(n){return!!(this.isCovered(n,this._resultLineList)||this.isCovered(n,this._resultPolyList))},e.prototype.computeGeometry=function(n,i,o,a){var s=new xn;return s.addAll(n),s.addAll(i),s.addAll(o),s.isEmpty()?e.createEmptyResult(a,this._arg[0].getGeometry(),this._arg[1].getGeometry(),this._geomFact):this._geomFact.buildGeometry(s)},e.prototype.mergeSymLabels=function(){for(var n=this._graph.getNodes().iterator();n.hasNext();){var i=n.next();i.getEdges().mergeSymLabels()}},e.prototype.isCovered=function(n,i){for(var o=this,a=i.iterator();a.hasNext();){var s=a.next(),l=o._ptLocator.locate(n,s);if(l!==ur.EXTERIOR)return!0}return!1},e.prototype.replaceCollapsedEdges=function(){for(var n=new xn,i=this._edgeList.iterator();i.hasNext();){var o=i.next();o.isCollapsed()&&(i.remove(),n.add(o.getCollapsedEdge()))}this._edgeList.addAll(n)},e.prototype.updateNodeLabelling=function(){for(var n=this._graph.getNodes().iterator();n.hasNext();){var i=n.next(),o=i.getEdges().getLabel();i.getLabel().merge(o)}},e.prototype.getResultGeometry=function(n){return this.computeOverlay(n),this._resultGeom},e.prototype.insertUniqueEdges=function(n){for(var i=this,o=n.iterator();o.hasNext();){var a=o.next();i.insertUniqueEdge(a)}},e.prototype.computeOverlay=function(n){this.copyPoints(0),this.copyPoints(1),this._arg[0].computeSelfNodes(this._li,!1),this._arg[1].computeSelfNodes(this._li,!1),this._arg[0].computeEdgeIntersections(this._arg[1],this._li,!0);var i=new xn;this._arg[0].computeSplitEdges(i),this._arg[1].computeSplitEdges(i),this.insertUniqueEdges(i),this.computeLabelsFromDepths(),this.replaceCollapsedEdges(),f_.checkValid(this._edgeList.getEdges()),this._graph.addEdges(this._edgeList.getEdges()),this.computeLabelling(),this.labelIncompleteNodes(),this.findResultAreaEdges(n),this.cancelDuplicateResultEdges();var o=new Nu(this._geomFact);o.add(this._graph),this._resultPolyList=o.getPolygons();var a=new kp(this,this._geomFact,this._ptLocator);this._resultLineList=a.build(n);var s=new Vb(this,this._geomFact,this._ptLocator);this._resultPointList=s.build(n),this._resultGeom=this.computeGeometry(this._resultPointList,this._resultLineList,this._resultPolyList,n)},e.prototype.labelIncompleteNode=function(n,i){var o=this._ptLocator.locate(n.getCoordinate(),this._arg[i].getGeometry());n.getLabel().setLocation(i,o)},e.prototype.copyPoints=function(n){for(var i=this,o=this._arg[n].getNodeIterator();o.hasNext();){var a=o.next(),s=i._graph.addNode(a.getCoordinate());s.setLabel(n,a.getLabel().getLocation(n))}},e.prototype.findResultAreaEdges=function(n){for(var i=this._graph.getEdgeEnds().iterator();i.hasNext();){var o=i.next(),a=o.getLabel();a.isArea()&&!o.isInteriorAreaEdge()&&e.isResultOfOp(a.getLocation(0,cn.RIGHT),a.getLocation(1,cn.RIGHT),n)&&o.setInResult(!0)}},e.prototype.computeLabelsFromDepths=function(){for(var n=this._edgeList.iterator();n.hasNext();){var i=n.next(),o=i.getLabel(),a=i.getDepth();if(!a.isNull()){a.normalize();for(var s=0;s<2;s++)!o.isNull(s)&&o.isArea()&&!a.isNull(s)&&(a.getDelta(s)===0?o.toLine(s):(Ti.isTrue(!a.isNull(s,cn.LEFT),"depth of LEFT side has not been initialized"),o.setLocation(s,cn.LEFT,a.getLocation(s,cn.LEFT)),Ti.isTrue(!a.isNull(s,cn.RIGHT),"depth of RIGHT side has not been initialized"),o.setLocation(s,cn.RIGHT,a.getLocation(s,cn.RIGHT))))}}},e.prototype.computeLabelling=function(){for(var n=this,i=this._graph.getNodes().iterator();i.hasNext();){var o=i.next();o.getEdges().computeLabelling(n._arg)}this.mergeSymLabels(),this.updateNodeLabelling()},e.prototype.labelIncompleteNodes=function(){for(var n=this,i=this._graph.getNodes().iterator();i.hasNext();){var o=i.next(),a=o.getLabel();o.isIsolated()&&(a.isNull(0)?n.labelIncompleteNode(o,0):n.labelIncompleteNode(o,1)),o.getEdges().updateLabelling(a)}},e.prototype.isCoveredByA=function(n){return!!this.isCovered(n,this._resultPolyList)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(JE);Ei.overlayOp=function(t,e,r){var n=new Ei(t,e),i=n.getResultGeometry(r);return i};Ei.intersection=function(t,e){if(t.isEmpty()||e.isEmpty())return Ei.createEmptyResult(Ei.INTERSECTION,t,e,t.getFactory());if(t.isGeometryCollection()){var r=e;return Ub.map(t,{interfaces_:function(){return[h_.MapOp]},map:function(n){return n.intersection(r)}})}return t.checkNotGeometryCollection(t),t.checkNotGeometryCollection(e),Rc.overlayOp(t,e,Ei.INTERSECTION)};Ei.symDifference=function(t,e){if(t.isEmpty()||e.isEmpty()){if(t.isEmpty()&&e.isEmpty())return Ei.createEmptyResult(Ei.SYMDIFFERENCE,t,e,t.getFactory());if(t.isEmpty())return e.copy();if(e.isEmpty())return t.copy()}return t.checkNotGeometryCollection(t),t.checkNotGeometryCollection(e),Rc.overlayOp(t,e,Ei.SYMDIFFERENCE)};Ei.resultDimension=function(t,e,r){var n=e.getDimension(),i=r.getDimension(),o=-1;switch(t){case Ei.INTERSECTION:o=Math.min(n,i);break;case Ei.UNION:o=Math.max(n,i);break;case Ei.DIFFERENCE:o=n;break;case Ei.SYMDIFFERENCE:o=Math.max(n,i);break}return o};Ei.createEmptyResult=function(t,e,r,n){var i=null;switch(Ei.resultDimension(t,e,r)){case-1:i=n.createGeometryCollection(new Array(0).fill(null));break;case 0:i=n.createPoint();break;case 1:i=n.createLineString();break;case 2:i=n.createPolygon();break}return i};Ei.difference=function(t,e){return t.isEmpty()?Ei.createEmptyResult(Ei.DIFFERENCE,t,e,t.getFactory()):e.isEmpty()?t.copy():(t.checkNotGeometryCollection(t),t.checkNotGeometryCollection(e),Rc.overlayOp(t,e,Ei.DIFFERENCE))};Ei.isResultOfOp=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1],r=t.getLocation(0),n=t.getLocation(1);return Ei.isResultOfOp(r,n,e)}else if(arguments.length===3){var i=arguments[0],o=arguments[1],a=arguments[2];switch(i===ur.BOUNDARY&&(i=ur.INTERIOR),o===ur.BOUNDARY&&(o=ur.INTERIOR),a){case Ei.INTERSECTION:return i===ur.INTERIOR&&o===ur.INTERIOR;case Ei.UNION:return i===ur.INTERIOR||o===ur.INTERIOR;case Ei.DIFFERENCE:return i===ur.INTERIOR&&o!==ur.INTERIOR;case Ei.SYMDIFFERENCE:return i===ur.INTERIOR&&o!==ur.INTERIOR||i!==ur.INTERIOR&&o===ur.INTERIOR}return!1}};Ei.INTERSECTION=1;Ei.UNION=2;Ei.DIFFERENCE=3;Ei.SYMDIFFERENCE=4;var Gy=function(){this._g=null,this._boundaryDistanceTolerance=null,this._linework=null,this._ptLocator=new mh,this._seg=new qn;var e=arguments[0],r=arguments[1];this._g=e,this._boundaryDistanceTolerance=r,this._linework=this.extractLinework(e)};Gy.prototype.isWithinToleranceOfBoundary=function(e){for(var r=this,n=0;n<this._linework.getNumGeometries();n++)for(var i=r._linework.getGeometryN(n),o=i.getCoordinateSequence(),a=0;a<o.size()-1;a++){o.getCoordinate(a,r._seg.p0),o.getCoordinate(a+1,r._seg.p1);var s=r._seg.distance(e);if(s<=r._boundaryDistanceTolerance)return!0}return!1};Gy.prototype.getLocation=function(e){return this.isWithinToleranceOfBoundary(e)?ur.BOUNDARY:this._ptLocator.locate(e,this._g)};Gy.prototype.extractLinework=function(e){var r=new eS;e.apply(r);var n=r.getLinework(),i=Yi.toLineStringArray(n);return e.getFactory().createMultiLineString(i)};Gy.prototype.interfaces_=function(){return[]};Gy.prototype.getClass=function(){return Gy};var eS=function(){this._linework=null,this._linework=new xn};eS.prototype.getLinework=function(){return this._linework};eS.prototype.filter=function(e){var r=this;if(e instanceof Ka){var n=e;this._linework.add(n.getExteriorRing());for(var i=0;i<n.getNumInteriorRing();i++)r._linework.add(n.getInteriorRingN(i))}};eS.prototype.interfaces_=function(){return[wp]};eS.prototype.getClass=function(){return eS};var p_=function(){this._g=null,this._doLeft=!0,this._doRight=!0;var e=arguments[0];this._g=e};p_.prototype.extractPoints=function(e,r,n){for(var i=this,o=e.getCoordinates(),a=0;a<o.length-1;a++)i.computeOffsetPoints(o[a],o[a+1],r,n)};p_.prototype.setSidesToGenerate=function(e,r){this._doLeft=e,this._doRight=r};p_.prototype.getPoints=function(e){for(var r=this,n=new xn,i=Ul.getLines(this._g),o=i.iterator();o.hasNext();){var a=o.next();r.extractPoints(a,e,n)}return n};p_.prototype.computeOffsetPoints=function(e,r,n,i){var o=r.x-e.x,a=r.y-e.y,s=Math.sqrt(o*o+a*a),l=n*o/s,u=n*a/s,p=(r.x+e.x)/2,m=(r.y+e.y)/2;if(this._doLeft){var v=new ar(p-u,m+l);i.add(v)}if(this._doRight){var x=new ar(p+u,m-l);i.add(x)}};p_.prototype.interfaces_=function(){return[]};p_.prototype.getClass=function(){return p_};var mf=function t(){this._geom=null,this._locFinder=null,this._location=new Array(3).fill(null),this._invalidLocation=null,this._boundaryDistanceTolerance=t.TOLERANCE,this._testCoords=new xn;var e=arguments[0],r=arguments[1],n=arguments[2];this._boundaryDistanceTolerance=t.computeBoundaryDistanceTolerance(e,r),this._geom=[e,r,n],this._locFinder=[new Gy(this._geom[0],this._boundaryDistanceTolerance),new Gy(this._geom[1],this._boundaryDistanceTolerance),new Gy(this._geom[2],this._boundaryDistanceTolerance)]},Ohe={TOLERANCE:{configurable:!0}};mf.prototype.reportResult=function(e,r,n){Bl.out.println("Overlay result invalid - A:"+ur.toLocationSymbol(r[0])+" B:"+ur.toLocationSymbol(r[1])+" expected:"+(n?"i":"e")+" actual:"+ur.toLocationSymbol(r[2]))};mf.prototype.isValid=function(e){this.addTestPts(this._geom[0]),this.addTestPts(this._geom[1]);var r=this.checkValid(e);return r};mf.prototype.checkValid=function(){var e=this;if(arguments.length===1){for(var r=arguments[0],n=0;n<this._testCoords.size();n++){var i=e._testCoords.get(n);if(!e.checkValid(r,i))return e._invalidLocation=i,!1}return!0}else if(arguments.length===2){var o=arguments[0],a=arguments[1];return this._location[0]=this._locFinder[0].getLocation(a),this._location[1]=this._locFinder[1].getLocation(a),this._location[2]=this._locFinder[2].getLocation(a),mf.hasLocation(this._location,ur.BOUNDARY)?!0:this.isValidResult(o,this._location)}};mf.prototype.addTestPts=function(e){var r=new p_(e);this._testCoords.addAll(r.getPoints(5*this._boundaryDistanceTolerance))};mf.prototype.isValidResult=function(e,r){var n=Ei.isResultOfOp(r[0],r[1],e),i=r[2]===ur.INTERIOR,o=!(n^i);return o||this.reportResult(e,r,n),o};mf.prototype.getInvalidLocation=function(){return this._invalidLocation};mf.prototype.interfaces_=function(){return[]};mf.prototype.getClass=function(){return mf};mf.hasLocation=function(e,r){for(var n=0;n<3;n++)if(e[n]===r)return!0;return!1};mf.computeBoundaryDistanceTolerance=function(e,r){return Math.min(xa.computeSizeBasedSnapTolerance(e),xa.computeSizeBasedSnapTolerance(r))};mf.isValid=function(e,r,n,i){var o=new mf(e,r,i);return o.isValid(n)};Ohe.TOLERANCE.get=function(){return 1e-6};Object.defineProperties(mf,Ohe);var gf=function t(e){this._geomFactory=null,this._skipEmpty=!1,this._inputGeoms=null,this._geomFactory=t.extractFactory(e),this._inputGeoms=e};gf.prototype.extractElements=function(e,r){var n=this;if(e===null)return null;for(var i=0;i<e.getNumGeometries();i++){var o=e.getGeometryN(i);n._skipEmpty&&o.isEmpty()||r.add(o)}};gf.prototype.combine=function(){for(var e=this,r=new xn,n=this._inputGeoms.iterator();n.hasNext();){var i=n.next();e.extractElements(i,r)}return r.size()===0?this._geomFactory!==null?this._geomFactory.createGeometryCollection(null):null:this._geomFactory.buildGeometry(r)};gf.prototype.interfaces_=function(){return[]};gf.prototype.getClass=function(){return gf};gf.combine=function(){if(arguments.length===1){var e=arguments[0],r=new gf(e);return r.combine()}else if(arguments.length===2){var n=arguments[0],i=arguments[1],o=new gf(gf.createList(n,i));return o.combine()}else if(arguments.length===3){var a=arguments[0],s=arguments[1],l=arguments[2],u=new gf(gf.createList(a,s,l));return u.combine()}};gf.extractFactory=function(e){return e.isEmpty()?null:e.iterator().next().getFactory()};gf.createList=function(){if(arguments.length===2){var e=arguments[0],r=arguments[1],n=new xn;return n.add(e),n.add(r),n}else if(arguments.length===3){var i=arguments[0],o=arguments[1],a=arguments[2],s=new xn;return s.add(i),s.add(o),s.add(a),s}};var $a=function(){this._inputPolys=null,this._geomFactory=null;var e=arguments[0];this._inputPolys=e,this._inputPolys===null&&(this._inputPolys=new xn)},Lhe={STRTREE_NODE_CAPACITY:{configurable:!0}};$a.prototype.reduceToGeometries=function(e){for(var r=this,n=new xn,i=e.iterator();i.hasNext();){var o=i.next(),a=null;ai(o,ch)?a=r.unionTree(o):o instanceof si&&(a=o),n.add(a)}return n};$a.prototype.extractByEnvelope=function(e,r,n){for(var i=new xn,o=0;o<r.getNumGeometries();o++){var a=r.getGeometryN(o);a.getEnvelopeInternal().intersects(e)?i.add(a):n.add(a)}return this._geomFactory.buildGeometry(i)};$a.prototype.unionOptimized=function(e,r){var n=e.getEnvelopeInternal(),i=r.getEnvelopeInternal();if(!n.intersects(i)){var o=gf.combine(e,r);return o}if(e.getNumGeometries()<=1&&r.getNumGeometries()<=1)return this.unionActual(e,r);var a=n.intersection(i);return this.unionUsingEnvelopeIntersection(e,r,a)};$a.prototype.union=function(){if(this._inputPolys===null)throw new Error("union() method cannot be called twice");if(this._inputPolys.isEmpty())return null;this._geomFactory=this._inputPolys.iterator().next().getFactory();for(var e=new vhe($a.STRTREE_NODE_CAPACITY),r=this._inputPolys.iterator();r.hasNext();){var n=r.next();e.insert(n.getEnvelopeInternal(),n)}this._inputPolys=null;var i=e.itemsTree(),o=this.unionTree(i);return o};$a.prototype.binaryUnion=function(){if(arguments.length===1){var e=arguments[0];return this.binaryUnion(e,0,e.size())}else if(arguments.length===3){var r=arguments[0],n=arguments[1],i=arguments[2];if(i-n<=1){var o=$a.getGeometry(r,n);return this.unionSafe(o,null)}else{if(i-n==2)return this.unionSafe($a.getGeometry(r,n),$a.getGeometry(r,n+1));var a=Math.trunc((i+n)/2),s=this.binaryUnion(r,n,a),l=this.binaryUnion(r,a,i);return this.unionSafe(s,l)}}};$a.prototype.repeatedUnion=function(e){for(var r=null,n=e.iterator();n.hasNext();){var i=n.next();r===null?r=i.copy():r=r.union(i)}return r};$a.prototype.unionSafe=function(e,r){return e===null&&r===null?null:e===null?r.copy():r===null?e.copy():this.unionOptimized(e,r)};$a.prototype.unionActual=function(e,r){return $a.restrictToPolygons(e.union(r))};$a.prototype.unionTree=function(e){var r=this.reduceToGeometries(e),n=this.binaryUnion(r);return n};$a.prototype.unionUsingEnvelopeIntersection=function(e,r,n){var i=new xn,o=this.extractByEnvelope(n,e,i),a=this.extractByEnvelope(n,r,i),s=this.unionActual(o,a);i.add(s);var l=gf.combine(i);return l};$a.prototype.bufferUnion=function(){if(arguments.length===1){var e=arguments[0],r=e.get(0).getFactory(),n=r.buildGeometry(e),i=n.buffer(0);return i}else if(arguments.length===2){var o=arguments[0],a=arguments[1],s=o.getFactory(),l=s.createGeometryCollection([o,a]),u=l.buffer(0);return u}};$a.prototype.interfaces_=function(){return[]};$a.prototype.getClass=function(){return $a};$a.restrictToPolygons=function(e){if(ai(e,Ny))return e;var r=vv.getPolygons(e);return r.size()===1?r.get(0):e.getFactory().createMultiPolygon(Yi.toPolygonArray(r))};$a.getGeometry=function(e,r){return r>=e.size()?null:e.get(r)};$a.union=function(e){var r=new $a(e);return r.union()};Lhe.STRTREE_NODE_CAPACITY.get=function(){return 4};Object.defineProperties($a,Lhe);var K5=function(){};K5.prototype.interfaces_=function(){return[]};K5.prototype.getClass=function(){return K5};K5.union=function(e,r){if(e.isEmpty()||r.isEmpty()){if(e.isEmpty()&&r.isEmpty())return Ei.createEmptyResult(Ei.UNION,e,r,e.getFactory());if(e.isEmpty())return r.copy();if(r.isEmpty())return e.copy()}return e.checkNotGeometryCollection(e),e.checkNotGeometryCollection(r),Rc.overlayOp(e,r,Ei.UNION)};var m_=function(){return new Z5};function Z5(){this.reset()}Z5.prototype={constructor:Z5,reset:function(){this.s=this.t=0},add:function(t){Dhe(Q5,t,this.t),Dhe(this,Q5.s,this.s),this.s?this.t+=Q5.t:this.s=Q5.t},valueOf:function(){return this.s}};var Q5=new Z5;function Dhe(t,e,r){var n=t.s=e+r,i=n-e,o=n-i;t.t=e-o+(r-i)}var DH=Math.PI,Nhe=DH*2;m_();m_();m_();function $he(t,e){return[t>DH?t-Nhe:t<-DH?t+Nhe:t,e]}$he.invert=$he;var Fhe=function(t,e){return t<e?-1:t>e?1:t>=e?0:NaN},Wxt=function(t){return t.length===1&&(t=Gxt(t)),{left:function(e,r,n,i){for(n==null&&(n=0),i==null&&(i=e.length);n<i;){var o=n+i>>>1;t(e[o],r)<0?n=o+1:i=o}return n},right:function(e,r,n,i){for(n==null&&(n=0),i==null&&(i=e.length);n<i;){var o=n+i>>>1;t(e[o],r)>0?i=o:n=o+1}return n}}};function Gxt(t){return function(e,r){return Fhe(t(e),r)}}Wxt(Fhe);m_();m_();m_();m_();m_();function zhe(){}zhe.prototype={constructor:zhe,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function qxt(t,e,r,n){for(var i=-1,o=t==null?0:t.length;++i<o;){var a=t[i];e(n,a,r(a),t)}return n}var Xxt=qxt,Yxt=M9;function Kxt(t,e,r,n){return Yxt(t,function(i,o,a){e(n,i,r(i),a)}),n}var Zxt=Kxt,Qxt=Xxt,Jxt=Zxt,e_t=W1,t_t=Xf;function r_t(t,e){return function(r,n){var i=t_t(r)?Qxt:Jxt,o=e?e():{};return i(r,t,e_t(n),o)}}var n_t=r_t,i_t=XL,o_t=n_t,s_t=Object.prototype,a_t=s_t.hasOwnProperty,l_t=o_t(function(t,e,r){a_t.call(t,r)?t[r].push(e):i_t(t,r,[e])}),Kkt=l_t;function c_t(t){var e=t==null?0:t.length;return e?t[e-1]:void 0}var u_t=c_t;function f_t(t,e,r){var n=-1,i=t.length;e<0&&(e=-e>i?0:i+e),r=r>i?i:r,r<0&&(r+=i),i=e>r?0:r-e>>>0,e>>>=0;for(var o=Array(i);++n<i;)o[n]=t[n+e];return o}var d_t=f_t,h_t=ZP,p_t=d_t;function m_t(t,e){return e.length<2?t:h_t(t,p_t(e,0,-1))}var g_t=m_t,v_t=aC,y_t=u_t,x_t=g_t,__t=lC;function b_t(t,e){return e=v_t(e,t),t=x_t(t,e),t==null||delete t[__t(y_t(e))]}var w_t=b_t,C_t=q9;function E_t(t){return C_t(t)?void 0:t}var S_t=E_t,Bhe=eC,T_t=LL,P_t=Xf,jhe=Bhe?Bhe.isConcatSpreadable:void 0;function I_t(t){return P_t(t)||T_t(t)||!!(jhe&&t&&t[jhe])}var M_t=I_t,A_t=L9,R_t=M_t;function Uhe(t,e,r,n,i){var o=-1,a=t.length;for(r||(r=R_t),i||(i=[]);++o<a;){var s=t[o];e>0&&r(s)?e>1?Uhe(s,e-1,r,n,i):A_t(i,s):n||(i[i.length]=s)}return i}var Vhe=Uhe,k_t=Vhe;function O_t(t){var e=t==null?0:t.length;return e?k_t(t,1):[]}var L_t=O_t,D_t=L_t,N_t=Dte,$_t=$te;function F_t(t){return $_t(N_t(t,void 0,D_t),t+"")}var z_t=F_t,B_t=KP,j_t=$ne,U_t=w_t,V_t=aC,H_t=xx,W_t=S_t,G_t=z_t,q_t=W7,X_t=1,Y_t=2,K_t=4,Z_t=G_t(function(t,e){var r={};if(t==null)return r;var n=!1;e=B_t(e,function(o){return o=V_t(o,t),n||(n=o.length>1),o}),H_t(t,q_t(t),r),n&&(r=j_t(r,X_t|Y_t|K_t,W_t));for(var i=e.length;i--;)U_t(r,e[i]);return r}),Zkt=Z_t,Q_t="Expected a function";function J_t(t,e,r){if(typeof t!="function")throw new TypeError(Q_t);return setTimeout(function(){t.apply(void 0,r)},e)}var e1t=J_t,t1t=e1t,r1t=cC,n1t=r1t(function(t,e){return t1t(t,1,e)}),Qkt=n1t,tS={};/** * @license React * react-dom-server-legacy.browser.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Hhe=Y.exports;function Ki(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,r=1;r<arguments.length;r++)e+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var pd=Object.prototype.hasOwnProperty,i1t=/^[: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]*$/,Whe={},Ghe={};function qhe(t){return pd.call(Ghe,t)?!0:pd.call(Whe,t)?!1:i1t.test(t)?Ghe[t]=!0:(Whe[t]=!0,!1)}function vf(t,e,r,n,i,o,a){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=n,this.attributeNamespace=i,this.mustUseProperty=r,this.propertyName=t,this.type=e,this.sanitizeURL=o,this.removeEmptyString=a}var Qc={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){Qc[t]=new vf(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];Qc[e]=new vf(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){Qc[t]=new vf(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){Qc[t]=new vf(t,2,!1,t,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(t){Qc[t]=new vf(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){Qc[t]=new vf(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){Qc[t]=new vf(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){Qc[t]=new vf(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){Qc[t]=new vf(t,5,!1,t.toLowerCase(),null,!1,!1)});var NH=/[\-:]([a-z])/g;function $H(t){return t[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(t){var e=t.replace(NH,$H);Qc[e]=new vf(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(NH,$H);Qc[e]=new vf(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(NH,$H);Qc[e]=new vf(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){Qc[t]=new vf(t,1,!1,t.toLowerCase(),null,!1,!1)});Qc.xlinkHref=new vf("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){Qc[t]=new vf(t,1,!1,t.toLowerCase(),null,!0,!0)});var J5={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},o1t=["Webkit","ms","Moz","O"];Object.keys(J5).forEach(function(t){o1t.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),J5[e]=J5[t]})});var s1t=/["'&<>]/;function yf(t){if(typeof t=="boolean"||typeof t=="number")return""+t;t=""+t;var e=s1t.exec(t);if(e){var r="",n,i=0;for(n=e.index;n<t.length;n++){switch(t.charCodeAt(n)){case 34:e=""";break;case 38:e="&";break;case 39:e="'";break;case 60:e="<";break;case 62:e=">";break;default:continue}i!==n&&(r+=t.substring(i,n)),i=n+1,r+=e}t=i!==n?r+t.substring(i,n):r}return t}var a1t=/([A-Z])/g,l1t=/^ms-/,FH=Array.isArray;function qy(t,e){return{insertionMode:t,selectedValue:e}}function c1t(t,e,r){switch(e){case"select":return qy(1,r.value!=null?r.value:r.defaultValue);case"svg":return qy(2,null);case"math":return qy(3,null);case"foreignObject":return qy(1,null);case"table":return qy(4,null);case"thead":case"tbody":case"tfoot":return qy(5,null);case"colgroup":return qy(7,null);case"tr":return qy(6,null)}return 4<=t.insertionMode||t.insertionMode===0?qy(1,null):t}var Xhe=new Map;function Yhe(t,e,r){if(typeof r!="object")throw Error(Ki(62));e=!0;for(var n in r)if(pd.call(r,n)){var i=r[n];if(i!=null&&typeof i!="boolean"&&i!==""){if(n.indexOf("--")===0){var o=yf(n);i=yf((""+i).trim())}else{o=n;var a=Xhe.get(o);a!==void 0||(a=yf(o.replace(a1t,"-$1").toLowerCase().replace(l1t,"-ms-")),Xhe.set(o,a)),o=a,i=typeof i=="number"?i===0||pd.call(J5,n)?""+i:i+"px":yf((""+i).trim())}e?(e=!1,t.push(' style="',o,":",i)):t.push(";",o,":",i)}}e||t.push('"')}function vh(t,e,r,n){switch(r){case"style":Yhe(t,e,n);return;case"defaultValue":case"defaultChecked":case"innerHTML":case"suppressContentEditableWarning":case"suppressHydrationWarning":return}if(!(2<r.length)||r[0]!=="o"&&r[0]!=="O"||r[1]!=="n"&&r[1]!=="N"){if(e=Qc.hasOwnProperty(r)?Qc[r]:null,e!==null){switch(typeof n){case"function":case"symbol":return;case"boolean":if(!e.acceptsBooleans)return}switch(r=e.attributeName,e.type){case 3:n&&t.push(" ",r,'=""');break;case 4:n===!0?t.push(" ",r,'=""'):n!==!1&&t.push(" ",r,'="',yf(n),'"');break;case 5:isNaN(n)||t.push(" ",r,'="',yf(n),'"');break;case 6:!isNaN(n)&&1<=n&&t.push(" ",r,'="',yf(n),'"');break;default:e.sanitizeURL&&(n=""+n),t.push(" ",r,'="',yf(n),'"')}}else if(qhe(r)){switch(typeof n){case"function":case"symbol":return;case"boolean":if(e=r.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-")return}t.push(" ",r,'="',yf(n),'"')}}}function e$(t,e,r){if(e!=null){if(r!=null)throw Error(Ki(60));if(typeof e!="object"||!("__html"in e))throw Error(Ki(61));e=e.__html,e!=null&&t.push(""+e)}}function u1t(t){var e="";return Hhe.Children.forEach(t,function(r){r!=null&&(e+=r)}),e}function zH(t,e,r,n){t.push(yv(r));var i=r=null,o;for(o in e)if(pd.call(e,o)){var a=e[o];if(a!=null)switch(o){case"children":r=a;break;case"dangerouslySetInnerHTML":i=a;break;default:vh(t,n,o,a)}}return t.push(">"),e$(t,i,r),typeof r=="string"?(t.push(yf(r)),null):r}var f1t=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,Khe=new Map;function yv(t){var e=Khe.get(t);if(e===void 0){if(!f1t.test(t))throw Error(Ki(65,t));e="<"+t,Khe.set(t,e)}return e}function d1t(t,e,r,n,i){switch(e){case"select":t.push(yv("select"));var o=null,a=null;for(p in r)if(pd.call(r,p)){var s=r[p];if(s!=null)switch(p){case"children":o=s;break;case"dangerouslySetInnerHTML":a=s;break;case"defaultValue":case"value":break;default:vh(t,n,p,s)}}return t.push(">"),e$(t,a,o),o;case"option":a=i.selectedValue,t.push(yv("option"));var l=s=null,u=null,p=null;for(o in r)if(pd.call(r,o)){var m=r[o];if(m!=null)switch(o){case"children":s=m;break;case"selected":u=m;break;case"dangerouslySetInnerHTML":p=m;break;case"value":l=m;default:vh(t,n,o,m)}}if(a!=null)if(r=l!==null?""+l:u1t(s),FH(a)){for(n=0;n<a.length;n++)if(""+a[n]===r){t.push(' selected=""');break}}else""+a===r&&t.push(' selected=""');else u&&t.push(' selected=""');return t.push(">"),e$(t,p,s),s;case"textarea":t.push(yv("textarea")),p=a=o=null;for(s in r)if(pd.call(r,s)&&(l=r[s],l!=null))switch(s){case"children":p=l;break;case"value":o=l;break;case"defaultValue":a=l;break;case"dangerouslySetInnerHTML":throw Error(Ki(91));default:vh(t,n,s,l)}if(o===null&&a!==null&&(o=a),t.push(">"),p!=null){if(o!=null)throw Error(Ki(92));if(FH(p)&&1<p.length)throw Error(Ki(93));o=""+p}return typeof o=="string"&&o[0]===` `&&t.push(` `),o!==null&&t.push(yf(""+o)),null;case"input":t.push(yv("input")),l=p=s=o=null;for(a in r)if(pd.call(r,a)&&(u=r[a],u!=null))switch(a){case"children":case"dangerouslySetInnerHTML":throw Error(Ki(399,"input"));case"defaultChecked":l=u;break;case"defaultValue":s=u;break;case"checked":p=u;break;case"value":o=u;break;default:vh(t,n,a,u)}return p!==null?vh(t,n,"checked",p):l!==null&&vh(t,n,"checked",l),o!==null?vh(t,n,"value",o):s!==null&&vh(t,n,"value",s),t.push("/>"),null;case"menuitem":t.push(yv("menuitem"));for(var v in r)if(pd.call(r,v)&&(o=r[v],o!=null))switch(v){case"children":case"dangerouslySetInnerHTML":throw Error(Ki(400));default:vh(t,n,v,o)}return t.push(">"),null;case"title":t.push(yv("title")),o=null;for(m in r)if(pd.call(r,m)&&(a=r[m],a!=null))switch(m){case"children":o=a;break;case"dangerouslySetInnerHTML":throw Error(Ki(434));default:vh(t,n,m,a)}return t.push(">"),o;case"listing":case"pre":t.push(yv(e)),a=o=null;for(l in r)if(pd.call(r,l)&&(s=r[l],s!=null))switch(l){case"children":o=s;break;case"dangerouslySetInnerHTML":a=s;break;default:vh(t,n,l,s)}if(t.push(">"),a!=null){if(o!=null)throw Error(Ki(60));if(typeof a!="object"||!("__html"in a))throw Error(Ki(61));r=a.__html,r!=null&&(typeof r=="string"&&0<r.length&&r[0]===` `?t.push(` `,r):t.push(""+r))}return typeof o=="string"&&o[0]===` `&&t.push(` `),o;case"area":case"base":case"br":case"col":case"embed":case"hr":case"img":case"keygen":case"link":case"meta":case"param":case"source":case"track":case"wbr":t.push(yv(e));for(var x in r)if(pd.call(r,x)&&(o=r[x],o!=null))switch(x){case"children":case"dangerouslySetInnerHTML":throw Error(Ki(399,e));default:vh(t,n,x,o)}return t.push("/>"),null;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 zH(t,r,e,n);case"html":return i.insertionMode===0&&t.push("<!DOCTYPE html>"),zH(t,r,e,n);default:if(e.indexOf("-")===-1&&typeof r.is!="string")return zH(t,r,e,n);t.push(yv(e)),a=o=null;for(u in r)if(pd.call(r,u)&&(s=r[u],s!=null))switch(u){case"children":o=s;break;case"dangerouslySetInnerHTML":a=s;break;case"style":Yhe(t,n,s);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":break;default:qhe(u)&&typeof s!="function"&&typeof s!="symbol"&&t.push(" ",u,'="',yf(s),'"')}return t.push(">"),e$(t,a,o),o}}function Zhe(t,e,r){if(t.push('<!--$?--><template id="'),r===null)throw Error(Ki(395));return t.push(r),t.push('"></template>')}function h1t(t,e,r,n){switch(r.insertionMode){case 0:case 1:return t.push('<div hidden id="'),t.push(e.segmentPrefix),e=n.toString(16),t.push(e),t.push('">');case 2:return t.push('<svg aria-hidden="true" style="display:none" id="'),t.push(e.segmentPrefix),e=n.toString(16),t.push(e),t.push('">');case 3:return t.push('<math aria-hidden="true" style="display:none" id="'),t.push(e.segmentPrefix),e=n.toString(16),t.push(e),t.push('">');case 4:return t.push('<table hidden id="'),t.push(e.segmentPrefix),e=n.toString(16),t.push(e),t.push('">');case 5:return t.push('<table hidden><tbody id="'),t.push(e.segmentPrefix),e=n.toString(16),t.push(e),t.push('">');case 6:return t.push('<table hidden><tr id="'),t.push(e.segmentPrefix),e=n.toString(16),t.push(e),t.push('">');case 7:return t.push('<table hidden><colgroup id="'),t.push(e.segmentPrefix),e=n.toString(16),t.push(e),t.push('">');default:throw Error(Ki(397))}}function p1t(t,e){switch(e.insertionMode){case 0:case 1:return t.push("</div>");case 2:return t.push("</svg>");case 3:return t.push("</math>");case 4:return t.push("</table>");case 5:return t.push("</tbody></table>");case 6:return t.push("</tr></table>");case 7:return t.push("</colgroup></table>");default:throw Error(Ki(397))}}var m1t=/[<\u2028\u2029]/g;function BH(t){return JSON.stringify(t).replace(m1t,function(e){switch(e){case"<":return"\\u003c";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw Error("escapeJSStringsForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React")}})}function g1t(t,e){return e=e===void 0?"":e,{bootstrapChunks:[],startInlineScript:"<script>",placeholderPrefix:e+"P:",segmentPrefix:e+"S:",boundaryPrefix:e+"B:",idPrefix:e,nextSuspenseID:0,sentCompleteSegmentFunction:!1,sentCompleteBoundaryFunction:!1,sentClientRenderFunction:!1,generateStaticMarkup:t}}function Qhe(t,e,r,n){return r.generateStaticMarkup?(t.push(yf(e)),!1):(e===""?t=n:(n&&t.push("<!-- -->"),t.push(yf(e)),t=!0),t)}var xA=Object.assign,v1t=Symbol.for("react.element"),Jhe=Symbol.for("react.portal"),epe=Symbol.for("react.fragment"),tpe=Symbol.for("react.strict_mode"),rpe=Symbol.for("react.profiler"),npe=Symbol.for("react.provider"),ipe=Symbol.for("react.context"),ope=Symbol.for("react.forward_ref"),spe=Symbol.for("react.suspense"),ape=Symbol.for("react.suspense_list"),lpe=Symbol.for("react.memo"),jH=Symbol.for("react.lazy"),y1t=Symbol.for("react.scope"),x1t=Symbol.for("react.debug_trace_mode"),_1t=Symbol.for("react.legacy_hidden"),b1t=Symbol.for("react.default_value"),cpe=Symbol.iterator;function UH(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case epe:return"Fragment";case Jhe:return"Portal";case rpe:return"Profiler";case tpe:return"StrictMode";case spe:return"Suspense";case ape:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case ipe:return(t.displayName||"Context")+".Consumer";case npe:return(t._context.displayName||"Context")+".Provider";case ope:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case lpe:return e=t.displayName||null,e!==null?e:UH(t.type)||"Memo";case jH:e=t._payload,t=t._init;try{return UH(t(e))}catch{}}return null}var upe={};function fpe(t,e){if(t=t.contextTypes,!t)return upe;var r={},n;for(n in t)r[n]=e[n];return r}var Wb=null;function t$(t,e){if(t!==e){t.context._currentValue2=t.parentValue,t=t.parent;var r=e.parent;if(t===null){if(r!==null)throw Error(Ki(401))}else{if(r===null)throw Error(Ki(401));t$(t,r)}e.context._currentValue2=e.value}}function dpe(t){t.context._currentValue2=t.parentValue,t=t.parent,t!==null&&dpe(t)}function hpe(t){var e=t.parent;e!==null&&hpe(e),t.context._currentValue2=t.value}function ppe(t,e){if(t.context._currentValue2=t.parentValue,t=t.parent,t===null)throw Error(Ki(402));t.depth===e.depth?t$(t,e):ppe(t,e)}function mpe(t,e){var r=e.parent;if(r===null)throw Error(Ki(402));t.depth===r.depth?t$(t,r):mpe(t,r),e.context._currentValue2=e.value}function r$(t){var e=Wb;e!==t&&(e===null?hpe(t):t===null?dpe(e):e.depth===t.depth?t$(e,t):e.depth>t.depth?ppe(e,t):mpe(e,t),Wb=t)}var gpe={isMounted:function(){return!1},enqueueSetState:function(t,e){t=t._reactInternals,t.queue!==null&&t.queue.push(e)},enqueueReplaceState:function(t,e){t=t._reactInternals,t.replace=!0,t.queue=[e]},enqueueForceUpdate:function(){}};function vpe(t,e,r,n){var i=t.state!==void 0?t.state:null;t.updater=gpe,t.props=r,t.state=i;var o={queue:[],replace:!1};t._reactInternals=o;var a=e.contextType;if(t.context=typeof a=="object"&&a!==null?a._currentValue2:n,a=e.getDerivedStateFromProps,typeof a=="function"&&(a=a(r,i),i=a==null?i:xA({},i,a),t.state=i),typeof e.getDerivedStateFromProps!="function"&&typeof t.getSnapshotBeforeUpdate!="function"&&(typeof t.UNSAFE_componentWillMount=="function"||typeof t.componentWillMount=="function"))if(e=t.state,typeof t.componentWillMount=="function"&&t.componentWillMount(),typeof t.UNSAFE_componentWillMount=="function"&&t.UNSAFE_componentWillMount(),e!==t.state&&gpe.enqueueReplaceState(t,t.state,null),o.queue!==null&&0<o.queue.length)if(e=o.queue,a=o.replace,o.queue=null,o.replace=!1,a&&e.length===1)t.state=e[0];else{for(o=a?e[0]:t.state,i=!0,a=a?1:0;a<e.length;a++){var s=e[a];s=typeof s=="function"?s.call(t,o,r,n):s,s!=null&&(i?(i=!1,o=xA({},o,s)):xA(o,s))}t.state=o}else o.queue=null}var w1t={id:1,overflow:""};function VH(t,e,r){var n=t.id;t=t.overflow;var i=32-n$(n)-1;n&=~(1<<i),r+=1;var o=32-n$(e)+i;if(30<o){var a=i-i%5;return o=(n&(1<<a)-1).toString(32),n>>=a,i-=a,{id:1<<32-n$(e)+i|r<<i|n,overflow:o+t}}return{id:1<<o|r<<i|n,overflow:t}}var n$=Math.clz32?Math.clz32:S1t,C1t=Math.log,E1t=Math.LN2;function S1t(t){return t>>>=0,t===0?32:31-(C1t(t)/E1t|0)|0}function T1t(t,e){return t===e&&(t!==0||1/t==1/e)||t!==t&&e!==e}var P1t=typeof Object.is=="function"?Object.is:T1t,Xy=null,HH=null,i$=null,ia=null,_A=!1,o$=!1,bA=0,g_=null,s$=0;function Gb(){if(Xy===null)throw Error(Ki(321));return Xy}function ype(){if(0<s$)throw Error(Ki(312));return{memoizedState:null,queue:null,next:null}}function WH(){return ia===null?i$===null?(_A=!1,i$=ia=ype()):(_A=!0,ia=i$):ia.next===null?(_A=!1,ia=ia.next=ype()):(_A=!0,ia=ia.next),ia}function GH(){HH=Xy=null,o$=!1,i$=null,s$=0,ia=g_=null}function xpe(t,e){return typeof e=="function"?e(t):e}function _pe(t,e,r){if(Xy=Gb(),ia=WH(),_A){var n=ia.queue;if(e=n.dispatch,g_!==null&&(r=g_.get(n),r!==void 0)){g_.delete(n),n=ia.memoizedState;do n=t(n,r.action),r=r.next;while(r!==null);return ia.memoizedState=n,[n,e]}return[ia.memoizedState,e]}return t=t===xpe?typeof e=="function"?e():e:r!==void 0?r(e):e,ia.memoizedState=t,t=ia.queue={last:null,dispatch:null},t=t.dispatch=I1t.bind(null,Xy,t),[ia.memoizedState,t]}function bpe(t,e){if(Xy=Gb(),ia=WH(),e=e===void 0?null:e,ia!==null){var r=ia.memoizedState;if(r!==null&&e!==null){var n=r[1];e:if(n===null)n=!1;else{for(var i=0;i<n.length&&i<e.length;i++)if(!P1t(e[i],n[i])){n=!1;break e}n=!0}if(n)return r[0]}}return t=t(),ia.memoizedState=[t,e],t}function I1t(t,e,r){if(25<=s$)throw Error(Ki(301));if(t===Xy)if(o$=!0,t={action:r,next:null},g_===null&&(g_=new Map),r=g_.get(e),r===void 0)g_.set(e,t);else{for(e=r;e.next!==null;)e=e.next;e.next=t}}function M1t(){throw Error(Ki(394))}function a$(){}var wpe={readContext:function(t){return t._currentValue2},useContext:function(t){return Gb(),t._currentValue2},useMemo:bpe,useReducer:_pe,useRef:function(t){Xy=Gb(),ia=WH();var e=ia.memoizedState;return e===null?(t={current:t},ia.memoizedState=t):e},useState:function(t){return _pe(xpe,t)},useInsertionEffect:a$,useLayoutEffect:function(){},useCallback:function(t,e){return bpe(function(){return t},e)},useImperativeHandle:a$,useEffect:a$,useDebugValue:a$,useDeferredValue:function(t){return Gb(),t},useTransition:function(){return Gb(),[!1,M1t]},useId:function(){var t=HH.treeContext,e=t.overflow;t=t.id,t=(t&~(1<<32-n$(t)-1)).toString(32)+e;var r=l$;if(r===null)throw Error(Ki(404));return e=bA++,t=":"+r.idPrefix+"R"+t,0<e&&(t+="H"+e.toString(32)),t+":"},useMutableSource:function(t,e){return Gb(),e(t._source)},useSyncExternalStore:function(t,e,r){if(r===void 0)throw Error(Ki(407));return r()}},l$=null,qH=Hhe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentDispatcher;function A1t(t){return console.error(t),null}function wA(){}function R1t(t,e,r,n,i,o,a,s,l){var u=[],p=new Set;return e={destination:null,responseState:e,progressiveChunkSize:n===void 0?12800:n,status:0,fatalError:null,nextSegmentId:0,allPendingTasks:0,pendingRootTasks:0,completedRootSegment:null,abortableTasks:p,pingedTasks:u,clientRenderedBoundaries:[],completedBoundaries:[],partialBoundaries:[],onError:i===void 0?A1t:i,onAllReady:o===void 0?wA:o,onShellReady:a===void 0?wA:a,onShellError:s===void 0?wA:s,onFatalError:l===void 0?wA:l},r=c$(e,0,null,r,!1,!1),r.parentFlushed=!0,t=XH(e,t,null,r,p,upe,null,w1t),u.push(t),e}function XH(t,e,r,n,i,o,a,s){t.allPendingTasks++,r===null?t.pendingRootTasks++:r.pendingTasks++;var l={node:e,ping:function(){var u=t.pingedTasks;u.push(l),u.length===1&&Mpe(t)},blockedBoundary:r,blockedSegment:n,abortSet:i,legacyContext:o,context:a,treeContext:s};return i.add(l),l}function c$(t,e,r,n,i,o){return{status:0,id:-1,index:e,parentFlushed:!1,chunks:[],children:[],formatContext:n,boundary:r,lastPushedText:i,textEmbedded:o}}function CA(t,e){if(t=t.onError(e),t!=null&&typeof t!="string")throw Error('onError returned something with a type other than "string". onError should return a string and may return null or undefined but must not return anything else. It received something of type "'+typeof t+'" instead');return t}function u$(t,e){var r=t.onShellError;r(e),r=t.onFatalError,r(e),t.destination!==null?(t.status=2,t.destination.destroy(e)):(t.status=1,t.fatalError=e)}function Cpe(t,e,r,n,i){for(Xy={},HH=e,bA=0,t=r(n,i);o$;)o$=!1,bA=0,s$+=1,ia=null,t=r(n,i);return GH(),t}function Epe(t,e,r,n){var i=r.render(),o=n.childContextTypes;if(o!=null){var a=e.legacyContext;if(typeof r.getChildContext!="function")n=a;else{r=r.getChildContext();for(var s in r)if(!(s in o))throw Error(Ki(108,UH(n)||"Unknown",s));n=xA({},a,r)}e.legacyContext=n,yh(t,e,i),e.legacyContext=a}else yh(t,e,i)}function Spe(t,e){if(t&&t.defaultProps){e=xA({},e),t=t.defaultProps;for(var r in t)e[r]===void 0&&(e[r]=t[r]);return e}return e}function YH(t,e,r,n,i){if(typeof r=="function")if(r.prototype&&r.prototype.isReactComponent){i=fpe(r,e.legacyContext);var o=r.contextType;o=new r(n,typeof o=="object"&&o!==null?o._currentValue2:i),vpe(o,r,n,i),Epe(t,e,o,r)}else{o=fpe(r,e.legacyContext),i=Cpe(t,e,r,n,o);var a=bA!==0;if(typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0)vpe(i,r,n,o),Epe(t,e,i,r);else if(a){n=e.treeContext,e.treeContext=VH(n,1,0);try{yh(t,e,i)}finally{e.treeContext=n}}else yh(t,e,i)}else if(typeof r=="string"){switch(i=e.blockedSegment,o=d1t(i.chunks,r,n,t.responseState,i.formatContext),i.lastPushedText=!1,a=i.formatContext,i.formatContext=c1t(a,r,n),KH(t,e,o),i.formatContext=a,r){case"area":case"base":case"br":case"col":case"embed":case"hr":case"img":case"input":case"keygen":case"link":case"meta":case"param":case"source":case"track":case"wbr":break;default:i.chunks.push("</",r,">")}i.lastPushedText=!1}else{switch(r){case _1t:case x1t:case tpe:case rpe:case epe:yh(t,e,n.children);return;case ape:yh(t,e,n.children);return;case y1t:throw Error(Ki(343));case spe:e:{r=e.blockedBoundary,i=e.blockedSegment,o=n.fallback,n=n.children,a=new Set;var s={id:null,rootSegmentID:-1,parentFlushed:!1,pendingTasks:0,forceClientRender:!1,completedSegments:[],byteSize:0,fallbackAbortableTasks:a,errorDigest:null},l=c$(t,i.chunks.length,s,i.formatContext,!1,!1);i.children.push(l),i.lastPushedText=!1;var u=c$(t,0,null,i.formatContext,!1,!1);u.parentFlushed=!0,e.blockedBoundary=s,e.blockedSegment=u;try{if(KH(t,e,n),t.responseState.generateStaticMarkup||u.lastPushedText&&u.textEmbedded&&u.chunks.push("<!-- -->"),u.status=1,f$(s,u),s.pendingTasks===0)break e}catch(p){u.status=4,s.forceClientRender=!0,s.errorDigest=CA(t,p)}finally{e.blockedBoundary=r,e.blockedSegment=i}e=XH(t,o,r,l,a,e.legacyContext,e.context,e.treeContext),t.pingedTasks.push(e)}return}if(typeof r=="object"&&r!==null)switch(r.$$typeof){case ope:if(n=Cpe(t,e,r.render,n,i),bA!==0){r=e.treeContext,e.treeContext=VH(r,1,0);try{yh(t,e,n)}finally{e.treeContext=r}}else yh(t,e,n);return;case lpe:r=r.type,n=Spe(r,n),YH(t,e,r,n,i);return;case npe:if(i=n.children,r=r._context,n=n.value,o=r._currentValue2,r._currentValue2=n,a=Wb,Wb=n={parent:a,depth:a===null?0:a.depth+1,context:r,parentValue:o,value:n},e.context=n,yh(t,e,i),t=Wb,t===null)throw Error(Ki(403));n=t.parentValue,t.context._currentValue2=n===b1t?t.context._defaultValue:n,t=Wb=t.parent,e.context=t;return;case ipe:n=n.children,n=n(r._currentValue2),yh(t,e,n);return;case jH:i=r._init,r=i(r._payload),n=Spe(r,n),YH(t,e,r,n,void 0);return}throw Error(Ki(130,r==null?r:typeof r,""))}}function yh(t,e,r){if(e.node=r,typeof r=="object"&&r!==null){switch(r.$$typeof){case v1t:YH(t,e,r.type,r.props,r.ref);return;case Jhe:throw Error(Ki(257));case jH:var n=r._init;r=n(r._payload),yh(t,e,r);return}if(FH(r)){Tpe(t,e,r);return}if(r===null||typeof r!="object"?n=null:(n=cpe&&r[cpe]||r["@@iterator"],n=typeof n=="function"?n:null),n&&(n=n.call(r))){if(r=n.next(),!r.done){var i=[];do i.push(r.value),r=n.next();while(!r.done);Tpe(t,e,i)}return}throw t=Object.prototype.toString.call(r),Error(Ki(31,t==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":t))}typeof r=="string"?(n=e.blockedSegment,n.lastPushedText=Qhe(e.blockedSegment.chunks,r,t.responseState,n.lastPushedText)):typeof r=="number"&&(n=e.blockedSegment,n.lastPushedText=Qhe(e.blockedSegment.chunks,""+r,t.responseState,n.lastPushedText))}function Tpe(t,e,r){for(var n=r.length,i=0;i<n;i++){var o=e.treeContext;e.treeContext=VH(o,n,i);try{KH(t,e,r[i])}finally{e.treeContext=o}}}function KH(t,e,r){var n=e.blockedSegment.formatContext,i=e.legacyContext,o=e.context;try{return yh(t,e,r)}catch(l){if(GH(),typeof l=="object"&&l!==null&&typeof l.then=="function"){r=l;var a=e.blockedSegment,s=c$(t,a.chunks.length,null,a.formatContext,a.lastPushedText,!0);a.children.push(s),a.lastPushedText=!1,t=XH(t,e.node,e.blockedBoundary,s,e.abortSet,e.legacyContext,e.context,e.treeContext).ping,r.then(t,t),e.blockedSegment.formatContext=n,e.legacyContext=i,e.context=o,r$(o)}else throw e.blockedSegment.formatContext=n,e.legacyContext=i,e.context=o,r$(o),l}}function k1t(t){var e=t.blockedBoundary;t=t.blockedSegment,t.status=3,Ipe(this,e,t)}function Ppe(t,e,r){var n=t.blockedBoundary;t.blockedSegment.status=3,n===null?(e.allPendingTasks--,e.status!==2&&(e.status=2,e.destination!==null&&e.destination.push(null))):(n.pendingTasks--,n.forceClientRender||(n.forceClientRender=!0,t=r===void 0?Error(Ki(432)):r,n.errorDigest=e.onError(t),n.parentFlushed&&e.clientRenderedBoundaries.push(n)),n.fallbackAbortableTasks.forEach(function(i){return Ppe(i,e,r)}),n.fallbackAbortableTasks.clear(),e.allPendingTasks--,e.allPendingTasks===0&&(n=e.onAllReady,n()))}function f$(t,e){if(e.chunks.length===0&&e.children.length===1&&e.children[0].boundary===null){var r=e.children[0];r.id=e.id,r.parentFlushed=!0,r.status===1&&f$(t,r)}else t.completedSegments.push(e)}function Ipe(t,e,r){if(e===null){if(r.parentFlushed){if(t.completedRootSegment!==null)throw Error(Ki(389));t.completedRootSegment=r}t.pendingRootTasks--,t.pendingRootTasks===0&&(t.onShellError=wA,e=t.onShellReady,e())}else e.pendingTasks--,e.forceClientRender||(e.pendingTasks===0?(r.parentFlushed&&r.status===1&&f$(e,r),e.parentFlushed&&t.completedBoundaries.push(e),e.fallbackAbortableTasks.forEach(k1t,t),e.fallbackAbortableTasks.clear()):r.parentFlushed&&r.status===1&&(f$(e,r),e.completedSegments.length===1&&e.parentFlushed&&t.partialBoundaries.push(e)));t.allPendingTasks--,t.allPendingTasks===0&&(t=t.onAllReady,t())}function Mpe(t){if(t.status!==2){var e=Wb,r=qH.current;qH.current=wpe;var n=l$;l$=t.responseState;try{var i=t.pingedTasks,o;for(o=0;o<i.length;o++){var a=i[o],s=t,l=a.blockedSegment;if(l.status===0){r$(a.context);try{yh(s,a,a.node),s.responseState.generateStaticMarkup||l.lastPushedText&&l.textEmbedded&&l.chunks.push("<!-- -->"),a.abortSet.delete(a),l.status=1,Ipe(s,a.blockedBoundary,l)}catch(y){if(GH(),typeof y=="object"&&y!==null&&typeof y.then=="function"){var u=a.ping;y.then(u,u)}else{a.abortSet.delete(a),l.status=4;var p=a.blockedBoundary,m=y,v=CA(s,m);if(p===null?u$(s,m):(p.pendingTasks--,p.forceClientRender||(p.forceClientRender=!0,p.errorDigest=v,p.parentFlushed&&s.clientRenderedBoundaries.push(p))),s.allPendingTasks--,s.allPendingTasks===0){var x=s.onAllReady;x()}}}finally{}}}i.splice(0,o),t.destination!==null&&ZH(t,t.destination)}catch(y){CA(t,y),u$(t,y)}finally{l$=n,qH.current=r,r===wpe&&r$(e)}}}function d$(t,e,r){switch(r.parentFlushed=!0,r.status){case 0:var n=r.id=t.nextSegmentId++;return r.lastPushedText=!1,r.textEmbedded=!1,t=t.responseState,e.push('<template id="'),e.push(t.placeholderPrefix),t=n.toString(16),e.push(t),e.push('"></template>');case 1:r.status=2;var i=!0;n=r.chunks;var o=0;r=r.children;for(var a=0;a<r.length;a++){for(i=r[a];o<i.index;o++)e.push(n[o]);i=h$(t,e,i)}for(;o<n.length-1;o++)e.push(n[o]);return o<n.length&&(i=e.push(n[o])),i;default:throw Error(Ki(390))}}function h$(t,e,r){var n=r.boundary;if(n===null)return d$(t,e,r);if(n.parentFlushed=!0,n.forceClientRender)return t.responseState.generateStaticMarkup||(n=n.errorDigest,e.push("<!--$!-->"),e.push("<template"),n&&(e.push(' data-dgst="'),n=yf(n),e.push(n),e.push('"')),e.push("></template>")),d$(t,e,r),t=t.responseState.generateStaticMarkup?!0:e.push("<!--/$-->"),t;if(0<n.pendingTasks){n.rootSegmentID=t.nextSegmentId++,0<n.completedSegments.length&&t.partialBoundaries.push(n);var i=t.responseState,o=i.nextSuspenseID++;return i=i.boundaryPrefix+o.toString(16),n=n.id=i,Zhe(e,t.responseState,n),d$(t,e,r),e.push("<!--/$-->")}if(n.byteSize>t.progressiveChunkSize)return n.rootSegmentID=t.nextSegmentId++,t.completedBoundaries.push(n),Zhe(e,t.responseState,n.id),d$(t,e,r),e.push("<!--/$-->");if(t.responseState.generateStaticMarkup||e.push("<!--$-->"),r=n.completedSegments,r.length!==1)throw Error(Ki(391));return h$(t,e,r[0]),t=t.responseState.generateStaticMarkup?!0:e.push("<!--/$-->"),t}function Ape(t,e,r){return h1t(e,t.responseState,r.formatContext,r.id),h$(t,e,r),p1t(e,r.formatContext)}function Rpe(t,e,r){for(var n=r.completedSegments,i=0;i<n.length;i++)kpe(t,e,r,n[i]);if(n.length=0,t=t.responseState,n=r.id,r=r.rootSegmentID,e.push(t.startInlineScript),t.sentCompleteBoundaryFunction?e.push('$RC("'):(t.sentCompleteBoundaryFunction=!0,e.push('function $RC(a,b){a=document.getElementById(a);b=document.getElementById(b);b.parentNode.removeChild(b);if(a){a=a.previousSibling;var f=a.parentNode,c=a.nextSibling,e=0;do{if(c&&8===c.nodeType){var d=c.data;if("/$"===d)if(0===e)break;else e--;else"$"!==d&&"$?"!==d&&"$!"!==d||e++}d=c.nextSibling;f.removeChild(c);c=d}while(c);for(;b.firstChild;)f.insertBefore(b.firstChild,c);a.data="$";a._reactRetry&&a._reactRetry()}};$RC("')),n===null)throw Error(Ki(395));return r=r.toString(16),e.push(n),e.push('","'),e.push(t.segmentPrefix),e.push(r),e.push('")<\/script>')}function kpe(t,e,r,n){if(n.status===2)return!0;var i=n.id;if(i===-1){if((n.id=r.rootSegmentID)===-1)throw Error(Ki(392));return Ape(t,e,n)}return Ape(t,e,n),t=t.responseState,e.push(t.startInlineScript),t.sentCompleteSegmentFunction?e.push('$RS("'):(t.sentCompleteSegmentFunction=!0,e.push('function $RS(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};$RS("')),e.push(t.segmentPrefix),i=i.toString(16),e.push(i),e.push('","'),e.push(t.placeholderPrefix),e.push(i),e.push('")<\/script>')}function ZH(t,e){try{var r=t.completedRootSegment;if(r!==null&&t.pendingRootTasks===0){h$(t,e,r),t.completedRootSegment=null;var n=t.responseState.bootstrapChunks;for(r=0;r<n.length-1;r++)e.push(n[r]);r<n.length&&e.push(n[r])}var i=t.clientRenderedBoundaries,o;for(o=0;o<i.length;o++){var a=i[o];n=e;var s=t.responseState,l=a.id,u=a.errorDigest,p=a.errorMessage,m=a.errorComponentStack;if(n.push(s.startInlineScript),s.sentClientRenderFunction?n.push('$RX("'):(s.sentClientRenderFunction=!0,n.push('function $RX(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),b._reactRetry&&b._reactRetry())};$RX("')),l===null)throw Error(Ki(395));if(n.push(l),n.push('"'),u||p||m){n.push(",");var v=BH(u||"");n.push(v)}if(p||m){n.push(",");var x=BH(p||"");n.push(x)}if(m){n.push(",");var y=BH(m);n.push(y)}if(!n.push(")<\/script>")){t.destination=null,o++,i.splice(0,o);return}}i.splice(0,o);var _=t.completedBoundaries;for(o=0;o<_.length;o++)if(!Rpe(t,e,_[o])){t.destination=null,o++,_.splice(0,o);return}_.splice(0,o);var w=t.partialBoundaries;for(o=0;o<w.length;o++){var C=w[o];e:{i=t,a=e;var E=C.completedSegments;for(s=0;s<E.length;s++)if(!kpe(i,a,C,E[s])){s++,E.splice(0,s);var T=!1;break e}E.splice(0,s),T=!0}if(!T){t.destination=null,o++,w.splice(0,o);return}}w.splice(0,o);var A=t.completedBoundaries;for(o=0;o<A.length;o++)if(!Rpe(t,e,A[o])){t.destination=null,o++,A.splice(0,o);return}A.splice(0,o)}finally{t.allPendingTasks===0&&t.pingedTasks.length===0&&t.clientRenderedBoundaries.length===0&&t.completedBoundaries.length===0&&e.push(null)}}function O1t(t,e){try{var r=t.abortableTasks;r.forEach(function(n){return Ppe(n,t,e)}),r.clear(),t.destination!==null&&ZH(t,t.destination)}catch(n){CA(t,n),u$(t,n)}}function L1t(){}function Ope(t,e,r,n){var i=!1,o=null,a="",s={push:function(u){return u!==null&&(a+=u),!0},destroy:function(u){i=!0,o=u}},l=!1;if(t=R1t(t,g1t(r,e?e.identifierPrefix:void 0),{insertionMode:1,selectedValue:null},1/0,L1t,void 0,function(){l=!0},void 0,void 0),Mpe(t),O1t(t,n),t.status===1)t.status=2,s.destroy(t.fatalError);else if(t.status!==2&&t.destination===null){t.destination=s;try{ZH(t,s)}catch(u){CA(t,u),u$(t,u)}}if(i)throw o;if(!l)throw Error(Ki(426));return a}tS.renderToNodeStream=function(){throw Error(Ki(207))};tS.renderToStaticMarkup=function(t,e){return Ope(t,e,!0,'The server used "renderToStaticMarkup" which does not support Suspense. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server')};tS.renderToStaticNodeStream=function(){throw Error(Ki(208))};tS.renderToString=function(t,e){return Ope(t,e,!1,'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server')};tS.version="18.2.0";var QH={};/** * @license React * react-dom-server.browser.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Lpe=Y.exports;function fo(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,r=1;r<arguments.length;r++)e+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var xh=null,_h=0;function ii(t,e){if(e.length!==0)if(512<e.length)0<_h&&(t.enqueue(new Uint8Array(xh.buffer,0,_h)),xh=new Uint8Array(512),_h=0),t.enqueue(e);else{var r=xh.length-_h;r<e.length&&(r===0?t.enqueue(xh):(xh.set(e.subarray(0,r),_h),t.enqueue(xh),e=e.subarray(r)),xh=new Uint8Array(512),_h=0),xh.set(e,_h),_h+=e.length}}function _a(t,e){return ii(t,e),!0}function Dpe(t){xh&&0<_h&&(t.enqueue(new Uint8Array(xh.buffer,0,_h)),xh=null,_h=0)}var Npe=new TextEncoder;function yo(t){return Npe.encode(t)}function kn(t){return Npe.encode(t)}function $pe(t,e){typeof t.error=="function"?t.error(e):t.close()}var md=Object.prototype.hasOwnProperty,D1t=/^[: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]*$/,Fpe={},zpe={};function Bpe(t){return md.call(zpe,t)?!0:md.call(Fpe,t)?!1:D1t.test(t)?zpe[t]=!0:(Fpe[t]=!0,!1)}function xf(t,e,r,n,i,o,a){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=n,this.attributeNamespace=i,this.mustUseProperty=r,this.propertyName=t,this.type=e,this.sanitizeURL=o,this.removeEmptyString=a}var Jc={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){Jc[t]=new xf(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];Jc[e]=new xf(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){Jc[t]=new xf(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){Jc[t]=new xf(t,2,!1,t,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(t){Jc[t]=new xf(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){Jc[t]=new xf(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){Jc[t]=new xf(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){Jc[t]=new xf(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){Jc[t]=new xf(t,5,!1,t.toLowerCase(),null,!1,!1)});var JH=/[\-:]([a-z])/g;function eW(t){return t[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(t){var e=t.replace(JH,eW);Jc[e]=new xf(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(JH,eW);Jc[e]=new xf(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(JH,eW);Jc[e]=new xf(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){Jc[t]=new xf(t,1,!1,t.toLowerCase(),null,!1,!1)});Jc.xlinkHref=new xf("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){Jc[t]=new xf(t,1,!1,t.toLowerCase(),null,!0,!0)});var p$={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},N1t=["Webkit","ms","Moz","O"];Object.keys(p$).forEach(function(t){N1t.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),p$[e]=p$[t]})});var $1t=/["'&<>]/;function eu(t){if(typeof t=="boolean"||typeof t=="number")return""+t;t=""+t;var e=$1t.exec(t);if(e){var r="",n,i=0;for(n=e.index;n<t.length;n++){switch(t.charCodeAt(n)){case 34:e=""";break;case 38:e="&";break;case 39:e="'";break;case 60:e="<";break;case 62:e=">";break;default:continue}i!==n&&(r+=t.substring(i,n)),i=n+1,r+=e}t=i!==n?r+t.substring(i,n):r}return t}var F1t=/([A-Z])/g,z1t=/^ms-/,tW=Array.isArray,B1t=kn("<script>"),j1t=kn("<\/script>"),U1t=kn('<script src="'),V1t=kn('<script type="module" src="'),jpe=kn('" async=""><\/script>'),H1t=/(<\/|<)(s)(cript)/gi;function W1t(t,e,r,n){return""+e+(r==="s"?"\\u0073":"\\u0053")+n}function G1t(t,e,r,n,i){t=t===void 0?"":t,e=e===void 0?B1t:kn('<script nonce="'+eu(e)+'">');var o=[];if(r!==void 0&&o.push(e,yo((""+r).replace(H1t,W1t)),j1t),n!==void 0)for(r=0;r<n.length;r++)o.push(U1t,yo(eu(n[r])),jpe);if(i!==void 0)for(n=0;n<i.length;n++)o.push(V1t,yo(eu(i[n])),jpe);return{bootstrapChunks:o,startInlineScript:e,placeholderPrefix:kn(t+"P:"),segmentPrefix:kn(t+"S:"),boundaryPrefix:t+"B:",idPrefix:t,nextSuspenseID:0,sentCompleteSegmentFunction:!1,sentCompleteBoundaryFunction:!1,sentClientRenderFunction:!1}}function xv(t,e){return{insertionMode:t,selectedValue:e}}function q1t(t){return xv(t==="http://www.w3.org/2000/svg"?2:t==="http://www.w3.org/1998/Math/MathML"?3:0,null)}function X1t(t,e,r){switch(e){case"select":return xv(1,r.value!=null?r.value:r.defaultValue);case"svg":return xv(2,null);case"math":return xv(3,null);case"foreignObject":return xv(1,null);case"table":return xv(4,null);case"thead":case"tbody":case"tfoot":return xv(5,null);case"colgroup":return xv(7,null);case"tr":return xv(6,null)}return 4<=t.insertionMode||t.insertionMode===0?xv(1,null):t}var rW=kn("<!-- -->");function Upe(t,e,r,n){return e===""?n:(n&&t.push(rW),t.push(yo(eu(e))),!0)}var Vpe=new Map,Y1t=kn(' style="'),Hpe=kn(":"),K1t=kn(";");function Wpe(t,e,r){if(typeof r!="object")throw Error(fo(62));e=!0;for(var n in r)if(md.call(r,n)){var i=r[n];if(i!=null&&typeof i!="boolean"&&i!==""){if(n.indexOf("--")===0){var o=yo(eu(n));i=yo(eu((""+i).trim()))}else{o=n;var a=Vpe.get(o);a!==void 0||(a=kn(eu(o.replace(F1t,"-$1").toLowerCase().replace(z1t,"-ms-"))),Vpe.set(o,a)),o=a,i=typeof i=="number"?i===0||md.call(p$,n)?yo(""+i):yo(i+"px"):yo(eu((""+i).trim()))}e?(e=!1,t.push(Y1t,o,Hpe,i)):t.push(K1t,o,Hpe,i)}}e||t.push(qb)}var v_=kn(" "),rS=kn('="'),qb=kn('"'),Gpe=kn('=""');function bh(t,e,r,n){switch(r){case"style":Wpe(t,e,n);return;case"defaultValue":case"defaultChecked":case"innerHTML":case"suppressContentEditableWarning":case"suppressHydrationWarning":return}if(!(2<r.length)||r[0]!=="o"&&r[0]!=="O"||r[1]!=="n"&&r[1]!=="N"){if(e=Jc.hasOwnProperty(r)?Jc[r]:null,e!==null){switch(typeof n){case"function":case"symbol":return;case"boolean":if(!e.acceptsBooleans)return}switch(r=yo(e.attributeName),e.type){case 3:n&&t.push(v_,r,Gpe);break;case 4:n===!0?t.push(v_,r,Gpe):n!==!1&&t.push(v_,r,rS,yo(eu(n)),qb);break;case 5:isNaN(n)||t.push(v_,r,rS,yo(eu(n)),qb);break;case 6:!isNaN(n)&&1<=n&&t.push(v_,r,rS,yo(eu(n)),qb);break;default:e.sanitizeURL&&(n=""+n),t.push(v_,r,rS,yo(eu(n)),qb)}}else if(Bpe(r)){switch(typeof n){case"function":case"symbol":return;case"boolean":if(e=r.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-")return}t.push(v_,yo(r),rS,yo(eu(n)),qb)}}}var y_=kn(">"),qpe=kn("/>");function m$(t,e,r){if(e!=null){if(r!=null)throw Error(fo(60));if(typeof e!="object"||!("__html"in e))throw Error(fo(61));e=e.__html,e!=null&&t.push(yo(""+e))}}function Z1t(t){var e="";return Lpe.Children.forEach(t,function(r){r!=null&&(e+=r)}),e}var nW=kn(' selected=""');function iW(t,e,r,n){t.push(_v(r));var i=r=null,o;for(o in e)if(md.call(e,o)){var a=e[o];if(a!=null)switch(o){case"children":r=a;break;case"dangerouslySetInnerHTML":i=a;break;default:bh(t,n,o,a)}}return t.push(y_),m$(t,i,r),typeof r=="string"?(t.push(yo(eu(r))),null):r}var oW=kn(` `),Q1t=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,Xpe=new Map;function _v(t){var e=Xpe.get(t);if(e===void 0){if(!Q1t.test(t))throw Error(fo(65,t));e=kn("<"+t),Xpe.set(t,e)}return e}var J1t=kn("<!DOCTYPE html>");function ebt(t,e,r,n,i){switch(e){case"select":t.push(_v("select"));var o=null,a=null;for(p in r)if(md.call(r,p)){var s=r[p];if(s!=null)switch(p){case"children":o=s;break;case"dangerouslySetInnerHTML":a=s;break;case"defaultValue":case"value":break;default:bh(t,n,p,s)}}return t.push(y_),m$(t,a,o),o;case"option":a=i.selectedValue,t.push(_v("option"));var l=s=null,u=null,p=null;for(o in r)if(md.call(r,o)){var m=r[o];if(m!=null)switch(o){case"children":s=m;break;case"selected":u=m;break;case"dangerouslySetInnerHTML":p=m;break;case"value":l=m;default:bh(t,n,o,m)}}if(a!=null)if(r=l!==null?""+l:Z1t(s),tW(a)){for(n=0;n<a.length;n++)if(""+a[n]===r){t.push(nW);break}}else""+a===r&&t.push(nW);else u&&t.push(nW);return t.push(y_),m$(t,p,s),s;case"textarea":t.push(_v("textarea")),p=a=o=null;for(s in r)if(md.call(r,s)&&(l=r[s],l!=null))switch(s){case"children":p=l;break;case"value":o=l;break;case"defaultValue":a=l;break;case"dangerouslySetInnerHTML":throw Error(fo(91));default:bh(t,n,s,l)}if(o===null&&a!==null&&(o=a),t.push(y_),p!=null){if(o!=null)throw Error(fo(92));if(tW(p)&&1<p.length)throw Error(fo(93));o=""+p}return typeof o=="string"&&o[0]===` `&&t.push(oW),o!==null&&t.push(yo(eu(""+o))),null;case"input":t.push(_v("input")),l=p=s=o=null;for(a in r)if(md.call(r,a)&&(u=r[a],u!=null))switch(a){case"children":case"dangerouslySetInnerHTML":throw Error(fo(399,"input"));case"defaultChecked":l=u;break;case"defaultValue":s=u;break;case"checked":p=u;break;case"value":o=u;break;default:bh(t,n,a,u)}return p!==null?bh(t,n,"checked",p):l!==null&&bh(t,n,"checked",l),o!==null?bh(t,n,"value",o):s!==null&&bh(t,n,"value",s),t.push(qpe),null;case"menuitem":t.push(_v("menuitem"));for(var v in r)if(md.call(r,v)&&(o=r[v],o!=null))switch(v){case"children":case"dangerouslySetInnerHTML":throw Error(fo(400));default:bh(t,n,v,o)}return t.push(y_),null;case"title":t.push(_v("title")),o=null;for(m in r)if(md.call(r,m)&&(a=r[m],a!=null))switch(m){case"children":o=a;break;case"dangerouslySetInnerHTML":throw Error(fo(434));default:bh(t,n,m,a)}return t.push(y_),o;case"listing":case"pre":t.push(_v(e)),a=o=null;for(l in r)if(md.call(r,l)&&(s=r[l],s!=null))switch(l){case"children":o=s;break;case"dangerouslySetInnerHTML":a=s;break;default:bh(t,n,l,s)}if(t.push(y_),a!=null){if(o!=null)throw Error(fo(60));if(typeof a!="object"||!("__html"in a))throw Error(fo(61));r=a.__html,r!=null&&(typeof r=="string"&&0<r.length&&r[0]===` `?t.push(oW,yo(r)):t.push(yo(""+r)))}return typeof o=="string"&&o[0]===` `&&t.push(oW),o;case"area":case"base":case"br":case"col":case"embed":case"hr":case"img":case"keygen":case"link":case"meta":case"param":case"source":case"track":case"wbr":t.push(_v(e));for(var x in r)if(md.call(r,x)&&(o=r[x],o!=null))switch(x){case"children":case"dangerouslySetInnerHTML":throw Error(fo(399,e));default:bh(t,n,x,o)}return t.push(qpe),null;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 iW(t,r,e,n);case"html":return i.insertionMode===0&&t.push(J1t),iW(t,r,e,n);default:if(e.indexOf("-")===-1&&typeof r.is!="string")return iW(t,r,e,n);t.push(_v(e)),a=o=null;for(u in r)if(md.call(r,u)&&(s=r[u],s!=null))switch(u){case"children":o=s;break;case"dangerouslySetInnerHTML":a=s;break;case"style":Wpe(t,n,s);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":break;default:Bpe(u)&&typeof s!="function"&&typeof s!="symbol"&&t.push(v_,yo(u),rS,yo(eu(s)),qb)}return t.push(y_),m$(t,a,o),o}}var tbt=kn("</"),rbt=kn(">"),nbt=kn('<template id="'),ibt=kn('"></template>'),obt=kn("<!--$-->"),sbt=kn('<!--$?--><template id="'),abt=kn('"></template>'),lbt=kn("<!--$!-->"),cbt=kn("<!--/$-->"),ubt=kn("<template"),fbt=kn('"'),dbt=kn(' data-dgst="');kn(' data-msg="');kn(' data-stck="');var hbt=kn("></template>");function Ype(t,e,r){if(ii(t,sbt),r===null)throw Error(fo(395));return ii(t,r),_a(t,abt)}var pbt=kn('<div hidden id="'),mbt=kn('">'),gbt=kn("</div>"),vbt=kn('<svg aria-hidden="true" style="display:none" id="'),ybt=kn('">'),xbt=kn("</svg>"),_bt=kn('<math aria-hidden="true" style="display:none" id="'),bbt=kn('">'),wbt=kn("</math>"),Cbt=kn('<table hidden id="'),Ebt=kn('">'),Sbt=kn("</table>"),Tbt=kn('<table hidden><tbody id="'),Pbt=kn('">'),Ibt=kn("</tbody></table>"),Mbt=kn('<table hidden><tr id="'),Abt=kn('">'),Rbt=kn("</tr></table>"),kbt=kn('<table hidden><colgroup id="'),Obt=kn('">'),Lbt=kn("</colgroup></table>");function Dbt(t,e,r,n){switch(r.insertionMode){case 0:case 1:return ii(t,pbt),ii(t,e.segmentPrefix),ii(t,yo(n.toString(16))),_a(t,mbt);case 2:return ii(t,vbt),ii(t,e.segmentPrefix),ii(t,yo(n.toString(16))),_a(t,ybt);case 3:return ii(t,_bt),ii(t,e.segmentPrefix),ii(t,yo(n.toString(16))),_a(t,bbt);case 4:return ii(t,Cbt),ii(t,e.segmentPrefix),ii(t,yo(n.toString(16))),_a(t,Ebt);case 5:return ii(t,Tbt),ii(t,e.segmentPrefix),ii(t,yo(n.toString(16))),_a(t,Pbt);case 6:return ii(t,Mbt),ii(t,e.segmentPrefix),ii(t,yo(n.toString(16))),_a(t,Abt);case 7:return ii(t,kbt),ii(t,e.segmentPrefix),ii(t,yo(n.toString(16))),_a(t,Obt);default:throw Error(fo(397))}}function Nbt(t,e){switch(e.insertionMode){case 0:case 1:return _a(t,gbt);case 2:return _a(t,xbt);case 3:return _a(t,wbt);case 4:return _a(t,Sbt);case 5:return _a(t,Ibt);case 6:return _a(t,Rbt);case 7:return _a(t,Lbt);default:throw Error(fo(397))}}var $bt=kn('function $RS(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};$RS("'),Fbt=kn('$RS("'),zbt=kn('","'),Bbt=kn('")<\/script>'),jbt=kn('function $RC(a,b){a=document.getElementById(a);b=document.getElementById(b);b.parentNode.removeChild(b);if(a){a=a.previousSibling;var f=a.parentNode,c=a.nextSibling,e=0;do{if(c&&8===c.nodeType){var d=c.data;if("/$"===d)if(0===e)break;else e--;else"$"!==d&&"$?"!==d&&"$!"!==d||e++}d=c.nextSibling;f.removeChild(c);c=d}while(c);for(;b.firstChild;)f.insertBefore(b.firstChild,c);a.data="$";a._reactRetry&&a._reactRetry()}};$RC("'),Ubt=kn('$RC("'),Vbt=kn('","'),Hbt=kn('")<\/script>'),Wbt=kn('function $RX(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),b._reactRetry&&b._reactRetry())};$RX("'),Gbt=kn('$RX("'),qbt=kn('"'),Xbt=kn(")<\/script>"),sW=kn(","),Ybt=/[<\u2028\u2029]/g;function aW(t){return JSON.stringify(t).replace(Ybt,function(e){switch(e){case"<":return"\\u003c";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw Error("escapeJSStringsForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React")}})}var EA=Object.assign,Kbt=Symbol.for("react.element"),Kpe=Symbol.for("react.portal"),Zpe=Symbol.for("react.fragment"),Qpe=Symbol.for("react.strict_mode"),Jpe=Symbol.for("react.profiler"),eme=Symbol.for("react.provider"),tme=Symbol.for("react.context"),rme=Symbol.for("react.forward_ref"),nme=Symbol.for("react.suspense"),ime=Symbol.for("react.suspense_list"),ome=Symbol.for("react.memo"),lW=Symbol.for("react.lazy"),Zbt=Symbol.for("react.scope"),Qbt=Symbol.for("react.debug_trace_mode"),Jbt=Symbol.for("react.legacy_hidden"),ewt=Symbol.for("react.default_value"),sme=Symbol.iterator;function cW(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case Zpe:return"Fragment";case Kpe:return"Portal";case Jpe:return"Profiler";case Qpe:return"StrictMode";case nme:return"Suspense";case ime:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case tme:return(t.displayName||"Context")+".Consumer";case eme:return(t._context.displayName||"Context")+".Provider";case rme:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case ome:return e=t.displayName||null,e!==null?e:cW(t.type)||"Memo";case lW:e=t._payload,t=t._init;try{return cW(t(e))}catch{}}return null}var ame={};function lme(t,e){if(t=t.contextTypes,!t)return ame;var r={},n;for(n in t)r[n]=e[n];return r}var Xb=null;function g$(t,e){if(t!==e){t.context._currentValue=t.parentValue,t=t.parent;var r=e.parent;if(t===null){if(r!==null)throw Error(fo(401))}else{if(r===null)throw Error(fo(401));g$(t,r)}e.context._currentValue=e.value}}function cme(t){t.context._currentValue=t.parentValue,t=t.parent,t!==null&&cme(t)}function ume(t){var e=t.parent;e!==null&&ume(e),t.context._currentValue=t.value}function fme(t,e){if(t.context._currentValue=t.parentValue,t=t.parent,t===null)throw Error(fo(402));t.depth===e.depth?g$(t,e):fme(t,e)}function dme(t,e){var r=e.parent;if(r===null)throw Error(fo(402));t.depth===r.depth?g$(t,r):dme(t,r),e.context._currentValue=e.value}function v$(t){var e=Xb;e!==t&&(e===null?ume(t):t===null?cme(e):e.depth===t.depth?g$(e,t):e.depth>t.depth?fme(e,t):dme(e,t),Xb=t)}var hme={isMounted:function(){return!1},enqueueSetState:function(t,e){t=t._reactInternals,t.queue!==null&&t.queue.push(e)},enqueueReplaceState:function(t,e){t=t._reactInternals,t.replace=!0,t.queue=[e]},enqueueForceUpdate:function(){}};function pme(t,e,r,n){var i=t.state!==void 0?t.state:null;t.updater=hme,t.props=r,t.state=i;var o={queue:[],replace:!1};t._reactInternals=o;var a=e.contextType;if(t.context=typeof a=="object"&&a!==null?a._currentValue:n,a=e.getDerivedStateFromProps,typeof a=="function"&&(a=a(r,i),i=a==null?i:EA({},i,a),t.state=i),typeof e.getDerivedStateFromProps!="function"&&typeof t.getSnapshotBeforeUpdate!="function"&&(typeof t.UNSAFE_componentWillMount=="function"||typeof t.componentWillMount=="function"))if(e=t.state,typeof t.componentWillMount=="function"&&t.componentWillMount(),typeof t.UNSAFE_componentWillMount=="function"&&t.UNSAFE_componentWillMount(),e!==t.state&&hme.enqueueReplaceState(t,t.state,null),o.queue!==null&&0<o.queue.length)if(e=o.queue,a=o.replace,o.queue=null,o.replace=!1,a&&e.length===1)t.state=e[0];else{for(o=a?e[0]:t.state,i=!0,a=a?1:0;a<e.length;a++){var s=e[a];s=typeof s=="function"?s.call(t,o,r,n):s,s!=null&&(i?(i=!1,o=EA({},o,s)):EA(o,s))}t.state=o}else o.queue=null}var twt={id:1,overflow:""};function uW(t,e,r){var n=t.id;t=t.overflow;var i=32-y$(n)-1;n&=~(1<<i),r+=1;var o=32-y$(e)+i;if(30<o){var a=i-i%5;return o=(n&(1<<a)-1).toString(32),n>>=a,i-=a,{id:1<<32-y$(e)+i|r<<i|n,overflow:o+t}}return{id:1<<o|r<<i|n,overflow:t}}var y$=Math.clz32?Math.clz32:iwt,rwt=Math.log,nwt=Math.LN2;function iwt(t){return t>>>=0,t===0?32:31-(rwt(t)/nwt|0)|0}function owt(t,e){return t===e&&(t!==0||1/t==1/e)||t!==t&&e!==e}var swt=typeof Object.is=="function"?Object.is:owt,Yy=null,fW=null,x$=null,oa=null,SA=!1,_$=!1,TA=0,x_=null,b$=0;function Yb(){if(Yy===null)throw Error(fo(321));return Yy}function mme(){if(0<b$)throw Error(fo(312));return{memoizedState:null,queue:null,next:null}}function dW(){return oa===null?x$===null?(SA=!1,x$=oa=mme()):(SA=!0,oa=x$):oa.next===null?(SA=!1,oa=oa.next=mme()):(SA=!0,oa=oa.next),oa}function hW(){fW=Yy=null,_$=!1,x$=null,b$=0,oa=x_=null}function gme(t,e){return typeof e=="function"?e(t):e}function vme(t,e,r){if(Yy=Yb(),oa=dW(),SA){var n=oa.queue;if(e=n.dispatch,x_!==null&&(r=x_.get(n),r!==void 0)){x_.delete(n),n=oa.memoizedState;do n=t(n,r.action),r=r.next;while(r!==null);return oa.memoizedState=n,[n,e]}return[oa.memoizedState,e]}return t=t===gme?typeof e=="function"?e():e:r!==void 0?r(e):e,oa.memoizedState=t,t=oa.queue={last:null,dispatch:null},t=t.dispatch=awt.bind(null,Yy,t),[oa.memoizedState,t]}function yme(t,e){if(Yy=Yb(),oa=dW(),e=e===void 0?null:e,oa!==null){var r=oa.memoizedState;if(r!==null&&e!==null){var n=r[1];e:if(n===null)n=!1;else{for(var i=0;i<n.length&&i<e.length;i++)if(!swt(e[i],n[i])){n=!1;break e}n=!0}if(n)return r[0]}}return t=t(),oa.memoizedState=[t,e],t}function awt(t,e,r){if(25<=b$)throw Error(fo(301));if(t===Yy)if(_$=!0,t={action:r,next:null},x_===null&&(x_=new Map),r=x_.get(e),r===void 0)x_.set(e,t);else{for(e=r;e.next!==null;)e=e.next;e.next=t}}function lwt(){throw Error(fo(394))}function w$(){}var xme={readContext:function(t){return t._currentValue},useContext:function(t){return Yb(),t._currentValue},useMemo:yme,useReducer:vme,useRef:function(t){Yy=Yb(),oa=dW();var e=oa.memoizedState;return e===null?(t={current:t},oa.memoizedState=t):e},useState:function(t){return vme(gme,t)},useInsertionEffect:w$,useLayoutEffect:function(){},useCallback:function(t,e){return yme(function(){return t},e)},useImperativeHandle:w$,useEffect:w$,useDebugValue:w$,useDeferredValue:function(t){return Yb(),t},useTransition:function(){return Yb(),[!1,lwt]},useId:function(){var t=fW.treeContext,e=t.overflow;t=t.id,t=(t&~(1<<32-y$(t)-1)).toString(32)+e;var r=C$;if(r===null)throw Error(fo(404));return e=TA++,t=":"+r.idPrefix+"R"+t,0<e&&(t+="H"+e.toString(32)),t+":"},useMutableSource:function(t,e){return Yb(),e(t._source)},useSyncExternalStore:function(t,e,r){if(r===void 0)throw Error(fo(407));return r()}},C$=null,pW=Lpe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentDispatcher;function cwt(t){return console.error(t),null}function PA(){}function uwt(t,e,r,n,i,o,a,s,l){var u=[],p=new Set;return e={destination:null,responseState:e,progressiveChunkSize:n===void 0?12800:n,status:0,fatalError:null,nextSegmentId:0,allPendingTasks:0,pendingRootTasks:0,completedRootSegment:null,abortableTasks:p,pingedTasks:u,clientRenderedBoundaries:[],completedBoundaries:[],partialBoundaries:[],onError:i===void 0?cwt:i,onAllReady:o===void 0?PA:o,onShellReady:a===void 0?PA:a,onShellError:s===void 0?PA:s,onFatalError:l===void 0?PA:l},r=E$(e,0,null,r,!1,!1),r.parentFlushed=!0,t=mW(e,t,null,r,p,ame,null,twt),u.push(t),e}function mW(t,e,r,n,i,o,a,s){t.allPendingTasks++,r===null?t.pendingRootTasks++:r.pendingTasks++;var l={node:e,ping:function(){var u=t.pingedTasks;u.push(l),u.length===1&&Tme(t)},blockedBoundary:r,blockedSegment:n,abortSet:i,legacyContext:o,context:a,treeContext:s};return i.add(l),l}function E$(t,e,r,n,i,o){return{status:0,id:-1,index:e,parentFlushed:!1,chunks:[],children:[],formatContext:n,boundary:r,lastPushedText:i,textEmbedded:o}}function IA(t,e){if(t=t.onError(e),t!=null&&typeof t!="string")throw Error('onError returned something with a type other than "string". onError should return a string and may return null or undefined but must not return anything else. It received something of type "'+typeof t+'" instead');return t}function S$(t,e){var r=t.onShellError;r(e),r=t.onFatalError,r(e),t.destination!==null?(t.status=2,$pe(t.destination,e)):(t.status=1,t.fatalError=e)}function _me(t,e,r,n,i){for(Yy={},fW=e,TA=0,t=r(n,i);_$;)_$=!1,TA=0,b$+=1,oa=null,t=r(n,i);return hW(),t}function bme(t,e,r,n){var i=r.render(),o=n.childContextTypes;if(o!=null){var a=e.legacyContext;if(typeof r.getChildContext!="function")n=a;else{r=r.getChildContext();for(var s in r)if(!(s in o))throw Error(fo(108,cW(n)||"Unknown",s));n=EA({},a,r)}e.legacyContext=n,wh(t,e,i),e.legacyContext=a}else wh(t,e,i)}function wme(t,e){if(t&&t.defaultProps){e=EA({},e),t=t.defaultProps;for(var r in t)e[r]===void 0&&(e[r]=t[r]);return e}return e}function gW(t,e,r,n,i){if(typeof r=="function")if(r.prototype&&r.prototype.isReactComponent){i=lme(r,e.legacyContext);var o=r.contextType;o=new r(n,typeof o=="object"&&o!==null?o._currentValue:i),pme(o,r,n,i),bme(t,e,o,r)}else{o=lme(r,e.legacyContext),i=_me(t,e,r,n,o);var a=TA!==0;if(typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0)pme(i,r,n,o),bme(t,e,i,r);else if(a){n=e.treeContext,e.treeContext=uW(n,1,0);try{wh(t,e,i)}finally{e.treeContext=n}}else wh(t,e,i)}else if(typeof r=="string"){switch(i=e.blockedSegment,o=ebt(i.chunks,r,n,t.responseState,i.formatContext),i.lastPushedText=!1,a=i.formatContext,i.formatContext=X1t(a,r,n),vW(t,e,o),i.formatContext=a,r){case"area":case"base":case"br":case"col":case"embed":case"hr":case"img":case"input":case"keygen":case"link":case"meta":case"param":case"source":case"track":case"wbr":break;default:i.chunks.push(tbt,yo(r),rbt)}i.lastPushedText=!1}else{switch(r){case Jbt:case Qbt:case Qpe:case Jpe:case Zpe:wh(t,e,n.children);return;case ime:wh(t,e,n.children);return;case Zbt:throw Error(fo(343));case nme:e:{r=e.blockedBoundary,i=e.blockedSegment,o=n.fallback,n=n.children,a=new Set;var s={id:null,rootSegmentID:-1,parentFlushed:!1,pendingTasks:0,forceClientRender:!1,completedSegments:[],byteSize:0,fallbackAbortableTasks:a,errorDigest:null},l=E$(t,i.chunks.length,s,i.formatContext,!1,!1);i.children.push(l),i.lastPushedText=!1;var u=E$(t,0,null,i.formatContext,!1,!1);u.parentFlushed=!0,e.blockedBoundary=s,e.blockedSegment=u;try{if(vW(t,e,n),u.lastPushedText&&u.textEmbedded&&u.chunks.push(rW),u.status=1,T$(s,u),s.pendingTasks===0)break e}catch(p){u.status=4,s.forceClientRender=!0,s.errorDigest=IA(t,p)}finally{e.blockedBoundary=r,e.blockedSegment=i}e=mW(t,o,r,l,a,e.legacyContext,e.context,e.treeContext),t.pingedTasks.push(e)}return}if(typeof r=="object"&&r!==null)switch(r.$$typeof){case rme:if(n=_me(t,e,r.render,n,i),TA!==0){r=e.treeContext,e.treeContext=uW(r,1,0);try{wh(t,e,n)}finally{e.treeContext=r}}else wh(t,e,n);return;case ome:r=r.type,n=wme(r,n),gW(t,e,r,n,i);return;case eme:if(i=n.children,r=r._context,n=n.value,o=r._currentValue,r._currentValue=n,a=Xb,Xb=n={parent:a,depth:a===null?0:a.depth+1,context:r,parentValue:o,value:n},e.context=n,wh(t,e,i),t=Xb,t===null)throw Error(fo(403));n=t.parentValue,t.context._currentValue=n===ewt?t.context._defaultValue:n,t=Xb=t.parent,e.context=t;return;case tme:n=n.children,n=n(r._currentValue),wh(t,e,n);return;case lW:i=r._init,r=i(r._payload),n=wme(r,n),gW(t,e,r,n,void 0);return}throw Error(fo(130,r==null?r:typeof r,""))}}function wh(t,e,r){if(e.node=r,typeof r=="object"&&r!==null){switch(r.$$typeof){case Kbt:gW(t,e,r.type,r.props,r.ref);return;case Kpe:throw Error(fo(257));case lW:var n=r._init;r=n(r._payload),wh(t,e,r);return}if(tW(r)){Cme(t,e,r);return}if(r===null||typeof r!="object"?n=null:(n=sme&&r[sme]||r["@@iterator"],n=typeof n=="function"?n:null),n&&(n=n.call(r))){if(r=n.next(),!r.done){var i=[];do i.push(r.value),r=n.next();while(!r.done);Cme(t,e,i)}return}throw t=Object.prototype.toString.call(r),Error(fo(31,t==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":t))}typeof r=="string"?(n=e.blockedSegment,n.lastPushedText=Upe(e.blockedSegment.chunks,r,t.responseState,n.lastPushedText)):typeof r=="number"&&(n=e.blockedSegment,n.lastPushedText=Upe(e.blockedSegment.chunks,""+r,t.responseState,n.lastPushedText))}function Cme(t,e,r){for(var n=r.length,i=0;i<n;i++){var o=e.treeContext;e.treeContext=uW(o,n,i);try{vW(t,e,r[i])}finally{e.treeContext=o}}}function vW(t,e,r){var n=e.blockedSegment.formatContext,i=e.legacyContext,o=e.context;try{return wh(t,e,r)}catch(l){if(hW(),typeof l=="object"&&l!==null&&typeof l.then=="function"){r=l;var a=e.blockedSegment,s=E$(t,a.chunks.length,null,a.formatContext,a.lastPushedText,!0);a.children.push(s),a.lastPushedText=!1,t=mW(t,e.node,e.blockedBoundary,s,e.abortSet,e.legacyContext,e.context,e.treeContext).ping,r.then(t,t),e.blockedSegment.formatContext=n,e.legacyContext=i,e.context=o,v$(o)}else throw e.blockedSegment.formatContext=n,e.legacyContext=i,e.context=o,v$(o),l}}function fwt(t){var e=t.blockedBoundary;t=t.blockedSegment,t.status=3,Sme(this,e,t)}function Eme(t,e,r){var n=t.blockedBoundary;t.blockedSegment.status=3,n===null?(e.allPendingTasks--,e.status!==2&&(e.status=2,e.destination!==null&&e.destination.close())):(n.pendingTasks--,n.forceClientRender||(n.forceClientRender=!0,t=r===void 0?Error(fo(432)):r,n.errorDigest=e.onError(t),n.parentFlushed&&e.clientRenderedBoundaries.push(n)),n.fallbackAbortableTasks.forEach(function(i){return Eme(i,e,r)}),n.fallbackAbortableTasks.clear(),e.allPendingTasks--,e.allPendingTasks===0&&(n=e.onAllReady,n()))}function T$(t,e){if(e.chunks.length===0&&e.children.length===1&&e.children[0].boundary===null){var r=e.children[0];r.id=e.id,r.parentFlushed=!0,r.status===1&&T$(t,r)}else t.completedSegments.push(e)}function Sme(t,e,r){if(e===null){if(r.parentFlushed){if(t.completedRootSegment!==null)throw Error(fo(389));t.completedRootSegment=r}t.pendingRootTasks--,t.pendingRootTasks===0&&(t.onShellError=PA,e=t.onShellReady,e())}else e.pendingTasks--,e.forceClientRender||(e.pendingTasks===0?(r.parentFlushed&&r.status===1&&T$(e,r),e.parentFlushed&&t.completedBoundaries.push(e),e.fallbackAbortableTasks.forEach(fwt,t),e.fallbackAbortableTasks.clear()):r.parentFlushed&&r.status===1&&(T$(e,r),e.completedSegments.length===1&&e.parentFlushed&&t.partialBoundaries.push(e)));t.allPendingTasks--,t.allPendingTasks===0&&(t=t.onAllReady,t())}function Tme(t){if(t.status!==2){var e=Xb,r=pW.current;pW.current=xme;var n=C$;C$=t.responseState;try{var i=t.pingedTasks,o;for(o=0;o<i.length;o++){var a=i[o],s=t,l=a.blockedSegment;if(l.status===0){v$(a.context);try{wh(s,a,a.node),l.lastPushedText&&l.textEmbedded&&l.chunks.push(rW),a.abortSet.delete(a),l.status=1,Sme(s,a.blockedBoundary,l)}catch(y){if(hW(),typeof y=="object"&&y!==null&&typeof y.then=="function"){var u=a.ping;y.then(u,u)}else{a.abortSet.delete(a),l.status=4;var p=a.blockedBoundary,m=y,v=IA(s,m);if(p===null?S$(s,m):(p.pendingTasks--,p.forceClientRender||(p.forceClientRender=!0,p.errorDigest=v,p.parentFlushed&&s.clientRenderedBoundaries.push(p))),s.allPendingTasks--,s.allPendingTasks===0){var x=s.onAllReady;x()}}}finally{}}}i.splice(0,o),t.destination!==null&&yW(t,t.destination)}catch(y){IA(t,y),S$(t,y)}finally{C$=n,pW.current=r,r===xme&&v$(e)}}}function P$(t,e,r){switch(r.parentFlushed=!0,r.status){case 0:var n=r.id=t.nextSegmentId++;return r.lastPushedText=!1,r.textEmbedded=!1,t=t.responseState,ii(e,nbt),ii(e,t.placeholderPrefix),t=yo(n.toString(16)),ii(e,t),_a(e,ibt);case 1:r.status=2;var i=!0;n=r.chunks;var o=0;r=r.children;for(var a=0;a<r.length;a++){for(i=r[a];o<i.index;o++)ii(e,n[o]);i=I$(t,e,i)}for(;o<n.length-1;o++)ii(e,n[o]);return o<n.length&&(i=_a(e,n[o])),i;default:throw Error(fo(390))}}function I$(t,e,r){var n=r.boundary;if(n===null)return P$(t,e,r);if(n.parentFlushed=!0,n.forceClientRender)n=n.errorDigest,_a(e,lbt),ii(e,ubt),n&&(ii(e,dbt),ii(e,yo(eu(n))),ii(e,fbt)),_a(e,hbt),P$(t,e,r);else if(0<n.pendingTasks){n.rootSegmentID=t.nextSegmentId++,0<n.completedSegments.length&&t.partialBoundaries.push(n);var i=t.responseState,o=i.nextSuspenseID++;i=kn(i.boundaryPrefix+o.toString(16)),n=n.id=i,Ype(e,t.responseState,n),P$(t,e,r)}else if(n.byteSize>t.progressiveChunkSize)n.rootSegmentID=t.nextSegmentId++,t.completedBoundaries.push(n),Ype(e,t.responseState,n.id),P$(t,e,r);else{if(_a(e,obt),r=n.completedSegments,r.length!==1)throw Error(fo(391));I$(t,e,r[0])}return _a(e,cbt)}function Pme(t,e,r){return Dbt(e,t.responseState,r.formatContext,r.id),I$(t,e,r),Nbt(e,r.formatContext)}function Ime(t,e,r){for(var n=r.completedSegments,i=0;i<n.length;i++)Mme(t,e,r,n[i]);if(n.length=0,t=t.responseState,n=r.id,r=r.rootSegmentID,ii(e,t.startInlineScript),t.sentCompleteBoundaryFunction?ii(e,Ubt):(t.sentCompleteBoundaryFunction=!0,ii(e,jbt)),n===null)throw Error(fo(395));return r=yo(r.toString(16)),ii(e,n),ii(e,Vbt),ii(e,t.segmentPrefix),ii(e,r),_a(e,Hbt)}function Mme(t,e,r,n){if(n.status===2)return!0;var i=n.id;if(i===-1){if((n.id=r.rootSegmentID)===-1)throw Error(fo(392));return Pme(t,e,n)}return Pme(t,e,n),t=t.responseState,ii(e,t.startInlineScript),t.sentCompleteSegmentFunction?ii(e,Fbt):(t.sentCompleteSegmentFunction=!0,ii(e,$bt)),ii(e,t.segmentPrefix),i=yo(i.toString(16)),ii(e,i),ii(e,zbt),ii(e,t.placeholderPrefix),ii(e,i),_a(e,Bbt)}function yW(t,e){xh=new Uint8Array(512),_h=0;try{var r=t.completedRootSegment;if(r!==null&&t.pendingRootTasks===0){I$(t,e,r),t.completedRootSegment=null;var n=t.responseState.bootstrapChunks;for(r=0;r<n.length-1;r++)ii(e,n[r]);r<n.length&&_a(e,n[r])}var i=t.clientRenderedBoundaries,o;for(o=0;o<i.length;o++){var a=i[o];n=e;var s=t.responseState,l=a.id,u=a.errorDigest,p=a.errorMessage,m=a.errorComponentStack;if(ii(n,s.startInlineScript),s.sentClientRenderFunction?ii(n,Gbt):(s.sentClientRenderFunction=!0,ii(n,Wbt)),l===null)throw Error(fo(395));ii(n,l),ii(n,qbt),(u||p||m)&&(ii(n,sW),ii(n,yo(aW(u||"")))),(p||m)&&(ii(n,sW),ii(n,yo(aW(p||"")))),m&&(ii(n,sW),ii(n,yo(aW(m)))),!_a(n,Xbt)}i.splice(0,o);var v=t.completedBoundaries;for(o=0;o<v.length;o++)!Ime(t,e,v[o]);v.splice(0,o),Dpe(e),xh=new Uint8Array(512),_h=0;var x=t.partialBoundaries;for(o=0;o<x.length;o++){var y=x[o];e:{i=t,a=e;var _=y.completedSegments;for(s=0;s<_.length;s++)if(!Mme(i,a,y,_[s])){s++,_.splice(0,s);var w=!1;break e}_.splice(0,s),w=!0}if(!w){t.destination=null,o++,x.splice(0,o);return}}x.splice(0,o);var C=t.completedBoundaries;for(o=0;o<C.length;o++)!Ime(t,e,C[o]);C.splice(0,o)}finally{Dpe(e),t.allPendingTasks===0&&t.pingedTasks.length===0&&t.clientRenderedBoundaries.length===0&&t.completedBoundaries.length===0&&e.close()}}function Ame(t,e){try{var r=t.abortableTasks;r.forEach(function(n){return Eme(n,t,e)}),r.clear(),t.destination!==null&&yW(t,t.destination)}catch(n){IA(t,n),S$(t,n)}}QH.renderToReadableStream=function(t,e){return new Promise(function(r,n){var i,o,a=new Promise(function(p,m){o=p,i=m}),s=uwt(t,G1t(e?e.identifierPrefix:void 0,e?e.nonce:void 0,e?e.bootstrapScriptContent:void 0,e?e.bootstrapScripts:void 0,e?e.bootstrapModules:void 0),q1t(e?e.namespaceURI:void 0),e?e.progressiveChunkSize:void 0,e?e.onError:void 0,o,function(){var p=new ReadableStream({type:"bytes",pull:function(m){if(s.status===1)s.status=2,$pe(m,s.fatalError);else if(s.status!==2&&s.destination===null){s.destination=m;try{yW(s,m)}catch(v){IA(s,v),S$(s,v)}}},cancel:function(){Ame(s)}},{highWaterMark:0});p.allReady=a,r(p)},function(p){a.catch(function(){}),n(p)},i);if(e&&e.signal){var l=e.signal,u=function(){Ame(s,l.reason),l.removeEventListener("abort",u)};l.addEventListener("abort",u)}Tme(s)})};QH.version="18.2.0";var nS,Rme;nS=tS,Rme=QH;nS.version;var Jkt=nS.renderToString;nS.renderToStaticMarkup;nS.renderToNodeStream;nS.renderToStaticNodeStream;Rme.renderToReadableStream;function dwt(t){return t&&typeof t=="object"&&"default"in t?t.default:t}var kme=Y.exports,hwt=dwt(kme);function Ome(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function pwt(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}var mwt=!!(typeof window!="undefined"&&window.document&&window.document.createElement);function gwt(t,e,r){if(typeof t!="function")throw new Error("Expected reducePropsToState to be a function.");if(typeof e!="function")throw new Error("Expected handleStateChangeOnClient to be a function.");if(typeof r!="undefined"&&typeof r!="function")throw new Error("Expected mapStateOnServer to either be undefined or a function.");function n(i){return i.displayName||i.name||"Component"}return function(o){if(typeof o!="function")throw new Error("Expected WrappedComponent to be a React component.");var a=[],s;function l(){s=t(a.map(function(p){return p.props})),u.canUseDOM?e(s):r&&(s=r(s))}var u=function(p){pwt(m,p);function m(){return p.apply(this,arguments)||this}m.peek=function(){return s},m.rewind=function(){if(m.canUseDOM)throw new Error("You may only call rewind() on the server. Call peek() to read the current state.");var y=s;return s=void 0,a=[],y};var v=m.prototype;return v.UNSAFE_componentWillMount=function(){a.push(this),l()},v.componentDidUpdate=function(){l()},v.componentWillUnmount=function(){var y=a.indexOf(this);a.splice(y,1),l()},v.render=function(){return hwt.createElement(o,this.props)},m}(kme.PureComponent);return Ome(u,"displayName","SideEffect("+n(o)+")"),Ome(u,"canUseDOM",mwt),u}}var vwt=gwt,ywt=typeof Element!="undefined",xwt=typeof Map=="function",_wt=typeof Set=="function",bwt=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function M$(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;var r,n,i;if(Array.isArray(t)){if(r=t.length,r!=e.length)return!1;for(n=r;n--!=0;)if(!M$(t[n],e[n]))return!1;return!0}var o;if(xwt&&t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(o=t.entries();!(n=o.next()).done;)if(!e.has(n.value[0]))return!1;for(o=t.entries();!(n=o.next()).done;)if(!M$(n.value[1],e.get(n.value[0])))return!1;return!0}if(_wt&&t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(o=t.entries();!(n=o.next()).done;)if(!e.has(n.value[0]))return!1;return!0}if(bwt&&ArrayBuffer.isView(t)&&ArrayBuffer.isView(e)){if(r=t.length,r!=e.length)return!1;for(n=r;n--!=0;)if(t[n]!==e[n])return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===e.toString();if(i=Object.keys(t),r=i.length,r!==Object.keys(e).length)return!1;for(n=r;n--!=0;)if(!Object.prototype.hasOwnProperty.call(e,i[n]))return!1;if(ywt&&t instanceof Element)return!1;for(n=r;n--!=0;)if(!((i[n]==="_owner"||i[n]==="__v"||i[n]==="__o")&&t.$$typeof)&&!M$(t[i[n]],e[i[n]]))return!1;return!0}return t!==t&&e!==e}var wwt=function(e,r){try{return M$(e,r)}catch(n){if((n.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw n}};/* object-assign (c) Sindre Sorhus @license MIT */var Lme=Object.getOwnPropertySymbols,Cwt=Object.prototype.hasOwnProperty,Ewt=Object.prototype.propertyIsEnumerable;function Swt(t){if(t==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}function Twt(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de",Object.getOwnPropertyNames(t)[0]==="5")return!1;for(var e={},r=0;r<10;r++)e["_"+String.fromCharCode(r)]=r;var n=Object.getOwnPropertyNames(e).map(function(o){return e[o]});if(n.join("")!=="0123456789")return!1;var i={};return"abcdefghijklmnopqrst".split("").forEach(function(o){i[o]=o}),Object.keys(Object.assign({},i)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}var Pwt=Twt()?Object.assign:function(t,e){for(var r,n=Swt(t),i,o=1;o<arguments.length;o++){r=Object(arguments[o]);for(var a in r)Cwt.call(r,a)&&(n[a]=r[a]);if(Lme){i=Lme(r);for(var s=0;s<i.length;s++)Ewt.call(r,i[s])&&(n[i[s]]=r[i[s]])}}return n},Kb={BODY:"bodyAttributes",HTML:"htmlAttributes",TITLE:"titleAttributes"},Wi={BASE:"base",BODY:"body",HEAD:"head",HTML:"html",LINK:"link",META:"meta",NOSCRIPT:"noscript",SCRIPT:"script",STYLE:"style",TITLE:"title"};Object.keys(Wi).map(function(t){return Wi[t]});var Fa={CHARSET:"charset",CSS_TEXT:"cssText",HREF:"href",HTTPEQUIV:"http-equiv",INNER_HTML:"innerHTML",ITEM_PROP:"itemprop",NAME:"name",PROPERTY:"property",REL:"rel",SRC:"src",TARGET:"target"},A$={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},MA={DEFAULT_TITLE:"defaultTitle",DEFER:"defer",ENCODE_SPECIAL_CHARACTERS:"encodeSpecialCharacters",ON_CHANGE_CLIENT_STATE:"onChangeClientState",TITLE_TEMPLATE:"titleTemplate"},Iwt=Object.keys(A$).reduce(function(t,e){return t[A$[e]]=e,t},{}),Mwt=[Wi.NOSCRIPT,Wi.SCRIPT,Wi.STYLE],Qm="data-react-helmet",Awt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Rwt=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},kwt=function(){function t(e,r){for(var n=0;n<r.length;n++){var i=r[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),gd=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Owt=function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)},Dme=function(t,e){var r={};for(var n in t)e.indexOf(n)>=0||!Object.prototype.hasOwnProperty.call(t,n)||(r[n]=t[n]);return r},Lwt=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t},xW=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return r===!1?String(e):String(e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")},Dwt=function(e){var r=iS(e,Wi.TITLE),n=iS(e,MA.TITLE_TEMPLATE);if(n&&r)return n.replace(/%s/g,function(){return Array.isArray(r)?r.join(""):r});var i=iS(e,MA.DEFAULT_TITLE);return r||i||void 0},Nwt=function(e){return iS(e,MA.ON_CHANGE_CLIENT_STATE)||function(){}},_W=function(e,r){return r.filter(function(n){return typeof n[e]!="undefined"}).map(function(n){return n[e]}).reduce(function(n,i){return gd({},n,i)},{})},$wt=function(e,r){return r.filter(function(n){return typeof n[Wi.BASE]!="undefined"}).map(function(n){return n[Wi.BASE]}).reverse().reduce(function(n,i){if(!n.length)for(var o=Object.keys(i),a=0;a<o.length;a++){var s=o[a],l=s.toLowerCase();if(e.indexOf(l)!==-1&&i[l])return n.concat(i)}return n},[])},AA=function(e,r,n){var i={};return n.filter(function(o){return Array.isArray(o[e])?!0:(typeof o[e]!="undefined"&&jwt("Helmet: "+e+' should be of type "Array". Instead found type "'+Awt(o[e])+'"'),!1)}).map(function(o){return o[e]}).reverse().reduce(function(o,a){var s={};a.filter(function(v){for(var x=void 0,y=Object.keys(v),_=0;_<y.length;_++){var w=y[_],C=w.toLowerCase();r.indexOf(C)!==-1&&!(x===Fa.REL&&v[x].toLowerCase()==="canonical")&&!(C===Fa.REL&&v[C].toLowerCase()==="stylesheet")&&(x=C),r.indexOf(w)!==-1&&(w===Fa.INNER_HTML||w===Fa.CSS_TEXT||w===Fa.ITEM_PROP)&&(x=w)}if(!x||!v[x])return!1;var E=v[x].toLowerCase();return i[x]||(i[x]={}),s[x]||(s[x]={}),i[x][E]?!1:(s[x][E]=!0,!0)}).reverse().forEach(function(v){return o.push(v)});for(var l=Object.keys(s),u=0;u<l.length;u++){var p=l[u],m=Pwt({},i[p],s[p]);i[p]=m}return o},[]).reverse()},iS=function(e,r){for(var n=e.length-1;n>=0;n--){var i=e[n];if(i.hasOwnProperty(r))return i[r]}return null},Fwt=function(e){return{baseTag:$wt([Fa.HREF,Fa.TARGET],e),bodyAttributes:_W(Kb.BODY,e),defer:iS(e,MA.DEFER),encode:iS(e,MA.ENCODE_SPECIAL_CHARACTERS),htmlAttributes:_W(Kb.HTML,e),linkTags:AA(Wi.LINK,[Fa.REL,Fa.HREF],e),metaTags:AA(Wi.META,[Fa.NAME,Fa.CHARSET,Fa.HTTPEQUIV,Fa.PROPERTY,Fa.ITEM_PROP],e),noscriptTags:AA(Wi.NOSCRIPT,[Fa.INNER_HTML],e),onChangeClientState:Nwt(e),scriptTags:AA(Wi.SCRIPT,[Fa.SRC,Fa.INNER_HTML],e),styleTags:AA(Wi.STYLE,[Fa.CSS_TEXT],e),title:Dwt(e),titleAttributes:_W(Kb.TITLE,e)}},bW=function(){var t=Date.now();return function(e){var r=Date.now();r-t>16?(t=r,e(r)):setTimeout(function(){bW(e)},0)}}(),Nme=function(e){return clearTimeout(e)},zwt=typeof window!="undefined"?window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||bW:global.requestAnimationFrame||bW,Bwt=typeof window!="undefined"?window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||Nme:global.cancelAnimationFrame||Nme,jwt=function(e){return console&&typeof console.warn=="function"&&console.warn(e)},RA=null,Uwt=function(e){RA&&Bwt(RA),e.defer?RA=zwt(function(){$me(e,function(){RA=null})}):($me(e),RA=null)},$me=function(e,r){var n=e.baseTag,i=e.bodyAttributes,o=e.htmlAttributes,a=e.linkTags,s=e.metaTags,l=e.noscriptTags,u=e.onChangeClientState,p=e.scriptTags,m=e.styleTags,v=e.title,x=e.titleAttributes;wW(Wi.BODY,i),wW(Wi.HTML,o),Vwt(v,x);var y={baseTag:oS(Wi.BASE,n),linkTags:oS(Wi.LINK,a),metaTags:oS(Wi.META,s),noscriptTags:oS(Wi.NOSCRIPT,l),scriptTags:oS(Wi.SCRIPT,p),styleTags:oS(Wi.STYLE,m)},_={},w={};Object.keys(y).forEach(function(C){var E=y[C],T=E.newTags,A=E.oldTags;T.length&&(_[C]=T),A.length&&(w[C]=y[C].oldTags)}),r&&r(),u(e,_,w)},Fme=function(e){return Array.isArray(e)?e.join(""):e},Vwt=function(e,r){typeof e!="undefined"&&document.title!==e&&(document.title=Fme(e)),wW(Wi.TITLE,r)},wW=function(e,r){var n=document.getElementsByTagName(e)[0];if(!!n){for(var i=n.getAttribute(Qm),o=i?i.split(","):[],a=[].concat(o),s=Object.keys(r),l=0;l<s.length;l++){var u=s[l],p=r[u]||"";n.getAttribute(u)!==p&&n.setAttribute(u,p),o.indexOf(u)===-1&&o.push(u);var m=a.indexOf(u);m!==-1&&a.splice(m,1)}for(var v=a.length-1;v>=0;v--)n.removeAttribute(a[v]);o.length===a.length?n.removeAttribute(Qm):n.getAttribute(Qm)!==s.join(",")&&n.setAttribute(Qm,s.join(","))}},oS=function(e,r){var n=document.head||document.querySelector(Wi.HEAD),i=n.querySelectorAll(e+"["+Qm+"]"),o=Array.prototype.slice.call(i),a=[],s=void 0;return r&&r.length&&r.forEach(function(l){var u=document.createElement(e);for(var p in l)if(l.hasOwnProperty(p))if(p===Fa.INNER_HTML)u.innerHTML=l.innerHTML;else if(p===Fa.CSS_TEXT)u.styleSheet?u.styleSheet.cssText=l.cssText:u.appendChild(document.createTextNode(l.cssText));else{var m=typeof l[p]=="undefined"?"":l[p];u.setAttribute(p,m)}u.setAttribute(Qm,"true"),o.some(function(v,x){return s=x,u.isEqualNode(v)})?o.splice(s,1):a.push(u)}),o.forEach(function(l){return l.parentNode.removeChild(l)}),a.forEach(function(l){return n.appendChild(l)}),{oldTags:o,newTags:a}},zme=function(e){return Object.keys(e).reduce(function(r,n){var i=typeof e[n]!="undefined"?n+'="'+e[n]+'"':""+n;return r?r+" "+i:i},"")},Hwt=function(e,r,n,i){var o=zme(n),a=Fme(r);return o?"<"+e+" "+Qm+'="true" '+o+">"+xW(a,i)+"</"+e+">":"<"+e+" "+Qm+'="true">'+xW(a,i)+"</"+e+">"},Wwt=function(e,r,n){return r.reduce(function(i,o){var a=Object.keys(o).filter(function(u){return!(u===Fa.INNER_HTML||u===Fa.CSS_TEXT)}).reduce(function(u,p){var m=typeof o[p]=="undefined"?p:p+'="'+xW(o[p],n)+'"';return u?u+" "+m:m},""),s=o.innerHTML||o.cssText||"",l=Mwt.indexOf(e)===-1;return i+"<"+e+" "+Qm+'="true" '+a+(l?"/>":">"+s+"</"+e+">")},"")},Bme=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Object.keys(e).reduce(function(n,i){return n[A$[i]||i]=e[i],n},r)},Gwt=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Object.keys(e).reduce(function(n,i){return n[Iwt[i]||i]=e[i],n},r)},qwt=function(e,r,n){var i,o=(i={key:r},i[Qm]=!0,i),a=Bme(n,o);return[Or.createElement(Wi.TITLE,a,r)]},Xwt=function(e,r){return r.map(function(n,i){var o,a=(o={key:i},o[Qm]=!0,o);return Object.keys(n).forEach(function(s){var l=A$[s]||s;if(l===Fa.INNER_HTML||l===Fa.CSS_TEXT){var u=n.innerHTML||n.cssText;a.dangerouslySetInnerHTML={__html:u}}else a[l]=n[s]}),Or.createElement(e,a)})},Ky=function(e,r,n){switch(e){case Wi.TITLE:return{toComponent:function(){return qwt(e,r.title,r.titleAttributes)},toString:function(){return Hwt(e,r.title,r.titleAttributes,n)}};case Kb.BODY:case Kb.HTML:return{toComponent:function(){return Bme(r)},toString:function(){return zme(r)}};default:return{toComponent:function(){return Xwt(e,r)},toString:function(){return Wwt(e,r,n)}}}},jme=function(e){var r=e.baseTag,n=e.bodyAttributes,i=e.encode,o=e.htmlAttributes,a=e.linkTags,s=e.metaTags,l=e.noscriptTags,u=e.scriptTags,p=e.styleTags,m=e.title,v=m===void 0?"":m,x=e.titleAttributes;return{base:Ky(Wi.BASE,r,i),bodyAttributes:Ky(Kb.BODY,n,i),htmlAttributes:Ky(Kb.HTML,o,i),link:Ky(Wi.LINK,a,i),meta:Ky(Wi.META,s,i),noscript:Ky(Wi.NOSCRIPT,l,i),script:Ky(Wi.SCRIPT,u,i),style:Ky(Wi.STYLE,p,i),title:Ky(Wi.TITLE,{title:v,titleAttributes:x},i)}},Ywt=function(e){var r,n;return n=r=function(i){Owt(o,i);function o(){return Rwt(this,o),Lwt(this,i.apply(this,arguments))}return o.prototype.shouldComponentUpdate=function(s){return!wwt(this.props,s)},o.prototype.mapNestedChildrenToProps=function(s,l){if(!l)return null;switch(s.type){case Wi.SCRIPT:case Wi.NOSCRIPT:return{innerHTML:l};case Wi.STYLE:return{cssText:l}}throw new Error("<"+s.type+" /> elements are self-closing and can not contain children. Refer to our API for more information.")},o.prototype.flattenArrayTypeChildren=function(s){var l,u=s.child,p=s.arrayTypeChildren,m=s.newChildProps,v=s.nestedChildren;return gd({},p,(l={},l[u.type]=[].concat(p[u.type]||[],[gd({},m,this.mapNestedChildrenToProps(u,v))]),l))},o.prototype.mapObjectTypeChildren=function(s){var l,u,p=s.child,m=s.newProps,v=s.newChildProps,x=s.nestedChildren;switch(p.type){case Wi.TITLE:return gd({},m,(l={},l[p.type]=x,l.titleAttributes=gd({},v),l));case Wi.BODY:return gd({},m,{bodyAttributes:gd({},v)});case Wi.HTML:return gd({},m,{htmlAttributes:gd({},v)})}return gd({},m,(u={},u[p.type]=gd({},v),u))},o.prototype.mapArrayTypeChildrenToProps=function(s,l){var u=gd({},l);return Object.keys(s).forEach(function(p){var m;u=gd({},u,(m={},m[p]=s[p],m))}),u},o.prototype.warnOnInvalidChildren=function(s,l){return!0},o.prototype.mapChildrenToProps=function(s,l){var u=this,p={};return Or.Children.forEach(s,function(m){if(!(!m||!m.props)){var v=m.props,x=v.children,y=Dme(v,["children"]),_=Gwt(y);switch(u.warnOnInvalidChildren(m,x),m.type){case Wi.LINK:case Wi.META:case Wi.NOSCRIPT:case Wi.SCRIPT:case Wi.STYLE:p=u.flattenArrayTypeChildren({child:m,arrayTypeChildren:p,newChildProps:_,nestedChildren:x});break;default:l=u.mapObjectTypeChildren({child:m,newProps:l,newChildProps:_,nestedChildren:x});break}}}),l=this.mapArrayTypeChildrenToProps(p,l),l},o.prototype.render=function(){var s=this.props,l=s.children,u=Dme(s,["children"]),p=gd({},u);return l&&(p=this.mapChildrenToProps(l,p)),Or.createElement(e,p)},kwt(o,null,[{key:"canUseDOM",set:function(s){e.canUseDOM=s}}]),o}(Or.Component),r.propTypes={base:Us.object,bodyAttributes:Us.object,children:Us.oneOfType([Us.arrayOf(Us.node),Us.node]),defaultTitle:Us.string,defer:Us.bool,encodeSpecialCharacters:Us.bool,htmlAttributes:Us.object,link:Us.arrayOf(Us.object),meta:Us.arrayOf(Us.object),noscript:Us.arrayOf(Us.object),onChangeClientState:Us.func,script:Us.arrayOf(Us.object),style:Us.arrayOf(Us.object),title:Us.string,titleAttributes:Us.object,titleTemplate:Us.string},r.defaultProps={defer:!0,encodeSpecialCharacters:!0},r.peek=e.peek,r.rewind=function(){var i=e.rewind();return i||(i=jme({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}})),i},n},Kwt=function(){return null},Zwt=vwt(Fwt,Uwt,jme)(Kwt),Ume=Ywt(Zwt);Ume.renderStatic=Ume.rewind;var CW={},sc={exports:{}};(function(t){function e(r){return r&&r.__esModule?r:{default:r}}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports})(sc);var ac={},Qwt=PT(uXe);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return e.createSvgIcon}});var e=Qwt})(ac);var kc=PT(GIe),Jwt=sc.exports;Object.defineProperty(CW,"__esModule",{value:!0});var e2t=CW.default=void 0,t2t=Jwt(ac),r2t=kc,n2t=(0,t2t.default)((0,r2t.jsx)("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"}),"Close");e2t=CW.default=n2t;var EW={},i2t=sc.exports;Object.defineProperty(EW,"__esModule",{value:!0});var o2t=EW.default=void 0,s2t=i2t(ac),a2t=kc,l2t=(0,s2t.default)((0,a2t.jsx)("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"}),"Map");o2t=EW.default=l2t;var SW={},c2t=sc.exports;Object.defineProperty(SW,"__esModule",{value:!0});var u2t=SW.default=void 0,f2t=c2t(ac),d2t=kc,h2t=(0,f2t.default)((0,d2t.jsx)("path",{d:"M13 7.83c.85-.3 1.53-.98 1.83-1.83H18l-3 7c0 1.66 1.57 3 3.5 3s3.5-1.34 3.5-3l-3-7h2V4h-6.17c-.41-1.17-1.52-2-2.83-2s-2.42.83-2.83 2H3v2h2l-3 7c0 1.66 1.57 3 3.5 3S9 14.66 9 13L6 6h3.17c.3.85.98 1.53 1.83 1.83V19H2v2h20v-2h-9V7.83zM20.37 13h-3.74l1.87-4.36L20.37 13zm-13 0H3.63L5.5 8.64 7.37 13zM12 6c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1z"}),"Balance");u2t=SW.default=h2t;var TW={},p2t=sc.exports;Object.defineProperty(TW,"__esModule",{value:!0});var m2t=TW.default=void 0,g2t=p2t(ac),v2t=kc,y2t=(0,g2t.default)((0,v2t.jsx)("path",{d:"m10 17 5-5-5-5v10z"}),"ArrowRight");m2t=TW.default=y2t;var Vme={};function x2t(t){if(t&&t.__esModule)return t;var e={};if(t!=null){for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(t,r):{};n.get||n.set?Object.defineProperty(e,r,n):e[r]=t[r]}}return e.default=t,e}var Hme=x2t,__={};function _2t(t){return t&&t.__esModule?t:{default:t}}var kA=_2t;function PW(){return Wme=PW=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},PW.apply(this,arguments)}var Wme=PW;function b2t(t,e){if(t==null)return{};var r={},n=Object.keys(t),i,o;for(o=0;o<n.length;o++)i=n[o],!(e.indexOf(i)>=0)&&(r[i]=t[i]);return r}var w2t=b2t,C2t=w2t;function E2t(t,e){if(t==null)return{};var r=C2t(t,e),n,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)n=o[i],!(e.indexOf(n)>=0)&&(!Object.prototype.propertyIsEnumerable.call(t,n)||(r[n]=t[n]))}return r}var S2t=E2t;function T2t(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var P2t=T2t;function Gme(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function I2t(t,e,r){return e&&Gme(t.prototype,e),r&&Gme(t,r),t}var M2t=I2t;function sS(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?sS=function(r){return typeof r}:sS=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},sS(t)}function R$(t){return typeof Symbol=="function"&&sS(Symbol.iterator)==="symbol"?IW=R$=function(r){return sS(r)}:IW=R$=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":sS(r)},R$(t)}var IW=R$;function A2t(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var R2t=A2t,k2t=IW,O2t=R2t;function L2t(t,e){return e&&(k2t(e)==="object"||typeof e=="function")?e:O2t(t)}var D2t=L2t;function MW(t){return qme=MW=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},MW(t)}var qme=MW;function AW(t,e){return Xme=AW=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},AW(t,e)}var Xme=AW,N2t=Xme;function $2t(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}}),e&&N2t(t,e)}var F2t=$2t,Yme={},k$={},Kme=kA;Object.defineProperty(k$,"__esModule",{value:!0});k$.default=void 0;var z2t=Kme(Y.exports);Kme(h7);var B2t=function(e){e.index;var r=e.children;z2t.default.Children.count(r)},j2t=B2t;k$.default=j2t;var RW={},OA={};Object.defineProperty(OA,"__esModule",{value:!0});OA.default=void 0;var U2t={RESISTANCE_COEF:.6,UNCERTAINTY_THRESHOLD:3};OA.default=U2t;var Zme=kA;Object.defineProperty(RW,"__esModule",{value:!0});RW.default=H2t;var V2t=Zme(Y.exports),Qme=Zme(OA);function H2t(t){var e=t.children,r=t.startIndex,n=t.startX,i=t.pageX,o=t.viewLength,a=t.resistance,s=V2t.default.Children.count(e)-1,l=r+(n-i)/o,u;return a?l<0?l=Math.exp(l*Qme.default.RESISTANCE_COEF)-1:l>s&&(l=s+1-Math.exp((s-l)*Qme.default.RESISTANCE_COEF)):l<0?(l=0,u=(l-r)*o+i):l>s&&(l=s,u=(l-r)*o+i),{index:l,startX:u}}var O$={},W2t=kA;Object.defineProperty(O$,"__esModule",{value:!0});O$.default=void 0;var Jme=W2t(Y.exports),G2t=function(e,r){var n=!1,i=function(p){return p?p.key:"empty"};if(e.children.length&&r.children.length){var o=Jme.default.Children.map(e.children,i),a=o[e.index];if(a!=null){var s=Jme.default.Children.map(r.children,i),l=s[r.index];a===l&&(n=!0)}}return n},q2t=G2t;O$.default=q2t;var L$={};Object.defineProperty(L$,"__esModule",{value:!0});L$.default=void 0;function X2t(t,e){var r=t%e;return r<0?r+e:r}var Y2t=X2t;L$.default=Y2t;(function(t){var e=kA;Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"checkIndexBounds",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(t,"computeIndex",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"constant",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"getDisplaySameSlide",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"mod",{enumerable:!0,get:function(){return a.default}});var r=e(k$),n=e(RW),i=e(OA),o=e(O$),a=e(L$)})(Yme);var K2t=Hme,Zy=kA;Object.defineProperty(__,"__esModule",{value:!0});__.getDomTreeShapes=rge;__.findNativeHandler=nge;__.default=__.SwipeableViewsContext=void 0;var D$=Zy(Wme),Z2t=Zy(S2t),Q2t=Zy(P2t),J2t=Zy(M2t),eCt=Zy(D2t),tCt=Zy(qme),rCt=Zy(F2t),Qy=K2t(Y.exports);Zy(vP.exports);Zy(h7);var N$=Yme;function ege(t,e,r,n){return t.addEventListener(e,r,n),{remove:function(){t.removeEventListener(e,r,n)}}}var tge={container:{direction:"ltr",display:"flex",willChange:"transform"},slide:{width:"100%",WebkitFlexShrink:0,flexShrink:0,overflow:"auto"}},bv={root:{x:{overflowX:"hidden"},"x-reverse":{overflowX:"hidden"},y:{overflowY:"hidden"},"y-reverse":{overflowY:"hidden"}},flexDirection:{x:"row","x-reverse":"row-reverse",y:"column","y-reverse":"column-reverse"},transform:{x:function(e){return"translate(".concat(-e,"%, 0)")},"x-reverse":function(e){return"translate(".concat(e,"%, 0)")},y:function(e){return"translate(0, ".concat(-e,"%)")},"y-reverse":function(e){return"translate(0, ".concat(e,"%)")}},length:{x:"width","x-reverse":"width",y:"height","y-reverse":"height"},rotationMatrix:{x:{x:[1,0],y:[0,1]},"x-reverse":{x:[-1,0],y:[0,1]},y:{x:[0,1],y:[1,0]},"y-reverse":{x:[0,-1],y:[1,0]}},scrollPosition:{x:"scrollLeft","x-reverse":"scrollLeft",y:"scrollTop","y-reverse":"scrollTop"},scrollLength:{x:"scrollWidth","x-reverse":"scrollWidth",y:"scrollHeight","y-reverse":"scrollHeight"},clientLength:{x:"clientWidth","x-reverse":"clientWidth",y:"clientHeight","y-reverse":"clientHeight"}};function kW(t,e){var r=e.duration,n=e.easeFunction,i=e.delay;return"".concat(t," ").concat(r," ").concat(n," ").concat(i)}function OW(t,e){var r=bv.rotationMatrix[e];return{pageX:r.x[0]*t.pageX+r.x[1]*t.pageY,pageY:r.y[0]*t.pageX+r.y[1]*t.pageY}}function $$(t){return t.touches=[{pageX:t.pageX,pageY:t.pageY}],t}function rge(t,e){for(var r=[];t&&t!==e&&t!==document.body&&!t.hasAttribute("data-swipeable");){var n=window.getComputedStyle(t);n.getPropertyValue("position")==="absolute"||n.getPropertyValue("overflow-x")==="hidden"?r=[]:(t.clientWidth>0&&t.scrollWidth>t.clientWidth||t.clientHeight>0&&t.scrollHeight>t.clientHeight)&&r.push({element:t,scrollWidth:t.scrollWidth,scrollHeight:t.scrollHeight,clientWidth:t.clientWidth,clientHeight:t.clientHeight,scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}),t=t.parentNode}return r}var Zb=null;function nge(t){var e=t.domTreeShapes,r=t.pageX,n=t.startX,i=t.axis;return e.some(function(o){var a=r>=n;(i==="x"||i==="y")&&(a=!a);var s=Math.round(o[bv.scrollPosition[i]]),l=s>0,u=s+o[bv.clientLength[i]]<o[bv.scrollLength[i]];return a&&u||!a&&l?(Zb=o.element,!0):!1})}var ige=Qy.createContext();__.SwipeableViewsContext=ige;var F$=function(t){(0,rCt.default)(e,t);function e(r){var n;return(0,Q2t.default)(this,e),n=(0,eCt.default)(this,(0,tCt.default)(e).call(this,r)),n.rootNode=null,n.containerNode=null,n.ignoreNextScrollEvents=!1,n.viewLength=0,n.startX=0,n.lastX=0,n.vx=0,n.startY=0,n.isSwiping=void 0,n.started=!1,n.startIndex=0,n.transitionListener=null,n.touchMoveListener=null,n.activeSlide=null,n.indexCurrent=null,n.firstRenderTimeout=null,n.setRootNode=function(i){n.rootNode=i},n.setContainerNode=function(i){n.containerNode=i},n.setActiveSlide=function(i){n.activeSlide=i,n.updateHeight()},n.handleSwipeStart=function(i){var o=n.props.axis,a=OW(i.touches[0],o);n.viewLength=n.rootNode.getBoundingClientRect()[bv.length[o]],n.startX=a.pageX,n.lastX=a.pageX,n.vx=0,n.startY=a.pageY,n.isSwiping=void 0,n.started=!0;var s=window.getComputedStyle(n.containerNode),l=s.getPropertyValue("-webkit-transform")||s.getPropertyValue("transform");if(l&&l!=="none"){var u=l.split("(")[1].split(")")[0].split(","),p=window.getComputedStyle(n.rootNode),m=OW({pageX:parseInt(u[4],10),pageY:parseInt(u[5],10)},o);n.startIndex=-m.pageX/(n.viewLength-parseInt(p.paddingLeft,10)-parseInt(p.paddingRight,10))||0}},n.handleSwipeMove=function(i){if(!n.started){n.handleTouchStart(i);return}if(!(Zb!==null&&Zb!==n.rootNode)){var o=n.props,a=o.axis,s=o.children,l=o.ignoreNativeScroll,u=o.onSwitching,p=o.resistance,m=OW(i.touches[0],a);if(n.isSwiping===void 0){var v=Math.abs(m.pageX-n.startX),x=Math.abs(m.pageY-n.startY),y=v>x&&v>N$.constant.UNCERTAINTY_THRESHOLD;if(!p&&(a==="y"||a==="y-reverse")&&(n.indexCurrent===0&&n.startX<m.pageX||n.indexCurrent===Qy.Children.count(n.props.children)-1&&n.startX>m.pageX)){n.isSwiping=!1;return}if(v>x&&i.preventDefault(),y===!0||x>N$.constant.UNCERTAINTY_THRESHOLD){n.isSwiping=y,n.startX=m.pageX;return}}if(n.isSwiping===!0){i.preventDefault(),n.vx=n.vx*.5+(m.pageX-n.lastX)*.5,n.lastX=m.pageX;var _=(0,N$.computeIndex)({children:s,resistance:p,pageX:m.pageX,startIndex:n.startIndex,startX:n.startX,viewLength:n.viewLength}),w=_.index,C=_.startX;if(Zb===null&&!l){var E=rge(i.target,n.rootNode),T=nge({domTreeShapes:E,startX:n.startX,pageX:m.pageX,axis:a});if(T)return}C?n.startX=C:Zb===null&&(Zb=n.rootNode),n.setIndexCurrent(w);var A=function(){u&&u(w,"move")};(n.state.displaySameSlide||!n.state.isDragging)&&n.setState({displaySameSlide:!1,isDragging:!0},A),A()}}},n.handleSwipeEnd=function(){if(Zb=null,!!n.started&&(n.started=!1,n.isSwiping===!0)){var i=n.state.indexLatest,o=n.indexCurrent,a=i-o,s;Math.abs(n.vx)>n.props.threshold?n.vx>0?s=Math.floor(o):s=Math.ceil(o):Math.abs(a)>n.props.hysteresis?s=a>0?Math.floor(o):Math.ceil(o):s=i;var l=Qy.Children.count(n.props.children)-1;s<0?s=0:s>l&&(s=l),n.setIndexCurrent(s),n.setState({indexLatest:s,isDragging:!1},function(){n.props.onSwitching&&n.props.onSwitching(s,"end"),n.props.onChangeIndex&&s!==i&&n.props.onChangeIndex(s,i,{reason:"swipe"}),o===i&&n.handleTransitionEnd()})}},n.handleTouchStart=function(i){n.props.onTouchStart&&n.props.onTouchStart(i),n.handleSwipeStart(i)},n.handleTouchEnd=function(i){n.props.onTouchEnd&&n.props.onTouchEnd(i),n.handleSwipeEnd(i)},n.handleMouseDown=function(i){n.props.onMouseDown&&n.props.onMouseDown(i),i.persist(),n.handleSwipeStart($$(i))},n.handleMouseUp=function(i){n.props.onMouseUp&&n.props.onMouseUp(i),n.handleSwipeEnd($$(i))},n.handleMouseLeave=function(i){n.props.onMouseLeave&&n.props.onMouseLeave(i),n.started&&n.handleSwipeEnd($$(i))},n.handleMouseMove=function(i){n.props.onMouseMove&&n.props.onMouseMove(i),n.started&&n.handleSwipeMove($$(i))},n.handleScroll=function(i){if(n.props.onScroll&&n.props.onScroll(i),i.target===n.rootNode){if(n.ignoreNextScrollEvents){n.ignoreNextScrollEvents=!1;return}var o=n.state.indexLatest,a=Math.ceil(i.target.scrollLeft/i.target.clientWidth)+o;n.ignoreNextScrollEvents=!0,i.target.scrollLeft=0,n.props.onChangeIndex&&a!==o&&n.props.onChangeIndex(a,o,{reason:"focus"})}},n.updateHeight=function(){if(n.activeSlide!==null){var i=n.activeSlide.children[0];i!==void 0&&i.offsetHeight!==void 0&&n.state.heightLatest!==i.offsetHeight&&n.setState({heightLatest:i.offsetHeight})}},n.state={indexLatest:r.index,isDragging:!1,renderOnlyActive:!r.disableLazyLoading,heightLatest:0,displaySameSlide:!0},n.setIndexCurrent(r.index),n}return(0,J2t.default)(e,[{key:"componentDidMount",value:function(){var n=this;this.transitionListener=ege(this.containerNode,"transitionend",function(i){i.target===n.containerNode&&n.handleTransitionEnd()}),this.touchMoveListener=ege(this.rootNode,"touchmove",function(i){n.props.disabled||n.handleSwipeMove(i)},{passive:!1}),this.props.disableLazyLoading||(this.firstRenderTimeout=setTimeout(function(){n.setState({renderOnlyActive:!1})},0)),this.props.action&&this.props.action({updateHeight:this.updateHeight})}},{key:"UNSAFE_componentWillReceiveProps",value:function(n){var i=n.index;typeof i=="number"&&i!==this.props.index&&(this.setIndexCurrent(i),this.setState({displaySameSlide:(0,N$.getDisplaySameSlide)(this.props,n),indexLatest:i}))}},{key:"componentWillUnmount",value:function(){this.transitionListener.remove(),this.touchMoveListener.remove(),clearTimeout(this.firstRenderTimeout)}},{key:"getSwipeableViewsContext",value:function(){var n=this;return{slideUpdateHeight:function(){n.updateHeight()}}}},{key:"setIndexCurrent",value:function(n){if(!this.props.animateTransitions&&this.indexCurrent!==n&&this.handleTransitionEnd(),this.indexCurrent=n,this.containerNode){var i=this.props.axis,o=bv.transform[i](n*100);this.containerNode.style.WebkitTransform=o,this.containerNode.style.transform=o}}},{key:"handleTransitionEnd",value:function(){!this.props.onTransitionEnd||this.state.displaySameSlide||this.state.isDragging||this.props.onTransitionEnd()}},{key:"render",value:function(){var n=this,i=this.props;i.action;var o=i.animateHeight,a=i.animateTransitions,s=i.axis,l=i.children,u=i.containerStyle,p=i.disabled;i.disableLazyLoading;var m=i.enableMouseEvents;i.hysteresis,i.ignoreNativeScroll,i.index,i.onChangeIndex,i.onSwitching,i.onTransitionEnd,i.resistance;var v=i.slideStyle,x=i.slideClassName,y=i.springConfig,_=i.style;i.threshold;var w=(0,Z2t.default)(i,["action","animateHeight","animateTransitions","axis","children","containerStyle","disabled","disableLazyLoading","enableMouseEvents","hysteresis","ignoreNativeScroll","index","onChangeIndex","onSwitching","onTransitionEnd","resistance","slideStyle","slideClassName","springConfig","style","threshold"]),C=this.state,E=C.displaySameSlide,T=C.heightLatest,A=C.indexLatest,k=C.isDragging,X=C.renderOnlyActive,Z=p?{}:{onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd},W=!p&&m?{onMouseDown:this.handleMouseDown,onMouseUp:this.handleMouseUp,onMouseLeave:this.handleMouseLeave,onMouseMove:this.handleMouseMove}:{},D=(0,D$.default)({},tge.slide,v),H,N;if(k||!a||E)H="all 0s ease 0s",N="all 0s ease 0s";else if(H=kW("transform",y),N=kW("-webkit-transform",y),T!==0){var j=", ".concat(kW("height",y));H+=j,N+=j}var $={height:null,WebkitFlexDirection:bv.flexDirection[s],flexDirection:bv.flexDirection[s],WebkitTransition:N,transition:H};if(!X){var z=bv.transform[s](this.indexCurrent*100);$.WebkitTransform=z,$.transform=z}return o&&($.height=T),Qy.createElement(ige.Provider,{value:this.getSwipeableViewsContext()},Qy.createElement("div",(0,D$.default)({ref:this.setRootNode,style:(0,D$.default)({},bv.root[s],_)},w,Z,W,{onScroll:this.handleScroll}),Qy.createElement("div",{ref:this.setContainerNode,style:(0,D$.default)({},$,tge.container,u),className:"react-swipeable-view-container"},Qy.Children.map(l,function(O,F){if(X&&F!==A)return null;var G,q=!0;return F===A&&(q=!1,o&&(G=n.setActiveSlide,D.overflowY="hidden")),Qy.createElement("div",{ref:G,style:D,className:x,"aria-hidden":q,"data-swipeable":"true"},O)}))))}}]),e}(Qy.Component);F$.displayName="ReactSwipableView";F$.propTypes={};F$.defaultProps={animateHeight:!1,animateTransitions:!0,axis:"x",disabled:!1,disableLazyLoading:!1,enableMouseEvents:!1,hysteresis:.6,ignoreNativeScroll:!1,index:0,threshold:5,springConfig:{duration:"0.35s",easeFunction:"cubic-bezier(0.15, 0.3, 0.25, 1)",delay:"0s"},resistance:!1};var nCt=F$;__.default=nCt;(function(t){var e=Hme;Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(t,"SwipeableViewsContext",{enumerable:!0,get:function(){return r.SwipeableViewsContext}});var r=e(__)})(Vme);var eOt=Tk(Vme),LW={},iCt=sc.exports;Object.defineProperty(LW,"__esModule",{value:!0});var oCt=LW.default=void 0,sCt=iCt(ac),aCt=kc,lCt=(0,sCt.default)((0,aCt.jsx)("path",{d:"M11 7h2v2h-2zm0 4h2v6h-2zm1-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"}),"InfoOutlined");oCt=LW.default=lCt;var DW={},cCt=sc.exports;Object.defineProperty(DW,"__esModule",{value:!0});var uCt=DW.default=void 0,fCt=cCt(ac),dCt=kc,hCt=(0,fCt.default)((0,dCt.jsx)("path",{d:"M16.01 11H4v2h12.01v3L20 12l-3.99-4z"}),"ArrowRightAlt");uCt=DW.default=hCt;var NW={},pCt=sc.exports;Object.defineProperty(NW,"__esModule",{value:!0});var mCt=NW.default=void 0,gCt=pCt(ac),vCt=kc,yCt=(0,gCt.default)((0,vCt.jsx)("path",{d:"M17 12h-5v5h5v-5zM16 1v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-1V1h-2zm3 18H5V8h14v11z"}),"Event");mCt=NW.default=yCt;var $W={},xCt=sc.exports;Object.defineProperty($W,"__esModule",{value:!0});var _Ct=$W.default=void 0,bCt=xCt(ac),wCt=kc,CCt=(0,bCt.default)((0,wCt.jsx)("path",{d:"M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z"}),"GetApp");_Ct=$W.default=CCt;var FW={},ECt=sc.exports;Object.defineProperty(FW,"__esModule",{value:!0});var SCt=FW.default=void 0,TCt=ECt(ac),PCt=kc,ICt=(0,TCt.default)((0,PCt.jsx)("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"}),"Link");SCt=FW.default=ICt;var MCt={attributes:!0,characterData:!0,subtree:!0,childList:!0};function ACt(t,e,r=MCt){Y.exports.useEffect(()=>{if(t.current){const n=new MutationObserver(e);return n.observe(t.current,r),()=>{n.disconnect()}}},[e,r])}var oge=function(){if(typeof Map!="undefined")return Map;function t(e,r){var n=-1;return e.some(function(i,o){return i[0]===r?(n=o,!0):!1}),n}return function(){function e(){this.__entries__=[]}return Object.defineProperty(e.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),e.prototype.get=function(r){var n=t(this.__entries__,r),i=this.__entries__[n];return i&&i[1]},e.prototype.set=function(r,n){var i=t(this.__entries__,r);~i?this.__entries__[i][1]=n:this.__entries__.push([r,n])},e.prototype.delete=function(r){var n=this.__entries__,i=t(n,r);~i&&n.splice(i,1)},e.prototype.has=function(r){return!!~t(this.__entries__,r)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(r,n){n===void 0&&(n=null);for(var i=0,o=this.__entries__;i<o.length;i++){var a=o[i];r.call(n,a[1],a[0])}},e}()}(),zW=typeof window!="undefined"&&typeof document!="undefined"&&window.document===document,z$=function(){return typeof global!="undefined"&&global.Math===Math?global:typeof self!="undefined"&&self.Math===Math?self:typeof window!="undefined"&&window.Math===Math?window:Function("return this")()}(),RCt=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(z$):function(t){return setTimeout(function(){return t(Date.now())},1e3/60)}}(),kCt=2;function OCt(t,e){var r=!1,n=!1,i=0;function o(){r&&(r=!1,t()),n&&s()}function a(){RCt(o)}function s(){var l=Date.now();if(r){if(l-i<kCt)return;n=!0}else r=!0,n=!1,setTimeout(a,e);i=l}return s}var LCt=20,DCt=["top","right","bottom","left","width","height","size","weight"],NCt=typeof MutationObserver!="undefined",$Ct=function(){function t(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=OCt(this.refresh.bind(this),LCt)}return t.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},t.prototype.removeObserver=function(e){var r=this.observers_,n=r.indexOf(e);~n&&r.splice(n,1),!r.length&&this.connected_&&this.disconnect_()},t.prototype.refresh=function(){var e=this.updateObservers_();e&&this.refresh()},t.prototype.updateObservers_=function(){var e=this.observers_.filter(function(r){return r.gatherActive(),r.hasActive()});return e.forEach(function(r){return r.broadcastActive()}),e.length>0},t.prototype.connect_=function(){!zW||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),NCt?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},t.prototype.disconnect_=function(){!zW||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},t.prototype.onTransitionEnd_=function(e){var r=e.propertyName,n=r===void 0?"":r,i=DCt.some(function(o){return!!~n.indexOf(o)});i&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),sge=function(t,e){for(var r=0,n=Object.keys(e);r<n.length;r++){var i=n[r];Object.defineProperty(t,i,{value:e[i],enumerable:!1,writable:!1,configurable:!0})}return t},aS=function(t){var e=t&&t.ownerDocument&&t.ownerDocument.defaultView;return e||z$},age=j$(0,0,0,0);function B$(t){return parseFloat(t)||0}function lge(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];return e.reduce(function(n,i){var o=t["border-"+i+"-width"];return n+B$(o)},0)}function FCt(t){for(var e=["top","right","bottom","left"],r={},n=0,i=e;n<i.length;n++){var o=i[n],a=t["padding-"+o];r[o]=B$(a)}return r}function zCt(t){var e=t.getBBox();return j$(0,0,e.width,e.height)}function BCt(t){var e=t.clientWidth,r=t.clientHeight;if(!e&&!r)return age;var n=aS(t).getComputedStyle(t),i=FCt(n),o=i.left+i.right,a=i.top+i.bottom,s=B$(n.width),l=B$(n.height);if(n.boxSizing==="border-box"&&(Math.round(s+o)!==e&&(s-=lge(n,"left","right")+o),Math.round(l+a)!==r&&(l-=lge(n,"top","bottom")+a)),!UCt(t)){var u=Math.round(s+o)-e,p=Math.round(l+a)-r;Math.abs(u)!==1&&(s-=u),Math.abs(p)!==1&&(l-=p)}return j$(i.left,i.top,s,l)}var jCt=function(){return typeof SVGGraphicsElement!="undefined"?function(t){return t instanceof aS(t).SVGGraphicsElement}:function(t){return t instanceof aS(t).SVGElement&&typeof t.getBBox=="function"}}();function UCt(t){return t===aS(t).document.documentElement}function VCt(t){return zW?jCt(t)?zCt(t):BCt(t):age}function HCt(t){var e=t.x,r=t.y,n=t.width,i=t.height,o=typeof DOMRectReadOnly!="undefined"?DOMRectReadOnly:Object,a=Object.create(o.prototype);return sge(a,{x:e,y:r,width:n,height:i,top:r,right:e+n,bottom:i+r,left:e}),a}function j$(t,e,r,n){return{x:t,y:e,width:r,height:n}}var WCt=function(){function t(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=j$(0,0,0,0),this.target=e}return t.prototype.isActive=function(){var e=VCt(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},t.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},t}(),GCt=function(){function t(e,r){var n=HCt(r);sge(this,{target:e,contentRect:n})}return t}(),qCt=function(){function t(e,r,n){if(this.activeObservations_=[],this.observations_=new oge,typeof e!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=r,this.callbackCtx_=n}return t.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element=="undefined"||!(Element instanceof Object))){if(!(e instanceof aS(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var r=this.observations_;r.has(e)||(r.set(e,new WCt(e)),this.controller_.addObserver(this),this.controller_.refresh())}},t.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element=="undefined"||!(Element instanceof Object))){if(!(e instanceof aS(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var r=this.observations_;!r.has(e)||(r.delete(e),r.size||this.controller_.removeObserver(this))}},t.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},t.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach(function(r){r.isActive()&&e.activeObservations_.push(r)})},t.prototype.broadcastActive=function(){if(!!this.hasActive()){var e=this.callbackCtx_,r=this.activeObservations_.map(function(n){return new GCt(n.target,n.broadcastRect())});this.callback_.call(e,r,e),this.clearActive()}},t.prototype.clearActive=function(){this.activeObservations_.splice(0)},t.prototype.hasActive=function(){return this.activeObservations_.length>0},t}(),cge=typeof WeakMap!="undefined"?new WeakMap:new oge,uge=function(){function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var r=$Ct.getInstance(),n=new qCt(e,r,this);cge.set(this,n)}return t}();["observe","unobserve","disconnect"].forEach(function(t){uge.prototype[t]=function(){var e;return(e=cge.get(this))[t].apply(e,arguments)}});var XCt=function(){return typeof z$.ResizeObserver!="undefined"?z$.ResizeObserver:uge}(),YCt=function(e){var r=e.children,n=e.type,i=n===void 0?"reactour-portal":n,o=Y.exports.useRef(null),a=Y.exports.useRef(null),s=Y.exports.useState({}),l=s[1];return Y.exports.useLayoutEffect(function(){if(!!o.current){var u=o.current.ownerDocument;return a.current=u==null?void 0:u.createElement(i),u.body.appendChild(a.current),l({}),function(){a.current&&a.current.ownerDocument&&a.current.ownerDocument.body.removeChild(a.current)}}},[i]),a.current?Wa.exports.createPortal(r,a.current):Kt("span",{ref:o})};function KCt(t,e){if(!!t){if(typeof t=="string")return fge(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return fge(t,e)}}function fge(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function dge(t,e){var r=typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(r)return(r=r.call(t)).next.bind(r);if(Array.isArray(t)||(r=KCt(t))||e&&t&&typeof t.length=="number"){r&&(t=r);var n=0;return function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var ZCt=function(e){var r=e.mutationObservables,n=e.resizeObservables,i=e.refresh,o=Y.exports.useState(0),a=o[0],s=o[1],l=Y.exports.useRef(document.documentElement||document.body);function u(m){for(var v=Array.from(m),x=function(){var E=_[y];if(r){if(!E.attributes)return"continue";var T=r.find(function(A){return E.matches(A)});T&&i(!0)}},y=0,_=v;y<_.length;y++)var w=x()}function p(m){for(var v=Array.from(m),x=function(){var E=_[y];if(n){if(!E.attributes)return"continue";var T=n.find(function(A){return E.matches(A)});T&&s(a+1)}},y=0,_=v;y<_.length;y++)var w=x()}return ACt(l,function(m){for(var v=dge(m),x;!(x=v()).done;){var y=x.value;y.addedNodes.length!==0&&(u(y.addedNodes),p(y.addedNodes)),y.removedNodes.length!==0&&(u(y.removedNodes),p(y.removedNodes))}},{childList:!0,subtree:!0}),Y.exports.useEffect(function(){if(!!n){for(var m=new XCt(function(){i()}),v=dge(n),x;!(x=v()).done;){var y=x.value,_=document.querySelector(y);_&&m.observe(_)}return function(){m.disconnect()}}},[n,a]),null};function U$(t){var e={bottom:0,height:0,left:0,right:0,top:0,width:0};if(t){var r=t.getBoundingClientRect();e={bottom:r.bottom,height:r.height,left:r.left,right:r.right,top:r.top,width:r.width}}return e}function QCt(t,e){var r=Y.exports.useState(JCt),n=r[0],i=r[1],o=Y.exports.useCallback(function(){!(t!=null&&t.current)||i(U$(t==null?void 0:t.current))},[t==null?void 0:t.current]);return Y.exports.useEffect(function(){return o(),window.addEventListener("resize",o),function(){return window.removeEventListener("resize",o)}},[t==null?void 0:t.current,e]),n}var JCt={bottom:0,height:0,left:0,right:0,top:0,width:0};function eEt(t,e){return new Promise(function(r){if(!(t instanceof Element))throw new TypeError("Argument 1 must be an Element");var n=0,i=null,o=Object.assign({behavior:"smooth"},e);t.scrollIntoView(o),requestAnimationFrame(a);function a(){var s=t==null?void 0:t.getBoundingClientRect().top;if(s===i){if(n++>2)return r(null)}else n=0,i=s;requestAnimationFrame(a)}})}function V$(t){return t<0?0:t}function tEt(t){return typeof t=="object"&&t!==null?{thresholdX:t.x||0,thresholdY:t.y||0}:{thresholdX:t||0,thresholdY:t||0}}function H$(){var t=Math.max(document.documentElement.clientWidth,window.innerWidth||0),e=Math.max(document.documentElement.clientHeight,window.innerHeight||0);return{w:t,h:e}}function rEt(t){var e=t.top,r=t.right,n=t.bottom,i=t.left,o=t.threshold,a=H$(),s=a.w,l=a.h,u=tEt(o),p=u.thresholdX,m=u.thresholdY;return e<0&&n-e>l?!0:e>=0+m&&i>=0+p&&n<=l-m&&r<=s-p}var nEt=function(e){return/(left|right)/.test(e)},BW=function(e,r){return e>r},jW=function(e,r){return e>r};function iEt(t){return Object.keys(t).map(function(e){return{position:e,value:t[e]}}).sort(function(e,r){return r.value-e.value}).map(function(e){return e.position})}var UW=10;function VW(t){return t===void 0&&(t=UW),Array.isArray(t)?t[0]?[t[0],t[1]?t[1]:t[0]]:[UW,UW]:[t,t]}var oEt={maskWrapper:function(){return{opacity:.7,left:0,top:0,position:"fixed",zIndex:99999,pointerEvents:"none",color:"#000"}},svgWrapper:function(e){var r=e.windowWidth,n=e.windowHeight,i=e.wpx,o=e.wpy;return{width:r,height:n,left:Number(i)/2,top:Number(o)/2,position:"fixed"}},maskArea:function(e){var r=e.x,n=e.y,i=e.width,o=e.height;return{x:r,y:n,width:i,height:o,fill:"black",rx:0}},maskRect:function(e){var r=e.windowWidth,n=e.windowHeight,i=e.maskID;return{x:0,y:0,width:r,height:n,fill:"currentColor",mask:"url(#"+i+")"}},clickArea:function(e){var r=e.windowWidth,n=e.windowHeight,i=e.clipID;return{x:0,y:0,width:r,height:n,fill:"currentcolor",pointerEvents:"auto",clipPath:"url(#"+i+")"}},highlightedArea:function(e){var r=e.x,n=e.y,i=e.width,o=e.height;return{x:r,y:n,width:i,height:o,pointerEvents:"auto",fill:"transparent",display:"none"}}};function sEt(t){return function(e,r){var n=oEt[e](r),i=t[e];return i?i(n,r):n}}var aEt=function(e){var r=e.padding,n=r===void 0?10:r,i=e.wrapperPadding,o=i===void 0?0:i,a=e.onClick,s=e.onClickHighlighted,l=e.styles,u=l===void 0?{}:l,p=e.sizes,m=e.className,v=e.highlightedAreaClassName,x=e.maskId,y=e.clipId,_=x||hge("mask__"),w=y||hge("clip__"),C=sEt(u),E=VW(n),T=E[0],A=E[1],k=VW(o),X=k[0],Z=k[1],W=H$(),D=W.w,H=W.h,N=V$((p==null?void 0:p.width)+T*2),j=V$((p==null?void 0:p.height)+A*2),$=V$((p==null?void 0:p.top)-A-Z/2),z=V$((p==null?void 0:p.left)-T-X/2),O=D-X,F=H-Z,G=C("maskArea",{x:z,y:$,width:N,height:j});return ys("div",{css:C("maskWrapper",{}),onClick:a,className:m},ys("svg",{width:O,height:F,xmlns:"http://www.w3.org/2000/svg",css:C("svgWrapper",{windowWidth:O,windowHeight:F,wpx:X,wpy:Z})},ys("defs",null,ys("mask",{id:_},ys("rect",{x:0,y:0,width:O,height:F,fill:"white"}),ys("rect",{css:G,rx:G.rx?1:void 0})),ys("clipPath",{id:w},ys("polygon",{points:"0 0, 0 "+F+", "+z+" "+F+", "+z+" "+$+", "+(z+N)+" "+$+", "+(z+N)+" "+($+j)+", "+z+" "+($+j)+", "+z+" "+F+", "+O+" "+F+", "+O+" 0"}))),ys("rect",{css:C("maskRect",{windowWidth:O,windowHeight:F,maskID:_})}),ys("rect",{css:C("clickArea",{windowWidth:O,windowHeight:F,top:$,left:z,width:N,height:j,clipID:w})}),ys("rect",{css:C("highlightedArea",{x:z,y:$,width:N,height:j}),className:v,onClick:s})))};function hge(t){return t+Math.random().toString(36).substring(2,16)}function HW(){return HW=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},HW.apply(this,arguments)}function lEt(t,e){if(t==null)return{};var r={},n=Object.keys(t),i,o;for(o=0;o<n.length;o++)i=n[o],!(e.indexOf(i)>=0)&&(r[i]=t[i]);return r}var cEt={popover:function(){return{position:"fixed",maxWidth:353,backgroundColor:"#fff",padding:"24px 30px",boxShadow:"0 0.5em 3em rgba(0, 0, 0, 0.3)",color:"inherit",zIndex:1e5,transition:"transform 0.3s",top:0,left:0}}};function uEt(t){return function(e,r){var n=cEt[e](r),i=t[e];return i?i(n,r):n}}var fEt=function(e){var r=e.children,n=e.position,i=n===void 0?"bottom":n,o=e.padding,a=o===void 0?10:o,s=e.styles,l=s===void 0?{}:s,u=e.sizes,p=e.refresher,m=lEt(e,["children","position","padding","styles","sizes","refresher"]),v=Y.exports.useRef(null),x=Y.exports.useRef(""),y=Y.exports.useRef(""),_=Y.exports.useRef(""),w=H$(),C=w.w,E=w.h,T=uEt(l),A=QCt(v,p),k=A.width,X=A.height,Z=u==null?void 0:u.left,W=u==null?void 0:u.top,D=u==null?void 0:u.right,H=u==null?void 0:u.bottom,N=i&&typeof i=="function"?i({width:k,height:X,windowWidth:C,windowHeight:E,top:W,left:Z,right:D,bottom:H}):i,j={left:Z,right:C-D,top:W,bottom:E-H},$=VW(a),z=$[0],O=$[1],F=function(ce){return j[ce]>(nEt(ce)?k+z*2:X+O*2)},G=function(ce){for(var fe=iEt(j),J=0;J<fe.length;J++)if(F(fe[J]))return x.current=fe[J],ce[fe[J]];return x.current="center",ce.center},q=function(ce){if(Array.isArray(ce)){var fe=BW(ce[0],C),J=jW(ce[1],E);return x.current="custom",[fe?C/2-k/2:ce[0],J?E/2-X/2:ce[1]]}var oe=BW(Z+k,C)?D-k+z:Z-z,ve=oe>z?oe:z,ye=jW(W+X,E)?H-X+O:W-O,xe=ye>O?ye:O;jW(W+X,E)?y.current="bottom":y.current="top",BW(Z+k,C)?_.current="left":_.current="right";var se={top:[ve,W-X-O*2],right:[D+z*2,xe],bottom:[ve,H+O*2],left:[Z-k-z*2,xe],center:[C/2-k/2,E/2-X/2]};return ce==="center"||F(ce)?(x.current=ce,se[ce]):G(se)},ee=q(N);return ys("div",Object.assign({css:HW({},T("popover",{position:x.current,verticalAlign:y.current,horizontalAlign:_.current}),{transform:"translate("+Math.round(ee[0])+"px, "+Math.round(ee[1])+"px)"}),ref:v},m),r)};function WW(t,e,r,n){Object.defineProperty(t,e,{get:r,set:n,enumerable:!0,configurable:!0})}var GW={};WW(GW,"SSRProvider",()=>dEt);WW(GW,"useSSRSafeId",()=>pge);WW(GW,"useIsSSR",()=>pEt);const W$={prefix:String(Math.round(Math.random()*1e10)),current:0},G$=Or.createContext(W$);function dEt(t){let e=Y.exports.useContext(G$),r=Y.exports.useMemo(()=>({prefix:e===W$?"":`${e.prefix}-${++e.current}`,current:0}),[e]);return Or.createElement(G$.Provider,{value:r},t.children)}let hEt=Boolean(typeof window!="undefined"&&window.document&&window.document.createElement);function pge(t){let e=Y.exports.useContext(G$);return e===W$&&!hEt&&console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server."),Y.exports.useMemo(()=>t||`react-aria${e.prefix}-${++e.current}`,[t])}function pEt(){let e=Y.exports.useContext(G$)!==W$,[r,n]=Y.exports.useState(e);return typeof window!="undefined"&&e&&Y.exports.useLayoutEffect(()=>{n(!1)},[]),r}function q$(t,e,r,n){Object.defineProperty(t,e,{get:r,set:n,enumerable:!0,configurable:!0})}var mEt={};q$(mEt,"useControlledState",()=>gEt);function gEt(t,e,r){let[n,i]=Y.exports.useState(t||e),o=Y.exports.useRef(t!==void 0),a=o.current,s=t!==void 0,l=Y.exports.useRef(n);a!==s&&console.warn(`WARN: A component changed from ${a?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}.`),o.current=s;let u=Y.exports.useCallback((p,...m)=>{let v=(x,...y)=>{r&&(Object.is(l.current,x)||r(x,...y)),s||(l.current=x)};typeof p=="function"?(console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320"),i((y,..._)=>{let w=p(s?l.current:y,..._);return v(w,...m),s?y:w})):(s||i(p),v(p,...m))},[s,r]);return s?l.current=t:t=n,[t,u]}var qW={};q$(qW,"clamp",()=>mge);q$(qW,"snapValueToStep",()=>gge);q$(qW,"toFixedNumber",()=>vEt);function mge(t,e=-1/0,r=1/0){return Math.min(Math.max(t,e),r)}function gge(t,e,r,n){let i=(t-(isNaN(e)?0:e))%n,o=Math.abs(i)*2>=n?t+Math.sign(i)*(n-Math.abs(i)):t-i;isNaN(e)?!isNaN(r)&&o>r&&(o=Math.floor(r/n)*n):o<e?o=e:!isNaN(r)&&o>r&&(o=e+Math.floor((r-e)/n)*n);let a=n.toString(),s=a.indexOf("."),l=s>=0?a.length-s:0;if(l>0){let u=Math.pow(10,l);o=Math.round(o*u)/u}return o}function vEt(t,e,r=10){const n=Math.pow(r,e);return Math.round(t*n)/n}function qo(t,e,r,n){Object.defineProperty(t,e,{get:r,set:n,enumerable:!0,configurable:!0})}var XW={};qo(XW,"useId",()=>YW);qo(XW,"mergeIds",()=>vge);qo(XW,"useSlotId",()=>xEt);var yEt={};qo(yEt,"useLayoutEffect",()=>Op);const Op=typeof window!="undefined"?Or.useLayoutEffect:()=>{};let X$=new Map;function YW(t){let[e,r]=Y.exports.useState(t),n=Y.exports.useRef(null),i=pge(e),o=Y.exports.useCallback(a=>{n.current=a},[]);return X$.set(i,o),Op(()=>{let a=i;return()=>{X$.delete(a)}},[i]),Y.exports.useEffect(()=>{let a=n.current;a&&(n.current=null,r(a))}),i}function vge(t,e){if(t===e)return t;let r=X$.get(t);if(r)return r(e),e;let n=X$.get(e);return n?(n(t),t):e}function xEt(t=[]){let e=YW(),[r,n]=Ige(e),i=Y.exports.useCallback(()=>{n(function*(){yield e,yield document.getElementById(e)?e:null})},[e,n]);return Op(i,[e,i,...t]),r}var _Et={};qo(_Et,"chain",()=>yge);function yge(...t){return(...e)=>{for(let r of t)typeof r=="function"&&r(...e)}}var bEt={};qo(bEt,"mergeProps",()=>Jy);function Jy(...t){let e=io({},t[0]);for(let r=1;r<t.length;r++){let n=t[r];for(let i in n){let o=e[i],a=n[i];typeof o=="function"&&typeof a=="function"&&i[0]==="o"&&i[1]==="n"&&i.charCodeAt(2)>=65&&i.charCodeAt(2)<=90?e[i]=yge(o,a):(i==="className"||i==="UNSAFE_className")&&typeof o=="string"&&typeof a=="string"?e[i]=Lr(o,a):i==="id"&&o&&a?e.id=vge(o,a):e[i]=a!==void 0?a:o}}return e}var wEt={};qo(wEt,"mergeRefs",()=>CEt);function CEt(...t){return e=>{for(let r of t)typeof r=="function"?r(e):r!=null&&(r.current=e)}}var EEt={};qo(EEt,"filterDOMProps",()=>IEt);const SEt=new Set(["id"]),TEt=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),PEt=/^(data-.*)$/;function IEt(t,e={}){let{labelable:r,propNames:n}=e,i={};for(const o in t)Object.prototype.hasOwnProperty.call(t,o)&&(SEt.has(o)||r&&TEt.has(o)||(n==null?void 0:n.has(o))||PEt.test(o))&&(i[o]=t[o]);return i}var MEt={};qo(MEt,"focusWithoutScrolling",()=>Qb);function Qb(t){if(AEt())t.focus({preventScroll:!0});else{let e=REt(t);t.focus(),kEt(e)}}let Y$=null;function AEt(){if(Y$==null){Y$=!1;try{var t=document.createElement("div");t.focus({get preventScroll(){return Y$=!0,!0}})}catch{}}return Y$}function REt(t){for(var e=t.parentNode,r=[],n=document.scrollingElement||document.documentElement;e instanceof HTMLElement&&e!==n;)(e.offsetHeight<e.scrollHeight||e.offsetWidth<e.scrollWidth)&&r.push({element:e,scrollTop:e.scrollTop,scrollLeft:e.scrollLeft}),e=e.parentNode;return n instanceof HTMLElement&&r.push({element:n,scrollTop:n.scrollTop,scrollLeft:n.scrollLeft}),r}function kEt(t){for(let{element:e,scrollTop:r,scrollLeft:n}of t)e.scrollTop=r,e.scrollLeft=n}var OEt={};qo(OEt,"getOffset",()=>xge);function xge(t,e,r="horizontal"){let n=t.getBoundingClientRect();return e?r==="horizontal"?n.right:n.bottom:r==="horizontal"?n.left:n.top}var _ge={};qo(_ge,"clamp",()=>mge);qo(_ge,"snapValueToStep",()=>gge);var LEt={};qo(LEt,"runAfterTransition",()=>ZW);let lS=new Map,KW=new Set;function bge(){if(typeof window=="undefined")return;let t=r=>{let n=lS.get(r.target);n||(n=new Set,lS.set(r.target,n),r.target.addEventListener("transitioncancel",e)),n.add(r.propertyName)},e=r=>{let n=lS.get(r.target);if(!!n&&(n.delete(r.propertyName),n.size===0&&(r.target.removeEventListener("transitioncancel",e),lS.delete(r.target)),lS.size===0)){for(let i of KW)i();KW.clear()}};document.body.addEventListener("transitionrun",t),document.body.addEventListener("transitionend",e)}typeof document!="undefined"&&(document.readyState!=="loading"?bge():document.addEventListener("DOMContentLoaded",bge));function ZW(t){requestAnimationFrame(()=>{lS.size===0?t():KW.add(t)})}var DEt={};qo(DEt,"useDrag1D",()=>NEt);const K$=[];function NEt(t){console.warn("useDrag1D is deprecated, please use `useMove` instead https://react-spectrum.adobe.com/react-aria/useMove.html");let{containerRef:e,reverse:r,orientation:n,onHover:i,onDrag:o,onPositionChange:a,onIncrement:s,onDecrement:l,onIncrementToMax:u,onDecrementToMin:p,onCollapseToggle:m}=t,v=Z=>n==="horizontal"?Z.clientX:Z.clientY,x=Z=>{let W=xge(e.current,r,n),D=v(Z);return r?W-D:D-W},y=Y.exports.useRef(!1),_=Y.exports.useRef(0),w=Y.exports.useRef({onPositionChange:a,onDrag:o});w.current.onDrag=o,w.current.onPositionChange=a;let C=Z=>{Z.preventDefault();let W=x(Z);y.current||(y.current=!0,w.current.onDrag&&w.current.onDrag(!0),w.current.onPositionChange&&w.current.onPositionChange(W)),_.current!==W&&(_.current=W,a&&a(W))},E=Z=>{const W=Z.target;y.current=!1;let D=x(Z);w.current.onDrag&&w.current.onDrag(!1),w.current.onPositionChange&&w.current.onPositionChange(D),K$.splice(K$.indexOf(W),1),window.removeEventListener("mouseup",E,!1),window.removeEventListener("mousemove",C,!1)};return{onMouseDown:Z=>{const W=Z.currentTarget;K$.some(D=>W.contains(D))||(K$.push(W),window.addEventListener("mousemove",C,!1),window.addEventListener("mouseup",E,!1))},onMouseEnter:()=>{i&&i(!0)},onMouseOut:()=>{i&&i(!1)},onKeyDown:Z=>{switch(Z.key){case"Left":case"ArrowLeft":n==="horizontal"&&(Z.preventDefault(),l&&!r?l():s&&r&&s());break;case"Up":case"ArrowUp":n==="vertical"&&(Z.preventDefault(),l&&!r?l():s&&r&&s());break;case"Right":case"ArrowRight":n==="horizontal"&&(Z.preventDefault(),s&&!r?s():l&&r&&l());break;case"Down":case"ArrowDown":n==="vertical"&&(Z.preventDefault(),s&&!r?s():l&&r&&l());break;case"Home":Z.preventDefault(),p&&p();break;case"End":Z.preventDefault(),u&&u();break;case"Enter":Z.preventDefault(),m&&m();break}}}}var $Et={};qo($Et,"useGlobalListeners",()=>Z$);function Z$(){let t=Y.exports.useRef(new Map),e=Y.exports.useCallback((i,o,a,s)=>{let l=(s==null?void 0:s.once)?(...u)=>{t.current.delete(a),a(...u)}:a;t.current.set(a,{type:o,eventTarget:i,fn:l,options:s}),i.addEventListener(o,a,s)},[]),r=Y.exports.useCallback((i,o,a,s)=>{var l;let u=((l=t.current.get(a))===null||l===void 0?void 0:l.fn)||a;i.removeEventListener(o,u,s),t.current.delete(a)},[]),n=Y.exports.useCallback(()=>{t.current.forEach((i,o)=>{r(i.eventTarget,i.type,o,i.options)})},[r]);return Y.exports.useEffect(()=>n,[n]),{addGlobalListener:e,removeGlobalListener:r,removeAllGlobalListeners:n}}var FEt={};qo(FEt,"useLabels",()=>zEt);function zEt(t,e){let{id:r,"aria-label":n,"aria-labelledby":i}=t;return r=YW(r),i&&n?i=[...new Set([...i.trim().split(/\s+/),r])].join(" "):i&&(i=i.trim().split(/\s+/).join(" ")),!n&&!i&&e&&(n=e),{id:r,"aria-label":n,"aria-labelledby":i}}var BEt={};qo(BEt,"useObjectRef",()=>jEt);function jEt(t){const e=Y.exports.useRef();return Op(()=>{!t||(typeof t=="function"?t(e.current):t.current=e.current)},[t]),e}var UEt={};qo(UEt,"useUpdateEffect",()=>VEt);function VEt(t,e){const r=Y.exports.useRef(!0);Y.exports.useEffect(()=>{r.current?r.current=!1:t()},e)}var HEt={};qo(HEt,"useResizeObserver",()=>GEt);function WEt(){return typeof window.ResizeObserver!="undefined"}function GEt(t){const{ref:e,onResize:r}=t;Y.exports.useEffect(()=>{let n=e==null?void 0:e.current;if(!!n)if(WEt()){const i=new window.ResizeObserver(o=>{!o.length||r()});return i.observe(n),()=>{n&&i.unobserve(n)}}else return window.addEventListener("resize",r,!1),()=>{window.removeEventListener("resize",r,!1)}},[r,e])}var qEt={};qo(qEt,"useSyncRef",()=>Q$);function Q$(t,e){Op(()=>{if(t&&t.ref&&e)return t.ref.current=e.current,()=>{t.ref.current=null}},[t,e])}var XEt={};qo(XEt,"getScrollParent",()=>YEt);function YEt(t){for(;t&&!KEt(t);)t=t.parentElement;return t||document.scrollingElement||document.documentElement}function KEt(t){let e=window.getComputedStyle(t);return/(auto|scroll)/.test(e.overflow+e.overflowX+e.overflowY)}var ZEt={};qo(ZEt,"useViewportSize",()=>QEt);let wv=typeof window!="undefined"&&window.visualViewport;function QEt(){let[t,e]=Y.exports.useState(()=>wge());return Y.exports.useEffect(()=>{let r=()=>{e(n=>{let i=wge();return i.width===n.width&&i.height===n.height?n:i})};return wv?wv.addEventListener("resize",r):window.addEventListener("resize",r),()=>{wv?wv.removeEventListener("resize",r):window.removeEventListener("resize",r)}},[]),t}function wge(){return{width:(wv==null?void 0:wv.width)||window.innerWidth,height:(wv==null?void 0:wv.height)||window.innerHeight}}var JEt={};qo(JEt,"useDescription",()=>Cge);let eSt=0;const QW=new Map;function Cge(t){let[e,r]=Y.exports.useState(null);return Op(()=>{if(!t)return;let n=QW.get(t);if(n)r(n.element.id);else{let i=`react-aria-description-${eSt++}`;r(i);let o=document.createElement("div");o.id=i,o.style.display="none",o.textContent=t,document.body.appendChild(o),n={refCount:0,element:o},QW.set(t,n)}return n.refCount++,()=>{--n.refCount==0&&(n.element.remove(),QW.delete(t))}},[t]),{"aria-describedby":t?e:void 0}}var b_={};qo(b_,"isMac",()=>J$);qo(b_,"isIPhone",()=>Ege);qo(b_,"isIPad",()=>Sge);qo(b_,"isIOS",()=>e4);qo(b_,"isAppleDevice",()=>tSt);qo(b_,"isWebKit",()=>rSt);qo(b_,"isChrome",()=>Tge);qo(b_,"isAndroid",()=>nSt);function JW(t){var e;return typeof window=="undefined"||window.navigator==null?!1:((e=window.navigator.userAgentData)===null||e===void 0?void 0:e.brands.some(r=>t.test(r.brand)))||t.test(window.navigator.userAgent)}function eG(t){return typeof window!="undefined"&&window.navigator!=null?t.test((window.navigator.userAgentData||window.navigator).platform):!1}function J$(){return eG(/^Mac/i)}function Ege(){return eG(/^iPhone/i)}function Sge(){return eG(/^iPad/i)||J$()&&navigator.maxTouchPoints>1}function e4(){return Ege()||Sge()}function tSt(){return J$()||e4()}function rSt(){return JW(/AppleWebKit/i)&&!Tge()}function Tge(){return JW(/Chrome/i)}function nSt(){return JW(/Android/i)}var iSt={};qo(iSt,"useEvent",()=>Pge);function Pge(t,e,r,n){let i=Y.exports.useRef(r);i.current=r;let o=r==null;Y.exports.useEffect(()=>{if(o)return;let a=t.current,s=l=>i.current.call(this,l);return a.addEventListener(e,s,n),()=>{a.removeEventListener(e,s,n)}},[t,e,n,o])}var oSt={};qo(oSt,"useValueEffect",()=>Ige);function Ige(t){let[e,r]=Y.exports.useState(t),n=Y.exports.useRef(e),i=Y.exports.useRef(null);n.current=e;let o=Y.exports.useRef(null);o.current=()=>{let s=i.current.next();if(s.done){i.current=null;return}e===s.value?o.current():r(s.value)},Op(()=>{i.current&&o.current()});let a=Y.exports.useCallback(s=>{i.current=s(n.current),o.current()},[i,o]);return[e,a]}var sSt={};qo(sSt,"scrollIntoView",()=>aSt);function aSt(t,e){let r=Mge(t,e,"left"),n=Mge(t,e,"top"),i=e.offsetWidth,o=e.offsetHeight,a=t.scrollLeft,s=t.scrollTop,l=a+t.offsetWidth,u=s+t.offsetHeight;r<=a?a=r:r+i>l&&(a+=r+i-l),n<=s?s=n:n+o>u&&(s+=n+o-u),t.scrollLeft=a,t.scrollTop=s}function Mge(t,e,r){const n=r==="left"?"offsetLeft":"offsetTop";let i=0;for(;e.offsetParent&&(i+=e[n],e.offsetParent!==t);){if(e.offsetParent.contains(t)){i-=t[n];break}e=e.offsetParent}return i}function tu(t,e,r,n){Object.defineProperty(t,e,{get:r,set:n,enumerable:!0,configurable:!0})}var lSt={};tu(lSt,"Pressable",()=>gSt);var cSt={};tu(cSt,"usePress",()=>iG);let cS="default",tG="",t4=new WeakMap;function rG(t){e4()?(cS==="default"&&(tG=document.documentElement.style.webkitUserSelect,document.documentElement.style.webkitUserSelect="none"),cS="disabled"):t&&(t4.set(t,t.style.userSelect),t.style.userSelect="none")}function LA(t){if(e4()){if(cS!=="disabled")return;cS="restoring",setTimeout(()=>{ZW(()=>{cS==="restoring"&&(document.documentElement.style.webkitUserSelect==="none"&&(document.documentElement.style.webkitUserSelect=tG||""),tG="",cS="default")})},300)}else if(t&&t4.has(t)){let e=t4.get(t);t.style.userSelect==="none"&&(t.style.userSelect=e),t.getAttribute("style")===""&&t.removeAttribute("style"),t4.delete(t)}}function nG(t){return t.mozInputSource===0&&t.isTrusted?!0:t.detail===0&&!t.pointerType}class uSt{isDefaultPrevented(){return this.nativeEvent.defaultPrevented}preventDefault(){this.defaultPrevented=!0,this.nativeEvent.preventDefault()}stopPropagation(){this.nativeEvent.stopPropagation(),this.isPropagationStopped=()=>!0}isPropagationStopped(){return!1}persist(){}constructor(e,r){this.nativeEvent=r,this.target=r.target,this.currentTarget=r.currentTarget,this.relatedTarget=r.relatedTarget,this.bubbles=r.bubbles,this.cancelable=r.cancelable,this.defaultPrevented=r.defaultPrevented,this.eventPhase=r.eventPhase,this.isTrusted=r.isTrusted,this.timeStamp=r.timeStamp,this.type=e}}function Age(t){let e=Y.exports.useRef({isFocused:!1,onBlur:t,observer:null});return e.current.onBlur=t,Op(()=>{const r=e.current;return()=>{r.observer&&(r.observer.disconnect(),r.observer=null)}},[]),Y.exports.useCallback(r=>{if(r.target instanceof HTMLButtonElement||r.target instanceof HTMLInputElement||r.target instanceof HTMLTextAreaElement||r.target instanceof HTMLSelectElement){e.current.isFocused=!0;let n=r.target,i=o=>{var a,s;e.current.isFocused=!1,n.disabled&&((s=(a=e.current).onBlur)===null||s===void 0||s.call(a,new uSt("blur",o))),e.current.observer&&(e.current.observer.disconnect(),e.current.observer=null)};n.addEventListener("focusout",i,{once:!0}),e.current.observer=new MutationObserver(()=>{e.current.isFocused&&n.disabled&&(e.current.observer.disconnect(),n.dispatchEvent(new FocusEvent("blur")),n.dispatchEvent(new FocusEvent("focusout",{bubbles:!0})))}),e.current.observer.observe(n,{attributes:!0,attributeFilter:["disabled"]})}},[])}const r4=Or.createContext(null);r4.displayName="PressResponderContext";function fSt(t){let e=Y.exports.useContext(r4);if(e){let r=e,{register:n}=r,i=z0(r,["register"]);t=Jy(i,t),n()}return Q$(e,t.ref),t}function iG(t){let A=fSt(t),{onPress:e,onPressChange:r,onPressStart:n,onPressEnd:i,onPressUp:o,isDisabled:a,isPressed:s,preventFocusOnPress:l,shouldCancelOnPointerExit:u,allowTextSelectionOnPress:p,ref:m}=A,v=z0(A,["onPress","onPressChange","onPressStart","onPressEnd","onPressUp","isDisabled","isPressed","preventFocusOnPress","shouldCancelOnPointerExit","allowTextSelectionOnPress","ref"]),x=Y.exports.useRef(null);x.current={onPress:e,onPressChange:r,onPressStart:n,onPressEnd:i,onPressUp:o,isDisabled:a,shouldCancelOnPointerExit:u};let[y,_]=Y.exports.useState(!1),w=Y.exports.useRef({isPressed:!1,ignoreEmulatedMouseEvents:!1,ignoreClickAfterPress:!1,didFirePressStart:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null}),{addGlobalListener:C,removeAllGlobalListeners:E}=Z$(),T=Y.exports.useMemo(()=>{let k=w.current,X=(j,$)=>{let{onPressStart:z,onPressChange:O,isDisabled:F}=x.current;F||k.didFirePressStart||(z&&z({type:"pressstart",pointerType:$,target:j.currentTarget,shiftKey:j.shiftKey,metaKey:j.metaKey,ctrlKey:j.ctrlKey,altKey:j.altKey}),O&&O(!0),k.didFirePressStart=!0,_(!0))},Z=(j,$,z=!0)=>{let{onPressEnd:O,onPressChange:F,onPress:G,isDisabled:q}=x.current;!k.didFirePressStart||(k.ignoreClickAfterPress=!0,k.didFirePressStart=!1,O&&O({type:"pressend",pointerType:$,target:j.currentTarget,shiftKey:j.shiftKey,metaKey:j.metaKey,ctrlKey:j.ctrlKey,altKey:j.altKey}),F&&F(!1),_(!1),G&&z&&!q&&G({type:"press",pointerType:$,target:j.currentTarget,shiftKey:j.shiftKey,metaKey:j.metaKey,ctrlKey:j.ctrlKey,altKey:j.altKey}))},W=(j,$)=>{let{onPressUp:z,isDisabled:O}=x.current;O||z&&z({type:"pressup",pointerType:$,target:j.currentTarget,shiftKey:j.shiftKey,metaKey:j.metaKey,ctrlKey:j.ctrlKey,altKey:j.altKey})},D=j=>{k.isPressed&&(k.isOverTarget&&Z(e0(k.target,j),k.pointerType,!1),k.isPressed=!1,k.isOverTarget=!1,k.activePointerId=null,k.pointerType=null,E(),p||LA(k.target))},H={onKeyDown(j){oG(j.nativeEvent)&&j.currentTarget.contains(j.target)&&(Oge(j.target)&&j.preventDefault(),j.stopPropagation(),!k.isPressed&&!j.repeat&&(k.target=j.currentTarget,k.isPressed=!0,X(j,"keyboard"),C(document,"keyup",N,!1)))},onKeyUp(j){oG(j.nativeEvent)&&!j.repeat&&j.currentTarget.contains(j.target)&&W(e0(k.target,j),"keyboard")},onClick(j){j&&!j.currentTarget.contains(j.target)||j&&j.button===0&&(j.stopPropagation(),a&&j.preventDefault(),!k.ignoreClickAfterPress&&!k.ignoreEmulatedMouseEvents&&(k.pointerType==="virtual"||nG(j.nativeEvent))&&(!a&&!l&&Qb(j.currentTarget),X(j,"virtual"),W(j,"virtual"),Z(j,"virtual")),k.ignoreEmulatedMouseEvents=!1,k.ignoreClickAfterPress=!1)}},N=j=>{if(k.isPressed&&oG(j)){Oge(j.target)&&j.preventDefault(),j.stopPropagation(),k.isPressed=!1;let $=j.target;Z(e0(k.target,j),"keyboard",k.target.contains($)),E(),(k.target.contains($)&&Rge(k.target)||k.target.getAttribute("role")==="link")&&k.target.click()}};if(typeof PointerEvent!="undefined"){H.onPointerDown=O=>{if(!(O.button!==0||!O.currentTarget.contains(O.target))){if(mSt(O.nativeEvent)){k.pointerType="virtual";return}sG(O.currentTarget)&&O.preventDefault(),k.pointerType=O.pointerType,O.stopPropagation(),k.isPressed||(k.isPressed=!0,k.isOverTarget=!0,k.activePointerId=O.pointerId,k.target=O.currentTarget,!a&&!l&&Qb(O.currentTarget),p||rG(k.target),X(O,k.pointerType),C(document,"pointermove",j,!1),C(document,"pointerup",$,!1),C(document,"pointercancel",z,!1))}},H.onMouseDown=O=>{!O.currentTarget.contains(O.target)||O.button===0&&(sG(O.currentTarget)&&O.preventDefault(),O.stopPropagation())},H.onPointerUp=O=>{!O.currentTarget.contains(O.target)||k.pointerType==="virtual"||O.button===0&&uS(O,O.currentTarget)&&W(O,k.pointerType||O.pointerType)};let j=O=>{O.pointerId===k.activePointerId&&(uS(O,k.target)?k.isOverTarget||(k.isOverTarget=!0,X(e0(k.target,O),k.pointerType)):k.isOverTarget&&(k.isOverTarget=!1,Z(e0(k.target,O),k.pointerType,!1),x.current.shouldCancelOnPointerExit&&D(O)))},$=O=>{O.pointerId===k.activePointerId&&k.isPressed&&O.button===0&&(uS(O,k.target)?Z(e0(k.target,O),k.pointerType):k.isOverTarget&&Z(e0(k.target,O),k.pointerType,!1),k.isPressed=!1,k.isOverTarget=!1,k.activePointerId=null,k.pointerType=null,E(),p||LA(k.target))},z=O=>{D(O)};H.onDragStart=O=>{!O.currentTarget.contains(O.target)||D(O)}}else{H.onMouseDown=z=>{z.button!==0||!z.currentTarget.contains(z.target)||(sG(z.currentTarget)&&z.preventDefault(),z.stopPropagation(),!k.ignoreEmulatedMouseEvents&&(k.isPressed=!0,k.isOverTarget=!0,k.target=z.currentTarget,k.pointerType=nG(z.nativeEvent)?"virtual":"mouse",!a&&!l&&Qb(z.currentTarget),X(z,k.pointerType),C(document,"mouseup",j,!1)))},H.onMouseEnter=z=>{!z.currentTarget.contains(z.target)||(z.stopPropagation(),k.isPressed&&!k.ignoreEmulatedMouseEvents&&(k.isOverTarget=!0,X(z,k.pointerType)))},H.onMouseLeave=z=>{!z.currentTarget.contains(z.target)||(z.stopPropagation(),k.isPressed&&!k.ignoreEmulatedMouseEvents&&(k.isOverTarget=!1,Z(z,k.pointerType,!1),x.current.shouldCancelOnPointerExit&&D(z)))},H.onMouseUp=z=>{!z.currentTarget.contains(z.target)||!k.ignoreEmulatedMouseEvents&&z.button===0&&W(z,k.pointerType)};let j=z=>{if(z.button===0){if(k.isPressed=!1,E(),k.ignoreEmulatedMouseEvents){k.ignoreEmulatedMouseEvents=!1;return}uS(z,k.target)?Z(e0(k.target,z),k.pointerType):k.isOverTarget&&Z(e0(k.target,z),k.pointerType,!1),k.isOverTarget=!1}};H.onTouchStart=z=>{if(!z.currentTarget.contains(z.target))return;z.stopPropagation();let O=dSt(z.nativeEvent);!O||(k.activePointerId=O.identifier,k.ignoreEmulatedMouseEvents=!0,k.isOverTarget=!0,k.isPressed=!0,k.target=z.currentTarget,k.pointerType="touch",!a&&!l&&Qb(z.currentTarget),p||rG(k.target),X(z,k.pointerType),C(window,"scroll",$,!0))},H.onTouchMove=z=>{if(!z.currentTarget.contains(z.target)||(z.stopPropagation(),!k.isPressed))return;let O=kge(z.nativeEvent,k.activePointerId);O&&uS(O,z.currentTarget)?k.isOverTarget||(k.isOverTarget=!0,X(z,k.pointerType)):k.isOverTarget&&(k.isOverTarget=!1,Z(z,k.pointerType,!1),x.current.shouldCancelOnPointerExit&&D(z))},H.onTouchEnd=z=>{if(!z.currentTarget.contains(z.target)||(z.stopPropagation(),!k.isPressed))return;let O=kge(z.nativeEvent,k.activePointerId);O&&uS(O,z.currentTarget)?(W(z,k.pointerType),Z(z,k.pointerType)):k.isOverTarget&&Z(z,k.pointerType,!1),k.isPressed=!1,k.activePointerId=null,k.isOverTarget=!1,k.ignoreEmulatedMouseEvents=!0,p||LA(k.target),E()},H.onTouchCancel=z=>{!z.currentTarget.contains(z.target)||(z.stopPropagation(),k.isPressed&&D(z))};let $=z=>{k.isPressed&&z.target.contains(k.target)&&D({currentTarget:k.target,shiftKey:!1,ctrlKey:!1,metaKey:!1,altKey:!1})};H.onDragStart=z=>{!z.currentTarget.contains(z.target)||D(z)}}return H},[C,a,l,E,p]);return Y.exports.useEffect(()=>()=>{p||LA(w.current.target)},[p]),{isPressed:s||y,pressProps:Jy(v,T)}}function Rge(t){return t.tagName==="A"&&t.hasAttribute("href")}function oG(t){const{key:e,code:r,target:n}=t,i=n,{tagName:o,isContentEditable:a}=i,s=i.getAttribute("role");return(e==="Enter"||e===" "||e==="Spacebar"||r==="Space")&&o!=="INPUT"&&o!=="TEXTAREA"&&a!==!0&&(!Rge(i)||s==="button"&&e!=="Enter")&&!(s==="link"&&e!=="Enter")}function dSt(t){const{targetTouches:e}=t;return e.length>0?e[0]:null}function kge(t,e){const r=t.changedTouches;for(let n=0;n<r.length;n++){const i=r[n];if(i.identifier===e)return i}return null}function e0(t,e){return{currentTarget:t,shiftKey:e.shiftKey,ctrlKey:e.ctrlKey,metaKey:e.metaKey,altKey:e.altKey}}function hSt(t){let e=t.width/2||t.radiusX||0,r=t.height/2||t.radiusY||0;return{top:t.clientY-r,right:t.clientX+e,bottom:t.clientY+r,left:t.clientX-e}}function pSt(t,e){return!(t.left>e.right||e.left>t.right||t.top>e.bottom||e.top>t.bottom)}function uS(t,e){let r=e.getBoundingClientRect(),n=hSt(t);return pSt(r,n)}function sG(t){return!t.draggable}function Oge(t){return!((t.tagName==="INPUT"||t.tagName==="BUTTON")&&t.type==="submit")}function mSt(t){return t.width===0&&t.height===0||t.width===1&&t.height===1&&t.pressure===0&&t.detail===0&&t.pointerType==="mouse"}const gSt=Or.forwardRef((n,r)=>{var i=n,{children:t}=i,e=z0(i,["children"]);let o=Y.exports.useRef();r=r!=null?r:o;let{pressProps:a}=iG(ul(io({},e),{ref:r})),s=Or.Children.only(t);return Or.cloneElement(s,io({ref:r},Jy(s.props,a)))});var vSt={};tu(vSt,"PressResponder",()=>ySt);const ySt=Or.forwardRef((n,r)=>{var i=n,{children:t}=i,e=z0(i,["children"]);let o=Y.exports.useRef(!1),a=Y.exports.useContext(r4),s=Jy(a||{},ul(io({},e),{ref:r||(a==null?void 0:a.ref),register(){o.current=!0,a&&a.register()}}));return Q$(a,r),Y.exports.useEffect(()=>{o.current||console.warn("A PressResponder was rendered without a pressable child. Either call the usePress hook, or wrap your DOM node with <Pressable> component.")},[]),Or.createElement(r4.Provider,{value:s},t)});var xSt={};tu(xSt,"useFocus",()=>aG);function aG(t){let{isDisabled:e,onFocus:r,onBlur:n,onFocusChange:i}=t;const o=Y.exports.useCallback(l=>{if(l.target===l.currentTarget)return n&&n(l),i&&i(!1),!0},[n,i]),a=Age(o),s=Y.exports.useCallback(l=>{l.target===l.currentTarget&&(r&&r(l),i&&i(!0),a(l))},[i,r,a]);return{focusProps:{onFocus:!e&&(r||i||n)?s:void 0,onBlur:!e&&(n||i)?o:null}}}var fS={};tu(fS,"isFocusVisible",()=>o4);tu(fS,"getInteractionModality",()=>Nge);tu(fS,"setInteractionModality",()=>SSt);tu(fS,"useInteractionModality",()=>TSt);tu(fS,"useFocusVisible",()=>ISt);tu(fS,"useFocusVisibleListener",()=>cG);let t0=null,DA=new Set,Lge=!1,Jb=!1,lG=!1;const _St={Tab:!0,Escape:!0};function n4(t,e){for(let r of DA)r(t,e)}function bSt(t){return!(t.metaKey||!J$()&&t.altKey||t.ctrlKey||t.key==="Control"||t.key==="Shift"||t.key==="Meta")}function Dge(t){Jb=!0,bSt(t)&&(t0="keyboard",n4("keyboard",t))}function dS(t){t0="pointer",(t.type==="mousedown"||t.type==="pointerdown")&&(Jb=!0,n4("pointer",t))}function wSt(t){nG(t)&&(Jb=!0,t0="virtual")}function CSt(t){t.target===window||t.target===document||(!Jb&&!lG&&(t0="virtual",n4("virtual",t)),Jb=!1,lG=!1)}function ESt(){Jb=!1,lG=!0}function i4(){if(typeof window=="undefined"||Lge)return;let t=HTMLElement.prototype.focus;HTMLElement.prototype.focus=function(){Jb=!0,t.apply(this,arguments)},document.addEventListener("keydown",Dge,!0),document.addEventListener("keyup",Dge,!0),document.addEventListener("click",wSt,!0),window.addEventListener("focus",CSt,!0),window.addEventListener("blur",ESt,!1),typeof PointerEvent!="undefined"?(document.addEventListener("pointerdown",dS,!0),document.addEventListener("pointermove",dS,!0),document.addEventListener("pointerup",dS,!0)):(document.addEventListener("mousedown",dS,!0),document.addEventListener("mousemove",dS,!0),document.addEventListener("mouseup",dS,!0)),Lge=!0}typeof document!="undefined"&&(document.readyState!=="loading"?i4():document.addEventListener("DOMContentLoaded",i4));function o4(){return t0!=="pointer"}function Nge(){return t0}function SSt(t){t0=t,n4(t,null)}function TSt(){i4();let[t,e]=Y.exports.useState(t0);return Y.exports.useEffect(()=>{let r=()=>{e(t0)};return DA.add(r),()=>{DA.delete(r)}},[]),t}function PSt(t,e,r){return!(t&&e==="keyboard"&&r instanceof KeyboardEvent&&!_St[r.key])}function ISt(t={}){let{isTextInput:e,autoFocus:r}=t,[n,i]=Y.exports.useState(r||o4());return cG(o=>{i(o)},[e],{isTextInput:e}),{isFocusVisible:n}}function cG(t,e,r){i4(),Y.exports.useEffect(()=>{let n=(i,o)=>{!PSt(r==null?void 0:r.isTextInput,i,o)||t(o4())};return DA.add(n),()=>{DA.delete(n)}},e)}var MSt={};tu(MSt,"useFocusWithin",()=>$ge);function $ge(t){let{isDisabled:e,onBlurWithin:r,onFocusWithin:n,onFocusWithinChange:i}=t,o=Y.exports.useRef({isFocusWithin:!1}),a=Y.exports.useCallback(u=>{o.current.isFocusWithin&&!u.currentTarget.contains(u.relatedTarget)&&(o.current.isFocusWithin=!1,r&&r(u),i&&i(!1))},[r,i,o]),s=Age(a),l=Y.exports.useCallback(u=>{o.current.isFocusWithin||(n&&n(u),i&&i(!0),o.current.isFocusWithin=!0,s(u))},[n,i,s]);return e?{focusWithinProps:{onFocus:null,onBlur:null}}:{focusWithinProps:{onFocus:l,onBlur:a}}}var ASt={};tu(ASt,"useHover",()=>kSt);let s4=!1,uG=0;function fG(){s4=!0,setTimeout(()=>{s4=!1},50)}function Fge(t){t.pointerType==="touch"&&fG()}function RSt(){if(typeof document!="undefined")return typeof PointerEvent!="undefined"?document.addEventListener("pointerup",Fge):document.addEventListener("touchend",fG),uG++,()=>{uG--,!(uG>0)&&(typeof PointerEvent!="undefined"?document.removeEventListener("pointerup",Fge):document.removeEventListener("touchend",fG))}}function kSt(t){let{onHoverStart:e,onHoverChange:r,onHoverEnd:n,isDisabled:i}=t,[o,a]=Y.exports.useState(!1),s=Y.exports.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;Y.exports.useEffect(RSt,[]);let{hoverProps:l,triggerHoverEnd:u}=Y.exports.useMemo(()=>{let p=(x,y)=>{if(s.pointerType=y,i||y==="touch"||s.isHovered||!x.currentTarget.contains(x.target))return;s.isHovered=!0;let _=x.currentTarget;s.target=_,e&&e({type:"hoverstart",target:_,pointerType:y}),r&&r(!0),a(!0)},m=(x,y)=>{if(s.pointerType="",s.target=null,y==="touch"||!s.isHovered)return;s.isHovered=!1;let _=x.currentTarget;n&&n({type:"hoverend",target:_,pointerType:y}),r&&r(!1),a(!1)},v={};return typeof PointerEvent!="undefined"?(v.onPointerEnter=x=>{s4&&x.pointerType==="mouse"||p(x,x.pointerType)},v.onPointerLeave=x=>{!i&&x.currentTarget.contains(x.target)&&m(x,x.pointerType)}):(v.onTouchStart=()=>{s.ignoreEmulatedMouseEvents=!0},v.onMouseEnter=x=>{!s.ignoreEmulatedMouseEvents&&!s4&&p(x,"mouse"),s.ignoreEmulatedMouseEvents=!1},v.onMouseLeave=x=>{!i&&x.currentTarget.contains(x.target)&&m(x,"mouse")}),{hoverProps:v,triggerHoverEnd:m}},[e,r,n,i,s]);return Y.exports.useEffect(()=>{i&&u({currentTarget:s.target},s.pointerType)},[i]),{hoverProps:l,isHovered:o}}var OSt={};tu(OSt,"useInteractOutside",()=>LSt);function LSt(t){let{ref:e,onInteractOutside:r,isDisabled:n,onInteractOutsideStart:i}=t,a=Y.exports.useRef({isPointerDown:!1,ignoreEmulatedMouseEvents:!1,onInteractOutside:r,onInteractOutsideStart:i}).current;a.onInteractOutside=r,a.onInteractOutsideStart=i,Y.exports.useEffect(()=>{if(n)return;let s=l=>{a4(l,e)&&a.onInteractOutside&&(a.onInteractOutsideStart&&a.onInteractOutsideStart(l),a.isPointerDown=!0)};if(typeof PointerEvent!="undefined"){let l=u=>{a.isPointerDown&&a.onInteractOutside&&a4(u,e)&&(a.isPointerDown=!1,a.onInteractOutside(u))};return document.addEventListener("pointerdown",s,!0),document.addEventListener("pointerup",l,!0),()=>{document.removeEventListener("pointerdown",s,!0),document.removeEventListener("pointerup",l,!0)}}else{let l=p=>{a.ignoreEmulatedMouseEvents?a.ignoreEmulatedMouseEvents=!1:a.isPointerDown&&a.onInteractOutside&&a4(p,e)&&(a.isPointerDown=!1,a.onInteractOutside(p))},u=p=>{a.ignoreEmulatedMouseEvents=!0,a.onInteractOutside&&a.isPointerDown&&a4(p,e)&&(a.isPointerDown=!1,a.onInteractOutside(p))};return document.addEventListener("mousedown",s,!0),document.addEventListener("mouseup",l,!0),document.addEventListener("touchstart",s,!0),document.addEventListener("touchend",u,!0),()=>{document.removeEventListener("mousedown",s,!0),document.removeEventListener("mouseup",l,!0),document.removeEventListener("touchstart",s,!0),document.removeEventListener("touchend",u,!0)}}},[e,a,n])}function a4(t,e){if(t.button>0)return!1;if(t.target){const r=t.target.ownerDocument;if(!r||!r.documentElement.contains(t.target))return!1}return e.current&&!e.current.contains(t.target)}var DSt={};tu(DSt,"useKeyboard",()=>Bge);function zge(t){if(!t)return;let e=!0;return r=>{let n=ul(io({},r),{preventDefault(){r.preventDefault()},isDefaultPrevented(){return r.isDefaultPrevented()},stopPropagation(){console.error("stopPropagation is now the default behavior for events in React Spectrum. You can use continuePropagation() to revert this behavior.")},continuePropagation(){e=!1}});t(n),e&&r.stopPropagation()}}function Bge(t){return{keyboardProps:t.isDisabled?{}:{onKeyDown:zge(t.onKeyDown),onKeyUp:zge(t.onKeyUp)}}}var NSt={};tu(NSt,"useMove",()=>$St);function $St(t){let{onMoveStart:e,onMove:r,onMoveEnd:n}=t,i=Y.exports.useRef({didMove:!1,lastPosition:null,id:null}),{addGlobalListener:o,removeGlobalListener:a}=Z$();return{moveProps:Y.exports.useMemo(()=>{let l={},u=()=>{rG(),i.current.didMove=!1},p=(x,y,_,w)=>{_===0&&w===0||(i.current.didMove||(i.current.didMove=!0,e==null||e({type:"movestart",pointerType:y,shiftKey:x.shiftKey,metaKey:x.metaKey,ctrlKey:x.ctrlKey,altKey:x.altKey})),r({type:"move",pointerType:y,deltaX:_,deltaY:w,shiftKey:x.shiftKey,metaKey:x.metaKey,ctrlKey:x.ctrlKey,altKey:x.altKey}))},m=(x,y)=>{LA(),i.current.didMove&&(n==null||n({type:"moveend",pointerType:y,shiftKey:x.shiftKey,metaKey:x.metaKey,ctrlKey:x.ctrlKey,altKey:x.altKey}))};if(typeof PointerEvent=="undefined"){let x=C=>{C.button===0&&(p(C,"mouse",C.pageX-i.current.lastPosition.pageX,C.pageY-i.current.lastPosition.pageY),i.current.lastPosition={pageX:C.pageX,pageY:C.pageY})},y=C=>{C.button===0&&(m(C,"mouse"),a(window,"mousemove",x,!1),a(window,"mouseup",y,!1))};l.onMouseDown=C=>{C.button===0&&(u(),C.stopPropagation(),C.preventDefault(),i.current.lastPosition={pageX:C.pageX,pageY:C.pageY},o(window,"mousemove",x,!1),o(window,"mouseup",y,!1))};let _=C=>{let E=[...C.changedTouches].findIndex(({identifier:T})=>T===i.current.id);if(E>=0){let{pageX:T,pageY:A}=C.changedTouches[E];p(C,"touch",T-i.current.lastPosition.pageX,A-i.current.lastPosition.pageY),i.current.lastPosition={pageX:T,pageY:A}}},w=C=>{[...C.changedTouches].findIndex(({identifier:T})=>T===i.current.id)>=0&&(m(C,"touch"),i.current.id=null,a(window,"touchmove",_),a(window,"touchend",w),a(window,"touchcancel",w))};l.onTouchStart=C=>{if(C.changedTouches.length===0||i.current.id!=null)return;let{pageX:E,pageY:T,identifier:A}=C.changedTouches[0];u(),C.stopPropagation(),C.preventDefault(),i.current.lastPosition={pageX:E,pageY:T},i.current.id=A,o(window,"touchmove",_,!1),o(window,"touchend",w,!1),o(window,"touchcancel",w,!1)}}else{let x=_=>{if(_.pointerId===i.current.id){let w=_.pointerType||"mouse";p(_,w,_.pageX-i.current.lastPosition.pageX,_.pageY-i.current.lastPosition.pageY),i.current.lastPosition={pageX:_.pageX,pageY:_.pageY}}},y=_=>{if(_.pointerId===i.current.id){let w=_.pointerType||"mouse";m(_,w),i.current.id=null,a(window,"pointermove",x,!1),a(window,"pointerup",y,!1),a(window,"pointercancel",y,!1)}};l.onPointerDown=_=>{_.button===0&&i.current.id==null&&(u(),_.stopPropagation(),_.preventDefault(),i.current.lastPosition={pageX:_.pageX,pageY:_.pageY},i.current.id=_.pointerId,o(window,"pointermove",x,!1),o(window,"pointerup",y,!1),o(window,"pointercancel",y,!1))}}let v=(x,y,_)=>{u(),p(x,"keyboard",y,_),m(x,"keyboard")};return l.onKeyDown=x=>{switch(x.key){case"Left":case"ArrowLeft":x.preventDefault(),x.stopPropagation(),v(x,-1,0);break;case"Right":case"ArrowRight":x.preventDefault(),x.stopPropagation(),v(x,1,0);break;case"Up":case"ArrowUp":x.preventDefault(),x.stopPropagation(),v(x,0,-1);break;case"Down":case"ArrowDown":x.preventDefault(),x.stopPropagation(),v(x,0,1);break}},l},[i,e,r,n,o,a])}}var FSt={};tu(FSt,"useScrollWheel",()=>zSt);function zSt(t,e){let{onScroll:r,isDisabled:n}=t,i=Y.exports.useCallback(o=>{o.ctrlKey||(o.preventDefault(),o.stopPropagation(),r&&r({deltaX:o.deltaX,deltaY:o.deltaY}))},[r]);Pge(e,"wheel",n?null:i)}var BSt={};tu(BSt,"useLongPress",()=>USt);const jSt=500;function USt(t){let{isDisabled:e,onLongPressStart:r,onLongPressEnd:n,onLongPress:i,threshold:o=jSt,accessibilityDescription:a}=t;const s=Y.exports.useRef(null);let{addGlobalListener:l,removeGlobalListener:u}=Z$(),{pressProps:p}=iG({isDisabled:e,onPressStart(v){if((v.pointerType==="mouse"||v.pointerType==="touch")&&(r&&r(ul(io({},v),{type:"longpressstart"})),s.current=setTimeout(()=>{v.target.dispatchEvent(new PointerEvent("pointercancel",{bubbles:!0})),i&&i(ul(io({},v),{type:"longpress"})),s.current=null},o),v.pointerType==="touch")){let x=y=>{y.preventDefault()};l(v.target,"contextmenu",x,{once:!0}),l(window,"pointerup",()=>{setTimeout(()=>{u(v.target,"contextmenu",x)},30)},{once:!0})}},onPressEnd(v){s.current&&clearTimeout(s.current),n&&(v.pointerType==="mouse"||v.pointerType==="touch")&&n(ul(io({},v),{type:"longpressend"}))}}),m=Cge(i&&!e?a:null);return{longPressProps:Jy(p,m)}}function r0(t,e,r,n){Object.defineProperty(t,e,{get:r,set:n,enumerable:!0,configurable:!0})}var l4={};r0(l4,"FocusScope",()=>Vge);r0(l4,"useFocusManager",()=>GSt);r0(l4,"getFocusableTreeWalker",()=>Lp);r0(l4,"createFocusManager",()=>eTt);var VSt={};r0(VSt,"focusSafely",()=>jge);function jge(t){if(Nge()==="virtual"){let e=document.activeElement;ZW(()=>{document.activeElement===e&&document.contains(t)&&Qb(t)})}else Qb(t)}function HSt(t){if(!(t instanceof HTMLElement)&&!(t instanceof SVGElement))return!1;let{display:e,visibility:r}=t.style,n=e!=="none"&&r!=="hidden"&&r!=="collapse";if(n){const{getComputedStyle:i}=t.ownerDocument.defaultView;let{display:o,visibility:a}=i(t);n=o!=="none"&&a!=="hidden"&&a!=="collapse"}return n}function WSt(t,e){return!t.hasAttribute("hidden")&&(t.nodeName==="DETAILS"&&e&&e.nodeName!=="SUMMARY"?t.hasAttribute("open"):!0)}function Uge(t,e){return t.nodeName!=="#comment"&&HSt(t)&&WSt(t,e)&&(!t.parentElement||Uge(t.parentElement,t))}const dG=Or.createContext(null);let _f=null,hS=new Map;function Vge(t){let{children:e,contain:r,restoreFocus:n,autoFocus:i}=t,o=Y.exports.useRef(),a=Y.exports.useRef(),s=Y.exports.useRef([]),l=Y.exports.useContext(dG),u=l==null?void 0:l.scopeRef;Op(()=>{let m=o.current.nextSibling,v=[];for(;m&&m!==a.current;)v.push(m),m=m.nextSibling;s.current=v},[e,u]),Op(()=>(hS.set(s,u),()=>{(s===_f||c4(s,_f))&&(!u||hS.has(u))&&(_f=u),hS.delete(s)}),[s,u]),KSt(s,r),JSt(s,n,r),QSt(s,i);let p=qSt(s);return Or.createElement(dG.Provider,{value:{scopeRef:s,focusManager:p}},Or.createElement("span",{"data-focus-scope-start":!0,hidden:!0,ref:o}),e,Or.createElement("span",{"data-focus-scope-end":!0,hidden:!0,ref:a}))}function GSt(){var t;return(t=Y.exports.useContext(dG))===null||t===void 0?void 0:t.focusManager}function qSt(t){return{focusNext(e={}){let r=t.current,{from:n,tabbable:i,wrap:o}=e,a=n||document.activeElement,s=r[0].previousElementSibling,l=Lp(pS(r),{tabbable:i},r);l.currentNode=Jm(a,r)?a:s;let u=l.nextNode();return!u&&o&&(l.currentNode=s,u=l.nextNode()),u&&vd(u,!0),u},focusPrevious(e={}){let r=t.current,{from:n,tabbable:i,wrap:o}=e,a=n||document.activeElement,s=r[r.length-1].nextElementSibling,l=Lp(pS(r),{tabbable:i},r);l.currentNode=Jm(a,r)?a:s;let u=l.previousNode();return!u&&o&&(l.currentNode=s,u=l.previousNode()),u&&vd(u,!0),u},focusFirst(e={}){let r=t.current,{tabbable:n}=e,i=Lp(pS(r),{tabbable:n},r);i.currentNode=r[0].previousElementSibling;let o=i.nextNode();return o&&vd(o,!0),o},focusLast(e={}){let r=t.current,{tabbable:n}=e,i=Lp(pS(r),{tabbable:n},r);i.currentNode=r[r.length-1].nextElementSibling;let o=i.previousNode();return o&&vd(o,!0),o}}}const hG=["input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[contenteditable]"],XSt=hG.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";hG.push('[tabindex]:not([tabindex="-1"]):not([disabled])');const YSt=hG.join(':not([hidden]):not([tabindex="-1"]),');function pS(t){return t[0].parentElement}function KSt(t,e){let r=Y.exports.useRef(),n=Y.exports.useRef(null);Op(()=>{let i=t.current;if(!e)return;let o=l=>{if(l.key!=="Tab"||l.altKey||l.ctrlKey||l.metaKey||t!==_f)return;let u=document.activeElement,p=t.current;if(!Jm(u,p))return;let m=Lp(pS(p),{tabbable:!0},p);m.currentNode=u;let v=l.shiftKey?m.previousNode():m.nextNode();v||(m.currentNode=l.shiftKey?p[p.length-1].nextElementSibling:p[0].previousElementSibling,v=l.shiftKey?m.previousNode():m.nextNode()),l.preventDefault(),v&&vd(v,!0)},a=l=>{!_f||c4(_f,t)?(_f=t,r.current=l.target):t===_f&&!Hge(l.target,t)?r.current?r.current.focus():_f&&Wge(_f.current):t===_f&&(r.current=l.target)},s=l=>{n.current=requestAnimationFrame(()=>{t===_f&&!Hge(document.activeElement,t)&&(_f=t,r.current=l.target,r.current.focus())})};return document.addEventListener("keydown",o,!1),document.addEventListener("focusin",a,!1),i.forEach(l=>l.addEventListener("focusin",a,!1)),i.forEach(l=>l.addEventListener("focusout",s,!1)),()=>{document.removeEventListener("keydown",o,!1),document.removeEventListener("focusin",a,!1),i.forEach(l=>l.removeEventListener("focusin",a,!1)),i.forEach(l=>l.removeEventListener("focusout",s,!1))}},[t,e]),Y.exports.useEffect(()=>()=>cancelAnimationFrame(n.current),[n])}function ZSt(t){for(let e of hS.keys())if(Jm(t,e.current))return!0;return!1}function Jm(t,e){return e.some(r=>r.contains(t))}function Hge(t,e){for(let r of hS.keys())if((r===e||c4(e,r))&&Jm(t,r.current))return!0;return!1}function c4(t,e){let r=hS.get(e);return r?r===t?!0:c4(t,r):!1}function vd(t,e=!1){if(t!=null&&!e)try{jge(t)}catch{}else if(t!=null)try{t.focus()}catch{}}function Wge(t){let e=t[0].previousElementSibling,r=Lp(pS(t),{tabbable:!0},t);r.currentNode=e,vd(r.nextNode())}function QSt(t,e){const r=Or.useRef(e);Y.exports.useEffect(()=>{r.current&&(_f=t,Jm(document.activeElement,_f.current)||Wge(t.current)),r.current=!1},[])}function JSt(t,e,r){const n=Y.exports.useRef(typeof document!="undefined"?document.activeElement:null);Op(()=>{let i=n.current;if(!e)return;let o=a=>{if(a.key!=="Tab"||a.altKey||a.ctrlKey||a.metaKey)return;let s=document.activeElement;if(!Jm(s,t.current))return;let l=Lp(document.body,{tabbable:!0});l.currentNode=s;let u=a.shiftKey?l.previousNode():l.nextNode();if((!document.body.contains(i)||i===document.body)&&(i=null),(!u||!Jm(u,t.current))&&i){l.currentNode=i;do u=a.shiftKey?l.previousNode():l.nextNode();while(Jm(u,t.current));a.preventDefault(),a.stopPropagation(),u?vd(u,!0):ZSt(i)?vd(i,!0):s.blur()}};return r||document.addEventListener("keydown",o,!0),()=>{r||document.removeEventListener("keydown",o,!0),e&&i&&Jm(document.activeElement,t.current)&&requestAnimationFrame(()=>{document.body.contains(i)&&vd(i)})}},[t,e,r])}function Lp(t,e,r){let n=(e==null?void 0:e.tabbable)?YSt:XSt,i=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode(o){var a;return(e==null||(a=e.from)===null||a===void 0?void 0:a.contains(o))?NodeFilter.FILTER_REJECT:o.matches(n)&&Uge(o)&&(!r||Jm(o,r))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return(e==null?void 0:e.from)&&(i.currentNode=e.from),i}function eTt(t){return{focusNext(e={}){let r=t.current,{from:n,tabbable:i,wrap:o}=e,a=n||document.activeElement,s=Lp(r,{tabbable:i});r.contains(a)&&(s.currentNode=a);let l=s.nextNode();return!l&&o&&(s.currentNode=r,l=s.nextNode()),l&&vd(l,!0),l},focusPrevious(e={}){let r=t.current,{from:n,tabbable:i,wrap:o}=e,a=n||document.activeElement,s=Lp(r,{tabbable:i});if(r.contains(a))s.currentNode=a;else{let u=pG(s);return u&&vd(u,!0),u}let l=s.previousNode();return!l&&o&&(s.currentNode=r,l=pG(s)),l&&vd(l,!0),l},focusFirst(e={}){let r=t.current,{tabbable:n}=e,o=Lp(r,{tabbable:n}).nextNode();return o&&vd(o,!0),o},focusLast(e={}){let r=t.current,{tabbable:n}=e,i=Lp(r,{tabbable:n}),o=pG(i);return o&&vd(o,!0),o}}}function pG(t){let e,r;do r=t.lastChild(),r&&(e=r);while(r);return e}var tTt={};r0(tTt,"FocusRing",()=>nTt);var rTt={};r0(rTt,"useFocusRing",()=>Gge);function Gge(t={}){let{autoFocus:e=!1,isTextInput:r,within:n}=t,i=Y.exports.useRef({isFocused:!1,isFocusVisible:e||o4()}).current,[o,a]=Y.exports.useState(!1),[s,l]=Y.exports.useState(()=>i.isFocused&&i.isFocusVisible),u=()=>l(i.isFocused&&i.isFocusVisible),p=x=>{i.isFocused=x,a(x),u()};cG(x=>{i.isFocusVisible=x,u()},[],{isTextInput:r});let{focusProps:m}=aG({isDisabled:n,onFocusChange:p}),{focusWithinProps:v}=$ge({isDisabled:!n,onFocusWithinChange:p});return{isFocused:o,isFocusVisible:i.isFocused&&s,focusProps:n?v:m}}function nTt(t){let{children:e,focusClass:r,focusRingClass:n}=t,{isFocused:i,isFocusVisible:o,focusProps:a}=Gge(t),s=Or.Children.only(e);return Or.cloneElement(s,Jy(s.props,ul(io({},a),{className:Lr({[r||""]:i,[n||""]:o})})))}var qge={};r0(qge,"FocusableProvider",()=>sTt);r0(qge,"useFocusable",()=>aTt);let Xge=Or.createContext(null);function iTt(t){let e=Y.exports.useContext(Xge)||{};Q$(e,t);let i=e,{ref:r}=i;return z0(i,["ref"])}function oTt(t,e){let o=t,{children:r}=o,n=z0(o,["children"]),i=ul(io({},n),{ref:e});return Or.createElement(Xge.Provider,{value:i},r)}let sTt=Or.forwardRef(oTt);function aTt(t,e){let{focusProps:r}=aG(t),{keyboardProps:n}=Bge(t),i=Jy(r,n),o=iTt(e),a=t.isDisabled?{}:o,s=Y.exports.useRef(t.autoFocus);return Y.exports.useEffect(()=>{s.current&&e.current&&e.current.focus(),s.current=!1},[]),{focusableProps:Jy(ul(io({},i),{tabIndex:t.excludeFromTabOrder&&!t.isDisabled?-1:void 0}),a)}}function n0(){return n0=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},n0.apply(this,arguments)}function u4(t,e){if(t==null)return{};var r={},n=Object.keys(t),i,o;for(o=0;o<n.length;o++)i=n[o],!(e.indexOf(i)>=0)&&(r[i]=t[i]);return r}function lTt(t,e){if(!!t){if(typeof t=="string")return Yge(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Yge(t,e)}}function Yge(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function cTt(t,e){var r=typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(r)return(r=r.call(t)).next.bind(r);if(Array.isArray(t)||(r=lTt(t))||e&&t&&typeof t.length=="number"){r&&(t=r);var n=0;return function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var uTt=["hasHighligtedElems"],fTt={bottom:0,height:0,left:0,right:0,top:0,width:0,windowWidth:0,windowHeight:0};function dTt(t,e){e===void 0&&(e={block:"center",behavior:"smooth",inViewThreshold:0});var r=Y.exports.useState(!1),n=r[0],i=r[1],o=Y.exports.useState(!1),a=o[0],s=o[1],l=Y.exports.useState(!1),u=l[0],p=l[1],m=Y.exports.useState(null),v=m[0],x=m[1],y=Y.exports.useState(fTt),_=y[0],w=y[1],C=(t==null?void 0:t.selector)instanceof Element?t==null?void 0:t.selector:document.querySelector(t==null?void 0:t.selector),E=Y.exports.useCallback(function(){w(Kge(C,t==null?void 0:t.highlightedSelectors,t==null?void 0:t.bypassElem))},[C,t==null?void 0:t.highlightedSelectors]);Y.exports.useEffect(function(){return E(),window.addEventListener("resize",E),function(){return window.removeEventListener("resize",E)}},[C,t==null?void 0:t.highlightedSelectors,v]),Y.exports.useEffect(function(){var A=rEt(n0({},_,{threshold:e.inViewThreshold}));!A&&C&&(i(!0),eEt(C,e).then(function(){a||x(Date.now())}).finally(function(){i(!1)}))},[_]);function T(){s(!0);var A=Kge(C,t==null?void 0:t.highlightedSelectors,t==null?void 0:t.bypassElem),k=A.hasHighligtedElems,X=u4(A,uTt);p(k),w(X),s(!1)}return{sizes:_,transition:n,target:C,observableRefresher:T,isHighlightingObserved:u}}function Kge(t,e,r){e===void 0&&(e=[]),r===void 0&&(r=!0);var n=!1,i=H$(),o=i.w,a=i.h;if(!e)return n0({},U$(t),{windowWidth:o,windowHeight:a,hasHighligtedElems:!1});for(var s=U$(t),l={bottom:0,height:0,left:o,right:0,top:a,width:0},u=cTt(e),p;!(p=u()).done;){var m=p.value,v=document.querySelector(m);if(!(!v||v.style.display==="none"||v.style.visibility==="hidden")){var x=U$(v);n=!0,r||!t?(x.top<l.top&&(l.top=x.top),x.right>l.right&&(l.right=x.right),x.bottom>l.bottom&&(l.bottom=x.bottom),x.left<l.left&&(l.left=x.left),l.width=l.right-l.left,l.height=l.bottom-l.top):(x.top<s.top&&(s.top=x.top),x.right>s.right&&(s.right=x.right),x.bottom>s.bottom&&(s.bottom=x.bottom),x.left<s.left&&(s.left=x.left),s.width=s.right-s.left,s.height=s.bottom-s.top)}}var y=r||!t?l.width>0&&l.height>0:!1;return{left:(y?l:s).left,top:(y?l:s).top,right:(y?l:s).right,bottom:(y?l:s).bottom,width:(y?l:s).width,height:(y?l:s).height,windowWidth:o,windowHeight:a,hasHighligtedElems:n}}var hTt=function(e){var r=e.disableKeyboardNavigation,n=e.setCurrentStep,i=e.currentStep,o=e.setIsOpen,a=e.stepsLength,s=e.disable,l=e.rtl;function u(p){if(p.stopPropagation(),r===!0||s)return;var m,v,x;r&&(m=r.includes("esc"),v=r.includes("right"),x=r.includes("left"));function y(){n(Math.min(i+1,a-1))}function _(){n(Math.max(i-1,0))}p.keyCode===27&&!m&&(p.preventDefault(),o(!1)),p.keyCode===39&&!v&&(p.preventDefault(),l?_():y()),p.keyCode===37&&!x&&(p.preventDefault(),l?y():_())}return Y.exports.useEffect(function(){return window.addEventListener("keydown",u,!1),function(){window.removeEventListener("keydown",u)}},[s,n,i]),null},pTt={badge:function(){return{position:"absolute",fontFamily:"monospace",background:"var(--reactour-accent,#007aff)",height:"1.875em",lineHeight:2,paddingLeft:"0.8125em",paddingRight:"0.8125em",fontSize:"1em",borderRadius:"1.625em",color:"white",textAlign:"center",boxShadow:"0 0.25em 0.5em rgba(0, 0, 0, 0.3)",top:"-0.8125em",left:"-0.8125em"}},controls:function(){return{display:"flex",marginTop:24,alignItems:"center",justifyContent:"space-between"}},navigation:function(){return{counterReset:"dot",display:"flex",justifyContent:"space-between",alignItems:"center",flexWrap:"wrap"}},button:function(e){var r=e.disabled;return{display:"block",padding:0,border:0,background:"none",cursor:r?"not-allowed":"pointer"}},arrow:function(e){var r=e.disabled;return{color:r?"#caccce":"#646464",width:16,height:12,flex:"0 0 16px","&:hover":{color:r?"#caccce":"#000"}}},dot:function(e){var r=e.current,n=e.disabled,i=e.showNumber;return{counterIncrement:"dot",width:8,height:8,border:r?"0":"1px solid #caccce",borderRadius:"100%",padding:0,display:"block",margin:4,transition:"opacity 0.3s, transform 0.3s",cursor:n?"not-allowed":"pointer",transform:"scale("+(r?1.25:1)+")",color:r?"var(--reactour-accent, #007aff)":"#caccce",background:r?"var(--reactour-accent, #007aff)":"none","&:before":{content:"counter(dot)",position:"absolute",bottom:"calc(100% + 0.25em)",left:"50%",opacity:0,transform:"translate(-50%, 1em)",transition:"0.3s",display:i?"block":"none"},"&:hover":{backgroundColor:"currentColor","&:before":{opacity:.5,transform:"translate(-50%, -2px)"}}}},close:function(e){var r=e.disabled;return{position:"absolute",top:22,right:22,width:9,height:9,color:r?"#caccce":"#5e5e5e","&:hover":{color:r?"#caccce":"#000"}}}};function f4(t){return function(e,r){var n=pTt[e](r),i=t[e];return i?i(n,r):n}}var mTt=function(e){var r=e.styles,n=r===void 0?{}:r,i=e.children,o=f4(n);return ys("span",{css:o("badge",{})},i)},gTt=["styles","onClick","disabled"],vTt=function(e){var r=e.styles,n=r===void 0?{}:r,i=e.onClick,o=e.disabled,a=u4(e,gTt),s=f4(n);return ys("button",Object.assign({css:n0({},s("button",{}),s("close",{disabled:o})),onClick:i},a),ys("svg",{viewBox:"0 0 9.1 9.1","aria-hidden":!0,role:"presentation"},ys("path",{fill:"currentColor",d:"M5.9 4.5l2.8-2.8c.4-.4.4-1 0-1.4-.4-.4-1-.4-1.4 0L4.5 3.1 1.7.3C1.3-.1.7-.1.3.3c-.4.4-.4 1 0 1.4l2.8 2.8L.3 7.4c-.4.4-.4 1 0 1.4.2.2.4.3.7.3s.5-.1.7-.3L4.5 6l2.8 2.8c.3.2.5.3.8.3s.5-.1.7-.3c.4-.4.4-1 0-1.4L5.9 4.5z"})))},yTt=function(e){var r=e.content,n=e.setCurrentStep,i=e.transition,o=e.isHighlightingObserved,a=e.currentStep,s=e.setIsOpen;return typeof r=="function"?r({setCurrentStep:n,transition:i,isHighlightingObserved:o,currentStep:a,setIsOpen:s}):r},xTt=function(e){var r=e.styles,n=r===void 0?{}:r,i=e.steps,o=e.setCurrentStep,a=e.currentStep,s=e.setIsOpen,l=e.nextButton,u=e.prevButton,p=e.disableDots,m=e.hideButtons,v=e.disableAll,x=e.rtl,y=e.Arrow,_=y===void 0?Zge:y,w=i.length,C=f4(n),E=function(A){var k=A.onClick,X=A.kind,Z=X===void 0?"next":X,W=A.children,D=A.hideArrow;function H(){v||(k&&typeof k=="function"?k():o(Z==="next"?Math.min(a+1,w-1):Math.max(a-1,0)))}return ys("button",{css:C("button",{kind:Z,disabled:v||(Z==="next"?w-1===a:a===0)}),onClick:H,"aria-label":"Go to "+Z+" step"},D?null:ys(_,{styles:n,inverted:x?Z==="prev":Z==="next",disabled:v||(Z==="next"?w-1===a:a===0)}),W)};return ys("div",{css:C("controls",{}),dir:x?"rtl":"ltr"},m?null:u&&typeof u=="function"?u({Button:E,setCurrentStep:o,currentStep:a,stepsLength:w,setIsOpen:s}):ys(E,{kind:"prev"}),ys("div",{css:C("navigation",{})},Array.from({length:w},function(T,A){return A}).map(function(T){var A;return ys("button",{css:C("dot",{current:T===a,disabled:p||v}),onClick:function(){!p&&!v&&o(T)},key:"navigation_dot_"+T,"aria-label":((A=i[T])==null?void 0:A.navDotAriaLabel)||"Go to step "+(T+1)})})),m?null:l&&typeof l=="function"?l({Button:E,setCurrentStep:o,currentStep:a,stepsLength:w,setIsOpen:s}):ys(E,null))},Zge=function(e){var r=e.styles,n=r===void 0?{}:r,i=e.inverted,o=i===void 0?!1:i,a=e.disabled,s=f4(n);return ys("svg",{viewBox:"0 0 18.4 14.4",css:s("arrow",{inverted:o,disabled:a})},ys("path",{d:o?"M17 7.2H1M10.8 1L17 7.2l-6.2 6.2":"M1.4 7.2h16M7.6 1L1.4 7.2l6.2 6.2",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeMiterlimit:"10"}))},_Tt={Badge:mTt,Close:vTt,Content:yTt,Navigation:xTt,Arrow:Zge},bTt=function(e){return n0({},_Tt,e)},wTt=function(e){var r=e.styles,n=e.components,i=n===void 0?{}:n,o=e.badgeContent,a=e.accessibilityOptions,s=e.disabledActions,l=e.onClickClose,u=e.steps,p=e.setCurrentStep,m=e.currentStep,v=e.transition,x=e.isHighlightingObserved,y=e.setIsOpen,_=e.nextButton,w=e.prevButton,C=e.disableDotsNavigation,E=e.rtl,T=e.showPrevNextButtons,A=T===void 0?!0:T,k=e.showCloseButton,X=k===void 0?!0:k,Z=e.showNavigation,W=Z===void 0?!0:Z,D=e.showBadge,H=D===void 0?!0:D,N=u[m],j=bTt(i),$=j.Badge,z=j.Close,O=j.Content,F=j.Navigation,G=j.Arrow,q=o&&typeof o=="function"?o({currentStep:m,totalSteps:u.length,transition:v}):m+1;function ee(){s||(l&&typeof l=="function"?l({setCurrentStep:p,setIsOpen:y,currentStep:m}):y(!1))}return ys(Or.Fragment,null,H?ys($,{styles:r},q):null,X?ys(z,{styles:r,"aria-label":a==null?void 0:a.closeButtonAriaLabel,disabled:s,onClick:ee}):null,ys(O,{content:N==null?void 0:N.content,setCurrentStep:p,currentStep:m,transition:v,isHighlightingObserved:x,setIsOpen:y}),W?ys(F,{setCurrentStep:p,currentStep:m,setIsOpen:y,steps:u,styles:r,"aria-hidden":!(a!=null&&a.showNavigationScreenReaders),nextButton:_,prevButton:w,disableDots:C,hideButtons:!A,disableAll:s,rtl:E,Arrow:G}):null)},CTt=["currentStep","setCurrentStep","setIsOpen","steps","styles","scrollSmooth","afterOpen","beforeClose","padding","position","onClickMask","onClickHighlighted","className","maskClassName","highlightedMaskClassName","disableInteraction","disableFocusLock","disableKeyboardNavigation","inViewThreshold","disabledActions","setDisabledActions","rtl","accessibilityOptions","ContentComponent"],ETt=function(e){var r=e.currentStep,n=e.setCurrentStep,i=e.setIsOpen,o=e.steps,a=o===void 0?[]:o,s=e.styles,l=s===void 0?{}:s,u=e.scrollSmooth,p=e.afterOpen,m=e.beforeClose,v=e.padding,x=v===void 0?10:v,y=e.position,_=e.onClickMask,w=e.onClickHighlighted,C=e.className,E=C===void 0?"reactour__popover":C,T=e.maskClassName,A=T===void 0?"reactour__mask":T,k=e.highlightedMaskClassName,X=e.disableInteraction,Z=e.disableFocusLock,W=e.disableKeyboardNavigation,D=e.inViewThreshold,H=e.disabledActions,N=e.setDisabledActions,j=e.rtl,$=e.accessibilityOptions,z=$===void 0?{closeButtonAriaLabel:"Close Tour",showNavigationScreenReaders:!0}:$,O=e.ContentComponent,F=u4(e,CTt),G=a[r],q=(G==null?void 0:G.styles)||l,ee=dTt(G,{block:"center",behavior:u?"smooth":"auto",inViewThreshold:D}),re=ee.sizes,ce=ee.transition,fe=ee.observableRefresher,J=ee.isHighlightingObserved,oe=ee.target;Y.exports.useEffect(function(){return p&&typeof p=="function"&&p(oe),function(){m&&typeof m=="function"&&m(oe)}},[]);var ve=TTt((G==null?void 0:G.padding)||x),ye=ve.maskPadding,xe=ve.popoverPadding,se=ve.wrapperPadding;function me(){H||(_&&typeof _=="function"?_({setCurrentStep:n,setIsOpen:i,currentStep:r,steps:a}):i(!1))}var pe=G!=null&&G.stepInteraction?!(G!=null&&G.stepInteraction):X;Y.exports.useEffect(function(){G!=null&&G.action&&typeof(G==null?void 0:G.action)=="function"&&(G==null||G.action(oe)),(G==null?void 0:G.disableActions)!==void 0&&N(G==null?void 0:G.disableActions)},[G]);var Ce=ce?"center":G!=null&&G.position?G==null?void 0:G.position:y;return G?Or.createElement(YCt,null,Or.createElement(STt,{disabled:Z},Or.createElement(ZCt,{mutationObservables:G==null?void 0:G.mutationObservables,resizeObservables:G==null?void 0:G.resizeObservables,refresh:fe}),Or.createElement(hTt,{setCurrentStep:n,currentStep:r,setIsOpen:i,stepsLength:a.length,disableKeyboardNavigation:W,disable:H,rtl:j}),Or.createElement(aEt,{sizes:re,onClick:me,styles:n0({highlightedArea:function(Re){return n0({},Re,{display:pe?"block":"none"})}},q),padding:ye,highlightedAreaClassName:k,className:A,onClickHighlighted:w,wrapperPadding:se}),Or.createElement(fEt,{sizes:re,styles:q,position:Ce,padding:xe,"aria-labelledby":z==null?void 0:z.ariaLabelledBy,className:E,refresher:r},O?Or.createElement(O,Object.assign({styles:q,setCurrentStep:n,currentStep:r,setIsOpen:i,steps:a,accessibilityOptions:z,disabledActions:H,transition:ce,isHighlightingObserved:J,rtl:j},F)):Or.createElement(wTt,Object.assign({styles:q,setCurrentStep:n,currentStep:r,setIsOpen:i,steps:a,accessibilityOptions:z,disabledActions:H,transition:ce,isHighlightingObserved:J,rtl:j},F))))):null},STt=function(e){var r=e.disabled,n=e.children;return r?Or.createElement(Or.Fragment,null,n):Or.createElement(Vge,{contain:!0,autoFocus:!0,restoreFocus:!0},n)};function TTt(t){return typeof t=="object"&&t!==null?{maskPadding:t.mask,popoverPadding:t.popover,wrapperPadding:t.wrapper}:{maskPadding:t,popoverPadding:t,wrapperPadding:0}}var PTt=["children","defaultOpen","startAt","steps","setCurrentStep","currentStep"],ITt={isOpen:!1,setIsOpen:function(){return!1},currentStep:0,setCurrentStep:function(){return 0},steps:[],setSteps:function(){return[]},disabledActions:!1,setDisabledActions:function(){return!1},components:{}},Qge=Or.createContext(ITt),tOt=function(e){var r=e.children,n=e.defaultOpen,i=n===void 0?!1:n,o=e.startAt,a=o===void 0?0:o,s=e.steps,l=e.setCurrentStep,u=e.currentStep,p=u4(e,PTt),m=Y.exports.useState(i),v=m[0],x=m[1],y=Y.exports.useState(a),_=y[0],w=y[1],C=Y.exports.useState(s),E=C[0],T=C[1],A=Y.exports.useState(!1),k=A[0],X=A[1],Z=n0({isOpen:v,setIsOpen:x,currentStep:u||_,setCurrentStep:l&&typeof l=="function"?l:w,steps:E,setSteps:T,disabledActions:k,setDisabledActions:X},p);return Or.createElement(Qge.Provider,{value:Z},r,v?Or.createElement(ETt,Object.assign({},Z)):null)};function rOt(){return Y.exports.useContext(Qge)}var nOt=nd(Kt("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"}),"Close"),iOt=nd(Kt("path",{d:"M15.41 16.59 10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"}),"KeyboardArrowLeft"),oOt=nd(Kt("path",{d:"M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"}),"KeyboardArrowRight"),mG={},MTt=sc.exports;Object.defineProperty(mG,"__esModule",{value:!0});var ATt=mG.default=void 0,RTt=MTt(ac),kTt=kc,OTt=(0,RTt.default)((0,kTt.jsx)("path",{d:"M21 3H3c-1.11 0-2 .89-2 2v12c0 1.1.89 2 2 2h5v2h8v-2h2v-2H3V5h18v8h2V5c0-1.11-.9-2-2-2zm-8 7V7h-2v3H8v2h3v3h2v-3h3v-2h-3zm11 8-4.5 4.5L18 21l3-3-3-3 1.5-1.5L24 18z"}),"QueuePlayNext");ATt=mG.default=OTt;var LTt=M9,DTt=vx;function NTt(t,e){var r=-1,n=DTt(t)?Array(t.length):[];return LTt(t,function(i,o,a){n[++r]=e(i,o,a)}),n}var $Tt=NTt;function FTt(t,e){var r=t.length;for(t.sort(e);r--;)t[r]=t[r].value;return t}var zTt=FTt,Jge=YP;function BTt(t,e){if(t!==e){var r=t!==void 0,n=t===null,i=t===t,o=Jge(t),a=e!==void 0,s=e===null,l=e===e,u=Jge(e);if(!s&&!u&&!o&&t>e||o&&a&&l&&!s&&!u||n&&a&&l||!r&&l||!i)return 1;if(!n&&!o&&!u&&t<e||u&&r&&i&&!n&&!o||s&&r&&i||!a&&i||!l)return-1}return 0}var jTt=BTt,UTt=jTt;function VTt(t,e,r){for(var n=-1,i=t.criteria,o=e.criteria,a=i.length,s=r.length;++n<a;){var l=UTt(i[n],o[n]);if(l){if(n>=s)return l;var u=r[n];return l*(u=="desc"?-1:1)}}return t.index-e.index}var HTt=VTt,gG=KP,WTt=ZP,GTt=W1,qTt=$Tt,XTt=zTt,YTt=NL,KTt=HTt,ZTt=qL,QTt=Xf;function JTt(t,e,r){e.length?e=gG(e,function(o){return QTt(o)?function(a){return WTt(a,o.length===1?o[0]:o)}:o}):e=[ZTt];var n=-1;e=gG(e,YTt(GTt));var i=qTt(t,function(o,a,s){var l=gG(e,function(u){return u(o)});return{criteria:l,index:++n,value:o}});return XTt(i,function(o,a){return KTt(o,a,r)})}var ePt=JTt,tPt=Vhe,rPt=ePt,nPt=cC,eve=QP,iPt=nPt(function(t,e){if(t==null)return[];var r=e.length;return r>1&&eve(t,e[0],e[1])?e=[]:r>2&&eve(e[0],e[1],e[2])&&(e=[e[0]]),rPt(t,tPt(e,1),[])}),sOt=iPt,oPt=X9,tve=Yf;function rve(t,e,r,n,i,o){return tve(t)&&tve(e)&&(o.set(e,t),oPt(t,e,void 0,rve,o),o.delete(e)),t}var sPt=rve,aPt=X9,lPt=ZL,cPt=lPt(function(t,e,r,n){aPt(t,e,r,n)}),uPt=cPt,fPt=Y9,dPt=cC,hPt=sPt,pPt=uPt,mPt=dPt(function(t){return t.push(void 0,hPt),fPt(pPt,void 0,t)}),aOt=mPt;function i0(t){return Array.isArray?Array.isArray(t):ove(t)==="[object Array]"}const gPt=1/0;function vPt(t){if(typeof t=="string")return t;let e=t+"";return e=="0"&&1/t==-gPt?"-0":e}function yPt(t){return t==null?"":vPt(t)}function Cv(t){return typeof t=="string"}function nve(t){return typeof t=="number"}function xPt(t){return t===!0||t===!1||_Pt(t)&&ove(t)=="[object Boolean]"}function ive(t){return typeof t=="object"}function _Pt(t){return ive(t)&&t!==null}function Ch(t){return t!=null}function vG(t){return!t.trim().length}function ove(t){return t==null?t===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}const bPt="Incorrect 'index' type",wPt=t=>`Invalid value for key ${t}`,CPt=t=>`Pattern length exceeds max of ${t}.`,EPt=t=>`Missing ${t} property in key`,SPt=t=>`Property 'weight' in key '${t}' must be a positive integer`,sve=Object.prototype.hasOwnProperty;class TPt{constructor(e){this._keys=[],this._keyMap={};let r=0;e.forEach(n=>{let i=ave(n);this._keys.push(i),this._keyMap[i.id]=i,r+=i.weight}),this._keys.forEach(n=>{n.weight/=r})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function ave(t){let e=null,r=null,n=null,i=1,o=null;if(Cv(t)||i0(t))n=t,e=lve(t),r=yG(t);else{if(!sve.call(t,"name"))throw new Error(EPt("name"));const a=t.name;if(n=a,sve.call(t,"weight")&&(i=t.weight,i<=0))throw new Error(SPt(a));e=lve(a),r=yG(a),o=t.getFn}return{path:e,id:r,weight:i,src:n,getFn:o}}function lve(t){return i0(t)?t:t.split(".")}function yG(t){return i0(t)?t.join("."):t}function PPt(t,e){let r=[],n=!1;const i=(o,a,s)=>{if(!!Ch(o))if(!a[s])r.push(o);else{let l=a[s];const u=o[l];if(!Ch(u))return;if(s===a.length-1&&(Cv(u)||nve(u)||xPt(u)))r.push(yPt(u));else if(i0(u)){n=!0;for(let p=0,m=u.length;p<m;p+=1)i(u[p],a,s+1)}else a.length&&i(u,a,s+1)}};return i(t,Cv(e)?e.split("."):e,0),n?r:r[0]}const IPt={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},MPt={isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(t,e)=>t.score===e.score?t.idx<e.idx?-1:1:t.score<e.score?-1:1},APt={location:0,threshold:.6,distance:100},RPt={useExtendedSearch:!1,getFn:PPt,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1};var zi=io(io(io(io({},MPt),IPt),APt),RPt);const kPt=/[^ ]+/g;function OPt(t=1,e=3){const r=new Map,n=Math.pow(10,e);return{get(i){const o=i.match(kPt).length;if(r.has(o))return r.get(o);const a=1/Math.pow(o,.5*t),s=parseFloat(Math.round(a*n)/n);return r.set(o,s),s},clear(){r.clear()}}}class xG{constructor({getFn:e=zi.getFn,fieldNormWeight:r=zi.fieldNormWeight}={}){this.norm=OPt(r,3),this.getFn=e,this.isCreated=!1,this.setIndexRecords()}setSources(e=[]){this.docs=e}setIndexRecords(e=[]){this.records=e}setKeys(e=[]){this.keys=e,this._keysMap={},e.forEach((r,n)=>{this._keysMap[r.id]=n})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,Cv(this.docs[0])?this.docs.forEach((e,r)=>{this._addString(e,r)}):this.docs.forEach((e,r)=>{this._addObject(e,r)}),this.norm.clear())}add(e){const r=this.size();Cv(e)?this._addString(e,r):this._addObject(e,r)}removeAt(e){this.records.splice(e,1);for(let r=e,n=this.size();r<n;r+=1)this.records[r].i-=1}getValueForItemAtKeyId(e,r){return e[this._keysMap[r]]}size(){return this.records.length}_addString(e,r){if(!Ch(e)||vG(e))return;let n={v:e,i:r,n:this.norm.get(e)};this.records.push(n)}_addObject(e,r){let n={i:r,$:{}};this.keys.forEach((i,o)=>{let a=i.getFn?i.getFn(e):this.getFn(e,i.path);if(!!Ch(a)){if(i0(a)){let s=[];const l=[{nestedArrIndex:-1,value:a}];for(;l.length;){const{nestedArrIndex:u,value:p}=l.pop();if(!!Ch(p))if(Cv(p)&&!vG(p)){let m={v:p,i:u,n:this.norm.get(p)};s.push(m)}else i0(p)&&p.forEach((m,v)=>{l.push({nestedArrIndex:v,value:m})})}n.$[o]=s}else if(Cv(a)&&!vG(a)){let s={v:a,n:this.norm.get(a)};n.$[o]=s}}}),this.records.push(n)}toJSON(){return{keys:this.keys,records:this.records}}}function cve(t,e,{getFn:r=zi.getFn,fieldNormWeight:n=zi.fieldNormWeight}={}){const i=new xG({getFn:r,fieldNormWeight:n});return i.setKeys(t.map(ave)),i.setSources(e),i.create(),i}function LPt(t,{getFn:e=zi.getFn,fieldNormWeight:r=zi.fieldNormWeight}={}){const{keys:n,records:i}=t,o=new xG({getFn:e,fieldNormWeight:r});return o.setKeys(n),o.setIndexRecords(i),o}function d4(t,{errors:e=0,currentLocation:r=0,expectedLocation:n=0,distance:i=zi.distance,ignoreLocation:o=zi.ignoreLocation}={}){const a=e/t.length;if(o)return a;const s=Math.abs(n-r);return i?a+s/i:s?1:a}function DPt(t=[],e=zi.minMatchCharLength){let r=[],n=-1,i=-1,o=0;for(let a=t.length;o<a;o+=1){let s=t[o];s&&n===-1?n=o:!s&&n!==-1&&(i=o-1,i-n+1>=e&&r.push([n,i]),n=-1)}return t[o-1]&&o-n>=e&&r.push([n,o-1]),r}const ew=32;function NPt(t,e,r,{location:n=zi.location,distance:i=zi.distance,threshold:o=zi.threshold,findAllMatches:a=zi.findAllMatches,minMatchCharLength:s=zi.minMatchCharLength,includeMatches:l=zi.includeMatches,ignoreLocation:u=zi.ignoreLocation}={}){if(e.length>ew)throw new Error(CPt(ew));const p=e.length,m=t.length,v=Math.max(0,Math.min(n,m));let x=o,y=v;const _=s>1||l,w=_?Array(m):[];let C;for(;(C=t.indexOf(e,y))>-1;){let Z=d4(e,{currentLocation:C,expectedLocation:v,distance:i,ignoreLocation:u});if(x=Math.min(Z,x),y=C+p,_){let W=0;for(;W<p;)w[C+W]=1,W+=1}}y=-1;let E=[],T=1,A=p+m;const k=1<<p-1;for(let Z=0;Z<p;Z+=1){let W=0,D=A;for(;W<D;)d4(e,{errors:Z,currentLocation:v+D,expectedLocation:v,distance:i,ignoreLocation:u})<=x?W=D:A=D,D=Math.floor((A-W)/2+W);A=D;let H=Math.max(1,v-D+1),N=a?m:Math.min(v+D,m)+p,j=Array(N+2);j[N+1]=(1<<Z)-1;for(let z=N;z>=H;z-=1){let O=z-1,F=r[t.charAt(O)];if(_&&(w[O]=+!!F),j[z]=(j[z+1]<<1|1)&F,Z&&(j[z]|=(E[z+1]|E[z])<<1|1|E[z+1]),j[z]&k&&(T=d4(e,{errors:Z,currentLocation:O,expectedLocation:v,distance:i,ignoreLocation:u}),T<=x)){if(x=T,y=O,y<=v)break;H=Math.max(1,2*v-y)}}if(d4(e,{errors:Z+1,currentLocation:v,expectedLocation:v,distance:i,ignoreLocation:u})>x)break;E=j}const X={isMatch:y>=0,score:Math.max(.001,T)};if(_){const Z=DPt(w,s);Z.length?l&&(X.indices=Z):X.isMatch=!1}return X}function $Pt(t){let e={};for(let r=0,n=t.length;r<n;r+=1){const i=t.charAt(r);e[i]=(e[i]||0)|1<<n-r-1}return e}class uve{constructor(e,{location:r=zi.location,threshold:n=zi.threshold,distance:i=zi.distance,includeMatches:o=zi.includeMatches,findAllMatches:a=zi.findAllMatches,minMatchCharLength:s=zi.minMatchCharLength,isCaseSensitive:l=zi.isCaseSensitive,ignoreLocation:u=zi.ignoreLocation}={}){if(this.options={location:r,threshold:n,distance:i,includeMatches:o,findAllMatches:a,minMatchCharLength:s,isCaseSensitive:l,ignoreLocation:u},this.pattern=l?e:e.toLowerCase(),this.chunks=[],!this.pattern.length)return;const p=(v,x)=>{this.chunks.push({pattern:v,alphabet:$Pt(v),startIndex:x})},m=this.pattern.length;if(m>ew){let v=0;const x=m%ew,y=m-x;for(;v<y;)p(this.pattern.substr(v,ew),v),v+=ew;if(x){const _=m-ew;p(this.pattern.substr(_),_)}}else p(this.pattern,0)}searchIn(e){const{isCaseSensitive:r,includeMatches:n}=this.options;if(r||(e=e.toLowerCase()),this.pattern===e){let y={isMatch:!0,score:0};return n&&(y.indices=[[0,e.length-1]]),y}const{location:i,distance:o,threshold:a,findAllMatches:s,minMatchCharLength:l,ignoreLocation:u}=this.options;let p=[],m=0,v=!1;this.chunks.forEach(({pattern:y,alphabet:_,startIndex:w})=>{const{isMatch:C,score:E,indices:T}=NPt(e,y,_,{location:i+w,distance:o,threshold:a,findAllMatches:s,minMatchCharLength:l,includeMatches:n,ignoreLocation:u});C&&(v=!0),m+=E,C&&T&&(p=[...p,...T])});let x={isMatch:v,score:v?m/this.chunks.length:1};return v&&n&&(x.indices=p),x}}class w_{constructor(e){this.pattern=e}static isMultiMatch(e){return fve(e,this.multiRegex)}static isSingleMatch(e){return fve(e,this.singleRegex)}search(){}}function fve(t,e){const r=t.match(e);return r?r[1]:null}class FPt extends w_{constructor(e){super(e)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(e){const r=e===this.pattern;return{isMatch:r,score:r?0:1,indices:[0,this.pattern.length-1]}}}class zPt extends w_{constructor(e){super(e)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){const n=e.indexOf(this.pattern)===-1;return{isMatch:n,score:n?0:1,indices:[0,e.length-1]}}}class BPt extends w_{constructor(e){super(e)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(e){const r=e.startsWith(this.pattern);return{isMatch:r,score:r?0:1,indices:[0,this.pattern.length-1]}}}class jPt extends w_{constructor(e){super(e)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(e){const r=!e.startsWith(this.pattern);return{isMatch:r,score:r?0:1,indices:[0,e.length-1]}}}class UPt extends w_{constructor(e){super(e)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(e){const r=e.endsWith(this.pattern);return{isMatch:r,score:r?0:1,indices:[e.length-this.pattern.length,e.length-1]}}}class VPt extends w_{constructor(e){super(e)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(e){const r=!e.endsWith(this.pattern);return{isMatch:r,score:r?0:1,indices:[0,e.length-1]}}}class dve extends w_{constructor(e,{location:r=zi.location,threshold:n=zi.threshold,distance:i=zi.distance,includeMatches:o=zi.includeMatches,findAllMatches:a=zi.findAllMatches,minMatchCharLength:s=zi.minMatchCharLength,isCaseSensitive:l=zi.isCaseSensitive,ignoreLocation:u=zi.ignoreLocation}={}){super(e);this._bitapSearch=new uve(e,{location:r,threshold:n,distance:i,includeMatches:o,findAllMatches:a,minMatchCharLength:s,isCaseSensitive:l,ignoreLocation:u})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}}class hve extends w_{constructor(e){super(e)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let r=0,n;const i=[],o=this.pattern.length;for(;(n=e.indexOf(this.pattern,r))>-1;)r=n+o,i.push([n,r-1]);const a=!!i.length;return{isMatch:a,score:a?0:1,indices:i}}}const _G=[FPt,hve,BPt,jPt,VPt,UPt,zPt,dve],pve=_G.length,HPt=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,WPt="|";function GPt(t,e={}){return t.split(WPt).map(r=>{let n=r.trim().split(HPt).filter(o=>o&&!!o.trim()),i=[];for(let o=0,a=n.length;o<a;o+=1){const s=n[o];let l=!1,u=-1;for(;!l&&++u<pve;){const p=_G[u];let m=p.isMultiMatch(s);m&&(i.push(new p(m,e)),l=!0)}if(!l)for(u=-1;++u<pve;){const p=_G[u];let m=p.isSingleMatch(s);if(m){i.push(new p(m,e));break}}}return i})}const qPt=new Set([dve.type,hve.type]);class XPt{constructor(e,{isCaseSensitive:r=zi.isCaseSensitive,includeMatches:n=zi.includeMatches,minMatchCharLength:i=zi.minMatchCharLength,ignoreLocation:o=zi.ignoreLocation,findAllMatches:a=zi.findAllMatches,location:s=zi.location,threshold:l=zi.threshold,distance:u=zi.distance}={}){this.query=null,this.options={isCaseSensitive:r,includeMatches:n,minMatchCharLength:i,findAllMatches:a,ignoreLocation:o,location:s,threshold:l,distance:u},this.pattern=r?e:e.toLowerCase(),this.query=GPt(this.pattern,this.options)}static condition(e,r){return r.useExtendedSearch}searchIn(e){const r=this.query;if(!r)return{isMatch:!1,score:1};const{includeMatches:n,isCaseSensitive:i}=this.options;e=i?e:e.toLowerCase();let o=0,a=[],s=0;for(let l=0,u=r.length;l<u;l+=1){const p=r[l];a.length=0,o=0;for(let m=0,v=p.length;m<v;m+=1){const x=p[m],{isMatch:y,indices:_,score:w}=x.search(e);if(y){if(o+=1,s+=w,n){const C=x.constructor.type;qPt.has(C)?a=[...a,..._]:a.push(_)}}else{s=0,o=0,a.length=0;break}}if(o){let m={isMatch:!0,score:s/o};return n&&(m.indices=a),m}}return{isMatch:!1,score:1}}}const bG=[];function YPt(...t){bG.push(...t)}function wG(t,e){for(let r=0,n=bG.length;r<n;r+=1){let i=bG[r];if(i.condition(t,e))return new i(t,e)}return new uve(t,e)}const h4={AND:"$and",OR:"$or"},CG={PATH:"$path",PATTERN:"$val"},EG=t=>!!(t[h4.AND]||t[h4.OR]),KPt=t=>!!t[CG.PATH],ZPt=t=>!i0(t)&&ive(t)&&!EG(t),mve=t=>({[h4.AND]:Object.keys(t).map(e=>({[e]:t[e]}))});function gve(t,e,{auto:r=!0}={}){const n=i=>{let o=Object.keys(i);const a=KPt(i);if(!a&&o.length>1&&!EG(i))return n(mve(i));if(ZPt(i)){const l=a?i[CG.PATH]:o[0],u=a?i[CG.PATTERN]:i[l];if(!Cv(u))throw new Error(wPt(l));const p={keyId:yG(l),pattern:u};return r&&(p.searcher=wG(u,e)),p}let s={children:[],operator:o[0]};return o.forEach(l=>{const u=i[l];i0(u)&&u.forEach(p=>{s.children.push(n(p))})}),s};return EG(t)||(t=mve(t)),n(t)}function QPt(t,{ignoreFieldNorm:e=zi.ignoreFieldNorm}){t.forEach(r=>{let n=1;r.matches.forEach(({key:i,norm:o,score:a})=>{const s=i?i.weight:null;n*=Math.pow(a===0&&s?Number.EPSILON:a,(s||1)*(e?1:o))}),r.score=n})}function JPt(t,e){const r=t.matches;e.matches=[],!!Ch(r)&&r.forEach(n=>{if(!Ch(n.indices)||!n.indices.length)return;const{indices:i,value:o}=n;let a={indices:i,value:o};n.key&&(a.key=n.key.src),n.idx>-1&&(a.refIndex=n.idx),e.matches.push(a)})}function eIt(t,e){e.score=t.score}function tIt(t,e,{includeMatches:r=zi.includeMatches,includeScore:n=zi.includeScore}={}){const i=[];return r&&i.push(JPt),n&&i.push(eIt),t.map(o=>{const{idx:a}=o,s={item:e[a],refIndex:a};return i.length&&i.forEach(l=>{l(o,s)}),s})}class NA{constructor(e,r={},n){this.options=io(io({},zi),r),this.options.useExtendedSearch,this._keyStore=new TPt(this.options.keys),this.setCollection(e,n)}setCollection(e,r){if(this._docs=e,r&&!(r instanceof xG))throw new Error(bPt);this._myIndex=r||cve(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(e){!Ch(e)||(this._docs.push(e),this._myIndex.add(e))}remove(e=()=>!1){const r=[];for(let n=0,i=this._docs.length;n<i;n+=1){const o=this._docs[n];e(o,n)&&(this.removeAt(n),n-=1,i-=1,r.push(o))}return r}removeAt(e){this._docs.splice(e,1),this._myIndex.removeAt(e)}getIndex(){return this._myIndex}search(e,{limit:r=-1}={}){const{includeMatches:n,includeScore:i,shouldSort:o,sortFn:a,ignoreFieldNorm:s}=this.options;let l=Cv(e)?Cv(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e);return QPt(l,{ignoreFieldNorm:s}),o&&l.sort(a),nve(r)&&r>-1&&(l=l.slice(0,r)),tIt(l,this._docs,{includeMatches:n,includeScore:i})}_searchStringList(e){const r=wG(e,this.options),{records:n}=this._myIndex,i=[];return n.forEach(({v:o,i:a,n:s})=>{if(!Ch(o))return;const{isMatch:l,score:u,indices:p}=r.searchIn(o);l&&i.push({item:o,idx:a,matches:[{score:u,value:o,norm:s,indices:p}]})}),i}_searchLogical(e){const r=gve(e,this.options),n=(s,l,u)=>{if(!s.children){const{keyId:m,searcher:v}=s,x=this._findMatches({key:this._keyStore.get(m),value:this._myIndex.getValueForItemAtKeyId(l,m),searcher:v});return x&&x.length?[{idx:u,item:l,matches:x}]:[]}const p=[];for(let m=0,v=s.children.length;m<v;m+=1){const x=s.children[m],y=n(x,l,u);if(y.length)p.push(...y);else if(s.operator===h4.AND)return[]}return p},i=this._myIndex.records,o={},a=[];return i.forEach(({$:s,i:l})=>{if(Ch(s)){let u=n(r,s,l);u.length&&(o[l]||(o[l]={idx:l,item:s,matches:[]},a.push(o[l])),u.forEach(({matches:p})=>{o[l].matches.push(...p)}))}}),a}_searchObjectList(e){const r=wG(e,this.options),{keys:n,records:i}=this._myIndex,o=[];return i.forEach(({$:a,i:s})=>{if(!Ch(a))return;let l=[];n.forEach((u,p)=>{l.push(...this._findMatches({key:u,value:a[p],searcher:r}))}),l.length&&o.push({idx:s,item:a,matches:l})}),o}_findMatches({key:e,value:r,searcher:n}){if(!Ch(r))return[];let i=[];if(i0(r))r.forEach(({v:o,i:a,n:s})=>{if(!Ch(o))return;const{isMatch:l,score:u,indices:p}=n.searchIn(o);l&&i.push({score:u,key:e,value:o,idx:a,norm:s,indices:p})});else{const{v:o,n:a}=r,{isMatch:s,score:l,indices:u}=n.searchIn(o);s&&i.push({score:l,key:e,value:o,norm:a,indices:u})}return i}}NA.version="7.0.0";NA.createIndex=cve;NA.parseIndex=LPt;NA.config=zi;NA.parseQuery=gve;YPt(XPt);var SG={},rIt=sc.exports;Object.defineProperty(SG,"__esModule",{value:!0});var nIt=SG.default=void 0,iIt=rIt(ac),oIt=kc,sIt=(0,iIt.default)((0,oIt.jsx)("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 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"}),"Search");nIt=SG.default=sIt;var TG={},aIt=sc.exports;Object.defineProperty(TG,"__esModule",{value:!0});var lIt=TG.default=void 0,cIt=aIt(ac),uIt=kc,fIt=(0,cIt.default)((0,uIt.jsx)("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 3c-.46-4.17-3.77-7.48-7.94-7.94V1h-2v2.06C6.83 3.52 3.52 6.83 3.06 11H1v2h2.06c.46 4.17 3.77 7.48 7.94 7.94V23h2v-2.06c4.17-.46 7.48-3.77 7.94-7.94H23v-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"}),"GpsFixed");lIt=TG.default=fIt;var PG={},dIt=sc.exports;Object.defineProperty(PG,"__esModule",{value:!0});var hIt=PG.default=void 0,pIt=dIt(ac),mIt=kc,gIt=(0,pIt.default)((0,mIt.jsx)("path",{d:"M17 7h-4v2h4c1.65 0 3 1.35 3 3s-1.35 3-3 3h-4v2h4c2.76 0 5-2.24 5-5s-2.24-5-5-5zm-6 8H7c-1.65 0-3-1.35-3-3s1.35-3 3-3h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-2zm-3-4h8v2H8z"}),"LinkOutlined");hIt=PG.default=gIt;var IG={},vIt=sc.exports;Object.defineProperty(IG,"__esModule",{value:!0});var yIt=IG.default=void 0,xIt=vIt(ac),vve=kc,_It=(0,xIt.default)([(0,vve.jsx)("path",{d:"M19 8h-1V3H6v5H5c-1.66 0-3 1.34-3 3v6h4v4h12v-4h4v-6c0-1.66-1.34-3-3-3zM8 5h8v3H8V5zm8 12v2H8v-4h8v2zm2-2v-2H6v2H4v-4c0-.55.45-1 1-1h14c.55 0 1 .45 1 1v4h-2z"},"0"),(0,vve.jsx)("circle",{cx:"18",cy:"11.5",r:"1"},"1")],"PrintOutlined");yIt=IG.default=_It;var bIt=GL,wIt=0;function CIt(t){var e=++wIt;return bIt(t)+e}var lOt=CIt,MG={},AG={exports:{}};(function(t){function e(r){return r&&r.__esModule?r:{default:r}}t.exports=e,t.exports.default=t.exports,t.exports.__esModule=!0})(AG);var RG={exports:{}},yve={exports:{}};(function(t){function e(r){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?(t.exports=e=function(i){return typeof i},t.exports.default=t.exports,t.exports.__esModule=!0):(t.exports=e=function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},t.exports.default=t.exports,t.exports.__esModule=!0),e(r)}t.exports=e,t.exports.default=t.exports,t.exports.__esModule=!0})(yve);(function(t){var e=yve.exports.default;function r(i){if(typeof WeakMap!="function")return null;var o=new WeakMap,a=new WeakMap;return(r=function(l){return l?a:o})(i)}function n(i,o){if(!o&&i&&i.__esModule)return i;if(i===null||e(i)!=="object"&&typeof i!="function")return{default:i};var a=r(o);if(a&&a.has(i))return a.get(i);var s={},l=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in i)if(u!=="default"&&Object.prototype.hasOwnProperty.call(i,u)){var p=l?Object.getOwnPropertyDescriptor(i,u):null;p&&(p.get||p.set)?Object.defineProperty(s,u,p):s[u]=i[u]}return s.default=i,a&&a.set(i,s),s}t.exports=n,t.exports.default=t.exports,t.exports.__esModule=!0})(RG);var kG={},EIt=PT(lCe);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return e.createSvgIcon}});var e=EIt})(kG);var SIt=AG.exports,TIt=RG.exports;Object.defineProperty(MG,"__esModule",{value:!0});var PIt=MG.default=void 0,IIt=TIt(Y.exports),MIt=SIt(kG),AIt=(0,MIt.default)(IIt.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"}),"Link");PIt=MG.default=AIt;var OG={},RIt=AG.exports,kIt=RG.exports;Object.defineProperty(OG,"__esModule",{value:!0});var OIt=OG.default=void 0,LIt=kIt(Y.exports),DIt=RIt(kG),NIt=(0,DIt.default)(LIt.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.11C3.29 8.12 2 9.91 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"}),"LinkOff");OIt=OG.default=NIt;var xve={exports:{}};/*! dom-to-image-more 16-10-2024 */(function(t,e){(r=>{let n=(()=>{let Z=0;return{escape:function($){return $.replace(/([.*+?^${}()|[\]/\\])/g,"\\$1")},isDataUrl:function($){return $.search(/^(data:)/)!==-1},canvasToBlob:function($){return $.toBlob?new Promise(function(z){$.toBlob(z)}):(z=>new Promise(function(O){var F=x(z.toDataURL().split(",")[1]),G=F.length,q=new Uint8Array(G);for(let ee=0;ee<G;ee++)q[ee]=F.charCodeAt(ee);O(new Blob([q],{type:"image/png"}))}))($)},resolveUrl:function($,z){var O=document.implementation.createHTMLDocument(),F=O.createElement("base"),G=(O.head.appendChild(F),O.createElement("a"));return O.body.appendChild(G),F.href=z,G.href=$,G.href},getAndEncode:function($){let z=p.impl.urlCache.find(function(O){return O.url===$});return z||(z={url:$,promise:null},p.impl.urlCache.push(z)),z.promise===null&&(p.impl.options.cacheBust&&($+=(/\?/.test($)?"&":"?")+new Date().getTime()),z.promise=new Promise(function(O){let F=p.impl.options.httpTimeout,G=new XMLHttpRequest;if(G.onreadystatechange=function(){if(G.readyState===4)if(300<=G.status)ee?O(ee):re(`cannot fetch resource: ${$}, status: `+G.status);else{let ce=new FileReader;ce.onloadend=function(){O(ce.result)},ce.readAsDataURL(G.response)}},G.ontimeout=function(){ee?O(ee):re(`timeout of ${F}ms occured while fetching resource: `+$)},G.responseType="blob",G.timeout=F,0<p.impl.options.useCredentialsFilters.length&&(p.impl.options.useCredentials=0<p.impl.options.useCredentialsFilters.filter(ce=>0<=$.search(ce)).length),p.impl.options.useCredentials&&(G.withCredentials=!0),p.impl.options.corsImg&&$.indexOf("http")===0&&$.indexOf(window.location.origin)===-1){var q=(p.impl.options.corsImg.method||"GET").toUpperCase()==="POST"?"POST":"GET";G.open(q,(p.impl.options.corsImg.url||"").replace("#{cors}",$),!0);let ce=!1,fe=p.impl.options.corsImg.headers||{},J=(Object.keys(fe).forEach(function(oe){fe[oe].indexOf("application/json")!==-1&&(ce=!0),G.setRequestHeader(oe,fe[oe])}),(oe=>{try{return JSON.parse(JSON.stringify(oe))}catch(ve){re("corsImg.data is missing or invalid:"+ve.toString())}})(p.impl.options.corsImg.data||""));Object.keys(J).forEach(function(oe){typeof J[oe]=="string"&&(J[oe]=J[oe].replace("#{cors}",$))}),G.send(ce?JSON.stringify(J):J)}else G.open("GET",$,!0),G.send();let ee;function re(ce){console.error(ce),O("")}p.impl.options.imagePlaceholder&&(q=p.impl.options.imagePlaceholder.split(/,/))&&q[1]&&(ee=q[1])})),z.promise},uid:function(){return"u"+("0000"+(Math.random()*Math.pow(36,4)<<0).toString(36)).slice(-4)+Z++},delay:function($){return function(z){return new Promise(function(O){setTimeout(function(){O(z)},$)})}},asArray:function($){var z=[],O=$.length;for(let F=0;F<O;F++)z.push($[F]);return z},escapeXhtml:function($){return $.replace(/%/g,"%25").replace(/#/g,"%23").replace(/\n/g,"%0A")},makeImage:function($){return $!=="data:,"?new Promise(function(z,O){let F=document.createElementNS("http://www.w3.org/2000/svg","svg"),G=new Image;p.impl.options.useCredentials&&(G.crossOrigin="use-credentials"),G.onload=function(){document.body.removeChild(F),window&&window.requestAnimationFrame?window.requestAnimationFrame(function(){z(G)}):z(G)},G.onerror=q=>{document.body.removeChild(F),O(q)},F.appendChild(G),G.src=$,document.body.appendChild(F)}):Promise.resolve()},width:function($){var z=j($,"width");if(!isNaN(z))return z;var z=j($,"border-left-width"),O=j($,"border-right-width");return $.scrollWidth+z+O},height:function($){var z=j($,"height");if(!isNaN(z))return z;var z=j($,"border-top-width"),O=j($,"border-bottom-width");return $.scrollHeight+z+O},getWindow:W,isElement:N,isElementHostForOpenShadowRoot:function($){return N($)&&$.shadowRoot!==null},isShadowRoot:D,isInShadowRoot:H,isHTMLElement:function($){return $ instanceof W($).HTMLElement},isHTMLCanvasElement:function($){return $ instanceof W($).HTMLCanvasElement},isHTMLInputElement:function($){return $ instanceof W($).HTMLInputElement},isHTMLImageElement:function($){return $ instanceof W($).HTMLImageElement},isHTMLLinkElement:function($){return $ instanceof W($).HTMLLinkElement},isHTMLScriptElement:function($){return $ instanceof W($).HTMLScriptElement},isHTMLStyleElement:function($){return $ instanceof W($).HTMLStyleElement},isHTMLTextAreaElement:function($){return $ instanceof W($).HTMLTextAreaElement},isShadowSlotElement:function($){return H($)&&$ instanceof W($).HTMLSlotElement},isSVGElement:function($){return $ instanceof W($).SVGElement},isSVGRectElement:function($){return $ instanceof W($).SVGRectElement},isDimensionMissing:function($){return isNaN($)||$<=0}};function W($){return $=$?$.ownerDocument:void 0,($?$.defaultView:void 0)||window||r}function D($){return $ instanceof W($).ShadowRoot}function H($){return $!=null&&$.getRootNode!==void 0&&D($.getRootNode())}function N($){return $ instanceof W($).Element}function j($,z){if($.nodeType===m){let O=v($).getPropertyValue(z);if(O.slice(-2)==="px")return O=O.slice(0,-2),parseFloat(O)}return NaN}})(),i=(()=>{let Z=/url\(['"]?([^'"]+?)['"]?\)/g;return{inlineAll:function(N,j,$){return W(N)?Promise.resolve(N).then(D).then(function(z){let O=Promise.resolve(N);return z.forEach(function(F){O=O.then(function(G){return H(G,F,j,$)})}),O}):Promise.resolve(N)},shouldProcess:W,impl:{readUrls:D,inline:H}};function W(N){return N.search(Z)!==-1}function D(N){for(var j,$=[];(j=Z.exec(N))!==null;)$.push(j[1]);return $.filter(function(z){return!n.isDataUrl(z)})}function H(N,j,$,z){return Promise.resolve(j).then(function(O){return $?n.resolveUrl(O,$):O}).then(z||n.getAndEncode).then(function(O){return N.replace((F=j,new RegExp(`(url\\(['"]?)(${n.escape(F)})(['"]?\\))`,"g")),`$1${O}$3`);var F})}})(),o={resolveAll:function(){return a().then(function(Z){return Promise.all(Z.map(function(W){return W.resolve()}))}).then(function(Z){return Z.join(` `)})},impl:{readAll:a}};function a(){return Promise.resolve(n.asArray(document.styleSheets)).then(function(W){let D=[];return W.forEach(function(H){var N=Object.getPrototypeOf(H);if(Object.prototype.hasOwnProperty.call(N,"cssRules"))try{n.asArray(H.cssRules||[]).forEach(D.push.bind(D))}catch(j){console.error("domtoimage: Error while reading CSS rules from "+H.href,j.toString())}}),D}).then(function(W){return W.filter(function(D){return D.type===CSSRule.FONT_FACE_RULE}).filter(function(D){return i.shouldProcess(D.style.getPropertyValue("src"))})}).then(function(W){return W.map(Z)});function Z(W){return{resolve:function(){var D=(W.parentStyleSheet||{}).href;return i.inlineAll(W.cssText,D)},src:function(){return W.style.getPropertyValue("src")}}}}let s={inlineAll:function Z(W){if(!n.isElement(W))return Promise.resolve(W);return D(W).then(function(){return n.isHTMLImageElement(W)?l(W).inline():Promise.all(n.asArray(W.childNodes).map(function(H){return Z(H)}))});function D(H){let N=["background","background-image"],j=N.map(function($){let z=H.style.getPropertyValue($),O=H.style.getPropertyPriority($);return z?i.inlineAll(z).then(function(F){H.style.setProperty($,F,O)}):Promise.resolve()});return Promise.all(j).then(function(){return H})}},impl:{newImage:l}};function l(Z){return{inline:function(W){return n.isDataUrl(Z.src)?Promise.resolve():Promise.resolve(Z.src).then(W||n.getAndEncode).then(function(D){return new Promise(function(H){Z.onload=H,Z.onerror=H,Z.src=D})})}}}let u={copyDefaultStyles:!0,imagePlaceholder:void 0,cacheBust:!1,useCredentials:!1,useCredentialsFilters:[],httpTimeout:3e4,styleCaching:"strict",corsImg:void 0,adjustClonedNode:void 0},p={toSvg:y,toPng:function(Z,W){return _(Z,W).then(function(D){return D.toDataURL()})},toJpeg:function(Z,W){return _(Z,W).then(function(D){return D.toDataURL("image/jpeg",(W?W.quality:void 0)||1)})},toBlob:function(Z,W){return _(Z,W).then(n.canvasToBlob)},toPixelData:function(Z,W){return _(Z,W).then(function(D){return D.getContext("2d").getImageData(0,0,n.width(Z),n.height(Z)).data})},toCanvas:_,impl:{fontFaces:o,images:s,util:n,inliner:i,urlCache:[],options:{}}},m=(t.exports=p,(typeof Node!="undefined"?Node.ELEMENT_NODE:void 0)||1),v=(r!==void 0?r.getComputedStyle:void 0)||(typeof window!="undefined"?window.getComputedStyle:void 0)||globalThis.getComputedStyle,x=(r!==void 0?r.atob:void 0)||(typeof window!="undefined"?window.atob:void 0)||globalThis.atob;function y(Z,W){p.impl.util.getWindow(Z);var D=W=W||{};D.copyDefaultStyles===void 0?p.impl.options.copyDefaultStyles=u.copyDefaultStyles:p.impl.options.copyDefaultStyles=D.copyDefaultStyles,p.impl.options.imagePlaceholder=(D.imagePlaceholder===void 0?u:D).imagePlaceholder,p.impl.options.cacheBust=(D.cacheBust===void 0?u:D).cacheBust,p.impl.options.corsImg=(D.corsImg===void 0?u:D).corsImg,p.impl.options.useCredentials=(D.useCredentials===void 0?u:D).useCredentials,p.impl.options.useCredentialsFilters=(D.useCredentialsFilters===void 0?u:D).useCredentialsFilters,p.impl.options.httpTimeout=(D.httpTimeout===void 0?u:D).httpTimeout,p.impl.options.styleCaching=(D.styleCaching===void 0?u:D).styleCaching;let H=[];return Promise.resolve(Z).then(function(N){if(N.nodeType===m)return N;var j=N,$=N.parentNode,z=document.createElement("span");return $.replaceChild(z,j),z.append(N),H.push({parent:$,child:j,wrapper:z}),z}).then(function(N){return function j($,z,O,F){let G=z.filter;if($===w||n.isHTMLScriptElement($)||n.isHTMLStyleElement($)||n.isHTMLLinkElement($)||O!==null&&G&&!G($))return Promise.resolve();return Promise.resolve($).then(q).then(ee).then(function(oe){return fe(oe,ce($))}).then(re).then(function(oe){return J(oe,$)});function q(oe){return n.isHTMLCanvasElement(oe)?n.makeImage(oe.toDataURL()):oe.cloneNode(!1)}function ee(oe){return z.adjustClonedNode&&z.adjustClonedNode($,oe,!1),Promise.resolve(oe)}function re(oe){return z.adjustClonedNode&&z.adjustClonedNode($,oe,!0),Promise.resolve(oe)}function ce(oe){return n.isElementHostForOpenShadowRoot(oe)?oe.shadowRoot:oe}function fe(oe,ve){let ye=me(ve),xe=Promise.resolve();if(ye.length!==0){let pe=v(se(ve));n.asArray(ye).forEach(function(Ce){xe=xe.then(function(){return j(Ce,z,pe).then(function(Pe){Pe&&oe.appendChild(Pe)})})})}return xe.then(function(){return oe});function se(pe){return n.isShadowRoot(pe)?pe.host:pe}function me(pe){if(n.isShadowSlotElement(pe)){let Ce=pe.assignedNodes();if(Ce&&0<Ce.length)return Ce}return pe.childNodes}}function J(oe,ve){return!n.isElement(oe)||n.isShadowSlotElement(ve)?Promise.resolve(oe):Promise.resolve().then(ye).then(xe).then(se).then(me).then(function(){return oe});function ye(){function pe(Pe,Re){Re.font=Pe.font,Re.fontFamily=Pe.fontFamily,Re.fontFeatureSettings=Pe.fontFeatureSettings,Re.fontKerning=Pe.fontKerning,Re.fontSize=Pe.fontSize,Re.fontStretch=Pe.fontStretch,Re.fontStyle=Pe.fontStyle,Re.fontVariant=Pe.fontVariant,Re.fontVariantCaps=Pe.fontVariantCaps,Re.fontVariantEastAsian=Pe.fontVariantEastAsian,Re.fontVariantLigatures=Pe.fontVariantLigatures,Re.fontVariantNumeric=Pe.fontVariantNumeric,Re.fontVariationSettings=Pe.fontVariationSettings,Re.fontWeight=Pe.fontWeight}function Ce(Pe,Re){let ke=v(Pe);ke.cssText?(Re.style.cssText=ke.cssText,pe(ke,Re.style)):(T(z,Pe,ke,O,Re),O===null&&(["inset-block","inset-block-start","inset-block-end"].forEach(ze=>Re.style.removeProperty(ze)),["left","right","top","bottom"].forEach(ze=>{Re.style.getPropertyValue(ze)&&Re.style.setProperty(ze,"0px")})))}Ce(ve,oe)}function xe(){let pe=n.uid();function Ce(Pe){let Re=v(ve,Pe),ke=Re.getPropertyValue("content");if(ke!==""&&ke!=="none"){let ht=function(){let Tt=`.${pe}:`+Pe,xt=(Re.cssText?pt:It)();return document.createTextNode(Tt+`{${xt}}`);function pt(){return`${Re.cssText} content: ${ke};`}function It(){return n.asArray(Re).map(de).join("; ")+";";function de(Te){let Be=Re.getPropertyValue(Te),Ke=Re.getPropertyPriority(Te)?" !important":"";return Te+": "+Be+Ke}}},ze=oe.getAttribute("class")||"",Ge=(oe.setAttribute("class",ze+" "+pe),document.createElement("style"));Ge.appendChild(ht()),oe.appendChild(Ge)}}[":before",":after"].forEach(function(Pe){Ce(Pe)})}function se(){n.isHTMLTextAreaElement(ve)&&(oe.innerHTML=ve.value),n.isHTMLInputElement(ve)&&oe.setAttribute("value",ve.value)}function me(){n.isSVGElement(oe)&&(oe.setAttribute("xmlns","http://www.w3.org/2000/svg"),n.isSVGRectElement(oe))&&["width","height"].forEach(function(pe){let Ce=oe.getAttribute(pe);Ce&&oe.style.setProperty(pe,Ce)})}}}(N,W,null)}).then(W.disableEmbedFonts?Promise.resolve(Z):C).then(E).then(function(N){W.bgcolor&&(N.style.backgroundColor=W.bgcolor),W.width&&(N.style.width=W.width+"px"),W.height&&(N.style.height=W.height+"px"),W.style&&Object.keys(W.style).forEach(function($){N.style[$]=W.style[$]});let j=null;return typeof W.onclone=="function"&&(j=W.onclone(N)),Promise.resolve(j).then(function(){return N})}).then(function(N){let j=W.width||n.width(N),$=W.height||n.height(N);return Promise.resolve(N).then(function(z){return z.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),new XMLSerializer().serializeToString(z)}).then(n.escapeXhtml).then(function(z){var O=(n.isDimensionMissing(j)?' width="100%"':` width="${j}"`)+(n.isDimensionMissing($)?' height="100%"':` height="${$}"`);return`<svg xmlns="http://www.w3.org/2000/svg"${(n.isDimensionMissing(j)?"":` width="${j}"`)+(n.isDimensionMissing($)?"":` height="${$}"`)}><foreignObject${O}>${z}</foreignObject></svg>`}).then(function(z){return"data:image/svg+xml;charset=utf-8,"+z})}).then(function(N){for(;0<H.length;){var j=H.pop();j.parent.replaceChild(j.child,j.wrapper)}return N}).then(function(N){return p.impl.urlCache=[],(()=>{w&&(document.body.removeChild(w),w=null),A&&clearTimeout(A),A=setTimeout(()=>{A=null,k={}},2e4)})(),N})}function _(Z,W){return y(Z,W=W||{}).then(n.makeImage).then(function(D){var H=typeof W.scale!="number"?1:W.scale,N=(($,z)=>{let O=W.width||n.width($),F=W.height||n.height($);return n.isDimensionMissing(O)&&(O=n.isDimensionMissing(F)?300:2*F),n.isDimensionMissing(F)&&(F=O/2),($=document.createElement("canvas")).width=O*z,$.height=F*z,W.bgcolor&&((z=$.getContext("2d")).fillStyle=W.bgcolor,z.fillRect(0,0,$.width,$.height)),$})(Z,H),j=N.getContext("2d");return j.msImageSmoothingEnabled=!1,j.imageSmoothingEnabled=!1,D&&(j.scale(H,H),j.drawImage(D,0,0)),N})}let w=null;function C(Z){return o.resolveAll().then(function(W){var D;return W!==""&&(D=document.createElement("style"),Z.appendChild(D),D.appendChild(document.createTextNode(W))),Z})}function E(Z){return s.inlineAll(Z).then(function(){return Z})}function T(Z,W,D,H,N){let j=p.impl.options.copyDefaultStyles?((z,O)=>{var F,G=(re=>(z.styleCaching!=="relaxed"?re:re.filter((ce,fe,J)=>fe===0||fe===J.length-1)).join(">"))(O=(re=>{var ce=[];do if(re.nodeType===m){var fe=re.tagName;if(ce.push(fe),X.includes(fe))break}while(re=re.parentNode);return ce})(O));{if(k[G])return k[G];O=((re,ce)=>{let fe=re.body;do{var J=ce.pop(),J=re.createElement(J);fe.appendChild(J),fe=J}while(0<ce.length);return fe.textContent="\u200B",fe})((F=(()=>{if(w)return w.contentWindow;ce=document.characterSet||"UTF-8",re=(re=document.doctype)?(`<!DOCTYPE ${xe(re.name)} ${xe(re.publicId)} `+xe(re.systemId)).trim()+">":"",(w=document.createElement("iframe")).id="domtoimage-sandbox-"+n.uid(),w.style.visibility="hidden",w.style.position="fixed",document.body.appendChild(w);var re,ce,fe=w,J="domtoimage-sandbox";try{return fe.contentWindow.document.write(re+`<html><head><meta charset='${ce}'><title>${J}</title></head><body></body></html>`),fe.contentWindow}catch{}var oe=document.createElement("meta");oe.setAttribute("charset",ce);try{var ve=document.implementation.createHTMLDocument(J),ye=(ve.head.appendChild(oe),re+ve.documentElement.outerHTML);return fe.setAttribute("srcdoc",ye),fe.contentWindow}catch{}return fe.contentDocument.head.appendChild(oe),fe.contentDocument.title=J,fe.contentWindow;function xe(se){var me;return se?((me=document.createElement("div")).innerText=se,me.innerHTML):""}})()).document,O),F=((re,ce)=>{let fe={},J=re.getComputedStyle(ce);return n.asArray(J).forEach(function(oe){fe[oe]=oe==="width"||oe==="height"?"auto":J.getPropertyValue(oe)}),fe})(F,O);var q=O;do{var ee=q.parentElement;ee!==null&&ee.removeChild(q),q=ee}while(q&&q.tagName!=="BODY");return k[G]=F}})(Z,W):{},$=N.style;n.asArray(D).forEach(function(z){var O,F=D.getPropertyValue(z),G=j[z],q=H?H.getPropertyValue(z):void 0;$.getPropertyValue(z)||(F!==G||H&&F!==q)&&(G=D.getPropertyPriority(z),q=$,F=F,G=G,O=0<=["background-clip"].indexOf(z=z),G?(q.setProperty(z,F,G),O&&q.setProperty("-webkit-"+z,F,G)):(q.setProperty(z,F),O&&q.setProperty("-webkit-"+z,F)))})}let A=null,k={},X=["ADDRESS","ARTICLE","ASIDE","BLOCKQUOTE","DETAILS","DIALOG","DD","DIV","DL","DT","FIELDSET","FIGCAPTION","FIGURE","FOOTER","FORM","H1","H2","H3","H4","H5","H6","HEADER","HGROUP","HR","LI","MAIN","NAV","OL","P","PRE","SECTION","SVG","TABLE","UL","math","svg","BODY","HEAD","HTML"]})(xl)})(xve);var cOt=xve.exports,LG={exports:{}};(function(t){(function(e,r){t.exports?(r.default=r,t.exports=e.document?r(e):r):(e.Highcharts&&e.Highcharts.error(16,!0),e.Highcharts=r(e))})(typeof window!="undefined"?window:xl,function(e){function r(i,o,a,s){i.hasOwnProperty(o)||(i[o]=s.apply(null,a),typeof CustomEvent=="function"&&e.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:o,module:i[o]}})))}var n={};return r(n,"Core/Globals.js",[],function(){var i;return function(o){o.SVG_NS="http://www.w3.org/2000/svg",o.product="Highcharts",o.version="10.3.3",o.win=typeof e!="undefined"?e:{},o.doc=o.win.document,o.svg=o.doc&&o.doc.createElementNS&&!!o.doc.createElementNS(o.SVG_NS,"svg").createSVGRect,o.userAgent=o.win.navigator&&o.win.navigator.userAgent||"",o.isChrome=o.userAgent.indexOf("Chrome")!==-1,o.isFirefox=o.userAgent.indexOf("Firefox")!==-1,o.isMS=/(edge|msie|trident)/i.test(o.userAgent)&&!o.win.opera,o.isSafari=!o.isChrome&&o.userAgent.indexOf("Safari")!==-1,o.isTouchDevice=/(Mobile|Android|Windows Phone)/.test(o.userAgent),o.isWebKit=o.userAgent.indexOf("AppleWebKit")!==-1,o.deg2rad=2*Math.PI/360,o.hasBidiBug=o.isFirefox&&4>parseInt(o.userAgent.split("Firefox/")[1],10),o.hasTouch=!!o.win.TouchEvent,o.marginNames=["plotTop","marginRight","marginBottom","plotLeft"],o.noop=function(){},o.supportsPassiveEvents=function(){var a=!1;if(!o.isMS){var s=Object.defineProperty({},"passive",{get:function(){a=!0}});o.win.addEventListener&&o.win.removeEventListener&&(o.win.addEventListener("testPassive",o.noop,s),o.win.removeEventListener("testPassive",o.noop,s))}return a}(),o.charts=[],o.dateFormats={},o.seriesTypes={},o.symbolSizes={},o.chartCount=0}(i||(i={})),i}),r(n,"Core/Utilities.js",[n["Core/Globals.js"]],function(i){function o(O,F,G,q){var ee=F?"Highcharts error":"Highcharts warning";O===32&&(O=""+ee+": Deprecated member");var re=x(O),ce=re?""+ee+" #"+O+": www.highcharts.com/errors/"+O+"/":O.toString();if(typeof q!="undefined"){var fe="";re&&(ce+="?"),X(q,function(J,oe){fe+=` - `.concat(oe,": ").concat(J),re&&(ce+=encodeURI(oe)+"="+encodeURI(J))}),ce+=fe}W(i,"displayError",{chart:G,code:O,message:ce,params:q},function(){if(F)throw Error(ce);N.console&&o.messages.indexOf(ce)===-1&&console.warn(ce)}),o.messages.push(ce)}function a(O,F){var G={};return X(O,function(q,ee){p(O[ee],!0)&&!O.nodeType&&F[ee]?(q=a(O[ee],F[ee]),Object.keys(q).length&&(G[ee]=q)):(p(O[ee])||O[ee]!==F[ee]||ee in O&&!(ee in F))&&(G[ee]=O[ee])}),G}function s(O,F){return parseInt(O,F||10)}function l(O){return typeof O=="string"}function u(O){return O=Object.prototype.toString.call(O),O==="[object Array]"||O==="[object Array Iterator]"}function p(O,F){return!!O&&typeof O=="object"&&(!F||!u(O))}function m(O){return p(O)&&typeof O.nodeType=="number"}function v(O){var F=O&&O.constructor;return!(!p(O,!0)||m(O)||!F||!F.name||F.name==="Object")}function x(O){return typeof O=="number"&&!isNaN(O)&&1/0>O&&-1/0<O}function y(O){return typeof O!="undefined"&&O!==null}function _(O,F,G){var q=l(F)&&!y(G),ee,re=function(ce,fe){y(ce)?O.setAttribute(fe,ce):q?(ee=O.getAttribute(fe))||fe!=="class"||(ee=O.getAttribute(fe+"Name")):O.removeAttribute(fe)};return l(F)?re(G,F):X(F,re),ee}function w(O,F){var G;O||(O={});for(G in F)O[G]=F[G];return O}function C(){for(var O=arguments,F=O.length,G=0;G<F;G++){var q=O[G];if(typeof q!="undefined"&&q!==null)return q}}function E(O,F){i.isMS&&!i.svg&&F&&y(F.opacity)&&(F.filter="alpha(opacity=".concat(100*F.opacity,")")),w(O.style,F)}function T(O){return Math.pow(10,Math.floor(Math.log(O)/Math.LN10))}function A(O,F){return 1e14<O?O:parseFloat(O.toPrecision(F||14))}function k(O,F,G){var q=i.getStyle||k;if(F==="width")return F=Math.min(O.offsetWidth,O.scrollWidth),G=O.getBoundingClientRect&&O.getBoundingClientRect().width,G<F&&G>=F-1&&(F=Math.floor(G)),Math.max(0,F-(q(O,"padding-left",!0)||0)-(q(O,"padding-right",!0)||0));if(F==="height")return Math.max(0,Math.min(O.offsetHeight,O.scrollHeight)-(q(O,"padding-top",!0)||0)-(q(O,"padding-bottom",!0)||0));if(N.getComputedStyle||o(27,!0),O=N.getComputedStyle(O,void 0)){var ee=O.getPropertyValue(F);C(G,F!=="opacity")&&(ee=s(ee))}return ee}function X(O,F,G){for(var q in O)Object.hasOwnProperty.call(O,q)&&F.call(G||O[q],O[q],q,O)}function Z(O,F,G){function q(fe,J){var oe=O.removeEventListener||i.removeEventListenerPolyfill;oe&&oe.call(O,fe,J,!1)}function ee(fe){var J;if(O.nodeName){if(F){var oe={};oe[F]=!0}else oe=fe;X(oe,function(ve,ye){if(fe[ye])for(J=fe[ye].length;J--;)q(ye,fe[ye][J].fn)})}}var re=typeof O=="function"&&O.prototype||O;if(Object.hasOwnProperty.call(re,"hcEvents")){var ce=re.hcEvents;F?(re=ce[F]||[],G?(ce[F]=re.filter(function(fe){return G!==fe.fn}),q(F,G)):(ee(ce),ce[F]=[])):(ee(ce),delete re.hcEvents)}}function W(O,F,G,q){if(G=G||{},H.createEvent&&(O.dispatchEvent||O.fireEvent&&O!==i)){var ee=H.createEvent("Events");ee.initEvent(F,!0,!0),G=w(ee,G),O.dispatchEvent?O.dispatchEvent(G):O.fireEvent(F,G)}else if(O.hcEvents){G.target||w(G,{preventDefault:function(){G.defaultPrevented=!0},target:O,type:F}),ee=[];for(var re=O,ce=!1;re.hcEvents;)Object.hasOwnProperty.call(re,"hcEvents")&&re.hcEvents[F]&&(ee.length&&(ce=!0),ee.unshift.apply(ee,re.hcEvents[F])),re=Object.getPrototypeOf(re);ce&&ee.sort(function(fe,J){return fe.order-J.order}),ee.forEach(function(fe){fe.fn.call(O,G)===!1&&G.preventDefault()})}q&&!G.defaultPrevented&&q.call(O,G)}var D=i.charts,H=i.doc,N=i.win;(o||(o={})).messages=[],Math.easeInOutSine=function(O){return-.5*(Math.cos(Math.PI*O)-1)};var j=Array.prototype.find?function(O,F){return O.find(F)}:function(O,F){var G,q=O.length;for(G=0;G<q;G++)if(F(O[G],G))return O[G]};X({map:"map",each:"forEach",grep:"filter",reduce:"reduce",some:"some"},function(O,F){i[F]=function(G){var q;return o(32,!1,void 0,(q={},q["Highcharts.".concat(F)]="use Array.".concat(O),q)),Array.prototype[O].apply(G,[].slice.call(arguments,1))}});var $,z=function(){var O=Math.random().toString(36).substring(2,9)+"-",F=0;return function(){return"highcharts-"+($?"":O)+F++}}();return N.jQuery&&(N.jQuery.fn.highcharts=function(){var O=[].slice.call(arguments);if(this[0])return O[0]?(new i[l(O[0])?O.shift():"Chart"](this[0],O[0],O[1]),this):D[_(this[0],"data-highcharts-chart")]}),j={addEvent:function(O,F,G,q){q===void 0&&(q={});var ee=typeof O=="function"&&O.prototype||O;Object.hasOwnProperty.call(ee,"hcEvents")||(ee.hcEvents={}),ee=ee.hcEvents,i.Point&&O instanceof i.Point&&O.series&&O.series.chart&&(O.series.chart.runTrackerClick=!0);var re=O.addEventListener||i.addEventListenerPolyfill;return re&&re.call(O,F,G,i.supportsPassiveEvents?{passive:q.passive===void 0?F.indexOf("touch")!==-1:q.passive,capture:!1}:!1),ee[F]||(ee[F]=[]),ee[F].push({fn:G,order:typeof q.order=="number"?q.order:1/0}),ee[F].sort(function(ce,fe){return ce.order-fe.order}),function(){Z(O,F,G)}},arrayMax:function(O){for(var F=O.length,G=O[0];F--;)O[F]>G&&(G=O[F]);return G},arrayMin:function(O){for(var F=O.length,G=O[0];F--;)O[F]<G&&(G=O[F]);return G},attr:_,clamp:function(O,F,G){return O>F?O<G?O:G:F},cleanRecursively:a,clearTimeout:function(O){y(O)&&clearTimeout(O)},correctFloat:A,createElement:function(O,F,G,q,ee){return O=H.createElement(O),F&&w(O,F),ee&&E(O,{padding:"0",border:"none",margin:"0"}),G&&E(O,G),q&&q.appendChild(O),O},css:E,defined:y,destroyObjectProperties:function(O,F){X(O,function(G,q){G&&G!==F&&G.destroy&&G.destroy(),delete O[q]})},discardElement:function(O){O&&O.parentElement&&O.parentElement.removeChild(O)},erase:function(O,F){for(var G=O.length;G--;)if(O[G]===F){O.splice(G,1);break}},error:o,extend:w,extendClass:function(O,F){var G=function(){};return G.prototype=new O,w(G.prototype,F),G},find:j,fireEvent:W,getMagnitude:T,getNestedProperty:function(O,F){for(O=O.split(".");O.length&&y(F);){var G=O.shift();if(typeof G=="undefined"||G==="__proto__"||(F=F[G],!y(F)||typeof F=="function"||typeof F.nodeType=="number"||F===N))return}return F},getStyle:k,inArray:function(O,F,G){return o(32,!1,void 0,{"Highcharts.inArray":"use Array.indexOf"}),F.indexOf(O,G)},isArray:u,isClass:v,isDOMElement:m,isFunction:function(O){return typeof O=="function"},isNumber:x,isObject:p,isString:l,keys:function(O){return o(32,!1,void 0,{"Highcharts.keys":"use Object.keys"}),Object.keys(O)},merge:function(){var O,F=arguments,G={},q=function(re,ce){return typeof re!="object"&&(re={}),X(ce,function(fe,J){J!=="__proto__"&&J!=="constructor"&&(!p(fe,!0)||v(fe)||m(fe)?re[J]=ce[J]:re[J]=q(re[J]||{},fe))}),re};F[0]===!0&&(G=F[1],F=Array.prototype.slice.call(F,2));var ee=F.length;for(O=0;O<ee;O++)G=q(G,F[O]);return G},normalizeTickInterval:function(O,F,G,q,ee){var re=O;G=C(G,T(O));var ce=O/G;for(F||(F=ee?[1,1.2,1.5,2,2.5,3,4,5,6,8,10]:[1,2,2.5,5,10],q===!1&&(G===1?F=F.filter(function(fe){return fe%1==0}):.1>=G&&(F=[1/G]))),q=0;q<F.length&&(re=F[q],!(ee&&re*G>=O||!ee&&ce<=(F[q]+(F[q+1]||F[q]))/2));q++);return re=A(re*G,-Math.round(Math.log(.001)/Math.LN10))},objectEach:X,offset:function(O){var F=H.documentElement;return O=O.parentElement||O.parentNode?O.getBoundingClientRect():{top:0,left:0,width:0,height:0},{top:O.top+(N.pageYOffset||F.scrollTop)-(F.clientTop||0),left:O.left+(N.pageXOffset||F.scrollLeft)-(F.clientLeft||0),width:O.width,height:O.height}},pad:function(O,F,G){return Array((F||2)+1-String(O).replace("-","").length).join(G||"0")+O},pick:C,pInt:s,relativeLength:function(O,F,G){return/%$/.test(O)?F*parseFloat(O)/100+(G||0):parseFloat(O)},removeEvent:Z,splat:function(O){return u(O)?O:[O]},stableSort:function(O,F){var G=O.length,q,ee;for(ee=0;ee<G;ee++)O[ee].safeI=ee;for(O.sort(function(re,ce){return q=F(re,ce),q===0?re.safeI-ce.safeI:q}),ee=0;ee<G;ee++)delete O[ee].safeI},syncTimeout:function(O,F,G){return 0<F?setTimeout(O,F,G):(O.call(0,G),-1)},timeUnits:{millisecond:1,second:1e3,minute:6e4,hour:36e5,day:864e5,week:6048e5,month:24192e5,year:314496e5},uniqueKey:z,useSerialIds:function(O){return $=C(O,$)},wrap:function(O,F,G){var q=O[F];O[F]=function(){var ee=arguments,re=this;return G.apply(this,[function(){return q.apply(re,arguments.length?arguments:ee)}].concat([].slice.call(arguments)))}}},j}),r(n,"Core/Chart/ChartDefaults.js",[],function(){return{alignThresholds:!1,panning:{enabled:!1,type:"x"},styledMode:!1,borderRadius:0,colorCount:10,allowMutatingData:!0,defaultSeriesType:"line",ignoreHiddenSeries:!0,spacing:[10,10,15,10],resetZoomButton:{theme:{zIndex:6},position:{align:"right",x:-10,y:10}},zoomBySingleTouch:!1,zooming:{singleTouch:!1,resetButton:{theme:{zIndex:6},position:{align:"right",x:-10,y:10}}},width:null,height:null,borderColor:"#335cad",backgroundColor:"#ffffff",plotBorderColor:"#cccccc"}}),r(n,"Core/Color/Color.js",[n["Core/Globals.js"],n["Core/Utilities.js"]],function(i,o){var a=o.isNumber,s=o.merge,l=o.pInt;return o=function(){function u(p){this.rgba=[NaN,NaN,NaN,NaN],this.input=p;var m=i.Color;if(m&&m!==u)return new m(p);if(!(this instanceof u))return new u(p);this.init(p)}return u.parse=function(p){return p?new u(p):u.None},u.prototype.init=function(p){var m;if(typeof p=="object"&&typeof p.stops!="undefined")this.stops=p.stops.map(function(_){return new u(_[1])});else if(typeof p=="string"){if(this.input=p=u.names[p.toLowerCase()]||p,p.charAt(0)==="#"){var v=p.length,x=parseInt(p.substr(1),16);v===7?m=[(x&16711680)>>16,(x&65280)>>8,x&255,1]:v===4&&(m=[(x&3840)>>4|(x&3840)>>8,(x&240)>>4|x&240,(x&15)<<4|x&15,1])}if(!m)for(x=u.parsers.length;x--&&!m;){var y=u.parsers[x];(v=y.regex.exec(p))&&(m=y.parse(v))}}m&&(this.rgba=m)},u.prototype.get=function(p){var m=this.input,v=this.rgba;if(typeof m=="object"&&typeof this.stops!="undefined"){var x=s(m);return x.stops=[].slice.call(x.stops),this.stops.forEach(function(y,_){x.stops[_]=[x.stops[_][0],y.get(p)]}),x}return v&&a(v[0])?p==="rgb"||!p&&v[3]===1?"rgb("+v[0]+","+v[1]+","+v[2]+")":p==="a"?"".concat(v[3]):"rgba("+v.join(",")+")":m},u.prototype.brighten=function(p){var m=this.rgba;if(this.stops)this.stops.forEach(function(x){x.brighten(p)});else if(a(p)&&p!==0)for(var v=0;3>v;v++)m[v]+=l(255*p),0>m[v]&&(m[v]=0),255<m[v]&&(m[v]=255);return this},u.prototype.setOpacity=function(p){return this.rgba[3]=p,this},u.prototype.tweenTo=function(p,m){var v=this.rgba,x=p.rgba;return!a(v[0])||!a(x[0])?p.input||"none":(p=x[3]!==1||v[3]!==1,(p?"rgba(":"rgb(")+Math.round(x[0]+(v[0]-x[0])*(1-m))+","+Math.round(x[1]+(v[1]-x[1])*(1-m))+","+Math.round(x[2]+(v[2]-x[2])*(1-m))+(p?","+(x[3]+(v[3]-x[3])*(1-m)):"")+")")},u.names={white:"#ffffff",black:"#000000"},u.parsers=[{regex:/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]?(?:\.[0-9]+)?)\s*\)/,parse:function(p){return[l(p[1]),l(p[2]),l(p[3]),parseFloat(p[4],10)]}},{regex:/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/,parse:function(p){return[l(p[1]),l(p[2]),l(p[3]),1]}}],u.None=new u(""),u}(),o}),r(n,"Core/Color/Palettes.js",[],function(){return{colors:"#7cb5ec #434348 #90ed7d #f7a35c #8085e9 #f15c80 #e4d354 #2b908f #f45b5b #91e8e1".split(" ")}}),r(n,"Core/Time.js",[n["Core/Globals.js"],n["Core/Utilities.js"]],function(i,o){var a=i.win,s=o.defined,l=o.error,u=o.extend,p=o.isObject,m=o.merge,v=o.objectEach,x=o.pad,y=o.pick,_=o.splat,w=o.timeUnits,C=i.isSafari&&a.Intl&&a.Intl.DateTimeFormat.prototype.formatRange,E=i.isSafari&&a.Intl&&!a.Intl.DateTimeFormat.prototype.formatRange;return o=function(){function T(A){this.options={},this.variableTimezone=this.useUTC=!1,this.Date=a.Date,this.getTimezoneOffset=this.timezoneOffsetFunction(),this.update(A)}return T.prototype.get=function(A,k){if(this.variableTimezone||this.timezoneOffset){var X=k.getTime(),Z=X-this.getTimezoneOffset(k);return k.setTime(Z),A=k["getUTC"+A](),k.setTime(X),A}return this.useUTC?k["getUTC"+A]():k["get"+A]()},T.prototype.set=function(A,k,X){if(this.variableTimezone||this.timezoneOffset){if(A==="Milliseconds"||A==="Seconds"||A==="Minutes"&&this.getTimezoneOffset(k)%36e5==0)return k["setUTC"+A](X);var Z=this.getTimezoneOffset(k);return Z=k.getTime()-Z,k.setTime(Z),k["setUTC"+A](X),A=this.getTimezoneOffset(k),Z=k.getTime()+A,k.setTime(Z)}return this.useUTC||C&&A==="FullYear"?k["setUTC"+A](X):k["set"+A](X)},T.prototype.update=function(A){A===void 0&&(A={});var k=y(A.useUTC,!0);this.options=A=m(!0,this.options,A),this.Date=A.Date||a.Date||Date,this.timezoneOffset=(this.useUTC=k)&&A.timezoneOffset||void 0,this.getTimezoneOffset=this.timezoneOffsetFunction(),this.variableTimezone=k&&!(!A.getTimezoneOffset&&!A.timezone)},T.prototype.makeTime=function(A,k,X,Z,W,D){if(this.useUTC){var H=this.Date.UTC.apply(0,arguments),N=this.getTimezoneOffset(H);H+=N;var j=this.getTimezoneOffset(H);N!==j?H+=j-N:N-36e5!==this.getTimezoneOffset(H-36e5)||E||(H-=36e5)}else H=new this.Date(A,k,y(X,1),y(Z,0),y(W,0),y(D,0)).getTime();return H},T.prototype.timezoneOffsetFunction=function(){var A=this,k=this.options,X=k.getTimezoneOffset,Z=k.moment||a.moment;if(!this.useUTC)return function(W){return 6e4*new Date(W.toString()).getTimezoneOffset()};if(k.timezone){if(Z)return function(W){return 6e4*-Z.tz(W,k.timezone).utcOffset()};l(25)}return this.useUTC&&X?function(W){return 6e4*X(W.valueOf())}:function(){return 6e4*(A.timezoneOffset||0)}},T.prototype.dateFormat=function(A,k,X){if(!s(k)||isNaN(k))return i.defaultOptions.lang&&i.defaultOptions.lang.invalidDate||"";A=y(A,"%Y-%m-%d %H:%M:%S");var Z=this,W=new this.Date(k),D=this.get("Hours",W),H=this.get("Day",W),N=this.get("Date",W),j=this.get("Month",W),$=this.get("FullYear",W),z=i.defaultOptions.lang,O=z&&z.weekdays,F=z&&z.shortWeekdays;return W=u({a:F?F[H]:O[H].substr(0,3),A:O[H],d:x(N),e:x(N,2," "),w:H,b:z.shortMonths[j],B:z.months[j],m:x(j+1),o:j+1,y:$.toString().substr(2,2),Y:$,H:x(D),k:D,I:x(D%12||12),l:D%12||12,M:x(this.get("Minutes",W)),p:12>D?"AM":"PM",P:12>D?"am":"pm",S:x(W.getSeconds()),L:x(Math.floor(k%1e3),3)},i.dateFormats),v(W,function(G,q){for(;A.indexOf("%"+q)!==-1;)A=A.replace("%"+q,typeof G=="function"?G.call(Z,k):G)}),X?A.substr(0,1).toUpperCase()+A.substr(1):A},T.prototype.resolveDTLFormat=function(A){return p(A,!0)?A:(A=_(A),{main:A[0],from:A[1],to:A[2]})},T.prototype.getTimeTicks=function(A,k,X,Z){var W=this,D=[],H={},N=new W.Date(k),j=A.unitRange,$=A.count||1,z;if(Z=y(Z,1),s(k)){if(W.set("Milliseconds",N,j>=w.second?0:$*Math.floor(W.get("Milliseconds",N)/$)),j>=w.second&&W.set("Seconds",N,j>=w.minute?0:$*Math.floor(W.get("Seconds",N)/$)),j>=w.minute&&W.set("Minutes",N,j>=w.hour?0:$*Math.floor(W.get("Minutes",N)/$)),j>=w.hour&&W.set("Hours",N,j>=w.day?0:$*Math.floor(W.get("Hours",N)/$)),j>=w.day&&W.set("Date",N,j>=w.month?1:Math.max(1,$*Math.floor(W.get("Date",N)/$))),j>=w.month){W.set("Month",N,j>=w.year?0:$*Math.floor(W.get("Month",N)/$));var O=W.get("FullYear",N)}j>=w.year&&W.set("FullYear",N,O-O%$),j===w.week&&(O=W.get("Day",N),W.set("Date",N,W.get("Date",N)-O+Z+(O<Z?-7:0))),O=W.get("FullYear",N),Z=W.get("Month",N);var F=W.get("Date",N),G=W.get("Hours",N);for(k=N.getTime(),!W.variableTimezone&&W.useUTC||!s(X)||(z=X-k>4*w.month||W.getTimezoneOffset(k)!==W.getTimezoneOffset(X)),k=N.getTime(),N=1;k<X;)D.push(k),k=j===w.year?W.makeTime(O+N*$,0):j===w.month?W.makeTime(O,Z+N*$):!z||j!==w.day&&j!==w.week?z&&j===w.hour&&1<$?W.makeTime(O,Z,F,G+N*$):k+j*$:W.makeTime(O,Z,F+N*$*(j===w.day?1:7)),N++;D.push(k),j<=w.hour&&1e4>D.length&&D.forEach(function(q){q%18e5==0&&W.dateFormat("%H%M%S%L",q)==="000000000"&&(H[q]="day")})}return D.info=u(A,{higherRanks:H,totalRange:j*$}),D},T.prototype.getDateFormat=function(A,k,X,Z){var W=this.dateFormat("%m-%d %H:%M:%S.%L",k),D={millisecond:15,second:12,minute:9,hour:6,day:3},H="millisecond";for(N in w){if(A===w.week&&+this.dateFormat("%w",k)===X&&W.substr(6)==="00:00:00.000"){var N="week";break}if(w[N]>A){N=H;break}if(D[N]&&W.substr(D[N])!=="01-01 00:00:00.000".substr(D[N]))break;N!=="week"&&(H=N)}return this.resolveDTLFormat(Z[N]).main},T}(),o}),r(n,"Core/Defaults.js",[n["Core/Chart/ChartDefaults.js"],n["Core/Color/Color.js"],n["Core/Globals.js"],n["Core/Color/Palettes.js"],n["Core/Time.js"],n["Core/Utilities.js"]],function(i,o,a,s,l,u){o=o.parse;var p=u.merge,m={colors:s.colors,symbols:["circle","diamond","square","triangle","triangle-down"],lang:{loading:"Loading...",months:"January February March April May June July August September October November December".split(" "),shortMonths:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),weekdays:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),decimalPoint:".",numericSymbols:"kMGTPE".split(""),resetZoom:"Reset zoom",resetZoomTitle:"Reset zoom level 1:1",thousandsSep:" "},global:{},time:{Date:void 0,getTimezoneOffset:void 0,timezone:void 0,timezoneOffset:0,useUTC:!0},chart:i,title:{text:"Chart title",align:"center",margin:15,widthAdjust:-44},subtitle:{text:"",align:"center",widthAdjust:-44},caption:{margin:15,text:"",align:"left",verticalAlign:"bottom"},plotOptions:{},labels:{style:{position:"absolute",color:"#333333"}},legend:{enabled:!0,align:"center",alignColumns:!0,className:"highcharts-no-tooltip",layout:"horizontal",labelFormatter:function(){return this.name},borderColor:"#999999",borderRadius:0,navigation:{activeColor:"#003399",inactiveColor:"#cccccc"},itemStyle:{color:"#333333",cursor:"pointer",fontSize:"12px",fontWeight:"bold",textOverflow:"ellipsis"},itemHoverStyle:{color:"#000000"},itemHiddenStyle:{color:"#cccccc"},shadow:!1,itemCheckboxStyle:{position:"absolute",width:"13px",height:"13px"},squareSymbol:!0,symbolPadding:5,verticalAlign:"bottom",x:0,y:0,title:{style:{fontWeight:"bold"}}},loading:{labelStyle:{fontWeight:"bold",position:"relative",top:"45%"},style:{position:"absolute",backgroundColor:"#ffffff",opacity:.5,textAlign:"center"}},tooltip:{enabled:!0,animation:a.svg,borderRadius:3,dateTimeLabelFormats:{millisecond:"%A, %b %e, %H:%M:%S.%L",second:"%A, %b %e, %H:%M:%S",minute:"%A, %b %e, %H:%M",hour:"%A, %b %e, %H:%M",day:"%A, %b %e, %Y",week:"Week from %A, %b %e, %Y",month:"%B %Y",year:"%Y"},footerFormat:"",headerShape:"callout",hideDelay:500,padding:8,shape:"callout",shared:!1,snap:a.isTouchDevice?25:10,headerFormat:'<span style="font-size: 10px">{point.key}</span><br/>',pointFormat:'<span style="color:{point.color}">\u25CF</span> {series.name}: <b>{point.y}</b><br/>',backgroundColor:o("#f7f7f7").setOpacity(.85).get(),borderWidth:1,shadow:!0,stickOnContact:!1,style:{color:"#333333",cursor:"default",fontSize:"12px",whiteSpace:"nowrap"},useHTML:!1},credits:{enabled:!0,href:"https://www.highcharts.com?credits",position:{align:"right",x:-10,verticalAlign:"bottom",y:-5},style:{cursor:"pointer",color:"#999999",fontSize:"9px"},text:"Highcharts.com"}};m.chart.styledMode=!1;var v=new l(p(m.global,m.time));return i={defaultOptions:m,defaultTime:v,getOptions:function(){return m},setOptions:function(x){return p(!0,m,x),(x.time||x.global)&&(a.time?a.time.update(p(m.global,m.time,x.global,x.time)):a.time=v),m}},i}),r(n,"Core/Animation/Fx.js",[n["Core/Color/Color.js"],n["Core/Globals.js"],n["Core/Utilities.js"]],function(i,o,a){var s=i.parse,l=o.win,u=a.isNumber,p=a.objectEach;return function(){function m(v,x,y){this.pos=NaN,this.options=x,this.elem=v,this.prop=y}return m.prototype.dSetter=function(){var v=this.paths,x=v&&v[0];v=v&&v[1];var y=this.now||0,_=[];if(y!==1&&x&&v)if(x.length===v.length&&1>y)for(var w=0;w<v.length;w++){for(var C=x[w],E=v[w],T=[],A=0;A<E.length;A++){var k=C[A],X=E[A];u(k)&&u(X)&&(E[0]!=="A"||A!==4&&A!==5)?T[A]=k+y*(X-k):T[A]=X}_.push(T)}else _=v;else _=this.toD||[];this.elem.attr("d",_,void 0,!0)},m.prototype.update=function(){var v=this.elem,x=this.prop,y=this.now,_=this.options.step;this[x+"Setter"]?this[x+"Setter"]():v.attr?v.element&&v.attr(x,y,null,!0):v.style[x]=y+this.unit,_&&_.call(v,y,this)},m.prototype.run=function(v,x,y){var _=this,w=_.options,C=function(A){return C.stopped?!1:_.step(A)},E=l.requestAnimationFrame||function(A){setTimeout(A,13)},T=function(){for(var A=0;A<m.timers.length;A++)m.timers[A]()||m.timers.splice(A--,1);m.timers.length&&E(T)};v!==x||this.elem["forceAnimate:"+this.prop]?(this.startTime=+new Date,this.start=v,this.end=x,this.unit=y,this.now=this.start,this.pos=0,C.elem=this.elem,C.prop=this.prop,C()&&m.timers.push(C)===1&&E(T)):(delete w.curAnim[this.prop],w.complete&&Object.keys(w.curAnim).length===0&&w.complete.call(this.elem))},m.prototype.step=function(v){var x=+new Date,y=this.options,_=this.elem,w=y.complete,C=y.duration,E=y.curAnim;if(_.attr&&!_.element)v=!1;else if(v||x>=C+this.startTime){this.now=this.end,this.pos=1,this.update();var T=E[this.prop]=!0;p(E,function(A){A!==!0&&(T=!1)}),T&&w&&w.call(_),v=!1}else this.pos=y.easing((x-this.startTime)/C),this.now=this.start+(this.end-this.start)*this.pos,this.update(),v=!0;return v},m.prototype.initPath=function(v,x,y){function _(W,D){for(;W.length<Z;){var H=W[0],N=D[Z-W.length];N&&H[0]==="M"&&(W[0]=N[0]==="C"?["C",H[1],H[2],H[1],H[2],H[1],H[2]]:["L",H[1],H[2]]),W.unshift(H),T&&(H=W.pop(),W.push(W[W.length-1],H))}}function w(W,D){for(;W.length<Z;)if(D=W[Math.floor(W.length/A)-1].slice(),D[0]==="C"&&(D[1]=D[5],D[2]=D[6]),T){var H=W[Math.floor(W.length/A)].slice();W.splice(W.length/2,0,D,H)}else W.push(D)}var C=v.startX,E=v.endX;y=y.slice();var T=v.isArea,A=T?2:1;if(x=x&&x.slice(),!x)return[y,y];if(C&&E&&E.length){for(v=0;v<C.length;v++)if(C[v]===E[0]){var k=v;break}else if(C[0]===E[E.length-C.length+v]){k=v;var X=!0;break}else if(C[C.length-1]===E[E.length-C.length+v]){k=C.length-v;break}typeof k=="undefined"&&(x=[])}if(x.length&&u(k)){var Z=y.length+k*A;X?(_(x,y),w(y,x)):(_(y,x),w(x,y))}return[x,y]},m.prototype.fillSetter=function(){m.prototype.strokeSetter.apply(this,arguments)},m.prototype.strokeSetter=function(){this.elem.attr(this.prop,s(this.start).tweenTo(s(this.end),this.pos),void 0,!0)},m.timers=[],m}()}),r(n,"Core/Animation/AnimationUtilities.js",[n["Core/Animation/Fx.js"],n["Core/Utilities.js"]],function(i,o){function a(w){return v(w)?x({duration:500,defer:0},w):{duration:w?500:0,defer:0}}function s(w,C){for(var E=i.timers.length;E--;)i.timers[E].elem!==w||C&&C!==i.timers[E].prop||(i.timers[E].stopped=!0)}var l=o.defined,u=o.getStyle,p=o.isArray,m=o.isNumber,v=o.isObject,x=o.merge,y=o.objectEach,_=o.pick;return{animate:function(w,C,E){var T,A="",k,X;if(!v(E)){var Z=arguments;E={duration:Z[2],easing:Z[3],complete:Z[4]}}m(E.duration)||(E.duration=400),E.easing=typeof E.easing=="function"?E.easing:Math[E.easing]||Math.easeInOutSine,E.curAnim=x(C),y(C,function(W,D){s(w,D),X=new i(w,E,D),k=void 0,D==="d"&&p(C.d)?(X.paths=X.initPath(w,w.pathArray,C.d),X.toD=C.d,T=0,k=1):w.attr?T=w.attr(D):(T=parseFloat(u(w,D))||0,D!=="opacity"&&(A="px")),k||(k=W),typeof k=="string"&&k.match("px")&&(k=k.replace(/px/g,"")),X.run(T,k,A)})},animObject:a,getDeferredAnimation:function(w,C,E){var T=a(C),A=0,k=0;return(E?[E]:w.series).forEach(function(X){X=a(X.options.animation),A=C&&l(C.defer)?T.defer:Math.max(A,X.duration+X.defer),k=Math.min(T.duration,X.duration)}),w.renderer.forExport&&(A=0),{defer:Math.max(0,A-k),duration:Math.min(A,k)}},setAnimation:function(w,C){C.renderer.globalAnimation=_(w,C.options.chart.animation,!0)},stop:s}}),r(n,"Core/Renderer/HTML/AST.js",[n["Core/Globals.js"],n["Core/Utilities.js"]],function(i,o){var a=i.SVG_NS,s=o.attr,l=o.createElement,u=o.css,p=o.error,m=o.isFunction,v=o.isString,x=o.objectEach,y=o.splat,_=(o=i.win.trustedTypes)&&m(o.createPolicy)&&o.createPolicy("highcharts",{createHTML:function(E){return E}}),w=_?_.createHTML(""):"";try{var C=!!new DOMParser().parseFromString(w,"text/html")}catch{C=!1}return m=function(){function E(T){this.nodes=typeof T=="string"?this.parseMarkup(T):T}return E.filterUserAttributes=function(T){return x(T,function(A,k){var X=!0;E.allowedAttributes.indexOf(k)===-1&&(X=!1),["background","dynsrc","href","lowsrc","src"].indexOf(k)!==-1&&(X=v(A)&&E.allowedReferences.some(function(Z){return A.indexOf(Z)===0})),X||(p(33,!1,void 0,{"Invalid attribute in config":"".concat(k)}),delete T[k]),v(A)&&T[k]&&(T[k]=A.replace(/</g,"<"))}),T},E.parseStyle=function(T){return T.split(";").reduce(function(A,k){k=k.split(":").map(function(Z){return Z.trim()});var X=k.shift();return X&&k.length&&(A[X.replace(/-([a-z])/g,function(Z){return Z[1].toUpperCase()})]=k.join(":")),A},{})},E.setElementHTML=function(T,A){T.innerHTML=E.emptyHTML,A&&new E(A).addToDOM(T)},E.prototype.addToDOM=function(T){function A(k,X){var Z;return y(k).forEach(function(W){var D=W.tagName,H=W.textContent?i.doc.createTextNode(W.textContent):void 0,N=E.bypassHTMLFiltering;if(D)if(D==="#text")var j=H;else if(E.allowedTags.indexOf(D)!==-1||N){D=i.doc.createElementNS(D==="svg"?a:X.namespaceURI||a,D);var $=W.attributes||{};x(W,function(z,O){O!=="tagName"&&O!=="attributes"&&O!=="children"&&O!=="style"&&O!=="textContent"&&($[O]=z)}),s(D,N?$:E.filterUserAttributes($)),W.style&&u(D,W.style),H&&D.appendChild(H),A(W.children||[],D),j=D}else p(33,!1,void 0,{"Invalid tagName in config":D});j&&X.appendChild(j),Z=j}),Z}return A(this.nodes,T)},E.prototype.parseMarkup=function(T){var A=[];if(T=T.trim().replace(/ style=(["'])/g," data-style=$1"),C)T=new DOMParser().parseFromString(_?_.createHTML(T):T,"text/html");else{var k=l("div");k.innerHTML=T,T={body:k}}var X=function(Z,W){var D=Z.nodeName.toLowerCase(),H={tagName:D};if(D==="#text"&&(H.textContent=Z.textContent||""),D=Z.attributes){var N={};[].forEach.call(D,function($){$.name==="data-style"?H.style=E.parseStyle($.value):N[$.name]=$.value}),H.attributes=N}if(Z.childNodes.length){var j=[];[].forEach.call(Z.childNodes,function($){X($,j)}),j.length&&(H.children=j)}W.push(H)};return[].forEach.call(T.body.childNodes,function(Z){return X(Z,A)}),A},E.allowedAttributes="aria-controls aria-describedby aria-expanded aria-haspopup aria-hidden aria-label aria-labelledby aria-live aria-pressed aria-readonly aria-roledescription aria-selected class clip-path color colspan cx cy d dx dy disabled fill height href id in markerHeight markerWidth offset opacity orient padding paddingLeft paddingRight patternUnits r refX refY role scope slope src startOffset stdDeviation stroke stroke-linecap stroke-width style tableValues result rowspan summary target tabindex text-align text-anchor textAnchor textLength title type valign width x x1 x2 xlink:href y y1 y2 zIndex".split(" "),E.allowedReferences="https:// http:// mailto: / ../ ./ #".split(" "),E.allowedTags="a abbr b br button caption circle clipPath code dd defs div dl dt em feComponentTransfer feFuncA feFuncB feFuncG feFuncR feGaussianBlur feOffset feMerge feMergeNode filter h1 h2 h3 h4 h5 h6 hr i img li linearGradient marker ol p path pattern pre rect small span stop strong style sub sup svg table text textPath thead title tbody tspan td th tr u ul #text".split(" "),E.emptyHTML=w,E.bypassHTMLFiltering=!1,E}(),m}),r(n,"Core/FormatUtilities.js",[n["Core/Defaults.js"],n["Core/Utilities.js"]],function(i,o){function a(x,y,_,w){x=+x||0,y=+y;var C=s.lang,E=(x.toString().split(".")[1]||"").split("e")[0].length,T=x.toString().split("e"),A=y;if(y===-1)y=Math.min(E,20);else if(!p(y))y=2;else if(y&&T[1]&&0>T[1]){var k=y+ +T[1];0<=k?(T[0]=(+T[0]).toExponential(k).split("e")[0],y=k):(T[0]=T[0].split(".")[0]||0,x=20>y?(T[0]*Math.pow(10,T[1])).toFixed(y):0,T[1]=0)}k=(Math.abs(T[1]?T[0]:x)+Math.pow(10,-Math.max(y,E)-1)).toFixed(y),E=String(v(k));var X=3<E.length?E.length%3:0;return _=m(_,C.decimalPoint),w=m(w,C.thousandsSep),x=(0>x?"-":"")+(X?E.substr(0,X)+w:""),x=0>+T[1]&&!A?"0":x+E.substr(X).replace(/(\d{3})(?=\d)/g,"$1"+w),y&&(x+=_+k.slice(-y)),T[1]&&+x!=0&&(x+="e"+T[1]),x}var s=i.defaultOptions,l=i.defaultTime,u=o.getNestedProperty,p=o.isNumber,m=o.pick,v=o.pInt;return{dateFormat:function(x,y,_){return l.dateFormat(x,y,_)},format:function(x,y,_){var w="{",C=!1,E=/f$/,T=/\.([0-9])/,A=s.lang,k=_&&_.time||l;_=_&&_.numberFormatter||a;for(var X=[];x;){var Z=x.indexOf(w);if(Z===-1)break;var W=x.slice(0,Z);if(C){if(W=W.split(":"),w=u(W.shift()||"",y),W.length&&typeof w=="number")if(W=W.join(":"),E.test(W)){var D=parseInt((W.match(T)||["","-1"])[1],10);w!==null&&(w=_(w,D,A.decimalPoint,-1<W.indexOf(",")?A.thousandsSep:""))}else w=k.dateFormat(W,w);X.push(w)}else X.push(W);x=x.slice(Z+1),w=(C=!C)?"}":"{"}return X.push(x),X.join("")},numberFormat:a}}),r(n,"Core/Renderer/RendererUtilities.js",[n["Core/Utilities.js"]],function(i){var o=i.clamp,a=i.pick,s=i.stableSort,l;return function(u){function p(m,v,x){var y=m,_=y.reducedLen||v,w=function(X,Z){return(Z.rank||0)-(X.rank||0)},C=function(X,Z){return X.target-Z.target},E,T=!0,A=[],k=0;for(E=m.length;E--;)k+=m[E].size;if(k>_){for(s(m,w),k=E=0;k<=_;)k+=m[E].size,E++;A=m.splice(E-1,m.length)}for(s(m,C),m=m.map(function(X){return{size:X.size,targets:[X.target],align:a(X.align,.5)}});T;){for(E=m.length;E--;)_=m[E],w=(Math.min.apply(0,_.targets)+Math.max.apply(0,_.targets))/2,_.pos=o(w-_.size*_.align,0,v-_.size);for(E=m.length,T=!1;E--;)0<E&&m[E-1].pos+m[E-1].size>m[E].pos&&(m[E-1].size+=m[E].size,m[E-1].targets=m[E-1].targets.concat(m[E].targets),m[E-1].align=.5,m[E-1].pos+m[E-1].size>v&&(m[E-1].pos=v-m[E-1].size),m.splice(E,1),T=!0)}return y.push.apply(y,A),E=0,m.some(function(X){var Z=0;return(X.targets||[]).some(function(){return y[E].pos=X.pos+Z,typeof x!="undefined"&&Math.abs(y[E].pos-y[E].target)>x?(y.slice(0,E+1).forEach(function(W){return delete W.pos}),y.reducedLen=(y.reducedLen||v)-.1*v,y.reducedLen>.1*v&&p(y,v,x),!0):(Z+=y[E].size,E++,!1)})}),s(y,C),y}u.distribute=p}(l||(l={})),l}),r(n,"Core/Renderer/SVG/SVGElement.js",[n["Core/Animation/AnimationUtilities.js"],n["Core/Color/Color.js"],n["Core/Globals.js"],n["Core/Utilities.js"]],function(i,o,a,s){var l=i.animate,u=i.animObject,p=i.stop,m=a.deg2rad,v=a.doc,x=a.svg,y=a.SVG_NS,_=a.win,w=s.addEvent,C=s.attr,E=s.createElement,T=s.css,A=s.defined,k=s.erase,X=s.extend,Z=s.fireEvent,W=s.isArray,D=s.isFunction,H=s.isString,N=s.merge,j=s.objectEach,$=s.pick,z=s.pInt,O=s.syncTimeout,F=s.uniqueKey;return i=function(){function G(){this.element=void 0,this.onEvents={},this.opacity=1,this.renderer=void 0,this.SVG_NS=y,this.symbolCustomAttribs="x y width height r start end innerR anchorX anchorY rounded".split(" ")}return G.prototype._defaultGetter=function(q){return q=$(this[q+"Value"],this[q],this.element?this.element.getAttribute(q):null,0),/^[\-0-9\.]+$/.test(q)&&(q=parseFloat(q)),q},G.prototype._defaultSetter=function(q,ee,re){re.setAttribute(ee,q)},G.prototype.add=function(q){var ee=this.renderer,re=this.element;if(q&&(this.parentGroup=q),typeof this.textStr!="undefined"&&this.element.nodeName==="text"&&ee.buildText(this),this.added=!0,!q||q.handleZ||this.zIndex)var ce=this.zIndexSetter();return ce||(q?q.element:ee.box).appendChild(re),this.onAdd&&this.onAdd(),this},G.prototype.addClass=function(q,ee){var re=ee?"":this.attr("class")||"";return q=(q||"").split(/ /g).reduce(function(ce,fe){return re.indexOf(fe)===-1&&ce.push(fe),ce},re?[re]:[]).join(" "),q!==re&&this.attr("class",q),this},G.prototype.afterSetters=function(){this.doTransform&&(this.updateTransform(),this.doTransform=!1)},G.prototype.align=function(q,ee,re){var ce={},fe=this.renderer,J=fe.alignedObjects,oe,ve,ye;q?(this.alignOptions=q,this.alignByTranslate=ee,(!re||H(re))&&(this.alignTo=oe=re||"renderer",k(J,this),J.push(this),re=void 0)):(q=this.alignOptions,ee=this.alignByTranslate,oe=this.alignTo),re=$(re,fe[oe],oe==="scrollablePlotBox"?fe.plotBox:void 0,fe),oe=q.align;var xe=q.verticalAlign;return fe=(re.x||0)+(q.x||0),J=(re.y||0)+(q.y||0),oe==="right"?ve=1:oe==="center"&&(ve=2),ve&&(fe+=(re.width-(q.width||0))/ve),ce[ee?"translateX":"x"]=Math.round(fe),xe==="bottom"?ye=1:xe==="middle"&&(ye=2),ye&&(J+=(re.height-(q.height||0))/ye),ce[ee?"translateY":"y"]=Math.round(J),this[this.placed?"animate":"attr"](ce),this.placed=!0,this.alignAttr=ce,this},G.prototype.alignSetter=function(q){var ee={left:"start",center:"middle",right:"end"};ee[q]&&(this.alignValue=q,this.element.setAttribute("text-anchor",ee[q]))},G.prototype.animate=function(q,ee,re){var ce=this,fe=u($(ee,this.renderer.globalAnimation,!0));return ee=fe.defer,$(v.hidden,v.msHidden,v.webkitHidden,!1)&&(fe.duration=0),fe.duration!==0?(re&&(fe.complete=re),O(function(){ce.element&&l(ce,q,fe)},ee)):(this.attr(q,void 0,re||fe.complete),j(q,function(J,oe){fe.step&&fe.step.call(this,J,{prop:oe,pos:1,elem:this})},this)),this},G.prototype.applyTextOutline=function(q){var ee=this.element;q.indexOf("contrast")!==-1&&(q=q.replace(/contrast/g,this.renderer.getContrast(ee.style.fill)));var re=q.split(" ");if(q=re[re.length-1],(re=re[0])&&re!=="none"&&a.svg){this.fakeTS=!0,re=re.replace(/(^[\d\.]+)(.*?)$/g,function(J,oe,ve){return 2*Number(oe)+ve}),this.removeTextOutline();var ce=v.createElementNS(y,"tspan");C(ce,{class:"highcharts-text-outline",fill:q,stroke:q,"stroke-width":re,"stroke-linejoin":"round"}),q=ee.querySelector("textPath")||ee,[].forEach.call(q.childNodes,function(J){var oe=J.cloneNode(!0);oe.removeAttribute&&["fill","stroke","stroke-width","stroke"].forEach(function(ve){return oe.removeAttribute(ve)}),ce.appendChild(oe)});var fe=0;[].forEach.call(q.querySelectorAll("text tspan"),function(J){fe+=Number(J.getAttribute("dy"))}),re=v.createElementNS(y,"tspan"),re.textContent="\u200B",C(re,{x:Number(ee.getAttribute("x")),dy:-fe}),ce.appendChild(re),q.insertBefore(ce,q.firstChild)}},G.prototype.attr=function(q,ee,re,ce){var fe=this.element,J=this.symbolCustomAttribs,oe,ve=this,ye,xe;if(typeof q=="string"&&typeof ee!="undefined"){var se=q;q={},q[se]=ee}return typeof q=="string"?ve=(this[q+"Getter"]||this._defaultGetter).call(this,q,fe):(j(q,function(me,pe){ye=!1,ce||p(this,pe),this.symbolName&&J.indexOf(pe)!==-1&&(oe||(this.symbolAttr(q),oe=!0),ye=!0),!this.rotation||pe!=="x"&&pe!=="y"||(this.doTransform=!0),ye||(xe=this[pe+"Setter"]||this._defaultSetter,xe.call(this,me,pe,fe),!this.styledMode&&this.shadows&&/^(width|height|visibility|x|y|d|transform|cx|cy|r)$/.test(pe)&&this.updateShadows(pe,me,xe))},this),this.afterSetters()),re&&re.call(this),ve},G.prototype.clip=function(q){return this.attr("clip-path",q?"url("+this.renderer.url+"#"+q.id+")":"none")},G.prototype.crisp=function(q,ee){ee=ee||q.strokeWidth||0;var re=Math.round(ee)%2/2;return q.x=Math.floor(q.x||this.x||0)+re,q.y=Math.floor(q.y||this.y||0)+re,q.width=Math.floor((q.width||this.width||0)-2*re),q.height=Math.floor((q.height||this.height||0)-2*re),A(q.strokeWidth)&&(q.strokeWidth=ee),q},G.prototype.complexColor=function(q,ee,re){var ce=this.renderer,fe,J,oe,ve,ye,xe,se,me,pe,Ce,Pe=[],Re;Z(this.renderer,"complexColor",{args:arguments},function(){if(q.radialGradient?J="radialGradient":q.linearGradient&&(J="linearGradient"),J){if(oe=q[J],ye=ce.gradients,xe=q.stops,pe=re.radialReference,W(oe)&&(q[J]=oe={x1:oe[0],y1:oe[1],x2:oe[2],y2:oe[3],gradientUnits:"userSpaceOnUse"}),J==="radialGradient"&&pe&&!A(oe.gradientUnits)&&(ve=oe,oe=N(oe,ce.getRadialAttr(pe,ve),{gradientUnits:"userSpaceOnUse"})),j(oe,function(ze,Ge){Ge!=="id"&&Pe.push(Ge,ze)}),j(xe,function(ze){Pe.push(ze)}),Pe=Pe.join(","),ye[Pe])Ce=ye[Pe].attr("id");else{oe.id=Ce=F();var ke=ye[Pe]=ce.createElement(J).attr(oe).add(ce.defs);ke.radAttr=ve,ke.stops=[],xe.forEach(function(ze){ze[1].indexOf("rgba")===0?(fe=o.parse(ze[1]),se=fe.get("rgb"),me=fe.get("a")):(se=ze[1],me=1),ze=ce.createElement("stop").attr({offset:ze[0],"stop-color":se,"stop-opacity":me}).add(ke),ke.stops.push(ze)})}Re="url("+ce.url+"#"+Ce+")",re.setAttribute(ee,Re),re.gradient=Pe,q.toString=function(){return Re}}})},G.prototype.css=function(q){var ee=this.styles,re={},ce=this.element,fe=!ee;if(q.color&&(q.fill=q.color),ee&&j(q,function(ve,ye){ee&&ee[ye]!==ve&&(re[ye]=ve,fe=!0)}),fe){if(ee&&(q=X(ee,re)),q.width===null||q.width==="auto")delete this.textWidth;else if(ce.nodeName.toLowerCase()==="text"&&q.width)var J=this.textWidth=z(q.width);this.styles=q,J&&!x&&this.renderer.forExport&&delete q.width;var oe=N(q);ce.namespaceURI===this.SVG_NS&&["textOutline","textOverflow","width"].forEach(function(ve){return oe&&delete oe[ve]}),T(ce,oe),this.added&&(this.element.nodeName==="text"&&this.renderer.buildText(this),q.textOutline&&this.applyTextOutline(q.textOutline))}return this},G.prototype.dashstyleSetter=function(q){var ee=this["stroke-width"];if(ee==="inherit"&&(ee=1),q=q&&q.toLowerCase()){var re=q.replace("shortdashdotdot","3,1,1,1,1,1,").replace("shortdashdot","3,1,1,1").replace("shortdot","1,1,").replace("shortdash","3,1,").replace("longdash","8,3,").replace(/dot/g,"1,3,").replace("dash","4,3,").replace(/,$/,"").split(",");for(q=re.length;q--;)re[q]=""+z(re[q])*$(ee,NaN);q=re.join(",").replace(/NaN/g,"none"),this.element.setAttribute("stroke-dasharray",q)}},G.prototype.destroy=function(){var q=this,ee=q.element||{},re=q.renderer,ce=ee.ownerSVGElement,fe=re.isSVG&&ee.nodeName==="SPAN"&&q.parentGroup||void 0;if(ee.onclick=ee.onmouseout=ee.onmouseover=ee.onmousemove=ee.point=null,p(q),q.clipPath&&ce){var J=q.clipPath;[].forEach.call(ce.querySelectorAll("[clip-path],[CLIP-PATH]"),function(oe){-1<oe.getAttribute("clip-path").indexOf(J.element.id)&&oe.removeAttribute("clip-path")}),q.clipPath=J.destroy()}if(q.stops){for(ce=0;ce<q.stops.length;ce++)q.stops[ce].destroy();q.stops.length=0,q.stops=void 0}for(q.safeRemoveChild(ee),re.styledMode||q.destroyShadows();fe&&fe.div&&fe.div.childNodes.length===0;)ee=fe.parentGroup,q.safeRemoveChild(fe.div),delete fe.div,fe=ee;q.alignTo&&k(re.alignedObjects,q),j(q,function(oe,ve){q[ve]&&q[ve].parentGroup===q&&q[ve].destroy&&q[ve].destroy(),delete q[ve]})},G.prototype.destroyShadows=function(){(this.shadows||[]).forEach(function(q){this.safeRemoveChild(q)},this),this.shadows=void 0},G.prototype.dSetter=function(q,ee,re){W(q)&&(typeof q[0]=="string"&&(q=this.renderer.pathToSegments(q)),this.pathArray=q,q=q.reduce(function(ce,fe,J){return fe&&fe.join?(J?ce+" ":"")+fe.join(" "):(fe||"").toString()},"")),/(NaN| {2}|^$)/.test(q)&&(q="M 0 0"),this[ee]!==q&&(re.setAttribute(ee,q),this[ee]=q)},G.prototype.fadeOut=function(q){var ee=this;ee.animate({opacity:0},{duration:$(q,150),complete:function(){ee.hide()}})},G.prototype.fillSetter=function(q,ee,re){typeof q=="string"?re.setAttribute(ee,q):q&&this.complexColor(q,ee,re)},G.prototype.getBBox=function(q,ee){var re=this.alignValue,ce=this.element,fe=this.renderer,J=this.styles,oe=this.textStr,ve=fe.cache,ye=fe.cacheKeys,xe=ce.namespaceURI===this.SVG_NS;ee=$(ee,this.rotation,0);var se=fe.styledMode?ce&&G.prototype.getStyle.call(ce,"font-size"):J&&J.fontSize,me;if(A(oe)){var pe=oe.toString();pe.indexOf("<")===-1&&(pe=pe.replace(/[0-9]/g,"0")),pe+=["",ee,se,this.textWidth,re,J&&J.textOverflow,J&&J.fontWeight].join()}if(pe&&!q&&(me=ve[pe]),!me){if(xe||fe.forExport){try{var Ce=this.fakeTS&&function(Re){var ke=ce.querySelector(".highcharts-text-outline");ke&&T(ke,{display:Re})};D(Ce)&&Ce("none"),me=ce.getBBox?X({},ce.getBBox()):{width:ce.offsetWidth,height:ce.offsetHeight,x:0,y:0},D(Ce)&&Ce("")}catch{}(!me||0>me.width)&&(me={x:0,y:0,width:0,height:0})}else me=this.htmlGetBBox();if(fe.isSVG&&(fe=me.width,q=me.height,xe&&(me.height=q={"11px,17":14,"13px,20":16}[""+(se||"")+",".concat(Math.round(q))]||q),ee)){xe=Number(ce.getAttribute("y")||0)-me.y,re={right:1,center:.5}[re||0]||0,J=ee*m,se=(ee-90)*m;var Pe=fe*Math.cos(J);ee=fe*Math.sin(J),Ce=Math.cos(se),J=Math.sin(se),fe=me.x+re*(fe-Pe)+xe*Ce,se=fe+Pe,Ce=se-q*Ce,Pe=Ce-Pe,xe=me.y+xe-re*ee+xe*J,re=xe+ee,q=re-q*J,ee=q-ee,me.x=Math.min(fe,se,Ce,Pe),me.y=Math.min(xe,re,q,ee),me.width=Math.max(fe,se,Ce,Pe)-me.x,me.height=Math.max(xe,re,q,ee)-me.y}if(pe&&(oe===""||0<me.height)){for(;250<ye.length;)delete ve[ye.shift()];ve[pe]||ye.push(pe),ve[pe]=me}}return me},G.prototype.getStyle=function(q){return _.getComputedStyle(this.element||this,"").getPropertyValue(q)},G.prototype.hasClass=function(q){return(""+this.attr("class")).split(" ").indexOf(q)!==-1},G.prototype.hide=function(){return this.attr({visibility:"hidden"})},G.prototype.htmlGetBBox=function(){return{height:0,width:0,x:0,y:0}},G.prototype.init=function(q,ee){this.element=ee==="span"?E(ee):v.createElementNS(this.SVG_NS,ee),this.renderer=q,Z(this,"afterInit")},G.prototype.on=function(q,ee){var re=this.onEvents;return re[q]&&re[q](),re[q]=w(this.element,q,ee),this},G.prototype.opacitySetter=function(q,ee,re){this.opacity=q=Number(Number(q).toFixed(3)),re.setAttribute(ee,q)},G.prototype.removeClass=function(q){return this.attr("class",(""+this.attr("class")).replace(H(q)?new RegExp("(^| )".concat(q,"( |$)")):q," ").replace(/ +/g," ").trim())},G.prototype.removeTextOutline=function(){var q=this.element.querySelector("tspan.highcharts-text-outline");q&&this.safeRemoveChild(q)},G.prototype.safeRemoveChild=function(q){var ee=q.parentNode;ee&&ee.removeChild(q)},G.prototype.setRadialReference=function(q){var ee=this.element.gradient&&this.renderer.gradients[this.element.gradient];return this.element.radialReference=q,ee&&ee.radAttr&&ee.animate(this.renderer.getRadialAttr(q,ee.radAttr)),this},G.prototype.setTextPath=function(q,ee){var re=this;ee=N(!0,{enabled:!0,attributes:{dy:-5,startOffset:"50%",textAnchor:"middle"}},ee);var ce=this.renderer.url,fe=this.text||this,J=fe.textPath,oe=ee.attributes,ve=ee.enabled;return q=q||J&&J.path,J&&J.undo(),q&&ve?(ee=w(fe,"afterModifyTree",function(ye){if(q&&ve){var xe=q.attr("id");xe||q.attr("id",xe=F());var se={x:0,y:0};A(oe.dx)&&(se.dx=oe.dx,delete oe.dx),A(oe.dy)&&(se.dy=oe.dy,delete oe.dy),fe.attr(se),re.attr({transform:""}),re.box&&(re.box=re.box.destroy()),se=ye.nodes.slice(0),ye.nodes.length=0,ye.nodes[0]={tagName:"textPath",attributes:X(oe,{"text-anchor":oe.textAnchor,href:""+ce+"#".concat(xe)}),children:se}}}),fe.textPath={path:q,undo:ee}):(fe.attr({dx:0,dy:0}),delete fe.textPath),this.added&&(fe.textCache="",this.renderer.buildText(fe)),this},G.prototype.shadow=function(q,ee,re){var ce=[],fe=this.element,J=this.oldShadowOptions,oe=this.parentGroup,ve=oe&&oe.rotation===90;oe={color:"#000000",offsetX:ve?-1:1,offsetY:ve?-1:1,opacity:.15,width:3};var ye=!1,xe;if(q===!0?xe=oe:typeof q=="object"&&(xe=X(oe,q)),xe&&(xe&&J&&j(xe,function(Ce,Pe){Ce!==J[Pe]&&(ye=!0)}),ye&&this.destroyShadows(),this.oldShadowOptions=xe),!xe)this.destroyShadows();else if(!this.shadows){oe=xe.opacity/xe.width;var se=ve?"translate(".concat(xe.offsetY,", ").concat(xe.offsetX,")"):"translate(".concat(xe.offsetX,", ").concat(xe.offsetY,")");for(ve=1;ve<=xe.width;ve++){var me=fe.cloneNode(!1),pe=2*xe.width+1-2*ve;C(me,{stroke:q.color||"#000000","stroke-opacity":oe*ve,"stroke-width":pe,transform:se,fill:"none"}),me.setAttribute("class",(me.getAttribute("class")||"")+" highcharts-shadow"),re&&(C(me,"height",Math.max(C(me,"height")-pe,0)),me.cutHeight=pe),ee?ee.element.appendChild(me):fe.parentNode&&fe.parentNode.insertBefore(me,fe),ce.push(me)}this.shadows=ce}return this},G.prototype.show=function(q){return q===void 0&&(q=!0),this.attr({visibility:q?"inherit":"visible"})},G.prototype["stroke-widthSetter"]=function(q,ee,re){this[ee]=q,re.setAttribute(ee,q)},G.prototype.strokeWidth=function(){if(!this.renderer.styledMode)return this["stroke-width"]||0;var q=this.getStyle("stroke-width"),ee=0;if(q.indexOf("px")===q.length-2)ee=z(q);else if(q!==""){var re=v.createElementNS(y,"rect");C(re,{width:q,"stroke-width":0}),this.element.parentNode.appendChild(re),ee=re.getBBox().width,re.parentNode.removeChild(re)}return ee},G.prototype.symbolAttr=function(q){var ee=this;"x y r start end width height innerR anchorX anchorY clockwise".split(" ").forEach(function(re){ee[re]=$(q[re],ee[re])}),ee.attr({d:ee.renderer.symbols[ee.symbolName](ee.x,ee.y,ee.width,ee.height,ee)})},G.prototype.textSetter=function(q){q!==this.textStr&&(delete this.textPxLength,this.textStr=q,this.added&&this.renderer.buildText(this))},G.prototype.titleSetter=function(q){var ee=this.element,re=ee.getElementsByTagName("title")[0]||v.createElementNS(this.SVG_NS,"title");ee.insertBefore?ee.insertBefore(re,ee.firstChild):ee.appendChild(re),re.textContent=String($(q,"")).replace(/<[^>]*>/g,"").replace(/</g,"<").replace(/>/g,">")},G.prototype.toFront=function(){var q=this.element;return q.parentNode.appendChild(q),this},G.prototype.translate=function(q,ee){return this.attr({translateX:q,translateY:ee})},G.prototype.updateShadows=function(q,ee,re){var ce=this.shadows;if(ce)for(var fe=ce.length;fe--;)re.call(ce[fe],q==="height"?Math.max(ee-(ce[fe].cutHeight||0),0):q==="d"?this.d:ee,q,ce[fe])},G.prototype.updateTransform=function(){var q=this.element,ee=this.matrix,re=this.rotation;re=re===void 0?0:re;var ce=this.scaleX,fe=this.scaleY,J=this.translateX,oe=this.translateY;J=["translate("+(J===void 0?0:J)+","+(oe===void 0?0:oe)+")"],A(ee)&&J.push("matrix("+ee.join(",")+")"),re&&J.push("rotate("+re+" "+$(this.rotationOriginX,q.getAttribute("x"),0)+" "+$(this.rotationOriginY,q.getAttribute("y")||0)+")"),(A(ce)||A(fe))&&J.push("scale("+$(ce,1)+" "+$(fe,1)+")"),J.length&&!(this.text||this).textPath&&q.setAttribute("transform",J.join(" "))},G.prototype.visibilitySetter=function(q,ee,re){q==="inherit"?re.removeAttribute(ee):this[ee]!==q&&re.setAttribute(ee,q),this[ee]=q},G.prototype.xGetter=function(q){return this.element.nodeName==="circle"&&(q==="x"?q="cx":q==="y"&&(q="cy")),this._defaultGetter(q)},G.prototype.zIndexSetter=function(q,ee){var re=this.renderer,ce=this.parentGroup,fe=(ce||re).element||re.box,J=this.element;re=fe===re.box;var oe=!1,ve=this.added,ye;if(A(q)?(J.setAttribute("data-z-index",q),q=+q,this[ee]===q&&(ve=!1)):A(this[ee])&&J.removeAttribute("data-z-index"),this[ee]=q,ve){for((q=this.zIndex)&&ce&&(ce.handleZ=!0),ee=fe.childNodes,ye=ee.length-1;0<=ye&&!oe;ye--){ce=ee[ye],ve=ce.getAttribute("data-z-index");var xe=!A(ve);ce!==J&&(0>q&&xe&&!re&&!ye?(fe.insertBefore(J,ee[ye]),oe=!0):(z(ve)<=q||xe&&(!A(q)||0<=q))&&(fe.insertBefore(J,ee[ye+1]||null),oe=!0))}oe||(fe.insertBefore(J,ee[re?3:0]||null),oe=!0)}return oe},G}(),i.prototype.strokeSetter=i.prototype.fillSetter,i.prototype.yGetter=i.prototype.xGetter,i.prototype.matrixSetter=i.prototype.rotationOriginXSetter=i.prototype.rotationOriginYSetter=i.prototype.rotationSetter=i.prototype.scaleXSetter=i.prototype.scaleYSetter=i.prototype.translateXSetter=i.prototype.translateYSetter=i.prototype.verticalAlignSetter=function(G,q){this[q]=G,this.doTransform=!0},i}),r(n,"Core/Renderer/RendererRegistry.js",[n["Core/Globals.js"]],function(i){var o;return function(a){a.rendererTypes={};var s;a.getRendererType=function(l){return l===void 0&&(l=s),a.rendererTypes[l]||a.rendererTypes[s]},a.registerRendererType=function(l,u,p){a.rendererTypes[l]=u,(!s||p)&&(s=l,i.Renderer=u)}}(o||(o={})),o}),r(n,"Core/Renderer/SVG/SVGLabel.js",[n["Core/Renderer/SVG/SVGElement.js"],n["Core/Utilities.js"]],function(i,o){var a=this&&this.__extends||function(){var x=function(y,_){return x=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(w,C){w.__proto__=C}||function(w,C){for(var E in C)C.hasOwnProperty(E)&&(w[E]=C[E])},x(y,_)};return function(y,_){function w(){this.constructor=y}x(y,_),y.prototype=_===null?Object.create(_):(w.prototype=_.prototype,new w)}}(),s=o.defined,l=o.extend,u=o.isNumber,p=o.merge,m=o.pick,v=o.removeEvent;return function(x){function y(_,w,C,E,T,A,k,X,Z,W){var D=x.call(this)||this;D.paddingLeftSetter=D.paddingSetter,D.paddingRightSetter=D.paddingSetter,D.init(_,"g"),D.textStr=w,D.x=C,D.y=E,D.anchorX=A,D.anchorY=k,D.baseline=Z,D.className=W,D.addClass(W==="button"?"highcharts-no-tooltip":"highcharts-label"),W&&D.addClass("highcharts-"+W),D.text=_.text(void 0,0,0,X).attr({zIndex:1});var H;return typeof T=="string"&&((H=/^url\((.*?)\)$/.test(T))||D.renderer.symbols[T])&&(D.symbolKey=T),D.bBox=y.emptyBBox,D.padding=3,D.baselineOffset=0,D.needsBox=_.styledMode||H,D.deferredAttr={},D.alignFactor=0,D}return a(y,x),y.prototype.alignSetter=function(_){_={left:0,center:.5,right:1}[_],_!==this.alignFactor&&(this.alignFactor=_,this.bBox&&u(this.xSetting)&&this.attr({x:this.xSetting}))},y.prototype.anchorXSetter=function(_,w){this.anchorX=_,this.boxAttr(w,Math.round(_)-this.getCrispAdjust()-this.xSetting)},y.prototype.anchorYSetter=function(_,w){this.anchorY=_,this.boxAttr(w,_-this.ySetting)},y.prototype.boxAttr=function(_,w){this.box?this.box.attr(_,w):this.deferredAttr[_]=w},y.prototype.css=function(_){if(_){var w={};_=p(_),y.textProps.forEach(function(C){typeof _[C]!="undefined"&&(w[C]=_[C],delete _[C])}),this.text.css(w),"fontSize"in w||"fontWeight"in w?this.updateTextPadding():("width"in w||"textOverflow"in w)&&this.updateBoxSize()}return i.prototype.css.call(this,_)},y.prototype.destroy=function(){v(this.element,"mouseenter"),v(this.element,"mouseleave"),this.text&&this.text.destroy(),this.box&&(this.box=this.box.destroy()),i.prototype.destroy.call(this)},y.prototype.fillSetter=function(_,w){_&&(this.needsBox=!0),this.fill=_,this.boxAttr(w,_)},y.prototype.getBBox=function(){this.textStr&&this.bBox.width===0&&this.bBox.height===0&&this.updateBoxSize();var _=this.padding,w=m(this.paddingLeft,_);return{width:this.width,height:this.height,x:this.bBox.x-w,y:this.bBox.y-_}},y.prototype.getCrispAdjust=function(){return this.renderer.styledMode&&this.box?this.box.strokeWidth()%2/2:(this["stroke-width"]?parseInt(this["stroke-width"],10):0)%2/2},y.prototype.heightSetter=function(_){this.heightSetting=_},y.prototype.onAdd=function(){this.text.add(this),this.attr({text:m(this.textStr,""),x:this.x||0,y:this.y||0}),this.box&&s(this.anchorX)&&this.attr({anchorX:this.anchorX,anchorY:this.anchorY})},y.prototype.paddingSetter=function(_,w){u(_)?_!==this[w]&&(this[w]=_,this.updateTextPadding()):this[w]=void 0},y.prototype.rSetter=function(_,w){this.boxAttr(w,_)},y.prototype.shadow=function(_){return _&&!this.renderer.styledMode&&(this.updateBoxSize(),this.box&&this.box.shadow(_)),this},y.prototype.strokeSetter=function(_,w){this.stroke=_,this.boxAttr(w,_)},y.prototype["stroke-widthSetter"]=function(_,w){_&&(this.needsBox=!0),this["stroke-width"]=_,this.boxAttr(w,_)},y.prototype["text-alignSetter"]=function(_){this.textAlign=_},y.prototype.textSetter=function(_){typeof _!="undefined"&&this.text.attr({text:_}),this.updateTextPadding()},y.prototype.updateBoxSize=function(){var _=this.text,w=_.element.style,C={},E=this.padding,T=this.bBox=u(this.widthSetting)&&u(this.heightSetting)&&!this.textAlign||!s(_.textStr)?y.emptyBBox:_.getBBox();this.width=this.getPaddedWidth(),this.height=(this.heightSetting||T.height||0)+2*E,w=this.renderer.fontMetrics(w&&w.fontSize,_),this.baselineOffset=E+Math.min((this.text.firstLineMetrics||w).b,T.height||1/0),this.heightSetting&&(this.baselineOffset+=(this.heightSetting-w.h)/2),this.needsBox&&!_.textPath&&(this.box||(_=this.box=this.symbolKey?this.renderer.symbol(this.symbolKey):this.renderer.rect(),_.addClass((this.className==="button"?"":"highcharts-label-box")+(this.className?" highcharts-"+this.className+"-box":"")),_.add(this)),_=this.getCrispAdjust(),C.x=_,C.y=(this.baseline?-this.baselineOffset:0)+_,C.width=Math.round(this.width),C.height=Math.round(this.height),this.box.attr(l(C,this.deferredAttr)),this.deferredAttr={})},y.prototype.updateTextPadding=function(){var _=this.text;if(!_.textPath){this.updateBoxSize();var w=this.baseline?0:this.baselineOffset,C=m(this.paddingLeft,this.padding);s(this.widthSetting)&&this.bBox&&(this.textAlign==="center"||this.textAlign==="right")&&(C+={center:.5,right:1}[this.textAlign]*(this.widthSetting-this.bBox.width)),(C!==_.x||w!==_.y)&&(_.attr("x",C),_.hasBoxWidthChanged&&(this.bBox=_.getBBox(!0)),typeof w!="undefined"&&_.attr("y",w)),_.x=C,_.y=w}},y.prototype.widthSetter=function(_){this.widthSetting=u(_)?_:void 0},y.prototype.getPaddedWidth=function(){var _=this.padding,w=m(this.paddingLeft,_);return _=m(this.paddingRight,_),(this.widthSetting||this.bBox.width||0)+w+_},y.prototype.xSetter=function(_){this.x=_,this.alignFactor&&(_-=this.alignFactor*this.getPaddedWidth(),this["forceAnimate:x"]=!0),this.xSetting=Math.round(_),this.attr("translateX",this.xSetting)},y.prototype.ySetter=function(_){this.ySetting=this.y=Math.round(_),this.attr("translateY",this.ySetting)},y.emptyBBox={width:0,height:0,x:0,y:0},y.textProps="color direction fontFamily fontSize fontStyle fontWeight lineHeight textAlign textDecoration textOutline textOverflow width".split(" "),y}(i)}),r(n,"Core/Renderer/SVG/Symbols.js",[n["Core/Utilities.js"]],function(i){function o(m,v,x,y,_){var w=[];if(_){var C=_.start||0,E=p(_.r,x);x=p(_.r,y||x);var T=(_.end||0)-.001;y=_.innerR;var A=p(_.open,.001>Math.abs((_.end||0)-C-2*Math.PI)),k=Math.cos(C),X=Math.sin(C),Z=Math.cos(T),W=Math.sin(T);C=p(_.longArc,.001>T-C-Math.PI?0:1),w.push(["M",m+E*k,v+x*X],["A",E,x,0,C,p(_.clockwise,1),m+E*Z,v+x*W]),l(y)&&w.push(A?["M",m+y*Z,v+y*W]:["L",m+y*Z,v+y*W],["A",y,y,0,C,l(_.clockwise)?1-_.clockwise:0,m+y*k,v+y*X]),A||w.push(["Z"])}return w}function a(m,v,x,y,_){return _&&_.r?s(m,v,x,y,_):[["M",m,v],["L",m+x,v],["L",m+x,v+y],["L",m,v+y],["Z"]]}function s(m,v,x,y,_){return _=_&&_.r||0,[["M",m+_,v],["L",m+x-_,v],["C",m+x,v,m+x,v,m+x,v+_],["L",m+x,v+y-_],["C",m+x,v+y,m+x,v+y,m+x-_,v+y],["L",m+_,v+y],["C",m,v+y,m,v+y,m,v+y-_],["L",m,v+_],["C",m,v,m,v,m+_,v]]}var l=i.defined,u=i.isNumber,p=i.pick;return{arc:o,callout:function(m,v,x,y,_){var w=Math.min(_&&_.r||0,x,y),C=w+6,E=_&&_.anchorX;_=_&&_.anchorY||0;var T=s(m,v,x,y,{r:w});return u(E)&&(m+E>=x?_>v+C&&_<v+y-C?T.splice(3,1,["L",m+x,_-6],["L",m+x+6,_],["L",m+x,_+6],["L",m+x,v+y-w]):T.splice(3,1,["L",m+x,y/2],["L",E,_],["L",m+x,y/2],["L",m+x,v+y-w]):0>=m+E?_>v+C&&_<v+y-C?T.splice(7,1,["L",m,_+6],["L",m-6,_],["L",m,_-6],["L",m,v+w]):T.splice(7,1,["L",m,y/2],["L",E,_],["L",m,y/2],["L",m,v+w]):_&&_>y&&E>m+C&&E<m+x-C?T.splice(5,1,["L",E+6,v+y],["L",E,v+y+6],["L",E-6,v+y],["L",m+w,v+y]):_&&0>_&&E>m+C&&E<m+x-C&&T.splice(1,1,["L",E-6,v],["L",E,v-6],["L",E+6,v],["L",x-w,v])),T},circle:function(m,v,x,y){return o(m+x/2,v+y/2,x/2,y/2,{start:.5*Math.PI,end:2.5*Math.PI,open:!1})},diamond:function(m,v,x,y){return[["M",m+x/2,v],["L",m+x,v+y/2],["L",m+x/2,v+y],["L",m,v+y/2],["Z"]]},rect:a,roundedRect:s,square:a,triangle:function(m,v,x,y){return[["M",m+x/2,v],["L",m+x,v+y],["L",m,v+y],["Z"]]},"triangle-down":function(m,v,x,y){return[["M",m,v],["L",m+x,v],["L",m+x/2,v+y],["Z"]]}}}),r(n,"Core/Renderer/SVG/TextBuilder.js",[n["Core/Renderer/HTML/AST.js"],n["Core/Globals.js"],n["Core/Utilities.js"]],function(i,o,a){var s=o.doc,l=o.SVG_NS,u=o.win,p=a.attr,m=a.extend,v=a.fireEvent,x=a.isString,y=a.objectEach,_=a.pick;return function(){function w(C){var E=C.styles;this.renderer=C.renderer,this.svgElement=C,this.width=C.textWidth,this.textLineHeight=E&&E.lineHeight,this.textOutline=E&&E.textOutline,this.ellipsis=!(!E||E.textOverflow!=="ellipsis"),this.noWrap=!(!E||E.whiteSpace!=="nowrap"),this.fontSize=E&&E.fontSize}return w.prototype.buildSVG=function(){var C=this.svgElement,E=C.element,T=C.renderer,A=_(C.textStr,"").toString(),k=A.indexOf("<")!==-1,X=E.childNodes;T=this.width&&!C.added&&T.box;var Z=/<br.*?>/g,W=[A,this.ellipsis,this.noWrap,this.textLineHeight,this.textOutline,this.fontSize,this.width].join();if(W!==C.textCache){for(C.textCache=W,delete C.actualWidth,W=X.length;W--;)E.removeChild(X[W]);k||this.ellipsis||this.width||C.textPath||A.indexOf(" ")!==-1&&(!this.noWrap||Z.test(A))?A!==""&&(T&&T.appendChild(E),A=new i(A),this.modifyTree(A.nodes),A.addToDOM(E),this.modifyDOM(),this.ellipsis&&(E.textContent||"").indexOf("\u2026")!==-1&&C.attr("title",this.unescapeEntities(C.textStr||"",["<",">"])),T&&T.removeChild(E)):E.appendChild(s.createTextNode(this.unescapeEntities(A))),x(this.textOutline)&&C.applyTextOutline&&C.applyTextOutline(this.textOutline)}},w.prototype.modifyDOM=function(){var C=this,E=this.svgElement,T=p(E.element,"x");E.firstLineMetrics=void 0;for(var A;(A=E.element.firstChild)&&/^[\s\u200B]*$/.test(A.textContent||" ");)E.element.removeChild(A);[].forEach.call(E.element.querySelectorAll("tspan.highcharts-br"),function(W,D){W.nextSibling&&W.previousSibling&&(D===0&&W.previousSibling.nodeType===1&&(E.firstLineMetrics=E.renderer.fontMetrics(void 0,W.previousSibling)),p(W,{dy:C.getLineHeight(W.nextSibling),x:T}))});var k=this.width||0;if(k){var X=function(W,D){var H=W.textContent||"",N=H.replace(/([^\^])-/g,"$1- ").split(" "),j=!C.noWrap&&(1<N.length||1<E.element.childNodes.length),$=C.getLineHeight(D),z=0,O=E.actualWidth;if(C.ellipsis)H&&C.truncate(W,H,void 0,0,Math.max(0,k-parseInt(C.fontSize||12,10)),function(F,G){return F.substring(0,G)+"\u2026"});else if(j){for(H=[],j=[];D.firstChild&&D.firstChild!==W;)j.push(D.firstChild),D.removeChild(D.firstChild);for(;N.length;)N.length&&!C.noWrap&&0<z&&(H.push(W.textContent||""),W.textContent=N.join(" ").replace(/- /g,"-")),C.truncate(W,void 0,N,z===0&&O||0,k,function(F,G){return N.slice(0,G).join(" ").replace(/- /g,"-")}),O=E.actualWidth,z++;j.forEach(function(F){D.insertBefore(F,W)}),H.forEach(function(F){D.insertBefore(s.createTextNode(F),W),F=s.createElementNS(l,"tspan"),F.textContent="\u200B",p(F,{dy:$,x:T}),D.insertBefore(F,W)})}},Z=function(W){[].slice.call(W.childNodes).forEach(function(D){D.nodeType===u.Node.TEXT_NODE?X(D,W):(D.className.baseVal.indexOf("highcharts-br")!==-1&&(E.actualWidth=0),Z(D))})};Z(E.element)}},w.prototype.getLineHeight=function(C){var E;return C=C.nodeType===u.Node.TEXT_NODE?C.parentElement:C,this.renderer.styledMode||(E=C&&/(px|em)$/.test(C.style.fontSize)?C.style.fontSize:this.fontSize||this.renderer.style.fontSize||12),this.textLineHeight?parseInt(this.textLineHeight.toString(),10):this.renderer.fontMetrics(E,C||this.svgElement.element).h},w.prototype.modifyTree=function(C){var E=this,T=function(A,k){var X=A.attributes;X=X===void 0?{}:X;var Z=A.children,W=A.style;W=W===void 0?{}:W;var D=A.tagName,H=E.renderer.styledMode;D==="b"||D==="strong"?H?X.class="highcharts-strong":W.fontWeight="bold":(D==="i"||D==="em")&&(H?X.class="highcharts-emphasized":W.fontStyle="italic"),W&&W.color&&(W.fill=W.color),D==="br"?(X.class="highcharts-br",A.textContent="\u200B",(k=C[k+1])&&k.textContent&&(k.textContent=k.textContent.replace(/^ +/gm,""))):D==="a"&&Z&&Z.some(function(N){return N.tagName==="#text"})&&(A.children=[{children:Z,tagName:"tspan"}]),D!=="#text"&&D!=="a"&&(A.tagName="tspan"),m(A,{attributes:X,style:W}),Z&&Z.filter(function(N){return N.tagName!=="#text"}).forEach(T)};C.forEach(T),v(this.svgElement,"afterModifyTree",{nodes:C})},w.prototype.truncate=function(C,E,T,A,k,X){var Z=this.svgElement,W=Z.renderer,D=Z.rotation,H=[],N=T?1:0,j=(E||T||"").length,$=j,z,O=function(G,q){q=q||G;var ee=C.parentNode;if(ee&&typeof H[q]=="undefined")if(ee.getSubStringLength)try{H[q]=A+ee.getSubStringLength(0,T?q+1:q)}catch{}else W.getSpanWidth&&(C.textContent=X(E||T,G),H[q]=A+W.getSpanWidth(Z,C));return H[q]};Z.rotation=0;var F=O(C.textContent.length);if(A+F>k){for(;N<=j;)$=Math.ceil((N+j)/2),T&&(z=X(T,$)),F=O($,z&&z.length-1),N===j?N=j+1:F>k?j=$-1:N=$;j===0?C.textContent="":E&&j===E.length-1||(C.textContent=z||X(E||T,$))}T&&T.splice(0,$),Z.actualWidth=F,Z.rotation=D},w.prototype.unescapeEntities=function(C,E){return y(this.renderer.escapes,function(T,A){E&&E.indexOf(T)!==-1||(C=C.toString().replace(new RegExp(T,"g"),A))}),C},w}()}),r(n,"Core/Renderer/SVG/SVGRenderer.js",[n["Core/Renderer/HTML/AST.js"],n["Core/Color/Color.js"],n["Core/Globals.js"],n["Core/Renderer/RendererRegistry.js"],n["Core/Renderer/SVG/SVGElement.js"],n["Core/Renderer/SVG/SVGLabel.js"],n["Core/Renderer/SVG/Symbols.js"],n["Core/Renderer/SVG/TextBuilder.js"],n["Core/Utilities.js"]],function(i,o,a,s,l,u,p,m,v){var x=a.charts,y=a.deg2rad,_=a.doc,w=a.isFirefox,C=a.isMS,E=a.isWebKit,T=a.noop,A=a.SVG_NS,k=a.symbolSizes,X=a.win,Z=v.addEvent,W=v.attr,D=v.createElement,H=v.css,N=v.defined,j=v.destroyObjectProperties,$=v.extend,z=v.isArray,O=v.isNumber,F=v.isObject,G=v.isString,q=v.merge,ee=v.pick,re=v.pInt,ce=v.uniqueKey,fe;return a=function(){function J(oe,ve,ye,xe,se,me,pe){this.width=this.url=this.style=this.isSVG=this.imgCount=this.height=this.gradients=this.globalAnimation=this.defs=this.chartIndex=this.cacheKeys=this.cache=this.boxWrapper=this.box=this.alignedObjects=void 0,this.init(oe,ve,ye,xe,se,me,pe)}return J.prototype.init=function(oe,ve,ye,xe,se,me,pe){var Ce=this.createElement("svg").attr({version:"1.1",class:"highcharts-root"}),Pe=Ce.element;pe||Ce.css(this.getStyle(xe)),oe.appendChild(Pe),W(oe,"dir","ltr"),oe.innerHTML.indexOf("xmlns")===-1&&W(Pe,"xmlns",this.SVG_NS),this.isSVG=!0,this.box=Pe,this.boxWrapper=Ce,this.alignedObjects=[],this.url=this.getReferenceURL(),this.createElement("desc").add().element.appendChild(_.createTextNode("Created with Highcharts 10.3.3")),this.defs=this.createElement("defs").add(),this.allowHTML=me,this.forExport=se,this.styledMode=pe,this.gradients={},this.cache={},this.cacheKeys=[],this.imgCount=0,this.setSize(ve,ye,!1);var Re;w&&oe.getBoundingClientRect&&(ve=function(){H(oe,{left:0,top:0}),Re=oe.getBoundingClientRect(),H(oe,{left:Math.ceil(Re.left)-Re.left+"px",top:Math.ceil(Re.top)-Re.top+"px"})},ve(),this.unSubPixelFix=Z(X,"resize",ve))},J.prototype.definition=function(oe){return new i([oe]).addToDOM(this.defs.element)},J.prototype.getReferenceURL=function(){if((w||E)&&_.getElementsByTagName("base").length){if(!N(fe)){var oe=ce();oe=new i([{tagName:"svg",attributes:{width:8,height:8},children:[{tagName:"defs",children:[{tagName:"clipPath",attributes:{id:oe},children:[{tagName:"rect",attributes:{width:4,height:4}}]}]},{tagName:"rect",attributes:{id:"hitme",width:8,height:8,"clip-path":"url(#".concat(oe,")"),fill:"rgba(0,0,0,0.001)"}}]}]).addToDOM(_.body),H(oe,{position:"fixed",top:0,left:0,zIndex:9e5});var ve=_.elementFromPoint(6,6);fe=(ve&&ve.id)==="hitme",_.body.removeChild(oe)}if(fe)return X.location.href.split("#")[0].replace(/<[^>]*>/g,"").replace(/([\('\)])/g,"\\$1").replace(/ /g,"%20")}return""},J.prototype.getStyle=function(oe){return this.style=$({fontFamily:'"Lucida Grande", "Lucida Sans Unicode", Arial, Helvetica, sans-serif',fontSize:"12px"},oe)},J.prototype.setStyle=function(oe){this.boxWrapper.css(this.getStyle(oe))},J.prototype.isHidden=function(){return!this.boxWrapper.getBBox().width},J.prototype.destroy=function(){var oe=this.defs;return this.box=null,this.boxWrapper=this.boxWrapper.destroy(),j(this.gradients||{}),this.gradients=null,oe&&(this.defs=oe.destroy()),this.unSubPixelFix&&this.unSubPixelFix(),this.alignedObjects=null},J.prototype.createElement=function(oe){var ve=new this.Element;return ve.init(this,oe),ve},J.prototype.getRadialAttr=function(oe,ve){return{cx:oe[0]-oe[2]/2+(ve.cx||0)*oe[2],cy:oe[1]-oe[2]/2+(ve.cy||0)*oe[2],r:(ve.r||0)*oe[2]}},J.prototype.buildText=function(oe){new m(oe).buildSVG()},J.prototype.getContrast=function(oe){return oe=o.parse(oe).rgba.map(function(ve){return ve/=255,.03928>=ve?ve/12.92:Math.pow((ve+.055)/1.055,2.4)}),oe=.2126*oe[0]+.7152*oe[1]+.0722*oe[2],1.05/(oe+.05)>(oe+.05)/.05?"#FFFFFF":"#000000"},J.prototype.button=function(oe,ve,ye,xe,se,me,pe,Ce,Pe,Re){se===void 0&&(se={});var ke=this.label(oe,ve,ye,Pe,void 0,void 0,Re,void 0,"button"),ze=this.styledMode;oe=se.states||{};var Ge=0;se=q(se),delete se.states;var ht=q({color:"#333333",cursor:"pointer",fontWeight:"normal"},se.style);delete se.style;var Tt=i.filterUserAttributes(se);if(ke.attr(q({padding:8,r:2},Tt)),!ze){Tt=q({fill:"#f7f7f7",stroke:"#cccccc","stroke-width":1},Tt),me=q(Tt,{fill:"#e6e6e6"},i.filterUserAttributes(me||oe.hover||{}));var xt=me.style;delete me.style,pe=q(Tt,{fill:"#e6ebf5",style:{color:"#000000",fontWeight:"bold"}},i.filterUserAttributes(pe||oe.select||{}));var pt=pe.style;delete pe.style,Ce=q(Tt,{style:{color:"#cccccc"}},i.filterUserAttributes(Ce||oe.disabled||{}));var It=Ce.style;delete Ce.style}return Z(ke.element,C?"mouseover":"mouseenter",function(){Ge!==3&&ke.setState(1)}),Z(ke.element,C?"mouseout":"mouseleave",function(){Ge!==3&&ke.setState(Ge)}),ke.setState=function(Ie){Ie!==1&&(ke.state=Ge=Ie),ke.removeClass(/highcharts-button-(normal|hover|pressed|disabled)/).addClass("highcharts-button-"+["normal","hover","pressed","disabled"][Ie||0]),ze||(ke.attr([Tt,me,pe,Ce][Ie||0]),Ie=[ht,xt,pt,It][Ie||0],F(Ie)&&ke.css(Ie))},ze||(ke.attr(Tt).css($({cursor:"default"},ht)),Re&&ke.text.css({pointerEvents:"none"})),ke.on("touchstart",function(Ie){return Ie.stopPropagation()}).on("click",function(Ie){Ge!==3&&xe.call(ke,Ie)})},J.prototype.crispLine=function(oe,ve,ye){ye===void 0&&(ye="round");var xe=oe[0],se=oe[1];return N(xe[1])&&xe[1]===se[1]&&(xe[1]=se[1]=Math[ye](xe[1])-ve%2/2),N(xe[2])&&xe[2]===se[2]&&(xe[2]=se[2]=Math[ye](xe[2])+ve%2/2),oe},J.prototype.path=function(oe){var ve=this.styledMode?{}:{fill:"none"};return z(oe)?ve.d=oe:F(oe)&&$(ve,oe),this.createElement("path").attr(ve)},J.prototype.circle=function(oe,ve,ye){return oe=F(oe)?oe:typeof oe=="undefined"?{}:{x:oe,y:ve,r:ye},ve=this.createElement("circle"),ve.xSetter=ve.ySetter=function(xe,se,me){me.setAttribute("c"+se,xe)},ve.attr(oe)},J.prototype.arc=function(oe,ve,ye,xe,se,me){return F(oe)?(xe=oe,ve=xe.y,ye=xe.r,oe=xe.x):xe={innerR:xe,start:se,end:me},oe=this.symbol("arc",oe,ve,ye,ye,xe),oe.r=ye,oe},J.prototype.rect=function(oe,ve,ye,xe,se,me){se=F(oe)?oe.r:se;var pe=this.createElement("rect");return oe=F(oe)?oe:typeof oe=="undefined"?{}:{x:oe,y:ve,width:Math.max(ye,0),height:Math.max(xe,0)},this.styledMode||(typeof me!="undefined"&&(oe["stroke-width"]=me,oe=pe.crisp(oe)),oe.fill="none"),se&&(oe.r=se),pe.rSetter=function(Ce,Pe,Re){pe.r=Ce,W(Re,{rx:Ce,ry:Ce})},pe.rGetter=function(){return pe.r||0},pe.attr(oe)},J.prototype.setSize=function(oe,ve,ye){this.width=oe,this.height=ve,this.boxWrapper.animate({width:oe,height:ve},{step:function(){this.attr({viewBox:"0 0 "+this.attr("width")+" "+this.attr("height")})},duration:ee(ye,!0)?void 0:0}),this.alignElements()},J.prototype.g=function(oe){var ve=this.createElement("g");return oe?ve.attr({class:"highcharts-"+oe}):ve},J.prototype.image=function(oe,ve,ye,xe,se,me){var pe={preserveAspectRatio:"none"},Ce=function(Re,ke){Re.setAttributeNS?Re.setAttributeNS("http://www.w3.org/1999/xlink","href",ke):Re.setAttribute("hc-svg-href",ke)};O(ve)&&(pe.x=ve),O(ye)&&(pe.y=ye),O(xe)&&(pe.width=xe),O(se)&&(pe.height=se);var Pe=this.createElement("image").attr(pe);return ve=function(Re){Ce(Pe.element,oe),me.call(Pe,Re)},me?(Ce(Pe.element,"data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="),ye=new X.Image,Z(ye,"load",ve),ye.src=oe,ye.complete&&ve({})):Ce(Pe.element,oe),Pe},J.prototype.symbol=function(oe,ve,ye,xe,se,me){var pe=this,Ce=/^url\((.*?)\)$/,Pe=Ce.test(oe),Re=!Pe&&(this.symbols[oe]?oe:"circle"),ke=Re&&this.symbols[Re],ze;if(ke){typeof ve=="number"&&(ze=ke.call(this.symbols,Math.round(ve||0),Math.round(ye||0),xe||0,se||0,me));var Ge=this.path(ze);pe.styledMode||Ge.attr("fill","none"),$(Ge,{symbolName:Re||void 0,x:ve,y:ye,width:xe,height:se}),me&&$(Ge,me)}else if(Pe){var ht=oe.match(Ce)[1],Tt=Ge=this.image(ht);Tt.imgwidth=ee(k[ht]&&k[ht].width,me&&me.width),Tt.imgheight=ee(k[ht]&&k[ht].height,me&&me.height);var xt=function(pt){return pt.attr({width:pt.width,height:pt.height})};["width","height"].forEach(function(pt){Tt[pt+"Setter"]=function(It,Ie){this[Ie]=It,It=this.alignByTranslate;var de=this.element,Te=this.width,Be=this.height,Ke=this.imgwidth,ot=this.imgheight,Ze=this["img"+Ie];if(N(Ze)){var Je=1;me&&me.backgroundSize==="within"&&Te&&Be?(Je=Math.min(Te/Ke,Be/ot),Ze=Math.round(Ze*Je),W(de,{width:Math.round(Ke*Je),height:Math.round(ot*Je)})):de&&de.setAttribute(Ie,Ze),It||this.translate(((Te||0)-Ze*Je)/2,((Be||0)-Ze*Je)/2)}}}),N(ve)&&Tt.attr({x:ve,y:ye}),Tt.isImg=!0,N(Tt.imgwidth)&&N(Tt.imgheight)?xt(Tt):(Tt.attr({width:0,height:0}),D("img",{onload:function(){var pt=x[pe.chartIndex];this.width===0&&(H(this,{position:"absolute",top:"-999em"}),_.body.appendChild(this)),k[ht]={width:this.width,height:this.height},Tt.imgwidth=this.width,Tt.imgheight=this.height,Tt.element&&xt(Tt),this.parentNode&&this.parentNode.removeChild(this),pe.imgCount--,!pe.imgCount&&pt&&!pt.hasLoaded&&pt.onload()},src:ht}),this.imgCount++)}return Ge},J.prototype.clipRect=function(oe,ve,ye,xe){var se=ce()+"-",me=this.createElement("clipPath").attr({id:se}).add(this.defs);return oe=this.rect(oe,ve,ye,xe,0).add(me),oe.id=se,oe.clipPath=me,oe.count=0,oe},J.prototype.text=function(oe,ve,ye,xe){var se={};return xe&&(this.allowHTML||!this.forExport)?this.html(oe,ve,ye):(se.x=Math.round(ve||0),ye&&(se.y=Math.round(ye)),N(oe)&&(se.text=oe),oe=this.createElement("text").attr(se),(!xe||this.forExport&&!this.allowHTML)&&(oe.xSetter=function(me,pe,Ce){for(var Pe=Ce.getElementsByTagName("tspan"),Re=Ce.getAttribute(pe),ke=0,ze;ke<Pe.length;ke++)ze=Pe[ke],ze.getAttribute(pe)===Re&&ze.setAttribute(pe,me);Ce.setAttribute(pe,me)}),oe)},J.prototype.fontMetrics=function(oe,ve){return oe=!this.styledMode&&/px/.test(oe)||!X.getComputedStyle?oe||ve&&ve.style&&ve.style.fontSize||this.style&&this.style.fontSize:ve&&l.prototype.getStyle.call(ve,"font-size"),oe=/px/.test(oe)?re(oe):12,ve=24>oe?oe+3:Math.round(1.2*oe),{h:ve,b:Math.round(.8*ve),f:oe}},J.prototype.rotCorr=function(oe,ve,ye){var xe=oe;return ve&&ye&&(xe=Math.max(xe*Math.cos(ve*y),4)),{x:-oe/3*Math.sin(ve*y),y:xe}},J.prototype.pathToSegments=function(oe){for(var ve=[],ye=[],xe={A:8,C:7,H:2,L:3,M:3,Q:5,S:5,T:3,V:2},se=0;se<oe.length;se++)G(ye[0])&&O(oe[se])&&ye.length===xe[ye[0].toUpperCase()]&&oe.splice(se,0,ye[0].replace("M","L").replace("m","l")),typeof oe[se]=="string"&&(ye.length&&ve.push(ye.slice(0)),ye.length=0),ye.push(oe[se]);return ve.push(ye.slice(0)),ve},J.prototype.label=function(oe,ve,ye,xe,se,me,pe,Ce,Pe){return new u(this,oe,ve,ye,xe,se,me,pe,Ce,Pe)},J.prototype.alignElements=function(){this.alignedObjects.forEach(function(oe){return oe.align()})},J}(),$(a.prototype,{Element:l,SVG_NS:A,escapes:{"&":"&","<":"<",">":">","'":"'",'"':"""},symbols:p,draw:T}),s.registerRendererType("svg",a,!0),a}),r(n,"Core/Renderer/HTML/HTMLElement.js",[n["Core/Globals.js"],n["Core/Renderer/SVG/SVGElement.js"],n["Core/Utilities.js"]],function(i,o,a){var s=this&&this.__extends||function(){var C=function(E,T){return C=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(A,k){A.__proto__=k}||function(A,k){for(var X in k)k.hasOwnProperty(X)&&(A[X]=k[X])},C(E,T)};return function(E,T){function A(){this.constructor=E}C(E,T),E.prototype=T===null?Object.create(T):(A.prototype=T.prototype,new A)}}(),l=i.isFirefox,u=i.isMS,p=i.isWebKit,m=i.win,v=a.css,x=a.defined,y=a.extend,_=a.pick,w=a.pInt;return function(C){function E(){return C!==null&&C.apply(this,arguments)||this}return s(E,C),E.compose=function(T){if(E.composedClasses.indexOf(T)===-1){E.composedClasses.push(T);var A=E.prototype,k=T.prototype;k.getSpanCorrection=A.getSpanCorrection,k.htmlCss=A.htmlCss,k.htmlGetBBox=A.htmlGetBBox,k.htmlUpdateTransform=A.htmlUpdateTransform,k.setSpanRotation=A.setSpanRotation}return T},E.prototype.getSpanCorrection=function(T,A,k){this.xCorr=-T*k,this.yCorr=-A},E.prototype.htmlCss=function(T){var A=this.element.tagName==="SPAN"&&T&&"width"in T,k=_(A&&T.width,void 0);if(A){delete T.width,this.textWidth=k;var X=!0}return T&&T.textOverflow==="ellipsis"&&(T.whiteSpace="nowrap",T.overflow="hidden"),this.styles=y(this.styles,T),v(this.element,T),X&&this.htmlUpdateTransform(),this},E.prototype.htmlGetBBox=function(){var T=this.element;return{x:T.offsetLeft,y:T.offsetTop,width:T.offsetWidth,height:T.offsetHeight}},E.prototype.htmlUpdateTransform=function(){if(this.added){var T=this.renderer,A=this.element,k=this.translateX||0,X=this.translateY||0,Z=this.x||0,W=this.y||0,D=this.textAlign||"left",H={left:0,center:.5,right:1}[D],N=this.styles;if(N=N&&N.whiteSpace,v(A,{marginLeft:k,marginTop:X}),!T.styledMode&&this.shadows&&this.shadows.forEach(function(G){v(G,{marginLeft:k+1,marginTop:X+1})}),this.inverted&&[].forEach.call(A.childNodes,function(G){T.invertChild(G,A)}),A.tagName==="SPAN"){var j=this.rotation,$=this.textWidth&&w(this.textWidth),z=[j,D,A.innerHTML,this.textWidth,this.textAlign].join(),O=void 0;if(O=!1,$!==this.oldTextWidth){if(this.textPxLength)var F=this.textPxLength;else v(A,{width:"",whiteSpace:N||"nowrap"}),F=A.offsetWidth;($>this.oldTextWidth||F>$)&&(/[ \-]/.test(A.textContent||A.innerText)||A.style.textOverflow==="ellipsis")&&(v(A,{width:F>$||j?$+"px":"auto",display:"block",whiteSpace:N||"normal"}),this.oldTextWidth=$,O=!0)}this.hasBoxWidthChanged=O,z!==this.cTT&&(O=T.fontMetrics(A.style.fontSize,A).b,!x(j)||j===(this.oldRotation||0)&&D===this.oldAlign||this.setSpanRotation(j,H,O),this.getSpanCorrection(!x(j)&&this.textPxLength||A.offsetWidth,O,H,j,D)),v(A,{left:Z+(this.xCorr||0)+"px",top:W+(this.yCorr||0)+"px"}),this.cTT=z,this.oldRotation=j,this.oldAlign=D}}else this.alignOnAdd=!0},E.prototype.setSpanRotation=function(T,A,k){var X={},Z=u&&!/Edge/.test(m.navigator.userAgent)?"-ms-transform":p?"-webkit-transform":l?"MozTransform":m.opera?"-o-transform":void 0;Z&&(X[Z]=X.transform="rotate("+T+"deg)",X[Z+(l?"Origin":"-origin")]=X.transformOrigin=100*A+"% "+k+"px",v(this.element,X))},E.composedClasses=[],E}(o)}),r(n,"Core/Renderer/HTML/HTMLRenderer.js",[n["Core/Renderer/HTML/AST.js"],n["Core/Renderer/SVG/SVGElement.js"],n["Core/Renderer/SVG/SVGRenderer.js"],n["Core/Utilities.js"]],function(i,o,a,s){var l=this&&this.__extends||function(){var x=function(y,_){return x=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(w,C){w.__proto__=C}||function(w,C){for(var E in C)C.hasOwnProperty(E)&&(w[E]=C[E])},x(y,_)};return function(y,_){function w(){this.constructor=y}x(y,_),y.prototype=_===null?Object.create(_):(w.prototype=_.prototype,new w)}}(),u=s.attr,p=s.createElement,m=s.extend,v=s.pick;return function(x){function y(){return x!==null&&x.apply(this,arguments)||this}return l(y,x),y.compose=function(_){return y.composedClasses.indexOf(_)===-1&&(y.composedClasses.push(_),_.prototype.html=y.prototype.html),_},y.prototype.html=function(_,w,C){var E=this.createElement("span"),T=E.element,A=E.renderer,k=A.isSVG,X=function(Z,W){["opacity","visibility"].forEach(function(D){Z[D+"Setter"]=function(H,N,j){var $=Z.div?Z.div.style:W;o.prototype[D+"Setter"].call(this,H,N,j),$&&($[N]=H)}}),Z.addedSetters=!0};return E.textSetter=function(Z){Z!==this.textStr&&(delete this.bBox,delete this.oldTextWidth,i.setElementHTML(this.element,v(Z,"")),this.textStr=Z,E.doTransform=!0)},k&&X(E,E.element.style),E.xSetter=E.ySetter=E.alignSetter=E.rotationSetter=function(Z,W){W==="align"?E.alignValue=E.textAlign=Z:E[W]=Z,E.doTransform=!0},E.afterSetters=function(){this.doTransform&&(this.htmlUpdateTransform(),this.doTransform=!1)},E.attr({text:_,x:Math.round(w),y:Math.round(C)}).css({position:"absolute"}),A.styledMode||E.css({fontFamily:this.style.fontFamily,fontSize:this.style.fontSize}),T.style.whiteSpace="nowrap",E.css=E.htmlCss,k&&(E.add=function(Z){var W=A.box.parentNode,D=[];if(this.parentGroup=Z){var H=Z.div;if(!H){for(;Z;)D.push(Z),Z=Z.parentGroup;D.reverse().forEach(function(N){function j(F,G){N[G]=F,G==="translateX"?O.left=F+"px":O.top=F+"px",N.doTransform=!0}var $=u(N.element,"class"),z=N.styles||{};H=N.div=N.div||p("div",$?{className:$}:void 0,{position:"absolute",left:(N.translateX||0)+"px",top:(N.translateY||0)+"px",display:N.display,opacity:N.opacity,cursor:z.cursor,pointerEvents:z.pointerEvents,visibility:N.visibility},H||W);var O=H.style;m(N,{classSetter:function(F){return function(G){this.element.setAttribute("class",G),F.className=G}}(H),on:function(){return D[0].div&&E.on.apply({element:D[0].div,onEvents:N.onEvents},arguments),N},translateXSetter:j,translateYSetter:j}),N.addedSetters||X(N)})}}else H=W;return H.appendChild(T),E.added=!0,E.alignOnAdd&&E.htmlUpdateTransform(),E}),E},y.composedClasses=[],y}(a)}),r(n,"Core/Axis/AxisDefaults.js",[],function(){var i;return function(o){o.defaultXAxisOptions={alignTicks:!0,allowDecimals:void 0,panningEnabled:!0,zIndex:2,zoomEnabled:!0,dateTimeLabelFormats:{millisecond:{main:"%H:%M:%S.%L",range:!1},second:{main:"%H:%M:%S",range:!1},minute:{main:"%H:%M",range:!1},hour:{main:"%H:%M",range:!1},day:{main:"%e. %b"},week:{main:"%e. %b"},month:{main:"%b '%y"},year:{main:"%Y"}},endOnTick:!1,gridLineDashStyle:"Solid",gridZIndex:1,labels:{autoRotation:void 0,autoRotationLimit:80,distance:void 0,enabled:!0,indentation:10,overflow:"justify",padding:5,reserveSpace:void 0,rotation:void 0,staggerLines:0,step:0,useHTML:!1,x:0,zIndex:7,style:{color:"#666666",cursor:"default",fontSize:"11px"}},maxPadding:.01,minorGridLineDashStyle:"Solid",minorTickLength:2,minorTickPosition:"outside",minPadding:.01,offset:void 0,opposite:!1,reversed:void 0,reversedStacks:!1,showEmpty:!0,showFirstLabel:!0,showLastLabel:!0,startOfWeek:1,startOnTick:!1,tickLength:10,tickPixelInterval:100,tickmarkPlacement:"between",tickPosition:"outside",title:{align:"middle",rotation:0,useHTML:!1,x:0,y:0,style:{color:"#666666"}},type:"linear",uniqueNames:!0,visible:!0,minorGridLineColor:"#f2f2f2",minorGridLineWidth:1,minorTickColor:"#999999",lineColor:"#ccd6eb",lineWidth:1,gridLineColor:"#e6e6e6",gridLineWidth:void 0,tickColor:"#ccd6eb"},o.defaultYAxisOptions={reversedStacks:!0,endOnTick:!0,maxPadding:.05,minPadding:.05,tickPixelInterval:72,showLastLabel:!0,labels:{x:-8},startOnTick:!0,title:{rotation:270,text:"Values"},stackLabels:{animation:{},allowOverlap:!1,enabled:!1,crop:!0,overflow:"justify",formatter:function(){var a=this.axis.chart.numberFormatter;return a(this.total||0,-1)},style:{color:"#000000",fontSize:"11px",fontWeight:"bold",textOutline:"1px contrast"}},gridLineWidth:1,lineWidth:0},o.defaultLeftAxisOptions={labels:{x:-15},title:{rotation:270}},o.defaultRightAxisOptions={labels:{x:15},title:{rotation:90}},o.defaultBottomAxisOptions={labels:{autoRotation:[-45],x:0},margin:15,title:{rotation:0}},o.defaultTopAxisOptions={labels:{autoRotation:[-45],x:0},margin:15,title:{rotation:0}}}(i||(i={})),i}),r(n,"Core/Foundation.js",[n["Core/Utilities.js"]],function(i){var o=i.addEvent,a=i.isFunction,s=i.objectEach,l=i.removeEvent,u;return function(p){p.registerEventOptions=function(m,v){m.eventOptions=m.eventOptions||{},s(v.events,function(x,y){m.eventOptions[y]!==x&&(m.eventOptions[y]&&(l(m,y,m.eventOptions[y]),delete m.eventOptions[y]),a(x)&&(m.eventOptions[y]=x,o(m,y,x)))})}}(u||(u={})),u}),r(n,"Core/Axis/Tick.js",[n["Core/FormatUtilities.js"],n["Core/Globals.js"],n["Core/Utilities.js"]],function(i,o,a){var s=o.deg2rad,l=a.clamp,u=a.correctFloat,p=a.defined,m=a.destroyObjectProperties,v=a.extend,x=a.fireEvent,y=a.isNumber,_=a.merge,w=a.objectEach,C=a.pick;return o=function(){function E(T,A,k,X,Z){this.isNewLabel=this.isNew=!0,this.axis=T,this.pos=A,this.type=k||"",this.parameters=Z||{},this.tickmarkOffset=this.parameters.tickmarkOffset,this.options=this.parameters.options,x(this,"init"),k||X||this.addLabel()}return E.prototype.addLabel=function(){var T=this,A=T.axis,k=A.options,X=A.chart,Z=A.categories,W=A.logarithmic,D=A.names,H=T.pos,N=C(T.options&&T.options.labels,k.labels),j=A.tickPositions,$=H===j[0],z=H===j[j.length-1],O=(!N.step||N.step===1)&&A.tickInterval===1;j=j.info;var F=T.label,G;if(Z=this.parameters.category||(Z?C(Z[H],D[H],H):H),W&&y(Z)&&(Z=u(W.lin2log(Z))),A.dateTime)if(j)var q=X.time.resolveDTLFormat(k.dateTimeLabelFormats[!k.grid&&j.higherRanks[H]||j.unitName]),ee=q.main;else y(Z)&&(ee=A.dateTime.getXDateFormat(Z,k.dateTimeLabelFormats||{}));T.isFirst=$,T.isLast=z;var re={axis:A,chart:X,dateTimeLabelFormat:ee,isFirst:$,isLast:z,pos:H,tick:T,tickPositionInfo:j,value:Z};x(this,"labelFormat",re);var ce=function(J){return N.formatter?N.formatter.call(J,J):N.format?(J.text=A.defaultLabelFormatter.call(J,J),i.format(N.format,J,X)):A.defaultLabelFormatter.call(J,J)};k=ce.call(re,re);var fe=q&&q.list;T.shortenLabel=fe?function(){for(G=0;G<fe.length;G++)if(v(re,{dateTimeLabelFormat:fe[G]}),F.attr({text:ce.call(re,re)}),F.getBBox().width<A.getSlotWidth(T)-2*N.padding)return;F.attr({text:""})}:void 0,O&&A._addedPlotLB&&T.moveLabel(k,N),p(F)||T.movedLabel?F&&F.textStr!==k&&!O&&(!F.textWidth||N.style.width||F.styles.width||F.css({width:null}),F.attr({text:k}),F.textPxLength=F.getBBox().width):(T.label=F=T.createLabel({x:0,y:0},k,N),T.rotation=0)},E.prototype.createLabel=function(T,A,k){var X=this.axis,Z=X.chart;return(T=p(A)&&k.enabled?Z.renderer.text(A,T.x,T.y,k.useHTML).add(X.labelGroup):null)&&(Z.styledMode||T.css(_(k.style)),T.textPxLength=T.getBBox().width),T},E.prototype.destroy=function(){m(this,this.axis)},E.prototype.getPosition=function(T,A,k,X){var Z=this.axis,W=Z.chart,D=X&&W.oldChartHeight||W.chartHeight;return T={x:T?u(Z.translate(A+k,void 0,void 0,X)+Z.transB):Z.left+Z.offset+(Z.opposite?(X&&W.oldChartWidth||W.chartWidth)-Z.right-Z.left:0),y:T?D-Z.bottom+Z.offset-(Z.opposite?Z.height:0):u(D-Z.translate(A+k,void 0,void 0,X)-Z.transB)},T.y=l(T.y,-1e5,1e5),x(this,"afterGetPosition",{pos:T}),T},E.prototype.getLabelPosition=function(T,A,k,X,Z,W,D,H){var N=this.axis,j=N.transA,$=N.isLinked&&N.linkedParent?N.linkedParent.reversed:N.reversed,z=N.staggerLines,O=N.tickRotCorr||{x:0,y:0},F=X||N.reserveSpaceDefault?0:-N.labelOffset*(N.labelAlign==="center"?.5:1),G={};return k=N.side===0?k.rotation?-8:-k.getBBox().height:N.side===2?O.y+8:Math.cos(k.rotation*s)*(O.y-k.getBBox(!1,0).height/2),p(Z.y)&&(k=N.side===0&&N.horiz?Z.y+k:Z.y),T=T+Z.x+F+O.x-(W&&X?W*j*($?-1:1):0),A=A+k-(W&&!X?W*j*($?1:-1):0),z&&(X=D/(H||1)%z,N.opposite&&(X=z-X-1),A+=N.labelOffset/z*X),G.x=T,G.y=Math.round(A),x(this,"afterGetLabelPosition",{pos:G,tickmarkOffset:W,index:D}),G},E.prototype.getLabelSize=function(){return this.label?this.label.getBBox()[this.axis.horiz?"height":"width"]:0},E.prototype.getMarkPath=function(T,A,k,X,Z,W){return W.crispLine([["M",T,A],["L",T+(Z?0:-k),A+(Z?k:0)]],X)},E.prototype.handleOverflow=function(T){var A=this.axis,k=A.options.labels,X=T.x,Z=A.chart.chartWidth,W=A.chart.spacing,D=C(A.labelLeft,Math.min(A.pos,W[3]));W=C(A.labelRight,Math.max(A.isRadial?0:A.pos+A.len,Z-W[1]));var H=this.label,N=this.rotation,j={left:0,center:.5,right:1}[A.labelAlign||H.attr("align")],$=H.getBBox().width,z=A.getSlotWidth(this),O={},F=z,G=1,q;N||k.overflow!=="justify"?0>N&&X-j*$<D?q=Math.round(X/Math.cos(N*s)-D):0<N&&X+j*$>W&&(q=Math.round((Z-X)/Math.cos(N*s))):(Z=X+(1-j)*$,X-j*$<D?F=T.x+F*(1-j)-D:Z>W&&(F=W-T.x+F*j,G=-1),F=Math.min(z,F),F<z&&A.labelAlign==="center"&&(T.x+=G*(z-F-j*(z-Math.min($,F)))),($>F||A.autoRotation&&(H.styles||{}).width)&&(q=F)),q&&(this.shortenLabel?this.shortenLabel():(O.width=Math.floor(q)+"px",(k.style||{}).textOverflow||(O.textOverflow="ellipsis"),H.css(O)))},E.prototype.moveLabel=function(T,A){var k=this,X=k.label,Z=k.axis,W=Z.reversed,D=!1;if(X&&X.textStr===T?(k.movedLabel=X,D=!0,delete k.label):w(Z.ticks,function(N){D||N.isNew||N===k||!N.label||N.label.textStr!==T||(k.movedLabel=N.label,D=!0,N.labelPos=k.movedLabel.xy,delete N.label)}),!D&&(k.labelPos||X)){var H=k.labelPos||X.xy;X=Z.horiz?W?0:Z.width+Z.left:H.x,Z=Z.horiz?H.y:W?Z.width+Z.left:0,k.movedLabel=k.createLabel({x:X,y:Z},T,A),k.movedLabel&&k.movedLabel.attr({opacity:0})}},E.prototype.render=function(T,A,k){var X=this.axis,Z=X.horiz,W=this.pos,D=C(this.tickmarkOffset,X.tickmarkOffset);W=this.getPosition(Z,W,D,A),D=W.x;var H=W.y;X=Z&&D===X.pos+X.len||!Z&&H===X.pos?-1:1,Z=C(k,this.label&&this.label.newOpacity,1),k=C(k,1),this.isActive=!0,this.renderGridLine(A,k,X),this.renderMark(W,k,X),this.renderLabel(W,A,Z,T),this.isNew=!1,x(this,"afterRender")},E.prototype.renderGridLine=function(T,A,k){var X=this.axis,Z=X.options,W={},D=this.pos,H=this.type,N=C(this.tickmarkOffset,X.tickmarkOffset),j=X.chart.renderer,$=this.gridLine,z=Z.gridLineWidth,O=Z.gridLineColor,F=Z.gridLineDashStyle;this.type==="minor"&&(z=Z.minorGridLineWidth,O=Z.minorGridLineColor,F=Z.minorGridLineDashStyle),$||(X.chart.styledMode||(W.stroke=O,W["stroke-width"]=z||0,W.dashstyle=F),H||(W.zIndex=1),T&&(A=0),this.gridLine=$=j.path().attr(W).addClass("highcharts-"+(H?H+"-":"")+"grid-line").add(X.gridGroup)),$&&(k=X.getPlotLinePath({value:D+N,lineWidth:$.strokeWidth()*k,force:"pass",old:T,acrossPanes:!1}))&&$[T||this.isNew?"attr":"animate"]({d:k,opacity:A})},E.prototype.renderMark=function(T,A,k){var X=this.axis,Z=X.options,W=X.chart.renderer,D=this.type,H=X.tickSize(D?D+"Tick":"tick"),N=T.x;T=T.y;var j=C(Z[D!=="minor"?"tickWidth":"minorTickWidth"],!D&&X.isXAxis?1:0);Z=Z[D!=="minor"?"tickColor":"minorTickColor"];var $=this.mark,z=!$;H&&(X.opposite&&(H[0]=-H[0]),$||(this.mark=$=W.path().addClass("highcharts-"+(D?D+"-":"")+"tick").add(X.axisGroup),X.chart.styledMode||$.attr({stroke:Z,"stroke-width":j})),$[z?"attr":"animate"]({d:this.getMarkPath(N,T,H[0],$.strokeWidth()*k,X.horiz,W),opacity:A}))},E.prototype.renderLabel=function(T,A,k,X){var Z=this.axis,W=Z.horiz,D=Z.options,H=this.label,N=D.labels,j=N.step;Z=C(this.tickmarkOffset,Z.tickmarkOffset);var $=T.x;T=T.y;var z=!0;H&&y($)&&(H.xy=T=this.getLabelPosition($,T,H,W,N,Z,X,j),this.isFirst&&!this.isLast&&!D.showFirstLabel||this.isLast&&!this.isFirst&&!D.showLastLabel?z=!1:!W||N.step||N.rotation||A||k===0||this.handleOverflow(T),j&&X%j&&(z=!1),z&&y(T.y)?(T.opacity=k,H[this.isNewLabel?"attr":"animate"](T).show(!0),this.isNewLabel=!1):(H.hide(),this.isNewLabel=!0))},E.prototype.replaceMovedLabel=function(){var T=this.label,A=this.axis,k=A.reversed;if(T&&!this.isNew){var X=A.horiz?k?A.left:A.width+A.left:T.xy.x;k=A.horiz?T.xy.y:k?A.width+A.top:A.top,T.animate({x:X,y:k,opacity:0},void 0,T.destroy),delete this.label}A.isDirty=!0,this.label=this.movedLabel,delete this.movedLabel},E}(),o}),r(n,"Core/Axis/Axis.js",[n["Core/Animation/AnimationUtilities.js"],n["Core/Axis/AxisDefaults.js"],n["Core/Color/Color.js"],n["Core/Defaults.js"],n["Core/Foundation.js"],n["Core/Globals.js"],n["Core/Axis/Tick.js"],n["Core/Utilities.js"]],function(i,o,a,s,l,u,p,m){var v=i.animObject,x=s.defaultOptions,y=l.registerEventOptions,_=u.deg2rad,w=m.arrayMax,C=m.arrayMin,E=m.clamp,T=m.correctFloat,A=m.defined,k=m.destroyObjectProperties,X=m.erase,Z=m.error,W=m.extend,D=m.fireEvent,H=m.isArray,N=m.isNumber,j=m.isString,$=m.merge,z=m.normalizeTickInterval,O=m.objectEach,F=m.pick,G=m.relativeLength,q=m.removeEvent,ee=m.splat,re=m.syncTimeout,ce=function(fe,J){return z(J,void 0,void 0,F(fe.options.allowDecimals,.5>J||fe.tickAmount!==void 0),!!fe.tickAmount)};return i=function(){function fe(J,oe){this.zoomEnabled=this.width=this.visible=this.userOptions=this.translationSlope=this.transB=this.transA=this.top=this.ticks=this.tickRotCorr=this.tickPositions=this.tickmarkOffset=this.tickInterval=this.tickAmount=this.side=this.series=this.right=this.positiveValuesOnly=this.pos=this.pointRangePadding=this.pointRange=this.plotLinesAndBandsGroups=this.plotLinesAndBands=this.paddedTicks=this.overlap=this.options=this.offset=this.names=this.minPixelPadding=this.minorTicks=this.minorTickInterval=this.min=this.maxLabelLength=this.max=this.len=this.left=this.labelFormatter=this.labelEdge=this.isLinked=this.height=this.hasVisibleSeries=this.hasNames=this.eventOptions=this.coll=this.closestPointRange=this.chart=this.bottom=this.alternateBands=void 0,this.init(J,oe)}return fe.prototype.init=function(J,oe){var ve=oe.isX;this.chart=J,this.horiz=J.inverted&&!this.isZAxis?!ve:ve,this.isXAxis=ve,this.coll=this.coll||(ve?"xAxis":"yAxis"),D(this,"init",{userOptions:oe}),this.opposite=F(oe.opposite,this.opposite),this.side=F(oe.side,this.side,this.horiz?this.opposite?0:2:this.opposite?1:3),this.setOptions(oe);var ye=this.options,xe=ye.labels,se=ye.type;this.userOptions=oe,this.minPixelPadding=0,this.reversed=F(ye.reversed,this.reversed),this.visible=ye.visible,this.zoomEnabled=ye.zoomEnabled,this.hasNames=se==="category"||ye.categories===!0,this.categories=ye.categories||(this.hasNames?[]:void 0),this.names||(this.names=[],this.names.keys={}),this.plotLinesAndBandsGroups={},this.positiveValuesOnly=!!this.logarithmic,this.isLinked=A(ye.linkedTo),this.ticks={},this.labelEdge=[],this.minorTicks={},this.plotLinesAndBands=[],this.alternateBands={},this.len=0,this.minRange=this.userMinRange=ye.minRange||ye.maxZoom,this.range=ye.range,this.offset=ye.offset||0,this.min=this.max=null,oe=F(ye.crosshair,ee(J.options.tooltip.crosshairs)[ve?0:1]),this.crosshair=oe===!0?{}:oe,J.axes.indexOf(this)===-1&&(ve?J.axes.splice(J.xAxis.length,0,this):J.axes.push(this),J[this.coll].push(this)),this.series=this.series||[],J.inverted&&!this.isZAxis&&ve&&typeof this.reversed=="undefined"&&(this.reversed=!0),this.labelRotation=N(xe.rotation)?xe.rotation:void 0,y(this,ye),D(this,"afterInit")},fe.prototype.setOptions=function(J){this.options=$(o.defaultXAxisOptions,this.coll==="yAxis"&&o.defaultYAxisOptions,[o.defaultTopAxisOptions,o.defaultRightAxisOptions,o.defaultBottomAxisOptions,o.defaultLeftAxisOptions][this.side],$(x[this.coll],J)),D(this,"afterSetOptions",{userOptions:J})},fe.prototype.defaultLabelFormatter=function(J){var oe=this.axis;J=this.chart.numberFormatter;var ve=N(this.value)?this.value:NaN,ye=oe.chart.time,xe=this.dateTimeLabelFormat,se=x.lang,me=se.numericSymbols;se=se.numericSymbolMagnitude||1e3;var pe=oe.logarithmic?Math.abs(ve):oe.tickInterval,Ce=me&&me.length;if(oe.categories)var Pe="".concat(this.value);else if(xe)Pe=ye.dateFormat(xe,ve);else if(Ce&&1e3<=pe)for(;Ce--&&typeof Pe=="undefined";)oe=Math.pow(se,Ce+1),pe>=oe&&10*ve%oe==0&&me[Ce]!==null&&ve!==0&&(Pe=J(ve/oe,-1)+me[Ce]);return typeof Pe=="undefined"&&(Pe=1e4<=Math.abs(ve)?J(ve,-1):J(ve,-1,void 0,"")),Pe},fe.prototype.getSeriesExtremes=function(){var J=this,oe=J.chart,ve;D(this,"getSeriesExtremes",null,function(){J.hasVisibleSeries=!1,J.dataMin=J.dataMax=J.threshold=null,J.softThreshold=!J.isXAxis,J.series.forEach(function(ye){if(ye.visible||!oe.options.chart.ignoreHiddenSeries){var xe=ye.options,se=xe.threshold;if(J.hasVisibleSeries=!0,J.positiveValuesOnly&&0>=se&&(se=null),J.isXAxis){if(xe=ye.xData,xe.length){xe=J.logarithmic?xe.filter(J.validatePositiveValue):xe,ve=ye.getXExtremes(xe);var me=ve.min,pe=ve.max;N(me)||me instanceof Date||(xe=xe.filter(N),ve=ye.getXExtremes(xe),me=ve.min,pe=ve.max),xe.length&&(J.dataMin=Math.min(F(J.dataMin,me),me),J.dataMax=Math.max(F(J.dataMax,pe),pe))}}else ye=ye.applyExtremes(),N(ye.dataMin)&&(me=ye.dataMin,J.dataMin=Math.min(F(J.dataMin,me),me)),N(ye.dataMax)&&(pe=ye.dataMax,J.dataMax=Math.max(F(J.dataMax,pe),pe)),A(se)&&(J.threshold=se),(!xe.softThreshold||J.positiveValuesOnly)&&(J.softThreshold=!1)}})}),D(this,"afterGetSeriesExtremes")},fe.prototype.translate=function(J,oe,ve,ye,xe,se){var me=this.linkedParent||this,pe=ye&&me.old?me.old.min:me.min;if(!N(pe))return NaN;var Ce=me.minPixelPadding;xe=(me.isOrdinal||me.brokenAxis&&me.brokenAxis.hasBreaks||me.logarithmic&&xe)&&me.lin2val;var Pe=1,Re=0;return ye=ye&&me.old?me.old.transA:me.transA,ye||(ye=me.transA),ve&&(Pe*=-1,Re=me.len),me.reversed&&(Pe*=-1,Re-=Pe*(me.sector||me.len)),oe?(se=(J*Pe+Re-Ce)/ye+pe,xe&&(se=me.lin2val(se))):(xe&&(J=me.val2lin(J)),J=Pe*(J-pe)*ye,se=(me.isRadial?J:T(J))+Re+Pe*Ce+(N(se)?ye*se:0)),se},fe.prototype.toPixels=function(J,oe){return this.translate(J,!1,!this.horiz,void 0,!0)+(oe?0:this.pos)},fe.prototype.toValue=function(J,oe){return this.translate(J-(oe?0:this.pos),!0,!this.horiz,void 0,!0)},fe.prototype.getPlotLinePath=function(J){function oe(Ie,de,Te){return Ge!=="pass"&&(Ie<de||Ie>Te)&&(Ge?Ie=E(Ie,de,Te):It=!0),Ie}var ve=this,ye=ve.chart,xe=ve.left,se=ve.top,me=J.old,pe=J.value,Ce=J.lineWidth,Pe=me&&ye.oldChartHeight||ye.chartHeight,Re=me&&ye.oldChartWidth||ye.chartWidth,ke=ve.transB,ze=J.translatedValue,Ge=J.force,ht,Tt,xt,pt,It;return J={value:pe,lineWidth:Ce,old:me,force:Ge,acrossPanes:J.acrossPanes,translatedValue:ze},D(this,"getPlotLinePath",J,function(Ie){ze=F(ze,ve.translate(pe,void 0,void 0,me)),ze=E(ze,-1e5,1e5),ht=xt=Math.round(ze+ke),Tt=pt=Math.round(Pe-ze-ke),N(ze)?ve.horiz?(Tt=se,pt=Pe-ve.bottom,ht=xt=oe(ht,xe,xe+ve.width)):(ht=xe,xt=Re-ve.right,Tt=pt=oe(Tt,se,se+ve.height)):(It=!0,Ge=!1),Ie.path=It&&!Ge?null:ye.renderer.crispLine([["M",ht,Tt],["L",xt,pt]],Ce||1)}),J.path},fe.prototype.getLinearTickPositions=function(J,oe,ve){var ye=T(Math.floor(oe/J)*J);ve=T(Math.ceil(ve/J)*J);var xe=[],se;if(T(ye+J)===ye&&(se=20),this.single)return[oe];for(oe=ye;oe<=ve&&(xe.push(oe),oe=T(oe+J,se),oe!==me);)var me=oe;return xe},fe.prototype.getMinorTickInterval=function(){var J=this.options;return J.minorTicks===!0?F(J.minorTickInterval,"auto"):J.minorTicks===!1?null:J.minorTickInterval},fe.prototype.getMinorTickPositions=function(){var J=this.options,oe=this.tickPositions,ve=this.minorTickInterval,ye=this.pointRangePadding||0,xe=this.min-ye;ye=this.max+ye;var se=ye-xe,me=[];if(se&&se/ve<this.len/3){var pe=this.logarithmic;if(pe)this.paddedTicks.forEach(function(Ce,Pe,Re){Pe&&me.push.apply(me,pe.getLogTickPositions(ve,Re[Pe-1],Re[Pe],!0))});else if(this.dateTime&&this.getMinorTickInterval()==="auto")me=me.concat(this.getTimeTicks(this.dateTime.normalizeTimeTickInterval(ve),xe,ye,J.startOfWeek));else for(J=xe+(oe[0]-xe)%ve;J<=ye&&J!==me[0];J+=ve)me.push(J)}return me.length!==0&&this.trimTicks(me),me},fe.prototype.adjustForMinRange=function(){var J=this.options,oe=this.logarithmic,ve=this.min,ye=this.max,xe=0,se,me,pe,Ce;if(this.isXAxis&&typeof this.minRange=="undefined"&&!oe&&(A(J.min)||A(J.max)||A(J.floor)||A(J.ceiling)?this.minRange=null:(this.series.forEach(function(ze){if(pe=ze.xData,Ce=ze.xIncrement?1:pe.length-1,1<pe.length)for(se=Ce;0<se;se--)me=pe[se]-pe[se-1],(!xe||me<xe)&&(xe=me)}),this.minRange=Math.min(5*xe,this.dataMax-this.dataMin))),ye-ve<this.minRange){var Pe=this.dataMax-this.dataMin>=this.minRange,Re=this.minRange,ke=(Re-ye+ve)/2;ke=[ve-ke,F(J.min,ve-ke)],Pe&&(ke[2]=this.logarithmic?this.logarithmic.log2lin(this.dataMin):this.dataMin),ve=w(ke),ye=[ve+Re,F(J.max,ve+Re)],Pe&&(ye[2]=oe?oe.log2lin(this.dataMax):this.dataMax),ye=C(ye),ye-ve<Re&&(ke[0]=ye-Re,ke[1]=F(J.min,ye-Re),ve=w(ke))}this.min=ve,this.max=ye},fe.prototype.getClosest=function(){var J;return this.categories?J=1:this.series.forEach(function(oe){var ve=oe.closestPointRange,ye=oe.visible||!oe.chart.options.chart.ignoreHiddenSeries;!oe.noSharedTooltip&&A(ve)&&ye&&(J=A(J)?Math.min(J,ve):ve)}),J},fe.prototype.nameToX=function(J){var oe=H(this.options.categories),ve=oe?this.categories:this.names,ye=J.options.x;if(J.series.requireSorting=!1,A(ye)||(ye=this.options.uniqueNames&&ve?oe?ve.indexOf(J.name):F(ve.keys[J.name],-1):J.series.autoIncrement()),ye===-1){if(!oe&&ve)var xe=ve.length}else xe=ye;return typeof xe!="undefined"?(this.names[xe]=J.name,this.names.keys[J.name]=xe):J.x&&(xe=J.x),xe},fe.prototype.updateNames=function(){var J=this,oe=this.names;0<oe.length&&(Object.keys(oe.keys).forEach(function(ve){delete oe.keys[ve]}),oe.length=0,this.minRange=this.userMinRange,(this.series||[]).forEach(function(ve){ve.xIncrement=null,(!ve.points||ve.isDirtyData)&&(J.max=Math.max(J.max,ve.xData.length-1),ve.processData(),ve.generatePoints()),ve.data.forEach(function(ye,xe){if(ye&&ye.options&&typeof ye.name!="undefined"){var se=J.nameToX(ye);typeof se!="undefined"&&se!==ye.x&&(ye.x=se,ve.xData[xe]=se)}})}))},fe.prototype.setAxisTranslation=function(){var J=this,oe=J.max-J.min,ve=J.linkedParent,ye=!!J.categories,xe=J.isXAxis,se=J.axisPointRange||0,me=0,pe=0,Ce=J.transA;if(xe||ye||se){var Pe=J.getClosest();ve?(me=ve.minPointOffset,pe=ve.pointRangePadding):J.series.forEach(function(Re){var ke=ye?1:xe?F(Re.options.pointRange,Pe,0):J.axisPointRange||0,ze=Re.options.pointPlacement;se=Math.max(se,ke),(!J.single||ye)&&(Re=Re.is("xrange")?!xe:xe,me=Math.max(me,Re&&j(ze)?0:ke/2),pe=Math.max(pe,Re&&ze==="on"?0:ke))}),ve=J.ordinal&&J.ordinal.slope&&Pe?J.ordinal.slope/Pe:1,J.minPointOffset=me*=ve,J.pointRangePadding=pe*=ve,J.pointRange=Math.min(se,J.single&&ye?1:oe),xe&&(J.closestPointRange=Pe)}J.translationSlope=J.transA=Ce=J.staticScale||J.len/(oe+pe||1),J.transB=J.horiz?J.left:J.bottom,J.minPixelPadding=Ce*me,D(this,"afterSetAxisTranslation")},fe.prototype.minFromRange=function(){return this.max-this.range},fe.prototype.setTickInterval=function(J){var oe=this.chart,ve=this.logarithmic,ye=this.options,xe=this.isXAxis,se=this.isLinked,me=ye.tickPixelInterval,pe=this.categories,Ce=this.softThreshold,Pe=ye.maxPadding,Re=ye.minPadding,ke=N(ye.tickInterval)&&0<=ye.tickInterval?ye.tickInterval:void 0,ze=N(this.threshold)?this.threshold:null;this.dateTime||pe||se||this.getTickAmount();var Ge=F(this.userMin,ye.min),ht=F(this.userMax,ye.max);if(se){this.linkedParent=oe[this.coll][ye.linkedTo];var Tt=this.linkedParent.getExtremes();this.min=F(Tt.min,Tt.dataMin),this.max=F(Tt.max,Tt.dataMax),ye.type!==this.linkedParent.options.type&&Z(11,1,oe)}else{if(Ce&&A(ze)){if(this.dataMin>=ze)Tt=ze,Re=0;else if(this.dataMax<=ze){var xt=ze;Pe=0}}this.min=F(Ge,Tt,this.dataMin),this.max=F(ht,xt,this.dataMax)}if(ve&&(this.positiveValuesOnly&&!J&&0>=Math.min(this.min,F(this.dataMin,this.min))&&Z(10,1,oe),this.min=T(ve.log2lin(this.min),16),this.max=T(ve.log2lin(this.max),16)),this.range&&A(this.max)&&(this.userMin=this.min=Ge=Math.max(this.dataMin,this.minFromRange()),this.userMax=ht=this.max,this.range=null),D(this,"foundExtremes"),this.beforePadding&&this.beforePadding(),this.adjustForMinRange(),!(pe||this.axisPointRange||this.stacking&&this.stacking.usePercentage||se)&&A(this.min)&&A(this.max)&&(oe=this.max-this.min)&&(!A(Ge)&&Re&&(this.min-=oe*Re),!A(ht)&&Pe&&(this.max+=oe*Pe)),N(this.userMin)||(N(ye.softMin)&&ye.softMin<this.min&&(this.min=Ge=ye.softMin),N(ye.floor)&&(this.min=Math.max(this.min,ye.floor))),N(this.userMax)||(N(ye.softMax)&&ye.softMax>this.max&&(this.max=ht=ye.softMax),N(ye.ceiling)&&(this.max=Math.min(this.max,ye.ceiling))),Ce&&A(this.dataMin)&&(ze=ze||0,!A(Ge)&&this.min<ze&&this.dataMin>=ze?this.min=this.options.minRange?Math.min(ze,this.max-this.minRange):ze:!A(ht)&&this.max>ze&&this.dataMax<=ze&&(this.max=this.options.minRange?Math.max(ze,this.min+this.minRange):ze)),N(this.min)&&N(this.max)&&!this.chart.polar&&this.min>this.max&&(A(this.options.min)?this.max=this.min:A(this.options.max)&&(this.min=this.max)),this.tickInterval=this.min===this.max||typeof this.min=="undefined"||typeof this.max=="undefined"?1:se&&this.linkedParent&&!ke&&me===this.linkedParent.options.tickPixelInterval?ke=this.linkedParent.tickInterval:F(ke,this.tickAmount?(this.max-this.min)/Math.max(this.tickAmount-1,1):void 0,pe?1:(this.max-this.min)*me/Math.max(this.len,me)),xe&&!J){var pt=this.min!==(this.old&&this.old.min)||this.max!==(this.old&&this.old.max);this.series.forEach(function(It){It.forceCrop=It.forceCropping&&It.forceCropping(),It.processData(pt)}),D(this,"postProcessData",{hasExtremesChanged:pt})}this.setAxisTranslation(),D(this,"initialAxisTranslation"),this.pointRange&&!ke&&(this.tickInterval=Math.max(this.pointRange,this.tickInterval)),J=F(ye.minTickInterval,this.dateTime&&!this.series.some(function(It){return It.noSharedTooltip})?this.closestPointRange:0),!ke&&this.tickInterval<J&&(this.tickInterval=J),this.dateTime||this.logarithmic||ke||(this.tickInterval=ce(this,this.tickInterval)),this.tickAmount||(this.tickInterval=this.unsquish()),this.setTickPositions()},fe.prototype.setTickPositions=function(){var J=this.options,oe=J.tickPositions,ve=J.tickPositioner,ye=this.getMinorTickInterval(),xe=this.hasVerticalPanning(),se=this.coll==="colorAxis",me=(se||!xe)&&J.startOnTick;xe=(se||!xe)&&J.endOnTick,se=[];var pe;if(this.tickmarkOffset=this.categories&&J.tickmarkPlacement==="between"&&this.tickInterval===1?.5:0,this.minorTickInterval=ye==="auto"&&this.tickInterval?this.tickInterval/5:ye,this.single=this.min===this.max&&A(this.min)&&!this.tickAmount&&(parseInt(this.min,10)===this.min||J.allowDecimals!==!1),oe)se=oe.slice();else if(N(this.min)&&N(this.max)){if(this.ordinal&&this.ordinal.positions||!((this.max-this.min)/this.tickInterval>Math.max(2*this.len,200)))if(this.dateTime)se=this.getTimeTicks(this.dateTime.normalizeTimeTickInterval(this.tickInterval,J.units),this.min,this.max,J.startOfWeek,this.ordinal&&this.ordinal.positions,this.closestPointRange,!0);else if(this.logarithmic)se=this.logarithmic.getLogTickPositions(this.tickInterval,this.min,this.max);else for(ye=J=this.tickInterval;ye<=2*J&&(se=this.getLinearTickPositions(this.tickInterval,this.min,this.max),this.tickAmount&&se.length>this.tickAmount);)this.tickInterval=ce(this,ye*=1.1);else se=[this.min,this.max],Z(19,!1,this.chart);se.length>this.len&&(se=[se[0],se[se.length-1]],se[0]===se[1]&&(se.length=1)),ve&&(this.tickPositions=se,(pe=ve.apply(this,[this.min,this.max]))&&(se=pe))}this.tickPositions=se,this.paddedTicks=se.slice(0),this.trimTicks(se,me,xe),!this.isLinked&&N(this.min)&&N(this.max)&&(this.single&&2>se.length&&!this.categories&&!this.series.some(function(Ce){return Ce.is("heatmap")&&Ce.options.pointPlacement==="between"})&&(this.min-=.5,this.max+=.5),oe||pe||this.adjustTickAmount()),D(this,"afterSetTickPositions")},fe.prototype.trimTicks=function(J,oe,ve){var ye=J[0],xe=J[J.length-1],se=!this.isOrdinal&&this.minPointOffset||0;if(D(this,"trimTicks"),!this.isLinked){if(oe&&ye!==-1/0)this.min=ye;else for(;this.min-se>J[0];)J.shift();if(ve)this.max=xe;else for(;this.max+se<J[J.length-1];)J.pop();J.length===0&&A(ye)&&!this.options.tickPositions&&J.push((xe+ye)/2)}},fe.prototype.alignToOthers=function(){var J=this,oe=[this],ve=J.options,ye=this.coll==="yAxis"&&this.chart.options.chart.alignThresholds,xe=[],se;if(J.thresholdAlignment=void 0,(this.chart.options.chart.alignTicks!==!1&&ve.alignTicks||ye)&&ve.startOnTick!==!1&&ve.endOnTick!==!1&&!J.logarithmic){var me=function(Pe){var Re=Pe.options;return[Pe.horiz?Re.left:Re.top,Re.width,Re.height,Re.pane].join()},pe=me(this);this.chart[this.coll].forEach(function(Pe){var Re=Pe.series;Re.length&&Re.some(function(ke){return ke.visible})&&Pe!==J&&me(Pe)===pe&&(se=!0,oe.push(Pe))})}if(se&&ye){oe.forEach(function(Pe){Pe=Pe.getThresholdAlignment(J),N(Pe)&&xe.push(Pe)});var Ce=1<xe.length?xe.reduce(function(Pe,Re){return Pe+Re},0)/xe.length:void 0;oe.forEach(function(Pe){Pe.thresholdAlignment=Ce})}return se},fe.prototype.getThresholdAlignment=function(J){if((!N(this.dataMin)||this!==J&&this.series.some(function(oe){return oe.isDirty||oe.isDirtyData}))&&this.getSeriesExtremes(),N(this.threshold))return J=E((this.threshold-(this.dataMin||0))/((this.dataMax||0)-(this.dataMin||0)),0,1),this.options.reversed&&(J=1-J),J},fe.prototype.getTickAmount=function(){var J=this.options,oe=J.tickPixelInterval,ve=J.tickAmount;!A(J.tickInterval)&&!ve&&this.len<oe&&!this.isRadial&&!this.logarithmic&&J.startOnTick&&J.endOnTick&&(ve=2),!ve&&this.alignToOthers()&&(ve=Math.ceil(this.len/oe)+1),4>ve&&(this.finalTickAmt=ve,ve=5),this.tickAmount=ve},fe.prototype.adjustTickAmount=function(){var J=this,oe=J.finalTickAmt,ve=J.max,ye=J.min,xe=J.options,se=J.tickPositions,me=J.tickAmount,pe=J.thresholdAlignment,Ce=se&&se.length,Pe=F(J.threshold,J.softThreshold?0:null),Re=J.tickInterval;if(N(pe)){var ke=.5>pe?Math.ceil(pe*(me-1)):Math.floor(pe*(me-1));xe.reversed&&(ke=me-1-ke)}if(J.hasData()&&N(ye)&&N(ve)){if(pe=function(){J.transA*=(Ce-1)/(me-1),J.min=xe.startOnTick?se[0]:Math.min(ye,se[0]),J.max=xe.endOnTick?se[se.length-1]:Math.max(ve,se[se.length-1])},N(ke)&&N(J.threshold)){for(;se[ke]!==Pe||se.length!==me||se[0]>ye||se[se.length-1]<ve;){for(se.length=0,se.push(J.threshold);se.length<me;)se[ke]===void 0||se[ke]>J.threshold?se.unshift(T(se[0]-Re)):se.push(T(se[se.length-1]+Re));if(Re>8*J.tickInterval)break;Re*=2}pe()}else if(Ce<me){for(;se.length<me;)se.length%2||ye===Pe?se.push(T(se[se.length-1]+Re)):se.unshift(T(se[0]-Re));pe()}if(A(oe)){for(Re=Pe=se.length;Re--;)(oe===3&&Re%2==1||2>=oe&&0<Re&&Re<Pe-1)&&se.splice(Re,1);J.finalTickAmt=void 0}}},fe.prototype.setScale=function(){var J=!1,oe=!1;this.series.forEach(function(ye){J=J||ye.isDirtyData||ye.isDirty,oe=oe||ye.xAxis&&ye.xAxis.isDirty||!1}),this.setAxisSize();var ve=this.len!==(this.old&&this.old.len);ve||J||oe||this.isLinked||this.forceRedraw||this.userMin!==(this.old&&this.old.userMin)||this.userMax!==(this.old&&this.old.userMax)||this.alignToOthers()?(this.stacking&&(this.stacking.resetStacks(),this.stacking.buildStacks()),this.forceRedraw=!1,this.getSeriesExtremes(),this.setTickInterval(),this.isDirty||(this.isDirty=ve||this.min!==(this.old&&this.old.min)||this.max!==(this.old&&this.old.max))):this.stacking&&this.stacking.cleanStacks(),J&&this.panningState&&(this.panningState.isDirty=!0),D(this,"afterSetScale")},fe.prototype.setExtremes=function(J,oe,ve,ye,xe){var se=this,me=se.chart;ve=F(ve,!0),se.series.forEach(function(pe){delete pe.kdTree}),xe=W(xe,{min:J,max:oe}),D(se,"setExtremes",xe,function(){se.userMin=J,se.userMax=oe,se.eventArgs=xe,ve&&me.redraw(ye)})},fe.prototype.zoom=function(J,oe){var ve=this,ye=this.dataMin,xe=this.dataMax,se=this.options,me=Math.min(ye,F(se.min,ye)),pe=Math.max(xe,F(se.max,xe));return J={newMin:J,newMax:oe},D(this,"zoom",J,function(Ce){var Pe=Ce.newMin,Re=Ce.newMax;(Pe!==ve.min||Re!==ve.max)&&(ve.allowZoomOutside||(A(ye)&&(Pe<me&&(Pe=me),Pe>pe&&(Pe=pe)),A(xe)&&(Re<me&&(Re=me),Re>pe&&(Re=pe))),ve.displayBtn=typeof Pe!="undefined"||typeof Re!="undefined",ve.setExtremes(Pe,Re,!1,void 0,{trigger:"zoom"})),Ce.zoomed=!0}),J.zoomed},fe.prototype.setAxisSize=function(){var J=this.chart,oe=this.options,ve=oe.offsets||[0,0,0,0],ye=this.horiz,xe=this.width=Math.round(G(F(oe.width,J.plotWidth-ve[3]+ve[1]),J.plotWidth)),se=this.height=Math.round(G(F(oe.height,J.plotHeight-ve[0]+ve[2]),J.plotHeight)),me=this.top=Math.round(G(F(oe.top,J.plotTop+ve[0]),J.plotHeight,J.plotTop));oe=this.left=Math.round(G(F(oe.left,J.plotLeft+ve[3]),J.plotWidth,J.plotLeft)),this.bottom=J.chartHeight-se-me,this.right=J.chartWidth-xe-oe,this.len=Math.max(ye?xe:se,0),this.pos=ye?oe:me},fe.prototype.getExtremes=function(){var J=this.logarithmic;return{min:J?T(J.lin2log(this.min)):this.min,max:J?T(J.lin2log(this.max)):this.max,dataMin:this.dataMin,dataMax:this.dataMax,userMin:this.userMin,userMax:this.userMax}},fe.prototype.getThreshold=function(J){var oe=this.logarithmic,ve=oe?oe.lin2log(this.min):this.min;return oe=oe?oe.lin2log(this.max):this.max,J===null||J===-1/0?J=ve:J===1/0?J=oe:ve>J?J=ve:oe<J&&(J=oe),this.translate(J,0,1,0,1)},fe.prototype.autoLabelAlign=function(J){var oe=(F(J,0)-90*this.side+720)%360;return J={align:"center"},D(this,"autoLabelAlign",J,function(ve){15<oe&&165>oe?ve.align="right":195<oe&&345>oe&&(ve.align="left")}),J.align},fe.prototype.tickSize=function(J){var oe=this.options,ve=F(oe[J==="tick"?"tickWidth":"minorTickWidth"],J==="tick"&&this.isXAxis&&!this.categories?1:0),ye=oe[J==="tick"?"tickLength":"minorTickLength"];if(ve&&ye){oe[J+"Position"]==="inside"&&(ye=-ye);var xe=[ye,ve]}return J={tickSize:xe},D(this,"afterTickSize",J),J.tickSize},fe.prototype.labelMetrics=function(){var J=this.tickPositions&&this.tickPositions[0]||0;return this.chart.renderer.fontMetrics(this.options.labels.style.fontSize,this.ticks[J]&&this.ticks[J].label)},fe.prototype.unsquish=function(){var J=this.options.labels,oe=this.horiz,ve=this.tickInterval,ye=this.len/(((this.categories?1:0)+this.max-this.min)/ve),xe=J.rotation,se=this.labelMetrics(),me=Math.max(this.max-this.min,0),pe=function(xt){var pt=xt/(ye||1);return pt=1<pt?Math.ceil(pt):1,pt*ve>me&&xt!==1/0&&ye!==1/0&&me&&(pt=Math.ceil(me/ve)),T(pt*ve)},Ce=ve,Pe=Number.MAX_VALUE;if(oe){if(!J.staggerLines)if(N(xe))var Re=[xe];else ye<J.autoRotationLimit&&(Re=J.autoRotation);if(Re)for(var ke=oe=void 0,ze=0,Ge=Re;ze<Ge.length;ze++){var ht=Ge[ze];if((ht===xe||ht&&-90<=ht&&90>=ht)&&(oe=pe(Math.abs(se.h/Math.sin(_*ht))),ke=oe+Math.abs(ht/360),ke<Pe)){Pe=ke;var Tt=ht;Ce=oe}}}else Ce=pe(se.h);return this.autoRotation=Re,this.labelRotation=F(Tt,N(xe)?xe:0),J.step?ve:Ce},fe.prototype.getSlotWidth=function(J){var oe=this.chart,ve=this.horiz,ye=this.options.labels,xe=Math.max(this.tickPositions.length-(this.categories?0:1),1),se=oe.margin[3];if(J&&N(J.slotWidth))return J.slotWidth;if(ve&&2>ye.step)return ye.rotation?0:(this.staggerLines||1)*this.len/xe;if(!ve){if(J=ye.style.width,J!==void 0)return parseInt(String(J),10);if(se)return se-oe.spacing[3]}return .33*oe.chartWidth},fe.prototype.renderUnsquish=function(){var J=this.chart,oe=J.renderer,ve=this.tickPositions,ye=this.ticks,xe=this.options.labels,se=xe.style,me=this.horiz,pe=this.getSlotWidth(),Ce=Math.max(1,Math.round(pe-2*xe.padding)),Pe={},Re=this.labelMetrics(),ke=se.textOverflow,ze=0;if(j(xe.rotation)||(Pe.rotation=xe.rotation||0),ve.forEach(function(xt){xt=ye[xt],xt.movedLabel&&xt.replaceMovedLabel(),xt&&xt.label&&xt.label.textPxLength>ze&&(ze=xt.label.textPxLength)}),this.maxLabelLength=ze,this.autoRotation)ze>Ce&&ze>Re.h?Pe.rotation=this.labelRotation:this.labelRotation=0;else if(pe){var Ge=Ce;if(!ke){var ht="clip";for(Ce=ve.length;!me&&Ce--;){var Tt=ve[Ce];(Tt=ye[Tt].label)&&(Tt.styles&&Tt.styles.textOverflow==="ellipsis"?Tt.css({textOverflow:"clip"}):Tt.textPxLength>pe&&Tt.css({width:pe+"px"}),Tt.getBBox().height>this.len/ve.length-(Re.h-Re.f)&&(Tt.specificTextOverflow="ellipsis"))}}}Pe.rotation&&(Ge=ze>.5*J.chartHeight?.33*J.chartHeight:ze,ke||(ht="ellipsis")),(this.labelAlign=xe.align||this.autoLabelAlign(this.labelRotation))&&(Pe.align=this.labelAlign),ve.forEach(function(xt){var pt=(xt=ye[xt])&&xt.label,It=se.width,Ie={};pt&&(pt.attr(Pe),xt.shortenLabel?xt.shortenLabel():Ge&&!It&&se.whiteSpace!=="nowrap"&&(Ge<pt.textPxLength||pt.element.tagName==="SPAN")?(Ie.width=Ge+"px",ke||(Ie.textOverflow=pt.specificTextOverflow||ht),pt.css(Ie)):pt.styles&&pt.styles.width&&!Ie.width&&!It&&pt.css({width:null}),delete pt.specificTextOverflow,xt.rotation=Pe.rotation)},this),this.tickRotCorr=oe.rotCorr(Re.b,this.labelRotation||0,this.side!==0)},fe.prototype.hasData=function(){return this.series.some(function(J){return J.hasData()})||this.options.showEmpty&&A(this.min)&&A(this.max)},fe.prototype.addTitle=function(J){var oe=this.chart.renderer,ve=this.horiz,ye=this.opposite,xe=this.options.title,se=this.chart.styledMode,me;this.axisTitle||((me=xe.textAlign)||(me=(ve?{low:"left",middle:"center",high:"right"}:{low:ye?"right":"left",middle:"center",high:ye?"left":"right"})[xe.align]),this.axisTitle=oe.text(xe.text||"",0,0,xe.useHTML).attr({zIndex:7,rotation:xe.rotation,align:me}).addClass("highcharts-axis-title"),se||this.axisTitle.css($(xe.style)),this.axisTitle.add(this.axisGroup),this.axisTitle.isNew=!0),se||xe.style.width||this.isRadial||this.axisTitle.css({width:this.len+"px"}),this.axisTitle[J?"show":"hide"](J)},fe.prototype.generateTick=function(J){var oe=this.ticks;oe[J]?oe[J].addLabel():oe[J]=new p(this,J)},fe.prototype.getOffset=function(){var J=this,oe=this,ve=oe.chart,ye=oe.horiz,xe=oe.options,se=oe.side,me=oe.ticks,pe=oe.tickPositions,Ce=oe.coll,Pe=oe.axisParent,Re=ve.renderer,ke=ve.inverted&&!oe.isZAxis?[1,0,3,2][se]:se,ze=oe.hasData(),Ge=xe.title,ht=xe.labels,Tt=ve.axisOffset;ve=ve.clipOffset;var xt=[-1,1,1,-1][se],pt=xe.className,It,Ie=0,de=0,Te=0;if(oe.showAxis=It=ze||xe.showEmpty,oe.staggerLines=oe.horiz&&ht.staggerLines||void 0,!oe.axisGroup){var Be=function(ot,Ze,Je){return Re.g(ot).attr({zIndex:Je}).addClass("highcharts-".concat(Ce.toLowerCase()).concat(Ze," ")+(J.isRadial?"highcharts-radial-axis".concat(Ze," "):"")+(pt||"")).add(Pe)};oe.gridGroup=Be("grid","-grid",xe.gridZIndex),oe.axisGroup=Be("axis","",xe.zIndex),oe.labelGroup=Be("axis-labels","-labels",ht.zIndex)}if(ze||oe.isLinked?(pe.forEach(function(ot){oe.generateTick(ot)}),oe.renderUnsquish(),oe.reserveSpaceDefault=se===0||se===2||{1:"left",3:"right"}[se]===oe.labelAlign,F(ht.reserveSpace,oe.labelAlign==="center"?!0:null,oe.reserveSpaceDefault)&&pe.forEach(function(ot){Te=Math.max(me[ot].getLabelSize(),Te)}),oe.staggerLines&&(Te*=oe.staggerLines),oe.labelOffset=Te*(oe.opposite?-1:1)):O(me,function(ot,Ze){ot.destroy(),delete me[Ze]}),Ge&&Ge.text&&Ge.enabled!==!1&&(oe.addTitle(It),It&&Ge.reserveSpace!==!1)){oe.titleOffset=Ie=oe.axisTitle.getBBox()[ye?"height":"width"];var Ke=Ge.offset;de=A(Ke)?0:F(Ge.margin,ye?5:10)}oe.renderLine(),oe.offset=xt*F(xe.offset,Tt[se]?Tt[se]+(xe.margin||0):0),oe.tickRotCorr=oe.tickRotCorr||{x:0,y:0},Ge=se===0?-oe.labelMetrics().h:se===2?oe.tickRotCorr.y:0,ze=Math.abs(Te)+de,Te&&(ze=ze-Ge+xt*(ye?F(ht.y,oe.tickRotCorr.y+8*xt):ht.x)),oe.axisTitleMargin=F(Ke,ze),oe.getMaxLabelDimensions&&(oe.maxLabelDimensions=oe.getMaxLabelDimensions(me,pe)),Ce!=="colorAxis"&&(ye=this.tickSize("tick"),Tt[se]=Math.max(Tt[se],(oe.axisTitleMargin||0)+Ie+xt*oe.offset,ze,pe&&pe.length&&ye?ye[0]+xt*oe.offset:0),xe=!oe.axisLine||xe.offset?0:2*Math.floor(oe.axisLine.strokeWidth()/2),ve[ke]=Math.max(ve[ke],xe)),D(this,"afterGetOffset")},fe.prototype.getLinePath=function(J){var oe=this.chart,ve=this.opposite,ye=this.offset,xe=this.horiz,se=this.left+(ve?this.width:0)+ye;return ye=oe.chartHeight-this.bottom-(ve?this.height:0)+ye,ve&&(J*=-1),oe.renderer.crispLine([["M",xe?this.left:se,xe?ye:this.top],["L",xe?oe.chartWidth-this.right:se,xe?ye:oe.chartHeight-this.bottom]],J)},fe.prototype.renderLine=function(){this.axisLine||(this.axisLine=this.chart.renderer.path().addClass("highcharts-axis-line").add(this.axisGroup),this.chart.styledMode||this.axisLine.attr({stroke:this.options.lineColor,"stroke-width":this.options.lineWidth,zIndex:7}))},fe.prototype.getTitlePosition=function(){var J=this.horiz,oe=this.left,ve=this.top,ye=this.len,xe=this.options.title,se=J?oe:ve,me=this.opposite,pe=this.offset,Ce=xe.x,Pe=xe.y,Re=this.axisTitle,ke=this.chart.renderer.fontMetrics(xe.style.fontSize,Re);return Re=Re?Math.max(Re.getBBox(!1,0).height-ke.h-1,0):0,ye={low:se+(J?0:ye),middle:se+ye/2,high:se+(J?ye:0)}[xe.align],oe=(J?ve+this.height:oe)+(J?1:-1)*(me?-1:1)*(this.axisTitleMargin||0)+[-Re,Re,ke.f,-Re][this.side],J={x:J?ye+Ce:oe+(me?this.width:0)+pe+Ce,y:J?oe+Pe-(me?this.height:0)+pe:ye+Pe},D(this,"afterGetTitlePosition",{titlePosition:J}),J},fe.prototype.renderMinorTick=function(J,oe){var ve=this.minorTicks;ve[J]||(ve[J]=new p(this,J,"minor")),oe&&ve[J].isNew&&ve[J].render(null,!0),ve[J].render(null,!1,1)},fe.prototype.renderTick=function(J,oe,ve){var ye=this.ticks;(!this.isLinked||J>=this.min&&J<=this.max||this.grid&&this.grid.isColumn)&&(ye[J]||(ye[J]=new p(this,J)),ve&&ye[J].isNew&&ye[J].render(oe,!0,-1),ye[J].render(oe))},fe.prototype.render=function(){var J=this,oe=J.chart,ve=J.logarithmic,ye=J.options,xe=J.isLinked,se=J.tickPositions,me=J.axisTitle,pe=J.ticks,Ce=J.minorTicks,Pe=J.alternateBands,Re=ye.stackLabels,ke=ye.alternateGridColor,ze=J.tickmarkOffset,Ge=J.axisLine,ht=J.showAxis,Tt=v(oe.renderer.globalAnimation),xt,pt;if(J.labelEdge.length=0,J.overlap=!1,[pe,Ce,Pe].forEach(function(Ie){O(Ie,function(de){de.isActive=!1})}),J.hasData()||xe){var It=J.chart.hasRendered&&J.old&&N(J.old.min);J.minorTickInterval&&!J.categories&&J.getMinorTickPositions().forEach(function(Ie){J.renderMinorTick(Ie,It)}),se.length&&(se.forEach(function(Ie,de){J.renderTick(Ie,de,It)}),ze&&(J.min===0||J.single)&&(pe[-1]||(pe[-1]=new p(J,-1,null,!0)),pe[-1].render(-1))),ke&&se.forEach(function(Ie,de){pt=typeof se[de+1]!="undefined"?se[de+1]+ze:J.max-ze,de%2==0&&Ie<J.max&&pt<=J.max+(oe.polar?-ze:ze)&&(Pe[Ie]||(Pe[Ie]=new u.PlotLineOrBand(J)),xt=Ie+ze,Pe[Ie].options={from:ve?ve.lin2log(xt):xt,to:ve?ve.lin2log(pt):pt,color:ke,className:"highcharts-alternate-grid"},Pe[Ie].render(),Pe[Ie].isActive=!0)}),J._addedPlotLB||(J._addedPlotLB=!0,(ye.plotLines||[]).concat(ye.plotBands||[]).forEach(function(Ie){J.addPlotBandOrLine(Ie)}))}[pe,Ce,Pe].forEach(function(Ie){var de=[],Te=Tt.duration;O(Ie,function(Be,Ke){Be.isActive||(Be.render(Ke,!1,0),Be.isActive=!1,de.push(Ke))}),re(function(){for(var Be=de.length;Be--;)Ie[de[Be]]&&!Ie[de[Be]].isActive&&(Ie[de[Be]].destroy(),delete Ie[de[Be]])},Ie!==Pe&&oe.hasRendered&&Te?Te:0)}),Ge&&(Ge[Ge.isPlaced?"animate":"attr"]({d:this.getLinePath(Ge.strokeWidth())}),Ge.isPlaced=!0,Ge[ht?"show":"hide"](ht)),me&&ht&&(ye=J.getTitlePosition(),me[me.isNew?"attr":"animate"](ye),me.isNew=!1),Re&&Re.enabled&&J.stacking&&J.stacking.renderStackTotals(),J.old={len:J.len,max:J.max,min:J.min,transA:J.transA,userMax:J.userMax,userMin:J.userMin},J.isDirty=!1,D(this,"afterRender")},fe.prototype.redraw=function(){this.visible&&(this.render(),this.plotLinesAndBands.forEach(function(J){J.render()})),this.series.forEach(function(J){J.isDirty=!0})},fe.prototype.getKeepProps=function(){return this.keepProps||fe.keepProps},fe.prototype.destroy=function(J){var oe=this,ve=oe.plotLinesAndBands,ye=this.eventOptions;if(D(this,"destroy",{keepEvents:J}),J||q(oe),[oe.ticks,oe.minorTicks,oe.alternateBands].forEach(function(se){k(se)}),ve)for(J=ve.length;J--;)ve[J].destroy();"axisLine axisTitle axisGroup gridGroup labelGroup cross scrollbar".split(" ").forEach(function(se){oe[se]&&(oe[se]=oe[se].destroy())});for(var xe in oe.plotLinesAndBandsGroups)oe.plotLinesAndBandsGroups[xe]=oe.plotLinesAndBandsGroups[xe].destroy();O(oe,function(se,me){oe.getKeepProps().indexOf(me)===-1&&delete oe[me]}),this.eventOptions=ye},fe.prototype.drawCrosshair=function(J,oe){var ve=this.crosshair,ye=F(ve&&ve.snap,!0),xe=this.chart,se,me=this.cross;if(D(this,"drawCrosshair",{e:J,point:oe}),J||(J=this.cross&&this.cross.e),ve&&(A(oe)||!ye)!==!1){if(ye?A(oe)&&(se=F(this.coll!=="colorAxis"?oe.crosshairPos:null,this.isXAxis?oe.plotX:this.len-oe.plotY)):se=J&&(this.horiz?J.chartX-this.pos:this.len-J.chartY+this.pos),A(se)){var pe={value:oe&&(this.isXAxis?oe.x:F(oe.stackY,oe.y)),translatedValue:se};xe.polar&&W(pe,{isCrosshair:!0,chartX:J&&J.chartX,chartY:J&&J.chartY,point:oe}),pe=this.getPlotLinePath(pe)||null}if(!A(pe)){this.hideCrosshair();return}ye=this.categories&&!this.isRadial,me||(this.cross=me=xe.renderer.path().addClass("highcharts-crosshair highcharts-crosshair-"+(ye?"category ":"thin ")+(ve.className||"")).attr({zIndex:F(ve.zIndex,2)}).add(),xe.styledMode||(me.attr({stroke:ve.color||(ye?a.parse("#ccd6eb").setOpacity(.25).get():"#cccccc"),"stroke-width":F(ve.width,1)}).css({"pointer-events":"none"}),ve.dashStyle&&me.attr({dashstyle:ve.dashStyle}))),me.show().attr({d:pe}),ye&&!ve.width&&me.attr({"stroke-width":this.transA}),this.cross.e=J}else this.hideCrosshair();D(this,"afterDrawCrosshair",{e:J,point:oe})},fe.prototype.hideCrosshair=function(){this.cross&&this.cross.hide(),D(this,"afterHideCrosshair")},fe.prototype.hasVerticalPanning=function(){var J=this.chart.options.chart.panning;return!!(J&&J.enabled&&/y/.test(J.type))},fe.prototype.validatePositiveValue=function(J){return N(J)&&0<J},fe.prototype.update=function(J,oe){var ve=this.chart;J=$(this.userOptions,J),this.destroy(!0),this.init(ve,J),ve.isDirtyBox=!0,F(oe,!0)&&ve.redraw()},fe.prototype.remove=function(J){for(var oe=this.chart,ve=this.coll,ye=this.series,xe=ye.length;xe--;)ye[xe]&&ye[xe].remove(!1);X(oe.axes,this),X(oe[ve],this),oe[ve].forEach(function(se,me){se.options.index=se.userOptions.index=me}),this.destroy(),oe.isDirtyBox=!0,F(J,!0)&&oe.redraw()},fe.prototype.setTitle=function(J,oe){this.update({title:J},oe)},fe.prototype.setCategories=function(J,oe){this.update({categories:J},oe)},fe.defaultOptions=o.defaultXAxisOptions,fe.keepProps="extKey hcEvents names series userMax userMin".split(" "),fe}(),i}),r(n,"Core/Axis/DateTimeAxis.js",[n["Core/Utilities.js"]],function(i){var o=i.addEvent,a=i.getMagnitude,s=i.normalizeTickInterval,l=i.timeUnits,u;return function(p){function m(){return this.chart.time.getTimeTicks.apply(this.chart.time,arguments)}function v(_){_.userOptions.type!=="datetime"?this.dateTime=void 0:this.dateTime||(this.dateTime=new y(this))}var x=[];p.compose=function(_){return x.indexOf(_)===-1&&(x.push(_),_.keepProps.push("dateTime"),_.prototype.getTimeTicks=m,o(_,"init",v)),_};var y=function(){function _(w){this.axis=w}return _.prototype.normalizeTimeTickInterval=function(w,C){var E=C||[["millisecond",[1,2,5,10,20,25,50,100,200,500]],["second",[1,2,5,10,15,30]],["minute",[1,2,5,10,15,30]],["hour",[1,2,3,4,6,8,12]],["day",[1,2]],["week",[1,2]],["month",[1,2,3,4,6]],["year",null]];C=E[E.length-1];var T=l[C[0]],A=C[1],k;for(k=0;k<E.length&&(C=E[k],T=l[C[0]],A=C[1],!(E[k+1]&&w<=(T*A[A.length-1]+l[E[k+1][0]])/2));k++);return T===l.year&&w<5*T&&(A=[1,2,5]),w=s(w/T,A,C[0]==="year"?Math.max(a(w/T),1):1),{unitRange:T,count:w,unitName:C[0]}},_.prototype.getXDateFormat=function(w,C){var E=this.axis,T=E.chart.time;return E.closestPointRange?T.getDateFormat(E.closestPointRange,w,E.options.startOfWeek,C)||T.resolveDTLFormat(C.year).main:T.resolveDTLFormat(C.day).main},_}();p.Additions=y}(u||(u={})),u}),r(n,"Core/Axis/LogarithmicAxis.js",[n["Core/Utilities.js"]],function(i){var o=i.addEvent,a=i.normalizeTickInterval,s=i.pick,l;return function(u){function p(y){var _=this.logarithmic;y.userOptions.type!=="logarithmic"?this.logarithmic=void 0:_||(this.logarithmic=new x(this))}function m(){var y=this.logarithmic;y&&(this.lin2val=function(_){return y.lin2log(_)},this.val2lin=function(_){return y.log2lin(_)})}var v=[];u.compose=function(y){return v.indexOf(y)===-1&&(v.push(y),y.keepProps.push("logarithmic"),o(y,"init",p),o(y,"afterInit",m)),y};var x=function(){function y(_){this.axis=_}return y.prototype.getLogTickPositions=function(_,w,C,E){var T=this.axis,A=T.len,k=T.options,X=[];if(E||(this.minorAutoInterval=void 0),.5<=_)_=Math.round(_),X=T.getLinearTickPositions(_,w,C);else if(.08<=_){var Z=Math.floor(w),W,D=k=void 0;for(A=.3<_?[1,2,4]:.15<_?[1,2,4,6,8]:[1,2,3,4,5,6,7,8,9];Z<C+1&&!D;Z++){var H=A.length;for(W=0;W<H&&!D;W++){var N=this.log2lin(this.lin2log(Z)*A[W]);N>w&&(!E||k<=C)&&typeof k!="undefined"&&X.push(k),k>C&&(D=!0),k=N}}}else w=this.lin2log(w),C=this.lin2log(C),_=E?T.getMinorTickInterval():k.tickInterval,_=s(_==="auto"?null:_,this.minorAutoInterval,k.tickPixelInterval/(E?5:1)*(C-w)/((E?A/T.tickPositions.length:A)||1)),_=a(_),X=T.getLinearTickPositions(_,w,C).map(this.log2lin),E||(this.minorAutoInterval=_/5);return E||(T.tickInterval=_),X},y.prototype.lin2log=function(_){return Math.pow(10,_)},y.prototype.log2lin=function(_){return Math.log(_)/Math.LN10},y}();u.Additions=x}(l||(l={})),l}),r(n,"Core/Axis/PlotLineOrBand/PlotLineOrBandAxis.js",[n["Core/Utilities.js"]],function(i){var o=i.erase,a=i.extend,s=i.isNumber,l;return function(u){var p=[],m;u.compose=function(x,y){return m||(m=x),p.indexOf(y)===-1&&(p.push(y),a(y.prototype,v.prototype)),y};var v=function(){function x(){}return x.prototype.getPlotBandPath=function(y,_,w){w===void 0&&(w=this.options);var C=this.getPlotLinePath({value:_,force:!0,acrossPanes:w.acrossPanes}),E=[],T=this.horiz;if(_=!s(this.min)||!s(this.max)||y<this.min&&_<this.min||y>this.max&&_>this.max,y=this.getPlotLinePath({value:y,force:!0,acrossPanes:w.acrossPanes}),w=1,y&&C){if(_){var A=y.toString()===C.toString();w=0}for(_=0;_<y.length;_+=2){var k=y[_],X=y[_+1],Z=C[_],W=C[_+1];k[0]!=="M"&&k[0]!=="L"||X[0]!=="M"&&X[0]!=="L"||Z[0]!=="M"&&Z[0]!=="L"||W[0]!=="M"&&W[0]!=="L"||(T&&Z[1]===k[1]?(Z[1]+=w,W[1]+=w):T||Z[2]!==k[2]||(Z[2]+=w,W[2]+=w),E.push(["M",k[1],k[2]],["L",X[1],X[2]],["L",W[1],W[2]],["L",Z[1],Z[2]],["Z"])),E.isFlat=A}}return E},x.prototype.addPlotBand=function(y){return this.addPlotBandOrLine(y,"plotBands")},x.prototype.addPlotLine=function(y){return this.addPlotBandOrLine(y,"plotLines")},x.prototype.addPlotBandOrLine=function(y,_){var w=this,C=this.userOptions,E=new m(this,y);if(this.visible&&(E=E.render()),E){if(this._addedPlotLB||(this._addedPlotLB=!0,(C.plotLines||[]).concat(C.plotBands||[]).forEach(function(A){w.addPlotBandOrLine(A)})),_){var T=C[_]||[];T.push(y),C[_]=T}this.plotLinesAndBands.push(E)}return E},x.prototype.removePlotBandOrLine=function(y){var _=this.plotLinesAndBands,w=this.options,C=this.userOptions;if(_){for(var E=_.length;E--;)_[E].id===y&&_[E].destroy();[w.plotLines||[],C.plotLines||[],w.plotBands||[],C.plotBands||[]].forEach(function(T){for(E=T.length;E--;)(T[E]||{}).id===y&&o(T,T[E])})}},x.prototype.removePlotBand=function(y){this.removePlotBandOrLine(y)},x.prototype.removePlotLine=function(y){this.removePlotBandOrLine(y)},x}()}(l||(l={})),l}),r(n,"Core/Axis/PlotLineOrBand/PlotLineOrBand.js",[n["Core/Axis/PlotLineOrBand/PlotLineOrBandAxis.js"],n["Core/Utilities.js"]],function(i,o){var a=o.arrayMax,s=o.arrayMin,l=o.defined,u=o.destroyObjectProperties,p=o.erase,m=o.fireEvent,v=o.merge,x=o.objectEach,y=o.pick;return o=function(){function _(w,C){this.axis=w,C&&(this.options=C,this.id=C.id)}return _.compose=function(w){return i.compose(_,w)},_.prototype.render=function(){m(this,"render");var w=this,C=w.axis,E=C.horiz,T=C.logarithmic,A=w.options,k=A.color,X=y(A.zIndex,0),Z=A.events,W={},D=C.chart.renderer,H=A.label,N=w.label,j=A.to,$=A.from,z=A.value,O=w.svgElem,F=[],G=l($)&&l(j);F=l(z);var q=!O,ee={class:"highcharts-plot-"+(G?"band ":"line ")+(A.className||"")},re=G?"bands":"lines";if(T&&($=T.log2lin($),j=T.log2lin(j),z=T.log2lin(z)),C.chart.styledMode||(F?(ee.stroke=k||"#999999",ee["stroke-width"]=y(A.width,1),A.dashStyle&&(ee.dashstyle=A.dashStyle)):G&&(ee.fill=k||"#e6ebf5",A.borderWidth&&(ee.stroke=A.borderColor,ee["stroke-width"]=A.borderWidth))),W.zIndex=X,re+="-"+X,(T=C.plotLinesAndBandsGroups[re])||(C.plotLinesAndBandsGroups[re]=T=D.g("plot-"+re).attr(W).add()),q&&(w.svgElem=O=D.path().attr(ee).add(T)),F)F=C.getPlotLinePath({value:z,lineWidth:O.strokeWidth(),acrossPanes:A.acrossPanes});else if(G)F=C.getPlotBandPath($,j,A);else return;return!w.eventsAdded&&Z&&(x(Z,function(ce,fe){O.on(fe,function(J){Z[fe].apply(w,[J])})}),w.eventsAdded=!0),(q||!O.d)&&F&&F.length?O.attr({d:F}):O&&(F?(O.show(),O.animate({d:F})):O.d&&(O.hide(),N&&(w.label=N=N.destroy()))),H&&(l(H.text)||l(H.formatter))&&F&&F.length&&0<C.width&&0<C.height&&!F.isFlat?(H=v({align:E&&G&&"center",x:E?!G&&4:10,verticalAlign:!E&&G&&"middle",y:E?G?16:10:G?6:-4,rotation:E&&!G&&90},H),this.renderLabel(H,F,G,X)):N&&N.hide(),w},_.prototype.renderLabel=function(w,C,E,T){var A=this.axis,k=A.chart.renderer,X=this.label;X||(this.label=X=k.text(this.getLabelText(w),0,0,w.useHTML).attr({align:w.textAlign||w.align,rotation:w.rotation,class:"highcharts-plot-"+(E?"band":"line")+"-label "+(w.className||""),zIndex:T}).add(),A.chart.styledMode||X.css(v({textOverflow:"ellipsis"},w.style))),T=C.xBounds||[C[0][1],C[1][1],E?C[2][1]:C[0][1]],C=C.yBounds||[C[0][2],C[1][2],E?C[2][2]:C[0][2]],E=s(T),k=s(C),X.align(w,!1,{x:E,y:k,width:a(T)-E,height:a(C)-k}),X.alignValue&&X.alignValue!=="left"||(w=w.clip?A.width:A.chart.chartWidth,X.css({width:(X.rotation===90?A.height-(X.alignAttr.y-A.top):w-(X.alignAttr.x-A.left))+"px"})),X.show(!0)},_.prototype.getLabelText=function(w){return l(w.formatter)?w.formatter.call(this):w.text},_.prototype.destroy=function(){p(this.axis.plotLinesAndBands,this),delete this.axis,u(this)},_}(),o}),r(n,"Core/Tooltip.js",[n["Core/FormatUtilities.js"],n["Core/Globals.js"],n["Core/Renderer/RendererUtilities.js"],n["Core/Renderer/RendererRegistry.js"],n["Core/Utilities.js"]],function(i,o,a,s,l){var u=i.format,p=o.doc,m=a.distribute,v=l.clamp,x=l.css,y=l.discardElement,_=l.extend,w=l.fireEvent,C=l.isArray,E=l.isNumber,T=l.isString,A=l.merge,k=l.pick,X=l.splat,Z=l.syncTimeout;return i=function(){function W(D,H){this.allowShared=!0,this.container=void 0,this.crosshairs=[],this.distance=0,this.isHidden=!0,this.isSticky=!1,this.now={},this.options={},this.outside=!1,this.chart=D,this.init(D,H)}return W.prototype.applyFilter=function(){var D=this.chart;D.renderer.definition({tagName:"filter",attributes:{id:"drop-shadow-"+D.index,opacity:.5},children:[{tagName:"feGaussianBlur",attributes:{in:"SourceAlpha",stdDeviation:1}},{tagName:"feOffset",attributes:{dx:1,dy:1}},{tagName:"feComponentTransfer",children:[{tagName:"feFuncA",attributes:{type:"linear",slope:.3}}]},{tagName:"feMerge",children:[{tagName:"feMergeNode"},{tagName:"feMergeNode",attributes:{in:"SourceGraphic"}}]}]})},W.prototype.bodyFormatter=function(D){return D.map(function(H){var N=H.series.tooltipOptions;return(N[(H.point.formatPrefix||"point")+"Formatter"]||H.point.tooltipFormatter).call(H.point,N[(H.point.formatPrefix||"point")+"Format"]||"")})},W.prototype.cleanSplit=function(D){this.chart.series.forEach(function(H){var N=H&&H.tt;N&&(!N.isActive||D?H.tt=N.destroy():N.isActive=!1)})},W.prototype.defaultFormatter=function(D){var H=this.points||X(this),N=[D.tooltipFooterHeaderFormatter(H[0])];return N=N.concat(D.bodyFormatter(H)),N.push(D.tooltipFooterHeaderFormatter(H[0],!0)),N},W.prototype.destroy=function(){this.label&&(this.label=this.label.destroy()),this.split&&this.tt&&(this.cleanSplit(!0),this.tt=this.tt.destroy()),this.renderer&&(this.renderer=this.renderer.destroy(),y(this.container)),l.clearTimeout(this.hideTimer),l.clearTimeout(this.tooltipTimeout)},W.prototype.getAnchor=function(D,H){var N=this.chart,j=N.pointer,$=N.inverted,z=N.plotTop;if(N=N.plotLeft,D=X(D),D[0].series&&D[0].series.yAxis&&!D[0].series.yAxis.options.reversedStacks&&(D=D.slice().reverse()),this.followPointer&&H)typeof H.chartX=="undefined"&&(H=j.normalize(H)),D=[H.chartX-N,H.chartY-z];else if(D[0].tooltipPos)D=D[0].tooltipPos;else{var O=0,F=0;D.forEach(function(G){(G=G.pos(!0))&&(O+=G[0],F+=G[1])}),O/=D.length,F/=D.length,this.shared&&1<D.length&&H&&($?O=H.chartX:F=H.chartY),D=[O-N,F-z]}return D.map(Math.round)},W.prototype.getClassName=function(D,H,N){var j=D.series,$=j.options;return[this.options.className,"highcharts-label",N&&"highcharts-tooltip-header",H?"highcharts-tooltip-box":"highcharts-tooltip",!N&&"highcharts-color-"+k(D.colorIndex,j.colorIndex),$&&$.className].filter(T).join(" ")},W.prototype.getLabel=function(){var D=this,H=this.chart.styledMode,N=this.options,j=this.split&&this.allowShared,$=N.style.pointerEvents||(this.shouldStickOnContact()?"auto":"none"),z,O=this.chart.renderer;if(D.label){var F=!D.label.hasClass("highcharts-label");(j&&!F||!j&&F)&&D.destroy()}if(!this.label){if(this.outside){F=this.chart.options.chart.style;var G=s.getRendererType();this.container=z=o.doc.createElement("div"),z.className="highcharts-tooltip-container",x(z,{position:"absolute",top:"1px",pointerEvents:$,zIndex:Math.max(this.options.style.zIndex||0,(F&&F.zIndex||0)+3)}),o.doc.body.appendChild(z),this.renderer=O=new G(z,0,0,F,void 0,void 0,O.styledMode)}if(j?this.label=O.g("tooltip"):(this.label=O.label("",0,0,N.shape,void 0,void 0,N.useHTML,void 0,"tooltip").attr({padding:N.padding,r:N.borderRadius}),H||this.label.attr({fill:N.backgroundColor,"stroke-width":N.borderWidth}).css(N.style).css({pointerEvents:$}).shadow(N.shadow)),H&&N.shadow&&(this.applyFilter(),this.label.attr({filter:"url(#drop-shadow-"+this.chart.index+")"})),D.outside&&!D.split){var q=this.label,ee=q.xSetter,re=q.ySetter;q.xSetter=function(ce){ee.call(q,D.distance),z.style.left=ce+"px"},q.ySetter=function(ce){re.call(q,D.distance),z.style.top=ce+"px"}}this.label.attr({zIndex:8}).add()}return this.label},W.prototype.getPosition=function(D,H,N){var j=this.chart,$=this.distance,z={},O=j.inverted&&N.h||0,F=this.outside,G=F?p.documentElement.clientWidth-2*$:j.chartWidth,q=F?Math.max(p.body.scrollHeight,p.documentElement.scrollHeight,p.body.offsetHeight,p.documentElement.offsetHeight,p.documentElement.clientHeight):j.chartHeight,ee=j.pointer.getChartPosition(),re=function(me){var pe=me==="x";return[me,pe?G:q,pe?D:H].concat(F?[pe?D*ee.scaleX:H*ee.scaleY,pe?ee.left-$+(N.plotX+j.plotLeft)*ee.scaleX:ee.top-$+(N.plotY+j.plotTop)*ee.scaleY,0,pe?G:q]:[pe?D:H,pe?N.plotX+j.plotLeft:N.plotY+j.plotTop,pe?j.plotLeft:j.plotTop,pe?j.plotLeft+j.plotWidth:j.plotTop+j.plotHeight])},ce=re("y"),fe=re("x"),J;re=!!N.negative,!j.polar&&j.hoverSeries&&j.hoverSeries.yAxis&&j.hoverSeries.yAxis.reversed&&(re=!re);var oe=!this.followPointer&&k(N.ttBelow,!j.inverted===re),ve=function(me,pe,Ce,Pe,Re,ke,ze){var Ge=F?me==="y"?$*ee.scaleY:$*ee.scaleX:$,ht=(Ce-Pe)/2,Tt=Pe<Re-$,xt=Re+$+Pe<pe,pt=Re-Ge-Ce+ht;if(Re=Re+Ge-ht,oe&&xt)z[me]=Re;else if(!oe&&Tt)z[me]=pt;else if(Tt)z[me]=Math.min(ze-Pe,0>pt-O?pt:pt-O);else if(xt)z[me]=Math.max(ke,Re+O+Ce>pe?Re:Re+O);else return!1},ye=function(me,pe,Ce,Pe,Re){var ke;return Re<$||Re>pe-$?ke=!1:z[me]=Re<Ce/2?1:Re>pe-Pe/2?pe-Pe-2:Re-Ce/2,ke},xe=function(me){var pe=ce;ce=fe,fe=pe,J=me},se=function(){ve.apply(0,ce)!==!1?ye.apply(0,fe)!==!1||J||(xe(!0),se()):J?z.x=z.y=0:(xe(!0),se())};return(j.inverted||1<this.len)&&xe(),se(),z},W.prototype.hide=function(D){var H=this;l.clearTimeout(this.hideTimer),D=k(D,this.options.hideDelay),this.isHidden||(this.hideTimer=Z(function(){H.getLabel().fadeOut(D&&void 0),H.isHidden=!0},D))},W.prototype.init=function(D,H){this.chart=D,this.options=H,this.crosshairs=[],this.now={x:0,y:0},this.isHidden=!0,this.split=H.split&&!D.inverted&&!D.polar,this.shared=H.shared||this.split,this.outside=k(H.outside,!(!D.scrollablePixelsX&&!D.scrollablePixelsY))},W.prototype.shouldStickOnContact=function(D){return!(this.followPointer||!this.options.stickOnContact||D&&!this.chart.pointer.inClass(D.target,"highcharts-tooltip"))},W.prototype.move=function(D,H,N,j){var $=this,z=$.now,O=$.options.animation!==!1&&!$.isHidden&&(1<Math.abs(D-z.x)||1<Math.abs(H-z.y)),F=$.followPointer||1<$.len;_(z,{x:O?(2*z.x+D)/3:D,y:O?(z.y+H)/2:H,anchorX:F?void 0:O?(2*z.anchorX+N)/3:N,anchorY:F?void 0:O?(z.anchorY+j)/2:j}),$.getLabel().attr(z),$.drawTracker(),O&&(l.clearTimeout(this.tooltipTimeout),this.tooltipTimeout=setTimeout(function(){$&&$.move(D,H,N,j)},32))},W.prototype.refresh=function(D,H){var N=this.chart,j=this.options,$=N.pointer,z=X(D),O=z[0],F=[],G=j.formatter||this.defaultFormatter,q=this.shared,ee=N.styledMode,re={};if(j.enabled&&O.series){l.clearTimeout(this.hideTimer),this.allowShared=!(!C(D)&&D.series&&D.series.noSharedTooltip),this.followPointer=!this.split&&O.series.tooltipOptions.followPointer,D=this.getAnchor(D,H);var ce=D[0],fe=D[1];if(q&&this.allowShared?($.applyInactiveState(z),z.forEach(function(ve){ve.setState("hover"),F.push(ve.getLabelConfig())}),re={x:O.category,y:O.y},re.points=F):re=O.getLabelConfig(),this.len=F.length,G=G.call(re,this),q=O.series,this.distance=k(q.tooltipOptions.distance,16),G===!1)this.hide();else{if(this.split&&this.allowShared)this.renderSplit(G,z);else{var J=ce,oe=fe;if(H&&$.isDirectTouch&&(J=H.chartX-N.plotLeft,oe=H.chartY-N.plotTop),N.polar||q.options.clip===!1||z.some(function(ve){return $.isDirectTouch||ve.series.shouldShowTooltip(J,oe)}))H=this.getLabel(),j.style.width&&!ee||H.css({width:N.spacingBox.width+"px"}),H.attr({text:G&&G.join?G.join(""):G}),H.addClass(this.getClassName(O),!0),ee||H.attr({stroke:j.borderColor||O.color||q.color||"#666666"}),this.updatePosition({plotX:ce,plotY:fe,negative:O.negative,ttBelow:O.ttBelow,h:D[2]||0});else{this.hide();return}}this.isHidden&&this.label&&this.label.attr({opacity:1}).show(),this.isHidden=!1}w(this,"refresh")}},W.prototype.renderSplit=function(D,H){function N(xt,pt,It,Ie,de){return de===void 0&&(de=!0),It?(pt=Pe?0:Ge,xt=v(xt-Ie/2,me.left,me.right-Ie-(j.outside?Re:0))):(pt-=ke,xt=de?xt-Ie-ye:xt+ye,xt=v(xt,de?xt:me.left,me.right)),{x:xt,y:pt}}var j=this,$=j.chart,z=j.chart,O=z.chartWidth,F=z.chartHeight,G=z.plotHeight,q=z.plotLeft,ee=z.plotTop,re=z.pointer,ce=z.scrollablePixelsY;ce=ce===void 0?0:ce;var fe=z.scrollablePixelsX,J=z.scrollingContainer;J=J===void 0?{scrollLeft:0,scrollTop:0}:J;var oe=J.scrollLeft;J=J.scrollTop;var ve=z.styledMode,ye=j.distance,xe=j.options,se=j.options.positioner,me=j.outside&&typeof fe!="number"?p.documentElement.getBoundingClientRect():{left:oe,right:oe+O,top:J,bottom:J+F},pe=j.getLabel(),Ce=this.renderer||$.renderer,Pe=!(!$.xAxis[0]||!$.xAxis[0].opposite);$=re.getChartPosition();var Re=$.left;$=$.top;var ke=ee+J,ze=0,Ge=G-ce;T(D)&&(D=[!1,D]),D=D.slice(0,H.length+1).reduce(function(xt,pt,It){if(pt!==!1&&pt!==""){It=H[It-1]||{isHeader:!0,plotX:H[0].plotX,plotY:G,series:{}};var Ie=It.isHeader,de=Ie?j:It.series;pt=pt.toString();var Te=de.tt,Be=It.isHeader,Ke=It.series;Te||(Te={padding:xe.padding,r:xe.borderRadius},ve||(Te.fill=xe.backgroundColor,Te["stroke-width"]=xe.borderWidth),Te=Ce.label("",0,0,xe[Be?"headerShape":"shape"],void 0,void 0,xe.useHTML).addClass(j.getClassName(It,!0,Be)).attr(Te).add(pe)),Te.isActive=!0,Te.attr({text:pt}),ve||Te.css(xe.style).shadow(xe.shadow).attr({stroke:xe.borderColor||It.color||Ke.color||"#333333"}),de=de.tt=Te,Be=de.getBBox(),pt=Be.width+de.strokeWidth(),Ie&&(ze=Be.height,Ge+=ze,Pe&&(ke-=ze)),Ke=It.plotX,Ke=Ke===void 0?0:Ke,Te=It.plotY,Te=Te===void 0?0:Te;var ot=It.series;if(It.isHeader){Ke=q+Ke;var Ze=ee+G/2}else{var Je=ot.xAxis,St=ot.yAxis;Ke=Je.pos+v(Ke,-ye,Je.len+ye),ot.shouldShowTooltip(0,St.pos-ee+Te,{ignoreX:!0})&&(Ze=St.pos+Te)}Ke=v(Ke,me.left-ye,me.right+ye),typeof Ze=="number"?(Be=Be.height+1,Te=se?se.call(j,pt,Be,It):N(Ke,Ze,Ie,pt),xt.push({align:se?0:void 0,anchorX:Ke,anchorY:Ze,boxWidth:pt,point:It,rank:k(Te.rank,Ie?1:0),size:Be,target:Te.y,tt:de,x:Te.x})):de.isActive=!1}return xt},[]),!se&&D.some(function(xt){var pt=(j.outside?Re:0)+xt.anchorX;return pt<me.left&&pt+xt.boxWidth<me.right?!0:pt<Re-me.left+xt.boxWidth&&me.right-pt>pt})&&(D=D.map(function(xt){var pt=N(xt.anchorX,xt.anchorY,xt.point.isHeader,xt.boxWidth,!1);return _(xt,{target:pt.y,x:pt.x})})),j.cleanSplit(),m(D,Ge);var ht=Re,Tt=Re;D.forEach(function(xt){var pt=xt.x,It=xt.boxWidth;xt=xt.isHeader,xt||(j.outside&&Re+pt<ht&&(ht=Re+pt),!xt&&j.outside&&ht+It>Tt&&(Tt=Re+pt))}),D.forEach(function(xt){var pt=xt.x,It=xt.anchorX,Ie=xt.pos,de=xt.point.isHeader;if(Ie={visibility:typeof Ie=="undefined"?"hidden":"inherit",x:pt,y:(Ie||0)+ke,anchorX:It,anchorY:xt.anchorY},j.outside&&pt<It){var Te=Re-ht;0<Te&&(de||(Ie.x=pt+Te,Ie.anchorX=It+Te),de&&(Ie.x=(Tt-ht)/2,Ie.anchorX=It+Te))}xt.tt.attr(Ie)}),D=j.container,ce=j.renderer,j.outside&&D&&ce&&(z=pe.getBBox(),ce.setSize(z.width+z.x,z.height+z.y,!1),D.style.left=ht+"px",D.style.top=$+"px")},W.prototype.drawTracker=function(){if(this.shouldStickOnContact()){var D=this.chart,H=this.label,N=this.shared?D.hoverPoints:D.hoverPoint;if(H&&N){var j={x:0,y:0,width:0,height:0};N=this.getAnchor(N);var $=H.getBBox();N[0]+=D.plotLeft-H.translateX,N[1]+=D.plotTop-H.translateY,j.x=Math.min(0,N[0]),j.y=Math.min(0,N[1]),j.width=0>N[0]?Math.max(Math.abs(N[0]),$.width-N[0]):Math.max(Math.abs(N[0]),$.width),j.height=0>N[1]?Math.max(Math.abs(N[1]),$.height-Math.abs(N[1])):Math.max(Math.abs(N[1]),$.height),this.tracker?this.tracker.attr(j):(this.tracker=H.renderer.rect(j).addClass("highcharts-tracker").add(H),D.styledMode||this.tracker.attr({fill:"rgba(0,0,0,0)"}))}}else this.tracker&&this.tracker.destroy()},W.prototype.styledModeFormat=function(D){return D.replace('style="font-size: 10px"','class="highcharts-header"').replace(/style="color:{(point|series)\.color}"/g,'class="highcharts-color-{$1.colorIndex} {series.options.className} {point.options.className}"')},W.prototype.tooltipFooterHeaderFormatter=function(D,H){var N=D.series,j=N.tooltipOptions,$=N.xAxis,z=$&&$.dateTime;$={isFooter:H,labelConfig:D};var O=j.xDateFormat,F=j[H?"footerFormat":"headerFormat"];return w(this,"headerFormatter",$,function(G){z&&!O&&E(D.key)&&(O=z.getXDateFormat(D.key,j.dateTimeLabelFormats)),z&&O&&(D.point&&D.point.tooltipDateKeys||["key"]).forEach(function(q){F=F.replace("{point."+q+"}","{point."+q+":"+O+"}")}),N.chart.styledMode&&(F=this.styledModeFormat(F)),G.text=u(F,{point:D,series:N},this.chart)}),$.text},W.prototype.update=function(D){this.destroy(),A(!0,this.chart.options.tooltip.userOptions,D),this.init(this.chart,A(!0,this.options,D))},W.prototype.updatePosition=function(D){var H=this.chart,N=this.distance,j=this.options,$=H.pointer,z=this.getLabel(),O=$.getChartPosition();$=O.left;var F=O.top,G=O.scaleX;O=O.scaleY;var q=(j.positioner||this.getPosition).call(this,z.width,z.height,D),ee=(D.plotX||0)+H.plotLeft;D=(D.plotY||0)+H.plotTop,this.outside&&(j.positioner&&(q.x+=$-N,q.y+=F-N),N=j.borderWidth+2*N,this.renderer.setSize(z.width+N,z.height+N,!1),(G!==1||O!==1)&&(x(this.container,{transform:"scale(".concat(G,", ").concat(O,")")}),ee*=G,D*=O),ee+=$-q.x,D+=F-q.y),this.move(Math.round(q.x),Math.round(q.y||0),ee,D)},W}(),i}),r(n,"Core/Series/Point.js",[n["Core/Renderer/HTML/AST.js"],n["Core/Animation/AnimationUtilities.js"],n["Core/Defaults.js"],n["Core/FormatUtilities.js"],n["Core/Utilities.js"]],function(i,o,a,s,l){var u=o.animObject,p=a.defaultOptions,m=s.format,v=l.addEvent,x=l.defined,y=l.erase,_=l.extend,w=l.fireEvent,C=l.getNestedProperty,E=l.isArray,T=l.isFunction,A=l.isNumber,k=l.isObject,X=l.merge,Z=l.objectEach,W=l.pick,D=l.syncTimeout,H=l.removeEvent,N=l.uniqueKey;return o=function(){function j(){this.category=void 0,this.formatPrefix="point",this.id=void 0,this.isNull=!1,this.percentage=this.options=this.name=void 0,this.selected=!1,this.total=this.shapeArgs=this.series=void 0,this.visible=!0,this.x=void 0}return j.prototype.animateBeforeDestroy=function(){var $=this,z={x:$.startXPos,opacity:0},O=$.getGraphicalProps();O.singular.forEach(function(F){$[F]=$[F].animate(F==="dataLabel"?{x:$[F].startXPos,y:$[F].startYPos,opacity:0}:z)}),O.plural.forEach(function(F){$[F].forEach(function(G){G.element&&G.animate(_({x:$.startXPos},G.startYPos?{x:G.startXPos,y:G.startYPos}:{}))})})},j.prototype.applyOptions=function($,z){var O=this.series,F=O.options.pointValKey||O.pointValKey;return $=j.prototype.optionsToObject.call(this,$),_(this,$),this.options=this.options?_(this.options,$):$,$.group&&delete this.group,$.dataLabels&&delete this.dataLabels,F&&(this.y=j.prototype.getNestedProperty.call(this,F)),this.formatPrefix=(this.isNull=this.isValid&&!this.isValid())?"null":"point",this.selected&&(this.state="select"),"name"in this&&typeof z=="undefined"&&O.xAxis&&O.xAxis.hasNames&&(this.x=O.xAxis.nameToX(this)),typeof this.x=="undefined"&&O?this.x=typeof z=="undefined"?O.autoIncrement():z:A($.x)&&O.options.relativeXValue&&(this.x=O.autoIncrement($.x)),this},j.prototype.destroy=function(){function $(){(z.graphic||z.graphics||z.dataLabel||z.dataLabels)&&(H(z),z.destroyElements());for(ee in z)z[ee]=null}var z=this,O=z.series,F=O.chart;O=O.options.dataSorting;var G=F.hoverPoints,q=u(z.series.chart.renderer.globalAnimation),ee;z.legendItem&&F.legend.destroyItem(z),G&&(z.setState(),y(G,z),G.length||(F.hoverPoints=null)),z===F.hoverPoint&&z.onMouseOut(),O&&O.enabled?(this.animateBeforeDestroy(),D($,q.duration)):$(),F.pointCount--},j.prototype.destroyElements=function($){var z=this;$=z.getGraphicalProps($),$.singular.forEach(function(O){z[O]=z[O].destroy()}),$.plural.forEach(function(O){z[O].forEach(function(F){F&&F.element&&F.destroy()}),delete z[O]})},j.prototype.firePointEvent=function($,z,O){var F=this,G=this.series.options;(G.point.events[$]||F.options&&F.options.events&&F.options.events[$])&&F.importEvents(),$==="click"&&G.allowPointSelect&&(O=function(q){F.select&&F.select(null,q.ctrlKey||q.metaKey||q.shiftKey)}),w(F,$,z,O)},j.prototype.getClassName=function(){return"highcharts-point"+(this.selected?" highcharts-point-select":"")+(this.negative?" highcharts-negative":"")+(this.isNull?" highcharts-null-point":"")+(typeof this.colorIndex!="undefined"?" highcharts-color-"+this.colorIndex:"")+(this.options.className?" "+this.options.className:"")+(this.zone&&this.zone.className?" "+this.zone.className.replace("highcharts-negative",""):"")},j.prototype.getGraphicalProps=function($){var z=this,O=[],F={singular:[],plural:[]},G;for($=$||{graphic:1,dataLabel:1},$.graphic&&O.push("graphic","shadowGroup"),$.dataLabel&&O.push("dataLabel","dataLabelPath","dataLabelUpper","connector"),G=O.length;G--;){var q=O[G];z[q]&&F.singular.push(q)}return["graphic","dataLabel","connector"].forEach(function(ee){var re=ee+"s";$[ee]&&z[re]&&F.plural.push(re)}),F},j.prototype.getLabelConfig=function(){return{x:this.category,y:this.y,color:this.color,colorIndex:this.colorIndex,key:this.name||this.category,series:this.series,point:this,percentage:this.percentage,total:this.total||this.stackTotal}},j.prototype.getNestedProperty=function($){if($)return $.indexOf("custom.")===0?C($,this.options):this[$]},j.prototype.getZone=function(){var $=this.series,z=$.zones;$=$.zoneAxis||"y";var O,F=0;for(O=z[F];this[$]>=O.value;)O=z[++F];return this.nonZonedColor||(this.nonZonedColor=this.color),this.color=O&&O.color&&!this.options.color?O.color:this.nonZonedColor,O},j.prototype.hasNewShapeType=function(){return(this.graphic&&(this.graphic.symbolName||this.graphic.element.nodeName))!==this.shapeType},j.prototype.init=function($,z,O){return this.series=$,this.applyOptions(z,O),this.id=x(this.id)?this.id:N(),this.resolveColor(),$.chart.pointCount++,w(this,"afterInit"),this},j.prototype.isValid=function(){return this.x!==null&&A(this.y)},j.prototype.optionsToObject=function($){var z=this.series,O=z.options.keys,F=O||z.pointArrayMap||["y"],G=F.length,q={},ee=0,re=0;if(A($)||$===null)q[F[0]]=$;else if(E($))for(!O&&$.length>G&&(z=typeof $[0],z==="string"?q.name=$[0]:z==="number"&&(q.x=$[0]),ee++);re<G;)O&&typeof $[ee]=="undefined"||(0<F[re].indexOf(".")?j.prototype.setNestedProperty(q,$[ee],F[re]):q[F[re]]=$[ee]),ee++,re++;else typeof $=="object"&&(q=$,$.dataLabels&&(z._hasPointLabels=!0),$.marker&&(z._hasPointMarkers=!0));return q},j.prototype.pos=function($,z){z===void 0&&(z=this.plotY);var O=this.plotX,F=this.series,G=F.chart,q=F.xAxis;F=F.yAxis;var ee=0,re=0;if(A(O)&&A(z))return $&&(ee=q?q.pos:G.plotLeft,re=F?F.pos:G.plotTop),G.inverted&&q&&F?[F.len-z+re,q.len-O+ee]:[O+ee,z+re]},j.prototype.resolveColor=function(){var $=this.series,z=$.chart.styledMode,O=$.chart.options.chart.colorCount;if(delete this.nonZonedColor,$.options.colorByPoint){if(!z){O=$.options.colors||$.chart.options.colors;var F=O[$.colorCounter];O=O.length}z=$.colorCounter,$.colorCounter++,$.colorCounter===O&&($.colorCounter=0)}else z||(F=$.color),z=$.colorIndex;this.colorIndex=W(this.options.colorIndex,z),this.color=W(this.options.color,F)},j.prototype.setNestedProperty=function($,z,O){return O.split(".").reduce(function(F,G,q,ee){return F[G]=ee.length-1===q?z:k(F[G],!0)?F[G]:{},F[G]},$),$},j.prototype.shouldDraw=function(){return!this.isNull},j.prototype.tooltipFormatter=function($){var z=this.series,O=z.tooltipOptions,F=W(O.valueDecimals,""),G=O.valuePrefix||"",q=O.valueSuffix||"";return z.chart.styledMode&&($=z.chart.tooltip.styledModeFormat($)),(z.pointArrayMap||["y"]).forEach(function(ee){ee="{point."+ee,(G||q)&&($=$.replace(RegExp(ee+"}","g"),G+ee+"}"+q)),$=$.replace(RegExp(ee+"}","g"),ee+":,."+F+"f}")}),m($,{point:this,series:this.series},z.chart)},j.prototype.update=function($,z,O,F){function G(){q.applyOptions($);var oe=re&&q.hasMockGraphic;oe=q.y===null?!oe:oe,re&&oe&&(q.graphic=re.destroy(),delete q.hasMockGraphic),k($,!0)&&(re&&re.element&&$&&$.marker&&typeof $.marker.symbol!="undefined"&&(q.graphic=re.destroy()),$&&$.dataLabels&&q.dataLabel&&(q.dataLabel=q.dataLabel.destroy()),q.connector&&(q.connector=q.connector.destroy())),J=q.index,ee.updateParallelArrays(q,J),fe.data[J]=k(fe.data[J],!0)||k($,!0)?q.options:W($,fe.data[J]),ee.isDirty=ee.isDirtyData=!0,!ee.fixedBox&&ee.hasCartesianSeries&&(ce.isDirtyBox=!0),fe.legendType==="point"&&(ce.isDirtyLegend=!0),z&&ce.redraw(O)}var q=this,ee=q.series,re=q.graphic,ce=ee.chart,fe=ee.options,J;z=W(z,!0),F===!1?G():q.firePointEvent("update",{options:$},G)},j.prototype.remove=function($,z){this.series.removePoint(this.series.data.indexOf(this),$,z)},j.prototype.select=function($,z){var O=this,F=O.series,G=F.chart;this.selectedStaging=$=W($,!O.selected),O.firePointEvent($?"select":"unselect",{accumulate:z},function(){O.selected=O.options.selected=$,F.options.data[F.data.indexOf(O)]=O.options,O.setState($&&"select"),z||G.getSelectedPoints().forEach(function(q){var ee=q.series;q.selected&&q!==O&&(q.selected=q.options.selected=!1,ee.options.data[ee.data.indexOf(q)]=q.options,q.setState(G.hoverPoints&&ee.options.inactiveOtherPoints?"inactive":""),q.firePointEvent("unselect"))})}),delete this.selectedStaging},j.prototype.onMouseOver=function($){var z=this.series.chart,O=z.pointer;$=$?O.normalize($):O.getChartCoordinatesFromPoint(this,z.inverted),O.runPointActions($,this)},j.prototype.onMouseOut=function(){var $=this.series.chart;this.firePointEvent("mouseOut"),this.series.options.inactiveOtherPoints||($.hoverPoints||[]).forEach(function(z){z.setState()}),$.hoverPoints=$.hoverPoint=null},j.prototype.importEvents=function(){if(!this.hasImportedEvents){var $=this,z=X($.series.options.point,$.options).events;$.events=z,Z(z,function(O,F){T(O)&&v($,F,O)}),this.hasImportedEvents=!0}},j.prototype.setState=function($,z){var O=this.series,F=this.state,G=O.options.states[$||"normal"]||{},q=p.plotOptions[O.type].marker&&O.options.marker,ee=q&&q.enabled===!1,re=q&&q.states&&q.states[$||"normal"]||{},ce=re.enabled===!1,fe=this.marker||{},J=O.chart,oe=q&&O.markerAttribs,ve=O.halo,ye,xe=O.stateMarkerGraphic;if($=$||"",!($===this.state&&!z||this.selected&&$!=="select"||G.enabled===!1||$&&(ce||ee&&re.enabled===!1)||$&&fe.states&&fe.states[$]&&fe.states[$].enabled===!1)){if(this.state=$,oe&&(ye=O.markerAttribs(this,$)),this.graphic&&!this.hasMockGraphic){if(F&&this.graphic.removeClass("highcharts-point-"+F),$&&this.graphic.addClass("highcharts-point-"+$),!J.styledMode){F=O.pointAttribs(this,$);var se=W(J.options.chart.animation,G.animation),me=F.opacity;O.options.inactiveOtherPoints&&A(me)&&((this.dataLabels||[]).forEach(function(pe){pe&&!pe.hasClass("highcharts-data-label-hidden")&&pe.animate({opacity:me},se)}),this.connector&&this.connector.animate({opacity:me},se)),this.graphic.animate(F,se)}ye&&this.graphic.animate(ye,W(J.options.chart.animation,re.animation,q.animation)),xe&&xe.hide()}else $&&re&&(q=fe.symbol||O.symbol,xe&&xe.currentSymbol!==q&&(xe=xe.destroy()),ye&&(xe?xe[z?"animate":"attr"]({x:ye.x,y:ye.y}):q&&(O.stateMarkerGraphic=xe=J.renderer.symbol(q,ye.x,ye.y,ye.width,ye.height).add(O.markerGroup),xe.currentSymbol=q)),!J.styledMode&&xe&&this.state!=="inactive"&&xe.attr(O.pointAttribs(this,$))),xe&&(xe[$&&this.isInside?"show":"hide"](),xe.element.point=this,xe.addClass(this.getClassName(),!0));G=G.halo,ye=(xe=this.graphic||xe)&&xe.visibility||"inherit",G&&G.size&&xe&&ye!=="hidden"&&!this.isCluster?(ve||(O.halo=ve=J.renderer.path().add(xe.parentGroup)),ve.show()[z?"animate":"attr"]({d:this.haloPath(G.size)}),ve.attr({class:"highcharts-halo highcharts-color-"+W(this.colorIndex,O.colorIndex)+(this.className?" "+this.className:""),visibility:ye,zIndex:-1}),ve.point=this,J.styledMode||ve.attr(_({fill:this.color||O.color,"fill-opacity":G.opacity},i.filterUserAttributes(G.attributes||{})))):ve&&ve.point&&ve.point.haloPath&&ve.animate({d:ve.point.haloPath(0)},null,ve.hide),w(this,"afterSetState",{state:$})}},j.prototype.haloPath=function($){var z=this.pos();return z?this.series.chart.renderer.symbols.circle(Math.floor(z[0])-$,z[1]-$,2*$,2*$):[]},j}(),o}),r(n,"Core/Pointer.js",[n["Core/Color/Color.js"],n["Core/Globals.js"],n["Core/Tooltip.js"],n["Core/Utilities.js"]],function(i,o,a,s){var l=i.parse,u=o.charts,p=o.noop,m=s.addEvent,v=s.attr,x=s.css,y=s.defined,_=s.extend,w=s.find,C=s.fireEvent,E=s.isNumber,T=s.isObject,A=s.objectEach,k=s.offset,X=s.pick,Z=s.splat;return i=function(){function W(D,H){this.lastValidTouch={},this.pinchDown=[],this.runChartClick=!1,this.eventsToUnbind=[],this.chart=D,this.hasDragged=!1,this.options=H,this.init(D,H)}return W.prototype.applyInactiveState=function(D){var H=[],N;(D||[]).forEach(function(j){N=j.series,H.push(N),N.linkedParent&&H.push(N.linkedParent),N.linkedSeries&&(H=H.concat(N.linkedSeries)),N.navigatorSeries&&H.push(N.navigatorSeries)}),this.chart.series.forEach(function(j){H.indexOf(j)===-1?j.setState("inactive",!0):j.options.inactiveOtherPoints&&j.setAllPointsToState("inactive")})},W.prototype.destroy=function(){var D=this;this.eventsToUnbind.forEach(function(H){return H()}),this.eventsToUnbind=[],o.chartCount||(W.unbindDocumentMouseUp&&(W.unbindDocumentMouseUp=W.unbindDocumentMouseUp()),W.unbindDocumentTouchEnd&&(W.unbindDocumentTouchEnd=W.unbindDocumentTouchEnd())),clearInterval(D.tooltipTimeout),A(D,function(H,N){D[N]=void 0})},W.prototype.getSelectionMarkerAttrs=function(D,H){var N=this,j={args:{chartX:D,chartY:H},attrs:{},shapeType:"rect"};return C(this,"getSelectionMarkerAttrs",j,function($){var z=N.chart,O=N.mouseDownX;O=O===void 0?0:O;var F=N.mouseDownY;F=F===void 0?0:F;var G=N.zoomHor,q=N.zoomVert;$=$.attrs,$.x=z.plotLeft,$.y=z.plotTop,$.width=G?1:z.plotWidth,$.height=q?1:z.plotHeight,G&&(z=D-O,$.width=Math.abs(z),$.x=(0<z?0:z)+O),q&&(z=H-F,$.height=Math.abs(z),$.y=(0<z?0:z)+F)}),j},W.prototype.drag=function(D){var H=this.chart,N=H.options.chart,j=H.plotLeft,$=H.plotTop,z=H.plotWidth,O=H.plotHeight,F=this.mouseDownX||0,G=this.mouseDownY||0,q=T(N.panning)?N.panning&&N.panning.enabled:N.panning,ee=N.panKey&&D[N.panKey+"Key"],re=D.chartX,ce=D.chartY,fe=this.selectionMarker;fe&&fe.touch||(re<j?re=j:re>j+z&&(re=j+z),ce<$?ce=$:ce>$+O&&(ce=$+O),this.hasDragged=Math.sqrt(Math.pow(F-re,2)+Math.pow(G-ce,2)),10<this.hasDragged&&(j=H.isInsidePlot(F-j,G-$,{visiblePlotOnly:!0}),ce=this.getSelectionMarkerAttrs(re,ce),re=ce.shapeType,ce=ce.attrs,!H.hasCartesianSeries&&!H.mapView||!this.zoomX&&!this.zoomY||!j||ee||fe||(this.selectionMarker=fe=H.renderer[re](),fe.attr({class:"highcharts-selection-marker",zIndex:7}).add(),H.styledMode||fe.attr({fill:N.selectionMarkerFill||l("#335cad").setOpacity(.25).get()})),fe&&fe.attr(ce),j&&!fe&&q&&H.pan(D,N.panning)))},W.prototype.dragStart=function(D){var H=this.chart;H.mouseIsDown=D.type,H.cancelClick=!1,H.mouseDownX=this.mouseDownX=D.chartX,H.mouseDownY=this.mouseDownY=D.chartY},W.prototype.getSelectionBox=function(D){var H={args:{marker:D},result:{}};return C(this,"getSelectionBox",H,function(N){N.result={x:D.attr?+D.attr("x"):D.x,y:D.attr?+D.attr("y"):D.y,width:D.attr?D.attr("width"):D.width,height:D.attr?D.attr("height"):D.height}}),H.result},W.prototype.drop=function(D){var H=this,N=this.chart,j=this.hasPinched;if(this.selectionMarker){var $=this.getSelectionBox(this.selectionMarker),z=$.x,O=$.y,F=$.width,G=$.height,q={originalEvent:D,xAxis:[],yAxis:[],x:z,y:O,width:F,height:G},ee=!!N.mapView;(this.hasDragged||j)&&(N.axes.forEach(function(re){if(re.zoomEnabled&&y(re.min)&&(j||H[{xAxis:"zoomX",yAxis:"zoomY"}[re.coll]])&&E(z)&&E(O)&&E(F)&&E(G)){var ce=re.horiz,fe=D.type==="touchend"?re.minPixelPadding:0,J=re.toValue((ce?z:O)+fe);ce=re.toValue((ce?z+F:O+G)-fe),q[re.coll].push({axis:re,min:Math.min(J,ce),max:Math.max(J,ce)}),ee=!0}}),ee&&C(N,"selection",q,function(re){N.zoom(_(re,j?{animation:!1}:null))})),E(N.index)&&(this.selectionMarker=this.selectionMarker.destroy()),j&&this.scaleGroups()}N&&E(N.index)&&(x(N.container,{cursor:N._cursor}),N.cancelClick=10<this.hasDragged,N.mouseIsDown=this.hasDragged=this.hasPinched=!1,this.pinchDown=[])},W.prototype.findNearestKDPoint=function(D,H,N){var j;return D.forEach(function($){var z=!($.noSharedTooltip&&H)&&0>$.options.findNearestPointBy.indexOf("y");if($=$.searchPoint(N,z),(z=T($,!0)&&$.series)&&!(z=!T(j,!0))){z=j.distX-$.distX;var O=j.dist-$.dist,F=($.series.group&&$.series.group.zIndex)-(j.series.group&&j.series.group.zIndex);z=0<(z!==0&&H?z:O!==0?O:F!==0?F:j.series.index>$.series.index?-1:1)}z&&(j=$)}),j},W.prototype.getChartCoordinatesFromPoint=function(D,H){var N=D.series,j=N.xAxis;N=N.yAxis;var $=D.shapeArgs;if(j&&N){var z=X(D.clientX,D.plotX),O=D.plotY||0;return D.isNode&&$&&E($.x)&&E($.y)&&(z=$.x,O=$.y),H?{chartX:N.len+N.pos-O,chartY:j.len+j.pos-z}:{chartX:z+j.pos,chartY:O+N.pos}}if($&&$.x&&$.y)return{chartX:$.x,chartY:$.y}},W.prototype.getChartPosition=function(){if(this.chartPosition)return this.chartPosition;var D=this.chart.container,H=k(D);this.chartPosition={left:H.left,top:H.top,scaleX:1,scaleY:1};var N=D.offsetWidth;return D=D.offsetHeight,2<N&&2<D&&(this.chartPosition.scaleX=H.width/N,this.chartPosition.scaleY=H.height/D),this.chartPosition},W.prototype.getCoordinates=function(D){var H={xAxis:[],yAxis:[]};return this.chart.axes.forEach(function(N){H[N.isXAxis?"xAxis":"yAxis"].push({axis:N,value:N.toValue(D[N.horiz?"chartX":"chartY"])})}),H},W.prototype.getHoverData=function(D,H,N,j,$,z){var O=[];j=!(!j||!D);var F=function(re){return re.visible&&!(!$&&re.directTouch)&&X(re.options.enableMouseTracking,!0)},G={chartX:z?z.chartX:void 0,chartY:z?z.chartY:void 0,shared:$};C(this,"beforeGetHoverData",G);var q=H&&!H.stickyTracking?[H]:N.filter(function(re){return re.stickyTracking&&(G.filter||F)(re)}),ee=j||!z?D:this.findNearestKDPoint(q,$,z);return H=ee&&ee.series,ee&&($&&!H.noSharedTooltip?(q=N.filter(function(re){return G.filter?G.filter(re):F(re)&&!re.noSharedTooltip}),q.forEach(function(re){var ce=w(re.points,function(fe){return fe.x===ee.x&&!fe.isNull});T(ce)&&(re.boosted&&re.boost&&(ce=re.boost.getPoint(ce)),O.push(ce))})):O.push(ee)),G={hoverPoint:ee},C(this,"afterGetHoverData",G),{hoverPoint:G.hoverPoint,hoverSeries:H,hoverPoints:O}},W.prototype.getPointFromEvent=function(D){D=D.target;for(var H;D&&!H;)H=D.point,D=D.parentNode;return H},W.prototype.onTrackerMouseOut=function(D){D=D.relatedTarget||D.toElement;var H=this.chart.hoverSeries;this.isDirectTouch=!1,!H||!D||H.stickyTracking||this.inClass(D,"highcharts-tooltip")||this.inClass(D,"highcharts-series-"+H.index)&&this.inClass(D,"highcharts-tracker")||H.onMouseOut()},W.prototype.inClass=function(D,H){for(var N;D;){if(N=v(D,"class")){if(N.indexOf(H)!==-1)return!0;if(N.indexOf("highcharts-container")!==-1)return!1}D=D.parentElement}},W.prototype.init=function(D,H){this.options=H,this.chart=D,this.runChartClick=!(!H.chart.events||!H.chart.events.click),this.pinchDown=[],this.lastValidTouch={},a&&(D.tooltip=new a(D,H.tooltip)),this.setDOMEvents()},W.prototype.normalize=function(D,H){var N=D.touches,j=N?N.length?N.item(0):X(N.changedTouches,D.changedTouches)[0]:D;return H||(H=this.getChartPosition()),N=j.pageX-H.left,j=j.pageY-H.top,N/=H.scaleX,j/=H.scaleY,_(D,{chartX:Math.round(N),chartY:Math.round(j)})},W.prototype.onContainerClick=function(D){var H=this.chart,N=H.hoverPoint;D=this.normalize(D);var j=H.plotLeft,$=H.plotTop;H.cancelClick||(N&&this.inClass(D.target,"highcharts-tracker")?(C(N.series,"click",_(D,{point:N})),H.hoverPoint&&N.firePointEvent("click",D)):(_(D,this.getCoordinates(D)),H.isInsidePlot(D.chartX-j,D.chartY-$,{visiblePlotOnly:!0})&&C(H,"click",D)))},W.prototype.onContainerMouseDown=function(D){var H=((D.buttons||D.button)&1)==1;D=this.normalize(D),o.isFirefox&&D.button!==0&&this.onContainerMouseMove(D),(typeof D.button=="undefined"||H)&&(this.zoomOption(D),H&&D.preventDefault&&D.preventDefault(),this.dragStart(D))},W.prototype.onContainerMouseLeave=function(D){var H=u[X(W.hoverChartIndex,-1)],N=this.chart.tooltip;D=this.normalize(D),H&&(D.relatedTarget||D.toElement)&&(H.pointer.reset(),H.pointer.chartPosition=void 0),N&&!N.isHidden&&this.reset()},W.prototype.onContainerMouseEnter=function(D){delete this.chartPosition},W.prototype.onContainerMouseMove=function(D){var H=this.chart,N=H.tooltip;D=this.normalize(D),this.setHoverChartIndex(),D.preventDefault||(D.returnValue=!1),(H.mouseIsDown==="mousedown"||this.touchSelect(D))&&this.drag(D),H.openMenu||!this.inClass(D.target,"highcharts-tracker")&&!H.isInsidePlot(D.chartX-H.plotLeft,D.chartY-H.plotTop,{visiblePlotOnly:!0})||N&&N.shouldStickOnContact(D)||(this.inClass(D.target,"highcharts-no-tooltip")?this.reset(!1,0):this.runPointActions(D))},W.prototype.onDocumentTouchEnd=function(D){var H=u[X(W.hoverChartIndex,-1)];H&&H.pointer.drop(D)},W.prototype.onContainerTouchMove=function(D){this.touchSelect(D)?this.onContainerMouseMove(D):this.touch(D)},W.prototype.onContainerTouchStart=function(D){this.touchSelect(D)?this.onContainerMouseDown(D):(this.zoomOption(D),this.touch(D,!0))},W.prototype.onDocumentMouseMove=function(D){var H=this.chart,N=H.tooltip,j=this.chartPosition;D=this.normalize(D,j),!j||H.isInsidePlot(D.chartX-H.plotLeft,D.chartY-H.plotTop,{visiblePlotOnly:!0})||N&&N.shouldStickOnContact(D)||this.inClass(D.target,"highcharts-tracker")||this.reset()},W.prototype.onDocumentMouseUp=function(D){var H=u[X(W.hoverChartIndex,-1)];H&&H.pointer.drop(D)},W.prototype.pinch=function(D){var H=this,N=H.chart,j=H.pinchDown,$=D.touches||[],z=$.length,O=H.lastValidTouch,F=H.hasZoom,G={},q=z===1&&(H.inClass(D.target,"highcharts-tracker")&&N.runTrackerClick||H.runChartClick),ee={},re=H.chart.tooltip;re=z===1&&X(re&&re.options.followTouchMove,!0);var ce=H.selectionMarker;1<z?H.initiated=!0:re&&(H.initiated=!1),F&&H.initiated&&!q&&D.cancelable!==!1&&D.preventDefault(),[].map.call($,function(fe){return H.normalize(fe)}),D.type==="touchstart"?([].forEach.call($,function(fe,J){j[J]={chartX:fe.chartX,chartY:fe.chartY}}),O.x=[j[0].chartX,j[1]&&j[1].chartX],O.y=[j[0].chartY,j[1]&&j[1].chartY],N.axes.forEach(function(fe){if(fe.zoomEnabled){var J=N.bounds[fe.horiz?"h":"v"],oe=fe.minPixelPadding,ve=fe.toPixels(Math.min(X(fe.options.min,fe.dataMin),fe.dataMin)),ye=fe.toPixels(Math.max(X(fe.options.max,fe.dataMax),fe.dataMax)),xe=Math.max(ve,ye);J.min=Math.min(fe.pos,Math.min(ve,ye)-oe),J.max=Math.max(fe.pos+fe.len,xe+oe)}}),H.res=!0):re?this.runPointActions(H.normalize(D)):j.length&&(C(N,"touchpan",{originalEvent:D},function(){ce||(H.selectionMarker=ce=_({destroy:p,touch:!0},N.plotBox)),H.pinchTranslate(j,$,G,ce,ee,O),H.hasPinched=F,H.scaleGroups(G,ee)}),H.res&&(H.res=!1,this.reset(!1,0)))},W.prototype.pinchTranslate=function(D,H,N,j,$,z){this.zoomHor&&this.pinchTranslateDirection(!0,D,H,N,j,$,z),this.zoomVert&&this.pinchTranslateDirection(!1,D,H,N,j,$,z)},W.prototype.pinchTranslateDirection=function(D,H,N,j,$,z,O,F){var G=this.chart,q=D?"x":"y",ee=D?"X":"Y",re="chart"+ee,ce=D?"width":"height",fe=G["plot"+(D?"Left":"Top")],J=G.inverted,oe=G.bounds[D?"h":"v"],ve=H.length===1,ye=H[0][re],xe=!ve&&H[1][re];H=function(){typeof Pe=="number"&&20<Math.abs(ye-xe)&&(pe=F||Math.abs(Ce-Pe)/Math.abs(ye-xe)),me=(fe-Ce)/pe+ye,se=G["plot"+(D?"Width":"Height")]/pe};var se,me,pe=F||1,Ce=N[0][re],Pe=!ve&&N[1][re];if(H(),N=me,N<oe.min){N=oe.min;var Re=!0}else N+se>oe.max&&(N=oe.max-se,Re=!0);Re?(Ce-=.8*(Ce-O[q][0]),typeof Pe=="number"&&(Pe-=.8*(Pe-O[q][1])),H()):O[q]=[Ce,Pe],J||(z[q]=me-fe,z[ce]=se),z=J?1/pe:pe,$[ce]=se,$[q]=N,j[J?D?"scaleY":"scaleX":"scale"+ee]=pe,j["translate"+ee]=z*fe+(Ce-z*ye)},W.prototype.reset=function(D,H){var N=this.chart,j=N.hoverSeries,$=N.hoverPoint,z=N.hoverPoints,O=N.tooltip,F=O&&O.shared?z:$;D&&F&&Z(F).forEach(function(G){G.series.isCartesian&&typeof G.plotX=="undefined"&&(D=!1)}),D?O&&F&&Z(F).length&&(O.refresh(F),O.shared&&z?z.forEach(function(G){G.setState(G.state,!0),G.series.isCartesian&&(G.series.xAxis.crosshair&&G.series.xAxis.drawCrosshair(null,G),G.series.yAxis.crosshair&&G.series.yAxis.drawCrosshair(null,G))}):$&&($.setState($.state,!0),N.axes.forEach(function(G){G.crosshair&&$.series[G.coll]===G&&G.drawCrosshair(null,$)}))):($&&$.onMouseOut(),z&&z.forEach(function(G){G.setState()}),j&&j.onMouseOut(),O&&O.hide(H),this.unDocMouseMove&&(this.unDocMouseMove=this.unDocMouseMove()),N.axes.forEach(function(G){G.hideCrosshair()}),this.hoverX=N.hoverPoints=N.hoverPoint=null)},W.prototype.runPointActions=function(D,H,N){var j=this.chart,$=j.tooltip&&j.tooltip.options.enabled?j.tooltip:void 0,z=$?$.shared:!1,O=H||j.hoverPoint,F=O&&O.series||j.hoverSeries;H=this.getHoverData(O,F,j.series,(!D||D.type!=="touchmove")&&(!!H||F&&F.directTouch&&this.isDirectTouch),z,D),O=H.hoverPoint,F=H.hoverSeries;var G=H.hoverPoints;H=F&&F.tooltipOptions.followPointer&&!F.tooltipOptions.split;var q=z&&F&&!F.noSharedTooltip;if(O&&(N||O!==j.hoverPoint||$&&$.isHidden)){if((j.hoverPoints||[]).forEach(function(ee){G.indexOf(ee)===-1&&ee.setState()}),j.hoverSeries!==F&&F.onMouseOver(),this.applyInactiveState(G),(G||[]).forEach(function(ee){ee.setState("hover")}),j.hoverPoint&&j.hoverPoint.firePointEvent("mouseOut"),!O.series)return;j.hoverPoints=G,j.hoverPoint=O,O.firePointEvent("mouseOver",void 0,function(){$&&O&&$.refresh(q?G:O,D)})}else H&&$&&!$.isHidden&&(N=$.getAnchor([{}],D),j.isInsidePlot(N[0],N[1],{visiblePlotOnly:!0})&&$.updatePosition({plotX:N[0],plotY:N[1]}));this.unDocMouseMove||(this.unDocMouseMove=m(j.container.ownerDocument,"mousemove",function(ee){var re=u[W.hoverChartIndex];re&&re.pointer.onDocumentMouseMove(ee)}),this.eventsToUnbind.push(this.unDocMouseMove)),j.axes.forEach(function(ee){var re=X((ee.crosshair||{}).snap,!0),ce;re&&((ce=j.hoverPoint)&&ce.series[ee.coll]===ee||(ce=w(G,function(fe){return fe.series&&fe.series[ee.coll]===ee}))),ce||!re?ee.drawCrosshair(D,ce):ee.hideCrosshair()})},W.prototype.scaleGroups=function(D,H){var N=this.chart;N.series.forEach(function(j){var $=D||j.getPlotBox();j.group&&(j.xAxis&&j.xAxis.zoomEnabled||N.mapView)&&(j.group.attr($),j.markerGroup&&(j.markerGroup.attr($),j.markerGroup.clip(H?N.clipRect:null)),j.dataLabelsGroup&&j.dataLabelsGroup.attr($))}),N.clipRect.attr(H||N.clipBox)},W.prototype.setDOMEvents=function(){var D=this,H=this.chart.container,N=H.ownerDocument;H.onmousedown=this.onContainerMouseDown.bind(this),H.onmousemove=this.onContainerMouseMove.bind(this),H.onclick=this.onContainerClick.bind(this),this.eventsToUnbind.push(m(H,"mouseenter",this.onContainerMouseEnter.bind(this))),this.eventsToUnbind.push(m(H,"mouseleave",this.onContainerMouseLeave.bind(this))),W.unbindDocumentMouseUp||(W.unbindDocumentMouseUp=m(N,"mouseup",this.onDocumentMouseUp.bind(this)));for(var j=this.chart.renderTo.parentElement;j&&j.tagName!=="BODY";)this.eventsToUnbind.push(m(j,"scroll",function(){delete D.chartPosition})),j=j.parentElement;o.hasTouch&&(this.eventsToUnbind.push(m(H,"touchstart",this.onContainerTouchStart.bind(this),{passive:!1})),this.eventsToUnbind.push(m(H,"touchmove",this.onContainerTouchMove.bind(this),{passive:!1})),W.unbindDocumentTouchEnd||(W.unbindDocumentTouchEnd=m(N,"touchend",this.onDocumentTouchEnd.bind(this),{passive:!1})))},W.prototype.setHoverChartIndex=function(){var D=this.chart,H=o.charts[X(W.hoverChartIndex,-1)];H&&H!==D&&H.pointer.onContainerMouseLeave({relatedTarget:D.container}),H&&H.mouseIsDown||(W.hoverChartIndex=D.index)},W.prototype.touch=function(D,H){var N=this.chart;if(this.setHoverChartIndex(),D.touches.length===1)if(D=this.normalize(D),N.isInsidePlot(D.chartX-N.plotLeft,D.chartY-N.plotTop,{visiblePlotOnly:!0})&&!N.openMenu){if(H&&this.runPointActions(D),D.type==="touchmove"){H=this.pinchDown;var j=H[0]?4<=Math.sqrt(Math.pow(H[0].chartX-D.chartX,2)+Math.pow(H[0].chartY-D.chartY,2)):!1}X(j,!0)&&this.pinch(D)}else H&&this.reset();else D.touches.length===2&&this.pinch(D)},W.prototype.touchSelect=function(D){return!(!this.chart.options.chart.zooming.singleTouch||!D.touches||D.touches.length!==1)},W.prototype.zoomOption=function(D){var H=this.chart,N=H.options.chart;H=H.inverted;var j=N.zooming.type||"";/touch/.test(D.type)&&(j=X(N.zooming.pinchType,j)),this.zoomX=D=/x/.test(j),this.zoomY=N=/y/.test(j),this.zoomHor=D&&!H||N&&H,this.zoomVert=N&&!H||D&&H,this.hasZoom=D||N},W}(),i}),r(n,"Core/MSPointer.js",[n["Core/Globals.js"],n["Core/Pointer.js"],n["Core/Utilities.js"]],function(i,o,a){function s(){var k=[];return k.item=function(X){return this[X]},w(T,function(X){k.push({pageX:X.pageX,pageY:X.pageY,target:X.target})}),k}function l(k,X,Z,W){var D=p[o.hoverChartIndex||NaN];k.pointerType!=="touch"&&k.pointerType!==k.MSPOINTER_TYPE_TOUCH||!D||(D=D.pointer,W(k),D[X]({type:Z,target:k.currentTarget,preventDefault:v,touches:s()}))}var u=this&&this.__extends||function(){var k=function(X,Z){return k=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(W,D){W.__proto__=D}||function(W,D){for(var H in D)D.hasOwnProperty(H)&&(W[H]=D[H])},k(X,Z)};return function(X,Z){function W(){this.constructor=X}k(X,Z),X.prototype=Z===null?Object.create(Z):(W.prototype=Z.prototype,new W)}}(),p=i.charts,m=i.doc,v=i.noop,x=i.win,y=a.addEvent,_=a.css,w=a.objectEach,C=a.pick,E=a.removeEvent,T={},A=!!x.PointerEvent;return function(k){function X(){return k!==null&&k.apply(this,arguments)||this}return u(X,k),X.isRequired=function(){return!(i.hasTouch||!x.PointerEvent&&!x.MSPointerEvent)},X.prototype.batchMSEvents=function(Z){Z(this.chart.container,A?"pointerdown":"MSPointerDown",this.onContainerPointerDown),Z(this.chart.container,A?"pointermove":"MSPointerMove",this.onContainerPointerMove),Z(m,A?"pointerup":"MSPointerUp",this.onDocumentPointerUp)},X.prototype.destroy=function(){this.batchMSEvents(E),k.prototype.destroy.call(this)},X.prototype.init=function(Z,W){k.prototype.init.call(this,Z,W),this.hasZoom&&_(Z.container,{"-ms-touch-action":"none","touch-action":"none"})},X.prototype.onContainerPointerDown=function(Z){l(Z,"onContainerTouchStart","touchstart",function(W){T[W.pointerId]={pageX:W.pageX,pageY:W.pageY,target:W.currentTarget}})},X.prototype.onContainerPointerMove=function(Z){l(Z,"onContainerTouchMove","touchmove",function(W){T[W.pointerId]={pageX:W.pageX,pageY:W.pageY},T[W.pointerId].target||(T[W.pointerId].target=W.currentTarget)})},X.prototype.onDocumentPointerUp=function(Z){l(Z,"onDocumentTouchEnd","touchend",function(W){delete T[W.pointerId]})},X.prototype.setDOMEvents=function(){var Z=this.chart.tooltip;k.prototype.setDOMEvents.call(this),(this.hasZoom||C(Z&&Z.options.followTouchMove,!0))&&this.batchMSEvents(y)},X}(o)}),r(n,"Core/Legend/Legend.js",[n["Core/Animation/AnimationUtilities.js"],n["Core/FormatUtilities.js"],n["Core/Globals.js"],n["Core/Series/Point.js"],n["Core/Renderer/RendererUtilities.js"],n["Core/Utilities.js"]],function(i,o,a,s,l,u){var p=i.animObject,m=i.setAnimation,v=o.format,x=a.marginNames,y=l.distribute,_=u.addEvent,w=u.createElement,C=u.css,E=u.defined,T=u.discardElement,A=u.find,k=u.fireEvent,X=u.isNumber,Z=u.merge,W=u.pick,D=u.relativeLength,H=u.stableSort,N=u.syncTimeout;return i=function(){function j($,z){this.allItems=[],this.contentGroup=this.box=void 0,this.display=!1,this.group=void 0,this.offsetWidth=this.maxLegendWidth=this.maxItemWidth=this.legendWidth=this.legendHeight=this.lastLineHeight=this.lastItemY=this.itemY=this.itemX=this.itemMarginTop=this.itemMarginBottom=this.itemHeight=this.initialItemY=0,this.options=void 0,this.padding=0,this.pages=[],this.proximate=!1,this.scrollGroup=void 0,this.widthOption=this.totalItemWidth=this.titleHeight=this.symbolWidth=this.symbolHeight=0,this.chart=$,this.init($,z)}return j.prototype.init=function($,z){this.chart=$,this.setOptions(z),z.enabled&&(this.render(),_(this.chart,"endResize",function(){this.legend.positionCheckboxes()}),this.proximate?this.unchartrender=_(this.chart,"render",function(){this.legend.proximatePositions(),this.legend.positionItems()}):this.unchartrender&&this.unchartrender())},j.prototype.setOptions=function($){var z=W($.padding,8);this.options=$,this.chart.styledMode||(this.itemStyle=$.itemStyle,this.itemHiddenStyle=Z(this.itemStyle,$.itemHiddenStyle)),this.itemMarginTop=$.itemMarginTop||0,this.itemMarginBottom=$.itemMarginBottom||0,this.padding=z,this.initialItemY=z-5,this.symbolWidth=W($.symbolWidth,16),this.pages=[],this.proximate=$.layout==="proximate"&&!this.chart.inverted,this.baseline=void 0},j.prototype.update=function($,z){var O=this.chart;this.setOptions(Z(!0,this.options,$)),this.destroy(),O.isDirtyLegend=O.isDirtyBox=!0,W(z,!0)&&O.redraw(),k(this,"afterUpdate")},j.prototype.colorizeItem=function($,z){var O=$.legendItem||{},F=O.group,G=O.label,q=O.line;if(O=O.symbol,F&&F[z?"removeClass":"addClass"]("highcharts-legend-item-hidden"),!this.chart.styledMode){var ee=this.options;F=this.itemHiddenStyle.color,ee=z?ee.itemStyle.color:F;var re=z&&$.color||F,ce=$.options&&$.options.marker,fe={fill:re};G&&G.css({fill:ee,color:ee}),q&&q.attr({stroke:re}),O&&(ce&&O.isMarker&&(fe=$.pointAttribs(),z||(fe.stroke=fe.fill=F)),O.attr(fe))}k(this,"afterColorizeItem",{item:$,visible:z})},j.prototype.positionItems=function(){this.allItems.forEach(this.positionItem,this),this.chart.isResizing||this.positionCheckboxes()},j.prototype.positionItem=function($){var z=this,O=$.legendItem||{},F=O.group,G=O.x;G=G===void 0?0:G,O=O.y,O=O===void 0?0:O;var q=this.options,ee=q.symbolPadding,re=!q.rtl;q=$.checkbox,F&&F.element&&(ee={translateX:re?G:this.legendWidth-G-2*ee-4,translateY:O},F[E(F.translateY)?"animate":"attr"](ee,void 0,function(){k(z,"afterPositionItem",{item:$})})),q&&(q.x=G,q.y=O)},j.prototype.destroyItem=function($){for(var z=$.checkbox,O=$.legendItem||{},F=0,G=["group","label","line","symbol"];F<G.length;F++){var q=G[F];O[q]&&(O[q]=O[q].destroy())}z&&T(z),$.legendItem=void 0},j.prototype.destroy=function(){for(var $=0,z=this.getAllItems();$<z.length;$++)this.destroyItem(z[$]);for($=0,z="clipRect up down pager nav box title group".split(" ");$<z.length;$++){var O=z[$];this[O]&&(this[O]=this[O].destroy())}this.display=null},j.prototype.positionCheckboxes=function(){var $=this.group&&this.group.alignAttr,z=this.clipHeight||this.legendHeight,O=this.titleHeight;if($){var F=$.translateY;this.allItems.forEach(function(G){var q=G.checkbox;if(q){var ee=F+O+q.y+(this.scrollOffset||0)+3;C(q,{left:$.translateX+G.checkboxOffset+q.x-20+"px",top:ee+"px",display:this.proximate||ee>F-6&&ee<F+z-6?"":"none"})}},this)}},j.prototype.renderTitle=function(){var $=this.options,z=this.padding,O=$.title,F=0;O.text&&(this.title||(this.title=this.chart.renderer.label(O.text,z-3,z-4,void 0,void 0,void 0,$.useHTML,void 0,"legend-title").attr({zIndex:1}),this.chart.styledMode||this.title.css(O.style),this.title.add(this.group)),O.width||this.title.css({width:this.maxLegendWidth+"px"}),$=this.title.getBBox(),F=$.height,this.offsetWidth=$.width,this.contentGroup.attr({translateY:F})),this.titleHeight=F},j.prototype.setText=function($){var z=this.options;$.legendItem.label.attr({text:z.labelFormat?v(z.labelFormat,$,this.chart):z.labelFormatter.call($)})},j.prototype.renderItem=function($){var z=$.legendItem=$.legendItem||{},O=this.chart,F=O.renderer,G=this.options,q=this.symbolWidth,ee=G.symbolPadding||0,re=this.itemStyle,ce=this.itemHiddenStyle,fe=G.layout==="horizontal"?W(G.itemDistance,20):0,J=!G.rtl,oe=!$.series,ve=!oe&&$.series.drawLegendSymbol?$.series:$,ye=ve.options,xe=this.createCheckboxForItem&&ye&&ye.showCheckbox,se=G.useHTML,me=$.options.className,pe=z.label;ye=q+ee+fe+(xe?20:0),pe||(z.group=F.g("legend-item").addClass("highcharts-"+ve.type+"-series highcharts-color-"+$.colorIndex+(me?" "+me:"")+(oe?" highcharts-series-"+$.index:"")).attr({zIndex:1}).add(this.scrollGroup),z.label=pe=F.text("",J?q+ee:-ee,this.baseline||0,se),O.styledMode||pe.css(Z($.visible?re:ce)),pe.attr({align:J?"left":"right",zIndex:2}).add(z.group),this.baseline||(this.fontMetrics=F.fontMetrics(O.styledMode?12:re.fontSize,pe),this.baseline=this.fontMetrics.f+3+this.itemMarginTop,pe.attr("y",this.baseline),this.symbolHeight=G.symbolHeight||this.fontMetrics.f,G.squareSymbol&&(this.symbolWidth=W(G.symbolWidth,Math.max(this.symbolHeight,16)),ye=this.symbolWidth+ee+fe+(xe?20:0),J&&pe.attr("x",this.symbolWidth+ee))),ve.drawLegendSymbol(this,$),this.setItemEvents&&this.setItemEvents($,pe,se)),xe&&!$.checkbox&&this.createCheckboxForItem&&this.createCheckboxForItem($),this.colorizeItem($,$.visible),!O.styledMode&&re.width||pe.css({width:(G.itemWidth||this.widthOption||O.spacingBox.width)-ye+"px"}),this.setText($),O=pe.getBBox(),F=this.fontMetrics&&this.fontMetrics.h||0,$.itemWidth=$.checkboxOffset=G.itemWidth||z.labelWidth||O.width+ye,this.maxItemWidth=Math.max(this.maxItemWidth,$.itemWidth),this.totalItemWidth+=$.itemWidth,this.itemHeight=$.itemHeight=Math.round(z.labelHeight||(O.height>1.5*F?O.height:F))},j.prototype.layoutItem=function($){var z=this.options,O=this.padding,F=z.layout==="horizontal",G=$.itemHeight,q=this.itemMarginBottom,ee=this.itemMarginTop,re=F?W(z.itemDistance,20):0,ce=this.maxLegendWidth;z=z.alignColumns&&this.totalItemWidth>ce?this.maxItemWidth:$.itemWidth;var fe=$.legendItem||{};F&&this.itemX-O+z>ce&&(this.itemX=O,this.lastLineHeight&&(this.itemY+=ee+this.lastLineHeight+q),this.lastLineHeight=0),this.lastItemY=ee+this.itemY+q,this.lastLineHeight=Math.max(G,this.lastLineHeight),fe.x=this.itemX,fe.y=this.itemY,F?this.itemX+=z:(this.itemY+=ee+G+q,this.lastLineHeight=G),this.offsetWidth=this.widthOption||Math.max((F?this.itemX-O-($.checkbox?0:re):z)+O,this.offsetWidth)},j.prototype.getAllItems=function(){var $=[];return this.chart.series.forEach(function(z){var O=z&&z.options;z&&W(O.showInLegend,E(O.linkedTo)?!1:void 0,!0)&&($=$.concat((z.legendItem||{}).labels||(O.legendType==="point"?z.data:z)))}),k(this,"afterGetAllItems",{allItems:$}),$},j.prototype.getAlignment=function(){var $=this.options;return this.proximate?$.align.charAt(0)+"tv":$.floating?"":$.align.charAt(0)+$.verticalAlign.charAt(0)+$.layout.charAt(0)},j.prototype.adjustMargins=function($,z){var O=this.chart,F=this.options,G=this.getAlignment();G&&[/(lth|ct|rth)/,/(rtv|rm|rbv)/,/(rbh|cb|lbh)/,/(lbv|lm|ltv)/].forEach(function(q,ee){q.test(G)&&!E($[ee])&&(O[x[ee]]=Math.max(O[x[ee]],O.legend[(ee+1)%2?"legendHeight":"legendWidth"]+[1,-1,-1,1][ee]*F[ee%2?"x":"y"]+W(F.margin,12)+z[ee]+(O.titleOffset[ee]||0)))})},j.prototype.proximatePositions=function(){var $=this.chart,z=[],O=this.options.align==="left";this.allItems.forEach(function(re){var ce,fe=O;if(re.yAxis){re.xAxis.options.reversed&&(fe=!fe),re.points&&(ce=A(fe?re.points:re.points.slice(0).reverse(),function(oe){return X(oe.plotY)})),fe=this.itemMarginTop+re.legendItem.label.getBBox().height+this.itemMarginBottom;var J=re.yAxis.top-$.plotTop;re.visible?(ce=ce?ce.plotY:re.yAxis.height,ce+=J-.3*fe):ce=J+re.yAxis.height,z.push({target:ce,size:fe,item:re})}},this);for(var F,G=0,q=y(z,$.plotHeight);G<q.length;G++){var ee=q[G];F=ee.item.legendItem||{},X(ee.pos)&&(F.y=$.plotTop-$.spacing[0]+ee.pos)}},j.prototype.render=function(){var $=this.chart,z=$.renderer,O=this.options,F=this.padding,G=this.getAllItems(),q=this.group,ee=this.box;this.itemX=F,this.itemY=this.initialItemY,this.lastItemY=this.offsetWidth=0,this.widthOption=D(O.width,$.spacingBox.width-F);var re=$.spacingBox.width-2*F-O.x;-1<["rm","lm"].indexOf(this.getAlignment().substring(0,2))&&(re/=2),this.maxLegendWidth=this.widthOption||re,q||(this.group=q=z.g("legend").addClass(O.className||"").attr({zIndex:7}).add(),this.contentGroup=z.g().attr({zIndex:1}).add(q),this.scrollGroup=z.g().add(this.contentGroup)),this.renderTitle(),H(G,function(fe,J){return(fe.options&&fe.options.legendIndex||0)-(J.options&&J.options.legendIndex||0)}),O.reversed&&G.reverse(),this.allItems=G,this.display=re=!!G.length,this.itemHeight=this.totalItemWidth=this.maxItemWidth=this.lastLineHeight=0,G.forEach(this.renderItem,this),G.forEach(this.layoutItem,this),G=(this.widthOption||this.offsetWidth)+F;var ce=this.lastItemY+this.lastLineHeight+this.titleHeight;ce=this.handleOverflow(ce),ce+=F,ee||(this.box=ee=z.rect().addClass("highcharts-legend-box").attr({r:O.borderRadius}).add(q)),$.styledMode||ee.attr({stroke:O.borderColor,"stroke-width":O.borderWidth||0,fill:O.backgroundColor||"none"}).shadow(O.shadow),0<G&&0<ce&&ee[ee.placed?"animate":"attr"](ee.crisp.call({},{x:0,y:0,width:G,height:ce},ee.strokeWidth())),q[re?"show":"hide"](),$.styledMode&&q.getStyle("display")==="none"&&(G=ce=0),this.legendWidth=G,this.legendHeight=ce,re&&this.align(),this.proximate||this.positionItems(),k(this,"afterRender")},j.prototype.align=function($){$===void 0&&($=this.chart.spacingBox);var z=this.chart,O=this.options,F=$.y;/(lth|ct|rth)/.test(this.getAlignment())&&0<z.titleOffset[0]?F+=z.titleOffset[0]:/(lbh|cb|rbh)/.test(this.getAlignment())&&0<z.titleOffset[2]&&(F-=z.titleOffset[2]),F!==$.y&&($=Z($,{y:F})),z.hasRendered||(this.group.placed=!1),this.group.align(Z(O,{width:this.legendWidth,height:this.legendHeight,verticalAlign:this.proximate?"top":O.verticalAlign}),!0,$)},j.prototype.handleOverflow=function($){var z=this,O=this.chart,F=O.renderer,G=this.options,q=G.y,ee=G.verticalAlign==="top",re=this.padding,ce=G.maxHeight,fe=G.navigation,J=W(fe.animation,!0),oe=fe.arrowSize||12,ve=this.pages,ye=this.allItems,xe=function(ke){typeof ke=="number"?Re.attr({height:ke}):Re&&(z.clipRect=Re.destroy(),z.contentGroup.clip()),z.contentGroup.div&&(z.contentGroup.div.style.clip=ke?"rect("+re+"px,9999px,"+(re+ke)+"px,0)":"auto")},se=function(ke){return z[ke]=F.circle(0,0,1.3*oe).translate(oe/2,oe/2).add(Pe),O.styledMode||z[ke].attr("fill","rgba(0,0,0,0.0001)"),z[ke]},me,pe,Ce;q=O.spacingBox.height+(ee?-q:q)-re;var Pe=this.nav,Re=this.clipRect;return G.layout!=="horizontal"||G.verticalAlign==="middle"||G.floating||(q/=2),ce&&(q=Math.min(q,ce)),ve.length=0,$&&0<q&&$>q&&fe.enabled!==!1?(this.clipHeight=me=Math.max(q-20-this.titleHeight-re,0),this.currentPage=W(this.currentPage,1),this.fullHeight=$,ye.forEach(function(ke,ze){Ce=ke.legendItem||{},ke=Ce.y||0;var Ge=Math.round(Ce.label.getBBox().height),ht=ve.length;(!ht||ke-ve[ht-1]>me&&(pe||ke)!==ve[ht-1])&&(ve.push(pe||ke),ht++),Ce.pageIx=ht-1,pe&&((ye[ze-1].legendItem||{}).pageIx=ht-1),ze===ye.length-1&&ke+Ge-ve[ht-1]>me&&Ge<=me&&(ve.push(ke),Ce.pageIx=ht),ke!==pe&&(pe=ke)}),Re||(Re=z.clipRect=F.clipRect(0,re,9999,0),z.contentGroup.clip(Re)),xe(me),Pe||(this.nav=Pe=F.g().attr({zIndex:1}).add(this.group),this.up=F.symbol("triangle",0,0,oe,oe).add(Pe),se("upTracker").on("click",function(){z.scroll(-1,J)}),this.pager=F.text("",15,10).addClass("highcharts-legend-navigation"),!O.styledMode&&fe.style&&this.pager.css(fe.style),this.pager.add(Pe),this.down=F.symbol("triangle-down",0,0,oe,oe).add(Pe),se("downTracker").on("click",function(){z.scroll(1,J)})),z.scroll(0),$=q):Pe&&(xe(),this.nav=Pe.destroy(),this.scrollGroup.attr({translateY:1}),this.clipHeight=0),$},j.prototype.scroll=function($,z){var O=this,F=this.chart,G=this.pages,q=G.length,ee=this.clipHeight,re=this.options.navigation,ce=this.pager,fe=this.padding,J=this.currentPage+$;J>q&&(J=q),0<J&&(typeof z!="undefined"&&m(z,F),this.nav.attr({translateX:fe,translateY:ee+this.padding+7+this.titleHeight,visibility:"inherit"}),[this.up,this.upTracker].forEach(function(oe){oe.attr({class:J===1?"highcharts-legend-nav-inactive":"highcharts-legend-nav-active"})}),ce.attr({text:J+"/"+q}),[this.down,this.downTracker].forEach(function(oe){oe.attr({x:18+this.pager.getBBox().width,class:J===q?"highcharts-legend-nav-inactive":"highcharts-legend-nav-active"})},this),F.styledMode||(this.up.attr({fill:J===1?re.inactiveColor:re.activeColor}),this.upTracker.css({cursor:J===1?"default":"pointer"}),this.down.attr({fill:J===q?re.inactiveColor:re.activeColor}),this.downTracker.css({cursor:J===q?"default":"pointer"})),this.scrollOffset=-G[J-1]+this.initialItemY,this.scrollGroup.animate({translateY:this.scrollOffset}),this.currentPage=J,this.positionCheckboxes(),$=p(W(z,F.renderer.globalAnimation,!0)),N(function(){k(O,"afterScroll",{currentPage:J})},$.duration))},j.prototype.setItemEvents=function($,z,O){var F=this,G=$.legendItem||{},q=F.chart.renderer.boxWrapper,ee=$ instanceof s,re="highcharts-legend-"+(ee?"point":"series")+"-active",ce=F.chart.styledMode,fe=function(oe){F.allItems.forEach(function(ve){$!==ve&&[ve].concat(ve.linkedSeries||[]).forEach(function(ye){ye.setState(oe,!ee)})})},J=0;for(O=O?[z,G.symbol]:[G.group];J<O.length;J++)(G=O[J])&&G.on("mouseover",function(){$.visible&&fe("inactive"),$.setState("hover"),$.visible&&q.addClass(re),ce||z.css(F.options.itemHoverStyle)}).on("mouseout",function(){F.chart.styledMode||z.css(Z($.visible?F.itemStyle:F.itemHiddenStyle)),fe(""),q.removeClass(re),$.setState()}).on("click",function(oe){var ve=function(){$.setVisible&&$.setVisible(),fe($.visible?"inactive":"")};q.removeClass(re),oe={browserEvent:oe},$.firePointEvent?$.firePointEvent("legendItemClick",oe,ve):k($,"legendItemClick",oe,ve)})},j.prototype.createCheckboxForItem=function($){$.checkbox=w("input",{type:"checkbox",className:"highcharts-legend-checkbox",checked:$.selected,defaultChecked:$.selected},this.options.itemCheckboxStyle,this.chart.container),_($.checkbox,"click",function(z){k($.series||$,"checkboxClick",{checked:z.target.checked,item:$},function(){$.select()})})},j}(),i}),r(n,"Core/Series/SeriesRegistry.js",[n["Core/Globals.js"],n["Core/Defaults.js"],n["Core/Series/Point.js"],n["Core/Utilities.js"]],function(i,o,a,s){var l=o.defaultOptions,u=s.extendClass,p=s.merge,m;return function(v){function x(y,_){var w=l.plotOptions||{},C=_.defaultOptions,E=_.prototype;E.type=y,E.pointClass||(E.pointClass=a),C&&(w[y]=C),v.seriesTypes[y]=_}v.seriesTypes=i.seriesTypes,v.registerSeriesType=x,v.seriesType=function(y,_,w,C,E){var T=l.plotOptions||{};return _=_||"",T[y]=p(T[_],w),x(y,u(v.seriesTypes[_]||function(){},C)),v.seriesTypes[y].prototype.type=y,E&&(v.seriesTypes[y].prototype.pointClass=u(a,E)),v.seriesTypes[y]}}(m||(m={})),m}),r(n,"Core/Chart/Chart.js",[n["Core/Animation/AnimationUtilities.js"],n["Core/Axis/Axis.js"],n["Core/Defaults.js"],n["Core/FormatUtilities.js"],n["Core/Foundation.js"],n["Core/Globals.js"],n["Core/Legend/Legend.js"],n["Core/MSPointer.js"],n["Core/Pointer.js"],n["Core/Renderer/RendererRegistry.js"],n["Core/Series/SeriesRegistry.js"],n["Core/Renderer/SVG/SVGRenderer.js"],n["Core/Time.js"],n["Core/Utilities.js"],n["Core/Renderer/HTML/AST.js"]],function(i,o,a,s,l,u,p,m,v,x,y,_,w,C,E){var T=i.animate,A=i.animObject,k=i.setAnimation,X=a.defaultOptions,Z=a.defaultTime,W=s.numberFormat,D=l.registerEventOptions,H=u.charts,N=u.doc,j=u.marginNames,$=u.svg,z=u.win,O=y.seriesTypes,F=C.addEvent,G=C.attr,q=C.cleanRecursively,ee=C.createElement,re=C.css,ce=C.defined,fe=C.discardElement,J=C.erase,oe=C.error,ve=C.extend,ye=C.find,xe=C.fireEvent,se=C.getStyle,me=C.isArray,pe=C.isNumber,Ce=C.isObject,Pe=C.isString,Re=C.merge,ke=C.objectEach,ze=C.pick,Ge=C.pInt,ht=C.relativeLength,Tt=C.removeEvent,xt=C.splat,pt=C.syncTimeout,It=C.uniqueKey;return i=function(){function Ie(de,Te,Be){this.series=this.renderTo=this.renderer=this.pointer=this.pointCount=this.plotWidth=this.plotTop=this.plotLeft=this.plotHeight=this.plotBox=this.options=this.numberFormatter=this.margin=this.legend=this.labelCollectors=this.isResizing=this.index=this.eventOptions=this.container=this.colorCounter=this.clipBox=this.chartWidth=this.chartHeight=this.bounds=this.axisOffset=this.axes=void 0,this.sharedClips={},this.yAxis=this.xAxis=this.userOptions=this.titleOffset=this.time=this.symbolCounter=this.spacingBox=this.spacing=void 0,this.getArgs(de,Te,Be)}return Ie.chart=function(de,Te,Be){return new Ie(de,Te,Be)},Ie.prototype.getArgs=function(de,Te,Be){Pe(de)||de.nodeName?(this.renderTo=de,this.init(Te,Be)):this.init(de,Te)},Ie.prototype.init=function(de,Te){var Be=de.plotOptions||{};xe(this,"init",{args:arguments},function(){var Ke=Re(X,de),ot=Ke.chart;ke(Ke.plotOptions,function(Je,St){Ce(Je)&&(Je.tooltip=Be[St]&&Re(Be[St].tooltip)||void 0)}),Ke.tooltip.userOptions=de.chart&&de.chart.forExport&&de.tooltip.userOptions||de.tooltip,this.userOptions=de,this.margin=[],this.spacing=[],this.bounds={h:{},v:{}},this.labelCollectors=[],this.callback=Te,this.isResizing=0;var Ze=ot.zooming=ot.zooming||{};de.chart&&!de.chart.zooming&&(Ze.resetButton=ot.resetZoomButton),Ze.key=ze(Ze.key,ot.zoomKey),Ze.pinchType=ze(Ze.pinchType,ot.pinchType),Ze.singleTouch=ze(Ze.singleTouch,ot.zoomBySingleTouch),Ze.type=ze(Ze.type,ot.zoomType),this.options=Ke,this.axes=[],this.series=[],this.time=de.time&&Object.keys(de.time).length?new w(de.time):u.time,this.numberFormatter=ot.numberFormatter||W,this.styledMode=ot.styledMode,this.hasCartesianSeries=ot.showAxes,this.index=H.length,H.push(this),u.chartCount++,D(this,ot),this.xAxis=[],this.yAxis=[],this.pointCount=this.colorCounter=this.symbolCounter=0,xe(this,"afterInit"),this.firstRender()})},Ie.prototype.initSeries=function(de){var Te=this.options.chart;Te=de.type||Te.type||Te.defaultSeriesType;var Be=O[Te];return Be||oe(17,!0,this,{missingModuleFor:Te}),Te=new Be,typeof Te.init=="function"&&Te.init(this,de),Te},Ie.prototype.setSeriesData=function(){this.getSeriesOrderByLinks().forEach(function(de){de.points||de.data||!de.enabledDataSorting||de.setData(de.options.data,!1)})},Ie.prototype.getSeriesOrderByLinks=function(){return this.series.concat().sort(function(de,Te){return de.linkedSeries.length||Te.linkedSeries.length?Te.linkedSeries.length-de.linkedSeries.length:0})},Ie.prototype.orderSeries=function(de){var Te=this.series;de=de||0;for(var Be=Te.length;de<Be;++de)Te[de]&&(Te[de].index=de,Te[de].name=Te[de].getName())},Ie.prototype.isInsidePlot=function(de,Te,Be){Be===void 0&&(Be={});var Ke=this.inverted,ot=this.plotBox,Ze=this.plotLeft,Je=this.plotTop,St=this.scrollablePlotBox,er=0,Ft=0;Be.visiblePlotOnly&&this.scrollingContainer&&(Ft=this.scrollingContainer,er=Ft.scrollLeft,Ft=Ft.scrollTop);var Ut=Be.series;if(ot=Be.visiblePlotOnly&&St||ot,St=Be.inverted?Te:de,Te=Be.inverted?de:Te,de={x:St,y:Te,isInsidePlot:!0,options:Be},!Be.ignoreX){var Er=Ut&&(Ke&&!this.polar?Ut.yAxis:Ut.xAxis)||{pos:Ze,len:1/0};St=Be.paneCoordinates?Er.pos+St:Ze+St,St>=Math.max(er+Ze,Er.pos)&&St<=Math.min(er+Ze+ot.width,Er.pos+Er.len)||(de.isInsidePlot=!1)}return!Be.ignoreY&&de.isInsidePlot&&(Ke=Be.axis&&!Be.axis.isXAxis&&Be.axis||Ut&&(Ke?Ut.xAxis:Ut.yAxis)||{pos:Je,len:1/0},Be=Be.paneCoordinates?Ke.pos+Te:Je+Te,Be>=Math.max(Ft+Je,Ke.pos)&&Be<=Math.min(Ft+Je+ot.height,Ke.pos+Ke.len)||(de.isInsidePlot=!1)),xe(this,"afterIsInsidePlot",de),de.isInsidePlot},Ie.prototype.redraw=function(de){xe(this,"beforeRedraw");var Te=this.hasCartesianSeries?this.axes:this.colorAxis||[],Be=this.series,Ke=this.pointer,ot=this.legend,Ze=this.userOptions.legend,Je=this.renderer,St=Je.isHidden(),er=[],Ft=this.isDirtyBox,Ut=this.isDirtyLegend;for(this.setResponsive&&this.setResponsive(!1),k(this.hasRendered?de:!1,this),St&&this.temporaryDisplay(),this.layOutTitles(),de=Be.length;de--;){var Er=Be[de];if(Er.options.stacking||Er.options.centerInCategory){var kr=!0;if(Er.isDirty){var mr=!0;break}}}if(mr)for(de=Be.length;de--;)Er=Be[de],Er.options.stacking&&(Er.isDirty=!0);Be.forEach(function(Dt){Dt.isDirty&&(Dt.options.legendType==="point"?(typeof Dt.updateTotals=="function"&&Dt.updateTotals(),Ut=!0):Ze&&(Ze.labelFormatter||Ze.labelFormat)&&(Ut=!0)),Dt.isDirtyData&&xe(Dt,"updatedData")}),Ut&&ot&&ot.options.enabled&&(ot.render(),this.isDirtyLegend=!1),kr&&this.getStacks(),Te.forEach(function(Dt){Dt.updateNames(),Dt.setScale()}),this.getMargins(),Te.forEach(function(Dt){Dt.isDirty&&(Ft=!0)}),Te.forEach(function(Dt){var Jr=Dt.min+","+Dt.max;Dt.extKey!==Jr&&(Dt.extKey=Jr,er.push(function(){xe(Dt,"afterSetExtremes",ve(Dt.eventArgs,Dt.getExtremes())),delete Dt.eventArgs})),(Ft||kr)&&Dt.redraw()}),Ft&&this.drawChartBox(),xe(this,"predraw"),Be.forEach(function(Dt){(Ft||Dt.isDirty)&&Dt.visible&&Dt.redraw(),Dt.isDirtyData=!1}),Ke&&Ke.reset(!0),Je.draw(),xe(this,"redraw"),xe(this,"render"),St&&this.temporaryDisplay(!0),er.forEach(function(Dt){Dt.call()})},Ie.prototype.get=function(de){function Te(Ze){return Ze.id===de||Ze.options&&Ze.options.id===de}for(var Be=this.series,Ke=ye(this.axes,Te)||ye(this.series,Te),ot=0;!Ke&&ot<Be.length;ot++)Ke=ye(Be[ot].points||[],Te);return Ke},Ie.prototype.getAxes=function(){var de=this,Te=this.options,Be=Te.xAxis=xt(Te.xAxis||{});Te=Te.yAxis=xt(Te.yAxis||{}),xe(this,"getAxes"),Be.forEach(function(Ke,ot){Ke.index=ot,Ke.isX=!0}),Te.forEach(function(Ke,ot){Ke.index=ot}),Be.concat(Te).forEach(function(Ke){new o(de,Ke)}),xe(this,"afterGetAxes")},Ie.prototype.getSelectedPoints=function(){return this.series.reduce(function(de,Te){return Te.getPointsCollection().forEach(function(Be){ze(Be.selectedStaging,Be.selected)&&de.push(Be)}),de},[])},Ie.prototype.getSelectedSeries=function(){return this.series.filter(function(de){return de.selected})},Ie.prototype.setTitle=function(de,Te,Be){this.applyDescription("title",de),this.applyDescription("subtitle",Te),this.applyDescription("caption",void 0),this.layOutTitles(Be)},Ie.prototype.applyDescription=function(de,Te){var Be=this,Ke=de==="title"?{color:"#333333",fontSize:this.options.isStock?"16px":"18px"}:{color:"#666666"};Ke=this.options[de]=Re(!this.styledMode&&{style:Ke},this.options[de],Te);var ot=this[de];ot&&Te&&(this[de]=ot=ot.destroy()),Ke&&!ot&&(ot=this.renderer.text(Ke.text,0,0,Ke.useHTML).attr({align:Ke.align,class:"highcharts-"+de,zIndex:Ke.zIndex||4}).add(),ot.update=function(Ze){Be[{title:"setTitle",subtitle:"setSubtitle",caption:"setCaption"}[de]](Ze)},this.styledMode||ot.css(Ke.style),this[de]=ot)},Ie.prototype.layOutTitles=function(de){var Te=[0,0,0],Be=this.renderer,Ke=this.spacingBox;["title","subtitle","caption"].forEach(function(Ze){var Je=this[Ze],St=this.options[Ze],er=St.verticalAlign||"top";Ze=Ze==="title"?er==="top"?-3:0:er==="top"?Te[0]+2:0;var Ft;if(Je){this.styledMode||(Ft=St.style&&St.style.fontSize),Ft=Be.fontMetrics(Ft,Je).b,Je.css({width:(St.width||Ke.width+(St.widthAdjust||0))+"px"});var Ut=Math.round(Je.getBBox(St.useHTML).height);Je.align(ve({y:er==="bottom"?Ft:Ze+Ft,height:Ut},St),!1,"spacingBox"),St.floating||(er==="top"?Te[0]=Math.ceil(Te[0]+Ut):er==="bottom"&&(Te[2]=Math.ceil(Te[2]+Ut)))}},this),Te[0]&&(this.options.title.verticalAlign||"top")==="top"&&(Te[0]+=this.options.title.margin),Te[2]&&this.options.caption.verticalAlign==="bottom"&&(Te[2]+=this.options.caption.margin);var ot=!this.titleOffset||this.titleOffset.join(",")!==Te.join(",");this.titleOffset=Te,xe(this,"afterLayOutTitles"),!this.isDirtyBox&&ot&&(this.isDirtyBox=this.isDirtyLegend=ot,this.hasRendered&&ze(de,!0)&&this.isDirtyBox&&this.redraw())},Ie.prototype.getChartSize=function(){var de=this.options.chart,Te=de.width;de=de.height;var Be=this.renderTo;ce(Te)||(this.containerWidth=se(Be,"width")),ce(de)||(this.containerHeight=se(Be,"height")),this.chartWidth=Math.max(0,Te||this.containerWidth||600),this.chartHeight=Math.max(0,ht(de,this.chartWidth)||(1<this.containerHeight?this.containerHeight:400))},Ie.prototype.temporaryDisplay=function(de){var Te=this.renderTo;if(de)for(;Te&&Te.style;)Te.hcOrigStyle&&(re(Te,Te.hcOrigStyle),delete Te.hcOrigStyle),Te.hcOrigDetached&&(N.body.removeChild(Te),Te.hcOrigDetached=!1),Te=Te.parentNode;else for(;Te&&Te.style&&(N.body.contains(Te)||Te.parentNode||(Te.hcOrigDetached=!0,N.body.appendChild(Te)),(se(Te,"display",!1)==="none"||Te.hcOricDetached)&&(Te.hcOrigStyle={display:Te.style.display,height:Te.style.height,overflow:Te.style.overflow},de={display:"block",overflow:"hidden"},Te!==this.renderTo&&(de.height=0),re(Te,de),Te.offsetWidth||Te.style.setProperty("display","block","important")),Te=Te.parentNode,Te!==N.body););},Ie.prototype.setClassName=function(de){this.container.className="highcharts-container "+(de||"")},Ie.prototype.getContainer=function(){var de=this.options,Te=de.chart,Be=It(),Ke,ot=this.renderTo;ot||(this.renderTo=ot=Te.renderTo),Pe(ot)&&(this.renderTo=ot=N.getElementById(ot)),ot||oe(13,!0,this);var Ze=Ge(G(ot,"data-highcharts-chart"));pe(Ze)&&H[Ze]&&H[Ze].hasRendered&&H[Ze].destroy(),G(ot,"data-highcharts-chart",this.index),ot.innerHTML=E.emptyHTML,Te.skipClone||ot.offsetWidth||this.temporaryDisplay(),this.getChartSize(),Ze=this.chartWidth;var Je=this.chartHeight;if(re(ot,{overflow:"hidden"}),this.styledMode||(Ke=ve({position:"relative",overflow:"hidden",width:Ze+"px",height:Je+"px",textAlign:"left",lineHeight:"normal",zIndex:0,"-webkit-tap-highlight-color":"rgba(0,0,0,0)",userSelect:"none","touch-action":"manipulation",outline:"none"},Te.style||{})),this.container=Be=ee("div",{id:Be},Ke,ot),this._cursor=Be.style.cursor,this.renderer=new(Te.renderer||!$?x.getRendererType(Te.renderer):_)(Be,Ze,Je,void 0,Te.forExport,de.exporting&&de.exporting.allowHTML,this.styledMode),k(void 0,this),this.setClassName(Te.className),this.styledMode)for(var St in de.defs)this.renderer.definition(de.defs[St]);else this.renderer.setStyle(Te.style);this.renderer.chartIndex=this.index,xe(this,"afterGetContainer")},Ie.prototype.getMargins=function(de){var Te=this.spacing,Be=this.margin,Ke=this.titleOffset;this.resetMargins(),Ke[0]&&!ce(Be[0])&&(this.plotTop=Math.max(this.plotTop,Ke[0]+Te[0])),Ke[2]&&!ce(Be[2])&&(this.marginBottom=Math.max(this.marginBottom,Ke[2]+Te[2])),this.legend&&this.legend.display&&this.legend.adjustMargins(Be,Te),xe(this,"getMargins"),de||this.getAxisMargins()},Ie.prototype.getAxisMargins=function(){var de=this,Te=de.axisOffset=[0,0,0,0],Be=de.colorAxis,Ke=de.margin,ot=function(Ze){Ze.forEach(function(Je){Je.visible&&Je.getOffset()})};de.hasCartesianSeries?ot(de.axes):Be&&Be.length&&ot(Be),j.forEach(function(Ze,Je){ce(Ke[Je])||(de[Ze]+=Te[Je])}),de.setChartSize()},Ie.prototype.reflow=function(de){var Te=this,Be=Te.options.chart,Ke=Te.renderTo,ot=ce(Be.width)&&ce(Be.height),Ze=Be.width||se(Ke,"width");Be=Be.height||se(Ke,"height"),Ke=de?de.target:z,delete Te.pointer.chartPosition,!ot&&!Te.isPrinting&&Ze&&Be&&(Ke===z||Ke===N)&&((Ze!==Te.containerWidth||Be!==Te.containerHeight)&&(C.clearTimeout(Te.reflowTimeout),Te.reflowTimeout=pt(function(){Te.container&&Te.setSize(void 0,void 0,!1)},de?100:0)),Te.containerWidth=Ze,Te.containerHeight=Be)},Ie.prototype.setReflow=function(de){var Te=this;de===!1||this.unbindReflow?de===!1&&this.unbindReflow&&(this.unbindReflow=this.unbindReflow()):(this.unbindReflow=F(z,"resize",function(Be){Te.options&&Te.reflow(Be)}),F(this,"destroy",this.unbindReflow))},Ie.prototype.setSize=function(de,Te,Be){var Ke=this,ot=Ke.renderer;Ke.isResizing+=1,k(Be,Ke),Be=ot.globalAnimation,Ke.oldChartHeight=Ke.chartHeight,Ke.oldChartWidth=Ke.chartWidth,typeof de!="undefined"&&(Ke.options.chart.width=de),typeof Te!="undefined"&&(Ke.options.chart.height=Te),Ke.getChartSize(),Ke.styledMode||(Be?T:re)(Ke.container,{width:Ke.chartWidth+"px",height:Ke.chartHeight+"px"},Be),Ke.setChartSize(!0),ot.setSize(Ke.chartWidth,Ke.chartHeight,Be),Ke.axes.forEach(function(Ze){Ze.isDirty=!0,Ze.setScale()}),Ke.isDirtyLegend=!0,Ke.isDirtyBox=!0,Ke.layOutTitles(),Ke.getMargins(),Ke.redraw(Be),Ke.oldChartHeight=null,xe(Ke,"resize"),pt(function(){Ke&&xe(Ke,"endResize",null,function(){--Ke.isResizing})},A(Be).duration)},Ie.prototype.setChartSize=function(de){var Te=this.inverted,Be=this.renderer,Ke=this.chartWidth,ot=this.chartHeight,Ze=this.options.chart,Je=this.spacing,St=this.clipOffset,er,Ft,Ut,Er;this.plotLeft=er=Math.round(this.plotLeft),this.plotTop=Ft=Math.round(this.plotTop),this.plotWidth=Ut=Math.max(0,Math.round(Ke-er-this.marginRight)),this.plotHeight=Er=Math.max(0,Math.round(ot-Ft-this.marginBottom)),this.plotSizeX=Te?Er:Ut,this.plotSizeY=Te?Ut:Er,this.plotBorderWidth=Ze.plotBorderWidth||0,this.spacingBox=Be.spacingBox={x:Je[3],y:Je[0],width:Ke-Je[3]-Je[1],height:ot-Je[0]-Je[2]},this.plotBox=Be.plotBox={x:er,y:Ft,width:Ut,height:Er},Te=2*Math.floor(this.plotBorderWidth/2),Ke=Math.ceil(Math.max(Te,St[3])/2),ot=Math.ceil(Math.max(Te,St[0])/2),this.clipBox={x:Ke,y:ot,width:Math.floor(this.plotSizeX-Math.max(Te,St[1])/2-Ke),height:Math.max(0,Math.floor(this.plotSizeY-Math.max(Te,St[2])/2-ot))},de||(this.axes.forEach(function(kr){kr.setAxisSize(),kr.setAxisTranslation()}),Be.alignElements()),xe(this,"afterSetChartSize",{skipAxes:de})},Ie.prototype.resetMargins=function(){xe(this,"resetMargins");var de=this,Te=de.options.chart;["margin","spacing"].forEach(function(Be){var Ke=Te[Be],ot=Ce(Ke)?Ke:[Ke,Ke,Ke,Ke];["Top","Right","Bottom","Left"].forEach(function(Ze,Je){de[Be][Je]=ze(Te[Be+Ze],ot[Je])})}),j.forEach(function(Be,Ke){de[Be]=ze(de.margin[Ke],de.spacing[Ke])}),de.axisOffset=[0,0,0,0],de.clipOffset=[0,0,0,0]},Ie.prototype.drawChartBox=function(){var de=this.options.chart,Te=this.renderer,Be=this.chartWidth,Ke=this.chartHeight,ot=this.styledMode,Ze=this.plotBGImage,Je=de.backgroundColor,St=de.plotBackgroundColor,er=de.plotBackgroundImage,Ft=this.plotLeft,Ut=this.plotTop,Er=this.plotWidth,kr=this.plotHeight,mr=this.plotBox,Dt=this.clipRect,Jr=this.clipBox,We=this.chartBackground,Oe=this.plotBackground,$e=this.plotBorder,Xe,tt="animate";if(We||(this.chartBackground=We=Te.rect().addClass("highcharts-background").add(),tt="attr"),ot)var _t=Xe=We.strokeWidth();else _t=de.borderWidth||0,Xe=_t+(de.shadow?8:0),Je={fill:Je||"none"},(_t||We["stroke-width"])&&(Je.stroke=de.borderColor,Je["stroke-width"]=_t),We.attr(Je).shadow(de.shadow);We[tt]({x:Xe/2,y:Xe/2,width:Be-Xe-_t%2,height:Ke-Xe-_t%2,r:de.borderRadius}),tt="animate",Oe||(tt="attr",this.plotBackground=Oe=Te.rect().addClass("highcharts-plot-background").add()),Oe[tt](mr),ot||(Oe.attr({fill:St||"none"}).shadow(de.plotShadow),er&&(Ze?(er!==Ze.attr("href")&&Ze.attr("href",er),Ze.animate(mr)):this.plotBGImage=Te.image(er,Ft,Ut,Er,kr).add())),Dt?Dt.animate({width:Jr.width,height:Jr.height}):this.clipRect=Te.clipRect(Jr),tt="animate",$e||(tt="attr",this.plotBorder=$e=Te.rect().addClass("highcharts-plot-border").attr({zIndex:1}).add()),ot||$e.attr({stroke:de.plotBorderColor,"stroke-width":de.plotBorderWidth||0,fill:"none"}),$e[tt]($e.crisp({x:Ft,y:Ut,width:Er,height:kr},-$e.strokeWidth())),this.isDirtyBox=!1,xe(this,"afterDrawChartBox")},Ie.prototype.propFromSeries=function(){var de=this,Te=de.options.chart,Be=de.options.series,Ke,ot,Ze;["inverted","angular","polar"].forEach(function(Je){for(ot=O[Te.type||Te.defaultSeriesType],Ze=Te[Je]||ot&&ot.prototype[Je],Ke=Be&&Be.length;!Ze&&Ke--;)(ot=O[Be[Ke].type])&&ot.prototype[Je]&&(Ze=!0);de[Je]=Ze})},Ie.prototype.linkSeries=function(){var de=this,Te=de.series;Te.forEach(function(Be){Be.linkedSeries.length=0}),Te.forEach(function(Be){var Ke=Be.options.linkedTo;Pe(Ke)&&(Ke=Ke===":previous"?de.series[Be.index-1]:de.get(Ke))&&Ke.linkedParent!==Be&&(Ke.linkedSeries.push(Be),Be.linkedParent=Ke,Ke.enabledDataSorting&&Be.setDataSortingOptions(),Be.visible=ze(Be.options.visible,Ke.options.visible,Be.visible))}),xe(this,"afterLinkSeries")},Ie.prototype.renderSeries=function(){this.series.forEach(function(de){de.translate(),de.render()})},Ie.prototype.renderLabels=function(){var de=this,Te=de.options.labels;Te.items&&Te.items.forEach(function(Be){var Ke=ve(Te.style,Be.style),ot=Ge(Ke.left)+de.plotLeft,Ze=Ge(Ke.top)+de.plotTop+12;delete Ke.left,delete Ke.top,de.renderer.text(Be.html,ot,Ze).attr({zIndex:2}).css(Ke).add()})},Ie.prototype.render=function(){var de=this.axes,Te=this.colorAxis,Be=this.renderer,Ke=this.options,ot=function(Ft){Ft.forEach(function(Ut){Ut.visible&&Ut.render()})},Ze=0;this.setTitle(),this.legend=new p(this,Ke.legend),this.getStacks&&this.getStacks(),this.getMargins(!0),this.setChartSize(),Ke=this.plotWidth,de.some(function(Ft){if(Ft.horiz&&Ft.visible&&Ft.options.labels.enabled&&Ft.series.length)return Ze=21,!0});var Je=this.plotHeight=Math.max(this.plotHeight-Ze,0);de.forEach(function(Ft){Ft.setScale()}),this.getAxisMargins();var St=1.1<Ke/this.plotWidth,er=1.05<Je/this.plotHeight;(St||er)&&(de.forEach(function(Ft){(Ft.horiz&&St||!Ft.horiz&&er)&&Ft.setTickInterval(!0)}),this.getMargins()),this.drawChartBox(),this.hasCartesianSeries?ot(de):Te&&Te.length&&ot(Te),this.seriesGroup||(this.seriesGroup=Be.g("series-group").attr({zIndex:3}).add()),this.renderSeries(),this.renderLabels(),this.addCredits(),this.setResponsive&&this.setResponsive(),this.hasRendered=!0},Ie.prototype.addCredits=function(de){var Te=this,Be=Re(!0,this.options.credits,de);Be.enabled&&!this.credits&&(this.credits=this.renderer.text(Be.text+(this.mapCredits||""),0,0).addClass("highcharts-credits").on("click",function(){Be.href&&(z.location.href=Be.href)}).attr({align:Be.position.align,zIndex:8}),Te.styledMode||this.credits.css(Be.style),this.credits.add().align(Be.position),this.credits.update=function(Ke){Te.credits=Te.credits.destroy(),Te.addCredits(Ke)})},Ie.prototype.destroy=function(){var de=this,Te=de.axes,Be=de.series,Ke=de.container,ot=Ke&&Ke.parentNode,Ze;for(xe(de,"destroy"),de.renderer.forExport?J(H,de):H[de.index]=void 0,u.chartCount--,de.renderTo.removeAttribute("data-highcharts-chart"),Tt(de),Ze=Te.length;Ze--;)Te[Ze]=Te[Ze].destroy();for(this.scroller&&this.scroller.destroy&&this.scroller.destroy(),Ze=Be.length;Ze--;)Be[Ze]=Be[Ze].destroy();"title subtitle chartBackground plotBackground plotBGImage plotBorder seriesGroup clipRect credits pointer rangeSelector legend resetZoomButton tooltip renderer".split(" ").forEach(function(Je){var St=de[Je];St&&St.destroy&&(de[Je]=St.destroy())}),Ke&&(Ke.innerHTML=E.emptyHTML,Tt(Ke),ot&&fe(Ke)),ke(de,function(Je,St){delete de[St]})},Ie.prototype.firstRender=function(){var de=this,Te=de.options;(!de.isReadyToRender||de.isReadyToRender())&&(de.getContainer(),de.resetMargins(),de.setChartSize(),de.propFromSeries(),de.getAxes(),(me(Te.series)?Te.series:[]).forEach(function(Be){de.initSeries(Be)}),de.linkSeries(),de.setSeriesData(),xe(de,"beforeRender"),v&&(m.isRequired()?de.pointer=new m(de,Te):de.pointer=new v(de,Te)),de.render(),de.pointer.getChartPosition(),!de.renderer.imgCount&&!de.hasLoaded&&de.onload(),de.temporaryDisplay(!0))},Ie.prototype.onload=function(){this.callbacks.concat([this.callback]).forEach(function(de){de&&typeof this.index!="undefined"&&de.apply(this,[this])},this),xe(this,"load"),xe(this,"render"),ce(this.index)&&this.setReflow(this.options.chart.reflow),this.warnIfA11yModuleNotLoaded(),this.hasLoaded=!0},Ie.prototype.warnIfA11yModuleNotLoaded=function(){var de=this.options,Te=this.title;de&&!this.accessibility&&(this.renderer.boxWrapper.attr({role:"img","aria-label":(Te&&Te.element.textContent||"").replace(/</g,"<")}),de.accessibility&&de.accessibility.enabled===!1||oe('Highcharts warning: Consider including the "accessibility.js" module to make your chart more usable for people with disabilities. Set the "accessibility.enabled" option to false to remove this warning. See https://www.highcharts.com/docs/accessibility/accessibility-module.',!1,this))},Ie.prototype.addSeries=function(de,Te,Be){var Ke=this,ot;return de&&(Te=ze(Te,!0),xe(Ke,"addSeries",{options:de},function(){ot=Ke.initSeries(de),Ke.isDirtyLegend=!0,Ke.linkSeries(),ot.enabledDataSorting&&ot.setData(de.data,!1),xe(Ke,"afterAddSeries",{series:ot}),Te&&Ke.redraw(Be)})),ot},Ie.prototype.addAxis=function(de,Te,Be,Ke){return this.createAxis(Te?"xAxis":"yAxis",{axis:de,redraw:Be,animation:Ke})},Ie.prototype.addColorAxis=function(de,Te,Be){return this.createAxis("colorAxis",{axis:de,redraw:Te,animation:Be})},Ie.prototype.createAxis=function(de,Te){return de=new o(this,Re(Te.axis,{index:this[de].length,isX:de==="xAxis"})),ze(Te.redraw,!0)&&this.redraw(Te.animation),de},Ie.prototype.showLoading=function(de){var Te=this,Be=Te.options,Ke=Be.loading,ot=function(){Ze&&re(Ze,{left:Te.plotLeft+"px",top:Te.plotTop+"px",width:Te.plotWidth+"px",height:Te.plotHeight+"px"})},Ze=Te.loadingDiv,Je=Te.loadingSpan;Ze||(Te.loadingDiv=Ze=ee("div",{className:"highcharts-loading highcharts-loading-hidden"},null,Te.container)),Je||(Te.loadingSpan=Je=ee("span",{className:"highcharts-loading-inner"},null,Ze),F(Te,"redraw",ot)),Ze.className="highcharts-loading",E.setElementHTML(Je,ze(de,Be.lang.loading,"")),Te.styledMode||(re(Ze,ve(Ke.style,{zIndex:10})),re(Je,Ke.labelStyle),Te.loadingShown||(re(Ze,{opacity:0,display:""}),T(Ze,{opacity:Ke.style.opacity||.5},{duration:Ke.showDuration||0}))),Te.loadingShown=!0,ot()},Ie.prototype.hideLoading=function(){var de=this.options,Te=this.loadingDiv;Te&&(Te.className="highcharts-loading highcharts-loading-hidden",this.styledMode||T(Te,{opacity:0},{duration:de.loading.hideDuration||100,complete:function(){re(Te,{display:"none"})}})),this.loadingShown=!1},Ie.prototype.update=function(de,Te,Be,Ke){var ot=this,Ze={credits:"addCredits",title:"setTitle",subtitle:"setSubtitle",caption:"setCaption"},Je=de.isResponsiveOptions,St=[],er,Ft;xe(ot,"update",{options:de}),Je||ot.setResponsive(!1,!0),de=q(de,ot.options),ot.userOptions=Re(ot.userOptions,de);var Ut=de.chart;if(Ut){if(Re(!0,ot.options.chart,Ut),"className"in Ut&&ot.setClassName(Ut.className),"reflow"in Ut&&ot.setReflow(Ut.reflow),"inverted"in Ut||"polar"in Ut||"type"in Ut){ot.propFromSeries();var Er=!0}"alignTicks"in Ut&&(Er=!0),"events"in Ut&&D(this,Ut),ke(Ut,function(kr,mr){ot.propsRequireUpdateSeries.indexOf("chart."+mr)!==-1&&(er=!0),ot.propsRequireDirtyBox.indexOf(mr)!==-1&&(ot.isDirtyBox=!0),ot.propsRequireReflow.indexOf(mr)!==-1&&(Je?ot.isDirtyBox=!0:Ft=!0)}),!ot.styledMode&&Ut.style&&ot.renderer.setStyle(ot.options.chart.style||{})}!ot.styledMode&&de.colors&&(this.options.colors=de.colors),de.time&&(this.time===Z&&(this.time=new w(de.time)),Re(!0,ot.options.time,de.time)),ke(de,function(kr,mr){ot[mr]&&typeof ot[mr].update=="function"?ot[mr].update(kr,!1):typeof ot[Ze[mr]]=="function"?ot[Ze[mr]](kr):mr!=="colors"&&ot.collectionsWithUpdate.indexOf(mr)===-1&&Re(!0,ot.options[mr],de[mr]),mr!=="chart"&&ot.propsRequireUpdateSeries.indexOf(mr)!==-1&&(er=!0)}),this.collectionsWithUpdate.forEach(function(kr){if(de[kr]){var mr=[];ot[kr].forEach(function(Dt,Jr){Dt.options.isInternal||mr.push(ze(Dt.options.index,Jr))}),xt(de[kr]).forEach(function(Dt,Jr){var We=ce(Dt.id),Oe;We&&(Oe=ot.get(Dt.id)),!Oe&&ot[kr]&&(Oe=ot[kr][mr?mr[Jr]:Jr])&&We&&ce(Oe.options.id)&&(Oe=void 0),Oe&&Oe.coll===kr&&(Oe.update(Dt,!1),Be&&(Oe.touched=!0)),!Oe&&Be&&ot.collectionsWithInit[kr]&&(ot.collectionsWithInit[kr][0].apply(ot,[Dt].concat(ot.collectionsWithInit[kr][1]||[]).concat([!1])).touched=!0)}),Be&&ot[kr].forEach(function(Dt){Dt.touched||Dt.options.isInternal?delete Dt.touched:St.push(Dt)})}}),St.forEach(function(kr){kr.chart&&kr.remove&&kr.remove(!1)}),Er&&ot.axes.forEach(function(kr){kr.update({},!1)}),er&&ot.getSeriesOrderByLinks().forEach(function(kr){kr.chart&&kr.update({},!1)},this),Er=Ut&&Ut.width,Ut=Ut&&(Pe(Ut.height)?ht(Ut.height,Er||ot.chartWidth):Ut.height),Ft||pe(Er)&&Er!==ot.chartWidth||pe(Ut)&&Ut!==ot.chartHeight?ot.setSize(Er,Ut,Ke):ze(Te,!0)&&ot.redraw(Ke),xe(ot,"afterUpdate",{options:de,redraw:Te,animation:Ke})},Ie.prototype.setSubtitle=function(de,Te){this.applyDescription("subtitle",de),this.layOutTitles(Te)},Ie.prototype.setCaption=function(de,Te){this.applyDescription("caption",de),this.layOutTitles(Te)},Ie.prototype.showResetZoom=function(){function de(){Te.zoomOut()}var Te=this,Be=X.lang,Ke=Te.options.chart.zooming.resetButton,ot=Ke.theme,Ze=Ke.relativeTo==="chart"||Ke.relativeTo==="spacingBox"?null:"scrollablePlotBox";xe(this,"beforeShowResetZoom",null,function(){Te.resetZoomButton=Te.renderer.button(Be.resetZoom,null,null,de,ot).attr({align:Ke.position.align,title:Be.resetZoomTitle}).addClass("highcharts-reset-zoom").add().align(Ke.position,!1,Ze)}),xe(this,"afterShowResetZoom")},Ie.prototype.zoomOut=function(){xe(this,"selection",{resetSelection:!0},this.zoom)},Ie.prototype.zoom=function(de){var Te=this,Be=Te.pointer,Ke=!1,ot;!de||de.resetSelection?(Te.axes.forEach(function(Je){ot=Je.zoom()}),Be.initiated=!1):de.xAxis.concat(de.yAxis).forEach(function(Je){var St=Je.axis;(Be[St.isXAxis?"zoomX":"zoomY"]&&ce(Be.mouseDownX)&&ce(Be.mouseDownY)&&Te.isInsidePlot(Be.mouseDownX-Te.plotLeft,Be.mouseDownY-Te.plotTop,{axis:St})||!ce(Te.inverted?Be.mouseDownX:Be.mouseDownY))&&(ot=St.zoom(Je.min,Je.max),St.displayBtn&&(Ke=!0))});var Ze=Te.resetZoomButton;Ke&&!Ze?Te.showResetZoom():!Ke&&Ce(Ze)&&(Te.resetZoomButton=Ze.destroy()),ot&&Te.redraw(ze(Te.options.chart.animation,de&&de.animation,100>Te.pointCount))},Ie.prototype.pan=function(de,Te){var Be=this,Ke=Be.hoverPoints;Te=typeof Te=="object"?Te:{enabled:Te,type:"x"};var ot=Be.options.chart;ot&&ot.panning&&(ot.panning=Te);var Ze=Te.type,Je;xe(this,"pan",{originalEvent:de},function(){Ke&&Ke.forEach(function(Ft){Ft.setState()});var St=Be.xAxis;Ze==="xy"?St=St.concat(Be.yAxis):Ze==="y"&&(St=Be.yAxis);var er={};St.forEach(function(Ft){if(Ft.options.panningEnabled&&!Ft.options.isInternal){var Ut=Ft.horiz,Er=de[Ut?"chartX":"chartY"];Ut=Ut?"mouseDownX":"mouseDownY";var kr=Be[Ut],mr=Ft.minPointOffset||0,Dt=Ft.reversed&&!Be.inverted||!Ft.reversed&&Be.inverted?-1:1,Jr=Ft.getExtremes(),We=Ft.toValue(kr-Er,!0)+mr*Dt,Oe=Ft.toValue(kr+Ft.len-Er,!0)-(mr*Dt||Ft.isXAxis&&Ft.pointRangePadding||0),$e=Oe<We;Dt=Ft.hasVerticalPanning(),kr=$e?Oe:We,We=$e?We:Oe;var Xe=Ft.panningState;!Dt||Ft.isXAxis||Xe&&!Xe.isDirty||Ft.series.forEach(function(tt){var _t=tt.getProcessedData(!0);_t=tt.getExtremes(_t.yData,!0),Xe||(Xe={startMin:Number.MAX_VALUE,startMax:-Number.MAX_VALUE}),pe(_t.dataMin)&&pe(_t.dataMax)&&(Xe.startMin=Math.min(ze(tt.options.threshold,1/0),_t.dataMin,Xe.startMin),Xe.startMax=Math.max(ze(tt.options.threshold,-1/0),_t.dataMax,Xe.startMax))}),Dt=Math.min(ze(Xe&&Xe.startMin,Jr.dataMin),mr?Jr.min:Ft.toValue(Ft.toPixels(Jr.min)-Ft.minPixelPadding)),Oe=Math.max(ze(Xe&&Xe.startMax,Jr.dataMax),mr?Jr.max:Ft.toValue(Ft.toPixels(Jr.max)+Ft.minPixelPadding)),Ft.panningState=Xe,Ft.isOrdinal||(mr=Dt-kr,0<mr&&(We+=mr,kr=Dt),mr=We-Oe,0<mr&&(We=Oe,kr-=mr),Ft.series.length&&kr!==Jr.min&&We!==Jr.max&&kr>=Dt&&We<=Oe&&(Ft.setExtremes(kr,We,!1,!1,{trigger:"pan"}),!Be.resetZoomButton&&kr!==Dt&&We!==Oe&&Ze.match("y")&&(Be.showResetZoom(),Ft.displayBtn=!1),Je=!0),er[Ut]=Er)}}),ke(er,function(Ft,Ut){Be[Ut]=Ft}),Je&&Be.redraw(!1),re(Be.container,{cursor:"move"})})},Ie}(),ve(i.prototype,{callbacks:[],collectionsWithInit:{xAxis:[i.prototype.addAxis,[!0]],yAxis:[i.prototype.addAxis,[!1]],series:[i.prototype.addSeries]},collectionsWithUpdate:["xAxis","yAxis","series"],propsRequireDirtyBox:"backgroundColor borderColor borderWidth borderRadius plotBackgroundColor plotBackgroundImage plotBorderColor plotBorderWidth plotShadow shadow".split(" "),propsRequireReflow:"margin marginTop marginRight marginBottom marginLeft spacing spacingTop spacingRight spacingBottom spacingLeft".split(" "),propsRequireUpdateSeries:"chart.inverted chart.polar chart.ignoreHiddenSeries chart.type colors plotOptions time tooltip".split(" ")}),i}),r(n,"Core/Legend/LegendSymbol.js",[n["Core/Utilities.js"]],function(i){var o=i.extend,a=i.merge,s=i.pick,l;return function(u){u.drawLineMarker=function(p){var m=this.legendItem=this.legendItem||{},v=this.options,x=p.symbolWidth,y=p.symbolHeight,_=y/2,w=this.chart.renderer,C=m.group;p=p.baseline-Math.round(.3*p.fontMetrics.b);var E={},T=v.marker,A=0;this.chart.styledMode||(E={"stroke-width":Math.min(v.lineWidth||0,24)},v.dashStyle?E.dashstyle=v.dashStyle:v.linecap!=="square"&&(E["stroke-linecap"]="round")),m.line=w.path().addClass("highcharts-graph").attr(E).add(C),E["stroke-linecap"]&&(A=Math.min(m.line.strokeWidth(),x)/2),m.line.attr({d:[["M",A,p],["L",x-A,p]]}),T&&T.enabled!==!1&&x&&(v=Math.min(s(T.radius,_),_),this.symbol.indexOf("url")===0&&(T=a(T,{width:y,height:y}),v=0),m.symbol=m=w.symbol(this.symbol,x/2-v,p-v,2*v,2*v,o({context:"legend"},T)).addClass("highcharts-point").add(C),m.isMarker=!0)},u.drawRectangle=function(p,m){m=m.legendItem||{};var v=p.symbolHeight,x=p.options.squareSymbol;m.symbol=this.chart.renderer.rect(x?(p.symbolWidth-v)/2:0,p.baseline-v+1,x?v:p.symbolWidth,v,s(p.options.symbolRadius,v/2)).addClass("highcharts-point").attr({zIndex:3}).add(m.group)}}(l||(l={})),l}),r(n,"Core/Series/SeriesDefaults.js",[],function(){return{lineWidth:2,allowPointSelect:!1,crisp:!0,showCheckbox:!1,animation:{duration:1e3},events:{},marker:{enabledThreshold:2,lineColor:"#ffffff",lineWidth:0,radius:4,states:{normal:{animation:!0},hover:{animation:{duration:50},enabled:!0,radiusPlus:2,lineWidthPlus:1},select:{fillColor:"#cccccc",lineColor:"#000000",lineWidth:2}}},point:{events:{}},dataLabels:{animation:{},align:"center",borderWidth:0,defer:!0,formatter:function(){var i=this.series.chart.numberFormatter;return typeof this.y!="number"?"":i(this.y,-1)},padding:5,style:{fontSize:"11px",fontWeight:"bold",color:"contrast",textOutline:"1px contrast"},verticalAlign:"bottom",x:0,y:0},cropThreshold:300,opacity:1,pointRange:0,softThreshold:!0,states:{normal:{animation:!0},hover:{animation:{duration:50},lineWidthPlus:1,marker:{},halo:{size:10,opacity:.25}},select:{animation:{duration:0}},inactive:{animation:{duration:50},opacity:.2}},stickyTracking:!0,turboThreshold:1e3,findNearestPointBy:"x"}}),r(n,"Core/Series/Series.js",[n["Core/Animation/AnimationUtilities.js"],n["Core/Defaults.js"],n["Core/Foundation.js"],n["Core/Globals.js"],n["Core/Legend/LegendSymbol.js"],n["Core/Series/Point.js"],n["Core/Series/SeriesDefaults.js"],n["Core/Series/SeriesRegistry.js"],n["Core/Renderer/SVG/SVGElement.js"],n["Core/Utilities.js"]],function(i,o,a,s,l,u,p,m,v,x){var y=i.animObject,_=i.setAnimation,w=o.defaultOptions,C=a.registerEventOptions,E=s.hasTouch,T=s.svg,A=s.win,k=m.seriesTypes,X=x.arrayMax,Z=x.arrayMin,W=x.clamp,D=x.cleanRecursively,H=x.correctFloat,N=x.defined,j=x.erase,$=x.error,z=x.extend,O=x.find,F=x.fireEvent,G=x.getNestedProperty,q=x.isArray,ee=x.isNumber,re=x.isString,ce=x.merge,fe=x.objectEach,J=x.pick,oe=x.removeEvent,ve=x.splat,ye=x.syncTimeout;return i=function(){function xe(){this.zones=this.yAxis=this.xAxis=this.userOptions=this.tooltipOptions=this.processedYData=this.processedXData=this.points=this.options=this.linkedSeries=this.index=this.eventsToUnbind=this.eventOptions=this.data=this.chart=this._i=void 0}return xe.prototype.init=function(se,me){F(this,"init",{options:me});var pe=this,Ce=se.series;this.eventsToUnbind=[],pe.chart=se,pe.options=pe.setOptions(me),me=pe.options,pe.linkedSeries=[],pe.bindAxes(),z(pe,{name:me.name,state:"",visible:me.visible!==!1,selected:me.selected===!0}),C(this,me);var Pe=me.events;(Pe&&Pe.click||me.point&&me.point.events&&me.point.events.click||me.allowPointSelect)&&(se.runTrackerClick=!0),pe.getColor(),pe.getSymbol(),pe.parallelArrays.forEach(function(ke){pe[ke+"Data"]||(pe[ke+"Data"]=[])}),pe.isCartesian&&(se.hasCartesianSeries=!0);var Re;Ce.length&&(Re=Ce[Ce.length-1]),pe._i=J(Re&&Re._i,-1)+1,pe.opacity=pe.options.opacity,se.orderSeries(this.insert(Ce)),me.dataSorting&&me.dataSorting.enabled?pe.setDataSortingOptions():pe.points||pe.data||pe.setData(me.data,!1),F(this,"afterInit")},xe.prototype.is=function(se){return k[se]&&this instanceof k[se]},xe.prototype.insert=function(se){var me=this.options.index,pe;if(ee(me)){for(pe=se.length;pe--;)if(me>=J(se[pe].options.index,se[pe]._i)){se.splice(pe+1,0,this);break}pe===-1&&se.unshift(this),pe+=1}else se.push(this);return J(pe,se.length-1)},xe.prototype.bindAxes=function(){var se=this,me=se.options,pe=se.chart,Ce;F(this,"bindAxes",null,function(){(se.axisTypes||[]).forEach(function(Pe){var Re=0;pe[Pe].forEach(function(ke){Ce=ke.options,(me[Pe]===Re&&!Ce.isInternal||typeof me[Pe]!="undefined"&&me[Pe]===Ce.id||typeof me[Pe]=="undefined"&&Ce.index===0)&&(se.insert(ke.series),se[Pe]=ke,ke.isDirty=!0),Ce.isInternal||Re++}),se[Pe]||se.optionalAxis===Pe||$(18,!0,pe)})}),F(this,"afterBindAxes")},xe.prototype.updateParallelArrays=function(se,me){var pe=se.series,Ce=arguments,Pe=ee(me)?function(Re){var ke=Re==="y"&&pe.toYData?pe.toYData(se):se[Re];pe[Re+"Data"][me]=ke}:function(Re){Array.prototype[me].apply(pe[Re+"Data"],Array.prototype.slice.call(Ce,2))};pe.parallelArrays.forEach(Pe)},xe.prototype.hasData=function(){return this.visible&&typeof this.dataMax!="undefined"&&typeof this.dataMin!="undefined"||this.visible&&this.yData&&0<this.yData.length},xe.prototype.autoIncrement=function(se){var me=this.options,pe=me.pointIntervalUnit,Ce=me.relativeXValue,Pe=this.chart.time,Re=this.xIncrement,ke;return Re=J(Re,me.pointStart,0),this.pointInterval=ke=J(this.pointInterval,me.pointInterval,1),Ce&&ee(se)&&(ke*=se),pe&&(me=new Pe.Date(Re),pe==="day"?Pe.set("Date",me,Pe.get("Date",me)+ke):pe==="month"?Pe.set("Month",me,Pe.get("Month",me)+ke):pe==="year"&&Pe.set("FullYear",me,Pe.get("FullYear",me)+ke),ke=me.getTime()-Re),Ce&&ee(se)?Re+ke:(this.xIncrement=Re+ke,Re)},xe.prototype.setDataSortingOptions=function(){var se=this.options;z(this,{requireSorting:!1,sorted:!1,enabledDataSorting:!0,allowDG:!1}),N(se.pointRange)||(se.pointRange=1)},xe.prototype.setOptions=function(se){var me=this.chart,pe=me.options,Ce=pe.plotOptions,Pe=me.userOptions||{};se=ce(se),me=me.styledMode;var Re={plotOptions:Ce,userOptions:se};F(this,"setOptions",Re);var ke=Re.plotOptions[this.type],ze=Pe.plotOptions||{};return this.userOptions=Re.userOptions,Pe=ce(ke,Ce.series,Pe.plotOptions&&Pe.plotOptions[this.type],se),this.tooltipOptions=ce(w.tooltip,w.plotOptions.series&&w.plotOptions.series.tooltip,w.plotOptions[this.type].tooltip,pe.tooltip.userOptions,Ce.series&&Ce.series.tooltip,Ce[this.type].tooltip,se.tooltip),this.stickyTracking=J(se.stickyTracking,ze[this.type]&&ze[this.type].stickyTracking,ze.series&&ze.series.stickyTracking,this.tooltipOptions.shared&&!this.noSharedTooltip?!0:Pe.stickyTracking),ke.marker===null&&delete Pe.marker,this.zoneAxis=Pe.zoneAxis,Ce=this.zones=(Pe.zones||[]).slice(),!Pe.negativeColor&&!Pe.negativeFillColor||Pe.zones||(pe={value:Pe[this.zoneAxis+"Threshold"]||Pe.threshold||0,className:"highcharts-negative"},me||(pe.color=Pe.negativeColor,pe.fillColor=Pe.negativeFillColor),Ce.push(pe)),Ce.length&&N(Ce[Ce.length-1].value)&&Ce.push(me?{}:{color:this.color,fillColor:this.fillColor}),F(this,"afterSetOptions",{options:Pe}),Pe},xe.prototype.getName=function(){return J(this.options.name,"Series "+(this.index+1))},xe.prototype.getCyclic=function(se,me,pe){var Ce=this.chart,Pe=this.userOptions,Re=se+"Index",ke=se+"Counter",ze=pe?pe.length:J(Ce.options.chart[se+"Count"],Ce[se+"Count"]);if(!me){var Ge=J(Pe[Re],Pe["_"+Re]);N(Ge)||(Ce.series.length||(Ce[ke]=0),Pe["_"+Re]=Ge=Ce[ke]%ze,Ce[ke]+=1),pe&&(me=pe[Ge])}typeof Ge!="undefined"&&(this[Re]=Ge),this[se]=me},xe.prototype.getColor=function(){this.chart.styledMode?this.getCyclic("color"):this.options.colorByPoint?this.color="#cccccc":this.getCyclic("color",this.options.color||w.plotOptions[this.type].color,this.chart.options.colors)},xe.prototype.getPointsCollection=function(){return(this.hasGroupedData?this.points:this.data)||[]},xe.prototype.getSymbol=function(){this.getCyclic("symbol",this.options.marker.symbol,this.chart.options.symbols)},xe.prototype.findPointIndex=function(se,me){var pe=se.id,Ce=se.x,Pe=this.points,Re=this.options.dataSorting,ke,ze;if(pe)Re=this.chart.get(pe),Re instanceof u&&(ke=Re);else if((this.linkedParent||this.enabledDataSorting||this.options.relativeXValue)&&(ke=function(ht){return!ht.touched&&ht.index===se.index},Re&&Re.matchByName?ke=function(ht){return!ht.touched&&ht.name===se.name}:this.options.relativeXValue&&(ke=function(ht){return!ht.touched&&ht.options.x===se.x}),ke=O(Pe,ke),!ke))return;if(ke){var Ge=ke&&ke.index;typeof Ge!="undefined"&&(ze=!0)}return typeof Ge=="undefined"&&ee(Ce)&&(Ge=this.xData.indexOf(Ce,me)),Ge!==-1&&typeof Ge!="undefined"&&this.cropped&&(Ge=Ge>=this.cropStart?Ge-this.cropStart:Ge),!ze&&ee(Ge)&&Pe[Ge]&&Pe[Ge].touched&&(Ge=void 0),Ge},xe.prototype.updateData=function(se,me){var pe=this.options,Ce=pe.dataSorting,Pe=this.points,Re=[],ke=this.requireSorting,ze=se.length===Pe.length,Ge,ht,Tt,xt=!0;if(this.xIncrement=null,se.forEach(function(pt,It){var Ie=N(pt)&&this.pointClass.prototype.optionsToObject.call({series:this},pt)||{},de=Ie.x;Ie.id||ee(de)?(Ie=this.findPointIndex(Ie,Tt),Ie===-1||typeof Ie=="undefined"?Re.push(pt):Pe[Ie]&&pt!==pe.data[Ie]?(Pe[Ie].update(pt,!1,null,!1),Pe[Ie].touched=!0,ke&&(Tt=Ie+1)):Pe[Ie]&&(Pe[Ie].touched=!0),(!ze||It!==Ie||Ce&&Ce.enabled||this.hasDerivedData)&&(Ge=!0)):Re.push(pt)},this),Ge)for(se=Pe.length;se--;)(ht=Pe[se])&&!ht.touched&&ht.remove&&ht.remove(!1,me);else!ze||Ce&&Ce.enabled?xt=!1:(se.forEach(function(pt,It){pt!==Pe[It].y&&Pe[It].update&&Pe[It].update(pt,!1,null,!1)}),Re.length=0);return Pe.forEach(function(pt){pt&&(pt.touched=!1)}),xt?(Re.forEach(function(pt){this.addPoint(pt,!1,null,null,!1)},this),this.xIncrement===null&&this.xData&&this.xData.length&&(this.xIncrement=X(this.xData),this.autoIncrement()),!0):!1},xe.prototype.setData=function(se,me,pe,Ce){me===void 0&&(me=!0);var Pe=this,Re=Pe.points,ke=Re&&Re.length||0,ze=Pe.options,Ge=Pe.chart,ht=ze.dataSorting,Tt=Pe.xAxis,xt=ze.turboThreshold,pt=this.xData,It=this.yData,Ie=Pe.pointArrayMap;Ie=Ie&&Ie.length;var de=ze.keys,Te,Be=0,Ke=1,ot=null;if(!Ge.options.chart.allowMutatingData){ze.data&&delete Pe.options.data,Pe.userOptions.data&&delete Pe.userOptions.data;var Ze=ce(!0,se)}if(se=Ze||se||[],Ze=se.length,ht&&ht.enabled&&(se=this.sortData(se)),Ge.options.chart.allowMutatingData&&Ce!==!1&&Ze&&ke&&!Pe.cropped&&!Pe.hasGroupedData&&Pe.visible&&!Pe.boosted&&(Te=this.updateData(se,pe)),!Te){if(Pe.xIncrement=null,Pe.colorCounter=0,this.parallelArrays.forEach(function(Je){Pe[Je+"Data"].length=0}),xt&&Ze>xt)if(ot=Pe.getFirstValidPoint(se),ee(ot))for(pe=0;pe<Ze;pe++)pt[pe]=this.autoIncrement(),It[pe]=se[pe];else if(q(ot))if(Ie)if(ot.length===Ie)for(pe=0;pe<Ze;pe++)pt[pe]=this.autoIncrement(),It[pe]=se[pe];else for(pe=0;pe<Ze;pe++)Ce=se[pe],pt[pe]=Ce[0],It[pe]=Ce.slice(1,Ie+1);else if(de&&(Be=de.indexOf("x"),Ke=de.indexOf("y"),Be=0<=Be?Be:0,Ke=0<=Ke?Ke:1),ot.length===1&&(Ke=0),Be===Ke)for(pe=0;pe<Ze;pe++)pt[pe]=this.autoIncrement(),It[pe]=se[pe][Ke];else for(pe=0;pe<Ze;pe++)Ce=se[pe],pt[pe]=Ce[Be],It[pe]=Ce[Ke];else $(12,!1,Ge);else for(pe=0;pe<Ze;pe++)typeof se[pe]!="undefined"&&(Ce={series:Pe},Pe.pointClass.prototype.applyOptions.apply(Ce,[se[pe]]),Pe.updateParallelArrays(Ce,pe));for(It&&re(It[0])&&$(14,!0,Ge),Pe.data=[],Pe.options.data=Pe.userOptions.data=se,pe=ke;pe--;)Re[pe]&&Re[pe].destroy&&Re[pe].destroy();Tt&&(Tt.minRange=Tt.userMinRange),Pe.isDirty=Ge.isDirtyBox=!0,Pe.isDirtyData=!!Re,pe=!1}ze.legendType==="point"&&(this.processData(),this.generatePoints()),me&&Ge.redraw(pe)},xe.prototype.sortData=function(se){var me=this,pe=me.options.dataSorting.sortKey||"y",Ce=function(Pe,Re){return N(Re)&&Pe.pointClass.prototype.optionsToObject.call({series:Pe},Re)||{}};return se.forEach(function(Pe,Re){se[Re]=Ce(me,Pe),se[Re].index=Re},this),se.concat().sort(function(Pe,Re){return Pe=G(pe,Pe),Re=G(pe,Re),Re<Pe?-1:Re>Pe?1:0}).forEach(function(Pe,Re){Pe.x=Re},this),me.linkedSeries&&me.linkedSeries.forEach(function(Pe){var Re=Pe.options,ke=Re.data;Re.dataSorting&&Re.dataSorting.enabled||!ke||(ke.forEach(function(ze,Ge){ke[Ge]=Ce(Pe,ze),se[Ge]&&(ke[Ge].x=se[Ge].x,ke[Ge].index=Ge)}),Pe.setData(ke,!1))}),se},xe.prototype.getProcessedData=function(se){var me=this.xAxis,pe=this.options,Ce=pe.cropThreshold,Pe=se||this.getExtremesFromAll||pe.getExtremesFromAll,Re=this.isCartesian;se=me&&me.val2lin,pe=!(!me||!me.logarithmic);var ke=0,ze=this.xData,Ge=this.yData,ht=this.requireSorting,Tt=!1,xt=ze.length;if(me){Tt=me.getExtremes();var pt=Tt.min,It=Tt.max;Tt=!(!me.categories||me.names.length)}if(Re&&this.sorted&&!Pe&&(!Ce||xt>Ce||this.forceCrop)){if(ze[xt-1]<pt||ze[0]>It)ze=[],Ge=[];else if(this.yData&&(ze[0]<pt||ze[xt-1]>It)){var Ie=this.cropData(this.xData,this.yData,pt,It);ze=Ie.xData,Ge=Ie.yData,ke=Ie.start,Ie=!0}}for(Ce=ze.length||1;--Ce;)if(me=pe?se(ze[Ce])-se(ze[Ce-1]):ze[Ce]-ze[Ce-1],0<me&&(typeof de=="undefined"||me<de))var de=me;else 0>me&&ht&&!Tt&&($(15,!1,this.chart),ht=!1);return{xData:ze,yData:Ge,cropped:Ie,cropStart:ke,closestPointRange:de}},xe.prototype.processData=function(se){var me=this.xAxis;if(this.isCartesian&&!this.isDirty&&!me.isDirty&&!this.yAxis.isDirty&&!se)return!1;se=this.getProcessedData(),this.cropped=se.cropped,this.cropStart=se.cropStart,this.processedXData=se.xData,this.processedYData=se.yData,this.closestPointRange=this.basePointRange=se.closestPointRange,F(this,"afterProcessData")},xe.prototype.cropData=function(se,me,pe,Ce,Pe){var Re=se.length,ke,ze=0,Ge=Re;for(Pe=J(Pe,this.cropShoulder),ke=0;ke<Re;ke++)if(se[ke]>=pe){ze=Math.max(0,ke-Pe);break}for(pe=ke;pe<Re;pe++)if(se[pe]>Ce){Ge=pe+Pe;break}return{xData:se.slice(ze,Ge),yData:me.slice(ze,Ge),start:ze,end:Ge}},xe.prototype.generatePoints=function(){var se=this.options,me=this.processedData||se.data,pe=this.processedXData,Ce=this.processedYData,Pe=this.pointClass,Re=pe.length,ke=this.cropStart||0,ze=this.hasGroupedData,Ge=se.keys,ht=[];se=se.dataGrouping&&se.dataGrouping.groupAll?ke:0;var Tt,xt,pt=this.data;if(!pt&&!ze){var It=[];It.length=me.length,pt=this.data=It}for(Ge&&ze&&(this.options.keys=!1),xt=0;xt<Re;xt++){if(It=ke+xt,ze){var Ie=new Pe().init(this,[pe[xt]].concat(ve(Ce[xt])));Ie.dataGroup=this.groupMap[se+xt],Ie.dataGroup.options&&(Ie.options=Ie.dataGroup.options,z(Ie,Ie.dataGroup.options),delete Ie.dataLabels)}else(Ie=pt[It])||typeof me[It]=="undefined"||(pt[It]=Ie=new Pe().init(this,me[It],pe[xt]));Ie&&(Ie.index=ze?se+xt:It,ht[xt]=Ie)}if(this.options.keys=Ge,pt&&(Re!==(Tt=pt.length)||ze))for(xt=0;xt<Tt;xt++)xt!==ke||ze||(xt+=Re),pt[xt]&&(pt[xt].destroyElements(),pt[xt].plotX=void 0);this.data=pt,this.points=ht,F(this,"afterGeneratePoints")},xe.prototype.getXExtremes=function(se){return{min:Z(se),max:X(se)}},xe.prototype.getExtremes=function(se,me){var pe=this.xAxis,Ce=this.yAxis,Pe=this.processedXData||this.xData,Re=[],ke=this.requireSorting?this.cropShoulder:0;Ce=Ce?Ce.positiveValuesOnly:!1;var ze,Ge=0,ht=0,Tt=0;se=se||this.stackedYData||this.processedYData||[];var xt=se.length;if(pe){var pt=pe.getExtremes();Ge=pt.min,ht=pt.max}for(ze=0;ze<xt;ze++){var It=Pe[ze];pt=se[ze];var Ie=(ee(pt)||q(pt))&&(pt.length||0<pt||!Ce);if(It=me||this.getExtremesFromAll||this.options.getExtremesFromAll||this.cropped||!pe||(Pe[ze+ke]||It)>=Ge&&(Pe[ze-ke]||It)<=ht,Ie&&It)if(Ie=pt.length)for(;Ie--;)ee(pt[Ie])&&(Re[Tt++]=pt[Ie]);else Re[Tt++]=pt}return se={activeYData:Re,dataMin:Z(Re),dataMax:X(Re)},F(this,"afterGetExtremes",{dataExtremes:se}),se},xe.prototype.applyExtremes=function(){var se=this.getExtremes();return this.dataMin=se.dataMin,this.dataMax=se.dataMax,se},xe.prototype.getFirstValidPoint=function(se){for(var me=se.length,pe=0,Ce=null;Ce===null&&pe<me;)Ce=se[pe],pe++;return Ce},xe.prototype.translate=function(){this.processedXData||this.processData(),this.generatePoints();var se=this.options,me=se.stacking,pe=this.xAxis,Ce=pe.categories,Pe=this.enabledDataSorting,Re=this.yAxis,ke=this.points,ze=ke.length,Ge=this.pointPlacementToXValue(),ht=!!Ge,Tt=se.threshold,xt=se.startFromThreshold?Tt:0,pt=this.zoneAxis||"y",It,Ie,de=Number.MAX_VALUE;for(It=0;It<ze;It++){var Te=ke[It],Be=Te.x,Ke=void 0,ot=void 0,Ze=Te.y,Je=Te.low,St=me&&Re.stacking&&Re.stacking.stacks[(this.negStacks&&Ze<(xt?0:Tt)?"-":"")+this.stackKey];if((Re.positiveValuesOnly&&!Re.validatePositiveValue(Ze)||pe.positiveValuesOnly&&!pe.validatePositiveValue(Be))&&(Te.isNull=!0),Te.plotX=Ie=H(W(pe.translate(Be,0,0,0,1,Ge,this.type==="flags"),-1e5,1e5)),me&&this.visible&&St&&St[Be]){var er=this.getStackIndicator(er,Be,this.index);!Te.isNull&&er.key&&(Ke=St[Be],ot=Ke.points[er.key]),Ke&&q(ot)&&(Je=ot[0],Ze=ot[1],Je===xt&&er.key===St[Be].base&&(Je=J(ee(Tt)?Tt:Re.min)),Re.positiveValuesOnly&&N(Je)&&0>=Je&&(Je=void 0),Te.total=Te.stackTotal=J(Ke.total),Te.percentage=N(Te.y)&&Ke.total?Te.y/Ke.total*100:void 0,Te.stackY=Ze,this.irregularWidths||Ke.setOffset(this.pointXOffset||0,this.barW||0,void 0,void 0,void 0,this.xAxis))}if(Te.yBottom=N(Je)?W(Re.translate(Je,0,1,0,1),-1e5,1e5):void 0,this.dataModify&&(Ze=this.dataModify.modifyValue(Ze,It)),Te.plotY=void 0,ee(Ze)&&(Ke=Re.translate(Ze,!1,!0,!1,!0),typeof Ke!="undefined"&&(Te.plotY=W(Ke,-1e5,1e5))),Te.isInside=this.isPointInside(Te),Te.clientX=ht?H(pe.translate(Be,0,0,0,1,Ge)):Ie,Te.negative=Te[pt]<(se[pt+"Threshold"]||Tt||0),Te.category=J(Ce&&Ce[Te.x],Te.x),!Te.isNull&&Te.visible!==!1){typeof Ft!="undefined"&&(de=Math.min(de,Math.abs(Ie-Ft)));var Ft=Ie}Te.zone=this.zones.length?Te.getZone():void 0,!Te.graphic&&this.group&&Pe&&(Te.isNew=!0)}this.closestPointRangePx=de,F(this,"afterTranslate")},xe.prototype.getValidPoints=function(se,me,pe){var Ce=this.chart;return(se||this.points||[]).filter(function(Pe){return me&&!Ce.isInsidePlot(Pe.plotX,Pe.plotY,{inverted:Ce.inverted})?!1:Pe.visible!==!1&&(pe||!Pe.isNull)})},xe.prototype.getClipBox=function(){var se=this.chart,me=this.xAxis,pe=this.yAxis,Ce=ce(se.clipBox);return me&&me.len!==se.plotSizeX&&(Ce.width=me.len),pe&&pe.len!==se.plotSizeY&&(Ce.height=pe.len),Ce},xe.prototype.getSharedClipKey=function(){return this.sharedClipKey=(this.options.xAxis||0)+","+(this.options.yAxis||0)},xe.prototype.setClip=function(){var se=this.chart,me=this.group,pe=this.markerGroup,Ce=se.sharedClips;se=se.renderer;var Pe=this.getClipBox(),Re=this.getSharedClipKey(),ke=Ce[Re];ke?ke.animate(Pe):Ce[Re]=ke=se.clipRect(Pe),me&&me.clip(this.options.clip===!1?void 0:ke),pe&&pe.clip()},xe.prototype.animate=function(se){var me=this.chart,pe=this.group,Ce=this.markerGroup,Pe=me.inverted,Re=y(this.options.animation),ke=[this.getSharedClipKey(),Re.duration,Re.easing,Re.defer].join(),ze=me.sharedClips[ke],Ge=me.sharedClips[ke+"m"];if(se&&pe)Re=this.getClipBox(),ze?ze.attr("height",Re.height):(Re.width=0,Pe&&(Re.x=me.plotHeight),ze=me.renderer.clipRect(Re),me.sharedClips[ke]=ze,Ge=me.renderer.clipRect({x:-99,y:-99,width:Pe?me.plotWidth+199:99,height:Pe?99:me.plotHeight+199}),me.sharedClips[ke+"m"]=Ge),pe.clip(ze),Ce&&Ce.clip(Ge);else if(ze&&!ze.hasClass("highcharts-animating")){me=this.getClipBox();var ht=Re.step;Ce&&Ce.element.childNodes.length&&(Re.step=function(Tt,xt){ht&&ht.apply(xt,arguments),xt.prop==="width"&&Ge&&Ge.element&&Ge.attr(Pe?"height":"width",Tt+99)}),ze.addClass("highcharts-animating").animate(me,Re)}},xe.prototype.afterAnimate=function(){var se=this;this.setClip(),fe(this.chart.sharedClips,function(me,pe,Ce){me&&!se.chart.container.querySelector('[clip-path="url(#'.concat(me.id,')"]'))&&(me.destroy(),delete Ce[pe])}),this.finishedAnimating=!0,F(this,"afterAnimate")},xe.prototype.drawPoints=function(se){se===void 0&&(se=this.points);var me=this.chart,pe=me.styledMode,Ce=this.colorAxis,Pe=this.options.marker,Re=this[this.specialGroup||"markerGroup"],ke=this.xAxis,ze=J(Pe.enabled,!ke||ke.isRadial?!0:null,this.closestPointRangePx>=Pe.enabledThreshold*Pe.radius),Ge,ht;if(Pe.enabled!==!1||this._hasPointMarkers)for(Ge=0;Ge<se.length;Ge++){var Tt=se[Ge],xt=(ht=Tt.graphic)?"animate":"attr",pt=Tt.marker||{},It=!!Tt.marker;if((ze&&typeof pt.enabled=="undefined"||pt.enabled)&&!Tt.isNull&&Tt.visible!==!1){var Ie=J(pt.symbol,this.symbol,"rect"),de=this.markerAttribs(Tt,Tt.selected&&"select");this.enabledDataSorting&&(Tt.startXPos=ke.reversed?-(de.width||0):ke.width);var Te=Tt.isInside!==!1;!ht&&Te&&(0<(de.width||0)||Tt.hasImage)&&(Tt.graphic=ht=me.renderer.symbol(Ie,de.x,de.y,de.width,de.height,It?pt:Pe).add(Re),this.enabledDataSorting&&me.hasRendered&&(ht.attr({x:Tt.startXPos}),xt="animate")),ht&&xt==="animate"&&ht[Te?"show":"hide"](Te).animate(de),ht&&(pt=this.pointAttribs(Tt,pe||!Tt.selected?void 0:"select"),pe?Ce&&ht.css({fill:pt.fill}):ht[xt](pt)),ht&&ht.addClass(Tt.getClassName(),!0)}else ht&&(Tt.graphic=ht.destroy())}},xe.prototype.markerAttribs=function(se,me){var pe=this.options,Ce=pe.marker,Pe=se.marker||{},Re=Pe.symbol||Ce.symbol,ke={},ze=J(Pe.radius,Ce&&Ce.radius);return me&&(Ce=Ce.states[me],me=Pe.states&&Pe.states[me],ze=J(me&&me.radius,Ce&&Ce.radius,ze&&ze+(Ce&&Ce.radiusPlus||0))),se.hasImage=Re&&Re.indexOf("url")===0,se.hasImage&&(ze=0),se=se.pos(),ee(ze)&&se&&(ke.x=se[0]-ze,ke.y=se[1]-ze,pe.crisp&&(ke.x=Math.floor(ke.x))),ze&&(ke.width=ke.height=2*ze),ke},xe.prototype.pointAttribs=function(se,me){var pe=this.options.marker,Ce=se&&se.options,Pe=Ce&&Ce.marker||{},Re=Ce&&Ce.color,ke=se&&se.color,ze=se&&se.zone&&se.zone.color,Ge=this.color;return se=J(Pe.lineWidth,pe.lineWidth),Ce=1,Ge=Re||ze||ke||Ge,Re=Pe.fillColor||pe.fillColor||Ge,ke=Pe.lineColor||pe.lineColor||Ge,me=me||"normal",pe=pe.states[me]||{},me=Pe.states&&Pe.states[me]||{},se=J(me.lineWidth,pe.lineWidth,se+J(me.lineWidthPlus,pe.lineWidthPlus,0)),Re=me.fillColor||pe.fillColor||Re,ke=me.lineColor||pe.lineColor||ke,Ce=J(me.opacity,pe.opacity,Ce),{stroke:ke,"stroke-width":se,fill:Re,opacity:Ce}},xe.prototype.destroy=function(se){var me=this,pe=me.chart,Ce=/AppleWebKit\/533/.test(A.navigator.userAgent),Pe=me.data||[],Re,ke,ze,Ge;for(F(me,"destroy",{keepEventsForUpdate:se}),this.removeEvents(se),(me.axisTypes||[]).forEach(function(ht){(Ge=me[ht])&&Ge.series&&(j(Ge.series,me),Ge.isDirty=Ge.forceRedraw=!0)}),me.legendItem&&me.chart.legend.destroyItem(me),ke=Pe.length;ke--;)(ze=Pe[ke])&&ze.destroy&&ze.destroy();me.clips&&me.clips.forEach(function(ht){return ht.destroy()}),x.clearTimeout(me.animationTimeout),fe(me,function(ht,Tt){ht instanceof v&&!ht.survive&&(Re=Ce&&Tt==="group"?"hide":"destroy",ht[Re]())}),pe.hoverSeries===me&&(pe.hoverSeries=void 0),j(pe.series,me),pe.orderSeries(),fe(me,function(ht,Tt){se&&Tt==="hcEvents"||delete me[Tt]})},xe.prototype.applyZones=function(){var se=this,me=this.chart,pe=me.renderer,Ce=this.zones,Pe=this.clips||[],Re=this.graph,ke=this.area,ze=Math.max(me.plotWidth,me.plotHeight),Ge=this[(this.zoneAxis||"y")+"Axis"],ht=me.inverted,Tt,xt,pt,It,Ie,de,Te,Be,Ke=!1;if(Ce.length&&(Re||ke)&&Ge&&typeof Ge.min!="undefined"){var ot=Ge.reversed,Ze=Ge.horiz;Re&&!this.showLine&&Re.hide(),ke&&ke.hide();var Je=Ge.getExtremes();Ce.forEach(function(St,er){Tt=ot?Ze?me.plotWidth:0:Ze?0:Ge.toPixels(Je.min)||0,Tt=W(J(xt,Tt),0,ze),xt=W(Math.round(Ge.toPixels(J(St.value,Je.max),!0)||0),0,ze),Ke&&(Tt=xt=Ge.toPixels(Je.max)),It=Math.abs(Tt-xt),Ie=Math.min(Tt,xt),de=Math.max(Tt,xt),Ge.isXAxis?(pt={x:ht?de:Ie,y:0,width:It,height:ze},Ze||(pt.x=me.plotHeight-pt.x)):(pt={x:0,y:ht?de:Ie,width:ze,height:It},Ze&&(pt.y=me.plotWidth-pt.y)),ht&&pe.isVML&&(pt=Ge.isXAxis?{x:0,y:ot?Ie:de,height:pt.width,width:me.chartWidth}:{x:pt.y-me.plotLeft-me.spacingBox.x,y:0,width:pt.height,height:me.chartHeight}),Pe[er]?Pe[er].animate(pt):Pe[er]=pe.clipRect(pt),Te=se["zone-area-"+er],Be=se["zone-graph-"+er],Re&&Be&&Be.clip(Pe[er]),ke&&Te&&Te.clip(Pe[er]),Ke=St.value>Je.max,se.resetZones&&xt===0&&(xt=void 0)}),this.clips=Pe}else se.visible&&(Re&&Re.show(),ke&&ke.show())},xe.prototype.plotGroup=function(se,me,pe,Ce,Pe){var Re=this[se],ke=!Re;return pe={visibility:pe,zIndex:Ce||.1},typeof this.opacity=="undefined"||this.chart.styledMode||this.state==="inactive"||(pe.opacity=this.opacity),ke&&(this[se]=Re=this.chart.renderer.g().add(Pe)),Re.addClass("highcharts-"+me+" highcharts-series-"+this.index+" highcharts-"+this.type+"-series "+(N(this.colorIndex)?"highcharts-color-"+this.colorIndex+" ":"")+(this.options.className||"")+(Re.hasClass("highcharts-tracker")?" highcharts-tracker":""),!0),Re.attr(pe)[ke?"attr":"animate"](this.getPlotBox(me)),Re},xe.prototype.getPlotBox=function(se){var me=this.xAxis,pe=this.yAxis,Ce=this.chart;return se=Ce.inverted&&!Ce.polar&&me&&this.invertible!==!1&&se==="series",Ce.inverted&&(me=pe,pe=this.xAxis),{translateX:me?me.left:Ce.plotLeft,translateY:pe?pe.top:Ce.plotTop,rotation:se?90:0,rotationOriginX:se?(me.len-pe.len)/2:0,rotationOriginY:se?(me.len+pe.len)/2:0,scaleX:se?-1:1,scaleY:1}},xe.prototype.removeEvents=function(se){se||oe(this),this.eventsToUnbind.length&&(this.eventsToUnbind.forEach(function(me){me()}),this.eventsToUnbind.length=0)},xe.prototype.render=function(){var se=this,me=se.chart,pe=se.options,Ce=y(pe.animation),Pe=se.visible?"inherit":"hidden",Re=pe.zIndex,ke=se.hasRendered,ze=me.seriesGroup;me=!se.finishedAnimating&&me.renderer.isSVG?Ce.duration:0,F(this,"render"),se.plotGroup("group","series",Pe,Re,ze),se.markerGroup=se.plotGroup("markerGroup","markers",Pe,Re,ze),pe.clip!==!1&&se.setClip(),se.animate&&me&&se.animate(!0),se.drawGraph&&(se.drawGraph(),se.applyZones()),se.visible&&se.drawPoints(),se.drawDataLabels&&se.drawDataLabels(),se.redrawPoints&&se.redrawPoints(),se.drawTracker&&se.options.enableMouseTracking!==!1&&se.drawTracker(),se.animate&&me&&se.animate(),ke||(me&&Ce.defer&&(me+=Ce.defer),se.animationTimeout=ye(function(){se.afterAnimate()},me||0)),se.isDirty=!1,se.hasRendered=!0,F(se,"afterRender")},xe.prototype.redraw=function(){var se=this.isDirty||this.isDirtyData;this.translate(),this.render(),se&&delete this.kdTree},xe.prototype.searchPoint=function(se,me){var pe=this.xAxis,Ce=this.yAxis,Pe=this.chart.inverted;return this.searchKDTree({clientX:Pe?pe.len-se.chartY+pe.pos:se.chartX-pe.pos,plotY:Pe?Ce.len-se.chartX+Ce.pos:se.chartY-Ce.pos},me,se)},xe.prototype.buildKDTree=function(se){function me(Pe,Re,ke){var ze=Pe&&Pe.length;if(ze){var Ge=pe.kdAxisArray[Re%ke];return Pe.sort(function(ht,Tt){return ht[Ge]-Tt[Ge]}),ze=Math.floor(ze/2),{point:Pe[ze],left:me(Pe.slice(0,ze),Re+1,ke),right:me(Pe.slice(ze+1),Re+1,ke)}}}this.buildingKdTree=!0;var pe=this,Ce=-1<pe.options.findNearestPointBy.indexOf("y")?2:1;delete pe.kdTree,ye(function(){pe.kdTree=me(pe.getValidPoints(null,!pe.directTouch),Ce,Ce),pe.buildingKdTree=!1},pe.options.kdNow||se&&se.type==="touchstart"?0:1)},xe.prototype.searchKDTree=function(se,me,pe){function Ce(Ge,ht,Tt,xt){var pt=ht.point,It=Pe.kdAxisArray[Tt%xt],Ie=pt,de=N(Ge[Re])&&N(pt[Re])?Math.pow(Ge[Re]-pt[Re],2):null,Te=N(Ge[ke])&&N(pt[ke])?Math.pow(Ge[ke]-pt[ke],2):null;return Te=(de||0)+(Te||0),pt.dist=N(Te)?Math.sqrt(Te):Number.MAX_VALUE,pt.distX=N(de)?Math.sqrt(de):Number.MAX_VALUE,It=Ge[It]-pt[It],Te=0>It?"left":"right",de=0>It?"right":"left",ht[Te]&&(Te=Ce(Ge,ht[Te],Tt+1,xt),Ie=Te[ze]<Ie[ze]?Te:pt),ht[de]&&Math.sqrt(It*It)<Ie[ze]&&(Ge=Ce(Ge,ht[de],Tt+1,xt),Ie=Ge[ze]<Ie[ze]?Ge:Ie),Ie}var Pe=this,Re=this.kdAxisArray[0],ke=this.kdAxisArray[1],ze=me?"distX":"dist";if(me=-1<Pe.options.findNearestPointBy.indexOf("y")?2:1,this.kdTree||this.buildingKdTree||this.buildKDTree(pe),this.kdTree)return Ce(se,this.kdTree,me,me)},xe.prototype.pointPlacementToXValue=function(){var se=this.options,me=se.pointRange,pe=this.xAxis;return se=se.pointPlacement,se==="between"&&(se=pe.reversed?-.5:.5),ee(se)?se*(me||pe.pointRange):0},xe.prototype.isPointInside=function(se){var me=this.chart,pe=this.xAxis,Ce=this.yAxis;return typeof se.plotY!="undefined"&&typeof se.plotX!="undefined"&&0<=se.plotY&&se.plotY<=(Ce?Ce.len:me.plotHeight)&&0<=se.plotX&&se.plotX<=(pe?pe.len:me.plotWidth)},xe.prototype.drawTracker=function(){var se=this,me=se.options,pe=me.trackByArea,Ce=[].concat(pe?se.areaPath:se.graphPath),Pe=se.chart,Re=Pe.pointer,ke=Pe.renderer,ze=Pe.options.tooltip.snap,Ge=se.tracker,ht=function(xt){Pe.hoverSeries!==se&&se.onMouseOver()},Tt="rgba(192,192,192,"+(T?1e-4:.002)+")";Ge?Ge.attr({d:Ce}):se.graph&&(se.tracker=ke.path(Ce).attr({visibility:se.visible?"inherit":"hidden",zIndex:2}).addClass(pe?"highcharts-tracker-area":"highcharts-tracker-line").add(se.group),Pe.styledMode||se.tracker.attr({"stroke-linecap":"round","stroke-linejoin":"round",stroke:Tt,fill:pe?Tt:"none","stroke-width":se.graph.strokeWidth()+(pe?0:2*ze)}),[se.tracker,se.markerGroup,se.dataLabelsGroup].forEach(function(xt){xt&&(xt.addClass("highcharts-tracker").on("mouseover",ht).on("mouseout",function(pt){Re.onTrackerMouseOut(pt)}),me.cursor&&!Pe.styledMode&&xt.css({cursor:me.cursor}),E)&&xt.on("touchstart",ht)})),F(this,"afterDrawTracker")},xe.prototype.addPoint=function(se,me,pe,Ce,Pe){var Re=this.options,ke=this.data,ze=this.chart,Ge=this.xAxis;Ge=Ge&&Ge.hasNames&&Ge.names;var ht=Re.data,Tt=this.xData,xt;me=J(me,!0);var pt={series:this};this.pointClass.prototype.applyOptions.apply(pt,[se]);var It=pt.x,Ie=Tt.length;if(this.requireSorting&&It<Tt[Ie-1])for(xt=!0;Ie&&Tt[Ie-1]>It;)Ie--;this.updateParallelArrays(pt,"splice",Ie,0,0),this.updateParallelArrays(pt,Ie),Ge&&pt.name&&(Ge[It]=pt.name),ht.splice(Ie,0,se),(xt||this.processedData)&&(this.data.splice(Ie,0,null),this.processData()),Re.legendType==="point"&&this.generatePoints(),pe&&(ke[0]&&ke[0].remove?ke[0].remove(!1):(ke.shift(),this.updateParallelArrays(pt,"shift"),ht.shift())),Pe!==!1&&F(this,"addPoint",{point:pt}),this.isDirtyData=this.isDirty=!0,me&&ze.redraw(Ce)},xe.prototype.removePoint=function(se,me,pe){var Ce=this,Pe=Ce.data,Re=Pe[se],ke=Ce.points,ze=Ce.chart,Ge=function(){ke&&ke.length===Pe.length&&ke.splice(se,1),Pe.splice(se,1),Ce.options.data.splice(se,1),Ce.updateParallelArrays(Re||{series:Ce},"splice",se,1),Re&&Re.destroy(),Ce.isDirty=!0,Ce.isDirtyData=!0,me&&ze.redraw()};_(pe,ze),me=J(me,!0),Re?Re.firePointEvent("remove",null,Ge):Ge()},xe.prototype.remove=function(se,me,pe,Ce){function Pe(){Re.destroy(Ce),ke.isDirtyLegend=ke.isDirtyBox=!0,ke.linkSeries(),J(se,!0)&&ke.redraw(me)}var Re=this,ke=Re.chart;pe!==!1?F(Re,"remove",null,Pe):Pe()},xe.prototype.update=function(se,me){se=D(se,this.userOptions),F(this,"update",{options:se});var pe=this,Ce=pe.chart,Pe=pe.userOptions,Re=pe.initialType||pe.type,ke=Ce.options.plotOptions,ze=k[Re].prototype,Ge=pe.finishedAnimating&&{animation:!1},ht={},Tt=["eventOptions","navigatorSeries","baseSeries"],xt=se.type||Pe.type||Ce.options.chart.type,pt=!(this.hasDerivedData||xt&&xt!==this.type||typeof se.pointStart!="undefined"||typeof se.pointInterval!="undefined"||typeof se.relativeXValue!="undefined"||se.joinBy||se.mapData||pe.hasOptionChanged("dataGrouping")||pe.hasOptionChanged("pointStart")||pe.hasOptionChanged("pointInterval")||pe.hasOptionChanged("pointIntervalUnit")||pe.hasOptionChanged("keys"));if(xt=xt||Re,pt&&(Tt.push("data","isDirtyData","points","processedData","processedXData","processedYData","xIncrement","cropped","_hasPointMarkers","_hasPointLabels","clips","nodes","layout","level","mapMap","mapData","minY","maxY","minX","maxX"),se.visible!==!1&&Tt.push("area","graph"),pe.parallelArrays.forEach(function(Ie){Tt.push(Ie+"Data")}),se.data&&(se.dataSorting&&z(pe.options.dataSorting,se.dataSorting),this.setData(se.data,!1))),se=ce(Pe,Ge,{index:typeof Pe.index=="undefined"?pe.index:Pe.index,pointStart:J(ke&&ke.series&&ke.series.pointStart,Pe.pointStart,pe.xData[0])},!pt&&{data:pe.options.data},se),pt&&se.data&&(se.data=pe.options.data),Tt=["group","markerGroup","dataLabelsGroup","transformGroup","shadowGroup"].concat(Tt),Tt.forEach(function(Ie){Tt[Ie]=pe[Ie],delete pe[Ie]}),ke=!1,k[xt]){if(ke=xt!==pe.type,pe.remove(!1,!1,!1,!0),ke)if(Object.setPrototypeOf)Object.setPrototypeOf(pe,k[xt].prototype);else{Ge=Object.hasOwnProperty.call(pe,"hcEvents")&&pe.hcEvents;for(It in ze)pe[It]=void 0;z(pe,k[xt].prototype),Ge?pe.hcEvents=Ge:delete pe.hcEvents}}else $(17,!0,Ce,{missingModuleFor:xt});if(Tt.forEach(function(Ie){pe[Ie]=Tt[Ie]}),pe.init(Ce,se),pt&&this.points){if(se=pe.options,se.visible===!1)ht.graphic=1,ht.dataLabel=1;else if(!pe._hasPointLabels){ze=se.marker;var It=se.dataLabels;Pe=Pe.marker||{},!ze||ze.enabled!==!1&&Pe.symbol===ze.symbol&&Pe.height===ze.height&&Pe.width===ze.width||(ht.graphic=1),It&&It.enabled===!1&&(ht.dataLabel=1)}for(Pe=0,ze=this.points;Pe<ze.length;Pe++)(It=ze[Pe])&&It.series&&(It.resolveColor(),Object.keys(ht).length&&It.destroyElements(ht),se.showInLegend===!1&&It.legendItem&&Ce.legend.destroyItem(It))}pe.initialType=Re,Ce.linkSeries(),ke&&pe.linkedSeries.length&&(pe.isDirtyData=!0),F(this,"afterUpdate"),J(me,!0)&&Ce.redraw(pt?void 0:!1)},xe.prototype.setName=function(se){this.name=this.options.name=this.userOptions.name=se,this.chart.isDirtyLegend=!0},xe.prototype.hasOptionChanged=function(se){var me=this.options[se],pe=this.chart.options.plotOptions,Ce=this.userOptions[se];return Ce?me!==Ce:me!==J(pe&&pe[this.type]&&pe[this.type][se],pe&&pe.series&&pe.series[se],me)},xe.prototype.onMouseOver=function(){var se=this.chart,me=se.hoverSeries;se.pointer.setHoverChartIndex(),me&&me!==this&&me.onMouseOut(),this.options.events.mouseOver&&F(this,"mouseOver"),this.setState("hover"),se.hoverSeries=this},xe.prototype.onMouseOut=function(){var se=this.options,me=this.chart,pe=me.tooltip,Ce=me.hoverPoint;me.hoverSeries=null,Ce&&Ce.onMouseOut(),this&&se.events.mouseOut&&F(this,"mouseOut"),!pe||this.stickyTracking||pe.shared&&!this.noSharedTooltip||pe.hide(),me.series.forEach(function(Pe){Pe.setState("",!0)})},xe.prototype.setState=function(se,me){var pe=this,Ce=pe.options,Pe=pe.graph,Re=Ce.inactiveOtherPoints,ke=Ce.states,ze=J(ke[se||"normal"]&&ke[se||"normal"].animation,pe.chart.options.chart.animation),Ge=Ce.lineWidth,ht=0,Tt=Ce.opacity;if(se=se||"",pe.state!==se&&([pe.group,pe.markerGroup,pe.dataLabelsGroup].forEach(function(xt){xt&&(pe.state&&xt.removeClass("highcharts-series-"+pe.state),se&&xt.addClass("highcharts-series-"+se))}),pe.state=se,!pe.chart.styledMode)){if(ke[se]&&ke[se].enabled===!1)return;if(se&&(Ge=ke[se].lineWidth||Ge+(ke[se].lineWidthPlus||0),Tt=J(ke[se].opacity,Tt)),Pe&&!Pe.dashstyle&&ee(Ge))for(Ce={"stroke-width":Ge},Pe.animate(Ce,ze);pe["zone-graph-"+ht];)pe["zone-graph-"+ht].animate(Ce,ze),ht+=1;Re||[pe.group,pe.markerGroup,pe.dataLabelsGroup,pe.labelBySeries].forEach(function(xt){xt&&xt.animate({opacity:Tt},ze)})}me&&Re&&pe.points&&pe.setAllPointsToState(se||void 0)},xe.prototype.setAllPointsToState=function(se){this.points.forEach(function(me){me.setState&&me.setState(se)})},xe.prototype.setVisible=function(se,me){var pe=this,Ce=pe.chart,Pe=Ce.options.chart.ignoreHiddenSeries,Re=pe.visible,ke=(pe.visible=se=pe.options.visible=pe.userOptions.visible=typeof se=="undefined"?!Re:se)?"show":"hide";["group","dataLabelsGroup","markerGroup","tracker","tt"].forEach(function(ze){pe[ze]&&pe[ze][ke]()}),(Ce.hoverSeries===pe||(Ce.hoverPoint&&Ce.hoverPoint.series)===pe)&&pe.onMouseOut(),pe.legendItem&&Ce.legend.colorizeItem(pe,se),pe.isDirty=!0,pe.options.stacking&&Ce.series.forEach(function(ze){ze.options.stacking&&ze.visible&&(ze.isDirty=!0)}),pe.linkedSeries.forEach(function(ze){ze.setVisible(se,!1)}),Pe&&(Ce.isDirtyBox=!0),F(pe,ke),me!==!1&&Ce.redraw()},xe.prototype.show=function(){this.setVisible(!0)},xe.prototype.hide=function(){this.setVisible(!1)},xe.prototype.select=function(se){this.selected=se=this.options.selected=typeof se=="undefined"?!this.selected:se,this.checkbox&&(this.checkbox.checked=se),F(this,se?"select":"unselect")},xe.prototype.shouldShowTooltip=function(se,me,pe){return pe===void 0&&(pe={}),pe.series=this,pe.visiblePlotOnly=!0,this.chart.isInsidePlot(se,me,pe)},xe.defaultOptions=p,xe.types=m.seriesTypes,xe.registerType=m.registerSeriesType,xe}(),z(i.prototype,{axisTypes:["xAxis","yAxis"],coll:"series",colorCounter:0,cropShoulder:1,directTouch:!1,drawLegendSymbol:l.drawLineMarker,isCartesian:!0,kdAxisArray:["clientX","plotY"],parallelArrays:["x","y"],pointClass:u,requireSorting:!0,sorted:!0}),m.series=i,i}),r(n,"Extensions/ScrollablePlotArea.js",[n["Core/Animation/AnimationUtilities.js"],n["Core/Axis/Axis.js"],n["Core/Chart/Chart.js"],n["Core/Series/Series.js"],n["Core/Renderer/RendererRegistry.js"],n["Core/Utilities.js"]],function(i,o,a,s,l,u){var p=i.stop,m=u.addEvent,v=u.createElement,x=u.defined,y=u.merge,_=u.pick;m(a,"afterSetChartSize",function(w){var C=this.options.chart.scrollablePlotArea,E=C&&C.minWidth;if(C=C&&C.minHeight,!this.renderer.forExport){if(E){if(this.scrollablePixelsX=E=Math.max(0,E-this.chartWidth)){this.scrollablePlotBox=this.renderer.scrollablePlotBox=y(this.plotBox),this.plotBox.width=this.plotWidth+=E,this.inverted?this.clipBox.height+=E:this.clipBox.width+=E;var T={1:{name:"right",value:E}}}}else C&&(this.scrollablePixelsY=E=Math.max(0,C-this.chartHeight),x(E)&&(this.scrollablePlotBox=this.renderer.scrollablePlotBox=y(this.plotBox),this.plotBox.height=this.plotHeight+=E,this.inverted?this.clipBox.width+=E:this.clipBox.height+=E,T={2:{name:"bottom",value:E}}));T&&!w.skipAxes&&this.axes.forEach(function(A){T[A.side]?A.getPlotLinePath=function(){var k=T[A.side].name,X=this[k];this[k]=X-T[A.side].value;var Z=o.prototype.getPlotLinePath.apply(this,arguments);return this[k]=X,Z}:(A.setAxisSize(),A.setAxisTranslation())})}}),m(a,"render",function(){this.scrollablePixelsX||this.scrollablePixelsY?(this.setUpScrolling&&this.setUpScrolling(),this.applyFixed()):this.fixedDiv&&this.applyFixed()}),a.prototype.setUpScrolling=function(){var w=this,C={WebkitOverflowScrolling:"touch",overflowX:"hidden",overflowY:"hidden"};this.scrollablePixelsX&&(C.overflowX="auto"),this.scrollablePixelsY&&(C.overflowY="auto"),this.scrollingParent=v("div",{className:"highcharts-scrolling-parent"},{position:"relative"},this.renderTo),this.scrollingContainer=v("div",{className:"highcharts-scrolling"},C,this.scrollingParent);var E;m(this.scrollingContainer,"scroll",function(){w.pointer&&(delete w.pointer.chartPosition,w.hoverPoint&&(E=w.hoverPoint),w.pointer.runPointActions(void 0,E,!0))}),this.innerContainer=v("div",{className:"highcharts-inner-container"},null,this.scrollingContainer),this.innerContainer.appendChild(this.container),this.setUpScrolling=null},a.prototype.moveFixedElements=function(){var w=this.container,C=this.fixedRenderer,E=".highcharts-breadcrumbs-group .highcharts-contextbutton .highcharts-credits .highcharts-legend .highcharts-legend-checkbox .highcharts-navigator-series .highcharts-navigator-xaxis .highcharts-navigator-yaxis .highcharts-navigator .highcharts-reset-zoom .highcharts-drillup-button .highcharts-scrollbar .highcharts-subtitle .highcharts-title".split(" "),T;this.scrollablePixelsX&&!this.inverted?T=".highcharts-yaxis":this.scrollablePixelsX&&this.inverted||this.scrollablePixelsY&&!this.inverted?T=".highcharts-xaxis":this.scrollablePixelsY&&this.inverted&&(T=".highcharts-yaxis"),T&&E.push(""+T+":not(.highcharts-radial-axis)",""+T+"-labels:not(.highcharts-radial-axis-labels)"),E.forEach(function(A){[].forEach.call(w.querySelectorAll(A),function(k){(k.namespaceURI===C.SVG_NS?C.box:C.box.parentNode).appendChild(k),k.style.pointerEvents="auto"})})},a.prototype.applyFixed=function(){var w=!this.fixedDiv,C=this.options.chart,E=C.scrollablePlotArea,T=l.getRendererType();w?(this.fixedDiv=v("div",{className:"highcharts-fixed"},{position:"absolute",overflow:"hidden",pointerEvents:"none",zIndex:(C.style&&C.style.zIndex||0)+2,top:0},null,!0),this.scrollingContainer&&this.scrollingContainer.parentNode.insertBefore(this.fixedDiv,this.scrollingContainer),this.renderTo.style.overflow="visible",this.fixedRenderer=C=new T(this.fixedDiv,this.chartWidth,this.chartHeight,this.options.chart.style),this.scrollableMask=C.path().attr({fill:this.options.chart.backgroundColor||"#fff","fill-opacity":_(E.opacity,.85),zIndex:-1}).addClass("highcharts-scrollable-mask").add(),m(this,"afterShowResetZoom",this.moveFixedElements),m(this,"afterApplyDrilldown",this.moveFixedElements),m(this,"afterLayOutTitles",this.moveFixedElements)):this.fixedRenderer.setSize(this.chartWidth,this.chartHeight),(this.scrollableDirty||w)&&(this.scrollableDirty=!1,this.moveFixedElements()),C=this.chartWidth+(this.scrollablePixelsX||0),T=this.chartHeight+(this.scrollablePixelsY||0),p(this.container),this.container.style.width=C+"px",this.container.style.height=T+"px",this.renderer.boxWrapper.attr({width:C,height:T,viewBox:[0,0,C,T].join(" ")}),this.chartBackground.attr({width:C,height:T}),this.scrollingContainer.style.height=this.chartHeight+"px",w&&(E.scrollPositionX&&(this.scrollingContainer.scrollLeft=this.scrollablePixelsX*E.scrollPositionX),E.scrollPositionY&&(this.scrollingContainer.scrollTop=this.scrollablePixelsY*E.scrollPositionY)),T=this.axisOffset,w=this.plotTop-T[0]-1,E=this.plotLeft-T[3]-1,C=this.plotTop+this.plotHeight+T[2]+1,T=this.plotLeft+this.plotWidth+T[1]+1;var A=this.plotLeft+this.plotWidth-(this.scrollablePixelsX||0),k=this.plotTop+this.plotHeight-(this.scrollablePixelsY||0);w=this.scrollablePixelsX?[["M",0,w],["L",this.plotLeft-1,w],["L",this.plotLeft-1,C],["L",0,C],["Z"],["M",A,w],["L",this.chartWidth,w],["L",this.chartWidth,C],["L",A,C],["Z"]]:this.scrollablePixelsY?[["M",E,0],["L",E,this.plotTop-1],["L",T,this.plotTop-1],["L",T,0],["Z"],["M",E,k],["L",E,this.chartHeight],["L",T,this.chartHeight],["L",T,k],["Z"]]:[["M",0,0]],this.redrawTrigger!=="adjustHeight"&&this.scrollableMask.attr({d:w})},m(o,"afterInit",function(){this.chart.scrollableDirty=!0}),m(s,"show",function(){this.chart.scrollableDirty=!0})}),r(n,"Core/Axis/Stacking/StackItem.js",[n["Core/FormatUtilities.js"],n["Core/Series/SeriesRegistry.js"],n["Core/Utilities.js"]],function(i,o,a){var s=i.format,l=o.series,u=a.destroyObjectProperties,p=a.pick,m=a.isNumber;return i=function(){function v(x,y,_,w,C){var E=x.chart.inverted,T=x.reversed;this.axis=x,x=this.isNegative=!!_!=!!T,this.options=y=y||{},this.x=w,this.cumulative=this.total=null,this.points={},this.hasValidPoints=!1,this.stack=C,this.rightCliff=this.leftCliff=0,this.alignOptions={align:y.align||(E?x?"left":"right":"center"),verticalAlign:y.verticalAlign||(E?"middle":x?"bottom":"top"),y:y.y,x:y.x},this.textAlign=y.textAlign||(E?x?"right":"left":"center")}return v.prototype.destroy=function(){u(this,this.axis)},v.prototype.render=function(x){var y=this.axis.chart,_=this.options,w=_.format;w=w?s(w,this,y):_.formatter.call(this),this.label?this.label.attr({text:w,visibility:"hidden"}):(this.label=y.renderer.label(w,null,void 0,_.shape,void 0,void 0,_.useHTML,!1,"stack-labels"),w={r:_.borderRadius||0,text:w,padding:p(_.padding,5),visibility:"hidden"},y.styledMode||(w.fill=_.backgroundColor,w.stroke=_.borderColor,w["stroke-width"]=_.borderWidth,this.label.css(_.style||{})),this.label.attr(w),this.label.added||this.label.add(x)),this.label.labelrank=y.plotSizeY},v.prototype.setOffset=function(x,y,_,w,C,E){var T=this.alignOptions,A=this.axis,k=this.label,X=this.options,Z=this.textAlign,W=A.chart;x=this.getStackBox({xOffset:x,width:y,boxBottom:_,boxTop:w,defaultX:C,xAxis:E}),C=T.verticalAlign,k&&x&&(y=k.getBBox(),_=k.padding,w=p(X.overflow,"justify")==="justify",T.x=X.x||0,T.y=X.y||0,C=this.adjustStackPosition({labelBox:y,verticalAlign:C,textAlign:Z}),Z=C.x,C=C.y,x.x-=Z,x.y-=C,k.align(T,!1,x),(Z=W.isInsidePlot(k.alignAttr.x+T.x+Z,k.alignAttr.y+T.y+C))||(w=!1),w&&l.prototype.justifyDataLabel.call(A,k,T,k.alignAttr,y,x),k.attr({x:k.alignAttr.x,y:k.alignAttr.y,rotation:X.rotation,rotationOriginX:y.width/2,rotationOriginY:y.height/2}),p(!w&&X.crop,!0)&&(Z=m(k.x)&&m(k.y)&&W.isInsidePlot(k.x-_+k.width,k.y)&&W.isInsidePlot(k.x+_,k.y)),k[Z?"show":"hide"]())},v.prototype.adjustStackPosition=function(x){var y=x.labelBox,_={bottom:0,middle:1,top:2,right:1,center:0,left:-1};return{x:y.width/2+y.width/2*_[x.textAlign],y:y.height/2*_[x.verticalAlign]}},v.prototype.getStackBox=function(x){var y=this.axis,_=y.chart,w=x.boxTop,C=x.defaultX,E=x.xOffset,T=x.width,A=x.boxBottom;return w=y.stacking.usePercentage?100:p(w,this.total,0),w=y.toPixels(w),x=p(C,(x.xAxis||_.xAxis[0]).toPixels(this.x))+E,y=y.toPixels(A||0),y=Math.abs(w-y),A=this.isNegative,_.inverted?{x:(A?w:w-y)-_.plotLeft,y:x-_.plotTop,width:y,height:T}:{x:x-_.plotLeft,y:(A?w-y:w)-_.plotTop,width:T,height:y}},v}(),i}),r(n,"Core/Axis/Stacking/StackingAxis.js",[n["Core/Animation/AnimationUtilities.js"],n["Core/Axis/Axis.js"],n["Core/Series/SeriesRegistry.js"],n["Core/Axis/Stacking/StackItem.js"],n["Core/Utilities.js"]],function(i,o,a,s,l){function u(){var z=this,O=z.inverted;z.yAxis.forEach(function(F){F.stacking&&F.stacking.stacks&&F.hasVisibleSeries&&(F.stacking.oldStacks=F.stacking.stacks)}),z.series.forEach(function(F){var G=F.xAxis&&F.xAxis.options||{};!F.options.stacking||F.visible!==!0&&z.options.chart.ignoreHiddenSeries!==!1||(F.stackKey=[F.type,N(F.options.stack,""),O?G.top:G.left,O?G.height:G.width].join())})}function p(){var z=this.stacking;if(z){var O=z.stacks;H(O,function(F,G){X(F),O[G]=null}),z&&z.stackTotalGroup&&z.stackTotalGroup.destroy()}}function m(){this.coll!=="yAxis"||this.stacking||(this.stacking=new j(this))}function v(z,O,F,G){return!k(z)||z.x!==O||G&&z.stackKey!==G?z={x:O,index:0,key:G,stackKey:G}:z.index++,z.key=[F,O,z.index].join(),z}function x(){var z=this,O=z.stackKey,F=z.yAxis.stacking.stacks,G=z.processedXData,q=z[z.options.stacking+"Stacker"],ee;q&&[O,"-"+O].forEach(function(re){for(var ce=G.length,fe,J;ce--;)fe=G[ce],ee=z.getStackIndicator(ee,fe,z.index,re),(J=(fe=F[re]&&F[re][fe])&&fe.points[ee.key])&&q.call(z,J,fe,ce)})}function y(z,O,F){O=O.total?100/O.total:0,z[0]=A(z[0]*O),z[1]=A(z[1]*O),this.stackedYData[F]=z[1]}function _(){var z=this.yAxis.stacking;this.options.centerInCategory&&(this.is("column")||this.is("columnrange"))&&!this.options.stacking&&1<this.chart.series.length?E.setStackedPoints.call(this,"group"):z&&H(z.stacks,function(O,F){F.slice(-5)==="group"&&(H(O,function(G){return G.destroy()}),delete z.stacks[F])})}function w(z){var O=this.chart,F=z||this.options.stacking;if(F&&(this.visible===!0||O.options.chart.ignoreHiddenSeries===!1)){var G=this.processedXData,q=this.processedYData,ee=[],re=q.length,ce=this.options,fe=ce.threshold,J=N(ce.startFromThreshold&&fe,0);ce=ce.stack,z=z?""+this.type+",".concat(F):this.stackKey;var oe="-"+z,ve=this.negStacks;O=F==="group"?O.yAxis[0]:this.yAxis;var ye=O.stacking.stacks,xe=O.stacking.oldStacks,se,me;for(O.stacking.stacksTouched+=1,me=0;me<re;me++){var pe=G[me],Ce=q[me],Pe=this.getStackIndicator(Pe,pe,this.index),Re=Pe.key,ke=(se=ve&&Ce<(J?0:fe))?oe:z;ye[ke]||(ye[ke]={}),ye[ke][pe]||(xe[ke]&&xe[ke][pe]?(ye[ke][pe]=xe[ke][pe],ye[ke][pe].total=null):ye[ke][pe]=new s(O,O.options.stackLabels,!!se,pe,ce)),ke=ye[ke][pe],Ce!==null?(ke.points[Re]=ke.points[this.index]=[N(ke.cumulative,J)],k(ke.cumulative)||(ke.base=Re),ke.touched=O.stacking.stacksTouched,0<Pe.index&&this.singleStacks===!1&&(ke.points[Re][0]=ke.points[this.index+","+pe+",0"][0])):ke.points[Re]=ke.points[this.index]=null,F==="percent"?(se=se?z:oe,ve&&ye[se]&&ye[se][pe]?(se=ye[se][pe],ke.total=se.total=Math.max(se.total,ke.total)+Math.abs(Ce)||0):ke.total=A(ke.total+(Math.abs(Ce)||0))):F==="group"?(W(Ce)&&(Ce=Ce[0]),Ce!==null&&(ke.total=(ke.total||0)+1)):ke.total=A(ke.total+(Ce||0)),ke.cumulative=F==="group"?(ke.total||1)-1:N(ke.cumulative,J)+(Ce||0),Ce!==null&&(ke.points[Re].push(ke.cumulative),ee[me]=ke.cumulative,ke.hasValidPoints=!0)}F==="percent"&&(O.stacking.usePercentage=!0),F!=="group"&&(this.stackedYData=ee),O.stacking.oldStacks={}}}var C=i.getDeferredAnimation,E=a.series.prototype,T=l.addEvent,A=l.correctFloat,k=l.defined,X=l.destroyObjectProperties,Z=l.fireEvent,W=l.isArray,D=l.isNumber,H=l.objectEach,N=l.pick,j=function(){function z(O){this.oldStacks={},this.stacks={},this.stacksTouched=0,this.axis=O}return z.prototype.buildStacks=function(){var O=this.axis,F=O.series,G=O.options.reversedStacks,q=F.length,ee;for(this.usePercentage=!1,ee=q;ee--;){var re=F[G?ee:q-ee-1];re.setStackedPoints(),re.setGroupedPoints()}for(ee=0;ee<q;ee++)F[ee].modifyStacks();Z(O,"afterBuildStacks")},z.prototype.cleanStacks=function(){if(this.oldStacks)var O=this.stacks=this.oldStacks;H(O,function(F){H(F,function(G){G.cumulative=G.total})})},z.prototype.resetStacks=function(){var O=this;H(this.stacks,function(F){H(F,function(G,q){D(G.touched)&&G.touched<O.stacksTouched?(G.destroy(),delete F[q]):(G.total=null,G.cumulative=null)})})},z.prototype.renderStackTotals=function(){var O=this.axis,F=O.chart,G=F.renderer,q=this.stacks;O=C(F,O.options.stackLabels&&O.options.stackLabels.animation||!1);var ee=this.stackTotalGroup=this.stackTotalGroup||G.g("stack-labels").attr({zIndex:6,opacity:0}).add();ee.translate(F.plotLeft,F.plotTop),H(q,function(re){H(re,function(ce){ce.render(ee)})}),ee.animate({opacity:1},O)},z}(),$;return function(z){var O=[];z.compose=function(F,G,q){O.indexOf(F)===-1&&(O.push(F),T(F,"init",m),T(F,"destroy",p)),O.indexOf(G)===-1&&(O.push(G),G.prototype.getStacks=u),O.indexOf(q)===-1&&(O.push(q),F=q.prototype,F.getStackIndicator=v,F.modifyStacks=x,F.percentStacker=y,F.setGroupedPoints=_,F.setStackedPoints=w)}}($||($={})),$}),r(n,"Series/Line/LineSeries.js",[n["Core/Series/Series.js"],n["Core/Series/SeriesRegistry.js"],n["Core/Utilities.js"]],function(i,o,a){var s=this&&this.__extends||function(){var p=function(m,v){return p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,y){x.__proto__=y}||function(x,y){for(var _ in y)y.hasOwnProperty(_)&&(x[_]=y[_])},p(m,v)};return function(m,v){function x(){this.constructor=m}p(m,v),m.prototype=v===null?Object.create(v):(x.prototype=v.prototype,new x)}}(),l=a.defined,u=a.merge;return a=function(p){function m(){var v=p!==null&&p.apply(this,arguments)||this;return v.data=void 0,v.options=void 0,v.points=void 0,v}return s(m,p),m.prototype.drawGraph=function(){var v=this,x=this.options,y=(this.gappedPath||this.getGraphPath).call(this),_=this.chart.styledMode,w=[["graph","highcharts-graph"]];_||w[0].push(x.lineColor||this.color||"#cccccc",x.dashStyle),w=v.getZonesGraphs(w),w.forEach(function(C,E){var T=C[0],A=v[T],k=A?"animate":"attr";A?(A.endX=v.preventGraphAnimation?null:y.xMap,A.animate({d:y})):y.length&&(v[T]=A=v.chart.renderer.path(y).addClass(C[1]).attr({zIndex:1}).add(v.group)),A&&!_&&(T={stroke:C[2],"stroke-width":x.lineWidth||0,fill:v.fillGraph&&v.color||"none"},C[3]?T.dashstyle=C[3]:x.linecap!=="square"&&(T["stroke-linecap"]=T["stroke-linejoin"]="round"),A[k](T).shadow(2>E&&x.shadow)),A&&(A.startX=y.xMap,A.isArea=y.isArea)})},m.prototype.getGraphPath=function(v,x,y){var _=this,w=_.options,C=[],E=[],T,A=w.step;v=v||_.points;var k=v.reversed;return k&&v.reverse(),(A={right:1,center:2}[A]||A&&3)&&k&&(A=4-A),v=this.getValidPoints(v,!1,!(w.connectNulls&&!x&&!y)),v.forEach(function(X,Z){var W=X.plotX,D=X.plotY,H=v[Z-1];(X.leftCliff||H&&H.rightCliff)&&!y&&(T=!0),X.isNull&&!l(x)&&0<Z?T=!w.connectNulls:X.isNull&&!x?T=!0:(Z===0||T?Z=[["M",X.plotX,X.plotY]]:_.getPointSpline?Z=[_.getPointSpline(v,X,Z)]:A?(Z=A===1?[["L",H.plotX,D]]:A===2?[["L",(H.plotX+W)/2,H.plotY],["L",(H.plotX+W)/2,D]]:[["L",W,H.plotY]],Z.push(["L",W,D])):Z=[["L",W,D]],E.push(X.x),A&&(E.push(X.x),A===2&&E.push(X.x)),C.push.apply(C,Z),T=!1)}),C.xMap=E,_.graphPath=C},m.prototype.getZonesGraphs=function(v){return this.zones.forEach(function(x,y){y=["zone-graph-"+y,"highcharts-graph highcharts-zone-graph-"+y+" "+(x.className||"")],this.chart.styledMode||y.push(x.color||this.color,x.dashStyle||this.options.dashStyle),v.push(y)},this),v},m.defaultOptions=u(i.defaultOptions,{}),m}(i),o.registerSeriesType("line",a),a}),r(n,"Series/Area/AreaSeries.js",[n["Core/Color/Color.js"],n["Core/Legend/LegendSymbol.js"],n["Core/Series/SeriesRegistry.js"],n["Core/Utilities.js"]],function(i,o,a,s){var l=this&&this.__extends||function(){var y=function(_,w){return y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(C,E){C.__proto__=E}||function(C,E){for(var T in E)E.hasOwnProperty(T)&&(C[T]=E[T])},y(_,w)};return function(_,w){function C(){this.constructor=_}y(_,w),_.prototype=w===null?Object.create(w):(C.prototype=w.prototype,new C)}}(),u=i.parse,p=a.seriesTypes.line;i=s.extend;var m=s.merge,v=s.objectEach,x=s.pick;return s=function(y){function _(){var w=y!==null&&y.apply(this,arguments)||this;return w.data=void 0,w.options=void 0,w.points=void 0,w}return l(_,y),_.prototype.drawGraph=function(){this.areaPath=[],y.prototype.drawGraph.apply(this);var w=this,C=this.areaPath,E=this.options,T=[["area","highcharts-area",this.color,E.fillColor]];this.zones.forEach(function(A,k){T.push(["zone-area-"+k,"highcharts-area highcharts-zone-area-"+k+" "+A.className,A.color||w.color,A.fillColor||E.fillColor])}),T.forEach(function(A){var k=A[0],X={},Z=w[k],W=Z?"animate":"attr";Z?(Z.endX=w.preventGraphAnimation?null:C.xMap,Z.animate({d:C})):(X.zIndex=0,Z=w[k]=w.chart.renderer.path(C).addClass(A[1]).add(w.group),Z.isArea=!0),w.chart.styledMode||(X.fill=x(A[3],u(A[2]).setOpacity(x(E.fillOpacity,.75)).get())),Z[W](X),Z.startX=C.xMap,Z.shiftUnit=E.step?2:1})},_.prototype.getGraphPath=function(w){var C=p.prototype.getGraphPath,E=this.options,T=E.stacking,A=this.yAxis,k=[],X=[],Z=this.index,W=A.stacking.stacks[this.stackKey],D=E.threshold,H=Math.round(A.getThreshold(E.threshold));E=x(E.connectNulls,T==="percent");var N=function(G,q,ee){var re=w[G];G=T&&W[re.x].points[Z];var ce=re[ee+"Null"]||0;if(ee=re[ee+"Cliff"]||0,re=!0,ee||ce){var fe=(ce?G[0]:G[1])+ee,J=G[0]+ee;re=!!ce}else!T&&w[q]&&w[q].isNull&&(fe=J=D);typeof fe!="undefined"&&(X.push({plotX:O,plotY:fe===null?H:A.getThreshold(fe),isNull:re,isCliff:!0}),k.push({plotX:O,plotY:J===null?H:A.getThreshold(J),doCurve:!1}))};w=w||this.points,T&&(w=this.getStackPoints(w));for(var j=0,$=w.length;j<$;++j){T||(w[j].leftCliff=w[j].rightCliff=w[j].leftNull=w[j].rightNull=void 0);var z=w[j].isNull,O=x(w[j].rectPlotX,w[j].plotX),F=T?x(w[j].yBottom,H):H;(!z||E)&&(E||N(j,j-1,"left"),z&&!T&&E||(X.push(w[j]),k.push({x:j,plotX:O,plotY:F})),E||N(j,j+1,"right"))}return N=C.call(this,X,!0,!0),k.reversed=!0,z=C.call(this,k,!0,!0),(F=z[0])&&F[0]==="M"&&(z[0]=["L",F[1],F[2]]),z=N.concat(z),z.length&&z.push(["Z"]),C=C.call(this,X,!1,E),z.xMap=N.xMap,this.areaPath=z,C},_.prototype.getStackPoints=function(w){var C=this,E=[],T=[],A=this.xAxis,k=this.yAxis,X=k.stacking.stacks[this.stackKey],Z={},W=k.series,D=W.length,H=k.options.reversedStacks?1:-1,N=W.indexOf(C);if(w=w||this.points,this.options.stacking){for(var j=0;j<w.length;j++)w[j].leftNull=w[j].rightNull=void 0,Z[w[j].x]=w[j];v(X,function(z,O){z.total!==null&&T.push(O)}),T.sort(function(z,O){return z-O});var $=W.map(function(z){return z.visible});T.forEach(function(z,O){var F=0,G,q;if(Z[z]&&!Z[z].isNull)E.push(Z[z]),[-1,1].forEach(function(re){var ce=re===1?"rightNull":"leftNull",fe=X[T[O+re]],J=0;if(fe)for(var oe=N;0<=oe&&oe<D;){var ve=W[oe].index;G=fe.points[ve],G||(ve===C.index?Z[z][ce]=!0:$[oe]&&(q=X[z].points[ve])&&(J-=q[1]-q[0])),oe+=H}Z[z][re===1?"rightCliff":"leftCliff"]=J});else{for(var ee=N;0<=ee&&ee<D;){if(G=X[z].points[W[ee].index]){F=G[1];break}ee+=H}F=x(F,0),F=k.translate(F,0,1,0,1),E.push({isNull:!0,plotX:A.translate(z,0,0,0,1),x:z,plotY:F,yBottom:F})}})}return E},_.defaultOptions=m(p.defaultOptions,{threshold:0}),_}(p),i(s.prototype,{singleStacks:!1,drawLegendSymbol:o.drawRectangle}),a.registerSeriesType("area",s),s}),r(n,"Series/Spline/SplineSeries.js",[n["Core/Series/SeriesRegistry.js"],n["Core/Utilities.js"]],function(i,o){var a=this&&this.__extends||function(){var p=function(m,v){return p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,y){x.__proto__=y}||function(x,y){for(var _ in y)y.hasOwnProperty(_)&&(x[_]=y[_])},p(m,v)};return function(m,v){function x(){this.constructor=m}p(m,v),m.prototype=v===null?Object.create(v):(x.prototype=v.prototype,new x)}}(),s=i.seriesTypes.line,l=o.merge,u=o.pick;return o=function(p){function m(){var v=p!==null&&p.apply(this,arguments)||this;return v.data=void 0,v.options=void 0,v.points=void 0,v}return a(m,p),m.prototype.getPointSpline=function(v,x,y){var _=x.plotX||0,w=x.plotY||0,C=v[y-1];if(y=v[y+1],C&&!C.isNull&&C.doCurve!==!1&&!x.isCliff&&y&&!y.isNull&&y.doCurve!==!1&&!x.isCliff){v=C.plotY||0;var E=y.plotX||0;y=y.plotY||0;var T=0,A=(1.5*_+(C.plotX||0))/2.5,k=(1.5*w+v)/2.5;E=(1.5*_+E)/2.5;var X=(1.5*w+y)/2.5;E!==A&&(T=(X-k)*(E-_)/(E-A)+w-X),k+=T,X+=T,k>v&&k>w?(k=Math.max(v,w),X=2*w-k):k<v&&k<w&&(k=Math.min(v,w),X=2*w-k),X>y&&X>w?(X=Math.max(y,w),k=2*w-X):X<y&&X<w&&(X=Math.min(y,w),k=2*w-X),x.rightContX=E,x.rightContY=X}return x=["C",u(C.rightContX,C.plotX,0),u(C.rightContY,C.plotY,0),u(A,_,0),u(k,w,0),_,w],C.rightContX=C.rightContY=void 0,x},m.defaultOptions=l(s.defaultOptions),m}(s),i.registerSeriesType("spline",o),o}),r(n,"Series/AreaSpline/AreaSplineSeries.js",[n["Series/Spline/SplineSeries.js"],n["Core/Legend/LegendSymbol.js"],n["Core/Series/SeriesRegistry.js"],n["Core/Utilities.js"]],function(i,o,a,s){var l=this&&this.__extends||function(){var x=function(y,_){return x=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(w,C){w.__proto__=C}||function(w,C){for(var E in C)C.hasOwnProperty(E)&&(w[E]=C[E])},x(y,_)};return function(y,_){function w(){this.constructor=y}x(y,_),y.prototype=_===null?Object.create(_):(w.prototype=_.prototype,new w)}}(),u=a.seriesTypes,p=u.area;u=u.area.prototype;var m=s.extend,v=s.merge;return s=function(x){function y(){var _=x!==null&&x.apply(this,arguments)||this;return _.data=void 0,_.points=void 0,_.options=void 0,_}return l(y,x),y.defaultOptions=v(i.defaultOptions,p.defaultOptions),y}(i),m(s.prototype,{getGraphPath:u.getGraphPath,getStackPoints:u.getStackPoints,drawGraph:u.drawGraph,drawLegendSymbol:o.drawRectangle}),a.registerSeriesType("areaspline",s),s}),r(n,"Series/Column/ColumnSeriesDefaults.js",[],function(){return{borderRadius:0,centerInCategory:!1,groupPadding:.2,marker:null,pointPadding:.1,minPointLength:0,cropThreshold:50,pointRange:null,states:{hover:{halo:!1,brightness:.1},select:{color:"#cccccc",borderColor:"#000000"}},dataLabels:{align:void 0,verticalAlign:void 0,y:void 0},startFromThreshold:!0,stickyTracking:!1,tooltip:{distance:6},threshold:0,borderColor:"#ffffff"}}),r(n,"Series/Column/ColumnSeries.js",[n["Core/Animation/AnimationUtilities.js"],n["Core/Color/Color.js"],n["Series/Column/ColumnSeriesDefaults.js"],n["Core/Globals.js"],n["Core/Legend/LegendSymbol.js"],n["Core/Series/Series.js"],n["Core/Series/SeriesRegistry.js"],n["Core/Utilities.js"]],function(i,o,a,s,l,u,p,m){var v=this&&this.__extends||function(){var D=function(H,N){return D=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(j,$){j.__proto__=$}||function(j,$){for(var z in $)$.hasOwnProperty(z)&&(j[z]=$[z])},D(H,N)};return function(H,N){function j(){this.constructor=H}D(H,N),H.prototype=N===null?Object.create(N):(j.prototype=N.prototype,new j)}}(),x=i.animObject,y=o.parse,_=s.hasTouch;i=s.noop;var w=m.clamp,C=m.defined,E=m.extend,T=m.fireEvent,A=m.isArray,k=m.isNumber,X=m.merge,Z=m.pick,W=m.objectEach;return m=function(D){function H(){var N=D!==null&&D.apply(this,arguments)||this;return N.borderWidth=void 0,N.data=void 0,N.group=void 0,N.options=void 0,N.points=void 0,N}return v(H,D),H.prototype.animate=function(N){var j=this,$=this.yAxis,z=j.options,O=this.chart.inverted,F={},G=O?"translateX":"translateY";if(N)F.scaleY=.001,N=w($.toPixels(z.threshold),$.pos,$.pos+$.len),O?F.translateX=N-$.len:F.translateY=N,j.clipBox&&j.setClip(),j.group.attr(F);else{var q=Number(j.group.attr(G));j.group.animate({scaleY:1},E(x(j.options.animation),{step:function(ee,re){j.group&&(F[G]=q+re.pos*($.pos-q),j.group.attr(F))}}))}},H.prototype.init=function(N,j){D.prototype.init.apply(this,arguments);var $=this;N=$.chart,N.hasRendered&&N.series.forEach(function(z){z.type===$.type&&(z.isDirty=!0)})},H.prototype.getColumnMetrics=function(){var N=this,j=N.options,$=N.xAxis,z=N.yAxis,O=$.options.reversedStacks;O=$.reversed&&!O||!$.reversed&&O;var F={},G,q=0;j.grouping===!1?q=1:N.chart.series.forEach(function(fe){var J=fe.yAxis,oe=fe.options;if(fe.type===N.type&&(fe.visible||!N.chart.options.chart.ignoreHiddenSeries)&&z.len===J.len&&z.pos===J.pos){if(oe.stacking&&oe.stacking!=="group"){G=fe.stackKey,typeof F[G]=="undefined"&&(F[G]=q++);var ve=F[G]}else oe.grouping!==!1&&(ve=q++);fe.columnIndex=ve}});var ee=Math.min(Math.abs($.transA)*($.ordinal&&$.ordinal.slope||j.pointRange||$.closestPointRange||$.tickInterval||1),$.len),re=ee*j.groupPadding,ce=(ee-2*re)/(q||1);return j=Math.min(j.maxPointWidth||$.len,Z(j.pointWidth,ce*(1-2*j.pointPadding))),N.columnMetrics={width:j,offset:(ce-j)/2+(re+((N.columnIndex||0)+(O?1:0))*ce-ee/2)*(O?-1:1),paddedWidth:ce,columnCount:q},N.columnMetrics},H.prototype.crispCol=function(N,j,$,z){var O=this.chart,F=this.borderWidth,G=-(F%2?.5:0);return F=F%2?.5:1,O.inverted&&O.renderer.isVML&&(F+=1),this.options.crisp&&($=Math.round(N+$)+G,N=Math.round(N)+G,$-=N),z=Math.round(j+z)+F,G=.5>=Math.abs(j)&&.5<z,j=Math.round(j)+F,z-=j,G&&z&&(--j,z+=1),{x:N,y:j,width:$,height:z}},H.prototype.adjustForMissingColumns=function(N,j,$,z){var O=this,F=this.options.stacking;if(!$.isNull&&1<z.columnCount){var G=this.yAxis.options.reversedStacks,q=0,ee=G?0:-z.columnCount;W(this.yAxis.stacking&&this.yAxis.stacking.stacks,function(re){if(typeof $.x=="number"){var ce=re[$.x.toString()];ce&&(re=ce.points[O.index],F?(re&&(q=ee),ce.hasValidPoints&&(G?ee++:ee--)):A(re)&&(re=Object.keys(ce.points).filter(function(fe){return!fe.match(",")&&ce.points[fe]&&1<ce.points[fe].length}).map(parseFloat).sort(function(fe,J){return J-fe}),q=re.indexOf(O.index),ee=re.length))}}),N=($.plotX||0)+((ee-1)*z.paddedWidth+j)/2-j-q*z.paddedWidth}return N},H.prototype.translate=function(){var N=this,j=N.chart,$=N.options,z=N.dense=2>N.closestPointRange*N.xAxis.transA;z=N.borderWidth=Z($.borderWidth,z?0:1);var O=N.xAxis,F=N.yAxis,G=$.threshold,q=N.translatedThreshold=F.getThreshold(G),ee=Z($.minPointLength,5),re=N.getColumnMetrics(),ce=re.width,fe=N.pointXOffset=re.offset,J=N.dataMin,oe=N.dataMax,ve=N.barW=Math.max(ce,1+2*z);j.inverted&&(q-=.5),$.pointPadding&&(ve=Math.ceil(ve)),u.prototype.translate.apply(N),N.points.forEach(function(ye){var xe=Z(ye.yBottom,q),se=999+Math.abs(xe),me=ye.plotX||0;se=w(ye.plotY,-se,F.len+se);var pe=Math.min(se,xe),Ce=Math.max(se,xe)-pe,Pe=ce,Re=me+fe,ke=ve;ee&&Math.abs(Ce)<ee&&(Ce=ee,me=!F.reversed&&!ye.negative||F.reversed&&ye.negative,k(G)&&k(oe)&&ye.y===G&&oe<=G&&(F.min||0)<G&&(J!==oe||(F.max||0)<=G)&&(me=!me),pe=Math.abs(pe-q)>ee?xe-ee:q-(me?ee:0)),C(ye.options.pointWidth)&&(Pe=ke=Math.ceil(ye.options.pointWidth),Re-=Math.round((Pe-ce)/2)),$.centerInCategory&&(Re=N.adjustForMissingColumns(Re,Pe,ye,re)),ye.barX=Re,ye.pointWidth=Pe,ye.tooltipPos=j.inverted?[w(F.len+F.pos-j.plotLeft-se,F.pos-j.plotLeft,F.len+F.pos-j.plotLeft),O.len+O.pos-j.plotTop-Re-ke/2,Ce]:[O.left-j.plotLeft+Re+ke/2,w(se+F.pos-j.plotTop,F.pos-j.plotTop,F.len+F.pos-j.plotTop),Ce],ye.shapeType=N.pointClass.prototype.shapeType||"rect",ye.shapeArgs=N.crispCol.apply(N,ye.isNull?[Re,q,ke,0]:[Re,pe,ke,Ce])})},H.prototype.drawGraph=function(){this.group[this.dense?"addClass":"removeClass"]("highcharts-dense-data")},H.prototype.pointAttribs=function(N,j){var $=this.options,z=this.pointAttrToOptions||{},O=z.stroke||"borderColor",F=z["stroke-width"]||"borderWidth",G=N&&N.color||this.color,q=N&&N[O]||$[O]||G;z=N&&N.options.dashStyle||$.dashStyle;var ee=N&&N[F]||$[F]||this[F]||0,re=Z(N&&N.opacity,$.opacity,1);if(N&&this.zones.length){var ce=N.getZone();G=N.options.color||ce&&(ce.color||N.nonZonedColor)||this.color,ce&&(q=ce.borderColor||q,z=ce.dashStyle||z,ee=ce.borderWidth||ee)}return j&&N&&(N=X($.states[j],N.options.states&&N.options.states[j]||{}),j=N.brightness,G=N.color||typeof j!="undefined"&&y(G).brighten(N.brightness).get()||G,q=N[O]||q,ee=N[F]||ee,z=N.dashStyle||z,re=Z(N.opacity,re)),O={fill:G,stroke:q,"stroke-width":ee,opacity:re},z&&(O.dashstyle=z),O},H.prototype.drawPoints=function(N){N===void 0&&(N=this.points);var j=this,$=this.chart,z=j.options,O=$.renderer,F=z.animationLimit||250,G;N.forEach(function(q){var ee=q.graphic,re=!!ee,ce=ee&&$.pointCount<F?"animate":"attr";k(q.plotY)&&q.y!==null?(G=q.shapeArgs,ee&&q.hasNewShapeType()&&(ee=ee.destroy()),j.enabledDataSorting&&(q.startXPos=j.xAxis.reversed?-(G&&G.width||0):j.xAxis.width),ee||(q.graphic=ee=O[q.shapeType](G).add(q.group||j.group))&&j.enabledDataSorting&&$.hasRendered&&$.pointCount<F&&(ee.attr({x:q.startXPos}),re=!0,ce="animate"),ee&&re&&ee[ce](X(G)),z.borderRadius&&ee[ce]({r:z.borderRadius}),$.styledMode||ee[ce](j.pointAttribs(q,q.selected&&"select")).shadow(q.allowShadow!==!1&&z.shadow,null,z.stacking&&!z.borderRadius),ee&&(ee.addClass(q.getClassName(),!0),ee.attr({visibility:q.visible?"inherit":"hidden"}))):ee&&(q.graphic=ee.destroy())})},H.prototype.drawTracker=function(N){N===void 0&&(N=this.points);var j=this,$=j.chart,z=$.pointer,O=function(G){var q=z.getPointFromEvent(G);typeof q!="undefined"&&(z.isDirectTouch=!0,q.onMouseOver(G))},F;N.forEach(function(G){F=A(G.dataLabels)?G.dataLabels:G.dataLabel?[G.dataLabel]:[],G.graphic&&(G.graphic.element.point=G),F.forEach(function(q){q.div?q.div.point=G:q.element.point=G})}),j._hasTracking||(j.trackerGroups.forEach(function(G){j[G]&&(j[G].addClass("highcharts-tracker").on("mouseover",O).on("mouseout",function(q){z.onTrackerMouseOut(q)}),_&&j[G].on("touchstart",O),!$.styledMode&&j.options.cursor&&j[G].css({cursor:j.options.cursor}))}),j._hasTracking=!0),T(this,"afterDrawTracker")},H.prototype.remove=function(){var N=this,j=N.chart;j.hasRendered&&j.series.forEach(function($){$.type===N.type&&($.isDirty=!0)}),u.prototype.remove.apply(N,arguments)},H.defaultOptions=X(u.defaultOptions,a),H}(u),E(m.prototype,{cropShoulder:0,directTouch:!0,drawLegendSymbol:l.drawRectangle,getSymbol:i,negStacks:!0,trackerGroups:["group","dataLabelsGroup"]}),p.registerSeriesType("column",m),m}),r(n,"Core/Series/DataLabel.js",[n["Core/Animation/AnimationUtilities.js"],n["Core/FormatUtilities.js"],n["Core/Utilities.js"]],function(i,o,a){var s=i.getDeferredAnimation,l=o.format,u=a.defined,p=a.extend,m=a.fireEvent,v=a.isArray,x=a.isString,y=a.merge,_=a.objectEach,w=a.pick,C=a.splat,E;return function(T){function A(N,j,$,z,O){var F=this,G=this.chart,q=this.isCartesian&&G.inverted,ee=this.enabledDataSorting,re=N.plotX,ce=N.plotY,fe=$.rotation,J=$.align,oe=u(re)&&u(ce)&&G.isInsidePlot(re,Math.round(ce),{inverted:q,paneCoordinates:!0,series:F});ce=function(se){ee&&F.xAxis&&!ve&&F.setDataLabelStartPos(N,j,O,oe,se)};var ve=w($.overflow,ee?"none":"justify")==="justify";if(re=this.visible&&N.visible!==!1&&u(re)&&(N.series.forceDL||ee&&!ve||oe||w($.inside,!!this.options.stacking)&&z&&G.isInsidePlot(re,q?z.x+1:z.y+z.height-1,{inverted:q,paneCoordinates:!0,series:F})),q=N.pos(),re&&q){fe&&j.attr({align:J}),J=j.getBBox(!0);var ye=[0,0],xe=G.renderer.fontMetrics(G.styledMode?void 0:$.style.fontSize,j).b;z=p({x:q[0],y:Math.round(q[1]),width:0,height:0},z),p($,{width:J.width,height:J.height}),fe?(ve=!1,ye=G.renderer.rotCorr(xe,fe),xe={x:z.x+($.x||0)+z.width/2+ye.x,y:z.y+($.y||0)+{top:0,middle:.5,bottom:1}[$.verticalAlign]*z.height},ye=[J.x-Number(j.attr("x")),J.y-Number(j.attr("y"))],ce(xe),j[O?"attr":"animate"](xe)):(ce(z),j.align($,void 0,z),xe=j.alignAttr),ve&&0<=z.height?this.justifyDataLabel(j,$,xe,J,z,O):w($.crop,!0)&&(z=xe.x,ce=xe.y,z+=ye[0],ce+=ye[1],re=G.isInsidePlot(z,ce,{paneCoordinates:!0,series:F})&&G.isInsidePlot(z+J.width,ce+J.height,{paneCoordinates:!0,series:F})),$.shape&&!fe&&j[O?"attr":"animate"]({anchorX:q[0],anchorY:q[1]})}O&&ee&&(j.placed=!1),re||ee&&!ve?j.show():(j.hide(),j.placed=!1)}function k(N,j){var $=j.filter;return $?(j=$.operator,N=N[$.property],$=$.value,j===">"&&N>$||j==="<"&&N<$||j===">="&&N>=$||j==="<="&&N<=$||j==="=="&&N==$||j==="==="&&N===$):!0}function X(N){N===void 0&&(N=this.points);var j=this,$=j.chart,z=j.options,O=j.hasRendered||0,F=$.renderer,G=$.options.chart,q=G.backgroundColor;G=G.plotBackgroundColor;var ee=F.getContrast(x(G)&&G||x(q)&&q||"#000000"),re=z.dataLabels,ce;if(q=re.animation,q=re.defer?s($,q,j):{defer:0,duration:0},re=W(W($.options.plotOptions&&$.options.plotOptions.series&&$.options.plotOptions.series.dataLabels,$.options.plotOptions&&$.options.plotOptions[j.type]&&$.options.plotOptions[j.type].dataLabels),re),m(this,"drawDataLabels"),v(re)||re.enabled||j._hasPointLabels){var fe=j.plotGroup("dataLabelsGroup","data-labels",O?"inherit":"hidden",re.zIndex||6);fe.attr({opacity:+O}),!O&&(O=j.dataLabelsGroup)&&(j.visible&&fe.show(),O[z.animation?"animate":"attr"]({opacity:1},q)),N.forEach(function(J){ce=C(W(re,J.dlOptions||J.options&&J.options.dataLabels)),ce.forEach(function(oe,ve){var ye=oe.enabled&&(!J.isNull||J.dataLabelOnNull)&&k(J,oe),xe=J.connectors?J.connectors[ve]:J.connector,se=J.dataLabels?J.dataLabels[ve]:J.dataLabel,me=!se,pe=w(oe.distance,J.labelDistance);if(ye){var Ce=J.getLabelConfig(),Pe=w(oe[J.formatPrefix+"Format"],oe.format);Ce=u(Pe)?l(Pe,Ce,$):(oe[J.formatPrefix+"Formatter"]||oe.formatter).call(Ce,oe),Pe=oe.style;var Re=oe.rotation;$.styledMode||(Pe.color=w(oe.color,Pe.color,j.color,"#000000"),Pe.color==="contrast"?(J.contrastColor=F.getContrast(J.color||j.color),Pe.color=!u(pe)&&oe.inside||0>pe||z.stacking?J.contrastColor:ee):delete J.contrastColor,z.cursor&&(Pe.cursor=z.cursor));var ke={r:oe.borderRadius||0,rotation:Re,padding:oe.padding,zIndex:1};if(!$.styledMode){pe=oe.backgroundColor;var ze=oe.borderColor;ke.fill=pe==="auto"?J.color:pe,ke.stroke=ze==="auto"?J.color:ze,ke["stroke-width"]=oe.borderWidth}_(ke,function(Ge,ht){typeof Ge=="undefined"&&delete ke[ht]})}!se||ye&&u(Ce)&&!!se.div==!!oe.useHTML&&(se.rotation&&oe.rotation||se.rotation===oe.rotation)||(me=!0,J.dataLabel=se=J.dataLabel&&J.dataLabel.destroy(),J.dataLabels&&(J.dataLabels.length===1?delete J.dataLabels:delete J.dataLabels[ve]),ve||delete J.dataLabel,xe&&(J.connector=J.connector.destroy(),J.connectors&&(J.connectors.length===1?delete J.connectors:delete J.connectors[ve]))),ye&&u(Ce)?(se?ke.text=Ce:(J.dataLabels=J.dataLabels||[],se=J.dataLabels[ve]=Re?F.text(Ce,0,0,oe.useHTML).addClass("highcharts-data-label"):F.label(Ce,0,0,oe.shape,null,null,oe.useHTML,null,"data-label"),ve||(J.dataLabel=se),se.addClass(" highcharts-data-label-color-"+J.colorIndex+" "+(oe.className||"")+(oe.useHTML?" highcharts-tracker":""))),se.options=oe,se.attr(ke),$.styledMode||se.css(Pe).shadow(oe.shadow),(ve=oe[J.formatPrefix+"TextPath"]||oe.textPath)&&!oe.useHTML&&(se.setTextPath(J.getDataLabelPath&&J.getDataLabelPath(se)||J.graphic,ve),J.dataLabelPath&&!ve.enabled&&(J.dataLabelPath=J.dataLabelPath.destroy())),se.added||se.add(fe),j.alignDataLabel(J,se,oe,null,me)):se&&se.hide()})})}m(this,"afterDrawDataLabels")}function Z(N,j,$,z,O,F){var G=this.chart,q=j.align,ee=j.verticalAlign,re=N.box?0:N.padding||0,ce=j.x;ce=ce===void 0?0:ce;var fe=j.y;fe=fe===void 0?0:fe;var J=($.x||0)+re;if(0>J){q==="right"&&0<=ce?(j.align="left",j.inside=!0):ce-=J;var oe=!0}return J=($.x||0)+z.width-re,J>G.plotWidth&&(q==="left"&&0>=ce?(j.align="right",j.inside=!0):ce+=G.plotWidth-J,oe=!0),J=$.y+re,0>J&&(ee==="bottom"&&0<=fe?(j.verticalAlign="top",j.inside=!0):fe-=J,oe=!0),J=($.y||0)+z.height-re,J>G.plotHeight&&(ee==="top"&&0>=fe?(j.verticalAlign="bottom",j.inside=!0):fe+=G.plotHeight-J,oe=!0),oe&&(j.x=ce,j.y=fe,N.placed=!F,N.align(j,void 0,O)),oe}function W(N,j){var $=[],z;if(v(N)&&!v(j))$=N.map(function(O){return y(O,j)});else if(v(j)&&!v(N))$=j.map(function(O){return y(N,O)});else if(v(N)||v(j))for(z=Math.max(N.length,j.length);z--;)$[z]=y(N[z],j[z]);else $=y(N,j);return $}function D(N,j,$,z,O){var F=this.chart,G=F.inverted,q=this.xAxis,ee=q.reversed,re=G?j.height/2:j.width/2;N=(N=N.pointWidth)?N/2:0,j.startXPos=G?O.x:ee?-re-N:q.width-re+N,j.startYPos=G?ee?this.yAxis.height-re+N:-re-N:O.y,z?j.visibility==="hidden"&&(j.show(),j.attr({opacity:0}).animate({opacity:1})):j.attr({opacity:1}).animate({opacity:0},void 0,j.hide),F.hasRendered&&($&&j.attr({x:j.startXPos,y:j.startYPos}),j.placed=!0)}var H=[];T.compose=function(N){if(H.indexOf(N)===-1){var j=N.prototype;H.push(N),j.alignDataLabel=A,j.drawDataLabels=X,j.justifyDataLabel=Z,j.setDataLabelStartPos=D}}}(E||(E={})),E}),r(n,"Series/Column/ColumnDataLabel.js",[n["Core/Series/DataLabel.js"],n["Core/Series/SeriesRegistry.js"],n["Core/Utilities.js"]],function(i,o,a){var s=o.series,l=a.merge,u=a.pick,p;return function(m){function v(y,_,w,C,E){var T=this.chart.inverted,A=y.series,k=(A.xAxis?A.xAxis.len:this.chart.plotSizeX)||0;A=(A.yAxis?A.yAxis.len:this.chart.plotSizeY)||0;var X=y.dlBox||y.shapeArgs,Z=u(y.below,y.plotY>u(this.translatedThreshold,A)),W=u(w.inside,!!this.options.stacking);X&&(C=l(X),0>C.y&&(C.height+=C.y,C.y=0),X=C.y+C.height-A,0<X&&X<C.height&&(C.height-=X),T&&(C={x:A-C.y-C.height,y:k-C.x-C.width,width:C.height,height:C.width}),W||(T?(C.x+=Z?0:C.width,C.width=0):(C.y+=Z?C.height:0,C.height=0))),w.align=u(w.align,!T||W?"center":Z?"right":"left"),w.verticalAlign=u(w.verticalAlign,T||W?"middle":Z?"top":"bottom"),s.prototype.alignDataLabel.call(this,y,_,w,C,E),w.inside&&y.contrastColor&&_.css({color:y.contrastColor})}var x=[];m.compose=function(y){i.compose(s),x.indexOf(y)===-1&&(x.push(y),y.prototype.alignDataLabel=v)}}(p||(p={})),p}),r(n,"Series/Bar/BarSeries.js",[n["Series/Column/ColumnSeries.js"],n["Core/Series/SeriesRegistry.js"],n["Core/Utilities.js"]],function(i,o,a){var s=this&&this.__extends||function(){var p=function(m,v){return p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,y){x.__proto__=y}||function(x,y){for(var _ in y)y.hasOwnProperty(_)&&(x[_]=y[_])},p(m,v)};return function(m,v){function x(){this.constructor=m}p(m,v),m.prototype=v===null?Object.create(v):(x.prototype=v.prototype,new x)}}(),l=a.extend,u=a.merge;return a=function(p){function m(){var v=p!==null&&p.apply(this,arguments)||this;return v.data=void 0,v.options=void 0,v.points=void 0,v}return s(m,p),m.defaultOptions=u(i.defaultOptions,{}),m}(i),l(a.prototype,{inverted:!0}),o.registerSeriesType("bar",a),a}),r(n,"Series/Scatter/ScatterSeriesDefaults.js",[],function(){return{lineWidth:0,findNearestPointBy:"xy",jitter:{x:0,y:0},marker:{enabled:!0},tooltip:{headerFormat:'<span style="color:{point.color}">\u25CF</span> <span style="font-size: 10px"> {series.name}</span><br/>',pointFormat:"x: <b>{point.x}</b><br/>y: <b>{point.y}</b><br/>"}}}),r(n,"Series/Scatter/ScatterSeries.js",[n["Series/Scatter/ScatterSeriesDefaults.js"],n["Core/Series/SeriesRegistry.js"],n["Core/Utilities.js"]],function(i,o,a){var s=this&&this.__extends||function(){var x=function(y,_){return x=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(w,C){w.__proto__=C}||function(w,C){for(var E in C)C.hasOwnProperty(E)&&(w[E]=C[E])},x(y,_)};return function(y,_){function w(){this.constructor=y}x(y,_),y.prototype=_===null?Object.create(_):(w.prototype=_.prototype,new w)}}(),l=o.seriesTypes,u=l.column,p=l.line;l=a.addEvent;var m=a.extend,v=a.merge;return a=function(x){function y(){var _=x!==null&&x.apply(this,arguments)||this;return _.data=void 0,_.options=void 0,_.points=void 0,_}return s(y,x),y.prototype.applyJitter=function(){var _=this,w=this.options.jitter,C=this.points.length;w&&this.points.forEach(function(E,T){["x","y"].forEach(function(A,k){var X="plot"+A.toUpperCase();if(w[A]&&!E.isNull){var Z=_[A+"Axis"],W=w[A]*Z.transA;if(Z&&!Z.isLog){var D=Math.max(0,E[X]-W);Z=Math.min(Z.len,E[X]+W),k=1e4*Math.sin(T+k*C),E[X]=D+(Z-D)*(k-Math.floor(k)),A==="x"&&(E.clientX=E.plotX)}}})})},y.prototype.drawGraph=function(){this.options.lineWidth?x.prototype.drawGraph.call(this):this.graph&&(this.graph=this.graph.destroy())},y.defaultOptions=v(p.defaultOptions,i),y}(p),m(a.prototype,{drawTracker:u.prototype.drawTracker,sorted:!1,requireSorting:!1,noSharedTooltip:!0,trackerGroups:["group","markerGroup","dataLabelsGroup"],takeOrdinalPosition:!1}),l(a,"afterTranslate",function(){this.applyJitter()}),o.registerSeriesType("scatter",a),a}),r(n,"Series/CenteredUtilities.js",[n["Core/Globals.js"],n["Core/Series/Series.js"],n["Core/Utilities.js"]],function(i,o,a){var s=i.deg2rad,l=a.fireEvent,u=a.isNumber,p=a.pick,m=a.relativeLength,v;return function(x){x.getCenter=function(){var y=this.options,_=this.chart,w=2*(y.slicedOffset||0),C=_.plotWidth-2*w,E=_.plotHeight-2*w,T=y.center,A=Math.min(C,E),k=y.thickness,X=y.size,Z=y.innerSize||0;for(typeof X=="string"&&(X=parseFloat(X)),typeof Z=="string"&&(Z=parseFloat(Z)),y=[p(T[0],"50%"),p(T[1],"50%"),p(X&&0>X?void 0:y.size,"100%"),p(Z&&0>Z?void 0:y.innerSize||0,"0%")],!_.angular||this instanceof o||(y[3]=0),T=0;4>T;++T)X=y[T],_=2>T||T===2&&/%$/.test(X),y[T]=m(X,[C,E,A,y[2]][T])+(_?w:0);return y[3]>y[2]&&(y[3]=y[2]),u(k)&&2*k<y[2]&&0<k&&(y[3]=y[2]-2*k),l(this,"afterGetCenter",{positions:y}),y},x.getStartAndEndRadians=function(y,_){return y=u(y)?y:0,_=u(_)&&_>y&&360>_-y?_:y+360,{start:s*(y+-90),end:s*(_+-90)}}}(v||(v={})),v}),r(n,"Series/Pie/PiePoint.js",[n["Core/Animation/AnimationUtilities.js"],n["Core/Series/Point.js"],n["Core/Utilities.js"]],function(i,o,a){var s=this&&this.__extends||function(){var y=function(_,w){return y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(C,E){C.__proto__=E}||function(C,E){for(var T in E)E.hasOwnProperty(T)&&(C[T]=E[T])},y(_,w)};return function(_,w){function C(){this.constructor=_}y(_,w),_.prototype=w===null?Object.create(w):(C.prototype=w.prototype,new C)}}(),l=i.setAnimation,u=a.addEvent,p=a.defined;i=a.extend;var m=a.isNumber,v=a.pick,x=a.relativeLength;return o=function(y){function _(){var w=y!==null&&y.apply(this,arguments)||this;return w.labelDistance=void 0,w.options=void 0,w.series=void 0,w}return s(_,y),_.prototype.getConnectorPath=function(){var w=this.labelPosition,C=this.series.options.dataLabels,E=this.connectorShapes,T=C.connectorShape;return E[T]&&(T=E[T]),T.call(this,{x:w.final.x,y:w.final.y,alignment:w.alignment},w.connectorPosition,C)},_.prototype.getTranslate=function(){return this.sliced?this.slicedTranslation:{translateX:0,translateY:0}},_.prototype.haloPath=function(w){var C=this.shapeArgs;return this.sliced||!this.visible?[]:this.series.chart.renderer.symbols.arc(C.x,C.y,C.r+w,C.r+w,{innerR:C.r-1,start:C.start,end:C.end})},_.prototype.init=function(){var w=this;y.prototype.init.apply(this,arguments),this.name=v(this.name,"Slice");var C=function(E){w.slice(E.type==="select")};return u(this,"select",C),u(this,"unselect",C),this},_.prototype.isValid=function(){return m(this.y)&&0<=this.y},_.prototype.setVisible=function(w,C){var E=this,T=this.series,A=T.chart,k=T.options.ignoreHiddenPoint;C=v(C,k),w!==this.visible&&(this.visible=this.options.visible=w=typeof w=="undefined"?!this.visible:w,T.options.data[T.data.indexOf(this)]=this.options,["graphic","dataLabel","connector","shadowGroup"].forEach(function(X){E[X]&&E[X][w?"show":"hide"](w)}),this.legendItem&&A.legend.colorizeItem(this,w),w||this.state!=="hover"||this.setState(""),k&&(T.isDirty=!0),C&&A.redraw())},_.prototype.slice=function(w,C,E){var T=this.series;l(E,T.chart),v(C,!0),this.sliced=this.options.sliced=p(w)?w:!this.sliced,T.options.data[T.data.indexOf(this)]=this.options,this.graphic&&this.graphic.animate(this.getTranslate()),this.shadowGroup&&this.shadowGroup.animate(this.getTranslate())},_}(o),i(o.prototype,{connectorShapes:{fixedOffset:function(y,_,w){var C=_.breakAt;return _=_.touchingSliceAt,[["M",y.x,y.y],w.softConnector?["C",y.x+(y.alignment==="left"?-5:5),y.y,2*C.x-_.x,2*C.y-_.y,C.x,C.y]:["L",C.x,C.y],["L",_.x,_.y]]},straight:function(y,_){return _=_.touchingSliceAt,[["M",y.x,y.y],["L",_.x,_.y]]},crookedLine:function(y,_,w){_=_.touchingSliceAt;var C=this.series,E=C.center[0],T=C.chart.plotWidth,A=C.chart.plotLeft;C=y.alignment;var k=this.shapeArgs.r;return w=x(w.crookDistance,1),T=C==="left"?E+k+(T+A-E-k)*(1-w):A+(E-k)*w,w=["L",T,y.y],E=!0,(C==="left"?T>y.x||T<_.x:T<y.x||T>_.x)&&(E=!1),y=[["M",y.x,y.y]],E&&y.push(w),y.push(["L",_.x,_.y]),y}}}),o}),r(n,"Series/Pie/PieSeriesDefaults.js",[],function(){return{center:[null,null],clip:!1,colorByPoint:!0,dataLabels:{allowOverlap:!0,connectorPadding:5,connectorShape:"fixedOffset",crookDistance:"70%",distance:30,enabled:!0,formatter:function(){return this.point.isNull?void 0:this.point.name},softConnector:!0,x:0},fillColor:void 0,ignoreHiddenPoint:!0,inactiveOtherPoints:!0,legendType:"point",marker:null,size:null,showInLegend:!1,slicedOffset:10,stickyTracking:!1,tooltip:{followPointer:!0},borderColor:"#ffffff",borderWidth:1,lineWidth:void 0,states:{hover:{brightness:.1}}}}),r(n,"Series/Pie/PieSeries.js",[n["Series/CenteredUtilities.js"],n["Series/Column/ColumnSeries.js"],n["Core/Globals.js"],n["Core/Legend/LegendSymbol.js"],n["Series/Pie/PiePoint.js"],n["Series/Pie/PieSeriesDefaults.js"],n["Core/Series/Series.js"],n["Core/Series/SeriesRegistry.js"],n["Core/Renderer/SVG/Symbols.js"],n["Core/Utilities.js"]],function(i,o,a,s,l,u,p,m,v,x){var y=this&&this.__extends||function(){var X=function(Z,W){return X=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(D,H){D.__proto__=H}||function(D,H){for(var N in H)H.hasOwnProperty(N)&&(D[N]=H[N])},X(Z,W)};return function(Z,W){function D(){this.constructor=Z}X(Z,W),Z.prototype=W===null?Object.create(W):(D.prototype=W.prototype,new D)}}(),_=i.getStartAndEndRadians;a=a.noop;var w=x.clamp,C=x.extend,E=x.fireEvent,T=x.merge,A=x.pick,k=x.relativeLength;return x=function(X){function Z(){var W=X!==null&&X.apply(this,arguments)||this;return W.center=void 0,W.data=void 0,W.maxLabelDistance=void 0,W.options=void 0,W.points=void 0,W}return y(Z,X),Z.prototype.animate=function(W){var D=this,H=D.points,N=D.startAngleRad;W||H.forEach(function(j){var $=j.graphic,z=j.shapeArgs;$&&z&&($.attr({r:A(j.startR,D.center&&D.center[3]/2),start:N,end:N}),$.animate({r:z.r,start:z.start,end:z.end},D.options.animation))})},Z.prototype.drawEmpty=function(){var W=this.startAngleRad,D=this.endAngleRad,H=this.options;if(this.total===0&&this.center){var N=this.center[0],j=this.center[1];this.graph||(this.graph=this.chart.renderer.arc(N,j,this.center[1]/2,0,W,D).addClass("highcharts-empty-series").add(this.group)),this.graph.attr({d:v.arc(N,j,this.center[2]/2,0,{start:W,end:D,innerR:this.center[3]/2})}),this.chart.styledMode||this.graph.attr({"stroke-width":H.borderWidth,fill:H.fillColor||"none",stroke:H.color||"#cccccc"})}else this.graph&&(this.graph=this.graph.destroy())},Z.prototype.drawPoints=function(){var W=this.chart.renderer;this.points.forEach(function(D){D.graphic&&D.hasNewShapeType()&&(D.graphic=D.graphic.destroy()),D.graphic||(D.graphic=W[D.shapeType](D.shapeArgs).add(D.series.group),D.delayedRendering=!0)})},Z.prototype.generatePoints=function(){X.prototype.generatePoints.call(this),this.updateTotals()},Z.prototype.getX=function(W,D,H){var N=this.center,j=this.radii?this.radii[H.index]||0:N[2]/2;return W=Math.asin(w((W-N[1])/(j+H.labelDistance),-1,1)),N[0]+(D?-1:1)*Math.cos(W)*(j+H.labelDistance)+(0<H.labelDistance?(D?-1:1)*this.options.dataLabels.padding:0)},Z.prototype.hasData=function(){return!!this.processedXData.length},Z.prototype.redrawPoints=function(){var W=this,D=W.chart,H=D.renderer,N=W.options.shadow,j,$,z,O;this.drawEmpty(),!N||W.shadowGroup||D.styledMode||(W.shadowGroup=H.g("shadow").attr({zIndex:-1}).add(W.group)),W.points.forEach(function(F){var G={};if($=F.graphic,!F.isNull&&$){var q=void 0;O=F.shapeArgs,j=F.getTranslate(),D.styledMode||(q=F.shadowGroup,N&&!q&&(q=F.shadowGroup=H.g("shadow").add(W.shadowGroup)),q&&q.attr(j),z=W.pointAttribs(F,F.selected&&"select")),F.delayedRendering?($.setRadialReference(W.center).attr(O).attr(j),D.styledMode||$.attr(z).attr({"stroke-linejoin":"round"}).shadow(N,q),F.delayedRendering=!1):($.setRadialReference(W.center),D.styledMode||T(!0,G,z),T(!0,G,O,j),$.animate(G)),$.attr({visibility:F.visible?"inherit":"hidden"}),$.addClass(F.getClassName(),!0)}else $&&(F.graphic=$.destroy())})},Z.prototype.sortByAngle=function(W,D){W.sort(function(H,N){return typeof H.angle!="undefined"&&(N.angle-H.angle)*D})},Z.prototype.translate=function(W){E(this,"translate"),this.generatePoints();var D=this.options,H=D.slicedOffset,N=H+(D.borderWidth||0),j=_(D.startAngle,D.endAngle),$=this.startAngleRad=j.start;j=(this.endAngleRad=j.end)-$;var z=this.points,O=D.dataLabels.distance;D=D.ignoreHiddenPoint;var F=z.length,G,q=0;for(W||(this.center=W=this.getCenter()),G=0;G<F;G++){var ee=z[G],re=$+q*j;!ee.isValid()||D&&!ee.visible||(q+=ee.percentage/100);var ce=$+q*j,fe={x:W[0],y:W[1],r:W[2]/2,innerR:W[3]/2,start:Math.round(1e3*re)/1e3,end:Math.round(1e3*ce)/1e3};ee.shapeType="arc",ee.shapeArgs=fe,ee.labelDistance=A(ee.options.dataLabels&&ee.options.dataLabels.distance,O),ee.labelDistance=k(ee.labelDistance,fe.r),this.maxLabelDistance=Math.max(this.maxLabelDistance||0,ee.labelDistance),ce=(ce+re)/2,ce>1.5*Math.PI?ce-=2*Math.PI:ce<-Math.PI/2&&(ce+=2*Math.PI),ee.slicedTranslation={translateX:Math.round(Math.cos(ce)*H),translateY:Math.round(Math.sin(ce)*H)},fe=Math.cos(ce)*W[2]/2;var J=Math.sin(ce)*W[2]/2;ee.tooltipPos=[W[0]+.7*fe,W[1]+.7*J],ee.half=ce<-Math.PI/2||ce>Math.PI/2?1:0,ee.angle=ce,re=Math.min(N,ee.labelDistance/5),ee.labelPosition={natural:{x:W[0]+fe+Math.cos(ce)*ee.labelDistance,y:W[1]+J+Math.sin(ce)*ee.labelDistance},final:{},alignment:0>ee.labelDistance?"center":ee.half?"right":"left",connectorPosition:{breakAt:{x:W[0]+fe+Math.cos(ce)*re,y:W[1]+J+Math.sin(ce)*re},touchingSliceAt:{x:W[0]+fe,y:W[1]+J}}}}E(this,"afterTranslate")},Z.prototype.updateTotals=function(){var W=this.points,D=W.length,H=this.options.ignoreHiddenPoint,N,j=0;for(N=0;N<D;N++){var $=W[N];!$.isValid()||H&&!$.visible||(j+=$.y)}for(this.total=j,N=0;N<D;N++)$=W[N],$.percentage=0<j&&($.visible||!H)?$.y/j*100:0,$.total=j},Z.defaultOptions=T(p.defaultOptions,u),Z}(p),C(x.prototype,{axisTypes:[],directTouch:!0,drawGraph:void 0,drawLegendSymbol:s.drawRectangle,drawTracker:o.prototype.drawTracker,getCenter:i.getCenter,getSymbol:a,isCartesian:!1,noSharedTooltip:!0,pointAttribs:o.prototype.pointAttribs,pointClass:l,requireSorting:!1,searchPoint:a,trackerGroups:["group","dataLabelsGroup"]}),m.registerSeriesType("pie",x),x}),r(n,"Series/Pie/PieDataLabel.js",[n["Core/Series/DataLabel.js"],n["Core/Globals.js"],n["Core/Renderer/RendererUtilities.js"],n["Core/Series/SeriesRegistry.js"],n["Core/Utilities.js"]],function(i,o,a,s,l){var u=o.noop,p=a.distribute,m=s.series,v=l.arrayMax,x=l.clamp,y=l.defined,_=l.merge,w=l.pick,C=l.relativeLength,E;return function(T){function A(){var D=this,H=D.data,N=D.chart,j=D.options.dataLabels||{},$=j.connectorPadding,z=N.plotWidth,O=N.plotHeight,F=N.plotLeft,G=Math.round(N.chartWidth/3),q=D.center,ee=q[2]/2,re=q[1],ce=[[],[]],fe=[0,0,0,0],J=D.dataLabelPositioners,oe,ve,ye,xe,se,me,pe,Ce,Pe,Re,ke,ze;D.visible&&(j.enabled||D._hasPointLabels)&&(H.forEach(function(Ge){Ge.dataLabel&&Ge.visible&&Ge.dataLabel.shortened&&(Ge.dataLabel.attr({width:"auto"}).css({width:"auto",textOverflow:"clip"}),Ge.dataLabel.shortened=!1)}),m.prototype.drawDataLabels.apply(D),H.forEach(function(Ge){Ge.dataLabel&&(Ge.visible?(ce[Ge.half].push(Ge),Ge.dataLabel._pos=null,!y(j.style.width)&&!y(Ge.options.dataLabels&&Ge.options.dataLabels.style&&Ge.options.dataLabels.style.width)&&Ge.dataLabel.getBBox().width>G&&(Ge.dataLabel.css({width:Math.round(.7*G)+"px"}),Ge.dataLabel.shortened=!0)):(Ge.dataLabel=Ge.dataLabel.destroy(),Ge.dataLabels&&Ge.dataLabels.length===1&&delete Ge.dataLabels))}),ce.forEach(function(Ge,ht){var Tt=Ge.length,xt=[],pt;if(Tt){if(D.sortByAngle(Ge,ht-.5),0<D.maxLabelDistance){var It=Math.max(0,re-ee-D.maxLabelDistance),Ie=Math.min(re+ee+D.maxLabelDistance,N.plotHeight);Ge.forEach(function(de){0<de.labelDistance&&de.dataLabel&&(de.top=Math.max(0,re-ee-de.labelDistance),de.bottom=Math.min(re+ee+de.labelDistance,N.plotHeight),pt=de.dataLabel.getBBox().height||21,de.distributeBox={target:de.labelPosition.natural.y-de.top+pt/2,size:pt,rank:de.y},xt.push(de.distributeBox))}),It=Ie+pt-It,p(xt,It,It/5)}for(ke=0;ke<Tt;ke++){if(oe=Ge[ke],me=oe.labelPosition,xe=oe.dataLabel,Re=oe.visible===!1?"hidden":"inherit",Pe=It=me.natural.y,xt&&y(oe.distributeBox)&&(typeof oe.distributeBox.pos=="undefined"?Re="hidden":(pe=oe.distributeBox.size,Pe=J.radialDistributionY(oe))),delete oe.positionIndex,j.justify)Ce=J.justify(oe,ee,q);else switch(j.alignTo){case"connectors":Ce=J.alignToConnectors(Ge,ht,z,F);break;case"plotEdges":Ce=J.alignToPlotEdges(xe,ht,z,F);break;default:Ce=J.radialDistributionX(D,oe,Pe,It)}xe._attr={visibility:Re,align:me.alignment},ze=oe.options.dataLabels||{},xe._pos={x:Ce+w(ze.x,j.x)+({left:$,right:-$}[me.alignment]||0),y:Pe+w(ze.y,j.y)-10},me.final.x=Ce,me.final.y=Pe,w(j.crop,!0)&&(se=xe.getBBox().width,It=null,Ce-se<$&&ht===1?(It=Math.round(se-Ce+$),fe[3]=Math.max(It,fe[3])):Ce+se>z-$&&ht===0&&(It=Math.round(Ce+se-z+$),fe[1]=Math.max(It,fe[1])),0>Pe-pe/2?fe[0]=Math.max(Math.round(-Pe+pe/2),fe[0]):Pe+pe/2>O&&(fe[2]=Math.max(Math.round(Pe+pe/2-O),fe[2])),xe.sideOverflow=It)}}}),v(fe)===0||this.verifyDataLabelOverflow(fe))&&(this.placeDataLabels(),this.points.forEach(function(Ge){if(ze=_(j,Ge.options.dataLabels),ve=w(ze.connectorWidth,1)){var ht;ye=Ge.connector,(xe=Ge.dataLabel)&&xe._pos&&Ge.visible&&0<Ge.labelDistance?(Re=xe._attr.visibility,(ht=!ye)&&(Ge.connector=ye=N.renderer.path().addClass("highcharts-data-label-connector highcharts-color-"+Ge.colorIndex+(Ge.className?" "+Ge.className:"")).add(D.dataLabelsGroup),N.styledMode||ye.attr({"stroke-width":ve,stroke:ze.connectorColor||Ge.color||"#666666"})),ye[ht?"attr":"animate"]({d:Ge.getConnectorPath()}),ye.attr("visibility",Re)):ye&&(Ge.connector=ye.destroy())}}))}function k(){this.points.forEach(function(D){var H=D.dataLabel,N;H&&D.visible&&((N=H._pos)?(H.sideOverflow&&(H._attr.width=Math.max(H.getBBox().width-H.sideOverflow,0),H.css({width:H._attr.width+"px",textOverflow:(this.options.dataLabels.style||{}).textOverflow||"ellipsis"}),H.shortened=!0),H.attr(H._attr),H[H.moved?"animate":"attr"](N),H.moved=!0):H&&H.attr({y:-9999})),delete D.distributeBox},this)}function X(D){var H=this.center,N=this.options,j=N.center,$=N.minSize||80,z=N.size!==null;if(!z){if(j[0]!==null)var O=Math.max(H[2]-Math.max(D[1],D[3]),$);else O=Math.max(H[2]-D[1]-D[3],$),H[0]+=(D[3]-D[1])/2;j[1]!==null?O=x(O,$,H[2]-Math.max(D[0],D[2])):(O=x(O,$,H[2]-D[0]-D[2]),H[1]+=(D[0]-D[2])/2),O<H[2]?(H[2]=O,H[3]=Math.min(N.thickness?Math.max(0,O-2*N.thickness):Math.max(0,C(N.innerSize||0,O)),O),this.translate(H),this.drawDataLabels&&this.drawDataLabels()):z=!0}return z}var Z=[],W={radialDistributionY:function(D){return D.top+D.distributeBox.pos},radialDistributionX:function(D,H,N,j){return D.getX(N<H.top+2||N>H.bottom-2?j:N,H.half,H)},justify:function(D,H,N){return N[0]+(D.half?-1:1)*(H+D.labelDistance)},alignToPlotEdges:function(D,H,N,j){return D=D.getBBox().width,H?D+j:N-D-j},alignToConnectors:function(D,H,N,j){var $=0,z;return D.forEach(function(O){z=O.dataLabel.getBBox().width,z>$&&($=z)}),H?$+j:N-$-j}};T.compose=function(D){i.compose(m),Z.indexOf(D)===-1&&(Z.push(D),D=D.prototype,D.dataLabelPositioners=W,D.alignDataLabel=u,D.drawDataLabels=A,D.placeDataLabels=k,D.verifyDataLabelOverflow=X)}}(E||(E={})),E}),r(n,"Extensions/OverlappingDataLabels.js",[n["Core/Chart/Chart.js"],n["Core/Utilities.js"]],function(i,o){function a(x,y){var _=!1;if(x){var w=x.newOpacity;x.oldOpacity!==w&&(x.alignAttr&&x.placed?(x[w?"removeClass":"addClass"]("highcharts-data-label-hidden"),_=!0,x.alignAttr.opacity=w,x[x.isOld?"animate":"attr"](x.alignAttr,null,function(){y.styledMode||x.css({pointerEvents:w?"auto":"none"})}),l(y,"afterHideOverlappingLabel")):x.attr({opacity:w})),x.isOld=!0}return _}var s=o.addEvent,l=o.fireEvent,u=o.isArray,p=o.isNumber,m=o.objectEach,v=o.pick;s(i,"render",function(){var x=this,y=[];(this.labelCollectors||[]).forEach(function(_){y=y.concat(_())}),(this.yAxis||[]).forEach(function(_){_.stacking&&_.options.stackLabels&&!_.options.stackLabels.allowOverlap&&m(_.stacking.stacks,function(w){m(w,function(C){C.label&&y.push(C.label)})})}),(this.series||[]).forEach(function(_){var w=_.options.dataLabels;_.visible&&(w.enabled!==!1||_._hasPointLabels)&&(w=function(C){return C.forEach(function(E){E.visible&&(u(E.dataLabels)?E.dataLabels:E.dataLabel?[E.dataLabel]:[]).forEach(function(T){var A=T.options;T.labelrank=v(A.labelrank,E.labelrank,E.shapeArgs&&E.shapeArgs.height),A.allowOverlap?(T.oldOpacity=T.opacity,T.newOpacity=1,a(T,x)):y.push(T)})})},w(_.nodes||[]),w(_.points))}),this.hideOverlappingLabels(y)}),i.prototype.hideOverlappingLabels=function(x){var y=this,_=x.length,w=y.renderer,C,E,T,A=!1,k=function(W){var D,H=W.box?0:W.padding||0,N=D=0,j;if(W&&(!W.alignAttr||W.placed)){var $=W.alignAttr||{x:W.attr("x"),y:W.attr("y")},z=W.parentGroup;W.width||(D=W.getBBox(),W.width=D.width,W.height=D.height,D=w.fontMetrics(null,W.element).h);var O=W.width-2*H;return(j={left:"0",center:"0.5",right:"1"}[W.alignValue])?N=+j*O:p(W.x)&&Math.round(W.x)!==W.translateX&&(N=W.x-W.translateX),{x:$.x+(z.translateX||0)+H-(N||0),y:$.y+(z.translateY||0)+H-D,width:W.width-2*H,height:W.height-2*H}}};for(E=0;E<_;E++)(C=x[E])&&(C.oldOpacity=C.opacity,C.newOpacity=1,C.absoluteBox=k(C));for(x.sort(function(W,D){return(D.labelrank||0)-(W.labelrank||0)}),E=0;E<_;E++){var X=(k=x[E])&&k.absoluteBox;for(C=E+1;C<_;++C){var Z=(T=x[C])&&T.absoluteBox;!X||!Z||k===T||k.newOpacity===0||T.newOpacity===0||k.visibility==="hidden"||T.visibility==="hidden"||Z.x>=X.x+X.width||Z.x+Z.width<=X.x||Z.y>=X.y+X.height||Z.y+Z.height<=X.y||((k.labelrank<T.labelrank?k:T).newOpacity=0)}}x.forEach(function(W){a(W,y)&&(A=!0)}),A&&l(y,"afterHideAllOverlappingLabels")}}),r(n,"Core/Responsive.js",[n["Core/Utilities.js"]],function(i){var o=i.extend,a=i.find,s=i.isArray,l=i.isObject,u=i.merge,p=i.objectEach,m=i.pick,v=i.splat,x=i.uniqueKey,y;return function(_){var w=[];_.compose=function(E){return w.indexOf(E)===-1&&(w.push(E),o(E.prototype,C.prototype)),E};var C=function(){function E(){}return E.prototype.currentOptions=function(T){function A(Z,W,D,H){var N;p(Z,function(j,$){if(!H&&-1<k.collectionsWithUpdate.indexOf($)&&W[$])for(j=v(j),D[$]=[],N=0;N<Math.max(j.length,W[$].length);N++)W[$][N]&&(j[N]===void 0?D[$][N]=W[$][N]:(D[$][N]={},A(j[N],W[$][N],D[$][N],H+1)));else l(j)?(D[$]=s(j)?[]:{},A(j,W[$]||{},D[$],H+1)):D[$]=typeof W[$]=="undefined"?null:W[$]})}var k=this,X={};return A(T,this.options,X,0),X},E.prototype.matchResponsiveRule=function(T,A){var k=T.condition;(k.callback||function(){return this.chartWidth<=m(k.maxWidth,Number.MAX_VALUE)&&this.chartHeight<=m(k.maxHeight,Number.MAX_VALUE)&&this.chartWidth>=m(k.minWidth,0)&&this.chartHeight>=m(k.minHeight,0)}).call(this)&&A.push(T._id)},E.prototype.setResponsive=function(T,A){var k=this,X=this.options.responsive,Z=this.currentResponsive,W=[];!A&&X&&X.rules&&X.rules.forEach(function(D){typeof D._id=="undefined"&&(D._id=x()),k.matchResponsiveRule(D,W)},this),A=u.apply(void 0,W.map(function(D){return a((X||{}).rules||[],function(H){return H._id===D})}).map(function(D){return D&&D.chartOptions})),A.isResponsiveOptions=!0,W=W.toString()||void 0,W!==(Z&&Z.ruleIds)&&(Z&&this.update(Z.undoOptions,T,!0),W?(Z=this.currentOptions(A),Z.isResponsiveOptions=!0,this.currentResponsive={ruleIds:W,mergedOptions:A,undoOptions:Z},this.update(A,T,!0)):this.currentResponsive=void 0)},E}()}(y||(y={})),y}),r(n,"masters/highcharts.src.js",[n["Core/Globals.js"],n["Core/Utilities.js"],n["Core/Defaults.js"],n["Core/Animation/Fx.js"],n["Core/Animation/AnimationUtilities.js"],n["Core/Renderer/HTML/AST.js"],n["Core/FormatUtilities.js"],n["Core/Renderer/RendererUtilities.js"],n["Core/Renderer/SVG/SVGElement.js"],n["Core/Renderer/SVG/SVGRenderer.js"],n["Core/Renderer/HTML/HTMLElement.js"],n["Core/Renderer/HTML/HTMLRenderer.js"],n["Core/Axis/Axis.js"],n["Core/Axis/DateTimeAxis.js"],n["Core/Axis/LogarithmicAxis.js"],n["Core/Axis/PlotLineOrBand/PlotLineOrBand.js"],n["Core/Axis/Tick.js"],n["Core/Tooltip.js"],n["Core/Series/Point.js"],n["Core/Pointer.js"],n["Core/MSPointer.js"],n["Core/Legend/Legend.js"],n["Core/Chart/Chart.js"],n["Core/Axis/Stacking/StackingAxis.js"],n["Core/Axis/Stacking/StackItem.js"],n["Core/Series/Series.js"],n["Core/Series/SeriesRegistry.js"],n["Series/Column/ColumnSeries.js"],n["Series/Column/ColumnDataLabel.js"],n["Series/Pie/PieSeries.js"],n["Series/Pie/PieDataLabel.js"],n["Core/Series/DataLabel.js"],n["Core/Responsive.js"],n["Core/Color/Color.js"],n["Core/Time.js"]],function(i,o,a,s,l,u,p,m,v,x,y,_,w,C,E,T,A,k,X,Z,W,D,H,N,j,$,z,O,F,G,q,ee,re,ce,fe){return i.animate=l.animate,i.animObject=l.animObject,i.getDeferredAnimation=l.getDeferredAnimation,i.setAnimation=l.setAnimation,i.stop=l.stop,i.timers=s.timers,i.AST=u,i.Axis=w,i.Chart=H,i.chart=H.chart,i.Fx=s,i.Legend=D,i.PlotLineOrBand=T,i.Point=X,i.Pointer=W.isRequired()?W:Z,i.Series=$,i.StackItem=j,i.SVGElement=v,i.SVGRenderer=x,i.Tick=A,i.Time=fe,i.Tooltip=k,i.Color=ce,i.color=ce.parse,_.compose(x),y.compose(v),i.defaultOptions=a.defaultOptions,i.getOptions=a.getOptions,i.time=a.defaultTime,i.setOptions=a.setOptions,i.dateFormat=p.dateFormat,i.format=p.format,i.numberFormat=p.numberFormat,i.addEvent=o.addEvent,i.arrayMax=o.arrayMax,i.arrayMin=o.arrayMin,i.attr=o.attr,i.clearTimeout=o.clearTimeout,i.correctFloat=o.correctFloat,i.createElement=o.createElement,i.css=o.css,i.defined=o.defined,i.destroyObjectProperties=o.destroyObjectProperties,i.discardElement=o.discardElement,i.distribute=m.distribute,i.erase=o.erase,i.error=o.error,i.extend=o.extend,i.extendClass=o.extendClass,i.find=o.find,i.fireEvent=o.fireEvent,i.getMagnitude=o.getMagnitude,i.getStyle=o.getStyle,i.inArray=o.inArray,i.isArray=o.isArray,i.isClass=o.isClass,i.isDOMElement=o.isDOMElement,i.isFunction=o.isFunction,i.isNumber=o.isNumber,i.isObject=o.isObject,i.isString=o.isString,i.keys=o.keys,i.merge=o.merge,i.normalizeTickInterval=o.normalizeTickInterval,i.objectEach=o.objectEach,i.offset=o.offset,i.pad=o.pad,i.pick=o.pick,i.pInt=o.pInt,i.relativeLength=o.relativeLength,i.removeEvent=o.removeEvent,i.seriesType=z.seriesType,i.splat=o.splat,i.stableSort=o.stableSort,i.syncTimeout=o.syncTimeout,i.timeUnits=o.timeUnits,i.uniqueKey=o.uniqueKey,i.useSerialIds=o.useSerialIds,i.wrap=o.wrap,F.compose(O),ee.compose($),C.compose(w),E.compose(w),q.compose(G),T.compose(w),re.compose(H),N.compose(w,H,$),i}),n["masters/highcharts.src.js"]._modules=n,n["masters/highcharts.src.js"]})})(LG);var $It=LG.exports,uOt=hz({__proto__:null,default:$It},[LG.exports]),_ve={exports:{}};(function(t,e){(function(r,n){t.exports=n(Y.exports)})(typeof self!="undefined"?self:xl,function(r){return function(n){function i(a){if(o[a])return o[a].exports;var s=o[a]={i:a,l:!1,exports:{}};return n[a].call(s.exports,s,s.exports,i),s.l=!0,s.exports}var o={};return i.m=n,i.c=o,i.d=function(a,s,l){i.o(a,s)||Object.defineProperty(a,s,{configurable:!1,enumerable:!0,get:l})},i.n=function(a){var s=a&&a.__esModule?function(){return a.default}:function(){return a};return i.d(s,"a",s),s},i.o=function(a,s){return Object.prototype.hasOwnProperty.call(a,s)},i.p="",i(i.s=0)}([function(n,i,o){function a(){return a=Object.assign||function(E){for(var T=1;T<arguments.length;T++){var A=arguments[T];for(var k in A)Object.prototype.hasOwnProperty.call(A,k)&&(E[k]=A[k])}return E},a.apply(this,arguments)}function s(E){return m(E)||p(E)||u(E)||l()}function l(){throw new TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function u(E,T){if(E){if(typeof E=="string")return v(E,T);var A=Object.prototype.toString.call(E).slice(8,-1);return A==="Object"&&E.constructor&&(A=E.constructor.name),A==="Map"||A==="Set"?Array.from(E):A==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A)?v(E,T):void 0}}function p(E){if(typeof Symbol!="undefined"&&E[Symbol.iterator]!=null||E["@@iterator"]!=null)return Array.from(E)}function m(E){if(Array.isArray(E))return v(E)}function v(E,T){(T==null||T>E.length)&&(T=E.length);for(var A=0,k=new Array(T);A<T;A++)k[A]=E[A];return k}function x(E){return(x=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(T){return typeof T}:function(T){return T&&typeof Symbol=="function"&&T.constructor===Symbol&&T!==Symbol.prototype?"symbol":typeof T})(E)}Object.defineProperty(i,"__esModule",{value:!0});var y=o(1),_=o.n(y),w=typeof window!="undefined"?y.useLayoutEffect:y.useEffect,C=Object(y.forwardRef)(function(E,T){var A=Object(y.useRef)(),k=Object(y.useRef)();return w(function(){function X(){var W=E.highcharts||(typeof window=="undefined"?"undefined":x(window))==="object"&&window.Highcharts,D=E.constructorType||"chart";W?W[D]?E.options?k.current=W[D](A.current,E.options,E.callback?E.callback:void 0):console.warn('The "options" property was not passed.'):console.warn('The "constructorType" property is incorrect or some required module is not imported.'):console.warn('The "highcharts" property was not passed.')}if(k.current){if(E.allowChartUpdate!==!1)if(!E.immutable&&k.current){var Z;(Z=k.current).update.apply(Z,[E.options].concat(s(E.updateArgs||[!0,!0])))}else X()}else X()}),w(function(){return function(){k.current&&(k.current.destroy(),k.current=null)}},[]),Object(y.useImperativeHandle)(T,function(){return{get chart(){return k.current},container:A}},[]),_.a.createElement("div",a({},E.containerProps,{ref:A}))});i.default=Object(y.memo)(C)},function(n,i){n.exports=r}])})})(_ve);var fOt=Tk(_ve.exports),DG={},FIt=sc.exports;Object.defineProperty(DG,"__esModule",{value:!0});var zIt=DG.default=void 0,BIt=FIt(ac),jIt=kc,UIt=(0,BIt.default)((0,jIt.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore");zIt=DG.default=UIt;var NG={},VIt=sc.exports;Object.defineProperty(NG,"__esModule",{value:!0});var HIt=NG.default=void 0,WIt=VIt(ac),bve=kc,GIt=(0,WIt.default)([(0,bve.jsx)("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"},"0"),(0,bve.jsx)("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"},"1")],"AccessTime");HIt=NG.default=GIt;/** * splaytree v3.1.2 * Fast Splay tree for Node and browser * * @author Alexander Milevski <info@w8r.name> * @license MIT * @preserve *//*! ***************************************************************************** Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT. See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */function qIt(t,e){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(u){return function(p){return l([u,p])}}function l(u){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(o=u[0]&2?i.return:u[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,u[1])).done)return o;switch(i=0,o&&(u=[u[0]&2,o.value]),u[0]){case 0:case 1:o=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,i=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]<o[3])){r.label=u[1];break}if(u[0]===6&&r.label<o[1]){r.label=o[1],o=u;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(u);break}o[2]&&r.ops.pop(),r.trys.pop();continue}u=e.call(t,r)}catch(p){u=[6,p],i=0}finally{n=o=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}var C_=function(){function t(e,r){this.next=null,this.key=e,this.data=r,this.left=null,this.right=null}return t}();function XIt(t,e){return t>e?1:t<e?-1:0}function E_(t,e,r){for(var n=new C_(null,null),i=n,o=n;;){var a=r(t,e.key);if(a<0){if(e.left===null)break;if(r(t,e.left.key)<0){var s=e.left;if(e.left=s.right,s.right=e,e=s,e.left===null)break}o.left=e,o=e,e=e.left}else if(a>0){if(e.right===null)break;if(r(t,e.right.key)>0){var s=e.right;if(e.right=s.left,s.left=e,e=s,e.right===null)break}i.right=e,i=e,e=e.right}else break}return i.right=e.left,o.left=e.right,e.left=n.right,e.right=n.left,e}function $G(t,e,r,n){var i=new C_(t,e);if(r===null)return i.left=i.right=null,i;r=E_(t,r,n);var o=n(t,r.key);return o<0?(i.left=r.left,i.right=r,r.left=null):o>=0&&(i.right=r.right,i.left=r,r.right=null),i}function wve(t,e,r){var n=null,i=null;if(e){e=E_(t,e,r);var o=r(e.key,t);o===0?(n=e.left,i=e.right):o<0?(i=e.right,e.right=null,n=e):(n=e.left,e.left=null,i=e)}return{left:n,right:i}}function YIt(t,e,r){return e===null?t:(t===null||(e=E_(t.key,e,r),e.left=t),e)}function FG(t,e,r,n,i){if(t){n(""+e+(r?"\u2514\u2500\u2500 ":"\u251C\u2500\u2500 ")+i(t)+` `);var o=e+(r?" ":"\u2502 ");t.left&&FG(t.left,o,!1,n,i),t.right&&FG(t.right,o,!0,n,i)}}var zG=function(){function t(e){e===void 0&&(e=XIt),this._root=null,this._size=0,this._comparator=e}return t.prototype.insert=function(e,r){return this._size++,this._root=$G(e,r,this._root,this._comparator)},t.prototype.add=function(e,r){var n=new C_(e,r);this._root===null&&(n.left=n.right=null,this._size++,this._root=n);var i=this._comparator,o=E_(e,this._root,i),a=i(e,o.key);return a===0?this._root=o:(a<0?(n.left=o.left,n.right=o,o.left=null):a>0&&(n.right=o.right,n.left=o,o.right=null),this._size++,this._root=n),this._root},t.prototype.remove=function(e){this._root=this._remove(e,this._root,this._comparator)},t.prototype._remove=function(e,r,n){var i;if(r===null)return null;r=E_(e,r,n);var o=n(e,r.key);return o===0?(r.left===null?i=r.right:(i=E_(e,r.left,n),i.right=r.right),this._size--,i):r},t.prototype.pop=function(){var e=this._root;if(e){for(;e.left;)e=e.left;return this._root=E_(e.key,this._root,this._comparator),this._root=this._remove(e.key,this._root,this._comparator),{key:e.key,data:e.data}}return null},t.prototype.findStatic=function(e){for(var r=this._root,n=this._comparator;r;){var i=n(e,r.key);if(i===0)return r;i<0?r=r.left:r=r.right}return null},t.prototype.find=function(e){return this._root&&(this._root=E_(e,this._root,this._comparator),this._comparator(e,this._root.key)!==0)?null:this._root},t.prototype.contains=function(e){for(var r=this._root,n=this._comparator;r;){var i=n(e,r.key);if(i===0)return!0;i<0?r=r.left:r=r.right}return!1},t.prototype.forEach=function(e,r){for(var n=this._root,i=[],o=!1;!o;)n!==null?(i.push(n),n=n.left):i.length!==0?(n=i.pop(),e.call(r,n),n=n.right):o=!0;return this},t.prototype.range=function(e,r,n,i){for(var o=[],a=this._comparator,s=this._root,l;o.length!==0||s;)if(s)o.push(s),s=s.left;else{if(s=o.pop(),l=a(s.key,r),l>0)break;if(a(s.key,e)>=0&&n.call(i,s))return this;s=s.right}return this},t.prototype.keys=function(){var e=[];return this.forEach(function(r){var n=r.key;return e.push(n)}),e},t.prototype.values=function(){var e=[];return this.forEach(function(r){var n=r.data;return e.push(n)}),e},t.prototype.min=function(){return this._root?this.minNode(this._root).key:null},t.prototype.max=function(){return this._root?this.maxNode(this._root).key:null},t.prototype.minNode=function(e){if(e===void 0&&(e=this._root),e)for(;e.left;)e=e.left;return e},t.prototype.maxNode=function(e){if(e===void 0&&(e=this._root),e)for(;e.right;)e=e.right;return e},t.prototype.at=function(e){for(var r=this._root,n=!1,i=0,o=[];!n;)if(r)o.push(r),r=r.left;else if(o.length>0){if(r=o.pop(),i===e)return r;i++,r=r.right}else n=!0;return null},t.prototype.next=function(e){var r=this._root,n=null;if(e.right){for(n=e.right;n.left;)n=n.left;return n}for(var i=this._comparator;r;){var o=i(e.key,r.key);if(o===0)break;o<0?(n=r,r=r.left):r=r.right}return n},t.prototype.prev=function(e){var r=this._root,n=null;if(e.left!==null){for(n=e.left;n.right;)n=n.right;return n}for(var i=this._comparator;r;){var o=i(e.key,r.key);if(o===0)break;o<0?r=r.left:(n=r,r=r.right)}return n},t.prototype.clear=function(){return this._root=null,this._size=0,this},t.prototype.toList=function(){return ZIt(this._root)},t.prototype.load=function(e,r,n){r===void 0&&(r=[]),n===void 0&&(n=!1);var i=e.length,o=this._comparator;if(n&&UG(e,r,0,i-1,o),this._root===null)this._root=BG(e,r,0,i),this._size=i;else{var a=QIt(this.toList(),KIt(e,r),o);i=this._size+i,this._root=jG({head:a},0,i)}return this},t.prototype.isEmpty=function(){return this._root===null},Object.defineProperty(t.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"root",{get:function(){return this._root},enumerable:!0,configurable:!0}),t.prototype.toString=function(e){e===void 0&&(e=function(n){return String(n.key)});var r=[];return FG(this._root,"",!0,function(n){return r.push(n)},e),r.join("")},t.prototype.update=function(e,r,n){var i=this._comparator,o=wve(e,this._root,i),a=o.left,s=o.right;i(e,r)<0?s=$G(r,n,s,i):a=$G(r,n,a,i),this._root=YIt(a,s,i)},t.prototype.split=function(e){return wve(e,this._root,this._comparator)},t.prototype[Symbol.iterator]=function(){var e,r,n;return qIt(this,function(i){switch(i.label){case 0:e=this._root,r=[],n=!1,i.label=1;case 1:return n?[3,6]:e===null?[3,2]:(r.push(e),e=e.left,[3,5]);case 2:return r.length===0?[3,4]:(e=r.pop(),[4,e]);case 3:return i.sent(),e=e.right,[3,5];case 4:n=!0,i.label=5;case 5:return[3,1];case 6:return[2]}})},t}();function BG(t,e,r,n){var i=n-r;if(i>0){var o=r+Math.floor(i/2),a=t[o],s=e[o],l=new C_(a,s);return l.left=BG(t,e,r,o),l.right=BG(t,e,o+1,n),l}return null}function KIt(t,e){for(var r=new C_(null,null),n=r,i=0;i<t.length;i++)n=n.next=new C_(t[i],e[i]);return n.next=null,r.next}function ZIt(t){for(var e=t,r=[],n=!1,i=new C_(null,null),o=i;!n;)e?(r.push(e),e=e.left):r.length>0?(e=o=o.next=r.pop(),e=e.right):n=!0;return o.next=null,i.next}function jG(t,e,r){var n=r-e;if(n>0){var i=e+Math.floor(n/2),o=jG(t,e,i),a=t.head;return a.left=o,t.head=t.head.next,a.right=jG(t,i+1,r),a}return null}function QIt(t,e,r){for(var n=new C_(null,null),i=n,o=t,a=e;o!==null&&a!==null;)r(o.key,a.key)<0?(i.next=o,o=o.next):(i.next=a,a=a.next),i=i.next;return o!==null?i.next=o:a!==null&&(i.next=a),n.next}function UG(t,e,r,n,i){if(!(r>=n)){for(var o=t[r+n>>1],a=r-1,s=n+1;;){do a++;while(i(t[a],o)<0);do s--;while(i(t[s],o)>0);if(a>=s)break;var l=t[a];t[a]=t[s],t[s]=l,l=e[a],e[a]=e[s],e[s]=l}UG(t,e,r,s,i),UG(t,e,s+1,n,i)}}const o0=11102230246251565e-32,Bu=134217729,JIt=(3+8*o0)*o0;function VG(t,e,r,n,i){let o,a,s,l,u=e[0],p=n[0],m=0,v=0;p>u==p>-u?(o=u,u=e[++m]):(o=p,p=n[++v]);let x=0;if(m<t&&v<r)for(p>u==p>-u?(a=u+o,s=o-(a-u),u=e[++m]):(a=p+o,s=o-(a-p),p=n[++v]),o=a,s!==0&&(i[x++]=s);m<t&&v<r;)p>u==p>-u?(a=o+u,l=a-o,s=o-(a-l)+(u-l),u=e[++m]):(a=o+p,l=a-o,s=o-(a-l)+(p-l),p=n[++v]),o=a,s!==0&&(i[x++]=s);for(;m<t;)a=o+u,l=a-o,s=o-(a-l)+(u-l),u=e[++m],o=a,s!==0&&(i[x++]=s);for(;v<r;)a=o+p,l=a-o,s=o-(a-l)+(p-l),p=n[++v],o=a,s!==0&&(i[x++]=s);return(o!==0||x===0)&&(i[x++]=o),x}function eMt(t,e){let r=e[0];for(let n=1;n<t;n++)r+=e[n];return r}function $A(t){return new Float64Array(t)}const tMt=(3+16*o0)*o0,rMt=(2+12*o0)*o0,nMt=(9+64*o0)*o0*o0,mS=$A(4),Cve=$A(8),Eve=$A(12),Sve=$A(16),bf=$A(4);function iMt(t,e,r,n,i,o,a){let s,l,u,p,m,v,x,y,_,w,C,E,T,A,k,X,Z,W;const D=t-i,H=r-i,N=e-o,j=n-o;A=D*j,v=Bu*D,x=v-(v-D),y=D-x,v=Bu*j,_=v-(v-j),w=j-_,k=y*w-(A-x*_-y*_-x*w),X=N*H,v=Bu*N,x=v-(v-N),y=N-x,v=Bu*H,_=v-(v-H),w=H-_,Z=y*w-(X-x*_-y*_-x*w),C=k-Z,m=k-C,mS[0]=k-(C+m)+(m-Z),E=A+C,m=E-A,T=A-(E-m)+(C-m),C=T-X,m=T-C,mS[1]=T-(C+m)+(m-X),W=E+C,m=W-E,mS[2]=E-(W-m)+(C-m),mS[3]=W;let $=eMt(4,mS),z=rMt*a;if($>=z||-$>=z||(m=t-D,s=t-(D+m)+(m-i),m=r-H,u=r-(H+m)+(m-i),m=e-N,l=e-(N+m)+(m-o),m=n-j,p=n-(j+m)+(m-o),s===0&&l===0&&u===0&&p===0)||(z=nMt*a+JIt*Math.abs($),$+=D*p+j*s-(N*u+H*l),$>=z||-$>=z))return $;A=s*j,v=Bu*s,x=v-(v-s),y=s-x,v=Bu*j,_=v-(v-j),w=j-_,k=y*w-(A-x*_-y*_-x*w),X=l*H,v=Bu*l,x=v-(v-l),y=l-x,v=Bu*H,_=v-(v-H),w=H-_,Z=y*w-(X-x*_-y*_-x*w),C=k-Z,m=k-C,bf[0]=k-(C+m)+(m-Z),E=A+C,m=E-A,T=A-(E-m)+(C-m),C=T-X,m=T-C,bf[1]=T-(C+m)+(m-X),W=E+C,m=W-E,bf[2]=E-(W-m)+(C-m),bf[3]=W;const O=VG(4,mS,4,bf,Cve);A=D*p,v=Bu*D,x=v-(v-D),y=D-x,v=Bu*p,_=v-(v-p),w=p-_,k=y*w-(A-x*_-y*_-x*w),X=N*u,v=Bu*N,x=v-(v-N),y=N-x,v=Bu*u,_=v-(v-u),w=u-_,Z=y*w-(X-x*_-y*_-x*w),C=k-Z,m=k-C,bf[0]=k-(C+m)+(m-Z),E=A+C,m=E-A,T=A-(E-m)+(C-m),C=T-X,m=T-C,bf[1]=T-(C+m)+(m-X),W=E+C,m=W-E,bf[2]=E-(W-m)+(C-m),bf[3]=W;const F=VG(O,Cve,4,bf,Eve);A=s*p,v=Bu*s,x=v-(v-s),y=s-x,v=Bu*p,_=v-(v-p),w=p-_,k=y*w-(A-x*_-y*_-x*w),X=l*u,v=Bu*l,x=v-(v-l),y=l-x,v=Bu*u,_=v-(v-u),w=u-_,Z=y*w-(X-x*_-y*_-x*w),C=k-Z,m=k-C,bf[0]=k-(C+m)+(m-Z),E=A+C,m=E-A,T=A-(E-m)+(C-m),C=T-X,m=T-C,bf[1]=T-(C+m)+(m-X),W=E+C,m=W-E,bf[2]=E-(W-m)+(C-m),bf[3]=W;const G=VG(F,Eve,4,bf,Sve);return Sve[G-1]}function oMt(t,e,r,n,i,o){const a=(e-o)*(r-i),s=(t-i)*(n-o),l=a-s,u=Math.abs(a+s);return Math.abs(l)>=tMt*u?l:-iMt(t,e,r,n,i,o,u)}const FA=(t,e)=>t.ll.x<=e.x&&e.x<=t.ur.x&&t.ll.y<=e.y&&e.y<=t.ur.y,HG=(t,e)=>{if(e.ur.x<t.ll.x||t.ur.x<e.ll.x||e.ur.y<t.ll.y||t.ur.y<e.ll.y)return null;const r=t.ll.x<e.ll.x?e.ll.x:t.ll.x,n=t.ur.x<e.ur.x?t.ur.x:e.ur.x,i=t.ll.y<e.ll.y?e.ll.y:t.ll.y,o=t.ur.y<e.ur.y?t.ur.y:e.ur.y;return{ll:{x:r,y:i},ur:{x:n,y:o}}};let S_=Number.EPSILON;S_===void 0&&(S_=Math.pow(2,-52));const sMt=S_*S_,Tve=(t,e)=>{if(-S_<t&&t<S_&&-S_<e&&e<S_)return 0;const r=t-e;return r*r<sMt*t*e?0:t<e?-1:1};class aMt{constructor(){this.reset()}reset(){this.xRounder=new Pve,this.yRounder=new Pve}round(e,r){return{x:this.xRounder.round(e),y:this.yRounder.round(r)}}}class Pve{constructor(){this.tree=new zG,this.round(0)}round(e){const r=this.tree.add(e),n=this.tree.prev(r);if(n!==null&&Tve(r.key,n.key)===0)return this.tree.remove(e),n.key;const i=this.tree.next(r);return i!==null&&Tve(r.key,i.key)===0?(this.tree.remove(e),i.key):e}}const zA=new aMt,p4=(t,e)=>t.x*e.y-t.y*e.x,Ive=(t,e)=>t.x*e.x+t.y*e.y,Mve=(t,e,r)=>{const n=oMt(t.x,t.y,e.x,e.y,r.x,r.y);return n>0?-1:n<0?1:0},m4=t=>Math.sqrt(Ive(t,t)),lMt=(t,e,r)=>{const n={x:e.x-t.x,y:e.y-t.y},i={x:r.x-t.x,y:r.y-t.y};return p4(i,n)/m4(i)/m4(n)},cMt=(t,e,r)=>{const n={x:e.x-t.x,y:e.y-t.y},i={x:r.x-t.x,y:r.y-t.y};return Ive(i,n)/m4(i)/m4(n)},Ave=(t,e,r)=>e.y===0?null:{x:t.x+e.x/e.y*(r-t.y),y:r},Rve=(t,e,r)=>e.x===0?null:{x:r,y:t.y+e.y/e.x*(r-t.x)},uMt=(t,e,r,n)=>{if(e.x===0)return Rve(r,n,t.x);if(n.x===0)return Rve(t,e,r.x);if(e.y===0)return Ave(r,n,t.y);if(n.y===0)return Ave(t,e,r.y);const i=p4(e,n);if(i==0)return null;const o={x:r.x-t.x,y:r.y-t.y},a=p4(o,e)/i,s=p4(o,n)/i,l=t.x+s*e.x,u=r.x+a*n.x,p=t.y+s*e.y,m=r.y+a*n.y,v=(l+u)/2,x=(p+m)/2;return{x:v,y:x}};class Dp{static compare(e,r){const n=Dp.comparePoints(e.point,r.point);return n!==0?n:(e.point!==r.point&&e.link(r),e.isLeft!==r.isLeft?e.isLeft?1:-1:T_.compare(e.segment,r.segment))}static comparePoints(e,r){return e.x<r.x?-1:e.x>r.x?1:e.y<r.y?-1:e.y>r.y?1:0}constructor(e,r){e.events===void 0?e.events=[this]:e.events.push(this),this.point=e,this.isLeft=r}link(e){if(e.point===this.point)throw new Error("Tried to link already linked events");const r=e.point.events;for(let n=0,i=r.length;n<i;n++){const o=r[n];this.point.events.push(o),o.point=this.point}this.checkForConsuming()}checkForConsuming(){const e=this.point.events.length;for(let r=0;r<e;r++){const n=this.point.events[r];if(n.segment.consumedBy===void 0)for(let i=r+1;i<e;i++){const o=this.point.events[i];o.consumedBy===void 0&&n.otherSE.point.events===o.otherSE.point.events&&n.segment.consume(o.segment)}}}getAvailableLinkedEvents(){const e=[];for(let r=0,n=this.point.events.length;r<n;r++){const i=this.point.events[r];i!==this&&!i.segment.ringOut&&i.segment.isInResult()&&e.push(i)}return e}getLeftmostComparator(e){const r=new Map,n=i=>{const o=i.otherSE;r.set(i,{sine:lMt(this.point,e.point,o.point),cosine:cMt(this.point,e.point,o.point)})};return(i,o)=>{r.has(i)||n(i),r.has(o)||n(o);const{sine:a,cosine:s}=r.get(i),{sine:l,cosine:u}=r.get(o);return a>=0&&l>=0?s<u?1:s>u?-1:0:a<0&&l<0?s<u?-1:s>u?1:0:l<a?-1:l>a?1:0}}}let fMt=0;class T_{static compare(e,r){const n=e.leftSE.point.x,i=r.leftSE.point.x,o=e.rightSE.point.x,a=r.rightSE.point.x;if(a<n)return 1;if(o<i)return-1;const s=e.leftSE.point.y,l=r.leftSE.point.y,u=e.rightSE.point.y,p=r.rightSE.point.y;if(n<i){if(l<s&&l<u)return 1;if(l>s&&l>u)return-1;const m=e.comparePoint(r.leftSE.point);if(m<0)return 1;if(m>0)return-1;const v=r.comparePoint(e.rightSE.point);return v!==0?v:-1}if(n>i){if(s<l&&s<p)return-1;if(s>l&&s>p)return 1;const m=r.comparePoint(e.leftSE.point);if(m!==0)return m;const v=e.comparePoint(r.rightSE.point);return v<0?1:v>0?-1:1}if(s<l)return-1;if(s>l)return 1;if(o<a){const m=r.comparePoint(e.rightSE.point);if(m!==0)return m}if(o>a){const m=e.comparePoint(r.rightSE.point);if(m<0)return 1;if(m>0)return-1}if(o!==a){const m=u-s,v=o-n,x=p-l,y=a-i;if(m>v&&x<y)return 1;if(m<v&&x>y)return-1}return o>a?1:o<a||u<p?-1:u>p?1:e.id<r.id?-1:e.id>r.id?1:0}constructor(e,r,n,i){this.id=++fMt,this.leftSE=e,e.segment=this,e.otherSE=r,this.rightSE=r,r.segment=this,r.otherSE=e,this.rings=n,this.windings=i}static fromRing(e,r,n){let i,o,a;const s=Dp.comparePoints(e,r);if(s<0)i=e,o=r,a=1;else if(s>0)i=r,o=e,a=-1;else throw new Error(`Tried to create degenerate segment at [${e.x}, ${e.y}]`);const l=new Dp(i,!0),u=new Dp(o,!1);return new T_(l,u,[n],[a])}replaceRightSE(e){this.rightSE=e,this.rightSE.segment=this,this.rightSE.otherSE=this.leftSE,this.leftSE.otherSE=this.rightSE}bbox(){const e=this.leftSE.point.y,r=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:e<r?e:r},ur:{x:this.rightSE.point.x,y:e>r?e:r}}}vector(){return{x:this.rightSE.point.x-this.leftSE.point.x,y:this.rightSE.point.y-this.leftSE.point.y}}isAnEndpoint(e){return e.x===this.leftSE.point.x&&e.y===this.leftSE.point.y||e.x===this.rightSE.point.x&&e.y===this.rightSE.point.y}comparePoint(e){if(this.isAnEndpoint(e))return 0;const r=this.leftSE.point,n=this.rightSE.point,i=this.vector();if(r.x===n.x)return e.x===r.x?0:e.x<r.x?1:-1;const o=(e.y-r.y)/i.y,a=r.x+o*i.x;if(e.x===a)return 0;const s=(e.x-r.x)/i.x,l=r.y+s*i.y;return e.y===l?0:e.y<l?-1:1}getIntersection(e){const r=this.bbox(),n=e.bbox(),i=HG(r,n);if(i===null)return null;const o=this.leftSE.point,a=this.rightSE.point,s=e.leftSE.point,l=e.rightSE.point,u=FA(r,s)&&this.comparePoint(s)===0,p=FA(n,o)&&e.comparePoint(o)===0,m=FA(r,l)&&this.comparePoint(l)===0,v=FA(n,a)&&e.comparePoint(a)===0;if(p&&u)return v&&!m?a:!v&&m?l:null;if(p)return m&&o.x===l.x&&o.y===l.y?null:o;if(u)return v&&a.x===s.x&&a.y===s.y?null:s;if(v&&m)return null;if(v)return a;if(m)return l;const x=uMt(o,this.vector(),s,e.vector());return x===null||!FA(i,x)?null:zA.round(x.x,x.y)}split(e){const r=[],n=e.events!==void 0,i=new Dp(e,!0),o=new Dp(e,!1),a=this.rightSE;this.replaceRightSE(o),r.push(o),r.push(i);const s=new T_(i,a,this.rings.slice(),this.windings.slice());return Dp.comparePoints(s.leftSE.point,s.rightSE.point)>0&&s.swapEvents(),Dp.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),n&&(i.checkForConsuming(),o.checkForConsuming()),r}swapEvents(){const e=this.rightSE;this.rightSE=this.leftSE,this.leftSE=e,this.leftSE.isLeft=!0,this.rightSE.isLeft=!1;for(let r=0,n=this.windings.length;r<n;r++)this.windings[r]*=-1}consume(e){let r=this,n=e;for(;r.consumedBy;)r=r.consumedBy;for(;n.consumedBy;)n=n.consumedBy;const i=T_.compare(r,n);if(i!==0){if(i>0){const o=r;r=n,n=o}if(r.prev===n){const o=r;r=n,n=o}for(let o=0,a=n.rings.length;o<a;o++){const s=n.rings[o],l=n.windings[o],u=r.rings.indexOf(s);u===-1?(r.rings.push(s),r.windings.push(l)):r.windings[u]+=l}n.rings=null,n.windings=null,n.consumedBy=r,n.leftSE.consumedBy=r.leftSE,n.rightSE.consumedBy=r.rightSE}}prevInResult(){return this._prevInResult!==void 0?this._prevInResult:(this.prev?this.prev.isInResult()?this._prevInResult=this.prev:this._prevInResult=this.prev.prevInResult():this._prevInResult=null,this._prevInResult)}beforeState(){if(this._beforeState!==void 0)return this._beforeState;if(!this.prev)this._beforeState={rings:[],windings:[],multiPolys:[]};else{const e=this.prev.consumedBy||this.prev;this._beforeState=e.afterState()}return this._beforeState}afterState(){if(this._afterState!==void 0)return this._afterState;const e=this.beforeState();this._afterState={rings:e.rings.slice(0),windings:e.windings.slice(0),multiPolys:[]};const r=this._afterState.rings,n=this._afterState.windings,i=this._afterState.multiPolys;for(let s=0,l=this.rings.length;s<l;s++){const u=this.rings[s],p=this.windings[s],m=r.indexOf(u);m===-1?(r.push(u),n.push(p)):n[m]+=p}const o=[],a=[];for(let s=0,l=r.length;s<l;s++){if(n[s]===0)continue;const u=r[s],p=u.poly;if(a.indexOf(p)===-1)if(u.isExterior)o.push(p);else{a.indexOf(p)===-1&&a.push(p);const m=o.indexOf(u.poly);m!==-1&&o.splice(m,1)}}for(let s=0,l=o.length;s<l;s++){const u=o[s].multiPoly;i.indexOf(u)===-1&&i.push(u)}return this._afterState}isInResult(){if(this.consumedBy)return!1;if(this._isInResult!==void 0)return this._isInResult;const e=this.beforeState().multiPolys,r=this.afterState().multiPolys;switch(eg.type){case"union":{const n=e.length===0,i=r.length===0;this._isInResult=n!==i;break}case"intersection":{let n,i;e.length<r.length?(n=e.length,i=r.length):(n=r.length,i=e.length),this._isInResult=i===eg.numMultiPolys&&n<i;break}case"xor":{const n=Math.abs(e.length-r.length);this._isInResult=n%2==1;break}case"difference":{const n=i=>i.length===1&&i[0].isSubject;this._isInResult=n(e)!==n(r);break}default:throw new Error(`Unrecognized operation type found ${eg.type}`)}return this._isInResult}}class kve{constructor(e,r,n){if(!Array.isArray(e)||e.length===0)throw new Error("Input geometry is not a valid Polygon or MultiPolygon");if(this.poly=r,this.isExterior=n,this.segments=[],typeof e[0][0]!="number"||typeof e[0][1]!="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");const i=zA.round(e[0][0],e[0][1]);this.bbox={ll:{x:i.x,y:i.y},ur:{x:i.x,y:i.y}};let o=i;for(let a=1,s=e.length;a<s;a++){if(typeof e[a][0]!="number"||typeof e[a][1]!="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");let l=zA.round(e[a][0],e[a][1]);l.x===o.x&&l.y===o.y||(this.segments.push(T_.fromRing(o,l,this)),l.x<this.bbox.ll.x&&(this.bbox.ll.x=l.x),l.y<this.bbox.ll.y&&(this.bbox.ll.y=l.y),l.x>this.bbox.ur.x&&(this.bbox.ur.x=l.x),l.y>this.bbox.ur.y&&(this.bbox.ur.y=l.y),o=l)}(i.x!==o.x||i.y!==o.y)&&this.segments.push(T_.fromRing(o,i,this))}getSweepEvents(){const e=[];for(let r=0,n=this.segments.length;r<n;r++){const i=this.segments[r];e.push(i.leftSE),e.push(i.rightSE)}return e}}class dMt{constructor(e,r){if(!Array.isArray(e))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");this.exteriorRing=new kve(e[0],this,!0),this.bbox={ll:{x:this.exteriorRing.bbox.ll.x,y:this.exteriorRing.bbox.ll.y},ur:{x:this.exteriorRing.bbox.ur.x,y:this.exteriorRing.bbox.ur.y}},this.interiorRings=[];for(let n=1,i=e.length;n<i;n++){const o=new kve(e[n],this,!1);o.bbox.ll.x<this.bbox.ll.x&&(this.bbox.ll.x=o.bbox.ll.x),o.bbox.ll.y<this.bbox.ll.y&&(this.bbox.ll.y=o.bbox.ll.y),o.bbox.ur.x>this.bbox.ur.x&&(this.bbox.ur.x=o.bbox.ur.x),o.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=o.bbox.ur.y),this.interiorRings.push(o)}this.multiPoly=r}getSweepEvents(){const e=this.exteriorRing.getSweepEvents();for(let r=0,n=this.interiorRings.length;r<n;r++){const i=this.interiorRings[r].getSweepEvents();for(let o=0,a=i.length;o<a;o++)e.push(i[o])}return e}}class Ove{constructor(e,r){if(!Array.isArray(e))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");try{typeof e[0][0][0]=="number"&&(e=[e])}catch{}this.polys=[],this.bbox={ll:{x:Number.POSITIVE_INFINITY,y:Number.POSITIVE_INFINITY},ur:{x:Number.NEGATIVE_INFINITY,y:Number.NEGATIVE_INFINITY}};for(let n=0,i=e.length;n<i;n++){const o=new dMt(e[n],this);o.bbox.ll.x<this.bbox.ll.x&&(this.bbox.ll.x=o.bbox.ll.x),o.bbox.ll.y<this.bbox.ll.y&&(this.bbox.ll.y=o.bbox.ll.y),o.bbox.ur.x>this.bbox.ur.x&&(this.bbox.ur.x=o.bbox.ur.x),o.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=o.bbox.ur.y),this.polys.push(o)}this.isSubject=r}getSweepEvents(){const e=[];for(let r=0,n=this.polys.length;r<n;r++){const i=this.polys[r].getSweepEvents();for(let o=0,a=i.length;o<a;o++)e.push(i[o])}return e}}class g4{static factory(e){const r=[];for(let n=0,i=e.length;n<i;n++){const o=e[n];if(!o.isInResult()||o.ringOut)continue;let a=null,s=o.leftSE,l=o.rightSE;const u=[s],p=s.point,m=[];for(;a=s,s=l,u.push(s),s.point!==p;)for(;;){const v=s.getAvailableLinkedEvents();if(v.length===0){const _=u[0].point,w=u[u.length-1].point;throw new Error(`Unable to complete output ring starting at [${_.x}, ${_.y}]. Last matching segment found ends at [${w.x}, ${w.y}].`)}if(v.length===1){l=v[0].otherSE;break}let x=null;for(let _=0,w=m.length;_<w;_++)if(m[_].point===s.point){x=_;break}if(x!==null){const _=m.splice(x)[0],w=u.splice(_.index);w.unshift(w[0].otherSE),r.push(new g4(w.reverse()));continue}m.push({index:u.length,point:s.point});const y=s.getLeftmostComparator(a);l=v.sort(y)[0].otherSE;break}r.push(new g4(u))}return r}constructor(e){this.events=e;for(let r=0,n=e.length;r<n;r++)e[r].segment.ringOut=this;this.poly=null}getGeom(){let e=this.events[0].point;const r=[e];for(let u=1,p=this.events.length-1;u<p;u++){const m=this.events[u].point,v=this.events[u+1].point;Mve(m,e,v)!==0&&(r.push(m),e=m)}if(r.length===1)return null;const n=r[0],i=r[1];Mve(n,e,i)===0&&r.shift(),r.push(r[0]);const o=this.isExteriorRing()?1:-1,a=this.isExteriorRing()?0:r.length-1,s=this.isExteriorRing()?r.length:-1,l=[];for(let u=a;u!=s;u+=o)l.push([r[u].x,r[u].y]);return l}isExteriorRing(){if(this._isExteriorRing===void 0){const e=this.enclosingRing();this._isExteriorRing=e?!e.isExteriorRing():!0}return this._isExteriorRing}enclosingRing(){return this._enclosingRing===void 0&&(this._enclosingRing=this._calcEnclosingRing()),this._enclosingRing}_calcEnclosingRing(){let e=this.events[0];for(let i=1,o=this.events.length;i<o;i++){const a=this.events[i];Dp.compare(e,a)>0&&(e=a)}let r=e.segment.prevInResult(),n=r?r.prevInResult():null;for(;;){if(!r)return null;if(!n)return r.ringOut;if(n.ringOut!==r.ringOut)return n.ringOut.enclosingRing()!==r.ringOut?r.ringOut:r.ringOut.enclosingRing();r=n.prevInResult(),n=r?r.prevInResult():null}}}class Lve{constructor(e){this.exteriorRing=e,e.poly=this,this.interiorRings=[]}addInterior(e){this.interiorRings.push(e),e.poly=this}getGeom(){const e=[this.exteriorRing.getGeom()];if(e[0]===null)return null;for(let r=0,n=this.interiorRings.length;r<n;r++){const i=this.interiorRings[r].getGeom();i!==null&&e.push(i)}return e}}class hMt{constructor(e){this.rings=e,this.polys=this._composePolys(e)}getGeom(){const e=[];for(let r=0,n=this.polys.length;r<n;r++){const i=this.polys[r].getGeom();i!==null&&e.push(i)}return e}_composePolys(e){const r=[];for(let n=0,i=e.length;n<i;n++){const o=e[n];if(!o.poly)if(o.isExteriorRing())r.push(new Lve(o));else{const a=o.enclosingRing();a.poly||r.push(new Lve(a)),a.poly.addInterior(o)}}return r}}class pMt{constructor(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:T_.compare;this.queue=e,this.tree=new zG(r),this.segments=[]}process(e){const r=e.segment,n=[];if(e.consumedBy)return e.isLeft?this.queue.remove(e.otherSE):this.tree.remove(r),n;const i=e.isLeft?this.tree.add(r):this.tree.find(r);if(!i)throw new Error(`Unable to find segment #${r.id} [${r.leftSE.point.x}, ${r.leftSE.point.y}] -> [${r.rightSE.point.x}, ${r.rightSE.point.y}] in SweepLine tree.`);let o=i,a=i,s,l;for(;s===void 0;)o=this.tree.prev(o),o===null?s=null:o.key.consumedBy===void 0&&(s=o.key);for(;l===void 0;)a=this.tree.next(a),a===null?l=null:a.key.consumedBy===void 0&&(l=a.key);if(e.isLeft){let u=null;if(s){const m=s.getIntersection(r);if(m!==null&&(r.isAnEndpoint(m)||(u=m),!s.isAnEndpoint(m))){const v=this._splitSafely(s,m);for(let x=0,y=v.length;x<y;x++)n.push(v[x])}}let p=null;if(l){const m=l.getIntersection(r);if(m!==null&&(r.isAnEndpoint(m)||(p=m),!l.isAnEndpoint(m))){const v=this._splitSafely(l,m);for(let x=0,y=v.length;x<y;x++)n.push(v[x])}}if(u!==null||p!==null){let m=null;u===null?m=p:p===null?m=u:m=Dp.comparePoints(u,p)<=0?u:p,this.queue.remove(r.rightSE),n.push(r.rightSE);const v=r.split(m);for(let x=0,y=v.length;x<y;x++)n.push(v[x])}n.length>0?(this.tree.remove(r),n.push(e)):(this.segments.push(r),r.prev=s)}else{if(s&&l){const u=s.getIntersection(l);if(u!==null){if(!s.isAnEndpoint(u)){const p=this._splitSafely(s,u);for(let m=0,v=p.length;m<v;m++)n.push(p[m])}if(!l.isAnEndpoint(u)){const p=this._splitSafely(l,u);for(let m=0,v=p.length;m<v;m++)n.push(p[m])}}}this.tree.remove(r)}return n}_splitSafely(e,r){this.tree.remove(e);const n=e.rightSE;this.queue.remove(n);const i=e.split(r);return i.push(n),e.consumedBy===void 0&&this.tree.add(e),i}}const Dve=typeof process!="undefined"&&{}.POLYGON_CLIPPING_MAX_QUEUE_SIZE||1e6,mMt=typeof process!="undefined"&&{}.POLYGON_CLIPPING_MAX_SWEEPLINE_SEGMENTS||1e6;class gMt{run(e,r,n){eg.type=e,zA.reset();const i=[new Ove(r,!0)];for(let m=0,v=n.length;m<v;m++)i.push(new Ove(n[m],!1));if(eg.numMultiPolys=i.length,eg.type==="difference"){const m=i[0];let v=1;for(;v<i.length;)HG(i[v].bbox,m.bbox)!==null?v++:i.splice(v,1)}if(eg.type==="intersection")for(let m=0,v=i.length;m<v;m++){const x=i[m];for(let y=m+1,_=i.length;y<_;y++)if(HG(x.bbox,i[y].bbox)===null)return[]}const o=new zG(Dp.compare);for(let m=0,v=i.length;m<v;m++){const x=i[m].getSweepEvents();for(let y=0,_=x.length;y<_;y++)if(o.insert(x[y]),o.size>Dve)throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big).")}const a=new pMt(o);let s=o.size,l=o.pop();for(;l;){const m=l.key;if(o.size===s){const x=m.segment;throw new Error(`Unable to pop() ${m.isLeft?"left":"right"} SweepEvent [${m.point.x}, ${m.point.y}] from segment #${x.id} [${x.leftSE.point.x}, ${x.leftSE.point.y}] -> [${x.rightSE.point.x}, ${x.rightSE.point.y}] from queue.`)}if(o.size>Dve)throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big).");if(a.segments.length>mMt)throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments).");const v=a.process(m);for(let x=0,y=v.length;x<y;x++){const _=v[x];_.consumedBy===void 0&&o.insert(_)}s=o.size,l=o.pop()}zA.reset();const u=g4.factory(a.segments);return new hMt(u).getGeom()}}const eg=new gMt,vMt=function(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];return eg.run("union",t,r)},yMt=function(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];return eg.run("intersection",t,r)},xMt=function(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];return eg.run("xor",t,r)},_Mt=function(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];return eg.run("difference",t,r)};var bMt={union:vMt,intersection:yMt,xor:xMt,difference:_Mt};function Nve(t){return t.type==="Feature"?t.geometry:t}function dOt(t,e){var r=Nve(t),n=Nve(e),i=t.properties||{},o=bMt.difference(r.coordinates,n.coordinates);return o.length===0?null:o.length===1?O9e(o[0],i):L9e(o,i)}var WG={},wMt=sc.exports;Object.defineProperty(WG,"__esModule",{value:!0});var CMt=WG.default=void 0,EMt=wMt(ac),SMt=kc,TMt=(0,EMt.default)((0,SMt.jsx)("path",{d:"M12 5.9c1.16 0 2.1.94 2.1 2.1s-.94 2.1-2.1 2.1S9.9 9.16 9.9 8s.94-2.1 2.1-2.1m0 9c2.97 0 6.1 1.46 6.1 2.1v1.1H5.9V17c0-.64 3.13-2.1 6.1-2.1M12 4C9.79 4 8 5.79 8 8s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm0 9c-2.67 0-8 1.34-8 4v3h16v-3c0-2.66-5.33-4-8-4z"}),"PersonOutlineSharp");CMt=WG.default=TMt;var GG={},PMt=sc.exports;Object.defineProperty(GG,"__esModule",{value:!0});var IMt=GG.default=void 0,MMt=PMt(ac),AMt=kc,RMt=(0,MMt.default)((0,AMt.jsx)("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"}),"PersonSharp");IMt=GG.default=RMt;/*! * chartjs-plugin-annotation v1.0.2 * https://www.chartjs.org/chartjs-plugin-annotation/index * (c) 2021 chartjs-plugin-annotation Contributors * Released under the MIT License */const $ve=["click","dblclick"],qG=["enter","leave"],XG=$ve.concat(qG);function kMt(t,e,r){const n=e.annotations||[];e.listened=!1,e.moveListened=!1,XG.forEach(i=>{typeof r[i]=="function"&&(e.listened=!0,e.listeners[i]=r[i])}),qG.forEach(i=>{typeof r[i]=="function"&&(e.moveListened=!0)}),(!e.listened||!e.moveListened)&&n.forEach(i=>{e.listened||$ve.forEach(o=>{typeof i[o]=="function"&&(e.listened=!0)}),e.moveListened||qG.forEach(o=>{typeof i[o]=="function"&&(e.listened=!0,e.moveListened=!0)})})}function OMt(t,e,r,n){if(e.listened)switch(r.type){case"mousemove":case"mouseout":LMt(t,e,r);break;case"click":NMt(t,e,r,n);break}}function LMt(t,e,r){if(!e.moveListened)return;let n;r.type==="mousemove"&&(n=Fve(e.elements,r));const i=e.hovered;e.hovered=n,DMt(t,e,i,n)}function DMt(t,e,r,n){r&&r!==n&&BA(t,e,r.options.leave||e.listeners.leave,r),n&&n!==r&&BA(t,e,n.options.enter||e.listeners.enter,n)}function NMt(t,e,r,n){const i=e.listeners,o=Fve(e.elements,r);if(o){const a=o.options,s=a.dblclick||i.dblclick,l=a.click||i.click;o.clickTimeout?(clearTimeout(o.clickTimeout),delete o.clickTimeout,BA(t,e,s,o)):s?o.clickTimeout=setTimeout(()=>{delete o.clickTimeout,BA(t,e,l,o)},n.dblClickSpeed):BA(t,e,l,o)}}function BA(t,e,r,n){Vs(r,[{chart:t,element:n}])}function Fve(t,e){let r=Number.POSITIVE_INFINITY;return t.filter(n=>n.options.display&&n.inRange(e.x,e.y)).reduce((n,i)=>{const o=i.getCenterPoint(),a=q3(e,o);return a<r?(n=[i],r=a):a===r&&n.push(i),n},[]).sort((n,i)=>n._index-i._index).slice(0,1)[0]}const P_=Math.PI,I_=P_/2;function Np(t,e,r){return e=typeof e=="number"?e:t.parse(e),Aa(e)?t.getPixelForValue(e):r}function zve(t,e,r,n,i,o){if(t.beginPath(),o){const a=Math.min(o,i/2,n/2),s=e+a,l=r+a,u=e+n-a,p=r+i-a;t.moveTo(e,l),s<u&&l<p?(t.arc(s,l,a,-P_,-I_),t.arc(u,l,a,-I_,0),t.arc(u,p,a,0,I_),t.arc(s,p,a,I_,P_)):s<u?(t.moveTo(s,r),t.arc(u,l,a,-I_,I_),t.arc(s,l,a,I_,P_+I_)):l<p?(t.arc(s,l,a,-P_,0),t.arc(s,p,a,0,P_)):t.arc(s,l,a,-P_,P_),t.closePath(),t.moveTo(e,r)}else t.rect(e,r,n,i)}function $Mt(t,e,r){var n=Math.cos(r),i=Math.sin(r),o=e.x,a=e.y;return{x:o+n*(t.x-o)-i*(t.y-a),y:a+i*(t.x-o)+n*(t.y-a)}}class jA extends id{inRange(e,r,n){const{x:i,y:o,width:a,height:s}=this.getProps(["x","y","width","height"],n);return e>=i&&e<=i+a&&r>=o&&r<=o+s}getCenterPoint(e){const{x:r,y:n,width:i,height:o}=this.getProps(["x","y","width","height"],e);return{x:r+i/2,y:n+o/2}}draw(e){const{x:r,y:n,width:i,height:o,options:a}=this;e.save(),e.lineWidth=a.borderWidth,e.strokeStyle=a.borderColor,e.fillStyle=a.backgroundColor,e.setLineDash(a.borderDash),e.lineDashOffset=a.borderDashOffset,zve(e,r,n,i,o,a.cornerRadius),e.fill(),a.borderWidth&&e.stroke(),e.restore()}resolveElementProperties(e,r){const n=e.scales[r.xScaleID],i=e.scales[r.yScaleID];let{top:o,left:a,bottom:s,right:l}=e.chartArea,u,p;return!n&&!i?{options:{}}:(n&&(u=Np(n,r.xMin,a),p=Np(n,r.xMax,l),a=Math.min(u,p),l=Math.max(u,p)),i&&(u=Np(i,r.yMin,s),p=Np(i,r.yMax,o),o=Math.min(u,p),s=Math.max(u,p)),{x:a,y:o,x2:l,y2:s,width:l-a,height:s-o})}}jA.id="boxAnnotation";jA.defaults={display:!0,adjustScaleRange:!0,borderDash:[],borderDashOffset:0,borderWidth:1,cornerRadius:0,xScaleID:"x",xMin:void 0,xMax:void 0,yScaleID:"y",yMin:void 0,yMax:void 0};jA.defaultRoutes={borderColor:"color",backgroundColor:"color"};const v4=Math.PI,FMt=(t,e,r)=>Math.min(r,Math.max(e,t)),YG=(t,e,r)=>({x:t.x+r*(e.x-t.x),y:t.y+r*(e.y-t.y)}),Bve=(t,e,r)=>YG(e,r,Math.abs((t-e.y)/(r.y-e.y))).x,jve=(t,e,r)=>YG(e,r,Math.abs((t-e.x)/(r.x-e.x))).y,zMt=t=>typeof t=="string"&&t.endsWith("%")&&parseFloat(t)/100;function Uve({x:t,y:e},r,{top:n,right:i,bottom:o,left:a}){return t<a&&(e=r.x<a?NaN:jve(a,{x:t,y:e},r),t=a),t>i&&(e=r.x>i?NaN:jve(i,{x:t,y:e},r),t=i),e<n&&(t=r.y<n?NaN:Bve(n,{x:t,y:e},r),e=n),e>o&&(t=r.y>o?NaN:Bve(o,{x:t,y:e},r),e=o),{x:t,y:e}}function BMt(t,e,r){const{x:n,y:i}=Uve(t,e,r),{x:o,y:a}=Uve(e,t,r);return{x:n,y:i,x2:o,y2:a,width:Math.abs(o-n),height:Math.abs(a-i)}}class y4 extends id{intersects(e,r,n=.001){const i=_=>_*_,{x:o,y:a,x2:s,y2:l}=this,u=s-o,p=l-a,m=i(u)+i(p),v=m===0?-1:((e-o)*u+(r-a)*p)/m;let x,y;return v<0?(x=o,y=a):v>1?(x=s,y=l):(x=o+v*u,y=a+v*p),i(e-x)+i(r-y)<n}labelIsVisible(){const e=this.options.label;return e&&e.enabled&&e.content}isOnLabel(e,r){const{labelRect:n}=this;if(!n||!this.labelIsVisible())return!1;const{x:i,y:o}=$Mt({x:e,y:r},n,-n.rotation),a=n.width/2,s=n.height/2;return i>=n.x-a&&i<=n.x+a&&o>=n.y-s&&o<=n.y+s}inRange(e,r){const n=this.options.borderWidth||1;return this.intersects(e,r,n)||this.isOnLabel(e,r)}getCenterPoint(){return{x:(this.x2+this.x)/2,y:(this.y2+this.y)/2}}draw(e){const{x:r,y:n,x2:i,y2:o,options:a}=this;e.save(),e.lineWidth=a.borderWidth,e.strokeStyle=a.borderColor,e.setLineDash(a.borderDash),e.lineDashOffset=a.borderDashOffset,e.beginPath(),e.moveTo(r,n),e.lineTo(i,o),e.stroke(),e.restore()}drawLabel(e,r){this.labelIsVisible()&&(e.save(),UMt(e,this,r),e.restore())}resolveElementProperties(e,r){const n=e.scales[r.scaleID];let{top:i,left:o,bottom:a,right:s}=e.chartArea,l,u;if(n)l=Np(n,r.value,NaN),u=Np(n,r.endValue,l),n.isHorizontal()?(o=l,s=u):(i=l,a=u);else{const p=e.scales[r.xScaleID],m=e.scales[r.yScaleID];p&&(o=Np(p,r.xMin,o),s=Np(p,r.xMax,s)),m&&(i=Np(m,r.yMin,i),a=Np(m,r.yMax,a))}return BMt({x:o,y:i},{x:s,y:a},e.chartArea)}}y4.id="lineAnnotation";y4.defaults={display:!0,adjustScaleRange:!0,borderWidth:2,borderDash:[],borderDashOffset:0,label:{backgroundColor:"rgba(0,0,0,0.8)",drawTime:void 0,font:{family:void 0,lineHeight:void 0,size:void 0,style:"bold",weight:void 0},color:"#fff",xPadding:6,yPadding:6,rotation:0,cornerRadius:6,position:"center",xAdjust:0,yAdjust:0,textAlign:"center",enabled:!1,content:null},value:void 0,endValue:void 0,scaleID:void 0,xScaleID:"x",xMin:void 0,xMax:void 0,yScaleID:"y",yMin:void 0,yMax:void 0};y4.defaultRoutes={borderColor:"color"};function jMt(t){const{x:e,y:r,x2:n,y2:i}=t,o=Math.atan2(i-r,n-e);return o>v4/2?o-v4:o<v4/-2?o+v4:o}function UMt(t,e,r){const n=e.options.label;t.font=dae(n.font);const{width:i,height:o}=HMt(t,n),a=e.labelRect=WMt(e,i,o,r);if(t.translate(a.x,a.y),t.rotate(a.rotation),t.fillStyle=n.backgroundColor,zve(t,-(i/2),-(o/2),i,o,n.cornerRadius),t.fill(),t.fillStyle=n.color,Es(n.content)){t.textAlign=n.textAlign;const s=VMt(n,i);let l=-(o/2)+n.yPadding;for(let u=0;u<n.content.length;u++)t.textBaseline="top",t.fillText(n.content[u],s,l),l+=n.font.size+n.yPadding}else if(n.content instanceof Image){const s=-(i/2)+n.xPadding,l=-(o/2)+n.yPadding;t.drawImage(n.content,s,l,i-2*n.xPadding,o-2*n.yPadding)}else t.textAlign="center",t.textBaseline="middle",t.fillText(n.content,0,0)}function VMt(t,e){const{textAlign:r,xPadding:n}=t;return r==="start"?-(e/2)+n:r==="end"?+(e/2)-n:0}function Vve(t,e){return typeof e=="number"?e:typeof e=="string"?zMt(e)*t:t}const KG=new Map;function HMt(t,e){const r=e.content;if(r instanceof Image)return{width:Vve(r.width,e.width)+2*e.xPadding,height:Vve(r.height,e.height)+2*e.yPadding};const n=Es(r)?r:[r],i=n.length;let o=0;for(let a=0;a<i;a++){const s=n[a];KG.has(s)||KG.set(s,t.measureText(s).width),o=Math.max(o,KG.get(s))}return o+=2*e.xPadding,{width:o,height:i*e.font.size+(i+1)*e.yPadding}}function WMt(t,e,r,n){const i=t.options.label,{xAdjust:o,yAdjust:a,xPadding:s,yPadding:l,position:u}=i,p={x:t.x,y:t.y},m={x:t.x2,y:t.y2},v=i.rotation==="auto"?jMt(t):dp(i.rotation),x=GMt(e,r,v),y=qMt(t,u,x,n),_=YG(p,m,y),w={size:x.w,min:n.left,max:n.right,padding:s},C={size:x.h,min:n.top,max:n.bottom,padding:l};return{x:Wve(_.x,w)+o,y:Wve(_.y,C)+a,width:e,height:r,rotation:v}}function GMt(t,e,r){const n=Math.cos(r),i=Math.sin(r);return{w:Math.abs(t*n)+Math.abs(e*i),h:Math.abs(t*i)+Math.abs(e*n)}}function qMt(t,e,r,n){let i=.5;const o=XMt(t,n),a=t.options.label;return e==="start"?i=Hve({w:t.x2-t.x,h:t.y2-t.y},r,a,o):e==="end"&&(i=1-Hve({w:t.x-t.x2,h:t.y-t.y2},r,a,o)),i}function Hve(t,e,r,n){const{xPadding:i,yPadding:o}=r,a=t.w*n.dx,s=t.h*n.dy,l=a>0&&(e.w/2+i-n.x)/a,u=s>0&&(e.h/2+o-n.y)/s;return FMt(Math.max(l,u),0,.25)}function XMt(t,e){const{x:r,x2:n,y:i,y2:o}=t,a=Math.min(i,o)-e.top,s=Math.min(r,n)-e.left,l=e.bottom-Math.max(i,o),u=e.right-Math.max(r,n);return{x:Math.min(s,u),y:Math.min(a,l),dx:s<u?1:-1,dy:a<l?1:-1}}function Wve(t,e){const{size:r,min:n,max:i,padding:o}=e,a=r/2;return r>i-n?(i+n)/2:(n>=t-o-a&&(t=n+o+a),i<=t+o+a&&(t=i-o-a),t)}class x4 extends jA{inRange(e,r){return YMt({x:e,y:r},this)}draw(e){const{width:r,height:n,options:i}=this,o=this.getCenterPoint();e.save(),e.beginPath(),e.lineWidth=i.borderWidth,e.strokeStyle=i.borderColor,e.fillStyle=i.backgroundColor,e.setLineDash(i.borderDash),e.lineDashOffset=i.borderDashOffset,e.ellipse(o.x,o.y,n/2,r/2,Math.PI/2,0,2*Math.PI),e.fill(),e.stroke(),e.restore()}}x4.id="ellipseAnnotation";x4.defaults={display:!0,adjustScaleRange:!0,borderDash:[],borderDashOffset:0,borderWidth:1,xScaleID:"x",xMin:void 0,xMax:void 0,yScaleID:"y",yMin:void 0,yMax:void 0};x4.defaultRoutes={borderColor:"color",backgroundColor:"color"};function YMt(t,e){const{width:r,height:n}=e,i=e.getCenterPoint(!0),o=r/2,a=n/2;return o<=0||a<=0?!1:Math.pow(t.x-i.x,2)/Math.pow(o,2)+Math.pow(t.y-i.y,2)/Math.pow(a,2)<=1}class _4 extends id{inRange(e,r){const{width:n,options:i}=this,o=this.getCenterPoint(!0),a=n/2+i.borderWidth;return a<=0?!1:Math.pow(e-o.x,2)+Math.pow(r-o.y,2)<=Math.pow(a,2)}getCenterPoint(e){const{x:r,y:n}=this.getProps(["x","y"],e);return{x:r,y:n}}draw(e){const{x:r,y:n,width:i,options:o}=this;e.save(),e.lineWidth=o.borderWidth,e.strokeStyle=o.borderColor,e.fillStyle=o.backgroundColor,e.setLineDash(o.borderDash),e.lineDashOffset=o.borderDashOffset,e.beginPath(),e.arc(r,n,i/2,0,Math.PI*2),e.fill(),e.stroke(),e.restore()}resolveElementProperties(e,r){const{chartArea:n,scales:i}=e,o=i[r.xScaleID],a=i[r.yScaleID];let s=n.width/2,l=n.height/2;return o&&(s=Np(o,r.xValue,s)),a&&(l=Np(a,r.yValue,l)),{x:s,y:l,width:r.radius*2,height:r.radius*2}}}_4.id="pointAnnotation";_4.defaults={display:!0,adjustScaleRange:!0,borderDash:[],borderDashOffset:0,borderWidth:1,radius:10,xScaleID:"x",xValue:void 0,yScaleID:"y",yValue:void 0};_4.defaultRoutes={borderColor:"color",backgroundColor:"color"};var KMt="1.0.2";const M_=new Map,s0={box:jA,line:y4,ellipse:x4,point:_4};Object.keys(s0).forEach(t=>{ko.describe(`elements.${s0[t].id}`,{_fallback:"plugins.annotation"})});var hOt={id:"annotation",version:KMt,afterRegister(){rE.register(s0)},afterUnregister(){rE.unregister(s0)},beforeInit(t){M_.set(t,{annotations:[],elements:[],listeners:{},listened:!1,moveListened:!1})},beforeUpdate(t,e,r){const n=M_.get(t),i=n.annotations=[];let o=r.annotations;uo(o)?Object.keys(o).forEach(a=>{const s=o[a];uo(s)&&(s.id=a,i.push(s))}):Es(o)&&i.push(...o)},afterDataLimits(t,e){const r=M_.get(t);nAt(t,e.scale,r.annotations.filter(n=>n.display&&n.adjustScaleRange))},afterUpdate(t,e,r){const n=M_.get(t);kMt(t,n,r),JMt(t,n,r,e.mode)},beforeDatasetsDraw(t){b4(t,"beforeDatasetsDraw")},afterDatasetsDraw(t){b4(t,"afterDatasetsDraw")},beforeDraw(t){b4(t,"beforeDraw")},afterDraw(t){b4(t,"afterDraw")},beforeEvent(t,e,r){const n=M_.get(t);OMt(t,n,e.event,r)},destroy(t){M_.delete(t)},_getState(t){return M_.get(t)},defaults:{drawTime:"afterDatasetsDraw",dblClickSpeed:350,animations:{numbers:{properties:["x","y","x2","y2","width","height"],type:"number"}},label:{drawTime:null}},descriptors:{_indexable:!1,_scriptable:t=>!XG.includes(t),annotations:{_allKeys:!1,_fallback:(t,e)=>`elements.${s0[e.type||"line"].id}`}},additionalOptionScopes:[""]};const ZMt={update:Object.assign};function QMt(t,e,r){return r==="reset"||r==="none"||r==="resize"?ZMt:new xU(t,e)}function JMt(t,e,r,n){const i=QMt(t,r.animations,n),o=e.annotations,a=rAt(e.elements,o);for(let s=0;s<o.length;s++){const l=o[s];let u=a[s];const p=s0[l.type]||s0.line;(!u||!(u instanceof p))&&(u=a[s]=new p);const m=eAt(l.setContext(tAt(t,u,l))),v=u.resolveElementProperties(t,m);v.skip=isNaN(v.x)||isNaN(v.y),v.options=m,i.update(u,v)}}function eAt(t){const e=s0[t.type]||s0.line,r={};r.id=t.id,r.type=t.type,r.drawTime=t.drawTime,Object.assign(r,ZG(t,e.defaults),ZG(t,e.defaultRoutes));for(const n of XG)r[n]=t[n];return r}function ZG(t,e){const r={};for(const n of Object.keys(e)){const i=e[n],o=t[n];r[n]=uo(i)?ZG(o,i):o}return r}function tAt(t,e,r){return e.$context||(e.$context=Object.assign(Object.create(t.getContext()),{element:e,id:r.id,type:"annotation"}))}function rAt(t,e){const r=e.length,n=t.length;if(n<r){const i=r-n;t.splice(n,0,...new Array(i))}else n>r&&t.splice(r,n-r);return t}function b4(t,e){const{ctx:r,chartArea:n}=t,o=M_.get(t).elements.filter(a=>!a.skip&&a.options.display);tM(r,n),o.forEach(a=>{a.options.drawTime===e&&a.draw(r)}),rM(r),o.forEach(a=>{"drawLabel"in a&&a.options.label&&(a.options.label.drawTime||a.options.drawTime)===e&&a.drawLabel(r,n)})}function nAt(t,e,r){const n=iAt(e,r);let i=!1;Aa(n.min)&&typeof e.options.min=="undefined"&&typeof e.options.suggestedMin=="undefined"&&(i=e.min!==n.min,e.min=n.min),Aa(n.max)&&typeof e.options.max=="undefined"&&typeof e.options.suggestedMax=="undefined"&&(i=e.max!==n.max,e.max=n.max),i&&typeof e.handleTickRangeOptions=="function"&&e.handleTickRangeOptions()}function iAt(t,e){const r=t.axis,n=t.id,i=r+"ScaleID";let o=Hi(t.min,Number.NEGATIVE_INFINITY),a=Hi(t.max,Number.POSITIVE_INFINITY);for(const s of e)if(s.scaleID===n)for(const l of["value","endValue"]){const u=s[l];if(u){const p=t.parse(u);o=Math.min(o,p),a=Math.max(a,p)}}else if(s[i]===n)for(const l of[r+"Min",r+"Max",r+"Value"]){const u=s[l];if(u){const p=t.parse(u);o=Math.min(o,p),a=Math.max(a,p)}}return{min:o,max:a}}var Gve={exports:{}};(function(t){(function(e){t.exports?(e.default=e,t.exports=e):e(typeof Highcharts!="undefined"?Highcharts:void 0)})(function(e){function r(n,i,o,a){n.hasOwnProperty(i)||(n[i]=a.apply(null,o),typeof CustomEvent=="function"&&window.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:i,module:n[i]}})))}e=e?e._modules:{},r(e,"Accessibility/Utils/HTMLUtilities.js",[e["Core/Globals.js"],e["Core/Utilities.js"]],function(n,i){function o(m){if(typeof l.MouseEvent=="function")return new l.MouseEvent(m.type,m);if(s.createEvent){var v=s.createEvent("MouseEvent");if(v.initMouseEvent)return v.initMouseEvent(m.type,m.bubbles,m.cancelable,m.view||l,m.detail,m.screenX,m.screenY,m.clientX,m.clientY,m.ctrlKey,m.altKey,m.shiftKey,m.metaKey,m.button,m.relatedTarget),v}return a(m.type)}function a(m,v,x){return v=v||{x:0,y:0},typeof l.MouseEvent=="function"?new l.MouseEvent(m,{bubbles:!0,cancelable:!0,composed:!0,button:0,buttons:1,relatedTarget:x||p,view:l,detail:m==="click"?1:0,screenX:v.x,screenY:v.y,clientX:v.x,clientY:v.y}):s.createEvent&&(x=s.createEvent("MouseEvent"),x.initMouseEvent)?(x.initMouseEvent(m,!0,!0,l,m==="click"?1:0,v.x,v.y,v.x,v.y,!1,!1,!1,!1,0,null),x):{type:m}}var s=n.doc,l=n.win,u=i.css,p=l.EventTarget&&new l.EventTarget||"none";return{addClass:function(m,v){m.classList?m.classList.add(v):0>m.className.indexOf(v)&&(m.className+=" "+v)},cloneMouseEvent:o,cloneTouchEvent:function(m){var v=function(x){for(var y=[],_=0;_<x.length;++_){var w=x.item(_);w&&y.push(w)}return y};return typeof l.TouchEvent=="function"?(v=new l.TouchEvent(m.type,{touches:v(m.touches),targetTouches:v(m.targetTouches),changedTouches:v(m.changedTouches),ctrlKey:m.ctrlKey,shiftKey:m.shiftKey,altKey:m.altKey,metaKey:m.metaKey,bubbles:m.bubbles,cancelable:m.cancelable,composed:m.composed,detail:m.detail,view:m.view}),m.defaultPrevented&&v.preventDefault(),v):(v=o(m),v.touches=m.touches,v.changedTouches=m.changedTouches,v.targetTouches=m.targetTouches,v)},escapeStringForHTML:function(m){return m.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/")},getElement:function(m){return s.getElementById(m)},getFakeMouseEvent:a,getHeadingTagNameForElement:function(m){var v=function(y){return y=parseInt(y.slice(1),10),"h"+Math.min(6,y+1)},x=function(y){var _;e:{for(_=y;_=_.previousSibling;){var w=_.tagName||"";if(/H[1-6]/.test(w)){_=w;break e}}_=""}return _?v(_):(y=y.parentElement,y?(_=y.tagName,/H[1-6]/.test(_)?v(_):x(y)):"p")};return x(m)},removeChildNodes:function(m){for(;m.lastChild;)m.removeChild(m.lastChild)},removeClass:function(m,v){m.classList?m.classList.remove(v):m.className=m.className.replace(new RegExp(v,"g"),"")},removeElement:function(m){m&&m.parentNode&&m.parentNode.removeChild(m)},reverseChildNodes:function(m){for(var v=m.childNodes.length;v--;)m.appendChild(m.childNodes[v])},simulatedEventTarget:p,stripHTMLTagsFromString:function(m){return typeof m=="string"?m.replace(/<\/?[^>]+(>|$)/g,""):m},visuallyHideElement:function(m){u(m,{position:"absolute",width:"1px",height:"1px",overflow:"hidden",whiteSpace:"nowrap",clip:"rect(1px, 1px, 1px, 1px)",marginTop:"-3px","-ms-filter":"progid:DXImageTransform.Microsoft.Alpha(Opacity=1)",filter:"alpha(opacity=1)",opacity:.01})}}}),r(e,"Accessibility/A11yI18n.js",[e["Core/FormatUtilities.js"],e["Core/Utilities.js"]],function(n,i){var o=n.format,a=i.getNestedProperty,s=i.pick,l;return function(u){function p(y,_){var w=y.indexOf("#each("),C=y.indexOf("#plural("),E=y.indexOf("["),T=y.indexOf("]");if(-1<w){if(T=y.slice(w).indexOf(")")+w,C=y.substring(0,w),E=y.substring(T+1),T=y.substring(w+6,T).split(","),w=Number(T[1]),y="",_=a(T[0],_))for(w=isNaN(w)?_.length:w,w=0>w?_.length+w:Math.min(w,_.length),T=0;T<w;++T)y+=C+_[T]+E;return y.length?y:""}if(-1<C){switch(E=y.slice(C).indexOf(")")+C,C=y.substring(C+8,E).split(","),Number(a(C[0],_))){case 0:y=s(C[4],C[1]);break;case 1:y=s(C[2],C[1]);break;case 2:y=s(C[3],C[1]);break;default:y=C[1]}return y?(_=y,_=_.trim&&_.trim()||_.replace(/^\s+|\s+$/g,"")):_="",_}return-1<E?(C=y.substring(0,E),E=Number(y.substring(E+1,T)),y=void 0,_=a(C,_),!isNaN(E)&&_&&(0>E?(y=_[_.length+E],typeof y=="undefined"&&(y=_[0])):(y=_[E],typeof y=="undefined"&&(y=_[_.length-1]))),typeof y!="undefined"?y:""):"{"+y+"}"}function m(y,_,w){var C=function(X,Z){X=X.slice(Z||0);var W=X.indexOf("{"),D=X.indexOf("}");if(-1<W&&D>W)return{statement:X.substring(W+1,D),begin:Z+W+1,end:Z+D}},E=[],T=0;do{var A=C(y,T),k=y.substring(T,A&&A.begin-1);k.length&&E.push({value:k,type:"constant"}),A&&E.push({value:A.statement,type:"statement"}),T=A?A.end+1:T+1}while(A);return E.forEach(function(X){X.type==="statement"&&(X.value=p(X.value,_))}),o(E.reduce(function(X,Z){return X+Z.value},""),_,w)}function v(y,_){y=y.split(".");for(var w=this.options.lang,C=0;C<y.length;++C)w=w&&w[y[C]];return typeof w=="string"?m(w,_,this):""}var x=[];u.compose=function(y){return x.indexOf(y)===-1&&(x.push(y),y.prototype.langFormat=v),y},u.i18nFormat=m}(l||(l={})),l}),r(e,"Accessibility/Utils/ChartUtilities.js",[e["Core/Globals.js"],e["Accessibility/Utils/HTMLUtilities.js"],e["Core/Utilities.js"]],function(n,i,o){function a(C,E){var T=E.type,A=C.hcEvents;v.createEvent&&(C.dispatchEvent||C.fireEvent)?C.dispatchEvent?C.dispatchEvent(E):C.fireEvent(T,E):A&&A[T]?w(C,T,E):C.element&&a(C.element,E)}function s(C){var E=C.chart,T={},A="Seconds";T.Seconds=((C.dataMax||C.max||0)-(C.dataMin||C.min||0))/1e3,T.Minutes=T.Seconds/60,T.Hours=T.Minutes/60,T.Days=T.Hours/24,["Minutes","Hours","Days"].forEach(function(X){2<T[X]&&(A=X)});var k=T[A].toFixed(A!=="Seconds"&&A!=="Minutes"?1:0);return E.langFormat("accessibility.axis.timeRange"+A,{chart:E,axis:C,range:k.replace(".0","")})}function l(C){var E=C.chart,T=E.options,A=T&&T.accessibility&&T.accessibility.screenReaderSection.axisRangeDateFormat||"",k={min:C.dataMin||C.min||0,max:C.dataMax||C.max||0};return T=function(X){return C.dateTime?E.time.dateFormat(A,k[X]):k[X].toString()},E.langFormat("accessibility.axis.rangeFromTo",{chart:E,axis:C,rangeFrom:T("min"),rangeTo:T("max")})}function u(C){if(C.points&&C.points.length)return(C=_(C.points,function(E){return!!E.graphic}))&&C.graphic&&C.graphic.element}function p(C){var E=u(C);return E&&E.parentNode||C.graph&&C.graph.element||C.group&&C.group.element}function m(C,E){E.setAttribute("aria-hidden",!1),E!==C.renderTo&&E.parentNode&&E.parentNode!==v.body&&(Array.prototype.forEach.call(E.parentNode.childNodes,function(T){T.hasAttribute("aria-hidden")||T.setAttribute("aria-hidden",!0)}),m(C,E.parentNode))}var v=n.doc,x=i.stripHTMLTagsFromString,y=o.defined,_=o.find,w=o.fireEvent;return{fireEventOnWrappedOrUnwrappedElement:a,getChartTitle:function(C){return x(C.options.title.text||C.langFormat("accessibility.defaultChartTitle",{chart:C}))},getAxisDescription:function(C){return C&&(C.userOptions&&C.userOptions.accessibility&&C.userOptions.accessibility.description||C.axisTitle&&C.axisTitle.textStr||C.options.id||C.categories&&"categories"||C.dateTime&&"Time"||"values")},getAxisRangeDescription:function(C){var E=C.options||{};return E.accessibility&&typeof E.accessibility.rangeDescription!="undefined"?E.accessibility.rangeDescription:C.categories?(E=C.chart,C=C.dataMax&&C.dataMin?E.langFormat("accessibility.axis.rangeCategories",{chart:E,axis:C,numCategories:C.dataMax-C.dataMin+1}):"",C):!C.dateTime||C.min!==0&&C.dataMin!==0?l(C):s(C)},getPointFromXY:function(C,E,T){for(var A=C.length,k;A--;)if(k=_(C[A].points||[],function(X){return X.x===E&&X.y===T}))return k},getSeriesFirstPointElement:u,getSeriesFromName:function(C,E){return E?(C.series||[]).filter(function(T){return T.name===E}):C.series},getSeriesA11yElement:p,unhideChartElementFromAT:m,hideSeriesFromAT:function(C){(C=p(C))&&C.setAttribute("aria-hidden",!0)},scrollToPoint:function(C){var E=C.series.xAxis,T=C.series.yAxis,A=E&&E.scrollbar?E:T;if((E=A&&A.scrollbar)&&y(E.to)&&y(E.from)){if(T=E.to-E.from,y(A.dataMin)&&y(A.dataMax)){var k=A.toPixels(A.dataMin),X=A.toPixels(A.dataMax);C=(A.toPixels(C[A.coll==="xAxis"?"x":"y"]||0)-k)/(X-k)}else C=0;E.updatePosition(C-T/2,C+T/2),w(E,"changed",{from:E.from,to:E.to,trigger:"scrollbar",DOMEvent:null})}}}}),r(e,"Accessibility/Utils/DOMElementProvider.js",[e["Core/Globals.js"],e["Accessibility/Utils/HTMLUtilities.js"]],function(n,i){var o=n.doc,a=i.removeElement;return function(){function s(){this.elements=[]}return s.prototype.createElement=function(){var l=o.createElement.apply(o,arguments);return this.elements.push(l),l},s.prototype.destroyCreatedElements=function(){this.elements.forEach(function(l){a(l)}),this.elements=[]},s}()}),r(e,"Accessibility/Utils/EventProvider.js",[e["Core/Globals.js"],e["Core/Utilities.js"]],function(n,i){var o=i.addEvent;return function(){function a(){this.eventRemovers=[]}return a.prototype.addEvent=function(){var s=o.apply(n,arguments);return this.eventRemovers.push(s),s},a.prototype.removeAddedEvents=function(){this.eventRemovers.forEach(function(s){return s()}),this.eventRemovers=[]},a}()}),r(e,"Accessibility/AccessibilityComponent.js",[e["Accessibility/Utils/ChartUtilities.js"],e["Accessibility/Utils/DOMElementProvider.js"],e["Accessibility/Utils/EventProvider.js"],e["Accessibility/Utils/HTMLUtilities.js"],e["Core/Utilities.js"]],function(n,i,o,a,s){var l=n.fireEventOnWrappedOrUnwrappedElement,u=a.getFakeMouseEvent;return n=s.extend,a=function(){function p(){this.proxyProvider=this.keyCodes=this.eventProvider=this.domElementProvider=this.chart=void 0}return p.prototype.initBase=function(m,v){this.chart=m,this.eventProvider=new o,this.domElementProvider=new i,this.proxyProvider=v,this.keyCodes={left:37,right:39,up:38,down:40,enter:13,space:32,esc:27,tab:9,pageUp:33,pageDown:34,end:35,home:36}},p.prototype.addEvent=function(m,v,x,y){return this.eventProvider.addEvent(m,v,x,y)},p.prototype.createElement=function(m,v){return this.domElementProvider.createElement(m,v)},p.prototype.fakeClickEvent=function(m){var v=u("click");l(m,v)},p.prototype.destroyBase=function(){this.domElementProvider.destroyCreatedElements(),this.eventProvider.removeAddedEvents()},p}(),n(a.prototype,{init:function(){},getKeyboardNavigation:function(){},onChartUpdate:function(){},onChartRender:function(){},destroy:function(){}}),a}),r(e,"Accessibility/KeyboardNavigationHandler.js",[e["Core/Utilities.js"]],function(n){var i=n.find;return n=function(){function o(a,s){this.chart=a,this.keyCodeMap=s.keyCodeMap||[],this.validate=s.validate,this.init=s.init,this.terminate=s.terminate,this.response={success:1,prev:2,next:3,noHandler:4,fail:5}}return o.prototype.run=function(a){var s=a.which||a.keyCode,l=this.response.noHandler,u=i(this.keyCodeMap,function(p){return-1<p[0].indexOf(s)});return u?l=u[1].call(this,s,a):s===9&&(l=this.response[a.shiftKey?"prev":"next"]),l},o}(),n}),r(e,"Accessibility/Components/ContainerComponent.js",[e["Accessibility/AccessibilityComponent.js"],e["Accessibility/KeyboardNavigationHandler.js"],e["Accessibility/Utils/ChartUtilities.js"],e["Core/Globals.js"],e["Accessibility/Utils/HTMLUtilities.js"]],function(n,i,o,a,s){var l=this&&this.__extends||function(){var x=function(y,_){return x=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(w,C){w.__proto__=C}||function(w,C){for(var E in C)C.hasOwnProperty(E)&&(w[E]=C[E])},x(y,_)};return function(y,_){function w(){this.constructor=y}x(y,_),y.prototype=_===null?Object.create(_):(w.prototype=_.prototype,new w)}}(),u=o.unhideChartElementFromAT,p=o.getChartTitle,m=a.doc,v=s.stripHTMLTagsFromString;return function(x){function y(){return x!==null&&x.apply(this,arguments)||this}return l(y,x),y.prototype.onChartUpdate=function(){this.handleSVGTitleElement(),this.setSVGContainerLabel(),this.setGraphicContainerAttrs(),this.setRenderToAttrs(),this.makeCreditsAccessible()},y.prototype.handleSVGTitleElement=function(){var _=this.chart,w="highcharts-title-"+_.index,C=v(_.langFormat("accessibility.svgContainerTitle",{chartTitle:p(_)}));if(C.length){var E=this.svgTitleElement=this.svgTitleElement||m.createElementNS("http://www.w3.org/2000/svg","title");E.textContent=C,E.id=w,_.renderTo.insertBefore(E,_.renderTo.firstChild)}},y.prototype.setSVGContainerLabel=function(){var _=this.chart,w=_.langFormat("accessibility.svgContainerLabel",{chartTitle:p(_)});_.renderer.box&&w.length&&_.renderer.box.setAttribute("aria-label",w)},y.prototype.setGraphicContainerAttrs=function(){var _=this.chart,w=_.langFormat("accessibility.graphicContainerLabel",{chartTitle:p(_)});w.length&&_.container.setAttribute("aria-label",w)},y.prototype.setRenderToAttrs=function(){var _=this.chart,w=_.options.accessibility.landmarkVerbosity!=="disabled",C=_.langFormat("accessibility.chartContainerLabel",{title:p(_),chart:_});C&&(_.renderTo.setAttribute("role",w?"region":"group"),_.renderTo.setAttribute("aria-label",C))},y.prototype.makeCreditsAccessible=function(){var _=this.chart,w=_.credits;w&&(w.textStr&&w.element.setAttribute("aria-label",_.langFormat("accessibility.credits",{creditsStr:v(w.textStr)})),u(_,w.element))},y.prototype.getKeyboardNavigation=function(){var _=this.chart;return new i(_,{keyCodeMap:[],validate:function(){return!0},init:function(){var w=_.accessibility;w&&w.keyboardNavigation.tabindexContainer.focus()}})},y.prototype.destroy=function(){this.chart.renderTo.setAttribute("aria-hidden",!0)},y}(n)}),r(e,"Accessibility/FocusBorder.js",[e["Core/Renderer/SVG/SVGLabel.js"],e["Core/Utilities.js"]],function(n,i){var o=i.addEvent,a=i.pick,s;return function(l){function u(){var E=this.focusElement,T=this.options.accessibility.keyboardNavigation.focusBorder;E&&(E.removeFocusBorder(),T.enabled&&E.addFocusBorder(T.margin,{stroke:T.style.color,strokeWidth:T.style.lineWidth,r:T.style.borderRadius}))}function p(E,T){var A=this.options.accessibility.keyboardNavigation.focusBorder;(T=T||E.element)&&T.focus&&(T.hcEvents&&T.hcEvents.focusin||o(T,"focusin",function(){}),T.focus(),A.hideBrowserFocusOutline&&(T.style.outline="none")),this.focusElement&&this.focusElement.removeFocusBorder(),this.focusElement=E,this.renderFocusBorder()}function m(E){if(!E.focusBorderDestroyHook){var T=E.destroy;E.destroy=function(){return E.focusBorder&&E.focusBorder.destroy&&E.focusBorder.destroy(),T.apply(E,arguments)},E.focusBorderDestroyHook=T}}function v(E,T){this.focusBorder&&this.removeFocusBorder();var A=this.getBBox(),k=a(E,3),X=this.parentGroup,Z=this.scaleX||X&&X.scaleX,W=this.scaleY||X&&X.scaleY;Z=(Z?!W:W)?Math.abs(Z||W||1):(Math.abs(Z||1)+Math.abs(W||1))/2,A.x+=this.translateX?this.translateX:0,A.y+=this.translateY?this.translateY:0,W=A.x-k;var D=A.y-k,H=A.width+2*k,N=A.height+2*k,j=this instanceof n;if(this.element.nodeName==="text"||j){var $=!!this.rotation;if(j)var z={x:$?1:0,y:0};else{var O=z=0;this.attr("text-anchor")==="middle"?z=O=.5:this.rotation?z=.25:O=.75,z={x:z,y:O}}O=+this.attr("x");var F=+this.attr("y");isNaN(O)||(W=O-A.width*z.x-k),isNaN(F)||(D=F-A.height*z.y-k),j&&$&&(j=H,H=N,N=j,isNaN(O)||(W=O-A.height*z.x-k),isNaN(F)||(D=F-A.width*z.y-k))}this.focusBorder=this.renderer.rect(W,D,H,N,parseInt((T&&T.r||0).toString(),10)/Z).addClass("highcharts-focus-border").attr({zIndex:99}).add(X),this.renderer.styledMode||this.focusBorder.attr({stroke:T&&T.stroke,"stroke-width":(T&&T.strokeWidth||0)/Z}),x(this,E,T),m(this)}function x(E){for(var T=[],A=1;A<arguments.length;A++)T[A-1]=arguments[A];E.focusBorderUpdateHooks||(E.focusBorderUpdateHooks={},C.forEach(function(k){k+="Setter";var X=E[k]||E._defaultSetter;E.focusBorderUpdateHooks[k]=X,E[k]=function(){var Z=X.apply(E,arguments);return E.addFocusBorder.apply(E,T),Z}}))}function y(){_(this),this.focusBorderDestroyHook&&(this.destroy=this.focusBorderDestroyHook,delete this.focusBorderDestroyHook),this.focusBorder&&(this.focusBorder.destroy(),delete this.focusBorder)}function _(E){E.focusBorderUpdateHooks&&(Object.keys(E.focusBorderUpdateHooks).forEach(function(T){var A=E.focusBorderUpdateHooks[T];A===E._defaultSetter?delete E[T]:E[T]=A}),delete E.focusBorderUpdateHooks)}var w=[],C="x y transform width height r d stroke-width".split(" ");l.compose=function(E,T){w.indexOf(E)===-1&&(w.push(E),E=E.prototype,E.renderFocusBorder=u,E.setFocusToElement=p),w.indexOf(T)===-1&&(w.push(T),T=T.prototype,T.addFocusBorder=v,T.removeFocusBorder=y)}}(s||(s={})),s}),r(e,"Accessibility/Utils/Announcer.js",[e["Core/Renderer/HTML/AST.js"],e["Accessibility/Utils/DOMElementProvider.js"],e["Core/Globals.js"],e["Accessibility/Utils/HTMLUtilities.js"],e["Core/Utilities.js"]],function(n,i,o,a,s){var l=o.doc,u=a.addClass,p=a.visuallyHideElement,m=s.attr;return function(){function v(x,y){this.chart=x,this.domElementProvider=new i,this.announceRegion=this.addAnnounceRegion(y)}return v.prototype.destroy=function(){this.domElementProvider.destroyCreatedElements()},v.prototype.announce=function(x){var y=this;n.setElementHTML(this.announceRegion,x),this.clearAnnouncementRegionTimer&&clearTimeout(this.clearAnnouncementRegionTimer),this.clearAnnouncementRegionTimer=setTimeout(function(){y.announceRegion.innerHTML=n.emptyHTML,delete y.clearAnnouncementRegionTimer},1e3)},v.prototype.addAnnounceRegion=function(x){var y=this.chart.announcerContainer||this.createAnnouncerContainer(),_=this.domElementProvider.createElement("div");return m(_,{"aria-hidden":!1,"aria-live":x}),this.chart.styledMode?u(_,"highcharts-visually-hidden"):p(_),y.appendChild(_),_},v.prototype.createAnnouncerContainer=function(){var x=this.chart,y=l.createElement("div");return m(y,{"aria-hidden":!1,class:"highcharts-announcer-container"}),y.style.position="relative",x.renderTo.insertBefore(y,x.renderTo.firstChild),x.announcerContainer=y},v}()}),r(e,"Accessibility/Components/AnnotationsA11y.js",[e["Accessibility/Utils/HTMLUtilities.js"]],function(n){function i(p){return(p.annotations||[]).reduce(function(m,v){return v.options&&v.options.visible!==!1&&(m=m.concat(v.labels)),m},[])}function o(p){return p.options&&p.options.accessibility&&p.options.accessibility.description||p.graphic&&p.graphic.text&&p.graphic.text.textStr||""}function a(p){var m=p.options&&p.options.accessibility&&p.options.accessibility.description;if(m)return m;m=p.chart;var v=o(p),x=p.points.filter(function(w){return!!w.graphic}).map(function(w){var C=w.accessibility&&w.accessibility.valueDescription||w.graphic&&w.graphic.element&&w.graphic.element.getAttribute("aria-label")||"";return w=w&&w.series.name||"",(w?w+", ":"")+"data point "+C}).filter(function(w){return!!w}),y=x.length,_="accessibility.screenReaderSection.annotations.description"+(1<y?"MultiplePoints":y?"SinglePoint":"NoPoints");return p={annotationText:v,annotation:p,numPoints:y,annotationPoint:x[0],additionalAnnotationPoints:x.slice(1)},m.langFormat(_,p)}function s(p){return i(p).map(function(m){return(m=l(u(a(m))))?"<li>".concat(m,"</li>"):""})}var l=n.escapeStringForHTML,u=n.stripHTMLTagsFromString;return{getAnnotationsInfoHTML:function(p){var m=p.annotations;return!m||!m.length?"":(p=s(p),'<ul style="list-style-type: none">'.concat(p.join(" "),"</ul>"))},getAnnotationLabelDescription:a,getAnnotationListItems:s,getPointAnnotationTexts:function(p){var m=i(p.series.chart).filter(function(v){return-1<v.points.indexOf(p)});return m.length?m.map(function(v){return"".concat(o(v))}):[]}}}),r(e,"Accessibility/Components/InfoRegionsComponent.js",[e["Accessibility/A11yI18n.js"],e["Accessibility/AccessibilityComponent.js"],e["Accessibility/Utils/Announcer.js"],e["Accessibility/Components/AnnotationsA11y.js"],e["Core/Renderer/HTML/AST.js"],e["Accessibility/Utils/ChartUtilities.js"],e["Core/FormatUtilities.js"],e["Core/Globals.js"],e["Accessibility/Utils/HTMLUtilities.js"],e["Core/Utilities.js"]],function(n,i,o,a,s,l,u,p,m,v){function x($,z){var O=z[0],F=$.series&&$.series[0]||{};if(F={numSeries:$.series.length,numPoints:F.points&&F.points.length,chart:$,mapTitle:$.mapView&&$.mapView.geoMap&&$.mapView.geoMap.title},!O)return $.langFormat("accessibility.chartTypes.emptyChart",F);if(O==="map")return F.mapTitle?$.langFormat("accessibility.chartTypes.mapTypeDescription",F):$.langFormat("accessibility.chartTypes.unknownMap",F);if(1<$.types.length)return $.langFormat("accessibility.chartTypes.combinationChart",F);z=z[0],O=$.langFormat("accessibility.seriesTypeDescriptions."+z,F);var G=$.series&&2>$.series.length?"Single":"Multiple";return($.langFormat("accessibility.chartTypes."+z+G,F)||$.langFormat("accessibility.chartTypes.default"+G,F))+(O?" "+O:"")}var y=this&&this.__extends||function(){var $=function(z,O){return $=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(F,G){F.__proto__=G}||function(F,G){for(var q in G)G.hasOwnProperty(q)&&(F[q]=G[q])},$(z,O)};return function(z,O){function F(){this.constructor=z}$(z,O),z.prototype=O===null?Object.create(O):(F.prototype=O.prototype,new F)}}(),_=a.getAnnotationsInfoHTML,w=l.getAxisDescription,C=l.getAxisRangeDescription,E=l.getChartTitle,T=l.unhideChartElementFromAT,A=u.format,k=p.doc,X=m.addClass,Z=m.getElement,W=m.getHeadingTagNameForElement,D=m.stripHTMLTagsFromString,H=m.visuallyHideElement,N=v.attr,j=v.pick;return function($){function z(){var O=$!==null&&$.apply(this,arguments)||this;return O.announcer=void 0,O.screenReaderSections={},O}return y(z,$),z.prototype.init=function(){var O=this.chart,F=this;this.initRegionsDefinitions(),this.addEvent(O,"aftergetTableAST",function(G){F.onDataTableCreated(G)}),this.addEvent(O,"afterViewData",function(G){G.wasHidden&&(F.dataTableDiv=G.element,setTimeout(function(){F.focusDataTable()},300))}),this.announcer=new o(O,"assertive")},z.prototype.initRegionsDefinitions=function(){var O=this;this.screenReaderSections={before:{element:null,buildContent:function(F){var G=F.options.accessibility.screenReaderSection.beforeChartFormatter;return G?G(F):O.defaultBeforeChartFormatter(F)},insertIntoDOM:function(F,G){G.renderTo.insertBefore(F,G.renderTo.firstChild)},afterInserted:function(){typeof O.sonifyButtonId!="undefined"&&O.initSonifyButton(O.sonifyButtonId),typeof O.dataTableButtonId!="undefined"&&O.initDataTableButton(O.dataTableButtonId)}},after:{element:null,buildContent:function(F){var G=F.options.accessibility.screenReaderSection.afterChartFormatter;return G?G(F):O.defaultAfterChartFormatter()},insertIntoDOM:function(F,G){G.renderTo.insertBefore(F,G.container.nextSibling)},afterInserted:function(){O.chart.accessibility&&O.chart.accessibility.keyboardNavigation.updateExitAnchor()}}}},z.prototype.onChartRender=function(){var O=this;this.linkedDescriptionElement=this.getLinkedDescriptionElement(),this.setLinkedDescriptionAttrs(),Object.keys(this.screenReaderSections).forEach(function(F){O.updateScreenReaderSection(F)})},z.prototype.getLinkedDescriptionElement=function(){var O=this.chart.options.accessibility.linkedDescription;if(O){if(typeof O!="string")return O;if(O=A(O,this.chart),O=k.querySelectorAll(O),O.length===1)return O[0]}},z.prototype.setLinkedDescriptionAttrs=function(){var O=this.linkedDescriptionElement;O&&(O.setAttribute("aria-hidden","true"),X(O,"highcharts-linked-description"))},z.prototype.updateScreenReaderSection=function(O){var F=this.chart,G=this.screenReaderSections[O],q=G.buildContent(F),ee=G.element=G.element||this.createElement("div"),re=ee.firstChild||this.createElement("div");q?(this.setScreenReaderSectionAttribs(ee,O),s.setElementHTML(re,q),ee.appendChild(re),G.insertIntoDOM(ee,F),F.styledMode?X(re,"highcharts-visually-hidden"):H(re),T(F,re),G.afterInserted&&G.afterInserted()):(ee.parentNode&&ee.parentNode.removeChild(ee),G.element=null)},z.prototype.setScreenReaderSectionAttribs=function(O,F){var G=this.chart,q=G.langFormat("accessibility.screenReaderSection."+F+"RegionLabel",{chart:G,chartTitle:E(G)});F="highcharts-screen-reader-region-".concat(F,"-").concat(G.index),N(O,{id:F,"aria-label":q||void 0}),O.style.position="relative",q&&O.setAttribute("role",G.options.accessibility.landmarkVerbosity==="all"?"region":"group")},z.prototype.defaultBeforeChartFormatter=function(){var O=this.chart,F=O.options.accessibility.screenReaderSection.beforeChartFormat;if(!F)return"";var G=this.getAxesDescription(),q=O.sonify&&O.options.sonification&&O.options.sonification.enabled,ee="highcharts-a11y-sonify-data-btn-"+O.index,re="hc-linkto-highcharts-data-table-"+O.index,ce=_(O),fe=O.langFormat("accessibility.screenReaderSection.annotations.heading",{chart:O});return G={headingTagName:W(O.renderTo),chartTitle:E(O),typeDescription:this.getTypeDescriptionText(),chartSubtitle:this.getSubtitleText(),chartLongdesc:this.getLongdescText(),xAxisDescription:G.xAxis,yAxisDescription:G.yAxis,playAsSoundButton:q?this.getSonifyButtonText(ee):"",viewTableButton:O.getCSV?this.getDataTableButtonText(re):"",annotationsTitle:ce?fe:"",annotationsList:ce},O=n.i18nFormat(F,G,O),this.dataTableButtonId=re,this.sonifyButtonId=ee,O.replace(/<(\w+)[^>]*?>\s*<\/\1>/g,"")},z.prototype.defaultAfterChartFormatter=function(){var O=this.chart,F=O.options.accessibility.screenReaderSection.afterChartFormat;if(!F)return"";var G={endOfChartMarker:this.getEndOfChartMarkerText()};return n.i18nFormat(F,G,O).replace(/<(\w+)[^>]*?>\s*<\/\1>/g,"")},z.prototype.getLinkedDescription=function(){var O=this.linkedDescriptionElement;return D(O&&O.innerHTML||"")},z.prototype.getLongdescText=function(){var O=this.chart.options,F=O.caption;F=F&&F.text;var G=this.getLinkedDescription();return O.accessibility.description||G||F||""},z.prototype.getTypeDescriptionText=function(){var O=this.chart;return O.types?O.options.accessibility.typeDescription||x(O,O.types):""},z.prototype.getDataTableButtonText=function(O){var F=this.chart;return F=F.langFormat("accessibility.table.viewAsDataTableButtonText",{chart:F,chartTitle:E(F)}),'<button id="'+O+'">'+F+"</button>"},z.prototype.getSonifyButtonText=function(O){var F=this.chart;return F.options.sonification&&F.options.sonification.enabled===!1?"":(F=F.langFormat("accessibility.sonification.playAsSoundButtonText",{chart:F,chartTitle:E(F)}),'<button id="'+O+'">'+F+"</button>")},z.prototype.getSubtitleText=function(){var O=this.chart.options.subtitle;return D(O&&O.text||"")},z.prototype.getEndOfChartMarkerText=function(){var O=this.chart,F=O.langFormat("accessibility.screenReaderSection.endOfChartMarker",{chart:O});return'<div id="highcharts-end-of-chart-marker-'+O.index+'">'+F+"</div>"},z.prototype.onDataTableCreated=function(O){var F=this.chart;if(F.options.accessibility.enabled){this.viewDataTableButton&&this.viewDataTableButton.setAttribute("aria-expanded","true");var G=O.tree.attributes||{};G.tabindex=-1,G.summary=F.langFormat("accessibility.table.tableSummary",{chart:F}),O.tree.attributes=G}},z.prototype.focusDataTable=function(){var O=this.dataTableDiv;(O=O&&O.getElementsByTagName("table")[0])&&O.focus&&O.focus()},z.prototype.initSonifyButton=function(O){var F=this,G=this.sonifyButton=Z(O),q=this.chart,ee=function(re){G&&(G.setAttribute("aria-hidden","true"),G.setAttribute("aria-label","")),re.preventDefault(),re.stopPropagation(),re=q.langFormat("accessibility.sonification.playAsSoundClickAnnouncement",{chart:q}),F.announcer.announce(re),setTimeout(function(){G&&(G.removeAttribute("aria-hidden"),G.removeAttribute("aria-label")),q.sonify&&q.sonify()},1e3)};G&&q&&(G.setAttribute("tabindex",-1),G.onclick=function(re){(q.options.accessibility&&q.options.accessibility.screenReaderSection.onPlayAsSoundClick||ee).call(this,re,q)})},z.prototype.initDataTableButton=function(O){var F=this.viewDataTableButton=Z(O),G=this.chart;O=O.replace("hc-linkto-",""),F&&(N(F,{tabindex:-1,"aria-expanded":!!Z(O)}),F.onclick=G.options.accessibility.screenReaderSection.onViewDataTableClick||function(){G.viewData()})},z.prototype.getAxesDescription=function(){var O=this.chart,F=function(re,ce){return re=O[re],1<re.length||re[0]&&j(re[0].options.accessibility&&re[0].options.accessibility.enabled,ce)},G=!!O.types&&0>O.types.indexOf("map")&&0>O.types.indexOf("treemap")&&0>O.types.indexOf("tilemap"),q=!!O.hasCartesianSeries,ee=F("xAxis",!O.angular&&q&&G);return F=F("yAxis",q&&G),G={},ee&&(G.xAxis=this.getAxisDescriptionText("xAxis")),F&&(G.yAxis=this.getAxisDescriptionText("yAxis")),G},z.prototype.getAxisDescriptionText=function(O){var F=this.chart,G=F[O];return F.langFormat("accessibility.axis."+O+"Description"+(1<G.length?"Plural":"Singular"),{chart:F,names:G.map(function(q){return w(q)}),ranges:G.map(function(q){return C(q)}),numAxes:G.length})},z.prototype.destroy=function(){this.announcer&&this.announcer.destroy()},z}(i)}),r(e,"Accessibility/Components/MenuComponent.js",[e["Core/Chart/Chart.js"],e["Core/Utilities.js"],e["Accessibility/AccessibilityComponent.js"],e["Accessibility/KeyboardNavigationHandler.js"],e["Accessibility/Utils/ChartUtilities.js"],e["Accessibility/Utils/HTMLUtilities.js"]],function(n,i,o,a,s,l){var u=this&&this.__extends||function(){var y=function(_,w){return y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(C,E){C.__proto__=E}||function(C,E){for(var T in E)E.hasOwnProperty(T)&&(C[T]=E[T])},y(_,w)};return function(_,w){function C(){this.constructor=_}y(_,w),_.prototype=w===null?Object.create(w):(C.prototype=w.prototype,new C)}}(),p=i.attr,m=s.getChartTitle,v=s.unhideChartElementFromAT,x=l.getFakeMouseEvent;return i=function(y){function _(){return y!==null&&y.apply(this,arguments)||this}return u(_,y),_.prototype.init=function(){var w=this.chart,C=this;this.addEvent(w,"exportMenuShown",function(){C.onMenuShown()}),this.addEvent(w,"exportMenuHidden",function(){C.onMenuHidden()}),this.createProxyGroup()},_.prototype.onMenuHidden=function(){var w=this.chart.exportContextMenu;w&&w.setAttribute("aria-hidden","true"),this.setExportButtonExpandedState("false")},_.prototype.onMenuShown=function(){var w=this.chart,C=w.exportContextMenu;C&&(this.addAccessibleContextMenuAttribs(),v(w,C)),this.setExportButtonExpandedState("true")},_.prototype.setExportButtonExpandedState=function(w){this.exportButtonProxy&&this.exportButtonProxy.buttonElement.setAttribute("aria-expanded",w)},_.prototype.onChartRender=function(){var w=this.chart,C=w.focusElement,E=w.accessibility;this.proxyProvider.clearGroup("chartMenu"),this.proxyMenuButton(),this.exportButtonProxy&&C&&C===w.exportingGroup&&(C.focusBorder?w.setFocusToElement(C,this.exportButtonProxy.buttonElement):E&&E.keyboardNavigation.tabindexContainer.focus())},_.prototype.proxyMenuButton=function(){var w=this.chart,C=this.proxyProvider,E=w.exportSVGElements&&w.exportSVGElements[0],T=w.options.exporting,A=w.exportSVGElements&&w.exportSVGElements[0];T&&T.enabled!==!1&&T.accessibility&&T.accessibility.enabled&&A&&A.element&&E&&(this.exportButtonProxy=C.addProxyElement("chartMenu",{click:E},{"aria-label":w.langFormat("accessibility.exporting.menuButtonLabel",{chart:w,chartTitle:m(w)}),"aria-expanded":!1,title:w.options.lang.contextButtonTitle||null}))},_.prototype.createProxyGroup=function(){this.chart&&this.proxyProvider&&this.proxyProvider.addGroup("chartMenu","div")},_.prototype.addAccessibleContextMenuAttribs=function(){var w=this.chart,C=w.exportDivElements;C&&C.length&&(C.forEach(function(E){E&&(E.tagName!=="LI"||E.children&&E.children.length?E.setAttribute("aria-hidden","true"):E.setAttribute("tabindex",-1))}),(C=C[0]&&C[0].parentNode)&&p(C,{"aria-hidden":void 0,"aria-label":w.langFormat("accessibility.exporting.chartMenuLabel",{chart:w}),role:"list"}))},_.prototype.getKeyboardNavigation=function(){var w=this.keyCodes,C=this.chart,E=this;return new a(C,{keyCodeMap:[[[w.left,w.up],function(){return E.onKbdPrevious(this)}],[[w.right,w.down],function(){return E.onKbdNext(this)}],[[w.enter,w.space],function(){return E.onKbdClick(this)}]],validate:function(){return!!C.exporting&&C.options.exporting.enabled!==!1&&C.options.exporting.accessibility.enabled!==!1},init:function(){var T=E.exportButtonProxy,A=E.chart.exportingGroup;T&&A&&C.setFocusToElement(A,T.buttonElement)},terminate:function(){C.hideExportMenu()}})},_.prototype.onKbdPrevious=function(w){var C=this.chart,E=C.options.accessibility;w=w.response;for(var T=C.highlightedExportItemIx||0;T--;)if(C.highlightExportItem(T))return w.success;return E.keyboardNavigation.wrapAround?(C.highlightLastExportItem(),w.success):w.prev},_.prototype.onKbdNext=function(w){var C=this.chart,E=C.options.accessibility;w=w.response;for(var T=(C.highlightedExportItemIx||0)+1;T<C.exportDivElements.length;++T)if(C.highlightExportItem(T))return w.success;return E.keyboardNavigation.wrapAround?(C.highlightExportItem(0),w.success):w.next},_.prototype.onKbdClick=function(w){var C=this.chart,E=C.exportDivElements[C.highlightedExportItemIx],T=(C.exportSVGElements&&C.exportSVGElements[0]).element;return C.openMenu?this.fakeClickEvent(E):(this.fakeClickEvent(T),C.highlightExportItem(0)),w.response.success},_}(o),function(y){function _(){var A=this.exportSVGElements&&this.exportSVGElements[0];A&&(A=A.element,A.onclick)&&A.onclick(x("click"))}function w(){var A=this.exportDivElements;A&&this.exportContextMenu&&this.openMenu&&(A.forEach(function(k){k&&k.className==="highcharts-menu-item"&&k.onmouseout&&k.onmouseout(x("mouseout"))}),this.highlightedExportItemIx=0,this.exportContextMenu.hideMenu(),this.container.focus())}function C(A){var k=this.exportDivElements&&this.exportDivElements[A],X=this.exportDivElements&&this.exportDivElements[this.highlightedExportItemIx];if(k&&k.tagName==="LI"&&(!k.children||!k.children.length)){var Z=!!(this.renderTo.getElementsByTagName("g")[0]||{}).focus;return k.focus&&Z&&k.focus(),X&&X.onmouseout&&X.onmouseout(x("mouseout")),k.onmouseover&&k.onmouseover(x("mouseover")),this.highlightedExportItemIx=A,!0}return!1}function E(){if(this.exportDivElements){for(var A=this.exportDivElements.length;A--;)if(this.highlightExportItem(A))return!0}return!1}var T=[];y.compose=function(A){T.indexOf(A)===-1&&(T.push(A),A=n.prototype,A.hideExportMenu=w,A.highlightExportItem=C,A.highlightLastExportItem=E,A.showExportMenu=_)}}(i||(i={})),i}),r(e,"Accessibility/KeyboardNavigation.js",[e["Core/Globals.js"],e["Accessibility/Components/MenuComponent.js"],e["Core/Utilities.js"],e["Accessibility/Utils/EventProvider.js"],e["Accessibility/Utils/HTMLUtilities.js"]],function(n,i,o,a,s){var l=n.doc,u=n.win,p=o.addEvent,m=o.fireEvent,v=s.getElement,x=s.simulatedEventTarget;return o=function(){function y(_,w){this.components=this.chart=void 0,this.currentModuleIx=NaN,this.exitAnchor=this.eventProvider=void 0,this.modules=[],this.tabindexContainer=void 0,this.init(_,w)}return y.prototype.init=function(_,w){var C=this,E=this.eventProvider=new a;this.chart=_,this.components=w,this.modules=[],this.currentModuleIx=0,this.update(),E.addEvent(this.tabindexContainer,"keydown",function(T){return C.onKeydown(T)}),E.addEvent(this.tabindexContainer,"focus",function(T){return C.onFocus(T)}),["mouseup","touchend"].forEach(function(T){return E.addEvent(l,T,function(A){return C.onMouseUp(A)})}),["mousedown","touchstart"].forEach(function(T){return E.addEvent(_.renderTo,T,function(){C.isClickingChart=!0})}),E.addEvent(_.renderTo,"mouseover",function(){C.pointerIsOverChart=!0}),E.addEvent(_.renderTo,"mouseout",function(){C.pointerIsOverChart=!1})},y.prototype.update=function(_){var w=this.chart.options.accessibility;w=w&&w.keyboardNavigation;var C=this.components;this.updateContainerTabindex(),w&&w.enabled&&_&&_.length?(this.modules=_.reduce(function(E,T){return T=C[T].getKeyboardNavigation(),E.concat(T)},[]),this.updateExitAnchor()):(this.modules=[],this.currentModuleIx=0,this.removeExitAnchor())},y.prototype.updateExitAnchor=function(){var _="highcharts-end-of-chart-marker-".concat(this.chart.index);_=v(_),this.removeExitAnchor(),_?(this.makeElementAnExitAnchor(_),this.exitAnchor=_):this.createExitAnchor()},y.prototype.move=function(_){var w=this.modules&&this.modules[this.currentModuleIx];if(w&&w.terminate&&w.terminate(_),this.chart.focusElement&&this.chart.focusElement.removeFocusBorder(),this.currentModuleIx+=_,w=this.modules&&this.modules[this.currentModuleIx]){if(w.validate&&!w.validate())return this.move(_);if(w.init)return w.init(_),!0}return this.currentModuleIx=0,this.exiting=!0,0<_?this.exitAnchor&&this.exitAnchor.focus():this.tabindexContainer.focus(),!1},y.prototype.onFocus=function(_){var w=this.chart;_=_.relatedTarget&&w.container.contains(_.relatedTarget),this.exiting||this.tabbingInBackwards||this.isClickingChart||_||(_=this.getFirstValidModuleIx(),_!==null&&(this.currentModuleIx=_,this.modules[_].init(1))),this.exiting=!1},y.prototype.onMouseUp=function(_){if(delete this.isClickingChart,!this.keyboardReset&&_.relatedTarget!==x){if(_=this.chart,!this.pointerIsOverChart){var w=this.modules&&this.modules[this.currentModuleIx||0];w&&w.terminate&&w.terminate(),this.currentModuleIx=0}_.focusElement&&(_.focusElement.removeFocusBorder(),delete _.focusElement),this.keyboardReset=!0}},y.prototype.onKeydown=function(_){_=_||u.event;var w=this.modules&&this.modules.length&&this.modules[this.currentModuleIx],C;if(this.exiting=this.keyboardReset=!1,w){var E=w.run(_);E===w.response.success?C=!0:E===w.response.prev?C=this.move(-1):E===w.response.next&&(C=this.move(1)),C&&(_.preventDefault(),_.stopPropagation())}},y.prototype.updateContainerTabindex=function(){var _=this.chart.options.accessibility;_=_&&_.keyboardNavigation,_=!(_&&_.enabled===!1);var w=this.chart,C=w.container;w.renderTo.hasAttribute("tabindex")&&(C.removeAttribute("tabindex"),C=w.renderTo),this.tabindexContainer=C;var E=C.getAttribute("tabindex");_&&!E?C.setAttribute("tabindex","0"):_||w.container.removeAttribute("tabindex")},y.prototype.createExitAnchor=function(){var _=this.chart,w=this.exitAnchor=l.createElement("div");_.renderTo.appendChild(w),this.makeElementAnExitAnchor(w)},y.prototype.makeElementAnExitAnchor=function(_){var w=this.tabindexContainer.getAttribute("tabindex")||0;_.setAttribute("class","highcharts-exit-anchor"),_.setAttribute("tabindex",w),_.setAttribute("aria-hidden",!1),this.addExitAnchorEventsToEl(_)},y.prototype.removeExitAnchor=function(){this.exitAnchor&&this.exitAnchor.parentNode&&(this.exitAnchor.parentNode.removeChild(this.exitAnchor),delete this.exitAnchor)},y.prototype.addExitAnchorEventsToEl=function(_){var w=this.chart,C=this;this.eventProvider.addEvent(_,"focus",function(E){E=E||u.event;var T=!(E.relatedTarget&&w.container.contains(E.relatedTarget)||C.exiting);w.focusElement&&delete w.focusElement,T?(C.tabbingInBackwards=!0,C.tabindexContainer.focus(),delete C.tabbingInBackwards,E.preventDefault(),C.modules&&C.modules.length&&(C.currentModuleIx=C.modules.length-1,(E=C.modules[C.currentModuleIx])&&E.validate&&!E.validate()?C.move(-1):E&&E.init(-1))):C.exiting=!1})},y.prototype.getFirstValidModuleIx=function(){for(var _=this.modules.length,w=0;w<_;++w){var C=this.modules[w];if(!C.validate||C.validate())return w}return null},y.prototype.destroy=function(){this.removeExitAnchor(),this.eventProvider.removeAddedEvents(),this.chart.container.removeAttribute("tabindex")},y}(),function(y){function _(){var E=this;m(this,"dismissPopupContent",{},function(){E.tooltip&&E.tooltip.hide(0),E.hideExportMenu()})}function w(E){(E.which||E.keyCode)===27&&n.charts&&n.charts.forEach(function(T){T&&T.dismissPopupContent&&T.dismissPopupContent()})}var C=[];y.compose=function(E){return i.compose(E),C.indexOf(E)===-1&&(C.push(E),E.prototype.dismissPopupContent=_),C.indexOf(l)===-1&&(C.push(l),p(l,"keydown",w)),E}}(o||(o={})),o}),r(e,"Accessibility/Components/LegendComponent.js",[e["Core/Animation/AnimationUtilities.js"],e["Core/Globals.js"],e["Core/Legend/Legend.js"],e["Core/Utilities.js"],e["Accessibility/AccessibilityComponent.js"],e["Accessibility/KeyboardNavigationHandler.js"],e["Accessibility/Utils/ChartUtilities.js"],e["Accessibility/Utils/HTMLUtilities.js"]],function(n,i,o,a,s,l,u,p){function m(D){var H=D.legend&&D.legend.allItems,N=D.options.legend.accessibility||{};return D=D.colorAxis&&D.colorAxis.some(function(j){return!j.dataClasses||!j.dataClasses.length}),!(!H||!H.length||D||N.enabled===!1)}function v(D,H){var N=H.legendItem||{};H.setState(D?"hover":"",!0),H=0;for(var j=["group","label","symbol"];H<j.length;H++){var $=N[j[H]];($=$&&$.element||$)&&C($,D?"mouseover":"mouseout")}}var x=this&&this.__extends||function(){var D=function(H,N){return D=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(j,$){j.__proto__=$}||function(j,$){for(var z in $)$.hasOwnProperty(z)&&(j[z]=$[z])},D(H,N)};return function(H,N){function j(){this.constructor=H}D(H,N),H.prototype=N===null?Object.create(N):(j.prototype=N.prototype,new j)}}(),y=n.animObject,_=i.doc,w=a.addEvent,C=a.fireEvent,E=a.isNumber,T=a.pick,A=a.syncTimeout,k=u.getChartTitle,X=p.stripHTMLTagsFromString,Z=p.addClass,W=p.removeClass;return n=function(D){function H(){var N=D!==null&&D.apply(this,arguments)||this;return N.highlightedLegendItemIx=NaN,N.proxyGroup=null,N}return x(H,D),H.prototype.init=function(){var N=this;this.recreateProxies(),this.addEvent(o,"afterScroll",function(){this.chart===N.chart&&(N.proxyProvider.updateGroupProxyElementPositions("legend"),N.updateLegendItemProxyVisibility(),-1<N.highlightedLegendItemIx&&this.chart.highlightLegendItem(N.highlightedLegendItemIx))}),this.addEvent(o,"afterPositionItem",function(j){this.chart===N.chart&&this.chart.renderer&&N.updateProxyPositionForItem(j.item)}),this.addEvent(o,"afterRender",function(){this.chart===N.chart&&this.chart.renderer&&N.recreateProxies()&&A(function(){return N.proxyProvider.updateGroupProxyElementPositions("legend")},y(T(this.chart.renderer.globalAnimation,!0)).duration)})},H.prototype.updateLegendItemProxyVisibility=function(){var N=this.chart,j=N.legend,$=j.currentPage||1,z=j.clipHeight||0,O;(j.allItems||[]).forEach(function(F){if(F.a11yProxyElement){var G=j.pages&&j.pages.length,q=F.a11yProxyElement.element,ee=!1;O=F.legendItem||{},G&&(F=O.pageIx||0,G=O.y||0,ee=O.label?Math.round(O.label.getBBox().height):0,ee=G+ee-j.pages[F]>z||F!==$-1),ee?N.styledMode?Z(q,"highcharts-a11y-invisible"):q.style.visibility="hidden":(W(q,"highcharts-a11y-invisible"),q.style.visibility="")}})},H.prototype.onChartRender=function(){m(this.chart)||this.removeProxies()},H.prototype.highlightAdjacentLegendPage=function(N){var j=this.chart,$=j.legend;N=($.currentPage||1)+N;var z=$.pages||[];if(0<N&&N<=z.length)for(var O=z=0,F=$.allItems;O<F.length;O++)((F[O].legendItem||{}).pageIx||0)+1===N&&($=j.highlightLegendItem(z))&&(this.highlightedLegendItemIx=z),++z},H.prototype.updateProxyPositionForItem=function(N){N.a11yProxyElement&&N.a11yProxyElement.refreshPosition()},H.prototype.recreateProxies=function(){var N=_.activeElement,j=this.proxyGroup;return N=N&&j&&j.contains(N),this.removeProxies(),m(this.chart)?(this.addLegendProxyGroup(),this.proxyLegendItems(),this.updateLegendItemProxyVisibility(),this.updateLegendTitle(),N&&this.chart.highlightLegendItem(this.highlightedLegendItemIx),!0):!1},H.prototype.removeProxies=function(){this.proxyProvider.removeGroup("legend")},H.prototype.updateLegendTitle=function(){var N=this.chart,j=X((N.legend&&N.legend.options.title&&N.legend.options.title.text||"").replace(/<br ?\/?>/g," "));N=N.langFormat("accessibility.legend.legendLabel"+(j?"":"NoTitle"),{chart:N,legendTitle:j,chartTitle:k(N)}),this.proxyProvider.updateGroupAttrs("legend",{"aria-label":N})},H.prototype.addLegendProxyGroup=function(){this.proxyGroup=this.proxyProvider.addGroup("legend","ul",{"aria-label":"_placeholder_",role:this.chart.options.accessibility.landmarkVerbosity==="all"?"region":null})},H.prototype.proxyLegendItems=function(){var N=this,j;((this.chart.legend||{}).allItems||[]).forEach(function($){j=$.legendItem||{},j.label&&j.label.element&&N.proxyLegendItem($)})},H.prototype.proxyLegendItem=function(N){var j=N.legendItem||{};if(j.label&&j.group){var $=this.chart.langFormat("accessibility.legend.legendItem",{chart:this.chart,itemName:X(N.name),item:N});N.a11yProxyElement=this.proxyProvider.addProxyElement("legend",{click:j.label,visual:(j.group.div?j.label:j.group).element},{tabindex:-1,"aria-pressed":N.visible,"aria-label":$})}},H.prototype.getKeyboardNavigation=function(){var N=this.keyCodes,j=this,$=this.chart;return new l($,{keyCodeMap:[[[N.left,N.right,N.up,N.down],function(z){return j.onKbdArrowKey(this,z)}],[[N.enter,N.space],function(){return j.onKbdClick(this)}],[[N.pageDown,N.pageUp],function(z){return j.highlightAdjacentLegendPage(z===N.pageDown?1:-1),this.response.success}]],validate:function(){return j.shouldHaveLegendNavigation()},init:function(){$.highlightLegendItem(0),j.highlightedLegendItemIx=0},terminate:function(){j.highlightedLegendItemIx=-1,$.legend.allItems.forEach(function(z){return v(!1,z)})}})},H.prototype.onKbdArrowKey=function(N,j){var $=this.keyCodes,z=N.response,O=this.chart,F=O.options.accessibility,G=O.legend.allItems.length;return j=j===$.left||j===$.up?-1:1,O.highlightLegendItem(this.highlightedLegendItemIx+j)?(this.highlightedLegendItemIx+=j,z.success):(1<G&&F.keyboardNavigation.wrapAround&&N.init(j),z.success)},H.prototype.onKbdClick=function(N){var j=this.chart.legend.allItems[this.highlightedLegendItemIx];return j&&j.a11yProxyElement&&j.a11yProxyElement.click(),N.response.success},H.prototype.shouldHaveLegendNavigation=function(){if(!m(this.chart))return!1;var N=this.chart,j=(N.options.legend||{}).accessibility||{};return!!(N.legend.display&&j.keyboardNavigation&&j.keyboardNavigation.enabled)},H}(s),function(D){function H($){var z=this.legend.allItems,O=this.accessibility&&this.accessibility.components.legend.highlightedLegendItemIx,F=z[$],G=F.legendItem||{};return F?(E(O)&&z[O]&&v(!1,z[O]),z=this.legend,$=(z.allItems[$].legendItem||{}).pageIx,O=z.currentPage,typeof $!="undefined"&&$+1!==O&&z.scroll(1+$-O),G=G.label,$=F.a11yProxyElement&&F.a11yProxyElement.buttonElement,G&&G.element&&$&&this.setFocusToElement(G,$),v(!0,F),!0):!1}function N($){var z=$.item;this.chart.options.accessibility.enabled&&z&&z.a11yProxyElement&&z.a11yProxyElement.buttonElement.setAttribute("aria-pressed",$.visible?"true":"false")}var j=[];D.compose=function($,z){j.indexOf($)===-1&&(j.push($),$.prototype.highlightLegendItem=H),j.indexOf(z)===-1&&(j.push(z),w(z,"afterColorizeItem",N))}}(n||(n={})),n}),r(e,"Accessibility/Components/SeriesComponent/SeriesDescriber.js",[e["Accessibility/Components/AnnotationsA11y.js"],e["Accessibility/Utils/ChartUtilities.js"],e["Core/FormatUtilities.js"],e["Accessibility/Utils/HTMLUtilities.js"],e["Core/Utilities.js"]],function(n,i,o,a,s){function l(F){var G=F.index;return F.series&&F.series.data&&O(G)&&j(F.series.data,function(q){return!!(q&&typeof q.index!="undefined"&&q.index>G&&q.graphic&&q.graphic.element)})||null}function u(F){var G=F.chart.options.accessibility.series.pointDescriptionEnabledThreshold;return!!(G!==!1&&F.points&&F.points.length>=G)}function p(F){var G=F.options.accessibility||{};return!u(F)&&!G.exposeAsGroupOnly}function m(F){var G=F.chart.options.accessibility.keyboardNavigation.seriesNavigation;return!(!F.points||!(F.points.length<G.pointNavigationEnabledThreshold||G.pointNavigationEnabledThreshold===!1))}function v(F,G){var q=F.series,ee=q.chart;F=ee.options.accessibility.point||{};var re=q.options.accessibility&&q.options.accessibility.point||{};return q=q.tooltipOptions||{},ee=ee.options.lang,$(G)?D(G,re.valueDecimals||F.valueDecimals||q.valueDecimals||-1,ee.decimalPoint,ee.accessibility.thousandsSep||ee.thousandsSep):G}function x(F){var G=(F.options.accessibility||{}).description;return G&&F.chart.langFormat("accessibility.series.description",{description:G,series:F})||""}function y(F,G){return F.chart.langFormat("accessibility.series."+G+"Description",{name:A(F[G]),series:F})}function _(F,G,q){var ee=G||"",re=q||"";return F.series.pointArrayMap.reduce(function(ce,fe){ce+=ce.length?", ":"";var J=v(F,z(F[fe],F.options[fe]));return ce+(fe+": "+ee+J+re)},"")}function w(F){var G=F.series,q=1<G.chart.series.length||G.options.name,ee=F.series,re=ee.chart,ce=ee.options.accessibility;if(ce=ce&&ce.point&&ce.point.valueDescriptionFormat||re.options.accessibility.point.valueDescriptionFormat,ee=z(ee.xAxis&&ee.xAxis.options.accessibility&&ee.xAxis.options.accessibility.enabled,!re.angular),ee){var fe=F.series,J=fe.chart,oe=fe.options.accessibility&&fe.options.accessibility.point||{},ve=J.options.accessibility.point||{};(fe=fe.xAxis&&fe.xAxis.dateTime)?(fe=fe.getXDateFormat(F.x||0,J.options.tooltip.dateTimeLabelFormats),oe=oe.dateFormatter&&oe.dateFormatter(F)||ve.dateFormatter&&ve.dateFormatter(F)||oe.dateFormat||ve.dateFormat||fe,J=J.time.dateFormat(oe,F.x||0,void 0)):J=void 0,oe=(F.series.xAxis||{}).categories&&O(F.category)&&(""+F.category).replace("<br/>"," "),ve=O(F.id)&&0>(""+F.id).indexOf("highcharts-"),fe="x, "+F.x,J=F.name||J||oe||(ve?F.id:fe)}else J="";oe=O(F.index)?F.index+1:"",ve=F.series;var ye=ve.chart.options.accessibility.point||{},xe=ve.chart.options.accessibility&&ve.chart.options.accessibility.point||{},se=ve.tooltipOptions||{};return fe=xe.valuePrefix||ye.valuePrefix||se.valuePrefix||"",ye=xe.valueSuffix||ye.valueSuffix||se.valueSuffix||"",xe=v(F,F[typeof F.value!="undefined"?"value":"y"]),ve=F.isNull?ve.chart.langFormat("accessibility.series.nullPointValue",{point:F}):ve.pointArrayMap?_(F,fe,ye):fe+xe+ye,re=W(ce,{point:F,index:oe,xDescription:J,value:ve,separator:ee?", ":""},re),ce=(ce=F.options&&F.options.accessibility&&F.options.accessibility.description)?" "+ce:"",G=q?" "+G.name+".":"",q=F.series.chart,ee=T(F),J={point:F,annotations:ee},q=ee.length?q.langFormat("accessibility.series.pointAnnotationsDescription",J):"",F.accessibility=F.accessibility||{},F.accessibility.valueDescription=re,re+ce+G+(q?" "+q:"")}function C(F){var G=p(F),q=m(F),ee=F.chart.options.accessibility.point.describeNull;(G||q)&&F.points.forEach(function(re){var ce;if(!(ce=re.graphic&&re.graphic.element)){var fe=re.series;if(ce=fe&&fe.chart,fe=fe&&fe.is("sunburst"),ce=ce&&ce.options.accessibility.point.describeNull,ce=re.isNull&&!fe&&ce){fe=re.series;var J=l(re);fe=(ce=J&&J.graphic)?ce.parentGroup:fe.graph||fe.group,J=J?{x:z(re.plotX,J.plotX,0),y:z(re.plotY,J.plotY,0)}:{x:z(re.plotX,0),y:z(re.plotY,0)},J=re.series.chart.renderer.rect(J.x,J.y,1,1),J.attr({class:"highcharts-a11y-mock-point",fill:"none",opacity:0,"fill-opacity":0,"stroke-opacity":0}),fe&&fe.element?(re.graphic=J,re.hasMockGraphic=!0,J.add(fe),fe.element.insertBefore(J.element,ce?ce.element:null),ce=J.element):ce=void 0}}fe=re.options&&re.options.accessibility&&re.options.accessibility.enabled===!1,ce&&(re.isNull&&!ee?ce.setAttribute("aria-hidden",!0):(ce.setAttribute("tabindex","-1"),F.chart.styledMode||(ce.style.outline="none"),G&&!fe?(J=re.series,fe=J.chart.options.accessibility.point||{},J=J.options.accessibility&&J.options.accessibility.point||{},re=N(J.descriptionFormatter&&J.descriptionFormatter(re)||fe.descriptionFormatter&&fe.descriptionFormatter(re)||w(re)),ce.setAttribute("role","img"),ce.setAttribute("aria-label",re)):ce.setAttribute("aria-hidden",!0)))})}function E(F){var G=F.chart,q=G.types||[],ee=x(F),re=function(ve){return G[ve]&&1<G[ve].length&&F[ve]},ce=F.index+1,fe=y(F,"xAxis"),J=y(F,"yAxis"),oe={seriesNumber:ce,series:F,chart:G};return q=1<q.length?"Combination":"",oe=G.langFormat("accessibility.series.summary."+F.type+q,oe)||G.langFormat("accessibility.series.summary.default"+q,oe),re=(re("yAxis")?" "+J+".":"")+(re("xAxis")?" "+fe+".":""),W(G.options.accessibility.series.descriptionFormat||"",{seriesDescription:oe,authorDescription:ee?" "+ee:"",axisDescription:re,series:F,chart:G,seriesNumber:ce},void 0)}var T=n.getPointAnnotationTexts,A=i.getAxisDescription,k=i.getSeriesFirstPointElement,X=i.getSeriesA11yElement,Z=i.unhideChartElementFromAT,W=o.format,D=o.numberFormat,H=a.reverseChildNodes,N=a.stripHTMLTagsFromString,j=s.find,$=s.isNumber,z=s.pick,O=s.defined;return{defaultPointDescriptionFormatter:w,defaultSeriesDescriptionFormatter:E,describeSeries:function(F){var G=F.chart,q=k(F),ee=X(F),re=G.is3d&&G.is3d();if(ee){ee.lastChild!==q||re||H(ee),C(F),Z(G,ee),re=F.chart,G=re.options.chart,q=1<re.series.length,re=re.options.accessibility.series.describeSingleSeries;var ce=(F.options.accessibility||{}).exposeAsGroupOnly;G.options3d&&G.options3d.enabled&&q||!(q||re||ce||u(F))?ee.removeAttribute("aria-label"):(G=F.chart.options.accessibility,q=G.landmarkVerbosity,(F.options.accessibility||{}).exposeAsGroupOnly?ee.setAttribute("role","img"):q==="all"?ee.setAttribute("role","region"):ee.setAttribute("role","group"),ee.setAttribute("tabindex","-1"),F.chart.styledMode||(ee.style.outline="none"),ee.setAttribute("aria-label",N(G.series.descriptionFormatter&&G.series.descriptionFormatter(F)||E(F))))}}}}),r(e,"Accessibility/Components/SeriesComponent/NewDataAnnouncer.js",[e["Core/Globals.js"],e["Core/Utilities.js"],e["Accessibility/Utils/Announcer.js"],e["Accessibility/Utils/ChartUtilities.js"],e["Accessibility/Utils/EventProvider.js"],e["Accessibility/Components/SeriesComponent/SeriesDescriber.js"]],function(n,i,o,a,s,l){function u(w){var C=w.series.data.filter(function(E){return w.x===E.x&&w.y===E.y});return C.length===1?C[0]:w}function p(w,C){var E=(w||[]).concat(C||[]).reduce(function(T,A){return T[A.name+A.index]=A,T},{});return Object.keys(E).map(function(T){return E[T]})}var m=i.addEvent,v=i.defined,x=a.getChartTitle,y=l.defaultPointDescriptionFormatter,_=l.defaultSeriesDescriptionFormatter;return i=function(){function w(C){this.announcer=void 0,this.dirty={allSeries:{}},this.eventProvider=void 0,this.lastAnnouncementTime=0,this.chart=C}return w.prototype.init=function(){var C=this.chart,E=C.options.accessibility.announceNewData.interruptUser?"assertive":"polite";this.lastAnnouncementTime=0,this.dirty={allSeries:{}},this.eventProvider=new s,this.announcer=new o(C,E),this.addEventListeners()},w.prototype.destroy=function(){this.eventProvider.removeAddedEvents(),this.announcer.destroy()},w.prototype.addEventListeners=function(){var C=this,E=this.chart,T=this.eventProvider;T.addEvent(E,"afterApplyDrilldown",function(){C.lastAnnouncementTime=0}),T.addEvent(E,"afterAddSeries",function(A){C.onSeriesAdded(A.series)}),T.addEvent(E,"redraw",function(){C.announceDirtyData()})},w.prototype.onSeriesAdded=function(C){this.chart.options.accessibility.announceNewData.enabled&&(this.dirty.hasDirty=!0,this.dirty.allSeries[C.name+C.index]=C,this.dirty.newSeries=v(this.dirty.newSeries)?void 0:C)},w.prototype.announceDirtyData=function(){var C=this;if(this.chart.options.accessibility.announceNewData&&this.dirty.hasDirty){var E=this.dirty.newPoint;E&&(E=u(E)),this.queueAnnouncement(Object.keys(this.dirty.allSeries).map(function(T){return C.dirty.allSeries[T]}),this.dirty.newSeries,E),this.dirty={allSeries:{}}}},w.prototype.queueAnnouncement=function(C,E,T){var A=this,k=this.chart.options.accessibility.announceNewData;if(k.enabled){var X=+new Date;k=Math.max(0,k.minAnnounceInterval-(X-this.lastAnnouncementTime)),C=p(this.queuedAnnouncement&&this.queuedAnnouncement.series,C),(E=this.buildAnnouncementMessage(C,E,T))&&(this.queuedAnnouncement&&clearTimeout(this.queuedAnnouncementTimer),this.queuedAnnouncement={time:X,message:E,series:C},this.queuedAnnouncementTimer=setTimeout(function(){A&&A.announcer&&(A.lastAnnouncementTime=+new Date,A.announcer.announce(A.queuedAnnouncement.message),delete A.queuedAnnouncement,delete A.queuedAnnouncementTimer)},k))}},w.prototype.buildAnnouncementMessage=function(C,E,T){var A=this.chart,k=A.options.accessibility.announceNewData;return k.announcementFormatter&&(C=k.announcementFormatter(C,E,T),C!==!1)?C.length?C:null:(C=n.charts&&1<n.charts.length?"Multiple":"Single",C=E?"newSeriesAnnounce"+C:T?"newPointAnnounce"+C:"newDataAnnounce",k=x(A),A.langFormat("accessibility.announceNewData."+C,{chartTitle:k,seriesDesc:E?_(E):null,pointDesc:T?y(T):null,point:T,series:E}))},w}(),function(w){function C(T){var A=this.chart,k=this.newDataAnnouncer;k&&k.chart===A&&A.options.accessibility.announceNewData.enabled&&(k.dirty.newPoint=v(k.dirty.newPoint)?void 0:T.point)}function E(){var T=this.chart,A=this.newDataAnnouncer;A&&A.chart===T&&T.options.accessibility.announceNewData.enabled&&(A.dirty.hasDirty=!0,A.dirty.allSeries[this.name+this.index]=this)}w.composedClasses=[],w.compose=function(T){w.composedClasses.indexOf(T)===-1&&(w.composedClasses.push(T),m(T,"addPoint",C),m(T,"updatedData",E))}}(i||(i={})),i}),r(e,"Accessibility/ProxyElement.js",[e["Core/Globals.js"],e["Core/Utilities.js"],e["Accessibility/Utils/EventProvider.js"],e["Accessibility/Utils/ChartUtilities.js"],e["Accessibility/Utils/HTMLUtilities.js"]],function(n,i,o,a,s){var l=n.doc,u=i.attr,p=i.css,m=i.merge,v=a.fireEventOnWrappedOrUnwrappedElement,x=s.cloneMouseEvent,y=s.cloneTouchEvent,_=s.getFakeMouseEvent,w=s.removeElement;return function(){function C(E,T,A,k){this.chart=E,this.target=T,this.groupType=A,A=A==="ul",this.eventProvider=new o;var X=A?l.createElement("li"):null,Z=this.buttonElement=l.createElement("button");E.styledMode||this.hideButtonVisually(Z),X?(A&&!E.styledMode&&(X.style.listStyle="none"),X.appendChild(Z),this.element=X):this.element=Z,this.updateTarget(T,k)}return C.prototype.click=function(){var E=this.getTargetPosition();E.x+=E.width/2,E.y+=E.height/2,E=_("click",E),v(this.target.click,E)},C.prototype.updateTarget=function(E,T){this.target=E,this.updateCSSClassName();var A=T||{};Object.keys(A).forEach(function(k){A[k]===null&&delete A[k]}),u(this.buttonElement,m({"aria-label":this.getTargetAttr(E.click,"aria-label")},A)),this.eventProvider.removeAddedEvents(),this.addProxyEventsToButton(this.buttonElement,E.click),this.refreshPosition()},C.prototype.refreshPosition=function(){var E=this.getTargetPosition();p(this.buttonElement,{width:(E.width||1)+"px",height:(E.height||1)+"px",left:(Math.round(E.x)||0)+"px",top:(Math.round(E.y)||0)+"px"})},C.prototype.remove=function(){this.eventProvider.removeAddedEvents(),w(this.element)},C.prototype.updateCSSClassName=function(){var E=this.chart.legend;E=E.group&&E.group.div,E=-1<(E&&E.className||"").indexOf("highcharts-no-tooltip");var T=-1<(this.getTargetAttr(this.target.click,"class")||"").indexOf("highcharts-no-tooltip");this.buttonElement.className=E||T?"highcharts-a11y-proxy-button highcharts-no-tooltip":"highcharts-a11y-proxy-button"},C.prototype.addProxyEventsToButton=function(E,T){var A=this;"click touchstart touchend touchcancel touchmove mouseover mouseenter mouseleave mouseout".split(" ").forEach(function(k){var X=k.indexOf("touch")===0;A.eventProvider.addEvent(E,k,function(Z){var W=X?y(Z):x(Z);T&&v(T,W),Z.stopPropagation(),X||Z.preventDefault()},{passive:!1})})},C.prototype.hideButtonVisually=function(E){p(E,{borderWidth:0,backgroundColor:"transparent",cursor:"pointer",outline:"none",opacity:.001,filter:"alpha(opacity=1)",zIndex:999,overflow:"hidden",padding:0,margin:0,display:"block",position:"absolute","-ms-filter":"progid:DXImageTransform.Microsoft.Alpha(Opacity=1)"})},C.prototype.getTargetPosition=function(){var E=this.target.click;if(E=E.element?E.element:E,E=this.target.visual||E,this.chart.renderTo&&E&&E.getBoundingClientRect){E=E.getBoundingClientRect();var T=this.chart.pointer.getChartPosition();return{x:(E.left-T.left)/T.scaleX,y:(E.top-T.top)/T.scaleY,width:E.right/T.scaleX-E.left/T.scaleX,height:E.bottom/T.scaleY-E.top/T.scaleY}}return{x:0,y:0,width:1,height:1}},C.prototype.getTargetAttr=function(E,T){return E.element?E.element.getAttribute(T):E.getAttribute(T)},C}()}),r(e,"Accessibility/ProxyProvider.js",[e["Core/Globals.js"],e["Core/Utilities.js"],e["Accessibility/Utils/ChartUtilities.js"],e["Accessibility/Utils/DOMElementProvider.js"],e["Accessibility/Utils/HTMLUtilities.js"],e["Accessibility/ProxyElement.js"]],function(n,i,o,a,s,l){var u=n.doc,p=i.attr,m=i.css,v=o.unhideChartElementFromAT,x=s.removeElement,y=s.removeChildNodes;return function(){function _(w){this.chart=w,this.domElementProvider=new a,this.groups={},this.groupOrder=[],this.beforeChartProxyPosContainer=this.createProxyPosContainer("before"),this.afterChartProxyPosContainer=this.createProxyPosContainer("after"),this.update()}return _.prototype.addProxyElement=function(w,C,E){var T=this.groups[w];if(!T)throw Error("ProxyProvider.addProxyElement: Invalid group key "+w);return w=new l(this.chart,C,T.type,E),T.proxyContainerElement.appendChild(w.element),T.proxyElements.push(w),w},_.prototype.addGroup=function(w,C,E){var T=this.groups[w];if(T)return T.groupElement;if(T=this.domElementProvider.createElement(C),E&&E.role&&C!=="div"){var A=this.domElementProvider.createElement("div");A.appendChild(T)}else A=T;return A.className="highcharts-a11y-proxy-group highcharts-a11y-proxy-group-"+w.replace(/\W/g,"-"),this.groups[w]={proxyContainerElement:T,groupElement:A,type:C,proxyElements:[]},p(A,E||{}),C==="ul"&&T.setAttribute("role","list"),this.afterChartProxyPosContainer.appendChild(A),this.updateGroupOrder(this.groupOrder),A},_.prototype.updateGroupAttrs=function(w,C){var E=this.groups[w];if(!E)throw Error("ProxyProvider.updateGroupAttrs: Invalid group key "+w);p(E.groupElement,C)},_.prototype.updateGroupOrder=function(w){var C=this;if(this.groupOrder=w.slice(),!this.isDOMOrderGroupOrder()){var E=w.indexOf("series"),T=-1<E?w.slice(0,E):w,A=-1<E?w.slice(E+1):[];w=u.activeElement,["before","after"].forEach(function(k){var X=C[k==="before"?"beforeChartProxyPosContainer":"afterChartProxyPosContainer"];k=k==="before"?T:A,y(X),k.forEach(function(Z){(Z=C.groups[Z])&&X.appendChild(Z.groupElement)})}),(this.beforeChartProxyPosContainer.contains(w)||this.afterChartProxyPosContainer.contains(w))&&w&&w.focus&&w.focus()}},_.prototype.clearGroup=function(w){var C=this.groups[w];if(!C)throw Error("ProxyProvider.clearGroup: Invalid group key "+w);y(C.proxyContainerElement)},_.prototype.removeGroup=function(w){var C=this.groups[w];C&&(x(C.groupElement),delete this.groups[w])},_.prototype.update=function(){this.updatePosContainerPositions(),this.updateGroupOrder(this.groupOrder),this.updateProxyElementPositions()},_.prototype.updateProxyElementPositions=function(){Object.keys(this.groups).forEach(this.updateGroupProxyElementPositions.bind(this))},_.prototype.updateGroupProxyElementPositions=function(w){(w=this.groups[w])&&w.proxyElements.forEach(function(C){return C.refreshPosition()})},_.prototype.destroy=function(){this.domElementProvider.destroyCreatedElements()},_.prototype.createProxyPosContainer=function(w){var C=this.domElementProvider.createElement("div");return C.setAttribute("aria-hidden","false"),C.className="highcharts-a11y-proxy-container"+(w?"-"+w:""),m(C,{top:"0",left:"0"}),this.chart.styledMode||(C.style.whiteSpace="nowrap",C.style.position="absolute"),C},_.prototype.getCurrentGroupOrderInDOM=function(){var w=this,C=function(T){var A=[];T=T.children;for(var k=0;k<T.length;++k){e:{for(var X=T[k],Z=Object.keys(w.groups),W=Z.length;W--;){var D=Z[W],H=w.groups[D];if(H&&X===H.groupElement){X=D;break e}}X=void 0}X&&A.push(X)}return A},E=C(this.beforeChartProxyPosContainer);return C=C(this.afterChartProxyPosContainer),E.push("series"),E.concat(C)},_.prototype.isDOMOrderGroupOrder=function(){var w=this,C=this.getCurrentGroupOrderInDOM(),E=this.groupOrder.filter(function(A){return A==="series"||!!w.groups[A]}),T=C.length;if(T!==E.length)return!1;for(;T--;)if(C[T]!==E[T])return!1;return!0},_.prototype.updatePosContainerPositions=function(){var w=this.chart;if(!w.renderer.forExport){var C=w.renderer.box;w.container.insertBefore(this.afterChartProxyPosContainer,C.nextSibling),w.container.insertBefore(this.beforeChartProxyPosContainer,C),v(this.chart,this.afterChartProxyPosContainer),v(this.chart,this.beforeChartProxyPosContainer)}},_}()}),r(e,"Stock/RangeSelector/RangeSelectorDefaults.js",[],function(){return{lang:{rangeSelectorZoom:"Zoom",rangeSelectorFrom:"",rangeSelectorTo:"\u2192"},rangeSelector:{allButtonsEnabled:!1,buttons:void 0,buttonSpacing:5,dropdown:"responsive",enabled:void 0,verticalAlign:"top",buttonTheme:{width:28,height:18,padding:2,zIndex:7},floating:!1,x:0,y:0,height:void 0,inputBoxBorderColor:"none",inputBoxHeight:17,inputBoxWidth:void 0,inputDateFormat:"%b %e, %Y",inputDateParser:void 0,inputEditDateFormat:"%Y-%m-%d",inputEnabled:!0,inputPosition:{align:"right",x:0,y:0},inputSpacing:5,selected:void 0,buttonPosition:{align:"left",x:0,y:0},inputStyle:{color:"#335cad",cursor:"pointer"},labelStyle:{color:"#666666"}}}}),r(e,"Stock/RangeSelector/RangeSelectorComposition.js",[e["Core/Defaults.js"],e["Stock/RangeSelector/RangeSelectorDefaults.js"],e["Core/Utilities.js"]],function(n,i,o){function a(){var H=this.range,N=H.type,j=this.max,$=this.chart.time,z=function(q,ee){var re=N==="year"?"FullYear":"Month",ce=new $.Date(q),fe=$.get(re,ce);return $.set(re,ce,fe+ee),fe===$.get(re,ce)&&$.set("Date",ce,0),ce.getTime()-q};if(A(H))var O=j-H,F=H;else H&&(O=j+z(j,-(H.count||1)),this.chart&&(this.chart.fixedRange=j-O));var G=X(this.dataMin,Number.MIN_VALUE);return A(O)||(O=G),O<=G&&(O=G,typeof F=="undefined"&&(F=z(O,H.count)),this.newMax=Math.min(O+F,X(this.dataMax,Number.MAX_VALUE))),A(j)?!A(H)&&H&&H._offsetMin&&(O+=H._offsetMin):O=void 0,O}function s(){this.options.rangeSelector&&this.options.rangeSelector.enabled&&(this.rangeSelector=new D(this))}function l(){var H=this.axes,N=this.rangeSelector;N&&(A(N.deferredYTDClick)&&(N.clickButton(N.deferredYTDClick),delete N.deferredYTDClick),H.forEach(function(j){j.updateNames(),j.setScale()}),this.getAxisMargins(),N.render(),H=N.options.verticalAlign,N.options.floating||(H==="bottom"?this.extraBottomMargin=!0:H!=="middle"&&(this.extraTopMargin=!0)))}function u(H){var N,j,$,z,O=H.rangeSelector,F=function(){O&&(N=H.xAxis[0].getExtremes(),j=H.legend,z=O&&O.options.verticalAlign,A(N.min)&&O.render(N.min,N.max),j.display&&z==="top"&&z===j.options.verticalAlign&&($=k(H.spacingBox),$.y=j.options.layout==="vertical"?H.plotTop:$.y+O.getHeight(),j.group.placed=!1,j.align($)))};O&&(T(Z,function(G){return G[0]===H})||Z.push([H,[w(H.xAxis[0],"afterSetExtremes",function(G){O&&O.render(G.min,G.max)}),w(H,"redraw",F)]]),F())}function p(){for(var H=0,N=Z.length;H<N;++H){var j=Z[H];if(j[0]===this){j[1].forEach(function($){return $()}),Z.splice(H,1);break}}}function m(){var H=this.rangeSelector;H&&(H=H.getHeight(),this.extraTopMargin&&(this.plotTop+=H),this.extraBottomMargin&&(this.marginBottom+=H))}function v(){var H=this.rangeSelector;H&&!H.options.floating&&(H.render(),H=H.options.verticalAlign,H==="bottom"?this.extraBottomMargin=!0:H!=="middle"&&(this.extraTopMargin=!0))}function x(H){var N=H.options.rangeSelector;H=this.extraBottomMargin;var j=this.extraTopMargin,$=this.rangeSelector;N&&N.enabled&&!C($)&&this.options.rangeSelector&&(this.options.rangeSelector.enabled=!0,this.rangeSelector=$=new D(this)),this.extraTopMargin=this.extraBottomMargin=!1,$&&(u(this),N=N&&N.verticalAlign||$.options&&$.options.verticalAlign,$.options.floating||(N==="bottom"?this.extraBottomMargin=!0:N!=="middle"&&(this.extraTopMargin=!0)),this.extraBottomMargin!==H||this.extraTopMargin!==j)&&(this.isDirtyBox=!0)}var y=n.defaultOptions,_=n.setOptions,w=o.addEvent,C=o.defined,E=o.extend,T=o.find,A=o.isNumber,k=o.merge,X=o.pick,Z=[],W=[],D;return{compose:function(H,N,j){D=j,W.indexOf(H)===-1&&(W.push(H),H.prototype.minFromRange=a),W.indexOf(N)===-1&&(W.push(N),w(N,"afterGetContainer",s),w(N,"beforeRender",l),w(N,"destroy",p),w(N,"getMargins",m),w(N,"render",v),w(N,"update",x),N.prototype.callbacks.push(u)),W.indexOf(_)===-1&&(E(y,{rangeSelector:i.rangeSelector}),E(y.lang,i.lang))}}}),r(e,"Stock/RangeSelector/RangeSelector.js",[e["Core/Axis/Axis.js"],e["Core/Defaults.js"],e["Core/Globals.js"],e["Stock/RangeSelector/RangeSelectorComposition.js"],e["Core/Renderer/SVG/SVGElement.js"],e["Core/Utilities.js"]],function(n,i,o,a,s,l){function u(H){if(H.indexOf("%L")!==-1)return"text";var N="aAdewbBmoyY".split("").some(function($){return H.indexOf("%"+$)!==-1}),j="HkIlMS".split("").some(function($){return H.indexOf("%"+$)!==-1});return N&&j?"datetime-local":N?"date":j?"time":"text"}var p=i.defaultOptions,m=l.addEvent,v=l.createElement,x=l.css,y=l.defined,_=l.destroyObjectProperties,w=l.discardElement,C=l.extend,E=l.fireEvent,T=l.isNumber,A=l.merge,k=l.objectEach,X=l.pad,Z=l.pick,W=l.pInt,D=l.splat;return i=function(){function H(N){this.buttons=void 0,this.buttonOptions=H.prototype.defaultButtons,this.initialButtonGroupWidth=0,this.options=void 0,this.chart=N,this.init(N)}return H.compose=function(N,j){a.compose(N,j,H)},H.prototype.clickButton=function(N,j){var $=this.chart,z=this.buttonOptions[N],O=$.xAxis[0],F=$.scroller&&$.scroller.getUnionExtremes()||O||{},G=z.type,q=z.dataGrouping,ee=F.dataMin,re=F.dataMax,ce=O&&Math.round(Math.min(O.max,Z(re,O.max)));F=z._range;var fe,J=!0;if(ee!==null&&re!==null){if($.fixedRange=F,this.setSelected(N),q&&(this.forcedDataGrouping=!0,n.prototype.setDataGrouping.call(O||{chart:this.chart},q,!1),this.frozenStates=z.preserveDataGrouping),G==="month"||G==="year")if(O){G={range:z,max:ce,chart:$,dataMin:ee,dataMax:re};var oe=O.minFromRange.call(G);T(G.newMax)&&(ce=G.newMax),J=!1}else F=z;else if(F)oe=Math.max(ce-F,ee),ce=Math.min(oe+F,re),J=!1;else if(G==="ytd")if(O)(typeof re=="undefined"||typeof ee=="undefined")&&(ee=Number.MAX_VALUE,re=Number.MIN_VALUE,$.series.forEach(function(se){(se=se.xData)&&(ee=Math.min(se[0],ee),re=Math.max(se[se.length-1],re))}),j=!1),G=this.getYTDExtremes(re,ee,$.time.useUTC),oe=fe=G.min,ce=G.max;else{this.deferredYTDClick=N;return}else G==="all"&&O&&($.navigator&&$.navigator.baseSeries[0]&&($.navigator.baseSeries[0].xAxis.options.range=void 0),oe=ee,ce=re);if(J&&z._offsetMin&&y(oe)&&(oe+=z._offsetMin),z._offsetMax&&y(ce)&&(ce+=z._offsetMax),this.dropdown&&(this.dropdown.selectedIndex=N+1),O)O.setExtremes(oe,ce,Z(j,!0),void 0,{trigger:"rangeSelectorButton",rangeSelectorButton:z});else{var ve=D($.options.xAxis)[0],ye=ve.range;ve.range=F;var xe=ve.min;ve.min=fe,m($,"load",function(){ve.range=ye,ve.min=xe})}E(this,"afterBtnClick")}},H.prototype.setSelected=function(N){this.selected=this.options.selected=N},H.prototype.init=function(N){var j=this,$=N.options.rangeSelector,z=$.buttons||j.defaultButtons.slice(),O=$.selected,F=function(){var G=j.minInput,q=j.maxInput;G&&G.blur&&E(G,"blur"),q&&q.blur&&E(q,"blur")};j.chart=N,j.options=$,j.buttons=[],j.buttonOptions=z,this.eventsToUnbind=[],this.eventsToUnbind.push(m(N.container,"mousedown",F)),this.eventsToUnbind.push(m(N,"resize",F)),z.forEach(j.computeButtonRange),typeof O!="undefined"&&z[O]&&this.clickButton(O,!1),this.eventsToUnbind.push(m(N,"load",function(){N.xAxis&&N.xAxis[0]&&m(N.xAxis[0],"setExtremes",function(G){this.max-this.min!==N.fixedRange&&G.trigger!=="rangeSelectorButton"&&G.trigger!=="updatedData"&&j.forcedDataGrouping&&!j.frozenStates&&this.setDataGrouping(!1,!1)})}))},H.prototype.updateButtonStates=function(){var N=this,j=this.chart,$=this.dropdown,z=j.xAxis[0],O=Math.round(z.max-z.min),F=!z.hasVisibleSeries,G=j.scroller&&j.scroller.getUnionExtremes()||z,q=G.dataMin,ee=G.dataMax;j=N.getYTDExtremes(ee,q,j.time.useUTC);var re=j.min,ce=j.max,fe=N.selected,J=N.options.allButtonsEnabled,oe=N.buttons,ve=T(fe);N.buttonOptions.forEach(function(ye,xe){var se=ye._range,me=ye.type,pe=ye.count||1,Ce=oe[xe],Pe=ye._offsetMax-ye._offsetMin,Re=xe===fe,ke=se>ee-q,ze=se<z.minRange;ye=0;var Ge=!1,ht=!1;se=se===O,(me==="month"||me==="year")&&O+36e5>=864e5*{month:28,year:365}[me]*pe-Pe&&O-36e5<=864e5*{month:31,year:366}[me]*pe+Pe?se=!0:me==="ytd"?(se=ce-re+Pe===O,Ge=!Re):me==="all"&&(se=z.max-z.min>=ee-q,ht=!Re&&ve&&se),me=!J&&(ke||ze||ht||F),pe=Re&&se||se&&!ve&&!Ge||Re&&N.frozenStates,me?ye=3:pe&&(ve=!0,ye=2),Ce.state!==ye&&(Ce.setState(ye),$&&($.options[xe+1].disabled=me,ye===2&&($.selectedIndex=xe+1)),ye===0&&fe===xe&&N.setSelected())})},H.prototype.computeButtonRange=function(N){var j=N.type,$=N.count||1,z={millisecond:1,second:1e3,minute:6e4,hour:36e5,day:864e5,week:6048e5};z[j]?N._range=z[j]*$:(j==="month"||j==="year")&&(N._range=864e5*{month:30,year:365}[j]*$),N._offsetMin=Z(N.offsetMin,0),N._offsetMax=Z(N.offsetMax,0),N._range+=N._offsetMax-N._offsetMin},H.prototype.getInputValue=function(N){N=N==="min"?this.minInput:this.maxInput;var j=this.chart.options.rangeSelector,$=this.chart.time;return N?(N.type==="text"&&j.inputDateParser||this.defaultInputDateParser)(N.value,$.useUTC,$):0},H.prototype.setInputValue=function(N,j){var $=this.options,z=this.chart.time,O=N==="min"?this.minInput:this.maxInput;if(N=N==="min"?this.minDateBox:this.maxDateBox,O){var F=O.getAttribute("data-hc-time");F=y(F)?Number(F):void 0,y(j)&&(y(F)&&O.setAttribute("data-hc-time-previous",F),O.setAttribute("data-hc-time",j),F=j),O.value=z.dateFormat(this.inputTypeFormats[O.type]||$.inputEditDateFormat,F),N&&N.attr({text:z.dateFormat($.inputDateFormat,F)})}},H.prototype.setInputExtremes=function(N,j,$){if(N=N==="min"?this.minInput:this.maxInput){var z=this.inputTypeFormats[N.type],O=this.chart.time;z&&(j=O.dateFormat(z,j),N.min!==j&&(N.min=j),$=O.dateFormat(z,$),N.max!==$&&(N.max=$))}},H.prototype.showInput=function(N){var j=N==="min"?this.minDateBox:this.maxDateBox;if((N=N==="min"?this.minInput:this.maxInput)&&j&&this.inputGroup){var $=N.type==="text",z=this.inputGroup,O=z.translateX;z=z.translateY;var F=this.options.inputBoxWidth;x(N,{width:$?j.width+(F?-2:20)+"px":"auto",height:$?j.height-2+"px":"auto",border:"2px solid silver"}),$&&F?x(N,{left:O+j.x+"px",top:z+"px"}):x(N,{left:Math.min(Math.round(j.x+O-(N.offsetWidth-j.width)/2),this.chart.chartWidth-N.offsetWidth)+"px",top:z-(N.offsetHeight-j.height)/2+"px"})}},H.prototype.hideInput=function(N){(N=N==="min"?this.minInput:this.maxInput)&&x(N,{top:"-9999em",border:0,width:"1px",height:"1px"})},H.prototype.defaultInputDateParser=function(N,j,$){var z=N.split("/").join("-").split(" ").join("T");if(z.indexOf("T")===-1&&(z+="T00:00"),j)z+="Z";else{var O;(O=o.isSafari)&&(O=z,O=!(6<O.length&&(O.lastIndexOf("-")===O.length-6||O.lastIndexOf("+")===O.length-6))),O&&(O=new Date(z).getTimezoneOffset()/60,z+=0>=O?"+".concat(X(-O),":00"):"-".concat(X(O),":00"))}return z=Date.parse(z),T(z)||(N=N.split("-"),z=Date.UTC(W(N[0]),W(N[1])-1,W(N[2]))),$&&j&&T(z)&&(z+=$.getTimezoneOffset(z)),z},H.prototype.drawInput=function(N){function j(){var oe=F.maxInput,ve=F.minInput,ye=$.xAxis[0],xe=$.scroller&&$.scroller.xAxis?$.scroller.xAxis:ye,se=xe.dataMin;xe=xe.dataMax;var me=F.getInputValue(N);me!==Number(fe.getAttribute("data-hc-time-previous"))&&T(me)&&(fe.setAttribute("data-hc-time-previous",me),re&&oe&&T(se)?me>Number(oe.getAttribute("data-hc-time"))?me=void 0:me<se&&(me=se):ve&&T(xe)&&(me<Number(ve.getAttribute("data-hc-time"))?me=void 0:me>xe&&(me=xe)),typeof me!="undefined"&&ye.setExtremes(re?me:ye.min,re?ye.max:me,void 0,void 0,{trigger:"rangeSelectorInput"}))}var $=this.chart,z=this.div,O=this.inputGroup,F=this,G=$.renderer.style||{},q=$.renderer,ee=$.options.rangeSelector,re=N==="min",ce=p.lang[re?"rangeSelectorFrom":"rangeSelectorTo"]||"";ce=q.label(ce,0).addClass("highcharts-range-label").attr({padding:ce?2:0,height:ce?ee.inputBoxHeight:0}).add(O),q=q.label("",0).addClass("highcharts-range-input").attr({padding:2,width:ee.inputBoxWidth,height:ee.inputBoxHeight,"text-align":"center"}).on("click",function(){F.showInput(N),F[N+"Input"].focus()}),$.styledMode||q.attr({stroke:ee.inputBoxBorderColor,"stroke-width":1}),q.add(O);var fe=v("input",{name:N,className:"highcharts-range-selector"},void 0,z);fe.setAttribute("type",u(ee.inputDateFormat||"%b %e, %Y")),$.styledMode||(ce.css(A(G,ee.labelStyle)),q.css(A({color:"#333333"},G,ee.inputStyle)),x(fe,C({position:"absolute",border:0,boxShadow:"0 0 15px rgba(0,0,0,0.3)",width:"1px",height:"1px",padding:0,textAlign:"center",fontSize:G.fontSize,fontFamily:G.fontFamily,top:"-9999em"},ee.inputStyle))),fe.onfocus=function(){F.showInput(N)},fe.onblur=function(){fe===o.doc.activeElement&&j(),F.hideInput(N),F.setInputValue(N),fe.blur()};var J=!1;return fe.onchange=function(){J||(j(),F.hideInput(N),fe.blur())},fe.onkeypress=function(oe){oe.keyCode===13&&j()},fe.onkeydown=function(oe){J=!0,oe.keyCode!==38&&oe.keyCode!==40||j()},fe.onkeyup=function(){J=!1},{dateBox:q,input:fe,label:ce}},H.prototype.getPosition=function(){var N=this.chart,j=N.options.rangeSelector;return N=j.verticalAlign==="top"?N.plotTop-N.axisOffset[0]:0,{buttonTop:N+j.buttonPosition.y,inputTop:N+j.inputPosition.y-10}},H.prototype.getYTDExtremes=function(N,j,$){var z=this.chart.time,O=new z.Date(N),F=z.get("FullYear",O);return $=$?z.Date.UTC(F,0,1):+new z.Date(F,0,1),j=Math.max(j,$),O=O.getTime(),{max:Math.min(N||O,O),min:j}},H.prototype.render=function(N,j){var $=this.chart,z=$.renderer,O=$.container,F=$.options,G=F.rangeSelector,q=Z(F.chart.style&&F.chart.style.zIndex,0)+1;if(F=G.inputEnabled,G.enabled!==!1){if(this.rendered||(this.group=z.g("range-selector-group").attr({zIndex:7}).add(),this.div=v("div",void 0,{position:"relative",height:0,zIndex:q}),this.buttonOptions.length&&this.renderButtons(),O.parentNode&&O.parentNode.insertBefore(this.div,O),F&&(this.inputGroup=z.g("input-group").add(this.group),z=this.drawInput("min"),this.minDateBox=z.dateBox,this.minLabel=z.label,this.minInput=z.input,z=this.drawInput("max"),this.maxDateBox=z.dateBox,this.maxLabel=z.label,this.maxInput=z.input)),F&&(this.setInputValue("min",N),this.setInputValue("max",j),N=$.scroller&&$.scroller.getUnionExtremes()||$.xAxis[0]||{},y(N.dataMin)&&y(N.dataMax)&&($=$.xAxis[0].minRange||0,this.setInputExtremes("min",N.dataMin,Math.min(N.dataMax,this.getInputValue("max"))-$),this.setInputExtremes("max",Math.max(N.dataMin,this.getInputValue("min"))+$,N.dataMax)),this.inputGroup)){var ee=0;[this.minLabel,this.minDateBox,this.maxLabel,this.maxDateBox].forEach(function(re){if(re){var ce=re.getBBox().width;ce&&(re.attr({x:ee}),ee+=ce+G.inputSpacing)}})}this.alignElements(),this.rendered=!0}},H.prototype.renderButtons=function(){var N=this,j=this.buttons,$=this.options,z=p.lang,O=this.chart.renderer,F=A($.buttonTheme),G=F&&F.states,q=F.width||28;delete F.width,delete F.states,this.buttonGroup=O.g("range-selector-buttons").add(this.group);var ee=this.dropdown=v("select",void 0,{position:"absolute",width:"1px",height:"1px",padding:0,border:0,top:"-9999em",cursor:"pointer",opacity:1e-4},this.div);m(ee,"touchstart",function(){ee.style.fontSize="16px"}),[[o.isMS?"mouseover":"mouseenter"],[o.isMS?"mouseout":"mouseleave"],["change","click"]].forEach(function(re){var ce=re[0],fe=re[1];m(ee,ce,function(){var J=j[N.currentButtonIndex()];J&&E(J.element,fe||ce)})}),this.zoomText=O.label(z&&z.rangeSelectorZoom||"",0).attr({padding:$.buttonTheme.padding,height:$.buttonTheme.height,paddingLeft:0,paddingRight:0}).add(this.buttonGroup),this.chart.styledMode||(this.zoomText.css($.labelStyle),F["stroke-width"]=Z(F["stroke-width"],0)),v("option",{textContent:this.zoomText.textStr,disabled:!0},void 0,ee),this.buttonOptions.forEach(function(re,ce){v("option",{textContent:re.title||re.text},void 0,ee),j[ce]=O.button(re.text,0,0,function(fe){var J=re.events&&re.events.click,oe;J&&(oe=J.call(re,fe)),oe!==!1&&N.clickButton(ce),N.isActive=!0},F,G&&G.hover,G&&G.select,G&&G.disabled).attr({"text-align":"center",width:q}).add(N.buttonGroup),re.title&&j[ce].attr("title",re.title)})},H.prototype.alignElements=function(){var N=this,j=this.buttonGroup,$=this.buttons,z=this.chart,O=this.group,F=this.inputGroup,G=this.options,q=this.zoomText,ee=z.options,re=ee.exporting&&ee.exporting.enabled!==!1&&ee.navigation&&ee.navigation.buttonOptions;ee=G.buttonPosition;var ce=G.inputPosition,fe=G.verticalAlign,J=function(xe,se){return re&&N.titleCollision(z)&&fe==="top"&&se.align==="right"&&se.y-xe.getBBox().height-12<(re.y||0)+(re.height||0)+z.spacing[0]?-40:0},oe=z.plotLeft;if(O&&ee&&ce){var ve=ee.x-z.spacing[3];if(j){if(this.positionButtons(),!this.initialButtonGroupWidth){var ye=0;q&&(ye+=q.getBBox().width+5),$.forEach(function(xe,se){ye+=xe.width,se!==$.length-1&&(ye+=G.buttonSpacing)}),this.initialButtonGroupWidth=ye}oe-=z.spacing[3],this.updateButtonStates(),q=J(j,ee),this.alignButtonGroup(q),O.placed=j.placed=z.hasLoaded}j=0,F&&(j=J(F,ce),ce.align==="left"?ve=oe:ce.align==="right"&&(ve=-Math.max(z.axisOffset[1],-j)),F.align({y:ce.y,width:F.getBBox().width,align:ce.align,x:ce.x+ve-2},!0,z.spacingBox),F.placed=z.hasLoaded),this.handleCollision(j),O.align({verticalAlign:fe},!0,z.spacingBox),F=O.alignAttr.translateY,j=O.getBBox().height+20,J=0,fe==="bottom"&&(J=(J=z.legend&&z.legend.options)&&J.verticalAlign==="bottom"&&J.enabled&&!J.floating?z.legend.legendHeight+Z(J.margin,10):0,j=j+J-20,J=F-j-(G.floating?0:G.y)-(z.titleOffset?z.titleOffset[2]:0)-10),fe==="top"?(G.floating&&(J=0),z.titleOffset&&z.titleOffset[0]&&(J=z.titleOffset[0]),J+=z.margin[0]-z.spacing[0]||0):fe==="middle"&&(ce.y===ee.y?J=F:(ce.y||ee.y)&&(J=0>ce.y||0>ee.y?J-Math.min(ce.y,ee.y):F-j)),O.translate(G.x,G.y+Math.floor(J)),ee=this.minInput,ce=this.maxInput,F=this.dropdown,G.inputEnabled&&ee&&ce&&(ee.style.marginTop=O.translateY+"px",ce.style.marginTop=O.translateY+"px"),F&&(F.style.marginTop=O.translateY+"px")}},H.prototype.alignButtonGroup=function(N,j){var $=this.chart,z=this.buttonGroup,O=this.options.buttonPosition,F=$.plotLeft-$.spacing[3],G=O.x-$.spacing[3];O.align==="right"?G+=N-F:O.align==="center"&&(G-=F/2),z&&z.align({y:O.y,width:Z(j,this.initialButtonGroupWidth),align:O.align,x:G},!0,$.spacingBox)},H.prototype.positionButtons=function(){var N=this.buttons,j=this.chart,$=this.options,z=this.zoomText,O=j.hasLoaded?"animate":"attr",F=$.buttonPosition,G=j=j.plotLeft;for(z&&z.visibility!=="hidden"&&(z[O]({x:Z(j+F.x,j)}),G+=F.x+z.getBBox().width+5),z=0,F=this.buttonOptions.length;z<F;++z)N[z].visibility!=="hidden"?(N[z][O]({x:G}),G+=N[z].width+$.buttonSpacing):N[z][O]({x:j})},H.prototype.handleCollision=function(N){var j=this,$=this.chart,z=this.buttonGroup,O=this.inputGroup,F=this.options,G=F.buttonPosition,q=F.dropdown,ee=F.inputPosition;F=function(){var fe=0;return j.buttons.forEach(function(J){J=J.getBBox(),J.width>fe&&(fe=J.width)}),fe};var re=function(fe){if(O&&z){var J=O.alignAttr.translateX+O.alignOptions.x-N+O.getBBox().x+2,oe=O.alignOptions.width,ve=z.alignAttr.translateX+z.getBBox().x;return ve+fe>J&&J+oe>ve&&G.y<ee.y+O.getBBox().height}return!1},ce=function(){O&&z&&O.attr({translateX:O.alignAttr.translateX+($.axisOffset[1]>=-N?0:-N),translateY:O.alignAttr.translateY+z.getBBox().height+10})};if(z){if(q==="always"){this.collapseButtons(N),re(F())&&ce();return}q==="never"&&this.expandButtons()}O&&z?ee.align===G.align||re(this.initialButtonGroupWidth+20)?q==="responsive"?(this.collapseButtons(N),re(F())&&ce()):ce():q==="responsive"&&this.expandButtons():z&&q==="responsive"&&(this.initialButtonGroupWidth>$.plotWidth?this.collapseButtons(N):this.expandButtons())},H.prototype.collapseButtons=function(N){var j=this.buttons,$=this.buttonOptions,z=this.chart,O=this.dropdown,F=this.options,G=this.zoomText,q=z.userOptions.rangeSelector&&z.userOptions.rangeSelector.buttonTheme||{},ee=function(ce){return{text:ce?""+ce+" \u25BE":"\u25BE",width:"auto",paddingLeft:Z(F.buttonTheme.paddingLeft,q.padding,8),paddingRight:Z(F.buttonTheme.paddingRight,q.padding,8)}};G&&G.hide();var re=!1;$.forEach(function(ce,fe){fe=j[fe],fe.state!==2?fe.hide():(fe.show(),fe.attr(ee(ce.text)),re=!0)}),re||(O&&(O.selectedIndex=0),j[0].show(),j[0].attr(ee(this.zoomText&&this.zoomText.textStr))),$=F.buttonPosition.align,this.positionButtons(),$!=="right"&&$!=="center"||this.alignButtonGroup(N,j[this.currentButtonIndex()].getBBox().width),this.showDropdown()},H.prototype.expandButtons=function(){var N=this.buttons,j=this.buttonOptions,$=this.options,z=this.zoomText;this.hideDropdown(),z&&z.show(),j.forEach(function(O,F){F=N[F],F.show(),F.attr({text:O.text,width:$.buttonTheme.width||28,paddingLeft:Z($.buttonTheme.paddingLeft,"unset"),paddingRight:Z($.buttonTheme.paddingRight,"unset")}),2>F.state&&F.setState(0)}),this.positionButtons()},H.prototype.currentButtonIndex=function(){var N=this.dropdown;return N&&0<N.selectedIndex?N.selectedIndex-1:0},H.prototype.showDropdown=function(){var N=this.buttonGroup,j=this.buttons,$=this.chart,z=this.dropdown;if(N&&z){var O=N.translateX;N=N.translateY,j=j[this.currentButtonIndex()].getBBox(),x(z,{left:$.plotLeft+O+"px",top:N+.5+"px",width:j.width+"px",height:j.height+"px"}),this.hasVisibleDropdown=!0}},H.prototype.hideDropdown=function(){var N=this.dropdown;N&&(x(N,{top:"-9999em",width:"1px",height:"1px"}),this.hasVisibleDropdown=!1)},H.prototype.getHeight=function(){var N=this.options,j=this.group,$=N.y,z=N.buttonPosition.y,O=N.inputPosition.y;return N.height?N.height:(this.alignElements(),N=j?j.getBBox(!0).height+13+$:0,j=Math.min(O,z),(0>O&&0>z||0<O&&0<z)&&(N+=Math.abs(j)),N)},H.prototype.titleCollision=function(N){return!(N.options.title.text||N.options.subtitle.text)},H.prototype.update=function(N){var j=this.chart;A(!0,j.options.rangeSelector,N),this.destroy(),this.init(j),this.render()},H.prototype.destroy=function(){var N=this,j=N.minInput,$=N.maxInput;N.eventsToUnbind&&(N.eventsToUnbind.forEach(function(z){return z()}),N.eventsToUnbind=void 0),_(N.buttons),j&&(j.onfocus=j.onblur=j.onchange=null),$&&($.onfocus=$.onblur=$.onchange=null),k(N,function(z,O){z&&O!=="chart"&&(z instanceof s?z.destroy():z instanceof window.HTMLElement&&w(z)),z!==H.prototype[O]&&(N[O]=null)},this)},H}(),C(i.prototype,{defaultButtons:[{type:"month",count:1,text:"1m",title:"View 1 month"},{type:"month",count:3,text:"3m",title:"View 3 months"},{type:"month",count:6,text:"6m",title:"View 6 months"},{type:"ytd",text:"YTD",title:"View year to date"},{type:"year",count:1,text:"1y",title:"View 1 year"},{type:"all",text:"All",title:"View all"}],inputTypeFormats:{"datetime-local":"%Y-%m-%dT%H:%M:%S",date:"%Y-%m-%d",time:"%H:%M:%S"}}),i}),r(e,"Accessibility/Components/RangeSelectorComponent.js",[e["Stock/RangeSelector/RangeSelector.js"],e["Accessibility/AccessibilityComponent.js"],e["Accessibility/Utils/ChartUtilities.js"],e["Accessibility/Utils/Announcer.js"],e["Accessibility/KeyboardNavigationHandler.js"],e["Core/Utilities.js"]],function(n,i,o,a,s,l){var u=this&&this.__extends||function(){var y=function(_,w){return y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(C,E){C.__proto__=E}||function(C,E){for(var T in E)E.hasOwnProperty(T)&&(C[T]=E[T])},y(_,w)};return function(_,w){function C(){this.constructor=_}y(_,w),_.prototype=w===null?Object.create(w):(C.prototype=w.prototype,new C)}}(),p=o.unhideChartElementFromAT,m=o.getAxisRangeDescription,v=l.addEvent,x=l.attr;return i=function(y){function _(){var w=y!==null&&y.apply(this,arguments)||this;return w.announcer=void 0,w}return u(_,y),_.prototype.init=function(){this.announcer=new a(this.chart,"polite")},_.prototype.onChartUpdate=function(){var w=this.chart,C=this,E=w.rangeSelector;E&&(this.updateSelectorVisibility(),this.setDropdownAttrs(),E.buttons&&E.buttons.length&&E.buttons.forEach(function(T){C.setRangeButtonAttrs(T)}),E.maxInput&&E.minInput&&["minInput","maxInput"].forEach(function(T,A){(T=E[T])&&(p(w,T),C.setRangeInputAttrs(T,"accessibility.rangeSelector."+(A?"max":"min")+"InputLabel"))}))},_.prototype.updateSelectorVisibility=function(){var w=this.chart,C=w.rangeSelector,E=C&&C.dropdown,T=C&&C.buttons||[];C&&C.hasVisibleDropdown&&E?(p(w,E),T.forEach(function(A){return A.element.setAttribute("aria-hidden",!0)})):(E&&E.setAttribute("aria-hidden",!0),T.forEach(function(A){return p(w,A.element)}))},_.prototype.setDropdownAttrs=function(){var w=this.chart,C=w.rangeSelector&&w.rangeSelector.dropdown;C&&(w=w.langFormat("accessibility.rangeSelector.dropdownLabel",{rangeTitle:w.options.lang.rangeSelectorZoom}),C.setAttribute("aria-label",w),C.setAttribute("tabindex",-1))},_.prototype.setRangeButtonAttrs=function(w){x(w.element,{tabindex:-1,role:"button"})},_.prototype.setRangeInputAttrs=function(w,C){var E=this.chart;x(w,{tabindex:-1,"aria-label":E.langFormat(C,{chart:E})})},_.prototype.onButtonNavKbdArrowKey=function(w,C){var E=w.response,T=this.keyCodes,A=this.chart,k=A.options.accessibility.keyboardNavigation.wrapAround;return C=C===T.left||C===T.up?-1:1,A.highlightRangeSelectorButton(A.highlightedRangeSelectorItemIx+C)?E.success:k?(w.init(C),E.success):E[0<C?"next":"prev"]},_.prototype.onButtonNavKbdClick=function(w){w=w.response;var C=this.chart;return C.oldRangeSelectorItemState!==3&&this.fakeClickEvent(C.rangeSelector.buttons[C.highlightedRangeSelectorItemIx].element),w.success},_.prototype.onAfterBtnClick=function(){var w=this.chart,C=m(w.xAxis[0]);(w=w.langFormat("accessibility.rangeSelector.clickButtonAnnouncement",{chart:w,axisRangeDescription:C}))&&this.announcer.announce(w)},_.prototype.onInputKbdMove=function(w){var C=this.chart,E=C.rangeSelector,T=C.highlightedInputRangeIx=(C.highlightedInputRangeIx||0)+w;1<T||0>T?C.accessibility&&(C.accessibility.keyboardNavigation.tabindexContainer.focus(),C.accessibility.keyboardNavigation.move(w)):E&&(w=E[T?"maxDateBox":"minDateBox"],E=E[T?"maxInput":"minInput"],w&&E&&C.setFocusToElement(w,E))},_.prototype.onInputNavInit=function(w){var C=this,E=this,T=this.chart,A=0<w?0:1,k=T.rangeSelector,X=k&&k[A?"maxDateBox":"minDateBox"];if(w=k&&k.minInput,k=k&&k.maxInput,T.highlightedInputRangeIx=A,X&&w&&k){T.setFocusToElement(X,A?k:w),this.removeInputKeydownHandler&&this.removeInputKeydownHandler(),T=function(D){(D.which||D.keyCode)===C.keyCodes.tab&&(D.preventDefault(),D.stopPropagation(),E.onInputKbdMove(D.shiftKey?-1:1))};var Z=v(w,"keydown",T),W=v(k,"keydown",T);this.removeInputKeydownHandler=function(){Z(),W()}}},_.prototype.onInputNavTerminate=function(){var w=this.chart.rangeSelector||{};w.maxInput&&w.hideInput("max"),w.minInput&&w.hideInput("min"),this.removeInputKeydownHandler&&(this.removeInputKeydownHandler(),delete this.removeInputKeydownHandler)},_.prototype.initDropdownNav=function(){var w=this,C=this.chart,E=C.rangeSelector,T=E&&E.dropdown;E&&T&&(C.setFocusToElement(E.buttonGroup,T),this.removeDropdownKeydownHandler&&this.removeDropdownKeydownHandler(),this.removeDropdownKeydownHandler=v(T,"keydown",function(A){var k=C.accessibility;(A.which||A.keyCode)===w.keyCodes.tab&&(A.preventDefault(),A.stopPropagation(),k&&(k.keyboardNavigation.tabindexContainer.focus(),k.keyboardNavigation.move(A.shiftKey?-1:1)))}))},_.prototype.getRangeSelectorButtonNavigation=function(){var w=this.chart,C=this.keyCodes,E=this;return new s(w,{keyCodeMap:[[[C.left,C.right,C.up,C.down],function(T){return E.onButtonNavKbdArrowKey(this,T)}],[[C.enter,C.space],function(){return E.onButtonNavKbdClick(this)}]],validate:function(){return!!(w.rangeSelector&&w.rangeSelector.buttons&&w.rangeSelector.buttons.length)},init:function(T){var A=w.rangeSelector;A&&A.hasVisibleDropdown?E.initDropdownNav():A&&(A=A.buttons.length-1,w.highlightRangeSelectorButton(0<T?0:A))},terminate:function(){E.removeDropdownKeydownHandler&&(E.removeDropdownKeydownHandler(),delete E.removeDropdownKeydownHandler)}})},_.prototype.getRangeSelectorInputNavigation=function(){var w=this.chart,C=this;return new s(w,{keyCodeMap:[],validate:function(){return!!(w.rangeSelector&&w.rangeSelector.inputGroup&&w.rangeSelector.inputGroup.element.style.visibility!=="hidden"&&w.options.rangeSelector.inputEnabled!==!1&&w.rangeSelector.minInput&&w.rangeSelector.maxInput)},init:function(E){C.onInputNavInit(E)},terminate:function(){C.onInputNavTerminate()}})},_.prototype.getKeyboardNavigation=function(){return[this.getRangeSelectorButtonNavigation(),this.getRangeSelectorInputNavigation()]},_.prototype.destroy=function(){this.removeDropdownKeydownHandler&&this.removeDropdownKeydownHandler(),this.removeInputKeydownHandler&&this.removeInputKeydownHandler(),this.announcer&&this.announcer.destroy()},_}(i),function(y){function _(E){var T=this.rangeSelector&&this.rangeSelector.buttons||[],A=this.highlightedRangeSelectorItemIx,k=this.rangeSelector&&this.rangeSelector.selected;return typeof A!="undefined"&&T[A]&&A!==k&&T[A].setState(this.oldRangeSelectorItemState||0),this.highlightedRangeSelectorItemIx=E,T[E]?(this.setFocusToElement(T[E].box,T[E].element),E!==k&&(this.oldRangeSelectorItemState=T[E].state,T[E].setState(1)),!0):!1}function w(){var E=this.chart.accessibility;if(E&&E.components.rangeSelector)return E.components.rangeSelector.onAfterBtnClick()}var C=[];y.compose=function(E,T){C.indexOf(E)===-1&&(C.push(E),E.prototype.highlightRangeSelectorButton=_),C.indexOf(T)===-1&&(C.push(T),v(n,"afterBtnClick",w))}}(i||(i={})),i}),r(e,"Accessibility/Components/SeriesComponent/ForcedMarkers.js",[e["Core/Utilities.js"]],function(n){var i=n.addEvent,o=n.merge,a;return function(s){function l(y){o(!0,y,{marker:{enabled:!0,states:{normal:{opacity:0}}}})}function u(y){return y.marker.states&&y.marker.states.normal&&y.marker.states.normal.opacity}function p(){this.chart.styledMode&&(this.markerGroup&&this.markerGroup[this.a11yMarkersForced?"addClass":"removeClass"]("highcharts-a11y-markers-hidden"),this._hasPointMarkers&&this.points&&this.points.length&&this.points.forEach(function(y){y.graphic&&(y.graphic[y.hasForcedA11yMarker?"addClass":"removeClass"]("highcharts-a11y-marker-hidden"),y.graphic[y.hasForcedA11yMarker===!1?"addClass":"removeClass"]("highcharts-a11y-marker-visible"))}))}function m(y){this.resetA11yMarkerOptions=o(y.options.marker||{},this.userOptions.marker||{})}function v(){var y=this.options,_=(this.options.accessibility&&this.options.accessibility.enabled)!==!1;if((_=this.chart.options.accessibility.enabled&&_)&&(_=this.chart.options.accessibility,_=this.points.length<_.series.pointDescriptionEnabledThreshold||_.series.pointDescriptionEnabledThreshold===!1),_){if(y.marker&&y.marker.enabled===!1&&(this.a11yMarkersForced=!0,l(this.options)),this._hasPointMarkers&&this.points&&this.points.length)for(y=this.points.length;y--;){_=this.points[y];var w=_.options,C=_.hasForcedA11yMarker;delete _.hasForcedA11yMarker,w.marker&&(C=C&&u(w)===0,w.marker.enabled&&!C?(o(!0,w.marker,{states:{normal:{opacity:u(w)||1}}}),_.hasForcedA11yMarker=!1):w.marker.enabled===!1&&(l(w),_.hasForcedA11yMarker=!0))}}else this.a11yMarkersForced&&(delete this.a11yMarkersForced,(y=this.resetA11yMarkerOptions)&&this.update({marker:{enabled:y.enabled,states:{normal:{opacity:y.states&&y.states.normal&&y.states.normal.opacity}}}}),delete this.resetA11yMarkerOptions)}var x=[];s.compose=function(y){x.indexOf(y)===-1&&(x.push(y),i(y,"afterSetOptions",m),i(y,"render",v),i(y,"afterRender",p))}}(a||(a={})),a}),r(e,"Accessibility/Components/SeriesComponent/SeriesKeyboardNavigation.js",[e["Core/Series/Point.js"],e["Core/Series/Series.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Globals.js"],e["Core/Utilities.js"],e["Accessibility/KeyboardNavigationHandler.js"],e["Accessibility/Utils/EventProvider.js"],e["Accessibility/Utils/ChartUtilities.js"]],function(n,i,o,a,s,l,u,p){function m(W){var D=W.index,H=W.series.points,N=H.length;if(H[D]!==W){for(;N--;)if(H[N]===W)return N}else return D}function v(W){var D=W.chart.options.accessibility.keyboardNavigation.seriesNavigation,H=W.options.accessibility||{},N=H.keyboardNavigation;return N&&N.enabled===!1||H.enabled===!1||W.options.enableMouseTracking===!1||!W.visible||D.pointNavigationEnabledThreshold&&D.pointNavigationEnabledThreshold<=W.points.length}function x(W){var D=W.series.chart.options.accessibility,H=W.options.accessibility&&W.options.accessibility.enabled===!1;return W.isNull&&D.keyboardNavigation.seriesNavigation.skipNullPoints||W.visible===!1||W.isInside===!1||H||v(W.series)}function y(W){W=W.series||[];for(var D=W.length,H=0;H<D;++H)if(!v(W[H])){e:{for(var N=W[H].points||[],j=N.length,$=0;$<j;++$)if(!x(N[$])){N=N[$];break e}N=null}if(N)return N}return null}function _(W){for(var D=W.series.length,H=!1;D--&&(W.highlightedPoint=W.series[D].points[W.series[D].points.length-1],!(H=W.series[D].highlightNextValidPoint())););return H}function w(W){return delete W.highlightedPoint,(W=y(W))?W.highlight():!1}var C=o.seriesTypes,E=a.doc,T=s.defined,A=s.fireEvent,k=p.getPointFromXY,X=p.getSeriesFromName,Z=p.scrollToPoint;return o=function(){function W(D,H){this.keyCodes=H,this.chart=D}return W.prototype.init=function(){var D=this,H=this.chart,N=this.eventProvider=new u;N.addEvent(i,"destroy",function(){return D.onSeriesDestroy(this)}),N.addEvent(H,"afterApplyDrilldown",function(){var j=y(this);j&&j.highlight(!1)}),N.addEvent(H,"drilldown",function(j){j=j.point;var $=j.series;D.lastDrilledDownPoint={x:j.x,y:j.y,seriesName:$?$.name:""}}),N.addEvent(H,"drillupall",function(){setTimeout(function(){D.onDrillupAll()},10)}),N.addEvent(n,"afterSetState",function(){var j=this.graphic&&this.graphic.element,$=E.activeElement,z=$&&$.getAttribute("class");z=z&&-1<z.indexOf("highcharts-a11y-proxy-button"),H.highlightedPoint===this&&$!==j&&!z&&j&&j.focus&&j.focus()})},W.prototype.onDrillupAll=function(){var D=this.lastDrilledDownPoint,H=this.chart,N=D&&X(H,D.seriesName),j;D&&N&&T(D.x)&&T(D.y)&&(j=k(N,D.x,D.y)),j=j||y(H),H.container&&H.container.focus(),j&&j.highlight&&j.highlight(!1)},W.prototype.getKeyboardNavigationHandler=function(){var D=this,H=this.keyCodes,N=this.chart,j=N.inverted;return new l(N,{keyCodeMap:[[j?[H.up,H.down]:[H.left,H.right],function($){return D.onKbdSideways(this,$)}],[j?[H.left,H.right]:[H.up,H.down],function($){return D.onKbdVertical(this,$)}],[[H.enter,H.space],function($,z){return($=N.highlightedPoint)&&(z.point=$,A($.series,"click",z),$.firePointEvent("click")),this.response.success}],[[H.home],function(){return w(N),this.response.success}],[[H.end],function(){return _(N),this.response.success}],[[H.pageDown,H.pageUp],function($){return N.highlightAdjacentSeries($===H.pageDown),this.response.success}]],init:function(){return D.onHandlerInit(this)},validate:function(){return!!y(N)},terminate:function(){return D.onHandlerTerminate()}})},W.prototype.onKbdSideways=function(D,H){var N=this.keyCodes;return this.attemptHighlightAdjacentPoint(D,H===N.right||H===N.down)},W.prototype.onHandlerInit=function(D){var H=this.chart;return H.options.accessibility.keyboardNavigation.seriesNavigation.rememberPointFocus&&H.highlightedPoint?H.highlightedPoint.highlight():w(H),D.response.success},W.prototype.onKbdVertical=function(D,H){var N=this.chart,j=this.keyCodes;return H=H===j.down||H===j.right,j=N.options.accessibility.keyboardNavigation.seriesNavigation,j.mode&&j.mode==="serialize"?this.attemptHighlightAdjacentPoint(D,H):(N[N.highlightedPoint&&N.highlightedPoint.series.keyboardMoveVertical?"highlightAdjacentPointVertical":"highlightAdjacentSeries"](H),D.response.success)},W.prototype.onHandlerTerminate=function(){var D=this.chart,H=D.options.accessibility.keyboardNavigation;D.tooltip&&D.tooltip.hide(0);var N=D.highlightedPoint&&D.highlightedPoint.series;N&&N.onMouseOut&&N.onMouseOut(),D.highlightedPoint&&D.highlightedPoint.onMouseOut&&D.highlightedPoint.onMouseOut(),H.seriesNavigation.rememberPointFocus||delete D.highlightedPoint},W.prototype.attemptHighlightAdjacentPoint=function(D,H){var N=this.chart,j=N.options.accessibility.keyboardNavigation.wrapAround;return N.highlightAdjacentPoint(H)||j&&(H?w(N):_(N))?D.response.success:D.response[H?"next":"prev"]},W.prototype.onSeriesDestroy=function(D){var H=this.chart;H.highlightedPoint&&H.highlightedPoint.series===D&&(delete H.highlightedPoint,H.focusElement&&H.focusElement.removeFocusBorder())},W.prototype.destroy=function(){this.eventProvider.removeAddedEvents()},W}(),function(W){function D(F){var G=this.series,q=this.highlightedPoint,ee=q&&m(q)||0,re=q&&q.series.points||[],ce=this.series&&this.series[this.series.length-1];if(ce=ce&&ce.points&&ce.points[ce.points.length-1],!G[0]||!G[0].points)return!1;if(q){if(G=G[q.series.index+(F?1:-1)],ee=re[ee+(F?1:-1)],!ee&&G&&(ee=G.points[F?0:G.points.length-1]),!ee)return!1}else ee=F?G[0].points[0]:ce;return x(ee)?(G=ee.series,v(G)?this.highlightedPoint=F?G.points[G.points.length-1]:G.points[0]:this.highlightedPoint=ee,this.highlightAdjacentPoint(F)):ee.highlight()}function H(F){var G=this.highlightedPoint,q=1/0,ee;return!T(G.plotX)||!T(G.plotY)?!1:(this.series.forEach(function(re){v(re)||re.points.forEach(function(ce){if(T(ce.plotY)&&T(ce.plotX)&&ce!==G){var fe=ce.plotY-G.plotY,J=Math.abs(ce.plotX-G.plotX);J=Math.abs(fe)*Math.abs(fe)+J*J*4,re.yAxis&&re.yAxis.reversed&&(fe*=-1),!(0>=fe&&F||0<=fe&&!F||5>J||x(ce))&&J<q&&(q=J,ee=ce)}})}),ee?ee.highlight():!1)}function N(F){var G=this.highlightedPoint,q=this.series&&this.series[this.series.length-1],ee=q&&q.points&&q.points[q.points.length-1];return this.highlightedPoint?(q=this.series[G.series.index+(F?-1:1)],!q||(ee=j(G,q,4),!ee)?!1:v(q)?(ee.highlight(),F=this.highlightAdjacentSeries(F),F||(G.highlight(),!1)):(ee.highlight(),ee.series.highlightNextValidPoint())):(q=F?this.series&&this.series[0]:q,(ee=F?q&&q.points&&q.points[0]:ee)?ee.highlight():!1)}function j(F,G,q,ee){var re=1/0,ce=G.points.length,fe=function(ve){return!(T(ve.plotX)&&T(ve.plotY))};if(!fe(F)){for(;ce--;){var J=G.points[ce];if(!fe(J)&&(J=(F.plotX-J.plotX)*(F.plotX-J.plotX)*(q||1)+(F.plotY-J.plotY)*(F.plotY-J.plotY)*(ee||1),J<re)){re=J;var oe=ce}}return T(oe)?G.points[oe]:void 0}}function $(F){F===void 0&&(F=!0);var G=this.series.chart;return!this.isNull&&F?this.onMouseOver():G.tooltip&&G.tooltip.hide(0),Z(this),this.graphic&&(G.setFocusToElement(this.graphic),!F&&G.focusElement&&G.focusElement.removeFocusBorder()),G.highlightedPoint=this,this}function z(){var F=this.chart.highlightedPoint,G=(F&&F.series)===this?m(F):0;F=this.points;var q=F.length;if(F&&q){for(var ee=G;ee<q;++ee)if(!x(F[ee]))return F[ee].highlight();for(;0<=G;--G)if(!x(F[G]))return F[G].highlight()}return!1}var O=[];W.compose=function(F,G,q){O.indexOf(F)===-1&&(O.push(F),F=F.prototype,F.highlightAdjacentPoint=D,F.highlightAdjacentPointVertical=H,F.highlightAdjacentSeries=N),O.indexOf(G)===-1&&(O.push(G),G.prototype.highlight=$),O.indexOf(q)===-1&&(O.push(q),G=q.prototype,G.keyboardMoveVertical=!0,["column","gantt","pie"].forEach(function(ee){C[ee]&&(C[ee].prototype.keyboardMoveVertical=!1)}),G.highlightNextValidPoint=z)}}(o||(o={})),o}),r(e,"Accessibility/Components/SeriesComponent/SeriesComponent.js",[e["Accessibility/AccessibilityComponent.js"],e["Accessibility/Utils/ChartUtilities.js"],e["Accessibility/Components/SeriesComponent/ForcedMarkers.js"],e["Accessibility/Components/SeriesComponent/NewDataAnnouncer.js"],e["Accessibility/Components/SeriesComponent/SeriesDescriber.js"],e["Accessibility/Components/SeriesComponent/SeriesKeyboardNavigation.js"],e["Core/Tooltip.js"]],function(n,i,o,a,s,l,u){var p=this&&this.__extends||function(){var x=function(y,_){return x=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(w,C){w.__proto__=C}||function(w,C){for(var E in C)C.hasOwnProperty(E)&&(w[E]=C[E])},x(y,_)};return function(y,_){function w(){this.constructor=y}x(y,_),y.prototype=_===null?Object.create(_):(w.prototype=_.prototype,new w)}}(),m=i.hideSeriesFromAT,v=s.describeSeries;return function(x){function y(){return x!==null&&x.apply(this,arguments)||this}return p(y,x),y.compose=function(_,w,C){a.compose(C),o.compose(C),l.compose(_,w,C)},y.prototype.init=function(){this.newDataAnnouncer=new a(this.chart),this.newDataAnnouncer.init(),this.keyboardNavigation=new l(this.chart,this.keyCodes),this.keyboardNavigation.init(),this.hideTooltipFromATWhenShown(),this.hideSeriesLabelsFromATWhenShown()},y.prototype.hideTooltipFromATWhenShown=function(){var _=this;this.addEvent(u,"refresh",function(){this.chart===_.chart&&this.label&&this.label.element&&this.label.element.setAttribute("aria-hidden",!0)})},y.prototype.hideSeriesLabelsFromATWhenShown=function(){this.addEvent(this.chart,"afterDrawSeriesLabels",function(){this.series.forEach(function(_){_.labelBySeries&&_.labelBySeries.attr("aria-hidden",!0)})})},y.prototype.onChartRender=function(){this.chart.series.forEach(function(_){(_.options.accessibility&&_.options.accessibility.enabled)!==!1&&_.visible?v(_):m(_)})},y.prototype.getKeyboardNavigation=function(){return this.keyboardNavigation.getKeyboardNavigationHandler()},y.prototype.destroy=function(){this.newDataAnnouncer.destroy(),this.keyboardNavigation.destroy()},y}(n)}),r(e,"Accessibility/Components/ZoomComponent.js",[e["Accessibility/AccessibilityComponent.js"],e["Accessibility/Utils/ChartUtilities.js"],e["Accessibility/Utils/HTMLUtilities.js"],e["Accessibility/KeyboardNavigationHandler.js"],e["Core/Utilities.js"]],function(n,i,o,a,s){var l=this&&this.__extends||function(){var x=function(y,_){return x=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(w,C){w.__proto__=C}||function(w,C){for(var E in C)C.hasOwnProperty(E)&&(w[E]=C[E])},x(y,_)};return function(y,_){function w(){this.constructor=y}x(y,_),y.prototype=_===null?Object.create(_):(w.prototype=_.prototype,new w)}}(),u=i.unhideChartElementFromAT,p=o.getFakeMouseEvent,m=s.attr,v=s.pick;return function(x){function y(){var _=x!==null&&x.apply(this,arguments)||this;return _.focusedMapNavButtonIx=-1,_}return l(y,x),y.prototype.init=function(){var _=this,w=this.chart;this.proxyProvider.addGroup("zoom","div"),["afterShowResetZoom","afterApplyDrilldown","drillupall"].forEach(function(C){_.addEvent(w,C,function(){_.updateProxyOverlays()})})},y.prototype.onChartUpdate=function(){var _=this.chart,w=this;_.mapNavigation&&_.mapNavigation.navButtons.forEach(function(C,E){u(_,C.element),w.setMapNavButtonAttrs(C.element,"accessibility.zoom.mapZoom"+(E?"Out":"In"))})},y.prototype.setMapNavButtonAttrs=function(_,w){var C=this.chart;w=C.langFormat(w,{chart:C}),m(_,{tabindex:-1,role:"button","aria-label":w})},y.prototype.onChartRender=function(){this.updateProxyOverlays()},y.prototype.updateProxyOverlays=function(){var _=this.chart;this.proxyProvider.clearGroup("zoom"),_.resetZoomButton&&this.createZoomProxyButton(_.resetZoomButton,"resetZoomProxyButton",_.langFormat("accessibility.zoom.resetZoomButton",{chart:_})),_.drillUpButton&&_.breadcrumbs&&_.breadcrumbs.list&&this.createZoomProxyButton(_.drillUpButton,"drillUpProxyButton",_.langFormat("accessibility.drillUpButton",{chart:_,buttonText:_.breadcrumbs.getButtonText(_.breadcrumbs.list[_.breadcrumbs.list.length-1])}))},y.prototype.createZoomProxyButton=function(_,w,C){this[w]=this.proxyProvider.addProxyElement("zoom",{click:_},{"aria-label":C,tabindex:-1})},y.prototype.getMapZoomNavigation=function(){var _=this.keyCodes,w=this.chart,C=this;return new a(w,{keyCodeMap:[[[_.up,_.down,_.left,_.right],function(E){return C.onMapKbdArrow(this,E)}],[[_.tab],function(E,T){return C.onMapKbdTab(this,T)}],[[_.space,_.enter],function(){return C.onMapKbdClick(this)}]],validate:function(){return!!(w.mapView&&w.mapNavigation&&w.mapNavigation.navButtons.length)},init:function(E){return C.onMapNavInit(E)}})},y.prototype.onMapKbdArrow=function(_,w){var C=this.chart,E=this.keyCodes,T=C.container,A=w===E.up||w===E.down;return w=(A?C.plotHeight:C.plotWidth)/10*(w===E.left||w===E.up?1:-1),E=10*Math.random(),C={x:T.offsetLeft+C.plotLeft+C.plotWidth/2+E,y:T.offsetTop+C.plotTop+C.plotHeight/2+E},A=A?{x:C.x,y:C.y+w}:{x:C.x+w,y:C.y},[p("mousedown",C),p("mousemove",A),p("mouseup",A)].forEach(function(k){return T.dispatchEvent(k)}),_.response.success},y.prototype.onMapKbdTab=function(_,w){var C=this.chart;_=_.response;var E=(w=w.shiftKey)&&!this.focusedMapNavButtonIx||!w&&this.focusedMapNavButtonIx;return C.mapNavigation.navButtons[this.focusedMapNavButtonIx].setState(0),E?(C.mapView&&C.mapView.zoomBy(),_[w?"prev":"next"]):(this.focusedMapNavButtonIx+=w?-1:1,w=C.mapNavigation.navButtons[this.focusedMapNavButtonIx],C.setFocusToElement(w.box,w.element),w.setState(2),_.success)},y.prototype.onMapKbdClick=function(_){return this.fakeClickEvent(this.chart.mapNavigation.navButtons[this.focusedMapNavButtonIx].element),_.response.success},y.prototype.onMapNavInit=function(_){var w=this.chart,C=w.mapNavigation.navButtons[0],E=w.mapNavigation.navButtons[1];C=0<_?C:E,w.setFocusToElement(C.box,C.element),C.setState(2),this.focusedMapNavButtonIx=0<_?0:1},y.prototype.simpleButtonNavigation=function(_,w,C){var E=this.keyCodes,T=this,A=this.chart;return new a(A,{keyCodeMap:[[[E.tab,E.up,E.down,E.left,E.right],function(k,X){return this.response[k===E.tab&&X.shiftKey||k===E.left||k===E.up?"prev":"next"]}],[[E.space,E.enter],function(){var k=C(this,A);return v(k,this.response.success)}]],validate:function(){return A[_]&&A[_].box&&T[w].buttonElement},init:function(){A.setFocusToElement(A[_].box,T[w].buttonElement)}})},y.prototype.getKeyboardNavigation=function(){return[this.simpleButtonNavigation("resetZoomButton","resetZoomProxyButton",function(_,w){w.zoomOut()}),this.simpleButtonNavigation("drillUpButton","drillUpProxyButton",function(_,w){return w.drillUp(),_.response.prev}),this.getMapZoomNavigation()]},y}(n)}),r(e,"Accessibility/HighContrastMode.js",[e["Core/Globals.js"]],function(n){var i=n.doc,o=n.isMS,a=n.win;return{isHighContrastModeActive:function(){var s=/(Edg)/.test(a.navigator.userAgent);if(a.matchMedia&&s)return a.matchMedia("(-ms-high-contrast: active)").matches;if(o&&a.getComputedStyle){s=i.createElement("div"),s.style.backgroundImage="url(".concat("data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",")"),i.body.appendChild(s);var l=(s.currentStyle||a.getComputedStyle(s)).backgroundImage;return i.body.removeChild(s),l==="none"}return a.matchMedia&&a.matchMedia("(forced-colors: active)").matches},setHighContrastTheme:function(s){s.highContrastModeActive=!0;var l=s.options.accessibility.highContrastTheme;s.update(l,!1),s.series.forEach(function(u){var p=l.plotOptions[u.type]||{};u.update({color:p.color||"windowText",colors:[p.color||"windowText"],borderColor:p.borderColor||"window"}),u.points.forEach(function(m){m.options&&m.options.color&&m.update({color:p.color||"windowText",borderColor:p.borderColor||"window"},!1)})}),s.redraw()}}}),r(e,"Accessibility/HighContrastTheme.js",[],function(){return{chart:{backgroundColor:"window"},title:{style:{color:"windowText"}},subtitle:{style:{color:"windowText"}},colorAxis:{minColor:"windowText",maxColor:"windowText",stops:[]},colors:["windowText"],xAxis:{gridLineColor:"windowText",labels:{style:{color:"windowText"}},lineColor:"windowText",minorGridLineColor:"windowText",tickColor:"windowText",title:{style:{color:"windowText"}}},yAxis:{gridLineColor:"windowText",labels:{style:{color:"windowText"}},lineColor:"windowText",minorGridLineColor:"windowText",tickColor:"windowText",title:{style:{color:"windowText"}}},tooltip:{backgroundColor:"window",borderColor:"windowText",style:{color:"windowText"}},plotOptions:{series:{lineColor:"windowText",fillColor:"window",borderColor:"windowText",edgeColor:"windowText",borderWidth:1,dataLabels:{connectorColor:"windowText",color:"windowText",style:{color:"windowText",textOutline:"none"}},marker:{lineColor:"windowText",fillColor:"windowText"}},pie:{color:"window",colors:["window"],borderColor:"windowText",borderWidth:1},boxplot:{fillColor:"window"},candlestick:{lineColor:"windowText",fillColor:"window"},errorbar:{fillColor:"window"}},legend:{backgroundColor:"window",itemStyle:{color:"windowText"},itemHoverStyle:{color:"windowText"},itemHiddenStyle:{color:"#555"},title:{style:{color:"windowText"}}},credits:{style:{color:"windowText"}},labels:{style:{color:"windowText"}},drilldown:{activeAxisLabelStyle:{color:"windowText"},activeDataLabelStyle:{color:"windowText"}},navigation:{buttonOptions:{symbolStroke:"windowText",theme:{fill:"window"}}},rangeSelector:{buttonTheme:{fill:"window",stroke:"windowText",style:{color:"windowText"},states:{hover:{fill:"window",stroke:"windowText",style:{color:"windowText"}},select:{fill:"#444",stroke:"windowText",style:{color:"windowText"}}}},inputBoxBorderColor:"windowText",inputStyle:{backgroundColor:"window",color:"windowText"},labelStyle:{color:"windowText"}},navigator:{handles:{backgroundColor:"window",borderColor:"windowText"},outlineColor:"windowText",maskFill:"transparent",series:{color:"windowText",lineColor:"windowText"},xAxis:{gridLineColor:"windowText"}},scrollbar:{barBackgroundColor:"#444",barBorderColor:"windowText",buttonArrowColor:"windowText",buttonBackgroundColor:"window",buttonBorderColor:"windowText",rifleColor:"windowText",trackBackgroundColor:"window",trackBorderColor:"windowText"}}}),r(e,"Accessibility/Options/A11yDefaults.js",[],function(){return{accessibility:{enabled:!0,screenReaderSection:{beforeChartFormat:"<{headingTagName}>{chartTitle}</{headingTagName}><div>{typeDescription}</div><div>{chartSubtitle}</div><div>{chartLongdesc}</div><div>{playAsSoundButton}</div><div>{viewTableButton}</div><div>{xAxisDescription}</div><div>{yAxisDescription}</div><div>{annotationsTitle}{annotationsList}</div>",afterChartFormat:"{endOfChartMarker}",axisRangeDateFormat:"%Y-%m-%d %H:%M:%S"},series:{descriptionFormat:"{seriesDescription}{authorDescription}{axisDescription}",describeSingleSeries:!1,pointDescriptionEnabledThreshold:200},point:{valueDescriptionFormat:"{xDescription}{separator}{value}.",describeNull:!0},landmarkVerbosity:"all",linkedDescription:'*[data-highcharts-chart="{index}"] + .highcharts-description',keyboardNavigation:{enabled:!0,focusBorder:{enabled:!0,hideBrowserFocusOutline:!0,style:{color:"#335cad",lineWidth:2,borderRadius:3},margin:2},order:["series","zoom","rangeSelector","legend","chartMenu"],wrapAround:!0,seriesNavigation:{skipNullPoints:!0,pointNavigationEnabledThreshold:!1,rememberPointFocus:!1}},announceNewData:{enabled:!1,minAnnounceInterval:5e3,interruptUser:!1}},legend:{accessibility:{enabled:!0,keyboardNavigation:{enabled:!0}}},exporting:{accessibility:{enabled:!0}}}}),r(e,"Accessibility/Options/LangDefaults.js",[],function(){return{accessibility:{defaultChartTitle:"Chart",chartContainerLabel:"{title}. Highcharts interactive chart.",svgContainerLabel:"Interactive chart",drillUpButton:"{buttonText}",credits:"Chart credits: {creditsStr}",thousandsSep:",",svgContainerTitle:"",graphicContainerLabel:"",screenReaderSection:{beforeRegionLabel:"",afterRegionLabel:"",annotations:{heading:"Chart annotations summary",descriptionSinglePoint:"{annotationText}. Related to {annotationPoint}",descriptionMultiplePoints:"{annotationText}. Related to {annotationPoint}{ Also related to, #each(additionalAnnotationPoints)}",descriptionNoPoints:"{annotationText}"},endOfChartMarker:"End of interactive chart."},sonification:{playAsSoundButtonText:"Play as sound, {chartTitle}",playAsSoundClickAnnouncement:"Play"},legend:{legendLabelNoTitle:"Toggle series visibility, {chartTitle}",legendLabel:"Chart legend: {legendTitle}",legendItem:"Show {itemName}"},zoom:{mapZoomIn:"Zoom chart",mapZoomOut:"Zoom out chart",resetZoomButton:"Reset zoom"},rangeSelector:{dropdownLabel:"{rangeTitle}",minInputLabel:"Select start date.",maxInputLabel:"Select end date.",clickButtonAnnouncement:"Viewing {axisRangeDescription}"},table:{viewAsDataTableButtonText:"View as data table, {chartTitle}",tableSummary:"Table representation of chart."},announceNewData:{newDataAnnounce:"Updated data for chart {chartTitle}",newSeriesAnnounceSingle:"New data series: {seriesDesc}",newPointAnnounceSingle:"New data point: {pointDesc}",newSeriesAnnounceMultiple:"New data series in chart {chartTitle}: {seriesDesc}",newPointAnnounceMultiple:"New data point in chart {chartTitle}: {pointDesc}"},seriesTypeDescriptions:{boxplot:"Box plot charts are typically used to display groups of statistical data. Each data point in the chart can have up to 5 values: minimum, lower quartile, median, upper quartile, and maximum.",arearange:"Arearange charts are line charts displaying a range between a lower and higher value for each point.",areasplinerange:"These charts are line charts displaying a range between a lower and higher value for each point.",bubble:"Bubble charts are scatter charts where each data point also has a size value.",columnrange:"Columnrange charts are column charts displaying a range between a lower and higher value for each point.",errorbar:"Errorbar series are used to display the variability of the data.",funnel:"Funnel charts are used to display reduction of data in stages.",pyramid:"Pyramid charts consist of a single pyramid with item heights corresponding to each point value.",waterfall:"A waterfall chart is a column chart where each column contributes towards a total end value."},chartTypes:{emptyChart:"Empty chart",mapTypeDescription:"Map of {mapTitle} with {numSeries} data series.",unknownMap:"Map of unspecified region with {numSeries} data series.",combinationChart:"Combination chart with {numSeries} data series.",defaultSingle:"Chart with {numPoints} data {#plural(numPoints, points, point)}.",defaultMultiple:"Chart with {numSeries} data series.",splineSingle:"Line chart with {numPoints} data {#plural(numPoints, points, point)}.",splineMultiple:"Line chart with {numSeries} lines.",lineSingle:"Line chart with {numPoints} data {#plural(numPoints, points, point)}.",lineMultiple:"Line chart with {numSeries} lines.",columnSingle:"Bar chart with {numPoints} {#plural(numPoints, bars, bar)}.",columnMultiple:"Bar chart with {numSeries} data series.",barSingle:"Bar chart with {numPoints} {#plural(numPoints, bars, bar)}.",barMultiple:"Bar chart with {numSeries} data series.",pieSingle:"Pie chart with {numPoints} {#plural(numPoints, slices, slice)}.",pieMultiple:"Pie chart with {numSeries} pies.",scatterSingle:"Scatter chart with {numPoints} {#plural(numPoints, points, point)}.",scatterMultiple:"Scatter chart with {numSeries} data series.",boxplotSingle:"Boxplot with {numPoints} {#plural(numPoints, boxes, box)}.",boxplotMultiple:"Boxplot with {numSeries} data series.",bubbleSingle:"Bubble chart with {numPoints} {#plural(numPoints, bubbles, bubble)}.",bubbleMultiple:"Bubble chart with {numSeries} data series."},axis:{xAxisDescriptionSingular:"The chart has 1 X axis displaying {names[0]}. {ranges[0]}",xAxisDescriptionPlural:"The chart has {numAxes} X axes displaying {#each(names, -1) }and {names[-1]}.",yAxisDescriptionSingular:"The chart has 1 Y axis displaying {names[0]}. {ranges[0]}",yAxisDescriptionPlural:"The chart has {numAxes} Y axes displaying {#each(names, -1) }and {names[-1]}.",timeRangeDays:"Data range: {range} days.",timeRangeHours:"Data range: {range} hours.",timeRangeMinutes:"Data range: {range} minutes.",timeRangeSeconds:"Data range: {range} seconds.",rangeFromTo:"Data ranges from {rangeFrom} to {rangeTo}.",rangeCategories:"Data range: {numCategories} categories."},exporting:{chartMenuLabel:"Chart menu",menuButtonLabel:"View chart menu, {chartTitle}"},series:{summary:{default:"{series.name}, series {seriesNumber} of {chart.series.length} with {series.points.length} data {#plural(series.points.length, points, point)}.",defaultCombination:"{series.name}, series {seriesNumber} of {chart.series.length} with {series.points.length} data {#plural(series.points.length, points, point)}.",line:"{series.name}, line {seriesNumber} of {chart.series.length} with {series.points.length} data {#plural(series.points.length, points, point)}.",lineCombination:"{series.name}, series {seriesNumber} of {chart.series.length}. Line with {series.points.length} data {#plural(series.points.length, points, point)}.",spline:"{series.name}, line {seriesNumber} of {chart.series.length} with {series.points.length} data {#plural(series.points.length, points, point)}.",splineCombination:"{series.name}, series {seriesNumber} of {chart.series.length}. Line with {series.points.length} data {#plural(series.points.length, points, point)}.",column:"{series.name}, bar series {seriesNumber} of {chart.series.length} with {series.points.length} {#plural(series.points.length, bars, bar)}.",columnCombination:"{series.name}, series {seriesNumber} of {chart.series.length}. Bar series with {series.points.length} {#plural(series.points.length, bars, bar)}.",bar:"{series.name}, bar series {seriesNumber} of {chart.series.length} with {series.points.length} {#plural(series.points.length, bars, bar)}.",barCombination:"{series.name}, series {seriesNumber} of {chart.series.length}. Bar series with {series.points.length} {#plural(series.points.length, bars, bar)}.",pie:"{series.name}, pie {seriesNumber} of {chart.series.length} with {series.points.length} {#plural(series.points.length, slices, slice)}.",pieCombination:"{series.name}, series {seriesNumber} of {chart.series.length}. Pie with {series.points.length} {#plural(series.points.length, slices, slice)}.",scatter:"{series.name}, scatter plot {seriesNumber} of {chart.series.length} with {series.points.length} {#plural(series.points.length, points, point)}.",scatterCombination:"{series.name}, series {seriesNumber} of {chart.series.length}, scatter plot with {series.points.length} {#plural(series.points.length, points, point)}.",boxplot:"{series.name}, boxplot {seriesNumber} of {chart.series.length} with {series.points.length} {#plural(series.points.length, boxes, box)}.",boxplotCombination:"{series.name}, series {seriesNumber} of {chart.series.length}. Boxplot with {series.points.length} {#plural(series.points.length, boxes, box)}.",bubble:"{series.name}, bubble series {seriesNumber} of {chart.series.length} with {series.points.length} {#plural(series.points.length, bubbles, bubble)}.",bubbleCombination:"{series.name}, series {seriesNumber} of {chart.series.length}. Bubble series with {series.points.length} {#plural(series.points.length, bubbles, bubble)}.",map:"{series.name}, map {seriesNumber} of {chart.series.length} with {series.points.length} {#plural(series.points.length, areas, area)}.",mapCombination:"{series.name}, series {seriesNumber} of {chart.series.length}. Map with {series.points.length} {#plural(series.points.length, areas, area)}.",mapline:"{series.name}, line {seriesNumber} of {chart.series.length} with {series.points.length} data {#plural(series.points.length, points, point)}.",maplineCombination:"{series.name}, series {seriesNumber} of {chart.series.length}. Line with {series.points.length} data {#plural(series.points.length, points, point)}.",mapbubble:"{series.name}, bubble series {seriesNumber} of {chart.series.length} with {series.points.length} {#plural(series.points.length, bubbles, bubble)}.",mapbubbleCombination:"{series.name}, series {seriesNumber} of {chart.series.length}. Bubble series with {series.points.length} {#plural(series.points.length, bubbles, bubble)}."},description:"{description}",xAxisDescription:"X axis, {name}",yAxisDescription:"Y axis, {name}",nullPointValue:"No value",pointAnnotationsDescription:"{Annotation: #each(annotations). }"}}}}),r(e,"Accessibility/Options/DeprecatedOptions.js",[e["Core/Utilities.js"]],function(n){function i(m,v,x){for(var y,_=0;_<v.length-1;++_)y=v[_],m=m[y]=p(m[y],{});m[v[v.length-1]]=x}function o(m,v,x,y){function _(E,T){return T.reduce(function(A,k){return A[k]},E)}var w=_(m.options,v),C=_(m.options,x);Object.keys(y).forEach(function(E){var T,A=w[E];typeof A!="undefined"&&(i(C,y[E],A),u(32,!1,m,(T={},T[v.join(".")+"."+E]=x.join(".")+"."+y[E].join("."),T)))})}function a(m){var v=m.options.chart,x=m.options.accessibility||{};["description","typeDescription"].forEach(function(y){var _;v[y]&&(x[y]=v[y],u(32,!1,m,(_={},_["chart.".concat(y)]="use accessibility.".concat(y),_)))})}function s(m){m.axes.forEach(function(v){(v=v.options)&&v.description&&(v.accessibility=v.accessibility||{},v.accessibility.description=v.description,u(32,!1,m,{"axis.description":"use axis.accessibility.description"}))})}function l(m){var v={description:["accessibility","description"],exposeElementToA11y:["accessibility","exposeAsGroupOnly"],pointDescriptionFormatter:["accessibility","point","descriptionFormatter"],skipKeyboardNavigation:["accessibility","keyboardNavigation","enabled"],"accessibility.pointDescriptionFormatter":["accessibility","point","descriptionFormatter"]};m.series.forEach(function(x){Object.keys(v).forEach(function(y){var _,w=x.options[y];y==="accessibility.pointDescriptionFormatter"&&(w=x.options.accessibility&&x.options.accessibility.pointDescriptionFormatter),typeof w!="undefined"&&(i(x.options,v[y],y==="skipKeyboardNavigation"?!w:w),u(32,!1,m,(_={},_["series.".concat(y)]="series."+v[y].join("."),_)))})})}var u=n.error,p=n.pick;return function(m){a(m),s(m),m.series&&l(m),o(m,["accessibility"],["accessibility"],{pointDateFormat:["point","dateFormat"],pointDateFormatter:["point","dateFormatter"],pointDescriptionFormatter:["point","descriptionFormatter"],pointDescriptionThreshold:["series","pointDescriptionEnabledThreshold"],pointNavigationThreshold:["keyboardNavigation","seriesNavigation","pointNavigationEnabledThreshold"],pointValueDecimals:["point","valueDecimals"],pointValuePrefix:["point","valuePrefix"],pointValueSuffix:["point","valueSuffix"],screenReaderSectionFormatter:["screenReaderSection","beforeChartFormatter"],describeSingleSeries:["series","describeSingleSeries"],seriesDescriptionFormatter:["series","descriptionFormatter"],onTableAnchorClick:["screenReaderSection","onViewDataTableClick"],axisRangeDateFormat:["screenReaderSection","axisRangeDateFormat"]}),o(m,["accessibility","keyboardNavigation"],["accessibility","keyboardNavigation","seriesNavigation"],{skipNullPoints:["skipNullPoints"],mode:["mode"]}),o(m,["lang","accessibility"],["lang","accessibility"],{legendItem:["legend","legendItem"],legendLabel:["legend","legendLabel"],mapZoomIn:["zoom","mapZoomIn"],mapZoomOut:["zoom","mapZoomOut"],resetZoomButton:["zoom","resetZoomButton"],screenReaderRegionLabel:["screenReaderSection","beforeRegionLabel"],rangeSelectorButton:["rangeSelector","buttonText"],rangeSelectorMaxInput:["rangeSelector","maxInputLabel"],rangeSelectorMinInput:["rangeSelector","minInputLabel"],svgContainerEnd:["screenReaderSection","endOfChartMarker"],viewAsDataTable:["table","viewAsDataTableButtonText"],tableSummary:["table","tableSummary"]})}}),r(e,"Accessibility/Accessibility.js",[e["Core/Defaults.js"],e["Core/Globals.js"],e["Core/Utilities.js"],e["Accessibility/Utils/HTMLUtilities.js"],e["Accessibility/A11yI18n.js"],e["Accessibility/Components/ContainerComponent.js"],e["Accessibility/FocusBorder.js"],e["Accessibility/Components/InfoRegionsComponent.js"],e["Accessibility/KeyboardNavigation.js"],e["Accessibility/Components/LegendComponent.js"],e["Accessibility/Components/MenuComponent.js"],e["Accessibility/Components/SeriesComponent/NewDataAnnouncer.js"],e["Accessibility/ProxyProvider.js"],e["Accessibility/Components/RangeSelectorComponent.js"],e["Accessibility/Components/SeriesComponent/SeriesComponent.js"],e["Accessibility/Components/ZoomComponent.js"],e["Accessibility/HighContrastMode.js"],e["Accessibility/HighContrastTheme.js"],e["Accessibility/Options/A11yDefaults.js"],e["Accessibility/Options/LangDefaults.js"],e["Accessibility/Options/DeprecatedOptions.js"]],function(n,i,o,a,s,l,u,p,m,v,x,y,_,w,C,E,T,A,k,X,Z){n=n.defaultOptions;var W=i.doc,D=o.addEvent,H=o.extend,N=o.fireEvent,j=o.merge,$=a.removeElement;return i=function(){function z(O){this.proxyProvider=this.keyboardNavigation=this.components=this.chart=void 0,this.init(O)}return z.prototype.init=function(O){this.chart=O,W.addEventListener&&O.renderer.isSVG?(Z(O),this.proxyProvider=new _(this.chart),this.initComponents(),this.keyboardNavigation=new m(O,this.components)):(this.zombie=!0,this.components={},O.renderTo.setAttribute("aria-hidden",!0))},z.prototype.initComponents=function(){var O=this.chart,F=this.proxyProvider,G=O.options.accessibility;this.components={container:new l,infoRegions:new p,legend:new v,chartMenu:new x,rangeSelector:new w,series:new C,zoom:new E},G.customComponents&&H(this.components,G.customComponents);var q=this.components;this.getComponentOrder().forEach(function(ee){q[ee].initBase(O,F),q[ee].init()})},z.prototype.getComponentOrder=function(){if(!this.components)return[];if(!this.components.series)return Object.keys(this.components);var O=Object.keys(this.components).filter(function(F){return F!=="series"});return["series"].concat(O)},z.prototype.update=function(){var O=this.components,F=this.chart,G=F.options.accessibility;N(F,"beforeA11yUpdate"),F.types=this.getChartTypes(),G=G.keyboardNavigation.order,this.proxyProvider.updateGroupOrder(G),this.getComponentOrder().forEach(function(q){O[q].onChartUpdate(),N(F,"afterA11yComponentUpdate",{name:q,component:O[q]})}),this.keyboardNavigation.update(G),!F.highContrastModeActive&&T.isHighContrastModeActive()&&T.setHighContrastTheme(F),N(F,"afterA11yUpdate",{accessibility:this})},z.prototype.destroy=function(){var O=this.chart||{},F=this.components;Object.keys(F).forEach(function(G){F[G].destroy(),F[G].destroyBase()}),this.proxyProvider&&this.proxyProvider.destroy(),O.announcerContainer&&$(O.announcerContainer),this.keyboardNavigation&&this.keyboardNavigation.destroy(),O.renderTo&&O.renderTo.setAttribute("aria-hidden",!0),O.focusElement&&O.focusElement.removeFocusBorder()},z.prototype.getChartTypes=function(){var O={};return this.chart.series.forEach(function(F){O[F.type]=1}),Object.keys(O)},z}(),function(z){function O(){this.accessibility&&this.accessibility.destroy()}function F(){this.a11yDirty&&this.renderTo&&(delete this.a11yDirty,this.updateA11yEnabled());var ce=this.accessibility;ce&&!ce.zombie&&(ce.proxyProvider.updateProxyElementPositions(),ce.getComponentOrder().forEach(function(fe){ce.components[fe].onChartRender()}))}function G(ce){(ce=ce.options.accessibility)&&(ce.customComponents&&(this.options.accessibility.customComponents=ce.customComponents,delete ce.customComponents),j(!0,this.options.accessibility,ce),this.accessibility&&this.accessibility.destroy&&(this.accessibility.destroy(),delete this.accessibility)),this.a11yDirty=!0}function q(){var ce=this.accessibility,fe=this.options.accessibility;fe&&fe.enabled?ce&&!ce.zombie?ce.update():(this.accessibility=ce=new z(this),!ce.zombie&&ce.update()):ce?(ce.destroy&&ce.destroy(),delete this.accessibility):this.renderTo.setAttribute("aria-hidden",!0)}function ee(){this.series.chart.accessibility&&(this.series.chart.a11yDirty=!0)}var re=[];z.i18nFormat=s.i18nFormat,z.compose=function(ce,fe,J,oe,ve,ye){m.compose(ce),y.compose(oe),v.compose(ce,fe),x.compose(ce),C.compose(ce,J,oe),s.compose(ce),u.compose(ce,ve),ye&&w.compose(ce,ye),re.indexOf(ce)===-1&&(re.push(ce),ce.prototype.updateA11yEnabled=q,D(ce,"destroy",O),D(ce,"render",F),D(ce,"update",G),["addSeries","init"].forEach(function(xe){D(ce,xe,function(){this.a11yDirty=!0})}),["afterApplyDrilldown","drillupall"].forEach(function(xe){D(ce,xe,function(){var se=this.accessibility;se&&!se.zombie&&se.update()})})),re.indexOf(J)===-1&&(re.push(J),D(J,"update",ee)),re.indexOf(oe)===-1&&(re.push(oe),["update","updatedData","remove"].forEach(function(xe){D(oe,xe,function(){this.chart.accessibility&&(this.chart.a11yDirty=!0)})}))}}(i||(i={})),j(!0,n,k,{accessibility:{highContrastTheme:A},lang:X}),i}),r(e,"masters/modules/accessibility.src.js",[e["Core/Globals.js"],e["Accessibility/Accessibility.js"],e["Accessibility/AccessibilityComponent.js"],e["Accessibility/Utils/ChartUtilities.js"],e["Accessibility/Utils/HTMLUtilities.js"],e["Accessibility/KeyboardNavigationHandler.js"],e["Accessibility/Components/SeriesComponent/SeriesDescriber.js"]],function(n,i,o,a,s,l,u){n.i18nFormat=i.i18nFormat,n.A11yChartUtilities=a,n.A11yHTMLUtilities=s,n.AccessibilityComponent=o,n.KeyboardNavigationHandler=l,n.SeriesAccessibilityDescriber=u,i.compose(n.Chart,n.Legend,n.Point,n.Series,n.SVGElement,n.RangeSelector)})})})(Gve);var pOt=Gve.exports,qve={exports:{}};(function(t){(function(e){t.exports?(e.default=e,t.exports=e):e(typeof Highcharts!="undefined"?Highcharts:void 0)})(function(e){function r(n,i,o,a){n.hasOwnProperty(i)||(n[i]=a.apply(null,o),typeof CustomEvent=="function"&&window.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:i,module:n[i]}})))}e=e?e._modules:{},r(e,"Extensions/PatternFill.js",[e["Core/Animation/AnimationUtilities.js"],e["Core/Chart/Chart.js"],e["Core/Globals.js"],e["Core/Defaults.js"],e["Core/Series/Point.js"],e["Core/Series/Series.js"],e["Core/Renderer/SVG/SVGRenderer.js"],e["Core/Utilities.js"]],function(n,i,o,a,s,l,u,p){function m(A,k){A=JSON.stringify(A);var X=A.length||0,Z=0,W=0;if(k){k=Math.max(Math.floor(X/500),1);for(var D=0;D<X;D+=k)Z+=A.charCodeAt(D);Z&=Z}for(;W<X;++W)k=A.charCodeAt(W),Z=(Z<<5)-Z+k,Z&=Z;return Z.toString(16).replace("-","1")}var v=n.animObject,x=a.getOptions;n=p.addEvent;var y=p.defined,_=p.erase,w=p.merge,C=p.pick,E=p.removeEvent;a=p.wrap;var T=o.patterns=function(){var A=[],k=x().colors;return["M 0 0 L 5 5 M 4.5 -0.5 L 5.5 0.5 M -0.5 4.5 L 0.5 5.5","M 0 5 L 5 0 M -0.5 0.5 L 0.5 -0.5 M 4.5 5.5 L 5.5 4.5","M 2 0 L 2 5 M 4 0 L 4 5","M 0 2 L 5 2 M 0 4 L 5 4","M 0 1.5 L 2.5 1.5 L 2.5 0 M 2.5 5 L 2.5 3.5 L 5 3.5"].forEach(function(X,Z){A.push({path:X,color:k[Z],width:5,height:5,patternTransform:"scale(1.4 1.4)"})}),["M 0 0 L 5 10 L 10 0","M 3 3 L 8 3 L 8 8 L 3 8 Z","M 5 5 m -4 0 a 4 4 0 1 1 8 0 a 4 4 0 1 1 -8 0","M 0 0 L 10 10 M 9 -1 L 11 1 M -1 9 L 1 11","M 0 10 L 10 0 M -1 1 L 1 -1 M 9 11 L 11 9"].forEach(function(X,Z){A.push({path:X,color:k[Z+5],width:10,height:10})}),A}();s.prototype.calculatePatternDimensions=function(A){if(!A.width||!A.height){var k=this.graphic&&(this.graphic.getBBox&&this.graphic.getBBox(!0)||this.graphic.element&&this.graphic.element.getBBox())||{},X=this.shapeArgs;if(X&&(k.width=X.width||k.width,k.height=X.height||k.height,k.x=X.x||k.x,k.y=X.y||k.y),A.image){if(!k.width||!k.height){A._width="defer",A._height="defer",k=this.series.chart.mapView&&this.series.chart.mapView.getSVGTransform().scaleY,y(k)&&0>k&&(A._inverted=!0);return}A.aspectRatio&&(k.aspectRatio=k.width/k.height,A.aspectRatio>k.aspectRatio?k.aspectWidth=k.height*A.aspectRatio:k.aspectHeight=k.width/A.aspectRatio),A._width=A.width||Math.ceil(k.aspectWidth||k.width),A._height=A.height||Math.ceil(k.aspectHeight||k.height)}A.width||(A._x=A.x||0,A._x+=k.x-Math.round(k.aspectWidth?Math.abs(k.aspectWidth-k.width)/2:0)),A.height||(A._y=A.y||0,A._y+=k.y-Math.round(k.aspectHeight?Math.abs(k.aspectHeight-k.height)/2:0))}},u.prototype.addPattern=function(A,k){k=C(k,!0);var X=v(k),Z=A.width||A._width||32,W=A.height||A._height||32,D=A.color||"#343434",H=A.id,N=this,j=function(O){N.rect(0,0,Z,W).attr({fill:O}).add(z)};if(H||(this.idCounter=this.idCounter||0,H="highcharts-pattern-"+this.idCounter+"-"+(this.chartIndex||0),++this.idCounter),this.forExport&&(H+="-export"),this.defIds=this.defIds||[],!(-1<this.defIds.indexOf(H))){this.defIds.push(H);var $={id:H,patternUnits:"userSpaceOnUse",patternContentUnits:A.patternContentUnits||"userSpaceOnUse",width:Z,height:W,x:A._x||A.x||0,y:A._y||A.y||0};A._inverted&&($.patternTransform="scale(1, -1)",A.patternTransform&&(A.patternTransform+=" scale(1, -1)")),A.patternTransform&&($.patternTransform=A.patternTransform);var z=this.createElement("pattern").attr($).add(this.defs);return z.id=H,A.path?($=p.isObject(A.path)?A.path:{d:A.path},A.backgroundColor&&j(A.backgroundColor),j={d:$.d},this.styledMode||(j.stroke=$.stroke||D,j["stroke-width"]=C($.strokeWidth,2),j.fill=$.fill||"none"),$.transform&&(j.transform=$.transform),this.createElement("path").attr(j).add(z),z.color=D):A.image&&(k?this.image(A.image,0,0,Z,W,function(){this.animate({opacity:C(A.opacity,1)},X),E(this.element,"load")}).attr({opacity:0}).add(z):this.image(A.image,0,0,Z,W).add(z)),A.image&&k||typeof A.opacity=="undefined"||[].forEach.call(z.element.childNodes,function(O){O.setAttribute("opacity",A.opacity)}),this.patternElements=this.patternElements||{},this.patternElements[H]=z}},a(l.prototype,"getColor",function(A){var k=this.options.color;k&&k.pattern&&!k.pattern.color?(delete this.options.color,A.apply(this,Array.prototype.slice.call(arguments,1)),k.pattern.color=this.color,this.color=this.options.color=k):A.apply(this,Array.prototype.slice.call(arguments,1))}),n(l,"render",function(){var A=this.chart.isResizing;(this.isDirtyData||A||!this.chart.hasRendered)&&(this.points||[]).forEach(function(k){var X=k.options&&k.options.color;X&&X.pattern&&(!A||k.shapeArgs&&k.shapeArgs.width&&k.shapeArgs.height?k.calculatePatternDimensions(X.pattern):(X.pattern._width="defer",X.pattern._height="defer"))})}),n(s,"afterInit",function(){var A=this.options.color;A&&A.pattern&&(typeof A.pattern.path=="string"&&(A.pattern.path={d:A.pattern.path}),this.color=this.options.color=w(this.series.options.color,A))}),n(u,"complexColor",function(A){var k=A.args[0],X=A.args[1];A=A.args[2];var Z=this.chartIndex||0,W=k.pattern,D="#343434";if(typeof k.patternIndex!="undefined"&&T&&(W=T[k.patternIndex]),!W)return!0;if(W.image||typeof W.path=="string"||W.path&&W.path.d){var H=A.parentNode&&A.parentNode.getAttribute("class");H=H&&-1<H.indexOf("highcharts-legend"),W._width!=="defer"&&W._height!=="defer"||s.prototype.calculatePatternDimensions.call({graphic:{element:A}},W),(H||!W.id)&&(W=w({},W),W.id="highcharts-pattern-"+Z+"-"+m(W)+m(W,!0)),this.addPattern(W,!this.forExport&&C(W.animation,this.globalAnimation,{duration:100})),D="url(".concat(this.url,"#").concat(W.id+(this.forExport?"-export":""),")")}else D=W.color||D;return A.setAttribute(X,D),k.toString=function(){return D},!1}),n(i,"endResize",function(){(this.renderer&&this.renderer.defIds||[]).filter(function(A){return A&&A.indexOf&&A.indexOf("highcharts-pattern-")===0}).length&&(this.series.forEach(function(A){A.visible&&A.points.forEach(function(k){(k=k.options&&k.options.color)&&k.pattern&&(k.pattern._width="defer",k.pattern._height="defer")})}),this.redraw(!1))}),n(i,"redraw",function(){var A={},k=this.renderer,X=(k.defIds||[]).filter(function(Z){return Z.indexOf&&Z.indexOf("highcharts-pattern-")===0});X.length&&([].forEach.call(this.renderTo.querySelectorAll('[color^="url("], [fill^="url("], [stroke^="url("]'),function(Z){(Z=Z.getAttribute("fill")||Z.getAttribute("color")||Z.getAttribute("stroke"))&&(Z=Z.replace(k.url,"").replace("url(#","").replace(")",""),A[Z]=!0)}),X.forEach(function(Z){A[Z]||(_(k.defIds,Z),k.patternElements[Z]&&(k.patternElements[Z].destroy(),delete k.patternElements[Z]))}))})}),r(e,"masters/modules/pattern-fill.src.js",[],function(){})})})(qve);var mOt=qve.exports;export{Lr as $,dkt as A,rE as B,gAt as C,$se as D,fRt as E,WIe as F,CAt as G,hkt as H,pkt as I,PRt as J,gkt as K,yZ as L,mkt as M,yIe as N,ln as O,Us as P,Sne as Q,Or as R,uRt as S,U8 as T,CRt as U,mRt as V,jAt as W,Lkt as X,Tkt as Y,VRt as Z,aQe as _,nRt as a,Ott as a$,QRt as a0,URt as a1,$x as a2,ZRt as a3,cb as a4,tkt as a5,Pkt as a6,bRt as a7,RAt as a8,bAt as a9,Xkt as aA,Ykt as aB,syt as aC,Kkt as aD,Zkt as aE,Qkt as aF,Jkt as aG,v8e as aH,xRt as aI,m8e as aJ,w_e as aK,Nr as aL,Ume as aM,yoe as aN,e2t as aO,o2t as aP,u2t as aQ,ORt as aR,LRt as aS,BRt as aT,RRt as aU,ukt as aV,nkt as aW,eOt as aX,m2t as aY,oCt as aZ,ekt as a_,pRt as aa,KAt as ab,QAt as ac,vAt as ad,xAt as ae,yAt as af,ZCe as ag,EAt as ah,Ikt as ai,SAt as aj,jP as ak,Dkt as al,wkt as am,bkt as an,ykt as ao,Fgt as ap,Hkt as aq,Wkt as ar,Hvt as as,dRt as at,vvt as au,Bkt as av,Vkt as aw,Ukt as ax,ede as ay,qkt as az,JAt as b,nIt as b$,YRt as b0,uCt as b1,mCt as b2,jRt as b3,_Ct as b4,SCt as b5,DRt as b6,NRt as b7,XRt as b8,ikt as b9,FAt as bA,zAt as bB,NAt as bC,DAt as bD,sOt as bE,dAt as bF,mAt as bG,vkt as bH,nTe as bI,PAt as bJ,_At as bK,_kt as bL,WAt as bM,km as bN,WRt as bO,VAt as bP,HAt as bQ,GAt as bR,XAt as bS,qAt as bT,aOt as bU,rkt as bV,NA as bW,tb as bX,kRt as bY,fkt as bZ,GRt as b_,lkt as ba,ckt as bb,okt as bc,akt as bd,skt as be,qRt as bf,nOt as bg,rOt as bh,aEt as bi,fEt as bj,KRt as bk,oOt as bl,iOt as bm,F1 as bn,jkt as bo,w9 as bp,kfe as bq,Fkt as br,zkt as bs,$kt as bt,e_ as bu,ATt as bv,Nkt as bw,Ymt as bx,$At as by,LAt as bz,Ji as c,kkt as c$,$Rt as c0,lIt as c1,T3 as c2,hIt as c3,yIt as c4,a8e as c5,OIt as c6,PIt as c7,hAt as c8,lAt as c9,HRt as cA,CMt as cB,IMt as cC,zRt as cD,tOt as cE,sAt as cF,UAt as cG,rMe as cH,TRt as cI,pOt as cJ,mOt as cK,LG as cL,Rxe as cM,_Rt as cN,SRt as cO,vxe as cP,YAt as cQ,_P as cR,hOt as cS,E_e as cT,wAt as cU,pAt as cV,gRt as cW,yRt as cX,vRt as cY,Okt as cZ,Ekt as c_,uAt as ca,Ckt as cb,cAt as cc,AAt as cd,hRt as ce,Rkt as cf,JRt as cg,lOt as ch,cOt as ci,ret as cj,FRt as ck,h_e as cl,b_e as cm,v_e as cn,vJe as co,Gkt as cp,fOt as cq,uOt as cr,IRt as cs,ARt as ct,zIt as cu,MRt as cv,HIt as cw,TAt as cx,Skt as cy,dOt as cz,aRt as d,sSe as d0,LSe as d1,vPe as d2,Mkt as d3,Akt as d4,HQ as d5,xkt as d6,MAt as d7,vSe as d8,IAt as d9,fAt as da,BAt as db,OAt as dc,kAt as dd,M1 as e,oze as f,eNe as g,iRt as h,sRt as i,Kt as j,aAt as k,cRt as l,tRt as m,lRt as n,eRt as o,ZAt as p,C_e as q,Y as r,vZ as s,oRt as t,zg as u,rRt as v,Dn as w,Xbe as x,wRt as y,ERt as z};