You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

915 lines
1.9 MiB

var gK=Object.defineProperty;var vK=(e,t,n)=>t in e?gK(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Ln=(e,t,n)=>(vK(e,typeof t!="symbol"?t+"":t,n),n);function xz(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const o=Object.getOwnPropertyDescriptor(r,i);o&&Object.defineProperty(e,i,o.get?o:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerpolicy&&(o.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?o.credentials="include":i.crossorigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var zl=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function VP(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var E={exports:{}},ur={};/**
* @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 Hg=Symbol.for("react.element"),yK=Symbol.for("react.portal"),xK=Symbol.for("react.fragment"),bK=Symbol.for("react.strict_mode"),_K=Symbol.for("react.profiler"),wK=Symbol.for("react.provider"),CK=Symbol.for("react.context"),SK=Symbol.for("react.forward_ref"),EK=Symbol.for("react.suspense"),PK=Symbol.for("react.memo"),TK=Symbol.for("react.lazy"),OR=Symbol.iterator;function IK(e){return e===null||typeof e!="object"?null:(e=OR&&e[OR]||e["@@iterator"],typeof e=="function"?e:null)}var bz={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_z=Object.assign,wz={};function Oh(e,t,n){this.props=e,this.context=t,this.refs=wz,this.updater=n||bz}Oh.prototype.isReactComponent={};Oh.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=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,e,t,"setState")};Oh.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Cz(){}Cz.prototype=Oh.prototype;function UP(e,t,n){this.props=e,this.context=t,this.refs=wz,this.updater=n||bz}var jP=UP.prototype=new Cz;jP.constructor=UP;_z(jP,Oh.prototype);jP.isPureReactComponent=!0;var DR=Array.isArray,Sz=Object.prototype.hasOwnProperty,HP={current:null},Ez={key:!0,ref:!0,__self:!0,__source:!0};function Pz(e,t,n){var r,i={},o=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(o=""+t.key),t)Sz.call(t,r)&&!Ez.hasOwnProperty(r)&&(i[r]=t[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(1<a){for(var u=Array(a),f=0;f<a;f++)u[f]=arguments[f+2];i.children=u}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)i[r]===void 0&&(i[r]=a[r]);return{$$typeof:Hg,type:e,key:o,ref:s,props:i,_owner:HP.current}}function kK(e,t){return{$$typeof:Hg,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function KP(e){return typeof e=="object"&&e!==null&&e.$$typeof===Hg}function MK(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var AR=/\/+/g;function Uw(e,t){return typeof e=="object"&&e!==null&&e.key!=null?MK(""+e.key):t.toString(36)}function Hx(e,t,n,r,i){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var s=!1;if(e===null)s=!0;else switch(o){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case Hg:case yK:s=!0}}if(s)return s=e,i=i(s),e=r===""?"."+Uw(s,0):r,DR(i)?(n="",e!=null&&(n=e.replace(AR,"$&/")+"/"),Hx(i,t,n,"",function(f){return f})):i!=null&&(KP(i)&&(i=kK(i,n+(!i.key||s&&s.key===i.key?"":(""+i.key).replace(AR,"$&/")+"/")+e)),t.push(i)),1;if(s=0,r=r===""?".":r+":",DR(e))for(var a=0;a<e.length;a++){o=e[a];var u=r+Uw(o,a);s+=Hx(o,t,n,u,i)}else if(u=IK(e),typeof u=="function")for(e=u.call(e),a=0;!(o=e.next()).done;)o=o.value,u=r+Uw(o,a++),s+=Hx(o,t,n,u,i);else if(o==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return s}function Ly(e,t,n){if(e==null)return e;var r=[],i=0;return Hx(e,r,"","",function(o){return t.call(n,o,i++)}),r}function RK(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Uo={current:null},Kx={transition:null},OK={ReactCurrentDispatcher:Uo,ReactCurrentBatchConfig:Kx,ReactCurrentOwner:HP};ur.Children={map:Ly,forEach:function(e,t,n){Ly(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Ly(e,function(){t++}),t},toArray:function(e){return Ly(e,function(t){return t})||[]},only:function(e){if(!KP(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};ur.Component=Oh;ur.Fragment=xK;ur.Profiler=_K;ur.PureComponent=UP;ur.StrictMode=bK;ur.Suspense=EK;ur.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=OK;ur.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=_z({},e.props),i=e.key,o=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,s=HP.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(u in t)Sz.call(t,u)&&!Ez.hasOwnProperty(u)&&(r[u]=t[u]===void 0&&a!==void 0?a[u]:t[u])}var u=arguments.length-2;if(u===1)r.children=n;else if(1<u){a=Array(u);for(var f=0;f<u;f++)a[f]=arguments[f+2];r.children=a}return{$$typeof:Hg,type:e.type,key:i,ref:o,props:r,_owner:s}};ur.createContext=function(e){return e={$$typeof:CK,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:wK,_context:e},e.Consumer=e};ur.createElement=Pz;ur.createFactory=function(e){var t=Pz.bind(null,e);return t.type=e,t};ur.createRef=function(){return{current:null}};ur.forwardRef=function(e){return{$$typeof:SK,render:e}};ur.isValidElement=KP;ur.lazy=function(e){return{$$typeof:TK,_payload:{_status:-1,_result:e},_init:RK}};ur.memo=function(e,t){return{$$typeof:PK,type:e,compare:t===void 0?null:t}};ur.startTransition=function(e){var t=Kx.transition;Kx.transition={};try{e()}finally{Kx.transition=t}};ur.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")};ur.useCallback=function(e,t){return Uo.current.useCallback(e,t)};ur.useContext=function(e){return Uo.current.useContext(e)};ur.useDebugValue=function(){};ur.useDeferredValue=function(e){return Uo.current.useDeferredValue(e)};ur.useEffect=function(e,t){return Uo.current.useEffect(e,t)};ur.useId=function(){return Uo.current.useId()};ur.useImperativeHandle=function(e,t,n){return Uo.current.useImperativeHandle(e,t,n)};ur.useInsertionEffect=function(e,t){return Uo.current.useInsertionEffect(e,t)};ur.useLayoutEffect=function(e,t){return Uo.current.useLayoutEffect(e,t)};ur.useMemo=function(e,t){return Uo.current.useMemo(e,t)};ur.useReducer=function(e,t,n){return Uo.current.useReducer(e,t,n)};ur.useRef=function(e){return Uo.current.useRef(e)};ur.useState=function(e){return Uo.current.useState(e)};ur.useSyncExternalStore=function(e,t,n){return Uo.current.useSyncExternalStore(e,t,n)};ur.useTransition=function(){return Uo.current.useTransition()};ur.version="18.2.0";(function(e){e.exports=ur})(E);const Un=VP(E.exports),P0=xz({__proto__:null,default:Un},[E.exports]);var XS={},al={exports:{}},Ra={},Tz={exports:{}},Iz={};/**
* @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(e){function t(oe,he){var Ce=oe.length;oe.push(he);e:for(;0<Ce;){var Se=Ce-1>>>1,be=oe[Se];if(0<i(be,he))oe[Se]=he,oe[Ce]=be,Ce=Se;else break e}}function n(oe){return oe.length===0?null:oe[0]}function r(oe){if(oe.length===0)return null;var he=oe[0],Ce=oe.pop();if(Ce!==he){oe[0]=Ce;e:for(var Se=0,be=oe.length,Re=be>>>1;Se<Re;){var Ie=2*(Se+1)-1,Me=oe[Ie],Ae=Ie+1,ze=oe[Ae];if(0>i(Me,Ce))Ae<be&&0>i(ze,Me)?(oe[Se]=ze,oe[Ae]=Ce,Se=Ae):(oe[Se]=Me,oe[Ie]=Ce,Se=Ie);else if(Ae<be&&0>i(ze,Ce))oe[Se]=ze,oe[Ae]=Ce,Se=Ae;else break e}}return he}function i(oe,he){var Ce=oe.sortIndex-he.sortIndex;return Ce!==0?Ce:oe.id-he.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var s=Date,a=s.now();e.unstable_now=function(){return s.now()-a}}var u=[],f=[],p=1,g=null,v=3,b=!1,_=!1,T=!1,I=typeof setTimeout=="function"?setTimeout:null,P=typeof clearTimeout=="function"?clearTimeout:null,M=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function D(oe){for(var he=n(f);he!==null;){if(he.callback===null)r(f);else if(he.startTime<=oe)r(f),he.sortIndex=he.expirationTime,t(u,he);else break;he=n(f)}}function N(oe){if(T=!1,D(oe),!_)if(n(u)!==null)_=!0,re(z);else{var he=n(f);he!==null&&se(N,he.startTime-oe)}}function z(oe,he){_=!1,T&&(T=!1,P(U),U=-1),b=!0;var Ce=v;try{for(D(he),g=n(u);g!==null&&(!(g.expirationTime>he)||oe&&!te());){var Se=g.callback;if(typeof Se=="function"){g.callback=null,v=g.priorityLevel;var be=Se(g.expirationTime<=he);he=e.unstable_now(),typeof be=="function"?g.callback=be:g===n(u)&&r(u),D(he)}else r(u);g=n(u)}if(g!==null)var Re=!0;else{var Ie=n(f);Ie!==null&&se(N,Ie.startTime-he),Re=!1}return Re}finally{g=null,v=Ce,b=!1}}var $=!1,j=null,U=-1,q=5,Y=-1;function te(){return!(e.unstable_now()-Y<q)}function Z(){if(j!==null){var oe=e.unstable_now();Y=oe;var he=!0;try{he=j(!0,oe)}finally{he?X():($=!1,j=null)}}else $=!1}var X;if(typeof M=="function")X=function(){M(Z)};else if(typeof MessageChannel<"u"){var J=new MessageChannel,ue=J.port2;J.port1.onmessage=Z,X=function(){ue.postMessage(null)}}else X=function(){I(Z,0)};function re(oe){j=oe,$||($=!0,X())}function se(oe,he){U=I(function(){oe(e.unstable_now())},he)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(oe){oe.callback=null},e.unstable_continueExecution=function(){_||b||(_=!0,re(z))},e.unstable_forceFrameRate=function(oe){0>oe||125<oe?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):q=0<oe?Math.floor(1e3/oe):5},e.unstable_getCurrentPriorityLevel=function(){return v},e.unstable_getFirstCallbackNode=function(){return n(u)},e.unstable_next=function(oe){switch(v){case 1:case 2:case 3:var he=3;break;default:he=v}var Ce=v;v=he;try{return oe()}finally{v=Ce}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(oe,he){switch(oe){case 1:case 2:case 3:case 4:case 5:break;default:oe=3}var Ce=v;v=oe;try{return he()}finally{v=Ce}},e.unstable_scheduleCallback=function(oe,he,Ce){var Se=e.unstable_now();switch(typeof Ce=="object"&&Ce!==null?(Ce=Ce.delay,Ce=typeof Ce=="number"&&0<Ce?Se+Ce:Se):Ce=Se,oe){case 1:var be=-1;break;case 2:be=250;break;case 5:be=1073741823;break;case 4:be=1e4;break;default:be=5e3}return be=Ce+be,oe={id:p++,callback:he,priorityLevel:oe,startTime:Ce,expirationTime:be,sortIndex:-1},Ce>Se?(oe.sortIndex=Ce,t(f,oe),n(u)===null&&oe===n(f)&&(T?(P(U),U=-1):T=!0,se(N,Ce-Se))):(oe.sortIndex=be,t(u,oe),_||b||(_=!0,re(z))),oe},e.unstable_shouldYield=te,e.unstable_wrapCallback=function(oe){var he=v;return function(){var Ce=v;v=he;try{return oe.apply(this,arguments)}finally{v=Ce}}}})(Iz);(function(e){e.exports=Iz})(Tz);/**
* @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 kz=E.exports,Pa=Tz.exports;function Yt(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var Mz=new Set,ng={};function Nd(e,t){ah(e,t),ah(e+"Capture",t)}function ah(e,t){for(ng[e]=t,e=0;e<t.length;e++)Mz.add(t[e])}var Kl=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),YS=Object.prototype.hasOwnProperty,DK=/^[: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]*$/,NR={},LR={};function AK(e){return YS.call(LR,e)?!0:YS.call(NR,e)?!1:DK.test(e)?LR[e]=!0:(NR[e]=!0,!1)}function NK(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function LK(e,t,n,r){if(t===null||typeof t>"u"||NK(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function jo(e,t,n,r,i,o,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=s}var mo={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){mo[e]=new jo(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];mo[t]=new jo(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){mo[e]=new jo(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){mo[e]=new jo(e,2,!1,e,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(e){mo[e]=new jo(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){mo[e]=new jo(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){mo[e]=new jo(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){mo[e]=new jo(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){mo[e]=new jo(e,5,!1,e.toLowerCase(),null,!1,!1)});var WP=/[\-:]([a-z])/g;function GP(e){return e[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(e){var t=e.replace(WP,GP);mo[t]=new jo(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(WP,GP);mo[t]=new jo(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(WP,GP);mo[t]=new jo(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){mo[e]=new jo(e,1,!1,e.toLowerCase(),null,!1,!1)});mo.xlinkHref=new jo("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){mo[e]=new jo(e,1,!1,e.toLowerCase(),null,!0,!0)});function qP(e,t,n,r){var i=mo.hasOwnProperty(t)?mo[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(LK(t,n,i,r)&&(n=null),r||i===null?AK(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type===3?!1:"":n:(t=i.attributeName,r=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var Yl=kz.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,zy=Symbol.for("react.element"),Rf=Symbol.for("react.portal"),Of=Symbol.for("react.fragment"),ZP=Symbol.for("react.strict_mode"),QS=Symbol.for("react.profiler"),Rz=Symbol.for("react.provider"),Oz=Symbol.for("react.context"),XP=Symbol.for("react.forward_ref"),JS=Symbol.for("react.suspense"),e2=Symbol.for("react.suspense_list"),YP=Symbol.for("react.memo"),Pc=Symbol.for("react.lazy"),Dz=Symbol.for("react.offscreen"),zR=Symbol.iterator;function Wp(e){return e===null||typeof e!="object"?null:(e=zR&&e[zR]||e["@@iterator"],typeof e=="function"?e:null)}var fi=Object.assign,jw;function xm(e){if(jw===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);jw=t&&t[1]||""}return`
`+jw+e}var Hw=!1;function Kw(e,t){if(!e||Hw)return"";Hw=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(f){var r=f}Reflect.construct(e,[],t)}else{try{t.call()}catch(f){r=f}e.call(t.prototype)}else{try{throw Error()}catch(f){r=f}e()}}catch(f){if(f&&r&&typeof f.stack=="string"){for(var i=f.stack.split(`
`),o=r.stack.split(`
`),s=i.length-1,a=o.length-1;1<=s&&0<=a&&i[s]!==o[a];)a--;for(;1<=s&&0<=a;s--,a--)if(i[s]!==o[a]){if(s!==1||a!==1)do if(s--,a--,0>a||i[s]!==o[a]){var u=`
`+i[s].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}while(1<=s&&0<=a);break}}}finally{Hw=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?xm(e):""}function zK(e){switch(e.tag){case 5:return xm(e.type);case 16:return xm("Lazy");case 13:return xm("Suspense");case 19:return xm("SuspenseList");case 0:case 2:case 15:return e=Kw(e.type,!1),e;case 11:return e=Kw(e.type.render,!1),e;case 1:return e=Kw(e.type,!0),e;default:return""}}function t2(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Of:return"Fragment";case Rf:return"Portal";case QS:return"Profiler";case ZP:return"StrictMode";case JS:return"Suspense";case e2:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Oz:return(e.displayName||"Context")+".Consumer";case Rz:return(e._context.displayName||"Context")+".Provider";case XP:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case YP:return t=e.displayName||null,t!==null?t:t2(e.type)||"Memo";case Pc:t=e._payload,e=e._init;try{return t2(e(t))}catch{}}return null}function FK(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return t2(t);case 8:return t===ZP?"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 t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function nu(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Az(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function $K(e){var t=Az(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(s){r=""+s,o.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Fy(e){e._valueTracker||(e._valueTracker=$K(e))}function Nz(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Az(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function T0(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function n2(e,t){var n=t.checked;return fi({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n!=null?n:e._wrapperState.initialChecked})}function FR(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=nu(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Lz(e,t){t=t.checked,t!=null&&qP(e,"checked",t,!1)}function r2(e,t){Lz(e,t);var n=nu(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?i2(e,t.type,n):t.hasOwnProperty("defaultValue")&&i2(e,t.type,nu(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function $R(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function i2(e,t,n){(t!=="number"||T0(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var bm=Array.isArray;function Gf(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+nu(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function o2(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(Yt(91));return fi({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function BR(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(Yt(92));if(bm(n)){if(1<n.length)throw Error(Yt(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:nu(n)}}function zz(e,t){var n=nu(t.value),r=nu(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function VR(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Fz(e){switch(e){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 a2(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Fz(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var $y,$z=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for($y=$y||document.createElement("div"),$y.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=$y.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function rg(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Om={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},BK=["Webkit","ms","Moz","O"];Object.keys(Om).forEach(function(e){BK.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Om[t]=Om[e]})});function Bz(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Om.hasOwnProperty(e)&&Om[e]?(""+t).trim():t+"px"}function Vz(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=Bz(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var VK=fi({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 s2(e,t){if(t){if(VK[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Yt(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Yt(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Yt(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Yt(62))}}function l2(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){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 c2=null;function QP(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var u2=null,qf=null,Zf=null;function UR(e){if(e=Gg(e)){if(typeof u2!="function")throw Error(Yt(280));var t=e.stateNode;t&&(t=a_(t),u2(e.stateNode,e.type,t))}}function Uz(e){qf?Zf?Zf.push(e):Zf=[e]:qf=e}function jz(){if(qf){var e=qf,t=Zf;if(Zf=qf=null,UR(e),t)for(e=0;e<t.length;e++)UR(t[e])}}function Hz(e,t){return e(t)}function Kz(){}var Ww=!1;function Wz(e,t,n){if(Ww)return e(t,n);Ww=!0;try{return Hz(e,t,n)}finally{Ww=!1,(qf!==null||Zf!==null)&&(Kz(),jz())}}function ig(e,t){var n=e.stateNode;if(n===null)return null;var r=a_(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(Yt(231,t,typeof n));return n}var d2=!1;if(Kl)try{var Gp={};Object.defineProperty(Gp,"passive",{get:function(){d2=!0}}),window.addEventListener("test",Gp,Gp),window.removeEventListener("test",Gp,Gp)}catch{d2=!1}function UK(e,t,n,r,i,o,s,a,u){var f=Array.prototype.slice.call(arguments,3);try{t.apply(n,f)}catch(p){this.onError(p)}}var Dm=!1,I0=null,k0=!1,f2=null,jK={onError:function(e){Dm=!0,I0=e}};function HK(e,t,n,r,i,o,s,a,u){Dm=!1,I0=null,UK.apply(jK,arguments)}function KK(e,t,n,r,i,o,s,a,u){if(HK.apply(this,arguments),Dm){if(Dm){var f=I0;Dm=!1,I0=null}else throw Error(Yt(198));k0||(k0=!0,f2=f)}}function Ld(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function Gz(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function jR(e){if(Ld(e)!==e)throw Error(Yt(188))}function WK(e){var t=e.alternate;if(!t){if(t=Ld(e),t===null)throw Error(Yt(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var o=i.alternate;if(o===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return jR(i),e;if(o===r)return jR(i),t;o=o.sibling}throw Error(Yt(188))}if(n.return!==r.return)n=i,r=o;else{for(var s=!1,a=i.child;a;){if(a===n){s=!0,n=i,r=o;break}if(a===r){s=!0,r=i,n=o;break}a=a.sibling}if(!s){for(a=o.child;a;){if(a===n){s=!0,n=o,r=i;break}if(a===r){s=!0,r=o,n=i;break}a=a.sibling}if(!s)throw Error(Yt(189))}}if(n.alternate!==r)throw Error(Yt(190))}if(n.tag!==3)throw Error(Yt(188));return n.stateNode.current===n?e:t}function qz(e){return e=WK(e),e!==null?Zz(e):null}function Zz(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Zz(e);if(t!==null)return t;e=e.sibling}return null}var Xz=Pa.unstable_scheduleCallback,HR=Pa.unstable_cancelCallback,GK=Pa.unstable_shouldYield,qK=Pa.unstable_requestPaint,wi=Pa.unstable_now,ZK=Pa.unstable_getCurrentPriorityLevel,JP=Pa.unstable_ImmediatePriority,Yz=Pa.unstable_UserBlockingPriority,M0=Pa.unstable_NormalPriority,XK=Pa.unstable_LowPriority,Qz=Pa.unstable_IdlePriority,n_=null,el=null;function YK(e){if(el&&typeof el.onCommitFiberRoot=="function")try{el.onCommitFiberRoot(n_,e,void 0,(e.current.flags&128)===128)}catch{}}var Ts=Math.clz32?Math.clz32:eW,QK=Math.log,JK=Math.LN2;function eW(e){return e>>>=0,e===0?32:31-(QK(e)/JK|0)|0}var By=64,Vy=4194304;function _m(e){switch(e&-e){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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function R0(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,s=n&268435455;if(s!==0){var a=s&~i;a!==0?r=_m(a):(o&=s,o!==0&&(r=_m(o)))}else s=n&~i,s!==0?r=_m(s):o!==0&&(r=_m(o));if(r===0)return 0;if(t!==0&&t!==r&&(t&i)===0&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if((r&4)!==0&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Ts(t),i=1<<n,r|=e[n],t&=~i;return r}function tW(e,t){switch(e){case 1:case 2:case 4:return t+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 t+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 nW(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,o=e.pendingLanes;0<o;){var s=31-Ts(o),a=1<<s,u=i[s];u===-1?((a&n)===0||(a&r)!==0)&&(i[s]=tW(a,t)):u<=t&&(e.expiredLanes|=a),o&=~a}}function h2(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Jz(){var e=By;return By<<=1,(By&4194240)===0&&(By=64),e}function Gw(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Kg(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ts(t),e[t]=n}function rW(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-Ts(n),o=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~o}}function eT(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Ts(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var Rr=0;function eF(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var tF,tT,nF,rF,iF,p2=!1,Uy=[],Uc=null,jc=null,Hc=null,og=new Map,ag=new Map,kc=[],iW="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 KR(e,t){switch(e){case"focusin":case"focusout":Uc=null;break;case"dragenter":case"dragleave":jc=null;break;case"mouseover":case"mouseout":Hc=null;break;case"pointerover":case"pointerout":og.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ag.delete(t.pointerId)}}function qp(e,t,n,r,i,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[i]},t!==null&&(t=Gg(t),t!==null&&tT(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function oW(e,t,n,r,i){switch(t){case"focusin":return Uc=qp(Uc,e,t,n,r,i),!0;case"dragenter":return jc=qp(jc,e,t,n,r,i),!0;case"mouseover":return Hc=qp(Hc,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;return og.set(o,qp(og.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,ag.set(o,qp(ag.get(o)||null,e,t,n,r,i)),!0}return!1}function oF(e){var t=sd(e.target);if(t!==null){var n=Ld(t);if(n!==null){if(t=n.tag,t===13){if(t=Gz(n),t!==null){e.blockedOn=t,iF(e.priority,function(){nF(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Wx(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=m2(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);c2=r,n.target.dispatchEvent(r),c2=null}else return t=Gg(n),t!==null&&tT(t),e.blockedOn=n,!1;t.shift()}return!0}function WR(e,t,n){Wx(e)&&n.delete(t)}function aW(){p2=!1,Uc!==null&&Wx(Uc)&&(Uc=null),jc!==null&&Wx(jc)&&(jc=null),Hc!==null&&Wx(Hc)&&(Hc=null),og.forEach(WR),ag.forEach(WR)}function Zp(e,t){e.blockedOn===t&&(e.blockedOn=null,p2||(p2=!0,Pa.unstable_scheduleCallback(Pa.unstable_NormalPriority,aW)))}function sg(e){function t(i){return Zp(i,e)}if(0<Uy.length){Zp(Uy[0],e);for(var n=1;n<Uy.length;n++){var r=Uy[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Uc!==null&&Zp(Uc,e),jc!==null&&Zp(jc,e),Hc!==null&&Zp(Hc,e),og.forEach(t),ag.forEach(t),n=0;n<kc.length;n++)r=kc[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<kc.length&&(n=kc[0],n.blockedOn===null);)oF(n),n.blockedOn===null&&kc.shift()}var Xf=Yl.ReactCurrentBatchConfig,O0=!0;function sW(e,t,n,r){var i=Rr,o=Xf.transition;Xf.transition=null;try{Rr=1,nT(e,t,n,r)}finally{Rr=i,Xf.transition=o}}function lW(e,t,n,r){var i=Rr,o=Xf.transition;Xf.transition=null;try{Rr=4,nT(e,t,n,r)}finally{Rr=i,Xf.transition=o}}function nT(e,t,n,r){if(O0){var i=m2(e,t,n,r);if(i===null)rC(e,t,r,D0,n),KR(e,r);else if(oW(i,e,t,n,r))r.stopPropagation();else if(KR(e,r),t&4&&-1<iW.indexOf(e)){for(;i!==null;){var o=Gg(i);if(o!==null&&tF(o),o=m2(e,t,n,r),o===null&&rC(e,t,r,D0,n),o===i)break;i=o}i!==null&&r.stopPropagation()}else rC(e,t,r,null,n)}}var D0=null;function m2(e,t,n,r){if(D0=null,e=QP(r),e=sd(e),e!==null)if(t=Ld(e),t===null)e=null;else if(n=t.tag,n===13){if(e=Gz(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return D0=e,null}function aF(e){switch(e){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(ZK()){case JP:return 1;case Yz:return 4;case M0:case XK:return 16;case Qz:return 536870912;default:return 16}default:return 16}}var Rc=null,rT=null,Gx=null;function sF(){if(Gx)return Gx;var e,t=rT,n=t.length,r,i="value"in Rc?Rc.value:Rc.textContent,o=i.length;for(e=0;e<n&&t[e]===i[e];e++);var s=n-e;for(r=1;r<=s&&t[n-r]===i[o-r];r++);return Gx=i.slice(e,1<r?1-r:void 0)}function qx(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function jy(){return!0}function GR(){return!1}function Oa(e){function t(n,r,i,o,s){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=o,this.target=s,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(n=e[a],this[a]=n?n(o):o[a]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?jy:GR,this.isPropagationStopped=GR,this}return fi(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=jy)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=jy)},persist:function(){},isPersistent:jy}),t}var Dh={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},iT=Oa(Dh),Wg=fi({},Dh,{view:0,detail:0}),cW=Oa(Wg),qw,Zw,Xp,r_=fi({},Wg,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:oT,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Xp&&(Xp&&e.type==="mousemove"?(qw=e.screenX-Xp.screenX,Zw=e.screenY-Xp.screenY):Zw=qw=0,Xp=e),qw)},movementY:function(e){return"movementY"in e?e.movementY:Zw}}),qR=Oa(r_),uW=fi({},r_,{dataTransfer:0}),dW=Oa(uW),fW=fi({},Wg,{relatedTarget:0}),Xw=Oa(fW),hW=fi({},Dh,{animationName:0,elapsedTime:0,pseudoElement:0}),pW=Oa(hW),mW=fi({},Dh,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),gW=Oa(mW),vW=fi({},Dh,{data:0}),ZR=Oa(vW),yW={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},xW={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"},bW={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function _W(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=bW[e])?!!t[e]:!1}function oT(){return _W}var wW=fi({},Wg,{key:function(e){if(e.key){var t=yW[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=qx(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?xW[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:oT,charCode:function(e){return e.type==="keypress"?qx(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?qx(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),CW=Oa(wW),SW=fi({},r_,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),XR=Oa(SW),EW=fi({},Wg,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:oT}),PW=Oa(EW),TW=fi({},Dh,{propertyName:0,elapsedTime:0,pseudoElement:0}),IW=Oa(TW),kW=fi({},r_,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),MW=Oa(kW),RW=[9,13,27,32],aT=Kl&&"CompositionEvent"in window,Am=null;Kl&&"documentMode"in document&&(Am=document.documentMode);var OW=Kl&&"TextEvent"in window&&!Am,lF=Kl&&(!aT||Am&&8<Am&&11>=Am),YR=String.fromCharCode(32),QR=!1;function cF(e,t){switch(e){case"keyup":return RW.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function uF(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Df=!1;function DW(e,t){switch(e){case"compositionend":return uF(t);case"keypress":return t.which!==32?null:(QR=!0,YR);case"textInput":return e=t.data,e===YR&&QR?null:e;default:return null}}function AW(e,t){if(Df)return e==="compositionend"||!aT&&cF(e,t)?(e=sF(),Gx=rT=Rc=null,Df=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return lF&&t.locale!=="ko"?null:t.data;default:return null}}var NW={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 JR(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!NW[e.type]:t==="textarea"}function dF(e,t,n,r){Uz(r),t=A0(t,"onChange"),0<t.length&&(n=new iT("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Nm=null,lg=null;function LW(e){wF(e,0)}function i_(e){var t=Lf(e);if(Nz(t))return e}function zW(e,t){if(e==="change")return t}var fF=!1;if(Kl){var Yw;if(Kl){var Qw="oninput"in document;if(!Qw){var eO=document.createElement("div");eO.setAttribute("oninput","return;"),Qw=typeof eO.oninput=="function"}Yw=Qw}else Yw=!1;fF=Yw&&(!document.documentMode||9<document.documentMode)}function tO(){Nm&&(Nm.detachEvent("onpropertychange",hF),lg=Nm=null)}function hF(e){if(e.propertyName==="value"&&i_(lg)){var t=[];dF(t,lg,e,QP(e)),Wz(LW,t)}}function FW(e,t,n){e==="focusin"?(tO(),Nm=t,lg=n,Nm.attachEvent("onpropertychange",hF)):e==="focusout"&&tO()}function $W(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return i_(lg)}function BW(e,t){if(e==="click")return i_(t)}function VW(e,t){if(e==="input"||e==="change")return i_(t)}function UW(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var ks=typeof Object.is=="function"?Object.is:UW;function cg(e,t){if(ks(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!YS.call(t,i)||!ks(e[i],t[i]))return!1}return!0}function nO(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function rO(e,t){var n=nO(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=nO(n)}}function pF(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?pF(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function mF(){for(var e=window,t=T0();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=T0(e.document)}return t}function sT(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function jW(e){var t=mF(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&pF(n.ownerDocument.documentElement,n)){if(r!==null&&sT(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=rO(n,o);var s=rO(n,r);i&&s&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var HW=Kl&&"documentMode"in document&&11>=document.documentMode,Af=null,g2=null,Lm=null,v2=!1;function iO(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;v2||Af==null||Af!==T0(r)||(r=Af,"selectionStart"in r&&sT(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Lm&&cg(Lm,r)||(Lm=r,r=A0(g2,"onSelect"),0<r.length&&(t=new iT("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Af)))}function Hy(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Nf={animationend:Hy("Animation","AnimationEnd"),animationiteration:Hy("Animation","AnimationIteration"),animationstart:Hy("Animation","AnimationStart"),transitionend:Hy("Transition","TransitionEnd")},Jw={},gF={};Kl&&(gF=document.createElement("div").style,"AnimationEvent"in window||(delete Nf.animationend.animation,delete Nf.animationiteration.animation,delete Nf.animationstart.animation),"TransitionEvent"in window||delete Nf.transitionend.transition);function o_(e){if(Jw[e])return Jw[e];if(!Nf[e])return e;var t=Nf[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in gF)return Jw[e]=t[n];return e}var vF=o_("animationend"),yF=o_("animationiteration"),xF=o_("animationstart"),bF=o_("transitionend"),_F=new Map,oO="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 lu(e,t){_F.set(e,t),Nd(t,[e])}for(var eC=0;eC<oO.length;eC++){var tC=oO[eC],KW=tC.toLowerCase(),WW=tC[0].toUpperCase()+tC.slice(1);lu(KW,"on"+WW)}lu(vF,"onAnimationEnd");lu(yF,"onAnimationIteration");lu(xF,"onAnimationStart");lu("dblclick","onDoubleClick");lu("focusin","onFocus");lu("focusout","onBlur");lu(bF,"onTransitionEnd");ah("onMouseEnter",["mouseout","mouseover"]);ah("onMouseLeave",["mouseout","mouseover"]);ah("onPointerEnter",["pointerout","pointerover"]);ah("onPointerLeave",["pointerout","pointerover"]);Nd("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Nd("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Nd("onBeforeInput",["compositionend","keypress","textInput","paste"]);Nd("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Nd("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Nd("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var wm="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(" "),GW=new Set("cancel close invalid load scroll toggle".split(" ").concat(wm));function aO(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,KK(r,t,void 0,e),e.currentTarget=null}function wF(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var s=r.length-1;0<=s;s--){var a=r[s],u=a.instance,f=a.currentTarget;if(a=a.listener,u!==o&&i.isPropagationStopped())break e;aO(i,a,f),o=u}else for(s=0;s<r.length;s++){if(a=r[s],u=a.instance,f=a.currentTarget,a=a.listener,u!==o&&i.isPropagationStopped())break e;aO(i,a,f),o=u}}}if(k0)throw e=f2,k0=!1,f2=null,e}function Qr(e,t){var n=t[w2];n===void 0&&(n=t[w2]=new Set);var r=e+"__bubble";n.has(r)||(CF(t,e,2,!1),n.add(r))}function nC(e,t,n){var r=0;t&&(r|=4),CF(n,e,r,t)}var Ky="_reactListening"+Math.random().toString(36).slice(2);function ug(e){if(!e[Ky]){e[Ky]=!0,Mz.forEach(function(n){n!=="selectionchange"&&(GW.has(n)||nC(n,!1,e),nC(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ky]||(t[Ky]=!0,nC("selectionchange",!1,t))}}function CF(e,t,n,r){switch(aF(t)){case 1:var i=sW;break;case 4:i=lW;break;default:i=nT}n=i.bind(null,t,n,e),i=void 0,!d2||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),r?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function rC(e,t,n,r,i){var o=r;if((t&1)===0&&(t&2)===0&&r!==null)e:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var a=r.stateNode.containerInfo;if(a===i||a.nodeType===8&&a.parentNode===i)break;if(s===4)for(s=r.return;s!==null;){var u=s.tag;if((u===3||u===4)&&(u=s.stateNode.containerInfo,u===i||u.nodeType===8&&u.parentNode===i))return;s=s.return}for(;a!==null;){if(s=sd(a),s===null)return;if(u=s.tag,u===5||u===6){r=o=s;continue e}a=a.parentNode}}r=r.return}Wz(function(){var f=o,p=QP(n),g=[];e:{var v=_F.get(e);if(v!==void 0){var b=iT,_=e;switch(e){case"keypress":if(qx(n)===0)break e;case"keydown":case"keyup":b=CW;break;case"focusin":_="focus",b=Xw;break;case"focusout":_="blur",b=Xw;break;case"beforeblur":case"afterblur":b=Xw;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":b=qR;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":b=dW;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":b=PW;break;case vF:case yF:case xF:b=pW;break;case bF:b=IW;break;case"scroll":b=cW;break;case"wheel":b=MW;break;case"copy":case"cut":case"paste":b=gW;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":b=XR}var T=(t&4)!==0,I=!T&&e==="scroll",P=T?v!==null?v+"Capture":null:v;T=[];for(var M=f,D;M!==null;){D=M;var N=D.stateNode;if(D.tag===5&&N!==null&&(D=N,P!==null&&(N=ig(M,P),N!=null&&T.push(dg(M,N,D)))),I)break;M=M.return}0<T.length&&(v=new b(v,_,null,n,p),g.push({event:v,listeners:T}))}}if((t&7)===0){e:{if(v=e==="mouseover"||e==="pointerover",b=e==="mouseout"||e==="pointerout",v&&n!==c2&&(_=n.relatedTarget||n.fromElement)&&(sd(_)||_[Wl]))break e;if((b||v)&&(v=p.window===p?p:(v=p.ownerDocument)?v.defaultView||v.parentWindow:window,b?(_=n.relatedTarget||n.toElement,b=f,_=_?sd(_):null,_!==null&&(I=Ld(_),_!==I||_.tag!==5&&_.tag!==6)&&(_=null)):(b=null,_=f),b!==_)){if(T=qR,N="onMouseLeave",P="onMouseEnter",M="mouse",(e==="pointerout"||e==="pointerover")&&(T=XR,N="onPointerLeave",P="onPointerEnter",M="pointer"),I=b==null?v:Lf(b),D=_==null?v:Lf(_),v=new T(N,M+"leave",b,n,p),v.target=I,v.relatedTarget=D,N=null,sd(p)===f&&(T=new T(P,M+"enter",_,n,p),T.target=D,T.relatedTarget=I,N=T),I=N,b&&_)t:{for(T=b,P=_,M=0,D=T;D;D=bf(D))M++;for(D=0,N=P;N;N=bf(N))D++;for(;0<M-D;)T=bf(T),M--;for(;0<D-M;)P=bf(P),D--;for(;M--;){if(T===P||P!==null&&T===P.alternate)break t;T=bf(T),P=bf(P)}T=null}else T=null;b!==null&&sO(g,v,b,T,!1),_!==null&&I!==null&&sO(g,I,_,T,!0)}}e:{if(v=f?Lf(f):window,b=v.nodeName&&v.nodeName.toLowerCase(),b==="select"||b==="input"&&v.type==="file")var z=zW;else if(JR(v))if(fF)z=VW;else{z=$W;var $=FW}else(b=v.nodeName)&&b.toLowerCase()==="input"&&(v.type==="checkbox"||v.type==="radio")&&(z=BW);if(z&&(z=z(e,f))){dF(g,z,n,p);break e}$&&$(e,v,f),e==="focusout"&&($=v._wrapperState)&&$.controlled&&v.type==="number"&&i2(v,"number",v.value)}switch($=f?Lf(f):window,e){case"focusin":(JR($)||$.contentEditable==="true")&&(Af=$,g2=f,Lm=null);break;case"focusout":Lm=g2=Af=null;break;case"mousedown":v2=!0;break;case"contextmenu":case"mouseup":case"dragend":v2=!1,iO(g,n,p);break;case"selectionchange":if(HW)break;case"keydown":case"keyup":iO(g,n,p)}var j;if(aT)e:{switch(e){case"compositionstart":var U="onCompositionStart";break e;case"compositionend":U="onCompositionEnd";break e;case"compositionupdate":U="onCompositionUpdate";break e}U=void 0}else Df?cF(e,n)&&(U="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(U="onCompositionStart");U&&(lF&&n.locale!=="ko"&&(Df||U!=="onCompositionStart"?U==="onCompositionEnd"&&Df&&(j=sF()):(Rc=p,rT="value"in Rc?Rc.value:Rc.textContent,Df=!0)),$=A0(f,U),0<$.length&&(U=new ZR(U,e,null,n,p),g.push({event:U,listeners:$}),j?U.data=j:(j=uF(n),j!==null&&(U.data=j)))),(j=OW?DW(e,n):AW(e,n))&&(f=A0(f,"onBeforeInput"),0<f.length&&(p=new ZR("onBeforeInput","beforeinput",null,n,p),g.push({event:p,listeners:f}),p.data=j))}wF(g,t)})}function dg(e,t,n){return{instance:e,listener:t,currentTarget:n}}function A0(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,o=i.stateNode;i.tag===5&&o!==null&&(i=o,o=ig(e,n),o!=null&&r.unshift(dg(e,o,i)),o=ig(e,t),o!=null&&r.push(dg(e,o,i))),e=e.return}return r}function bf(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function sO(e,t,n,r,i){for(var o=t._reactName,s=[];n!==null&&n!==r;){var a=n,u=a.alternate,f=a.stateNode;if(u!==null&&u===r)break;a.tag===5&&f!==null&&(a=f,i?(u=ig(n,o),u!=null&&s.unshift(dg(n,u,a))):i||(u=ig(n,o),u!=null&&s.push(dg(n,u,a)))),n=n.return}s.length!==0&&e.push({event:t,listeners:s})}var qW=/\r\n?/g,ZW=/\u0000|\uFFFD/g;function lO(e){return(typeof e=="string"?e:""+e).replace(qW,`
`).replace(ZW,"")}function Wy(e,t,n){if(t=lO(t),lO(e)!==t&&n)throw Error(Yt(425))}function N0(){}var y2=null,x2=null;function b2(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var _2=typeof setTimeout=="function"?setTimeout:void 0,XW=typeof clearTimeout=="function"?clearTimeout:void 0,cO=typeof Promise=="function"?Promise:void 0,YW=typeof queueMicrotask=="function"?queueMicrotask:typeof cO<"u"?function(e){return cO.resolve(null).then(e).catch(QW)}:_2;function QW(e){setTimeout(function(){throw e})}function iC(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){e.removeChild(i),sg(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);sg(t)}function Kc(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function uO(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Ah=Math.random().toString(36).slice(2),Xs="__reactFiber$"+Ah,fg="__reactProps$"+Ah,Wl="__reactContainer$"+Ah,w2="__reactEvents$"+Ah,JW="__reactListeners$"+Ah,eG="__reactHandles$"+Ah;function sd(e){var t=e[Xs];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Wl]||n[Xs]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=uO(e);e!==null;){if(n=e[Xs])return n;e=uO(e)}return t}e=n,n=e.parentNode}return null}function Gg(e){return e=e[Xs]||e[Wl],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Lf(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(Yt(33))}function a_(e){return e[fg]||null}var C2=[],zf=-1;function cu(e){return{current:e}}function ei(e){0>zf||(e.current=C2[zf],C2[zf]=null,zf--)}function Xr(e,t){zf++,C2[zf]=e.current,e.current=t}var ru={},Eo=cu(ru),ta=cu(!1),wd=ru;function sh(e,t){var n=e.type.contextTypes;if(!n)return ru;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function na(e){return e=e.childContextTypes,e!=null}function L0(){ei(ta),ei(Eo)}function dO(e,t,n){if(Eo.current!==ru)throw Error(Yt(168));Xr(Eo,t),Xr(ta,n)}function SF(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(Yt(108,FK(e)||"Unknown",i));return fi({},n,r)}function z0(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ru,wd=Eo.current,Xr(Eo,e),Xr(ta,ta.current),!0}function fO(e,t,n){var r=e.stateNode;if(!r)throw Error(Yt(169));n?(e=SF(e,t,wd),r.__reactInternalMemoizedMergedChildContext=e,ei(ta),ei(Eo),Xr(Eo,e)):ei(ta),Xr(ta,n)}var Ol=null,s_=!1,oC=!1;function EF(e){Ol===null?Ol=[e]:Ol.push(e)}function tG(e){s_=!0,EF(e)}function uu(){if(!oC&&Ol!==null){oC=!0;var e=0,t=Rr;try{var n=Ol;for(Rr=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Ol=null,s_=!1}catch(i){throw Ol!==null&&(Ol=Ol.slice(e+1)),Xz(JP,uu),i}finally{Rr=t,oC=!1}}return null}var Ff=[],$f=0,F0=null,$0=0,qa=[],Za=0,Cd=null,Fl=1,$l="";function Zu(e,t){Ff[$f++]=$0,Ff[$f++]=F0,F0=e,$0=t}function PF(e,t,n){qa[Za++]=Fl,qa[Za++]=$l,qa[Za++]=Cd,Cd=e;var r=Fl;e=$l;var i=32-Ts(r)-1;r&=~(1<<i),n+=1;var o=32-Ts(t)+i;if(30<o){var s=i-i%5;o=(r&(1<<s)-1).toString(32),r>>=s,i-=s,Fl=1<<32-Ts(t)+i|n<<i|r,$l=o+e}else Fl=1<<o|n<<i|r,$l=e}function lT(e){e.return!==null&&(Zu(e,1),PF(e,1,0))}function cT(e){for(;e===F0;)F0=Ff[--$f],Ff[$f]=null,$0=Ff[--$f],Ff[$f]=null;for(;e===Cd;)Cd=qa[--Za],qa[Za]=null,$l=qa[--Za],qa[Za]=null,Fl=qa[--Za],qa[Za]=null}var Ca=null,ya=null,oi=!1,Ss=null;function TF(e,t){var n=Qa(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function hO(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Ca=e,ya=Kc(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Ca=e,ya=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Cd!==null?{id:Fl,overflow:$l}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Qa(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Ca=e,ya=null,!0):!1;default:return!1}}function S2(e){return(e.mode&1)!==0&&(e.flags&128)===0}function E2(e){if(oi){var t=ya;if(t){var n=t;if(!hO(e,t)){if(S2(e))throw Error(Yt(418));t=Kc(n.nextSibling);var r=Ca;t&&hO(e,t)?TF(r,n):(e.flags=e.flags&-4097|2,oi=!1,Ca=e)}}else{if(S2(e))throw Error(Yt(418));e.flags=e.flags&-4097|2,oi=!1,Ca=e}}}function pO(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Ca=e}function Gy(e){if(e!==Ca)return!1;if(!oi)return pO(e),oi=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!b2(e.type,e.memoizedProps)),t&&(t=ya)){if(S2(e))throw IF(),Error(Yt(418));for(;t;)TF(e,t),t=Kc(t.nextSibling)}if(pO(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(Yt(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){ya=Kc(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}ya=null}}else ya=Ca?Kc(e.stateNode.nextSibling):null;return!0}function IF(){for(var e=ya;e;)e=Kc(e.nextSibling)}function lh(){ya=Ca=null,oi=!1}function uT(e){Ss===null?Ss=[e]:Ss.push(e)}var nG=Yl.ReactCurrentBatchConfig;function _s(e,t){if(e&&e.defaultProps){t=fi({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}var B0=cu(null),V0=null,Bf=null,dT=null;function fT(){dT=Bf=V0=null}function hT(e){var t=B0.current;ei(B0),e._currentValue=t}function P2(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Yf(e,t){V0=e,dT=Bf=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(ea=!0),e.firstContext=null)}function is(e){var t=e._currentValue;if(dT!==e)if(e={context:e,memoizedValue:t,next:null},Bf===null){if(V0===null)throw Error(Yt(308));Bf=e,V0.dependencies={lanes:0,firstContext:e}}else Bf=Bf.next=e;return t}var ld=null;function pT(e){ld===null?ld=[e]:ld.push(e)}function kF(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,pT(t)):(n.next=i.next,i.next=n),t.interleaved=n,Gl(e,r)}function Gl(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Tc=!1;function mT(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function MF(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Vl(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Wc(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(xr&2)!==0){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,Gl(e,n)}return i=r.interleaved,i===null?(t.next=t,pT(r)):(t.next=i.next,i.next=t),r.interleaved=t,Gl(e,n)}function Zx(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,eT(e,n)}}function mO(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?i=o=s:o=o.next=s,n=n.next}while(n!==null);o===null?i=o=t:o=o.next=t}else i=o=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function U0(e,t,n,r){var i=e.updateQueue;Tc=!1;var o=i.firstBaseUpdate,s=i.lastBaseUpdate,a=i.shared.pending;if(a!==null){i.shared.pending=null;var u=a,f=u.next;u.next=null,s===null?o=f:s.next=f,s=u;var p=e.alternate;p!==null&&(p=p.updateQueue,a=p.lastBaseUpdate,a!==s&&(a===null?p.firstBaseUpdate=f:a.next=f,p.lastBaseUpdate=u))}if(o!==null){var g=i.baseState;s=0,p=f=u=null,a=o;do{var v=a.lane,b=a.eventTime;if((r&v)===v){p!==null&&(p=p.next={eventTime:b,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var _=e,T=a;switch(v=t,b=n,T.tag){case 1:if(_=T.payload,typeof _=="function"){g=_.call(b,g,v);break e}g=_;break e;case 3:_.flags=_.flags&-65537|128;case 0:if(_=T.payload,v=typeof _=="function"?_.call(b,g,v):_,v==null)break e;g=fi({},g,v);break e;case 2:Tc=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,v=i.effects,v===null?i.effects=[a]:v.push(a))}else b={eventTime:b,lane:v,tag:a.tag,payload:a.payload,callback:a.callback,next:null},p===null?(f=p=b,u=g):p=p.next=b,s|=v;if(a=a.next,a===null){if(a=i.shared.pending,a===null)break;v=a,a=v.next,v.next=null,i.lastBaseUpdate=v,i.shared.pending=null}}while(1);if(p===null&&(u=g),i.baseState=u,i.firstBaseUpdate=f,i.lastBaseUpdate=p,t=i.shared.interleaved,t!==null){i=t;do s|=i.lane,i=i.next;while(i!==t)}else o===null&&(i.shared.lanes=0);Ed|=s,e.lanes=s,e.memoizedState=g}}function gO(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(Yt(191,i));i.call(r)}}}var RF=new kz.Component().refs;function T2(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:fi({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var l_={isMounted:function(e){return(e=e._reactInternals)?Ld(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Vo(),i=qc(e),o=Vl(r,i);o.payload=t,n!=null&&(o.callback=n),t=Wc(e,o,i),t!==null&&(Is(t,e,i,r),Zx(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Vo(),i=qc(e),o=Vl(r,i);o.tag=1,o.payload=t,n!=null&&(o.callback=n),t=Wc(e,o,i),t!==null&&(Is(t,e,i,r),Zx(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Vo(),r=qc(e),i=Vl(n,r);i.tag=2,t!=null&&(i.callback=t),t=Wc(e,i,r),t!==null&&(Is(t,e,r,n),Zx(t,e,r))}};function vO(e,t,n,r,i,o,s){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,o,s):t.prototype&&t.prototype.isPureReactComponent?!cg(n,r)||!cg(i,o):!0}function OF(e,t,n){var r=!1,i=ru,o=t.contextType;return typeof o=="object"&&o!==null?o=is(o):(i=na(t)?wd:Eo.current,r=t.contextTypes,o=(r=r!=null)?sh(e,i):ru),t=new t(n,o),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=l_,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function yO(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&l_.enqueueReplaceState(t,t.state,null)}function I2(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs=RF,mT(e);var o=t.contextType;typeof o=="object"&&o!==null?i.context=is(o):(o=na(t)?wd:Eo.current,i.context=sh(e,o)),i.state=e.memoizedState,o=t.getDerivedStateFromProps,typeof o=="function"&&(T2(e,t,o,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&l_.enqueueReplaceState(i,i.state,null),U0(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function Yp(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(Yt(309));var r=n.stateNode}if(!r)throw Error(Yt(147,e));var i=r,o=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===o?t.ref:(t=function(s){var a=i.refs;a===RF&&(a=i.refs={}),s===null?delete a[o]:a[o]=s},t._stringRef=o,t)}if(typeof e!="string")throw Error(Yt(284));if(!n._owner)throw Error(Yt(290,e))}return e}function qy(e,t){throw e=Object.prototype.toString.call(t),Error(Yt(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function xO(e){var t=e._init;return t(e._payload)}function DF(e){function t(P,M){if(e){var D=P.deletions;D===null?(P.deletions=[M],P.flags|=16):D.push(M)}}function n(P,M){if(!e)return null;for(;M!==null;)t(P,M),M=M.sibling;return null}function r(P,M){for(P=new Map;M!==null;)M.key!==null?P.set(M.key,M):P.set(M.index,M),M=M.sibling;return P}function i(P,M){return P=Zc(P,M),P.index=0,P.sibling=null,P}function o(P,M,D){return P.index=D,e?(D=P.alternate,D!==null?(D=D.index,D<M?(P.flags|=2,M):D):(P.flags|=2,M)):(P.flags|=1048576,M)}function s(P){return e&&P.alternate===null&&(P.flags|=2),P}function a(P,M,D,N){return M===null||M.tag!==6?(M=fC(D,P.mode,N),M.return=P,M):(M=i(M,D),M.return=P,M)}function u(P,M,D,N){var z=D.type;return z===Of?p(P,M,D.props.children,N,D.key):M!==null&&(M.elementType===z||typeof z=="object"&&z!==null&&z.$$typeof===Pc&&xO(z)===M.type)?(N=i(M,D.props),N.ref=Yp(P,M,D),N.return=P,N):(N=t0(D.type,D.key,D.props,null,P.mode,N),N.ref=Yp(P,M,D),N.return=P,N)}function f(P,M,D,N){return M===null||M.tag!==4||M.stateNode.containerInfo!==D.containerInfo||M.stateNode.implementation!==D.implementation?(M=hC(D,P.mode,N),M.return=P,M):(M=i(M,D.children||[]),M.return=P,M)}function p(P,M,D,N,z){return M===null||M.tag!==7?(M=vd(D,P.mode,N,z),M.return=P,M):(M=i(M,D),M.return=P,M)}function g(P,M,D){if(typeof M=="string"&&M!==""||typeof M=="number")return M=fC(""+M,P.mode,D),M.return=P,M;if(typeof M=="object"&&M!==null){switch(M.$$typeof){case zy:return D=t0(M.type,M.key,M.props,null,P.mode,D),D.ref=Yp(P,null,M),D.return=P,D;case Rf:return M=hC(M,P.mode,D),M.return=P,M;case Pc:var N=M._init;return g(P,N(M._payload),D)}if(bm(M)||Wp(M))return M=vd(M,P.mode,D,null),M.return=P,M;qy(P,M)}return null}function v(P,M,D,N){var z=M!==null?M.key:null;if(typeof D=="string"&&D!==""||typeof D=="number")return z!==null?null:a(P,M,""+D,N);if(typeof D=="object"&&D!==null){switch(D.$$typeof){case zy:return D.key===z?u(P,M,D,N):null;case Rf:return D.key===z?f(P,M,D,N):null;case Pc:return z=D._init,v(P,M,z(D._payload),N)}if(bm(D)||Wp(D))return z!==null?null:p(P,M,D,N,null);qy(P,D)}return null}function b(P,M,D,N,z){if(typeof N=="string"&&N!==""||typeof N=="number")return P=P.get(D)||null,a(M,P,""+N,z);if(typeof N=="object"&&N!==null){switch(N.$$typeof){case zy:return P=P.get(N.key===null?D:N.key)||null,u(M,P,N,z);case Rf:return P=P.get(N.key===null?D:N.key)||null,f(M,P,N,z);case Pc:var $=N._init;return b(P,M,D,$(N._payload),z)}if(bm(N)||Wp(N))return P=P.get(D)||null,p(M,P,N,z,null);qy(M,N)}return null}function _(P,M,D,N){for(var z=null,$=null,j=M,U=M=0,q=null;j!==null&&U<D.length;U++){j.index>U?(q=j,j=null):q=j.sibling;var Y=v(P,j,D[U],N);if(Y===null){j===null&&(j=q);break}e&&j&&Y.alternate===null&&t(P,j),M=o(Y,M,U),$===null?z=Y:$.sibling=Y,$=Y,j=q}if(U===D.length)return n(P,j),oi&&Zu(P,U),z;if(j===null){for(;U<D.length;U++)j=g(P,D[U],N),j!==null&&(M=o(j,M,U),$===null?z=j:$.sibling=j,$=j);return oi&&Zu(P,U),z}for(j=r(P,j);U<D.length;U++)q=b(j,P,U,D[U],N),q!==null&&(e&&q.alternate!==null&&j.delete(q.key===null?U:q.key),M=o(q,M,U),$===null?z=q:$.sibling=q,$=q);return e&&j.forEach(function(te){return t(P,te)}),oi&&Zu(P,U),z}function T(P,M,D,N){var z=Wp(D);if(typeof z!="function")throw Error(Yt(150));if(D=z.call(D),D==null)throw Error(Yt(151));for(var $=z=null,j=M,U=M=0,q=null,Y=D.next();j!==null&&!Y.done;U++,Y=D.next()){j.index>U?(q=j,j=null):q=j.sibling;var te=v(P,j,Y.value,N);if(te===null){j===null&&(j=q);break}e&&j&&te.alternate===null&&t(P,j),M=o(te,M,U),$===null?z=te:$.sibling=te,$=te,j=q}if(Y.done)return n(P,j),oi&&Zu(P,U),z;if(j===null){for(;!Y.done;U++,Y=D.next())Y=g(P,Y.value,N),Y!==null&&(M=o(Y,M,U),$===null?z=Y:$.sibling=Y,$=Y);return oi&&Zu(P,U),z}for(j=r(P,j);!Y.done;U++,Y=D.next())Y=b(j,P,U,Y.value,N),Y!==null&&(e&&Y.alternate!==null&&j.delete(Y.key===null?U:Y.key),M=o(Y,M,U),$===null?z=Y:$.sibling=Y,$=Y);return e&&j.forEach(function(Z){return t(P,Z)}),oi&&Zu(P,U),z}function I(P,M,D,N){if(typeof D=="object"&&D!==null&&D.type===Of&&D.key===null&&(D=D.props.children),typeof D=="object"&&D!==null){switch(D.$$typeof){case zy:e:{for(var z=D.key,$=M;$!==null;){if($.key===z){if(z=D.type,z===Of){if($.tag===7){n(P,$.sibling),M=i($,D.props.children),M.return=P,P=M;break e}}else if($.elementType===z||typeof z=="object"&&z!==null&&z.$$typeof===Pc&&xO(z)===$.type){n(P,$.sibling),M=i($,D.props),M.ref=Yp(P,$,D),M.return=P,P=M;break e}n(P,$);break}else t(P,$);$=$.sibling}D.type===Of?(M=vd(D.props.children,P.mode,N,D.key),M.return=P,P=M):(N=t0(D.type,D.key,D.props,null,P.mode,N),N.ref=Yp(P,M,D),N.return=P,P=N)}return s(P);case Rf:e:{for($=D.key;M!==null;){if(M.key===$)if(M.tag===4&&M.stateNode.containerInfo===D.containerInfo&&M.stateNode.implementation===D.implementation){n(P,M.sibling),M=i(M,D.children||[]),M.return=P,P=M;break e}else{n(P,M);break}else t(P,M);M=M.sibling}M=hC(D,P.mode,N),M.return=P,P=M}return s(P);case Pc:return $=D._init,I(P,M,$(D._payload),N)}if(bm(D))return _(P,M,D,N);if(Wp(D))return T(P,M,D,N);qy(P,D)}return typeof D=="string"&&D!==""||typeof D=="number"?(D=""+D,M!==null&&M.tag===6?(n(P,M.sibling),M=i(M,D),M.return=P,P=M):(n(P,M),M=fC(D,P.mode,N),M.return=P,P=M),s(P)):n(P,M)}return I}var ch=DF(!0),AF=DF(!1),qg={},tl=cu(qg),hg=cu(qg),pg=cu(qg);function cd(e){if(e===qg)throw Error(Yt(174));return e}function gT(e,t){switch(Xr(pg,t),Xr(hg,e),Xr(tl,qg),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:a2(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=a2(t,e)}ei(tl),Xr(tl,t)}function uh(){ei(tl),ei(hg),ei(pg)}function NF(e){cd(pg.current);var t=cd(tl.current),n=a2(t,e.type);t!==n&&(Xr(hg,e),Xr(tl,n))}function vT(e){hg.current===e&&(ei(tl),ei(hg))}var ui=cu(0);function j0(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var aC=[];function yT(){for(var e=0;e<aC.length;e++)aC[e]._workInProgressVersionPrimary=null;aC.length=0}var Xx=Yl.ReactCurrentDispatcher,sC=Yl.ReactCurrentBatchConfig,Sd=0,di=null,Bi=null,eo=null,H0=!1,zm=!1,mg=0,rG=0;function _o(){throw Error(Yt(321))}function xT(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!ks(e[n],t[n]))return!1;return!0}function bT(e,t,n,r,i,o){if(Sd=o,di=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Xx.current=e===null||e.memoizedState===null?sG:lG,e=n(r,i),zm){o=0;do{if(zm=!1,mg=0,25<=o)throw Error(Yt(301));o+=1,eo=Bi=null,t.updateQueue=null,Xx.current=cG,e=n(r,i)}while(zm)}if(Xx.current=K0,t=Bi!==null&&Bi.next!==null,Sd=0,eo=Bi=di=null,H0=!1,t)throw Error(Yt(300));return e}function _T(){var e=mg!==0;return mg=0,e}function Gs(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return eo===null?di.memoizedState=eo=e:eo=eo.next=e,eo}function os(){if(Bi===null){var e=di.alternate;e=e!==null?e.memoizedState:null}else e=Bi.next;var t=eo===null?di.memoizedState:eo.next;if(t!==null)eo=t,Bi=e;else{if(e===null)throw Error(Yt(310));Bi=e,e={memoizedState:Bi.memoizedState,baseState:Bi.baseState,baseQueue:Bi.baseQueue,queue:Bi.queue,next:null},eo===null?di.memoizedState=eo=e:eo=eo.next=e}return eo}function gg(e,t){return typeof t=="function"?t(e):t}function lC(e){var t=os(),n=t.queue;if(n===null)throw Error(Yt(311));n.lastRenderedReducer=e;var r=Bi,i=r.baseQueue,o=n.pending;if(o!==null){if(i!==null){var s=i.next;i.next=o.next,o.next=s}r.baseQueue=i=o,n.pending=null}if(i!==null){o=i.next,r=r.baseState;var a=s=null,u=null,f=o;do{var p=f.lane;if((Sd&p)===p)u!==null&&(u=u.next={lane:0,action:f.action,hasEagerState:f.hasEagerState,eagerState:f.eagerState,next:null}),r=f.hasEagerState?f.eagerState:e(r,f.action);else{var g={lane:p,action:f.action,hasEagerState:f.hasEagerState,eagerState:f.eagerState,next:null};u===null?(a=u=g,s=r):u=u.next=g,di.lanes|=p,Ed|=p}f=f.next}while(f!==null&&f!==o);u===null?s=r:u.next=a,ks(r,t.memoizedState)||(ea=!0),t.memoizedState=r,t.baseState=s,t.baseQueue=u,n.lastRenderedState=r}if(e=n.interleaved,e!==null){i=e;do o=i.lane,di.lanes|=o,Ed|=o,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function cC(e){var t=os(),n=t.queue;if(n===null)throw Error(Yt(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(i!==null){n.pending=null;var s=i=i.next;do o=e(o,s.action),s=s.next;while(s!==i);ks(o,t.memoizedState)||(ea=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function LF(){}function zF(e,t){var n=di,r=os(),i=t(),o=!ks(r.memoizedState,i);if(o&&(r.memoizedState=i,ea=!0),r=r.queue,wT(BF.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||eo!==null&&eo.memoizedState.tag&1){if(n.flags|=2048,vg(9,$F.bind(null,n,r,i,t),void 0,null),no===null)throw Error(Yt(349));(Sd&30)!==0||FF(n,t,i)}return i}function FF(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=di.updateQueue,t===null?(t={lastEffect:null,stores:null},di.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function $F(e,t,n,r){t.value=n,t.getSnapshot=r,VF(t)&&UF(e)}function BF(e,t,n){return n(function(){VF(t)&&UF(e)})}function VF(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!ks(e,n)}catch{return!0}}function UF(e){var t=Gl(e,1);t!==null&&Is(t,e,1,-1)}function bO(e){var t=Gs();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:gg,lastRenderedState:e},t.queue=e,e=e.dispatch=aG.bind(null,di,e),[t.memoizedState,e]}function vg(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=di.updateQueue,t===null?(t={lastEffect:null,stores:null},di.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function jF(){return os().memoizedState}function Yx(e,t,n,r){var i=Gs();di.flags|=e,i.memoizedState=vg(1|t,n,void 0,r===void 0?null:r)}function c_(e,t,n,r){var i=os();r=r===void 0?null:r;var o=void 0;if(Bi!==null){var s=Bi.memoizedState;if(o=s.destroy,r!==null&&xT(r,s.deps)){i.memoizedState=vg(t,n,o,r);return}}di.flags|=e,i.memoizedState=vg(1|t,n,o,r)}function _O(e,t){return Yx(8390656,8,e,t)}function wT(e,t){return c_(2048,8,e,t)}function HF(e,t){return c_(4,2,e,t)}function KF(e,t){return c_(4,4,e,t)}function WF(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function GF(e,t,n){return n=n!=null?n.concat([e]):null,c_(4,4,WF.bind(null,t,e),n)}function CT(){}function qF(e,t){var n=os();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&xT(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function ZF(e,t){var n=os();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&xT(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function XF(e,t,n){return(Sd&21)===0?(e.baseState&&(e.baseState=!1,ea=!0),e.memoizedState=n):(ks(n,t)||(n=Jz(),di.lanes|=n,Ed|=n,e.baseState=!0),t)}function iG(e,t){var n=Rr;Rr=n!==0&&4>n?n:4,e(!0);var r=sC.transition;sC.transition={};try{e(!1),t()}finally{Rr=n,sC.transition=r}}function YF(){return os().memoizedState}function oG(e,t,n){var r=qc(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},QF(e))JF(t,n);else if(n=kF(e,t,n,r),n!==null){var i=Vo();Is(n,e,r,i),e5(n,t,r)}}function aG(e,t,n){var r=qc(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(QF(e))JF(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var s=t.lastRenderedState,a=o(s,n);if(i.hasEagerState=!0,i.eagerState=a,ks(a,s)){var u=t.interleaved;u===null?(i.next=i,pT(t)):(i.next=u.next,u.next=i),t.interleaved=i;return}}catch{}finally{}n=kF(e,t,i,r),n!==null&&(i=Vo(),Is(n,e,r,i),e5(n,t,r))}}function QF(e){var t=e.alternate;return e===di||t!==null&&t===di}function JF(e,t){zm=H0=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function e5(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,eT(e,n)}}var K0={readContext:is,useCallback:_o,useContext:_o,useEffect:_o,useImperativeHandle:_o,useInsertionEffect:_o,useLayoutEffect:_o,useMemo:_o,useReducer:_o,useRef:_o,useState:_o,useDebugValue:_o,useDeferredValue:_o,useTransition:_o,useMutableSource:_o,useSyncExternalStore:_o,useId:_o,unstable_isNewReconciler:!1},sG={readContext:is,useCallback:function(e,t){return Gs().memoizedState=[e,t===void 0?null:t],e},useContext:is,useEffect:_O,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Yx(4194308,4,WF.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Yx(4194308,4,e,t)},useInsertionEffect:function(e,t){return Yx(4,2,e,t)},useMemo:function(e,t){var n=Gs();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Gs();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=oG.bind(null,di,e),[r.memoizedState,e]},useRef:function(e){var t=Gs();return e={current:e},t.memoizedState=e},useState:bO,useDebugValue:CT,useDeferredValue:function(e){return Gs().memoizedState=e},useTransition:function(){var e=bO(!1),t=e[0];return e=iG.bind(null,e[1]),Gs().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=di,i=Gs();if(oi){if(n===void 0)throw Error(Yt(407));n=n()}else{if(n=t(),no===null)throw Error(Yt(349));(Sd&30)!==0||FF(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,_O(BF.bind(null,r,o,e),[e]),r.flags|=2048,vg(9,$F.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Gs(),t=no.identifierPrefix;if(oi){var n=$l,r=Fl;n=(r&~(1<<32-Ts(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=mg++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=rG++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},lG={readContext:is,useCallback:qF,useContext:is,useEffect:wT,useImperativeHandle:GF,useInsertionEffect:HF,useLayoutEffect:KF,useMemo:ZF,useReducer:lC,useRef:jF,useState:function(){return lC(gg)},useDebugValue:CT,useDeferredValue:function(e){var t=os();return XF(t,Bi.memoizedState,e)},useTransition:function(){var e=lC(gg)[0],t=os().memoizedState;return[e,t]},useMutableSource:LF,useSyncExternalStore:zF,useId:YF,unstable_isNewReconciler:!1},cG={readContext:is,useCallback:qF,useContext:is,useEffect:wT,useImperativeHandle:GF,useInsertionEffect:HF,useLayoutEffect:KF,useMemo:ZF,useReducer:cC,useRef:jF,useState:function(){return cC(gg)},useDebugValue:CT,useDeferredValue:function(e){var t=os();return Bi===null?t.memoizedState=e:XF(t,Bi.memoizedState,e)},useTransition:function(){var e=cC(gg)[0],t=os().memoizedState;return[e,t]},useMutableSource:LF,useSyncExternalStore:zF,useId:YF,unstable_isNewReconciler:!1};function dh(e,t){try{var n="",r=t;do n+=zK(r),r=r.return;while(r);var i=n}catch(o){i=`
Error generating stack: `+o.message+`
`+o.stack}return{value:e,source:t,stack:i,digest:null}}function uC(e,t,n){return{value:e,source:null,stack:n!=null?n:null,digest:t!=null?t:null}}function k2(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var uG=typeof WeakMap=="function"?WeakMap:Map;function t5(e,t,n){n=Vl(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){G0||(G0=!0,$2=r),k2(e,t)},n}function n5(e,t,n){n=Vl(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){k2(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){k2(e,t),typeof r!="function"&&(Gc===null?Gc=new Set([this]):Gc.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}function wO(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new uG;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=SG.bind(null,e,t,n),t.then(e,e))}function CO(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function SO(e,t,n,r,i){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Vl(-1,1),t.tag=2,Wc(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=i,e)}var dG=Yl.ReactCurrentOwner,ea=!1;function $o(e,t,n,r){t.child=e===null?AF(t,null,n,r):ch(t,e.child,n,r)}function EO(e,t,n,r,i){n=n.render;var o=t.ref;return Yf(t,i),r=bT(e,t,n,r,o,i),n=_T(),e!==null&&!ea?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,ql(e,t,i)):(oi&&n&&lT(t),t.flags|=1,$o(e,t,r,i),t.child)}function PO(e,t,n,r,i){if(e===null){var o=n.type;return typeof o=="function"&&!RT(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,r5(e,t,o,r,i)):(e=t0(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,(e.lanes&i)===0){var s=o.memoizedProps;if(n=n.compare,n=n!==null?n:cg,n(s,r)&&e.ref===t.ref)return ql(e,t,i)}return t.flags|=1,e=Zc(o,r),e.ref=t.ref,e.return=t,t.child=e}function r5(e,t,n,r,i){if(e!==null){var o=e.memoizedProps;if(cg(o,r)&&e.ref===t.ref)if(ea=!1,t.pendingProps=r=o,(e.lanes&i)!==0)(e.flags&131072)!==0&&(ea=!0);else return t.lanes=e.lanes,ql(e,t,i)}return M2(e,t,n,r,i)}function i5(e,t,n){var r=t.pendingProps,i=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Xr(Uf,va),va|=n;else{if((n&1073741824)===0)return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Xr(Uf,va),va|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,Xr(Uf,va),va|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,Xr(Uf,va),va|=r;return $o(e,t,i,n),t.child}function o5(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function M2(e,t,n,r,i){var o=na(n)?wd:Eo.current;return o=sh(t,o),Yf(t,i),n=bT(e,t,n,r,o,i),r=_T(),e!==null&&!ea?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,ql(e,t,i)):(oi&&r&&lT(t),t.flags|=1,$o(e,t,n,i),t.child)}function TO(e,t,n,r,i){if(na(n)){var o=!0;z0(t)}else o=!1;if(Yf(t,i),t.stateNode===null)Qx(e,t),OF(t,n,r),I2(t,n,r,i),r=!0;else if(e===null){var s=t.stateNode,a=t.memoizedProps;s.props=a;var u=s.context,f=n.contextType;typeof f=="object"&&f!==null?f=is(f):(f=na(n)?wd:Eo.current,f=sh(t,f));var p=n.getDerivedStateFromProps,g=typeof p=="function"||typeof s.getSnapshotBeforeUpdate=="function";g||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==r||u!==f)&&yO(t,s,r,f),Tc=!1;var v=t.memoizedState;s.state=v,U0(t,r,s,i),u=t.memoizedState,a!==r||v!==u||ta.current||Tc?(typeof p=="function"&&(T2(t,n,p,r),u=t.memoizedState),(a=Tc||vO(t,n,a,r,v,u,f))?(g||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=u),s.props=r,s.state=u,s.context=f,r=a):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,MF(e,t),a=t.memoizedProps,f=t.type===t.elementType?a:_s(t.type,a),s.props=f,g=t.pendingProps,v=s.context,u=n.contextType,typeof u=="object"&&u!==null?u=is(u):(u=na(n)?wd:Eo.current,u=sh(t,u));var b=n.getDerivedStateFromProps;(p=typeof b=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==g||v!==u)&&yO(t,s,r,u),Tc=!1,v=t.memoizedState,s.state=v,U0(t,r,s,i);var _=t.memoizedState;a!==g||v!==_||ta.current||Tc?(typeof b=="function"&&(T2(t,n,b,r),_=t.memoizedState),(f=Tc||vO(t,n,f,r,v,_,u)||!1)?(p||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,_,u),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,_,u)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||a===e.memoizedProps&&v===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&v===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=_),s.props=r,s.state=_,s.context=u,r=f):(typeof s.componentDidUpdate!="function"||a===e.memoizedProps&&v===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&v===e.memoizedState||(t.flags|=1024),r=!1)}return R2(e,t,n,r,o,i)}function R2(e,t,n,r,i,o){o5(e,t);var s=(t.flags&128)!==0;if(!r&&!s)return i&&fO(t,n,!1),ql(e,t,o);r=t.stateNode,dG.current=t;var a=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=ch(t,e.child,null,o),t.child=ch(t,null,a,o)):$o(e,t,a,o),t.memoizedState=r.state,i&&fO(t,n,!0),t.child}function a5(e){var t=e.stateNode;t.pendingContext?dO(e,t.pendingContext,t.pendingContext!==t.context):t.context&&dO(e,t.context,!1),gT(e,t.containerInfo)}function IO(e,t,n,r,i){return lh(),uT(i),t.flags|=256,$o(e,t,n,r),t.child}var O2={dehydrated:null,treeContext:null,retryLane:0};function D2(e){return{baseLanes:e,cachePool:null,transitions:null}}function s5(e,t,n){var r=t.pendingProps,i=ui.current,o=!1,s=(t.flags&128)!==0,a;if((a=s)||(a=e!==null&&e.memoizedState===null?!1:(i&2)!==0),a?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),Xr(ui,i&1),e===null)return E2(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((t.mode&1)===0?t.lanes=1:e.data==="$!"?t.lanes=8:t.lanes=1073741824,null):(s=r.children,e=r.fallback,o?(r=t.mode,o=t.child,s={mode:"hidden",children:s},(r&1)===0&&o!==null?(o.childLanes=0,o.pendingProps=s):o=f_(s,r,0,null),e=vd(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=D2(n),t.memoizedState=O2,e):ST(t,s));if(i=e.memoizedState,i!==null&&(a=i.dehydrated,a!==null))return fG(e,t,s,r,a,i,n);if(o){o=r.fallback,s=t.mode,i=e.child,a=i.sibling;var u={mode:"hidden",children:r.children};return(s&1)===0&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=u,t.deletions=null):(r=Zc(i,u),r.subtreeFlags=i.subtreeFlags&14680064),a!==null?o=Zc(a,o):(o=vd(o,s,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,s=e.child.memoizedState,s=s===null?D2(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},o.memoizedState=s,o.childLanes=e.childLanes&~n,t.memoizedState=O2,r}return o=e.child,e=o.sibling,r=Zc(o,{mode:"visible",children:r.children}),(t.mode&1)===0&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function ST(e,t){return t=f_({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Zy(e,t,n,r){return r!==null&&uT(r),ch(t,e.child,null,n),e=ST(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function fG(e,t,n,r,i,o,s){if(n)return t.flags&256?(t.flags&=-257,r=uC(Error(Yt(422))),Zy(e,t,s,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=f_({mode:"visible",children:r.children},i,0,null),o=vd(o,i,s,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,(t.mode&1)!==0&&ch(t,e.child,null,s),t.child.memoizedState=D2(s),t.memoizedState=O2,o);if((t.mode&1)===0)return Zy(e,t,s,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var a=r.dgst;return r=a,o=Error(Yt(419)),r=uC(o,r,void 0),Zy(e,t,s,r)}if(a=(s&e.childLanes)!==0,ea||a){if(r=no,r!==null){switch(s&-s){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&(r.suspendedLanes|s))!==0?0:i,i!==0&&i!==o.retryLane&&(o.retryLane=i,Gl(e,i),Is(r,e,i,-1))}return MT(),r=uC(Error(Yt(421))),Zy(e,t,s,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=EG.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,ya=Kc(i.nextSibling),Ca=t,oi=!0,Ss=null,e!==null&&(qa[Za++]=Fl,qa[Za++]=$l,qa[Za++]=Cd,Fl=e.id,$l=e.overflow,Cd=t),t=ST(t,r.children),t.flags|=4096,t)}function kO(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),P2(e.return,t,n)}function dC(e,t,n,r,i){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function l5(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if($o(e,t,r.children,n),r=ui.current,(r&2)!==0)r=r&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&kO(e,n,t);else if(e.tag===19)kO(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Xr(ui,r),(t.mode&1)===0)t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&j0(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),dC(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&j0(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}dC(t,!0,n,null,o);break;case"together":dC(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Qx(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function ql(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Ed|=t.lanes,(n&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(Yt(153));if(t.child!==null){for(e=t.child,n=Zc(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Zc(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function hG(e,t,n){switch(t.tag){case 3:a5(t),lh();break;case 5:NF(t);break;case 1:na(t.type)&&z0(t);break;case 4:gT(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Xr(B0,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Xr(ui,ui.current&1),t.flags|=128,null):(n&t.child.childLanes)!==0?s5(e,t,n):(Xr(ui,ui.current&1),e=ql(e,t,n),e!==null?e.sibling:null);Xr(ui,ui.current&1);break;case 19:if(r=(n&t.childLanes)!==0,(e.flags&128)!==0){if(r)return l5(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Xr(ui,ui.current),r)break;return null;case 22:case 23:return t.lanes=0,i5(e,t,n)}return ql(e,t,n)}var c5,A2,u5,d5;c5=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};A2=function(){};u5=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,cd(tl.current);var o=null;switch(n){case"input":i=n2(e,i),r=n2(e,r),o=[];break;case"select":i=fi({},i,{value:void 0}),r=fi({},r,{value:void 0}),o=[];break;case"textarea":i=o2(e,i),r=o2(e,r),o=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=N0)}s2(n,r);var s;n=null;for(f in i)if(!r.hasOwnProperty(f)&&i.hasOwnProperty(f)&&i[f]!=null)if(f==="style"){var a=i[f];for(s in a)a.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else f!=="dangerouslySetInnerHTML"&&f!=="children"&&f!=="suppressContentEditableWarning"&&f!=="suppressHydrationWarning"&&f!=="autoFocus"&&(ng.hasOwnProperty(f)?o||(o=[]):(o=o||[]).push(f,null));for(f in r){var u=r[f];if(a=i!=null?i[f]:void 0,r.hasOwnProperty(f)&&u!==a&&(u!=null||a!=null))if(f==="style")if(a){for(s in a)!a.hasOwnProperty(s)||u&&u.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in u)u.hasOwnProperty(s)&&a[s]!==u[s]&&(n||(n={}),n[s]=u[s])}else n||(o||(o=[]),o.push(f,n)),n=u;else f==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,a=a?a.__html:void 0,u!=null&&a!==u&&(o=o||[]).push(f,u)):f==="children"?typeof u!="string"&&typeof u!="number"||(o=o||[]).push(f,""+u):f!=="suppressContentEditableWarning"&&f!=="suppressHydrationWarning"&&(ng.hasOwnProperty(f)?(u!=null&&f==="onScroll"&&Qr("scroll",e),o||a===u||(o=[])):(o=o||[]).push(f,u))}n&&(o=o||[]).push("style",n);var f=o;(t.updateQueue=f)&&(t.flags|=4)}};d5=function(e,t,n,r){n!==r&&(t.flags|=4)};function Qp(e,t){if(!oi)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function wo(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function pG(e,t,n){var r=t.pendingProps;switch(cT(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return wo(t),null;case 1:return na(t.type)&&L0(),wo(t),null;case 3:return r=t.stateNode,uh(),ei(ta),ei(Eo),yT(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Gy(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Ss!==null&&(U2(Ss),Ss=null))),A2(e,t),wo(t),null;case 5:vT(t);var i=cd(pg.current);if(n=t.type,e!==null&&t.stateNode!=null)u5(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(Yt(166));return wo(t),null}if(e=cd(tl.current),Gy(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[Xs]=t,r[fg]=o,e=(t.mode&1)!==0,n){case"dialog":Qr("cancel",r),Qr("close",r);break;case"iframe":case"object":case"embed":Qr("load",r);break;case"video":case"audio":for(i=0;i<wm.length;i++)Qr(wm[i],r);break;case"source":Qr("error",r);break;case"img":case"image":case"link":Qr("error",r),Qr("load",r);break;case"details":Qr("toggle",r);break;case"input":FR(r,o),Qr("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},Qr("invalid",r);break;case"textarea":BR(r,o),Qr("invalid",r)}s2(n,o),i=null;for(var s in o)if(o.hasOwnProperty(s)){var a=o[s];s==="children"?typeof a=="string"?r.textContent!==a&&(o.suppressHydrationWarning!==!0&&Wy(r.textContent,a,e),i=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(o.suppressHydrationWarning!==!0&&Wy(r.textContent,a,e),i=["children",""+a]):ng.hasOwnProperty(s)&&a!=null&&s==="onScroll"&&Qr("scroll",r)}switch(n){case"input":Fy(r),$R(r,o,!0);break;case"textarea":Fy(r),VR(r);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(r.onclick=N0)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{s=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Fz(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=s.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[Xs]=t,e[fg]=r,c5(e,t,!1,!1),t.stateNode=e;e:{switch(s=l2(n,r),n){case"dialog":Qr("cancel",e),Qr("close",e),i=r;break;case"iframe":case"object":case"embed":Qr("load",e),i=r;break;case"video":case"audio":for(i=0;i<wm.length;i++)Qr(wm[i],e);i=r;break;case"source":Qr("error",e),i=r;break;case"img":case"image":case"link":Qr("error",e),Qr("load",e),i=r;break;case"details":Qr("toggle",e),i=r;break;case"input":FR(e,r),i=n2(e,r),Qr("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=fi({},r,{value:void 0}),Qr("invalid",e);break;case"textarea":BR(e,r),i=o2(e,r),Qr("invalid",e);break;default:i=r}s2(n,i),a=i;for(o in a)if(a.hasOwnProperty(o)){var u=a[o];o==="style"?Vz(e,u):o==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,u!=null&&$z(e,u)):o==="children"?typeof u=="string"?(n!=="textarea"||u!=="")&&rg(e,u):typeof u=="number"&&rg(e,""+u):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(ng.hasOwnProperty(o)?u!=null&&o==="onScroll"&&Qr("scroll",e):u!=null&&qP(e,o,u,s))}switch(n){case"input":Fy(e),$R(e,r,!1);break;case"textarea":Fy(e),VR(e);break;case"option":r.value!=null&&e.setAttribute("value",""+nu(r.value));break;case"select":e.multiple=!!r.multiple,o=r.value,o!=null?Gf(e,!!r.multiple,o,!1):r.defaultValue!=null&&Gf(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=N0)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return wo(t),null;case 6:if(e&&t.stateNode!=null)d5(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(Yt(166));if(n=cd(pg.current),cd(tl.current),Gy(t)){if(r=t.stateNode,n=t.memoizedProps,r[Xs]=t,(o=r.nodeValue!==n)&&(e=Ca,e!==null))switch(e.tag){case 3:Wy(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Wy(r.nodeValue,n,(e.mode&1)!==0)}o&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Xs]=t,t.stateNode=r}return wo(t),null;case 13:if(ei(ui),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(oi&&ya!==null&&(t.mode&1)!==0&&(t.flags&128)===0)IF(),lh(),t.flags|=98560,o=!1;else if(o=Gy(t),r!==null&&r.dehydrated!==null){if(e===null){if(!o)throw Error(Yt(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(Yt(317));o[Xs]=t}else lh(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;wo(t),o=!1}else Ss!==null&&(U2(Ss),Ss=null),o=!0;if(!o)return t.flags&65536?t:null}return(t.flags&128)!==0?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,(t.mode&1)!==0&&(e===null||(ui.current&1)!==0?Ui===0&&(Ui=3):MT())),t.updateQueue!==null&&(t.flags|=4),wo(t),null);case 4:return uh(),A2(e,t),e===null&&ug(t.stateNode.containerInfo),wo(t),null;case 10:return hT(t.type._context),wo(t),null;case 17:return na(t.type)&&L0(),wo(t),null;case 19:if(ei(ui),o=t.memoizedState,o===null)return wo(t),null;if(r=(t.flags&128)!==0,s=o.rendering,s===null)if(r)Qp(o,!1);else{if(Ui!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(s=j0(e),s!==null){for(t.flags|=128,Qp(o,!1),r=s.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)o=n,e=r,o.flags&=14680066,s=o.alternate,s===null?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=s.childLanes,o.lanes=s.lanes,o.child=s.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=s.memoizedProps,o.memoizedState=s.memoizedState,o.updateQueue=s.updateQueue,o.type=s.type,e=s.dependencies,o.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Xr(ui,ui.current&1|2),t.child}e=e.sibling}o.tail!==null&&wi()>fh&&(t.flags|=128,r=!0,Qp(o,!1),t.lanes=4194304)}else{if(!r)if(e=j0(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Qp(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!oi)return wo(t),null}else 2*wi()-o.renderingStartTime>fh&&n!==1073741824&&(t.flags|=128,r=!0,Qp(o,!1),t.lanes=4194304);o.isBackwards?(s.sibling=t.child,t.child=s):(n=o.last,n!==null?n.sibling=s:t.child=s,o.last=s)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=wi(),t.sibling=null,n=ui.current,Xr(ui,r?n&1|2:n&1),t):(wo(t),null);case 22:case 23:return kT(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(va&1073741824)!==0&&(wo(t),t.subtreeFlags&6&&(t.flags|=8192)):wo(t),null;case 24:return null;case 25:return null}throw Error(Yt(156,t.tag))}function mG(e,t){switch(cT(t),t.tag){case 1:return na(t.type)&&L0(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return uh(),ei(ta),ei(Eo),yT(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return vT(t),null;case 13:if(ei(ui),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Yt(340));lh()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ei(ui),null;case 4:return uh(),null;case 10:return hT(t.type._context),null;case 22:case 23:return kT(),null;case 24:return null;default:return null}}var Xy=!1,So=!1,gG=typeof WeakSet=="function"?WeakSet:Set,Sn=null;function Vf(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){gi(e,t,r)}else n.current=null}function N2(e,t,n){try{n()}catch(r){gi(e,t,r)}}var MO=!1;function vG(e,t){if(y2=O0,e=mF(),sT(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var s=0,a=-1,u=-1,f=0,p=0,g=e,v=null;t:for(;;){for(var b;g!==n||i!==0&&g.nodeType!==3||(a=s+i),g!==o||r!==0&&g.nodeType!==3||(u=s+r),g.nodeType===3&&(s+=g.nodeValue.length),(b=g.firstChild)!==null;)v=g,g=b;for(;;){if(g===e)break t;if(v===n&&++f===i&&(a=s),v===o&&++p===r&&(u=s),(b=g.nextSibling)!==null)break;g=v,v=g.parentNode}g=b}n=a===-1||u===-1?null:{start:a,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(x2={focusedElem:e,selectionRange:n},O0=!1,Sn=t;Sn!==null;)if(t=Sn,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Sn=e;else for(;Sn!==null;){t=Sn;try{var _=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(_!==null){var T=_.memoizedProps,I=_.memoizedState,P=t.stateNode,M=P.getSnapshotBeforeUpdate(t.elementType===t.type?T:_s(t.type,T),I);P.__reactInternalSnapshotBeforeUpdate=M}break;case 3:var D=t.stateNode.containerInfo;D.nodeType===1?D.textContent="":D.nodeType===9&&D.documentElement&&D.removeChild(D.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Yt(163))}}catch(N){gi(t,t.return,N)}if(e=t.sibling,e!==null){e.return=t.return,Sn=e;break}Sn=t.return}return _=MO,MO=!1,_}function Fm(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&N2(t,n,o)}i=i.next}while(i!==r)}}function u_(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function L2(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function f5(e){var t=e.alternate;t!==null&&(e.alternate=null,f5(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Xs],delete t[fg],delete t[w2],delete t[JW],delete t[eG])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function h5(e){return e.tag===5||e.tag===3||e.tag===4}function RO(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||h5(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function z2(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=N0));else if(r!==4&&(e=e.child,e!==null))for(z2(e,t,n),e=e.sibling;e!==null;)z2(e,t,n),e=e.sibling}function F2(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(F2(e,t,n),e=e.sibling;e!==null;)F2(e,t,n),e=e.sibling}var uo=null,ws=!1;function xc(e,t,n){for(n=n.child;n!==null;)p5(e,t,n),n=n.sibling}function p5(e,t,n){if(el&&typeof el.onCommitFiberUnmount=="function")try{el.onCommitFiberUnmount(n_,n)}catch{}switch(n.tag){case 5:So||Vf(n,t);case 6:var r=uo,i=ws;uo=null,xc(e,t,n),uo=r,ws=i,uo!==null&&(ws?(e=uo,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):uo.removeChild(n.stateNode));break;case 18:uo!==null&&(ws?(e=uo,n=n.stateNode,e.nodeType===8?iC(e.parentNode,n):e.nodeType===1&&iC(e,n),sg(e)):iC(uo,n.stateNode));break;case 4:r=uo,i=ws,uo=n.stateNode.containerInfo,ws=!0,xc(e,t,n),uo=r,ws=i;break;case 0:case 11:case 14:case 15:if(!So&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,s=o.destroy;o=o.tag,s!==void 0&&((o&2)!==0||(o&4)!==0)&&N2(n,t,s),i=i.next}while(i!==r)}xc(e,t,n);break;case 1:if(!So&&(Vf(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){gi(n,t,a)}xc(e,t,n);break;case 21:xc(e,t,n);break;case 22:n.mode&1?(So=(r=So)||n.memoizedState!==null,xc(e,t,n),So=r):xc(e,t,n);break;default:xc(e,t,n)}}function OO(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new gG),t.forEach(function(r){var i=PG.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function ys(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var o=e,s=t,a=s;e:for(;a!==null;){switch(a.tag){case 5:uo=a.stateNode,ws=!1;break e;case 3:uo=a.stateNode.containerInfo,ws=!0;break e;case 4:uo=a.stateNode.containerInfo,ws=!0;break e}a=a.return}if(uo===null)throw Error(Yt(160));p5(o,s,i),uo=null,ws=!1;var u=i.alternate;u!==null&&(u.return=null),i.return=null}catch(f){gi(i,t,f)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)m5(t,e),t=t.sibling}function m5(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(ys(t,e),Hs(e),r&4){try{Fm(3,e,e.return),u_(3,e)}catch(T){gi(e,e.return,T)}try{Fm(5,e,e.return)}catch(T){gi(e,e.return,T)}}break;case 1:ys(t,e),Hs(e),r&512&&n!==null&&Vf(n,n.return);break;case 5:if(ys(t,e),Hs(e),r&512&&n!==null&&Vf(n,n.return),e.flags&32){var i=e.stateNode;try{rg(i,"")}catch(T){gi(e,e.return,T)}}if(r&4&&(i=e.stateNode,i!=null)){var o=e.memoizedProps,s=n!==null?n.memoizedProps:o,a=e.type,u=e.updateQueue;if(e.updateQueue=null,u!==null)try{a==="input"&&o.type==="radio"&&o.name!=null&&Lz(i,o),l2(a,s);var f=l2(a,o);for(s=0;s<u.length;s+=2){var p=u[s],g=u[s+1];p==="style"?Vz(i,g):p==="dangerouslySetInnerHTML"?$z(i,g):p==="children"?rg(i,g):qP(i,p,g,f)}switch(a){case"input":r2(i,o);break;case"textarea":zz(i,o);break;case"select":var v=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!o.multiple;var b=o.value;b!=null?Gf(i,!!o.multiple,b,!1):v!==!!o.multiple&&(o.defaultValue!=null?Gf(i,!!o.multiple,o.defaultValue,!0):Gf(i,!!o.multiple,o.multiple?[]:"",!1))}i[fg]=o}catch(T){gi(e,e.return,T)}}break;case 6:if(ys(t,e),Hs(e),r&4){if(e.stateNode===null)throw Error(Yt(162));i=e.stateNode,o=e.memoizedProps;try{i.nodeValue=o}catch(T){gi(e,e.return,T)}}break;case 3:if(ys(t,e),Hs(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{sg(t.containerInfo)}catch(T){gi(e,e.return,T)}break;case 4:ys(t,e),Hs(e);break;case 13:ys(t,e),Hs(e),i=e.child,i.flags&8192&&(o=i.memoizedState!==null,i.stateNode.isHidden=o,!o||i.alternate!==null&&i.alternate.memoizedState!==null||(TT=wi())),r&4&&OO(e);break;case 22:if(p=n!==null&&n.memoizedState!==null,e.mode&1?(So=(f=So)||p,ys(t,e),So=f):ys(t,e),Hs(e),r&8192){if(f=e.memoizedState!==null,(e.stateNode.isHidden=f)&&!p&&(e.mode&1)!==0)for(Sn=e,p=e.child;p!==null;){for(g=Sn=p;Sn!==null;){switch(v=Sn,b=v.child,v.tag){case 0:case 11:case 14:case 15:Fm(4,v,v.return);break;case 1:Vf(v,v.return);var _=v.stateNode;if(typeof _.componentWillUnmount=="function"){r=v,n=v.return;try{t=r,_.props=t.memoizedProps,_.state=t.memoizedState,_.componentWillUnmount()}catch(T){gi(r,n,T)}}break;case 5:Vf(v,v.return);break;case 22:if(v.memoizedState!==null){AO(g);continue}}b!==null?(b.return=v,Sn=b):AO(g)}p=p.sibling}e:for(p=null,g=e;;){if(g.tag===5){if(p===null){p=g;try{i=g.stateNode,f?(o=i.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(a=g.stateNode,u=g.memoizedProps.style,s=u!=null&&u.hasOwnProperty("display")?u.display:null,a.style.display=Bz("display",s))}catch(T){gi(e,e.return,T)}}}else if(g.tag===6){if(p===null)try{g.stateNode.nodeValue=f?"":g.memoizedProps}catch(T){gi(e,e.return,T)}}else if((g.tag!==22&&g.tag!==23||g.memoizedState===null||g===e)&&g.child!==null){g.child.return=g,g=g.child;continue}if(g===e)break e;for(;g.sibling===null;){if(g.return===null||g.return===e)break e;p===g&&(p=null),g=g.return}p===g&&(p=null),g.sibling.return=g.return,g=g.sibling}}break;case 19:ys(t,e),Hs(e),r&4&&OO(e);break;case 21:break;default:ys(t,e),Hs(e)}}function Hs(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(h5(n)){var r=n;break e}n=n.return}throw Error(Yt(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(rg(i,""),r.flags&=-33);var o=RO(e);F2(e,o,i);break;case 3:case 4:var s=r.stateNode.containerInfo,a=RO(e);z2(e,a,s);break;default:throw Error(Yt(161))}}catch(u){gi(e,e.return,u)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function yG(e,t,n){Sn=e,g5(e)}function g5(e,t,n){for(var r=(e.mode&1)!==0;Sn!==null;){var i=Sn,o=i.child;if(i.tag===22&&r){var s=i.memoizedState!==null||Xy;if(!s){var a=i.alternate,u=a!==null&&a.memoizedState!==null||So;a=Xy;var f=So;if(Xy=s,(So=u)&&!f)for(Sn=i;Sn!==null;)s=Sn,u=s.child,s.tag===22&&s.memoizedState!==null?NO(i):u!==null?(u.return=s,Sn=u):NO(i);for(;o!==null;)Sn=o,g5(o),o=o.sibling;Sn=i,Xy=a,So=f}DO(e)}else(i.subtreeFlags&8772)!==0&&o!==null?(o.return=i,Sn=o):DO(e)}}function DO(e){for(;Sn!==null;){var t=Sn;if((t.flags&8772)!==0){var n=t.alternate;try{if((t.flags&8772)!==0)switch(t.tag){case 0:case 11:case 15:So||u_(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!So)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:_s(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&gO(t,o,r);break;case 3:var s=t.updateQueue;if(s!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}gO(t,s,n)}break;case 5:var a=t.stateNode;if(n===null&&t.flags&4){n=a;var u=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":u.autoFocus&&n.focus();break;case"img":u.src&&(n.src=u.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var f=t.alternate;if(f!==null){var p=f.memoizedState;if(p!==null){var g=p.dehydrated;g!==null&&sg(g)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(Yt(163))}So||t.flags&512&&L2(t)}catch(v){gi(t,t.return,v)}}if(t===e){Sn=null;break}if(n=t.sibling,n!==null){n.return=t.return,Sn=n;break}Sn=t.return}}function AO(e){for(;Sn!==null;){var t=Sn;if(t===e){Sn=null;break}var n=t.sibling;if(n!==null){n.return=t.return,Sn=n;break}Sn=t.return}}function NO(e){for(;Sn!==null;){var t=Sn;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{u_(4,t)}catch(u){gi(t,n,u)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(u){gi(t,i,u)}}var o=t.return;try{L2(t)}catch(u){gi(t,o,u)}break;case 5:var s=t.return;try{L2(t)}catch(u){gi(t,s,u)}}}catch(u){gi(t,t.return,u)}if(t===e){Sn=null;break}var a=t.sibling;if(a!==null){a.return=t.return,Sn=a;break}Sn=t.return}}var xG=Math.ceil,W0=Yl.ReactCurrentDispatcher,ET=Yl.ReactCurrentOwner,ts=Yl.ReactCurrentBatchConfig,xr=0,no=null,Ni=null,ho=0,va=0,Uf=cu(0),Ui=0,yg=null,Ed=0,d_=0,PT=0,$m=null,Yo=null,TT=0,fh=1/0,Ml=null,G0=!1,$2=null,Gc=null,Yy=!1,Oc=null,q0=0,Bm=0,B2=null,Jx=-1,e0=0;function Vo(){return(xr&6)!==0?wi():Jx!==-1?Jx:Jx=wi()}function qc(e){return(e.mode&1)===0?1:(xr&2)!==0&&ho!==0?ho&-ho:nG.transition!==null?(e0===0&&(e0=Jz()),e0):(e=Rr,e!==0||(e=window.event,e=e===void 0?16:aF(e.type)),e)}function Is(e,t,n,r){if(50<Bm)throw Bm=0,B2=null,Error(Yt(185));Kg(e,n,r),((xr&2)===0||e!==no)&&(e===no&&((xr&2)===0&&(d_|=n),Ui===4&&Mc(e,ho)),ra(e,r),n===1&&xr===0&&(t.mode&1)===0&&(fh=wi()+500,s_&&uu()))}function ra(e,t){var n=e.callbackNode;nW(e,t);var r=R0(e,e===no?ho:0);if(r===0)n!==null&&HR(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&HR(n),t===1)e.tag===0?tG(LO.bind(null,e)):EF(LO.bind(null,e)),YW(function(){(xr&6)===0&&uu()}),n=null;else{switch(eF(r)){case 1:n=JP;break;case 4:n=Yz;break;case 16:n=M0;break;case 536870912:n=Qz;break;default:n=M0}n=S5(n,v5.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function v5(e,t){if(Jx=-1,e0=0,(xr&6)!==0)throw Error(Yt(327));var n=e.callbackNode;if(Qf()&&e.callbackNode!==n)return null;var r=R0(e,e===no?ho:0);if(r===0)return null;if((r&30)!==0||(r&e.expiredLanes)!==0||t)t=Z0(e,r);else{t=r;var i=xr;xr|=2;var o=x5();(no!==e||ho!==t)&&(Ml=null,fh=wi()+500,gd(e,t));do try{wG();break}catch(a){y5(e,a)}while(1);fT(),W0.current=o,xr=i,Ni!==null?t=0:(no=null,ho=0,t=Ui)}if(t!==0){if(t===2&&(i=h2(e),i!==0&&(r=i,t=V2(e,i))),t===1)throw n=yg,gd(e,0),Mc(e,r),ra(e,wi()),n;if(t===6)Mc(e,r);else{if(i=e.current.alternate,(r&30)===0&&!bG(i)&&(t=Z0(e,r),t===2&&(o=h2(e),o!==0&&(r=o,t=V2(e,o))),t===1))throw n=yg,gd(e,0),Mc(e,r),ra(e,wi()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(Yt(345));case 2:Xu(e,Yo,Ml);break;case 3:if(Mc(e,r),(r&130023424)===r&&(t=TT+500-wi(),10<t)){if(R0(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){Vo(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=_2(Xu.bind(null,e,Yo,Ml),t);break}Xu(e,Yo,Ml);break;case 4:if(Mc(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var s=31-Ts(r);o=1<<s,s=t[s],s>i&&(i=s),r&=~o}if(r=i,r=wi()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*xG(r/1960))-r,10<r){e.timeoutHandle=_2(Xu.bind(null,e,Yo,Ml),r);break}Xu(e,Yo,Ml);break;case 5:Xu(e,Yo,Ml);break;default:throw Error(Yt(329))}}}return ra(e,wi()),e.callbackNode===n?v5.bind(null,e):null}function V2(e,t){var n=$m;return e.current.memoizedState.isDehydrated&&(gd(e,t).flags|=256),e=Z0(e,t),e!==2&&(t=Yo,Yo=n,t!==null&&U2(t)),e}function U2(e){Yo===null?Yo=e:Yo.push.apply(Yo,e)}function bG(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],o=i.getSnapshot;i=i.value;try{if(!ks(o(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Mc(e,t){for(t&=~PT,t&=~d_,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Ts(t),r=1<<n;e[n]=-1,t&=~r}}function LO(e){if((xr&6)!==0)throw Error(Yt(327));Qf();var t=R0(e,0);if((t&1)===0)return ra(e,wi()),null;var n=Z0(e,t);if(e.tag!==0&&n===2){var r=h2(e);r!==0&&(t=r,n=V2(e,r))}if(n===1)throw n=yg,gd(e,0),Mc(e,t),ra(e,wi()),n;if(n===6)throw Error(Yt(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Xu(e,Yo,Ml),ra(e,wi()),null}function IT(e,t){var n=xr;xr|=1;try{return e(t)}finally{xr=n,xr===0&&(fh=wi()+500,s_&&uu())}}function Pd(e){Oc!==null&&Oc.tag===0&&(xr&6)===0&&Qf();var t=xr;xr|=1;var n=ts.transition,r=Rr;try{if(ts.transition=null,Rr=1,e)return e()}finally{Rr=r,ts.transition=n,xr=t,(xr&6)===0&&uu()}}function kT(){va=Uf.current,ei(Uf)}function gd(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,XW(n)),Ni!==null)for(n=Ni.return;n!==null;){var r=n;switch(cT(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&L0();break;case 3:uh(),ei(ta),ei(Eo),yT();break;case 5:vT(r);break;case 4:uh();break;case 13:ei(ui);break;case 19:ei(ui);break;case 10:hT(r.type._context);break;case 22:case 23:kT()}n=n.return}if(no=e,Ni=e=Zc(e.current,null),ho=va=t,Ui=0,yg=null,PT=d_=Ed=0,Yo=$m=null,ld!==null){for(t=0;t<ld.length;t++)if(n=ld[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,o=n.pending;if(o!==null){var s=o.next;o.next=i,r.next=s}n.pending=r}ld=null}return e}function y5(e,t){do{var n=Ni;try{if(fT(),Xx.current=K0,H0){for(var r=di.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}H0=!1}if(Sd=0,eo=Bi=di=null,zm=!1,mg=0,ET.current=null,n===null||n.return===null){Ui=1,yg=t,Ni=null;break}e:{var o=e,s=n.return,a=n,u=t;if(t=ho,a.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){var f=u,p=a,g=p.tag;if((p.mode&1)===0&&(g===0||g===11||g===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 b=CO(s);if(b!==null){b.flags&=-257,SO(b,s,a,o,t),b.mode&1&&wO(o,f,t),t=b,u=f;var _=t.updateQueue;if(_===null){var T=new Set;T.add(u),t.updateQueue=T}else _.add(u);break e}else{if((t&1)===0){wO(o,f,t),MT();break e}u=Error(Yt(426))}}else if(oi&&a.mode&1){var I=CO(s);if(I!==null){(I.flags&65536)===0&&(I.flags|=256),SO(I,s,a,o,t),uT(dh(u,a));break e}}o=u=dh(u,a),Ui!==4&&(Ui=2),$m===null?$m=[o]:$m.push(o),o=s;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var P=t5(o,u,t);mO(o,P);break e;case 1:a=u;var M=o.type,D=o.stateNode;if((o.flags&128)===0&&(typeof M.getDerivedStateFromError=="function"||D!==null&&typeof D.componentDidCatch=="function"&&(Gc===null||!Gc.has(D)))){o.flags|=65536,t&=-t,o.lanes|=t;var N=n5(o,a,t);mO(o,N);break e}}o=o.return}while(o!==null)}_5(n)}catch(z){t=z,Ni===n&&n!==null&&(Ni=n=n.return);continue}break}while(1)}function x5(){var e=W0.current;return W0.current=K0,e===null?K0:e}function MT(){(Ui===0||Ui===3||Ui===2)&&(Ui=4),no===null||(Ed&268435455)===0&&(d_&268435455)===0||Mc(no,ho)}function Z0(e,t){var n=xr;xr|=2;var r=x5();(no!==e||ho!==t)&&(Ml=null,gd(e,t));do try{_G();break}catch(i){y5(e,i)}while(1);if(fT(),xr=n,W0.current=r,Ni!==null)throw Error(Yt(261));return no=null,ho=0,Ui}function _G(){for(;Ni!==null;)b5(Ni)}function wG(){for(;Ni!==null&&!GK();)b5(Ni)}function b5(e){var t=C5(e.alternate,e,va);e.memoizedProps=e.pendingProps,t===null?_5(e):Ni=t,ET.current=null}function _5(e){var t=e;do{var n=t.alternate;if(e=t.return,(t.flags&32768)===0){if(n=pG(n,t,va),n!==null){Ni=n;return}}else{if(n=mG(n,t),n!==null){n.flags&=32767,Ni=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Ui=6,Ni=null;return}}if(t=t.sibling,t!==null){Ni=t;return}Ni=t=e}while(t!==null);Ui===0&&(Ui=5)}function Xu(e,t,n){var r=Rr,i=ts.transition;try{ts.transition=null,Rr=1,CG(e,t,n,r)}finally{ts.transition=i,Rr=r}return null}function CG(e,t,n,r){do Qf();while(Oc!==null);if((xr&6)!==0)throw Error(Yt(327));n=e.finishedWork;var i=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(Yt(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(rW(e,o),e===no&&(Ni=no=null,ho=0),(n.subtreeFlags&2064)===0&&(n.flags&2064)===0||Yy||(Yy=!0,S5(M0,function(){return Qf(),null})),o=(n.flags&15990)!==0,(n.subtreeFlags&15990)!==0||o){o=ts.transition,ts.transition=null;var s=Rr;Rr=1;var a=xr;xr|=4,ET.current=null,vG(e,n),m5(n,e),jW(x2),O0=!!y2,x2=y2=null,e.current=n,yG(n),qK(),xr=a,Rr=s,ts.transition=o}else e.current=n;if(Yy&&(Yy=!1,Oc=e,q0=i),o=e.pendingLanes,o===0&&(Gc=null),YK(n.stateNode),ra(e,wi()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(G0)throw G0=!1,e=$2,$2=null,e;return(q0&1)!==0&&e.tag!==0&&Qf(),o=e.pendingLanes,(o&1)!==0?e===B2?Bm++:(Bm=0,B2=e):Bm=0,uu(),null}function Qf(){if(Oc!==null){var e=eF(q0),t=ts.transition,n=Rr;try{if(ts.transition=null,Rr=16>e?16:e,Oc===null)var r=!1;else{if(e=Oc,Oc=null,q0=0,(xr&6)!==0)throw Error(Yt(331));var i=xr;for(xr|=4,Sn=e.current;Sn!==null;){var o=Sn,s=o.child;if((Sn.flags&16)!==0){var a=o.deletions;if(a!==null){for(var u=0;u<a.length;u++){var f=a[u];for(Sn=f;Sn!==null;){var p=Sn;switch(p.tag){case 0:case 11:case 15:Fm(8,p,o)}var g=p.child;if(g!==null)g.return=p,Sn=g;else for(;Sn!==null;){p=Sn;var v=p.sibling,b=p.return;if(f5(p),p===f){Sn=null;break}if(v!==null){v.return=b,Sn=v;break}Sn=b}}}var _=o.alternate;if(_!==null){var T=_.child;if(T!==null){_.child=null;do{var I=T.sibling;T.sibling=null,T=I}while(T!==null)}}Sn=o}}if((o.subtreeFlags&2064)!==0&&s!==null)s.return=o,Sn=s;else e:for(;Sn!==null;){if(o=Sn,(o.flags&2048)!==0)switch(o.tag){case 0:case 11:case 15:Fm(9,o,o.return)}var P=o.sibling;if(P!==null){P.return=o.return,Sn=P;break e}Sn=o.return}}var M=e.current;for(Sn=M;Sn!==null;){s=Sn;var D=s.child;if((s.subtreeFlags&2064)!==0&&D!==null)D.return=s,Sn=D;else e:for(s=M;Sn!==null;){if(a=Sn,(a.flags&2048)!==0)try{switch(a.tag){case 0:case 11:case 15:u_(9,a)}}catch(z){gi(a,a.return,z)}if(a===s){Sn=null;break e}var N=a.sibling;if(N!==null){N.return=a.return,Sn=N;break e}Sn=a.return}}if(xr=i,uu(),el&&typeof el.onPostCommitFiberRoot=="function")try{el.onPostCommitFiberRoot(n_,e)}catch{}r=!0}return r}finally{Rr=n,ts.transition=t}}return!1}function zO(e,t,n){t=dh(n,t),t=t5(e,t,1),e=Wc(e,t,1),t=Vo(),e!==null&&(Kg(e,1,t),ra(e,t))}function gi(e,t,n){if(e.tag===3)zO(e,e,n);else for(;t!==null;){if(t.tag===3){zO(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Gc===null||!Gc.has(r))){e=dh(n,e),e=n5(t,e,1),t=Wc(t,e,1),e=Vo(),t!==null&&(Kg(t,1,e),ra(t,e));break}}t=t.return}}function SG(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Vo(),e.pingedLanes|=e.suspendedLanes&n,no===e&&(ho&n)===n&&(Ui===4||Ui===3&&(ho&130023424)===ho&&500>wi()-TT?gd(e,0):PT|=n),ra(e,t)}function w5(e,t){t===0&&((e.mode&1)===0?t=1:(t=Vy,Vy<<=1,(Vy&130023424)===0&&(Vy=4194304)));var n=Vo();e=Gl(e,t),e!==null&&(Kg(e,t,n),ra(e,n))}function EG(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),w5(e,n)}function PG(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(Yt(314))}r!==null&&r.delete(t),w5(e,n)}var C5;C5=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||ta.current)ea=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return ea=!1,hG(e,t,n);ea=(e.flags&131072)!==0}else ea=!1,oi&&(t.flags&1048576)!==0&&PF(t,$0,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Qx(e,t),e=t.pendingProps;var i=sh(t,Eo.current);Yf(t,n),i=bT(null,t,r,e,i,n);var o=_T();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,na(r)?(o=!0,z0(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,mT(t),i.updater=l_,t.stateNode=i,i._reactInternals=t,I2(t,r,e,n),t=R2(null,t,r,!0,o,n)):(t.tag=0,oi&&o&&lT(t),$o(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Qx(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=IG(r),e=_s(r,e),i){case 0:t=M2(null,t,r,e,n);break e;case 1:t=TO(null,t,r,e,n);break e;case 11:t=EO(null,t,r,e,n);break e;case 14:t=PO(null,t,r,_s(r.type,e),n);break e}throw Error(Yt(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:_s(r,i),M2(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:_s(r,i),TO(e,t,r,i,n);case 3:e:{if(a5(t),e===null)throw Error(Yt(387));r=t.pendingProps,o=t.memoizedState,i=o.element,MF(e,t),U0(t,r,null,n);var s=t.memoizedState;if(r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=dh(Error(Yt(423)),t),t=IO(e,t,r,n,i);break e}else if(r!==i){i=dh(Error(Yt(424)),t),t=IO(e,t,r,n,i);break e}else for(ya=Kc(t.stateNode.containerInfo.firstChild),Ca=t,oi=!0,Ss=null,n=AF(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(lh(),r===i){t=ql(e,t,n);break e}$o(e,t,r,n)}t=t.child}return t;case 5:return NF(t),e===null&&E2(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,s=i.children,b2(r,i)?s=null:o!==null&&b2(r,o)&&(t.flags|=32),o5(e,t),$o(e,t,s,n),t.child;case 6:return e===null&&E2(t),null;case 13:return s5(e,t,n);case 4:return gT(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=ch(t,null,r,n):$o(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:_s(r,i),EO(e,t,r,i,n);case 7:return $o(e,t,t.pendingProps,n),t.child;case 8:return $o(e,t,t.pendingProps.children,n),t.child;case 12:return $o(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,s=i.value,Xr(B0,r._currentValue),r._currentValue=s,o!==null)if(ks(o.value,s)){if(o.children===i.children&&!ta.current){t=ql(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var a=o.dependencies;if(a!==null){s=o.child;for(var u=a.firstContext;u!==null;){if(u.context===r){if(o.tag===1){u=Vl(-1,n&-n),u.tag=2;var f=o.updateQueue;if(f!==null){f=f.shared;var p=f.pending;p===null?u.next=u:(u.next=p.next,p.next=u),f.pending=u}}o.lanes|=n,u=o.alternate,u!==null&&(u.lanes|=n),P2(o.return,n,t),a.lanes|=n;break}u=u.next}}else if(o.tag===10)s=o.type===t.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(Yt(341));s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),P2(s,n,t),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===t){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}$o(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Yf(t,n),i=is(i),r=r(i),t.flags|=1,$o(e,t,r,n),t.child;case 14:return r=t.type,i=_s(r,t.pendingProps),i=_s(r.type,i),PO(e,t,r,i,n);case 15:return r5(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:_s(r,i),Qx(e,t),t.tag=1,na(r)?(e=!0,z0(t)):e=!1,Yf(t,n),OF(t,r,i),I2(t,r,i,n),R2(null,t,r,!0,e,n);case 19:return l5(e,t,n);case 22:return i5(e,t,n)}throw Error(Yt(156,t.tag))};function S5(e,t){return Xz(e,t)}function TG(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Qa(e,t,n,r){return new TG(e,t,n,r)}function RT(e){return e=e.prototype,!(!e||!e.isReactComponent)}function IG(e){if(typeof e=="function")return RT(e)?1:0;if(e!=null){if(e=e.$$typeof,e===XP)return 11;if(e===YP)return 14}return 2}function Zc(e,t){var n=e.alternate;return n===null?(n=Qa(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function t0(e,t,n,r,i,o){var s=2;if(r=e,typeof e=="function")RT(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Of:return vd(n.children,i,o,t);case ZP:s=8,i|=8;break;case QS:return e=Qa(12,n,t,i|2),e.elementType=QS,e.lanes=o,e;case JS:return e=Qa(13,n,t,i),e.elementType=JS,e.lanes=o,e;case e2:return e=Qa(19,n,t,i),e.elementType=e2,e.lanes=o,e;case Dz:return f_(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Rz:s=10;break e;case Oz:s=9;break e;case XP:s=11;break e;case YP:s=14;break e;case Pc:s=16,r=null;break e}throw Error(Yt(130,e==null?e:typeof e,""))}return t=Qa(s,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function vd(e,t,n,r){return e=Qa(7,e,r,t),e.lanes=n,e}function f_(e,t,n,r){return e=Qa(22,e,r,t),e.elementType=Dz,e.lanes=n,e.stateNode={isHidden:!1},e}function fC(e,t,n){return e=Qa(6,e,null,t),e.lanes=n,e}function hC(e,t,n){return t=Qa(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function kG(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Gw(0),this.expirationTimes=Gw(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Gw(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function OT(e,t,n,r,i,o,s,a,u){return e=new kG(e,t,n,a,u),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Qa(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},mT(o),e}function MG(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Rf,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function E5(e){if(!e)return ru;e=e._reactInternals;e:{if(Ld(e)!==e||e.tag!==1)throw Error(Yt(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(na(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(Yt(171))}if(e.tag===1){var n=e.type;if(na(n))return SF(e,n,t)}return t}function P5(e,t,n,r,i,o,s,a,u){return e=OT(n,r,!0,e,i,o,s,a,u),e.context=E5(null),n=e.current,r=Vo(),i=qc(n),o=Vl(r,i),o.callback=t!=null?t:null,Wc(n,o,i),e.current.lanes=i,Kg(e,i,r),ra(e,r),e}function h_(e,t,n,r){var i=t.current,o=Vo(),s=qc(i);return n=E5(n),t.context===null?t.context=n:t.pendingContext=n,t=Vl(o,s),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Wc(i,t,s),e!==null&&(Is(e,i,s,o),Zx(e,i,s)),s}function X0(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function FO(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function DT(e,t){FO(e,t),(e=e.alternate)&&FO(e,t)}function RG(){return null}var T5=typeof reportError=="function"?reportError:function(e){console.error(e)};function AT(e){this._internalRoot=e}p_.prototype.render=AT.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(Yt(409));h_(e,t,null,null)};p_.prototype.unmount=AT.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Pd(function(){h_(null,e,null,null)}),t[Wl]=null}};function p_(e){this._internalRoot=e}p_.prototype.unstable_scheduleHydration=function(e){if(e){var t=rF();e={blockedOn:null,target:e,priority:t};for(var n=0;n<kc.length&&t!==0&&t<kc[n].priority;n++);kc.splice(n,0,e),n===0&&oF(e)}};function NT(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function m_(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function $O(){}function OG(e,t,n,r,i){if(i){if(typeof r=="function"){var o=r;r=function(){var f=X0(s);o.call(f)}}var s=P5(t,r,e,0,null,!1,!1,"",$O);return e._reactRootContainer=s,e[Wl]=s.current,ug(e.nodeType===8?e.parentNode:e),Pd(),s}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var a=r;r=function(){var f=X0(u);a.call(f)}}var u=OT(e,0,!1,null,null,!1,!1,"",$O);return e._reactRootContainer=u,e[Wl]=u.current,ug(e.nodeType===8?e.parentNode:e),Pd(function(){h_(t,u,n,r)}),u}function g_(e,t,n,r,i){var o=n._reactRootContainer;if(o){var s=o;if(typeof i=="function"){var a=i;i=function(){var u=X0(s);a.call(u)}}h_(t,s,e,i)}else s=OG(n,t,e,i,r);return X0(s)}tF=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=_m(t.pendingLanes);n!==0&&(eT(t,n|1),ra(t,wi()),(xr&6)===0&&(fh=wi()+500,uu()))}break;case 13:Pd(function(){var r=Gl(e,1);if(r!==null){var i=Vo();Is(r,e,1,i)}}),DT(e,1)}};tT=function(e){if(e.tag===13){var t=Gl(e,134217728);if(t!==null){var n=Vo();Is(t,e,134217728,n)}DT(e,134217728)}};nF=function(e){if(e.tag===13){var t=qc(e),n=Gl(e,t);if(n!==null){var r=Vo();Is(n,e,t,r)}DT(e,t)}};rF=function(){return Rr};iF=function(e,t){var n=Rr;try{return Rr=e,t()}finally{Rr=n}};u2=function(e,t,n){switch(t){case"input":if(r2(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=a_(r);if(!i)throw Error(Yt(90));Nz(r),r2(r,i)}}}break;case"textarea":zz(e,n);break;case"select":t=n.value,t!=null&&Gf(e,!!n.multiple,t,!1)}};Hz=IT;Kz=Pd;var DG={usingClientEntryPoint:!1,Events:[Gg,Lf,a_,Uz,jz,IT]},Jp={findFiberByHostInstance:sd,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},AG={bundleType:Jp.bundleType,version:Jp.version,rendererPackageName:Jp.rendererPackageName,rendererConfig:Jp.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Yl.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=qz(e),e===null?null:e.stateNode},findFiberByHostInstance:Jp.findFiberByHostInstance||RG,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Qy=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Qy.isDisabled&&Qy.supportsFiber)try{n_=Qy.inject(AG),el=Qy}catch{}}Ra.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=DG;Ra.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!NT(t))throw Error(Yt(200));return MG(e,t,null,n)};Ra.createRoot=function(e,t){if(!NT(e))throw Error(Yt(299));var n=!1,r="",i=T5;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=OT(e,1,!1,null,null,n,!1,r,i),e[Wl]=t.current,ug(e.nodeType===8?e.parentNode:e),new AT(t)};Ra.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(Yt(188)):(e=Object.keys(e).join(","),Error(Yt(268,e)));return e=qz(t),e=e===null?null:e.stateNode,e};Ra.flushSync=function(e){return Pd(e)};Ra.hydrate=function(e,t,n){if(!m_(t))throw Error(Yt(200));return g_(null,e,t,!0,n)};Ra.hydrateRoot=function(e,t,n){if(!NT(e))throw Error(Yt(405));var r=n!=null&&n.hydratedSources||null,i=!1,o="",s=T5;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(s=n.onRecoverableError)),t=P5(t,null,e,1,n!=null?n:null,i,!1,o,s),e[Wl]=t.current,ug(e),r)for(e=0;e<r.length;e++)n=r[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new p_(t)};Ra.render=function(e,t,n){if(!m_(t))throw Error(Yt(200));return g_(null,e,t,!1,n)};Ra.unmountComponentAtNode=function(e){if(!m_(e))throw Error(Yt(40));return e._reactRootContainer?(Pd(function(){g_(null,null,e,!1,function(){e._reactRootContainer=null,e[Wl]=null})}),!0):!1};Ra.unstable_batchedUpdates=IT;Ra.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!m_(n))throw Error(Yt(200));if(e==null||e._reactInternals===void 0)throw Error(Yt(38));return g_(e,t,n,!1,r)};Ra.version="18.2.0-next-9e3b772b8-20220608";(function(e){function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}t(),e.exports=Ra})(al);const iu=VP(al.exports),NG=xz({__proto__:null,default:iu},[al.exports]);var BO=al.exports;XS.createRoot=BO.createRoot,XS.hydrateRoot=BO.hydrateRoot;/**
* @remix-run/router v1.3.2
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/function Y0(){return Y0=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Y0.apply(this,arguments)}var Dc;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Dc||(Dc={}));const VO="popstate";function LG(e){e===void 0&&(e={});function t(r,i){let{pathname:o,search:s,hash:a}=r.location;return j2("",{pathname:o,search:s,hash:a},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function n(r,i){return typeof i=="string"?i:I5(i)}return FG(t,n,null,e)}function ia(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function zG(){return Math.random().toString(36).substr(2,8)}function UO(e,t){return{usr:e.state,key:e.key,idx:t}}function j2(e,t,n,r){return n===void 0&&(n=null),Y0({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?v_(t):t,{state:n,key:t&&t.key||r||zG()})}function I5(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function v_(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function FG(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:o=!1}=r,s=i.history,a=Dc.Pop,u=null,f=p();f==null&&(f=0,s.replaceState(Y0({},s.state,{idx:f}),""));function p(){return(s.state||{idx:null}).idx}function g(){a=Dc.Pop;let I=p(),P=I==null?null:I-f;f=I,u&&u({action:a,location:T.location,delta:P})}function v(I,P){a=Dc.Push;let M=j2(T.location,I,P);n&&n(M,I),f=p()+1;let D=UO(M,f),N=T.createHref(M);try{s.pushState(D,"",N)}catch{i.location.assign(N)}o&&u&&u({action:a,location:T.location,delta:1})}function b(I,P){a=Dc.Replace;let M=j2(T.location,I,P);n&&n(M,I),f=p();let D=UO(M,f),N=T.createHref(M);s.replaceState(D,"",N),o&&u&&u({action:a,location:T.location,delta:0})}function _(I){let P=i.location.origin!=="null"?i.location.origin:i.location.href,M=typeof I=="string"?I:I5(I);return ia(P,"No window.location.(origin|href) available to create URL for href: "+M),new URL(M,P)}let T={get action(){return a},get location(){return e(i,s)},listen(I){if(u)throw new Error("A history only accepts one active listener");return i.addEventListener(VO,g),u=I,()=>{i.removeEventListener(VO,g),u=null}},createHref(I){return t(i,I)},createURL:_,encodeLocation(I){let P=_(I);return{pathname:P.pathname,search:P.search,hash:P.hash}},push:v,replace:b,go(I){return s.go(I)}};return T}var jO;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(jO||(jO={}));function $G(e,t,n){n===void 0&&(n="/");let r=typeof t=="string"?v_(t):t,i=R5(r.pathname||"/",n);if(i==null)return null;let o=k5(e);BG(o);let s=null;for(let a=0;s==null&&a<o.length;++a)s=ZG(o[a],QG(i));return s}function k5(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let i=(o,s,a)=>{let u={relativePath:a===void 0?o.path||"":a,caseSensitive:o.caseSensitive===!0,childrenIndex:s,route:o};u.relativePath.startsWith("/")&&(ia(u.relativePath.startsWith(r),'Absolute route path "'+u.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),u.relativePath=u.relativePath.slice(r.length));let f=Jf([r,u.relativePath]),p=n.concat(u);o.children&&o.children.length>0&&(ia(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+f+'".')),k5(o.children,t,p,f)),!(o.path==null&&!o.index)&&t.push({path:f,score:GG(f,o.index),routesMeta:p})};return e.forEach((o,s)=>{var a;if(o.path===""||!((a=o.path)!=null&&a.includes("?")))i(o,s);else for(let u of M5(o.path))i(o,s,u)}),t}function M5(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return i?[o,""]:[o];let s=M5(r.join("/")),a=[];return a.push(...s.map(u=>u===""?o:[o,u].join("/"))),i&&a.push(...s),a.map(u=>e.startsWith("/")&&u===""?"/":u)}function BG(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:qG(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const VG=/^:\w+$/,UG=3,jG=2,HG=1,KG=10,WG=-2,HO=e=>e==="*";function GG(e,t){let n=e.split("/"),r=n.length;return n.some(HO)&&(r+=WG),t&&(r+=jG),n.filter(i=>!HO(i)).reduce((i,o)=>i+(VG.test(o)?UG:o===""?HG:KG),r)}function qG(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function ZG(e,t){let{routesMeta:n}=e,r={},i="/",o=[];for(let s=0;s<n.length;++s){let a=n[s],u=s===n.length-1,f=i==="/"?t:t.slice(i.length)||"/",p=XG({path:a.relativePath,caseSensitive:a.caseSensitive,end:u},f);if(!p)return null;Object.assign(r,p.params);let g=a.route;o.push({params:r,pathname:Jf([i,p.pathname]),pathnameBase:eq(Jf([i,p.pathnameBase])),route:g}),p.pathnameBase!=="/"&&(i=Jf([i,p.pathnameBase]))}return o}function XG(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=YG(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let o=i[0],s=o.replace(/(.)\/+$/,"$1"),a=i.slice(1);return{params:r.reduce((f,p,g)=>{if(p==="*"){let v=a[g]||"";s=o.slice(0,o.length-v.length).replace(/(.)\/+$/,"$1")}return f[p]=JG(a[g]||"",p),f},{}),pathname:o,pathnameBase:s,pattern:e}}function YG(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),LT(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,(s,a)=>(r.push(a),"/([^\\/]+)"));return e.endsWith("*")?(r.push("*"),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function QG(e){try{return decodeURI(e)}catch(t){return LT(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function JG(e,t){try{return decodeURIComponent(e)}catch(n){return LT(!1,'The value for the URL param "'+t+'" will not be decoded because'+(' the string "'+e+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+n+").")),e}}function R5(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function LT(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}const Jf=e=>e.join("/").replace(/\/\/+/g,"/"),eq=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/");function tq(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const nq=["post","put","patch","delete"];[...nq];var y_={exports:{}},x_={};/**
* @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 rq=E.exports,iq=Symbol.for("react.element"),oq=Symbol.for("react.fragment"),aq=Object.prototype.hasOwnProperty,sq=rq.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,lq={key:!0,ref:!0,__self:!0,__source:!0};function O5(e,t,n){var r,i={},o=null,s=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(s=t.ref);for(r in t)aq.call(t,r)&&!lq.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:iq,type:e,key:o,ref:s,props:i,_owner:sq.current}}x_.Fragment=oq;x_.jsx=O5;x_.jsxs=O5;(function(e){e.exports=x_})(y_);const nr=y_.exports.Fragment,A=y_.exports.jsx,it=y_.exports.jsxs;/**
* React Router v6.8.1
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/function H2(){return H2=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},H2.apply(this,arguments)}function cq(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}const uq=typeof Object.is=="function"?Object.is:cq,{useState:dq,useEffect:fq,useLayoutEffect:hq,useDebugValue:pq}=P0;function mq(e,t,n){const r=t(),[{inst:i},o]=dq({inst:{value:r,getSnapshot:t}});return hq(()=>{i.value=r,i.getSnapshot=t,pC(i)&&o({inst:i})},[e,r,t]),fq(()=>(pC(i)&&o({inst:i}),e(()=>{pC(i)&&o({inst:i})})),[e]),pq(r),r}function pC(e){const t=e.getSnapshot,n=e.value;try{const r=t();return!uq(n,r)}catch{return!0}}function gq(e,t,n){return t()}const vq=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",yq=!vq,xq=yq?gq:mq;"useSyncExternalStore"in P0&&(e=>e.useSyncExternalStore)(P0);const D5=E.exports.createContext(null),A5=E.exports.createContext(null),N5=E.exports.createContext(null),b_=E.exports.createContext(null),__=E.exports.createContext({outlet:null,matches:[]}),L5=E.exports.createContext(null);function zT(){return E.exports.useContext(b_)!=null}function bq(){return zT()||ia(!1),E.exports.useContext(b_).location}function _q(e,t){zT()||ia(!1);let{navigator:n}=E.exports.useContext(N5),r=E.exports.useContext(A5),{matches:i}=E.exports.useContext(__),o=i[i.length-1],s=o?o.params:{};o&&o.pathname;let a=o?o.pathnameBase:"/";o&&o.route;let u=bq(),f;if(t){var p;let T=typeof t=="string"?v_(t):t;a==="/"||((p=T.pathname)==null?void 0:p.startsWith(a))||ia(!1),f=T}else f=u;let g=f.pathname||"/",v=a==="/"?g:g.slice(a.length)||"/",b=$G(e,{pathname:v}),_=Eq(b&&b.map(T=>Object.assign({},T,{params:Object.assign({},s,T.params),pathname:Jf([a,n.encodeLocation?n.encodeLocation(T.pathname).pathname:T.pathname]),pathnameBase:T.pathnameBase==="/"?a:Jf([a,n.encodeLocation?n.encodeLocation(T.pathnameBase).pathname:T.pathnameBase])})),i,r||void 0);return t&&_?A(b_.Provider,{value:{location:H2({pathname:"/",search:"",hash:"",state:null,key:"default"},f),navigationType:Dc.Pop},children:_}):_}function wq(){let e=kq(),t=tq(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null;return it(nr,{children:[A("h2",{children:"Unexpected Application Error!"}),A("h3",{style:{fontStyle:"italic"},children:t}),n?A("pre",{style:{padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},children:n}):null,null]})}class Cq extends E.exports.Component{constructor(t){super(t),this.state={location:t.location,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location?{error:t.error,location:t.location}:{error:t.error||n.error,location:n.location}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error?A(__.Provider,{value:this.props.routeContext,children:A(L5.Provider,{value:this.state.error,children:this.props.component})}):this.props.children}}function Sq(e){let{routeContext:t,match:n,children:r}=e,i=E.exports.useContext(D5);return i&&i.static&&i.staticContext&&n.route.errorElement&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),A(__.Provider,{value:t,children:r})}function Eq(e,t,n){if(t===void 0&&(t=[]),e==null)if(n!=null&&n.errors)e=n.matches;else return null;let r=e,i=n==null?void 0:n.errors;if(i!=null){let o=r.findIndex(s=>s.route.id&&(i==null?void 0:i[s.route.id]));o>=0||ia(!1),r=r.slice(0,Math.min(r.length,o+1))}return r.reduceRight((o,s,a)=>{let u=s.route.id?i==null?void 0:i[s.route.id]:null,f=n?s.route.errorElement||A(wq,{}):null,p=t.concat(r.slice(0,a+1)),g=()=>A(Sq,{match:s,routeContext:{outlet:o,matches:p},children:u?f:s.route.element!==void 0?s.route.element:o});return n&&(s.route.errorElement||a===0)?A(Cq,{location:n.location,component:f,error:u,children:g(),routeContext:{outlet:null,matches:p}}):g()},null)}var KO;(function(e){e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator"})(KO||(KO={}));var Q0;(function(e){e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator"})(Q0||(Q0={}));function Pq(e){let t=E.exports.useContext(A5);return t||ia(!1),t}function Tq(e){let t=E.exports.useContext(__);return t||ia(!1),t}function Iq(e){let t=Tq(),n=t.matches[t.matches.length-1];return n.route.id||ia(!1),n.route.id}function kq(){var e;let t=E.exports.useContext(L5),n=Pq(Q0.UseRouteError),r=Iq(Q0.UseRouteError);return t||((e=n.errors)==null?void 0:e[r])}function z5(e){ia(!1)}function Mq(e){let{basename:t="/",children:n=null,location:r,navigationType:i=Dc.Pop,navigator:o,static:s=!1}=e;zT()&&ia(!1);let a=t.replace(/^\/*/,"/"),u=E.exports.useMemo(()=>({basename:a,navigator:o,static:s}),[a,o,s]);typeof r=="string"&&(r=v_(r));let{pathname:f="/",search:p="",hash:g="",state:v=null,key:b="default"}=r,_=E.exports.useMemo(()=>{let T=R5(f,a);return T==null?null:{pathname:T,search:p,hash:g,state:v,key:b}},[a,f,p,g,v,b]);return _==null?null:A(N5.Provider,{value:u,children:A(b_.Provider,{children:n,value:{location:_,navigationType:i}})})}function Rq(e){let{children:t,location:n}=e,r=E.exports.useContext(D5),i=r&&!t?r.router.routes:K2(t);return _q(i,n)}var WO;(function(e){e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error"})(WO||(WO={}));new Promise(()=>{});function K2(e,t){t===void 0&&(t=[]);let n=[];return E.exports.Children.forEach(e,(r,i)=>{if(!E.exports.isValidElement(r))return;if(r.type===E.exports.Fragment){n.push.apply(n,K2(r.props.children,t));return}r.type!==z5&&ia(!1),!r.props.index||!r.props.children||ia(!1);let o=[...t,i],s={id:r.props.id||o.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,hasErrorBoundary:r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle};r.props.children&&(s.children=K2(r.props.children,o)),n.push(s)}),n}/**
* React Router DOM v6.8.1
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/function Oq(e){let{basename:t,children:n,window:r}=e,i=E.exports.useRef();i.current==null&&(i.current=LG({window:r,v5Compat:!0}));let o=i.current,[s,a]=E.exports.useState({action:o.action,location:o.location});return E.exports.useLayoutEffect(()=>o.listen(a),[o]),A(Mq,{basename:t,children:n,location:s.location,navigationType:s.action,navigator:o})}var GO;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmitImpl="useSubmitImpl",e.UseFetcher="useFetcher"})(GO||(GO={}));var qO;(function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(qO||(qO={}));var Dq="Expected a function",ZO=0/0,Aq="[object Symbol]",Nq=/^\s+|\s+$/g,Lq=/^[-+]0x[0-9a-f]+$/i,zq=/^0b[01]+$/i,Fq=/^0o[0-7]+$/i,$q=parseInt,Bq=typeof zl=="object"&&zl&&zl.Object===Object&&zl,Vq=typeof self=="object"&&self&&self.Object===Object&&self,Uq=Bq||Vq||Function("return this")(),jq=Object.prototype,Hq=jq.toString,Kq=Math.max,Wq=Math.min,mC=function(){return Uq.Date.now()};function Gq(e,t,n){var r,i,o,s,a,u,f=0,p=!1,g=!1,v=!0;if(typeof e!="function")throw new TypeError(Dq);t=XO(t)||0,W2(n)&&(p=!!n.leading,g="maxWait"in n,o=g?Kq(XO(n.maxWait)||0,t):o,v="trailing"in n?!!n.trailing:v);function b($){var j=r,U=i;return r=i=void 0,f=$,s=e.apply(U,j),s}function _($){return f=$,a=setTimeout(P,t),p?b($):s}function T($){var j=$-u,U=$-f,q=t-j;return g?Wq(q,o-U):q}function I($){var j=$-u,U=$-f;return u===void 0||j>=t||j<0||g&&U>=o}function P(){var $=mC();if(I($))return M($);a=setTimeout(P,T($))}function M($){return a=void 0,v&&r?b($):(r=i=void 0,s)}function D(){a!==void 0&&clearTimeout(a),f=0,r=u=i=a=void 0}function N(){return a===void 0?s:M(mC())}function z(){var $=mC(),j=I($);if(r=arguments,i=this,u=$,j){if(a===void 0)return _(u);if(g)return a=setTimeout(P,t),b(u)}return a===void 0&&(a=setTimeout(P,t)),s}return z.cancel=D,z.flush=N,z}function W2(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function qq(e){return!!e&&typeof e=="object"}function Zq(e){return typeof e=="symbol"||qq(e)&&Hq.call(e)==Aq}function XO(e){if(typeof e=="number")return e;if(Zq(e))return ZO;if(W2(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=W2(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(Nq,"");var n=zq.test(e);return n||Fq.test(e)?$q(e.slice(2),n?2:8):Lq.test(e)?ZO:+e}var Xq=Gq,F5={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(zl,function(){var n,r,i;function o(a,u){if(!n)n=u;else if(!r)r=u;else{var f="var sharedChunk = {}; ("+n+")(sharedChunk); ("+r+")(sharedChunk);",p={};n(p),i=u(p),typeof window<"u"&&(i.workerUrl=window.URL.createObjectURL(new Blob([f],{type:"text/javascript"})))}}o(["exports"],function(a){var u=f;function f(d,l,h,y){this.cx=3*d,this.bx=3*(h-d)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*l,this.by=3*(y-l)-this.cy,this.ay=1-this.cy-this.by,this.p1x=d,this.p1y=l,this.p2x=h,this.p2y=y}function p(d,l,h,y){const C=new u(d,l,h,y);return function(k){return C.solve(k)}}f.prototype={sampleCurveX:function(d){return((this.ax*d+this.bx)*d+this.cx)*d},sampleCurveY:function(d){return((this.ay*d+this.by)*d+this.cy)*d},sampleCurveDerivativeX:function(d){return(3*this.ax*d+2*this.bx)*d+this.cx},solveCurveX:function(d,l){if(l===void 0&&(l=1e-6),d<0)return 0;if(d>1)return 1;for(var h=d,y=0;y<8;y++){var C=this.sampleCurveX(h)-d;if(Math.abs(C)<l)return h;var k=this.sampleCurveDerivativeX(h);if(Math.abs(k)<1e-6)break;h-=C/k}var O=0,F=1;for(h=d,y=0;y<20&&(C=this.sampleCurveX(h),!(Math.abs(C-d)<l));y++)d>C?O=h:F=h,h=.5*(F-O)+O;return h},solve:function(d,l){return this.sampleCurveY(this.solveCurveX(d,l))}};const g=p(.25,.1,.25,1);function v(d,l,h){return Math.min(h,Math.max(l,d))}function b(d,l,h){const y=h-l,C=((d-l)%y+y)%y+l;return C===l?h:C}function _(d,...l){for(const h of l)for(const y in h)d[y]=h[y];return d}let T=1;function I(d,l){d.forEach(h=>{l[h]&&(l[h]=l[h].bind(l))})}function P(d,l,h){const y={};for(const C in d)y[C]=l.call(h||this,d[C],C,d);return y}function M(d,l,h){const y={};for(const C in d)l.call(h||this,d[C],C,d)&&(y[C]=d[C]);return y}function D(d){return Array.isArray(d)?d.map(D):typeof d=="object"&&d?P(d,D):d}const N={};function z(d){N[d]||(typeof console<"u"&&console.warn(d),N[d]=!0)}function $(d,l,h){return(h.y-d.y)*(l.x-d.x)>(l.y-d.y)*(h.x-d.x)}function j(d){let l=0;for(let h,y,C=0,k=d.length,O=k-1;C<k;O=C++)h=d[C],y=d[O],l+=(y.x-h.x)*(h.y+y.y);return l}function U(){return typeof WorkerGlobalScope<"u"&&typeof self<"u"&&self instanceof WorkerGlobalScope}function q(d){const l={};if(d.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(h,y,C,k)=>{const O=C||k;return l[y]=!O||O.toLowerCase(),""}),l["max-age"]){const h=parseInt(l["max-age"],10);isNaN(h)?delete l["max-age"]:l["max-age"]=h}return l}let Y,te,Z=null;function X(d){if(Z==null){const l=d.navigator?d.navigator.userAgent:null;Z=!!d.safari||!(!l||!(/\b(iPad|iPhone|iPod)\b/.test(l)||l.match("Safari")&&!l.match("Chrome")))}return Z}function J(d){return typeof ImageBitmap<"u"&&d instanceof ImageBitmap}const ue={now:typeof performance<"u"&&performance&&performance.now?performance.now.bind(performance):Date.now.bind(Date),frame(d){const l=requestAnimationFrame(d);return{cancel:()=>cancelAnimationFrame(l)}},getImageData(d,l=0){const h=window.document.createElement("canvas"),y=h.getContext("2d");if(!y)throw new Error("failed to create canvas 2d context");return h.width=d.width,h.height=d.height,y.drawImage(d,0,0,d.width,d.height),y.getImageData(-l,-l,d.width+2*l,d.height+2*l)},resolveURL:d=>(Y||(Y=document.createElement("a")),Y.href=d,Y.href),hardwareConcurrency:typeof navigator<"u"&&navigator.hardwareConcurrency||4,get prefersReducedMotion(){return!!matchMedia&&(te==null&&(te=matchMedia("(prefers-reduced-motion: reduce)")),te.matches)}};var re=se;function se(d,l){this.x=d,this.y=l}se.prototype={clone:function(){return new se(this.x,this.y)},add:function(d){return this.clone()._add(d)},sub:function(d){return this.clone()._sub(d)},multByPoint:function(d){return this.clone()._multByPoint(d)},divByPoint:function(d){return this.clone()._divByPoint(d)},mult:function(d){return this.clone()._mult(d)},div:function(d){return this.clone()._div(d)},rotate:function(d){return this.clone()._rotate(d)},rotateAround:function(d,l){return this.clone()._rotateAround(d,l)},matMult:function(d){return this.clone()._matMult(d)},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(d){return this.x===d.x&&this.y===d.y},dist:function(d){return Math.sqrt(this.distSqr(d))},distSqr:function(d){var l=d.x-this.x,h=d.y-this.y;return l*l+h*h},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(d){return Math.atan2(this.y-d.y,this.x-d.x)},angleWith:function(d){return this.angleWithSep(d.x,d.y)},angleWithSep:function(d,l){return Math.atan2(this.x*l-this.y*d,this.x*d+this.y*l)},_matMult:function(d){var l=d[2]*this.x+d[3]*this.y;return this.x=d[0]*this.x+d[1]*this.y,this.y=l,this},_add:function(d){return this.x+=d.x,this.y+=d.y,this},_sub:function(d){return this.x-=d.x,this.y-=d.y,this},_mult:function(d){return this.x*=d,this.y*=d,this},_div:function(d){return this.x/=d,this.y/=d,this},_multByPoint:function(d){return this.x*=d.x,this.y*=d.y,this},_divByPoint:function(d){return this.x/=d.x,this.y/=d.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var d=this.y;return this.y=this.x,this.x=-d,this},_rotate:function(d){var l=Math.cos(d),h=Math.sin(d),y=h*this.x+l*this.y;return this.x=l*this.x-h*this.y,this.y=y,this},_rotateAround:function(d,l){var h=Math.cos(d),y=Math.sin(d),C=l.y+y*(this.x-l.x)+h*(this.y-l.y);return this.x=l.x+h*(this.x-l.x)-y*(this.y-l.y),this.y=C,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},se.convert=function(d){return d instanceof se?d:Array.isArray(d)?new se(d[0],d[1]):d};const oe={MAX_PARALLEL_IMAGE_REQUESTS:16,REGISTERED_PROTOCOLS:{}},he="mapbox-tiles";let Ce,Se,be=500,Re=50;function Ie(){typeof caches>"u"||Ce||(Ce=caches.open(he))}let Me=1/0;const Ae={supported:!1,testSupport:function(d){!Ue&&Ke&&(pt?gt(d):ze=d)}};let ze,Ke,Ue=!1,pt=!1;function gt(d){const l=d.createTexture();d.bindTexture(d.TEXTURE_2D,l);try{if(d.texImage2D(d.TEXTURE_2D,0,d.RGBA,d.RGBA,d.UNSIGNED_BYTE,Ke),d.isContextLost())return;Ae.supported=!0}catch{}d.deleteTexture(l),Ue=!0}typeof document<"u"&&(Ke=document.createElement("img"),Ke.onload=function(){ze&&gt(ze),ze=null,pt=!0},Ke.onerror=function(){Ue=!0,ze=null},Ke.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");const Ot={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Image:"Image"};typeof Object.freeze=="function"&&Object.freeze(Ot);class qe extends Error{constructor(l,h,y,C){super(`AJAXError: ${h} (${l}): ${y}`),this.status=l,this.statusText=h,this.url=y,this.body=C}}const Ct=U()?()=>self.worker&&self.worker.referrer:()=>(window.location.protocol==="blob:"?window.parent:window).location.href;function ot(d,l){const h=new AbortController,y=new Request(d.url,{method:d.method||"GET",body:d.body,credentials:d.credentials,headers:d.headers,referrer:Ct(),signal:h.signal});let C=!1,k=!1;return d.type==="json"&&y.headers.set("Accept","application/json"),((O,F,B)=>{if(k)return;const K=Date.now();fetch(y).then(ee=>ee.ok?((ie,de,ge)=>{(d.type==="arrayBuffer"?ie.arrayBuffer():d.type==="json"?ie.json():ie.text()).then(ve=>{k||(de&&ge&&function(Ne,De,Qe){if(Ie(),!Ce)return;const ht={status:De.status,statusText:De.statusText,headers:new Headers};De.headers.forEach((lt,Rt)=>ht.headers.set(Rt,lt));const Ge=q(De.headers.get("Cache-Control")||"");Ge["no-store"]||(Ge["max-age"]&&ht.headers.set("Expires",new Date(Qe+1e3*Ge["max-age"]).toUTCString()),new Date(ht.headers.get("Expires")).getTime()-Qe<42e4||function(lt,Rt){if(Se===void 0)try{new Response(new ReadableStream),Se=!0}catch{Se=!1}Se?Rt(lt.body):lt.blob().then(Rt)}(De,lt=>{const Rt=new Response(lt,ht);Ie(),Ce&&Ce.then(kt=>kt.put(function(hn){const vn=hn.indexOf("?");return vn<0?hn:hn.slice(0,vn)}(Ne.url),Rt)).catch(kt=>z(kt.message))}))}(y,de,ge),C=!0,l(null,ve,ie.headers.get("Cache-Control"),ie.headers.get("Expires")))}).catch(ve=>{k||l(new Error(ve.message))})})(ee,null,K):ee.blob().then(ie=>l(new qe(ee.status,ee.statusText,d.url,ie)))).catch(ee=>{ee.code!==20&&l(new Error(ee.message))})})(),{cancel:()=>{k=!0,C||h.abort()}}}const vt=function(d,l){if(/:\/\//.test(d.url)&&!/^https?:|^file:/.test(d.url)){if(U()&&self.worker&&self.worker.actor)return self.worker.actor.send("getResource",d,l);if(!U()){const y=d.url.substring(0,d.url.indexOf("://"));return(oe.REGISTERED_PROTOCOLS[y]||ot)(d,l)}}if(!(/^file:/.test(h=d.url)||/^file:/.test(Ct())&&!/^\w+:/.test(h))){if(fetch&&Request&&AbortController&&Object.prototype.hasOwnProperty.call(Request.prototype,"signal"))return ot(d,l);if(U()&&self.worker&&self.worker.actor)return self.worker.actor.send("getResource",d,l,void 0,!0)}var h;return function(y,C){const k=new XMLHttpRequest;k.open(y.method||"GET",y.url,!0),y.type==="arrayBuffer"&&(k.responseType="arraybuffer");for(const O in y.headers)k.setRequestHeader(O,y.headers[O]);return y.type==="json"&&(k.responseType="text",k.setRequestHeader("Accept","application/json")),k.withCredentials=y.credentials==="include",k.onerror=()=>{C(new Error(k.statusText))},k.onload=()=>{if((k.status>=200&&k.status<300||k.status===0)&&k.response!==null){let O=k.response;if(y.type==="json")try{O=JSON.parse(k.response)}catch(F){return C(F)}C(null,O,k.getResponseHeader("Cache-Control"),k.getResponseHeader("Expires"))}else{const O=new Blob([k.response],{type:k.getResponseHeader("Content-Type")});C(new qe(k.status,k.statusText,y.url,O))}},k.send(y.body),{cancel:()=>k.abort()}}(d,l)},yt=function(d,l){return vt(_(d,{type:"arrayBuffer"}),l)};function Tt(d){const l=window.document.createElement("a");return l.href=d,l.protocol===window.document.location.protocol&&l.host===window.document.location.host}const et="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";let ct,at;ct=[],at=0;const He=function(d,l){if(Ae.supported&&(d.headers||(d.headers={}),d.headers.accept="image/webp,*/*"),at>=oe.MAX_PARALLEL_IMAGE_REQUESTS){const k={requestParameters:d,callback:l,cancelled:!1,cancel(){this.cancelled=!0}};return ct.push(k),k}at++;let h=!1;const y=()=>{if(!h)for(h=!0,at--;ct.length&&at<oe.MAX_PARALLEL_IMAGE_REQUESTS;){const k=ct.shift(),{requestParameters:O,callback:F,cancelled:B}=k;B||(k.cancel=He(O,F).cancel)}},C=yt(d,(k,O,F,B)=>{y(),k?l(k):O&&function(K,ee){typeof createImageBitmap=="function"?function(ie,de){const ge=new Blob([new Uint8Array(ie)],{type:"image/png"});createImageBitmap(ge).then(ve=>{de(null,ve)}).catch(ve=>{de(new Error(`Could not load image because of ${ve.message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`))})}(K,ee):function(ie,de){const ge=new Image;ge.onload=()=>{de(null,ge),URL.revokeObjectURL(ge.src),ge.onload=null,window.requestAnimationFrame(()=>{ge.src=et})},ge.onerror=()=>de(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 ve=new Blob([new Uint8Array(ie)],{type:"image/png"});ge.src=ie.byteLength?URL.createObjectURL(ve):et}(K,ee)}(O,(K,ee)=>{K!=null?l(K):ee!=null&&l(null,ee,{cacheControl:F,expires:B})})});return{cancel:()=>{C.cancel(),y()}}};function ut(d,l,h){h[d]&&h[d].indexOf(l)!==-1||(h[d]=h[d]||[],h[d].push(l))}function bt(d,l,h){if(h&&h[d]){const y=h[d].indexOf(l);y!==-1&&h[d].splice(y,1)}}class Dt{constructor(l,h={}){_(this,h),this.type=l}}class Lt extends Dt{constructor(l,h={}){super("error",_({error:l},h))}}class Ht{on(l,h){return this._listeners=this._listeners||{},ut(l,h,this._listeners),this}off(l,h){return bt(l,h,this._listeners),bt(l,h,this._oneTimeListeners),this}once(l,h){return this._oneTimeListeners=this._oneTimeListeners||{},ut(l,h,this._oneTimeListeners),this}fire(l,h){typeof l=="string"&&(l=new Dt(l,h||{}));const y=l.type;if(this.listens(y)){l.target=this;const C=this._listeners&&this._listeners[y]?this._listeners[y].slice():[];for(const F of C)F.call(this,l);const k=this._oneTimeListeners&&this._oneTimeListeners[y]?this._oneTimeListeners[y].slice():[];for(const F of k)bt(y,F,this._oneTimeListeners),F.call(this,l);const O=this._eventedParent;O&&(_(l,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),O.fire(l))}else l instanceof Lt&&console.error(l.error);return this}listens(l){return this._listeners&&this._listeners[l]&&this._listeners[l].length>0||this._oneTimeListeners&&this._oneTimeListeners[l]&&this._oneTimeListeners[l].length>0||this._eventedParent&&this._eventedParent.listens(l)}setEventedParent(l,h){return this._eventedParent=l,this._eventedParentData=h,this}}var Fe={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},terrain:{type:"terrain"},sources:{required:!0,type:"sources"},sprite:{type:"string"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{}},default:"mapbox"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"*"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_fill:{"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_circle:{"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image",{"!":"icon-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"padding",default:[2],units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},"viewport-glyph":{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field",{"!":"text-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},filter:{type:"array",value:"*"},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{},within:{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},terrain:{source:{type:"string",required:!0},exaggeration:{type:"number",minimum:0,default:1},elevationOffset:{type:"number",default:450}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}}};class Ye{constructor(l,h,y,C){this.message=(l?`${l}: `:"")+y,C&&(this.identifier=C),h!=null&&h.__line__&&(this.line=h.__line__)}}function Zt(d){const l=d.value;return l?[new Ye(d.key,l,"constants have been deprecated as of v8")]:[]}function an(d,...l){for(const h of l)for(const y in h)d[y]=h[y];return d}function Kt(d){return d instanceof Number||d instanceof String||d instanceof Boolean?d.valueOf():d}function Vt(d){if(Array.isArray(d))return d.map(Vt);if(d instanceof Object&&!(d instanceof Number||d instanceof String||d instanceof Boolean)){const l={};for(const h in d)l[h]=Vt(d[h]);return l}return Kt(d)}class It extends Error{constructor(l,h){super(h),this.message=h,this.key=l}}class Xt{constructor(l,h=[]){this.parent=l,this.bindings={};for(const[y,C]of h)this.bindings[y]=C}concat(l){return new Xt(this,l)}get(l){if(this.bindings[l])return this.bindings[l];if(this.parent)return this.parent.get(l);throw new Error(`${l} not found in scope.`)}has(l){return!!this.bindings[l]||!!this.parent&&this.parent.has(l)}}const pn={kind:"null"},tt={kind:"number"},At={kind:"string"},qt={kind:"boolean"},En={kind:"color"},yn={kind:"object"},St={kind:"value"},Pn={kind:"collator"},_n={kind:"formatted"},tn={kind:"padding"},Ft={kind:"resolvedImage"};function dt(d,l){return{kind:"array",itemType:d,N:l}}function mt(d){if(d.kind==="array"){const l=mt(d.itemType);return typeof d.N=="number"?`array<${l}, ${d.N}>`:d.itemType.kind==="value"?"array":`array<${l}>`}return d.kind}const $t=[pn,tt,At,qt,En,_n,yn,dt(St),tn,Ft];function Wt(d,l){if(l.kind==="error")return null;if(d.kind==="array"){if(l.kind==="array"&&(l.N===0&&l.itemType.kind==="value"||!Wt(d.itemType,l.itemType))&&(typeof d.N!="number"||d.N===l.N))return null}else{if(d.kind===l.kind)return null;if(d.kind==="value"){for(const h of $t)if(!Wt(h,l))return null}}return`Expected ${mt(d)} but found ${mt(l)} instead.`}function mn(d,l){return l.some(h=>h.kind===d.kind)}function An(d,l){return l.some(h=>h==="null"?d===null:h==="array"?Array.isArray(d):h==="object"?d&&!Array.isArray(d)&&typeof d=="object":h===typeof d)}var Qn,Jn={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 ye(d){return(d=Math.round(d))<0?0:d>255?255:d}function W(d){return ye(d[d.length-1]==="%"?parseFloat(d)/100*255:parseInt(d))}function Q(d){return(l=d[d.length-1]==="%"?parseFloat(d)/100:parseFloat(d))<0?0:l>1?1:l;var l}function fe(d,l,h){return h<0?h+=1:h>1&&(h-=1),6*h<1?d+(l-d)*h*6:2*h<1?l:3*h<2?d+(l-d)*(2/3-h)*6:d}try{Qn={}.parseCSSColor=function(d){var l,h=d.replace(/ /g,"").toLowerCase();if(h in Jn)return Jn[h].slice();if(h[0]==="#")return h.length===4?(l=parseInt(h.substr(1),16))>=0&&l<=4095?[(3840&l)>>4|(3840&l)>>8,240&l|(240&l)>>4,15&l|(15&l)<<4,1]:null:h.length===7&&(l=parseInt(h.substr(1),16))>=0&&l<=16777215?[(16711680&l)>>16,(65280&l)>>8,255&l,1]:null;var y=h.indexOf("("),C=h.indexOf(")");if(y!==-1&&C+1===h.length){var k=h.substr(0,y),O=h.substr(y+1,C-(y+1)).split(","),F=1;switch(k){case"rgba":if(O.length!==4)return null;F=Q(O.pop());case"rgb":return O.length!==3?null:[W(O[0]),W(O[1]),W(O[2]),F];case"hsla":if(O.length!==4)return null;F=Q(O.pop());case"hsl":if(O.length!==3)return null;var B=(parseFloat(O[0])%360+360)%360/360,K=Q(O[1]),ee=Q(O[2]),ie=ee<=.5?ee*(K+1):ee+K-ee*K,de=2*ee-ie;return[ye(255*fe(de,ie,B+1/3)),ye(255*fe(de,ie,B)),ye(255*fe(de,ie,B-1/3)),F];default:return null}}return null}}catch{}class ce{constructor(l,h,y,C=1){this.r=l,this.g=h,this.b=y,this.a=C}static parse(l){if(!l)return;if(l instanceof ce)return l;if(typeof l!="string")return;const h=Qn(l);return h?new ce(h[0]/255*h[3],h[1]/255*h[3],h[2]/255*h[3],h[3]):void 0}toString(){const[l,h,y,C]=this.toArray();return`rgba(${Math.round(l)},${Math.round(h)},${Math.round(y)},${C})`}toArray(){const{r:l,g:h,b:y,a:C}=this;return C===0?[0,0,0,0]:[255*l/C,255*h/C,255*y/C,C]}}ce.black=new ce(0,0,0,1),ce.white=new ce(1,1,1,1),ce.transparent=new ce(0,0,0,0),ce.red=new ce(1,0,0,1);class xe{constructor(l,h,y){this.sensitivity=l?h?"variant":"case":h?"accent":"base",this.locale=y,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(l,h){return this.collator.compare(l,h)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class ke{constructor(l,h,y,C,k){this.text=l,this.image=h,this.scale=y,this.fontStack=C,this.textColor=k}}class we{constructor(l){this.sections=l}static fromString(l){return new we([new ke(l,null,null,null,null)])}isEmpty(){return this.sections.length===0||!this.sections.some(l=>l.text.length!==0||l.image&&l.image.name.length!==0)}static factory(l){return l instanceof we?l:we.fromString(l)}toString(){return this.sections.length===0?"":this.sections.map(l=>l.text).join("")}}class Pe{constructor(l){this.values=l.slice()}static parse(l){if(l instanceof Pe)return l;if(typeof l=="number")return new Pe([l,l,l,l]);if(Array.isArray(l)&&!(l.length<1||l.length>4)){for(const h of l)if(typeof h!="number")return;switch(l.length){case 1:l=[l[0],l[0],l[0],l[0]];break;case 2:l=[l[0],l[1],l[0],l[1]];break;case 3:l=[l[0],l[1],l[2],l[1]]}return new Pe(l)}}toString(){return JSON.stringify(this.values)}}class Le{constructor(l){this.name=l.name,this.available=l.available}toString(){return this.name}static fromString(l){return l?new Le({name:l,available:!1}):null}}function Ze(d,l,h,y){return typeof d=="number"&&d>=0&&d<=255&&typeof l=="number"&&l>=0&&l<=255&&typeof h=="number"&&h>=0&&h<=255?y===void 0||typeof y=="number"&&y>=0&&y<=1?null:`Invalid rgba value [${[d,l,h,y].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof y=="number"?[d,l,h,y]:[d,l,h]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function Xe(d){if(d===null||typeof d=="string"||typeof d=="boolean"||typeof d=="number"||d instanceof ce||d instanceof xe||d instanceof we||d instanceof Pe||d instanceof Le)return!0;if(Array.isArray(d)){for(const l of d)if(!Xe(l))return!1;return!0}if(typeof d=="object"){for(const l in d)if(!Xe(d[l]))return!1;return!0}return!1}function Ve(d){if(d===null)return pn;if(typeof d=="string")return At;if(typeof d=="boolean")return qt;if(typeof d=="number")return tt;if(d instanceof ce)return En;if(d instanceof xe)return Pn;if(d instanceof we)return _n;if(d instanceof Pe)return tn;if(d instanceof Le)return Ft;if(Array.isArray(d)){const l=d.length;let h;for(const y of d){const C=Ve(y);if(h){if(h===C)continue;h=St;break}h=C}return dt(h||St,l)}return yn}function Bt(d){const l=typeof d;return d===null?"":l==="string"||l==="number"||l==="boolean"?String(d):d instanceof ce||d instanceof we||d instanceof Pe||d instanceof Le?d.toString():JSON.stringify(d)}class Et{constructor(l,h){this.type=l,this.value=h}static parse(l,h){if(l.length!==2)return h.error(`'literal' expression requires exactly one argument, but found ${l.length-1} instead.`);if(!Xe(l[1]))return h.error("invalid value");const y=l[1];let C=Ve(y);const k=h.expectedType;return C.kind!=="array"||C.N!==0||!k||k.kind!=="array"||typeof k.N=="number"&&k.N!==0||(C=k),new Et(C,y)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}class nt{constructor(l){this.name="ExpressionEvaluationError",this.message=l}toJSON(){return this.message}}const zt={string:At,number:tt,boolean:qt,object:yn};class Gt{constructor(l,h){this.type=l,this.args=h}static parse(l,h){if(l.length<2)return h.error("Expected at least one argument.");let y,C=1;const k=l[0];if(k==="array"){let F,B;if(l.length>2){const K=l[1];if(typeof K!="string"||!(K in zt)||K==="object")return h.error('The item type argument of "array" must be one of string, number, boolean',1);F=zt[K],C++}else F=St;if(l.length>3){if(l[2]!==null&&(typeof l[2]!="number"||l[2]<0||l[2]!==Math.floor(l[2])))return h.error('The length argument to "array" must be a positive integer literal',2);B=l[2],C++}y=dt(F,B)}else{if(!zt[k])throw new Error(`Types doesn't contain name = ${k}`);y=zt[k]}const O=[];for(;C<l.length;C++){const F=h.parse(l[C],C,St);if(!F)return null;O.push(F)}return new Gt(y,O)}evaluate(l){for(let h=0;h<this.args.length;h++){const y=this.args[h].evaluate(l);if(!Wt(this.type,Ve(y)))return y;if(h===this.args.length-1)throw new nt(`Expected value to be of type ${mt(this.type)}, but found ${mt(Ve(y))} instead.`)}throw new Error}eachChild(l){this.args.forEach(l)}outputDefined(){return this.args.every(l=>l.outputDefined())}}const wn={"to-boolean":qt,"to-color":En,"to-number":tt,"to-string":At};class dn{constructor(l,h){this.type=l,this.args=h}static parse(l,h){if(l.length<2)return h.error("Expected at least one argument.");const y=l[0];if(!wn[y])throw new Error(`Can't parse ${y} as it is not part of the known types`);if((y==="to-boolean"||y==="to-string")&&l.length!==2)return h.error("Expected one argument.");const C=wn[y],k=[];for(let O=1;O<l.length;O++){const F=h.parse(l[O],O,St);if(!F)return null;k.push(F)}return new dn(C,k)}evaluate(l){if(this.type.kind==="boolean")return Boolean(this.args[0].evaluate(l));if(this.type.kind==="color"){let h,y;for(const C of this.args){if(h=C.evaluate(l),y=null,h instanceof ce)return h;if(typeof h=="string"){const k=l.parseColor(h);if(k)return k}else if(Array.isArray(h)&&(y=h.length<3||h.length>4?`Invalid rbga value ${JSON.stringify(h)}: expected an array containing either three or four numeric values.`:Ze(h[0],h[1],h[2],h[3]),!y))return new ce(h[0]/255,h[1]/255,h[2]/255,h[3])}throw new nt(y||`Could not parse color from value '${typeof h=="string"?h:JSON.stringify(h)}'`)}if(this.type.kind==="padding"){let h;for(const y of this.args){h=y.evaluate(l);const C=Pe.parse(h);if(C)return C}throw new nt(`Could not parse padding from value '${typeof h=="string"?h:JSON.stringify(h)}'`)}if(this.type.kind==="number"){let h=null;for(const y of this.args){if(h=y.evaluate(l),h===null)return 0;const C=Number(h);if(!isNaN(C))return C}throw new nt(`Could not convert ${JSON.stringify(h)} to number.`)}return this.type.kind==="formatted"?we.fromString(Bt(this.args[0].evaluate(l))):this.type.kind==="resolvedImage"?Le.fromString(Bt(this.args[0].evaluate(l))):Bt(this.args[0].evaluate(l))}eachChild(l){this.args.forEach(l)}outputDefined(){return this.args.every(l=>l.outputDefined())}}const Cn=["Unknown","Point","LineString","Polygon"];class jn{constructor(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null}id(){return this.feature&&"id"in this.feature?this.feature.id:null}geometryType(){return this.feature?typeof this.feature.type=="number"?Cn[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||{}}parseColor(l){let h=this._parseColorCache[l];return h||(h=this._parseColorCache[l]=ce.parse(l)),h}}class or{constructor(l,h,y,C){this.name=l,this.type=h,this._evaluate=y,this.args=C}evaluate(l){return this._evaluate(l,this.args)}eachChild(l){this.args.forEach(l)}outputDefined(){return!1}static parse(l,h){const y=l[0],C=or.definitions[y];if(!C)return h.error(`Unknown expression "${y}". If you wanted a literal array, use ["literal", [...]].`,0);const k=Array.isArray(C)?C[0]:C.type,O=Array.isArray(C)?[[C[1],C[2]]]:C.overloads,F=O.filter(([K])=>!Array.isArray(K)||K.length===l.length-1);let B=null;for(const[K,ee]of F){B=new As(h.registry,h.path,null,h.scope);const ie=[];let de=!1;for(let ge=1;ge<l.length;ge++){const ve=l[ge],Ne=Array.isArray(K)?K[ge-1]:K.type,De=B.parse(ve,1+ie.length,Ne);if(!De){de=!0;break}ie.push(De)}if(!de)if(Array.isArray(K)&&K.length!==ie.length)B.error(`Expected ${K.length} arguments, but found ${ie.length} instead.`);else{for(let ge=0;ge<ie.length;ge++){const ve=Array.isArray(K)?K[ge]:K.type,Ne=ie[ge];B.concat(ge+1).checkSubtype(ve,Ne.type)}if(B.errors.length===0)return new or(y,k,ee,ie)}}if(F.length===1)h.errors.push(...B.errors);else{const K=(F.length?F:O).map(([ie])=>{return de=ie,Array.isArray(de)?`(${de.map(mt).join(", ")})`:`(${mt(de.type)}...)`;var de}).join(" | "),ee=[];for(let ie=1;ie<l.length;ie++){const de=h.parse(l[ie],1+ee.length);if(!de)return null;ee.push(mt(de.type))}h.error(`Expected arguments of type ${K}, but found (${ee.join(", ")}) instead.`)}return null}static register(l,h){or.definitions=h;for(const y in h)l[y]=or}}class Wr{constructor(l,h,y){this.type=Pn,this.locale=y,this.caseSensitive=l,this.diacriticSensitive=h}static parse(l,h){if(l.length!==2)return h.error("Expected one argument.");const y=l[1];if(typeof y!="object"||Array.isArray(y))return h.error("Collator options argument must be an object.");const C=h.parse(y["case-sensitive"]!==void 0&&y["case-sensitive"],1,qt);if(!C)return null;const k=h.parse(y["diacritic-sensitive"]!==void 0&&y["diacritic-sensitive"],1,qt);if(!k)return null;let O=null;return y.locale&&(O=h.parse(y.locale,1,At),!O)?null:new Wr(C,k,O)}evaluate(l){return new xe(this.caseSensitive.evaluate(l),this.diacriticSensitive.evaluate(l),this.locale?this.locale.evaluate(l):null)}eachChild(l){l(this.caseSensitive),l(this.diacriticSensitive),this.locale&&l(this.locale)}outputDefined(){return!1}}const dr=8192;function zr(d,l){d[0]=Math.min(d[0],l[0]),d[1]=Math.min(d[1],l[1]),d[2]=Math.max(d[2],l[0]),d[3]=Math.max(d[3],l[1])}function On(d,l){return!(d[0]<=l[0]||d[2]>=l[2]||d[1]<=l[1]||d[3]>=l[3])}function Mn(d,l){const h=(180+d[0])/360,y=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+d[1]*Math.PI/360)))/360,C=Math.pow(2,l.z);return[Math.round(h*C*dr),Math.round(y*C*dr)]}function Nn(d,l,h){const y=d[0]-l[0],C=d[1]-l[1],k=d[0]-h[0],O=d[1]-h[1];return y*O-k*C==0&&y*k<=0&&C*O<=0}function ti(d,l){let h=!1;for(let O=0,F=l.length;O<F;O++){const B=l[O];for(let K=0,ee=B.length;K<ee-1;K++){if(Nn(d,B[K],B[K+1]))return!1;(C=B[K])[1]>(y=d)[1]!=(k=B[K+1])[1]>y[1]&&y[0]<(k[0]-C[0])*(y[1]-C[1])/(k[1]-C[1])+C[0]&&(h=!h)}}var y,C,k;return h}function wr(d,l){for(let h=0;h<l.length;h++)if(ti(d,l[h]))return!0;return!1}function Wn(d,l,h,y){const C=y[0]-h[0],k=y[1]-h[1],O=(d[0]-h[0])*k-C*(d[1]-h[1]),F=(l[0]-h[0])*k-C*(l[1]-h[1]);return O>0&&F<0||O<0&&F>0}function Bn(d,l,h){for(const K of h)for(let ee=0;ee<K.length-1;++ee)if((F=[(O=K[ee+1])[0]-(k=K[ee])[0],O[1]-k[1]])[0]*(B=[(C=l)[0]-(y=d)[0],C[1]-y[1]])[1]-F[1]*B[0]!=0&&Wn(y,C,k,O)&&Wn(k,O,y,C))return!0;var y,C,k,O,F,B;return!1}function rr(d,l){for(let h=0;h<d.length;++h)if(!ti(d[h],l))return!1;for(let h=0;h<d.length-1;++h)if(Bn(d[h],d[h+1],l))return!1;return!0}function Er(d,l){for(let h=0;h<l.length;h++)if(rr(d,l[h]))return!0;return!1}function Tr(d,l,h){const y=[];for(let C=0;C<d.length;C++){const k=[];for(let O=0;O<d[C].length;O++){const F=Mn(d[C][O],h);zr(l,F),k.push(F)}y.push(k)}return y}function Gr(d,l,h){const y=[];for(let C=0;C<d.length;C++){const k=Tr(d[C],l,h);y.push(k)}return y}function ko(d,l,h,y){if(d[0]<h[0]||d[0]>h[2]){const C=.5*y;let k=d[0]-h[0]>C?-y:h[0]-d[0]>C?y:0;k===0&&(k=d[0]-h[2]>C?-y:h[2]-d[0]>C?y:0),d[0]+=k}zr(l,d)}function rc(d,l,h,y){const C=Math.pow(2,y.z)*dr,k=[y.x*dr,y.y*dr],O=[];for(const F of d)for(const B of F){const K=[B.x+k[0],B.y+k[1]];ko(K,l,h,C),O.push(K)}return O}function Wd(d,l,h,y){const C=Math.pow(2,y.z)*dr,k=[y.x*dr,y.y*dr],O=[];for(const B of d){const K=[];for(const ee of B){const ie=[ee.x+k[0],ee.y+k[1]];zr(l,ie),K.push(ie)}O.push(K)}if(l[2]-l[0]<=C/2){(F=l)[0]=F[1]=1/0,F[2]=F[3]=-1/0;for(const B of O)for(const K of B)ko(K,l,h,C)}var F;return O}class ls{constructor(l,h){this.type=qt,this.geojson=l,this.geometries=h}static parse(l,h){if(l.length!==2)return h.error(`'within' expression requires exactly one argument, but found ${l.length-1} instead.`);if(Xe(l[1])){const y=l[1];if(y.type==="FeatureCollection")for(let C=0;C<y.features.length;++C){const k=y.features[C].geometry.type;if(k==="Polygon"||k==="MultiPolygon")return new ls(y,y.features[C].geometry)}else if(y.type==="Feature"){const C=y.geometry.type;if(C==="Polygon"||C==="MultiPolygon")return new ls(y,y.geometry)}else if(y.type==="Polygon"||y.type==="MultiPolygon")return new ls(y,y)}return h.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(l){if(l.geometry()!=null&&l.canonicalID()!=null){if(l.geometryType()==="Point")return function(h,y){const C=[1/0,1/0,-1/0,-1/0],k=[1/0,1/0,-1/0,-1/0],O=h.canonicalID();if(y.type==="Polygon"){const F=Tr(y.coordinates,k,O),B=rc(h.geometry(),C,k,O);if(!On(C,k))return!1;for(const K of B)if(!ti(K,F))return!1}if(y.type==="MultiPolygon"){const F=Gr(y.coordinates,k,O),B=rc(h.geometry(),C,k,O);if(!On(C,k))return!1;for(const K of B)if(!wr(K,F))return!1}return!0}(l,this.geometries);if(l.geometryType()==="LineString")return function(h,y){const C=[1/0,1/0,-1/0,-1/0],k=[1/0,1/0,-1/0,-1/0],O=h.canonicalID();if(y.type==="Polygon"){const F=Tr(y.coordinates,k,O),B=Wd(h.geometry(),C,k,O);if(!On(C,k))return!1;for(const K of B)if(!rr(K,F))return!1}if(y.type==="MultiPolygon"){const F=Gr(y.coordinates,k,O),B=Wd(h.geometry(),C,k,O);if(!On(C,k))return!1;for(const K of B)if(!Er(K,F))return!1}return!0}(l,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}function Vn(d){if(d instanceof or&&(d.name==="get"&&d.args.length===1||d.name==="feature-state"||d.name==="has"&&d.args.length===1||d.name==="properties"||d.name==="geometry-type"||d.name==="id"||/^filter-/.test(d.name))||d instanceof ls)return!1;let l=!0;return d.eachChild(h=>{l&&!Vn(h)&&(l=!1)}),l}function er(d){if(d instanceof or&&d.name==="feature-state")return!1;let l=!0;return d.eachChild(h=>{l&&!er(h)&&(l=!1)}),l}function Fr(d,l){if(d instanceof or&&l.indexOf(d.name)>=0)return!1;let h=!0;return d.eachChild(y=>{h&&!Fr(y,l)&&(h=!1)}),h}class zi{constructor(l,h){this.type=h.type,this.name=l,this.boundExpression=h}static parse(l,h){if(l.length!==2||typeof l[1]!="string")return h.error("'var' expression requires exactly one string literal argument.");const y=l[1];return h.scope.has(y)?new zi(y,h.scope.get(y)):h.error(`Unknown variable "${y}". Make sure "${y}" has been bound in an enclosing "let" expression before using it.`,1)}evaluate(l){return this.boundExpression.evaluate(l)}eachChild(){}outputDefined(){return!1}}class As{constructor(l,h=[],y,C=new Xt,k=[]){this.registry=l,this.path=h,this.key=h.map(O=>`[${O}]`).join(""),this.scope=C,this.errors=k,this.expectedType=y}parse(l,h,y,C,k={}){return h?this.concat(h,y,C)._parse(l,k):this._parse(l,k)}_parse(l,h){function y(C,k,O){return O==="assert"?new Gt(k,[C]):O==="coerce"?new dn(k,[C]):C}if(l!==null&&typeof l!="string"&&typeof l!="boolean"&&typeof l!="number"||(l=["literal",l]),Array.isArray(l)){if(l.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');const C=l[0];if(typeof C!="string")return this.error(`Expression name must be a string, but found ${typeof C} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;const k=this.registry[C];if(k){let O=k.parse(l,this);if(!O)return null;if(this.expectedType){const F=this.expectedType,B=O.type;if(F.kind!=="string"&&F.kind!=="number"&&F.kind!=="boolean"&&F.kind!=="object"&&F.kind!=="array"||B.kind!=="value")if(F.kind!=="color"&&F.kind!=="formatted"&&F.kind!=="resolvedImage"||B.kind!=="value"&&B.kind!=="string")if(F.kind!=="padding"||B.kind!=="value"&&B.kind!=="number"&&B.kind!=="array"){if(this.checkSubtype(F,B))return null}else O=y(O,F,h.typeAnnotation||"coerce");else O=y(O,F,h.typeAnnotation||"coerce");else O=y(O,F,h.typeAnnotation||"assert")}if(!(O instanceof Et)&&O.type.kind!=="resolvedImage"&&Ho(O)){const F=new jn;try{O=new Et(O.type,O.evaluate(F))}catch(B){return this.error(B.message),null}}return O}return this.error(`Unknown expression "${C}". If you wanted a literal array, use ["literal", [...]].`,0)}return this.error(l===void 0?"'undefined' value invalid. Use null instead.":typeof l=="object"?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof l} instead.`)}concat(l,h,y){const C=typeof l=="number"?this.path.concat(l):this.path,k=y?this.scope.concat(y):this.scope;return new As(this.registry,C,h||null,k,this.errors)}error(l,...h){const y=`${this.key}${h.map(C=>`[${C}]`).join("")}`;this.errors.push(new It(y,l))}checkSubtype(l,h){const y=Wt(l,h);return y&&this.error(y),y}}function Ho(d){if(d instanceof zi)return Ho(d.boundExpression);if(d instanceof or&&d.name==="error"||d instanceof Wr||d instanceof ls)return!1;const l=d instanceof dn||d instanceof Gt;let h=!0;return d.eachChild(y=>{h=l?h&&Ho(y):h&&y instanceof Et}),!!h&&Vn(d)&&Fr(d,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}function dl(d,l){const h=d.length-1;let y,C,k=0,O=h,F=0;for(;k<=O;)if(F=Math.floor((k+O)/2),y=d[F],C=d[F+1],y<=l){if(F===h||l<C)return F;k=F+1}else{if(!(y>l))throw new nt("Input is not a number.");O=F-1}return 0}class cs{constructor(l,h,y){this.type=l,this.input=h,this.labels=[],this.outputs=[];for(const[C,k]of y)this.labels.push(C),this.outputs.push(k)}static parse(l,h){if(l.length-1<4)return h.error(`Expected at least 4 arguments, but found only ${l.length-1}.`);if((l.length-1)%2!=0)return h.error("Expected an even number of arguments.");const y=h.parse(l[1],1,tt);if(!y)return null;const C=[];let k=null;h.expectedType&&h.expectedType.kind!=="value"&&(k=h.expectedType);for(let O=1;O<l.length;O+=2){const F=O===1?-1/0:l[O],B=l[O+1],K=O,ee=O+1;if(typeof F!="number")return h.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',K);if(C.length&&C[C.length-1][0]>=F)return h.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',K);const ie=h.parse(B,ee,k);if(!ie)return null;k=k||ie.type,C.push([F,ie])}return new cs(k,y,C)}evaluate(l){const h=this.labels,y=this.outputs;if(h.length===1)return y[0].evaluate(l);const C=this.input.evaluate(l);if(C<=h[0])return y[0].evaluate(l);const k=h.length;return C>=h[k-1]?y[k-1].evaluate(l):y[dl(h,C)].evaluate(l)}eachChild(l){l(this.input);for(const h of this.outputs)l(h)}outputDefined(){return this.outputs.every(l=>l.outputDefined())}}function Cr(d,l,h){return d*(1-h)+l*h}var us=Object.freeze({__proto__:null,number:Cr,color:function(d,l,h){return new ce(Cr(d.r,l.r,h),Cr(d.g,l.g,h),Cr(d.b,l.b,h),Cr(d.a,l.a,h))},array:function(d,l,h){return d.map((y,C)=>Cr(y,l[C],h))},padding:function(d,l,h){const y=d.values,C=l.values;return new Pe([Cr(y[0],C[0],h),Cr(y[1],C[1],h),Cr(y[2],C[2],h),Cr(y[3],C[3],h)])}});const Av=.95047,Nv=1.08883,ep=4/29,Gd=6/29,Lv=3*Gd*Gd,$1=Math.PI/180,B1=180/Math.PI;function tp(d){return d>.008856451679035631?Math.pow(d,1/3):d/Lv+ep}function np(d){return d>Gd?d*d*d:Lv*(d-ep)}function rp(d){return 255*(d<=.0031308?12.92*d:1.055*Math.pow(d,1/2.4)-.055)}function ip(d){return(d/=255)<=.04045?d/12.92:Math.pow((d+.055)/1.055,2.4)}function fr(d){const l=ip(d.r),h=ip(d.g),y=ip(d.b),C=tp((.4124564*l+.3575761*h+.1804375*y)/Av),k=tp((.2126729*l+.7151522*h+.072175*y)/1);return{l:116*k-16,a:500*(C-k),b:200*(k-tp((.0193339*l+.119192*h+.9503041*y)/Nv)),alpha:d.a}}function zv(d){let l=(d.l+16)/116,h=isNaN(d.a)?l:l+d.a/500,y=isNaN(d.b)?l:l-d.b/200;return l=1*np(l),h=Av*np(h),y=Nv*np(y),new ce(rp(3.2404542*h-1.5371385*l-.4985314*y),rp(-.969266*h+1.8760108*l+.041556*y),rp(.0556434*h-.2040259*l+1.0572252*y),d.alpha)}function V1(d,l,h){const y=l-d;return d+h*(y>180||y<-180?y-360*Math.round(y/360):y)}const vu={forward:fr,reverse:zv,interpolate:function(d,l,h){return{l:Cr(d.l,l.l,h),a:Cr(d.a,l.a,h),b:Cr(d.b,l.b,h),alpha:Cr(d.alpha,l.alpha,h)}}},yu={forward:function(d){const{l,a:h,b:y}=fr(d),C=Math.atan2(y,h)*B1;return{h:C<0?C+360:C,c:Math.sqrt(h*h+y*y),l,alpha:d.a}},reverse:function(d){const l=d.h*$1,h=d.c;return zv({l:d.l,a:Math.cos(l)*h,b:Math.sin(l)*h,alpha:d.alpha})},interpolate:function(d,l,h){return{h:V1(d.h,l.h,h),c:Cr(d.c,l.c,h),l:Cr(d.l,l.l,h),alpha:Cr(d.alpha,l.alpha,h)}}};var Fv=Object.freeze({__proto__:null,lab:vu,hcl:yu});class Mo{constructor(l,h,y,C,k){this.type=l,this.operator=h,this.interpolation=y,this.input=C,this.labels=[],this.outputs=[];for(const[O,F]of k)this.labels.push(O),this.outputs.push(F)}static interpolationFactor(l,h,y,C){let k=0;if(l.name==="exponential")k=op(h,l.base,y,C);else if(l.name==="linear")k=op(h,1,y,C);else if(l.name==="cubic-bezier"){const O=l.controlPoints;k=new u(O[0],O[1],O[2],O[3]).solve(op(h,1,y,C))}return k}static parse(l,h){let[y,C,k,...O]=l;if(!Array.isArray(C)||C.length===0)return h.error("Expected an interpolation type expression.",1);if(C[0]==="linear")C={name:"linear"};else if(C[0]==="exponential"){const K=C[1];if(typeof K!="number")return h.error("Exponential interpolation requires a numeric base.",1,1);C={name:"exponential",base:K}}else{if(C[0]!=="cubic-bezier")return h.error(`Unknown interpolation type ${String(C[0])}`,1,0);{const K=C.slice(1);if(K.length!==4||K.some(ee=>typeof ee!="number"||ee<0||ee>1))return h.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);C={name:"cubic-bezier",controlPoints:K}}}if(l.length-1<4)return h.error(`Expected at least 4 arguments, but found only ${l.length-1}.`);if((l.length-1)%2!=0)return h.error("Expected an even number of arguments.");if(k=h.parse(k,2,tt),!k)return null;const F=[];let B=null;y==="interpolate-hcl"||y==="interpolate-lab"?B=En:h.expectedType&&h.expectedType.kind!=="value"&&(B=h.expectedType);for(let K=0;K<O.length;K+=2){const ee=O[K],ie=O[K+1],de=K+3,ge=K+4;if(typeof ee!="number")return h.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',de);if(F.length&&F[F.length-1][0]>=ee)return h.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',de);const ve=h.parse(ie,ge,B);if(!ve)return null;B=B||ve.type,F.push([ee,ve])}return B.kind==="number"||B.kind==="color"||B.kind==="padding"||B.kind==="array"&&B.itemType.kind==="number"&&typeof B.N=="number"?new Mo(B,y,C,k,F):h.error(`Type ${mt(B)} is not interpolatable.`)}evaluate(l){const h=this.labels,y=this.outputs;if(h.length===1)return y[0].evaluate(l);const C=this.input.evaluate(l);if(C<=h[0])return y[0].evaluate(l);const k=h.length;if(C>=h[k-1])return y[k-1].evaluate(l);const O=dl(h,C),F=Mo.interpolationFactor(this.interpolation,C,h[O],h[O+1]),B=y[O].evaluate(l),K=y[O+1].evaluate(l);return this.operator==="interpolate"?us[this.type.kind.toLowerCase()](B,K,F):this.operator==="interpolate-hcl"?yu.reverse(yu.interpolate(yu.forward(B),yu.forward(K),F)):vu.reverse(vu.interpolate(vu.forward(B),vu.forward(K),F))}eachChild(l){l(this.input);for(const h of this.outputs)l(h)}outputDefined(){return this.outputs.every(l=>l.outputDefined())}}function op(d,l,h,y){const C=y-h,k=d-h;return C===0?0:l===1?k/C:(Math.pow(l,k)-1)/(Math.pow(l,C)-1)}class qd{constructor(l,h){this.type=l,this.args=h}static parse(l,h){if(l.length<2)return h.error("Expectected at least one argument.");let y=null;const C=h.expectedType;C&&C.kind!=="value"&&(y=C);const k=[];for(const F of l.slice(1)){const B=h.parse(F,1+k.length,y,void 0,{typeAnnotation:"omit"});if(!B)return null;y=y||B.type,k.push(B)}if(!y)throw new Error("No output type");const O=C&&k.some(F=>Wt(C,F.type));return new qd(O?St:y,k)}evaluate(l){let h,y=null,C=0;for(const k of this.args)if(C++,y=k.evaluate(l),y&&y instanceof Le&&!y.available&&(h||(h=y.name),y=null,C===this.args.length&&(y=h)),y!==null)break;return y}eachChild(l){this.args.forEach(l)}outputDefined(){return this.args.every(l=>l.outputDefined())}}class Zd{constructor(l,h){this.type=h.type,this.bindings=[].concat(l),this.result=h}evaluate(l){return this.result.evaluate(l)}eachChild(l){for(const h of this.bindings)l(h[1]);l(this.result)}static parse(l,h){if(l.length<4)return h.error(`Expected at least 3 arguments, but found ${l.length-1} instead.`);const y=[];for(let k=1;k<l.length-1;k+=2){const O=l[k];if(typeof O!="string")return h.error(`Expected string, but found ${typeof O} instead.`,k);if(/[^a-zA-Z0-9_]/.test(O))return h.error("Variable names must contain only alphanumeric characters or '_'.",k);const F=h.parse(l[k+1],k+1);if(!F)return null;y.push([O,F])}const C=h.parse(l[l.length-1],l.length-1,h.expectedType,y);return C?new Zd(y,C):null}outputDefined(){return this.result.outputDefined()}}class ap{constructor(l,h,y){this.type=l,this.index=h,this.input=y}static parse(l,h){if(l.length!==3)return h.error(`Expected 2 arguments, but found ${l.length-1} instead.`);const y=h.parse(l[1],1,tt),C=h.parse(l[2],2,dt(h.expectedType||St));return y&&C?new ap(C.type.itemType,y,C):null}evaluate(l){const h=this.index.evaluate(l),y=this.input.evaluate(l);if(h<0)throw new nt(`Array index out of bounds: ${h} < 0.`);if(h>=y.length)throw new nt(`Array index out of bounds: ${h} > ${y.length-1}.`);if(h!==Math.floor(h))throw new nt(`Array index must be an integer, but found ${h} instead.`);return y[h]}eachChild(l){l(this.index),l(this.input)}outputDefined(){return!1}}class sp{constructor(l,h){this.type=qt,this.needle=l,this.haystack=h}static parse(l,h){if(l.length!==3)return h.error(`Expected 2 arguments, but found ${l.length-1} instead.`);const y=h.parse(l[1],1,St),C=h.parse(l[2],2,St);return y&&C?mn(y.type,[qt,At,tt,pn,St])?new sp(y,C):h.error(`Expected first argument to be of type boolean, string, number or null, but found ${mt(y.type)} instead`):null}evaluate(l){const h=this.needle.evaluate(l),y=this.haystack.evaluate(l);if(!y)return!1;if(!An(h,["boolean","string","number","null"]))throw new nt(`Expected first argument to be of type boolean, string, number or null, but found ${mt(Ve(h))} instead.`);if(!An(y,["string","array"]))throw new nt(`Expected second argument to be of type array or string, but found ${mt(Ve(y))} instead.`);return y.indexOf(h)>=0}eachChild(l){l(this.needle),l(this.haystack)}outputDefined(){return!0}}class Xd{constructor(l,h,y){this.type=tt,this.needle=l,this.haystack=h,this.fromIndex=y}static parse(l,h){if(l.length<=2||l.length>=5)return h.error(`Expected 3 or 4 arguments, but found ${l.length-1} instead.`);const y=h.parse(l[1],1,St),C=h.parse(l[2],2,St);if(!y||!C)return null;if(!mn(y.type,[qt,At,tt,pn,St]))return h.error(`Expected first argument to be of type boolean, string, number or null, but found ${mt(y.type)} instead`);if(l.length===4){const k=h.parse(l[3],3,tt);return k?new Xd(y,C,k):null}return new Xd(y,C)}evaluate(l){const h=this.needle.evaluate(l),y=this.haystack.evaluate(l);if(!An(h,["boolean","string","number","null"]))throw new nt(`Expected first argument to be of type boolean, string, number or null, but found ${mt(Ve(h))} instead.`);if(!An(y,["string","array"]))throw new nt(`Expected second argument to be of type array or string, but found ${mt(Ve(y))} instead.`);if(this.fromIndex){const C=this.fromIndex.evaluate(l);return y.indexOf(h,C)}return y.indexOf(h)}eachChild(l){l(this.needle),l(this.haystack),this.fromIndex&&l(this.fromIndex)}outputDefined(){return!1}}class lp{constructor(l,h,y,C,k,O){this.inputType=l,this.type=h,this.input=y,this.cases=C,this.outputs=k,this.otherwise=O}static parse(l,h){if(l.length<5)return h.error(`Expected at least 4 arguments, but found only ${l.length-1}.`);if(l.length%2!=1)return h.error("Expected an even number of arguments.");let y,C;h.expectedType&&h.expectedType.kind!=="value"&&(C=h.expectedType);const k={},O=[];for(let K=2;K<l.length-1;K+=2){let ee=l[K];const ie=l[K+1];Array.isArray(ee)||(ee=[ee]);const de=h.concat(K);if(ee.length===0)return de.error("Expected at least one branch label.");for(const ve of ee){if(typeof ve!="number"&&typeof ve!="string")return de.error("Branch labels must be numbers or strings.");if(typeof ve=="number"&&Math.abs(ve)>Number.MAX_SAFE_INTEGER)return de.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof ve=="number"&&Math.floor(ve)!==ve)return de.error("Numeric branch labels must be integer values.");if(y){if(de.checkSubtype(y,Ve(ve)))return null}else y=Ve(ve);if(k[String(ve)]!==void 0)return de.error("Branch labels must be unique.");k[String(ve)]=O.length}const ge=h.parse(ie,K,C);if(!ge)return null;C=C||ge.type,O.push(ge)}const F=h.parse(l[1],1,St);if(!F)return null;const B=h.parse(l[l.length-1],l.length-1,C);return B?F.type.kind!=="value"&&h.concat(1).checkSubtype(y,F.type)?null:new lp(y,C,F,k,O,B):null}evaluate(l){const h=this.input.evaluate(l);return(Ve(h)===this.inputType&&this.outputs[this.cases[h]]||this.otherwise).evaluate(l)}eachChild(l){l(this.input),this.outputs.forEach(l),l(this.otherwise)}outputDefined(){return this.outputs.every(l=>l.outputDefined())&&this.otherwise.outputDefined()}}class cp{constructor(l,h,y){this.type=l,this.branches=h,this.otherwise=y}static parse(l,h){if(l.length<4)return h.error(`Expected at least 3 arguments, but found only ${l.length-1}.`);if(l.length%2!=0)return h.error("Expected an odd number of arguments.");let y;h.expectedType&&h.expectedType.kind!=="value"&&(y=h.expectedType);const C=[];for(let O=1;O<l.length-1;O+=2){const F=h.parse(l[O],O,qt);if(!F)return null;const B=h.parse(l[O+1],O+1,y);if(!B)return null;C.push([F,B]),y=y||B.type}const k=h.parse(l[l.length-1],l.length-1,y);if(!k)return null;if(!y)throw new Error("Can't infer output type");return new cp(y,C,k)}evaluate(l){for(const[h,y]of this.branches)if(h.evaluate(l))return y.evaluate(l);return this.otherwise.evaluate(l)}eachChild(l){for(const[h,y]of this.branches)l(h),l(y);l(this.otherwise)}outputDefined(){return this.branches.every(([l,h])=>h.outputDefined())&&this.otherwise.outputDefined()}}class Yd{constructor(l,h,y,C){this.type=l,this.input=h,this.beginIndex=y,this.endIndex=C}static parse(l,h){if(l.length<=2||l.length>=5)return h.error(`Expected 3 or 4 arguments, but found ${l.length-1} instead.`);const y=h.parse(l[1],1,St),C=h.parse(l[2],2,tt);if(!y||!C)return null;if(!mn(y.type,[dt(St),At,St]))return h.error(`Expected first argument to be of type array or string, but found ${mt(y.type)} instead`);if(l.length===4){const k=h.parse(l[3],3,tt);return k?new Yd(y.type,y,C,k):null}return new Yd(y.type,y,C)}evaluate(l){const h=this.input.evaluate(l),y=this.beginIndex.evaluate(l);if(!An(h,["string","array"]))throw new nt(`Expected first argument to be of type array or string, but found ${mt(Ve(h))} instead.`);if(this.endIndex){const C=this.endIndex.evaluate(l);return h.slice(y,C)}return h.slice(y)}eachChild(l){l(this.input),l(this.beginIndex),this.endIndex&&l(this.endIndex)}outputDefined(){return!1}}function $v(d,l){return d==="=="||d==="!="?l.kind==="boolean"||l.kind==="string"||l.kind==="number"||l.kind==="null"||l.kind==="value":l.kind==="string"||l.kind==="number"||l.kind==="value"}function Bv(d,l,h,y){return y.compare(l,h)===0}function ic(d,l,h){const y=d!=="=="&&d!=="!=";return class $5{constructor(k,O,F){this.type=qt,this.lhs=k,this.rhs=O,this.collator=F,this.hasUntypedArgument=k.type.kind==="value"||O.type.kind==="value"}static parse(k,O){if(k.length!==3&&k.length!==4)return O.error("Expected two or three arguments.");const F=k[0];let B=O.parse(k[1],1,St);if(!B)return null;if(!$v(F,B.type))return O.concat(1).error(`"${F}" comparisons are not supported for type '${mt(B.type)}'.`);let K=O.parse(k[2],2,St);if(!K)return null;if(!$v(F,K.type))return O.concat(2).error(`"${F}" comparisons are not supported for type '${mt(K.type)}'.`);if(B.type.kind!==K.type.kind&&B.type.kind!=="value"&&K.type.kind!=="value")return O.error(`Cannot compare types '${mt(B.type)}' and '${mt(K.type)}'.`);y&&(B.type.kind==="value"&&K.type.kind!=="value"?B=new Gt(K.type,[B]):B.type.kind!=="value"&&K.type.kind==="value"&&(K=new Gt(B.type,[K])));let ee=null;if(k.length===4){if(B.type.kind!=="string"&&K.type.kind!=="string"&&B.type.kind!=="value"&&K.type.kind!=="value")return O.error("Cannot use collator to compare non-string types.");if(ee=O.parse(k[3],3,Pn),!ee)return null}return new $5(B,K,ee)}evaluate(k){const O=this.lhs.evaluate(k),F=this.rhs.evaluate(k);if(y&&this.hasUntypedArgument){const B=Ve(O),K=Ve(F);if(B.kind!==K.kind||B.kind!=="string"&&B.kind!=="number")throw new nt(`Expected arguments for "${d}" to be (string, string) or (number, number), but found (${B.kind}, ${K.kind}) instead.`)}if(this.collator&&!y&&this.hasUntypedArgument){const B=Ve(O),K=Ve(F);if(B.kind!=="string"||K.kind!=="string")return l(k,O,F)}return this.collator?h(k,O,F,this.collator.evaluate(k)):l(k,O,F)}eachChild(k){k(this.lhs),k(this.rhs),this.collator&&k(this.collator)}outputDefined(){return!0}}}const U1=ic("==",function(d,l,h){return l===h},Bv),j1=ic("!=",function(d,l,h){return l!==h},function(d,l,h,y){return!Bv(0,l,h,y)}),H1=ic("<",function(d,l,h){return l<h},function(d,l,h,y){return y.compare(l,h)<0}),K1=ic(">",function(d,l,h){return l>h},function(d,l,h,y){return y.compare(l,h)>0}),W1=ic("<=",function(d,l,h){return l<=h},function(d,l,h,y){return y.compare(l,h)<=0}),G1=ic(">=",function(d,l,h){return l>=h},function(d,l,h,y){return y.compare(l,h)>=0});class up{constructor(l,h,y,C,k){this.type=At,this.number=l,this.locale=h,this.currency=y,this.minFractionDigits=C,this.maxFractionDigits=k}static parse(l,h){if(l.length!==3)return h.error("Expected two arguments.");const y=h.parse(l[1],1,tt);if(!y)return null;const C=l[2];if(typeof C!="object"||Array.isArray(C))return h.error("NumberFormat options argument must be an object.");let k=null;if(C.locale&&(k=h.parse(C.locale,1,At),!k))return null;let O=null;if(C.currency&&(O=h.parse(C.currency,1,At),!O))return null;let F=null;if(C["min-fraction-digits"]&&(F=h.parse(C["min-fraction-digits"],1,tt),!F))return null;let B=null;return C["max-fraction-digits"]&&(B=h.parse(C["max-fraction-digits"],1,tt),!B)?null:new up(y,k,O,F,B)}evaluate(l){return new Intl.NumberFormat(this.locale?this.locale.evaluate(l):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(l):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(l):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(l):void 0}).format(this.number.evaluate(l))}eachChild(l){l(this.number),this.locale&&l(this.locale),this.currency&&l(this.currency),this.minFractionDigits&&l(this.minFractionDigits),this.maxFractionDigits&&l(this.maxFractionDigits)}outputDefined(){return!1}}class Qd{constructor(l){this.type=_n,this.sections=l}static parse(l,h){if(l.length<2)return h.error("Expected at least one argument.");const y=l[1];if(!Array.isArray(y)&&typeof y=="object")return h.error("First argument must be an image or text section.");const C=[];let k=!1;for(let O=1;O<=l.length-1;++O){const F=l[O];if(k&&typeof F=="object"&&!Array.isArray(F)){k=!1;let B=null;if(F["font-scale"]&&(B=h.parse(F["font-scale"],1,tt),!B))return null;let K=null;if(F["text-font"]&&(K=h.parse(F["text-font"],1,dt(At)),!K))return null;let ee=null;if(F["text-color"]&&(ee=h.parse(F["text-color"],1,En),!ee))return null;const ie=C[C.length-1];ie.scale=B,ie.font=K,ie.textColor=ee}else{const B=h.parse(l[O],1,St);if(!B)return null;const K=B.type.kind;if(K!=="string"&&K!=="value"&&K!=="null"&&K!=="resolvedImage")return h.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");k=!0,C.push({content:B,scale:null,font:null,textColor:null})}}return new Qd(C)}evaluate(l){return new we(this.sections.map(h=>{const y=h.content.evaluate(l);return Ve(y)===Ft?new ke("",y,null,null,null):new ke(Bt(y),null,h.scale?h.scale.evaluate(l):null,h.font?h.font.evaluate(l).join(","):null,h.textColor?h.textColor.evaluate(l):null)}))}eachChild(l){for(const h of this.sections)l(h.content),h.scale&&l(h.scale),h.font&&l(h.font),h.textColor&&l(h.textColor)}outputDefined(){return!1}}class dp{constructor(l){this.type=Ft,this.input=l}static parse(l,h){if(l.length!==2)return h.error("Expected two arguments.");const y=h.parse(l[1],1,At);return y?new dp(y):h.error("No image name provided.")}evaluate(l){const h=this.input.evaluate(l),y=Le.fromString(h);return y&&l.availableImages&&(y.available=l.availableImages.indexOf(h)>-1),y}eachChild(l){l(this.input)}outputDefined(){return!1}}class fp{constructor(l){this.type=tt,this.input=l}static parse(l,h){if(l.length!==2)return h.error(`Expected 1 argument, but found ${l.length-1} instead.`);const y=h.parse(l[1],1);return y?y.type.kind!=="array"&&y.type.kind!=="string"&&y.type.kind!=="value"?h.error(`Expected argument of type string or array, but found ${mt(y.type)} instead.`):new fp(y):null}evaluate(l){const h=this.input.evaluate(l);if(typeof h=="string"||Array.isArray(h))return h.length;throw new nt(`Expected value to be of type string or array, but found ${mt(Ve(h))} instead.`)}eachChild(l){l(this.input)}outputDefined(){return!1}}const oc={"==":U1,"!=":j1,">":K1,"<":H1,">=":G1,"<=":W1,array:Gt,at:ap,boolean:Gt,case:cp,coalesce:qd,collator:Wr,format:Qd,image:dp,in:sp,"index-of":Xd,interpolate:Mo,"interpolate-hcl":Mo,"interpolate-lab":Mo,length:fp,let:Zd,literal:Et,match:lp,number:Gt,"number-format":up,object:Gt,slice:Yd,step:cs,string:Gt,"to-boolean":dn,"to-color":dn,"to-number":dn,"to-string":dn,var:zi,within:ls};function Vv(d,[l,h,y,C]){l=l.evaluate(d),h=h.evaluate(d),y=y.evaluate(d);const k=C?C.evaluate(d):1,O=Ze(l,h,y,k);if(O)throw new nt(O);return new ce(l/255*k,h/255*k,y/255*k,k)}function Uv(d,l){return d in l}function Jd(d,l){const h=l[d];return h===void 0?null:h}function fl(d){return{type:d}}function jv(d){return{result:"success",value:d}}function ac(d){return{result:"error",value:d}}function Dr(d){return d["property-type"]==="data-driven"||d["property-type"]==="cross-faded-data-driven"}function Hv(d){return!!d.expression&&d.expression.parameters.indexOf("zoom")>-1}function tr(d){return!!d.expression&&d.expression.interpolated}function hr(d){return d instanceof Number?"number":d instanceof String?"string":d instanceof Boolean?"boolean":Array.isArray(d)?"array":d===null?"null":typeof d}function Ir(d){return typeof d=="object"&&d!==null&&!Array.isArray(d)}function $r(d){return d}function xu(d,l){const h=l.type==="color",y=d.stops&&typeof d.stops[0][0]=="object",C=y||!(y||d.property!==void 0),k=d.type||(tr(l)?"exponential":"interval");if(h||l.type==="padding"){const K=h?ce.parse:Pe.parse;(d=an({},d)).stops&&(d.stops=d.stops.map(ee=>[ee[0],K(ee[1])])),d.default=K(d.default?d.default:l.default)}if(d.colorSpace&&d.colorSpace!=="rgb"&&!Fv[d.colorSpace])throw new Error(`Unknown color space: ${d.colorSpace}`);let O,F,B;if(k==="exponential")O=Kv;else if(k==="interval")O=Z1;else if(k==="categorical"){O=q1,F=Object.create(null);for(const K of d.stops)F[K[0]]=K[1];B=typeof d.stops[0][0]}else{if(k!=="identity")throw new Error(`Unknown function type "${k}"`);O=X1}if(y){const K={},ee=[];for(let ge=0;ge<d.stops.length;ge++){const ve=d.stops[ge],Ne=ve[0].zoom;K[Ne]===void 0&&(K[Ne]={zoom:Ne,type:d.type,property:d.property,default:d.default,stops:[]},ee.push(Ne)),K[Ne].stops.push([ve[0].value,ve[1]])}const ie=[];for(const ge of ee)ie.push([K[ge].zoom,xu(K[ge],l)]);const de={name:"linear"};return{kind:"composite",interpolationType:de,interpolationFactor:Mo.interpolationFactor.bind(void 0,de),zoomStops:ie.map(ge=>ge[0]),evaluate:({zoom:ge},ve)=>Kv({stops:ie,base:d.base},l,ge).evaluate(ge,ve)}}if(C){const K=k==="exponential"?{name:"exponential",base:d.base!==void 0?d.base:1}:null;return{kind:"camera",interpolationType:K,interpolationFactor:Mo.interpolationFactor.bind(void 0,K),zoomStops:d.stops.map(ee=>ee[0]),evaluate:({zoom:ee})=>O(d,l,ee,F,B)}}return{kind:"source",evaluate(K,ee){const ie=ee&&ee.properties?ee.properties[d.property]:void 0;return ie===void 0?sc(d.default,l.default):O(d,l,ie,F,B)}}}function sc(d,l,h){return d!==void 0?d:l!==void 0?l:h!==void 0?h:void 0}function q1(d,l,h,y,C){return sc(typeof h===C?y[h]:void 0,d.default,l.default)}function Z1(d,l,h){if(hr(h)!=="number")return sc(d.default,l.default);const y=d.stops.length;if(y===1||h<=d.stops[0][0])return d.stops[0][1];if(h>=d.stops[y-1][0])return d.stops[y-1][1];const C=dl(d.stops.map(k=>k[0]),h);return d.stops[C][1]}function Kv(d,l,h){const y=d.base!==void 0?d.base:1;if(hr(h)!=="number")return sc(d.default,l.default);const C=d.stops.length;if(C===1||h<=d.stops[0][0])return d.stops[0][1];if(h>=d.stops[C-1][0])return d.stops[C-1][1];const k=dl(d.stops.map(ee=>ee[0]),h),O=function(ee,ie,de,ge){const ve=ge-de,Ne=ee-de;return ve===0?0:ie===1?Ne/ve:(Math.pow(ie,Ne)-1)/(Math.pow(ie,ve)-1)}(h,y,d.stops[k][0],d.stops[k+1][0]),F=d.stops[k][1],B=d.stops[k+1][1];let K=us[l.type]||$r;if(d.colorSpace&&d.colorSpace!=="rgb"){const ee=Fv[d.colorSpace];K=(ie,de)=>ee.reverse(ee.interpolate(ee.forward(ie),ee.forward(de),O))}return typeof F.evaluate=="function"?{evaluate(...ee){const ie=F.evaluate.apply(void 0,ee),de=B.evaluate.apply(void 0,ee);if(ie!==void 0&&de!==void 0)return K(ie,de,O)}}:K(F,B,O)}function X1(d,l,h){switch(l.type){case"color":h=ce.parse(h);break;case"formatted":h=we.fromString(h.toString());break;case"resolvedImage":h=Le.fromString(h.toString());break;case"padding":h=Pe.parse(h);break;default:hr(h)===l.type||l.type==="enum"&&l.values[h]||(h=void 0)}return sc(h,d.default,l.default)}or.register(oc,{error:[{kind:"error"},[At],(d,[l])=>{throw new nt(l.evaluate(d))}],typeof:[At,[St],(d,[l])=>mt(Ve(l.evaluate(d)))],"to-rgba":[dt(tt,4),[En],(d,[l])=>l.evaluate(d).toArray()],rgb:[En,[tt,tt,tt],Vv],rgba:[En,[tt,tt,tt,tt],Vv],has:{type:qt,overloads:[[[At],(d,[l])=>Uv(l.evaluate(d),d.properties())],[[At,yn],(d,[l,h])=>Uv(l.evaluate(d),h.evaluate(d))]]},get:{type:St,overloads:[[[At],(d,[l])=>Jd(l.evaluate(d),d.properties())],[[At,yn],(d,[l,h])=>Jd(l.evaluate(d),h.evaluate(d))]]},"feature-state":[St,[At],(d,[l])=>Jd(l.evaluate(d),d.featureState||{})],properties:[yn,[],d=>d.properties()],"geometry-type":[At,[],d=>d.geometryType()],id:[St,[],d=>d.id()],zoom:[tt,[],d=>d.globals.zoom],"heatmap-density":[tt,[],d=>d.globals.heatmapDensity||0],"line-progress":[tt,[],d=>d.globals.lineProgress||0],accumulated:[St,[],d=>d.globals.accumulated===void 0?null:d.globals.accumulated],"+":[tt,fl(tt),(d,l)=>{let h=0;for(const y of l)h+=y.evaluate(d);return h}],"*":[tt,fl(tt),(d,l)=>{let h=1;for(const y of l)h*=y.evaluate(d);return h}],"-":{type:tt,overloads:[[[tt,tt],(d,[l,h])=>l.evaluate(d)-h.evaluate(d)],[[tt],(d,[l])=>-l.evaluate(d)]]},"/":[tt,[tt,tt],(d,[l,h])=>l.evaluate(d)/h.evaluate(d)],"%":[tt,[tt,tt],(d,[l,h])=>l.evaluate(d)%h.evaluate(d)],ln2:[tt,[],()=>Math.LN2],pi:[tt,[],()=>Math.PI],e:[tt,[],()=>Math.E],"^":[tt,[tt,tt],(d,[l,h])=>Math.pow(l.evaluate(d),h.evaluate(d))],sqrt:[tt,[tt],(d,[l])=>Math.sqrt(l.evaluate(d))],log10:[tt,[tt],(d,[l])=>Math.log(l.evaluate(d))/Math.LN10],ln:[tt,[tt],(d,[l])=>Math.log(l.evaluate(d))],log2:[tt,[tt],(d,[l])=>Math.log(l.evaluate(d))/Math.LN2],sin:[tt,[tt],(d,[l])=>Math.sin(l.evaluate(d))],cos:[tt,[tt],(d,[l])=>Math.cos(l.evaluate(d))],tan:[tt,[tt],(d,[l])=>Math.tan(l.evaluate(d))],asin:[tt,[tt],(d,[l])=>Math.asin(l.evaluate(d))],acos:[tt,[tt],(d,[l])=>Math.acos(l.evaluate(d))],atan:[tt,[tt],(d,[l])=>Math.atan(l.evaluate(d))],min:[tt,fl(tt),(d,l)=>Math.min(...l.map(h=>h.evaluate(d)))],max:[tt,fl(tt),(d,l)=>Math.max(...l.map(h=>h.evaluate(d)))],abs:[tt,[tt],(d,[l])=>Math.abs(l.evaluate(d))],round:[tt,[tt],(d,[l])=>{const h=l.evaluate(d);return h<0?-Math.round(-h):Math.round(h)}],floor:[tt,[tt],(d,[l])=>Math.floor(l.evaluate(d))],ceil:[tt,[tt],(d,[l])=>Math.ceil(l.evaluate(d))],"filter-==":[qt,[At,St],(d,[l,h])=>d.properties()[l.value]===h.value],"filter-id-==":[qt,[St],(d,[l])=>d.id()===l.value],"filter-type-==":[qt,[At],(d,[l])=>d.geometryType()===l.value],"filter-<":[qt,[At,St],(d,[l,h])=>{const y=d.properties()[l.value],C=h.value;return typeof y==typeof C&&y<C}],"filter-id-<":[qt,[St],(d,[l])=>{const h=d.id(),y=l.value;return typeof h==typeof y&&h<y}],"filter->":[qt,[At,St],(d,[l,h])=>{const y=d.properties()[l.value],C=h.value;return typeof y==typeof C&&y>C}],"filter-id->":[qt,[St],(d,[l])=>{const h=d.id(),y=l.value;return typeof h==typeof y&&h>y}],"filter-<=":[qt,[At,St],(d,[l,h])=>{const y=d.properties()[l.value],C=h.value;return typeof y==typeof C&&y<=C}],"filter-id-<=":[qt,[St],(d,[l])=>{const h=d.id(),y=l.value;return typeof h==typeof y&&h<=y}],"filter->=":[qt,[At,St],(d,[l,h])=>{const y=d.properties()[l.value],C=h.value;return typeof y==typeof C&&y>=C}],"filter-id->=":[qt,[St],(d,[l])=>{const h=d.id(),y=l.value;return typeof h==typeof y&&h>=y}],"filter-has":[qt,[St],(d,[l])=>l.value in d.properties()],"filter-has-id":[qt,[],d=>d.id()!==null&&d.id()!==void 0],"filter-type-in":[qt,[dt(At)],(d,[l])=>l.value.indexOf(d.geometryType())>=0],"filter-id-in":[qt,[dt(St)],(d,[l])=>l.value.indexOf(d.id())>=0],"filter-in-small":[qt,[At,dt(St)],(d,[l,h])=>h.value.indexOf(d.properties()[l.value])>=0],"filter-in-large":[qt,[At,dt(St)],(d,[l,h])=>function(y,C,k,O){for(;k<=O;){const F=k+O>>1;if(C[F]===y)return!0;C[F]>y?O=F-1:k=F+1}return!1}(d.properties()[l.value],h.value,0,h.value.length-1)],all:{type:qt,overloads:[[[qt,qt],(d,[l,h])=>l.evaluate(d)&&h.evaluate(d)],[fl(qt),(d,l)=>{for(const h of l)if(!h.evaluate(d))return!1;return!0}]]},any:{type:qt,overloads:[[[qt,qt],(d,[l,h])=>l.evaluate(d)||h.evaluate(d)],[fl(qt),(d,l)=>{for(const h of l)if(h.evaluate(d))return!0;return!1}]]},"!":[qt,[qt],(d,[l])=>!l.evaluate(d)],"is-supported-script":[qt,[At],(d,[l])=>{const h=d.globals&&d.globals.isSupportedScript;return!h||h(l.evaluate(d))}],upcase:[At,[At],(d,[l])=>l.evaluate(d).toUpperCase()],downcase:[At,[At],(d,[l])=>l.evaluate(d).toLowerCase()],concat:[At,fl(St),(d,l)=>l.map(h=>Bt(h.evaluate(d))).join("")],"resolved-locale":[At,[Pn],(d,[l])=>l.evaluate(d).resolvedLocale()]});class ef{constructor(l,h){this.expression=l,this._warningHistory={},this._evaluator=new jn,this._defaultValue=h?function(y){return y.type==="color"&&Ir(y.default)?new ce(0,0,0,0):y.type==="color"?ce.parse(y.default)||null:y.type==="padding"?Pe.parse(y.default)||null:y.default===void 0?null:y.default}(h):null,this._enumValues=h&&h.type==="enum"?h.values:null}evaluateWithoutErrorHandling(l,h,y,C,k,O){return this._evaluator.globals=l,this._evaluator.feature=h,this._evaluator.featureState=y,this._evaluator.canonical=C,this._evaluator.availableImages=k||null,this._evaluator.formattedSection=O,this.expression.evaluate(this._evaluator)}evaluate(l,h,y,C,k,O){this._evaluator.globals=l,this._evaluator.feature=h||null,this._evaluator.featureState=y||null,this._evaluator.canonical=C,this._evaluator.availableImages=k||null,this._evaluator.formattedSection=O||null;try{const F=this.expression.evaluate(this._evaluator);if(F==null||typeof F=="number"&&F!=F)return this._defaultValue;if(this._enumValues&&!(F in this._enumValues))throw new nt(`Expected value to be one of ${Object.keys(this._enumValues).map(B=>JSON.stringify(B)).join(", ")}, but found ${JSON.stringify(F)} instead.`);return F}catch(F){return this._warningHistory[F.message]||(this._warningHistory[F.message]=!0,typeof console<"u"&&console.warn(F.message)),this._defaultValue}}}function bu(d){return Array.isArray(d)&&d.length>0&&typeof d[0]=="string"&&d[0]in oc}function _u(d,l){const h=new As(oc,[],l?function(C){const k={color:En,string:At,number:tt,enum:At,boolean:qt,formatted:_n,padding:tn,resolvedImage:Ft};return C.type==="array"?dt(k[C.value]||St,C.length):k[C.type]}(l):void 0),y=h.parse(d,void 0,void 0,void 0,l&&l.type==="string"?{typeAnnotation:"coerce"}:void 0);return y?jv(new ef(y,l)):ac(h.errors)}class wu{constructor(l,h){this.kind=l,this._styleExpression=h,this.isStateDependent=l!=="constant"&&!er(h.expression)}evaluateWithoutErrorHandling(l,h,y,C,k,O){return this._styleExpression.evaluateWithoutErrorHandling(l,h,y,C,k,O)}evaluate(l,h,y,C,k,O){return this._styleExpression.evaluate(l,h,y,C,k,O)}}class hp{constructor(l,h,y,C){this.kind=l,this.zoomStops=y,this._styleExpression=h,this.isStateDependent=l!=="camera"&&!er(h.expression),this.interpolationType=C}evaluateWithoutErrorHandling(l,h,y,C,k,O){return this._styleExpression.evaluateWithoutErrorHandling(l,h,y,C,k,O)}evaluate(l,h,y,C,k,O){return this._styleExpression.evaluate(l,h,y,C,k,O)}interpolationFactor(l,h,y){return this.interpolationType?Mo.interpolationFactor(this.interpolationType,l,h,y):0}}function Wv(d,l){const h=_u(d,l);if(h.result==="error")return h;const y=h.value.expression,C=Vn(y);if(!C&&!Dr(l))return ac([new It("","data expressions not supported")]);const k=Fr(y,["zoom"]);if(!k&&!Hv(l))return ac([new It("","zoom expressions not supported")]);const O=nf(y);return O||k?O instanceof It?ac([O]):O instanceof Mo&&!tr(l)?ac([new It("",'"interpolate" expressions cannot be used with this property')]):jv(O?new hp(C?"camera":"composite",h.value,O.labels,O instanceof Mo?O.interpolation:void 0):new wu(C?"constant":"source",h.value)):ac([new It("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class tf{constructor(l,h){this._parameters=l,this._specification=h,an(this,xu(this._parameters,this._specification))}static deserialize(l){return new tf(l._parameters,l._specification)}static serialize(l){return{_parameters:l._parameters,_specification:l._specification}}}function nf(d){let l=null;if(d instanceof Zd)l=nf(d.result);else if(d instanceof qd){for(const h of d.args)if(l=nf(h),l)break}else(d instanceof cs||d instanceof Mo)&&d.input instanceof or&&d.input.name==="zoom"&&(l=d);return l instanceof It||d.eachChild(h=>{const y=nf(h);y instanceof It?l=y:!l&&y?l=new It("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):l&&y&&l!==y&&(l=new It("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),l}function sa(d){const l=d.key,h=d.value,y=d.valueSpec||{},C=d.objectElementValidators||{},k=d.style,O=d.styleSpec;let F=[];const B=hr(h);if(B!=="object")return[new Ye(l,h,`object expected, ${B} found`)];for(const K in h){const ee=K.split(".")[0],ie=y[ee]||y["*"];let de;if(C[ee])de=C[ee];else if(y[ee])de=Oo;else if(C["*"])de=C["*"];else{if(!y["*"]){F.push(new Ye(l,h[K],`unknown property "${K}"`));continue}de=Oo}F=F.concat(de({key:(l&&`${l}.`)+K,value:h[K],valueSpec:ie,style:k,styleSpec:O,object:h,objectKey:K},h))}for(const K in y)C[K]||y[K].required&&y[K].default===void 0&&h[K]===void 0&&F.push(new Ye(l,h,`missing required property "${K}"`));return F}function Gv(d){const l=d.value,h=d.valueSpec,y=d.style,C=d.styleSpec,k=d.key,O=d.arrayElementValidator||Oo;if(hr(l)!=="array")return[new Ye(k,l,`array expected, ${hr(l)} found`)];if(h.length&&l.length!==h.length)return[new Ye(k,l,`array length ${h.length} expected, length ${l.length} found`)];if(h["min-length"]&&l.length<h["min-length"])return[new Ye(k,l,`array length at least ${h["min-length"]} expected, length ${l.length} found`)];let F={type:h.value,values:h.values};C.$version<7&&(F.function=h.function),hr(h.value)==="object"&&(F=h.value);let B=[];for(let K=0;K<l.length;K++)B=B.concat(O({array:l,arrayIndex:K,value:l[K],valueSpec:F,style:y,styleSpec:C,key:`${k}[${K}]`}));return B}function pp(d){const l=d.key,h=d.value,y=d.valueSpec;let C=hr(h);return C==="number"&&h!=h&&(C="NaN"),C!=="number"?[new Ye(l,h,`number expected, ${C} found`)]:"minimum"in y&&h<y.minimum?[new Ye(l,h,`${h} is less than the minimum value ${y.minimum}`)]:"maximum"in y&&h>y.maximum?[new Ye(l,h,`${h} is greater than the maximum value ${y.maximum}`)]:[]}function qv(d){const l=d.valueSpec,h=Kt(d.value.type);let y,C,k,O={};const F=h!=="categorical"&&d.value.property===void 0,B=!F,K=hr(d.value.stops)==="array"&&hr(d.value.stops[0])==="array"&&hr(d.value.stops[0][0])==="object",ee=sa({key:d.key,value:d.value,valueSpec:d.styleSpec.function,style:d.style,styleSpec:d.styleSpec,objectElementValidators:{stops:function(ge){if(h==="identity")return[new Ye(ge.key,ge.value,'identity function may not have a "stops" property')];let ve=[];const Ne=ge.value;return ve=ve.concat(Gv({key:ge.key,value:Ne,valueSpec:ge.valueSpec,style:ge.style,styleSpec:ge.styleSpec,arrayElementValidator:ie})),hr(Ne)==="array"&&Ne.length===0&&ve.push(new Ye(ge.key,Ne,"array must have at least one stop")),ve},default:function(ge){return Oo({key:ge.key,value:ge.value,valueSpec:l,style:ge.style,styleSpec:ge.styleSpec})}}});return h==="identity"&&F&&ee.push(new Ye(d.key,d.value,'missing required property "property"')),h==="identity"||d.value.stops||ee.push(new Ye(d.key,d.value,'missing required property "stops"')),h==="exponential"&&d.valueSpec.expression&&!tr(d.valueSpec)&&ee.push(new Ye(d.key,d.value,"exponential functions not supported")),d.styleSpec.$version>=8&&(B&&!Dr(d.valueSpec)?ee.push(new Ye(d.key,d.value,"property functions not supported")):F&&!Hv(d.valueSpec)&&ee.push(new Ye(d.key,d.value,"zoom functions not supported"))),h!=="categorical"&&!K||d.value.property!==void 0||ee.push(new Ye(d.key,d.value,'"property" property is required')),ee;function ie(ge){let ve=[];const Ne=ge.value,De=ge.key;if(hr(Ne)!=="array")return[new Ye(De,Ne,`array expected, ${hr(Ne)} found`)];if(Ne.length!==2)return[new Ye(De,Ne,`array length 2 expected, length ${Ne.length} found`)];if(K){if(hr(Ne[0])!=="object")return[new Ye(De,Ne,`object expected, ${hr(Ne[0])} found`)];if(Ne[0].zoom===void 0)return[new Ye(De,Ne,"object stop key must have zoom")];if(Ne[0].value===void 0)return[new Ye(De,Ne,"object stop key must have value")];if(k&&k>Kt(Ne[0].zoom))return[new Ye(De,Ne[0].zoom,"stop zoom values must appear in ascending order")];Kt(Ne[0].zoom)!==k&&(k=Kt(Ne[0].zoom),C=void 0,O={}),ve=ve.concat(sa({key:`${De}[0]`,value:Ne[0],valueSpec:{zoom:{}},style:ge.style,styleSpec:ge.styleSpec,objectElementValidators:{zoom:pp,value:de}}))}else ve=ve.concat(de({key:`${De}[0]`,value:Ne[0],valueSpec:{},style:ge.style,styleSpec:ge.styleSpec},Ne));return bu(Vt(Ne[1]))?ve.concat([new Ye(`${De}[1]`,Ne[1],"expressions are not allowed in function stops.")]):ve.concat(Oo({key:`${De}[1]`,value:Ne[1],valueSpec:l,style:ge.style,styleSpec:ge.styleSpec}))}function de(ge,ve){const Ne=hr(ge.value),De=Kt(ge.value),Qe=ge.value!==null?ge.value:ve;if(y){if(Ne!==y)return[new Ye(ge.key,Qe,`${Ne} stop domain type must match previous stop domain type ${y}`)]}else y=Ne;if(Ne!=="number"&&Ne!=="string"&&Ne!=="boolean")return[new Ye(ge.key,Qe,"stop domain value must be a number, string, or boolean")];if(Ne!=="number"&&h!=="categorical"){let ht=`number expected, ${Ne} found`;return Dr(l)&&h===void 0&&(ht+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Ye(ge.key,Qe,ht)]}return h!=="categorical"||Ne!=="number"||isFinite(De)&&Math.floor(De)===De?h!=="categorical"&&Ne==="number"&&C!==void 0&&De<C?[new Ye(ge.key,Qe,"stop domain values must appear in ascending order")]:(C=De,h==="categorical"&&De in O?[new Ye(ge.key,Qe,"stop domain values must be unique")]:(O[De]=!0,[])):[new Ye(ge.key,Qe,`integer expected, found ${De}`)]}}function hl(d){const l=(d.expressionContext==="property"?Wv:_u)(Vt(d.value),d.valueSpec);if(l.result==="error")return l.value.map(y=>new Ye(`${d.key}${y.key}`,d.value,y.message));const h=l.value.expression||l.value._styleExpression.expression;if(d.expressionContext==="property"&&d.propertyKey==="text-font"&&!h.outputDefined())return[new Ye(d.key,d.value,`Invalid data expression for "${d.propertyKey}". Output values must be contained as literals within the expression.`)];if(d.expressionContext==="property"&&d.propertyType==="layout"&&!er(h))return[new Ye(d.key,d.value,'"feature-state" data expressions are not supported with layout properties.')];if(d.expressionContext==="filter"&&!er(h))return[new Ye(d.key,d.value,'"feature-state" data expressions are not supported with filters.')];if(d.expressionContext&&d.expressionContext.indexOf("cluster")===0){if(!Fr(h,["zoom","feature-state"]))return[new Ye(d.key,d.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(d.expressionContext==="cluster-initial"&&!Vn(h))return[new Ye(d.key,d.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function Cu(d){const l=d.key,h=d.value,y=d.valueSpec,C=[];return Array.isArray(y.values)?y.values.indexOf(Kt(h))===-1&&C.push(new Ye(l,h,`expected one of [${y.values.join(", ")}], ${JSON.stringify(h)} found`)):Object.keys(y.values).indexOf(Kt(h))===-1&&C.push(new Ye(l,h,`expected one of [${Object.keys(y.values).join(", ")}], ${JSON.stringify(h)} found`)),C}function lc(d){if(d===!0||d===!1)return!0;if(!Array.isArray(d)||d.length===0)return!1;switch(d[0]){case"has":return d.length>=2&&d[1]!=="$id"&&d[1]!=="$type";case"in":return d.length>=3&&(typeof d[1]!="string"||Array.isArray(d[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return d.length!==3||Array.isArray(d[1])||Array.isArray(d[2]);case"any":case"all":for(const l of d.slice(1))if(!lc(l)&&typeof l!="boolean")return!1;return!0;default:return!0}}const Y1={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function rf(d){if(d==null)return{filter:()=>!0,needGeometry:!1};lc(d)||(d=Su(d));const l=_u(d,Y1);if(l.result==="error")throw new Error(l.value.map(h=>`${h.key}: ${h.message}`).join(", "));return{filter:(h,y,C)=>l.value.evaluate(h,y,{},C),needGeometry:Xv(d)}}function Zv(d,l){return d<l?-1:d>l?1:0}function Xv(d){if(!Array.isArray(d))return!1;if(d[0]==="within")return!0;for(let l=1;l<d.length;l++)if(Xv(d[l]))return!0;return!1}function Su(d){if(!d)return!0;const l=d[0];return d.length<=1?l!=="any":l==="=="?mp(d[1],d[2],"=="):l==="!="?cc(mp(d[1],d[2],"==")):l==="<"||l===">"||l==="<="||l===">="?mp(d[1],d[2],l):l==="any"?(h=d.slice(1),["any"].concat(h.map(Su))):l==="all"?["all"].concat(d.slice(1).map(Su)):l==="none"?["all"].concat(d.slice(1).map(Su).map(cc)):l==="in"?of(d[1],d.slice(2)):l==="!in"?cc(of(d[1],d.slice(2))):l==="has"?Eu(d[1]):l==="!has"?cc(Eu(d[1])):l!=="within"||d;var h}function mp(d,l,h){switch(d){case"$type":return[`filter-type-${h}`,l];case"$id":return[`filter-id-${h}`,l];default:return[`filter-${h}`,d,l]}}function of(d,l){if(l.length===0)return!1;switch(d){case"$type":return["filter-type-in",["literal",l]];case"$id":return["filter-id-in",["literal",l]];default:return l.length>200&&!l.some(h=>typeof h!=typeof l[0])?["filter-in-large",d,["literal",l.sort(Zv)]]:["filter-in-small",d,["literal",l]]}}function Eu(d){switch(d){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",d]}}function cc(d){return["!",d]}function Pu(d){return lc(Vt(d.value))?hl(an({},d,{expressionContext:"filter",valueSpec:{value:"boolean"}})):Yv(d)}function Yv(d){const l=d.value,h=d.key;if(hr(l)!=="array")return[new Ye(h,l,`array expected, ${hr(l)} found`)];const y=d.styleSpec;let C,k=[];if(l.length<1)return[new Ye(h,l,"filter array must have at least 1 element")];switch(k=k.concat(Cu({key:`${h}[0]`,value:l[0],valueSpec:y.filter_operator,style:d.style,styleSpec:d.styleSpec})),Kt(l[0])){case"<":case"<=":case">":case">=":l.length>=2&&Kt(l[1])==="$type"&&k.push(new Ye(h,l,`"$type" cannot be use with operator "${l[0]}"`));case"==":case"!=":l.length!==3&&k.push(new Ye(h,l,`filter array for operator "${l[0]}" must have 3 elements`));case"in":case"!in":l.length>=2&&(C=hr(l[1]),C!=="string"&&k.push(new Ye(`${h}[1]`,l[1],`string expected, ${C} found`)));for(let O=2;O<l.length;O++)C=hr(l[O]),Kt(l[1])==="$type"?k=k.concat(Cu({key:`${h}[${O}]`,value:l[O],valueSpec:y.geometry_type,style:d.style,styleSpec:d.styleSpec})):C!=="string"&&C!=="number"&&C!=="boolean"&&k.push(new Ye(`${h}[${O}]`,l[O],`string, number, or boolean expected, ${C} found`));break;case"any":case"all":case"none":for(let O=1;O<l.length;O++)k=k.concat(Yv({key:`${h}[${O}]`,value:l[O],style:d.style,styleSpec:d.styleSpec}));break;case"has":case"!has":C=hr(l[1]),l.length!==2?k.push(new Ye(h,l,`filter array for "${l[0]}" operator must have 2 elements`)):C!=="string"&&k.push(new Ye(`${h}[1]`,l[1],`string expected, ${C} found`));break;case"within":C=hr(l[1]),l.length!==2?k.push(new Ye(h,l,`filter array for "${l[0]}" operator must have 2 elements`)):C!=="object"&&k.push(new Ye(`${h}[1]`,l[1],`object expected, ${C} found`))}return k}function Tu(d,l){const h=d.key,y=d.style,C=d.styleSpec,k=d.value,O=d.objectKey,F=C[`${l}_${d.layerType}`];if(!F)return[];const B=O.match(/^(.*)-transition$/);if(l==="paint"&&B&&F[B[1]]&&F[B[1]].transition)return Oo({key:h,value:k,valueSpec:C.transition,style:y,styleSpec:C});const K=d.valueSpec||F[O];if(!K)return[new Ye(h,k,`unknown property "${O}"`)];let ee;if(hr(k)==="string"&&Dr(K)&&!K.tokens&&(ee=/^{([^}]+)}$/.exec(k)))return[new Ye(h,k,`"${O}" does not support interpolation syntax
Use an identity property function instead: \`{ "type": "identity", "property": ${JSON.stringify(ee[1])} }\`.`)];const ie=[];return d.layerType==="symbol"&&(O==="text-field"&&y&&!y.glyphs&&ie.push(new Ye(h,k,'use of "text-field" requires a style "glyphs" property')),O==="text-font"&&Ir(Vt(k))&&Kt(k.type)==="identity"&&ie.push(new Ye(h,k,'"text-font" does not support identity functions'))),ie.concat(Oo({key:d.key,value:k,valueSpec:K,style:y,styleSpec:C,expressionContext:"property",propertyType:l,propertyKey:O}))}function Qv(d){return Tu(d,"paint")}function Jv(d){return Tu(d,"layout")}function ey(d){let l=[];const h=d.value,y=d.key,C=d.style,k=d.styleSpec;h.type||h.ref||l.push(new Ye(y,h,'either "type" or "ref" is required'));let O=Kt(h.type);const F=Kt(h.ref);if(h.id){const B=Kt(h.id);for(let K=0;K<d.arrayIndex;K++){const ee=C.layers[K];Kt(ee.id)===B&&l.push(new Ye(y,h.id,`duplicate layer id "${h.id}", previously used at line ${ee.id.__line__}`))}}if("ref"in h){let B;["type","source","source-layer","filter","layout"].forEach(K=>{K in h&&l.push(new Ye(y,h[K],`"${K}" is prohibited for ref layers`))}),C.layers.forEach(K=>{Kt(K.id)===F&&(B=K)}),B?B.ref?l.push(new Ye(y,h.ref,"ref cannot reference another ref layer")):O=Kt(B.type):l.push(new Ye(y,h.ref,`ref layer "${F}" not found`))}else if(O!=="background")if(h.source){const B=C.sources&&C.sources[h.source],K=B&&Kt(B.type);B?K==="vector"&&O==="raster"?l.push(new Ye(y,h.source,`layer "${h.id}" requires a raster source`)):K==="raster"&&O!=="raster"?l.push(new Ye(y,h.source,`layer "${h.id}" requires a vector source`)):K!=="vector"||h["source-layer"]?K==="raster-dem"&&O!=="hillshade"?l.push(new Ye(y,h.source,"raster-dem source can only be used with layer type 'hillshade'.")):O!=="line"||!h.paint||!h.paint["line-gradient"]||K==="geojson"&&B.lineMetrics||l.push(new Ye(y,h,`layer "${h.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):l.push(new Ye(y,h,`layer "${h.id}" must specify a "source-layer"`)):l.push(new Ye(y,h.source,`source "${h.source}" not found`))}else l.push(new Ye(y,h,'missing required property "source"'));return l=l.concat(sa({key:y,value:h,valueSpec:k.layer,style:d.style,styleSpec:d.styleSpec,objectElementValidators:{"*":()=>[],type:()=>Oo({key:`${y}.type`,value:h.type,valueSpec:k.layer.type,style:d.style,styleSpec:d.styleSpec,object:h,objectKey:"type"}),filter:Pu,layout:B=>sa({layer:h,key:B.key,value:B.value,style:B.style,styleSpec:B.styleSpec,objectElementValidators:{"*":K=>Jv(an({layerType:O},K))}}),paint:B=>sa({layer:h,key:B.key,value:B.value,style:B.style,styleSpec:B.styleSpec,objectElementValidators:{"*":K=>Qv(an({layerType:O},K))}})}})),l}function uc(d){const l=d.value,h=d.key,y=hr(l);return y!=="string"?[new Ye(h,l,`string expected, ${y} found`)]:[]}const ty={promoteId:function({key:d,value:l}){if(hr(l)==="string")return uc({key:d,value:l});{const h=[];for(const y in l)h.push(...uc({key:`${d}.${y}`,value:l[y]}));return h}}};function Iu(d){const l=d.value,h=d.key,y=d.styleSpec,C=d.style;if(!l.type)return[new Ye(h,l,'"type" is required')];const k=Kt(l.type);let O;switch(k){case"vector":case"raster":case"raster-dem":return O=sa({key:h,value:l,valueSpec:y[`source_${k.replace("-","_")}`],style:d.style,styleSpec:y,objectElementValidators:ty}),O;case"geojson":if(O=sa({key:h,value:l,valueSpec:y.source_geojson,style:C,styleSpec:y,objectElementValidators:ty}),l.cluster)for(const F in l.clusterProperties){const[B,K]=l.clusterProperties[F],ee=typeof B=="string"?[B,["accumulated"],["get",F]]:B;O.push(...hl({key:`${h}.${F}.map`,value:K,expressionContext:"cluster-map"})),O.push(...hl({key:`${h}.${F}.reduce`,value:ee,expressionContext:"cluster-reduce"}))}return O;case"video":return sa({key:h,value:l,valueSpec:y.source_video,style:C,styleSpec:y});case"image":return sa({key:h,value:l,valueSpec:y.source_image,style:C,styleSpec:y});case"canvas":return[new Ye(h,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return Cu({key:`${h}.type`,value:l.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:C,styleSpec:y})}}function ku(d){const l=d.value,h=d.styleSpec,y=h.light,C=d.style;let k=[];const O=hr(l);if(l===void 0)return k;if(O!=="object")return k=k.concat([new Ye("light",l,`object expected, ${O} found`)]),k;for(const F in l){const B=F.match(/^(.*)-transition$/);k=k.concat(B&&y[B[1]]&&y[B[1]].transition?Oo({key:F,value:l[F],valueSpec:h.transition,style:C,styleSpec:h}):y[F]?Oo({key:F,value:l[F],valueSpec:y[F],style:C,styleSpec:h}):[new Ye(F,l[F],`unknown property "${F}"`)])}return k}function Ro(d){const l=d.value,h=d.styleSpec,y=h.terrain,C=d.style;let k=[];const O=hr(l);if(l===void 0)return k;if(O!=="object")return k=k.concat([new Ye("terrain",l,`object expected, ${O} found`)]),k;for(const F in l)k=k.concat(y[F]?Oo({key:F,value:l[F],valueSpec:y[F],style:C,styleSpec:h}):[new Ye(F,l[F],`unknown property "${F}"`)]);return k}const Mu={"*":()=>[],array:Gv,boolean:function(d){const l=d.value,h=d.key,y=hr(l);return y!=="boolean"?[new Ye(h,l,`boolean expected, ${y} found`)]:[]},number:pp,color:function(d){const l=d.key,h=d.value,y=hr(h);return y!=="string"?[new Ye(l,h,`color expected, ${y} found`)]:Qn(h)===null?[new Ye(l,h,`color expected, "${h}" found`)]:[]},constants:Zt,enum:Cu,filter:Pu,function:qv,layer:ey,object:sa,source:Iu,light:ku,terrain:Ro,string:uc,formatted:function(d){return uc(d).length===0?[]:hl(d)},resolvedImage:function(d){return uc(d).length===0?[]:hl(d)},padding:function(d){const l=d.key,h=d.value;if(hr(h)==="array"){if(h.length<1||h.length>4)return[new Ye(l,h,`padding requires 1 to 4 values; ${h.length} values found`)];const y={type:"number"};let C=[];for(let k=0;k<h.length;k++)C=C.concat(Oo({key:`${l}[${k}]`,value:h[k],valueSpec:y}));return C}return pp({key:l,value:h,valueSpec:{}})}};function Oo(d){const l=d.value,h=d.valueSpec,y=d.styleSpec;return h.expression&&Ir(Kt(l))?qv(d):h.expression&&bu(Vt(l))?hl(d):h.type&&Mu[h.type]?Mu[h.type](d):sa(an({},d,{valueSpec:h.type?y[h.type]:h}))}function Q1(d){const l=d.value,h=d.key,y=uc(d);return y.length||(l.indexOf("{fontstack}")===-1&&y.push(new Ye(h,l,'"glyphs" url must include a "{fontstack}" token')),l.indexOf("{range}")===-1&&y.push(new Ye(h,l,'"glyphs" url must include a "{range}" token'))),y}function Ns(d,l=Fe){let h=[];return h=h.concat(Oo({key:"",value:d,valueSpec:l.$root,styleSpec:l,style:d,objectElementValidators:{glyphs:Q1,"*":()=>[]}})),d.constants&&(h=h.concat(Zt({key:"constants",value:d.constants,style:d,styleSpec:l}))),ny(h)}function ny(d){return[].concat(d).sort((l,h)=>l.line-h.line)}function ds(d){return function(...l){return ny(d.apply(this,l))}}Ns.source=ds(Iu),Ns.light=ds(ku),Ns.terrain=ds(Ro),Ns.layer=ds(ey),Ns.filter=ds(Pu),Ns.paintProperty=ds(Qv),Ns.layoutProperty=ds(Jv);const Ru=Ns,gp=Ru.light,J1=Ru.paintProperty,ew=Ru.layoutProperty;function af(d,l){let h=!1;if(l&&l.length)for(const y of l)d.fire(new Lt(new Error(y.message))),h=!0;return h}class Ou{constructor(l,h,y){const C=this.cells=[];if(l instanceof ArrayBuffer){this.arrayBuffer=l;const O=new Int32Array(this.arrayBuffer);l=O[0],this.d=(h=O[1])+2*(y=O[2]);for(let B=0;B<this.d*this.d;B++){const K=O[3+B],ee=O[3+B+1];C.push(K===ee?null:O.subarray(K,ee))}const F=O[3+C.length+1];this.keys=O.subarray(O[3+C.length],F),this.bboxes=O.subarray(F),this.insert=this._insertReadonly}else{this.d=h+2*y;for(let O=0;O<this.d*this.d;O++)C.push([]);this.keys=[],this.bboxes=[]}this.n=h,this.extent=l,this.padding=y,this.scale=h/l,this.uid=0;const k=y/h*l;this.min=-k,this.max=l+k}insert(l,h,y,C,k){this._forEachCell(h,y,C,k,this._insertCell,this.uid++,void 0,void 0),this.keys.push(l),this.bboxes.push(h),this.bboxes.push(y),this.bboxes.push(C),this.bboxes.push(k)}_insertReadonly(){throw new Error("Cannot insert into a GridIndex created from an ArrayBuffer.")}_insertCell(l,h,y,C,k,O){this.cells[k].push(O)}query(l,h,y,C,k){const O=this.min,F=this.max;if(l<=O&&h<=O&&F<=y&&F<=C&&!k)return Array.prototype.slice.call(this.keys);{const B=[];return this._forEachCell(l,h,y,C,this._queryCell,B,{},k),B}}_queryCell(l,h,y,C,k,O,F,B){const K=this.cells[k];if(K!==null){const ee=this.keys,ie=this.bboxes;for(let de=0;de<K.length;de++){const ge=K[de];if(F[ge]===void 0){const ve=4*ge;(B?B(ie[ve+0],ie[ve+1],ie[ve+2],ie[ve+3]):l<=ie[ve+2]&&h<=ie[ve+3]&&y>=ie[ve+0]&&C>=ie[ve+1])?(F[ge]=!0,O.push(ee[ge])):F[ge]=!1}}}}_forEachCell(l,h,y,C,k,O,F,B){const K=this._convertToCellCoord(l),ee=this._convertToCellCoord(h),ie=this._convertToCellCoord(y),de=this._convertToCellCoord(C);for(let ge=K;ge<=ie;ge++)for(let ve=ee;ve<=de;ve++){const Ne=this.d*ve+ge;if((!B||B(this._convertFromCellCoord(ge),this._convertFromCellCoord(ve),this._convertFromCellCoord(ge+1),this._convertFromCellCoord(ve+1)))&&k.call(this,l,h,y,C,Ne,O,F,B))return}}_convertFromCellCoord(l){return(l-this.padding)/this.scale}_convertToCellCoord(l){return Math.max(0,Math.min(this.d-1,Math.floor(l*this.scale)+this.padding))}toArrayBuffer(){if(this.arrayBuffer)return this.arrayBuffer;const l=this.cells,h=3+this.cells.length+1+1;let y=0;for(let O=0;O<this.cells.length;O++)y+=this.cells[O].length;const C=new Int32Array(h+y+this.keys.length+this.bboxes.length);C[0]=this.extent,C[1]=this.n,C[2]=this.padding;let k=h;for(let O=0;O<l.length;O++){const F=l[O];C[3+O]=k,C.set(F,k),k+=F.length}return C[3+l.length]=k,C.set(this.keys,k),k+=this.keys.length,C[3+l.length+1]=k,C.set(this.bboxes,k),k+=this.bboxes.length,C.buffer}static serialize(l,h){const y=l.toArrayBuffer();return h&&h.push(y),{buffer:y}}static deserialize(l){return new Ou(l.buffer)}}const fs={};function gn(d,l,h={}){if(fs[d])throw new Error(`${d} is already registered.`);Object.defineProperty(l,"_classRegistryKey",{value:d,writeable:!1}),fs[d]={klass:l,omit:h.omit||[],shallow:h.shallow||[]}}gn("Object",Object),gn("TransferableGridIndex",Ou),gn("Color",ce),gn("Error",Error),gn("AJAXError",qe),gn("ResolvedImage",Le),gn("StylePropertyFunction",tf),gn("StyleExpression",ef,{omit:["_evaluator"]}),gn("ZoomDependentExpression",hp),gn("ZoomConstantExpression",wu),gn("CompoundExpression",or,{omit:["_evaluate"]});for(const d in oc)oc[d]._classRegistryKey||gn(`Expression_${d}`,oc[d]);function ry(d){return d&&typeof ArrayBuffer<"u"&&(d instanceof ArrayBuffer||d.constructor&&d.constructor.name==="ArrayBuffer")}function pl(d,l){if(d==null||typeof d=="boolean"||typeof d=="number"||typeof d=="string"||d instanceof Boolean||d instanceof Number||d instanceof String||d instanceof Date||d instanceof RegExp||d instanceof Blob)return d;if(ry(d)||J(d))return l&&l.push(d),d;if(ArrayBuffer.isView(d)){const h=d;return l&&l.push(h.buffer),h}if(d instanceof ImageData)return l&&l.push(d.data.buffer),d;if(Array.isArray(d)){const h=[];for(const y of d)h.push(pl(y,l));return h}if(typeof d=="object"){const h=d.constructor,y=h._classRegistryKey;if(!y)throw new Error("can't serialize object of unregistered class");if(!fs[y])throw new Error(`${y} is not registered.`);const C=h.serialize?h.serialize(d,l):{};if(h.serialize){if(l&&C===l[l.length-1])throw new Error("statically serialized object won't survive transfer of $name property")}else{for(const k in d){if(!d.hasOwnProperty(k)||fs[y].omit.indexOf(k)>=0)continue;const O=d[k];C[k]=fs[y].shallow.indexOf(k)>=0?O:pl(O,l)}d instanceof Error&&(C.message=d.message)}if(C.$name)throw new Error("$name property is reserved for worker serialization logic.");return y!=="Object"&&(C.$name=y),C}throw new Error("can't serialize object of type "+typeof d)}function Ls(d){if(d==null||typeof d=="boolean"||typeof d=="number"||typeof d=="string"||d instanceof Boolean||d instanceof Number||d instanceof String||d instanceof Date||d instanceof RegExp||d instanceof Blob||ry(d)||J(d)||ArrayBuffer.isView(d)||d instanceof ImageData)return d;if(Array.isArray(d))return d.map(Ls);if(typeof d=="object"){const l=d.$name||"Object";if(!fs[l])throw new Error(`can't deserialize unregistered class ${l}`);const{klass:h}=fs[l];if(!h)throw new Error(`can't deserialize unregistered class ${l}`);if(h.deserialize)return h.deserialize(d);const y=Object.create(h.prototype);for(const C of Object.keys(d)){if(C==="$name")continue;const k=d[C];y[C]=fs[l].shallow.indexOf(C)>=0?k:Ls(k)}return y}throw new Error("can't deserialize object of type "+typeof d)}class vp{constructor(){this.first=!0}update(l,h){const y=Math.floor(l);return this.first?(this.first=!1,this.lastIntegerZoom=y,this.lastIntegerZoomTime=0,this.lastZoom=l,this.lastFloorZoom=y,!0):(this.lastFloorZoom>y?(this.lastIntegerZoom=y+1,this.lastIntegerZoomTime=h):this.lastFloorZoom<y&&(this.lastIntegerZoom=y,this.lastIntegerZoomTime=h),l!==this.lastZoom&&(this.lastZoom=l,this.lastFloorZoom=y,!0))}}const sn={"Latin-1 Supplement":d=>d>=128&&d<=255,Arabic:d=>d>=1536&&d<=1791,"Arabic Supplement":d=>d>=1872&&d<=1919,"Arabic Extended-A":d=>d>=2208&&d<=2303,"Hangul Jamo":d=>d>=4352&&d<=4607,"Unified Canadian Aboriginal Syllabics":d=>d>=5120&&d<=5759,Khmer:d=>d>=6016&&d<=6143,"Unified Canadian Aboriginal Syllabics Extended":d=>d>=6320&&d<=6399,"General Punctuation":d=>d>=8192&&d<=8303,"Letterlike Symbols":d=>d>=8448&&d<=8527,"Number Forms":d=>d>=8528&&d<=8591,"Miscellaneous Technical":d=>d>=8960&&d<=9215,"Control Pictures":d=>d>=9216&&d<=9279,"Optical Character Recognition":d=>d>=9280&&d<=9311,"Enclosed Alphanumerics":d=>d>=9312&&d<=9471,"Geometric Shapes":d=>d>=9632&&d<=9727,"Miscellaneous Symbols":d=>d>=9728&&d<=9983,"Miscellaneous Symbols and Arrows":d=>d>=11008&&d<=11263,"CJK Radicals Supplement":d=>d>=11904&&d<=12031,"Kangxi Radicals":d=>d>=12032&&d<=12255,"Ideographic Description Characters":d=>d>=12272&&d<=12287,"CJK Symbols and Punctuation":d=>d>=12288&&d<=12351,Hiragana:d=>d>=12352&&d<=12447,Katakana:d=>d>=12448&&d<=12543,Bopomofo:d=>d>=12544&&d<=12591,"Hangul Compatibility Jamo":d=>d>=12592&&d<=12687,Kanbun:d=>d>=12688&&d<=12703,"Bopomofo Extended":d=>d>=12704&&d<=12735,"CJK Strokes":d=>d>=12736&&d<=12783,"Katakana Phonetic Extensions":d=>d>=12784&&d<=12799,"Enclosed CJK Letters and Months":d=>d>=12800&&d<=13055,"CJK Compatibility":d=>d>=13056&&d<=13311,"CJK Unified Ideographs Extension A":d=>d>=13312&&d<=19903,"Yijing Hexagram Symbols":d=>d>=19904&&d<=19967,"CJK Unified Ideographs":d=>d>=19968&&d<=40959,"Yi Syllables":d=>d>=40960&&d<=42127,"Yi Radicals":d=>d>=42128&&d<=42191,"Hangul Jamo Extended-A":d=>d>=43360&&d<=43391,"Hangul Syllables":d=>d>=44032&&d<=55215,"Hangul Jamo Extended-B":d=>d>=55216&&d<=55295,"Private Use Area":d=>d>=57344&&d<=63743,"CJK Compatibility Ideographs":d=>d>=63744&&d<=64255,"Arabic Presentation Forms-A":d=>d>=64336&&d<=65023,"Vertical Forms":d=>d>=65040&&d<=65055,"CJK Compatibility Forms":d=>d>=65072&&d<=65103,"Small Form Variants":d=>d>=65104&&d<=65135,"Arabic Presentation Forms-B":d=>d>=65136&&d<=65279,"Halfwidth and Fullwidth Forms":d=>d>=65280&&d<=65519};function sf(d){for(const l of d)if(xp(l.charCodeAt(0)))return!0;return!1}function tw(d){for(const l of d)if(!yp(l.charCodeAt(0)))return!1;return!0}function yp(d){return!(sn.Arabic(d)||sn["Arabic Supplement"](d)||sn["Arabic Extended-A"](d)||sn["Arabic Presentation Forms-A"](d)||sn["Arabic Presentation Forms-B"](d))}function xp(d){return!(d!==746&&d!==747&&(d<4352||!(sn["Bopomofo Extended"](d)||sn.Bopomofo(d)||sn["CJK Compatibility Forms"](d)&&!(d>=65097&&d<=65103)||sn["CJK Compatibility Ideographs"](d)||sn["CJK Compatibility"](d)||sn["CJK Radicals Supplement"](d)||sn["CJK Strokes"](d)||!(!sn["CJK Symbols and Punctuation"](d)||d>=12296&&d<=12305||d>=12308&&d<=12319||d===12336)||sn["CJK Unified Ideographs Extension A"](d)||sn["CJK Unified Ideographs"](d)||sn["Enclosed CJK Letters and Months"](d)||sn["Hangul Compatibility Jamo"](d)||sn["Hangul Jamo Extended-A"](d)||sn["Hangul Jamo Extended-B"](d)||sn["Hangul Jamo"](d)||sn["Hangul Syllables"](d)||sn.Hiragana(d)||sn["Ideographic Description Characters"](d)||sn.Kanbun(d)||sn["Kangxi Radicals"](d)||sn["Katakana Phonetic Extensions"](d)||sn.Katakana(d)&&d!==12540||!(!sn["Halfwidth and Fullwidth Forms"](d)||d===65288||d===65289||d===65293||d>=65306&&d<=65310||d===65339||d===65341||d===65343||d>=65371&&d<=65503||d===65507||d>=65512&&d<=65519)||!(!sn["Small Form Variants"](d)||d>=65112&&d<=65118||d>=65123&&d<=65126)||sn["Unified Canadian Aboriginal Syllabics"](d)||sn["Unified Canadian Aboriginal Syllabics Extended"](d)||sn["Vertical Forms"](d)||sn["Yijing Hexagram Symbols"](d)||sn["Yi Syllables"](d)||sn["Yi Radicals"](d))))}function iy(d){return!(xp(d)||function(l){return!!(sn["Latin-1 Supplement"](l)&&(l===167||l===169||l===174||l===177||l===188||l===189||l===190||l===215||l===247)||sn["General Punctuation"](l)&&(l===8214||l===8224||l===8225||l===8240||l===8241||l===8251||l===8252||l===8258||l===8263||l===8264||l===8265||l===8273)||sn["Letterlike Symbols"](l)||sn["Number Forms"](l)||sn["Miscellaneous Technical"](l)&&(l>=8960&&l<=8967||l>=8972&&l<=8991||l>=8996&&l<=9e3||l===9003||l>=9085&&l<=9114||l>=9150&&l<=9165||l===9167||l>=9169&&l<=9179||l>=9186&&l<=9215)||sn["Control Pictures"](l)&&l!==9251||sn["Optical Character Recognition"](l)||sn["Enclosed Alphanumerics"](l)||sn["Geometric Shapes"](l)||sn["Miscellaneous Symbols"](l)&&!(l>=9754&&l<=9759)||sn["Miscellaneous Symbols and Arrows"](l)&&(l>=11026&&l<=11055||l>=11088&&l<=11097||l>=11192&&l<=11243)||sn["CJK Symbols and Punctuation"](l)||sn.Katakana(l)||sn["Private Use Area"](l)||sn["CJK Compatibility Forms"](l)||sn["Small Form Variants"](l)||sn["Halfwidth and Fullwidth Forms"](l)||l===8734||l===8756||l===8757||l>=9984&&l<=10087||l>=10102&&l<=10131||l===65532||l===65533)}(d))}function oy(d){return d>=1424&&d<=2303||sn["Arabic Presentation Forms-A"](d)||sn["Arabic Presentation Forms-B"](d)}function nw(d,l){return!(!l&&oy(d)||d>=2304&&d<=3583||d>=3840&&d<=4255||sn.Khmer(d))}function ay(d){for(const l of d)if(oy(l.charCodeAt(0)))return!0;return!1}const bp="deferred",_p="loading",wp="loaded";let Cp=null,go="unavailable",zs=null;const sy=function(d){d&&typeof d=="string"&&d.indexOf("NetworkError")>-1&&(go="error"),Cp&&Cp(d)};function dc(){Sp.fire(new Dt("pluginStateChange",{pluginStatus:go,pluginURL:zs}))}const Sp=new Ht,Du=function(){return go},ly=function(){if(go!==bp||!zs)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");go=_p,dc(),zs&&yt({url:zs},d=>{d?sy(d):(go=wp,dc())})},Ko={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:()=>go===wp||Ko.applyArabicShaping!=null,isLoading:()=>go===_p,setState(d){if(!U())throw new Error("Cannot set the state of the rtl-text-plugin when not in the web-worker context");go=d.pluginStatus,zs=d.pluginURL},isParsed(){if(!U())throw new Error("rtl-text-plugin is only parsed on the worker-threads");return Ko.applyArabicShaping!=null&&Ko.processBidirectionalText!=null&&Ko.processStyledBidirectionalText!=null},getPluginURL(){if(!U())throw new Error("rtl-text-plugin url can only be queried from the worker threads");return zs}};class Br{constructor(l,h){this.zoom=l,h?(this.now=h.now,this.fadeDuration=h.fadeDuration,this.zoomHistory=h.zoomHistory,this.transition=h.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new vp,this.transition={})}isSupportedScript(l){return function(h,y){for(const C of h)if(!nw(C.charCodeAt(0),y))return!1;return!0}(l,Ko.isLoaded())}crossFadingFactor(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}getCrossfadeParameters(){const l=this.zoom,h=l-Math.floor(l),y=this.crossFadingFactor();return l>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:h+(1-h)*y}:{fromScale:.5,toScale:1,t:1-(1-y)*h}}}class Au{constructor(l,h){this.property=l,this.value=h,this.expression=function(y,C){if(Ir(y))return new tf(y,C);if(bu(y)){const k=Wv(y,C);if(k.result==="error")throw new Error(k.value.map(O=>`${O.key}: ${O.message}`).join(", "));return k.value}{let k=y;return C.type==="color"&&typeof y=="string"?k=ce.parse(y):C.type!=="padding"||typeof y!="number"&&!Array.isArray(y)||(k=Pe.parse(y)),{kind:"constant",evaluate:()=>k}}}(h===void 0?l.specification.default:h,l.specification)}isDataDriven(){return this.expression.kind==="source"||this.expression.kind==="composite"}possiblyEvaluate(l,h,y){return this.property.possiblyEvaluate(this,l,h,y)}}class lf{constructor(l){this.property=l,this.value=new Au(l,void 0)}transitioned(l,h){return new uy(this.property,this.value,h,_({},l.transition,this.transition),l.now)}untransitioned(){return new uy(this.property,this.value,null,{},0)}}class cy{constructor(l){this._properties=l,this._values=Object.create(l.defaultTransitionablePropertyValues)}getValue(l){return D(this._values[l].value.value)}setValue(l,h){Object.prototype.hasOwnProperty.call(this._values,l)||(this._values[l]=new lf(this._values[l].property)),this._values[l].value=new Au(this._values[l].property,h===null?void 0:D(h))}getTransition(l){return D(this._values[l].transition)}setTransition(l,h){Object.prototype.hasOwnProperty.call(this._values,l)||(this._values[l]=new lf(this._values[l].property)),this._values[l].transition=D(h)||void 0}serialize(){const l={};for(const h of Object.keys(this._values)){const y=this.getValue(h);y!==void 0&&(l[h]=y);const C=this.getTransition(h);C!==void 0&&(l[`${h}-transition`]=C)}return l}transitioned(l,h){const y=new dy(this._properties);for(const C of Object.keys(this._values))y._values[C]=this._values[C].transitioned(l,h._values[C]);return y}untransitioned(){const l=new dy(this._properties);for(const h of Object.keys(this._values))l._values[h]=this._values[h].untransitioned();return l}}class uy{constructor(l,h,y,C,k){this.property=l,this.value=h,this.begin=k+C.delay||0,this.end=this.begin+C.duration||0,l.specification.transition&&(C.delay||C.duration)&&(this.prior=y)}possiblyEvaluate(l,h,y){const C=l.now||0,k=this.value.possiblyEvaluate(l,h,y),O=this.prior;if(O){if(C>this.end)return this.prior=null,k;if(this.value.isDataDriven())return this.prior=null,k;if(C<this.begin)return O.possiblyEvaluate(l,h,y);{const F=(C-this.begin)/(this.end-this.begin);return this.property.interpolate(O.possiblyEvaluate(l,h,y),k,function(B){if(B<=0)return 0;if(B>=1)return 1;const K=B*B,ee=K*B;return 4*(B<.5?ee:3*(B-K)+ee-.75)}(F))}}return k}}class dy{constructor(l){this._properties=l,this._values=Object.create(l.defaultTransitioningPropertyValues)}possiblyEvaluate(l,h,y){const C=new Nu(this._properties);for(const k of Object.keys(this._values))C._values[k]=this._values[k].possiblyEvaluate(l,h,y);return C}hasTransition(){for(const l of Object.keys(this._values))if(this._values[l].prior)return!0;return!1}}class rw{constructor(l){this._properties=l,this._values=Object.create(l.defaultPropertyValues)}getValue(l){return D(this._values[l].value)}setValue(l,h){this._values[l]=new Au(this._values[l].property,h===null?void 0:D(h))}serialize(){const l={};for(const h of Object.keys(this._values)){const y=this.getValue(h);y!==void 0&&(l[h]=y)}return l}possiblyEvaluate(l,h,y){const C=new Nu(this._properties);for(const k of Object.keys(this._values))C._values[k]=this._values[k].possiblyEvaluate(l,h,y);return C}}class Na{constructor(l,h,y){this.property=l,this.value=h,this.parameters=y}isConstant(){return this.value.kind==="constant"}constantOr(l){return this.value.kind==="constant"?this.value.value:l}evaluate(l,h,y,C){return this.property.evaluate(this.value,this.parameters,l,h,y,C)}}class Nu{constructor(l){this._properties=l,this._values=Object.create(l.defaultPossiblyEvaluatedValues)}get(l){return this._values[l]}}class xn{constructor(l){this.specification=l}possiblyEvaluate(l,h){if(l.isDataDriven())throw new Error("Value should not be data driven");return l.expression.evaluate(h)}interpolate(l,h,y){const C=us[this.specification.type];return C?C(l,h,y):l}}class Rn{constructor(l,h){this.specification=l,this.overrides=h}possiblyEvaluate(l,h,y,C){return new Na(this,l.expression.kind==="constant"||l.expression.kind==="camera"?{kind:"constant",value:l.expression.evaluate(h,null,{},y,C)}:l.expression,h)}interpolate(l,h,y){if(l.value.kind!=="constant"||h.value.kind!=="constant")return l;if(l.value.value===void 0||h.value.value===void 0)return new Na(this,{kind:"constant",value:void 0},l.parameters);const C=us[this.specification.type];return C?new Na(this,{kind:"constant",value:C(l.value.value,h.value.value,y)},l.parameters):l}evaluate(l,h,y,C,k,O){return l.kind==="constant"?l.value:l.evaluate(h,y,C,k,O)}}class fc extends Rn{possiblyEvaluate(l,h,y,C){if(l.value===void 0)return new Na(this,{kind:"constant",value:void 0},h);if(l.expression.kind==="constant"){const k=l.expression.evaluate(h,null,{},y,C),O=l.property.specification.type==="resolvedImage"&&typeof k!="string"?k.name:k,F=this._calculate(O,O,O,h);return new Na(this,{kind:"constant",value:F},h)}if(l.expression.kind==="camera"){const k=this._calculate(l.expression.evaluate({zoom:h.zoom-1}),l.expression.evaluate({zoom:h.zoom}),l.expression.evaluate({zoom:h.zoom+1}),h);return new Na(this,{kind:"constant",value:k},h)}return new Na(this,l.expression,h)}evaluate(l,h,y,C,k,O){if(l.kind==="source"){const F=l.evaluate(h,y,C,k,O);return this._calculate(F,F,F,h)}return l.kind==="composite"?this._calculate(l.evaluate({zoom:Math.floor(h.zoom)-1},y,C),l.evaluate({zoom:Math.floor(h.zoom)},y,C),l.evaluate({zoom:Math.floor(h.zoom)+1},y,C),h):l.value}_calculate(l,h,y,C){return C.zoom>C.zoomHistory.lastIntegerZoom?{from:l,to:h}:{from:y,to:h}}interpolate(l){return l}}class Ep{constructor(l){this.specification=l}possiblyEvaluate(l,h,y,C){if(l.value!==void 0){if(l.expression.kind==="constant"){const k=l.expression.evaluate(h,null,{},y,C);return this._calculate(k,k,k,h)}return this._calculate(l.expression.evaluate(new Br(Math.floor(h.zoom-1),h)),l.expression.evaluate(new Br(Math.floor(h.zoom),h)),l.expression.evaluate(new Br(Math.floor(h.zoom+1),h)),h)}}_calculate(l,h,y,C){return C.zoom>C.zoomHistory.lastIntegerZoom?{from:l,to:h}:{from:y,to:h}}interpolate(l){return l}}class Fs{constructor(l){this.specification=l}possiblyEvaluate(l,h,y,C){return!!l.expression.evaluate(h,null,{},y,C)}interpolate(){return!1}}class Fi{constructor(l){this.properties=l,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(const h in l){const y=l[h];y.specification.overridable&&this.overridableProperties.push(h);const C=this.defaultPropertyValues[h]=new Au(y,void 0),k=this.defaultTransitionablePropertyValues[h]=new lf(y);this.defaultTransitioningPropertyValues[h]=k.untransitioned(),this.defaultPossiblyEvaluatedValues[h]=C.possiblyEvaluate({})}}}gn("DataDrivenProperty",Rn),gn("DataConstantProperty",xn),gn("CrossFadedDataDrivenProperty",fc),gn("CrossFadedProperty",Ep),gn("ColorRampProperty",Fs);const $s="-transition";class La extends Ht{constructor(l,h){if(super(),this.id=l.id,this.type=l.type,this._featureFilter={filter:()=>!0,needGeometry:!1},l.type!=="custom"&&(this.metadata=l.metadata,this.minzoom=l.minzoom,this.maxzoom=l.maxzoom,l.type!=="background"&&(this.source=l.source,this.sourceLayer=l["source-layer"],this.filter=l.filter),h.layout&&(this._unevaluatedLayout=new rw(h.layout)),h.paint)){this._transitionablePaint=new cy(h.paint);for(const y in l.paint)this.setPaintProperty(y,l.paint[y],{validate:!1});for(const y in l.layout)this.setLayoutProperty(y,l.layout[y],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new Nu(h.paint)}}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(l){return l==="visibility"?this.visibility:this._unevaluatedLayout.getValue(l)}setLayoutProperty(l,h,y={}){h!=null&&this._validate(ew,`layers.${this.id}.layout.${l}`,l,h,y)||(l!=="visibility"?this._unevaluatedLayout.setValue(l,h):this.visibility=h)}getPaintProperty(l){return l.endsWith($s)?this._transitionablePaint.getTransition(l.slice(0,-$s.length)):this._transitionablePaint.getValue(l)}setPaintProperty(l,h,y={}){if(h!=null&&this._validate(J1,`layers.${this.id}.paint.${l}`,l,h,y))return!1;if(l.endsWith($s))return this._transitionablePaint.setTransition(l.slice(0,-$s.length),h||void 0),!1;{const C=this._transitionablePaint._values[l],k=C.property.specification["property-type"]==="cross-faded-data-driven",O=C.value.isDataDriven(),F=C.value;this._transitionablePaint.setValue(l,h),this._handleSpecialPaintPropertyUpdate(l);const B=this._transitionablePaint._values[l].value;return B.isDataDriven()||O||k||this._handleOverridablePaintPropertyUpdate(l,F,B)}}_handleSpecialPaintPropertyUpdate(l){}_handleOverridablePaintPropertyUpdate(l,h,y){return!1}isHidden(l){return!!(this.minzoom&&l<this.minzoom)||!!(this.maxzoom&&l>=this.maxzoom)||this.visibility==="none"}updateTransitions(l){this._transitioningPaint=this._transitionablePaint.transitioned(l,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculate(l,h){l.getCrossfadeParameters&&(this._crossfadeParameters=l.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(l,void 0,h)),this.paint=this._transitioningPaint.possiblyEvaluate(l,void 0,h)}serialize(){const l={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&&(l.layout=l.layout||{},l.layout.visibility=this.visibility),M(l,(h,y)=>!(h===void 0||y==="layout"&&!Object.keys(h).length||y==="paint"&&!Object.keys(h).length))}_validate(l,h,y,C,k={}){return(!k||k.validate!==!1)&&af(this,l.call(Ru,{key:h,layerType:this.type,objectKey:y,value:C,styleSpec:Fe,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(const l in this.paint._values){const h=this.paint.get(l);if(h instanceof Na&&Dr(h.property.specification)&&(h.value.kind==="source"||h.value.kind==="composite")&&h.value.isStateDependent)return!0}return!1}}const fy={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};class Bs{constructor(l,h){this._structArray=l,this._pos1=h*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}}class ni{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(l,h){return l._trim(),h&&(l.isTransferred=!0,h.push(l.arrayBuffer)),{length:l.length,arrayBuffer:l.arrayBuffer}}static deserialize(l){const h=Object.create(this.prototype);return h.arrayBuffer=l.arrayBuffer,h.length=l.length,h.capacity=l.arrayBuffer.byteLength/h.bytesPerElement,h._refreshViews(),h}_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(l){this.reserve(l),this.length=l}reserve(l){if(l>this.capacity){this.capacity=Math.max(l,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);const h=this.uint8;this._refreshViews(),h&&this.uint8.set(h)}}_refreshViews(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")}}function hi(d,l=1){let h=0,y=0;return{members:d.map(C=>{const k=fy[C.type].BYTES_PER_ELEMENT,O=h=Pp(h,Math.max(l,k)),F=C.components||1;return y=Math.max(y,k),h+=k*F,{name:C.name,type:C.type,components:F,offset:O}}),size:Pp(h,Math.max(y,l)),alignment:l}}function Pp(d,l){return Math.ceil(d/l)*l}class ml extends ni{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(l,h){const y=this.length;return this.resize(y+1),this.emplace(y,l,h)}emplace(l,h,y){const C=2*l;return this.int16[C+0]=h,this.int16[C+1]=y,l}}ml.prototype.bytesPerElement=4,gn("StructArrayLayout2i4",ml);class w extends ni{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(l,h,y,C){const k=this.length;return this.resize(k+1),this.emplace(k,l,h,y,C)}emplace(l,h,y,C,k){const O=4*l;return this.int16[O+0]=h,this.int16[O+1]=y,this.int16[O+2]=C,this.int16[O+3]=k,l}}w.prototype.bytesPerElement=8,gn("StructArrayLayout4i8",w);class c extends ni{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(l,h,y,C,k,O){const F=this.length;return this.resize(F+1),this.emplace(F,l,h,y,C,k,O)}emplace(l,h,y,C,k,O,F){const B=6*l;return this.int16[B+0]=h,this.int16[B+1]=y,this.int16[B+2]=C,this.int16[B+3]=k,this.int16[B+4]=O,this.int16[B+5]=F,l}}c.prototype.bytesPerElement=12,gn("StructArrayLayout2i4i12",c);class m extends ni{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(l,h,y,C,k,O){const F=this.length;return this.resize(F+1),this.emplace(F,l,h,y,C,k,O)}emplace(l,h,y,C,k,O,F){const B=4*l,K=8*l;return this.int16[B+0]=h,this.int16[B+1]=y,this.uint8[K+4]=C,this.uint8[K+5]=k,this.uint8[K+6]=O,this.uint8[K+7]=F,l}}m.prototype.bytesPerElement=8,gn("StructArrayLayout2i4ub8",m);class x extends ni{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(l,h){const y=this.length;return this.resize(y+1),this.emplace(y,l,h)}emplace(l,h,y){const C=2*l;return this.float32[C+0]=h,this.float32[C+1]=y,l}}x.prototype.bytesPerElement=8,gn("StructArrayLayout2f8",x);class S extends ni{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(l,h,y,C,k,O,F,B,K,ee){const ie=this.length;return this.resize(ie+1),this.emplace(ie,l,h,y,C,k,O,F,B,K,ee)}emplace(l,h,y,C,k,O,F,B,K,ee,ie){const de=10*l;return this.uint16[de+0]=h,this.uint16[de+1]=y,this.uint16[de+2]=C,this.uint16[de+3]=k,this.uint16[de+4]=O,this.uint16[de+5]=F,this.uint16[de+6]=B,this.uint16[de+7]=K,this.uint16[de+8]=ee,this.uint16[de+9]=ie,l}}S.prototype.bytesPerElement=20,gn("StructArrayLayout10ui20",S);class R extends ni{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(l,h,y,C,k,O,F,B,K,ee,ie,de){const ge=this.length;return this.resize(ge+1),this.emplace(ge,l,h,y,C,k,O,F,B,K,ee,ie,de)}emplace(l,h,y,C,k,O,F,B,K,ee,ie,de,ge){const ve=12*l;return this.int16[ve+0]=h,this.int16[ve+1]=y,this.int16[ve+2]=C,this.int16[ve+3]=k,this.uint16[ve+4]=O,this.uint16[ve+5]=F,this.uint16[ve+6]=B,this.uint16[ve+7]=K,this.int16[ve+8]=ee,this.int16[ve+9]=ie,this.int16[ve+10]=de,this.int16[ve+11]=ge,l}}R.prototype.bytesPerElement=24,gn("StructArrayLayout4i4ui4i24",R);class L extends ni{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(l,h,y){const C=this.length;return this.resize(C+1),this.emplace(C,l,h,y)}emplace(l,h,y,C){const k=3*l;return this.float32[k+0]=h,this.float32[k+1]=y,this.float32[k+2]=C,l}}L.prototype.bytesPerElement=12,gn("StructArrayLayout3f12",L);class V extends ni{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(l){const h=this.length;return this.resize(h+1),this.emplace(h,l)}emplace(l,h){return this.uint32[1*l+0]=h,l}}V.prototype.bytesPerElement=4,gn("StructArrayLayout1ul4",V);class H extends ni{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(l,h,y,C,k,O,F,B,K){const ee=this.length;return this.resize(ee+1),this.emplace(ee,l,h,y,C,k,O,F,B,K)}emplace(l,h,y,C,k,O,F,B,K,ee){const ie=10*l,de=5*l;return this.int16[ie+0]=h,this.int16[ie+1]=y,this.int16[ie+2]=C,this.int16[ie+3]=k,this.int16[ie+4]=O,this.int16[ie+5]=F,this.uint32[de+3]=B,this.uint16[ie+8]=K,this.uint16[ie+9]=ee,l}}H.prototype.bytesPerElement=20,gn("StructArrayLayout6i1ul2ui20",H);class G extends ni{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(l,h,y,C,k,O){const F=this.length;return this.resize(F+1),this.emplace(F,l,h,y,C,k,O)}emplace(l,h,y,C,k,O,F){const B=6*l;return this.int16[B+0]=h,this.int16[B+1]=y,this.int16[B+2]=C,this.int16[B+3]=k,this.int16[B+4]=O,this.int16[B+5]=F,l}}G.prototype.bytesPerElement=12,gn("StructArrayLayout2i2i2i12",G);class ne extends ni{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(l,h,y,C,k){const O=this.length;return this.resize(O+1),this.emplace(O,l,h,y,C,k)}emplace(l,h,y,C,k,O){const F=4*l,B=8*l;return this.float32[F+0]=h,this.float32[F+1]=y,this.float32[F+2]=C,this.int16[B+6]=k,this.int16[B+7]=O,l}}ne.prototype.bytesPerElement=16,gn("StructArrayLayout2f1f2i16",ne);class le extends ni{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(l,h,y,C){const k=this.length;return this.resize(k+1),this.emplace(k,l,h,y,C)}emplace(l,h,y,C,k){const O=12*l,F=3*l;return this.uint8[O+0]=h,this.uint8[O+1]=y,this.float32[F+1]=C,this.float32[F+2]=k,l}}le.prototype.bytesPerElement=12,gn("StructArrayLayout2ub2f12",le);class pe extends ni{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(l,h,y){const C=this.length;return this.resize(C+1),this.emplace(C,l,h,y)}emplace(l,h,y,C){const k=3*l;return this.uint16[k+0]=h,this.uint16[k+1]=y,this.uint16[k+2]=C,l}}pe.prototype.bytesPerElement=6,gn("StructArrayLayout3ui6",pe);class Te extends ni{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(l,h,y,C,k,O,F,B,K,ee,ie,de,ge,ve,Ne,De,Qe){const ht=this.length;return this.resize(ht+1),this.emplace(ht,l,h,y,C,k,O,F,B,K,ee,ie,de,ge,ve,Ne,De,Qe)}emplace(l,h,y,C,k,O,F,B,K,ee,ie,de,ge,ve,Ne,De,Qe,ht){const Ge=24*l,lt=12*l,Rt=48*l;return this.int16[Ge+0]=h,this.int16[Ge+1]=y,this.uint16[Ge+2]=C,this.uint16[Ge+3]=k,this.uint32[lt+2]=O,this.uint32[lt+3]=F,this.uint32[lt+4]=B,this.uint16[Ge+10]=K,this.uint16[Ge+11]=ee,this.uint16[Ge+12]=ie,this.float32[lt+7]=de,this.float32[lt+8]=ge,this.uint8[Rt+36]=ve,this.uint8[Rt+37]=Ne,this.uint8[Rt+38]=De,this.uint32[lt+10]=Qe,this.int16[Ge+22]=ht,l}}Te.prototype.bytesPerElement=48,gn("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",Te);class _e extends ni{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(l,h,y,C,k,O,F,B,K,ee,ie,de,ge,ve,Ne,De,Qe,ht,Ge,lt,Rt,kt,hn,vn,ln,en,Qt,cn){const nn=this.length;return this.resize(nn+1),this.emplace(nn,l,h,y,C,k,O,F,B,K,ee,ie,de,ge,ve,Ne,De,Qe,ht,Ge,lt,Rt,kt,hn,vn,ln,en,Qt,cn)}emplace(l,h,y,C,k,O,F,B,K,ee,ie,de,ge,ve,Ne,De,Qe,ht,Ge,lt,Rt,kt,hn,vn,ln,en,Qt,cn,nn){const jt=34*l,In=17*l;return this.int16[jt+0]=h,this.int16[jt+1]=y,this.int16[jt+2]=C,this.int16[jt+3]=k,this.int16[jt+4]=O,this.int16[jt+5]=F,this.int16[jt+6]=B,this.int16[jt+7]=K,this.uint16[jt+8]=ee,this.uint16[jt+9]=ie,this.uint16[jt+10]=de,this.uint16[jt+11]=ge,this.uint16[jt+12]=ve,this.uint16[jt+13]=Ne,this.uint16[jt+14]=De,this.uint16[jt+15]=Qe,this.uint16[jt+16]=ht,this.uint16[jt+17]=Ge,this.uint16[jt+18]=lt,this.uint16[jt+19]=Rt,this.uint16[jt+20]=kt,this.uint16[jt+21]=hn,this.uint16[jt+22]=vn,this.uint32[In+12]=ln,this.float32[In+13]=en,this.float32[In+14]=Qt,this.float32[In+15]=cn,this.float32[In+16]=nn,l}}_e.prototype.bytesPerElement=68,gn("StructArrayLayout8i15ui1ul4f68",_e);class Ee extends ni{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(l){const h=this.length;return this.resize(h+1),this.emplace(h,l)}emplace(l,h){return this.float32[1*l+0]=h,l}}Ee.prototype.bytesPerElement=4,gn("StructArrayLayout1f4",Ee);class Be extends ni{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(l,h,y){const C=this.length;return this.resize(C+1),this.emplace(C,l,h,y)}emplace(l,h,y,C){const k=3*l;return this.int16[k+0]=h,this.int16[k+1]=y,this.int16[k+2]=C,l}}Be.prototype.bytesPerElement=6,gn("StructArrayLayout3i6",Be);class We extends ni{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(l,h,y){const C=this.length;return this.resize(C+1),this.emplace(C,l,h,y)}emplace(l,h,y,C){const k=4*l;return this.uint32[2*l+0]=h,this.uint16[k+2]=y,this.uint16[k+3]=C,l}}We.prototype.bytesPerElement=8,gn("StructArrayLayout1ul2ui8",We);class rt extends ni{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(l,h){const y=this.length;return this.resize(y+1),this.emplace(y,l,h)}emplace(l,h,y){const C=2*l;return this.uint16[C+0]=h,this.uint16[C+1]=y,l}}rt.prototype.bytesPerElement=4,gn("StructArrayLayout2ui4",rt);class Oe extends ni{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(l){const h=this.length;return this.resize(h+1),this.emplace(h,l)}emplace(l,h){return this.uint16[1*l+0]=h,l}}Oe.prototype.bytesPerElement=2,gn("StructArrayLayout1ui2",Oe);class ft extends ni{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(l,h,y,C){const k=this.length;return this.resize(k+1),this.emplace(k,l,h,y,C)}emplace(l,h,y,C,k){const O=4*l;return this.float32[O+0]=h,this.float32[O+1]=y,this.float32[O+2]=C,this.float32[O+3]=k,l}}ft.prototype.bytesPerElement=16,gn("StructArrayLayout4f16",ft);class st extends Bs{get anchorPointX(){return this._structArray.int16[this._pos2+0]}get anchorPointY(){return this._structArray.int16[this._pos2+1]}get x1(){return this._structArray.int16[this._pos2+2]}get y1(){return this._structArray.int16[this._pos2+3]}get x2(){return this._structArray.int16[this._pos2+4]}get y2(){return this._structArray.int16[this._pos2+5]}get featureIndex(){return this._structArray.uint32[this._pos4+3]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+8]}get bucketIndex(){return this._structArray.uint16[this._pos2+9]}get anchorPoint(){return new re(this.anchorPointX,this.anchorPointY)}}st.prototype.size=20;class _t extends H{get(l){return new st(this,l)}}gn("CollisionBoxArray",_t);class wt extends Bs{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get glyphStartIndex(){return this._structArray.uint16[this._pos2+2]}get numGlyphs(){return this._structArray.uint16[this._pos2+3]}get vertexStartIndex(){return this._structArray.uint32[this._pos4+2]}get lineStartIndex(){return this._structArray.uint32[this._pos4+3]}get lineLength(){return this._structArray.uint32[this._pos4+4]}get segment(){return this._structArray.uint16[this._pos2+10]}get lowerSize(){return this._structArray.uint16[this._pos2+11]}get upperSize(){return this._structArray.uint16[this._pos2+12]}get lineOffsetX(){return this._structArray.float32[this._pos4+7]}get lineOffsetY(){return this._structArray.float32[this._pos4+8]}get writingMode(){return this._structArray.uint8[this._pos1+36]}get placedOrientation(){return this._structArray.uint8[this._pos1+37]}set placedOrientation(l){this._structArray.uint8[this._pos1+37]=l}get hidden(){return this._structArray.uint8[this._pos1+38]}set hidden(l){this._structArray.uint8[this._pos1+38]=l}get crossTileID(){return this._structArray.uint32[this._pos4+10]}set crossTileID(l){this._structArray.uint32[this._pos4+10]=l}get associatedIconIndex(){return this._structArray.int16[this._pos2+22]}}wt.prototype.size=48;class Ut extends Te{get(l){return new wt(this,l)}}gn("PlacedSymbolArray",Ut);class xt extends Bs{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get rightJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+2]}get centerJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+3]}get leftJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+4]}get verticalPlacedTextSymbolIndex(){return this._structArray.int16[this._pos2+5]}get placedIconSymbolIndex(){return this._structArray.int16[this._pos2+6]}get verticalPlacedIconSymbolIndex(){return this._structArray.int16[this._pos2+7]}get key(){return this._structArray.uint16[this._pos2+8]}get textBoxStartIndex(){return this._structArray.uint16[this._pos2+9]}get textBoxEndIndex(){return this._structArray.uint16[this._pos2+10]}get verticalTextBoxStartIndex(){return this._structArray.uint16[this._pos2+11]}get verticalTextBoxEndIndex(){return this._structArray.uint16[this._pos2+12]}get iconBoxStartIndex(){return this._structArray.uint16[this._pos2+13]}get iconBoxEndIndex(){return this._structArray.uint16[this._pos2+14]}get verticalIconBoxStartIndex(){return this._structArray.uint16[this._pos2+15]}get verticalIconBoxEndIndex(){return this._structArray.uint16[this._pos2+16]}get featureIndex(){return this._structArray.uint16[this._pos2+17]}get numHorizontalGlyphVertices(){return this._structArray.uint16[this._pos2+18]}get numVerticalGlyphVertices(){return this._structArray.uint16[this._pos2+19]}get numIconVertices(){return this._structArray.uint16[this._pos2+20]}get numVerticalIconVertices(){return this._structArray.uint16[this._pos2+21]}get useRuntimeCollisionCircles(){return this._structArray.uint16[this._pos2+22]}get crossTileID(){return this._structArray.uint32[this._pos4+12]}set crossTileID(l){this._structArray.uint32[this._pos4+12]=l}get textBoxScale(){return this._structArray.float32[this._pos4+13]}get textOffset0(){return this._structArray.float32[this._pos4+14]}get textOffset1(){return this._structArray.float32[this._pos4+15]}get collisionCircleDiameter(){return this._structArray.float32[this._pos4+16]}}xt.prototype.size=68;class un extends _e{get(l){return new xt(this,l)}}gn("SymbolInstanceArray",un);class Jt extends Ee{getoffsetX(l){return this.float32[1*l+0]}}gn("GlyphOffsetArray",Jt);class fn extends Be{getx(l){return this.int16[3*l+0]}gety(l){return this.int16[3*l+1]}gettileUnitDistanceFromAnchor(l){return this.int16[3*l+2]}}gn("SymbolLineVertexArray",fn);class $n extends Bs{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]}}$n.prototype.size=8;class Hn extends We{get(l){return new $n(this,l)}}gn("FeatureIndexArray",Hn);class Tn extends ml{}class mr extends ml{}class gr extends ml{}class ir extends c{}class ar extends m{}class br extends x{}class Ti extends S{}class za extends R{}class la extends L{}class Fa extends V{}class Vs extends G{}class Wo extends le{}class vo extends pe{}class hs extends rt{}const cf=hi([{name:"a_pos",components:2,type:"Int16"}],4),{members:yi}=cf;class Zn{constructor(l=[]){this.segments=l}prepareSegment(l,h,y,C){let k=this.segments[this.segments.length-1];return l>Zn.MAX_VERTEX_ARRAY_LENGTH&&z(`Max vertices per segment is ${Zn.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${l}`),(!k||k.vertexLength+l>Zn.MAX_VERTEX_ARRAY_LENGTH||k.sortKey!==C)&&(k={vertexOffset:h.length,primitiveOffset:y.length,vertexLength:0,primitiveLength:0},C!==void 0&&(k.sortKey=C),this.segments.push(k)),k}get(){return this.segments}destroy(){for(const l of this.segments)for(const h in l.vaos)l.vaos[h].destroy()}static simpleSegment(l,h,y,C){return new Zn([{vertexOffset:l,primitiveOffset:h,vertexLength:y,primitiveLength:C,vaos:{},sortKey:0}])}}function pr(d,l){return 256*(d=v(Math.floor(d),0,255))+v(Math.floor(l),0,255)}Zn.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,gn("SegmentVector",Zn);const Ii=hi([{name:"a_pattern_from",components:4,type:"Uint16"},{name:"a_pattern_to",components:4,type:"Uint16"},{name:"a_pixel_ratio_from",components:1,type:"Uint16"},{name:"a_pixel_ratio_to",components:1,type:"Uint16"}]);var ki={exports:{}},Vr={exports:{}};Vr.exports=function(d,l){var h,y,C,k,O,F,B,K;for(y=d.length-(h=3&d.length),C=l,O=3432918353,F=461845907,K=0;K<y;)B=255&d.charCodeAt(K)|(255&d.charCodeAt(++K))<<8|(255&d.charCodeAt(++K))<<16|(255&d.charCodeAt(++K))<<24,++K,C=27492+(65535&(k=5*(65535&(C=(C^=B=(65535&(B=(B=(65535&B)*O+(((B>>>16)*O&65535)<<16)&4294967295)<<15|B>>>17))*F+(((B>>>16)*F&65535)<<16)&4294967295)<<13|C>>>19))+((5*(C>>>16)&65535)<<16)&4294967295))+((58964+(k>>>16)&65535)<<16);switch(B=0,h){case 3:B^=(255&d.charCodeAt(K+2))<<16;case 2:B^=(255&d.charCodeAt(K+1))<<8;case 1:C^=B=(65535&(B=(B=(65535&(B^=255&d.charCodeAt(K)))*O+(((B>>>16)*O&65535)<<16)&4294967295)<<15|B>>>17))*F+(((B>>>16)*F&65535)<<16)&4294967295}return C^=d.length,C=2246822507*(65535&(C^=C>>>16))+((2246822507*(C>>>16)&65535)<<16)&4294967295,C=3266489909*(65535&(C^=C>>>13))+((3266489909*(C>>>16)&65535)<<16)&4294967295,(C^=C>>>16)>>>0};var Go={exports:{}};Go.exports=function(d,l){for(var h,y=d.length,C=l^y,k=0;y>=4;)h=1540483477*(65535&(h=255&d.charCodeAt(k)|(255&d.charCodeAt(++k))<<8|(255&d.charCodeAt(++k))<<16|(255&d.charCodeAt(++k))<<24))+((1540483477*(h>>>16)&65535)<<16),C=1540483477*(65535&C)+((1540483477*(C>>>16)&65535)<<16)^(h=1540483477*(65535&(h^=h>>>24))+((1540483477*(h>>>16)&65535)<<16)),y-=4,++k;switch(y){case 3:C^=(255&d.charCodeAt(k+2))<<16;case 2:C^=(255&d.charCodeAt(k+1))<<8;case 1:C=1540483477*(65535&(C^=255&d.charCodeAt(k)))+((1540483477*(C>>>16)&65535)<<16)}return C=1540483477*(65535&(C^=C>>>13))+((1540483477*(C>>>16)&65535)<<16),(C^=C>>>15)>>>0};var gl=Vr.exports,Tp=Go.exports;ki.exports=gl,ki.exports.murmur3=gl,ki.exports.murmur2=Tp;class hc{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(l,h,y,C){this.ids.push(hy(l)),this.positions.push(h,y,C)}getPositions(l){if(!this.indexed)throw new Error("Trying to get index, but feature positions are not indexed");const h=hy(l);let y=0,C=this.ids.length-1;for(;y<C;){const O=y+C>>1;this.ids[O]>=h?C=O:y=O+1}const k=[];for(;this.ids[y]===h;)k.push({index:this.positions[3*y],start:this.positions[3*y+1],end:this.positions[3*y+2]}),y++;return k}static serialize(l,h){const y=new Float64Array(l.ids),C=new Uint32Array(l.positions);return Ip(y,C,0,y.length-1),h&&h.push(y.buffer,C.buffer),{ids:y,positions:C}}static deserialize(l){const h=new hc;return h.ids=l.ids,h.positions=l.positions,h.indexed=!0,h}}function hy(d){const l=+d;return!isNaN(l)&&l<=Number.MAX_SAFE_INTEGER?l:ki.exports(String(d))}function Ip(d,l,h,y){for(;h<y;){const C=d[h+y>>1];let k=h-1,O=y+1;for(;;){do k++;while(d[k]<C);do O--;while(d[O]>C);if(k>=O)break;Us(d,k,O),Us(l,3*k,3*O),Us(l,3*k+1,3*O+1),Us(l,3*k+2,3*O+2)}O-h<y-O?(Ip(d,l,h,O),h=O+1):(Ip(d,l,O+1,y),y=O)}}function Us(d,l,h){const y=d[l];d[l]=d[h],d[h]=y}gn("FeaturePositionMap",hc);class vl{constructor(l,h){this.gl=l.gl,this.location=h}}class yl extends vl{constructor(l,h){super(l,h),this.current=0}set(l){this.current!==l&&(this.current=l,this.gl.uniform1f(this.location,l))}}class uf extends vl{constructor(l,h){super(l,h),this.current=[0,0,0,0]}set(l){l[0]===this.current[0]&&l[1]===this.current[1]&&l[2]===this.current[2]&&l[3]===this.current[3]||(this.current=l,this.gl.uniform4f(this.location,l[0],l[1],l[2],l[3]))}}class uM extends vl{constructor(l,h){super(l,h),this.current=ce.transparent}set(l){l.r===this.current.r&&l.g===this.current.g&&l.b===this.current.b&&l.a===this.current.a||(this.current=l,this.gl.uniform4f(this.location,l.r,l.g,l.b,l.a))}}const I9=new Float32Array(16);function iw(d){return[pr(255*d.r,255*d.g),pr(255*d.b,255*d.a)]}class kp{constructor(l,h,y){this.value=l,this.uniformNames=h.map(C=>`u_${C}`),this.type=y}setUniform(l,h,y){l.set(y.constantOr(this.value))}getBinding(l,h,y){return this.type==="color"?new uM(l,h):new yl(l,h)}}class df{constructor(l,h){this.uniformNames=h.map(y=>`u_${y}`),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(l,h){this.pixelRatioFrom=h.pixelRatio,this.pixelRatioTo=l.pixelRatio,this.patternFrom=h.tlbr,this.patternTo=l.tlbr}setUniform(l,h,y,C){const k=C==="u_pattern_to"?this.patternTo:C==="u_pattern_from"?this.patternFrom:C==="u_pixel_ratio_to"?this.pixelRatioTo:C==="u_pixel_ratio_from"?this.pixelRatioFrom:null;k&&l.set(k)}getBinding(l,h,y){return y.substr(0,9)==="u_pattern"?new uf(l,h):new yl(l,h)}}class xl{constructor(l,h,y,C){this.expression=l,this.type=y,this.maxValue=0,this.paintVertexAttributes=h.map(k=>({name:`a_${k}`,type:"Float32",components:y==="color"?2:1,offset:0})),this.paintVertexArray=new C}populatePaintArray(l,h,y,C,k){const O=this.paintVertexArray.length,F=this.expression.evaluate(new Br(0),h,{},C,[],k);this.paintVertexArray.resize(l),this._setPaintValue(O,l,F)}updatePaintArray(l,h,y,C){const k=this.expression.evaluate({zoom:0},y,C);this._setPaintValue(l,h,k)}_setPaintValue(l,h,y){if(this.type==="color"){const C=iw(y);for(let k=l;k<h;k++)this.paintVertexArray.emplace(k,C[0],C[1])}else{for(let C=l;C<h;C++)this.paintVertexArray.emplace(C,y);this.maxValue=Math.max(this.maxValue,Math.abs(y))}}upload(l){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=l.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))}destroy(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()}}class ps{constructor(l,h,y,C,k,O){this.expression=l,this.uniformNames=h.map(F=>`u_${F}_t`),this.type=y,this.useIntegerZoom=C,this.zoom=k,this.maxValue=0,this.paintVertexAttributes=h.map(F=>({name:`a_${F}`,type:"Float32",components:y==="color"?4:2,offset:0})),this.paintVertexArray=new O}populatePaintArray(l,h,y,C,k){const O=this.expression.evaluate(new Br(this.zoom),h,{},C,[],k),F=this.expression.evaluate(new Br(this.zoom+1),h,{},C,[],k),B=this.paintVertexArray.length;this.paintVertexArray.resize(l),this._setPaintValue(B,l,O,F)}updatePaintArray(l,h,y,C){const k=this.expression.evaluate({zoom:this.zoom},y,C),O=this.expression.evaluate({zoom:this.zoom+1},y,C);this._setPaintValue(l,h,k,O)}_setPaintValue(l,h,y,C){if(this.type==="color"){const k=iw(y),O=iw(C);for(let F=l;F<h;F++)this.paintVertexArray.emplace(F,k[0],k[1],O[0],O[1])}else{for(let k=l;k<h;k++)this.paintVertexArray.emplace(k,y,C);this.maxValue=Math.max(this.maxValue,Math.abs(y),Math.abs(C))}}upload(l){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=l.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))}destroy(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()}setUniform(l,h){const y=this.useIntegerZoom?Math.floor(h.zoom):h.zoom,C=v(this.expression.interpolationFactor(y,this.zoom,this.zoom+1),0,1);l.set(C)}getBinding(l,h,y){return new yl(l,h)}}class pc{constructor(l,h,y,C,k,O){this.expression=l,this.type=h,this.useIntegerZoom=y,this.zoom=C,this.layerId=O,this.zoomInPaintVertexArray=new k,this.zoomOutPaintVertexArray=new k}populatePaintArray(l,h,y){const C=this.zoomInPaintVertexArray.length;this.zoomInPaintVertexArray.resize(l),this.zoomOutPaintVertexArray.resize(l),this._setPaintValues(C,l,h.patterns&&h.patterns[this.layerId],y)}updatePaintArray(l,h,y,C,k){this._setPaintValues(l,h,y.patterns&&y.patterns[this.layerId],k)}_setPaintValues(l,h,y,C){if(!C||!y)return;const{min:k,mid:O,max:F}=y,B=C[k],K=C[O],ee=C[F];if(B&&K&&ee)for(let ie=l;ie<h;ie++)this.zoomInPaintVertexArray.emplace(ie,K.tl[0],K.tl[1],K.br[0],K.br[1],B.tl[0],B.tl[1],B.br[0],B.br[1],K.pixelRatio,B.pixelRatio),this.zoomOutPaintVertexArray.emplace(ie,K.tl[0],K.tl[1],K.br[0],K.br[1],ee.tl[0],ee.tl[1],ee.br[0],ee.br[1],K.pixelRatio,ee.pixelRatio)}upload(l){this.zoomInPaintVertexArray&&this.zoomInPaintVertexArray.arrayBuffer&&this.zoomOutPaintVertexArray&&this.zoomOutPaintVertexArray.arrayBuffer&&(this.zoomInPaintVertexBuffer=l.createVertexBuffer(this.zoomInPaintVertexArray,Ii.members,this.expression.isStateDependent),this.zoomOutPaintVertexBuffer=l.createVertexBuffer(this.zoomOutPaintVertexArray,Ii.members,this.expression.isStateDependent))}destroy(){this.zoomOutPaintVertexBuffer&&this.zoomOutPaintVertexBuffer.destroy(),this.zoomInPaintVertexBuffer&&this.zoomInPaintVertexBuffer.destroy()}}class dM{constructor(l,h,y){this.binders={},this._buffers=[];const C=[];for(const k in l.paint._values){if(!y(k))continue;const O=l.paint.get(k);if(!(O instanceof Na&&Dr(O.property.specification)))continue;const F=k9(k,l.type),B=O.value,K=O.property.specification.type,ee=O.property.useIntegerZoom,ie=O.property.specification["property-type"],de=ie==="cross-faded"||ie==="cross-faded-data-driven";if(B.kind==="constant")this.binders[k]=de?new df(B.value,F):new kp(B.value,F,K),C.push(`/u_${k}`);else if(B.kind==="source"||de){const ge=fM(k,K,"source");this.binders[k]=de?new pc(B,K,ee,h,ge,l.id):new xl(B,F,K,ge),C.push(`/a_${k}`)}else{const ge=fM(k,K,"composite");this.binders[k]=new ps(B,F,K,ee,h,ge),C.push(`/z_${k}`)}}this.cacheKey=C.sort().join("")}getMaxValue(l){const h=this.binders[l];return h instanceof xl||h instanceof ps?h.maxValue:0}populatePaintArrays(l,h,y,C,k){for(const O in this.binders){const F=this.binders[O];(F instanceof xl||F instanceof ps||F instanceof pc)&&F.populatePaintArray(l,h,y,C,k)}}setConstantPatternPositions(l,h){for(const y in this.binders){const C=this.binders[y];C instanceof df&&C.setConstantPatternPositions(l,h)}}updatePaintArrays(l,h,y,C,k){let O=!1;for(const F in l){const B=h.getPositions(F);for(const K of B){const ee=y.feature(K.index);for(const ie in this.binders){const de=this.binders[ie];if((de instanceof xl||de instanceof ps||de instanceof pc)&&de.expression.isStateDependent===!0){const ge=C.paint.get(ie);de.expression=ge.value,de.updatePaintArray(K.start,K.end,ee,l[F],k),O=!0}}}}return O}defines(){const l=[];for(const h in this.binders){const y=this.binders[h];(y instanceof kp||y instanceof df)&&l.push(...y.uniformNames.map(C=>`#define HAS_UNIFORM_${C}`))}return l}getBinderAttributes(){const l=[];for(const h in this.binders){const y=this.binders[h];if(y instanceof xl||y instanceof ps)for(let C=0;C<y.paintVertexAttributes.length;C++)l.push(y.paintVertexAttributes[C].name);else if(y instanceof pc)for(let C=0;C<Ii.members.length;C++)l.push(Ii.members[C].name)}return l}getBinderUniforms(){const l=[];for(const h in this.binders){const y=this.binders[h];if(y instanceof kp||y instanceof df||y instanceof ps)for(const C of y.uniformNames)l.push(C)}return l}getPaintVertexBuffers(){return this._buffers}getUniforms(l,h){const y=[];for(const C in this.binders){const k=this.binders[C];if(k instanceof kp||k instanceof df||k instanceof ps){for(const O of k.uniformNames)if(h[O]){const F=k.getBinding(l,h[O],O);y.push({name:O,property:C,binding:F})}}}return y}setUniforms(l,h,y,C){for(const{name:k,property:O,binding:F}of h)this.binders[O].setUniform(F,C,y.get(O),k)}updatePaintBuffers(l){this._buffers=[];for(const h in this.binders){const y=this.binders[h];if(l&&y instanceof pc){const C=l.fromScale===2?y.zoomInPaintVertexBuffer:y.zoomOutPaintVertexBuffer;C&&this._buffers.push(C)}else(y instanceof xl||y instanceof ps)&&y.paintVertexBuffer&&this._buffers.push(y.paintVertexBuffer)}}upload(l){for(const h in this.binders){const y=this.binders[h];(y instanceof xl||y instanceof ps||y instanceof pc)&&y.upload(l)}this.updatePaintBuffers()}destroy(){for(const l in this.binders){const h=this.binders[l];(h instanceof xl||h instanceof ps||h instanceof pc)&&h.destroy()}}}class Lu{constructor(l,h,y=()=>!0){this.programConfigurations={};for(const C of l)this.programConfigurations[C.id]=new dM(C,h,y);this.needsUpload=!1,this._featureMap=new hc,this._bufferOffset=0}populatePaintArrays(l,h,y,C,k,O){for(const F in this.programConfigurations)this.programConfigurations[F].populatePaintArrays(l,h,C,k,O);h.id!==void 0&&this._featureMap.add(h.id,y,this._bufferOffset,l),this._bufferOffset=l,this.needsUpload=!0}updatePaintArrays(l,h,y,C){for(const k of y)this.needsUpload=this.programConfigurations[k.id].updatePaintArrays(l,this._featureMap,h,k,C)||this.needsUpload}get(l){return this.programConfigurations[l]}upload(l){if(this.needsUpload){for(const h in this.programConfigurations)this.programConfigurations[h].upload(l);this.needsUpload=!1}}destroy(){for(const l in this.programConfigurations)this.programConfigurations[l].destroy()}}function k9(d,l){return{"text-opacity":["opacity"],"icon-opacity":["opacity"],"text-color":["fill_color"],"icon-color":["fill_color"],"text-halo-color":["halo_color"],"icon-halo-color":["halo_color"],"text-halo-blur":["halo_blur"],"icon-halo-blur":["halo_blur"],"text-halo-width":["halo_width"],"icon-halo-width":["halo_width"],"line-gap-width":["gapwidth"],"line-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-extrusion-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"]}[d]||[d.replace(`${l}-`,"").replace(/-/g,"_")]}function fM(d,l,h){const y={color:{source:x,composite:ft},number:{source:Ee,composite:x}},C=function(k){return{"line-pattern":{source:Ti,composite:Ti},"fill-pattern":{source:Ti,composite:Ti},"fill-extrusion-pattern":{source:Ti,composite:Ti}}[k]}(d);return C&&C[h]||y[l][h]}gn("ConstantBinder",kp),gn("CrossFadedConstantBinder",df),gn("SourceExpressionBinder",xl),gn("CrossFadedCompositeBinder",pc),gn("CompositeExpressionBinder",ps),gn("ProgramConfiguration",dM,{omit:["_buffers"]}),gn("ProgramConfigurationSet",Lu);var xi=8192;const ow=Math.pow(2,14)-1,hM=-ow-1;function zu(d){const l=xi/d.extent,h=d.loadGeometry();for(let y=0;y<h.length;y++){const C=h[y];for(let k=0;k<C.length;k++){const O=C[k],F=Math.round(O.x*l),B=Math.round(O.y*l);O.x=v(F,hM,ow),O.y=v(B,hM,ow),(F<O.x||F>O.x+1||B<O.y||B>O.y+1)&&z("Geometry exceeds allowed extent, reduce your vector tile buffer size")}}return h}function Fu(d,l){return{type:d.type,id:d.id,properties:d.properties,geometry:l?zu(d):[]}}function py(d,l,h,y,C){d.emplaceBack(2*l+(y+1)/2,2*h+(C+1)/2)}class aw{constructor(l){this.zoom=l.zoom,this.overscaling=l.overscaling,this.layers=l.layers,this.layerIds=this.layers.map(h=>h.id),this.index=l.index,this.hasPattern=!1,this.layoutVertexArray=new mr,this.indexArray=new vo,this.segments=new Zn,this.programConfigurations=new Lu(l.layers,l.zoom),this.stateDependentLayerIds=this.layers.filter(h=>h.isStateDependent()).map(h=>h.id)}populate(l,h,y){const C=this.layers[0],k=[];let O=null,F=!1;C.type==="circle"&&(O=C.layout.get("circle-sort-key"),F=!O.isConstant());for(const{feature:B,id:K,index:ee,sourceLayerIndex:ie}of l){const de=this.layers[0]._featureFilter.needGeometry,ge=Fu(B,de);if(!this.layers[0]._featureFilter.filter(new Br(this.zoom),ge,y))continue;const ve=F?O.evaluate(ge,{},y):void 0,Ne={id:K,properties:B.properties,type:B.type,sourceLayerIndex:ie,index:ee,geometry:de?ge.geometry:zu(B),patterns:{},sortKey:ve};k.push(Ne)}F&&k.sort((B,K)=>B.sortKey-K.sortKey);for(const B of k){const{geometry:K,index:ee,sourceLayerIndex:ie}=B,de=l[ee].feature;this.addFeature(B,K,ee,y),h.featureIndex.insert(de,K,ee,ie,this.index)}}update(l,h,y){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(l,h,this.stateDependentLayers,y)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(l){this.uploaded||(this.layoutVertexBuffer=l.createVertexBuffer(this.layoutVertexArray,yi),this.indexBuffer=l.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(l),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}addFeature(l,h,y,C){for(const k of h)for(const O of k){const F=O.x,B=O.y;if(F<0||F>=xi||B<0||B>=xi)continue;const K=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,l.sortKey),ee=K.vertexLength;py(this.layoutVertexArray,F,B,-1,-1),py(this.layoutVertexArray,F,B,1,-1),py(this.layoutVertexArray,F,B,1,1),py(this.layoutVertexArray,F,B,-1,1),this.indexArray.emplaceBack(ee,ee+1,ee+2),this.indexArray.emplaceBack(ee,ee+3,ee+2),K.vertexLength+=4,K.primitiveLength+=2}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,l,y,{},C)}}function pM(d,l){for(let h=0;h<d.length;h++)if(ff(l,d[h]))return!0;for(let h=0;h<l.length;h++)if(ff(d,l[h]))return!0;return!!sw(d,l)}function M9(d,l,h){return!!ff(d,l)||!!lw(l,d,h)}function mM(d,l){if(d.length===1)return vM(l,d[0]);for(let h=0;h<l.length;h++){const y=l[h];for(let C=0;C<y.length;C++)if(ff(d,y[C]))return!0}for(let h=0;h<d.length;h++)if(vM(l,d[h]))return!0;for(let h=0;h<l.length;h++)if(sw(d,l[h]))return!0;return!1}function R9(d,l,h){if(d.length>1){if(sw(d,l))return!0;for(let y=0;y<l.length;y++)if(lw(l[y],d,h))return!0}for(let y=0;y<d.length;y++)if(lw(d[y],l,h))return!0;return!1}function sw(d,l){if(d.length===0||l.length===0)return!1;for(let h=0;h<d.length-1;h++){const y=d[h],C=d[h+1];for(let k=0;k<l.length-1;k++)if(O9(y,C,l[k],l[k+1]))return!0}return!1}function O9(d,l,h,y){return $(d,h,y)!==$(l,h,y)&&$(d,l,h)!==$(d,l,y)}function lw(d,l,h){const y=h*h;if(l.length===1)return d.distSqr(l[0])<y;for(let C=1;C<l.length;C++)if(gM(d,l[C-1],l[C])<y)return!0;return!1}function gM(d,l,h){const y=l.distSqr(h);if(y===0)return d.distSqr(l);const C=((d.x-l.x)*(h.x-l.x)+(d.y-l.y)*(h.y-l.y))/y;return d.distSqr(C<0?l:C>1?h:h.sub(l)._mult(C)._add(l))}function vM(d,l){let h,y,C,k=!1;for(let O=0;O<d.length;O++){h=d[O];for(let F=0,B=h.length-1;F<h.length;B=F++)y=h[F],C=h[B],y.y>l.y!=C.y>l.y&&l.x<(C.x-y.x)*(l.y-y.y)/(C.y-y.y)+y.x&&(k=!k)}return k}function ff(d,l){let h=!1;for(let y=0,C=d.length-1;y<d.length;C=y++){const k=d[y],O=d[C];k.y>l.y!=O.y>l.y&&l.x<(O.x-k.x)*(l.y-k.y)/(O.y-k.y)+k.x&&(h=!h)}return h}function D9(d,l,h){const y=h[0],C=h[2];if(d.x<y.x&&l.x<y.x||d.x>C.x&&l.x>C.x||d.y<y.y&&l.y<y.y||d.y>C.y&&l.y>C.y)return!1;const k=$(d,l,h[0]);return k!==$(d,l,h[1])||k!==$(d,l,h[2])||k!==$(d,l,h[3])}function Mp(d,l,h){const y=l.paint.get(d).value;return y.kind==="constant"?y.value:h.programConfigurations.get(l.id).getMaxValue(d)}function my(d){return Math.sqrt(d[0]*d[0]+d[1]*d[1])}function gy(d,l,h,y,C){if(!l[0]&&!l[1])return d;const k=re.convert(l)._mult(C);h==="viewport"&&k._rotate(-y);const O=[];for(let F=0;F<d.length;F++)O.push(d[F].sub(k));return O}gn("CircleBucket",aw,{omit:["layers"]});const A9=new Fi({"circle-sort-key":new Rn(Fe.layout_circle["circle-sort-key"])});var N9={paint:new Fi({"circle-radius":new Rn(Fe.paint_circle["circle-radius"]),"circle-color":new Rn(Fe.paint_circle["circle-color"]),"circle-blur":new Rn(Fe.paint_circle["circle-blur"]),"circle-opacity":new Rn(Fe.paint_circle["circle-opacity"]),"circle-translate":new xn(Fe.paint_circle["circle-translate"]),"circle-translate-anchor":new xn(Fe.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new xn(Fe.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new xn(Fe.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new Rn(Fe.paint_circle["circle-stroke-width"]),"circle-stroke-color":new Rn(Fe.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new Rn(Fe.paint_circle["circle-stroke-opacity"])}),layout:A9},yo=1e-6,xo=typeof Float32Array<"u"?Float32Array:Array;function yM(){var d=new xo(9);return xo!=Float32Array&&(d[1]=0,d[2]=0,d[3]=0,d[5]=0,d[6]=0,d[7]=0),d[0]=1,d[4]=1,d[8]=1,d}function cw(d){return d[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]=0,d[13]=0,d[14]=0,d[15]=1,d}function xM(d,l,h){var y=l[0],C=l[1],k=l[2],O=l[3],F=l[4],B=l[5],K=l[6],ee=l[7],ie=l[8],de=l[9],ge=l[10],ve=l[11],Ne=l[12],De=l[13],Qe=l[14],ht=l[15],Ge=h[0],lt=h[1],Rt=h[2],kt=h[3];return d[0]=Ge*y+lt*F+Rt*ie+kt*Ne,d[1]=Ge*C+lt*B+Rt*de+kt*De,d[2]=Ge*k+lt*K+Rt*ge+kt*Qe,d[3]=Ge*O+lt*ee+Rt*ve+kt*ht,d[4]=(Ge=h[4])*y+(lt=h[5])*F+(Rt=h[6])*ie+(kt=h[7])*Ne,d[5]=Ge*C+lt*B+Rt*de+kt*De,d[6]=Ge*k+lt*K+Rt*ge+kt*Qe,d[7]=Ge*O+lt*ee+Rt*ve+kt*ht,d[8]=(Ge=h[8])*y+(lt=h[9])*F+(Rt=h[10])*ie+(kt=h[11])*Ne,d[9]=Ge*C+lt*B+Rt*de+kt*De,d[10]=Ge*k+lt*K+Rt*ge+kt*Qe,d[11]=Ge*O+lt*ee+Rt*ve+kt*ht,d[12]=(Ge=h[12])*y+(lt=h[13])*F+(Rt=h[14])*ie+(kt=h[15])*Ne,d[13]=Ge*C+lt*B+Rt*de+kt*De,d[14]=Ge*k+lt*K+Rt*ge+kt*Qe,d[15]=Ge*O+lt*ee+Rt*ve+kt*ht,d}Math.hypot||(Math.hypot=function(){for(var d=0,l=arguments.length;l--;)d+=arguments[l]*arguments[l];return Math.sqrt(d)});var Rp,L9=xM;function bM(){var d=new xo(3);return xo!=Float32Array&&(d[0]=0,d[1]=0,d[2]=0),d}function _M(d,l,h){var y=new xo(3);return y[0]=d,y[1]=l,y[2]=h,y}function vy(d,l,h){var y=l[0],C=l[1],k=l[2],O=l[3];return d[0]=h[0]*y+h[4]*C+h[8]*k+h[12]*O,d[1]=h[1]*y+h[5]*C+h[9]*k+h[13]*O,d[2]=h[2]*y+h[6]*C+h[10]*k+h[14]*O,d[3]=h[3]*y+h[7]*C+h[11]*k+h[15]*O,d}function wM(){var d=new xo(4);return xo!=Float32Array&&(d[0]=0,d[1]=0,d[2]=0),d[3]=1,d}function CM(d,l){const h=vy([],[d.x,d.y,0,1],l);return new re(h[0]/h[3],h[1]/h[3])}bM(),Rp=new xo(4),xo!=Float32Array&&(Rp[0]=0,Rp[1]=0,Rp[2]=0,Rp[3]=0),bM(),_M(1,0,0),_M(0,1,0),wM(),wM(),yM(),function(){var d;d=new xo(2),xo!=Float32Array&&(d[0]=0,d[1]=0)}();class SM extends aw{}gn("HeatmapBucket",SM,{omit:["layers"]});var z9={paint:new Fi({"heatmap-radius":new Rn(Fe.paint_heatmap["heatmap-radius"]),"heatmap-weight":new Rn(Fe.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new xn(Fe.paint_heatmap["heatmap-intensity"]),"heatmap-color":new Fs(Fe.paint_heatmap["heatmap-color"]),"heatmap-opacity":new xn(Fe.paint_heatmap["heatmap-opacity"])})};function uw(d,{width:l,height:h},y,C){if(C){if(C instanceof Uint8ClampedArray)C=new Uint8Array(C.buffer);else if(C.length!==l*h*y)throw new RangeError(`mismatched image size. expected: ${C.length} but got: ${l*h*y}`)}else C=new Uint8Array(l*h*y);return d.width=l,d.height=h,d.data=C,d}function EM(d,{width:l,height:h},y){if(l===d.width&&h===d.height)return;const C=uw({},{width:l,height:h},y);dw(d,C,{x:0,y:0},{x:0,y:0},{width:Math.min(d.width,l),height:Math.min(d.height,h)},y),d.width=l,d.height=h,d.data=C.data}function dw(d,l,h,y,C,k){if(C.width===0||C.height===0)return l;if(C.width>d.width||C.height>d.height||h.x>d.width-C.width||h.y>d.height-C.height)throw new RangeError("out of range source coordinates for image copy");if(C.width>l.width||C.height>l.height||y.x>l.width-C.width||y.y>l.height-C.height)throw new RangeError("out of range destination coordinates for image copy");const O=d.data,F=l.data;if(O===F)throw new Error("srcData equals dstData, so image is already copied");for(let B=0;B<C.height;B++){const K=((h.y+B)*d.width+h.x)*k,ee=((y.y+B)*l.width+y.x)*k;for(let ie=0;ie<C.width*k;ie++)F[ee+ie]=O[K+ie]}return l}class Op{constructor(l,h){uw(this,l,1,h)}resize(l){EM(this,l,1)}clone(){return new Op({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(l,h,y,C,k){dw(l,h,y,C,k,1)}}class ca{constructor(l,h){uw(this,l,4,h)}resize(l){EM(this,l,4)}replace(l,h){h?this.data.set(l):this.data=l instanceof Uint8ClampedArray?new Uint8Array(l.buffer):l}clone(){return new ca({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(l,h,y,C,k){dw(l,h,y,C,k,4)}}function PM(d){const l={},h=d.resolution||256,y=d.clips?d.clips.length:1,C=d.image||new ca({width:h,height:y});if(Math.log(h)/Math.LN2%1!=0)throw new Error(`width is not a power of 2 - ${h}`);const k=(O,F,B)=>{l[d.evaluationKey]=B;const K=d.expression.evaluate(l);C.data[O+F+0]=Math.floor(255*K.r/K.a),C.data[O+F+1]=Math.floor(255*K.g/K.a),C.data[O+F+2]=Math.floor(255*K.b/K.a),C.data[O+F+3]=Math.floor(255*K.a)};if(d.clips)for(let O=0,F=0;O<y;++O,F+=4*h)for(let B=0,K=0;B<h;B++,K+=4){const ee=B/(h-1),{start:ie,end:de}=d.clips[O];k(F,K,ie*(1-ee)+de*ee)}else for(let O=0,F=0;O<h;O++,F+=4)k(0,F,O/(h-1));return C}gn("AlphaImage",Op),gn("RGBAImage",ca);var F9={paint:new Fi({"hillshade-illumination-direction":new xn(Fe.paint_hillshade["hillshade-illumination-direction"]),"hillshade-illumination-anchor":new xn(Fe.paint_hillshade["hillshade-illumination-anchor"]),"hillshade-exaggeration":new xn(Fe.paint_hillshade["hillshade-exaggeration"]),"hillshade-shadow-color":new xn(Fe.paint_hillshade["hillshade-shadow-color"]),"hillshade-highlight-color":new xn(Fe.paint_hillshade["hillshade-highlight-color"]),"hillshade-accent-color":new xn(Fe.paint_hillshade["hillshade-accent-color"])})};const $9=hi([{name:"a_pos",components:2,type:"Int16"}],4),{members:B9}=$9;var yy={exports:{}};function xy(d,l,h){h=h||2;var y,C,k,O,F,B,K,ee=l&&l.length,ie=ee?l[0]*h:d.length,de=TM(d,0,ie,h,!0),ge=[];if(!de||de.next===de.prev)return ge;if(ee&&(de=function(Ne,De,Qe,ht){var Ge,lt,Rt,kt=[];for(Ge=0,lt=De.length;Ge<lt;Ge++)(Rt=TM(Ne,De[Ge]*ht,Ge<lt-1?De[Ge+1]*ht:Ne.length,ht,!1))===Rt.next&&(Rt.steiner=!0),kt.push(q9(Rt));for(kt.sort(K9),Ge=0;Ge<kt.length;Ge++)Qe=W9(kt[Ge],Qe);return Qe}(d,l,de,h)),d.length>80*h){y=k=d[0],C=O=d[1];for(var ve=h;ve<ie;ve+=h)(F=d[ve])<y&&(y=F),(B=d[ve+1])<C&&(C=B),F>k&&(k=F),B>O&&(O=B);K=(K=Math.max(k-y,O-C))!==0?32767/K:0}return Dp(de,ge,h,y,C,K,0),ge}function TM(d,l,h,y,C){var k,O;if(C===pw(d,l,h,y)>0)for(k=l;k<h;k+=y)O=MM(k,d[k],d[k+1],O);else for(k=h-y;k>=l;k-=y)O=MM(k,d[k],d[k+1],O);return O&&by(O,O.next)&&(Np(O),O=O.next),O}function $u(d,l){if(!d)return d;l||(l=d);var h,y=d;do if(h=!1,y.steiner||!by(y,y.next)&&ci(y.prev,y,y.next)!==0)y=y.next;else{if(Np(y),(y=l=y.prev)===y.next)break;h=!0}while(h||y!==l);return l}function Dp(d,l,h,y,C,k,O){if(d){!O&&k&&function(ee,ie,de,ge){var ve=ee;do ve.z===0&&(ve.z=fw(ve.x,ve.y,ie,de,ge)),ve.prevZ=ve.prev,ve.nextZ=ve.next,ve=ve.next;while(ve!==ee);ve.prevZ.nextZ=null,ve.prevZ=null,function(Ne){var De,Qe,ht,Ge,lt,Rt,kt,hn,vn=1;do{for(Qe=Ne,Ne=null,lt=null,Rt=0;Qe;){for(Rt++,ht=Qe,kt=0,De=0;De<vn&&(kt++,ht=ht.nextZ);De++);for(hn=vn;kt>0||hn>0&&ht;)kt!==0&&(hn===0||!ht||Qe.z<=ht.z)?(Ge=Qe,Qe=Qe.nextZ,kt--):(Ge=ht,ht=ht.nextZ,hn--),lt?lt.nextZ=Ge:Ne=Ge,Ge.prevZ=lt,lt=Ge;Qe=ht}lt.nextZ=null,vn*=2}while(Rt>1)}(ve)}(d,y,C,k);for(var F,B,K=d;d.prev!==d.next;)if(F=d.prev,B=d.next,k?U9(d,y,C,k):V9(d))l.push(F.i/h|0),l.push(d.i/h|0),l.push(B.i/h|0),Np(d),d=B.next,K=B.next;else if((d=B)===K){O?O===1?Dp(d=j9($u(d),l,h),l,h,y,C,k,2):O===2&&H9(d,l,h,y,C,k):Dp($u(d),l,h,y,C,k,1);break}}}function V9(d){var l=d.prev,h=d,y=d.next;if(ci(l,h,y)>=0)return!1;for(var C=l.x,k=h.x,O=y.x,F=l.y,B=h.y,K=y.y,ee=C<k?C<O?C:O:k<O?k:O,ie=F<B?F<K?F:K:B<K?B:K,de=C>k?C>O?C:O:k>O?k:O,ge=F>B?F>K?F:K:B>K?B:K,ve=y.next;ve!==l;){if(ve.x>=ee&&ve.x<=de&&ve.y>=ie&&ve.y<=ge&&hf(C,F,k,B,O,K,ve.x,ve.y)&&ci(ve.prev,ve,ve.next)>=0)return!1;ve=ve.next}return!0}function U9(d,l,h,y){var C=d.prev,k=d,O=d.next;if(ci(C,k,O)>=0)return!1;for(var F=C.x,B=k.x,K=O.x,ee=C.y,ie=k.y,de=O.y,ge=F<B?F<K?F:K:B<K?B:K,ve=ee<ie?ee<de?ee:de:ie<de?ie:de,Ne=F>B?F>K?F:K:B>K?B:K,De=ee>ie?ee>de?ee:de:ie>de?ie:de,Qe=fw(ge,ve,l,h,y),ht=fw(Ne,De,l,h,y),Ge=d.prevZ,lt=d.nextZ;Ge&&Ge.z>=Qe&&lt&&lt.z<=ht;){if(Ge.x>=ge&&Ge.x<=Ne&&Ge.y>=ve&&Ge.y<=De&&Ge!==C&&Ge!==O&&hf(F,ee,B,ie,K,de,Ge.x,Ge.y)&&ci(Ge.prev,Ge,Ge.next)>=0||(Ge=Ge.prevZ,lt.x>=ge&&lt.x<=Ne&&lt.y>=ve&&lt.y<=De&&lt!==C&&lt!==O&&hf(F,ee,B,ie,K,de,lt.x,lt.y)&&ci(lt.prev,lt,lt.next)>=0))return!1;lt=lt.nextZ}for(;Ge&&Ge.z>=Qe;){if(Ge.x>=ge&&Ge.x<=Ne&&Ge.y>=ve&&Ge.y<=De&&Ge!==C&&Ge!==O&&hf(F,ee,B,ie,K,de,Ge.x,Ge.y)&&ci(Ge.prev,Ge,Ge.next)>=0)return!1;Ge=Ge.prevZ}for(;lt&&lt.z<=ht;){if(lt.x>=ge&&lt.x<=Ne&&lt.y>=ve&&lt.y<=De&&lt!==C&&lt!==O&&hf(F,ee,B,ie,K,de,lt.x,lt.y)&&ci(lt.prev,lt,lt.next)>=0)return!1;lt=lt.nextZ}return!0}function j9(d,l,h){var y=d;do{var C=y.prev,k=y.next.next;!by(C,k)&&IM(C,y,y.next,k)&&Ap(C,k)&&Ap(k,C)&&(l.push(C.i/h|0),l.push(y.i/h|0),l.push(k.i/h|0),Np(y),Np(y.next),y=d=k),y=y.next}while(y!==d);return $u(y)}function H9(d,l,h,y,C,k){var O=d;do{for(var F=O.next.next;F!==O.prev;){if(O.i!==F.i&&Z9(O,F)){var B=kM(O,F);return O=$u(O,O.next),B=$u(B,B.next),Dp(O,l,h,y,C,k,0),void Dp(B,l,h,y,C,k,0)}F=F.next}O=O.next}while(O!==d)}function K9(d,l){return d.x-l.x}function W9(d,l){var h=function(C,k){var O,F=k,B=C.x,K=C.y,ee=-1/0;do{if(K<=F.y&&K>=F.next.y&&F.next.y!==F.y){var ie=F.x+(K-F.y)*(F.next.x-F.x)/(F.next.y-F.y);if(ie<=B&&ie>ee&&(ee=ie,O=F.x<F.next.x?F:F.next,ie===B))return O}F=F.next}while(F!==k);if(!O)return null;var de,ge=O,ve=O.x,Ne=O.y,De=1/0;F=O;do B>=F.x&&F.x>=ve&&B!==F.x&&hf(K<Ne?B:ee,K,ve,Ne,K<Ne?ee:B,K,F.x,F.y)&&(de=Math.abs(K-F.y)/(B-F.x),Ap(F,C)&&(de<De||de===De&&(F.x>O.x||F.x===O.x&&G9(O,F)))&&(O=F,De=de)),F=F.next;while(F!==ge);return O}(d,l);if(!h)return l;var y=kM(h,d);return $u(y,y.next),$u(h,h.next)}function G9(d,l){return ci(d.prev,d,l.prev)<0&&ci(l.next,d,d.next)<0}function fw(d,l,h,y,C){return(d=1431655765&((d=858993459&((d=252645135&((d=16711935&((d=(d-h)*C|0)|d<<8))|d<<4))|d<<2))|d<<1))|(l=1431655765&((l=858993459&((l=252645135&((l=16711935&((l=(l-y)*C|0)|l<<8))|l<<4))|l<<2))|l<<1))<<1}function q9(d){var l=d,h=d;do(l.x<h.x||l.x===h.x&&l.y<h.y)&&(h=l),l=l.next;while(l!==d);return h}function hf(d,l,h,y,C,k,O,F){return(C-O)*(l-F)>=(d-O)*(k-F)&&(d-O)*(y-F)>=(h-O)*(l-F)&&(h-O)*(k-F)>=(C-O)*(y-F)}function Z9(d,l){return d.next.i!==l.i&&d.prev.i!==l.i&&!function(h,y){var C=h;do{if(C.i!==h.i&&C.next.i!==h.i&&C.i!==y.i&&C.next.i!==y.i&&IM(C,C.next,h,y))return!0;C=C.next}while(C!==h);return!1}(d,l)&&(Ap(d,l)&&Ap(l,d)&&function(h,y){var C=h,k=!1,O=(h.x+y.x)/2,F=(h.y+y.y)/2;do C.y>F!=C.next.y>F&&C.next.y!==C.y&&O<(C.next.x-C.x)*(F-C.y)/(C.next.y-C.y)+C.x&&(k=!k),C=C.next;while(C!==h);return k}(d,l)&&(ci(d.prev,d,l.prev)||ci(d,l.prev,l))||by(d,l)&&ci(d.prev,d,d.next)>0&&ci(l.prev,l,l.next)>0)}function ci(d,l,h){return(l.y-d.y)*(h.x-l.x)-(l.x-d.x)*(h.y-l.y)}function by(d,l){return d.x===l.x&&d.y===l.y}function IM(d,l,h,y){var C=wy(ci(d,l,h)),k=wy(ci(d,l,y)),O=wy(ci(h,y,d)),F=wy(ci(h,y,l));return C!==k&&O!==F||!(C!==0||!_y(d,h,l))||!(k!==0||!_y(d,y,l))||!(O!==0||!_y(h,d,y))||!(F!==0||!_y(h,l,y))}function _y(d,l,h){return l.x<=Math.max(d.x,h.x)&&l.x>=Math.min(d.x,h.x)&&l.y<=Math.max(d.y,h.y)&&l.y>=Math.min(d.y,h.y)}function wy(d){return d>0?1:d<0?-1:0}function Ap(d,l){return ci(d.prev,d,d.next)<0?ci(d,l,d.next)>=0&&ci(d,d.prev,l)>=0:ci(d,l,d.prev)<0||ci(d,d.next,l)<0}function kM(d,l){var h=new hw(d.i,d.x,d.y),y=new hw(l.i,l.x,l.y),C=d.next,k=l.prev;return d.next=l,l.prev=d,h.next=C,C.prev=h,y.next=h,h.prev=y,k.next=y,y.prev=k,y}function MM(d,l,h,y){var C=new hw(d,l,h);return y?(C.next=y.next,C.prev=y,y.next.prev=C,y.next=C):(C.prev=C,C.next=C),C}function Np(d){d.next.prev=d.prev,d.prev.next=d.next,d.prevZ&&(d.prevZ.nextZ=d.nextZ),d.nextZ&&(d.nextZ.prevZ=d.prevZ)}function hw(d,l,h){this.i=d,this.x=l,this.y=h,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function pw(d,l,h,y){for(var C=0,k=l,O=h-y;k<h;k+=y)C+=(d[O]-d[k])*(d[k+1]+d[O+1]),O=k;return C}function X9(d,l,h,y,C){RM(d,l,h||0,y||d.length-1,C||Y9)}function RM(d,l,h,y,C){for(;y>h;){if(y-h>600){var k=y-h+1,O=l-h+1,F=Math.log(k),B=.5*Math.exp(2*F/3),K=.5*Math.sqrt(F*B*(k-B)/k)*(O-k/2<0?-1:1);RM(d,l,Math.max(h,Math.floor(l-O*B/k+K)),Math.min(y,Math.floor(l+(k-O)*B/k+K)),C)}var ee=d[l],ie=h,de=y;for(Lp(d,h,l),C(d[y],ee)>0&&Lp(d,h,y);ie<de;){for(Lp(d,ie,de),ie++,de--;C(d[ie],ee)<0;)ie++;for(;C(d[de],ee)>0;)de--}C(d[h],ee)===0?Lp(d,h,de):Lp(d,++de,y),de<=l&&(h=de+1),l<=de&&(y=de-1)}}function Lp(d,l,h){var y=d[l];d[l]=d[h],d[h]=y}function Y9(d,l){return d<l?-1:d>l?1:0}function mw(d,l){const h=d.length;if(h<=1)return[d];const y=[];let C,k;for(let O=0;O<h;O++){const F=j(d[O]);F!==0&&(d[O].area=Math.abs(F),k===void 0&&(k=F<0),k===F<0?(C&&y.push(C),C=[d[O]]):C.push(d[O]))}if(C&&y.push(C),l>1)for(let O=0;O<y.length;O++)y[O].length<=l||(X9(y[O],l,1,y[O].length-1,Q9),y[O]=y[O].slice(0,l));return y}function Q9(d,l){return l.area-d.area}function gw(d,l,h){const y=h.patternDependencies;let C=!1;for(const k of l){const O=k.paint.get(`${d}-pattern`);O.isConstant()||(C=!0);const F=O.constantOr(null);F&&(C=!0,y[F.to]=!0,y[F.from]=!0)}return C}function vw(d,l,h,y,C){const k=C.patternDependencies;for(const O of l){const F=O.paint.get(`${d}-pattern`).value;if(F.kind!=="constant"){let B=F.evaluate({zoom:y-1},h,{},C.availableImages),K=F.evaluate({zoom:y},h,{},C.availableImages),ee=F.evaluate({zoom:y+1},h,{},C.availableImages);B=B&&B.name?B.name:B,K=K&&K.name?K.name:K,ee=ee&&ee.name?ee.name:ee,k[B]=!0,k[K]=!0,k[ee]=!0,h.patterns[O.id]={min:B,mid:K,max:ee}}}return h}yy.exports=xy,yy.exports.default=xy,xy.deviation=function(d,l,h,y){var C=l&&l.length,k=Math.abs(pw(d,0,C?l[0]*h:d.length,h));if(C)for(var O=0,F=l.length;O<F;O++)k-=Math.abs(pw(d,l[O]*h,O<F-1?l[O+1]*h:d.length,h));var B=0;for(O=0;O<y.length;O+=3){var K=y[O]*h,ee=y[O+1]*h,ie=y[O+2]*h;B+=Math.abs((d[K]-d[ie])*(d[ee+1]-d[K+1])-(d[K]-d[ee])*(d[ie+1]-d[K+1]))}return k===0&&B===0?0:Math.abs((B-k)/k)},xy.flatten=function(d){for(var l=d[0][0].length,h={vertices:[],holes:[],dimensions:l},y=0,C=0;C<d.length;C++){for(var k=0;k<d[C].length;k++)for(var O=0;O<l;O++)h.vertices.push(d[C][k][O]);C>0&&h.holes.push(y+=d[C-1].length)}return h};class yw{constructor(l){this.zoom=l.zoom,this.overscaling=l.overscaling,this.layers=l.layers,this.layerIds=this.layers.map(h=>h.id),this.index=l.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new gr,this.indexArray=new vo,this.indexArray2=new hs,this.programConfigurations=new Lu(l.layers,l.zoom),this.segments=new Zn,this.segments2=new Zn,this.stateDependentLayerIds=this.layers.filter(h=>h.isStateDependent()).map(h=>h.id)}populate(l,h,y){this.hasPattern=gw("fill",this.layers,h);const C=this.layers[0].layout.get("fill-sort-key"),k=!C.isConstant(),O=[];for(const{feature:F,id:B,index:K,sourceLayerIndex:ee}of l){const ie=this.layers[0]._featureFilter.needGeometry,de=Fu(F,ie);if(!this.layers[0]._featureFilter.filter(new Br(this.zoom),de,y))continue;const ge=k?C.evaluate(de,{},y,h.availableImages):void 0,ve={id:B,properties:F.properties,type:F.type,sourceLayerIndex:ee,index:K,geometry:ie?de.geometry:zu(F),patterns:{},sortKey:ge};O.push(ve)}k&&O.sort((F,B)=>F.sortKey-B.sortKey);for(const F of O){const{geometry:B,index:K,sourceLayerIndex:ee}=F;if(this.hasPattern){const ie=vw("fill",this.layers,F,this.zoom,h);this.patternFeatures.push(ie)}else this.addFeature(F,B,K,y,{});h.featureIndex.insert(l[K].feature,B,K,ee,this.index)}}update(l,h,y){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(l,h,this.stateDependentLayers,y)}addFeatures(l,h,y){for(const C of this.patternFeatures)this.addFeature(C,C.geometry,C.index,h,y)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(l){this.uploaded||(this.layoutVertexBuffer=l.createVertexBuffer(this.layoutVertexArray,B9),this.indexBuffer=l.createIndexBuffer(this.indexArray),this.indexBuffer2=l.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(l),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(l,h,y,C,k){for(const O of mw(h,500)){let F=0;for(const ge of O)F+=ge.length;const B=this.segments.prepareSegment(F,this.layoutVertexArray,this.indexArray),K=B.vertexLength,ee=[],ie=[];for(const ge of O){if(ge.length===0)continue;ge!==O[0]&&ie.push(ee.length/2);const ve=this.segments2.prepareSegment(ge.length,this.layoutVertexArray,this.indexArray2),Ne=ve.vertexLength;this.layoutVertexArray.emplaceBack(ge[0].x,ge[0].y),this.indexArray2.emplaceBack(Ne+ge.length-1,Ne),ee.push(ge[0].x),ee.push(ge[0].y);for(let De=1;De<ge.length;De++)this.layoutVertexArray.emplaceBack(ge[De].x,ge[De].y),this.indexArray2.emplaceBack(Ne+De-1,Ne+De),ee.push(ge[De].x),ee.push(ge[De].y);ve.vertexLength+=ge.length,ve.primitiveLength+=ge.length}const de=yy.exports(ee,ie);for(let ge=0;ge<de.length;ge+=3)this.indexArray.emplaceBack(K+de[ge],K+de[ge+1],K+de[ge+2]);B.vertexLength+=F,B.primitiveLength+=de.length/3}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,l,y,k,C)}}gn("FillBucket",yw,{omit:["layers","patternFeatures"]});const J9=new Fi({"fill-sort-key":new Rn(Fe.layout_fill["fill-sort-key"])});var eH={paint:new Fi({"fill-antialias":new xn(Fe.paint_fill["fill-antialias"]),"fill-opacity":new Rn(Fe.paint_fill["fill-opacity"]),"fill-color":new Rn(Fe.paint_fill["fill-color"]),"fill-outline-color":new Rn(Fe.paint_fill["fill-outline-color"]),"fill-translate":new xn(Fe.paint_fill["fill-translate"]),"fill-translate-anchor":new xn(Fe.paint_fill["fill-translate-anchor"]),"fill-pattern":new fc(Fe.paint_fill["fill-pattern"])}),layout:J9};const tH=hi([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4),nH=hi([{name:"a_centroid",components:2,type:"Int16"}],4),{members:rH}=tH;var mc={},iH=re,OM=pf;function pf(d,l,h,y,C){this.properties={},this.extent=h,this.type=0,this._pbf=d,this._geometry=-1,this._keys=y,this._values=C,d.readFields(oH,this,l)}function oH(d,l,h){d==1?l.id=h.readVarint():d==2?function(y,C){for(var k=y.readVarint()+y.pos;y.pos<k;){var O=C._keys[y.readVarint()],F=C._values[y.readVarint()];C.properties[O]=F}}(h,l):d==3?l.type=h.readVarint():d==4&&(l._geometry=h.pos)}function aH(d){for(var l,h,y=0,C=0,k=d.length,O=k-1;C<k;O=C++)y+=((h=d[O]).x-(l=d[C]).x)*(l.y+h.y);return y}pf.types=["Unknown","Point","LineString","Polygon"],pf.prototype.loadGeometry=function(){var d=this._pbf;d.pos=this._geometry;for(var l,h=d.readVarint()+d.pos,y=1,C=0,k=0,O=0,F=[];d.pos<h;){if(C<=0){var B=d.readVarint();y=7&B,C=B>>3}if(C--,y===1||y===2)k+=d.readSVarint(),O+=d.readSVarint(),y===1&&(l&&F.push(l),l=[]),l.push(new iH(k,O));else{if(y!==7)throw new Error("unknown command "+y);l&&l.push(l[0].clone())}}return l&&F.push(l),F},pf.prototype.bbox=function(){var d=this._pbf;d.pos=this._geometry;for(var l=d.readVarint()+d.pos,h=1,y=0,C=0,k=0,O=1/0,F=-1/0,B=1/0,K=-1/0;d.pos<l;){if(y<=0){var ee=d.readVarint();h=7&ee,y=ee>>3}if(y--,h===1||h===2)(C+=d.readSVarint())<O&&(O=C),C>F&&(F=C),(k+=d.readSVarint())<B&&(B=k),k>K&&(K=k);else if(h!==7)throw new Error("unknown command "+h)}return[O,B,F,K]},pf.prototype.toGeoJSON=function(d,l,h){var y,C,k=this.extent*Math.pow(2,h),O=this.extent*d,F=this.extent*l,B=this.loadGeometry(),K=pf.types[this.type];function ee(ge){for(var ve=0;ve<ge.length;ve++){var Ne=ge[ve];ge[ve]=[360*(Ne.x+O)/k-180,360/Math.PI*Math.atan(Math.exp((180-360*(Ne.y+F)/k)*Math.PI/180))-90]}}switch(this.type){case 1:var ie=[];for(y=0;y<B.length;y++)ie[y]=B[y][0];ee(B=ie);break;case 2:for(y=0;y<B.length;y++)ee(B[y]);break;case 3:for(B=function(ge){var ve=ge.length;if(ve<=1)return[ge];for(var Ne,De,Qe=[],ht=0;ht<ve;ht++){var Ge=aH(ge[ht]);Ge!==0&&(De===void 0&&(De=Ge<0),De===Ge<0?(Ne&&Qe.push(Ne),Ne=[ge[ht]]):Ne.push(ge[ht]))}return Ne&&Qe.push(Ne),Qe}(B),y=0;y<B.length;y++)for(C=0;C<B[y].length;C++)ee(B[y][C])}B.length===1?B=B[0]:K="Multi"+K;var de={type:"Feature",geometry:{type:K,coordinates:B},properties:this.properties};return"id"in this&&(de.id=this.id),de};var sH=OM,DM=AM;function AM(d,l){this.version=1,this.name=null,this.extent=4096,this.length=0,this._pbf=d,this._keys=[],this._values=[],this._features=[],d.readFields(lH,this,l),this.length=this._features.length}function lH(d,l,h){d===15?l.version=h.readVarint():d===1?l.name=h.readString():d===5?l.extent=h.readVarint():d===2?l._features.push(h.pos):d===3?l._keys.push(h.readString()):d===4&&l._values.push(function(y){for(var C=null,k=y.readVarint()+y.pos;y.pos<k;){var O=y.readVarint()>>3;C=O===1?y.readString():O===2?y.readFloat():O===3?y.readDouble():O===4?y.readVarint64():O===5?y.readVarint():O===6?y.readSVarint():O===7?y.readBoolean():null}return C}(h))}AM.prototype.feature=function(d){if(d<0||d>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[d];var l=this._pbf.readVarint()+this._pbf.pos;return new sH(this._pbf,l,this.extent,this._keys,this._values)};var cH=DM;function uH(d,l,h){if(d===3){var y=new cH(h,h.readVarint()+h.pos);y.length&&(l[y.name]=y)}}mc.VectorTile=function(d,l){this.layers=d.readFields(uH,{},l)},mc.VectorTileFeature=OM,mc.VectorTileLayer=DM;const dH=mc.VectorTileFeature.types,xw=Math.pow(2,13);function zp(d,l,h,y,C,k,O,F){d.emplaceBack(l,h,2*Math.floor(y*xw)+O,C*xw*2,k*xw*2,Math.round(F))}class bw{constructor(l){this.zoom=l.zoom,this.overscaling=l.overscaling,this.layers=l.layers,this.layerIds=this.layers.map(h=>h.id),this.index=l.index,this.hasPattern=!1,this.layoutVertexArray=new ir,this.centroidVertexArray=new Tn,this.indexArray=new vo,this.programConfigurations=new Lu(l.layers,l.zoom),this.segments=new Zn,this.stateDependentLayerIds=this.layers.filter(h=>h.isStateDependent()).map(h=>h.id)}populate(l,h,y){this.features=[],this.hasPattern=gw("fill-extrusion",this.layers,h);for(const{feature:C,id:k,index:O,sourceLayerIndex:F}of l){const B=this.layers[0]._featureFilter.needGeometry,K=Fu(C,B);if(!this.layers[0]._featureFilter.filter(new Br(this.zoom),K,y))continue;const ee={id:k,sourceLayerIndex:F,index:O,geometry:B?K.geometry:zu(C),properties:C.properties,type:C.type,patterns:{}};this.hasPattern?this.features.push(vw("fill-extrusion",this.layers,ee,this.zoom,h)):this.addFeature(ee,ee.geometry,O,y,{}),h.featureIndex.insert(C,ee.geometry,O,F,this.index,!0)}}addFeatures(l,h,y){for(const C of this.features){const{geometry:k}=C;this.addFeature(C,k,C.index,h,y)}}update(l,h,y){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(l,h,this.stateDependentLayers,y)}isEmpty(){return this.layoutVertexArray.length===0&&this.centroidVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(l){this.uploaded||(this.layoutVertexBuffer=l.createVertexBuffer(this.layoutVertexArray,rH),this.centroidVertexBuffer=l.createVertexBuffer(this.centroidVertexArray,nH.members,!0),this.indexBuffer=l.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(l),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.centroidVertexBuffer.destroy())}addFeature(l,h,y,C,k){const O={x:0,y:0,vertexCount:0};for(const F of mw(h,500)){let B=0;for(const ve of F)B+=ve.length;let K=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray);for(const ve of F){if(ve.length===0||hH(ve))continue;let Ne=0;for(let De=0;De<ve.length;De++){const Qe=ve[De];if(De>=1){const ht=ve[De-1];if(!fH(Qe,ht)){K.vertexLength+4>Zn.MAX_VERTEX_ARRAY_LENGTH&&(K=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));const Ge=Qe.sub(ht)._perp()._unit(),lt=ht.dist(Qe);Ne+lt>32768&&(Ne=0),zp(this.layoutVertexArray,Qe.x,Qe.y,Ge.x,Ge.y,0,0,Ne),zp(this.layoutVertexArray,Qe.x,Qe.y,Ge.x,Ge.y,0,1,Ne),O.x+=2*Qe.x,O.y+=2*Qe.y,O.vertexCount+=2,Ne+=lt,zp(this.layoutVertexArray,ht.x,ht.y,Ge.x,Ge.y,0,0,Ne),zp(this.layoutVertexArray,ht.x,ht.y,Ge.x,Ge.y,0,1,Ne),O.x+=2*ht.x,O.y+=2*ht.y,O.vertexCount+=2;const Rt=K.vertexLength;this.indexArray.emplaceBack(Rt,Rt+2,Rt+1),this.indexArray.emplaceBack(Rt+1,Rt+2,Rt+3),K.vertexLength+=4,K.primitiveLength+=2}}}}if(K.vertexLength+B>Zn.MAX_VERTEX_ARRAY_LENGTH&&(K=this.segments.prepareSegment(B,this.layoutVertexArray,this.indexArray)),dH[l.type]!=="Polygon")continue;const ee=[],ie=[],de=K.vertexLength;for(const ve of F)if(ve.length!==0){ve!==F[0]&&ie.push(ee.length/2);for(let Ne=0;Ne<ve.length;Ne++){const De=ve[Ne];zp(this.layoutVertexArray,De.x,De.y,0,0,1,1,0),O.x+=De.x,O.y+=De.y,O.vertexCount+=1,ee.push(De.x),ee.push(De.y)}}const ge=yy.exports(ee,ie);for(let ve=0;ve<ge.length;ve+=3)this.indexArray.emplaceBack(de+ge[ve],de+ge[ve+2],de+ge[ve+1]);K.primitiveLength+=ge.length/3,K.vertexLength+=B}for(let F=0;F<O.vertexCount;F++)this.centroidVertexArray.emplaceBack(Math.floor(O.x/O.vertexCount),Math.floor(O.y/O.vertexCount));this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,l,y,k,C)}}function fH(d,l){return d.x===l.x&&(d.x<0||d.x>xi)||d.y===l.y&&(d.y<0||d.y>xi)}function hH(d){return d.every(l=>l.x<0)||d.every(l=>l.x>xi)||d.every(l=>l.y<0)||d.every(l=>l.y>xi)}gn("FillExtrusionBucket",bw,{omit:["layers","features"]});var pH={paint:new Fi({"fill-extrusion-opacity":new xn(Fe["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new Rn(Fe["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new xn(Fe["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new xn(Fe["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new fc(Fe["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new Rn(Fe["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new Rn(Fe["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new xn(Fe["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})};function Fp(d,l){return d.x*l.x+d.y*l.y}function NM(d,l){if(d.length===1){let h=0;const y=l[h++];let C;for(;!C||y.equals(C);)if(C=l[h++],!C)return 1/0;for(;h<l.length;h++){const k=l[h],O=d[0],F=C.sub(y),B=k.sub(y),K=O.sub(y),ee=Fp(F,F),ie=Fp(F,B),de=Fp(B,B),ge=Fp(K,F),ve=Fp(K,B),Ne=ee*de-ie*ie,De=(de*ge-ie*ve)/Ne,Qe=(ee*ve-ie*ge)/Ne,ht=y.z*(1-De-Qe)+C.z*De+k.z*Qe;if(isFinite(ht))return ht}return 1/0}{let h=1/0;for(const y of l)h=Math.min(h,y.z);return h}}const mH=hi([{name:"a_pos_normal",components:2,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],4),{members:gH}=mH,vH=hi([{name:"a_uv_x",components:1,type:"Float32"},{name:"a_split_index",components:1,type:"Float32"}]),{members:yH}=vH,xH=mc.VectorTileFeature.types,bH=Math.cos(Math.PI/180*37.5),LM=Math.pow(2,14)/.5;class _w{constructor(l){this.zoom=l.zoom,this.overscaling=l.overscaling,this.layers=l.layers,this.layerIds=this.layers.map(h=>h.id),this.index=l.index,this.hasPattern=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers.forEach(h=>{this.gradients[h.id]={}}),this.layoutVertexArray=new ar,this.layoutVertexArray2=new br,this.indexArray=new vo,this.programConfigurations=new Lu(l.layers,l.zoom),this.segments=new Zn,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(h=>h.isStateDependent()).map(h=>h.id)}populate(l,h,y){this.hasPattern=gw("line",this.layers,h);const C=this.layers[0].layout.get("line-sort-key"),k=!C.isConstant(),O=[];for(const{feature:F,id:B,index:K,sourceLayerIndex:ee}of l){const ie=this.layers[0]._featureFilter.needGeometry,de=Fu(F,ie);if(!this.layers[0]._featureFilter.filter(new Br(this.zoom),de,y))continue;const ge=k?C.evaluate(de,{},y):void 0,ve={id:B,properties:F.properties,type:F.type,sourceLayerIndex:ee,index:K,geometry:ie?de.geometry:zu(F),patterns:{},sortKey:ge};O.push(ve)}k&&O.sort((F,B)=>F.sortKey-B.sortKey);for(const F of O){const{geometry:B,index:K,sourceLayerIndex:ee}=F;if(this.hasPattern){const ie=vw("line",this.layers,F,this.zoom,h);this.patternFeatures.push(ie)}else this.addFeature(F,B,K,y,{});h.featureIndex.insert(l[K].feature,B,K,ee,this.index)}}update(l,h,y){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(l,h,this.stateDependentLayers,y)}addFeatures(l,h,y){for(const C of this.patternFeatures)this.addFeature(C,C.geometry,C.index,h,y)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(l){this.uploaded||(this.layoutVertexArray2.length!==0&&(this.layoutVertexBuffer2=l.createVertexBuffer(this.layoutVertexArray2,yH)),this.layoutVertexBuffer=l.createVertexBuffer(this.layoutVertexArray,gH),this.indexBuffer=l.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(l),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(l){if(l.properties&&Object.prototype.hasOwnProperty.call(l.properties,"mapbox_clip_start")&&Object.prototype.hasOwnProperty.call(l.properties,"mapbox_clip_end"))return{start:+l.properties.mapbox_clip_start,end:+l.properties.mapbox_clip_end}}addFeature(l,h,y,C,k){const O=this.layers[0].layout,F=O.get("line-join").evaluate(l,{}),B=O.get("line-cap"),K=O.get("line-miter-limit"),ee=O.get("line-round-limit");this.lineClips=this.lineFeatureClips(l);for(const ie of h)this.addLine(ie,l,F,B,K,ee);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,l,y,k,C)}addLine(l,h,y,C,k,O){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,this.lineClips){this.lineClipsArray.push(this.lineClips);for(let Qe=0;Qe<l.length-1;Qe++)this.totalDistance+=l[Qe].dist(l[Qe+1]);this.updateScaledDistance(),this.maxLineLength=Math.max(this.maxLineLength,this.totalDistance)}const F=xH[h.type]==="Polygon";let B=l.length;for(;B>=2&&l[B-1].equals(l[B-2]);)B--;let K=0;for(;K<B-1&&l[K].equals(l[K+1]);)K++;if(B<(F?3:2))return;y==="bevel"&&(k=1.05);const ee=this.overscaling<=16?122880/(512*this.overscaling):0,ie=this.segments.prepareSegment(10*B,this.layoutVertexArray,this.indexArray);let de,ge,ve,Ne,De;this.e1=this.e2=-1,F&&(de=l[B-2],De=l[K].sub(de)._unit()._perp());for(let Qe=K;Qe<B;Qe++){if(ve=Qe===B-1?F?l[K+1]:void 0:l[Qe+1],ve&&l[Qe].equals(ve))continue;De&&(Ne=De),de&&(ge=de),de=l[Qe],De=ve?ve.sub(de)._unit()._perp():Ne,Ne=Ne||De;let ht=Ne.add(De);ht.x===0&&ht.y===0||ht._unit();const Ge=Ne.x*De.x+Ne.y*De.y,lt=ht.x*De.x+ht.y*De.y,Rt=lt!==0?1/lt:1/0,kt=2*Math.sqrt(2-2*lt),hn=lt<bH&&ge&&ve,vn=Ne.x*De.y-Ne.y*De.x>0;if(hn&&Qe>K){const Qt=de.dist(ge);if(Qt>2*ee){const cn=de.sub(de.sub(ge)._mult(ee/Qt)._round());this.updateDistance(ge,cn),this.addCurrentVertex(cn,Ne,0,0,ie),ge=cn}}const ln=ge&&ve;let en=ln?y:F?"butt":C;if(ln&&en==="round"&&(Rt<O?en="miter":Rt<=2&&(en="fakeround")),en==="miter"&&Rt>k&&(en="bevel"),en==="bevel"&&(Rt>2&&(en="flipbevel"),Rt<k&&(en="miter")),ge&&this.updateDistance(ge,de),en==="miter")ht._mult(Rt),this.addCurrentVertex(de,ht,0,0,ie);else if(en==="flipbevel"){if(Rt>100)ht=De.mult(-1);else{const Qt=Rt*Ne.add(De).mag()/Ne.sub(De).mag();ht._perp()._mult(Qt*(vn?-1:1))}this.addCurrentVertex(de,ht,0,0,ie),this.addCurrentVertex(de,ht.mult(-1),0,0,ie)}else if(en==="bevel"||en==="fakeround"){const Qt=-Math.sqrt(Rt*Rt-1),cn=vn?Qt:0,nn=vn?0:Qt;if(ge&&this.addCurrentVertex(de,Ne,cn,nn,ie),en==="fakeround"){const jt=Math.round(180*kt/Math.PI/20);for(let In=1;In<jt;In++){let bn=In/jt;if(bn!==.5){const Ar=bn-.5;bn+=bn*Ar*(bn-1)*((1.0904+Ge*(Ge*(3.55645-1.43519*Ge)-3.2452))*Ar*Ar+(.848013+Ge*(.215638*Ge-1.06021)))}const Kn=De.sub(Ne)._mult(bn)._add(Ne)._unit()._mult(vn?-1:1);this.addHalfVertex(de,Kn.x,Kn.y,!1,vn,0,ie)}}ve&&this.addCurrentVertex(de,De,-cn,-nn,ie)}else if(en==="butt")this.addCurrentVertex(de,ht,0,0,ie);else if(en==="square"){const Qt=ge?1:-1;this.addCurrentVertex(de,ht,Qt,Qt,ie)}else en==="round"&&(ge&&(this.addCurrentVertex(de,Ne,0,0,ie),this.addCurrentVertex(de,Ne,1,1,ie,!0)),ve&&(this.addCurrentVertex(de,De,-1,-1,ie,!0),this.addCurrentVertex(de,De,0,0,ie)));if(hn&&Qe<B-1){const Qt=de.dist(ve);if(Qt>2*ee){const cn=de.add(ve.sub(de)._mult(ee/Qt)._round());this.updateDistance(de,cn),this.addCurrentVertex(cn,De,0,0,ie),de=cn}}}}addCurrentVertex(l,h,y,C,k,O=!1){const F=h.y*C-h.x,B=-h.y-h.x*C;this.addHalfVertex(l,h.x+h.y*y,h.y-h.x*y,O,!1,y,k),this.addHalfVertex(l,F,B,O,!0,-C,k),this.distance>LM/2&&this.totalDistance===0&&(this.distance=0,this.addCurrentVertex(l,h,y,C,k,O))}addHalfVertex({x:l,y:h},y,C,k,O,F,B){const K=.5*(this.lineClips?this.scaledDistance*(LM-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((l<<1)+(k?1:0),(h<<1)+(O?1:0),Math.round(63*y)+128,Math.round(63*C)+128,1+(F===0?0:F<0?-1:1)|(63&K)<<2,K>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);const ee=B.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,ee),B.primitiveLength++),O?this.e2=ee:this.e1=ee}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(l,h){this.distance+=l.dist(h),this.updateScaledDistance()}}gn("LineBucket",_w,{omit:["layers","patternFeatures"]});const _H=new Fi({"line-cap":new xn(Fe.layout_line["line-cap"]),"line-join":new Rn(Fe.layout_line["line-join"]),"line-miter-limit":new xn(Fe.layout_line["line-miter-limit"]),"line-round-limit":new xn(Fe.layout_line["line-round-limit"]),"line-sort-key":new Rn(Fe.layout_line["line-sort-key"])});var zM={paint:new Fi({"line-opacity":new Rn(Fe.paint_line["line-opacity"]),"line-color":new Rn(Fe.paint_line["line-color"]),"line-translate":new xn(Fe.paint_line["line-translate"]),"line-translate-anchor":new xn(Fe.paint_line["line-translate-anchor"]),"line-width":new Rn(Fe.paint_line["line-width"]),"line-gap-width":new Rn(Fe.paint_line["line-gap-width"]),"line-offset":new Rn(Fe.paint_line["line-offset"]),"line-blur":new Rn(Fe.paint_line["line-blur"]),"line-dasharray":new Ep(Fe.paint_line["line-dasharray"]),"line-pattern":new fc(Fe.paint_line["line-pattern"]),"line-gradient":new Fs(Fe.paint_line["line-gradient"])}),layout:_H};const FM=new class extends Rn{possiblyEvaluate(d,l){return l=new Br(Math.floor(l.zoom),{now:l.now,fadeDuration:l.fadeDuration,zoomHistory:l.zoomHistory,transition:l.transition}),super.possiblyEvaluate(d,l)}evaluate(d,l,h,y){return l=_({},l,{zoom:Math.floor(l.zoom)}),super.evaluate(d,l,h,y)}}(zM.paint.properties["line-width"].specification);function $M(d,l){return l>0?l+2*d:d}FM.useIntegerZoom=!0;const wH=hi([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),CH=hi([{name:"a_projected_pos",components:3,type:"Float32"}],4);hi([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);const SH=hi([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"}]);hi([{type:"Int16",name:"anchorPointX"},{type:"Int16",name:"anchorPointY"},{type:"Int16",name:"x1"},{type:"Int16",name:"y1"},{type:"Int16",name:"x2"},{type:"Int16",name:"y2"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"}]);const BM=hi([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),EH=hi([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function PH(d,l,h){return d.sections.forEach(y=>{y.text=function(C,k,O){const F=k.layout.get("text-transform").evaluate(O,{});return F==="uppercase"?C=C.toLocaleUpperCase():F==="lowercase"&&(C=C.toLocaleLowerCase()),Ko.applyArabicShaping&&(C=Ko.applyArabicShaping(C)),C}(y.text,l,h)}),d}hi([{name:"triangle",components:3,type:"Uint16"}]),hi([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Uint16",name:"glyphStartIndex"},{type:"Uint16",name:"numGlyphs"},{type:"Uint32",name:"vertexStartIndex"},{type:"Uint32",name:"lineStartIndex"},{type:"Uint32",name:"lineLength"},{type:"Uint16",name:"segment"},{type:"Uint16",name:"lowerSize"},{type:"Uint16",name:"upperSize"},{type:"Float32",name:"lineOffsetX"},{type:"Float32",name:"lineOffsetY"},{type:"Uint8",name:"writingMode"},{type:"Uint8",name:"placedOrientation"},{type:"Uint8",name:"hidden"},{type:"Uint32",name:"crossTileID"},{type:"Int16",name:"associatedIconIndex"}]),hi([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Int16",name:"rightJustifiedTextSymbolIndex"},{type:"Int16",name:"centerJustifiedTextSymbolIndex"},{type:"Int16",name:"leftJustifiedTextSymbolIndex"},{type:"Int16",name:"verticalPlacedTextSymbolIndex"},{type:"Int16",name:"placedIconSymbolIndex"},{type:"Int16",name:"verticalPlacedIconSymbolIndex"},{type:"Uint16",name:"key"},{type:"Uint16",name:"textBoxStartIndex"},{type:"Uint16",name:"textBoxEndIndex"},{type:"Uint16",name:"verticalTextBoxStartIndex"},{type:"Uint16",name:"verticalTextBoxEndIndex"},{type:"Uint16",name:"iconBoxStartIndex"},{type:"Uint16",name:"iconBoxEndIndex"},{type:"Uint16",name:"verticalIconBoxStartIndex"},{type:"Uint16",name:"verticalIconBoxEndIndex"},{type:"Uint16",name:"featureIndex"},{type:"Uint16",name:"numHorizontalGlyphVertices"},{type:"Uint16",name:"numVerticalGlyphVertices"},{type:"Uint16",name:"numIconVertices"},{type:"Uint16",name:"numVerticalIconVertices"},{type:"Uint16",name:"useRuntimeCollisionCircles"},{type:"Uint32",name:"crossTileID"},{type:"Float32",name:"textBoxScale"},{type:"Float32",components:2,name:"textOffset"},{type:"Float32",name:"collisionCircleDiameter"}]),hi([{type:"Float32",name:"offsetX"}]),hi([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]);const $p={"!":"\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"};var $i=24,ww=Sr,VM=function(d,l,h,y,C){var k,O,F=8*C-y-1,B=(1<<F)-1,K=B>>1,ee=-7,ie=h?C-1:0,de=h?-1:1,ge=d[l+ie];for(ie+=de,k=ge&(1<<-ee)-1,ge>>=-ee,ee+=F;ee>0;k=256*k+d[l+ie],ie+=de,ee-=8);for(O=k&(1<<-ee)-1,k>>=-ee,ee+=y;ee>0;O=256*O+d[l+ie],ie+=de,ee-=8);if(k===0)k=1-K;else{if(k===B)return O?NaN:1/0*(ge?-1:1);O+=Math.pow(2,y),k-=K}return(ge?-1:1)*O*Math.pow(2,k-y)},UM=function(d,l,h,y,C,k){var O,F,B,K=8*k-C-1,ee=(1<<K)-1,ie=ee>>1,de=C===23?Math.pow(2,-24)-Math.pow(2,-77):0,ge=y?0:k-1,ve=y?1:-1,Ne=l<0||l===0&&1/l<0?1:0;for(l=Math.abs(l),isNaN(l)||l===1/0?(F=isNaN(l)?1:0,O=ee):(O=Math.floor(Math.log(l)/Math.LN2),l*(B=Math.pow(2,-O))<1&&(O--,B*=2),(l+=O+ie>=1?de/B:de*Math.pow(2,1-ie))*B>=2&&(O++,B/=2),O+ie>=ee?(F=0,O=ee):O+ie>=1?(F=(l*B-1)*Math.pow(2,C),O+=ie):(F=l*Math.pow(2,ie-1)*Math.pow(2,C),O=0));C>=8;d[h+ge]=255&F,ge+=ve,F/=256,C-=8);for(O=O<<C|F,K+=C;K>0;d[h+ge]=255&O,ge+=ve,O/=256,K-=8);d[h+ge-ve]|=128*Ne};function Sr(d){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(d)?d:new Uint8Array(d||0),this.pos=0,this.type=0,this.length=this.buf.length}Sr.Varint=0,Sr.Fixed64=1,Sr.Bytes=2,Sr.Fixed32=5;var gc,Cw=4294967296,jM=1/Cw,HM=typeof TextDecoder>"u"?null:new TextDecoder("utf8");function bl(d){return d.type===Sr.Bytes?d.readVarint()+d.pos:d.pos+1}function mf(d,l,h){return h?4294967296*l+(d>>>0):4294967296*(l>>>0)+(d>>>0)}function KM(d,l,h){var y=l<=16383?1:l<=2097151?2:l<=268435455?3:Math.floor(Math.log(l)/(7*Math.LN2));h.realloc(y);for(var C=h.pos-1;C>=d;C--)h.buf[C+y]=h.buf[C]}function TH(d,l){for(var h=0;h<d.length;h++)l.writeVarint(d[h])}function IH(d,l){for(var h=0;h<d.length;h++)l.writeSVarint(d[h])}function kH(d,l){for(var h=0;h<d.length;h++)l.writeFloat(d[h])}function MH(d,l){for(var h=0;h<d.length;h++)l.writeDouble(d[h])}function RH(d,l){for(var h=0;h<d.length;h++)l.writeBoolean(d[h])}function OH(d,l){for(var h=0;h<d.length;h++)l.writeFixed32(d[h])}function DH(d,l){for(var h=0;h<d.length;h++)l.writeSFixed32(d[h])}function AH(d,l){for(var h=0;h<d.length;h++)l.writeFixed64(d[h])}function NH(d,l){for(var h=0;h<d.length;h++)l.writeSFixed64(d[h])}function Cy(d,l){return(d[l]|d[l+1]<<8|d[l+2]<<16)+16777216*d[l+3]}function gf(d,l,h){d[h]=l,d[h+1]=l>>>8,d[h+2]=l>>>16,d[h+3]=l>>>24}function WM(d,l){return(d[l]|d[l+1]<<8|d[l+2]<<16)+(d[l+3]<<24)}function LH(d,l,h){d===1&&h.readMessage(zH,l)}function zH(d,l,h){if(d===3){const{id:y,bitmap:C,width:k,height:O,left:F,top:B,advance:K}=h.readMessage(FH,{});l.push({id:y,bitmap:new Op({width:k+6,height:O+6},C),metrics:{width:k,height:O,left:F,top:B,advance:K}})}}function FH(d,l,h){d===1?l.id=h.readVarint():d===2?l.bitmap=h.readBytes():d===3?l.width=h.readVarint():d===4?l.height=h.readVarint():d===5?l.left=h.readSVarint():d===6?l.top=h.readSVarint():d===7&&(l.advance=h.readVarint())}function GM(d){let l=0,h=0;for(const O of d)l+=O.w*O.h,h=Math.max(h,O.w);d.sort((O,F)=>F.h-O.h);const y=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(l/.95)),h),h:1/0}];let C=0,k=0;for(const O of d)for(let F=y.length-1;F>=0;F--){const B=y[F];if(!(O.w>B.w||O.h>B.h)){if(O.x=B.x,O.y=B.y,k=Math.max(k,O.y+O.h),C=Math.max(C,O.x+O.w),O.w===B.w&&O.h===B.h){const K=y.pop();F<y.length&&(y[F]=K)}else O.h===B.h?(B.x+=O.w,B.w-=O.w):O.w===B.w?(B.y+=O.h,B.h-=O.h):(y.push({x:B.x+O.w,y:B.y,w:B.w-O.w,h:O.h}),B.y+=O.h,B.h-=O.h);break}}return{w:C,h:k,fill:l/(C*k)||0}}Sr.prototype={destroy:function(){this.buf=null},readFields:function(d,l,h){for(h=h||this.length;this.pos<h;){var y=this.readVarint(),C=y>>3,k=this.pos;this.type=7&y,d(C,l,this),this.pos===k&&this.skip(y)}return l},readMessage:function(d,l){return this.readFields(d,l,this.readVarint()+this.pos)},readFixed32:function(){var d=Cy(this.buf,this.pos);return this.pos+=4,d},readSFixed32:function(){var d=WM(this.buf,this.pos);return this.pos+=4,d},readFixed64:function(){var d=Cy(this.buf,this.pos)+Cy(this.buf,this.pos+4)*Cw;return this.pos+=8,d},readSFixed64:function(){var d=Cy(this.buf,this.pos)+WM(this.buf,this.pos+4)*Cw;return this.pos+=8,d},readFloat:function(){var d=VM(this.buf,this.pos,!0,23,4);return this.pos+=4,d},readDouble:function(){var d=VM(this.buf,this.pos,!0,52,8);return this.pos+=8,d},readVarint:function(d){var l,h,y=this.buf;return l=127&(h=y[this.pos++]),h<128?l:(l|=(127&(h=y[this.pos++]))<<7,h<128?l:(l|=(127&(h=y[this.pos++]))<<14,h<128?l:(l|=(127&(h=y[this.pos++]))<<21,h<128?l:function(C,k,O){var F,B,K=O.buf;if(F=(112&(B=K[O.pos++]))>>4,B<128||(F|=(127&(B=K[O.pos++]))<<3,B<128)||(F|=(127&(B=K[O.pos++]))<<10,B<128)||(F|=(127&(B=K[O.pos++]))<<17,B<128)||(F|=(127&(B=K[O.pos++]))<<24,B<128)||(F|=(1&(B=K[O.pos++]))<<31,B<128))return mf(C,F,k);throw new Error("Expected varint not more than 10 bytes")}(l|=(15&(h=y[this.pos]))<<28,d,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var d=this.readVarint();return d%2==1?(d+1)/-2:d/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var d=this.readVarint()+this.pos,l=this.pos;return this.pos=d,d-l>=12&&HM?function(h,y,C){return HM.decode(h.subarray(y,C))}(this.buf,l,d):function(h,y,C){for(var k="",O=y;O<C;){var F,B,K,ee=h[O],ie=null,de=ee>239?4:ee>223?3:ee>191?2:1;if(O+de>C)break;de===1?ee<128&&(ie=ee):de===2?(192&(F=h[O+1]))==128&&(ie=(31&ee)<<6|63&F)<=127&&(ie=null):de===3?(B=h[O+2],(192&(F=h[O+1]))==128&&(192&B)==128&&((ie=(15&ee)<<12|(63&F)<<6|63&B)<=2047||ie>=55296&&ie<=57343)&&(ie=null)):de===4&&(B=h[O+2],K=h[O+3],(192&(F=h[O+1]))==128&&(192&B)==128&&(192&K)==128&&((ie=(15&ee)<<18|(63&F)<<12|(63&B)<<6|63&K)<=65535||ie>=1114112)&&(ie=null)),ie===null?(ie=65533,de=1):ie>65535&&(ie-=65536,k+=String.fromCharCode(ie>>>10&1023|55296),ie=56320|1023&ie),k+=String.fromCharCode(ie),O+=de}return k}(this.buf,l,d)},readBytes:function(){var d=this.readVarint()+this.pos,l=this.buf.subarray(this.pos,d);return this.pos=d,l},readPackedVarint:function(d,l){if(this.type!==Sr.Bytes)return d.push(this.readVarint(l));var h=bl(this);for(d=d||[];this.pos<h;)d.push(this.readVarint(l));return d},readPackedSVarint:function(d){if(this.type!==Sr.Bytes)return d.push(this.readSVarint());var l=bl(this);for(d=d||[];this.pos<l;)d.push(this.readSVarint());return d},readPackedBoolean:function(d){if(this.type!==Sr.Bytes)return d.push(this.readBoolean());var l=bl(this);for(d=d||[];this.pos<l;)d.push(this.readBoolean());return d},readPackedFloat:function(d){if(this.type!==Sr.Bytes)return d.push(this.readFloat());var l=bl(this);for(d=d||[];this.pos<l;)d.push(this.readFloat());return d},readPackedDouble:function(d){if(this.type!==Sr.Bytes)return d.push(this.readDouble());var l=bl(this);for(d=d||[];this.pos<l;)d.push(this.readDouble());return d},readPackedFixed32:function(d){if(this.type!==Sr.Bytes)return d.push(this.readFixed32());var l=bl(this);for(d=d||[];this.pos<l;)d.push(this.readFixed32());return d},readPackedSFixed32:function(d){if(this.type!==Sr.Bytes)return d.push(this.readSFixed32());var l=bl(this);for(d=d||[];this.pos<l;)d.push(this.readSFixed32());return d},readPackedFixed64:function(d){if(this.type!==Sr.Bytes)return d.push(this.readFixed64());var l=bl(this);for(d=d||[];this.pos<l;)d.push(this.readFixed64());return d},readPackedSFixed64:function(d){if(this.type!==Sr.Bytes)return d.push(this.readSFixed64());var l=bl(this);for(d=d||[];this.pos<l;)d.push(this.readSFixed64());return d},skip:function(d){var l=7&d;if(l===Sr.Varint)for(;this.buf[this.pos++]>127;);else if(l===Sr.Bytes)this.pos=this.readVarint()+this.pos;else if(l===Sr.Fixed32)this.pos+=4;else{if(l!==Sr.Fixed64)throw new Error("Unimplemented type: "+l);this.pos+=8}},writeTag:function(d,l){this.writeVarint(d<<3|l)},realloc:function(d){for(var l=this.length||16;l<this.pos+d;)l*=2;if(l!==this.length){var h=new Uint8Array(l);h.set(this.buf),this.buf=h,this.length=l}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(d){this.realloc(4),gf(this.buf,d,this.pos),this.pos+=4},writeSFixed32:function(d){this.realloc(4),gf(this.buf,d,this.pos),this.pos+=4},writeFixed64:function(d){this.realloc(8),gf(this.buf,-1&d,this.pos),gf(this.buf,Math.floor(d*jM),this.pos+4),this.pos+=8},writeSFixed64:function(d){this.realloc(8),gf(this.buf,-1&d,this.pos),gf(this.buf,Math.floor(d*jM),this.pos+4),this.pos+=8},writeVarint:function(d){(d=+d||0)>268435455||d<0?function(l,h){var y,C;if(l>=0?(y=l%4294967296|0,C=l/4294967296|0):(C=~(-l/4294967296),4294967295^(y=~(-l%4294967296))?y=y+1|0:(y=0,C=C+1|0)),l>=18446744073709552e3||l<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");h.realloc(10),function(k,O,F){F.buf[F.pos++]=127&k|128,k>>>=7,F.buf[F.pos++]=127&k|128,k>>>=7,F.buf[F.pos++]=127&k|128,k>>>=7,F.buf[F.pos++]=127&k|128,F.buf[F.pos]=127&(k>>>=7)}(y,0,h),function(k,O){var F=(7&k)<<4;O.buf[O.pos++]|=F|((k>>>=3)?128:0),k&&(O.buf[O.pos++]=127&k|((k>>>=7)?128:0),k&&(O.buf[O.pos++]=127&k|((k>>>=7)?128:0),k&&(O.buf[O.pos++]=127&k|((k>>>=7)?128:0),k&&(O.buf[O.pos++]=127&k|((k>>>=7)?128:0),k&&(O.buf[O.pos++]=127&k)))))}(C,h)}(d,this):(this.realloc(4),this.buf[this.pos++]=127&d|(d>127?128:0),d<=127||(this.buf[this.pos++]=127&(d>>>=7)|(d>127?128:0),d<=127||(this.buf[this.pos++]=127&(d>>>=7)|(d>127?128:0),d<=127||(this.buf[this.pos++]=d>>>7&127))))},writeSVarint:function(d){this.writeVarint(d<0?2*-d-1:2*d)},writeBoolean:function(d){this.writeVarint(Boolean(d))},writeString:function(d){d=String(d),this.realloc(4*d.length),this.pos++;var l=this.pos;this.pos=function(y,C,k){for(var O,F,B=0;B<C.length;B++){if((O=C.charCodeAt(B))>55295&&O<57344){if(!F){O>56319||B+1===C.length?(y[k++]=239,y[k++]=191,y[k++]=189):F=O;continue}if(O<56320){y[k++]=239,y[k++]=191,y[k++]=189,F=O;continue}O=F-55296<<10|O-56320|65536,F=null}else F&&(y[k++]=239,y[k++]=191,y[k++]=189,F=null);O<128?y[k++]=O:(O<2048?y[k++]=O>>6|192:(O<65536?y[k++]=O>>12|224:(y[k++]=O>>18|240,y[k++]=O>>12&63|128),y[k++]=O>>6&63|128),y[k++]=63&O|128)}return k}(this.buf,d,this.pos);var h=this.pos-l;h>=128&&KM(l,h,this),this.pos=l-1,this.writeVarint(h),this.pos+=h},writeFloat:function(d){this.realloc(4),UM(this.buf,d,this.pos,!0,23,4),this.pos+=4},writeDouble:function(d){this.realloc(8),UM(this.buf,d,this.pos,!0,52,8),this.pos+=8},writeBytes:function(d){var l=d.length;this.writeVarint(l),this.realloc(l);for(var h=0;h<l;h++)this.buf[this.pos++]=d[h]},writeRawMessage:function(d,l){this.pos++;var h=this.pos;d(l,this);var y=this.pos-h;y>=128&&KM(h,y,this),this.pos=h-1,this.writeVarint(y),this.pos+=y},writeMessage:function(d,l,h){this.writeTag(d,Sr.Bytes),this.writeRawMessage(l,h)},writePackedVarint:function(d,l){l.length&&this.writeMessage(d,TH,l)},writePackedSVarint:function(d,l){l.length&&this.writeMessage(d,IH,l)},writePackedBoolean:function(d,l){l.length&&this.writeMessage(d,RH,l)},writePackedFloat:function(d,l){l.length&&this.writeMessage(d,kH,l)},writePackedDouble:function(d,l){l.length&&this.writeMessage(d,MH,l)},writePackedFixed32:function(d,l){l.length&&this.writeMessage(d,OH,l)},writePackedSFixed32:function(d,l){l.length&&this.writeMessage(d,DH,l)},writePackedFixed64:function(d,l){l.length&&this.writeMessage(d,AH,l)},writePackedSFixed64:function(d,l){l.length&&this.writeMessage(d,NH,l)},writeBytesField:function(d,l){this.writeTag(d,Sr.Bytes),this.writeBytes(l)},writeFixed32Field:function(d,l){this.writeTag(d,Sr.Fixed32),this.writeFixed32(l)},writeSFixed32Field:function(d,l){this.writeTag(d,Sr.Fixed32),this.writeSFixed32(l)},writeFixed64Field:function(d,l){this.writeTag(d,Sr.Fixed64),this.writeFixed64(l)},writeSFixed64Field:function(d,l){this.writeTag(d,Sr.Fixed64),this.writeSFixed64(l)},writeVarintField:function(d,l){this.writeTag(d,Sr.Varint),this.writeVarint(l)},writeSVarintField:function(d,l){this.writeTag(d,Sr.Varint),this.writeSVarint(l)},writeStringField:function(d,l){this.writeTag(d,Sr.Bytes),this.writeString(l)},writeFloatField:function(d,l){this.writeTag(d,Sr.Fixed32),this.writeFloat(l)},writeDoubleField:function(d,l){this.writeTag(d,Sr.Fixed64),this.writeDouble(l)},writeBooleanField:function(d,l){this.writeVarintField(d,Boolean(l))}};class Sw{constructor(l,{pixelRatio:h,version:y,stretchX:C,stretchY:k,content:O}){this.paddedRect=l,this.pixelRatio=h,this.stretchX=C,this.stretchY=k,this.content=O,this.version=y}get tl(){return[this.paddedRect.x+1,this.paddedRect.y+1]}get br(){return[this.paddedRect.x+this.paddedRect.w-1,this.paddedRect.y+this.paddedRect.h-1]}get tlbr(){return this.tl.concat(this.br)}get displaySize(){return[(this.paddedRect.w-2)/this.pixelRatio,(this.paddedRect.h-2)/this.pixelRatio]}}class qM{constructor(l,h){const y={},C={};this.haveRenderCallbacks=[];const k=[];this.addImages(l,y,k),this.addImages(h,C,k);const{w:O,h:F}=GM(k),B=new ca({width:O||1,height:F||1});for(const K in l){const ee=l[K],ie=y[K].paddedRect;ca.copy(ee.data,B,{x:0,y:0},{x:ie.x+1,y:ie.y+1},ee.data)}for(const K in h){const ee=h[K],ie=C[K].paddedRect,de=ie.x+1,ge=ie.y+1,ve=ee.data.width,Ne=ee.data.height;ca.copy(ee.data,B,{x:0,y:0},{x:de,y:ge},ee.data),ca.copy(ee.data,B,{x:0,y:Ne-1},{x:de,y:ge-1},{width:ve,height:1}),ca.copy(ee.data,B,{x:0,y:0},{x:de,y:ge+Ne},{width:ve,height:1}),ca.copy(ee.data,B,{x:ve-1,y:0},{x:de-1,y:ge},{width:1,height:Ne}),ca.copy(ee.data,B,{x:0,y:0},{x:de+ve,y:ge},{width:1,height:Ne})}this.image=B,this.iconPositions=y,this.patternPositions=C}addImages(l,h,y){for(const C in l){const k=l[C],O={x:0,y:0,w:k.data.width+2,h:k.data.height+2};y.push(O),h[C]=new Sw(O,k),k.hasRenderCallback&&this.haveRenderCallbacks.push(C)}}patchUpdatedImages(l,h){l.dispatchRenderCallbacks(this.haveRenderCallbacks);for(const y in l.updatedImages)this.patchUpdatedImage(this.iconPositions[y],l.getImage(y),h),this.patchUpdatedImage(this.patternPositions[y],l.getImage(y),h)}patchUpdatedImage(l,h,y){if(!l||!h||l.version===h.version)return;l.version=h.version;const[C,k]=l.tl;y.update(h.data,void 0,{x:C,y:k})}}gn("ImagePosition",Sw),gn("ImageAtlas",qM),a.WritingMode=void 0,(gc=a.WritingMode||(a.WritingMode={}))[gc.none=0]="none",gc[gc.horizontal=1]="horizontal",gc[gc.vertical=2]="vertical",gc[gc.horizontalOnly=3]="horizontalOnly";const Sy=-17;class Bp{constructor(){this.scale=1,this.fontStack="",this.imageName=null}static forText(l,h){const y=new Bp;return y.scale=l||1,y.fontStack=h,y}static forImage(l){const h=new Bp;return h.imageName=l,h}}class vf{constructor(){this.text="",this.sectionIndex=[],this.sections=[],this.imageSectionID=null}static fromFeature(l,h){const y=new vf;for(let C=0;C<l.sections.length;C++){const k=l.sections[C];k.image?y.addImageSection(k):y.addTextSection(k,h)}return y}length(){return this.text.length}getSection(l){return this.sections[this.sectionIndex[l]]}getSectionIndex(l){return this.sectionIndex[l]}getCharCode(l){return this.text.charCodeAt(l)}verticalizePunctuation(){this.text=function(l){let h="";for(let y=0;y<l.length;y++){const C=l.charCodeAt(y+1)||null,k=l.charCodeAt(y-1)||null;h+=C&&iy(C)&&!$p[l[y+1]]||k&&iy(k)&&!$p[l[y-1]]||!$p[l[y]]?l[y]:$p[l[y]]}return h}(this.text)}trim(){let l=0;for(let y=0;y<this.text.length&&Py[this.text.charCodeAt(y)];y++)l++;let h=this.text.length;for(let y=this.text.length-1;y>=0&&y>=l&&Py[this.text.charCodeAt(y)];y--)h--;this.text=this.text.substring(l,h),this.sectionIndex=this.sectionIndex.slice(l,h)}substring(l,h){const y=new vf;return y.text=this.text.substring(l,h),y.sectionIndex=this.sectionIndex.slice(l,h),y.sections=this.sections,y}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce((l,h)=>Math.max(l,this.sections[h].scale),0)}addTextSection(l,h){this.text+=l.text,this.sections.push(Bp.forText(l.scale,l.fontStack||h));const y=this.sections.length-1;for(let C=0;C<l.text.length;++C)this.sectionIndex.push(y)}addImageSection(l){const h=l.image?l.image.name:"";if(h.length===0)return void z("Can't add FormattedSection with an empty image.");const y=this.getNextImageSectionCharCode();y?(this.text+=String.fromCharCode(y),this.sections.push(Bp.forImage(h)),this.sectionIndex.push(this.sections.length-1)):z("Reached maximum number of images 6401")}getNextImageSectionCharCode(){return this.imageSectionID?this.imageSectionID>=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}}function Ey(d,l,h,y,C,k,O,F,B,K,ee,ie,de,ge,ve,Ne){const De=vf.fromFeature(d,C);let Qe;ie===a.WritingMode.vertical&&De.verticalizePunctuation();const{processBidirectionalText:ht,processStyledBidirectionalText:Ge}=Ko;if(ht&&De.sections.length===1){Qe=[];const kt=ht(De.toString(),Ew(De,K,k,l,y,ge,ve));for(const hn of kt){const vn=new vf;vn.text=hn,vn.sections=De.sections;for(let ln=0;ln<hn.length;ln++)vn.sectionIndex.push(0);Qe.push(vn)}}else if(Ge){Qe=[];const kt=Ge(De.text,De.sectionIndex,Ew(De,K,k,l,y,ge,ve));for(const hn of kt){const vn=new vf;vn.text=hn[0],vn.sectionIndex=hn[1],vn.sections=De.sections,Qe.push(vn)}}else Qe=function(kt,hn){const vn=[],ln=kt.text;let en=0;for(const Qt of hn)vn.push(kt.substring(en,Qt)),en=Qt;return en<ln.length&&vn.push(kt.substring(en,ln.length)),vn}(De,Ew(De,K,k,l,y,ge,ve));const lt=[],Rt={positionedLines:lt,text:De.toString(),top:ee[1],bottom:ee[1],left:ee[0],right:ee[0],writingMode:ie,iconsInText:!1,verticalizable:!1};return function(kt,hn,vn,ln,en,Qt,cn,nn,jt,In,bn,Kn){let Ar=0,Ur=Sy,bi=0,da=0;const Zi=nn==="right"?1:nn==="left"?0:.5;let pi=0;for(const mi of en){mi.trim();const Yi=mi.getMaxScale(),so=(Yi-1)*$i,bo={positionedGlyphs:[],lineOffset:0};kt.positionedLines[pi]=bo;const Ao=bo.positionedGlyphs;let No=0;if(!mi.length()){Ur+=Qt,++pi;continue}for(let Ri=0;Ri<mi.length();Ri++){const Xn=mi.getSection(Ri),qo=mi.getSectionIndex(Ri),Qi=mi.getCharCode(Ri);let lo=0,$a=null,ms=null,gs=null,wl=$i;const Ba=!(jt===a.WritingMode.horizontal||!bn&&!xp(Qi)||bn&&(Py[Qi]||(Mi=Qi,sn.Arabic(Mi)||sn["Arabic Supplement"](Mi)||sn["Arabic Extended-A"](Mi)||sn["Arabic Presentation Forms-A"](Mi)||sn["Arabic Presentation Forms-B"](Mi))));if(Xn.imageName){const fa=ln[Xn.imageName];if(!fa)continue;gs=Xn.imageName,kt.iconsInText=kt.iconsInText||!0,ms=fa.paddedRect;const Lo=fa.displaySize;Xn.scale=Xn.scale*$i/Kn,$a={width:Lo[0],height:Lo[1],left:1,top:-3,advance:Ba?Lo[1]:Lo[0]},lo=so+($i-Lo[1]*Xn.scale),wl=$a.advance;const Cl=Ba?Lo[0]*Xn.scale-$i*Yi:Lo[1]*Xn.scale-$i*Yi;Cl>0&&Cl>No&&(No=Cl)}else{const fa=vn[Xn.fontStack],Lo=fa&&fa[Qi];if(Lo&&Lo.rect)ms=Lo.rect,$a=Lo.metrics;else{const Cl=hn[Xn.fontStack],jp=Cl&&Cl[Qi];if(!jp)continue;$a=jp.metrics}lo=(Yi-Xn.scale)*$i}Ba?(kt.verticalizable=!0,Ao.push({glyph:Qi,imageName:gs,x:Ar,y:Ur+lo,vertical:Ba,scale:Xn.scale,fontStack:Xn.fontStack,sectionIndex:qo,metrics:$a,rect:ms}),Ar+=wl*Xn.scale+In):(Ao.push({glyph:Qi,imageName:gs,x:Ar,y:Ur+lo,vertical:Ba,scale:Xn.scale,fontStack:Xn.fontStack,sectionIndex:qo,metrics:$a,rect:ms}),Ar+=$a.advance*Xn.scale+In)}Ao.length!==0&&(bi=Math.max(Ar-In,bi),VH(Ao,0,Ao.length-1,Zi,No)),Ar=0;const qr=Qt*Yi+No;bo.lineOffset=Math.max(No,so),Ur+=qr,da=Math.max(qr,da),++pi}var Mi;const Xi=Ur-Sy,{horizontalAlign:ao,verticalAlign:Do}=Pw(cn);(function(mi,Yi,so,bo,Ao,No,qr,Ri,Xn){const qo=(Yi-so)*Ao;let Qi=0;Qi=No!==qr?-Ri*bo-Sy:(-bo*Xn+.5)*qr;for(const lo of mi)for(const $a of lo.positionedGlyphs)$a.x+=qo,$a.y+=Qi})(kt.positionedLines,Zi,ao,Do,bi,da,Qt,Xi,en.length),kt.top+=-Do*Xi,kt.bottom=kt.top+Xi,kt.left+=-ao*bi,kt.right=kt.left+bi}(Rt,l,h,y,Qe,O,F,B,ie,K,de,Ne),!function(kt){for(const hn of kt)if(hn.positionedGlyphs.length!==0)return!1;return!0}(lt)&&Rt}const Py={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},$H={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 ZM(d,l,h,y,C,k){if(l.imageName){const O=y[l.imageName];return O?O.displaySize[0]*l.scale*$i/k+C:0}{const O=h[l.fontStack],F=O&&O[d];return F?F.metrics.advance*l.scale+C:0}}function XM(d,l,h,y){const C=Math.pow(d-l,2);return y?d<l?C/2:2*C:C+Math.abs(h)*h}function BH(d,l,h){let y=0;return d===10&&(y-=1e4),h&&(y+=150),d!==40&&d!==65288||(y+=50),l!==41&&l!==65289||(y+=50),y}function YM(d,l,h,y,C,k){let O=null,F=XM(l,h,C,k);for(const B of y){const K=XM(l-B.x,h,C,k)+B.badness;K<=F&&(O=B,F=K)}return{index:d,x:l,priorBreak:O,badness:F}}function QM(d){return d?QM(d.priorBreak).concat(d.index):[]}function Ew(d,l,h,y,C,k,O){if(k!=="point")return[];if(!d)return[];const F=[],B=function(de,ge,ve,Ne,De,Qe){let ht=0;for(let Ge=0;Ge<de.length();Ge++){const lt=de.getSection(Ge);ht+=ZM(de.getCharCode(Ge),lt,Ne,De,ge,Qe)}return ht/Math.max(1,Math.ceil(ht/ve))}(d,l,h,y,C,O),K=d.text.indexOf("\u200B")>=0;let ee=0;for(let de=0;de<d.length();de++){const ge=d.getSection(de),ve=d.getCharCode(de);if(Py[ve]||(ee+=ZM(ve,ge,y,C,l,O)),de<d.length()-1){const Ne=!((ie=ve)<11904||!(sn["Bopomofo Extended"](ie)||sn.Bopomofo(ie)||sn["CJK Compatibility Forms"](ie)||sn["CJK Compatibility Ideographs"](ie)||sn["CJK Compatibility"](ie)||sn["CJK Radicals Supplement"](ie)||sn["CJK Strokes"](ie)||sn["CJK Symbols and Punctuation"](ie)||sn["CJK Unified Ideographs Extension A"](ie)||sn["CJK Unified Ideographs"](ie)||sn["Enclosed CJK Letters and Months"](ie)||sn["Halfwidth and Fullwidth Forms"](ie)||sn.Hiragana(ie)||sn["Ideographic Description Characters"](ie)||sn["Kangxi Radicals"](ie)||sn["Katakana Phonetic Extensions"](ie)||sn.Katakana(ie)||sn["Vertical Forms"](ie)||sn["Yi Radicals"](ie)||sn["Yi Syllables"](ie)));($H[ve]||Ne||ge.imageName)&&F.push(YM(de+1,ee,B,F,BH(ve,d.getCharCode(de+1),Ne&&K),!1))}}var ie;return QM(YM(d.length(),ee,B,F,0,!0))}function Pw(d){let l=.5,h=.5;switch(d){case"right":case"top-right":case"bottom-right":l=1;break;case"left":case"top-left":case"bottom-left":l=0}switch(d){case"bottom":case"bottom-right":case"bottom-left":h=1;break;case"top":case"top-right":case"top-left":h=0}return{horizontalAlign:l,verticalAlign:h}}function VH(d,l,h,y,C){if(!y&&!C)return;const k=d[h],O=(d[h].x+k.metrics.advance*k.scale)*y;for(let F=l;F<=h;F++)d[F].x-=O,d[F].y+=C}function UH(d,l,h){const{horizontalAlign:y,verticalAlign:C}=Pw(h),k=l[0]-d.displaySize[0]*y,O=l[1]-d.displaySize[1]*C;return{image:d,top:O,bottom:O+d.displaySize[1],left:k,right:k+d.displaySize[0]}}function JM(d,l,h,y,C,k){const O=d.image;let F;if(O.content){const De=O.content,Qe=O.pixelRatio||1;F=[De[0]/Qe,De[1]/Qe,O.displaySize[0]-De[2]/Qe,O.displaySize[1]-De[3]/Qe]}const B=l.left*k,K=l.right*k;let ee,ie,de,ge;h==="width"||h==="both"?(ge=C[0]+B-y[3],ie=C[0]+K+y[1]):(ge=C[0]+(B+K-O.displaySize[0])/2,ie=ge+O.displaySize[0]);const ve=l.top*k,Ne=l.bottom*k;return h==="height"||h==="both"?(ee=C[1]+ve-y[0],de=C[1]+Ne+y[2]):(ee=C[1]+(ve+Ne-O.displaySize[1])/2,de=ee+O.displaySize[1]),{image:O,top:ee,right:ie,bottom:de,left:ge,collisionPadding:F}}const _l=128;function eR(d,l){const{expression:h}=l;if(h.kind==="constant")return{kind:"constant",layoutSize:h.evaluate(new Br(d+1))};if(h.kind==="source")return{kind:"source"};{const{zoomStops:y,interpolationType:C}=h;let k=0;for(;k<y.length&&y[k]<=d;)k++;k=Math.max(0,k-1);let O=k;for(;O<y.length&&y[O]<d+1;)O++;O=Math.min(y.length-1,O);const F=y[k],B=y[O];return h.kind==="composite"?{kind:"composite",minZoom:F,maxZoom:B,interpolationType:C}:{kind:"camera",minZoom:F,maxZoom:B,minSize:h.evaluate(new Br(F)),maxSize:h.evaluate(new Br(B)),interpolationType:C}}}class vc extends re{constructor(l,h,y,C){super(l,h),this.angle=y,C!==void 0&&(this.segment=C)}clone(){return new vc(this.x,this.y,this.angle,this.segment)}}function tR(d,l,h,y,C){if(l.segment===void 0)return!0;let k=l,O=l.segment+1,F=0;for(;F>-h/2;){if(O--,O<0)return!1;F-=d[O].dist(k),k=d[O]}F+=d[O].dist(d[O+1]),O++;const B=[];let K=0;for(;F<h/2;){const ee=d[O],ie=d[O+1];if(!ie)return!1;let de=d[O-1].angleTo(ee)-ee.angleTo(ie);for(de=Math.abs((de+3*Math.PI)%(2*Math.PI)-Math.PI),B.push({distance:F,angleDelta:de}),K+=de;F-B[0].distance>y;)K-=B.shift().angleDelta;if(K>C)return!1;O++,F+=ee.dist(ie)}return!0}function nR(d){let l=0;for(let h=0;h<d.length-1;h++)l+=d[h].dist(d[h+1]);return l}function rR(d,l,h){return d?.6*l*h:0}function iR(d,l){return Math.max(d?d.right-d.left:0,l?l.right-l.left:0)}function jH(d,l,h,y,C,k){const O=rR(h,C,k),F=iR(h,y)*k;let B=0;const K=nR(d)/2;for(let ee=0;ee<d.length-1;ee++){const ie=d[ee],de=d[ee+1],ge=ie.dist(de);if(B+ge>K){const ve=(K-B)/ge,Ne=Cr(ie.x,de.x,ve),De=Cr(ie.y,de.y,ve),Qe=new vc(Ne,De,de.angleTo(ie),ee);return Qe._round(),!O||tR(d,Qe,F,O,l)?Qe:void 0}B+=ge}}function HH(d,l,h,y,C,k,O,F,B){const K=rR(y,k,O),ee=iR(y,C),ie=ee*O,de=d[0].x===0||d[0].x===B||d[0].y===0||d[0].y===B;return l-ie<l/4&&(l=ie+l/4),oR(d,de?l/2*F%l:(ee/2+2*k)*O*F%l,l,K,h,ie,de,!1,B)}function oR(d,l,h,y,C,k,O,F,B){const K=k/2,ee=nR(d);let ie=0,de=l-h,ge=[];for(let ve=0;ve<d.length-1;ve++){const Ne=d[ve],De=d[ve+1],Qe=Ne.dist(De),ht=De.angleTo(Ne);for(;de+h<ie+Qe;){de+=h;const Ge=(de-ie)/Qe,lt=Cr(Ne.x,De.x,Ge),Rt=Cr(Ne.y,De.y,Ge);if(lt>=0&&lt<B&&Rt>=0&&Rt<B&&de-K>=0&&de+K<=ee){const kt=new vc(lt,Rt,ht,ve);kt._round(),y&&!tR(d,kt,k,y,C)||ge.push(kt)}}ie+=Qe}return F||ge.length||O||(ge=oR(d,ie/2,h,y,C,k,O,!0,B)),ge}function aR(d,l,h,y,C){const k=[];for(let O=0;O<d.length;O++){const F=d[O];let B;for(let K=0;K<F.length-1;K++){let ee=F[K],ie=F[K+1];ee.x<l&&ie.x<l||(ee.x<l?ee=new re(l,ee.y+(l-ee.x)/(ie.x-ee.x)*(ie.y-ee.y))._round():ie.x<l&&(ie=new re(l,ee.y+(l-ee.x)/(ie.x-ee.x)*(ie.y-ee.y))._round()),ee.y<h&&ie.y<h||(ee.y<h?ee=new re(ee.x+(h-ee.y)/(ie.y-ee.y)*(ie.x-ee.x),h)._round():ie.y<h&&(ie=new re(ee.x+(h-ee.y)/(ie.y-ee.y)*(ie.x-ee.x),h)._round()),ee.x>=y&&ie.x>=y||(ee.x>=y?ee=new re(y,ee.y+(y-ee.x)/(ie.x-ee.x)*(ie.y-ee.y))._round():ie.x>=y&&(ie=new re(y,ee.y+(y-ee.x)/(ie.x-ee.x)*(ie.y-ee.y))._round()),ee.y>=C&&ie.y>=C||(ee.y>=C?ee=new re(ee.x+(C-ee.y)/(ie.y-ee.y)*(ie.x-ee.x),C)._round():ie.y>=C&&(ie=new re(ee.x+(C-ee.y)/(ie.y-ee.y)*(ie.x-ee.x),C)._round()),B&&ee.equals(B[B.length-1])||(B=[ee],k.push(B)),B.push(ie)))))}}return k}function sR(d,l,h,y){const C=[],k=d.image,O=k.pixelRatio,F=k.paddedRect.w-2,B=k.paddedRect.h-2,K=d.right-d.left,ee=d.bottom-d.top,ie=k.stretchX||[[0,F]],de=k.stretchY||[[0,B]],ge=(Qt,cn)=>Qt+cn[1]-cn[0],ve=ie.reduce(ge,0),Ne=de.reduce(ge,0),De=F-ve,Qe=B-Ne;let ht=0,Ge=ve,lt=0,Rt=Ne,kt=0,hn=De,vn=0,ln=Qe;if(k.content&&y){const Qt=k.content;ht=Ty(ie,0,Qt[0]),lt=Ty(de,0,Qt[1]),Ge=Ty(ie,Qt[0],Qt[2]),Rt=Ty(de,Qt[1],Qt[3]),kt=Qt[0]-ht,vn=Qt[1]-lt,hn=Qt[2]-Qt[0]-Ge,ln=Qt[3]-Qt[1]-Rt}const en=(Qt,cn,nn,jt)=>{const In=Iy(Qt.stretch-ht,Ge,K,d.left),bn=ky(Qt.fixed-kt,hn,Qt.stretch,ve),Kn=Iy(cn.stretch-lt,Rt,ee,d.top),Ar=ky(cn.fixed-vn,ln,cn.stretch,Ne),Ur=Iy(nn.stretch-ht,Ge,K,d.left),bi=ky(nn.fixed-kt,hn,nn.stretch,ve),da=Iy(jt.stretch-lt,Rt,ee,d.top),Zi=ky(jt.fixed-vn,ln,jt.stretch,Ne),pi=new re(In,Kn),Mi=new re(Ur,Kn),Xi=new re(Ur,da),ao=new re(In,da),Do=new re(bn/O,Ar/O),mi=new re(bi/O,Zi/O),Yi=l*Math.PI/180;if(Yi){const Ao=Math.sin(Yi),No=Math.cos(Yi),qr=[No,-Ao,Ao,No];pi._matMult(qr),Mi._matMult(qr),ao._matMult(qr),Xi._matMult(qr)}const so=Qt.stretch+Qt.fixed,bo=cn.stretch+cn.fixed;return{tl:pi,tr:Mi,bl:ao,br:Xi,tex:{x:k.paddedRect.x+1+so,y:k.paddedRect.y+1+bo,w:nn.stretch+nn.fixed-so,h:jt.stretch+jt.fixed-bo},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:Do,pixelOffsetBR:mi,minFontScaleX:hn/O/K,minFontScaleY:ln/O/ee,isSDF:h}};if(y&&(k.stretchX||k.stretchY)){const Qt=lR(ie,De,ve),cn=lR(de,Qe,Ne);for(let nn=0;nn<Qt.length-1;nn++){const jt=Qt[nn],In=Qt[nn+1];for(let bn=0;bn<cn.length-1;bn++)C.push(en(jt,cn[bn],In,cn[bn+1]))}}else C.push(en({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:F+1},{fixed:0,stretch:B+1}));return C}function Ty(d,l,h){let y=0;for(const C of d)y+=Math.max(l,Math.min(h,C[1]))-Math.max(l,Math.min(h,C[0]));return y}function lR(d,l,h){const y=[{fixed:-1,stretch:0}];for(const[C,k]of d){const O=y[y.length-1];y.push({fixed:C-O.stretch,stretch:O.stretch}),y.push({fixed:C-O.stretch,stretch:O.stretch+(k-C)})}return y.push({fixed:l+1,stretch:h}),y}function Iy(d,l,h,y){return d/l*h+y}function ky(d,l,h,y){return d-l*h/y}gn("Anchor",vc);class My{constructor(l,h,y,C,k,O,F,B,K,ee){if(this.boxStartIndex=l.length,K){let ie=O.top,de=O.bottom;const ge=O.collisionPadding;ge&&(ie-=ge[1],de+=ge[3]);let ve=de-ie;ve>0&&(ve=Math.max(10,ve),this.circleDiameter=ve)}else{let ie=O.top*F-B[0],de=O.bottom*F+B[2],ge=O.left*F-B[3],ve=O.right*F+B[1];const Ne=O.collisionPadding;if(Ne&&(ge-=Ne[0]*F,ie-=Ne[1]*F,ve+=Ne[2]*F,de+=Ne[3]*F),ee){const De=new re(ge,ie),Qe=new re(ve,ie),ht=new re(ge,de),Ge=new re(ve,de),lt=ee*Math.PI/180;De._rotate(lt),Qe._rotate(lt),ht._rotate(lt),Ge._rotate(lt),ge=Math.min(De.x,Qe.x,ht.x,Ge.x),ve=Math.max(De.x,Qe.x,ht.x,Ge.x),ie=Math.min(De.y,Qe.y,ht.y,Ge.y),de=Math.max(De.y,Qe.y,ht.y,Ge.y)}l.emplaceBack(h.x,h.y,ge,ie,ve,de,y,C,k)}this.boxEndIndex=l.length}}class KH{constructor(l=[],h=WH){if(this.data=l,this.length=this.data.length,this.compare=h,this.length>0)for(let y=(this.length>>1)-1;y>=0;y--)this._down(y)}push(l){this.data.push(l),this.length++,this._up(this.length-1)}pop(){if(this.length===0)return;const l=this.data[0],h=this.data.pop();return this.length--,this.length>0&&(this.data[0]=h,this._down(0)),l}peek(){return this.data[0]}_up(l){const{data:h,compare:y}=this,C=h[l];for(;l>0;){const k=l-1>>1,O=h[k];if(y(C,O)>=0)break;h[l]=O,l=k}h[l]=C}_down(l){const{data:h,compare:y}=this,C=this.length>>1,k=h[l];for(;l<C;){let O=1+(l<<1),F=h[O];const B=O+1;if(B<this.length&&y(h[B],F)<0&&(O=B,F=h[B]),y(F,k)>=0)break;h[l]=F,l=O}h[l]=k}}function WH(d,l){return d<l?-1:d>l?1:0}function GH(d,l=1,h=!1){let y=1/0,C=1/0,k=-1/0,O=-1/0;const F=d[0];for(let ge=0;ge<F.length;ge++){const ve=F[ge];(!ge||ve.x<y)&&(y=ve.x),(!ge||ve.y<C)&&(C=ve.y),(!ge||ve.x>k)&&(k=ve.x),(!ge||ve.y>O)&&(O=ve.y)}const B=Math.min(k-y,O-C);let K=B/2;const ee=new KH([],qH);if(B===0)return new re(y,C);for(let ge=y;ge<k;ge+=B)for(let ve=C;ve<O;ve+=B)ee.push(new yf(ge+K,ve+K,K,d));let ie=function(ge){let ve=0,Ne=0,De=0;const Qe=ge[0];for(let ht=0,Ge=Qe.length,lt=Ge-1;ht<Ge;lt=ht++){const Rt=Qe[ht],kt=Qe[lt],hn=Rt.x*kt.y-kt.x*Rt.y;Ne+=(Rt.x+kt.x)*hn,De+=(Rt.y+kt.y)*hn,ve+=3*hn}return new yf(Ne/ve,De/ve,0,ge)}(d),de=ee.length;for(;ee.length;){const ge=ee.pop();(ge.d>ie.d||!ie.d)&&(ie=ge,h&&console.log("found best %d after %d probes",Math.round(1e4*ge.d)/1e4,de)),ge.max-ie.d<=l||(K=ge.h/2,ee.push(new yf(ge.p.x-K,ge.p.y-K,K,d)),ee.push(new yf(ge.p.x+K,ge.p.y-K,K,d)),ee.push(new yf(ge.p.x-K,ge.p.y+K,K,d)),ee.push(new yf(ge.p.x+K,ge.p.y+K,K,d)),de+=4)}return h&&(console.log(`num probes: ${de}`),console.log(`best distance: ${ie.d}`)),ie.p}function qH(d,l){return l.max-d.max}function yf(d,l,h,y){this.p=new re(d,l),this.h=h,this.d=function(C,k){let O=!1,F=1/0;for(let B=0;B<k.length;B++){const K=k[B];for(let ee=0,ie=K.length,de=ie-1;ee<ie;de=ee++){const ge=K[ee],ve=K[de];ge.y>C.y!=ve.y>C.y&&C.x<(ve.x-ge.x)*(C.y-ge.y)/(ve.y-ge.y)+ge.x&&(O=!O),F=Math.min(F,gM(C,ge,ve))}}return(O?1:-1)*Math.sqrt(F)}(this.p,y),this.max=this.d+this.h*Math.SQRT2}const Tw=Number.POSITIVE_INFINITY;function cR(d,l){return l[1]!==Tw?function(h,y,C){let k=0,O=0;switch(y=Math.abs(y),C=Math.abs(C),h){case"top-right":case"top-left":case"top":O=C-7;break;case"bottom-right":case"bottom-left":case"bottom":O=7-C}switch(h){case"top-right":case"bottom-right":case"right":k=-y;break;case"top-left":case"bottom-left":case"left":k=y}return[k,O]}(d,l[0],l[1]):function(h,y){let C=0,k=0;y<0&&(y=0);const O=y/Math.sqrt(2);switch(h){case"top-right":case"top-left":k=O-7;break;case"bottom-right":case"bottom-left":k=7-O;break;case"bottom":k=7-y;break;case"top":k=y-7}switch(h){case"top-right":case"bottom-right":C=-O;break;case"top-left":case"bottom-left":C=O;break;case"left":C=y;break;case"right":C=-y}return[C,k]}(d,l[0])}function Iw(d){switch(d){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function ZH(d,l,h,y,C,k,O,F,B,K,ee){let ie=k.textMaxSize.evaluate(l,{});ie===void 0&&(ie=O);const de=d.layers[0].layout,ge=de.get("icon-offset").evaluate(l,{},ee),ve=dR(h.horizontal),Ne=O/24,De=d.tilePixelRatio*Ne,Qe=d.tilePixelRatio*ie/24,ht=d.tilePixelRatio*F,Ge=d.tilePixelRatio*de.get("symbol-spacing"),lt=de.get("text-padding")*d.tilePixelRatio,Rt=function(jt,In,bn,Kn=1){const Ar=jt.get("icon-padding").evaluate(In,{},bn),Ur=Ar&&Ar.values;return[Ur[0]*Kn,Ur[1]*Kn,Ur[2]*Kn,Ur[3]*Kn]}(de,l,ee,d.tilePixelRatio),kt=de.get("text-max-angle")/180*Math.PI,hn=de.get("text-rotation-alignment")!=="viewport"&&de.get("symbol-placement")!=="point",vn=de.get("icon-rotation-alignment")==="map"&&de.get("symbol-placement")!=="point",ln=de.get("symbol-placement"),en=Ge/2,Qt=de.get("icon-text-fit");let cn;y&&Qt!=="none"&&(d.allowVerticalPlacement&&h.vertical&&(cn=JM(y,h.vertical,Qt,de.get("icon-text-fit-padding"),ge,Ne)),ve&&(y=JM(y,ve,Qt,de.get("icon-text-fit-padding"),ge,Ne)));const nn=(jt,In)=>{In.x<0||In.x>=xi||In.y<0||In.y>=xi||function(bn,Kn,Ar,Ur,bi,da,Zi,pi,Mi,Xi,ao,Do,mi,Yi,so,bo,Ao,No,qr,Ri,Xn,qo,Qi,lo,$a){const ms=bn.addToLineVertexArray(Kn,Ar);let gs,wl,Ba,fa,Lo=0,Cl=0,jp=0,TR=0,Fw=-1,$w=-1;const Sl={};let IR=ki.exports(""),Bw=0,Vw=0;if(pi._unevaluatedLayout.getValue("text-radial-offset")===void 0?[Bw,Vw]=pi.layout.get("text-offset").evaluate(Xn,{},lo).map(zo=>zo*$i):(Bw=pi.layout.get("text-radial-offset").evaluate(Xn,{},lo)*$i,Vw=Tw),bn.allowVerticalPlacement&&Ur.vertical){const zo=pi.layout.get("text-rotate").evaluate(Xn,{},lo)+90;Ba=new My(Mi,Kn,Xi,ao,Do,Ur.vertical,mi,Yi,so,zo),Zi&&(fa=new My(Mi,Kn,Xi,ao,Do,Zi,Ao,No,so,zo))}if(bi){const zo=pi.layout.get("icon-rotate").evaluate(Xn,{}),js=pi.layout.get("icon-text-fit")!=="none",Hp=sR(bi,zo,Qi,js),Kp=Zi?sR(Zi,zo,Qi,js):void 0;wl=new My(Mi,Kn,Xi,ao,Do,bi,Ao,No,!1,zo),Lo=4*Hp.length;const RR=bn.iconSizeData;let Vu=null;RR.kind==="source"?(Vu=[_l*pi.layout.get("icon-size").evaluate(Xn,{})],Vu[0]>yc&&z(`${bn.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)):RR.kind==="composite"&&(Vu=[_l*qo.compositeIconSizes[0].evaluate(Xn,{},lo),_l*qo.compositeIconSizes[1].evaluate(Xn,{},lo)],(Vu[0]>yc||Vu[1]>yc)&&z(`${bn.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)),bn.addSymbols(bn.icon,Hp,Vu,Ri,qr,Xn,a.WritingMode.none,Kn,ms.lineStartIndex,ms.lineLength,-1,lo),Fw=bn.icon.placedSymbolArray.length-1,Kp&&(Cl=4*Kp.length,bn.addSymbols(bn.icon,Kp,Vu,Ri,qr,Xn,a.WritingMode.vertical,Kn,ms.lineStartIndex,ms.lineLength,-1,lo),$w=bn.icon.placedSymbolArray.length-1)}const kR=Object.keys(Ur.horizontal);for(const zo of kR){const js=Ur.horizontal[zo];if(!gs){IR=ki.exports(js.text);const Kp=pi.layout.get("text-rotate").evaluate(Xn,{},lo);gs=new My(Mi,Kn,Xi,ao,Do,js,mi,Yi,so,Kp)}const Hp=js.positionedLines.length===1;if(jp+=uR(bn,Kn,js,da,pi,so,Xn,bo,ms,Ur.vertical?a.WritingMode.horizontal:a.WritingMode.horizontalOnly,Hp?kR:[zo],Sl,Fw,qo,lo),Hp)break}Ur.vertical&&(TR+=uR(bn,Kn,Ur.vertical,da,pi,so,Xn,bo,ms,a.WritingMode.vertical,["vertical"],Sl,$w,qo,lo));const lK=gs?gs.boxStartIndex:bn.collisionBoxArray.length,cK=gs?gs.boxEndIndex:bn.collisionBoxArray.length,uK=Ba?Ba.boxStartIndex:bn.collisionBoxArray.length,dK=Ba?Ba.boxEndIndex:bn.collisionBoxArray.length,fK=wl?wl.boxStartIndex:bn.collisionBoxArray.length,hK=wl?wl.boxEndIndex:bn.collisionBoxArray.length,pK=fa?fa.boxStartIndex:bn.collisionBoxArray.length,mK=fa?fa.boxEndIndex:bn.collisionBoxArray.length;let vs=-1;const Ny=(zo,js)=>zo&&zo.circleDiameter?Math.max(zo.circleDiameter,js):js;vs=Ny(gs,vs),vs=Ny(Ba,vs),vs=Ny(wl,vs),vs=Ny(fa,vs);const MR=vs>-1?1:0;MR&&(vs*=$a/$i),bn.glyphOffsetArray.length>=xf.MAX_GLYPHS&&z("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),Xn.sortKey!==void 0&&bn.addToSortKeyRanges(bn.symbolInstances.length,Xn.sortKey),bn.symbolInstances.emplaceBack(Kn.x,Kn.y,Sl.right>=0?Sl.right:-1,Sl.center>=0?Sl.center:-1,Sl.left>=0?Sl.left:-1,Sl.vertical||-1,Fw,$w,IR,lK,cK,uK,dK,fK,hK,pK,mK,Xi,jp,TR,Lo,Cl,MR,0,mi,Bw,Vw,vs)}(d,In,jt,h,y,C,cn,d.layers[0],d.collisionBoxArray,l.index,l.sourceLayerIndex,d.index,De,[lt,lt,lt,lt],hn,B,ht,Rt,vn,ge,l,k,K,ee,O)};if(ln==="line")for(const jt of aR(l.geometry,0,0,xi,xi)){const In=HH(jt,Ge,kt,h.vertical||ve,y,24,Qe,d.overscaling,xi);for(const bn of In){const Kn=ve;Kn&&XH(d,Kn.text,en,bn)||nn(jt,bn)}}else if(ln==="line-center"){for(const jt of l.geometry)if(jt.length>1){const In=jH(jt,kt,h.vertical||ve,y,24,Qe);In&&nn(jt,In)}}else if(l.type==="Polygon")for(const jt of mw(l.geometry,0)){const In=GH(jt,16);nn(jt[0],new vc(In.x,In.y,0))}else if(l.type==="LineString")for(const jt of l.geometry)nn(jt,new vc(jt[0].x,jt[0].y,0));else if(l.type==="Point")for(const jt of l.geometry)for(const In of jt)nn([In],new vc(In.x,In.y,0))}const yc=32640;function uR(d,l,h,y,C,k,O,F,B,K,ee,ie,de,ge,ve){const Ne=function(ht,Ge,lt,Rt,kt,hn,vn,ln){const en=Rt.layout.get("text-rotate").evaluate(hn,{})*Math.PI/180,Qt=[];for(const cn of Ge.positionedLines)for(const nn of cn.positionedGlyphs){if(!nn.rect)continue;const jt=nn.rect||{};let In=4,bn=!0,Kn=1,Ar=0;const Ur=(kt||ln)&&nn.vertical,bi=nn.metrics.advance*nn.scale/2;if(ln&&Ge.verticalizable){const qr=(nn.scale-1)*$i,Ri=($i-nn.metrics.width*nn.scale)/2;Ar=cn.lineOffset/2-(nn.imageName?-Ri:qr)}if(nn.imageName){const qr=vn[nn.imageName];bn=qr.sdf,Kn=qr.pixelRatio,In=1/Kn}const da=kt?[nn.x+bi,nn.y]:[0,0];let Zi=kt?[0,0]:[nn.x+bi+lt[0],nn.y+lt[1]-Ar],pi=[0,0];Ur&&(pi=Zi,Zi=[0,0]);const Mi=(nn.metrics.left-In)*nn.scale-bi+Zi[0],Xi=(-nn.metrics.top-In)*nn.scale+Zi[1],ao=Mi+jt.w*nn.scale/Kn,Do=Xi+jt.h*nn.scale/Kn,mi=new re(Mi,Xi),Yi=new re(ao,Xi),so=new re(Mi,Do),bo=new re(ao,Do);if(Ur){const qr=new re(-bi,bi-Sy),Ri=-Math.PI/2,Xn=12-bi,qo=new re(22-Xn,-(nn.imageName?Xn:0)),Qi=new re(...pi);mi._rotateAround(Ri,qr)._add(qo)._add(Qi),Yi._rotateAround(Ri,qr)._add(qo)._add(Qi),so._rotateAround(Ri,qr)._add(qo)._add(Qi),bo._rotateAround(Ri,qr)._add(qo)._add(Qi)}if(en){const qr=Math.sin(en),Ri=Math.cos(en),Xn=[Ri,-qr,qr,Ri];mi._matMult(Xn),Yi._matMult(Xn),so._matMult(Xn),bo._matMult(Xn)}const Ao=new re(0,0),No=new re(0,0);Qt.push({tl:mi,tr:Yi,bl:so,br:bo,tex:jt,writingMode:Ge.writingMode,glyphOffset:da,sectionIndex:nn.sectionIndex,isSDF:bn,pixelOffsetTL:Ao,pixelOffsetBR:No,minFontScaleX:0,minFontScaleY:0})}return Qt}(0,h,F,C,k,O,y,d.allowVerticalPlacement),De=d.textSizeData;let Qe=null;De.kind==="source"?(Qe=[_l*C.layout.get("text-size").evaluate(O,{})],Qe[0]>yc&&z(`${d.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`)):De.kind==="composite"&&(Qe=[_l*ge.compositeTextSizes[0].evaluate(O,{},ve),_l*ge.compositeTextSizes[1].evaluate(O,{},ve)],(Qe[0]>yc||Qe[1]>yc)&&z(`${d.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`)),d.addSymbols(d.text,Ne,Qe,F,k,O,K,l,B.lineStartIndex,B.lineLength,de,ve);for(const ht of ee)ie[ht]=d.text.placedSymbolArray.length-1;return 4*Ne.length}function dR(d){for(const l in d)return d[l];return null}function XH(d,l,h,y){const C=d.compareText;if(l in C){const k=C[l];for(let O=k.length-1;O>=0;O--)if(y.dist(k[O])<h)return!0}else C[l]=[];return C[l].push(y),!1}const YH=mc.VectorTileFeature.types,QH=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}];function Ry(d,l,h,y,C,k,O,F,B,K,ee,ie,de){const ge=F?Math.min(yc,Math.round(F[0])):0,ve=F?Math.min(yc,Math.round(F[1])):0;d.emplaceBack(l,h,Math.round(32*y),Math.round(32*C),k,O,(ge<<1)+(B?1:0),ve,16*K,16*ee,256*ie,256*de)}function kw(d,l,h){d.emplaceBack(l.x,l.y,h),d.emplaceBack(l.x,l.y,h),d.emplaceBack(l.x,l.y,h),d.emplaceBack(l.x,l.y,h)}function JH(d){for(const l of d.sections)if(ay(l.text))return!0;return!1}class Mw{constructor(l){this.layoutVertexArray=new za,this.indexArray=new vo,this.programConfigurations=l,this.segments=new Zn,this.dynamicLayoutVertexArray=new la,this.opacityVertexArray=new Fa,this.placedSymbolArray=new Ut}isEmpty(){return this.layoutVertexArray.length===0&&this.indexArray.length===0&&this.dynamicLayoutVertexArray.length===0&&this.opacityVertexArray.length===0}upload(l,h,y,C){this.isEmpty()||(y&&(this.layoutVertexBuffer=l.createVertexBuffer(this.layoutVertexArray,wH.members),this.indexBuffer=l.createIndexBuffer(this.indexArray,h),this.dynamicLayoutVertexBuffer=l.createVertexBuffer(this.dynamicLayoutVertexArray,CH.members,!0),this.opacityVertexBuffer=l.createVertexBuffer(this.opacityVertexArray,QH,!0),this.opacityVertexBuffer.itemSize=1),(y||C)&&this.programConfigurations.upload(l))}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.dynamicLayoutVertexBuffer.destroy(),this.opacityVertexBuffer.destroy())}}gn("SymbolBuffers",Mw);class Rw{constructor(l,h,y){this.layoutVertexArray=new l,this.layoutAttributes=h,this.indexArray=new y,this.segments=new Zn,this.collisionVertexArray=new Wo}upload(l){this.layoutVertexBuffer=l.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=l.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=l.createVertexBuffer(this.collisionVertexArray,SH.members,!0)}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy())}}gn("CollisionBuffers",Rw);class xf{constructor(l){this.collisionBoxArray=l.collisionBoxArray,this.zoom=l.zoom,this.overscaling=l.overscaling,this.layers=l.layers,this.layerIds=this.layers.map(O=>O.id),this.index=l.index,this.pixelRatio=l.pixelRatio,this.sourceLayerIndex=l.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[],this.placementInvProjMatrix=cw([]),this.placementViewportMatrix=cw([]);const h=this.layers[0]._unevaluatedLayout._values;this.textSizeData=eR(this.zoom,h["text-size"]),this.iconSizeData=eR(this.zoom,h["icon-size"]);const y=this.layers[0].layout,C=y.get("symbol-sort-key"),k=y.get("symbol-z-order");this.canOverlap=Dw(y,"text-overlap","text-allow-overlap")!=="never"||Dw(y,"icon-overlap","icon-allow-overlap")!=="never"||y.get("text-ignore-placement")||y.get("icon-ignore-placement"),this.sortFeaturesByKey=k!=="viewport-y"&&!C.isConstant(),this.sortFeaturesByY=(k==="viewport-y"||k==="auto"&&!this.sortFeaturesByKey)&&this.canOverlap,y.get("symbol-placement")==="point"&&(this.writingModes=y.get("text-writing-mode").map(O=>a.WritingMode[O])),this.stateDependentLayerIds=this.layers.filter(O=>O.isStateDependent()).map(O=>O.id),this.sourceID=l.sourceID}createArrays(){this.text=new Mw(new Lu(this.layers,this.zoom,l=>/^text/.test(l))),this.icon=new Mw(new Lu(this.layers,this.zoom,l=>/^icon/.test(l))),this.glyphOffsetArray=new Jt,this.lineVertexArray=new fn,this.symbolInstances=new un}calculateGlyphDependencies(l,h,y,C,k){for(let O=0;O<l.length;O++)if(h[l.charCodeAt(O)]=!0,(y||C)&&k){const F=$p[l.charAt(O)];F&&(h[F.charCodeAt(0)]=!0)}}populate(l,h,y){const C=this.layers[0],k=C.layout,O=k.get("text-font"),F=k.get("text-field"),B=k.get("icon-image"),K=(F.value.kind!=="constant"||F.value.value instanceof we&&!F.value.value.isEmpty()||F.value.value.toString().length>0)&&(O.value.kind!=="constant"||O.value.value.length>0),ee=B.value.kind!=="constant"||!!B.value.value||Object.keys(B.parameters).length>0,ie=k.get("symbol-sort-key");if(this.features=[],!K&&!ee)return;const de=h.iconDependencies,ge=h.glyphDependencies,ve=h.availableImages,Ne=new Br(this.zoom);for(const{feature:De,id:Qe,index:ht,sourceLayerIndex:Ge}of l){const lt=C._featureFilter.needGeometry,Rt=Fu(De,lt);if(!C._featureFilter.filter(Ne,Rt,y))continue;let kt,hn;if(lt||(Rt.geometry=zu(De)),K){const ln=C.getValueAndResolveTokens("text-field",Rt,y,ve),en=we.factory(ln);JH(en)&&(this.hasRTLText=!0),(!this.hasRTLText||Du()==="unavailable"||this.hasRTLText&&Ko.isParsed())&&(kt=PH(en,C,Rt))}if(ee){const ln=C.getValueAndResolveTokens("icon-image",Rt,y,ve);hn=ln instanceof Le?ln:Le.fromString(ln)}if(!kt&&!hn)continue;const vn=this.sortFeaturesByKey?ie.evaluate(Rt,{},y):void 0;if(this.features.push({id:Qe,text:kt,icon:hn,index:ht,sourceLayerIndex:Ge,geometry:Rt.geometry,properties:De.properties,type:YH[De.type],sortKey:vn}),hn&&(de[hn.name]=!0),kt){const ln=O.evaluate(Rt,{},y).join(","),en=k.get("text-rotation-alignment")!=="viewport"&&k.get("symbol-placement")!=="point";this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(a.WritingMode.vertical)>=0;for(const Qt of kt.sections)if(Qt.image)de[Qt.image.name]=!0;else{const cn=sf(kt.toString()),nn=Qt.fontStack||ln,jt=ge[nn]=ge[nn]||{};this.calculateGlyphDependencies(Qt.text,jt,en,this.allowVerticalPlacement,cn)}}}k.get("symbol-placement")==="line"&&(this.features=function(De){const Qe={},ht={},Ge=[];let lt=0;function Rt(ln){Ge.push(De[ln]),lt++}function kt(ln,en,Qt){const cn=ht[ln];return delete ht[ln],ht[en]=cn,Ge[cn].geometry[0].pop(),Ge[cn].geometry[0]=Ge[cn].geometry[0].concat(Qt[0]),cn}function hn(ln,en,Qt){const cn=Qe[en];return delete Qe[en],Qe[ln]=cn,Ge[cn].geometry[0].shift(),Ge[cn].geometry[0]=Qt[0].concat(Ge[cn].geometry[0]),cn}function vn(ln,en,Qt){const cn=Qt?en[0][en[0].length-1]:en[0][0];return`${ln}:${cn.x}:${cn.y}`}for(let ln=0;ln<De.length;ln++){const en=De[ln],Qt=en.geometry,cn=en.text?en.text.toString():null;if(!cn){Rt(ln);continue}const nn=vn(cn,Qt),jt=vn(cn,Qt,!0);if(nn in ht&&jt in Qe&&ht[nn]!==Qe[jt]){const In=hn(nn,jt,Qt),bn=kt(nn,jt,Ge[In].geometry);delete Qe[nn],delete ht[jt],ht[vn(cn,Ge[bn].geometry,!0)]=bn,Ge[In].geometry=null}else nn in ht?kt(nn,jt,Qt):jt in Qe?hn(nn,jt,Qt):(Rt(ln),Qe[nn]=lt-1,ht[jt]=lt-1)}return Ge.filter(ln=>ln.geometry)}(this.features)),this.sortFeaturesByKey&&this.features.sort((De,Qe)=>De.sortKey-Qe.sortKey)}update(l,h,y){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(l,h,this.layers,y),this.icon.programConfigurations.updatePaintArrays(l,h,this.layers,y))}isEmpty(){return this.symbolInstances.length===0&&!this.hasRTLText}uploadPending(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload}upload(l){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(l),this.iconCollisionBox.upload(l)),this.text.upload(l,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(l,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0}destroyDebugData(){this.textCollisionBox.destroy(),this.iconCollisionBox.destroy()}destroy(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData()}addToLineVertexArray(l,h){const y=this.lineVertexArray.length;if(l.segment!==void 0){let C=l.dist(h[l.segment+1]),k=l.dist(h[l.segment]);const O={};for(let F=l.segment+1;F<h.length;F++)O[F]={x:h[F].x,y:h[F].y,tileUnitDistanceFromAnchor:C},F<h.length-1&&(C+=h[F+1].dist(h[F]));for(let F=l.segment||0;F>=0;F--)O[F]={x:h[F].x,y:h[F].y,tileUnitDistanceFromAnchor:k},F>0&&(k+=h[F-1].dist(h[F]));for(let F=0;F<h.length;F++){const B=O[F];this.lineVertexArray.emplaceBack(B.x,B.y,B.tileUnitDistanceFromAnchor)}}return{lineStartIndex:y,lineLength:this.lineVertexArray.length-y}}addSymbols(l,h,y,C,k,O,F,B,K,ee,ie,de){const ge=l.indexArray,ve=l.layoutVertexArray,Ne=l.segments.prepareSegment(4*h.length,ve,ge,this.canOverlap?O.sortKey:void 0),De=this.glyphOffsetArray.length,Qe=Ne.vertexLength,ht=this.allowVerticalPlacement&&F===a.WritingMode.vertical?Math.PI/2:0,Ge=O.text&&O.text.sections;for(let lt=0;lt<h.length;lt++){const{tl:Rt,tr:kt,bl:hn,br:vn,tex:ln,pixelOffsetTL:en,pixelOffsetBR:Qt,minFontScaleX:cn,minFontScaleY:nn,glyphOffset:jt,isSDF:In,sectionIndex:bn}=h[lt],Kn=Ne.vertexLength,Ar=jt[1];Ry(ve,B.x,B.y,Rt.x,Ar+Rt.y,ln.x,ln.y,y,In,en.x,en.y,cn,nn),Ry(ve,B.x,B.y,kt.x,Ar+kt.y,ln.x+ln.w,ln.y,y,In,Qt.x,en.y,cn,nn),Ry(ve,B.x,B.y,hn.x,Ar+hn.y,ln.x,ln.y+ln.h,y,In,en.x,Qt.y,cn,nn),Ry(ve,B.x,B.y,vn.x,Ar+vn.y,ln.x+ln.w,ln.y+ln.h,y,In,Qt.x,Qt.y,cn,nn),kw(l.dynamicLayoutVertexArray,B,ht),ge.emplaceBack(Kn,Kn+1,Kn+2),ge.emplaceBack(Kn+1,Kn+2,Kn+3),Ne.vertexLength+=4,Ne.primitiveLength+=2,this.glyphOffsetArray.emplaceBack(jt[0]),lt!==h.length-1&&bn===h[lt+1].sectionIndex||l.programConfigurations.populatePaintArrays(ve.length,O,O.index,{},de,Ge&&Ge[bn])}l.placedSymbolArray.emplaceBack(B.x,B.y,De,this.glyphOffsetArray.length-De,Qe,K,ee,B.segment,y?y[0]:0,y?y[1]:0,C[0],C[1],F,0,!1,0,ie)}_addCollisionDebugVertex(l,h,y,C,k,O){return h.emplaceBack(0,0),l.emplaceBack(y.x,y.y,C,k,Math.round(O.x),Math.round(O.y))}addCollisionDebugVertices(l,h,y,C,k,O,F){const B=k.segments.prepareSegment(4,k.layoutVertexArray,k.indexArray),K=B.vertexLength,ee=k.layoutVertexArray,ie=k.collisionVertexArray,de=F.anchorX,ge=F.anchorY;this._addCollisionDebugVertex(ee,ie,O,de,ge,new re(l,h)),this._addCollisionDebugVertex(ee,ie,O,de,ge,new re(y,h)),this._addCollisionDebugVertex(ee,ie,O,de,ge,new re(y,C)),this._addCollisionDebugVertex(ee,ie,O,de,ge,new re(l,C)),B.vertexLength+=4;const ve=k.indexArray;ve.emplaceBack(K,K+1),ve.emplaceBack(K+1,K+2),ve.emplaceBack(K+2,K+3),ve.emplaceBack(K+3,K),B.primitiveLength+=4}addDebugCollisionBoxes(l,h,y,C){for(let k=l;k<h;k++){const O=this.collisionBoxArray.get(k);this.addCollisionDebugVertices(O.x1,O.y1,O.x2,O.y2,C?this.textCollisionBox:this.iconCollisionBox,O.anchorPoint,y)}}generateCollisionDebugBuffers(){this.hasDebugData()&&this.destroyDebugData(),this.textCollisionBox=new Rw(Vs,BM.members,hs),this.iconCollisionBox=new Rw(Vs,BM.members,hs);for(let l=0;l<this.symbolInstances.length;l++){const h=this.symbolInstances.get(l);this.addDebugCollisionBoxes(h.textBoxStartIndex,h.textBoxEndIndex,h,!0),this.addDebugCollisionBoxes(h.verticalTextBoxStartIndex,h.verticalTextBoxEndIndex,h,!0),this.addDebugCollisionBoxes(h.iconBoxStartIndex,h.iconBoxEndIndex,h,!1),this.addDebugCollisionBoxes(h.verticalIconBoxStartIndex,h.verticalIconBoxEndIndex,h,!1)}}_deserializeCollisionBoxesForSymbol(l,h,y,C,k,O,F,B,K){const ee={};for(let ie=h;ie<y;ie++){const de=l.get(ie);ee.textBox={x1:de.x1,y1:de.y1,x2:de.x2,y2:de.y2,anchorPointX:de.anchorPointX,anchorPointY:de.anchorPointY},ee.textFeatureIndex=de.featureIndex;break}for(let ie=C;ie<k;ie++){const de=l.get(ie);ee.verticalTextBox={x1:de.x1,y1:de.y1,x2:de.x2,y2:de.y2,anchorPointX:de.anchorPointX,anchorPointY:de.anchorPointY},ee.verticalTextFeatureIndex=de.featureIndex;break}for(let ie=O;ie<F;ie++){const de=l.get(ie);ee.iconBox={x1:de.x1,y1:de.y1,x2:de.x2,y2:de.y2,anchorPointX:de.anchorPointX,anchorPointY:de.anchorPointY},ee.iconFeatureIndex=de.featureIndex;break}for(let ie=B;ie<K;ie++){const de=l.get(ie);ee.verticalIconBox={x1:de.x1,y1:de.y1,x2:de.x2,y2:de.y2,anchorPointX:de.anchorPointX,anchorPointY:de.anchorPointY},ee.verticalIconFeatureIndex=de.featureIndex;break}return ee}deserializeCollisionBoxes(l){this.collisionArrays=[];for(let h=0;h<this.symbolInstances.length;h++){const y=this.symbolInstances.get(h);this.collisionArrays.push(this._deserializeCollisionBoxesForSymbol(l,y.textBoxStartIndex,y.textBoxEndIndex,y.verticalTextBoxStartIndex,y.verticalTextBoxEndIndex,y.iconBoxStartIndex,y.iconBoxEndIndex,y.verticalIconBoxStartIndex,y.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(l,h){const y=l.placedSymbolArray.get(h),C=y.vertexStartIndex+4*y.numGlyphs;for(let k=y.vertexStartIndex;k<C;k+=4)l.indexArray.emplaceBack(k,k+1,k+2),l.indexArray.emplaceBack(k+1,k+2,k+3)}getSortedSymbolIndexes(l){if(this.sortedAngle===l&&this.symbolInstanceIndexes!==void 0)return this.symbolInstanceIndexes;const h=Math.sin(l),y=Math.cos(l),C=[],k=[],O=[];for(let F=0;F<this.symbolInstances.length;++F){O.push(F);const B=this.symbolInstances.get(F);C.push(0|Math.round(h*B.anchorX+y*B.anchorY)),k.push(B.featureIndex)}return O.sort((F,B)=>C[F]-C[B]||k[B]-k[F]),O}addToSortKeyRanges(l,h){const y=this.sortKeyRanges[this.sortKeyRanges.length-1];y&&y.sortKey===h?y.symbolInstanceEnd=l+1:this.sortKeyRanges.push({sortKey:h,symbolInstanceStart:l,symbolInstanceEnd:l+1})}sortFeatures(l){if(this.sortFeaturesByY&&this.sortedAngle!==l&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(l),this.sortedAngle=l,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(const h of this.symbolInstanceIndexes){const y=this.symbolInstances.get(h);this.featureSortOrder.push(y.featureIndex),[y.rightJustifiedTextSymbolIndex,y.centerJustifiedTextSymbolIndex,y.leftJustifiedTextSymbolIndex].forEach((C,k,O)=>{C>=0&&O.indexOf(C)===k&&this.addIndicesForPlacedSymbol(this.text,C)}),y.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,y.verticalPlacedTextSymbolIndex),y.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,y.placedIconSymbolIndex),y.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,y.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}gn("SymbolBucket",xf,{omit:["layers","collisionBoxArray","features","compareText"]}),xf.MAX_GLYPHS=65535,xf.addDynamicAttributes=kw;const eK=new Fi({"symbol-placement":new xn(Fe.layout_symbol["symbol-placement"]),"symbol-spacing":new xn(Fe.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new xn(Fe.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new Rn(Fe.layout_symbol["symbol-sort-key"]),"symbol-z-order":new xn(Fe.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new xn(Fe.layout_symbol["icon-allow-overlap"]),"icon-overlap":new xn(Fe.layout_symbol["icon-overlap"]),"icon-ignore-placement":new xn(Fe.layout_symbol["icon-ignore-placement"]),"icon-optional":new xn(Fe.layout_symbol["icon-optional"]),"icon-rotation-alignment":new xn(Fe.layout_symbol["icon-rotation-alignment"]),"icon-size":new Rn(Fe.layout_symbol["icon-size"]),"icon-text-fit":new xn(Fe.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new xn(Fe.layout_symbol["icon-text-fit-padding"]),"icon-image":new Rn(Fe.layout_symbol["icon-image"]),"icon-rotate":new Rn(Fe.layout_symbol["icon-rotate"]),"icon-padding":new Rn(Fe.layout_symbol["icon-padding"]),"icon-keep-upright":new xn(Fe.layout_symbol["icon-keep-upright"]),"icon-offset":new Rn(Fe.layout_symbol["icon-offset"]),"icon-anchor":new Rn(Fe.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new xn(Fe.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new xn(Fe.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new xn(Fe.layout_symbol["text-rotation-alignment"]),"text-field":new Rn(Fe.layout_symbol["text-field"]),"text-font":new Rn(Fe.layout_symbol["text-font"]),"text-size":new Rn(Fe.layout_symbol["text-size"]),"text-max-width":new Rn(Fe.layout_symbol["text-max-width"]),"text-line-height":new xn(Fe.layout_symbol["text-line-height"]),"text-letter-spacing":new Rn(Fe.layout_symbol["text-letter-spacing"]),"text-justify":new Rn(Fe.layout_symbol["text-justify"]),"text-radial-offset":new Rn(Fe.layout_symbol["text-radial-offset"]),"text-variable-anchor":new xn(Fe.layout_symbol["text-variable-anchor"]),"text-anchor":new Rn(Fe.layout_symbol["text-anchor"]),"text-max-angle":new xn(Fe.layout_symbol["text-max-angle"]),"text-writing-mode":new xn(Fe.layout_symbol["text-writing-mode"]),"text-rotate":new Rn(Fe.layout_symbol["text-rotate"]),"text-padding":new xn(Fe.layout_symbol["text-padding"]),"text-keep-upright":new xn(Fe.layout_symbol["text-keep-upright"]),"text-transform":new Rn(Fe.layout_symbol["text-transform"]),"text-offset":new Rn(Fe.layout_symbol["text-offset"]),"text-allow-overlap":new xn(Fe.layout_symbol["text-allow-overlap"]),"text-overlap":new xn(Fe.layout_symbol["text-overlap"]),"text-ignore-placement":new xn(Fe.layout_symbol["text-ignore-placement"]),"text-optional":new xn(Fe.layout_symbol["text-optional"])});var Ow={paint:new Fi({"icon-opacity":new Rn(Fe.paint_symbol["icon-opacity"]),"icon-color":new Rn(Fe.paint_symbol["icon-color"]),"icon-halo-color":new Rn(Fe.paint_symbol["icon-halo-color"]),"icon-halo-width":new Rn(Fe.paint_symbol["icon-halo-width"]),"icon-halo-blur":new Rn(Fe.paint_symbol["icon-halo-blur"]),"icon-translate":new xn(Fe.paint_symbol["icon-translate"]),"icon-translate-anchor":new xn(Fe.paint_symbol["icon-translate-anchor"]),"text-opacity":new Rn(Fe.paint_symbol["text-opacity"]),"text-color":new Rn(Fe.paint_symbol["text-color"],{runtimeType:En,getOverride:d=>d.textColor,hasOverride:d=>!!d.textColor}),"text-halo-color":new Rn(Fe.paint_symbol["text-halo-color"]),"text-halo-width":new Rn(Fe.paint_symbol["text-halo-width"]),"text-halo-blur":new Rn(Fe.paint_symbol["text-halo-blur"]),"text-translate":new xn(Fe.paint_symbol["text-translate"]),"text-translate-anchor":new xn(Fe.paint_symbol["text-translate-anchor"])}),layout:eK};class fR{constructor(l){if(l.property.overrides===void 0)throw new Error("overrides must be provided to instantiate FormatSectionOverride class");this.type=l.property.overrides?l.property.overrides.runtimeType:pn,this.defaultValue=l}evaluate(l){if(l.formattedSection){const h=this.defaultValue.property.overrides;if(h&&h.hasOverride(l.formattedSection))return h.getOverride(l.formattedSection)}return l.feature&&l.featureState?this.defaultValue.evaluate(l.feature,l.featureState):this.defaultValue.property.specification.default}eachChild(l){this.defaultValue.isConstant()||l(this.defaultValue.value._styleExpression.expression)}outputDefined(){return!1}serialize(){return null}}gn("FormatSectionOverride",fR,{omit:["defaultValue"]});class Oy extends La{constructor(l){super(l,Ow)}recalculate(l,h){if(super.recalculate(l,h),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")==="map"?"map":"viewport"),this.layout.get("icon-pitch-alignment")==="auto"&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),this.layout.get("symbol-placement")==="point"){const y=this.layout.get("text-writing-mode");if(y){const C=[];for(const k of y)C.indexOf(k)<0&&C.push(k);this.layout._values["text-writing-mode"]=C}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(l,h,y,C){const k=this.layout.get(l).evaluate(h,{},y,C),O=this._unevaluatedLayout._values[l];return O.isDataDriven()||bu(O.value)||!k?k:function(F,B){return B.replace(/{([^{}]+)}/g,(K,ee)=>ee in F?String(F[ee]):"")}(h.properties,k)}createBucket(l){return new xf(l)}queryRadius(){return 0}queryIntersectsFeature(){throw new Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(const l of Ow.paint.overridableProperties){if(!Oy.hasPaintOverride(this.layout,l))continue;const h=this.paint.get(l),y=new fR(h),C=new ef(y,h.property.specification);let k=null;k=h.value.kind==="constant"||h.value.kind==="source"?new wu("source",C):new hp("composite",C,h.value.zoomStops),this.paint._values[l]=new Na(h.property,k,h.parameters)}}_handleOverridablePaintPropertyUpdate(l,h,y){return!(!this.layout||h.isDataDriven()||y.isDataDriven())&&Oy.hasPaintOverride(this.layout,l)}static hasPaintOverride(l,h){const y=l.get("text-field"),C=Ow.paint.properties[h];let k=!1;const O=F=>{for(const B of F)if(C.overrides&&C.overrides.hasOverride(B))return void(k=!0)};if(y.value.kind==="constant"&&y.value.value instanceof we)O(y.value.value.sections);else if(y.value.kind==="source"){const F=K=>{k||(K instanceof Et&&Ve(K.value)===_n?O(K.value.sections):K instanceof Qd?O(K.sections):K.eachChild(F))},B=y.value;B._styleExpression&&F(B._styleExpression.expression)}return k}}function Dw(d,l,h){let y="never";const C=d.get(l);return C?y=C:d.get(h)&&(y="always"),y}var tK={paint:new Fi({"background-color":new xn(Fe.paint_background["background-color"]),"background-pattern":new Ep(Fe.paint_background["background-pattern"]),"background-opacity":new xn(Fe.paint_background["background-opacity"])})},nK={paint:new Fi({"raster-opacity":new xn(Fe.paint_raster["raster-opacity"]),"raster-hue-rotate":new xn(Fe.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new xn(Fe.paint_raster["raster-brightness-min"]),"raster-brightness-max":new xn(Fe.paint_raster["raster-brightness-max"]),"raster-saturation":new xn(Fe.paint_raster["raster-saturation"]),"raster-contrast":new xn(Fe.paint_raster["raster-contrast"]),"raster-resampling":new xn(Fe.paint_raster["raster-resampling"]),"raster-fade-duration":new xn(Fe.paint_raster["raster-fade-duration"])})};class rK extends La{constructor(l){super(l,{}),this.onAdd=h=>{this.implementation.onAdd&&this.implementation.onAdd(h,h.painter.context.gl)},this.onRemove=h=>{this.implementation.onRemove&&this.implementation.onRemove(h,h.painter.context.gl)},this.implementation=l}is3D(){return this.implementation.renderingMode==="3d"}hasOffscreenPass(){return this.implementation.prerender!==void 0}recalculate(){}updateTransitions(){}hasTransition(){return!1}serialize(){throw new Error("Custom layers cannot be serialized")}}const iK={circle:class extends La{constructor(d){super(d,N9)}createBucket(d){return new aw(d)}queryRadius(d){const l=d;return Mp("circle-radius",this,l)+Mp("circle-stroke-width",this,l)+my(this.paint.get("circle-translate"))}queryIntersectsFeature(d,l,h,y,C,k,O,F){const B=gy(d,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),k.angle,O),K=this.paint.get("circle-radius").evaluate(l,h)+this.paint.get("circle-stroke-width").evaluate(l,h),ee=this.paint.get("circle-pitch-alignment")==="map",ie=ee?B:function(ge,ve){return ge.map(Ne=>CM(Ne,ve))}(B,F),de=ee?K*O:K;for(const ge of y)for(const ve of ge){const Ne=ee?ve:CM(ve,F);let De=de;const Qe=vy([],[ve.x,ve.y,0,1],F);if(this.paint.get("circle-pitch-scale")==="viewport"&&this.paint.get("circle-pitch-alignment")==="map"?De*=Qe[3]/k.cameraToCenterDistance:this.paint.get("circle-pitch-scale")==="map"&&this.paint.get("circle-pitch-alignment")==="viewport"&&(De*=k.cameraToCenterDistance/Qe[3]),M9(ie,Ne,De))return!0}return!1}},heatmap:class extends La{constructor(d){super(d,z9),this._updateColorRamp()}createBucket(d){return new SM(d)}_handleSpecialPaintPropertyUpdate(d){d==="heatmap-color"&&this._updateColorRamp()}_updateColorRamp(){this.colorRamp=PM({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(){return 0}queryIntersectsFeature(){return!1}hasOffscreenPass(){return this.paint.get("heatmap-opacity")!==0&&this.visibility!=="none"}},hillshade:class extends La{constructor(d){super(d,F9)}hasOffscreenPass(){return this.paint.get("hillshade-exaggeration")!==0&&this.visibility!=="none"}},fill:class extends La{constructor(d){super(d,eH)}recalculate(d,l){super.recalculate(d,l);const h=this.paint._values["fill-outline-color"];h.value.kind==="constant"&&h.value.value===void 0&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])}createBucket(d){return new yw(d)}queryRadius(){return my(this.paint.get("fill-translate"))}queryIntersectsFeature(d,l,h,y,C,k,O){return mM(gy(d,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),k.angle,O),y)}isTileClipped(){return!0}},"fill-extrusion":class extends La{constructor(d){super(d,pH)}createBucket(d){return new bw(d)}queryRadius(){return my(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature(d,l,h,y,C,k,O,F){const B=gy(d,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),k.angle,O),K=this.paint.get("fill-extrusion-height").evaluate(l,h),ee=this.paint.get("fill-extrusion-base").evaluate(l,h),ie=function(ge,ve,Ne,De){const Qe=[];for(const ht of ge){const Ge=[ht.x,ht.y,0,1];vy(Ge,Ge,ve),Qe.push(new re(Ge[0]/Ge[3],Ge[1]/Ge[3]))}return Qe}(B,F),de=function(ge,ve,Ne,De){const Qe=[],ht=[],Ge=De[8]*ve,lt=De[9]*ve,Rt=De[10]*ve,kt=De[11]*ve,hn=De[8]*Ne,vn=De[9]*Ne,ln=De[10]*Ne,en=De[11]*Ne;for(const Qt of ge){const cn=[],nn=[];for(const jt of Qt){const In=jt.x,bn=jt.y,Kn=De[0]*In+De[4]*bn+De[12],Ar=De[1]*In+De[5]*bn+De[13],Ur=De[2]*In+De[6]*bn+De[14],bi=De[3]*In+De[7]*bn+De[15],da=Ur+Rt,Zi=bi+kt,pi=Kn+hn,Mi=Ar+vn,Xi=Ur+ln,ao=bi+en,Do=new re((Kn+Ge)/Zi,(Ar+lt)/Zi);Do.z=da/Zi,cn.push(Do);const mi=new re(pi/ao,Mi/ao);mi.z=Xi/ao,nn.push(mi)}Qe.push(cn),ht.push(nn)}return[Qe,ht]}(y,ee,K,F);return function(ge,ve,Ne){let De=1/0;mM(Ne,ve)&&(De=NM(Ne,ve[0]));for(let Qe=0;Qe<ve.length;Qe++){const ht=ve[Qe],Ge=ge[Qe];for(let lt=0;lt<ht.length-1;lt++){const Rt=ht[lt],kt=[Rt,ht[lt+1],Ge[lt+1],Ge[lt],Rt];pM(Ne,kt)&&(De=Math.min(De,NM(Ne,kt)))}}return De!==1/0&&De}(de[0],de[1],ie)}},line:class extends La{constructor(d){super(d,zM),this.gradientVersion=0}_handleSpecialPaintPropertyUpdate(d){d==="line-gradient"&&(this.stepInterpolant=this._transitionablePaint._values["line-gradient"].value.expression._styleExpression.expression instanceof cs,this.gradientVersion=(this.gradientVersion+1)%Number.MAX_SAFE_INTEGER)}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(d,l){super.recalculate(d,l),this.paint._values["line-floorwidth"]=FM.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,d)}createBucket(d){return new _w(d)}queryRadius(d){const l=d,h=$M(Mp("line-width",this,l),Mp("line-gap-width",this,l)),y=Mp("line-offset",this,l);return h/2+Math.abs(y)+my(this.paint.get("line-translate"))}queryIntersectsFeature(d,l,h,y,C,k,O){const F=gy(d,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),k.angle,O),B=O/2*$M(this.paint.get("line-width").evaluate(l,h),this.paint.get("line-gap-width").evaluate(l,h)),K=this.paint.get("line-offset").evaluate(l,h);return K&&(y=function(ee,ie){const de=[];for(let ge=0;ge<ee.length;ge++){const ve=ee[ge],Ne=[];for(let De=0;De<ve.length;De++){const Qe=ve[De-1],ht=ve[De],Ge=ve[De+1],lt=De===0?new re(0,0):ht.sub(Qe)._unit()._perp(),Rt=De===ve.length-1?new re(0,0):Ge.sub(ht)._unit()._perp(),kt=lt._add(Rt)._unit(),hn=kt.x*Rt.x+kt.y*Rt.y;hn!==0&&kt._mult(1/hn),Ne.push(kt._mult(ie)._add(ht))}de.push(Ne)}return de}(y,K*O)),function(ee,ie,de){for(let ge=0;ge<ie.length;ge++){const ve=ie[ge];if(ee.length>=3){for(let Ne=0;Ne<ve.length;Ne++)if(ff(ee,ve[Ne]))return!0}if(R9(ee,ve,de))return!0}return!1}(F,y,B)}isTileClipped(){return!0}},symbol:Oy,background:class extends La{constructor(d){super(d,tK)}},raster:class extends La{constructor(d){super(d,nK)}}};class oK{constructor(l){this._callback=l,this._triggered=!1,typeof MessageChannel<"u"&&(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(){delete this._channel,this._callback=()=>{}}}const hR=63710088e-1;class ri{constructor(l,h){if(isNaN(l)||isNaN(h))throw new Error(`Invalid LngLat object: (${l}, ${h})`);if(this.lng=+l,this.lat=+h,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new ri(b(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(l){const h=Math.PI/180,y=this.lat*h,C=l.lat*h,k=Math.sin(y)*Math.sin(C)+Math.cos(y)*Math.cos(C)*Math.cos((l.lng-this.lng)*h);return hR*Math.acos(Math.min(k,1))}toBounds(l=0){const h=360*l/40075017,y=h/Math.cos(Math.PI/180*this.lat);return new Bu(new ri(this.lng-y,this.lat-h),new ri(this.lng+y,this.lat+h))}static convert(l){if(l instanceof ri)return l;if(Array.isArray(l)&&(l.length===2||l.length===3))return new ri(Number(l[0]),Number(l[1]));if(!Array.isArray(l)&&typeof l=="object"&&l!==null)return new ri(Number("lng"in l?l.lng:l.lon),Number(l.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: <lng>, lat: <lat>}, an object {lon: <lng>, lat: <lat>}, or an array of [<lng>, <lat>]")}}class Bu{constructor(l,h){l&&(h?this.setSouthWest(l).setNorthEast(h):l.length===4?this.setSouthWest([l[0],l[1]]).setNorthEast([l[2],l[3]]):this.setSouthWest(l[0]).setNorthEast(l[1]))}setNorthEast(l){return this._ne=l instanceof ri?new ri(l.lng,l.lat):ri.convert(l),this}setSouthWest(l){return this._sw=l instanceof ri?new ri(l.lng,l.lat):ri.convert(l),this}extend(l){const h=this._sw,y=this._ne;let C,k;if(l instanceof ri)C=l,k=l;else{if(!(l instanceof Bu))return Array.isArray(l)?l.length===4||l.every(Array.isArray)?this.extend(Bu.convert(l)):this.extend(ri.convert(l)):this;if(C=l._sw,k=l._ne,!C||!k)return this}return h||y?(h.lng=Math.min(C.lng,h.lng),h.lat=Math.min(C.lat,h.lat),y.lng=Math.max(k.lng,y.lng),y.lat=Math.max(k.lat,y.lat)):(this._sw=new ri(C.lng,C.lat),this._ne=new ri(k.lng,k.lat)),this}getCenter(){return new ri((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 ri(this.getWest(),this.getNorth())}getSouthEast(){return new ri(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(l){const{lng:h,lat:y}=ri.convert(l);let C=this._sw.lng<=h&&h<=this._ne.lng;return this._sw.lng>this._ne.lng&&(C=this._sw.lng>=h&&h>=this._ne.lng),this._sw.lat<=y&&y<=this._ne.lat&&C}static convert(l){return l instanceof Bu?l:l&&new Bu(l)}}const pR=2*Math.PI*hR;function mR(d){return pR*Math.cos(d*Math.PI/180)}function gR(d){return(180+d)/360}function vR(d){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+d*Math.PI/360)))/360}function yR(d,l){return d/mR(l)}function Aw(d){return 360/Math.PI*Math.atan(Math.exp((180-360*d)*Math.PI/180))-90}class Dy{constructor(l,h,y=0){this.x=+l,this.y=+h,this.z=+y}static fromLngLat(l,h=0){const y=ri.convert(l);return new Dy(gR(y.lng),vR(y.lat),yR(h,y.lat))}toLngLat(){return new ri(360*this.x-180,Aw(this.y))}toAltitude(){return this.z*mR(Aw(this.y))}meterInMercatorCoordinateUnits(){return 1/pR*(l=Aw(this.y),1/Math.cos(l*Math.PI/180));var l}}function xR(d,l,h){var y=2*Math.PI*6378137/256/Math.pow(2,h);return[d*y-2*Math.PI*6378137/2,l*y-2*Math.PI*6378137/2]}class Nw{constructor(l,h,y){if(l<0||l>25||y<0||y>=Math.pow(2,l)||h<0||h>=Math.pow(2,l))throw new Error(`x=${h}, y=${y}, z=${l} outside of bounds. 0<=x<${Math.pow(2,l)}, 0<=y<${Math.pow(2,l)} 0<=z<=25 `);this.z=l,this.x=h,this.y=y,this.key=Vp(0,l,l,h,y)}equals(l){return this.z===l.z&&this.x===l.x&&this.y===l.y}url(l,h,y){const C=(O=this.y,F=this.z,B=xR(256*(k=this.x),256*(O=Math.pow(2,F)-O-1),F),K=xR(256*(k+1),256*(O+1),F),B[0]+","+B[1]+","+K[0]+","+K[1]);var k,O,F,B,K;const ee=function(ie,de,ge){let ve,Ne="";for(let De=ie;De>0;De--)ve=1<<De-1,Ne+=(de&ve?1:0)+(ge&ve?2:0);return Ne}(this.z,this.x,this.y);return l[(this.x+this.y)%l.length].replace(/{prefix}/g,(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(y==="tms"?Math.pow(2,this.z)-this.y-1:this.y)).replace(/{ratio}/g,h>1?"@2x":"").replace(/{quadkey}/g,ee).replace(/{bbox-epsg-3857}/g,C)}isChildOf(l){const h=this.z-l.z;return h>0&&l.x===this.x>>h&&l.y===this.y>>h}getTilePoint(l){const h=Math.pow(2,this.z);return new re((l.x*h-this.x)*xi,(l.y*h-this.y)*xi)}toString(){return`${this.z}/${this.x}/${this.y}`}}class bR{constructor(l,h){this.wrap=l,this.canonical=h,this.key=Vp(l,h.z,h.z,h.x,h.y)}}class ua{constructor(l,h,y,C,k){if(l<y)throw new Error(`overscaledZ should be >= z; overscaledZ = ${l}; z = ${y}`);this.overscaledZ=l,this.wrap=h,this.canonical=new Nw(y,+C,+k),this.key=Vp(h,l,y,C,k)}clone(){return new ua(this.overscaledZ,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)}equals(l){return this.overscaledZ===l.overscaledZ&&this.wrap===l.wrap&&this.canonical.equals(l.canonical)}scaledTo(l){if(l>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${l}; overscaledZ = ${this.overscaledZ}`);const h=this.canonical.z-l;return l>this.canonical.z?new ua(l,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new ua(l,this.wrap,l,this.canonical.x>>h,this.canonical.y>>h)}calculateScaledKey(l,h){if(l>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${l}; overscaledZ = ${this.overscaledZ}`);const y=this.canonical.z-l;return l>this.canonical.z?Vp(this.wrap*+h,l,this.canonical.z,this.canonical.x,this.canonical.y):Vp(this.wrap*+h,l,l,this.canonical.x>>y,this.canonical.y>>y)}isChildOf(l){if(l.wrap!==this.wrap)return!1;const h=this.canonical.z-l.canonical.z;return l.overscaledZ===0||l.overscaledZ<this.overscaledZ&&l.canonical.x===this.canonical.x>>h&&l.canonical.y===this.canonical.y>>h}children(l){if(this.overscaledZ>=l)return[new ua(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];const h=this.canonical.z+1,y=2*this.canonical.x,C=2*this.canonical.y;return[new ua(h,this.wrap,h,y,C),new ua(h,this.wrap,h,y+1,C),new ua(h,this.wrap,h,y,C+1),new ua(h,this.wrap,h,y+1,C+1)]}isLessThan(l){return this.wrap<l.wrap||!(this.wrap>l.wrap)&&(this.overscaledZ<l.overscaledZ||!(this.overscaledZ>l.overscaledZ)&&(this.canonical.x<l.canonical.x||!(this.canonical.x>l.canonical.x)&&this.canonical.y<l.canonical.y))}wrapped(){return new ua(this.overscaledZ,0,this.canonical.z,this.canonical.x,this.canonical.y)}unwrapTo(l){return new ua(this.overscaledZ,l,this.canonical.z,this.canonical.x,this.canonical.y)}overscaleFactor(){return Math.pow(2,this.overscaledZ-this.canonical.z)}toUnwrapped(){return new bR(this.wrap,this.canonical)}toString(){return`${this.overscaledZ}/${this.canonical.x}/${this.canonical.y}`}getTilePoint(l){return this.canonical.getTilePoint(new Dy(l.x-this.wrap,l.y))}}function Vp(d,l,h,y,C){(d*=2)<0&&(d=-1*d-1);const k=1<<h;return(k*k*d+k*C+y).toString(36)+h.toString(36)+l.toString(36)}gn("CanonicalTileID",Nw),gn("OverscaledTileID",ua,{omit:["posMatrix"]});class _R{constructor(l,h,y){if(this.uid=l,h.height!==h.width)throw new RangeError("DEM tiles must be square");if(y&&y!=="mapbox"&&y!=="terrarium")return void z(`"${y}" is not a valid encoding type. Valid types include "mapbox" and "terrarium".`);this.stride=h.height;const C=this.dim=h.height-2;this.data=new Uint32Array(h.data.buffer),this.encoding=y||"mapbox";for(let k=0;k<C;k++)this.data[this._idx(-1,k)]=this.data[this._idx(0,k)],this.data[this._idx(C,k)]=this.data[this._idx(C-1,k)],this.data[this._idx(k,-1)]=this.data[this._idx(k,0)],this.data[this._idx(k,C)]=this.data[this._idx(k,C-1)];this.data[this._idx(-1,-1)]=this.data[this._idx(0,0)],this.data[this._idx(C,-1)]=this.data[this._idx(C-1,0)],this.data[this._idx(-1,C)]=this.data[this._idx(0,C-1)],this.data[this._idx(C,C)]=this.data[this._idx(C-1,C-1)],this.min=Number.MAX_SAFE_INTEGER,this.max=Number.MIN_SAFE_INTEGER;for(let k=0;k<C;k++)for(let O=0;O<C;O++){const F=this.get(k,O);F>this.max&&(this.max=F),F<this.min&&(this.min=F)}}get(l,h){const y=new Uint8Array(this.data.buffer),C=4*this._idx(l,h);return(this.encoding==="terrarium"?this._unpackTerrarium:this._unpackMapbox)(y[C],y[C+1],y[C+2])}getUnpackVector(){return this.encoding==="terrarium"?[256,1,1/256,32768]:[6553.6,25.6,.1,1e4]}_idx(l,h){if(l<-1||l>=this.dim+1||h<-1||h>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(h+1)*this.stride+(l+1)}_unpackMapbox(l,h,y){return(256*l*256+256*h+y)/10-1e4}_unpackTerrarium(l,h,y){return 256*l+h+y/256-32768}getPixels(){return new ca({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))}backfillBorder(l,h,y){if(this.dim!==l.dim)throw new Error("dem dimension mismatch");let C=h*this.dim,k=h*this.dim+this.dim,O=y*this.dim,F=y*this.dim+this.dim;switch(h){case-1:C=k-1;break;case 1:k=C+1}switch(y){case-1:O=F-1;break;case 1:F=O+1}const B=-h*this.dim,K=-y*this.dim;for(let ee=O;ee<F;ee++)for(let ie=C;ie<k;ie++)this.data[this._idx(ie,ee)]=l.data[this._idx(ie+B,ee+K)]}}gn("DEMData",_R);class wR{constructor(l){this._stringToNumber={},this._numberToString=[];for(let h=0;h<l.length;h++){const y=l[h];this._stringToNumber[y]=h,this._numberToString[h]=y}}encode(l){return this._stringToNumber[l]}decode(l){if(l>=this._numberToString.length)throw new Error(`Out of bounds. Index requested n=${l} can't be >= this._numberToString.length ${this._numberToString.length}`);return this._numberToString[l]}}class CR{constructor(l,h,y,C,k){this.type="Feature",this._vectorTileFeature=l,l._z=h,l._x=y,l._y=C,this.properties=l.properties,this.id=k}get geometry(){return this._geometry===void 0&&(this._geometry=this._vectorTileFeature.toGeoJSON(this._vectorTileFeature._x,this._vectorTileFeature._y,this._vectorTileFeature._z).geometry),this._geometry}set geometry(l){this._geometry=l}toJSON(){const l={geometry:this.geometry};for(const h in this)h!=="_geometry"&&h!=="_vectorTileFeature"&&(l[h]=this[h]);return l}}class SR{constructor(l,h){this.tileID=l,this.x=l.canonical.x,this.y=l.canonical.y,this.z=l.canonical.z,this.grid=new Ou(xi,16,0),this.grid3D=new Ou(xi,16,0),this.featureIndexArray=new Hn,this.promoteId=h}insert(l,h,y,C,k,O){const F=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(y,C,k);const B=O?this.grid3D:this.grid;for(let K=0;K<h.length;K++){const ee=h[K],ie=[1/0,1/0,-1/0,-1/0];for(let de=0;de<ee.length;de++){const ge=ee[de];ie[0]=Math.min(ie[0],ge.x),ie[1]=Math.min(ie[1],ge.y),ie[2]=Math.max(ie[2],ge.x),ie[3]=Math.max(ie[3],ge.y)}ie[0]<xi&&ie[1]<xi&&ie[2]>=0&&ie[3]>=0&&B.insert(F,ie[0],ie[1],ie[2],ie[3])}}loadVTLayers(){return this.vtLayers||(this.vtLayers=new mc.VectorTile(new ww(this.rawTileData)).layers,this.sourceLayerCoder=new wR(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers}query(l,h,y,C){this.loadVTLayers();const k=l.params||{},O=xi/l.tileSize/l.scale,F=rf(k.filter),B=l.queryGeometry,K=l.queryPadding*O,ee=PR(B),ie=this.grid.query(ee.minX-K,ee.minY-K,ee.maxX+K,ee.maxY+K),de=PR(l.cameraQueryGeometry),ge=this.grid3D.query(de.minX-K,de.minY-K,de.maxX+K,de.maxY+K,(De,Qe,ht,Ge)=>function(lt,Rt,kt,hn,vn){for(const en of lt)if(Rt<=en.x&&kt<=en.y&&hn>=en.x&&vn>=en.y)return!0;const ln=[new re(Rt,kt),new re(Rt,vn),new re(hn,vn),new re(hn,kt)];if(lt.length>2){for(const en of ln)if(ff(lt,en))return!0}for(let en=0;en<lt.length-1;en++)if(D9(lt[en],lt[en+1],ln))return!0;return!1}(l.cameraQueryGeometry,De-K,Qe-K,ht+K,Ge+K));for(const De of ge)ie.push(De);ie.sort(aK);const ve={};let Ne;for(let De=0;De<ie.length;De++){const Qe=ie[De];if(Qe===Ne)continue;Ne=Qe;const ht=this.featureIndexArray.get(Qe);let Ge=null;this.loadMatchingFeature(ve,ht.bucketIndex,ht.sourceLayerIndex,ht.featureIndex,F,k.layers,k.availableImages,h,y,C,(lt,Rt,kt)=>(Ge||(Ge=zu(lt)),Rt.queryIntersectsFeature(B,lt,kt,Ge,this.z,l.transform,O,l.pixelPosMatrix)))}return ve}loadMatchingFeature(l,h,y,C,k,O,F,B,K,ee,ie){const de=this.bucketLayerIDs[h];if(O&&!function(De,Qe){for(let ht=0;ht<De.length;ht++)if(Qe.indexOf(De[ht])>=0)return!0;return!1}(O,de))return;const ge=this.sourceLayerCoder.decode(y),ve=this.vtLayers[ge].feature(C);if(k.needGeometry){const De=Fu(ve,!0);if(!k.filter(new Br(this.tileID.overscaledZ),De,this.tileID.canonical))return}else if(!k.filter(new Br(this.tileID.overscaledZ),ve))return;const Ne=this.getId(ve,ge);for(let De=0;De<de.length;De++){const Qe=de[De];if(O&&O.indexOf(Qe)<0)continue;const ht=B[Qe];if(!ht)continue;let Ge={};Ne&&ee&&(Ge=ee.getState(ht.sourceLayer||"_geojsonTileLayer",Ne));const lt=_({},K[Qe]);lt.paint=ER(lt.paint,ht.paint,ve,Ge,F),lt.layout=ER(lt.layout,ht.layout,ve,Ge,F);const Rt=!ie||ie(ve,ht,Ge);if(!Rt)continue;const kt=new CR(ve,this.z,this.x,this.y,Ne);kt.layer=lt;let hn=l[Qe];hn===void 0&&(hn=l[Qe]=[]),hn.push({featureIndex:C,feature:kt,intersectionZ:Rt})}}lookupSymbolFeatures(l,h,y,C,k,O,F,B){const K={};this.loadVTLayers();const ee=rf(k);for(const ie of l)this.loadMatchingFeature(K,y,C,ie,ee,O,F,B,h);return K}hasLayer(l){for(const h of this.bucketLayerIDs)for(const y of h)if(l===y)return!0;return!1}getId(l,h){let y=l.id;return this.promoteId&&(y=l.properties[typeof this.promoteId=="string"?this.promoteId:this.promoteId[h]],typeof y=="boolean"&&(y=Number(y))),y}}function ER(d,l,h,y,C){return P(d,(k,O)=>{const F=l instanceof Nu?l.get(O):null;return F&&F.evaluate?F.evaluate(h,y,C):F})}function PR(d){let l=1/0,h=1/0,y=-1/0,C=-1/0;for(const k of d)l=Math.min(l,k.x),h=Math.min(h,k.y),y=Math.max(y,k.x),C=Math.max(C,k.y);return{minX:l,minY:h,maxX:y,maxY:C}}function aK(d,l){return l-d}var Lw;gn("FeatureIndex",SR,{omit:["rawTileData","sourceLayerCoder"]}),a.PerformanceMarkers=void 0,(Lw=a.PerformanceMarkers||(a.PerformanceMarkers={})).create="create",Lw.load="load",Lw.fullLoad="fullLoad";let Ay=null,Up=[];const zw=1e3/30,sK={mark(d){performance.mark(d)},frame(d){const l=d;Ay!=null&&Up.push(l-Ay),Ay=l},clearMetrics(){Ay=null,Up=[],performance.clearMeasures("loadTime"),performance.clearMeasures("fullLoadTime");for(const d in a.PerformanceMarkers)performance.clearMarks(a.PerformanceMarkers[d])},getPerformanceMetrics(){performance.measure("loadTime",a.PerformanceMarkers.create,a.PerformanceMarkers.load),performance.measure("fullLoadTime",a.PerformanceMarkers.create,a.PerformanceMarkers.fullLoad);const d=performance.getEntriesByName("loadTime")[0].duration,l=performance.getEntriesByName("fullLoadTime")[0].duration,h=Up.length,y=1/(Up.reduce((k,O)=>k+O,0)/h/1e3),C=Up.filter(k=>k>zw).reduce((k,O)=>k+(O-zw)/zw,0);return{loadTime:d,fullLoadTime:l,fps:y,percentDroppedFrames:C/(h+C)*100}}};a.AJAXError=qe,a.ARRAY_TYPE=xo,a.Actor=class{constructor(d,l,h){this.target=d,this.parent=l,this.mapId=h,this.callbacks={},this.tasks={},this.taskQueue=[],this.cancelCallbacks={},I(["receive","process"],this),this.invoker=new oK(this.process),this.target.addEventListener("message",this.receive,!1),this.globalScope=U()?d:window}send(d,l,h,y,C=!1){const k=Math.round(1e18*Math.random()).toString(36).substring(0,10);h&&(this.callbacks[k]=h);const O=X(this.globalScope)?void 0:[];return this.target.postMessage({id:k,type:d,hasCallback:!!h,targetMapId:y,mustQueue:C,sourceMapId:this.mapId,data:pl(l,O)},O),{cancel:()=>{h&&delete this.callbacks[k],this.target.postMessage({id:k,type:"<cancel>",targetMapId:y,sourceMapId:this.mapId})}}}receive(d){const l=d.data,h=l.id;if(h&&(!l.targetMapId||this.mapId===l.targetMapId))if(l.type==="<cancel>"){delete this.tasks[h];const y=this.cancelCallbacks[h];delete this.cancelCallbacks[h],y&&y()}else U()||l.mustQueue?(this.tasks[h]=l,this.taskQueue.push(h),this.invoker.trigger()):this.processTask(h,l)}process(){if(!this.taskQueue.length)return;const d=this.taskQueue.shift(),l=this.tasks[d];delete this.tasks[d],this.taskQueue.length&&this.invoker.trigger(),l&&this.processTask(d,l)}processTask(d,l){if(l.type==="<response>"){const h=this.callbacks[d];delete this.callbacks[d],h&&(l.error?h(Ls(l.error)):h(null,Ls(l.data)))}else{let h=!1;const y=X(this.globalScope)?void 0:[],C=l.hasCallback?(F,B)=>{h=!0,delete this.cancelCallbacks[d],this.target.postMessage({id:d,type:"<response>",sourceMapId:this.mapId,error:F?pl(F):null,data:pl(B,y)},y)}:F=>{h=!0};let k=null;const O=Ls(l.data);if(this.parent[l.type])k=this.parent[l.type](l.sourceMapId,O,C);else if(this.parent.getWorkerSource){const F=l.type.split(".");k=this.parent.getWorkerSource(l.sourceMapId,F[0],O.source)[F[1]](O,C)}else C(new Error(`Could not find function ${l.type}`));!h&&k&&k.cancel&&(this.cancelCallbacks[d]=k.cancel)}}remove(){this.invoker.remove(),this.target.removeEventListener("message",this.receive,!1)}},a.AlphaImage=Op,a.CanonicalTileID=Nw,a.CollisionBoxArray=_t,a.CollisionCircleLayoutArray=class extends ne{},a.Color=ce,a.DEMData=_R,a.DataConstantProperty=xn,a.DictionaryCoder=wR,a.EXTENT=xi,a.ErrorEvent=Lt,a.EvaluationParameters=Br,a.Event=Dt,a.Evented=Ht,a.FeatureIndex=SR,a.FillBucket=yw,a.FillExtrusionBucket=bw,a.GeoJSONFeature=CR,a.ImageAtlas=qM,a.ImagePosition=Sw,a.LineBucket=_w,a.LineStripIndexArray=class extends Oe{},a.LngLat=ri,a.LngLatBounds=Bu,a.MercatorCoordinate=Dy,a.ONE_EM=$i,a.OverscaledTileID=ua,a.PerformanceUtils=sK,a.PosArray=Tn,a.Properties=Fi,a.QuadTriangleArray=class extends pe{},a.RGBAImage=ca,a.RasterBoundsArray=class extends w{},a.RequestPerformance=class{constructor(d){this._marks={start:[d.url,"start"].join("#"),end:[d.url,"end"].join("#"),measure:d.url.toString()},performance.mark(this._marks.start)}finish(){performance.mark(this._marks.end);let d=performance.getEntriesByName(this._marks.measure);return d.length===0&&(performance.measure(this._marks.measure,this._marks.start,this._marks.end),d=performance.getEntriesByName(this._marks.measure),performance.clearMarks(this._marks.start),performance.clearMarks(this._marks.end),performance.clearMeasures(this._marks.measure)),d}},a.ResourceType=Ot,a.SegmentVector=Zn,a.SymbolBucket=xf,a.Transitionable=cy,a.TriangleIndexArray=vo,a.Uniform1f=yl,a.Uniform1i=class extends vl{constructor(d,l){super(d,l),this.current=0}set(d){this.current!==d&&(this.current=d,this.gl.uniform1i(this.location,d))}},a.Uniform2f=class extends vl{constructor(d,l){super(d,l),this.current=[0,0]}set(d){d[0]===this.current[0]&&d[1]===this.current[1]||(this.current=d,this.gl.uniform2f(this.location,d[0],d[1]))}},a.Uniform3f=class extends vl{constructor(d,l){super(d,l),this.current=[0,0,0]}set(d){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]))}},a.Uniform4f=uf,a.UniformColor=uM,a.UniformMatrix4f=class extends vl{constructor(d,l){super(d,l),this.current=I9}set(d){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 l=1;l<16;l++)if(d[l]!==this.current[l]){this.current=d,this.gl.uniformMatrix4fv(this.location,!1,d);break}}},a.UnwrappedTileID=bR,a.ValidationError=Ye,a.ZoomHistory=vp,a.add=function(d,l,h){return d[0]=l[0]+h[0],d[1]=l[1]+h[1],d[2]=l[2]+h[2],d},a.addDynamicAttributes=kw,a.asyncAll=function(d,l,h){if(!d.length)return h(null,[]);let y=d.length;const C=new Array(d.length);let k=null;d.forEach((O,F)=>{l(O,(B,K)=>{B&&(k=B),C[F]=K,--y==0&&h(k,C)})})},a.bezier=p,a.bindAll=I,a.cacheEntryPossiblyAdded=function(d){Me++,Me>Re&&(d.getActor().send("enforceCacheSizeLimit",be),Me=0)},a.clamp=v,a.clearTileCache=function(d){const l=caches.delete(he);d&&l.catch(d).then(()=>d())},a.clipLine=aR,a.clone=function(d){var l=new xo(16);return l[0]=d[0],l[1]=d[1],l[2]=d[2],l[3]=d[3],l[4]=d[4],l[5]=d[5],l[6]=d[6],l[7]=d[7],l[8]=d[8],l[9]=d[9],l[10]=d[10],l[11]=d[11],l[12]=d[12],l[13]=d[13],l[14]=d[14],l[15]=d[15],l},a.clone$1=D,a.clone$2=function(d){var l=new xo(3);return l[0]=d[0],l[1]=d[1],l[2]=d[2],l},a.collisionCircleLayout=EH,a.config=oe,a.copy=function(d,l){return d[0]=l[0],d[1]=l[1],d[2]=l[2],d[3]=l[3],d[4]=l[4],d[5]=l[5],d[6]=l[6],d[7]=l[7],d[8]=l[8],d[9]=l[9],d[10]=l[10],d[11]=l[11],d[12]=l[12],d[13]=l[13],d[14]=l[14],d[15]=l[15],d},a.create=function(){var d=new xo(16);return xo!=Float32Array&&(d[1]=0,d[2]=0,d[3]=0,d[4]=0,d[6]=0,d[7]=0,d[8]=0,d[9]=0,d[11]=0,d[12]=0,d[13]=0,d[14]=0),d[0]=1,d[5]=1,d[10]=1,d[15]=1,d},a.create$1=yM,a.createExpression=_u,a.createFilter=rf,a.createLayout=hi,a.createStyleLayer=function(d){return d.type==="custom"?new rK(d):new iK[d.type](d)},a.cross=function(d,l,h){var y=l[0],C=l[1],k=l[2],O=h[0],F=h[1],B=h[2];return d[0]=C*B-k*F,d[1]=k*O-y*B,d[2]=y*F-C*O,d},a.dot=function(d,l){return d[0]*l[0]+d[1]*l[1]+d[2]*l[2]},a.dot$1=function(d,l){return d[0]*l[0]+d[1]*l[1]+d[2]*l[2]+d[3]*l[3]},a.ease=g,a.emitValidationErrors=af,a.enforceCacheSizeLimit=function(d){Ie(),Ce&&Ce.then(l=>{l.keys().then(h=>{for(let y=0;y<h.length-d;y++)l.delete(h[y])})})},a.equals=function(d,l){var h=d[0],y=d[1],C=d[2],k=d[3],O=d[4],F=d[5],B=d[6],K=d[7],ee=d[8],ie=d[9],de=d[10],ge=d[11],ve=d[12],Ne=d[13],De=d[14],Qe=d[15],ht=l[0],Ge=l[1],lt=l[2],Rt=l[3],kt=l[4],hn=l[5],vn=l[6],ln=l[7],en=l[8],Qt=l[9],cn=l[10],nn=l[11],jt=l[12],In=l[13],bn=l[14],Kn=l[15];return Math.abs(h-ht)<=yo*Math.max(1,Math.abs(h),Math.abs(ht))&&Math.abs(y-Ge)<=yo*Math.max(1,Math.abs(y),Math.abs(Ge))&&Math.abs(C-lt)<=yo*Math.max(1,Math.abs(C),Math.abs(lt))&&Math.abs(k-Rt)<=yo*Math.max(1,Math.abs(k),Math.abs(Rt))&&Math.abs(O-kt)<=yo*Math.max(1,Math.abs(O),Math.abs(kt))&&Math.abs(F-hn)<=yo*Math.max(1,Math.abs(F),Math.abs(hn))&&Math.abs(B-vn)<=yo*Math.max(1,Math.abs(B),Math.abs(vn))&&Math.abs(K-ln)<=yo*Math.max(1,Math.abs(K),Math.abs(ln))&&Math.abs(ee-en)<=yo*Math.max(1,Math.abs(ee),Math.abs(en))&&Math.abs(ie-Qt)<=yo*Math.max(1,Math.abs(ie),Math.abs(Qt))&&Math.abs(de-cn)<=yo*Math.max(1,Math.abs(de),Math.abs(cn))&&Math.abs(ge-nn)<=yo*Math.max(1,Math.abs(ge),Math.abs(nn))&&Math.abs(ve-jt)<=yo*Math.max(1,Math.abs(ve),Math.abs(jt))&&Math.abs(Ne-In)<=yo*Math.max(1,Math.abs(Ne),Math.abs(In))&&Math.abs(De-bn)<=yo*Math.max(1,Math.abs(De),Math.abs(bn))&&Math.abs(Qe-Kn)<=yo*Math.max(1,Math.abs(Qe),Math.abs(Kn))},a.evaluateSizeForFeature=function(d,{uSize:l,uSizeT:h},{lowerSize:y,upperSize:C}){return d.kind==="source"?y/_l:d.kind==="composite"?Cr(y/_l,C/_l,h):l},a.evaluateSizeForZoom=function(d,l){let h=0,y=0;if(d.kind==="constant")y=d.layoutSize;else if(d.kind!=="source"){const{interpolationType:C,minZoom:k,maxZoom:O}=d,F=C?v(Mo.interpolationFactor(C,l,k,O),0,1):0;d.kind==="camera"?y=Cr(d.minSize,d.maxSize,F):h=F}return{uSizeT:h,uSize:y}},a.evaluateVariableOffset=cR,a.evented=Sp,a.exported=ue,a.exported$1=Ae,a.extend=_,a.filterObject=M,a.fromRotation=function(d,l){var h=Math.sin(l),y=Math.cos(l);return d[0]=y,d[1]=h,d[2]=0,d[3]=-h,d[4]=y,d[5]=0,d[6]=0,d[7]=0,d[8]=1,d},a.fromScaling=function(d,l){return d[0]=l[0],d[1]=0,d[2]=0,d[3]=0,d[4]=0,d[5]=l[1],d[6]=0,d[7]=0,d[8]=0,d[9]=0,d[10]=l[2],d[11]=0,d[12]=0,d[13]=0,d[14]=0,d[15]=1,d},a.getAnchorAlignment=Pw,a.getAnchorJustification=Iw,a.getArrayBuffer=yt,a.getImage=He,a.getJSON=function(d,l){return vt(_(d,{type:"json"}),l)},a.getOverlapMode=Dw,a.getRTLTextPluginStatus=Du,a.getReferrer=Ct,a.getVideo=function(d,l){const h=window.document.createElement("video");h.muted=!0,h.onloadstart=function(){l(null,h)};for(let y=0;y<d.length;y++){const C=window.document.createElement("source");Tt(d[y])||(h.crossOrigin="Anonymous"),C.src=d[y],h.appendChild(C)}return{cancel:()=>{}}},a.identity=cw,a.invert=function(d,l){var h=l[0],y=l[1],C=l[2],k=l[3],O=l[4],F=l[5],B=l[6],K=l[7],ee=l[8],ie=l[9],de=l[10],ge=l[11],ve=l[12],Ne=l[13],De=l[14],Qe=l[15],ht=h*F-y*O,Ge=h*B-C*O,lt=h*K-k*O,Rt=y*B-C*F,kt=y*K-k*F,hn=C*K-k*B,vn=ee*Ne-ie*ve,ln=ee*De-de*ve,en=ee*Qe-ge*ve,Qt=ie*De-de*Ne,cn=ie*Qe-ge*Ne,nn=de*Qe-ge*De,jt=ht*nn-Ge*cn+lt*Qt+Rt*en-kt*ln+hn*vn;return jt?(d[0]=(F*nn-B*cn+K*Qt)*(jt=1/jt),d[1]=(C*cn-y*nn-k*Qt)*jt,d[2]=(Ne*hn-De*kt+Qe*Rt)*jt,d[3]=(de*kt-ie*hn-ge*Rt)*jt,d[4]=(B*en-O*nn-K*ln)*jt,d[5]=(h*nn-C*en+k*ln)*jt,d[6]=(De*lt-ve*hn-Qe*Ge)*jt,d[7]=(ee*hn-de*lt+ge*Ge)*jt,d[8]=(O*cn-F*en+K*vn)*jt,d[9]=(y*en-h*cn-k*vn)*jt,d[10]=(ve*kt-Ne*lt+Qe*ht)*jt,d[11]=(ie*lt-ee*kt-ge*ht)*jt,d[12]=(F*ln-O*Qt-B*vn)*jt,d[13]=(h*Qt-y*ln+C*vn)*jt,d[14]=(Ne*Ge-ve*Rt-De*ht)*jt,d[15]=(ee*Rt-ie*Ge+de*ht)*jt,d):null},a.isImageBitmap=J,a.isSafari=X,a.isWorker=U,a.keysDifference=function(d,l){const h=[];for(const y in d)y in l||h.push(y);return h},a.lazyLoadRTLTextPlugin=function(){Ko.isLoading()||Ko.isLoaded()||Du()!=="deferred"||ly()},a.makeRequest=vt,a.mapObject=P,a.mercatorXfromLng=gR,a.mercatorYfromLat=vR,a.mercatorZfromAltitude=yR,a.mul=L9,a.mul$1=function(d,l,h){return d[0]=l[0]*h[0],d[1]=l[1]*h[1],d[2]=l[2]*h[2],d[3]=l[3]*h[3],d},a.multiply=xM,a.nextPowerOfTwo=function(d){return d<=1?1:Math.pow(2,Math.ceil(Math.log(d)/Math.LN2))},a.normalize=function(d,l){var h=l[0],y=l[1],C=l[2],k=h*h+y*y+C*C;return k>0&&(k=1/Math.sqrt(k)),d[0]=l[0]*k,d[1]=l[1]*k,d[2]=l[2]*k,d},a.number=Cr,a.ortho=function(d,l,h,y,C,k,O){var F=1/(l-h),B=1/(y-C),K=1/(k-O);return d[0]=-2*F,d[1]=0,d[2]=0,d[3]=0,d[4]=0,d[5]=-2*B,d[6]=0,d[7]=0,d[8]=0,d[9]=0,d[10]=2*K,d[11]=0,d[12]=(l+h)*F,d[13]=(C+y)*B,d[14]=(O+k)*K,d[15]=1,d},a.parseCacheControl=q,a.parseGlyphPbf=function(d){return new ww(d).readFields(LH,[])},a.pbf=ww,a.performSymbolLayout=function(d){d.bucket.createArrays(),d.bucket.tilePixelRatio=xi/(512*d.bucket.overscaling),d.bucket.compareText={},d.bucket.iconsNeedLinear=!1;const l=d.bucket.layers[0].layout,h=d.bucket.layers[0]._unevaluatedLayout._values,y={layoutIconSize:h["icon-size"].possiblyEvaluate(new Br(d.bucket.zoom+1),d.canonical),layoutTextSize:h["text-size"].possiblyEvaluate(new Br(d.bucket.zoom+1),d.canonical),textMaxSize:h["text-size"].possiblyEvaluate(new Br(18))};if(d.bucket.textSizeData.kind==="composite"){const{minZoom:B,maxZoom:K}=d.bucket.textSizeData;y.compositeTextSizes=[h["text-size"].possiblyEvaluate(new Br(B),d.canonical),h["text-size"].possiblyEvaluate(new Br(K),d.canonical)]}if(d.bucket.iconSizeData.kind==="composite"){const{minZoom:B,maxZoom:K}=d.bucket.iconSizeData;y.compositeIconSizes=[h["icon-size"].possiblyEvaluate(new Br(B),d.canonical),h["icon-size"].possiblyEvaluate(new Br(K),d.canonical)]}const C=l.get("text-line-height")*$i,k=l.get("text-rotation-alignment")!=="viewport"&&l.get("symbol-placement")!=="point",O=l.get("text-keep-upright"),F=l.get("text-size");for(const B of d.bucket.features){const K=l.get("text-font").evaluate(B,{},d.canonical).join(","),ee=F.evaluate(B,{},d.canonical),ie=y.layoutTextSize.evaluate(B,{},d.canonical),de=y.layoutIconSize.evaluate(B,{},d.canonical),ge={horizontal:{},vertical:void 0},ve=B.text;let Ne,De=[0,0];if(ve){const Ge=ve.toString(),lt=l.get("text-letter-spacing").evaluate(B,{},d.canonical)*$i,Rt=tw(Ge)?lt:0,kt=l.get("text-anchor").evaluate(B,{},d.canonical),hn=l.get("text-variable-anchor");if(!hn){const cn=l.get("text-radial-offset").evaluate(B,{},d.canonical);De=cn?cR(kt,[cn*$i,Tw]):l.get("text-offset").evaluate(B,{},d.canonical).map(nn=>nn*$i)}let vn=k?"center":l.get("text-justify").evaluate(B,{},d.canonical);const ln=l.get("symbol-placement"),en=ln==="point"?l.get("text-max-width").evaluate(B,{},d.canonical)*$i:0,Qt=()=>{d.bucket.allowVerticalPlacement&&sf(Ge)&&(ge.vertical=Ey(ve,d.glyphMap,d.glyphPositions,d.imagePositions,K,en,C,kt,"left",Rt,De,a.WritingMode.vertical,!0,ln,ie,ee))};if(!k&&hn){const cn=vn==="auto"?hn.map(jt=>Iw(jt)):[vn];let nn=!1;for(let jt=0;jt<cn.length;jt++){const In=cn[jt];if(!ge.horizontal[In])if(nn)ge.horizontal[In]=ge.horizontal[0];else{const bn=Ey(ve,d.glyphMap,d.glyphPositions,d.imagePositions,K,en,C,"center",In,Rt,De,a.WritingMode.horizontal,!1,ln,ie,ee);bn&&(ge.horizontal[In]=bn,nn=bn.positionedLines.length===1)}}Qt()}else{vn==="auto"&&(vn=Iw(kt));const cn=Ey(ve,d.glyphMap,d.glyphPositions,d.imagePositions,K,en,C,kt,vn,Rt,De,a.WritingMode.horizontal,!1,ln,ie,ee);cn&&(ge.horizontal[vn]=cn),Qt(),sf(Ge)&&k&&O&&(ge.vertical=Ey(ve,d.glyphMap,d.glyphPositions,d.imagePositions,K,en,C,kt,vn,Rt,De,a.WritingMode.vertical,!1,ln,ie,ee))}}let Qe=!1;if(B.icon&&B.icon.name){const Ge=d.imageMap[B.icon.name];Ge&&(Ne=UH(d.imagePositions[B.icon.name],l.get("icon-offset").evaluate(B,{},d.canonical),l.get("icon-anchor").evaluate(B,{},d.canonical)),Qe=!!Ge.sdf,d.bucket.sdfIcons===void 0?d.bucket.sdfIcons=Qe:d.bucket.sdfIcons!==Qe&&z("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"),(Ge.pixelRatio!==d.bucket.pixelRatio||l.get("icon-rotate").constantOr(1)!==0)&&(d.bucket.iconsNeedLinear=!0))}const ht=dR(ge.horizontal)||ge.vertical;d.bucket.iconsInText=!!ht&&ht.iconsInText,(ht||Ne)&&ZH(d.bucket,B,ge,Ne,d.imageMap,y,ie,de,De,Qe,d.canonical)}d.showCollisionBoxes&&d.bucket.generateCollisionDebugBuffers()},a.perspective=function(d,l,h,y,C){var k,O=1/Math.tan(l/2);return d[0]=O/h,d[1]=0,d[2]=0,d[3]=0,d[4]=0,d[5]=O,d[6]=0,d[7]=0,d[8]=0,d[9]=0,d[11]=-1,d[12]=0,d[13]=0,d[15]=0,C!=null&&C!==1/0?(d[10]=(C+y)*(k=1/(y-C)),d[14]=2*C*y*k):(d[10]=-1,d[14]=-2*y),d},a.pick=function(d,l){const h={};for(let y=0;y<l.length;y++){const C=l[y];C in d&&(h[C]=d[C])}return h},a.plugin=Ko,a.pointGeometry=re,a.polygonIntersectsPolygon=pM,a.potpack=GM,a.refProperties=["type","source","source-layer","minzoom","maxzoom","filter","layout"],a.register=gn,a.registerForPluginStateChange=function(d){return d({pluginStatus:go,pluginURL:zs}),Sp.on("pluginStateChange",d),d},a.renderColorRamp=PM,a.rotateX=function(d,l,h){var y=Math.sin(h),C=Math.cos(h),k=l[4],O=l[5],F=l[6],B=l[7],K=l[8],ee=l[9],ie=l[10],de=l[11];return l!==d&&(d[0]=l[0],d[1]=l[1],d[2]=l[2],d[3]=l[3],d[12]=l[12],d[13]=l[13],d[14]=l[14],d[15]=l[15]),d[4]=k*C+K*y,d[5]=O*C+ee*y,d[6]=F*C+ie*y,d[7]=B*C+de*y,d[8]=K*C-k*y,d[9]=ee*C-O*y,d[10]=ie*C-F*y,d[11]=de*C-B*y,d},a.rotateZ=function(d,l,h){var y=Math.sin(h),C=Math.cos(h),k=l[0],O=l[1],F=l[2],B=l[3],K=l[4],ee=l[5],ie=l[6],de=l[7];return l!==d&&(d[8]=l[8],d[9]=l[9],d[10]=l[10],d[11]=l[11],d[12]=l[12],d[13]=l[13],d[14]=l[14],d[15]=l[15]),d[0]=k*C+K*y,d[1]=O*C+ee*y,d[2]=F*C+ie*y,d[3]=B*C+de*y,d[4]=K*C-k*y,d[5]=ee*C-O*y,d[6]=ie*C-F*y,d[7]=de*C-B*y,d},a.scale=function(d,l,h){var y=h[0],C=h[1],k=h[2];return d[0]=l[0]*y,d[1]=l[1]*y,d[2]=l[2]*y,d[3]=l[3]*y,d[4]=l[4]*C,d[5]=l[5]*C,d[6]=l[6]*C,d[7]=l[7]*C,d[8]=l[8]*k,d[9]=l[9]*k,d[10]=l[10]*k,d[11]=l[11]*k,d[12]=l[12],d[13]=l[13],d[14]=l[14],d[15]=l[15],d},a.scale$1=function(d,l,h){return d[0]=l[0]*h,d[1]=l[1]*h,d[2]=l[2]*h,d},a.setCacheLimits=function(d,l){be=d,Re=l},a.setRTLTextPlugin=function(d,l,h=!1){if(go===bp||go===_p||go===wp)throw new Error("setRTLTextPlugin cannot be called multiple times.");zs=ue.resolveURL(d),go=bp,Cp=l,dc(),h||ly()},a.spec=Fe,a.sphericalToCartesian=function([d,l,h]){return l+=90,l*=Math.PI/180,h*=Math.PI/180,{x:d*Math.cos(l)*Math.sin(h),y:d*Math.sin(l)*Math.sin(h),z:d*Math.cos(h)}},a.sqrLen=function(d){var l=d[0],h=d[1];return l*l+h*h},a.sub=function(d,l,h){return d[0]=l[0]-h[0],d[1]=l[1]-h[1],d[2]=l[2]-h[2],d},a.toEvaluationFeature=Fu,a.transformMat3=function(d,l,h){var y=l[0],C=l[1],k=l[2];return d[0]=y*h[0]+C*h[3]+k*h[6],d[1]=y*h[1]+C*h[4]+k*h[7],d[2]=y*h[2]+C*h[5]+k*h[8],d},a.transformMat4=vy,a.transformMat4$1=function(d,l,h){var y=l[0],C=l[1];return d[0]=h[0]*y+h[4]*C+h[12],d[1]=h[1]*y+h[5]*C+h[13],d},a.translate=function(d,l,h){var y,C,k,O,F,B,K,ee,ie,de,ge,ve,Ne=h[0],De=h[1],Qe=h[2];return l===d?(d[12]=l[0]*Ne+l[4]*De+l[8]*Qe+l[12],d[13]=l[1]*Ne+l[5]*De+l[9]*Qe+l[13],d[14]=l[2]*Ne+l[6]*De+l[10]*Qe+l[14],d[15]=l[3]*Ne+l[7]*De+l[11]*Qe+l[15]):(C=l[1],k=l[2],O=l[3],F=l[4],B=l[5],K=l[6],ee=l[7],ie=l[8],de=l[9],ge=l[10],ve=l[11],d[0]=y=l[0],d[1]=C,d[2]=k,d[3]=O,d[4]=F,d[5]=B,d[6]=K,d[7]=ee,d[8]=ie,d[9]=de,d[10]=ge,d[11]=ve,d[12]=y*Ne+F*De+ie*Qe+l[12],d[13]=C*Ne+B*De+de*Qe+l[13],d[14]=k*Ne+K*De+ge*Qe+l[14],d[15]=O*Ne+ee*De+ve*Qe+l[15]),d},a.triggerPluginCompletionEvent=sy,a.unicodeBlockLookup=sn,a.uniqueId=function(){return T++},a.validateCustomStyleLayer=function(d){const l=[],h=d.id;return h===void 0&&l.push({message:`layers.${h}: missing required property "id"`}),d.render===void 0&&l.push({message:`layers.${h}: missing required method "render"`}),d.renderingMode&&d.renderingMode!=="2d"&&d.renderingMode!=="3d"&&l.push({message:`layers.${h}: property "renderingMode" must be either "2d" or "3d"`}),l},a.validateLight=gp,a.validateStyle=Ru,a.vectorTile=mc,a.warnOnce=z,a.wrap=b}),o(["./shared"],function(a){function u(ye){const W=typeof ye;if(W==="number"||W==="boolean"||W==="string"||ye==null)return JSON.stringify(ye);if(Array.isArray(ye)){let ce="[";for(const xe of ye)ce+=`${u(xe)},`;return`${ce}]`}const Q=Object.keys(ye).sort();let fe="{";for(let ce=0;ce<Q.length;ce++)fe+=`${JSON.stringify(Q[ce])}:${u(ye[Q[ce]])},`;return`${fe}}`}function f(ye){let W="";for(const Q of a.refProperties)W+=`/${u(ye[Q])}`;return W}class p{constructor(W){this.keyCache={},W&&this.replace(W)}replace(W){this._layerConfigs={},this._layers={},this.update(W,[])}update(W,Q){for(const ce of W){this._layerConfigs[ce.id]=ce;const xe=this._layers[ce.id]=a.createStyleLayer(ce);xe._featureFilter=a.createFilter(xe.filter),this.keyCache[ce.id]&&delete this.keyCache[ce.id]}for(const ce of Q)delete this.keyCache[ce],delete this._layerConfigs[ce],delete this._layers[ce];this.familiesBySource={};const fe=function(ce,xe){const ke={};for(let Pe=0;Pe<ce.length;Pe++){const Le=xe&&xe[ce[Pe].id]||f(ce[Pe]);xe&&(xe[ce[Pe].id]=Le);let Ze=ke[Le];Ze||(Ze=ke[Le]=[]),Ze.push(ce[Pe])}const we=[];for(const Pe in ke)we.push(ke[Pe]);return we}(Object.values(this._layerConfigs),this.keyCache);for(const ce of fe){const xe=ce.map(Xe=>this._layers[Xe.id]),ke=xe[0];if(ke.visibility==="none")continue;const we=ke.source||"";let Pe=this.familiesBySource[we];Pe||(Pe=this.familiesBySource[we]={});const Le=ke.sourceLayer||"_geojsonTileLayer";let Ze=Pe[Le];Ze||(Ze=Pe[Le]=[]),Ze.push(xe)}}}class g{constructor(W){const Q={},fe=[];for(const we in W){const Pe=W[we],Le=Q[we]={};for(const Ze in Pe){const Xe=Pe[+Ze];if(!Xe||Xe.bitmap.width===0||Xe.bitmap.height===0)continue;const Ve={x:0,y:0,w:Xe.bitmap.width+2,h:Xe.bitmap.height+2};fe.push(Ve),Le[Ze]={rect:Ve,metrics:Xe.metrics}}}const{w:ce,h:xe}=a.potpack(fe),ke=new a.AlphaImage({width:ce||1,height:xe||1});for(const we in W){const Pe=W[we];for(const Le in Pe){const Ze=Pe[+Le];if(!Ze||Ze.bitmap.width===0||Ze.bitmap.height===0)continue;const Xe=Q[we][Le].rect;a.AlphaImage.copy(Ze.bitmap,ke,{x:0,y:0},{x:Xe.x+1,y:Xe.y+1},Ze.bitmap)}}this.image=ke,this.positions=Q}}a.register("GlyphAtlas",g);class v{constructor(W){this.tileID=new a.OverscaledTileID(W.tileID.overscaledZ,W.tileID.wrap,W.tileID.canonical.z,W.tileID.canonical.x,W.tileID.canonical.y),this.uid=W.uid,this.zoom=W.zoom,this.pixelRatio=W.pixelRatio,this.tileSize=W.tileSize,this.source=W.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=W.showCollisionBoxes,this.collectResourceTiming=!!W.collectResourceTiming,this.returnDependencies=!!W.returnDependencies,this.promoteId=W.promoteId}parse(W,Q,fe,ce,xe){this.status="parsing",this.data=W,this.collisionBoxArray=new a.CollisionBoxArray;const ke=new a.DictionaryCoder(Object.keys(W.layers).sort()),we=new a.FeatureIndex(this.tileID,this.promoteId);we.bucketLayerIDs=[];const Pe={},Le={featureIndex:we,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:fe},Ze=Q.familiesBySource[this.source];for(const dn in Ze){const Cn=W.layers[dn];if(!Cn)continue;Cn.version===1&&a.warnOnce(`Vector tile source "${this.source}" layer "${dn}" does not use vector tile spec v2 and therefore may have some rendering errors.`);const jn=ke.encode(dn),or=[];for(let Wr=0;Wr<Cn.length;Wr++){const dr=Cn.feature(Wr),zr=we.getId(dr,dn);or.push({feature:dr,id:zr,index:Wr,sourceLayerIndex:jn})}for(const Wr of Ze[dn]){const dr=Wr[0];dr.source!==this.source&&a.warnOnce(`layer.source = ${dr.source} does not equal this.source = ${this.source}`),dr.minzoom&&this.zoom<Math.floor(dr.minzoom)||dr.maxzoom&&this.zoom>=dr.maxzoom||dr.visibility!=="none"&&(b(Wr,this.zoom,fe),(Pe[dr.id]=dr.createBucket({index:we.bucketLayerIDs.length,layers:Wr,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:jn,sourceID:this.source})).populate(or,Le,this.tileID.canonical),we.bucketLayerIDs.push(Wr.map(zr=>zr.id)))}}let Xe,Ve,Bt,Et;const nt=a.mapObject(Le.glyphDependencies,dn=>Object.keys(dn).map(Number));Object.keys(nt).length?ce.send("getGlyphs",{uid:this.uid,stacks:nt},(dn,Cn)=>{Xe||(Xe=dn,Ve=Cn,wn.call(this))}):Ve={};const zt=Object.keys(Le.iconDependencies);zt.length?ce.send("getImages",{icons:zt,source:this.source,tileID:this.tileID,type:"icons"},(dn,Cn)=>{Xe||(Xe=dn,Bt=Cn,wn.call(this))}):Bt={};const Gt=Object.keys(Le.patternDependencies);function wn(){if(Xe)return xe(Xe);if(Ve&&Bt&&Et){const dn=new g(Ve),Cn=new a.ImageAtlas(Bt,Et);for(const jn in Pe){const or=Pe[jn];or instanceof a.SymbolBucket?(b(or.layers,this.zoom,fe),a.performSymbolLayout({bucket:or,glyphMap:Ve,glyphPositions:dn.positions,imageMap:Bt,imagePositions:Cn.iconPositions,showCollisionBoxes:this.showCollisionBoxes,canonical:this.tileID.canonical})):or.hasPattern&&(or instanceof a.LineBucket||or instanceof a.FillBucket||or instanceof a.FillExtrusionBucket)&&(b(or.layers,this.zoom,fe),or.addFeatures(Le,this.tileID.canonical,Cn.patternPositions))}this.status="done",xe(null,{buckets:Object.values(Pe).filter(jn=>!jn.isEmpty()),featureIndex:we,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:dn.image,imageAtlas:Cn,glyphMap:this.returnDependencies?Ve:null,iconMap:this.returnDependencies?Bt:null,glyphPositions:this.returnDependencies?dn.positions:null})}}Gt.length?ce.send("getImages",{icons:Gt,source:this.source,tileID:this.tileID,type:"patterns"},(dn,Cn)=>{Xe||(Xe=dn,Et=Cn,wn.call(this))}):Et={},wn.call(this)}}function b(ye,W,Q){const fe=new a.EvaluationParameters(W);for(const ce of ye)ce.recalculate(fe,Q)}function _(ye,W){const Q=a.getArrayBuffer(ye.request,(fe,ce,xe,ke)=>{fe?W(fe):ce&&W(null,{vectorTile:new a.vectorTile.VectorTile(new a.pbf(ce)),rawData:ce,cacheControl:xe,expires:ke})});return()=>{Q.cancel(),W()}}class T{constructor(W,Q,fe,ce){this.actor=W,this.layerIndex=Q,this.availableImages=fe,this.loadVectorData=ce||_,this.loading={},this.loaded={}}loadTile(W,Q){const fe=W.uid;this.loading||(this.loading={});const ce=!!(W&&W.request&&W.request.collectResourceTiming)&&new a.RequestPerformance(W.request),xe=this.loading[fe]=new v(W);xe.abort=this.loadVectorData(W,(ke,we)=>{if(delete this.loading[fe],ke||!we)return xe.status="done",this.loaded[fe]=xe,Q(ke);const Pe=we.rawData,Le={};we.expires&&(Le.expires=we.expires),we.cacheControl&&(Le.cacheControl=we.cacheControl);const Ze={};if(ce){const Xe=ce.finish();Xe&&(Ze.resourceTiming=JSON.parse(JSON.stringify(Xe)))}xe.vectorTile=we.vectorTile,xe.parse(we.vectorTile,this.layerIndex,this.availableImages,this.actor,(Xe,Ve)=>{if(Xe||!Ve)return Q(Xe);Q(null,a.extend({rawTileData:Pe.slice(0)},Ve,Le,Ze))}),this.loaded=this.loaded||{},this.loaded[fe]=xe})}reloadTile(W,Q){const fe=this.loaded,ce=W.uid,xe=this;if(fe&&fe[ce]){const ke=fe[ce];ke.showCollisionBoxes=W.showCollisionBoxes;const we=(Pe,Le)=>{const Ze=ke.reloadCallback;Ze&&(delete ke.reloadCallback,ke.parse(ke.vectorTile,xe.layerIndex,this.availableImages,xe.actor,Ze)),Q(Pe,Le)};ke.status==="parsing"?ke.reloadCallback=we:ke.status==="done"&&(ke.vectorTile?ke.parse(ke.vectorTile,this.layerIndex,this.availableImages,this.actor,we):we())}}abortTile(W,Q){const fe=this.loading,ce=W.uid;fe&&fe[ce]&&fe[ce].abort&&(fe[ce].abort(),delete fe[ce]),Q()}removeTile(W,Q){const fe=this.loaded,ce=W.uid;fe&&fe[ce]&&delete fe[ce],Q()}}class I{constructor(){this.loaded={}}loadTile(W,Q){const{uid:fe,encoding:ce,rawImageData:xe}=W,ke=a.isImageBitmap(xe)?this.getImageData(xe):xe,we=new a.DEMData(fe,ke,ce);this.loaded=this.loaded||{},this.loaded[fe]=we,Q(null,we)}getImageData(W){this.offscreenCanvas&&this.offscreenCanvasContext||(this.offscreenCanvas=new OffscreenCanvas(W.width,W.height),this.offscreenCanvasContext=this.offscreenCanvas.getContext("2d")),this.offscreenCanvas.width=W.width,this.offscreenCanvas.height=W.height,this.offscreenCanvasContext.drawImage(W,0,0,W.width,W.height);const Q=this.offscreenCanvasContext.getImageData(-1,-1,W.width+2,W.height+2);return this.offscreenCanvasContext.clearRect(0,0,this.offscreenCanvas.width,this.offscreenCanvas.height),new a.RGBAImage({width:Q.width,height:Q.height},Q.data)}removeTile(W){const Q=this.loaded,fe=W.uid;Q&&Q[fe]&&delete Q[fe]}}var P=function ye(W,Q){var fe,ce=W&&W.type;if(ce==="FeatureCollection")for(fe=0;fe<W.features.length;fe++)ye(W.features[fe],Q);else if(ce==="GeometryCollection")for(fe=0;fe<W.geometries.length;fe++)ye(W.geometries[fe],Q);else if(ce==="Feature")ye(W.geometry,Q);else if(ce==="Polygon")M(W.coordinates,Q);else if(ce==="MultiPolygon")for(fe=0;fe<W.coordinates.length;fe++)M(W.coordinates[fe],Q);return W};function M(ye,W){if(ye.length!==0){D(ye[0],W);for(var Q=1;Q<ye.length;Q++)D(ye[Q],!W)}}function D(ye,W){for(var Q=0,fe=0,ce=0,xe=ye.length,ke=xe-1;ce<xe;ke=ce++){var we=(ye[ce][0]-ye[ke][0])*(ye[ke][1]+ye[ce][1]),Pe=Q+we;fe+=Math.abs(Q)>=Math.abs(we)?Q-Pe+we:we-Pe+Q,Q=Pe}Q+fe>=0!=!!W&&ye.reverse()}const N=a.vectorTile.VectorTileFeature.prototype.toGeoJSON;class z{constructor(W){this._feature=W,this.extent=a.EXTENT,this.type=W.type,this.properties=W.tags,"id"in W&&!isNaN(W.id)&&(this.id=parseInt(W.id,10))}loadGeometry(){if(this._feature.type===1){const W=[];for(const Q of this._feature.geometry)W.push([new a.pointGeometry(Q[0],Q[1])]);return W}{const W=[];for(const Q of this._feature.geometry){const fe=[];for(const ce of Q)fe.push(new a.pointGeometry(ce[0],ce[1]));W.push(fe)}return W}}toGeoJSON(W,Q,fe){return N.call(this,W,Q,fe)}}class ${constructor(W){this.layers={_geojsonTileLayer:this},this.name="_geojsonTileLayer",this.extent=a.EXTENT,this.length=W.length,this._features=W}feature(W){return new z(this._features[W])}}var j={exports:{}},U=a.pointGeometry,q=a.vectorTile.VectorTileFeature,Y=te;function te(ye,W){this.options=W||{},this.features=ye,this.length=ye.length}function Z(ye,W){this.id=typeof ye.id=="number"?ye.id:void 0,this.type=ye.type,this.rawGeometry=ye.type===1?[ye.geometry]:ye.geometry,this.properties=ye.tags,this.extent=W||4096}te.prototype.feature=function(ye){return new Z(this.features[ye],this.options.extent)},Z.prototype.loadGeometry=function(){var ye=this.rawGeometry;this.geometry=[];for(var W=0;W<ye.length;W++){for(var Q=ye[W],fe=[],ce=0;ce<Q.length;ce++)fe.push(new U(Q[ce][0],Q[ce][1]));this.geometry.push(fe)}return this.geometry},Z.prototype.bbox=function(){this.geometry||this.loadGeometry();for(var ye=this.geometry,W=1/0,Q=-1/0,fe=1/0,ce=-1/0,xe=0;xe<ye.length;xe++)for(var ke=ye[xe],we=0;we<ke.length;we++){var Pe=ke[we];W=Math.min(W,Pe.x),Q=Math.max(Q,Pe.x),fe=Math.min(fe,Pe.y),ce=Math.max(ce,Pe.y)}return[W,fe,Q,ce]},Z.prototype.toGeoJSON=q.prototype.toGeoJSON;var X=a.pbf,J=Y;function ue(ye){var W=new X;return function(Q,fe){for(var ce in Q.layers)fe.writeMessage(3,re,Q.layers[ce])}(ye,W),W.finish()}function re(ye,W){var Q;W.writeVarintField(15,ye.version||1),W.writeStringField(1,ye.name||""),W.writeVarintField(5,ye.extent||4096);var fe={keys:[],values:[],keycache:{},valuecache:{}};for(Q=0;Q<ye.length;Q++)fe.feature=ye.feature(Q),W.writeMessage(2,se,fe);var ce=fe.keys;for(Q=0;Q<ce.length;Q++)W.writeStringField(3,ce[Q]);var xe=fe.values;for(Q=0;Q<xe.length;Q++)W.writeMessage(4,be,xe[Q])}function se(ye,W){var Q=ye.feature;Q.id!==void 0&&W.writeVarintField(1,Q.id),W.writeMessage(2,oe,ye),W.writeVarintField(3,Q.type),W.writeMessage(4,Se,Q)}function oe(ye,W){var Q=ye.feature,fe=ye.keys,ce=ye.values,xe=ye.keycache,ke=ye.valuecache;for(var we in Q.properties){var Pe=Q.properties[we],Le=xe[we];if(Pe!==null){Le===void 0&&(fe.push(we),xe[we]=Le=fe.length-1),W.writeVarint(Le);var Ze=typeof Pe;Ze!=="string"&&Ze!=="boolean"&&Ze!=="number"&&(Pe=JSON.stringify(Pe));var Xe=Ze+":"+Pe,Ve=ke[Xe];Ve===void 0&&(ce.push(Pe),ke[Xe]=Ve=ce.length-1),W.writeVarint(Ve)}}}function he(ye,W){return(W<<3)+(7&ye)}function Ce(ye){return ye<<1^ye>>31}function Se(ye,W){for(var Q=ye.loadGeometry(),fe=ye.type,ce=0,xe=0,ke=Q.length,we=0;we<ke;we++){var Pe=Q[we],Le=1;fe===1&&(Le=Pe.length),W.writeVarint(he(1,Le));for(var Ze=fe===3?Pe.length-1:Pe.length,Xe=0;Xe<Ze;Xe++){Xe===1&&fe!==1&&W.writeVarint(he(2,Ze-1));var Ve=Pe[Xe].x-ce,Bt=Pe[Xe].y-xe;W.writeVarint(Ce(Ve)),W.writeVarint(Ce(Bt)),ce+=Ve,xe+=Bt}fe===3&&W.writeVarint(he(7,1))}}function be(ye,W){var Q=typeof ye;Q==="string"?W.writeStringField(1,ye):Q==="boolean"?W.writeBooleanField(7,ye):Q==="number"&&(ye%1!=0?W.writeDoubleField(3,ye):ye<0?W.writeSVarintField(6,ye):W.writeVarintField(5,ye))}function Re(ye,W,Q,fe,ce,xe){if(ce-fe<=Q)return;const ke=fe+ce>>1;Ie(ye,W,ke,fe,ce,xe%2),Re(ye,W,Q,fe,ke-1,xe+1),Re(ye,W,Q,ke+1,ce,xe+1)}function Ie(ye,W,Q,fe,ce,xe){for(;ce>fe;){if(ce-fe>600){const Le=ce-fe+1,Ze=Q-fe+1,Xe=Math.log(Le),Ve=.5*Math.exp(2*Xe/3),Bt=.5*Math.sqrt(Xe*Ve*(Le-Ve)/Le)*(Ze-Le/2<0?-1:1);Ie(ye,W,Q,Math.max(fe,Math.floor(Q-Ze*Ve/Le+Bt)),Math.min(ce,Math.floor(Q+(Le-Ze)*Ve/Le+Bt)),xe)}const ke=W[2*Q+xe];let we=fe,Pe=ce;for(Me(ye,W,fe,Q),W[2*ce+xe]>ke&&Me(ye,W,fe,ce);we<Pe;){for(Me(ye,W,we,Pe),we++,Pe--;W[2*we+xe]<ke;)we++;for(;W[2*Pe+xe]>ke;)Pe--}W[2*fe+xe]===ke?Me(ye,W,fe,Pe):(Pe++,Me(ye,W,Pe,ce)),Pe<=Q&&(fe=Pe+1),Q<=Pe&&(ce=Pe-1)}}function Me(ye,W,Q,fe){Ae(ye,Q,fe),Ae(W,2*Q,2*fe),Ae(W,2*Q+1,2*fe+1)}function Ae(ye,W,Q){const fe=ye[W];ye[W]=ye[Q],ye[Q]=fe}function ze(ye,W,Q,fe){const ce=ye-Q,xe=W-fe;return ce*ce+xe*xe}j.exports=ue,j.exports.fromVectorTileJs=ue,j.exports.fromGeojsonVt=function(ye,W){W=W||{};var Q={};for(var fe in ye)Q[fe]=new J(ye[fe].features,W),Q[fe].name=fe,Q[fe].version=W.version,Q[fe].extent=W.extent;return ue({layers:Q})},j.exports.GeoJSONWrapper=J;const Ke=ye=>ye[0],Ue=ye=>ye[1];class pt{constructor(W,Q=Ke,fe=Ue,ce=64,xe=Float64Array){this.nodeSize=ce,this.points=W;const ke=W.length<65536?Uint16Array:Uint32Array,we=this.ids=new ke(W.length),Pe=this.coords=new xe(2*W.length);for(let Le=0;Le<W.length;Le++)we[Le]=Le,Pe[2*Le]=Q(W[Le]),Pe[2*Le+1]=fe(W[Le]);Re(we,Pe,ce,0,we.length-1,0)}range(W,Q,fe,ce){return function(xe,ke,we,Pe,Le,Ze,Xe){const Ve=[0,xe.length-1,0],Bt=[];let Et,nt;for(;Ve.length;){const zt=Ve.pop(),Gt=Ve.pop(),wn=Ve.pop();if(Gt-wn<=Xe){for(let jn=wn;jn<=Gt;jn++)Et=ke[2*jn],nt=ke[2*jn+1],Et>=we&&Et<=Le&&nt>=Pe&&nt<=Ze&&Bt.push(xe[jn]);continue}const dn=Math.floor((wn+Gt)/2);Et=ke[2*dn],nt=ke[2*dn+1],Et>=we&&Et<=Le&&nt>=Pe&&nt<=Ze&&Bt.push(xe[dn]);const Cn=(zt+1)%2;(zt===0?we<=Et:Pe<=nt)&&(Ve.push(wn),Ve.push(dn-1),Ve.push(Cn)),(zt===0?Le>=Et:Ze>=nt)&&(Ve.push(dn+1),Ve.push(Gt),Ve.push(Cn))}return Bt}(this.ids,this.coords,W,Q,fe,ce,this.nodeSize)}within(W,Q,fe){return function(ce,xe,ke,we,Pe,Le){const Ze=[0,ce.length-1,0],Xe=[],Ve=Pe*Pe;for(;Ze.length;){const Bt=Ze.pop(),Et=Ze.pop(),nt=Ze.pop();if(Et-nt<=Le){for(let Cn=nt;Cn<=Et;Cn++)ze(xe[2*Cn],xe[2*Cn+1],ke,we)<=Ve&&Xe.push(ce[Cn]);continue}const zt=Math.floor((nt+Et)/2),Gt=xe[2*zt],wn=xe[2*zt+1];ze(Gt,wn,ke,we)<=Ve&&Xe.push(ce[zt]);const dn=(Bt+1)%2;(Bt===0?ke-Pe<=Gt:we-Pe<=wn)&&(Ze.push(nt),Ze.push(zt-1),Ze.push(dn)),(Bt===0?ke+Pe>=Gt:we+Pe>=wn)&&(Ze.push(zt+1),Ze.push(Et),Ze.push(dn))}return Xe}(this.ids,this.coords,W,Q,fe,this.nodeSize)}}const gt={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:ye=>ye},Ot=Math.fround||(qe=new Float32Array(1),ye=>(qe[0]=+ye,qe[0]));var qe;class Ct{constructor(W){this.options=He(Object.create(gt),W),this.trees=new Array(this.options.maxZoom+1)}load(W){const{log:Q,minZoom:fe,maxZoom:ce,nodeSize:xe}=this.options;Q&&console.time("total time");const ke=`prepare ${W.length} points`;Q&&console.time(ke),this.points=W;let we=[];for(let Pe=0;Pe<W.length;Pe++)W[Pe].geometry&&we.push(vt(W[Pe],Pe));this.trees[ce+1]=new pt(we,ut,bt,xe,Float32Array),Q&&console.timeEnd(ke);for(let Pe=ce;Pe>=fe;Pe--){const Le=+Date.now();we=this._cluster(we,Pe),this.trees[Pe]=new pt(we,ut,bt,xe,Float32Array),Q&&console.log("z%d: %d clusters in %dms",Pe,we.length,+Date.now()-Le)}return Q&&console.timeEnd("total time"),this}getClusters(W,Q){let fe=((W[0]+180)%360+360)%360-180;const ce=Math.max(-90,Math.min(90,W[1]));let xe=W[2]===180?180:((W[2]+180)%360+360)%360-180;const ke=Math.max(-90,Math.min(90,W[3]));if(W[2]-W[0]>=360)fe=-180,xe=180;else if(fe>xe){const Ze=this.getClusters([fe,ce,180,ke],Q),Xe=this.getClusters([-180,ce,xe,ke],Q);return Ze.concat(Xe)}const we=this.trees[this._limitZoom(Q)],Pe=we.range(et(fe),ct(ke),et(xe),ct(ce)),Le=[];for(const Ze of Pe){const Xe=we.points[Ze];Le.push(Xe.numPoints?yt(Xe):this.points[Xe.index])}return Le}getChildren(W){const Q=this._getOriginId(W),fe=this._getOriginZoom(W),ce="No cluster with the specified id.",xe=this.trees[fe];if(!xe)throw new Error(ce);const ke=xe.points[Q];if(!ke)throw new Error(ce);const we=this.options.radius/(this.options.extent*Math.pow(2,fe-1)),Pe=xe.within(ke.x,ke.y,we),Le=[];for(const Ze of Pe){const Xe=xe.points[Ze];Xe.parentId===W&&Le.push(Xe.numPoints?yt(Xe):this.points[Xe.index])}if(Le.length===0)throw new Error(ce);return Le}getLeaves(W,Q,fe){const ce=[];return this._appendLeaves(ce,W,Q=Q||10,fe=fe||0,0),ce}getTile(W,Q,fe){const ce=this.trees[this._limitZoom(W)],xe=Math.pow(2,W),{extent:ke,radius:we}=this.options,Pe=we/ke,Le=(fe-Pe)/xe,Ze=(fe+1+Pe)/xe,Xe={features:[]};return this._addTileFeatures(ce.range((Q-Pe)/xe,Le,(Q+1+Pe)/xe,Ze),ce.points,Q,fe,xe,Xe),Q===0&&this._addTileFeatures(ce.range(1-Pe/xe,Le,1,Ze),ce.points,xe,fe,xe,Xe),Q===xe-1&&this._addTileFeatures(ce.range(0,Le,Pe/xe,Ze),ce.points,-1,fe,xe,Xe),Xe.features.length?Xe:null}getClusterExpansionZoom(W){let Q=this._getOriginZoom(W)-1;for(;Q<=this.options.maxZoom;){const fe=this.getChildren(W);if(Q++,fe.length!==1)break;W=fe[0].properties.cluster_id}return Q}_appendLeaves(W,Q,fe,ce,xe){const ke=this.getChildren(Q);for(const we of ke){const Pe=we.properties;if(Pe&&Pe.cluster?xe+Pe.point_count<=ce?xe+=Pe.point_count:xe=this._appendLeaves(W,Pe.cluster_id,fe,ce,xe):xe<ce?xe++:W.push(we),W.length===fe)break}return xe}_addTileFeatures(W,Q,fe,ce,xe,ke){for(const we of W){const Pe=Q[we],Le=Pe.numPoints;let Ze,Xe,Ve;if(Le)Ze=Tt(Pe),Xe=Pe.x,Ve=Pe.y;else{const nt=this.points[Pe.index];Ze=nt.properties,Xe=et(nt.geometry.coordinates[0]),Ve=ct(nt.geometry.coordinates[1])}const Bt={type:1,geometry:[[Math.round(this.options.extent*(Xe*xe-fe)),Math.round(this.options.extent*(Ve*xe-ce))]],tags:Ze};let Et;Le?Et=Pe.id:this.options.generateId?Et=Pe.index:this.points[Pe.index].id&&(Et=this.points[Pe.index].id),Et!==void 0&&(Bt.id=Et),ke.features.push(Bt)}}_limitZoom(W){return Math.max(this.options.minZoom,Math.min(Math.floor(+W),this.options.maxZoom+1))}_cluster(W,Q){const fe=[],{radius:ce,extent:xe,reduce:ke,minPoints:we}=this.options,Pe=ce/(xe*Math.pow(2,Q));for(let Le=0;Le<W.length;Le++){const Ze=W[Le];if(Ze.zoom<=Q)continue;Ze.zoom=Q;const Xe=this.trees[Q+1],Ve=Xe.within(Ze.x,Ze.y,Pe),Bt=Ze.numPoints||1;let Et=Bt;for(const nt of Ve){const zt=Xe.points[nt];zt.zoom>Q&&(Et+=zt.numPoints||1)}if(Et>Bt&&Et>=we){let nt=Ze.x*Bt,zt=Ze.y*Bt,Gt=ke&&Bt>1?this._map(Ze,!0):null;const wn=(Le<<5)+(Q+1)+this.points.length;for(const dn of Ve){const Cn=Xe.points[dn];if(Cn.zoom<=Q)continue;Cn.zoom=Q;const jn=Cn.numPoints||1;nt+=Cn.x*jn,zt+=Cn.y*jn,Cn.parentId=wn,ke&&(Gt||(Gt=this._map(Ze,!0)),ke(Gt,this._map(Cn)))}Ze.parentId=wn,fe.push(ot(nt/Et,zt/Et,wn,Et,Gt))}else if(fe.push(Ze),Et>1)for(const nt of Ve){const zt=Xe.points[nt];zt.zoom<=Q||(zt.zoom=Q,fe.push(zt))}}return fe}_getOriginId(W){return W-this.points.length>>5}_getOriginZoom(W){return(W-this.points.length)%32}_map(W,Q){if(W.numPoints)return Q?He({},W.properties):W.properties;const fe=this.points[W.index].properties,ce=this.options.map(fe);return Q&&ce===fe?He({},ce):ce}}function ot(ye,W,Q,fe,ce){return{x:Ot(ye),y:Ot(W),zoom:1/0,id:Q,parentId:-1,numPoints:fe,properties:ce}}function vt(ye,W){const[Q,fe]=ye.geometry.coordinates;return{x:Ot(et(Q)),y:Ot(ct(fe)),zoom:1/0,index:W,parentId:-1}}function yt(ye){return{type:"Feature",id:ye.id,properties:Tt(ye),geometry:{type:"Point",coordinates:[(W=ye.x,360*(W-.5)),at(ye.y)]}};var W}function Tt(ye){const W=ye.numPoints,Q=W>=1e4?`${Math.round(W/1e3)}k`:W>=1e3?Math.round(W/100)/10+"k":W;return He(He({},ye.properties),{cluster:!0,cluster_id:ye.id,point_count:W,point_count_abbreviated:Q})}function et(ye){return ye/360+.5}function ct(ye){const W=Math.sin(ye*Math.PI/180),Q=.5-.25*Math.log((1+W)/(1-W))/Math.PI;return Q<0?0:Q>1?1:Q}function at(ye){const W=(180-360*ye)*Math.PI/180;return 360*Math.atan(Math.exp(W))/Math.PI-90}function He(ye,W){for(const Q in W)ye[Q]=W[Q];return ye}function ut(ye){return ye.x}function bt(ye){return ye.y}function Dt(ye,W,Q,fe){for(var ce,xe=fe,ke=Q-W>>1,we=Q-W,Pe=ye[W],Le=ye[W+1],Ze=ye[Q],Xe=ye[Q+1],Ve=W+3;Ve<Q;Ve+=3){var Bt=Lt(ye[Ve],ye[Ve+1],Pe,Le,Ze,Xe);if(Bt>xe)ce=Ve,xe=Bt;else if(Bt===xe){var Et=Math.abs(Ve-ke);Et<we&&(ce=Ve,we=Et)}}xe>fe&&(ce-W>3&&Dt(ye,W,ce,fe),ye[ce+2]=xe,Q-ce>3&&Dt(ye,ce,Q,fe))}function Lt(ye,W,Q,fe,ce,xe){var ke=ce-Q,we=xe-fe;if(ke!==0||we!==0){var Pe=((ye-Q)*ke+(W-fe)*we)/(ke*ke+we*we);Pe>1?(Q=ce,fe=xe):Pe>0&&(Q+=ke*Pe,fe+=we*Pe)}return(ke=ye-Q)*ke+(we=W-fe)*we}function Ht(ye,W,Q,fe){var ce={id:ye===void 0?null:ye,type:W,geometry:Q,tags:fe,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return function(xe){var ke=xe.geometry,we=xe.type;if(we==="Point"||we==="MultiPoint"||we==="LineString")Fe(xe,ke);else if(we==="Polygon"||we==="MultiLineString")for(var Pe=0;Pe<ke.length;Pe++)Fe(xe,ke[Pe]);else if(we==="MultiPolygon")for(Pe=0;Pe<ke.length;Pe++)for(var Le=0;Le<ke[Pe].length;Le++)Fe(xe,ke[Pe][Le])}(ce),ce}function Fe(ye,W){for(var Q=0;Q<W.length;Q+=3)ye.minX=Math.min(ye.minX,W[Q]),ye.minY=Math.min(ye.minY,W[Q+1]),ye.maxX=Math.max(ye.maxX,W[Q]),ye.maxY=Math.max(ye.maxY,W[Q+1])}function Ye(ye,W,Q,fe){if(W.geometry){var ce=W.geometry.coordinates,xe=W.geometry.type,ke=Math.pow(Q.tolerance/((1<<Q.maxZoom)*Q.extent),2),we=[],Pe=W.id;if(Q.promoteId?Pe=W.properties[Q.promoteId]:Q.generateId&&(Pe=fe||0),xe==="Point")Zt(ce,we);else if(xe==="MultiPoint")for(var Le=0;Le<ce.length;Le++)Zt(ce[Le],we);else if(xe==="LineString")an(ce,we,ke,!1);else if(xe==="MultiLineString"){if(Q.lineMetrics){for(Le=0;Le<ce.length;Le++)an(ce[Le],we=[],ke,!1),ye.push(Ht(Pe,"LineString",we,W.properties));return}Kt(ce,we,ke,!1)}else if(xe==="Polygon")Kt(ce,we,ke,!0);else{if(xe!=="MultiPolygon"){if(xe==="GeometryCollection"){for(Le=0;Le<W.geometry.geometries.length;Le++)Ye(ye,{id:Pe,geometry:W.geometry.geometries[Le],properties:W.properties},Q,fe);return}throw new Error("Input data is not a valid GeoJSON object.")}for(Le=0;Le<ce.length;Le++){var Ze=[];Kt(ce[Le],Ze,ke,!0),we.push(Ze)}}ye.push(Ht(Pe,xe,we,W.properties))}}function Zt(ye,W){W.push(Vt(ye[0])),W.push(It(ye[1])),W.push(0)}function an(ye,W,Q,fe){for(var ce,xe,ke=0,we=0;we<ye.length;we++){var Pe=Vt(ye[we][0]),Le=It(ye[we][1]);W.push(Pe),W.push(Le),W.push(0),we>0&&(ke+=fe?(ce*Le-Pe*xe)/2:Math.sqrt(Math.pow(Pe-ce,2)+Math.pow(Le-xe,2))),ce=Pe,xe=Le}var Ze=W.length-3;W[2]=1,Dt(W,0,Ze,Q),W[Ze+2]=1,W.size=Math.abs(ke),W.start=0,W.end=W.size}function Kt(ye,W,Q,fe){for(var ce=0;ce<ye.length;ce++){var xe=[];an(ye[ce],xe,Q,fe),W.push(xe)}}function Vt(ye){return ye/360+.5}function It(ye){var W=Math.sin(ye*Math.PI/180),Q=.5-.25*Math.log((1+W)/(1-W))/Math.PI;return Q<0?0:Q>1?1:Q}function Xt(ye,W,Q,fe,ce,xe,ke,we){if(fe/=W,xe>=(Q/=W)&&ke<fe)return ye;if(ke<Q||xe>=fe)return null;for(var Pe=[],Le=0;Le<ye.length;Le++){var Ze=ye[Le],Xe=Ze.geometry,Ve=Ze.type,Bt=ce===0?Ze.minX:Ze.minY,Et=ce===0?Ze.maxX:Ze.maxY;if(Bt>=Q&&Et<fe)Pe.push(Ze);else if(!(Et<Q||Bt>=fe)){var nt=[];if(Ve==="Point"||Ve==="MultiPoint")pn(Xe,nt,Q,fe,ce);else if(Ve==="LineString")tt(Xe,nt,Q,fe,ce,!1,we.lineMetrics);else if(Ve==="MultiLineString")qt(Xe,nt,Q,fe,ce,!1);else if(Ve==="Polygon")qt(Xe,nt,Q,fe,ce,!0);else if(Ve==="MultiPolygon")for(var zt=0;zt<Xe.length;zt++){var Gt=[];qt(Xe[zt],Gt,Q,fe,ce,!0),Gt.length&&nt.push(Gt)}if(nt.length){if(we.lineMetrics&&Ve==="LineString"){for(zt=0;zt<nt.length;zt++)Pe.push(Ht(Ze.id,Ve,nt[zt],Ze.tags));continue}Ve!=="LineString"&&Ve!=="MultiLineString"||(nt.length===1?(Ve="LineString",nt=nt[0]):Ve="MultiLineString"),Ve!=="Point"&&Ve!=="MultiPoint"||(Ve=nt.length===3?"Point":"MultiPoint"),Pe.push(Ht(Ze.id,Ve,nt,Ze.tags))}}}return Pe.length?Pe:null}function pn(ye,W,Q,fe,ce){for(var xe=0;xe<ye.length;xe+=3){var ke=ye[xe+ce];ke>=Q&&ke<=fe&&(W.push(ye[xe]),W.push(ye[xe+1]),W.push(ye[xe+2]))}}function tt(ye,W,Q,fe,ce,xe,ke){for(var we,Pe,Le=At(ye),Ze=ce===0?yn:St,Xe=ye.start,Ve=0;Ve<ye.length-3;Ve+=3){var Bt=ye[Ve],Et=ye[Ve+1],nt=ye[Ve+2],zt=ye[Ve+3],Gt=ye[Ve+4],wn=ce===0?Bt:Et,dn=ce===0?zt:Gt,Cn=!1;ke&&(we=Math.sqrt(Math.pow(Bt-zt,2)+Math.pow(Et-Gt,2))),wn<Q?dn>Q&&(Pe=Ze(Le,Bt,Et,zt,Gt,Q),ke&&(Le.start=Xe+we*Pe)):wn>fe?dn<fe&&(Pe=Ze(Le,Bt,Et,zt,Gt,fe),ke&&(Le.start=Xe+we*Pe)):En(Le,Bt,Et,nt),dn<Q&&wn>=Q&&(Pe=Ze(Le,Bt,Et,zt,Gt,Q),Cn=!0),dn>fe&&wn<=fe&&(Pe=Ze(Le,Bt,Et,zt,Gt,fe),Cn=!0),!xe&&Cn&&(ke&&(Le.end=Xe+we*Pe),W.push(Le),Le=At(ye)),ke&&(Xe+=we)}var jn=ye.length-3;Bt=ye[jn],Et=ye[jn+1],nt=ye[jn+2],(wn=ce===0?Bt:Et)>=Q&&wn<=fe&&En(Le,Bt,Et,nt),jn=Le.length-3,xe&&jn>=3&&(Le[jn]!==Le[0]||Le[jn+1]!==Le[1])&&En(Le,Le[0],Le[1],Le[2]),Le.length&&W.push(Le)}function At(ye){var W=[];return W.size=ye.size,W.start=ye.start,W.end=ye.end,W}function qt(ye,W,Q,fe,ce,xe){for(var ke=0;ke<ye.length;ke++)tt(ye[ke],W,Q,fe,ce,xe,!1)}function En(ye,W,Q,fe){ye.push(W),ye.push(Q),ye.push(fe)}function yn(ye,W,Q,fe,ce,xe){var ke=(xe-W)/(fe-W);return ye.push(xe),ye.push(Q+(ce-Q)*ke),ye.push(1),ke}function St(ye,W,Q,fe,ce,xe){var ke=(xe-Q)/(ce-Q);return ye.push(W+(fe-W)*ke),ye.push(xe),ye.push(1),ke}function Pn(ye,W){for(var Q=[],fe=0;fe<ye.length;fe++){var ce,xe=ye[fe],ke=xe.type;if(ke==="Point"||ke==="MultiPoint"||ke==="LineString")ce=_n(xe.geometry,W);else if(ke==="MultiLineString"||ke==="Polygon"){ce=[];for(var we=0;we<xe.geometry.length;we++)ce.push(_n(xe.geometry[we],W))}else if(ke==="MultiPolygon")for(ce=[],we=0;we<xe.geometry.length;we++){for(var Pe=[],Le=0;Le<xe.geometry[we].length;Le++)Pe.push(_n(xe.geometry[we][Le],W));ce.push(Pe)}Q.push(Ht(xe.id,ke,ce,xe.tags))}return Q}function _n(ye,W){var Q=[];Q.size=ye.size,ye.start!==void 0&&(Q.start=ye.start,Q.end=ye.end);for(var fe=0;fe<ye.length;fe+=3)Q.push(ye[fe]+W,ye[fe+1],ye[fe+2]);return Q}function tn(ye,W){if(ye.transformed)return ye;var Q,fe,ce,xe=1<<ye.z,ke=ye.x,we=ye.y;for(Q=0;Q<ye.features.length;Q++){var Pe=ye.features[Q],Le=Pe.geometry,Ze=Pe.type;if(Pe.geometry=[],Ze===1)for(fe=0;fe<Le.length;fe+=2)Pe.geometry.push(Ft(Le[fe],Le[fe+1],W,xe,ke,we));else for(fe=0;fe<Le.length;fe++){var Xe=[];for(ce=0;ce<Le[fe].length;ce+=2)Xe.push(Ft(Le[fe][ce],Le[fe][ce+1],W,xe,ke,we));Pe.geometry.push(Xe)}}return ye.transformed=!0,ye}function Ft(ye,W,Q,fe,ce,xe){return[Math.round(Q*(ye*fe-ce)),Math.round(Q*(W*fe-xe))]}function dt(ye,W,Q,fe,ce){for(var xe=W===ce.maxZoom?0:ce.tolerance/((1<<W)*ce.extent),ke={features:[],numPoints:0,numSimplified:0,numFeatures:0,source:null,x:Q,y:fe,z:W,transformed:!1,minX:2,minY:1,maxX:-1,maxY:0},we=0;we<ye.length;we++){ke.numFeatures++,mt(ke,ye[we],xe,ce);var Pe=ye[we].minX,Le=ye[we].minY,Ze=ye[we].maxX,Xe=ye[we].maxY;Pe<ke.minX&&(ke.minX=Pe),Le<ke.minY&&(ke.minY=Le),Ze>ke.maxX&&(ke.maxX=Ze),Xe>ke.maxY&&(ke.maxY=Xe)}return ke}function mt(ye,W,Q,fe){var ce=W.geometry,xe=W.type,ke=[];if(xe==="Point"||xe==="MultiPoint")for(var we=0;we<ce.length;we+=3)ke.push(ce[we]),ke.push(ce[we+1]),ye.numPoints++,ye.numSimplified++;else if(xe==="LineString")$t(ke,ce,ye,Q,!1,!1);else if(xe==="MultiLineString"||xe==="Polygon")for(we=0;we<ce.length;we++)$t(ke,ce[we],ye,Q,xe==="Polygon",we===0);else if(xe==="MultiPolygon")for(var Pe=0;Pe<ce.length;Pe++){var Le=ce[Pe];for(we=0;we<Le.length;we++)$t(ke,Le[we],ye,Q,!0,we===0)}if(ke.length){var Ze=W.tags||null;if(xe==="LineString"&&fe.lineMetrics){for(var Xe in Ze={},W.tags)Ze[Xe]=W.tags[Xe];Ze.mapbox_clip_start=ce.start/ce.size,Ze.mapbox_clip_end=ce.end/ce.size}var Ve={geometry:ke,type:xe==="Polygon"||xe==="MultiPolygon"?3:xe==="LineString"||xe==="MultiLineString"?2:1,tags:Ze};W.id!==null&&(Ve.id=W.id),ye.features.push(Ve)}}function $t(ye,W,Q,fe,ce,xe){var ke=fe*fe;if(fe>0&&W.size<(ce?ke:fe))Q.numPoints+=W.length/3;else{for(var we=[],Pe=0;Pe<W.length;Pe+=3)(fe===0||W[Pe+2]>ke)&&(Q.numSimplified++,we.push(W[Pe]),we.push(W[Pe+1])),Q.numPoints++;ce&&function(Le,Ze){for(var Xe=0,Ve=0,Bt=Le.length,Et=Bt-2;Ve<Bt;Et=Ve,Ve+=2)Xe+=(Le[Ve]-Le[Et])*(Le[Ve+1]+Le[Et+1]);if(Xe>0===Ze)for(Ve=0,Bt=Le.length;Ve<Bt/2;Ve+=2){var nt=Le[Ve],zt=Le[Ve+1];Le[Ve]=Le[Bt-2-Ve],Le[Ve+1]=Le[Bt-1-Ve],Le[Bt-2-Ve]=nt,Le[Bt-1-Ve]=zt}}(we,xe),ye.push(we)}}function Wt(ye,W){var Q=(W=this.options=function(ce,xe){for(var ke in xe)ce[ke]=xe[ke];return ce}(Object.create(this.options),W)).debug;if(Q&&console.time("preprocess data"),W.maxZoom<0||W.maxZoom>24)throw new Error("maxZoom should be in the 0-24 range");if(W.promoteId&&W.generateId)throw new Error("promoteId and generateId cannot be used together.");var fe=function(ce,xe){var ke=[];if(ce.type==="FeatureCollection")for(var we=0;we<ce.features.length;we++)Ye(ke,ce.features[we],xe,we);else Ye(ke,ce.type==="Feature"?ce:{geometry:ce},xe);return ke}(ye,W);this.tiles={},this.tileCoords=[],Q&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",W.indexMaxZoom,W.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),fe=function(ce,xe){var ke=xe.buffer/xe.extent,we=ce,Pe=Xt(ce,1,-1-ke,ke,0,-1,2,xe),Le=Xt(ce,1,1-ke,2+ke,0,-1,2,xe);return(Pe||Le)&&(we=Xt(ce,1,-ke,1+ke,0,-1,2,xe)||[],Pe&&(we=Pn(Pe,1).concat(we)),Le&&(we=we.concat(Pn(Le,-1)))),we}(fe,W),fe.length&&this.splitTile(fe,0,0,0),Q&&(fe.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 mn(ye,W,Q){return 32*((1<<ye)*Q+W)+ye}function An(ye,W){const Q=ye.tileID.canonical;if(!this._geoJSONIndex)return W(null,null);const fe=this._geoJSONIndex.getTile(Q.z,Q.x,Q.y);if(!fe)return W(null,null);const ce=new $(fe.features);let xe=j.exports(ce);xe.byteOffset===0&&xe.byteLength===xe.buffer.byteLength||(xe=new Uint8Array(xe)),W(null,{vectorTile:ce,rawData:xe.buffer})}Wt.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},Wt.prototype.splitTile=function(ye,W,Q,fe,ce,xe,ke){for(var we=[ye,W,Q,fe],Pe=this.options,Le=Pe.debug;we.length;){fe=we.pop(),Q=we.pop(),W=we.pop(),ye=we.pop();var Ze=1<<W,Xe=mn(W,Q,fe),Ve=this.tiles[Xe];if(!Ve&&(Le>1&&console.time("creation"),Ve=this.tiles[Xe]=dt(ye,W,Q,fe,Pe),this.tileCoords.push({z:W,x:Q,y:fe}),Le)){Le>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",W,Q,fe,Ve.numFeatures,Ve.numPoints,Ve.numSimplified),console.timeEnd("creation"));var Bt="z"+W;this.stats[Bt]=(this.stats[Bt]||0)+1,this.total++}if(Ve.source=ye,ce){if(W===Pe.maxZoom||W===ce)continue;var Et=1<<ce-W;if(Q!==Math.floor(xe/Et)||fe!==Math.floor(ke/Et))continue}else if(W===Pe.indexMaxZoom||Ve.numPoints<=Pe.indexMaxPoints)continue;if(Ve.source=null,ye.length!==0){Le>1&&console.time("clipping");var nt,zt,Gt,wn,dn,Cn,jn=.5*Pe.buffer/Pe.extent,or=.5-jn,Wr=.5+jn,dr=1+jn;nt=zt=Gt=wn=null,dn=Xt(ye,Ze,Q-jn,Q+Wr,0,Ve.minX,Ve.maxX,Pe),Cn=Xt(ye,Ze,Q+or,Q+dr,0,Ve.minX,Ve.maxX,Pe),ye=null,dn&&(nt=Xt(dn,Ze,fe-jn,fe+Wr,1,Ve.minY,Ve.maxY,Pe),zt=Xt(dn,Ze,fe+or,fe+dr,1,Ve.minY,Ve.maxY,Pe),dn=null),Cn&&(Gt=Xt(Cn,Ze,fe-jn,fe+Wr,1,Ve.minY,Ve.maxY,Pe),wn=Xt(Cn,Ze,fe+or,fe+dr,1,Ve.minY,Ve.maxY,Pe),Cn=null),Le>1&&console.timeEnd("clipping"),we.push(nt||[],W+1,2*Q,2*fe),we.push(zt||[],W+1,2*Q,2*fe+1),we.push(Gt||[],W+1,2*Q+1,2*fe),we.push(wn||[],W+1,2*Q+1,2*fe+1)}}},Wt.prototype.getTile=function(ye,W,Q){var fe=this.options,ce=fe.extent,xe=fe.debug;if(ye<0||ye>24)return null;var ke=1<<ye,we=mn(ye,W=(W%ke+ke)%ke,Q);if(this.tiles[we])return tn(this.tiles[we],ce);xe>1&&console.log("drilling down to z%d-%d-%d",ye,W,Q);for(var Pe,Le=ye,Ze=W,Xe=Q;!Pe&&Le>0;)Le--,Ze=Math.floor(Ze/2),Xe=Math.floor(Xe/2),Pe=this.tiles[mn(Le,Ze,Xe)];return Pe&&Pe.source?(xe>1&&console.log("found parent tile z%d-%d-%d",Le,Ze,Xe),xe>1&&console.time("drilling down"),this.splitTile(Pe.source,Le,Ze,Xe,ye,W,Q),xe>1&&console.timeEnd("drilling down"),this.tiles[we]?tn(this.tiles[we],ce):null):null};class Qn extends T{constructor(W,Q,fe,ce){super(W,Q,fe,An),ce&&(this.loadGeoJSON=ce)}loadData(W,Q){var fe;(fe=this._pendingRequest)===null||fe===void 0||fe.cancel(),this._pendingCallback&&this._pendingCallback(null,{abandoned:!0});const ce=!!(W&&W.request&&W.request.collectResourceTiming)&&new a.RequestPerformance(W.request);this._pendingCallback=Q,this._pendingRequest=this.loadGeoJSON(W,(xe,ke)=>{if(delete this._pendingCallback,delete this._pendingRequest,xe||!ke)return Q(xe);if(typeof ke!="object")return Q(new Error(`Input data given to '${W.source}' is not a valid GeoJSON object.`));{P(ke,!0);try{if(W.filter){const Pe=a.createExpression(W.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if(Pe.result==="error")throw new Error(Pe.value.map(Ze=>`${Ze.key}: ${Ze.message}`).join(", "));ke={type:"FeatureCollection",features:ke.features.filter(Ze=>Pe.value.evaluate({zoom:0},Ze))}}this._geoJSONIndex=W.cluster?new Ct(function({superclusterOptions:Pe,clusterProperties:Le}){if(!Le||!Pe)return Pe;const Ze={},Xe={},Ve={accumulated:null,zoom:0},Bt={properties:null},Et=Object.keys(Le);for(const nt of Et){const[zt,Gt]=Le[nt],wn=a.createExpression(Gt),dn=a.createExpression(typeof zt=="string"?[zt,["accumulated"],["get",nt]]:zt);Ze[nt]=wn.value,Xe[nt]=dn.value}return Pe.map=nt=>{Bt.properties=nt;const zt={};for(const Gt of Et)zt[Gt]=Ze[Gt].evaluate(Ve,Bt);return zt},Pe.reduce=(nt,zt)=>{Bt.properties=zt;for(const Gt of Et)Ve.accumulated=nt[Gt],nt[Gt]=Xe[Gt].evaluate(Ve,Bt)},Pe}(W)).load(ke.features):function(Pe,Le){return new Wt(Pe,Le)}(ke,W.geojsonVtOptions)}catch(Pe){return Q(Pe)}this.loaded={};const we={};if(ce){const Pe=ce.finish();Pe&&(we.resourceTiming={},we.resourceTiming[W.source]=JSON.parse(JSON.stringify(Pe)))}Q(null,we)}})}reloadTile(W,Q){const fe=this.loaded;return fe&&fe[W.uid]?super.reloadTile(W,Q):this.loadTile(W,Q)}loadGeoJSON(W,Q){if(W.request)return a.getJSON(W.request,Q);if(typeof W.data=="string")try{Q(null,JSON.parse(W.data))}catch{Q(new Error(`Input data given to '${W.source}' is not a valid GeoJSON object.`))}else Q(new Error(`Input data given to '${W.source}' is not a valid GeoJSON object.`));return{cancel:()=>{}}}removeSource(W,Q){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),Q()}getClusterExpansionZoom(W,Q){try{Q(null,this._geoJSONIndex.getClusterExpansionZoom(W.clusterId))}catch(fe){Q(fe)}}getClusterChildren(W,Q){try{Q(null,this._geoJSONIndex.getChildren(W.clusterId))}catch(fe){Q(fe)}}getClusterLeaves(W,Q){try{Q(null,this._geoJSONIndex.getLeaves(W.clusterId,W.limit,W.offset))}catch(fe){Q(fe)}}}class Jn{constructor(W){this.self=W,this.actor=new a.Actor(W,this),this.layerIndexes={},this.availableImages={},this.workerSourceTypes={vector:T,geojson:Qn},this.workerSources={},this.demWorkerSources={},this.self.registerWorkerSource=(Q,fe)=>{if(this.workerSourceTypes[Q])throw new Error(`Worker source with name "${Q}" already registered.`);this.workerSourceTypes[Q]=fe},this.self.registerRTLTextPlugin=Q=>{if(a.plugin.isParsed())throw new Error("RTL text plugin already registered.");a.plugin.applyArabicShaping=Q.applyArabicShaping,a.plugin.processBidirectionalText=Q.processBidirectionalText,a.plugin.processStyledBidirectionalText=Q.processStyledBidirectionalText}}setReferrer(W,Q){this.referrer=Q}setImages(W,Q,fe){this.availableImages[W]=Q;for(const ce in this.workerSources[W]){const xe=this.workerSources[W][ce];for(const ke in xe)xe[ke].availableImages=Q}fe()}setLayers(W,Q,fe){this.getLayerIndex(W).replace(Q),fe()}updateLayers(W,Q,fe){this.getLayerIndex(W).update(Q.layers,Q.removedIds),fe()}loadTile(W,Q,fe){this.getWorkerSource(W,Q.type,Q.source).loadTile(Q,fe)}loadDEMTile(W,Q,fe){this.getDEMWorkerSource(W,Q.source).loadTile(Q,fe)}reloadTile(W,Q,fe){this.getWorkerSource(W,Q.type,Q.source).reloadTile(Q,fe)}abortTile(W,Q,fe){this.getWorkerSource(W,Q.type,Q.source).abortTile(Q,fe)}removeTile(W,Q,fe){this.getWorkerSource(W,Q.type,Q.source).removeTile(Q,fe)}removeDEMTile(W,Q){this.getDEMWorkerSource(W,Q.source).removeTile(Q)}removeSource(W,Q,fe){if(!this.workerSources[W]||!this.workerSources[W][Q.type]||!this.workerSources[W][Q.type][Q.source])return;const ce=this.workerSources[W][Q.type][Q.source];delete this.workerSources[W][Q.type][Q.source],ce.removeSource!==void 0?ce.removeSource(Q,fe):fe()}loadWorkerSource(W,Q,fe){try{this.self.importScripts(Q.url),fe()}catch(ce){fe(ce.toString())}}syncRTLPluginState(W,Q,fe){try{a.plugin.setState(Q);const ce=a.plugin.getPluginURL();if(a.plugin.isLoaded()&&!a.plugin.isParsed()&&ce!=null){this.self.importScripts(ce);const xe=a.plugin.isParsed();fe(xe?void 0:new Error(`RTL Text Plugin failed to import scripts from ${ce}`),xe)}}catch(ce){fe(ce.toString())}}getAvailableImages(W){let Q=this.availableImages[W];return Q||(Q=[]),Q}getLayerIndex(W){let Q=this.layerIndexes[W];return Q||(Q=this.layerIndexes[W]=new p),Q}getWorkerSource(W,Q,fe){if(this.workerSources[W]||(this.workerSources[W]={}),this.workerSources[W][Q]||(this.workerSources[W][Q]={}),!this.workerSources[W][Q][fe]){const ce={send:(xe,ke,we)=>{this.actor.send(xe,ke,we,W)}};this.workerSources[W][Q][fe]=new this.workerSourceTypes[Q](ce,this.getLayerIndex(W),this.getAvailableImages(W))}return this.workerSources[W][Q][fe]}getDEMWorkerSource(W,Q){return this.demWorkerSources[W]||(this.demWorkerSources[W]={}),this.demWorkerSources[W][Q]||(this.demWorkerSources[W][Q]=new I),this.demWorkerSources[W][Q]}enforceCacheSizeLimit(W,Q){a.enforceCacheSizeLimit(Q)}}return a.isWorker()&&(self.worker=new Jn(self)),Jn}),o(["./shared"],function(a){var u=f;function f(w){return!function(c){return typeof window>"u"||typeof document>"u"?"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 x,S,R=new Blob([""],{type:"text/javascript"}),L=URL.createObjectURL(R);try{S=new Worker(L),x=!0}catch{x=!1}return S&&S.terminate(),URL.revokeObjectURL(L),x}()?"Uint8ClampedArray"in window?ArrayBuffer.isView?function(){var x=document.createElement("canvas");x.width=x.height=1;var S=x.getContext("2d");if(!S)return!1;var R=S.getImageData(0,0,1,1);return R&&R.width===x.width}()?(p[m=c&&c.failIfMajorPerformanceCaveat]===void 0&&(p[m]=function(x){var S,R=function(L){var V=document.createElement("canvas"),H=Object.create(f.webGLContextAttributes);return H.failIfMajorPerformanceCaveat=L,V.getContext("webgl",H)||V.getContext("experimental-webgl",H)}(x);if(!R)return!1;try{S=R.createShader(R.VERTEX_SHADER)}catch{return!1}return!(!S||R.isContextLost())&&(R.shaderSource(S,"void main() {}"),R.compileShader(S),R.getShaderParameter(S,R.COMPILE_STATUS)===!0)}(m)),p[m]?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 m}(w)}var p={};function g(w,c){if(Array.isArray(w)){if(!Array.isArray(c)||w.length!==c.length)return!1;for(let m=0;m<w.length;m++)if(!g(w[m],c[m]))return!1;return!0}if(typeof w=="object"&&w!==null&&c!==null){if(typeof c!="object"||Object.keys(w).length!==Object.keys(c).length)return!1;for(const m in w)if(!g(w[m],c[m]))return!1;return!0}return w===c}f.webGLContextAttributes={antialias:!1,alpha:!0,stencil:!0,depth:!0};class v{static testProp(c){if(!v.docStyle)return c[0];for(let m=0;m<c.length;m++)if(c[m]in v.docStyle)return c[m];return c[0]}static create(c,m,x){const S=window.document.createElement(c);return m!==void 0&&(S.className=m),x&&x.appendChild(S),S}static createNS(c,m){return window.document.createElementNS(c,m)}static disableDrag(){v.docStyle&&v.selectProp&&(v.userSelect=v.docStyle[v.selectProp],v.docStyle[v.selectProp]="none")}static enableDrag(){v.docStyle&&v.selectProp&&(v.docStyle[v.selectProp]=v.userSelect)}static setTransform(c,m){c.style[v.transformProp]=m}static addEventListener(c,m,x,S={}){c.addEventListener(m,x,"passive"in S?S:S.capture)}static removeEventListener(c,m,x,S={}){c.removeEventListener(m,x,"passive"in S?S:S.capture)}static suppressClickInternal(c){c.preventDefault(),c.stopPropagation(),window.removeEventListener("click",v.suppressClickInternal,!0)}static suppressClick(){window.addEventListener("click",v.suppressClickInternal,!0),window.setTimeout(()=>{window.removeEventListener("click",v.suppressClickInternal,!0)},0)}static mousePos(c,m){const x=c.getBoundingClientRect();return new a.pointGeometry(m.clientX-x.left-c.clientLeft,m.clientY-x.top-c.clientTop)}static touchPos(c,m){const x=c.getBoundingClientRect(),S=[];for(let R=0;R<m.length;R++)S.push(new a.pointGeometry(m[R].clientX-x.left-c.clientLeft,m[R].clientY-x.top-c.clientTop));return S}static mouseButton(c){return c.button}static remove(c){c.parentNode&&c.parentNode.removeChild(c)}}v.docStyle=typeof window<"u"&&window.document&&window.document.documentElement.style,v.selectProp=v.testProp(["userSelect","MozUserSelect","WebkitUserSelect","msUserSelect"]),v.transformProp=v.testProp(["transform","WebkitTransform"]);class b{constructor(c){this._transformRequestFn=c}transformRequest(c,m){return this._transformRequestFn&&this._transformRequestFn(c,m)||{url:c}}normalizeSpriteURL(c,m,x){const S=function(R){const L=R.match(_);if(!L)throw new Error(`Unable to parse URL "${R}"`);return{protocol:L[1],authority:L[2],path:L[3]||"/",params:L[4]?L[4].split("&"):[]}}(c);return S.path+=`${m}${x}`,function(R){const L=R.params.length?`?${R.params.join("&")}`:"";return`${R.protocol}://${R.authority}${R.path}${L}`}(S)}setTransformRequest(c){this._transformRequestFn=c}}const _=/^(\w+):\/\/([^/?]*)(\/[^?]+)?\??(.+)?/;class T{constructor(c,m,x,S){this.context=c,this.format=x,this.texture=c.gl.createTexture(),this.update(m,S)}update(c,m,x){const{width:S,height:R}=c,L=!(this.size&&this.size[0]===S&&this.size[1]===R||x),{context:V}=this,{gl:H}=V;if(this.useMipmap=Boolean(m&&m.useMipmap),H.bindTexture(H.TEXTURE_2D,this.texture),V.pixelStoreUnpackFlipY.set(!1),V.pixelStoreUnpack.set(1),V.pixelStoreUnpackPremultiplyAlpha.set(this.format===H.RGBA&&(!m||m.premultiply!==!1)),L)this.size=[S,R],c instanceof HTMLImageElement||c instanceof HTMLCanvasElement||c instanceof HTMLVideoElement||c instanceof ImageData||a.isImageBitmap(c)?H.texImage2D(H.TEXTURE_2D,0,this.format,this.format,H.UNSIGNED_BYTE,c):H.texImage2D(H.TEXTURE_2D,0,this.format,S,R,0,this.format,H.UNSIGNED_BYTE,c.data);else{const{x:G,y:ne}=x||{x:0,y:0};c instanceof HTMLImageElement||c instanceof HTMLCanvasElement||c instanceof HTMLVideoElement||c instanceof ImageData||a.isImageBitmap(c)?H.texSubImage2D(H.TEXTURE_2D,0,G,ne,H.RGBA,H.UNSIGNED_BYTE,c):H.texSubImage2D(H.TEXTURE_2D,0,G,ne,S,R,H.RGBA,H.UNSIGNED_BYTE,c.data)}this.useMipmap&&this.isSizePowerOfTwo()&&H.generateMipmap(H.TEXTURE_2D)}bind(c,m,x){const{context:S}=this,{gl:R}=S;R.bindTexture(R.TEXTURE_2D,this.texture),x!==R.LINEAR_MIPMAP_NEAREST||this.isSizePowerOfTwo()||(x=R.LINEAR),c!==this.filter&&(R.texParameteri(R.TEXTURE_2D,R.TEXTURE_MAG_FILTER,c),R.texParameteri(R.TEXTURE_2D,R.TEXTURE_MIN_FILTER,x||c),this.filter=c),m!==this.wrap&&(R.texParameteri(R.TEXTURE_2D,R.TEXTURE_WRAP_S,m),R.texParameteri(R.TEXTURE_2D,R.TEXTURE_WRAP_T,m),this.wrap=m)}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}}function I(w){const{userImage:c}=w;return!!(c&&c.render&&c.render())&&(w.data.replace(new Uint8Array(c.data.buffer)),!0)}class P extends a.Evented{constructor(){super(),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new a.RGBAImage({width:1,height:1}),this.dirty=!0}isLoaded(){return this.loaded}setLoaded(c){if(this.loaded!==c&&(this.loaded=c,c)){for(const{ids:m,callback:x}of this.requestors)this._notify(m,x);this.requestors=[]}}getImage(c){return this.images[c]}addImage(c,m){if(this.images[c])throw new Error(`Image id ${c} already exist, use updateImage instead`);this._validate(c,m)&&(this.images[c]=m)}_validate(c,m){let x=!0;return this._validateStretch(m.stretchX,m.data&&m.data.width)||(this.fire(new a.ErrorEvent(new Error(`Image "${c}" has invalid "stretchX" value`))),x=!1),this._validateStretch(m.stretchY,m.data&&m.data.height)||(this.fire(new a.ErrorEvent(new Error(`Image "${c}" has invalid "stretchY" value`))),x=!1),this._validateContent(m.content,m)||(this.fire(new a.ErrorEvent(new Error(`Image "${c}" has invalid "content" value`))),x=!1),x}_validateStretch(c,m){if(!c)return!0;let x=0;for(const S of c){if(S[0]<x||S[1]<S[0]||m<S[1])return!1;x=S[1]}return!0}_validateContent(c,m){return!(c&&(c.length!==4||c[0]<0||m.data.width<c[0]||c[1]<0||m.data.height<c[1]||c[2]<0||m.data.width<c[2]||c[3]<0||m.data.height<c[3]||c[2]<c[0]||c[3]<c[1]))}updateImage(c,m){const x=this.images[c];if(x.data.width!==m.data.width||x.data.height!==m.data.height)throw new Error(`size mismatch between old image (${x.data.width}x${x.data.height}) and new image (${m.data.width}x${m.data.height}).`);m.version=x.version+1,this.images[c]=m,this.updatedImages[c]=!0}removeImage(c){const m=this.images[c];delete this.images[c],delete this.patterns[c],m.userImage&&m.userImage.onRemove&&m.userImage.onRemove()}listImages(){return Object.keys(this.images)}getImages(c,m){let x=!0;if(!this.isLoaded())for(const S of c)this.images[S]||(x=!1);this.isLoaded()||x?this._notify(c,m):this.requestors.push({ids:c,callback:m})}_notify(c,m){const x={};for(const S of c){this.images[S]||this.fire(new a.Event("styleimagemissing",{id:S}));const R=this.images[S];R?x[S]={data:R.data.clone(),pixelRatio:R.pixelRatio,sdf:R.sdf,version:R.version,stretchX:R.stretchX,stretchY:R.stretchY,content:R.content,hasRenderCallback:Boolean(R.userImage&&R.userImage.render)}:a.warnOnce(`Image "${S}" 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.`)}m(null,x)}getPixelSize(){const{width:c,height:m}=this.atlasImage;return{width:c,height:m}}getPattern(c){const m=this.patterns[c],x=this.getImage(c);if(!x)return null;if(m&&m.position.version===x.version)return m.position;if(m)m.position.version=x.version;else{const S={w:x.data.width+2,h:x.data.height+2,x:0,y:0},R=new a.ImagePosition(S,x);this.patterns[c]={bin:S,position:R}}return this._updatePatternAtlas(),this.patterns[c].position}bind(c){const m=c.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new T(c,this.atlasImage,m.RGBA),this.atlasTexture.bind(m.LINEAR,m.CLAMP_TO_EDGE)}_updatePatternAtlas(){const c=[];for(const R in this.patterns)c.push(this.patterns[R].bin);const{w:m,h:x}=a.potpack(c),S=this.atlasImage;S.resize({width:m||1,height:x||1});for(const R in this.patterns){const{bin:L}=this.patterns[R],V=L.x+1,H=L.y+1,G=this.images[R].data,ne=G.width,le=G.height;a.RGBAImage.copy(G,S,{x:0,y:0},{x:V,y:H},{width:ne,height:le}),a.RGBAImage.copy(G,S,{x:0,y:le-1},{x:V,y:H-1},{width:ne,height:1}),a.RGBAImage.copy(G,S,{x:0,y:0},{x:V,y:H+le},{width:ne,height:1}),a.RGBAImage.copy(G,S,{x:ne-1,y:0},{x:V-1,y:H},{width:1,height:le}),a.RGBAImage.copy(G,S,{x:0,y:0},{x:V+ne,y:H},{width:1,height:le})}this.dirty=!0}beginFrame(){this.callbackDispatchedThisFrame={}}dispatchRenderCallbacks(c){for(const m of c){if(this.callbackDispatchedThisFrame[m])continue;this.callbackDispatchedThisFrame[m]=!0;const x=this.images[m];x||a.warnOnce(`Image with ID: "${m}" was not found`),I(x)&&this.updateImage(m,x)}}}const M=1e20;function D(w,c,m,x,S,R,L,V,H){for(let G=c;G<c+x;G++)N(w,m*R+G,R,S,L,V,H);for(let G=m;G<m+S;G++)N(w,G*R+c,1,x,L,V,H)}function N(w,c,m,x,S,R,L){R[0]=0,L[0]=-M,L[1]=M,S[0]=w[c];for(let V=1,H=0,G=0;V<x;V++){S[V]=w[c+V*m];const ne=V*V;do{const le=R[H];G=(S[V]-S[le]+ne-le*le)/(V-le)/2}while(G<=L[H]&&--H>-1);H++,R[H]=V,L[H]=G,L[H+1]=M}for(let V=0,H=0;V<x;V++){for(;L[H+1]<V;)H++;const G=R[H],ne=V-G;w[c+V*m]=S[G]+ne*ne}}class z{constructor(c,m){this.requestManager=c,this.localIdeographFontFamily=m,this.entries={}}setURL(c){this.url=c}getGlyphs(c,m){const x=[];for(const S in c)for(const R of c[S])x.push({stack:S,id:R});a.asyncAll(x,({stack:S,id:R},L)=>{let V=this.entries[S];V||(V=this.entries[S]={glyphs:{},requests:{},ranges:{}});let H=V.glyphs[R];if(H!==void 0)return void L(null,{stack:S,id:R,glyph:H});if(H=this._tinySDF(V,S,R),H)return V.glyphs[R]=H,void L(null,{stack:S,id:R,glyph:H});const G=Math.floor(R/256);if(256*G>65535)return void L(new Error("glyphs > 65535 not supported"));if(V.ranges[G])return void L(null,{stack:S,id:R,glyph:H});let ne=V.requests[G];ne||(ne=V.requests[G]=[],z.loadGlyphRange(S,G,this.url,this.requestManager,(le,pe)=>{if(pe){for(const Te in pe)this._doesCharSupportLocalGlyph(+Te)||(V.glyphs[+Te]=pe[+Te]);V.ranges[G]=!0}for(const Te of ne)Te(le,pe);delete V.requests[G]})),ne.push((le,pe)=>{le?L(le):pe&&L(null,{stack:S,id:R,glyph:pe[R]||null})})},(S,R)=>{if(S)m(S);else if(R){const L={};for(const{stack:V,id:H,glyph:G}of R)(L[V]||(L[V]={}))[H]=G&&{id:G.id,bitmap:G.bitmap.clone(),metrics:G.metrics};m(null,L)}})}_doesCharSupportLocalGlyph(c){return!!this.localIdeographFontFamily&&(a.unicodeBlockLookup["CJK Unified Ideographs"](c)||a.unicodeBlockLookup["Hangul Syllables"](c)||a.unicodeBlockLookup.Hiragana(c)||a.unicodeBlockLookup.Katakana(c))}_tinySDF(c,m,x){const S=this.localIdeographFontFamily;if(!S||!this._doesCharSupportLocalGlyph(x))return;let R=c.tinySDF;if(!R){let V="400";/bold/i.test(m)?V="900":/medium/i.test(m)?V="500":/light/i.test(m)&&(V="200"),R=c.tinySDF=new z.TinySDF({fontSize:24,buffer:3,radius:8,cutoff:.25,fontFamily:S,fontWeight:V})}const L=R.draw(String.fromCharCode(x));return{id:x,bitmap:new a.AlphaImage({width:L.width||30,height:L.height||30},L.data),metrics:{width:L.glyphWidth||24,height:L.glyphHeight||24,left:L.glyphLeft||0,top:L.glyphTop-27||-8,advance:L.glyphAdvance||24}}}}z.loadGlyphRange=function(w,c,m,x,S){const R=256*c,L=R+255,V=x.transformRequest(m.replace("{fontstack}",w).replace("{range}",`${R}-${L}`),a.ResourceType.Glyphs);a.getArrayBuffer(V,(H,G)=>{if(H)S(H);else if(G){const ne={};for(const le of a.parseGlyphPbf(G))ne[le.id]=le;S(null,ne)}})},z.TinySDF=class{constructor({fontSize:w=24,buffer:c=3,radius:m=8,cutoff:x=.25,fontFamily:S="sans-serif",fontWeight:R="normal",fontStyle:L="normal"}={}){this.buffer=c,this.cutoff=x,this.radius=m;const V=this.size=w+4*c,H=this._createCanvas(V),G=this.ctx=H.getContext("2d",{willReadFrequently:!0});G.font=`${L} ${R} ${w}px ${S}`,G.textBaseline="alphabetic",G.textAlign="left",G.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(w){const c=document.createElement("canvas");return c.width=c.height=w,c}draw(w){const{width:c,actualBoundingBoxAscent:m,actualBoundingBoxDescent:x,actualBoundingBoxLeft:S,actualBoundingBoxRight:R}=this.ctx.measureText(w),L=Math.ceil(m),V=Math.min(this.size-this.buffer,Math.ceil(R-S)),H=Math.min(this.size-this.buffer,L+Math.ceil(x)),G=V+2*this.buffer,ne=H+2*this.buffer,le=Math.max(G*ne,0),pe=new Uint8ClampedArray(le),Te={data:pe,width:G,height:ne,glyphWidth:V,glyphHeight:H,glyphTop:L,glyphLeft:0,glyphAdvance:c};if(V===0||H===0)return Te;const{ctx:_e,buffer:Ee,gridInner:Be,gridOuter:We}=this;_e.clearRect(Ee,Ee,V,H),_e.fillText(w,Ee,Ee+L);const rt=_e.getImageData(Ee,Ee,V,H);We.fill(M,0,le),Be.fill(0,0,le);for(let Oe=0;Oe<H;Oe++)for(let ft=0;ft<V;ft++){const st=rt.data[4*(Oe*V+ft)+3]/255;if(st===0)continue;const _t=(Oe+Ee)*G+ft+Ee;if(st===1)We[_t]=0,Be[_t]=M;else{const wt=.5-st;We[_t]=wt>0?wt*wt:0,Be[_t]=wt<0?wt*wt:0}}D(We,0,0,G,ne,G,this.f,this.v,this.z),D(Be,Ee,Ee,V,H,G,this.f,this.v,this.z);for(let Oe=0;Oe<le;Oe++){const ft=Math.sqrt(We[Oe])-Math.sqrt(Be[Oe]);pe[Oe]=Math.round(255-255*(ft/this.radius+this.cutoff))}return Te}};const $=new a.Properties({anchor:new a.DataConstantProperty(a.spec.light.anchor),position:new class{constructor(){this.specification=a.spec.light.position}possiblyEvaluate(w,c){return a.sphericalToCartesian(w.expression.evaluate(c))}interpolate(w,c,m){return{x:a.number(w.x,c.x,m),y:a.number(w.y,c.y,m),z:a.number(w.z,c.z,m)}}},color:new a.DataConstantProperty(a.spec.light.color),intensity:new a.DataConstantProperty(a.spec.light.intensity)}),j="-transition";class U extends a.Evented{constructor(c){super(),this._transitionable=new a.Transitionable($),this.setLight(c),this._transitioning=this._transitionable.untransitioned()}getLight(){return this._transitionable.serialize()}setLight(c,m={}){if(!this._validate(a.validateLight,c,m))for(const x in c){const S=c[x];x.endsWith(j)?this._transitionable.setTransition(x.slice(0,-j.length),S):this._transitionable.setValue(x,S)}}updateTransitions(c){this._transitioning=this._transitionable.transitioned(c,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()}recalculate(c){this.properties=this._transitioning.possiblyEvaluate(c)}_validate(c,m,x){return(!x||x.validate!==!1)&&a.emitValidationErrors(this,c.call(a.validateStyle,a.extend({value:m,style:{glyphs:!0,sprite:!0},styleSpec:a.spec})))}}class q{constructor(c,m){this.width=c,this.height=m,this.nextRow=0,this.data=new Uint8Array(this.width*this.height),this.dashEntry={}}getDash(c,m){const x=c.join(",")+String(m);return this.dashEntry[x]||(this.dashEntry[x]=this.addDash(c,m)),this.dashEntry[x]}getDashRanges(c,m,x){const S=[];let R=c.length%2==1?-c[c.length-1]*x:0,L=c[0]*x,V=!0;S.push({left:R,right:L,isDash:V,zeroLength:c[0]===0});let H=c[0];for(let G=1;G<c.length;G++){V=!V;const ne=c[G];R=H*x,H+=ne,L=H*x,S.push({left:R,right:L,isDash:V,zeroLength:ne===0})}return S}addRoundDash(c,m,x){const S=m/2;for(let R=-x;R<=x;R++){const L=this.width*(this.nextRow+x+R);let V=0,H=c[V];for(let G=0;G<this.width;G++){G/H.right>1&&(H=c[++V]);const ne=Math.abs(G-H.left),le=Math.abs(G-H.right),pe=Math.min(ne,le);let Te;const _e=R/x*(S+1);if(H.isDash){const Ee=S-Math.abs(_e);Te=Math.sqrt(pe*pe+Ee*Ee)}else Te=S-Math.sqrt(pe*pe+_e*_e);this.data[L+G]=Math.max(0,Math.min(255,Te+128))}}}addRegularDash(c){for(let V=c.length-1;V>=0;--V){const H=c[V],G=c[V+1];H.zeroLength?c.splice(V,1):G&&G.isDash===H.isDash&&(G.left=H.left,c.splice(V,1))}const m=c[0],x=c[c.length-1];m.isDash===x.isDash&&(m.left=x.left-this.width,x.right=m.right+this.width);const S=this.width*this.nextRow;let R=0,L=c[R];for(let V=0;V<this.width;V++){V/L.right>1&&(L=c[++R]);const H=Math.abs(V-L.left),G=Math.abs(V-L.right),ne=Math.min(H,G);this.data[S+V]=Math.max(0,Math.min(255,(L.isDash?ne:-ne)+128))}}addDash(c,m){const x=m?7:0,S=2*x+1;if(this.nextRow+S>this.height)return a.warnOnce("LineAtlas out of space"),null;let R=0;for(let V=0;V<c.length;V++)R+=c[V];if(R!==0){const V=this.width/R,H=this.getDashRanges(c,this.width,V);m?this.addRoundDash(H,V,x):this.addRegularDash(H)}const L={y:(this.nextRow+x+.5)/this.height,height:2*x/this.height,width:R};return this.nextRow+=S,this.dirty=!0,L}bind(c){const m=c.gl;this.texture?(m.bindTexture(m.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,m.texSubImage2D(m.TEXTURE_2D,0,0,0,this.width,this.height,m.ALPHA,m.UNSIGNED_BYTE,this.data))):(this.texture=m.createTexture(),m.bindTexture(m.TEXTURE_2D,this.texture),m.texParameteri(m.TEXTURE_2D,m.TEXTURE_WRAP_S,m.REPEAT),m.texParameteri(m.TEXTURE_2D,m.TEXTURE_WRAP_T,m.REPEAT),m.texParameteri(m.TEXTURE_2D,m.TEXTURE_MIN_FILTER,m.LINEAR),m.texParameteri(m.TEXTURE_2D,m.TEXTURE_MAG_FILTER,m.LINEAR),m.texImage2D(m.TEXTURE_2D,0,m.ALPHA,this.width,this.height,0,m.ALPHA,m.UNSIGNED_BYTE,this.data))}}class Y{constructor(c,m){this.workerPool=c,this.actors=[],this.currentActor=0,this.id=a.uniqueId();const x=this.workerPool.acquire(this.id);for(let S=0;S<x.length;S++){const R=new Y.Actor(x[S],m,this.id);R.name=`Worker ${S}`,this.actors.push(R)}if(!this.actors.length)throw new Error("No actors found")}broadcast(c,m,x){a.asyncAll(this.actors,(S,R)=>{S.send(c,m,R)},x=x||function(){})}getActor(){return this.currentActor=(this.currentActor+1)%this.actors.length,this.actors[this.currentActor]}remove(){this.actors.forEach(c=>{c.remove()}),this.actors=[],this.workerPool.release(this.id)}}function te(w,c,m){const x=function(S,R){if(S)return m(S);if(R){const L=a.pick(a.extend(R,w),["tiles","minzoom","maxzoom","attribution","bounds","scheme","tileSize","encoding"]);R.vector_layers&&(L.vectorLayers=R.vector_layers,L.vectorLayerIds=L.vectorLayers.map(V=>V.id)),m(null,L)}};return w.url?a.getJSON(c.transformRequest(w.url,a.ResourceType.Source),x):a.exported.frame(()=>x(null,w))}Y.Actor=a.Actor;class Z{constructor(c,m,x){this.bounds=a.LngLatBounds.convert(this.validateBounds(c)),this.minzoom=m||0,this.maxzoom=x||24}validateBounds(c){return Array.isArray(c)&&c.length===4?[Math.max(-180,c[0]),Math.max(-90,c[1]),Math.min(180,c[2]),Math.min(90,c[3])]:[-180,-90,180,90]}contains(c){const m=Math.pow(2,c.z),x=Math.floor(a.mercatorXfromLng(this.bounds.getWest())*m),S=Math.floor(a.mercatorYfromLat(this.bounds.getNorth())*m),R=Math.ceil(a.mercatorXfromLng(this.bounds.getEast())*m),L=Math.ceil(a.mercatorYfromLat(this.bounds.getSouth())*m);return c.x>=x&&c.x<R&&c.y>=S&&c.y<L}}class X extends a.Evented{constructor(c,m,x,S){if(super(),this.id=c,this.dispatcher=x,this.type="vector",this.minzoom=0,this.maxzoom=22,this.scheme="xyz",this.tileSize=512,this.reparseOverscaled=!0,this.isTileClipped=!0,this._loaded=!1,a.extend(this,a.pick(m,["url","scheme","tileSize","promoteId"])),this._options=a.extend({type:"vector"},m),this._collectResourceTiming=m.collectResourceTiming,this.tileSize!==512)throw new Error("vector tile sources must have a tileSize of 512");this.setEventedParent(S)}load(){this._loaded=!1,this.fire(new a.Event("dataloading",{dataType:"source"})),this._tileJSONRequest=te(this._options,this.map._requestManager,(c,m)=>{this._tileJSONRequest=null,this._loaded=!0,this.map.style.sourceCaches[this.id].clearTiles(),c?this.fire(new a.ErrorEvent(c)):m&&(a.extend(this,m),m.bounds&&(this.tileBounds=new Z(m.bounds,this.minzoom,this.maxzoom)),this.fire(new a.Event("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new a.Event("data",{dataType:"source",sourceDataType:"content"})))})}loaded(){return this._loaded}hasTile(c){return!this.tileBounds||this.tileBounds.contains(c.canonical)}onAdd(c){this.map=c,this.load()}setSourceProperty(c){this._tileJSONRequest&&this._tileJSONRequest.cancel(),c(),this.load()}setTiles(c){return this.setSourceProperty(()=>{this._options.tiles=c}),this}setUrl(c){return this.setSourceProperty(()=>{this.url=c,this._options.url=c}),this}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)}serialize(){return a.extend({},this._options)}loadTile(c,m){const x=c.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),S={request:this.map._requestManager.transformRequest(x,a.ResourceType.Tile),uid:c.uid,tileID:c.tileID,zoom:c.tileID.overscaledZ,tileSize:this.tileSize*c.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};function R(L,V){return delete c.request,c.aborted?m(null):L&&L.status!==404?m(L):(V&&V.resourceTiming&&(c.resourceTiming=V.resourceTiming),this.map._refreshExpiredTiles&&V&&c.setExpiryData(V),c.loadVectorData(V,this.map.painter),a.cacheEntryPossiblyAdded(this.dispatcher),m(null),void(c.reloadCallback&&(this.loadTile(c,c.reloadCallback),c.reloadCallback=null)))}S.request.collectResourceTiming=this._collectResourceTiming,c.actor&&c.state!=="expired"?c.state==="loading"?c.reloadCallback=m:c.request=c.actor.send("reloadTile",S,R.bind(this)):(c.actor=this.dispatcher.getActor(),c.request=c.actor.send("loadTile",S,R.bind(this)))}abortTile(c){c.request&&(c.request.cancel(),delete c.request),c.actor&&c.actor.send("abortTile",{uid:c.uid,type:this.type,source:this.id},void 0)}unloadTile(c){c.unloadVectorData(),c.actor&&c.actor.send("removeTile",{uid:c.uid,type:this.type,source:this.id},void 0)}hasTransition(){return!1}}class J extends a.Evented{constructor(c,m,x,S){super(),this.id=c,this.dispatcher=x,this.setEventedParent(S),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=a.extend({type:"raster"},m),a.extend(this,a.pick(m,["url","scheme","tileSize"]))}load(){this._loaded=!1,this.fire(new a.Event("dataloading",{dataType:"source"})),this._tileJSONRequest=te(this._options,this.map._requestManager,(c,m)=>{this._tileJSONRequest=null,this._loaded=!0,c?this.fire(new a.ErrorEvent(c)):m&&(a.extend(this,m),m.bounds&&(this.tileBounds=new Z(m.bounds,this.minzoom,this.maxzoom)),this.fire(new a.Event("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new a.Event("data",{dataType:"source",sourceDataType:"content"})))})}loaded(){return this._loaded}onAdd(c){this.map=c,this.load()}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)}serialize(){return a.extend({},this._options)}hasTile(c){return!this.tileBounds||this.tileBounds.contains(c.canonical)}loadTile(c,m){const x=c.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme);c.request=a.getImage(this.map._requestManager.transformRequest(x,a.ResourceType.Tile),(S,R,L)=>{if(delete c.request,c.aborted)c.state="unloaded",m(null);else if(S)c.state="errored",m(S);else if(R){this.map._refreshExpiredTiles&&c.setExpiryData(L);const V=this.map.painter.context,H=V.gl;c.texture=this.map.painter.getTileTexture(R.width),c.texture?c.texture.update(R,{useMipmap:!0}):(c.texture=new T(V,R,H.RGBA,{useMipmap:!0}),c.texture.bind(H.LINEAR,H.CLAMP_TO_EDGE,H.LINEAR_MIPMAP_NEAREST),V.extTextureFilterAnisotropic&&H.texParameterf(H.TEXTURE_2D,V.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,V.extTextureFilterAnisotropicMax)),c.state="loaded",a.cacheEntryPossiblyAdded(this.dispatcher),m(null)}})}abortTile(c,m){c.request&&(c.request.cancel(),delete c.request),m()}unloadTile(c,m){c.texture&&this.map.painter.saveTileTexture(c.texture),m()}hasTransition(){return!1}}let ue;class re extends J{constructor(c,m,x,S){super(c,m,x,S),this.type="raster-dem",this.maxzoom=22,this._options=a.extend({type:"raster-dem"},m),this.encoding=m.encoding||"mapbox"}serialize(){return{type:"raster-dem",url:this.url,tileSize:this.tileSize,tiles:this.tiles,bounds:this.bounds,encoding:this.encoding}}loadTile(c,m){const x=c.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme);function S(R,L){R&&(c.state="errored",m(R)),L&&(c.dem=L,c.needsHillshadePrepare=!0,c.needsTerrainPrepare=!0,c.state="loaded",m(null))}c.request=a.getImage(this.map._requestManager.transformRequest(x,a.ResourceType.Tile),function(R,L){if(delete c.request,c.aborted)c.state="unloaded",m(null);else if(R)c.state="errored",m(R);else if(L){this.map._refreshExpiredTiles&&c.setExpiryData(L),delete L.cacheControl,delete L.expires;const V=a.isImageBitmap(L)&&(ue==null&&(ue=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")&&typeof createImageBitmap=="function"),ue)?L:a.exported.getImageData(L,1),H={uid:c.uid,coord:c.tileID,source:this.id,rawImageData:V,encoding:this.encoding};c.actor&&c.state!=="expired"||(c.actor=this.dispatcher.getActor(),c.actor.send("loadDEMTile",H,S.bind(this)))}}.bind(this)),c.neighboringTiles=this._getNeighboringTiles(c.tileID)}_getNeighboringTiles(c){const m=c.canonical,x=Math.pow(2,m.z),S=(m.x-1+x)%x,R=m.x===0?c.wrap-1:c.wrap,L=(m.x+1+x)%x,V=m.x+1===x?c.wrap+1:c.wrap,H={};return H[new a.OverscaledTileID(c.overscaledZ,R,m.z,S,m.y).key]={backfilled:!1},H[new a.OverscaledTileID(c.overscaledZ,V,m.z,L,m.y).key]={backfilled:!1},m.y>0&&(H[new a.OverscaledTileID(c.overscaledZ,R,m.z,S,m.y-1).key]={backfilled:!1},H[new a.OverscaledTileID(c.overscaledZ,c.wrap,m.z,m.x,m.y-1).key]={backfilled:!1},H[new a.OverscaledTileID(c.overscaledZ,V,m.z,L,m.y-1).key]={backfilled:!1}),m.y+1<x&&(H[new a.OverscaledTileID(c.overscaledZ,R,m.z,S,m.y+1).key]={backfilled:!1},H[new a.OverscaledTileID(c.overscaledZ,c.wrap,m.z,m.x,m.y+1).key]={backfilled:!1},H[new a.OverscaledTileID(c.overscaledZ,V,m.z,L,m.y+1).key]={backfilled:!1}),H}unloadTile(c){c.demTexture&&this.map.painter.saveTileTexture(c.demTexture),c.fbo&&(c.fbo.destroy(),delete c.fbo),c.dem&&delete c.dem,delete c.neighboringTiles,c.state="unloaded",c.actor&&c.actor.send("removeDEMTile",{uid:c.uid,source:this.id})}}class se extends a.Evented{constructor(c,m,x,S){super(),this.id=c,this.type="geojson",this.minzoom=0,this.maxzoom=18,this.tileSize=512,this.isTileClipped=!0,this.reparseOverscaled=!0,this._removed=!1,this._pendingLoads=0,this.actor=x.getActor(),this.setEventedParent(S),this._data=m.data,this._options=a.extend({},m),this._collectResourceTiming=m.collectResourceTiming,m.maxzoom!==void 0&&(this.maxzoom=m.maxzoom),m.type&&(this.type=m.type),m.attribution&&(this.attribution=m.attribution),this.promoteId=m.promoteId;const R=a.EXTENT/this.tileSize;this.workerOptions=a.extend({source:this.id,cluster:m.cluster||!1,geojsonVtOptions:{buffer:(m.buffer!==void 0?m.buffer:128)*R,tolerance:(m.tolerance!==void 0?m.tolerance:.375)*R,extent:a.EXTENT,maxZoom:this.maxzoom,lineMetrics:m.lineMetrics||!1,generateId:m.generateId||!1},superclusterOptions:{maxZoom:m.clusterMaxZoom!==void 0?m.clusterMaxZoom:this.maxzoom-1,minPoints:Math.max(2,m.clusterMinPoints||2),extent:a.EXTENT,radius:(m.clusterRadius||50)*R,log:!1,generateId:m.generateId||!1},clusterProperties:m.clusterProperties,filter:m.filter},m.workerOptions)}load(){this._updateWorkerData("metadata")}onAdd(c){this.map=c,this.load()}setData(c){return this._data=c,this._updateWorkerData("content"),this}getClusterExpansionZoom(c,m){return this.actor.send("geojson.getClusterExpansionZoom",{clusterId:c,source:this.id},m),this}getClusterChildren(c,m){return this.actor.send("geojson.getClusterChildren",{clusterId:c,source:this.id},m),this}getClusterLeaves(c,m,x,S){return this.actor.send("geojson.getClusterLeaves",{source:this.id,clusterId:c,limit:m,offset:x},S),this}_updateWorkerData(c){const m=a.extend({},this.workerOptions),x=this._data;typeof x=="string"?(m.request=this.map._requestManager.transformRequest(a.exported.resolveURL(x),a.ResourceType.Source),m.request.collectResourceTiming=this._collectResourceTiming):m.data=JSON.stringify(x),this._pendingLoads++,this.fire(new a.Event("dataloading",{dataType:"source"})),this.actor.send(`${this.type}.loadData`,m,(S,R)=>{if(this._pendingLoads--,this._removed||R&&R.abandoned)return void this.fire(new a.Event("dataabort",{dataType:"source",sourceDataType:c}));let L=null;if(R&&R.resourceTiming&&R.resourceTiming[this.id]&&(L=R.resourceTiming[this.id].slice(0)),S)return void this.fire(new a.ErrorEvent(S));const V={dataType:"source",sourceDataType:c};this._collectResourceTiming&&L&&L.length>0&&a.extend(V,{resourceTiming:L}),this.fire(new a.Event("data",V))})}loaded(){return this._pendingLoads===0}loadTile(c,m){const x=c.actor?"reloadTile":"loadTile";c.actor=this.actor;const S={type:this.type,uid:c.uid,tileID:c.tileID,zoom:c.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};c.request=this.actor.send(x,S,(R,L)=>(delete c.request,c.unloadVectorData(),c.aborted?m(null):R?m(R):(c.loadVectorData(L,this.map.painter,x==="reloadTile"),m(null))))}abortTile(c){c.request&&(c.request.cancel(),delete c.request),c.aborted=!0}unloadTile(c){c.unloadVectorData(),this.actor.send("removeTile",{uid:c.uid,type:this.type,source:this.id})}onRemove(){this._removed=!0,this.actor.send("removeSource",{type:this.type,source:this.id})}serialize(){return a.extend({},this._options,{type:this.type,data:this._data})}hasTransition(){return!1}}var oe=a.createLayout([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]);class he extends a.Evented{constructor(c,m,x,S){super(),this.id=c,this.dispatcher=x,this.coordinates=m.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(S),this.options=m}load(c,m){this._loaded=!1,this.fire(new a.Event("dataloading",{dataType:"source"})),this.url=this.options.url,a.getImage(this.map._requestManager.transformRequest(this.url,a.ResourceType.Image),(x,S)=>{this._loaded=!0,x?this.fire(new a.ErrorEvent(x)):S&&(this.image=S,c&&(this.coordinates=c),m&&m(),this._finishLoading())})}loaded(){return this._loaded}updateImage(c){return this.image&&c.url?(this.options.url=c.url,this.load(c.coordinates,()=>{this.texture=null}),this):this}_finishLoading(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new a.Event("data",{dataType:"source",sourceDataType:"metadata"})))}onAdd(c){this.map=c,this.load()}setCoordinates(c){this.coordinates=c;const m=c.map(a.MercatorCoordinate.fromLngLat);this.tileID=function(S){let R=1/0,L=1/0,V=-1/0,H=-1/0;for(const pe of S)R=Math.min(R,pe.x),L=Math.min(L,pe.y),V=Math.max(V,pe.x),H=Math.max(H,pe.y);const G=Math.max(V-R,H-L),ne=Math.max(0,Math.floor(-Math.log(G)/Math.LN2)),le=Math.pow(2,ne);return new a.CanonicalTileID(ne,Math.floor((R+V)/2*le),Math.floor((L+H)/2*le))}(m),this.minzoom=this.maxzoom=this.tileID.z;const x=m.map(S=>this.tileID.getTilePoint(S)._round());return this._boundsArray=new a.RasterBoundsArray,this._boundsArray.emplaceBack(x[0].x,x[0].y,0,0),this._boundsArray.emplaceBack(x[1].x,x[1].y,a.EXTENT,0),this._boundsArray.emplaceBack(x[3].x,x[3].y,0,a.EXTENT),this._boundsArray.emplaceBack(x[2].x,x[2].y,a.EXTENT,a.EXTENT),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new a.Event("data",{dataType:"source",sourceDataType:"content"})),this}prepare(){if(Object.keys(this.tiles).length===0||!this.image)return;const c=this.map.painter.context,m=c.gl;this.boundsBuffer||(this.boundsBuffer=c.createVertexBuffer(this._boundsArray,oe.members)),this.boundsSegments||(this.boundsSegments=a.SegmentVector.simpleSegment(0,0,4,2)),this.texture||(this.texture=new T(c,this.image,m.RGBA),this.texture.bind(m.LINEAR,m.CLAMP_TO_EDGE));for(const x in this.tiles){const S=this.tiles[x];S.state!=="loaded"&&(S.state="loaded",S.texture=this.texture)}}loadTile(c,m){this.tileID&&this.tileID.equals(c.tileID.canonical)?(this.tiles[String(c.tileID.wrap)]=c,c.buckets={},m(null)):(c.state="errored",m(null))}serialize(){return{type:"image",url:this.options.url,coordinates:this.coordinates}}hasTransition(){return!1}}class Ce extends he{constructor(c,m,x,S){super(c,m,x,S),this.roundZoom=!0,this.type="video",this.options=m}load(){this._loaded=!1;const c=this.options;this.urls=[];for(const m of c.urls)this.urls.push(this.map._requestManager.transformRequest(m,a.ResourceType.Source).url);a.getVideo(this.urls,(m,x)=>{this._loaded=!0,m?this.fire(new a.ErrorEvent(m)):x&&(this.video=x,this.video.loop=!0,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(c){if(this.video){const m=this.video.seekable;c<m.start(0)||c>m.end(0)?this.fire(new a.ErrorEvent(new a.ValidationError(`sources.${this.id}`,null,`Playback for this video can be set only between the ${m.start(0)} and ${m.end(0)}-second mark.`))):this.video.currentTime=c}}getVideo(){return this.video}onAdd(c){this.map||(this.map=c,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 c=this.map.painter.context,m=c.gl;this.boundsBuffer||(this.boundsBuffer=c.createVertexBuffer(this._boundsArray,oe.members)),this.boundsSegments||(this.boundsSegments=a.SegmentVector.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(m.LINEAR,m.CLAMP_TO_EDGE),m.texSubImage2D(m.TEXTURE_2D,0,0,0,m.RGBA,m.UNSIGNED_BYTE,this.video)):(this.texture=new T(c,this.video,m.RGBA),this.texture.bind(m.LINEAR,m.CLAMP_TO_EDGE));for(const x in this.tiles){const S=this.tiles[x];S.state!=="loaded"&&(S.state="loaded",S.texture=this.texture)}}serialize(){return{type:"video",urls:this.urls,coordinates:this.coordinates}}hasTransition(){return this.video&&!this.video.paused}}class Se extends he{constructor(c,m,x,S){super(c,m,x,S),m.coordinates?Array.isArray(m.coordinates)&&m.coordinates.length===4&&!m.coordinates.some(R=>!Array.isArray(R)||R.length!==2||R.some(L=>typeof L!="number"))||this.fire(new a.ErrorEvent(new a.ValidationError(`sources.${c}`,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new a.ErrorEvent(new a.ValidationError(`sources.${c}`,null,'missing required property "coordinates"'))),m.animate&&typeof m.animate!="boolean"&&this.fire(new a.ErrorEvent(new a.ValidationError(`sources.${c}`,null,'optional "animate" property must be a boolean value'))),m.canvas?typeof m.canvas=="string"||m.canvas instanceof HTMLCanvasElement||this.fire(new a.ErrorEvent(new a.ValidationError(`sources.${c}`,null,'"canvas" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new a.ErrorEvent(new a.ValidationError(`sources.${c}`,null,'missing required property "canvas"'))),this.options=m,this.animate=m.animate===void 0||m.animate}load(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof HTMLCanvasElement?this.options.canvas:document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new a.ErrorEvent(new Error("Canvas dimensions cannot be less than or equal to zero."))):(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(c){this.map=c,this.load(),this.canvas&&this.animate&&this.play()}onRemove(){this.pause()}prepare(){let c=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,c=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,c=!0),this._hasInvalidDimensions()||Object.keys(this.tiles).length===0)return;const m=this.map.painter.context,x=m.gl;this.boundsBuffer||(this.boundsBuffer=m.createVertexBuffer(this._boundsArray,oe.members)),this.boundsSegments||(this.boundsSegments=a.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(c||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new T(m,this.canvas,x.RGBA,{premultiply:!0});for(const S in this.tiles){const R=this.tiles[S];R.state!=="loaded"&&(R.state="loaded",R.texture=this.texture)}}serialize(){return{type:"canvas",coordinates:this.coordinates}}hasTransition(){return this._playing}_hasInvalidDimensions(){for(const c of[this.canvas.width,this.canvas.height])if(isNaN(c)||c<=0)return!0;return!1}}const be={vector:X,raster:J,"raster-dem":re,geojson:se,video:Ce,image:he,canvas:Se};function Re(w,c){const m=a.create();return a.translate(m,m,[1,1,0]),a.scale(m,m,[.5*w.width,.5*w.height,1]),a.multiply(m,m,w.calculatePosMatrix(c.toUnwrapped()))}function Ie(w,c,m,x,S,R){const L=function(le,pe,Te){if(le)for(const _e of le){const Ee=pe[_e];if(Ee&&Ee.source===Te&&Ee.type==="fill-extrusion")return!0}else for(const _e in pe){const Ee=pe[_e];if(Ee.source===Te&&Ee.type==="fill-extrusion")return!0}return!1}(S&&S.layers,c,w.id),V=R.maxPitchScaleFactor(),H=w.tilesIn(x,V,L);H.sort(Me);const G=[];for(const le of H)G.push({wrappedTileID:le.tileID.wrapped().key,queryResults:le.tile.queryRenderedFeatures(c,m,w._state,le.queryGeometry,le.cameraQueryGeometry,le.scale,S,R,V,Re(w.transform,le.tileID))});const ne=function(le){const pe={},Te={};for(const _e of le){const Ee=_e.queryResults,Be=_e.wrappedTileID,We=Te[Be]=Te[Be]||{};for(const rt in Ee){const Oe=Ee[rt],ft=We[rt]=We[rt]||{},st=pe[rt]=pe[rt]||[];for(const _t of Oe)ft[_t.featureIndex]||(ft[_t.featureIndex]=!0,st.push(_t))}}return pe}(G);for(const le in ne)ne[le].forEach(pe=>{const Te=pe.feature,_e=w.getFeatureState(Te.layer["source-layer"],Te.id);Te.source=Te.layer.source,Te.layer["source-layer"]&&(Te.sourceLayer=Te.layer["source-layer"]),Te.state=_e});return ne}function Me(w,c){const m=w.tileID,x=c.tileID;return m.overscaledZ-x.overscaledZ||m.canonical.y-x.canonical.y||m.wrap-x.wrap||m.canonical.x-x.canonical.x}class Ae{constructor(c,m){this.tileID=c,this.uid=a.uniqueId(),this.uses=0,this.tileSize=m,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.textures=[],this.textureCoords={},this.expiredRequestCount=0,this.state="loading"}registerFadeDuration(c){const m=c+this.timeAdded;m<a.exported.now()||this.fadeEndTime&&m<this.fadeEndTime||(this.fadeEndTime=m)}wasRequested(){return this.state==="errored"||this.state==="loaded"||this.state==="reloading"}clearTextures(c){this.demTexture&&c.saveTileTexture(this.demTexture),this.textures.forEach(m=>c.saveTileTexture(m)),this.demTexture=null,this.textures=[],this.textureCoords={}}loadVectorData(c,m,x){if(this.hasData()&&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,R){const L={};if(!R)return L;for(const V of S){const H=V.layerIds.map(G=>R.getLayer(G)).filter(Boolean);if(H.length!==0){V.layers=H,V.stateDependentLayerIds&&(V.stateDependentLayers=V.stateDependentLayerIds.map(G=>H.filter(ne=>ne.id===G)[0]));for(const G of H)L[G.id]=V}}return L}(c.buckets,m.style),this.hasSymbolBuckets=!1;for(const S in this.buckets){const R=this.buckets[S];if(R instanceof a.SymbolBucket){if(this.hasSymbolBuckets=!0,!x)break;R.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(const S in this.buckets){const R=this.buckets[S];if(R instanceof a.SymbolBucket&&R.hasRTLText){this.hasRTLText=!0,a.lazyLoadRTLTextPlugin();break}}this.queryPadding=0;for(const S in this.buckets){const R=this.buckets[S];this.queryPadding=Math.max(this.queryPadding,m.style.getLayer(S).queryRadius(R))}c.imageAtlas&&(this.imageAtlas=c.imageAtlas),c.glyphAtlasImage&&(this.glyphAtlasImage=c.glyphAtlasImage)}else this.collisionBoxArray=new a.CollisionBoxArray}unloadVectorData(){for(const c in this.buckets)this.buckets[c].destroy();this.buckets={},this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.imageAtlas&&(this.imageAtlas=null),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.latestFeatureIndex=null,this.state="unloaded"}getBucket(c){return this.buckets[c.id]}upload(c){for(const x in this.buckets){const S=this.buckets[x];S.uploadPending()&&S.upload(c)}const m=c.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new T(c,this.imageAtlas.image,m.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new T(c,this.glyphAtlasImage,m.ALPHA),this.glyphAtlasImage=null)}prepare(c){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(c,this.imageAtlasTexture)}queryRenderedFeatures(c,m,x,S,R,L,V,H,G,ne){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:S,cameraQueryGeometry:R,scale:L,tileSize:this.tileSize,pixelPosMatrix:ne,transform:H,params:V,queryPadding:this.queryPadding*G},c,m,x):{}}querySourceFeatures(c,m){const x=this.latestFeatureIndex;if(!x||!x.rawTileData)return;const S=x.loadVTLayers(),R=m?m.sourceLayer:"",L=S._geojsonTileLayer||S[R];if(!L)return;const V=a.createFilter(m&&m.filter),{z:H,x:G,y:ne}=this.tileID.canonical,le={z:H,x:G,y:ne};for(let pe=0;pe<L.length;pe++){const Te=L.feature(pe);if(V.needGeometry){const Be=a.toEvaluationFeature(Te,!0);if(!V.filter(new a.EvaluationParameters(this.tileID.overscaledZ),Be,this.tileID.canonical))continue}else if(!V.filter(new a.EvaluationParameters(this.tileID.overscaledZ),Te))continue;const _e=x.getId(Te,R),Ee=new a.GeoJSONFeature(Te,H,G,ne,_e);Ee.tile=le,c.push(Ee)}}hasData(){return this.state==="loaded"||this.state==="reloading"||this.state==="expired"}patternsLoaded(){return this.imageAtlas&&!!Object.keys(this.imageAtlas.patternPositions).length}setExpiryData(c){const m=this.expirationTime;if(c.cacheControl){const x=a.parseCacheControl(c.cacheControl);x["max-age"]&&(this.expirationTime=Date.now()+1e3*x["max-age"])}else c.expires&&(this.expirationTime=new Date(c.expires).getTime());if(this.expirationTime){const x=Date.now();let S=!1;if(this.expirationTime>x)S=!1;else if(m)if(this.expirationTime<m)S=!0;else{const R=this.expirationTime-m;R?this.expirationTime=x+Math.max(R,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,m){if(!this.latestFeatureIndex||!this.latestFeatureIndex.rawTileData||Object.keys(c).length===0)return;const x=this.latestFeatureIndex.loadVTLayers();for(const S in this.buckets){if(!m.style.hasLayer(S))continue;const R=this.buckets[S],L=R.layers[0].sourceLayer||"_geojsonTileLayer",V=x[L],H=c[L];if(!V||!H||Object.keys(H).length===0)continue;R.update(H,V,this.imageAtlas&&this.imageAtlas.patternPositions||{});const G=m&&m.style&&m.style.getLayer(S);G&&(this.queryPadding=Math.max(this.queryPadding,G.queryRadius(R)))}}holdingForFade(){return this.symbolFadeHoldUntil!==void 0}symbolFadeFinished(){return!this.symbolFadeHoldUntil||this.symbolFadeHoldUntil<a.exported.now()}clearFadeHold(){this.symbolFadeHoldUntil=void 0}setHoldDuration(c){this.symbolFadeHoldUntil=a.exported.now()+c}setDependencies(c,m){const x={};for(const S of m)x[S]=!0;this.dependencies[c]=x}hasDependency(c,m){for(const x of c){const S=this.dependencies[x];if(S){for(const R of m)if(S[R])return!0}}return!1}}class ze{constructor(c,m){this.max=c,this.onRemove=m,this.reset()}reset(){for(const c in this.data)for(const m of this.data[c])m.timeout&&clearTimeout(m.timeout),this.onRemove(m.value);return this.data={},this.order=[],this}add(c,m,x){const S=c.wrapped().key;this.data[S]===void 0&&(this.data[S]=[]);const R={value:m,timeout:void 0};if(x!==void 0&&(R.timeout=setTimeout(()=>{this.remove(c,R)},x)),this.data[S].push(R),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 m=this.data[c].shift();return m.timeout&&clearTimeout(m.timeout),this.data[c].length===0&&delete this.data[c],this.order.splice(this.order.indexOf(c),1),m.value}getByKey(c){const m=this.data[c];return m?m[0].value:null}get(c){return this.has(c)?this.data[c.wrapped().key][0].value:null}remove(c,m){if(!this.has(c))return this;const x=c.wrapped().key,S=m===void 0?0:this.data[x].indexOf(m),R=this.data[x][S];return this.data[x].splice(S,1),R.timeout&&clearTimeout(R.timeout),this.data[x].length===0&&delete this.data[x],this.onRemove(R.value),this.order.splice(this.order.indexOf(x),1),this}setMaxSize(c){for(this.max=c;this.order.length>this.max;){const m=this._getAndRemoveByKey(this.order[0]);m&&this.onRemove(m)}return this}filter(c){const m=[];for(const x in this.data)for(const S of this.data[x])c(S.value)||m.push(S);for(const x of m)this.remove(x.value.tileID,x)}}class Ke{constructor(){this.state={},this.stateChanges={},this.deletedStates={}}updateState(c,m,x){const S=String(m);if(this.stateChanges[c]=this.stateChanges[c]||{},this.stateChanges[c][S]=this.stateChanges[c][S]||{},a.extend(this.stateChanges[c][S],x),this.deletedStates[c]===null){this.deletedStates[c]={};for(const R in this.state[c])R!==S&&(this.deletedStates[c][R]=null)}else if(this.deletedStates[c]&&this.deletedStates[c][S]===null){this.deletedStates[c][S]={};for(const R in this.state[c][S])x[R]||(this.deletedStates[c][S][R]=null)}else for(const R in x)this.deletedStates[c]&&this.deletedStates[c][S]&&this.deletedStates[c][S][R]===null&&delete this.deletedStates[c][S][R]}removeFeatureState(c,m,x){if(this.deletedStates[c]===null)return;const S=String(m);if(this.deletedStates[c]=this.deletedStates[c]||{},x&&m!==void 0)this.deletedStates[c][S]!==null&&(this.deletedStates[c][S]=this.deletedStates[c][S]||{},this.deletedStates[c][S][x]=null);else if(m!==void 0)if(this.stateChanges[c]&&this.stateChanges[c][S])for(x in this.deletedStates[c][S]={},this.stateChanges[c][S])this.deletedStates[c][S][x]=null;else this.deletedStates[c][S]=null;else this.deletedStates[c]=null}getState(c,m){const x=String(m),S=a.extend({},(this.state[c]||{})[x],(this.stateChanges[c]||{})[x]);if(this.deletedStates[c]===null)return{};if(this.deletedStates[c]){const R=this.deletedStates[c][m];if(R===null)return{};for(const L in R)delete S[L]}return S}initializeTileState(c,m){c.setFeatureState(this.state,m)}coalesceChanges(c,m){const x={};for(const S in this.stateChanges){this.state[S]=this.state[S]||{};const R={};for(const L in this.stateChanges[S])this.state[S][L]||(this.state[S][L]={}),a.extend(this.state[S][L],this.stateChanges[S][L]),R[L]=this.state[S][L];x[S]=R}for(const S in this.deletedStates){this.state[S]=this.state[S]||{};const R={};if(this.deletedStates[S]===null)for(const L in this.state[S])R[L]={},this.state[S][L]={};else for(const L in this.deletedStates[S]){if(this.deletedStates[S][L]===null)this.state[S][L]={};else for(const V of Object.keys(this.deletedStates[S][L]))delete this.state[S][L][V];R[L]=this.state[S][L]}x[S]=x[S]||{},a.extend(x[S],R)}if(this.stateChanges={},this.deletedStates={},Object.keys(x).length!==0)for(const S in c)c[S].setFeatureState(x,m)}}class Ue extends a.Evented{constructor(c,m,x){super(),this.id=c,this.dispatcher=x,this.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,this.terrain))}),this.on("dataloading",()=>{this._sourceErrored=!1}),this.on("error",()=>{this._sourceErrored=this._source.loaded()}),this._source=function(S,R,L,V){const H=new be[R.type](S,R,L,V);if(H.id!==S)throw new Error(`Expected Source id to be ${S} instead of ${H.id}`);return a.bindAll(["load","abort","unload","serialize","prepare"],H),H}(c,m,x,this),this._tiles={},this._cache=new ze(0,this._unloadTile.bind(this)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new Ke}onAdd(c){this.map=c,this._maxTileCacheSize=c?c._maxTileCacheSize:null,this._source&&this._source.onAdd&&this._source.onAdd(c)}onRemove(c){this.clearTiles(),this._source&&this._source.onRemove&&this._source.onRemove(c)}loaded(){if(this._sourceErrored)return!0;if(!this._sourceLoaded||!this._source.loaded())return!1;for(const c in this._tiles){const m=this._tiles[c];if(m.state!=="loaded"&&m.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,this.terrain)}_loadTile(c,m){return this._source.loadTile(c,m)}_unloadTile(c){if(this._source.unloadTile)return this._source.unloadTile(c,()=>{})}_abortTile(c){this._source.abortTile&&this._source.abortTile(c,()=>{}),this._source.fire(new a.Event("dataabort",{tile:c,coord:c.tileID,dataType:"source"}))}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 m in this._tiles){const x=this._tiles[m];x.upload(c),x.prepare(this.map.style.imageManager)}}getIds(){return Object.values(this._tiles).map(c=>c.tileID).sort(pt).map(c=>c.key)}getRenderableIds(c){const m=[];for(const x in this._tiles)this._isIdRenderable(x,c)&&m.push(this._tiles[x]);return c?m.sort((x,S)=>{const R=x.tileID,L=S.tileID,V=new a.pointGeometry(R.canonical.x,R.canonical.y)._rotate(this.transform.angle),H=new a.pointGeometry(L.canonical.x,L.canonical.y)._rotate(this.transform.angle);return R.overscaledZ-L.overscaledZ||H.y-V.y||H.x-V.x}).map(x=>x.tileID.key):m.map(x=>x.tileID).sort(pt).map(x=>x.key)}hasRenderableParent(c){const m=this.findLoadedParent(c,0);return!!m&&this._isIdRenderable(m.tileID.key)}_isIdRenderable(c,m){return this._tiles[c]&&this._tiles[c].hasData()&&!this._coveredTiles[c]&&(m||!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,m){const x=this._tiles[c];x&&(x.state!=="loading"&&(x.state=m),this._loadTile(x,this._tileLoaded.bind(this,x,c,m)))}_tileLoaded(c,m,x,S){if(S)return c.state="errored",void(S.status!==404?this._source.fire(new a.ErrorEvent(S,{tile:c})):this.update(this.transform,this.terrain));c.timeAdded=a.exported.now(),x==="expired"&&(c.refreshedUponExpiration=!0),this._setTileReloadTimer(m,c),this.getSource().type==="raster-dem"&&c.dem&&this._backfillDEM(c),this._state.initializeTileState(c,this.map?this.map.painter:null),c.aborted||this._source.fire(new a.Event("data",{dataType:"source",tile:c,coord:c.tileID}))}_backfillDEM(c){const m=this.getRenderableIds();for(let S=0;S<m.length;S++){const R=m[S];if(c.neighboringTiles&&c.neighboringTiles[R]){const L=this.getTileByID(R);x(c,L),x(L,c)}}function x(S,R){S.needsHillshadePrepare=!0,S.needsTerrainPrepare=!0;let L=R.tileID.canonical.x-S.tileID.canonical.x;const V=R.tileID.canonical.y-S.tileID.canonical.y,H=Math.pow(2,S.tileID.canonical.z),G=R.tileID.key;L===0&&V===0||Math.abs(V)>1||(Math.abs(L)>1&&(Math.abs(L+H)===1?L+=H:Math.abs(L-H)===1&&(L-=H)),R.dem&&S.dem&&(S.dem.backfillBorder(R.dem,L,V),S.neighboringTiles&&S.neighboringTiles[G]&&(S.neighboringTiles[G].backfilled=!0)))}}getTile(c){return this.getTileByID(c.key)}getTileByID(c){return this._tiles[c]}_retainLoadedChildren(c,m,x,S){for(const R in this._tiles){let L=this._tiles[R];if(S[R]||!L.hasData()||L.tileID.overscaledZ<=m||L.tileID.overscaledZ>x)continue;let V=L.tileID;for(;L&&L.tileID.overscaledZ>m+1;){const G=L.tileID.scaledTo(L.tileID.overscaledZ-1);L=this._tiles[G.key],L&&L.hasData()&&(V=G)}let H=V;for(;H.overscaledZ>m;)if(H=H.scaledTo(H.overscaledZ-1),c[H.key]){S[V.key]=V;break}}}findLoadedParent(c,m){if(c.key in this._loadedParentTiles){const x=this._loadedParentTiles[c.key];return x&&x.tileID.overscaledZ>=m?x:null}for(let x=c.overscaledZ-1;x>=m;x--){const S=c.scaledTo(x),R=this._getLoadedTile(S);if(R)return R}}_getLoadedTile(c){const m=this._tiles[c.key];return m&&m.hasData()?m:this._cache.getByKey(c.wrapped().key)}updateCacheSize(c){const m=Math.ceil(c.width/this._source.tileSize)+1,x=Math.ceil(c.height/this._source.tileSize)+1,S=Math.floor(m*x*5),R=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,S):S;this._cache.setMaxSize(R)}handleWrapJump(c){const m=Math.round((c-(this._prevLng===void 0?c:this._prevLng))/360);if(this._prevLng=c,m){const x={};for(const S in this._tiles){const R=this._tiles[S];R.tileID=R.tileID.unwrapTo(R.tileID.wrap+m),x[R.tileID.key]=R}this._tiles=x;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,m){if(this.transform=c,this.terrain=m,!this._sourceLoaded||this._paused)return;let x;this.updateCacheSize(c),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used||this.usedForTerrain?this._source.tileID?x=c.getVisibleUnwrappedCoordinates(this._source.tileID).map(G=>new a.OverscaledTileID(G.canonical.z,G.wrap,G.canonical.z,G.canonical.x,G.canonical.y)):(x=c.coveringTiles({tileSize:this.usedForTerrain?this.tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:!this.usedForTerrain&&this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled,terrain:m}),this._source.hasTile&&(x=x.filter(G=>this._source.hasTile(G)))):x=[];const S=c.coveringZoomLevel(this._source),R=Math.max(S-Ue.maxOverzooming,this._source.minzoom),L=Math.max(S+Ue.maxUnderzooming,this._source.minzoom);if(this.usedForTerrain){const G={};for(const ne of x)if(ne.canonical.z>this._source.minzoom){const le=ne.scaledTo(ne.canonical.z-1);G[le.key]=le;const pe=ne.scaledTo(Math.max(this._source.minzoom,Math.min(ne.canonical.z,5)));G[pe.key]=pe}x=x.concat(Object.values(G))}const V=this._updateRetainedTiles(x,S);if(gt(this._source.type)){const G={},ne={},le=Object.keys(V);for(const pe of le){const Te=V[pe],_e=this._tiles[pe];if(!_e||_e.fadeEndTime&&_e.fadeEndTime<=a.exported.now())continue;const Ee=this.findLoadedParent(Te,R);Ee&&(this._addTile(Ee.tileID),G[Ee.tileID.key]=Ee.tileID),ne[pe]=Te}this._retainLoadedChildren(ne,S,L,V);for(const pe in G)V[pe]||(this._coveredTiles[pe]=!0,V[pe]=G[pe]);if(m){const pe={},Te={};for(const _e of x)this._tiles[_e.key].hasData()?pe[_e.key]=_e:Te[_e.key]=_e;for(const _e in Te){const Ee=Te[_e].children(this._source.maxzoom);this._tiles[Ee[0].key]&&this._tiles[Ee[1].key]&&this._tiles[Ee[2].key]&&this._tiles[Ee[3].key]&&(pe[Ee[0].key]=V[Ee[0].key]=Ee[0],pe[Ee[1].key]=V[Ee[1].key]=Ee[1],pe[Ee[2].key]=V[Ee[2].key]=Ee[2],pe[Ee[3].key]=V[Ee[3].key]=Ee[3],delete Te[_e])}for(const _e in Te){const Ee=this.findLoadedParent(Te[_e],this._source.minzoom);if(Ee){pe[Ee.tileID.key]=V[Ee.tileID.key]=Ee.tileID;for(const Be in pe)pe[Be].isChildOf(Ee.tileID)&&delete pe[Be]}}for(const _e in this._tiles)pe[_e]||(this._coveredTiles[_e]=!0)}}for(const G in V)this._tiles[G].clearFadeHold();const H=a.keysDifference(this._tiles,V);for(const G of H){const ne=this._tiles[G];ne.hasSymbolBuckets&&!ne.holdingForFade()?ne.setHoldDuration(this.map._fadeDuration):ne.hasSymbolBuckets&&!ne.symbolFadeFinished()||this._removeTile(G)}this._updateLoadedParentTileCache()}releaseSymbolFadeTiles(){for(const c in this._tiles)this._tiles[c].holdingForFade()&&this._removeTile(c)}_updateRetainedTiles(c,m){const x={},S={},R=Math.max(m-Ue.maxOverzooming,this._source.minzoom),L=Math.max(m+Ue.maxUnderzooming,this._source.minzoom),V={};for(const H of c){const G=this._addTile(H);x[H.key]=H,G.hasData()||m<this._source.maxzoom&&(V[H.key]=H)}this._retainLoadedChildren(V,m,L,x);for(const H of c){let G=this._tiles[H.key];if(G.hasData())continue;if(m+1>this._source.maxzoom){const le=H.children(this._source.maxzoom)[0],pe=this.getTile(le);if(pe&&pe.hasData()){x[le.key]=le;continue}}else{const le=H.children(this._source.maxzoom);if(x[le[0].key]&&x[le[1].key]&&x[le[2].key]&&x[le[3].key])continue}let ne=G.wasRequested();for(let le=H.overscaledZ-1;le>=R;--le){const pe=H.scaledTo(le);if(S[pe.key]||(S[pe.key]=!0,G=this.getTile(pe),!G&&ne&&(G=this._addTile(pe)),G&&(x[pe.key]=pe,ne=G.wasRequested(),G.hasData())))break}}return x}_updateLoadedParentTileCache(){this._loadedParentTiles={};for(const c in this._tiles){const m=[];let x,S=this._tiles[c].tileID;for(;S.overscaledZ>0;){if(S.key in this._loadedParentTiles){x=this._loadedParentTiles[S.key];break}m.push(S.key);const R=S.scaledTo(S.overscaledZ-1);if(x=this._getLoadedTile(R),x)break;S=R}for(const R of m)this._loadedParentTiles[R]=x}}_addTile(c){let m=this._tiles[c.key];if(m)return m;m=this._cache.getAndRemove(c),m&&(this._setTileReloadTimer(c.key,m),m.tileID=c,this._state.initializeTileState(m,this.map?this.map.painter:null),this._cacheTimers[c.key]&&(clearTimeout(this._cacheTimers[c.key]),delete this._cacheTimers[c.key],this._setTileReloadTimer(c.key,m)));const x=m;return m||(m=new Ae(c,this._source.tileSize*c.overscaleFactor()),this._loadTile(m,this._tileLoaded.bind(this,m,c.key,m.state))),m.uses++,this._tiles[c.key]=m,x||this._source.fire(new a.Event("dataloading",{tile:m,coord:m.tileID,dataType:"source"})),m}_setTileReloadTimer(c,m){c in this._timers&&(clearTimeout(this._timers[c]),delete this._timers[c]);const x=m.getExpiryTimeout();x&&(this._timers[c]=setTimeout(()=>{this._reloadTile(c,"expired"),delete this._timers[c]},x))}_removeTile(c){const m=this._tiles[c];m&&(m.uses--,delete this._tiles[c],this._timers[c]&&(clearTimeout(this._timers[c]),delete this._timers[c]),m.uses>0||(m.hasData()&&m.state!=="reloading"?this._cache.add(m.tileID,m,m.getExpiryTimeout()):(m.aborted=!0,this._abortTile(m),this._unloadTile(m))))}clearTiles(){this._shouldReloadOnResume=!1,this._paused=!1;for(const c in this._tiles)this._removeTile(c);this._cache.reset()}tilesIn(c,m,x){const S=[],R=this.transform;if(!R)return S;const L=x?R.getCameraQueryGeometry(c):c,V=c.map(_e=>R.pointCoordinate(_e,this.terrain)),H=L.map(_e=>R.pointCoordinate(_e,this.terrain)),G=this.getIds();let ne=1/0,le=1/0,pe=-1/0,Te=-1/0;for(const _e of H)ne=Math.min(ne,_e.x),le=Math.min(le,_e.y),pe=Math.max(pe,_e.x),Te=Math.max(Te,_e.y);for(let _e=0;_e<G.length;_e++){const Ee=this._tiles[G[_e]];if(Ee.holdingForFade())continue;const Be=Ee.tileID,We=Math.pow(2,R.zoom-Ee.tileID.overscaledZ),rt=m*Ee.queryPadding*a.EXTENT/Ee.tileSize/We,Oe=[Be.getTilePoint(new a.MercatorCoordinate(ne,le)),Be.getTilePoint(new a.MercatorCoordinate(pe,Te))];if(Oe[0].x-rt<a.EXTENT&&Oe[0].y-rt<a.EXTENT&&Oe[1].x+rt>=0&&Oe[1].y+rt>=0){const ft=V.map(_t=>Be.getTilePoint(_t)),st=H.map(_t=>Be.getTilePoint(_t));S.push({tile:Ee,tileID:Be,queryGeometry:ft,cameraQueryGeometry:st,scale:We})}}return S}getVisibleCoordinates(c){const m=this.getRenderableIds(c).map(x=>this._tiles[x].tileID);for(const x of m)x.posMatrix=this.transform.calculatePosMatrix(x.toUnwrapped());return m}hasTransition(){if(this._source.hasTransition())return!0;if(gt(this._source.type))for(const c in this._tiles){const m=this._tiles[c];if(m.fadeEndTime!==void 0&&m.fadeEndTime>=a.exported.now())return!0}return!1}setFeatureState(c,m,x){this._state.updateState(c=c||"_geojsonTileLayer",m,x)}removeFeatureState(c,m,x){this._state.removeFeatureState(c=c||"_geojsonTileLayer",m,x)}getFeatureState(c,m){return this._state.getState(c=c||"_geojsonTileLayer",m)}setDependencies(c,m,x){const S=this._tiles[c];S&&S.setDependencies(m,x)}reloadTilesForDependencies(c,m){for(const x in this._tiles)this._tiles[x].hasDependency(c,m)&&this._reloadTile(x,"reloading");this._cache.filter(x=>!x.hasDependency(c,m))}}function pt(w,c){const m=Math.abs(2*w.wrap)-+(w.wrap<0),x=Math.abs(2*c.wrap)-+(c.wrap<0);return w.overscaledZ-c.overscaledZ||x-m||c.canonical.y-w.canonical.y||c.canonical.x-w.canonical.x}function gt(w){return w==="raster"||w==="image"||w==="video"}Ue.maxOverzooming=10,Ue.maxUnderzooming=3;const Ot="mapboxgl_preloaded_worker_pool";class qe{constructor(){this.active={}}acquire(c){if(!this.workers)for(this.workers=[];this.workers.length<qe.workerCount;)this.workers.push(new Worker(ml.workerUrl));return this.active[c]=!0,this.workers.slice()}release(c){delete this.active[c],this.numActive()===0&&(this.workers.forEach(m=>{m.terminate()}),this.workers=null)}isPreloaded(){return!!this.active[Ot]}numActive(){return Object.keys(this.active).length}}const Ct=Math.floor(a.exported.hardwareConcurrency/2);let ot;function vt(){return ot||(ot=new qe),ot}function yt(w,c){const m={};for(const x in w)x!=="ref"&&(m[x]=w[x]);return a.refProperties.forEach(x=>{x in c&&(m[x]=c[x])}),m}function Tt(w){w=w.slice();const c=Object.create(null);for(let m=0;m<w.length;m++)c[w[m].id]=w[m];for(let m=0;m<w.length;m++)"ref"in w[m]&&(w[m]=yt(w[m],c[w[m].ref]));return w}qe.workerCount=Math.max(Math.min(Ct,6),1);const et={setStyle:"setStyle",addLayer:"addLayer",removeLayer:"removeLayer",setPaintProperty:"setPaintProperty",setLayoutProperty:"setLayoutProperty",setFilter:"setFilter",addSource:"addSource",removeSource:"removeSource",setGeoJSONSourceData:"setGeoJSONSourceData",setLayerZoomRange:"setLayerZoomRange",setLayerProperty:"setLayerProperty",setCenter:"setCenter",setZoom:"setZoom",setBearing:"setBearing",setPitch:"setPitch",setSprite:"setSprite",setGlyphs:"setGlyphs",setTransition:"setTransition",setLight:"setLight"};function ct(w,c,m){m.push({command:et.addSource,args:[w,c[w]]})}function at(w,c,m){c.push({command:et.removeSource,args:[w]}),m[w]=!0}function He(w,c,m,x){at(w,m,x),ct(w,c,m)}function ut(w,c,m){let x;for(x in w[m])if(Object.prototype.hasOwnProperty.call(w[m],x)&&x!=="data"&&!g(w[m][x],c[m][x]))return!1;for(x in c[m])if(Object.prototype.hasOwnProperty.call(c[m],x)&&x!=="data"&&!g(w[m][x],c[m][x]))return!1;return!0}function bt(w,c,m,x,S,R){let L;for(L in c=c||{},w=w||{})Object.prototype.hasOwnProperty.call(w,L)&&(g(w[L],c[L])||m.push({command:R,args:[x,L,c[L],S]}));for(L in c)Object.prototype.hasOwnProperty.call(c,L)&&!Object.prototype.hasOwnProperty.call(w,L)&&(g(w[L],c[L])||m.push({command:R,args:[x,L,c[L],S]}))}function Dt(w){return w.id}function Lt(w,c){return w[c.id]=c,w}class Ht{constructor(c,m){this.reset(c,m)}reset(c,m){this.points=c||[],this._distances=[0];for(let x=1;x<this.points.length;x++)this._distances[x]=this._distances[x-1]+this.points[x].dist(this.points[x-1]);this.length=this._distances[this._distances.length-1],this.padding=Math.min(m||0,.5*this.length),this.paddedLength=this.length-2*this.padding}lerp(c){if(this.points.length===1)return this.points[0];c=a.clamp(c,0,1);let m=1,x=this._distances[m];const S=c*this.paddedLength+this.padding;for(;x<S&&m<this._distances.length;)x=this._distances[++m];const R=m-1,L=this._distances[R],V=x-L,H=V>0?(S-L)/V:0;return this.points[R].mult(1-H).add(this.points[m].mult(H))}}function Fe(w,c){let m=!0;return w==="always"||w!=="never"&&c!=="never"||(m=!1),m}class Ye{constructor(c,m,x){const S=this.boxCells=[],R=this.circleCells=[];this.xCellCount=Math.ceil(c/x),this.yCellCount=Math.ceil(m/x);for(let L=0;L<this.xCellCount*this.yCellCount;L++)S.push([]),R.push([]);this.circleKeys=[],this.boxKeys=[],this.bboxes=[],this.circles=[],this.width=c,this.height=m,this.xScale=this.xCellCount/c,this.yScale=this.yCellCount/m,this.boxUid=0,this.circleUid=0}keysLength(){return this.boxKeys.length+this.circleKeys.length}insert(c,m,x,S,R){this._forEachCell(m,x,S,R,this._insertBoxCell,this.boxUid++),this.boxKeys.push(c),this.bboxes.push(m),this.bboxes.push(x),this.bboxes.push(S),this.bboxes.push(R)}insertCircle(c,m,x,S){this._forEachCell(m-S,x-S,m+S,x+S,this._insertCircleCell,this.circleUid++),this.circleKeys.push(c),this.circles.push(m),this.circles.push(x),this.circles.push(S)}_insertBoxCell(c,m,x,S,R,L){this.boxCells[R].push(L)}_insertCircleCell(c,m,x,S,R,L){this.circleCells[R].push(L)}_query(c,m,x,S,R,L,V){if(x<0||c>this.width||S<0||m>this.height)return[];const H=[];if(c<=0&&m<=0&&this.width<=x&&this.height<=S){if(R)return[{key:null,x1:c,y1:m,x2:x,y2:S}];for(let G=0;G<this.boxKeys.length;G++)H.push({key:this.boxKeys[G],x1:this.bboxes[4*G],y1:this.bboxes[4*G+1],x2:this.bboxes[4*G+2],y2:this.bboxes[4*G+3]});for(let G=0;G<this.circleKeys.length;G++){const ne=this.circles[3*G],le=this.circles[3*G+1],pe=this.circles[3*G+2];H.push({key:this.circleKeys[G],x1:ne-pe,y1:le-pe,x2:ne+pe,y2:le+pe})}}else this._forEachCell(c,m,x,S,this._queryCell,H,{hitTest:R,overlapMode:L,seenUids:{box:{},circle:{}}},V);return H}query(c,m,x,S){return this._query(c,m,x,S,!1,null)}hitTest(c,m,x,S,R,L){return this._query(c,m,x,S,!0,R,L).length>0}hitTestCircle(c,m,x,S,R){const L=c-x,V=c+x,H=m-x,G=m+x;if(V<0||L>this.width||G<0||H>this.height)return!1;const ne=[];return this._forEachCell(L,H,V,G,this._queryCellCircle,ne,{hitTest:!0,overlapMode:S,circle:{x:c,y:m,radius:x},seenUids:{box:{},circle:{}}},R),ne.length>0}_queryCell(c,m,x,S,R,L,V,H){const{seenUids:G,hitTest:ne,overlapMode:le}=V,pe=this.boxCells[R];if(pe!==null){const _e=this.bboxes;for(const Ee of pe)if(!G.box[Ee]){G.box[Ee]=!0;const Be=4*Ee,We=this.boxKeys[Ee];if(c<=_e[Be+2]&&m<=_e[Be+3]&&x>=_e[Be+0]&&S>=_e[Be+1]&&(!H||H(We))&&(!ne||!Fe(le,We.overlapMode))&&(L.push({key:We,x1:_e[Be],y1:_e[Be+1],x2:_e[Be+2],y2:_e[Be+3]}),ne))return!0}}const Te=this.circleCells[R];if(Te!==null){const _e=this.circles;for(const Ee of Te)if(!G.circle[Ee]){G.circle[Ee]=!0;const Be=3*Ee,We=this.circleKeys[Ee];if(this._circleAndRectCollide(_e[Be],_e[Be+1],_e[Be+2],c,m,x,S)&&(!H||H(We))&&(!ne||!Fe(le,We.overlapMode))){const rt=_e[Be],Oe=_e[Be+1],ft=_e[Be+2];if(L.push({key:We,x1:rt-ft,y1:Oe-ft,x2:rt+ft,y2:Oe+ft}),ne)return!0}}}return!1}_queryCellCircle(c,m,x,S,R,L,V,H){const{circle:G,seenUids:ne,overlapMode:le}=V,pe=this.boxCells[R];if(pe!==null){const _e=this.bboxes;for(const Ee of pe)if(!ne.box[Ee]){ne.box[Ee]=!0;const Be=4*Ee,We=this.boxKeys[Ee];if(this._circleAndRectCollide(G.x,G.y,G.radius,_e[Be+0],_e[Be+1],_e[Be+2],_e[Be+3])&&(!H||H(We))&&!Fe(le,We.overlapMode))return L.push(!0),!0}}const Te=this.circleCells[R];if(Te!==null){const _e=this.circles;for(const Ee of Te)if(!ne.circle[Ee]){ne.circle[Ee]=!0;const Be=3*Ee,We=this.circleKeys[Ee];if(this._circlesCollide(_e[Be],_e[Be+1],_e[Be+2],G.x,G.y,G.radius)&&(!H||H(We))&&!Fe(le,We.overlapMode))return L.push(!0),!0}}}_forEachCell(c,m,x,S,R,L,V,H){const G=this._convertToXCellCoord(c),ne=this._convertToYCellCoord(m),le=this._convertToXCellCoord(x),pe=this._convertToYCellCoord(S);for(let Te=G;Te<=le;Te++)for(let _e=ne;_e<=pe;_e++)if(R.call(this,c,m,x,S,this.xCellCount*_e+Te,L,V,H))return}_convertToXCellCoord(c){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(c*this.xScale)))}_convertToYCellCoord(c){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(c*this.yScale)))}_circlesCollide(c,m,x,S,R,L){const V=S-c,H=R-m,G=x+L;return G*G>V*V+H*H}_circleAndRectCollide(c,m,x,S,R,L,V){const H=(L-S)/2,G=Math.abs(c-(S+H));if(G>H+x)return!1;const ne=(V-R)/2,le=Math.abs(m-(R+ne));if(le>ne+x)return!1;if(G<=H||le<=ne)return!0;const pe=G-H,Te=le-ne;return pe*pe+Te*Te<=x*x}}function Zt(w,c,m,x,S){const R=a.create();return c?(a.scale(R,R,[1/S,1/S,1]),m||a.rotateZ(R,R,x.angle)):a.multiply(R,x.labelPlaneMatrix,w),R}function an(w,c,m,x,S){if(c){const R=a.clone(w);return a.scale(R,R,[S,S,1]),m||a.rotateZ(R,R,-x.angle),R}return x.glCoordMatrix}function Kt(w,c,m){let x;m?(x=[w.x,w.y,m(w.x,w.y),1],a.transformMat4(x,x,c)):(x=[w.x,w.y,0,1],Pn(x,x,c));const S=x[3];return{point:new a.pointGeometry(x[0]/S,x[1]/S),signedDistanceFromCamera:S}}function Vt(w,c){return .5+w/c*.5}function It(w,c){const m=w[0]/w[3],x=w[1]/w[3];return m>=-c[0]&&m<=c[0]&&x>=-c[1]&&x<=c[1]}function Xt(w,c,m,x,S,R,L,V,H,G){const ne=x?w.textSizeData:w.iconSizeData,le=a.evaluateSizeForZoom(ne,m.transform.zoom),pe=[256/m.width*2+1,256/m.height*2+1],Te=x?w.text.dynamicLayoutVertexArray:w.icon.dynamicLayoutVertexArray;Te.clear();const _e=w.lineVertexArray,Ee=x?w.text.placedSymbolArray:w.icon.placedSymbolArray,Be=m.transform.width/m.transform.height;let We=!1;for(let rt=0;rt<Ee.length;rt++){const Oe=Ee.get(rt);if(Oe.hidden||Oe.writingMode===a.WritingMode.vertical&&!We){St(Oe.numGlyphs,Te);continue}let ft;if(We=!1,G?(ft=[Oe.anchorX,Oe.anchorY,G(Oe.anchorX,Oe.anchorY),1],a.transformMat4(ft,ft,c)):(ft=[Oe.anchorX,Oe.anchorY,0,1],Pn(ft,ft,c)),!It(ft,pe)){St(Oe.numGlyphs,Te);continue}const st=Vt(m.transform.cameraToCenterDistance,ft[3]),_t=a.evaluateSizeForFeature(ne,le,Oe),wt=L?_t/st:_t*st,Ut=new a.pointGeometry(Oe.anchorX,Oe.anchorY),xt=Kt(Ut,S,G).point,un={},Jt=At(Oe,wt,!1,V,c,S,R,w.glyphOffsetArray,_e,Te,xt,Ut,un,Be,H,G);We=Jt.useVertical,(Jt.notEnoughRoom||We||Jt.needsFlipping&&At(Oe,wt,!0,V,c,S,R,w.glyphOffsetArray,_e,Te,xt,Ut,un,Be,H,G).notEnoughRoom)&&St(Oe.numGlyphs,Te)}x?w.text.dynamicLayoutVertexBuffer.updateData(Te):w.icon.dynamicLayoutVertexBuffer.updateData(Te)}function pn(w,c,m,x,S,R,L,V,H,G,ne,le,pe){const Te=V.glyphStartIndex+V.numGlyphs,_e=V.lineStartIndex,Ee=V.lineStartIndex+V.lineLength,Be=c.getoffsetX(V.glyphStartIndex),We=c.getoffsetX(Te-1),rt=En(w*Be,m,x,S,R,L,V.segment,_e,Ee,H,G,ne,le,pe);if(!rt)return null;const Oe=En(w*We,m,x,S,R,L,V.segment,_e,Ee,H,G,ne,le,pe);return Oe?{first:rt,last:Oe}:null}function tt(w,c,m,x){return w===a.WritingMode.horizontal&&Math.abs(m.y-c.y)>Math.abs(m.x-c.x)*x?{useVertical:!0}:(w===a.WritingMode.vertical?c.y<m.y:c.x>m.x)?{needsFlipping:!0}:null}function At(w,c,m,x,S,R,L,V,H,G,ne,le,pe,Te,_e,Ee){const Be=c/24,We=w.lineOffsetX*Be,rt=w.lineOffsetY*Be;let Oe;if(w.numGlyphs>1){const ft=w.glyphStartIndex+w.numGlyphs,st=w.lineStartIndex,_t=w.lineStartIndex+w.lineLength,wt=pn(Be,V,We,rt,m,ne,le,w,H,R,pe,_e,Ee);if(!wt)return{notEnoughRoom:!0};const Ut=Kt(wt.first.point,L,Ee).point,xt=Kt(wt.last.point,L,Ee).point;if(x&&!m){const un=tt(w.writingMode,Ut,xt,Te);if(un)return un}Oe=[wt.first];for(let un=w.glyphStartIndex+1;un<ft-1;un++)Oe.push(En(Be*V.getoffsetX(un),We,rt,m,ne,le,w.segment,st,_t,H,R,pe,_e,Ee));Oe.push(wt.last)}else{if(x&&!m){const st=Kt(le,S,Ee).point,_t=w.lineStartIndex+w.segment+1,wt=new a.pointGeometry(H.getx(_t),H.gety(_t)),Ut=Kt(wt,S,Ee),xt=Ut.signedDistanceFromCamera>0?Ut.point:qt(le,wt,st,1,S,Ee),un=tt(w.writingMode,st,xt,Te);if(un)return un}const ft=En(Be*V.getoffsetX(w.glyphStartIndex),We,rt,m,ne,le,w.segment,w.lineStartIndex,w.lineStartIndex+w.lineLength,H,R,pe,_e,Ee);if(!ft)return{notEnoughRoom:!0};Oe=[ft]}for(const ft of Oe)a.addDynamicAttributes(G,ft.point,ft.angle);return{}}function qt(w,c,m,x,S,R){const L=Kt(w.add(w.sub(c)._unit()),S,R).point,V=m.sub(L);return m.add(V._mult(x/V.mag()))}function En(w,c,m,x,S,R,L,V,H,G,ne,le,pe,Te){const _e=x?w-c:w+c;let Ee=_e>0?1:-1,Be=0;x&&(Ee*=-1,Be=Math.PI),Ee<0&&(Be+=Math.PI);let We=Ee>0?V+L:V+L+1,rt=S,Oe=S,ft=0,st=0;const _t=Math.abs(_e),wt=[];for(;ft+st<=_t;){if(We+=Ee,We<V||We>=H)return null;if(Oe=rt,wt.push(rt),rt=le[We],rt===void 0){const fn=new a.pointGeometry(G.getx(We),G.gety(We)),$n=Kt(fn,ne,Te);if($n.signedDistanceFromCamera>0)rt=le[We]=$n.point;else{const Hn=We-Ee;rt=qt(ft===0?R:new a.pointGeometry(G.getx(Hn),G.gety(Hn)),fn,Oe,_t-ft+1,ne,Te)}}ft+=st,st=Oe.dist(rt)}const Ut=(_t-ft)/st,xt=rt.sub(Oe),un=xt.mult(Ut)._add(Oe);un._add(xt._unit()._perp()._mult(m*Ee));const Jt=Be+Math.atan2(rt.y-Oe.y,rt.x-Oe.x);return wt.push(un),{point:un,angle:pe?Jt:0,path:wt}}const yn=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function St(w,c){for(let m=0;m<w;m++){const x=c.length;c.resize(x+4),c.float32.set(yn,3*x)}}function Pn(w,c,m){const x=c[0],S=c[1];return w[0]=m[0]*x+m[4]*S+m[12],w[1]=m[1]*x+m[5]*S+m[13],w[3]=m[3]*x+m[7]*S+m[15],w}const _n=100;class tn{constructor(c,m=new Ye(c.width+200,c.height+200,25),x=new Ye(c.width+200,c.height+200,25)){this.transform=c,this.grid=m,this.ignoredGrid=x,this.pitchfactor=Math.cos(c._pitch)*c.cameraToCenterDistance,this.screenRightBoundary=c.width+_n,this.screenBottomBoundary=c.height+_n,this.gridRightBoundary=c.width+200,this.gridBottomBoundary=c.height+200,this.perspectiveRatioCutoff=.6}placeCollisionBox(c,m,x,S,R,L){const V=this.projectAndGetPerspectiveRatio(S,c.anchorPointX,c.anchorPointY,L),H=x*V.perspectiveRatio,G=c.x1*H+V.point.x,ne=c.y1*H+V.point.y,le=c.x2*H+V.point.x,pe=c.y2*H+V.point.y;return!this.isInsideGrid(G,ne,le,pe)||m!=="always"&&this.grid.hitTest(G,ne,le,pe,m,R)||V.perspectiveRatio<this.perspectiveRatioCutoff?{box:[],offscreen:!1}:{box:[G,ne,le,pe],offscreen:this.isOffscreen(G,ne,le,pe)}}placeCollisionCircles(c,m,x,S,R,L,V,H,G,ne,le,pe,Te,_e){const Ee=[],Be=new a.pointGeometry(m.anchorX,m.anchorY),We=Kt(Be,L,_e),rt=Vt(this.transform.cameraToCenterDistance,We.signedDistanceFromCamera),Oe=(ne?R/rt:R*rt)/a.ONE_EM,ft=Kt(Be,V,_e).point,st=pn(Oe,S,m.lineOffsetX*Oe,m.lineOffsetY*Oe,!1,ft,Be,m,x,V,{},!1,_e);let _t=!1,wt=!1,Ut=!0;if(st){const xt=.5*pe*rt+Te,un=new a.pointGeometry(-100,-100),Jt=new a.pointGeometry(this.screenRightBoundary,this.screenBottomBoundary),fn=new Ht,$n=st.first,Hn=st.last;let Tn=[];for(let ir=$n.path.length-1;ir>=1;ir--)Tn.push($n.path[ir]);for(let ir=1;ir<Hn.path.length;ir++)Tn.push(Hn.path[ir]);const mr=2.5*xt;if(H){const ir=Tn.map(ar=>Kt(ar,H,_e));Tn=ir.some(ar=>ar.signedDistanceFromCamera<=0)?[]:ir.map(ar=>ar.point)}let gr=[];if(Tn.length>0){const ir=Tn[0].clone(),ar=Tn[0].clone();for(let br=1;br<Tn.length;br++)ir.x=Math.min(ir.x,Tn[br].x),ir.y=Math.min(ir.y,Tn[br].y),ar.x=Math.max(ar.x,Tn[br].x),ar.y=Math.max(ar.y,Tn[br].y);gr=ir.x>=un.x&&ar.x<=Jt.x&&ir.y>=un.y&&ar.y<=Jt.y?[Tn]:ar.x<un.x||ir.x>Jt.x||ar.y<un.y||ir.y>Jt.y?[]:a.clipLine([Tn],un.x,un.y,Jt.x,Jt.y)}for(const ir of gr){fn.reset(ir,.25*xt);let ar=0;ar=fn.length<=.5*xt?1:Math.ceil(fn.paddedLength/mr)+1;for(let br=0;br<ar;br++){const Ti=br/Math.max(ar-1,1),za=fn.lerp(Ti),la=za.x+_n,Fa=za.y+_n;Ee.push(la,Fa,xt,0);const Vs=la-xt,Wo=Fa-xt,vo=la+xt,hs=Fa+xt;if(Ut=Ut&&this.isOffscreen(Vs,Wo,vo,hs),wt=wt||this.isInsideGrid(Vs,Wo,vo,hs),c!=="always"&&this.grid.hitTestCircle(la,Fa,xt,c,le)&&(_t=!0,!G))return{circles:[],offscreen:!1,collisionDetected:_t}}}}return{circles:!G&&_t||!wt||rt<this.perspectiveRatioCutoff?[]:Ee,offscreen:Ut,collisionDetected:_t}}queryRenderedSymbols(c){if(c.length===0||this.grid.keysLength()===0&&this.ignoredGrid.keysLength()===0)return{};const m=[];let x=1/0,S=1/0,R=-1/0,L=-1/0;for(const ne of c){const le=new a.pointGeometry(ne.x+_n,ne.y+_n);x=Math.min(x,le.x),S=Math.min(S,le.y),R=Math.max(R,le.x),L=Math.max(L,le.y),m.push(le)}const V=this.grid.query(x,S,R,L).concat(this.ignoredGrid.query(x,S,R,L)),H={},G={};for(const ne of V){const le=ne.key;if(H[le.bucketInstanceId]===void 0&&(H[le.bucketInstanceId]={}),H[le.bucketInstanceId][le.featureIndex])continue;const pe=[new a.pointGeometry(ne.x1,ne.y1),new a.pointGeometry(ne.x2,ne.y1),new a.pointGeometry(ne.x2,ne.y2),new a.pointGeometry(ne.x1,ne.y2)];a.polygonIntersectsPolygon(m,pe)&&(H[le.bucketInstanceId][le.featureIndex]=!0,G[le.bucketInstanceId]===void 0&&(G[le.bucketInstanceId]=[]),G[le.bucketInstanceId].push(le.featureIndex))}return G}insertCollisionBox(c,m,x,S,R,L){(x?this.ignoredGrid:this.grid).insert({bucketInstanceId:S,featureIndex:R,collisionGroupID:L,overlapMode:m},c[0],c[1],c[2],c[3])}insertCollisionCircles(c,m,x,S,R,L){const V=x?this.ignoredGrid:this.grid,H={bucketInstanceId:S,featureIndex:R,collisionGroupID:L,overlapMode:m};for(let G=0;G<c.length;G+=4)V.insertCircle(H,c[G],c[G+1],c[G+2])}projectAndGetPerspectiveRatio(c,m,x,S){let R;return S?(R=[m,x,S(m,x),1],a.transformMat4(R,R,c)):(R=[m,x,0,1],Pn(R,R,c)),{point:new a.pointGeometry((R[0]/R[3]+1)/2*this.transform.width+_n,(-R[1]/R[3]+1)/2*this.transform.height+_n),perspectiveRatio:.5+this.transform.cameraToCenterDistance/R[3]*.5}}isOffscreen(c,m,x,S){return x<_n||c>=this.screenRightBoundary||S<_n||m>this.screenBottomBoundary}isInsideGrid(c,m,x,S){return x>=0&&c<this.gridRightBoundary&&S>=0&&m<this.gridBottomBoundary}getViewportMatrix(){const c=a.identity([]);return a.translate(c,c,[-100,-100,0]),c}}function Ft(w,c,m){return c*(a.EXTENT/(w.tileSize*Math.pow(2,m-w.tileID.overscaledZ)))}class dt{constructor(c,m,x,S){this.opacity=c?Math.max(0,Math.min(1,c.opacity+(c.placed?m:-m))):S&&x?1:0,this.placed=x}isHidden(){return this.opacity===0&&!this.placed}}class mt{constructor(c,m,x,S,R){this.text=new dt(c?c.text:null,m,x,R),this.icon=new dt(c?c.icon:null,m,S,R)}isHidden(){return this.text.isHidden()&&this.icon.isHidden()}}class $t{constructor(c,m,x){this.text=c,this.icon=m,this.skipFade=x}}class Wt{constructor(){this.invProjMatrix=a.create(),this.viewportMatrix=a.create(),this.circles=[]}}class mn{constructor(c,m,x,S,R){this.bucketInstanceId=c,this.featureIndex=m,this.sourceLayerIndex=x,this.bucketIndex=S,this.tileID=R}}class An{constructor(c){this.crossSourceCollisions=c,this.maxGroupID=0,this.collisionGroups={}}get(c){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[c]){const m=++this.maxGroupID;this.collisionGroups[c]={ID:m,predicate:x=>x.collisionGroupID===m}}return this.collisionGroups[c]}}function Qn(w,c,m,x,S){const{horizontalAlign:R,verticalAlign:L}=a.getAnchorAlignment(w),V=-(R-.5)*c,H=-(L-.5)*m,G=a.evaluateVariableOffset(w,x);return new a.pointGeometry(V+G[0]*S,H+G[1]*S)}function Jn(w,c,m,x,S,R){const{x1:L,x2:V,y1:H,y2:G,anchorPointX:ne,anchorPointY:le}=w,pe=new a.pointGeometry(c,m);return x&&pe._rotate(S?R:-R),{x1:L+pe.x,y1:H+pe.y,x2:V+pe.x,y2:G+pe.y,anchorPointX:ne,anchorPointY:le}}class ye{constructor(c,m,x,S,R){this.transform=c.clone(),this.terrain=m,this.collisionIndex=new tn(this.transform),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=x,this.retainedQueryData={},this.collisionGroups=new An(S),this.collisionCircleArrays={},this.prevPlacement=R,R&&(R.prevPlacement=void 0),this.placedOrientations={}}getBucketParts(c,m,x,S){const R=x.getBucket(m),L=x.latestFeatureIndex;if(!R||!L||m.id!==R.layerIds[0])return;const V=x.collisionBoxArray,H=R.layers[0].layout,G=Math.pow(2,this.transform.zoom-x.tileID.overscaledZ),ne=x.tileSize/a.EXTENT,le=this.transform.calculatePosMatrix(x.tileID.toUnwrapped()),pe=H.get("text-pitch-alignment")==="map",Te=H.get("text-rotation-alignment")==="map",_e=Ft(x,1,this.transform.zoom),Ee=Zt(le,pe,Te,this.transform,_e);let Be=null;if(pe){const rt=an(le,pe,Te,this.transform,_e);Be=a.multiply([],this.transform.labelPlaneMatrix,rt)}this.retainedQueryData[R.bucketInstanceId]=new mn(R.bucketInstanceId,L,R.sourceLayerIndex,R.index,x.tileID);const We={bucket:R,layout:H,posMatrix:le,textLabelPlaneMatrix:Ee,labelToScreenMatrix:Be,scale:G,textPixelRatio:ne,holdingForFade:x.holdingForFade(),collisionBoxArray:V,partiallyEvaluatedTextSize:a.evaluateSizeForZoom(R.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(R.sourceID)};if(S)for(const rt of R.sortKeyRanges){const{sortKey:Oe,symbolInstanceStart:ft,symbolInstanceEnd:st}=rt;c.push({sortKey:Oe,symbolInstanceStart:ft,symbolInstanceEnd:st,parameters:We})}else c.push({symbolInstanceStart:0,symbolInstanceEnd:R.symbolInstances.length,parameters:We})}attemptAnchorPlacement(c,m,x,S,R,L,V,H,G,ne,le,pe,Te,_e,Ee,Be){const We=[pe.textOffset0,pe.textOffset1],rt=Qn(c,x,S,We,R),Oe=this.collisionIndex.placeCollisionBox(Jn(m,rt.x,rt.y,L,V,this.transform.angle),le,H,G,ne.predicate,Be);if((!Ee||this.collisionIndex.placeCollisionBox(Jn(Ee,rt.x,rt.y,L,V,this.transform.angle),le,H,G,ne.predicate,Be).box.length!==0)&&Oe.box.length>0){let ft;if(this.prevPlacement&&this.prevPlacement.variableOffsets[pe.crossTileID]&&this.prevPlacement.placements[pe.crossTileID]&&this.prevPlacement.placements[pe.crossTileID].text&&(ft=this.prevPlacement.variableOffsets[pe.crossTileID].anchor),pe.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");return this.variableOffsets[pe.crossTileID]={textOffset:We,width:x,height:S,anchor:c,textBoxScale:R,prevAnchor:ft},this.markUsedJustification(Te,c,pe,_e),Te.allowVerticalPlacement&&(this.markUsedOrientation(Te,_e,pe),this.placedOrientations[pe.crossTileID]=_e),{shift:rt,placedGlyphBoxes:Oe}}}placeLayerBucketPart(c,m,x){const{bucket:S,layout:R,posMatrix:L,textLabelPlaneMatrix:V,labelToScreenMatrix:H,textPixelRatio:G,holdingForFade:ne,collisionBoxArray:le,partiallyEvaluatedTextSize:pe,collisionGroup:Te}=c.parameters,_e=R.get("text-optional"),Ee=R.get("icon-optional"),Be=a.getOverlapMode(R,"text-overlap","text-allow-overlap"),We=Be==="always",rt=a.getOverlapMode(R,"icon-overlap","icon-allow-overlap"),Oe=rt==="always",ft=R.get("text-rotation-alignment")==="map",st=R.get("text-pitch-alignment")==="map",_t=R.get("icon-text-fit")!=="none",wt=R.get("symbol-z-order")==="viewport-y",Ut=We&&(Oe||!S.hasIconData()||Ee),xt=Oe&&(We||!S.hasTextData()||_e);!S.collisionArrays&&le&&S.deserializeCollisionBoxes(le);const un=(Jt,fn)=>{if(m[Jt.crossTileID])return;if(ne)return void(this.placements[Jt.crossTileID]=new $t(!1,!1,!1));let $n=!1,Hn=!1,Tn=!0,mr=null,gr={box:null,offscreen:null},ir={box:null,offscreen:null},ar=null,br=null,Ti=null,za=0,la=0,Fa=0;fn.textFeatureIndex?za=fn.textFeatureIndex:Jt.useRuntimeCollisionCircles&&(za=Jt.featureIndex),fn.verticalTextFeatureIndex&&(la=fn.verticalTextFeatureIndex);const Vs=this.retainedQueryData[S.bucketInstanceId].tileID,Wo=this.terrain?(yi,Zn)=>this.terrain.getElevation(Vs,yi,Zn):null;for(const yi of["textBox","verticalTextBox","iconBox","verticalIconBox"]){const Zn=fn[yi];Zn&&(Zn.elevation=Wo?Wo(Zn.anchorPointX,Zn.anchorPointY):0)}const vo=fn.textBox;if(vo){const yi=pr=>{let Ii=a.WritingMode.horizontal;if(S.allowVerticalPlacement&&!pr&&this.prevPlacement){const ki=this.prevPlacement.placedOrientations[Jt.crossTileID];ki&&(this.placedOrientations[Jt.crossTileID]=ki,Ii=ki,this.markUsedOrientation(S,Ii,Jt))}return Ii},Zn=(pr,Ii)=>{if(S.allowVerticalPlacement&&Jt.numVerticalGlyphVertices>0&&fn.verticalTextBox){for(const ki of S.writingModes)if(ki===a.WritingMode.vertical?(gr=Ii(),ir=gr):gr=pr(),gr&&gr.box&&gr.box.length)break}else gr=pr()};if(R.get("text-variable-anchor")){let pr=R.get("text-variable-anchor");if(this.prevPlacement&&this.prevPlacement.variableOffsets[Jt.crossTileID]){const Vr=this.prevPlacement.variableOffsets[Jt.crossTileID];pr.indexOf(Vr.anchor)>0&&(pr=pr.filter(Go=>Go!==Vr.anchor),pr.unshift(Vr.anchor))}const Ii=(Vr,Go,gl)=>{const Tp=Vr.x2-Vr.x1,hc=Vr.y2-Vr.y1,hy=Jt.textBoxScale,Ip=_t&&rt==="never"?Go:null;let Us={box:[],offscreen:!1};const vl=Be!=="never"?2*pr.length:pr.length;for(let yl=0;yl<vl;++yl){const uf=this.attemptAnchorPlacement(pr[yl%pr.length],Vr,Tp,hc,hy,ft,st,G,L,Te,yl>=pr.length?Be:"never",Jt,S,gl,Ip,Wo);if(uf&&(Us=uf.placedGlyphBoxes,Us&&Us.box&&Us.box.length)){$n=!0,mr=uf.shift;break}}return Us};Zn(()=>Ii(vo,fn.iconBox,a.WritingMode.horizontal),()=>{const Vr=fn.verticalTextBox;return S.allowVerticalPlacement&&!(gr&&gr.box&&gr.box.length)&&Jt.numVerticalGlyphVertices>0&&Vr?Ii(Vr,fn.verticalIconBox,a.WritingMode.vertical):{box:null,offscreen:null}}),gr&&($n=gr.box,Tn=gr.offscreen);const ki=yi(gr&&gr.box);if(!$n&&this.prevPlacement){const Vr=this.prevPlacement.variableOffsets[Jt.crossTileID];Vr&&(this.variableOffsets[Jt.crossTileID]=Vr,this.markUsedJustification(S,Vr.anchor,Jt,ki))}}else{const pr=(Ii,ki)=>{const Vr=this.collisionIndex.placeCollisionBox(Ii,Be,G,L,Te.predicate,Wo);return Vr&&Vr.box&&Vr.box.length&&(this.markUsedOrientation(S,ki,Jt),this.placedOrientations[Jt.crossTileID]=ki),Vr};Zn(()=>pr(vo,a.WritingMode.horizontal),()=>{const Ii=fn.verticalTextBox;return S.allowVerticalPlacement&&Jt.numVerticalGlyphVertices>0&&Ii?pr(Ii,a.WritingMode.vertical):{box:null,offscreen:null}}),yi(gr&&gr.box&&gr.box.length)}}if(ar=gr,$n=ar&&ar.box&&ar.box.length>0,Tn=ar&&ar.offscreen,Jt.useRuntimeCollisionCircles){const yi=S.text.placedSymbolArray.get(Jt.centerJustifiedTextSymbolIndex),Zn=a.evaluateSizeForFeature(S.textSizeData,pe,yi),pr=R.get("text-padding");br=this.collisionIndex.placeCollisionCircles(Be,yi,S.lineVertexArray,S.glyphOffsetArray,Zn,L,V,H,x,st,Te.predicate,Jt.collisionCircleDiameter,pr,Wo),br.circles.length&&br.collisionDetected&&!x&&a.warnOnce("Collisions detected, but collision boxes are not shown"),$n=We||br.circles.length>0&&!br.collisionDetected,Tn=Tn&&br.offscreen}if(fn.iconFeatureIndex&&(Fa=fn.iconFeatureIndex),fn.iconBox){const yi=Zn=>{const pr=_t&&mr?Jn(Zn,mr.x,mr.y,ft,st,this.transform.angle):Zn;return this.collisionIndex.placeCollisionBox(pr,rt,G,L,Te.predicate,Wo)};ir&&ir.box&&ir.box.length&&fn.verticalIconBox?(Ti=yi(fn.verticalIconBox),Hn=Ti.box.length>0):(Ti=yi(fn.iconBox),Hn=Ti.box.length>0),Tn=Tn&&Ti.offscreen}const hs=_e||Jt.numHorizontalGlyphVertices===0&&Jt.numVerticalGlyphVertices===0,cf=Ee||Jt.numIconVertices===0;if(hs||cf?cf?hs||(Hn=Hn&&$n):$n=Hn&&$n:Hn=$n=Hn&&$n,$n&&ar&&ar.box&&this.collisionIndex.insertCollisionBox(ar.box,Be,R.get("text-ignore-placement"),S.bucketInstanceId,ir&&ir.box&&la?la:za,Te.ID),Hn&&Ti&&this.collisionIndex.insertCollisionBox(Ti.box,rt,R.get("icon-ignore-placement"),S.bucketInstanceId,Fa,Te.ID),br&&($n&&this.collisionIndex.insertCollisionCircles(br.circles,Be,R.get("text-ignore-placement"),S.bucketInstanceId,za,Te.ID),x)){const yi=S.bucketInstanceId;let Zn=this.collisionCircleArrays[yi];Zn===void 0&&(Zn=this.collisionCircleArrays[yi]=new Wt);for(let pr=0;pr<br.circles.length;pr+=4)Zn.circles.push(br.circles[pr+0]),Zn.circles.push(br.circles[pr+1]),Zn.circles.push(br.circles[pr+2]),Zn.circles.push(br.collisionDetected?1:0)}if(Jt.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");if(S.bucketInstanceId===0)throw new Error("bucket.bucketInstanceId can't be 0");this.placements[Jt.crossTileID]=new $t($n||Ut,Hn||xt,Tn||S.justReloaded),m[Jt.crossTileID]=!0};if(wt){if(c.symbolInstanceStart!==0)throw new Error("bucket.bucketInstanceId should be 0");const Jt=S.getSortedSymbolIndexes(this.transform.angle);for(let fn=Jt.length-1;fn>=0;--fn){const $n=Jt[fn];un(S.symbolInstances.get($n),S.collisionArrays[$n])}}else for(let Jt=c.symbolInstanceStart;Jt<c.symbolInstanceEnd;Jt++)un(S.symbolInstances.get(Jt),S.collisionArrays[Jt]);if(x&&S.bucketInstanceId in this.collisionCircleArrays){const Jt=this.collisionCircleArrays[S.bucketInstanceId];a.invert(Jt.invProjMatrix,L),Jt.viewportMatrix=this.collisionIndex.getViewportMatrix()}S.justReloaded=!1}markUsedJustification(c,m,x,S){let R;R=S===a.WritingMode.vertical?x.verticalPlacedTextSymbolIndex:{left:x.leftJustifiedTextSymbolIndex,center:x.centerJustifiedTextSymbolIndex,right:x.rightJustifiedTextSymbolIndex}[a.getAnchorJustification(m)];const L=[x.leftJustifiedTextSymbolIndex,x.centerJustifiedTextSymbolIndex,x.rightJustifiedTextSymbolIndex,x.verticalPlacedTextSymbolIndex];for(const V of L)V>=0&&(c.text.placedSymbolArray.get(V).crossTileID=R>=0&&V!==R?0:x.crossTileID)}markUsedOrientation(c,m,x){const S=m===a.WritingMode.horizontal||m===a.WritingMode.horizontalOnly?m:0,R=m===a.WritingMode.vertical?m:0,L=[x.leftJustifiedTextSymbolIndex,x.centerJustifiedTextSymbolIndex,x.rightJustifiedTextSymbolIndex];for(const V of L)c.text.placedSymbolArray.get(V).placedOrientation=S;x.verticalPlacedTextSymbolIndex&&(c.text.placedSymbolArray.get(x.verticalPlacedTextSymbolIndex).placedOrientation=R)}commit(c){this.commitTime=c,this.zoomAtLastRecencyCheck=this.transform.zoom;const m=this.prevPlacement;let x=!1;this.prevZoomAdjustment=m?m.zoomAdjustment(this.transform.zoom):0;const S=m?m.symbolFadeChange(c):1,R=m?m.opacities:{},L=m?m.variableOffsets:{},V=m?m.placedOrientations:{};for(const H in this.placements){const G=this.placements[H],ne=R[H];ne?(this.opacities[H]=new mt(ne,S,G.text,G.icon),x=x||G.text!==ne.text.placed||G.icon!==ne.icon.placed):(this.opacities[H]=new mt(null,S,G.text,G.icon,G.skipFade),x=x||G.text||G.icon)}for(const H in R){const G=R[H];if(!this.opacities[H]){const ne=new mt(G,S,!1,!1);ne.isHidden()||(this.opacities[H]=ne,x=x||G.text.placed||G.icon.placed)}}for(const H in L)this.variableOffsets[H]||!this.opacities[H]||this.opacities[H].isHidden()||(this.variableOffsets[H]=L[H]);for(const H in V)this.placedOrientations[H]||!this.opacities[H]||this.opacities[H].isHidden()||(this.placedOrientations[H]=V[H]);if(m&&m.lastPlacementChangeTime===void 0)throw new Error("Last placement time for previous placement is not defined");x?this.lastPlacementChangeTime=c:typeof this.lastPlacementChangeTime!="number"&&(this.lastPlacementChangeTime=m?m.lastPlacementChangeTime:c)}updateLayerOpacities(c,m){const x={};for(const S of m){const R=S.getBucket(c);R&&S.latestFeatureIndex&&c.id===R.layerIds[0]&&this.updateBucketOpacities(R,x,S.collisionBoxArray)}}updateBucketOpacities(c,m,x){c.hasTextData()&&c.text.opacityVertexArray.clear(),c.hasIconData()&&c.icon.opacityVertexArray.clear(),c.hasIconCollisionBoxData()&&c.iconCollisionBox.collisionVertexArray.clear(),c.hasTextCollisionBoxData()&&c.textCollisionBox.collisionVertexArray.clear();const S=c.layers[0].layout,R=new mt(null,0,!1,!1,!0),L=S.get("text-allow-overlap"),V=S.get("icon-allow-overlap"),H=S.get("text-variable-anchor"),G=S.get("text-rotation-alignment")==="map",ne=S.get("text-pitch-alignment")==="map",le=S.get("icon-text-fit")!=="none",pe=new mt(null,0,L&&(V||!c.hasIconData()||S.get("icon-optional")),V&&(L||!c.hasTextData()||S.get("text-optional")),!0);!c.collisionArrays&&x&&(c.hasIconCollisionBoxData()||c.hasTextCollisionBoxData())&&c.deserializeCollisionBoxes(x);const Te=(_e,Ee,Be)=>{for(let We=0;We<Ee/4;We++)_e.opacityVertexArray.emplaceBack(Be)};for(let _e=0;_e<c.symbolInstances.length;_e++){const Ee=c.symbolInstances.get(_e),{numHorizontalGlyphVertices:Be,numVerticalGlyphVertices:We,crossTileID:rt}=Ee;let Oe=this.opacities[rt];m[rt]?Oe=R:Oe||(Oe=pe,this.opacities[rt]=Oe),m[rt]=!0;const ft=Ee.numIconVertices>0,st=this.placedOrientations[Ee.crossTileID],_t=st===a.WritingMode.vertical,wt=st===a.WritingMode.horizontal||st===a.WritingMode.horizontalOnly;if(Be>0||We>0){const Ut=Le(Oe.text);Te(c.text,Be,_t?Ze:Ut),Te(c.text,We,wt?Ze:Ut);const xt=Oe.text.isHidden();[Ee.rightJustifiedTextSymbolIndex,Ee.centerJustifiedTextSymbolIndex,Ee.leftJustifiedTextSymbolIndex].forEach(fn=>{fn>=0&&(c.text.placedSymbolArray.get(fn).hidden=xt||_t?1:0)}),Ee.verticalPlacedTextSymbolIndex>=0&&(c.text.placedSymbolArray.get(Ee.verticalPlacedTextSymbolIndex).hidden=xt||wt?1:0);const un=this.variableOffsets[Ee.crossTileID];un&&this.markUsedJustification(c,un.anchor,Ee,st);const Jt=this.placedOrientations[Ee.crossTileID];Jt&&(this.markUsedJustification(c,"left",Ee,Jt),this.markUsedOrientation(c,Jt,Ee))}if(ft){const Ut=Le(Oe.icon),xt=!(le&&Ee.verticalPlacedIconSymbolIndex&&_t);Ee.placedIconSymbolIndex>=0&&(Te(c.icon,Ee.numIconVertices,xt?Ut:Ze),c.icon.placedSymbolArray.get(Ee.placedIconSymbolIndex).hidden=Oe.icon.isHidden()),Ee.verticalPlacedIconSymbolIndex>=0&&(Te(c.icon,Ee.numVerticalIconVertices,xt?Ze:Ut),c.icon.placedSymbolArray.get(Ee.verticalPlacedIconSymbolIndex).hidden=Oe.icon.isHidden())}if(c.hasIconCollisionBoxData()||c.hasTextCollisionBoxData()){const Ut=c.collisionArrays[_e];if(Ut){let xt=new a.pointGeometry(0,0);if(Ut.textBox||Ut.verticalTextBox){let Jt=!0;if(H){const fn=this.variableOffsets[rt];fn?(xt=Qn(fn.anchor,fn.width,fn.height,fn.textOffset,fn.textBoxScale),G&&xt._rotate(ne?this.transform.angle:-this.transform.angle)):Jt=!1}Ut.textBox&&W(c.textCollisionBox.collisionVertexArray,Oe.text.placed,!Jt||_t,xt.x,xt.y),Ut.verticalTextBox&&W(c.textCollisionBox.collisionVertexArray,Oe.text.placed,!Jt||wt,xt.x,xt.y)}const un=Boolean(!wt&&Ut.verticalIconBox);Ut.iconBox&&W(c.iconCollisionBox.collisionVertexArray,Oe.icon.placed,un,le?xt.x:0,le?xt.y:0),Ut.verticalIconBox&&W(c.iconCollisionBox.collisionVertexArray,Oe.icon.placed,!un,le?xt.x:0,le?xt.y:0)}}}if(c.sortFeatures(this.transform.angle),this.retainedQueryData[c.bucketInstanceId]&&(this.retainedQueryData[c.bucketInstanceId].featureSortOrder=c.featureSortOrder),c.hasTextData()&&c.text.opacityVertexBuffer&&c.text.opacityVertexBuffer.updateData(c.text.opacityVertexArray),c.hasIconData()&&c.icon.opacityVertexBuffer&&c.icon.opacityVertexBuffer.updateData(c.icon.opacityVertexArray),c.hasIconCollisionBoxData()&&c.iconCollisionBox.collisionVertexBuffer&&c.iconCollisionBox.collisionVertexBuffer.updateData(c.iconCollisionBox.collisionVertexArray),c.hasTextCollisionBoxData()&&c.textCollisionBox.collisionVertexBuffer&&c.textCollisionBox.collisionVertexBuffer.updateData(c.textCollisionBox.collisionVertexArray),c.text.opacityVertexArray.length!==c.text.layoutVertexArray.length/4)throw new Error(`bucket.text.opacityVertexArray.length (= ${c.text.opacityVertexArray.length}) !== bucket.text.layoutVertexArray.length (= ${c.text.layoutVertexArray.length}) / 4`);if(c.icon.opacityVertexArray.length!==c.icon.layoutVertexArray.length/4)throw new Error(`bucket.icon.opacityVertexArray.length (= ${c.icon.opacityVertexArray.length}) !== bucket.icon.layoutVertexArray.length (= ${c.icon.layoutVertexArray.length}) / 4`);if(c.bucketInstanceId in this.collisionCircleArrays){const _e=this.collisionCircleArrays[c.bucketInstanceId];c.placementInvProjMatrix=_e.invProjMatrix,c.placementViewportMatrix=_e.viewportMatrix,c.collisionCircleArray=_e.circles,delete this.collisionCircleArrays[c.bucketInstanceId]}}symbolFadeChange(c){return this.fadeDuration===0?1:(c-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(c){return Math.max(0,(this.transform.zoom-c)/1.5)}hasTransitions(c){return this.stale||c-this.lastPlacementChangeTime<this.fadeDuration}stillRecent(c,m){const x=this.zoomAtLastRecencyCheck===m?1-this.zoomAdjustment(m):1;return this.zoomAtLastRecencyCheck=m,this.commitTime+this.fadeDuration*x>c}setStale(){this.stale=!0}}function W(w,c,m,x,S){w.emplaceBack(c?1:0,m?1:0,x||0,S||0),w.emplaceBack(c?1:0,m?1:0,x||0,S||0),w.emplaceBack(c?1:0,m?1:0,x||0,S||0),w.emplaceBack(c?1:0,m?1:0,x||0,S||0)}const Q=Math.pow(2,25),fe=Math.pow(2,24),ce=Math.pow(2,17),xe=Math.pow(2,16),ke=Math.pow(2,9),we=Math.pow(2,8),Pe=Math.pow(2,1);function Le(w){if(w.opacity===0&&!w.placed)return 0;if(w.opacity===1&&w.placed)return 4294967295;const c=w.placed?1:0,m=Math.floor(127*w.opacity);return m*Q+c*fe+m*ce+c*xe+m*ke+c*we+m*Pe+c}const Ze=0;class Xe{constructor(c){this._sortAcrossTiles=c.layout.get("symbol-z-order")!=="viewport-y"&&!c.layout.get("symbol-sort-key").isConstant(),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]}continuePlacement(c,m,x,S,R){const L=this._bucketParts;for(;this._currentTileIndex<c.length;)if(m.getBucketParts(L,S,c[this._currentTileIndex],this._sortAcrossTiles),this._currentTileIndex++,R())return!0;for(this._sortAcrossTiles&&(this._sortAcrossTiles=!1,L.sort((V,H)=>V.sortKey-H.sortKey));this._currentPartIndex<L.length;)if(m.placeLayerBucketPart(L[this._currentPartIndex],this._seenCrossTileIDs,x),this._currentPartIndex++,R())return!0;return!1}}class Ve{constructor(c,m,x,S,R,L,V,H){this.placement=new ye(c,m,L,V,H),this._currentPlacementIndex=x.length-1,this._forceFullPlacement=S,this._showCollisionBoxes=R,this._done=!1}isDone(){return this._done}continuePlacement(c,m,x){const S=a.exported.now(),R=()=>{const L=a.exported.now()-S;return!this._forceFullPlacement&&L>2};for(;this._currentPlacementIndex>=0;){const L=m[c[this._currentPlacementIndex]],V=this.placement.collisionIndex.transform.zoom;if(L.type==="symbol"&&(!L.minzoom||L.minzoom<=V)&&(!L.maxzoom||L.maxzoom>V)){if(this._inProgressLayer||(this._inProgressLayer=new Xe(L)),this._inProgressLayer.continuePlacement(x[L.source],this.placement,this._showCollisionBoxes,L,R))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(c){return this.placement.commit(c),this.placement}}const Bt=512/a.EXTENT/2;class Et{constructor(c,m,x){this.tileID=c,this.indexedSymbolInstances={},this.bucketInstanceId=x;for(let S=0;S<m.length;S++){const R=m.get(S),L=R.key;this.indexedSymbolInstances[L]||(this.indexedSymbolInstances[L]=[]),this.indexedSymbolInstances[L].push({crossTileID:R.crossTileID,coord:this.getScaledCoordinates(R,c)})}}getScaledCoordinates(c,m){const x=Bt/Math.pow(2,m.canonical.z-this.tileID.canonical.z);return{x:Math.floor((m.canonical.x*a.EXTENT+c.anchorX)*x),y:Math.floor((m.canonical.y*a.EXTENT+c.anchorY)*x)}}findMatches(c,m,x){const S=this.tileID.canonical.z<m.canonical.z?1:Math.pow(2,this.tileID.canonical.z-m.canonical.z);for(let R=0;R<c.length;R++){const L=c.get(R);if(L.crossTileID)continue;const V=this.indexedSymbolInstances[L.key];if(!V)continue;const H=this.getScaledCoordinates(L,m);for(const G of V)if(Math.abs(G.coord.x-H.x)<=S&&Math.abs(G.coord.y-H.y)<=S&&!x[G.crossTileID]){x[G.crossTileID]=!0,L.crossTileID=G.crossTileID;break}}}}class nt{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}}class zt{constructor(){this.indexes={},this.usedCrossTileIDs={},this.lng=0}handleWrapJump(c){const m=Math.round((c-this.lng)/360);if(m!==0)for(const x in this.indexes){const S=this.indexes[x],R={};for(const L in S){const V=S[L];V.tileID=V.tileID.unwrapTo(V.tileID.wrap+m),R[V.tileID.key]=V}this.indexes[x]=R}this.lng=c}addBucket(c,m,x){if(this.indexes[c.overscaledZ]&&this.indexes[c.overscaledZ][c.key]){if(this.indexes[c.overscaledZ][c.key].bucketInstanceId===m.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(c.overscaledZ,this.indexes[c.overscaledZ][c.key])}for(let R=0;R<m.symbolInstances.length;R++)m.symbolInstances.get(R).crossTileID=0;this.usedCrossTileIDs[c.overscaledZ]||(this.usedCrossTileIDs[c.overscaledZ]={});const S=this.usedCrossTileIDs[c.overscaledZ];for(const R in this.indexes){const L=this.indexes[R];if(Number(R)>c.overscaledZ)for(const V in L){const H=L[V];H.tileID.isChildOf(c)&&H.findMatches(m.symbolInstances,c,S)}else{const V=L[c.scaledTo(Number(R)).key];V&&V.findMatches(m.symbolInstances,c,S)}}for(let R=0;R<m.symbolInstances.length;R++){const L=m.symbolInstances.get(R);L.crossTileID||(L.crossTileID=x.generate(),S[L.crossTileID]=!0)}return this.indexes[c.overscaledZ]===void 0&&(this.indexes[c.overscaledZ]={}),this.indexes[c.overscaledZ][c.key]=new Et(c,m.symbolInstances,m.bucketInstanceId),!0}removeBucketCrossTileIDs(c,m){for(const x in m.indexedSymbolInstances)for(const S of m.indexedSymbolInstances[x])delete this.usedCrossTileIDs[c][S.crossTileID]}removeStaleBuckets(c){let m=!1;for(const x in this.indexes){const S=this.indexes[x];for(const R in S)c[S[R].bucketInstanceId]||(this.removeBucketCrossTileIDs(x,S[R]),delete S[R],m=!0)}return m}}class Gt{constructor(){this.layerIndexes={},this.crossTileIDs=new nt,this.maxBucketInstanceId=0,this.bucketsInCurrentPlacement={}}addLayer(c,m,x){let S=this.layerIndexes[c.id];S===void 0&&(S=this.layerIndexes[c.id]=new zt);let R=!1;const L={};S.handleWrapJump(x);for(const V of m){const H=V.getBucket(c);H&&c.id===H.layerIds[0]&&(H.bucketInstanceId||(H.bucketInstanceId=++this.maxBucketInstanceId),S.addBucket(V.tileID,H,this.crossTileIDs)&&(R=!0),L[H.bucketInstanceId]=!0)}return S.removeStaleBuckets(L)&&(R=!0),R}pruneUnusedLayers(c){const m={};c.forEach(x=>{m[x]=!0});for(const x in this.layerIndexes)m[x]||delete this.layerIndexes[x]}}var wn=a.createLayout([{name:"a_pos",type:"Int16",components:2}]);class dn extends a.Evented{constructor(c){super(),this.sourceCache=c,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.renderHistory=[],this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.deltaZoom=1,this.renderHistorySize=c._cache.max,c.usedForTerrain=!0,c.tileSize=this.tileSize*2**this.deltaZoom}destruct(){this.sourceCache.usedForTerrain=!1,this.sourceCache.tileSize=null;for(const c in this._tiles){const m=this._tiles[c];m.textures.forEach(x=>x.destroy()),m.textures=[]}}update(c,m){this.sourceCache.update(c,m),this._renderableTilesKeys=[];for(const x of c.coveringTiles({tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:m}))this._renderableTilesKeys.push(x.key),this._tiles[x.key]||(x.posMatrix=new Float64Array(16),a.ortho(x.posMatrix,0,a.EXTENT,0,a.EXTENT,0,1),this._tiles[x.key]=new Ae(x,this.tileSize))}removeOutdated(c){const m={};this.renderHistory=this.renderHistory.filter((x,S)=>this.renderHistory.indexOf(x)===S).slice(0,this.renderHistorySize);for(const x of this._renderableTilesKeys)m[x]=!0;for(const x of this.renderHistory)m[x]=!0;for(const x in this._tiles)m[x]||(this._tiles[x].clearTextures(c),delete this._tiles[x])}getRenderableTiles(){return this._renderableTilesKeys.map(c=>this.getTileByID(c))}getTileByID(c){return this._tiles[c]}getTerrainCoords(c){const m={};for(const x of this._renderableTilesKeys){const S=this._tiles[x].tileID;if(S.canonical.equals(c.canonical)){const R=c.clone();R.posMatrix=new Float64Array(16),a.ortho(R.posMatrix,0,a.EXTENT,0,a.EXTENT,0,1),m[x]=R}else if(S.canonical.isChildOf(c.canonical)){const R=c.clone();R.posMatrix=new Float64Array(16);const L=S.canonical.z-c.canonical.z,V=S.canonical.x-(S.canonical.x>>L<<L),H=S.canonical.y-(S.canonical.y>>L<<L),G=a.EXTENT>>L;a.ortho(R.posMatrix,0,G,0,G,0,1),a.translate(R.posMatrix,R.posMatrix,[-V*G,-H*G,0]),m[x]=R}else if(c.canonical.isChildOf(S.canonical)){const R=c.clone();R.posMatrix=new Float64Array(16);const L=c.canonical.z-S.canonical.z,V=c.canonical.x-(c.canonical.x>>L<<L),H=c.canonical.y-(c.canonical.y>>L<<L),G=a.EXTENT>>L;a.ortho(R.posMatrix,0,a.EXTENT,0,a.EXTENT,0,1),a.translate(R.posMatrix,R.posMatrix,[V*G,H*G,0]),a.scale(R.posMatrix,R.posMatrix,[1/2**L,1/2**L,0]),m[x]=R}}return m}getSourceTile(c,m){const x=this.sourceCache._source;let S=c.overscaledZ-this.deltaZoom;if(S>x.maxzoom&&(S=x.maxzoom),S<x.minzoom)return null;this._sourceTileCache[c.key]||(this._sourceTileCache[c.key]=c.scaledTo(S).key);let R=this.sourceCache.getTileByID(this._sourceTileCache[c.key]);if((!R||!R.dem)&&m)for(;S>=x.minzoom&&(!R||!R.dem);)R=this.sourceCache.getTileByID(c.scaledTo(S--).key);return R}tilesAfterTime(c=Date.now()){return Object.values(this._tiles).filter(m=>m.timeLoaded>=c)}}class Cn{constructor(c,m,x){this.style=c,this.sourceCache=new dn(m),this.options=x,this.exaggeration=typeof x.exaggeration=="number"?x.exaggeration:1,this.elevationOffset=typeof x.elevationOffset=="number"?x.elevationOffset:450,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024,this.clearRerenderCache()}getDEMElevation(c,m,x,S=a.EXTENT){if(!(m>=0&&m<S&&x>=0&&x<S))return this.elevationOffset;let R=0;const L=this.getTerrainData(c);if(L.tile&&L.tile.dem){const V=a.transformMat4$1([],[m/S*a.EXTENT,x/S*a.EXTENT],L.u_terrain_matrix),H=[V[0]*L.tile.dem.dim,V[1]*L.tile.dem.dim],G=[Math.floor(H[0]),Math.floor(H[1])],ne=L.tile.dem.get(G[0],G[1]),le=L.tile.dem.get(G[0],G[1]+1),pe=L.tile.dem.get(G[0]+1,G[1]),Te=L.tile.dem.get(G[0]+1,G[1]+1);R=a.number(a.number(ne,le,H[0]-G[0]),a.number(pe,Te,H[0]-G[0]),H[1]-G[1])}return R}rememberForRerender(c,m){for(const x in this.sourceCache._tiles){const S=this.sourceCache._tiles[x];(S.tileID.equals(m)||S.tileID.isChildOf(m))&&(c===this.sourceCache.sourceCache.id&&(S.timeLoaded=Date.now()),this._rerender[c]=this._rerender[c]||{},this._rerender[c][S.tileID.key]=!0)}}needsRerender(c,m){return this._rerender[c]&&this._rerender[c][m.key]}clearRerenderCache(){this._rerender={}}getElevation(c,m,x,S=a.EXTENT){return(this.getDEMElevation(c,m,x,S)+this.elevationOffset)*this.exaggeration}getTerrainData(c){if(!this._emptyDemTexture){const S=this.style.map.painter.context,R=new a.RGBAImage({width:1,height:1},new Uint8Array(4));this._emptyDepthTexture=new T(S,R,S.gl.RGBA,{premultiply:!1}),this._emptyDemUnpack=[0,0,0,0],this._emptyDemTexture=new T(S,new a.RGBAImage({width:1,height:1}),S.gl.RGBA,{premultiply:!1}),this._emptyDemTexture.bind(S.gl.NEAREST,S.gl.CLAMP_TO_EDGE),this._emptyDemMatrix=a.identity([])}const m=this.sourceCache.getSourceTile(c,!0);if(m&&m.dem&&(!m.demTexture||m.needsTerrainPrepare)){const S=this.style.map.painter.context;m.demTexture=this.style.map.painter.getTileTexture(m.dem.stride),m.demTexture?m.demTexture.update(m.dem.getPixels(),{premultiply:!1}):m.demTexture=new T(S,m.dem.getPixels(),S.gl.RGBA,{premultiply:!1}),m.demTexture.bind(S.gl.NEAREST,S.gl.CLAMP_TO_EDGE),m.needsTerrainPrepare=!1}const x=m&&m+m.tileID.key+c.key;if(x&&!this._demMatrixCache[x]){const S=this.sourceCache.sourceCache._source.maxzoom;let R=c.canonical.z-m.tileID.canonical.z;c.overscaledZ>c.canonical.z&&(c.canonical.z>=S?R=c.canonical.z-S:a.warnOnce("cannot calculate elevation if elevation maxzoom > source.maxzoom"));const L=c.canonical.x-(c.canonical.x>>R<<R),V=c.canonical.y-(c.canonical.y>>R<<R),H=a.fromScaling(new Float64Array(16),[1/(a.EXTENT<<R),1/(a.EXTENT<<R),0]);a.translate(H,H,[L*a.EXTENT,V*a.EXTENT,0]),this._demMatrixCache[c.key]={matrix:H,coord:c}}return{u_depth:2,u_terrain:3,u_terrain_dim:m&&m.dem&&m.dem.dim||1,u_terrain_matrix:x?this._demMatrixCache[c.key].matrix:this._emptyDemMatrix,u_terrain_unpack:m&&m.dem&&m.dem.getUnpackVector()||this._emptyDemUnpack,u_terrain_offset:this.elevationOffset,u_terrain_exaggeration:this.exaggeration,texture:(m&&m.demTexture||this._emptyDemTexture).texture,depthTexture:(this._fboDepthTexture||this._emptyDepthTexture).texture,tile:m}}getRTTFramebuffer(){const c=this.style.map.painter;if(!this._rttFramebuffer){const m=this.sourceCache.tileSize*this.qualityFactor;this._rttFramebuffer=c.context.createFramebuffer(m,m,!0),this._rttFramebuffer.depthAttachment.set(c.context.createRenderbuffer(c.context.gl.DEPTH_COMPONENT16,m,m))}return this._rttFramebuffer}getFramebuffer(c){const m=this.style.map.painter,x=m.width/devicePixelRatio,S=m.height/devicePixelRatio;return!this._fbo||this._fbo.width===x&&this._fbo.height===S||(this._fbo.destroy(),this._fboCoordsTexture.destroy(),this._fboDepthTexture.destroy(),delete this._fbo,delete this._fboDepthTexture,delete this._fboCoordsTexture),this._fboCoordsTexture||(this._fboCoordsTexture=new T(m.context,{width:x,height:S,data:null},m.context.gl.RGBA,{premultiply:!1}),this._fboCoordsTexture.bind(m.context.gl.NEAREST,m.context.gl.CLAMP_TO_EDGE)),this._fboDepthTexture||(this._fboDepthTexture=new T(m.context,{width:x,height:S,data:null},m.context.gl.RGBA,{premultiply:!1}),this._fboDepthTexture.bind(m.context.gl.NEAREST,m.context.gl.CLAMP_TO_EDGE)),this._fbo||(this._fbo=m.context.createFramebuffer(x,S,!0),this._fbo.depthAttachment.set(m.context.createRenderbuffer(m.context.gl.DEPTH_COMPONENT16,x,S))),this._fbo.colorAttachment.set(c==="coords"?this._fboCoordsTexture.texture:this._fboDepthTexture.texture),this._fbo}getCoordsTexture(){const c=this.style.map.painter.context;if(this._coordsTexture)return this._coordsTexture;const m=new Uint8Array(this._coordsTextureSize*this._coordsTextureSize*4);for(let R=0,L=0;R<this._coordsTextureSize;R++)for(let V=0;V<this._coordsTextureSize;V++,L+=4)m[L+0]=255&V,m[L+1]=255&R,m[L+2]=V>>8<<4|R>>8,m[L+3]=0;const x=new a.RGBAImage({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(m.buffer)),S=new T(c,x,c.gl.RGBA,{premultiply:!1});return S.bind(c.gl.NEAREST,c.gl.CLAMP_TO_EDGE),this._coordsTexture=S,S}pointCoordinate(c){const m=new Uint8Array(4),x=this.style.map.painter,S=x.context,R=S.gl;S.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),R.readPixels(c.x,x.height/devicePixelRatio-c.y-1,1,1,R.RGBA,R.UNSIGNED_BYTE,m),S.bindFramebuffer.set(null);const L=m[0]+(m[2]>>4<<8),V=m[1]+((15&m[2])<<8),H=this.coordsIndex[255-m[3]],G=H&&this.sourceCache.getTileByID(H);if(!G)return null;const ne=this._coordsTextureSize,le=(1<<G.tileID.canonical.z)*ne;return new a.MercatorCoordinate((G.tileID.canonical.x*ne+L)/le,(G.tileID.canonical.y*ne+V)/le,this.getElevation(G.tileID,L,V,ne))}getTerrainMesh(){if(this._mesh)return this._mesh;const c=this.style.map.painter.context,m=new a.PosArray,x=new a.TriangleIndexArray,S=this.meshSize,R=a.EXTENT/S,L=S*S;for(let V=0;V<=S;V++)for(let H=0;H<=S;H++)m.emplaceBack(H*R,V*R);for(let V=0;V<L;V+=S+1)for(let H=0;H<S;H++)x.emplaceBack(H+V,S+H+V+1,S+H+V+2),x.emplaceBack(H+V,S+H+V+2,H+V+1);return this._mesh={indexBuffer:c.createIndexBuffer(x),vertexBuffer:c.createVertexBuffer(m,wn.members),segments:a.SegmentVector.simpleSegment(0,0,m.length,x.length)},this._mesh}getMinMaxElevation(c){const m=this.getTerrainData(c).tile,x={minElevation:null,maxElevation:null};return m&&m.dem&&(x.minElevation=(m.dem.min+this.elevationOffset)*this.exaggeration,x.maxElevation=(m.dem.max+this.elevationOffset)*this.exaggeration),x}}const jn=(w,c)=>a.emitValidationErrors(w,c&&c.filter(m=>m.identifier!=="source.canvas")),or=a.pick(et,["addLayer","removeLayer","setPaintProperty","setLayoutProperty","setFilter","addSource","removeSource","setLayerZoomRange","setLight","setTransition","setGeoJSONSourceData"]),Wr=a.pick(et,["setCenter","setZoom","setBearing","setPitch"]),dr=function(){const w={},c=a.spec.$version;for(const m in a.spec.$root){const x=a.spec.$root[m];if(x.required){let S=null;S=m==="version"?c:x.type==="array"?[]:{},S!=null&&(w[m]=S)}}return w}();class zr extends a.Evented{constructor(c,m={}){super(),this.map=c,this.dispatcher=new Y(vt(),this),this.imageManager=new P,this.imageManager.setEventedParent(this),this.glyphManager=new z(c._requestManager,m.localIdeographFontFamily),this.lineAtlas=new q(256,512),this.crossTileSymbolIndex=new Gt,this._layers={},this._serializedLayers={},this._order=[],this.sourceCaches={},this.zoomHistory=new a.ZoomHistory,this._loaded=!1,this._availableImages=[],this._resetUpdates(),this.dispatcher.broadcast("setReferrer",a.getReferrer());const x=this;this._rtlTextPluginCallback=zr.registerForPluginStateChange(S=>{x.dispatcher.broadcast("syncRTLPluginState",{pluginStatus:S.pluginStatus,pluginURL:S.pluginURL},(R,L)=>{if(a.triggerPluginCompletionEvent(R),L&&L.every(V=>V))for(const V in x.sourceCaches)x.sourceCaches[V].reload()})}),this.on("data",S=>{if(S.dataType!=="source"||S.sourceDataType!=="metadata")return;const R=this.sourceCaches[S.sourceId];if(!R)return;const L=R.getSource();if(L&&L.vectorLayerIds)for(const V in this._layers){const H=this._layers[V];H.source===L.id&&this._validateLayer(H)}})}loadURL(c,m={}){this.fire(new a.Event("dataloading",{dataType:"style"}));const x=typeof m.validate!="boolean"||m.validate,S=this.map._requestManager.transformRequest(c,a.ResourceType.Style);this._request=a.getJSON(S,(R,L)=>{this._request=null,R?this.fire(new a.ErrorEvent(R)):L&&this._load(L,x)})}loadJSON(c,m={}){this.fire(new a.Event("dataloading",{dataType:"style"})),this._request=a.exported.frame(()=>{this._request=null,this._load(c,m.validate!==!1)})}loadEmpty(){this.fire(new a.Event("dataloading",{dataType:"style"})),this._load(dr,!1)}_load(c,m){if(m&&jn(this,a.validateStyle(c)))return;this._loaded=!0,this.stylesheet=c;for(const S in c.sources)this.addSource(S,c.sources[S],{validate:!1});c.sprite?this._loadSprite(c.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(c.glyphs);const x=Tt(this.stylesheet.layers);this._order=x.map(S=>S.id),this._layers={},this._serializedLayers={};for(let S of x)S=a.createStyleLayer(S),S.setEventedParent(this,{layer:{id:S.id}}),this._layers[S.id]=S,this._serializedLayers[S.id]=S.serialize();this.dispatcher.broadcast("setLayers",this._serializeLayers(this._order)),this.light=new U(this.stylesheet.light),this.setTerrain(this.stylesheet.terrain),this.fire(new a.Event("data",{dataType:"style"})),this.fire(new a.Event("style.load"))}_loadSprite(c){this._spriteRequest=function(m,x,S,R){let L,V,H;const G=S>1?"@2x":"";let ne=a.getJSON(x.transformRequest(x.normalizeSpriteURL(m,G,".json"),a.ResourceType.SpriteJSON),(Te,_e)=>{ne=null,H||(H=Te,L=_e,pe())}),le=a.getImage(x.transformRequest(x.normalizeSpriteURL(m,G,".png"),a.ResourceType.SpriteImage),(Te,_e)=>{le=null,H||(H=Te,V=_e,pe())});function pe(){if(H)R(H);else if(L&&V){const Te=a.exported.getImageData(V),_e={};for(const Ee in L){const{width:Be,height:We,x:rt,y:Oe,sdf:ft,pixelRatio:st,stretchX:_t,stretchY:wt,content:Ut}=L[Ee],xt=new a.RGBAImage({width:Be,height:We});a.RGBAImage.copy(Te,xt,{x:rt,y:Oe},{x:0,y:0},{width:Be,height:We}),_e[Ee]={data:xt,pixelRatio:st,sdf:ft,stretchX:_t,stretchY:wt,content:Ut}}R(null,_e)}}return{cancel(){ne&&(ne.cancel(),ne=null),le&&(le.cancel(),le=null)}}}(c,this.map._requestManager,this.map.getPixelRatio(),(m,x)=>{if(this._spriteRequest=null,m)this.fire(new a.ErrorEvent(m));else if(x)for(const S in x)this.imageManager.addImage(S,x[S]);this.imageManager.setLoaded(!0),this._availableImages=this.imageManager.listImages(),this.dispatcher.broadcast("setImages",this._availableImages),this.fire(new a.Event("data",{dataType:"style"}))})}_validateLayer(c){const m=this.sourceCaches[c.source];if(!m)return;const x=c.sourceLayer;if(!x)return;const S=m.getSource();(S.type==="geojson"||S.vectorLayerIds&&S.vectorLayerIds.indexOf(x)===-1)&&this.fire(new a.ErrorEvent(new Error(`Source layer "${x}" does not exist on source "${S.id}" as specified by style layer "${c.id}".`)))}loaded(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(const c in this.sourceCaches)if(!this.sourceCaches[c].loaded())return!1;return!!this.imageManager.isLoaded()}_serializeLayers(c){const m=[];for(const x of c){const S=this._layers[x];S.type!=="custom"&&m.push(S.serialize())}return m}hasTransitions(){if(this.light&&this.light.hasTransition())return!0;for(const c in this.sourceCaches)if(this.sourceCaches[c].hasTransition())return!0;for(const c in this._layers)if(this._layers[c].hasTransition())return!0;return!1}_checkLoaded(){if(!this._loaded)throw new Error("Style is not done loading.")}update(c){if(!this._loaded)return;const m=this._changed;if(this._changed){const S=Object.keys(this._updatedLayers),R=Object.keys(this._removedLayers);(S.length||R.length)&&this._updateWorkerLayers(S,R);for(const L in this._updatedSources){const V=this._updatedSources[L];if(V==="reload")this._reloadSource(L);else{if(V!=="clear")throw new Error(`Invalid action ${V}`);this._clearSource(L)}}this._updateTilesForChangedImages();for(const L in this._updatedPaintProps)this._layers[L].updateTransitions(c);this.light.updateTransitions(c),this._resetUpdates()}const x={};for(const S in this.sourceCaches){const R=this.sourceCaches[S];x[S]=R.used,R.used=!1}for(const S of this._order){const R=this._layers[S];R.recalculate(c,this._availableImages),!R.isHidden(c.zoom)&&R.source&&(this.sourceCaches[R.source].used=!0)}for(const S in x){const R=this.sourceCaches[S];x[S]!==R.used&&R.fire(new a.Event("data",{sourceDataType:"visibility",dataType:"source",sourceId:S}))}this.light.recalculate(c),this.z=c.zoom,m&&this.fire(new a.Event("data",{dataType:"style"}))}_updateTilesForChangedImages(){const c=Object.keys(this._changedImages);if(c.length){for(const m in this.sourceCaches)this.sourceCaches[m].reloadTilesForDependencies(["icons","patterns"],c);this._changedImages={}}}_updateWorkerLayers(c,m){this.dispatcher.broadcast("updateLayers",{layers:this._serializeLayers(c),removedIds:m})}_resetUpdates(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={}}setTerrain(c){if(this._checkLoaded(),this._terrainDataCallback&&this.off("data",this._terrainDataCallback),this._terrainfreezeElevationCallback&&this.map.off("freezeElevation",this._terrainfreezeElevationCallback),c){const m=this.sourceCaches[c.source];if(!m)throw new Error(`cannot load terrain, because there exists no source with ID: ${c.source}`);this.terrain=new Cn(this,m,c),this.map.transform.updateElevation(this.terrain),this._terrainfreezeElevationCallback=x=>{x.freeze?this.map.transform.freezeElevation=!0:(this.map.transform.freezeElevation=!1,this.map.transform.recalculateZoom(this.terrain))},this._terrainDataCallback=x=>{x.tile&&(x.sourceId===c.source?(this.map.transform.updateElevation(this.terrain),this.terrain.rememberForRerender(x.sourceId,x.tile.tileID)):x.source.type==="geojson"&&this.terrain.rememberForRerender(x.sourceId,x.tile.tileID))},this.on("data",this._terrainDataCallback),this.map.on("freezeElevation",this._terrainfreezeElevationCallback)}else this.terrain&&this.terrain.sourceCache.destruct(),this.terrain=null,this.map.transform.updateElevation(this.terrain);this.map.fire(new a.Event("terrain",{terrain:c}))}setState(c){if(this._checkLoaded(),jn(this,a.validateStyle(c)))return!1;(c=a.clone$1(c)).layers=Tt(c.layers);const m=function(S,R){if(!S)return[{command:et.setStyle,args:[R]}];let L=[];try{if(!g(S.version,R.version))return[{command:et.setStyle,args:[R]}];g(S.center,R.center)||L.push({command:et.setCenter,args:[R.center]}),g(S.zoom,R.zoom)||L.push({command:et.setZoom,args:[R.zoom]}),g(S.bearing,R.bearing)||L.push({command:et.setBearing,args:[R.bearing]}),g(S.pitch,R.pitch)||L.push({command:et.setPitch,args:[R.pitch]}),g(S.sprite,R.sprite)||L.push({command:et.setSprite,args:[R.sprite]}),g(S.glyphs,R.glyphs)||L.push({command:et.setGlyphs,args:[R.glyphs]}),g(S.transition,R.transition)||L.push({command:et.setTransition,args:[R.transition]}),g(S.light,R.light)||L.push({command:et.setLight,args:[R.light]});const V={},H=[];(function(ne,le,pe,Te){let _e;for(_e in le=le||{},ne=ne||{})Object.prototype.hasOwnProperty.call(ne,_e)&&(Object.prototype.hasOwnProperty.call(le,_e)||at(_e,pe,Te));for(_e in le)Object.prototype.hasOwnProperty.call(le,_e)&&(Object.prototype.hasOwnProperty.call(ne,_e)?g(ne[_e],le[_e])||(ne[_e].type==="geojson"&&le[_e].type==="geojson"&&ut(ne,le,_e)?pe.push({command:et.setGeoJSONSourceData,args:[_e,le[_e].data]}):He(_e,le,pe,Te)):ct(_e,le,pe))})(S.sources,R.sources,H,V);const G=[];S.layers&&S.layers.forEach(ne=>{V[ne.source]?L.push({command:et.removeLayer,args:[ne.id]}):G.push(ne)}),L=L.concat(H),function(ne,le,pe){le=le||[];const Te=(ne=ne||[]).map(Dt),_e=le.map(Dt),Ee=ne.reduce(Lt,{}),Be=le.reduce(Lt,{}),We=Te.slice(),rt=Object.create(null);let Oe,ft,st,_t,wt,Ut,xt;for(Oe=0,ft=0;Oe<Te.length;Oe++)st=Te[Oe],Object.prototype.hasOwnProperty.call(Be,st)?ft++:(pe.push({command:et.removeLayer,args:[st]}),We.splice(We.indexOf(st,ft),1));for(Oe=0,ft=0;Oe<_e.length;Oe++)st=_e[_e.length-1-Oe],We[We.length-1-Oe]!==st&&(Object.prototype.hasOwnProperty.call(Ee,st)?(pe.push({command:et.removeLayer,args:[st]}),We.splice(We.lastIndexOf(st,We.length-ft),1)):ft++,Ut=We[We.length-Oe],pe.push({command:et.addLayer,args:[Be[st],Ut]}),We.splice(We.length-Oe,0,st),rt[st]=!0);for(Oe=0;Oe<_e.length;Oe++)if(st=_e[Oe],_t=Ee[st],wt=Be[st],!rt[st]&&!g(_t,wt))if(g(_t.source,wt.source)&&g(_t["source-layer"],wt["source-layer"])&&g(_t.type,wt.type)){for(xt in bt(_t.layout,wt.layout,pe,st,null,et.setLayoutProperty),bt(_t.paint,wt.paint,pe,st,null,et.setPaintProperty),g(_t.filter,wt.filter)||pe.push({command:et.setFilter,args:[st,wt.filter]}),g(_t.minzoom,wt.minzoom)&&g(_t.maxzoom,wt.maxzoom)||pe.push({command:et.setLayerZoomRange,args:[st,wt.minzoom,wt.maxzoom]}),_t)Object.prototype.hasOwnProperty.call(_t,xt)&&xt!=="layout"&&xt!=="paint"&&xt!=="filter"&&xt!=="metadata"&&xt!=="minzoom"&&xt!=="maxzoom"&&(xt.indexOf("paint.")===0?bt(_t[xt],wt[xt],pe,st,xt.slice(6),et.setPaintProperty):g(_t[xt],wt[xt])||pe.push({command:et.setLayerProperty,args:[st,xt,wt[xt]]}));for(xt in wt)Object.prototype.hasOwnProperty.call(wt,xt)&&!Object.prototype.hasOwnProperty.call(_t,xt)&&xt!=="layout"&&xt!=="paint"&&xt!=="filter"&&xt!=="metadata"&&xt!=="minzoom"&&xt!=="maxzoom"&&(xt.indexOf("paint.")===0?bt(_t[xt],wt[xt],pe,st,xt.slice(6),et.setPaintProperty):g(_t[xt],wt[xt])||pe.push({command:et.setLayerProperty,args:[st,xt,wt[xt]]}))}else pe.push({command:et.removeLayer,args:[st]}),Ut=We[We.lastIndexOf(st)+1],pe.push({command:et.addLayer,args:[wt,Ut]})}(G,R.layers,L)}catch(V){console.warn("Unable to compute style diff:",V),L=[{command:et.setStyle,args:[R]}]}return L}(this.serialize(),c).filter(S=>!(S.command in Wr));if(m.length===0)return!1;const x=m.filter(S=>!(S.command in or));if(x.length>0)throw new Error(`Unimplemented: ${x.map(S=>S.command).join(", ")}.`);return m.forEach(S=>{S.command!=="setTransition"&&this[S.command].apply(this,S.args)}),this.stylesheet=c,!0}addImage(c,m){if(this.getImage(c))return this.fire(new a.ErrorEvent(new Error(`An image named "${c}" already exists.`)));this.imageManager.addImage(c,m),this._afterImageUpdated(c)}updateImage(c,m){this.imageManager.updateImage(c,m)}getImage(c){return this.imageManager.getImage(c)}removeImage(c){if(!this.getImage(c))return this.fire(new a.ErrorEvent(new Error(`An image named "${c}" does not exist.`)));this.imageManager.removeImage(c),this._afterImageUpdated(c)}_afterImageUpdated(c){this._availableImages=this.imageManager.listImages(),this._changedImages[c]=!0,this._changed=!0,this.dispatcher.broadcast("setImages",this._availableImages),this.fire(new a.Event("data",{dataType:"style"}))}listImages(){return this._checkLoaded(),this.imageManager.listImages()}addSource(c,m,x={}){if(this._checkLoaded(),this.sourceCaches[c]!==void 0)throw new Error(`Source "${c}" already exists.`);if(!m.type)throw new Error(`The type property must be defined, but only the following properties were given: ${Object.keys(m).join(", ")}.`);if(["vector","raster","geojson","video","image"].indexOf(m.type)>=0&&this._validate(a.validateStyle.source,`sources.${c}`,m,null,x))return;this.map&&this.map._collectResourceTiming&&(m.collectResourceTiming=!0);const S=this.sourceCaches[c]=new Ue(c,m,this.dispatcher);S.style=this,S.setEventedParent(this,()=>({isSourceLoaded:this.loaded(),source:S.serialize(),sourceId:c})),S.onAdd(this.map),this._changed=!0}removeSource(c){if(this._checkLoaded(),this.sourceCaches[c]===void 0)throw new Error("There is no source with this ID");for(const x in this._layers)if(this._layers[x].source===c)return this.fire(new a.ErrorEvent(new Error(`Source "${c}" cannot be removed while layer "${x}" is using it.`)));const m=this.sourceCaches[c];delete this.sourceCaches[c],delete this._updatedSources[c],m.fire(new a.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:c})),m.setEventedParent(null),m.onRemove(this.map),this._changed=!0}setGeoJSONSourceData(c,m){if(this._checkLoaded(),this.sourceCaches[c]===void 0)throw new Error(`There is no source with this ID=${c}`);const x=this.sourceCaches[c].getSource();if(x.type!=="geojson")throw new Error(`geojsonSource.type is ${x.type}, which is !== 'geojson`);x.setData(m),this._changed=!0}getSource(c){return this.sourceCaches[c]&&this.sourceCaches[c].getSource()}addLayer(c,m,x={}){this._checkLoaded();const S=c.id;if(this.getLayer(S))return void this.fire(new a.ErrorEvent(new Error(`Layer "${S}" already exists on this map.`)));let R;if(c.type==="custom"){if(jn(this,a.validateCustomStyleLayer(c)))return;R=a.createStyleLayer(c)}else{if(typeof c.source=="object"&&(this.addSource(S,c.source),c=a.clone$1(c),c=a.extend(c,{source:S})),this._validate(a.validateStyle.layer,`layers.${S}`,c,{arrayIndex:-1},x))return;R=a.createStyleLayer(c),this._validateLayer(R),R.setEventedParent(this,{layer:{id:S}}),this._serializedLayers[R.id]=R.serialize()}const L=m?this._order.indexOf(m):this._order.length;if(m&&L===-1)this.fire(new a.ErrorEvent(new Error(`Cannot add layer "${S}" before non-existing layer "${m}".`)));else{if(this._order.splice(L,0,S),this._layerOrderChanged=!0,this._layers[S]=R,this._removedLayers[S]&&R.source&&R.type!=="custom"){const V=this._removedLayers[S];delete this._removedLayers[S],V.type!==R.type?this._updatedSources[R.source]="clear":(this._updatedSources[R.source]="reload",this.sourceCaches[R.source].pause())}this._updateLayer(R),R.onAdd&&R.onAdd(this.map)}}moveLayer(c,m){if(this._checkLoaded(),this._changed=!0,!this._layers[c])return void this.fire(new a.ErrorEvent(new Error(`The layer '${c}' does not exist in the map's style and cannot be moved.`)));if(c===m)return;const x=this._order.indexOf(c);this._order.splice(x,1);const S=m?this._order.indexOf(m):this._order.length;m&&S===-1?this.fire(new a.ErrorEvent(new Error(`Cannot move layer "${c}" before non-existing layer "${m}".`))):(this._order.splice(S,0,c),this._layerOrderChanged=!0)}removeLayer(c){this._checkLoaded();const m=this._layers[c];if(!m)return void this.fire(new a.ErrorEvent(new Error(`Cannot remove non-existing layer "${c}".`)));m.setEventedParent(null);const x=this._order.indexOf(c);this._order.splice(x,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[c]=m,delete this._layers[c],delete this._serializedLayers[c],delete this._updatedLayers[c],delete this._updatedPaintProps[c],m.onRemove&&m.onRemove(this.map)}getLayer(c){return this._layers[c]}hasLayer(c){return c in this._layers}setLayerZoomRange(c,m,x){this._checkLoaded();const S=this.getLayer(c);S?S.minzoom===m&&S.maxzoom===x||(m!=null&&(S.minzoom=m),x!=null&&(S.maxzoom=x),this._updateLayer(S)):this.fire(new a.ErrorEvent(new Error(`Cannot set the zoom range of non-existing layer "${c}".`)))}setFilter(c,m,x={}){this._checkLoaded();const S=this.getLayer(c);if(S){if(!g(S.filter,m))return m==null?(S.filter=void 0,void this._updateLayer(S)):void(this._validate(a.validateStyle.filter,`layers.${S.id}.filter`,m,null,x)||(S.filter=a.clone$1(m),this._updateLayer(S)))}else this.fire(new a.ErrorEvent(new Error(`Cannot filter non-existing layer "${c}".`)))}getFilter(c){return a.clone$1(this.getLayer(c).filter)}setLayoutProperty(c,m,x,S={}){this._checkLoaded();const R=this.getLayer(c);R?g(R.getLayoutProperty(m),x)||(R.setLayoutProperty(m,x,S),this._updateLayer(R)):this.fire(new a.ErrorEvent(new Error(`Cannot style non-existing layer "${c}".`)))}getLayoutProperty(c,m){const x=this.getLayer(c);if(x)return x.getLayoutProperty(m);this.fire(new a.ErrorEvent(new Error(`Cannot get style of non-existing layer "${c}".`)))}setPaintProperty(c,m,x,S={}){this._checkLoaded();const R=this.getLayer(c);R?g(R.getPaintProperty(m),x)||(R.setPaintProperty(m,x,S)&&this._updateLayer(R),this._changed=!0,this._updatedPaintProps[c]=!0):this.fire(new a.ErrorEvent(new Error(`Cannot style non-existing layer "${c}".`)))}getPaintProperty(c,m){return this.getLayer(c).getPaintProperty(m)}setFeatureState(c,m){this._checkLoaded();const x=c.source,S=c.sourceLayer,R=this.sourceCaches[x];if(R===void 0)return void this.fire(new a.ErrorEvent(new Error(`The source '${x}' does not exist in the map's style.`)));const L=R.getSource().type;L==="geojson"&&S?this.fire(new a.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):L!=="vector"||S?(c.id===void 0&&this.fire(new a.ErrorEvent(new Error("The feature id parameter must be provided."))),R.setFeatureState(S,c.id,m)):this.fire(new a.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}removeFeatureState(c,m){this._checkLoaded();const x=c.source,S=this.sourceCaches[x];if(S===void 0)return void this.fire(new a.ErrorEvent(new Error(`The source '${x}' does not exist in the map's style.`)));const R=S.getSource().type,L=R==="vector"?c.sourceLayer:void 0;R!=="vector"||L?m&&typeof c.id!="string"&&typeof c.id!="number"?this.fire(new a.ErrorEvent(new Error("A feature id is required to remove its specific state property."))):S.removeFeatureState(L,c.id,m):this.fire(new a.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}getFeatureState(c){this._checkLoaded();const m=c.source,x=c.sourceLayer,S=this.sourceCaches[m];if(S!==void 0)return S.getSource().type!=="vector"||x?(c.id===void 0&&this.fire(new a.ErrorEvent(new Error("The feature id parameter must be provided."))),S.getFeatureState(x,c.id)):void this.fire(new a.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));this.fire(new a.ErrorEvent(new Error(`The source '${m}' does not exist in the map's style.`)))}getTransition(){return a.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)}serialize(){return a.filterObject({version:this.stylesheet.version,name:this.stylesheet.name,metadata:this.stylesheet.metadata,light:this.stylesheet.light,center:this.stylesheet.center,zoom:this.stylesheet.zoom,bearing:this.stylesheet.bearing,pitch:this.stylesheet.pitch,sprite:this.stylesheet.sprite,glyphs:this.stylesheet.glyphs,transition:this.stylesheet.transition,sources:a.mapObject(this.sourceCaches,c=>c.serialize()),layers:this._serializeLayers(this._order)},c=>c!==void 0)}_updateLayer(c){this._updatedLayers[c.id]=!0,c.source&&!this._updatedSources[c.source]&&this.sourceCaches[c.source].getSource().type!=="raster"&&(this._updatedSources[c.source]="reload",this.sourceCaches[c.source].pause()),this._changed=!0}_flattenAndSortRenderedFeatures(c){const m=L=>this._layers[L].type==="fill-extrusion",x={},S=[];for(let L=this._order.length-1;L>=0;L--){const V=this._order[L];if(m(V)){x[V]=L;for(const H of c){const G=H[V];if(G)for(const ne of G)S.push(ne)}}}S.sort((L,V)=>V.intersectionZ-L.intersectionZ);const R=[];for(let L=this._order.length-1;L>=0;L--){const V=this._order[L];if(m(V))for(let H=S.length-1;H>=0;H--){const G=S[H].feature;if(x[G.layer.id]<L)break;R.push(G),S.pop()}else for(const H of c){const G=H[V];if(G)for(const ne of G)R.push(ne.feature)}}return R}queryRenderedFeatures(c,m,x){m&&m.filter&&this._validate(a.validateStyle.filter,"queryRenderedFeatures.filter",m.filter,null,m);const S={};if(m&&m.layers){if(!Array.isArray(m.layers))return this.fire(new a.ErrorEvent(new Error("parameters.layers must be an Array."))),[];for(const L of m.layers){const V=this._layers[L];if(!V)return this.fire(new a.ErrorEvent(new Error(`The layer '${L}' does not exist in the map's style and cannot be queried for features.`))),[];S[V.source]=!0}}const R=[];m.availableImages=this._availableImages;for(const L in this.sourceCaches)m.layers&&!S[L]||R.push(Ie(this.sourceCaches[L],this._layers,this._serializedLayers,c,m,x));return this.placement&&R.push(function(L,V,H,G,ne,le,pe){const Te={},_e=le.queryRenderedSymbols(G),Ee=[];for(const Be of Object.keys(_e).map(Number))Ee.push(pe[Be]);Ee.sort(Me);for(const Be of Ee){const We=Be.featureIndex.lookupSymbolFeatures(_e[Be.bucketInstanceId],V,Be.bucketIndex,Be.sourceLayerIndex,ne.filter,ne.layers,ne.availableImages,L);for(const rt in We){const Oe=Te[rt]=Te[rt]||[],ft=We[rt];ft.sort((st,_t)=>{const wt=Be.featureSortOrder;if(wt){const Ut=wt.indexOf(st.featureIndex);return wt.indexOf(_t.featureIndex)-Ut}return _t.featureIndex-st.featureIndex});for(const st of ft)Oe.push(st)}}for(const Be in Te)Te[Be].forEach(We=>{const rt=We.feature,Oe=H[L[Be].source].getFeatureState(rt.layer["source-layer"],rt.id);rt.source=rt.layer.source,rt.layer["source-layer"]&&(rt.sourceLayer=rt.layer["source-layer"]),rt.state=Oe});return Te}(this._layers,this._serializedLayers,this.sourceCaches,c,m,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(R)}querySourceFeatures(c,m){m&&m.filter&&this._validate(a.validateStyle.filter,"querySourceFeatures.filter",m.filter,null,m);const x=this.sourceCaches[c];return x?function(S,R){const L=S.getRenderableIds().map(G=>S.getTileByID(G)),V=[],H={};for(let G=0;G<L.length;G++){const ne=L[G],le=ne.tileID.canonical.key;H[le]||(H[le]=!0,ne.querySourceFeatures(V,R))}return V}(x,m):[]}addSourceType(c,m,x){return zr.getSourceType(c)?x(new Error(`A source type called "${c}" already exists.`)):(zr.setSourceType(c,m),m.workerSourceURL?void this.dispatcher.broadcast("loadWorkerSource",{name:c,url:m.workerSourceURL},x):x(null,null))}getLight(){return this.light.getLight()}setLight(c,m={}){this._checkLoaded();const x=this.light.getLight();let S=!1;for(const L in c)if(!g(c[L],x[L])){S=!0;break}if(!S)return;const R={now:a.exported.now(),transition:a.extend({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(c,m),this.light.updateTransitions(R)}_validate(c,m,x,S,R={}){return(!R||R.validate!==!1)&&jn(this,c.call(a.validateStyle,a.extend({key:m,style:this.serialize(),value:x,styleSpec:a.spec},S)))}_remove(){this._request&&(this._request.cancel(),this._request=null),this._spriteRequest&&(this._spriteRequest.cancel(),this._spriteRequest=null),a.evented.off("pluginStateChange",this._rtlTextPluginCallback);for(const c in this._layers)this._layers[c].setEventedParent(null);for(const c in this.sourceCaches){const m=this.sourceCaches[c];m.setEventedParent(null),m.onRemove(this.map)}this.imageManager.setEventedParent(null),this.setEventedParent(null),this.dispatcher.remove()}_clearSource(c){this.sourceCaches[c].clearTiles()}_reloadSource(c){this.sourceCaches[c].resume(),this.sourceCaches[c].reload()}_updateSources(c){for(const m in this.sourceCaches)this.sourceCaches[m].update(c,this.terrain)}_generateCollisionBoxes(){for(const c in this.sourceCaches)this._reloadSource(c)}_updatePlacement(c,m,x,S,R=!1){let L=!1,V=!1;const H={};for(const G of this._order){const ne=this._layers[G];if(ne.type!=="symbol")continue;if(!H[ne.source]){const pe=this.sourceCaches[ne.source];H[ne.source]=pe.getRenderableIds(!0).map(Te=>pe.getTileByID(Te)).sort((Te,_e)=>_e.tileID.overscaledZ-Te.tileID.overscaledZ||(Te.tileID.isLessThan(_e.tileID)?-1:1))}const le=this.crossTileSymbolIndex.addLayer(ne,H[ne.source],c.center.lng);L=L||le}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),((R=R||this._layerOrderChanged||x===0)||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(a.exported.now(),c.zoom))&&(this.pauseablePlacement=new Ve(c,this.terrain,this._order,R,m,x,S,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,H),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(a.exported.now()),V=!0),L&&this.pauseablePlacement.placement.setStale()),V||L)for(const G of this._order){const ne=this._layers[G];ne.type==="symbol"&&this.placement.updateLayerOpacities(ne,H[ne.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(a.exported.now())}_releaseSymbolFadeTiles(){for(const c in this.sourceCaches)this.sourceCaches[c].releaseSymbolFadeTiles()}getImages(c,m,x){this.imageManager.getImages(m.icons,x),this._updateTilesForChangedImages();const S=this.sourceCaches[m.source];S&&S.setDependencies(m.tileID.key,m.type,m.icons)}getGlyphs(c,m,x){this.glyphManager.getGlyphs(m.stacks,x)}getResource(c,m,x){return a.makeRequest(m,x)}}zr.getSourceType=function(w){return be[w]},zr.setSourceType=function(w,c){be[w]=c},zr.registerForPluginStateChange=a.registerForPluginStateChange;var On="attribute vec2 a_pos;uniform mat4 u_matrix;varying vec2 v_texture_pos;varying float v_depth;void main() {v_texture_pos=a_pos/8192.0;gl_Position=u_matrix*vec4(a_pos,get_elevation(a_pos),1.0);v_depth=gl_Position.z/gl_Position.w;}";const Mn={prelude:Nn(`#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`,`#ifdef GL_ES
precision highp float;
#else
#if !defined(lowp)
#define lowp
#endif
#if !defined(mediump)
#define mediump
#endif
#if !defined(highp)
#define highp
#endif
#endif
vec2 unpack_float(const float packedValue) {int packedIntValue=int(packedValue);int v0=packedIntValue/256;return vec2(v0,packedIntValue-v0*256);}vec2 unpack_opacity(const float packedOpacity) {int intOpacity=int(packedOpacity)/2;return vec2(float(intOpacity)/127.0,mod(packedOpacity,2.0));}vec4 decode_color(const vec2 encodedColor) {return vec4(unpack_float(encodedColor[0])/255.0,unpack_float(encodedColor[1])/255.0
);}float unpack_mix_vec2(const vec2 packedValue,const float t) {return mix(packedValue[0],packedValue[1],t);}vec4 unpack_mix_color(const vec4 packedColors,const float t) {vec4 minColor=decode_color(vec2(packedColors[0],packedColors[1]));vec4 maxColor=decode_color(vec2(packedColors[2],packedColors[3]));return mix(minColor,maxColor,t);}vec2 get_pattern_pos(const vec2 pixel_coord_upper,const vec2 pixel_coord_lower,const vec2 pattern_size,const float tile_units_to_pixels,const vec2 pos) {vec2 offset=mod(mod(mod(pixel_coord_upper,pattern_size)*256.0,pattern_size)*256.0+pixel_coord_lower,pattern_size);return (tile_units_to_pixels*pos+offset)/pattern_size;}
#ifdef TERRAIN3D
uniform sampler2D u_terrain;uniform float u_terrain_dim;uniform mat4 u_terrain_matrix;uniform vec4 u_terrain_unpack;uniform float u_terrain_offset;uniform float u_terrain_exaggeration;uniform highp sampler2D u_depth;
#endif
const highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitShifts=vec4(1.)/bitSh;highp float unpack(highp vec4 color) {return dot(color,bitShifts);}highp float depthOpacity(vec3 frag) {
#ifdef TERRAIN3D
highp float d=unpack(texture2D(u_depth,frag.xy*0.5+0.5))+0.0001-frag.z;return 1.0-max(0.0,min(1.0,-d*500.0));
#else
return 1.0;
#endif
}float calculate_visibility(vec4 pos) {
#ifdef TERRAIN3D
vec3 frag=pos.xyz/pos.w;highp float d=depthOpacity(frag);if (d > 0.95) return 1.0;return (d+depthOpacity(frag+vec3(0.0,0.01,0.0)))/2.0;
#else
return 1.0;
#endif
}float ele(vec2 pos) {
#ifdef TERRAIN3D
vec4 rgb=(texture2D(u_terrain,pos)*255.0)*u_terrain_unpack;return rgb.r+rgb.g+rgb.b-u_terrain_unpack.a;
#else
return 0.0;
#endif
}float get_elevation(vec2 pos) {
#ifdef TERRAIN3D
vec2 coord=(u_terrain_matrix*vec4(pos,0.0,1.0)).xy*u_terrain_dim+1.0;vec2 f=fract(coord);vec2 c=(floor(coord)+0.5)/(u_terrain_dim+2.0);float d=1.0/(u_terrain_dim+2.0);float tl=ele(c);float tr=ele(c+vec2(d,0.0));float bl=ele(c+vec2(0.0,d));float br=ele(c+vec2(d,d));float elevation=mix(mix(tl,tr,f.x),mix(bl,br,f.x),f.y);return (elevation+u_terrain_offset)*u_terrain_exaggeration;
#else
return 0.0;
#endif
}`),background:Nn(`uniform vec4 u_color;uniform float u_opacity;void main() {gl_FragColor=u_color*u_opacity;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,"attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),backgroundPattern:Nn(`uniform vec2 u_pattern_tl_a;uniform vec2 u_pattern_br_a;uniform vec2 u_pattern_tl_b;uniform vec2 u_pattern_br_b;uniform vec2 u_texsize;uniform float u_mix;uniform float u_opacity;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(u_pattern_tl_a/u_texsize,u_pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(u_pattern_tl_b/u_texsize,u_pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_mix)*u_opacity;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,"uniform mat4 u_matrix;uniform vec2 u_pattern_size_a;uniform vec2 u_pattern_size_b;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_scale_a;uniform float u_scale_b;uniform float u_tile_units_to_pixels;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_a*u_pattern_size_a,u_tile_units_to_pixels,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_b*u_pattern_size_b,u_tile_units_to_pixels,a_pos);}"),circle:Nn(`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));gl_FragColor=v_visibility*opacity_t*mix(color*opacity,stroke_color*stroke_opacity,color_t);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,`uniform mat4 u_matrix;uniform bool u_scale_with_map;uniform bool u_pitch_with_map;uniform vec2 u_extrude_scale;uniform lowp float u_device_pixel_ratio;uniform highp float u_camera_to_center_distance;attribute vec2 a_pos;varying vec3 v_data;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(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);float ele=get_elevation(circle_center);v_visibility=calculate_visibility(u_matrix*vec4(circle_center,ele,1.0));if (u_pitch_with_map) {vec2 corner_position=circle_center;if (u_scale_with_map) {corner_position+=extrude*(radius+stroke_width)*u_extrude_scale;} else {vec4 projected_center=u_matrix*vec4(circle_center,0,1);corner_position+=extrude*(radius+stroke_width)*u_extrude_scale*(projected_center.w/u_camera_to_center_distance);}gl_Position=u_matrix*vec4(corner_position,ele,1);} else {gl_Position=u_matrix*vec4(circle_center,ele,1);if (u_scale_with_map) {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*u_camera_to_center_distance;} else {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*gl_Position.w;}}lowp float antialiasblur=1.0/u_device_pixel_ratio/(radius+stroke_width);v_data=vec3(extrude.x,extrude.y,antialiasblur);}`),clippingMask:Nn("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:Nn(`uniform highp float u_intensity;varying vec2 v_extrude;
#pragma mapbox: define highp float weight
#define GAUSS_COEF 0.3989422804014327
void main() {
#pragma mapbox: initialize highp float weight
float d=-0.5*3.0*3.0*dot(v_extrude,v_extrude);float val=weight*u_intensity*GAUSS_COEF*exp(d);gl_FragColor=vec4(val,1.0,1.0,1.0);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,`uniform mat4 u_matrix;uniform float u_extrude_scale;uniform float u_opacity;uniform float u_intensity;attribute vec2 a_pos;varying vec2 v_extrude;
#pragma mapbox: define highp float weight
#pragma mapbox: define mediump float radius
const highp float ZERO=1.0/255.0/16.0;
#define GAUSS_COEF 0.3989422804014327
void main(void) {
#pragma mapbox: initialize highp float weight
#pragma mapbox: initialize mediump float radius
vec2 unscaled_extrude=vec2(mod(a_pos,2.0)*2.0-1.0);float S=sqrt(-2.0*log(ZERO/weight/u_intensity/GAUSS_COEF))/3.0;v_extrude=S*unscaled_extrude;vec2 extrude=v_extrude*radius*u_extrude_scale;vec4 pos=vec4(floor(a_pos*0.5)+extrude,0,1);gl_Position=u_matrix*pos;}`),heatmapTexture:Nn(`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
}`,"uniform mat4 u_matrix;uniform vec2 u_world;attribute vec2 a_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos*u_world,0,1);v_pos.x=a_pos.x;v_pos.y=1.0-a_pos.y;}"),collisionBox:Nn("varying float v_placed;varying float v_notUsed;void main() {float alpha=0.5;gl_FragColor=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 0.5) {gl_FragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {gl_FragColor*=.1;}}","attribute vec2 a_pos;attribute vec2 a_anchor_pos;attribute vec2 a_extrude;attribute vec2 a_placed;attribute vec2 a_shift;uniform mat4 u_matrix;uniform vec2 u_extrude_scale;uniform float u_camera_to_center_distance;varying float v_placed;varying float v_notUsed;void main() {vec4 projectedPoint=u_matrix*vec4(a_anchor_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);gl_Position=u_matrix*vec4(a_pos,get_elevation(a_pos),1.0);gl_Position.xy+=(a_extrude+a_shift)*u_extrude_scale*gl_Position.w*collision_perspective_ratio;v_placed=a_placed.x;v_notUsed=a_placed.y;}"),collisionCircle:Nn("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;attribute float a_radius;attribute vec2 a_flags;uniform mat4 u_matrix;uniform mat4 u_inv_matrix;uniform vec2 u_viewport_size;uniform float u_camera_to_center_distance;varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;vec3 toTilePosition(vec2 screenPos) {vec4 rayStart=u_inv_matrix*vec4(screenPos,-1.0,1.0);vec4 rayEnd =u_inv_matrix*vec4(screenPos, 1.0,1.0);rayStart.xyz/=rayStart.w;rayEnd.xyz /=rayEnd.w;highp float t=(0.0-rayStart.z)/(rayEnd.z-rayStart.z);return mix(rayStart.xyz,rayEnd.xyz,t);}void main() {vec2 quadCenterPos=a_pos;float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(mix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));vec2 quadVertexExtent=quadVertexOffset*radius;vec3 tilePos=toTilePosition(quadCenterPos);vec4 clipPos=u_matrix*vec4(tilePos,1.0);highp float camera_to_anchor_distance=clipPos.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_perspective_ratio=collision_perspective_ratio;v_collision=collision;gl_Position=vec4(clipPos.xyz/clipPos.w,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}"),debug:Nn("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;varying vec2 v_uv;uniform mat4 u_matrix;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=u_matrix*vec4(a_pos*u_overlay_scale,get_elevation(a_pos),1);}"),fill:Nn(`#pragma mapbox: define highp vec4 color
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize lowp float opacity
gl_FragColor=color*opacity;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,`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);}`),fillOutline:Nn(`varying vec2 v_pos;
#pragma mapbox: define highp vec4 outline_color
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize highp vec4 outline_color
#pragma mapbox: initialize lowp float opacity
float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=outline_color*(alpha*opacity);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,`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;}`),fillOutlinePattern:Nn(`uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
void main() {
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=mix(color1,color2,u_fade)*alpha*opacity;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,`uniform mat4 u_matrix;uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
#pragma mapbox: define lowp float pixel_ratio_from
#pragma mapbox: define lowp float pixel_ratio_to
void main() {
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
#pragma mapbox: initialize lowp float pixel_ratio_from
#pragma mapbox: initialize lowp float pixel_ratio_to
vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;gl_Position=u_matrix*vec4(a_pos,0,1);vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}`),fillPattern:Nn(`#ifdef GL_ES
precision highp float;
#endif
uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
void main() {
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_fade)*opacity;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,`uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
#pragma mapbox: define lowp float pixel_ratio_from
#pragma mapbox: define lowp float pixel_ratio_to
void main() {
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
#pragma mapbox: initialize lowp float pixel_ratio_from
#pragma mapbox: initialize lowp float pixel_ratio_to
vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileZoomRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileZoomRatio,a_pos);}`),fillExtrusion:Nn(`varying vec4 v_color;void main() {gl_FragColor=v_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;attribute vec2 a_pos;attribute vec4 a_normal_ed;
#ifdef TERRAIN3D
attribute vec2 a_centroid;
#endif
varying vec4 v_color;
#pragma mapbox: define highp float base
#pragma mapbox: define highp float height
#pragma mapbox: define highp vec4 color
void main() {
#pragma mapbox: initialize highp float base
#pragma mapbox: initialize highp float height
#pragma mapbox: initialize highp vec4 color
vec3 normal=a_normal_ed.xyz;
#ifdef TERRAIN3D
float baseDelta=10.0;float ele=get_elevation(a_centroid);
#else
float baseDelta=0.0;float ele=0.0;
#endif
base=max(0.0,ele+base-baseDelta);height=max(0.0,ele+height);float t=mod(normal.x,2.0);gl_Position=u_matrix*vec4(a_pos,t > 0.0 ? height : base,1);float colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;float directional=clamp(dot(normal/16384.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);v_color*=u_opacity;}`),fillExtrusionPattern:Nn(`uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;
#pragma mapbox: define lowp float base
#pragma mapbox: define lowp float height
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
#pragma mapbox: define lowp float pixel_ratio_from
#pragma mapbox: define lowp float pixel_ratio_to
void main() {
#pragma mapbox: initialize lowp float base
#pragma mapbox: initialize lowp float height
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
#pragma mapbox: initialize lowp float pixel_ratio_from
#pragma mapbox: initialize lowp float pixel_ratio_to
vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);gl_FragColor=mixedColor*v_lighting;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,`uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec3 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;attribute vec2 a_pos;attribute vec4 a_normal_ed;
#ifdef TERRAIN3D
attribute vec2 a_centroid;
#endif
varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;
#pragma mapbox: define lowp float base
#pragma mapbox: define lowp float height
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
#pragma mapbox: define lowp float pixel_ratio_from
#pragma mapbox: define lowp float pixel_ratio_to
void main() {
#pragma mapbox: initialize lowp float base
#pragma mapbox: initialize lowp float height
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
#pragma mapbox: initialize lowp float pixel_ratio_from
#pragma mapbox: initialize lowp float pixel_ratio_to
vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec3 normal=a_normal_ed.xyz;float edgedistance=a_normal_ed.w;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;
#ifdef TERRAIN3D
float baseDelta=10.0;float ele=get_elevation(a_centroid);
#else
float baseDelta=0.0;float ele=0.0;
#endif
base=max(0.0,ele+base-baseDelta);height=max(0.0,ele+height);float t=mod(normal.x,2.0);float z=t > 0.0 ? height : base;gl_Position=u_matrix*vec4(a_pos,z,1);vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0
? a_pos
: vec2(edgedistance,z*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;}`),hillshadePrepare:Nn(`#ifdef GL_ES
precision highp float;
#endif
uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture2D(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack)/4.0;}void main() {vec2 epsilon=1.0/u_dimension;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y),0.0);float b=getElevation(v_pos+vec2(0,-epsilon.y),0.0);float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y),0.0);float d=getElevation(v_pos+vec2(-epsilon.x,0),0.0);float e=getElevation(v_pos,0.0);float f=getElevation(v_pos+vec2(epsilon.x,0),0.0);float g=getElevation(v_pos+vec2(-epsilon.x,epsilon.y),0.0);float h=getElevation(v_pos+vec2(0,epsilon.y),0.0);float i=getElevation(v_pos+vec2(epsilon.x,epsilon.y),0.0);float exaggerationFactor=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;float exaggeration=u_zoom < 15.0 ? (u_zoom-15.0)*exaggerationFactor : 0.0;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))/pow(2.0,exaggeration+(19.2562-u_zoom));gl_FragColor=clamp(vec4(deriv.x/2.0+0.5,deriv.y/2.0+0.5,1.0,1.0),0.0,1.0);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,"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:Nn(`uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_latrange;uniform vec2 u_light;uniform vec4 u_shadow;uniform vec4 u_highlight;uniform vec4 u_accent;
#define PI 3.141592653589793
void main() {vec4 pixel=texture2D(u_image,v_pos);vec2 deriv=((pixel.rg*2.0)-1.0);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));float slope=atan(1.25*length(deriv)/scaleFactor);float aspect=deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);float intensity=u_light.x;float azimuth=u_light.y+PI;float base=1.875-intensity*1.75;float maxValue=0.5*PI;float scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);float shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);vec4 shade_color=mix(u_shadow,u_highlight,shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);gl_FragColor=accent_color*(1.0-shade_color.a)+shade_color;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,"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;}"),line:Nn(`uniform lowp float u_device_pixel_ratio;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;
#pragma mapbox: define highp vec4 color
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);gl_FragColor=color*(alpha*opacity);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,`
#define scale 0.015873016
attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_linesofar;
#pragma mapbox: define highp vec4 color
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define mediump float gapwidth
#pragma mapbox: define lowp float offset
#pragma mapbox: define mediump float width
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump float gapwidth
#pragma mapbox: initialize lowp float offset
#pragma mapbox: initialize mediump float width
float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;
#ifdef TERRAIN3D
v_gamma_scale=1.0;
#else
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;
#endif
v_width2=vec2(outset,inset);}`),lineGradient:Nn(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;varying highp vec2 v_uv;
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture2D(u_image,v_uv);gl_FragColor=color*(alpha*opacity);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,`
#define scale 0.015873016
attribute vec2 a_pos_normal;attribute vec4 a_data;attribute float a_uv_x;attribute float a_split_index;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_image_height;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp vec2 v_uv;
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define mediump float gapwidth
#pragma mapbox: define lowp float offset
#pragma mapbox: define mediump float width
void main() {
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump float gapwidth
#pragma mapbox: initialize lowp float offset
#pragma mapbox: initialize mediump float width
float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;highp float texel_height=1.0/u_image_height;highp float half_texel_height=0.5*texel_height;v_uv=vec2(a_uv_x,a_split_index*texel_height-half_texel_height);vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;
#ifdef TERRAIN3D
v_gamma_scale=1.0;
#else
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;
#endif
v_width2=vec2(outset,inset);}`),linePattern:Nn(`#ifdef GL_ES
precision highp float;
#endif
uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width;
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
#pragma mapbox: define lowp float pixel_ratio_from
#pragma mapbox: define lowp float pixel_ratio_to
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
#pragma mapbox: initialize lowp float pixel_ratio_from
#pragma mapbox: initialize lowp float pixel_ratio_to
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float aspect_a=display_size_a.y/v_width;float aspect_b=display_size_b.y/v_width;float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x*aspect_a,1.0);float x_b=mod(v_linesofar/pattern_size_b.x*aspect_b,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos_a=mix(pattern_tl_a*texel_size-texel_size,pattern_br_a*texel_size+texel_size,vec2(x_a,y));vec2 pos_b=mix(pattern_tl_b*texel_size-texel_size,pattern_br_b*texel_size+texel_size,vec2(x_b,y));vec4 color=mix(texture2D(u_image,pos_a),texture2D(u_image,pos_b),u_fade);gl_FragColor=color*alpha*opacity;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,`
#define scale 0.015873016
#define LINE_DISTANCE_SCALE 2.0
attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width;
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp float offset
#pragma mapbox: define mediump float gapwidth
#pragma mapbox: define mediump float width
#pragma mapbox: define lowp float floorwidth
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
#pragma mapbox: define lowp float pixel_ratio_from
#pragma mapbox: define lowp float pixel_ratio_to
void main() {
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize lowp float offset
#pragma mapbox: initialize mediump float gapwidth
#pragma mapbox: initialize mediump float width
#pragma mapbox: initialize lowp float floorwidth
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
#pragma mapbox: initialize lowp float pixel_ratio_from
#pragma mapbox: initialize lowp float pixel_ratio_to
float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;
#ifdef TERRAIN3D
v_gamma_scale=1.0;
#else
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;
#endif
v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}`),lineSDF:Nn(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;uniform float u_mix;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;
#pragma mapbox: define highp vec4 color
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define mediump float width
#pragma mapbox: define lowp float floorwidth
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump float width
#pragma mapbox: initialize lowp float floorwidth
float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float sdfdist_a=texture2D(u_image,v_tex_a).a;float sdfdist_b=texture2D(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);alpha*=smoothstep(0.5-u_sdfgamma/floorwidth,0.5+u_sdfgamma/floorwidth,sdfdist);gl_FragColor=color*(alpha*opacity);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,`
#define scale 0.015873016
#define LINE_DISTANCE_SCALE 2.0
attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_patternscale_a;uniform float u_tex_y_a;uniform vec2 u_patternscale_b;uniform float u_tex_y_b;uniform vec2 u_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;
#pragma mapbox: define highp vec4 color
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define mediump float gapwidth
#pragma mapbox: define lowp float offset
#pragma mapbox: define mediump float width
#pragma mapbox: define lowp float floorwidth
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump float gapwidth
#pragma mapbox: initialize lowp float offset
#pragma mapbox: initialize mediump float width
#pragma mapbox: initialize lowp float floorwidth
float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;
#ifdef TERRAIN3D
v_gamma_scale=1.0;
#else
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;
#endif
v_tex_a=vec2(a_linesofar*u_patternscale_a.x/floorwidth,normal.y*u_patternscale_a.y+u_tex_y_a);v_tex_b=vec2(a_linesofar*u_patternscale_b.x/floorwidth,normal.y*u_patternscale_b.y+u_tex_y_b);v_width2=vec2(outset,inset);}`),raster:Nn(`uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;varying vec2 v_pos0;varying vec2 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture2D(u_image0,v_pos0);vec4 color1=texture2D(u_image1,v_pos1);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(dot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);gl_FragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,"uniform mat4 u_matrix;uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos0;varying vec2 v_pos1;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos0=(((a_texture_pos/8192.0)-0.5)/u_buffer_scale )+0.5;v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}"),symbolIcon:Nn(`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
}`,`const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;varying vec2 v_tex;varying float v_fade_opacity;
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize lowp float opacity
vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_minFontScale=a_pixeloffset.zw/256.0;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,ele,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?
camera_to_anchor_distance/u_camera_to_center_distance :
u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),ele,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,ele,1.0);float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0),z,1.0);v_tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float visibility=calculate_visibility(projectedPoint);v_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));}`),symbolSDF:Nn(`#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
}`,`const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;varying vec2 v_data0;varying vec3 v_data1;
#pragma mapbox: define highp vec4 fill_color
#pragma mapbox: define highp vec4 halo_color
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp float halo_width
#pragma mapbox: define lowp float halo_blur
void main() {
#pragma mapbox: initialize highp vec4 fill_color
#pragma mapbox: initialize highp vec4 halo_color
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize lowp float halo_width
#pragma mapbox: initialize lowp float halo_blur
vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,ele,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?
camera_to_anchor_distance/u_camera_to_center_distance :
u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),ele,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,ele,1.0);float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset),z,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}`),symbolTextAndIcon:Nn(`#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
}`,`const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_texsize_icon;varying vec4 v_data0;varying vec4 v_data1;
#pragma mapbox: define highp vec4 fill_color
#pragma mapbox: define highp vec4 halo_color
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp float halo_width
#pragma mapbox: define lowp float halo_blur
void main() {
#pragma mapbox: initialize highp vec4 fill_color
#pragma mapbox: initialize highp vec4 halo_color
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize lowp float halo_width
#pragma mapbox: initialize lowp float halo_blur
vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,ele,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?
camera_to_anchor_distance/u_camera_to_center_distance :
u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),ele,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,ele,1.0);float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale),z,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}`),terrain:Nn("uniform sampler2D u_texture;varying vec2 v_texture_pos;void main() {gl_FragColor=texture2D(u_texture,v_texture_pos);}",On),terrainDepth:Nn("varying float v_depth;const highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitMsk=vec4(0.,vec3(1./256.0));highp vec4 pack(highp float value) {highp vec4 comp=fract(value*bitSh);comp-=comp.xxyz*bitMsk;return comp;}void main() {gl_FragColor=pack(v_depth);}",On),terrainCoords:Nn("precision mediump float;uniform sampler2D u_texture;uniform float u_terrain_coords_id;varying vec2 v_texture_pos;void main() {vec4 rgba=texture2D(u_texture,v_texture_pos);gl_FragColor=vec4(rgba.r,rgba.g,rgba.b,u_terrain_coords_id);}",On)};function Nn(w,c){const m=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,x=c.match(/attribute ([\w]+) ([\w]+)/g),S=w.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),R=c.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),L=R?R.concat(S):S,V={};return{fragmentSource:w=w.replace(m,(H,G,ne,le,pe)=>(V[pe]=!0,G==="define"?`
#ifndef HAS_UNIFORM_u_${pe}
varying ${ne} ${le} ${pe};
#else
uniform ${ne} ${le} u_${pe};
#endif
`:`
#ifdef HAS_UNIFORM_u_${pe}
${ne} ${le} ${pe} = u_${pe};
#endif
`)),vertexSource:c=c.replace(m,(H,G,ne,le,pe)=>{const Te=le==="float"?"vec2":"vec4",_e=pe.match(/color/)?"color":Te;return V[pe]?G==="define"?`
#ifndef HAS_UNIFORM_u_${pe}
uniform lowp float u_${pe}_t;
attribute ${ne} ${Te} a_${pe};
varying ${ne} ${le} ${pe};
#else
uniform ${ne} ${le} u_${pe};
#endif
`:_e==="vec4"?`
#ifndef HAS_UNIFORM_u_${pe}
${pe} = a_${pe};
#else
${ne} ${le} ${pe} = u_${pe};
#endif
`:`
#ifndef HAS_UNIFORM_u_${pe}
${pe} = unpack_mix_${_e}(a_${pe}, u_${pe}_t);
#else
${ne} ${le} ${pe} = u_${pe};
#endif
`:G==="define"?`
#ifndef HAS_UNIFORM_u_${pe}
uniform lowp float u_${pe}_t;
attribute ${ne} ${Te} a_${pe};
#else
uniform ${ne} ${le} u_${pe};
#endif
`:_e==="vec4"?`
#ifndef HAS_UNIFORM_u_${pe}
${ne} ${le} ${pe} = a_${pe};
#else
${ne} ${le} ${pe} = u_${pe};
#endif
`:`
#ifndef HAS_UNIFORM_u_${pe}
${ne} ${le} ${pe} = unpack_mix_${_e}(a_${pe}, u_${pe}_t);
#else
${ne} ${le} ${pe} = u_${pe};
#endif
`}),staticAttributes:x,staticUniforms:L}}class ti{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}bind(c,m,x,S,R,L,V,H,G){this.context=c;let ne=this.boundPaintVertexBuffers.length!==S.length;for(let le=0;!ne&&le<S.length;le++)this.boundPaintVertexBuffers[le]!==S[le]&&(ne=!0);c.extVertexArrayObject&&this.vao&&this.boundProgram===m&&this.boundLayoutVertexBuffer===x&&!ne&&this.boundIndexBuffer===R&&this.boundVertexOffset===L&&this.boundDynamicVertexBuffer===V&&this.boundDynamicVertexBuffer2===H&&this.boundDynamicVertexBuffer3===G?(c.bindVertexArrayOES.set(this.vao),V&&V.bind(),R&&R.dynamicDraw&&R.bind(),H&&H.bind(),G&&G.bind()):this.freshBind(m,x,S,R,L,V,H,G)}freshBind(c,m,x,S,R,L,V,H){let G;const ne=c.numAttributes,le=this.context,pe=le.gl;if(le.extVertexArrayObject)this.vao&&this.destroy(),this.vao=le.extVertexArrayObject.createVertexArrayOES(),le.bindVertexArrayOES.set(this.vao),G=0,this.boundProgram=c,this.boundLayoutVertexBuffer=m,this.boundPaintVertexBuffers=x,this.boundIndexBuffer=S,this.boundVertexOffset=R,this.boundDynamicVertexBuffer=L,this.boundDynamicVertexBuffer2=V,this.boundDynamicVertexBuffer3=H;else{G=le.currentNumAttributes||0;for(let Te=ne;Te<G;Te++)pe.disableVertexAttribArray(Te)}m.enableAttributes(pe,c);for(const Te of x)Te.enableAttributes(pe,c);L&&L.enableAttributes(pe,c),V&&V.enableAttributes(pe,c),H&&H.enableAttributes(pe,c),m.bind(),m.setVertexAttribPointers(pe,c,R);for(const Te of x)Te.bind(),Te.setVertexAttribPointers(pe,c,R);L&&(L.bind(),L.setVertexAttribPointers(pe,c,R)),S&&S.bind(),V&&(V.bind(),V.setVertexAttribPointers(pe,c,R)),H&&(H.bind(),H.setVertexAttribPointers(pe,c,R)),le.currentNumAttributes=ne}destroy(){this.vao&&(this.context.extVertexArrayObject.deleteVertexArrayOES(this.vao),this.vao=null)}}function wr(w){const c=[];for(let m=0;m<w.length;m++){if(w[m]===null)continue;const x=w[m].split(" ");c.push(x.pop())}return c}class Wn{constructor(c,m,x,S,R,L,V){const H=c.gl;this.program=H.createProgram();const G=wr(x.staticAttributes),ne=S?S.getBinderAttributes():[],le=G.concat(ne),pe=Mn.prelude.staticUniforms?wr(Mn.prelude.staticUniforms):[],Te=x.staticUniforms?wr(x.staticUniforms):[],_e=S?S.getBinderUniforms():[],Ee=pe.concat(Te).concat(_e),Be=[];for(const wt of Ee)Be.indexOf(wt)<0&&Be.push(wt);const We=S?S.defines():[];L&&We.push("#define OVERDRAW_INSPECTOR;"),V&&We.push("#define TERRAIN3D;");const rt=We.concat(Mn.prelude.fragmentSource,x.fragmentSource).join(`
`),Oe=We.concat(Mn.prelude.vertexSource,x.vertexSource).join(`
`),ft=H.createShader(H.FRAGMENT_SHADER);if(H.isContextLost())return void(this.failedToCreate=!0);H.shaderSource(ft,rt),H.compileShader(ft),H.attachShader(this.program,ft);const st=H.createShader(H.VERTEX_SHADER);if(H.isContextLost())return void(this.failedToCreate=!0);H.shaderSource(st,Oe),H.compileShader(st),H.attachShader(this.program,st),this.attributes={};const _t={};this.numAttributes=le.length;for(let wt=0;wt<this.numAttributes;wt++)le[wt]&&(H.bindAttribLocation(this.program,wt,le[wt]),this.attributes[le[wt]]=wt);H.linkProgram(this.program),H.deleteShader(st),H.deleteShader(ft);for(let wt=0;wt<Be.length;wt++){const Ut=Be[wt];if(Ut&&!_t[Ut]){const xt=H.getUniformLocation(this.program,Ut);xt&&(_t[Ut]=xt)}}this.fixedUniforms=R(c,_t),this.terrainUniforms=((wt,Ut)=>({u_depth:new a.Uniform1i(wt,Ut.u_depth),u_terrain:new a.Uniform1i(wt,Ut.u_terrain),u_terrain_dim:new a.Uniform1f(wt,Ut.u_terrain_dim),u_terrain_matrix:new a.UniformMatrix4f(wt,Ut.u_terrain_matrix),u_terrain_unpack:new a.Uniform4f(wt,Ut.u_terrain_unpack),u_terrain_offset:new a.Uniform1f(wt,Ut.u_terrain_offset),u_terrain_exaggeration:new a.Uniform1f(wt,Ut.u_terrain_exaggeration)}))(c,_t),this.binderUniforms=S?S.getUniforms(c,_t):[]}draw(c,m,x,S,R,L,V,H,G,ne,le,pe,Te,_e,Ee,Be,We,rt){const Oe=c.gl;if(this.failedToCreate)return;if(c.program.set(this.program),c.setDepthMode(x),c.setStencilMode(S),c.setColorMode(R),c.setCullFace(L),H){c.activeTexture.set(Oe.TEXTURE2),Oe.bindTexture(Oe.TEXTURE_2D,H.depthTexture),c.activeTexture.set(Oe.TEXTURE3),Oe.bindTexture(Oe.TEXTURE_2D,H.texture);for(const st in this.terrainUniforms)this.terrainUniforms[st].set(H[st])}for(const st in this.fixedUniforms)this.fixedUniforms[st].set(V[st]);Ee&&Ee.setUniforms(c,this.binderUniforms,Te,{zoom:_e});let ft=0;switch(m){case Oe.LINES:ft=2;break;case Oe.TRIANGLES:ft=3;break;case Oe.LINE_STRIP:ft=1}for(const st of pe.get()){const _t=st.vaos||(st.vaos={});(_t[G]||(_t[G]=new ti)).bind(c,this,ne,Ee?Ee.getPaintVertexBuffers():[],le,st.vertexOffset,Be,We,rt),Oe.drawElements(m,st.primitiveLength*ft,Oe.UNSIGNED_SHORT,st.primitiveOffset*ft*2)}}}function Bn(w,c,m){const x=1/Ft(m,1,c.transform.tileZoom),S=Math.pow(2,m.tileID.overscaledZ),R=m.tileSize*Math.pow(2,c.transform.tileZoom)/S,L=R*(m.tileID.canonical.x+m.tileID.wrap*S),V=R*m.tileID.canonical.y;return{u_image:0,u_texsize:m.imageAtlasTexture.size,u_scale:[x,w.fromScale,w.toScale],u_fade:w.t,u_pixel_coord_upper:[L>>16,V>>16],u_pixel_coord_lower:[65535&L,65535&V]}}const rr=(w,c,m,x)=>{const S=c.style.light,R=S.properties.get("position"),L=[R.x,R.y,R.z],V=a.create$1();S.properties.get("anchor")==="viewport"&&a.fromRotation(V,-c.transform.angle),a.transformMat3(L,L,V);const H=S.properties.get("color");return{u_matrix:w,u_lightpos:L,u_lightintensity:S.properties.get("intensity"),u_lightcolor:[H.r,H.g,H.b],u_vertical_gradient:+m,u_opacity:x}},Er=(w,c,m,x,S,R,L)=>a.extend(rr(w,c,m,x),Bn(R,c,L),{u_height_factor:-Math.pow(2,S.overscaledZ)/L.tileSize/8}),Tr=w=>({u_matrix:w}),Gr=(w,c,m,x)=>a.extend(Tr(w),Bn(m,c,x)),ko=(w,c)=>({u_matrix:w,u_world:c}),rc=(w,c,m,x,S)=>a.extend(Gr(w,c,m,x),{u_world:S}),Wd=(w,c,m,x)=>{const S=w.transform;let R,L;if(x.paint.get("circle-pitch-alignment")==="map"){const V=Ft(m,1,S.zoom);R=!0,L=[V,V]}else R=!1,L=S.pixelsToGLUnits;return{u_camera_to_center_distance:S.cameraToCenterDistance,u_scale_with_map:+(x.paint.get("circle-pitch-scale")==="map"),u_matrix:w.translatePosMatrix(c.posMatrix,m,x.paint.get("circle-translate"),x.paint.get("circle-translate-anchor")),u_pitch_with_map:+R,u_device_pixel_ratio:w.pixelRatio,u_extrude_scale:L}},ls=(w,c,m)=>{const x=Ft(m,1,c.zoom),S=Math.pow(2,c.zoom-m.tileID.overscaledZ),R=m.tileID.overscaleFactor();return{u_matrix:w,u_camera_to_center_distance:c.cameraToCenterDistance,u_pixels_to_tile_units:x,u_extrude_scale:[c.pixelsToGLUnits[0]/(x*S),c.pixelsToGLUnits[1]/(x*S)],u_overscale_factor:R}},Vn=(w,c,m=1)=>({u_matrix:w,u_color:c,u_overlay:0,u_overlay_scale:m}),er=w=>({u_matrix:w}),Fr=(w,c,m,x)=>({u_matrix:w,u_extrude_scale:Ft(c,1,m),u_intensity:x});function zi(w,c){const m=Math.pow(2,c.canonical.z),x=c.canonical.y;return[new a.MercatorCoordinate(0,x/m).toLngLat().lat,new a.MercatorCoordinate(0,(x+1)/m).toLngLat().lat]}const As=(w,c,m,x)=>{const S=w.transform;return{u_matrix:us(w,c,m,x),u_ratio:1/Ft(c,1,S.zoom),u_device_pixel_ratio:w.pixelRatio,u_units_to_pixels:[1/S.pixelsToGLUnits[0],1/S.pixelsToGLUnits[1]]}},Ho=(w,c,m,x,S)=>a.extend(As(w,c,m,S),{u_image:0,u_image_height:x}),dl=(w,c,m,x,S)=>{const R=w.transform,L=Cr(c,R);return{u_matrix:us(w,c,m,S),u_texsize:c.imageAtlasTexture.size,u_ratio:1/Ft(c,1,R.zoom),u_device_pixel_ratio:w.pixelRatio,u_image:0,u_scale:[L,x.fromScale,x.toScale],u_fade:x.t,u_units_to_pixels:[1/R.pixelsToGLUnits[0],1/R.pixelsToGLUnits[1]]}},cs=(w,c,m,x,S,R)=>{const L=w.lineAtlas,V=Cr(c,w.transform),H=m.layout.get("line-cap")==="round",G=L.getDash(x.from,H),ne=L.getDash(x.to,H),le=G.width*S.fromScale,pe=ne.width*S.toScale;return a.extend(As(w,c,m,R),{u_patternscale_a:[V/le,-G.height/2],u_patternscale_b:[V/pe,-ne.height/2],u_sdfgamma:L.width/(256*Math.min(le,pe)*w.pixelRatio)/2,u_image:0,u_tex_y_a:G.y,u_tex_y_b:ne.y,u_mix:S.t})};function Cr(w,c){return 1/Ft(w,1,c.tileZoom)}function us(w,c,m,x){return w.translatePosMatrix(x?x.posMatrix:c.tileID.posMatrix,c,m.paint.get("line-translate"),m.paint.get("line-translate-anchor"))}const Av=(w,c,m,x,S)=>{return{u_matrix:w,u_tl_parent:c,u_scale_parent:m,u_buffer_scale:1,u_fade_t:x.mix,u_opacity:x.opacity*S.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:S.paint.get("raster-brightness-min"),u_brightness_high:S.paint.get("raster-brightness-max"),u_saturation_factor:(L=S.paint.get("raster-saturation"),L>0?1-1/(1.001-L):-L),u_contrast_factor:(R=S.paint.get("raster-contrast"),R>0?1/(1-R):1+R),u_spin_weights:Nv(S.paint.get("raster-hue-rotate"))};var R,L};function Nv(w){w*=Math.PI/180;const c=Math.sin(w),m=Math.cos(w);return[(2*m+1)/3,(-Math.sqrt(3)*c-m+1)/3,(Math.sqrt(3)*c-m+1)/3]}const ep=(w,c,m,x,S,R,L,V,H,G)=>{const ne=S.transform;return{u_is_size_zoom_constant:+(w==="constant"||w==="source"),u_is_size_feature_constant:+(w==="constant"||w==="camera"),u_size_t:c?c.uSizeT:0,u_size:c?c.uSize:0,u_camera_to_center_distance:ne.cameraToCenterDistance,u_pitch:ne.pitch/360*2*Math.PI,u_rotate_symbol:+m,u_aspect_ratio:ne.width/ne.height,u_fade_change:S.options.fadeDuration?S.symbolFadeChange:1,u_matrix:R,u_label_plane_matrix:L,u_coord_matrix:V,u_is_text:+H,u_pitch_with_map:+x,u_texsize:G,u_texture:0}},Gd=(w,c,m,x,S,R,L,V,H,G,ne)=>{const le=S.transform;return a.extend(ep(w,c,m,x,S,R,L,V,H,G),{u_gamma_scale:x?Math.cos(le._pitch)*le.cameraToCenterDistance:1,u_device_pixel_ratio:S.pixelRatio,u_is_halo:+ne})},Lv=(w,c,m,x,S,R,L,V,H,G)=>a.extend(Gd(w,c,m,x,S,R,L,V,!0,H,!0),{u_texsize_icon:G,u_texture_icon:1}),$1=(w,c,m)=>({u_matrix:w,u_opacity:c,u_color:m}),B1=(w,c,m,x,S,R)=>a.extend(function(L,V,H,G){const ne=H.imageManager.getPattern(L.from.toString()),le=H.imageManager.getPattern(L.to.toString()),{width:pe,height:Te}=H.imageManager.getPixelSize(),_e=Math.pow(2,G.tileID.overscaledZ),Ee=G.tileSize*Math.pow(2,H.transform.tileZoom)/_e,Be=Ee*(G.tileID.canonical.x+G.tileID.wrap*_e),We=Ee*G.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:ne.tl,u_pattern_br_a:ne.br,u_pattern_tl_b:le.tl,u_pattern_br_b:le.br,u_texsize:[pe,Te],u_mix:V.t,u_pattern_size_a:ne.displaySize,u_pattern_size_b:le.displaySize,u_scale_a:V.fromScale,u_scale_b:V.toScale,u_tile_units_to_pixels:1/Ft(G,1,H.transform.tileZoom),u_pixel_coord_upper:[Be>>16,We>>16],u_pixel_coord_lower:[65535&Be,65535&We]}}(x,R,m,S),{u_matrix:w,u_opacity:c}),tp={fillExtrusion:(w,c)=>({u_matrix:new a.UniformMatrix4f(w,c.u_matrix),u_lightpos:new a.Uniform3f(w,c.u_lightpos),u_lightintensity:new a.Uniform1f(w,c.u_lightintensity),u_lightcolor:new a.Uniform3f(w,c.u_lightcolor),u_vertical_gradient:new a.Uniform1f(w,c.u_vertical_gradient),u_opacity:new a.Uniform1f(w,c.u_opacity)}),fillExtrusionPattern:(w,c)=>({u_matrix:new a.UniformMatrix4f(w,c.u_matrix),u_lightpos:new a.Uniform3f(w,c.u_lightpos),u_lightintensity:new a.Uniform1f(w,c.u_lightintensity),u_lightcolor:new a.Uniform3f(w,c.u_lightcolor),u_vertical_gradient:new a.Uniform1f(w,c.u_vertical_gradient),u_height_factor:new a.Uniform1f(w,c.u_height_factor),u_image:new a.Uniform1i(w,c.u_image),u_texsize:new a.Uniform2f(w,c.u_texsize),u_pixel_coord_upper:new a.Uniform2f(w,c.u_pixel_coord_upper),u_pixel_coord_lower:new a.Uniform2f(w,c.u_pixel_coord_lower),u_scale:new a.Uniform3f(w,c.u_scale),u_fade:new a.Uniform1f(w,c.u_fade),u_opacity:new a.Uniform1f(w,c.u_opacity)}),fill:(w,c)=>({u_matrix:new a.UniformMatrix4f(w,c.u_matrix)}),fillPattern:(w,c)=>({u_matrix:new a.UniformMatrix4f(w,c.u_matrix),u_image:new a.Uniform1i(w,c.u_image),u_texsize:new a.Uniform2f(w,c.u_texsize),u_pixel_coord_upper:new a.Uniform2f(w,c.u_pixel_coord_upper),u_pixel_coord_lower:new a.Uniform2f(w,c.u_pixel_coord_lower),u_scale:new a.Uniform3f(w,c.u_scale),u_fade:new a.Uniform1f(w,c.u_fade)}),fillOutline:(w,c)=>({u_matrix:new a.UniformMatrix4f(w,c.u_matrix),u_world:new a.Uniform2f(w,c.u_world)}),fillOutlinePattern:(w,c)=>({u_matrix:new a.UniformMatrix4f(w,c.u_matrix),u_world:new a.Uniform2f(w,c.u_world),u_image:new a.Uniform1i(w,c.u_image),u_texsize:new a.Uniform2f(w,c.u_texsize),u_pixel_coord_upper:new a.Uniform2f(w,c.u_pixel_coord_upper),u_pixel_coord_lower:new a.Uniform2f(w,c.u_pixel_coord_lower),u_scale:new a.Uniform3f(w,c.u_scale),u_fade:new a.Uniform1f(w,c.u_fade)}),circle:(w,c)=>({u_camera_to_center_distance:new a.Uniform1f(w,c.u_camera_to_center_distance),u_scale_with_map:new a.Uniform1i(w,c.u_scale_with_map),u_pitch_with_map:new a.Uniform1i(w,c.u_pitch_with_map),u_extrude_scale:new a.Uniform2f(w,c.u_extrude_scale),u_device_pixel_ratio:new a.Uniform1f(w,c.u_device_pixel_ratio),u_matrix:new a.UniformMatrix4f(w,c.u_matrix)}),collisionBox:(w,c)=>({u_matrix:new a.UniformMatrix4f(w,c.u_matrix),u_camera_to_center_distance:new a.Uniform1f(w,c.u_camera_to_center_distance),u_pixels_to_tile_units:new a.Uniform1f(w,c.u_pixels_to_tile_units),u_extrude_scale:new a.Uniform2f(w,c.u_extrude_scale),u_overscale_factor:new a.Uniform1f(w,c.u_overscale_factor)}),collisionCircle:(w,c)=>({u_matrix:new a.UniformMatrix4f(w,c.u_matrix),u_inv_matrix:new a.UniformMatrix4f(w,c.u_inv_matrix),u_camera_to_center_distance:new a.Uniform1f(w,c.u_camera_to_center_distance),u_viewport_size:new a.Uniform2f(w,c.u_viewport_size)}),debug:(w,c)=>({u_color:new a.UniformColor(w,c.u_color),u_matrix:new a.UniformMatrix4f(w,c.u_matrix),u_overlay:new a.Uniform1i(w,c.u_overlay),u_overlay_scale:new a.Uniform1f(w,c.u_overlay_scale)}),clippingMask:(w,c)=>({u_matrix:new a.UniformMatrix4f(w,c.u_matrix)}),heatmap:(w,c)=>({u_extrude_scale:new a.Uniform1f(w,c.u_extrude_scale),u_intensity:new a.Uniform1f(w,c.u_intensity),u_matrix:new a.UniformMatrix4f(w,c.u_matrix)}),heatmapTexture:(w,c)=>({u_matrix:new a.UniformMatrix4f(w,c.u_matrix),u_world:new a.Uniform2f(w,c.u_world),u_image:new a.Uniform1i(w,c.u_image),u_color_ramp:new a.Uniform1i(w,c.u_color_ramp),u_opacity:new a.Uniform1f(w,c.u_opacity)}),hillshade:(w,c)=>({u_matrix:new a.UniformMatrix4f(w,c.u_matrix),u_image:new a.Uniform1i(w,c.u_image),u_latrange:new a.Uniform2f(w,c.u_latrange),u_light:new a.Uniform2f(w,c.u_light),u_shadow:new a.UniformColor(w,c.u_shadow),u_highlight:new a.UniformColor(w,c.u_highlight),u_accent:new a.UniformColor(w,c.u_accent)}),hillshadePrepare:(w,c)=>({u_matrix:new a.UniformMatrix4f(w,c.u_matrix),u_image:new a.Uniform1i(w,c.u_image),u_dimension:new a.Uniform2f(w,c.u_dimension),u_zoom:new a.Uniform1f(w,c.u_zoom),u_unpack:new a.Uniform4f(w,c.u_unpack)}),line:(w,c)=>({u_matrix:new a.UniformMatrix4f(w,c.u_matrix),u_ratio:new a.Uniform1f(w,c.u_ratio),u_device_pixel_ratio:new a.Uniform1f(w,c.u_device_pixel_ratio),u_units_to_pixels:new a.Uniform2f(w,c.u_units_to_pixels)}),lineGradient:(w,c)=>({u_matrix:new a.UniformMatrix4f(w,c.u_matrix),u_ratio:new a.Uniform1f(w,c.u_ratio),u_device_pixel_ratio:new a.Uniform1f(w,c.u_device_pixel_ratio),u_units_to_pixels:new a.Uniform2f(w,c.u_units_to_pixels),u_image:new a.Uniform1i(w,c.u_image),u_image_height:new a.Uniform1f(w,c.u_image_height)}),linePattern:(w,c)=>({u_matrix:new a.UniformMatrix4f(w,c.u_matrix),u_texsize:new a.Uniform2f(w,c.u_texsize),u_ratio:new a.Uniform1f(w,c.u_ratio),u_device_pixel_ratio:new a.Uniform1f(w,c.u_device_pixel_ratio),u_image:new a.Uniform1i(w,c.u_image),u_units_to_pixels:new a.Uniform2f(w,c.u_units_to_pixels),u_scale:new a.Uniform3f(w,c.u_scale),u_fade:new a.Uniform1f(w,c.u_fade)}),lineSDF:(w,c)=>({u_matrix:new a.UniformMatrix4f(w,c.u_matrix),u_ratio:new a.Uniform1f(w,c.u_ratio),u_device_pixel_ratio:new a.Uniform1f(w,c.u_device_pixel_ratio),u_units_to_pixels:new a.Uniform2f(w,c.u_units_to_pixels),u_patternscale_a:new a.Uniform2f(w,c.u_patternscale_a),u_patternscale_b:new a.Uniform2f(w,c.u_patternscale_b),u_sdfgamma:new a.Uniform1f(w,c.u_sdfgamma),u_image:new a.Uniform1i(w,c.u_image),u_tex_y_a:new a.Uniform1f(w,c.u_tex_y_a),u_tex_y_b:new a.Uniform1f(w,c.u_tex_y_b),u_mix:new a.Uniform1f(w,c.u_mix)}),raster:(w,c)=>({u_matrix:new a.UniformMatrix4f(w,c.u_matrix),u_tl_parent:new a.Uniform2f(w,c.u_tl_parent),u_scale_parent:new a.Uniform1f(w,c.u_scale_parent),u_buffer_scale:new a.Uniform1f(w,c.u_buffer_scale),u_fade_t:new a.Uniform1f(w,c.u_fade_t),u_opacity:new a.Uniform1f(w,c.u_opacity),u_image0:new a.Uniform1i(w,c.u_image0),u_image1:new a.Uniform1i(w,c.u_image1),u_brightness_low:new a.Uniform1f(w,c.u_brightness_low),u_brightness_high:new a.Uniform1f(w,c.u_brightness_high),u_saturation_factor:new a.Uniform1f(w,c.u_saturation_factor),u_contrast_factor:new a.Uniform1f(w,c.u_contrast_factor),u_spin_weights:new a.Uniform3f(w,c.u_spin_weights)}),symbolIcon:(w,c)=>({u_is_size_zoom_constant:new a.Uniform1i(w,c.u_is_size_zoom_constant),u_is_size_feature_constant:new a.Uniform1i(w,c.u_is_size_feature_constant),u_size_t:new a.Uniform1f(w,c.u_size_t),u_size:new a.Uniform1f(w,c.u_size),u_camera_to_center_distance:new a.Uniform1f(w,c.u_camera_to_center_distance),u_pitch:new a.Uniform1f(w,c.u_pitch),u_rotate_symbol:new a.Uniform1i(w,c.u_rotate_symbol),u_aspect_ratio:new a.Uniform1f(w,c.u_aspect_ratio),u_fade_change:new a.Uniform1f(w,c.u_fade_change),u_matrix:new a.UniformMatrix4f(w,c.u_matrix),u_label_plane_matrix:new a.UniformMatrix4f(w,c.u_label_plane_matrix),u_coord_matrix:new a.UniformMatrix4f(w,c.u_coord_matrix),u_is_text:new a.Uniform1i(w,c.u_is_text),u_pitch_with_map:new a.Uniform1i(w,c.u_pitch_with_map),u_texsize:new a.Uniform2f(w,c.u_texsize),u_texture:new a.Uniform1i(w,c.u_texture)}),symbolSDF:(w,c)=>({u_is_size_zoom_constant:new a.Uniform1i(w,c.u_is_size_zoom_constant),u_is_size_feature_constant:new a.Uniform1i(w,c.u_is_size_feature_constant),u_size_t:new a.Uniform1f(w,c.u_size_t),u_size:new a.Uniform1f(w,c.u_size),u_camera_to_center_distance:new a.Uniform1f(w,c.u_camera_to_center_distance),u_pitch:new a.Uniform1f(w,c.u_pitch),u_rotate_symbol:new a.Uniform1i(w,c.u_rotate_symbol),u_aspect_ratio:new a.Uniform1f(w,c.u_aspect_ratio),u_fade_change:new a.Uniform1f(w,c.u_fade_change),u_matrix:new a.UniformMatrix4f(w,c.u_matrix),u_label_plane_matrix:new a.UniformMatrix4f(w,c.u_label_plane_matrix),u_coord_matrix:new a.UniformMatrix4f(w,c.u_coord_matrix),u_is_text:new a.Uniform1i(w,c.u_is_text),u_pitch_with_map:new a.Uniform1i(w,c.u_pitch_with_map),u_texsize:new a.Uniform2f(w,c.u_texsize),u_texture:new a.Uniform1i(w,c.u_texture),u_gamma_scale:new a.Uniform1f(w,c.u_gamma_scale),u_device_pixel_ratio:new a.Uniform1f(w,c.u_device_pixel_ratio),u_is_halo:new a.Uniform1i(w,c.u_is_halo)}),symbolTextAndIcon:(w,c)=>({u_is_size_zoom_constant:new a.Uniform1i(w,c.u_is_size_zoom_constant),u_is_size_feature_constant:new a.Uniform1i(w,c.u_is_size_feature_constant),u_size_t:new a.Uniform1f(w,c.u_size_t),u_size:new a.Uniform1f(w,c.u_size),u_camera_to_center_distance:new a.Uniform1f(w,c.u_camera_to_center_distance),u_pitch:new a.Uniform1f(w,c.u_pitch),u_rotate_symbol:new a.Uniform1i(w,c.u_rotate_symbol),u_aspect_ratio:new a.Uniform1f(w,c.u_aspect_ratio),u_fade_change:new a.Uniform1f(w,c.u_fade_change),u_matrix:new a.UniformMatrix4f(w,c.u_matrix),u_label_plane_matrix:new a.UniformMatrix4f(w,c.u_label_plane_matrix),u_coord_matrix:new a.UniformMatrix4f(w,c.u_coord_matrix),u_is_text:new a.Uniform1i(w,c.u_is_text),u_pitch_with_map:new a.Uniform1i(w,c.u_pitch_with_map),u_texsize:new a.Uniform2f(w,c.u_texsize),u_texsize_icon:new a.Uniform2f(w,c.u_texsize_icon),u_texture:new a.Uniform1i(w,c.u_texture),u_texture_icon:new a.Uniform1i(w,c.u_texture_icon),u_gamma_scale:new a.Uniform1f(w,c.u_gamma_scale),u_device_pixel_ratio:new a.Uniform1f(w,c.u_device_pixel_ratio),u_is_halo:new a.Uniform1i(w,c.u_is_halo)}),background:(w,c)=>({u_matrix:new a.UniformMatrix4f(w,c.u_matrix),u_opacity:new a.Uniform1f(w,c.u_opacity),u_color:new a.UniformColor(w,c.u_color)}),backgroundPattern:(w,c)=>({u_matrix:new a.UniformMatrix4f(w,c.u_matrix),u_opacity:new a.Uniform1f(w,c.u_opacity),u_image:new a.Uniform1i(w,c.u_image),u_pattern_tl_a:new a.Uniform2f(w,c.u_pattern_tl_a),u_pattern_br_a:new a.Uniform2f(w,c.u_pattern_br_a),u_pattern_tl_b:new a.Uniform2f(w,c.u_pattern_tl_b),u_pattern_br_b:new a.Uniform2f(w,c.u_pattern_br_b),u_texsize:new a.Uniform2f(w,c.u_texsize),u_mix:new a.Uniform1f(w,c.u_mix),u_pattern_size_a:new a.Uniform2f(w,c.u_pattern_size_a),u_pattern_size_b:new a.Uniform2f(w,c.u_pattern_size_b),u_scale_a:new a.Uniform1f(w,c.u_scale_a),u_scale_b:new a.Uniform1f(w,c.u_scale_b),u_pixel_coord_upper:new a.Uniform2f(w,c.u_pixel_coord_upper),u_pixel_coord_lower:new a.Uniform2f(w,c.u_pixel_coord_lower),u_tile_units_to_pixels:new a.Uniform1f(w,c.u_tile_units_to_pixels)}),terrain:(w,c)=>({u_matrix:new a.UniformMatrix4f(w,c.u_matrix),u_texture:new a.Uniform1i(w,c.u_texture)}),terrainDepth:(w,c)=>({u_matrix:new a.UniformMatrix4f(w,c.u_matrix)}),terrainCoords:(w,c)=>({u_matrix:new a.UniformMatrix4f(w,c.u_matrix),u_texture:new a.Uniform1i(w,c.u_texture),u_terrain_coords_id:new a.Uniform1f(w,c.u_terrain_coords_id)})};class np{constructor(c,m,x){this.context=c;const S=c.gl;this.buffer=S.createBuffer(),this.dynamicDraw=Boolean(x),this.context.unbindVAO(),c.bindElementBuffer.set(this.buffer),S.bufferData(S.ELEMENT_ARRAY_BUFFER,m.arrayBuffer,this.dynamicDraw?S.DYNAMIC_DRAW:S.STATIC_DRAW),this.dynamicDraw||delete m.arrayBuffer}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(c){const m=this.context.gl;if(!this.dynamicDraw)throw new Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),m.bufferSubData(m.ELEMENT_ARRAY_BUFFER,0,c.arrayBuffer)}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}const rp={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class ip{constructor(c,m,x,S){this.length=m.length,this.attributes=x,this.itemSize=m.bytesPerElement,this.dynamicDraw=S,this.context=c;const R=c.gl;this.buffer=R.createBuffer(),c.bindVertexBuffer.set(this.buffer),R.bufferData(R.ARRAY_BUFFER,m.arrayBuffer,this.dynamicDraw?R.DYNAMIC_DRAW:R.STATIC_DRAW),this.dynamicDraw||delete m.arrayBuffer}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(c){if(c.length!==this.length)throw new Error(`Length of new data is ${c.length}, which doesn't match current length of ${this.length}`);const m=this.context.gl;this.bind(),m.bufferSubData(m.ARRAY_BUFFER,0,c.arrayBuffer)}enableAttributes(c,m){for(let x=0;x<this.attributes.length;x++){const S=m.attributes[this.attributes[x].name];S!==void 0&&c.enableVertexAttribArray(S)}}setVertexAttribPointers(c,m,x){for(let S=0;S<this.attributes.length;S++){const R=this.attributes[S],L=m.attributes[R.name];L!==void 0&&c.vertexAttribPointer(L,R.components,c[rp[R.type]],!1,this.itemSize,R.offset+this.itemSize*(x||0))}}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}class fr{constructor(c){this.gl=c.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1}get(){return this.current}set(c){}getDefault(){return this.default}setDefault(){this.set(this.default)}}class zv extends fr{getDefault(){return a.Color.transparent}set(c){const m=this.current;(c.r!==m.r||c.g!==m.g||c.b!==m.b||c.a!==m.a||this.dirty)&&(this.gl.clearColor(c.r,c.g,c.b,c.a),this.current=c,this.dirty=!1)}}class V1 extends fr{getDefault(){return 1}set(c){(c!==this.current||this.dirty)&&(this.gl.clearDepth(c),this.current=c,this.dirty=!1)}}class vu extends fr{getDefault(){return 0}set(c){(c!==this.current||this.dirty)&&(this.gl.clearStencil(c),this.current=c,this.dirty=!1)}}class yu extends fr{getDefault(){return[!0,!0,!0,!0]}set(c){const m=this.current;(c[0]!==m[0]||c[1]!==m[1]||c[2]!==m[2]||c[3]!==m[3]||this.dirty)&&(this.gl.colorMask(c[0],c[1],c[2],c[3]),this.current=c,this.dirty=!1)}}class Fv extends fr{getDefault(){return!0}set(c){(c!==this.current||this.dirty)&&(this.gl.depthMask(c),this.current=c,this.dirty=!1)}}class Mo extends fr{getDefault(){return 255}set(c){(c!==this.current||this.dirty)&&(this.gl.stencilMask(c),this.current=c,this.dirty=!1)}}class op extends fr{getDefault(){return{func:this.gl.ALWAYS,ref:0,mask:255}}set(c){const m=this.current;(c.func!==m.func||c.ref!==m.ref||c.mask!==m.mask||this.dirty)&&(this.gl.stencilFunc(c.func,c.ref,c.mask),this.current=c,this.dirty=!1)}}class qd extends fr{getDefault(){const c=this.gl;return[c.KEEP,c.KEEP,c.KEEP]}set(c){const m=this.current;(c[0]!==m[0]||c[1]!==m[1]||c[2]!==m[2]||this.dirty)&&(this.gl.stencilOp(c[0],c[1],c[2]),this.current=c,this.dirty=!1)}}class Zd extends fr{getDefault(){return!1}set(c){if(c===this.current&&!this.dirty)return;const m=this.gl;c?m.enable(m.STENCIL_TEST):m.disable(m.STENCIL_TEST),this.current=c,this.dirty=!1}}class ap extends fr{getDefault(){return[0,1]}set(c){const m=this.current;(c[0]!==m[0]||c[1]!==m[1]||this.dirty)&&(this.gl.depthRange(c[0],c[1]),this.current=c,this.dirty=!1)}}class sp extends fr{getDefault(){return!1}set(c){if(c===this.current&&!this.dirty)return;const m=this.gl;c?m.enable(m.DEPTH_TEST):m.disable(m.DEPTH_TEST),this.current=c,this.dirty=!1}}class Xd extends fr{getDefault(){return this.gl.LESS}set(c){(c!==this.current||this.dirty)&&(this.gl.depthFunc(c),this.current=c,this.dirty=!1)}}class lp extends fr{getDefault(){return!1}set(c){if(c===this.current&&!this.dirty)return;const m=this.gl;c?m.enable(m.BLEND):m.disable(m.BLEND),this.current=c,this.dirty=!1}}class cp extends fr{getDefault(){const c=this.gl;return[c.ONE,c.ZERO]}set(c){const m=this.current;(c[0]!==m[0]||c[1]!==m[1]||this.dirty)&&(this.gl.blendFunc(c[0],c[1]),this.current=c,this.dirty=!1)}}class Yd extends fr{getDefault(){return a.Color.transparent}set(c){const m=this.current;(c.r!==m.r||c.g!==m.g||c.b!==m.b||c.a!==m.a||this.dirty)&&(this.gl.blendColor(c.r,c.g,c.b,c.a),this.current=c,this.dirty=!1)}}class $v extends fr{getDefault(){return this.gl.FUNC_ADD}set(c){(c!==this.current||this.dirty)&&(this.gl.blendEquation(c),this.current=c,this.dirty=!1)}}class Bv extends fr{getDefault(){return!1}set(c){if(c===this.current&&!this.dirty)return;const m=this.gl;c?m.enable(m.CULL_FACE):m.disable(m.CULL_FACE),this.current=c,this.dirty=!1}}class ic extends fr{getDefault(){return this.gl.BACK}set(c){(c!==this.current||this.dirty)&&(this.gl.cullFace(c),this.current=c,this.dirty=!1)}}class U1 extends fr{getDefault(){return this.gl.CCW}set(c){(c!==this.current||this.dirty)&&(this.gl.frontFace(c),this.current=c,this.dirty=!1)}}class j1 extends fr{getDefault(){return null}set(c){(c!==this.current||this.dirty)&&(this.gl.useProgram(c),this.current=c,this.dirty=!1)}}class H1 extends fr{getDefault(){return this.gl.TEXTURE0}set(c){(c!==this.current||this.dirty)&&(this.gl.activeTexture(c),this.current=c,this.dirty=!1)}}class K1 extends fr{getDefault(){const c=this.gl;return[0,0,c.drawingBufferWidth,c.drawingBufferHeight]}set(c){const m=this.current;(c[0]!==m[0]||c[1]!==m[1]||c[2]!==m[2]||c[3]!==m[3]||this.dirty)&&(this.gl.viewport(c[0],c[1],c[2],c[3]),this.current=c,this.dirty=!1)}}class W1 extends fr{getDefault(){return null}set(c){if(c===this.current&&!this.dirty)return;const m=this.gl;m.bindFramebuffer(m.FRAMEBUFFER,c),this.current=c,this.dirty=!1}}class G1 extends fr{getDefault(){return null}set(c){if(c===this.current&&!this.dirty)return;const m=this.gl;m.bindRenderbuffer(m.RENDERBUFFER,c),this.current=c,this.dirty=!1}}class up extends fr{getDefault(){return null}set(c){if(c===this.current&&!this.dirty)return;const m=this.gl;m.bindTexture(m.TEXTURE_2D,c),this.current=c,this.dirty=!1}}class Qd extends fr{getDefault(){return null}set(c){if(c===this.current&&!this.dirty)return;const m=this.gl;m.bindBuffer(m.ARRAY_BUFFER,c),this.current=c,this.dirty=!1}}class dp extends fr{getDefault(){return null}set(c){const m=this.gl;m.bindBuffer(m.ELEMENT_ARRAY_BUFFER,c),this.current=c,this.dirty=!1}}class fp extends fr{constructor(c){super(c),this.vao=c.extVertexArrayObject}getDefault(){return null}set(c){this.vao&&(c!==this.current||this.dirty)&&(this.vao.bindVertexArrayOES(c),this.current=c,this.dirty=!1)}}class oc extends fr{getDefault(){return 4}set(c){if(c===this.current&&!this.dirty)return;const m=this.gl;m.pixelStorei(m.UNPACK_ALIGNMENT,c),this.current=c,this.dirty=!1}}class Vv extends fr{getDefault(){return!1}set(c){if(c===this.current&&!this.dirty)return;const m=this.gl;m.pixelStorei(m.UNPACK_PREMULTIPLY_ALPHA_WEBGL,c),this.current=c,this.dirty=!1}}class Uv extends fr{getDefault(){return!1}set(c){if(c===this.current&&!this.dirty)return;const m=this.gl;m.pixelStorei(m.UNPACK_FLIP_Y_WEBGL,c),this.current=c,this.dirty=!1}}class Jd extends fr{constructor(c,m){super(c),this.context=c,this.parent=m}getDefault(){return null}}class fl extends Jd{setDirty(){this.dirty=!0}set(c){if(c===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const m=this.gl;m.framebufferTexture2D(m.FRAMEBUFFER,m.COLOR_ATTACHMENT0,m.TEXTURE_2D,c,0),this.current=c,this.dirty=!1}}class jv extends Jd{set(c){if(c===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const m=this.gl;m.framebufferRenderbuffer(m.FRAMEBUFFER,m.DEPTH_ATTACHMENT,m.RENDERBUFFER,c),this.current=c,this.dirty=!1}}class ac{constructor(c,m,x,S){this.context=c,this.width=m,this.height=x;const R=c.gl,L=this.framebuffer=R.createFramebuffer();if(this.colorAttachment=new fl(c,L),S&&(this.depthAttachment=new jv(c,L)),R.checkFramebufferStatus(R.FRAMEBUFFER)!==R.FRAMEBUFFER_COMPLETE)throw new Error("Framebuffer is not complete")}destroy(){const c=this.context.gl,m=this.colorAttachment.get();if(m&&c.deleteTexture(m),this.depthAttachment){const x=this.depthAttachment.get();x&&c.deleteRenderbuffer(x)}c.deleteFramebuffer(this.framebuffer)}}class Dr{constructor(c,m,x){this.blendFunction=c,this.blendColor=m,this.mask=x}}Dr.Replace=[1,0],Dr.disabled=new Dr(Dr.Replace,a.Color.transparent,[!1,!1,!1,!1]),Dr.unblended=new Dr(Dr.Replace,a.Color.transparent,[!0,!0,!0,!0]),Dr.alphaBlended=new Dr([1,771],a.Color.transparent,[!0,!0,!0,!0]);class Hv{constructor(c){this.gl=c,this.extVertexArrayObject=this.gl.getExtension("OES_vertex_array_object"),this.clearColor=new zv(this),this.clearDepth=new V1(this),this.clearStencil=new vu(this),this.colorMask=new yu(this),this.depthMask=new Fv(this),this.stencilMask=new Mo(this),this.stencilFunc=new op(this),this.stencilOp=new qd(this),this.stencilTest=new Zd(this),this.depthRange=new ap(this),this.depthTest=new sp(this),this.depthFunc=new Xd(this),this.blend=new lp(this),this.blendFunc=new cp(this),this.blendColor=new Yd(this),this.blendEquation=new $v(this),this.cullFace=new Bv(this),this.cullFaceSide=new ic(this),this.frontFace=new U1(this),this.program=new j1(this),this.activeTexture=new H1(this),this.viewport=new K1(this),this.bindFramebuffer=new W1(this),this.bindRenderbuffer=new G1(this),this.bindTexture=new up(this),this.bindVertexBuffer=new Qd(this),this.bindElementBuffer=new dp(this),this.bindVertexArrayOES=this.extVertexArrayObject&&new fp(this),this.pixelStoreUnpack=new oc(this),this.pixelStoreUnpackPremultiplyAlpha=new Vv(this),this.pixelStoreUnpackFlipY=new Uv(this),this.extTextureFilterAnisotropic=c.getExtension("EXT_texture_filter_anisotropic")||c.getExtension("MOZ_EXT_texture_filter_anisotropic")||c.getExtension("WEBKIT_EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=c.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.extTextureHalfFloat=c.getExtension("OES_texture_half_float"),this.extTextureHalfFloat&&(c.getExtension("OES_texture_half_float_linear"),this.extRenderToTextureHalfFloat=c.getExtension("EXT_color_buffer_half_float")),this.extTimerQuery=c.getExtension("EXT_disjoint_timer_query"),this.maxTextureSize=c.getParameter(c.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(c,m){return new np(this,c,m)}createVertexBuffer(c,m,x){return new ip(this,c,m,x)}createRenderbuffer(c,m,x){const S=this.gl,R=S.createRenderbuffer();return this.bindRenderbuffer.set(R),S.renderbufferStorage(S.RENDERBUFFER,c,m,x),this.bindRenderbuffer.set(null),R}createFramebuffer(c,m,x){return new ac(this,c,m,x)}clear({color:c,depth:m}){const x=this.gl;let S=0;c&&(S|=x.COLOR_BUFFER_BIT,this.clearColor.set(c),this.colorMask.set([!0,!0,!0,!0])),m!==void 0&&(S|=x.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(m),this.depthMask.set(!0)),x.clear(S)}setCullFace(c){c.enable===!1?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(c.mode),this.frontFace.set(c.frontFace))}setDepthMode(c){c.func!==this.gl.ALWAYS||c.mask?(this.depthTest.set(!0),this.depthFunc.set(c.func),this.depthMask.set(c.mask),this.depthRange.set(c.range)):this.depthTest.set(!1)}setStencilMode(c){c.test.func!==this.gl.ALWAYS||c.mask?(this.stencilTest.set(!0),this.stencilMask.set(c.mask),this.stencilOp.set([c.fail,c.depthFail,c.pass]),this.stencilFunc.set({func:c.test.func,ref:c.ref,mask:c.test.mask})):this.stencilTest.set(!1)}setColorMode(c){g(c.blendFunction,Dr.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(c.blendFunction),this.blendColor.set(c.blendColor)),this.colorMask.set(c.mask)}unbindVAO(){this.extVertexArrayObject&&this.bindVertexArrayOES.set(null)}}class tr{constructor(c,m,x){this.func=c,this.mask=m,this.range=x}}tr.ReadOnly=!1,tr.ReadWrite=!0,tr.disabled=new tr(519,tr.ReadOnly,[0,1]);const hr=7680;class Ir{constructor(c,m,x,S,R,L){this.test=c,this.ref=m,this.mask=x,this.fail=S,this.depthFail=R,this.pass=L}}Ir.disabled=new Ir({func:519,mask:0},0,0,hr,hr,hr);class $r{constructor(c,m,x){this.enable=c,this.mode=m,this.frontFace=x}}let xu;function sc(w,c,m,x,S,R,L){const V=w.context,H=V.gl,G=w.useProgram("collisionBox"),ne=[];let le=0,pe=0;for(let Oe=0;Oe<x.length;Oe++){const ft=x[Oe],st=c.getTile(ft),_t=st.getBucket(m);if(!_t)continue;let wt=ft.posMatrix;S[0]===0&&S[1]===0||(wt=w.translatePosMatrix(ft.posMatrix,st,S,R));const Ut=L?_t.textCollisionBox:_t.iconCollisionBox,xt=_t.collisionCircleArray;if(xt.length>0){const un=a.create(),Jt=wt;a.mul(un,_t.placementInvProjMatrix,w.transform.glCoordMatrix),a.mul(un,un,_t.placementViewportMatrix),ne.push({circleArray:xt,circleOffset:pe,transform:Jt,invTransform:un,coord:ft}),le+=xt.length/4,pe=le}Ut&&G.draw(V,H.LINES,tr.disabled,Ir.disabled,w.colorModeForRenderPass(),$r.disabled,ls(wt,w.transform,st),w.style.terrain&&w.style.terrain.getTerrainData(ft),m.id,Ut.layoutVertexBuffer,Ut.indexBuffer,Ut.segments,null,w.transform.zoom,null,null,Ut.collisionVertexBuffer)}if(!L||!ne.length)return;const Te=w.useProgram("collisionCircle"),_e=new a.CollisionCircleLayoutArray;_e.resize(4*le),_e._trim();let Ee=0;for(const Oe of ne)for(let ft=0;ft<Oe.circleArray.length/4;ft++){const st=4*ft,_t=Oe.circleArray[st+0],wt=Oe.circleArray[st+1],Ut=Oe.circleArray[st+2],xt=Oe.circleArray[st+3];_e.emplace(Ee++,_t,wt,Ut,xt,0),_e.emplace(Ee++,_t,wt,Ut,xt,1),_e.emplace(Ee++,_t,wt,Ut,xt,2),_e.emplace(Ee++,_t,wt,Ut,xt,3)}(!xu||xu.length<2*le)&&(xu=function(Oe){const ft=2*Oe,st=new a.QuadTriangleArray;st.resize(ft),st._trim();for(let _t=0;_t<ft;_t++){const wt=6*_t;st.uint16[wt+0]=4*_t+0,st.uint16[wt+1]=4*_t+1,st.uint16[wt+2]=4*_t+2,st.uint16[wt+3]=4*_t+2,st.uint16[wt+4]=4*_t+3,st.uint16[wt+5]=4*_t+0}return st}(le));const Be=V.createIndexBuffer(xu,!0),We=V.createVertexBuffer(_e,a.collisionCircleLayout.members,!0);for(const Oe of ne){const ft={u_matrix:Oe.transform,u_inv_matrix:Oe.invTransform,u_camera_to_center_distance:(rt=w.transform).cameraToCenterDistance,u_viewport_size:[rt.width,rt.height]};Te.draw(V,H.TRIANGLES,tr.disabled,Ir.disabled,w.colorModeForRenderPass(),$r.disabled,ft,w.style.terrain&&w.style.terrain.getTerrainData(Oe.coord),m.id,We,Be,a.SegmentVector.simpleSegment(0,2*Oe.circleOffset,Oe.circleArray.length,Oe.circleArray.length/2),null,w.transform.zoom,null,null,null)}var rt;We.destroy(),Be.destroy()}$r.disabled=new $r(!1,1029,2305),$r.backCCW=new $r(!0,1029,2305);const q1=a.identity(new Float32Array(16));function Z1(w,c,m,x,S,R){const{horizontalAlign:L,verticalAlign:V}=a.getAnchorAlignment(w),H=-(L-.5)*c,G=-(V-.5)*m,ne=a.evaluateVariableOffset(w,x);return new a.pointGeometry((H/S+ne[0])*R,(G/S+ne[1])*R)}function Kv(w,c,m,x,S,R,L,V,H,G,ne){const le=w.text.placedSymbolArray,pe=w.text.dynamicLayoutVertexArray,Te=w.icon.dynamicLayoutVertexArray,_e={};pe.clear();for(let Ee=0;Ee<le.length;Ee++){const Be=le.get(Ee),We=w.allowVerticalPlacement&&!Be.placedOrientation,rt=Be.hidden||!Be.crossTileID||We?null:x[Be.crossTileID];if(rt){const Oe=new a.pointGeometry(Be.anchorX,Be.anchorY),ft=Kt(Oe,m?L:R,ne),st=Vt(S.cameraToCenterDistance,ft.signedDistanceFromCamera);let _t=a.evaluateSizeForFeature(w.textSizeData,H,Be)*st/a.ONE_EM;m&&(_t*=w.tilePixelRatio/V);const{width:wt,height:Ut,anchor:xt,textOffset:un,textBoxScale:Jt}=rt,fn=Z1(xt,wt,Ut,un,Jt,_t),$n=m?Kt(Oe.add(fn),R,ne).point:ft.point.add(c?fn.rotate(-S.angle):fn),Hn=w.allowVerticalPlacement&&Be.placedOrientation===a.WritingMode.vertical?Math.PI/2:0;for(let Tn=0;Tn<Be.numGlyphs;Tn++)a.addDynamicAttributes(pe,$n,Hn);G&&Be.associatedIconIndex>=0&&(_e[Be.associatedIconIndex]={shiftedAnchor:$n,angle:Hn})}else St(Be.numGlyphs,pe)}if(G){Te.clear();const Ee=w.icon.placedSymbolArray;for(let Be=0;Be<Ee.length;Be++){const We=Ee.get(Be);if(We.hidden)St(We.numGlyphs,Te);else{const rt=_e[Be];if(rt)for(let Oe=0;Oe<We.numGlyphs;Oe++)a.addDynamicAttributes(Te,rt.shiftedAnchor,rt.angle);else St(We.numGlyphs,Te)}}w.icon.dynamicLayoutVertexBuffer.updateData(Te)}w.text.dynamicLayoutVertexBuffer.updateData(pe)}function X1(w,c,m){return m.iconsInText&&c?"symbolTextAndIcon":w?"symbolSDF":"symbolIcon"}function ef(w,c,m,x,S,R,L,V,H,G,ne,le){const pe=w.context,Te=pe.gl,_e=w.transform,Ee=V==="map",Be=H==="map",We=V!=="viewport"&&m.layout.get("symbol-placement")!=="point",rt=Ee&&!Be&&!We,Oe=!m.layout.get("symbol-sort-key").isConstant();let ft=!1;const st=w.depthModeForSublayer(0,tr.ReadOnly),_t=m.layout.get("text-variable-anchor"),wt=[];for(const Ut of x){const xt=c.getTile(Ut),un=xt.getBucket(m);if(!un)continue;const Jt=S?un.text:un.icon;if(!Jt||!Jt.segments.get().length)continue;const fn=Jt.programConfigurations.get(m.id),$n=S||un.sdfIcons,Hn=S?un.textSizeData:un.iconSizeData,Tn=Be||_e.pitch!==0,mr=w.useProgram(X1($n,S,un),fn),gr=a.evaluateSizeForZoom(Hn,_e.zoom),ir=w.style.terrain&&w.style.terrain.getTerrainData(Ut);let ar,br,Ti,za,la=[0,0],Fa=null;if(S){if(br=xt.glyphAtlasTexture,Ti=Te.LINEAR,ar=xt.glyphAtlasTexture.size,un.iconsInText){la=xt.imageAtlasTexture.size,Fa=xt.imageAtlasTexture;const Go=Hn.kind==="composite"||Hn.kind==="camera";za=Tn||w.options.rotating||w.options.zooming||Go?Te.LINEAR:Te.NEAREST}}else{const Go=m.layout.get("icon-size").constantOr(0)!==1||un.iconsNeedLinear;br=xt.imageAtlasTexture,Ti=$n||w.options.rotating||w.options.zooming||Go||Tn?Te.LINEAR:Te.NEAREST,ar=xt.imageAtlasTexture.size}const Vs=Ft(xt,1,w.transform.zoom),Wo=Zt(Ut.posMatrix,Be,Ee,w.transform,Vs),vo=an(Ut.posMatrix,Be,Ee,w.transform,Vs),hs=_t&&un.hasTextData(),cf=m.layout.get("icon-text-fit")!=="none"&&hs&&un.hasIconData();if(We){const Go=w.style.terrain?(Tp,hc)=>w.style.terrain.getElevation(Ut,Tp,hc):null,gl=m.layout.get("text-rotation-alignment")==="map";Xt(un,Ut.posMatrix,w,S,Wo,vo,Be,G,gl,Go)}const yi=w.translatePosMatrix(Ut.posMatrix,xt,R,L),Zn=We||S&&_t||cf?q1:Wo,pr=w.translatePosMatrix(vo,xt,R,L,!0),Ii=$n&&m.paint.get(S?"text-halo-width":"icon-halo-width").constantOr(1)!==0;let ki;ki=$n?un.iconsInText?Lv(Hn.kind,gr,rt,Be,w,yi,Zn,pr,ar,la):Gd(Hn.kind,gr,rt,Be,w,yi,Zn,pr,S,ar,!0):ep(Hn.kind,gr,rt,Be,w,yi,Zn,pr,S,ar);const Vr={program:mr,buffers:Jt,uniformValues:ki,atlasTexture:br,atlasTextureIcon:Fa,atlasInterpolation:Ti,atlasInterpolationIcon:za,isSDF:$n,hasHalo:Ii};if(Oe&&un.canOverlap){ft=!0;const Go=Jt.segments.get();for(const gl of Go)wt.push({segments:new a.SegmentVector([gl]),sortKey:gl.sortKey,state:Vr,terrainData:ir})}else wt.push({segments:Jt.segments,sortKey:0,state:Vr,terrainData:ir})}ft&&wt.sort((Ut,xt)=>Ut.sortKey-xt.sortKey);for(const Ut of wt){const xt=Ut.state;if(pe.activeTexture.set(Te.TEXTURE0),xt.atlasTexture.bind(xt.atlasInterpolation,Te.CLAMP_TO_EDGE),xt.atlasTextureIcon&&(pe.activeTexture.set(Te.TEXTURE1),xt.atlasTextureIcon&&xt.atlasTextureIcon.bind(xt.atlasInterpolationIcon,Te.CLAMP_TO_EDGE)),xt.isSDF){const un=xt.uniformValues;xt.hasHalo&&(un.u_is_halo=1,bu(xt.buffers,Ut.segments,m,w,xt.program,st,ne,le,un,Ut.terrainData)),un.u_is_halo=0}bu(xt.buffers,Ut.segments,m,w,xt.program,st,ne,le,xt.uniformValues,Ut.terrainData)}}function bu(w,c,m,x,S,R,L,V,H,G){const ne=x.context;S.draw(ne,ne.gl.TRIANGLES,R,L,V,$r.disabled,H,G,m.id,w.layoutVertexBuffer,w.indexBuffer,c,m.paint,x.transform.zoom,w.programConfigurations.get(m.id),w.dynamicLayoutVertexBuffer,w.opacityVertexBuffer)}function _u(w,c,m,x,S,R,L){const V=w.context.gl,H=m.paint.get("fill-pattern"),G=H&&H.constantOr(1),ne=m.getCrossfadeParameters();let le,pe,Te,_e,Ee;L?(pe=G&&!m.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",le=V.LINES):(pe=G?"fillPattern":"fill",le=V.TRIANGLES);for(const Be of x){const We=c.getTile(Be);if(G&&!We.patternsLoaded())continue;const rt=We.getBucket(m);if(!rt)continue;const Oe=rt.programConfigurations.get(m.id),ft=w.useProgram(pe,Oe),st=w.style.terrain&&w.style.terrain.getTerrainData(Be);G&&(w.context.activeTexture.set(V.TEXTURE0),We.imageAtlasTexture.bind(V.LINEAR,V.CLAMP_TO_EDGE),Oe.updatePaintBuffers(ne));const _t=H.constantOr(null);if(_t&&We.imageAtlas){const xt=We.imageAtlas,un=xt.patternPositions[_t.to.toString()],Jt=xt.patternPositions[_t.from.toString()];un&&Jt&&Oe.setConstantPatternPositions(un,Jt)}const wt=st?Be:null,Ut=w.translatePosMatrix(wt?wt.posMatrix:Be.posMatrix,We,m.paint.get("fill-translate"),m.paint.get("fill-translate-anchor"));if(L){_e=rt.indexBuffer2,Ee=rt.segments2;const xt=[V.drawingBufferWidth,V.drawingBufferHeight];Te=pe==="fillOutlinePattern"&&G?rc(Ut,w,ne,We,xt):ko(Ut,xt)}else _e=rt.indexBuffer,Ee=rt.segments,Te=G?Gr(Ut,w,ne,We):Tr(Ut);ft.draw(w.context,le,S,w.stencilModeForClipping(Be),R,$r.disabled,Te,st,m.id,rt.layoutVertexBuffer,_e,Ee,m.paint,w.transform.zoom,Oe)}}function wu(w,c,m,x,S,R,L){const V=w.context,H=V.gl,G=m.paint.get("fill-extrusion-pattern"),ne=G.constantOr(1),le=m.getCrossfadeParameters(),pe=m.paint.get("fill-extrusion-opacity");for(const Te of x){const _e=c.getTile(Te),Ee=_e.getBucket(m);if(!Ee)continue;const Be=w.style.terrain&&w.style.terrain.getTerrainData(Te),We=Ee.programConfigurations.get(m.id),rt=w.useProgram(ne?"fillExtrusionPattern":"fillExtrusion",We);ne&&(w.context.activeTexture.set(H.TEXTURE0),_e.imageAtlasTexture.bind(H.LINEAR,H.CLAMP_TO_EDGE),We.updatePaintBuffers(le));const Oe=G.constantOr(null);if(Oe&&_e.imageAtlas){const wt=_e.imageAtlas,Ut=wt.patternPositions[Oe.to.toString()],xt=wt.patternPositions[Oe.from.toString()];Ut&&xt&&We.setConstantPatternPositions(Ut,xt)}const ft=w.translatePosMatrix(Te.posMatrix,_e,m.paint.get("fill-extrusion-translate"),m.paint.get("fill-extrusion-translate-anchor")),st=m.paint.get("fill-extrusion-vertical-gradient"),_t=ne?Er(ft,w,st,pe,Te,le,_e):rr(ft,w,st,pe);rt.draw(V,V.gl.TRIANGLES,S,R,L,$r.backCCW,_t,Be,m.id,Ee.layoutVertexBuffer,Ee.indexBuffer,Ee.segments,m.paint,w.transform.zoom,We,w.style.terrain&&Ee.centroidVertexBuffer)}}function hp(w,c,m,x,S,R,L){const V=w.context,H=V.gl,G=m.fbo;if(!G)return;const ne=w.useProgram("hillshade"),le=w.style.terrain&&w.style.terrain.getTerrainData(c);V.activeTexture.set(H.TEXTURE0),H.bindTexture(H.TEXTURE_2D,G.colorAttachment.get()),ne.draw(V,H.TRIANGLES,S,R,L,$r.disabled,((pe,Te,_e,Ee)=>{const Be=_e.paint.get("hillshade-shadow-color"),We=_e.paint.get("hillshade-highlight-color"),rt=_e.paint.get("hillshade-accent-color");let Oe=_e.paint.get("hillshade-illumination-direction")*(Math.PI/180);_e.paint.get("hillshade-illumination-anchor")==="viewport"&&(Oe-=pe.transform.angle);const ft=!pe.options.moving;return{u_matrix:Ee?Ee.posMatrix:pe.transform.calculatePosMatrix(Te.tileID.toUnwrapped(),ft),u_image:0,u_latrange:zi(0,Te.tileID),u_light:[_e.paint.get("hillshade-exaggeration"),Oe],u_shadow:Be,u_highlight:We,u_accent:rt}})(w,m,x,le?c:null),le,x.id,w.rasterBoundsBuffer,w.quadTriangleIndexBuffer,w.rasterBoundsSegments)}function Wv(w,c,m,x,S,R){const L=w.context,V=L.gl,H=c.dem;if(H&&H.data){const G=H.dim,ne=H.stride,le=H.getPixels();if(L.activeTexture.set(V.TEXTURE1),L.pixelStoreUnpackPremultiplyAlpha.set(!1),c.demTexture=c.demTexture||w.getTileTexture(ne),c.demTexture){const Te=c.demTexture;Te.update(le,{premultiply:!1}),Te.bind(V.NEAREST,V.CLAMP_TO_EDGE)}else c.demTexture=new T(L,le,V.RGBA,{premultiply:!1}),c.demTexture.bind(V.NEAREST,V.CLAMP_TO_EDGE);L.activeTexture.set(V.TEXTURE0);let pe=c.fbo;if(!pe){const Te=new T(L,{width:G,height:G,data:null},V.RGBA);Te.bind(V.LINEAR,V.CLAMP_TO_EDGE),pe=c.fbo=L.createFramebuffer(G,G,!0),pe.colorAttachment.set(Te.texture)}L.bindFramebuffer.set(pe.framebuffer),L.viewport.set([0,0,G,G]),w.useProgram("hillshadePrepare").draw(L,V.TRIANGLES,x,S,R,$r.disabled,((Te,_e)=>{const Ee=_e.stride,Be=a.create();return a.ortho(Be,0,a.EXTENT,-a.EXTENT,0,0,1),a.translate(Be,Be,[0,-a.EXTENT,0]),{u_matrix:Be,u_image:1,u_dimension:[Ee,Ee],u_zoom:Te.overscaledZ,u_unpack:_e.getUnpackVector()}})(c.tileID,H),null,m.id,w.rasterBoundsBuffer,w.quadTriangleIndexBuffer,w.rasterBoundsSegments),c.needsHillshadePrepare=!1}}function tf(w,c,m,x,S,R){const L=x.paint.get("raster-fade-duration");if(!R&&L>0){const V=a.exported.now(),H=(V-w.timeAdded)/L,G=c?(V-c.timeAdded)/L:-1,ne=m.getSource(),le=S.coveringZoomLevel({tileSize:ne.tileSize,roundZoom:ne.roundZoom}),pe=!c||Math.abs(c.tileID.overscaledZ-le)>Math.abs(w.tileID.overscaledZ-le),Te=pe&&w.refreshedUponExpiration?1:a.clamp(pe?H:1-G,0,1);return w.refreshedUponExpiration&&H>=1&&(w.refreshedUponExpiration=!1),c?{opacity:1,mix:1-Te}:{opacity:Te,mix:0}}return{opacity:1,mix:0}}const nf=new a.Color(1,0,0,1),sa=new a.Color(0,1,0,1),Gv=new a.Color(0,0,1,1),pp=new a.Color(1,0,1,1),qv=new a.Color(0,1,1,1);function hl(w,c,m,x){lc(w,0,c+m/2,w.transform.width,m,x)}function Cu(w,c,m,x){lc(w,c-m/2,0,m,w.transform.height,x)}function lc(w,c,m,x,S,R){const L=w.context,V=L.gl;V.enable(V.SCISSOR_TEST),V.scissor(c*w.pixelRatio,m*w.pixelRatio,x*w.pixelRatio,S*w.pixelRatio),L.clear({color:R}),V.disable(V.SCISSOR_TEST)}function Y1(w,c,m){const x=w.context,S=x.gl,R=m.posMatrix,L=w.useProgram("debug"),V=tr.disabled,H=Ir.disabled,G=w.colorModeForRenderPass(),ne="$debug",le=w.style.terrain&&w.style.terrain.getTerrainData(m);x.activeTexture.set(S.TEXTURE0),w.emptyTexture.bind(S.LINEAR,S.CLAMP_TO_EDGE);const pe=c.getTileByID(m.key).latestRawTileData,Te=Math.floor((pe&&pe.byteLength||0)/1024),_e=c.getTile(m).tileSize,Ee=512/Math.min(_e,512)*(m.overscaledZ/w.transform.zoom)*.5;let Be=m.canonical.toString();m.overscaledZ!==m.canonical.z&&(Be+=` => ${m.overscaledZ}`),function(We,rt){We.initDebugOverlayCanvas();const Oe=We.debugOverlayCanvas,ft=We.context.gl,st=We.debugOverlayCanvas.getContext("2d");st.clearRect(0,0,Oe.width,Oe.height),st.shadowColor="white",st.shadowBlur=2,st.lineWidth=1.5,st.strokeStyle="white",st.textBaseline="top",st.font="bold 36px Open Sans, sans-serif",st.fillText(rt,5,5),st.strokeText(rt,5,5),We.debugOverlayTexture.update(Oe),We.debugOverlayTexture.bind(ft.LINEAR,ft.CLAMP_TO_EDGE)}(w,`${Be} ${Te}kB`),L.draw(x,S.TRIANGLES,V,H,Dr.alphaBlended,$r.disabled,Vn(R,a.Color.transparent,Ee),null,ne,w.debugBuffer,w.quadTriangleIndexBuffer,w.debugSegments),L.draw(x,S.LINE_STRIP,V,H,G,$r.disabled,Vn(R,a.Color.red),le,ne,w.debugBuffer,w.tileBorderIndexBuffer,w.debugSegments)}function rf(w,c,m){const x=w.context,S=x.gl,R=w.colorModeForRenderPass(),L=new tr(S.LEQUAL,tr.ReadWrite,w.depthRangeFor3D),V=w.useProgram("terrain"),H=c.getTerrainMesh(),G=c.getTerrainData(m.tileID);x.bindFramebuffer.set(null),x.viewport.set([0,0,w.width,w.height]),x.activeTexture.set(S.TEXTURE0),S.bindTexture(S.TEXTURE_2D,c.getRTTFramebuffer().colorAttachment.get());const ne=w.transform.calculatePosMatrix(m.tileID.toUnwrapped());V.draw(x,S.TRIANGLES,L,Ir.disabled,R,$r.backCCW,{u_matrix:ne,u_texture:0},G,"terrain",H.vertexBuffer,H.indexBuffer,H.segments)}function Zv(w,c,m,x){const S=w.context,R=m.tileSize*c.qualityFactor;m.textures[x]||(m.textures[x]=w.getTileTexture(R)||new T(S,{width:R,height:R,data:null},S.gl.RGBA),m.textures[x].bind(S.gl.LINEAR,S.gl.CLAMP_TO_EDGE),x===0&&c.sourceCache.renderHistory.unshift(m.tileID.key));const L=c.getRTTFramebuffer();L.colorAttachment.set(m.textures[x].texture),S.bindFramebuffer.set(L.framebuffer),S.viewport.set([0,0,R,R])}class Xv{constructor(c){this._coordsDescendingInv={},this._coordsDescendingInvStr={},this.painter=c,this._renderToTexture={background:!0,fill:!0,line:!0,raster:!0},this._coordsDescendingInv={},this._coordsDescendingInvStr={},this._stacks=[],this._prevType=null,this._rerender={},this._renderableTiles=c.style.terrain.sourceCache.getRenderableTiles(),this._init()}_init(){const c=this.painter.style,m=c.terrain;for(const x in c.sourceCaches){this._coordsDescendingInv[x]={};const S=c.sourceCaches[x].getVisibleCoordinates();for(const R of S){const L=m.sourceCache.getTerrainCoords(R);for(const V in L)this._coordsDescendingInv[x][V]||(this._coordsDescendingInv[x][V]=[]),this._coordsDescendingInv[x][V].push(L[V])}}for(const x of c._order){const S=c._layers[x],R=S.source;if(this._renderToTexture[S.type]&&!this._coordsDescendingInvStr[R]){this._coordsDescendingInvStr[R]={};for(const L in this._coordsDescendingInv[R])this._coordsDescendingInvStr[R][L]=this._coordsDescendingInv[R][L].map(V=>V.key).sort().join()}}return this._renderableTiles.forEach(x=>{for(const S in this._coordsDescendingInvStr){const R=this._coordsDescendingInvStr[S][x.tileID.key];R&&R!==x.textureCoords[S]&&x.clearTextures(this.painter),m.needsRerender(S,x.tileID)&&x.clearTextures(this.painter)}this._rerender[x.tileID.key]=!x.textures.length}),m.clearRerenderCache(),m.sourceCache.removeOutdated(this.painter),this}renderLayer(c){const m=c.type,x=this.painter,S=x.style._order,R=x.currentLayer,L=R+1===S.length;if(this._renderToTexture[m]&&(this._prevType&&this._renderToTexture[this._prevType]||this._stacks.push([]),this._prevType=m,this._stacks[this._stacks.length-1].push(S[R]),!L))return!0;if(this._renderToTexture[this._prevType]||m==="hillshade"||this._renderToTexture[m]&&L){this._prevType=m;const V=this._stacks.length-1,H=this._stacks[V]||[];for(const G of this._renderableTiles){if(Zv(x,x.style.terrain,G,V),this._rerender[G.tileID.key]){x.context.clear({color:a.Color.transparent});for(let ne=0;ne<H.length;ne++){const le=x.style._layers[H[ne]],pe=le.source?this._coordsDescendingInv[le.source][G.tileID.key]:[G.tileID];x._renderTileClippingMasks(le,pe),x.renderLayer(x,x.style.sourceCaches[le.source],le,pe),le.source&&(G.textureCoords[le.source]=this._coordsDescendingInvStr[le.source][G.tileID.key])}}rf(x,x.style.terrain,G)}if(m==="hillshade"){this._stacks.push([S[R]]);for(const G of this._renderableTiles){const ne=this._coordsDescendingInv[c.source][G.tileID.key];Zv(x,x.style.terrain,G,this._stacks.length-1),x.context.clear({color:a.Color.transparent}),x._renderTileClippingMasks(c,ne),x.renderLayer(x,x.style.sourceCaches[c.source],c,ne),rf(x,x.style.terrain,G)}return!0}return this._renderToTexture[m]}return!1}}const Su={symbol:function(w,c,m,x,S){if(w.renderPass!=="translucent")return;const R=Ir.disabled,L=w.colorModeForRenderPass();m.layout.get("text-variable-anchor")&&function(V,H,G,ne,le,pe,Te){const _e=H.transform,Ee=le==="map",Be=pe==="map";for(const We of V){const rt=ne.getTile(We),Oe=rt.getBucket(G);if(!Oe||!Oe.text||!Oe.text.segments.get().length)continue;const ft=a.evaluateSizeForZoom(Oe.textSizeData,_e.zoom),st=Ft(rt,1,H.transform.zoom),_t=Zt(We.posMatrix,Be,Ee,H.transform,st),wt=G.layout.get("icon-text-fit")!=="none"&&Oe.hasIconData();if(ft){const Ut=Math.pow(2,_e.zoom-rt.tileID.overscaledZ);Kv(Oe,Ee,Be,Te,_e,_t,We.posMatrix,Ut,ft,wt,H.style.terrain?(xt,un)=>H.style.terrain.getElevation(We,xt,un):null)}}}(x,w,m,c,m.layout.get("text-rotation-alignment"),m.layout.get("text-pitch-alignment"),S),m.paint.get("icon-opacity").constantOr(1)!==0&&ef(w,c,m,x,!1,m.paint.get("icon-translate"),m.paint.get("icon-translate-anchor"),m.layout.get("icon-rotation-alignment"),m.layout.get("icon-pitch-alignment"),m.layout.get("icon-keep-upright"),R,L),m.paint.get("text-opacity").constantOr(1)!==0&&ef(w,c,m,x,!0,m.paint.get("text-translate"),m.paint.get("text-translate-anchor"),m.layout.get("text-rotation-alignment"),m.layout.get("text-pitch-alignment"),m.layout.get("text-keep-upright"),R,L),c.map.showCollisionBoxes&&(sc(w,c,m,x,m.paint.get("text-translate"),m.paint.get("text-translate-anchor"),!0),sc(w,c,m,x,m.paint.get("icon-translate"),m.paint.get("icon-translate-anchor"),!1))},circle:function(w,c,m,x){if(w.renderPass!=="translucent")return;const S=m.paint.get("circle-opacity"),R=m.paint.get("circle-stroke-width"),L=m.paint.get("circle-stroke-opacity"),V=!m.layout.get("circle-sort-key").isConstant();if(S.constantOr(1)===0&&(R.constantOr(1)===0||L.constantOr(1)===0))return;const H=w.context,G=H.gl,ne=w.depthModeForSublayer(0,tr.ReadOnly),le=Ir.disabled,pe=w.colorModeForRenderPass(),Te=[];for(let _e=0;_e<x.length;_e++){const Ee=x[_e],Be=c.getTile(Ee),We=Be.getBucket(m);if(!We)continue;const rt=We.programConfigurations.get(m.id),Oe=w.useProgram("circle",rt),ft=We.layoutVertexBuffer,st=We.indexBuffer,_t=w.style.terrain&&w.style.terrain.getTerrainData(Ee),wt={programConfiguration:rt,program:Oe,layoutVertexBuffer:ft,indexBuffer:st,uniformValues:Wd(w,Ee,Be,m),terrainData:_t};if(V){const Ut=We.segments.get();for(const xt of Ut)Te.push({segments:new a.SegmentVector([xt]),sortKey:xt.sortKey,state:wt})}else Te.push({segments:We.segments,sortKey:0,state:wt})}V&&Te.sort((_e,Ee)=>_e.sortKey-Ee.sortKey);for(const _e of Te){const{programConfiguration:Ee,program:Be,layoutVertexBuffer:We,indexBuffer:rt,uniformValues:Oe,terrainData:ft}=_e.state;Be.draw(H,G.TRIANGLES,ne,le,pe,$r.disabled,Oe,ft,m.id,We,rt,_e.segments,m.paint,w.transform.zoom,Ee)}},heatmap:function(w,c,m,x){if(m.paint.get("heatmap-opacity")!==0)if(w.renderPass==="offscreen"){const S=w.context,R=S.gl,L=Ir.disabled,V=new Dr([R.ONE,R.ONE],a.Color.transparent,[!0,!0,!0,!0]);(function(H,G,ne){const le=H.gl;H.activeTexture.set(le.TEXTURE1),H.viewport.set([0,0,G.width/4,G.height/4]);let pe=ne.heatmapFbo;if(pe)le.bindTexture(le.TEXTURE_2D,pe.colorAttachment.get()),H.bindFramebuffer.set(pe.framebuffer);else{const Te=le.createTexture();le.bindTexture(le.TEXTURE_2D,Te),le.texParameteri(le.TEXTURE_2D,le.TEXTURE_WRAP_S,le.CLAMP_TO_EDGE),le.texParameteri(le.TEXTURE_2D,le.TEXTURE_WRAP_T,le.CLAMP_TO_EDGE),le.texParameteri(le.TEXTURE_2D,le.TEXTURE_MIN_FILTER,le.LINEAR),le.texParameteri(le.TEXTURE_2D,le.TEXTURE_MAG_FILTER,le.LINEAR),pe=ne.heatmapFbo=H.createFramebuffer(G.width/4,G.height/4,!1),function(_e,Ee,Be,We){const rt=_e.gl;rt.texImage2D(rt.TEXTURE_2D,0,rt.RGBA,Ee.width/4,Ee.height/4,0,rt.RGBA,_e.extRenderToTextureHalfFloat?_e.extTextureHalfFloat.HALF_FLOAT_OES:rt.UNSIGNED_BYTE,null),We.colorAttachment.set(Be)}(H,G,Te,pe)}})(S,w,m),S.clear({color:a.Color.transparent});for(let H=0;H<x.length;H++){const G=x[H];if(c.hasRenderableParent(G))continue;const ne=c.getTile(G),le=ne.getBucket(m);if(!le)continue;const pe=le.programConfigurations.get(m.id),Te=w.useProgram("heatmap",pe),{zoom:_e}=w.transform;Te.draw(S,R.TRIANGLES,tr.disabled,L,V,$r.disabled,Fr(G.posMatrix,ne,_e,m.paint.get("heatmap-intensity")),null,m.id,le.layoutVertexBuffer,le.indexBuffer,le.segments,m.paint,w.transform.zoom,pe)}S.viewport.set([0,0,w.width,w.height])}else w.renderPass==="translucent"&&(w.context.setColorMode(w.colorModeForRenderPass()),function(S,R){const L=S.context,V=L.gl,H=R.heatmapFbo;if(!H)return;L.activeTexture.set(V.TEXTURE0),V.bindTexture(V.TEXTURE_2D,H.colorAttachment.get()),L.activeTexture.set(V.TEXTURE1);let G=R.colorRampTexture;G||(G=R.colorRampTexture=new T(L,R.colorRamp,V.RGBA)),G.bind(V.LINEAR,V.CLAMP_TO_EDGE),S.useProgram("heatmapTexture").draw(L,V.TRIANGLES,tr.disabled,Ir.disabled,S.colorModeForRenderPass(),$r.disabled,((ne,le,pe,Te)=>{const _e=a.create();a.ortho(_e,0,ne.width,ne.height,0,0,1);const Ee=ne.context.gl;return{u_matrix:_e,u_world:[Ee.drawingBufferWidth,Ee.drawingBufferHeight],u_image:0,u_color_ramp:1,u_opacity:le.paint.get("heatmap-opacity")}})(S,R),null,R.id,S.viewportBuffer,S.quadTriangleIndexBuffer,S.viewportSegments,R.paint,S.transform.zoom)}(w,m))},line:function(w,c,m,x){if(w.renderPass!=="translucent")return;const S=m.paint.get("line-opacity"),R=m.paint.get("line-width");if(S.constantOr(1)===0||R.constantOr(1)===0)return;const L=w.depthModeForSublayer(0,tr.ReadOnly),V=w.colorModeForRenderPass(),H=m.paint.get("line-dasharray"),G=m.paint.get("line-pattern"),ne=G.constantOr(1),le=m.paint.get("line-gradient"),pe=m.getCrossfadeParameters(),Te=ne?"linePattern":H?"lineSDF":le?"lineGradient":"line",_e=w.context,Ee=_e.gl;let Be=!0;for(const We of x){const rt=c.getTile(We);if(ne&&!rt.patternsLoaded())continue;const Oe=rt.getBucket(m);if(!Oe)continue;const ft=Oe.programConfigurations.get(m.id),st=w.context.program.get(),_t=w.useProgram(Te,ft),wt=Be||_t.program!==st,Ut=w.style.terrain&&w.style.terrain.getTerrainData(We),xt=G.constantOr(null);if(xt&&rt.imageAtlas){const fn=rt.imageAtlas,$n=fn.patternPositions[xt.to.toString()],Hn=fn.patternPositions[xt.from.toString()];$n&&Hn&&ft.setConstantPatternPositions($n,Hn)}const un=Ut?We:null,Jt=ne?dl(w,rt,m,pe,un):H?cs(w,rt,m,H,pe,un):le?Ho(w,rt,m,Oe.lineClipsArray.length,un):As(w,rt,m,un);if(ne)_e.activeTexture.set(Ee.TEXTURE0),rt.imageAtlasTexture.bind(Ee.LINEAR,Ee.CLAMP_TO_EDGE),ft.updatePaintBuffers(pe);else if(H&&(wt||w.lineAtlas.dirty))_e.activeTexture.set(Ee.TEXTURE0),w.lineAtlas.bind(_e);else if(le){const fn=Oe.gradients[m.id];let $n=fn.texture;if(m.gradientVersion!==fn.version){let Hn=256;if(m.stepInterpolant){const Tn=c.getSource().maxzoom,mr=We.canonical.z===Tn?Math.ceil(1<<w.transform.maxZoom-We.canonical.z):1;Hn=a.clamp(a.nextPowerOfTwo(Oe.maxLineLength/a.EXTENT*1024*mr),256,_e.maxTextureSize)}fn.gradient=a.renderColorRamp({expression:m.gradientExpression(),evaluationKey:"lineProgress",resolution:Hn,image:fn.gradient||void 0,clips:Oe.lineClipsArray}),fn.texture?fn.texture.update(fn.gradient):fn.texture=new T(_e,fn.gradient,Ee.RGBA),fn.version=m.gradientVersion,$n=fn.texture}_e.activeTexture.set(Ee.TEXTURE0),$n.bind(m.stepInterpolant?Ee.NEAREST:Ee.LINEAR,Ee.CLAMP_TO_EDGE)}_t.draw(_e,Ee.TRIANGLES,L,w.stencilModeForClipping(We),V,$r.disabled,Jt,Ut,m.id,Oe.layoutVertexBuffer,Oe.indexBuffer,Oe.segments,m.paint,w.transform.zoom,ft,Oe.layoutVertexBuffer2),Be=!1}},fill:function(w,c,m,x){const S=m.paint.get("fill-color"),R=m.paint.get("fill-opacity");if(R.constantOr(1)===0)return;const L=w.colorModeForRenderPass(),V=m.paint.get("fill-pattern"),H=w.opaquePassEnabledForLayer()&&!V.constantOr(1)&&S.constantOr(a.Color.transparent).a===1&&R.constantOr(0)===1?"opaque":"translucent";if(w.renderPass===H){const G=w.depthModeForSublayer(1,w.renderPass==="opaque"?tr.ReadWrite:tr.ReadOnly);_u(w,c,m,x,G,L,!1)}if(w.renderPass==="translucent"&&m.paint.get("fill-antialias")){const G=w.depthModeForSublayer(m.getPaintProperty("fill-outline-color")?2:0,tr.ReadOnly);_u(w,c,m,x,G,L,!0)}},"fill-extrusion":function(w,c,m,x){const S=m.paint.get("fill-extrusion-opacity");if(S!==0&&w.renderPass==="translucent"){const R=new tr(w.context.gl.LEQUAL,tr.ReadWrite,w.depthRangeFor3D);if(S!==1||m.paint.get("fill-extrusion-pattern").constantOr(1))wu(w,c,m,x,R,Ir.disabled,Dr.disabled),wu(w,c,m,x,R,w.stencilModeFor3D(),w.colorModeForRenderPass());else{const L=w.colorModeForRenderPass();wu(w,c,m,x,R,Ir.disabled,L)}}},hillshade:function(w,c,m,x){if(w.renderPass!=="offscreen"&&w.renderPass!=="translucent")return;const S=w.context,R=w.depthModeForSublayer(0,tr.ReadOnly),L=w.colorModeForRenderPass(),[V,H]=w.renderPass==="translucent"?w.stencilConfigForOverlap(x):[{},x];for(const G of H){const ne=c.getTile(G);ne.needsHillshadePrepare!==void 0&&ne.needsHillshadePrepare&&w.renderPass==="offscreen"?Wv(w,ne,m,R,Ir.disabled,L):w.renderPass==="translucent"&&hp(w,G,ne,m,R,V[G.overscaledZ],L)}S.viewport.set([0,0,w.width,w.height])},raster:function(w,c,m,x){if(w.renderPass!=="translucent"||m.paint.get("raster-opacity")===0||!x.length)return;const S=w.context,R=S.gl,L=c.getSource(),V=w.useProgram("raster"),H=w.colorModeForRenderPass(),[G,ne]=L instanceof he?[{},x]:w.stencilConfigForOverlap(x),le=ne[ne.length-1].overscaledZ,pe=!w.options.moving;for(const Te of ne){const _e=w.depthModeForSublayer(Te.overscaledZ-le,m.paint.get("raster-opacity")===1?tr.ReadWrite:tr.ReadOnly,R.LESS),Ee=c.getTile(Te);Ee.registerFadeDuration(m.paint.get("raster-fade-duration"));const Be=c.findLoadedParent(Te,0),We=tf(Ee,Be,c,m,w.transform,w.style.terrain);let rt,Oe;const ft=m.paint.get("raster-resampling")==="nearest"?R.NEAREST:R.LINEAR;S.activeTexture.set(R.TEXTURE0),Ee.texture.bind(ft,R.CLAMP_TO_EDGE,R.LINEAR_MIPMAP_NEAREST),S.activeTexture.set(R.TEXTURE1),Be?(Be.texture.bind(ft,R.CLAMP_TO_EDGE,R.LINEAR_MIPMAP_NEAREST),rt=Math.pow(2,Be.tileID.overscaledZ-Ee.tileID.overscaledZ),Oe=[Ee.tileID.canonical.x*rt%1,Ee.tileID.canonical.y*rt%1]):Ee.texture.bind(ft,R.CLAMP_TO_EDGE,R.LINEAR_MIPMAP_NEAREST);const st=w.style.terrain&&w.style.terrain.getTerrainData(Te),_t=st?Te:null,wt=_t?_t.posMatrix:w.transform.calculatePosMatrix(Te.toUnwrapped(),pe),Ut=Av(wt,Oe||[0,0],rt||1,We,m);L instanceof he?V.draw(S,R.TRIANGLES,_e,Ir.disabled,H,$r.disabled,Ut,st,m.id,L.boundsBuffer,w.quadTriangleIndexBuffer,L.boundsSegments):V.draw(S,R.TRIANGLES,_e,G[Te.overscaledZ],H,$r.disabled,Ut,st,m.id,w.rasterBoundsBuffer,w.quadTriangleIndexBuffer,w.rasterBoundsSegments)}},background:function(w,c,m,x){const S=m.paint.get("background-color"),R=m.paint.get("background-opacity");if(R===0)return;const L=w.context,V=L.gl,H=w.transform,G=H.tileSize,ne=m.paint.get("background-pattern");if(w.isPatternMissing(ne))return;const le=!ne&&S.a===1&&R===1&&w.opaquePassEnabledForLayer()?"opaque":"translucent";if(w.renderPass!==le)return;const pe=Ir.disabled,Te=w.depthModeForSublayer(0,le==="opaque"?tr.ReadWrite:tr.ReadOnly),_e=w.colorModeForRenderPass(),Ee=w.useProgram(ne?"backgroundPattern":"background"),Be=x||H.coveringTiles({tileSize:G,terrain:w.style.terrain});ne&&(L.activeTexture.set(V.TEXTURE0),w.imageManager.bind(w.context));const We=m.getCrossfadeParameters();for(const rt of Be){const Oe=x?rt.posMatrix:w.transform.calculatePosMatrix(rt.toUnwrapped()),ft=ne?B1(Oe,R,w,ne,{tileID:rt,tileSize:G},We):$1(Oe,R,S),st=w.style.terrain&&w.style.terrain.getTerrainData(rt);Ee.draw(L,V.TRIANGLES,Te,pe,_e,$r.disabled,ft,st,m.id,w.tileExtentBuffer,w.quadTriangleIndexBuffer,w.tileExtentSegments)}},debug:function(w,c,m){for(let x=0;x<m.length;x++)Y1(w,c,m[x])},custom:function(w,c,m){const x=w.context,S=m.implementation;if(w.renderPass==="offscreen"){const R=S.prerender;R&&(w.setCustomLayerDefaults(),x.setColorMode(w.colorModeForRenderPass()),R.call(S,x.gl,w.transform.customLayerMatrix()),x.setDirty(),w.setBaseState())}else if(w.renderPass==="translucent"){w.setCustomLayerDefaults(),x.setColorMode(w.colorModeForRenderPass()),x.setStencilMode(Ir.disabled);const R=S.renderingMode==="3d"?new tr(w.context.gl.LEQUAL,tr.ReadWrite,w.depthRangeFor3D):w.depthModeForSublayer(0,tr.ReadOnly);x.setDepthMode(R),S.render(x.gl,w.transform.customLayerMatrix()),x.setDirty(),w.setBaseState(),x.bindFramebuffer.set(null)}}};class mp{constructor(c,m){this.context=new Hv(c),this.transform=m,this._tileTextures={},this.terrainFacilitator={dirty:!0,matrix:a.create(),renderTime:0},this.setup(),this.numSublayers=Ue.maxUnderzooming+Ue.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new Gt,this.gpuTimers={}}resize(c,m,x){if(this.width=c*x,this.height=m*x,this.pixelRatio=x,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(const S of this.style._order)this.style._layers[S].resize()}setup(){const c=this.context,m=new a.PosArray;m.emplaceBack(0,0),m.emplaceBack(a.EXTENT,0),m.emplaceBack(0,a.EXTENT),m.emplaceBack(a.EXTENT,a.EXTENT),this.tileExtentBuffer=c.createVertexBuffer(m,wn.members),this.tileExtentSegments=a.SegmentVector.simpleSegment(0,0,4,2);const x=new a.PosArray;x.emplaceBack(0,0),x.emplaceBack(a.EXTENT,0),x.emplaceBack(0,a.EXTENT),x.emplaceBack(a.EXTENT,a.EXTENT),this.debugBuffer=c.createVertexBuffer(x,wn.members),this.debugSegments=a.SegmentVector.simpleSegment(0,0,4,5);const S=new a.RasterBoundsArray;S.emplaceBack(0,0,0,0),S.emplaceBack(a.EXTENT,0,a.EXTENT,0),S.emplaceBack(0,a.EXTENT,0,a.EXTENT),S.emplaceBack(a.EXTENT,a.EXTENT,a.EXTENT,a.EXTENT),this.rasterBoundsBuffer=c.createVertexBuffer(S,oe.members),this.rasterBoundsSegments=a.SegmentVector.simpleSegment(0,0,4,2);const R=new a.PosArray;R.emplaceBack(0,0),R.emplaceBack(1,0),R.emplaceBack(0,1),R.emplaceBack(1,1),this.viewportBuffer=c.createVertexBuffer(R,wn.members),this.viewportSegments=a.SegmentVector.simpleSegment(0,0,4,2);const L=new a.LineStripIndexArray;L.emplaceBack(0),L.emplaceBack(1),L.emplaceBack(3),L.emplaceBack(2),L.emplaceBack(0),this.tileBorderIndexBuffer=c.createIndexBuffer(L);const V=new a.TriangleIndexArray;V.emplaceBack(0,1,2),V.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=c.createIndexBuffer(V),this.emptyTexture=new T(c,{width:1,height:1,data:new Uint8Array([0,0,0,0])},c.gl.RGBA);const H=this.context.gl;this.stencilClearMode=new Ir({func:H.ALWAYS,mask:0},0,255,H.ZERO,H.ZERO,H.ZERO)}clearStencil(){const c=this.context,m=c.gl;this.nextStencilID=1,this.currentStencilSource=void 0;const x=a.create();a.ortho(x,0,this.width,this.height,0,0,1),a.scale(x,x,[m.drawingBufferWidth,m.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(c,m.TRIANGLES,tr.disabled,this.stencilClearMode,Dr.disabled,$r.disabled,er(x),null,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(c,m){if(this.currentStencilSource===c.source||!c.isTileClipped()||!m||!m.length)return;this.currentStencilSource=c.source;const x=this.context,S=x.gl;this.nextStencilID+m.length>256&&this.clearStencil(),x.setColorMode(Dr.disabled),x.setDepthMode(tr.disabled);const R=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(const L of m){const V=this._tileClippingMaskIDs[L.key]=this.nextStencilID++,H=this.style.terrain&&this.style.terrain.getTerrainData(L);R.draw(x,S.TRIANGLES,tr.disabled,new Ir({func:S.ALWAYS,mask:0},V,255,S.KEEP,S.KEEP,S.REPLACE),Dr.disabled,$r.disabled,er(L.posMatrix),H,"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();const c=this.nextStencilID++,m=this.context.gl;return new Ir({func:m.NOTEQUAL,mask:255},c,255,m.KEEP,m.KEEP,m.REPLACE)}stencilModeForClipping(c){const m=this.context.gl;return new Ir({func:m.EQUAL,mask:255},this._tileClippingMaskIDs[c.key],0,m.KEEP,m.KEEP,m.REPLACE)}stencilConfigForOverlap(c){const m=this.context.gl,x=c.sort((L,V)=>V.overscaledZ-L.overscaledZ),S=x[x.length-1].overscaledZ,R=x[0].overscaledZ-S+1;if(R>1){this.currentStencilSource=void 0,this.nextStencilID+R>256&&this.clearStencil();const L={};for(let V=0;V<R;V++)L[V+S]=new Ir({func:m.GEQUAL,mask:255},V+this.nextStencilID,255,m.KEEP,m.KEEP,m.REPLACE);return this.nextStencilID+=R,[L,x]}return[{[S]:Ir.disabled},x]}colorModeForRenderPass(){const c=this.context.gl;return this._showOverdrawInspector?new Dr([c.CONSTANT_COLOR,c.ONE],new a.Color(.125,.125,.125,0),[!0,!0,!0,!0]):this.renderPass==="opaque"?Dr.unblended:Dr.alphaBlended}depthModeForSublayer(c,m,x){if(!this.opaquePassEnabledForLayer())return tr.disabled;const S=1-((1+this.currentLayer)*this.numSublayers+c)*this.depthEpsilon;return new tr(x||this.context.gl.LEQUAL,m,[S,S])}opaquePassEnabledForLayer(){return this.currentLayer<this.opaquePassCutoff}render(c,m){this.style=c,this.options=m,this.lineAtlas=c.lineAtlas,this.imageManager=c.imageManager,this.glyphManager=c.glyphManager,this.symbolFadeChange=c.placement.symbolFadeChange(a.exported.now()),this.imageManager.beginFrame();const x=this.style._order,S=this.style.sourceCaches,R=this.style.terrain&&new Xv(this);for(const G in S){const ne=S[G];ne.used&&ne.prepare(this.context)}const L={},V={},H={};for(const G in S){const ne=S[G];L[G]=ne.getVisibleCoordinates(),V[G]=L[G].slice().reverse(),H[G]=ne.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(let G=0;G<x.length;G++)if(this.style._layers[x[G]].is3D()){this.opaquePassCutoff=G;break}if(R){this.opaquePassCutoff=0;const G=this.style.terrain.sourceCache.tilesAfterTime(this.terrainFacilitator.renderTime);(this.terrainFacilitator.dirty||!a.equals(this.terrainFacilitator.matrix,this.transform.projMatrix)||G.length)&&(a.copy(this.terrainFacilitator.matrix,this.transform.projMatrix),this.terrainFacilitator.renderTime=Date.now(),this.terrainFacilitator.dirty=!1,function(ne,le){const pe=ne.context,Te=pe.gl,_e=Dr.unblended,Ee=new tr(Te.LEQUAL,tr.ReadWrite,[0,1]),Be=le.getTerrainMesh(),We=le.sourceCache.getRenderableTiles(),rt=ne.useProgram("terrainDepth");pe.bindFramebuffer.set(le.getFramebuffer("depth").framebuffer),pe.viewport.set([0,0,ne.width/devicePixelRatio,ne.height/devicePixelRatio]),pe.clear({color:a.Color.transparent,depth:1});for(const Oe of We){const ft=le.getTerrainData(Oe.tileID),st=ne.transform.calculatePosMatrix(Oe.tileID.toUnwrapped());rt.draw(pe,Te.TRIANGLES,Ee,Ir.disabled,_e,$r.backCCW,{u_matrix:st},ft,"terrain",Be.vertexBuffer,Be.indexBuffer,Be.segments)}pe.bindFramebuffer.set(null),pe.viewport.set([0,0,ne.width,ne.height])}(this,this.style.terrain),function(ne,le){const pe=ne.context,Te=pe.gl,_e=Dr.unblended,Ee=new tr(Te.LEQUAL,tr.ReadWrite,[0,1]),Be=le.getTerrainMesh(),We=le.getCoordsTexture(),rt=le.sourceCache.getRenderableTiles(),Oe=ne.useProgram("terrainCoords");pe.bindFramebuffer.set(le.getFramebuffer("coords").framebuffer),pe.viewport.set([0,0,ne.width/devicePixelRatio,ne.height/devicePixelRatio]),pe.clear({color:a.Color.transparent,depth:1}),le.coordsIndex=[];for(const ft of rt){const st=le.getTerrainData(ft.tileID);pe.activeTexture.set(Te.TEXTURE0),Te.bindTexture(Te.TEXTURE_2D,We.texture);const _t=ne.transform.calculatePosMatrix(ft.tileID.toUnwrapped());Oe.draw(pe,Te.TRIANGLES,Ee,Ir.disabled,_e,$r.backCCW,{u_matrix:_t,u_terrain_coords_id:(255-le.coordsIndex.length)/255,u_texture:0},st,"terrain",Be.vertexBuffer,Be.indexBuffer,Be.segments),le.coordsIndex.push(ft.tileID.key)}pe.bindFramebuffer.set(null),pe.viewport.set([0,0,ne.width,ne.height])}(this,this.style.terrain))}this.renderPass="offscreen";for(const G of x){const ne=this.style._layers[G];if(!ne.hasOffscreenPass()||ne.isHidden(this.transform.zoom))continue;const le=V[ne.source];(ne.type==="custom"||le.length)&&this.renderLayer(this,S[ne.source],ne,le)}if(this.context.bindFramebuffer.set(null),this.context.clear({color:m.showOverdrawInspector?a.Color.black:a.Color.transparent,depth:1}),this.clearStencil(),this._showOverdrawInspector=m.showOverdrawInspector,this.depthRangeFor3D=[0,1-(c._order.length+2)*this.numSublayers*this.depthEpsilon],!R)for(this.renderPass="opaque",this.currentLayer=x.length-1;this.currentLayer>=0;this.currentLayer--){const G=this.style._layers[x[this.currentLayer]],ne=S[G.source],le=L[G.source];this._renderTileClippingMasks(G,le),this.renderLayer(this,ne,G,le)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer<x.length;this.currentLayer++){const G=this.style._layers[x[this.currentLayer]],ne=S[G.source];if(R&&R.renderLayer(G))continue;const le=(G.type==="symbol"?H:V)[G.source];this._renderTileClippingMasks(G,L[G.source]),this.renderLayer(this,ne,G,le)}if(this.options.showTileBoundaries){let G,ne;Object.values(this.style._layers).forEach(le=>{le.source&&!le.isHidden(this.transform.zoom)&&(le.source!==(ne&&ne.id)&&(ne=this.style.sourceCaches[le.source]),(!G||G.getSource().maxzoom<ne.getSource().maxzoom)&&(G=ne))}),G&&Su.debug(this,G,G.getVisibleCoordinates())}this.options.showPadding&&function(G){const ne=G.transform.padding;hl(G,G.transform.height-(ne.top||0),3,nf),hl(G,ne.bottom||0,3,sa),Cu(G,ne.left||0,3,Gv),Cu(G,G.transform.width-(ne.right||0),3,pp);const le=G.transform.centerPoint;(function(pe,Te,_e,Ee){lc(pe,Te-1,_e-10,2,20,Ee),lc(pe,Te-10,_e-1,20,2,Ee)})(G,le.x,G.transform.height-le.y,qv)}(this),this.context.setDefault()}renderLayer(c,m,x,S){x.isHidden(this.transform.zoom)||(x.type==="background"||x.type==="custom"||(S||[]).length)&&(this.id=x.id,this.gpuTimingStart(x),Su[x.type](c,m,x,S,this.style.placement.variableOffsets),this.gpuTimingEnd())}gpuTimingStart(c){if(!this.options.gpuTiming)return;const m=this.context.extTimerQuery;let x=this.gpuTimers[c.id];x||(x=this.gpuTimers[c.id]={calls:0,cpuTime:0,query:m.createQueryEXT()}),x.calls++,m.beginQueryEXT(m.TIME_ELAPSED_EXT,x.query)}gpuTimingEnd(){if(!this.options.gpuTiming)return;const c=this.context.extTimerQuery;c.endQueryEXT(c.TIME_ELAPSED_EXT)}collectGpuTimers(){const c=this.gpuTimers;return this.gpuTimers={},c}queryGpuTimers(c){const m={};for(const x in c){const S=c[x],R=this.context.extTimerQuery,L=R.getQueryObjectEXT(S.query,R.QUERY_RESULT_EXT)/1e6;R.deleteQueryEXT(S.query),m[x]=L}return m}translatePosMatrix(c,m,x,S,R){if(!x[0]&&!x[1])return c;const L=R?S==="map"?this.transform.angle:0:S==="viewport"?-this.transform.angle:0;if(L){const G=Math.sin(L),ne=Math.cos(L);x=[x[0]*ne-x[1]*G,x[0]*G+x[1]*ne]}const V=[R?x[0]:Ft(m,x[0],this.transform.zoom),R?x[1]:Ft(m,x[1],this.transform.zoom),0],H=new Float32Array(16);return a.translate(H,c,V),H}saveTileTexture(c){const m=this._tileTextures[c.size[0]];m?m.push(c):this._tileTextures[c.size[0]]=[c]}getTileTexture(c){const m=this._tileTextures[c];return m&&m.length>0?m.pop():null}isPatternMissing(c){if(!c)return!1;if(!c.from||!c.to)return!0;const m=this.imageManager.getPattern(c.from.toString()),x=this.imageManager.getPattern(c.to.toString());return!m||!x}useProgram(c,m){this.cache=this.cache||{};const x=c+(m?m.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"")+(this.style.terrain?"/terrain":"");return this.cache[x]||(this.cache[x]=new Wn(this.context,c,Mn[c],m,tp[c],this._showOverdrawInspector,this.style.terrain)),this.cache[x]}setCustomLayerDefaults(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()}setBaseState(){const c=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(c.FUNC_ADD)}initDebugOverlayCanvas(){this.debugOverlayCanvas==null&&(this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new T(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))}destroy(){this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()}}class of{constructor(c,m){this.points=c,this.planes=m}static fromInvProjectionMatrix(c,m,x){const S=Math.pow(2,x),R=[[-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(V=>{const H=1/(V=a.transformMat4([],V,c))[3]/m*S;return a.mul$1(V,V,[H,H,1/V[3],H])}),L=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(V=>{const H=a.sub([],R[V[0]],R[V[1]]),G=a.sub([],R[V[2]],R[V[1]]),ne=a.normalize([],a.cross([],H,G)),le=-a.dot(ne,R[V[1]]);return ne.concat(le)});return new of(R,L)}}class Eu{constructor(c,m){this.min=c,this.max=m,this.center=a.scale$1([],a.add([],this.min,this.max),.5)}quadrant(c){const m=[c%2==0,c<2],x=a.clone$2(this.min),S=a.clone$2(this.max);for(let R=0;R<m.length;R++)x[R]=m[R]?this.min[R]:this.center[R],S[R]=m[R]?this.center[R]:this.max[R];return S[2]=this.max[2],new Eu(x,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]}intersects(c){const m=[[this.min[0],this.min[1],this.min[2],1],[this.max[0],this.min[1],this.min[2],1],[this.max[0],this.max[1],this.min[2],1],[this.min[0],this.max[1],this.min[2],1],[this.min[0],this.min[1],this.max[2],1],[this.max[0],this.min[1],this.max[2],1],[this.max[0],this.max[1],this.max[2],1],[this.min[0],this.max[1],this.max[2],1]];let x=!0;for(let S=0;S<c.planes.length;S++){const R=c.planes[S];let L=0;for(let V=0;V<m.length;V++)a.dot$1(R,m[V])>=0&&L++;if(L===0)return 0;L!==m.length&&(x=!1)}if(x)return 2;for(let S=0;S<3;S++){let R=Number.MAX_VALUE,L=-Number.MAX_VALUE;for(let V=0;V<c.points.length;V++){const H=c.points[V][S]-this.min[S];R=Math.min(R,H),L=Math.max(L,H)}if(L<0||R>this.max[S]-this.min[S])return 0}return 1}}class cc{constructor(c=0,m=0,x=0,S=0){if(isNaN(c)||c<0||isNaN(m)||m<0||isNaN(x)||x<0||isNaN(S)||S<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=c,this.bottom=m,this.left=x,this.right=S}interpolate(c,m,x){return m.top!=null&&c.top!=null&&(this.top=a.number(c.top,m.top,x)),m.bottom!=null&&c.bottom!=null&&(this.bottom=a.number(c.bottom,m.bottom,x)),m.left!=null&&c.left!=null&&(this.left=a.number(c.left,m.left,x)),m.right!=null&&c.right!=null&&(this.right=a.number(c.right,m.right,x)),this}getCenter(c,m){const x=a.clamp((this.left+c-this.right)/2,0,c),S=a.clamp((this.top+m-this.bottom)/2,0,m);return new a.pointGeometry(x,S)}equals(c){return this.top===c.top&&this.bottom===c.bottom&&this.left===c.left&&this.right===c.right}clone(){return new cc(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}class Pu{constructor(c,m,x,S,R){this.tileSize=512,this.maxValidLatitude=85.051129,this.freezeElevation=!1,this._renderWorldCopies=R===void 0||!!R,this._minZoom=c||0,this._maxZoom=m||22,this._minPitch=x==null?0:x,this._maxPitch=S==null?60:S,this.setMaxBounds(),this.width=0,this.height=0,this._center=new a.LngLat(0,0),this._elevation=0,this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new cc,this._posMatrixCache={},this._alignedPosMatrixCache={}}clone(){const c=new Pu(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return c.tileSize=this.tileSize,c.latRange=this.latRange,c.width=this.width,c.height=this.height,c._center=this._center,c._elevation=this._elevation,c.zoom=this.zoom,c.angle=this.angle,c._fov=this._fov,c._pitch=this._pitch,c._unmodified=this._unmodified,c._edgeInsets=this._edgeInsets.clone(),c._calcMatrices(),c}get minZoom(){return this._minZoom}set minZoom(c){this._minZoom!==c&&(this._minZoom=c,this.zoom=Math.max(this.zoom,c))}get maxZoom(){return this._maxZoom}set maxZoom(c){this._maxZoom!==c&&(this._maxZoom=c,this.zoom=Math.min(this.zoom,c))}get minPitch(){return this._minPitch}set minPitch(c){this._minPitch!==c&&(this._minPitch=c,this.pitch=Math.max(this.pitch,c))}get maxPitch(){return this._maxPitch}set maxPitch(c){this._maxPitch!==c&&(this._maxPitch=c,this.pitch=Math.min(this.pitch,c))}get renderWorldCopies(){return this._renderWorldCopies}set renderWorldCopies(c){c===void 0?c=!0:c===null&&(c=!1),this._renderWorldCopies=c}get worldSize(){return this.tileSize*this.scale}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new a.pointGeometry(this.width,this.height)}get bearing(){return-this.angle/Math.PI*180}set bearing(c){const m=-a.wrap(c,-180,180)*Math.PI/180;var x;this.angle!==m&&(this._unmodified=!1,this.angle=m,this._calcMatrices(),this.rotationMatrix=(x=new a.ARRAY_TYPE(4),a.ARRAY_TYPE!=Float32Array&&(x[1]=0,x[2]=0),x[0]=1,x[3]=1,x),function(S,R,L){var V=R[0],H=R[1],G=R[2],ne=R[3],le=Math.sin(L),pe=Math.cos(L);S[0]=V*pe+G*le,S[1]=H*pe+ne*le,S[2]=V*-le+G*pe,S[3]=H*-le+ne*pe}(this.rotationMatrix,this.rotationMatrix,this.angle))}get pitch(){return this._pitch/Math.PI*180}set pitch(c){const m=a.clamp(c,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==m&&(this._unmodified=!1,this._pitch=m,this._calcMatrices())}get fov(){return this._fov/Math.PI*180}set fov(c){c=Math.max(.01,Math.min(60,c)),this._fov!==c&&(this._unmodified=!1,this._fov=c/180*Math.PI,this._calcMatrices())}get zoom(){return this._zoom}set zoom(c){const m=Math.min(Math.max(c,this.minZoom),this.maxZoom);this._zoom!==m&&(this._unmodified=!1,this._zoom=m,this.scale=this.zoomScale(m),this.tileZoom=Math.floor(m),this.zoomFraction=m-this.tileZoom,this._constrain(),this._calcMatrices())}get center(){return this._center}set center(c){c.lat===this._center.lat&&c.lng===this._center.lng||(this._unmodified=!1,this._center=c,this._constrain(),this._calcMatrices())}get elevation(){return this._elevation}set elevation(c){c!==this._elevation&&(this._elevation=c,this._constrain(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}set padding(c){this._edgeInsets.equals(c)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,c,1),this._calcMatrices())}get centerPoint(){return this._edgeInsets.getCenter(this.width,this.height)}isPaddingEqual(c){return this._edgeInsets.equals(c)}interpolatePadding(c,m,x){this._unmodified=!1,this._edgeInsets.interpolate(c,m,x),this._constrain(),this._calcMatrices()}coveringZoomLevel(c){const m=(c.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/c.tileSize));return Math.max(0,m)}getVisibleUnwrappedCoordinates(c){const m=[new a.UnwrappedTileID(0,c)];if(this._renderWorldCopies){const x=this.pointCoordinate(new a.pointGeometry(0,0)),S=this.pointCoordinate(new a.pointGeometry(this.width,0)),R=this.pointCoordinate(new a.pointGeometry(this.width,this.height)),L=this.pointCoordinate(new a.pointGeometry(0,this.height)),V=Math.floor(Math.min(x.x,S.x,R.x,L.x)),H=Math.floor(Math.max(x.x,S.x,R.x,L.x)),G=1;for(let ne=V-G;ne<=H+G;ne++)ne!==0&&m.push(new a.UnwrappedTileID(ne,c))}return m}coveringTiles(c){var m,x;let S=this.coveringZoomLevel(c);const R=S;if(c.minzoom!==void 0&&S<c.minzoom)return[];c.maxzoom!==void 0&&S>c.maxzoom&&(S=c.maxzoom);const L=this.pointCoordinate(this.getCameraPoint()),V=a.MercatorCoordinate.fromLngLat(this.center),H=Math.pow(2,S),G=[H*L.x,H*L.y,0],ne=[H*V.x,H*V.y,0],le=of.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,S);let pe=c.minzoom||0;!c.terrain&&this.pitch<=60&&this._edgeInsets.top<.1&&(pe=S);const Te=c.terrain?2/Math.min(this.tileSize,c.tileSize)*this.tileSize:3,_e=Oe=>({aabb:new Eu([Oe*H,0,0],[(Oe+1)*H,H,0]),zoom:0,x:0,y:0,wrap:Oe,fullyVisible:!1}),Ee=[],Be=[],We=S,rt=c.reparseOverscaled?R:S;if(this._renderWorldCopies)for(let Oe=1;Oe<=3;Oe++)Ee.push(_e(-Oe)),Ee.push(_e(Oe));for(Ee.push(_e(0));Ee.length>0;){const Oe=Ee.pop(),ft=Oe.x,st=Oe.y;let _t=Oe.fullyVisible;if(!_t){const fn=Oe.aabb.intersects(le);if(fn===0)continue;_t=fn===2}const wt=c.terrain?G:ne,Ut=Oe.aabb.distanceX(wt),xt=Oe.aabb.distanceY(wt),un=Math.max(Math.abs(Ut),Math.abs(xt)),Jt=Te+(1<<We-Oe.zoom)-2;if(Oe.zoom===We||un>Jt&&Oe.zoom>=pe){const fn=We-Oe.zoom,$n=G[0]-.5-(ft<<fn),Hn=G[1]-.5-(st<<fn);Be.push({tileID:new a.OverscaledTileID(Oe.zoom===We?rt:Oe.zoom,Oe.wrap,Oe.zoom,ft,st),distanceSq:a.sqrLen([ne[0]-.5-ft,ne[1]-.5-st]),tileDistanceToCamera:Math.sqrt($n*$n+Hn*Hn)})}else for(let fn=0;fn<4;fn++){const $n=(ft<<1)+fn%2,Hn=(st<<1)+(fn>>1),Tn=Oe.zoom+1;let mr=Oe.aabb.quadrant(fn);if(c.terrain){const gr=new a.OverscaledTileID(Tn,Oe.wrap,Tn,$n,Hn),ir=c.terrain.getMinMaxElevation(gr),ar=(m=ir.minElevation)!==null&&m!==void 0?m:this.elevation,br=(x=ir.maxElevation)!==null&&x!==void 0?x:this.elevation;mr=new Eu([mr.min[0],mr.min[1],ar],[mr.max[0],mr.max[1],br])}Ee.push({aabb:mr,zoom:Tn,x:$n,y:Hn,wrap:Oe.wrap,fullyVisible:_t})}}return Be.sort((Oe,ft)=>Oe.distanceSq-ft.distanceSq).map(Oe=>Oe.tileID)}resize(c,m){this.width=c,this.height=m,this.pixelsToGLUnits=[2/c,-2/m],this._constrain(),this._calcMatrices()}get unmodified(){return this._unmodified}zoomScale(c){return Math.pow(2,c)}scaleZoom(c){return Math.log(c)/Math.LN2}project(c){const m=a.clamp(c.lat,-this.maxValidLatitude,this.maxValidLatitude);return new a.pointGeometry(a.mercatorXfromLng(c.lng)*this.worldSize,a.mercatorYfromLat(m)*this.worldSize)}unproject(c){return new a.MercatorCoordinate(c.x/this.worldSize,c.y/this.worldSize).toLngLat()}get point(){return this.project(this.center)}updateElevation(c){this.freezeElevation||(this.elevation=c?this.getElevation(this._center,c):0)}getElevation(c,m){const x=a.MercatorCoordinate.fromLngLat(c),S=(1<<this.tileZoom)*a.EXTENT,R=x.x*S,L=x.y*S,V=Math.floor(R/a.EXTENT),H=Math.floor(L/a.EXTENT),G=new a.OverscaledTileID(this.tileZoom,0,this.tileZoom,V,H);return m.getElevation(G,R%a.EXTENT,L%a.EXTENT,a.EXTENT)}getCameraPosition(){return{lngLat:this.pointLocation(this.getCameraPoint()),altitude:Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter+this.elevation}}recalculateZoom(c){const m=this.pointLocation(this.centerPoint,c),x=this.getElevation(m,c);if(!(this.elevation-x))return;const S=this.getCameraPosition(),R=a.MercatorCoordinate.fromLngLat(S.lngLat,S.altitude),L=a.MercatorCoordinate.fromLngLat(m,x),V=R.x-L.x,H=R.y-L.y,G=R.z-L.z,ne=Math.sqrt(V*V+H*H+G*G),le=this.scaleZoom(this.cameraToCenterDistance/ne/this.tileSize);this._elevation=x,this._center=m,this.zoom=le}setLocationAtPoint(c,m){const x=this.pointCoordinate(m),S=this.pointCoordinate(this.centerPoint),R=this.locationCoordinate(c),L=new a.MercatorCoordinate(R.x-(x.x-S.x),R.y-(x.y-S.y));this.center=this.coordinateLocation(L),this._renderWorldCopies&&(this.center=this.center.wrap())}locationPoint(c,m){return m?this.coordinatePoint(this.locationCoordinate(c),this.getElevation(c,m),this.pixelMatrix3D):this.coordinatePoint(this.locationCoordinate(c))}pointLocation(c,m){return this.coordinateLocation(this.pointCoordinate(c,m))}locationCoordinate(c){return a.MercatorCoordinate.fromLngLat(c)}coordinateLocation(c){return c&&c.toLngLat()}pointCoordinate(c,m){if(m){const pe=m.pointCoordinate(c);if(pe!=null)return pe}const x=[c.x,c.y,0,1],S=[c.x,c.y,1,1];a.transformMat4(x,x,this.pixelMatrixInverse),a.transformMat4(S,S,this.pixelMatrixInverse);const R=x[3],L=S[3],V=x[1]/R,H=S[1]/L,G=x[2]/R,ne=S[2]/L,le=G===ne?0:(0-G)/(ne-G);return new a.MercatorCoordinate(a.number(x[0]/R,S[0]/L,le)/this.worldSize,a.number(V,H,le)/this.worldSize)}coordinatePoint(c,m=0,x=this.pixelMatrix){const S=[c.x*this.worldSize,c.y*this.worldSize,m,1];return a.transformMat4(S,S,x),new a.pointGeometry(S[0]/S[3],S[1]/S[3])}getBounds(){const c=Math.max(0,this.height/2-this.getHorizon());return new a.LngLatBounds().extend(this.pointLocation(new a.pointGeometry(0,c))).extend(this.pointLocation(new a.pointGeometry(this.width,c))).extend(this.pointLocation(new a.pointGeometry(this.width,this.height))).extend(this.pointLocation(new a.pointGeometry(0,this.height)))}getMaxBounds(){return this.latRange&&this.latRange.length===2&&this.lngRange&&this.lngRange.length===2?new a.LngLatBounds([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null}getHorizon(){return Math.tan(Math.PI/2-this._pitch)*this.cameraToCenterDistance*.85}setMaxBounds(c){c?(this.lngRange=[c.getWest(),c.getEast()],this.latRange=[c.getSouth(),c.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])}calculatePosMatrix(c,m=!1){const x=c.key,S=m?this._alignedPosMatrixCache:this._posMatrixCache;if(S[x])return S[x];const R=c.canonical,L=this.worldSize/this.zoomScale(R.z),V=R.x+Math.pow(2,R.z)*c.wrap,H=a.identity(new Float64Array(16));return a.translate(H,H,[V*L,R.y*L,0]),a.scale(H,H,[L/a.EXTENT,L/a.EXTENT,1]),a.multiply(H,m?this.alignedProjMatrix:this.projMatrix,H),S[x]=new Float32Array(H),S[x]}customLayerMatrix(){return this.mercatorMatrix.slice()}_constrain(){if(!this.center||!this.width||!this.height||this._constraining)return;this._constraining=!0;let c,m,x,S,R=-90,L=90,V=-180,H=180;const G=this.size,ne=this._unmodified;if(this.latRange){const Te=this.latRange;R=a.mercatorYfromLat(Te[1])*this.worldSize,L=a.mercatorYfromLat(Te[0])*this.worldSize,c=L-R<G.y?G.y/(L-R):0}if(this.lngRange){const Te=this.lngRange;V=a.wrap(a.mercatorXfromLng(Te[0])*this.worldSize,0,this.worldSize),H=a.wrap(a.mercatorXfromLng(Te[1])*this.worldSize,0,this.worldSize),H<V&&(H+=this.worldSize),m=H-V<G.x?G.x/(H-V):0}const le=this.point,pe=Math.max(m||0,c||0);if(pe)return this.center=this.unproject(new a.pointGeometry(m?(H+V)/2:le.x,c?(L+R)/2:le.y)),this.zoom+=this.scaleZoom(pe),this._unmodified=ne,void(this._constraining=!1);if(this.latRange){const Te=le.y,_e=G.y/2;Te-_e<R&&(S=R+_e),Te+_e>L&&(S=L-_e)}if(this.lngRange){const Te=(V+H)/2,_e=a.wrap(le.x,Te-this.worldSize/2,Te+this.worldSize/2),Ee=G.x/2;_e-Ee<V&&(x=V+Ee),_e+Ee>H&&(x=H-Ee)}x===void 0&&S===void 0||(this.center=this.unproject(new a.pointGeometry(x!==void 0?x:le.x,S!==void 0?S:le.y)).wrap()),this._unmodified=ne,this._constraining=!1}_calcMatrices(){if(!this.height)return;const c=this.centerOffset,m=this.point.x,x=this.point.y;this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height,this._pixelPerMeter=a.mercatorZfromAltitude(1,this.center.lat)*this.worldSize;let S=a.identity(new Float64Array(16));a.scale(S,S,[this.width/2,-this.height/2,1]),a.translate(S,S,[1,-1,0]),this.labelPlaneMatrix=S,S=a.identity(new Float64Array(16)),a.scale(S,S,[1,-1,1]),a.translate(S,S,[-1,-1,0]),a.scale(S,S,[2/this.width,2/this.height,1]),this.glCoordMatrix=S,this.cameraToSeaLevelDistance=this.cameraToCenterDistance+this._elevation*this._pixelPerMeter/Math.cos(this._pitch);const R=Math.PI/2+this._pitch,L=this._fov*(.5+c.y/this.height),V=Math.sin(L)*this.cameraToSeaLevelDistance/Math.sin(a.clamp(Math.PI-R-L,.01,Math.PI-.01)),H=this.getHorizon(),G=2*Math.atan(H/this.cameraToCenterDistance)*(.5+c.y/(2*H)),ne=Math.sin(G)*this.cameraToSeaLevelDistance/Math.sin(a.clamp(Math.PI-R-G,.01,Math.PI-.01)),le=Math.cos(Math.PI/2-this._pitch)*V+this.cameraToSeaLevelDistance,pe=Math.cos(Math.PI/2-this._pitch)*ne+this.cameraToSeaLevelDistance,Te=1.01*Math.min(le,pe),_e=this.height/50;S=new Float64Array(16),a.perspective(S,this._fov,this.width/this.height,_e,Te),S[8]=2*-c.x/this.width,S[9]=2*c.y/this.height,a.scale(S,S,[1,-1,1]),a.translate(S,S,[0,0,-this.cameraToCenterDistance]),a.rotateX(S,S,this._pitch),a.rotateZ(S,S,this.angle),a.translate(S,S,[-m,-x,0]),this.mercatorMatrix=a.scale([],S,[this.worldSize,this.worldSize,this.worldSize]),a.scale(S,S,[1,1,this._pixelPerMeter]),this.pixelMatrix=a.multiply(new Float64Array(16),this.labelPlaneMatrix,S),a.translate(S,S,[0,0,-this.elevation]),this.projMatrix=S,this.invProjMatrix=a.invert([],S),this.pixelMatrix3D=a.multiply(new Float64Array(16),this.labelPlaneMatrix,S);const Ee=this.width%2/2,Be=this.height%2/2,We=Math.cos(this.angle),rt=Math.sin(this.angle),Oe=m-Math.round(m)+We*Ee+rt*Be,ft=x-Math.round(x)+We*Be+rt*Ee,st=new Float64Array(S);if(a.translate(st,st,[Oe>.5?Oe-1:Oe,ft>.5?ft-1:ft,0]),this.alignedProjMatrix=st,S=a.invert(new Float64Array(16),this.pixelMatrix),!S)throw new Error("failed to invert matrix");this.pixelMatrixInverse=S,this._posMatrixCache={},this._alignedPosMatrixCache={}}maxPitchScaleFactor(){if(!this.pixelMatrixInverse)return 1;const c=this.pointCoordinate(new a.pointGeometry(0,0)),m=[c.x*this.worldSize,c.y*this.worldSize,0,1];return a.transformMat4(m,m,this.pixelMatrix)[3]/this.cameraToCenterDistance}getCameraPoint(){const c=Math.tan(this._pitch)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new a.pointGeometry(0,c))}getCameraQueryGeometry(c){const m=this.getCameraPoint();if(c.length===1)return[c[0],m];{let x=m.x,S=m.y,R=m.x,L=m.y;for(const V of c)x=Math.min(x,V.x),S=Math.min(S,V.y),R=Math.max(R,V.x),L=Math.max(L,V.y);return[new a.pointGeometry(x,S),new a.pointGeometry(R,S),new a.pointGeometry(R,L),new a.pointGeometry(x,L),new a.pointGeometry(x,S)]}}}class Yv{constructor(c){this._hashName=c&&encodeURIComponent(c),a.bindAll(["_getCurrentHash","_onHashChange","_updateHash"],this),this._updateHash=function(m,x){let S=!1,R=null;const L=()=>{R=null,S&&(m(),R=setTimeout(L,300),S=!1)};return()=>(S=!0,R||L(),R)}(this._updateHashUnthrottled.bind(this))}addTo(c){return this._map=c,addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this}remove(){return removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),delete this._map,this}getHashString(c){const m=this._map.getCenter(),x=Math.round(100*this._map.getZoom())/100,S=Math.ceil((x*Math.LN2+Math.log(512/360/.5))/Math.LN10),R=Math.pow(10,S),L=Math.round(m.lng*R)/R,V=Math.round(m.lat*R)/R,H=this._map.getBearing(),G=this._map.getPitch();let ne="";if(ne+=c?`/${L}/${V}/${x}`:`${x}/${V}/${L}`,(H||G)&&(ne+="/"+Math.round(10*H)/10),G&&(ne+=`/${Math.round(G)}`),this._hashName){const le=this._hashName;let pe=!1;const Te=window.location.hash.slice(1).split("&").map(_e=>{const Ee=_e.split("=")[0];return Ee===le?(pe=!0,`${Ee}=${ne}`):_e}).filter(_e=>_e);return pe||Te.push(`${le}=${ne}`),`#${Te.join("&")}`}return`#${ne}`}_getCurrentHash(){const c=window.location.hash.replace("#","");if(this._hashName){let m;return c.split("&").map(x=>x.split("=")).forEach(x=>{x[0]===this._hashName&&(m=x)}),(m&&m[1]||"").split("/")}return c.split("/")}_onHashChange(){const c=this._getCurrentHash();if(c.length>=3&&!c.some(m=>isNaN(m))){const m=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(c[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+c[2],+c[1]],zoom:+c[0],bearing:m,pitch:+(c[4]||0)}),!0}return!1}_updateHashUnthrottled(){const c=window.location.href.replace(/(#.+)?$/,this.getHashString());try{window.history.replaceState(window.history.state,null,c)}catch{}}}const Tu={linearity:.3,easing:a.bezier(0,0,.3,1)},Qv=a.extend({deceleration:2500,maxSpeed:1400},Tu),Jv=a.extend({deceleration:20,maxSpeed:1400},Tu),ey=a.extend({deceleration:1e3,maxSpeed:360},Tu),uc=a.extend({deceleration:1e3,maxSpeed:90},Tu);class ty{constructor(c){this._map=c,this.clear()}clear(){this._inertiaBuffer=[]}record(c){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:a.exported.now(),settings:c})}_drainInertiaBuffer(){const c=this._inertiaBuffer,m=a.exported.now();for(;c.length>0&&m-c[0].time>160;)c.shift()}_onMoveEnd(c){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;const m={zoom:0,bearing:0,pitch:0,pan:new a.pointGeometry(0,0),pinchAround:void 0,around:void 0};for(const{settings:R}of this._inertiaBuffer)m.zoom+=R.zoomDelta||0,m.bearing+=R.bearingDelta||0,m.pitch+=R.pitchDelta||0,R.panDelta&&m.pan._add(R.panDelta),R.around&&(m.around=R.around),R.pinchAround&&(m.pinchAround=R.pinchAround);const x=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,S={};if(m.pan.mag()){const R=ku(m.pan.mag(),x,a.extend({},Qv,c||{}));S.offset=m.pan.mult(R.amount/m.pan.mag()),S.center=this._map.transform.center,Iu(S,R)}if(m.zoom){const R=ku(m.zoom,x,Jv);S.zoom=this._map.transform.zoom+R.amount,Iu(S,R)}if(m.bearing){const R=ku(m.bearing,x,ey);S.bearing=this._map.transform.bearing+a.clamp(R.amount,-179,179),Iu(S,R)}if(m.pitch){const R=ku(m.pitch,x,uc);S.pitch=this._map.transform.pitch+R.amount,Iu(S,R)}if(S.zoom||S.bearing){const R=m.pinchAround===void 0?m.around:m.pinchAround;S.around=R?this._map.unproject(R):this._map.getCenter()}return this.clear(),a.extend(S,{noMoveStart:!0})}}function Iu(w,c){(!w.duration||w.duration<c.duration)&&(w.duration=c.duration,w.easing=c.easing)}function ku(w,c,m){const{maxSpeed:x,linearity:S,deceleration:R}=m,L=a.clamp(w*S/(c/1e3),-x,x),V=Math.abs(L)/(R*S);return{easing:m.easing,duration:1e3*V,amount:L*(V/2)}}class Ro extends a.Event{constructor(c,m,x,S={}){const R=v.mousePos(m.getCanvasContainer(),x),L=m.unproject(R);super(c,a.extend({point:R,lngLat:L,originalEvent:x},S)),this._defaultPrevented=!1,this.target=m}preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}}class Mu extends a.Event{constructor(c,m,x){const S=c==="touchend"?x.changedTouches:x.touches,R=v.touchPos(m.getCanvasContainer(),S),L=R.map(H=>m.unproject(H)),V=R.reduce((H,G,ne,le)=>H.add(G.div(le.length)),new a.pointGeometry(0,0));super(c,{points:R,point:V,lngLats:L,lngLat:m.unproject(V),originalEvent:x}),this._defaultPrevented=!1}preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}}class Oo extends a.Event{constructor(c,m,x){super(c,{originalEvent:x}),this._defaultPrevented=!1}preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}}class Q1{constructor(c,m){this._map=c,this._clickTolerance=m.clickTolerance}reset(){delete this._mousedownPos}wheel(c){return this._firePreventable(new Oo(c.type,this._map,c))}mousedown(c,m){return this._mousedownPos=m,this._firePreventable(new Ro(c.type,this._map,c))}mouseup(c){this._map.fire(new Ro(c.type,this._map,c))}click(c,m){this._mousedownPos&&this._mousedownPos.dist(m)>=this._clickTolerance||this._map.fire(new Ro(c.type,this._map,c))}dblclick(c){return this._firePreventable(new Ro(c.type,this._map,c))}mouseover(c){this._map.fire(new Ro(c.type,this._map,c))}mouseout(c){this._map.fire(new Ro(c.type,this._map,c))}touchstart(c){return this._firePreventable(new Mu(c.type,this._map,c))}touchmove(c){this._map.fire(new Mu(c.type,this._map,c))}touchend(c){this._map.fire(new Mu(c.type,this._map,c))}touchcancel(c){this._map.fire(new Mu(c.type,this._map,c))}_firePreventable(c){if(this._map.fire(c),c.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Ns{constructor(c){this._map=c}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(c){this._map.fire(new Ro(c.type,this._map,c))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Ro("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(c){this._delayContextMenu?this._contextMenuEvent=c:this._ignoreContextMenu||this._map.fire(new Ro(c.type,this._map,c)),this._map.listens("contextmenu")&&c.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class ny{constructor(c,m){this._map=c,this._el=c.getCanvasContainer(),this._container=c.getContainer(),this._clickTolerance=m.clickTolerance||1}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(c,m){this.isEnabled()&&c.shiftKey&&c.button===0&&(v.disableDrag(),this._startPos=this._lastPos=m,this._active=!0)}mousemoveWindow(c,m){if(!this._active)return;const x=m;if(this._lastPos.equals(x)||!this._box&&x.dist(this._startPos)<this._clickTolerance)return;const S=this._startPos;this._lastPos=x,this._box||(this._box=v.create("div","maplibregl-boxzoom mapboxgl-boxzoom",this._container),this._container.classList.add("maplibregl-crosshair","mapboxgl-crosshair"),this._fireEvent("boxzoomstart",c));const R=Math.min(S.x,x.x),L=Math.max(S.x,x.x),V=Math.min(S.y,x.y),H=Math.max(S.y,x.y);v.setTransform(this._box,`translate(${R}px,${V}px)`),this._box.style.width=L-R+"px",this._box.style.height=H-V+"px"}mouseupWindow(c,m){if(!this._active||c.button!==0)return;const x=this._startPos,S=m;if(this.reset(),v.suppressClick(),x.x!==S.x||x.y!==S.y)return this._map.fire(new a.Event("boxzoomend",{originalEvent:c})),{cameraAnimation:R=>R.fitScreenCoordinates(x,S,this._map.getBearing(),{linear:!0})};this._fireEvent("boxzoomcancel",c)}keydown(c){this._active&&c.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",c))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair","mapboxgl-crosshair"),this._box&&(v.remove(this._box),this._box=null),v.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(c,m){return this._map.fire(new a.Event(c,{originalEvent:m}))}}function ds(w,c){if(w.length!==c.length)throw new Error(`The number of touches and points are not equal - touches ${w.length}, points ${c.length}`);const m={};for(let x=0;x<w.length;x++)m[w[x].identifier]=c[x];return m}class Ru{constructor(c){this.reset(),this.numTouches=c.numTouches}reset(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1}touchstart(c,m,x){(this.centroid||x.length>this.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=c.timeStamp),x.length===this.numTouches&&(this.centroid=function(S){const R=new a.pointGeometry(0,0);for(const L of S)R._add(L);return R.div(S.length)}(m),this.touches=ds(x,m)))}touchmove(c,m,x){if(this.aborted||!this.centroid)return;const S=ds(x,m);for(const R in this.touches){const L=this.touches[R],V=S[R];(!V||V.dist(L)>30)&&(this.aborted=!0)}}touchend(c,m,x){if((!this.centroid||c.timeStamp-this.startTime>500)&&(this.aborted=!0),x.length===0){const S=!this.aborted&&this.centroid;if(this.reset(),S)return S}}}class gp{constructor(c){this.singleTap=new Ru(c),this.numTaps=c.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(c,m,x){this.singleTap.touchstart(c,m,x)}touchmove(c,m,x){this.singleTap.touchmove(c,m,x)}touchend(c,m,x){const S=this.singleTap.touchend(c,m,x);if(S){const R=c.timeStamp-this.lastTime<500,L=!this.lastTap||this.lastTap.dist(S)<30;if(R&&L||this.reset(),this.count++,this.lastTime=c.timeStamp,this.lastTap=S,this.count===this.numTaps)return this.reset(),S}}}class J1{constructor(){this._zoomIn=new gp({numTouches:1,numTaps:2}),this._zoomOut=new gp({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(c,m,x){this._zoomIn.touchstart(c,m,x),this._zoomOut.touchstart(c,m,x)}touchmove(c,m,x){this._zoomIn.touchmove(c,m,x),this._zoomOut.touchmove(c,m,x)}touchend(c,m,x){const S=this._zoomIn.touchend(c,m,x),R=this._zoomOut.touchend(c,m,x);return S?(this._active=!0,c.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:L=>L.easeTo({duration:300,zoom:L.getZoom()+1,around:L.unproject(S)},{originalEvent:c})}):R?(this._active=!0,c.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:L=>L.easeTo({duration:300,zoom:L.getZoom()-1,around:L.unproject(R)},{originalEvent:c})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}const ew={0:1,2:2};class af{constructor(c){this.reset(),this._clickTolerance=c.clickTolerance||1}reset(){this._active=!1,this._moved=!1,delete this._lastPoint,delete this._eventButton}_correctButton(c,m){return!1}_move(c,m){return{}}mousedown(c,m){if(this._lastPoint)return;const x=v.mouseButton(c);this._correctButton(c,x)&&(this._lastPoint=m,this._eventButton=x)}mousemoveWindow(c,m){const x=this._lastPoint;if(x){if(c.preventDefault(),function(S,R){const L=ew[R];return S.buttons===void 0||(S.buttons&L)!==L}(c,this._eventButton))this.reset();else if(this._moved||!(m.dist(x)<this._clickTolerance))return this._moved=!0,this._lastPoint=m,this._move(x,m)}}mouseupWindow(c){this._lastPoint&&v.mouseButton(c)===this._eventButton&&(this._moved&&v.suppressClick(),this.reset())}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Ou extends af{mousedown(c,m){super.mousedown(c,m),this._lastPoint&&(this._active=!0)}_correctButton(c,m){return m===0&&!c.ctrlKey}_move(c,m){return{around:m,panDelta:m.sub(c)}}}class fs extends af{_correctButton(c,m){return m===0&&c.ctrlKey||m===2}_move(c,m){const x=.8*(m.x-c.x);if(x)return this._active=!0,{bearingDelta:x}}contextmenu(c){c.preventDefault()}}class gn extends af{_correctButton(c,m){return m===0&&c.ctrlKey||m===2}_move(c,m){const x=-.5*(m.y-c.y);if(x)return this._active=!0,{pitchDelta:x}}contextmenu(c){c.preventDefault()}}class ry{constructor(c,m){this._minTouches=c.cooperativeGestures?2:1,this._clickTolerance=c.clickTolerance||1,this._map=m,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new a.pointGeometry(0,0),setTimeout(()=>{this._cancelCooperativeMessage=!1},200)}touchstart(c,m,x){return this._calculateTransform(c,m,x)}touchmove(c,m,x){if(this._map._cooperativeGestures&&(this._minTouches===2&&x.length<2&&!this._cancelCooperativeMessage?this._map._onCooperativeGesture(c,!1,x.length):this._cancelCooperativeMessage||(this._cancelCooperativeMessage=!0)),this._active&&!(x.length<this._minTouches))return c.preventDefault(),this._calculateTransform(c,m,x)}touchend(c,m,x){this._calculateTransform(c,m,x),this._active&&x.length<this._minTouches&&this.reset()}touchcancel(){this.reset()}_calculateTransform(c,m,x){x.length>0&&(this._active=!0);const S=ds(x,m),R=new a.pointGeometry(0,0),L=new a.pointGeometry(0,0);let V=0;for(const G in S){const ne=S[G],le=this._touches[G];le&&(R._add(ne),L._add(ne.sub(le)),V++,S[G]=ne)}if(this._touches=S,V<this._minTouches||!L.mag())return;const H=L.div(V);return this._sum._add(H),this._sum.mag()<this._clickTolerance?void 0:{around:R.div(V),panDelta:H}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class pl{constructor(){this.reset()}reset(){this._active=!1,delete this._firstTwoTouches}_start(c){}_move(c,m,x){return{}}touchstart(c,m,x){this._firstTwoTouches||x.length<2||(this._firstTwoTouches=[x[0].identifier,x[1].identifier],this._start([m[0],m[1]]))}touchmove(c,m,x){if(!this._firstTwoTouches)return;c.preventDefault();const[S,R]=this._firstTwoTouches,L=Ls(x,m,S),V=Ls(x,m,R);if(!L||!V)return;const H=this._aroundCenter?null:L.add(V).div(2);return this._move([L,V],H,c)}touchend(c,m,x){if(!this._firstTwoTouches)return;const[S,R]=this._firstTwoTouches,L=Ls(x,m,S),V=Ls(x,m,R);L&&V||(this._active&&v.suppressClick(),this.reset())}touchcancel(){this.reset()}enable(c){this._enabled=!0,this._aroundCenter=!!c&&c.around==="center"}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}function Ls(w,c,m){for(let x=0;x<w.length;x++)if(w[x].identifier===m)return c[x]}function vp(w,c){return Math.log(w/c)/Math.LN2}class sn extends pl{reset(){super.reset(),delete this._distance,delete this._startDistance}_start(c){this._startDistance=this._distance=c[0].dist(c[1])}_move(c,m){const x=this._distance;if(this._distance=c[0].dist(c[1]),this._active||!(Math.abs(vp(this._distance,this._startDistance))<.1))return this._active=!0,{zoomDelta:vp(this._distance,x),pinchAround:m}}}function sf(w,c){return 180*w.angleWith(c)/Math.PI}class tw extends pl{reset(){super.reset(),delete this._minDiameter,delete this._startVector,delete this._vector}_start(c){this._startVector=this._vector=c[0].sub(c[1]),this._minDiameter=c[0].dist(c[1])}_move(c,m){const x=this._vector;if(this._vector=c[0].sub(c[1]),this._active||!this._isBelowThreshold(this._vector))return this._active=!0,{bearingDelta:sf(this._vector,x),pinchAround:m}}_isBelowThreshold(c){this._minDiameter=Math.min(this._minDiameter,c.mag());const m=25/(Math.PI*this._minDiameter)*360,x=sf(c,this._startVector);return Math.abs(x)<m}}function yp(w){return Math.abs(w.y)>Math.abs(w.x)}class xp extends pl{constructor(c){super(),this._map=c}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(c,m,x){super.touchstart(c,m,x),this._currentTouchCount=x.length}_start(c){this._lastPoints=c,yp(c[0].sub(c[1]))&&(this._valid=!1)}_move(c,m,x){if(this._map._cooperativeGestures&&this._currentTouchCount<3)return;const S=c[0].sub(this._lastPoints[0]),R=c[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(S,R,x.timeStamp),this._valid?(this._lastPoints=c,this._active=!0,{pitchDelta:(S.y+R.y)/2*-.5}):void 0}gestureBeginsVertically(c,m,x){if(this._valid!==void 0)return this._valid;const S=c.mag()>=2,R=m.mag()>=2;if(!S&&!R)return;if(!S||!R)return this._firstMove===void 0&&(this._firstMove=x),x-this._firstMove<100&&void 0;const L=c.y>0==m.y>0;return yp(c)&&yp(m)&&L}}const iy={panStep:100,bearingStep:15,pitchStep:10};class oy{constructor(){const c=iy;this._panStep=c.panStep,this._bearingStep=c.bearingStep,this._pitchStep=c.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(c){if(c.altKey||c.ctrlKey||c.metaKey)return;let m=0,x=0,S=0,R=0,L=0;switch(c.keyCode){case 61:case 107:case 171:case 187:m=1;break;case 189:case 109:case 173:m=-1;break;case 37:c.shiftKey?x=-1:(c.preventDefault(),R=-1);break;case 39:c.shiftKey?x=1:(c.preventDefault(),R=1);break;case 38:c.shiftKey?S=1:(c.preventDefault(),L=-1);break;case 40:c.shiftKey?S=-1:(c.preventDefault(),L=1);break;default:return}return this._rotationDisabled&&(x=0,S=0),{cameraAnimation:V=>{const H=V.getZoom();V.easeTo({duration:300,easeId:"keyboardHandler",easing:nw,zoom:m?Math.round(H)+m*(c.shiftKey?2:1):H,bearing:V.getBearing()+x*this._bearingStep,pitch:V.getPitch()+S*this._pitchStep,offset:[-R*this._panStep,-L*this._panStep],center:V.getCenter()},{originalEvent:c})}}}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 nw(w){return w*(2-w)}const ay=4.000244140625;class bp{constructor(c,m){this._map=c,this._el=c.getCanvasContainer(),this._handler=m,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=.0022222222222222222,a.bindAll(["_onTimeout"],this)}setZoomRate(c){this._defaultZoomRate=c}setWheelZoomRate(c){this._wheelZoomRate=c}isEnabled(){return!!this._enabled}isActive(){return!!this._active||this._finishTimeout!==void 0}isZooming(){return!!this._zooming}enable(c){this.isEnabled()||(this._enabled=!0,this._aroundCenter=c&&c.around==="center")}disable(){this.isEnabled()&&(this._enabled=!1)}wheel(c){if(!this.isEnabled())return;if(this._map._cooperativeGestures){if(!this._map._metaPress)return;c.preventDefault()}let m=c.deltaMode===WheelEvent.DOM_DELTA_LINE?40*c.deltaY:c.deltaY;const x=a.exported.now(),S=x-(this._lastWheelEventTime||0);this._lastWheelEventTime=x,m!==0&&m%ay==0?this._type="wheel":m!==0&&Math.abs(m)<4?this._type="trackpad":S>400?(this._type=null,this._lastValue=m,this._timeout=setTimeout(this._onTimeout,40,c)):this._type||(this._type=Math.abs(S*m)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,m+=this._lastValue)),c.shiftKey&&m&&(m/=4),this._type&&(this._lastWheelEvent=c,this._delta-=m,this._active||this._start(c)),c.preventDefault()}_onTimeout(c){this._type="wheel",this._delta-=this._lastValue,this._active||this._start(c)}_start(c){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 m=v.mousePos(this._el,c);this._around=a.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(m)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._handler._triggerRenderFrame())}renderFrame(){if(!this._frameId||(this._frameId=null,!this.isActive()))return;const c=this._map.transform;if(this._delta!==0){const V=this._type==="wheel"&&Math.abs(this._delta)>ay?this._wheelZoomRate:this._defaultZoomRate;let H=2/(1+Math.exp(-Math.abs(this._delta*V)));this._delta<0&&H!==0&&(H=1/H);const G=typeof this._targetZoom=="number"?c.zoomScale(this._targetZoom):c.scale;this._targetZoom=Math.min(c.maxZoom,Math.max(c.minZoom,c.scaleZoom(G*H))),this._type==="wheel"&&(this._startZoom=c.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}const m=typeof this._targetZoom=="number"?this._targetZoom:c.zoom,x=this._startZoom,S=this._easing;let R,L=!1;if(this._type==="wheel"&&x&&S){const V=Math.min((a.exported.now()-this._lastWheelEventTime)/200,1),H=S(V);R=a.number(x,m,H),V<1?this._frameId||(this._frameId=!0):L=!0}else R=m,L=!0;return this._active=!0,L&&(this._active=!1,this._finishTimeout=setTimeout(()=>{this._zooming=!1,this._handler._triggerRenderFrame(),delete this._targetZoom,delete this._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!L,zoomDelta:R-c.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(c){let m=a.ease;if(this._prevEase){const x=this._prevEase,S=(a.exported.now()-x.start)/x.duration,R=x.easing(S+.01)-x.easing(S),L=.27/Math.sqrt(R*R+1e-4)*.01,V=Math.sqrt(.0729-L*L);m=a.bezier(L,V,.25,1)}return this._prevEase={start:a.exported.now(),duration:c,easing:m},m}reset(){this._active=!1}}class _p{constructor(c,m){this._clickZoom=c,this._tapZoom=m}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 wp{constructor(){this.reset()}reset(){this._active=!1}dblclick(c,m){return c.preventDefault(),{cameraAnimation:x=>{x.easeTo({duration:300,zoom:x.getZoom()+(c.shiftKey?-1:1),around:x.unproject(m)},{originalEvent:c})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Cp{constructor(){this._tap=new gp({numTouches:1,numTaps:1}),this.reset()}reset(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,this._tap.reset()}touchstart(c,m,x){this._swipePoint||(this._tapTime&&c.timeStamp-this._tapTime>500&&this.reset(),this._tapTime?x.length>0&&(this._swipePoint=m[0],this._swipeTouch=x[0].identifier):this._tap.touchstart(c,m,x))}touchmove(c,m,x){if(this._tapTime){if(this._swipePoint){if(x[0].identifier!==this._swipeTouch)return;const S=m[0],R=S.y-this._swipePoint.y;return this._swipePoint=S,c.preventDefault(),this._active=!0,{zoomDelta:R/128}}}else this._tap.touchmove(c,m,x)}touchend(c,m,x){this._tapTime?this._swipePoint&&x.length===0&&this.reset():this._tap.touchend(c,m,x)&&(this._tapTime=c.timeStamp)}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class go{constructor(c,m,x){this._el=c,this._mousePan=m,this._touchPan=x}enable(c){this._inertiaOptions=c||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("maplibregl-touch-drag-pan","mapboxgl-touch-drag-pan")}disable(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("maplibregl-touch-drag-pan","mapboxgl-touch-drag-pan")}isEnabled(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()}isActive(){return this._mousePan.isActive()||this._touchPan.isActive()}}class zs{constructor(c,m,x){this._pitchWithRotate=c.pitchWithRotate,this._mouseRotate=m,this._mousePitch=x}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 sy{constructor(c,m,x,S){this._el=c,this._touchZoom=m,this._touchRotate=x,this._tapDragZoom=S,this._rotationDisabled=!1,this._enabled=!0}enable(c){this._touchZoom.enable(c),this._rotationDisabled||this._touchRotate.enable(c),this._tapDragZoom.enable(),this._el.classList.add("maplibregl-touch-zoom-rotate","mapboxgl-touch-zoom-rotate")}disable(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("maplibregl-touch-zoom-rotate","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 dc=w=>w.zoom||w.drag||w.pitch||w.rotate;class Sp extends a.Event{}function Du(w){return w.panDelta&&w.panDelta.mag()||w.zoomDelta||w.bearingDelta||w.pitchDelta}class ly{constructor(c,m){this._map=c,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new ty(c),this._bearingSnap=m.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(m),a.bindAll(["handleEvent","handleWindowEvent"],this);const x=this._el;this._listeners=[[x,"touchstart",{passive:!0}],[x,"touchmove",{passive:!1}],[x,"touchend",void 0],[x,"touchcancel",void 0],[x,"mousedown",void 0],[x,"mousemove",void 0],[x,"mouseup",void 0],[document,"mousemove",{capture:!0}],[document,"mouseup",void 0],[x,"mouseover",void 0],[x,"mouseout",void 0],[x,"dblclick",void 0],[x,"click",void 0],[x,"keydown",{capture:!1}],[x,"keyup",void 0],[x,"wheel",{passive:!1}],[x,"contextmenu",void 0],[window,"blur",void 0]];for(const[S,R,L]of this._listeners)v.addEventListener(S,R,S===document?this.handleWindowEvent:this.handleEvent,L)}destroy(){for(const[c,m,x]of this._listeners)v.removeEventListener(c,m,c===document?this.handleWindowEvent:this.handleEvent,x)}_addDefaultHandlers(c){const m=this._map,x=m.getCanvasContainer();this._add("mapEvent",new Q1(m,c));const S=m.boxZoom=new ny(m,c);this._add("boxZoom",S);const R=new J1,L=new wp;m.doubleClickZoom=new _p(L,R),this._add("tapZoom",R),this._add("clickZoom",L);const V=new Cp;this._add("tapDragZoom",V);const H=m.touchPitch=new xp(m);this._add("touchPitch",H);const G=new fs(c),ne=new gn(c);m.dragRotate=new zs(c,G,ne),this._add("mouseRotate",G,["mousePitch"]),this._add("mousePitch",ne,["mouseRotate"]);const le=new Ou(c),pe=new ry(c,m);m.dragPan=new go(x,le,pe),this._add("mousePan",le),this._add("touchPan",pe,["touchZoom","touchRotate"]);const Te=new tw,_e=new sn;m.touchZoomRotate=new sy(x,_e,Te,V),this._add("touchRotate",Te,["touchPan","touchZoom"]),this._add("touchZoom",_e,["touchPan","touchRotate"]);const Ee=m.scrollZoom=new bp(m,this);this._add("scrollZoom",Ee,["mousePan"]);const Be=m.keyboard=new oy;this._add("keyboard",Be),this._add("blockableMapEvent",new Ns(m));for(const We of["boxZoom","doubleClickZoom","tapDragZoom","touchPitch","dragRotate","dragPan","touchZoomRotate","scrollZoom","keyboard"])c.interactive&&c[We]&&m[We].enable(c[We])}_add(c,m,x){this._handlers.push({handlerName:c,handler:m,allowed:x}),this._handlersById[c]=m}stop(c){if(!this._updatingCamera){for(const{handler:m}of this._handlers)m.reset();this._inertia.clear(),this._fireEvents({},{},c),this._changes=[]}}isActive(){for(const{handler:c}of this._handlers)if(c.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return Boolean(dc(this._eventsInProgress))||this.isZooming()}_blockedByActive(c,m,x){for(const S in c)if(S!==x&&(!m||m.indexOf(S)<0))return!0;return!1}handleWindowEvent(c){this.handleEvent(c,`${c.type}Window`)}_getMapTouches(c){const m=[];for(const x of c)this._el.contains(x.target)&&m.push(x);return m}handleEvent(c,m){if(c.type==="blur")return void this.stop(!0);this._updatingCamera=!0;const x=c.type==="renderFrame"?void 0:c,S={needsRenderFrame:!1},R={},L={},V=c.touches,H=V?this._getMapTouches(V):void 0,G=H?v.touchPos(this._el,H):v.mousePos(this._el,c);for(const{handlerName:pe,handler:Te,allowed:_e}of this._handlers){if(!Te.isEnabled())continue;let Ee;this._blockedByActive(L,_e,pe)?Te.reset():Te[m||c.type]&&(Ee=Te[m||c.type](c,G,H),this.mergeHandlerResult(S,R,Ee,pe,x),Ee&&Ee.needsRenderFrame&&this._triggerRenderFrame()),(Ee||Te.isActive())&&(L[pe]=Te)}const ne={};for(const pe in this._previousActiveHandlers)L[pe]||(ne[pe]=x);this._previousActiveHandlers=L,(Object.keys(ne).length||Du(S))&&(this._changes.push([S,R,ne]),this._triggerRenderFrame()),(Object.keys(L).length||Du(S))&&this._map._stop(!0),this._updatingCamera=!1;const{cameraAnimation:le}=S;le&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],le(this._map))}mergeHandlerResult(c,m,x,S,R){if(!x)return;a.extend(c,x);const L={handlerName:S,originalEvent:x.originalEvent||R};x.zoomDelta!==void 0&&(m.zoom=L),x.panDelta!==void 0&&(m.drag=L),x.pitchDelta!==void 0&&(m.pitch=L),x.bearingDelta!==void 0&&(m.rotate=L)}_applyChanges(){const c={},m={},x={};for(const[S,R,L]of this._changes)S.panDelta&&(c.panDelta=(c.panDelta||new a.pointGeometry(0,0))._add(S.panDelta)),S.zoomDelta&&(c.zoomDelta=(c.zoomDelta||0)+S.zoomDelta),S.bearingDelta&&(c.bearingDelta=(c.bearingDelta||0)+S.bearingDelta),S.pitchDelta&&(c.pitchDelta=(c.pitchDelta||0)+S.pitchDelta),S.around!==void 0&&(c.around=S.around),S.pinchAround!==void 0&&(c.pinchAround=S.pinchAround),S.noInertia&&(c.noInertia=S.noInertia),a.extend(m,R),a.extend(x,L);this._updateMapTransform(c,m,x),this._changes=[]}_updateMapTransform(c,m,x){const S=this._map,R=S.transform,L=S.style&&S.style.terrain;if(!(Du(c)||L&&this._drag))return this._fireEvents(m,x,!0);let{panDelta:V,zoomDelta:H,bearingDelta:G,pitchDelta:ne,around:le,pinchAround:pe}=c;pe!==void 0&&(le=pe),S._stop(!0),le=le||S.transform.centerPoint;const Te=R.pointLocation(V?le.sub(V):le);G&&(R.bearing+=G),ne&&(R.pitch+=ne),H&&(R.zoom+=H),L?m.drag&&!this._drag?(this._drag={center:R.centerPoint,lngLat:R.pointLocation(le),point:le,handlerName:m.drag.handlerName},S.fire(new a.Event("freezeElevation",{freeze:!0}))):this._drag&&x[this._drag.handlerName]?(S.fire(new a.Event("freezeElevation",{freeze:!1})),this._drag=null):m.drag&&this._drag&&(R.center=R.pointLocation(R.centerPoint.sub(V))):R.setLocationAtPoint(Te,le),this._map._update(),c.noInertia||this._inertia.record(c),this._fireEvents(m,x,!0)}_fireEvents(c,m,x){const S=dc(this._eventsInProgress),R=dc(c),L={};for(const ne in c){const{originalEvent:le}=c[ne];this._eventsInProgress[ne]||(L[`${ne}start`]=le),this._eventsInProgress[ne]=c[ne]}!S&&R&&this._fireEvent("movestart",R.originalEvent);for(const ne in L)this._fireEvent(ne,L[ne]);R&&this._fireEvent("move",R.originalEvent);for(const ne in c){const{originalEvent:le}=c[ne];this._fireEvent(ne,le)}const V={};let H;for(const ne in this._eventsInProgress){const{handlerName:le,originalEvent:pe}=this._eventsInProgress[ne];this._handlersById[le].isActive()||(delete this._eventsInProgress[ne],H=m[le]||pe,V[`${ne}end`]=H)}for(const ne in V)this._fireEvent(ne,V[ne]);const G=dc(this._eventsInProgress);if(x&&(S||R)&&!G){this._updatingCamera=!0;const ne=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),le=pe=>pe!==0&&-this._bearingSnap<pe&&pe<this._bearingSnap;ne?(le(ne.bearing||this._map.getBearing())&&(ne.bearing=0),this._map.easeTo(ne,{originalEvent:H})):(this._map.fire(new a.Event("moveend",{originalEvent:H})),le(this._map.getBearing())&&this._map.resetNorth()),this._updatingCamera=!1}}_fireEvent(c,m){this._map.fire(new a.Event(c,m?{originalEvent:m}:{}))}_requestFrame(){return this._map.triggerRepaint(),this._map._renderTaskQueue.add(c=>{delete this._frameId,this.handleEvent(new Sp("renderFrame",{timeStamp:c})),this._applyChanges()})}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}}const Ko={extend:(w,...c)=>a.extend(w,...c),run(w){w()},logToElement(w,c=!1,m="log"){const x=window.document.getElementById(m);x&&(c&&(x.innerHTML=""),x.innerHTML+=`<br>${w}`)}};class Br extends a.Evented{constructor(c,m){super(),this._moving=!1,this._zooming=!1,this.transform=c,this._bearingSnap=m.bearingSnap,a.bindAll(["_renderFrameCallback"],this)}getCenter(){return new a.LngLat(this.transform.center.lng,this.transform.center.lat)}setCenter(c,m){return this.jumpTo({center:c},m)}panBy(c,m,x){return c=a.pointGeometry.convert(c).mult(-1),this.panTo(this.transform.center,a.extend({offset:c},m),x)}panTo(c,m,x){return this.easeTo(a.extend({center:c},m),x)}getZoom(){return this.transform.zoom}setZoom(c,m){return this.jumpTo({zoom:c},m),this}zoomTo(c,m,x){return this.easeTo(a.extend({zoom:c},m),x)}zoomIn(c,m){return this.zoomTo(this.getZoom()+1,c,m),this}zoomOut(c,m){return this.zoomTo(this.getZoom()-1,c,m),this}getBearing(){return this.transform.bearing}setBearing(c,m){return this.jumpTo({bearing:c},m),this}getPadding(){return this.transform.padding}setPadding(c,m){return this.jumpTo({padding:c},m),this}rotateTo(c,m,x){return this.easeTo(a.extend({bearing:c},m),x)}resetNorth(c,m){return this.rotateTo(0,a.extend({duration:1e3},c),m),this}resetNorthPitch(c,m){return this.easeTo(a.extend({bearing:0,pitch:0,duration:1e3},c),m),this}snapToNorth(c,m){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(c,m):this}getPitch(){return this.transform.pitch}setPitch(c,m){return this.jumpTo({pitch:c},m),this}cameraForBounds(c,m){c=a.LngLatBounds.convert(c);const x=m&&m.bearing||0;return this._cameraForBoxAndBearing(c.getNorthWest(),c.getSouthEast(),x,m)}_cameraForBoxAndBearing(c,m,x,S){const R={top:0,bottom:0,right:0,left:0};if(typeof(S=a.extend({padding:R,offset:[0,0],maxZoom:this.transform.maxZoom},S)).padding=="number"){const st=S.padding;S.padding={top:st,bottom:st,right:st,left:st}}S.padding=a.extend(R,S.padding);const L=this.transform,V=L.padding,H=L.project(a.LngLat.convert(c)),G=L.project(a.LngLat.convert(m)),ne=H.rotate(-x*Math.PI/180),le=G.rotate(-x*Math.PI/180),pe=new a.pointGeometry(Math.max(ne.x,le.x),Math.max(ne.y,le.y)),Te=new a.pointGeometry(Math.min(ne.x,le.x),Math.min(ne.y,le.y)),_e=pe.sub(Te),Ee=(L.width-(V.left+V.right+S.padding.left+S.padding.right))/_e.x,Be=(L.height-(V.top+V.bottom+S.padding.top+S.padding.bottom))/_e.y;if(Be<0||Ee<0)return void a.warnOnce("Map cannot fit within canvas with the given bounds, padding, and/or offset.");const We=Math.min(L.scaleZoom(L.scale*Math.min(Ee,Be)),S.maxZoom),rt=a.pointGeometry.convert(S.offset),Oe=new a.pointGeometry((S.padding.left-S.padding.right)/2,(S.padding.top-S.padding.bottom)/2).rotate(x*Math.PI/180),ft=rt.add(Oe).mult(L.scale/L.zoomScale(We));return{center:L.unproject(H.add(G).div(2).sub(ft)),zoom:We,bearing:x}}fitBounds(c,m,x){return this._fitInternal(this.cameraForBounds(c,m),m,x)}fitScreenCoordinates(c,m,x,S,R){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.pointLocation(a.pointGeometry.convert(c)),this.transform.pointLocation(a.pointGeometry.convert(m)),x,S),S,R)}_fitInternal(c,m,x){return c?(delete(m=a.extend(c,m)).padding,m.linear?this.easeTo(m,x):this.flyTo(m,x)):this}jumpTo(c,m){this.stop();const x=this.transform;let S=!1,R=!1,L=!1;return"zoom"in c&&x.zoom!==+c.zoom&&(S=!0,x.zoom=+c.zoom),c.center!==void 0&&(x.center=a.LngLat.convert(c.center)),"bearing"in c&&x.bearing!==+c.bearing&&(R=!0,x.bearing=+c.bearing),"pitch"in c&&x.pitch!==+c.pitch&&(L=!0,x.pitch=+c.pitch),c.padding==null||x.isPaddingEqual(c.padding)||(x.padding=c.padding),this.fire(new a.Event("movestart",m)).fire(new a.Event("move",m)),S&&this.fire(new a.Event("zoomstart",m)).fire(new a.Event("zoom",m)).fire(new a.Event("zoomend",m)),R&&this.fire(new a.Event("rotatestart",m)).fire(new a.Event("rotate",m)).fire(new a.Event("rotateend",m)),L&&this.fire(new a.Event("pitchstart",m)).fire(new a.Event("pitch",m)).fire(new a.Event("pitchend",m)),this.fire(new a.Event("moveend",m))}calculateCameraOptionsFromTo(c,m,x,S=0){const R=a.MercatorCoordinate.fromLngLat(c,m),L=a.MercatorCoordinate.fromLngLat(x,S),V=L.x-R.x,H=L.y-R.y,G=L.z-R.z,ne=Math.hypot(V,H,G);if(ne===0)throw new Error("Can't calculate camera options with same From and To");const le=Math.hypot(V,H),pe=this.transform.scaleZoom(this.transform.cameraToCenterDistance/ne/this.transform.tileSize),Te=180*Math.atan2(V,-H)/Math.PI;let _e=180*Math.acos(le/ne)/Math.PI;return _e=G<0?90-_e:90+_e,{center:L.toLngLat(),zoom:pe,pitch:_e,bearing:Te}}easeTo(c,m){this._stop(!1,c.easeId),((c=a.extend({offset:[0,0],duration:500,easing:a.ease},c)).animate===!1||!c.essential&&a.exported.prefersReducedMotion)&&(c.duration=0);const x=this.transform,S=this.getZoom(),R=this.getBearing(),L=this.getPitch(),V=this.getPadding(),H="zoom"in c?+c.zoom:S,G="bearing"in c?this._normalizeBearing(c.bearing,R):R,ne="pitch"in c?+c.pitch:L,le="padding"in c?c.padding:x.padding,pe=a.pointGeometry.convert(c.offset);let Te=x.centerPoint.add(pe);const _e=x.pointLocation(Te),Ee=a.LngLat.convert(c.center||_e);this._normalizeCenter(Ee);const Be=x.project(_e),We=x.project(Ee).sub(Be),rt=x.zoomScale(H-S);let Oe,ft;c.around&&(Oe=a.LngLat.convert(c.around),ft=x.locationPoint(Oe));const st={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching};return this._zooming=this._zooming||H!==S,this._rotating=this._rotating||R!==G,this._pitching=this._pitching||ne!==L,this._padding=!x.isPaddingEqual(le),this._easeId=c.easeId,this._prepareEase(m,c.noMoveStart,st),this._ease(_t=>{if(this._zooming&&(x.zoom=a.number(S,H,_t)),this._rotating&&(x.bearing=a.number(R,G,_t)),this._pitching&&(x.pitch=a.number(L,ne,_t)),this._padding&&(x.interpolatePadding(V,le,_t),Te=x.centerPoint.add(pe)),Oe)x.setLocationAtPoint(Oe,ft);else{const wt=x.zoomScale(x.zoom-S),Ut=H>S?Math.min(2,rt):Math.max(.5,rt),xt=Math.pow(Ut,1-_t),un=x.unproject(Be.add(We.mult(_t*xt)).mult(wt));x.setLocationAtPoint(x.renderWorldCopies?un.wrap():un,Te)}this._fireMoveEvents(m)},_t=>{this._afterEase(m,_t)},c),this}_prepareEase(c,m,x={}){this._moving=!0,this.fire(new a.Event("freezeElevation",{freeze:!0})),m||x.moving||this.fire(new a.Event("movestart",c)),this._zooming&&!x.zooming&&this.fire(new a.Event("zoomstart",c)),this._rotating&&!x.rotating&&this.fire(new a.Event("rotatestart",c)),this._pitching&&!x.pitching&&this.fire(new a.Event("pitchstart",c))}_fireMoveEvents(c){this.fire(new a.Event("move",c)),this._zooming&&this.fire(new a.Event("zoom",c)),this._rotating&&this.fire(new a.Event("rotate",c)),this._pitching&&this.fire(new a.Event("pitch",c))}_afterEase(c,m){if(this._easeId&&m&&this._easeId===m)return;delete this._easeId,this.fire(new a.Event("freezeElevation",{freeze:!1}));const x=this._zooming,S=this._rotating,R=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,x&&this.fire(new a.Event("zoomend",c)),S&&this.fire(new a.Event("rotateend",c)),R&&this.fire(new a.Event("pitchend",c)),this.fire(new a.Event("moveend",c))}flyTo(c,m){if(!c.essential&&a.exported.prefersReducedMotion){const Tn=a.pick(c,["center","zoom","bearing","pitch","around"]);return this.jumpTo(Tn,m)}this.stop(),c=a.extend({offset:[0,0],speed:1.2,curve:1.42,easing:a.ease},c);const x=this.transform,S=this.getZoom(),R=this.getBearing(),L=this.getPitch(),V=this.getPadding(),H="zoom"in c?a.clamp(+c.zoom,x.minZoom,x.maxZoom):S,G="bearing"in c?this._normalizeBearing(c.bearing,R):R,ne="pitch"in c?+c.pitch:L,le="padding"in c?c.padding:x.padding,pe=x.zoomScale(H-S),Te=a.pointGeometry.convert(c.offset);let _e=x.centerPoint.add(Te);const Ee=x.pointLocation(_e),Be=a.LngLat.convert(c.center||Ee);this._normalizeCenter(Be);const We=x.project(Ee),rt=x.project(Be).sub(We);let Oe=c.curve;const ft=Math.max(x.width,x.height),st=ft/pe,_t=rt.mag();if("minZoom"in c){const Tn=a.clamp(Math.min(c.minZoom,S,H),x.minZoom,x.maxZoom),mr=ft/x.zoomScale(Tn-S);Oe=Math.sqrt(mr/_t*2)}const wt=Oe*Oe;function Ut(Tn){const mr=(st*st-ft*ft+(Tn?-1:1)*wt*wt*_t*_t)/(2*(Tn?st:ft)*wt*_t);return Math.log(Math.sqrt(mr*mr+1)-mr)}function xt(Tn){return(Math.exp(Tn)-Math.exp(-Tn))/2}function un(Tn){return(Math.exp(Tn)+Math.exp(-Tn))/2}const Jt=Ut(0);let fn=function(Tn){return un(Jt)/un(Jt+Oe*Tn)},$n=function(Tn){return ft*((un(Jt)*(xt(mr=Jt+Oe*Tn)/un(mr))-xt(Jt))/wt)/_t;var mr},Hn=(Ut(1)-Jt)/Oe;if(Math.abs(_t)<1e-6||!isFinite(Hn)){if(Math.abs(ft-st)<1e-6)return this.easeTo(c,m);const Tn=st<ft?-1:1;Hn=Math.abs(Math.log(st/ft))/Oe,$n=function(){return 0},fn=function(mr){return Math.exp(Tn*Oe*mr)}}return c.duration="duration"in c?+c.duration:1e3*Hn/("screenSpeed"in c?+c.screenSpeed/Oe:+c.speed),c.maxDuration&&c.duration>c.maxDuration&&(c.duration=0),this._zooming=!0,this._rotating=R!==G,this._pitching=ne!==L,this._padding=!x.isPaddingEqual(le),this._prepareEase(m,!1),this._ease(Tn=>{const mr=Tn*Hn,gr=1/fn(mr);x.zoom=Tn===1?H:S+x.scaleZoom(gr),this._rotating&&(x.bearing=a.number(R,G,Tn)),this._pitching&&(x.pitch=a.number(L,ne,Tn)),this._padding&&(x.interpolatePadding(V,le,Tn),_e=x.centerPoint.add(Te));const ir=Tn===1?Be:x.unproject(We.add(rt.mult($n(mr))).mult(gr));x.setLocationAtPoint(x.renderWorldCopies?ir.wrap():ir,_e),this._fireMoveEvents(m)},()=>this._afterEase(m),c),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(c,m){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){const x=this._onEaseEnd;delete this._onEaseEnd,x.call(this,m)}if(!c){const x=this.handlers;x&&x.stop(!1)}return this}_ease(c,m,x){x.animate===!1||x.duration===0?(c(1),m()):(this._easeStart=a.exported.now(),this._easeOptions=x,this._onEaseFrame=c,this._onEaseEnd=m,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_renderFrameCallback(){const c=Math.min((a.exported.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(c)),c<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()}_normalizeBearing(c,m){c=a.wrap(c,-180,180);const x=Math.abs(c-m);return Math.abs(c-360-m)<x&&(c-=360),Math.abs(c+360-m)<x&&(c+=360),c}_normalizeCenter(c){const m=this.transform;if(!m.renderWorldCopies||m.lngRange)return;const x=c.lng-m.center.lng;c.lng+=x>180?-360:x<-180?360:0}}class Au{constructor(c={}){this.options=c,a.bindAll(["_toggleAttribution","_updateData","_updateCompact","_updateCompactMinimize"],this)}getDefaultPosition(){return"bottom-right"}onAdd(c){return this._map=c,this._compact=this.options&&this.options.compact,this._container=v.create("details","maplibregl-ctrl maplibregl-ctrl-attrib mapboxgl-ctrl mapboxgl-ctrl-attrib"),this._compactButton=v.create("summary","maplibregl-ctrl-attrib-button mapboxgl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=v.create("div","maplibregl-ctrl-attrib-inner mapboxgl-ctrl-attrib-inner",this._container),this._updateAttributions(),this._updateCompact(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("terrain",this._updateData),this._map.on("resize",this._updateCompact),this._map.on("drag",this._updateCompactMinimize),this._container}onRemove(){v.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("terrain",this._updateData),this._map.off("resize",this._updateCompact),this._map.off("drag",this._updateCompactMinimize),this._map=void 0,this._compact=void 0,this._attribHTML=void 0}_setElementTitle(c,m){const x=this._map._getUIString(`AttributionControl.${m}`);c.title=x,c.setAttribute("aria-label",x)}_toggleAttribution(){this._container.classList.contains("maplibregl-compact")&&(this._container.classList.contains("maplibregl-compact-show")?(this._container.setAttribute("open",""),this._container.classList.remove("maplibregl-compact-show","mapboxgl-compact-show")):(this._container.classList.add("maplibregl-compact-show","mapboxgl-compact-show"),this._container.removeAttribute("open")))}_updateData(c){!c||c.sourceDataType!=="metadata"&&c.sourceDataType!=="visibility"&&c.dataType!=="style"&&c.type!=="terrain"||this._updateAttributions()}_updateAttributions(){if(!this._map.style)return;let c=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?c=c.concat(this.options.customAttribution.map(S=>typeof S!="string"?"":S)):typeof this.options.customAttribution=="string"&&c.push(this.options.customAttribution)),this._map.style.stylesheet){const S=this._map.style.stylesheet;this.styleOwner=S.owner,this.styleId=S.id}const m=this._map.style.sourceCaches;for(const S in m){const R=m[S];if(R.used||R.usedForTerrain){const L=R.getSource();L.attribution&&c.indexOf(L.attribution)<0&&c.push(L.attribution)}}c=c.filter(S=>String(S).trim()),c.sort((S,R)=>S.length-R.length),c=c.filter((S,R)=>{for(let L=R+1;L<c.length;L++)if(c[L].indexOf(S)>=0)return!1;return!0});const x=c.join(" | ");x!==this._attribHTML&&(this._attribHTML=x,c.length?(this._innerContainer.innerHTML=x,this._container.classList.remove("maplibregl-attrib-empty","mapboxgl-attrib-empty")):this._container.classList.add("maplibregl-attrib-empty","mapboxgl-attrib-empty"),this._updateCompact(),this._editLink=null)}_updateCompact(){this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact===!1?this._container.setAttribute("open",""):this._container.classList.contains("maplibregl-compact")||this._container.classList.contains("maplibregl-attrib-empty")||(this._container.setAttribute("open",""),this._container.classList.add("maplibregl-compact","mapboxgl-compact","maplibregl-compact-show","mapboxgl-compact-show")):(this._container.setAttribute("open",""),this._container.classList.contains("maplibregl-compact")&&this._container.classList.remove("maplibregl-compact","maplibregl-compact-show","mapboxgl-compact","mapboxgl-compact-show"))}_updateCompactMinimize(){this._container.classList.contains("maplibregl-compact")&&this._container.classList.contains("maplibregl-compact-show")&&this._container.classList.remove("maplibregl-compact-show","mapboxgl-compact-show")}}class lf{constructor(c={}){this.options=c,a.bindAll(["_updateCompact"],this)}getDefaultPosition(){return"bottom-left"}onAdd(c){this._map=c,this._compact=this.options&&this.options.compact,this._container=v.create("div","maplibregl-ctrl mapboxgl-ctrl");const m=v.create("a","maplibregl-ctrl-logo mapboxgl-ctrl-logo");return m.target="_blank",m.rel="noopener nofollow",m.href="https://maplibre.org/",m.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),m.setAttribute("rel","noopener nofollow"),this._container.appendChild(m),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){v.remove(this._container),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}_updateCompact(){const c=this._container.children;if(c.length){const m=c[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact!==!1&&m.classList.add("maplibregl-compact","mapboxgl-compact"):m.classList.remove("maplibregl-compact","mapboxgl-compact")}}}class cy{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(c){const m=++this._id;return this._queue.push({callback:c,id:m,cancelled:!1}),m}remove(c){const m=this._currentlyRunning,x=m?this._queue.concat(m):this._queue;for(const S of x)if(S.id===c)return void(S.cancelled=!0)}run(c=0){if(this._currentlyRunning)throw new Error("Attempting to run(), but is already running.");const m=this._currentlyRunning=this._queue;this._queue=[];for(const x of m)if(!x.cancelled&&(x.callback(c),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}const uy={"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","NavigationControl.ResetBearing":"Reset bearing to north","NavigationControl.ZoomIn":"Zoom in","NavigationControl.ZoomOut":"Zoom out","ScaleControl.Feet":"ft","ScaleControl.Meters":"m","ScaleControl.Kilometers":"km","ScaleControl.Miles":"mi","ScaleControl.NauticalMiles":"nm","TerrainControl.enableTerrain":"Enable terrain","TerrainControl.disableTerrain":"Disable terrain"},dy={center:[0,0],zoom:0,bearing:0,pitch:0,minZoom:-2,maxZoom:22,minPitch:0,maxPitch:60,interactive:!0,scrollZoom:!0,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,touchPitch:!0,cooperativeGestures:void 0,bearingSnap:7,clickTolerance:3,pitchWithRotate:!0,hash:!1,attributionControl:!0,maplibreLogo:!1,failIfMajorPerformanceCaveat:!1,preserveDrawingBuffer:!1,trackResize:!0,renderWorldCopies:!0,refreshExpiredTiles:!0,maxTileCacheSize:null,localIdeographFontFamily:"sans-serif",transformRequest:null,fadeDuration:300,crossSourceCollisions:!0},rw={showCompass:!0,showZoom:!0,visualizePitch:!1};class Na{constructor(c,m,x=!1){this._clickTolerance=10,this.element=m,this.mouseRotate=new fs({clickTolerance:c.dragRotate._mouseRotate._clickTolerance}),this.map=c,x&&(this.mousePitch=new gn({clickTolerance:c.dragRotate._mousePitch._clickTolerance})),a.bindAll(["mousedown","mousemove","mouseup","touchstart","touchmove","touchend","reset"],this),v.addEventListener(m,"mousedown",this.mousedown),v.addEventListener(m,"touchstart",this.touchstart,{passive:!1}),v.addEventListener(m,"touchmove",this.touchmove),v.addEventListener(m,"touchend",this.touchend),v.addEventListener(m,"touchcancel",this.reset)}down(c,m){this.mouseRotate.mousedown(c,m),this.mousePitch&&this.mousePitch.mousedown(c,m),v.disableDrag()}move(c,m){const x=this.map,S=this.mouseRotate.mousemoveWindow(c,m);if(S&&S.bearingDelta&&x.setBearing(x.getBearing()+S.bearingDelta),this.mousePitch){const R=this.mousePitch.mousemoveWindow(c,m);R&&R.pitchDelta&&x.setPitch(x.getPitch()+R.pitchDelta)}}off(){const c=this.element;v.removeEventListener(c,"mousedown",this.mousedown),v.removeEventListener(c,"touchstart",this.touchstart,{passive:!1}),v.removeEventListener(c,"touchmove",this.touchmove),v.removeEventListener(c,"touchend",this.touchend),v.removeEventListener(c,"touchcancel",this.reset),this.offTemp()}offTemp(){v.enableDrag(),v.removeEventListener(window,"mousemove",this.mousemove),v.removeEventListener(window,"mouseup",this.mouseup)}mousedown(c){this.down(a.extend({},c,{ctrlKey:!0,preventDefault:()=>c.preventDefault()}),v.mousePos(this.element,c)),v.addEventListener(window,"mousemove",this.mousemove),v.addEventListener(window,"mouseup",this.mouseup)}mousemove(c){this.move(c,v.mousePos(this.element,c))}mouseup(c){this.mouseRotate.mouseupWindow(c),this.mousePitch&&this.mousePitch.mouseupWindow(c),this.offTemp()}touchstart(c){c.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=v.touchPos(this.element,c.targetTouches)[0],this.down({type:"mousedown",button:0,ctrlKey:!0,preventDefault:()=>c.preventDefault()},this._startPos))}touchmove(c){c.targetTouches.length!==1?this.reset():(this._lastPos=v.touchPos(this.element,c.targetTouches)[0],this.move({preventDefault:()=>c.preventDefault()},this._lastPos))}touchend(c){c.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()}}function Nu(w,c,m){if(w=new a.LngLat(w.lng,w.lat),c){const x=new a.LngLat(w.lng-360,w.lat),S=new a.LngLat(w.lng+360,w.lat),R=m.locationPoint(w).distSqr(c);m.locationPoint(x).distSqr(c)<R?w=x:m.locationPoint(S).distSqr(c)<R&&(w=S)}for(;Math.abs(w.lng-m.center.lng)>180;){const x=m.locationPoint(w);if(x.x>=0&&x.y>=0&&x.x<=m.width&&x.y<=m.height)break;w.lng>m.center.lng?w.lng-=360:w.lng+=360}return w}const xn={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};function Rn(w,c,m){const x=w.classList;for(const S in xn)x.remove(`maplibregl-${m}-anchor-${S}`,`mapboxgl-${m}-anchor-${S}`);x.add(`maplibregl-${m}-anchor-${c}`,`mapboxgl-${m}-anchor-${c}`)}class fc extends a.Evented{constructor(c,m){if(super(),(c instanceof HTMLElement||m)&&(c=a.extend({element:c},m)),a.bindAll(["_update","_onMove","_onUp","_addDragHandler","_onMapClick","_onKeyPress"],this),this._anchor=c&&c.anchor||"center",this._color=c&&c.color||"#3FB1CE",this._scale=c&&c.scale||1,this._draggable=c&&c.draggable||!1,this._clickTolerance=c&&c.clickTolerance||0,this._isDragging=!1,this._state="inactive",this._rotation=c&&c.rotation||0,this._rotationAlignment=c&&c.rotationAlignment||"auto",this._pitchAlignment=c&&c.pitchAlignment&&c.pitchAlignment!=="auto"?c.pitchAlignment:this._rotationAlignment,c&&c.element)this._element=c.element,this._offset=a.pointGeometry.convert(c&&c.offset||[0,0]);else{this._defaultMarker=!0,this._element=v.create("div"),this._element.setAttribute("aria-label","Map marker");const x=v.createNS("http://www.w3.org/2000/svg","svg"),S=41,R=27;x.setAttributeNS(null,"display","block"),x.setAttributeNS(null,"height",`${S}px`),x.setAttributeNS(null,"width",`${R}px`),x.setAttributeNS(null,"viewBox",`0 0 ${R} ${S}`);const L=v.createNS("http://www.w3.org/2000/svg","g");L.setAttributeNS(null,"stroke","none"),L.setAttributeNS(null,"stroke-width","1"),L.setAttributeNS(null,"fill","none"),L.setAttributeNS(null,"fill-rule","evenodd");const V=v.createNS("http://www.w3.org/2000/svg","g");V.setAttributeNS(null,"fill-rule","nonzero");const H=v.createNS("http://www.w3.org/2000/svg","g");H.setAttributeNS(null,"transform","translate(3.0, 29.0)"),H.setAttributeNS(null,"fill","#000000");const G=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}];for(const rt of G){const Oe=v.createNS("http://www.w3.org/2000/svg","ellipse");Oe.setAttributeNS(null,"opacity","0.04"),Oe.setAttributeNS(null,"cx","10.5"),Oe.setAttributeNS(null,"cy","5.80029008"),Oe.setAttributeNS(null,"rx",rt.rx),Oe.setAttributeNS(null,"ry",rt.ry),H.appendChild(Oe)}const ne=v.createNS("http://www.w3.org/2000/svg","g");ne.setAttributeNS(null,"fill",this._color);const le=v.createNS("http://www.w3.org/2000/svg","path");le.setAttributeNS(null,"d","M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"),ne.appendChild(le);const pe=v.createNS("http://www.w3.org/2000/svg","g");pe.setAttributeNS(null,"opacity","0.25"),pe.setAttributeNS(null,"fill","#000000");const Te=v.createNS("http://www.w3.org/2000/svg","path");Te.setAttributeNS(null,"d","M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"),pe.appendChild(Te);const _e=v.createNS("http://www.w3.org/2000/svg","g");_e.setAttributeNS(null,"transform","translate(6.0, 7.0)"),_e.setAttributeNS(null,"fill","#FFFFFF");const Ee=v.createNS("http://www.w3.org/2000/svg","g");Ee.setAttributeNS(null,"transform","translate(8.0, 8.0)");const Be=v.createNS("http://www.w3.org/2000/svg","circle");Be.setAttributeNS(null,"fill","#000000"),Be.setAttributeNS(null,"opacity","0.25"),Be.setAttributeNS(null,"cx","5.5"),Be.setAttributeNS(null,"cy","5.5"),Be.setAttributeNS(null,"r","5.4999962");const We=v.createNS("http://www.w3.org/2000/svg","circle");We.setAttributeNS(null,"fill","#FFFFFF"),We.setAttributeNS(null,"cx","5.5"),We.setAttributeNS(null,"cy","5.5"),We.setAttributeNS(null,"r","5.4999962"),Ee.appendChild(Be),Ee.appendChild(We),V.appendChild(H),V.appendChild(ne),V.appendChild(pe),V.appendChild(_e),V.appendChild(Ee),x.appendChild(V),x.setAttributeNS(null,"height",S*this._scale+"px"),x.setAttributeNS(null,"width",R*this._scale+"px"),this._element.appendChild(x),this._offset=a.pointGeometry.convert(c&&c.offset||[0,-14])}this._element.classList.add("maplibregl-marker","mapboxgl-marker"),this._element.addEventListener("dragstart",x=>{x.preventDefault()}),this._element.addEventListener("mousedown",x=>{x.preventDefault()}),Rn(this._element,this._anchor,"marker"),this._popup=null}addTo(c){return this.remove(),this._map=c,c.getCanvasContainer().appendChild(this._element),c.on("move",this._update),c.on("moveend",this._update),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this}remove(){return this._opacityTimeout&&(clearTimeout(this._opacityTimeout),delete this._opacityTimeout),this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler),this._map.off("mouseup",this._onUp),this._map.off("touchend",this._onUp),this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),delete this._map),v.remove(this._element),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(c){return this._lngLat=a.LngLat.convert(c),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(c){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),c){if(!("offset"in c.options)){const S=Math.sqrt(Math.pow(13.5,2)/2);c.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[S,-1*(38.1-13.5+S)],"bottom-right":[-S,-1*(38.1-13.5+S)],left:[13.5,-1*(38.1-13.5)],right:[-13.5,-1*(38.1-13.5)]}:this._offset}this._popup=c,this._lngLat&&this._popup.setLngLat(this._lngLat),this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this}_onKeyPress(c){const m=c.code,x=c.charCode||c.keyCode;m!=="Space"&&m!=="Enter"&&x!==32&&x!==13||this.togglePopup()}_onMapClick(c){const m=c.originalEvent.target,x=this._element;this._popup&&(m===x||x.contains(m))&&this.togglePopup()}getPopup(){return this._popup}togglePopup(){const c=this._popup;return c?(c.isOpen()?c.remove():c.addTo(this._map),this):this}_update(c){if(!this._map)return;this._map.transform.renderWorldCopies&&(this._lngLat=Nu(this._lngLat,this._pos,this._map.transform)),this._pos=this._map.project(this._lngLat)._add(this._offset);let m="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?m=`rotateZ(${this._rotation}deg)`:this._rotationAlignment==="map"&&(m=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let x="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?x="rotateX(0deg)":this._pitchAlignment==="map"&&(x=`rotateX(${this._map.getPitch()}deg)`),c&&c.type!=="moveend"||(this._pos=this._pos.round()),v.setTransform(this._element,`${xn[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${x} ${m}`),this._map.style&&this._map.style.terrain&&!this._opacityTimeout&&(this._opacityTimeout=setTimeout(()=>{const S=this._map.unproject(this._pos),R=40075016686e-3*Math.abs(Math.cos(this._lngLat.lat*Math.PI/180))/Math.pow(2,this._map.transform.tileZoom+8);this._element.style.opacity=S.distanceTo(this._lngLat)>20*R?"0.2":"1.0",this._opacityTimeout=null},100))}getOffset(){return this._offset}setOffset(c){return this._offset=a.pointGeometry.convert(c),this._update(),this}_onMove(c){if(!this._isDragging){const m=this._clickTolerance||this._map._clickTolerance;this._isDragging=c.point.dist(this._pointerdownPos)>=m}this._isDragging&&(this._pos=c.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none",this._state==="pending"&&(this._state="active",this.fire(new a.Event("dragstart"))),this.fire(new a.Event("drag")))}_onUp(){this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),this._state==="active"&&this.fire(new a.Event("dragend")),this._state="inactive"}_addDragHandler(c){this._element.contains(c.originalEvent.target)&&(c.preventDefault(),this._positionDelta=c.point.sub(this._pos).add(this._offset),this._pointerdownPos=c.point,this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp))}setDraggable(c){return this._draggable=!!c,this._map&&(c?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this}isDraggable(){return this._draggable}setRotation(c){return this._rotation=c||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(c){return this._rotationAlignment=c||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(c){return this._pitchAlignment=c&&c!=="auto"?c:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}}const Ep={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0};let Fs,Fi=0,$s=!1;const La={maxWidth:100,unit:"metric"};function fy(w,c,m){const x=m&&m.maxWidth||100,S=w._container.clientHeight/2,R=w.unproject([0,S]),L=w.unproject([x,S]),V=R.distanceTo(L);if(m&&m.unit==="imperial"){const H=3.2808*V;H>5280?Bs(c,x,H/5280,w._getUIString("ScaleControl.Miles")):Bs(c,x,H,w._getUIString("ScaleControl.Feet"))}else m&&m.unit==="nautical"?Bs(c,x,V/1852,w._getUIString("ScaleControl.NauticalMiles")):V>=1e3?Bs(c,x,V/1e3,w._getUIString("ScaleControl.Kilometers")):Bs(c,x,V,w._getUIString("ScaleControl.Meters"))}function Bs(w,c,m,x){const S=function(R){const L=Math.pow(10,`${Math.floor(R)}`.length-1);let V=R/L;return V=V>=10?10:V>=5?5:V>=3?3:V>=2?2:V>=1?1:function(H){const G=Math.pow(10,Math.ceil(-Math.log(H)/Math.LN10));return Math.round(H*G)/G}(V),L*V}(m);w.style.width=c*(S/m)+"px",w.innerHTML=`${S}&nbsp;${x}`}const ni={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px"},hi=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");function Pp(w){if(w){if(typeof w=="number"){const c=Math.round(Math.sqrt(.5*Math.pow(w,2)));return{center:new a.pointGeometry(0,0),top:new a.pointGeometry(0,w),"top-left":new a.pointGeometry(c,c),"top-right":new a.pointGeometry(-c,c),bottom:new a.pointGeometry(0,-w),"bottom-left":new a.pointGeometry(c,-c),"bottom-right":new a.pointGeometry(-c,-c),left:new a.pointGeometry(w,0),right:new a.pointGeometry(-w,0)}}if(w instanceof a.pointGeometry||Array.isArray(w)){const c=a.pointGeometry.convert(w);return{center:c,top:c,"top-left":c,"top-right":c,bottom:c,"bottom-left":c,"bottom-right":c,left:c,right:c}}return{center:a.pointGeometry.convert(w.center||[0,0]),top:a.pointGeometry.convert(w.top||[0,0]),"top-left":a.pointGeometry.convert(w["top-left"]||[0,0]),"top-right":a.pointGeometry.convert(w["top-right"]||[0,0]),bottom:a.pointGeometry.convert(w.bottom||[0,0]),"bottom-left":a.pointGeometry.convert(w["bottom-left"]||[0,0]),"bottom-right":a.pointGeometry.convert(w["bottom-right"]||[0,0]),left:a.pointGeometry.convert(w.left||[0,0]),right:a.pointGeometry.convert(w.right||[0,0])}}return Pp(new a.pointGeometry(0,0))}const ml={supported:u,setRTLTextPlugin:a.setRTLTextPlugin,getRTLTextPluginStatus:a.getRTLTextPluginStatus,Map:class extends Br{constructor(w){var c;if(a.PerformanceUtils.mark(a.PerformanceMarkers.create),(w=a.extend({},dy,w)).minZoom!=null&&w.maxZoom!=null&&w.minZoom>w.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(w.minPitch!=null&&w.maxPitch!=null&&w.minPitch>w.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(w.minPitch!=null&&w.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(w.maxPitch!=null&&w.maxPitch>85)throw new Error("maxPitch must be less than or equal to 85");if(super(new Pu(w.minZoom,w.maxZoom,w.minPitch,w.maxPitch,w.renderWorldCopies),{bearingSnap:w.bearingSnap}),this._interactive=w.interactive,this._cooperativeGestures=w.cooperativeGestures,this._maxTileCacheSize=w.maxTileCacheSize,this._failIfMajorPerformanceCaveat=w.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=w.preserveDrawingBuffer,this._antialias=w.antialias,this._trackResize=w.trackResize,this._bearingSnap=w.bearingSnap,this._refreshExpiredTiles=w.refreshExpiredTiles,this._fadeDuration=w.fadeDuration,this._crossSourceCollisions=w.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=w.collectResourceTiming,this._renderTaskQueue=new cy,this._controls=[],this._mapId=a.uniqueId(),this._locale=a.extend({},uy,w.locale),this._clickTolerance=w.clickTolerance,this._pixelRatio=(c=w.pixelRatio)!==null&&c!==void 0?c:devicePixelRatio,this._requestManager=new b(w.transformRequest),typeof w.container=="string"){if(this._container=document.getElementById(w.container),!this._container)throw new Error(`Container '${w.container}' not found.`)}else{if(!(w.container instanceof HTMLElement))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=w.container}if(w.maxBounds&&this.setMaxBounds(w.maxBounds),a.bindAll(["_onWindowOnline","_onWindowResize","_onMapScroll","_contextLost","_contextRestored"],this),this._setupContainer(),this._setupPainter(),this.painter===void 0)throw new Error("Failed to initialize WebGL.");this.on("move",()=>this._update(!1)),this.on("moveend",()=>this._update(!1)),this.on("zoom",()=>this._update(!0)),this.on("terrain",()=>{this.painter.terrainFacilitator.dirty=!0,this._update(!0)}),typeof window<"u"&&(addEventListener("online",this._onWindowOnline,!1),addEventListener("resize",this._onWindowResize,!1),addEventListener("orientationchange",this._onWindowResize,!1)),this.handlers=new ly(this,w),this._cooperativeGestures&&this._setupCooperativeGestures(),this._hash=w.hash&&new Yv(typeof w.hash=="string"&&w.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:w.center,zoom:w.zoom,bearing:w.bearing,pitch:w.pitch}),w.bounds&&(this.resize(),this.fitBounds(w.bounds,a.extend({},w.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=w.localIdeographFontFamily,w.style&&this.setStyle(w.style,{localIdeographFontFamily:w.localIdeographFontFamily}),w.attributionControl&&this.addControl(new Au({customAttribution:w.customAttribution})),w.maplibreLogo&&this.addControl(new lf,w.logoPosition),this.on("style.load",()=>{this.transform.unmodified&&this.jumpTo(this.style.stylesheet)}),this.on("data",m=>{this._update(m.dataType==="style"),this.fire(new a.Event(`${m.dataType}data`,m))}),this.on("dataloading",m=>{this.fire(new a.Event(`${m.dataType}dataloading`,m))}),this.on("dataabort",m=>{this.fire(new a.Event("sourcedataabort",m))})}_getMapId(){return this._mapId}addControl(w,c){if(c===void 0&&(c=w.getDefaultPosition?w.getDefaultPosition():"top-right"),!w||!w.onAdd)return this.fire(new a.ErrorEvent(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));const m=w.onAdd(this);this._controls.push(w);const x=this._controlPositions[c];return c.indexOf("bottom")!==-1?x.insertBefore(m,x.firstChild):x.appendChild(m),this}removeControl(w){if(!w||!w.onRemove)return this.fire(new a.ErrorEvent(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));const c=this._controls.indexOf(w);return c>-1&&this._controls.splice(c,1),w.onRemove(this),this}hasControl(w){return this._controls.indexOf(w)>-1}calculateCameraOptionsFromTo(w,c,m,x){return x==null&&this.style.terrain&&(x=this.transform.getElevation(m,this.style.terrain)),super.calculateCameraOptionsFromTo(w,c,m,x)}resize(w){const c=this._containerDimensions(),m=c[0],x=c[1];this._resizeCanvas(m,x,this.getPixelRatio()),this.transform.resize(m,x),this.painter.resize(m,x,this.getPixelRatio());const S=!this._moving;return S&&(this.stop(),this.fire(new a.Event("movestart",w)).fire(new a.Event("move",w))),this.fire(new a.Event("resize",w)),S&&this.fire(new a.Event("moveend",w)),this}getPixelRatio(){return this._pixelRatio}setPixelRatio(w){const[c,m]=this._containerDimensions();this._pixelRatio=w,this._resizeCanvas(c,m,w),this.painter.resize(c,m,w)}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(w){return this.transform.setMaxBounds(a.LngLatBounds.convert(w)),this._update()}setMinZoom(w){if((w=w==null?-2:w)>=-2&&w<=this.transform.maxZoom)return this.transform.minZoom=w,this._update(),this.getZoom()<w&&this.setZoom(w),this;throw new Error("minZoom must be between -2 and the current maxZoom, inclusive")}getMinZoom(){return this.transform.minZoom}setMaxZoom(w){if((w=w==null?22:w)>=this.transform.minZoom)return this.transform.maxZoom=w,this._update(),this.getZoom()>w&&this.setZoom(w),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(w){if((w=w==null?0:w)<0)throw new Error("minPitch must be greater than or equal to 0");if(w>=0&&w<=this.transform.maxPitch)return this.transform.minPitch=w,this._update(),this.getPitch()<w&&this.setPitch(w),this;throw new Error("minPitch must be between 0 and the current maxPitch, inclusive")}getMinPitch(){return this.transform.minPitch}setMaxPitch(w){if((w=w==null?60:w)>85)throw new Error("maxPitch must be less than or equal to 85");if(w>=this.transform.minPitch)return this.transform.maxPitch=w,this._update(),this.getPitch()>w&&this.setPitch(w),this;throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(w){return this.transform.renderWorldCopies=w,this._update()}project(w){return this.transform.locationPoint(a.LngLat.convert(w),this.style&&this.style.terrain)}unproject(w){return this.transform.pointLocation(a.pointGeometry.convert(w),this.style&&this.style.terrain)}isMoving(){return this._moving||this.handlers.isMoving()}isZooming(){return this._zooming||this.handlers.isZooming()}isRotating(){return this._rotating||this.handlers.isRotating()}_createDelegatedListener(w,c,m){if(w==="mouseenter"||w==="mouseover"){let x=!1;return{layer:c,listener:m,delegates:{mousemove:R=>{const L=this.getLayer(c)?this.queryRenderedFeatures(R.point,{layers:[c]}):[];L.length?x||(x=!0,m.call(this,new Ro(w,this,R.originalEvent,{features:L}))):x=!1},mouseout:()=>{x=!1}}}}if(w==="mouseleave"||w==="mouseout"){let x=!1;return{layer:c,listener:m,delegates:{mousemove:L=>{(this.getLayer(c)?this.queryRenderedFeatures(L.point,{layers:[c]}):[]).length?x=!0:x&&(x=!1,m.call(this,new Ro(w,this,L.originalEvent)))},mouseout:L=>{x&&(x=!1,m.call(this,new Ro(w,this,L.originalEvent)))}}}}{const x=S=>{const R=this.getLayer(c)?this.queryRenderedFeatures(S.point,{layers:[c]}):[];R.length&&(S.features=R,m.call(this,S),delete S.features)};return{layer:c,listener:m,delegates:{[w]:x}}}}on(w,c,m){if(m===void 0)return super.on(w,c);const x=this._createDelegatedListener(w,c,m);this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[w]=this._delegatedListeners[w]||[],this._delegatedListeners[w].push(x);for(const S in x.delegates)this.on(S,x.delegates[S]);return this}once(w,c,m){if(m===void 0)return super.once(w,c);const x=this._createDelegatedListener(w,c,m);for(const S in x.delegates)this.once(S,x.delegates[S]);return this}off(w,c,m){return m===void 0?super.off(w,c):(this._delegatedListeners&&this._delegatedListeners[w]&&(x=>{const S=this._delegatedListeners[w];for(let R=0;R<S.length;R++){const L=S[R];if(L.layer===c&&L.listener===m){for(const V in L.delegates)this.off(V,L.delegates[V]);return S.splice(R,1),this}}})(),this)}queryRenderedFeatures(w,c){if(!this.style)return[];let m;if(c!==void 0||w===void 0||w instanceof a.pointGeometry||Array.isArray(w)||(c=w,w=void 0),c=c||{},(w=w||[[0,0],[this.transform.width,this.transform.height]])instanceof a.pointGeometry||typeof w[0]=="number")m=[a.pointGeometry.convert(w)];else{const x=a.pointGeometry.convert(w[0]),S=a.pointGeometry.convert(w[1]);m=[x,new a.pointGeometry(S.x,x.y),S,new a.pointGeometry(x.x,S.y),x]}return this.style.queryRenderedFeatures(m,c,this.transform)}querySourceFeatures(w,c){return this.style.querySourceFeatures(w,c)}setStyle(w,c){return(c=a.extend({},{localIdeographFontFamily:this._localIdeographFontFamily},c)).diff!==!1&&c.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&w?(this._diffStyle(w,c),this):(this._localIdeographFontFamily=c.localIdeographFontFamily,this._updateStyle(w,c))}setTransformRequest(w){return this._requestManager.setTransformRequest(w),this}_getUIString(w){const c=this._locale[w];if(c==null)throw new Error(`Missing UI string '${w}'`);return c}_updateStyle(w,c){return this.style&&(this.style.setEventedParent(null),this.style._remove()),w?(this.style=new zr(this,c||{}),this.style.setEventedParent(this,{style:this.style}),typeof w=="string"?this.style.loadURL(w):this.style.loadJSON(w),this):(delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new zr(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(w,c){if(typeof w=="string"){const m=this._requestManager.transformRequest(w,a.ResourceType.Style);a.getJSON(m,(x,S)=>{x?this.fire(new a.ErrorEvent(x)):S&&this._updateDiff(S,c)})}else typeof w=="object"&&this._updateDiff(w,c)}_updateDiff(w,c){try{this.style.setState(w)&&this._update(!0)}catch(m){a.warnOnce(`Unable to perform style diff: ${m.message||m.error||m}. Rebuilding the style from scratch.`),this._updateStyle(w,c)}}getStyle(){if(this.style)return this.style.serialize()}isStyleLoaded(){return this.style?this.style.loaded():a.warnOnce("There is no style added to the map.")}addSource(w,c){return this._lazyInitEmptyStyle(),this.style.addSource(w,c),this._update(!0)}isSourceLoaded(w){const c=this.style&&this.style.sourceCaches[w];if(c!==void 0)return c.loaded();this.fire(new a.ErrorEvent(new Error(`There is no source with ID '${w}'`)))}setTerrain(w){return this.style.setTerrain(w),this}getTerrain(){return this.style.terrain&&this.style.terrain.options}areTilesLoaded(){const w=this.style&&this.style.sourceCaches;for(const c in w){const m=w[c]._tiles;for(const x in m){const S=m[x];if(S.state!=="loaded"&&S.state!=="errored")return!1}}return!0}addSourceType(w,c,m){return this._lazyInitEmptyStyle(),this.style.addSourceType(w,c,m)}removeSource(w){return this.style.removeSource(w),this._update(!0)}getSource(w){return this.style.getSource(w)}addImage(w,c,{pixelRatio:m=1,sdf:x=!1,stretchX:S,stretchY:R,content:L}={}){if(this._lazyInitEmptyStyle(),c instanceof HTMLImageElement||a.isImageBitmap(c)){const{width:V,height:H,data:G}=a.exported.getImageData(c);this.style.addImage(w,{data:new a.RGBAImage({width:V,height:H},G),pixelRatio:m,stretchX:S,stretchY:R,content:L,sdf:x,version:0})}else{if(c.width===void 0||c.height===void 0)return this.fire(new a.ErrorEvent(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));{const{width:V,height:H,data:G}=c,ne=c;this.style.addImage(w,{data:new a.RGBAImage({width:V,height:H},new Uint8Array(G)),pixelRatio:m,stretchX:S,stretchY:R,content:L,sdf:x,version:0,userImage:ne}),ne.onAdd&&ne.onAdd(this,w)}}}updateImage(w,c){const m=this.style.getImage(w);if(!m)return this.fire(new a.ErrorEvent(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));const x=c instanceof HTMLImageElement||a.isImageBitmap(c)?a.exported.getImageData(c):c,{width:S,height:R,data:L}=x;if(S===void 0||R===void 0)return this.fire(new a.ErrorEvent(new Error("Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));if(S!==m.data.width||R!==m.data.height)return this.fire(new a.ErrorEvent(new Error("The width and height of the updated image must be that same as the previous version of the image")));const V=!(c instanceof HTMLImageElement||a.isImageBitmap(c));m.data.replace(L,V),this.style.updateImage(w,m)}hasImage(w){return w?!!this.style.getImage(w):(this.fire(new a.ErrorEvent(new Error("Missing required image id"))),!1)}removeImage(w){this.style.removeImage(w)}loadImage(w,c){a.getImage(this._requestManager.transformRequest(w,a.ResourceType.Image),c)}listImages(){return this.style.listImages()}addLayer(w,c){return this._lazyInitEmptyStyle(),this.style.addLayer(w,c),this._update(!0)}moveLayer(w,c){return this.style.moveLayer(w,c),this._update(!0)}removeLayer(w){return this.style.removeLayer(w),this._update(!0)}getLayer(w){return this.style.getLayer(w)}setLayerZoomRange(w,c,m){return this.style.setLayerZoomRange(w,c,m),this._update(!0)}setFilter(w,c,m={}){return this.style.setFilter(w,c,m),this._update(!0)}getFilter(w){return this.style.getFilter(w)}setPaintProperty(w,c,m,x={}){return this.style.setPaintProperty(w,c,m,x),this._update(!0)}getPaintProperty(w,c){return this.style.getPaintProperty(w,c)}setLayoutProperty(w,c,m,x={}){return this.style.setLayoutProperty(w,c,m,x),this._update(!0)}getLayoutProperty(w,c){return this.style.getLayoutProperty(w,c)}setLight(w,c={}){return this._lazyInitEmptyStyle(),this.style.setLight(w,c),this._update(!0)}getLight(){return this.style.getLight()}setFeatureState(w,c){return this.style.setFeatureState(w,c),this._update()}removeFeatureState(w,c){return this.style.removeFeatureState(w,c),this._update()}getFeatureState(w){return this.style.getFeatureState(w)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let w=0,c=0;return this._container&&(w=this._container.clientWidth||400,c=this._container.clientHeight||300),[w,c]}_setupContainer(){const w=this._container;w.classList.add("maplibregl-map","mapboxgl-map");const c=this._canvasContainer=v.create("div","maplibregl-canvas-container mapboxgl-canvas-container",w);this._interactive&&c.classList.add("maplibregl-interactive","mapboxgl-interactive"),this._canvas=v.create("canvas","maplibregl-canvas mapboxgl-canvas",c),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex","0"),this._canvas.setAttribute("aria-label","Map"),this._canvas.setAttribute("role","region");const m=this._containerDimensions();this._resizeCanvas(m[0],m[1],this.getPixelRatio());const x=this._controlContainer=v.create("div","maplibregl-control-container mapboxgl-control-container",w),S=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(R=>{S[R]=v.create("div",`maplibregl-ctrl-${R} mapboxgl-ctrl-${R}`,x)}),this._container.addEventListener("scroll",this._onMapScroll,!1)}_setupCooperativeGestures(){const w=this._container;this._metaPress=!1,this._cooperativeGesturesScreen=v.create("div","maplibregl-cooperative-gesture-screen",w);let c="Control",m=typeof this._cooperativeGestures!="boolean"&&this._cooperativeGestures.windowsHelpText?this._cooperativeGestures.windowsHelpText:"Use Ctrl + scroll to zoom the map";navigator.platform.indexOf("Mac")===0&&(m=typeof this._cooperativeGestures!="boolean"&&this._cooperativeGestures.macHelpText?this._cooperativeGestures.macHelpText:"Use \u2318 + scroll to zoom the map",c="Meta"),this._cooperativeGesturesScreen.innerHTML=`
<div class="maplibregl-desktop-message">${m}</div>
<div class="maplibregl-mobile-message">${typeof this._cooperativeGestures!="boolean"&&this._cooperativeGestures.mobileHelpText?this._cooperativeGestures.mobileHelpText:"Use two fingers to move the map"}</div>
`,document.addEventListener("keydown",x=>{x.key===c&&(this._metaPress=!0)}),document.addEventListener("keyup",x=>{x.key===c&&(this._metaPress=!1)}),this._canvasContainer.addEventListener("wheel",x=>{this._onCooperativeGesture(x,this._metaPress,1)},!1),this._canvasContainer.classList.remove("mapboxgl-touch-drag-pan","maplibregl-touch-drag-pan")}_resizeCanvas(w,c,m){this._canvas.width=m*w,this._canvas.height=m*c,this._canvas.style.width=`${w}px`,this._canvas.style.height=`${c}px`}_setupPainter(){const w=a.extend({},u.webGLContextAttributes,{failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1}),c=this._canvas.getContext("webgl",w)||this._canvas.getContext("experimental-webgl",w);c?(this.painter=new mp(c,this.transform),a.exported$1.testSupport(c)):this.fire(new a.ErrorEvent(new Error("Failed to initialize WebGL")))}_contextLost(w){w.preventDefault(),this._frame&&(this._frame.cancel(),this._frame=null),this.fire(new a.Event("webglcontextlost",{originalEvent:w}))}_contextRestored(w){this._setupPainter(),this.resize(),this._update(),this.fire(new a.Event("webglcontextrestored",{originalEvent:w}))}_onMapScroll(w){if(w.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1}_onCooperativeGesture(w,c,m){return!c&&m<2&&(this._cooperativeGesturesScreen.classList.add("maplibregl-show"),setTimeout(()=>{this._cooperativeGesturesScreen.classList.remove("maplibregl-show")},100)),!1}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(w){return this.style?(this._styleDirty=this._styleDirty||w,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(w){return this._update(),this._renderTaskQueue.add(w)}_cancelRenderFrame(w){this._renderTaskQueue.remove(w)}_render(w){let c,m=0;const x=this.painter.context.extTimerQuery;if(this.listens("gpu-timing-frame")&&(c=x.createQueryEXT(),x.beginQueryEXT(x.TIME_ELAPSED_EXT,c),m=a.exported.now()),this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(w),this._removed)return;let S=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;const L=this.transform.zoom,V=a.exported.now();this.style.zoomHistory.update(L,V);const H=new a.EvaluationParameters(L,{now:V,fadeDuration:this._fadeDuration,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),G=H.crossFadingFactor();G===1&&G===this._crossFadingFactor||(S=!0,this._crossFadingFactor=G),this.style.update(H)}if(this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this.style.terrain&&this.style.terrain.sourceCache.update(this.transform,this.style.terrain),this.transform.updateElevation(this.style.terrain),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,this._fadeDuration,this._crossSourceCollisions),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:this._fadeDuration,showPadding:this.showPadding,gpuTiming:!!this.listens("gpu-timing-layer")}),this.fire(new a.Event("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,a.PerformanceUtils.mark(a.PerformanceMarkers.load),this.fire(new a.Event("load"))),this.style&&(this.style.hasTransitions()||S)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles(),this.listens("gpu-timing-frame")){const L=a.exported.now()-m;x.endQueryEXT(x.TIME_ELAPSED_EXT,c),setTimeout(()=>{const V=x.getQueryObjectEXT(c,x.QUERY_RESULT_EXT)/1e6;x.deleteQueryEXT(c),this.fire(new a.Event("gpu-timing-frame",{cpuTime:L,gpuTime:V}))},50)}if(this.listens("gpu-timing-layer")){const L=this.painter.collectGpuTimers();setTimeout(()=>{const V=this.painter.queryGpuTimers(L);this.fire(new a.Event("gpu-timing-layer",{layerTimes:V}))},50)}const R=this._sourcesDirty||this._styleDirty||this._placementDirty;return R||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new a.Event("idle")),!this._loaded||this._fullyLoaded||R||(this._fullyLoaded=!0,a.PerformanceUtils.mark(a.PerformanceMarkers.fullLoad)),this}redraw(){return this.style&&(this._frame&&(this._frame.cancel(),this._frame=null),this._render(0)),this}remove(){this._hash&&this._hash.remove();for(const c of this._controls)c.onRemove(this);this._controls=[],this._frame&&(this._frame.cancel(),this._frame=null),this._renderTaskQueue.clear(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),typeof window<"u"&&(removeEventListener("resize",this._onWindowResize,!1),removeEventListener("orientationchange",this._onWindowResize,!1),removeEventListener("online",this._onWindowOnline,!1));const w=this.painter.context.gl.getExtension("WEBGL_lose_context");w&&w.loseContext(),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),v.remove(this._canvasContainer),v.remove(this._controlContainer),this._cooperativeGestures&&v.remove(this._cooperativeGesturesScreen),this._container.classList.remove("maplibregl-map","mapboxgl-map"),a.PerformanceUtils.clearMetrics(),this._removed=!0,this.fire(new a.Event("remove"))}triggerRepaint(){this.style&&!this._frame&&(this._frame=a.exported.frame(w=>{a.PerformanceUtils.frame(w),this._frame=null,this._render(w)}))}_onWindowOnline(){this._update()}_onWindowResize(w){this._trackResize&&this.resize({originalEvent:w})._update()}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(w){this._showTileBoundaries!==w&&(this._showTileBoundaries=w,this._update())}get showPadding(){return!!this._showPadding}set showPadding(w){this._showPadding!==w&&(this._showPadding=w,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(w){this._showCollisionBoxes!==w&&(this._showCollisionBoxes=w,w?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(w){this._showOverdrawInspector!==w&&(this._showOverdrawInspector=w,this._update())}get repaint(){return!!this._repaint}set repaint(w){this._repaint!==w&&(this._repaint=w,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(w){this._vertices=w,this._update()}_setCacheLimits(w,c){a.setCacheLimits(w,c)}get version(){return"2.4.0"}},NavigationControl:class{constructor(w){this.options=a.extend({},rw,w),this._container=v.create("div","maplibregl-ctrl maplibregl-ctrl-group mapboxgl-ctrl mapboxgl-ctrl-group"),this._container.addEventListener("contextmenu",c=>c.preventDefault()),this.options.showZoom&&(a.bindAll(["_setButtonTitle","_updateZoomButtons"],this),this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in mapboxgl-ctrl-zoom-in",c=>this._map.zoomIn({},{originalEvent:c})),v.create("span","maplibregl-ctrl-icon mapboxgl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out mapboxgl-ctrl-zoom-out",c=>this._map.zoomOut({},{originalEvent:c})),v.create("span","maplibregl-ctrl-icon mapboxgl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(a.bindAll(["_rotateCompassArrow"],this),this._compass=this._createButton("maplibregl-ctrl-compass mapboxgl-ctrl-compass",c=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:c}):this._map.resetNorth({},{originalEvent:c})}),this._compassIcon=v.create("span","maplibregl-ctrl-icon mapboxgl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}_updateZoomButtons(){const w=this._map.getZoom(),c=w===this._map.getMaxZoom(),m=w===this._map.getMinZoom();this._zoomInButton.disabled=c,this._zoomOutButton.disabled=m,this._zoomInButton.setAttribute("aria-disabled",c.toString()),this._zoomOutButton.setAttribute("aria-disabled",m.toString())}_rotateCompassArrow(){const w=this.options.visualizePitch?`scale(${1/Math.pow(Math.cos(this._map.transform.pitch*(Math.PI/180)),.5)}) rotateX(${this._map.transform.pitch}deg) rotateZ(${this._map.transform.angle*(180/Math.PI)}deg)`:`rotate(${this._map.transform.angle*(180/Math.PI)}deg)`;this._compassIcon.style.transform=w}onAdd(w){return this._map=w,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),this._map.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new Na(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){v.remove(this._container),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map}_createButton(w,c){const m=v.create("button",w,this._container);return m.type="button",m.addEventListener("click",c),m}_setButtonTitle(w,c){const m=this._map._getUIString(`NavigationControl.${c}`);w.title=m,w.setAttribute("aria-label",m)}},GeolocateControl:class extends a.Evented{constructor(w){super(),this.options=a.extend({},Ep,w),a.bindAll(["_onSuccess","_onError","_onZoom","_finish","_setupUI","_updateCamera","_updateMarker"],this)}onAdd(w){var c;return this._map=w,this._container=v.create("div","maplibregl-ctrl maplibregl-ctrl-group mapboxgl-ctrl mapboxgl-ctrl-group"),c=this._setupUI,Fs!==void 0?c(Fs):window.navigator.permissions!==void 0?window.navigator.permissions.query({name:"geolocation"}).then(m=>{Fs=m.state!=="denied",c(Fs)}):(Fs=!!window.navigator.geolocation,c(Fs)),this._container}onRemove(){this._geolocationWatchID!==void 0&&(window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),v.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,Fi=0,$s=!1}_isOutOfMapMaxBounds(w){const c=this._map.getMaxBounds(),m=w.coords;return c&&(m.longitude<c.getWest()||m.longitude>c.getEast()||m.latitude<c.getSouth()||m.latitude>c.getNorth())}_setErrorState(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active","mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error","mapboxgl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active","mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error","mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting","mapboxgl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background","mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background-error","mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting","mapboxgl-ctrl-geolocate-waiting");break;case"ACTIVE_ERROR":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}}_onSuccess(w){if(this._map){if(this._isOutOfMapMaxBounds(w))return this._setErrorState(),this.fire(new a.Event("outofmaxbounds",w)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=w,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting","mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error","mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active","mapboxgl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting","mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error","mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background","mapboxgl-ctrl-geolocate-background");break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(w),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(w),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale","mapboxgl-user-location-dot-stale"),this.fire(new a.Event("geolocate",w)),this._finish()}}_updateCamera(w){const c=new a.LngLat(w.coords.longitude,w.coords.latitude),m=w.coords.accuracy,x=this._map.getBearing(),S=a.extend({bearing:x},this.options.fitBoundsOptions);this._map.fitBounds(c.toBounds(m),S,{geolocateSource:!0})}_updateMarker(w){if(w){const c=new a.LngLat(w.coords.longitude,w.coords.latitude);this._accuracyCircleMarker.setLngLat(c).addTo(this._map),this._userLocationDotMarker.setLngLat(c).addTo(this._map),this._accuracy=w.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()}_updateCircleRadius(){const w=this._map._container.clientHeight/2,c=this._map.unproject([0,w]),m=this._map.unproject([1,w]),x=c.distanceTo(m),S=Math.ceil(2*this._accuracy/x);this._circleElement.style.width=`${S}px`,this._circleElement.style.height=`${S}px`}_onZoom(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}_onError(w){if(this._map){if(this.options.trackUserLocation)if(w.code===1){this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting","mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active","mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error","mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background","mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error","mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;const c=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=c,this._geolocateButton.setAttribute("aria-label",c),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(w.code===3&&$s)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale","mapboxgl-user-location-dot-stale"),this.fire(new a.Event("error",w)),this._finish()}}_finish(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0}_setupUI(w){if(this._container.addEventListener("contextmenu",c=>c.preventDefault()),this._geolocateButton=v.create("button","maplibregl-ctrl-geolocate mapboxgl-ctrl-geolocate",this._container),v.create("span","maplibregl-ctrl-icon mapboxgl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",w===!1){a.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled.");const c=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=c,this._geolocateButton.setAttribute("aria-label",c)}else{const c=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=c,this._geolocateButton.setAttribute("aria-label",c)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=v.create("div","maplibregl-user-location-dot mapboxgl-user-location-dot"),this._userLocationDotMarker=new fc(this._dotElement),this._circleElement=v.create("div","maplibregl-user-location-accuracy-circle mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new fc({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",c=>{c.geolocateSource||this._watchState!=="ACTIVE_LOCK"||c.originalEvent&&c.originalEvent.type==="resize"||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background","mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active","mapboxgl-ctrl-geolocate-active"),this.fire(new a.Event("trackuserlocationend")))})}trigger(){if(!this._setup)return a.warnOnce("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new a.Event("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Fi--,$s=!1,this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting","mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active","mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error","mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background","mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error","mapboxgl-ctrl-geolocate-background-error"),this.fire(new a.Event("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background","mapboxgl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new a.Event("trackuserlocationstart"));break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting","mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active","mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active","mapboxgl-ctrl-geolocate-active");break;case"OFF":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){let w;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting","mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),Fi++,Fi>1?(w={maximumAge:6e5,timeout:0},$s=!0):(w=this.options.positionOptions,$s=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,w)}}else window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0}_clearWatch(){window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting","mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)}},AttributionControl:Au,LogoControl:lf,ScaleControl:class{constructor(w){this.options=a.extend({},La,w),a.bindAll(["_onMove","setUnit"],this)}getDefaultPosition(){return"bottom-left"}_onMove(){fy(this._map,this._container,this.options)}onAdd(w){return this._map=w,this._container=v.create("div","maplibregl-ctrl maplibregl-ctrl-scale mapboxgl-ctrl mapboxgl-ctrl-scale",w.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){v.remove(this._container),this._map.off("move",this._onMove),this._map=void 0}setUnit(w){this.options.unit=w,fy(this._map,this._container,this.options)}},FullscreenControl:class{constructor(w){this._fullscreen=!1,w&&w.container&&(w.container instanceof HTMLElement?this._container=w.container:a.warnOnce("Full screen control 'container' must be a DOM element.")),a.bindAll(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in document&&(this._fullscreenchange="MSFullscreenChange")}onAdd(w){return this._map=w,this._container||(this._container=this._map.getContainer()),this._controlContainer=v.create("div","maplibregl-ctrl maplibregl-ctrl-group mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",a.warnOnce("This device does not support fullscreen mode.")),this._controlContainer}onRemove(){v.remove(this._controlContainer),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._changeIcon)}_checkFullscreenSupport(){return!!(document.fullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled)}_setupUI(){const w=this._fullscreenButton=v.create("button","maplibregl-ctrl-fullscreen mapboxgl-ctrl-fullscreen",this._controlContainer);v.create("span","maplibregl-ctrl-icon mapboxgl-ctrl-icon",w).setAttribute("aria-hidden","true"),w.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._changeIcon)}_updateTitle(){const w=this._getTitle();this._fullscreenButton.setAttribute("aria-label",w),this._fullscreenButton.title=w}_getTitle(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")}_isFullscreen(){return this._fullscreen}_changeIcon(){(window.document.fullscreenElement||window.document.mozFullScreenElement||window.document.webkitFullscreenElement||window.document.msFullscreenElement)===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("maplibregl-ctrl-shrink"),this._fullscreenButton.classList.toggle("mapboxgl-ctrl-shrink"),this._fullscreenButton.classList.toggle("maplibregl-ctrl-fullscreen"),this._fullscreenButton.classList.toggle("mapboxgl-ctrl-fullscreen"),this._updateTitle())}_onClickFullscreen(){this._isFullscreen()?window.document.exitFullscreen?window.document.exitFullscreen():window.document.mozCancelFullScreen?window.document.mozCancelFullScreen():window.document.msExitFullscreen?window.document.msExitFullscreen():window.document.webkitCancelFullScreen&&window.document.webkitCancelFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen&&this._container.webkitRequestFullscreen()}},TerrainControl:class{constructor(w){this.options=w,a.bindAll(["_toggleTerrain","_updateTerrainIcon"],this)}onAdd(w){return this._map=w,this._container=v.create("div","maplibregl-ctrl maplibregl-ctrl-group mapboxgl-ctrl mapboxgl-ctrl-group"),this._terrainButton=v.create("button","maplibregl-ctrl-terrain mapboxgl-ctrl-terrain",this._container),v.create("span","maplibregl-ctrl-icon mapboxgl-ctrl-icon",this._terrainButton).setAttribute("aria-hidden","true"),this._terrainButton.type="button",this._terrainButton.addEventListener("click",this._toggleTerrain),this._updateTerrainIcon(),this._map.on("terrain",this._updateTerrainIcon),this._container}onRemove(){v.remove(this._container),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}_toggleTerrain(){this._map.getTerrain()?this._map.setTerrain(null):this._map.setTerrain(this.options),this._updateTerrainIcon()}_updateTerrainIcon(){this._terrainButton.classList.remove("maplibregl-ctrl-terrain","mapboxgl-ctrl-terrain"),this._terrainButton.classList.remove("maplibregl-ctrl-terrain-enabled","mapboxgl-ctrl-terrain-enabled"),this._map.style.terrain?(this._terrainButton.classList.add("maplibregl-ctrl-terrain-enabled","mapboxgl-ctrl-terrain-enabled"),this._terrainButton.title=this._map._getUIString("TerrainControl.disableTerrain")):(this._terrainButton.classList.add("maplibregl-ctrl-terrain","mapboxgl-ctrl-terrain"),this._terrainButton.title=this._map._getUIString("TerrainControl.enableTerrain"))}},Popup:class extends a.Evented{constructor(w){super(),this.options=a.extend(Object.create(ni),w),a.bindAll(["_update","_onClose","remove","_onMouseMove","_onMouseUp","_onDrag"],this)}addTo(w){return this._map&&this.remove(),this._map=w,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),this._container&&this._container.classList.add("maplibregl-popup-track-pointer","mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer","mapboxgl-track-pointer")):this._map.on("move",this._update),this.fire(new a.Event("open")),this}isOpen(){return!!this._map}remove(){return this._content&&v.remove(this._content),this._container&&(v.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),delete this._map),this.fire(new a.Event("close")),this}getLngLat(){return this._lngLat}setLngLat(w){return this._lngLat=a.LngLat.convert(w),this._pos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("maplibregl-popup-track-pointer","mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.remove("maplibregl-track-pointer","mapboxgl-track-pointer")),this}trackPointer(){return this._trackPointer=!0,this._pos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._onMouseMove),this._map.on("drag",this._onDrag),this._container&&this._container.classList.add("maplibregl-popup-track-pointer","mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer","mapboxgl-track-pointer")),this}getElement(){return this._container}setText(w){return this.setDOMContent(document.createTextNode(w))}setHTML(w){const c=document.createDocumentFragment(),m=document.createElement("body");let x;for(m.innerHTML=w;x=m.firstChild,x;)c.appendChild(x);return this.setDOMContent(c)}getMaxWidth(){return this._container&&this._container.style.maxWidth}setMaxWidth(w){return this.options.maxWidth=w,this._update(),this}setDOMContent(w){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=v.create("div","maplibregl-popup-content mapboxgl-popup-content",this._container);return this._content.appendChild(w),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(w){this._container&&this._container.classList.add(w)}removeClassName(w){this._container&&this._container.classList.remove(w)}setOffset(w){return this.options.offset=w,this._update(),this}toggleClassName(w){if(this._container)return this._container.classList.toggle(w)}_createCloseButton(){this.options.closeButton&&(this._closeButton=v.create("button","maplibregl-popup-close-button mapboxgl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.setAttribute("aria-label","Close popup"),this._closeButton.innerHTML="&#215;",this._closeButton.addEventListener("click",this._onClose))}_onMouseUp(w){this._update(w.point)}_onMouseMove(w){this._update(w.point)}_onDrag(w){this._update(w.point)}_update(w){if(!this._map||!this._lngLat&&!this._trackPointer||!this._content||(this._container||(this._container=v.create("div","maplibregl-popup mapboxgl-popup",this._map.getContainer()),this._tip=v.create("div","maplibregl-popup-tip mapboxgl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className&&this.options.className.split(" ").forEach(R=>this._container.classList.add(R)),this._trackPointer&&this._container.classList.add("maplibregl-popup-track-pointer","mapboxgl-popup-track-pointer")),this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._map.transform.renderWorldCopies&&!this._trackPointer&&(this._lngLat=Nu(this._lngLat,this._pos,this._map.transform)),this._trackPointer&&!w))return;const c=this._pos=this._trackPointer&&w?w:this._map.project(this._lngLat);let m=this.options.anchor;const x=Pp(this.options.offset);if(!m){const R=this._container.offsetWidth,L=this._container.offsetHeight;let V;V=c.y+x.bottom.y<L?["top"]:c.y>this._map.transform.height-L?["bottom"]:[],c.x<R/2?V.push("left"):c.x>this._map.transform.width-R/2&&V.push("right"),m=V.length===0?"bottom":V.join("-")}const S=c.add(x[m]).round();v.setTransform(this._container,`${xn[m]} translate(${S.x}px,${S.y}px)`),Rn(this._container,m,"popup")}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;const w=this._container.querySelector(hi);w&&w.focus()}_onClose(){this.remove()}},Marker:fc,Style:zr,LngLat:a.LngLat,LngLatBounds:a.LngLatBounds,Point:a.pointGeometry,MercatorCoordinate:a.MercatorCoordinate,Evented:a.Evented,AJAXError:a.AJAXError,config:a.config,CanvasSource:Se,GeoJSONSource:se,ImageSource:he,RasterDEMTileSource:re,RasterTileSource:J,VectorTileSource:X,VideoSource:Ce,prewarm:function(){vt().acquire(Ot)},clearPrewarmedResources:function(){const w=ot;w&&(w.isPreloaded()&&w.numActive()===1?(w.release(Ot),ot=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 version(){return"2.4.0"},get workerCount(){return qe.workerCount},set workerCount(w){qe.workerCount=w},get maxParallelImageRequests(){return a.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(w){a.config.MAX_PARALLEL_IMAGE_REQUESTS=w},clearStorage(w){a.clearTileCache(w)},workerUrl:"",addProtocol(w,c){a.config.REGISTERED_PROTOCOLS[w]=c},removeProtocol(w){delete a.config.REGISTERED_PROTOCOLS[w]}};return Ko.extend(ml,{isSafari:a.isSafari,getPerformanceMetrics:a.PerformanceUtils.getPerformanceMetrics}),ml});var s=i;return s})})(F5);const Yq=F5.exports,Qq="modulepreload",Jq=function(e){return"/"+e},YO={},eZ=function(t,n,r){if(!n||n.length===0)return t();const i=document.getElementsByTagName("link");return Promise.all(n.map(o=>{if(o=Jq(o),o in YO)return;YO[o]=!0;const s=o.endsWith(".css"),a=s?'[rel="stylesheet"]':"";if(!!r)for(let p=i.length-1;p>=0;p--){const g=i[p];if(g.href===o&&(!s||g.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${o}"]${a}`))return;const f=document.createElement("link");if(f.rel=s?"stylesheet":Qq,s||(f.as="script",f.crossOrigin=""),f.href=o,document.head.appendChild(f),s)return new Promise((p,g)=>{f.addEventListener("load",p),f.addEventListener("error",()=>g(new Error(`Unable to preload CSS for ${o}`)))})})).then(()=>t())},FT=E.exports.createContext(null),tZ=e=>{const[t,n]=E.exports.useState({}),r=E.exports.useCallback((o,s="default")=>{n(a=>{if(s==="current")throw new Error("'current' cannot be used as map id");if(a[s])throw new Error(`Multiple maps with the same id: ${s}`);return{...a,[s]:o}})},[]),i=E.exports.useCallback((o="default")=>{n(s=>{if(s[o]){const a={...s};return delete a[o],a}return s})},[]);return A(FT.Provider,{value:{maps:t,onMapMount:r,onMapUnmount:i},children:e.children})};function B5(){var e;const t=(e=E.exports.useContext(FT))===null||e===void 0?void 0:e.maps,n=E.exports.useContext(zd);return E.exports.useMemo(()=>({...t,current:n==null?void 0:n.map}),[t,n])}function nZ(e){const t=e.clone();return t.pixelsToGLUnits=e.pixelsToGLUnits,t}function QO(e){return{longitude:e.center.lng,latitude:e.center.lat,zoom:e.zoom,pitch:e.pitch,bearing:e.bearing,padding:e.padding}}function JO(e,t){const n=t.viewState||t;let r=!1;if("longitude"in n&&"latitude"in n){const i=e.center;e.center=new i.constructor(n.longitude,n.latitude),r=r||i!==e.center}if("zoom"in n){const i=e.zoom;e.zoom=n.zoom,r=r||i!==e.zoom}if("bearing"in n){const i=e.bearing;e.bearing=n.bearing,r=r||i!==e.bearing}if("pitch"in n){const i=e.pitch;e.pitch=n.pitch,r=r||i!==e.pitch}return n.padding&&!e.isPaddingEqual(n.padding)&&(r=!0,e.padding=n.padding),r}const rZ=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function eD(e){if(!e)return null;if(typeof e=="string"||("toJS"in e&&(e=e.toJS()),!e.layers))return e;const t={};for(const r of e.layers)t[r.id]=r;const n=e.layers.map(r=>{const i=t[r.ref];let o=null;if("interactive"in r&&(o={...r},delete o.interactive),i){o=o||{...r},delete o.ref;for(const s of rZ)s in i&&(o[s]=i[s])}return o||r});return{...e,layers:n}}function iZ(e,t){const n=Array.isArray(e)?e[0]:e?e.x:0,r=Array.isArray(e)?e[1]:e?e.y:0,i=Array.isArray(t)?t[0]:t?t.x:0,o=Array.isArray(t)?t[1]:t?t.y:0;return n===i&&r===o}function Xa(e,t){if(e===t)return!0;if(!e||!t)return!1;if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!Xa(e[n],t[n]))return!1;return!0}else if(Array.isArray(t))return!1;if(typeof e=="object"&&typeof t=="object"){const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const i of n)if(!t.hasOwnProperty(i)||!Xa(e[i],t[i]))return!1;return!0}return!1}const tD={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"},gC={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"},nD={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"},oZ=["minZoom","maxZoom","minPitch","maxPitch","maxBounds","projection","renderWorldCopies"],aZ=["scrollZoom","boxZoom","dragRotate","dragPan","keyboard","doubleClickZoom","touchZoomRotate","touchPitch"];class hh{constructor(t,n,r){this._map=null,this._internalUpdate=!1,this._inRender=!1,this._hoveredFeatures=null,this._deferredEvents={move:!1,zoom:!1,pitch:!1,rotate:!1},this._onEvent=i=>{const o=this.props[nD[i.type]];o&&o(i)},this._onPointerEvent=i=>{(i.type==="mousemove"||i.type==="mouseout")&&this._updateHover(i);const o=this.props[tD[i.type]];if(o){if(this.props.interactiveLayerIds&&i.type!=="mouseover"&&i.type!=="mouseout"){const s=this._hoveredFeatures||this._map.queryRenderedFeatures(i.point,{layers:this.props.interactiveLayerIds});i.features=s}o(i),delete i.features}},this._onCameraEvent=i=>{if(!this._internalUpdate){const o=this.props[gC[i.type]];o&&o(i)}i.type in this._deferredEvents&&(this._deferredEvents[i.type]=!1)},this._MapClass=t,this.props=n,this._initialize(r)}get map(){return this._map}get transform(){return this._renderTransform}setProps(t){const n=this.props;this.props=t;const r=this._updateSettings(t,n);r&&this._createShadowTransform(this._map);const i=this._updateSize(t),o=this._updateViewState(t,!0);this._updateStyle(t,n),this._updateStyleComponents(t,n),this._updateHandlers(t,n),(r||i||o&&!this._map.isMoving())&&this.redraw()}static reuse(t,n){const r=hh.savedMaps.pop();if(!r)return null;const i=r.map,o=i.getContainer();for(n.className=o.className;o.childNodes.length>0;)n.appendChild(o.childNodes[0]);i._container=n,r.setProps({...t,styleDiffing:!1}),i.resize();const{initialViewState:s}=t;return s&&(s.bounds?i.fitBounds(s.bounds,{...s.fitBoundsOptions,duration:0}):r._updateViewState(s,!1)),i.isStyleLoaded()?i.fire("load"):i.once("styledata",()=>i.fire("load")),r}_initialize(t){const{props:n}=this,r={...n,...n.initialViewState,accessToken:n.mapboxAccessToken||sZ()||null,container:t,style:eD(n.mapStyle)},i=r.initialViewState||r.viewState||r;if(Object.assign(r,{center:[i.longitude||0,i.latitude||0],zoom:i.zoom||0,pitch:i.pitch||0,bearing:i.bearing||0}),n.gl){const f=HTMLCanvasElement.prototype.getContext;HTMLCanvasElement.prototype.getContext=()=>(HTMLCanvasElement.prototype.getContext=f,n.gl)}const o=new this._MapClass(r);i.padding&&o.setPadding(i.padding),n.cursor&&(o.getCanvas().style.cursor=n.cursor),this._createShadowTransform(o);const s=o._render;o._render=f=>{this._inRender=!0,s.call(o,f),this._inRender=!1};const a=o._renderTaskQueue.run;o._renderTaskQueue.run=f=>{a.call(o._renderTaskQueue,f),this._onBeforeRepaint()},o.on("render",()=>this._onAfterRepaint());const u=o.fire;o.fire=this._fireEvent.bind(this,u),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 f in tD)o.on(f,this._onPointerEvent);for(const f in gC)o.on(f,this._onCameraEvent);for(const f in nD)o.on(f,this._onEvent);this._map=o}recycle(){const n=this.map.getContainer().querySelector("[mapboxgl-children]");n==null||n.remove(),hh.savedMaps.push(this)}destroy(){this._map.remove()}redraw(){const t=this._map;!this._inRender&&t.style&&(t._frame&&(t._frame.cancel(),t._frame=null),t._render())}_createShadowTransform(t){const n=nZ(t.transform);t.painter.transform=n,this._renderTransform=n}_updateSize(t){const{viewState:n}=t;if(n){const r=this._map;if(n.width!==r.transform.width||n.height!==r.transform.height)return r.resize(),!0}return!1}_updateViewState(t,n){if(this._internalUpdate)return!1;const r=this._map,i=this._renderTransform,{zoom:o,pitch:s,bearing:a}=i,u=r.isMoving();u&&(i.cameraElevationReference="sea");const f=JO(i,{...QO(r.transform),...t});if(u&&(i.cameraElevationReference="ground"),f&&n){const p=this._deferredEvents;p.move=!0,p.zoom||(p.zoom=o!==i.zoom),p.rotate||(p.rotate=a!==i.bearing),p.pitch||(p.pitch=s!==i.pitch)}return u||JO(r.transform,t),f}_updateSettings(t,n){const r=this._map;let i=!1;for(const o of oZ)o in t&&!Xa(t[o],n[o])&&(i=!0,r[`set${o[0].toUpperCase()}${o.slice(1)}`](t[o]));return i}_updateStyle(t,n){if(t.cursor!==n.cursor&&(this._map.getCanvas().style.cursor=t.cursor),t.mapStyle!==n.mapStyle){const r={diff:t.styleDiffing};return"localIdeographFontFamily"in t&&(r.localIdeographFontFamily=t.localIdeographFontFamily),this._map.setStyle(eD(t.mapStyle),r),!0}return!1}_updateStyleComponents(t,n){const r=this._map;let i=!1;return r.style.loaded()&&("light"in t&&!Xa(t.light,n.light)&&(i=!0,r.setLight(t.light)),"fog"in t&&!Xa(t.fog,n.fog)&&(i=!0,r.setFog(t.fog)),"terrain"in t&&!Xa(t.terrain,n.terrain)&&(!t.terrain||r.getSource(t.terrain.source))&&(i=!0,r.setTerrain(t.terrain))),i}_updateHandlers(t,n){const r=this._map;let i=!1;for(const o of aZ){const s=t[o];Xa(s,n[o])||(i=!0,s?r[o].enable(s):r[o].disable())}return i}_updateHover(t){var n;const{props:r}=this;if(r.interactiveLayerIds&&(r.onMouseMove||r.onMouseEnter||r.onMouseLeave)){const o=t.type,s=((n=this._hoveredFeatures)===null||n===void 0?void 0:n.length)>0;let a;if(o==="mousemove")try{a=this._map.queryRenderedFeatures(t.point,{layers:r.interactiveLayerIds})}catch{a=[]}else a=[];const u=a.length>0;!u&&s&&(t.type="mouseleave",this._onPointerEvent(t)),this._hoveredFeatures=a,u&&!s&&(t.type="mouseenter",this._onPointerEvent(t)),t.type=o}else this._hoveredFeatures=null}_fireEvent(t,n,r){const i=this._map,o=i.transform,s=typeof n=="string"?n:n.type;return s==="move"&&this._updateViewState(this.props,!1),s in gC&&(typeof n=="object"&&(n.viewState=QO(o)),this._map.isMoving())?(i.transform=this._renderTransform,t.call(i,n,r),i.transform=o,i):(t.call(i,n,r),i)}_onBeforeRepaint(){const t=this._map;this._internalUpdate=!0;for(const r in this._deferredEvents)this._deferredEvents[r]&&t.fire(r);this._internalUpdate=!1;const n=this._map.transform;this._map.transform=this._renderTransform,this._onAfterRepaint=()=>{this._map.transform=n}}}hh.savedMaps=[];function sZ(){let e=null;if(typeof location<"u"){const t=/access_token=([^&\/]*)/.exec(location.search);e=t&&t[1]}try{e=e||{}.MapboxAccessToken}catch{}try{e=e||{}.REACT_APP_MAPBOX_ACCESS_TOKEN}catch{}return e}const lZ=["setMaxBounds","setMinZoom","setMaxZoom","setMinPitch","setMaxPitch","setRenderWorldCopies","setProjection","setStyle","addSource","removeSource","addLayer","removeLayer","setLayerZoomRange","setFilter","setPaintProperty","setLayoutProperty","setLight","setTerrain","setFog","remove"];function cZ(e,t){if(!e)return null;const n=e.map,r={getMap:()=>n,getCenter:()=>e.transform.center,getZoom:()=>e.transform.zoom,getBearing:()=>e.transform.bearing,getPitch:()=>e.transform.pitch,getPadding:()=>e.transform.padding,getBounds:()=>e.transform.getBounds(),project:i=>e.transform.locationPoint(t.LngLat.convert(i)),unproject:i=>e.transform.pointLocation(t.Point.convert(i)),queryTerrainElevation:(i,o)=>{const s=n.transform;n.transform=e.transform;const a=n.queryTerrainElevation(i,o);return n.transform=s,a}};for(const i of uZ(n))!(i in r)&&!lZ.includes(i)&&(r[i]=n[i].bind(n));return r}function uZ(e){const t=new Set;let n=e;for(;n;){for(const r of Object.getOwnPropertyNames(n))r[0]!=="_"&&typeof e[r]=="function"&&r!=="fire"&&r!=="setEventedParent"&&t.add(r);n=Object.getPrototypeOf(n)}return Array.from(t)}const dZ=typeof document<"u"?E.exports.useLayoutEffect:E.exports.useEffect,fZ=["baseApiUrl","maxParallelImageRequests","workerClass","workerCount","workerUrl"];function hZ(e,t){for(const n of fZ)n in t&&(e[n]=t[n]);t.RTLTextPlugin&&e.getRTLTextPluginStatus&&e.getRTLTextPluginStatus()==="unavailable"&&e.setRTLTextPlugin(t.RTLTextPlugin,n=>{n&&console.error(n)},!1)}const zd=E.exports.createContext(null),pZ={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:e=>console.error(e.error),RTLTextPlugin:"https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-rtl-text/v0.2.3/mapbox-gl-rtl-text.js"},$T=E.exports.forwardRef((e,t)=>{const n=E.exports.useContext(FT),[r,i]=E.exports.useState(null),o=E.exports.useRef(),{current:s}=E.exports.useRef({mapLib:null,map:null});E.exports.useEffect(()=>{const u=e.mapLib;let f=!0,p;return Promise.resolve(u||eZ(()=>import("./index.764e1a39.js").then(g=>g.i),[])).then(g=>{if(!!f){if(g.Map||(g=g.default),!g||!g.Map)throw new Error("Invalid mapLib");if(g.supported(e))hZ(g,e),e.reuseMaps&&(p=hh.reuse(e,o.current)),p||(p=new hh(g.Map,e,o.current)),s.map=cZ(p,g),s.mapLib=g,i(p),n==null||n.onMapMount(s.map,e.id);else throw new Error("Map is not supported by this browser")}}).catch(g=>{e.onError({type:"error",target:null,originalEvent:null,error:g})}),()=>{f=!1,p&&(n==null||n.onMapUnmount(e.id),e.reuseMaps?p.recycle():p.destroy())}},[]),dZ(()=>{r&&r.setProps(e)}),E.exports.useImperativeHandle(t,()=>s.map,[r]);const a=E.exports.useMemo(()=>({position:"relative",width:"100%",height:"100%",...e.style}),[e.style]);return A("div",{id:e.id,ref:o,style:a,children:r&&A(zd.Provider,{value:s,children:A("div",{"mapboxgl-children":"",children:e.children})})})});$T.displayName="Map";$T.defaultProps=pZ;const mZ=/box|flex|grid|column|lineHeight|fontWeight|opacity|order|tabSize|zIndex/;function Fd(e,t){if(!e||!t)return;const n=e.style;for(const r in t){const i=t[r];Number.isFinite(i)&&!mZ.test(r)?n[r]=`${i}px`:n[r]=i}}const gZ={draggable:!1,popup:null,rotation:0,rotationAlignment:"auto",pitchAlignment:"auto"};function V5(e){const{map:t,mapLib:n}=E.exports.useContext(zd),r=E.exports.useRef({props:e});r.current.props=e;const i=E.exports.useMemo(()=>{let o=!1;E.exports.Children.forEach(e.children,u=>{u&&(o=!0)});const s={...e,element:o?document.createElement("div"):null},a=new n.Marker(s).setLngLat([e.longitude,e.latitude]);return a.getElement().addEventListener("click",u=>{var f,p;(p=(f=r.current.props).onClick)===null||p===void 0||p.call(f,{type:"click",target:a,originalEvent:u})}),a.on("dragstart",u=>{var f,p;const g=u;g.lngLat=i.getLngLat(),(p=(f=r.current.props).onDragStart)===null||p===void 0||p.call(f,g)}),a.on("drag",u=>{var f,p;const g=u;g.lngLat=i.getLngLat(),(p=(f=r.current.props).onDrag)===null||p===void 0||p.call(f,g)}),a.on("dragend",u=>{var f,p;const g=u;g.lngLat=i.getLngLat(),(p=(f=r.current.props).onDragEnd)===null||p===void 0||p.call(f,g)}),a},[]);return E.exports.useEffect(()=>(i.addTo(t.getMap()),()=>{i.remove()}),[]),E.exports.useEffect(()=>{Fd(i.getElement(),e.style)},[e.style]),(i.getLngLat().lng!==e.longitude||i.getLngLat().lat!==e.latitude)&&i.setLngLat([e.longitude,e.latitude]),e.offset&&!iZ(i.getOffset(),e.offset)&&i.setOffset(e.offset),i.isDraggable()!==e.draggable&&i.setDraggable(e.draggable),i.getRotation()!==e.rotation&&i.setRotation(e.rotation),i.getRotationAlignment()!==e.rotationAlignment&&i.setRotationAlignment(e.rotationAlignment),i.getPitchAlignment()!==e.pitchAlignment&&i.setPitchAlignment(e.pitchAlignment),i.getPopup()!==e.popup&&i.setPopup(e.popup),al.exports.createPortal(e.children,i.getElement())}V5.defaultProps=gZ;E.exports.memo(V5);function rD(e){return new Set(e?e.trim().split(/\s+/):[])}function vZ(e){const{map:t,mapLib:n}=E.exports.useContext(zd),r=E.exports.useMemo(()=>document.createElement("div"),[]),i=E.exports.useRef({props:e});i.current.props=e;const o=E.exports.useMemo(()=>{const s={...e},a=new n.Popup(s).setLngLat([e.longitude,e.latitude]);return a.once("open",u=>{var f,p;(p=(f=i.current.props).onOpen)===null||p===void 0||p.call(f,u)}),a},[]);if(E.exports.useEffect(()=>{const s=a=>{var u,f;(f=(u=i.current.props).onClose)===null||f===void 0||f.call(u,a)};return o.on("close",s),o.setDOMContent(r).addTo(t.getMap()),()=>{o.off("close",s),o.isOpen()&&o.remove()}},[]),E.exports.useEffect(()=>{Fd(o.getElement(),e.style)},[e.style]),o.isOpen()&&((o.getLngLat().lng!==e.longitude||o.getLngLat().lat!==e.latitude)&&o.setLngLat([e.longitude,e.latitude]),e.offset&&!Xa(o.options.offset,e.offset)&&o.setOffset(e.offset),(o.options.anchor!==e.anchor||o.options.maxWidth!==e.maxWidth)&&(o.options.anchor=e.anchor,o.setMaxWidth(e.maxWidth)),o.options.className!==e.className)){const s=rD(o.options.className),a=rD(e.className);for(const u of s)a.has(u)||o.removeClassName(u);for(const u of a)s.has(u)||o.addClassName(u);o.options.className=e.className}return al.exports.createPortal(e.children,r)}const yZ=E.exports.memo(vZ);function Zg(e,t,n,r){const i=E.exports.useContext(zd),o=E.exports.useMemo(()=>e(i),[]);return E.exports.useEffect(()=>{const s=r||n||t,a=typeof t=="function"&&typeof n=="function"?t:null,u=typeof n=="function"?n:typeof t=="function"?t:null,{map:f}=i;return f.hasControl(o)||(f.addControl(o,s==null?void 0:s.position),a&&a(i)),()=>{u&&u(i),f.hasControl(o)&&f.removeControl(o)}},[]),o}function xZ(e){const t=Zg(({mapLib:n})=>new n.AttributionControl(e),{position:e.position});return E.exports.useEffect(()=>{Fd(t._container,e.style)},[e.style]),null}E.exports.memo(xZ);function bZ(e){const t=Zg(({mapLib:n})=>new n.FullscreenControl({container:e.containerId&&document.getElementById(e.containerId)}),{position:e.position});return E.exports.useEffect(()=>{Fd(t._controlContainer,e.style)},[e.style]),null}E.exports.memo(bZ);const U5=E.exports.forwardRef((e,t)=>{const n=E.exports.useRef({props:e}),r=Zg(({mapLib:i})=>{const o=new i.GeolocateControl(e),s=o._setupUI;return o._setupUI=a=>{o._container.hasChildNodes()||s(a)},o.on("geolocate",a=>{var u,f;(f=(u=n.current.props).onGeolocate)===null||f===void 0||f.call(u,a)}),o.on("error",a=>{var u,f;(f=(u=n.current.props).onError)===null||f===void 0||f.call(u,a)}),o.on("outofmaxbounds",a=>{var u,f;(f=(u=n.current.props).onOutOfMaxBounds)===null||f===void 0||f.call(u,a)}),o.on("trackuserlocationstart",a=>{var u,f;(f=(u=n.current.props).onTrackUserLocationStart)===null||f===void 0||f.call(u,a)}),o.on("trackuserlocationend",a=>{var u,f;(f=(u=n.current.props).onTrackUserLocationEnd)===null||f===void 0||f.call(u,a)}),o},{position:e.position});return n.current.props=e,E.exports.useImperativeHandle(t,()=>({trigger:()=>r.trigger()}),[]),E.exports.useEffect(()=>{Fd(r._container,e.style)},[e.style]),null});U5.displayName="GeolocateControl";E.exports.memo(U5);function _Z(e){const t=Zg(({mapLib:n})=>new n.NavigationControl(e),{position:e.position});return E.exports.useEffect(()=>{Fd(t._container,e.style)},[e.style]),null}E.exports.memo(_Z);const wZ={unit:"metric",maxWidth:100};function j5(e){const t=Zg(({mapLib:n})=>new n.ScaleControl(e),{position:e.position});return(t.options.unit!==e.unit||t.options.maxWidth!==e.maxWidth)&&(t.options.maxWidth=e.maxWidth,t.setUnit(e.unit)),E.exports.useEffect(()=>{Fd(t._container,e.style)},[e.style]),null}j5.defaultProps=wZ;E.exports.memo(j5);function J0(e,t){if(!e)throw new Error(t)}let CZ=0;function SZ(e,t,n){if(e.style&&e.style._loaded){const r={...n};return delete r.id,delete r.children,e.addSource(t,r),e.getSource(t)}return null}function EZ(e,t,n){J0(t.id===n.id,"source id changed"),J0(t.type===n.type,"source type changed");let r="",i=0;for(const s in t)s!=="children"&&s!=="id"&&!Xa(n[s],t[s])&&(r=s,i++);if(!i)return;const o=t.type;if(o==="geojson")e.setData(t.data);else if(o==="image")e.updateImage({url:t.url,coordinates:t.coordinates});else if((o==="canvas"||o==="video")&&i===1&&r==="coordinates")e.setCoordinates(t.coordinates);else if(o==="vector"&&"setUrl"in e)switch(r){case"url":e.setUrl(t.url);break;case"tiles":e.setTiles(t.tiles);break}else console.warn(`Unable to update <Source> prop: ${r}`)}function eb(e){const t=E.exports.useContext(zd).map.getMap(),n=E.exports.useRef(e),[,r]=E.exports.useState(0),i=E.exports.useMemo(()=>e.id||`jsx-source-${CZ++}`,[]);E.exports.useEffect(()=>{if(t){const s=()=>setTimeout(()=>r(a=>a+1),0);return t.on("styledata",s),s(),()=>{var a;if(t.off("styledata",s),t.style&&t.style._loaded&&t.getSource(i)){const u=(a=t.getStyle())===null||a===void 0?void 0:a.layers;if(u)for(const f of u)f.source===i&&t.removeLayer(f.id);t.removeSource(i)}}}},[t]);let o=t&&t.style&&t.getSource(i);return o?EZ(o,e,n.current):o=SZ(t,i,e),n.current=e,o&&E.exports.Children.map(e.children,s=>s&&E.exports.cloneElement(s,{source:i}))||null}function PZ(e,t,n,r){if(J0(n.id===r.id,"layer id changed"),J0(n.type===r.type,"layer type changed"),n.type==="custom"||r.type==="custom")return;const{layout:i={},paint:o={},filter:s,minzoom:a,maxzoom:u,beforeId:f}=n;if(f!==r.beforeId&&e.moveLayer(t,f),i!==r.layout){const p=r.layout||{};for(const g in i)Xa(i[g],p[g])||e.setLayoutProperty(t,g,i[g]);for(const g in p)i.hasOwnProperty(g)||e.setLayoutProperty(t,g,void 0)}if(o!==r.paint){const p=r.paint||{};for(const g in o)Xa(o[g],p[g])||e.setPaintProperty(t,g,o[g]);for(const g in p)o.hasOwnProperty(g)||e.setPaintProperty(t,g,void 0)}Xa(s,r.filter)||e.setFilter(t,s),(a!==r.minzoom||u!==r.maxzoom)&&e.setLayerZoomRange(t,a,u)}function TZ(e,t,n){if(e.style&&e.style._loaded&&(!("source"in n)||e.getSource(n.source))){const r={...n,id:t};delete r.beforeId,e.addLayer(r,n.beforeId)}}let IZ=0;function ph(e){const t=E.exports.useContext(zd).map.getMap(),n=E.exports.useRef(e),[,r]=E.exports.useState(0),i=E.exports.useMemo(()=>e.id||`jsx-layer-${IZ++}`,[]);if(E.exports.useEffect(()=>{if(t){const s=()=>r(a=>a+1);return t.on("styledata",s),s(),()=>{t.off("styledata",s),t.style&&t.style._loaded&&t.getLayer(i)&&t.removeLayer(i)}}},[t]),t&&t.style&&t.getLayer(i))try{PZ(t,i,e,n.current)}catch(s){console.warn(s)}else TZ(t,i,e);return n.current=e,null}function kZ(){for(var e=0,t,n,r="";e<arguments.length;)(t=arguments[e++])&&(n=H5(t))&&(r&&(r+=" "),r+=n);return r}function H5(e){if(typeof e=="string")return e;for(var t,n="",r=0;r<e.length;r++)e[r]&&(t=H5(e[r]))&&(n&&(n+=" "),n+=t);return n}var BT="-";function MZ(e){var t=OZ(e);function n(i){var o=i.split(BT);return o[0]===""&&o.length!==1&&o.shift(),K5(o,t)||RZ(i)}function r(i){return e.conflictingClassGroups[i]||[]}return{getClassGroupId:n,getConflictingClassGroupIds:r}}function K5(e,t){var s;if(e.length===0)return t.classGroupId;var n=e[0],r=t.nextPart.get(n),i=r?K5(e.slice(1),r):void 0;if(i)return i;if(t.validators.length!==0){var o=e.join(BT);return(s=t.validators.find(function(a){var u=a.validator;return u(o)}))==null?void 0:s.classGroupId}}var iD=/^\[(.+)\]$/;function RZ(e){if(iD.test(e)){var t=iD.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}}function OZ(e){var t=e.theme,n=e.prefix,r={nextPart:new Map,validators:[]},i=AZ(Object.entries(e.classGroups),n);return i.forEach(function(o){var s=o[0],a=o[1];G2(a,r,s,t)}),r}function G2(e,t,n,r){e.forEach(function(i){if(typeof i=="string"){var o=i===""?t:oD(t,i);o.classGroupId=n;return}if(typeof i=="function"){if(DZ(i)){G2(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(function(s){var a=s[0],u=s[1];G2(u,oD(t,a),n,r)})})}function oD(e,t){var n=e;return t.split(BT).forEach(function(r){n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n}function DZ(e){return e.isThemeGetter}function AZ(e,t){return t?e.map(function(n){var r=n[0],i=n[1],o=i.map(function(s){return typeof s=="string"?t+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(function(a){var u=a[0],f=a[1];return[t+u,f]})):s});return[r,o]}):e}function NZ(e){if(e<1)return{get:function(){},set:function(){}};var t=0,n=new Map,r=new Map;function i(o,s){n.set(o,s),t++,t>e&&(t=0,r=n,n=new Map)}return{get:function(s){var a=n.get(s);if(a!==void 0)return a;if((a=r.get(s))!==void 0)return i(s,a),a},set:function(s,a){n.has(s)?n.set(s,a):i(s,a)}}}var W5="!";function LZ(e){var t=e.separator||":";return function(r){for(var i=0,o=[],s=0,a=0;a<r.length;a++){var u=r[a];i===0&&u===t[0]&&(t.length===1||r.slice(a,a+t.length)===t)&&(o.push(r.slice(s,a)),s=a+t.length),u==="["?i++:u==="]"&&i--}var f=o.length===0?r:r.substring(s),p=f.startsWith(W5),g=p?f.substring(1):f;return{modifiers:o,hasImportantModifier:p,baseClassName:g}}}function zZ(e){if(e.length<=1)return e;var t=[],n=[];return e.forEach(function(r){var i=r[0]==="[";i?(t.push.apply(t,n.sort().concat([r])),n=[]):n.push(r)}),t.push.apply(t,n.sort()),t}function FZ(e){return{cache:NZ(e.cacheSize),splitModifiers:LZ(e),...MZ(e)}}var $Z=/\s+/;function BZ(e,t){var n=t.splitModifiers,r=t.getClassGroupId,i=t.getConflictingClassGroupIds,o=new Set;return e.trim().split($Z).map(function(s){var a=n(s),u=a.modifiers,f=a.hasImportantModifier,p=a.baseClassName,g=r(p);if(!g)return{isTailwindClass:!1,originalClassName:s};var v=zZ(u).join(":"),b=f?v+W5:v;return{isTailwindClass:!0,modifierId:b,classGroupId:g,originalClassName:s}}).reverse().filter(function(s){if(!s.isTailwindClass)return!0;var a=s.modifierId,u=s.classGroupId,f=a+u;return o.has(f)?!1:(o.add(f),i(u).forEach(function(p){return o.add(a+p)}),!0)}).reverse().map(function(s){return s.originalClassName}).join(" ")}function VZ(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,i,o,s=a;function a(f){var p=t[0],g=t.slice(1),v=g.reduce(function(b,_){return _(b)},p());return r=FZ(v),i=r.cache.get,o=r.cache.set,s=u,u(f)}function u(f){var p=i(f);if(p)return p;var g=BZ(f,r);return o(f,g),g}return function(){return s(kZ.apply(null,arguments))}}function ii(e){var t=function(r){return r[e]||[]};return t.isThemeGetter=!0,t}var G5=/^\[(?:([a-z-]+):)?(.+)\]$/i,UZ=/^\d+\/\d+$/,jZ=new Set(["px","full","screen"]),HZ=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,KZ=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh)/,WZ=/^-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/;function xs(e){return Vm(e)||jZ.has(e)||UZ.test(e)||Yu(e)}function Yu(e){return $d(e,"length",YZ)}function GZ(e){return $d(e,"size",q5)}function qZ(e){return $d(e,"position",q5)}function ZZ(e){return $d(e,"url",QZ)}function vC(e){return $d(e,"number",Vm)}function Vm(e){return!Number.isNaN(Number(e))}function em(e){return aD(e)||$d(e,"number",aD)}function Oi(e){return G5.test(e)}function tm(){return!0}function bc(e){return HZ.test(e)}function XZ(e){return $d(e,"",JZ)}function $d(e,t,n){var r=G5.exec(e);return r?r[1]?r[1]===t:n(r[2]):!1}function YZ(e){return KZ.test(e)}function q5(){return!1}function QZ(e){return e.startsWith("url(")}function aD(e){return Number.isInteger(Number(e))}function JZ(e){return WZ.test(e)}function eX(){var e=ii("colors"),t=ii("spacing"),n=ii("blur"),r=ii("brightness"),i=ii("borderColor"),o=ii("borderRadius"),s=ii("borderSpacing"),a=ii("borderWidth"),u=ii("contrast"),f=ii("grayscale"),p=ii("hueRotate"),g=ii("invert"),v=ii("gap"),b=ii("gradientColorStops"),_=ii("inset"),T=ii("margin"),I=ii("opacity"),P=ii("padding"),M=ii("saturate"),D=ii("scale"),N=ii("sepia"),z=ii("skew"),$=ii("space"),j=ii("translate"),U=function(){return["auto","contain","none"]},q=function(){return["auto","hidden","clip","visible","scroll"]},Y=function(){return["auto",t]},te=function(){return["",xs]},Z=function(){return["auto",Vm,Oi]},X=function(){return["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"]},J=function(){return["solid","dashed","dotted","double","none"]},ue=function(){return["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter"]},re=function(){return["start","end","center","between","around","evenly"]},se=function(){return["","0",Oi]},oe=function(){return["auto","avoid","all","avoid-page","page","left","right","column"]},he=function(){return[Vm,vC]},Ce=function(){return[Vm,Oi]};return{cacheSize:500,theme:{colors:[tm],spacing:[xs],blur:["none","",bc,Yu],brightness:he(),borderColor:[e],borderRadius:["none","","full",bc,Yu],borderSpacing:[t],borderWidth:te(),contrast:he(),grayscale:se(),hueRotate:Ce(),invert:se(),gap:[t],gradientColorStops:[e],inset:Y(),margin:Y(),opacity:he(),padding:[t],saturate:he(),scale:he(),sepia:se(),skew:Ce(),space:[t],translate:[t]},classGroups:{aspect:[{aspect:["auto","square","video",Oi]}],container:["container"],columns:[{columns:[bc]}],"break-after":[{"break-after":oe()}],"break-before":[{"break-before":oe()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none"]}],clear:[{clear:["left","right","both","none"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[].concat(X(),[Oi])}],overflow:[{overflow:q()}],"overflow-x":[{"overflow-x":q()}],"overflow-y":[{"overflow-y":q()}],overscroll:[{overscroll:U()}],"overscroll-x":[{"overscroll-x":U()}],"overscroll-y":[{"overscroll-y":U()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[_]}],"inset-x":[{"inset-x":[_]}],"inset-y":[{"inset-y":[_]}],top:[{top:[_]}],right:[{right:[_]}],bottom:[{bottom:[_]}],left:[{left:[_]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",em]}],basis:[{basis:[t]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Oi]}],grow:[{grow:se()}],shrink:[{shrink:se()}],order:[{order:["first","last","none",em]}],"grid-cols":[{"grid-cols":[tm]}],"col-start-end":[{col:["auto",{span:[em]},Oi]}],"col-start":[{"col-start":Z()}],"col-end":[{"col-end":Z()}],"grid-rows":[{"grid-rows":[tm]}],"row-start-end":[{row:["auto",{span:[em]},Oi]}],"row-start":[{"row-start":Z()}],"row-end":[{"row-end":Z()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Oi]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Oi]}],gap:[{gap:[v]}],"gap-x":[{"gap-x":[v]}],"gap-y":[{"gap-y":[v]}],"justify-content":[{justify:re()}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:[].concat(re(),["baseline"])}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[].concat(re(),["baseline","stretch"])}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[P]}],px:[{px:[P]}],py:[{py:[P]}],pt:[{pt:[P]}],pr:[{pr:[P]}],pb:[{pb:[P]}],pl:[{pl:[P]}],m:[{m:[T]}],mx:[{mx:[T]}],my:[{my:[T]}],mt:[{mt:[T]}],mr:[{mr:[T]}],mb:[{mb:[T]}],ml:[{ml:[T]}],"space-x":[{"space-x":[$]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[$]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit",t]}],"min-w":[{"min-w":["min","max","fit",xs]}],"max-w":[{"max-w":["0","none","full","min","max","fit","prose",{screen:[bc]},bc,Yu]}],h:[{h:[t,"auto","min","max","fit"]}],"min-h":[{"min-h":["min","max","fit",xs]}],"max-h":[{"max-h":[t,"min","max","fit"]}],"font-size":[{text:["base",bc,Yu]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",vC]}],"font-family":[{font:[tm]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Yu]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",xs]}],"list-style-type":[{list:["none","disc","decimal",Oi]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[I]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[I]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[].concat(J(),["wavy"])}],"text-decoration-thickness":[{decoration:["auto","from-font",xs]}],"underline-offset":[{"underline-offset":["auto",xs]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],indent:[{indent:[t]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Yu]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap"]}],break:[{break:["normal","words","all","keep"]}],content:[{content:["none",Oi]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[I]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[].concat(X(),[qZ])}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",GZ]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},ZZ]}],"bg-color":[{bg:[e]}],"gradient-from":[{from:[b]}],"gradient-via":[{via:[b]}],"gradient-to":[{to:[b]}],rounded:[{rounded:[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[I]}],"border-style":[{border:[].concat(J(),["hidden"])}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[I]}],"divide-style":[{divide:J()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:[""].concat(J())}],"outline-offset":[{"outline-offset":[xs]}],"outline-w":[{outline:[xs]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:te()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[I]}],"ring-offset-w":[{"ring-offset":[xs]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",bc,XZ]}],"shadow-color":[{shadow:[tm]}],opacity:[{opacity:[I]}],"mix-blend":[{"mix-blend":ue()}],"bg-blend":[{"bg-blend":ue()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[u]}],"drop-shadow":[{"drop-shadow":["","none",bc,Oi]}],grayscale:[{grayscale:[f]}],"hue-rotate":[{"hue-rotate":[p]}],invert:[{invert:[g]}],saturate:[{saturate:[M]}],sepia:[{sepia:[N]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[u]}],"backdrop-grayscale":[{"backdrop-grayscale":[f]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[p]}],"backdrop-invert":[{"backdrop-invert":[g]}],"backdrop-opacity":[{"backdrop-opacity":[I]}],"backdrop-saturate":[{"backdrop-saturate":[M]}],"backdrop-sepia":[{"backdrop-sepia":[N]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Oi]}],duration:[{duration:Ce()}],ease:[{ease:["linear","in","out","in-out",Oi]}],delay:[{delay:Ce()}],animate:[{animate:["none","spin","ping","pulse","bounce",Oi]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[D]}],"scale-x":[{"scale-x":[D]}],"scale-y":[{"scale-y":[D]}],rotate:[{rotate:[em,Oi]}],"translate-x":[{"translate-x":[j]}],"translate-y":[{"translate-y":[j]}],"skew-x":[{"skew-x":[z]}],"skew-y":[{"skew-y":[z]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Oi]}],accent:[{accent:["auto",e]}],appearance:["appearance-none"],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Oi]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":[t]}],"scroll-mx":[{"scroll-mx":[t]}],"scroll-my":[{"scroll-my":[t]}],"scroll-mt":[{"scroll-mt":[t]}],"scroll-mr":[{"scroll-mr":[t]}],"scroll-mb":[{"scroll-mb":[t]}],"scroll-ml":[{"scroll-ml":[t]}],"scroll-p":[{"scroll-p":[t]}],"scroll-px":[{"scroll-px":[t]}],"scroll-py":[{"scroll-py":[t]}],"scroll-pt":[{"scroll-pt":[t]}],"scroll-pr":[{"scroll-pr":[t]}],"scroll-pb":[{"scroll-pb":[t]}],"scroll-pl":[{"scroll-pl":[t]}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","pinch-zoom","manipulation",{pan:["x","left","right","y","up","down"]}]}],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Oi]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[xs,vC]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],rounded:["rounded-t","rounded-r","rounded-b","rounded-l","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"]}}}var Td=VZ(eX);function Je(){return Je=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Je.apply(this,arguments)}function on(e){return on=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},on(e)}function tX(e,t){if(on(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(on(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Z5(e){var t=tX(e,"string");return on(t)==="symbol"?t:String(t)}function ae(e,t,n){return t=Z5(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function sD(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Z5(r.key),r)}}function Hr(e,t,n){return t&&sD(e.prototype,t),n&&sD(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function q2(e,t){return q2=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},q2(e,t)}function si(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&q2(e,t)}function tb(e){return tb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},tb(e)}function nX(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Fn(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function rX(e,t){if(t&&(on(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Fn(e)}function li(e){var t=nX();return function(){var r=tb(e),i;if(t){var o=tb(this).constructor;i=Reflect.construct(r,arguments,o)}else i=r.apply(this,arguments);return rX(this,i)}}var X5={exports:{}};/*!
Copyright (c) 2018 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],i=0;i<arguments.length;i++){var o=arguments[i];if(!!o){var s=typeof o;if(s==="string"||s==="number")r.push(o);else if(Array.isArray(o)){if(o.length){var a=n.apply(null,o);a&&r.push(a)}}else if(s==="object"){if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]")){r.push(o.toString());continue}for(var u in o)t.call(o,u)&&o[u]&&r.push(u)}}}return r.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(X5);const je=X5.exports;var w_={exports:{}},Or={};/** @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 oo=typeof Symbol=="function"&&Symbol.for,VT=oo?Symbol.for("react.element"):60103,UT=oo?Symbol.for("react.portal"):60106,C_=oo?Symbol.for("react.fragment"):60107,S_=oo?Symbol.for("react.strict_mode"):60108,E_=oo?Symbol.for("react.profiler"):60114,P_=oo?Symbol.for("react.provider"):60109,T_=oo?Symbol.for("react.context"):60110,jT=oo?Symbol.for("react.async_mode"):60111,I_=oo?Symbol.for("react.concurrent_mode"):60111,k_=oo?Symbol.for("react.forward_ref"):60112,M_=oo?Symbol.for("react.suspense"):60113,iX=oo?Symbol.for("react.suspense_list"):60120,R_=oo?Symbol.for("react.memo"):60115,O_=oo?Symbol.for("react.lazy"):60116,oX=oo?Symbol.for("react.block"):60121,aX=oo?Symbol.for("react.fundamental"):60117,sX=oo?Symbol.for("react.responder"):60118,lX=oo?Symbol.for("react.scope"):60119;function Da(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case VT:switch(e=e.type,e){case jT:case I_:case C_:case E_:case S_:case M_:return e;default:switch(e=e&&e.$$typeof,e){case T_:case k_:case O_:case R_:case P_:return e;default:return t}}case UT:return t}}}function Y5(e){return Da(e)===I_}Or.AsyncMode=jT;Or.ConcurrentMode=I_;Or.ContextConsumer=T_;Or.ContextProvider=P_;Or.Element=VT;Or.ForwardRef=k_;Or.Fragment=C_;Or.Lazy=O_;Or.Memo=R_;Or.Portal=UT;Or.Profiler=E_;Or.StrictMode=S_;Or.Suspense=M_;Or.isAsyncMode=function(e){return Y5(e)||Da(e)===jT};Or.isConcurrentMode=Y5;Or.isContextConsumer=function(e){return Da(e)===T_};Or.isContextProvider=function(e){return Da(e)===P_};Or.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===VT};Or.isForwardRef=function(e){return Da(e)===k_};Or.isFragment=function(e){return Da(e)===C_};Or.isLazy=function(e){return Da(e)===O_};Or.isMemo=function(e){return Da(e)===R_};Or.isPortal=function(e){return Da(e)===UT};Or.isProfiler=function(e){return Da(e)===E_};Or.isStrictMode=function(e){return Da(e)===S_};Or.isSuspense=function(e){return Da(e)===M_};Or.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===C_||e===I_||e===E_||e===S_||e===M_||e===iX||typeof e=="object"&&e!==null&&(e.$$typeof===O_||e.$$typeof===R_||e.$$typeof===P_||e.$$typeof===T_||e.$$typeof===k_||e.$$typeof===aX||e.$$typeof===sX||e.$$typeof===lX||e.$$typeof===oX)};Or.typeOf=Da;(function(e){e.exports=Or})(w_);function Po(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[];return Un.Children.forEach(e,function(r){r==null&&!t.keepEmpty||(Array.isArray(r)?n=n.concat(Po(r)):w_.exports.isFragment(r)&&r.props?n=n.concat(Po(r.props.children,t)):n.push(r))}),n}var lD={};function cX(e,t){}function uX(e,t,n){!t&&!lD[n]&&(e(!1,n),lD[n]=!0)}function Lr(e,t){uX(cX,e,t)}function cD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function me(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?cD(Object(n),!0).forEach(function(r){ae(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Xg(e,t,n){var r=E.exports.useRef({});return(!("value"in r.current)||n(r.current.condition,t))&&(r.current.value=e(),r.current.condition=t),r.current.value}function nb(e,t){typeof e=="function"?e(t):on(e)==="object"&&e&&"current"in e&&(e.current=t)}function Aa(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t.filter(function(i){return i});return r.length<=1?r[0]:function(i){t.forEach(function(o){nb(o,i)})}}function Q5(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Xg(function(){return Aa.apply(void 0,t)},t,function(r,i){return r.length===i.length&&r.every(function(o,s){return o===i[s]})})}function Nh(e){var t,n,r=w_.exports.isMemo(e)?e.type.type:e.type;return!(typeof r=="function"&&!((t=r.prototype)!==null&&t!==void 0&&t.render)||typeof e=="function"&&!((n=e.prototype)!==null&&n!==void 0&&n.render))}function xg(e){return e instanceof HTMLElement?e:e instanceof Un.Component?iu.findDOMNode(e):null}var J5=function(){if(typeof Map<"u")return Map;function e(t,n){var r=-1;return t.some(function(i,o){return i[0]===n?(r=o,!0):!1}),r}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(n){var r=e(this.__entries__,n),i=this.__entries__[r];return i&&i[1]},t.prototype.set=function(n,r){var i=e(this.__entries__,n);~i?this.__entries__[i][1]=r:this.__entries__.push([n,r])},t.prototype.delete=function(n){var r=this.__entries__,i=e(r,n);~i&&r.splice(i,1)},t.prototype.has=function(n){return!!~e(this.__entries__,n)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(n,r){r===void 0&&(r=null);for(var i=0,o=this.__entries__;i<o.length;i++){var s=o[i];n.call(r,s[1],s[0])}},t}()}(),Z2=typeof window<"u"&&typeof document<"u"&&window.document===document,rb=function(){return typeof global<"u"&&global.Math===Math?global:typeof self<"u"&&self.Math===Math?self:typeof window<"u"&&window.Math===Math?window:Function("return this")()}(),dX=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(rb):function(e){return setTimeout(function(){return e(Date.now())},1e3/60)}}(),fX=2;function hX(e,t){var n=!1,r=!1,i=0;function o(){n&&(n=!1,e()),r&&a()}function s(){dX(o)}function a(){var u=Date.now();if(n){if(u-i<fX)return;r=!0}else n=!0,r=!1,setTimeout(s,t);i=u}return a}var pX=20,mX=["top","right","bottom","left","width","height","size","weight"],gX=typeof MutationObserver<"u",vX=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=hX(this.refresh.bind(this),pX)}return e.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},e.prototype.removeObserver=function(t){var n=this.observers_,r=n.indexOf(t);~r&&n.splice(r,1),!n.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){var t=this.updateObservers_();t&&this.refresh()},e.prototype.updateObservers_=function(){var t=this.observers_.filter(function(n){return n.gatherActive(),n.hasActive()});return t.forEach(function(n){return n.broadcastActive()}),t.length>0},e.prototype.connect_=function(){!Z2||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),gX?(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)},e.prototype.disconnect_=function(){!Z2||!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)},e.prototype.onTransitionEnd_=function(t){var n=t.propertyName,r=n===void 0?"":n,i=mX.some(function(o){return!!~r.indexOf(o)});i&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),e6=function(e,t){for(var n=0,r=Object.keys(t);n<r.length;n++){var i=r[n];Object.defineProperty(e,i,{value:t[i],enumerable:!1,writable:!1,configurable:!0})}return e},mh=function(e){var t=e&&e.ownerDocument&&e.ownerDocument.defaultView;return t||rb},t6=D_(0,0,0,0);function ib(e){return parseFloat(e)||0}function uD(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce(function(r,i){var o=e["border-"+i+"-width"];return r+ib(o)},0)}function yX(e){for(var t=["top","right","bottom","left"],n={},r=0,i=t;r<i.length;r++){var o=i[r],s=e["padding-"+o];n[o]=ib(s)}return n}function xX(e){var t=e.getBBox();return D_(0,0,t.width,t.height)}function bX(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return t6;var r=mh(e).getComputedStyle(e),i=yX(r),o=i.left+i.right,s=i.top+i.bottom,a=ib(r.width),u=ib(r.height);if(r.boxSizing==="border-box"&&(Math.round(a+o)!==t&&(a-=uD(r,"left","right")+o),Math.round(u+s)!==n&&(u-=uD(r,"top","bottom")+s)),!wX(e)){var f=Math.round(a+o)-t,p=Math.round(u+s)-n;Math.abs(f)!==1&&(a-=f),Math.abs(p)!==1&&(u-=p)}return D_(i.left,i.top,a,u)}var _X=function(){return typeof SVGGraphicsElement<"u"?function(e){return e instanceof mh(e).SVGGraphicsElement}:function(e){return e instanceof mh(e).SVGElement&&typeof e.getBBox=="function"}}();function wX(e){return e===mh(e).document.documentElement}function CX(e){return Z2?_X(e)?xX(e):bX(e):t6}function SX(e){var t=e.x,n=e.y,r=e.width,i=e.height,o=typeof DOMRectReadOnly<"u"?DOMRectReadOnly:Object,s=Object.create(o.prototype);return e6(s,{x:t,y:n,width:r,height:i,top:n,right:t+r,bottom:i+n,left:t}),s}function D_(e,t,n,r){return{x:e,y:t,width:n,height:r}}var EX=function(){function e(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=D_(0,0,0,0),this.target=t}return e.prototype.isActive=function(){var t=CX(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t},e}(),PX=function(){function e(t,n){var r=SX(n);e6(this,{target:t,contentRect:r})}return e}(),TX=function(){function e(t,n,r){if(this.activeObservations_=[],this.observations_=new J5,typeof t!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=n,this.callbackCtx_=r}return e.prototype.observe=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(t instanceof mh(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(t)||(n.set(t,new EX(t)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(t instanceof mh(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;!n.has(t)||(n.delete(t),n.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach(function(n){n.isActive()&&t.activeObservations_.push(n)})},e.prototype.broadcastActive=function(){if(!!this.hasActive()){var t=this.callbackCtx_,n=this.activeObservations_.map(function(r){return new PX(r.target,r.broadcastRect())});this.callback_.call(t,n,t),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),n6=typeof WeakMap<"u"?new WeakMap:new J5,r6=function(){function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=vX.getInstance(),r=new TX(t,n,this);n6.set(this,r)}return e}();["observe","unobserve","disconnect"].forEach(function(e){r6.prototype[e]=function(){var t;return(t=n6.get(this))[e].apply(t,arguments)}});var i6=function(){return typeof rb.ResizeObserver<"u"?rb.ResizeObserver:r6}(),Ac=new Map;function IX(e){e.forEach(function(t){var n,r=t.target;(n=Ac.get(r))===null||n===void 0||n.forEach(function(i){return i(r)})})}var o6=new i6(IX);function kX(e,t){Ac.has(e)||(Ac.set(e,new Set),o6.observe(e)),Ac.get(e).add(t)}function MX(e,t){Ac.has(e)&&(Ac.get(e).delete(t),Ac.get(e).size||(o6.unobserve(e),Ac.delete(e)))}var RX=function(e){si(n,e);var t=li(n);function n(){return jr(this,n),t.apply(this,arguments)}return Hr(n,[{key:"render",value:function(){return this.props.children}}]),n}(E.exports.Component),X2=E.exports.createContext(null);function OX(e){var t=e.children,n=e.onBatchResize,r=E.exports.useRef(0),i=E.exports.useRef([]),o=E.exports.useContext(X2),s=E.exports.useCallback(function(a,u,f){r.current+=1;var p=r.current;i.current.push({size:a,element:u,data:f}),Promise.resolve().then(function(){p===r.current&&(n==null||n(i.current),i.current=[])}),o==null||o(a,u,f)},[n,o]);return A(X2.Provider,{value:s,children:t})}function DX(e,t){var n=e.children,r=e.disabled,i=E.exports.useRef(null),o=E.exports.useRef(null),s=E.exports.useContext(X2),a=typeof n=="function",u=a?n(i):n,f=E.exports.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),p=!a&&E.exports.isValidElement(u)&&Nh(u),g=p?u.ref:null,v=E.exports.useMemo(function(){return Aa(g,i)},[g,i]),b=function(){return xg(i.current)||xg(o.current)};E.exports.useImperativeHandle(t,function(){return b()});var _=E.exports.useRef(e);_.current=e;var T=E.exports.useCallback(function(I){var P=_.current,M=P.onResize,D=P.data,N=I.getBoundingClientRect(),z=N.width,$=N.height,j=I.offsetWidth,U=I.offsetHeight,q=Math.floor(z),Y=Math.floor($);if(f.current.width!==q||f.current.height!==Y||f.current.offsetWidth!==j||f.current.offsetHeight!==U){var te={width:q,height:Y,offsetWidth:j,offsetHeight:U};f.current=te;var Z=j===Math.round(z)?z:j,X=U===Math.round($)?$:U,J=me(me({},te),{},{offsetWidth:Z,offsetHeight:X});s==null||s(J,I,D),M&&Promise.resolve().then(function(){M(J,I)})}},[]);return E.exports.useEffect(function(){var I=b();return I&&!r&&kX(I,T),function(){return MX(I,T)}},[i.current,r]),A(RX,{ref:o,children:p?E.exports.cloneElement(u,{ref:v}):u})}var AX=E.exports.forwardRef(DX),NX="rc-observer-key";function LX(e,t){var n=e.children,r=typeof n=="function"?[n]:Po(n);return r.map(function(i,o){var s=(i==null?void 0:i.key)||"".concat(NX,"-").concat(o);return E.exports.createElement(AX,{...e,key:s,ref:o===0?t:void 0},i)})}var Ql=E.exports.forwardRef(LX);Ql.Collection=OX;function Gi(e,t){var n=me({},e);return Array.isArray(t)&&t.forEach(function(r){delete n[r]}),n}var zX=E.exports.createContext({});const HT=zX;function FX(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function kn(e,t){if(e==null)return{};var n=FX(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}function Y2(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function $X(e){if(Array.isArray(e))return Y2(e)}function a6(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function KT(e,t){if(!!e){if(typeof e=="string")return Y2(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Y2(e,t)}}function BX(){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 Mt(e){return $X(e)||a6(e)||KT(e)||BX()}var ud="RC_FORM_INTERNAL_HOOKS",Nr=function(){Lr(!1,"Can not find FormContext. Please make sure you wrap Field under Form.")},gh=E.exports.createContext({getFieldValue:Nr,getFieldsValue:Nr,getFieldError:Nr,getFieldWarning:Nr,getFieldsError:Nr,isFieldsTouched:Nr,isFieldTouched:Nr,isFieldValidating:Nr,isFieldsValidating:Nr,resetFields:Nr,setFields:Nr,setFieldValue:Nr,setFieldsValue:Nr,validateFields:Nr,submit:Nr,getInternalHooks:function(){return Nr(),{dispatch:Nr,initEntityValue:Nr,registerField:Nr,useSubscribe:Nr,setInitialValues:Nr,destroyForm:Nr,setCallbacks:Nr,registerWatch:Nr,getFields:Nr,setValidateMessages:Nr,setPreserve:Nr,getInitialValue:Nr}}});function Q2(e){return e==null?[]:Array.isArray(e)?e:[e]}function Hi(){Hi=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=Object.defineProperty||function(Z,X,J){Z[X]=J.value},i=typeof Symbol=="function"?Symbol:{},o=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",a=i.toStringTag||"@@toStringTag";function u(Z,X,J){return Object.defineProperty(Z,X,{value:J,enumerable:!0,configurable:!0,writable:!0}),Z[X]}try{u({},"")}catch{u=function(J,ue,re){return J[ue]=re}}function f(Z,X,J,ue){var re=X&&X.prototype instanceof v?X:v,se=Object.create(re.prototype),oe=new q(ue||[]);return r(se,"_invoke",{value:z(Z,J,oe)}),se}function p(Z,X,J){try{return{type:"normal",arg:Z.call(X,J)}}catch(ue){return{type:"throw",arg:ue}}}e.wrap=f;var g={};function v(){}function b(){}function _(){}var T={};u(T,o,function(){return this});var I=Object.getPrototypeOf,P=I&&I(I(Y([])));P&&P!==t&&n.call(P,o)&&(T=P);var M=_.prototype=v.prototype=Object.create(T);function D(Z){["next","throw","return"].forEach(function(X){u(Z,X,function(J){return this._invoke(X,J)})})}function N(Z,X){function J(re,se,oe,he){var Ce=p(Z[re],Z,se);if(Ce.type!=="throw"){var Se=Ce.arg,be=Se.value;return be&&on(be)=="object"&&n.call(be,"__await")?X.resolve(be.__await).then(function(Re){J("next",Re,oe,he)},function(Re){J("throw",Re,oe,he)}):X.resolve(be).then(function(Re){Se.value=Re,oe(Se)},function(Re){return J("throw",Re,oe,he)})}he(Ce.arg)}var ue;r(this,"_invoke",{value:function(se,oe){function he(){return new X(function(Ce,Se){J(se,oe,Ce,Se)})}return ue=ue?ue.then(he,he):he()}})}function z(Z,X,J){var ue="suspendedStart";return function(re,se){if(ue==="executing")throw new Error("Generator is already running");if(ue==="completed"){if(re==="throw")throw se;return te()}for(J.method=re,J.arg=se;;){var oe=J.delegate;if(oe){var he=$(oe,J);if(he){if(he===g)continue;return he}}if(J.method==="next")J.sent=J._sent=J.arg;else if(J.method==="throw"){if(ue==="suspendedStart")throw ue="completed",J.arg;J.dispatchException(J.arg)}else J.method==="return"&&J.abrupt("return",J.arg);ue="executing";var Ce=p(Z,X,J);if(Ce.type==="normal"){if(ue=J.done?"completed":"suspendedYield",Ce.arg===g)continue;return{value:Ce.arg,done:J.done}}Ce.type==="throw"&&(ue="completed",J.method="throw",J.arg=Ce.arg)}}}function $(Z,X){var J=X.method,ue=Z.iterator[J];if(ue===void 0)return X.delegate=null,J==="throw"&&Z.iterator.return&&(X.method="return",X.arg=void 0,$(Z,X),X.method==="throw")||J!=="return"&&(X.method="throw",X.arg=new TypeError("The iterator does not provide a '"+J+"' method")),g;var re=p(ue,Z.iterator,X.arg);if(re.type==="throw")return X.method="throw",X.arg=re.arg,X.delegate=null,g;var se=re.arg;return se?se.done?(X[Z.resultName]=se.value,X.next=Z.nextLoc,X.method!=="return"&&(X.method="next",X.arg=void 0),X.delegate=null,g):se:(X.method="throw",X.arg=new TypeError("iterator result is not an object"),X.delegate=null,g)}function j(Z){var X={tryLoc:Z[0]};1 in Z&&(X.catchLoc=Z[1]),2 in Z&&(X.finallyLoc=Z[2],X.afterLoc=Z[3]),this.tryEntries.push(X)}function U(Z){var X=Z.completion||{};X.type="normal",delete X.arg,Z.completion=X}function q(Z){this.tryEntries=[{tryLoc:"root"}],Z.forEach(j,this),this.reset(!0)}function Y(Z){if(Z){var X=Z[o];if(X)return X.call(Z);if(typeof Z.next=="function")return Z;if(!isNaN(Z.length)){var J=-1,ue=function re(){for(;++J<Z.length;)if(n.call(Z,J))return re.value=Z[J],re.done=!1,re;return re.value=void 0,re.done=!0,re};return ue.next=ue}}return{next:te}}function te(){return{value:void 0,done:!0}}return b.prototype=_,r(M,"constructor",{value:_,configurable:!0}),r(_,"constructor",{value:b,configurable:!0}),b.displayName=u(_,a,"GeneratorFunction"),e.isGeneratorFunction=function(Z){var X=typeof Z=="function"&&Z.constructor;return!!X&&(X===b||(X.displayName||X.name)==="GeneratorFunction")},e.mark=function(Z){return Object.setPrototypeOf?Object.setPrototypeOf(Z,_):(Z.__proto__=_,u(Z,a,"GeneratorFunction")),Z.prototype=Object.create(M),Z},e.awrap=function(Z){return{__await:Z}},D(N.prototype),u(N.prototype,s,function(){return this}),e.AsyncIterator=N,e.async=function(Z,X,J,ue,re){re===void 0&&(re=Promise);var se=new N(f(Z,X,J,ue),re);return e.isGeneratorFunction(X)?se:se.next().then(function(oe){return oe.done?oe.value:se.next()})},D(M),u(M,a,"Generator"),u(M,o,function(){return this}),u(M,"toString",function(){return"[object Generator]"}),e.keys=function(Z){var X=Object(Z),J=[];for(var ue in X)J.push(ue);return J.reverse(),function re(){for(;J.length;){var se=J.pop();if(se in X)return re.value=se,re.done=!1,re}return re.done=!0,re}},e.values=Y,q.prototype={constructor:q,reset:function(X){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(U),!X)for(var J in this)J.charAt(0)==="t"&&n.call(this,J)&&!isNaN(+J.slice(1))&&(this[J]=void 0)},stop:function(){this.done=!0;var X=this.tryEntries[0].completion;if(X.type==="throw")throw X.arg;return this.rval},dispatchException:function(X){if(this.done)throw X;var J=this;function ue(Se,be){return oe.type="throw",oe.arg=X,J.next=Se,be&&(J.method="next",J.arg=void 0),!!be}for(var re=this.tryEntries.length-1;re>=0;--re){var se=this.tryEntries[re],oe=se.completion;if(se.tryLoc==="root")return ue("end");if(se.tryLoc<=this.prev){var he=n.call(se,"catchLoc"),Ce=n.call(se,"finallyLoc");if(he&&Ce){if(this.prev<se.catchLoc)return ue(se.catchLoc,!0);if(this.prev<se.finallyLoc)return ue(se.finallyLoc)}else if(he){if(this.prev<se.catchLoc)return ue(se.catchLoc,!0)}else{if(!Ce)throw new Error("try statement without catch or finally");if(this.prev<se.finallyLoc)return ue(se.finallyLoc)}}}},abrupt:function(X,J){for(var ue=this.tryEntries.length-1;ue>=0;--ue){var re=this.tryEntries[ue];if(re.tryLoc<=this.prev&&n.call(re,"finallyLoc")&&this.prev<re.finallyLoc){var se=re;break}}se&&(X==="break"||X==="continue")&&se.tryLoc<=J&&J<=se.finallyLoc&&(se=null);var oe=se?se.completion:{};return oe.type=X,oe.arg=J,se?(this.method="next",this.next=se.finallyLoc,g):this.complete(oe)},complete:function(X,J){if(X.type==="throw")throw X.arg;return X.type==="break"||X.type==="continue"?this.next=X.arg:X.type==="return"?(this.rval=this.arg=X.arg,this.method="return",this.next="end"):X.type==="normal"&&J&&(this.next=J),g},finish:function(X){for(var J=this.tryEntries.length-1;J>=0;--J){var ue=this.tryEntries[J];if(ue.finallyLoc===X)return this.complete(ue.completion,ue.afterLoc),U(ue),g}},catch:function(X){for(var J=this.tryEntries.length-1;J>=0;--J){var ue=this.tryEntries[J];if(ue.tryLoc===X){var re=ue.completion;if(re.type==="throw"){var se=re.arg;U(ue)}return se}}throw new Error("illegal catch attempt")},delegateYield:function(X,J,ue){return this.delegate={iterator:Y(X),resultName:J,nextLoc:ue},this.method==="next"&&(this.arg=void 0),g}},e}function dD(e,t,n,r,i,o,s){try{var a=e[o](s),u=a.value}catch(f){n(f);return}a.done?t(u):Promise.resolve(u).then(r,i)}function du(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var o=e.apply(t,n);function s(u){dD(o,r,i,s,a,"next",u)}function a(u){dD(o,r,i,s,a,"throw",u)}s(void 0)})}}function dd(){return dd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},dd.apply(this,arguments)}function VX(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,bg(e,t)}function J2(e){return J2=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},J2(e)}function bg(e,t){return bg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},bg(e,t)}function UX(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function n0(e,t,n){return UX()?n0=Reflect.construct.bind():n0=function(i,o,s){var a=[null];a.push.apply(a,o);var u=Function.bind.apply(i,a),f=new u;return s&&bg(f,s.prototype),f},n0.apply(null,arguments)}function jX(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function eE(e){var t=typeof Map=="function"?new Map:void 0;return eE=function(r){if(r===null||!jX(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(typeof t<"u"){if(t.has(r))return t.get(r);t.set(r,i)}function i(){return n0(r,arguments,J2(this).constructor)}return i.prototype=Object.create(r.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),bg(i,r)},eE(e)}var HX=/%[sdj%]/g,KX=function(){};typeof process<"u"&&process.env;function tE(e){if(!e||!e.length)return null;var t={};return e.forEach(function(n){var r=n.field;t[r]=t[r]||[],t[r].push(n)}),t}function xa(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=0,o=n.length;if(typeof e=="function")return e.apply(null,n);if(typeof e=="string"){var s=e.replace(HX,function(a){if(a==="%%")return"%";if(i>=o)return a;switch(a){case"%s":return String(n[i++]);case"%d":return Number(n[i++]);case"%j":try{return JSON.stringify(n[i++])}catch{return"[Circular]"}break;default:return a}});return s}return e}function WX(e){return e==="string"||e==="url"||e==="hex"||e==="email"||e==="date"||e==="pattern"}function Ki(e,t){return!!(e==null||t==="array"&&Array.isArray(e)&&!e.length||WX(t)&&typeof e=="string"&&!e)}function GX(e,t,n){var r=[],i=0,o=e.length;function s(a){r.push.apply(r,a||[]),i++,i===o&&n(r)}e.forEach(function(a){t(a,s)})}function fD(e,t,n){var r=0,i=e.length;function o(s){if(s&&s.length){n(s);return}var a=r;r=r+1,a<i?t(e[a],o):n([])}o([])}function qX(e){var t=[];return Object.keys(e).forEach(function(n){t.push.apply(t,e[n]||[])}),t}var hD=function(e){VX(t,e);function t(n,r){var i;return i=e.call(this,"Async Validation Error")||this,i.errors=n,i.fields=r,i}return t}(eE(Error));function ZX(e,t,n,r,i){if(t.first){var o=new Promise(function(v,b){var _=function(P){return r(P),P.length?b(new hD(P,tE(P))):v(i)},T=qX(e);fD(T,n,_)});return o.catch(function(v){return v}),o}var s=t.firstFields===!0?Object.keys(e):t.firstFields||[],a=Object.keys(e),u=a.length,f=0,p=[],g=new Promise(function(v,b){var _=function(I){if(p.push.apply(p,I),f++,f===u)return r(p),p.length?b(new hD(p,tE(p))):v(i)};a.length||(r(p),v(i)),a.forEach(function(T){var I=e[T];s.indexOf(T)!==-1?fD(I,n,_):GX(I,n,_)})});return g.catch(function(v){return v}),g}function XX(e){return!!(e&&e.message!==void 0)}function YX(e,t){for(var n=e,r=0;r<t.length;r++){if(n==null)return n;n=n[t[r]]}return n}function pD(e,t){return function(n){var r;return e.fullFields?r=YX(t,e.fullFields):r=t[n.field||e.fullField],XX(n)?(n.field=n.field||e.fullField,n.fieldValue=r,n):{message:typeof n=="function"?n():n,fieldValue:r,field:n.field||e.fullField}}}function mD(e,t){if(t){for(var n in t)if(t.hasOwnProperty(n)){var r=t[n];typeof r=="object"&&typeof e[n]=="object"?e[n]=dd({},e[n],r):e[n]=r}}return e}var s6=function(t,n,r,i,o,s){t.required&&(!r.hasOwnProperty(t.field)||Ki(n,s||t.type))&&i.push(xa(o.messages.required,t.fullField))},QX=function(t,n,r,i,o){(/^\s+$/.test(n)||n==="")&&i.push(xa(o.messages.whitespace,t.fullField))},Jy,JX=function(){if(Jy)return Jy;var e="[a-fA-F\\d:]",t=function(N){return N&&N.includeBoundaries?"(?:(?<=\\s|^)(?="+e+")|(?<="+e+")(?=\\s|$))":""},n="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",r="[a-fA-F\\d]{1,4}",i=(`
(?:
(?:`+r+":){7}(?:"+r+`|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8
(?:`+r+":){6}(?:"+n+"|:"+r+`|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4
(?:`+r+":){5}(?::"+n+"|(?::"+r+`){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4
(?:`+r+":){4}(?:(?::"+r+"){0,1}:"+n+"|(?::"+r+`){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4
(?:`+r+":){3}(?:(?::"+r+"){0,2}:"+n+"|(?::"+r+`){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4
(?:`+r+":){2}(?:(?::"+r+"){0,3}:"+n+"|(?::"+r+`){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4
(?:`+r+":){1}(?:(?::"+r+"){0,4}:"+n+"|(?::"+r+`){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4
(?::(?:(?::`+r+"){0,5}:"+n+"|(?::"+r+`){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4
)(?:%[0-9a-zA-Z]{1,})? // %eth0 %1
`).replace(/\s*\/\/.*$/gm,"").replace(/\n/g,"").trim(),o=new RegExp("(?:^"+n+"$)|(?:^"+i+"$)"),s=new RegExp("^"+n+"$"),a=new RegExp("^"+i+"$"),u=function(N){return N&&N.exact?o:new RegExp("(?:"+t(N)+n+t(N)+")|(?:"+t(N)+i+t(N)+")","g")};u.v4=function(D){return D&&D.exact?s:new RegExp(""+t(D)+n+t(D),"g")},u.v6=function(D){return D&&D.exact?a:new RegExp(""+t(D)+i+t(D),"g")};var f="(?:(?:[a-z]+:)?//)",p="(?:\\S+(?::\\S*)?@)?",g=u.v4().source,v=u.v6().source,b="(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)",_="(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*",T="(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))",I="(?::\\d{2,5})?",P='(?:[/?#][^\\s"]*)?',M="(?:"+f+"|www\\.)"+p+"(?:localhost|"+g+"|"+v+"|"+b+_+T+")"+I+P;return Jy=new RegExp("(?:^"+M+"$)","i"),Jy},gD={email:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},Cm={integer:function(t){return Cm.number(t)&&parseInt(t,10)===t},float:function(t){return Cm.number(t)&&!Cm.integer(t)},array:function(t){return Array.isArray(t)},regexp:function(t){if(t instanceof RegExp)return!0;try{return!!new RegExp(t)}catch{return!1}},date:function(t){return typeof t.getTime=="function"&&typeof t.getMonth=="function"&&typeof t.getYear=="function"&&!isNaN(t.getTime())},number:function(t){return isNaN(t)?!1:typeof t=="number"},object:function(t){return typeof t=="object"&&!Cm.array(t)},method:function(t){return typeof t=="function"},email:function(t){return typeof t=="string"&&t.length<=320&&!!t.match(gD.email)},url:function(t){return typeof t=="string"&&t.length<=2048&&!!t.match(JX())},hex:function(t){return typeof t=="string"&&!!t.match(gD.hex)}},eY=function(t,n,r,i,o){if(t.required&&n===void 0){s6(t,n,r,i,o);return}var s=["integer","float","array","regexp","object","method","email","number","date","url","hex"],a=t.type;s.indexOf(a)>-1?Cm[a](n)||i.push(xa(o.messages.types[a],t.fullField,t.type)):a&&typeof n!==t.type&&i.push(xa(o.messages.types[a],t.fullField,t.type))},tY=function(t,n,r,i,o){var s=typeof t.len=="number",a=typeof t.min=="number",u=typeof t.max=="number",f=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,p=n,g=null,v=typeof n=="number",b=typeof n=="string",_=Array.isArray(n);if(v?g="number":b?g="string":_&&(g="array"),!g)return!1;_&&(p=n.length),b&&(p=n.replace(f,"_").length),s?p!==t.len&&i.push(xa(o.messages[g].len,t.fullField,t.len)):a&&!u&&p<t.min?i.push(xa(o.messages[g].min,t.fullField,t.min)):u&&!a&&p>t.max?i.push(xa(o.messages[g].max,t.fullField,t.max)):a&&u&&(p<t.min||p>t.max)&&i.push(xa(o.messages[g].range,t.fullField,t.min,t.max))},_f="enum",nY=function(t,n,r,i,o){t[_f]=Array.isArray(t[_f])?t[_f]:[],t[_f].indexOf(n)===-1&&i.push(xa(o.messages[_f],t.fullField,t[_f].join(", ")))},rY=function(t,n,r,i,o){if(t.pattern){if(t.pattern instanceof RegExp)t.pattern.lastIndex=0,t.pattern.test(n)||i.push(xa(o.messages.pattern.mismatch,t.fullField,n,t.pattern));else if(typeof t.pattern=="string"){var s=new RegExp(t.pattern);s.test(n)||i.push(xa(o.messages.pattern.mismatch,t.fullField,n,t.pattern))}}},lr={required:s6,whitespace:QX,type:eY,range:tY,enum:nY,pattern:rY},iY=function(t,n,r,i,o){var s=[],a=t.required||!t.required&&i.hasOwnProperty(t.field);if(a){if(Ki(n,"string")&&!t.required)return r();lr.required(t,n,i,s,o,"string"),Ki(n,"string")||(lr.type(t,n,i,s,o),lr.range(t,n,i,s,o),lr.pattern(t,n,i,s,o),t.whitespace===!0&&lr.whitespace(t,n,i,s,o))}r(s)},oY=function(t,n,r,i,o){var s=[],a=t.required||!t.required&&i.hasOwnProperty(t.field);if(a){if(Ki(n)&&!t.required)return r();lr.required(t,n,i,s,o),n!==void 0&&lr.type(t,n,i,s,o)}r(s)},aY=function(t,n,r,i,o){var s=[],a=t.required||!t.required&&i.hasOwnProperty(t.field);if(a){if(n===""&&(n=void 0),Ki(n)&&!t.required)return r();lr.required(t,n,i,s,o),n!==void 0&&(lr.type(t,n,i,s,o),lr.range(t,n,i,s,o))}r(s)},sY=function(t,n,r,i,o){var s=[],a=t.required||!t.required&&i.hasOwnProperty(t.field);if(a){if(Ki(n)&&!t.required)return r();lr.required(t,n,i,s,o),n!==void 0&&lr.type(t,n,i,s,o)}r(s)},lY=function(t,n,r,i,o){var s=[],a=t.required||!t.required&&i.hasOwnProperty(t.field);if(a){if(Ki(n)&&!t.required)return r();lr.required(t,n,i,s,o),Ki(n)||lr.type(t,n,i,s,o)}r(s)},cY=function(t,n,r,i,o){var s=[],a=t.required||!t.required&&i.hasOwnProperty(t.field);if(a){if(Ki(n)&&!t.required)return r();lr.required(t,n,i,s,o),n!==void 0&&(lr.type(t,n,i,s,o),lr.range(t,n,i,s,o))}r(s)},uY=function(t,n,r,i,o){var s=[],a=t.required||!t.required&&i.hasOwnProperty(t.field);if(a){if(Ki(n)&&!t.required)return r();lr.required(t,n,i,s,o),n!==void 0&&(lr.type(t,n,i,s,o),lr.range(t,n,i,s,o))}r(s)},dY=function(t,n,r,i,o){var s=[],a=t.required||!t.required&&i.hasOwnProperty(t.field);if(a){if(n==null&&!t.required)return r();lr.required(t,n,i,s,o,"array"),n!=null&&(lr.type(t,n,i,s,o),lr.range(t,n,i,s,o))}r(s)},fY=function(t,n,r,i,o){var s=[],a=t.required||!t.required&&i.hasOwnProperty(t.field);if(a){if(Ki(n)&&!t.required)return r();lr.required(t,n,i,s,o),n!==void 0&&lr.type(t,n,i,s,o)}r(s)},hY="enum",pY=function(t,n,r,i,o){var s=[],a=t.required||!t.required&&i.hasOwnProperty(t.field);if(a){if(Ki(n)&&!t.required)return r();lr.required(t,n,i,s,o),n!==void 0&&lr[hY](t,n,i,s,o)}r(s)},mY=function(t,n,r,i,o){var s=[],a=t.required||!t.required&&i.hasOwnProperty(t.field);if(a){if(Ki(n,"string")&&!t.required)return r();lr.required(t,n,i,s,o),Ki(n,"string")||lr.pattern(t,n,i,s,o)}r(s)},gY=function(t,n,r,i,o){var s=[],a=t.required||!t.required&&i.hasOwnProperty(t.field);if(a){if(Ki(n,"date")&&!t.required)return r();if(lr.required(t,n,i,s,o),!Ki(n,"date")){var u;n instanceof Date?u=n:u=new Date(n),lr.type(t,u,i,s,o),u&&lr.range(t,u.getTime(),i,s,o)}}r(s)},vY=function(t,n,r,i,o){var s=[],a=Array.isArray(n)?"array":typeof n;lr.required(t,n,i,s,o,a),r(s)},yC=function(t,n,r,i,o){var s=t.type,a=[],u=t.required||!t.required&&i.hasOwnProperty(t.field);if(u){if(Ki(n,s)&&!t.required)return r();lr.required(t,n,i,a,o,s),Ki(n,s)||lr.type(t,n,i,a,o)}r(a)},yY=function(t,n,r,i,o){var s=[],a=t.required||!t.required&&i.hasOwnProperty(t.field);if(a){if(Ki(n)&&!t.required)return r();lr.required(t,n,i,s,o)}r(s)},Um={string:iY,method:oY,number:aY,boolean:sY,regexp:lY,integer:cY,float:uY,array:dY,object:fY,enum:pY,pattern:mY,date:gY,url:yC,hex:yC,email:yC,required:vY,any:yY};function nE(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone:function(){var t=JSON.parse(JSON.stringify(this));return t.clone=this.clone,t}}}var rE=nE(),Yg=function(){function e(n){this.rules=null,this._messages=rE,this.define(n)}var t=e.prototype;return t.define=function(r){var i=this;if(!r)throw new Error("Cannot configure a schema with no rules");if(typeof r!="object"||Array.isArray(r))throw new Error("Rules must be an object");this.rules={},Object.keys(r).forEach(function(o){var s=r[o];i.rules[o]=Array.isArray(s)?s:[s]})},t.messages=function(r){return r&&(this._messages=mD(nE(),r)),this._messages},t.validate=function(r,i,o){var s=this;i===void 0&&(i={}),o===void 0&&(o=function(){});var a=r,u=i,f=o;if(typeof u=="function"&&(f=u,u={}),!this.rules||Object.keys(this.rules).length===0)return f&&f(null,a),Promise.resolve(a);function p(T){var I=[],P={};function M(N){if(Array.isArray(N)){var z;I=(z=I).concat.apply(z,N)}else I.push(N)}for(var D=0;D<T.length;D++)M(T[D]);I.length?(P=tE(I),f(I,P)):f(null,a)}if(u.messages){var g=this.messages();g===rE&&(g=nE()),mD(g,u.messages),u.messages=g}else u.messages=this.messages();var v={},b=u.keys||Object.keys(this.rules);b.forEach(function(T){var I=s.rules[T],P=a[T];I.forEach(function(M){var D=M;typeof D.transform=="function"&&(a===r&&(a=dd({},a)),P=a[T]=D.transform(P)),typeof D=="function"?D={validator:D}:D=dd({},D),D.validator=s.getValidationMethod(D),D.validator&&(D.field=T,D.fullField=D.fullField||T,D.type=s.getType(D),v[T]=v[T]||[],v[T].push({rule:D,value:P,source:a,field:T}))})});var _={};return ZX(v,u,function(T,I){var P=T.rule,M=(P.type==="object"||P.type==="array")&&(typeof P.fields=="object"||typeof P.defaultField=="object");M=M&&(P.required||!P.required&&T.value),P.field=T.field;function D($,j){return dd({},j,{fullField:P.fullField+"."+$,fullFields:P.fullFields?[].concat(P.fullFields,[$]):[$]})}function N($){$===void 0&&($=[]);var j=Array.isArray($)?$:[$];!u.suppressWarning&&j.length&&e.warning("async-validator:",j),j.length&&P.message!==void 0&&(j=[].concat(P.message));var U=j.map(pD(P,a));if(u.first&&U.length)return _[P.field]=1,I(U);if(!M)I(U);else{if(P.required&&!T.value)return P.message!==void 0?U=[].concat(P.message).map(pD(P,a)):u.error&&(U=[u.error(P,xa(u.messages.required,P.field))]),I(U);var q={};P.defaultField&&Object.keys(T.value).map(function(Z){q[Z]=P.defaultField}),q=dd({},q,T.rule.fields);var Y={};Object.keys(q).forEach(function(Z){var X=q[Z],J=Array.isArray(X)?X:[X];Y[Z]=J.map(D.bind(null,Z))});var te=new e(Y);te.messages(u.messages),T.rule.options&&(T.rule.options.messages=u.messages,T.rule.options.error=u.error),te.validate(T.value,T.rule.options||u,function(Z){var X=[];U&&U.length&&X.push.apply(X,U),Z&&Z.length&&X.push.apply(X,Z),I(X.length?X:null)})}}var z;if(P.asyncValidator)z=P.asyncValidator(P,T.value,N,T.source,u);else if(P.validator){try{z=P.validator(P,T.value,N,T.source,u)}catch($){console.error==null||console.error($),u.suppressValidatorError||setTimeout(function(){throw $},0),N($.message)}z===!0?N():z===!1?N(typeof P.message=="function"?P.message(P.fullField||P.field):P.message||(P.fullField||P.field)+" fails"):z instanceof Array?N(z):z instanceof Error&&N(z.message)}z&&z.then&&z.then(function(){return N()},function($){return N($)})},function(T){p(T)},a)},t.getType=function(r){if(r.type===void 0&&r.pattern instanceof RegExp&&(r.type="pattern"),typeof r.validator!="function"&&r.type&&!Um.hasOwnProperty(r.type))throw new Error(xa("Unknown rule type %s",r.type));return r.type||"string"},t.getValidationMethod=function(r){if(typeof r.validator=="function")return r.validator;var i=Object.keys(r),o=i.indexOf("message");return o!==-1&&i.splice(o,1),i.length===1&&i[0]==="required"?Um.required:Um[this.getType(r)]||void 0},e}();Yg.register=function(t,n){if(typeof n!="function")throw new Error("Cannot register a validator by type, validator is not a function");Um[t]=n};Yg.warning=KX;Yg.messages=rE;Yg.validators=Um;var ha="'${name}' is not a valid ${type}",l6={default:"Validation error on field '${name}'",required:"'${name}' is required",enum:"'${name}' must be one of [${enum}]",whitespace:"'${name}' cannot be empty",date:{format:"'${name}' is invalid for format date",parse:"'${name}' could not be parsed as date",invalid:"'${name}' is invalid date"},types:{string:ha,method:ha,array:ha,object:ha,number:ha,date:ha,boolean:ha,integer:ha,float:ha,regexp:ha,email:ha,url:ha,hex:ha},string:{len:"'${name}' must be exactly ${len} characters",min:"'${name}' must be at least ${min} characters",max:"'${name}' cannot be longer than ${max} characters",range:"'${name}' must be between ${min} and ${max} characters"},number:{len:"'${name}' must equal ${len}",min:"'${name}' cannot be less than ${min}",max:"'${name}' cannot be greater than ${max}",range:"'${name}' must be between ${min} and ${max}"},array:{len:"'${name}' must be exactly ${len} in length",min:"'${name}' cannot be less than ${min} in length",max:"'${name}' cannot be greater than ${max} in length",range:"'${name}' must be between ${min} and ${max} in length"},pattern:{mismatch:"'${name}' does not match pattern ${pattern}"}};function c6(e,t){for(var n=e,r=0;r<t.length;r+=1){if(n==null)return;n=n[t[r]]}return n}function u6(e){if(Array.isArray(e))return e}function d6(){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 WT(e){return u6(e)||a6(e)||KT(e)||d6()}function f6(e,t,n,r){if(!t.length)return n;var i=WT(t),o=i[0],s=i.slice(1),a;return!e&&typeof o=="number"?a=[]:Array.isArray(e)?a=Mt(e):a=me({},e),r&&n===void 0&&s.length===1?delete a[o][s[0]]:a[o]=f6(a[o],s,n,r),a}function xY(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return t.length&&r&&n===void 0&&!c6(e,t.slice(0,-1))?e:f6(e,t,n,r)}function A_(e){return Array.isArray(e)?_Y(e):on(e)==="object"&&e!==null?bY(e):e}function bY(e){if(Object.getPrototypeOf(e)===Object.prototype){var t={};for(var n in e)t[n]=A_(e[n]);return t}return e}function _Y(e){return e.map(function(t){return A_(t)})}function _i(e){return Q2(e)}function Nc(e,t){var n=c6(e,t);return n}function Sc(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,i=xY(e,t,n,r);return i}function vD(e,t){var n={};return t.forEach(function(r){var i=Nc(e,r);n=Sc(n,r,i)}),n}function jm(e,t){return e&&e.some(function(n){return p6(n,t)})}function yD(e){return on(e)==="object"&&e!==null&&Object.getPrototypeOf(e)===Object.prototype}function h6(e,t){var n=Array.isArray(e)?Mt(e):me({},e);return t&&Object.keys(t).forEach(function(r){var i=n[r],o=t[r],s=yD(i)&&yD(o);n[r]=s?h6(i,o||{}):A_(o)}),n}function r0(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return n.reduce(function(i,o){return h6(i,o)},e)}function p6(e,t){return!e||!t||e.length!==t.length?!1:e.every(function(n,r){return t[r]===n})}function wY(e,t){if(e===t)return!0;if(!e&&t||e&&!t||!e||!t||on(e)!=="object"||on(t)!=="object")return!1;var n=Object.keys(e),r=Object.keys(t),i=new Set([].concat(n,r));return Mt(i).every(function(o){var s=e[o],a=t[o];return typeof s=="function"&&typeof a=="function"?!0:s===a})}function CY(e){var t=arguments.length<=1?void 0:arguments[1];return t&&t.target&&on(t.target)==="object"&&e in t.target?t.target[e]:t}function xD(e,t,n){var r=e.length;if(t<0||t>=r||n<0||n>=r)return e;var i=e[t],o=t-n;return o>0?[].concat(Mt(e.slice(0,n)),[i],Mt(e.slice(n,t)),Mt(e.slice(t+1,r))):o<0?[].concat(Mt(e.slice(0,t)),Mt(e.slice(t+1,n+1)),[i],Mt(e.slice(n+1,r))):e}var SY=Yg;function EY(e,t){return e.replace(/\$\{\w+\}/g,function(n){var r=n.slice(2,-1);return t[r]})}var bD="CODE_LOGIC_ERROR";function iE(e,t,n,r,i){return oE.apply(this,arguments)}function oE(){return oE=du(Hi().mark(function e(t,n,r,i,o){var s,a,u,f,p,g,v,b,_;return Hi().wrap(function(I){for(;;)switch(I.prev=I.next){case 0:return s=me({},r),delete s.ruleIndex,s.validator&&(a=s.validator,s.validator=function(){try{return a.apply(void 0,arguments)}catch(P){return console.error(P),Promise.reject(bD)}}),u=null,s&&s.type==="array"&&s.defaultField&&(u=s.defaultField,delete s.defaultField),f=new SY(ae({},t,[s])),p=r0({},l6,i.validateMessages),f.messages(p),g=[],I.prev=9,I.next=12,Promise.resolve(f.validate(ae({},t,n),me({},i)));case 12:I.next=17;break;case 14:I.prev=14,I.t0=I.catch(9),I.t0.errors&&(g=I.t0.errors.map(function(P,M){var D=P.message,N=D===bD?p.default:D;return E.exports.isValidElement(N)?E.exports.cloneElement(N,{key:"error_".concat(M)}):N}));case 17:if(!(!g.length&&u)){I.next=22;break}return I.next=20,Promise.all(n.map(function(P,M){return iE("".concat(t,".").concat(M),P,u,i,o)}));case 20:return v=I.sent,I.abrupt("return",v.reduce(function(P,M){return[].concat(Mt(P),Mt(M))},[]));case 22:return b=me(me({},r),{},{name:t,enum:(r.enum||[]).join(", ")},o),_=g.map(function(P){return typeof P=="string"?EY(P,b):P}),I.abrupt("return",_);case 25:case"end":return I.stop()}},e,null,[[9,14]])})),oE.apply(this,arguments)}function PY(e,t,n,r,i,o){var s=e.join("."),a=n.map(function(p,g){var v=p.validator,b=me(me({},p),{},{ruleIndex:g});return v&&(b.validator=function(_,T,I){var P=!1,M=function(){for(var z=arguments.length,$=new Array(z),j=0;j<z;j++)$[j]=arguments[j];Promise.resolve().then(function(){Lr(!P,"Your validator function has already return a promise. `callback` will be ignored."),P||I.apply(void 0,$)})},D=v(_,T,M);P=D&&typeof D.then=="function"&&typeof D.catch=="function",Lr(P,"`callback` is deprecated. Please return a promise instead."),P&&D.then(function(){I()}).catch(function(N){I(N||" ")})}),b}).sort(function(p,g){var v=p.warningOnly,b=p.ruleIndex,_=g.warningOnly,T=g.ruleIndex;return!!v==!!_?b-T:v?1:-1}),u;if(i===!0)u=new Promise(function(){var p=du(Hi().mark(function g(v,b){var _,T,I;return Hi().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:_=0;case 1:if(!(_<a.length)){M.next=12;break}return T=a[_],M.next=5,iE(s,t,T,r,o);case 5:if(I=M.sent,!I.length){M.next=9;break}return b([{errors:I,rule:T}]),M.abrupt("return");case 9:_+=1,M.next=1;break;case 12:v([]);case 13:case"end":return M.stop()}},g)}));return function(g,v){return p.apply(this,arguments)}}());else{var f=a.map(function(p){return iE(s,t,p,r,o).then(function(g){return{errors:g,rule:p}})});u=(i?IY(f):TY(f)).then(function(p){return Promise.reject(p)})}return u.catch(function(p){return p}),u}function TY(e){return aE.apply(this,arguments)}function aE(){return aE=du(Hi().mark(function e(t){return Hi().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",Promise.all(t).then(function(i){var o,s=(o=[]).concat.apply(o,Mt(i));return s}));case 1:case"end":return r.stop()}},e)})),aE.apply(this,arguments)}function IY(e){return sE.apply(this,arguments)}function sE(){return sE=du(Hi().mark(function e(t){var n;return Hi().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return n=0,i.abrupt("return",new Promise(function(o){t.forEach(function(s){s.then(function(a){a.errors.length&&o([a]),n+=1,n===t.length&&o([])})})}));case 2:case"end":return i.stop()}},e)})),sE.apply(this,arguments)}var kY=["name"],Va=[];function _D(e,t,n,r,i,o){return typeof e=="function"?e(t,n,"source"in o?{source:o.source}:{}):r!==i}var GT=function(e){si(n,e);var t=li(n);function n(r){var i;if(jr(this,n),i=t.call(this,r),i.state={resetCount:0},i.cancelRegisterFunc=null,i.mounted=!1,i.touched=!1,i.dirty=!1,i.validatePromise=null,i.prevValidating=void 0,i.errors=Va,i.warnings=Va,i.cancelRegister=function(){var u=i.props,f=u.preserve,p=u.isListField,g=u.name;i.cancelRegisterFunc&&i.cancelRegisterFunc(p,f,_i(g)),i.cancelRegisterFunc=null},i.getNamePath=function(){var u=i.props,f=u.name,p=u.fieldContext,g=p.prefixName,v=g===void 0?[]:g;return f!==void 0?[].concat(Mt(v),Mt(f)):[]},i.getRules=function(){var u=i.props,f=u.rules,p=f===void 0?[]:f,g=u.fieldContext;return p.map(function(v){return typeof v=="function"?v(g):v})},i.refresh=function(){!i.mounted||i.setState(function(u){var f=u.resetCount;return{resetCount:f+1}})},i.triggerMetaEvent=function(u){var f=i.props.onMetaChange;f==null||f(me(me({},i.getMeta()),{},{destroy:u}))},i.onStoreChange=function(u,f,p){var g=i.props,v=g.shouldUpdate,b=g.dependencies,_=b===void 0?[]:b,T=g.onReset,I=p.store,P=i.getNamePath(),M=i.getValue(u),D=i.getValue(I),N=f&&jm(f,P);switch(p.type==="valueUpdate"&&p.source==="external"&&M!==D&&(i.touched=!0,i.dirty=!0,i.validatePromise=null,i.errors=Va,i.warnings=Va,i.triggerMetaEvent()),p.type){case"reset":if(!f||N){i.touched=!1,i.dirty=!1,i.validatePromise=null,i.errors=Va,i.warnings=Va,i.triggerMetaEvent(),T==null||T(),i.refresh();return}break;case"remove":{if(v){i.reRender();return}break}case"setField":{if(N){var z=p.data;"touched"in z&&(i.touched=z.touched),"validating"in z&&!("originRCField"in z)&&(i.validatePromise=z.validating?Promise.resolve([]):null),"errors"in z&&(i.errors=z.errors||Va),"warnings"in z&&(i.warnings=z.warnings||Va),i.dirty=!0,i.triggerMetaEvent(),i.reRender();return}if(v&&!P.length&&_D(v,u,I,M,D,p)){i.reRender();return}break}case"dependenciesUpdate":{var $=_.map(_i);if($.some(function(j){return jm(p.relatedFields,j)})){i.reRender();return}break}default:if(N||(!_.length||P.length||v)&&_D(v,u,I,M,D,p)){i.reRender();return}break}v===!0&&i.reRender()},i.validateRules=function(u){var f=i.getNamePath(),p=i.getValue(),g=Promise.resolve().then(function(){if(!i.mounted)return[];var v=i.props,b=v.validateFirst,_=b===void 0?!1:b,T=v.messageVariables,I=u||{},P=I.triggerName,M=i.getRules();P&&(M=M.filter(function(N){return N}).filter(function(N){var z=N.validateTrigger;if(!z)return!0;var $=Q2(z);return $.includes(P)}));var D=PY(f,p,M,u,_,T);return D.catch(function(N){return N}).then(function(){var N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Va;if(i.validatePromise===g){var z;i.validatePromise=null;var $=[],j=[];(z=N.forEach)===null||z===void 0||z.call(N,function(U){var q=U.rule.warningOnly,Y=U.errors,te=Y===void 0?Va:Y;q?j.push.apply(j,Mt(te)):$.push.apply($,Mt(te))}),i.errors=$,i.warnings=j,i.triggerMetaEvent(),i.reRender()}}),D});return i.validatePromise=g,i.dirty=!0,i.errors=Va,i.warnings=Va,i.triggerMetaEvent(),i.reRender(),g},i.isFieldValidating=function(){return!!i.validatePromise},i.isFieldTouched=function(){return i.touched},i.isFieldDirty=function(){if(i.dirty||i.props.initialValue!==void 0)return!0;var u=i.props.fieldContext,f=u.getInternalHooks(ud),p=f.getInitialValue;return p(i.getNamePath())!==void 0},i.getErrors=function(){return i.errors},i.getWarnings=function(){return i.warnings},i.isListField=function(){return i.props.isListField},i.isList=function(){return i.props.isList},i.isPreserve=function(){return i.props.preserve},i.getMeta=function(){i.prevValidating=i.isFieldValidating();var u={touched:i.isFieldTouched(),validating:i.prevValidating,errors:i.errors,warnings:i.warnings,name:i.getNamePath()};return u},i.getOnlyChild=function(u){if(typeof u=="function"){var f=i.getMeta();return me(me({},i.getOnlyChild(u(i.getControlled(),f,i.props.fieldContext))),{},{isFunction:!0})}var p=Po(u);return p.length!==1||!E.exports.isValidElement(p[0])?{child:p,isFunction:!1}:{child:p[0],isFunction:!1}},i.getValue=function(u){var f=i.props.fieldContext.getFieldsValue,p=i.getNamePath();return Nc(u||f(!0),p)},i.getControlled=function(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},f=i.props,p=f.trigger,g=f.validateTrigger,v=f.getValueFromEvent,b=f.normalize,_=f.valuePropName,T=f.getValueProps,I=f.fieldContext,P=g!==void 0?g:I.validateTrigger,M=i.getNamePath(),D=I.getInternalHooks,N=I.getFieldsValue,z=D(ud),$=z.dispatch,j=i.getValue(),U=T||function(Z){return ae({},_,Z)},q=u[p],Y=me(me({},u),U(j));Y[p]=function(){i.touched=!0,i.dirty=!0,i.triggerMetaEvent();for(var Z,X=arguments.length,J=new Array(X),ue=0;ue<X;ue++)J[ue]=arguments[ue];v?Z=v.apply(void 0,J):Z=CY.apply(void 0,[_].concat(J)),b&&(Z=b(Z,j,N(!0))),$({type:"updateValue",namePath:M,value:Z}),q&&q.apply(void 0,J)};var te=Q2(P||[]);return te.forEach(function(Z){var X=Y[Z];Y[Z]=function(){X&&X.apply(void 0,arguments);var J=i.props.rules;J&&J.length&&$({type:"validateField",namePath:M,triggerName:Z})}}),Y},r.fieldContext){var o=r.fieldContext.getInternalHooks,s=o(ud),a=s.initEntityValue;a(Fn(i))}return i}return Hr(n,[{key:"componentDidMount",value:function(){var i=this.props,o=i.shouldUpdate,s=i.fieldContext;if(this.mounted=!0,s){var a=s.getInternalHooks,u=a(ud),f=u.registerField;this.cancelRegisterFunc=f(this)}o===!0&&this.reRender()}},{key:"componentWillUnmount",value:function(){this.cancelRegister(),this.triggerMetaEvent(!0),this.mounted=!1}},{key:"reRender",value:function(){!this.mounted||this.forceUpdate()}},{key:"render",value:function(){this.state.resetCount;var i=this.props.children,o=this.getOnlyChild(i),s=o.child,a=o.isFunction,u;return a?u=s:E.exports.isValidElement(s)?u=E.exports.cloneElement(s,this.getControlled(s.props)):(Lr(!s,"`children` of Field is not validate ReactElement."),u=s),A(nr,{children:u})}}]),n}(E.exports.Component);GT.contextType=gh;GT.defaultProps={trigger:"onChange",valuePropName:"value"};function m6(e){var t=e.name,n=kn(e,kY),r=E.exports.useContext(gh),i=t!==void 0?_i(t):void 0,o="keep";return n.isListField||(o="_".concat((i||[]).join("_"))),A(GT,{name:i,...n,fieldContext:r},o)}var MY=E.exports.createContext(null),RY=function(t){var n=t.name,r=t.initialValue,i=t.children,o=t.rules,s=t.validateTrigger,a=E.exports.useContext(gh),u=E.exports.useRef({keys:[],id:0}),f=u.current,p=E.exports.useMemo(function(){var _=_i(a.prefixName)||[];return[].concat(Mt(_),Mt(_i(n)))},[a.prefixName,n]),g=E.exports.useMemo(function(){return me(me({},a),{},{prefixName:p})},[a,p]),v=E.exports.useMemo(function(){return{getKey:function(T){var I=p.length,P=T[I];return[f.keys[P],T.slice(I+1)]}}},[p]);if(typeof i!="function")return Lr(!1,"Form.List only accepts function as children."),null;var b=function(T,I,P){var M=P.source;return M==="internal"?!1:T!==I};return A(MY.Provider,{value:v,children:A(gh.Provider,{value:g,children:A(m6,{name:[],shouldUpdate:b,rules:o,validateTrigger:s,initialValue:r,isList:!0,children:function(_,T){var I=_.value,P=I===void 0?[]:I,M=_.onChange,D=a.getFieldValue,N=function(){var U=D(p||[]);return U||[]},z={add:function(U,q){var Y=N();q>=0&&q<=Y.length?(f.keys=[].concat(Mt(f.keys.slice(0,q)),[f.id],Mt(f.keys.slice(q))),M([].concat(Mt(Y.slice(0,q)),[U],Mt(Y.slice(q))))):(f.keys=[].concat(Mt(f.keys),[f.id]),M([].concat(Mt(Y),[U]))),f.id+=1},remove:function(U){var q=N(),Y=new Set(Array.isArray(U)?U:[U]);Y.size<=0||(f.keys=f.keys.filter(function(te,Z){return!Y.has(Z)}),M(q.filter(function(te,Z){return!Y.has(Z)})))},move:function(U,q){if(U!==q){var Y=N();U<0||U>=Y.length||q<0||q>=Y.length||(f.keys=xD(f.keys,U,q),M(xD(Y,U,q)))}}},$=P||[];return Array.isArray($)||($=[]),i($.map(function(j,U){var q=f.keys[U];return q===void 0&&(f.keys[U]=f.id,q=f.keys[U],f.id+=1),{name:U,key:q,isListField:!0}}),z,T)}})})})};function OY(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,s,a=[],u=!0,f=!1;try{if(o=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(a.push(r.value),a.length!==t);u=!0);}catch(p){f=!0,i=p}finally{try{if(!u&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(f)throw i}}return a}}function $e(e,t){return u6(e)||OY(e,t)||KT(e,t)||d6()}function DY(e){var t=!1,n=e.length,r=[];return e.length?new Promise(function(i,o){e.forEach(function(s,a){s.catch(function(u){return t=!0,u}).then(function(u){n-=1,r[a]=u,!(n>0)&&(t&&o(r),i(r))})})}):Promise.resolve([])}var g6="__@field_split__";function xC(e){return e.map(function(t){return"".concat(on(t),":").concat(t)}).join(g6)}var wf=function(){function e(){jr(this,e),this.kvs=new Map}return Hr(e,[{key:"set",value:function(n,r){this.kvs.set(xC(n),r)}},{key:"get",value:function(n){return this.kvs.get(xC(n))}},{key:"update",value:function(n,r){var i=this.get(n),o=r(i);o?this.set(n,o):this.delete(n)}},{key:"delete",value:function(n){this.kvs.delete(xC(n))}},{key:"map",value:function(n){return Mt(this.kvs.entries()).map(function(r){var i=$e(r,2),o=i[0],s=i[1],a=o.split(g6);return n({key:a.map(function(u){var f=u.match(/^([^:]*):(.*)$/),p=$e(f,3),g=p[1],v=p[2];return g==="number"?Number(v):v}),value:s})})}},{key:"toJSON",value:function(){var n={};return this.map(function(r){var i=r.key,o=r.value;return n[i.join(".")]=o,null}),n}}]),e}(),AY=["name","errors"],NY=Hr(function e(t){var n=this;jr(this,e),this.formHooked=!1,this.forceRootUpdate=void 0,this.subscribable=!0,this.store={},this.fieldEntities=[],this.initialValues={},this.callbacks={},this.validateMessages=null,this.preserve=null,this.lastValidatePromise=null,this.getForm=function(){return{getFieldValue:n.getFieldValue,getFieldsValue:n.getFieldsValue,getFieldError:n.getFieldError,getFieldWarning:n.getFieldWarning,getFieldsError:n.getFieldsError,isFieldsTouched:n.isFieldsTouched,isFieldTouched:n.isFieldTouched,isFieldValidating:n.isFieldValidating,isFieldsValidating:n.isFieldsValidating,resetFields:n.resetFields,setFields:n.setFields,setFieldValue:n.setFieldValue,setFieldsValue:n.setFieldsValue,validateFields:n.validateFields,submit:n.submit,_init:!0,getInternalHooks:n.getInternalHooks}},this.getInternalHooks=function(r){return r===ud?(n.formHooked=!0,{dispatch:n.dispatch,initEntityValue:n.initEntityValue,registerField:n.registerField,useSubscribe:n.useSubscribe,setInitialValues:n.setInitialValues,destroyForm:n.destroyForm,setCallbacks:n.setCallbacks,setValidateMessages:n.setValidateMessages,getFields:n.getFields,setPreserve:n.setPreserve,getInitialValue:n.getInitialValue,registerWatch:n.registerWatch}):(Lr(!1,"`getInternalHooks` is internal usage. Should not call directly."),null)},this.useSubscribe=function(r){n.subscribable=r},this.prevWithoutPreserves=null,this.setInitialValues=function(r,i){if(n.initialValues=r||{},i){var o,s=r0({},r,n.store);(o=n.prevWithoutPreserves)===null||o===void 0||o.map(function(a){var u=a.key;s=Sc(s,u,Nc(r,u))}),n.prevWithoutPreserves=null,n.updateStore(s)}},this.destroyForm=function(){var r=new wf;n.getFieldEntities(!0).forEach(function(i){n.isMergedPreserve(i.isPreserve())||r.set(i.getNamePath(),!0)}),n.prevWithoutPreserves=r},this.getInitialValue=function(r){var i=Nc(n.initialValues,r);return r.length?A_(i):i},this.setCallbacks=function(r){n.callbacks=r},this.setValidateMessages=function(r){n.validateMessages=r},this.setPreserve=function(r){n.preserve=r},this.watchList=[],this.registerWatch=function(r){return n.watchList.push(r),function(){n.watchList=n.watchList.filter(function(i){return i!==r})}},this.notifyWatch=function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];if(n.watchList.length){var i=n.getFieldsValue();n.watchList.forEach(function(o){o(i,r)})}},this.timeoutId=null,this.warningUnhooked=function(){},this.updateStore=function(r){n.store=r},this.getFieldEntities=function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return r?n.fieldEntities.filter(function(i){return i.getNamePath().length}):n.fieldEntities},this.getFieldsMap=function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,i=new wf;return n.getFieldEntities(r).forEach(function(o){var s=o.getNamePath();i.set(s,o)}),i},this.getFieldEntitiesForNamePathList=function(r){if(!r)return n.getFieldEntities(!0);var i=n.getFieldsMap(!0);return r.map(function(o){var s=_i(o);return i.get(s)||{INVALIDATE_NAME_PATH:_i(o)}})},this.getFieldsValue=function(r,i){if(n.warningUnhooked(),r===!0&&!i)return n.store;var o=n.getFieldEntitiesForNamePathList(Array.isArray(r)?r:null),s=[];return o.forEach(function(a){var u,f="INVALIDATE_NAME_PATH"in a?a.INVALIDATE_NAME_PATH:a.getNamePath();if(!(!r&&((u=a.isListField)===null||u===void 0?void 0:u.call(a))))if(!i)s.push(f);else{var p="getMeta"in a?a.getMeta():null;i(p)&&s.push(f)}}),vD(n.store,s.map(_i))},this.getFieldValue=function(r){n.warningUnhooked();var i=_i(r);return Nc(n.store,i)},this.getFieldsError=function(r){n.warningUnhooked();var i=n.getFieldEntitiesForNamePathList(r);return i.map(function(o,s){return o&&!("INVALIDATE_NAME_PATH"in o)?{name:o.getNamePath(),errors:o.getErrors(),warnings:o.getWarnings()}:{name:_i(r[s]),errors:[],warnings:[]}})},this.getFieldError=function(r){n.warningUnhooked();var i=_i(r),o=n.getFieldsError([i])[0];return o.errors},this.getFieldWarning=function(r){n.warningUnhooked();var i=_i(r),o=n.getFieldsError([i])[0];return o.warnings},this.isFieldsTouched=function(){n.warningUnhooked();for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];var s=i[0],a=i[1],u,f=!1;i.length===0?u=null:i.length===1?Array.isArray(s)?(u=s.map(_i),f=!1):(u=null,f=s):(u=s.map(_i),f=a);var p=n.getFieldEntities(!0),g=function(I){return I.isFieldTouched()};if(!u)return f?p.every(g):p.some(g);var v=new wf;u.forEach(function(T){v.set(T,[])}),p.forEach(function(T){var I=T.getNamePath();u.forEach(function(P){P.every(function(M,D){return I[D]===M})&&v.update(P,function(M){return[].concat(Mt(M),[T])})})});var b=function(I){return I.some(g)},_=v.map(function(T){var I=T.value;return I});return f?_.every(b):_.some(b)},this.isFieldTouched=function(r){return n.warningUnhooked(),n.isFieldsTouched([r])},this.isFieldsValidating=function(r){n.warningUnhooked();var i=n.getFieldEntities();if(!r)return i.some(function(s){return s.isFieldValidating()});var o=r.map(_i);return i.some(function(s){var a=s.getNamePath();return jm(o,a)&&s.isFieldValidating()})},this.isFieldValidating=function(r){return n.warningUnhooked(),n.isFieldsValidating([r])},this.resetWithFieldInitialValue=function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=new wf,o=n.getFieldEntities(!0);o.forEach(function(u){var f=u.props.initialValue,p=u.getNamePath();if(f!==void 0){var g=i.get(p)||new Set;g.add({entity:u,value:f}),i.set(p,g)}});var s=function(f){f.forEach(function(p){var g=p.props.initialValue;if(g!==void 0){var v=p.getNamePath(),b=n.getInitialValue(v);if(b!==void 0)Lr(!1,"Form already set 'initialValues' with path '".concat(v.join("."),"'. Field can not overwrite it."));else{var _=i.get(v);if(_&&_.size>1)Lr(!1,"Multiple Field with path '".concat(v.join("."),"' set 'initialValue'. Can not decide which one to pick."));else if(_){var T=n.getFieldValue(v);(!r.skipExist||T===void 0)&&n.updateStore(Sc(n.store,v,Mt(_)[0].value))}}}})},a;r.entities?a=r.entities:r.namePathList?(a=[],r.namePathList.forEach(function(u){var f=i.get(u);if(f){var p;(p=a).push.apply(p,Mt(Mt(f).map(function(g){return g.entity})))}})):a=o,s(a)},this.resetFields=function(r){n.warningUnhooked();var i=n.store;if(!r){n.updateStore(r0({},n.initialValues)),n.resetWithFieldInitialValue(),n.notifyObservers(i,null,{type:"reset"}),n.notifyWatch();return}var o=r.map(_i);o.forEach(function(s){var a=n.getInitialValue(s);n.updateStore(Sc(n.store,s,a))}),n.resetWithFieldInitialValue({namePathList:o}),n.notifyObservers(i,o,{type:"reset"}),n.notifyWatch(o)},this.setFields=function(r){n.warningUnhooked();var i=n.store,o=[];r.forEach(function(s){var a=s.name;s.errors;var u=kn(s,AY),f=_i(a);o.push(f),"value"in u&&n.updateStore(Sc(n.store,f,u.value)),n.notifyObservers(i,[f],{type:"setField",data:s})}),n.notifyWatch(o)},this.getFields=function(){var r=n.getFieldEntities(!0),i=r.map(function(o){var s=o.getNamePath(),a=o.getMeta(),u=me(me({},a),{},{name:s,value:n.getFieldValue(s)});return Object.defineProperty(u,"originRCField",{value:!0}),u});return i},this.initEntityValue=function(r){var i=r.props.initialValue;if(i!==void 0){var o=r.getNamePath(),s=Nc(n.store,o);s===void 0&&n.updateStore(Sc(n.store,o,i))}},this.isMergedPreserve=function(r){var i=r!==void 0?r:n.preserve;return i!=null?i:!0},this.registerField=function(r){n.fieldEntities.push(r);var i=r.getNamePath();if(n.notifyWatch([i]),r.props.initialValue!==void 0){var o=n.store;n.resetWithFieldInitialValue({entities:[r],skipExist:!0}),n.notifyObservers(o,[r.getNamePath()],{type:"valueUpdate",source:"internal"})}return function(s,a){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(n.fieldEntities=n.fieldEntities.filter(function(g){return g!==r}),!n.isMergedPreserve(a)&&(!s||u.length>1)){var f=s?void 0:n.getInitialValue(i);if(i.length&&n.getFieldValue(i)!==f&&n.fieldEntities.every(function(g){return!p6(g.getNamePath(),i)})){var p=n.store;n.updateStore(Sc(p,i,f,!0)),n.notifyObservers(p,[i],{type:"remove"}),n.triggerDependenciesUpdate(p,i)}}n.notifyWatch([i])}},this.dispatch=function(r){switch(r.type){case"updateValue":{var i=r.namePath,o=r.value;n.updateValue(i,o);break}case"validateField":{var s=r.namePath,a=r.triggerName;n.validateFields([s],{triggerName:a});break}}},this.notifyObservers=function(r,i,o){if(n.subscribable){var s=me(me({},o),{},{store:n.getFieldsValue(!0)});n.getFieldEntities().forEach(function(a){var u=a.onStoreChange;u(r,i,s)})}else n.forceRootUpdate()},this.triggerDependenciesUpdate=function(r,i){var o=n.getDependencyChildrenFields(i);return o.length&&n.validateFields(o),n.notifyObservers(r,o,{type:"dependenciesUpdate",relatedFields:[i].concat(Mt(o))}),o},this.updateValue=function(r,i){var o=_i(r),s=n.store;n.updateStore(Sc(n.store,o,i)),n.notifyObservers(s,[o],{type:"valueUpdate",source:"internal"}),n.notifyWatch([o]);var a=n.triggerDependenciesUpdate(s,o),u=n.callbacks.onValuesChange;if(u){var f=vD(n.store,[o]);u(f,n.getFieldsValue())}n.triggerOnFieldsChange([o].concat(Mt(a)))},this.setFieldsValue=function(r){n.warningUnhooked();var i=n.store;if(r){var o=r0(n.store,r);n.updateStore(o)}n.notifyObservers(i,null,{type:"valueUpdate",source:"external"}),n.notifyWatch()},this.setFieldValue=function(r,i){n.setFields([{name:r,value:i}])},this.getDependencyChildrenFields=function(r){var i=new Set,o=[],s=new wf;n.getFieldEntities().forEach(function(u){var f=u.props.dependencies;(f||[]).forEach(function(p){var g=_i(p);s.update(g,function(){var v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:new Set;return v.add(u),v})})});var a=function u(f){var p=s.get(f)||new Set;p.forEach(function(g){if(!i.has(g)){i.add(g);var v=g.getNamePath();g.isFieldDirty()&&v.length&&(o.push(v),u(v))}})};return a(r),o},this.triggerOnFieldsChange=function(r,i){var o=n.callbacks.onFieldsChange;if(o){var s=n.getFields();if(i){var a=new wf;i.forEach(function(f){var p=f.name,g=f.errors;a.set(p,g)}),s.forEach(function(f){f.errors=a.get(f.name)||f.errors})}var u=s.filter(function(f){var p=f.name;return jm(r,p)});o(u,s)}},this.validateFields=function(r,i){n.warningUnhooked();var o=!!r,s=o?r.map(_i):[],a=[];n.getFieldEntities(!0).forEach(function(p){if(o||s.push(p.getNamePath()),(i==null?void 0:i.recursive)&&o){var g=p.getNamePath();g.every(function(_,T){return r[T]===_||r[T]===void 0})&&s.push(g)}if(!(!p.props.rules||!p.props.rules.length)){var v=p.getNamePath();if(!o||jm(s,v)){var b=p.validateRules(me({validateMessages:me(me({},l6),n.validateMessages)},i));a.push(b.then(function(){return{name:v,errors:[],warnings:[]}}).catch(function(_){var T,I=[],P=[];return(T=_.forEach)===null||T===void 0||T.call(_,function(M){var D=M.rule.warningOnly,N=M.errors;D?P.push.apply(P,Mt(N)):I.push.apply(I,Mt(N))}),I.length?Promise.reject({name:v,errors:I,warnings:P}):{name:v,errors:I,warnings:P}}))}}});var u=DY(a);n.lastValidatePromise=u,u.catch(function(p){return p}).then(function(p){var g=p.map(function(v){var b=v.name;return b});n.notifyObservers(n.store,g,{type:"validateFinish"}),n.triggerOnFieldsChange(g,p)});var f=u.then(function(){return n.lastValidatePromise===u?Promise.resolve(n.getFieldsValue(s)):Promise.reject([])}).catch(function(p){var g=p.filter(function(v){return v&&v.errors.length});return Promise.reject({values:n.getFieldsValue(s),errorFields:g,outOfDate:n.lastValidatePromise!==u})});return f.catch(function(p){return p}),f},this.submit=function(){n.warningUnhooked(),n.validateFields().then(function(r){var i=n.callbacks.onFinish;if(i)try{i(r)}catch(o){console.error(o)}}).catch(function(r){var i=n.callbacks.onFinishFailed;i&&i(r)})},this.forceRootUpdate=t});function v6(e){var t=E.exports.useRef(),n=E.exports.useState({}),r=$e(n,2),i=r[1];if(!t.current)if(e)t.current=e;else{var o=function(){i({})},s=new NY(o);t.current=s.getForm()}return[t.current]}var lE=E.exports.createContext({triggerFormChange:function(){},triggerFormFinish:function(){},registerForm:function(){},unregisterForm:function(){}}),y6=function(t){var n=t.validateMessages,r=t.onFormChange,i=t.onFormFinish,o=t.children,s=E.exports.useContext(lE),a=E.exports.useRef({});return A(lE.Provider,{value:me(me({},s),{},{validateMessages:me(me({},s.validateMessages),n),triggerFormChange:function(f,p){r&&r(f,{changedFields:p,forms:a.current}),s.triggerFormChange(f,p)},triggerFormFinish:function(f,p){i&&i(f,{values:p,forms:a.current}),s.triggerFormFinish(f,p)},registerForm:function(f,p){f&&(a.current=me(me({},a.current),{},ae({},f,p))),s.registerForm(f,p)},unregisterForm:function(f){var p=me({},a.current);delete p[f],a.current=p,s.unregisterForm(f)}}),children:o})},LY=["name","initialValues","fields","form","preserve","children","component","validateMessages","validateTrigger","onValuesChange","onFieldsChange","onFinish","onFinishFailed"],zY=function(t,n){var r=t.name,i=t.initialValues,o=t.fields,s=t.form,a=t.preserve,u=t.children,f=t.component,p=f===void 0?"form":f,g=t.validateMessages,v=t.validateTrigger,b=v===void 0?"onChange":v,_=t.onValuesChange,T=t.onFieldsChange,I=t.onFinish,P=t.onFinishFailed,M=kn(t,LY),D=E.exports.useContext(lE),N=v6(s),z=$e(N,1),$=z[0],j=$.getInternalHooks(ud),U=j.useSubscribe,q=j.setInitialValues,Y=j.setCallbacks,te=j.setValidateMessages,Z=j.setPreserve,X=j.destroyForm;E.exports.useImperativeHandle(n,function(){return $}),E.exports.useEffect(function(){return D.registerForm(r,$),function(){D.unregisterForm(r)}},[D,$,r]),te(me(me({},D.validateMessages),g)),Y({onValuesChange:_,onFieldsChange:function(be){if(D.triggerFormChange(r,be),T){for(var Re=arguments.length,Ie=new Array(Re>1?Re-1:0),Me=1;Me<Re;Me++)Ie[Me-1]=arguments[Me];T.apply(void 0,[be].concat(Ie))}},onFinish:function(be){D.triggerFormFinish(r,be),I&&I(be)},onFinishFailed:P}),Z(a);var J=E.exports.useRef(null);q(i,!J.current),J.current||(J.current=!0),E.exports.useEffect(function(){return X},[]);var ue,re=typeof u=="function";if(re){var se=$.getFieldsValue(!0);ue=u(se,$)}else ue=u;U(!re);var oe=E.exports.useRef();E.exports.useEffect(function(){wY(oe.current||[],o||[])||$.setFields(o||[]),oe.current=o},[o,$]);var he=E.exports.useMemo(function(){return me(me({},$),{},{validateTrigger:b})},[$,b]),Ce=A(gh.Provider,{value:he,children:ue});return p===!1?Ce:A(p,{...M,onSubmit:function(be){be.preventDefault(),be.stopPropagation(),$.submit()},onReset:function(be){var Re;be.preventDefault(),$.resetFields(),(Re=M.onReset)===null||Re===void 0||Re.call(M,be)},children:Ce})};function wD(e){try{return JSON.stringify(e)}catch{return Math.random()}}function FY(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t[0],i=r===void 0?[]:r,o=t[1],s=E.exports.useState(),a=$e(s,2),u=a[0],f=a[1],p=E.exports.useMemo(function(){return wD(u)},[u]),g=E.exports.useRef(p);g.current=p;var v=E.exports.useContext(gh),b=o||v,_=b&&b._init,T=_i(i),I=E.exports.useRef(T);return I.current=T,E.exports.useEffect(function(){if(!!_){var P=b.getFieldsValue,M=b.getInternalHooks,D=M(ud),N=D.registerWatch,z=N(function(j){var U=Nc(j,I.current),q=wD(U);g.current!==q&&(g.current=q,f(U))}),$=Nc(P(),I.current);return f($),z}},[_]),u}var $Y=E.exports.forwardRef(zY),Qg=$Y;Qg.FormProvider=y6;Qg.Field=m6;Qg.List=RY;Qg.useForm=v6;Qg.useWatch=FY;const x6={items_per_page:"/ page",jump_to:"Go to",jump_to_confirm:"confirm",page:"Page",prev_page:"Previous Page",next_page:"Next Page",prev_5:"Previous 5 Pages",next_5:"Next 5 Pages",prev_3:"Previous 3 Pages",next_3:"Next 3 Pages",page_size:"Page Size"};var BY={locale:"en_US",today:"Today",now:"Now",backToToday:"Back to today",ok:"OK",clear:"Clear",month:"Month",year:"Year",timeSelect:"select time",dateSelect:"select date",weekSelect:"Choose a week",monthSelect:"Choose a month",yearSelect:"Choose a year",decadeSelect:"Choose a decade",yearFormat:"YYYY",dateFormat:"M/D/YYYY",dayFormat:"D",dateTimeFormat:"M/D/YYYY HH:mm:ss",monthBeforeYear:!0,previousMonth:"Previous month (PageUp)",nextMonth:"Next month (PageDown)",previousYear:"Last year (Control + left)",nextYear:"Next year (Control + right)",previousDecade:"Last decade",nextDecade:"Next decade",previousCentury:"Last century",nextCentury:"Next century"},VY={placeholder:"Select time",rangePlaceholder:["Start time","End time"]};const b6=VY;var UY={lang:Je({placeholder:"Select date",yearPlaceholder:"Select year",quarterPlaceholder:"Select quarter",monthPlaceholder:"Select month",weekPlaceholder:"Select week",rangePlaceholder:["Start date","End date"],rangeYearPlaceholder:["Start year","End year"],rangeQuarterPlaceholder:["Start quarter","End quarter"],rangeMonthPlaceholder:["Start month","End month"],rangeWeekPlaceholder:["Start week","End week"]},BY),timePickerLocale:Je({},b6)};const CD=UY;var pa="${label} is not a valid ${type}",jY={locale:"en",Pagination:x6,DatePicker:CD,TimePicker:b6,Calendar:CD,global:{placeholder:"Please select"},Table:{filterTitle:"Filter menu",filterConfirm:"OK",filterReset:"Reset",filterEmptyText:"No filters",filterCheckall:"Select all items",filterSearchPlaceholder:"Search in filters",emptyText:"No data",selectAll:"Select current page",selectInvert:"Invert current page",selectNone:"Clear all data",selectionAll:"Select all data",sortTitle:"Sort",expand:"Expand row",collapse:"Collapse row",triggerDesc:"Click to sort descending",triggerAsc:"Click to sort ascending",cancelSort:"Click to cancel sorting"},Modal:{okText:"OK",cancelText:"Cancel",justOkText:"OK"},Popconfirm:{okText:"OK",cancelText:"Cancel"},Transfer:{titles:["",""],searchPlaceholder:"Search here",itemUnit:"item",itemsUnit:"items",remove:"Remove",selectCurrent:"Select current page",removeCurrent:"Remove current page",selectAll:"Select all data",removeAll:"Remove all data",selectInvert:"Invert current page"},Upload:{uploading:"Uploading...",removeFile:"Remove file",uploadError:"Upload error",previewFile:"Preview file",downloadFile:"Download file"},Empty:{description:"No data"},Icon:{icon:"icon"},Text:{edit:"Edit",copy:"Copy",copied:"Copied",expand:"Expand"},PageHeader:{back:"Back"},Form:{optional:"(optional)",defaultValidateMessages:{default:"Field validation error for ${label}",required:"Please enter ${label}",enum:"${label} must be one of [${enum}]",whitespace:"${label} cannot be a blank character",date:{format:"${label} date format is invalid",parse:"${label} cannot be converted to a date",invalid:"${label} is an invalid date"},types:{string:pa,method:pa,array:pa,object:pa,number:pa,date:pa,boolean:pa,integer:pa,float:pa,regexp:pa,email:pa,url:pa,hex:pa},string:{len:"${label} must be ${len} characters",min:"${label} must be at least ${min} characters",max:"${label} must be up to ${max} characters",range:"${label} must be between ${min}-${max} characters"},number:{len:"${label} must be equal to ${len}",min:"${label} must be minimum ${min}",max:"${label} must be maximum ${max}",range:"${label} must be between ${min}-${max}"},array:{len:"Must be ${len} ${label}",min:"At least ${min} ${label}",max:"At most ${max} ${label}",range:"The amount of ${label} must be between ${min}-${max}"},pattern:{mismatch:"${label} does not match the pattern ${pattern}"}}},Image:{preview:"Preview"}};const Ms=jY;var i0=Je({},Ms.Modal);function SD(e){e?i0=Je(Je({},i0),e):i0=Je({},Ms.Modal)}function _6(){return i0}var HY=E.exports.createContext(void 0);const qT=HY;var KY="internalMark",WY=function(t){var n=t.locale,r=n===void 0?{}:n,i=t.children;t._ANT_MARK__,E.exports.useEffect(function(){return SD(r&&r.Modal),function(){SD()}},[r]);var o=E.exports.useMemo(function(){return Je(Je({},r),{exist:!0})},[r]);return A(qT.Provider,{value:o,children:i})};const GY=WY;var qY=function(t){var n=t.componentName,r=n===void 0?"global":n,i=t.defaultLocale,o=t.children,s=E.exports.useContext(qT),a=E.exports.useMemo(function(){var f,p=i||Ms[r],g=(f=s==null?void 0:s[r])!==null&&f!==void 0?f:{};return Je(Je({},p instanceof Function?p():p),g||{})},[r,i,s]),u=E.exports.useMemo(function(){var f=s&&s.locale;return s&&s.exist&&!f?Ms.locale:f},[s]);return o(a,u,s)};const Lh=qY;var ZY=function(t,n){var r=E.exports.useContext(qT),i=E.exports.useMemo(function(){var o,s=n||Ms[t],a=(o=r==null?void 0:r[t])!==null&&o!==void 0?o:{};return Je(Je({},typeof s=="function"?s():s),a||{})},[t,n,r]);return[i]},XY={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"}}]},name:"check-circle",theme:"filled"};const YY=XY;function po(e,t){QY(e)&&(e="100%");var n=JY(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function ex(e){return Math.min(1,Math.max(0,e))}function QY(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function JY(e){return typeof e=="string"&&e.indexOf("%")!==-1}function w6(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function tx(e){return e<=1?"".concat(Number(e)*100,"%"):e}function fd(e){return e.length===1?"0"+e:String(e)}function eQ(e,t,n){return{r:po(e,255)*255,g:po(t,255)*255,b:po(n,255)*255}}function ED(e,t,n){e=po(e,255),t=po(t,255),n=po(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o=0,s=0,a=(r+i)/2;if(r===i)s=0,o=0;else{var u=r-i;switch(s=a>.5?u/(2-r-i):u/(r+i),r){case e:o=(t-n)/u+(t<n?6:0);break;case t:o=(n-e)/u+2;break;case n:o=(e-t)/u+4;break}o/=6}return{h:o,s,l:a}}function bC(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*(6*n):n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function tQ(e,t,n){var r,i,o;if(e=po(e,360),t=po(t,100),n=po(n,100),t===0)i=n,o=n,r=n;else{var s=n<.5?n*(1+t):n+t-n*t,a=2*n-s;r=bC(a,s,e+1/3),i=bC(a,s,e),o=bC(a,s,e-1/3)}return{r:r*255,g:i*255,b:o*255}}function ob(e,t,n){e=po(e,255),t=po(t,255),n=po(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o=0,s=r,a=r-i,u=r===0?0:a/r;if(r===i)o=0;else{switch(r){case e:o=(t-n)/a+(t<n?6:0);break;case t:o=(n-e)/a+2;break;case n:o=(e-t)/a+4;break}o/=6}return{h:o,s:u,v:s}}function nQ(e,t,n){e=po(e,360)*6,t=po(t,100),n=po(n,100);var r=Math.floor(e),i=e-r,o=n*(1-t),s=n*(1-i*t),a=n*(1-(1-i)*t),u=r%6,f=[n,s,o,o,a,n][u],p=[a,n,n,s,o,o][u],g=[o,o,a,n,n,s][u];return{r:f*255,g:p*255,b:g*255}}function ab(e,t,n,r){var i=[fd(Math.round(e).toString(16)),fd(Math.round(t).toString(16)),fd(Math.round(n).toString(16))];return r&&i[0].startsWith(i[0].charAt(1))&&i[1].startsWith(i[1].charAt(1))&&i[2].startsWith(i[2].charAt(1))?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function rQ(e,t,n,r,i){var o=[fd(Math.round(e).toString(16)),fd(Math.round(t).toString(16)),fd(Math.round(n).toString(16)),fd(iQ(r))];return i&&o[0].startsWith(o[0].charAt(1))&&o[1].startsWith(o[1].charAt(1))&&o[2].startsWith(o[2].charAt(1))&&o[3].startsWith(o[3].charAt(1))?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join("")}function iQ(e){return Math.round(parseFloat(e)*255).toString(16)}function PD(e){return ma(e)/255}function ma(e){return parseInt(e,16)}function oQ(e){return{r:e>>16,g:(e&65280)>>8,b:e&255}}var cE={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function Es(e){var t={r:0,g:0,b:0},n=1,r=null,i=null,o=null,s=!1,a=!1;return typeof e=="string"&&(e=lQ(e)),typeof e=="object"&&(El(e.r)&&El(e.g)&&El(e.b)?(t=eQ(e.r,e.g,e.b),s=!0,a=String(e.r).substr(-1)==="%"?"prgb":"rgb"):El(e.h)&&El(e.s)&&El(e.v)?(r=tx(e.s),i=tx(e.v),t=nQ(e.h,r,i),s=!0,a="hsv"):El(e.h)&&El(e.s)&&El(e.l)&&(r=tx(e.s),o=tx(e.l),t=tQ(e.h,r,o),s=!0,a="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=w6(n),{ok:s,format:e.format||a,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}var aQ="[-\\+]?\\d+%?",sQ="[-\\+]?\\d*\\.\\d+%?",Lc="(?:".concat(sQ,")|(?:").concat(aQ,")"),_C="[\\s|\\(]+(".concat(Lc,")[,|\\s]+(").concat(Lc,")[,|\\s]+(").concat(Lc,")\\s*\\)?"),wC="[\\s|\\(]+(".concat(Lc,")[,|\\s]+(").concat(Lc,")[,|\\s]+(").concat(Lc,")[,|\\s]+(").concat(Lc,")\\s*\\)?"),bs={CSS_UNIT:new RegExp(Lc),rgb:new RegExp("rgb"+_C),rgba:new RegExp("rgba"+wC),hsl:new RegExp("hsl"+_C),hsla:new RegExp("hsla"+wC),hsv:new RegExp("hsv"+_C),hsva:new RegExp("hsva"+wC),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function lQ(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(cE[e])e=cE[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=bs.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=bs.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=bs.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=bs.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=bs.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=bs.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=bs.hex8.exec(e),n?{r:ma(n[1]),g:ma(n[2]),b:ma(n[3]),a:PD(n[4]),format:t?"name":"hex8"}:(n=bs.hex6.exec(e),n?{r:ma(n[1]),g:ma(n[2]),b:ma(n[3]),format:t?"name":"hex"}:(n=bs.hex4.exec(e),n?{r:ma(n[1]+n[1]),g:ma(n[2]+n[2]),b:ma(n[3]+n[3]),a:PD(n[4]+n[4]),format:t?"name":"hex8"}:(n=bs.hex3.exec(e),n?{r:ma(n[1]+n[1]),g:ma(n[2]+n[2]),b:ma(n[3]+n[3]),format:t?"name":"hex"}:!1)))))))))}function El(e){return Boolean(bs.CSS_UNIT.exec(String(e)))}var CC=function(){function e(t,n){t===void 0&&(t=""),n===void 0&&(n={});var r;if(t instanceof e)return t;typeof t=="number"&&(t=oQ(t)),this.originalInput=t;var i=Es(t);this.originalInput=t,this.r=i.r,this.g=i.g,this.b=i.b,this.a=i.a,this.roundA=Math.round(100*this.a)/100,this.format=(r=n.format)!==null&&r!==void 0?r:i.format,this.gradientType=n.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=i.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},e.prototype.getLuminance=function(){var t=this.toRgb(),n,r,i,o=t.r/255,s=t.g/255,a=t.b/255;return o<=.03928?n=o/12.92:n=Math.pow((o+.055)/1.055,2.4),s<=.03928?r=s/12.92:r=Math.pow((s+.055)/1.055,2.4),a<=.03928?i=a/12.92:i=Math.pow((a+.055)/1.055,2.4),.2126*n+.7152*r+.0722*i},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(t){return this.a=w6(t),this.roundA=Math.round(100*this.a)/100,this},e.prototype.isMonochrome=function(){var t=this.toHsl().s;return t===0},e.prototype.toHsv=function(){var t=ob(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}},e.prototype.toHsvString=function(){var t=ob(this.r,this.g,this.b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.v*100);return this.a===1?"hsv(".concat(n,", ").concat(r,"%, ").concat(i,"%)"):"hsva(".concat(n,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var t=ED(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}},e.prototype.toHslString=function(){var t=ED(this.r,this.g,this.b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.l*100);return this.a===1?"hsl(".concat(n,", ").concat(r,"%, ").concat(i,"%)"):"hsla(".concat(n,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(t){return t===void 0&&(t=!1),ab(this.r,this.g,this.b,t)},e.prototype.toHexString=function(t){return t===void 0&&(t=!1),"#"+this.toHex(t)},e.prototype.toHex8=function(t){return t===void 0&&(t=!1),rQ(this.r,this.g,this.b,this.a,t)},e.prototype.toHex8String=function(t){return t===void 0&&(t=!1),"#"+this.toHex8(t)},e.prototype.toHexShortString=function(t){return t===void 0&&(t=!1),this.a===1?this.toHexString(t):this.toHex8String(t)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var t=Math.round(this.r),n=Math.round(this.g),r=Math.round(this.b);return this.a===1?"rgb(".concat(t,", ").concat(n,", ").concat(r,")"):"rgba(".concat(t,", ").concat(n,", ").concat(r,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var t=function(n){return"".concat(Math.round(po(n,255)*100),"%")};return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var t=function(n){return Math.round(po(n,255)*100)};return this.a===1?"rgb(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%)"):"rgba(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var t="#"+ab(this.r,this.g,this.b,!1),n=0,r=Object.entries(cE);n<r.length;n++){var i=r[n],o=i[0],s=i[1];if(t===s)return o}return!1},e.prototype.toString=function(t){var n=Boolean(t);t=t!=null?t:this.format;var r=!1,i=this.a<1&&this.a>=0,o=!n&&i&&(t.startsWith("hex")||t==="name");return o?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(r=this.toRgbString()),t==="prgb"&&(r=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(r=this.toHexString()),t==="hex3"&&(r=this.toHexString(!0)),t==="hex4"&&(r=this.toHex8String(!0)),t==="hex8"&&(r=this.toHex8String()),t==="name"&&(r=this.toName()),t==="hsl"&&(r=this.toHslString()),t==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l+=t/100,n.l=ex(n.l),new e(n)},e.prototype.brighten=function(t){t===void 0&&(t=10);var n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),new e(n)},e.prototype.darken=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l-=t/100,n.l=ex(n.l),new e(n)},e.prototype.tint=function(t){return t===void 0&&(t=10),this.mix("white",t)},e.prototype.shade=function(t){return t===void 0&&(t=10),this.mix("black",t)},e.prototype.desaturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s-=t/100,n.s=ex(n.s),new e(n)},e.prototype.saturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s+=t/100,n.s=ex(n.s),new e(n)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var n=this.toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,new e(n)},e.prototype.mix=function(t,n){n===void 0&&(n=50);var r=this.toRgb(),i=new e(t).toRgb(),o=n/100,s={r:(i.r-r.r)*o+r.r,g:(i.g-r.g)*o+r.g,b:(i.b-r.b)*o+r.b,a:(i.a-r.a)*o+r.a};return new e(s)},e.prototype.analogous=function(t,n){t===void 0&&(t=6),n===void 0&&(n=30);var r=this.toHsl(),i=360/n,o=[this];for(r.h=(r.h-(i*t>>1)+720)%360;--t;)r.h=(r.h+i)%360,o.push(new e(r));return o},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){t===void 0&&(t=6);for(var n=this.toHsv(),r=n.h,i=n.s,o=n.v,s=[],a=1/t;t--;)s.push(new e({h:r,s:i,v:o})),o=(o+a)%1;return s},e.prototype.splitcomplement=function(){var t=this.toHsl(),n=t.h;return[this,new e({h:(n+72)%360,s:t.s,l:t.l}),new e({h:(n+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var n=this.toRgb(),r=new e(t).toRgb(),i=n.a+r.a*(1-n.a);return new e({r:(n.r*n.a+r.r*r.a*(1-n.a))/i,g:(n.g*n.a+r.g*r.a*(1-n.a))/i,b:(n.b*n.a+r.b*r.a*(1-n.a))/i,a:i})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var n=this.toHsl(),r=n.h,i=[this],o=360/t,s=1;s<t;s++)i.push(new e({h:(r+s*o)%360,s:n.s,l:n.l}));return i},e.prototype.equals=function(t){return this.toRgbString()===new e(t).toRgbString()},e}(),nx=2,TD=.16,cQ=.05,uQ=.05,dQ=.15,C6=5,S6=4,fQ=[{index:7,opacity:.15},{index:6,opacity:.25},{index:5,opacity:.3},{index:5,opacity:.45},{index:5,opacity:.65},{index:5,opacity:.85},{index:4,opacity:.9},{index:3,opacity:.95},{index:2,opacity:.97},{index:1,opacity:.98}];function ID(e){var t=e.r,n=e.g,r=e.b,i=ob(t,n,r);return{h:i.h*360,s:i.s,v:i.v}}function rx(e){var t=e.r,n=e.g,r=e.b;return"#".concat(ab(t,n,r,!1))}function hQ(e,t,n){var r=n/100,i={r:(t.r-e.r)*r+e.r,g:(t.g-e.g)*r+e.g,b:(t.b-e.b)*r+e.b};return i}function kD(e,t,n){var r;return Math.round(e.h)>=60&&Math.round(e.h)<=240?r=n?Math.round(e.h)-nx*t:Math.round(e.h)+nx*t:r=n?Math.round(e.h)+nx*t:Math.round(e.h)-nx*t,r<0?r+=360:r>=360&&(r-=360),r}function MD(e,t,n){if(e.h===0&&e.s===0)return e.s;var r;return n?r=e.s-TD*t:t===S6?r=e.s+TD:r=e.s+cQ*t,r>1&&(r=1),n&&t===C6&&r>.1&&(r=.1),r<.06&&(r=.06),Number(r.toFixed(2))}function RD(e,t,n){var r;return n?r=e.v+uQ*t:r=e.v-dQ*t,r>1&&(r=1),Number(r.toFixed(2))}function _g(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[],r=Es(e),i=C6;i>0;i-=1){var o=ID(r),s=rx(Es({h:kD(o,i,!0),s:MD(o,i,!0),v:RD(o,i,!0)}));n.push(s)}n.push(rx(r));for(var a=1;a<=S6;a+=1){var u=ID(r),f=rx(Es({h:kD(u,a),s:MD(u,a),v:RD(u,a)}));n.push(f)}return t.theme==="dark"?fQ.map(function(p){var g=p.index,v=p.opacity,b=rx(hQ(Es(t.backgroundColor||"#141414"),Es(n[g]),v*100));return b}):n}var eh={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1890FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},SC={},EC={};Object.keys(eh).forEach(function(e){SC[e]=_g(eh[e]),SC[e].primary=SC[e][5],EC[e]=_g(eh[e],{theme:"dark",backgroundColor:"#141414"}),EC[e].primary=EC[e][5]});function To(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function yd(e,t){if(!e)return!1;if(e.contains)return e.contains(t);for(var n=t;n;){if(n===e)return!0;n=n.parentNode}return!1}var OD="data-rc-order",pQ="rc-util-key",uE=new Map;function E6(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.mark;return t?t.startsWith("data-")?t:"data-".concat(t):pQ}function N_(e){if(e.attachTo)return e.attachTo;var t=document.querySelector("head");return t||document.body}function mQ(e){return e==="queue"?"prependQueue":e?"prepend":"append"}function P6(e){return Array.from((uE.get(e)||e).children).filter(function(t){return t.tagName==="STYLE"})}function T6(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!To())return null;var n=t.csp,r=t.prepend,i=document.createElement("style");i.setAttribute(OD,mQ(r)),n!=null&&n.nonce&&(i.nonce=n==null?void 0:n.nonce),i.innerHTML=e;var o=N_(t),s=o.firstChild;if(r){if(r==="queue"){var a=P6(o).filter(function(u){return["prepend","prependQueue"].includes(u.getAttribute(OD))});if(a.length)return o.insertBefore(i,a[a.length-1].nextSibling),i}o.insertBefore(i,s)}else o.appendChild(i);return i}function I6(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=N_(t);return P6(n).find(function(r){return r.getAttribute(E6(t))===e})}function DD(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=I6(e,t);if(n){var r=N_(t);r.removeChild(n)}}function gQ(e,t){var n=uE.get(e);if(!n||!yd(document,n)){var r=T6("",t),i=r.parentNode;uE.set(e,i),e.removeChild(r)}}function Jg(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=N_(n);gQ(r,n);var i=I6(t,n);if(i){var o,s;if((o=n.csp)!==null&&o!==void 0&&o.nonce&&i.nonce!==((s=n.csp)===null||s===void 0?void 0:s.nonce)){var a;i.nonce=(a=n.csp)===null||a===void 0?void 0:a.nonce}return i.innerHTML!==e&&(i.innerHTML=e),i}var u=T6(e,n);return u.setAttribute(E6(n),t),u}function vQ(e,t){Lr(e,"[@ant-design/icons] ".concat(t))}function AD(e){return on(e)==="object"&&typeof e.name=="string"&&typeof e.theme=="string"&&(on(e.icon)==="object"||typeof e.icon=="function")}function ND(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Object.keys(e).reduce(function(t,n){var r=e[n];switch(n){case"class":t.className=r,delete t.class;break;default:t[n]=r}return t},{})}function dE(e,t,n){return n?Un.createElement(e.tag,me(me({key:t},ND(e.attrs)),n),(e.children||[]).map(function(r,i){return dE(r,"".concat(t,"-").concat(e.tag,"-").concat(i))})):Un.createElement(e.tag,me({key:t},ND(e.attrs)),(e.children||[]).map(function(r,i){return dE(r,"".concat(t,"-").concat(e.tag,"-").concat(i))}))}function k6(e){return _g(e)[0]}function M6(e){return e?Array.isArray(e)?e:[e]:[]}var yQ=`
.anticon {
display: inline-block;
color: inherit;
font-style: normal;
line-height: 0;
text-align: center;
text-transform: none;
vertical-align: -0.125em;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.anticon > * {
line-height: 1;
}
.anticon svg {
display: inline-block;
}
.anticon::before {
display: none;
}
.anticon .anticon-icon {
display: block;
}
.anticon[tabindex] {
cursor: pointer;
}
.anticon-spin::before,
.anticon-spin {
display: inline-block;
-webkit-animation: loadingCircle 1s infinite linear;
animation: loadingCircle 1s infinite linear;
}
@-webkit-keyframes loadingCircle {
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
}
}
@keyframes loadingCircle {
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
}
}
`,xQ=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:yQ,n=E.exports.useContext(HT),r=n.csp;E.exports.useEffect(function(){Jg(t,"@ant-design-icons",{prepend:!0,csp:r})},[])},bQ=["icon","className","onClick","style","primaryColor","secondaryColor"],Hm={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function _Q(e){var t=e.primaryColor,n=e.secondaryColor;Hm.primaryColor=t,Hm.secondaryColor=n||k6(t),Hm.calculated=!!n}function wQ(){return me({},Hm)}var L_=function(t){var n=t.icon,r=t.className,i=t.onClick,o=t.style,s=t.primaryColor,a=t.secondaryColor,u=kn(t,bQ),f=Hm;if(s&&(f={primaryColor:s,secondaryColor:a||k6(s)}),xQ(),vQ(AD(n),"icon should be icon definiton, but got ".concat(n)),!AD(n))return null;var p=n;return p&&typeof p.icon=="function"&&(p=me(me({},p),{},{icon:p.icon(f.primaryColor,f.secondaryColor)})),dE(p.icon,"svg-".concat(p.name),me({className:r,onClick:i,style:o,"data-icon":p.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},u))};L_.displayName="IconReact";L_.getTwoToneColors=wQ;L_.setTwoToneColors=_Q;const ZT=L_;function R6(e){var t=M6(e),n=$e(t,2),r=n[0],i=n[1];return ZT.setTwoToneColors({primaryColor:r,secondaryColor:i})}function CQ(){var e=ZT.getTwoToneColors();return e.calculated?[e.primaryColor,e.secondaryColor]:e.primaryColor}var SQ=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];R6("#1890ff");var z_=E.exports.forwardRef(function(e,t){var n,r=e.className,i=e.icon,o=e.spin,s=e.rotate,a=e.tabIndex,u=e.onClick,f=e.twoToneColor,p=kn(e,SQ),g=E.exports.useContext(HT),v=g.prefixCls,b=v===void 0?"anticon":v,_=g.rootClassName,T=je(_,b,(n={},ae(n,"".concat(b,"-").concat(i.name),!!i.name),ae(n,"".concat(b,"-spin"),!!o||i.name==="loading"),n),r),I=a;I===void 0&&u&&(I=-1);var P=s?{msTransform:"rotate(".concat(s,"deg)"),transform:"rotate(".concat(s,"deg)")}:void 0,M=M6(f),D=$e(M,2),N=D[0],z=D[1];return A("span",{...me(me({role:"img","aria-label":i.name},p),{},{ref:t,tabIndex:I,onClick:u,className:T}),children:A(ZT,{icon:i,primaryColor:N,secondaryColor:z,style:P})})});z_.displayName="AntdIcon";z_.getTwoToneColor=CQ;z_.setTwoToneColor=R6;const Yn=z_;var O6=function(t,n){return A(Yn,{...me(me({},t),{},{ref:n,icon:YY})})};O6.displayName="CheckCircleFilled";const XT=E.exports.forwardRef(O6);var EQ={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm165.4 618.2l-66-.3L512 563.4l-99.3 118.4-66.1.3c-4.4 0-8-3.5-8-8 0-1.9.7-3.7 1.9-5.2l130.1-155L340.5 359a8.32 8.32 0 01-1.9-5.2c0-4.4 3.6-8 8-8l66.1.3L512 464.6l99.3-118.4 66-.3c4.4 0 8 3.5 8 8 0 1.9-.7 3.7-1.9 5.2L553.5 514l130 155c1.2 1.5 1.9 3.3 1.9 5.2 0 4.4-3.6 8-8 8z"}}]},name:"close-circle",theme:"filled"};const PQ=EQ;var D6=function(t,n){return A(Yn,{...me(me({},t),{},{ref:n,icon:PQ})})};D6.displayName="CloseCircleFilled";const zh=E.exports.forwardRef(D6);var TQ={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"exclamation-circle",theme:"filled"};const IQ=TQ;var A6=function(t,n){return A(Yn,{...me(me({},t),{},{ref:n,icon:IQ})})};A6.displayName="ExclamationCircleFilled";const N6=E.exports.forwardRef(A6);var kQ={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"info-circle",theme:"filled"};const MQ=kQ;var L6=function(t,n){return A(Yn,{...me(me({},t),{},{ref:n,icon:MQ})})};L6.displayName="InfoCircleFilled";const z6=E.exports.forwardRef(L6);var RQ={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"}}]},name:"loading",theme:"outlined"};const F6=RQ;var $6=function(t,n){return A(Yn,{...me(me({},t),{},{ref:n,icon:F6})})};$6.displayName="LoadingOutlined";const Id=E.exports.forwardRef($6);var ev=me({},NG),OQ=ev.version,DQ=ev.render,AQ=ev.unmountComponentAtNode,F_;try{var NQ=Number((OQ||"").split(".")[0]);NQ>=18&&(F_=ev.createRoot)}catch{}function LD(e){var t=ev.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;t&&on(t)==="object"&&(t.usingClientEntryPoint=e)}var sb="__rc_react_root__";function LQ(e,t){LD(!0);var n=t[sb]||F_(t);LD(!1),n.render(e),t[sb]=n}function zQ(e,t){DQ(e,t)}function B6(e,t){if(F_){LQ(e,t);return}zQ(e,t)}function FQ(e){return fE.apply(this,arguments)}function fE(){return fE=du(Hi().mark(function e(t){return Hi().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",Promise.resolve().then(function(){var i;(i=t[sb])===null||i===void 0||i.unmount(),delete t[sb]}));case 1:case"end":return r.stop()}},e)})),fE.apply(this,arguments)}function $Q(e){AQ(e)}function V6(e){return hE.apply(this,arguments)}function hE(){return hE=du(Hi().mark(function e(t){return Hi().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if(F_===void 0){r.next=2;break}return r.abrupt("return",FQ(t));case 2:$Q(t);case 3:case"end":return r.stop()}},e)})),hE.apply(this,arguments)}function zD(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit".concat(e)]="webkit".concat(t),n["Moz".concat(e)]="moz".concat(t),n["ms".concat(e)]="MS".concat(t),n["O".concat(e)]="o".concat(t.toLowerCase()),n}function BQ(e,t){var n={animationend:zD("Animation","AnimationEnd"),transitionend:zD("Transition","TransitionEnd")};return e&&("AnimationEvent"in t||delete n.animationend.animation,"TransitionEvent"in t||delete n.transitionend.transition),n}var VQ=BQ(To(),typeof window<"u"?window:{}),U6={};if(To()){var UQ=document.createElement("div");U6=UQ.style}var ix={};function j6(e){if(ix[e])return ix[e];var t=VQ[e];if(t)for(var n=Object.keys(t),r=n.length,i=0;i<r;i+=1){var o=n[i];if(Object.prototype.hasOwnProperty.call(t,o)&&o in U6)return ix[e]=t[o],ix[e]}return""}var H6=j6("animationend"),K6=j6("transitionend"),W6=!!(H6&&K6),FD=H6||"animationend",$D=K6||"transitionend";function BD(e,t){if(!e)return null;if(on(e)==="object"){var n=t.replace(/-\w/g,function(r){return r[1].toUpperCase()});return e[n]}return"".concat(e,"-").concat(t)}var kf="none",ox="appear",ax="enter",sx="leave",VD="none",Dl="prepare",jf="start",Hf="active",YT="end";function Ul(e){var t=E.exports.useRef(!1),n=E.exports.useState(e),r=$e(n,2),i=r[0],o=r[1];E.exports.useEffect(function(){return t.current=!1,function(){t.current=!0}},[]);function s(a,u){u&&t.current||o(a)}return[i,s]}var G6=function(t){return+setTimeout(t,16)},q6=function(t){return clearTimeout(t)};typeof window<"u"&&"requestAnimationFrame"in window&&(G6=function(t){return window.requestAnimationFrame(t)},q6=function(t){return window.cancelAnimationFrame(t)});var UD=0,QT=new Map;function Z6(e){QT.delete(e)}var cr=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;UD+=1;var r=UD;function i(o){if(o===0)Z6(r),t();else{var s=G6(function(){i(o-1)});QT.set(r,s)}}return i(n),r};cr.cancel=function(e){var t=QT.get(e);return Z6(t),q6(t)};const jQ=function(){var e=E.exports.useRef(null);function t(){cr.cancel(e.current)}function n(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;t();var o=cr(function(){i<=1?r({isCanceled:function(){return o!==e.current}}):n(r,i-1)});e.current=o}return E.exports.useEffect(function(){return function(){t()}},[]),[n,t]};var X6=To()?E.exports.useLayoutEffect:E.exports.useEffect,jD=[Dl,jf,Hf,YT],Y6=!1,HQ=!0;function Q6(e){return e===Hf||e===YT}const KQ=function(e,t){var n=Ul(VD),r=$e(n,2),i=r[0],o=r[1],s=jQ(),a=$e(s,2),u=a[0],f=a[1];function p(){o(Dl,!0)}return X6(function(){if(i!==VD&&i!==YT){var g=jD.indexOf(i),v=jD[g+1],b=t(i);b===Y6?o(v,!0):u(function(_){function T(){_.isCanceled()||o(v,!0)}b===!0?T():Promise.resolve(b).then(T)})}},[e,i]),E.exports.useEffect(function(){return function(){f()}},[]),[p,i]},WQ=function(e){var t=E.exports.useRef(),n=E.exports.useRef(e);n.current=e;var r=E.exports.useCallback(function(s){n.current(s)},[]);function i(s){s&&(s.removeEventListener($D,r),s.removeEventListener(FD,r))}function o(s){t.current&&t.current!==s&&i(t.current),s&&s!==t.current&&(s.addEventListener($D,r),s.addEventListener(FD,r),t.current=s)}return E.exports.useEffect(function(){return function(){i(t.current)}},[]),[o,i]};function GQ(e,t,n,r){var i=r.motionEnter,o=i===void 0?!0:i,s=r.motionAppear,a=s===void 0?!0:s,u=r.motionLeave,f=u===void 0?!0:u,p=r.motionDeadline,g=r.motionLeaveImmediately,v=r.onAppearPrepare,b=r.onEnterPrepare,_=r.onLeavePrepare,T=r.onAppearStart,I=r.onEnterStart,P=r.onLeaveStart,M=r.onAppearActive,D=r.onEnterActive,N=r.onLeaveActive,z=r.onAppearEnd,$=r.onEnterEnd,j=r.onLeaveEnd,U=r.onVisibleChanged,q=Ul(),Y=$e(q,2),te=Y[0],Z=Y[1],X=Ul(kf),J=$e(X,2),ue=J[0],re=J[1],se=Ul(null),oe=$e(se,2),he=oe[0],Ce=oe[1],Se=E.exports.useRef(!1),be=E.exports.useRef(null);function Re(){return n()}var Ie=E.exports.useRef(!1);function Me(yt){var Tt=Re();if(!(yt&&!yt.deadline&&yt.target!==Tt)){var et=Ie.current,ct;ue===ox&&et?ct=z==null?void 0:z(Tt,yt):ue===ax&&et?ct=$==null?void 0:$(Tt,yt):ue===sx&&et&&(ct=j==null?void 0:j(Tt,yt)),ue!==kf&&et&&ct!==!1&&(re(kf,!0),Ce(null,!0))}}var Ae=WQ(Me),ze=$e(Ae,1),Ke=ze[0],Ue=E.exports.useMemo(function(){var yt,Tt,et;switch(ue){case ox:return yt={},ae(yt,Dl,v),ae(yt,jf,T),ae(yt,Hf,M),yt;case ax:return Tt={},ae(Tt,Dl,b),ae(Tt,jf,I),ae(Tt,Hf,D),Tt;case sx:return et={},ae(et,Dl,_),ae(et,jf,P),ae(et,Hf,N),et;default:return{}}},[ue]),pt=KQ(ue,function(yt){if(yt===Dl){var Tt=Ue[Dl];return Tt?Tt(Re()):Y6}if(qe in Ue){var et;Ce(((et=Ue[qe])===null||et===void 0?void 0:et.call(Ue,Re(),null))||null)}return qe===Hf&&(Ke(Re()),p>0&&(clearTimeout(be.current),be.current=setTimeout(function(){Me({deadline:!0})},p))),HQ}),gt=$e(pt,2),Ot=gt[0],qe=gt[1],Ct=Q6(qe);Ie.current=Ct,X6(function(){Z(t);var yt=Se.current;if(Se.current=!0,!!e){var Tt;!yt&&t&&a&&(Tt=ox),yt&&t&&o&&(Tt=ax),(yt&&!t&&f||!yt&&g&&!t&&f)&&(Tt=sx),Tt&&(re(Tt),Ot())}},[t]),E.exports.useEffect(function(){(ue===ox&&!a||ue===ax&&!o||ue===sx&&!f)&&re(kf)},[a,o,f]),E.exports.useEffect(function(){return function(){Se.current=!1,clearTimeout(be.current)}},[]);var ot=E.exports.useRef(!1);E.exports.useEffect(function(){te&&(ot.current=!0),te!==void 0&&ue===kf&&((ot.current||te)&&(U==null||U(te)),ot.current=!0)},[te,ue]);var vt=he;return Ue[Dl]&&qe===jf&&(vt=me({transition:"none"},vt)),[ue,qe,vt,te!=null?te:t]}var qQ=function(e){si(n,e);var t=li(n);function n(){return jr(this,n),t.apply(this,arguments)}return Hr(n,[{key:"render",value:function(){return this.props.children}}]),n}(E.exports.Component);function ZQ(e){var t=e;on(e)==="object"&&(t=e.transitionSupport);function n(i){return!!(i.motionName&&t)}var r=E.exports.forwardRef(function(i,o){var s=i.visible,a=s===void 0?!0:s,u=i.removeOnLeave,f=u===void 0?!0:u,p=i.forceRender,g=i.children,v=i.motionName,b=i.leavedClassName,_=i.eventProps,T=n(i),I=E.exports.useRef(),P=E.exports.useRef();function M(){try{return I.current instanceof HTMLElement?I.current:xg(P.current)}catch{return null}}var D=GQ(T,a,M,i),N=$e(D,4),z=N[0],$=N[1],j=N[2],U=N[3],q=E.exports.useRef(U);U&&(q.current=!0);var Y=E.exports.useCallback(function(se){I.current=se,nb(o,se)},[o]),te,Z=me(me({},_),{},{visible:a});if(!g)te=null;else if(z===kf||!n(i))U?te=g(me({},Z),Y):!f&&q.current&&b?te=g(me(me({},Z),{},{className:b}),Y):p||!f&&!b?te=g(me(me({},Z),{},{style:{display:"none"}}),Y):te=null;else{var X,J;$===Dl?J="prepare":Q6($)?J="active":$===jf&&(J="start"),te=g(me(me({},Z),{},{className:je(BD(v,z),(X={},ae(X,BD(v,"".concat(z,"-").concat(J)),J),ae(X,v,typeof v=="string"),X)),style:j}),Y)}if(E.exports.isValidElement(te)&&Nh(te)){var ue=te,re=ue.ref;re||(te=E.exports.cloneElement(te,{ref:Y}))}return A(qQ,{ref:P,children:te})});return r.displayName="CSSMotion",r}const oa=ZQ(W6);var pE="add",mE="keep",gE="remove",PC="removed";function XQ(e){var t;return e&&on(e)==="object"&&"key"in e?t=e:t={key:e},me(me({},t),{},{key:String(t.key)})}function vE(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return e.map(XQ)}function YQ(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=[],r=0,i=t.length,o=vE(e),s=vE(t);o.forEach(function(f){for(var p=!1,g=r;g<i;g+=1){var v=s[g];if(v.key===f.key){r<g&&(n=n.concat(s.slice(r,g).map(function(b){return me(me({},b),{},{status:pE})})),r=g),n.push(me(me({},v),{},{status:mE})),r+=1,p=!0;break}}p||n.push(me(me({},f),{},{status:gE}))}),r<i&&(n=n.concat(s.slice(r).map(function(f){return me(me({},f),{},{status:pE})})));var a={};n.forEach(function(f){var p=f.key;a[p]=(a[p]||0)+1});var u=Object.keys(a).filter(function(f){return a[f]>1});return u.forEach(function(f){n=n.filter(function(p){var g=p.key,v=p.status;return g!==f||v!==gE}),n.forEach(function(p){p.key===f&&(p.status=mE)})}),n}var QQ=["component","children","onVisibleChanged","onAllRemoved"],JQ=["status"],eJ=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function tJ(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:oa,n=function(r){si(o,r);var i=li(o);function o(){var s;jr(this,o);for(var a=arguments.length,u=new Array(a),f=0;f<a;f++)u[f]=arguments[f];return s=i.call.apply(i,[this].concat(u)),ae(Fn(s),"state",{keyEntities:[]}),ae(Fn(s),"removeKey",function(p){var g=s.state.keyEntities,v=g.map(function(b){return b.key!==p?b:me(me({},b),{},{status:PC})});return s.setState({keyEntities:v}),v.filter(function(b){var _=b.status;return _!==PC}).length}),s}return Hr(o,[{key:"render",value:function(){var a=this,u=this.state.keyEntities,f=this.props,p=f.component,g=f.children,v=f.onVisibleChanged,b=f.onAllRemoved,_=kn(f,QQ),T=p||E.exports.Fragment,I={};return eJ.forEach(function(P){I[P]=_[P],delete _[P]}),delete _.keys,A(T,{..._,children:u.map(function(P){var M=P.status,D=kn(P,JQ),N=M===pE||M===mE;return E.exports.createElement(t,{...I,key:D.key,visible:N,eventProps:D,onVisibleChanged:function($){if(v==null||v($,{key:D.key}),!$){var j=a.removeKey(D.key);j===0&&b&&b()}}},g)})})}}],[{key:"getDerivedStateFromProps",value:function(a,u){var f=a.keys,p=u.keyEntities,g=vE(f),v=YQ(p,g);return{keyEntities:v.filter(function(b){var _=p.find(function(T){var I=T.key;return b.key===I});return!(_&&_.status===PC&&b.status===gE)})}}}]),o}(E.exports.Component);return ae(n,"defaultProps",{component:"div"}),n}const J6=tJ(W6);var JT=function(e){si(n,e);var t=li(n);function n(){var r;jr(this,n);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return r=t.call.apply(t,[this].concat(o)),r.closeTimer=null,r.close=function(a){a&&a.stopPropagation(),r.clearCloseTimer();var u=r.props,f=u.onClose,p=u.noticeKey;f&&f(p)},r.startCloseTimer=function(){r.props.duration&&(r.closeTimer=window.setTimeout(function(){r.close()},r.props.duration*1e3))},r.clearCloseTimer=function(){r.closeTimer&&(clearTimeout(r.closeTimer),r.closeTimer=null)},r}return Hr(n,[{key:"componentDidMount",value:function(){this.startCloseTimer()}},{key:"componentDidUpdate",value:function(i){(this.props.duration!==i.duration||this.props.updateMark!==i.updateMark||this.props.visible!==i.visible&&this.props.visible)&&this.restartCloseTimer()}},{key:"componentWillUnmount",value:function(){this.clearCloseTimer()}},{key:"restartCloseTimer",value:function(){this.clearCloseTimer(),this.startCloseTimer()}},{key:"render",value:function(){var i=this,o=this.props,s=o.prefixCls,a=o.className,u=o.closable,f=o.closeIcon,p=o.style,g=o.onClick,v=o.children,b=o.holder,_="".concat(s,"-notice"),T=Object.keys(this.props).reduce(function(P,M){return(M.substr(0,5)==="data-"||M.substr(0,5)==="aria-"||M==="role")&&(P[M]=i.props[M]),P},{}),I=it("div",{className:je(_,a,ae({},"".concat(_,"-closable"),u)),style:p,onMouseEnter:this.clearCloseTimer,onMouseLeave:this.startCloseTimer,onClick:g,...T,children:[A("div",{className:"".concat(_,"-content"),children:v}),u?A("a",{tabIndex:0,onClick:this.close,className:"".concat(_,"-close"),children:f||A("span",{className:"".concat(_,"-close-x")})}):null]});return b?iu.createPortal(I,b):I}}]),n}(E.exports.Component);JT.defaultProps={onClose:function(){},duration:1.5};function eI(e){var t=E.exports.useRef({}),n=E.exports.useState([]),r=$e(n,2),i=r[0],o=r[1];function s(a){var u=!0;e.add(a,function(f,p){var g=p.key;if(f&&(!t.current[g]||u)){var v=A(JT,{...p,holder:f});t.current[g]=v,o(function(b){var _=b.findIndex(function(I){return I.key===p.key});if(_===-1)return[].concat(Mt(b),[v]);var T=Mt(b);return T[_]=v,T})}u=!1})}return[s,A(nr,{children:i})]}var nJ=["getContainer"],HD=0,rJ=Date.now();function KD(){var e=HD;return HD+=1,"rcNotification_".concat(rJ,"_").concat(e)}var vh=function(e){si(n,e);var t=li(n);function n(){var r;jr(this,n);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return r=t.call.apply(t,[this].concat(o)),r.state={notices:[]},r.hookRefs=new Map,r.add=function(a,u){var f,p=(f=a.key)!==null&&f!==void 0?f:KD(),g=me(me({},a),{},{key:p}),v=r.props.maxCount;r.setState(function(b){var _=b.notices,T=_.map(function(P){return P.notice.key}).indexOf(p),I=_.concat();return T!==-1?I.splice(T,1,{notice:g,holderCallback:u}):(v&&_.length>=v&&(g.key=I[0].notice.key,g.updateMark=KD(),g.userPassKey=p,I.shift()),I.push({notice:g,holderCallback:u})),{notices:I}})},r.remove=function(a){r.setState(function(u){var f=u.notices;return{notices:f.filter(function(p){var g=p.notice,v=g.key,b=g.userPassKey,_=b!=null?b:v;return _!==a})}})},r.noticePropsMap={},r}return Hr(n,[{key:"getTransitionName",value:function(){var i=this.props,o=i.prefixCls,s=i.animation,a=this.props.transitionName;return!a&&s&&(a="".concat(o,"-").concat(s)),a}},{key:"render",value:function(){var i=this,o=this.state.notices,s=this.props,a=s.prefixCls,u=s.className,f=s.closeIcon,p=s.style,g=[];return o.forEach(function(v,b){var _=v.notice,T=v.holderCallback,I=b===o.length-1?_.updateMark:void 0,P=_.key,M=_.userPassKey,D=me(me(me({prefixCls:a,closeIcon:f},_),_.props),{},{key:P,noticeKey:M||P,updateMark:I,onClose:function(z){var $;i.remove(z),($=_.onClose)===null||$===void 0||$.call(_)},onClick:_.onClick,children:_.content});g.push(P),i.noticePropsMap[P]={props:D,holderCallback:T}}),A("div",{className:je(a,u),style:p,children:A(J6,{keys:g,motionName:this.getTransitionName(),onVisibleChanged:function(b,_){var T=_.key;b||delete i.noticePropsMap[T]},children:function(v){var b=v.key,_=v.className,T=v.style,I=v.visible,P=i.noticePropsMap[b],M=P.props,D=P.holderCallback;return D?A("div",{className:je(_,"".concat(a,"-hook-holder")),style:me({},T),ref:function(z){typeof b>"u"||(z?(i.hookRefs.set(b,z),D(z,M)):i.hookRefs.delete(b))}},b):A(JT,{...M,className:je(_,M==null?void 0:M.className),style:me(me({},T),M==null?void 0:M.style),visible:I})}})})}}]),n}(E.exports.Component);vh.newInstance=void 0;vh.defaultProps={prefixCls:"rc-notification",animation:"fade",style:{top:65,left:"50%"}};vh.newInstance=function(t,n){var r=t||{},i=r.getContainer,o=kn(r,nJ),s=document.createElement("div");if(i){var a=i();a.appendChild(s)}else document.body.appendChild(s);var u=!1;function f(p){u||(u=!0,n({notice:function(v){p.add(v)},removeNotice:function(v){p.remove(v)},component:p,destroy:function(){V6(s),s.parentNode&&s.parentNode.removeChild(s)},useNotification:function(){return eI(p)}}))}B6(A(vh,{...o,ref:f}),s)};function iJ(e,t){var n=function(){var i,o,s=null,a={add:function(T,I){s==null||s.component.add(T,I)}},u=eI(a),f=$e(u,2),p=f[0],g=f[1];function v(_){var T=_.prefixCls,I=i("message",T),P=i(),M=_.key||s$(),D=new Promise(function(z){var $=function(){return typeof _.onClose=="function"&&_.onClose(),z(!0)};e(Je(Je({},_),{prefixCls:I,rootPrefixCls:P,getPopupContainer:o}),function(j){var U=j.prefixCls,q=j.instance;s=q,p(t(Je(Je({},_),{key:M,onClose:$}),U))})}),N=function(){s&&s.removeNotice(M)};return N.then=function(z,$){return D.then(z,$)},N.promise=D,N}var b=E.exports.useRef({});return b.current.open=v,u$.forEach(function(_){return f$(b.current,_)}),[b.current,A(Bd,{children:function(_){return i=_.getPrefixCls,o=_.getPopupContainer,g}},"holder")]};return n}var Bo,e$=3,t$,oJ=1,n$="",yE="move-up",r$=!1,i$,o$,a$=!1;function s$(){return oJ++}function aJ(e){e.top!==void 0&&(t$=e.top,Bo=null),e.duration!==void 0&&(e$=e.duration),e.prefixCls!==void 0&&(n$=e.prefixCls),e.getContainer!==void 0&&(i$=e.getContainer,Bo=null),e.transitionName!==void 0&&(yE=e.transitionName,Bo=null,r$=!0),e.maxCount!==void 0&&(o$=e.maxCount,Bo=null),e.rtl!==void 0&&(a$=e.rtl)}function l$(e,t){var n=e.prefixCls,r=e.getPopupContainer,i=iI(),o=i.getPrefixCls,s=i.getRootPrefixCls,a=i.getIconPrefixCls,u=o("message",n||n$),f=s(e.rootPrefixCls,u),p=a();if(Bo){t({prefixCls:u,rootPrefixCls:f,iconPrefixCls:p,instance:Bo});return}var g={prefixCls:u,transitionName:r$?yE:"".concat(f,"-").concat(yE),style:{top:t$},getContainer:i$||r,maxCount:o$};vh.newInstance(g,function(v){if(Bo){t({prefixCls:u,rootPrefixCls:f,iconPrefixCls:p,instance:Bo});return}Bo=v,t({prefixCls:u,rootPrefixCls:f,iconPrefixCls:p,instance:v})})}var c$={info:z6,success:XT,error:zh,warning:N6,loading:Id},u$=Object.keys(c$);function d$(e,t,n){var r,i=e.duration!==void 0?e.duration:e$,o=c$[e.type],s=je("".concat(t,"-custom-content"),(r={},ae(r,"".concat(t,"-").concat(e.type),e.type),ae(r,"".concat(t,"-rtl"),a$===!0),r));return{key:e.key,duration:i,style:e.style||{},className:e.className,content:A($h,{iconPrefixCls:n,children:it("div",{className:s,children:[e.icon||o&&A(o,{}),A("span",{children:e.content})]})}),onClose:e.onClose,onClick:e.onClick}}function sJ(e){var t=e.key||s$(),n=new Promise(function(i){var o=function(){return typeof e.onClose=="function"&&e.onClose(),i(!0)};l$(e,function(s){var a=s.prefixCls,u=s.iconPrefixCls,f=s.instance;f.notice(d$(Je(Je({},e),{key:t,onClose:o}),a,u))})}),r=function(){var o;Bo&&(Bo.removeNotice(t),(o=e.onClose)===null||o===void 0||o.call(e))};return r.then=function(i,o){return n.then(i,o)},r.promise=n,r}function lJ(e){return Object.prototype.toString.call(e)==="[object Object]"&&!!e.content}var wg={open:sJ,config:aJ,destroy:function(t){if(Bo)if(t){var n=Bo,r=n.removeNotice;r(t)}else{var i=Bo,o=i.destroy;o(),Bo=null}}};function f$(e,t){e[t]=function(n,r,i){return lJ(n)?e.open(Je(Je({},n),{type:t})):(typeof r=="function"&&(i=r,r=void 0),e.open({content:n,duration:r,type:t,onClose:i}))}}u$.forEach(function(e){return f$(wg,e)});wg.warn=wg.warning;wg.useMessage=iJ(l$,d$);const cJ=wg;var uJ={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M699 353h-46.9c-10.2 0-19.9 4.9-25.9 13.3L469 584.3l-71.2-98.8c-6-8.3-15.6-13.3-25.9-13.3H325c-6.5 0-10.3 7.4-6.5 12.7l124.6 172.8a31.8 31.8 0 0051.7 0l210.6-292c3.9-5.3.1-12.7-6.4-12.7z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"check-circle",theme:"outlined"};const dJ=uJ;var h$=function(t,n){return A(Yn,{...me(me({},t),{},{ref:n,icon:dJ})})};h$.displayName="CheckCircleOutlined";const tI=E.exports.forwardRef(h$);var fJ={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M685.4 354.8c0-4.4-3.6-8-8-8l-66 .3L512 465.6l-99.3-118.4-66.1-.3c-4.4 0-8 3.5-8 8 0 1.9.7 3.7 1.9 5.2l130.1 155L340.5 670a8.32 8.32 0 00-1.9 5.2c0 4.4 3.6 8 8 8l66.1-.3L512 564.4l99.3 118.4 66 .3c4.4 0 8-3.5 8-8 0-1.9-.7-3.7-1.9-5.2L553.5 515l130.1-155c1.2-1.4 1.8-3.3 1.8-5.2z"}},{tag:"path",attrs:{d:"M512 65C264.6 65 64 265.6 64 513s200.6 448 448 448 448-200.6 448-448S759.4 65 512 65zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"close-circle",theme:"outlined"};const hJ=fJ;var p$=function(t,n){return A(Yn,{...me(me({},t),{},{ref:n,icon:hJ})})};p$.displayName="CloseCircleOutlined";const nI=E.exports.forwardRef(p$);var pJ={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9A7.95 7.95 0 00203 838h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z"}}]},name:"close",theme:"outlined"};const mJ=pJ;var m$=function(t,n){return A(Yn,{...me(me({},t),{},{ref:n,icon:mJ})})};m$.displayName="CloseOutlined";const Fh=E.exports.forwardRef(m$);var gJ={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z"}}]},name:"exclamation-circle",theme:"outlined"};const vJ=gJ;var g$=function(t,n){return A(Yn,{...me(me({},t),{},{ref:n,icon:vJ})})};g$.displayName="ExclamationCircleOutlined";const $_=E.exports.forwardRef(g$);var yJ={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"}}]},name:"info-circle",theme:"outlined"};const xJ=yJ;var v$=function(t,n){return A(Yn,{...me(me({},t),{},{ref:n,icon:xJ})})};v$.displayName="InfoCircleOutlined";const rI=E.exports.forwardRef(v$);function bJ(e,t){var n=function(){var i,o=null,s={add:function(_,T){o==null||o.component.add(_,T)}},a=eI(s),u=$e(a,2),f=u[0],p=u[1];function g(b){var _=b.prefixCls,T=i("notification",_);e(Je(Je({},b),{prefixCls:T}),function(I){var P=I.prefixCls,M=I.instance;o=M,f(t(b,P))})}var v=E.exports.useRef({});return v.current.open=g,["success","info","warning","error"].forEach(function(b){v.current[b]=function(_){return v.current.open(Je(Je({},_),{type:b}))}}),[v.current,A(Bd,{children:function(b){return i=b.getPrefixCls,p}},"holder")]};return n}globalThis&&globalThis.__awaiter;var od={},y$=4.5,x$=24,b$=24,_$="",xE="topRight",w$,C$,S$=!1,E$;function _J(e){var t=e.duration,n=e.placement,r=e.bottom,i=e.top,o=e.getContainer,s=e.closeIcon,a=e.prefixCls;a!==void 0&&(_$=a),t!==void 0&&(y$=t),n!==void 0?xE=n:e.rtl&&(xE="topLeft"),r!==void 0&&(b$=r),i!==void 0&&(x$=i),o!==void 0&&(w$=o),s!==void 0&&(C$=s),e.rtl!==void 0&&(S$=e.rtl),e.maxCount!==void 0&&(E$=e.maxCount)}function wJ(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:x$,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:b$,r;switch(e){case"top":r={left:"50%",transform:"translateX(-50%)",right:"auto",top:t,bottom:"auto"};break;case"topLeft":r={left:0,top:t,bottom:"auto"};break;case"topRight":r={right:0,top:t,bottom:"auto"};break;case"bottom":r={left:"50%",transform:"translateX(-50%)",right:"auto",top:"auto",bottom:n};break;case"bottomLeft":r={left:0,top:"auto",bottom:n};break;default:r={right:0,top:"auto",bottom:n};break}return r}function P$(e,t){var n=e.placement,r=n===void 0?xE:n,i=e.top,o=e.bottom,s=e.getContainer,a=s===void 0?w$:s,u=e.prefixCls,f=iI(),p=f.getPrefixCls,g=f.getIconPrefixCls,v=p("notification",u||_$),b=g(),_="".concat(v,"-").concat(r),T=od[_];if(T){Promise.resolve(T).then(function(P){t({prefixCls:"".concat(v,"-notice"),iconPrefixCls:b,instance:P})});return}var I=je("".concat(v,"-").concat(r),ae({},"".concat(v,"-rtl"),S$===!0));od[_]=new Promise(function(P){vh.newInstance({prefixCls:v,className:I,style:wJ(r,i,o),getContainer:a,maxCount:E$},function(M){P(M),t({prefixCls:"".concat(v,"-notice"),iconPrefixCls:b,instance:M})})})}var CJ={success:tI,info:rI,error:nI,warning:$_};function T$(e,t,n){var r=e.duration,i=e.icon,o=e.type,s=e.description,a=e.message,u=e.btn,f=e.onClose,p=e.onClick,g=e.key,v=e.style,b=e.className,_=e.closeIcon,T=_===void 0?C$:_,I=e.props,P=r===void 0?y$:r,M=null;i?M=A("span",{className:"".concat(t,"-icon"),children:e.icon}):o&&(M=E.exports.createElement(CJ[o]||null,{className:"".concat(t,"-icon ").concat(t,"-icon-").concat(o)}));var D=A("span",{className:"".concat(t,"-close-x"),children:T||A(Fh,{className:"".concat(t,"-close-icon")})}),N=!s&&M?A("span",{className:"".concat(t,"-message-single-line-auto-margin")}):null;return{content:A($h,{iconPrefixCls:n,children:it("div",{className:M?"".concat(t,"-with-icon"):"",role:"alert",children:[M,it("div",{className:"".concat(t,"-message"),children:[N,a]}),A("div",{className:"".concat(t,"-description"),children:s}),u?A("span",{className:"".concat(t,"-btn"),children:u}):null]})}),duration:P,closable:!0,closeIcon:D,onClose:f,onClick:p,key:g,style:v||{},className:je(b,ae({},"".concat(t,"-").concat(o),!!o)),props:I}}function SJ(e){P$(e,function(t){var n=t.prefixCls,r=t.iconPrefixCls,i=t.instance;i.notice(T$(e,n,r))})}var yh={open:SJ,close:function(t){Object.keys(od).forEach(function(n){return Promise.resolve(od[n]).then(function(r){r.removeNotice(t)})})},config:_J,destroy:function(){Object.keys(od).forEach(function(t){Promise.resolve(od[t]).then(function(n){n.destroy()}),delete od[t]})}};["success","info","warning","error"].forEach(function(e){yh[e]=function(t){return yh.open(Je(Je({},t),{type:e}))}});yh.warn=yh.warning;yh.useNotification=bJ(P$,T$);const EJ=yh;var PJ=function(t,n){return n||(t?"ant-".concat(t):"ant")},zn=E.exports.createContext({getPrefixCls:PJ}),Bd=zn.Consumer,TJ="-ant-".concat(Date.now(),"-").concat(Math.random());function IJ(e,t){var n={},r=function(p,g){var v=p.clone();return v=(g==null?void 0:g(v))||v,v.toRgbString()},i=function(p,g){var v=new CC(p),b=_g(v.toRgbString());n["".concat(g,"-color")]=r(v),n["".concat(g,"-color-disabled")]=b[1],n["".concat(g,"-color-hover")]=b[4],n["".concat(g,"-color-active")]=b[6],n["".concat(g,"-color-outline")]=v.clone().setAlpha(.2).toRgbString(),n["".concat(g,"-color-deprecated-bg")]=b[0],n["".concat(g,"-color-deprecated-border")]=b[2]};if(t.primaryColor){i(t.primaryColor,"primary");var o=new CC(t.primaryColor),s=_g(o.toRgbString());s.forEach(function(f,p){n["primary-".concat(p+1)]=f}),n["primary-color-deprecated-l-35"]=r(o,function(f){return f.lighten(35)}),n["primary-color-deprecated-l-20"]=r(o,function(f){return f.lighten(20)}),n["primary-color-deprecated-t-20"]=r(o,function(f){return f.tint(20)}),n["primary-color-deprecated-t-50"]=r(o,function(f){return f.tint(50)}),n["primary-color-deprecated-f-12"]=r(o,function(f){return f.setAlpha(f.getAlpha()*.12)});var a=new CC(s[0]);n["primary-color-active-deprecated-f-30"]=r(a,function(f){return f.setAlpha(f.getAlpha()*.3)}),n["primary-color-active-deprecated-d-02"]=r(a,function(f){return f.darken(2)})}t.successColor&&i(t.successColor,"success"),t.warningColor&&i(t.warningColor,"warning"),t.errorColor&&i(t.errorColor,"error"),t.infoColor&&i(t.infoColor,"info");var u=Object.keys(n).map(function(f){return"--".concat(e,"-").concat(f,": ").concat(n[f],";")});return`
:root {
`.concat(u.join(`
`),`
}
`).trim()}function kJ(e,t){var n=IJ(e,t);To()&&Jg(n,"".concat(TJ,"-dynamic-theme"))}var bE=E.exports.createContext(!1),MJ=function(t){var n=t.children,r=t.disabled,i=E.exports.useContext(bE);return A(bE.Provider,{value:r!=null?r:i,children:n})};const fu=bE;var _E=E.exports.createContext(void 0),RJ=function(t){var n=t.children,r=t.size;return A(_E.Consumer,{children:function(i){return A(_E.Provider,{value:r||i,children:n})}})};const Jl=_E;var OJ=["getTargetContainer","getPopupContainer","renderEmpty","pageHeader","input","pagination","form"],DJ="ant",AJ="anticon",lb,I$;function o0(){return lb||DJ}function NJ(){return I$||AJ}var LJ=function(t){var n=t.prefixCls,r=t.iconPrefixCls,i=t.theme;n!==void 0&&(lb=n),r!==void 0&&(I$=r),i&&kJ(o0(),i)},iI=function(){return{getPrefixCls:function(n,r){return r||(n?"".concat(o0(),"-").concat(n):o0())},getIconPrefixCls:NJ,getRootPrefixCls:function(n,r){return n||lb||(r&&r.includes("-")?r.replace(/^(.*)-[^-]*$/,"$1"):o0())}}},zJ=function(t){var n,r,i=t.children,o=t.csp,s=t.autoInsertSpaceInButton,a=t.form,u=t.locale,f=t.componentSize,p=t.direction,g=t.space,v=t.virtual,b=t.dropdownMatchSelectWidth,_=t.legacyLocale,T=t.parentContext,I=t.iconPrefixCls,P=t.componentDisabled,M=E.exports.useCallback(function(U,q){var Y=t.prefixCls;if(q)return q;var te=Y||T.getPrefixCls("");return U?"".concat(te,"-").concat(U):te},[T.getPrefixCls,t.prefixCls]),D=Je(Je({},T),{csp:o,autoInsertSpaceInButton:s,locale:u||_,direction:p,space:g,virtual:v,dropdownMatchSelectWidth:b,getPrefixCls:M});OJ.forEach(function(U){var q=t[U];q&&(D[U]=q)});var N=Xg(function(){return D},D,function(U,q){var Y=Object.keys(U),te=Object.keys(q);return Y.length!==te.length||Y.some(function(Z){return U[Z]!==q[Z]})}),z=E.exports.useMemo(function(){return{prefixCls:I,csp:o}},[I,o]),$=i,j={};return u&&(j=((n=u.Form)===null||n===void 0?void 0:n.defaultValidateMessages)||((r=Ms.Form)===null||r===void 0?void 0:r.defaultValidateMessages)||{}),a&&a.validateMessages&&(j=Je(Je({},j),a.validateMessages)),Object.keys(j).length>0&&($=A(y6,{validateMessages:j,children:i})),u&&($=A(GY,{locale:u,_ANT_MARK__:KY,children:$})),(I||o)&&($=A(HT.Provider,{value:z,children:$})),f&&($=A(RJ,{size:f,children:$})),P!==void 0&&($=A(MJ,{disabled:P,children:$})),A(zn.Provider,{value:N,children:$})},$h=function(t){return E.exports.useEffect(function(){t.direction&&(cJ.config({rtl:t.direction==="rtl"}),EJ.config({rtl:t.direction==="rtl"}))},[t.direction]),A(Lh,{children:function(n,r,i){return A(Bd,{children:function(o){return A(zJ,{parentContext:o,legacyLocale:i,...t})}})}})};$h.ConfigContext=zn;$h.SizeContext=Jl;$h.config=LJ;function Qo(e,t,n,r){var i=iu.unstable_batchedUpdates?function(s){iu.unstable_batchedUpdates(n,s)}:n;return e.addEventListener&&e.addEventListener(t,i,r),{remove:function(){e.removeEventListener&&e.removeEventListener(t,i,r)}}}function k$(e){return Object.keys(e).reduce(function(t,n){return(n.startsWith("data-")||n.startsWith("aria-")||n==="role")&&!n.startsWith("data-__")&&(t[n]=e[n]),t},{})}var Ta=E.exports.isValidElement;function M$(e){return e&&Ta(e)&&e.type===E.exports.Fragment}function R$(e,t,n){return Ta(e)?E.exports.cloneElement(e,typeof n=="function"?n(e.props||{}):n):t}function Pi(e,t){return R$(e,e,t)}var FJ=function(e){si(n,e);var t=li(n);function n(){var r;return jr(this,n),r=t.apply(this,arguments),r.state={error:void 0,info:{componentStack:""}},r}return Hr(n,[{key:"componentDidCatch",value:function(i,o){this.setState({error:i,info:o})}},{key:"render",value:function(){var i=this.props,o=i.message,s=i.description,a=i.children,u=this.state,f=u.error,p=u.info,g=p&&p.componentStack?p.componentStack:null,v=typeof o>"u"?(f||"").toString():o,b=typeof s>"u"?g:s;return f?A(D$,{type:"error",message:v,description:A("pre",{children:b})}):a}}]),n}(E.exports.Component);const $J=FJ;var BJ=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},VJ={success:XT,info:z6,error:zh,warning:N6},UJ={success:tI,info:rI,error:nI,warning:$_},jJ=function(t){var n=t.description,r=t.icon,i=t.prefixCls,o=t.type,s=(n?UJ:VJ)[o]||null;return r?R$(r,A("span",{className:"".concat(i,"-icon"),children:r}),function(){return{className:je("".concat(i,"-icon"),ae({},r.props.className,r.props.className))}}):E.exports.createElement(s,{className:"".concat(i,"-icon")})},HJ=function(t){var n=t.isClosable,r=t.closeText,i=t.prefixCls,o=t.closeIcon,s=t.handleClose;return n?A("button",{type:"button",onClick:s,className:"".concat(i,"-close-icon"),tabIndex:0,children:r?A("span",{className:"".concat(i,"-close-text"),children:r}):o}):null},O$=function(t){var n,r=t.description,i=t.prefixCls,o=t.message,s=t.banner,a=t.className,u=a===void 0?"":a,f=t.style,p=t.onMouseEnter,g=t.onMouseLeave,v=t.onClick,b=t.afterClose,_=t.showIcon,T=t.closable,I=t.closeText,P=t.closeIcon,M=P===void 0?A(Fh,{}):P,D=t.action,N=BJ(t,["description","prefixCls","message","banner","className","style","onMouseEnter","onMouseLeave","onClick","afterClose","showIcon","closable","closeText","closeIcon","action"]),z=E.exports.useState(!1),$=$e(z,2),j=$[0],U=$[1],q=E.exports.useRef(),Y=E.exports.useContext(zn),te=Y.getPrefixCls,Z=Y.direction,X=te("alert",i),J=function(be){var Re;U(!0),(Re=N.onClose)===null||Re===void 0||Re.call(N,be)},ue=function(){var be=N.type;return be!==void 0?be:s?"warning":"info"},re=I?!0:T,se=ue(),oe=s&&_===void 0?!0:_,he=je(X,"".concat(X,"-").concat(se),(n={},ae(n,"".concat(X,"-with-description"),!!r),ae(n,"".concat(X,"-no-icon"),!oe),ae(n,"".concat(X,"-banner"),!!s),ae(n,"".concat(X,"-rtl"),Z==="rtl"),n),u),Ce=k$(N);return A(oa,{visible:!j,motionName:"".concat(X,"-motion"),motionAppear:!1,motionEnter:!1,onLeaveStart:function(be){return{maxHeight:be.offsetHeight}},onLeaveEnd:b,children:function(Se){var be=Se.className,Re=Se.style;return it("div",{ref:q,"data-show":!j,className:je(he,be),style:Je(Je({},f),Re),onMouseEnter:p,onMouseLeave:g,onClick:v,role:"alert",...Ce,children:[oe?A(jJ,{description:r,icon:N.icon,prefixCls:X,type:se}):null,it("div",{className:"".concat(X,"-content"),children:[o?A("div",{className:"".concat(X,"-message"),children:o}):null,r?A("div",{className:"".concat(X,"-description"),children:r}):null]}),D?A("div",{className:"".concat(X,"-action"),children:D}):null,A(HJ,{isClosable:!!re,closeText:I,prefixCls:X,closeIcon:M,handleClose:J})]})}})};O$.ErrorBoundary=$J;const D$=O$;function wE(e){return e!=null&&e===e.window}function KJ(e,t){var n,r;if(typeof window>"u")return 0;var i=t?"scrollTop":"scrollLeft",o=0;return wE(e)?o=e[t?"pageYOffset":"pageXOffset"]:e instanceof Document?o=e.documentElement[i]:(e instanceof HTMLElement||e)&&(o=e[i]),e&&!wE(e)&&typeof o!="number"&&(o=(r=((n=e.ownerDocument)!==null&&n!==void 0?n:e).documentElement)===null||r===void 0?void 0:r[i]),o}function WJ(e,t,n,r){var i=n-t;return e/=r/2,e<1?i/2*e*e*e+t:i/2*((e-=2)*e*e+2)+t}function GJ(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.getContainer,r=n===void 0?function(){return window}:n,i=t.callback,o=t.duration,s=o===void 0?450:o,a=r(),u=KJ(a,!0),f=Date.now(),p=function g(){var v=Date.now(),b=v-f,_=WJ(b>s?s:b,u,e,s);wE(a)?a.scrollTo(window.pageXOffset,_):a instanceof Document||a.constructor.name==="HTMLDocument"?a.documentElement.scrollTop=_:a.scrollTop=_,b<s?cr(g):typeof i=="function"&&i()};cr(p)}function Cg(e){var t=E.exports.useRef();t.current=e;var n=E.exports.useCallback(function(){for(var r,i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return(r=t.current)===null||r===void 0?void 0:r.call.apply(r,[t].concat(o))},[]);return n}var Si=To()?E.exports.useLayoutEffect:E.exports.useEffect,WD=function(t,n){var r=E.exports.useRef(!0);Si(function(){if(!r.current)return t()},n),Si(function(){return r.current=!1,function(){r.current=!0}},[])};function TC(e){return e!==void 0}function Ei(e,t){var n=t||{},r=n.defaultValue,i=n.value,o=n.onChange,s=n.postState,a=Ul(function(){return TC(i)?i:TC(r)?typeof r=="function"?r():r:typeof e=="function"?e():e}),u=$e(a,2),f=u[0],p=u[1],g=i!==void 0?i:f,v=s?s(g):g,b=Cg(o),_=Ul([g]),T=$e(_,2),I=T[0],P=T[1];WD(function(){var D=I[0];f!==D&&b(f,D)},[I]),WD(function(){TC(i)||p(i)},[i]);var M=Cg(function(D,N){p(D,N),P([g],N)});return[v,M]}const A$=function(){if(typeof navigator>"u"||typeof window>"u")return!1;var e=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(e==null?void 0:e.substr(0,4))};var Pt={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(t){var n=t.keyCode;if(t.altKey&&!t.ctrlKey||t.metaKey||n>=Pt.F1&&n<=Pt.F12)return!1;switch(n){case Pt.ALT:case Pt.CAPS_LOCK:case Pt.CONTEXT_MENU:case Pt.CTRL:case Pt.DOWN:case Pt.END:case Pt.ESC:case Pt.HOME:case Pt.INSERT:case Pt.LEFT:case Pt.MAC_FF_META:case Pt.META:case Pt.NUMLOCK:case Pt.NUM_CENTER:case Pt.PAGE_DOWN:case Pt.PAGE_UP:case Pt.PAUSE:case Pt.PRINT_SCREEN:case Pt.RIGHT:case Pt.SHIFT:case Pt.UP:case Pt.WIN_KEY:case Pt.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(t){if(t>=Pt.ZERO&&t<=Pt.NINE||t>=Pt.NUM_ZERO&&t<=Pt.NUM_MULTIPLY||t>=Pt.A&&t<=Pt.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&t===0)return!0;switch(t){case Pt.SPACE:case Pt.QUESTION_MARK:case Pt.NUM_PLUS:case Pt.NUM_MINUS:case Pt.NUM_PERIOD:case Pt.NUM_DIVISION:case Pt.SEMICOLON:case Pt.DASH:case Pt.EQUALS:case Pt.COMMA:case Pt.PERIOD:case Pt.SLASH:case Pt.APOSTROPHE:case Pt.SINGLE_QUOTE:case Pt.OPEN_SQUARE_BRACKET:case Pt.BACKSLASH:case Pt.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},N$=E.exports.createContext(null);function L$(){return E.exports.useContext(N$)}function qJ(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,t=E.exports.useState(!1),n=$e(t,2),r=n[0],i=n[1],o=E.exports.useRef(null),s=function(){window.clearTimeout(o.current)};E.exports.useEffect(function(){return s},[]);var a=function(f,p){s(),o.current=window.setTimeout(function(){i(f),p&&p()},e)};return[r,a,s]}function z$(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,t=E.exports.useRef(null),n=E.exports.useRef(null);E.exports.useEffect(function(){return function(){window.clearTimeout(n.current)}},[]);function r(i){(i||t.current===null)&&(t.current=i),window.clearTimeout(n.current),n.current=window.setTimeout(function(){t.current=null},e)}return[function(){return t.current},r]}function ZJ(e,t,n,r){var i=E.exports.useRef(null);i.current={open:t,triggerOpen:n,customizedTrigger:r},E.exports.useEffect(function(){function o(s){var a;if(!((a=i.current)!==null&&a!==void 0&&a.customizedTrigger)){var u=s.target;u.shadowRoot&&s.composed&&(u=s.composedPath()[0]||u),i.current.open&&e().filter(function(f){return f}).every(function(f){return!f.contains(u)&&f!==u})&&i.current.triggerOpen(!1)}}return window.addEventListener("mousedown",o),function(){return window.removeEventListener("mousedown",o)}},[])}var XJ=`accept acceptCharset accessKey action allowFullScreen allowTransparency
alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge
charSet checked classID className colSpan cols content contentEditable contextMenu
controls coords crossOrigin data dateTime default defer dir disabled download draggable
encType form formAction formEncType formMethod formNoValidate formTarget frameBorder
headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity
is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media
mediaGroup method min minLength multiple muted name noValidate nonce open
optimum pattern placeholder poster preload radioGroup readOnly rel required
reversed role rowSpan rows sandbox scope scoped scrolling seamless selected
shape size sizes span spellCheck src srcDoc srcLang srcSet start step style
summary tabIndex target title type useMap value width wmode wrap`,YJ=`onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown
onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick
onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown
onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel
onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough
onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata
onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError`,QJ="".concat(XJ," ").concat(YJ).split(/[\s\n]+/),JJ="aria-",eee="data-";function GD(e,t){return e.indexOf(t)===0}function Zl(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n;t===!1?n={aria:!0,data:!0,attr:!0}:t===!0?n={aria:!0}:n=me({},t);var r={};return Object.keys(e).forEach(function(i){(n.aria&&(i==="role"||GD(i,JJ))||n.data&&GD(i,eee)||n.attr&&QJ.includes(i))&&(r[i]=e[i])}),r}var tee=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],Cf=void 0;function nee(e,t){var n=e.prefixCls,r=e.invalidate,i=e.item,o=e.renderItem,s=e.responsive,a=e.responsiveDisabled,u=e.registerSize,f=e.itemKey,p=e.className,g=e.style,v=e.children,b=e.display,_=e.order,T=e.component,I=T===void 0?"div":T,P=kn(e,tee),M=s&&!b;function D(U){u(f,U)}E.exports.useEffect(function(){return function(){D(null)}},[]);var N=o&&i!==Cf?o(i):v,z;r||(z={opacity:M?0:1,height:M?0:Cf,overflowY:M?"hidden":Cf,order:s?_:Cf,pointerEvents:M?"none":Cf,position:M?"absolute":Cf});var $={};M&&($["aria-hidden"]=!0);var j=A(I,{className:je(!r&&n,p),style:me(me({},z),g),...$,...P,ref:t,children:N});return s&&(j=A(Ql,{onResize:function(q){var Y=q.offsetWidth;D(Y)},disabled:a,children:j})),j}var Km=E.exports.forwardRef(nee);Km.displayName="Item";function ree(){var e=Ul({}),t=$e(e,2),n=t[1],r=E.exports.useRef([]),i=0,o=0;function s(a){var u=i;i+=1,r.current.length<u+1&&(r.current[u]=a);var f=r.current[u];function p(g){r.current[u]=typeof g=="function"?g(r.current[u]):g,cr.cancel(o),o=cr(function(){n({},!0)})}return[f,p]}return s}var iee=["component"],oee=["className"],aee=["className"],see=function(t,n){var r=E.exports.useContext(cb);if(!r){var i=t.component,o=i===void 0?"div":i,s=kn(t,iee);return A(o,{...s,ref:n})}var a=r.className,u=kn(r,oee),f=t.className,p=kn(t,aee);return A(cb.Provider,{value:null,children:A(Km,{ref:n,className:je(a,f),...u,...p})})},F$=E.exports.forwardRef(see);F$.displayName="RawItem";var lee=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","suffix","component","itemComponent","onVisibleChange"],cb=E.exports.createContext(null),$$="responsive",B$="invalidate";function cee(e){return"+ ".concat(e.length," ...")}function uee(e,t){var n=e.prefixCls,r=n===void 0?"rc-overflow":n,i=e.data,o=i===void 0?[]:i,s=e.renderItem,a=e.renderRawItem,u=e.itemKey,f=e.itemWidth,p=f===void 0?10:f,g=e.ssr,v=e.style,b=e.className,_=e.maxCount,T=e.renderRest,I=e.renderRawRest,P=e.suffix,M=e.component,D=M===void 0?"div":M,N=e.itemComponent,z=e.onVisibleChange,$=kn(e,lee),j=ree(),U=g==="full",q=j(null),Y=$e(q,2),te=Y[0],Z=Y[1],X=te||0,J=j(new Map),ue=$e(J,2),re=ue[0],se=ue[1],oe=j(0),he=$e(oe,2),Ce=he[0],Se=he[1],be=j(0),Re=$e(be,2),Ie=Re[0],Me=Re[1],Ae=j(0),ze=$e(Ae,2),Ke=ze[0],Ue=ze[1],pt=E.exports.useState(null),gt=$e(pt,2),Ot=gt[0],qe=gt[1],Ct=E.exports.useState(null),ot=$e(Ct,2),vt=ot[0],yt=ot[1],Tt=E.exports.useMemo(function(){return vt===null&&U?Number.MAX_SAFE_INTEGER:vt||0},[vt,te]),et=E.exports.useState(!1),ct=$e(et,2),at=ct[0],He=ct[1],ut="".concat(r,"-item"),bt=Math.max(Ce,Ie),Dt=_===$$,Lt=o.length&&Dt,Ht=_===B$,Fe=Lt||typeof _=="number"&&o.length>_,Ye=E.exports.useMemo(function(){var dt=o;return Lt?te===null&&U?dt=o:dt=o.slice(0,Math.min(o.length,X/p)):typeof _=="number"&&(dt=o.slice(0,_)),dt},[o,p,te,_,Lt]),Zt=E.exports.useMemo(function(){return Lt?o.slice(Tt+1):o.slice(Ye.length)},[o,Ye,Lt,Tt]),an=E.exports.useCallback(function(dt,mt){var $t;return typeof u=="function"?u(dt):($t=u&&(dt==null?void 0:dt[u]))!==null&&$t!==void 0?$t:mt},[u]),Kt=E.exports.useCallback(s||function(dt){return dt},[s]);function Vt(dt,mt,$t){vt===dt&&(mt===void 0||mt===Ot)||(yt(dt),$t||(He(dt<o.length-1),z==null||z(dt)),mt!==void 0&&qe(mt))}function It(dt,mt){Z(mt.clientWidth)}function Xt(dt,mt){se(function($t){var Wt=new Map($t);return mt===null?Wt.delete(dt):Wt.set(dt,mt),Wt})}function pn(dt,mt){Me(mt),Se(Ie)}function tt(dt,mt){Ue(mt)}function At(dt){return re.get(an(Ye[dt],dt))}Si(function(){if(X&&bt&&Ye){var dt=Ke,mt=Ye.length,$t=mt-1;if(!mt){Vt(0,null);return}for(var Wt=0;Wt<mt;Wt+=1){var mn=At(Wt);if(U&&(mn=mn||0),mn===void 0){Vt(Wt-1,void 0,!0);break}if(dt+=mn,$t===0&&dt<=X||Wt===$t-1&&dt+At($t)<=X){Vt($t,null);break}else if(dt+bt>X){Vt(Wt-1,dt-mn-Ke+Ie);break}}P&&At(0)+Ke>X&&qe(null)}},[X,re,Ie,Ke,an,Ye]);var qt=at&&!!Zt.length,En={};Ot!==null&&Lt&&(En={position:"absolute",left:Ot,top:0});var yn={prefixCls:ut,responsive:Lt,component:N,invalidate:Ht},St=a?function(dt,mt){var $t=an(dt,mt);return A(cb.Provider,{value:me(me({},yn),{},{order:mt,item:dt,itemKey:$t,registerSize:Xt,display:mt<=Tt}),children:a(dt,mt)},$t)}:function(dt,mt){var $t=an(dt,mt);return E.exports.createElement(Km,{...yn,order:mt,key:$t,item:dt,renderItem:Kt,itemKey:$t,registerSize:Xt,display:mt<=Tt})},Pn,_n={order:qt?Tt:Number.MAX_SAFE_INTEGER,className:"".concat(ut,"-rest"),registerSize:pn,display:qt};if(I)I&&(Pn=A(cb.Provider,{value:me(me({},yn),_n),children:I(Zt)}));else{var tn=T||cee;Pn=A(Km,{...yn,..._n,children:typeof tn=="function"?tn(Zt):tn})}var Ft=it(D,{className:je(!Ht&&r,b),style:v,ref:t,...$,children:[Ye.map(St),Fe?Pn:null,P&&A(Km,{...yn,responsive:Dt,responsiveDisabled:!Lt,order:Tt,className:"".concat(ut,"-suffix"),registerSize:tt,display:!0,style:En,children:P})]});return Dt&&(Ft=A(Ql,{onResize:It,disabled:!Lt,children:Ft})),Ft}var nl=E.exports.forwardRef(uee);nl.displayName="Overflow";nl.Item=F$;nl.RESPONSIVE=$$;nl.INVALIDATE=B$;var ub=function(t){var n=t.className,r=t.customizeIcon,i=t.customizeIconProps,o=t.onMouseDown,s=t.onClick,a=t.children,u;return typeof r=="function"?u=r(i):u=r,A("span",{className:n,onMouseDown:function(p){p.preventDefault(),o&&o(p)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:s,"aria-hidden":!0,children:u!==void 0?u:A("span",{className:je(n.split(/\s+/).map(function(f){return"".concat(f,"-icon")})),children:a})})},dee=function(t,n){var r,i,o=t.prefixCls,s=t.id,a=t.inputElement,u=t.disabled,f=t.tabIndex,p=t.autoFocus,g=t.autoComplete,v=t.editable,b=t.activeDescendantId,_=t.value,T=t.maxLength,I=t.onKeyDown,P=t.onMouseDown,M=t.onChange,D=t.onPaste,N=t.onCompositionStart,z=t.onCompositionEnd,$=t.open,j=t.attrs,U=a||A("input",{}),q=U,Y=q.ref,te=q.props,Z=te.onKeyDown,X=te.onChange,J=te.onMouseDown,ue=te.onCompositionStart,re=te.onCompositionEnd,se=te.style;return"maxLength"in U.props,U=E.exports.cloneElement(U,me(me(me({type:"search"},te),{},{id:s,ref:Aa(n,Y),disabled:u,tabIndex:f,autoComplete:g||"off",autoFocus:p,className:je("".concat(o,"-selection-search-input"),(r=U)===null||r===void 0||(i=r.props)===null||i===void 0?void 0:i.className),role:"combobox","aria-expanded":$,"aria-haspopup":"listbox","aria-owns":"".concat(s,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(s,"_list"),"aria-activedescendant":b},j),{},{value:v?_:"",maxLength:T,readOnly:!v,unselectable:v?null:"on",style:me(me({},se),{},{opacity:v?null:0}),onKeyDown:function(he){I(he),Z&&Z(he)},onMouseDown:function(he){P(he),J&&J(he)},onChange:function(he){M(he),X&&X(he)},onCompositionStart:function(he){N(he),ue&&ue(he)},onCompositionEnd:function(he){z(he),re&&re(he)},onPaste:D})),U},oI=E.exports.forwardRef(dee);oI.displayName="Input";function V$(e){return Array.isArray(e)?e:e!==void 0?[e]:[]}var fee=typeof window<"u"&&window.document&&window.document.documentElement,hee=fee;function pee(e){return e!=null}function qD(e){return["string","number"].includes(on(e))}function U$(e){var t=void 0;return e&&(qD(e.title)?t=e.title.toString():qD(e.label)&&(t=e.label.toString())),t}function mee(e,t){hee?E.exports.useLayoutEffect(e,t):E.exports.useEffect(e,t)}function gee(e){var t;return(t=e.key)!==null&&t!==void 0?t:e.value}var ZD=function(t){t.preventDefault(),t.stopPropagation()},vee=function(t){var n=t.id,r=t.prefixCls,i=t.values,o=t.open,s=t.searchValue,a=t.autoClearSearchValue,u=t.inputRef,f=t.placeholder,p=t.disabled,g=t.mode,v=t.showSearch,b=t.autoFocus,_=t.autoComplete,T=t.activeDescendantId,I=t.tabIndex,P=t.removeIcon,M=t.maxTagCount,D=t.maxTagTextLength,N=t.maxTagPlaceholder,z=N===void 0?function(qe){return"+ ".concat(qe.length," ...")}:N,$=t.tagRender,j=t.onToggleOpen,U=t.onRemove,q=t.onInputChange,Y=t.onInputPaste,te=t.onInputKeyDown,Z=t.onInputMouseDown,X=t.onInputCompositionStart,J=t.onInputCompositionEnd,ue=E.exports.useRef(null),re=E.exports.useState(0),se=$e(re,2),oe=se[0],he=se[1],Ce=E.exports.useState(!1),Se=$e(Ce,2),be=Se[0],Re=Se[1],Ie="".concat(r,"-selection"),Me=o||g==="multiple"&&a===!1||g==="tags"?s:"",Ae=g==="tags"||g==="multiple"&&a===!1||v&&(o||be);mee(function(){he(ue.current.scrollWidth)},[Me]);function ze(qe,Ct,ot,vt,yt){return it("span",{className:je("".concat(Ie,"-item"),ae({},"".concat(Ie,"-item-disabled"),ot)),title:U$(qe),children:[A("span",{className:"".concat(Ie,"-item-content"),children:Ct}),vt&&A(ub,{className:"".concat(Ie,"-item-remove"),onMouseDown:ZD,onClick:yt,customizeIcon:P,children:"\xD7"})]})}function Ke(qe,Ct,ot,vt,yt){var Tt=function(ct){ZD(ct),j(!o)};return A("span",{onMouseDown:Tt,children:$({label:Ct,value:qe,disabled:ot,closable:vt,onClose:yt})})}function Ue(qe){var Ct=qe.disabled,ot=qe.label,vt=qe.value,yt=!p&&!Ct,Tt=ot;if(typeof D=="number"&&(typeof ot=="string"||typeof ot=="number")){var et=String(Tt);et.length>D&&(Tt="".concat(et.slice(0,D),"..."))}var ct=function(He){He&&He.stopPropagation(),U(qe)};return typeof $=="function"?Ke(vt,Tt,Ct,yt,ct):ze(qe,Tt,Ct,yt,ct)}function pt(qe){var Ct=typeof z=="function"?z(qe):z;return ze({title:Ct},Ct,!1)}var gt=it("div",{className:"".concat(Ie,"-search"),style:{width:oe},onFocus:function(){Re(!0)},onBlur:function(){Re(!1)},children:[A(oI,{ref:u,open:o,prefixCls:r,id:n,inputElement:null,disabled:p,autoFocus:b,autoComplete:_,editable:Ae,activeDescendantId:T,value:Me,onKeyDown:te,onMouseDown:Z,onChange:q,onPaste:Y,onCompositionStart:X,onCompositionEnd:J,tabIndex:I,attrs:Zl(t,!0)}),it("span",{ref:ue,className:"".concat(Ie,"-search-mirror"),"aria-hidden":!0,children:[Me,"\xA0"]})]}),Ot=A(nl,{prefixCls:"".concat(Ie,"-overflow"),data:i,renderItem:Ue,renderRest:pt,suffix:gt,itemKey:gee,maxCount:M});return it(nr,{children:[Ot,!i.length&&!Me&&A("span",{className:"".concat(Ie,"-placeholder"),children:f})]})},yee=function(t){var n=t.inputElement,r=t.prefixCls,i=t.id,o=t.inputRef,s=t.disabled,a=t.autoFocus,u=t.autoComplete,f=t.activeDescendantId,p=t.mode,g=t.open,v=t.values,b=t.placeholder,_=t.tabIndex,T=t.showSearch,I=t.searchValue,P=t.activeValue,M=t.maxLength,D=t.onInputKeyDown,N=t.onInputMouseDown,z=t.onInputChange,$=t.onInputPaste,j=t.onInputCompositionStart,U=t.onInputCompositionEnd,q=E.exports.useState(!1),Y=$e(q,2),te=Y[0],Z=Y[1],X=p==="combobox",J=X||T,ue=v[0],re=I||"";X&&P&&!te&&(re=P),E.exports.useEffect(function(){X&&Z(!1)},[X,P]);var se=p!=="combobox"&&!g&&!T?!1:!!re,oe=U$(ue),he=function(){if(ue)return null;var Se=se?{visibility:"hidden"}:void 0;return A("span",{className:"".concat(r,"-selection-placeholder"),style:Se,children:b})};return it(nr,{children:[A("span",{className:"".concat(r,"-selection-search"),children:A(oI,{ref:o,prefixCls:r,id:i,open:g,inputElement:n,disabled:s,autoFocus:a,autoComplete:u,editable:J,activeDescendantId:f,value:re,onKeyDown:D,onMouseDown:N,onChange:function(Se){Z(!0),z(Se)},onPaste:$,onCompositionStart:j,onCompositionEnd:U,tabIndex:_,attrs:Zl(t,!0),maxLength:X?M:void 0})}),!X&&ue&&!se&&A("span",{className:"".concat(r,"-selection-item"),title:oe,children:ue.label}),he()]})};function xee(e){return![Pt.ESC,Pt.SHIFT,Pt.BACKSPACE,Pt.TAB,Pt.WIN_KEY,Pt.ALT,Pt.META,Pt.WIN_KEY_RIGHT,Pt.CTRL,Pt.SEMICOLON,Pt.EQUALS,Pt.CAPS_LOCK,Pt.CONTEXT_MENU,Pt.F1,Pt.F2,Pt.F3,Pt.F4,Pt.F5,Pt.F6,Pt.F7,Pt.F8,Pt.F9,Pt.F10,Pt.F11,Pt.F12].includes(e)}var bee=function(t,n){var r=E.exports.useRef(null),i=E.exports.useRef(!1),o=t.prefixCls,s=t.open,a=t.mode,u=t.showSearch,f=t.tokenWithEnter,p=t.autoClearSearchValue,g=t.onSearch,v=t.onSearchSubmit,b=t.onToggleOpen,_=t.onInputKeyDown,T=t.domRef;E.exports.useImperativeHandle(n,function(){return{focus:function(){r.current.focus()},blur:function(){r.current.blur()}}});var I=z$(0),P=$e(I,2),M=P[0],D=P[1],N=function(se){var oe=se.which;(oe===Pt.UP||oe===Pt.DOWN)&&se.preventDefault(),_&&_(se),oe===Pt.ENTER&&a==="tags"&&!i.current&&!s&&(v==null||v(se.target.value)),xee(oe)&&b(!0)},z=function(){D(!0)},$=E.exports.useRef(null),j=function(se){g(se,!0,i.current)!==!1&&b(!0)},U=function(){i.current=!0},q=function(se){i.current=!1,a!=="combobox"&&j(se.target.value)},Y=function(se){var oe=se.target.value;if(f&&$.current&&/[\r\n]/.test($.current)){var he=$.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");oe=oe.replace(he,$.current)}$.current=null,j(oe)},te=function(se){var oe=se.clipboardData,he=oe.getData("text");$.current=he},Z=function(se){var oe=se.target;if(oe!==r.current){var he=document.body.style.msTouchAction!==void 0;he?setTimeout(function(){r.current.focus()}):r.current.focus()}},X=function(se){var oe=M();se.target!==r.current&&!oe&&a!=="combobox"&&se.preventDefault(),(a!=="combobox"&&(!u||!oe)||!s)&&(s&&p!==!1&&g("",!0,!1),b())},J={inputRef:r,onInputKeyDown:N,onInputMouseDown:z,onInputChange:Y,onInputPaste:te,onInputCompositionStart:U,onInputCompositionEnd:q},ue=a==="multiple"||a==="tags"?A(vee,{...t,...J}):A(yee,{...t,...J});return A("div",{ref:T,className:"".concat(o,"-selector"),onClick:Z,onMouseDown:X,children:ue})},j$=E.exports.forwardRef(bee);j$.displayName="Selector";var _ee=E.exports.forwardRef(function(e,t){var n=e.didUpdate,r=e.getContainer,i=e.children,o=E.exports.useRef(),s=E.exports.useRef();E.exports.useImperativeHandle(t,function(){return{}});var a=E.exports.useRef(!1);return!a.current&&To()&&(s.current=r(),o.current=s.current.parentNode,a.current=!0),E.exports.useEffect(function(){n==null||n(e)}),E.exports.useEffect(function(){return s.current.parentNode===null&&o.current!==null&&o.current.appendChild(s.current),function(){var u,f;(u=s.current)===null||u===void 0||(f=u.parentNode)===null||f===void 0||f.removeChild(s.current)}},[]),s.current?iu.createPortal(i,s.current):null});function wee(e,t,n){return n?e[0]===t[0]:e[0]===t[0]&&e[1]===t[1]}function Cee(e,t,n){var r=e[t]||{};return me(me({},r),n)}function See(e,t,n,r){for(var i=n.points,o=Object.keys(e),s=0;s<o.length;s+=1){var a=o[s];if(wee(e[a].points,i,r))return"".concat(t,"-placement-").concat(a)}return""}function H$(e){var t=e.prefixCls,n=e.motion,r=e.animation,i=e.transitionName;return n||(r?{motionName:"".concat(t,"-").concat(r)}:i?{motionName:i}:null)}function Eee(e){var t=e.prefixCls,n=e.visible,r=e.zIndex,i=e.mask,o=e.maskMotion,s=e.maskAnimation,a=e.maskTransitionName;if(!i)return null;var u={};return(o||a||s)&&(u=me({motionAppear:!0},H$({motion:o,prefixCls:t,transitionName:a,animation:s}))),A(oa,{...u,visible:n,removeOnLeave:!0,children:function(f){var p=f.className;return A("div",{style:{zIndex:r},className:je("".concat(t,"-mask"),p)})}})}function XD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function YD(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?XD(Object(n),!0).forEach(function(r){Pee(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):XD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function CE(e){return CE=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},CE(e)}function Pee(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var nm,Tee={Webkit:"-webkit-",Moz:"-moz-",ms:"-ms-",O:"-o-"};function db(){if(nm!==void 0)return nm;nm="";var e=document.createElement("p").style,t="Transform";for(var n in Tee)n+t in e&&(nm=n);return nm}function K$(){return db()?"".concat(db(),"TransitionProperty"):"transitionProperty"}function B_(){return db()?"".concat(db(),"Transform"):"transform"}function QD(e,t){var n=K$();n&&(e.style[n]=t,n!=="transitionProperty"&&(e.style.transitionProperty=t))}function IC(e,t){var n=B_();n&&(e.style[n]=t,n!=="transform"&&(e.style.transform=t))}function Iee(e){return e.style.transitionProperty||e.style[K$()]}function kee(e){var t=window.getComputedStyle(e,null),n=t.getPropertyValue("transform")||t.getPropertyValue(B_());if(n&&n!=="none"){var r=n.replace(/[^0-9\-.,]/g,"").split(",");return{x:parseFloat(r[12]||r[4],0),y:parseFloat(r[13]||r[5],0)}}return{x:0,y:0}}var Mee=/matrix\((.*)\)/,Ree=/matrix3d\((.*)\)/;function Oee(e,t){var n=window.getComputedStyle(e,null),r=n.getPropertyValue("transform")||n.getPropertyValue(B_());if(r&&r!=="none"){var i,o=r.match(Mee);if(o)o=o[1],i=o.split(",").map(function(a){return parseFloat(a,10)}),i[4]=t.x,i[5]=t.y,IC(e,"matrix(".concat(i.join(","),")"));else{var s=r.match(Ree)[1];i=s.split(",").map(function(a){return parseFloat(a,10)}),i[12]=t.x,i[13]=t.y,IC(e,"matrix3d(".concat(i.join(","),")"))}}else IC(e,"translateX(".concat(t.x,"px) translateY(").concat(t.y,"px) translateZ(0)"))}var Dee=/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source,tv;function JD(e){var t=e.style.display;e.style.display="none",e.offsetHeight,e.style.display=t}function th(e,t,n){var r=n;if(CE(t)==="object"){for(var i in t)t.hasOwnProperty(i)&&th(e,i,t[i]);return}if(typeof r<"u"){typeof r=="number"&&(r="".concat(r,"px")),e.style[t]=r;return}return tv(e,t)}function Aee(e){var t,n,r,i=e.ownerDocument,o=i.body,s=i&&i.documentElement;return t=e.getBoundingClientRect(),n=Math.floor(t.left),r=Math.floor(t.top),n-=s.clientLeft||o.clientLeft||0,r-=s.clientTop||o.clientTop||0,{left:n,top:r}}function W$(e,t){var n=e["page".concat(t?"Y":"X","Offset")],r="scroll".concat(t?"Top":"Left");if(typeof n!="number"){var i=e.document;n=i.documentElement[r],typeof n!="number"&&(n=i.body[r])}return n}function G$(e){return W$(e)}function q$(e){return W$(e,!0)}function Sg(e){var t=Aee(e),n=e.ownerDocument,r=n.defaultView||n.parentWindow;return t.left+=G$(r),t.top+=q$(r),t}function aI(e){return e!=null&&e==e.window}function Z$(e){return aI(e)?e.document:e.nodeType===9?e:e.ownerDocument}function Nee(e,t,n){var r=n,i="",o=Z$(e);return r=r||o.defaultView.getComputedStyle(e,null),r&&(i=r.getPropertyValue(t)||r[t]),i}var Lee=new RegExp("^(".concat(Dee,")(?!px)[a-z%]+$"),"i"),zee=/^(top|right|bottom|left)$/,kC="currentStyle",MC="runtimeStyle",Uu="left",Fee="px";function $ee(e,t){var n=e[kC]&&e[kC][t];if(Lee.test(n)&&!zee.test(t)){var r=e.style,i=r[Uu],o=e[MC][Uu];e[MC][Uu]=e[kC][Uu],r[Uu]=t==="fontSize"?"1em":n||0,n=r.pixelLeft+Fee,r[Uu]=i,e[MC][Uu]=o}return n===""?"auto":n}typeof window<"u"&&(tv=window.getComputedStyle?Nee:$ee);function lx(e,t){return e==="left"?t.useCssRight?"right":e:t.useCssBottom?"bottom":e}function eA(e){if(e==="left")return"right";if(e==="right")return"left";if(e==="top")return"bottom";if(e==="bottom")return"top"}function tA(e,t,n){th(e,"position")==="static"&&(e.style.position="relative");var r=-999,i=-999,o=lx("left",n),s=lx("top",n),a=eA(o),u=eA(s);o!=="left"&&(r=999),s!=="top"&&(i=999);var f="",p=Sg(e);("left"in t||"top"in t)&&(f=Iee(e)||"",QD(e,"none")),"left"in t&&(e.style[a]="",e.style[o]="".concat(r,"px")),"top"in t&&(e.style[u]="",e.style[s]="".concat(i,"px")),JD(e);var g=Sg(e),v={};for(var b in t)if(t.hasOwnProperty(b)){var _=lx(b,n),T=b==="left"?r:i,I=p[b]-g[b];_===b?v[_]=T+I:v[_]=T-I}th(e,v),JD(e),("left"in t||"top"in t)&&QD(e,f);var P={};for(var M in t)if(t.hasOwnProperty(M)){var D=lx(M,n),N=t[M]-p[M];M===D?P[D]=v[D]+N:P[D]=v[D]-N}th(e,P)}function Bee(e,t){var n=Sg(e),r=kee(e),i={x:r.x,y:r.y};"left"in t&&(i.x=r.x+t.left-n.left),"top"in t&&(i.y=r.y+t.top-n.top),Oee(e,i)}function Vee(e,t,n){if(n.ignoreShake){var r=Sg(e),i=r.left.toFixed(0),o=r.top.toFixed(0),s=t.left.toFixed(0),a=t.top.toFixed(0);if(i===s&&o===a)return}n.useCssRight||n.useCssBottom?tA(e,t,n):n.useCssTransform&&B_()in document.body.style?Bee(e,t):tA(e,t,n)}function sI(e,t){for(var n=0;n<e.length;n++)t(e[n])}function X$(e){return tv(e,"boxSizing")==="border-box"}var Uee=["margin","border","padding"],SE=-1,jee=2,EE=1,Hee=0;function Kee(e,t,n){var r={},i=e.style,o;for(o in t)t.hasOwnProperty(o)&&(r[o]=i[o],i[o]=t[o]);n.call(e);for(o in t)t.hasOwnProperty(o)&&(i[o]=r[o])}function Sm(e,t,n){var r=0,i,o,s;for(o=0;o<t.length;o++)if(i=t[o],i)for(s=0;s<n.length;s++){var a=void 0;i==="border"?a="".concat(i).concat(n[s],"Width"):a=i+n[s],r+=parseFloat(tv(e,a))||0}return r}var Qs={getParent:function(t){var n=t;do n.nodeType===11&&n.host?n=n.host:n=n.parentNode;while(n&&n.nodeType!==1&&n.nodeType!==9);return n}};sI(["Width","Height"],function(e){Qs["doc".concat(e)]=function(t){var n=t.document;return Math.max(n.documentElement["scroll".concat(e)],n.body["scroll".concat(e)],Qs["viewport".concat(e)](n))},Qs["viewport".concat(e)]=function(t){var n="client".concat(e),r=t.document,i=r.body,o=r.documentElement,s=o[n];return r.compatMode==="CSS1Compat"&&s||i&&i[n]||s}});function nA(e,t,n){var r=n;if(aI(e))return t==="width"?Qs.viewportWidth(e):Qs.viewportHeight(e);if(e.nodeType===9)return t==="width"?Qs.docWidth(e):Qs.docHeight(e);var i=t==="width"?["Left","Right"]:["Top","Bottom"],o=Math.floor(t==="width"?e.getBoundingClientRect().width:e.getBoundingClientRect().height),s=X$(e),a=0;(o==null||o<=0)&&(o=void 0,a=tv(e,t),(a==null||Number(a)<0)&&(a=e.style[t]||0),a=Math.floor(parseFloat(a))||0),r===void 0&&(r=s?EE:SE);var u=o!==void 0||s,f=o||a;return r===SE?u?f-Sm(e,["border","padding"],i):a:u?r===EE?f:f+(r===jee?-Sm(e,["border"],i):Sm(e,["margin"],i)):a+Sm(e,Uee.slice(r),i)}var Wee={position:"absolute",visibility:"hidden",display:"block"};function rA(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,i=t[0];return i.offsetWidth!==0?r=nA.apply(void 0,t):Kee(i,Wee,function(){r=nA.apply(void 0,t)}),r}sI(["width","height"],function(e){var t=e.charAt(0).toUpperCase()+e.slice(1);Qs["outer".concat(t)]=function(r,i){return r&&rA(r,e,i?Hee:EE)};var n=e==="width"?["Left","Right"]:["Top","Bottom"];Qs[e]=function(r,i){var o=i;if(o!==void 0){if(r){var s=X$(r);return s&&(o+=Sm(r,["padding","border"],n)),th(r,e,o)}return}return r&&rA(r,e,SE)}});function Y$(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}var Gn={getWindow:function(t){if(t&&t.document&&t.setTimeout)return t;var n=t.ownerDocument||t;return n.defaultView||n.parentWindow},getDocument:Z$,offset:function(t,n,r){if(typeof n<"u")Vee(t,n,r||{});else return Sg(t)},isWindow:aI,each:sI,css:th,clone:function(t){var n,r={};for(n in t)t.hasOwnProperty(n)&&(r[n]=t[n]);var i=t.overflow;if(i)for(n in t)t.hasOwnProperty(n)&&(r.overflow[n]=t.overflow[n]);return r},mix:Y$,getWindowScrollLeft:function(t){return G$(t)},getWindowScrollTop:function(t){return q$(t)},merge:function(){for(var t={},n=0;n<arguments.length;n++)Gn.mix(t,n<0||arguments.length<=n?void 0:arguments[n]);return t},viewportWidth:0,viewportHeight:0};Y$(Gn,Qs);var RC=Gn.getParent;function PE(e){if(Gn.isWindow(e)||e.nodeType===9)return null;var t=Gn.getDocument(e),n=t.body,r,i=Gn.css(e,"position"),o=i==="fixed"||i==="absolute";if(!o)return e.nodeName.toLowerCase()==="html"?null:RC(e);for(r=RC(e);r&&r!==n&&r.nodeType!==9;r=RC(r))if(i=Gn.css(r,"position"),i!=="static")return r;return null}var iA=Gn.getParent;function Gee(e){if(Gn.isWindow(e)||e.nodeType===9)return!1;var t=Gn.getDocument(e),n=t.body,r=null;for(r=iA(e);r&&r!==n&&r!==t;r=iA(r)){var i=Gn.css(r,"position");if(i==="fixed")return!0}return!1}function lI(e,t){for(var n={left:0,right:1/0,top:0,bottom:1/0},r=PE(e),i=Gn.getDocument(e),o=i.defaultView||i.parentWindow,s=i.body,a=i.documentElement;r;){if((navigator.userAgent.indexOf("MSIE")===-1||r.clientWidth!==0)&&r!==s&&r!==a&&Gn.css(r,"overflow")!=="visible"){var u=Gn.offset(r);u.left+=r.clientLeft,u.top+=r.clientTop,n.top=Math.max(n.top,u.top),n.right=Math.min(n.right,u.left+r.clientWidth),n.bottom=Math.min(n.bottom,u.top+r.clientHeight),n.left=Math.max(n.left,u.left)}else if(r===s||r===a)break;r=PE(r)}var f=null;if(!Gn.isWindow(e)&&e.nodeType!==9){f=e.style.position;var p=Gn.css(e,"position");p==="absolute"&&(e.style.position="fixed")}var g=Gn.getWindowScrollLeft(o),v=Gn.getWindowScrollTop(o),b=Gn.viewportWidth(o),_=Gn.viewportHeight(o),T=a.scrollWidth,I=a.scrollHeight,P=window.getComputedStyle(s);if(P.overflowX==="hidden"&&(T=o.innerWidth),P.overflowY==="hidden"&&(I=o.innerHeight),e.style&&(e.style.position=f),t||Gee(e))n.left=Math.max(n.left,g),n.top=Math.max(n.top,v),n.right=Math.min(n.right,g+b),n.bottom=Math.min(n.bottom,v+_);else{var M=Math.max(T,g+b);n.right=Math.min(n.right,M);var D=Math.max(I,v+_);n.bottom=Math.min(n.bottom,D)}return n.top>=0&&n.left>=0&&n.bottom>n.top&&n.right>n.left?n:null}function qee(e,t,n,r){var i=Gn.clone(e),o={width:t.width,height:t.height};return r.adjustX&&i.left<n.left&&(i.left=n.left),r.resizeWidth&&i.left>=n.left&&i.left+o.width>n.right&&(o.width-=i.left+o.width-n.right),r.adjustX&&i.left+o.width>n.right&&(i.left=Math.max(n.right-o.width,n.left)),r.adjustY&&i.top<n.top&&(i.top=n.top),r.resizeHeight&&i.top>=n.top&&i.top+o.height>n.bottom&&(o.height-=i.top+o.height-n.bottom),r.adjustY&&i.top+o.height>n.bottom&&(i.top=Math.max(n.bottom-o.height,n.top)),Gn.mix(i,o)}function cI(e){var t,n,r;if(!Gn.isWindow(e)&&e.nodeType!==9)t=Gn.offset(e),n=Gn.outerWidth(e),r=Gn.outerHeight(e);else{var i=Gn.getWindow(e);t={left:Gn.getWindowScrollLeft(i),top:Gn.getWindowScrollTop(i)},n=Gn.viewportWidth(i),r=Gn.viewportHeight(i)}return t.width=n,t.height=r,t}function oA(e,t){var n=t.charAt(0),r=t.charAt(1),i=e.width,o=e.height,s=e.left,a=e.top;return n==="c"?a+=o/2:n==="b"&&(a+=o),r==="c"?s+=i/2:r==="r"&&(s+=i),{left:s,top:a}}function cx(e,t,n,r,i){var o=oA(t,n[1]),s=oA(e,n[0]),a=[s.left-o.left,s.top-o.top];return{left:Math.round(e.left-a[0]+r[0]-i[0]),top:Math.round(e.top-a[1]+r[1]-i[1])}}function aA(e,t,n){return e.left<n.left||e.left+t.width>n.right}function sA(e,t,n){return e.top<n.top||e.top+t.height>n.bottom}function Zee(e,t,n){return e.left>n.right||e.left+t.width<n.left}function Xee(e,t,n){return e.top>n.bottom||e.top+t.height<n.top}function ux(e,t,n){var r=[];return Gn.each(e,function(i){r.push(i.replace(t,function(o){return n[o]}))}),r}function dx(e,t){return e[t]=-e[t],e}function lA(e,t){var n;return/%$/.test(e)?n=parseInt(e.substring(0,e.length-1),10)/100*t:n=parseInt(e,10),n||0}function cA(e,t){e[0]=lA(e[0],t.width),e[1]=lA(e[1],t.height)}function Q$(e,t,n,r){var i=n.points,o=n.offset||[0,0],s=n.targetOffset||[0,0],a=n.overflow,u=n.source||e;o=[].concat(o),s=[].concat(s),a=a||{};var f={},p=0,g=!!(a&&a.alwaysByViewport),v=lI(u,g),b=cI(u);cA(o,b),cA(s,t);var _=cx(b,t,i,o,s),T=Gn.merge(b,_);if(v&&(a.adjustX||a.adjustY)&&r){if(a.adjustX&&aA(_,b,v)){var I=ux(i,/[lr]/gi,{l:"r",r:"l"}),P=dx(o,0),M=dx(s,0),D=cx(b,t,I,P,M);Zee(D,b,v)||(p=1,i=I,o=P,s=M)}if(a.adjustY&&sA(_,b,v)){var N=ux(i,/[tb]/gi,{t:"b",b:"t"}),z=dx(o,1),$=dx(s,1),j=cx(b,t,N,z,$);Xee(j,b,v)||(p=1,i=N,o=z,s=$)}p&&(_=cx(b,t,i,o,s),Gn.mix(T,_));var U=aA(_,b,v),q=sA(_,b,v);if(U||q){var Y=i;U&&(Y=ux(i,/[lr]/gi,{l:"r",r:"l"})),q&&(Y=ux(i,/[tb]/gi,{t:"b",b:"t"})),i=Y,o=n.offset||[0,0],s=n.targetOffset||[0,0]}f.adjustX=a.adjustX&&U,f.adjustY=a.adjustY&&q,(f.adjustX||f.adjustY)&&(T=qee(_,b,v,f))}return T.width!==b.width&&Gn.css(u,"width",Gn.width(u)+T.width-b.width),T.height!==b.height&&Gn.css(u,"height",Gn.height(u)+T.height-b.height),Gn.offset(u,{left:T.left,top:T.top},{useCssRight:n.useCssRight,useCssBottom:n.useCssBottom,useCssTransform:n.useCssTransform,ignoreShake:n.ignoreShake}),{points:i,offset:o,targetOffset:s,overflow:f}}function Yee(e,t){var n=lI(e,t),r=cI(e);return!n||r.left+r.width<=n.left||r.top+r.height<=n.top||r.left>=n.right||r.top>=n.bottom}function uI(e,t,n){var r=n.target||t,i=cI(r),o=!Yee(r,n.overflow&&n.overflow.alwaysByViewport);return Q$(e,i,n,o)}uI.__getOffsetParent=PE;uI.__getVisibleRectForElement=lI;function Qee(e,t,n){var r,i,o=Gn.getDocument(e),s=o.defaultView||o.parentWindow,a=Gn.getWindowScrollLeft(s),u=Gn.getWindowScrollTop(s),f=Gn.viewportWidth(s),p=Gn.viewportHeight(s);"pageX"in t?r=t.pageX:r=a+t.clientX,"pageY"in t?i=t.pageY:i=u+t.clientY;var g={left:r,top:i,width:0,height:0},v=r>=0&&r<=a+f&&i>=0&&i<=u+p,b=[n.points[0],"cc"];return Q$(e,g,YD(YD({},n),{},{points:b}),v)}function dI(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,r=new Set;function i(o,s){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,u=r.has(o);if(Lr(!u,"Warning: There may be circular references"),u)return!1;if(o===s)return!0;if(n&&a>1)return!1;r.add(o);var f=a+1;if(Array.isArray(o)){if(!Array.isArray(s)||o.length!==s.length)return!1;for(var p=0;p<o.length;p++)if(!i(o[p],s[p],f))return!1;return!0}if(o&&s&&on(o)==="object"&&on(s)==="object"){var g=Object.keys(o);return g.length!==Object.keys(s).length?!1:g.every(function(v){return i(o[v],s[v],f)})}return!1}return i(e,t)}const fI=function(e){if(!e)return!1;if(e instanceof HTMLElement&&e.offsetParent)return!0;if(e instanceof SVGGraphicsElement&&e.getBBox){var t=e.getBBox(),n=t.width,r=t.height;if(n||r)return!0}if(e instanceof HTMLElement&&e.getBoundingClientRect){var i=e.getBoundingClientRect(),o=i.width,s=i.height;if(o||s)return!0}return!1},Jee=function(e,t){var n=Un.useRef(!1),r=Un.useRef(null);function i(){window.clearTimeout(r.current)}function o(s){if(i(),!n.current||s===!0){if(e(s)===!1)return;n.current=!0,r.current=window.setTimeout(function(){n.current=!1},t)}else r.current=window.setTimeout(function(){n.current=!1,o()},t)}return[o,function(){n.current=!1,i()}]};function ete(e,t){return e===t?!0:!e||!t?!1:"pageX"in t&&"pageY"in t?e.pageX===t.pageX&&e.pageY===t.pageY:"clientX"in t&&"clientY"in t?e.clientX===t.clientX&&e.clientY===t.clientY:!1}function tte(e,t){e!==document.activeElement&&yd(t,e)&&typeof e.focus=="function"&&e.focus()}function uA(e,t){var n=null,r=null;function i(s){var a=$e(s,1),u=a[0].target;if(!!document.documentElement.contains(u)){var f=u.getBoundingClientRect(),p=f.width,g=f.height,v=Math.floor(p),b=Math.floor(g);(n!==v||r!==b)&&Promise.resolve().then(function(){t({width:v,height:b})}),n=v,r=b}}var o=new i6(i);return e&&o.observe(e),function(){o.disconnect()}}function dA(e){return typeof e!="function"?null:e()}function fA(e){return on(e)!=="object"||!e?null:e}var nte=function(t,n){var r=t.children,i=t.disabled,o=t.target,s=t.align,a=t.onAlign,u=t.monitorWindowResize,f=t.monitorBufferTime,p=f===void 0?0:f,g=Un.useRef({}),v=Un.useRef(),b=Un.Children.only(r),_=Un.useRef({});_.current.disabled=i,_.current.target=o,_.current.align=s,_.current.onAlign=a;var T=Jee(function(){var te=_.current,Z=te.disabled,X=te.target,J=te.align,ue=te.onAlign,re=v.current;if(!Z&&X&&re){var se,oe=dA(X),he=fA(X);g.current.element=oe,g.current.point=he,g.current.align=J;var Ce=document,Se=Ce.activeElement;return oe&&fI(oe)?se=uI(re,oe,J):he&&(se=Qee(re,he,J)),tte(Se,re),ue&&se&&ue(re,se),!0}return!1},p),I=$e(T,2),P=I[0],M=I[1],D=Un.useState(),N=$e(D,2),z=N[0],$=N[1],j=Un.useState(),U=$e(j,2),q=U[0],Y=U[1];return Si(function(){$(dA(o)),Y(fA(o))}),Un.useEffect(function(){(g.current.element!==z||!ete(g.current.point,q)||!dI(g.current.align,s))&&P()}),Un.useEffect(function(){var te=uA(v.current,P);return te},[v.current]),Un.useEffect(function(){var te=uA(z,P);return te},[z]),Un.useEffect(function(){i?M():P()},[i]),Un.useEffect(function(){if(u){var te=Qo(window,"resize",P);return te.remove}},[u]),Un.useEffect(function(){return function(){M()}},[]),Un.useImperativeHandle(n,function(){return{forceAlign:function(){return P(!0)}}}),Un.isValidElement(b)&&(b=Un.cloneElement(b,{ref:Aa(b.ref,v)})),b},J$=Un.forwardRef(nte);J$.displayName="Align";var hA=["measure","alignPre","align",null,"motion"];const rte=function(e,t){var n=Ul(null),r=$e(n,2),i=r[0],o=r[1],s=E.exports.useRef();function a(p){o(p,!0)}function u(){cr.cancel(s.current)}function f(p){u(),s.current=cr(function(){a(function(g){switch(i){case"align":return"motion";case"motion":return"stable"}return g}),p==null||p()})}return E.exports.useEffect(function(){a("measure")},[e]),E.exports.useEffect(function(){switch(i){case"measure":t();break}i&&(s.current=cr(du(Hi().mark(function p(){var g,v;return Hi().wrap(function(_){for(;;)switch(_.prev=_.next){case 0:g=hA.indexOf(i),v=hA[g+1],v&&g!==-1&&a(v);case 3:case"end":return _.stop()}},p)}))))},[i]),E.exports.useEffect(function(){return function(){u()}},[]),[i,f]},ite=function(e){var t=E.exports.useState({width:0,height:0}),n=$e(t,2),r=n[0],i=n[1];function o(a){var u=a.offsetWidth,f=a.offsetHeight,p=a.getBoundingClientRect(),g=p.width,v=p.height;Math.abs(u-g)<1&&Math.abs(f-v)<1&&(u=g,f=v),i({width:u,height:f})}var s=E.exports.useMemo(function(){var a={};if(e){var u=r.width,f=r.height;e.indexOf("height")!==-1&&f?a.height=f:e.indexOf("minHeight")!==-1&&f&&(a.minHeight=f),e.indexOf("width")!==-1&&u?a.width=u:e.indexOf("minWidth")!==-1&&u&&(a.minWidth=u)}return a},[e,r]);return[s,o]};var eB=E.exports.forwardRef(function(e,t){var n=e.visible,r=e.prefixCls,i=e.className,o=e.style,s=e.children,a=e.zIndex,u=e.stretch,f=e.destroyPopupOnHide,p=e.forceRender,g=e.align,v=e.point,b=e.getRootDomNode,_=e.getClassNameFromAlign,T=e.onAlign,I=e.onMouseEnter,P=e.onMouseLeave,M=e.onMouseDown,D=e.onTouchStart,N=e.onClick,z=E.exports.useRef(),$=E.exports.useRef(),j=E.exports.useState(),U=$e(j,2),q=U[0],Y=U[1],te=ite(u),Z=$e(te,2),X=Z[0],J=Z[1];function ue(){u&&J(b())}var re=rte(n,ue),se=$e(re,2),oe=se[0],he=se[1],Ce=E.exports.useState(0),Se=$e(Ce,2),be=Se[0],Re=Se[1],Ie=E.exports.useRef();Si(function(){oe==="alignPre"&&Re(0)},[oe]);function Me(){return v||b}function Ae(){var qe;(qe=z.current)===null||qe===void 0||qe.forceAlign()}function ze(qe,Ct){var ot=_(Ct);q!==ot&&Y(ot),Re(function(vt){return vt+1}),oe==="align"&&(T==null||T(qe,Ct))}Si(function(){oe==="align"&&(be<3?Ae():he(function(){var qe;(qe=Ie.current)===null||qe===void 0||qe.call(Ie)}))},[be]);var Ke=me({},H$(e));["onAppearEnd","onEnterEnd","onLeaveEnd"].forEach(function(qe){var Ct=Ke[qe];Ke[qe]=function(ot,vt){return he(),Ct==null?void 0:Ct(ot,vt)}});function Ue(){return new Promise(function(qe){Ie.current=qe})}E.exports.useEffect(function(){!Ke.motionName&&oe==="motion"&&he()},[Ke.motionName,oe]),E.exports.useImperativeHandle(t,function(){return{forceAlign:Ae,getElement:function(){return $.current}}});var pt=me(me({},X),{},{zIndex:a,opacity:oe==="motion"||oe==="stable"||!n?void 0:0,pointerEvents:!n&&oe!=="stable"?"none":void 0},o),gt=!0;g!=null&&g.points&&(oe==="align"||oe==="stable")&&(gt=!1);var Ot=s;return E.exports.Children.count(s)>1&&(Ot=A("div",{className:"".concat(r,"-content"),children:s})),A(oa,{visible:n,ref:$,leavedClassName:"".concat(r,"-hidden"),...Ke,onAppearPrepare:Ue,onEnterPrepare:Ue,removeOnLeave:f,forceRender:p,children:function(qe,Ct){var ot=qe.className,vt=qe.style,yt=je(r,i,q,ot);return A(J$,{target:Me(),ref:z,monitorWindowResize:!0,disabled:gt,align:g,onAlign:ze,children:A("div",{ref:Ct,className:yt,onMouseEnter:I,onMouseLeave:P,onMouseDownCapture:M,onTouchStartCapture:D,onClick:N,style:me(me({},vt),pt),children:Ot})},"popup")}})});eB.displayName="PopupInner";var tB=E.exports.forwardRef(function(e,t){var n=e.prefixCls,r=e.visible,i=e.zIndex,o=e.children,s=e.mobile;s=s===void 0?{}:s;var a=s.popupClassName,u=s.popupStyle,f=s.popupMotion,p=f===void 0?{}:f,g=s.popupRender,v=e.onClick,b=E.exports.useRef();E.exports.useImperativeHandle(t,function(){return{forceAlign:function(){},getElement:function(){return b.current}}});var _=me({zIndex:i},u),T=o;return E.exports.Children.count(o)>1&&(T=A("div",{className:"".concat(n,"-content"),children:o})),g&&(T=g(T)),A(oa,{visible:r,ref:b,removeOnLeave:!0,...p,children:function(I,P){var M=I.className,D=I.style,N=je(n,a,M);return A("div",{ref:P,className:N,onClick:v,style:me(me({},D),_),children:T})}})});tB.displayName="MobilePopupInner";var ote=["visible","mobile"],nB=E.exports.forwardRef(function(e,t){var n=e.visible,r=e.mobile,i=kn(e,ote),o=E.exports.useState(n),s=$e(o,2),a=s[0],u=s[1],f=E.exports.useState(!1),p=$e(f,2),g=p[0],v=p[1],b=me(me({},i),{},{visible:a});E.exports.useEffect(function(){u(n),n&&r&&v(A$())},[n,r]);var _=g?A(tB,{...b,mobile:r,ref:t}):A(eB,{...b,ref:t});return it("div",{children:[A(Eee,{...b}),_]})});nB.displayName="Popup";var pA=E.exports.createContext(null);function OC(){}function ate(){return""}function ste(e){return e?e.ownerDocument:window.document}var lte=["onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur","onContextMenu"];function cte(e){var t=function(n){si(i,n);var r=li(i);function i(o){var s;jr(this,i),s=r.call(this,o),ae(Fn(s),"popupRef",E.exports.createRef()),ae(Fn(s),"triggerRef",E.exports.createRef()),ae(Fn(s),"portalContainer",void 0),ae(Fn(s),"attachId",void 0),ae(Fn(s),"clickOutsideHandler",void 0),ae(Fn(s),"touchOutsideHandler",void 0),ae(Fn(s),"contextMenuOutsideHandler1",void 0),ae(Fn(s),"contextMenuOutsideHandler2",void 0),ae(Fn(s),"mouseDownTimeout",void 0),ae(Fn(s),"focusTime",void 0),ae(Fn(s),"preClickTime",void 0),ae(Fn(s),"preTouchTime",void 0),ae(Fn(s),"delayTimer",void 0),ae(Fn(s),"hasPopupMouseDown",void 0),ae(Fn(s),"onMouseEnter",function(u){var f=s.props.mouseEnterDelay;s.fireEvents("onMouseEnter",u),s.delaySetPopupVisible(!0,f,f?null:u)}),ae(Fn(s),"onMouseMove",function(u){s.fireEvents("onMouseMove",u),s.setPoint(u)}),ae(Fn(s),"onMouseLeave",function(u){s.fireEvents("onMouseLeave",u),s.delaySetPopupVisible(!1,s.props.mouseLeaveDelay)}),ae(Fn(s),"onPopupMouseEnter",function(){s.clearDelayTimer()}),ae(Fn(s),"onPopupMouseLeave",function(u){var f;u.relatedTarget&&!u.relatedTarget.setTimeout&&yd((f=s.popupRef.current)===null||f===void 0?void 0:f.getElement(),u.relatedTarget)||s.delaySetPopupVisible(!1,s.props.mouseLeaveDelay)}),ae(Fn(s),"onFocus",function(u){s.fireEvents("onFocus",u),s.clearDelayTimer(),s.isFocusToShow()&&(s.focusTime=Date.now(),s.delaySetPopupVisible(!0,s.props.focusDelay))}),ae(Fn(s),"onMouseDown",function(u){s.fireEvents("onMouseDown",u),s.preClickTime=Date.now()}),ae(Fn(s),"onTouchStart",function(u){s.fireEvents("onTouchStart",u),s.preTouchTime=Date.now()}),ae(Fn(s),"onBlur",function(u){s.fireEvents("onBlur",u),s.clearDelayTimer(),s.isBlurToHide()&&s.delaySetPopupVisible(!1,s.props.blurDelay)}),ae(Fn(s),"onContextMenu",function(u){u.preventDefault(),s.fireEvents("onContextMenu",u),s.setPopupVisible(!0,u)}),ae(Fn(s),"onContextMenuClose",function(){s.isContextMenuToShow()&&s.close()}),ae(Fn(s),"onClick",function(u){if(s.fireEvents("onClick",u),s.focusTime){var f;if(s.preClickTime&&s.preTouchTime?f=Math.min(s.preClickTime,s.preTouchTime):s.preClickTime?f=s.preClickTime:s.preTouchTime&&(f=s.preTouchTime),Math.abs(f-s.focusTime)<20)return;s.focusTime=0}s.preClickTime=0,s.preTouchTime=0,s.isClickToShow()&&(s.isClickToHide()||s.isBlurToHide())&&u&&u.preventDefault&&u.preventDefault();var p=!s.state.popupVisible;(s.isClickToHide()&&!p||p&&s.isClickToShow())&&s.setPopupVisible(!s.state.popupVisible,u)}),ae(Fn(s),"onPopupMouseDown",function(){if(s.hasPopupMouseDown=!0,clearTimeout(s.mouseDownTimeout),s.mouseDownTimeout=window.setTimeout(function(){s.hasPopupMouseDown=!1},0),s.context){var u;(u=s.context).onPopupMouseDown.apply(u,arguments)}}),ae(Fn(s),"onDocumentClick",function(u){if(!(s.props.mask&&!s.props.maskClosable)){var f=u.target,p=s.getRootDomNode(),g=s.getPopupDomNode();(!yd(p,f)||s.isContextMenuOnly())&&!yd(g,f)&&!s.hasPopupMouseDown&&s.close()}}),ae(Fn(s),"getRootDomNode",function(){var u=s.props.getTriggerDOMNode;if(u)return u(s.triggerRef.current);try{var f=xg(s.triggerRef.current);if(f)return f}catch{}return iu.findDOMNode(Fn(s))}),ae(Fn(s),"getPopupClassNameFromAlign",function(u){var f=[],p=s.props,g=p.popupPlacement,v=p.builtinPlacements,b=p.prefixCls,_=p.alignPoint,T=p.getPopupClassNameFromAlign;return g&&v&&f.push(See(v,b,u,_)),T&&f.push(T(u)),f.join(" ")}),ae(Fn(s),"getComponent",function(){var u=s.props,f=u.prefixCls,p=u.destroyPopupOnHide,g=u.popupClassName,v=u.onPopupAlign,b=u.popupMotion,_=u.popupAnimation,T=u.popupTransitionName,I=u.popupStyle,P=u.mask,M=u.maskAnimation,D=u.maskTransitionName,N=u.maskMotion,z=u.zIndex,$=u.popup,j=u.stretch,U=u.alignPoint,q=u.mobile,Y=u.forceRender,te=u.onPopupClick,Z=s.state,X=Z.popupVisible,J=Z.point,ue=s.getPopupAlign(),re={};return s.isMouseEnterToShow()&&(re.onMouseEnter=s.onPopupMouseEnter),s.isMouseLeaveToHide()&&(re.onMouseLeave=s.onPopupMouseLeave),re.onMouseDown=s.onPopupMouseDown,re.onTouchStart=s.onPopupMouseDown,A(nB,{prefixCls:f,destroyPopupOnHide:p,visible:X,point:U&&J,className:g,align:ue,onAlign:v,animation:_,getClassNameFromAlign:s.getPopupClassNameFromAlign,...re,stretch:j,getRootDomNode:s.getRootDomNode,style:I,mask:P,zIndex:z,transitionName:T,maskAnimation:M,maskTransitionName:D,maskMotion:N,ref:s.popupRef,motion:b,mobile:q,forceRender:Y,onClick:te,children:typeof $=="function"?$():$})}),ae(Fn(s),"attachParent",function(u){cr.cancel(s.attachId);var f=s.props,p=f.getPopupContainer,g=f.getDocument,v=s.getRootDomNode(),b;p?(v||p.length===0)&&(b=p(v)):b=g(s.getRootDomNode()).body,b?b.appendChild(u):s.attachId=cr(function(){s.attachParent(u)})}),ae(Fn(s),"getContainer",function(){if(!s.portalContainer){var u=s.props.getDocument,f=u(s.getRootDomNode()).createElement("div");f.style.position="absolute",f.style.top="0",f.style.left="0",f.style.width="100%",s.portalContainer=f}return s.attachParent(s.portalContainer),s.portalContainer}),ae(Fn(s),"setPoint",function(u){var f=s.props.alignPoint;!f||!u||s.setState({point:{pageX:u.pageX,pageY:u.pageY}})}),ae(Fn(s),"handlePortalUpdate",function(){s.state.prevPopupVisible!==s.state.popupVisible&&s.props.afterPopupVisibleChange(s.state.popupVisible)}),ae(Fn(s),"triggerContextValue",{onPopupMouseDown:s.onPopupMouseDown});var a;return"popupVisible"in o?a=!!o.popupVisible:a=!!o.defaultPopupVisible,s.state={prevPopupVisible:a,popupVisible:a},lte.forEach(function(u){s["fire".concat(u)]=function(f){s.fireEvents(u,f)}}),s}return Hr(i,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var s=this.props,a=this.state;if(a.popupVisible){var u;!this.clickOutsideHandler&&(this.isClickToHide()||this.isContextMenuToShow())&&(u=s.getDocument(this.getRootDomNode()),this.clickOutsideHandler=Qo(u,"mousedown",this.onDocumentClick)),this.touchOutsideHandler||(u=u||s.getDocument(this.getRootDomNode()),this.touchOutsideHandler=Qo(u,"touchstart",this.onDocumentClick)),!this.contextMenuOutsideHandler1&&this.isContextMenuToShow()&&(u=u||s.getDocument(this.getRootDomNode()),this.contextMenuOutsideHandler1=Qo(u,"scroll",this.onContextMenuClose)),!this.contextMenuOutsideHandler2&&this.isContextMenuToShow()&&(this.contextMenuOutsideHandler2=Qo(window,"blur",this.onContextMenuClose));return}this.clearOutsideHandler()}},{key:"componentWillUnmount",value:function(){this.clearDelayTimer(),this.clearOutsideHandler(),clearTimeout(this.mouseDownTimeout),cr.cancel(this.attachId)}},{key:"getPopupDomNode",value:function(){var s;return((s=this.popupRef.current)===null||s===void 0?void 0:s.getElement())||null}},{key:"getPopupAlign",value:function(){var s=this.props,a=s.popupPlacement,u=s.popupAlign,f=s.builtinPlacements;return a&&f?Cee(f,a,u):u}},{key:"setPopupVisible",value:function(s,a){var u=this.props.alignPoint,f=this.state.popupVisible;this.clearDelayTimer(),f!==s&&("popupVisible"in this.props||this.setState({popupVisible:s,prevPopupVisible:f}),this.props.onPopupVisibleChange(s)),u&&a&&s&&this.setPoint(a)}},{key:"delaySetPopupVisible",value:function(s,a,u){var f=this,p=a*1e3;if(this.clearDelayTimer(),p){var g=u?{pageX:u.pageX,pageY:u.pageY}:null;this.delayTimer=window.setTimeout(function(){f.setPopupVisible(s,g),f.clearDelayTimer()},p)}else this.setPopupVisible(s,u)}},{key:"clearDelayTimer",value:function(){this.delayTimer&&(clearTimeout(this.delayTimer),this.delayTimer=null)}},{key:"clearOutsideHandler",value:function(){this.clickOutsideHandler&&(this.clickOutsideHandler.remove(),this.clickOutsideHandler=null),this.contextMenuOutsideHandler1&&(this.contextMenuOutsideHandler1.remove(),this.contextMenuOutsideHandler1=null),this.contextMenuOutsideHandler2&&(this.contextMenuOutsideHandler2.remove(),this.contextMenuOutsideHandler2=null),this.touchOutsideHandler&&(this.touchOutsideHandler.remove(),this.touchOutsideHandler=null)}},{key:"createTwoChains",value:function(s){var a=this.props.children.props,u=this.props;return a[s]&&u[s]?this["fire".concat(s)]:a[s]||u[s]}},{key:"isClickToShow",value:function(){var s=this.props,a=s.action,u=s.showAction;return a.indexOf("click")!==-1||u.indexOf("click")!==-1}},{key:"isContextMenuOnly",value:function(){var s=this.props.action;return s==="contextMenu"||s.length===1&&s[0]==="contextMenu"}},{key:"isContextMenuToShow",value:function(){var s=this.props,a=s.action,u=s.showAction;return a.indexOf("contextMenu")!==-1||u.indexOf("contextMenu")!==-1}},{key:"isClickToHide",value:function(){var s=this.props,a=s.action,u=s.hideAction;return a.indexOf("click")!==-1||u.indexOf("click")!==-1}},{key:"isMouseEnterToShow",value:function(){var s=this.props,a=s.action,u=s.showAction;return a.indexOf("hover")!==-1||u.indexOf("mouseEnter")!==-1}},{key:"isMouseLeaveToHide",value:function(){var s=this.props,a=s.action,u=s.hideAction;return a.indexOf("hover")!==-1||u.indexOf("mouseLeave")!==-1}},{key:"isFocusToShow",value:function(){var s=this.props,a=s.action,u=s.showAction;return a.indexOf("focus")!==-1||u.indexOf("focus")!==-1}},{key:"isBlurToHide",value:function(){var s=this.props,a=s.action,u=s.hideAction;return a.indexOf("focus")!==-1||u.indexOf("blur")!==-1}},{key:"forcePopupAlign",value:function(){if(this.state.popupVisible){var s;(s=this.popupRef.current)===null||s===void 0||s.forceAlign()}}},{key:"fireEvents",value:function(s,a){var u=this.props.children.props[s];u&&u(a);var f=this.props[s];f&&f(a)}},{key:"close",value:function(){this.setPopupVisible(!1)}},{key:"render",value:function(){var s=this.state.popupVisible,a=this.props,u=a.children,f=a.forceRender,p=a.alignPoint,g=a.className,v=a.autoDestroy,b=E.exports.Children.only(u),_={key:"trigger"};this.isContextMenuToShow()?_.onContextMenu=this.onContextMenu:_.onContextMenu=this.createTwoChains("onContextMenu"),this.isClickToHide()||this.isClickToShow()?(_.onClick=this.onClick,_.onMouseDown=this.onMouseDown,_.onTouchStart=this.onTouchStart):(_.onClick=this.createTwoChains("onClick"),_.onMouseDown=this.createTwoChains("onMouseDown"),_.onTouchStart=this.createTwoChains("onTouchStart")),this.isMouseEnterToShow()?(_.onMouseEnter=this.onMouseEnter,p&&(_.onMouseMove=this.onMouseMove)):_.onMouseEnter=this.createTwoChains("onMouseEnter"),this.isMouseLeaveToHide()?_.onMouseLeave=this.onMouseLeave:_.onMouseLeave=this.createTwoChains("onMouseLeave"),this.isFocusToShow()||this.isBlurToHide()?(_.onFocus=this.onFocus,_.onBlur=this.onBlur):(_.onFocus=this.createTwoChains("onFocus"),_.onBlur=this.createTwoChains("onBlur"));var T=je(b&&b.props&&b.props.className,g);T&&(_.className=T);var I=me({},_);Nh(b)&&(I.ref=Aa(this.triggerRef,b.ref));var P=E.exports.cloneElement(b,I),M;return(s||this.popupRef.current||f)&&(M=A(e,{getContainer:this.getContainer,didUpdate:this.handlePortalUpdate,children:this.getComponent()},"portal")),!s&&v&&(M=null),it(pA.Provider,{value:this.triggerContextValue,children:[P,M]})}}],[{key:"getDerivedStateFromProps",value:function(s,a){var u=s.popupVisible,f={};return u!==void 0&&a.popupVisible!==u&&(f.popupVisible=u,f.prevPopupVisible=a.popupVisible),f}}]),i}(E.exports.Component);return ae(t,"contextType",pA),ae(t,"defaultProps",{prefixCls:"rc-trigger-popup",getPopupClassNameFromAlign:ate,getDocument:ste,onPopupVisibleChange:OC,afterPopupVisibleChange:OC,onPopupAlign:OC,popupClassName:"",mouseEnterDelay:0,mouseLeaveDelay:.1,focusDelay:0,blurDelay:.15,popupStyle:{},destroyPopupOnHide:!1,popupAlign:{},defaultPopupVisible:!1,mask:!1,maskClosable:!0,action:[],showAction:[],hideAction:[],autoDestroy:!1}),t}const V_=cte(_ee);var ute=["prefixCls","disabled","visible","children","popupElement","containerWidth","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],dte=function(t){var n=t===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:n,adjustY:1}},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:n,adjustY:1}},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:n,adjustY:1}},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:n,adjustY:1}}}},fte=function(t,n){var r=t.prefixCls;t.disabled;var i=t.visible,o=t.children,s=t.popupElement,a=t.containerWidth,u=t.animation,f=t.transitionName,p=t.dropdownStyle,g=t.dropdownClassName,v=t.direction,b=v===void 0?"ltr":v,_=t.placement,T=t.dropdownMatchSelectWidth,I=t.dropdownRender,P=t.dropdownAlign,M=t.getPopupContainer,D=t.empty,N=t.getTriggerDOMNode,z=t.onPopupVisibleChange,$=t.onPopupMouseEnter,j=kn(t,ute),U="".concat(r,"-dropdown"),q=s;I&&(q=I(s));var Y=E.exports.useMemo(function(){return dte(T)},[T]),te=u?"".concat(U,"-").concat(u):f,Z=E.exports.useRef(null);E.exports.useImperativeHandle(n,function(){return{getPopupElement:function(){return Z.current}}});var X=me({minWidth:a},p);return typeof T=="number"?X.width=T:T&&(X.width=a),A(V_,{...j,showAction:z?["click"]:[],hideAction:z?["click"]:[],popupPlacement:_||(b==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:Y,prefixCls:U,popupTransitionName:te,popup:A("div",{ref:Z,onMouseEnter:$,children:q}),popupAlign:P,popupVisible:i,getPopupContainer:M,popupClassName:je(g,ae({},"".concat(U,"-empty"),D)),popupStyle:X,getTriggerDOMNode:N,onPopupVisibleChange:z,children:o})},rB=E.exports.forwardRef(fte);rB.displayName="SelectTrigger";function mA(e,t){var n=e.key,r;return"value"in e&&(r=e.value),n!=null?n:r!==void 0?r:"rc-index-key-".concat(t)}function iB(e,t){var n=e||{},r=n.label,i=n.value,o=n.options;return{label:r||(t?"children":"label"),value:i||"value",options:o||"options"}}function hte(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.fieldNames,r=t.childrenAsData,i=[],o=iB(n,!1),s=o.label,a=o.value,u=o.options;function f(p,g){p.forEach(function(v){var b=v[s];if(g||!(u in v)){var _=v[a];i.push({key:mA(v,i.length),groupOption:g,data:v,label:b,value:_})}else{var T=b;T===void 0&&r&&(T=v.label),i.push({key:mA(v,i.length),group:!0,data:v,label:T}),f(v[u],!0)}})}return f(e,!1),i}function TE(e){var t=me({},e);return"props"in t||Object.defineProperty(t,"props",{get:function(){return Lr(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),t}}),t}function pte(e,t){if(!t||!t.length)return null;var n=!1;function r(o,s){var a=WT(s),u=a[0],f=a.slice(1);if(!u)return[o];var p=o.split(u);return n=n||p.length>1,p.reduce(function(g,v){return[].concat(Mt(g),Mt(r(v,f)))},[]).filter(function(g){return g})}var i=r(e,t);return n?i:null}var mte=["id","prefixCls","className","showSearch","tagRender","direction","omitDomProps","displayValues","onDisplayValuesChange","emptyOptions","notFoundContent","onClear","mode","disabled","loading","getInputElement","getRawInputElement","open","defaultOpen","onDropdownVisibleChange","activeValue","onActiveValueChange","activeDescendantId","searchValue","autoClearSearchValue","onSearch","onSearchSplit","tokenSeparators","allowClear","showArrow","inputIcon","clearIcon","OptionList","animation","transitionName","dropdownStyle","dropdownClassName","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","placement","getPopupContainer","showAction","onFocus","onBlur","onKeyUp","onKeyDown","onMouseDown"],gte=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"];function IE(e){return e==="tags"||e==="multiple"}var oB=E.exports.forwardRef(function(e,t){var n,r,i=e.id,o=e.prefixCls,s=e.className,a=e.showSearch,u=e.tagRender,f=e.direction,p=e.omitDomProps,g=e.displayValues,v=e.onDisplayValuesChange,b=e.emptyOptions,_=e.notFoundContent,T=_===void 0?"Not Found":_,I=e.onClear,P=e.mode,M=e.disabled,D=e.loading,N=e.getInputElement,z=e.getRawInputElement,$=e.open,j=e.defaultOpen,U=e.onDropdownVisibleChange,q=e.activeValue,Y=e.onActiveValueChange,te=e.activeDescendantId,Z=e.searchValue,X=e.autoClearSearchValue,J=e.onSearch,ue=e.onSearchSplit,re=e.tokenSeparators,se=e.allowClear,oe=e.showArrow,he=e.inputIcon,Ce=e.clearIcon,Se=e.OptionList,be=e.animation,Re=e.transitionName,Ie=e.dropdownStyle,Me=e.dropdownClassName,Ae=e.dropdownMatchSelectWidth,ze=e.dropdownRender,Ke=e.dropdownAlign,Ue=e.placement,pt=e.getPopupContainer,gt=e.showAction,Ot=gt===void 0?[]:gt,qe=e.onFocus,Ct=e.onBlur,ot=e.onKeyUp,vt=e.onKeyDown,yt=e.onMouseDown,Tt=kn(e,mte),et=IE(P),ct=(a!==void 0?a:et)||P==="combobox",at=me({},Tt);gte.forEach(function(On){delete at[On]}),p==null||p.forEach(function(On){delete at[On]});var He=E.exports.useState(!1),ut=$e(He,2),bt=ut[0],Dt=ut[1];E.exports.useEffect(function(){Dt(A$())},[]);var Lt=E.exports.useRef(null),Ht=E.exports.useRef(null),Fe=E.exports.useRef(null),Ye=E.exports.useRef(null),Zt=E.exports.useRef(null),an=qJ(),Kt=$e(an,3),Vt=Kt[0],It=Kt[1],Xt=Kt[2];E.exports.useImperativeHandle(t,function(){var On,Mn;return{focus:(On=Ye.current)===null||On===void 0?void 0:On.focus,blur:(Mn=Ye.current)===null||Mn===void 0?void 0:Mn.blur,scrollTo:function(ti){var wr;return(wr=Zt.current)===null||wr===void 0?void 0:wr.scrollTo(ti)}}});var pn=E.exports.useMemo(function(){var On;if(P!=="combobox")return Z;var Mn=(On=g[0])===null||On===void 0?void 0:On.value;return typeof Mn=="string"||typeof Mn=="number"?String(Mn):""},[Z,P,g]),tt=P==="combobox"&&typeof N=="function"&&N()||null,At=typeof z=="function"&&z(),qt=Q5(Ht,At==null||(n=At.props)===null||n===void 0?void 0:n.ref),En=Ei(void 0,{defaultValue:j,value:$}),yn=$e(En,2),St=yn[0],Pn=yn[1],_n=St,tn=!T&&b;(M||tn&&_n&&P==="combobox")&&(_n=!1);var Ft=tn?!1:_n,dt=E.exports.useCallback(function(On){var Mn=On!==void 0?On:!_n;M||(Pn(Mn),_n!==Mn&&(U==null||U(Mn)))},[M,_n,Pn,U]),mt=E.exports.useMemo(function(){return(re||[]).some(function(On){return[`
`,`\r
`].includes(On)})},[re]),$t=function(Mn,Nn,ti){var wr=!0,Wn=Mn;Y==null||Y(null);var Bn=ti?null:pte(Mn,re);return P!=="combobox"&&Bn&&(Wn="",ue==null||ue(Bn),dt(!1),wr=!1),J&&pn!==Wn&&J(Wn,{source:Nn?"typing":"effect"}),wr},Wt=function(Mn){!Mn||!Mn.trim()||J(Mn,{source:"submit"})};E.exports.useEffect(function(){!_n&&!et&&P!=="combobox"&&$t("",!1,!1)},[_n]),E.exports.useEffect(function(){St&&M&&Pn(!1),M&&It(!1)},[M]);var mn=z$(),An=$e(mn,2),Qn=An[0],Jn=An[1],ye=function(Mn){var Nn=Qn(),ti=Mn.which;if(ti===Pt.ENTER&&(P!=="combobox"&&Mn.preventDefault(),_n||dt(!0)),Jn(!!pn),ti===Pt.BACKSPACE&&!Nn&&et&&!pn&&g.length){for(var wr=Mt(g),Wn=null,Bn=wr.length-1;Bn>=0;Bn-=1){var rr=wr[Bn];if(!rr.disabled){wr.splice(Bn,1),Wn=rr;break}}Wn&&v(wr,{type:"remove",values:[Wn]})}for(var Er=arguments.length,Tr=new Array(Er>1?Er-1:0),Gr=1;Gr<Er;Gr++)Tr[Gr-1]=arguments[Gr];if(_n&&Zt.current){var ko;(ko=Zt.current).onKeyDown.apply(ko,[Mn].concat(Tr))}vt==null||vt.apply(void 0,[Mn].concat(Tr))},W=function(Mn){for(var Nn=arguments.length,ti=new Array(Nn>1?Nn-1:0),wr=1;wr<Nn;wr++)ti[wr-1]=arguments[wr];if(_n&&Zt.current){var Wn;(Wn=Zt.current).onKeyUp.apply(Wn,[Mn].concat(ti))}ot==null||ot.apply(void 0,[Mn].concat(ti))},Q=function(Mn){var Nn=g.filter(function(ti){return ti!==Mn});v(Nn,{type:"remove",values:[Mn]})},fe=E.exports.useRef(!1),ce=function(){It(!0),M||(qe&&!fe.current&&qe.apply(void 0,arguments),Ot.includes("focus")&&dt(!0)),fe.current=!0},xe=function(){It(!1,function(){fe.current=!1,dt(!1)}),!M&&(pn&&(P==="tags"?J(pn,{source:"submit"}):P==="multiple"&&J("",{source:"blur"})),Ct&&Ct.apply(void 0,arguments))},ke=[];E.exports.useEffect(function(){return function(){ke.forEach(function(On){return clearTimeout(On)}),ke.splice(0,ke.length)}},[]);var we=function(Mn){var Nn,ti=Mn.target,wr=(Nn=Fe.current)===null||Nn===void 0?void 0:Nn.getPopupElement();if(wr&&wr.contains(ti)){var Wn=setTimeout(function(){var Tr=ke.indexOf(Wn);if(Tr!==-1&&ke.splice(Tr,1),Xt(),!bt&&!wr.contains(document.activeElement)){var Gr;(Gr=Ye.current)===null||Gr===void 0||Gr.focus()}});ke.push(Wn)}for(var Bn=arguments.length,rr=new Array(Bn>1?Bn-1:0),Er=1;Er<Bn;Er++)rr[Er-1]=arguments[Er];yt==null||yt.apply(void 0,[Mn].concat(rr))},Pe=E.exports.useState(null),Le=$e(Pe,2),Ze=Le[0],Xe=Le[1],Ve=E.exports.useState({}),Bt=$e(Ve,2),Et=Bt[1];function nt(){Et({})}Si(function(){if(Ft){var On,Mn=Math.ceil((On=Lt.current)===null||On===void 0?void 0:On.offsetWidth);Ze!==Mn&&!Number.isNaN(Mn)&&Xe(Mn)}},[Ft]);var zt;At&&(zt=function(Mn){dt(Mn)}),ZJ(function(){var On;return[Lt.current,(On=Fe.current)===null||On===void 0?void 0:On.getPopupElement()]},Ft,dt,!!At);var Gt=E.exports.useMemo(function(){return me(me({},e),{},{notFoundContent:T,open:_n,triggerOpen:Ft,id:i,showSearch:ct,multiple:et,toggleOpen:dt})},[e,T,Ft,_n,i,ct,et,dt]),wn=oe!==void 0?oe:D||!et&&P!=="combobox",dn;wn&&(dn=A(ub,{className:je("".concat(o,"-arrow"),ae({},"".concat(o,"-arrow-loading"),D)),customizeIcon:he,customizeIconProps:{loading:D,searchValue:pn,open:_n,focused:Vt,showSearch:ct}}));var Cn,jn=function(){var Mn;I==null||I(),(Mn=Ye.current)===null||Mn===void 0||Mn.focus(),v([],{type:"clear",values:g}),$t("",!1,!1)};!M&&se&&(g.length||pn)&&!(P==="combobox"&&pn==="")&&(Cn=A(ub,{className:"".concat(o,"-clear"),onMouseDown:jn,customizeIcon:Ce,children:"\xD7"}));var or=A(Se,{ref:Zt}),Wr=je(o,s,(r={},ae(r,"".concat(o,"-focused"),Vt),ae(r,"".concat(o,"-multiple"),et),ae(r,"".concat(o,"-single"),!et),ae(r,"".concat(o,"-allow-clear"),se),ae(r,"".concat(o,"-show-arrow"),wn),ae(r,"".concat(o,"-disabled"),M),ae(r,"".concat(o,"-loading"),D),ae(r,"".concat(o,"-open"),_n),ae(r,"".concat(o,"-customize-input"),tt),ae(r,"".concat(o,"-show-search"),ct),r)),dr=A(rB,{ref:Fe,disabled:M,prefixCls:o,visible:Ft,popupElement:or,containerWidth:Ze,animation:be,transitionName:Re,dropdownStyle:Ie,dropdownClassName:Me,direction:f,dropdownMatchSelectWidth:Ae,dropdownRender:ze,dropdownAlign:Ke,placement:Ue,getPopupContainer:pt,empty:b,getTriggerDOMNode:function(){return Ht.current},onPopupVisibleChange:zt,onPopupMouseEnter:nt,children:At?E.exports.cloneElement(At,{ref:qt}):A(j$,{...e,domRef:Ht,prefixCls:o,inputElement:tt,ref:Ye,id:i,showSearch:ct,autoClearSearchValue:X,mode:P,activeDescendantId:te,tagRender:u,values:g,open:_n,onToggleOpen:dt,activeValue:q,searchValue:pn,onSearch:$t,onSearchSubmit:Wt,onRemove:Q,tokenWithEnter:mt})}),zr;return At?zr=dr:zr=it("div",{className:Wr,...at,ref:Lt,onMouseDown:we,onKeyDown:ye,onKeyUp:W,onFocus:ce,onBlur:xe,children:[Vt&&!_n&&A("span",{style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0},"aria-live":"polite",children:"".concat(g.map(function(On){var Mn=On.label,Nn=On.value;return["number","string"].includes(on(Mn))?Mn:Nn}).join(", "))}),dr,dn,Cn]}),A(N$.Provider,{value:Gt,children:zr})});const vte=function(e,t){var n=E.exports.useRef({values:new Map,options:new Map}),r=E.exports.useMemo(function(){var o=n.current,s=o.values,a=o.options,u=e.map(function(g){if(g.label===void 0){var v;return me(me({},g),{},{label:(v=s.get(g.value))===null||v===void 0?void 0:v.label})}return g}),f=new Map,p=new Map;return u.forEach(function(g){f.set(g.value,g),p.set(g.value,t.get(g.value)||a.get(g.value))}),n.current.values=f,n.current.options=p,u},[e,t]),i=E.exports.useCallback(function(o){return t.get(o)||n.current.options.get(o)},[t]);return[r,i]};function DC(e,t){return V$(e).join("").toUpperCase().includes(t)}const yte=function(e,t,n,r,i){return E.exports.useMemo(function(){if(!n||r===!1)return e;var o=t.options,s=t.label,a=t.value,u=[],f=typeof r=="function",p=n.toUpperCase(),g=f?r:function(b,_){return i?DC(_[i],p):_[o]?DC(_[s!=="children"?s:"label"],p):DC(_[a],p)},v=f?function(b){return TE(b)}:function(b){return b};return e.forEach(function(b){if(b[o]){var _=g(n,v(b));if(_)u.push(b);else{var T=b[o].filter(function(I){return g(n,v(I))});T.length&&u.push(me(me({},b),{},ae({},o,T)))}return}g(n,v(b))&&u.push(b)}),u},[e,r,i,n,t])};var gA=0,xte=To();function bte(){var e;return xte?(e=gA,gA+=1):e="TEST_OR_SSR",e}function aB(e){var t=E.exports.useState(),n=$e(t,2),r=n[0],i=n[1];return E.exports.useEffect(function(){i("rc_select_".concat(bte()))},[]),e||r}var _te=["children","value"],wte=["children"];function Cte(e){var t=e,n=t.key,r=t.props,i=r.children,o=r.value,s=kn(r,_te);return me({key:n,value:o!==void 0?o:n,children:i},s)}function sB(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Po(e).map(function(n,r){if(!E.exports.isValidElement(n)||!n.type)return null;var i=n,o=i.type.isSelectOptGroup,s=i.key,a=i.props,u=a.children,f=kn(a,wte);return t||!o?Cte(n):me(me({key:"__RC_SELECT_GRP__".concat(s===null?r:s,"__"),label:s},f),{},{options:sB(u)})}).filter(function(n){return n})}function Ste(e,t,n,r,i){return E.exports.useMemo(function(){var o=e,s=!e;s&&(o=sB(t));var a=new Map,u=new Map,f=function(v,b,_){_&&typeof _=="string"&&v.set(b[_],b)};function p(g){for(var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,b=0;b<g.length;b+=1){var _=g[b];!_[n.options]||v?(a.set(_[n.value],_),f(u,_,n.label),f(u,_,r),f(u,_,i)):p(_[n.options],!0)}}return p(o),{options:o,valueOptions:a,labelOptions:u}},[e,t,n,r,i])}function vA(e){var t=E.exports.useRef();t.current=e;var n=E.exports.useCallback(function(){return t.current.apply(t,arguments)},[]);return n}var hI=function(){return null};hI.isSelectOptGroup=!0;var pI=function(){return null};pI.isSelectOption=!0;var lB=E.exports.forwardRef(function(e,t){var n=e.height,r=e.offset,i=e.children,o=e.prefixCls,s=e.onInnerResize,a=e.innerProps,u={},f={display:"flex",flexDirection:"column"};return r!==void 0&&(u={height:n,position:"relative",overflow:"hidden"},f=me(me({},f),{},{transform:"translateY(".concat(r,"px)"),position:"absolute",left:0,right:0,top:0})),A("div",{style:u,children:A(Ql,{onResize:function(g){var v=g.offsetHeight;v&&s&&s()},children:A("div",{style:f,className:je(ae({},"".concat(o,"-holder-inner"),o)),ref:t,...a,children:i})})})});lB.displayName="Filler";var Ete=20;function yA(e){return"touches"in e?e.touches[0].pageY:e.pageY}var Pte=function(e){si(n,e);var t=li(n);function n(){var r;jr(this,n);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return r=t.call.apply(t,[this].concat(o)),r.moveRaf=null,r.scrollbarRef=E.exports.createRef(),r.thumbRef=E.exports.createRef(),r.visibleTimeout=null,r.state={dragging:!1,pageY:null,startTop:null,visible:!1},r.delayHidden=function(){clearTimeout(r.visibleTimeout),r.setState({visible:!0}),r.visibleTimeout=setTimeout(function(){r.setState({visible:!1})},2e3)},r.onScrollbarTouchStart=function(a){a.preventDefault()},r.onContainerMouseDown=function(a){a.stopPropagation(),a.preventDefault()},r.patchEvents=function(){window.addEventListener("mousemove",r.onMouseMove),window.addEventListener("mouseup",r.onMouseUp),r.thumbRef.current.addEventListener("touchmove",r.onMouseMove),r.thumbRef.current.addEventListener("touchend",r.onMouseUp)},r.removeEvents=function(){var a;window.removeEventListener("mousemove",r.onMouseMove),window.removeEventListener("mouseup",r.onMouseUp),(a=r.scrollbarRef.current)===null||a===void 0||a.removeEventListener("touchstart",r.onScrollbarTouchStart),r.thumbRef.current&&(r.thumbRef.current.removeEventListener("touchstart",r.onMouseDown),r.thumbRef.current.removeEventListener("touchmove",r.onMouseMove),r.thumbRef.current.removeEventListener("touchend",r.onMouseUp)),cr.cancel(r.moveRaf)},r.onMouseDown=function(a){var u=r.props.onStartMove;r.setState({dragging:!0,pageY:yA(a),startTop:r.getTop()}),u(),r.patchEvents(),a.stopPropagation(),a.preventDefault()},r.onMouseMove=function(a){var u=r.state,f=u.dragging,p=u.pageY,g=u.startTop,v=r.props.onScroll;if(cr.cancel(r.moveRaf),f){var b=yA(a)-p,_=g+b,T=r.getEnableScrollRange(),I=r.getEnableHeightRange(),P=I?_/I:0,M=Math.ceil(P*T);r.moveRaf=cr(function(){v(M)})}},r.onMouseUp=function(){var a=r.props.onStopMove;r.setState({dragging:!1}),a(),r.removeEvents()},r.getSpinHeight=function(){var a=r.props,u=a.height,f=a.count,p=u/f*10;return p=Math.max(p,Ete),p=Math.min(p,u/2),Math.floor(p)},r.getEnableScrollRange=function(){var a=r.props,u=a.scrollHeight,f=a.height;return u-f||0},r.getEnableHeightRange=function(){var a=r.props.height,u=r.getSpinHeight();return a-u||0},r.getTop=function(){var a=r.props.scrollTop,u=r.getEnableScrollRange(),f=r.getEnableHeightRange();if(a===0||u===0)return 0;var p=a/u;return p*f},r.showScroll=function(){var a=r.props,u=a.height,f=a.scrollHeight;return f>u},r}return Hr(n,[{key:"componentDidMount",value:function(){this.scrollbarRef.current.addEventListener("touchstart",this.onScrollbarTouchStart),this.thumbRef.current.addEventListener("touchstart",this.onMouseDown)}},{key:"componentDidUpdate",value:function(i){i.scrollTop!==this.props.scrollTop&&this.delayHidden()}},{key:"componentWillUnmount",value:function(){this.removeEvents(),clearTimeout(this.visibleTimeout)}},{key:"render",value:function(){var i=this.state,o=i.dragging,s=i.visible,a=this.props.prefixCls,u=this.getSpinHeight(),f=this.getTop(),p=this.showScroll(),g=p&&s;return A("div",{ref:this.scrollbarRef,className:je("".concat(a,"-scrollbar"),ae({},"".concat(a,"-scrollbar-show"),p)),style:{width:8,top:0,bottom:0,right:0,position:"absolute",display:g?null:"none"},onMouseDown:this.onContainerMouseDown,onMouseMove:this.delayHidden,children:A("div",{ref:this.thumbRef,className:je("".concat(a,"-scrollbar-thumb"),ae({},"".concat(a,"-scrollbar-thumb-moving"),o)),style:{width:"100%",height:u,top:f,left:0,position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"},onMouseDown:this.onMouseDown})})}}]),n}(E.exports.Component);function Tte(e){var t=e.children,n=e.setRef,r=E.exports.useCallback(function(i){n(i)},[]);return E.exports.cloneElement(t,{ref:r})}function Ite(e,t,n,r,i,o){var s=o.getKey;return e.slice(t,n+1).map(function(a,u){var f=t+u,p=i(a,f,{}),g=s(a);return A(Tte,{setRef:function(b){return r(a,b)},children:p},g)})}var kte=function(){function e(){jr(this,e),this.maps=void 0,this.maps=Object.create(null)}return Hr(e,[{key:"set",value:function(n,r){this.maps[n]=r}},{key:"get",value:function(n){return this.maps[n]}}]),e}();function Mte(e,t,n){var r=E.exports.useState(0),i=$e(r,2),o=i[0],s=i[1],a=E.exports.useRef(new Map),u=E.exports.useRef(new kte),f=E.exports.useRef();function p(){cr.cancel(f.current)}function g(){p(),f.current=cr(function(){a.current.forEach(function(b,_){if(b&&b.offsetParent){var T=xg(b),I=T.offsetHeight;u.current.get(_)!==I&&u.current.set(_,T.offsetHeight)}}),s(function(b){return b+1})})}function v(b,_){var T=e(b),I=a.current.get(T);_?(a.current.set(T,_),g()):a.current.delete(T),!I!=!_&&(_?t==null||t(b):n==null||n(b))}return E.exports.useEffect(function(){return p},[]),[v,g,u.current,o]}function Rte(e,t,n,r,i,o,s,a){var u=E.exports.useRef();return function(f){if(f==null){a();return}if(cr.cancel(u.current),typeof f=="number")s(f);else if(f&&on(f)==="object"){var p,g=f.align;"index"in f?p=f.index:p=t.findIndex(function(T){return i(T)===f.key});var v=f.offset,b=v===void 0?0:v,_=function T(I,P){if(!(I<0||!e.current)){var M=e.current.clientHeight,D=!1,N=P;if(M){for(var z=P||g,$=0,j=0,U=0,q=Math.min(t.length,p),Y=0;Y<=q;Y+=1){var te=i(t[Y]);j=$;var Z=n.get(te);U=j+(Z===void 0?r:Z),$=U,Y===p&&Z===void 0&&(D=!0)}var X=null;switch(z){case"top":X=j-b;break;case"bottom":X=U-M+b;break;default:{var J=e.current.scrollTop,ue=J+M;j<J?N="top":U>ue&&(N="bottom")}}X!==null&&X!==e.current.scrollTop&&s(X)}u.current=cr(function(){D&&o(),T(I-1,N)},2)}};_(3)}}}function Ote(e,t,n){var r=e.length,i=t.length,o,s;if(r===0&&i===0)return null;r<i?(o=e,s=t):(o=t,s=e);var a={__EMPTY_ITEM__:!0};function u(_){return _!==void 0?n(_):a}for(var f=null,p=Math.abs(r-i)!==1,g=0;g<s.length;g+=1){var v=u(o[g]),b=u(s[g]);if(v!==b){f=g,p=p||v!==u(s[g+1]);break}}return f===null?null:{index:f,multiple:p}}function Dte(e,t,n){var r=E.exports.useState(e),i=$e(r,2),o=i[0],s=i[1],a=E.exports.useState(null),u=$e(a,2),f=u[0],p=u[1];return E.exports.useEffect(function(){var g=Ote(o||[],e||[],t);(g==null?void 0:g.index)!==void 0&&(n==null||n(g.index),p(e[g.index])),s(e)},[e]),[f]}var Ate=(typeof navigator>"u"?"undefined":on(navigator))==="object"&&/Firefox/i.test(navigator.userAgent);const cB=function(e,t){var n=E.exports.useRef(!1),r=E.exports.useRef(null);function i(){clearTimeout(r.current),n.current=!0,r.current=setTimeout(function(){n.current=!1},50)}var o=E.exports.useRef({top:e,bottom:t});return o.current.top=e,o.current.bottom=t,function(s){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,u=s<0&&o.current.top||s>0&&o.current.bottom;return a&&u?(clearTimeout(r.current),n.current=!1):(!u||n.current)&&i(),!n.current&&u}};function Nte(e,t,n,r){var i=E.exports.useRef(0),o=E.exports.useRef(null),s=E.exports.useRef(null),a=E.exports.useRef(!1),u=cB(t,n);function f(g){if(!!e){cr.cancel(o.current);var v=g.deltaY;i.current+=v,s.current=v,!u(v)&&(Ate||g.preventDefault(),o.current=cr(function(){var b=a.current?10:1;r(i.current*b),i.current=0}))}}function p(g){!e||(a.current=g.detail===s.current)}return[f,p]}var Lte=14/15;function zte(e,t,n){var r=E.exports.useRef(!1),i=E.exports.useRef(0),o=E.exports.useRef(null),s=E.exports.useRef(null),a,u=function(v){if(r.current){var b=Math.ceil(v.touches[0].pageY),_=i.current-b;i.current=b,n(_)&&v.preventDefault(),clearInterval(s.current),s.current=setInterval(function(){_*=Lte,(!n(_,!0)||Math.abs(_)<=.1)&&clearInterval(s.current)},16)}},f=function(){r.current=!1,a()},p=function(v){a(),v.touches.length===1&&!r.current&&(r.current=!0,i.current=Math.ceil(v.touches[0].pageY),o.current=v.target,o.current.addEventListener("touchmove",u),o.current.addEventListener("touchend",f))};a=function(){o.current&&(o.current.removeEventListener("touchmove",u),o.current.removeEventListener("touchend",f))},Si(function(){return e&&t.current.addEventListener("touchstart",p),function(){var g;(g=t.current)===null||g===void 0||g.removeEventListener("touchstart",p),a(),clearInterval(s.current)}},[e])}var Fte=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","component","onScroll","onVisibleChange","innerProps"],$te=[],Bte={overflowY:"auto",overflowAnchor:"none"};function Vte(e,t){var n=e.prefixCls,r=n===void 0?"rc-virtual-list":n,i=e.className,o=e.height,s=e.itemHeight,a=e.fullHeight,u=a===void 0?!0:a,f=e.style,p=e.data,g=e.children,v=e.itemKey,b=e.virtual,_=e.component,T=_===void 0?"div":_,I=e.onScroll,P=e.onVisibleChange,M=e.innerProps,D=kn(e,Fte),N=!!(b!==!1&&o&&s),z=N&&p&&s*p.length>o,$=E.exports.useState(0),j=$e($,2),U=j[0],q=j[1],Y=E.exports.useState(!1),te=$e(Y,2),Z=te[0],X=te[1],J=je(r,i),ue=p||$te,re=E.exports.useRef(),se=E.exports.useRef(),oe=E.exports.useRef(),he=E.exports.useCallback(function(Vt){return typeof v=="function"?v(Vt):Vt==null?void 0:Vt[v]},[v]),Ce={getKey:he};function Se(Vt){q(function(It){var Xt;typeof Vt=="function"?Xt=Vt(It):Xt=Vt;var pn=ct(Xt);return re.current.scrollTop=pn,pn})}var be=E.exports.useRef({start:0,end:ue.length}),Re=E.exports.useRef(),Ie=Dte(ue,he),Me=$e(Ie,1),Ae=Me[0];Re.current=Ae;var ze=Mte(he,null,null),Ke=$e(ze,4),Ue=Ke[0],pt=Ke[1],gt=Ke[2],Ot=Ke[3],qe=E.exports.useMemo(function(){if(!N)return{scrollHeight:void 0,start:0,end:ue.length-1,offset:void 0};if(!z){var Vt;return{scrollHeight:((Vt=se.current)===null||Vt===void 0?void 0:Vt.offsetHeight)||0,start:0,end:ue.length-1,offset:void 0}}for(var It=0,Xt,pn,tt,At=ue.length,qt=0;qt<At;qt+=1){var En=ue[qt],yn=he(En),St=gt.get(yn),Pn=It+(St===void 0?s:St);Pn>=U&&Xt===void 0&&(Xt=qt,pn=It),Pn>U+o&&tt===void 0&&(tt=qt),It=Pn}return Xt===void 0&&(Xt=0,pn=0,tt=Math.ceil(o/s)),tt===void 0&&(tt=ue.length-1),tt=Math.min(tt+1,ue.length),{scrollHeight:It,start:Xt,end:tt,offset:pn}},[z,N,U,ue,Ot,o]),Ct=qe.scrollHeight,ot=qe.start,vt=qe.end,yt=qe.offset;be.current.start=ot,be.current.end=vt;var Tt=Ct-o,et=E.exports.useRef(Tt);et.current=Tt;function ct(Vt){var It=Vt;return Number.isNaN(et.current)||(It=Math.min(It,et.current)),It=Math.max(It,0),It}var at=U<=0,He=U>=Tt,ut=cB(at,He);function bt(Vt){var It=Vt;Se(It)}function Dt(Vt){var It=Vt.currentTarget.scrollTop;It!==U&&Se(It),I==null||I(Vt)}var Lt=Nte(N,at,He,function(Vt){Se(function(It){var Xt=It+Vt;return Xt})}),Ht=$e(Lt,2),Fe=Ht[0],Ye=Ht[1];zte(N,re,function(Vt,It){return ut(Vt,It)?!1:(Fe({preventDefault:function(){},deltaY:Vt}),!0)}),Si(function(){function Vt(It){N&&It.preventDefault()}return re.current.addEventListener("wheel",Fe),re.current.addEventListener("DOMMouseScroll",Ye),re.current.addEventListener("MozMousePixelScroll",Vt),function(){re.current&&(re.current.removeEventListener("wheel",Fe),re.current.removeEventListener("DOMMouseScroll",Ye),re.current.removeEventListener("MozMousePixelScroll",Vt))}},[N]);var Zt=Rte(re,ue,gt,s,he,pt,Se,function(){var Vt;(Vt=oe.current)===null||Vt===void 0||Vt.delayHidden()});E.exports.useImperativeHandle(t,function(){return{scrollTo:Zt}}),Si(function(){if(P){var Vt=ue.slice(ot,vt+1);P(Vt,ue)}},[ot,vt,ue]);var an=Ite(ue,ot,vt,Ue,g,Ce),Kt=null;return o&&(Kt=me(ae({},u?"height":"maxHeight",o),Bte),N&&(Kt.overflowY="hidden",Z&&(Kt.pointerEvents="none"))),it("div",{style:me(me({},f),{},{position:"relative"}),className:J,...D,children:[A(T,{className:"".concat(r,"-holder"),style:Kt,ref:re,onScroll:Dt,children:A(lB,{prefixCls:r,height:Ct,offset:yt,onInnerResize:pt,ref:se,innerProps:M,children:an})}),N&&A(Pte,{ref:oe,prefixCls:r,scrollTop:U,height:o,scrollHeight:Ct,count:ue.length,onScroll:bt,onStartMove:function(){X(!0)},onStopMove:function(){X(!1)}})]})}var mI=E.exports.forwardRef(Vte);mI.displayName="List";function Ute(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var uB=E.exports.createContext(null),jte=["disabled","title","children","style","className"];function xA(e){return typeof e=="string"||typeof e=="number"}var Hte=function(t,n){var r=L$(),i=r.prefixCls,o=r.id,s=r.open,a=r.multiple,u=r.mode,f=r.searchValue,p=r.toggleOpen,g=r.notFoundContent,v=r.onPopupScroll,b=E.exports.useContext(uB),_=b.flattenOptions,T=b.onActiveValue,I=b.defaultActiveFirstOption,P=b.onSelect,M=b.menuItemSelectedIcon,D=b.rawValues,N=b.fieldNames,z=b.virtual,$=b.listHeight,j=b.listItemHeight,U="".concat(i,"-item"),q=Xg(function(){return _},[s,_],function(Ie,Me){return Me[0]&&Ie[1]!==Me[1]}),Y=E.exports.useRef(null),te=function(Me){Me.preventDefault()},Z=function(Me){Y.current&&Y.current.scrollTo(typeof Me=="number"?{index:Me}:Me)},X=function(Me){for(var Ae=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,ze=q.length,Ke=0;Ke<ze;Ke+=1){var Ue=(Me+Ke*Ae+ze)%ze,pt=q[Ue],gt=pt.group,Ot=pt.data;if(!gt&&!Ot.disabled)return Ue}return-1},J=E.exports.useState(function(){return X(0)}),ue=$e(J,2),re=ue[0],se=ue[1],oe=function(Me){var Ae=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;se(Me);var ze={source:Ae?"keyboard":"mouse"},Ke=q[Me];if(!Ke){T(null,-1,ze);return}T(Ke.value,Me,ze)};E.exports.useEffect(function(){oe(I!==!1?X(0):-1)},[q.length,f]);var he=E.exports.useCallback(function(Ie){return D.has(Ie)&&u!=="combobox"},[u,Mt(D).toString(),D.size]);E.exports.useEffect(function(){var Ie=setTimeout(function(){if(!a&&s&&D.size===1){var Ae=Array.from(D)[0],ze=q.findIndex(function(Ke){var Ue=Ke.data;return Ue.value===Ae});ze!==-1&&(oe(ze),Z(ze))}});if(s){var Me;(Me=Y.current)===null||Me===void 0||Me.scrollTo(void 0)}return function(){return clearTimeout(Ie)}},[s,f]);var Ce=function(Me){Me!==void 0&&P(Me,{selected:!D.has(Me)}),a||p(!1)};if(E.exports.useImperativeHandle(n,function(){return{onKeyDown:function(Me){var Ae=Me.which,ze=Me.ctrlKey;switch(Ae){case Pt.N:case Pt.P:case Pt.UP:case Pt.DOWN:{var Ke=0;if(Ae===Pt.UP?Ke=-1:Ae===Pt.DOWN?Ke=1:Ute()&&ze&&(Ae===Pt.N?Ke=1:Ae===Pt.P&&(Ke=-1)),Ke!==0){var Ue=X(re+Ke,Ke);Z(Ue),oe(Ue,!0)}break}case Pt.ENTER:{var pt=q[re];pt&&!pt.data.disabled?Ce(pt.value):Ce(void 0),s&&Me.preventDefault();break}case Pt.ESC:p(!1),s&&Me.stopPropagation()}},onKeyUp:function(){},scrollTo:function(Me){Z(Me)}}}),q.length===0)return A("div",{role:"listbox",id:"".concat(o,"_list"),className:"".concat(U,"-empty"),onMouseDown:te,children:g});var Se=Object.keys(N).map(function(Ie){return N[Ie]}),be=function(Me){return Me.label},Re=function(Me){var Ae=q[Me];if(!Ae)return null;var ze=Ae.data||{},Ke=ze.value,Ue=Ae.group,pt=Zl(ze,!0),gt=be(Ae);return Ae?E.exports.createElement("div",{"aria-label":typeof gt=="string"&&!Ue?gt:null,...pt,key:Me,role:Ue?"presentation":"option",id:"".concat(o,"_list_").concat(Me),"aria-selected":he(Ke)},Ke):null};return it(nr,{children:[it("div",{role:"listbox",id:"".concat(o,"_list"),style:{height:0,width:0,overflow:"hidden"},children:[Re(re-1),Re(re),Re(re+1)]}),A(mI,{itemKey:"key",ref:Y,data:q,height:$,itemHeight:j,fullHeight:!1,onMouseDown:te,onScroll:v,virtual:z,children:function(Ie,Me){var Ae,ze=Ie.group,Ke=Ie.groupOption,Ue=Ie.data,pt=Ie.label,gt=Ie.value,Ot=Ue.key;if(ze){var qe,Ct=(qe=Ue.title)!==null&&qe!==void 0?qe:xA(pt)?pt.toString():void 0;return A("div",{className:je(U,"".concat(U,"-group")),title:Ct,children:pt!==void 0?pt:Ot})}var ot=Ue.disabled,vt=Ue.title;Ue.children;var yt=Ue.style,Tt=Ue.className,et=kn(Ue,jte),ct=Gi(et,Se),at=he(gt),He="".concat(U,"-option"),ut=je(U,He,Tt,(Ae={},ae(Ae,"".concat(He,"-grouped"),Ke),ae(Ae,"".concat(He,"-active"),re===Me&&!ot),ae(Ae,"".concat(He,"-disabled"),ot),ae(Ae,"".concat(He,"-selected"),at),Ae)),bt=be(Ie),Dt=!M||typeof M=="function"||at,Lt=typeof bt=="number"?bt:bt||gt,Ht=xA(Lt)?Lt.toString():void 0;return vt!==void 0&&(Ht=vt),it("div",{...Zl(ct),"aria-selected":at,className:ut,title:Ht,onMouseMove:function(){re===Me||ot||oe(Me)},onClick:function(){ot||Ce(gt)},style:yt,children:[A("div",{className:"".concat(He,"-content"),children:Lt}),E.exports.isValidElement(M)||at,Dt&&A(ub,{className:"".concat(U,"-option-state"),customizeIcon:M,customizeIconProps:{isSelected:at},children:at?"\u2713":null})]})}})]})},dB=E.exports.forwardRef(Hte);dB.displayName="OptionList";var Kte=["id","mode","prefixCls","backfill","fieldNames","inputValue","searchValue","onSearch","autoClearSearchValue","onSelect","onDeselect","dropdownMatchSelectWidth","filterOption","filterSort","optionFilterProp","optionLabelProp","options","children","defaultActiveFirstOption","menuItemSelectedIcon","virtual","listHeight","listItemHeight","value","defaultValue","labelInValue","onChange"],Wte=["inputValue"];function Gte(e){return!e||on(e)!=="object"}var qte=E.exports.forwardRef(function(e,t){var n=e.id,r=e.mode,i=e.prefixCls,o=i===void 0?"rc-select":i,s=e.backfill,a=e.fieldNames,u=e.inputValue,f=e.searchValue,p=e.onSearch,g=e.autoClearSearchValue,v=g===void 0?!0:g,b=e.onSelect,_=e.onDeselect,T=e.dropdownMatchSelectWidth,I=T===void 0?!0:T,P=e.filterOption,M=e.filterSort,D=e.optionFilterProp,N=e.optionLabelProp,z=e.options,$=e.children,j=e.defaultActiveFirstOption,U=e.menuItemSelectedIcon,q=e.virtual,Y=e.listHeight,te=Y===void 0?200:Y,Z=e.listItemHeight,X=Z===void 0?20:Z,J=e.value,ue=e.defaultValue,re=e.labelInValue,se=e.onChange,oe=kn(e,Kte),he=aB(n),Ce=IE(r),Se=!!(!z&&$),be=E.exports.useMemo(function(){return P===void 0&&r==="combobox"?!1:P},[P,r]),Re=E.exports.useMemo(function(){return iB(a,Se)},[JSON.stringify(a),Se]),Ie=Ei("",{value:f!==void 0?f:u,postState:function(mt){return mt||""}}),Me=$e(Ie,2),Ae=Me[0],ze=Me[1],Ke=Ste(z,$,Re,D,N),Ue=Ke.valueOptions,pt=Ke.labelOptions,gt=Ke.options,Ot=E.exports.useCallback(function(dt){var mt=V$(dt);return mt.map(function($t){var Wt,mn,An,Qn,Jn;if(Gte($t))Wt=$t;else{var ye;An=$t.key,mn=$t.label,Wt=(ye=$t.value)!==null&&ye!==void 0?ye:An}var W=Ue.get(Wt);if(W){var Q;mn===void 0&&(mn=W==null?void 0:W[N||Re.label]),An===void 0&&(An=(Q=W==null?void 0:W.key)!==null&&Q!==void 0?Q:Wt),Qn=W==null?void 0:W.disabled,Jn=W==null?void 0:W.title}return{label:mn,value:Wt,key:An,disabled:Qn,title:Jn}})},[Re,N,Ue]),qe=Ei(ue,{value:J}),Ct=$e(qe,2),ot=Ct[0],vt=Ct[1],yt=E.exports.useMemo(function(){var dt,mt=Ot(ot);return r==="combobox"&&!((dt=mt[0])!==null&&dt!==void 0&&dt.value)?[]:mt},[ot,Ot,r]),Tt=vte(yt,Ue),et=$e(Tt,2),ct=et[0],at=et[1],He=E.exports.useMemo(function(){if(!r&&ct.length===1){var dt=ct[0];if(dt.value===null&&(dt.label===null||dt.label===void 0))return[]}return ct.map(function(mt){var $t;return me(me({},mt),{},{label:($t=mt.label)!==null&&$t!==void 0?$t:mt.value})})},[r,ct]),ut=E.exports.useMemo(function(){return new Set(ct.map(function(dt){return dt.value}))},[ct]);E.exports.useEffect(function(){if(r==="combobox"){var dt,mt=(dt=ct[0])===null||dt===void 0?void 0:dt.value;ze(pee(mt)?String(mt):"")}},[ct]);var bt=vA(function(dt,mt){var $t,Wt=mt!=null?mt:dt;return $t={},ae($t,Re.value,dt),ae($t,Re.label,Wt),$t}),Dt=E.exports.useMemo(function(){if(r!=="tags")return gt;var dt=Mt(gt),mt=function(Wt){return Ue.has(Wt)};return Mt(ct).sort(function($t,Wt){return $t.value<Wt.value?-1:1}).forEach(function($t){var Wt=$t.value;mt(Wt)||dt.push(bt(Wt,$t.label))}),dt},[bt,gt,Ue,ct,r]),Lt=yte(Dt,Re,Ae,be,D),Ht=E.exports.useMemo(function(){return r!=="tags"||!Ae||Lt.some(function(dt){return dt[D||"value"]===Ae})?Lt:[bt(Ae)].concat(Mt(Lt))},[bt,D,r,Lt,Ae]),Fe=E.exports.useMemo(function(){return M?Mt(Ht).sort(function(dt,mt){return M(dt,mt)}):Ht},[Ht,M]),Ye=E.exports.useMemo(function(){return hte(Fe,{fieldNames:Re,childrenAsData:Se})},[Fe,Re,Se]),Zt=function(mt){var $t=Ot(mt);if(vt($t),se&&($t.length!==ct.length||$t.some(function(An,Qn){var Jn;return((Jn=ct[Qn])===null||Jn===void 0?void 0:Jn.value)!==(An==null?void 0:An.value)}))){var Wt=re?$t:$t.map(function(An){return An.value}),mn=$t.map(function(An){return TE(at(An.value))});se(Ce?Wt:Wt[0],Ce?mn:mn[0])}},an=E.exports.useState(null),Kt=$e(an,2),Vt=Kt[0],It=Kt[1],Xt=E.exports.useState(0),pn=$e(Xt,2),tt=pn[0],At=pn[1],qt=j!==void 0?j:r!=="combobox",En=E.exports.useCallback(function(dt,mt){var $t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Wt=$t.source,mn=Wt===void 0?"keyboard":Wt;At(mt),s&&r==="combobox"&&dt!==null&&mn==="keyboard"&&It(String(dt))},[s,r]),yn=function(mt,$t,Wt){var mn=function(){var ke,we=at(mt);return[re?{label:we==null?void 0:we[Re.label],value:mt,key:(ke=we==null?void 0:we.key)!==null&&ke!==void 0?ke:mt}:mt,TE(we)]};if($t&&b){var An=mn(),Qn=$e(An,2),Jn=Qn[0],ye=Qn[1];b(Jn,ye)}else if(!$t&&_&&Wt!=="clear"){var W=mn(),Q=$e(W,2),fe=Q[0],ce=Q[1];_(fe,ce)}},St=vA(function(dt,mt){var $t,Wt=Ce?mt.selected:!0;Wt?$t=Ce?[].concat(Mt(ct),[dt]):[dt]:$t=ct.filter(function(mn){return mn.value!==dt}),Zt($t),yn(dt,Wt),r==="combobox"?It(""):(!IE||v)&&(ze(""),It(""))}),Pn=function(mt,$t){Zt(mt);var Wt=$t.type,mn=$t.values;(Wt==="remove"||Wt==="clear")&&mn.forEach(function(An){yn(An.value,!1,Wt)})},_n=function(mt,$t){if(ze(mt),It(null),$t.source==="submit"){var Wt=(mt||"").trim();if(Wt){var mn=Array.from(new Set([].concat(Mt(ut),[Wt])));Zt(mn),yn(Wt,!0),ze("")}return}$t.source!=="blur"&&(r==="combobox"&&Zt(mt),p==null||p(mt))},tn=function(mt){var $t=mt;r!=="tags"&&($t=mt.map(function(mn){var An=pt.get(mn);return An==null?void 0:An.value}).filter(function(mn){return mn!==void 0}));var Wt=Array.from(new Set([].concat(Mt(ut),Mt($t))));Zt(Wt),Wt.forEach(function(mn){yn(mn,!0)})},Ft=E.exports.useMemo(function(){var dt=q!==!1&&I!==!1;return me(me({},Ke),{},{flattenOptions:Ye,onActiveValue:En,defaultActiveFirstOption:qt,onSelect:St,menuItemSelectedIcon:U,rawValues:ut,fieldNames:Re,virtual:dt,listHeight:te,listItemHeight:X,childrenAsData:Se})},[Ke,Ye,En,qt,St,U,ut,Re,q,I,te,X,Se]);return A(uB.Provider,{value:Ft,children:A(oB,{...oe,id:he,prefixCls:o,ref:t,omitDomProps:Wte,mode:r,displayValues:He,onDisplayValuesChange:Pn,searchValue:Ae,onSearch:_n,autoClearSearchValue:v,onSearchSplit:tn,dropdownMatchSelectWidth:I,OptionList:dB,emptyOptions:!Ye.length,activeValue:Vt,activeDescendantId:"".concat(he,"_list_").concat(tt)})})}),gI=qte;gI.Option=pI;gI.OptGroup=hI;var Zte=function(){var t=E.exports.useContext(zn),n=t.getPrefixCls,r=n("empty-img-default");return A("svg",{className:r,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg",children:it("g",{fill:"none",fillRule:"evenodd",children:[it("g",{transform:"translate(24 31.67)",children:[A("ellipse",{className:"".concat(r,"-ellipse"),cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),A("path",{className:"".concat(r,"-path-1"),d:"M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z"}),A("path",{className:"".concat(r,"-path-2"),d:"M101.537 86.214L80.63 61.102c-1.001-1.207-2.507-1.867-4.048-1.867H31.724c-1.54 0-3.047.66-4.048 1.867L6.769 86.214v13.792h94.768V86.214z",transform:"translate(13.56)"}),A("path",{className:"".concat(r,"-path-3"),d:"M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z"}),A("path",{className:"".concat(r,"-path-4"),d:"M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z"})]}),A("path",{className:"".concat(r,"-path-5"),d:"M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z"}),it("g",{className:"".concat(r,"-g"),transform:"translate(149.65 15.383)",children:[A("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),A("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"})]})]})})};const Xte=Zte;var Yte=function(){var t=E.exports.useContext(zn),n=t.getPrefixCls,r=n("empty-img-simple");return A("svg",{className:r,width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg",children:it("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd",children:[A("ellipse",{className:"".concat(r,"-ellipse"),cx:"32",cy:"33",rx:"32",ry:"7"}),it("g",{className:"".concat(r,"-g"),fillRule:"nonzero",children:[A("path",{d:"M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"}),A("path",{d:"M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",className:"".concat(r,"-path")})]})]})})};const Qte=Yte;var Jte=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},fB=A(Xte,{}),hB=A(Qte,{}),vI=function(t){var n=t.className,r=t.prefixCls,i=t.image,o=i===void 0?fB:i,s=t.description,a=t.children,u=t.imageStyle,f=Jte(t,["className","prefixCls","image","description","children","imageStyle"]),p=E.exports.useContext(zn),g=p.getPrefixCls,v=p.direction;return A(Lh,{componentName:"Empty",children:function(b){var _,T=g("empty",r),I=typeof s<"u"?s:b.description,P=typeof I=="string"?I:"empty",M=null;return typeof o=="string"?M=A("img",{alt:P,src:o}):M=o,it("div",{className:je(T,(_={},ae(_,"".concat(T,"-normal"),o===hB),ae(_,"".concat(T,"-rtl"),v==="rtl"),_),n),...f,children:[A("div",{className:"".concat(T,"-image"),style:u,children:M}),I&&A("div",{className:"".concat(T,"-description"),children:I}),a&&A("div",{className:"".concat(T,"-footer"),children:a})]})}})};vI.PRESENTED_IMAGE_DEFAULT=fB;vI.PRESENTED_IMAGE_SIMPLE=hB;const Ys=vI;var ene=function(t){return A(Bd,{children:function(n){var r=n.getPrefixCls,i=r("empty");switch(t){case"Table":case"List":return A(Ys,{image:Ys.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return A(Ys,{image:Ys.PRESENTED_IMAGE_SIMPLE,className:"".concat(i,"-small")});default:return A(Ys,{})}}})};const yI=ene;var Rs=E.exports.createContext({}),kE=function(t){var n=t.children,r=t.status,i=t.override,o=E.exports.useContext(Rs),s=E.exports.useMemo(function(){var a=Je({},o);return i&&delete a.isFormItemInput,r&&(delete a.status,delete a.hasFeedback,delete a.feedbackIcon),a},[r,i,o]);return A(Rs.Provider,{value:s,children:n})},aa=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n},tne=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n},AC=function(){return{height:0,opacity:0}},bA=function(t){var n=t.scrollHeight;return{height:n,opacity:1}},nne=function(t){return{height:t?t.offsetHeight:0}},NC=function(t,n){return(n==null?void 0:n.deadline)===!0||n.propertyName==="height"},rne={motionName:"ant-motion-collapse",onAppearStart:AC,onEnterStart:AC,onAppearActive:bA,onEnterActive:bA,onLeaveStart:nne,onLeaveActive:AC,onAppearEnd:NC,onEnterEnd:NC,onLeaveEnd:NC,motionDeadline:500};aa("bottomLeft","bottomRight","topLeft","topRight");var pB=function(t){return t!==void 0&&(t==="topLeft"||t==="topRight")?"slide-down":"slide-up"},Ia=function(t,n,r){return r!==void 0?r:"".concat(t,"-").concat(n)};const U_=rne;aa("warning","error","");function Xc(e,t,n){var r;return je((r={},ae(r,"".concat(e,"-status-success"),t==="success"),ae(r,"".concat(e,"-status-warning"),t==="warning"),ae(r,"".concat(e,"-status-error"),t==="error"),ae(r,"".concat(e,"-status-validating"),t==="validating"),ae(r,"".concat(e,"-has-feedback"),n),r))}var nv=function(t,n){return n||t},ine={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"};const one=ine;var mB=function(t,n){return A(Yn,{...me(me({},t),{},{ref:n,icon:one})})};mB.displayName="CheckOutlined";const xI=E.exports.forwardRef(mB);var ane={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"};const sne=ane;var gB=function(t,n){return A(Yn,{...me(me({},t),{},{ref:n,icon:sne})})};gB.displayName="DownOutlined";const vB=E.exports.forwardRef(gB);var lne={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"}}]},name:"search",theme:"outlined"};const cne=lne;var yB=function(t,n){return A(Yn,{...me(me({},t),{},{ref:n,icon:cne})})};yB.displayName="SearchOutlined";const bI=E.exports.forwardRef(yB);function xB(e){var t=e.suffixIcon,n=e.clearIcon,r=e.menuItemSelectedIcon,i=e.removeIcon,o=e.loading,s=e.multiple,a=e.hasFeedback,u=e.prefixCls,f=e.showArrow,p=e.feedbackIcon,g=n!=null?n:A(zh,{}),v=function(M){return it(nr,{children:[f!==!1&&M,a&&p]})},b=null;if(t!==void 0)b=v(t);else if(o)b=v(A(Id,{spin:!0}));else{var _="".concat(u,"-suffix");b=function(M){var D=M.open,N=M.showSearch;return v(D&&N?A(bI,{className:_}):A(vB,{className:_}))}}var T=null;r!==void 0?T=r:s?T=A(xI,{}):T=null;var I=null;return i!==void 0?I=i:I=A(Fh,{}),{clearIcon:g,suffixIcon:b,itemIcon:T,removeIcon:I}}var bB=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},j_=E.exports.createContext(null),Bh=function(t,n){var r=E.exports.useContext(j_),i=E.exports.useMemo(function(){var o;if(!r)return"";var s=r.compactDirection,a=r.isFirstItem,u=r.isLastItem,f=s==="vertical"?"-vertical-":"-";return je((o={},ae(o,"".concat(t,"-compact").concat(f,"item"),!0),ae(o,"".concat(t,"-compact").concat(f,"first-item"),a),ae(o,"".concat(t,"-compact").concat(f,"last-item"),u),ae(o,"".concat(t,"-compact").concat(f,"item-rtl"),n==="rtl"),o))},[t,n,r]);return{compactSize:r==null?void 0:r.compactSize,compactDirection:r==null?void 0:r.compactDirection,compactItemClassnames:i}},fb=function(t){var n=t.children;return A(j_.Provider,{value:null,children:n})},une=function(t){var n=t.children,r=bB(t,["children"]);return A(j_.Provider,{value:r,children:n})},dne=function(t){var n,r=E.exports.useContext(zn),i=r.getPrefixCls,o=r.direction,s=t.size,a=s===void 0?"middle":s,u=t.direction,f=t.block,p=t.prefixCls,g=t.className,v=t.children,b=bB(t,["size","direction","block","prefixCls","className","children"]),_=i("space-compact",p),T=je(_,(n={},ae(n,"".concat(_,"-rtl"),o==="rtl"),ae(n,"".concat(_,"-block"),f),ae(n,"".concat(_,"-vertical"),u==="vertical"),n),g),I=E.exports.useContext(j_),P=Po(v),M=E.exports.useMemo(function(){return P.map(function(D,N){var z=D&&D.key||"".concat(_,"-item-").concat(N);return A(une,{compactSize:a,compactDirection:u,isFirstItem:N===0&&(!I||(I==null?void 0:I.isFirstItem)),isLastItem:N===P.length-1&&(!I||(I==null?void 0:I.isLastItem)),children:D},z)})},[a,P,I]);return P.length===0?null:A("div",{className:T,...b,children:M})},fne=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},_B="SECRET_COMBOBOX_MODE_DO_NOT_USE",hne=function(t,n){var r,i=t.prefixCls,o=t.bordered,s=o===void 0?!0:o,a=t.className,u=t.getPopupContainer,f=t.dropdownClassName,p=t.popupClassName,g=t.listHeight,v=g===void 0?256:g,b=t.placement,_=t.listItemHeight,T=_===void 0?24:_,I=t.size,P=t.disabled,M=t.notFoundContent,D=t.status,N=t.showArrow,z=fne(t,["prefixCls","bordered","className","getPopupContainer","dropdownClassName","popupClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","showArrow"]),$=E.exports.useContext(zn),j=$.getPopupContainer,U=$.getPrefixCls,q=$.renderEmpty,Y=$.direction,te=$.virtual,Z=$.dropdownMatchSelectWidth,X=E.exports.useContext(Jl),J=U("select",i),ue=U(),re=Bh(J,Y),se=re.compactSize,oe=re.compactItemClassnames,he=E.exports.useMemo(function(){var at=z.mode;if(at!=="combobox")return at===_B?"combobox":at},[z.mode]),Ce=he==="multiple"||he==="tags",Se=N!==void 0?N:z.loading||!(Ce||he==="combobox"),be=E.exports.useContext(Rs),Re=be.status,Ie=be.hasFeedback,Me=be.isFormItemInput,Ae=be.feedbackIcon,ze=nv(Re,D),Ke;M!==void 0?Ke=M:he==="combobox"?Ke=null:Ke=(q||yI)("Select");var Ue=xB(Je(Je({},z),{multiple:Ce,hasFeedback:Ie,feedbackIcon:Ae,showArrow:Se,prefixCls:J})),pt=Ue.suffixIcon,gt=Ue.itemIcon,Ot=Ue.removeIcon,qe=Ue.clearIcon,Ct=Gi(z,["suffixIcon","itemIcon"]),ot=je(p||f,ae({},"".concat(J,"-dropdown-").concat(Y),Y==="rtl")),vt=se||I||X,yt=E.exports.useContext(fu),Tt=P!=null?P:yt,et=je((r={},ae(r,"".concat(J,"-lg"),vt==="large"),ae(r,"".concat(J,"-sm"),vt==="small"),ae(r,"".concat(J,"-rtl"),Y==="rtl"),ae(r,"".concat(J,"-borderless"),!s),ae(r,"".concat(J,"-in-form-item"),Me),r),Xc(J,ze,Ie),oe,a),ct=function(){return b!==void 0?b:Y==="rtl"?"bottomRight":"bottomLeft"};return A(gI,{ref:n,virtual:te,dropdownMatchSelectWidth:Z,...Ct,transitionName:Ia(ue,pB(b),z.transitionName),listHeight:v,listItemHeight:T,mode:he,prefixCls:J,placement:ct(),direction:Y,inputIcon:pt,menuItemSelectedIcon:gt,removeIcon:Ot,clearIcon:qe,notFoundContent:Ke,className:et,getPopupContainer:u||j,dropdownClassName:ot,showArrow:Ie||N,disabled:Tt})},H_=E.exports.forwardRef(hne);H_.SECRET_COMBOBOX_MODE_DO_NOT_USE=_B;H_.Option=pI;H_.OptGroup=hI;const Vd=H_;function _I(){var e=E.exports.useReducer(function(r){return r+1},0),t=$e(e,2),n=t[1];return n}var hb=["xxl","xl","lg","md","sm","xs"],fx={xs:"(max-width: 575px)",sm:"(min-width: 576px)",md:"(min-width: 768px)",lg:"(min-width: 992px)",xl:"(min-width: 1200px)",xxl:"(min-width: 1600px)"},ju=new Map,LC=-1,hx={},pne={matchHandlers:{},dispatch:function(t){return hx=t,ju.forEach(function(n){return n(hx)}),ju.size>=1},subscribe:function(t){return ju.size||this.register(),LC+=1,ju.set(LC,t),t(hx),LC},unsubscribe:function(t){ju.delete(t),ju.size||this.unregister()},unregister:function(){var t=this;Object.keys(fx).forEach(function(n){var r=fx[n],i=t.matchHandlers[r];i==null||i.mql.removeListener(i==null?void 0:i.listener)}),ju.clear()},register:function(){var t=this;Object.keys(fx).forEach(function(n){var r=fx[n],i=function(a){var u=a.matches;t.dispatch(Je(Je({},hx),ae({},n,u)))},o=window.matchMedia(r);o.addListener(i),t.matchHandlers[r]={mql:o,listener:i},i(o)})}};const pb=pne;function wB(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,t=E.exports.useRef({}),n=_I();return E.exports.useEffect(function(){var r=pb.subscribe(function(i){t.current=i,e&&n()});return function(){return pb.unsubscribe(r)}},[]),t.current}var Ua={adjustX:1,adjustY:1},ja=[0,0],CB={left:{points:["cr","cl"],overflow:Ua,offset:[-4,0],targetOffset:ja},right:{points:["cl","cr"],overflow:Ua,offset:[4,0],targetOffset:ja},top:{points:["bc","tc"],overflow:Ua,offset:[0,-4],targetOffset:ja},bottom:{points:["tc","bc"],overflow:Ua,offset:[0,4],targetOffset:ja},topLeft:{points:["bl","tl"],overflow:Ua,offset:[0,-4],targetOffset:ja},leftTop:{points:["tr","tl"],overflow:Ua,offset:[-4,0],targetOffset:ja},topRight:{points:["br","tr"],overflow:Ua,offset:[0,-4],targetOffset:ja},rightTop:{points:["tl","tr"],overflow:Ua,offset:[4,0],targetOffset:ja},bottomRight:{points:["tr","br"],overflow:Ua,offset:[0,4],targetOffset:ja},rightBottom:{points:["bl","br"],overflow:Ua,offset:[4,0],targetOffset:ja},bottomLeft:{points:["tl","bl"],overflow:Ua,offset:[0,4],targetOffset:ja},leftBottom:{points:["br","bl"],overflow:Ua,offset:[-4,0],targetOffset:ja}};function mne(e){var t=e.showArrow,n=e.arrowContent,r=e.children,i=e.prefixCls,o=e.id,s=e.overlayInnerStyle,a=e.className,u=e.style;return it("div",{className:je("".concat(i,"-content"),a),style:u,children:[t!==!1&&A("div",{className:"".concat(i,"-arrow"),children:n},"arrow"),A("div",{className:"".concat(i,"-inner"),id:o,role:"tooltip",style:s,children:typeof r=="function"?r():r})]})}var gne=function(t,n){var r=t.overlayClassName,i=t.trigger,o=i===void 0?["hover"]:i,s=t.mouseEnterDelay,a=s===void 0?0:s,u=t.mouseLeaveDelay,f=u===void 0?.1:u,p=t.overlayStyle,g=t.prefixCls,v=g===void 0?"rc-tooltip":g,b=t.children,_=t.onVisibleChange,T=t.afterVisibleChange,I=t.transitionName,P=t.animation,M=t.motion,D=t.placement,N=D===void 0?"right":D,z=t.align,$=z===void 0?{}:z,j=t.destroyTooltipOnHide,U=j===void 0?!1:j,q=t.defaultVisible,Y=t.getTooltipContainer,te=t.overlayInnerStyle,Z=t.arrowContent,X=t.overlay,J=t.id,ue=t.showArrow,re=kn(t,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow"]),se=E.exports.useRef(null);E.exports.useImperativeHandle(n,function(){return se.current});var oe=me({},re);"visible"in t&&(oe.popupVisible=t.visible);var he=function(){return A(mne,{showArrow:ue,arrowContent:Z,prefixCls:v,id:J,overlayInnerStyle:te,children:X},"content")},Ce=!1,Se=!1;if(typeof U=="boolean")Ce=U;else if(U&&on(U)==="object"){var be=U.keepParent;Ce=be===!0,Se=be===!1}return A(V_,{popupClassName:r,prefixCls:v,popup:he,action:o,builtinPlacements:CB,popupPlacement:N,ref:se,popupAlign:$,getPopupContainer:Y,onPopupVisibleChange:_,afterPopupVisibleChange:T,popupTransitionName:I,popupAnimation:P,popupMotion:M,defaultPopupVisible:q,destroyPopupOnHide:Ce,autoDestroy:Se,mouseLeaveDelay:f,popupStyle:p,mouseEnterDelay:a,...oe,children:b})};const vne=E.exports.forwardRef(gne);aa("success","processing","error","default","warning");var yne=aa("pink","red","yellow","orange","cyan","green","blue","purple","geekblue","magenta","volcano","gold","lime"),xne={adjustX:1,adjustY:1},_A={adjustX:0,adjustY:0},bne=[0,0];function wA(e){return typeof e=="boolean"?e?xne:_A:Je(Je({},_A),e)}function SB(e){var t=e.arrowWidth,n=t===void 0?4:t,r=e.horizontalArrowShift,i=r===void 0?16:r,o=e.verticalArrowShift,s=o===void 0?8:o,a=e.autoAdjustOverflow,u=e.arrowPointAtCenter,f={left:{points:["cr","cl"],offset:[-4,0]},right:{points:["cl","cr"],offset:[4,0]},top:{points:["bc","tc"],offset:[0,-4]},bottom:{points:["tc","bc"],offset:[0,4]},topLeft:{points:["bl","tc"],offset:[-(i+n),-4]},leftTop:{points:["tr","cl"],offset:[-4,-(s+n)]},topRight:{points:["br","tc"],offset:[i+n,-4]},rightTop:{points:["tl","cr"],offset:[4,-(s+n)]},bottomRight:{points:["tr","bc"],offset:[i+n,4]},rightBottom:{points:["bl","cr"],offset:[4,s+n]},bottomLeft:{points:["tl","bc"],offset:[-(i+n),4]},leftBottom:{points:["br","cl"],offset:[-4,s+n]}};return Object.keys(f).forEach(function(p){f[p]=u?Je(Je({},f[p]),{overflow:wA(a),targetOffset:bne}):Je(Je({},CB[p]),{overflow:wA(a)}),f[p].ignoreShake=!0}),f}var _ne=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},wne=function(t,n){var r={},i=Je({},t);return n.forEach(function(o){t&&o in t&&(r[o]=t[o],delete i[o])}),{picked:r,omitted:i}},CA=new RegExp("^(".concat(yne.join("|"),")(-inverse)?$"));function Cne(e,t){var n=e.type;if((n.__ANT_BUTTON===!0||e.type==="button")&&e.props.disabled||n.__ANT_SWITCH===!0&&(e.props.disabled||e.props.loading)||n.__ANT_RADIO===!0&&e.props.disabled){var r=wne(e.props.style,["position","left","right","top","bottom","float","display","zIndex"]),i=r.picked,o=r.omitted,s=Je(Je({display:"inline-block"},i),{cursor:"not-allowed",width:e.props.block?"100%":void 0}),a=Je(Je({},o),{pointerEvents:"none"}),u=Pi(e,{style:a,className:null});return A("span",{style:s,className:je(e.props.className,"".concat(t,"-disabled-compatible-wrapper")),children:u})}return e}var Sne=E.exports.forwardRef(function(e,t){var n,r=E.exports.useContext(zn),i=r.getPopupContainer,o=r.getPrefixCls,s=r.direction,a=Ei(!1,{value:e.open!==void 0?e.open:e.visible,defaultValue:e.defaultOpen!==void 0?e.defaultOpen:e.defaultVisible}),u=$e(a,2),f=u[0],p=u[1],g=function(){var Me=e.title,Ae=e.overlay;return!Me&&!Ae&&Me!==0},v=function(Me){var Ae,ze;p(g()?!1:Me),g()||((Ae=e.onOpenChange)===null||Ae===void 0||Ae.call(e,Me),(ze=e.onVisibleChange)===null||ze===void 0||ze.call(e,Me))},b=function(){var Me=e.builtinPlacements,Ae=e.arrowPointAtCenter,ze=Ae===void 0?!1:Ae,Ke=e.autoAdjustOverflow,Ue=Ke===void 0?!0:Ke;return Me||SB({arrowPointAtCenter:ze,autoAdjustOverflow:Ue})},_=function(Me,Ae){var ze=b(),Ke=Object.keys(ze).find(function(gt){var Ot,qe;return ze[gt].points[0]===((Ot=Ae.points)===null||Ot===void 0?void 0:Ot[0])&&ze[gt].points[1]===((qe=Ae.points)===null||qe===void 0?void 0:qe[1])});if(!!Ke){var Ue=Me.getBoundingClientRect(),pt={top:"50%",left:"50%"};/top|Bottom/.test(Ke)?pt.top="".concat(Ue.height-Ae.offset[1],"px"):/Top|bottom/.test(Ke)&&(pt.top="".concat(-Ae.offset[1],"px")),/left|Right/.test(Ke)?pt.left="".concat(Ue.width-Ae.offset[0],"px"):/right|Left/.test(Ke)&&(pt.left="".concat(-Ae.offset[0],"px")),Me.style.transformOrigin="".concat(pt.left," ").concat(pt.top)}},T=function(){var Me=e.title,Ae=e.overlay;return Me===0?Me:Ae||Me||""},I=e.getPopupContainer,P=e.placement,M=P===void 0?"top":P,D=e.mouseEnterDelay,N=D===void 0?.1:D,z=e.mouseLeaveDelay,$=z===void 0?.1:z,j=_ne(e,["getPopupContainer","placement","mouseEnterDelay","mouseLeaveDelay"]),U=e.prefixCls,q=e.openClassName,Y=e.getTooltipContainer,te=e.overlayClassName,Z=e.color,X=e.overlayInnerStyle,J=e.children,ue=o("tooltip",U),re=o(),se=f;!("open"in e)&&!("visible"in e)&&g()&&(se=!1);var oe=Cne(Ta(J)&&!M$(J)?J:A("span",{children:J}),ue),he=oe.props,Ce=!he.className||typeof he.className=="string"?je(he.className,ae({},q||"".concat(ue,"-open"),!0)):he.className,Se=je(te,(n={},ae(n,"".concat(ue,"-rtl"),s==="rtl"),ae(n,"".concat(ue,"-").concat(Z),Z&&CA.test(Z)),n)),be=X,Re={};return Z&&!CA.test(Z)&&(be=Je(Je({},X),{background:Z}),Re={"--antd-arrow-background-color":Z}),A(vne,{...j,placement:M,mouseEnterDelay:N,mouseLeaveDelay:$,prefixCls:ue,overlayClassName:Se,getTooltipContainer:I||Y||i,ref:t,builtinPlacements:b(),overlay:T(),visible:se,onVisibleChange:v,onPopupAlign:_,overlayInnerStyle:be,arrowContent:A("span",{className:"".concat(ue,"-arrow-content"),style:Re}),motion:{motionName:Ia(re,"zoom-big-fast",e.transitionName),motionDeadline:1e3},children:se?Pi(oe,{className:Ce}):oe})});const ka=Sne;var SA=function(t){return t?typeof t=="function"?t():t:null},Ene=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},Pne=function(t){var n=t.title,r=t.content,i=t.prefixCls;return!n&&!r?null:it(nr,{children:[n&&A("div",{className:"".concat(i,"-title"),children:SA(n)}),A("div",{className:"".concat(i,"-inner-content"),children:SA(r)})]})},Tne=E.exports.forwardRef(function(e,t){var n=e.prefixCls,r=e.title,i=e.content,o=e._overlay,s=e.placement,a=s===void 0?"top":s,u=e.trigger,f=u===void 0?"hover":u,p=e.mouseEnterDelay,g=p===void 0?.1:p,v=e.mouseLeaveDelay,b=v===void 0?.1:v,_=e.overlayStyle,T=_===void 0?{}:_,I=Ene(e,["prefixCls","title","content","_overlay","placement","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle"]),P=E.exports.useContext(zn),M=P.getPrefixCls,D=M("popover",n),N=M();return A(ka,{placement:a,trigger:f,mouseEnterDelay:g,mouseLeaveDelay:b,overlayStyle:T,...I,prefixCls:D,ref:t,overlay:o||A(Pne,{prefixCls:D,title:r,content:i}),transitionName:Ia(N,"zoom-big",I.transitionName)})});const EB=Tne;var Ine={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"ellipsis",theme:"outlined"};const kne=Ine;var PB=function(t,n){return A(Yn,{...me(me({},t),{},{ref:n,icon:kne})})};PB.displayName="EllipsisOutlined";const TB=E.exports.forwardRef(PB);var IB=E.exports.createContext(null);function wI(e,t){return e===void 0?null:"".concat(e,"-").concat(t)}function kB(e){var t=E.exports.useContext(IB);return wI(t,e)}var Mne=["children","locked"],Os=E.exports.createContext(null);function Rne(e,t){var n=me({},e);return Object.keys(t).forEach(function(r){var i=t[r];i!==void 0&&(n[r]=i)}),n}function Eg(e){var t=e.children,n=e.locked,r=kn(e,Mne),i=E.exports.useContext(Os),o=Xg(function(){return Rne(i,r)},[i,r],function(s,a){return!n&&(s[0]!==a[0]||!dI(s[1],a[1],!0))});return A(Os.Provider,{value:o,children:t})}var One=[],MB=E.exports.createContext(null);function K_(){return E.exports.useContext(MB)}var RB=E.exports.createContext(One);function Vh(e){var t=E.exports.useContext(RB);return E.exports.useMemo(function(){return e!==void 0?[].concat(Mt(t),[e]):t},[t,e])}var OB=E.exports.createContext(null),CI=E.exports.createContext({});function EA(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(fI(e)){var n=e.nodeName.toLowerCase(),r=["input","select","textarea","button"].includes(n)||e.isContentEditable||n==="a"&&!!e.getAttribute("href"),i=e.getAttribute("tabindex"),o=Number(i),s=null;return i&&!Number.isNaN(o)?s=o:r&&s===null&&(s=0),r&&e.disabled&&(s=null),s!==null&&(s>=0||t&&s<0)}return!1}function DB(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=Mt(e.querySelectorAll("*")).filter(function(r){return EA(r,t)});return EA(e,t)&&n.unshift(e),n}var ME=Pt.LEFT,RE=Pt.RIGHT,OE=Pt.UP,a0=Pt.DOWN,s0=Pt.ENTER,AB=Pt.ESC,rm=Pt.HOME,im=Pt.END,PA=[OE,a0,ME,RE];function Dne(e,t,n,r){var i,o,s,a,u="prev",f="next",p="children",g="parent";if(e==="inline"&&r===s0)return{inlineTrigger:!0};var v=(i={},ae(i,OE,u),ae(i,a0,f),i),b=(o={},ae(o,ME,n?f:u),ae(o,RE,n?u:f),ae(o,a0,p),ae(o,s0,p),o),_=(s={},ae(s,OE,u),ae(s,a0,f),ae(s,s0,p),ae(s,AB,g),ae(s,ME,n?p:g),ae(s,RE,n?g:p),s),T={inline:v,horizontal:b,vertical:_,inlineSub:v,horizontalSub:_,verticalSub:_},I=(a=T["".concat(e).concat(t?"":"Sub")])===null||a===void 0?void 0:a[r];switch(I){case u:return{offset:-1,sibling:!0};case f:return{offset:1,sibling:!0};case g:return{offset:-1,sibling:!1};case p:return{offset:1,sibling:!1};default:return null}}function Ane(e){for(var t=e;t;){if(t.getAttribute("data-menu-list"))return t;t=t.parentElement}return null}function Nne(e,t){for(var n=e||document.activeElement;n;){if(t.has(n))return n;n=n.parentElement}return null}function NB(e,t){var n=DB(e,!0);return n.filter(function(r){return t.has(r)})}function TA(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;if(!e)return null;var i=NB(e,t),o=i.length,s=i.findIndex(function(a){return n===a});return r<0?s===-1?s=o-1:s-=1:r>0&&(s+=1),s=(s+o)%o,i[s]}function Lne(e,t,n,r,i,o,s,a,u,f){var p=E.exports.useRef(),g=E.exports.useRef();g.current=t;var v=function(){cr.cancel(p.current)};return E.exports.useEffect(function(){return function(){v()}},[]),function(b){var _=b.which;if([].concat(PA,[s0,AB,rm,im]).includes(_)){var T,I,P,M=function(){T=new Set,I=new Map,P=new Map;var ue=o();return ue.forEach(function(re){var se=document.querySelector("[data-menu-id='".concat(wI(r,re),"']"));se&&(T.add(se),P.set(se,re),I.set(re,se))}),T};M();var D=I.get(t),N=Nne(D,T),z=P.get(N),$=Dne(e,s(z,!0).length===1,n,_);if(!$&&_!==rm&&_!==im)return;(PA.includes(_)||[rm,im].includes(_))&&b.preventDefault();var j=function(ue){if(ue){var re=ue,se=ue.querySelector("a");se!=null&&se.getAttribute("href")&&(re=se);var oe=P.get(ue);a(oe),v(),p.current=cr(function(){g.current===oe&&re.focus()})}};if([rm,im].includes(_)||$.sibling||!N){var U;!N||e==="inline"?U=i.current:U=Ane(N);var q,Y=NB(U,T);_===rm?q=Y[0]:_===im?q=Y[Y.length-1]:q=TA(U,T,N,$.offset),j(q)}else if($.inlineTrigger)u(z);else if($.offset>0)u(z,!0),v(),p.current=cr(function(){M();var J=N.getAttribute("aria-controls"),ue=document.getElementById(J),re=TA(ue,T);j(re)},5);else if($.offset<0){var te=s(z,!0),Z=te[te.length-2],X=I.get(Z);u(Z,!1),j(X)}}f==null||f(b)}}function zne(e){Promise.resolve().then(e)}var SI="__RC_UTIL_PATH_SPLIT__",IA=function(t){return t.join(SI)},Fne=function(t){return t.split(SI)},DE="rc-menu-more";function $ne(){var e=E.exports.useState({}),t=$e(e,2),n=t[1],r=E.exports.useRef(new Map),i=E.exports.useRef(new Map),o=E.exports.useState([]),s=$e(o,2),a=s[0],u=s[1],f=E.exports.useRef(0),p=E.exports.useRef(!1),g=function(){p.current||n({})},v=E.exports.useCallback(function(D,N){var z=IA(N);i.current.set(z,D),r.current.set(D,z),f.current+=1;var $=f.current;zne(function(){$===f.current&&g()})},[]),b=E.exports.useCallback(function(D,N){var z=IA(N);i.current.delete(z),r.current.delete(D)},[]),_=E.exports.useCallback(function(D){u(D)},[]),T=E.exports.useCallback(function(D,N){var z=r.current.get(D)||"",$=Fne(z);return N&&a.includes($[0])&&$.unshift(DE),$},[a]),I=E.exports.useCallback(function(D,N){return D.some(function(z){var $=T(z,!0);return $.includes(N)})},[T]),P=function(){var N=Mt(r.current.keys());return a.length&&N.push(DE),N},M=E.exports.useCallback(function(D){var N="".concat(r.current.get(D)).concat(SI),z=new Set;return Mt(i.current.keys()).forEach(function($){$.startsWith(N)&&z.add(i.current.get($))}),z},[]);return E.exports.useEffect(function(){return function(){p.current=!0}},[]),{registerPath:v,unregisterPath:b,refreshOverflowKeys:_,isSubPathKey:I,getKeyPath:T,getKeys:P,getSubPathKeys:M}}function Mf(e){var t=E.exports.useRef(e);t.current=e;var n=E.exports.useCallback(function(){for(var r,i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return(r=t.current)===null||r===void 0?void 0:r.call.apply(r,[t].concat(o))},[]);return e?n:void 0}var Bne=Math.random().toFixed(5).toString().slice(2),kA=0;function Vne(e){var t=Ei(e,{value:e}),n=$e(t,2),r=n[0],i=n[1];return E.exports.useEffect(function(){kA+=1;var o="".concat(Bne,"-").concat(kA);i("rc-menu-uuid-".concat(o))},[]),r}function LB(e,t,n,r){var i=E.exports.useContext(Os),o=i.activeKey,s=i.onActive,a=i.onInactive,u={active:o===e};return t||(u.onMouseEnter=function(f){n==null||n({key:e,domEvent:f}),s(e)},u.onMouseLeave=function(f){r==null||r({key:e,domEvent:f}),a(e)}),u}var Une=["item"];function mb(e){var t=e.item,n=kn(e,Une);return Object.defineProperty(n,"item",{get:function(){return Lr(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),t}}),n}function zB(e){var t=e.icon,n=e.props,r=e.children,i;return typeof t=="function"?i=E.exports.createElement(t,me({},n)):i=t,i||r||null}function FB(e){var t=E.exports.useContext(Os),n=t.mode,r=t.rtl,i=t.inlineIndent;if(n!=="inline")return null;var o=e;return r?{paddingRight:o*i}:{paddingLeft:o*i}}var jne=["title","attribute","elementRef"],Hne=["style","className","eventKey","warnKey","disabled","itemIcon","children","role","onMouseEnter","onMouseLeave","onClick","onKeyDown","onFocus"],Kne=["active"],Wne=function(e){si(n,e);var t=li(n);function n(){return jr(this,n),t.apply(this,arguments)}return Hr(n,[{key:"render",value:function(){var i=this.props,o=i.title,s=i.attribute,a=i.elementRef,u=kn(i,jne),f=Gi(u,["eventKey"]);return Lr(!s,"`attribute` of Menu.Item is deprecated. Please pass attribute directly."),A(nl.Item,{...s,title:typeof o=="string"?o:void 0,...f,ref:a})}}]),n}(E.exports.Component),Gne=function(t){var n,r=t.style,i=t.className,o=t.eventKey;t.warnKey;var s=t.disabled,a=t.itemIcon,u=t.children,f=t.role,p=t.onMouseEnter,g=t.onMouseLeave,v=t.onClick,b=t.onKeyDown,_=t.onFocus,T=kn(t,Hne),I=kB(o),P=E.exports.useContext(Os),M=P.prefixCls,D=P.onItemClick,N=P.disabled,z=P.overflowDisabled,$=P.itemIcon,j=P.selectedKeys,U=P.onActive,q=E.exports.useContext(CI),Y=q._internalRenderMenuItem,te="".concat(M,"-item"),Z=E.exports.useRef(),X=E.exports.useRef(),J=N||s,ue=Vh(o),re=function(Ue){return{key:o,keyPath:Mt(ue).reverse(),item:Z.current,domEvent:Ue}},se=a||$,oe=LB(o,J,p,g),he=oe.active,Ce=kn(oe,Kne),Se=j.includes(o),be=FB(ue.length),Re=function(Ue){if(!J){var pt=re(Ue);v==null||v(mb(pt)),D(pt)}},Ie=function(Ue){if(b==null||b(Ue),Ue.which===Pt.ENTER){var pt=re(Ue);v==null||v(mb(pt)),D(pt)}},Me=function(Ue){U(o),_==null||_(Ue)},Ae={};t.role==="option"&&(Ae["aria-selected"]=Se);var ze=it(Wne,{ref:Z,elementRef:X,role:f===null?"none":f||"menuitem",tabIndex:s?null:-1,"data-menu-id":z&&I?null:I,...T,...Ce,...Ae,component:"li","aria-disabled":s,style:me(me({},be),r),className:je(te,(n={},ae(n,"".concat(te,"-active"),he),ae(n,"".concat(te,"-selected"),Se),ae(n,"".concat(te,"-disabled"),J),n),i),onClick:Re,onKeyDown:Ie,onFocus:Me,children:[u,A(zB,{props:me(me({},t),{},{isSelected:Se}),icon:se})]});return Y&&(ze=Y(ze,t,{selected:Se})),ze};function W_(e){var t=e.eventKey,n=K_(),r=Vh(t);return E.exports.useEffect(function(){if(n)return n.registerPath(t,r),function(){n.unregisterPath(t,r)}},[r]),n?null:A(Gne,{...e})}var qne=["className","children"],Zne=function(t,n){var r=t.className,i=t.children,o=kn(t,qne),s=E.exports.useContext(Os),a=s.prefixCls,u=s.mode,f=s.rtl;return A("ul",{className:je(a,f&&"".concat(a,"-rtl"),"".concat(a,"-sub"),"".concat(a,"-").concat(u==="inline"?"inline":"vertical"),r),role:"menu",...o,"data-menu-list":!0,ref:n,children:i})},EI=E.exports.forwardRef(Zne);EI.displayName="SubMenuList";var Xne=["label","children","key","type"];function PI(e,t){return Po(e).map(function(n,r){if(E.exports.isValidElement(n)){var i,o,s=n.key,a=(i=(o=n.props)===null||o===void 0?void 0:o.eventKey)!==null&&i!==void 0?i:s,u=a==null;u&&(a="tmp_key-".concat([].concat(Mt(t),[r]).join("-")));var f={key:a,eventKey:a};return E.exports.cloneElement(n,f)}return n})}function AE(e){return(e||[]).map(function(t,n){if(t&&on(t)==="object"){var r=t,i=r.label,o=r.children,s=r.key,a=r.type,u=kn(r,Xne),f=s!=null?s:"tmp-".concat(n);return o||a==="group"?a==="group"?A(q_,{...u,title:i,children:AE(o)},f):A(G_,{...u,title:i,children:AE(o)},f):a==="divider"?A(TI,{...u},f):A(W_,{...u,children:i},f)}return null}).filter(function(t){return t})}function Yne(e,t,n){var r=e;return t&&(r=AE(t)),PI(r,n)}var zc={adjustX:1,adjustY:1},Qne={topLeft:{points:["bl","tl"],overflow:zc,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:zc,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:zc,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:zc,offset:[4,0]}},Jne={topLeft:{points:["bl","tl"],overflow:zc,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:zc,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:zc,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:zc,offset:[4,0]}};function $B(e,t,n){if(t)return t;if(n)return n[e]||n.other}var ere={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function tre(e){var t=e.prefixCls,n=e.visible,r=e.children,i=e.popup,o=e.popupClassName,s=e.popupOffset,a=e.disabled,u=e.mode,f=e.onVisibleChange,p=E.exports.useContext(Os),g=p.getPopupContainer,v=p.rtl,b=p.subMenuOpenDelay,_=p.subMenuCloseDelay,T=p.builtinPlacements,I=p.triggerSubMenuAction,P=p.forceSubMenuRender,M=p.rootClassName,D=p.motion,N=p.defaultMotions,z=E.exports.useState(!1),$=$e(z,2),j=$[0],U=$[1],q=me(v?me({},Jne):me({},Qne),T),Y=ere[u],te=$B(u,D,N),Z=E.exports.useRef(te);u!=="inline"&&(Z.current=te);var X=me(me({},Z.current),{},{leavedClassName:"".concat(t,"-hidden"),removeOnLeave:!1,motionAppear:!0}),J=E.exports.useRef();return E.exports.useEffect(function(){return J.current=cr(function(){U(n)}),function(){cr.cancel(J.current)}},[n]),A(V_,{prefixCls:t,popupClassName:je("".concat(t,"-popup"),ae({},"".concat(t,"-rtl"),v),o,M),stretch:u==="horizontal"?"minWidth":null,getPopupContainer:g,builtinPlacements:q,popupPlacement:Y,popupVisible:j,popup:i,popupAlign:s&&{offset:s},action:a?[]:[I],mouseEnterDelay:b,mouseLeaveDelay:_,onPopupVisibleChange:f,forceRender:P,popupMotion:X,children:r})}function nre(e){var t=e.id,n=e.open,r=e.keyPath,i=e.children,o="inline",s=E.exports.useContext(Os),a=s.prefixCls,u=s.forceSubMenuRender,f=s.motion,p=s.defaultMotions,g=s.mode,v=E.exports.useRef(!1);v.current=g===o;var b=E.exports.useState(!v.current),_=$e(b,2),T=_[0],I=_[1],P=v.current?n:!1;E.exports.useEffect(function(){v.current&&I(!1)},[g]);var M=me({},$B(o,f,p));r.length>1&&(M.motionAppear=!1);var D=M.onVisibleChanged;return M.onVisibleChanged=function(N){return!v.current&&!N&&I(!0),D==null?void 0:D(N)},T?null:A(Eg,{mode:o,locked:!v.current,children:A(oa,{visible:P,...M,forceRender:u,removeOnLeave:!1,leavedClassName:"".concat(a,"-hidden"),children:function(N){var z=N.className,$=N.style;return A(EI,{id:t,className:z,style:$,children:i})}})})}var rre=["style","className","title","eventKey","warnKey","disabled","internalPopupClose","children","itemIcon","expandIcon","popupClassName","popupOffset","onClick","onMouseEnter","onMouseLeave","onTitleClick","onTitleMouseEnter","onTitleMouseLeave"],ire=["active"],ore=function(t){var n,r=t.style,i=t.className,o=t.title,s=t.eventKey;t.warnKey;var a=t.disabled,u=t.internalPopupClose,f=t.children,p=t.itemIcon,g=t.expandIcon,v=t.popupClassName,b=t.popupOffset,_=t.onClick,T=t.onMouseEnter,I=t.onMouseLeave,P=t.onTitleClick,M=t.onTitleMouseEnter,D=t.onTitleMouseLeave,N=kn(t,rre),z=kB(s),$=E.exports.useContext(Os),j=$.prefixCls,U=$.mode,q=$.openKeys,Y=$.disabled,te=$.overflowDisabled,Z=$.activeKey,X=$.selectedKeys,J=$.itemIcon,ue=$.expandIcon,re=$.onItemClick,se=$.onOpenChange,oe=$.onActive,he=E.exports.useContext(CI),Ce=he._internalRenderSubMenuItem,Se=E.exports.useContext(OB),be=Se.isSubPathKey,Re=Vh(),Ie="".concat(j,"-submenu"),Me=Y||a,Ae=E.exports.useRef(),ze=E.exports.useRef(),Ke=p||J,Ue=g||ue,pt=q.includes(s),gt=!te&&pt,Ot=be(X,s),qe=LB(s,Me,M,D),Ct=qe.active,ot=kn(qe,ire),vt=E.exports.useState(!1),yt=$e(vt,2),Tt=yt[0],et=yt[1],ct=function(Xt){Me||et(Xt)},at=function(Xt){ct(!0),T==null||T({key:s,domEvent:Xt})},He=function(Xt){ct(!1),I==null||I({key:s,domEvent:Xt})},ut=E.exports.useMemo(function(){return Ct||(U!=="inline"?Tt||be([Z],s):!1)},[U,Ct,Z,Tt,s,be]),bt=FB(Re.length),Dt=function(Xt){Me||(P==null||P({key:s,domEvent:Xt}),U==="inline"&&se(s,!pt))},Lt=Mf(function(It){_==null||_(mb(It)),re(It)}),Ht=function(Xt){U!=="inline"&&se(s,Xt)},Fe=function(){oe(s)},Ye=z&&"".concat(z,"-popup"),Zt=it("div",{role:"menuitem",style:bt,className:"".concat(Ie,"-title"),tabIndex:Me?null:-1,ref:Ae,title:typeof o=="string"?o:null,"data-menu-id":te&&z?null:z,"aria-expanded":gt,"aria-haspopup":!0,"aria-controls":Ye,"aria-disabled":Me,onClick:Dt,onFocus:Fe,...ot,children:[o,A(zB,{icon:U!=="horizontal"?Ue:null,props:me(me({},t),{},{isOpen:gt,isSubMenu:!0}),children:A("i",{className:"".concat(Ie,"-arrow")})})]}),an=E.exports.useRef(U);if(U!=="inline"&&Re.length>1?an.current="vertical":an.current=U,!te){var Kt=an.current;Zt=A(tre,{mode:Kt,prefixCls:Ie,visible:!u&&gt&&U!=="inline",popupClassName:v,popupOffset:b,popup:A(Eg,{mode:Kt==="horizontal"?"vertical":Kt,children:A(EI,{id:Ye,ref:ze,children:f})}),disabled:Me,onVisibleChange:Ht,children:Zt})}var Vt=it(nl.Item,{role:"none",...N,component:"li",style:r,className:je(Ie,"".concat(Ie,"-").concat(U),i,(n={},ae(n,"".concat(Ie,"-open"),gt),ae(n,"".concat(Ie,"-active"),ut),ae(n,"".concat(Ie,"-selected"),Ot),ae(n,"".concat(Ie,"-disabled"),Me),n)),onMouseEnter:at,onMouseLeave:He,children:[Zt,!te&&A(nre,{id:Ye,open:gt,keyPath:Re,children:f})]});return Ce&&(Vt=Ce(Vt,t,{selected:Ot,active:ut,open:gt,disabled:Me})),A(Eg,{onItemClick:Lt,mode:U==="horizontal"?"vertical":U,itemIcon:Ke,expandIcon:Ue,children:Vt})};function G_(e){var t=e.eventKey,n=e.children,r=Vh(t),i=PI(n,r),o=K_();E.exports.useEffect(function(){if(o)return o.registerPath(t,r),function(){o.unregisterPath(t,r)}},[r]);var s;return o?s=i:s=A(ore,{...e,children:i}),A(RB.Provider,{value:r,children:s})}var are=["prefixCls","rootClassName","style","className","tabIndex","items","children","direction","id","mode","inlineCollapsed","disabled","disabledOverflow","subMenuOpenDelay","subMenuCloseDelay","forceSubMenuRender","defaultOpenKeys","openKeys","activeKey","defaultActiveFirst","selectable","multiple","defaultSelectedKeys","selectedKeys","onSelect","onDeselect","inlineIndent","motion","defaultMotions","triggerSubMenuAction","builtinPlacements","itemIcon","expandIcon","overflowedIndicator","overflowedIndicatorPopupClassName","getPopupContainer","onClick","onOpenChange","onKeyDown","openAnimation","openTransitionName","_internalRenderMenuItem","_internalRenderSubMenuItem"],Sf=[],sre=E.exports.forwardRef(function(e,t){var n,r,i=e,o=i.prefixCls,s=o===void 0?"rc-menu":o,a=i.rootClassName,u=i.style,f=i.className,p=i.tabIndex,g=p===void 0?0:p,v=i.items,b=i.children,_=i.direction,T=i.id,I=i.mode,P=I===void 0?"vertical":I,M=i.inlineCollapsed,D=i.disabled,N=i.disabledOverflow,z=i.subMenuOpenDelay,$=z===void 0?.1:z,j=i.subMenuCloseDelay,U=j===void 0?.1:j,q=i.forceSubMenuRender,Y=i.defaultOpenKeys,te=i.openKeys,Z=i.activeKey,X=i.defaultActiveFirst,J=i.selectable,ue=J===void 0?!0:J,re=i.multiple,se=re===void 0?!1:re,oe=i.defaultSelectedKeys,he=i.selectedKeys,Ce=i.onSelect,Se=i.onDeselect,be=i.inlineIndent,Re=be===void 0?24:be,Ie=i.motion,Me=i.defaultMotions,Ae=i.triggerSubMenuAction,ze=Ae===void 0?"hover":Ae,Ke=i.builtinPlacements,Ue=i.itemIcon,pt=i.expandIcon,gt=i.overflowedIndicator,Ot=gt===void 0?"...":gt,qe=i.overflowedIndicatorPopupClassName,Ct=i.getPopupContainer,ot=i.onClick,vt=i.onOpenChange,yt=i.onKeyDown;i.openAnimation,i.openTransitionName;var Tt=i._internalRenderMenuItem,et=i._internalRenderSubMenuItem,ct=kn(i,are),at=E.exports.useMemo(function(){return Yne(b,v,Sf)},[b,v]),He=E.exports.useState(!1),ut=$e(He,2),bt=ut[0],Dt=ut[1],Lt=E.exports.useRef(),Ht=Vne(T),Fe=_==="rtl",Ye=Ei(Y,{value:te,postState:function(Bn){return Bn||Sf}}),Zt=$e(Ye,2),an=Zt[0],Kt=Zt[1],Vt=function(Bn){var rr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;function Er(){Kt(Bn),vt==null||vt(Bn)}rr?al.exports.flushSync(Er):Er()},It=E.exports.useState(an),Xt=$e(It,2),pn=Xt[0],tt=Xt[1],At=E.exports.useRef(!1),qt=E.exports.useMemo(function(){return(P==="inline"||P==="vertical")&&M?["vertical",M]:[P,!1]},[P,M]),En=$e(qt,2),yn=En[0],St=En[1],Pn=yn==="inline",_n=E.exports.useState(yn),tn=$e(_n,2),Ft=tn[0],dt=tn[1],mt=E.exports.useState(St),$t=$e(mt,2),Wt=$t[0],mn=$t[1];E.exports.useEffect(function(){dt(yn),mn(St),At.current&&(Pn?Kt(pn):Vt(Sf))},[yn,St]);var An=E.exports.useState(0),Qn=$e(An,2),Jn=Qn[0],ye=Qn[1],W=Jn>=at.length-1||Ft!=="horizontal"||N;E.exports.useEffect(function(){Pn&&tt(an)},[an]),E.exports.useEffect(function(){return At.current=!0,function(){At.current=!1}},[]);var Q=$ne(),fe=Q.registerPath,ce=Q.unregisterPath,xe=Q.refreshOverflowKeys,ke=Q.isSubPathKey,we=Q.getKeyPath,Pe=Q.getKeys,Le=Q.getSubPathKeys,Ze=E.exports.useMemo(function(){return{registerPath:fe,unregisterPath:ce}},[fe,ce]),Xe=E.exports.useMemo(function(){return{isSubPathKey:ke}},[ke]);E.exports.useEffect(function(){xe(W?Sf:at.slice(Jn+1).map(function(Wn){return Wn.key}))},[Jn,W]);var Ve=Ei(Z||X&&((n=at[0])===null||n===void 0?void 0:n.key),{value:Z}),Bt=$e(Ve,2),Et=Bt[0],nt=Bt[1],zt=Mf(function(Wn){nt(Wn)}),Gt=Mf(function(){nt(void 0)});E.exports.useImperativeHandle(t,function(){return{list:Lt.current,focus:function(Bn){var rr,Er=Et!=null?Et:(rr=at.find(function(rc){return!rc.props.disabled}))===null||rr===void 0?void 0:rr.key;if(Er){var Tr,Gr,ko;(Tr=Lt.current)===null||Tr===void 0||(Gr=Tr.querySelector("li[data-menu-id='".concat(wI(Ht,Er),"']")))===null||Gr===void 0||(ko=Gr.focus)===null||ko===void 0||ko.call(Gr,Bn)}}}});var wn=Ei(oe||[],{value:he,postState:function(Bn){return Array.isArray(Bn)?Bn:Bn==null?Sf:[Bn]}}),dn=$e(wn,2),Cn=dn[0],jn=dn[1],or=function(Bn){if(ue){var rr=Bn.key,Er=Cn.includes(rr),Tr;se?Er?Tr=Cn.filter(function(ko){return ko!==rr}):Tr=[].concat(Mt(Cn),[rr]):Tr=[rr],jn(Tr);var Gr=me(me({},Bn),{},{selectedKeys:Tr});Er?Se==null||Se(Gr):Ce==null||Ce(Gr)}!se&&an.length&&Ft!=="inline"&&Vt(Sf)},Wr=Mf(function(Wn){ot==null||ot(mb(Wn)),or(Wn)}),dr=Mf(function(Wn,Bn){var rr=an.filter(function(Tr){return Tr!==Wn});if(Bn)rr.push(Wn);else if(Ft!=="inline"){var Er=Le(Wn);rr=rr.filter(function(Tr){return!Er.has(Tr)})}dI(an,rr,!0)||Vt(rr,!0)}),zr=Mf(Ct),On=function(Bn,rr){var Er=rr!=null?rr:!an.includes(Bn);dr(Bn,Er)},Mn=Lne(Ft,Et,Fe,Ht,Lt,Pe,we,nt,On,yt);E.exports.useEffect(function(){Dt(!0)},[]);var Nn=E.exports.useMemo(function(){return{_internalRenderMenuItem:Tt,_internalRenderSubMenuItem:et}},[Tt,et]),ti=Ft!=="horizontal"||N?at:at.map(function(Wn,Bn){return A(Eg,{overflowDisabled:Bn>Jn,children:Wn},Wn.key)}),wr=A(nl,{id:T,ref:Lt,prefixCls:"".concat(s,"-overflow"),component:"ul",itemComponent:W_,className:je(s,"".concat(s,"-root"),"".concat(s,"-").concat(Ft),f,(r={},ae(r,"".concat(s,"-inline-collapsed"),Wt),ae(r,"".concat(s,"-rtl"),Fe),r),a),dir:_,style:u,role:"menu",tabIndex:g,data:ti,renderRawItem:function(Bn){return Bn},renderRawRest:function(Bn){var rr=Bn.length,Er=rr?at.slice(-rr):null;return A(G_,{eventKey:DE,title:Ot,disabled:W,internalPopupClose:rr===0,popupClassName:qe,children:Er})},maxCount:Ft!=="horizontal"||N?nl.INVALIDATE:nl.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:function(Bn){ye(Bn)},onKeyDown:Mn,...ct});return A(CI.Provider,{value:Nn,children:A(IB.Provider,{value:Ht,children:it(Eg,{prefixCls:s,rootClassName:a,mode:Ft,openKeys:an,rtl:Fe,disabled:D,motion:bt?Ie:null,defaultMotions:bt?Me:null,activeKey:Et,onActive:zt,onInactive:Gt,selectedKeys:Cn,inlineIndent:Re,subMenuOpenDelay:$,subMenuCloseDelay:U,forceSubMenuRender:q,builtinPlacements:Ke,triggerSubMenuAction:ze,getPopupContainer:zr,itemIcon:Ue,expandIcon:pt,onItemClick:Wr,onOpenChange:dr,children:[A(OB.Provider,{value:Xe,children:wr}),A("div",{style:{display:"none"},"aria-hidden":!0,children:A(MB.Provider,{value:Ze,children:at})})]})})})}),lre=["className","title","eventKey","children"],cre=["children"],ure=function(t){var n=t.className,r=t.title;t.eventKey;var i=t.children,o=kn(t,lre),s=E.exports.useContext(Os),a=s.prefixCls,u="".concat(a,"-item-group");return it("li",{role:"presentation",...o,onClick:function(p){return p.stopPropagation()},className:je(u,n),children:[A("div",{role:"presentation",className:"".concat(u,"-title"),title:typeof r=="string"?r:void 0,children:r}),A("ul",{role:"group",className:"".concat(u,"-list"),children:i})]})};function q_(e){var t=e.children,n=kn(e,cre),r=Vh(n.eventKey),i=PI(t,r),o=K_();return o?i:A(ure,{...Gi(n,["warnKey"]),children:i})}function TI(e){var t=e.className,n=e.style,r=E.exports.useContext(Os),i=r.prefixCls,o=K_();return o?null:A("li",{className:je("".concat(i,"-item-divider"),t),style:n})}var rv=sre;rv.Item=W_;rv.SubMenu=G_;rv.ItemGroup=q_;rv.Divider=TI;var dre={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}}]},name:"left",theme:"outlined"};const fre=dre;var BB=function(t,n){return A(Yn,{...me(me({},t),{},{ref:n,icon:fre})})};BB.displayName="LeftOutlined";const VB=E.exports.forwardRef(BB);var hre={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"}}]},name:"right",theme:"outlined"};const pre=hre;var UB=function(t,n){return A(Yn,{...me(me({},t),{},{ref:n,icon:pre})})};UB.displayName="RightOutlined";const Z_=E.exports.forwardRef(UB);globalThis&&globalThis.__rest;var jB=E.exports.createContext({}),mre=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},gre=function(t){var n=t.prefixCls,r=t.className,i=t.dashed,o=mre(t,["prefixCls","className","dashed"]),s=E.exports.useContext(zn),a=s.getPrefixCls,u=a("menu",n),f=je(ae({},"".concat(u,"-item-divider-dashed"),!!i),r);return A(TI,{className:f,...o})};const HB=gre;var vre=E.exports.createContext({prefixCls:"",firstLevel:!0,inlineCollapsed:!1});const gb=vre;var yre=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},II=function(e){si(n,e);var t=li(n);function n(){var r;return jr(this,n),r=t.apply(this,arguments),r.renderItem=function(i){var o,s=i.siderCollapsed,a,u=r.context,f=u.prefixCls,p=u.firstLevel,g=u.inlineCollapsed,v=u.direction,b=u.disableMenuItemTitleTooltip,_=r.props,T=_.className,I=_.children,P=r.props,M=P.title,D=P.icon,N=P.danger,z=yre(P,["title","icon","danger"]),$=M;typeof M>"u"?$=p?I:"":M===!1&&($="");var j={title:$};!s&&!g&&(j.title=null,j.open=!1);var U=Po(I).length,q=it(W_,{...z,className:je((o={},ae(o,"".concat(f,"-item-danger"),N),ae(o,"".concat(f,"-item-only-child"),(D?U+1:U)===1),o),T),title:typeof M=="string"?M:void 0,children:[Pi(D,{className:je(Ta(D)?(a=D.props)===null||a===void 0?void 0:a.className:"","".concat(f,"-item-icon"))}),r.renderItemChildren(g)]});return b||(q=A(ka,{...j,placement:v==="rtl"?"left":"right",overlayClassName:"".concat(f,"-inline-collapsed-tooltip"),children:q})),q},r}return Hr(n,[{key:"renderItemChildren",value:function(i){var o=this.context,s=o.prefixCls,a=o.firstLevel,u=this.props,f=u.icon,p=u.children,g=A("span",{className:"".concat(s,"-title-content"),children:p});return(!f||Ta(p)&&p.type==="span")&&p&&i&&a&&typeof p=="string"?A("div",{className:"".concat(s,"-inline-collapsed-noicon"),children:p.charAt(0)}):g}},{key:"render",value:function(){return A(jB.Consumer,{children:this.renderItem})}}]),n}(E.exports.Component);II.contextType=gb;function KB(e){var t,n=e.popupClassName,r=e.icon,i=e.title,o=e.theme,s=E.exports.useContext(gb),a=s.prefixCls,u=s.inlineCollapsed,f=s.antdMenuTheme,p=Vh(),g;if(!r)g=u&&!p.length&&i&&typeof i=="string"?A("div",{className:"".concat(a,"-inline-collapsed-noicon"),children:i.charAt(0)}):A("span",{className:"".concat(a,"-title-content"),children:i});else{var v=Ta(i)&&i.type==="span";g=it(nr,{children:[Pi(r,{className:je(Ta(r)?(t=r.props)===null||t===void 0?void 0:t.className:"","".concat(a,"-item-icon"))}),v?i:A("span",{className:"".concat(a,"-title-content"),children:i})]})}var b=E.exports.useMemo(function(){return Je(Je({},s),{firstLevel:!1})},[s]);return A(gb.Provider,{value:b,children:A(G_,{...Gi(e,["icon"]),title:g,popupClassName:je(a,"".concat(a,"-").concat(o||f),n)})})}var xre=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function NE(e){return(e||[]).map(function(t,n){if(t&&on(t)==="object"){var r=t,i=r.label,o=r.children,s=r.key,a=r.type,u=xre(r,["label","children","key","type"]),f=s!=null?s:"tmp-".concat(n);return o||a==="group"?a==="group"?A(q_,{...u,title:i,children:NE(o)},f):A(KB,{...u,title:i,children:NE(o)},f):a==="divider"?A(HB,{...u},f):A(II,{...u,children:i},f)}return null}).filter(function(t){return t})}function bre(e){return E.exports.useMemo(function(){return e&&NE(e)},[e])}var _re=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},vb=E.exports.createContext(null),WB=function(t){var n=t.children,r=_re(t,["children"]),i=E.exports.useContext(vb),o=E.exports.useMemo(function(){return Je(Je({},i),r)},[i,r.prefixCls,r.mode,r.selectable]);return A(vb.Provider,{value:o,children:n})},wre=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},Cre=E.exports.forwardRef(function(e,t){var n,r=E.exports.useContext(vb)||{},i=E.exports.useContext(zn),o=i.getPrefixCls,s=i.getPopupContainer,a=i.direction,u=o(),f=e.prefixCls,p=e.className,g=e.theme,v=g===void 0?"light":g,b=e.expandIcon,_=e._internalDisableMenuItemTitleTooltip,T=e.inlineCollapsed,I=e.siderCollapsed,P=e.items,M=e.children,D=e.mode,N=e.selectable,z=e.onClick,$=wre(e,["prefixCls","className","theme","expandIcon","_internalDisableMenuItemTitleTooltip","inlineCollapsed","siderCollapsed","items","children","mode","selectable","onClick"]),j=Gi($,["collapsedWidth"]),U=bre(P)||M;(n=r.validator)===null||n===void 0||n.call(r,{mode:D});var q=Cg(function(){var oe;z==null||z.apply(void 0,arguments),(oe=r==null?void 0:r.onClick)===null||oe===void 0||oe.call(r)}),Y=r.mode||D,te=N!=null?N:r.selectable,Z=E.exports.useMemo(function(){return I!==void 0?I:T},[T,I]),X={horizontal:{motionName:"".concat(u,"-slide-up")},inline:U_,other:{motionName:"".concat(u,"-zoom-big")}},J=o("menu",f||r.prefixCls),ue=je("".concat(J,"-").concat(v),p),re;typeof b=="function"?re=b:re=Pi(b||r.expandIcon,{className:"".concat(J,"-submenu-expand-icon")});var se=E.exports.useMemo(function(){return{prefixCls:J,inlineCollapsed:Z||!1,antdMenuTheme:v,direction:a,firstLevel:!0,disableMenuItemTitleTooltip:_}},[J,Z,v,a,_]);return A(vb.Provider,{value:null,children:A(gb.Provider,{value:se,children:A(rv,{getPopupContainer:s,overflowedIndicator:A(TB,{}),overflowedIndicatorPopupClassName:"".concat(J,"-").concat(v),mode:Y,selectable:te,onClick:q,...j,inlineCollapsed:Z,className:ue,prefixCls:J,direction:a,defaultMotions:X,expandIcon:re,ref:t,children:U})})})}),iv=function(e){si(n,e);var t=li(n);function n(){var r;return jr(this,n),r=t.apply(this,arguments),r.focus=function(i){var o;(o=r.menu)===null||o===void 0||o.focus(i)},r}return Hr(n,[{key:"render",value:function(){var i=this;return A(jB.Consumer,{children:function(o){return A(Cre,{ref:function(a){i.menu=a},...i.props,...o})}})}}]),n}(E.exports.Component);iv.Divider=HB;iv.Item=II;iv.SubMenu=KB;iv.ItemGroup=q_;const GB=iv;var Ef={adjustX:1,adjustY:1},Pf=[0,0],Sre={topLeft:{points:["bl","tl"],overflow:Ef,offset:[0,-4],targetOffset:Pf},topCenter:{points:["bc","tc"],overflow:Ef,offset:[0,-4],targetOffset:Pf},topRight:{points:["br","tr"],overflow:Ef,offset:[0,-4],targetOffset:Pf},bottomLeft:{points:["tl","bl"],overflow:Ef,offset:[0,4],targetOffset:Pf},bottomCenter:{points:["tc","bc"],overflow:Ef,offset:[0,4],targetOffset:Pf},bottomRight:{points:["tr","br"],overflow:Ef,offset:[0,4],targetOffset:Pf}},Ere=Pt.ESC,Pre=Pt.TAB;function Tre(e){var t=e.visible,n=e.setTriggerVisible,r=e.triggerRef,i=e.onVisibleChange,o=e.autoFocus,s=E.exports.useRef(!1),a=function(){if(t&&r.current){var g,v,b,_;(g=r.current)===null||g===void 0||(v=g.triggerRef)===null||v===void 0||(b=v.current)===null||b===void 0||(_=b.focus)===null||_===void 0||_.call(b),n(!1),typeof i=="function"&&i(!1)}},u=function(){var g,v,b,_,T=DB((g=r.current)===null||g===void 0||(v=g.popupRef)===null||v===void 0||(b=v.current)===null||b===void 0||(_=b.getElement)===null||_===void 0?void 0:_.call(b)),I=T[0];return I!=null&&I.focus?(I.focus(),s.current=!0,!0):!1},f=function(g){switch(g.keyCode){case Ere:a();break;case Pre:{var v=!1;s.current||(v=u()),v?g.preventDefault():a();break}}};E.exports.useEffect(function(){return t?(window.addEventListener("keydown",f),o&&cr(u,3),function(){window.removeEventListener("keydown",f),s.current=!1}):function(){s.current=!1}},[t])}var Ire=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus"];function kre(e,t){var n=e.arrow,r=n===void 0?!1:n,i=e.prefixCls,o=i===void 0?"rc-dropdown":i,s=e.transitionName,a=e.animation,u=e.align,f=e.placement,p=f===void 0?"bottomLeft":f,g=e.placements,v=g===void 0?Sre:g,b=e.getPopupContainer,_=e.showAction,T=e.hideAction,I=e.overlayClassName,P=e.overlayStyle,M=e.visible,D=e.trigger,N=D===void 0?["hover"]:D,z=e.autoFocus,$=kn(e,Ire),j=E.exports.useState(),U=$e(j,2),q=U[0],Y=U[1],te="visible"in e?M:q,Z=E.exports.useRef(null);E.exports.useImperativeHandle(t,function(){return Z.current}),Tre({visible:te,setTriggerVisible:Y,triggerRef:Z,onVisibleChange:e.onVisibleChange,autoFocus:z});var X=function(){var Re=e.overlay,Ie;return typeof Re=="function"?Ie=Re():Ie=Re,Ie},J=function(Re){var Ie=e.onOverlayClick;Y(!1),Ie&&Ie(Re)},ue=function(Re){var Ie=e.onVisibleChange;Y(Re),typeof Ie=="function"&&Ie(Re)},re=function(){var Re=X();return it(nr,{children:[r&&A("div",{className:"".concat(o,"-arrow")}),Re]})},se=function(){var Re=e.overlay;return typeof Re=="function"?re:re()},oe=function(){var Re=e.minOverlayWidthMatchTrigger,Ie=e.alignPoint;return"minOverlayWidthMatchTrigger"in e?Re:!Ie},he=function(){var Re=e.openClassName;return Re!==void 0?Re:"".concat(o,"-open")},Ce=function(){var Re=e.children,Ie=Re.props?Re.props:{},Me=je(Ie.className,he());return te&&Re?E.exports.cloneElement(Re,{className:Me}):Re},Se=T;return!Se&&N.indexOf("contextMenu")!==-1&&(Se=["click"]),A(V_,{...me(me({builtinPlacements:v},$),{},{prefixCls:o,ref:Z,popupClassName:je(I,ae({},"".concat(o,"-show-arrow"),r)),popupStyle:P,action:N,showAction:_,hideAction:Se||[],popupPlacement:p,popupAlign:u,popupTransitionName:s,popupAnimation:a,popupVisible:te,stretch:oe()?"minWidth":"",popup:se(),onPopupVisibleChange:ue,onPopupClick:J,getPopupContainer:b}),children:Ce()})}const Mre=E.exports.forwardRef(kre);var Rre=0,nh={};function yb(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,n=Rre++,r=t;function i(){r-=1,r<=0?(e(),delete nh[n]):nh[n]=cr(i)}return nh[n]=cr(i),n}yb.cancel=function(t){t!==void 0&&(cr.cancel(nh[t]),delete nh[t])};yb.ids=nh;var zC;function MA(e){return!e||e.offsetParent===null||e.hidden}function Ore(e){return e instanceof Document?e.body:Array.from(e.childNodes).find(function(t){return(t==null?void 0:t.nodeType)===Node.ELEMENT_NODE})}function Dre(e){var t=(e||"").match(/rgba?\((\d*), (\d*), (\d*)(, [\d.]*)?\)/);return t&&t[1]&&t[2]&&t[3]?!(t[1]===t[2]&&t[2]===t[3]):!0}var qB=function(e){si(n,e);var t=li(n);function n(){var r;return jr(this,n),r=t.apply(this,arguments),r.containerRef=E.exports.createRef(),r.animationStart=!1,r.destroyed=!1,r.onClick=function(i,o){var s,a,u=r.props,f=u.insertExtraNode,p=u.disabled;if(!(p||!i||MA(i)||i.className.includes("-leave"))){r.extraNode=document.createElement("div");var g=Fn(r),v=g.extraNode,b=r.context.getPrefixCls;v.className="".concat(b(""),"-click-animating-node");var _=r.getAttributeName();if(i.setAttribute(_,"true"),o&&o!=="#fff"&&o!=="#ffffff"&&o!=="rgb(255, 255, 255)"&&o!=="rgba(255, 255, 255, 1)"&&Dre(o)&&!/rgba\((?:\d*, ){3}0\)/.test(o)&&o!=="transparent"){v.style.borderColor=o;var T=((s=i.getRootNode)===null||s===void 0?void 0:s.call(i))||i.ownerDocument,I=(a=Ore(T))!==null&&a!==void 0?a:T;zC=Jg(`
[`.concat(b(""),"-click-animating-without-extra-node='true']::after, .").concat(b(""),`-click-animating-node {
--antd-wave-shadow-color: `).concat(o,`;
}`),"antd-wave",{csp:r.csp,attachTo:I})}f&&i.appendChild(v),["transition","animation"].forEach(function(P){i.addEventListener("".concat(P,"start"),r.onTransitionStart),i.addEventListener("".concat(P,"end"),r.onTransitionEnd)})}},r.onTransitionStart=function(i){if(!r.destroyed){var o=r.containerRef.current;!i||i.target!==o||r.animationStart||r.resetEffect(o)}},r.onTransitionEnd=function(i){!i||i.animationName!=="fadeEffect"||r.resetEffect(i.target)},r.bindAnimationEvent=function(i){if(!(!i||!i.getAttribute||i.getAttribute("disabled")||i.className.includes("disabled"))){var o=function(a){if(!(a.target.tagName==="INPUT"||MA(a.target))){r.resetEffect(i);var u=getComputedStyle(i).getPropertyValue("border-top-color")||getComputedStyle(i).getPropertyValue("border-color")||getComputedStyle(i).getPropertyValue("background-color");r.clickWaveTimeoutId=window.setTimeout(function(){return r.onClick(i,u)},0),yb.cancel(r.animationStartId),r.animationStart=!0,r.animationStartId=yb(function(){r.animationStart=!1},10)}};return i.addEventListener("click",o,!0),{cancel:function(){i.removeEventListener("click",o,!0)}}}},r.renderWave=function(i){var o=i.csp,s=r.props.children;if(r.csp=o,!E.exports.isValidElement(s))return s;var a=r.containerRef;return Nh(s)&&(a=Aa(s.ref,r.containerRef)),Pi(s,{ref:a})},r}return Hr(n,[{key:"componentDidMount",value:function(){this.destroyed=!1;var i=this.containerRef.current;!i||i.nodeType!==1||(this.instance=this.bindAnimationEvent(i))}},{key:"componentWillUnmount",value:function(){this.instance&&this.instance.cancel(),this.clickWaveTimeoutId&&clearTimeout(this.clickWaveTimeoutId),this.destroyed=!0}},{key:"getAttributeName",value:function(){var i=this.context.getPrefixCls,o=this.props.insertExtraNode;return o?"".concat(i(""),"-click-animating"):"".concat(i(""),"-click-animating-without-extra-node")}},{key:"resetEffect",value:function(i){var o=this;if(!(!i||i===this.extraNode||!(i instanceof Element))){var s=this.props.insertExtraNode,a=this.getAttributeName();i.setAttribute(a,"false"),zC&&(zC.innerHTML=""),s&&this.extraNode&&i.contains(this.extraNode)&&i.removeChild(this.extraNode),["transition","animation"].forEach(function(u){i.removeEventListener("".concat(u,"start"),o.onTransitionStart),i.removeEventListener("".concat(u,"end"),o.onTransitionEnd)})}}},{key:"render",value:function(){return A(Bd,{children:this.renderWave})}}]),n}(E.exports.Component);qB.contextType=zn;const Are=qB;var Nre=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},ZB=E.exports.createContext(void 0),Lre=function(t){var n,r=E.exports.useContext(zn),i=r.getPrefixCls,o=r.direction,s=t.prefixCls,a=t.size,u=t.className,f=Nre(t,["prefixCls","size","className"]),p=i("btn-group",s),g="";switch(a){case"large":g="lg";break;case"small":g="sm";break}var v=je(p,(n={},ae(n,"".concat(p,"-").concat(g),g),ae(n,"".concat(p,"-rtl"),o==="rtl"),n),u);return A(ZB.Provider,{value:a,children:A("div",{...f,className:v})})};const zre=Lre;var FC=function(){return{width:0,opacity:0,transform:"scale(0)"}},$C=function(t){return{width:t.scrollWidth,opacity:1,transform:"scale(1)"}},Fre=function(t){var n=t.prefixCls,r=t.loading,i=t.existIcon,o=!!r;return i?A("span",{className:"".concat(n,"-loading-icon"),children:A(Id,{})}):A(oa,{visible:o,motionName:"".concat(n,"-loading-icon-motion"),removeOnLeave:!0,onAppearStart:FC,onAppearActive:$C,onEnterStart:FC,onEnterActive:$C,onLeaveStart:$C,onLeaveActive:FC,children:function(s,a){var u=s.className,f=s.style;return A("span",{className:"".concat(n,"-loading-icon"),style:f,ref:a,children:A(Id,{className:u})})}})};const $re=Fre;var Bre=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},RA=/^[\u4e00-\u9fa5]{2}$/,LE=RA.test.bind(RA);function Vre(e){return typeof e=="string"}function BC(e){return e==="text"||e==="link"}function Ure(e,t){if(e!=null){var n=t?" ":"";return typeof e!="string"&&typeof e!="number"&&Vre(e.type)&&LE(e.props.children)?Pi(e,{children:e.props.children.split("").join(n)}):typeof e=="string"?LE(e)?A("span",{children:e.split("").join(n)}):A("span",{children:e}):M$(e)?A("span",{children:e}):e}}function jre(e,t){var n=!1,r=[];return E.exports.Children.forEach(e,function(i){var o=on(i),s=o==="string"||o==="number";if(n&&s){var a=r.length-1,u=r[a];r[a]="".concat(u).concat(i)}else r.push(i);n=s}),E.exports.Children.map(r,function(i){return Ure(i,t)})}aa("default","primary","ghost","dashed","link","text");aa("default","circle","round");aa("submit","button","reset");function XB(e){return e==="danger"?{danger:!0}:{type:e}}var Hre=function(t,n){var r,i=t.loading,o=i===void 0?!1:i,s=t.prefixCls,a=t.type,u=a===void 0?"default":a,f=t.danger,p=t.shape,g=p===void 0?"default":p,v=t.size,b=t.disabled,_=t.className,T=t.children,I=t.icon,P=t.ghost,M=P===void 0?!1:P,D=t.block,N=D===void 0?!1:D,z=t.htmlType,$=z===void 0?"button":z,j=Bre(t,["loading","prefixCls","type","danger","shape","size","disabled","className","children","icon","ghost","block","htmlType"]),U=E.exports.useContext(Jl),q=E.exports.useContext(fu),Y=b!=null?b:q,te=E.exports.useContext(ZB),Z=E.exports.useState(!!o),X=$e(Z,2),J=X[0],ue=X[1],re=E.exports.useState(!1),se=$e(re,2),oe=se[0],he=se[1],Ce=E.exports.useContext(zn),Se=Ce.getPrefixCls,be=Ce.autoInsertSpaceInButton,Re=Ce.direction,Ie=n||E.exports.createRef(),Me=function(){return E.exports.Children.count(T)===1&&!I&&!BC(u)},Ae=function(){if(!(!Ie||!Ie.current||be===!1)){var bt=Ie.current.textContent;Me()&&LE(bt)?oe||he(!0):oe&&he(!1)}},ze=typeof o=="boolean"?o:(o==null?void 0:o.delay)||!0;E.exports.useEffect(function(){var ut=null;return typeof ze=="number"?ut=window.setTimeout(function(){ut=null,ue(ze)},ze):ue(ze),function(){ut&&(window.clearTimeout(ut),ut=null)}},[ze]),E.exports.useEffect(Ae,[Ie]);var Ke=function(bt){var Dt=t.onClick;if(J||Y){bt.preventDefault();return}Dt==null||Dt(bt)},Ue=Se("btn",s),pt=be!==!1,gt=Bh(Ue,Re),Ot=gt.compactSize,qe=gt.compactItemClassnames,Ct={large:"lg",small:"sm",middle:void 0},ot=Ot||te||v||U,vt=ot&&Ct[ot]||"",yt=J?"loading":I,Tt=Gi(j,["navigate"]),et=je(Ue,(r={},ae(r,"".concat(Ue,"-").concat(g),g!=="default"&&g),ae(r,"".concat(Ue,"-").concat(u),u),ae(r,"".concat(Ue,"-").concat(vt),vt),ae(r,"".concat(Ue,"-icon-only"),!T&&T!==0&&!!yt),ae(r,"".concat(Ue,"-background-ghost"),M&&!BC(u)),ae(r,"".concat(Ue,"-loading"),J),ae(r,"".concat(Ue,"-two-chinese-chars"),oe&&pt&&!J),ae(r,"".concat(Ue,"-block"),N),ae(r,"".concat(Ue,"-dangerous"),!!f),ae(r,"".concat(Ue,"-rtl"),Re==="rtl"),ae(r,"".concat(Ue,"-disabled"),Tt.href!==void 0&&Y),r),qe,_),ct=I&&!J?I:A($re,{existIcon:!!I,prefixCls:Ue,loading:!!J}),at=T||T===0?jre(T,Me()&&pt):null;if(Tt.href!==void 0)return it("a",{...Tt,className:et,onClick:Ke,ref:Ie,children:[ct,at]});var He=it("button",{...j,type:$,className:et,onClick:Ke,disabled:Y,ref:Ie,children:[ct,at]});return BC(u)?He:A(Are,{disabled:!!J,children:He})},kI=E.exports.forwardRef(Hre);kI.Group=zre;kI.__ANT_BUTTON=!0;const Yr=kI;var YB=function(t){if(To()&&window.document.documentElement){var n=Array.isArray(t)?t:[t],r=window.document.documentElement;return n.some(function(i){return i in r.style})}return!1},Kre=function(t,n){if(!YB(t))return!1;var r=document.createElement("div"),i=r.style[t];return r.style[t]=n,r.style[t]!==i};function zE(e,t){return!Array.isArray(e)&&t!==void 0?Kre(e,t):YB(e)}var QB=function(){return To()&&window.document.documentElement},px,Wre=function(){if(!QB())return!1;if(px!==void 0)return px;var t=document.createElement("div");return t.style.display="flex",t.style.flexDirection="column",t.style.rowGap="1px",t.appendChild(document.createElement("div")),t.appendChild(document.createElement("div")),document.body.appendChild(t),px=t.scrollHeight===1,document.body.removeChild(t),px};const JB=function(){var e=E.exports.useState(!1),t=$e(e,2),n=t[0],r=t[1];return E.exports.useEffect(function(){r(Wre())},[]),n};function Gre(e){var t=e.className,n=e.direction,r=e.index,i=e.marginDirection,o=e.children,s=e.split,a=e.wrap,u=E.exports.useContext(e8),f=u.horizontalSize,p=u.verticalSize,g=u.latestIndex,v=u.supportFlexGap,b={};return v||(n==="vertical"?r<g&&(b={marginBottom:f/(s?2:1)}):b=Je(Je({},r<g&&ae({},i,f/(s?2:1))),a&&{paddingBottom:p})),o==null?null:it(nr,{children:[A("div",{className:t,style:b,children:o}),r<g&&s&&A("span",{className:"".concat(t,"-split"),style:b,children:s})]})}var qre=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},e8=E.exports.createContext({latestIndex:0,horizontalSize:0,verticalSize:0,supportFlexGap:!1}),Zre={small:8,middle:16,large:24};function Xre(e){return typeof e=="string"?Zre[e]:e||0}var Yre=function(t){var n,r=E.exports.useContext(zn),i=r.getPrefixCls,o=r.space,s=r.direction,a=t.size,u=a===void 0?(o==null?void 0:o.size)||"small":a,f=t.align,p=t.className,g=t.children,v=t.direction,b=v===void 0?"horizontal":v,_=t.prefixCls,T=t.split,I=t.style,P=t.wrap,M=P===void 0?!1:P,D=qre(t,["size","align","className","children","direction","prefixCls","split","style","wrap"]),N=JB(),z=E.exports.useMemo(function(){return(Array.isArray(u)?u:[u,u]).map(function(he){return Xre(he)})},[u]),$=$e(z,2),j=$[0],U=$[1],q=Po(g,{keepEmpty:!0}),Y=f===void 0&&b==="horizontal"?"center":f,te=i("space",_),Z=je(te,"".concat(te,"-").concat(b),(n={},ae(n,"".concat(te,"-rtl"),s==="rtl"),ae(n,"".concat(te,"-align-").concat(Y),Y),n),p),X="".concat(te,"-item"),J=s==="rtl"?"marginLeft":"marginRight",ue=0,re=q.map(function(he,Ce){he!=null&&(ue=Ce);var Se=he&&he.key||"".concat(X,"-").concat(Ce);return A(Gre,{className:X,direction:b,index:Ce,marginDirection:J,split:T,wrap:M,children:he},Se)}),se=E.exports.useMemo(function(){return{horizontalSize:j,verticalSize:U,latestIndex:ue,supportFlexGap:N}},[j,U,ue,N]);if(q.length===0)return null;var oe={};return M&&(oe.flexWrap="wrap",N||(oe.marginBottom=-U)),N&&(oe.columnGap=j,oe.rowGap=U),A("div",{className:Z,style:Je(Je({},oe),I),...D,children:A(e8.Provider,{value:se,children:re})})},t8=Yre;t8.Compact=dne;const Qre=t8;var Jre=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},n8=function(t){var n=E.exports.useContext(zn),r=n.getPopupContainer,i=n.getPrefixCls,o=n.direction,s=t.prefixCls,a=t.type,u=a===void 0?"default":a,f=t.danger,p=t.disabled,g=t.loading,v=t.onClick,b=t.htmlType,_=t.children,T=t.className,I=t.menu,P=t.arrow,M=t.autoFocus,D=t.overlay,N=t.trigger,z=t.align,$=t.visible,j=t.open,U=t.onVisibleChange,q=t.onOpenChange,Y=t.placement,te=t.getPopupContainer,Z=t.href,X=t.icon,J=X===void 0?A(TB,{}):X,ue=t.title,re=t.buttonsRender,se=re===void 0?function(vt){return vt}:re,oe=t.mouseEnterDelay,he=t.mouseLeaveDelay,Ce=t.overlayClassName,Se=t.overlayStyle,be=t.destroyPopupOnHide,Re=Jre(t,["prefixCls","type","danger","disabled","loading","onClick","htmlType","children","className","menu","arrow","autoFocus","overlay","trigger","align","visible","open","onVisibleChange","onOpenChange","placement","getPopupContainer","href","icon","title","buttonsRender","mouseEnterDelay","mouseLeaveDelay","overlayClassName","overlayStyle","destroyPopupOnHide"]),Ie=i("dropdown-button",s),Me={menu:I,arrow:P,autoFocus:M,align:z,disabled:p,trigger:p?[]:N,onOpenChange:q||U,getPopupContainer:te||r,mouseEnterDelay:oe,mouseLeaveDelay:he,overlayClassName:Ce,overlayStyle:Se,destroyPopupOnHide:be},Ae=Bh(Ie,o),ze=Ae.compactSize,Ke=Ae.compactItemClassnames,Ue=je(Ie,Ke,T);"overlay"in t&&(Me.overlay=D),"open"in t?Me.open=j:"visible"in t&&(Me.open=$),"placement"in t?Me.placement=Y:Me.placement=o==="rtl"?"bottomLeft":"bottomRight";var pt=A(Yr,{type:u,danger:f,disabled:p,loading:g,onClick:v,htmlType:b,href:Z,title:ue,children:_}),gt=A(Yr,{type:u,danger:f,icon:J}),Ot=se([pt,gt]),qe=$e(Ot,2),Ct=qe[0],ot=qe[1];return it(Qre.Compact,{className:Ue,size:ze,block:!0,...Re,children:[Ct,A(X_,{...Me,children:ot})]})};n8.__ANT_BUTTON=!0;const eie=n8;aa("topLeft","topCenter","topRight","bottomLeft","bottomCenter","bottomRight","top","bottom");var r8=function(t){var n=E.exports.useContext(zn),r=n.getPopupContainer,i=n.getPrefixCls,o=n.direction,s=function(){var Ae=i(),ze=t.placement,Ke=ze===void 0?"":ze,Ue=t.transitionName;return Ue!==void 0?Ue:Ke.includes("top")?"".concat(Ae,"-slide-down"):"".concat(Ae,"-slide-up")},a=function(){var Ae=t.placement;if(!Ae)return o==="rtl"?"bottomRight":"bottomLeft";if(Ae.includes("Center")){var ze=Ae.slice(0,Ae.indexOf("Center"));return ze}return Ae},u=t.menu,f=t.arrow,p=t.prefixCls,g=t.children,v=t.trigger,b=t.disabled,_=t.dropdownRender,T=t.getPopupContainer,I=t.overlayClassName,P=t.visible,M=t.open,D=t.onVisibleChange,N=t.onOpenChange,z=t.mouseEnterDelay,$=z===void 0?.15:z,j=t.mouseLeaveDelay,U=j===void 0?.1:j,q=t.autoAdjustOverflow,Y=q===void 0?!0:q,te=i("dropdown",p),Z=E.exports.Children.only(g),X=Pi(Z,{className:je("".concat(te,"-trigger"),ae({},"".concat(te,"-rtl"),o==="rtl"),Z.props.className),disabled:b}),J=b?[]:v,ue;J&&J.includes("contextMenu")&&(ue=!0);var re=Ei(!1,{value:M!==void 0?M:P}),se=$e(re,2),oe=se[0],he=se[1],Ce=Cg(function(Me){D==null||D(Me),N==null||N(Me),he(Me)}),Se=je(I,ae({},"".concat(te,"-rtl"),o==="rtl")),be=SB({arrowPointAtCenter:on(f)==="object"&&f.pointAtCenter,autoAdjustOverflow:Y}),Re=E.exports.useCallback(function(){he(!1)},[]),Ie=function(){var Ae=t.overlay,ze;return u!=null&&u.items?ze=A(GB,{...u}):typeof Ae=="function"?ze=Ae():ze=Ae,_&&(ze=_(ze)),ze=E.exports.Children.only(typeof ze=="string"?A("span",{children:ze}):ze),A(WB,{prefixCls:"".concat(te,"-menu"),expandIcon:A("span",{className:"".concat(te,"-menu-submenu-arrow"),children:A(Z_,{className:"".concat(te,"-menu-submenu-arrow-icon")})}),mode:"vertical",selectable:!1,onClick:Re,validator:function(Ue){Ue.mode},children:A(fb,{children:ze})})};return A(Mre,{alignPoint:ue,...t,mouseEnterDelay:$,mouseLeaveDelay:U,visible:oe,builtinPlacements:be,arrow:!!f,overlayClassName:Se,prefixCls:te,getPopupContainer:T||r,transitionName:s(),trigger:J,overlay:Ie,placement:a(),onVisibleChange:Ce,children:X})};r8.Button=eie;const X_=r8;var tie=typeof zl=="object"&&zl&&zl.Object===Object&&zl,i8=tie,nie=i8,rie=typeof self=="object"&&self&&self.Object===Object&&self,iie=nie||rie||Function("return this")(),sl=iie,oie=sl,aie=oie.Symbol,MI=aie,sie=Array.isArray,RI=sie,OA=MI,o8=Object.prototype,lie=o8.hasOwnProperty,cie=o8.toString,om=OA?OA.toStringTag:void 0;function uie(e){var t=lie.call(e,om),n=e[om];try{e[om]=void 0;var r=!0}catch{}var i=cie.call(e);return r&&(t?e[om]=n:delete e[om]),i}var die=uie,fie=Object.prototype,hie=fie.toString;function pie(e){return hie.call(e)}var mie=pie,DA=MI,gie=die,vie=mie,yie="[object Null]",xie="[object Undefined]",AA=DA?DA.toStringTag:void 0;function bie(e){return e==null?e===void 0?xie:yie:AA&&AA in Object(e)?gie(e):vie(e)}var ov=bie;function _ie(e){return e!=null&&typeof e=="object"}var av=_ie,wie=ov,Cie=av,Sie="[object Symbol]";function Eie(e){return typeof e=="symbol"||Cie(e)&&wie(e)==Sie}var Pie=Eie,Tie=/\s/;function Iie(e){for(var t=e.length;t--&&Tie.test(e.charAt(t)););return t}var kie=Iie,Mie=kie,Rie=/^\s+/;function Oie(e){return e&&e.slice(0,Mie(e)+1).replace(Rie,"")}var Die=Oie;function Aie(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Y_=Aie,Nie=Die,NA=Y_,Lie=Pie,LA=0/0,zie=/^[-+]0x[0-9a-f]+$/i,Fie=/^0b[01]+$/i,$ie=/^0o[0-7]+$/i,Bie=parseInt;function Vie(e){if(typeof e=="number")return e;if(Lie(e))return LA;if(NA(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=NA(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Nie(e);var n=Fie.test(e);return n||$ie.test(e)?Bie(e.slice(2),n?2:8):zie.test(e)?LA:+e}var Uie=Vie,kd=function(t,n,r,i){var o=r?r.call(i,t,n):void 0;if(o!==void 0)return!!o;if(t===n)return!0;if(typeof t!="object"||!t||typeof n!="object"||!n)return!1;var s=Object.keys(t),a=Object.keys(n);if(s.length!==a.length)return!1;for(var u=Object.prototype.hasOwnProperty.bind(n),f=0;f<s.length;f++){var p=s[f];if(!u(p))return!1;var g=t[p],v=n[p];if(o=r?r.call(i,g,v,p):void 0,o===!1||o===void 0&&g!==v)return!1}return!0},a8=E.exports.createContext(null),jie=a8.Provider,s8=E.exports.createContext(null),Hie=s8.Provider,OI=function(e){si(n,e);var t=li(n);function n(r){var i;jr(this,n),i=t.call(this,r),i.handleChange=function(s){var a=i.props,u=a.disabled,f=a.onChange;u||("checked"in i.props||i.setState({checked:s.target.checked}),f&&f({target:me(me({},i.props),{},{checked:s.target.checked}),stopPropagation:function(){s.stopPropagation()},preventDefault:function(){s.preventDefault()},nativeEvent:s.nativeEvent}))},i.saveInput=function(s){i.input=s};var o="checked"in r?r.checked:r.defaultChecked;return i.state={checked:o},i}return Hr(n,[{key:"focus",value:function(){this.input.focus()}},{key:"blur",value:function(){this.input.blur()}},{key:"render",value:function(){var i,o=this.props,s=o.prefixCls,a=o.className,u=o.style,f=o.name,p=o.id,g=o.type,v=o.disabled,b=o.readOnly,_=o.tabIndex,T=o.onClick,I=o.onFocus,P=o.onBlur,M=o.onKeyDown,D=o.onKeyPress,N=o.onKeyUp,z=o.autoFocus,$=o.value,j=o.required,U=kn(o,["prefixCls","className","style","name","id","type","disabled","readOnly","tabIndex","onClick","onFocus","onBlur","onKeyDown","onKeyPress","onKeyUp","autoFocus","value","required"]),q=Object.keys(U).reduce(function(Z,X){return(X.substr(0,5)==="aria-"||X.substr(0,5)==="data-"||X==="role")&&(Z[X]=U[X]),Z},{}),Y=this.state.checked,te=je(s,a,(i={},ae(i,"".concat(s,"-checked"),Y),ae(i,"".concat(s,"-disabled"),v),i));return it("span",{className:te,style:u,children:[A("input",{name:f,id:p,type:g,required:j,readOnly:b,disabled:v,tabIndex:_,className:"".concat(s,"-input"),checked:!!Y,onClick:T,onFocus:I,onBlur:P,onKeyUp:N,onKeyDown:M,onKeyPress:D,onChange:this.handleChange,autoFocus:z,ref:this.saveInput,value:$,...q}),A("span",{className:"".concat(s,"-inner")})]})}}],[{key:"getDerivedStateFromProps",value:function(i,o){return"checked"in i?me(me({},o),{},{checked:i.checked}):null}}]),n}(E.exports.Component);OI.defaultProps={prefixCls:"rc-checkbox",className:"",style:{},type:"checkbox",defaultChecked:!1,onFocus:function(){},onBlur:function(){},onChange:function(){},onKeyDown:function(){},onKeyPress:function(){},onKeyUp:function(){}};var Kie=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},Wie=function(t,n){var r,i=E.exports.useContext(a8),o=E.exports.useContext(s8),s=E.exports.useContext(zn),a=s.getPrefixCls,u=s.direction,f=E.exports.useRef(),p=Aa(n,f),g=E.exports.useContext(Rs),v=g.isFormItemInput,b=function(Y){var te,Z;(te=t.onChange)===null||te===void 0||te.call(t,Y),(Z=i==null?void 0:i.onChange)===null||Z===void 0||Z.call(i,Y)},_=t.prefixCls,T=t.className,I=t.children,P=t.style,M=t.disabled,D=Kie(t,["prefixCls","className","children","style","disabled"]),N=a("radio",_),z=((i==null?void 0:i.optionType)||o)==="button"?"".concat(N,"-button"):N,$=Je({},D),j=E.exports.useContext(fu);$.disabled=M||j,i&&($.name=i.name,$.onChange=b,$.checked=t.value===i.value,$.disabled=$.disabled||i.disabled);var U=je("".concat(z,"-wrapper"),(r={},ae(r,"".concat(z,"-wrapper-checked"),$.checked),ae(r,"".concat(z,"-wrapper-disabled"),$.disabled),ae(r,"".concat(z,"-wrapper-rtl"),u==="rtl"),ae(r,"".concat(z,"-wrapper-in-form-item"),v),r),T);return it("label",{className:U,style:P,onMouseEnter:t.onMouseEnter,onMouseLeave:t.onMouseLeave,children:[A(OI,{...$,type:"radio",prefixCls:z,ref:p}),I!==void 0?A("span",{children:I}):null]})},Gie=E.exports.forwardRef(Wie);const xb=Gie;var qie=E.exports.forwardRef(function(e,t){var n,r=E.exports.useContext(zn),i=r.getPrefixCls,o=r.direction,s=E.exports.useContext(Jl),a=Ei(e.defaultValue,{value:e.value}),u=$e(a,2),f=u[0],p=u[1],g=function(se){var oe=f,he=se.target.value;"value"in e||p(he);var Ce=e.onChange;Ce&&he!==oe&&Ce(se)},v=e.prefixCls,b=e.className,_=b===void 0?"":b,T=e.options,I=e.buttonStyle,P=I===void 0?"outline":I,M=e.disabled,D=e.children,N=e.size,z=e.style,$=e.id,j=e.onMouseEnter,U=e.onMouseLeave,q=e.onFocus,Y=e.onBlur,te=i("radio",v),Z="".concat(te,"-group"),X=D;T&&T.length>0&&(X=T.map(function(re){return typeof re=="string"||typeof re=="number"?A(xb,{prefixCls:te,disabled:M,value:re,checked:f===re,children:re},re.toString()):A(xb,{prefixCls:te,disabled:re.disabled||M,value:re.value,checked:f===re.value,style:re.style,children:re.label},"radio-group-value-options-".concat(re.value))}));var J=N||s,ue=je(Z,"".concat(Z,"-").concat(P),(n={},ae(n,"".concat(Z,"-").concat(J),J),ae(n,"".concat(Z,"-rtl"),o==="rtl"),n),_);return A("div",{...k$(e),className:ue,style:z,onMouseEnter:j,onMouseLeave:U,onFocus:q,onBlur:Y,id:$,ref:t,children:A(jie,{value:{onChange:g,value:f,disabled:e.disabled,name:e.name,optionType:e.optionType},children:X})})});const Zie=E.exports.memo(qie);var Xie=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},Yie=function(t,n){var r=E.exports.useContext(zn),i=r.getPrefixCls,o=t.prefixCls,s=Xie(t,["prefixCls"]),a=i("radio",o);return A(Hie,{value:"button",children:A(xb,{prefixCls:a,...s,type:"radio",ref:n})})};const Qie=E.exports.forwardRef(Yie);var Q_=xb;Q_.Button=Qie;Q_.Group=Zie;Q_.__ANT_RADIO=!0;const l8=Q_;var Jie=sl,eoe=function(){return Jie.Date.now()},toe=eoe,noe=Y_,VC=toe,zA=Uie,roe="Expected a function",ioe=Math.max,ooe=Math.min;function aoe(e,t,n){var r,i,o,s,a,u,f=0,p=!1,g=!1,v=!0;if(typeof e!="function")throw new TypeError(roe);t=zA(t)||0,noe(n)&&(p=!!n.leading,g="maxWait"in n,o=g?ioe(zA(n.maxWait)||0,t):o,v="trailing"in n?!!n.trailing:v);function b($){var j=r,U=i;return r=i=void 0,f=$,s=e.apply(U,j),s}function _($){return f=$,a=setTimeout(P,t),p?b($):s}function T($){var j=$-u,U=$-f,q=t-j;return g?ooe(q,o-U):q}function I($){var j=$-u,U=$-f;return u===void 0||j>=t||j<0||g&&U>=o}function P(){var $=VC();if(I($))return M($);a=setTimeout(P,T($))}function M($){return a=void 0,v&&r?b($):(r=i=void 0,s)}function D(){a!==void 0&&clearTimeout(a),f=0,r=u=i=a=void 0}function N(){return a===void 0?s:M(VC())}function z(){var $=VC(),j=I($);if(r=arguments,i=this,u=$,j){if(a===void 0)return _(u);if(g)return clearTimeout(a),a=setTimeout(P,t),b(u)}return a===void 0&&(a=setTimeout(P,t)),s}return z.cancel=D,z.flush=N,z}var soe=aoe;function c8(e,t){var n=new Set;return e.forEach(function(r){t.has(r)||n.add(r)}),n}function loe(e){var t=e||{},n=t.disabled,r=t.disableCheckbox,i=t.checkable;return!!(n||r)||i===!1}function coe(e,t,n,r){for(var i=new Set(e),o=new Set,s=0;s<=n;s+=1){var a=t.get(s)||new Set;a.forEach(function(g){var v=g.key,b=g.node,_=g.children,T=_===void 0?[]:_;i.has(v)&&!r(b)&&T.filter(function(I){return!r(I.node)}).forEach(function(I){i.add(I.key)})})}for(var u=new Set,f=n;f>=0;f-=1){var p=t.get(f)||new Set;p.forEach(function(g){var v=g.parent,b=g.node;if(!(r(b)||!g.parent||u.has(g.parent.key))){if(r(g.parent.node)){u.add(v.key);return}var _=!0,T=!1;(v.children||[]).filter(function(I){return!r(I.node)}).forEach(function(I){var P=I.key,M=i.has(P);_&&!M&&(_=!1),!T&&(M||o.has(P))&&(T=!0)}),_&&i.add(v.key),T&&o.add(v.key),u.add(v.key)}})}return{checkedKeys:Array.from(i),halfCheckedKeys:Array.from(c8(o,i))}}function uoe(e,t,n,r,i){for(var o=new Set(e),s=new Set(t),a=0;a<=r;a+=1){var u=n.get(a)||new Set;u.forEach(function(v){var b=v.key,_=v.node,T=v.children,I=T===void 0?[]:T;!o.has(b)&&!s.has(b)&&!i(_)&&I.filter(function(P){return!i(P.node)}).forEach(function(P){o.delete(P.key)})})}s=new Set;for(var f=new Set,p=r;p>=0;p-=1){var g=n.get(p)||new Set;g.forEach(function(v){var b=v.parent,_=v.node;if(!(i(_)||!v.parent||f.has(v.parent.key))){if(i(v.parent.node)){f.add(b.key);return}var T=!0,I=!1;(b.children||[]).filter(function(P){return!i(P.node)}).forEach(function(P){var M=P.key,D=o.has(M);T&&!D&&(T=!1),!I&&(D||s.has(M))&&(I=!0)}),T||o.delete(b.key),I&&s.add(b.key),f.add(b.key)}})}return{checkedKeys:Array.from(o),halfCheckedKeys:Array.from(c8(s,o))}}function jl(e,t,n,r){var i=[],o;r?o=r:o=loe;var s=new Set(e.filter(function(p){var g=!!n[p];return g||i.push(p),g})),a=new Map,u=0;Object.keys(n).forEach(function(p){var g=n[p],v=g.level,b=a.get(v);b||(b=new Set,a.set(v,b)),b.add(g),u=Math.max(u,v)}),Lr(!i.length,"Tree missing follow keys: ".concat(i.slice(0,100).map(function(p){return"'".concat(p,"'")}).join(", ")));var f;return t===!0?f=coe(s,a,u,o):f=uoe(s,t.halfCheckedKeys,a,u,o),f}var DI=E.exports.createContext(null),doe=function(t){for(var n=t.prefixCls,r=t.level,i=t.isStart,o=t.isEnd,s="".concat(n,"-indent-unit"),a=[],u=0;u<r;u+=1){var f;a.push(A("span",{className:je(s,(f={},ae(f,"".concat(s,"-start"),i[u]),ae(f,"".concat(s,"-end"),o[u]),f))},u))}return A("span",{"aria-hidden":"true",className:"".concat(n,"-indent"),children:a})};const foe=E.exports.memo(doe);var hoe=["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","data","onMouseMove","selectable"],FA="open",$A="close",poe="---",moe=function(e){si(n,e);var t=li(n);function n(){var r;jr(this,n);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return r=t.call.apply(t,[this].concat(o)),r.state={dragNodeHighlight:!1},r.selectHandle=void 0,r.onSelectorClick=function(a){var u=r.props.context.onNodeClick;u(a,Di(r.props)),r.isSelectable()?r.onSelect(a):r.onCheck(a)},r.onSelectorDoubleClick=function(a){var u=r.props.context.onNodeDoubleClick;u(a,Di(r.props))},r.onSelect=function(a){if(!r.isDisabled()){var u=r.props.context.onNodeSelect;a.preventDefault(),u(a,Di(r.props))}},r.onCheck=function(a){if(!r.isDisabled()){var u=r.props,f=u.disableCheckbox,p=u.checked,g=r.props.context.onNodeCheck;if(!(!r.isCheckable()||f)){a.preventDefault();var v=!p;g(a,Di(r.props),v)}}},r.onMouseEnter=function(a){var u=r.props.context.onNodeMouseEnter;u(a,Di(r.props))},r.onMouseLeave=function(a){var u=r.props.context.onNodeMouseLeave;u(a,Di(r.props))},r.onContextMenu=function(a){var u=r.props.context.onNodeContextMenu;u(a,Di(r.props))},r.onDragStart=function(a){var u=r.props.context.onNodeDragStart;a.stopPropagation(),r.setState({dragNodeHighlight:!0}),u(a,Fn(r));try{a.dataTransfer.setData("text/plain","")}catch{}},r.onDragEnter=function(a){var u=r.props.context.onNodeDragEnter;a.preventDefault(),a.stopPropagation(),u(a,Fn(r))},r.onDragOver=function(a){var u=r.props.context.onNodeDragOver;a.preventDefault(),a.stopPropagation(),u(a,Fn(r))},r.onDragLeave=function(a){var u=r.props.context.onNodeDragLeave;a.stopPropagation(),u(a,Fn(r))},r.onDragEnd=function(a){var u=r.props.context.onNodeDragEnd;a.stopPropagation(),r.setState({dragNodeHighlight:!1}),u(a,Fn(r))},r.onDrop=function(a){var u=r.props.context.onNodeDrop;a.preventDefault(),a.stopPropagation(),r.setState({dragNodeHighlight:!1}),u(a,Fn(r))},r.onExpand=function(a){var u=r.props,f=u.loading,p=u.context.onNodeExpand;f||p(a,Di(r.props))},r.setSelectHandle=function(a){r.selectHandle=a},r.getNodeState=function(){var a=r.props.expanded;return r.isLeaf()?null:a?FA:$A},r.hasChildren=function(){var a=r.props.eventKey,u=r.props.context.keyEntities,f=u[a]||{},p=f.children;return!!(p||[]).length},r.isLeaf=function(){var a=r.props,u=a.isLeaf,f=a.loaded,p=r.props.context.loadData,g=r.hasChildren();return u===!1?!1:u||!p&&!g||p&&f&&!g},r.isDisabled=function(){var a=r.props.disabled,u=r.props.context.disabled;return!!(u||a)},r.isCheckable=function(){var a=r.props.checkable,u=r.props.context.checkable;return!u||a===!1?!1:u},r.syncLoadData=function(a){var u=a.expanded,f=a.loading,p=a.loaded,g=r.props.context,v=g.loadData,b=g.onNodeLoad;f||v&&u&&!r.isLeaf()&&!r.hasChildren()&&!p&&b(Di(r.props))},r.isDraggable=function(){var a=r.props,u=a.data,f=a.context.draggable;return!!(f&&(!f.nodeDraggable||f.nodeDraggable(u)))},r.renderDragHandler=function(){var a=r.props.context,u=a.draggable,f=a.prefixCls;return u!=null&&u.icon?A("span",{className:"".concat(f,"-draggable-icon"),children:u.icon}):null},r.renderSwitcherIconDom=function(a){var u=r.props.switcherIcon,f=r.props.context.switcherIcon,p=u||f;return typeof p=="function"?p(me(me({},r.props),{},{isLeaf:a})):p},r.renderSwitcher=function(){var a=r.props.expanded,u=r.props.context.prefixCls;if(r.isLeaf()){var f=r.renderSwitcherIconDom(!0);return f!==!1?A("span",{className:je("".concat(u,"-switcher"),"".concat(u,"-switcher-noop")),children:f}):null}var p=je("".concat(u,"-switcher"),"".concat(u,"-switcher_").concat(a?FA:$A)),g=r.renderSwitcherIconDom(!1);return g!==!1?A("span",{onClick:r.onExpand,className:p,children:g}):null},r.renderCheckbox=function(){var a=r.props,u=a.checked,f=a.halfChecked,p=a.disableCheckbox,g=r.props.context.prefixCls,v=r.isDisabled(),b=r.isCheckable();if(!b)return null;var _=typeof b!="boolean"?b:null;return A("span",{className:je("".concat(g,"-checkbox"),u&&"".concat(g,"-checkbox-checked"),!u&&f&&"".concat(g,"-checkbox-indeterminate"),(v||p)&&"".concat(g,"-checkbox-disabled")),onClick:r.onCheck,children:_})},r.renderIcon=function(){var a=r.props.loading,u=r.props.context.prefixCls;return A("span",{className:je("".concat(u,"-iconEle"),"".concat(u,"-icon__").concat(r.getNodeState()||"docu"),a&&"".concat(u,"-icon_loading"))})},r.renderSelector=function(){var a=r.state.dragNodeHighlight,u=r.props,f=u.title,p=u.selected,g=u.icon,v=u.loading,b=u.data,_=r.props.context,T=_.prefixCls,I=_.showIcon,P=_.icon,M=_.loadData,D=_.titleRender,N=r.isDisabled(),z="".concat(T,"-node-content-wrapper"),$;if(I){var j=g||P;$=j?A("span",{className:je("".concat(T,"-iconEle"),"".concat(T,"-icon__customize")),children:typeof j=="function"?j(r.props):j}):r.renderIcon()}else M&&v&&($=r.renderIcon());var U;typeof f=="function"?U=f(b):D?U=D(b):U=f;var q=A("span",{className:"".concat(T,"-title"),children:U});return it("span",{ref:r.setSelectHandle,title:typeof f=="string"?f:"",className:je("".concat(z),"".concat(z,"-").concat(r.getNodeState()||"normal"),!N&&(p||a)&&"".concat(T,"-node-selected")),onMouseEnter:r.onMouseEnter,onMouseLeave:r.onMouseLeave,onContextMenu:r.onContextMenu,onClick:r.onSelectorClick,onDoubleClick:r.onSelectorDoubleClick,children:[$,q,r.renderDropIndicator()]})},r.renderDropIndicator=function(){var a=r.props,u=a.disabled,f=a.eventKey,p=r.props.context,g=p.draggable,v=p.dropLevelOffset,b=p.dropPosition,_=p.prefixCls,T=p.indent,I=p.dropIndicatorRender,P=p.dragOverNodeKey,M=p.direction,D=!!g,N=!u&&D&&P===f;return N?I({dropPosition:b,dropLevelOffset:v,indent:T,prefixCls:_,direction:M}):null},r}return Hr(n,[{key:"componentDidMount",value:function(){this.syncLoadData(this.props)}},{key:"componentDidUpdate",value:function(){this.syncLoadData(this.props)}},{key:"isSelectable",value:function(){var i=this.props.selectable,o=this.props.context.selectable;return typeof i=="boolean"?i:o}},{key:"render",value:function(){var i,o=this.props,s=o.eventKey,a=o.className,u=o.style,f=o.dragOver,p=o.dragOverGapTop,g=o.dragOverGapBottom,v=o.isLeaf,b=o.isStart,_=o.isEnd,T=o.expanded,I=o.selected,P=o.checked,M=o.halfChecked,D=o.loading,N=o.domRef,z=o.active;o.data;var $=o.onMouseMove,j=o.selectable,U=kn(o,hoe),q=this.props.context,Y=q.prefixCls,te=q.filterTreeNode,Z=q.keyEntities,X=q.dropContainerKey,J=q.dropTargetKey,ue=q.draggingNodeKey,re=this.isDisabled(),se=Zl(U,{aria:!0,data:!0}),oe=Z[s]||{},he=oe.level,Ce=_[_.length-1],Se=this.isDraggable(),be=!re&&Se,Re=ue===s,Ie=j!==void 0?{"aria-selected":!!j}:void 0;return it("div",{ref:N,className:je(a,"".concat(Y,"-treenode"),(i={},ae(i,"".concat(Y,"-treenode-disabled"),re),ae(i,"".concat(Y,"-treenode-switcher-").concat(T?"open":"close"),!v),ae(i,"".concat(Y,"-treenode-checkbox-checked"),P),ae(i,"".concat(Y,"-treenode-checkbox-indeterminate"),M),ae(i,"".concat(Y,"-treenode-selected"),I),ae(i,"".concat(Y,"-treenode-loading"),D),ae(i,"".concat(Y,"-treenode-active"),z),ae(i,"".concat(Y,"-treenode-leaf-last"),Ce),ae(i,"".concat(Y,"-treenode-draggable"),Se),ae(i,"dragging",Re),ae(i,"drop-target",J===s),ae(i,"drop-container",X===s),ae(i,"drag-over",!re&&f),ae(i,"drag-over-gap-top",!re&&p),ae(i,"drag-over-gap-bottom",!re&&g),ae(i,"filter-node",te&&te(Di(this.props))),i)),style:u,draggable:be,"aria-grabbed":Re,onDragStart:be?this.onDragStart:void 0,onDragEnter:Se?this.onDragEnter:void 0,onDragOver:Se?this.onDragOver:void 0,onDragLeave:Se?this.onDragLeave:void 0,onDrop:Se?this.onDrop:void 0,onDragEnd:Se?this.onDragEnd:void 0,onMouseMove:$,...Ie,...se,children:[A(foe,{prefixCls:Y,level:he,isStart:b,isEnd:_}),this.renderDragHandler(),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector()]})}}]),n}(E.exports.Component),Md=function(t){return A(DI.Consumer,{children:function(n){return A(moe,{...t,context:n})}})};Md.displayName="TreeNode";Md.defaultProps={title:poe};Md.isTreeNode=1;function Ks(e,t){if(!e)return[];var n=e.slice(),r=n.indexOf(t);return r>=0&&n.splice(r,1),n}function Tl(e,t){var n=(e||[]).slice();return n.indexOf(t)===-1&&n.push(t),n}function AI(e){return e.split("-")}function u8(e,t){return"".concat(e,"-").concat(t)}function goe(e){return e&&e.type&&e.type.isTreeNode}function voe(e,t){var n=[],r=t[e];function i(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];o.forEach(function(s){var a=s.key,u=s.children;n.push(a),i(u)})}return i(r.children),n}function yoe(e){if(e.parent){var t=AI(e.pos);return Number(t[t.length-1])===e.parent.children.length-1}return!1}function xoe(e){var t=AI(e.pos);return Number(t[t.length-1])===0}function BA(e,t,n,r,i,o,s,a,u,f){var p,g=e.clientX,v=e.clientY,b=e.target.getBoundingClientRect(),_=b.top,T=b.height,I=(f==="rtl"?-1:1)*(((i==null?void 0:i.x)||0)-g),P=(I-12)/r,M=a[n.props.eventKey];if(v<_+T/2){var D=s.findIndex(function(ue){return ue.key===M.key}),N=D<=0?0:D-1,z=s[N].key;M=a[z]}var $=M.key,j=M,U=M.key,q=0,Y=0;if(!u.includes($))for(var te=0;te<P&&yoe(M);te+=1)M=M.parent,Y+=1;var Z=t.props.data,X=M.node,J=!0;return xoe(M)&&M.level===0&&v<_+T/2&&o({dragNode:Z,dropNode:X,dropPosition:-1})&&M.key===n.props.eventKey?q=-1:(j.children||[]).length&&u.includes(U)?o({dragNode:Z,dropNode:X,dropPosition:0})?q=0:J=!1:Y===0?P>-1.5?o({dragNode:Z,dropNode:X,dropPosition:1})?q=1:J=!1:o({dragNode:Z,dropNode:X,dropPosition:0})?q=0:o({dragNode:Z,dropNode:X,dropPosition:1})?q=1:J=!1:o({dragNode:Z,dropNode:X,dropPosition:1})?q=1:J=!1,{dropPosition:q,dropLevelOffset:Y,dropTargetKey:M.key,dropTargetPos:M.pos,dragOverNodeKey:U,dropContainerKey:q===0?null:((p=M.parent)===null||p===void 0?void 0:p.key)||null,dropAllowed:J}}function VA(e,t){if(!!e){var n=t.multiple;return n?e.slice():e.length?[e[0]]:e}}function UC(e){if(!e)return null;var t;if(Array.isArray(e))t={checkedKeys:e,halfCheckedKeys:void 0};else if(on(e)==="object")t={checkedKeys:e.checked||void 0,halfCheckedKeys:e.halfChecked||void 0};else return Lr(!1,"`checkedKeys` is not an array or an object"),null;return t}function FE(e,t){var n=new Set;function r(i){if(!n.has(i)){var o=t[i];if(!!o){n.add(i);var s=o.parent,a=o.node;a.disabled||s&&r(s.key)}}}return(e||[]).forEach(function(i){r(i)}),Mt(n)}var boe=["children"];function sv(e,t){return e!=null?e:t}function bb(e){var t=e||{},n=t.title,r=t._title,i=t.key,o=t.children,s=n||"title";return{title:s,_title:r||[s],key:i||"key",children:o||"children"}}function d8(e){function t(n){var r=Po(n);return r.map(function(i){if(!goe(i))return Lr(!i,"Tree/TreeNode can only accept TreeNode as children."),null;var o=i.key,s=i.props,a=s.children,u=kn(s,boe),f=me({key:o},u),p=t(a);return p.length&&(f.children=p),f}).filter(function(i){return i})}return t(e)}function jC(e,t,n){var r=bb(n),i=r._title,o=r.key,s=r.children,a=new Set(t===!0?[]:t),u=[];function f(p){var g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return p.map(function(v,b){for(var _=u8(g?g.pos:"0",b),T=sv(v[o],_),I,P=0;P<i.length;P+=1){var M=i[P];if(v[M]!==void 0){I=v[M];break}}var D=me(me({},Gi(v,[].concat(Mt(i),[o,s]))),{},{title:I,key:T,parent:g,pos:_,children:null,data:v,isStart:[].concat(Mt(g?g.isStart:[]),[b===0]),isEnd:[].concat(Mt(g?g.isEnd:[]),[b===p.length-1])});return u.push(D),t===!0||a.has(T)?D.children=f(v[s]||[],D):D.children=[],D})}return f(e),u}function _oe(e,t,n){var r={};on(n)==="object"?r=n:r={externalGetKey:n},r=r||{};var i=r,o=i.childrenPropName,s=i.externalGetKey,a=i.fieldNames,u=bb(a),f=u.key,p=u.children,g=o||p,v;s?typeof s=="string"?v=function(T){return T[s]}:typeof s=="function"&&(v=function(T){return s(T)}):v=function(T,I){return sv(T[f],I)};function b(_,T,I,P){var M=_?_[g]:e,D=_?u8(I.pos,T):"0",N=_?[].concat(Mt(P),[_]):[];if(_){var z=v(_,D),$={node:_,index:T,pos:D,key:z,parentPos:I.node?I.pos:null,level:I.level+1,nodes:N};t($)}M&&M.forEach(function(j,U){b(j,U,{node:_,pos:D,level:I?I.level+1:-1},N)})}b(null)}function J_(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.initWrapper,r=t.processEntity,i=t.onProcessFinished,o=t.externalGetKey,s=t.childrenPropName,a=t.fieldNames,u=arguments.length>2?arguments[2]:void 0,f=o||u,p={},g={},v={posEntities:p,keyEntities:g};return n&&(v=n(v)||v),_oe(e,function(b){var _=b.node,T=b.index,I=b.pos,P=b.key,M=b.parentPos,D=b.level,N=b.nodes,z={node:_,nodes:N,index:T,key:P,pos:I,level:D},$=sv(P,I);p[I]=z,g[$]=z,z.parent=p[M],z.parent&&(z.parent.children=z.parent.children||[],z.parent.children.push(z)),r&&r(z,v)},{externalGetKey:f,childrenPropName:s,fieldNames:a}),i&&i(v),v}function Wm(e,t){var n=t.expandedKeys,r=t.selectedKeys,i=t.loadedKeys,o=t.loadingKeys,s=t.checkedKeys,a=t.halfCheckedKeys,u=t.dragOverNodeKey,f=t.dropPosition,p=t.keyEntities,g=p[e],v={eventKey:e,expanded:n.indexOf(e)!==-1,selected:r.indexOf(e)!==-1,loaded:i.indexOf(e)!==-1,loading:o.indexOf(e)!==-1,checked:s.indexOf(e)!==-1,halfChecked:a.indexOf(e)!==-1,pos:String(g?g.pos:""),dragOver:u===e&&f===0,dragOverGapTop:u===e&&f===-1,dragOverGapBottom:u===e&&f===1};return v}function Di(e){var t=e.data,n=e.expanded,r=e.selected,i=e.checked,o=e.loaded,s=e.loading,a=e.halfChecked,u=e.dragOver,f=e.dragOverGapTop,p=e.dragOverGapBottom,g=e.pos,v=e.active,b=e.eventKey,_=me(me({},t),{},{expanded:n,selected:r,checked:i,loaded:o,loading:s,halfChecked:a,dragOver:u,dragOverGapTop:f,dragOverGapBottom:p,pos:g,active:v,key:b});return"props"in _||Object.defineProperty(_,"props",{get:function(){return Lr(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),e}}),_}var woe=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},f8=E.exports.createContext(null),Coe=function(t,n){var r=t.defaultValue,i=t.children,o=t.options,s=o===void 0?[]:o,a=t.prefixCls,u=t.className,f=t.style,p=t.onChange,g=woe(t,["defaultValue","children","options","prefixCls","className","style","onChange"]),v=E.exports.useContext(zn),b=v.getPrefixCls,_=v.direction,T=E.exports.useState(g.value||r||[]),I=$e(T,2),P=I[0],M=I[1],D=E.exports.useState([]),N=$e(D,2),z=N[0],$=N[1];E.exports.useEffect(function(){"value"in g&&M(g.value||[])},[g.value]);var j=function(){return s.map(function(se){return typeof se=="string"||typeof se=="number"?{label:se,value:se}:se})},U=function(se){$(function(oe){return oe.filter(function(he){return he!==se})})},q=function(se){$(function(oe){return[].concat(Mt(oe),[se])})},Y=function(se){var oe=P.indexOf(se.value),he=Mt(P);oe===-1?he.push(se.value):he.splice(oe,1),"value"in g||M(he);var Ce=j();p==null||p(he.filter(function(Se){return z.includes(Se)}).sort(function(Se,be){var Re=Ce.findIndex(function(Me){return Me.value===Se}),Ie=Ce.findIndex(function(Me){return Me.value===be});return Re-Ie}))},te=b("checkbox",a),Z="".concat(te,"-group"),X=Gi(g,["value","disabled"]);s&&s.length>0&&(i=j().map(function(re){return A(Gm,{prefixCls:te,disabled:"disabled"in re?re.disabled:g.disabled,value:re.value,checked:P.includes(re.value),onChange:re.onChange,className:"".concat(Z,"-item"),style:re.style,children:re.label},re.value.toString())}));var J={toggleOption:Y,value:P,disabled:g.disabled,name:g.name,registerValue:q,cancelValue:U},ue=je(Z,ae({},"".concat(Z,"-rtl"),_==="rtl"),u);return A("div",{className:ue,style:f,...X,ref:n,children:A(f8.Provider,{value:J,children:i})})},Soe=E.exports.forwardRef(Coe);const Eoe=E.exports.memo(Soe);var Poe=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},Toe=function(t,n){var r,i,o=t.prefixCls,s=t.className,a=t.children,u=t.indeterminate,f=u===void 0?!1:u,p=t.style,g=t.onMouseEnter,v=t.onMouseLeave,b=t.skipGroup,_=b===void 0?!1:b,T=t.disabled,I=Poe(t,["prefixCls","className","children","indeterminate","style","onMouseEnter","onMouseLeave","skipGroup","disabled"]),P=E.exports.useContext(zn),M=P.getPrefixCls,D=P.direction,N=E.exports.useContext(f8),z=E.exports.useContext(Rs),$=z.isFormItemInput,j=E.exports.useContext(fu),U=(i=(N==null?void 0:N.disabled)||T)!==null&&i!==void 0?i:j,q=E.exports.useRef(I.value);E.exports.useEffect(function(){N==null||N.registerValue(I.value)},[]),E.exports.useEffect(function(){if(!_)return I.value!==q.current&&(N==null||N.cancelValue(q.current),N==null||N.registerValue(I.value),q.current=I.value),function(){return N==null?void 0:N.cancelValue(I.value)}},[I.value]);var Y=M("checkbox",o),te=Je({},I);N&&!_&&(te.onChange=function(){I.onChange&&I.onChange.apply(I,arguments),N.toggleOption&&N.toggleOption({label:a,value:I.value})},te.name=N.name,te.checked=N.value.includes(I.value));var Z=je((r={},ae(r,"".concat(Y,"-wrapper"),!0),ae(r,"".concat(Y,"-rtl"),D==="rtl"),ae(r,"".concat(Y,"-wrapper-checked"),te.checked),ae(r,"".concat(Y,"-wrapper-disabled"),U),ae(r,"".concat(Y,"-wrapper-in-form-item"),$),r),s),X=je(ae({},"".concat(Y,"-indeterminate"),f)),J=f?"mixed":void 0;return it("label",{className:Z,style:p,onMouseEnter:g,onMouseLeave:v,children:[A(OI,{"aria-checked":J,...te,prefixCls:Y,className:X,disabled:U,ref:n}),a!==void 0&&A("span",{children:a})]})},Ioe=E.exports.forwardRef(Toe);const Gm=Ioe;var NI=Gm;NI.Group=Eoe;NI.__ANT_CHECKBOX=!0;const xh=NI;var koe=E.exports.createContext({});const h8=koe;var Moe=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function Roe(e){return typeof e=="number"?"".concat(e," ").concat(e," auto"):/^\d+(\.\d+)?(px|em|rem|%)$/.test(e)?"0 0 ".concat(e):e}var Ooe=["xs","sm","md","lg","xl","xxl"],Doe=E.exports.forwardRef(function(e,t){var n,r=E.exports.useContext(zn),i=r.getPrefixCls,o=r.direction,s=E.exports.useContext(h8),a=s.gutter,u=s.wrap,f=s.supportFlexGap,p=e.prefixCls,g=e.span,v=e.order,b=e.offset,_=e.push,T=e.pull,I=e.className,P=e.children,M=e.flex,D=e.style,N=Moe(e,["prefixCls","span","order","offset","push","pull","className","children","flex","style"]),z=i("col",p),$={};Ooe.forEach(function(te){var Z,X={},J=e[te];typeof J=="number"?X.span=J:on(J)==="object"&&(X=J||{}),delete N[te],$=Je(Je({},$),(Z={},ae(Z,"".concat(z,"-").concat(te,"-").concat(X.span),X.span!==void 0),ae(Z,"".concat(z,"-").concat(te,"-order-").concat(X.order),X.order||X.order===0),ae(Z,"".concat(z,"-").concat(te,"-offset-").concat(X.offset),X.offset||X.offset===0),ae(Z,"".concat(z,"-").concat(te,"-push-").concat(X.push),X.push||X.push===0),ae(Z,"".concat(z,"-").concat(te,"-pull-").concat(X.pull),X.pull||X.pull===0),ae(Z,"".concat(z,"-rtl"),o==="rtl"),Z))});var j=je(z,(n={},ae(n,"".concat(z,"-").concat(g),g!==void 0),ae(n,"".concat(z,"-order-").concat(v),v),ae(n,"".concat(z,"-offset-").concat(b),b),ae(n,"".concat(z,"-push-").concat(_),_),ae(n,"".concat(z,"-pull-").concat(T),T),n),I,$),U={};if(a&&a[0]>0){var q=a[0]/2;U.paddingLeft=q,U.paddingRight=q}if(a&&a[1]>0&&!f){var Y=a[1]/2;U.paddingTop=Y,U.paddingBottom=Y}return M&&(U.flex=Roe(M),u===!1&&!U.minWidth&&(U.minWidth=0)),A("div",{...N,style:Je(Je({},U),D),className:j,ref:t,children:P})});const _b=Doe;var Aoe=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};aa("top","middle","bottom","stretch");aa("start","end","center","space-around","space-between","space-evenly");function UA(e,t){var n=E.exports.useState(typeof e=="string"?e:""),r=$e(n,2),i=r[0],o=r[1],s=function(){if(typeof e=="string"&&o(e),on(e)==="object")for(var u=0;u<hb.length;u++){var f=hb[u];if(!!t[f]){var p=e[f];if(p!==void 0){o(p);return}}}};return E.exports.useEffect(function(){s()},[JSON.stringify(e),t]),i}var Noe=E.exports.forwardRef(function(e,t){var n,r=e.prefixCls,i=e.justify,o=e.align,s=e.className,a=e.style,u=e.children,f=e.gutter,p=f===void 0?0:f,g=e.wrap,v=Aoe(e,["prefixCls","justify","align","className","style","children","gutter","wrap"]),b=E.exports.useContext(zn),_=b.getPrefixCls,T=b.direction,I=E.exports.useState({xs:!0,sm:!0,md:!0,lg:!0,xl:!0,xxl:!0}),P=$e(I,2),M=P[0],D=P[1],N=E.exports.useState({xs:!1,sm:!1,md:!1,lg:!1,xl:!1,xxl:!1}),z=$e(N,2),$=z[0],j=z[1],U=UA(o,$),q=UA(i,$),Y=JB(),te=E.exports.useRef(p);E.exports.useEffect(function(){var Ie=pb.subscribe(function(Me){j(Me);var Ae=te.current||0;(!Array.isArray(Ae)&&on(Ae)==="object"||Array.isArray(Ae)&&(on(Ae[0])==="object"||on(Ae[1])==="object"))&&D(Me)});return function(){return pb.unsubscribe(Ie)}},[]);var Z=function(){var Me=[void 0,void 0],Ae=Array.isArray(p)?p:[p,void 0];return Ae.forEach(function(ze,Ke){if(on(ze)==="object")for(var Ue=0;Ue<hb.length;Ue++){var pt=hb[Ue];if(M[pt]&&ze[pt]!==void 0){Me[Ke]=ze[pt];break}}else Me[Ke]=ze}),Me},X=_("row",r),J=Z(),ue=je(X,(n={},ae(n,"".concat(X,"-no-wrap"),g===!1),ae(n,"".concat(X,"-").concat(q),q),ae(n,"".concat(X,"-").concat(U),U),ae(n,"".concat(X,"-rtl"),T==="rtl"),n),s),re={},se=J[0]!=null&&J[0]>0?J[0]/-2:void 0,oe=J[1]!=null&&J[1]>0?J[1]/-2:void 0;if(se&&(re.marginLeft=se,re.marginRight=se),Y){var he=$e(J,2);re.rowGap=he[1]}else oe&&(re.marginTop=oe,re.marginBottom=oe);var Ce=$e(J,2),Se=Ce[0],be=Ce[1],Re=E.exports.useMemo(function(){return{gutter:[Se,be],wrap:g,supportFlexGap:Y}},[Se,be,g,Y]);return A(h8.Provider,{value:Re,children:A("div",{...v,className:ue,style:Je(Je({},re),a),ref:t,children:u})})});const ad=Noe;var p8=E.exports.forwardRef(function(e,t){var n,r=e.prefixCls,i=e.forceRender,o=e.className,s=e.style,a=e.children,u=e.isActive,f=e.role,p=E.exports.useState(u||i),g=$e(p,2),v=g[0],b=g[1];return E.exports.useEffect(function(){(i||u)&&b(!0)},[i,u]),v?A("div",{ref:t,className:je("".concat(r,"-content"),(n={},ae(n,"".concat(r,"-content-active"),u),ae(n,"".concat(r,"-content-inactive"),!u),n),o),style:s,role:f,children:A("div",{className:"".concat(r,"-content-box"),children:a})}):null});p8.displayName="PanelContent";var Loe=["className","id","style","prefixCls","headerClass","children","isActive","destroyInactivePanel","accordion","forceRender","openMotion","extra","collapsible"],m8=function(e){si(n,e);var t=li(n);function n(){var r;jr(this,n);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return r=t.call.apply(t,[this].concat(o)),r.onItemClick=function(){var a=r.props,u=a.onItemClick,f=a.panelKey;typeof u=="function"&&u(f)},r.handleKeyPress=function(a){(a.key==="Enter"||a.keyCode===13||a.which===13)&&r.onItemClick()},r.renderIcon=function(){var a=r.props,u=a.showArrow,f=a.expandIcon,p=a.prefixCls,g=a.collapsible;if(!u)return null;var v=typeof f=="function"?f(r.props):A("i",{className:"arrow"});return v&&A("div",{className:"".concat(p,"-expand-icon"),onClick:g==="header"||g==="icon"?r.onItemClick:null,children:v})},r.renderTitle=function(){var a=r.props,u=a.header,f=a.prefixCls,p=a.collapsible;return A("span",{className:"".concat(f,"-header-text"),onClick:p==="header"?r.onItemClick:null,children:u})},r}return Hr(n,[{key:"shouldComponentUpdate",value:function(i){return!kd(this.props,i)}},{key:"render",value:function(){var i,o,s=this.props,a=s.className,u=s.id,f=s.style,p=s.prefixCls,g=s.headerClass,v=s.children,b=s.isActive,_=s.destroyInactivePanel,T=s.accordion,I=s.forceRender,P=s.openMotion,M=s.extra,D=s.collapsible,N=kn(s,Loe),z=D==="disabled",$=D==="header",j=D==="icon",U=je((i={},ae(i,"".concat(p,"-item"),!0),ae(i,"".concat(p,"-item-active"),b),ae(i,"".concat(p,"-item-disabled"),z),i),a),q=je("".concat(p,"-header"),(o={},ae(o,g,g),ae(o,"".concat(p,"-header-collapsible-only"),$),ae(o,"".concat(p,"-icon-collapsible-only"),j),o)),Y={className:q,"aria-expanded":b,"aria-disabled":z,onKeyPress:this.handleKeyPress};!$&&!j&&(Y.onClick=this.onItemClick,Y.role=T?"tab":"button",Y.tabIndex=z?-1:0);var te=M!=null&&typeof M!="boolean";return delete N.header,delete N.panelKey,delete N.onItemClick,delete N.showArrow,delete N.expandIcon,it("div",{...N,className:U,style:f,id:u,children:[it("div",{...Y,children:[this.renderIcon(),this.renderTitle(),te&&A("div",{className:"".concat(p,"-extra"),children:M})]}),A(oa,{visible:b,leavedClassName:"".concat(p,"-content-hidden"),...P,forceRender:I,removeOnLeave:_,children:function(Z,X){var J=Z.className,ue=Z.style;return A(p8,{ref:X,prefixCls:p,className:J,style:ue,isActive:b,forceRender:I,role:T?"tabpanel":null,children:v})}})]})}}]),n}(E.exports.Component);m8.defaultProps={showArrow:!0,isActive:!1,onItemClick:function(){},headerClass:"",forceRender:!1};function jA(e){var t=e;if(!Array.isArray(t)){var n=on(t);t=n==="number"||n==="string"?[t]:[]}return t.map(function(r){return String(r)})}var lv=function(e){si(n,e);var t=li(n);function n(r){var i;jr(this,n),i=t.call(this,r),i.onClickItem=function(u){var f=i.state.activeKey;if(i.props.accordion)f=f[0]===u?[]:[u];else{f=Mt(f);var p=f.indexOf(u),g=p>-1;g?f.splice(p,1):f.push(u)}i.setActiveKey(f)},i.getNewChild=function(u,f){if(!u)return null;var p=i.state.activeKey,g=i.props,v=g.prefixCls,b=g.openMotion,_=g.accordion,T=g.destroyInactivePanel,I=g.expandIcon,P=g.collapsible,M=u.key||String(f),D=u.props,N=D.header,z=D.headerClass,$=D.destroyInactivePanel,j=D.collapsible,U=!1;_?U=p[0]===M:U=p.indexOf(M)>-1;var q=j!=null?j:P,Y={key:M,panelKey:M,header:N,headerClass:z,isActive:U,prefixCls:v,destroyInactivePanel:$!=null?$:T,openMotion:b,accordion:_,children:u.props.children,onItemClick:q==="disabled"?null:i.onClickItem,expandIcon:I,collapsible:q};return typeof u.type=="string"?u:(Object.keys(Y).forEach(function(te){typeof Y[te]>"u"&&delete Y[te]}),E.exports.cloneElement(u,Y))},i.getItems=function(){var u=i.props.children;return Po(u).map(i.getNewChild)},i.setActiveKey=function(u){"activeKey"in i.props||i.setState({activeKey:u}),i.props.onChange(i.props.accordion?u[0]:u)};var o=r.activeKey,s=r.defaultActiveKey,a=s;return"activeKey"in r&&(a=o),i.state={activeKey:jA(a)},i}return Hr(n,[{key:"shouldComponentUpdate",value:function(i,o){return!kd(this.props,i)||!kd(this.state,o)}},{key:"render",value:function(){var i,o=this.props,s=o.prefixCls,a=o.className,u=o.style,f=o.accordion,p=je((i={},ae(i,s,!0),ae(i,a,!!a),i));return A("div",{className:p,style:u,role:f?"tablist":null,children:this.getItems()})}}],[{key:"getDerivedStateFromProps",value:function(i){var o={};return"activeKey"in i&&(o.activeKey=jA(i.activeKey)),o}}]),n}(E.exports.Component);lv.defaultProps={prefixCls:"rc-collapse",onChange:function(){},accordion:!1,destroyInactivePanel:!1};lv.Panel=m8;lv.Panel;var zoe=function(t){var n=E.exports.useContext(zn),r=n.getPrefixCls,i=t.prefixCls,o=t.className,s=o===void 0?"":o,a=t.showArrow,u=a===void 0?!0:a,f=r("collapse",i),p=je(ae({},"".concat(f,"-no-arrow"),!u),s);return A(lv.Panel,{...t,prefixCls:f,className:p})};const Foe=zoe;var g8=function(t){var n,r=E.exports.useContext(zn),i=r.getPrefixCls,o=r.direction,s=t.prefixCls,a=t.className,u=a===void 0?"":a,f=t.bordered,p=f===void 0?!0:f,g=t.ghost,v=t.expandIconPosition,b=v===void 0?"start":v,_=i("collapse",s),T=E.exports.useMemo(function(){return b==="left"?"start":b==="right"?"end":b},[b]),I=function(){var z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},$=t.expandIcon,j=$?$(z):A(Z_,{rotate:z.isActive?90:void 0});return Pi(j,function(){return{className:je(j.props.className,"".concat(_,"-arrow"))}})},P=je("".concat(_,"-icon-position-").concat(T),(n={},ae(n,"".concat(_,"-borderless"),!p),ae(n,"".concat(_,"-rtl"),o==="rtl"),ae(n,"".concat(_,"-ghost"),!!g),n),u),M=Je(Je({},U_),{motionAppear:!1,leavedClassName:"".concat(_,"-content-hidden")}),D=function(){var z=t.children;return Po(z).map(function($,j){var U;if(!((U=$.props)===null||U===void 0)&&U.disabled){var q=$.key||String(j),Y=$.props,te=Y.disabled,Z=Y.collapsible,X=Je(Je({},Gi($.props,["disabled"])),{key:q,collapsible:Z!=null?Z:te?"disabled":void 0});return Pi($,X)}return $})};return A(lv,{openMotion:M,...t,expandIcon:I,prefixCls:_,className:P,children:D()})};g8.Panel=Foe;const HA=g8;var $oe=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},Boe=function(t){var n,r=E.exports.useContext(zn),i=r.getPrefixCls,o=r.direction,s=t.prefixCls,a=t.type,u=a===void 0?"horizontal":a,f=t.orientation,p=f===void 0?"center":f,g=t.orientationMargin,v=t.className,b=t.children,_=t.dashed,T=t.plain,I=$oe(t,["prefixCls","type","orientation","orientationMargin","className","children","dashed","plain"]),P=i("divider",s),M=p.length>0?"-".concat(p):p,D=!!b,N=p==="left"&&g!=null,z=p==="right"&&g!=null,$=je(P,"".concat(P,"-").concat(u),(n={},ae(n,"".concat(P,"-with-text"),D),ae(n,"".concat(P,"-with-text").concat(M),D),ae(n,"".concat(P,"-dashed"),!!_),ae(n,"".concat(P,"-plain"),!!T),ae(n,"".concat(P,"-rtl"),o==="rtl"),ae(n,"".concat(P,"-no-default-orientation-margin-left"),N),ae(n,"".concat(P,"-no-default-orientation-margin-right"),z),n),v),j=Je(Je({},N&&{marginLeft:g}),z&&{marginRight:g});return A("div",{className:$,...I,role:"separator",children:b&&u!=="vertical"&&A("span",{className:"".concat(P,"-inner-text"),style:j,children:b})})};const Voe=Boe;var v8=E.exports.createContext(null),KA=[];function Uoe(e,t){var n=E.exports.useState(function(){if(!To())return null;var _=document.createElement("div");return _}),r=$e(n,1),i=r[0],o=E.exports.useRef(!1),s=E.exports.useContext(v8),a=E.exports.useState(KA),u=$e(a,2),f=u[0],p=u[1],g=s||(o.current?void 0:function(_){p(function(T){var I=[_].concat(Mt(T));return I})});function v(){i.parentElement||document.body.appendChild(i),o.current=!0}function b(){var _;(_=i.parentElement)===null||_===void 0||_.removeChild(i),o.current=!1}return Si(function(){return e?s?s(v):v():b(),b},[e]),Si(function(){f.length&&(f.forEach(function(_){return _()}),p(KA))},[f]),[i,g]}var HC;function wb(e){if(typeof document>"u")return 0;if(e||HC===void 0){var t=document.createElement("div");t.style.width="100%",t.style.height="200px";var n=document.createElement("div"),r=n.style;r.position="absolute",r.top="0",r.left="0",r.pointerEvents="none",r.visibility="hidden",r.width="200px",r.height="150px",r.overflow="hidden",n.appendChild(t),document.body.appendChild(n);var i=t.offsetWidth;n.style.overflow="scroll";var o=t.offsetWidth;i===o&&(o=n.clientWidth),document.body.removeChild(n),HC=i-o}return HC}function WA(e){var t=e.match(/^(.*)px$/),n=Number(t==null?void 0:t[1]);return Number.isNaN(n)?wb():n}function GA(e){if(typeof document>"u"||!e||!(e instanceof Element))return{width:0,height:0};var t=getComputedStyle(e,"::-webkit-scrollbar"),n=t.width,r=t.height;return{width:WA(n),height:WA(r)}}function joe(){return document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth}var Hoe="rc-util-locker-".concat(Date.now()),qA=0;function Koe(e){var t=!!e,n=E.exports.useState(function(){return qA+=1,"".concat(Hoe,"_").concat(qA)}),r=$e(n,1),i=r[0];Si(function(){if(t){var o=wb(),s=joe();Jg(`
html body {
overflow-y: hidden;
`.concat(s?"width: calc(100% - ".concat(o,"px);"):"",`
}`),i)}else DD(i);return function(){DD(i)}},[t,i])}var ZA=!1;function Woe(e){return typeof e=="boolean"&&(ZA=e),ZA}var XA=function(t){return t===!1?!1:!To()||!t?null:typeof t=="string"?document.querySelector(t):typeof t=="function"?t():t},y8=E.exports.forwardRef(function(e,t){var n=e.open,r=e.autoLock,i=e.getContainer;e.debug;var o=e.autoDestroy,s=o===void 0?!0:o,a=e.children,u=E.exports.useState(n),f=$e(u,2),p=f[0],g=f[1],v=p||n;E.exports.useEffect(function(){(s||n)&&g(n)},[n,s]);var b=E.exports.useState(function(){return XA(i)}),_=$e(b,2),T=_[0],I=_[1];E.exports.useEffect(function(){var te=XA(i);I(te!=null?te:null)});var P=Uoe(v&&!T),M=$e(P,2),D=M[0],N=M[1],z=T!=null?T:D;Koe(r&&n&&To()&&(z===D||z===document.body));var $=null;if(a&&Nh(a)&&t){var j=a;$=j.ref}var U=Q5($,t);if(!v||!To()||T===void 0)return null;var q=z===!1||Woe(),Y=a;return t&&(Y=E.exports.cloneElement(a,{ref:U})),A(v8.Provider,{value:N,children:q?Y:al.exports.createPortal(Y,z)})}),Goe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"}}]},name:"eye",theme:"outlined"};const qoe=Goe;var x8=function(t,n){return A(Yn,{...me(me({},t),{},{ref:n,icon:qoe})})};x8.displayName="EyeOutlined";const LI=E.exports.forwardRef(x8);function b8(){var e=document.documentElement.clientWidth,t=window.innerHeight||document.documentElement.clientHeight;return{width:e,height:t}}function $E(e){var t=e.getBoundingClientRect(),n=document.documentElement;return{left:t.left+(window.pageXOffset||n.scrollLeft)-(n.clientLeft||document.body.clientLeft||0),top:t.top+(window.pageYOffset||n.scrollTop)-(n.clientTop||document.body.clientTop||0)}}function Zoe(){var e=me({},P0);return e.useId}var YA=0;function Xoe(e){var t=E.exports.useState("ssr-id"),n=$e(t,2),r=n[0],i=n[1],o=Zoe(),s=o==null?void 0:o();return E.exports.useEffect(function(){if(!o){var a=YA;YA+=1,i("rc_unique_".concat(a))}},[]),e||s||r}function Yoe(e){var t=e.prefixCls,n=e.style,r=e.visible,i=e.maskProps,o=e.motionName;return A(oa,{visible:r,motionName:o,leavedClassName:"".concat(t,"-mask-hidden"),children:function(s,a){var u=s.className,f=s.style;return A("div",{ref:a,style:me(me({},f),n),className:je("".concat(t,"-mask"),u),...i})}},"mask")}function QA(e,t,n){var r=t;return!r&&n&&(r="".concat(e,"-").concat(n)),r}function JA(e,t){var n=e["page".concat(t?"Y":"X","Offset")],r="scroll".concat(t?"Top":"Left");if(typeof n!="number"){var i=e.document;n=i.documentElement[r],typeof n!="number"&&(n=i.body[r])}return n}function Qoe(e){var t=e.getBoundingClientRect(),n={left:t.left,top:t.top},r=e.ownerDocument,i=r.defaultView||r.parentWindow;return n.left+=JA(i),n.top+=JA(i,!0),n}const Joe=E.exports.memo(function(e){var t=e.children;return t},function(e,t){var n=t.shouldUpdate;return!n});var eN={width:0,height:0,overflow:"hidden",outline:"none"},eae=Un.forwardRef(function(e,t){var n=e.prefixCls,r=e.className,i=e.style,o=e.title,s=e.ariaId,a=e.footer,u=e.closable,f=e.closeIcon,p=e.onClose,g=e.children,v=e.bodyStyle,b=e.bodyProps,_=e.modalRender,T=e.onMouseDown,I=e.onMouseUp,P=e.holderRef,M=e.visible,D=e.forceRender,N=e.width,z=e.height,$=E.exports.useRef(),j=E.exports.useRef();Un.useImperativeHandle(t,function(){return{focus:function(){var J;(J=$.current)===null||J===void 0||J.focus()},changeActive:function(J){var ue=document,re=ue.activeElement;J&&re===j.current?$.current.focus():!J&&re===$.current&&j.current.focus()}}});var U={};N!==void 0&&(U.width=N),z!==void 0&&(U.height=z);var q;a&&(q=A("div",{className:"".concat(n,"-footer"),children:a}));var Y;o&&(Y=A("div",{className:"".concat(n,"-header"),children:A("div",{className:"".concat(n,"-title"),id:s,children:o})}));var te;u&&(te=A("button",{type:"button",onClick:p,"aria-label":"Close",className:"".concat(n,"-close"),children:f||A("span",{className:"".concat(n,"-close-x")})}));var Z=it("div",{className:"".concat(n,"-content"),children:[te,Y,A("div",{className:"".concat(n,"-body"),style:v,...b,children:g}),q]});return it("div",{role:"dialog","aria-labelledby":o?s:null,"aria-modal":"true",ref:P,style:me(me({},i),U),className:je(n,r),onMouseDown:T,onMouseUp:I,children:[A("div",{tabIndex:0,ref:$,style:eN,"aria-hidden":"true"}),A(Joe,{shouldUpdate:M||D,children:_?_(Z):Z}),A("div",{tabIndex:0,ref:j,style:eN,"aria-hidden":"true"})]},"dialog-element")}),_8=E.exports.forwardRef(function(e,t){var n=e.prefixCls,r=e.title,i=e.style,o=e.className,s=e.visible,a=e.forceRender,u=e.destroyOnClose,f=e.motionName,p=e.ariaId,g=e.onVisibleChanged,v=e.mousePosition,b=E.exports.useRef(),_=E.exports.useState(),T=$e(_,2),I=T[0],P=T[1],M={};I&&(M.transformOrigin=I);function D(){var N=Qoe(b.current);P(v?"".concat(v.x-N.left,"px ").concat(v.y-N.top,"px"):"")}return A(oa,{visible:s,onVisibleChanged:g,onAppearPrepare:D,onEnterPrepare:D,forceRender:a,motionName:f,removeOnLeave:u,ref:b,children:function(N,z){var $=N.className,j=N.style;return A(eae,{...e,ref:t,title:r,ariaId:p,prefixCls:n,holderRef:z,style:me(me(me({},j),i),M),className:je(o,$)})}})});_8.displayName="Content";function tae(e){var t=e.prefixCls,n=t===void 0?"rc-dialog":t,r=e.zIndex,i=e.visible,o=i===void 0?!1:i,s=e.keyboard,a=s===void 0?!0:s,u=e.focusTriggerAfterClose,f=u===void 0?!0:u,p=e.wrapStyle,g=e.wrapClassName,v=e.wrapProps,b=e.onClose,_=e.afterClose,T=e.transitionName,I=e.animation,P=e.closable,M=P===void 0?!0:P,D=e.mask,N=D===void 0?!0:D,z=e.maskTransitionName,$=e.maskAnimation,j=e.maskClosable,U=j===void 0?!0:j,q=e.maskStyle,Y=e.maskProps,te=e.rootClassName,Z=E.exports.useRef(),X=E.exports.useRef(),J=E.exports.useRef(),ue=E.exports.useState(o),re=$e(ue,2),se=re[0],oe=re[1],he=Xoe();function Ce(){yd(X.current,document.activeElement)||(Z.current=document.activeElement)}function Se(){if(!yd(X.current,document.activeElement)){var pt;(pt=J.current)===null||pt===void 0||pt.focus()}}function be(pt){if(pt)Se();else{if(oe(!1),N&&Z.current&&f){try{Z.current.focus({preventScroll:!0})}catch{}Z.current=null}se&&(_==null||_())}}function Re(pt){b==null||b(pt)}var Ie=E.exports.useRef(!1),Me=E.exports.useRef(),Ae=function(){clearTimeout(Me.current),Ie.current=!0},ze=function(){Me.current=setTimeout(function(){Ie.current=!1})},Ke=null;U&&(Ke=function(gt){Ie.current?Ie.current=!1:X.current===gt.target&&Re(gt)});function Ue(pt){if(a&&pt.keyCode===Pt.ESC){pt.stopPropagation(),Re(pt);return}o&&pt.keyCode===Pt.TAB&&J.current.changeActive(!pt.shiftKey)}return E.exports.useEffect(function(){o&&(oe(!0),Ce())},[o]),E.exports.useEffect(function(){return function(){clearTimeout(Me.current)}},[]),it("div",{className:je("".concat(n,"-root"),te),...Zl(e,{data:!0}),children:[A(Yoe,{prefixCls:n,visible:N&&o,motionName:QA(n,z,$),style:me({zIndex:r},q),maskProps:Y}),A("div",{tabIndex:-1,onKeyDown:Ue,className:je("".concat(n,"-wrap"),g),ref:X,onClick:Ke,style:me(me({zIndex:r},p),{},{display:se?null:"none"}),...v,children:A(_8,{...e,onMouseDown:Ae,onMouseUp:ze,ref:J,closable:M,ariaId:he,prefixCls:n,visible:o&&se,onClose:Re,onVisibleChanged:be,motionName:QA(n,T,I)})})]})}var zI=function(t){var n=t.visible,r=t.getContainer,i=t.forceRender,o=t.destroyOnClose,s=o===void 0?!1:o,a=t.afterClose,u=E.exports.useState(n),f=$e(u,2),p=f[0],g=f[1];return E.exports.useEffect(function(){n&&g(!0)},[n]),!i&&s&&!p?null:A(y8,{open:n||i||p,autoDestroy:!1,getContainer:r,autoLock:n||p,children:A(tae,{...t,destroyOnClose:s,afterClose:function(){a==null||a(),g(!1)}})})};zI.displayName="Dialog";var nae=["visible","onVisibleChange","getContainer","current","countRender"],FI=E.exports.createContext({previewUrls:new Map,setPreviewUrls:function(){return null},current:null,setCurrent:function(){return null},setShowPreview:function(){return null},setMousePosition:function(){return null},registerImage:function(){return function(){return null}},rootClassName:""}),rae=FI.Provider,iae=function(t){var n=t.previewPrefixCls,r=n===void 0?"rc-image-preview":n,i=t.children,o=t.icons,s=o===void 0?{}:o,a=t.preview,u=on(a)==="object"?a:{},f=u.visible,p=f===void 0?void 0:f,g=u.onVisibleChange,v=g===void 0?void 0:g,b=u.getContainer,_=b===void 0?void 0:b,T=u.current,I=T===void 0?0:T,P=u.countRender,M=P===void 0?void 0:P,D=kn(u,nae),N=E.exports.useState(new Map),z=$e(N,2),$=z[0],j=z[1],U=E.exports.useState(),q=$e(U,2),Y=q[0],te=q[1],Z=Ei(!!p,{value:p,onChange:v}),X=$e(Z,2),J=X[0],ue=X[1],re=E.exports.useState(null),se=$e(re,2),oe=se[0],he=se[1],Ce=p!==void 0,Se=Array.from($.keys()),be=Se[I],Re=new Map(Array.from($).filter(function(Ae){var ze=$e(Ae,2),Ke=ze[1].canPreview;return!!Ke}).map(function(Ae){var ze=$e(Ae,2),Ke=ze[0],Ue=ze[1].url;return[Ke,Ue]})),Ie=function(ze,Ke){var Ue=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,pt=function(){j(function(Ot){var qe=new Map(Ot),Ct=qe.delete(ze);return Ct?qe:Ot})};return j(function(gt){return new Map(gt).set(ze,{url:Ke,canPreview:Ue})}),pt},Me=function(ze){ze.stopPropagation(),ue(!1),he(null)};return E.exports.useEffect(function(){te(be)},[be]),E.exports.useEffect(function(){!J&&Ce&&te(be)},[be,Ce,J]),it(rae,{value:{isPreviewGroup:!0,previewUrls:Re,setPreviewUrls:j,current:Y,setCurrent:te,setShowPreview:ue,setMousePosition:he,registerImage:Ie},children:[i,A(w8,{"aria-hidden":!J,visible:J,prefixCls:r,onClose:Me,mousePosition:oe,src:Re.get(Y),icons:s,getContainer:_,countRender:M,...D})]})},l0=1,c0=50,am=1,oae=.2,aae=function(t){var n,r=t.visible,i=t.maskTransitionName,o=t.getContainer,s=t.prefixCls,a=t.rootClassName,u=t.icons,f=t.countRender,p=t.showSwitch,g=t.showProgress,v=t.current,b=t.count,_=t.scale,T=t.onSwitchLeft,I=t.onSwitchRight,P=t.onClose,M=t.onZoomIn,D=t.onZoomOut,N=t.onRotateRight,z=t.onRotateLeft,$=u.rotateLeft,j=u.rotateRight,U=u.zoomIn,q=u.zoomOut,Y=u.close,te=u.left,Z=u.right,X="".concat(s,"-operations-operation"),J="".concat(s,"-operations-icon"),ue=[{icon:Y,onClick:P,type:"close"},{icon:U,onClick:M,type:"zoomIn",disabled:_===c0},{icon:q,onClick:D,type:"zoomOut",disabled:_===l0},{icon:j,onClick:N,type:"rotateRight"},{icon:$,onClick:z,type:"rotateLeft"}],re=it(nr,{children:[p&&it(nr,{children:[A("div",{className:je("".concat(s,"-switch-left"),ae({},"".concat(s,"-switch-left-disabled"),v===0)),onClick:T,children:te}),A("div",{className:je("".concat(s,"-switch-right"),ae({},"".concat(s,"-switch-right-disabled"),v===b-1)),onClick:I,children:Z})]}),it("ul",{className:"".concat(s,"-operations"),children:[g&&A("li",{className:"".concat(s,"-operations-progress"),children:(n=f==null?void 0:f(v+1,b))!==null&&n!==void 0?n:"".concat(v+1," / ").concat(b)}),ue.map(function(se){var oe,he=se.icon,Ce=se.onClick,Se=se.type,be=se.disabled;return A("li",{className:je(X,(oe={},ae(oe,"".concat(s,"-operations-operation-").concat(Se),!0),ae(oe,"".concat(s,"-operations-operation-disabled"),!!be),oe)),onClick:Ce,children:E.exports.isValidElement(he)?E.exports.cloneElement(he,{className:J}):he},Se)})]})]});return A(oa,{visible:r,motionName:i,children:function(se){var oe=se.className,he=se.style;return A(y8,{open:!0,getContainer:o!=null?o:document.body,children:A("div",{className:je("".concat(s,"-operations-wrapper"),oe,a),style:he,children:re})})}})},tN={x:0,y:0,rotate:0,scale:1};function sae(e){var t=E.exports.useRef(null),n=E.exports.useRef([]),r=E.exports.useState(tN),i=$e(r,2),o=i[0],s=i[1],a=function(){s(tN)},u=function(g){t.current===null&&(n.current=[],t.current=cr(function(){s(function(v){var b=v;return n.current.forEach(function(_){b=me(me({},b),_)}),t.current=null,b})})),n.current.push(me(me({},o),g))},f=function(g,v,b){var _=e.current,T=_.width,I=_.height,P=_.offsetWidth,M=_.offsetHeight,D=_.offsetLeft,N=_.offsetTop,z=g,$=o.scale*g;$>c0?(z=c0/o.scale,$=c0):$<l0&&(z=l0/o.scale,$=l0);var j=v!=null?v:innerWidth/2,U=b!=null?b:innerHeight/2,q=z-1,Y=q*T*.5,te=q*I*.5,Z=q*(j-o.x-D),X=q*(U-o.y-N),J=o.x-(Z-Y),ue=o.y-(X-te);if(g<1&&$===1){var re=P*$,se=M*$,oe=b8(),he=oe.width,Ce=oe.height;re<=he&&se<=Ce&&(J=0,ue=0)}u({x:J,y:ue,scale:$})};return{transform:o,resetTransform:a,updateTransform:u,dispatchZoonChange:f}}function nN(e,t,n,r){var i=t+n,o=(n-r)/2;if(n>r){if(t>0)return ae({},e,o);if(t<0&&i<r)return ae({},e,-o)}else if(t<0||i>r)return ae({},e,t<0?o:-o);return{}}function lae(e,t,n,r){var i=b8(),o=i.width,s=i.height,a=null;return e<=o&&t<=s?a={x:0,y:0}:(e>o||t>s)&&(a=me(me({},nN("x",n,e,o)),nN("y",r,t,s))),a}var cae=["prefixCls","src","alt","onClose","afterClose","visible","icons","rootClassName","getContainer","countRender","scaleStep","transitionName","maskTransitionName"],w8=function(t){var n=t.prefixCls,r=t.src,i=t.alt,o=t.onClose;t.afterClose;var s=t.visible,a=t.icons,u=a===void 0?{}:a,f=t.rootClassName,p=t.getContainer,g=t.countRender,v=t.scaleStep,b=v===void 0?.5:v,_=t.transitionName,T=_===void 0?"zoom":_,I=t.maskTransitionName,P=I===void 0?"fade":I,M=kn(t,cae),D=E.exports.useRef(),N=E.exports.useRef({deltaX:0,deltaY:0,transformX:0,transformY:0}),z=E.exports.useState(!1),$=$e(z,2),j=$[0],U=$[1],q=E.exports.useContext(FI),Y=q.previewUrls,te=q.current,Z=q.isPreviewGroup,X=q.setCurrent,J=Y.size,ue=Array.from(Y.keys()),re=ue.indexOf(te),se=Z?Y.get(te):r,oe=Z&&J>1,he=Z&&J>=1,Ce=sae(D),Se=Ce.transform,be=Ce.resetTransform,Re=Ce.updateTransform,Ie=Ce.dispatchZoonChange,Me=Se.rotate,Ae=Se.scale,ze=je(ae({},"".concat(n,"-moving"),j)),Ke=function(){be()},Ue=function(){Ie(am+b)},pt=function(){Ie(am-b)},gt=function(){Re({rotate:Me+90})},Ot=function(){Re({rotate:Me-90})},qe=function(He){He.preventDefault(),He.stopPropagation(),re>0&&X(ue[re-1])},Ct=function(He){He.preventDefault(),He.stopPropagation(),re<J-1&&X(ue[re+1])},ot=function(){if(s&&j){U(!1);var He=N.current,ut=He.transformX,bt=He.transformY,Dt=Se.x!==ut&&Se.y!==bt;if(!Dt)return;var Lt=D.current.offsetWidth*Ae,Ht=D.current.offsetHeight*Ae,Fe=D.current.getBoundingClientRect(),Ye=Fe.left,Zt=Fe.top,an=Me%180!==0,Kt=lae(an?Ht:Lt,an?Lt:Ht,Ye,Zt);Kt&&Re(me({},Kt))}},vt=function(He){He.button===0&&(He.preventDefault(),He.stopPropagation(),N.current={deltaX:He.pageX-Se.x,deltaY:He.pageY-Se.y,transformX:Se.x,transformY:Se.y},U(!0))},yt=function(He){s&&j&&Re({x:He.pageX-N.current.deltaX,y:He.pageY-N.current.deltaY})},Tt=function(He){if(!(!s||He.deltaY==0)){var ut=Math.abs(He.deltaY/100),bt=Math.min(ut,oae),Dt=am+bt*b;He.deltaY>0&&(Dt=am/Dt),Ie(Dt,He.clientX,He.clientY)}},et=E.exports.useCallback(function(at){!s||!oe||(at.keyCode===Pt.LEFT?re>0&&X(ue[re-1]):at.keyCode===Pt.RIGHT&&re<J-1&&X(ue[re+1]))},[re,J,ue,X,oe,s]),ct=function(He){s&&(Ae!==1?Re({x:0,y:0,scale:1}):Ie(am+b,He.clientX,He.clientY))};return E.exports.useEffect(function(){var at,He,ut=Qo(window,"mouseup",ot,!1),bt=Qo(window,"mousemove",yt,!1),Dt=Qo(window,"keydown",et,!1);try{window.top!==window.self&&(at=Qo(window.top,"mouseup",ot,!1),He=Qo(window.top,"mousemove",yt,!1))}catch{}return function(){var Lt,Ht;ut.remove(),bt.remove(),Dt.remove(),(Lt=at)===null||Lt===void 0||Lt.remove(),(Ht=He)===null||Ht===void 0||Ht.remove()}},[s,j,et]),it(nr,{children:[A(zI,{transitionName:T,maskTransitionName:P,closable:!1,keyboard:!0,prefixCls:n,onClose:o,afterClose:Ke,visible:s,wrapClassName:ze,rootClassName:f,getContainer:p,...M,children:A("div",{className:"".concat(n,"-img-wrapper"),children:A("img",{width:t.width,height:t.height,onWheel:Tt,onMouseDown:vt,onDoubleClick:ct,ref:D,className:"".concat(n,"-img"),src:se,alt:i,style:{transform:"translate3d(".concat(Se.x,"px, ").concat(Se.y,"px, 0) scale3d(").concat(Ae,", ").concat(Ae,", 1) rotate(").concat(Me,"deg)")}})})}),A(aae,{visible:s,maskTransitionName:P,getContainer:p,prefixCls:n,rootClassName:f,icons:u,countRender:g,showSwitch:oe,showProgress:he,current:re,count:J,scale:Ae,onSwitchLeft:qe,onSwitchRight:Ct,onZoomIn:Ue,onZoomOut:pt,onRotateRight:gt,onRotateLeft:Ot,onClose:o})]})},uae=["src","alt","onPreviewClose","prefixCls","previewPrefixCls","placeholder","fallback","width","height","style","preview","className","onClick","onError","wrapperClassName","wrapperStyle","rootClassName","crossOrigin","decoding","loading","referrerPolicy","sizes","srcSet","useMap","draggable"],dae=["src","visible","onVisibleChange","getContainer","mask","maskClassName","icons","scaleStep"],rN=0,e1=function(t){var n,r=t.src,i=t.alt,o=t.onPreviewClose,s=t.prefixCls,a=s===void 0?"rc-image":s,u=t.previewPrefixCls,f=u===void 0?"".concat(a,"-preview"):u,p=t.placeholder,g=t.fallback,v=t.width,b=t.height,_=t.style,T=t.preview,I=T===void 0?!0:T,P=t.className,M=t.onClick,D=t.onError,N=t.wrapperClassName,z=t.wrapperStyle,$=t.rootClassName,j=t.crossOrigin,U=t.decoding,q=t.loading,Y=t.referrerPolicy,te=t.sizes,Z=t.srcSet,X=t.useMap,J=t.draggable,ue=kn(t,uae),re=p&&p!==!0,se=on(I)==="object"?I:{},oe=se.src,he=se.visible,Ce=he===void 0?void 0:he,Se=se.onVisibleChange,be=Se===void 0?o:Se,Re=se.getContainer,Ie=Re===void 0?void 0:Re,Me=se.mask,Ae=se.maskClassName,ze=se.icons,Ke=se.scaleStep,Ue=kn(se,dae),pt=oe!=null?oe:r,gt=Ce!==void 0,Ot=Ei(!!Ce,{value:Ce,onChange:be}),qe=$e(Ot,2),Ct=qe[0],ot=qe[1],vt=E.exports.useState(re?"loading":"normal"),yt=$e(vt,2),Tt=yt[0],et=yt[1],ct=E.exports.useState(null),at=$e(ct,2),He=at[0],ut=at[1],bt=Tt==="error",Dt=E.exports.useContext(FI),Lt=Dt.isPreviewGroup,Ht=Dt.setCurrent,Fe=Dt.setShowPreview,Ye=Dt.setMousePosition,Zt=Dt.registerImage,an=E.exports.useState(function(){return rN+=1,rN}),Kt=$e(an,1),Vt=Kt[0],It=!!I,Xt=E.exports.useRef(!1),pn=function(){et("normal")},tt=function(tn){D&&D(tn),et("error")},At=function(tn){if(!gt){var Ft=$E(tn.target),dt=Ft.left,mt=Ft.top;Lt?(Ht(Vt),Ye({x:dt,y:mt})):ut({x:dt,y:mt})}Lt?Fe(!0):ot(!0),M&&M(tn)},qt=function(tn){tn.stopPropagation(),ot(!1),gt||ut(null)},En=function(tn){Xt.current=!1,Tt==="loading"&&tn!=null&&tn.complete&&(tn.naturalWidth||tn.naturalHeight)&&(Xt.current=!0,pn())};E.exports.useEffect(function(){var _n=Zt(Vt,pt);return _n},[]),E.exports.useEffect(function(){Zt(Vt,pt,It)},[pt,It]),E.exports.useEffect(function(){bt&&et("normal"),re&&!Xt.current&&et("loading")},[r]);var yn=je(a,N,$,ae({},"".concat(a,"-error"),bt)),St=bt&&g?g:pt,Pn={crossOrigin:j,decoding:U,draggable:J,loading:q,referrerPolicy:Y,sizes:te,srcSet:Z,useMap:X,alt:i,className:je("".concat(a,"-img"),ae({},"".concat(a,"-img-placeholder"),p===!0),P),style:me({height:b},_)};return it(nr,{children:[it("div",{...ue,className:yn,onClick:It?At:M,style:me({width:v,height:b},z),children:[A("img",{...Pn,ref:En,...bt&&g?{src:g}:{onLoad:pn,onError:tt,src:r},width:v,height:b}),Tt==="loading"&&A("div",{"aria-hidden":"true",className:"".concat(a,"-placeholder"),children:p}),Me&&It&&A("div",{className:je("".concat(a,"-mask"),Ae),style:{display:((n=Pn.style)===null||n===void 0?void 0:n.display)==="none"?"none":void 0},children:Me})]}),!Lt&&It&&A(w8,{"aria-hidden":!Ct,visible:Ct,prefixCls:f,onClose:qt,mousePosition:He,src:St,alt:i,getContainer:Ie,icons:ze,scaleStep:Ke,rootClassName:$,...Ue})]})};e1.PreviewGroup=iae;e1.displayName="Image";var fae={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M672 418H144c-17.7 0-32 14.3-32 32v414c0 17.7 14.3 32 32 32h528c17.7 0 32-14.3 32-32V450c0-17.7-14.3-32-32-32zm-44 402H188V494h440v326z"}},{tag:"path",attrs:{d:"M819.3 328.5c-78.8-100.7-196-153.6-314.6-154.2l-.2-64c0-6.5-7.6-10.1-12.6-6.1l-128 101c-4 3.1-3.9 9.1 0 12.3L492 318.6c5.1 4 12.7.4 12.6-6.1v-63.9c12.9.1 25.9.9 38.8 2.5 42.1 5.2 82.1 18.2 119 38.7 38.1 21.2 71.2 49.7 98.4 84.3 27.1 34.7 46.7 73.7 58.1 115.8a325.95 325.95 0 016.5 140.9h74.9c14.8-103.6-11.3-213-81-302.3z"}}]},name:"rotate-left",theme:"outlined"};const hae=fae;var C8=function(t,n){return A(Yn,{...me(me({},t),{},{ref:n,icon:hae})})};C8.displayName="RotateLeftOutlined";const pae=E.exports.forwardRef(C8);var mae={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M480.5 251.2c13-1.6 25.9-2.4 38.8-2.5v63.9c0 6.5 7.5 10.1 12.6 6.1L660 217.6c4-3.2 4-9.2 0-12.3l-128-101c-5.1-4-12.6-.4-12.6 6.1l-.2 64c-118.6.5-235.8 53.4-314.6 154.2A399.75 399.75 0 00123.5 631h74.9c-.9-5.3-1.7-10.7-2.4-16.1-5.1-42.1-2.1-84.1 8.9-124.8 11.4-42.2 31-81.1 58.1-115.8 27.2-34.7 60.3-63.2 98.4-84.3 37-20.6 76.9-33.6 119.1-38.8z"}},{tag:"path",attrs:{d:"M880 418H352c-17.7 0-32 14.3-32 32v414c0 17.7 14.3 32 32 32h528c17.7 0 32-14.3 32-32V450c0-17.7-14.3-32-32-32zm-44 402H396V494h440v326z"}}]},name:"rotate-right",theme:"outlined"};const gae=mae;var S8=function(t,n){return A(Yn,{...me(me({},t),{},{ref:n,icon:gae})})};S8.displayName="RotateRightOutlined";const vae=E.exports.forwardRef(S8);var yae={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M637 443H519V309c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v134H325c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h118v134c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V519h118c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zm284 424L775 721c122.1-148.9 113.6-369.5-26-509-148-148.1-388.4-148.1-537 0-148.1 148.6-148.1 389 0 537 139.5 139.6 360.1 148.1 509 26l146 146c3.2 2.8 8.3 2.8 11 0l43-43c2.8-2.7 2.8-7.8 0-11zM696 696c-118.8 118.7-311.2 118.7-430 0-118.7-118.8-118.7-311.2 0-430 118.8-118.7 311.2-118.7 430 0 118.7 118.8 118.7 311.2 0 430z"}}]},name:"zoom-in",theme:"outlined"};const xae=yae;var E8=function(t,n){return A(Yn,{...me(me({},t),{},{ref:n,icon:xae})})};E8.displayName="ZoomInOutlined";const bae=E.exports.forwardRef(E8);var _ae={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M637 443H325c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h312c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zm284 424L775 721c122.1-148.9 113.6-369.5-26-509-148-148.1-388.4-148.1-537 0-148.1 148.6-148.1 389 0 537 139.5 139.6 360.1 148.1 509 26l146 146c3.2 2.8 8.3 2.8 11 0l43-43c2.8-2.7 2.8-7.8 0-11zM696 696c-118.8 118.7-311.2 118.7-430 0-118.7-118.8-118.7-311.2 0-430 118.8-118.7 311.2-118.7 430 0 118.7 118.8 118.7 311.2 0 430z"}}]},name:"zoom-out",theme:"outlined"};const wae=_ae;var P8=function(t,n){return A(Yn,{...me(me({},t),{},{ref:n,icon:wae})})};P8.displayName="ZoomOutOutlined";const Cae=E.exports.forwardRef(P8);var Sae=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},T8={rotateLeft:A(pae,{}),rotateRight:A(vae,{}),zoomIn:A(bae,{}),zoomOut:A(Cae,{}),close:A(Fh,{}),left:A(VB,{}),right:A(Z_,{})},Eae=function(t){var n=t.previewPrefixCls,r=t.preview,i=Sae(t,["previewPrefixCls","preview"]),o=E.exports.useContext(zn),s=o.getPrefixCls,a=s("image-preview",n),u=s(),f=E.exports.useMemo(function(){if(r===!1)return r;var p=on(r)==="object"?r:{};return Je(Je({},p),{transitionName:Ia(u,"zoom",p.transitionName),maskTransitionName:Ia(u,"fade",p.maskTransitionName)})},[r]);return A(e1.PreviewGroup,{preview:f,previewPrefixCls:a,icons:T8,...i})};const Pae=Eae;var iN=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},I8=function(t){var n=t.prefixCls,r=t.preview,i=iN(t,["prefixCls","preview"]),o=E.exports.useContext(zn),s=o.getPrefixCls,a=o.locale,u=a===void 0?Ms:a,f=o.getPopupContainer,p=s("image",n),g=s(),v=u.Image||Ms.Image,b=E.exports.useMemo(function(){if(r===!1)return r;var _=on(r)==="object"?r:{},T=_.getContainer,I=iN(_,["getContainer"]);return Je(Je({mask:it("div",{className:"".concat(p,"-mask-info"),children:[A(LI,{}),v==null?void 0:v.preview]}),icons:T8},I),{getContainer:T||f,transitionName:Ia(g,"zoom",_.transitionName),maskTransitionName:Ia(g,"fade",_.maskTransitionName)})},[r,v]);return A(e1,{prefixCls:p,preview:b,...i})};I8.PreviewGroup=Pae;const Tae=I8;var Iae=function(t){var n,r=E.exports.useContext(zn),i=r.getPrefixCls,o=r.direction,s=t.prefixCls,a=t.className,u=a===void 0?"":a,f=i("input-group",s),p=je(f,(n={},ae(n,"".concat(f,"-lg"),t.size==="large"),ae(n,"".concat(f,"-sm"),t.size==="small"),ae(n,"".concat(f,"-compact"),t.compact),ae(n,"".concat(f,"-rtl"),o==="rtl"),n),u),g=E.exports.useContext(Rs),v=E.exports.useMemo(function(){return Je(Je({},g),{isFormItemInput:!1})},[g]);return A("span",{className:p,style:t.style,onMouseEnter:t.onMouseEnter,onMouseLeave:t.onMouseLeave,onFocus:t.onFocus,onBlur:t.onBlur,children:A(Rs.Provider,{value:v,children:t.children})})};const kae=Iae;function u0(e){return!!(e.addonBefore||e.addonAfter)}function k8(e){return!!(e.prefix||e.suffix||e.allowClear)}function oN(e,t,n,r){if(!!n){var i=t;if(t.type==="click"){var o=e.cloneNode(!0);i=Object.create(t,{target:{value:o},currentTarget:{value:o}}),o.value="",n(i);return}if(r!==void 0){i=Object.create(t,{target:{value:e},currentTarget:{value:e}}),e.value=r,n(i);return}n(i)}}function Mae(e,t){if(!!e){e.focus(t);var n=t||{},r=n.cursor;if(r){var i=e.value.length;switch(r){case"start":e.setSelectionRange(0,0);break;case"end":e.setSelectionRange(i,i);break;default:e.setSelectionRange(0,i)}}}}function aN(e){return typeof e>"u"||e===null?"":String(e)}var Rae=function(t){var n=t.inputElement,r=t.prefixCls,i=t.prefix,o=t.suffix,s=t.addonBefore,a=t.addonAfter,u=t.className,f=t.style,p=t.affixWrapperClassName,g=t.groupClassName,v=t.wrapperClassName,b=t.disabled,_=t.readOnly,T=t.focused,I=t.triggerFocus,P=t.allowClear,M=t.value,D=t.handleReset,N=t.hidden,z=E.exports.useRef(null),$=function(oe){var he;(he=z.current)!==null&&he!==void 0&&he.contains(oe.target)&&(I==null||I())},j=function(){var oe;if(!P)return null;var he=!b&&!_&&M,Ce="".concat(r,"-clear-icon"),Se=on(P)==="object"&&P!==null&&P!==void 0&&P.clearIcon?P.clearIcon:"\u2716";return A("span",{onClick:D,onMouseDown:function(Re){return Re.preventDefault()},className:je(Ce,(oe={},ae(oe,"".concat(Ce,"-hidden"),!he),ae(oe,"".concat(Ce,"-has-suffix"),!!o),oe)),role:"button",tabIndex:-1,children:Se})},U=E.exports.cloneElement(n,{value:M,hidden:N});if(k8(t)){var q,Y="".concat(r,"-affix-wrapper"),te=je(Y,(q={},ae(q,"".concat(Y,"-disabled"),b),ae(q,"".concat(Y,"-focused"),T),ae(q,"".concat(Y,"-readonly"),_),ae(q,"".concat(Y,"-input-with-clear-btn"),o&&P&&M),q),!u0(t)&&u,p),Z=(o||P)&&it("span",{className:"".concat(r,"-suffix"),children:[j(),o]});U=it("span",{className:te,style:f,hidden:!u0(t)&&N,onClick:$,ref:z,children:[i&&A("span",{className:"".concat(r,"-prefix"),children:i}),E.exports.cloneElement(n,{style:null,value:M,hidden:null}),Z]})}if(u0(t)){var X="".concat(r,"-group"),J="".concat(X,"-addon"),ue=je("".concat(r,"-wrapper"),X,v),re=je("".concat(r,"-group-wrapper"),u,g);return A("span",{className:re,style:f,hidden:N,children:it("span",{className:ue,children:[s&&A("span",{className:J,children:s}),E.exports.cloneElement(U,{style:null,hidden:null}),a&&A("span",{className:J,children:a})]})})}return U},Oae=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","type","inputClassName"],Dae=E.exports.forwardRef(function(e,t){var n=e.autoComplete,r=e.onChange,i=e.onFocus,o=e.onBlur,s=e.onPressEnter,a=e.onKeyDown,u=e.prefixCls,f=u===void 0?"rc-input":u,p=e.disabled,g=e.htmlSize,v=e.className,b=e.maxLength,_=e.suffix,T=e.showCount,I=e.type,P=I===void 0?"text":I,M=e.inputClassName,D=kn(e,Oae),N=Ei(e.defaultValue,{value:e.value}),z=$e(N,2),$=z[0],j=z[1],U=E.exports.useState(!1),q=$e(U,2),Y=q[0],te=q[1],Z=E.exports.useRef(null),X=function(be){Z.current&&Mae(Z.current,be)};E.exports.useImperativeHandle(t,function(){return{focus:X,blur:function(){var be;(be=Z.current)===null||be===void 0||be.blur()},setSelectionRange:function(be,Re,Ie){var Me;(Me=Z.current)===null||Me===void 0||Me.setSelectionRange(be,Re,Ie)},select:function(){var be;(be=Z.current)===null||be===void 0||be.select()},input:Z.current}}),E.exports.useEffect(function(){te(function(Se){return Se&&p?!1:Se})},[p]);var J=function(be){e.value===void 0&&j(be.target.value),Z.current&&oN(Z.current,be,r)},ue=function(be){s&&be.key==="Enter"&&s(be),a==null||a(be)},re=function(be){te(!0),i==null||i(be)},se=function(be){te(!1),o==null||o(be)},oe=function(be){j(""),X(),Z.current&&oN(Z.current,be,r)},he=function(){var be=Gi(e,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","affixWrapperClassName","groupClassName","inputClassName","wrapperClassName","htmlSize"]);return A("input",{autoComplete:n,...be,onChange:J,onFocus:re,onBlur:se,onKeyDown:ue,className:je(f,ae({},"".concat(f,"-disabled"),p),M,!u0(e)&&!k8(e)&&v),ref:Z,size:g,type:P})},Ce=function(){var be=Number(b)>0;if(_||T){var Re=aN($),Ie=Mt(Re).length,Me=on(T)==="object"?T.formatter({value:Re,count:Ie,maxLength:b}):"".concat(Ie).concat(be?" / ".concat(b):"");return it(nr,{children:[!!T&&A("span",{className:je("".concat(f,"-show-count-suffix"),ae({},"".concat(f,"-show-count-has-suffix"),!!_)),children:Me}),_]})}return null};return A(Rae,{...D,prefixCls:f,className:v,inputElement:he(),handleReset:oe,value:aN($),focused:Y,triggerFocus:X,suffix:Ce(),disabled:p})});function M8(e,t){var n=E.exports.useRef([]),r=function(){n.current.push(setTimeout(function(){var o,s,a,u;((o=e.current)===null||o===void 0?void 0:o.input)&&((s=e.current)===null||s===void 0?void 0:s.input.getAttribute("type"))==="password"&&((a=e.current)===null||a===void 0?void 0:a.input.hasAttribute("value"))&&((u=e.current)===null||u===void 0||u.input.removeAttribute("value"))}))};return E.exports.useEffect(function(){return t&&r(),function(){return n.current.forEach(function(i){i&&clearTimeout(i)})}},[]),r}function Aae(e){return!!(e.prefix||e.suffix||e.allowClear)}var Nae=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function Lae(e){return typeof e>"u"||e===null?"":String(e)}function KC(e,t,n,r){if(!!n){var i=t;if(t.type==="click"){var o=e.cloneNode(!0);i=Object.create(t,{target:{value:o},currentTarget:{value:o}}),o.value="",n(i);return}if(r!==void 0){i=Object.create(t,{target:{value:e},currentTarget:{value:e}}),e.value=r,n(i);return}n(i)}}function zae(e,t){if(!!e){e.focus(t);var n=t||{},r=n.cursor;if(r){var i=e.value.length;switch(r){case"start":e.setSelectionRange(0,0);break;case"end":e.setSelectionRange(i,i);break;default:e.setSelectionRange(0,i);break}}}}var $I=E.exports.forwardRef(function(e,t){var n,r,i,o=e.prefixCls,s=e.bordered,a=s===void 0?!0:s,u=e.status,f=e.size,p=e.disabled,g=e.onBlur,v=e.onFocus,b=e.suffix,_=e.allowClear,T=e.addonAfter,I=e.addonBefore,P=e.className,M=e.onChange,D=Nae(e,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","onChange"]),N=Un.useContext(zn),z=N.getPrefixCls,$=N.direction,j=N.input,U=z("input",o),q=E.exports.useRef(null),Y=Bh(U,$),te=Y.compactSize,Z=Y.compactItemClassnames,X=Un.useContext(Jl),J=te||f||X,ue=Un.useContext(fu),re=p!=null?p:ue,se=E.exports.useContext(Rs),oe=se.status,he=se.hasFeedback,Ce=se.feedbackIcon,Se=nv(oe,u),be=Aae(e)||!!he,Re=E.exports.useRef(be);E.exports.useEffect(function(){be&&Re.current,Re.current=be},[be]);var Ie=M8(q,!0),Me=function(gt){Ie(),g==null||g(gt)},Ae=function(gt){Ie(),v==null||v(gt)},ze=function(gt){Ie(),M==null||M(gt)},Ke=(he||b)&&it(nr,{children:[b,he&&Ce]}),Ue;return on(_)==="object"&&(_==null?void 0:_.clearIcon)?Ue=_:_&&(Ue={clearIcon:A(zh,{})}),A(Dae,{ref:Aa(t,q),prefixCls:U,autoComplete:j==null?void 0:j.autoComplete,...D,disabled:re||void 0,onBlur:Me,onFocus:Ae,suffix:Ke,allowClear:Ue,className:je(P,Z),onChange:ze,addonAfter:T&&A(fb,{children:A(kE,{override:!0,status:!0,children:T})}),addonBefore:I&&A(fb,{children:A(kE,{override:!0,status:!0,children:I})}),inputClassName:je((n={},ae(n,"".concat(U,"-sm"),J==="small"),ae(n,"".concat(U,"-lg"),J==="large"),ae(n,"".concat(U,"-rtl"),$==="rtl"),ae(n,"".concat(U,"-borderless"),!a),n),!be&&Xc(U,Se)),affixWrapperClassName:je((r={},ae(r,"".concat(U,"-affix-wrapper-sm"),J==="small"),ae(r,"".concat(U,"-affix-wrapper-lg"),J==="large"),ae(r,"".concat(U,"-affix-wrapper-rtl"),$==="rtl"),ae(r,"".concat(U,"-affix-wrapper-borderless"),!a),r),Xc("".concat(U,"-affix-wrapper"),Se,he)),wrapperClassName:je(ae({},"".concat(U,"-group-rtl"),$==="rtl")),groupClassName:je((i={},ae(i,"".concat(U,"-group-wrapper-sm"),J==="small"),ae(i,"".concat(U,"-group-wrapper-lg"),J==="large"),ae(i,"".concat(U,"-group-wrapper-rtl"),$==="rtl"),i),Xc("".concat(U,"-group-wrapper"),Se,he))})}),Fae={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z"}},{tag:"path",attrs:{d:"M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z"}}]},name:"eye-invisible",theme:"outlined"};const $ae=Fae;var R8=function(t,n){return A(Yn,{...me(me({},t),{},{ref:n,icon:$ae})})};R8.displayName="EyeInvisibleOutlined";const Bae=E.exports.forwardRef(R8);var Vae=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},Uae=function(t){return t?A(LI,{}):A(Bae,{})},jae={click:"onClick",hover:"onMouseOver"},Hae=E.exports.forwardRef(function(e,t){var n=e.visibilityToggle,r=n===void 0?!0:n,i=on(r)==="object"&&r.visible!==void 0,o=E.exports.useState(function(){return i?r.visible:!1}),s=$e(o,2),a=s[0],u=s[1],f=E.exports.useRef(null);E.exports.useEffect(function(){i&&u(r.visible)},[i,r]);var p=M8(f),g=function(){var T=e.disabled;T||(a&&p(),u(function(I){var P,M=!I;return on(r)==="object"&&((P=r.onVisibleChange)===null||P===void 0||P.call(r,M)),M}))},v=function(T){var I,P=e.action,M=P===void 0?"click":P,D=e.iconRender,N=D===void 0?Uae:D,z=jae[M]||"",$=N(a),j=(I={},ae(I,z,g),ae(I,"className","".concat(T,"-icon")),ae(I,"key","passwordIcon"),ae(I,"onMouseDown",function(q){q.preventDefault()}),ae(I,"onMouseUp",function(q){q.preventDefault()}),I);return E.exports.cloneElement(E.exports.isValidElement($)?$:A("span",{children:$}),j)},b=function(T){var I=T.getPrefixCls,P=e.className,M=e.prefixCls,D=e.inputPrefixCls,N=e.size,z=Vae(e,["className","prefixCls","inputPrefixCls","size"]),$=I("input",D),j=I("input-password",M),U=r&&v(j),q=je(j,P,ae({},"".concat(j,"-").concat(N),!!N)),Y=Je(Je({},Gi(z,["suffix","iconRender","visibilityToggle"])),{type:a?"text":"password",className:q,prefixCls:$,suffix:U});return N&&(Y.size=N),A($I,{ref:Aa(t,f),...Y})};return A(Bd,{children:b})});const Kae=Hae;var Wae=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},Gae=E.exports.forwardRef(function(e,t){var n,r=e.prefixCls,i=e.inputPrefixCls,o=e.className,s=e.size,a=e.suffix,u=e.enterButton,f=u===void 0?!1:u,p=e.addonAfter,g=e.loading,v=e.disabled,b=e.onSearch,_=e.onChange,T=e.onCompositionStart,I=e.onCompositionEnd,P=Wae(e,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),M=E.exports.useContext(zn),D=M.getPrefixCls,N=M.direction,z=E.exports.useContext(Jl),$=E.exports.useRef(!1),j=D("input-search",r),U=D("input",i),q=Bh(j,N),Y=q.compactSize,te=Y||s||z,Z=E.exports.useRef(null),X=function(Ae){Ae&&Ae.target&&Ae.type==="click"&&b&&b(Ae.target.value,Ae),_&&_(Ae)},J=function(Ae){var ze;document.activeElement===((ze=Z.current)===null||ze===void 0?void 0:ze.input)&&Ae.preventDefault()},ue=function(Ae){var ze,Ke;b&&b((Ke=(ze=Z.current)===null||ze===void 0?void 0:ze.input)===null||Ke===void 0?void 0:Ke.value,Ae)},re=function(Ae){$.current||g||ue(Ae)},se=typeof f=="boolean"?A(bI,{}):null,oe="".concat(j,"-button"),he,Ce=f||{},Se=Ce.type&&Ce.type.__ANT_BUTTON===!0;Se||Ce.type==="button"?he=Pi(Ce,Je({onMouseDown:J,onClick:function(Ae){var ze,Ke;(Ke=(ze=Ce==null?void 0:Ce.props)===null||ze===void 0?void 0:ze.onClick)===null||Ke===void 0||Ke.call(ze,Ae),ue(Ae)},key:"enterButton"},Se?{className:oe,size:te}:{})):he=A(Yr,{className:oe,type:f?"primary":void 0,size:te,disabled:v,onMouseDown:J,onClick:ue,loading:g,icon:se,children:f},"enterButton"),p&&(he=[he,Pi(p,{key:"addonAfter"})]);var be=je(j,(n={},ae(n,"".concat(j,"-rtl"),N==="rtl"),ae(n,"".concat(j,"-").concat(te),!!te),ae(n,"".concat(j,"-with-button"),!!f),n),o),Re=function(Ae){$.current=!0,T==null||T(Ae)},Ie=function(Ae){$.current=!1,I==null||I(Ae)};return A($I,{ref:Aa(Z,t),onPressEnter:re,...P,size:te,onCompositionStart:Re,onCompositionEnd:Ie,prefixCls:U,addonAfter:he,suffix:a,onChange:X,className:be,disabled:v})});const qae=Gae;var Zae=`
min-height:0 !important;
max-height:none !important;
height:0 !important;
visibility:hidden !important;
overflow:hidden !important;
position:absolute !important;
z-index:-1000 !important;
top:0 !important;
right:0 !important;
pointer-events: none !important;
`,Xae=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break"],WC={},Ha;function Yae(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=e.getAttribute("id")||e.getAttribute("data-reactid")||e.getAttribute("name");if(t&&WC[n])return WC[n];var r=window.getComputedStyle(e),i=r.getPropertyValue("box-sizing")||r.getPropertyValue("-moz-box-sizing")||r.getPropertyValue("-webkit-box-sizing"),o=parseFloat(r.getPropertyValue("padding-bottom"))+parseFloat(r.getPropertyValue("padding-top")),s=parseFloat(r.getPropertyValue("border-bottom-width"))+parseFloat(r.getPropertyValue("border-top-width")),a=Xae.map(function(f){return"".concat(f,":").concat(r.getPropertyValue(f))}).join(";"),u={sizingStyle:a,paddingSize:o,borderSize:s,boxSizing:i};return t&&n&&(WC[n]=u),u}function Qae(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;Ha||(Ha=document.createElement("textarea"),Ha.setAttribute("tab-index","-1"),Ha.setAttribute("aria-hidden","true"),document.body.appendChild(Ha)),e.getAttribute("wrap")?Ha.setAttribute("wrap",e.getAttribute("wrap")):Ha.removeAttribute("wrap");var i=Yae(e,t),o=i.paddingSize,s=i.borderSize,a=i.boxSizing,u=i.sizingStyle;Ha.setAttribute("style","".concat(u,";").concat(Zae)),Ha.value=e.value||e.placeholder||"";var f=void 0,p=void 0,g,v=Ha.scrollHeight;if(a==="border-box"?v+=s:a==="content-box"&&(v-=o),n!==null||r!==null){Ha.value=" ";var b=Ha.scrollHeight-o;n!==null&&(f=b*n,a==="border-box"&&(f=f+o+s),v=Math.max(f,v)),r!==null&&(p=b*r,a==="border-box"&&(p=p+o+s),g=v>p?"":"hidden",v=Math.min(p,v))}var _={height:v,overflowY:g,resize:"none"};return f&&(_.minHeight=f),p&&(_.maxHeight=p),_}var Jae=["prefixCls","onPressEnter","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],GC=0,qC=1,ZC=2,ese=E.exports.forwardRef(function(e,t){var n=e.prefixCls,r=n===void 0?"rc-textarea":n;e.onPressEnter;var i=e.defaultValue,o=e.value,s=e.autoSize,a=e.onResize,u=e.className,f=e.style,p=e.disabled,g=e.onChange;e.onInternalAutoSize;var v=kn(e,Jae),b=Ei(i,{value:o,postState:function(Ie){return Ie!=null?Ie:""}}),_=$e(b,2),T=_[0],I=_[1],P=function(Ie){I(Ie.target.value),g==null||g(Ie)},M=E.exports.useRef();E.exports.useImperativeHandle(t,function(){return{textArea:M.current}});var D=E.exports.useMemo(function(){return s&&on(s)==="object"?[s.minRows,s.maxRows]:[]},[s]),N=$e(D,2),z=N[0],$=N[1],j=!!s,U=function(){try{if(document.activeElement===M.current){var Ie=M.current,Me=Ie.selectionStart,Ae=Ie.selectionEnd,ze=Ie.scrollTop;M.current.setSelectionRange(Me,Ae),M.current.scrollTop=ze}}catch{}},q=E.exports.useState(ZC),Y=$e(q,2),te=Y[0],Z=Y[1],X=E.exports.useState(),J=$e(X,2),ue=J[0],re=J[1],se=function(){Z(GC)};Si(function(){j&&se()},[o,z,$,j]),Si(function(){if(te===GC)Z(qC);else if(te===qC){var Re=Qae(M.current,!1,z,$);Z(ZC),re(Re)}else U()},[te]);var oe=E.exports.useRef(),he=function(){cr.cancel(oe.current)},Ce=function(Ie){te===ZC&&(a==null||a(Ie),s&&(he(),oe.current=cr(function(){se()})))};E.exports.useEffect(function(){return he},[]);var Se=j?ue:null,be=me(me({},f),Se);return(te===GC||te===qC)&&(be.overflowY="hidden",be.overflowX="hidden"),A(Ql,{onResize:Ce,disabled:!(s||a),children:A("textarea",{...v,ref:M,style:be,className:je(r,u,ae({},"".concat(r,"-disabled"),p)),disabled:p,value:T,onChange:P})})}),tse=function(e){si(n,e);var t=li(n);function n(r){var i;jr(this,n),i=t.call(this,r),i.resizableTextArea=void 0,i.focus=function(){i.resizableTextArea.textArea.focus()},i.saveTextArea=function(s){i.resizableTextArea=s},i.handleChange=function(s){var a=i.props.onChange;i.setValue(s.target.value),a&&a(s)},i.handleKeyDown=function(s){var a=i.props,u=a.onPressEnter,f=a.onKeyDown;s.keyCode===13&&u&&u(s),f&&f(s)};var o=typeof r.value>"u"||r.value===null?r.defaultValue:r.value;return i.state={value:o},i}return Hr(n,[{key:"setValue",value:function(i,o){"value"in this.props||this.setState({value:i},o)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return A(ese,{...this.props,value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea})}}],[{key:"getDerivedStateFromProps",value:function(i){return"value"in i?{value:i.value}:null}}]),n}(E.exports.Component),nse=aa("text","input");function rse(e){return!!(e.addonBefore||e.addonAfter)}var ise=function(e){si(n,e);var t=li(n);function n(){return jr(this,n),t.apply(this,arguments)}return Hr(n,[{key:"renderClearIcon",value:function(i){var o,s=this.props,a=s.value,u=s.disabled,f=s.readOnly,p=s.handleReset,g=s.suffix,v=!u&&!f&&a,b="".concat(i,"-clear-icon");return A(zh,{onClick:p,onMouseDown:function(T){return T.preventDefault()},className:je((o={},ae(o,"".concat(b,"-hidden"),!v),ae(o,"".concat(b,"-has-suffix"),!!g),o),b),role:"button"})}},{key:"renderTextAreaWithClearIcon",value:function(i,o,s){var a,u=this.props,f=u.value,p=u.allowClear,g=u.className,v=u.style,b=u.direction,_=u.bordered,T=u.hidden,I=u.status,P=s.status,M=s.hasFeedback;if(!p)return Pi(o,{value:f});var D=je("".concat(i,"-affix-wrapper"),"".concat(i,"-affix-wrapper-textarea-with-clear-btn"),Xc("".concat(i,"-affix-wrapper"),nv(P,I),M),(a={},ae(a,"".concat(i,"-affix-wrapper-rtl"),b==="rtl"),ae(a,"".concat(i,"-affix-wrapper-borderless"),!_),ae(a,"".concat(g),!rse(this.props)&&g),a));return it("span",{className:D,style:v,hidden:T,children:[Pi(o,{style:null,value:f}),this.renderClearIcon(i)]})}},{key:"render",value:function(){var i=this;return A(Rs.Consumer,{children:function(o){var s=i.props,a=s.prefixCls,u=s.inputType,f=s.element;if(u===nse[0])return i.renderTextAreaWithClearIcon(a,f,o)}})}}]),n}(E.exports.Component);const ose=ise;var ase=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function O8(e,t){return Mt(e||"").slice(0,t).join("")}function sN(e,t,n,r){var i=n;return e?i=O8(n,r):Mt(t||"").length<n.length&&Mt(n||"").length>r&&(i=t),i}var sse=E.exports.forwardRef(function(e,t){var n,r=e.prefixCls,i=e.bordered,o=i===void 0?!0:i,s=e.showCount,a=s===void 0?!1:s,u=e.maxLength,f=e.className,p=e.style,g=e.size,v=e.disabled,b=e.onCompositionStart,_=e.onCompositionEnd,T=e.onChange,I=e.status,P=ase(e,["prefixCls","bordered","showCount","maxLength","className","style","size","disabled","onCompositionStart","onCompositionEnd","onChange","status"]),M=E.exports.useContext(zn),D=M.getPrefixCls,N=M.direction,z=E.exports.useContext(Jl),$=E.exports.useContext(fu),j=v!=null?v:$,U=E.exports.useContext(Rs),q=U.status,Y=U.hasFeedback,te=U.isFormItemInput,Z=U.feedbackIcon,X=nv(q,I),J=E.exports.useRef(null),ue=E.exports.useRef(null),re=E.exports.useState(!1),se=$e(re,2),oe=se[0],he=se[1],Ce=E.exports.useRef(),Se=E.exports.useRef(0),be=Ei(P.defaultValue,{value:P.value}),Re=$e(be,2),Ie=Re[0],Me=Re[1],Ae=P.hidden,ze=function(at,He){P.value===void 0&&(Me(at),He==null||He())},Ke=Number(u)>0,Ue=function(at){he(!0),Ce.current=Ie,Se.current=at.currentTarget.selectionStart,b==null||b(at)},pt=function(at){var He;he(!1);var ut=at.currentTarget.value;if(Ke){var bt=Se.current>=u+1||Se.current===((He=Ce.current)===null||He===void 0?void 0:He.length);ut=sN(bt,Ce.current,ut,u)}ut!==Ie&&(ze(ut),KC(at.currentTarget,at,T,ut)),_==null||_(at)},gt=function(at){var He=at.target.value;if(!oe&&Ke){var ut=at.target.selectionStart>=u+1||at.target.selectionStart===He.length||!at.target.selectionStart;He=sN(ut,Ie,He,u)}ze(He),KC(at.currentTarget,at,T,He)},Ot=function(at){var He,ut,bt;ze(""),(He=J.current)===null||He===void 0||He.focus(),KC((bt=(ut=J.current)===null||ut===void 0?void 0:ut.resizableTextArea)===null||bt===void 0?void 0:bt.textArea,at,T)},qe=D("input",r);E.exports.useImperativeHandle(t,function(){var ct;return{resizableTextArea:(ct=J.current)===null||ct===void 0?void 0:ct.resizableTextArea,focus:function(He){var ut,bt;zae((bt=(ut=J.current)===null||ut===void 0?void 0:ut.resizableTextArea)===null||bt===void 0?void 0:bt.textArea,He)},blur:function(){var He;return(He=J.current)===null||He===void 0?void 0:He.blur()}}});var Ct=A(tse,{...Gi(P,["allowClear"]),disabled:j,className:je((n={},ae(n,"".concat(qe,"-borderless"),!o),ae(n,f,f&&!a),ae(n,"".concat(qe,"-sm"),z==="small"||g==="small"),ae(n,"".concat(qe,"-lg"),z==="large"||g==="large"),n),Xc(qe,X)),style:a?{resize:p==null?void 0:p.resize}:p,prefixCls:qe,onCompositionStart:Ue,onChange:gt,onCompositionEnd:pt,ref:J}),ot=Lae(Ie);!oe&&Ke&&(P.value===null||P.value===void 0)&&(ot=O8(ot,u));var vt=A(ose,{disabled:j,...P,prefixCls:qe,direction:N,inputType:"text",value:ot,element:Ct,handleReset:Ot,ref:ue,bordered:o,status:I,style:a?void 0:p});if(a||Y){var yt,Tt=Mt(ot).length,et="";return on(a)==="object"?et=a.formatter({value:ot,count:Tt,maxLength:u}):et="".concat(Tt).concat(Ke?" / ".concat(u):""),it("div",{hidden:Ae,className:je("".concat(qe,"-textarea"),(yt={},ae(yt,"".concat(qe,"-textarea-rtl"),N==="rtl"),ae(yt,"".concat(qe,"-textarea-show-count"),a),ae(yt,"".concat(qe,"-textarea-in-form-item"),te),yt),Xc("".concat(qe,"-textarea"),X,Y),f),style:p,"data-count":et,children:[vt,Y&&A("span",{className:"".concat(qe,"-textarea-suffix"),children:Z})]})}return vt});const D8=sse;var cv=$I;cv.Group=kae;cv.Search=qae;cv.TextArea=D8;cv.Password=Kae;const lse=cv;var cse={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M272.9 512l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L186.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H532c6.7 0 10.4-7.7 6.3-12.9L272.9 512zm304 0l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L490.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H836c6.7 0 10.4-7.7 6.3-12.9L576.9 512z"}}]},name:"double-left",theme:"outlined"};const use=cse;var A8=function(t,n){return A(Yn,{...me(me({},t),{},{ref:n,icon:use})})};A8.displayName="DoubleLeftOutlined";const dse=E.exports.forwardRef(A8);var fse={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M533.2 492.3L277.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H188c-6.7 0-10.4 7.7-6.3 12.9L447.1 512 181.7 851.1A7.98 7.98 0 00188 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5zm304 0L581.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H492c-6.7 0-10.4 7.7-6.3 12.9L751.1 512 485.7 851.1A7.98 7.98 0 00492 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5z"}}]},name:"double-right",theme:"outlined"};const hse=fse;var N8=function(t,n){return A(Yn,{...me(me({},t),{},{ref:n,icon:hse})})};N8.displayName="DoubleRightOutlined";const pse=E.exports.forwardRef(N8);var sm=function(t){var n,r="".concat(t.rootPrefixCls,"-item"),i=je(r,"".concat(r,"-").concat(t.page),(n={},ae(n,"".concat(r,"-active"),t.active),ae(n,"".concat(r,"-disabled"),!t.page),ae(n,t.className,!!t.className),n)),o=function(){t.onClick(t.page)},s=function(u){t.onKeyPress(u,t.onClick,t.page)};return A("li",{title:t.showTitle?t.page:null,className:i,onClick:o,onKeyPress:s,tabIndex:"0",children:t.itemRender(t.page,"page",A("a",{rel:"nofollow",children:t.page}))})};const Qu={ZERO:48,NINE:57,NUMPAD_ZERO:96,NUMPAD_NINE:105,BACKSPACE:8,DELETE:46,ENTER:13,ARROW_UP:38,ARROW_DOWN:40};var L8=function(e){si(n,e);var t=li(n);function n(){var r;jr(this,n);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return r=t.call.apply(t,[this].concat(o)),r.state={goInputText:""},r.buildOptionText=function(a){return"".concat(a," ").concat(r.props.locale.items_per_page)},r.changeSize=function(a){r.props.changeSize(Number(a))},r.handleChange=function(a){r.setState({goInputText:a.target.value})},r.handleBlur=function(a){var u=r.props,f=u.goButton,p=u.quickGo,g=u.rootPrefixCls,v=r.state.goInputText;f||v===""||(r.setState({goInputText:""}),!(a.relatedTarget&&(a.relatedTarget.className.indexOf("".concat(g,"-item-link"))>=0||a.relatedTarget.className.indexOf("".concat(g,"-item"))>=0))&&p(r.getValidValue()))},r.go=function(a){var u=r.state.goInputText;u!==""&&(a.keyCode===Qu.ENTER||a.type==="click")&&(r.setState({goInputText:""}),r.props.quickGo(r.getValidValue()))},r}return Hr(n,[{key:"getValidValue",value:function(){var i=this.state.goInputText;return!i||isNaN(i)?void 0:Number(i)}},{key:"getPageSizeOptions",value:function(){var i=this.props,o=i.pageSize,s=i.pageSizeOptions;return s.some(function(a){return a.toString()===o.toString()})?s:s.concat([o.toString()]).sort(function(a,u){var f=isNaN(Number(a))?0:Number(a),p=isNaN(Number(u))?0:Number(u);return f-p})}},{key:"render",value:function(){var i=this,o=this.props,s=o.pageSize,a=o.locale,u=o.rootPrefixCls,f=o.changeSize,p=o.quickGo,g=o.goButton,v=o.selectComponentClass,b=o.buildOptionText,_=o.selectPrefixCls,T=o.disabled,I=this.state.goInputText,P="".concat(u,"-options"),M=v,D=null,N=null,z=null;if(!f&&!p)return null;var $=this.getPageSizeOptions();if(f&&M){var j=$.map(function(U,q){return A(M.Option,{value:U.toString(),children:(b||i.buildOptionText)(U)},q)});D=A(M,{disabled:T,prefixCls:_,showSearch:!1,className:"".concat(P,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(s||$[0]).toString(),onChange:this.changeSize,getPopupContainer:function(q){return q.parentNode},"aria-label":a.page_size,defaultOpen:!1,children:j})}return p&&(g&&(z=typeof g=="boolean"?A("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:T,className:"".concat(P,"-quick-jumper-button"),children:a.jump_to_confirm}):A("span",{onClick:this.go,onKeyUp:this.go,children:g})),N=it("div",{className:"".concat(P,"-quick-jumper"),children:[a.jump_to,A("input",{disabled:T,type:"text",value:I,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur,"aria-label":a.page}),a.page,z]})),it("li",{className:"".concat(P),children:[D,N]})}}]),n}(Un.Component);L8.defaultProps={pageSizeOptions:["10","20","50","100"]};const mse={items_per_page:"\u6761/\u9875",jump_to:"\u8DF3\u81F3",jump_to_confirm:"\u786E\u5B9A",page:"\u9875",prev_page:"\u4E0A\u4E00\u9875",next_page:"\u4E0B\u4E00\u9875",prev_5:"\u5411\u524D 5 \u9875",next_5:"\u5411\u540E 5 \u9875",prev_3:"\u5411\u524D 3 \u9875",next_3:"\u5411\u540E 3 \u9875",page_size:"\u9875\u7801"};function BE(){}function lN(e){var t=Number(e);return typeof t=="number"&&!isNaN(t)&&isFinite(t)&&Math.floor(t)===t}function gse(e,t,n){return n}function _c(e,t,n){var r=typeof e>"u"?t.pageSize:e;return Math.floor((n.total-1)/r)+1}var z8=function(e){si(n,e);var t=li(n);function n(r){var i;jr(this,n),i=t.call(this,r),i.getJumpPrevPage=function(){return Math.max(1,i.state.current-(i.props.showLessItems?3:5))},i.getJumpNextPage=function(){return Math.min(_c(void 0,i.state,i.props),i.state.current+(i.props.showLessItems?3:5))},i.getItemIcon=function(f,p){var g=i.props.prefixCls,v=f||A("button",{type:"button","aria-label":p,className:"".concat(g,"-item-link")});return typeof f=="function"&&(v=Un.createElement(f,me({},i.props))),v},i.savePaginationNode=function(f){i.paginationNode=f},i.isValid=function(f){var p=i.props.total;return lN(f)&&f!==i.state.current&&lN(p)&&p>0},i.shouldDisplayQuickJumper=function(){var f=i.props,p=f.showQuickJumper,g=f.total,v=i.state.pageSize;return g<=v?!1:p},i.handleKeyDown=function(f){(f.keyCode===Qu.ARROW_UP||f.keyCode===Qu.ARROW_DOWN)&&f.preventDefault()},i.handleKeyUp=function(f){var p=i.getValidValue(f),g=i.state.currentInputValue;p!==g&&i.setState({currentInputValue:p}),f.keyCode===Qu.ENTER?i.handleChange(p):f.keyCode===Qu.ARROW_UP?i.handleChange(p-1):f.keyCode===Qu.ARROW_DOWN&&i.handleChange(p+1)},i.handleBlur=function(f){var p=i.getValidValue(f);i.handleChange(p)},i.changePageSize=function(f){var p=i.state.current,g=_c(f,i.state,i.props);p=p>g?g:p,g===0&&(p=i.state.current),typeof f=="number"&&("pageSize"in i.props||i.setState({pageSize:f}),"current"in i.props||i.setState({current:p,currentInputValue:p})),i.props.onShowSizeChange(p,f),"onChange"in i.props&&i.props.onChange&&i.props.onChange(p,f)},i.handleChange=function(f){var p=i.props,g=p.disabled,v=p.onChange,b=i.state,_=b.pageSize,T=b.current,I=b.currentInputValue;if(i.isValid(f)&&!g){var P=_c(void 0,i.state,i.props),M=f;return f>P?M=P:f<1&&(M=1),"current"in i.props||i.setState({current:M}),M!==I&&i.setState({currentInputValue:M}),v(M,_),M}return T},i.prev=function(){i.hasPrev()&&i.handleChange(i.state.current-1)},i.next=function(){i.hasNext()&&i.handleChange(i.state.current+1)},i.jumpPrev=function(){i.handleChange(i.getJumpPrevPage())},i.jumpNext=function(){i.handleChange(i.getJumpNextPage())},i.hasPrev=function(){return i.state.current>1},i.hasNext=function(){return i.state.current<_c(void 0,i.state,i.props)},i.runIfEnter=function(f,p){if(f.key==="Enter"||f.charCode===13){for(var g=arguments.length,v=new Array(g>2?g-2:0),b=2;b<g;b++)v[b-2]=arguments[b];p.apply(void 0,v)}},i.runIfEnterPrev=function(f){i.runIfEnter(f,i.prev)},i.runIfEnterNext=function(f){i.runIfEnter(f,i.next)},i.runIfEnterJumpPrev=function(f){i.runIfEnter(f,i.jumpPrev)},i.runIfEnterJumpNext=function(f){i.runIfEnter(f,i.jumpNext)},i.handleGoTO=function(f){(f.keyCode===Qu.ENTER||f.type==="click")&&i.handleChange(i.state.currentInputValue)};var o=r.onChange!==BE,s="current"in r;s&&!o&&console.warn("Warning: You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.");var a=r.defaultCurrent;"current"in r&&(a=r.current);var u=r.defaultPageSize;return"pageSize"in r&&(u=r.pageSize),a=Math.min(a,_c(u,void 0,r)),i.state={current:a,currentInputValue:a,pageSize:u},i}return Hr(n,[{key:"componentDidUpdate",value:function(i,o){var s=this.props.prefixCls;if(o.current!==this.state.current&&this.paginationNode){var a=this.paginationNode.querySelector(".".concat(s,"-item-").concat(o.current));a&&document.activeElement===a&&a.blur()}}},{key:"getValidValue",value:function(i){var o=i.target.value,s=_c(void 0,this.state,this.props),a=this.state.currentInputValue,u;return o===""?u=o:isNaN(Number(o))?u=a:o>=s?u=s:u=Number(o),u}},{key:"getShowSizeChanger",value:function(){var i=this.props,o=i.showSizeChanger,s=i.total,a=i.totalBoundaryShowSizeChanger;return typeof o<"u"?o:s>a}},{key:"renderPrev",value:function(i){var o=this.props,s=o.prevIcon,a=o.itemRender,u=a(i,"prev",this.getItemIcon(s,"prev page")),f=!this.hasPrev();return E.exports.isValidElement(u)?E.exports.cloneElement(u,{disabled:f}):u}},{key:"renderNext",value:function(i){var o=this.props,s=o.nextIcon,a=o.itemRender,u=a(i,"next",this.getItemIcon(s,"next page")),f=!this.hasNext();return E.exports.isValidElement(u)?E.exports.cloneElement(u,{disabled:f}):u}},{key:"render",value:function(){var i=this,o=this.props,s=o.prefixCls,a=o.className,u=o.style,f=o.disabled,p=o.hideOnSinglePage,g=o.total,v=o.locale,b=o.showQuickJumper,_=o.showLessItems,T=o.showTitle,I=o.showTotal,P=o.simple,M=o.itemRender,D=o.showPrevNextJumpers,N=o.jumpPrevIcon,z=o.jumpNextIcon,$=o.selectComponentClass,j=o.selectPrefixCls,U=o.pageSizeOptions,q=this.state,Y=q.current,te=q.pageSize,Z=q.currentInputValue;if(p===!0&&g<=te)return null;var X=_c(void 0,this.state,this.props),J=[],ue=null,re=null,se=null,oe=null,he=null,Ce=b&&b.goButton,Se=_?1:2,be=Y-1>0?Y-1:0,Re=Y+1<X?Y+1:X,Ie=Object.keys(this.props).reduce(function(yt,Tt){return(Tt.substr(0,5)==="data-"||Tt.substr(0,5)==="aria-"||Tt==="role")&&(yt[Tt]=i.props[Tt]),yt},{}),Me=I&&A("li",{className:"".concat(s,"-total-text"),children:I(g,[g===0?0:(Y-1)*te+1,Y*te>g?g:Y*te])});if(P)return Ce&&(typeof Ce=="boolean"?he=A("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO,children:v.jump_to_confirm}):he=A("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO,children:Ce}),he=A("li",{title:T?"".concat(v.jump_to).concat(Y,"/").concat(X):null,className:"".concat(s,"-simple-pager"),children:he})),it("ul",{className:je(s,"".concat(s,"-simple"),ae({},"".concat(s,"-disabled"),f),a),style:u,ref:this.savePaginationNode,...Ie,children:[Me,A("li",{title:T?v.prev_page:null,onClick:this.prev,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterPrev,className:je("".concat(s,"-prev"),ae({},"".concat(s,"-disabled"),!this.hasPrev())),"aria-disabled":!this.hasPrev(),children:this.renderPrev(be)}),it("li",{title:T?"".concat(Y,"/").concat(X):null,className:"".concat(s,"-simple-pager"),children:[A("input",{type:"text",value:Z,disabled:f,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,onBlur:this.handleBlur,size:"3"}),A("span",{className:"".concat(s,"-slash"),children:"/"}),X]}),A("li",{title:T?v.next_page:null,onClick:this.next,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterNext,className:je("".concat(s,"-next"),ae({},"".concat(s,"-disabled"),!this.hasNext())),"aria-disabled":!this.hasNext(),children:this.renderNext(Re)}),he]});if(X<=3+Se*2){var Ae={locale:v,rootPrefixCls:s,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:T,itemRender:M};X||J.push(E.exports.createElement(sm,{...Ae,key:"noPager",page:1,className:"".concat(s,"-item-disabled")}));for(var ze=1;ze<=X;ze+=1){var Ke=Y===ze;J.push(E.exports.createElement(sm,{...Ae,key:ze,page:ze,active:Ke}))}}else{var Ue=_?v.prev_3:v.prev_5,pt=_?v.next_3:v.next_5;D&&(ue=A("li",{title:T?Ue:null,onClick:this.jumpPrev,tabIndex:"0",onKeyPress:this.runIfEnterJumpPrev,className:je("".concat(s,"-jump-prev"),ae({},"".concat(s,"-jump-prev-custom-icon"),!!N)),children:M(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(N,"prev page"))},"prev"),re=A("li",{title:T?pt:null,tabIndex:"0",onClick:this.jumpNext,onKeyPress:this.runIfEnterJumpNext,className:je("".concat(s,"-jump-next"),ae({},"".concat(s,"-jump-next-custom-icon"),!!z)),children:M(this.getJumpNextPage(),"jump-next",this.getItemIcon(z,"next page"))},"next")),oe=A(sm,{locale:v,last:!0,rootPrefixCls:s,onClick:this.handleChange,onKeyPress:this.runIfEnter,page:X,active:!1,showTitle:T,itemRender:M},X),se=A(sm,{locale:v,rootPrefixCls:s,onClick:this.handleChange,onKeyPress:this.runIfEnter,page:1,active:!1,showTitle:T,itemRender:M},1);var gt=Math.max(1,Y-Se),Ot=Math.min(Y+Se,X);Y-1<=Se&&(Ot=1+Se*2),X-Y<=Se&&(gt=X-Se*2);for(var qe=gt;qe<=Ot;qe+=1){var Ct=Y===qe;J.push(A(sm,{locale:v,rootPrefixCls:s,onClick:this.handleChange,onKeyPress:this.runIfEnter,page:qe,active:Ct,showTitle:T,itemRender:M},qe))}Y-1>=Se*2&&Y!==1+2&&(J[0]=E.exports.cloneElement(J[0],{className:"".concat(s,"-item-after-jump-prev")}),J.unshift(ue)),X-Y>=Se*2&&Y!==X-2&&(J[J.length-1]=E.exports.cloneElement(J[J.length-1],{className:"".concat(s,"-item-before-jump-next")}),J.push(re)),gt!==1&&J.unshift(se),Ot!==X&&J.push(oe)}var ot=!this.hasPrev()||!X,vt=!this.hasNext()||!X;return it("ul",{className:je(s,a,ae({},"".concat(s,"-disabled"),f)),style:u,ref:this.savePaginationNode,...Ie,children:[Me,A("li",{title:T?v.prev_page:null,onClick:this.prev,tabIndex:ot?null:0,onKeyPress:this.runIfEnterPrev,className:je("".concat(s,"-prev"),ae({},"".concat(s,"-disabled"),ot)),"aria-disabled":ot,children:this.renderPrev(be)}),J,A("li",{title:T?v.next_page:null,onClick:this.next,tabIndex:vt?null:0,onKeyPress:this.runIfEnterNext,className:je("".concat(s,"-next"),ae({},"".concat(s,"-disabled"),vt)),"aria-disabled":vt,children:this.renderNext(Re)}),A(L8,{disabled:f,locale:v,rootPrefixCls:s,selectComponentClass:$,selectPrefixCls:j,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:Y,pageSize:te,pageSizeOptions:U,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:Ce})]})}}],[{key:"getDerivedStateFromProps",value:function(i,o){var s={};if("current"in i&&(s.current=i.current,i.current!==o.current&&(s.currentInputValue=s.current)),"pageSize"in i&&i.pageSize!==o.pageSize){var a=o.current,u=_c(i.pageSize,o,i);a=a>u?u:a,"current"in i||(s.current=a,s.currentInputValue=a),s.pageSize=i.pageSize}return s}}]),n}(Un.Component);z8.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:BE,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:BE,locale:mse,style:{},itemRender:gse,totalBoundaryShowSizeChanger:50};var F8=function(t){return A(Vd,{...t,size:"small"})},$8=function(t){return A(Vd,{...t,size:"middle"})};F8.Option=Vd.Option;$8.Option=Vd.Option;var vse=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},yse=function(t){var n=t.prefixCls,r=t.selectPrefixCls,i=t.className,o=t.size,s=t.locale,a=t.selectComponentClass,u=t.responsive,f=t.showSizeChanger,p=vse(t,["prefixCls","selectPrefixCls","className","size","locale","selectComponentClass","responsive","showSizeChanger"]),g=wB(u),v=g.xs,b=E.exports.useContext(zn),_=b.getPrefixCls,T=b.direction,I=b.pagination,P=I===void 0?{}:I,M=_("pagination",n),D=f!=null?f:P.showSizeChanger,N=function(){var $=A("span",{className:"".concat(M,"-item-ellipsis"),children:"\u2022\u2022\u2022"}),j=A("button",{className:"".concat(M,"-item-link"),type:"button",tabIndex:-1,children:A(VB,{})}),U=A("button",{className:"".concat(M,"-item-link"),type:"button",tabIndex:-1,children:A(Z_,{})}),q=A("a",{className:"".concat(M,"-item-link"),children:it("div",{className:"".concat(M,"-item-container"),children:[A(dse,{className:"".concat(M,"-item-link-icon")}),$]})}),Y=A("a",{className:"".concat(M,"-item-link"),children:it("div",{className:"".concat(M,"-item-container"),children:[A(pse,{className:"".concat(M,"-item-link-icon")}),$]})});if(T==="rtl"){var te=[U,j];j=te[0],U=te[1];var Z=[Y,q];q=Z[0],Y=Z[1]}return{prevIcon:j,nextIcon:U,jumpPrevIcon:q,jumpNextIcon:Y}};return A(Lh,{componentName:"Pagination",defaultLocale:x6,children:function(z){var $,j=Je(Je({},z),s),U=o==="small"||!!(v&&!o&&u),q=_("select",r),Y=je(($={},ae($,"".concat(M,"-mini"),U),ae($,"".concat(M,"-rtl"),T==="rtl"),$),i);return A(z8,{...N(),...p,prefixCls:M,selectPrefixCls:q,className:Y,selectComponentClass:a||(U?F8:$8),locale:j,showSizeChanger:D})}})};const xse=yse;var bse=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};aa("small","default","large");var d0=null;function _se(e,t){var n=t.indicator,r="".concat(e,"-dot");return n===null?null:Ta(n)?Pi(n,{className:je(n.props.className,r)}):Ta(d0)?Pi(d0,{className:je(d0.props.className,r)}):it("span",{className:je(r,"".concat(e,"-dot-spin")),children:[A("i",{className:"".concat(e,"-dot-item")}),A("i",{className:"".concat(e,"-dot-item")}),A("i",{className:"".concat(e,"-dot-item")}),A("i",{className:"".concat(e,"-dot-item")})]})}function wse(e,t){return!!e&&!!t&&!isNaN(Number(t))}var Cse=function(t){var n=t.spinPrefixCls,r=t.spinning,i=r===void 0?!0:r,o=t.delay,s=t.className,a=t.size,u=a===void 0?"default":a,f=t.tip,p=t.wrapperClassName,g=t.style,v=t.children,b=bse(t,["spinPrefixCls","spinning","delay","className","size","tip","wrapperClassName","style","children"]),_=E.exports.useState(function(){return i&&!wse(i,o)}),T=$e(_,2),I=T[0],P=T[1];E.exports.useEffect(function(){var N=soe(function(){P(i)},o);return N(),function(){var z;(z=N==null?void 0:N.cancel)===null||z===void 0||z.call(N)}},[o,i]);var M=function(){return typeof v<"u"},D=function(z){var $,j=z.direction,U=je(n,($={},ae($,"".concat(n,"-sm"),u==="small"),ae($,"".concat(n,"-lg"),u==="large"),ae($,"".concat(n,"-spinning"),I),ae($,"".concat(n,"-show-text"),!!f),ae($,"".concat(n,"-rtl"),j==="rtl"),$),s),q=Gi(b,["indicator","prefixCls"]),Y=it("div",{...q,style:g,className:U,"aria-live":"polite","aria-busy":I,children:[_se(n,t),f?A("div",{className:"".concat(n,"-text"),children:f}):null]});if(M()){var te=je("".concat(n,"-container"),ae({},"".concat(n,"-blur"),I));return it("div",{...q,className:je("".concat(n,"-nested-loading"),p),children:[I&&A("div",{children:Y},"loading"),A("div",{className:te,children:v},"container")]})}return Y};return A(Bd,{children:D})},B8=function(t){var n=t.prefixCls,r=E.exports.useContext(zn),i=r.getPrefixCls,o=i("spin",n),s=Je(Je({},t),{spinPrefixCls:o});return A(Cse,{...s})};B8.setDefaultIndicator=function(e){d0=e};const uv=B8;function cN(e){return!!(e&&!!e.then)}var Sse=function(t){var n=E.exports.useRef(!1),r=E.exports.useRef(null),i=Ul(!1),o=$e(i,2),s=o[0],a=o[1],u=t.close,f=function(){u==null||u.apply(void 0,arguments)};E.exports.useEffect(function(){var I=null;return t.autoFocus&&(I=setTimeout(function(){var P;(P=r.current)===null||P===void 0||P.focus()})),function(){I&&clearTimeout(I)}},[]);var p=function(P){!cN(P)||(a(!0),P.then(function(){a(!1,!0),f.apply(void 0,arguments),n.current=!1},function(M){console.error(M),a(!1,!0),n.current=!1}))},g=function(P){var M=t.actionFn;if(!n.current){if(n.current=!0,!M){f();return}var D;if(t.emitEvent){if(D=M(P),t.quitOnNullishReturnValue&&!cN(D)){n.current=!1,f(P);return}}else if(M.length)D=M(u),n.current=!1;else if(D=M(),!D){f();return}p(D)}},v=t.type,b=t.children,_=t.prefixCls,T=t.buttonProps;return A(Yr,{...XB(v),onClick:g,loading:s,prefixCls:_,...T,ref:r,children:b})};const uN=Sse;var Ese=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},VE,Pse=function(t){VE={x:t.pageX,y:t.pageY},setTimeout(function(){VE=null},100)};QB()&&document.documentElement.addEventListener("click",Pse,!0);var Tse=function(t){var n,r,i=E.exports.useContext(zn),o=i.getPopupContainer,s=i.getPrefixCls,a=i.direction,u=function(J){var ue=t.onCancel;ue==null||ue(J)},f=function(J){var ue=t.onOk;ue==null||ue(J)},p=t.prefixCls,g=t.footer,v=t.visible,b=t.open,_=b===void 0?!1:b,T=t.wrapClassName,I=t.centered,P=t.getContainer,M=t.closeIcon,D=t.focusTriggerAfterClose,N=D===void 0?!0:D,z=t.width,$=z===void 0?520:z,j=Ese(t,["prefixCls","footer","visible","open","wrapClassName","centered","getContainer","closeIcon","focusTriggerAfterClose","width"]),U=s("modal",p),q=s(),Y=A(Lh,{componentName:"Modal",defaultLocale:_6(),children:function(X){var J=t.okText,ue=t.okType,re=ue===void 0?"primary":ue,se=t.cancelText,oe=t.confirmLoading,he=oe===void 0?!1:oe;return it(nr,{children:[A(Yr,{onClick:u,...t.cancelButtonProps,children:se||X.cancelText}),A(Yr,{...XB(re),loading:he,onClick:f,...t.okButtonProps,children:J!=null?J:X.okText})]})}}),te=A("span",{className:"".concat(U,"-close-x"),children:M||A(Fh,{className:"".concat(U,"-close-icon")})}),Z=je(T,(n={},ae(n,"".concat(U,"-centered"),!!I),ae(n,"".concat(U,"-wrap-rtl"),a==="rtl"),n));return A(fb,{children:A(kE,{status:!0,override:!0,children:A(zI,{width:$,...j,getContainer:P===void 0?o:P,prefixCls:U,wrapClassName:Z,footer:g===void 0?Y:g,visible:_||v,mousePosition:(r=j.mousePosition)!==null&&r!==void 0?r:VE,onClose:u,closeIcon:te,focusTriggerAfterClose:N,transitionName:Ia(q,"zoom",t.transitionName),maskTransitionName:Ia(q,"fade",t.maskTransitionName)})})})};const V8=Tse;var Ise=function(t){var n=t.icon,r=t.onCancel,i=t.onOk,o=t.close,s=t.zIndex,a=t.afterClose,u=t.visible,f=t.open,p=t.keyboard,g=t.centered,v=t.getContainer,b=t.maskStyle,_=t.okText,T=t.okButtonProps,I=t.cancelText,P=t.cancelButtonProps,M=t.direction,D=t.prefixCls,N=t.wrapClassName,z=t.rootPrefixCls,$=t.iconPrefixCls,j=t.bodyStyle,U=t.closable,q=U===void 0?!1:U,Y=t.closeIcon,te=t.modalRender,Z=t.focusTriggerAfterClose,X=t.okType||"primary",J="".concat(D,"-confirm"),ue="okCancel"in t?t.okCancel:!0,re=t.width||416,se=t.style||{},oe=t.mask===void 0?!0:t.mask,he=t.maskClosable===void 0?!1:t.maskClosable,Ce=t.autoFocusButton===null?!1:t.autoFocusButton||"ok",Se=je(J,"".concat(J,"-").concat(t.type),ae({},"".concat(J,"-rtl"),M==="rtl"),t.className),be=ue&&A(uN,{actionFn:r,close:o,autoFocus:Ce==="cancel",buttonProps:P,prefixCls:"".concat(z,"-btn"),children:I});return A($h,{prefixCls:z,iconPrefixCls:$,direction:M,children:A(V8,{prefixCls:D,className:Se,wrapClassName:je(ae({},"".concat(J,"-centered"),!!t.centered),N),onCancel:function(){return o==null?void 0:o({triggerCancel:!0})},open:f||u,title:"",footer:"",transitionName:Ia(z,"zoom",t.transitionName),maskTransitionName:Ia(z,"fade",t.maskTransitionName),mask:oe,maskClosable:he,maskStyle:b,style:se,bodyStyle:j,width:re,zIndex:s,afterClose:a,keyboard:p,centered:g,getContainer:v,closable:q,closeIcon:Y,modalRender:te,focusTriggerAfterClose:Z,children:it("div",{className:"".concat(J,"-body-wrapper"),children:[it("div",{className:"".concat(J,"-body"),children:[n,t.title===void 0?null:A("span",{className:"".concat(J,"-title"),children:t.title}),A("div",{className:"".concat(J,"-content"),children:t.content})]}),it("div",{className:"".concat(J,"-btns"),children:[be,A(uN,{type:X,actionFn:i,close:o,autoFocus:Ce==="ok",buttonProps:T,prefixCls:"".concat(z,"-btn"),children:_})]})]})})})};const U8=Ise;var kse=[];const Kf=kse;var Mse=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},j8="";function Rse(){return j8}function dv(e){var t=document.createDocumentFragment(),n=Je(Je({},e),{close:s,open:!0}),r;function i(){for(var u=arguments.length,f=new Array(u),p=0;p<u;p++)f[p]=arguments[p];var g=f.some(function(_){return _&&_.triggerCancel});e.onCancel&&g&&e.onCancel.apply(e,[function(){}].concat(Mt(f.slice(1))));for(var v=0;v<Kf.length;v++){var b=Kf[v];if(b===s){Kf.splice(v,1);break}}V6(t)}function o(u){var f=u.okText,p=u.cancelText,g=u.prefixCls,v=Mse(u,["okText","cancelText","prefixCls"]);clearTimeout(r),r=setTimeout(function(){var b=_6(),_=iI(),T=_.getPrefixCls,I=_.getIconPrefixCls,P=T(void 0,Rse()),M=g||"".concat(P,"-modal"),D=I();B6(A(U8,{...v,prefixCls:M,rootPrefixCls:P,iconPrefixCls:D,okText:f||(v.okCancel?b.okText:b.justOkText),cancelText:p||b.cancelText}),t)})}function s(){for(var u=this,f=arguments.length,p=new Array(f),g=0;g<f;g++)p[g]=arguments[g];n=Je(Je({},n),{open:!1,afterClose:function(){typeof e.afterClose=="function"&&e.afterClose(),i.apply(u,p)}}),n.visible&&delete n.visible,o(n)}function a(u){typeof u=="function"?n=u(n):n=Je(Je({},n),u),o(n)}return o(n),Kf.push(s),{destroy:s,update:a}}function H8(e){return Je(Je({icon:A($_,{}),okCancel:!1},e),{type:"warning"})}function K8(e){return Je(Je({icon:A(rI,{}),okCancel:!1},e),{type:"info"})}function W8(e){return Je(Je({icon:A(tI,{}),okCancel:!1},e),{type:"success"})}function G8(e){return Je(Je({icon:A(nI,{}),okCancel:!1},e),{type:"error"})}function q8(e){return Je(Je({icon:A($_,{}),okCancel:!0},e),{type:"confirm"})}function Ose(e){var t=e.rootPrefixCls;j8=t}function Dse(){var e=E.exports.useState([]),t=$e(e,2),n=t[0],r=t[1],i=E.exports.useCallback(function(o){return r(function(s){return[].concat(Mt(s),[o])}),function(){r(function(s){return s.filter(function(a){return a!==o})})}},[]);return[n,i]}var Ase=function(t,n){var r=t.afterClose,i=t.config,o=E.exports.useState(!0),s=$e(o,2),a=s[0],u=s[1],f=E.exports.useState(i),p=$e(f,2),g=p[0],v=p[1],b=E.exports.useContext(zn),_=b.direction,T=b.getPrefixCls,I=T("modal"),P=T(),M=function(){u(!1);for(var N=arguments.length,z=new Array(N),$=0;$<N;$++)z[$]=arguments[$];var j=z.some(function(U){return U&&U.triggerCancel});g.onCancel&&j&&g.onCancel.apply(g,[function(){}].concat(Mt(z.slice(1))))};return E.exports.useImperativeHandle(n,function(){return{destroy:M,update:function(N){v(function(z){return Je(Je({},z),N)})}}}),A(Lh,{componentName:"Modal",defaultLocale:Ms.Modal,children:function(D){return A(U8,{prefixCls:I,rootPrefixCls:P,...g,close:M,open:a,afterClose:r,okText:g.okText||(g.okCancel?D.okText:D.justOkText),direction:_,cancelText:g.cancelText||D.cancelText})}})};const Nse=E.exports.forwardRef(Ase);var dN=0,Lse=E.exports.memo(E.exports.forwardRef(function(e,t){var n=Dse(),r=$e(n,2),i=r[0],o=r[1];return E.exports.useImperativeHandle(t,function(){return{patchElement:o}},[]),A(nr,{children:i})}));function zse(){var e=E.exports.useRef(null),t=E.exports.useState([]),n=$e(t,2),r=n[0],i=n[1];E.exports.useEffect(function(){if(r.length){var a=Mt(r);a.forEach(function(u){u()}),i([])}},[r]);var o=E.exports.useCallback(function(a){return function(f){var p;dN+=1;var g=E.exports.createRef(),v,b=A(Nse,{config:a(f),ref:g,afterClose:function(){v==null||v()}},"modal-".concat(dN));return v=(p=e.current)===null||p===void 0?void 0:p.patchElement(b),{destroy:function(){function T(){var I;(I=g.current)===null||I===void 0||I.destroy()}g.current?T():i(function(I){return[].concat(Mt(I),[T])})},update:function(T){function I(){var P;(P=g.current)===null||P===void 0||P.update(T)}g.current?I():i(function(P){return[].concat(Mt(P),[I])})}}}},[]),s=E.exports.useMemo(function(){return{info:o(K8),success:o(W8),error:o(G8),warning:o(H8),confirm:o(q8)}},[]);return[s,A(Lse,{ref:e})]}function Z8(e){return dv(H8(e))}var ll=V8;ll.useModal=zse;ll.info=function(t){return dv(K8(t))};ll.success=function(t){return dv(W8(t))};ll.error=function(t){return dv(G8(t))};ll.warning=Z8;ll.warn=Z8;ll.confirm=function(t){return dv(q8(t))};ll.destroyAll=function(){for(;Kf.length;){var t=Kf.pop();t&&t()}};ll.config=Ose;const X8=ll;var Fse=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},$se={border:0,background:"transparent",padding:0,lineHeight:"inherit",display:"inline-block"},Bse=E.exports.forwardRef(function(e,t){var n=function(p){var g=p.keyCode;g===Pt.ENTER&&p.preventDefault()},r=function(p){var g=p.keyCode,v=e.onClick;g===Pt.ENTER&&v&&v()},i=e.style,o=e.noStyle,s=e.disabled,a=Fse(e,["style","noStyle","disabled"]),u={};return o||(u=Je({},$se)),s&&(u.pointerEvents="none"),u=Je(Je({},u),i),A("div",{role:"button",tabIndex:0,ref:t,...a,onKeyDown:n,onKeyUp:r,style:u})});const fN=Bse;var Vse={className:"",percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,style:{},trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},Use=function(){var t=E.exports.useRef([]),n=E.exports.useRef(null);return E.exports.useEffect(function(){var r=Date.now(),i=!1;t.current.forEach(function(o){if(!!o){i=!0;var s=o.style;s.transitionDuration=".3s, .3s, .3s, .06s",n.current&&r-n.current<100&&(s.transitionDuration="0s, 0s")}}),i&&(n.current=Date.now())}),t.current},hN=0,jse=To();function Hse(){var e;return jse?(e=hN,hN+=1):e="TEST_OR_SSR",e}const Kse=function(e){var t=E.exports.useState(),n=$e(t,2),r=n[0],i=n[1];return E.exports.useEffect(function(){i("rc_progress_".concat(Hse()))},[]),e||r};var Wse=["id","prefixCls","steps","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function pN(e){return+e.replace("%","")}function mN(e){var t=e!=null?e:[];return Array.isArray(t)?t:[t]}var lm=100,XC=function(t,n,r,i,o,s,a,u,f,p){var g=arguments.length>10&&arguments[10]!==void 0?arguments[10]:0,v=r/100*360*((360-s)/360),b=s===0?0:{bottom:0,top:180,left:90,right:-90}[a],_=(100-i)/100*n;return f==="round"&&i!==100&&(_+=p/2,_>=n&&(_=n-.01)),{stroke:typeof u=="string"?u:void 0,strokeDasharray:"".concat(n,"px ").concat(t),strokeDashoffset:_+g,transform:"rotate(".concat(o+v+b,"deg)"),transformOrigin:"0 0",transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s",fillOpacity:0}},BI=function(t){var n=t.id,r=t.prefixCls,i=t.steps,o=t.strokeWidth,s=t.trailWidth,a=t.gapDegree,u=a===void 0?0:a,f=t.gapPosition,p=t.trailColor,g=t.strokeLinecap,v=t.style,b=t.className,_=t.strokeColor,T=t.percent,I=kn(t,Wse),P=Kse(n),M="".concat(P,"-gradient"),D=lm/2-o/2,N=Math.PI*2*D,z=u>0?90+u/2:-90,$=N*((360-u)/360),j=on(i)==="object"?i:{count:i,space:2},U=j.count,q=j.space,Y=XC(N,$,0,100,z,u,f,p,g,o),te=mN(T),Z=mN(_),X=Z.find(function(se){return se&&on(se)==="object"}),J=Use(),ue=function(){var oe=0;return te.map(function(he,Ce){var Se=Z[Ce]||Z[Z.length-1],be=Se&&on(Se)==="object"?"url(#".concat(M,")"):void 0,Re=XC(N,$,oe,he,z,u,f,Se,g,o);return oe+=he,A("circle",{className:"".concat(r,"-circle-path"),r:D,cx:0,cy:0,stroke:be,strokeLinecap:g,strokeWidth:o,opacity:he===0?0:1,style:Re,ref:function(Me){J[Ce]=Me}},Ce)}).reverse()},re=function(){var oe=Math.round(U*(te[0]/100)),he=100/U,Ce=0;return new Array(U).fill(null).map(function(Se,be){var Re=be<=oe-1?Z[0]:p,Ie=Re&&on(Re)==="object"?"url(#".concat(M,")"):void 0,Me=XC(N,$,Ce,he,z,u,f,Re,"butt",o,q);return Ce+=($-Me.strokeDashoffset+q)*100/$,A("circle",{className:"".concat(r,"-circle-path"),r:D,cx:0,cy:0,stroke:Ie,strokeWidth:o,opacity:1,style:Me,ref:function(ze){J[be]=ze}},be)})};return it("svg",{className:je("".concat(r,"-circle"),b),viewBox:"".concat(-lm/2," ").concat(-lm/2," ").concat(lm," ").concat(lm),style:v,id:n,role:"presentation",...I,children:[X&&A("defs",{children:A("linearGradient",{id:M,x1:"100%",y1:"0%",x2:"0%",y2:"0%",children:Object.keys(X).sort(function(se,oe){return pN(se)-pN(oe)}).map(function(se,oe){return A("stop",{offset:se,stopColor:X[se]},oe)})})}),!U&&A("circle",{className:"".concat(r,"-circle-trail"),r:D,cx:0,cy:0,stroke:p,strokeLinecap:g,strokeWidth:s||o,style:Y}),U?re():ue()]})};BI.defaultProps=Vse;BI.displayName="Circle";function xd(e){return!e||e<0?0:e>100?100:e}function Cb(e){var t=e.success,n=e.successPercent,r=n;return t&&"progress"in t&&(r=t.progress),t&&"percent"in t&&(r=t.percent),r}function Gse(e){var t=e.percent,n=e.success,r=e.successPercent,i=xd(Cb({success:n,successPercent:r}));return[i,xd(xd(t)-i)]}function qse(e){var t=e.success,n=t===void 0?{}:t,r=e.strokeColor,i=n.strokeColor;return[i||eh.green,r||null]}var Zse=function(t){var n=t.prefixCls,r=t.width,i=t.strokeWidth,o=t.trailColor,s=o===void 0?null:o,a=t.strokeLinecap,u=a===void 0?"round":a,f=t.gapPosition,p=t.gapDegree,g=t.type,v=t.children,b=t.success,_=r||120,T={width:_,height:_,fontSize:_*.15+6},I=i||6,P=f||g==="dashboard"&&"bottom"||void 0,M=function(){if(p||p===0)return p;if(g==="dashboard")return 75},D=Object.prototype.toString.call(t.strokeColor)==="[object Object]",N=qse({success:b,strokeColor:t.strokeColor}),z=je("".concat(n,"-inner"),ae({},"".concat(n,"-circle-gradient"),D));return it("div",{className:z,style:T,children:[A(BI,{percent:Gse(t),strokeWidth:I,trailWidth:I,strokeColor:N,strokeLinecap:u,trailColor:s,prefixCls:n,gapDegree:M(),gapPosition:P}),v]})};const Xse=Zse;var Yse=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},Qse=function(t){var n=[];return Object.keys(t).forEach(function(r){var i=parseFloat(r.replace(/%/g,""));isNaN(i)||n.push({key:i,value:t[r]})}),n=n.sort(function(r,i){return r.key-i.key}),n.map(function(r){var i=r.key,o=r.value;return"".concat(o," ").concat(i,"%")}).join(", ")},Jse=function(t,n){var r=t.from,i=r===void 0?eh.blue:r,o=t.to,s=o===void 0?eh.blue:o,a=t.direction,u=a===void 0?n==="rtl"?"to left":"to right":a,f=Yse(t,["from","to","direction"]);if(Object.keys(f).length!==0){var p=Qse(f);return{backgroundImage:"linear-gradient(".concat(u,", ").concat(p,")")}}return{backgroundImage:"linear-gradient(".concat(u,", ").concat(i,", ").concat(s,")")}},ele=function(t){var n=t.prefixCls,r=t.direction,i=t.percent,o=t.strokeWidth,s=t.size,a=t.strokeColor,u=t.strokeLinecap,f=u===void 0?"round":u,p=t.children,g=t.trailColor,v=g===void 0?null:g,b=t.success,_=a&&typeof a!="string"?Jse(a,r):{background:a},T=f==="square"||f==="butt"?0:void 0,I={backgroundColor:v||void 0,borderRadius:T},P=Je({width:"".concat(xd(i),"%"),height:o||(s==="small"?6:8),borderRadius:T},_),M=Cb(t),D={width:"".concat(xd(M),"%"),height:o||(s==="small"?6:8),borderRadius:T,backgroundColor:b==null?void 0:b.strokeColor},N=M!==void 0?A("div",{className:"".concat(n,"-success-bg"),style:D}):null;return it(nr,{children:[A("div",{className:"".concat(n,"-outer"),children:it("div",{className:"".concat(n,"-inner"),style:I,children:[A("div",{className:"".concat(n,"-bg"),style:P}),N]})}),p]})};const tle=ele;var nle=function(t){for(var n=t.size,r=t.steps,i=t.percent,o=i===void 0?0:i,s=t.strokeWidth,a=s===void 0?8:s,u=t.strokeColor,f=t.trailColor,p=f===void 0?null:f,g=t.prefixCls,v=t.children,b=Math.round(r*(o/100)),_=n==="small"?2:14,T=new Array(r),I=0;I<r;I++){var P=Array.isArray(u)?u[I]:u;T[I]=A("div",{className:je("".concat(g,"-steps-item"),ae({},"".concat(g,"-steps-item-active"),I<=b-1)),style:{backgroundColor:I<=b-1?P:p,width:_,height:a}},I)}return it("div",{className:"".concat(g,"-steps-outer"),children:[T,v]})};const rle=nle;var ile=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};aa("line","circle","dashboard");var ole=aa("normal","exception","active","success"),ale=function(t){var n,r=t.prefixCls,i=t.className,o=t.steps,s=t.strokeColor,a=t.percent,u=a===void 0?0:a,f=t.size,p=f===void 0?"default":f,g=t.showInfo,v=g===void 0?!0:g,b=t.type,_=b===void 0?"line":b,T=ile(t,["prefixCls","className","steps","strokeColor","percent","size","showInfo","type"]);function I(){var X=Cb(t);return parseInt(X!==void 0?X.toString():u.toString(),10)}function P(){var X=t.status;return!ole.includes(X)&&I()>=100?"success":X||"normal"}function M(X,J){var ue=t.format,re=Cb(t);if(!v)return null;var se,oe=ue||function(Ce){return"".concat(Ce,"%")},he=_==="line";return ue||J!=="exception"&&J!=="success"?se=oe(xd(u),xd(re)):J==="exception"?se=he?A(zh,{}):A(Fh,{}):J==="success"&&(se=he?A(XT,{}):A(xI,{})),A("span",{className:"".concat(X,"-text"),title:typeof se=="string"?se:void 0,children:se})}var D=E.exports.useContext(zn),N=D.getPrefixCls,z=D.direction,$=N("progress",r),j=P(),U=M($,j),q=Array.isArray(s)?s[0]:s,Y=typeof s=="string"||Array.isArray(s)?s:void 0,te;_==="line"?te=o?A(rle,{...t,strokeColor:Y,prefixCls:$,steps:o,children:U}):A(tle,{...t,strokeColor:q,prefixCls:$,direction:z,children:U}):(_==="circle"||_==="dashboard")&&(te=A(Xse,{...t,strokeColor:q,prefixCls:$,progressStatus:j,children:U}));var Z=je($,(n={},ae(n,"".concat($,"-").concat(_==="dashboard"&&"circle"||o&&"steps"||_),!0),ae(n,"".concat($,"-status-").concat(j),!0),ae(n,"".concat($,"-show-info"),v),ae(n,"".concat($,"-").concat(p),p),ae(n,"".concat($,"-rtl"),z==="rtl"),n),i);return A("div",{...Gi(T,["status","format","trailColor","strokeWidth","width","gapDegree","gapPosition","strokeLinecap","success","successPercent"]),className:Z,role:"progressbar",children:te})};const VI=ale;var Ud=E.exports.createContext({min:0,max:0,direction:"ltr",step:1,includedStart:0,includedEnd:0,tabIndex:0});function UE(e,t,n){return(e-t)/(n-t)}function UI(e,t,n,r){var i=UE(t,n,r),o={};switch(e){case"rtl":o.right="".concat(i*100,"%"),o.transform="translateX(50%)";break;case"btt":o.bottom="".concat(i*100,"%"),o.transform="translateY(50%)";break;case"ttb":o.top="".concat(i*100,"%"),o.transform="translateY(-50%)";break;default:o.left="".concat(i*100,"%"),o.transform="translateX(-50%)";break}return o}function Wf(e,t){return Array.isArray(e)?e[t]:e}var sle=["prefixCls","value","valueIndex","onStartMove","style","render","dragging","onOffsetChange"],lle=E.exports.forwardRef(function(e,t){var n,r,i=e.prefixCls,o=e.value,s=e.valueIndex,a=e.onStartMove,u=e.style,f=e.render,p=e.dragging,g=e.onOffsetChange,v=kn(e,sle),b=E.exports.useContext(Ud),_=b.min,T=b.max,I=b.direction,P=b.disabled,M=b.range,D=b.tabIndex,N=b.ariaLabelForHandle,z=b.ariaLabelledByForHandle,$=b.ariaValueTextFormatterForHandle,j="".concat(i,"-handle"),U=function(X){P||a(X,s)},q=function(X){if(!P){var J=null;switch(X.which||X.keyCode){case Pt.LEFT:J=I==="ltr"||I==="btt"?-1:1;break;case Pt.RIGHT:J=I==="ltr"||I==="btt"?1:-1;break;case Pt.UP:J=I!=="ttb"?1:-1;break;case Pt.DOWN:J=I!=="ttb"?-1:1;break;case Pt.HOME:J="min";break;case Pt.END:J="max";break;case Pt.PAGE_UP:J=2;break;case Pt.PAGE_DOWN:J=-2;break}J!==null&&(X.preventDefault(),g(J,s))}},Y=UI(I,o,_,T),te=A("div",{ref:t,className:je(j,(n={},ae(n,"".concat(j,"-").concat(s+1),M),ae(n,"".concat(j,"-dragging"),p),n)),style:me(me({},Y),u),onMouseDown:U,onTouchStart:U,onKeyDown:q,tabIndex:P?null:Wf(D,s),role:"slider","aria-valuemin":_,"aria-valuemax":T,"aria-valuenow":o,"aria-disabled":P,"aria-label":Wf(N,s),"aria-labelledby":Wf(z,s),"aria-valuetext":(r=Wf($,s))===null||r===void 0?void 0:r(o),...v});return f&&(te=f(te,{index:s,prefixCls:i,value:o,dragging:p})),te}),cle=["prefixCls","style","onStartMove","onOffsetChange","values","handleRender","draggingIndex"],ule=E.exports.forwardRef(function(e,t){var n=e.prefixCls,r=e.style,i=e.onStartMove,o=e.onOffsetChange,s=e.values,a=e.handleRender,u=e.draggingIndex,f=kn(e,cle),p=E.exports.useRef({});return E.exports.useImperativeHandle(t,function(){return{focus:function(v){var b;(b=p.current[v])===null||b===void 0||b.focus()}}}),A(nr,{children:s.map(function(g,v){return A(lle,{ref:function(_){_?p.current[v]=_:delete p.current[v]},dragging:u===v,prefixCls:n,style:Wf(r,v),value:g,valueIndex:v,onStartMove:i,onOffsetChange:o,render:a,...f},v)})})});function gN(e){var t="touches"in e?e.touches[0]:e;return{pageX:t.pageX,pageY:t.pageY}}function dle(e,t,n,r,i,o,s,a,u){var f=E.exports.useState(null),p=$e(f,2),g=p[0],v=p[1],b=E.exports.useState(-1),_=$e(b,2),T=_[0],I=_[1],P=E.exports.useState(n),M=$e(P,2),D=M[0],N=M[1],z=E.exports.useState(n),$=$e(z,2),j=$[0],U=$[1],q=E.exports.useRef(null),Y=E.exports.useRef(null);E.exports.useEffect(function(){T===-1&&N(n)},[n,T]),E.exports.useEffect(function(){return function(){document.removeEventListener("mousemove",q.current),document.removeEventListener("mouseup",Y.current),document.removeEventListener("touchmove",q.current),document.removeEventListener("touchend",Y.current)}},[]);var te=function(se,oe){D.some(function(he,Ce){return he!==se[Ce]})&&(oe!==void 0&&v(oe),N(se),s(se))},Z=function(se,oe){if(se===-1){var he=j[0],Ce=j[j.length-1],Se=r-he,be=i-Ce,Re=oe*(i-r);Re=Math.max(Re,Se),Re=Math.min(Re,be);var Ie=o(he+Re);Re=Ie-he;var Me=j.map(function(Ue){return Ue+Re});te(Me)}else{var Ae=(i-r)*oe,ze=Mt(D);ze[se]=j[se];var Ke=u(ze,Ae,se,"dist");te(Ke.values,Ke.value)}},X=E.exports.useRef(Z);X.current=Z;var J=function(se,oe){se.stopPropagation();var he=n[oe];I(oe),v(he),U(n);var Ce=gN(se),Se=Ce.pageX,be=Ce.pageY,Re=function(Ae){Ae.preventDefault();var ze=gN(Ae),Ke=ze.pageX,Ue=ze.pageY,pt=Ke-Se,gt=Ue-be,Ot=e.current.getBoundingClientRect(),qe=Ot.width,Ct=Ot.height,ot;switch(t){case"btt":ot=-gt/Ct;break;case"ttb":ot=gt/Ct;break;case"rtl":ot=-pt/qe;break;default:ot=pt/qe}X.current(oe,ot)},Ie=function Me(Ae){Ae.preventDefault(),document.removeEventListener("mouseup",Me),document.removeEventListener("mousemove",Re),document.removeEventListener("touchend",Me),document.removeEventListener("touchmove",Re),q.current=null,Y.current=null,I(-1),a()};document.addEventListener("mouseup",Ie),document.addEventListener("mousemove",Re),document.addEventListener("touchend",Ie),document.addEventListener("touchmove",Re),q.current=Re,Y.current=Ie},ue=E.exports.useMemo(function(){var re=Mt(n).sort(function(oe,he){return oe-he}),se=Mt(D).sort(function(oe,he){return oe-he});return re.every(function(oe,he){return oe===se[he]})?D:n},[n,D]);return[T,g,ue,J]}function fle(e){var t=e.prefixCls,n=e.style,r=e.start,i=e.end,o=e.index,s=e.onStartMove,a=E.exports.useContext(Ud),u=a.direction,f=a.min,p=a.max,g=a.disabled,v=a.range,b="".concat(t,"-track"),_=UE(r,f,p),T=UE(i,f,p),I=function(D){!g&&s&&s(D,-1)},P={};switch(u){case"rtl":P.right="".concat(_*100,"%"),P.width="".concat(T*100-_*100,"%");break;case"btt":P.bottom="".concat(_*100,"%"),P.height="".concat(T*100-_*100,"%");break;case"ttb":P.top="".concat(_*100,"%"),P.height="".concat(T*100-_*100,"%");break;default:P.left="".concat(_*100,"%"),P.width="".concat(T*100-_*100,"%")}return A("div",{className:je(b,v&&"".concat(b,"-").concat(o+1)),style:me(me({},P),n),onMouseDown:I,onTouchStart:I})}function hle(e){var t=e.prefixCls,n=e.style,r=e.values,i=e.startPoint,o=e.onStartMove,s=E.exports.useContext(Ud),a=s.included,u=s.range,f=s.min,p=E.exports.useMemo(function(){if(!u){if(r.length===0)return[];var g=i!=null?i:f,v=r[0];return[{start:Math.min(g,v),end:Math.max(g,v)}]}for(var b=[],_=0;_<r.length-1;_+=1)b.push({start:r[_],end:r[_+1]});return b},[r,u,i,f]);return a?p.map(function(g,v){var b=g.start,_=g.end;return A(fle,{index:v,prefixCls:t,style:Wf(n,v),start:b,end:_,onStartMove:o},v)}):null}function ple(e){var t=e.prefixCls,n=e.style,r=e.children,i=e.value,o=e.onClick,s=E.exports.useContext(Ud),a=s.min,u=s.max,f=s.direction,p=s.includedStart,g=s.includedEnd,v=s.included,b="".concat(t,"-text"),_=UI(f,i,a,u);return A("span",{className:je(b,ae({},"".concat(b,"-active"),v&&p<=i&&i<=g)),style:me(me({},_),n),onMouseDown:function(I){I.stopPropagation()},onClick:function(){o(i)},children:r})}function mle(e){var t=e.prefixCls,n=e.marks,r=e.onClick,i="".concat(t,"-mark");return n.length?A("div",{className:i,children:n.map(function(o){var s=o.value,a=o.style,u=o.label;return A(ple,{prefixCls:i,style:a,value:s,onClick:r,children:u},s)})}):null}function gle(e){var t=e.prefixCls,n=e.value,r=e.style,i=e.activeStyle,o=E.exports.useContext(Ud),s=o.min,a=o.max,u=o.direction,f=o.included,p=o.includedStart,g=o.includedEnd,v="".concat(t,"-dot"),b=f&&p<=n&&n<=g,_=me(me({},UI(u,n,s,a)),typeof r=="function"?r(n):r);return b&&(_=me(me({},_),typeof i=="function"?i(n):i)),A("span",{className:je(v,ae({},"".concat(v,"-active"),b)),style:_})}function vle(e){var t=e.prefixCls,n=e.marks,r=e.dots,i=e.style,o=e.activeStyle,s=E.exports.useContext(Ud),a=s.min,u=s.max,f=s.step,p=E.exports.useMemo(function(){var g=new Set;if(n.forEach(function(b){g.add(b.value)}),r&&f!==null)for(var v=a;v<=u;)g.add(v),v+=f;return Array.from(g)},[a,u,f,r,n]);return A("div",{className:"".concat(t,"-step"),children:p.map(function(g){return A(gle,{prefixCls:t,value:g,style:i,activeStyle:o},g)})})}function yle(e,t,n,r,i,o){var s=E.exports.useCallback(function(b){var _=isFinite(b)?b:e;return _=Math.min(t,b),_=Math.max(e,_),_},[e,t]),a=E.exports.useCallback(function(b){if(n!==null){var _=e+Math.round((s(b)-e)/n)*n,T=function(D){return(String(D).split(".")[1]||"").length},I=Math.max(T(n),T(t),T(e)),P=Number(_.toFixed(I));return e<=P&&P<=t?P:null}return null},[n,e,t,s]),u=E.exports.useCallback(function(b){var _=s(b),T=r.map(function(M){return M.value});n!==null&&T.push(a(b)),T.push(e,t);var I=T[0],P=t-e;return T.forEach(function(M){var D=Math.abs(_-M);D<=P&&(I=M,P=D)}),I},[e,t,r,n,s,a]),f=function b(_,T,I){var P=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"unit";if(typeof T=="number"){var M,D=_[I],N=D+T,z=[];r.forEach(function(Y){z.push(Y.value)}),z.push(e,t),z.push(a(D));var $=T>0?1:-1;P==="unit"?z.push(a(D+$*n)):z.push(a(N)),z=z.filter(function(Y){return Y!==null}).filter(function(Y){return T<0?Y<=D:Y>=D}),P==="unit"&&(z=z.filter(function(Y){return Y!==D}));var j=P==="unit"?D:N;M=z[0];var U=Math.abs(M-j);if(z.forEach(function(Y){var te=Math.abs(Y-j);te<U&&(M=Y,U=te)}),M===void 0)return T<0?e:t;if(P==="dist")return M;if(Math.abs(T)>1){var q=Mt(_);return q[I]=M,b(q,T-$,I,P)}return M}else{if(T==="min")return e;if(T==="max")return t}},p=function(_,T,I){var P=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"unit",M=_[I],D=f(_,T,I,P);return{value:D,changed:D!==M}},g=function(_){return o===null&&_===0||typeof o=="number"&&_<o},v=function(_,T,I){var P=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"unit",M=_.map(u),D=M[I],N=f(M,T,I,P);if(M[I]=N,i===!1){var z=o||0;I>0&&M[I-1]!==D&&(M[I]=Math.max(M[I],M[I-1]+z)),I<M.length-1&&M[I+1]!==D&&(M[I]=Math.min(M[I],M[I+1]-z))}else if(typeof o=="number"||o===null){for(var $=I+1;$<M.length;$+=1)for(var j=!0;g(M[$]-M[$-1])&&j;){var U=p(M,1,$);M[$]=U.value,j=U.changed}for(var q=I;q>0;q-=1)for(var Y=!0;g(M[q]-M[q-1])&&Y;){var te=p(M,-1,q-1);M[q-1]=te.value,Y=te.changed}for(var Z=M.length-1;Z>0;Z-=1)for(var X=!0;g(M[Z]-M[Z-1])&&X;){var J=p(M,-1,Z-1);M[Z-1]=J.value,X=J.changed}for(var ue=0;ue<M.length-1;ue+=1)for(var re=!0;g(M[ue+1]-M[ue])&&re;){var se=p(M,1,ue+1);M[ue+1]=se.value,re=se.changed}}return{value:M[I],values:M}};return[u,v]}var xle=E.exports.forwardRef(function(e,t){var n,r=e.prefixCls,i=r===void 0?"rc-slider":r,o=e.className,s=e.style,a=e.disabled,u=a===void 0?!1:a,f=e.autoFocus,p=e.onFocus,g=e.onBlur,v=e.min,b=v===void 0?0:v,_=e.max,T=_===void 0?100:_,I=e.step,P=I===void 0?1:I,M=e.value,D=e.defaultValue,N=e.range,z=e.count,$=e.onChange,j=e.onBeforeChange,U=e.onAfterChange,q=e.allowCross,Y=q===void 0?!0:q,te=e.pushable,Z=te===void 0?!1:te,X=e.draggableTrack,J=e.reverse,ue=e.vertical,re=e.included,se=re===void 0?!0:re,oe=e.startPoint,he=e.trackStyle,Ce=e.handleStyle,Se=e.railStyle,be=e.dotStyle,Re=e.activeDotStyle,Ie=e.marks,Me=e.dots,Ae=e.handleRender,ze=e.tabIndex,Ke=ze===void 0?0:ze,Ue=e.ariaLabelForHandle,pt=e.ariaLabelledByForHandle,gt=e.ariaValueTextFormatterForHandle,Ot=E.exports.useRef(),qe=E.exports.useRef(),Ct=E.exports.useMemo(function(){return ue?J?"ttb":"btt":J?"rtl":"ltr"},[J,ue]),ot=E.exports.useMemo(function(){return isFinite(b)?b:0},[b]),vt=E.exports.useMemo(function(){return isFinite(T)?T:100},[T]),yt=E.exports.useMemo(function(){return P!==null&&P<=0?1:P},[P]),Tt=E.exports.useMemo(function(){return Z===!0?yt:Z>=0?Z:!1},[Z,yt]),et=E.exports.useMemo(function(){var ye=Object.keys(Ie||{});return ye.map(function(W){var Q=Ie[W],fe={value:Number(W)};return Q&&on(Q)==="object"&&!E.exports.isValidElement(Q)&&("label"in Q||"style"in Q)?(fe.style=Q.style,fe.label=Q.label):fe.label=Q,fe}).filter(function(W){var Q=W.label;return Q||typeof Q=="number"}).sort(function(W,Q){return W.value-Q.value})},[Ie]),ct=yle(ot,vt,yt,et,Y,Tt),at=$e(ct,2),He=at[0],ut=at[1],bt=Ei(D,{value:M}),Dt=$e(bt,2),Lt=Dt[0],Ht=Dt[1],Fe=E.exports.useMemo(function(){var ye=Lt==null?[]:Array.isArray(Lt)?Lt:[Lt],W=$e(ye,1),Q=W[0],fe=Q===void 0?ot:Q,ce=Lt===null?[]:[fe];if(N){if(ce=Mt(ye),z||Lt===void 0){var xe=z>=0?z+1:2;for(ce=ce.slice(0,xe);ce.length<xe;){var ke;ce.push((ke=ce[ce.length-1])!==null&&ke!==void 0?ke:ot)}}ce.sort(function(we,Pe){return we-Pe})}return ce.forEach(function(we,Pe){ce[Pe]=He(we)}),ce},[Lt,N,ot,z,He]),Ye=E.exports.useRef(Fe);Ye.current=Fe;var Zt=function(W){return N?W:W[0]},an=function(W){var Q=Mt(W).sort(function(fe,ce){return fe-ce});$&&!kd(Q,Ye.current)&&$(Zt(Q)),Ht(Q)},Kt=function(W){if(!u){var Q=0,fe=vt-ot;Fe.forEach(function(xe,ke){var we=Math.abs(W-xe);we<=fe&&(fe=we,Q=ke)});var ce=Mt(Fe);ce[Q]=W,N&&!Fe.length&&z===void 0&&ce.push(W),j==null||j(Zt(ce)),an(ce),U==null||U(Zt(ce))}},Vt=function(W){W.preventDefault();var Q=qe.current.getBoundingClientRect(),fe=Q.width,ce=Q.height,xe=Q.left,ke=Q.top,we=Q.bottom,Pe=Q.right,Le=W.clientX,Ze=W.clientY,Xe;switch(Ct){case"btt":Xe=(we-Ze)/ce;break;case"ttb":Xe=(Ze-ke)/ce;break;case"rtl":Xe=(Pe-Le)/fe;break;default:Xe=(Le-xe)/fe}var Ve=ot+Xe*(vt-ot);Kt(He(Ve))},It=E.exports.useState(null),Xt=$e(It,2),pn=Xt[0],tt=Xt[1],At=function(W,Q){if(!u){var fe=ut(Fe,W,Q);j==null||j(Zt(Fe)),an(fe.values),U==null||U(Zt(fe.values)),tt(fe.value)}};E.exports.useEffect(function(){if(pn!==null){var ye=Fe.indexOf(pn);ye>=0&&Ot.current.focus(ye)}tt(null)},[pn]);var qt=E.exports.useMemo(function(){return X&&yt===null?!1:X},[X,yt]),En=function(){U==null||U(Zt(Ye.current))},yn=dle(qe,Ct,Fe,ot,vt,He,an,En,ut),St=$e(yn,4),Pn=St[0],_n=St[1],tn=St[2],Ft=St[3],dt=function(W,Q){Ft(W,Q),j==null||j(Zt(Ye.current))},mt=Pn!==-1;E.exports.useEffect(function(){if(!mt){var ye=Fe.lastIndexOf(_n);Ot.current.focus(ye)}},[mt]);var $t=E.exports.useMemo(function(){return Mt(tn).sort(function(ye,W){return ye-W})},[tn]),Wt=E.exports.useMemo(function(){return N?[$t[0],$t[$t.length-1]]:[ot,$t[0]]},[$t,N,ot]),mn=$e(Wt,2),An=mn[0],Qn=mn[1];E.exports.useImperativeHandle(t,function(){return{focus:function(){Ot.current.focus(0)},blur:function(){var W=document,Q=W.activeElement;qe.current.contains(Q)&&(Q==null||Q.blur())}}}),E.exports.useEffect(function(){f&&Ot.current.focus(0)},[]);var Jn=E.exports.useMemo(function(){return{min:ot,max:vt,direction:Ct,disabled:u,step:yt,included:se,includedStart:An,includedEnd:Qn,range:N,tabIndex:Ke,ariaLabelForHandle:Ue,ariaLabelledByForHandle:pt,ariaValueTextFormatterForHandle:gt}},[ot,vt,Ct,u,yt,se,An,Qn,N,Ke,Ue,pt,gt]);return A(Ud.Provider,{value:Jn,children:it("div",{ref:qe,className:je(i,o,(n={},ae(n,"".concat(i,"-disabled"),u),ae(n,"".concat(i,"-vertical"),ue),ae(n,"".concat(i,"-horizontal"),!ue),ae(n,"".concat(i,"-with-marks"),et.length),n)),style:s,onMouseDown:Vt,children:[A("div",{className:"".concat(i,"-rail"),style:Se}),A(hle,{prefixCls:i,style:he,values:$t,startPoint:oe,onStartMove:qt?dt:null}),A(vle,{prefixCls:i,marks:et,dots:Me,style:be,activeStyle:Re}),A(ule,{ref:Ot,prefixCls:i,style:Ce,values:tn,draggingIndex:Pn,onStartMove:dt,onOffsetChange:At,onFocus:p,onBlur:g,handleRender:Ae}),A(mle,{prefixCls:i,marks:et,onClick:Kt})]})})}),ble=E.exports.forwardRef(function(e,t){var n=e.open,r=E.exports.useRef(null),i=E.exports.useRef(null);function o(){cr.cancel(i.current),i.current=null}function s(){i.current=cr(function(){var a;(a=r.current)===null||a===void 0||a.forcePopupAlign(),i.current=null})}return E.exports.useEffect(function(){return n?s():o(),o},[n,e.title]),A(ka,{ref:Aa(r,t),...e})});const _le=ble;var wle=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},Cle=E.exports.forwardRef(function(e,t){var n=E.exports.useContext(zn),r=n.getPrefixCls,i=n.direction,o=n.getPopupContainer,s=E.exports.useState({}),a=$e(s,2),u=a[0],f=a[1],p=function(U,q){f(function(Y){return Je(Je({},Y),ae({},U,q))})},g=function(U,q){return U||(q?i==="rtl"?"left":"right":"top")},v=e.prefixCls,b=e.range,_=e.className,T=wle(e,["prefixCls","range","className"]),I=r("slider",v),P=je(_,ae({},"".concat(I,"-rtl"),i==="rtl"));i==="rtl"&&!T.vertical&&(T.reverse=!T.reverse);var M=E.exports.useMemo(function(){return b?on(b)==="object"?[!0,b.draggableTrack]:[!0,!1]:[!1]},[b]),D=$e(M,2),N=D[0],z=D[1],$=function(U,q){var Y,te=q.index,Z=q.dragging,X=r(),J=e.tooltip,ue=J===void 0?{}:J,re=e.vertical,se=Je({formatter:(Y=e.tipFormatter)!==null&&Y!==void 0?Y:function(ze){return typeof ze=="number"?ze.toString():""},open:e.tooltipVisible,placement:e.tooltipPlacement,getPopupContainer:e.getTooltipPopupContainer},ue),oe=se.open,he=se.placement,Ce=se.getPopupContainer,Se=se.prefixCls,be=se.formatter,Re=be?u[te]||Z:!1,Ie=oe||oe===void 0&&Re,Me=Je(Je({},U.props),{onMouseEnter:function(){return p(te,!0)},onMouseLeave:function(){return p(te,!1)}}),Ae=r("tooltip",Se);return A(_le,{prefixCls:Ae,title:be?be(q.value):"",open:Ie,placement:g(he,re),transitionName:"".concat(X,"-zoom-down"),overlayClassName:"".concat(I,"-tooltip"),getPopupContainer:Ce||o,children:E.exports.cloneElement(U,Me)},te)};return A(xle,{...T,step:T.step,range:N,draggableTrack:z,className:P,ref:t,prefixCls:I,handleRender:$})});const Sle=Cle;function Ele(e){return null}function Ple(e){return null}var Tle="RC_TABLE_KEY";function Y8(e){return e==null?[]:Array.isArray(e)?e:[e]}function Q8(e,t){if(!t&&typeof t!="number")return e;for(var n=Y8(t),r=e,i=0;i<n.length;i+=1){if(!r)return null;var o=n[i];r=r[o]}return r}function t1(e){var t=[],n={};return e.forEach(function(r){for(var i=r||{},o=i.key,s=i.dataIndex,a=o||Y8(s).join("-")||Tle;n[a];)a="".concat(a,"_next");n[a]=!0,t.push(a)}),t}function jE(e){return e!=null}var J8=E.exports.createContext(!1);function Ile(){var e=E.exports.createContext(null),t=function(r){var i=r.value,o=r.children,s=E.exports.useRef(i);s.current=i;var a=E.exports.useState(function(){return{getValue:function(){return s.current},listeners:new Set}}),u=$e(a,1),f=u[0];return Si(function(){f.listeners.forEach(function(p){p(i)})},[i]),A(e.Provider,{value:f,children:o})};return{Context:e,Provider:t}}function kle(e,t){var n=Cg(t),r=E.exports.useContext(e==null?void 0:e.Context),i=r||{},o=i.listeners,s=i.getValue,a=E.exports.useState(function(){return n(r?s():null)}),u=$e(a,2),f=u[0],p=u[1];return Si(function(){if(!r)return;function g(v){p(function(b){var _=n(v);return kd(b,_)?b:_})}return o.add(g),function(){o.delete(g)}},[r]),f}var eV=Ile(),n1=E.exports.createContext(null),tV=E.exports.createContext({renderWithProps:!1}),Mle=["colSpan","rowSpan","style","className"];function Rle(e,t,n,r){var i=e+t-1;return e<=r&&i>=n}function Ole(e){return e&&on(e)==="object"&&!Array.isArray(e)&&!E.exports.isValidElement(e)}function Dle(e){return typeof e=="string"?!0:Nh(e)}var Ale=function(t){var n=t.ellipsis,r=t.rowType,i=t.children,o,s=n===!0?{showTitle:!0}:n;return s&&(s.showTitle||r==="header")&&(typeof i=="string"||typeof i=="number"?o=i.toString():E.exports.isValidElement(i)&&typeof i.props.children=="string"&&(o=i.props.children)),o};function Nle(e,t){var n,r,i,o=e.prefixCls,s=e.className,a=e.record,u=e.index,f=e.renderIndex,p=e.dataIndex,g=e.render,v=e.children,b=e.component,_=b===void 0?"td":b,T=e.colSpan,I=e.rowSpan,P=e.fixLeft,M=e.fixRight,D=e.firstFixLeft,N=e.lastFixLeft,z=e.firstFixRight,$=e.lastFixRight,j=e.appendNode,U=e.additionalProps,q=U===void 0?{}:U,Y=e.ellipsis,te=e.align,Z=e.rowType,X=e.isSticky,J=e.hovering,ue=e.onHover,re="".concat(o,"-cell"),se=E.exports.useContext(tV),oe=E.exports.useContext(J8),he=E.exports.useContext(n1),Ce=he.allColumnsFixedLeft,Se=E.exports.useMemo(function(){if(jE(v))return[v];var He=Q8(a,p),ut=He,bt=void 0;if(g){var Dt=g(He,a,f);Ole(Dt)?(ut=Dt.children,bt=Dt.props,se.renderWithProps=!0):ut=Dt}return[ut,bt]},[se.renderWithProps?Math.random():0,v,p,se,a,g,f]),be=$e(Se,2),Re=be[0],Ie=be[1],Me=Re;on(Me)==="object"&&!Array.isArray(Me)&&!E.exports.isValidElement(Me)&&(Me=null),Y&&(N||z)&&(Me=A("span",{className:"".concat(re,"-content"),children:Me}));var Ae=Ie||{},ze=Ae.colSpan,Ke=Ae.rowSpan,Ue=Ae.style,pt=Ae.className,gt=kn(Ae,Mle),Ot=(n=ze!==void 0?ze:T)!==null&&n!==void 0?n:1,qe=(r=Ke!==void 0?Ke:I)!==null&&r!==void 0?r:1;if(Ot===0||qe===0)return null;var Ct={},ot=typeof P=="number"&&oe,vt=typeof M=="number"&&oe;ot&&(Ct.position="sticky",Ct.left=P),vt&&(Ct.position="sticky",Ct.right=M);var yt={};te&&(yt.textAlign=te);var Tt=function(ut){var bt;a&&ue(u,u+qe-1),q==null||(bt=q.onMouseEnter)===null||bt===void 0||bt.call(q,ut)},et=function(ut){var bt;a&&ue(-1,-1),q==null||(bt=q.onMouseLeave)===null||bt===void 0||bt.call(q,ut)},ct=Ale({rowType:Z,ellipsis:Y,children:Re}),at=me(me(me({title:ct},gt),q),{},{colSpan:Ot!==1?Ot:null,rowSpan:qe!==1?qe:null,className:je(re,s,(i={},ae(i,"".concat(re,"-fix-left"),ot&&oe),ae(i,"".concat(re,"-fix-left-first"),D&&oe),ae(i,"".concat(re,"-fix-left-last"),N&&oe),ae(i,"".concat(re,"-fix-left-all"),N&&Ce&&oe),ae(i,"".concat(re,"-fix-right"),vt&&oe),ae(i,"".concat(re,"-fix-right-first"),z&&oe),ae(i,"".concat(re,"-fix-right-last"),$&&oe),ae(i,"".concat(re,"-ellipsis"),Y),ae(i,"".concat(re,"-with-append"),j),ae(i,"".concat(re,"-fix-sticky"),(ot||vt)&&X&&oe),ae(i,"".concat(re,"-row-hover"),!Ie&&J),i),q.className,pt),style:me(me(me(me({},q.style),yt),Ct),Ue),onMouseEnter:Tt,onMouseLeave:et,ref:Dle(_)?t:null});return it(_,{...at,children:[j,Me]})}var nV=E.exports.forwardRef(Nle);nV.displayName="Cell";var Lle=["expanded","className","hovering"],zle=E.exports.memo(nV,function(e,t){return t.shouldCellUpdate?Lle.every(function(n){return e[n]===t[n]})&&!t.shouldCellUpdate(t.record,e.record):kd(e,t)}),fv=E.exports.forwardRef(function(e,t){var n=e.index,r=e.additionalProps,i=r===void 0?{}:r,o=e.colSpan,s=e.rowSpan,a=i.colSpan,u=i.rowSpan,f=o!=null?o:a,p=s!=null?s:u,g=kle(eV,function(_){var T=Rle(n,p||1,_==null?void 0:_.startRow,_==null?void 0:_.endRow);return{onHover:_==null?void 0:_.onHover,hovering:T}}),v=g.onHover,b=g.hovering;return A(zle,{...e,colSpan:f,rowSpan:p,hovering:b,ref:t,onHover:v})});fv.displayName="WrappedCell";var cl=E.exports.createContext(null);function jI(e,t,n,r,i){var o=n[e]||{},s=n[t]||{},a,u;o.fixed==="left"?a=r.left[e]:s.fixed==="right"&&(u=r.right[t]);var f=!1,p=!1,g=!1,v=!1,b=n[t+1],_=n[e-1];if(i==="rtl"){if(a!==void 0){var T=_&&_.fixed==="left";v=!T}else if(u!==void 0){var I=b&&b.fixed==="right";g=!I}}else if(a!==void 0){var P=b&&b.fixed==="left";f=!P}else if(u!==void 0){var M=_&&_.fixed==="right";p=!M}return{fixLeft:a,fixRight:u,lastFixLeft:f,firstFixRight:p,lastFixRight:g,firstFixLeft:v,isSticky:r.isSticky}}function rV(e){var t=e.cells,n=e.stickyOffsets,r=e.flattenColumns,i=e.rowComponent,o=e.cellComponent,s=e.onHeaderRow,a=e.index,u=E.exports.useContext(cl),f=u.prefixCls,p=u.direction,g;s&&(g=s(t.map(function(b){return b.column}),a));var v=t1(t.map(function(b){return b.column}));return A(i,{...g,children:t.map(function(b,_){var T=b.column,I=jI(b.colStart,b.colEnd,r,n,p),P;return T&&T.onHeaderCell&&(P=b.column.onHeaderCell(T)),E.exports.createElement(fv,{...b,ellipsis:T.ellipsis,align:T.align,component:o,prefixCls:f,key:v[_],...I,additionalProps:P,rowType:"header"})})})}rV.displayName="HeaderRow";function Fle(e){var t=[];function n(s,a){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;t[u]=t[u]||[];var f=a,p=s.filter(Boolean).map(function(g){var v={key:g.key,className:g.className||"",children:g.title,column:g,colStart:f},b=1,_=g.children;return _&&_.length>0&&(b=n(_,f,u+1).reduce(function(T,I){return T+I},0),v.hasSubColumns=!0),"colSpan"in g&&(b=g.colSpan),"rowSpan"in g&&(v.rowSpan=g.rowSpan),v.colSpan=b,v.colEnd=v.colStart+b-1,t[u].push(v),f+=b,b});return p}n(e,0);for(var r=t.length,i=function(a){t[a].forEach(function(u){!("rowSpan"in u)&&!u.hasSubColumns&&(u.rowSpan=r-a)})},o=0;o<r;o+=1)i(o);return t}function vN(e){var t=e.stickyOffsets,n=e.columns,r=e.flattenColumns,i=e.onHeaderRow,o=E.exports.useContext(cl),s=o.prefixCls,a=o.getComponent,u=E.exports.useMemo(function(){return Fle(n)},[n]),f=a(["header","wrapper"],"thead"),p=a(["header","row"],"tr"),g=a(["header","cell"],"th");return A(f,{className:"".concat(s,"-thead"),children:u.map(function(v,b){var _=A(rV,{flattenColumns:r,cells:v,stickyOffsets:t,rowComponent:p,cellComponent:g,onHeaderRow:i,index:b},b);return _})})}var iV=E.exports.createContext(null);function oV(e){var t=e.prefixCls,n=e.children,r=e.component,i=e.cellComponent,o=e.className,s=e.expanded,a=e.colSpan,u=e.isEmpty,f=E.exports.useContext(cl),p=f.scrollbarSize,g=E.exports.useContext(iV),v=g.fixHeader,b=g.fixColumn,_=g.componentWidth,T=g.horizonScroll;return E.exports.useMemo(function(){var I=n;return(u?T:b)&&(I=A("div",{style:{width:_-(v?p:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(t,"-expanded-row-fixed"),children:_!==0&&I})),A(r,{className:o,style:{display:s?null:"none"},children:A(fv,{component:i,prefixCls:t,colSpan:a,children:I})})},[n,r,o,s,a,u,p,_,b,v,T])}var aV=E.exports.createContext(null);function sV(e){var t=e.className,n=e.style,r=e.record,i=e.index,o=e.renderIndex,s=e.rowKey,a=e.rowExpandable,u=e.expandedKeys,f=e.onRow,p=e.indent,g=p===void 0?0:p,v=e.rowComponent,b=e.cellComponent,_=e.childrenColumnName,T=E.exports.useContext(cl),I=T.prefixCls,P=T.fixedInfoList,M=E.exports.useContext(n1),D=M.flattenColumns,N=M.expandableType,z=M.expandRowByClick,$=M.onTriggerExpand,j=M.rowClassName,U=M.expandedRowClassName,q=M.indentSize,Y=M.expandIcon,te=M.expandedRowRender,Z=M.expandIconColumnIndex,X=E.exports.useState(!1),J=$e(X,2),ue=J[0],re=J[1],se=u&&u.has(e.recordKey);E.exports.useEffect(function(){se&&re(!0)},[se]);var oe=N==="row"&&(!a||a(r)),he=N==="nest",Ce=_&&r&&r[_],Se=oe||he,be=E.exports.useRef($);be.current=$;var Re=function(){be.current.apply(be,arguments)},Ie=f==null?void 0:f(r,i),Me=function(qe){var Ct;z&&Se&&Re(r,qe);for(var ot=arguments.length,vt=new Array(ot>1?ot-1:0),yt=1;yt<ot;yt++)vt[yt-1]=arguments[yt];Ie==null||(Ct=Ie.onClick)===null||Ct===void 0||Ct.call.apply(Ct,[Ie,qe].concat(vt))},Ae;typeof j=="string"?Ae=j:typeof j=="function"&&(Ae=j(r,i,g));var ze=t1(D),Ke=A(v,{...Ie,"data-row-key":s,className:je(t,"".concat(I,"-row"),"".concat(I,"-row-level-").concat(g),Ae,Ie&&Ie.className),style:me(me({},n),Ie?Ie.style:null),onClick:Me,children:D.map(function(Ot,qe){var Ct=Ot.render,ot=Ot.dataIndex,vt=Ot.className,yt=ze[qe],Tt=P[qe],et;qe===(Z||0)&&he&&(et=it(nr,{children:[A("span",{style:{paddingLeft:"".concat(q*g,"px")},className:"".concat(I,"-row-indent indent-level-").concat(g)}),Y({prefixCls:I,expanded:se,expandable:Ce,record:r,onExpand:Re})]}));var ct;return Ot.onCell&&(ct=Ot.onCell(r,i)),A(fv,{className:vt,ellipsis:Ot.ellipsis,align:Ot.align,component:b,prefixCls:I,record:r,index:i,renderIndex:o,dataIndex:ot,render:Ct,shouldCellUpdate:Ot.shouldCellUpdate,expanded:et&&se,...Tt,appendNode:et,additionalProps:ct},yt)})}),Ue;if(oe&&(ue||se)){var pt=te(r,i,g+1,se),gt=U&&U(r,i,g);Ue=A(oV,{expanded:se,className:je("".concat(I,"-expanded-row"),"".concat(I,"-expanded-row-level-").concat(g+1),gt),prefixCls:I,component:v,cellComponent:b,colSpan:D.length,isEmpty:!1,children:pt})}return it(nr,{children:[Ke,Ue]})}sV.displayName="BodyRow";function lV(e,t,n,r,i,o){var s=[];s.push({record:e,indent:t,index:o});var a=i(e),u=r==null?void 0:r.has(a);if(e&&Array.isArray(e[n])&&u)for(var f=0;f<e[n].length;f+=1){var p=lV(e[n][f],t+1,n,r,i,f);s.push.apply(s,Mt(p))}return s}function $le(e,t,n,r){var i=E.exports.useMemo(function(){if(n!=null&&n.size){for(var o=[],s=0;s<(e==null?void 0:e.length);s+=1){var a=e[s];o.push.apply(o,Mt(lV(a,0,t,n,r,s)))}return o}return e==null?void 0:e.map(function(u,f){return{record:u,indent:0,index:f}})},[e,t,n,r]);return i}function Ble(e){var t=e.columnKey,n=e.onColumnResize,r=E.exports.useRef();return E.exports.useEffect(function(){r.current&&n(t,r.current.offsetWidth)},[]),A(Ql,{data:t,children:A("td",{ref:r,style:{padding:0,border:0,height:0},children:A("div",{style:{height:0,overflow:"hidden"},children:"\xA0"})})})}function Vle(e){var t=e.prefixCls,n=e.columnsKey,r=e.onColumnResize;return A("tr",{"aria-hidden":"true",className:"".concat(t,"-measure-row"),style:{height:0,fontSize:0},children:A(Ql.Collection,{onBatchResize:function(o){o.forEach(function(s){var a=s.data,u=s.size;r(a,u.offsetWidth)})},children:n.map(function(i){return A(Ble,{columnKey:i,onColumnResize:r},i)})})})}function Ule(e){var t=e.data,n=e.getRowKey,r=e.measureColumnWidth,i=e.expandedKeys,o=e.onRow,s=e.rowExpandable,a=e.emptyNode,u=e.childrenColumnName,f=E.exports.useContext(aV),p=f.onColumnResize,g=E.exports.useContext(cl),v=g.prefixCls,b=g.getComponent,_=E.exports.useContext(n1),T=_.flattenColumns,I=$le(t,u,i,n),P=E.exports.useRef({renderWithProps:!1}),M=E.exports.useState(-1),D=$e(M,2),N=D[0],z=D[1],$=E.exports.useState(-1),j=$e($,2),U=j[0],q=j[1],Y=E.exports.useCallback(function(Z,X){z(Z),q(X)},[]),te=E.exports.useMemo(function(){var Z=b(["body","wrapper"],"tbody"),X=b(["body","row"],"tr"),J=b(["body","cell"],"td"),ue;t.length?ue=I.map(function(se,oe){var he=se.record,Ce=se.indent,Se=se.index,be=n(he,oe);return A(sV,{rowKey:be,record:he,recordKey:be,index:oe,renderIndex:Se,rowComponent:X,cellComponent:J,expandedKeys:i,onRow:o,getRowKey:n,rowExpandable:s,childrenColumnName:u,indent:Ce},be)}):ue=A(oV,{expanded:!0,className:"".concat(v,"-placeholder"),prefixCls:v,component:X,cellComponent:J,colSpan:T.length,isEmpty:!0,children:a});var re=t1(T);return it(Z,{className:"".concat(v,"-tbody"),children:[r&&A(Vle,{prefixCls:v,columnsKey:re,onColumnResize:p}),ue]})},[t,v,o,r,i,n,b,a,T,u,p,s,I]);return A(tV.Provider,{value:P.current,children:A(eV.Provider,{value:{startRow:N,endRow:U,onHover:Y},children:te})})}var cV=E.exports.memo(Ule);cV.displayName="Body";var jle=["expandable"],qm="RC_TABLE_INTERNAL_COL_DEFINE";function Hle(e){var t=e.expandable,n=kn(e,jle),r;return"expandable"in e?r=me(me({},n),t):r=n,r.showExpandColumn===!1&&(r.expandIconColumnIndex=-1),r}var Ju={},Kle=["children"],Wle=["fixed"];function HI(e){return Po(e).filter(function(t){return E.exports.isValidElement(t)}).map(function(t){var n=t.key,r=t.props,i=r.children,o=kn(r,Kle),s=me({key:n},o);return i&&(s.children=HI(i)),s})}function HE(e){return e.reduce(function(t,n){var r=n.fixed,i=r===!0?"left":r,o=n.children;return o&&o.length>0?[].concat(Mt(t),Mt(HE(o).map(function(s){return me({fixed:i},s)}))):[].concat(Mt(t),[me(me({},n),{},{fixed:i})])},[])}function Gle(e){return e.map(function(t){var n=t.fixed,r=kn(t,Wle),i=n;return n==="left"?i="right":n==="right"&&(i="left"),me({fixed:i},r)})}function qle(e,t){var n=e.prefixCls,r=e.columns,i=e.children,o=e.expandable,s=e.expandedKeys,a=e.columnTitle,u=e.getRowKey,f=e.onTriggerExpand,p=e.expandIcon,g=e.rowExpandable,v=e.expandIconColumnIndex,b=e.direction,_=e.expandRowByClick,T=e.columnWidth,I=e.fixed,P=E.exports.useMemo(function(){return r||HI(i)},[r,i]),M=E.exports.useMemo(function(){if(o){var z,$=P.slice();if(!$.includes(Ju)){var j=v||0;j>=0&&$.splice(j,0,Ju)}var U=$.indexOf(Ju);$=$.filter(function(Z,X){return Z!==Ju||X===U});var q=P[U],Y;(I==="left"||I)&&!v?Y="left":(I==="right"||I)&&v===P.length?Y="right":Y=q?q.fixed:null;var te=(z={},ae(z,qm,{className:"".concat(n,"-expand-icon-col"),columnType:"EXPAND_COLUMN"}),ae(z,"title",a),ae(z,"fixed",Y),ae(z,"className","".concat(n,"-row-expand-icon-cell")),ae(z,"width",T),ae(z,"render",function(X,J,ue){var re=u(J,ue),se=s.has(re),oe=g?g(J):!0,he=p({prefixCls:n,expanded:se,expandable:oe,record:J,onExpand:f});return _?A("span",{onClick:function(Se){return Se.stopPropagation()},children:he}):he}),z);return $.map(function(Z){return Z===Ju?te:Z})}return P.filter(function(Z){return Z!==Ju})},[o,P,u,s,p,b]),D=E.exports.useMemo(function(){var z=M;return t&&(z=t(z)),z.length||(z=[{render:function(){return null}}]),z},[t,M,b]),N=E.exports.useMemo(function(){return b==="rtl"?Gle(HE(D)):HE(D)},[D,b]);return[D,N]}function uV(e){var t=E.exports.useRef(e),n=E.exports.useState({}),r=$e(n,2),i=r[1],o=E.exports.useRef(null),s=E.exports.useRef([]);function a(u){s.current.push(u);var f=Promise.resolve();o.current=f,f.then(function(){if(o.current===f){var p=s.current,g=t.current;s.current=[],p.forEach(function(v){t.current=v(t.current)}),o.current=null,g!==t.current&&i({})}})}return E.exports.useEffect(function(){return function(){o.current=null}},[]),[t.current,a]}function Zle(e){var t=E.exports.useRef(e||null),n=E.exports.useRef();function r(){window.clearTimeout(n.current)}function i(s){t.current=s,r(),n.current=window.setTimeout(function(){t.current=null,n.current=void 0},100)}function o(){return t.current}return E.exports.useEffect(function(){return r},[]),[i,o]}function Xle(e,t,n){var r=E.exports.useMemo(function(){for(var i=[],o=[],s=0,a=0,u=0;u<t;u+=1)if(n==="rtl"){o[u]=a,a+=e[u]||0;var f=t-u-1;i[f]=s,s+=e[f]||0}else{i[u]=s,s+=e[u]||0;var p=t-u-1;o[p]=a,a+=e[p]||0}return{left:i,right:o}},[e,t,n]);return r}var Yle=["columnType"];function dV(e){for(var t=e.colWidths,n=e.columns,r=e.columCount,i=[],o=r||n.length,s=!1,a=o-1;a>=0;a-=1){var u=t[a],f=n&&n[a],p=f&&f[qm];if(u||p||s){var g=p||{};g.columnType;var v=kn(g,Yle);i.unshift(A("col",{style:{width:u},...v},a)),s=!0}}return A("colgroup",{children:i})}function yN(e){var t=e.className,n=e.children;return A("div",{className:t,children:n})}var fV=E.exports.createContext({});function Qle(e){var t=e.className,n=e.index,r=e.children,i=e.colSpan,o=i===void 0?1:i,s=e.rowSpan,a=e.align,u=E.exports.useContext(cl),f=u.prefixCls,p=u.direction,g=E.exports.useContext(fV),v=g.scrollColumnIndex,b=g.stickyOffsets,_=g.flattenColumns,T=n+o-1,I=T+1===v?o+1:o,P=jI(n,n+I-1,_,b,p);return A(fv,{className:t,index:n,component:"td",prefixCls:f,record:null,dataIndex:null,align:a,colSpan:I,rowSpan:s,render:function(){return r},...P})}var Jle=["children"];function ece(e){var t=e.children,n=kn(e,Jle);return A("tr",{...n,children:t})}function r1(e){var t=e.children;return t}r1.Row=ece;r1.Cell=Qle;function mx(e){var t=e.children,n=e.stickyOffsets,r=e.flattenColumns,i=E.exports.useContext(cl),o=i.prefixCls,s=r.length-1,a=r[s],u=E.exports.useMemo(function(){return{stickyOffsets:n,flattenColumns:r,scrollColumnIndex:a!=null&&a.scrollbar?s:null}},[a,r,s,n]);return A(fV.Provider,{value:u,children:A("tfoot",{className:"".concat(o,"-summary"),children:t})})}var hV=r1;function tce(e){var t,n=e.prefixCls,r=e.record,i=e.onExpand,o=e.expanded,s=e.expandable,a="".concat(n,"-row-expand-icon");if(!s)return A("span",{className:je(a,"".concat(n,"-row-spaced"))});var u=function(p){i(r,p),p.stopPropagation()};return A("span",{className:je(a,(t={},ae(t,"".concat(n,"-row-expanded"),o),ae(t,"".concat(n,"-row-collapsed"),!o),t)),onClick:u})}function nce(e,t,n){var r=[];function i(o){(o||[]).forEach(function(s,a){r.push(t(s,a)),i(s[n])})}return i(e),r}var rce=function(t,n){var r,i,o=t.scrollBodyRef,s=t.onScroll,a=t.offsetScroll,u=t.container,f=E.exports.useContext(cl),p=f.prefixCls,g=((r=o.current)===null||r===void 0?void 0:r.scrollWidth)||0,v=((i=o.current)===null||i===void 0?void 0:i.clientWidth)||0,b=g&&v*(v/g),_=E.exports.useRef(),T=uV({scrollLeft:0,isHiddenScrollBar:!1}),I=$e(T,2),P=I[0],M=I[1],D=E.exports.useRef({delta:0,x:0}),N=E.exports.useState(!1),z=$e(N,2),$=z[0],j=z[1],U=function(){j(!1)},q=function(J){J.persist(),D.current.delta=J.pageX-P.scrollLeft,D.current.x=0,j(!0),J.preventDefault()},Y=function(J){var ue,re=J||((ue=window)===null||ue===void 0?void 0:ue.event),se=re.buttons;if(!$||se===0){$&&j(!1);return}var oe=D.current.x+J.pageX-D.current.x-D.current.delta;oe<=0&&(oe=0),oe+b>=v&&(oe=v-b),s({scrollLeft:oe/v*(g+2)}),D.current.x=J.pageX},te=function(){if(!!o.current){var J=$E(o.current).top,ue=J+o.current.offsetHeight,re=u===window?document.documentElement.scrollTop+window.innerHeight:$E(u).top+u.clientHeight;ue-wb()<=re||J>=re-a?M(function(se){return me(me({},se),{},{isHiddenScrollBar:!0})}):M(function(se){return me(me({},se),{},{isHiddenScrollBar:!1})})}},Z=function(J){M(function(ue){return me(me({},ue),{},{scrollLeft:J/g*v||0})})};return E.exports.useImperativeHandle(n,function(){return{setScrollLeft:Z}}),E.exports.useEffect(function(){var X=Qo(document.body,"mouseup",U,!1),J=Qo(document.body,"mousemove",Y,!1);return te(),function(){X.remove(),J.remove()}},[b,$]),E.exports.useEffect(function(){var X=Qo(u,"scroll",te,!1),J=Qo(window,"resize",te,!1);return function(){X.remove(),J.remove()}},[u]),E.exports.useEffect(function(){P.isHiddenScrollBar||M(function(X){var J=o.current;return J?me(me({},X),{},{scrollLeft:J.scrollLeft/J.scrollWidth*J.clientWidth}):X})},[P.isHiddenScrollBar]),g<=v||!b||P.isHiddenScrollBar?null:A("div",{style:{height:wb(),width:v,bottom:a},className:"".concat(p,"-sticky-scroll"),children:A("div",{onMouseDown:q,ref:_,className:je("".concat(p,"-sticky-scroll-bar"),ae({},"".concat(p,"-sticky-scroll-bar-active"),$)),style:{width:"".concat(b,"px"),transform:"translate3d(".concat(P.scrollLeft,"px, 0, 0)")}})})};const ice=E.exports.forwardRef(rce);var xN=To()?window:null;function oce(e,t){var n=on(e)==="object"?e:{},r=n.offsetHeader,i=r===void 0?0:r,o=n.offsetSummary,s=o===void 0?0:o,a=n.offsetScroll,u=a===void 0?0:a,f=n.getContainer,p=f===void 0?function(){return xN}:f,g=p()||xN;return E.exports.useMemo(function(){var v=!!e;return{isSticky:v,stickyClassName:v?"".concat(t,"-sticky-holder"):"",offsetHeader:i,offsetSummary:s,offsetScroll:u,container:g}},[u,i,s,t,g])}var ace=["className","noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","stickyTopOffset","stickyBottomOffset","stickyClassName","onScroll","maxContentScroll","children"];function sce(e,t){return E.exports.useMemo(function(){for(var n=[],r=0;r<t;r+=1){var i=e[r];if(i!==void 0)n[r]=i;else return null}return n},[e.join("_"),t])}var KE=E.exports.forwardRef(function(e,t){var n=e.className,r=e.noData,i=e.columns,o=e.flattenColumns,s=e.colWidths,a=e.columCount,u=e.stickyOffsets,f=e.direction,p=e.fixHeader,g=e.stickyTopOffset,v=e.stickyBottomOffset,b=e.stickyClassName,_=e.onScroll,T=e.maxContentScroll,I=e.children,P=kn(e,ace),M=E.exports.useContext(cl),D=M.prefixCls,N=M.scrollbarSize,z=M.isSticky,$=z&&!p?0:N,j=E.exports.useRef(null),U=E.exports.useCallback(function(re){nb(t,re),nb(j,re)},[]);E.exports.useEffect(function(){var re;function se(oe){var he=oe.currentTarget,Ce=oe.deltaX;Ce&&(_({currentTarget:he,scrollLeft:he.scrollLeft+Ce}),oe.preventDefault())}return(re=j.current)===null||re===void 0||re.addEventListener("wheel",se),function(){var oe;(oe=j.current)===null||oe===void 0||oe.removeEventListener("wheel",se)}},[]);var q=E.exports.useMemo(function(){return o.every(function(re){return re.width>=0})},[o]),Y=o[o.length-1],te={fixed:Y?Y.fixed:null,scrollbar:!0,onHeaderCell:function(){return{className:"".concat(D,"-cell-scrollbar")}}},Z=E.exports.useMemo(function(){return $?[].concat(Mt(i),[te]):i},[$,i]),X=E.exports.useMemo(function(){return $?[].concat(Mt(o),[te]):o},[$,o]),J=E.exports.useMemo(function(){var re=u.right,se=u.left;return me(me({},u),{},{left:f==="rtl"?[].concat(Mt(se.map(function(oe){return oe+$})),[0]):se,right:f==="rtl"?re:[].concat(Mt(re.map(function(oe){return oe+$})),[0]),isSticky:z})},[$,u,z]),ue=sce(s,a);return A("div",{style:me({overflow:"hidden"},z?{top:g,bottom:v}:{}),ref:U,className:je(n,ae({},b,!!b)),children:it("table",{style:{tableLayout:"fixed",visibility:r||ue?null:"hidden"},children:[(!r||!T||q)&&A(dV,{colWidths:ue?[].concat(Mt(ue),[$]):[],columCount:a+1,columns:X}),I(me(me({},P),{},{stickyOffsets:J,columns:Z,flattenColumns:X}))]})})});KE.displayName="FixedHolder";var lce=[],cce={},f0="rc-table-internal-hook",uce=E.exports.memo(function(e){var t=e.children;return t},function(e,t){return kd(e.props,t.props)?e.pingLeft!==t.pingLeft||e.pingRight!==t.pingRight:!1});function jd(e){var t,n=e.prefixCls,r=e.className,i=e.rowClassName,o=e.style,s=e.data,a=e.rowKey,u=e.scroll,f=e.tableLayout,p=e.direction,g=e.title,v=e.footer,b=e.summary,_=e.id,T=e.showHeader,I=e.components,P=e.emptyText,M=e.onRow,D=e.onHeaderRow,N=e.internalHooks,z=e.transformColumns,$=e.internalRefs,j=e.sticky,U=s||lce,q=!!U.length,Y=E.exports.useCallback(function(Vn,er){return Q8(I||{},Vn)||er},[I]),te=E.exports.useMemo(function(){return typeof a=="function"?a:function(Vn){var er=Vn&&Vn[a];return er}},[a]),Z=Hle(e),X=Z.expandIcon,J=Z.expandedRowKeys,ue=Z.defaultExpandedRowKeys,re=Z.defaultExpandAllRows,se=Z.expandedRowRender,oe=Z.columnTitle,he=Z.onExpand,Ce=Z.onExpandedRowsChange,Se=Z.expandRowByClick,be=Z.rowExpandable,Re=Z.expandIconColumnIndex,Ie=Z.expandedRowClassName,Me=Z.childrenColumnName,Ae=Z.indentSize,ze=X||tce,Ke=Me||"children",Ue=E.exports.useMemo(function(){return se?"row":e.expandable&&N===f0&&e.expandable.__PARENT_RENDER_ICON__||U.some(function(Vn){return Vn&&on(Vn)==="object"&&Vn[Ke]})?"nest":!1},[!!se,U]),pt=E.exports.useState(function(){return ue||(re?nce(U,te,Ke):[])}),gt=$e(pt,2),Ot=gt[0],qe=gt[1],Ct=E.exports.useMemo(function(){return new Set(J||Ot||[])},[J,Ot]),ot=E.exports.useCallback(function(Vn){var er=te(Vn,U.indexOf(Vn)),Fr,zi=Ct.has(er);zi?(Ct.delete(er),Fr=Mt(Ct)):Fr=[].concat(Mt(Ct),[er]),qe(Fr),he&&he(!zi,Vn),Ce&&Ce(Fr)},[te,Ct,U,he,Ce]),vt=E.exports.useState(0),yt=$e(vt,2),Tt=yt[0],et=yt[1],ct=qle(me(me(me({},e),Z),{},{expandable:!!se,columnTitle:oe,expandedKeys:Ct,getRowKey:te,onTriggerExpand:ot,expandIcon:ze,expandIconColumnIndex:Re,direction:p}),N===f0?z:null),at=$e(ct,2),He=at[0],ut=at[1],bt=E.exports.useMemo(function(){return{columns:He,flattenColumns:ut}},[He,ut]),Dt=E.exports.useRef(),Lt=E.exports.useRef(),Ht=E.exports.useRef(),Fe=E.exports.useRef(),Ye=E.exports.useRef(),Zt=E.exports.useState(!1),an=$e(Zt,2),Kt=an[0],Vt=an[1],It=E.exports.useState(!1),Xt=$e(It,2),pn=Xt[0],tt=Xt[1],At=uV(new Map),qt=$e(At,2),En=qt[0],yn=qt[1],St=t1(ut),Pn=St.map(function(Vn){return En.get(Vn)}),_n=E.exports.useMemo(function(){return Pn},[Pn.join("_")]),tn=Xle(_n,ut.length,p),Ft=u&&jE(u.y),dt=u&&jE(u.x)||Boolean(Z.fixed),mt=dt&&ut.some(function(Vn){var er=Vn.fixed;return er}),$t=E.exports.useRef(),Wt=oce(j,n),mn=Wt.isSticky,An=Wt.offsetHeader,Qn=Wt.offsetSummary,Jn=Wt.offsetScroll,ye=Wt.stickyClassName,W=Wt.container,Q=b==null?void 0:b(U),fe=(Ft||mn)&&E.exports.isValidElement(Q)&&Q.type===r1&&Q.props.fixed,ce,xe,ke;Ft&&(xe={overflowY:"scroll",maxHeight:u.y}),dt&&(ce={overflowX:"auto"},Ft||(xe={overflowY:"hidden"}),ke={width:(u==null?void 0:u.x)===!0?"auto":u==null?void 0:u.x,minWidth:"100%"});var we=E.exports.useCallback(function(Vn,er){fI(Dt.current)&&yn(function(Fr){if(Fr.get(Vn)!==er){var zi=new Map(Fr);return zi.set(Vn,er),zi}return Fr})},[]),Pe=Zle(null),Le=$e(Pe,2),Ze=Le[0],Xe=Le[1];function Ve(Vn,er){!er||(typeof er=="function"?er(Vn):er.scrollLeft!==Vn&&(er.scrollLeft=Vn))}var Bt=function(er){var Fr=er.currentTarget,zi=er.scrollLeft,As=p==="rtl",Ho=typeof zi=="number"?zi:Fr.scrollLeft,dl=Fr||cce;if(!Xe()||Xe()===dl){var cs;Ze(dl),Ve(Ho,Lt.current),Ve(Ho,Ht.current),Ve(Ho,Ye.current),Ve(Ho,(cs=$t.current)===null||cs===void 0?void 0:cs.setScrollLeft)}if(Fr){var Cr=Fr.scrollWidth,us=Fr.clientWidth;if(Cr===us){Vt(!1),tt(!1);return}As?(Vt(-Ho<Cr-us),tt(-Ho>0)):(Vt(Ho>0),tt(Ho<Cr-us))}},Et=function(){dt&&Ht.current?Bt({currentTarget:Ht.current}):(Vt(!1),tt(!1))},nt=function(er){var Fr=er.width;Fr!==Tt&&(Et(),et(Dt.current?Dt.current.offsetWidth:Fr))},zt=E.exports.useRef(!1);E.exports.useEffect(function(){zt.current&&Et()},[dt,s,He.length]),E.exports.useEffect(function(){zt.current=!0},[]);var Gt=E.exports.useState(0),wn=$e(Gt,2),dn=wn[0],Cn=wn[1],jn=E.exports.useState(!0),or=$e(jn,2),Wr=or[0],dr=or[1];E.exports.useEffect(function(){Ht.current instanceof Element?Cn(GA(Ht.current).width):Cn(GA(Fe.current).width),dr(zE("position","sticky"))},[]),E.exports.useEffect(function(){N===f0&&$&&($.body.current=Ht.current)});var zr=Y(["table"],"table"),On=E.exports.useMemo(function(){return f||(mt?(u==null?void 0:u.x)==="max-content"?"auto":"fixed":Ft||mn||ut.some(function(Vn){var er=Vn.ellipsis;return er})?"fixed":"auto")},[Ft,mt,ut,f,mn]),Mn,Nn={colWidths:_n,columCount:ut.length,stickyOffsets:tn,onHeaderRow:D,fixHeader:Ft,scroll:u},ti=E.exports.useMemo(function(){return q?null:typeof P=="function"?P():P},[q,P]),wr=A(cV,{data:U,measureColumnWidth:Ft||dt||mn,expandedKeys:Ct,rowExpandable:be,getRowKey:te,onRow:M,emptyNode:ti,childrenColumnName:Ke}),Wn=A(dV,{colWidths:ut.map(function(Vn){var er=Vn.width;return er}),columns:ut}),Bn=Y(["body"]);if(Ft||mn){var rr;typeof Bn=="function"?(rr=Bn(U,{scrollbarSize:dn,ref:Ht,onScroll:Bt}),Nn.colWidths=ut.map(function(Vn,er){var Fr=Vn.width,zi=er===He.length-1?Fr-dn:Fr;return typeof zi=="number"&&!Number.isNaN(zi)?zi:(Lr(!1,"When use `components.body` with render props. Each column should have a fixed `width` value."),0)})):rr=A("div",{style:me(me({},ce),xe),onScroll:Bt,ref:Ht,className:je("".concat(n,"-body")),children:it(zr,{style:me(me({},ke),{},{tableLayout:On}),children:[Wn,wr,!fe&&Q&&A(mx,{stickyOffsets:tn,flattenColumns:ut,children:Q})]})});var Er=me(me(me({noData:!U.length,maxContentScroll:dt&&u.x==="max-content"},Nn),bt),{},{direction:p,stickyClassName:ye,onScroll:Bt});Mn=it(nr,{children:[T!==!1&&A(KE,{...Er,stickyTopOffset:An,className:"".concat(n,"-header"),ref:Lt,children:function(Vn){return it(nr,{children:[A(vN,{...Vn}),fe==="top"&&A(mx,{...Vn,children:Q})]})}}),rr,fe&&fe!=="top"&&A(KE,{...Er,stickyBottomOffset:Qn,className:"".concat(n,"-summary"),ref:Ye,children:function(Vn){return A(mx,{...Vn,children:Q})}}),mn&&A(ice,{ref:$t,offsetScroll:Jn,scrollBodyRef:Ht,onScroll:Bt,container:W})]})}else Mn=A("div",{style:me(me({},ce),xe),className:je("".concat(n,"-content")),onScroll:Bt,ref:Ht,children:it(zr,{style:me(me({},ke),{},{tableLayout:On}),children:[Wn,T!==!1&&A(vN,{...Nn,...bt}),wr,Q&&A(mx,{stickyOffsets:tn,flattenColumns:ut,children:Q})]})});var Tr=Zl(e,{aria:!0,data:!0}),Gr=A("div",{className:je(n,r,(t={},ae(t,"".concat(n,"-rtl"),p==="rtl"),ae(t,"".concat(n,"-ping-left"),Kt),ae(t,"".concat(n,"-ping-right"),pn),ae(t,"".concat(n,"-layout-fixed"),f==="fixed"),ae(t,"".concat(n,"-fixed-header"),Ft),ae(t,"".concat(n,"-fixed-column"),mt),ae(t,"".concat(n,"-scroll-horizontal"),dt),ae(t,"".concat(n,"-has-fix-left"),ut[0]&&ut[0].fixed),ae(t,"".concat(n,"-has-fix-right"),ut[ut.length-1]&&ut[ut.length-1].fixed==="right"),t)),style:o,id:_,ref:Dt,...Tr,children:it(uce,{pingLeft:Kt,pingRight:pn,props:me(me({},e),{},{stickyOffsets:tn,mergedExpandedKeys:Ct}),children:[g&&A(yN,{className:"".concat(n,"-title"),children:g(U)}),A("div",{ref:Fe,className:"".concat(n,"-container"),children:Mn}),v&&A(yN,{className:"".concat(n,"-footer"),children:v(U)})]})});dt&&(Gr=A(Ql,{onResize:nt,children:Gr}));var ko=E.exports.useMemo(function(){return{prefixCls:n,getComponent:Y,scrollbarSize:dn,direction:p,fixedInfoList:ut.map(function(Vn,er){return jI(er,er,ut,tn,p)}),isSticky:mn}},[n,Y,dn,p,ut,tn,mn]),rc=E.exports.useMemo(function(){return me(me({},bt),{},{tableLayout:On,rowClassName:i,expandedRowClassName:Ie,expandIcon:ze,expandableType:Ue,expandRowByClick:Se,expandedRowRender:se,onTriggerExpand:ot,expandIconColumnIndex:Re,indentSize:Ae,allColumnsFixedLeft:bt.flattenColumns.every(function(Vn){return Vn.fixed==="left"})})},[bt,On,i,Ie,ze,Ue,Se,se,ot,Re,Ae]),Wd=E.exports.useMemo(function(){return{componentWidth:Tt,fixHeader:Ft,fixColumn:mt,horizonScroll:dt}},[Tt,Ft,mt,dt]),ls=E.exports.useMemo(function(){return{onColumnResize:we}},[we]);return A(J8.Provider,{value:Wr,children:A(cl.Provider,{value:ko,children:A(n1.Provider,{value:rc,children:A(iV.Provider,{value:Wd,children:A(aV.Provider,{value:ls,children:Gr})})})})})}jd.EXPAND_COLUMN=Ju;jd.Column=Ple;jd.ColumnGroup=Ele;jd.Summary=hV;jd.defaultProps={rowKey:"key",prefixCls:"rc-table",emptyText:function(){return"No Data"}};function dce(e){return null}function fce(e){return null}function hce(e){return function(n){var r,i=n.prefixCls,o=n.onExpand,s=n.record,a=n.expanded,u=n.expandable,f="".concat(i,"-row-expand-icon");return A("button",{type:"button",onClick:function(g){o(s,g),g.stopPropagation()},className:je(f,(r={},ae(r,"".concat(f,"-spaced"),!u),ae(r,"".concat(f,"-expanded"),u&&a),ae(r,"".concat(f,"-collapsed"),u&&!a),r)),"aria-label":a?e.collapse:e.expand,"aria-expanded":a})}}function bh(e,t){return"key"in e&&e.key!==void 0&&e.key!==null?e.key:e.dataIndex?Array.isArray(e.dataIndex)?e.dataIndex.join("."):e.dataIndex:t}function i1(e,t){return t?"".concat(t,"-").concat(e):"".concat(e)}function o1(e,t){return typeof e=="function"?e(t):e}function pce(e,t){var n=o1(e,t);return Object.prototype.toString.call(n)==="[object Object]"?"":n}var mce={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M349 838c0 17.7 14.2 32 31.8 32h262.4c17.6 0 31.8-14.3 31.8-32V642H349v196zm531.1-684H143.9c-24.5 0-39.8 26.7-27.5 48l221.3 376h348.8l221.3-376c12.1-21.3-3.2-48-27.7-48z"}}]},name:"filter",theme:"filled"};const gce=mce;var pV=function(t,n){return A(Yn,{...me(me({},t),{},{ref:n,icon:gce})})};pV.displayName="FilterFilled";const vce=E.exports.forwardRef(pV);function yce(){this.__data__=[],this.size=0}var xce=yce;function bce(e,t){return e===t||e!==e&&t!==t}var mV=bce,_ce=mV;function wce(e,t){for(var n=e.length;n--;)if(_ce(e[n][0],t))return n;return-1}var a1=wce,Cce=a1,Sce=Array.prototype,Ece=Sce.splice;function Pce(e){var t=this.__data__,n=Cce(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():Ece.call(t,n,1),--this.size,!0}var Tce=Pce,Ice=a1;function kce(e){var t=this.__data__,n=Ice(t,e);return n<0?void 0:t[n][1]}var Mce=kce,Rce=a1;function Oce(e){return Rce(this.__data__,e)>-1}var Dce=Oce,Ace=a1;function Nce(e,t){var n=this.__data__,r=Ace(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var Lce=Nce,zce=xce,Fce=Tce,$ce=Mce,Bce=Dce,Vce=Lce;function Uh(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Uh.prototype.clear=zce;Uh.prototype.delete=Fce;Uh.prototype.get=$ce;Uh.prototype.has=Bce;Uh.prototype.set=Vce;var s1=Uh,Uce=s1;function jce(){this.__data__=new Uce,this.size=0}var Hce=jce;function Kce(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var Wce=Kce;function Gce(e){return this.__data__.get(e)}var qce=Gce;function Zce(e){return this.__data__.has(e)}var Xce=Zce,Yce=ov,Qce=Y_,Jce="[object AsyncFunction]",eue="[object Function]",tue="[object GeneratorFunction]",nue="[object Proxy]";function rue(e){if(!Qce(e))return!1;var t=Yce(e);return t==eue||t==tue||t==Jce||t==nue}var gV=rue,iue=sl,oue=iue["__core-js_shared__"],aue=oue,YC=aue,bN=function(){var e=/[^.]+$/.exec(YC&&YC.keys&&YC.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function sue(e){return!!bN&&bN in e}var lue=sue,cue=Function.prototype,uue=cue.toString;function due(e){if(e!=null){try{return uue.call(e)}catch{}try{return e+""}catch{}}return""}var vV=due,fue=gV,hue=lue,pue=Y_,mue=vV,gue=/[\\^$.*+?()[\]{}|]/g,vue=/^\[object .+?Constructor\]$/,yue=Function.prototype,xue=Object.prototype,bue=yue.toString,_ue=xue.hasOwnProperty,wue=RegExp("^"+bue.call(_ue).replace(gue,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Cue(e){if(!pue(e)||hue(e))return!1;var t=fue(e)?wue:vue;return t.test(mue(e))}var Sue=Cue;function Eue(e,t){return e==null?void 0:e[t]}var Pue=Eue,Tue=Sue,Iue=Pue;function kue(e,t){var n=Iue(e,t);return Tue(n)?n:void 0}var jh=kue,Mue=jh,Rue=sl,Oue=Mue(Rue,"Map"),KI=Oue,Due=jh,Aue=Due(Object,"create"),l1=Aue,_N=l1;function Nue(){this.__data__=_N?_N(null):{},this.size=0}var Lue=Nue;function zue(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Fue=zue,$ue=l1,Bue="__lodash_hash_undefined__",Vue=Object.prototype,Uue=Vue.hasOwnProperty;function jue(e){var t=this.__data__;if($ue){var n=t[e];return n===Bue?void 0:n}return Uue.call(t,e)?t[e]:void 0}var Hue=jue,Kue=l1,Wue=Object.prototype,Gue=Wue.hasOwnProperty;function que(e){var t=this.__data__;return Kue?t[e]!==void 0:Gue.call(t,e)}var Zue=que,Xue=l1,Yue="__lodash_hash_undefined__";function Que(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Xue&&t===void 0?Yue:t,this}var Jue=Que,ede=Lue,tde=Fue,nde=Hue,rde=Zue,ide=Jue;function Hh(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Hh.prototype.clear=ede;Hh.prototype.delete=tde;Hh.prototype.get=nde;Hh.prototype.has=rde;Hh.prototype.set=ide;var ode=Hh,wN=ode,ade=s1,sde=KI;function lde(){this.size=0,this.__data__={hash:new wN,map:new(sde||ade),string:new wN}}var cde=lde;function ude(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var dde=ude,fde=dde;function hde(e,t){var n=e.__data__;return fde(t)?n[typeof t=="string"?"string":"hash"]:n.map}var c1=hde,pde=c1;function mde(e){var t=pde(this,e).delete(e);return this.size-=t?1:0,t}var gde=mde,vde=c1;function yde(e){return vde(this,e).get(e)}var xde=yde,bde=c1;function _de(e){return bde(this,e).has(e)}var wde=_de,Cde=c1;function Sde(e,t){var n=Cde(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}var Ede=Sde,Pde=cde,Tde=gde,Ide=xde,kde=wde,Mde=Ede;function Kh(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Kh.prototype.clear=Pde;Kh.prototype.delete=Tde;Kh.prototype.get=Ide;Kh.prototype.has=kde;Kh.prototype.set=Mde;var yV=Kh,Rde=s1,Ode=KI,Dde=yV,Ade=200;function Nde(e,t){var n=this.__data__;if(n instanceof Rde){var r=n.__data__;if(!Ode||r.length<Ade-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Dde(r)}return n.set(e,t),this.size=n.size,this}var Lde=Nde,zde=s1,Fde=Hce,$de=Wce,Bde=qce,Vde=Xce,Ude=Lde;function Wh(e){var t=this.__data__=new zde(e);this.size=t.size}Wh.prototype.clear=Fde;Wh.prototype.delete=$de;Wh.prototype.get=Bde;Wh.prototype.has=Vde;Wh.prototype.set=Ude;var jde=Wh,Hde="__lodash_hash_undefined__";function Kde(e){return this.__data__.set(e,Hde),this}var Wde=Kde;function Gde(e){return this.__data__.has(e)}var qde=Gde,Zde=yV,Xde=Wde,Yde=qde;function Sb(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new Zde;++t<n;)this.add(e[t])}Sb.prototype.add=Sb.prototype.push=Xde;Sb.prototype.has=Yde;var Qde=Sb;function Jde(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var efe=Jde;function tfe(e,t){return e.has(t)}var nfe=tfe,rfe=Qde,ife=efe,ofe=nfe,afe=1,sfe=2;function lfe(e,t,n,r,i,o){var s=n&afe,a=e.length,u=t.length;if(a!=u&&!(s&&u>a))return!1;var f=o.get(e),p=o.get(t);if(f&&p)return f==t&&p==e;var g=-1,v=!0,b=n&sfe?new rfe:void 0;for(o.set(e,t),o.set(t,e);++g<a;){var _=e[g],T=t[g];if(r)var I=s?r(T,_,g,t,e,o):r(_,T,g,e,t,o);if(I!==void 0){if(I)continue;v=!1;break}if(b){if(!ife(t,function(P,M){if(!ofe(b,M)&&(_===P||i(_,P,n,r,o)))return b.push(M)})){v=!1;break}}else if(!(_===T||i(_,T,n,r,o))){v=!1;break}}return o.delete(e),o.delete(t),v}var xV=lfe,cfe=sl,ufe=cfe.Uint8Array,dfe=ufe;function ffe(e){var t=-1,n=Array(e.size);return e.forEach(function(r,i){n[++t]=[i,r]}),n}var hfe=ffe;function pfe(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var mfe=pfe,CN=MI,SN=dfe,gfe=mV,vfe=xV,yfe=hfe,xfe=mfe,bfe=1,_fe=2,wfe="[object Boolean]",Cfe="[object Date]",Sfe="[object Error]",Efe="[object Map]",Pfe="[object Number]",Tfe="[object RegExp]",Ife="[object Set]",kfe="[object String]",Mfe="[object Symbol]",Rfe="[object ArrayBuffer]",Ofe="[object DataView]",EN=CN?CN.prototype:void 0,QC=EN?EN.valueOf:void 0;function Dfe(e,t,n,r,i,o,s){switch(n){case Ofe:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Rfe:return!(e.byteLength!=t.byteLength||!o(new SN(e),new SN(t)));case wfe:case Cfe:case Pfe:return gfe(+e,+t);case Sfe:return e.name==t.name&&e.message==t.message;case Tfe:case kfe:return e==t+"";case Efe:var a=yfe;case Ife:var u=r&bfe;if(a||(a=xfe),e.size!=t.size&&!u)return!1;var f=s.get(e);if(f)return f==t;r|=_fe,s.set(e,t);var p=vfe(a(e),a(t),r,i,o,s);return s.delete(e),p;case Mfe:if(QC)return QC.call(e)==QC.call(t)}return!1}var Afe=Dfe;function Nfe(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var Lfe=Nfe,zfe=Lfe,Ffe=RI;function $fe(e,t,n){var r=t(e);return Ffe(e)?r:zfe(r,n(e))}var Bfe=$fe;function Vfe(e,t){for(var n=-1,r=e==null?0:e.length,i=0,o=[];++n<r;){var s=e[n];t(s,n,e)&&(o[i++]=s)}return o}var Ufe=Vfe;function jfe(){return[]}var Hfe=jfe,Kfe=Ufe,Wfe=Hfe,Gfe=Object.prototype,qfe=Gfe.propertyIsEnumerable,PN=Object.getOwnPropertySymbols,Zfe=PN?function(e){return e==null?[]:(e=Object(e),Kfe(PN(e),function(t){return qfe.call(e,t)}))}:Wfe,Xfe=Zfe;function Yfe(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var Qfe=Yfe,Jfe=ov,ehe=av,the="[object Arguments]";function nhe(e){return ehe(e)&&Jfe(e)==the}var rhe=nhe,TN=rhe,ihe=av,bV=Object.prototype,ohe=bV.hasOwnProperty,ahe=bV.propertyIsEnumerable,she=TN(function(){return arguments}())?TN:function(e){return ihe(e)&&ohe.call(e,"callee")&&!ahe.call(e,"callee")},lhe=she,Eb={exports:{}};function che(){return!1}var uhe=che;(function(e,t){var n=sl,r=uhe,i=t&&!t.nodeType&&t,o=i&&!0&&e&&!e.nodeType&&e,s=o&&o.exports===i,a=s?n.Buffer:void 0,u=a?a.isBuffer:void 0,f=u||r;e.exports=f})(Eb,Eb.exports);var dhe=9007199254740991,fhe=/^(?:0|[1-9]\d*)$/;function hhe(e,t){var n=typeof e;return t=t==null?dhe:t,!!t&&(n=="number"||n!="symbol"&&fhe.test(e))&&e>-1&&e%1==0&&e<t}var phe=hhe,mhe=9007199254740991;function ghe(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=mhe}var _V=ghe,vhe=ov,yhe=_V,xhe=av,bhe="[object Arguments]",_he="[object Array]",whe="[object Boolean]",Che="[object Date]",She="[object Error]",Ehe="[object Function]",Phe="[object Map]",The="[object Number]",Ihe="[object Object]",khe="[object RegExp]",Mhe="[object Set]",Rhe="[object String]",Ohe="[object WeakMap]",Dhe="[object ArrayBuffer]",Ahe="[object DataView]",Nhe="[object Float32Array]",Lhe="[object Float64Array]",zhe="[object Int8Array]",Fhe="[object Int16Array]",$he="[object Int32Array]",Bhe="[object Uint8Array]",Vhe="[object Uint8ClampedArray]",Uhe="[object Uint16Array]",jhe="[object Uint32Array]",Jr={};Jr[Nhe]=Jr[Lhe]=Jr[zhe]=Jr[Fhe]=Jr[$he]=Jr[Bhe]=Jr[Vhe]=Jr[Uhe]=Jr[jhe]=!0;Jr[bhe]=Jr[_he]=Jr[Dhe]=Jr[whe]=Jr[Ahe]=Jr[Che]=Jr[She]=Jr[Ehe]=Jr[Phe]=Jr[The]=Jr[Ihe]=Jr[khe]=Jr[Mhe]=Jr[Rhe]=Jr[Ohe]=!1;function Hhe(e){return xhe(e)&&yhe(e.length)&&!!Jr[vhe(e)]}var Khe=Hhe;function Whe(e){return function(t){return e(t)}}var Ghe=Whe,WE={exports:{}};(function(e,t){var n=i8,r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===r,s=o&&n.process,a=function(){try{var u=i&&i.require&&i.require("util").types;return u||s&&s.binding&&s.binding("util")}catch{}}();e.exports=a})(WE,WE.exports);var qhe=Khe,Zhe=Ghe,IN=WE.exports,kN=IN&&IN.isTypedArray,Xhe=kN?Zhe(kN):qhe,wV=Xhe,Yhe=Qfe,Qhe=lhe,Jhe=RI,epe=Eb.exports,tpe=phe,npe=wV,rpe=Object.prototype,ipe=rpe.hasOwnProperty;function ope(e,t){var n=Jhe(e),r=!n&&Qhe(e),i=!n&&!r&&epe(e),o=!n&&!r&&!i&&npe(e),s=n||r||i||o,a=s?Yhe(e.length,String):[],u=a.length;for(var f in e)(t||ipe.call(e,f))&&!(s&&(f=="length"||i&&(f=="offset"||f=="parent")||o&&(f=="buffer"||f=="byteLength"||f=="byteOffset")||tpe(f,u)))&&a.push(f);return a}var ape=ope,spe=Object.prototype;function lpe(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||spe;return e===n}var cpe=lpe;function upe(e,t){return function(n){return e(t(n))}}var dpe=upe,fpe=dpe,hpe=fpe(Object.keys,Object),ppe=hpe,mpe=cpe,gpe=ppe,vpe=Object.prototype,ype=vpe.hasOwnProperty;function xpe(e){if(!mpe(e))return gpe(e);var t=[];for(var n in Object(e))ype.call(e,n)&&n!="constructor"&&t.push(n);return t}var bpe=xpe,_pe=gV,wpe=_V;function Cpe(e){return e!=null&&wpe(e.length)&&!_pe(e)}var Spe=Cpe,Epe=ape,Ppe=bpe,Tpe=Spe;function Ipe(e){return Tpe(e)?Epe(e):Ppe(e)}var kpe=Ipe,Mpe=Bfe,Rpe=Xfe,Ope=kpe;function Dpe(e){return Mpe(e,Ope,Rpe)}var Ape=Dpe,MN=Ape,Npe=1,Lpe=Object.prototype,zpe=Lpe.hasOwnProperty;function Fpe(e,t,n,r,i,o){var s=n&Npe,a=MN(e),u=a.length,f=MN(t),p=f.length;if(u!=p&&!s)return!1;for(var g=u;g--;){var v=a[g];if(!(s?v in t:zpe.call(t,v)))return!1}var b=o.get(e),_=o.get(t);if(b&&_)return b==t&&_==e;var T=!0;o.set(e,t),o.set(t,e);for(var I=s;++g<u;){v=a[g];var P=e[v],M=t[v];if(r)var D=s?r(M,P,v,t,e,o):r(P,M,v,e,t,o);if(!(D===void 0?P===M||i(P,M,n,r,o):D)){T=!1;break}I||(I=v=="constructor")}if(T&&!I){var N=e.constructor,z=t.constructor;N!=z&&"constructor"in e&&"constructor"in t&&!(typeof N=="function"&&N instanceof N&&typeof z=="function"&&z instanceof z)&&(T=!1)}return o.delete(e),o.delete(t),T}var $pe=Fpe,Bpe=jh,Vpe=sl,Upe=Bpe(Vpe,"DataView"),jpe=Upe,Hpe=jh,Kpe=sl,Wpe=Hpe(Kpe,"Promise"),Gpe=Wpe,qpe=jh,Zpe=sl,Xpe=qpe(Zpe,"Set"),Ype=Xpe,Qpe=jh,Jpe=sl,eme=Qpe(Jpe,"WeakMap"),tme=eme,GE=jpe,qE=KI,ZE=Gpe,XE=Ype,YE=tme,CV=ov,Gh=vV,RN="[object Map]",nme="[object Object]",ON="[object Promise]",DN="[object Set]",AN="[object WeakMap]",NN="[object DataView]",rme=Gh(GE),ime=Gh(qE),ome=Gh(ZE),ame=Gh(XE),sme=Gh(YE),ed=CV;(GE&&ed(new GE(new ArrayBuffer(1)))!=NN||qE&&ed(new qE)!=RN||ZE&&ed(ZE.resolve())!=ON||XE&&ed(new XE)!=DN||YE&&ed(new YE)!=AN)&&(ed=function(e){var t=CV(e),n=t==nme?e.constructor:void 0,r=n?Gh(n):"";if(r)switch(r){case rme:return NN;case ime:return RN;case ome:return ON;case ame:return DN;case sme:return AN}return t});var lme=ed,JC=jde,cme=xV,ume=Afe,dme=$pe,LN=lme,zN=RI,FN=Eb.exports,fme=wV,hme=1,$N="[object Arguments]",BN="[object Array]",gx="[object Object]",pme=Object.prototype,VN=pme.hasOwnProperty;function mme(e,t,n,r,i,o){var s=zN(e),a=zN(t),u=s?BN:LN(e),f=a?BN:LN(t);u=u==$N?gx:u,f=f==$N?gx:f;var p=u==gx,g=f==gx,v=u==f;if(v&&FN(e)){if(!FN(t))return!1;s=!0,p=!1}if(v&&!p)return o||(o=new JC),s||fme(e)?cme(e,t,n,r,i,o):ume(e,t,u,n,r,i,o);if(!(n&hme)){var b=p&&VN.call(e,"__wrapped__"),_=g&&VN.call(t,"__wrapped__");if(b||_){var T=b?e.value():e,I=_?t.value():t;return o||(o=new JC),i(T,I,n,r,o)}}return v?(o||(o=new JC),dme(e,t,n,r,i,o)):!1}var gme=mme,vme=gme,UN=av;function SV(e,t,n,r,i){return e===t?!0:e==null||t==null||!UN(e)&&!UN(t)?e!==e&&t!==t:vme(e,t,n,r,SV,i)}var yme=SV,xme=yme;function bme(e,t){return xme(e,t)}var jN=bme;function EV(e){if(e==null)throw new TypeError("Cannot destructure "+e)}var _me=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],PV=function(t,n){var r=t.className,i=t.style,o=t.motion,s=t.motionNodes,a=t.motionType,u=t.onMotionStart,f=t.onMotionEnd,p=t.active,g=t.treeNodeRequiredProps,v=kn(t,_me),b=E.exports.useState(!0),_=$e(b,2),T=_[0],I=_[1],P=E.exports.useContext(DI),M=P.prefixCls,D=E.exports.useRef(!1),N=function(){D.current||f(),D.current=!0};return E.exports.useEffect(function(){s&&a==="hide"&&T&&I(!1)},[s]),E.exports.useEffect(function(){return s&&u(),function(){s&&N()}},[]),s?A(oa,{ref:n,visible:T,...o,motionAppear:a==="show",onAppearEnd:N,onLeaveEnd:N,children:function(z,$){var j=z.className,U=z.style;return A("div",{ref:$,className:je("".concat(M,"-treenode-motion"),j),style:U,children:s.map(function(q){var Y=Je({},(EV(q.data),q.data)),te=q.title,Z=q.key,X=q.isStart,J=q.isEnd;delete Y.children;var ue=Wm(Z,g);return E.exports.createElement(Md,{...Y,...ue,title:te,active:p,data:q.data,key:Z,isStart:X,isEnd:J})})})}}):A(Md,{domRef:n,className:r,style:i,...v,active:p})};PV.displayName="MotionTreeNode";var wme=E.exports.forwardRef(PV);function Cme(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=e.length,r=t.length;if(Math.abs(n-r)!==1)return{add:!1,key:null};function i(o,s){var a=new Map;o.forEach(function(f){a.set(f,!0)});var u=s.filter(function(f){return!a.has(f)});return u.length===1?u[0]:null}return n<r?{add:!0,key:i(e,t)}:{add:!1,key:i(t,e)}}function HN(e,t,n){var r=e.findIndex(function(a){return a.key===n}),i=e[r+1],o=t.findIndex(function(a){return a.key===n});if(i){var s=t.findIndex(function(a){return a.key===i.key});return t.slice(o+1,s)}return t.slice(o+1)}var Sme=["prefixCls","data","selectable","checkable","expandedKeys","selectedKeys","checkedKeys","loadedKeys","loadingKeys","halfCheckedKeys","keyEntities","disabled","dragging","dragOverNodeKey","dropPosition","motion","height","itemHeight","virtual","focusable","activeItem","focused","tabIndex","onKeyDown","onFocus","onBlur","onActiveChange","onListChangeStart","onListChangeEnd"],KN={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},Eme=function(){},Rd="RC_TREE_MOTION_".concat(Math.random()),QE={key:Rd},TV={key:Rd,level:0,index:0,pos:"0",node:QE,nodes:[QE]},WN={parent:null,children:[],pos:TV.pos,data:QE,title:null,key:Rd,isStart:[],isEnd:[]};function GN(e,t,n,r){return t===!1||!n?e:e.slice(0,Math.ceil(n/r)+1)}function qN(e){var t=e.key,n=e.pos;return sv(t,n)}function Pme(e){for(var t=String(e.data.key),n=e;n.parent;)n=n.parent,t="".concat(n.data.key," > ").concat(t);return t}var IV=E.exports.forwardRef(function(e,t){var n=e.prefixCls,r=e.data;e.selectable,e.checkable;var i=e.expandedKeys,o=e.selectedKeys,s=e.checkedKeys,a=e.loadedKeys,u=e.loadingKeys,f=e.halfCheckedKeys,p=e.keyEntities,g=e.disabled,v=e.dragging,b=e.dragOverNodeKey,_=e.dropPosition,T=e.motion,I=e.height,P=e.itemHeight,M=e.virtual,D=e.focusable,N=e.activeItem,z=e.focused,$=e.tabIndex,j=e.onKeyDown,U=e.onFocus,q=e.onBlur,Y=e.onActiveChange,te=e.onListChangeStart,Z=e.onListChangeEnd,X=kn(e,Sme),J=E.exports.useRef(null),ue=E.exports.useRef(null);E.exports.useImperativeHandle(t,function(){return{scrollTo:function(at){J.current.scrollTo(at)},getIndentWidth:function(){return ue.current.offsetWidth}}});var re=E.exports.useState(i),se=$e(re,2),oe=se[0],he=se[1],Ce=E.exports.useState(r),Se=$e(Ce,2),be=Se[0],Re=Se[1],Ie=E.exports.useState(r),Me=$e(Ie,2),Ae=Me[0],ze=Me[1],Ke=E.exports.useState([]),Ue=$e(Ke,2),pt=Ue[0],gt=Ue[1],Ot=E.exports.useState(null),qe=$e(Ot,2),Ct=qe[0],ot=qe[1],vt=E.exports.useRef(r);vt.current=r;function yt(){var ct=vt.current;Re(ct),ze(ct),gt([]),ot(null),Z()}E.exports.useEffect(function(){he(i);var ct=Cme(oe,i);if(ct.key!==null)if(ct.add){var at=be.findIndex(function(Ht){var Fe=Ht.key;return Fe===ct.key}),He=GN(HN(be,r,ct.key),M,I,P),ut=be.slice();ut.splice(at+1,0,WN),ze(ut),gt(He),ot("show")}else{var bt=r.findIndex(function(Ht){var Fe=Ht.key;return Fe===ct.key}),Dt=GN(HN(r,be,ct.key),M,I,P),Lt=r.slice();Lt.splice(bt+1,0,WN),ze(Lt),gt(Dt),ot("hide")}else be!==r&&(Re(r),ze(r))},[i,r]),E.exports.useEffect(function(){v||yt()},[v]);var Tt=T?Ae:r,et={expandedKeys:i,selectedKeys:o,loadedKeys:a,loadingKeys:u,checkedKeys:s,halfCheckedKeys:f,dragOverNodeKey:b,dropPosition:_,keyEntities:p};return it(nr,{children:[z&&N&&A("span",{style:KN,"aria-live":"assertive",children:Pme(N)}),A("div",{children:A("input",{style:KN,disabled:D===!1||g,tabIndex:D!==!1?$:null,onKeyDown:j,onFocus:U,onBlur:q,value:"",onChange:Eme,"aria-label":"for screen reader"})}),A("div",{className:"".concat(n,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0},children:A("div",{className:"".concat(n,"-indent"),children:A("div",{ref:ue,className:"".concat(n,"-indent-unit")})})}),A(mI,{...X,data:Tt,itemKey:qN,height:I,fullHeight:!1,virtual:M,itemHeight:P,prefixCls:"".concat(n,"-list"),ref:J,onVisibleChange:function(at,He){var ut=new Set(at),bt=He.filter(function(Dt){return!ut.has(Dt)});bt.some(function(Dt){return qN(Dt)===Rd})&&yt()},children:function(ct){var at=ct.pos,He=Je({},(EV(ct.data),ct.data)),ut=ct.title,bt=ct.key,Dt=ct.isStart,Lt=ct.isEnd,Ht=sv(bt,at);delete He.key,delete He.children;var Fe=Wm(Ht,et);return A(wme,{...He,...Fe,title:ut,active:!!N&&bt===N.key,pos:at,data:ct.data,isStart:Dt,isEnd:Lt,motion:T,motionNodes:bt===Rd?pt:null,motionType:Ct,onMotionStart:te,onMotionEnd:yt,treeNodeRequiredProps:et,onMouseMove:function(){Y(null)}})}})]})});IV.displayName="NodeList";function Tme(e){var t=e.dropPosition,n=e.dropLevelOffset,r=e.indent,i={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(t){case-1:i.top=0,i.left=-n*r;break;case 1:i.bottom=0,i.left=-n*r;break;case 0:i.bottom=0,i.left=r;break}return A("div",{style:i})}var Ime=10,u1=function(e){si(n,e);var t=li(n);function n(){var r;jr(this,n);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return r=t.call.apply(t,[this].concat(o)),r.destroyed=!1,r.delayedDragEnterLogic=void 0,r.loadingRetryTimes={},r.state={keyEntities:{},indent:null,selectedKeys:[],checkedKeys:[],halfCheckedKeys:[],loadedKeys:[],loadingKeys:[],expandedKeys:[],draggingNodeKey:null,dragChildrenKeys:[],dropTargetKey:null,dropPosition:null,dropContainerKey:null,dropLevelOffset:null,dropTargetPos:null,dropAllowed:!0,dragOverNodeKey:null,treeData:[],flattenNodes:[],focused:!1,activeKey:null,listChanging:!1,prevProps:null,fieldNames:bb()},r.dragStartMousePosition=null,r.dragNode=void 0,r.currentMouseOverDroppableNodeKey=null,r.listRef=E.exports.createRef(),r.onNodeDragStart=function(a,u){var f=r.state,p=f.expandedKeys,g=f.keyEntities,v=r.props.onDragStart,b=u.props.eventKey;r.dragNode=u,r.dragStartMousePosition={x:a.clientX,y:a.clientY};var _=Ks(p,b);r.setState({draggingNodeKey:b,dragChildrenKeys:voe(b,g),indent:r.listRef.current.getIndentWidth()}),r.setExpandedKeys(_),window.addEventListener("dragend",r.onWindowDragEnd),v==null||v({event:a,node:Di(u.props)})},r.onNodeDragEnter=function(a,u){var f=r.state,p=f.expandedKeys,g=f.keyEntities,v=f.dragChildrenKeys,b=f.flattenNodes,_=f.indent,T=r.props,I=T.onDragEnter,P=T.onExpand,M=T.allowDrop,D=T.direction,N=u.props,z=N.pos,$=N.eventKey,j=Fn(r),U=j.dragNode;if(r.currentMouseOverDroppableNodeKey!==$&&(r.currentMouseOverDroppableNodeKey=$),!U){r.resetDragState();return}var q=BA(a,U,u,_,r.dragStartMousePosition,M,b,g,p,D),Y=q.dropPosition,te=q.dropLevelOffset,Z=q.dropTargetKey,X=q.dropContainerKey,J=q.dropTargetPos,ue=q.dropAllowed,re=q.dragOverNodeKey;if(v.indexOf(Z)!==-1||!ue){r.resetDragState();return}if(r.delayedDragEnterLogic||(r.delayedDragEnterLogic={}),Object.keys(r.delayedDragEnterLogic).forEach(function(se){clearTimeout(r.delayedDragEnterLogic[se])}),U.props.eventKey!==u.props.eventKey&&(a.persist(),r.delayedDragEnterLogic[z]=window.setTimeout(function(){if(r.state.draggingNodeKey!==null){var se=Mt(p),oe=g[u.props.eventKey];oe&&(oe.children||[]).length&&(se=Tl(p,u.props.eventKey)),"expandedKeys"in r.props||r.setExpandedKeys(se),P==null||P(se,{node:Di(u.props),expanded:!0,nativeEvent:a.nativeEvent})}},800)),U.props.eventKey===Z&&te===0){r.resetDragState();return}r.setState({dragOverNodeKey:re,dropPosition:Y,dropLevelOffset:te,dropTargetKey:Z,dropContainerKey:X,dropTargetPos:J,dropAllowed:ue}),I==null||I({event:a,node:Di(u.props),expandedKeys:p})},r.onNodeDragOver=function(a,u){var f=r.state,p=f.dragChildrenKeys,g=f.flattenNodes,v=f.keyEntities,b=f.expandedKeys,_=f.indent,T=r.props,I=T.onDragOver,P=T.allowDrop,M=T.direction,D=Fn(r),N=D.dragNode;if(!!N){var z=BA(a,N,u,_,r.dragStartMousePosition,P,g,v,b,M),$=z.dropPosition,j=z.dropLevelOffset,U=z.dropTargetKey,q=z.dropContainerKey,Y=z.dropAllowed,te=z.dropTargetPos,Z=z.dragOverNodeKey;p.indexOf(U)!==-1||!Y||(N.props.eventKey===U&&j===0?r.state.dropPosition===null&&r.state.dropLevelOffset===null&&r.state.dropTargetKey===null&&r.state.dropContainerKey===null&&r.state.dropTargetPos===null&&r.state.dropAllowed===!1&&r.state.dragOverNodeKey===null||r.resetDragState():$===r.state.dropPosition&&j===r.state.dropLevelOffset&&U===r.state.dropTargetKey&&q===r.state.dropContainerKey&&te===r.state.dropTargetPos&&Y===r.state.dropAllowed&&Z===r.state.dragOverNodeKey||r.setState({dropPosition:$,dropLevelOffset:j,dropTargetKey:U,dropContainerKey:q,dropTargetPos:te,dropAllowed:Y,dragOverNodeKey:Z}),I==null||I({event:a,node:Di(u.props)}))}},r.onNodeDragLeave=function(a,u){r.currentMouseOverDroppableNodeKey===u.props.eventKey&&!a.currentTarget.contains(a.relatedTarget)&&(r.resetDragState(),r.currentMouseOverDroppableNodeKey=null);var f=r.props.onDragLeave;f==null||f({event:a,node:Di(u.props)})},r.onWindowDragEnd=function(a){r.onNodeDragEnd(a,null,!0),window.removeEventListener("dragend",r.onWindowDragEnd)},r.onNodeDragEnd=function(a,u){var f=r.props.onDragEnd;r.setState({dragOverNodeKey:null}),r.cleanDragState(),f==null||f({event:a,node:Di(u.props)}),r.dragNode=null,window.removeEventListener("dragend",r.onWindowDragEnd)},r.onNodeDrop=function(a,u){var f,p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,g=r.state,v=g.dragChildrenKeys,b=g.dropPosition,_=g.dropTargetKey,T=g.dropTargetPos,I=g.dropAllowed;if(!!I){var P=r.props.onDrop;if(r.setState({dragOverNodeKey:null}),r.cleanDragState(),_!==null){var M=me(me({},Wm(_,r.getTreeNodeRequiredProps())),{},{active:((f=r.getActiveItem())===null||f===void 0?void 0:f.key)===_,data:r.state.keyEntities[_].node}),D=v.indexOf(_)!==-1;Lr(!D,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var N=AI(T),z={event:a,node:Di(M),dragNode:r.dragNode?Di(r.dragNode.props):null,dragNodesKeys:[r.dragNode.props.eventKey].concat(v),dropToGap:b!==0,dropPosition:b+Number(N[N.length-1])};p||P==null||P(z),r.dragNode=null}}},r.cleanDragState=function(){var a=r.state.draggingNodeKey;a!==null&&r.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),r.dragStartMousePosition=null,r.currentMouseOverDroppableNodeKey=null},r.triggerExpandActionExpand=function(a,u){var f=r.state,p=f.expandedKeys,g=f.flattenNodes,v=u.expanded,b=u.key,_=u.isLeaf;if(!(_||a.shiftKey||a.metaKey||a.ctrlKey)){var T=g.filter(function(P){return P.key===b})[0],I=Di(me(me({},Wm(b,r.getTreeNodeRequiredProps())),{},{data:T.data}));r.setExpandedKeys(v?Ks(p,b):Tl(p,b)),r.onNodeExpand(a,I)}},r.onNodeClick=function(a,u){var f=r.props,p=f.onClick,g=f.expandAction;g==="click"&&r.triggerExpandActionExpand(a,u),p==null||p(a,u)},r.onNodeDoubleClick=function(a,u){var f=r.props,p=f.onDoubleClick,g=f.expandAction;g==="doubleClick"&&r.triggerExpandActionExpand(a,u),p==null||p(a,u)},r.onNodeSelect=function(a,u){var f=r.state.selectedKeys,p=r.state,g=p.keyEntities,v=p.fieldNames,b=r.props,_=b.onSelect,T=b.multiple,I=u.selected,P=u[v.key],M=!I;M?T?f=Tl(f,P):f=[P]:f=Ks(f,P);var D=f.map(function(N){var z=g[N];return z?z.node:null}).filter(function(N){return N});r.setUncontrolledState({selectedKeys:f}),_==null||_(f,{event:"select",selected:M,node:u,selectedNodes:D,nativeEvent:a.nativeEvent})},r.onNodeCheck=function(a,u,f){var p=r.state,g=p.keyEntities,v=p.checkedKeys,b=p.halfCheckedKeys,_=r.props,T=_.checkStrictly,I=_.onCheck,P=u.key,M,D={event:"check",node:u,checked:f,nativeEvent:a.nativeEvent};if(T){var N=f?Tl(v,P):Ks(v,P),z=Ks(b,P);M={checked:N,halfChecked:z},D.checkedNodes=N.map(function(te){return g[te]}).filter(function(te){return te}).map(function(te){return te.node}),r.setUncontrolledState({checkedKeys:N})}else{var $=jl([].concat(Mt(v),[P]),!0,g),j=$.checkedKeys,U=$.halfCheckedKeys;if(!f){var q=new Set(j);q.delete(P);var Y=jl(Array.from(q),{checked:!1,halfCheckedKeys:U},g);j=Y.checkedKeys,U=Y.halfCheckedKeys}M=j,D.checkedNodes=[],D.checkedNodesPositions=[],D.halfCheckedKeys=U,j.forEach(function(te){var Z=g[te];if(!!Z){var X=Z.node,J=Z.pos;D.checkedNodes.push(X),D.checkedNodesPositions.push({node:X,pos:J})}}),r.setUncontrolledState({checkedKeys:j},!1,{halfCheckedKeys:U})}I==null||I(M,D)},r.onNodeLoad=function(a){var u=a.key,f=new Promise(function(p,g){r.setState(function(v){var b=v.loadedKeys,_=b===void 0?[]:b,T=v.loadingKeys,I=T===void 0?[]:T,P=r.props,M=P.loadData,D=P.onLoad;if(!M||_.indexOf(u)!==-1||I.indexOf(u)!==-1)return null;var N=M(a);return N.then(function(){var z=r.state.loadedKeys,$=Tl(z,u);D==null||D($,{event:"load",node:a}),r.setUncontrolledState({loadedKeys:$}),r.setState(function(j){return{loadingKeys:Ks(j.loadingKeys,u)}}),p()}).catch(function(z){if(r.setState(function(j){return{loadingKeys:Ks(j.loadingKeys,u)}}),r.loadingRetryTimes[u]=(r.loadingRetryTimes[u]||0)+1,r.loadingRetryTimes[u]>=Ime){var $=r.state.loadedKeys;Lr(!1,"Retry for `loadData` many times but still failed. No more retry."),r.setUncontrolledState({loadedKeys:Tl($,u)}),p()}g(z)}),{loadingKeys:Tl(I,u)}})});return f.catch(function(){}),f},r.onNodeMouseEnter=function(a,u){var f=r.props.onMouseEnter;f==null||f({event:a,node:u})},r.onNodeMouseLeave=function(a,u){var f=r.props.onMouseLeave;f==null||f({event:a,node:u})},r.onNodeContextMenu=function(a,u){var f=r.props.onRightClick;f&&(a.preventDefault(),f({event:a,node:u}))},r.onFocus=function(){var a=r.props.onFocus;r.setState({focused:!0});for(var u=arguments.length,f=new Array(u),p=0;p<u;p++)f[p]=arguments[p];a==null||a.apply(void 0,f)},r.onBlur=function(){var a=r.props.onBlur;r.setState({focused:!1}),r.onActiveChange(null);for(var u=arguments.length,f=new Array(u),p=0;p<u;p++)f[p]=arguments[p];a==null||a.apply(void 0,f)},r.getTreeNodeRequiredProps=function(){var a=r.state,u=a.expandedKeys,f=a.selectedKeys,p=a.loadedKeys,g=a.loadingKeys,v=a.checkedKeys,b=a.halfCheckedKeys,_=a.dragOverNodeKey,T=a.dropPosition,I=a.keyEntities;return{expandedKeys:u||[],selectedKeys:f||[],loadedKeys:p||[],loadingKeys:g||[],checkedKeys:v||[],halfCheckedKeys:b||[],dragOverNodeKey:_,dropPosition:T,keyEntities:I}},r.setExpandedKeys=function(a){var u=r.state,f=u.treeData,p=u.fieldNames,g=jC(f,a,p);r.setUncontrolledState({expandedKeys:a,flattenNodes:g},!0)},r.onNodeExpand=function(a,u){var f=r.state.expandedKeys,p=r.state,g=p.listChanging,v=p.fieldNames,b=r.props,_=b.onExpand,T=b.loadData,I=u.expanded,P=u[v.key];if(!g){var M=f.indexOf(P),D=!I;if(Lr(I&&M!==-1||!I&&M===-1,"Expand state not sync with index check"),D?f=Tl(f,P):f=Ks(f,P),r.setExpandedKeys(f),_==null||_(f,{node:u,expanded:D,nativeEvent:a.nativeEvent}),D&&T){var N=r.onNodeLoad(u);N&&N.then(function(){var z=jC(r.state.treeData,f,v);r.setUncontrolledState({flattenNodes:z})}).catch(function(){var z=r.state.expandedKeys,$=Ks(z,P);r.setExpandedKeys($)})}}},r.onListChangeStart=function(){r.setUncontrolledState({listChanging:!0})},r.onListChangeEnd=function(){setTimeout(function(){r.setUncontrolledState({listChanging:!1})})},r.onActiveChange=function(a){var u=r.state.activeKey,f=r.props.onActiveChange;u!==a&&(r.setState({activeKey:a}),a!==null&&r.scrollTo({key:a}),f==null||f(a))},r.getActiveItem=function(){var a=r.state,u=a.activeKey,f=a.flattenNodes;return u===null?null:f.find(function(p){var g=p.key;return g===u})||null},r.offsetActiveKey=function(a){var u=r.state,f=u.flattenNodes,p=u.activeKey,g=f.findIndex(function(_){var T=_.key;return T===p});g===-1&&a<0&&(g=f.length),g=(g+a+f.length)%f.length;var v=f[g];if(v){var b=v.key;r.onActiveChange(b)}else r.onActiveChange(null)},r.onKeyDown=function(a){var u=r.state,f=u.activeKey,p=u.expandedKeys,g=u.checkedKeys,v=u.fieldNames,b=r.props,_=b.onKeyDown,T=b.checkable,I=b.selectable;switch(a.which){case Pt.UP:{r.offsetActiveKey(-1),a.preventDefault();break}case Pt.DOWN:{r.offsetActiveKey(1),a.preventDefault();break}}var P=r.getActiveItem();if(P&&P.data){var M=r.getTreeNodeRequiredProps(),D=P.data.isLeaf===!1||!!(P.data[v.children]||[]).length,N=Di(me(me({},Wm(f,M)),{},{data:P.data,active:!0}));switch(a.which){case Pt.LEFT:{D&&p.includes(f)?r.onNodeExpand({},N):P.parent&&r.onActiveChange(P.parent.key),a.preventDefault();break}case Pt.RIGHT:{D&&!p.includes(f)?r.onNodeExpand({},N):P.children&&P.children.length&&r.onActiveChange(P.children[0].key),a.preventDefault();break}case Pt.ENTER:case Pt.SPACE:{T&&!N.disabled&&N.checkable!==!1&&!N.disableCheckbox?r.onNodeCheck({},N,!g.includes(f)):!T&&I&&!N.disabled&&N.selectable!==!1&&r.onNodeSelect({},N);break}}}_==null||_(a)},r.setUncontrolledState=function(a){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!r.destroyed){var p=!1,g=!0,v={};Object.keys(a).forEach(function(b){if(b in r.props){g=!1;return}p=!0,v[b]=a[b]}),p&&(!u||g)&&r.setState(me(me({},v),f))}},r.scrollTo=function(a){r.listRef.current.scrollTo(a)},r}return Hr(n,[{key:"componentDidMount",value:function(){this.destroyed=!1,this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var i=this.props.activeKey;i!==void 0&&i!==this.state.activeKey&&(this.setState({activeKey:i}),i!==null&&this.scrollTo({key:i}))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("dragend",this.onWindowDragEnd),this.destroyed=!0}},{key:"resetDragState",value:function(){this.setState({dragOverNodeKey:null,dropPosition:null,dropLevelOffset:null,dropTargetKey:null,dropContainerKey:null,dropTargetPos:null,dropAllowed:!1})}},{key:"render",value:function(){var i,o=this.state,s=o.focused,a=o.flattenNodes,u=o.keyEntities,f=o.draggingNodeKey,p=o.activeKey,g=o.dropLevelOffset,v=o.dropContainerKey,b=o.dropTargetKey,_=o.dropPosition,T=o.dragOverNodeKey,I=o.indent,P=this.props,M=P.prefixCls,D=P.className,N=P.style,z=P.showLine,$=P.focusable,j=P.tabIndex,U=j===void 0?0:j,q=P.selectable,Y=P.showIcon,te=P.icon,Z=P.switcherIcon,X=P.draggable,J=P.checkable,ue=P.checkStrictly,re=P.disabled,se=P.motion,oe=P.loadData,he=P.filterTreeNode,Ce=P.height,Se=P.itemHeight,be=P.virtual,Re=P.titleRender,Ie=P.dropIndicatorRender,Me=P.onContextMenu,Ae=P.onScroll,ze=P.direction,Ke=P.rootClassName,Ue=P.rootStyle,pt=Zl(this.props,{aria:!0,data:!0}),gt;return X&&(on(X)==="object"?gt=X:typeof X=="function"?gt={nodeDraggable:X}:gt={}),A(DI.Provider,{value:{prefixCls:M,selectable:q,showIcon:Y,icon:te,switcherIcon:Z,draggable:gt,draggingNodeKey:f,checkable:J,checkStrictly:ue,disabled:re,keyEntities:u,dropLevelOffset:g,dropContainerKey:v,dropTargetKey:b,dropPosition:_,dragOverNodeKey:T,indent:I,direction:ze,dropIndicatorRender:Ie,loadData:oe,filterTreeNode:he,titleRender:Re,onNodeClick:this.onNodeClick,onNodeDoubleClick:this.onNodeDoubleClick,onNodeExpand:this.onNodeExpand,onNodeSelect:this.onNodeSelect,onNodeCheck:this.onNodeCheck,onNodeLoad:this.onNodeLoad,onNodeMouseEnter:this.onNodeMouseEnter,onNodeMouseLeave:this.onNodeMouseLeave,onNodeContextMenu:this.onNodeContextMenu,onNodeDragStart:this.onNodeDragStart,onNodeDragEnter:this.onNodeDragEnter,onNodeDragOver:this.onNodeDragOver,onNodeDragLeave:this.onNodeDragLeave,onNodeDragEnd:this.onNodeDragEnd,onNodeDrop:this.onNodeDrop},children:A("div",{role:"tree",className:je(M,D,Ke,(i={},ae(i,"".concat(M,"-show-line"),z),ae(i,"".concat(M,"-focused"),s),ae(i,"".concat(M,"-active-focused"),p!==null),i)),style:Ue,children:A(IV,{ref:this.listRef,prefixCls:M,style:N,data:a,disabled:re,selectable:q,checkable:!!J,motion:se,dragging:f!==null,height:Ce,itemHeight:Se,virtual:be,focusable:$,focused:s,tabIndex:U,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:Me,onScroll:Ae,...this.getTreeNodeRequiredProps(),...pt})})})}}],[{key:"getDerivedStateFromProps",value:function(i,o){var s=o.prevProps,a={prevProps:i};function u($){return!s&&$ in i||s&&s[$]!==i[$]}var f,p=o.fieldNames;if(u("fieldNames")&&(p=bb(i.fieldNames),a.fieldNames=p),u("treeData")?f=i.treeData:u("children")&&(Lr(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),f=d8(i.children)),f){a.treeData=f;var g=J_(f,{fieldNames:p});a.keyEntities=me(ae({},Rd,TV),g.keyEntities)}var v=a.keyEntities||o.keyEntities;if(u("expandedKeys")||s&&u("autoExpandParent"))a.expandedKeys=i.autoExpandParent||!s&&i.defaultExpandParent?FE(i.expandedKeys,v):i.expandedKeys;else if(!s&&i.defaultExpandAll){var b=me({},v);delete b[Rd],a.expandedKeys=Object.keys(b).map(function($){return b[$].key})}else!s&&i.defaultExpandedKeys&&(a.expandedKeys=i.autoExpandParent||i.defaultExpandParent?FE(i.defaultExpandedKeys,v):i.defaultExpandedKeys);if(a.expandedKeys||delete a.expandedKeys,f||a.expandedKeys){var _=jC(f||o.treeData,a.expandedKeys||o.expandedKeys,p);a.flattenNodes=_}if(i.selectable&&(u("selectedKeys")?a.selectedKeys=VA(i.selectedKeys,i):!s&&i.defaultSelectedKeys&&(a.selectedKeys=VA(i.defaultSelectedKeys,i))),i.checkable){var T;if(u("checkedKeys")?T=UC(i.checkedKeys)||{}:!s&&i.defaultCheckedKeys?T=UC(i.defaultCheckedKeys)||{}:f&&(T=UC(i.checkedKeys)||{checkedKeys:o.checkedKeys,halfCheckedKeys:o.halfCheckedKeys}),T){var I=T,P=I.checkedKeys,M=P===void 0?[]:P,D=I.halfCheckedKeys,N=D===void 0?[]:D;if(!i.checkStrictly){var z=jl(M,!0,v);M=z.checkedKeys,N=z.halfCheckedKeys}a.checkedKeys=M,a.halfCheckedKeys=N}}return u("loadedKeys")&&(a.loadedKeys=i.loadedKeys),a}}]),n}(E.exports.Component);u1.defaultProps={prefixCls:"rc-tree",showLine:!1,showIcon:!0,selectable:!0,multiple:!1,checkable:!1,disabled:!1,checkStrictly:!1,draggable:!1,defaultExpandParent:!0,autoExpandParent:!1,defaultExpandAll:!1,defaultExpandedKeys:[],defaultCheckedKeys:[],defaultSelectedKeys:[],dropIndicatorRender:Tme,allowDrop:function(){return!0},expandAction:!1};u1.TreeNode=Md;var kme={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M300 276.5a56 56 0 1056-97 56 56 0 00-56 97zm0 284a56 56 0 1056-97 56 56 0 00-56 97zM640 228a56 56 0 10112 0 56 56 0 00-112 0zm0 284a56 56 0 10112 0 56 56 0 00-112 0zM300 844.5a56 56 0 1056-97 56 56 0 00-56 97zM640 796a56 56 0 10112 0 56 56 0 00-112 0z"}}]},name:"holder",theme:"outlined"};const Mme=kme;var kV=function(t,n){return A(Yn,{...me(me({},t),{},{ref:n,icon:Mme})})};kV.displayName="HolderOutlined";const Rme=E.exports.forwardRef(kV);var ZN=4;function Ome(e){var t,n=e.dropPosition,r=e.dropLevelOffset,i=e.prefixCls,o=e.indent,s=e.direction,a=s===void 0?"ltr":s,u=a==="ltr"?"left":"right",f=a==="ltr"?"right":"left",p=(t={},ae(t,u,-r*o+ZN),ae(t,f,0),t);switch(n){case-1:p.top=-3;break;case 1:p.bottom=-3;break;default:p.bottom=-3,p[u]=o+ZN;break}return A("div",{style:p,className:"".concat(i,"-drop-indicator")})}var Dme={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"}}]},name:"caret-down",theme:"filled"};const Ame=Dme;var MV=function(t,n){return A(Yn,{...me(me({},t),{},{ref:n,icon:Ame})})};MV.displayName="CaretDownFilled";const Nme=E.exports.forwardRef(MV);var Lme={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z"}}]},name:"file",theme:"outlined"};const zme=Lme;var RV=function(t,n){return A(Yn,{...me(me({},t),{},{ref:n,icon:zme})})};RV.displayName="FileOutlined";const OV=E.exports.forwardRef(RV);var Fme={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M328 544h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"minus-square",theme:"outlined"};const $me=Fme;var DV=function(t,n){return A(Yn,{...me(me({},t),{},{ref:n,icon:$me})})};DV.displayName="MinusSquareOutlined";const Bme=E.exports.forwardRef(DV);var Vme={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M328 544h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"plus-square",theme:"outlined"};const Ume=Vme;var AV=function(t,n){return A(Yn,{...me(me({},t),{},{ref:n,icon:Ume})})};AV.displayName="PlusSquareOutlined";const jme=E.exports.forwardRef(AV);function NV(e,t,n,r){var i=r.isLeaf,o=r.expanded,s=r.loading;if(s)return A(Id,{className:"".concat(e,"-switcher-loading-icon")});var a;if(n&&on(n)==="object"&&(a=n.showLeafIcon),i){if(!n)return null;if(typeof a!="boolean"&&!!a){var u=typeof a=="function"?a(r):a,f="".concat(e,"-switcher-line-custom-icon");return Ta(u)?Pi(u,{className:je(u.props.className||"",f)}):u}return a?A(OV,{className:"".concat(e,"-switcher-line-icon")}):A("span",{className:"".concat(e,"-switcher-leaf-line")})}var p="".concat(e,"-switcher-icon"),g=typeof t=="function"?t(r):t;return Ta(g)?Pi(g,{className:je(g.props.className||"",p)}):g||(n?o?A(Bme,{className:"".concat(e,"-switcher-line-icon")}):A(jme,{className:"".concat(e,"-switcher-line-icon")}):A(Nme,{className:p}))}var Hme=E.exports.forwardRef(function(e,t){var n,r=E.exports.useContext(zn),i=r.getPrefixCls,o=r.direction,s=r.virtual,a=e.prefixCls,u=e.className,f=e.showIcon,p=f===void 0?!1:f,g=e.showLine,v=e.switcherIcon,b=e.blockNode,_=b===void 0?!1:b,T=e.children,I=e.checkable,P=I===void 0?!1:I,M=e.selectable,D=M===void 0?!0:M,N=e.draggable,z=e.motion,$=z===void 0?Je(Je({},U_),{motionAppear:!1}):z,j=i("tree",a),U=Je(Je({},e),{checkable:P,selectable:D,showIcon:p,motion:$,blockNode:_,showLine:Boolean(g),dropIndicatorRender:Ome}),q=E.exports.useMemo(function(){if(!N)return!1;var Y={};switch(on(N)){case"function":Y.nodeDraggable=N;break;case"object":Y=Je({},N);break}return Y.icon!==!1&&(Y.icon=Y.icon||A(Rme,{})),Y},[N]);return A(u1,{itemHeight:20,ref:t,virtual:s,...U,prefixCls:j,className:je((n={},ae(n,"".concat(j,"-icon-hide"),!p),ae(n,"".concat(j,"-block-node"),_),ae(n,"".concat(j,"-unselectable"),!D),ae(n,"".concat(j,"-rtl"),o==="rtl"),n),u),direction:o,checkable:P&&A("span",{className:"".concat(j,"-checkbox-inner")}),selectable:D,switcherIcon:function(te){return NV(j,v,g,te)},draggable:q,children:T})});const LV=Hme;var Kme={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 444H820V330.4c0-17.7-14.3-32-32-32H473L355.7 186.2a8.15 8.15 0 00-5.5-2.2H96c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h698c13 0 24.8-7.9 29.7-20l134-332c1.5-3.8 2.3-7.9 2.3-12 0-17.7-14.3-32-32-32zM136 256h188.5l119.6 114.4H748V444H238c-13 0-24.8 7.9-29.7 20L136 643.2V256zm635.3 512H159l103.3-256h612.4L771.3 768z"}}]},name:"folder-open",theme:"outlined"};const Wme=Kme;var zV=function(t,n){return A(Yn,{...me(me({},t),{},{ref:n,icon:Wme})})};zV.displayName="FolderOpenOutlined";const Gme=E.exports.forwardRef(zV);var qme={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 298.4H521L403.7 186.2a8.15 8.15 0 00-5.5-2.2H144c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V330.4c0-17.7-14.3-32-32-32zM840 768H184V256h188.5l119.6 114.4H840V768z"}}]},name:"folder",theme:"outlined"};const Zme=qme;var FV=function(t,n){return A(Yn,{...me(me({},t),{},{ref:n,icon:Zme})})};FV.displayName="FolderOutlined";const Xme=E.exports.forwardRef(FV);var Rl;(function(e){e[e.None=0]="None",e[e.Start=1]="Start",e[e.End=2]="End"})(Rl||(Rl={}));function WI(e,t){function n(r){var i=r.key,o=r.children;t(i,r)!==!1&&WI(o||[],t)}e.forEach(n)}function Yme(e){var t=e.treeData,n=e.expandedKeys,r=e.startKey,i=e.endKey,o=[],s=Rl.None;if(r&&r===i)return[r];if(!r||!i)return[];function a(u){return u===r||u===i}return WI(t,function(u){if(s===Rl.End)return!1;if(a(u)){if(o.push(u),s===Rl.None)s=Rl.Start;else if(s===Rl.Start)return s=Rl.End,!1}else s===Rl.Start&&o.push(u);return n.includes(u)}),o}function eS(e,t){var n=Mt(t),r=[];return WI(e,function(i,o){var s=n.indexOf(i);return s!==-1&&(r.push(o),n.splice(s,1)),!!n.length}),r}var XN=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function Qme(e){var t=e.isLeaf,n=e.expanded;return t?A(OV,{}):n?A(Gme,{}):A(Xme,{})}function YN(e){var t=e.treeData,n=e.children;return t||d8(n)}var Jme=function(t,n){var r=t.defaultExpandAll,i=t.defaultExpandParent,o=t.defaultExpandedKeys,s=XN(t,["defaultExpandAll","defaultExpandParent","defaultExpandedKeys"]),a=E.exports.useRef(),u=E.exports.useRef(),f=function(){var se=J_(YN(s)),oe=se.keyEntities,he;return r?he=Object.keys(oe):i?he=FE(s.expandedKeys||o||[],oe):he=s.expandedKeys||o,he},p=E.exports.useState(s.selectedKeys||s.defaultSelectedKeys||[]),g=$e(p,2),v=g[0],b=g[1],_=E.exports.useState(function(){return f()}),T=$e(_,2),I=T[0],P=T[1];E.exports.useEffect(function(){"selectedKeys"in s&&b(s.selectedKeys)},[s.selectedKeys]),E.exports.useEffect(function(){"expandedKeys"in s&&P(s.expandedKeys)},[s.expandedKeys]);var M=function(se,oe){var he;return"expandedKeys"in s||P(se),(he=s.onExpand)===null||he===void 0?void 0:he.call(s,se,oe)},D=function(se,oe){var he,Ce=s.multiple,Se=oe.node,be=oe.nativeEvent,Re=Se.key,Ie=Re===void 0?"":Re,Me=YN(s),Ae=Je(Je({},oe),{selected:!0}),ze=(be==null?void 0:be.ctrlKey)||(be==null?void 0:be.metaKey),Ke=be==null?void 0:be.shiftKey,Ue;Ce&&ze?(Ue=se,a.current=Ie,u.current=Ue,Ae.selectedNodes=eS(Me,Ue)):Ce&&Ke?(Ue=Array.from(new Set([].concat(Mt(u.current||[]),Mt(Yme({treeData:Me,expandedKeys:I,startKey:Ie,endKey:a.current}))))),Ae.selectedNodes=eS(Me,Ue)):(Ue=[Ie],a.current=Ie,u.current=Ue,Ae.selectedNodes=eS(Me,Ue)),(he=s.onSelect)===null||he===void 0||he.call(s,Ue,Ae),"selectedKeys"in s||b(Ue)},N=E.exports.useContext(zn),z=N.getPrefixCls,$=N.direction,j=s.prefixCls,U=s.className,q=s.showIcon,Y=q===void 0?!0:q,te=s.expandAction,Z=te===void 0?"click":te,X=XN(s,["prefixCls","className","showIcon","expandAction"]),J=z("tree",j),ue=je("".concat(J,"-directory"),ae({},"".concat(J,"-directory-rtl"),$==="rtl"),U);return A(LV,{icon:Qme,ref:n,blockNode:!0,...X,showIcon:Y,expandAction:Z,prefixCls:J,className:ue,expandedKeys:I,selectedKeys:v,onSelect:D,onExpand:M})},ege=E.exports.forwardRef(Jme);const tge=ege;var GI=LV;GI.DirectoryTree=tge;GI.TreeNode=Md;const nge=GI;function rge(e){var t=E.exports.useRef(e),n=_I();return[function(){return t.current},function(r){t.current=r,n()}]}function QN(e){var t=e.value,n=e.onChange,r=e.filterSearch,i=e.tablePrefixCls,o=e.locale;return r?A("div",{className:"".concat(i,"-filter-dropdown-search"),children:A(lse,{prefix:A(bI,{}),placeholder:o.filterSearchPlaceholder,onChange:n,value:t,htmlSize:1,className:"".concat(i,"-filter-dropdown-search-input")})}):null}var ige=function(t){var n=t.keyCode;n===Pt.ENTER&&t.stopPropagation()},oge=function(t){return A("div",{className:t.className,onClick:function(r){return r.stopPropagation()},onKeyDown:ige,children:t.children})};const age=oge;function sge(e){return e.some(function(t){var n=t.children;return n})}function $V(e,t){return typeof t=="string"||typeof t=="number"?t==null?void 0:t.toString().toLowerCase().includes(e.trim().toLowerCase()):!1}function BV(e){var t=e.filters,n=e.prefixCls,r=e.filteredKeys,i=e.filterMultiple,o=e.searchValue,s=e.filterSearch;return t.map(function(a,u){var f=String(a.value);if(a.children)return{key:f||u,label:a.text,popupClassName:"".concat(n,"-dropdown-submenu"),children:BV({filters:a.children,prefixCls:n,filteredKeys:r,filterMultiple:i,searchValue:o,filterSearch:s})};var p=i?xh:l8,g={key:a.value!==void 0?f:u,label:it(nr,{children:[A(p,{checked:r.includes(f)}),A("span",{children:a.text})]})};return o.trim()?typeof s=="function"?s(o,a)?g:null:$V(o,a.text)?g:null:g})}function lge(e){var t,n=e.tablePrefixCls,r=e.prefixCls,i=e.column,o=e.dropdownPrefixCls,s=e.columnKey,a=e.filterMultiple,u=e.filterMode,f=u===void 0?"menu":u,p=e.filterSearch,g=p===void 0?!1:p,v=e.filterState,b=e.triggerFilter,_=e.locale,T=e.children,I=e.getPopupContainer,P=i.filterDropdownOpen,M=i.onFilterDropdownOpenChange,D=i.filterDropdownVisible,N=i.onFilterDropdownVisibleChange,z=i.filterResetToDefaultFilteredValue,$=i.defaultFilteredValue,j=E.exports.useState(!1),U=$e(j,2),q=U[0],Y=U[1],te=!!(v&&(((t=v.filteredKeys)===null||t===void 0?void 0:t.length)||v.forceFiltered)),Z=function(Ye){Y(Ye),M==null||M(Ye),N==null||N(Ye)},X;typeof P=="boolean"?X=P:X=typeof D=="boolean"?D:q;var J=v==null?void 0:v.filteredKeys,ue=rge(J||[]),re=$e(ue,2),se=re[0],oe=re[1],he=function(Ye){var Zt=Ye.selectedKeys;oe(Zt)},Ce=function(Ye,Zt){var an=Zt.node,Kt=Zt.checked;he(a?{selectedKeys:Ye}:{selectedKeys:Kt&&an.key?[an.key]:[]})};E.exports.useEffect(function(){!q||he({selectedKeys:J||[]})},[J]);var Se=E.exports.useState([]),be=$e(Se,2),Re=be[0],Ie=be[1],Me=function(Ye){Ie(Ye)},Ae=E.exports.useState(""),ze=$e(Ae,2),Ke=ze[0],Ue=ze[1],pt=function(Ye){var Zt=Ye.target.value;Ue(Zt)};E.exports.useEffect(function(){q||Ue("")},[q]);var gt=function(Ye){var Zt=Ye&&Ye.length?Ye:null;if(Zt===null&&(!v||!v.filteredKeys)||jN(Zt,v==null?void 0:v.filteredKeys))return null;b({column:i,key:s,filteredKeys:Zt})},Ot=function(){Z(!1),gt(se())},qe=function(){var Ye=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{confirm:!1,closeDropdown:!1},Zt=Ye.confirm,an=Ye.closeDropdown;Zt&&gt([]),an&&Z(!1),Ue(""),oe(z?($||[]).map(function(Kt){return String(Kt)}):[])},Ct=function(){var Ye=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{closeDropdown:!0},Zt=Ye.closeDropdown;Zt&&Z(!1),gt(se())},ot=function(Ye){Ye&&J!==void 0&&oe(J||[]),Z(Ye),!Ye&&!i.filterDropdown&&Ot()},vt=je(ae({},"".concat(o,"-menu-without-submenu"),!sge(i.filters||[]))),yt=function(Ye){if(Ye.target.checked){var Zt=rh(i==null?void 0:i.filters).map(function(an){return String(an)});oe(Zt)}else oe([])},Tt=function Fe(Ye){var Zt=Ye.filters;return(Zt||[]).map(function(an,Kt){var Vt=String(an.value),It={title:an.text,key:an.value!==void 0?Vt:Kt};return an.children&&(It.children=Fe({filters:an.children})),It})},et=function Fe(Ye){var Zt;return Je(Je({},Ye),{text:Ye.title,value:Ye.key,children:((Zt=Ye.children)===null||Zt===void 0?void 0:Zt.map(function(an){return Fe(an)}))||[]})},ct;if(typeof i.filterDropdown=="function")ct=i.filterDropdown({prefixCls:"".concat(o,"-custom"),setSelectedKeys:function(Ye){return he({selectedKeys:Ye})},selectedKeys:se(),confirm:Ct,clearFilters:qe,filters:i.filters,visible:X,close:function(){Z(!1)}});else if(i.filterDropdown)ct=i.filterDropdown;else{var at=se()||[],He=function(){return(i.filters||[]).length===0?A(Ys,{image:Ys.PRESENTED_IMAGE_SIMPLE,description:_.filterEmptyText,imageStyle:{height:24},style:{margin:0,padding:"16px 0"}}):f==="tree"?it(nr,{children:[A(QN,{filterSearch:g,value:Ke,onChange:pt,tablePrefixCls:n,locale:_}),it("div",{className:"".concat(n,"-filter-dropdown-tree"),children:[a?A(xh,{checked:at.length===rh(i.filters).length,indeterminate:at.length>0&&at.length<rh(i.filters).length,className:"".concat(n,"-filter-dropdown-checkall"),onChange:yt,children:_.filterCheckall}):null,A(nge,{checkable:!0,selectable:!1,blockNode:!0,multiple:a,checkStrictly:!a,className:"".concat(o,"-menu"),onCheck:Ce,checkedKeys:at,selectedKeys:at,showIcon:!1,treeData:Tt({filters:i.filters}),autoExpandParent:!0,defaultExpandAll:!0,filterTreeNode:Ke.trim()?function(Ye){return typeof g=="function"?g(Ke,et(Ye)):$V(Ke,Ye.title)}:void 0})]})]}):it(nr,{children:[A(QN,{filterSearch:g,value:Ke,onChange:pt,tablePrefixCls:n,locale:_}),A(GB,{selectable:!0,multiple:a,prefixCls:"".concat(o,"-menu"),className:vt,onSelect:he,onDeselect:he,selectedKeys:at,getPopupContainer:I,openKeys:Re,onOpenChange:Me,items:BV({filters:i.filters||[],filterSearch:g,prefixCls:r,filteredKeys:se(),filterMultiple:a,searchValue:Ke})})]})},ut=function(){return z?jN(($||[]).map(function(Ye){return String(Ye)}),at):at.length===0};ct=it(nr,{children:[He(),it("div",{className:"".concat(r,"-dropdown-btns"),children:[A(Yr,{type:"link",size:"small",disabled:ut(),onClick:function(){return qe()},children:_.filterReset}),A(Yr,{type:"primary",size:"small",onClick:Ot,children:_.filterConfirm})]})]})}i.filterDropdown&&(ct=A(WB,{selectable:void 0,children:ct}));var bt=function(){return A(age,{className:"".concat(r,"-dropdown"),children:ct})},Dt;typeof i.filterIcon=="function"?Dt=i.filterIcon(te):i.filterIcon?Dt=i.filterIcon:Dt=A(vce,{});var Lt=E.exports.useContext(zn),Ht=Lt.direction;return it("div",{className:"".concat(r,"-column"),children:[A("span",{className:"".concat(n,"-column-title"),children:T}),A(X_,{dropdownRender:bt,trigger:["click"],open:X,onOpenChange:ot,getPopupContainer:I,placement:Ht==="rtl"?"bottomLeft":"bottomRight",children:A("span",{role:"button",tabIndex:-1,className:je("".concat(r,"-trigger"),{active:te}),onClick:function(Ye){Ye.stopPropagation()},children:Dt})})]})}function JE(e,t,n){var r=[];return(e||[]).forEach(function(i,o){var s,a=i1(o,n);if(i.filters||"filterDropdown"in i||"onFilter"in i)if("filteredValue"in i){var u=i.filteredValue;"filterDropdown"in i||(u=(s=u==null?void 0:u.map(String))!==null&&s!==void 0?s:u),r.push({column:i,key:bh(i,a),filteredKeys:u,forceFiltered:i.filtered})}else r.push({column:i,key:bh(i,a),filteredKeys:t&&i.defaultFilteredValue?i.defaultFilteredValue:void 0,forceFiltered:i.filtered});"children"in i&&(r=[].concat(Mt(r),Mt(JE(i.children,t,a))))}),r}function VV(e,t,n,r,i,o,s,a){return n.map(function(u,f){var p=i1(f,a),g=u.filterMultiple,v=g===void 0?!0:g,b=u.filterMode,_=u.filterSearch,T=u;if(T.filters||T.filterDropdown){var I=bh(T,p),P=r.find(function(M){var D=M.key;return I===D});T=Je(Je({},T),{title:function(D){return A(lge,{tablePrefixCls:e,prefixCls:"".concat(e,"-filter"),dropdownPrefixCls:t,column:T,columnKey:I,filterState:P,filterMultiple:v,filterMode:b,filterSearch:_,triggerFilter:i,locale:s,getPopupContainer:o,children:o1(u.title,D)})}})}return"children"in T&&(T=Je(Je({},T),{children:VV(e,t,T.children,r,i,o,s,p)})),T})}function rh(e){var t=[];return(e||[]).forEach(function(n){var r=n.value,i=n.children;t.push(r),i&&(t=[].concat(Mt(t),Mt(rh(i))))}),t}function JN(e){var t={};return e.forEach(function(n){var r=n.key,i=n.filteredKeys,o=n.column,s=o.filters,a=o.filterDropdown;if(a)t[r]=i||null;else if(Array.isArray(i)){var u=rh(s);t[r]=u.filter(function(f){return i.includes(String(f))})}else t[r]=null}),t}function eL(e,t){return t.reduce(function(n,r){var i=r.column,o=i.onFilter,s=i.filters,a=r.filteredKeys;return o&&a&&a.length?n.filter(function(u){return a.some(function(f){var p=rh(s),g=p.findIndex(function(b){return String(b)===String(f)}),v=g!==-1?p[g]:f;return o(v,u)})}):n},e)}function cge(e){var t=e.prefixCls,n=e.dropdownPrefixCls,r=e.mergedColumns,i=e.onFilterChange,o=e.getPopupContainer,s=e.locale,a=E.exports.useState(function(){return JE(r,!0)}),u=$e(a,2),f=u[0],p=u[1],g=E.exports.useMemo(function(){var T=JE(r,!1),I=!0;return T.forEach(function(P){var M=P.filteredKeys;M!==void 0&&(I=!1)}),I?f:T},[r,f]),v=E.exports.useMemo(function(){return JN(g)},[g]),b=function(I){var P=g.filter(function(M){var D=M.key;return D!==I.key});P.push(I),p(P),i(JN(P),P)},_=function(I){return VV(t,n,I,g,b,o,s)};return[_,g,v]}function uge(e,t,n){var r=E.exports.useRef({});function i(o){if(!r.current||r.current.data!==e||r.current.childrenColumnName!==t||r.current.getRowKey!==n){let u=function(f){f.forEach(function(p,g){var v=n(p,g);s.set(v,p),p&&on(p)==="object"&&t in p&&u(p[t]||[])})};var a=u,s=new Map;u(e),r.current={data:e,childrenColumnName:t,kvMap:s,getRowKey:n}}return r.current.kvMap.get(o)}return[i]}var dge=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},UV=10;function fge(e,t){var n={current:t.current,pageSize:t.pageSize},r=e&&on(e)==="object"?e:{};return Object.keys(r).forEach(function(i){var o=t[i];typeof o!="function"&&(n[i]=o)}),n}function hge(){for(var e={},t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.forEach(function(i){i&&Object.keys(i).forEach(function(o){var s=i[o];s!==void 0&&(e[o]=s)})}),e}function pge(e,t,n){var r=t&&on(t)==="object"?t:{},i=r.total,o=i===void 0?0:i,s=dge(r,["total"]),a=E.exports.useState(function(){return{current:"defaultCurrent"in s?s.defaultCurrent:1,pageSize:"defaultPageSize"in s?s.defaultPageSize:UV}}),u=$e(a,2),f=u[0],p=u[1],g=hge(f,s,{total:o>0?o:e}),v=Math.ceil((o||e)/g.pageSize);g.current>v&&(g.current=v||1);var b=function(I,P){p({current:I!=null?I:1,pageSize:P||g.pageSize})},_=function(I,P){var M;t&&((M=t.onChange)===null||M===void 0||M.call(t,I,P)),b(I,P),n(I,P||(g==null?void 0:g.pageSize))};return t===!1?[{},function(){}]:[Je(Je({},g),{onChange:_}),b]}var Ec={},eP="SELECT_ALL",tP="SELECT_INVERT",nP="SELECT_NONE",tL=[];function jV(e,t){var n=[];return(e||[]).forEach(function(r){n.push(r),r&&on(r)==="object"&&t in r&&(n=[].concat(Mt(n),Mt(jV(r[t],t))))}),n}function mge(e,t){var n=e||{},r=n.preserveSelectedRowKeys,i=n.selectedRowKeys,o=n.defaultSelectedRowKeys,s=n.getCheckboxProps,a=n.onChange,u=n.onSelect,f=n.onSelectAll,p=n.onSelectInvert,g=n.onSelectNone,v=n.onSelectMultiple,b=n.columnWidth,_=n.type,T=n.selections,I=n.fixed,P=n.renderCell,M=n.hideSelectAll,D=n.checkStrictly,N=D===void 0?!0:D,z=t.prefixCls,$=t.data,j=t.pageData,U=t.getRecordByKey,q=t.getRowKey,Y=t.expandType,te=t.childrenColumnName,Z=t.locale,X=t.getPopupContainer,J=Ei(i||o||tL,{value:i}),ue=$e(J,2),re=ue[0],se=ue[1],oe=E.exports.useRef(new Map),he=E.exports.useCallback(function(et){if(r){var ct=new Map;et.forEach(function(at){var He=U(at);!He&&oe.current.has(at)&&(He=oe.current.get(at)),ct.set(at,He)}),oe.current=ct}},[U,r]);E.exports.useEffect(function(){he(re)},[re]);var Ce=E.exports.useMemo(function(){return N?{keyEntities:null}:J_($,{externalGetKey:q,childrenPropName:te})},[$,q,N,te]),Se=Ce.keyEntities,be=E.exports.useMemo(function(){return jV(j,te)},[j,te]),Re=E.exports.useMemo(function(){var et=new Map;return be.forEach(function(ct,at){var He=q(ct,at),ut=(s?s(ct):null)||{};et.set(He,ut)}),et},[be,q,s]),Ie=E.exports.useCallback(function(et){var ct;return!!(!((ct=Re.get(q(et)))===null||ct===void 0)&&ct.disabled)},[Re,q]),Me=E.exports.useMemo(function(){if(N)return[re||[],[]];var et=jl(re,!0,Se,Ie),ct=et.checkedKeys,at=et.halfCheckedKeys;return[ct||[],at]},[re,N,Se,Ie]),Ae=$e(Me,2),ze=Ae[0],Ke=Ae[1],Ue=E.exports.useMemo(function(){var et=_==="radio"?ze.slice(0,1):ze;return new Set(et)},[ze,_]),pt=E.exports.useMemo(function(){return _==="radio"?new Set:new Set(Ke)},[Ke,_]),gt=E.exports.useState(null),Ot=$e(gt,2),qe=Ot[0],Ct=Ot[1];E.exports.useEffect(function(){e||se(tL)},[!!e]);var ot=E.exports.useCallback(function(et,ct){var at,He;he(et),r?(at=et,He=et.map(function(ut){return oe.current.get(ut)})):(at=[],He=[],et.forEach(function(ut){var bt=U(ut);bt!==void 0&&(at.push(ut),He.push(bt))})),se(at),a==null||a(at,He,{type:ct})},[se,U,a,r]),vt=E.exports.useCallback(function(et,ct,at,He){if(u){var ut=at.map(function(bt){return U(bt)});u(U(et),ct,ut,He)}ot(at,"single")},[u,U,ot]),yt=E.exports.useMemo(function(){if(!T||M)return null;var et=T===!0?[eP,tP,nP]:T;return et.map(function(ct){return ct===eP?{key:"all",text:Z.selectionAll,onSelect:function(){ot($.map(function(He,ut){return q(He,ut)}).filter(function(He){var ut=Re.get(He);return!(ut!=null&&ut.disabled)||Ue.has(He)}),"all")}}:ct===tP?{key:"invert",text:Z.selectInvert,onSelect:function(){var He=new Set(Ue);j.forEach(function(bt,Dt){var Lt=q(bt,Dt),Ht=Re.get(Lt);Ht!=null&&Ht.disabled||(He.has(Lt)?He.delete(Lt):He.add(Lt))});var ut=Array.from(He);p&&p(ut),ot(ut,"invert")}}:ct===nP?{key:"none",text:Z.selectNone,onSelect:function(){g==null||g(),ot(Array.from(Ue).filter(function(He){var ut=Re.get(He);return ut==null?void 0:ut.disabled}),"none")}}:ct}).map(function(ct){return Je(Je({},ct),{onSelect:function(){for(var He,ut,bt=arguments.length,Dt=new Array(bt),Lt=0;Lt<bt;Lt++)Dt[Lt]=arguments[Lt];(ut=ct.onSelect)===null||ut===void 0||(He=ut).call.apply(He,[ct].concat(Dt)),Ct(null)}})})},[T,Ue,j,q,p,ot]),Tt=E.exports.useCallback(function(et){var ct;if(!e)return et.filter(function(tn){return tn!==Ec});var at=Mt(et),He=new Set(Ue),ut=be.map(q).filter(function(tn){return!Re.get(tn).disabled}),bt=ut.every(function(tn){return He.has(tn)}),Dt=ut.some(function(tn){return He.has(tn)}),Lt=function(){var Ft=[];bt?ut.forEach(function(mt){He.delete(mt),Ft.push(mt)}):ut.forEach(function(mt){He.has(mt)||(He.add(mt),Ft.push(mt))});var dt=Array.from(He);f==null||f(!bt,dt.map(function(mt){return U(mt)}),Ft.map(function(mt){return U(mt)})),ot(dt,"all"),Ct(null)},Ht;if(_!=="radio"){var Fe;if(yt){var Ye={getPopupContainer:X,items:yt.map(function(tn,Ft){var dt=tn.key,mt=tn.text,$t=tn.onSelect;return{key:dt||Ft,onClick:function(){$t==null||$t(ut)},label:mt}})};Fe=A("div",{className:"".concat(z,"-selection-extra"),children:A(X_,{menu:Ye,getPopupContainer:X,children:A("span",{children:A(vB,{})})})})}var Zt=be.map(function(tn,Ft){var dt=q(tn,Ft),mt=Re.get(dt)||{};return Je({checked:He.has(dt)},mt)}).filter(function(tn){var Ft=tn.disabled;return Ft}),an=!!Zt.length&&Zt.length===be.length,Kt=an&&Zt.every(function(tn){var Ft=tn.checked;return Ft}),Vt=an&&Zt.some(function(tn){var Ft=tn.checked;return Ft});Ht=!M&&it("div",{className:"".concat(z,"-selection"),children:[A(xh,{checked:an?Kt:!!be.length&&bt,indeterminate:an?!Kt&&Vt:!bt&&Dt,onChange:Lt,disabled:be.length===0||an,"aria-label":Fe?"Custom selection":"Select all",skipGroup:!0}),Fe]})}var It;_==="radio"?It=function(Ft,dt,mt){var $t=q(dt,mt),Wt=He.has($t);return{node:A(l8,{...Re.get($t),checked:Wt,onClick:function(An){return An.stopPropagation()},onChange:function(An){He.has($t)||vt($t,!0,[$t],An.nativeEvent)}}),checked:Wt}}:It=function(Ft,dt,mt){var $t,Wt=q(dt,mt),mn=He.has(Wt),An=pt.has(Wt),Qn=Re.get(Wt),Jn;return Y==="nest"?Jn=An:Jn=($t=Qn==null?void 0:Qn.indeterminate)!==null&&$t!==void 0?$t:An,{node:A(xh,{...Qn,indeterminate:Jn,checked:mn,skipGroup:!0,onClick:function(W){return W.stopPropagation()},onChange:function(W){var Q=W.nativeEvent,fe=Q.shiftKey,ce=-1,xe=-1;if(fe&&N){var ke=new Set([qe,Wt]);ut.some(function(Gt,wn){if(ke.has(Gt))if(ce===-1)ce=wn;else return xe=wn,!0;return!1})}if(xe!==-1&&ce!==xe&&N){var we=ut.slice(ce,xe+1),Pe=[];mn?we.forEach(function(Gt){He.has(Gt)&&(Pe.push(Gt),He.delete(Gt))}):we.forEach(function(Gt){He.has(Gt)||(Pe.push(Gt),He.add(Gt))});var Le=Array.from(He);v==null||v(!mn,Le.map(function(Gt){return U(Gt)}),Pe.map(function(Gt){return U(Gt)})),ot(Le,"multiple")}else{var Ze=ze;if(N){var Xe=mn?Ks(Ze,Wt):Tl(Ze,Wt);vt(Wt,!mn,Xe,Q)}else{var Ve=jl([].concat(Mt(Ze),[Wt]),!0,Se,Ie),Bt=Ve.checkedKeys,Et=Ve.halfCheckedKeys,nt=Bt;if(mn){var zt=new Set(Bt);zt.delete(Wt),nt=jl(Array.from(zt),{checked:!1,halfCheckedKeys:Et},Se,Ie).checkedKeys}vt(Wt,!mn,nt,Q)}}Ct(mn?null:Wt)}}),checked:mn}};var Xt=function(Ft,dt,mt){var $t=It(Ft,dt,mt),Wt=$t.node,mn=$t.checked;return P?P(mn,dt,mt,Wt):Wt};if(!at.includes(Ec))if(at.findIndex(function(tn){var Ft;return((Ft=tn[qm])===null||Ft===void 0?void 0:Ft.columnType)==="EXPAND_COLUMN"})===0){var pn=at,tt=WT(pn),At=tt[0],qt=tt.slice(1);at=[At,Ec].concat(Mt(qt))}else at=[Ec].concat(Mt(at));var En=at.indexOf(Ec);at=at.filter(function(tn,Ft){return tn!==Ec||Ft===En});var yn=at[En-1],St=at[En+1],Pn=I;Pn===void 0&&((St==null?void 0:St.fixed)!==void 0?Pn=St.fixed:(yn==null?void 0:yn.fixed)!==void 0&&(Pn=yn.fixed)),Pn&&yn&&((ct=yn[qm])===null||ct===void 0?void 0:ct.columnType)==="EXPAND_COLUMN"&&yn.fixed===void 0&&(yn.fixed=Pn);var _n=ae({fixed:Pn,width:b,className:"".concat(z,"-selection-column"),title:e.columnTitle||Ht,render:Xt},qm,{className:"".concat(z,"-selection-col")});return at.map(function(tn){return tn===Ec?_n:tn})},[q,be,e,ze,Ue,pt,b,yt,Y,qe,Re,v,vt,Ie]);return[Tt,Ue]}var gge={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"}}]},name:"caret-down",theme:"outlined"};const vge=gge;var HV=function(t,n){return A(Yn,{...me(me({},t),{},{ref:n,icon:vge})})};HV.displayName="CaretDownOutlined";const yge=E.exports.forwardRef(HV);var xge={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M858.9 689L530.5 308.2c-9.4-10.9-27.5-10.9-37 0L165.1 689c-12.2 14.2-1.2 35 18.5 35h656.8c19.7 0 30.7-20.8 18.5-35z"}}]},name:"caret-up",theme:"outlined"};const bge=xge;var KV=function(t,n){return A(Yn,{...me(me({},t),{},{ref:n,icon:bge})})};KV.displayName="CaretUpOutlined";const _ge=E.exports.forwardRef(KV);var h0="ascend",tS="descend";function Pb(e){return on(e.sorter)==="object"&&typeof e.sorter.multiple=="number"?e.sorter.multiple:!1}function nL(e){return typeof e=="function"?e:e&&on(e)==="object"&&e.compare?e.compare:!1}function wge(e,t){return t?e[e.indexOf(t)+1]:e[0]}function rP(e,t,n){var r=[];function i(o,s){r.push({column:o,key:bh(o,s),multiplePriority:Pb(o),sortOrder:o.sortOrder})}return(e||[]).forEach(function(o,s){var a=i1(s,n);o.children?("sortOrder"in o&&i(o,a),r=[].concat(Mt(r),Mt(rP(o.children,t,a)))):o.sorter&&("sortOrder"in o?i(o,a):t&&o.defaultSortOrder&&r.push({column:o,key:bh(o,a),multiplePriority:Pb(o),sortOrder:o.defaultSortOrder}))}),r}function WV(e,t,n,r,i,o,s,a){return(t||[]).map(function(u,f){var p=i1(f,a),g=u;if(g.sorter){var v=g.sortDirections||i,b=g.showSorterTooltip===void 0?s:g.showSorterTooltip,_=bh(g,p),T=n.find(function(Y){var te=Y.key;return te===_}),I=T?T.sortOrder:null,P=wge(v,I),M=v.includes(h0)&&A(_ge,{className:je("".concat(e,"-column-sorter-up"),{active:I===h0}),role:"presentation"}),D=v.includes(tS)&&A(yge,{className:je("".concat(e,"-column-sorter-down"),{active:I===tS}),role:"presentation"}),N=o||{},z=N.cancelSort,$=N.triggerAsc,j=N.triggerDesc,U=z;P===tS?U=j:P===h0&&(U=$);var q=on(b)==="object"?b:{title:U};g=Je(Je({},g),{className:je(g.className,ae({},"".concat(e,"-column-sort"),I)),title:function(te){var Z=it("div",{className:"".concat(e,"-column-sorters"),children:[A("span",{className:"".concat(e,"-column-title"),children:o1(u.title,te)}),A("span",{className:je("".concat(e,"-column-sorter"),ae({},"".concat(e,"-column-sorter-full"),!!(M&&D))),children:it("span",{className:"".concat(e,"-column-sorter-inner"),children:[M,D]})})]});return b?A(ka,{...q,children:Z}):Z},onHeaderCell:function(te){var Z=u.onHeaderCell&&u.onHeaderCell(te)||{},X=Z.onClick,J=Z.onKeyDown;Z.onClick=function(se){r({column:u,key:_,sortOrder:P,multiplePriority:Pb(u)}),X==null||X(se)},Z.onKeyDown=function(se){se.keyCode===Pt.ENTER&&(r({column:u,key:_,sortOrder:P,multiplePriority:Pb(u)}),J==null||J(se))};var ue=pce(u.title,{}),re=ue==null?void 0:ue.toString();return I?Z["aria-sort"]=I==="ascend"?"ascending":"descending":Z["aria-label"]=re||"",Z.className=je(Z.className,"".concat(e,"-column-has-sorters")),Z.tabIndex=0,u.ellipsis&&(Z.title=(ue!=null?ue:"").toString()),Z}})}return"children"in g&&(g=Je(Je({},g),{children:WV(e,g.children,n,r,i,o,s,p)})),g})}function rL(e){var t=e.column,n=e.sortOrder;return{column:t,order:n,field:t.dataIndex,columnKey:t.key}}function iL(e){var t=e.filter(function(n){var r=n.sortOrder;return r}).map(rL);return t.length===0&&e.length?Je(Je({},rL(e[e.length-1])),{column:void 0}):t.length<=1?t[0]||{}:t}function iP(e,t,n){var r=t.slice().sort(function(s,a){return a.multiplePriority-s.multiplePriority}),i=e.slice(),o=r.filter(function(s){var a=s.column.sorter,u=s.sortOrder;return nL(a)&&u});return o.length?i.sort(function(s,a){for(var u=0;u<o.length;u+=1){var f=o[u],p=f.column.sorter,g=f.sortOrder,v=nL(p);if(v&&g){var b=v(s,a,g);if(b!==0)return g===h0?b:-b}}return 0}).map(function(s){var a=s[n];return a?Je(Je({},s),ae({},n,iP(a,t,n))):s}):i}function Cge(e){var t=e.prefixCls,n=e.mergedColumns,r=e.onSorterChange,i=e.sortDirections,o=e.tableLocale,s=e.showSorterTooltip,a=E.exports.useState(rP(n,!0)),u=$e(a,2),f=u[0],p=u[1],g=E.exports.useMemo(function(){var I=!0,P=rP(n,!1);if(!P.length)return f;var M=[];function D(z){I?M.push(z):M.push(Je(Je({},z),{sortOrder:null}))}var N=null;return P.forEach(function(z){N===null?(D(z),z.sortOrder&&(z.multiplePriority===!1?I=!1:N=!0)):(N&&z.multiplePriority!==!1||(I=!1),D(z))}),M},[n,f]),v=E.exports.useMemo(function(){var I=g.map(function(P){var M=P.column,D=P.sortOrder;return{column:M,order:D}});return{sortColumns:I,sortColumn:I[0]&&I[0].column,sortOrder:I[0]&&I[0].order}},[g]);function b(I){var P;I.multiplePriority===!1||!g.length||g[0].multiplePriority===!1?P=[I]:P=[].concat(Mt(g.filter(function(M){var D=M.key;return D!==I.key})),[I]),p(P),r(iL(P),P)}var _=function(P){return WV(t,P,g,b,i,o,s)},T=function(){return iL(g)};return[_,g,v,T]}function GV(e,t){return e.map(function(n){var r=Je({},n);return r.title=o1(n.title,t),"children"in r&&(r.children=GV(r.children,t)),r})}function Sge(e){var t=E.exports.useCallback(function(n){return GV(n,e)},[e]);return[t]}var Ege=[];function Pge(e,t){var n,r=e.prefixCls,i=e.className,o=e.style,s=e.size,a=e.bordered,u=e.dropdownPrefixCls,f=e.dataSource,p=e.pagination,g=e.rowSelection,v=e.rowKey,b=v===void 0?"key":v,_=e.rowClassName,T=e.columns,I=e.children,P=e.childrenColumnName,M=e.onChange,D=e.getPopupContainer,N=e.loading,z=e.expandIcon,$=e.expandable,j=e.expandedRowRender,U=e.expandIconColumnIndex,q=e.indentSize,Y=e.scroll,te=e.sortDirections,Z=e.locale,X=e.showSorterTooltip,J=X===void 0?!0:X;[["filterDropdownVisible","filterDropdownOpen"],["onFilterDropdownVisibleChange","onFilterDropdownOpenChange"]].forEach(function(Xe){var Ve=$e(Xe,2);Ve[0],Ve[1]});var ue=E.exports.useMemo(function(){return T||HI(I)},[T,I]),re=E.exports.useMemo(function(){return ue.some(function(Xe){return Xe.responsive})},[ue]),se=wB(re),oe=E.exports.useMemo(function(){var Xe=new Set(Object.keys(se).filter(function(Ve){return se[Ve]}));return ue.filter(function(Ve){return!Ve.responsive||Ve.responsive.some(function(Bt){return Xe.has(Bt)})})},[ue,se]),he=Gi(e,["className","style","columns"]),Ce=E.exports.useContext(Jl),Se=E.exports.useContext(zn),be=Se.locale,Re=be===void 0?Ms:be,Ie=Se.renderEmpty,Me=Se.direction,Ae=s||Ce,ze=Je(Je({},Re.Table),Z),Ke=f||Ege,Ue=E.exports.useContext(zn),pt=Ue.getPrefixCls,gt=pt("table",r),Ot=pt("dropdown",u),qe=Je({childrenColumnName:P,expandIconColumnIndex:U},$),Ct=qe.childrenColumnName,ot=Ct===void 0?"children":Ct,vt=E.exports.useMemo(function(){return Ke.some(function(Xe){return Xe==null?void 0:Xe[ot]})?"nest":j||$&&$.expandedRowRender?"row":null},[Ke]),yt={body:E.exports.useRef()},Tt=E.exports.useMemo(function(){return typeof b=="function"?b:function(Xe){return Xe==null?void 0:Xe[b]}},[b]),et=uge(Ke,ot,Tt),ct=$e(et,1),at=ct[0],He={},ut=function(Ve,Bt){var Et=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,nt=Je(Je({},He),Ve);Et&&(He.resetPagination(),nt.pagination.current&&(nt.pagination.current=1),p&&p.onChange&&p.onChange(1,nt.pagination.pageSize)),Y&&Y.scrollToFirstRowOnChange!==!1&&yt.body.current&&GJ(0,{getContainer:function(){return yt.body.current}}),M==null||M(nt.pagination,nt.filters,nt.sorter,{currentDataSource:eL(iP(Ke,nt.sorterStates,ot),nt.filterStates),action:Bt})},bt=function(Ve,Bt){ut({sorter:Ve,sorterStates:Bt},"sort",!1)},Dt=Cge({prefixCls:gt,mergedColumns:oe,onSorterChange:bt,sortDirections:te||["ascend","descend"],tableLocale:ze,showSorterTooltip:J}),Lt=$e(Dt,4),Ht=Lt[0],Fe=Lt[1],Ye=Lt[2],Zt=Lt[3],an=E.exports.useMemo(function(){return iP(Ke,Fe,ot)},[Ke,Fe]);He.sorter=Zt(),He.sorterStates=Fe;var Kt=function(Ve,Bt){ut({filters:Ve,filterStates:Bt},"filter",!0)},Vt=cge({prefixCls:gt,locale:ze,dropdownPrefixCls:Ot,mergedColumns:oe,onFilterChange:Kt,getPopupContainer:D}),It=$e(Vt,3),Xt=It[0],pn=It[1],tt=It[2],At=eL(an,pn);He.filters=tt,He.filterStates=pn;var qt=E.exports.useMemo(function(){var Xe={};return Object.keys(tt).forEach(function(Ve){tt[Ve]!==null&&(Xe[Ve]=tt[Ve])}),Je(Je({},Ye),{filters:Xe})},[Ye,tt]),En=Sge(qt),yn=$e(En,1),St=yn[0],Pn=function(Ve,Bt){ut({pagination:Je(Je({},He.pagination),{current:Ve,pageSize:Bt})},"paginate")},_n=pge(At.length,p,Pn),tn=$e(_n,2),Ft=tn[0],dt=tn[1];He.pagination=p===!1?{}:fge(p,Ft),He.resetPagination=dt;var mt=E.exports.useMemo(function(){if(p===!1||!Ft.pageSize)return At;var Xe=Ft.current,Ve=Xe===void 0?1:Xe,Bt=Ft.total,Et=Ft.pageSize,nt=Et===void 0?UV:Et;return At.length<Bt?At.length>nt?At.slice((Ve-1)*nt,Ve*nt):At:At.slice((Ve-1)*nt,Ve*nt)},[!!p,At,Ft&&Ft.current,Ft&&Ft.pageSize,Ft&&Ft.total]),$t=mge(g,{prefixCls:gt,data:At,pageData:mt,getRowKey:Tt,getRecordByKey:at,expandType:vt,childrenColumnName:ot,locale:ze,getPopupContainer:D}),Wt=$e($t,2),mn=Wt[0],An=Wt[1],Qn=function(Ve,Bt,Et){var nt;return typeof _=="function"?nt=je(_(Ve,Bt,Et)):nt=je(_),je(ae({},"".concat(gt,"-row-selected"),An.has(Tt(Ve,Bt))),nt)};qe.__PARENT_RENDER_ICON__=qe.expandIcon,qe.expandIcon=qe.expandIcon||z||hce(ze),vt==="nest"&&qe.expandIconColumnIndex===void 0?qe.expandIconColumnIndex=g?1:0:qe.expandIconColumnIndex>0&&g&&(qe.expandIconColumnIndex-=1),typeof qe.indentSize!="number"&&(qe.indentSize=typeof q=="number"?q:15);var Jn=E.exports.useCallback(function(Xe){return St(mn(Xt(Ht(Xe))))},[Ht,Xt,mn]),ye,W;if(p!==!1&&(Ft==null?void 0:Ft.total)){var Q;Ft.size?Q=Ft.size:Q=Ae==="small"||Ae==="middle"?"small":void 0;var fe=function(Ve){return A(xse,{...Ft,className:je("".concat(gt,"-pagination ").concat(gt,"-pagination-").concat(Ve),Ft.className),size:Q})},ce=Me==="rtl"?"left":"right",xe=Ft.position;if(xe!==null&&Array.isArray(xe)){var ke=xe.find(function(Xe){return Xe.includes("top")}),we=xe.find(function(Xe){return Xe.includes("bottom")}),Pe=xe.every(function(Xe){return"".concat(Xe)==="none"});!ke&&!we&&!Pe&&(W=fe(ce)),ke&&(ye=fe(ke.toLowerCase().replace("top",""))),we&&(W=fe(we.toLowerCase().replace("bottom","")))}else W=fe(ce)}var Le;typeof N=="boolean"?Le={spinning:N}:on(N)==="object"&&(Le=Je({spinning:!0},N));var Ze=je("".concat(gt,"-wrapper"),ae({},"".concat(gt,"-wrapper-rtl"),Me==="rtl"),i);return A("div",{ref:t,className:Ze,style:o,children:it(uv,{spinning:!1,...Le,children:[ye,A(jd,{...he,columns:oe,direction:Me,expandable:qe,prefixCls:gt,className:je((n={},ae(n,"".concat(gt,"-middle"),Ae==="middle"),ae(n,"".concat(gt,"-small"),Ae==="small"),ae(n,"".concat(gt,"-bordered"),a),ae(n,"".concat(gt,"-empty"),Ke.length===0),n)),data:mt,rowKey:Tt,rowClassName:Qn,emptyText:Z&&Z.emptyText||(Ie||yI)("Table"),internalHooks:f0,internalRefs:yt,transformColumns:Jn}),W]})})}var Tge=E.exports.forwardRef(Pge),ec=Tge;ec.SELECTION_COLUMN=Ec;ec.EXPAND_COLUMN=jd.EXPAND_COLUMN;ec.SELECTION_ALL=eP;ec.SELECTION_INVERT=tP;ec.SELECTION_NONE=nP;ec.Column=dce;ec.ColumnGroup=fce;ec.Summary=hV;const Ige=ec;var kge={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"};const Mge=kge;var qV=function(t,n){return A(Yn,{...me(me({},t),{},{ref:n,icon:Mge})})};qV.displayName="DeleteOutlined";const Rge=E.exports.forwardRef(qV);var ZV=E.exports.createContext(null),XV=E.exports.createContext(null);function Oge(e){return Array.isArray(e)?e:e!==void 0?[e]:[]}function Dge(e){var t=e||{},n=t.label,r=t.value,i=t.children,o=r||"value";return{_title:n?[n]:["title","label"],value:o,key:o,children:i||"children"}}function oP(e){return!e||e.disabled||e.disableCheckbox||e.checkable===!1}function Age(e,t){var n=[];function r(i){i.forEach(function(o){var s=o[t.children];s&&(n.push(o[t.value]),r(s))})}return r(e),n}function oL(e){return e==null}var Nge={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},Lge=function(t,n){var r=L$(),i=r.prefixCls,o=r.multiple,s=r.searchValue,a=r.toggleOpen,u=r.open,f=r.notFoundContent,p=E.exports.useContext(XV),g=p.virtual,v=p.listHeight,b=p.listItemHeight,_=p.treeData,T=p.fieldNames,I=p.onSelect,P=p.dropdownMatchSelectWidth,M=p.treeExpandAction,D=E.exports.useContext(ZV),N=D.checkable,z=D.checkedKeys,$=D.halfCheckedKeys,j=D.treeExpandedKeys,U=D.treeDefaultExpandAll,q=D.treeDefaultExpandedKeys,Y=D.onTreeExpand,te=D.treeIcon,Z=D.showTreeIcon,X=D.switcherIcon,J=D.treeLine,ue=D.treeNodeFilterProp,re=D.loadData,se=D.treeLoadedKeys,oe=D.treeMotion,he=D.onTreeLoad,Ce=D.keyEntities,Se=E.exports.useRef(),be=Xg(function(){return _},[u,_],function(bt,Dt){return Dt[0]&&bt[1]!==Dt[1]}),Re=E.exports.useMemo(function(){return N?{checked:z,halfChecked:$}:null},[N,z,$]);E.exports.useEffect(function(){if(u&&!o&&z.length){var bt;(bt=Se.current)===null||bt===void 0||bt.scrollTo({key:z[0]})}},[u]);var Ie=String(s).toLowerCase(),Me=function(Dt){return Ie?String(Dt[ue]).toLowerCase().includes(Ie):!1},Ae=E.exports.useState(q),ze=$e(Ae,2),Ke=ze[0],Ue=ze[1],pt=E.exports.useState(null),gt=$e(pt,2),Ot=gt[0],qe=gt[1],Ct=E.exports.useMemo(function(){return j?Mt(j):s?Ot:Ke},[Ke,Ot,j,s]);E.exports.useEffect(function(){s&&qe(Age(_,T))},[s]);var ot=function(Dt){Ue(Dt),qe(Dt),Y&&Y(Dt)},vt=function(Dt){Dt.preventDefault()},yt=function(Dt,Lt){var Ht=Lt.node;N&&oP(Ht)||(I(Ht.key,{selected:!z.includes(Ht.key)}),o||a(!1))},Tt=E.exports.useState(null),et=$e(Tt,2),ct=et[0],at=et[1],He=Ce[ct];if(E.exports.useImperativeHandle(n,function(){var bt;return{scrollTo:(bt=Se.current)===null||bt===void 0?void 0:bt.scrollTo,onKeyDown:function(Lt){var Ht,Fe=Lt.which;switch(Fe){case Pt.UP:case Pt.DOWN:case Pt.LEFT:case Pt.RIGHT:(Ht=Se.current)===null||Ht===void 0||Ht.onKeyDown(Lt);break;case Pt.ENTER:{if(He){var Ye=(He==null?void 0:He.node)||{},Zt=Ye.selectable,an=Ye.value;Zt!==!1&&yt(null,{node:{key:ct},selected:!z.includes(an)})}break}case Pt.ESC:a(!1)}},onKeyUp:function(){}}}),be.length===0)return A("div",{role:"listbox",className:"".concat(i,"-empty"),onMouseDown:vt,children:f});var ut={fieldNames:T};return se&&(ut.loadedKeys=se),Ct&&(ut.expandedKeys=Ct),it("div",{onMouseDown:vt,children:[He&&u&&A("span",{style:Nge,"aria-live":"assertive",children:He.node.value}),A(u1,{ref:Se,focusable:!1,prefixCls:"".concat(i,"-tree"),treeData:be,height:v,itemHeight:b,virtual:g!==!1&&P!==!1,multiple:o,icon:te,showIcon:Z,switcherIcon:X,showLine:J,loadData:s?null:re,motion:oe,activeKey:ct,checkable:N,checkStrictly:!0,checkedKeys:Re,selectedKeys:N?[]:z,defaultExpandAll:U,...ut,onActiveChange:at,onSelect:yt,onCheck:yt,onExpand:ot,onLoad:he,filterTreeNode:Me,expandAction:M})]})},YV=E.exports.forwardRef(Lge);YV.displayName="OptionList";var qI=function(){return null},QV="SHOW_ALL",ZI="SHOW_PARENT",d1="SHOW_CHILD";function aL(e,t,n,r){var i=new Set(e);return t===d1?e.filter(function(o){var s=n[o];return!(s&&s.children&&s.children.some(function(a){var u=a.node;return i.has(u[r.value])})&&s.children.every(function(a){var u=a.node;return oP(u)||i.has(u[r.value])}))}):t===ZI?e.filter(function(o){var s=n[o],a=s?s.parent:null;return!(a&&!oP(a.node)&&i.has(a.key))}):e}var zge=["children","value"];function JV(e){return Po(e).map(function(t){if(!E.exports.isValidElement(t)||!t.type)return null;var n=t,r=n.key,i=n.props,o=i.children,s=i.value,a=kn(i,zge),u=me({key:r,value:s},a),f=JV(o);return f.length&&(u.children=f),u}).filter(function(t){return t})}function aP(e){if(!e)return e;var t=me({},e);return"props"in t||Object.defineProperty(t,"props",{get:function(){return Lr(!1,"New `rc-tree-select` not support return node instance as argument anymore. Please consider to remove `props` access."),t}}),t}function Fge(e,t,n,r,i,o){var s=null,a=null;function u(){function f(p){var g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"0",v=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return p.map(function(b,_){var T="".concat(g,"-").concat(_),I=b[o.value],P=n.includes(I),M=f(b[o.children]||[],T,P),D=A(qI,{...b,children:M.map(function(z){return z.node})});if(t===I&&(s=D),P){var N={pos:T,node:D,children:M};return v||a.push(N),N}return null}).filter(function(b){return b})}a||(a=[],f(r),a.sort(function(p,g){var v=p.node.props.value,b=g.node.props.value,_=n.indexOf(v),T=n.indexOf(b);return _-T}))}Object.defineProperty(e,"triggerNode",{get:function(){return Lr(!1,"`triggerNode` is deprecated. Please consider decoupling data with node."),u(),s}}),Object.defineProperty(e,"allCheckedNodes",{get:function(){return Lr(!1,"`allCheckedNodes` is deprecated. Please consider decoupling data with node."),u(),i?a:a.map(function(p){var g=p.node;return g})}})}function $ge(e,t){var n=t.id,r=t.pId,i=t.rootPId,o={},s=[],a=e.map(function(u){var f=me({},u),p=f[n];return o[p]=f,f.key=f.key||p,f});return a.forEach(function(u){var f=u[r],p=o[f];p&&(p.children=p.children||[],p.children.push(u)),(f===i||!p&&i===null)&&s.push(u)}),s}function Bge(e,t,n){return E.exports.useMemo(function(){return e?n?$ge(e,me({id:"id",pId:"pId",rootPId:null},n!==!0?n:{})):e:JV(t)},[t,n,e])}const Vge=function(e){var t=E.exports.useRef({valueLabels:new Map});return E.exports.useMemo(function(){var n=t.current.valueLabels,r=new Map,i=e.map(function(o){var s,a=o.value,u=(s=o.label)!==null&&s!==void 0?s:n.get(a);return r.set(a,u),me(me({},o),{},{label:u})});return t.current.valueLabels=r,[i]},[e])};function sL(e){var t=E.exports.useRef();t.current=e;var n=E.exports.useCallback(function(){return t.current.apply(t,arguments)},[]);return n}const Uge=function(e,t){return E.exports.useMemo(function(){var n=J_(e,{fieldNames:t,initWrapper:function(i){return me(me({},i),{},{valueEntities:new Map})},processEntity:function(i,o){var s=i.node[t.value];o.valueEntities.set(s,i)}});return n},[e,t])},jge=function(e,t,n,r){return E.exports.useMemo(function(){var i=e.map(function(u){var f=u.value;return f}),o=t.map(function(u){var f=u.value;return f}),s=i.filter(function(u){return!r[u]});if(n){var a=jl(i,!0,r);i=a.checkedKeys,o=a.halfCheckedKeys}return[Array.from(new Set([].concat(Mt(s),Mt(i)))),o]},[e,t,n,r])},Hge=function(e,t,n){var r=n.treeNodeFilterProp,i=n.filterTreeNode,o=n.fieldNames,s=o.children;return E.exports.useMemo(function(){if(!t||i===!1)return e;var a;if(typeof i=="function")a=i;else{var u=t.toUpperCase();a=function(g,v){var b=v[r];return String(b).toUpperCase().includes(u)}}function f(p){var g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return p.map(function(v){var b=v[s],_=g||a(t,aP(v)),T=f(b||[],_);return _||T.length?me(me({},v),{},ae({isLeaf:void 0},s,T)):null}).filter(function(v){return v})}return f(e)},[e,t,s,r,i])};var Kge=["id","prefixCls","value","defaultValue","onChange","onSelect","onDeselect","searchValue","inputValue","onSearch","autoClearSearchValue","filterTreeNode","treeNodeFilterProp","showCheckedStrategy","treeNodeLabelProp","multiple","treeCheckable","treeCheckStrictly","labelInValue","fieldNames","treeDataSimpleMode","treeData","children","loadData","treeLoadedKeys","onTreeLoad","treeDefaultExpandAll","treeExpandedKeys","treeDefaultExpandedKeys","onTreeExpand","treeExpandAction","virtual","listHeight","listItemHeight","onDropdownVisibleChange","dropdownMatchSelectWidth","treeLine","treeIcon","showTreeIcon","switcherIcon","treeMotion"];function Wge(e){return!e||on(e)!=="object"}var Gge=E.exports.forwardRef(function(e,t){var n=e.id,r=e.prefixCls,i=r===void 0?"rc-tree-select":r,o=e.value,s=e.defaultValue,a=e.onChange,u=e.onSelect,f=e.onDeselect,p=e.searchValue,g=e.inputValue,v=e.onSearch,b=e.autoClearSearchValue,_=b===void 0?!0:b,T=e.filterTreeNode,I=e.treeNodeFilterProp,P=I===void 0?"value":I,M=e.showCheckedStrategy,D=M===void 0?d1:M,N=e.treeNodeLabelProp,z=e.multiple,$=e.treeCheckable,j=e.treeCheckStrictly,U=e.labelInValue,q=e.fieldNames,Y=e.treeDataSimpleMode,te=e.treeData,Z=e.children,X=e.loadData,J=e.treeLoadedKeys,ue=e.onTreeLoad,re=e.treeDefaultExpandAll,se=e.treeExpandedKeys,oe=e.treeDefaultExpandedKeys,he=e.onTreeExpand,Ce=e.treeExpandAction,Se=e.virtual,be=e.listHeight,Re=be===void 0?200:be,Ie=e.listItemHeight,Me=Ie===void 0?20:Ie,Ae=e.onDropdownVisibleChange,ze=e.dropdownMatchSelectWidth,Ke=ze===void 0?!0:ze,Ue=e.treeLine,pt=e.treeIcon,gt=e.showTreeIcon,Ot=e.switcherIcon,qe=e.treeMotion,Ct=kn(e,Kge),ot=aB(n),vt=$&&!j,yt=$||j,Tt=j||U,et=yt||z,ct=Ei(s,{value:o}),at=$e(ct,2),He=at[0],ut=at[1],bt=E.exports.useMemo(function(){return Dge(q)},[JSON.stringify(q)]),Dt=Ei("",{value:p!==void 0?p:g,postState:function(xe){return xe||""}}),Lt=$e(Dt,2),Ht=Lt[0],Fe=Lt[1],Ye=function(xe){Fe(xe),v==null||v(xe)},Zt=Bge(te,Z,Y),an=Uge(Zt,bt),Kt=an.keyEntities,Vt=an.valueEntities,It=E.exports.useCallback(function(ce){var xe=[],ke=[];return ce.forEach(function(we){Vt.has(we)?ke.push(we):xe.push(we)}),{missingRawValues:xe,existRawValues:ke}},[Vt]),Xt=Hge(Zt,Ht,{fieldNames:bt,treeNodeFilterProp:P,filterTreeNode:T}),pn=E.exports.useCallback(function(ce){if(ce){if(N)return ce[N];for(var xe=bt._title,ke=0;ke<xe.length;ke+=1){var we=ce[xe[ke]];if(we!==void 0)return we}}},[bt,N]),tt=E.exports.useCallback(function(ce){var xe=Oge(ce);return xe.map(function(ke){return Wge(ke)?{value:ke}:ke})},[]),At=E.exports.useCallback(function(ce){var xe=tt(ce);return xe.map(function(ke){var we=ke.label,Pe=ke.value,Le=ke.halfChecked,Ze,Xe=Vt.get(Pe);if(Xe){var Ve;we=(Ve=we)!==null&&Ve!==void 0?Ve:pn(Xe.node),Ze=Xe.node.disabled}else if(we===void 0){var Bt=tt(He).find(function(Et){return Et.value===Pe});we=Bt.label}return{label:we,value:Pe,halfChecked:Le,disabled:Ze}})},[Vt,pn,tt,He]),qt=E.exports.useMemo(function(){return tt(He)},[tt,He]),En=E.exports.useMemo(function(){var ce=[],xe=[];return qt.forEach(function(ke){ke.halfChecked?xe.push(ke):ce.push(ke)}),[ce,xe]},[qt]),yn=$e(En,2),St=yn[0],Pn=yn[1],_n=E.exports.useMemo(function(){return St.map(function(ce){return ce.value})},[St]),tn=jge(St,Pn,vt,Kt),Ft=$e(tn,2),dt=Ft[0],mt=Ft[1],$t=E.exports.useMemo(function(){var ce=aL(dt,D,Kt,bt),xe=ce.map(function(Le){var Ze,Xe,Ve;return(Ze=(Xe=Kt[Le])===null||Xe===void 0||(Ve=Xe.node)===null||Ve===void 0?void 0:Ve[bt.value])!==null&&Ze!==void 0?Ze:Le}),ke=xe.map(function(Le){var Ze=St.find(function(Xe){return Xe.value===Le});return{value:Le,label:Ze==null?void 0:Ze.label}}),we=At(ke),Pe=we[0];return!et&&Pe&&oL(Pe.value)&&oL(Pe.label)?[]:we.map(function(Le){var Ze;return me(me({},Le),{},{label:(Ze=Le.label)!==null&&Ze!==void 0?Ze:Le.value})})},[bt,et,dt,St,At,D,Kt]),Wt=Vge($t),mn=$e(Wt,1),An=mn[0],Qn=sL(function(ce,xe,ke){var we=At(ce);if(ut(we),_&&Fe(""),a){var Pe=ce;if(vt){var Le=aL(ce,D,Kt,bt);Pe=Le.map(function(dn){var Cn=Vt.get(dn);return Cn?Cn.node[bt.value]:dn})}var Ze=xe||{triggerValue:void 0,selected:void 0},Xe=Ze.triggerValue,Ve=Ze.selected,Bt=Pe;if(j){var Et=Pn.filter(function(dn){return!Pe.includes(dn.value)});Bt=[].concat(Mt(Bt),Mt(Et))}var nt=At(Bt),zt={preValue:St,triggerValue:Xe},Gt=!0;(j||ke==="selection"&&!Ve)&&(Gt=!1),Fge(zt,Xe,ce,Zt,Gt,bt),yt?zt.checked=Ve:zt.selected=Ve;var wn=Tt?nt:nt.map(function(dn){return dn.value});a(et?wn:wn[0],Tt?null:nt.map(function(dn){return dn.label}),zt)}}),Jn=E.exports.useCallback(function(ce,xe){var ke,we=xe.selected,Pe=xe.source,Le=Kt[ce],Ze=Le==null?void 0:Le.node,Xe=(ke=Ze==null?void 0:Ze[bt.value])!==null&&ke!==void 0?ke:ce;if(!et)Qn([Xe],{selected:!0,triggerValue:Xe},"option");else{var Ve=we?[].concat(Mt(_n),[Xe]):dt.filter(function(Cn){return Cn!==Xe});if(vt){var Bt=It(Ve),Et=Bt.missingRawValues,nt=Bt.existRawValues,zt=nt.map(function(Cn){return Vt.get(Cn).key}),Gt;if(we){var wn=jl(zt,!0,Kt);Gt=wn.checkedKeys}else{var dn=jl(zt,{checked:!1,halfCheckedKeys:mt},Kt);Gt=dn.checkedKeys}Ve=[].concat(Mt(Et),Mt(Gt.map(function(Cn){return Kt[Cn].node[bt.value]})))}Qn(Ve,{selected:we,triggerValue:Xe},Pe||"option")}we||!et?u==null||u(Xe,aP(Ze)):f==null||f(Xe,aP(Ze))},[It,Vt,Kt,bt,et,_n,Qn,vt,u,f,dt,mt]),ye=E.exports.useCallback(function(ce){if(Ae){var xe={};Object.defineProperty(xe,"documentClickClose",{get:function(){return Lr(!1,"Second param of `onDropdownVisibleChange` has been removed."),!1}}),Ae(ce,xe)}},[Ae]),W=sL(function(ce,xe){var ke=ce.map(function(we){return we.value});if(xe.type==="clear"){Qn(ke,{},"selection");return}xe.values.length&&Jn(xe.values[0].value,{selected:!1,source:"selection"})}),Q=E.exports.useMemo(function(){return{virtual:Se,dropdownMatchSelectWidth:Ke,listHeight:Re,listItemHeight:Me,treeData:Xt,fieldNames:bt,onSelect:Jn,treeExpandAction:Ce}},[Se,Ke,Re,Me,Xt,bt,Jn,Ce]),fe=E.exports.useMemo(function(){return{checkable:yt,loadData:X,treeLoadedKeys:J,onTreeLoad:ue,checkedKeys:dt,halfCheckedKeys:mt,treeDefaultExpandAll:re,treeExpandedKeys:se,treeDefaultExpandedKeys:oe,onTreeExpand:he,treeIcon:pt,treeMotion:qe,showTreeIcon:gt,switcherIcon:Ot,treeLine:Ue,treeNodeFilterProp:P,keyEntities:Kt}},[yt,X,J,ue,dt,mt,re,se,oe,he,pt,qe,gt,Ot,Ue,P,Kt]);return A(XV.Provider,{value:Q,children:A(ZV.Provider,{value:fe,children:A(oB,{ref:t,...Ct,id:ot,prefixCls:i,mode:et?"multiple":void 0,displayValues:An,onDisplayValuesChange:W,searchValue:Ht,onSearch:Ye,OptionList:YV,emptyOptions:!Zt.length,onDropdownVisibleChange:ye,dropdownMatchSelectWidth:Ke})})})}),hv=Gge;hv.TreeNode=qI;hv.SHOW_ALL=QV;hv.SHOW_PARENT=ZI;hv.SHOW_CHILD=d1;var qge=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},Zge=function(t,n){var r,i=t.prefixCls,o=t.size,s=t.disabled,a=t.bordered,u=a===void 0?!0:a,f=t.className,p=t.treeCheckable,g=t.multiple,v=t.listHeight,b=v===void 0?256:v,_=t.listItemHeight,T=_===void 0?26:_,I=t.placement,P=t.notFoundContent,M=t.switcherIcon,D=t.treeLine,N=t.getPopupContainer,z=t.dropdownClassName,$=t.popupClassName,j=t.treeIcon,U=j===void 0?!1:j,q=t.transitionName,Y=t.choiceTransitionName,te=Y===void 0?"":Y,Z=t.status,X=t.showArrow,J=t.treeExpandAction,ue=qge(t,["prefixCls","size","disabled","bordered","className","treeCheckable","multiple","listHeight","listItemHeight","placement","notFoundContent","switcherIcon","treeLine","getPopupContainer","dropdownClassName","popupClassName","treeIcon","transitionName","choiceTransitionName","status","showArrow","treeExpandAction"]),re=E.exports.useContext(zn),se=re.getPopupContainer,oe=re.getPrefixCls,he=re.renderEmpty,Ce=re.direction,Se=re.virtual,be=re.dropdownMatchSelectWidth,Re=E.exports.useContext(Jl),Ie=oe("select",i),Me=oe("select-tree",i),Ae=oe("tree-select",i),ze=Bh(Ie,Ce),Ke=ze.compactSize,Ue=ze.compactItemClassnames,pt=je($||z,"".concat(Ae,"-dropdown"),ae({},"".concat(Ae,"-dropdown-rtl"),Ce==="rtl")),gt=!!(p||g),Ot=X!==void 0?X:ue.loading||!gt,qe=E.exports.useContext(Rs),Ct=qe.status,ot=qe.hasFeedback,vt=qe.isFormItemInput,yt=qe.feedbackIcon,Tt=nv(Ct,Z),et=xB(Je(Je({},ue),{multiple:gt,showArrow:Ot,hasFeedback:ot,feedbackIcon:yt,prefixCls:Ie})),ct=et.suffixIcon,at=et.removeIcon,He=et.clearIcon,ut;P!==void 0?ut=P:ut=(he||yI)("Select");var bt=Gi(ue,["suffixIcon","itemIcon","removeIcon","clearIcon","switcherIcon"]),Dt=function(){return I!==void 0?I:Ce==="rtl"?"bottomRight":"bottomLeft"},Lt=Ke||o||Re,Ht=E.exports.useContext(fu),Fe=s!=null?s:Ht,Ye=je(!i&&Ae,(r={},ae(r,"".concat(Ie,"-lg"),Lt==="large"),ae(r,"".concat(Ie,"-sm"),Lt==="small"),ae(r,"".concat(Ie,"-rtl"),Ce==="rtl"),ae(r,"".concat(Ie,"-borderless"),!u),ae(r,"".concat(Ie,"-in-form-item"),vt),r),Xc(Ie,Tt,ot),Ue,f),Zt=oe();return A(hv,{virtual:Se,dropdownMatchSelectWidth:be,disabled:Fe,...bt,ref:n,prefixCls:Ie,className:Ye,listHeight:b,listItemHeight:T,treeCheckable:p&&A("span",{className:"".concat(Ie,"-tree-checkbox-inner")}),treeLine:!!D,inputIcon:ct,multiple:g,placement:Dt(),removeIcon:at,clearIcon:He,switcherIcon:function(Kt){return NV(Me,M,D,Kt)},showTreeIcon:U,notFoundContent:ut,getPopupContainer:N||se,treeMotion:null,dropdownClassName:pt,choiceTransitionName:Ia(Zt,"",te),transitionName:Ia(Zt,pB(I),q),showArrow:ot||X,treeExpandAction:J})},Xge=E.exports.forwardRef(Zge),pv=Xge;pv.TreeNode=qI;pv.SHOW_ALL=QV;pv.SHOW_PARENT=ZI;pv.SHOW_CHILD=d1;const f1=pv;var Yge={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"}}]},name:"copy",theme:"outlined"};const Qge=Yge;var eU=function(t,n){return A(Yn,{...me(me({},t),{},{ref:n,icon:Qge})})};eU.displayName="CopyOutlined";const Jge=E.exports.forwardRef(eU);var eve={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M257.7 752c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 000-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 009.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9zm67.4-174.4L687.8 215l73.3 73.3-362.7 362.6-88.9 15.7 15.6-89zM880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32z"}}]},name:"edit",theme:"outlined"};const tve=eve;var tU=function(t,n){return A(Yn,{...me(me({},t),{},{ref:n,icon:tve})})};tU.displayName="EditOutlined";const nve=E.exports.forwardRef(tU);var rve=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r<e.rangeCount;r++)n.push(e.getRangeAt(r));switch(t.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":t.blur();break;default:t=null;break}return e.removeAllRanges(),function(){e.type==="Caret"&&e.removeAllRanges(),e.rangeCount||n.forEach(function(i){e.addRange(i)}),t&&t.focus()}},ive=rve,lL={"text/plain":"Text","text/html":"Url",default:"Text"},ove="Copy to clipboard: #{key}, Enter";function ave(e){var t=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}function sve(e,t){var n,r,i,o,s,a,u=!1;t||(t={}),n=t.debug||!1;try{i=ive(),o=document.createRange(),s=document.getSelection(),a=document.createElement("span"),a.textContent=e,a.ariaHidden="true",a.style.all="unset",a.style.position="fixed",a.style.top=0,a.style.clip="rect(0, 0, 0, 0)",a.style.whiteSpace="pre",a.style.webkitUserSelect="text",a.style.MozUserSelect="text",a.style.msUserSelect="text",a.style.userSelect="text",a.addEventListener("copy",function(p){if(p.stopPropagation(),t.format)if(p.preventDefault(),typeof p.clipboardData>"u"){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var g=lL[t.format]||lL.default;window.clipboardData.setData(g,e)}else p.clipboardData.clearData(),p.clipboardData.setData(t.format,e);t.onCopy&&(p.preventDefault(),t.onCopy(p.clipboardData))}),document.body.appendChild(a),o.selectNodeContents(a),s.addRange(o);var f=document.execCommand("copy");if(!f)throw new Error("copy command was unsuccessful");u=!0}catch(p){n&&console.error("unable to copy using execCommand: ",p),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),u=!0}catch(g){n&&console.error("unable to copy using clipboardData: ",g),n&&console.error("falling back to prompt"),r=ave("message"in t?t.message:ove),window.prompt(r,e)}}finally{s&&(typeof s.removeRange=="function"?s.removeRange(o):s.removeAllRanges()),a&&document.body.removeChild(a),i()}return u}var lve=sve,cve={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M864 170h-60c-4.4 0-8 3.6-8 8v518H310v-73c0-6.7-7.8-10.5-13-6.3l-141.9 112a8 8 0 000 12.6l141.9 112c5.3 4.2 13 .4 13-6.3v-75h498c35.3 0 64-28.7 64-64V178c0-4.4-3.6-8-8-8z"}}]},name:"enter",theme:"outlined"};const uve=cve;var nU=function(t,n){return A(Yn,{...me(me({},t),{},{ref:n,icon:uve})})};nU.displayName="EnterOutlined";const dve=E.exports.forwardRef(nU);var fve=function(t){var n=t.prefixCls,r=t["aria-label"],i=t.className,o=t.style,s=t.direction,a=t.maxLength,u=t.autoSize,f=u===void 0?!0:u,p=t.value,g=t.onSave,v=t.onCancel,b=t.onEnd,_=t.component,T=t.enterIcon,I=T===void 0?A(dve,{}):T,P=E.exports.useRef(null),M=E.exports.useRef(!1),D=E.exports.useRef(),N=E.exports.useState(p),z=$e(N,2),$=z[0],j=z[1];E.exports.useEffect(function(){j(p)},[p]),E.exports.useEffect(function(){if(P.current&&P.current.resizableTextArea){var se=P.current.resizableTextArea.textArea;se.focus();var oe=se.value.length;se.setSelectionRange(oe,oe)}},[]);var U=function(oe){var he=oe.target;j(he.value.replace(/[\n\r]/g,""))},q=function(){M.current=!0},Y=function(){M.current=!1},te=function(oe){var he=oe.keyCode;M.current||(D.current=he)},Z=function(){g($.trim())},X=function(oe){var he=oe.keyCode,Ce=oe.ctrlKey,Se=oe.altKey,be=oe.metaKey,Re=oe.shiftKey;D.current===he&&!M.current&&!Ce&&!Se&&!be&&!Re&&(he===Pt.ENTER?(Z(),b==null||b()):he===Pt.ESC&&v())},J=function(){Z()},ue=_?"".concat(n,"-").concat(_):"",re=je(n,"".concat(n,"-edit-content"),ae({},"".concat(n,"-rtl"),s==="rtl"),i,ue);return it("div",{className:re,style:o,children:[A(D8,{ref:P,maxLength:a,value:$,onChange:U,onKeyDown:te,onKeyUp:X,onCompositionStart:q,onCompositionEnd:Y,onBlur:J,"aria-label":r,rows:1,autoSize:f}),I!==null?Pi(I,{className:"".concat(n,"-edit-content-confirm")}):null]})};const hve=fve;function nS(e,t){return E.exports.useMemo(function(){var n=!!e;return[n,Je(Je({},t),n&&on(e)==="object"?e:null)]},[e])}var pve=function(t,n){var r=E.exports.useRef(!1);E.exports.useEffect(function(){r.current?t():r.current=!0},n)};const mve=pve;var gve=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},vve=E.exports.forwardRef(function(e,t){var n=e.prefixCls,r=e.component,i=r===void 0?"article":r,o=e.className,s=e.setContentRef,a=e.children,u=e.direction,f=gve(e,["prefixCls","component","className","setContentRef","children","direction"]),p=E.exports.useContext(zn),g=p.getPrefixCls,v=p.direction,b=u!=null?u:v,_=t;s&&(_=Aa(t,s));var T=g("typography",n),I=je(T,ae({},"".concat(T,"-rtl"),b==="rtl"),o);return A(i,{className:I,ref:_,...f,children:a})});const rU=vve;function iU(e){var t=on(e);return t==="string"||t==="number"}function yve(e){var t=0;return e.forEach(function(n){iU(n)?t+=String(n).length:t+=1}),t}function cL(e,t){for(var n=0,r=[],i=0;i<e.length;i+=1){if(n===t)return r;var o=e[i],s=iU(o),a=s?String(o).length:1,u=n+a;if(u>t){var f=t-n;return r.push(String(o).slice(0,f)),r}r.push(o),n=u}return e}var xve=0,vx=1,uL=2,rS=3,dL=4,bve=function(t){var n=t.enabledMeasure,r=t.children,i=t.text,o=t.width,s=t.fontSize,a=t.rows,u=t.onEllipsis,f=E.exports.useState([0,0,0]),p=$e(f,2),g=$e(p[0],3),v=g[0],b=g[1],_=g[2],T=p[1],I=E.exports.useState(xve),P=$e(I,2),M=P[0],D=P[1],N=E.exports.useState(0),z=$e(N,2),$=z[0],j=z[1],U=E.exports.useRef(null),q=E.exports.useRef(null),Y=E.exports.useMemo(function(){return Po(i)},[i]),te=E.exports.useMemo(function(){return yve(Y)},[Y]),Z=E.exports.useMemo(function(){return!n||M!==rS?r(Y,!1):r(cL(Y,b),b<te)},[n,M,r,Y,b,te]);Si(function(){n&&o&&s&&te&&(D(vx),T([0,Math.ceil(te/2),te]))},[n,o,s,i,te,a]),Si(function(){var re;M===vx&&j(((re=U.current)===null||re===void 0?void 0:re.offsetHeight)||0)},[M]),Si(function(){var re,se;if($){if(M===vx){var oe=((re=q.current)===null||re===void 0?void 0:re.offsetHeight)||0,he=a*$;oe<=he?(D(dL),u(!1)):D(uL)}else if(M===uL)if(v!==_){var Ce=((se=q.current)===null||se===void 0?void 0:se.offsetHeight)||0,Se=a*$,be=v,Re=_;v===_-1?Re=v:Ce<=Se?be=b:Re=b;var Ie=Math.ceil((be+Re)/2);T([be,Ie,Re])}else D(rS),u(!0)}},[M,v,_,a,$]);var X={width:o,whiteSpace:"normal",margin:0,padding:0},J=function(se,oe,he){return A("span",{"aria-hidden":!0,ref:oe,style:Je({position:"fixed",display:"block",left:0,top:0,zIndex:-9999,visibility:"hidden",pointerEvents:"none",fontSize:Math.floor(s/2)*2},he),children:se})},ue=function(se,oe){var he=cL(Y,se);return J(r(he,!0),oe,X)};return it(nr,{children:[Z,n&&M!==rS&&M!==dL&&it(nr,{children:[J("lg",U,{wordBreak:"keep-all",whiteSpace:"nowrap"}),M===vx?J(r(Y,!1),q,X):ue(b,q)]})]})};const _ve=bve;var wve=function(t){var n=t.enabledEllipsis,r=t.isEllipsis,i=t.children,o=t.tooltipProps;return!(o!=null&&o.title)||!n?i:A(ka,{open:r?void 0:!1,...o,children:i})};const Cve=wve;var Sve=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function Eve(e,t){var n=e.mark,r=e.code,i=e.underline,o=e.delete,s=e.strong,a=e.keyboard,u=e.italic,f=t;function p(g,v){!g||(f=E.exports.createElement(v,{},f))}return p(s,"strong"),p(i,"u"),p(o,"del"),p(r,"code"),p(n,"mark"),p(a,"kbd"),p(u,"i"),f}function yx(e,t,n){return e===!0||e===void 0?t:e||n&&t}function fL(e){return e===!1?[!1,!1]:Array.isArray(e)?e:[e]}var Pve="...",Tve=E.exports.forwardRef(function(e,t){var n,r,i,o=e.prefixCls,s=e.className,a=e.style,u=e.type,f=e.disabled,p=e.children,g=e.ellipsis,v=e.editable,b=e.copyable,_=e.component,T=e.title,I=Sve(e,["prefixCls","className","style","type","disabled","children","ellipsis","editable","copyable","component","title"]),P=E.exports.useContext(zn),M=P.getPrefixCls,D=P.direction,N=ZY("Text")[0],z=E.exports.useRef(null),$=E.exports.useRef(null),j=M("typography",o),U=Gi(I,["mark","code","delete","underline","strong","keyboard","italic"]),q=nS(v),Y=$e(q,2),te=Y[0],Z=Y[1],X=Ei(!1,{value:Z.editing}),J=$e(X,2),ue=J[0],re=J[1],se=Z.triggerType,oe=se===void 0?["icon"]:se,he=function(nt){var zt;nt&&((zt=Z.onStart)===null||zt===void 0||zt.call(Z)),re(nt)};mve(function(){var Et;ue||(Et=$.current)===null||Et===void 0||Et.focus()},[ue]);var Ce=function(nt){nt==null||nt.preventDefault(),he(!0)},Se=function(nt){var zt;(zt=Z.onChange)===null||zt===void 0||zt.call(Z,nt),he(!1)},be=function(){var nt;(nt=Z.onCancel)===null||nt===void 0||nt.call(Z),he(!1)},Re=nS(b),Ie=$e(Re,2),Me=Ie[0],Ae=Ie[1],ze=E.exports.useState(!1),Ke=$e(ze,2),Ue=Ke[0],pt=Ke[1],gt=E.exports.useRef(),Ot={};Ae.format&&(Ot.format=Ae.format);var qe=function(){window.clearTimeout(gt.current)},Ct=function(nt){var zt;nt==null||nt.preventDefault(),nt==null||nt.stopPropagation(),lve(Ae.text||String(p)||"",Ot),pt(!0),qe(),gt.current=window.setTimeout(function(){pt(!1)},3e3),(zt=Ae.onCopy)===null||zt===void 0||zt.call(Ae,nt)};E.exports.useEffect(function(){return qe},[]);var ot=E.exports.useState(!1),vt=$e(ot,2),yt=vt[0],Tt=vt[1],et=E.exports.useState(!1),ct=$e(et,2),at=ct[0],He=ct[1],ut=E.exports.useState(!1),bt=$e(ut,2),Dt=bt[0],Lt=bt[1],Ht=E.exports.useState(!1),Fe=$e(Ht,2),Ye=Fe[0],Zt=Fe[1],an=E.exports.useState(!1),Kt=$e(an,2),Vt=Kt[0],It=Kt[1],Xt=E.exports.useState(!0),pn=$e(Xt,2),tt=pn[0],At=pn[1],qt=nS(g,{expandable:!1}),En=$e(qt,2),yn=En[0],St=En[1],Pn=yn&&!Dt,_n=St.rows,tn=_n===void 0?1:_n,Ft=E.exports.useMemo(function(){return!Pn||St.suffix!==void 0||St.onEllipsis||St.expandable||te||Me},[Pn,St,te,Me]);Si(function(){yn&&!Ft&&(Tt(zE("webkitLineClamp")),He(zE("textOverflow")))},[Ft,yn]);var dt=E.exports.useMemo(function(){return Ft?!1:tn===1?at:yt},[Ft,at,yt]),mt=Pn&&(dt?Vt:Ye),$t=Pn&&tn===1&&dt,Wt=Pn&&tn>1&&dt,mn=function(nt){var zt;Lt(!0),(zt=St.onExpand)===null||zt===void 0||zt.call(St,nt)},An=E.exports.useState(0),Qn=$e(An,2),Jn=Qn[0],ye=Qn[1],W=E.exports.useState(0),Q=$e(W,2),fe=Q[0],ce=Q[1],xe=function(nt,zt){var Gt=nt.offsetWidth,wn;ye(Gt),ce(parseInt((wn=window.getComputedStyle)===null||wn===void 0?void 0:wn.call(window,zt).fontSize,10)||0)},ke=function(nt){var zt;Zt(nt),Ye!==nt&&((zt=St.onEllipsis)===null||zt===void 0||zt.call(St,nt))};E.exports.useEffect(function(){var Et=z.current;if(yn&&dt&&Et){var nt=Wt?Et.offsetHeight<Et.scrollHeight:Et.offsetWidth<Et.scrollWidth;Vt!==nt&&It(nt)}},[yn,dt,p,Wt,tt]),E.exports.useEffect(function(){var Et=z.current;if(!(typeof IntersectionObserver>"u"||!Et||!dt||!Pn)){var nt=new IntersectionObserver(function(){At(!!Et.offsetParent)});return nt.observe(Et),function(){nt.disconnect()}}},[dt,Pn]);var we={};St.tooltip===!0?we={title:(n=Z.text)!==null&&n!==void 0?n:p}:E.exports.isValidElement(St.tooltip)?we={title:St.tooltip}:on(St.tooltip)==="object"?we=Je({title:(r=Z.text)!==null&&r!==void 0?r:p},St.tooltip):we={title:St.tooltip};var Pe=E.exports.useMemo(function(){var Et=function(zt){return["string","number"].includes(on(zt))};if(!(!yn||dt)){if(Et(Z.text))return Z.text;if(Et(p))return p;if(Et(T))return T;if(Et(we.title))return we.title}},[yn,dt,T,we.title,mt]);if(ue)return A(hve,{value:(i=Z.text)!==null&&i!==void 0?i:typeof p=="string"?p:"",onSave:Se,onCancel:be,onEnd:Z.onEnd,prefixCls:j,className:s,style:a,direction:D,component:_,maxLength:Z.maxLength,autoSize:Z.autoSize,enterIcon:Z.enterIcon});var Le=function(){var nt=St.expandable,zt=St.symbol;if(!nt)return null;var Gt;return zt?Gt=zt:Gt=N.expand,A("a",{className:"".concat(j,"-expand"),onClick:mn,"aria-label":N.expand,children:Gt},"expand")},Ze=function(){if(!!te){var nt=Z.icon,zt=Z.tooltip,Gt=Po(zt)[0]||N.edit,wn=typeof Gt=="string"?Gt:"";return oe.includes("icon")?A(ka,{title:zt===!1?"":Gt,children:A(fN,{ref:$,className:"".concat(j,"-edit"),onClick:Ce,"aria-label":wn,children:nt||A(nve,{role:"button"})})},"edit"):null}},Xe=function(){if(!!Me){var nt=Ae.tooltips,zt=Ae.icon,Gt=fL(nt),wn=fL(zt),dn=Ue?yx(Gt[1],N.copied):yx(Gt[0],N.copy),Cn=Ue?N.copied:N.copy,jn=typeof dn=="string"?dn:Cn;return A(ka,{title:dn,children:A(fN,{className:je("".concat(j,"-copy"),Ue&&"".concat(j,"-copy-success")),onClick:Ct,"aria-label":jn,children:Ue?yx(wn[1],A(xI,{}),!0):yx(wn[0],A(Jge,{}),!0)})},"copy")}},Ve=function(nt){return[nt&&Le(),Ze(),Xe()]},Bt=function(nt){return[nt&&A("span",{"aria-hidden":!0,children:Pve},"ellipsis"),St.suffix,Ve(nt)]};return A(Ql,{onResize:xe,disabled:!Pn||dt,children:function(Et){var nt;return A(Cve,{tooltipProps:we,enabledEllipsis:Pn,isEllipsis:mt,children:A(rU,{className:je((nt={},ae(nt,"".concat(j,"-").concat(u),u),ae(nt,"".concat(j,"-disabled"),f),ae(nt,"".concat(j,"-ellipsis"),yn),ae(nt,"".concat(j,"-single-line"),Pn&&tn===1),ae(nt,"".concat(j,"-ellipsis-single-line"),$t),ae(nt,"".concat(j,"-ellipsis-multiple-line"),Wt),nt),s),prefixCls:o,style:Je(Je({},a),{WebkitLineClamp:Wt?tn:void 0}),component:_,ref:Aa(Et,z,t),direction:D,onClick:oe.includes("text")?Ce:void 0,"aria-label":Pe==null?void 0:Pe.toString(),title:T,...U,children:A(_ve,{enabledMeasure:Pn&&!dt,text:p,rows:tn,width:Jn,fontSize:fe,onEllipsis:ke,children:function(zt,Gt){var wn=zt;zt.length&&Gt&&Pe&&(wn=A("span",{"aria-hidden":!0,children:wn},"show-content"));var dn=Eve(e,it(nr,{children:[wn,Bt(Gt)]}));return dn}})})})}})});const h1=Tve;var Ive=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},kve=E.exports.forwardRef(function(e,t){var n=e.ellipsis,r=e.rel,i=Ive(e,["ellipsis","rel"]),o=Je(Je({},i),{rel:r===void 0&&i.target==="_blank"?"noopener noreferrer":r});return delete o.navigate,A(h1,{...o,ref:t,ellipsis:!!n,component:"a"})});const Mve=kve;var Rve=E.exports.forwardRef(function(e,t){return A(h1,{ref:t,...e,component:"div"})});const Ove=Rve;var Dve=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},Ave=function(t,n){var r=t.ellipsis,i=Dve(t,["ellipsis"]),o=E.exports.useMemo(function(){return r&&on(r)==="object"?Gi(r,["expandable","rows"]):r},[r]);return A(h1,{ref:n,...i,ellipsis:o,component:"span"})};const Nve=E.exports.forwardRef(Ave);var Lve=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},zve=tne(1,2,3,4,5),Fve=E.exports.forwardRef(function(e,t){var n=e.level,r=n===void 0?1:n,i=Lve(e,["level"]),o;return zve.includes(r)?o="h".concat(r):o="h1",A(h1,{ref:t,...i,component:o})});const $ve=Fve;var mv=rU;mv.Text=Nve;mv.Link=Mve;mv.Title=$ve;mv.Paragraph=Ove;const Bve=mv;function Vve(e,t){var n="cannot ".concat(e.method," ").concat(e.action," ").concat(t.status,"'"),r=new Error(n);return r.status=t.status,r.method=e.method,r.url=e.action,r}function hL(e){var t=e.responseText||e.response;if(!t)return t;try{return JSON.parse(t)}catch{return t}}function Uve(e){var t=new XMLHttpRequest;e.onProgress&&t.upload&&(t.upload.onprogress=function(o){o.total>0&&(o.percent=o.loaded/o.total*100),e.onProgress(o)});var n=new FormData;e.data&&Object.keys(e.data).forEach(function(i){var o=e.data[i];if(Array.isArray(o)){o.forEach(function(s){n.append("".concat(i,"[]"),s)});return}n.append(i,o)}),e.file instanceof Blob?n.append(e.filename,e.file,e.file.name):n.append(e.filename,e.file),t.onerror=function(o){e.onError(o)},t.onload=function(){return t.status<200||t.status>=300?e.onError(Vve(e,t),hL(t)):e.onSuccess(hL(t),t)},t.open(e.method,e.action,!0),e.withCredentials&&"withCredentials"in t&&(t.withCredentials=!0);var r=e.headers||{};return r["X-Requested-With"]!==null&&t.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(r).forEach(function(i){r[i]!==null&&t.setRequestHeader(i,r[i])}),t.send(n),{abort:function(){t.abort()}}}var jve=+new Date,Hve=0;function iS(){return"rc-upload-".concat(jve,"-").concat(++Hve)}const oS=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(","),r=e.name||"",i=e.type||"",o=i.replace(/\/.*$/,"");return n.some(function(s){var a=s.trim();if(/^\*(\/\*)?$/.test(s))return!0;if(a.charAt(0)==="."){var u=r.toLowerCase(),f=a.toLowerCase(),p=[f];return(f===".jpg"||f===".jpeg")&&(p=[".jpg",".jpeg"]),p.some(function(g){return u.endsWith(g)})}return/\/\*$/.test(a)?o===a.replace(/\/.*$/,""):i===a?!0:/^\w+$/.test(a)?(Lr(!1,"Upload takes an invalidate 'accept' type '".concat(a,"'.Skip for check.")),!0):!1})}return!0};function Kve(e,t){var n=e.createReader(),r=[];function i(){n.readEntries(function(o){var s=Array.prototype.slice.apply(o);r=r.concat(s);var a=!s.length;a?t(r):i()})}i()}var Wve=function(t,n,r){var i=function o(s,a){s.path=a||"",s.isFile?s.file(function(u){r(u)&&(s.fullPath&&!u.webkitRelativePath&&(Object.defineProperties(u,{webkitRelativePath:{writable:!0}}),u.webkitRelativePath=s.fullPath.replace(/^\//,""),Object.defineProperties(u,{webkitRelativePath:{writable:!1}})),n([u]))}):s.isDirectory&&Kve(s,function(u){u.forEach(function(f){o(f,"".concat(a).concat(s.name,"/"))})})};t.forEach(function(o){i(o.webkitGetAsEntry())})},Gve=["component","prefixCls","className","disabled","id","style","multiple","accept","capture","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave"],qve=function(e){si(n,e);var t=li(n);function n(){var r;jr(this,n);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return r=t.call.apply(t,[this].concat(o)),r.state={uid:iS()},r.reqs={},r.fileInput=void 0,r._isMounted=void 0,r.onChange=function(a){var u=r.props,f=u.accept,p=u.directory,g=a.target.files,v=Mt(g).filter(function(b){return!p||oS(b,f)});r.uploadFiles(v),r.reset()},r.onClick=function(a){var u=r.fileInput;if(!!u){var f=r.props,p=f.children,g=f.onClick;if(p&&p.type==="button"){var v=u.parentNode;v.focus(),v.querySelector("button").blur()}u.click(),g&&g(a)}},r.onKeyDown=function(a){a.key==="Enter"&&r.onClick(a)},r.onFileDrop=function(a){var u=r.props.multiple;if(a.preventDefault(),a.type!=="dragover")if(r.props.directory)Wve(Array.prototype.slice.call(a.dataTransfer.items),r.uploadFiles,function(p){return oS(p,r.props.accept)});else{var f=Mt(a.dataTransfer.files).filter(function(p){return oS(p,r.props.accept)});u===!1&&(f=f.slice(0,1)),r.uploadFiles(f)}},r.uploadFiles=function(a){var u=Mt(a),f=u.map(function(p){return p.uid=iS(),r.processFile(p,u)});Promise.all(f).then(function(p){var g=r.props.onBatchStart;g==null||g(p.map(function(v){var b=v.origin,_=v.parsedFile;return{file:b,parsedFile:_}})),p.filter(function(v){return v.parsedFile!==null}).forEach(function(v){r.post(v)})})},r.processFile=function(){var a=du(Hi().mark(function u(f,p){var g,v,b,_,T,I,P,M,D;return Hi().wrap(function(z){for(;;)switch(z.prev=z.next){case 0:if(g=r.props.beforeUpload,v=f,!g){z.next=14;break}return z.prev=3,z.next=6,g(f,p);case 6:v=z.sent,z.next=12;break;case 9:z.prev=9,z.t0=z.catch(3),v=!1;case 12:if(v!==!1){z.next=14;break}return z.abrupt("return",{origin:f,parsedFile:null,action:null,data:null});case 14:if(b=r.props.action,typeof b!="function"){z.next=21;break}return z.next=18,b(f);case 18:_=z.sent,z.next=22;break;case 21:_=b;case 22:if(T=r.props.data,typeof T!="function"){z.next=29;break}return z.next=26,T(f);case 26:I=z.sent,z.next=30;break;case 29:I=T;case 30:return P=(on(v)==="object"||typeof v=="string")&&v?v:f,P instanceof File?M=P:M=new File([P],f.name,{type:f.type}),D=M,D.uid=f.uid,z.abrupt("return",{origin:f,data:I,parsedFile:D,action:_});case 35:case"end":return z.stop()}},u,null,[[3,9]])}));return function(u,f){return a.apply(this,arguments)}}(),r.saveFileInput=function(a){r.fileInput=a},r}return Hr(n,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"post",value:function(i){var o=this,s=i.data,a=i.origin,u=i.action,f=i.parsedFile;if(!!this._isMounted){var p=this.props,g=p.onStart,v=p.customRequest,b=p.name,_=p.headers,T=p.withCredentials,I=p.method,P=a.uid,M=v||Uve,D={action:u,filename:b,data:s,file:f,headers:_,withCredentials:T,method:I||"post",onProgress:function(z){var $=o.props.onProgress;$==null||$(z,f)},onSuccess:function(z,$){var j=o.props.onSuccess;j==null||j(z,f,$),delete o.reqs[P]},onError:function(z,$){var j=o.props.onError;j==null||j(z,$,f),delete o.reqs[P]}};g(a),this.reqs[P]=M(D)}}},{key:"reset",value:function(){this.setState({uid:iS()})}},{key:"abort",value:function(i){var o=this.reqs;if(i){var s=i.uid?i.uid:i;o[s]&&o[s].abort&&o[s].abort(),delete o[s]}else Object.keys(o).forEach(function(a){o[a]&&o[a].abort&&o[a].abort(),delete o[a]})}},{key:"render",value:function(){var i,o=this.props,s=o.component,a=o.prefixCls,u=o.className,f=o.disabled,p=o.id,g=o.style,v=o.multiple,b=o.accept,_=o.capture,T=o.children,I=o.directory,P=o.openFileDialogOnClick,M=o.onMouseEnter,D=o.onMouseLeave,N=kn(o,Gve),z=je((i={},ae(i,a,!0),ae(i,"".concat(a,"-disabled"),f),ae(i,u,u),i)),$=I?{directory:"directory",webkitdirectory:"webkitdirectory"}:{},j=f?{}:{onClick:P?this.onClick:function(){},onKeyDown:P?this.onKeyDown:function(){},onMouseEnter:M,onMouseLeave:D,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:"0"};return it(s,{...j,className:z,role:"button",style:g,children:[E.exports.createElement("input",{...Zl(N,{aria:!0,data:!0}),id:p,type:"file",ref:this.saveFileInput,onClick:function(q){return q.stopPropagation()},key:this.state.uid,style:{display:"none"},accept:b,...$,multiple:v,onChange:this.onChange,..._!=null?{capture:_}:{}}),T]})}}]),n}(E.exports.Component);function aS(){}var sP=function(e){si(n,e);var t=li(n);function n(){var r;jr(this,n);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return r=t.call.apply(t,[this].concat(o)),r.uploader=void 0,r.saveUploader=function(a){r.uploader=a},r}return Hr(n,[{key:"abort",value:function(i){this.uploader.abort(i)}},{key:"render",value:function(){return A(qve,{...this.props,ref:this.saveUploader})}}]),n}(E.exports.Component);sP.defaultProps={component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:aS,onError:aS,onSuccess:aS,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0};var Zve={icon:function(t,n){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M534 352V136H232v752h560V394H576a42 42 0 01-42-42z",fill:n}},{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM602 137.8L790.2 326H602V137.8zM792 888H232V136h302v216a42 42 0 0042 42h216v494z",fill:t}}]}},name:"file",theme:"twotone"};const Xve=Zve;var oU=function(t,n){return A(Yn,{...me(me({},t),{},{ref:n,icon:Xve})})};oU.displayName="FileTwoTone";const Yve=E.exports.forwardRef(oU);var Qve={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M779.3 196.6c-94.2-94.2-247.6-94.2-341.7 0l-261 260.8c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l261-260.8c32.4-32.4 75.5-50.2 121.3-50.2s88.9 17.8 121.2 50.2c32.4 32.4 50.2 75.5 50.2 121.2 0 45.8-17.8 88.8-50.2 121.2l-266 265.9-43.1 43.1c-40.3 40.3-105.8 40.3-146.1 0-19.5-19.5-30.2-45.4-30.2-73s10.7-53.5 30.2-73l263.9-263.8c6.7-6.6 15.5-10.3 24.9-10.3h.1c9.4 0 18.1 3.7 24.7 10.3 6.7 6.7 10.3 15.5 10.3 24.9 0 9.3-3.7 18.1-10.3 24.7L372.4 653c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l215.6-215.6c19.9-19.9 30.8-46.3 30.8-74.4s-11-54.6-30.8-74.4c-41.1-41.1-107.9-41-149 0L463 364 224.8 602.1A172.22 172.22 0 00174 724.8c0 46.3 18.1 89.8 50.8 122.5 33.9 33.8 78.3 50.7 122.7 50.7 44.4 0 88.8-16.9 122.6-50.7l309.2-309C824.8 492.7 850 432 850 367.5c.1-64.6-25.1-125.3-70.7-170.9z"}}]},name:"paper-clip",theme:"outlined"};const Jve=Qve;var aU=function(t,n){return A(Yn,{...me(me({},t),{},{ref:n,icon:Jve})})};aU.displayName="PaperClipOutlined";const eye=E.exports.forwardRef(aU);var tye={icon:function(t,n){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 632H136v-39.9l138.5-164.3 150.1 178L658.1 489 888 761.6V792zm0-129.8L664.2 396.8c-3.2-3.8-9-3.8-12.2 0L424.6 666.4l-144-170.7c-3.2-3.8-9-3.8-12.2 0L136 652.7V232h752v430.2z",fill:t}},{tag:"path",attrs:{d:"M424.6 765.8l-150.1-178L136 752.1V792h752v-30.4L658.1 489z",fill:n}},{tag:"path",attrs:{d:"M136 652.7l132.4-157c3.2-3.8 9-3.8 12.2 0l144 170.7L652 396.8c3.2-3.8 9-3.8 12.2 0L888 662.2V232H136v420.7zM304 280a88 88 0 110 176 88 88 0 010-176z",fill:n}},{tag:"path",attrs:{d:"M276 368a28 28 0 1056 0 28 28 0 10-56 0z",fill:n}},{tag:"path",attrs:{d:"M304 456a88 88 0 100-176 88 88 0 000 176zm0-116c15.5 0 28 12.5 28 28s-12.5 28-28 28-28-12.5-28-28 12.5-28 28-28z",fill:t}}]}},name:"picture",theme:"twotone"};const nye=tye;var sU=function(t,n){return A(Yn,{...me(me({},t),{},{ref:n,icon:nye})})};sU.displayName="PictureTwoTone";const rye=E.exports.forwardRef(sU);function xx(e){return Je(Je({},e),{lastModified:e.lastModified,lastModifiedDate:e.lastModifiedDate,name:e.name,size:e.size,type:e.type,uid:e.uid,percent:0,originFileObj:e})}function bx(e,t){var n=Mt(t),r=n.findIndex(function(i){var o=i.uid;return o===e.uid});return r===-1?n.push(e):n[r]=e,n}function sS(e,t){var n=e.uid!==void 0?"uid":"name";return t.filter(function(r){return r[n]===e[n]})[0]}function iye(e,t){var n=e.uid!==void 0?"uid":"name",r=t.filter(function(i){return i[n]!==e[n]});return r.length===t.length?null:r}var oye=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=t.split("/"),r=n[n.length-1],i=r.split(/#|\?/)[0];return(/\.[^./\\]*$/.exec(i)||[""])[0]},lU=function(t){return t.indexOf("image/")===0},aye=function(t){if(t.type&&!t.thumbUrl)return lU(t.type);var n=t.thumbUrl||t.url||"",r=oye(n);return/^data:image\//.test(n)||/(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico|heic|heif)$/i.test(r)?!0:!(/^data:/.test(n)||r)},wc=200;function sye(e){return new Promise(function(t){if(!e.type||!lU(e.type)){t("");return}var n=document.createElement("canvas");n.width=wc,n.height=wc,n.style.cssText="position: fixed; left: 0; top: 0; width: ".concat(wc,"px; height: ").concat(wc,"px; z-index: 9999; display: none;"),document.body.appendChild(n);var r=n.getContext("2d"),i=new Image;if(i.onload=function(){var s=i.width,a=i.height,u=wc,f=wc,p=0,g=0;s>a?(f=a*(wc/s),g=-(f-u)/2):(u=s*(wc/a),p=-(u-f)/2),r.drawImage(i,p,g,u,f);var v=n.toDataURL();document.body.removeChild(n),t(v)},i.crossOrigin="anonymous",e.type.startsWith("image/svg+xml")){var o=new FileReader;o.addEventListener("load",function(){o.result&&(i.src=o.result)}),o.readAsDataURL(e)}else i.src=window.URL.createObjectURL(e)})}var lye={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"download",theme:"outlined"};const cU=lye;var uU=function(t,n){return A(Yn,{...me(me({},t),{},{ref:n,icon:cU})})};uU.displayName="DownloadOutlined";const cye=E.exports.forwardRef(uU);var uye=E.exports.forwardRef(function(e,t){var n,r=e.prefixCls,i=e.className,o=e.style,s=e.locale,a=e.listType,u=e.file,f=e.items,p=e.progress,g=e.iconRender,v=e.actionIconRender,b=e.itemRender,_=e.isImgUrl,T=e.showPreviewIcon,I=e.showRemoveIcon,P=e.showDownloadIcon,M=e.previewIcon,D=e.removeIcon,N=e.downloadIcon,z=e.onPreview,$=e.onDownload,j=e.onClose,U,q,Y=u.status,te=E.exports.useState(Y),Z=$e(te,2),X=Z[0],J=Z[1];E.exports.useEffect(function(){Y!=="removed"&&J(Y)},[Y]);var ue=E.exports.useState(!1),re=$e(ue,2),se=re[0],oe=re[1],he=E.exports.useRef(null);E.exports.useEffect(function(){return he.current=setTimeout(function(){oe(!0)},300),function(){he.current&&clearTimeout(he.current)}},[]);var Ce="".concat(r,"-span"),Se=g(u),be=A("div",{className:"".concat(r,"-text-icon"),children:Se});if(a==="picture"||a==="picture-card")if(X==="uploading"||!u.thumbUrl&&!u.url){var Re,Ie=je((Re={},ae(Re,"".concat(r,"-list-item-thumbnail"),!0),ae(Re,"".concat(r,"-list-item-file"),X!=="uploading"),Re));be=A("div",{className:Ie,children:Se})}else{var Me,Ae=_!=null&&_(u)?A("img",{src:u.thumbUrl||u.url,alt:u.name,className:"".concat(r,"-list-item-image"),crossOrigin:u.crossOrigin}):Se,ze=je((Me={},ae(Me,"".concat(r,"-list-item-thumbnail"),!0),ae(Me,"".concat(r,"-list-item-file"),_&&!_(u)),Me));be=A("a",{className:ze,onClick:function(Ht){return z(u,Ht)},href:u.url||u.thumbUrl,target:"_blank",rel:"noopener noreferrer",children:Ae})}var Ke=je((n={},ae(n,"".concat(r,"-list-item"),!0),ae(n,"".concat(r,"-list-item-").concat(X),!0),ae(n,"".concat(r,"-list-item-list-type-").concat(a),!0),n)),Ue=typeof u.linkProps=="string"?JSON.parse(u.linkProps):u.linkProps,pt=I?v((typeof D=="function"?D(u):D)||A(Rge,{}),function(){return j(u)},r,s.removeFile):null,gt=P&&X==="done"?v((typeof N=="function"?N(u):N)||A(cye,{}),function(){return $(u)},r,s.downloadFile):null,Ot=a!=="picture-card"&&it("span",{className:je("".concat(r,"-list-item-card-actions"),{picture:a==="picture"}),children:[gt,pt]},"download-delete"),qe=je("".concat(r,"-list-item-name")),Ct=u.url?[A("a",{target:"_blank",rel:"noopener noreferrer",className:qe,title:u.name,...Ue,href:u.url,onClick:function(Ht){return z(u,Ht)},children:u.name},"view"),Ot]:[A("span",{className:qe,onClick:function(Ht){return z(u,Ht)},title:u.name,children:u.name},"view"),Ot],ot={pointerEvents:"none",opacity:.5},vt=T?A("a",{href:u.url||u.thumbUrl,target:"_blank",rel:"noopener noreferrer",style:u.url||u.thumbUrl?void 0:ot,onClick:function(Ht){return z(u,Ht)},title:s.previewFile,children:typeof M=="function"?M(u):M||A(LI,{})}):null,yt=a==="picture-card"&&X!=="uploading"&&it("span",{className:"".concat(r,"-list-item-actions"),children:[vt,X==="done"&&gt,pt]}),Tt;u.response&&typeof u.response=="string"?Tt=u.response:Tt=((U=u.error)===null||U===void 0?void 0:U.statusText)||((q=u.error)===null||q===void 0?void 0:q.message)||s.uploadError;var et=it("span",{className:Ce,children:[be,Ct]}),ct=E.exports.useContext(zn),at=ct.getPrefixCls,He=at(),ut=it("div",{className:Ke,children:[A("div",{className:"".concat(r,"-list-item-info"),children:et}),yt,se&&A(oa,{motionName:"".concat(He,"-fade"),visible:X==="uploading",motionDeadline:2e3,children:function(Lt){var Ht=Lt.className,Fe="percent"in u?A(VI,{...p,type:"line",percent:u.percent}):null;return A("div",{className:je("".concat(r,"-list-item-progress"),Ht),children:Fe})}})]}),bt=je("".concat(r,"-list-").concat(a,"-container"),i),Dt=X==="error"?A(ka,{title:Tt,getPopupContainer:function(Ht){return Ht.parentNode},children:ut}):ut;return A("div",{className:bt,style:o,ref:t,children:b?b(Dt,u,f,{download:$.bind(null,u),preview:z.bind(null,u),remove:j.bind(null,u)}):Dt})});const dye=uye;var p1=Je({},U_);delete p1.onAppearEnd;delete p1.onEnterEnd;delete p1.onLeaveEnd;var fye=function(t,n){var r,i=t.listType,o=i===void 0?"text":i,s=t.previewFile,a=s===void 0?sye:s,u=t.onPreview,f=t.onDownload,p=t.onRemove,g=t.locale,v=t.iconRender,b=t.isImageUrl,_=b===void 0?aye:b,T=t.prefixCls,I=t.items,P=I===void 0?[]:I,M=t.showPreviewIcon,D=M===void 0?!0:M,N=t.showRemoveIcon,z=N===void 0?!0:N,$=t.showDownloadIcon,j=$===void 0?!1:$,U=t.removeIcon,q=t.previewIcon,Y=t.downloadIcon,te=t.progress,Z=te===void 0?{strokeWidth:2,showInfo:!1}:te,X=t.appendAction,J=t.appendActionVisible,ue=J===void 0?!0:J,re=t.itemRender,se=_I(),oe=E.exports.useState(!1),he=$e(oe,2),Ce=he[0],Se=he[1];E.exports.useEffect(function(){o!=="picture"&&o!=="picture-card"||(P||[]).forEach(function(ot){typeof document>"u"||typeof window>"u"||!window.FileReader||!window.File||!(ot.originFileObj instanceof File||ot.originFileObj instanceof Blob)||ot.thumbUrl!==void 0||(ot.thumbUrl="",a&&a(ot.originFileObj).then(function(vt){ot.thumbUrl=vt||"",se()}))})},[o,P,a]),E.exports.useEffect(function(){Se(!0)},[]);var be=function(vt,yt){if(!!u)return yt==null||yt.preventDefault(),u(vt)},Re=function(vt){typeof f=="function"?f(vt):vt.url&&window.open(vt.url)},Ie=function(vt){p==null||p(vt)},Me=function(vt){if(v)return v(vt,o);var yt=vt.status==="uploading",Tt=_&&_(vt)?A(rye,{}):A(Yve,{}),et=yt?A(Id,{}):A(eye,{});return o==="picture"?et=yt?A(Id,{}):Tt:o==="picture-card"&&(et=yt?g.uploading:Tt),et},Ae=function(vt,yt,Tt,et){var ct={type:"text",size:"small",title:et,onClick:function(ut){yt(),Ta(vt)&&vt.props.onClick&&vt.props.onClick(ut)},className:"".concat(Tt,"-list-item-card-actions-btn")};if(Ta(vt)){var at=Pi(vt,Je(Je({},vt.props),{onClick:function(){}}));return A(Yr,{...ct,icon:at})}return A(Yr,{...ct,children:A("span",{children:vt})})};E.exports.useImperativeHandle(n,function(){return{handlePreview:be,handleDownload:Re}});var ze=E.exports.useContext(zn),Ke=ze.getPrefixCls,Ue=ze.direction,pt=Ke("upload",T),gt=je((r={},ae(r,"".concat(pt,"-list"),!0),ae(r,"".concat(pt,"-list-").concat(o),!0),ae(r,"".concat(pt,"-list-rtl"),Ue==="rtl"),r)),Ot=Mt(P.map(function(ot){return{key:ot.uid,file:ot}})),qe=o==="picture-card"?"animate-inline":"animate",Ct={motionDeadline:2e3,motionName:"".concat(pt,"-").concat(qe),keys:Ot,motionAppear:Ce};return o!=="picture-card"&&(Ct=Je(Je({},p1),Ct)),it("div",{className:gt,children:[A(J6,{...Ct,component:!1,children:function(ot){var vt=ot.key,yt=ot.file,Tt=ot.className,et=ot.style;return A(dye,{locale:g,prefixCls:pt,className:Tt,style:et,file:yt,items:P,progress:Z,listType:o,isImgUrl:_,showPreviewIcon:D,showRemoveIcon:z,showDownloadIcon:j,removeIcon:U,previewIcon:q,downloadIcon:Y,iconRender:Me,actionIconRender:Ae,itemRender:re,onPreview:be,onDownload:Re,onClose:Ie},vt)}}),X&&A(oa,{...Ct,visible:ue,forceRender:!0,children:function(ot){var vt=ot.className,yt=ot.style;return Pi(X,function(Tt){return{className:je(Tt.className,vt),style:Je(Je(Je({},yt),{pointerEvents:vt?"none":void 0}),Tt.style)}})}})]})},hye=E.exports.forwardRef(fye);const pye=hye;var mye=globalThis&&globalThis.__awaiter||function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(p){try{f(r.next(p))}catch(g){s(g)}}function u(p){try{f(r.throw(p))}catch(g){s(g)}}function f(p){p.done?o(p.value):i(p.value).then(a,u)}f((r=r.apply(e,t||[])).next())})},Em="__LIST_IGNORE_".concat(Date.now(),"__"),gye=function(t,n){var r,i=t.fileList,o=t.defaultFileList,s=t.onRemove,a=t.showUploadList,u=a===void 0?!0:a,f=t.listType,p=f===void 0?"text":f,g=t.onPreview,v=t.onDownload,b=t.onChange,_=t.onDrop,T=t.previewFile,I=t.disabled,P=t.locale,M=t.iconRender,D=t.isImageUrl,N=t.progress,z=t.prefixCls,$=t.className,j=t.type,U=j===void 0?"select":j,q=t.children,Y=t.style,te=t.itemRender,Z=t.maxCount,X=t.data,J=X===void 0?{}:X,ue=t.multiple,re=ue===void 0?!1:ue,se=t.action,oe=se===void 0?"":se,he=t.accept,Ce=he===void 0?"":he,Se=t.supportServerRender,be=Se===void 0?!0:Se,Re=E.exports.useContext(fu),Ie=I!=null?I:Re,Me=Ei(o||[],{value:i,postState:function(It){return It!=null?It:[]}}),Ae=$e(Me,2),ze=Ae[0],Ke=Ae[1],Ue=E.exports.useState("drop"),pt=$e(Ue,2),gt=pt[0],Ot=pt[1],qe=E.exports.useRef(null);E.exports.useMemo(function(){var Vt=Date.now();(i||[]).forEach(function(It,Xt){!It.uid&&!Object.isFrozen(It)&&(It.uid="__AUTO__".concat(Vt,"_").concat(Xt,"__"))})},[i]);var Ct=function(It,Xt,pn){var tt=Mt(Xt);Z===1?tt=tt.slice(-1):Z&&(tt=tt.slice(0,Z)),al.exports.flushSync(function(){Ke(tt)});var At={file:It,fileList:tt};pn&&(At.event=pn),b==null||b(At)},ot=function(It,Xt){return mye(void 0,void 0,void 0,Hi().mark(function pn(){var tt,At,qt,En;return Hi().wrap(function(St){for(;;)switch(St.prev=St.next){case 0:if(tt=t.beforeUpload,At=t.transformFile,qt=It,!tt){St.next=13;break}return St.next=5,tt(It,Xt);case 5:if(En=St.sent,En!==!1){St.next=8;break}return St.abrupt("return",!1);case 8:if(delete It[Em],En!==Em){St.next=12;break}return Object.defineProperty(It,Em,{value:!0,configurable:!0}),St.abrupt("return",!1);case 12:on(En)==="object"&&En&&(qt=En);case 13:if(!At){St.next=17;break}return St.next=16,At(qt);case 16:qt=St.sent;case 17:return St.abrupt("return",qt);case 18:case"end":return St.stop()}},pn)}))},vt=function(It){var Xt=It.filter(function(At){return!At.file[Em]});if(!!Xt.length){var pn=Xt.map(function(At){return xx(At.file)}),tt=Mt(ze);pn.forEach(function(At){tt=bx(At,tt)}),pn.forEach(function(At,qt){var En=At;if(Xt[qt].parsedFile)At.status="uploading";else{var yn=At.originFileObj,St;try{St=new File([yn],yn.name,{type:yn.type})}catch{St=new Blob([yn],{type:yn.type}),St.name=yn.name,St.lastModifiedDate=new Date,St.lastModified=new Date().getTime()}St.uid=At.uid,En=St}Ct(En,tt)})}},yt=function(It,Xt,pn){try{typeof It=="string"&&(It=JSON.parse(It))}catch{}if(!!sS(Xt,ze)){var tt=xx(Xt);tt.status="done",tt.percent=100,tt.response=It,tt.xhr=pn;var At=bx(tt,ze);Ct(tt,At)}},Tt=function(It,Xt){if(!!sS(Xt,ze)){var pn=xx(Xt);pn.status="uploading",pn.percent=It.percent;var tt=bx(pn,ze);Ct(pn,tt,It)}},et=function(It,Xt,pn){if(!!sS(pn,ze)){var tt=xx(pn);tt.error=It,tt.response=Xt,tt.status="error";var At=bx(tt,ze);Ct(tt,At)}},ct=function(It){var Xt;Promise.resolve(typeof s=="function"?s(It):s).then(function(pn){var tt;if(pn!==!1){var At=iye(It,ze);At&&(Xt=Je(Je({},It),{status:"removed"}),ze==null||ze.forEach(function(qt){var En=Xt.uid!==void 0?"uid":"name";qt[En]===Xt[En]&&!Object.isFrozen(qt)&&(qt.status="removed")}),(tt=qe.current)===null||tt===void 0||tt.abort(Xt),Ct(Xt,At))}})},at=function(It){Ot(It.type),It.type==="drop"&&(_==null||_(It))};E.exports.useImperativeHandle(n,function(){return{onBatchStart:vt,onSuccess:yt,onProgress:Tt,onError:et,fileList:ze,upload:qe.current}});var He=E.exports.useContext(zn),ut=He.getPrefixCls,bt=He.direction,Dt=ut("upload",z),Lt=Je(Je({onBatchStart:vt,onError:et,onProgress:Tt,onSuccess:yt},t),{data:J,multiple:re,action:oe,accept:Ce,supportServerRender:be,prefixCls:Dt,disabled:Ie,beforeUpload:ot,onChange:void 0});delete Lt.className,delete Lt.style,(!q||Ie)&&delete Lt.id;var Ht=function(It,Xt){return u?A(Lh,{componentName:"Upload",defaultLocale:Ms.Upload,children:function(pn){var tt=typeof u=="boolean"?{}:u,At=tt.showRemoveIcon,qt=tt.showPreviewIcon,En=tt.showDownloadIcon,yn=tt.removeIcon,St=tt.previewIcon,Pn=tt.downloadIcon;return A(pye,{prefixCls:Dt,listType:p,items:ze,previewFile:T,onPreview:g,onDownload:v,onRemove:ct,showRemoveIcon:!Ie&&At,showPreviewIcon:qt,showDownloadIcon:En,removeIcon:yn,previewIcon:St,downloadIcon:Pn,iconRender:M,locale:Je(Je({},pn),P),isImageUrl:D,progress:N,appendAction:It,appendActionVisible:Xt,itemRender:te})}}):It};if(U==="drag"){var Fe,Ye=je(Dt,(Fe={},ae(Fe,"".concat(Dt,"-drag"),!0),ae(Fe,"".concat(Dt,"-drag-uploading"),ze.some(function(Vt){return Vt.status==="uploading"})),ae(Fe,"".concat(Dt,"-drag-hover"),gt==="dragover"),ae(Fe,"".concat(Dt,"-disabled"),Ie),ae(Fe,"".concat(Dt,"-rtl"),bt==="rtl"),Fe),$);return it("span",{children:[A("div",{className:Ye,onDrop:at,onDragOver:at,onDragLeave:at,style:Y,children:A(sP,{...Lt,ref:qe,className:"".concat(Dt,"-btn"),children:A("div",{className:"".concat(Dt,"-drag-container"),children:q})})}),Ht()]})}var Zt=je(Dt,(r={},ae(r,"".concat(Dt,"-select"),!0),ae(r,"".concat(Dt,"-select-").concat(p),!0),ae(r,"".concat(Dt,"-disabled"),Ie),ae(r,"".concat(Dt,"-rtl"),bt==="rtl"),r)),an=function(It){return A("div",{className:Zt,style:It,children:A(sP,{...Lt,ref:qe})})},Kt=an(q?void 0:{display:"none"});return p==="picture-card"?A("span",{className:je("".concat(Dt,"-picture-card-wrapper"),$),children:Ht(Kt,!!q)}):it("span",{className:$,children:[Kt,Ht()]})},vye=E.exports.forwardRef(gye);const dU=vye;var yye=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},xye=E.exports.forwardRef(function(e,t){var n=e.style,r=e.height,i=yye(e,["style","height"]);return A(dU,{ref:t,...i,type:"drag",style:Je(Je({},n),{height:r})})});const bye=xye;var XI=dU;XI.Dragger=bye;XI.LIST_IGNORE=Em;const _ye=XI,pL=e=>{let t;const n=new Set,r=(u,f)=>{const p=typeof u=="function"?u(t):u;if(!Object.is(p,t)){const g=t;t=(f!=null?f:typeof p!="object")?p:Object.assign({},t,p),n.forEach(v=>v(t,g))}},i=()=>t,a={setState:r,getState:i,subscribe:u=>(n.add(u),()=>n.delete(u)),destroy:()=>{var u;((u={VITE_API_URL:"https://geoenergy.spatialsystems.ru",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0})==null?void 0:u.MODE)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}};return t=e(r,i,a),a},wye=e=>e?pL(e):pL;var fU={exports:{}},hU={},YI={exports:{}},pU={};/**
* @license React
* use-sync-external-store-shim.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 _h=E.exports;function Cye(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Sye=typeof Object.is=="function"?Object.is:Cye,Eye=_h.useState,Pye=_h.useEffect,Tye=_h.useLayoutEffect,Iye=_h.useDebugValue;function kye(e,t){var n=t(),r=Eye({inst:{value:n,getSnapshot:t}}),i=r[0].inst,o=r[1];return Tye(function(){i.value=n,i.getSnapshot=t,lS(i)&&o({inst:i})},[e,n,t]),Pye(function(){return lS(i)&&o({inst:i}),e(function(){lS(i)&&o({inst:i})})},[e]),Iye(n),n}function lS(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Sye(e,n)}catch{return!0}}function Mye(e,t){return t()}var Rye=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Mye:kye;pU.useSyncExternalStore=_h.useSyncExternalStore!==void 0?_h.useSyncExternalStore:Rye;(function(e){e.exports=pU})(YI);/**
* @license React
* use-sync-external-store-shim/with-selector.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 m1=E.exports,Oye=YI.exports;function Dye(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Aye=typeof Object.is=="function"?Object.is:Dye,Nye=Oye.useSyncExternalStore,Lye=m1.useRef,zye=m1.useEffect,Fye=m1.useMemo,$ye=m1.useDebugValue;hU.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=Lye(null);if(o.current===null){var s={hasValue:!1,value:null};o.current=s}else s=o.current;o=Fye(function(){function u(b){if(!f){if(f=!0,p=b,b=r(b),i!==void 0&&s.hasValue){var _=s.value;if(i(_,b))return g=_}return g=b}if(_=g,Aye(p,b))return _;var T=r(b);return i!==void 0&&i(_,T)?_:(p=b,g=T)}var f=!1,p,g,v=n===void 0?null:n;return[function(){return u(t())},v===null?void 0:function(){return u(v())}]},[t,n,r,i]);var a=Nye(e,o[0],o[1]);return zye(function(){s.hasValue=!0,s.value=a},[a]),$ye(a),a};(function(e){e.exports=hU})(fU);const Bye=VP(fU.exports),{useSyncExternalStoreWithSelector:Vye}=Bye;function Uye(e,t=e.getState,n){const r=Vye(e.subscribe,e.getState,e.getServerState||e.getState,t,n);return E.exports.useDebugValue(r),r}const mL=e=>{var t;((t={VITE_API_URL:"https://geoenergy.spatialsystems.ru",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0})==null?void 0:t.MODE)!=="production"&&typeof e!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const n=typeof e=="function"?wye(e):e,r=(i,o)=>Uye(n,i,o);return Object.assign(r,n),r},hu=e=>e?mL(e):mL;function Ya(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw Error("[Immer] minified error nr: "+e+(n.length?" "+n.map(function(i){return"'"+i+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function wh(e){return!!e&&!!e[Pr]}function Xl(e){var t;return!!e&&(function(n){if(!n||typeof n!="object")return!1;var r=Object.getPrototypeOf(n);if(r===null)return!0;var i=Object.hasOwnProperty.call(r,"constructor")&&r.constructor;return i===Object||typeof i=="function"&&Function.toString.call(i)===Qye}(e)||Array.isArray(e)||!!e[wL]||!!(!((t=e.constructor)===null||t===void 0)&&t[wL])||QI(e)||JI(e))}function Ch(e,t,n){n===void 0&&(n=!1),qh(e)===0?(n?Object.keys:ik)(e).forEach(function(r){n&&typeof r=="symbol"||t(r,e[r],e)}):e.forEach(function(r,i){return t(i,r,e)})}function qh(e){var t=e[Pr];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:QI(e)?2:JI(e)?3:0}function lP(e,t){return qh(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function jye(e,t){return qh(e)===2?e.get(t):e[t]}function mU(e,t,n){var r=qh(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function Hye(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function QI(e){return Xye&&e instanceof Map}function JI(e){return Yye&&e instanceof Set}function Ji(e){return e.o||e.t}function ek(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=Jye(e);delete t[Pr];for(var n=ik(t),r=0;r<n.length;r++){var i=n[r],o=t[i];o.writable===!1&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(t[i]={configurable:!0,writable:!0,enumerable:o.enumerable,value:e[i]})}return Object.create(Object.getPrototypeOf(e),t)}function tk(e,t){return t===void 0&&(t=!1),nk(e)||wh(e)||!Xl(e)||(qh(e)>1&&(e.set=e.add=e.clear=e.delete=Kye),Object.freeze(e),t&&Ch(e,function(n,r){return tk(r,!0)},!0)),e}function Kye(){Ya(2)}function nk(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function rl(e){var t=uP[e];return t||Ya(18,e),t}function Wye(e,t){uP[e]||(uP[e]=t)}function Tb(){return Tg}function cS(e,t){t&&(rl("Patches"),e.u=[],e.s=[],e.v=t)}function Ib(e){cP(e),e.p.forEach(Gye),e.p=null}function cP(e){e===Tg&&(Tg=e.l)}function gL(e){return Tg={p:[],l:Tg,h:e,m:!0,_:0}}function Gye(e){var t=e[Pr];t.i===0||t.i===1?t.j():t.O=!0}function uS(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.g||rl("ES5").S(t,e,r),r?(n[Pr].P&&(Ib(t),Ya(4)),Xl(e)&&(e=kb(t,e),t.l||Mb(t,e)),t.u&&rl("Patches").M(n[Pr].t,e,t.u,t.s)):e=kb(t,n,[]),Ib(t),t.u&&t.v(t.u,t.s),e!==gU?e:void 0}function kb(e,t,n){if(nk(t))return t;var r=t[Pr];if(!r)return Ch(t,function(a,u){return vL(e,r,t,a,u,n)},!0),t;if(r.A!==e)return t;if(!r.P)return Mb(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=r.i===4||r.i===5?r.o=ek(r.k):r.o,o=i,s=!1;r.i===3&&(o=new Set(i),i.clear(),s=!0),Ch(o,function(a,u){return vL(e,r,i,a,u,n,s)}),Mb(e,i,!1),n&&e.u&&rl("Patches").N(r,n,e.u,e.s)}return r.o}function vL(e,t,n,r,i,o,s){if(wh(i)){var a=kb(e,i,o&&t&&t.i!==3&&!lP(t.R,r)?o.concat(r):void 0);if(mU(n,r,a),!wh(a))return;e.m=!1}else s&&n.add(i);if(Xl(i)&&!nk(i)){if(!e.h.D&&e._<1)return;kb(e,i),t&&t.A.l||Mb(e,i)}}function Mb(e,t,n){n===void 0&&(n=!1),!e.l&&e.h.D&&e.m&&tk(t,n)}function dS(e,t){var n=e[Pr];return(n?Ji(n):e)[t]}function yL(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function Al(e){e.P||(e.P=!0,e.l&&Al(e.l))}function fS(e){e.o||(e.o=ek(e.t))}function Pg(e,t,n){var r=QI(t)?rl("MapSet").F(t,n):JI(t)?rl("MapSet").T(t,n):e.g?function(i,o){var s=Array.isArray(i),a={i:s?1:0,A:o?o.A:Tb(),P:!1,I:!1,R:{},l:o,t:i,k:null,o:null,j:null,C:!1},u=a,f=dP;s&&(u=[a],f=Pm);var p=Proxy.revocable(u,f),g=p.revoke,v=p.proxy;return a.k=v,a.j=g,v}(t,n):rl("ES5").J(t,n);return(n?n.A:Tb()).p.push(r),r}function qye(e){return wh(e)||Ya(22,e),function t(n){if(!Xl(n))return n;var r,i=n[Pr],o=qh(n);if(i){if(!i.P&&(i.i<4||!rl("ES5").K(i)))return i.t;i.I=!0,r=xL(n,o),i.I=!1}else r=xL(n,o);return Ch(r,function(s,a){i&&jye(i.t,s)===a||mU(r,s,t(a))}),o===3?new Set(r):r}(e)}function xL(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return ek(e)}function Zye(){function e(a,u){function f(){this.constructor=a}i(a,u),a.prototype=(f.prototype=u.prototype,new f)}function t(a){a.o||(a.R=new Map,a.o=new Map(a.t))}function n(a){a.o||(a.o=new Set,a.t.forEach(function(u){if(Xl(u)){var f=Pg(a.A.h,u,a);a.p.set(u,f),a.o.add(f)}else a.o.add(u)}))}function r(a){a.O&&Ya(3,JSON.stringify(Ji(a)))}var i=function(a,u){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,p){f.__proto__=p}||function(f,p){for(var g in p)p.hasOwnProperty(g)&&(f[g]=p[g])})(a,u)},o=function(){function a(f,p){return this[Pr]={i:2,l:p,A:p?p.A:Tb(),P:!1,I:!1,o:void 0,R:void 0,t:f,k:this,C:!1,O:!1},this}e(a,Map);var u=a.prototype;return Object.defineProperty(u,"size",{get:function(){return Ji(this[Pr]).size}}),u.has=function(f){return Ji(this[Pr]).has(f)},u.set=function(f,p){var g=this[Pr];return r(g),Ji(g).has(f)&&Ji(g).get(f)===p||(t(g),Al(g),g.R.set(f,!0),g.o.set(f,p),g.R.set(f,!0)),this},u.delete=function(f){if(!this.has(f))return!1;var p=this[Pr];return r(p),t(p),Al(p),p.t.has(f)?p.R.set(f,!1):p.R.delete(f),p.o.delete(f),!0},u.clear=function(){var f=this[Pr];r(f),Ji(f).size&&(t(f),Al(f),f.R=new Map,Ch(f.t,function(p){f.R.set(p,!1)}),f.o.clear())},u.forEach=function(f,p){var g=this;Ji(this[Pr]).forEach(function(v,b){f.call(p,g.get(b),b,g)})},u.get=function(f){var p=this[Pr];r(p);var g=Ji(p).get(f);if(p.I||!Xl(g)||g!==p.t.get(f))return g;var v=Pg(p.A.h,g,p);return t(p),p.o.set(f,v),v},u.keys=function(){return Ji(this[Pr]).keys()},u.values=function(){var f,p=this,g=this.keys();return(f={})[_x]=function(){return p.values()},f.next=function(){var v=g.next();return v.done?v:{done:!1,value:p.get(v.value)}},f},u.entries=function(){var f,p=this,g=this.keys();return(f={})[_x]=function(){return p.entries()},f.next=function(){var v=g.next();if(v.done)return v;var b=p.get(v.value);return{done:!1,value:[v.value,b]}},f},u[_x]=function(){return this.entries()},a}(),s=function(){function a(f,p){return this[Pr]={i:3,l:p,A:p?p.A:Tb(),P:!1,I:!1,o:void 0,t:f,k:this,p:new Map,O:!1,C:!1},this}e(a,Set);var u=a.prototype;return Object.defineProperty(u,"size",{get:function(){return Ji(this[Pr]).size}}),u.has=function(f){var p=this[Pr];return r(p),p.o?!!p.o.has(f)||!(!p.p.has(f)||!p.o.has(p.p.get(f))):p.t.has(f)},u.add=function(f){var p=this[Pr];return r(p),this.has(f)||(n(p),Al(p),p.o.add(f)),this},u.delete=function(f){if(!this.has(f))return!1;var p=this[Pr];return r(p),n(p),Al(p),p.o.delete(f)||!!p.p.has(f)&&p.o.delete(p.p.get(f))},u.clear=function(){var f=this[Pr];r(f),Ji(f).size&&(n(f),Al(f),f.o.clear())},u.values=function(){var f=this[Pr];return r(f),n(f),f.o.values()},u.entries=function(){var f=this[Pr];return r(f),n(f),f.o.entries()},u.keys=function(){return this.values()},u[_x]=function(){return this.values()},u.forEach=function(f,p){for(var g=this.values(),v=g.next();!v.done;)f.call(p,v.value,v.value,this),v=g.next()},a}();Wye("MapSet",{F:function(a,u){return new o(a,u)},T:function(a,u){return new s(a,u)}})}var bL,Tg,rk=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",Xye=typeof Map<"u",Yye=typeof Set<"u",_L=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",gU=rk?Symbol.for("immer-nothing"):((bL={})["immer-nothing"]=!0,bL),wL=rk?Symbol.for("immer-draftable"):"__$immer_draftable",Pr=rk?Symbol.for("immer-state"):"__$immer_state",_x=typeof Symbol<"u"&&Symbol.iterator||"@@iterator",Qye=""+Object.prototype.constructor,ik=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,Jye=Object.getOwnPropertyDescriptors||function(e){var t={};return ik(e).forEach(function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)}),t},uP={},dP={get:function(e,t){if(t===Pr)return e;var n=Ji(e);if(!lP(n,t))return function(i,o,s){var a,u=yL(o,s);return u?"value"in u?u.value:(a=u.get)===null||a===void 0?void 0:a.call(i.k):void 0}(e,n,t);var r=n[t];return e.I||!Xl(r)?r:r===dS(e.t,t)?(fS(e),e.o[t]=Pg(e.A.h,r,e)):r},has:function(e,t){return t in Ji(e)},ownKeys:function(e){return Reflect.ownKeys(Ji(e))},set:function(e,t,n){var r=yL(Ji(e),t);if(r!=null&&r.set)return r.set.call(e.k,n),!0;if(!e.P){var i=dS(Ji(e),t),o=i==null?void 0:i[Pr];if(o&&o.t===n)return e.o[t]=n,e.R[t]=!1,!0;if(Hye(n,i)&&(n!==void 0||lP(e.t,t)))return!0;fS(e),Al(e)}return e.o[t]===n&&(n!==void 0||t in e.o)||Number.isNaN(n)&&Number.isNaN(e.o[t])||(e.o[t]=n,e.R[t]=!0),!0},deleteProperty:function(e,t){return dS(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,fS(e),Al(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var n=Ji(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty:function(){Ya(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){Ya(12)}},Pm={};Ch(dP,function(e,t){Pm[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Pm.deleteProperty=function(e,t){return Pm.set.call(this,e,t,void 0)},Pm.set=function(e,t,n){return dP.set.call(this,e[0],t,n,e[0])};var exe=function(){function e(n){var r=this;this.g=_L,this.D=!0,this.produce=function(i,o,s){if(typeof i=="function"&&typeof o!="function"){var a=o;o=i;var u=r;return function(T){var I=this;T===void 0&&(T=a);for(var P=arguments.length,M=Array(P>1?P-1:0),D=1;D<P;D++)M[D-1]=arguments[D];return u.produce(T,function(N){var z;return(z=o).call.apply(z,[I,N].concat(M))})}}var f;if(typeof o!="function"&&Ya(6),s!==void 0&&typeof s!="function"&&Ya(7),Xl(i)){var p=gL(r),g=Pg(r,i,void 0),v=!0;try{f=o(g),v=!1}finally{v?Ib(p):cP(p)}return typeof Promise<"u"&&f instanceof Promise?f.then(function(T){return cS(p,s),uS(T,p)},function(T){throw Ib(p),T}):(cS(p,s),uS(f,p))}if(!i||typeof i!="object"){if((f=o(i))===void 0&&(f=i),f===gU&&(f=void 0),r.D&&tk(f,!0),s){var b=[],_=[];rl("Patches").M(i,f,b,_),s(b,_)}return f}Ya(21,i)},this.produceWithPatches=function(i,o){if(typeof i=="function")return function(f){for(var p=arguments.length,g=Array(p>1?p-1:0),v=1;v<p;v++)g[v-1]=arguments[v];return r.produceWithPatches(f,function(b){return i.apply(void 0,[b].concat(g))})};var s,a,u=r.produce(i,o,function(f,p){s=f,a=p});return typeof Promise<"u"&&u instanceof Promise?u.then(function(f){return[f,s,a]}):[u,s,a]},typeof(n==null?void 0:n.useProxies)=="boolean"&&this.setUseProxies(n.useProxies),typeof(n==null?void 0:n.autoFreeze)=="boolean"&&this.setAutoFreeze(n.autoFreeze)}var t=e.prototype;return t.createDraft=function(n){Xl(n)||Ya(8),wh(n)&&(n=qye(n));var r=gL(this),i=Pg(this,n,void 0);return i[Pr].C=!0,cP(r),i},t.finishDraft=function(n,r){var i=n&&n[Pr],o=i.A;return cS(o,r),uS(void 0,o)},t.setAutoFreeze=function(n){this.D=n},t.setUseProxies=function(n){n&&!_L&&Ya(20),this.g=n},t.applyPatches=function(n,r){var i;for(i=r.length-1;i>=0;i--){var o=r[i];if(o.path.length===0&&o.op==="replace"){n=o.value;break}}i>-1&&(r=r.slice(i+1));var s=rl("Patches").$;return wh(n)?s(n,r):this.produce(n,function(a){return s(a,r)})},e}(),Ma=new exe,txe=Ma.produce;Ma.produceWithPatches.bind(Ma);Ma.setAutoFreeze.bind(Ma);Ma.setUseProxies.bind(Ma);Ma.applyPatches.bind(Ma);Ma.createDraft.bind(Ma);Ma.finishDraft.bind(Ma);const nxe=e=>(t,n,r)=>(r.setState=(i,o,...s)=>{const a=typeof i=="function"?txe(i):i;return t(a,o,...s)},e(r.setState,n,r)),pu=nxe,rxe=e=>({selectedSourceConfig:{sourceId:null,dispatcherNumber:null},setSelectedSourceConfig:({pointId:t,sourceId:n,dispatcherNumber:r})=>e(i=>{i.selectedSourceConfig={pointId:t,sourceId:n,dispatcherNumber:r||null}})}),Hd=hu(pu(rxe)),{Text:ixe}=Bve,ul=({text:e,className:t,classNameText:n,type:r="secondary"})=>A("div",{className:Td("mb-1",t),children:A(ixe,{type:r,className:n,children:e})});class gv{constructor(){this.listeners=[],this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.push(t),this.onSubscribe(),()=>{this.listeners=this.listeners.filter(n=>n!==t),this.onUnsubscribe()}}hasListeners(){return this.listeners.length>0}onSubscribe(){}onUnsubscribe(){}}const Ig=typeof window>"u"||"Deno"in window;function Ga(){}function oxe(e,t){return typeof e=="function"?e(t):e}function fP(e){return typeof e=="number"&&e>=0&&e!==1/0}function vU(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Tm(e,t,n){return g1(e)?typeof t=="function"?{...n,queryKey:e,queryFn:t}:{...t,queryKey:e}:e}function Ic(e,t,n){return g1(e)?[{...t,queryKey:e},n]:[e||{},t]}function CL(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:o,queryKey:s,stale:a}=e;if(g1(s)){if(r){if(t.queryHash!==ok(s,t.options))return!1}else if(!Rb(t.queryKey,s))return!1}if(n!=="all"){const u=t.isActive();if(n==="active"&&!u||n==="inactive"&&u)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||typeof i<"u"&&i!==t.state.fetchStatus||o&&!o(t))}function SL(e,t){const{exact:n,fetching:r,predicate:i,mutationKey:o}=e;if(g1(o)){if(!t.options.mutationKey)return!1;if(n){if(hd(t.options.mutationKey)!==hd(o))return!1}else if(!Rb(t.options.mutationKey,o))return!1}return!(typeof r=="boolean"&&t.state.status==="loading"!==r||i&&!i(t))}function ok(e,t){return((t==null?void 0:t.queryKeyHashFn)||hd)(e)}function hd(e){return JSON.stringify(e,(t,n)=>hP(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function Rb(e,t){return yU(e,t)}function yU(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!yU(e[n],t[n])):!1}function xU(e,t){if(e===t)return e;const n=PL(e)&&PL(t);if(n||hP(e)&&hP(t)){const r=n?e.length:Object.keys(e).length,i=n?t:Object.keys(t),o=i.length,s=n?[]:{};let a=0;for(let u=0;u<o;u++){const f=n?u:i[u];s[f]=xU(e[f],t[f]),s[f]===e[f]&&a++}return r===o&&a===r?e:s}return t}function EL(e,t){if(e&&!t||t&&!e)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function PL(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function hP(e){if(!TL(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!TL(n)||!n.hasOwnProperty("isPrototypeOf"))}function TL(e){return Object.prototype.toString.call(e)==="[object Object]"}function g1(e){return Array.isArray(e)}function bU(e){return new Promise(t=>{setTimeout(t,e)})}function IL(e){bU(0).then(e)}function axe(){if(typeof AbortController=="function")return new AbortController}function pP(e,t,n){return n.isDataEqual!=null&&n.isDataEqual(e,t)?e:typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?xU(e,t):t}class sxe extends gv{constructor(){super(),this.setup=t=>{if(!Ig&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),window.addEventListener("focus",n,!1),()=>{window.removeEventListener("visibilitychange",n),window.removeEventListener("focus",n)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var t;(t=this.cleanup)==null||t.call(this),this.cleanup=void 0}}setEventListener(t){var n;this.setup=t,(n=this.cleanup)==null||n.call(this),this.cleanup=t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()})}setFocused(t){this.focused=t,t&&this.onFocus()}onFocus(){this.listeners.forEach(t=>{t()})}isFocused(){return typeof this.focused=="boolean"?this.focused:typeof document>"u"?!0:[void 0,"visible","prerender"].includes(document.visibilityState)}}const Ob=new sxe;class lxe extends gv{constructor(){super(),this.setup=t=>{if(!Ig&&window.addEventListener){const n=()=>t();return window.addEventListener("online",n,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",n)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var t;(t=this.cleanup)==null||t.call(this),this.cleanup=void 0}}setEventListener(t){var n;this.setup=t,(n=this.cleanup)==null||n.call(this),this.cleanup=t(r=>{typeof r=="boolean"?this.setOnline(r):this.onOnline()})}setOnline(t){this.online=t,t&&this.onOnline()}onOnline(){this.listeners.forEach(t=>{t()})}isOnline(){return typeof this.online=="boolean"?this.online:typeof navigator>"u"||typeof navigator.onLine>"u"?!0:navigator.onLine}}const Db=new lxe;function cxe(e){return Math.min(1e3*2**e,3e4)}function v1(e){return(e!=null?e:"online")==="online"?Db.isOnline():!0}class _U{constructor(t){this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}}function p0(e){return e instanceof _U}function wU(e){let t=!1,n=0,r=!1,i,o,s;const a=new Promise((I,P)=>{o=I,s=P}),u=I=>{r||(b(new _U(I)),e.abort==null||e.abort())},f=()=>{t=!0},p=()=>{t=!1},g=()=>!Ob.isFocused()||e.networkMode!=="always"&&!Db.isOnline(),v=I=>{r||(r=!0,e.onSuccess==null||e.onSuccess(I),i==null||i(),o(I))},b=I=>{r||(r=!0,e.onError==null||e.onError(I),i==null||i(),s(I))},_=()=>new Promise(I=>{i=P=>{const M=r||!g();return M&&I(P),M},e.onPause==null||e.onPause()}).then(()=>{i=void 0,r||e.onContinue==null||e.onContinue()}),T=()=>{if(r)return;let I;try{I=e.fn()}catch(P){I=Promise.reject(P)}Promise.resolve(I).then(v).catch(P=>{var M,D;if(r)return;const N=(M=e.retry)!=null?M:3,z=(D=e.retryDelay)!=null?D:cxe,$=typeof z=="function"?z(n,P):z,j=N===!0||typeof N=="number"&&n<N||typeof N=="function"&&N(n,P);if(t||!j){b(P);return}n++,e.onFail==null||e.onFail(n,P),bU($).then(()=>{if(g())return _()}).then(()=>{t?b(P):T()})})};return v1(e.networkMode)?T():_().then(T),{promise:a,cancel:u,continue:()=>(i==null?void 0:i())?a:Promise.resolve(),cancelRetry:f,continueRetry:p}}const ak=console;function uxe(){let e=[],t=0,n=p=>{p()},r=p=>{p()};const i=p=>{let g;t++;try{g=p()}finally{t--,t||a()}return g},o=p=>{t?e.push(p):IL(()=>{n(p)})},s=p=>(...g)=>{o(()=>{p(...g)})},a=()=>{const p=e;e=[],p.length&&IL(()=>{r(()=>{p.forEach(g=>{n(g)})})})};return{batch:i,batchCalls:s,schedule:o,setNotifyFunction:p=>{n=p},setBatchNotifyFunction:p=>{r=p}}}const Ai=uxe();class CU{destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),fP(this.cacheTime)&&(this.gcTimeout=setTimeout(()=>{this.optionalRemove()},this.cacheTime))}updateCacheTime(t){this.cacheTime=Math.max(this.cacheTime||0,t!=null?t:Ig?1/0:5*60*1e3)}clearGcTimeout(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)}}class dxe extends CU{constructor(t){super(),this.abortSignalConsumed=!1,this.defaultOptions=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.cache=t.cache,this.logger=t.logger||ak,this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.initialState=t.state||fxe(this.options),this.state=this.initialState,this.scheduleGc()}get meta(){return this.options.meta}setOptions(t){this.options={...this.defaultOptions,...t},this.updateCacheTime(this.options.cacheTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.cache.remove(this)}setData(t,n){const r=pP(this.state.data,t,this.options);return this.dispatch({data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){this.dispatch({type:"setState",state:t,setStateOptions:n})}cancel(t){var n;const r=this.promise;return(n=this.retryer)==null||n.cancel(t),r?r.then(Ga).catch(Ga):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.initialState)}isActive(){return this.observers.some(t=>t.options.enabled!==!1)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some(t=>t.getCurrentResult().isStale)}isStaleByTime(t=0){return this.state.isInvalidated||!this.state.dataUpdatedAt||!vU(this.state.dataUpdatedAt,t)}onFocus(){var t;const n=this.observers.find(r=>r.shouldFetchOnWindowFocus());n&&n.refetch({cancelRefetch:!1}),(t=this.retryer)==null||t.continue()}onOnline(){var t;const n=this.observers.find(r=>r.shouldFetchOnReconnect());n&&n.refetch({cancelRefetch:!1}),(t=this.retryer)==null||t.continue()}addObserver(t){this.observers.indexOf(t)===-1&&(this.observers.push(t),this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.indexOf(t)!==-1&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(this.retryer&&(this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.scheduleGc()),this.cache.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.dispatch({type:"invalidate"})}fetch(t,n){var r,i;if(this.state.fetchStatus!=="idle"){if(this.state.dataUpdatedAt&&n!=null&&n.cancelRefetch)this.cancel({silent:!0});else if(this.promise){var o;return(o=this.retryer)==null||o.continueRetry(),this.promise}}if(t&&this.setOptions(t),!this.options.queryFn){const b=this.observers.find(_=>_.options.queryFn);b&&this.setOptions(b.options)}Array.isArray(this.options.queryKey);const s=axe(),a={queryKey:this.queryKey,pageParam:void 0,meta:this.meta},u=b=>{Object.defineProperty(b,"signal",{enumerable:!0,get:()=>{if(s)return this.abortSignalConsumed=!0,s.signal}})};u(a);const f=()=>this.options.queryFn?(this.abortSignalConsumed=!1,this.options.queryFn(a)):Promise.reject("Missing queryFn"),p={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:f};if(u(p),(r=this.options.behavior)==null||r.onFetch(p),this.revertState=this.state,this.state.fetchStatus==="idle"||this.state.fetchMeta!==((i=p.fetchOptions)==null?void 0:i.meta)){var g;this.dispatch({type:"fetch",meta:(g=p.fetchOptions)==null?void 0:g.meta})}const v=b=>{if(p0(b)&&b.silent||this.dispatch({type:"error",error:b}),!p0(b)){var _,T;(_=(T=this.cache.config).onError)==null||_.call(T,b,this)}this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return this.retryer=wU({fn:p.fetchFn,abort:s==null?void 0:s.abort.bind(s),onSuccess:b=>{var _,T;if(typeof b>"u"){v(new Error("undefined"));return}this.setData(b),(_=(T=this.cache.config).onSuccess)==null||_.call(T,b,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:v,onFail:(b,_)=>{this.dispatch({type:"failed",failureCount:b,error:_})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:p.options.retry,retryDelay:p.options.retryDelay,networkMode:p.options.networkMode}),this.promise=this.retryer.promise,this.promise}dispatch(t){const n=r=>{var i,o;switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:(i=t.meta)!=null?i:null,fetchStatus:v1(this.options.networkMode)?"fetching":"paused",...!r.dataUpdatedAt&&{error:null,status:"loading"}};case"success":return{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:(o=t.dataUpdatedAt)!=null?o:Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const s=t.error;return p0(s)&&s.revert&&this.revertState?{...this.revertState}:{...r,error:s,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Ai.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate(t)}),this.cache.notify({query:this,type:"updated",action:t})})}}function fxe(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=typeof t<"u",r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r!=null?r:Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"loading",fetchStatus:"idle"}}class hxe extends gv{constructor(t){super(),this.config=t||{},this.queries=[],this.queriesMap={}}build(t,n,r){var i;const o=n.queryKey,s=(i=n.queryHash)!=null?i:ok(o,n);let a=this.get(s);return a||(a=new dxe({cache:this,logger:t.getLogger(),queryKey:o,queryHash:s,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(o)}),this.add(a)),a}add(t){this.queriesMap[t.queryHash]||(this.queriesMap[t.queryHash]=t,this.queries.push(t),this.notify({type:"added",query:t}))}remove(t){const n=this.queriesMap[t.queryHash];n&&(t.destroy(),this.queries=this.queries.filter(r=>r!==t),n===t&&delete this.queriesMap[t.queryHash],this.notify({type:"removed",query:t}))}clear(){Ai.batch(()=>{this.queries.forEach(t=>{this.remove(t)})})}get(t){return this.queriesMap[t]}getAll(){return this.queries}find(t,n){const[r]=Ic(t,n);return typeof r.exact>"u"&&(r.exact=!0),this.queries.find(i=>CL(r,i))}findAll(t,n){const[r]=Ic(t,n);return Object.keys(r).length>0?this.queries.filter(i=>CL(r,i)):this.queries}notify(t){Ai.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Ai.batch(()=>{this.queries.forEach(t=>{t.onFocus()})})}onOnline(){Ai.batch(()=>{this.queries.forEach(t=>{t.onOnline()})})}}class pxe extends CU{constructor(t){super(),this.options={...t.defaultOptions,...t.options},this.mutationId=t.mutationId,this.mutationCache=t.mutationCache,this.logger=t.logger||ak,this.observers=[],this.state=t.state||mxe(),this.updateCacheTime(this.options.cacheTime),this.scheduleGc()}get meta(){return this.options.meta}setState(t){this.dispatch({type:"setState",state:t})}addObserver(t){this.observers.indexOf(t)===-1&&(this.observers.push(t),this.clearGcTimeout(),this.mutationCache.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.observers=this.observers.filter(n=>n!==t),this.scheduleGc(),this.mutationCache.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.observers.length||(this.state.status==="loading"?this.scheduleGc():this.mutationCache.remove(this))}continue(){var t,n;return(t=(n=this.retryer)==null?void 0:n.continue())!=null?t:this.execute()}async execute(){const t=()=>{var D;return this.retryer=wU({fn:()=>this.options.mutationFn?this.options.mutationFn(this.state.variables):Promise.reject("No mutationFn found"),onFail:(N,z)=>{this.dispatch({type:"failed",failureCount:N,error:z})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:(D=this.options.retry)!=null?D:0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode}),this.retryer.promise},n=this.state.status==="loading";try{var r,i,o,s,a,u;if(!n){var f,p,g,v;this.dispatch({type:"loading",variables:this.options.variables}),await((f=(p=this.mutationCache.config).onMutate)==null?void 0:f.call(p,this.state.variables,this));const N=await((g=(v=this.options).onMutate)==null?void 0:g.call(v,this.state.variables));N!==this.state.context&&this.dispatch({type:"loading",context:N,variables:this.state.variables})}const D=await t();return await((r=(i=this.mutationCache.config).onSuccess)==null?void 0:r.call(i,D,this.state.variables,this.state.context,this)),await((o=(s=this.options).onSuccess)==null?void 0:o.call(s,D,this.state.variables,this.state.context)),await((a=(u=this.options).onSettled)==null?void 0:a.call(u,D,null,this.state.variables,this.state.context)),this.dispatch({type:"success",data:D}),D}catch(D){try{var b,_,T,I,P,M;throw await((b=(_=this.mutationCache.config).onError)==null?void 0:b.call(_,D,this.state.variables,this.state.context,this)),await((T=(I=this.options).onError)==null?void 0:T.call(I,D,this.state.variables,this.state.context)),await((P=(M=this.options).onSettled)==null?void 0:P.call(M,void 0,D,this.state.variables,this.state.context)),D}finally{this.dispatch({type:"error",error:D})}}}dispatch(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"loading":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:!v1(this.options.networkMode),status:"loading",variables:t.variables};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"};case"setState":return{...r,...t.state}}};this.state=n(this.state),Ai.batch(()=>{this.observers.forEach(r=>{r.onMutationUpdate(t)}),this.mutationCache.notify({mutation:this,type:"updated",action:t})})}}function mxe(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0}}class gxe extends gv{constructor(t){super(),this.config=t||{},this.mutations=[],this.mutationId=0}build(t,n,r){const i=new pxe({mutationCache:this,logger:t.getLogger(),mutationId:++this.mutationId,options:t.defaultMutationOptions(n),state:r,defaultOptions:n.mutationKey?t.getMutationDefaults(n.mutationKey):void 0});return this.add(i),i}add(t){this.mutations.push(t),this.notify({type:"added",mutation:t})}remove(t){this.mutations=this.mutations.filter(n=>n!==t),this.notify({type:"removed",mutation:t})}clear(){Ai.batch(()=>{this.mutations.forEach(t=>{this.remove(t)})})}getAll(){return this.mutations}find(t){return typeof t.exact>"u"&&(t.exact=!0),this.mutations.find(n=>SL(t,n))}findAll(t){return this.mutations.filter(n=>SL(t,n))}notify(t){Ai.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){var t;return this.resuming=((t=this.resuming)!=null?t:Promise.resolve()).then(()=>{const n=this.mutations.filter(r=>r.state.isPaused);return Ai.batch(()=>n.reduce((r,i)=>r.then(()=>i.continue().catch(Ga)),Promise.resolve()))}).then(()=>{this.resuming=void 0}),this.resuming}}function vxe(){return{onFetch:e=>{e.fetchFn=()=>{var t,n,r,i,o,s;const a=(t=e.fetchOptions)==null||(n=t.meta)==null?void 0:n.refetchPage,u=(r=e.fetchOptions)==null||(i=r.meta)==null?void 0:i.fetchMore,f=u==null?void 0:u.pageParam,p=(u==null?void 0:u.direction)==="forward",g=(u==null?void 0:u.direction)==="backward",v=((o=e.state.data)==null?void 0:o.pages)||[],b=((s=e.state.data)==null?void 0:s.pageParams)||[];let _=b,T=!1;const I=$=>{Object.defineProperty($,"signal",{enumerable:!0,get:()=>{var j;if((j=e.signal)!=null&&j.aborted)T=!0;else{var U;(U=e.signal)==null||U.addEventListener("abort",()=>{T=!0})}return e.signal}})},P=e.options.queryFn||(()=>Promise.reject("Missing queryFn")),M=($,j,U,q)=>(_=q?[j,..._]:[..._,j],q?[U,...$]:[...$,U]),D=($,j,U,q)=>{if(T)return Promise.reject("Cancelled");if(typeof U>"u"&&!j&&$.length)return Promise.resolve($);const Y={queryKey:e.queryKey,pageParam:U,meta:e.options.meta};I(Y);const te=P(Y);return Promise.resolve(te).then(X=>M($,U,X,q))};let N;if(!v.length)N=D([]);else if(p){const $=typeof f<"u",j=$?f:kL(e.options,v);N=D(v,$,j)}else if(g){const $=typeof f<"u",j=$?f:yxe(e.options,v);N=D(v,$,j,!0)}else{_=[];const $=typeof e.options.getNextPageParam>"u";N=(a&&v[0]?a(v[0],0,v):!0)?D([],$,b[0]):Promise.resolve(M([],b[0],v[0]));for(let U=1;U<v.length;U++)N=N.then(q=>{if(a&&v[U]?a(v[U],U,v):!0){const te=$?b[U]:kL(e.options,q);return D(q,$,te)}return Promise.resolve(M(q,b[U],v[U]))})}return N.then($=>({pages:$,pageParams:_}))}}}}function kL(e,t){return e.getNextPageParam==null?void 0:e.getNextPageParam(t[t.length-1],t)}function yxe(e,t){return e.getPreviousPageParam==null?void 0:e.getPreviousPageParam(t[0],t)}class xxe{constructor(t={}){this.queryCache=t.queryCache||new hxe,this.mutationCache=t.mutationCache||new gxe,this.logger=t.logger||ak,this.defaultOptions=t.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[],this.mountCount=0}mount(){this.mountCount++,this.mountCount===1&&(this.unsubscribeFocus=Ob.subscribe(()=>{Ob.isFocused()&&(this.resumePausedMutations(),this.queryCache.onFocus())}),this.unsubscribeOnline=Db.subscribe(()=>{Db.isOnline()&&(this.resumePausedMutations(),this.queryCache.onOnline())}))}unmount(){var t,n;this.mountCount--,this.mountCount===0&&((t=this.unsubscribeFocus)==null||t.call(this),this.unsubscribeFocus=void 0,(n=this.unsubscribeOnline)==null||n.call(this),this.unsubscribeOnline=void 0)}isFetching(t,n){const[r]=Ic(t,n);return r.fetchStatus="fetching",this.queryCache.findAll(r).length}isMutating(t){return this.mutationCache.findAll({...t,fetching:!0}).length}getQueryData(t,n){var r;return(r=this.queryCache.find(t,n))==null?void 0:r.state.data}ensureQueryData(t,n,r){const i=Tm(t,n,r),o=this.getQueryData(i.queryKey);return o?Promise.resolve(o):this.fetchQuery(i)}getQueriesData(t){return this.getQueryCache().findAll(t).map(({queryKey:n,state:r})=>{const i=r.data;return[n,i]})}setQueryData(t,n,r){const i=this.queryCache.find(t),o=i==null?void 0:i.state.data,s=oxe(n,o);if(typeof s>"u")return;const a=Tm(t),u=this.defaultQueryOptions(a);return this.queryCache.build(this,u).setData(s,{...r,manual:!0})}setQueriesData(t,n,r){return Ai.batch(()=>this.getQueryCache().findAll(t).map(({queryKey:i})=>[i,this.setQueryData(i,n,r)]))}getQueryState(t,n){var r;return(r=this.queryCache.find(t,n))==null?void 0:r.state}removeQueries(t,n){const[r]=Ic(t,n),i=this.queryCache;Ai.batch(()=>{i.findAll(r).forEach(o=>{i.remove(o)})})}resetQueries(t,n,r){const[i,o]=Ic(t,n,r),s=this.queryCache,a={type:"active",...i};return Ai.batch(()=>(s.findAll(i).forEach(u=>{u.reset()}),this.refetchQueries(a,o)))}cancelQueries(t,n,r){const[i,o={}]=Ic(t,n,r);typeof o.revert>"u"&&(o.revert=!0);const s=Ai.batch(()=>this.queryCache.findAll(i).map(a=>a.cancel(o)));return Promise.all(s).then(Ga).catch(Ga)}invalidateQueries(t,n,r){const[i,o]=Ic(t,n,r);return Ai.batch(()=>{var s,a;if(this.queryCache.findAll(i).forEach(f=>{f.invalidate()}),i.refetchType==="none")return Promise.resolve();const u={...i,type:(s=(a=i.refetchType)!=null?a:i.type)!=null?s:"active"};return this.refetchQueries(u,o)})}refetchQueries(t,n,r){const[i,o]=Ic(t,n,r),s=Ai.batch(()=>this.queryCache.findAll(i).filter(u=>!u.isDisabled()).map(u=>{var f;return u.fetch(void 0,{...o,cancelRefetch:(f=o==null?void 0:o.cancelRefetch)!=null?f:!0,meta:{refetchPage:i.refetchPage}})}));let a=Promise.all(s).then(Ga);return o!=null&&o.throwOnError||(a=a.catch(Ga)),a}fetchQuery(t,n,r){const i=Tm(t,n,r),o=this.defaultQueryOptions(i);typeof o.retry>"u"&&(o.retry=!1);const s=this.queryCache.build(this,o);return s.isStaleByTime(o.staleTime)?s.fetch(o):Promise.resolve(s.state.data)}prefetchQuery(t,n,r){return this.fetchQuery(t,n,r).then(Ga).catch(Ga)}fetchInfiniteQuery(t,n,r){const i=Tm(t,n,r);return i.behavior=vxe(),this.fetchQuery(i)}prefetchInfiniteQuery(t,n,r){return this.fetchInfiniteQuery(t,n,r).then(Ga).catch(Ga)}resumePausedMutations(){return this.mutationCache.resumePausedMutations()}getQueryCache(){return this.queryCache}getMutationCache(){return this.mutationCache}getLogger(){return this.logger}getDefaultOptions(){return this.defaultOptions}setDefaultOptions(t){this.defaultOptions=t}setQueryDefaults(t,n){const r=this.queryDefaults.find(i=>hd(t)===hd(i.queryKey));r?r.defaultOptions=n:this.queryDefaults.push({queryKey:t,defaultOptions:n})}getQueryDefaults(t){if(!t)return;const n=this.queryDefaults.find(r=>Rb(t,r.queryKey));return n==null?void 0:n.defaultOptions}setMutationDefaults(t,n){const r=this.mutationDefaults.find(i=>hd(t)===hd(i.mutationKey));r?r.defaultOptions=n:this.mutationDefaults.push({mutationKey:t,defaultOptions:n})}getMutationDefaults(t){if(!t)return;const n=this.mutationDefaults.find(r=>Rb(t,r.mutationKey));return n==null?void 0:n.defaultOptions}defaultQueryOptions(t){if(t!=null&&t._defaulted)return t;const n={...this.defaultOptions.queries,...this.getQueryDefaults(t==null?void 0:t.queryKey),...t,_defaulted:!0};return!n.queryHash&&n.queryKey&&(n.queryHash=ok(n.queryKey,n)),typeof n.refetchOnReconnect>"u"&&(n.refetchOnReconnect=n.networkMode!=="always"),typeof n.useErrorBoundary>"u"&&(n.useErrorBoundary=!!n.suspense),n}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...this.defaultOptions.mutations,...this.getMutationDefaults(t==null?void 0:t.mutationKey),...t,_defaulted:!0}}clear(){this.queryCache.clear(),this.mutationCache.clear()}}class bxe extends gv{constructor(t,n){super(),this.client=t,this.options=n,this.trackedProps=new Set,this.selectError=null,this.bindMethods(),this.setOptions(n)}bindMethods(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.length===1&&(this.currentQuery.addObserver(this),ML(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())}onUnsubscribe(){this.listeners.length||this.destroy()}shouldFetchOnReconnect(){return mP(this.currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return mP(this.currentQuery,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=[],this.clearStaleTimeout(),this.clearRefetchInterval(),this.currentQuery.removeObserver(this)}setOptions(t,n){const r=this.options,i=this.currentQuery;if(this.options=this.client.defaultQueryOptions(t),EL(r,this.options)||this.client.getQueryCache().notify({type:"observerOptionsUpdated",query:this.currentQuery,observer:this}),typeof this.options.enabled<"u"&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=r.queryKey),this.updateQuery();const o=this.hasListeners();o&&RL(this.currentQuery,i,this.options,r)&&this.executeFetch(),this.updateResult(n),o&&(this.currentQuery!==i||this.options.enabled!==r.enabled||this.options.staleTime!==r.staleTime)&&this.updateStaleTimeout();const s=this.computeRefetchInterval();o&&(this.currentQuery!==i||this.options.enabled!==r.enabled||s!==this.currentRefetchInterval)&&this.updateRefetchInterval(s)}getOptimisticResult(t){const n=this.client.getQueryCache().build(this.client,t);return this.createResult(n,t)}getCurrentResult(){return this.currentResult}trackResult(t){const n={};return Object.keys(t).forEach(r=>{Object.defineProperty(n,r,{configurable:!1,enumerable:!0,get:()=>(this.trackedProps.add(r),t[r])})}),n}getCurrentQuery(){return this.currentQuery}remove(){this.client.getQueryCache().remove(this.currentQuery)}refetch({refetchPage:t,...n}={}){return this.fetch({...n,meta:{refetchPage:t}})}fetchOptimistic(t){const n=this.client.defaultQueryOptions(t),r=this.client.getQueryCache().build(this.client,n);return r.isFetchingOptimistic=!0,r.fetch().then(()=>this.createResult(r,n))}fetch(t){var n;return this.executeFetch({...t,cancelRefetch:(n=t.cancelRefetch)!=null?n:!0}).then(()=>(this.updateResult(),this.currentResult))}executeFetch(t){this.updateQuery();let n=this.currentQuery.fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Ga)),n}updateStaleTimeout(){if(this.clearStaleTimeout(),Ig||this.currentResult.isStale||!fP(this.options.staleTime))return;const n=vU(this.currentResult.dataUpdatedAt,this.options.staleTime)+1;this.staleTimeoutId=setTimeout(()=>{this.currentResult.isStale||this.updateResult()},n)}computeRefetchInterval(){var t;return typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.currentResult.data,this.currentQuery):(t=this.options.refetchInterval)!=null?t:!1}updateRefetchInterval(t){this.clearRefetchInterval(),this.currentRefetchInterval=t,!(Ig||this.options.enabled===!1||!fP(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(()=>{(this.options.refetchIntervalInBackground||Ob.isFocused())&&this.executeFetch()},this.currentRefetchInterval))}updateTimers(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())}clearStaleTimeout(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)}clearRefetchInterval(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)}createResult(t,n){const r=this.currentQuery,i=this.options,o=this.currentResult,s=this.currentResultState,a=this.currentResultOptions,u=t!==r,f=u?t.state:this.currentQueryInitialState,p=u?this.currentResult:this.previousQueryResult,{state:g}=t;let{dataUpdatedAt:v,error:b,errorUpdatedAt:_,fetchStatus:T,status:I}=g,P=!1,M=!1,D;if(n._optimisticResults){const U=this.hasListeners(),q=!U&&ML(t,n),Y=U&&RL(t,r,n,i);(q||Y)&&(T=v1(t.options.networkMode)?"fetching":"paused",v||(I="loading")),n._optimisticResults==="isRestoring"&&(T="idle")}if(n.keepPreviousData&&!g.dataUpdatedAt&&p!=null&&p.isSuccess&&I!=="error")D=p.data,v=p.dataUpdatedAt,I=p.status,P=!0;else if(n.select&&typeof g.data<"u")if(o&&g.data===(s==null?void 0:s.data)&&n.select===this.selectFn)D=this.selectResult;else try{this.selectFn=n.select,D=n.select(g.data),D=pP(o==null?void 0:o.data,D,n),this.selectResult=D,this.selectError=null}catch(U){this.selectError=U}else D=g.data;if(typeof n.placeholderData<"u"&&typeof D>"u"&&I==="loading"){let U;if(o!=null&&o.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData))U=o.data;else if(U=typeof n.placeholderData=="function"?n.placeholderData():n.placeholderData,n.select&&typeof U<"u")try{U=n.select(U),this.selectError=null}catch(q){this.selectError=q}typeof U<"u"&&(I="success",D=pP(o==null?void 0:o.data,U,n),M=!0)}this.selectError&&(b=this.selectError,D=this.selectResult,_=Date.now(),I="error");const N=T==="fetching",z=I==="loading",$=I==="error";return{status:I,fetchStatus:T,isLoading:z,isSuccess:I==="success",isError:$,isInitialLoading:z&&N,data:D,dataUpdatedAt:v,error:b,errorUpdatedAt:_,failureCount:g.fetchFailureCount,failureReason:g.fetchFailureReason,errorUpdateCount:g.errorUpdateCount,isFetched:g.dataUpdateCount>0||g.errorUpdateCount>0,isFetchedAfterMount:g.dataUpdateCount>f.dataUpdateCount||g.errorUpdateCount>f.errorUpdateCount,isFetching:N,isRefetching:N&&!z,isLoadingError:$&&g.dataUpdatedAt===0,isPaused:T==="paused",isPlaceholderData:M,isPreviousData:P,isRefetchError:$&&g.dataUpdatedAt!==0,isStale:sk(t,n),refetch:this.refetch,remove:this.remove}}updateResult(t){const n=this.currentResult,r=this.createResult(this.currentQuery,this.options);if(this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,EL(r,n))return;this.currentResult=r;const i={cache:!0},o=()=>{if(!n)return!0;const{notifyOnChangeProps:s}=this.options;if(s==="all"||!s&&!this.trackedProps.size)return!0;const a=new Set(s!=null?s:this.trackedProps);return this.options.useErrorBoundary&&a.add("error"),Object.keys(this.currentResult).some(u=>{const f=u;return this.currentResult[f]!==n[f]&&a.has(f)})};(t==null?void 0:t.listeners)!==!1&&o()&&(i.listeners=!0),this.notify({...i,...t})}updateQuery(){const t=this.client.getQueryCache().build(this.client,this.options);if(t===this.currentQuery)return;const n=this.currentQuery;this.currentQuery=t,this.currentQueryInitialState=t.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))}onQueryUpdate(t){const n={};t.type==="success"?n.onSuccess=!t.manual:t.type==="error"&&!p0(t.error)&&(n.onError=!0),this.updateResult(n),this.hasListeners()&&this.updateTimers()}notify(t){Ai.batch(()=>{if(t.onSuccess){var n,r,i,o;(n=(r=this.options).onSuccess)==null||n.call(r,this.currentResult.data),(i=(o=this.options).onSettled)==null||i.call(o,this.currentResult.data,null)}else if(t.onError){var s,a,u,f;(s=(a=this.options).onError)==null||s.call(a,this.currentResult.error),(u=(f=this.options).onSettled)==null||u.call(f,void 0,this.currentResult.error)}t.listeners&&this.listeners.forEach(p=>{p(this.currentResult)}),t.cache&&this.client.getQueryCache().notify({query:this.currentQuery,type:"observerResultsUpdated"})})}}function _xe(e,t){return t.enabled!==!1&&!e.state.dataUpdatedAt&&!(e.state.status==="error"&&t.retryOnMount===!1)}function ML(e,t){return _xe(e,t)||e.state.dataUpdatedAt>0&&mP(e,t,t.refetchOnMount)}function mP(e,t,n){if(t.enabled!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&sk(e,t)}return!1}function RL(e,t,n,r){return n.enabled!==!1&&(e!==t||r.enabled===!1)&&(!n.suspense||e.state.status!=="error")&&sk(e,n)}function sk(e,t){return e.isStaleByTime(t.staleTime)}const wxe=YI.exports.useSyncExternalStore,OL=E.exports.createContext(void 0),SU=E.exports.createContext(!1);function EU(e,t){return e||(t&&typeof window<"u"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=OL),window.ReactQueryClientContext):OL)}const PU=({context:e}={})=>{const t=E.exports.useContext(EU(e,E.exports.useContext(SU)));if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Cxe=({client:e,children:t,context:n,contextSharing:r=!1})=>{E.exports.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]);const i=EU(n,r);return A(SU.Provider,{value:!n&&r,children:A(i.Provider,{value:e,children:t})})},TU=E.exports.createContext(!1),Sxe=()=>E.exports.useContext(TU);TU.Provider;function Exe(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}const Pxe=E.exports.createContext(Exe()),Txe=()=>E.exports.useContext(Pxe);function Ixe(e,t){return typeof e=="function"?e(...t):!!e}const kxe=(e,t)=>{(e.suspense||e.useErrorBoundary)&&(t.isReset()||(e.retryOnMount=!1))},Mxe=e=>{E.exports.useEffect(()=>{e.clearReset()},[e])},Rxe=({result:e,errorResetBoundary:t,useErrorBoundary:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&Ixe(n,[e.error,r]),Oxe=e=>{e.suspense&&typeof e.staleTime!="number"&&(e.staleTime=1e3)},Dxe=(e,t)=>e.isLoading&&e.isFetching&&!t,Axe=(e,t,n)=>(e==null?void 0:e.suspense)&&Dxe(t,n),Nxe=(e,t,n)=>t.fetchOptimistic(e).then(({data:r})=>{e.onSuccess==null||e.onSuccess(r),e.onSettled==null||e.onSettled(r,null)}).catch(r=>{n.clearReset(),e.onError==null||e.onError(r),e.onSettled==null||e.onSettled(void 0,r)});function Lxe(e,t){const n=PU({context:e.context}),r=Sxe(),i=Txe(),o=n.defaultQueryOptions(e);o._optimisticResults=r?"isRestoring":"optimistic",o.onError&&(o.onError=Ai.batchCalls(o.onError)),o.onSuccess&&(o.onSuccess=Ai.batchCalls(o.onSuccess)),o.onSettled&&(o.onSettled=Ai.batchCalls(o.onSettled)),Oxe(o),kxe(o,i),Mxe(i);const[s]=E.exports.useState(()=>new t(n,o)),a=s.getOptimisticResult(o);if(wxe(E.exports.useCallback(u=>r?()=>{}:s.subscribe(Ai.batchCalls(u)),[s,r]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),E.exports.useEffect(()=>{s.setOptions(o,{listeners:!1})},[o,s]),Axe(o,a,r))throw Nxe(o,s,i);if(Rxe({result:a,errorResetBoundary:i,useErrorBoundary:o.useErrorBoundary,query:s.getCurrentQuery()}))throw a.error;return o.notifyOnChangeProps?a:s.trackResult(a)}function tc(e,t,n){const r=Tm(e,t,n);return Lxe(r,bxe)}function IU(e,t){return function(){return e.apply(t,arguments)}}const{toString:kU}=Object.prototype,{getPrototypeOf:lk}=Object,ck=(e=>t=>{const n=kU.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),nc=e=>(e=e.toLowerCase(),t=>ck(t)===e),y1=e=>t=>typeof t===e,{isArray:Zh}=Array,kg=y1("undefined");function zxe(e){return e!==null&&!kg(e)&&e.constructor!==null&&!kg(e.constructor)&&ou(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const MU=nc("ArrayBuffer");function Fxe(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&MU(e.buffer),t}const $xe=y1("string"),ou=y1("function"),RU=y1("number"),uk=e=>e!==null&&typeof e=="object",Bxe=e=>e===!0||e===!1,m0=e=>{if(ck(e)!=="object")return!1;const t=lk(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Vxe=nc("Date"),Uxe=nc("File"),jxe=nc("Blob"),Hxe=nc("FileList"),Kxe=e=>uk(e)&&ou(e.pipe),Wxe=e=>{const t="[object FormData]";return e&&(typeof FormData=="function"&&e instanceof FormData||kU.call(e)===t||ou(e.toString)&&e.toString()===t)},Gxe=nc("URLSearchParams"),qxe=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function vv(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),Zh(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{const o=n?Object.getOwnPropertyNames(e):Object.keys(e),s=o.length;let a;for(r=0;r<s;r++)a=o[r],t.call(null,e[a],a,e)}}function OU(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,i;for(;r-- >0;)if(i=n[r],t===i.toLowerCase())return i;return null}const DU=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),AU=e=>!kg(e)&&e!==DU;function gP(){const{caseless:e}=AU(this)&&this||{},t={},n=(r,i)=>{const o=e&&OU(t,i)||i;m0(t[o])&&m0(r)?t[o]=gP(t[o],r):m0(r)?t[o]=gP({},r):Zh(r)?t[o]=r.slice():t[o]=r};for(let r=0,i=arguments.length;r<i;r++)arguments[r]&&vv(arguments[r],n);return t}const Zxe=(e,t,n,{allOwnKeys:r}={})=>(vv(t,(i,o)=>{n&&ou(i)?e[o]=IU(i,n):e[o]=i},{allOwnKeys:r}),e),Xxe=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Yxe=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},Qxe=(e,t,n,r)=>{let i,o,s;const a={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)s=i[o],(!r||r(s,e,t))&&!a[s]&&(t[s]=e[s],a[s]=!0);e=n!==!1&&lk(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Jxe=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},e0e=e=>{if(!e)return null;if(Zh(e))return e;let t=e.length;if(!RU(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},t0e=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&lk(Uint8Array)),n0e=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let i;for(;(i=r.next())&&!i.done;){const o=i.value;t.call(e,o[0],o[1])}},r0e=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},i0e=nc("HTMLFormElement"),o0e=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),DL=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),a0e=nc("RegExp"),NU=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};vv(n,(i,o)=>{t(i,o,e)!==!1&&(r[o]=i)}),Object.defineProperties(e,r)},s0e=e=>{NU(e,(t,n)=>{if(ou(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(!!ou(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},l0e=(e,t)=>{const n={},r=i=>{i.forEach(o=>{n[o]=!0})};return Zh(e)?r(e):r(String(e).split(t)),n},c0e=()=>{},u0e=(e,t)=>(e=+e,Number.isFinite(e)?e:t),hS="abcdefghijklmnopqrstuvwxyz",AL="0123456789",LU={DIGIT:AL,ALPHA:hS,ALPHA_DIGIT:hS+hS.toUpperCase()+AL},d0e=(e=16,t=LU.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function f0e(e){return!!(e&&ou(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const h0e=e=>{const t=new Array(10),n=(r,i)=>{if(uk(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[i]=r;const o=Zh(r)?[]:{};return vv(r,(s,a)=>{const u=n(s,i+1);!kg(u)&&(o[a]=u)}),t[i]=void 0,o}}return r};return n(e,0)},Nt={isArray:Zh,isArrayBuffer:MU,isBuffer:zxe,isFormData:Wxe,isArrayBufferView:Fxe,isString:$xe,isNumber:RU,isBoolean:Bxe,isObject:uk,isPlainObject:m0,isUndefined:kg,isDate:Vxe,isFile:Uxe,isBlob:jxe,isRegExp:a0e,isFunction:ou,isStream:Kxe,isURLSearchParams:Gxe,isTypedArray:t0e,isFileList:Hxe,forEach:vv,merge:gP,extend:Zxe,trim:qxe,stripBOM:Xxe,inherits:Yxe,toFlatObject:Qxe,kindOf:ck,kindOfTest:nc,endsWith:Jxe,toArray:e0e,forEachEntry:n0e,matchAll:r0e,isHTMLForm:i0e,hasOwnProperty:DL,hasOwnProp:DL,reduceDescriptors:NU,freezeMethods:s0e,toObjectSet:l0e,toCamelCase:o0e,noop:c0e,toFiniteNumber:u0e,findKey:OU,global:DU,isContextDefined:AU,ALPHABET:LU,generateString:d0e,isSpecCompliantForm:f0e,toJSONObject:h0e};function vr(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i)}Nt.inherits(vr,Error,{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:Nt.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const zU=vr.prototype,FU={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{FU[e]={value:e}});Object.defineProperties(vr,FU);Object.defineProperty(zU,"isAxiosError",{value:!0});vr.from=(e,t,n,r,i,o)=>{const s=Object.create(zU);return Nt.toFlatObject(e,s,function(u){return u!==Error.prototype},a=>a!=="isAxiosError"),vr.call(s,e.message,t,n,r,i),s.cause=e,s.name=e.name,o&&Object.assign(s,o),s};const p0e=null;function vP(e){return Nt.isPlainObject(e)||Nt.isArray(e)}function $U(e){return Nt.endsWith(e,"[]")?e.slice(0,-2):e}function NL(e,t,n){return e?e.concat(t).map(function(i,o){return i=$U(i),!n&&o?"["+i+"]":i}).join(n?".":""):t}function m0e(e){return Nt.isArray(e)&&!e.some(vP)}const g0e=Nt.toFlatObject(Nt,{},null,function(t){return/^is[A-Z]/.test(t)});function x1(e,t,n){if(!Nt.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=Nt.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(T,I){return!Nt.isUndefined(I[T])});const r=n.metaTokens,i=n.visitor||p,o=n.dots,s=n.indexes,u=(n.Blob||typeof Blob<"u"&&Blob)&&Nt.isSpecCompliantForm(t);if(!Nt.isFunction(i))throw new TypeError("visitor must be a function");function f(_){if(_===null)return"";if(Nt.isDate(_))return _.toISOString();if(!u&&Nt.isBlob(_))throw new vr("Blob is not supported. Use a Buffer instead.");return Nt.isArrayBuffer(_)||Nt.isTypedArray(_)?u&&typeof Blob=="function"?new Blob([_]):Buffer.from(_):_}function p(_,T,I){let P=_;if(_&&!I&&typeof _=="object"){if(Nt.endsWith(T,"{}"))T=r?T:T.slice(0,-2),_=JSON.stringify(_);else if(Nt.isArray(_)&&m0e(_)||(Nt.isFileList(_)||Nt.endsWith(T,"[]"))&&(P=Nt.toArray(_)))return T=$U(T),P.forEach(function(D,N){!(Nt.isUndefined(D)||D===null)&&t.append(s===!0?NL([T],N,o):s===null?T:T+"[]",f(D))}),!1}return vP(_)?!0:(t.append(NL(I,T,o),f(_)),!1)}const g=[],v=Object.assign(g0e,{defaultVisitor:p,convertValue:f,isVisitable:vP});function b(_,T){if(!Nt.isUndefined(_)){if(g.indexOf(_)!==-1)throw Error("Circular reference detected in "+T.join("."));g.push(_),Nt.forEach(_,function(P,M){(!(Nt.isUndefined(P)||P===null)&&i.call(t,P,Nt.isString(M)?M.trim():M,T,v))===!0&&b(P,T?T.concat(M):[M])}),g.pop()}}if(!Nt.isObject(e))throw new TypeError("data must be an object");return b(e),t}function LL(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function dk(e,t){this._pairs=[],e&&x1(e,this,t)}const BU=dk.prototype;BU.append=function(t,n){this._pairs.push([t,n])};BU.toString=function(t){const n=t?function(r){return t.call(this,r,LL)}:LL;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function v0e(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function VU(e,t,n){if(!t)return e;const r=n&&n.encode||v0e,i=n&&n.serialize;let o;if(i?o=i(t,n):o=Nt.isURLSearchParams(t)?t.toString():new dk(t,n).toString(r),o){const s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class y0e{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){Nt.forEach(this.handlers,function(r){r!==null&&t(r)})}}const zL=y0e,UU={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},x0e=typeof URLSearchParams<"u"?URLSearchParams:dk,b0e=typeof FormData<"u"?FormData:null,_0e=(()=>{let e;return typeof navigator<"u"&&((e=navigator.product)==="ReactNative"||e==="NativeScript"||e==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),w0e=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),Js={isBrowser:!0,classes:{URLSearchParams:x0e,FormData:b0e,Blob},isStandardBrowserEnv:_0e,isStandardBrowserWebWorkerEnv:w0e,protocols:["http","https","file","blob","url","data"]};function C0e(e,t){return x1(e,new Js.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,o){return Js.isNode&&Nt.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}function S0e(e){return Nt.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function E0e(e){const t={},n=Object.keys(e);let r;const i=n.length;let o;for(r=0;r<i;r++)o=n[r],t[o]=e[o];return t}function jU(e){function t(n,r,i,o){let s=n[o++];const a=Number.isFinite(+s),u=o>=n.length;return s=!s&&Nt.isArray(i)?i.length:s,u?(Nt.hasOwnProp(i,s)?i[s]=[i[s],r]:i[s]=r,!a):((!i[s]||!Nt.isObject(i[s]))&&(i[s]=[]),t(n,r,i[s],o)&&Nt.isArray(i[s])&&(i[s]=E0e(i[s])),!a)}if(Nt.isFormData(e)&&Nt.isFunction(e.entries)){const n={};return Nt.forEachEntry(e,(r,i)=>{t(S0e(r),i,n,0)}),n}return null}const P0e={"Content-Type":void 0};function T0e(e,t,n){if(Nt.isString(e))try{return(t||JSON.parse)(e),Nt.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const b1={transitional:UU,adapter:["xhr","http"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,o=Nt.isObject(t);if(o&&Nt.isHTMLForm(t)&&(t=new FormData(t)),Nt.isFormData(t))return i&&i?JSON.stringify(jU(t)):t;if(Nt.isArrayBuffer(t)||Nt.isBuffer(t)||Nt.isStream(t)||Nt.isFile(t)||Nt.isBlob(t))return t;if(Nt.isArrayBufferView(t))return t.buffer;if(Nt.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return C0e(t,this.formSerializer).toString();if((a=Nt.isFileList(t))||r.indexOf("multipart/form-data")>-1){const u=this.env&&this.env.FormData;return x1(a?{"files[]":t}:t,u&&new u,this.formSerializer)}}return o||i?(n.setContentType("application/json",!1),T0e(t)):t}],transformResponse:[function(t){const n=this.transitional||b1.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(t&&Nt.isString(t)&&(r&&!this.responseType||i)){const s=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(a){if(s)throw a.name==="SyntaxError"?vr.from(a,vr.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Js.classes.FormData,Blob:Js.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};Nt.forEach(["delete","get","head"],function(t){b1.headers[t]={}});Nt.forEach(["post","put","patch"],function(t){b1.headers[t]=Nt.merge(P0e)});const fk=b1,I0e=Nt.toObjectSet(["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"]),k0e=e=>{const t={};let n,r,i;return e&&e.split(`
`).forEach(function(s){i=s.indexOf(":"),n=s.substring(0,i).trim().toLowerCase(),r=s.substring(i+1).trim(),!(!n||t[n]&&I0e[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},FL=Symbol("internals");function cm(e){return e&&String(e).trim().toLowerCase()}function g0(e){return e===!1||e==null?e:Nt.isArray(e)?e.map(g0):String(e)}function M0e(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}function R0e(e){return/^[-_a-zA-Z]+$/.test(e.trim())}function pS(e,t,n,r,i){if(Nt.isFunction(r))return r.call(this,t,n);if(i&&(t=n),!!Nt.isString(t)){if(Nt.isString(r))return t.indexOf(r)!==-1;if(Nt.isRegExp(r))return r.test(t)}}function O0e(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function D0e(e,t){const n=Nt.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(i,o,s){return this[r].call(this,t,i,o,s)},configurable:!0})})}class _1{constructor(t){t&&this.set(t)}set(t,n,r){const i=this;function o(a,u,f){const p=cm(u);if(!p)throw new Error("header name must be a non-empty string");const g=Nt.findKey(i,p);(!g||i[g]===void 0||f===!0||f===void 0&&i[g]!==!1)&&(i[g||u]=g0(a))}const s=(a,u)=>Nt.forEach(a,(f,p)=>o(f,p,u));return Nt.isPlainObject(t)||t instanceof this.constructor?s(t,n):Nt.isString(t)&&(t=t.trim())&&!R0e(t)?s(k0e(t),n):t!=null&&o(n,t,r),this}get(t,n){if(t=cm(t),t){const r=Nt.findKey(this,t);if(r){const i=this[r];if(!n)return i;if(n===!0)return M0e(i);if(Nt.isFunction(n))return n.call(this,i,r);if(Nt.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=cm(t),t){const r=Nt.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||pS(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let i=!1;function o(s){if(s=cm(s),s){const a=Nt.findKey(r,s);a&&(!n||pS(r,r[a],a,n))&&(delete r[a],i=!0)}}return Nt.isArray(t)?t.forEach(o):o(t),i}clear(t){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const o=n[r];(!t||pS(this,this[o],o,t,!0))&&(delete this[o],i=!0)}return i}normalize(t){const n=this,r={};return Nt.forEach(this,(i,o)=>{const s=Nt.findKey(r,o);if(s){n[s]=g0(i),delete n[o];return}const a=t?O0e(o):String(o).trim();a!==o&&delete n[o],n[a]=g0(i),r[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return Nt.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&Nt.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[FL]=this[FL]={accessors:{}}).accessors,i=this.prototype;function o(s){const a=cm(s);r[a]||(D0e(i,s),r[a]=!0)}return Nt.isArray(t)?t.forEach(o):o(t),this}}_1.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);Nt.freezeMethods(_1.prototype);Nt.freezeMethods(_1);const Hl=_1;function mS(e,t){const n=this||fk,r=t||n,i=Hl.from(r.headers);let o=r.data;return Nt.forEach(e,function(a){o=a.call(n,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function HU(e){return!!(e&&e.__CANCEL__)}function yv(e,t,n){vr.call(this,e==null?"canceled":e,vr.ERR_CANCELED,t,n),this.name="CanceledError"}Nt.inherits(yv,vr,{__CANCEL__:!0});function A0e(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new vr("Request failed with status code "+n.status,[vr.ERR_BAD_REQUEST,vr.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const N0e=Js.isStandardBrowserEnv?function(){return{write:function(n,r,i,o,s,a){const u=[];u.push(n+"="+encodeURIComponent(r)),Nt.isNumber(i)&&u.push("expires="+new Date(i).toGMTString()),Nt.isString(o)&&u.push("path="+o),Nt.isString(s)&&u.push("domain="+s),a===!0&&u.push("secure"),document.cookie=u.join("; ")},read:function(n){const r=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return r?decodeURIComponent(r[3]):null},remove:function(n){this.write(n,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function L0e(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function z0e(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function KU(e,t){return e&&!L0e(t)?z0e(e,t):t}const F0e=Js.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function i(o){let s=o;return t&&(n.setAttribute("href",s),s=n.href),n.setAttribute("href",s),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=i(window.location.href),function(s){const a=Nt.isString(s)?i(s):s;return a.protocol===r.protocol&&a.host===r.host}}():function(){return function(){return!0}}();function $0e(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function B0e(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,o=0,s;return t=t!==void 0?t:1e3,function(u){const f=Date.now(),p=r[o];s||(s=f),n[i]=u,r[i]=f;let g=o,v=0;for(;g!==i;)v+=n[g++],g=g%e;if(i=(i+1)%e,i===o&&(o=(o+1)%e),f-s<t)return;const b=p&&f-p;return b?Math.round(v*1e3/b):void 0}}function $L(e,t){let n=0;const r=B0e(50,250);return i=>{const o=i.loaded,s=i.lengthComputable?i.total:void 0,a=o-n,u=r(a),f=o<=s;n=o;const p={loaded:o,total:s,progress:s?o/s:void 0,bytes:a,rate:u||void 0,estimated:u&&s&&f?(s-o)/u:void 0,event:i};p[t?"download":"upload"]=!0,e(p)}}const V0e=typeof XMLHttpRequest<"u",U0e=V0e&&function(e){return new Promise(function(n,r){let i=e.data;const o=Hl.from(e.headers).normalize(),s=e.responseType;let a;function u(){e.cancelToken&&e.cancelToken.unsubscribe(a),e.signal&&e.signal.removeEventListener("abort",a)}Nt.isFormData(i)&&(Js.isStandardBrowserEnv||Js.isStandardBrowserWebWorkerEnv)&&o.setContentType(!1);let f=new XMLHttpRequest;if(e.auth){const b=e.auth.username||"",_=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(b+":"+_))}const p=KU(e.baseURL,e.url);f.open(e.method.toUpperCase(),VU(p,e.params,e.paramsSerializer),!0),f.timeout=e.timeout;function g(){if(!f)return;const b=Hl.from("getAllResponseHeaders"in f&&f.getAllResponseHeaders()),T={data:!s||s==="text"||s==="json"?f.responseText:f.response,status:f.status,statusText:f.statusText,headers:b,config:e,request:f};A0e(function(P){n(P),u()},function(P){r(P),u()},T),f=null}if("onloadend"in f?f.onloadend=g:f.onreadystatechange=function(){!f||f.readyState!==4||f.status===0&&!(f.responseURL&&f.responseURL.indexOf("file:")===0)||setTimeout(g)},f.onabort=function(){!f||(r(new vr("Request aborted",vr.ECONNABORTED,e,f)),f=null)},f.onerror=function(){r(new vr("Network Error",vr.ERR_NETWORK,e,f)),f=null},f.ontimeout=function(){let _=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const T=e.transitional||UU;e.timeoutErrorMessage&&(_=e.timeoutErrorMessage),r(new vr(_,T.clarifyTimeoutError?vr.ETIMEDOUT:vr.ECONNABORTED,e,f)),f=null},Js.isStandardBrowserEnv){const b=(e.withCredentials||F0e(p))&&e.xsrfCookieName&&N0e.read(e.xsrfCookieName);b&&o.set(e.xsrfHeaderName,b)}i===void 0&&o.setContentType(null),"setRequestHeader"in f&&Nt.forEach(o.toJSON(),function(_,T){f.setRequestHeader(T,_)}),Nt.isUndefined(e.withCredentials)||(f.withCredentials=!!e.withCredentials),s&&s!=="json"&&(f.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&f.addEventListener("progress",$L(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&f.upload&&f.upload.addEventListener("progress",$L(e.onUploadProgress)),(e.cancelToken||e.signal)&&(a=b=>{!f||(r(!b||b.type?new yv(null,e,f):b),f.abort(),f=null)},e.cancelToken&&e.cancelToken.subscribe(a),e.signal&&(e.signal.aborted?a():e.signal.addEventListener("abort",a)));const v=$0e(p);if(v&&Js.protocols.indexOf(v)===-1){r(new vr("Unsupported protocol "+v+":",vr.ERR_BAD_REQUEST,e));return}f.send(i||null)})},v0={http:p0e,xhr:U0e};Nt.forEach(v0,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const j0e={getAdapter:e=>{e=Nt.isArray(e)?e:[e];const{length:t}=e;let n,r;for(let i=0;i<t&&(n=e[i],!(r=Nt.isString(n)?v0[n.toLowerCase()]:n));i++);if(!r)throw r===!1?new vr(`Adapter ${n} is not supported by the environment`,"ERR_NOT_SUPPORT"):new Error(Nt.hasOwnProp(v0,n)?`Adapter '${n}' is not available in the build`:`Unknown adapter '${n}'`);if(!Nt.isFunction(r))throw new TypeError("adapter is not a function");return r},adapters:v0};function gS(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new yv(null,e)}function BL(e){return gS(e),e.headers=Hl.from(e.headers),e.data=mS.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),j0e.getAdapter(e.adapter||fk.adapter)(e).then(function(r){return gS(e),r.data=mS.call(e,e.transformResponse,r),r.headers=Hl.from(r.headers),r},function(r){return HU(r)||(gS(e),r&&r.response&&(r.response.data=mS.call(e,e.transformResponse,r.response),r.response.headers=Hl.from(r.response.headers))),Promise.reject(r)})}const VL=e=>e instanceof Hl?e.toJSON():e;function Sh(e,t){t=t||{};const n={};function r(f,p,g){return Nt.isPlainObject(f)&&Nt.isPlainObject(p)?Nt.merge.call({caseless:g},f,p):Nt.isPlainObject(p)?Nt.merge({},p):Nt.isArray(p)?p.slice():p}function i(f,p,g){if(Nt.isUndefined(p)){if(!Nt.isUndefined(f))return r(void 0,f,g)}else return r(f,p,g)}function o(f,p){if(!Nt.isUndefined(p))return r(void 0,p)}function s(f,p){if(Nt.isUndefined(p)){if(!Nt.isUndefined(f))return r(void 0,f)}else return r(void 0,p)}function a(f,p,g){if(g in t)return r(f,p);if(g in e)return r(void 0,f)}const u={url:o,method:o,data:o,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,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(f,p)=>i(VL(f),VL(p),!0)};return Nt.forEach(Object.keys(e).concat(Object.keys(t)),function(p){const g=u[p]||i,v=g(e[p],t[p],p);Nt.isUndefined(v)&&g!==a||(n[p]=v)}),n}const WU="1.3.3",hk={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{hk[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const UL={};hk.transitional=function(t,n,r){function i(o,s){return"[Axios v"+WU+"] Transitional option '"+o+"'"+s+(r?". "+r:"")}return(o,s,a)=>{if(t===!1)throw new vr(i(s," has been removed"+(n?" in "+n:"")),vr.ERR_DEPRECATED);return n&&!UL[s]&&(UL[s]=!0,console.warn(i(s," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,s,a):!0}};function H0e(e,t,n){if(typeof e!="object")throw new vr("options must be an object",vr.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const o=r[i],s=t[o];if(s){const a=e[o],u=a===void 0||s(a,o,e);if(u!==!0)throw new vr("option "+o+" must be "+u,vr.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new vr("Unknown option "+o,vr.ERR_BAD_OPTION)}}const yP={assertOptions:H0e,validators:hk},Cc=yP.validators;class Ab{constructor(t){this.defaults=t,this.interceptors={request:new zL,response:new zL}}request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Sh(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&yP.assertOptions(r,{silentJSONParsing:Cc.transitional(Cc.boolean),forcedJSONParsing:Cc.transitional(Cc.boolean),clarifyTimeoutError:Cc.transitional(Cc.boolean)},!1),i!==void 0&&yP.assertOptions(i,{encode:Cc.function,serialize:Cc.function},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s;s=o&&Nt.merge(o.common,o[n.method]),s&&Nt.forEach(["delete","get","head","post","put","patch","common"],_=>{delete o[_]}),n.headers=Hl.concat(s,o);const a=[];let u=!0;this.interceptors.request.forEach(function(T){typeof T.runWhen=="function"&&T.runWhen(n)===!1||(u=u&&T.synchronous,a.unshift(T.fulfilled,T.rejected))});const f=[];this.interceptors.response.forEach(function(T){f.push(T.fulfilled,T.rejected)});let p,g=0,v;if(!u){const _=[BL.bind(this),void 0];for(_.unshift.apply(_,a),_.push.apply(_,f),v=_.length,p=Promise.resolve(n);g<v;)p=p.then(_[g++],_[g++]);return p}v=a.length;let b=n;for(g=0;g<v;){const _=a[g++],T=a[g++];try{b=_(b)}catch(I){T.call(this,I);break}}try{p=BL.call(this,b)}catch(_){return Promise.reject(_)}for(g=0,v=f.length;g<v;)p=p.then(f[g++],f[g++]);return p}getUri(t){t=Sh(this.defaults,t);const n=KU(t.baseURL,t.url);return VU(n,t.params,t.paramsSerializer)}}Nt.forEach(["delete","get","head","options"],function(t){Ab.prototype[t]=function(n,r){return this.request(Sh(r||{},{method:t,url:n,data:(r||{}).data}))}});Nt.forEach(["post","put","patch"],function(t){function n(r){return function(o,s,a){return this.request(Sh(a||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:s}))}}Ab.prototype[t]=n(),Ab.prototype[t+"Form"]=n(!0)});const y0=Ab;class pk{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const r=this;this.promise.then(i=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o;const s=new Promise(a=>{r.subscribe(a),o=a}).then(i);return s.cancel=function(){r.unsubscribe(o)},s},t(function(o,s,a){r.reason||(r.reason=new yv(o,s,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new pk(function(i){t=i}),cancel:t}}}const K0e=pk;function W0e(e){return function(n){return e.apply(null,n)}}function G0e(e){return Nt.isObject(e)&&e.isAxiosError===!0}const xP={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(xP).forEach(([e,t])=>{xP[t]=e});const q0e=xP;function GU(e){const t=new y0(e),n=IU(y0.prototype.request,t);return Nt.extend(n,y0.prototype,t,{allOwnKeys:!0}),Nt.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return GU(Sh(e,i))},n}const Wi=GU(fk);Wi.Axios=y0;Wi.CanceledError=yv;Wi.CancelToken=K0e;Wi.isCancel=HU;Wi.VERSION=WU;Wi.toFormData=x1;Wi.AxiosError=vr;Wi.Cancel=Wi.CanceledError;Wi.all=function(t){return Promise.all(t)};Wi.spread=W0e;Wi.isAxiosError=G0e;Wi.mergeConfig=Sh;Wi.AxiosHeaders=Hl;Wi.formToJSON=e=>jU(Nt.isHTMLForm(e)?new FormData(e):e);Wi.HttpStatusCode=q0e;Wi.default=Wi;const Z0e=Wi,Nb="https://geoenergy.spatialsystems.ru",as=Z0e.create({baseURL:Nb}),qU=(e,t)=>{const n=e||new URLSearchParams;return t&&(t.type==="ao"&&n.append("district[]",t.id),t.type==="rayon"&&n.append("rayon",t.id)),n},X0e=async(e,t,n)=>{const r=qU(e,t),{data:i}=await as.get(`/api/data/?${r.toString()}`,{signal:n});return i},Y0e=async(e,t)=>{const n=qU(e,t),{data:r}=await as.get(`/api/data/to_csv/?${n.toString()}`,{responseType:"arraybuffer"});return r},Q0e=async e=>{const{data:t}=await as.get(`/default_data/templates/${e}.xlsx`,{responseType:"arraybuffer"});return t},J0e=async(e,t,n=!1)=>{const r=new FormData;r.append("file",e),r.append("model",t),r.append("refill",n);const{data:i}=await as.post("/api/import_file/",r);return i},ebe=async()=>{const{data:e}=await as.get("/api/data/start_ds_miracle");return e};function tbe(e){let t;try{t=e()}catch{return}return{getItem:r=>{var i;const o=a=>a===null?null:JSON.parse(a),s=(i=t.getItem(r))!=null?i:null;return s instanceof Promise?s.then(o):o(s)},setItem:(r,i)=>t.setItem(r,JSON.stringify(i)),removeItem:r=>t.removeItem(r)}}const Mg=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then(r){return Mg(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return Mg(r)(n)}}}},nbe=(e,t)=>(n,r,i)=>{let o={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:I=>I,version:0,merge:(I,P)=>({...P,...I}),...t},s=!1;const a=new Set,u=new Set;let f;try{f=o.getStorage()}catch{}if(!f)return e((...I)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),n(...I)},r,i);const p=Mg(o.serialize),g=()=>{const I=o.partialize({...r()});let P;const M=p({state:I,version:o.version}).then(D=>f.setItem(o.name,D)).catch(D=>{P=D});if(P)throw P;return M},v=i.setState;i.setState=(I,P)=>{v(I,P),g()};const b=e((...I)=>{n(...I),g()},r,i);let _;const T=()=>{var I;if(!f)return;s=!1,a.forEach(M=>M(r()));const P=((I=o.onRehydrateStorage)==null?void 0:I.call(o,r()))||void 0;return Mg(f.getItem.bind(f))(o.name).then(M=>{if(M)return o.deserialize(M)}).then(M=>{if(M)if(typeof M.version=="number"&&M.version!==o.version){if(o.migrate)return o.migrate(M.state,M.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return M.state}).then(M=>{var D;return _=o.merge(M,(D=r())!=null?D:b),n(_,!0),g()}).then(()=>{P==null||P(_,void 0),s=!0,u.forEach(M=>M(_))}).catch(M=>{P==null||P(void 0,M)})};return i.persist={setOptions:I=>{o={...o,...I},I.getStorage&&(f=I.getStorage())},clearStorage:()=>{f==null||f.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>T(),hasHydrated:()=>s,onHydrate:I=>(a.add(I),()=>{a.delete(I)}),onFinishHydration:I=>(u.add(I),()=>{u.delete(I)})},T(),_||b},rbe=(e,t)=>(n,r,i)=>{let o={storage:tbe(()=>localStorage),partialize:T=>T,version:0,merge:(T,I)=>({...I,...T}),...t},s=!1;const a=new Set,u=new Set;let f=o.storage;if(!f)return e((...T)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),n(...T)},r,i);const p=()=>{const T=o.partialize({...r()});return f.setItem(o.name,{state:T,version:o.version})},g=i.setState;i.setState=(T,I)=>{g(T,I),p()};const v=e((...T)=>{n(...T),p()},r,i);let b;const _=()=>{var T;if(!f)return;s=!1,a.forEach(P=>P(r()));const I=((T=o.onRehydrateStorage)==null?void 0:T.call(o,r()))||void 0;return Mg(f.getItem.bind(f))(o.name).then(P=>{if(P)if(typeof P.version=="number"&&P.version!==o.version){if(o.migrate)return o.migrate(P.state,P.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return P.state}).then(P=>{var M;return b=o.merge(P,(M=r())!=null?M:v),n(b,!0),p()}).then(()=>{I==null||I(b,void 0),s=!0,u.forEach(P=>P(b))}).catch(P=>{I==null||I(void 0,P)})};return i.persist={setOptions:T=>{o={...o,...T},T.storage&&(f=T.storage)},clearStorage:()=>{f==null||f.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>_(),hasHydrated:()=>s,onHydrate:T=>(a.add(T),()=>{a.delete(T)}),onFinishHydration:T=>(u.add(T),()=>{u.delete(T)})},_(),b||v},ibe=(e,t)=>{var n;return"getStorage"in t||"serialize"in t||"deserialize"in t?(((n={VITE_API_URL:"https://geoenergy.spatialsystems.ru",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0})==null?void 0:n.MODE)!=="production"&&console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),nbe(e,t)):rbe(e,t)},mk=ibe,obe=e=>({value:0,range:[-25,18],setValue:t=>{e(n=>{n.value=t})},clear:()=>e(t=>{t.value=0})}),ss=hu(mk(pu(obe),{name:"weather-filter"})),gk=e=>tc(["dzkh-filter-range",e],async()=>{const{data:t,isInitialLoading:n,isFetching:r}=await as.get(`/api/data/filters_ranges/?field=${e}`);return{data:t,isLoading:n||r}},{select:({data:t,isLoading:n})=>{let r;return!t||!t[e]?r=[0,0]:r=[t[e].min,t[e].max],{range:r,isLoading:n}}}),vk=e=>tc(["dzkh-filter-values",e],async()=>{const{data:t,isInitialLoading:n,isFetching:r}=await as.get(`/api/data/filters_ranges/?field=${e}`);return{data:t,isLoading:n||r}},{select:({data:t,isLoading:n})=>t?[...t[e]]:[]}),abe=e=>tc(["dzkh-shap",e],async()=>{const{data:t,isInitialLoading:n,isFetching:r}=await as.get(`/api/data/${e}/data_shap/`);return{data:t,isLoading:n||r}},{select:t=>t.data.shap}),sbe=e=>{const{value:t}=ss();return e?tc(["dzkh-crush",e],async()=>{const{data:n,isInitialLoading:r,isFetching:i}=await as.get(`/api/data/${e}/crush_summary/?current_temp=${t}`);return{data:n,isLoading:r||i}},{select:n=>n.data}):{data:null}};function ZU(e,t){const n=window.document.createElement("a");n.href=window.URL.createObjectURL(new Blob([t],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"})),n.download=e,document.body.appendChild(n),n.click(),document.body.removeChild(n)}const td=e=>e==null||e==="",jL=({id:e,modalOpen:t,setModalOpen:n})=>{const{data:r,isLoading:i}=sbe(e);return it("div",{className:"flex flex-col gap-1",children:[A(ad,{className:Td("font-bold"),children:"In the failure area there are:"}),!td(r==null?void 0:r.potreb_count)&&!td(r==null?void 0:r.potreb_soc_count)&&it(ad,{children:[(r==null?void 0:r.potreb_count)+(r==null?void 0:r.potreb_soc_count)," consumers (of which ",r==null?void 0:r.potreb_soc_count," are social facilities)"]}),!td(r==null?void 0:r.total_area)&&it(ad,{children:["Total consumer area - ",Math.ceil(r==null?void 0:r.total_area)," sq. meters"]}),!td(r==null?void 0:r.number_of_apartments)&&it(ad,{children:[r==null?void 0:r.number_of_apartments," apartments"]}),!td(r==null?void 0:r.data_min_cooling_time)&&!td(r==null?void 0:r.min_cooling_time)&&it(ad,{children:["The fastest cooling building is at address ",r==null?void 0:r.data_min_cooling_time.building_address," (",r==null?void 0:r.min_cooling_time," hours)"]})]})};var XU={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},HL=Un.createContext&&Un.createContext(XU),Yc=globalThis&&globalThis.__assign||function(){return Yc=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Yc.apply(this,arguments)},lbe=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function YU(e){return e&&e.map(function(t,n){return Un.createElement(t.tag,Yc({key:n},t.attr),YU(t.child))})}function cbe(e){return function(t){return A(ube,{...Yc({attr:Yc({},e.attr)},t),children:YU(e.child)})}}function ube(e){var t=function(n){var r=e.attr,i=e.size,o=e.title,s=lbe(e,["attr","size","title"]),a=i||n.size||"1em",u;return n.className&&(u=n.className),e.className&&(u=(u?u+" ":"")+e.className),it("svg",{...Yc({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,s,{className:u,style:Yc(Yc({color:e.color||n.color},n.style),e.style),height:a,width:a,xmlns:"http://www.w3.org/2000/svg"}),children:[o&&A("title",{children:o}),e.children]})};return HL!==void 0?A(HL.Consumer,{children:function(n){return t(n)}}):t(XU)}function dbe(e){return cbe({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M12 2C6.486 2 2 6.486 2 12s4.486 10 10 10 10-4.486 10-10S17.514 2 12 2zm0 18c-4.411 0-8-3.589-8-8s3.589-8 8-8 8 3.589 8 8-3.589 8-8 8z"}},{tag:"path",attr:{d:"M11 11h2v6h-2zm0-4h2v2h-2z"}}]})(e)}const fbe=()=>{const{selectedSourceConfig:e,setSelectedSourceConfig:t}=Hd(),[n,r]=E.exports.useState(!1);if(!e.pointId)return"";const{pointId:i}=e,o=()=>t({sourceId:null,dispatcherNumber:null});return it(nr,{children:[it("div",{className:"absolute bottom-[20px] left-[20px] text-grey z-10 bg-white-background rounded-xl p-3 text-center",children:[A(ul,{text:`Results of TP failure simulation ${e==null?void 0:e.sourceId}`}),it("div",{className:"flex justify-center flex-row gap-2",children:[A(Yr,{type:"primary",onClick:o,children:"Cancel"}),!!i&&A(EB,{content:A(jL,{id:i}),children:A(Yr,{className:"flex justify-center items-center",type:"primary",onClick:()=>r(!0),children:A(dbe,{className:"w-4 h-4"})})})]})]}),!!i&&A(jL,{id:i,modalOpen:n,setModalOpen:r})]})};var hbe=E.exports.createContext({});const QU=hbe;var wx=2,KL=.16,pbe=.05,mbe=.05,gbe=.15,JU=5,e7=4,vbe=[{index:7,opacity:.15},{index:6,opacity:.25},{index:5,opacity:.3},{index:5,opacity:.45},{index:5,opacity:.65},{index:5,opacity:.85},{index:4,opacity:.9},{index:3,opacity:.95},{index:2,opacity:.97},{index:1,opacity:.98}];function WL(e){var t=e.r,n=e.g,r=e.b,i=ob(t,n,r);return{h:i.h*360,s:i.s,v:i.v}}function Cx(e){var t=e.r,n=e.g,r=e.b;return"#".concat(ab(t,n,r,!1))}function ybe(e,t,n){var r=n/100,i={r:(t.r-e.r)*r+e.r,g:(t.g-e.g)*r+e.g,b:(t.b-e.b)*r+e.b};return i}function GL(e,t,n){var r;return Math.round(e.h)>=60&&Math.round(e.h)<=240?r=n?Math.round(e.h)-wx*t:Math.round(e.h)+wx*t:r=n?Math.round(e.h)+wx*t:Math.round(e.h)-wx*t,r<0?r+=360:r>=360&&(r-=360),r}function qL(e,t,n){if(e.h===0&&e.s===0)return e.s;var r;return n?r=e.s-KL*t:t===e7?r=e.s+KL:r=e.s+pbe*t,r>1&&(r=1),n&&t===JU&&r>.1&&(r=.1),r<.06&&(r=.06),Number(r.toFixed(2))}function ZL(e,t,n){var r;return n?r=e.v+mbe*t:r=e.v-gbe*t,r>1&&(r=1),Number(r.toFixed(2))}function bP(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[],r=Es(e),i=JU;i>0;i-=1){var o=WL(r),s=Cx(Es({h:GL(o,i,!0),s:qL(o,i,!0),v:ZL(o,i,!0)}));n.push(s)}n.push(Cx(r));for(var a=1;a<=e7;a+=1){var u=WL(r),f=Cx(Es({h:GL(u,a),s:qL(u,a),v:ZL(u,a)}));n.push(f)}return t.theme==="dark"?vbe.map(function(p){var g=p.index,v=p.opacity,b=Cx(ybe(Es(t.backgroundColor||"#141414"),Es(n[g]),v*100));return b}):n}var vS={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1677FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},yS={},xS={};Object.keys(vS).forEach(function(e){yS[e]=bP(vS[e]),yS[e].primary=yS[e][5],xS[e]=bP(vS[e],{theme:"dark",backgroundColor:"#141414"}),xS[e].primary=xS[e][5]});function xbe(e,t){Lr(e,"[@ant-design/icons] ".concat(t))}function XL(e){return on(e)==="object"&&typeof e.name=="string"&&typeof e.theme=="string"&&(on(e.icon)==="object"||typeof e.icon=="function")}function YL(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Object.keys(e).reduce(function(t,n){var r=e[n];switch(n){case"class":t.className=r,delete t.class;break;default:t[n]=r}return t},{})}function _P(e,t,n){return n?Un.createElement(e.tag,me(me({key:t},YL(e.attrs)),n),(e.children||[]).map(function(r,i){return _P(r,"".concat(t,"-").concat(e.tag,"-").concat(i))})):Un.createElement(e.tag,me({key:t},YL(e.attrs)),(e.children||[]).map(function(r,i){return _P(r,"".concat(t,"-").concat(e.tag,"-").concat(i))}))}function t7(e){return bP(e)[0]}function n7(e){return e?Array.isArray(e)?e:[e]:[]}var bbe=`
.anticon {
display: inline-block;
color: inherit;
font-style: normal;
line-height: 0;
text-align: center;
text-transform: none;
vertical-align: -0.125em;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.anticon > * {
line-height: 1;
}
.anticon svg {
display: inline-block;
}
.anticon::before {
display: none;
}
.anticon .anticon-icon {
display: block;
}
.anticon[tabindex] {
cursor: pointer;
}
.anticon-spin::before,
.anticon-spin {
display: inline-block;
-webkit-animation: loadingCircle 1s infinite linear;
animation: loadingCircle 1s infinite linear;
}
@-webkit-keyframes loadingCircle {
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
}
}
@keyframes loadingCircle {
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
}
}
`,_be=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:bbe,n=E.exports.useContext(QU),r=n.csp,i=n.prefixCls,o=t;i&&(o=o.replace(/anticon/g,i)),E.exports.useEffect(function(){Jg(o,"@ant-design-icons",{prepend:!0,csp:r})},[])},wbe=["icon","className","onClick","style","primaryColor","secondaryColor"],Zm={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function Cbe(e){var t=e.primaryColor,n=e.secondaryColor;Zm.primaryColor=t,Zm.secondaryColor=n||t7(t),Zm.calculated=!!n}function Sbe(){return me({},Zm)}var w1=function(t){var n=t.icon,r=t.className,i=t.onClick,o=t.style,s=t.primaryColor,a=t.secondaryColor,u=kn(t,wbe),f=Zm;if(s&&(f={primaryColor:s,secondaryColor:a||t7(s)}),_be(),xbe(XL(n),"icon should be icon definiton, but got ".concat(n)),!XL(n))return null;var p=n;return p&&typeof p.icon=="function"&&(p=me(me({},p),{},{icon:p.icon(f.primaryColor,f.secondaryColor)})),_P(p.icon,"svg-".concat(p.name),me({className:r,onClick:i,style:o,"data-icon":p.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},u))};w1.displayName="IconReact";w1.getTwoToneColors=Sbe;w1.setTwoToneColors=Cbe;const yk=w1;function r7(e){var t=n7(e),n=$e(t,2),r=n[0],i=n[1];return yk.setTwoToneColors({primaryColor:r,secondaryColor:i})}function Ebe(){var e=yk.getTwoToneColors();return e.calculated?[e.primaryColor,e.secondaryColor]:e.primaryColor}var Pbe=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];r7("#1890ff");var C1=E.exports.forwardRef(function(e,t){var n,r=e.className,i=e.icon,o=e.spin,s=e.rotate,a=e.tabIndex,u=e.onClick,f=e.twoToneColor,p=kn(e,Pbe),g=E.exports.useContext(QU),v=g.prefixCls,b=v===void 0?"anticon":v,_=g.rootClassName,T=je(_,b,(n={},ae(n,"".concat(b,"-").concat(i.name),!!i.name),ae(n,"".concat(b,"-spin"),!!o||i.name==="loading"),n),r),I=a;I===void 0&&u&&(I=-1);var P=s?{msTransform:"rotate(".concat(s,"deg)"),transform:"rotate(".concat(s,"deg)")}:void 0,M=n7(f),D=$e(M,2),N=D[0],z=D[1];return A("span",{...me(me({role:"img","aria-label":i.name},p),{},{ref:t,tabIndex:I,onClick:u,className:T}),children:A(yk,{icon:i,primaryColor:N,secondaryColor:z,style:P})})});C1.displayName="AntdIcon";C1.getTwoToneColor=Ebe;C1.setTwoToneColor=r7;const Xh=C1;var i7=function(t,n){return A(Xh,{...me(me({},t),{},{ref:n,icon:cU})})};i7.displayName="DownloadOutlined";const Tbe=E.exports.forwardRef(i7);var Ibe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M391 240.9c-.8-6.6-8.9-9.4-13.6-4.7l-43.7 43.7L200 146.3a8.03 8.03 0 00-11.3 0l-42.4 42.3a8.03 8.03 0 000 11.3L280 333.6l-43.9 43.9a8.01 8.01 0 004.7 13.6L401 410c5.1.6 9.5-3.7 8.9-8.9L391 240.9zm10.1 373.2L240.8 633c-6.6.8-9.4 8.9-4.7 13.6l43.9 43.9L146.3 824a8.03 8.03 0 000 11.3l42.4 42.3c3.1 3.1 8.2 3.1 11.3 0L333.7 744l43.7 43.7A8.01 8.01 0 00391 783l18.9-160.1c.6-5.1-3.7-9.4-8.8-8.8zm221.8-204.2L783.2 391c6.6-.8 9.4-8.9 4.7-13.6L744 333.6 877.7 200c3.1-3.1 3.1-8.2 0-11.3l-42.4-42.3a8.03 8.03 0 00-11.3 0L690.3 279.9l-43.7-43.7a8.01 8.01 0 00-13.6 4.7L614.1 401c-.6 5.2 3.7 9.5 8.8 8.9zM744 690.4l43.9-43.9a8.01 8.01 0 00-4.7-13.6L623 614c-5.1-.6-9.5 3.7-8.9 8.9L633 783.1c.8 6.6 8.9 9.4 13.6 4.7l43.7-43.7L824 877.7c3.1 3.1 8.2 3.1 11.3 0l42.4-42.3c3.1-3.1 3.1-8.2 0-11.3L744 690.4z"}}]},name:"fullscreen-exit",theme:"outlined"};const kbe=Ibe;var o7=function(t,n){return A(Xh,{...me(me({},t),{},{ref:n,icon:kbe})})};o7.displayName="FullscreenExitOutlined";const Mbe=E.exports.forwardRef(o7);var Rbe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M290 236.4l43.9-43.9a8.01 8.01 0 00-4.7-13.6L169 160c-5.1-.6-9.5 3.7-8.9 8.9L179 329.1c.8 6.6 8.9 9.4 13.6 4.7l43.7-43.7L370 423.7c3.1 3.1 8.2 3.1 11.3 0l42.4-42.3c3.1-3.1 3.1-8.2 0-11.3L290 236.4zm352.7 187.3c3.1 3.1 8.2 3.1 11.3 0l133.7-133.6 43.7 43.7a8.01 8.01 0 0013.6-4.7L863.9 169c.6-5.1-3.7-9.5-8.9-8.9L694.8 179c-6.6.8-9.4 8.9-4.7 13.6l43.9 43.9L600.3 370a8.03 8.03 0 000 11.3l42.4 42.4zM845 694.9c-.8-6.6-8.9-9.4-13.6-4.7l-43.7 43.7L654 600.3a8.03 8.03 0 00-11.3 0l-42.4 42.3a8.03 8.03 0 000 11.3L734 787.6l-43.9 43.9a8.01 8.01 0 004.7 13.6L855 864c5.1.6 9.5-3.7 8.9-8.9L845 694.9zm-463.7-94.6a8.03 8.03 0 00-11.3 0L236.3 733.9l-43.7-43.7a8.01 8.01 0 00-13.6 4.7L160.1 855c-.6 5.1 3.7 9.5 8.9 8.9L329.2 845c6.6-.8 9.4-8.9 4.7-13.6L290 787.6 423.7 654c3.1-3.1 3.1-8.2 0-11.3l-42.4-42.4z"}}]},name:"fullscreen",theme:"outlined"};const Obe=Rbe;var a7=function(t,n){return A(Xh,{...me(me({},t),{},{ref:n,icon:Obe})})};a7.displayName="FullscreenOutlined";const Dbe=E.exports.forwardRef(a7);var s7=function(t,n){return A(Xh,{...me(me({},t),{},{ref:n,icon:F6})})};s7.displayName="LoadingOutlined";const Abe=E.exports.forwardRef(s7);var Nbe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M924.8 625.7l-65.5-56c3.1-19 4.7-38.4 4.7-57.8s-1.6-38.8-4.7-57.8l65.5-56a32.03 32.03 0 009.3-35.2l-.9-2.6a443.74 443.74 0 00-79.7-137.9l-1.8-2.1a32.12 32.12 0 00-35.1-9.5l-81.3 28.9c-30-24.6-63.5-44-99.7-57.6l-15.7-85a32.05 32.05 0 00-25.8-25.7l-2.7-.5c-52.1-9.4-106.9-9.4-159 0l-2.7.5a32.05 32.05 0 00-25.8 25.7l-15.8 85.4a351.86 351.86 0 00-99 57.4l-81.9-29.1a32 32 0 00-35.1 9.5l-1.8 2.1a446.02 446.02 0 00-79.7 137.9l-.9 2.6c-4.5 12.5-.8 26.5 9.3 35.2l66.3 56.6c-3.1 18.8-4.6 38-4.6 57.1 0 19.2 1.5 38.4 4.6 57.1L99 625.5a32.03 32.03 0 00-9.3 35.2l.9 2.6c18.1 50.4 44.9 96.9 79.7 137.9l1.8 2.1a32.12 32.12 0 0035.1 9.5l81.9-29.1c29.8 24.5 63.1 43.9 99 57.4l15.8 85.4a32.05 32.05 0 0025.8 25.7l2.7.5a449.4 449.4 0 00159 0l2.7-.5a32.05 32.05 0 0025.8-25.7l15.7-85a350 350 0 0099.7-57.6l81.3 28.9a32 32 0 0035.1-9.5l1.8-2.1c34.8-41.1 61.6-87.5 79.7-137.9l.9-2.6c4.5-12.3.8-26.3-9.3-35zM788.3 465.9c2.5 15.1 3.8 30.6 3.8 46.1s-1.3 31-3.8 46.1l-6.6 40.1 74.7 63.9a370.03 370.03 0 01-42.6 73.6L721 702.8l-31.4 25.8c-23.9 19.6-50.5 35-79.3 45.8l-38.1 14.3-17.9 97a377.5 377.5 0 01-85 0l-17.9-97.2-37.8-14.5c-28.5-10.8-55-26.2-78.7-45.7l-31.4-25.9-93.4 33.2c-17-22.9-31.2-47.6-42.6-73.6l75.5-64.5-6.5-40c-2.4-14.9-3.7-30.3-3.7-45.5 0-15.3 1.2-30.6 3.7-45.5l6.5-40-75.5-64.5c11.3-26.1 25.6-50.7 42.6-73.6l93.4 33.2 31.4-25.9c23.7-19.5 50.2-34.9 78.7-45.7l37.9-14.3 17.9-97.2c28.1-3.2 56.8-3.2 85 0l17.9 97 38.1 14.3c28.7 10.8 55.4 26.2 79.3 45.8l31.4 25.8 92.8-32.9c17 22.9 31.2 47.6 42.6 73.6L781.8 426l6.5 39.9zM512 326c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm79.2 255.2A111.6 111.6 0 01512 614c-29.9 0-58-11.7-79.2-32.8A111.6 111.6 0 01400 502c0-29.9 11.7-58 32.8-79.2C454 401.6 482.1 390 512 390c29.9 0 58 11.6 79.2 32.8A111.6 111.6 0 01624 502c0 29.9-11.7 58-32.8 79.2z"}}]},name:"setting",theme:"outlined"};const Lbe=Nbe;var l7=function(t,n){return A(Xh,{...me(me({},t),{},{ref:n,icon:Lbe})})};l7.displayName="SettingOutlined";const zbe=E.exports.forwardRef(l7);var Fbe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M400 317.7h73.9V656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V317.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 163a8 8 0 00-12.6 0l-112 141.7c-4.1 5.3-.4 13 6.3 13zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"upload",theme:"outlined"};const $be=Fbe;var c7=function(t,n){return A(Xh,{...me(me({},t),{},{ref:n,icon:$be})})};c7.displayName="UploadOutlined";const u7=E.exports.forwardRef(c7),Bbe=({onClick:e})=>A("div",{className:"absolute top-[20px] left-[20px]",children:A(ka,{title:"Data import",placement:"right",children:A(Yr,{type:"primary",icon:A(u7,{}),onClick:e})})}),Vbe=A(Abe,{style:{fontSize:14},spin:!0}),d7=e=>A(uv,{indicator:Vbe,size:"small",...e}),f7=({taskId:e,onSuccess:t})=>tc(["tasks",e],async()=>{const{data:n}=await as.get(`/api/task/${e}/`);return n},{enabled:e!==null,refetchInterval:1e3,onSuccess:t}),um=({text:e,dataType:t,onSuccess:n,onError:r})=>{const[i,o]=E.exports.useState(!1),[s,a]=E.exports.useState(null),[u,f]=E.exports.useState(!1),[p,g]=E.exports.useState(!1),{data:v,isInitialLoading:b,isFetching:_}=f7({taskId:s,onSuccess:D=>{D.description==="\u0418\u043C\u043F\u043E\u0440\u0442 \u0434\u0430\u043D\u043D\u044B\u0445 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043D"&&(a(null),f(!0),n(t))}}),T=b||_;return it("div",{children:[it("div",{className:"space-x-3",children:[A(ka,{title:"Overwrite data",children:A(xh,{checked:i,onChange:D=>o(D.target.checked)})}),A(_ye,{name:"file",accept:"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml",customRequest:async D=>{const{file:N}=D;try{g(!0);const z=await J0e(N,t,i);z.task_id&&a(z.task_id)}catch(z){r(t),console.error(z)}finally{g(!1)}},itemRender:()=>null,children:A(Yr,{icon:A(u7,{}),children:e})}),A(Yr,{className:"p-0 text-xs text-grey underline h-auto",type:"text",onClick:async()=>{const D=await Q0e(t);await ZU(`${t}_template.xlsx`,D)},children:"Download template"})]}),(()=>{if(!p&&!v&&!u)return null;const N=()=>p?0:u?100:v.progress,z=()=>p?"Data import":u?"Data import completed":v.description;return it("div",{children:[!u&&A(d7,{className:"mr-2"}),A(VI,{percent:N(),status:T?"active":null,size:"small",className:"w-[300px]"}),A(ul,{text:z(),className:"text-xs"})]})})()]})},Ube=({onClose:e})=>{const[t,n]=E.exports.useState(!1),[r,i]=E.exports.useState(!1),[o,s]=E.exports.useState({odpu:null,asupr:null,moek_scheme:null,events:null,houses:null}),[a,u]=E.exports.useState(null),[f,p]=E.exports.useState(!1),{data:g,isInitialLoading:v,isFetching:b}=f7({taskId:a,onSuccess:N=>{N.description==="\u041F\u0420\u041E\u0426\u0415\u0421\u0421\u0418\u041D\u0413 \u0434\u0430\u043D\u043D\u044B\u0445 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043D"&&(u(null),p(!0),e())}}),_=v||b,T=N=>s(z=>({...z,[N]:!0})),I=N=>s(z=>({...z,[N]:!1})),P=Object.values(o).some(N=>N===null||N===!1);return A(X8,{open:!0,title:"Data import",width:400,footer:null,onCancel:e,children:it("div",{className:"text-center space-y-3",children:[A(D$,{message:"Please note that import time can be significant (up to 10 minutes) depending on the size of the input data.",type:"warning",className:"mb-5",showIcon:!0,closable:!0}),A(um,{dataType:"odpu",text:"Select ODPU file",onSuccess:T,onError:I}),A(um,{dataType:"asupr",text:"Select ASUPR file",onSuccess:T,onError:I}),A(um,{dataType:"moek_scheme",text:"Select MOEK file",onSuccess:T,onError:I}),A(um,{dataType:"events",text:"Select events file",onSuccess:T,onError:I}),A(um,{dataType:"houses",text:"Select houses file",onSuccess:T,onError:I}),A(Yr,{className:"mt-5",type:"primary",onClick:async()=>{n(!0);try{const N=await ebe();N.task_id&&u(N.task_id)}catch(N){console.error(N),i(!0)}finally{n(!1)}},loading:t,disabled:P||_,children:"Start data analysis"},"start-upload"),(()=>{if(!t&&!g&&!f)return null;const z=()=>t?0:f?100:g.progress,$=()=>t?"\u041D\u0430\u0447\u0430\u043B\u043E \u0430\u043D\u0430\u043B\u0438\u0437\u0430":f?"Data analysis completed":g.description;return it("div",{children:[!f&&A(d7,{className:"mr-2"}),A(VI,{percent:z(),status:_?"active":null,size:"small",className:"w-[300px]"}),A(ul,{text:$(),className:"text-xs"})]})})(),r&&A("p",{className:"text-red-600",children:"An error occurred"})]})})},jbe=e=>({updateCounter:-1,toggleUpdateCounter:()=>{e(t=>{t.updateCounter=t.updateCounter===-1?1:-1})}}),h7=hu(pu(jbe)),Ci={consumer:"potreb",source:"tp",dispatcher:"ods"},Hbe={[Ci.consumer]:!0,[Ci.source]:!0,[Ci.dispatcher]:!0},Kbe=e=>({isVisible:Hbe,toggleVisibility:t=>e(n=>{n.isVisible[t]=!n.isVisible[t]}),showLayers:t=>e(n=>{t.forEach(r=>{n.isVisible[r]=!0})}),setLayersVisibility:t=>e(n=>{t.forEach(i=>{n.isVisible[i]=!0}),Object.keys(n.isVisible).filter(i=>!t.includes(i)).forEach(i=>{n.isVisible[i]=!1})})}),S1=hu(mk(pu(Kbe),{name:"dzkh/layers-visibility"})),Wbe={ao:"ao_id",rayon:"rayon_id"},xk=e=>E.exports.useMemo(()=>e?["==",["get",Wbe[e.type]],e.id]:null,[e]),Gbe=6,Lb={stops:[[.05,"#fff700"],[.2,"#ffda00"],[.35,"#ffbc00"],[.5,"#ff9d00"],[.65,"#ff7a00"],[.8,"#ff5200"],[.95,"#ff0000"]]},qbe={stops:[[2.8,"#ff0000"],[3.7,"#ff5200"],[4.6,"#ff7a00"],[5.5,"#ff9d00"],[6.4,"#ffbc00"],[7.3,"#ffda00"],[8.2,"#fff700"]]},p7={stops:[[.05,"#fd99ff"],[.2,"#da7ee1"],[.35,"#b964c3"],[.5,"#984ba6"],[.65,"#793389"],[.8,"#5a1a6e"],[.95,"#3d0053"]]},QL={type:"circle",paint:{"circle-stroke-width":.1,"circle-stroke-color":"#262626","circle-opacity":.8}},zb=(e="grey",t=Gbe)=>({...QL,paint:{...QL.paint,"circle-color":e,"circle-radius":["interpolate",["linear"],["zoom"],3,0,10,1,13,t]}}),JL=e=>({type:"symbol",layout:{"icon-image":["coalesce",["image",e],["image","defaultIcon"]],"icon-size":["interpolate",["linear"],["zoom"],3,0,9,.1,13,.5]}}),bS={...zb(),paint:{...zb().paint}},_S={...zb("grey",10),paint:{...zb("grey",10).paint}},m7="#676767",e3={id:"ao",type:"line",source:"ao","source-layer":"public.service_ao",layout:{"line-join":"round","line-cap":"round"},paint:{"line-color":m7,"line-width":1.5,"line-opacity":.8}},t3={id:"rayon",type:"line",source:"rayon","source-layer":"public.service_rayon",layout:{"line-join":"round","line-cap":"round"},paint:{"line-color":m7,"line-width":.5,"line-opacity":.8}},Zbe={id:"selected-region",type:"line",source:"selected-region",layout:{"line-join":"round","line-cap":"round"},paint:{"line-color":"#CC2222","line-width":4}},wS={region:null,prob1__gt:0,prob1__lt:5e3,prob2__gt:0,prob2__lt:5e3,prob3__gt:0,prob3__lt:5e3,prob4__gt:0,prob4__lt:5e3,prob5__gt:0,prob5__lt:5e3,prob6__gt:0,prob6__lt:5e3,cooling_time__gt:0,cooling_time__lt:5e3,priority__gt:0,priority__lt:5e3},Xbe={prob1:[0,5e3],prob2:[0,5e3],prob3:[0,5e3],prob4:[0,5e3],prob5:[0,5e3],prob6:[0,5e3],cooling_time:[0,5e3],priority:[0,5e3]},Ybe=e=>({filters:wS,consumer_filter:null,consumer_ranges:null,source_filter:null,consumer_type:null,energy_class:null,wall_material:null,ranges:Xbe,setConsumerFilter:(t,n)=>e(r=>{if(!t){r.consumer_filter=null;return}const i=n||r.ranges[t];r.consumer_filter={key:t,gt:i[0],lt:i[1]}}),setSourceFilter:(t,n)=>e(r=>{if(!t){r.source_filter=null;return}const i=n||r.ranges[t];r.source_filter={key:t,gt:i[0],lt:i[1]}}),setRegion:t=>e(n=>{n.filters.region=t}),setConsumerType:t=>e(n=>{n.consumer_type=t}),setEnergyClass:t=>e(n=>{n.energy_class=t}),setWallMaterial:t=>e(n=>{n.wall_material=t}),setFilterWithKey:(t,n)=>e(r=>{r.filters[`${n}__gt`]=t[0],r.filters[`${n}__lt`]=t[1]}),setRanges:t=>e(n=>{n.ranges=t}),clear:t=>e(n=>{if(n.consumer_filter=null,n.source_filter=null,n.energy_class=null,n.consumer_type=null,n.wall_material=null,!t)return n.filters=wS,n;n.filters={...wS,prediction:t.prediction}})}),qi=hu(mk(pu(Ybe),{name:"dzkh/filters"})),Qbe=[{value:"category1",title:"Forecasting",selectable:!1,children:[{value:"prob1",title:"No heating in the building"},{value:"prob2",title:"Leaking pipes in the entrance"},{value:"prob3",title:"Apartment temperature below standard"},{value:"prob4",title:"Common area temperature below standard"},{value:"prob5",title:"Leak in the heating system"}]},{value:"category2",title:"Response",selectable:!1,children:[{value:"cooling_time",title:"Cooling time, h"},{value:"priority",title:"Building priority"}]}],Jbe=()=>{const e={};let t=0;for(let n=-25;n<25;n++)e[n]=t,t++;return e},Vi=Jbe(),e_e=()=>{const{consumer_filter:e,consumer_type:t,energy_class:n,wall_material:r}=qi(),{value:i}=ss(),o=Vi[i];return[...(()=>{const a=[];if(e){const u=`${e.key}_${o}`;a.push([">=",["get",u],e.gt],["<=",["get",u],e.lt])}return t&&a.push(["==",["get","potreb_type"],t.value]),n&&a.push(["==",["get","fi_energy_class"],n.value]),r&&a.push(["==",["get","wall_materials"],r.value]),a})()]},t_e=["==",["get","point_type"],Ci.consumer],n_e=()=>{const{isVisible:e}=S1(),{filters:{region:t},consumer_filter:n}=qi(),r=xk(t),i=e_e(),{selectedSourceConfig:o}=Hd(),{value:s}=ss(),a=E.exports.useMemo(()=>n==null?void 0:n.key,[n==null?void 0:n.key]),u=E.exports.useMemo(()=>{if(a)return`${a}_${Vi[s]}`},[a,s]),{data:f,isLoading:p}=gk(u),g=E.exports.useMemo(()=>(f==null?void 0:f.range)||[0,0],[f==null?void 0:f.range]),v=()=>{const P=["all",t_e,...i];return r&&P.push(r),o.sourceId&&P.push(["==",["get","tp_number"],o.sourceId]),P},b=n!=null&&n.key?`${n.key}_${Vi[s]}`:null,_=E.exports.useMemo(()=>n&&n.key.includes("cooling"),[n]),T=E.exports.useMemo(()=>{const P=g[0],D=(g[1]-P)/8;return _?[].concat(Lb.stops).reverse().map((N,z)=>[P+z*D,N[1]]):Lb.stops.map((N,z)=>[P+z*D,N[1]])},[g]),I=b?{...bS.paint,"circle-color":{property:b,stops:T}}:bS.paint;return A(nr,{children:A(ph,{...bS,id:Ci.consumer,source:"points","source-layer":"public.data",layout:{visibility:e[Ci.consumer]?"visible":"none"},filter:v(),paint:I})})},r_e=["==",["get","point_type"],Ci.dispatcher],i_e=()=>{const{isVisible:e}=S1(),{filters:{region:t}}=qi(),n=xk(t),{selectedSourceConfig:r}=Hd(),i=()=>{const o=["all",r_e];return n&&o.push(n),r.sourceId&&o.push(["==",["get","ods_number"],r.dispatcherNumber]),o};return A(nr,{children:A(ph,{type:JL("dispatcherIcon").type,id:Ci.dispatcher,source:"points","source-layer":"public.data",layout:{...JL("dispatcherIcon").layout,visibility:e[Ci.dispatcher]?"visible":"none"},filter:i()})})},o_e=()=>{const{source_filter:e}=qi(),{value:t}=ss(),n=Vi[t];return[...(()=>{if(e){const i=`${e.key}_${n}`;return[[">=",["get",i],e.gt],["<=",["get",i],e.lt]]}return[]})()]},a_e=["==",["get","point_type"],Ci.source],s_e=()=>{const{isVisible:e}=S1(),{filters:{region:t},source_filter:n}=qi(),r=xk(t),i=o_e(),{selectedSourceConfig:o}=Hd(),{value:s}=ss(),a=()=>{const p=["all",a_e,...i];return r&&p.push(r),o.sourceId&&p.push(["==",["get","tp_number"],o.sourceId]),p},u=n!=null&&n.key?`${n.key}_${Vi[s]}`:null,f=u?{..._S.paint,"circle-color":{property:u,stops:p7.stops}}:_S.paint;return A(nr,{children:A(ph,{..._S,id:Ci.source,source:"points","source-layer":"public.data",layout:{visibility:e[Ci.source]?"visible":"none"},filter:a(),paint:f})})},l_e=()=>{const{updateCounter:e}=h7();return A(nr,{children:it(eb,{id:"points",type:"vector",tiles:[`${Nb}/martin/public.data/{z}/{x}/{y}.pbf`],children:[A(s_e,{}),A(n_e,{}),A(i_e,{})]},`points-${e}`)})},c_e=({data:e})=>A(eb,{id:"selected-region",type:"geojson",data:e,children:A(ph,{...Zbe})}),u_e=()=>{const{filters:{region:e}}=qi();return e!=null&&e.geometry?A(c_e,{data:e.geometry}):null},d_e=()=>it(nr,{children:[A(eb,{id:"ao",type:"vector",tiles:[`${Nb}/martin/public.service_ao/{z}/{x}/{y}.pbf`],children:A(ph,{...e3,layout:{...e3.layout}})}),A(eb,{id:"rayon",type:"vector",tiles:[`${Nb}/martin/public.service_rayon/{z}/{x}/{y}.pbf`],children:A(ph,{...t3,layout:{...t3.layout}})}),A(u_e,{}),A(l_e,{})]}),g7="/assets/circle.48dd350a.svg",CS=({color:e,imageSrc:t,name:n,border:r})=>it("div",{className:"flex gap-2 items-center",children:[t&&A(Tae,{src:t,width:18,height:18,className:"flex items-center",preview:!1}),e&&!t&&A("span",{className:"w-4 h-[100%] flex items-center justify-center",children:A("span",{className:`rounded-xl w-3 h-3 inline-block ${r&&"border-black border-[1px] border-solid"}`,style:{backgroundColor:e}})}),A("span",{className:"text-xs text-grey",children:n})]}),n3=({colors:e,name:t,desc:n})=>it("div",{children:[A("span",{className:"text-xs text-grey",children:t}),A("div",{className:"w-[200px]",children:A("div",{className:"w-full h-[10px] rounded-xl",style:{background:`linear-gradient(to right, ${e.join(",")})`}})}),it("span",{className:"text-xs text-grey italic",children:[n," \u2192"]})]});Lb.stops.map(e=>e[1]);const f_e=p7.stops.map(e=>e[1]);function h_e(){const{toggleVisibility:e,isVisible:t}=S1(),{consumer_filter:n,source_filter:r}=qi(),i=E.exports.useMemo(()=>n&&n.key.includes("cooling"),[n]),o=E.exports.useMemo(()=>i?qbe.stops.map(s=>s[1]):Lb.stops.map(s=>s[1]),[i]);return A("div",{className:"absolute bottom-[20px] right-[20px] text-xs text-grey z-10 bg-white-background rounded-xl p-3 space-y-3",children:A("div",{children:it("div",{className:"space-y-2 flex flex-col",children:[A(Gm,{className:"!ml-0",onChange:()=>e(Ci.consumer),checked:t[Ci.consumer],children:n?A(n3,{colors:o,name:"Consumer",desc:n.key.includes("prob")?"failure likelihood":n.key.includes("cooling_time")?"cooling time, h":"building priority"}):A(CS,{name:"Consumer"})}),A(Gm,{className:"!ml-0",onChange:()=>e(Ci.source),checked:t[Ci.source],children:r?A(n3,{colors:f_e,name:"Source",desc:"failure likelihood"}):A(CS,{name:"Source"})}),A(Gm,{className:"!ml-0 flex items-center",onChange:()=>e(Ci.dispatcher),checked:t[Ci.dispatcher],children:A(CS,{name:"Dispatch center",imageSrc:g7})})]})})})}const Nl=({value:e})=>A("span",{className:"text-grey text-xs bg-white-background-light",children:e}),r3=(e,t)=>{if(Array.isArray(t)){const[n,r]=t;return{...e,[n]:A(Nl,{value:n}),[r]:A(Nl,{value:r})}}else return{...e,[t]:A(Nl,{value:t})}},bk=({title:e,value:t,onChange:n,onAfterChange:r,min:i=0,max:o=100,range:s=!1,step:a=1,disabled:u=!1,onMouseEnter:f,onMouseLeave:p,showZeroMark:g=!1})=>{const v={[i]:A(Nl,{value:i}),[o]:A(Nl,{value:o})},[b,_]=E.exports.useState(t),[T,I]=E.exports.useState(r3(v,t));E.exports.useEffect(()=>{_(t),I(r3(v,t))},[t]);const P=N=>{if(Array.isArray(N)){const[z,$]=N;I({...v,[z]:A(Nl,{value:z}),[$]:A(Nl,{value:$})})}else I({...v,[N]:A(Nl,{value:N})});r==null||r(N)},M=N=>{_(N),n==null||n(N)},D=g?{...T,0:A(Nl,{value:0})}:T;return it("div",{onMouseEnter:f,onMouseLeave:p,children:[A(ul,{text:e}),A(Sle,{range:s,value:b,marks:D,onChange:M,onAfterChange:P,min:i,max:o,step:a,disabled:u})]})},p_e=({disabled:e,fullRange:t,isLoading:n})=>{const{value:r,setValue:i,range:o}=ss();return n?A("div",{className:"flex justify-center items-center",children:A(uv,{})}):A("div",{className:"absolute w-[200px] top-[20px] right-[20px] text-xs text-grey z-10 bg-white-background rounded-xl p-3 space-y-3",children:A(bk,{title:"Outdoor air temperature",value:r,onAfterChange:i,min:o[0],max:o[1]})})},i3=[{name:"dispatcherIcon",url:g7}];function m_e(e,t,n){n===void 0&&(n={});var r={type:"Feature"};return(n.id===0||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=t||{},r.geometry=e,r}function g_e(e,t,n){n===void 0&&(n={});for(var r=0,i=e;r<i.length;r++){var o=i[r];if(o.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var s=0;s<o[o.length-1].length;s++)if(o[o.length-1][s]!==o[0][s])throw new Error("First and last Position are not equivalent.")}var a={type:"Polygon",coordinates:e};return m_e(a,t,n)}function v7(e,t,n){if(e!==null)for(var r,i,o,s,a,u,f,p=0,g=0,v,b=e.type,_=b==="FeatureCollection",T=b==="Feature",I=_?e.features.length:1,P=0;P<I;P++){f=_?e.features[P].geometry:T?e.geometry:e,v=f?f.type==="GeometryCollection":!1,a=v?f.geometries.length:1;for(var M=0;M<a;M++){var D=0,N=0;if(s=v?f.geometries[M]:f,s!==null){u=s.coordinates;var z=s.type;switch(p=n&&(z==="Polygon"||z==="MultiPolygon")?1:0,z){case null:break;case"Point":if(t(u,g,P,D,N)===!1)return!1;g++,D++;break;case"LineString":case"MultiPoint":for(r=0;r<u.length;r++){if(t(u[r],g,P,D,N)===!1)return!1;g++,z==="MultiPoint"&&D++}z==="LineString"&&D++;break;case"Polygon":case"MultiLineString":for(r=0;r<u.length;r++){for(i=0;i<u[r].length-p;i++){if(t(u[r][i],g,P,D,N)===!1)return!1;g++}z==="MultiLineString"&&D++,z==="Polygon"&&N++}z==="Polygon"&&D++;break;case"MultiPolygon":for(r=0;r<u.length;r++){for(N=0,i=0;i<u[r].length;i++){for(o=0;o<u[r][i].length-p;o++){if(t(u[r][i][o],g,P,D,N)===!1)return!1;g++}N++}D++}break;case"GeometryCollection":for(r=0;r<s.geometries.length;r++)if(v7(s.geometries[r],t,n)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function wP(e){var t=[1/0,1/0,-1/0,-1/0];return v7(e,function(n){t[0]>n[0]&&(t[0]=n[0]),t[1]>n[1]&&(t[1]=n[1]),t[2]<n[0]&&(t[2]=n[0]),t[3]<n[1]&&(t[3]=n[1])}),t}wP.default=wP;var xv={exports:{}};xv.exports=y7;xv.exports.parse=y7;xv.exports.stringify=x7;var o3=/[-+]?([0-9]*\.[0-9]+|[0-9]+)([eE][-+]?[0-9]+)?/,a3=new RegExp("^"+o3.source+"(\\s"+o3.source+"){1,}");function y7(e){var t=e.split(";"),n=t.pop(),r=(t.shift()||"").split("=").pop(),i=0;function o(M){var D=n.substring(i).match(M);return D?(i+=D[0].length,D[0]):null}function s(M){return M&&r.match(/\d+/)&&(M.crs={type:"name",properties:{name:"urn:ogc:def:crs:EPSG::"+r}}),M}function a(){o(/^\s*/)}function u(){a();for(var M=0,D=[],N=[D],z=D,$;$=o(/^(\()/)||o(/^(\))/)||o(/^(,)/)||o(a3);){if($==="(")N.push(z),z=[],N[N.length-1].push(z),M++;else if($===")"){if(z.length===0||(z=N.pop(),!z))return null;if(M--,M===0)break}else if($===",")z=[],N[N.length-1].push(z);else if(!$.split(/\s/g).some(isNaN))Array.prototype.push.apply(z,$.split(/\s/g).map(parseFloat));else return null;a()}return M!==0?null:D}function f(){for(var M=[],D,N;N=o(a3)||o(/^(,)/);)N===","?(M.push(D),D=[]):N.split(/\s/g).some(isNaN)||(D||(D=[]),Array.prototype.push.apply(D,N.split(/\s/g).map(parseFloat))),a();if(D)M.push(D);else return null;return M.length?M:null}function p(){if(!o(/^(point(\sz)?)/i)||(a(),!o(/^(\()/)))return null;var M=f();return!M||(a(),!o(/^(\))/))?null:{type:"Point",coordinates:M[0]}}function g(){if(!o(/^(multipoint)/i))return null;a();var M=n.substring(n.indexOf("(")+1,n.length-1).replace(/\(/g,"").replace(/\)/g,"");n="MULTIPOINT ("+M+")";var D=u();return D?(a(),{type:"MultiPoint",coordinates:D}):null}function v(){if(!o(/^(multilinestring)/i))return null;a();var M=u();return M?(a(),{type:"MultiLineString",coordinates:M}):null}function b(){if(!o(/^(linestring(\sz)?)/i)||(a(),!o(/^(\()/)))return null;var M=f();return!M||!o(/^(\))/)?null:{type:"LineString",coordinates:M}}function _(){if(!o(/^(polygon(\sz)?)/i))return null;a();var M=u();return M?{type:"Polygon",coordinates:M}:null}function T(){if(!o(/^(multipolygon)/i))return null;a();var M=u();return M?{type:"MultiPolygon",coordinates:M}:null}function I(){var M=[],D;if(!o(/^(geometrycollection)/i)||(a(),!o(/^(\()/)))return null;for(;D=P();)M.push(D),a(),o(/^(,)/),a();return o(/^(\))/)?{type:"GeometryCollection",geometries:M}:null}function P(){return p()||b()||_()||g()||v()||T()||I()}return s(P())}function x7(e){e.type==="Feature"&&(e=e.geometry);function t(s){return s.join(" ")}function n(s){return s.map(t).join(", ")}function r(s){return s.map(n).map(o).join(", ")}function i(s){return s.map(r).map(o).join(", ")}function o(s){return"("+s+")"}switch(e.type){case"Point":return"POINT ("+t(e.coordinates)+")";case"LineString":return"LINESTRING ("+n(e.coordinates)+")";case"Polygon":return"POLYGON ("+r(e.coordinates)+")";case"MultiPoint":return"MULTIPOINT ("+n(e.coordinates)+")";case"MultiPolygon":return"MULTIPOLYGON ("+i(e.coordinates)+")";case"MultiLineString":return"MULTILINESTRING ("+r(e.coordinates)+")";case"GeometryCollection":return"GEOMETRYCOLLECTION ("+e.geometries.map(x7).join(", ")+")";default:throw new Error("stringify requires a valid GeoJSON Feature or geometry object as input")}}const{TreeNode:s3}=f1,v_e=e=>e.reduce((t,n)=>(t[n.name]=n,t[n.name].type="ao",n.rayons&&n.rayons.forEach(r=>{t[r.name]=r,t[r.name].type="rayon"}),t),{}),_k=()=>tc(["regions"],async()=>{const{data:e}=await as.get("/api/ao_rayons/");return e},{select:e=>({raw:e,normalized:v_e(e)}),refetchOnWindowFocus:!1,refetchOnMount:!1}),y_e=({disabled:e,value:t,onChange:n})=>{const{map:r}=B5(),{data:i,isInitialLoading:o}=_k();return it("div",{children:[A(ul,{text:"District / area"}),A(f1,{showSearch:!0,style:{width:"100%"},value:t,dropdownStyle:{maxHeight:400,overflow:"auto"},placeholder:"Select district or area",allowClear:!0,treeDefaultExpandAll:!1,onChange:u=>{if(!u)return;const f=i.normalized[u],p=xv.exports(f.polygon),g=g_e(p.coordinates[0]),v=wP(g);n({id:f.name,geometry:g,type:f.type}),r.fitBounds([[v[0],v[1]],[v[2],v[3]]],{padding:20})},loading:o,treeNodeFilterProp:"title",onClear:()=>n(null),notFoundContent:A(Ys,{image:Ys.PRESENTED_IMAGE_SIMPLE,description:"Not found"}),disabled:e,children:i==null?void 0:i.raw.map(u=>{var f;return A(s3,{value:u.name,title:u.name,children:(f=u.rayons)==null?void 0:f.map(p=>A(s3,{value:p.name,title:p.name},p.name))},u.name)})})]})},x_e=({disabled:e})=>{const{consumer_filter:t,setConsumerFilter:n}=qi();return it("div",{children:[A(ul,{text:"Consumer parameter"}),A(f1,{mode:"tags",style:{width:"100%"},placeholder:"Select parameter",onChange:r=>n(r),treeData:Qbe,allowClear:!0,value:t==null?void 0:t.key,disabled:e,treeDefaultExpandAll:!0})]})},b_e=({disabled:e,isLoading:t})=>{const{consumer_filter:n,setConsumerFilter:r}=qi(),i=E.exports.useMemo(()=>n==null?void 0:n.key,[n==null?void 0:n.key]),o=E.exports.useMemo(()=>{if(!i)return[0,0];const v=n.gt,b=n.lt;return[v,b]},[n,i]),{value:s}=ss(),a=E.exports.useMemo(()=>{if(i)return`${i}_${Vi[s]}`},[i,s]),{data:u,isLoading:f}=gk(a),p=E.exports.useMemo(()=>(u==null?void 0:u.range)||[0,0],[u==null?void 0:u.range]),g=v=>r(i,v);return t||f?A("div",{className:"flex justify-center items-center",children:A(uv,{})}):A(nr,{children:n&&p&&A(bk,{title:i.includes("prob")?"Failure likelihood":i.includes("cooling_time")?"Cooling time, h":"Building priority",value:[o[0],o[1]],onAfterChange:g,min:p[0],max:p[1],range:!0,step:.01,disabled:e})})},__e=[{value:"prob6",label:"TP failure"}],w_e=({disabled:e})=>{const{source_filter:t,setSourceFilter:n}=qi();return it("div",{children:[A(ul,{text:"Source parameter"}),A(f1,{mode:"tags",style:{width:"100%"},placeholder:"Select parameter",onChange:r=>n(r),treeData:__e,allowClear:!0,value:t==null?void 0:t.key,disabled:e,treeDefaultExpandAll:!0})]})},C_e=({disabled:e,isLoading:t})=>{const{source_filter:n,setSourceFilter:r}=qi(),i=E.exports.useMemo(()=>n==null?void 0:n.key,[n==null?void 0:n.key]),o=E.exports.useMemo(()=>{if(!i)return[0,0];const v=n.gt,b=n.lt;return[v,b]},[n,i]),{value:s}=ss(),a=E.exports.useMemo(()=>{if(i)return`${i}_${Vi[s]}`},[i,s]),{data:u,isLoading:f}=gk(a),p=E.exports.useMemo(()=>(u==null?void 0:u.range)||[0,0],[u==null?void 0:u.range]),g=v=>r(i,v);return t?A("div",{className:"flex justify-center items-center",children:A(uv,{})}):A(nr,{children:n&&p&&A(bk,{title:"Filter by parameter",value:[o[0],o[1]],onAfterChange:g,min:p[0],max:p[1],range:!0,step:.01,disabled:e})})},S_e="potreb_type",E_e={living_house:"Residential building",soc_object:"Social facility"},P_e=({disabled:e})=>{const{consumer_type:t,setConsumerType:n}=qi(),{data:r,isLoading:i}=vk(S_e),o=E.exports.useMemo(()=>r?r==null?void 0:r.filter(Boolean).map(s=>({value:s,label:E_e[s]})):[],[r]);return it("div",{children:[A(ul,{text:"Consumer type"}),A(Vd,{style:{width:"100%"},placeholder:"Select type",onChange:(s,a)=>n(a),options:o,allowClear:!0,value:t,disabled:e})]})},T_e="fi_energy_class",I_e=({disabled:e})=>{const{energy_class:t,setEnergyClass:n}=qi(),{data:r,isLoading:i}=vk(T_e),o=E.exports.useMemo(()=>r?r==null?void 0:r.filter(Boolean).map(s=>({value:s,label:s})):[],[r]);return it("div",{children:[A(ul,{text:"Energy efficiency class"}),A(Vd,{style:{width:"100%"},placeholder:"Select type",onChange:(s,a)=>n(a),options:o,allowClear:!0,value:t,disabled:e})]})},k_e="wall_materials",M_e=({disabled:e})=>{const{wall_material:t,setWallMaterial:n}=qi(),{data:r,isLoading:i}=vk(k_e),o=E.exports.useMemo(()=>r?r==null?void 0:r.filter(Boolean).map(s=>({value:s,label:s})):[],[r]);return it("div",{children:[A(ul,{text:"Wall material"}),A(Vd,{style:{width:"100%"},placeholder:"Select type",onChange:(s,a)=>n(a),options:o,allowClear:!0,value:t,disabled:e})]})},R_e=()=>{const{clear:e,consumer_filter:t,source_filter:n}=qi();return it("div",{className:"flex flex-col flex-1",children:[it("div",{className:"space-y-5",children:[A(x_e,{}),A(b_e,{}),A(w_e,{}),A(C_e,{}),A(P_e,{}),A(I_e,{}),A(M_e,{})]}),(t||n)&&A("div",{className:"flex items-center justify-end pt-4",children:A("div",{className:"flex gap-2",children:A(Yr,{onClick:()=>e(),type:"secondary",children:"Reset filters"})})})]})},O_e="/assets/dzkh_logo.bd091fb4.png",D_e="/assets/dit_logo.d7458a9f.png",A_e=E.exports.forwardRef(({isCollapsed:e},t)=>{var i;const{filters:n,setRegion:r}=qi();return A("div",{className:Td("h-screen p-3 overflow-y-auto shrink-0 border-solid border-border border-0 border-r-[1px] flex flex-col transition-all",e?"basis-0 px-0 -translate-x-[320px]":"basis-[320px]"),ref:t,children:A("div",{className:"flex flex-col flex-1",children:it("div",{className:"space-y-5",children:[it("div",{className:"flex flex-row gap-1 justify-between items-center",children:[A("img",{width:"48%",height:50,src:O_e,alt:"logo"}),A("img",{width:"48%",height:50,src:D_e,alt:"logo"})]}),A(y_e,{value:(i=n.region)==null?void 0:i.id,onChange:r}),A(R_e,{})]})})})});const N_e=e=>({clickedPointConfig:null,setClickedPointConfig:(t,n=!1)=>{e(r=>{if(t===null)return r.clickedPointConfig=null,r;r.clickedPointConfig={id:t,shouldSelect:n}})}}),bv=hu(pu(N_e));let l3=e=>typeof e=="object"&&e!=null&&e.nodeType===1,c3=(e,t)=>(!t||e!=="hidden")&&e!=="visible"&&e!=="clip",SS=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){let n=getComputedStyle(e,null);return c3(n.overflowY,t)||c3(n.overflowX,t)||(r=>{let i=(o=>{if(!o.ownerDocument||!o.ownerDocument.defaultView)return null;try{return o.ownerDocument.defaultView.frameElement}catch{return null}})(r);return!!i&&(i.clientHeight<r.scrollHeight||i.clientWidth<r.scrollWidth)})(e)}return!1},Sx=(e,t,n,r,i,o,s,a)=>o<e&&s>t||o>e&&s<t?0:o<=e&&a<=n||s>=t&&a>=n?o-e-r:s>t&&a<n||o<e&&a>n?s-t+i:0,L_e=e=>{let t=e.parentElement;return t==null?e.getRootNode().host||null:t},u3=(e,t)=>{var n,r,i,o;if(typeof document>"u")return[];let{scrollMode:s,block:a,inline:u,boundary:f,skipOverflowHiddenElements:p}=t,g=typeof f=="function"?f:Z=>Z!==f;if(!l3(e))throw new TypeError("Invalid target");let v=document.scrollingElement||document.documentElement,b=[],_=e;for(;l3(_)&&g(_);){if(_=L_e(_),_===v){b.push(_);break}_!=null&&_===document.body&&SS(_)&&!SS(document.documentElement)||_!=null&&SS(_,p)&&b.push(_)}let T=(r=(n=window.visualViewport)==null?void 0:n.width)!=null?r:innerWidth,I=(o=(i=window.visualViewport)==null?void 0:i.height)!=null?o:innerHeight,{scrollX:P,scrollY:M}=window,{height:D,width:N,top:z,right:$,bottom:j,left:U}=e.getBoundingClientRect(),q=a==="start"||a==="nearest"?z:a==="end"?j:z+D/2,Y=u==="center"?U+N/2:u==="end"?$:U,te=[];for(let Z=0;Z<b.length;Z++){let X=b[Z],{height:J,width:ue,top:re,right:se,bottom:oe,left:he}=X.getBoundingClientRect();if(s==="if-needed"&&z>=0&&U>=0&&j<=I&&$<=T&&z>=re&&j<=oe&&U>=he&&$<=se)return te;let Ce=getComputedStyle(X),Se=parseInt(Ce.borderLeftWidth,10),be=parseInt(Ce.borderTopWidth,10),Re=parseInt(Ce.borderRightWidth,10),Ie=parseInt(Ce.borderBottomWidth,10),Me=0,Ae=0,ze="offsetWidth"in X?X.offsetWidth-X.clientWidth-Se-Re:0,Ke="offsetHeight"in X?X.offsetHeight-X.clientHeight-be-Ie:0,Ue="offsetWidth"in X?X.offsetWidth===0?0:ue/X.offsetWidth:0,pt="offsetHeight"in X?X.offsetHeight===0?0:J/X.offsetHeight:0;if(v===X)Me=a==="start"?q:a==="end"?q-I:a==="nearest"?Sx(M,M+I,I,be,Ie,M+q,M+q+D,D):q-I/2,Ae=u==="start"?Y:u==="center"?Y-T/2:u==="end"?Y-T:Sx(P,P+T,T,Se,Re,P+Y,P+Y+N,N),Me=Math.max(0,Me+M),Ae=Math.max(0,Ae+P);else{Me=a==="start"?q-re-be:a==="end"?q-oe+Ie+Ke:a==="nearest"?Sx(re,oe,J,be,Ie+Ke,q,q+D,D):q-(re+J/2)+Ke/2,Ae=u==="start"?Y-he-Se:u==="center"?Y-(he+ue/2)+ze/2:u==="end"?Y-se+Re+ze:Sx(he,se,ue,Se,Re+ze,Y,Y+N,N);let{scrollLeft:gt,scrollTop:Ot}=X;Me=Math.max(0,Math.min(Ot+Me/pt,X.scrollHeight-J/pt+Ke)),Ae=Math.max(0,Math.min(gt+Ae/Ue,X.scrollWidth-ue/Ue+ze)),q+=Ot-Me,Y+=gt-Ae}te.push({el:X,top:Me,left:Ae})}return te},z_e=e=>typeof e=="object"&&typeof e.behavior=="function",F_e=e=>e===!1?{block:"end",inline:"nearest"}:(t=>t===Object(t)&&Object.keys(t).length!==0)(e)?e:{block:"start",inline:"nearest"};function $_e(e,t){if(!e.isConnected||!e.ownerDocument.documentElement.contains(e))return;if(z_e(t))return t.behavior(u3(e,t));let n=typeof t=="boolean"||t==null?void 0:t.behavior;for(let{el:r,top:i,left:o}of u3(e,F_e(t)))r.scroll({top:i,left:o,behavior:n})}const B_e=e=>{ZU("data.csv",e)},V_e=({provider:e})=>{const[t,n]=E.exports.useState(!1);return e(t,()=>n(!1)),A(ka,{title:"Download data",children:A(Yr,{onClick:i=>{i.stopPropagation(),n(!0)},loading:t,disabled:t,children:A(Tbe,{})})})},U_e={isOpened:!1,fullScreen:!1},j_e=e=>({tableState:U_e,toggleOpened:t=>{e(n=>{n.tableState.isOpened=t[0]==="opened"})},toggleFullScreen:()=>{e(t=>{t.tableState.fullScreen=!t.tableState.fullScreen})},openTable:()=>{e(t=>{t.tableState.isOpened=!0})}}),E1=hu(pu(j_e));function CP(e,t){return CP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},CP(e,t)}function b7(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,CP(e,t)}function qn(){return qn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qn.apply(this,arguments)}function Rg(e){return Rg=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},Rg(e)}function H_e(e,t){if(Rg(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Rg(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function K_e(e){var t=H_e(e,"string");return Rg(t)==="symbol"?t:String(t)}function W_e(e,t,n){return t=K_e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function d3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function f3(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?d3(Object(n),!0).forEach(function(r){W_e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Xo(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var h3=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),ES=function(){return Math.random().toString(36).substring(7).split("").join(".")},p3={INIT:"@@redux/INIT"+ES(),REPLACE:"@@redux/REPLACE"+ES(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+ES()}};function G_e(e){if(typeof e!="object"||e===null)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function _7(e,t,n){var r;if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(Xo(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Xo(1));return n(_7)(e,t)}if(typeof e!="function")throw new Error(Xo(2));var i=e,o=t,s=[],a=s,u=!1;function f(){a===s&&(a=s.slice())}function p(){if(u)throw new Error(Xo(3));return o}function g(T){if(typeof T!="function")throw new Error(Xo(4));if(u)throw new Error(Xo(5));var I=!0;return f(),a.push(T),function(){if(!!I){if(u)throw new Error(Xo(6));I=!1,f();var M=a.indexOf(T);a.splice(M,1),s=null}}}function v(T){if(!G_e(T))throw new Error(Xo(7));if(typeof T.type>"u")throw new Error(Xo(8));if(u)throw new Error(Xo(9));try{u=!0,o=i(o,T)}finally{u=!1}for(var I=s=a,P=0;P<I.length;P++){var M=I[P];M()}return T}function b(T){if(typeof T!="function")throw new Error(Xo(10));i=T,v({type:p3.REPLACE})}function _(){var T,I=g;return T={subscribe:function(M){if(typeof M!="object"||M===null)throw new Error(Xo(11));function D(){M.next&&M.next(p())}D();var N=I(D);return{unsubscribe:N}}},T[h3]=function(){return this},T}return v({type:p3.INIT}),r={dispatch:v,subscribe:g,getState:p,replaceReducer:b},r[h3]=_,r}function m3(e,t){return function(){return t(e.apply(this,arguments))}}function g3(e,t){if(typeof e=="function")return m3(e,t);if(typeof e!="object"||e===null)throw new Error(Xo(16));var n={};for(var r in e){var i=e[r];typeof i=="function"&&(n[r]=m3(i,t))}return n}function w7(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.length===0?function(r){return r}:t.length===1?t[0]:t.reduce(function(r,i){return function(){return r(i.apply(void 0,arguments))}})}function q_e(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){return function(){var i=r.apply(void 0,arguments),o=function(){throw new Error(Xo(15))},s={getState:i.getState,dispatch:function(){return o.apply(void 0,arguments)}},a=t.map(function(u){return u(s)});return o=w7.apply(void 0,a)(i.dispatch),f3(f3({},i),{},{dispatch:o})}}}var C7=Un.createContext(null);function Z_e(e){e()}var S7=Z_e,X_e=function(t){return S7=t},Y_e=function(){return S7};function Q_e(){var e=Y_e(),t=null,n=null;return{clear:function(){t=null,n=null},notify:function(){e(function(){for(var i=t;i;)i.callback(),i=i.next})},get:function(){for(var i=[],o=t;o;)i.push(o),o=o.next;return i},subscribe:function(i){var o=!0,s=n={callback:i,next:null,prev:n};return s.prev?s.prev.next=s:t=s,function(){!o||t===null||(o=!1,s.next?s.next.prev=s.prev:n=s.prev,s.prev?s.prev.next=s.next:t=s.next)}}}}var v3={notify:function(){},get:function(){return[]}};function E7(e,t){var n,r=v3;function i(g){return u(),r.subscribe(g)}function o(){r.notify()}function s(){p.onStateChange&&p.onStateChange()}function a(){return Boolean(n)}function u(){n||(n=t?t.addNestedSub(s):e.subscribe(s),r=Q_e())}function f(){n&&(n(),n=void 0,r.clear(),r=v3)}var p={addNestedSub:i,notifyNestedSubs:o,handleChangeWrapper:s,isSubscribed:a,trySubscribe:u,tryUnsubscribe:f,getListeners:function(){return r}};return p}var P7=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?E.exports.useLayoutEffect:E.exports.useEffect;function J_e(e){var t=e.store,n=e.context,r=e.children,i=E.exports.useMemo(function(){var a=E7(t);return{store:t,subscription:a}},[t]),o=E.exports.useMemo(function(){return t.getState()},[t]);P7(function(){var a=i.subscription;return a.onStateChange=a.notifyNestedSubs,a.trySubscribe(),o!==t.getState()&&a.notifyNestedSubs(),function(){a.tryUnsubscribe(),a.onStateChange=null}},[i,o]);var s=n||C7;return A(s.Provider,{value:i,children:r})}function Eh(){return Eh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Eh.apply(this,arguments)}function Fb(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var wk=w_.exports,e1e={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},t1e={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},n1e={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},T7={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Ck={};Ck[wk.ForwardRef]=n1e;Ck[wk.Memo]=T7;function y3(e){return wk.isMemo(e)?T7:Ck[e.$$typeof]||e1e}var r1e=Object.defineProperty,i1e=Object.getOwnPropertyNames,x3=Object.getOwnPropertySymbols,o1e=Object.getOwnPropertyDescriptor,a1e=Object.getPrototypeOf,b3=Object.prototype;function I7(e,t,n){if(typeof t!="string"){if(b3){var r=a1e(t);r&&r!==b3&&I7(e,r,n)}var i=i1e(t);x3&&(i=i.concat(x3(t)));for(var o=y3(e),s=y3(t),a=0;a<i.length;++a){var u=i[a];if(!t1e[u]&&!(n&&n[u])&&!(s&&s[u])&&!(o&&o[u])){var f=o1e(t,u);try{r1e(e,u,f)}catch{}}}}return e}var _3=I7,k7={exports:{}},Kr={};/** @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 P1=60103,T1=60106,_v=60107,wv=60108,Cv=60114,Sv=60109,Ev=60110,Pv=60112,Tv=60113,Sk=60120,Iv=60115,kv=60116,M7=60121,R7=60122,O7=60117,D7=60129,A7=60131;if(typeof Symbol=="function"&&Symbol.for){var co=Symbol.for;P1=co("react.element"),T1=co("react.portal"),_v=co("react.fragment"),wv=co("react.strict_mode"),Cv=co("react.profiler"),Sv=co("react.provider"),Ev=co("react.context"),Pv=co("react.forward_ref"),Tv=co("react.suspense"),Sk=co("react.suspense_list"),Iv=co("react.memo"),kv=co("react.lazy"),M7=co("react.block"),R7=co("react.server.block"),O7=co("react.fundamental"),D7=co("react.debug_trace_mode"),A7=co("react.legacy_hidden")}function Ds(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case P1:switch(e=e.type,e){case _v:case Cv:case wv:case Tv:case Sk:return e;default:switch(e=e&&e.$$typeof,e){case Ev:case Pv:case kv:case Iv:case Sv:return e;default:return t}}case T1:return t}}}var s1e=Sv,l1e=P1,c1e=Pv,u1e=_v,d1e=kv,f1e=Iv,h1e=T1,p1e=Cv,m1e=wv,g1e=Tv;Kr.ContextConsumer=Ev;Kr.ContextProvider=s1e;Kr.Element=l1e;Kr.ForwardRef=c1e;Kr.Fragment=u1e;Kr.Lazy=d1e;Kr.Memo=f1e;Kr.Portal=h1e;Kr.Profiler=p1e;Kr.StrictMode=m1e;Kr.Suspense=g1e;Kr.isAsyncMode=function(){return!1};Kr.isConcurrentMode=function(){return!1};Kr.isContextConsumer=function(e){return Ds(e)===Ev};Kr.isContextProvider=function(e){return Ds(e)===Sv};Kr.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===P1};Kr.isForwardRef=function(e){return Ds(e)===Pv};Kr.isFragment=function(e){return Ds(e)===_v};Kr.isLazy=function(e){return Ds(e)===kv};Kr.isMemo=function(e){return Ds(e)===Iv};Kr.isPortal=function(e){return Ds(e)===T1};Kr.isProfiler=function(e){return Ds(e)===Cv};Kr.isStrictMode=function(e){return Ds(e)===wv};Kr.isSuspense=function(e){return Ds(e)===Tv};Kr.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===_v||e===Cv||e===D7||e===wv||e===Tv||e===Sk||e===A7||typeof e=="object"&&e!==null&&(e.$$typeof===kv||e.$$typeof===Iv||e.$$typeof===Sv||e.$$typeof===Ev||e.$$typeof===Pv||e.$$typeof===O7||e.$$typeof===M7||e[0]===R7)};Kr.typeOf=Ds;(function(e){e.exports=Kr})(k7);var v1e=["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"],y1e=["reactReduxForwardedRef"],x1e=[],b1e=[null,null];function _1e(e,t){var n=e[1];return[t.payload,n+1]}function w3(e,t,n){P7(function(){return e.apply(void 0,t)},n)}function w1e(e,t,n,r,i,o,s){e.current=r,t.current=i,n.current=!1,o.current&&(o.current=null,s())}function C1e(e,t,n,r,i,o,s,a,u,f){if(!!e){var p=!1,g=null,v=function(){if(!p){var T=t.getState(),I,P;try{I=r(T,i.current)}catch(M){P=M,g=M}P||(g=null),I===o.current?s.current||u():(o.current=I,a.current=I,s.current=!0,f({type:"STORE_UPDATED",payload:{error:P}}))}};n.onStateChange=v,n.trySubscribe(),v();var b=function(){if(p=!0,n.tryUnsubscribe(),n.onStateChange=null,g)throw g};return b}}var S1e=function(){return[null,0]};function E1e(e,t){t===void 0&&(t={});var n=t,r=n.getDisplayName,i=r===void 0?function(D){return"ConnectAdvanced("+D+")"}:r,o=n.methodName,s=o===void 0?"connectAdvanced":o,a=n.renderCountProp,u=a===void 0?void 0:a,f=n.shouldHandleStateChanges,p=f===void 0?!0:f,g=n.storeKey,v=g===void 0?"store":g;n.withRef;var b=n.forwardRef,_=b===void 0?!1:b,T=n.context,I=T===void 0?C7:T,P=Fb(n,v1e),M=I;return function(N){var z=N.displayName||N.name||"Component",$=i(z),j=Eh({},P,{getDisplayName:i,methodName:s,renderCountProp:u,shouldHandleStateChanges:p,storeKey:v,displayName:$,wrappedComponentName:z,WrappedComponent:N}),U=P.pure;function q(J){return e(J.dispatch,j)}var Y=U?E.exports.useMemo:function(J){return J()};function te(J){var ue=E.exports.useMemo(function(){var et=J.reactReduxForwardedRef,ct=Fb(J,y1e);return[J.context,et,ct]},[J]),re=ue[0],se=ue[1],oe=ue[2],he=E.exports.useMemo(function(){return re&&re.Consumer&&k7.exports.isContextConsumer(Un.createElement(re.Consumer,null))?re:M},[re,M]),Ce=E.exports.useContext(he),Se=Boolean(J.store)&&Boolean(J.store.getState)&&Boolean(J.store.dispatch);Boolean(Ce)&&Boolean(Ce.store);var be=Se?J.store:Ce.store,Re=E.exports.useMemo(function(){return q(be)},[be]),Ie=E.exports.useMemo(function(){if(!p)return b1e;var et=E7(be,Se?null:Ce.subscription),ct=et.notifyNestedSubs.bind(et);return[et,ct]},[be,Se,Ce]),Me=Ie[0],Ae=Ie[1],ze=E.exports.useMemo(function(){return Se?Ce:Eh({},Ce,{subscription:Me})},[Se,Ce,Me]),Ke=E.exports.useReducer(_1e,x1e,S1e),Ue=Ke[0],pt=Ue[0],gt=Ke[1];if(pt&&pt.error)throw pt.error;var Ot=E.exports.useRef(),qe=E.exports.useRef(oe),Ct=E.exports.useRef(),ot=E.exports.useRef(!1),vt=Y(function(){return Ct.current&&oe===qe.current?Ct.current:Re(be.getState(),oe)},[be,pt,oe]);w3(w1e,[qe,Ot,ot,oe,vt,Ct,Ae]),w3(C1e,[p,be,Me,Re,qe,Ot,ot,Ct,Ae,gt],[be,Me,Re]);var yt=E.exports.useMemo(function(){return A(N,{...vt,ref:se})},[se,N,vt]),Tt=E.exports.useMemo(function(){return p?A(he.Provider,{value:ze,children:yt}):yt},[he,yt,ze]);return Tt}var Z=U?Un.memo(te):te;if(Z.WrappedComponent=N,Z.displayName=te.displayName=$,_){var X=Un.forwardRef(function(ue,re){return A(Z,{...ue,reactReduxForwardedRef:re})});return X.displayName=$,X.WrappedComponent=N,_3(X,N)}return _3(Z,N)}}function C3(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function PS(e,t){if(C3(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var i=0;i<n.length;i++)if(!Object.prototype.hasOwnProperty.call(t,n[i])||!C3(e[n[i]],t[n[i]]))return!1;return!0}function P1e(e,t){var n={},r=function(s){var a=e[s];typeof a=="function"&&(n[s]=function(){return t(a.apply(void 0,arguments))})};for(var i in e)r(i);return n}function Ek(e){return function(n,r){var i=e(n,r);function o(){return i}return o.dependsOnOwnProps=!1,o}}function S3(e){return e.dependsOnOwnProps!==null&&e.dependsOnOwnProps!==void 0?Boolean(e.dependsOnOwnProps):e.length!==1}function N7(e,t){return function(r,i){i.displayName;var o=function(a,u){return o.dependsOnOwnProps?o.mapToProps(a,u):o.mapToProps(a)};return o.dependsOnOwnProps=!0,o.mapToProps=function(a,u){o.mapToProps=e,o.dependsOnOwnProps=S3(e);var f=o(a,u);return typeof f=="function"&&(o.mapToProps=f,o.dependsOnOwnProps=S3(f),f=o(a,u)),f},o}}function T1e(e){return typeof e=="function"?N7(e):void 0}function I1e(e){return e?void 0:Ek(function(t){return{dispatch:t}})}function k1e(e){return e&&typeof e=="object"?Ek(function(t){return P1e(e,t)}):void 0}const M1e=[T1e,I1e,k1e];function R1e(e){return typeof e=="function"?N7(e):void 0}function O1e(e){return e?void 0:Ek(function(){return{}})}const D1e=[R1e,O1e];function A1e(e,t,n){return Eh({},n,e,t)}function N1e(e){return function(n,r){r.displayName;var i=r.pure,o=r.areMergedPropsEqual,s=!1,a;return function(f,p,g){var v=e(f,p,g);return s?(!i||!o(v,a))&&(a=v):(s=!0,a=v),a}}}function L1e(e){return typeof e=="function"?N1e(e):void 0}function z1e(e){return e?void 0:function(){return A1e}}const F1e=[L1e,z1e];var $1e=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function B1e(e,t,n,r){return function(o,s){return n(e(o,s),t(r,s),s)}}function V1e(e,t,n,r,i){var o=i.areStatesEqual,s=i.areOwnPropsEqual,a=i.areStatePropsEqual,u=!1,f,p,g,v,b;function _(D,N){return f=D,p=N,g=e(f,p),v=t(r,p),b=n(g,v,p),u=!0,b}function T(){return g=e(f,p),t.dependsOnOwnProps&&(v=t(r,p)),b=n(g,v,p),b}function I(){return e.dependsOnOwnProps&&(g=e(f,p)),t.dependsOnOwnProps&&(v=t(r,p)),b=n(g,v,p),b}function P(){var D=e(f,p),N=!a(D,g);return g=D,N&&(b=n(g,v,p)),b}function M(D,N){var z=!s(N,p),$=!o(D,f,N,p);return f=D,p=N,z&&$?T():z?I():$?P():b}return function(N,z){return u?M(N,z):_(N,z)}}function U1e(e,t){var n=t.initMapStateToProps,r=t.initMapDispatchToProps,i=t.initMergeProps,o=Fb(t,$1e),s=n(e,o),a=r(e,o),u=i(e,o),f=o.pure?V1e:B1e;return f(s,a,u,e,o)}var j1e=["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"];function TS(e,t,n){for(var r=t.length-1;r>=0;r--){var i=t[r](e);if(i)return i}return function(o,s){throw new Error("Invalid value of type "+typeof e+" for "+n+" argument when connecting component "+s.wrappedComponentName+".")}}function H1e(e,t){return e===t}function K1e(e){var t=e===void 0?{}:e,n=t.connectHOC,r=n===void 0?E1e:n,i=t.mapStateToPropsFactories,o=i===void 0?D1e:i,s=t.mapDispatchToPropsFactories,a=s===void 0?M1e:s,u=t.mergePropsFactories,f=u===void 0?F1e:u,p=t.selectorFactory,g=p===void 0?U1e:p;return function(b,_,T,I){I===void 0&&(I={});var P=I,M=P.pure,D=M===void 0?!0:M,N=P.areStatesEqual,z=N===void 0?H1e:N,$=P.areOwnPropsEqual,j=$===void 0?PS:$,U=P.areStatePropsEqual,q=U===void 0?PS:U,Y=P.areMergedPropsEqual,te=Y===void 0?PS:Y,Z=Fb(P,j1e),X=TS(b,o,"mapStateToProps"),J=TS(_,a,"mapDispatchToProps"),ue=TS(T,f,"mergeProps");return r(g,Eh({methodName:"connect",getDisplayName:function(se){return"Connect("+se+")"},shouldHandleStateChanges:Boolean(b),initMapStateToProps:X,initMapDispatchToProps:J,initMergeProps:ue,pure:D,areStatesEqual:z,areOwnPropsEqual:j,areStatePropsEqual:q,areMergedPropsEqual:te},Z))}}const L7=K1e();X_e(al.exports.unstable_batchedUpdates);function W1e(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function z7(e,t){var n=E.exports.useState(function(){return{inputs:t,result:e()}})[0],r=E.exports.useRef(!0),i=E.exports.useRef(n),o=r.current||Boolean(t&&i.current.inputs&&W1e(t,i.current.inputs)),s=o?i.current:{inputs:t,result:e()};return E.exports.useEffect(function(){r.current=!1,i.current=s},[s]),s.result}function G1e(e,t){return z7(function(){return e},t)}var yr=z7,Dn=G1e,q1e=!0,IS="Invariant failed";function Z1e(e,t){if(!e){if(q1e)throw new Error(IS);var n=typeof t=="function"?t():t,r=n?"".concat(IS,": ").concat(n):IS;throw new Error(r)}}var Ps=function(t){var n=t.top,r=t.right,i=t.bottom,o=t.left,s=r-o,a=i-n,u={top:n,right:r,bottom:i,left:o,width:s,height:a,x:o,y:n,center:{x:(r+o)/2,y:(i+n)/2}};return u},Pk=function(t,n){return{top:t.top-n.top,left:t.left-n.left,bottom:t.bottom+n.bottom,right:t.right+n.right}},E3=function(t,n){return{top:t.top+n.top,left:t.left+n.left,bottom:t.bottom-n.bottom,right:t.right-n.right}},X1e=function(t,n){return{top:t.top+n.y,left:t.left+n.x,bottom:t.bottom+n.y,right:t.right+n.x}},kS={top:0,right:0,bottom:0,left:0},Tk=function(t){var n=t.borderBox,r=t.margin,i=r===void 0?kS:r,o=t.border,s=o===void 0?kS:o,a=t.padding,u=a===void 0?kS:a,f=Ps(Pk(n,i)),p=Ps(E3(n,s)),g=Ps(E3(p,u));return{marginBox:f,borderBox:Ps(n),paddingBox:p,contentBox:g,margin:i,border:s,padding:u}},Ka=function(t){var n=t.slice(0,-2),r=t.slice(-2);if(r!=="px")return 0;var i=Number(n);return isNaN(i)&&Z1e(!1),i},Y1e=function(){return{x:window.pageXOffset,y:window.pageYOffset}},$b=function(t,n){var r=t.borderBox,i=t.border,o=t.margin,s=t.padding,a=X1e(r,n);return Tk({borderBox:a,border:i,margin:o,padding:s})},Bb=function(t,n){return n===void 0&&(n=Y1e()),$b(t,n)},F7=function(t,n){var r={top:Ka(n.marginTop),right:Ka(n.marginRight),bottom:Ka(n.marginBottom),left:Ka(n.marginLeft)},i={top:Ka(n.paddingTop),right:Ka(n.paddingRight),bottom:Ka(n.paddingBottom),left:Ka(n.paddingLeft)},o={top:Ka(n.borderTopWidth),right:Ka(n.borderRightWidth),bottom:Ka(n.borderBottomWidth),left:Ka(n.borderLeftWidth)};return Tk({borderBox:t,margin:r,padding:i,border:o})},$7=function(t){var n=t.getBoundingClientRect(),r=window.getComputedStyle(t);return F7(n,r)},P3=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function Q1e(e,t){return!!(e===t||P3(e)&&P3(t))}function J1e(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!Q1e(e[n],t[n]))return!1;return!0}function ro(e,t){t===void 0&&(t=J1e);var n,r=[],i,o=!1;function s(){for(var a=[],u=0;u<arguments.length;u++)a[u]=arguments[u];return o&&n===this&&t(a,r)||(i=e.apply(this,a),o=!0,n=this,r=a),i}return s}var ewe=function(t){var n=[],r=null,i=function(){for(var s=arguments.length,a=new Array(s),u=0;u<s;u++)a[u]=arguments[u];n=a,!r&&(r=requestAnimationFrame(function(){r=null,t.apply(void 0,n)}))};return i.cancel=function(){!r||(cancelAnimationFrame(r),r=null)},i};const Og=ewe;function B7(e,t){}B7.bind(null,"warn");B7.bind(null,"error");function Qc(){}function twe(e,t){return qn({},e,{},t)}function Ja(e,t,n){var r=t.map(function(i){var o=twe(n,i.options);return e.addEventListener(i.eventName,i.fn,o),function(){e.removeEventListener(i.eventName,i.fn,o)}});return function(){r.forEach(function(o){o()})}}var nwe="Invariant failed";function Vb(e){this.message=e}Vb.prototype.toString=function(){return this.message};function rn(e,t){if(!e)throw new Vb(nwe)}var rwe=function(e){b7(t,e);function t(){for(var r,i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return r=e.call.apply(e,[this].concat(o))||this,r.callbacks=null,r.unbind=Qc,r.onWindowError=function(a){var u=r.getCallbacks();u.isDragging()&&u.tryAbort();var f=a.error;f instanceof Vb&&a.preventDefault()},r.getCallbacks=function(){if(!r.callbacks)throw new Error("Unable to find AppCallbacks in <ErrorBoundary/>");return r.callbacks},r.setCallbacks=function(a){r.callbacks=a},r}var n=t.prototype;return n.componentDidMount=function(){this.unbind=Ja(window,[{eventName:"error",fn:this.onWindowError}])},n.componentDidCatch=function(i){if(i instanceof Vb){this.setState({});return}throw i},n.componentWillUnmount=function(){this.unbind()},n.render=function(){return this.props.children(this.setCallbacks)},t}(Un.Component),iwe=`
Press space bar to start a drag.
When dragging you can use the arrow keys to move the item around and escape to cancel.
Some screen readers may require you to be in focus mode or to use your pass through key
`,Ub=function(t){return t+1},owe=function(t){return`
You have lifted an item in position `+Ub(t.source.index)+`
`},V7=function(t,n){var r=t.droppableId===n.droppableId,i=Ub(t.index),o=Ub(n.index);return r?`
You have moved the item from position `+i+`
to position `+o+`
`:`
You have moved the item from position `+i+`
in list `+t.droppableId+`
to list `+n.droppableId+`
in position `+o+`
`},U7=function(t,n,r){var i=n.droppableId===r.droppableId;return i?`
The item `+t+`
has been combined with `+r.draggableId:`
The item `+t+`
in list `+n.droppableId+`
has been combined with `+r.draggableId+`
in list `+r.droppableId+`
`},awe=function(t){var n=t.destination;if(n)return V7(t.source,n);var r=t.combine;return r?U7(t.draggableId,t.source,r):"You are over an area that cannot be dropped on"},T3=function(t){return`
The item has returned to its starting position
of `+Ub(t.index)+`
`},swe=function(t){if(t.reason==="CANCEL")return`
Movement cancelled.
`+T3(t.source)+`
`;var n=t.destination,r=t.combine;return n?`
You have dropped the item.
`+V7(t.source,n)+`
`:r?`
You have dropped the item.
`+U7(t.draggableId,t.source,r)+`
`:`
The item has been dropped while not over a drop area.
`+T3(t.source)+`
`},x0={dragHandleUsageInstructions:iwe,onDragStart:owe,onDragUpdate:awe,onDragEnd:swe},io={x:0,y:0},fo=function(t,n){return{x:t.x+n.x,y:t.y+n.y}},ba=function(t,n){return{x:t.x-n.x,y:t.y-n.y}},Jc=function(t,n){return t.x===n.x&&t.y===n.y},Yh=function(t){return{x:t.x!==0?-t.x:0,y:t.y!==0?-t.y:0}},Od=function(t,n,r){var i;return r===void 0&&(r=0),i={},i[t]=n,i[t==="x"?"y":"x"]=r,i},Dg=function(t,n){return Math.sqrt(Math.pow(n.x-t.x,2)+Math.pow(n.y-t.y,2))},I3=function(t,n){return Math.min.apply(Math,n.map(function(r){return Dg(t,r)}))},j7=function(t){return function(n){return{x:t(n.x),y:t(n.y)}}},lwe=function(e,t){var n=Ps({top:Math.max(t.top,e.top),right:Math.min(t.right,e.right),bottom:Math.min(t.bottom,e.bottom),left:Math.max(t.left,e.left)});return n.width<=0||n.height<=0?null:n},Mv=function(t,n){return{top:t.top+n.y,left:t.left+n.x,bottom:t.bottom+n.y,right:t.right+n.x}},k3=function(t){return[{x:t.left,y:t.top},{x:t.right,y:t.top},{x:t.left,y:t.bottom},{x:t.right,y:t.bottom}]},cwe={top:0,right:0,bottom:0,left:0},uwe=function(t,n){return n?Mv(t,n.scroll.diff.displacement):t},dwe=function(t,n,r){if(r&&r.increasedBy){var i;return qn({},t,(i={},i[n.end]=t[n.end]+r.increasedBy[n.line],i))}return t},fwe=function(t,n){return n&&n.shouldClipSubject?lwe(n.pageMarginBox,t):Ps(t)},Ph=function(e){var t=e.page,n=e.withPlaceholder,r=e.axis,i=e.frame,o=uwe(t.marginBox,i),s=dwe(o,r,n),a=fwe(s,i);return{page:t,withPlaceholder:n,active:a}},Ik=function(e,t){e.frame||rn(!1);var n=e.frame,r=ba(t,n.scroll.initial),i=Yh(r),o=qn({},n,{scroll:{initial:n.scroll.initial,current:t,diff:{value:r,displacement:i},max:n.scroll.max}}),s=Ph({page:e.subject.page,withPlaceholder:e.subject.withPlaceholder,axis:e.axis,frame:o}),a=qn({},e,{frame:o,subject:s});return a};function jb(e){return Object.values?Object.values(e):Object.keys(e).map(function(t){return e[t]})}function kk(e,t){if(e.findIndex)return e.findIndex(t);for(var n=0;n<e.length;n++)if(t(e[n]))return n;return-1}function mu(e,t){if(e.find)return e.find(t);var n=kk(e,t);if(n!==-1)return e[n]}function H7(e){return Array.prototype.slice.call(e)}var K7=ro(function(e){return e.reduce(function(t,n){return t[n.descriptor.id]=n,t},{})}),W7=ro(function(e){return e.reduce(function(t,n){return t[n.descriptor.id]=n,t},{})}),I1=ro(function(e){return jb(e)}),hwe=ro(function(e){return jb(e)}),Qh=ro(function(e,t){var n=hwe(t).filter(function(r){return e===r.descriptor.droppableId}).sort(function(r,i){return r.descriptor.index-i.descriptor.index});return n});function Mk(e){return e.at&&e.at.type==="REORDER"?e.at.destination:null}function k1(e){return e.at&&e.at.type==="COMBINE"?e.at.combine:null}var M1=ro(function(e,t){return t.filter(function(n){return n.descriptor.id!==e.descriptor.id})}),pwe=function(e){var t=e.isMovingForward,n=e.draggable,r=e.destination,i=e.insideDestination,o=e.previousImpact;if(!r.isCombineEnabled)return null;var s=Mk(o);if(!s)return null;function a(T){var I={type:"COMBINE",combine:{draggableId:T,droppableId:r.descriptor.id}};return qn({},o,{at:I})}var u=o.displaced.all,f=u.length?u[0]:null;if(t)return f?a(f):null;var p=M1(n,i);if(!f){if(!p.length)return null;var g=p[p.length-1];return a(g.descriptor.id)}var v=kk(p,function(T){return T.descriptor.id===f});v===-1&&rn(!1);var b=v-1;if(b<0)return null;var _=p[b];return a(_.descriptor.id)},Jh=function(e,t){return e.descriptor.droppableId===t.descriptor.id},G7={point:io,value:0},Ag={invisible:{},visible:{},all:[]},mwe={displaced:Ag,displacedBy:G7,at:null},ns=function(e,t){return function(n){return e<=n&&n<=t}},q7=function(e){var t=ns(e.top,e.bottom),n=ns(e.left,e.right);return function(r){var i=t(r.top)&&t(r.bottom)&&n(r.left)&&n(r.right);if(i)return!0;var o=t(r.top)||t(r.bottom),s=n(r.left)||n(r.right),a=o&&s;if(a)return!0;var u=r.top<e.top&&r.bottom>e.bottom,f=r.left<e.left&&r.right>e.right,p=u&&f;if(p)return!0;var g=u&&s||f&&o;return g}},gwe=function(e){var t=ns(e.top,e.bottom),n=ns(e.left,e.right);return function(r){var i=t(r.top)&&t(r.bottom)&&n(r.left)&&n(r.right);return i}},Rk={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},Z7={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"},vwe=function(e){return function(t){var n=ns(t.top,t.bottom),r=ns(t.left,t.right);return function(i){return e===Rk?n(i.top)&&n(i.bottom):r(i.left)&&r(i.right)}}},ywe=function(t,n){var r=n.frame?n.frame.scroll.diff.displacement:io;return Mv(t,r)},xwe=function(t,n,r){return n.subject.active?r(n.subject.active)(t):!1},bwe=function(t,n,r){return r(n)(t)},Ok=function(t){var n=t.target,r=t.destination,i=t.viewport,o=t.withDroppableDisplacement,s=t.isVisibleThroughFrameFn,a=o?ywe(n,r):n;return xwe(a,r,s)&&bwe(a,i,s)},_we=function(t){return Ok(qn({},t,{isVisibleThroughFrameFn:q7}))},X7=function(t){return Ok(qn({},t,{isVisibleThroughFrameFn:gwe}))},wwe=function(t){return Ok(qn({},t,{isVisibleThroughFrameFn:vwe(t.destination.axis)}))},Cwe=function(t,n,r){if(typeof r=="boolean")return r;if(!n)return!0;var i=n.invisible,o=n.visible;if(i[t])return!1;var s=o[t];return s?s.shouldAnimate:!0};function Swe(e,t){var n=e.page.marginBox,r={top:t.point.y,right:0,bottom:0,left:t.point.x};return Ps(Pk(n,r))}function Ng(e){var t=e.afterDragging,n=e.destination,r=e.displacedBy,i=e.viewport,o=e.forceShouldAnimate,s=e.last;return t.reduce(function(u,f){var p=Swe(f,r),g=f.descriptor.id;u.all.push(g);var v=_we({target:p,destination:n,viewport:i,withDroppableDisplacement:!0});if(!v)return u.invisible[f.descriptor.id]=!0,u;var b=Cwe(g,s,o),_={draggableId:g,shouldAnimate:b};return u.visible[g]=_,u},{all:[],visible:{},invisible:{}})}function Ewe(e,t){if(!e.length)return 0;var n=e[e.length-1].descriptor.index;return t.inHomeList?n:n+1}function M3(e){var t=e.insideDestination,n=e.inHomeList,r=e.displacedBy,i=e.destination,o=Ewe(t,{inHomeList:n});return{displaced:Ag,displacedBy:r,at:{type:"REORDER",destination:{droppableId:i.descriptor.id,index:o}}}}function Hb(e){var t=e.draggable,n=e.insideDestination,r=e.destination,i=e.viewport,o=e.displacedBy,s=e.last,a=e.index,u=e.forceShouldAnimate,f=Jh(t,r);if(a==null)return M3({insideDestination:n,inHomeList:f,displacedBy:o,destination:r});var p=mu(n,function(T){return T.descriptor.index===a});if(!p)return M3({insideDestination:n,inHomeList:f,displacedBy:o,destination:r});var g=M1(t,n),v=n.indexOf(p),b=g.slice(v),_=Ng({afterDragging:b,destination:r,displacedBy:o,last:s,viewport:i.frame,forceShouldAnimate:u});return{displaced:_,displacedBy:o,at:{type:"REORDER",destination:{droppableId:r.descriptor.id,index:a}}}}function au(e,t){return Boolean(t.effected[e])}var Pwe=function(e){var t=e.isMovingForward,n=e.destination,r=e.draggables,i=e.combine,o=e.afterCritical;if(!n.isCombineEnabled)return null;var s=i.draggableId,a=r[s],u=a.descriptor.index,f=au(s,o);return f?t?u:u-1:t?u+1:u},Twe=function(e){var t=e.isMovingForward,n=e.isInHomeList,r=e.insideDestination,i=e.location;if(!r.length)return null;var o=i.index,s=t?o+1:o-1,a=r[0].descriptor.index,u=r[r.length-1].descriptor.index,f=n?u:u+1;return s<a||s>f?null:s},Iwe=function(e){var t=e.isMovingForward,n=e.isInHomeList,r=e.draggable,i=e.draggables,o=e.destination,s=e.insideDestination,a=e.previousImpact,u=e.viewport,f=e.afterCritical,p=a.at;if(p||rn(!1),p.type==="REORDER"){var g=Twe({isMovingForward:t,isInHomeList:n,location:p.destination,insideDestination:s});return g==null?null:Hb({draggable:r,insideDestination:s,destination:o,viewport:u,last:a.displaced,displacedBy:a.displacedBy,index:g})}var v=Pwe({isMovingForward:t,destination:o,displaced:a.displaced,draggables:i,combine:p.combine,afterCritical:f});return v==null?null:Hb({draggable:r,insideDestination:s,destination:o,viewport:u,last:a.displaced,displacedBy:a.displacedBy,index:v})},kwe=function(e){var t=e.displaced,n=e.afterCritical,r=e.combineWith,i=e.displacedBy,o=Boolean(t.visible[r]||t.invisible[r]);return au(r,n)?o?io:Yh(i.point):o?i.point:io},Mwe=function(e){var t=e.afterCritical,n=e.impact,r=e.draggables,i=k1(n);i||rn(!1);var o=i.draggableId,s=r[o].page.borderBox.center,a=kwe({displaced:n.displaced,afterCritical:t,combineWith:o,displacedBy:n.displacedBy});return fo(s,a)},Y7=function(t,n){return n.margin[t.start]+n.borderBox[t.size]/2},Rwe=function(t,n){return n.margin[t.end]+n.borderBox[t.size]/2},Dk=function(t,n,r){return n[t.crossAxisStart]+r.margin[t.crossAxisStart]+r.borderBox[t.crossAxisSize]/2},R3=function(t){var n=t.axis,r=t.moveRelativeTo,i=t.isMoving;return Od(n.line,r.marginBox[n.end]+Y7(n,i),Dk(n,r.marginBox,i))},O3=function(t){var n=t.axis,r=t.moveRelativeTo,i=t.isMoving;return Od(n.line,r.marginBox[n.start]-Rwe(n,i),Dk(n,r.marginBox,i))},Owe=function(t){var n=t.axis,r=t.moveInto,i=t.isMoving;return Od(n.line,r.contentBox[n.start]+Y7(n,i),Dk(n,r.contentBox,i))},Dwe=function(e){var t=e.impact,n=e.draggable,r=e.draggables,i=e.droppable,o=e.afterCritical,s=Qh(i.descriptor.id,r),a=n.page,u=i.axis;if(!s.length)return Owe({axis:u,moveInto:i.page,isMoving:a});var f=t.displaced,p=t.displacedBy,g=f.all[0];if(g){var v=r[g];if(au(g,o))return O3({axis:u,moveRelativeTo:v.page,isMoving:a});var b=$b(v.page,p.point);return O3({axis:u,moveRelativeTo:b,isMoving:a})}var _=s[s.length-1];if(_.descriptor.id===n.descriptor.id)return a.borderBox.center;if(au(_.descriptor.id,o)){var T=$b(_.page,Yh(o.displacedBy.point));return R3({axis:u,moveRelativeTo:T,isMoving:a})}return R3({axis:u,moveRelativeTo:_.page,isMoving:a})},SP=function(e,t){var n=e.frame;return n?fo(t,n.scroll.diff.displacement):t},Awe=function(t){var n=t.impact,r=t.draggable,i=t.droppable,o=t.draggables,s=t.afterCritical,a=r.page.borderBox.center,u=n.at;return!i||!u?a:u.type==="REORDER"?Dwe({impact:n,draggable:r,draggables:o,droppable:i,afterCritical:s}):Mwe({impact:n,draggables:o,afterCritical:s})},R1=function(e){var t=Awe(e),n=e.droppable,r=n?SP(n,t):t;return r},Q7=function(e,t){var n=ba(t,e.scroll.initial),r=Yh(n),i=Ps({top:t.y,bottom:t.y+e.frame.height,left:t.x,right:t.x+e.frame.width}),o={frame:i,scroll:{initial:e.scroll.initial,max:e.scroll.max,current:t,diff:{value:n,displacement:r}}};return o};function D3(e,t){return e.map(function(n){return t[n]})}function Nwe(e,t){for(var n=0;n<t.length;n++){var r=t[n].visible[e];if(r)return r}return null}var Lwe=function(e){var t=e.impact,n=e.viewport,r=e.destination,i=e.draggables,o=e.maxScrollChange,s=Q7(n,fo(n.scroll.current,o)),a=r.frame?Ik(r,fo(r.frame.scroll.current,o)):r,u=t.displaced,f=Ng({afterDragging:D3(u.all,i),destination:r,displacedBy:t.displacedBy,viewport:s.frame,last:u,forceShouldAnimate:!1}),p=Ng({afterDragging:D3(u.all,i),destination:a,displacedBy:t.displacedBy,viewport:n.frame,last:u,forceShouldAnimate:!1}),g={},v={},b=[u,f,p];u.all.forEach(function(T){var I=Nwe(T,b);if(I){v[T]=I;return}g[T]=!0});var _=qn({},t,{displaced:{all:u.all,invisible:g,visible:v}});return _},zwe=function(e,t){return fo(e.scroll.diff.displacement,t)},Ak=function(e){var t=e.pageBorderBoxCenter,n=e.draggable,r=e.viewport,i=zwe(r,t),o=ba(i,n.page.borderBox.center);return fo(n.client.borderBox.center,o)},J7=function(e){var t=e.draggable,n=e.destination,r=e.newPageBorderBoxCenter,i=e.viewport,o=e.withDroppableDisplacement,s=e.onlyOnMainAxis,a=s===void 0?!1:s,u=ba(r,t.page.borderBox.center),f=Mv(t.page.borderBox,u),p={target:f,destination:n,withDroppableDisplacement:o,viewport:i};return a?wwe(p):X7(p)},Fwe=function(e){var t=e.isMovingForward,n=e.draggable,r=e.destination,i=e.draggables,o=e.previousImpact,s=e.viewport,a=e.previousPageBorderBoxCenter,u=e.previousClientSelection,f=e.afterCritical;if(!r.isEnabled)return null;var p=Qh(r.descriptor.id,i),g=Jh(n,r),v=pwe({isMovingForward:t,draggable:n,destination:r,insideDestination:p,previousImpact:o})||Iwe({isMovingForward:t,isInHomeList:g,draggable:n,draggables:i,destination:r,insideDestination:p,previousImpact:o,viewport:s,afterCritical:f});if(!v)return null;var b=R1({impact:v,draggable:n,droppable:r,draggables:i,afterCritical:f}),_=J7({draggable:n,destination:r,newPageBorderBoxCenter:b,viewport:s.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0});if(_){var T=Ak({pageBorderBoxCenter:b,draggable:n,viewport:s});return{clientSelection:T,impact:v,scrollJumpRequest:null}}var I=ba(b,a),P=Lwe({impact:v,viewport:s,destination:r,draggables:i,maxScrollChange:I});return{clientSelection:u,impact:P,scrollJumpRequest:I}},Fo=function(t){var n=t.subject.active;return n||rn(!1),n},$we=function(e){var t=e.isMovingForward,n=e.pageBorderBoxCenter,r=e.source,i=e.droppables,o=e.viewport,s=r.subject.active;if(!s)return null;var a=r.axis,u=ns(s[a.start],s[a.end]),f=I1(i).filter(function(g){return g!==r}).filter(function(g){return g.isEnabled}).filter(function(g){return Boolean(g.subject.active)}).filter(function(g){return q7(o.frame)(Fo(g))}).filter(function(g){var v=Fo(g);return t?s[a.crossAxisEnd]<v[a.crossAxisEnd]:v[a.crossAxisStart]<s[a.crossAxisStart]}).filter(function(g){var v=Fo(g),b=ns(v[a.start],v[a.end]);return u(v[a.start])||u(v[a.end])||b(s[a.start])||b(s[a.end])}).sort(function(g,v){var b=Fo(g)[a.crossAxisStart],_=Fo(v)[a.crossAxisStart];return t?b-_:_-b}).filter(function(g,v,b){return Fo(g)[a.crossAxisStart]===Fo(b[0])[a.crossAxisStart]});if(!f.length)return null;if(f.length===1)return f[0];var p=f.filter(function(g){var v=ns(Fo(g)[a.start],Fo(g)[a.end]);return v(n[a.line])});return p.length===1?p[0]:p.length>1?p.sort(function(g,v){return Fo(g)[a.start]-Fo(v)[a.start]})[0]:f.sort(function(g,v){var b=I3(n,k3(Fo(g))),_=I3(n,k3(Fo(v)));return b!==_?b-_:Fo(g)[a.start]-Fo(v)[a.start]})[0]},A3=function(t,n){var r=t.page.borderBox.center;return au(t.descriptor.id,n)?ba(r,n.displacedBy.point):r},Bwe=function(t,n){var r=t.page.borderBox;return au(t.descriptor.id,n)?Mv(r,Yh(n.displacedBy.point)):r},Vwe=function(e){var t=e.pageBorderBoxCenter,n=e.viewport,r=e.destination,i=e.insideDestination,o=e.afterCritical,s=i.filter(function(a){return X7({target:Bwe(a,o),destination:r,viewport:n.frame,withDroppableDisplacement:!0})}).sort(function(a,u){var f=Dg(t,SP(r,A3(a,o))),p=Dg(t,SP(r,A3(u,o)));return f<p?-1:p<f?1:a.descriptor.index-u.descriptor.index});return s[0]||null},Rv=ro(function(t,n){var r=n[t.line];return{value:r,point:Od(t.line,r)}}),Uwe=function(t,n,r){var i=t.axis;if(t.descriptor.mode==="virtual")return Od(i.line,n[i.line]);var o=t.subject.page.contentBox[i.size],s=Qh(t.descriptor.id,r),a=s.reduce(function(p,g){return p+g.client.marginBox[i.size]},0),u=a+n[i.line],f=u-o;return f<=0?null:Od(i.line,f)},ej=function(t,n){return qn({},t,{scroll:qn({},t.scroll,{max:n})})},tj=function(t,n,r){var i=t.frame;Jh(n,t)&&rn(!1),t.subject.withPlaceholder&&rn(!1);var o=Rv(t.axis,n.displaceBy).point,s=Uwe(t,o,r),a={placeholderSize:o,increasedBy:s,oldFrameMaxScroll:t.frame?t.frame.scroll.max:null};if(!i){var u=Ph({page:t.subject.page,withPlaceholder:a,axis:t.axis,frame:t.frame});return qn({},t,{subject:u})}var f=s?fo(i.scroll.max,s):i.scroll.max,p=ej(i,f),g=Ph({page:t.subject.page,withPlaceholder:a,axis:t.axis,frame:p});return qn({},t,{subject:g,frame:p})},jwe=function(t){var n=t.subject.withPlaceholder;n||rn(!1);var r=t.frame;if(!r){var i=Ph({page:t.subject.page,axis:t.axis,frame:null,withPlaceholder:null});return qn({},t,{subject:i})}var o=n.oldFrameMaxScroll;o||rn(!1);var s=ej(r,o),a=Ph({page:t.subject.page,axis:t.axis,frame:s,withPlaceholder:null});return qn({},t,{subject:a,frame:s})},Hwe=function(e){var t=e.previousPageBorderBoxCenter,n=e.moveRelativeTo,r=e.insideDestination,i=e.draggable,o=e.draggables,s=e.destination,a=e.viewport,u=e.afterCritical;if(!n){if(r.length)return null;var f={displaced:Ag,displacedBy:G7,at:{type:"REORDER",destination:{droppableId:s.descriptor.id,index:0}}},p=R1({impact:f,draggable:i,droppable:s,draggables:o,afterCritical:u}),g=Jh(i,s)?s:tj(s,i,o),v=J7({draggable:i,destination:g,newPageBorderBoxCenter:p,viewport:a.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0});return v?f:null}var b=Boolean(t[s.axis.line]<=n.page.borderBox.center[s.axis.line]),_=function(){var I=n.descriptor.index;return n.descriptor.id===i.descriptor.id||b?I:I+1}(),T=Rv(s.axis,i.displaceBy);return Hb({draggable:i,insideDestination:r,destination:s,viewport:a,displacedBy:T,last:Ag,index:_})},Kwe=function(e){var t=e.isMovingForward,n=e.previousPageBorderBoxCenter,r=e.draggable,i=e.isOver,o=e.draggables,s=e.droppables,a=e.viewport,u=e.afterCritical,f=$we({isMovingForward:t,pageBorderBoxCenter:n,source:i,droppables:s,viewport:a});if(!f)return null;var p=Qh(f.descriptor.id,o),g=Vwe({pageBorderBoxCenter:n,viewport:a,destination:f,insideDestination:p,afterCritical:u}),v=Hwe({previousPageBorderBoxCenter:n,destination:f,draggable:r,draggables:o,moveRelativeTo:g,insideDestination:p,viewport:a,afterCritical:u});if(!v)return null;var b=R1({impact:v,draggable:r,droppable:f,draggables:o,afterCritical:u}),_=Ak({pageBorderBoxCenter:b,draggable:r,viewport:a});return{clientSelection:_,impact:v,scrollJumpRequest:null}},Sa=function(e){var t=e.at;return t?t.type==="REORDER"?t.destination.droppableId:t.combine.droppableId:null},Wwe=function(t,n){var r=Sa(t);return r?n[r]:null},Gwe=function(e){var t=e.state,n=e.type,r=Wwe(t.impact,t.dimensions.droppables),i=Boolean(r),o=t.dimensions.droppables[t.critical.droppable.id],s=r||o,a=s.axis.direction,u=a==="vertical"&&(n==="MOVE_UP"||n==="MOVE_DOWN")||a==="horizontal"&&(n==="MOVE_LEFT"||n==="MOVE_RIGHT");if(u&&!i)return null;var f=n==="MOVE_DOWN"||n==="MOVE_RIGHT",p=t.dimensions.draggables[t.critical.draggable.id],g=t.current.page.borderBoxCenter,v=t.dimensions,b=v.draggables,_=v.droppables;return u?Fwe({isMovingForward:f,previousPageBorderBoxCenter:g,draggable:p,destination:s,draggables:b,viewport:t.viewport,previousClientSelection:t.current.client.selection,previousImpact:t.impact,afterCritical:t.afterCritical}):Kwe({isMovingForward:f,previousPageBorderBoxCenter:g,draggable:p,isOver:s,draggables:b,droppables:_,viewport:t.viewport,afterCritical:t.afterCritical})};function nd(e){return e.phase==="DRAGGING"||e.phase==="COLLECTING"}function nj(e){var t=ns(e.top,e.bottom),n=ns(e.left,e.right);return function(i){return t(i.y)&&n(i.x)}}function qwe(e,t){return e.left<t.right&&e.right>t.left&&e.top<t.bottom&&e.bottom>t.top}function Zwe(e){var t=e.pageBorderBox,n=e.draggable,r=e.candidates,i=n.page.borderBox.center,o=r.map(function(s){var a=s.axis,u=Od(s.axis.line,t.center[a.line],s.page.borderBox.center[a.crossAxisLine]);return{id:s.descriptor.id,distance:Dg(i,u)}}).sort(function(s,a){return a.distance-s.distance});return o[0]?o[0].id:null}function Xwe(e){var t=e.pageBorderBox,n=e.draggable,r=e.droppables,i=I1(r).filter(function(o){if(!o.isEnabled)return!1;var s=o.subject.active;if(!s||!qwe(t,s))return!1;if(nj(s)(t.center))return!0;var a=o.axis,u=s.center[a.crossAxisLine],f=t[a.crossAxisStart],p=t[a.crossAxisEnd],g=ns(s[a.crossAxisStart],s[a.crossAxisEnd]),v=g(f),b=g(p);return!v&&!b?!0:v?f<u:p>u});return i.length?i.length===1?i[0].descriptor.id:Zwe({pageBorderBox:t,draggable:n,candidates:i}):null}var rj=function(t,n){return Ps(Mv(t,n))},Ywe=function(e,t){var n=e.frame;return n?rj(t,n.scroll.diff.value):t};function ij(e){var t=e.displaced,n=e.id;return Boolean(t.visible[n]||t.invisible[n])}function Qwe(e){var t=e.draggable,n=e.closest,r=e.inHomeList;return n?r&&n.descriptor.index>t.descriptor.index?n.descriptor.index-1:n.descriptor.index:null}var Jwe=function(e){var t=e.pageBorderBoxWithDroppableScroll,n=e.draggable,r=e.destination,i=e.insideDestination,o=e.last,s=e.viewport,a=e.afterCritical,u=r.axis,f=Rv(r.axis,n.displaceBy),p=f.value,g=t[u.start],v=t[u.end],b=M1(n,i),_=mu(b,function(I){var P=I.descriptor.id,M=I.page.borderBox.center[u.line],D=au(P,a),N=ij({displaced:o,id:P});return D?N?v<=M:g<M-p:N?v<=M+p:g<M}),T=Qwe({draggable:n,closest:_,inHomeList:Jh(n,r)});return Hb({draggable:n,insideDestination:i,destination:r,viewport:s,last:o,displacedBy:f,index:T})},eCe=4,tCe=function(e){var t=e.draggable,n=e.pageBorderBoxWithDroppableScroll,r=e.previousImpact,i=e.destination,o=e.insideDestination,s=e.afterCritical;if(!i.isCombineEnabled)return null;var a=i.axis,u=Rv(i.axis,t.displaceBy),f=u.value,p=n[a.start],g=n[a.end],v=M1(t,o),b=mu(v,function(T){var I=T.descriptor.id,P=T.page.borderBox,M=P[a.size],D=M/eCe,N=au(I,s),z=ij({displaced:r.displaced,id:I});return N?z?g>P[a.start]+D&&g<P[a.end]-D:p>P[a.start]-f+D&&p<P[a.end]-f-D:z?g>P[a.start]+f+D&&g<P[a.end]+f-D:p>P[a.start]+D&&p<P[a.end]-D});if(!b)return null;var _={displacedBy:u,displaced:r.displaced,at:{type:"COMBINE",combine:{draggableId:b.descriptor.id,droppableId:i.descriptor.id}}};return _},oj=function(e){var t=e.pageOffset,n=e.draggable,r=e.draggables,i=e.droppables,o=e.previousImpact,s=e.viewport,a=e.afterCritical,u=rj(n.page.borderBox,t),f=Xwe({pageBorderBox:u,draggable:n,droppables:i});if(!f)return mwe;var p=i[f],g=Qh(p.descriptor.id,r),v=Ywe(p,u);return tCe({pageBorderBoxWithDroppableScroll:v,draggable:n,previousImpact:o,destination:p,insideDestination:g,afterCritical:a})||Jwe({pageBorderBoxWithDroppableScroll:v,draggable:n,destination:p,insideDestination:g,last:o.displaced,viewport:s,afterCritical:a})},Nk=function(e,t){var n;return qn({},e,(n={},n[t.descriptor.id]=t,n))},nCe=function(t){var n=t.previousImpact,r=t.impact,i=t.droppables,o=Sa(n),s=Sa(r);if(!o||o===s)return i;var a=i[o];if(!a.subject.withPlaceholder)return i;var u=jwe(a);return Nk(i,u)},rCe=function(e){var t=e.draggable,n=e.draggables,r=e.droppables,i=e.previousImpact,o=e.impact,s=nCe({previousImpact:i,impact:o,droppables:r}),a=Sa(o);if(!a)return s;var u=r[a];if(Jh(t,u)||u.subject.withPlaceholder)return s;var f=tj(u,t,n);return Nk(s,f)},Xm=function(e){var t=e.state,n=e.clientSelection,r=e.dimensions,i=e.viewport,o=e.impact,s=e.scrollJumpRequest,a=i||t.viewport,u=r||t.dimensions,f=n||t.current.client.selection,p=ba(f,t.initial.client.selection),g={offset:p,selection:f,borderBoxCenter:fo(t.initial.client.borderBoxCenter,p)},v={selection:fo(g.selection,a.scroll.current),borderBoxCenter:fo(g.borderBoxCenter,a.scroll.current),offset:fo(g.offset,a.scroll.diff.value)},b={client:g,page:v};if(t.phase==="COLLECTING")return qn({phase:"COLLECTING"},t,{dimensions:u,viewport:a,current:b});var _=u.draggables[t.critical.draggable.id],T=o||oj({pageOffset:v.offset,draggable:_,draggables:u.draggables,droppables:u.droppables,previousImpact:t.impact,viewport:a,afterCritical:t.afterCritical}),I=rCe({draggable:_,impact:T,previousImpact:t.impact,draggables:u.draggables,droppables:u.droppables}),P=qn({},t,{current:b,dimensions:{draggables:u.draggables,droppables:I},impact:T,viewport:a,scrollJumpRequest:s||null,forceShouldAnimate:s?!1:null});return P};function iCe(e,t){return e.map(function(n){return t[n]})}var aj=function(e){var t=e.impact,n=e.viewport,r=e.draggables,i=e.destination,o=e.forceShouldAnimate,s=t.displaced,a=iCe(s.all,r),u=Ng({afterDragging:a,destination:i,displacedBy:t.displacedBy,viewport:n.frame,forceShouldAnimate:o,last:s});return qn({},t,{displaced:u})},sj=function(e){var t=e.impact,n=e.draggable,r=e.droppable,i=e.draggables,o=e.viewport,s=e.afterCritical,a=R1({impact:t,draggable:n,draggables:i,droppable:r,afterCritical:s});return Ak({pageBorderBoxCenter:a,draggable:n,viewport:o})},lj=function(e){var t=e.state,n=e.dimensions,r=e.viewport;t.movementMode!=="SNAP"&&rn(!1);var i=t.impact,o=r||t.viewport,s=n||t.dimensions,a=s.draggables,u=s.droppables,f=a[t.critical.draggable.id],p=Sa(i);p||rn(!1);var g=u[p],v=aj({impact:i,viewport:o,destination:g,draggables:a}),b=sj({impact:v,draggable:f,droppable:g,draggables:a,viewport:o,afterCritical:t.afterCritical});return Xm({impact:v,clientSelection:b,state:t,dimensions:s,viewport:o})},oCe=function(e){return{index:e.index,droppableId:e.droppableId}},cj=function(e){var t=e.draggable,n=e.home,r=e.draggables,i=e.viewport,o=Rv(n.axis,t.displaceBy),s=Qh(n.descriptor.id,r),a=s.indexOf(t);a===-1&&rn(!1);var u=s.slice(a+1),f=u.reduce(function(b,_){return b[_.descriptor.id]=!0,b},{}),p={inVirtualList:n.descriptor.mode==="virtual",displacedBy:o,effected:f},g=Ng({afterDragging:u,destination:n,displacedBy:o,last:null,viewport:i.frame,forceShouldAnimate:!1}),v={displaced:g,displacedBy:o,at:{type:"REORDER",destination:oCe(t.descriptor)}};return{impact:v,afterCritical:p}},aCe=function(e,t){return{draggables:e.draggables,droppables:Nk(e.droppables,t)}},sCe=function(e){var t=e.draggable,n=e.offset,r=e.initialWindowScroll,i=$b(t.client,n),o=Bb(i,r),s=qn({},t,{placeholder:qn({},t.placeholder,{client:i}),client:i,page:o});return s},lCe=function(e){var t=e.frame;return t||rn(!1),t},cCe=function(e){var t=e.additions,n=e.updatedDroppables,r=e.viewport,i=r.scroll.diff.value;return t.map(function(o){var s=o.descriptor.droppableId,a=n[s],u=lCe(a),f=u.scroll.diff.value,p=fo(i,f),g=sCe({draggable:o,offset:p,initialWindowScroll:r.scroll.initial});return g})},uCe=function(e){var t=e.state,n=e.published,r=n.modified.map(function(D){var N=t.dimensions.droppables[D.droppableId],z=Ik(N,D.scroll);return z}),i=qn({},t.dimensions.droppables,{},K7(r)),o=W7(cCe({additions:n.additions,updatedDroppables:i,viewport:t.viewport})),s=qn({},t.dimensions.draggables,{},o);n.removals.forEach(function(D){delete s[D]});var a={droppables:i,draggables:s},u=Sa(t.impact),f=u?a.droppables[u]:null,p=a.draggables[t.critical.draggable.id],g=a.droppables[t.critical.droppable.id],v=cj({draggable:p,home:g,draggables:s,viewport:t.viewport}),b=v.impact,_=v.afterCritical,T=f&&f.isCombineEnabled?t.impact:b,I=oj({pageOffset:t.current.page.offset,draggable:a.draggables[t.critical.draggable.id],draggables:a.draggables,droppables:a.droppables,previousImpact:T,viewport:t.viewport,afterCritical:_}),P=qn({phase:"DRAGGING"},t,{phase:"DRAGGING",impact:I,onLiftImpact:b,dimensions:a,afterCritical:_,forceShouldAnimate:!1});if(t.phase==="COLLECTING")return P;var M=qn({phase:"DROP_PENDING"},P,{phase:"DROP_PENDING",reason:t.reason,isWaiting:!1});return M},EP=function(t){return t.movementMode==="SNAP"},MS=function(t,n,r){var i=aCe(t.dimensions,n);return!EP(t)||r?Xm({state:t,dimensions:i}):lj({state:t,dimensions:i})};function RS(e){return e.isDragging&&e.movementMode==="SNAP"?qn({phase:"DRAGGING"},e,{scrollJumpRequest:null}):e}var N3={phase:"IDLE",completed:null,shouldFlush:!1},dCe=function(e,t){if(e===void 0&&(e=N3),t.type==="FLUSH")return qn({},N3,{shouldFlush:!0});if(t.type==="INITIAL_PUBLISH"){e.phase!=="IDLE"&&rn(!1);var n=t.payload,r=n.critical,i=n.clientSelection,o=n.viewport,s=n.dimensions,a=n.movementMode,u=s.draggables[r.draggable.id],f=s.droppables[r.droppable.id],p={selection:i,borderBoxCenter:u.client.borderBox.center,offset:io},g={client:p,page:{selection:fo(p.selection,o.scroll.initial),borderBoxCenter:fo(p.selection,o.scroll.initial),offset:fo(p.selection,o.scroll.diff.value)}},v=I1(s.droppables).every(function(gt){return!gt.isFixedOnPage}),b=cj({draggable:u,home:f,draggables:s.draggables,viewport:o}),_=b.impact,T=b.afterCritical,I={phase:"DRAGGING",isDragging:!0,critical:r,movementMode:a,dimensions:s,initial:g,current:g,isWindowScrollAllowed:v,impact:_,afterCritical:T,onLiftImpact:_,viewport:o,scrollJumpRequest:null,forceShouldAnimate:null};return I}if(t.type==="COLLECTION_STARTING"){if(e.phase==="COLLECTING"||e.phase==="DROP_PENDING")return e;e.phase!=="DRAGGING"&&rn(!1);var P=qn({phase:"COLLECTING"},e,{phase:"COLLECTING"});return P}if(t.type==="PUBLISH_WHILE_DRAGGING")return e.phase==="COLLECTING"||e.phase==="DROP_PENDING"||rn(!1),uCe({state:e,published:t.payload});if(t.type==="MOVE"){if(e.phase==="DROP_PENDING")return e;nd(e)||rn(!1);var M=t.payload.client;return Jc(M,e.current.client.selection)?e:Xm({state:e,clientSelection:M,impact:EP(e)?e.impact:null})}if(t.type==="UPDATE_DROPPABLE_SCROLL"){if(e.phase==="DROP_PENDING"||e.phase==="COLLECTING")return RS(e);nd(e)||rn(!1);var D=t.payload,N=D.id,z=D.newScroll,$=e.dimensions.droppables[N];if(!$)return e;var j=Ik($,z);return MS(e,j,!1)}if(t.type==="UPDATE_DROPPABLE_IS_ENABLED"){if(e.phase==="DROP_PENDING")return e;nd(e)||rn(!1);var U=t.payload,q=U.id,Y=U.isEnabled,te=e.dimensions.droppables[q];te||rn(!1),te.isEnabled===Y&&rn(!1);var Z=qn({},te,{isEnabled:Y});return MS(e,Z,!0)}if(t.type==="UPDATE_DROPPABLE_IS_COMBINE_ENABLED"){if(e.phase==="DROP_PENDING")return e;nd(e)||rn(!1);var X=t.payload,J=X.id,ue=X.isCombineEnabled,re=e.dimensions.droppables[J];re||rn(!1),re.isCombineEnabled===ue&&rn(!1);var se=qn({},re,{isCombineEnabled:ue});return MS(e,se,!0)}if(t.type==="MOVE_BY_WINDOW_SCROLL"){if(e.phase==="DROP_PENDING"||e.phase==="DROP_ANIMATING")return e;nd(e)||rn(!1),e.isWindowScrollAllowed||rn(!1);var oe=t.payload.newScroll;if(Jc(e.viewport.scroll.current,oe))return RS(e);var he=Q7(e.viewport,oe);return EP(e)?lj({state:e,viewport:he}):Xm({state:e,viewport:he})}if(t.type==="UPDATE_VIEWPORT_MAX_SCROLL"){if(!nd(e))return e;var Ce=t.payload.maxScroll;if(Jc(Ce,e.viewport.scroll.max))return e;var Se=qn({},e.viewport,{scroll:qn({},e.viewport.scroll,{max:Ce})});return qn({phase:"DRAGGING"},e,{viewport:Se})}if(t.type==="MOVE_UP"||t.type==="MOVE_DOWN"||t.type==="MOVE_LEFT"||t.type==="MOVE_RIGHT"){if(e.phase==="COLLECTING"||e.phase==="DROP_PENDING")return e;e.phase!=="DRAGGING"&&rn(!1);var be=Gwe({state:e,type:t.type});return be?Xm({state:e,impact:be.impact,clientSelection:be.clientSelection,scrollJumpRequest:be.scrollJumpRequest}):e}if(t.type==="DROP_PENDING"){var Re=t.payload.reason;e.phase!=="COLLECTING"&&rn(!1);var Ie=qn({phase:"DROP_PENDING"},e,{phase:"DROP_PENDING",isWaiting:!0,reason:Re});return Ie}if(t.type==="DROP_ANIMATE"){var Me=t.payload,Ae=Me.completed,ze=Me.dropDuration,Ke=Me.newHomeClientOffset;e.phase==="DRAGGING"||e.phase==="DROP_PENDING"||rn(!1);var Ue={phase:"DROP_ANIMATING",completed:Ae,dropDuration:ze,newHomeClientOffset:Ke,dimensions:e.dimensions};return Ue}if(t.type==="DROP_COMPLETE"){var pt=t.payload.completed;return{phase:"IDLE",completed:pt,shouldFlush:!1}}return e},fCe=function(t){return{type:"BEFORE_INITIAL_CAPTURE",payload:t}},hCe=function(t){return{type:"LIFT",payload:t}},pCe=function(t){return{type:"INITIAL_PUBLISH",payload:t}},mCe=function(t){return{type:"PUBLISH_WHILE_DRAGGING",payload:t}},gCe=function(){return{type:"COLLECTION_STARTING",payload:null}},vCe=function(t){return{type:"UPDATE_DROPPABLE_SCROLL",payload:t}},yCe=function(t){return{type:"UPDATE_DROPPABLE_IS_ENABLED",payload:t}},xCe=function(t){return{type:"UPDATE_DROPPABLE_IS_COMBINE_ENABLED",payload:t}},uj=function(t){return{type:"MOVE",payload:t}},bCe=function(t){return{type:"MOVE_BY_WINDOW_SCROLL",payload:t}},_Ce=function(t){return{type:"UPDATE_VIEWPORT_MAX_SCROLL",payload:t}},wCe=function(){return{type:"MOVE_UP",payload:null}},CCe=function(){return{type:"MOVE_DOWN",payload:null}},SCe=function(){return{type:"MOVE_RIGHT",payload:null}},ECe=function(){return{type:"MOVE_LEFT",payload:null}},Lk=function(){return{type:"FLUSH",payload:null}},PCe=function(t){return{type:"DROP_ANIMATE",payload:t}},zk=function(t){return{type:"DROP_COMPLETE",payload:t}},dj=function(t){return{type:"DROP",payload:t}},TCe=function(t){return{type:"DROP_PENDING",payload:t}},fj=function(){return{type:"DROP_ANIMATION_FINISHED",payload:null}},ICe=function(e){return function(t){var n=t.getState,r=t.dispatch;return function(i){return function(o){if(o.type!=="LIFT"){i(o);return}var s=o.payload,a=s.id,u=s.clientSelection,f=s.movementMode,p=n();p.phase==="DROP_ANIMATING"&&r(zk({completed:p.completed})),n().phase!=="IDLE"&&rn(!1),r(Lk()),r(fCe({draggableId:a,movementMode:f}));var g={shouldPublishImmediately:f==="SNAP"},v={draggableId:a,scrollOptions:g},b=e.startPublishing(v),_=b.critical,T=b.dimensions,I=b.viewport;r(pCe({critical:_,dimensions:T,clientSelection:u,movementMode:f,viewport:I}))}}}},kCe=function(e){return function(){return function(t){return function(n){n.type==="INITIAL_PUBLISH"&&e.dragging(),n.type==="DROP_ANIMATE"&&e.dropping(n.payload.completed.result.reason),(n.type==="FLUSH"||n.type==="DROP_COMPLETE")&&e.resting(),t(n)}}}},Fk={outOfTheWay:"cubic-bezier(0.2, 0, 0, 1)",drop:"cubic-bezier(.2,1,.1,1)"},Lg={opacity:{drop:0,combining:.7},scale:{drop:.75}},$k={outOfTheWay:.2,minDropTime:.33,maxDropTime:.55},Hu=$k.outOfTheWay+"s "+Fk.outOfTheWay,Ym={fluid:"opacity "+Hu,snap:"transform "+Hu+", opacity "+Hu,drop:function(t){var n=t+"s "+Fk.drop;return"transform "+n+", opacity "+n},outOfTheWay:"transform "+Hu,placeholder:"height "+Hu+", width "+Hu+", margin "+Hu},L3=function(t){return Jc(t,io)?null:"translate("+t.x+"px, "+t.y+"px)"},PP={moveTo:L3,drop:function(t,n){var r=L3(t);return r?n?r+" scale("+Lg.scale.drop+")":r:null}},TP=$k.minDropTime,hj=$k.maxDropTime,MCe=hj-TP,z3=1500,RCe=.6,OCe=function(e){var t=e.current,n=e.destination,r=e.reason,i=Dg(t,n);if(i<=0)return TP;if(i>=z3)return hj;var o=i/z3,s=TP+MCe*o,a=r==="CANCEL"?s*RCe:s;return Number(a.toFixed(2))},DCe=function(e){var t=e.impact,n=e.draggable,r=e.dimensions,i=e.viewport,o=e.afterCritical,s=r.draggables,a=r.droppables,u=Sa(t),f=u?a[u]:null,p=a[n.descriptor.droppableId],g=sj({impact:t,draggable:n,draggables:s,afterCritical:o,droppable:f||p,viewport:i}),v=ba(g,n.client.borderBox.center);return v},ACe=function(e){var t=e.draggables,n=e.reason,r=e.lastImpact,i=e.home,o=e.viewport,s=e.onLiftImpact;if(!r.at||n!=="DROP"){var a=aj({draggables:t,impact:s,destination:i,viewport:o,forceShouldAnimate:!0});return{impact:a,didDropInsideDroppable:!1}}if(r.at.type==="REORDER")return{impact:r,didDropInsideDroppable:!0};var u=qn({},r,{displaced:Ag});return{impact:u,didDropInsideDroppable:!0}},NCe=function(e){var t=e.getState,n=e.dispatch;return function(r){return function(i){if(i.type!=="DROP"){r(i);return}var o=t(),s=i.payload.reason;if(o.phase==="COLLECTING"){n(TCe({reason:s}));return}if(o.phase!=="IDLE"){var a=o.phase==="DROP_PENDING"&&o.isWaiting;a&&rn(!1),o.phase==="DRAGGING"||o.phase==="DROP_PENDING"||rn(!1);var u=o.critical,f=o.dimensions,p=f.draggables[o.critical.draggable.id],g=ACe({reason:s,lastImpact:o.impact,afterCritical:o.afterCritical,onLiftImpact:o.onLiftImpact,home:o.dimensions.droppables[o.critical.droppable.id],viewport:o.viewport,draggables:o.dimensions.draggables}),v=g.impact,b=g.didDropInsideDroppable,_=b?Mk(v):null,T=b?k1(v):null,I={index:u.draggable.index,droppableId:u.droppable.id},P={draggableId:p.descriptor.id,type:p.descriptor.type,source:I,reason:s,mode:o.movementMode,destination:_,combine:T},M=DCe({impact:v,draggable:p,dimensions:f,viewport:o.viewport,afterCritical:o.afterCritical}),D={critical:o.critical,afterCritical:o.afterCritical,result:P,impact:v},N=!Jc(o.current.client.offset,M)||Boolean(P.combine);if(!N){n(zk({completed:D}));return}var z=OCe({current:o.current.client.offset,destination:M,reason:s}),$={newHomeClientOffset:M,dropDuration:z,completed:D};n(PCe($))}}}},pj=function(){return{x:window.pageXOffset,y:window.pageYOffset}};function LCe(e){return{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(n){n.target!==window&&n.target!==window.document||e()}}}function zCe(e){var t=e.onWindowScroll;function n(){t(pj())}var r=Og(n),i=LCe(r),o=Qc;function s(){return o!==Qc}function a(){s()&&rn(!1),o=Ja(window,[i])}function u(){s()||rn(!1),r.cancel(),o(),o=Qc}return{start:a,stop:u,isActive:s}}var FCe=function(t){return t.type==="DROP_COMPLETE"||t.type==="DROP_ANIMATE"||t.type==="FLUSH"},$Ce=function(e){var t=zCe({onWindowScroll:function(r){e.dispatch(bCe({newScroll:r}))}});return function(n){return function(r){!t.isActive()&&r.type==="INITIAL_PUBLISH"&&t.start(),t.isActive()&&FCe(r)&&t.stop(),n(r)}}},BCe=function(e){var t=!1,n=!1,r=setTimeout(function(){n=!0}),i=function(s){t||n||(t=!0,e(s),clearTimeout(r))};return i.wasCalled=function(){return t},i},VCe=function(){var e=[],t=function(o){var s=kk(e,function(f){return f.timerId===o});s===-1&&rn(!1);var a=e.splice(s,1),u=a[0];u.callback()},n=function(o){var s=setTimeout(function(){return t(s)}),a={timerId:s,callback:o};e.push(a)},r=function(){if(!!e.length){var o=[].concat(e);e.length=0,o.forEach(function(s){clearTimeout(s.timerId),s.callback()})}};return{add:n,flush:r}},UCe=function(t,n){return t==null&&n==null?!0:t==null||n==null?!1:t.droppableId===n.droppableId&&t.index===n.index},jCe=function(t,n){return t==null&&n==null?!0:t==null||n==null?!1:t.draggableId===n.draggableId&&t.droppableId===n.droppableId},HCe=function(t,n){if(t===n)return!0;var r=t.draggable.id===n.draggable.id&&t.draggable.droppableId===n.draggable.droppableId&&t.draggable.type===n.draggable.type&&t.draggable.index===n.draggable.index,i=t.droppable.id===n.droppable.id&&t.droppable.type===n.droppable.type;return r&&i},dm=function(t,n){n()},Ex=function(t,n){return{draggableId:t.draggable.id,type:t.droppable.type,source:{droppableId:t.droppable.id,index:t.draggable.index},mode:n}},OS=function(t,n,r,i){if(!t){r(i(n));return}var o=BCe(r),s={announce:o};t(n,s),o.wasCalled()||r(i(n))},KCe=function(e,t){var n=VCe(),r=null,i=function(v,b){r&&rn(!1),dm("onBeforeCapture",function(){var _=e().onBeforeCapture;if(_){var T={draggableId:v,mode:b};_(T)}})},o=function(v,b){r&&rn(!1),dm("onBeforeDragStart",function(){var _=e().onBeforeDragStart;_&&_(Ex(v,b))})},s=function(v,b){r&&rn(!1);var _=Ex(v,b);r={mode:b,lastCritical:v,lastLocation:_.source,lastCombine:null},n.add(function(){dm("onDragStart",function(){return OS(e().onDragStart,_,t,x0.onDragStart)})})},a=function(v,b){var _=Mk(b),T=k1(b);r||rn(!1);var I=!HCe(v,r.lastCritical);I&&(r.lastCritical=v);var P=!UCe(r.lastLocation,_);P&&(r.lastLocation=_);var M=!jCe(r.lastCombine,T);if(M&&(r.lastCombine=T),!(!I&&!P&&!M)){var D=qn({},Ex(v,r.mode),{combine:T,destination:_});n.add(function(){dm("onDragUpdate",function(){return OS(e().onDragUpdate,D,t,x0.onDragUpdate)})})}},u=function(){r||rn(!1),n.flush()},f=function(v){r||rn(!1),r=null,dm("onDragEnd",function(){return OS(e().onDragEnd,v,t,x0.onDragEnd)})},p=function(){if(!!r){var v=qn({},Ex(r.lastCritical,r.mode),{combine:null,destination:null,reason:"CANCEL"});f(v)}};return{beforeCapture:i,beforeStart:o,start:s,update:a,flush:u,drop:f,abort:p}},WCe=function(e,t){var n=KCe(e,t);return function(r){return function(i){return function(o){if(o.type==="BEFORE_INITIAL_CAPTURE"){n.beforeCapture(o.payload.draggableId,o.payload.movementMode);return}if(o.type==="INITIAL_PUBLISH"){var s=o.payload.critical;n.beforeStart(s,o.payload.movementMode),i(o),n.start(s,o.payload.movementMode);return}if(o.type==="DROP_COMPLETE"){var a=o.payload.completed.result;n.flush(),i(o),n.drop(a);return}if(i(o),o.type==="FLUSH"){n.abort();return}var u=r.getState();u.phase==="DRAGGING"&&n.update(u.critical,u.impact)}}}},GCe=function(e){return function(t){return function(n){if(n.type!=="DROP_ANIMATION_FINISHED"){t(n);return}var r=e.getState();r.phase!=="DROP_ANIMATING"&&rn(!1),e.dispatch(zk({completed:r.completed}))}}},qCe=function(e){var t=null,n=null;function r(){n&&(cancelAnimationFrame(n),n=null),t&&(t(),t=null)}return function(i){return function(o){if((o.type==="FLUSH"||o.type==="DROP_COMPLETE"||o.type==="DROP_ANIMATION_FINISHED")&&r(),i(o),o.type==="DROP_ANIMATE"){var s={eventName:"scroll",options:{capture:!0,passive:!1,once:!0},fn:function(){var u=e.getState();u.phase==="DROP_ANIMATING"&&e.dispatch(fj())}};n=requestAnimationFrame(function(){n=null,t=Ja(window,[s])})}}}},ZCe=function(e){return function(){return function(t){return function(n){(n.type==="DROP_COMPLETE"||n.type==="FLUSH"||n.type==="DROP_ANIMATE")&&e.stopPublishing(),t(n)}}}},XCe=function(e){var t=!1;return function(){return function(n){return function(r){if(r.type==="INITIAL_PUBLISH"){t=!0,e.tryRecordFocus(r.payload.critical.draggable.id),n(r),e.tryRestoreFocusRecorded();return}if(n(r),!!t){if(r.type==="FLUSH"){t=!1,e.tryRestoreFocusRecorded();return}if(r.type==="DROP_COMPLETE"){t=!1;var i=r.payload.completed.result;i.combine&&e.tryShiftRecord(i.draggableId,i.combine.draggableId),e.tryRestoreFocusRecorded()}}}}}},YCe=function(t){return t.type==="DROP_COMPLETE"||t.type==="DROP_ANIMATE"||t.type==="FLUSH"},QCe=function(e){return function(t){return function(n){return function(r){if(YCe(r)){e.stop(),n(r);return}if(r.type==="INITIAL_PUBLISH"){n(r);var i=t.getState();i.phase!=="DRAGGING"&&rn(!1),e.start(i);return}n(r),e.scroll(t.getState())}}}},JCe=function(e){return function(t){return function(n){if(t(n),n.type==="PUBLISH_WHILE_DRAGGING"){var r=e.getState();r.phase==="DROP_PENDING"&&(r.isWaiting||e.dispatch(dj({reason:r.reason})))}}}},eSe=w7,tSe=function(e){var t=e.dimensionMarshal,n=e.focusMarshal,r=e.styleMarshal,i=e.getResponders,o=e.announce,s=e.autoScroller;return _7(dCe,eSe(q_e(kCe(r),ZCe(t),ICe(t),NCe,GCe,qCe,JCe,QCe(s),$Ce,XCe(n),WCe(i,o))))},DS=function(){return{additions:{},removals:{},modified:{}}};function nSe(e){var t=e.registry,n=e.callbacks,r=DS(),i=null,o=function(){i||(n.collectionStarting(),i=requestAnimationFrame(function(){i=null;var p=r,g=p.additions,v=p.removals,b=p.modified,_=Object.keys(g).map(function(P){return t.draggable.getById(P).getDimension(io)}).sort(function(P,M){return P.descriptor.index-M.descriptor.index}),T=Object.keys(b).map(function(P){var M=t.droppable.getById(P),D=M.callbacks.getScrollWhileDragging();return{droppableId:P,scroll:D}}),I={additions:_,removals:Object.keys(v),modified:T};r=DS(),n.publish(I)}))},s=function(p){var g=p.descriptor.id;r.additions[g]=p,r.modified[p.descriptor.droppableId]=!0,r.removals[g]&&delete r.removals[g],o()},a=function(p){var g=p.descriptor;r.removals[g.id]=!0,r.modified[g.droppableId]=!0,r.additions[g.id]&&delete r.additions[g.id],o()},u=function(){!i||(cancelAnimationFrame(i),i=null,r=DS())};return{add:s,remove:a,stop:u}}var mj=function(e){var t=e.scrollHeight,n=e.scrollWidth,r=e.height,i=e.width,o=ba({x:n,y:t},{x:i,y:r}),s={x:Math.max(0,o.x),y:Math.max(0,o.y)};return s},gj=function(){var e=document.documentElement;return e||rn(!1),e},vj=function(){var e=gj(),t=mj({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,width:e.clientWidth,height:e.clientHeight});return t},rSe=function(){var e=pj(),t=vj(),n=e.y,r=e.x,i=gj(),o=i.clientWidth,s=i.clientHeight,a=r+o,u=n+s,f=Ps({top:n,left:r,right:a,bottom:u}),p={frame:f,scroll:{initial:e,current:e,max:t,diff:{value:io,displacement:io}}};return p},iSe=function(e){var t=e.critical,n=e.scrollOptions,r=e.registry,i=rSe(),o=i.scroll.current,s=t.droppable,a=r.droppable.getAllByType(s.type).map(function(g){return g.callbacks.getDimensionAndWatchScroll(o,n)}),u=r.draggable.getAllByType(t.draggable.type).map(function(g){return g.getDimension(o)}),f={draggables:W7(u),droppables:K7(a)},p={dimensions:f,critical:t,viewport:i};return p};function F3(e,t,n){if(n.descriptor.id===t.id||n.descriptor.type!==t.type)return!1;var r=e.droppable.getById(n.descriptor.droppableId);return r.descriptor.mode==="virtual"}var oSe=function(e,t){var n=null,r=nSe({callbacks:{publish:t.publishWhileDragging,collectionStarting:t.collectionStarting},registry:e}),i=function(b,_){e.droppable.exists(b)||rn(!1),n&&t.updateDroppableIsEnabled({id:b,isEnabled:_})},o=function(b,_){!n||(e.droppable.exists(b)||rn(!1),t.updateDroppableIsCombineEnabled({id:b,isCombineEnabled:_}))},s=function(b,_){!n||(e.droppable.exists(b)||rn(!1),t.updateDroppableScroll({id:b,newScroll:_}))},a=function(b,_){!n||e.droppable.getById(b).callbacks.scroll(_)},u=function(){if(!!n){r.stop();var b=n.critical.droppable;e.droppable.getAllByType(b.type).forEach(function(_){return _.callbacks.dragStopped()}),n.unsubscribe(),n=null}},f=function(b){n||rn(!1);var _=n.critical.draggable;b.type==="ADDITION"&&F3(e,_,b.value)&&r.add(b.value),b.type==="REMOVAL"&&F3(e,_,b.value)&&r.remove(b.value)},p=function(b){n&&rn(!1);var _=e.draggable.getById(b.draggableId),T=e.droppable.getById(_.descriptor.droppableId),I={draggable:_.descriptor,droppable:T.descriptor},P=e.subscribe(f);return n={critical:I,unsubscribe:P},iSe({critical:I,registry:e,scrollOptions:b.scrollOptions})},g={updateDroppableIsEnabled:i,updateDroppableIsCombineEnabled:o,scrollDroppable:a,updateDroppableScroll:s,startPublishing:p,stopPublishing:u};return g},yj=function(e,t){return e.phase==="IDLE"?!0:e.phase!=="DROP_ANIMATING"||e.completed.result.draggableId===t?!1:e.completed.result.reason==="DROP"},aSe=function(e){window.scrollBy(e.x,e.y)},sSe=ro(function(e){return I1(e).filter(function(t){return!(!t.isEnabled||!t.frame)})}),lSe=function(t,n){var r=mu(sSe(n),function(i){return i.frame||rn(!1),nj(i.frame.pageMarginBox)(t)});return r},cSe=function(e){var t=e.center,n=e.destination,r=e.droppables;if(n){var i=r[n];return i.frame?i:null}var o=lSe(t,r);return o},eu={startFromPercentage:.25,maxScrollAtPercentage:.05,maxPixelScroll:28,ease:function(t){return Math.pow(t,2)},durationDampening:{stopDampeningAt:1200,accelerateAt:360}},uSe=function(e,t){var n=e[t.size]*eu.startFromPercentage,r=e[t.size]*eu.maxScrollAtPercentage,i={startScrollingFrom:n,maxScrollValueAt:r};return i},xj=function(e){var t=e.startOfRange,n=e.endOfRange,r=e.current,i=n-t;if(i===0)return 0;var o=r-t,s=o/i;return s},Bk=1,dSe=function(e,t){if(e>t.startScrollingFrom)return 0;if(e<=t.maxScrollValueAt)return eu.maxPixelScroll;if(e===t.startScrollingFrom)return Bk;var n=xj({startOfRange:t.maxScrollValueAt,endOfRange:t.startScrollingFrom,current:e}),r=1-n,i=eu.maxPixelScroll*eu.ease(r);return Math.ceil(i)},$3=eu.durationDampening.accelerateAt,B3=eu.durationDampening.stopDampeningAt,fSe=function(e,t){var n=t,r=B3,i=Date.now(),o=i-n;if(o>=B3)return e;if(o<$3)return Bk;var s=xj({startOfRange:$3,endOfRange:r,current:o}),a=e*eu.ease(s);return Math.ceil(a)},V3=function(e){var t=e.distanceToEdge,n=e.thresholds,r=e.dragStartTime,i=e.shouldUseTimeDampening,o=dSe(t,n);return o===0?0:i?Math.max(fSe(o,r),Bk):o},U3=function(e){var t=e.container,n=e.distanceToEdges,r=e.dragStartTime,i=e.axis,o=e.shouldUseTimeDampening,s=uSe(t,i),a=n[i.end]<n[i.start];return a?V3({distanceToEdge:n[i.end],thresholds:s,dragStartTime:r,shouldUseTimeDampening:o}):-1*V3({distanceToEdge:n[i.start],thresholds:s,dragStartTime:r,shouldUseTimeDampening:o})},hSe=function(e){var t=e.container,n=e.subject,r=e.proposedScroll,i=n.height>t.height,o=n.width>t.width;return!o&&!i?r:o&&i?null:{x:o?0:r.x,y:i?0:r.y}},pSe=j7(function(e){return e===0?0:e}),bj=function(e){var t=e.dragStartTime,n=e.container,r=e.subject,i=e.center,o=e.shouldUseTimeDampening,s={top:i.y-n.top,right:n.right-i.x,bottom:n.bottom-i.y,left:i.x-n.left},a=U3({container:n,distanceToEdges:s,dragStartTime:t,axis:Rk,shouldUseTimeDampening:o}),u=U3({container:n,distanceToEdges:s,dragStartTime:t,axis:Z7,shouldUseTimeDampening:o}),f=pSe({x:u,y:a});if(Jc(f,io))return null;var p=hSe({container:n,subject:r,proposedScroll:f});return p?Jc(p,io)?null:p:null},mSe=j7(function(e){return e===0?0:e>0?1:-1}),Vk=function(){var e=function(n,r){return n<0?n:n>r?n-r:0};return function(t){var n=t.current,r=t.max,i=t.change,o=fo(n,i),s={x:e(o.x,r.x),y:e(o.y,r.y)};return Jc(s,io)?null:s}}(),_j=function(t){var n=t.max,r=t.current,i=t.change,o={x:Math.max(r.x,n.x),y:Math.max(r.y,n.y)},s=mSe(i),a=Vk({max:o,current:r,change:s});return!a||s.x!==0&&a.x===0||s.y!==0&&a.y===0},Uk=function(t,n){return _j({current:t.scroll.current,max:t.scroll.max,change:n})},gSe=function(t,n){if(!Uk(t,n))return null;var r=t.scroll.max,i=t.scroll.current;return Vk({current:i,max:r,change:n})},jk=function(t,n){var r=t.frame;return r?_j({current:r.scroll.current,max:r.scroll.max,change:n}):!1},vSe=function(t,n){var r=t.frame;return!r||!jk(t,n)?null:Vk({current:r.scroll.current,max:r.scroll.max,change:n})},ySe=function(e){var t=e.viewport,n=e.subject,r=e.center,i=e.dragStartTime,o=e.shouldUseTimeDampening,s=bj({dragStartTime:i,container:t.frame,subject:n,center:r,shouldUseTimeDampening:o});return s&&Uk(t,s)?s:null},xSe=function(e){var t=e.droppable,n=e.subject,r=e.center,i=e.dragStartTime,o=e.shouldUseTimeDampening,s=t.frame;if(!s)return null;var a=bj({dragStartTime:i,container:s.pageMarginBox,subject:n,center:r,shouldUseTimeDampening:o});return a&&jk(t,a)?a:null},j3=function(e){var t=e.state,n=e.dragStartTime,r=e.shouldUseTimeDampening,i=e.scrollWindow,o=e.scrollDroppable,s=t.current.page.borderBoxCenter,a=t.dimensions.draggables[t.critical.draggable.id],u=a.page.marginBox;if(t.isWindowScrollAllowed){var f=t.viewport,p=ySe({dragStartTime:n,viewport:f,subject:u,center:s,shouldUseTimeDampening:r});if(p){i(p);return}}var g=cSe({center:s,destination:Sa(t.impact),droppables:t.dimensions.droppables});if(!!g){var v=xSe({dragStartTime:n,droppable:g,subject:u,center:s,shouldUseTimeDampening:r});v&&o(g.descriptor.id,v)}},bSe=function(e){var t=e.scrollWindow,n=e.scrollDroppable,r=Og(t),i=Og(n),o=null,s=function(p){o||rn(!1);var g=o,v=g.shouldUseTimeDampening,b=g.dragStartTime;j3({state:p,scrollWindow:r,scrollDroppable:i,dragStartTime:b,shouldUseTimeDampening:v})},a=function(p){o&&rn(!1);var g=Date.now(),v=!1,b=function(){v=!0};j3({state:p,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:b,scrollDroppable:b}),o={dragStartTime:g,shouldUseTimeDampening:v},v&&s(p)},u=function(){!o||(r.cancel(),i.cancel(),o=null)};return{start:a,stop:u,scroll:s}},_Se=function(e){var t=e.move,n=e.scrollDroppable,r=e.scrollWindow,i=function(f,p){var g=fo(f.current.client.selection,p);t({client:g})},o=function(f,p){if(!jk(f,p))return p;var g=vSe(f,p);if(!g)return n(f.descriptor.id,p),null;var v=ba(p,g);n(f.descriptor.id,v);var b=ba(p,v);return b},s=function(f,p,g){if(!f||!Uk(p,g))return g;var v=gSe(p,g);if(!v)return r(g),null;var b=ba(g,v);r(b);var _=ba(g,b);return _},a=function(f){var p=f.scrollJumpRequest;if(!!p){var g=Sa(f.impact);g||rn(!1);var v=o(f.dimensions.droppables[g],p);if(!!v){var b=f.viewport,_=s(f.isWindowScrollAllowed,b,v);!_||i(f,_)}}};return a},wSe=function(e){var t=e.scrollDroppable,n=e.scrollWindow,r=e.move,i=bSe({scrollWindow:n,scrollDroppable:t}),o=_Se({move:r,scrollWindow:n,scrollDroppable:t}),s=function(f){if(f.phase==="DRAGGING"){if(f.movementMode==="FLUID"){i.scroll(f);return}!f.scrollJumpRequest||o(f)}},a={scroll:s,start:i.start,stop:i.stop};return a},Th="data-rbd",Ih=function(){var e=Th+"-drag-handle";return{base:e,draggableId:e+"-draggable-id",contextId:e+"-context-id"}}(),IP=function(){var e=Th+"-draggable";return{base:e,contextId:e+"-context-id",id:e+"-id"}}(),CSe=function(){var e=Th+"-droppable";return{base:e,contextId:e+"-context-id",id:e+"-id"}}(),H3={contextId:Th+"-scroll-container-context-id"},SSe=function(t){return function(n){return"["+n+'="'+t+'"]'}},fm=function(t,n){return t.map(function(r){var i=r.styles[n];return i?r.selector+" { "+i+" }":""}).join(" ")},ESe="pointer-events: none;",PSe=function(e){var t=SSe(e),n=function(){var a=`
cursor: -webkit-grab;
cursor: grab;
`;return{selector:t(Ih.contextId),styles:{always:`
-webkit-touch-callout: none;
-webkit-tap-highlight-color: rgba(0,0,0,0);
touch-action: manipulation;
`,resting:a,dragging:ESe,dropAnimating:a}}}(),r=function(){var a=`
transition: `+Ym.outOfTheWay+`;
`;return{selector:t(IP.contextId),styles:{dragging:a,dropAnimating:a,userCancel:a}}}(),i={selector:t(CSe.contextId),styles:{always:"overflow-anchor: none;"}},o={selector:"body",styles:{dragging:`
cursor: grabbing;
cursor: -webkit-grabbing;
user-select: none;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
overflow-anchor: none;
`}},s=[r,n,i,o];return{always:fm(s,"always"),resting:fm(s,"resting"),dragging:fm(s,"dragging"),dropAnimating:fm(s,"dropAnimating"),userCancel:fm(s,"userCancel")}},Ea=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?E.exports.useLayoutEffect:E.exports.useEffect,AS=function(){var t=document.querySelector("head");return t||rn(!1),t},K3=function(t){var n=document.createElement("style");return t&&n.setAttribute("nonce",t),n.type="text/css",n};function TSe(e,t){var n=yr(function(){return PSe(e)},[e]),r=E.exports.useRef(null),i=E.exports.useRef(null),o=Dn(ro(function(g){var v=i.current;v||rn(!1),v.textContent=g}),[]),s=Dn(function(g){var v=r.current;v||rn(!1),v.textContent=g},[]);Ea(function(){!r.current&&!i.current||rn(!1);var g=K3(t),v=K3(t);return r.current=g,i.current=v,g.setAttribute(Th+"-always",e),v.setAttribute(Th+"-dynamic",e),AS().appendChild(g),AS().appendChild(v),s(n.always),o(n.resting),function(){var b=function(T){var I=T.current;I||rn(!1),AS().removeChild(I),T.current=null};b(r),b(i)}},[t,s,o,n.always,n.resting,e]);var a=Dn(function(){return o(n.dragging)},[o,n.dragging]),u=Dn(function(g){if(g==="DROP"){o(n.dropAnimating);return}o(n.userCancel)},[o,n.dropAnimating,n.userCancel]),f=Dn(function(){!i.current||o(n.resting)},[o,n.resting]),p=yr(function(){return{dragging:a,dropping:u,resting:f}},[a,u,f]);return p}var wj=function(e){return e&&e.ownerDocument?e.ownerDocument.defaultView:window};function O1(e){return e instanceof wj(e).HTMLElement}function ISe(e,t){var n="["+Ih.contextId+'="'+e+'"]',r=H7(document.querySelectorAll(n));if(!r.length)return null;var i=mu(r,function(o){return o.getAttribute(Ih.draggableId)===t});return!i||!O1(i)?null:i}function kSe(e){var t=E.exports.useRef({}),n=E.exports.useRef(null),r=E.exports.useRef(null),i=E.exports.useRef(!1),o=Dn(function(v,b){var _={id:v,focus:b};return t.current[v]=_,function(){var I=t.current,P=I[v];P!==_&&delete I[v]}},[]),s=Dn(function(v){var b=ISe(e,v);b&&b!==document.activeElement&&b.focus()},[e]),a=Dn(function(v,b){n.current===v&&(n.current=b)},[]),u=Dn(function(){r.current||!i.current||(r.current=requestAnimationFrame(function(){r.current=null;var v=n.current;v&&s(v)}))},[s]),f=Dn(function(v){n.current=null;var b=document.activeElement;!b||b.getAttribute(Ih.draggableId)===v&&(n.current=v)},[]);Ea(function(){return i.current=!0,function(){i.current=!1;var v=r.current;v&&cancelAnimationFrame(v)}},[]);var p=yr(function(){return{register:o,tryRecordFocus:f,tryRestoreFocusRecorded:u,tryShiftRecord:a}},[o,f,u,a]);return p}function MSe(){var e={draggables:{},droppables:{}},t=[];function n(g){return t.push(g),function(){var b=t.indexOf(g);b!==-1&&t.splice(b,1)}}function r(g){t.length&&t.forEach(function(v){return v(g)})}function i(g){return e.draggables[g]||null}function o(g){var v=i(g);return v||rn(!1),v}var s={register:function(v){e.draggables[v.descriptor.id]=v,r({type:"ADDITION",value:v})},update:function(v,b){var _=e.draggables[b.descriptor.id];!_||_.uniqueId===v.uniqueId&&(delete e.draggables[b.descriptor.id],e.draggables[v.descriptor.id]=v)},unregister:function(v){var b=v.descriptor.id,_=i(b);!_||v.uniqueId===_.uniqueId&&(delete e.draggables[b],r({type:"REMOVAL",value:v}))},getById:o,findById:i,exists:function(v){return Boolean(i(v))},getAllByType:function(v){return jb(e.draggables).filter(function(b){return b.descriptor.type===v})}};function a(g){return e.droppables[g]||null}function u(g){var v=a(g);return v||rn(!1),v}var f={register:function(v){e.droppables[v.descriptor.id]=v},unregister:function(v){var b=a(v.descriptor.id);!b||v.uniqueId===b.uniqueId&&delete e.droppables[v.descriptor.id]},getById:u,findById:a,exists:function(v){return Boolean(a(v))},getAllByType:function(v){return jb(e.droppables).filter(function(b){return b.descriptor.type===v})}};function p(){e.draggables={},e.droppables={},t.length=0}return{draggable:s,droppable:f,subscribe:n,clean:p}}function RSe(){var e=yr(MSe,[]);return E.exports.useEffect(function(){return function(){requestAnimationFrame(e.clean)}},[e]),e}var Hk=Un.createContext(null),Kb=function(){var e=document.body;return e||rn(!1),e},OSe={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"},DSe=function(t){return"rbd-announcement-"+t};function ASe(e){var t=yr(function(){return DSe(e)},[e]),n=E.exports.useRef(null);E.exports.useEffect(function(){var o=document.createElement("div");return n.current=o,o.id=t,o.setAttribute("aria-live","assertive"),o.setAttribute("aria-atomic","true"),qn(o.style,OSe),Kb().appendChild(o),function(){setTimeout(function(){var u=Kb();u.contains(o)&&u.removeChild(o),o===n.current&&(n.current=null)})}},[t]);var r=Dn(function(i){var o=n.current;if(o){o.textContent=i;return}},[]);return r}var NSe=0,LSe={separator:"::"};function Kk(e,t){return t===void 0&&(t=LSe),yr(function(){return""+e+t.separator+NSe++},[t.separator,e])}function zSe(e){var t=e.contextId,n=e.uniqueId;return"rbd-hidden-text-"+t+"-"+n}function FSe(e){var t=e.contextId,n=e.text,r=Kk("hidden-text",{separator:"-"}),i=yr(function(){return zSe({contextId:t,uniqueId:r})},[r,t]);return E.exports.useEffect(function(){var s=document.createElement("div");return s.id=i,s.textContent=n,s.style.display="none",Kb().appendChild(s),function(){var u=Kb();u.contains(s)&&u.removeChild(s)}},[i,n]),i}var D1=Un.createContext(null);function Cj(e){var t=E.exports.useRef(e);return E.exports.useEffect(function(){t.current=e}),t}function $Se(){var e=null;function t(){return Boolean(e)}function n(s){return s===e}function r(s){e&&rn(!1);var a={abandon:s};return e=a,a}function i(){e||rn(!1),e=null}function o(){e&&(e.abandon(),i())}return{isClaimed:t,isActive:n,claim:r,release:i,tryAbandon:o}}var BSe=9,VSe=13,Wk=27,Sj=32,USe=33,jSe=34,HSe=35,KSe=36,WSe=37,GSe=38,qSe=39,ZSe=40,Px,XSe=(Px={},Px[VSe]=!0,Px[BSe]=!0,Px),Ej=function(e){XSe[e.keyCode]&&e.preventDefault()},A1=function(){var e="visibilitychange";if(typeof document>"u")return e;var t=[e,"ms"+e,"webkit"+e,"moz"+e,"o"+e],n=mu(t,function(r){return"on"+r in document});return n||e}(),Pj=0,W3=5;function YSe(e,t){return Math.abs(t.x-e.x)>=W3||Math.abs(t.y-e.y)>=W3}var G3={type:"IDLE"};function QSe(e){var t=e.cancel,n=e.completed,r=e.getPhase,i=e.setPhase;return[{eventName:"mousemove",fn:function(s){var a=s.button,u=s.clientX,f=s.clientY;if(a===Pj){var p={x:u,y:f},g=r();if(g.type==="DRAGGING"){s.preventDefault(),g.actions.move(p);return}g.type!=="PENDING"&&rn(!1);var v=g.point;if(!!YSe(v,p)){s.preventDefault();var b=g.actions.fluidLift(p);i({type:"DRAGGING",actions:b})}}}},{eventName:"mouseup",fn:function(s){var a=r();if(a.type!=="DRAGGING"){t();return}s.preventDefault(),a.actions.drop({shouldBlockNextClick:!0}),n()}},{eventName:"mousedown",fn:function(s){r().type==="DRAGGING"&&s.preventDefault(),t()}},{eventName:"keydown",fn:function(s){var a=r();if(a.type==="PENDING"){t();return}if(s.keyCode===Wk){s.preventDefault(),t();return}Ej(s)}},{eventName:"resize",fn:t},{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(){r().type==="PENDING"&&t()}},{eventName:"webkitmouseforcedown",fn:function(s){var a=r();if(a.type==="IDLE"&&rn(!1),a.actions.shouldRespectForcePress()){t();return}s.preventDefault()}},{eventName:A1,fn:t}]}function JSe(e){var t=E.exports.useRef(G3),n=E.exports.useRef(Qc),r=yr(function(){return{eventName:"mousedown",fn:function(g){if(!g.defaultPrevented&&g.button===Pj&&!(g.ctrlKey||g.metaKey||g.shiftKey||g.altKey)){var v=e.findClosestDraggableId(g);if(!!v){var b=e.tryGetLock(v,s,{sourceEvent:g});if(!!b){g.preventDefault();var _={x:g.clientX,y:g.clientY};n.current(),f(b,_)}}}}}},[e]),i=yr(function(){return{eventName:"webkitmouseforcewillbegin",fn:function(g){if(!g.defaultPrevented){var v=e.findClosestDraggableId(g);if(!!v){var b=e.findOptionsForDraggable(v);!b||b.shouldRespectForcePress||!e.canGetLock(v)||g.preventDefault()}}}}},[e]),o=Dn(function(){var g={passive:!1,capture:!0};n.current=Ja(window,[i,r],g)},[i,r]),s=Dn(function(){var p=t.current;p.type!=="IDLE"&&(t.current=G3,n.current(),o())},[o]),a=Dn(function(){var p=t.current;s(),p.type==="DRAGGING"&&p.actions.cancel({shouldBlockNextClick:!0}),p.type==="PENDING"&&p.actions.abort()},[s]),u=Dn(function(){var g={capture:!0,passive:!1},v=QSe({cancel:a,completed:s,getPhase:function(){return t.current},setPhase:function(_){t.current=_}});n.current=Ja(window,v,g)},[a,s]),f=Dn(function(g,v){t.current.type!=="IDLE"&&rn(!1),t.current={type:"PENDING",point:v,actions:g},u()},[u]);Ea(function(){return o(),function(){n.current()}},[o])}var Tf;function e2e(){}var t2e=(Tf={},Tf[jSe]=!0,Tf[USe]=!0,Tf[KSe]=!0,Tf[HSe]=!0,Tf);function n2e(e,t){function n(){t(),e.cancel()}function r(){t(),e.drop()}return[{eventName:"keydown",fn:function(o){if(o.keyCode===Wk){o.preventDefault(),n();return}if(o.keyCode===Sj){o.preventDefault(),r();return}if(o.keyCode===ZSe){o.preventDefault(),e.moveDown();return}if(o.keyCode===GSe){o.preventDefault(),e.moveUp();return}if(o.keyCode===qSe){o.preventDefault(),e.moveRight();return}if(o.keyCode===WSe){o.preventDefault(),e.moveLeft();return}if(t2e[o.keyCode]){o.preventDefault();return}Ej(o)}},{eventName:"mousedown",fn:n},{eventName:"mouseup",fn:n},{eventName:"click",fn:n},{eventName:"touchstart",fn:n},{eventName:"resize",fn:n},{eventName:"wheel",fn:n,options:{passive:!0}},{eventName:A1,fn:n}]}function r2e(e){var t=E.exports.useRef(e2e),n=yr(function(){return{eventName:"keydown",fn:function(o){if(o.defaultPrevented||o.keyCode!==Sj)return;var s=e.findClosestDraggableId(o);if(!s)return;var a=e.tryGetLock(s,p,{sourceEvent:o});if(!a)return;o.preventDefault();var u=!0,f=a.snapLift();t.current();function p(){u||rn(!1),u=!1,t.current(),r()}t.current=Ja(window,n2e(f,p),{capture:!0,passive:!1})}}},[e]),r=Dn(function(){var o={passive:!1,capture:!0};t.current=Ja(window,[n],o)},[n]);Ea(function(){return r(),function(){t.current()}},[r])}var NS={type:"IDLE"},i2e=120,o2e=.15;function a2e(e){var t=e.cancel,n=e.getPhase;return[{eventName:"orientationchange",fn:t},{eventName:"resize",fn:t},{eventName:"contextmenu",fn:function(i){i.preventDefault()}},{eventName:"keydown",fn:function(i){if(n().type!=="DRAGGING"){t();return}i.keyCode===Wk&&i.preventDefault(),t()}},{eventName:A1,fn:t}]}function s2e(e){var t=e.cancel,n=e.completed,r=e.getPhase;return[{eventName:"touchmove",options:{capture:!1},fn:function(o){var s=r();if(s.type!=="DRAGGING"){t();return}s.hasMoved=!0;var a=o.touches[0],u=a.clientX,f=a.clientY,p={x:u,y:f};o.preventDefault(),s.actions.move(p)}},{eventName:"touchend",fn:function(o){var s=r();if(s.type!=="DRAGGING"){t();return}o.preventDefault(),s.actions.drop({shouldBlockNextClick:!0}),n()}},{eventName:"touchcancel",fn:function(o){if(r().type!=="DRAGGING"){t();return}o.preventDefault(),t()}},{eventName:"touchforcechange",fn:function(o){var s=r();s.type==="IDLE"&&rn(!1);var a=o.touches[0];if(!!a){var u=a.force>=o2e;if(!!u){var f=s.actions.shouldRespectForcePress();if(s.type==="PENDING"){f&&t();return}if(f){if(s.hasMoved){o.preventDefault();return}t();return}o.preventDefault()}}}},{eventName:A1,fn:t}]}function l2e(e){var t=E.exports.useRef(NS),n=E.exports.useRef(Qc),r=Dn(function(){return t.current},[]),i=Dn(function(b){t.current=b},[]),o=yr(function(){return{eventName:"touchstart",fn:function(b){if(!b.defaultPrevented){var _=e.findClosestDraggableId(b);if(!!_){var T=e.tryGetLock(_,a,{sourceEvent:b});if(!!T){var I=b.touches[0],P=I.clientX,M=I.clientY,D={x:P,y:M};n.current(),g(T,D)}}}}}},[e]),s=Dn(function(){var b={capture:!0,passive:!1};n.current=Ja(window,[o],b)},[o]),a=Dn(function(){var v=t.current;v.type!=="IDLE"&&(v.type==="PENDING"&&clearTimeout(v.longPressTimerId),i(NS),n.current(),s())},[s,i]),u=Dn(function(){var v=t.current;a(),v.type==="DRAGGING"&&v.actions.cancel({shouldBlockNextClick:!0}),v.type==="PENDING"&&v.actions.abort()},[a]),f=Dn(function(){var b={capture:!0,passive:!1},_={cancel:u,completed:a,getPhase:r},T=Ja(window,s2e(_),b),I=Ja(window,a2e(_),b);n.current=function(){T(),I()}},[u,r,a]),p=Dn(function(){var b=r();b.type!=="PENDING"&&rn(!1);var _=b.actions.fluidLift(b.point);i({type:"DRAGGING",actions:_,hasMoved:!1})},[r,i]),g=Dn(function(b,_){r().type!=="IDLE"&&rn(!1);var T=setTimeout(p,i2e);i({type:"PENDING",point:_,actions:b,longPressTimerId:T}),f()},[f,r,i,p]);Ea(function(){return s(),function(){n.current();var _=r();_.type==="PENDING"&&(clearTimeout(_.longPressTimerId),i(NS))}},[r,s,i]),Ea(function(){var b=Ja(window,[{eventName:"touchmove",fn:function(){},options:{capture:!1,passive:!1}}]);return b},[])}var c2e={input:!0,button:!0,textarea:!0,select:!0,option:!0,optgroup:!0,video:!0,audio:!0};function Tj(e,t){if(t==null)return!1;var n=Boolean(c2e[t.tagName.toLowerCase()]);if(n)return!0;var r=t.getAttribute("contenteditable");return r==="true"||r===""?!0:t===e?!1:Tj(e,t.parentElement)}function u2e(e,t){var n=t.target;return O1(n)?Tj(e,n):!1}var d2e=function(e){return Ps(e.getBoundingClientRect()).center};function f2e(e){return e instanceof wj(e).Element}var h2e=function(){var e="matches";if(typeof document>"u")return e;var t=[e,"msMatchesSelector","webkitMatchesSelector"],n=mu(t,function(r){return r in Element.prototype});return n||e}();function Ij(e,t){return e==null?null:e[h2e](t)?e:Ij(e.parentElement,t)}function p2e(e,t){return e.closest?e.closest(t):Ij(e,t)}function m2e(e){return"["+Ih.contextId+'="'+e+'"]'}function g2e(e,t){var n=t.target;if(!f2e(n))return null;var r=m2e(e),i=p2e(n,r);return!i||!O1(i)?null:i}function v2e(e,t){var n=g2e(e,t);return n?n.getAttribute(Ih.draggableId):null}function y2e(e,t){var n="["+IP.contextId+'="'+e+'"]',r=H7(document.querySelectorAll(n)),i=mu(r,function(o){return o.getAttribute(IP.id)===t});return!i||!O1(i)?null:i}function x2e(e){e.preventDefault()}function Tx(e){var t=e.expected,n=e.phase,r=e.isLockActive;return e.shouldWarn,!(!r()||t!==n)}function kj(e){var t=e.lockAPI,n=e.store,r=e.registry,i=e.draggableId;if(t.isClaimed())return!1;var o=r.draggable.findById(i);return!(!o||!o.options.isEnabled||!yj(n.getState(),i))}function b2e(e){var t=e.lockAPI,n=e.contextId,r=e.store,i=e.registry,o=e.draggableId,s=e.forceSensorStop,a=e.sourceEvent,u=kj({lockAPI:t,store:r,registry:i,draggableId:o});if(!u)return null;var f=i.draggable.getById(o),p=y2e(n,f.descriptor.id);if(!p||a&&!f.options.canDragInteractiveElements&&u2e(p,a))return null;var g=t.claim(s||Qc),v="PRE_DRAG";function b(){return f.options.shouldRespectForcePress}function _(){return t.isActive(g)}function T($,j){Tx({expected:$,phase:v,isLockActive:_,shouldWarn:!0})&&r.dispatch(j())}var I=T.bind(null,"DRAGGING");function P($){function j(){t.release(),v="COMPLETED"}v!=="PRE_DRAG"&&(j(),v!=="PRE_DRAG"&&rn(!1)),r.dispatch(hCe($.liftActionArgs)),v="DRAGGING";function U(q,Y){if(Y===void 0&&(Y={shouldBlockNextClick:!1}),$.cleanup(),Y.shouldBlockNextClick){var te=Ja(window,[{eventName:"click",fn:x2e,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(te)}j(),r.dispatch(dj({reason:q}))}return qn({isActive:function(){return Tx({expected:"DRAGGING",phase:v,isLockActive:_,shouldWarn:!1})},shouldRespectForcePress:b,drop:function(Y){return U("DROP",Y)},cancel:function(Y){return U("CANCEL",Y)}},$.actions)}function M($){var j=Og(function(q){I(function(){return uj({client:q})})}),U=P({liftActionArgs:{id:o,clientSelection:$,movementMode:"FLUID"},cleanup:function(){return j.cancel()},actions:{move:j}});return qn({},U,{move:j})}function D(){var $={moveUp:function(){return I(wCe)},moveRight:function(){return I(SCe)},moveDown:function(){return I(CCe)},moveLeft:function(){return I(ECe)}};return P({liftActionArgs:{id:o,clientSelection:d2e(p),movementMode:"SNAP"},cleanup:Qc,actions:$})}function N(){var $=Tx({expected:"PRE_DRAG",phase:v,isLockActive:_,shouldWarn:!0});$&&t.release()}var z={isActive:function(){return Tx({expected:"PRE_DRAG",phase:v,isLockActive:_,shouldWarn:!1})},shouldRespectForcePress:b,fluidLift:M,snapLift:D,abort:N};return z}var _2e=[JSe,r2e,l2e];function w2e(e){var t=e.contextId,n=e.store,r=e.registry,i=e.customSensors,o=e.enableDefaultSensors,s=[].concat(o?_2e:[],i||[]),a=E.exports.useState(function(){return $Se()})[0],u=Dn(function(M,D){M.isDragging&&!D.isDragging&&a.tryAbandon()},[a]);Ea(function(){var M=n.getState(),D=n.subscribe(function(){var N=n.getState();u(M,N),M=N});return D},[a,n,u]),Ea(function(){return a.tryAbandon},[a.tryAbandon]);for(var f=Dn(function(P){return kj({lockAPI:a,registry:r,store:n,draggableId:P})},[a,r,n]),p=Dn(function(P,M,D){return b2e({lockAPI:a,registry:r,contextId:t,store:n,draggableId:P,forceSensorStop:M,sourceEvent:D&&D.sourceEvent?D.sourceEvent:null})},[t,a,r,n]),g=Dn(function(P){return v2e(t,P)},[t]),v=Dn(function(P){var M=r.draggable.findById(P);return M?M.options:null},[r.draggable]),b=Dn(function(){!a.isClaimed()||(a.tryAbandon(),n.getState().phase!=="IDLE"&&n.dispatch(Lk()))},[a,n]),_=Dn(a.isClaimed,[a]),T=yr(function(){return{canGetLock:f,tryGetLock:p,findClosestDraggableId:g,findOptionsForDraggable:v,tryReleaseLock:b,isLockClaimed:_}},[f,p,g,v,b,_]),I=0;I<s.length;I++)s[I](T)}var C2e=function(t){return{onBeforeCapture:t.onBeforeCapture,onBeforeDragStart:t.onBeforeDragStart,onDragStart:t.onDragStart,onDragEnd:t.onDragEnd,onDragUpdate:t.onDragUpdate}};function hm(e){return e.current||rn(!1),e.current}function S2e(e){var t=e.contextId,n=e.setCallbacks,r=e.sensors,i=e.nonce,o=e.dragHandleUsageInstructions,s=E.exports.useRef(null),a=Cj(e),u=Dn(function(){return C2e(a.current)},[a]),f=ASe(t),p=FSe({contextId:t,text:o}),g=TSe(t,i),v=Dn(function(q){hm(s).dispatch(q)},[]),b=yr(function(){return g3({publishWhileDragging:mCe,updateDroppableScroll:vCe,updateDroppableIsEnabled:yCe,updateDroppableIsCombineEnabled:xCe,collectionStarting:gCe},v)},[v]),_=RSe(),T=yr(function(){return oSe(_,b)},[_,b]),I=yr(function(){return wSe(qn({scrollWindow:aSe,scrollDroppable:T.scrollDroppable},g3({move:uj},v)))},[T.scrollDroppable,v]),P=kSe(t),M=yr(function(){return tSe({announce:f,autoScroller:I,dimensionMarshal:T,focusMarshal:P,getResponders:u,styleMarshal:g})},[f,I,T,P,u,g]);s.current=M;var D=Dn(function(){var q=hm(s),Y=q.getState();Y.phase!=="IDLE"&&q.dispatch(Lk())},[]),N=Dn(function(){var q=hm(s).getState();return q.isDragging||q.phase==="DROP_ANIMATING"},[]),z=yr(function(){return{isDragging:N,tryAbort:D}},[N,D]);n(z);var $=Dn(function(q){return yj(hm(s).getState(),q)},[]),j=Dn(function(){return nd(hm(s).getState())},[]),U=yr(function(){return{marshal:T,focus:P,contextId:t,canLift:$,isMovementAllowed:j,dragHandleUsageInstructionsId:p,registry:_}},[t,T,p,P,$,j,_]);return w2e({contextId:t,store:M,registry:_,customSensors:r,enableDefaultSensors:e.enableDefaultSensors!==!1}),E.exports.useEffect(function(){return D},[D]),A(D1.Provider,{value:U,children:A(J_e,{context:Hk,store:M,children:e.children})})}var E2e=0;function P2e(){return yr(function(){return""+E2e++},[])}function T2e(e){var t=P2e(),n=e.dragHandleUsageInstructions||x0.dragHandleUsageInstructions;return A(rwe,{children:function(r){return A(S2e,{nonce:e.nonce,contextId:t,setCallbacks:r,dragHandleUsageInstructions:n,enableDefaultSensors:e.enableDefaultSensors,sensors:e.sensors,onBeforeCapture:e.onBeforeCapture,onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragUpdate:e.onDragUpdate,onDragEnd:e.onDragEnd,children:e.children})}})}var Mj=function(t){return function(n){return t===n}},I2e=Mj("scroll"),k2e=Mj("auto"),q3=function(t,n){return n(t.overflowX)||n(t.overflowY)},M2e=function(t){var n=window.getComputedStyle(t),r={overflowX:n.overflowX,overflowY:n.overflowY};return q3(r,I2e)||q3(r,k2e)},R2e=function(){return!1},O2e=function e(t){return t==null?null:t===document.body?R2e()?t:null:t===document.documentElement?null:M2e(t)?t:e(t.parentElement)},kP=function(e){return{x:e.scrollLeft,y:e.scrollTop}},D2e=function e(t){if(!t)return!1;var n=window.getComputedStyle(t);return n.position==="fixed"?!0:e(t.parentElement)},A2e=function(e){var t=O2e(e),n=D2e(e);return{closestScrollable:t,isFixedOnPage:n}},N2e=function(e){var t=e.descriptor,n=e.isEnabled,r=e.isCombineEnabled,i=e.isFixedOnPage,o=e.direction,s=e.client,a=e.page,u=e.closest,f=function(){if(!u)return null;var b=u.scrollSize,_=u.client,T=mj({scrollHeight:b.scrollHeight,scrollWidth:b.scrollWidth,height:_.paddingBox.height,width:_.paddingBox.width});return{pageMarginBox:u.page.marginBox,frameClient:_,scrollSize:b,shouldClipSubject:u.shouldClipSubject,scroll:{initial:u.scroll,current:u.scroll,max:T,diff:{value:io,displacement:io}}}}(),p=o==="vertical"?Rk:Z7,g=Ph({page:a,withPlaceholder:null,axis:p,frame:f}),v={descriptor:t,isCombineEnabled:r,isFixedOnPage:i,axis:p,isEnabled:n,client:s,page:a,frame:f,subject:g};return v},L2e=function(t,n){var r=$7(t);if(!n||t!==n)return r;var i=r.paddingBox.top-n.scrollTop,o=r.paddingBox.left-n.scrollLeft,s=i+n.scrollHeight,a=o+n.scrollWidth,u={top:i,right:a,bottom:s,left:o},f=Pk(u,r.border),p=Tk({borderBox:f,margin:r.margin,border:r.border,padding:r.padding});return p},z2e=function(e){var t=e.ref,n=e.descriptor,r=e.env,i=e.windowScroll,o=e.direction,s=e.isDropDisabled,a=e.isCombineEnabled,u=e.shouldClipSubject,f=r.closestScrollable,p=L2e(t,f),g=Bb(p,i),v=function(){if(!f)return null;var _=$7(f),T={scrollHeight:f.scrollHeight,scrollWidth:f.scrollWidth};return{client:_,page:Bb(_,i),scroll:kP(f),scrollSize:T,shouldClipSubject:u}}(),b=N2e({descriptor:n,isEnabled:!s,isCombineEnabled:a,isFixedOnPage:r.isFixedOnPage,direction:o,client:p,page:g,closest:v});return b},F2e={passive:!1},$2e={passive:!0},Z3=function(e){return e.shouldPublishImmediately?F2e:$2e};function Wb(e){var t=E.exports.useContext(e);return t||rn(!1),t}var Ix=function(t){return t&&t.env.closestScrollable||null};function B2e(e){var t=E.exports.useRef(null),n=Wb(D1),r=Kk("droppable"),i=n.registry,o=n.marshal,s=Cj(e),a=yr(function(){return{id:e.droppableId,type:e.type,mode:e.mode}},[e.droppableId,e.mode,e.type]),u=E.exports.useRef(a),f=yr(function(){return ro(function(N,z){t.current||rn(!1);var $={x:N,y:z};o.updateDroppableScroll(a.id,$)})},[a.id,o]),p=Dn(function(){var N=t.current;return!N||!N.env.closestScrollable?io:kP(N.env.closestScrollable)},[]),g=Dn(function(){var N=p();f(N.x,N.y)},[p,f]),v=yr(function(){return Og(g)},[g]),b=Dn(function(){var N=t.current,z=Ix(N);N&&z||rn(!1);var $=N.scrollOptions;if($.shouldPublishImmediately){g();return}v()},[v,g]),_=Dn(function(N,z){t.current&&rn(!1);var $=s.current,j=$.getDroppableRef();j||rn(!1);var U=A2e(j),q={ref:j,descriptor:a,env:U,scrollOptions:z};t.current=q;var Y=z2e({ref:j,descriptor:a,env:U,windowScroll:N,direction:$.direction,isDropDisabled:$.isDropDisabled,isCombineEnabled:$.isCombineEnabled,shouldClipSubject:!$.ignoreContainerClipping}),te=U.closestScrollable;return te&&(te.setAttribute(H3.contextId,n.contextId),te.addEventListener("scroll",b,Z3(q.scrollOptions))),Y},[n.contextId,a,b,s]),T=Dn(function(){var N=t.current,z=Ix(N);return N&&z||rn(!1),kP(z)},[]),I=Dn(function(){var N=t.current;N||rn(!1);var z=Ix(N);t.current=null,z&&(v.cancel(),z.removeAttribute(H3.contextId),z.removeEventListener("scroll",b,Z3(N.scrollOptions)))},[b,v]),P=Dn(function(N){var z=t.current;z||rn(!1);var $=Ix(z);$||rn(!1),$.scrollTop+=N.y,$.scrollLeft+=N.x},[]),M=yr(function(){return{getDimensionAndWatchScroll:_,getScrollWhileDragging:T,dragStopped:I,scroll:P}},[I,_,T,P]),D=yr(function(){return{uniqueId:r,descriptor:a,callbacks:M}},[M,a,r]);Ea(function(){return u.current=D.descriptor,i.droppable.register(D),function(){t.current&&I(),i.droppable.unregister(D)}},[M,a,I,D,o,i.droppable]),Ea(function(){!t.current||o.updateDroppableIsEnabled(u.current.id,!e.isDropDisabled)},[e.isDropDisabled,o]),Ea(function(){!t.current||o.updateDroppableIsCombineEnabled(u.current.id,e.isCombineEnabled)},[e.isCombineEnabled,o])}function LS(){}var X3={width:0,height:0,margin:cwe},V2e=function(t){var n=t.isAnimatingOpenOnMount,r=t.placeholder,i=t.animate;return n||i==="close"?X3:{height:r.client.borderBox.height,width:r.client.borderBox.width,margin:r.client.margin}},U2e=function(t){var n=t.isAnimatingOpenOnMount,r=t.placeholder,i=t.animate,o=V2e({isAnimatingOpenOnMount:n,placeholder:r,animate:i});return{display:r.display,boxSizing:"border-box",width:o.width,height:o.height,marginTop:o.margin.top,marginRight:o.margin.right,marginBottom:o.margin.bottom,marginLeft:o.margin.left,flexShrink:"0",flexGrow:"0",pointerEvents:"none",transition:i!=="none"?Ym.placeholder:null}};function j2e(e){var t=E.exports.useRef(null),n=Dn(function(){!t.current||(clearTimeout(t.current),t.current=null)},[]),r=e.animate,i=e.onTransitionEnd,o=e.onClose,s=e.contextId,a=E.exports.useState(e.animate==="open"),u=a[0],f=a[1];E.exports.useEffect(function(){return u?r!=="open"?(n(),f(!1),LS):t.current?LS:(t.current=setTimeout(function(){t.current=null,f(!1)}),n):LS},[r,u,n]);var p=Dn(function(v){v.propertyName==="height"&&(i(),r==="close"&&o())},[r,o,i]),g=U2e({isAnimatingOpenOnMount:u,animate:e.animate,placeholder:e.placeholder});return Un.createElement(e.placeholder.tagName,{style:g,"data-rbd-placeholder-context-id":s,onTransitionEnd:p,ref:e.innerRef})}var H2e=Un.memo(j2e),Gk=Un.createContext(null),K2e=function(e){b7(t,e);function t(){for(var r,i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return r=e.call.apply(e,[this].concat(o))||this,r.state={isVisible:Boolean(r.props.on),data:r.props.on,animate:r.props.shouldAnimate&&r.props.on?"open":"none"},r.onClose=function(){r.state.animate==="close"&&r.setState({isVisible:!1})},r}t.getDerivedStateFromProps=function(i,o){return i.shouldAnimate?i.on?{isVisible:!0,data:i.on,animate:"open"}:o.isVisible?{isVisible:!0,data:o.data,animate:"close"}:{isVisible:!1,animate:"close",data:null}:{isVisible:Boolean(i.on),data:i.on,animate:"none"}};var n=t.prototype;return n.render=function(){if(!this.state.isVisible)return null;var i={onClose:this.onClose,data:this.state.data,animate:this.state.animate};return this.props.children(i)},t}(Un.PureComponent),Y3={dragging:5e3,dropAnimating:4500},W2e=function(t,n){return n?Ym.drop(n.duration):t?Ym.snap:Ym.fluid},G2e=function(t,n){return t?n?Lg.opacity.drop:Lg.opacity.combining:null},q2e=function(t){return t.forceShouldAnimate!=null?t.forceShouldAnimate:t.mode==="SNAP"};function Z2e(e){var t=e.dimension,n=t.client,r=e.offset,i=e.combineWith,o=e.dropping,s=Boolean(i),a=q2e(e),u=Boolean(o),f=u?PP.drop(r,s):PP.moveTo(r),p={position:"fixed",top:n.marginBox.top,left:n.marginBox.left,boxSizing:"border-box",width:n.borderBox.width,height:n.borderBox.height,transition:W2e(a,o),transform:f,opacity:G2e(s,u),zIndex:u?Y3.dropAnimating:Y3.dragging,pointerEvents:"none"};return p}function X2e(e){return{transform:PP.moveTo(e.offset),transition:e.shouldAnimateDisplacement?null:"none"}}function Y2e(e){return e.type==="DRAGGING"?Z2e(e):X2e(e)}function Q2e(e,t,n){n===void 0&&(n=io);var r=window.getComputedStyle(t),i=t.getBoundingClientRect(),o=F7(i,r),s=Bb(o,n),a={client:o,tagName:t.tagName.toLowerCase(),display:r.display},u={x:o.marginBox.width,y:o.marginBox.height},f={descriptor:e,placeholder:a,displaceBy:u,client:o,page:s};return f}function J2e(e){var t=Kk("draggable"),n=e.descriptor,r=e.registry,i=e.getDraggableRef,o=e.canDragInteractiveElements,s=e.shouldRespectForcePress,a=e.isEnabled,u=yr(function(){return{canDragInteractiveElements:o,shouldRespectForcePress:s,isEnabled:a}},[o,a,s]),f=Dn(function(b){var _=i();return _||rn(!1),Q2e(n,_,b)},[n,i]),p=yr(function(){return{uniqueId:t,descriptor:n,options:u,getDimension:f}},[n,f,u,t]),g=E.exports.useRef(p),v=E.exports.useRef(!0);Ea(function(){return r.draggable.register(g.current),function(){return r.draggable.unregister(g.current)}},[r.draggable]),Ea(function(){if(v.current){v.current=!1;return}var b=g.current;g.current=p,r.draggable.update(p,b)},[p,r.draggable])}function eEe(e){e.preventDefault()}function tEe(e){var t=E.exports.useRef(null),n=Dn(function(q){t.current=q},[]),r=Dn(function(){return t.current},[]),i=Wb(D1),o=i.contextId,s=i.dragHandleUsageInstructionsId,a=i.registry,u=Wb(Gk),f=u.type,p=u.droppableId,g=yr(function(){return{id:e.draggableId,index:e.index,type:f,droppableId:p}},[e.draggableId,e.index,f,p]),v=e.children,b=e.draggableId,_=e.isEnabled,T=e.shouldRespectForcePress,I=e.canDragInteractiveElements,P=e.isClone,M=e.mapped,D=e.dropAnimationFinished;if(!P){var N=yr(function(){return{descriptor:g,registry:a,getDraggableRef:r,canDragInteractiveElements:I,shouldRespectForcePress:T,isEnabled:_}},[g,a,r,I,T,_]);J2e(N)}var z=yr(function(){return _?{tabIndex:0,role:"button","aria-describedby":s,"data-rbd-drag-handle-draggable-id":b,"data-rbd-drag-handle-context-id":o,draggable:!1,onDragStart:eEe}:null},[o,s,b,_]),$=Dn(function(q){M.type==="DRAGGING"&&(!M.dropping||q.propertyName==="transform"&&D())},[D,M]),j=yr(function(){var q=Y2e(M),Y=M.type==="DRAGGING"&&M.dropping?$:null,te={innerRef:n,draggableProps:{"data-rbd-draggable-context-id":o,"data-rbd-draggable-id":b,style:q,onTransitionEnd:Y},dragHandleProps:z};return te},[o,z,b,M,$,n]),U=yr(function(){return{draggableId:g.id,type:g.type,source:{index:g.index,droppableId:g.droppableId}}},[g.droppableId,g.id,g.index,g.type]);return v(j,M.snapshot,U)}var Rj=function(e,t){return e===t},Oj=function(e){var t=e.combine,n=e.destination;return n?n.droppableId:t?t.droppableId:null},nEe=function(t){return t.combine?t.combine.draggableId:null},rEe=function(t){return t.at&&t.at.type==="COMBINE"?t.at.combine.draggableId:null};function iEe(){var e=ro(function(i,o){return{x:i,y:o}}),t=ro(function(i,o,s,a,u){return{isDragging:!0,isClone:o,isDropAnimating:Boolean(u),dropAnimation:u,mode:i,draggingOver:s,combineWith:a,combineTargetFor:null}}),n=ro(function(i,o,s,a,u,f,p){return{mapped:{type:"DRAGGING",dropping:null,draggingOver:u,combineWith:f,mode:o,offset:i,dimension:s,forceShouldAnimate:p,snapshot:t(o,a,u,f,null)}}}),r=function(o,s){if(o.isDragging){if(o.critical.draggable.id!==s.draggableId)return null;var a=o.current.client.offset,u=o.dimensions.draggables[s.draggableId],f=Sa(o.impact),p=rEe(o.impact),g=o.forceShouldAnimate;return n(e(a.x,a.y),o.movementMode,u,s.isClone,f,p,g)}if(o.phase==="DROP_ANIMATING"){var v=o.completed;if(v.result.draggableId!==s.draggableId)return null;var b=s.isClone,_=o.dimensions.draggables[s.draggableId],T=v.result,I=T.mode,P=Oj(T),M=nEe(T),D=o.dropDuration,N={duration:D,curve:Fk.drop,moveTo:o.newHomeClientOffset,opacity:M?Lg.opacity.drop:null,scale:M?Lg.scale.drop:null};return{mapped:{type:"DRAGGING",offset:o.newHomeClientOffset,dimension:_,dropping:N,draggingOver:P,combineWith:M,mode:I,forceShouldAnimate:null,snapshot:t(I,b,P,M,N)}}}return null};return r}function Dj(e){return{isDragging:!1,isDropAnimating:!1,isClone:!1,dropAnimation:null,mode:null,draggingOver:null,combineTargetFor:e,combineWith:null}}var oEe={mapped:{type:"SECONDARY",offset:io,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:Dj(null)}};function aEe(){var e=ro(function(s,a){return{x:s,y:a}}),t=ro(Dj),n=ro(function(s,a,u){return a===void 0&&(a=null),{mapped:{type:"SECONDARY",offset:s,combineTargetFor:a,shouldAnimateDisplacement:u,snapshot:t(a)}}}),r=function(a){return a?n(io,a,!0):null},i=function(a,u,f,p){var g=f.displaced.visible[a],v=Boolean(p.inVirtualList&&p.effected[a]),b=k1(f),_=b&&b.draggableId===a?u:null;if(!g){if(!v)return r(_);if(f.displaced.invisible[a])return null;var T=Yh(p.displacedBy.point),I=e(T.x,T.y);return n(I,_,!0)}if(v)return r(_);var P=f.displacedBy.point,M=e(P.x,P.y);return n(M,_,g.shouldAnimate)},o=function(a,u){if(a.isDragging)return a.critical.draggable.id===u.draggableId?null:i(u.draggableId,a.critical.draggable.id,a.impact,a.afterCritical);if(a.phase==="DROP_ANIMATING"){var f=a.completed;return f.result.draggableId===u.draggableId?null:i(u.draggableId,f.result.draggableId,f.impact,f.afterCritical)}return null};return o}var sEe=function(){var t=iEe(),n=aEe(),r=function(o,s){return t(o,s)||n(o,s)||oEe};return r},lEe={dropAnimationFinished:fj},cEe=L7(sEe,lEe,null,{context:Hk,pure:!0,areStatePropsEqual:Rj})(tEe);function Aj(e){var t=Wb(Gk),n=t.isUsingCloneFor;return n===e.draggableId&&!e.isClone?null:A(cEe,{...e})}function uEe(e){var t=typeof e.isDragDisabled=="boolean"?!e.isDragDisabled:!0,n=Boolean(e.disableInteractiveElementBlocking),r=Boolean(e.shouldRespectForcePress);return A(Aj,{...e,isClone:!1,isEnabled:t,canDragInteractiveElements:n,shouldRespectForcePress:r})}function dEe(e){var t=E.exports.useContext(D1);t||rn(!1);var n=t.contextId,r=t.isMovementAllowed,i=E.exports.useRef(null),o=E.exports.useRef(null),s=e.children,a=e.droppableId,u=e.type,f=e.mode,p=e.direction,g=e.ignoreContainerClipping,v=e.isDropDisabled,b=e.isCombineEnabled,_=e.snapshot,T=e.useClone,I=e.updateViewportMaxScroll,P=e.getContainerForClone,M=Dn(function(){return i.current},[]),D=Dn(function(te){i.current=te},[]);Dn(function(){return o.current},[]);var N=Dn(function(te){o.current=te},[]),z=Dn(function(){r()&&I({maxScroll:vj()})},[r,I]);B2e({droppableId:a,type:u,mode:f,direction:p,isDropDisabled:v,isCombineEnabled:b,ignoreContainerClipping:g,getDroppableRef:M});var $=A(K2e,{on:e.placeholder,shouldAnimate:e.shouldAnimatePlaceholder,children:function(te){var Z=te.onClose,X=te.data,J=te.animate;return A(H2e,{placeholder:X,onClose:Z,innerRef:N,animate:J,contextId:n,onTransitionEnd:z})}}),j=yr(function(){return{innerRef:D,placeholder:$,droppableProps:{"data-rbd-droppable-id":a,"data-rbd-droppable-context-id":n}}},[n,a,$,D]),U=T?T.dragging.draggableId:null,q=yr(function(){return{droppableId:a,type:u,isUsingCloneFor:U}},[a,U,u]);function Y(){if(!T)return null;var te=T.dragging,Z=T.render,X=A(Aj,{draggableId:te.draggableId,index:te.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0,children:function(J,ue){return Z(J,ue,te)}});return iu.createPortal(X,P())}return it(Gk.Provider,{value:q,children:[s(j,_),Y()]})}var zS=function(t,n){return t===n.droppable.type},Q3=function(t,n){return n.draggables[t.draggable.id]},fEe=function(){var t={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},n=qn({},t,{shouldAnimatePlaceholder:!1}),r=ro(function(s){return{draggableId:s.id,type:s.type,source:{index:s.index,droppableId:s.droppableId}}}),i=ro(function(s,a,u,f,p,g){var v=p.descriptor.id,b=p.descriptor.droppableId===s;if(b){var _=g?{render:g,dragging:r(p.descriptor)}:null,T={isDraggingOver:u,draggingOverWith:u?v:null,draggingFromThisWith:v,isUsingPlaceholder:!0};return{placeholder:p.placeholder,shouldAnimatePlaceholder:!1,snapshot:T,useClone:_}}if(!a)return n;if(!f)return t;var I={isDraggingOver:u,draggingOverWith:v,draggingFromThisWith:null,isUsingPlaceholder:!0};return{placeholder:p.placeholder,shouldAnimatePlaceholder:!0,snapshot:I,useClone:null}}),o=function(a,u){var f=u.droppableId,p=u.type,g=!u.isDropDisabled,v=u.renderClone;if(a.isDragging){var b=a.critical;if(!zS(p,b))return n;var _=Q3(b,a.dimensions),T=Sa(a.impact)===f;return i(f,g,T,T,_,v)}if(a.phase==="DROP_ANIMATING"){var I=a.completed;if(!zS(p,I.critical))return n;var P=Q3(I.critical,a.dimensions);return i(f,g,Oj(I.result)===f,Sa(I.impact)===f,P,v)}if(a.phase==="IDLE"&&a.completed&&!a.shouldFlush){var M=a.completed;if(!zS(p,M.critical))return n;var D=Sa(M.impact)===f,N=Boolean(M.impact.at&&M.impact.at.type==="COMBINE"),z=M.critical.droppable.id===f;return D?N?t:n:z?t:n}return n};return o},hEe={updateViewportMaxScroll:_Ce};function pEe(){return document.body||rn(!1),document.body}var mEe={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:pEe},Nj=L7(fEe,hEe,null,{context:Hk,pure:!0,areStatePropsEqual:Rj})(dEe);Nj.defaultProps=mEe;const gEe=({orderColumns:e})=>{const[t,n]=E.exports.useState(e.order);E.exports.useEffect(()=>{n(e.order)},[e]);const r=s=>{if(!s.destination)return;var a=[...t];const[u]=a.splice(s.source.index,1);a.splice(s.destination.index,0,u),n(a),e.setOrder(a)},i=s=>{const a=t.map((u,f)=>s===f?{...u,show:!u.show}:u);n(a),e.setOrder(a)},o=()=>A("div",{onClick:s=>s.stopPropagation(),className:"z-10 bg-white-background rounded-xl p-3 space-y-3",style:{maxHeight:"80vh",overflowY:"scroll",margin:"24px 0 24px"},children:A(T2e,{onDragEnd:r,children:A(Nj,{droppableId:"tableOrder",children:s=>it("div",{className:"flex flex-col",...s.droppableProps,ref:s.innerRef,children:[t.map((a,u)=>{const f=a.position;if(!!e.defaultColumns[f])return A(uEe,{draggableId:`list-${f}`,index:u,children:p=>it("div",{className:"flex flex-row gap-2 p-1.5 hover:bg-gray-300 rounded-md",ref:p.innerRef,...p.draggableProps,...p.dragHandleProps,children:[A(xh,{onChange:()=>i(u),checked:a.show}),A("p",{className:"m-0",children:e.defaultColumns[f].name||e.defaultColumns[f].title})]})},`list-${f}`)}),s.placeholder]})})})});return A(X_,{trigger:"click",dropdownRender:()=>o(),children:A(Yr,{onClick:s=>s.stopPropagation(),children:A(zbe,{})})})},vEe=()=>{const{tableState:{fullScreen:e},toggleFullScreen:t}=E1(),[n,r]=E.exports.useState(!1);return E.exports.useEffect(()=>{const a=setTimeout(()=>r(!1),1500);return()=>clearTimeout(a)},[n]),A(ka,{title:e?"Collapse":"Expand to full screen",placement:"topRight",open:n,children:A(Yr,{onClick:a=>{a.stopPropagation(),t()},onMouseEnter:()=>{r(!0)},onMouseLeave:()=>{r(!1)},children:e?A(Mbe,{}):A(Dbe,{})})})},Lj=({leftColumn:e,rightColumn:t,exportProvider:n,classes:r,orderColumns:i})=>it("div",{className:"flex items-center w-full justify-between",children:[it("div",{className:r==null?void 0:r.leftColumn,children:[A("span",{className:"py-[5px]",children:"Attribute table"}),e]}),it("div",{className:r==null?void 0:r.rightColumn,children:[t,it("div",{className:"flex items-center gap-x-1",children:[A(gEe,{orderColumns:i}),n&&A(V_e,{provider:n}),A(vEe,{})]})]})]}),yEe=e=>({popup:null,setPopup:t=>{e(n=>{if(!t)return n.popup=null,n;n.popup=t})}}),N1=hu(pu(yEe)),xEe=Un.memo(({data:e,pageSize:t,isClickedPointLoading:n,page:r,onPageChange:i,columns:o,header:s,fullWidth:a,loading:u,onChange:f})=>{const{clickedPointConfig:p,setClickedPointConfig:g}=bv(),{map:v}=B5(),{tableState:b,toggleOpened:_}=E1(),{setPopup:T}=N1(),I={y:b.fullScreen?"calc(100vh - 136px)":"200px",x:"max-content"};return E.exports.useEffect(()=>{if(p===null||n)return;const P=document.querySelector(".scroll-row");P&&$_e(P,{behavior:"smooth"})},[p,e]),A(HA,{bordered:!1,onChange:_,activeKey:b.isOpened?"opened":null,children:A(HA.Panel,{header:s||A(Lj,{}),collapsible:b.fullScreen?"disabled":void 0,children:A(Ige,{size:"small",className:Td("table__wrapper",b.fullScreen&&"table__wrapper__fullScreen"),locale:{emptyText:A(Ys,{description:"No data"})},pagination:{pageSize:t,current:r,onChange:i,total:e==null?void 0:e.count,showSizeChanger:!1,position:"bottomCenter"},showHeader:(e==null?void 0:e.results)&&e.results.length>0,dataSource:e==null?void 0:e.results,columns:o,onChange:f,rowKey:"id",scroll:I,sticky:!0,onRow:P=>({onClick:()=>{const M=xv.exports(P.geometry);v.flyTo({center:[M.coordinates[0],M.coordinates[1]],zoom:13,essential:!0}),T({features:[{properties:P}],coordinates:M.coordinates}),g(P.id,rowSelection==null?void 0:rowSelection.selectedRowKeys.includes(P.id))}}),rowClassName:P=>Td("cursor-pointer",P.id===(p==null?void 0:p.id)&&"scroll-row"),"data-fullwidth":a,loading:u})},"opened")})}),Gb=30,bEe=(e,t)=>{const{clickedPointConfig:n}=bv(),{data:r,isInitialLoading:i,isFetching:o}=tc(["clicked-point",n==null?void 0:n.id],async()=>{const s=new URLSearchParams({"location_ids[]":[n.id]}),{data:a}=await as.get(`/api/placement_points?${s.toString()}`);return a},{enabled:e,onSuccess:t});return{data:r,isLoading:i||o}},_Ee=(e,t)=>{const[n,r]=E.exports.useState(),[i,o]=E.exports.useState(!1),s=E.exports.useRef(),{data:a,isLoading:u}=bEe(i,()=>o(!1)),{clickedPointConfig:f}=bv(),p=PU();return E.exports.useEffect(()=>{!e||r(e)},[e]),E.exports.useEffect(()=>{!e||f===null||e.results.find(v=>v.id===f.id)||o(!0)},[e,f]),E.exports.useEffect(()=>{var g;!((g=a==null?void 0:a.results)!=null&&g[0])||(s.current=a.results[0].id,t(Gb+1),r({count:(e==null?void 0:e.count)+1,results:[a.results[0],...e.results]}))},[a,e]),E.exports.useEffect(()=>{if(f===null){const g=["clicked-point",s.current];p.removeQueries({queryKey:g}),t(Gb),r(e)}},[f,e]),{data:n,isClickedPointLoading:u}},wEe=(e,t,n,r,i)=>{const{filters:o,consumer_filter:s,source_filter:a,consumer_type:u,wall_material:f,energy_class:p}=qi(),{value:g}=ss(),{selectedSourceConfig:v}=Hd(),b=Vi[g],{updateCounter:_}=h7(),{region:T}=o,I=()=>{const $=i&&(i.includes("prob")||i.includes("cooling_time")||i.includes("priority"))?`${i}_${b}`:i,j=new URLSearchParams({page:e,page_size:n});$&&j.append("ordering",$);const U=[];if(s&&a){const q=s.key+"_"+b,Y=a.key+"_"+b,te=`${q}__gte=${s.gt}&${q}__lte=${s.lt}`,Z=`${Y}__gte=${a.gt}&${Y}__lt=${a.lt}`;U.push(`(${Z})|(${te})`)}return v&&(v.sourceId&&U.push(`(tp_number=${v.sourceId})`),v.dispatcherNumber&&U.push(`(ods_number=${v.dispatcherNumber})`)),U.length!==0&&j.append("filters",U.join("&")),s&&!a&&(j.append(s.key+"_"+b+"__gt",s.gt),j.append(s.key+"_"+b+"__lt",s.lt)),a&&!s&&(j.append(a.key+"_"+b+"__gt",a.gt),j.append(a.key+"_"+b+"__lt",a.lt)),j},{data:P,isInitialLoading:M,isFetching:D}=tc(["table",e,o,i,_,s,a,v],async({signal:$})=>{const j=I();return await X0e(j,T,$)},{onError:$=>{$.response.data.detail==="\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430\u044F \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0430"&&t()},refetchOnWindowFocus:!1}),{data:N,isClickedPointLoading:z}=_Ee(P,r);return{data:N,pageSize:n,isClickedPointLoading:z,isDataLoading:M||D}},CEe=(e,t)=>{const{filters:n,consumer_filter:r,source_filter:i,consumer_type:o,wall_material:s,energy_class:a}=qi(),{value:u}=ss(),{selectedSourceConfig:f}=Hd(),p=Vi[u],{region:g}=n,v=()=>{const b=new URLSearchParams,_=[];if(r&&i){const T=r.key+"_"+p,I=i.key+"_"+p,P=`${T}__gte=${r.gt}&${T}__lte=${r.lt}`,M=`${I}__gte=${i.gt}&${I}__lt=${i.lt}`;_.push(`(${M})|(${P})`)}return f&&(f.sourceId&&_.push(`(tp_number=${f.sourceId})`),f.dispatcherNumber&&_.push(`(ods_number=${f.dispatcherNumber})`)),_.length!==0&&b.append("filters",_.join("&")),r&&!i&&(b.append(r.key+"_"+p+"__gt",r.gt),b.append(r.key+"_"+p+"__lt",r.lt)),i&&!r&&(b.append(i.key+"_"+p+"__gt",i.gt),b.append(i.key+"_"+p+"__lt",i.lt)),b};return tc(["export-initial",n],async()=>await Y0e(v(),g),{enabled:e,onSuccess:B_e,onSettled:t,retry:!1})},J3=(e,t)=>{const[n,r]=E.exports.useState(()=>{let i;try{i=JSON.parse(localStorage.getItem(e)||String(t))}catch{i=t}return i});return E.exports.useEffect(()=>{localStorage.setItem(e,JSON.stringify(n))},[n,e]),[n,r]},SEe=e=>{const{data:t}=_k(),{tableState:{fullScreen:n}}=E1(),{value:r}=ss(),[i,o]=J3(`${e}Sort`,null),s=E.exports.useMemo(()=>[{title:"Address",dataIndex:"building_address",key:"building_address",width:"120px",ellipsis:!0,sorter:!0,showSorterTooltip:!1},{title:"TP number",dataIndex:"tp_number",key:"tp_number",width:"120px",ellipsis:!0,sorter:!0,showSorterTooltip:!1},{title:"Dispatcher center number",dataIndex:"ods_number",key:"ods_number",width:"120px",ellipsis:!0,sorter:!0,showSorterTooltip:!1},{title:"Dispatcher phone",dataIndex:"phone_number",key:"phone_number",width:"120px",ellipsis:!0,sorter:!0,showSorterTooltip:!1},{title:"No heating in the building",dataIndex:`prob1_${Vi[r]}`,key:"prob1",width:"120px",ellipsis:!0,sorter:!0,showSorterTooltip:!1},{title:"Leaking pipes in the entrance",dataIndex:`prob2_${Vi[r]}`,key:"prob2",width:"120px",ellipsis:!0,sorter:!0,showSorterTooltip:!1},{title:"Apartment temperature below standard",dataIndex:`prob3_${Vi[r]}`,key:"prob3",width:"120px",ellipsis:!0,sorter:!0,showSorterTooltip:!1},{title:"Common area temperature below standard",dataIndex:`prob4_${Vi[r]}`,key:"prob4",width:"120px",ellipsis:!0,sorter:!0,showSorterTooltip:!1},{title:"Leak in the heating system",dataIndex:`prob5_${Vi[r]}`,key:"prob5",width:"120px",ellipsis:!0,sorter:!0,showSorterTooltip:!1},{title:"TP failure",dataIndex:`prob6_${Vi[r]}`,key:"prob6",width:"120px",ellipsis:!0,sorter:!0,showSorterTooltip:!1},{title:"Cooling time, h",dataIndex:`cooling_time_${Vi[r]}`,key:"cooling_time",width:"120px",ellipsis:!0,sorter:!0,showSorterTooltip:!1},{title:"Building priority",dataIndex:`priority_${Vi[r]}`,key:"priority",width:"120px",ellipsis:!0,sorter:!0,showSorterTooltip:!1},{title:"Wall material",dataIndex:"wall_materials",key:"wall_materials",width:"120px",ellipsis:!0,sorter:!0,showSorterTooltip:!1},{title:"Energy efficiency class",dataIndex:"fi_energy_class",key:"fi_energy_class",width:"120px",ellipsis:!0,sorter:!0,showSorterTooltip:!1}].filter(Boolean),[t==null?void 0:t.normalized,n,r]),[a,u]=J3(`${e}Order`,s.map((p,g)=>({key:p.key,position:g,show:!0})));return E.exports.useEffect(()=>{const g=s.filter(v=>!a.find(b=>b.key===v.key)).map((v,b)=>({key:v.key,position:s.length-b-1,show:!0}));u([...a,...g])},[s]),{columns:E.exports.useMemo(()=>a.flatMap(p=>p.show?s[p.position]:[]).map(p=>i&&i.includes(p==null?void 0:p.key)?{...p,defaultSortOrder:i.includes("-")?"descend":"ascend"}:p).filter(Boolean),[s,a,i]),orderColumns:{defaultColumns:s,order:a,setOrder:u},sort:i,setSort:o}},EEe="dzkhTable",PEe=({fullWidth:e})=>{const{setClickedPointConfig:t}=bv(),[n,r]=E.exports.useState(1),[i,o]=E.exports.useState(Gb),{columns:s,orderColumns:a,sort:u,setSort:f}=SEe(EEe),{setPopup:p}=N1(),g=(P,M)=>{P==="ascend"&&f(M),P==="descend"&&f(`-${M}`),P||f(null)},{data:v,isClickedPointLoading:b,isDataLoading:_}=wEe(n,()=>r(1),i,o,u),T=()=>o(Gb),I=E.exports.useCallback(P=>{T(),t(null),p(null),r(P)},[]);return A(xEe,{data:v,onPageChange:I,page:n,pageSize:i,isClickedPointLoading:b,columns:s,fullWidth:e,onChange:(P,M,D)=>{g(D.order,D.columnKey)},header:A(Lj,{exportProvider:CEe,orderColumns:a}),loading:_})},TEe=({fullWidth:e})=>A(PEe,{fullWidth:e}),IEe=({lat:e,lng:t,onClose:n,children:r})=>A(yZ,{longitude:t,latitude:e,onClose:n,closeOnClick:!1,style:{minWidth:"330px"},children:r}),FS=[{name:"Address",field:"building_address"},{name:"TP number",field:"tp_number"},{name:"Dispatcher center number",field:"ods_number"},{name:"Dispatcher phone",field:"phone_number"}],kEe=[{field:"prob1",name:"No heating in the building"},{field:"prob2",name:"Leaking pipes in the entrance"},{field:"prob3",name:"Apartment temperature below standard"},{field:"prob4",name:"Common area temperature below standard"},{field:"prob5",name:"Leak in the heating system"},{field:"cooling_time",name:"Cooling time (hours)"},{field:"priority",name:"Building priority"}],MEe=({feature:e})=>{const{data:t}=_k(),{setSelectedSourceConfig:n}=Hd(),{value:r}=ss(),i=e.properties.point_type==="tp",o=e.properties.point_type==="ods",s=()=>{if(o)return FS;if(i)return[...FS,{field:`prob6_${Vi[r]}`,name:"TP failure"}];const f=kEe.map(p=>({...p,field:`${p.field}_${Vi[r]}`}));return[...FS,...f]},a=({field:f,render:p,empty:g,type:v,fallbackField:b})=>{let _=e.properties[f];return v==="region"?(_=_||e[b],_=p(_,t==null?void 0:t.normalized)):(_=p?p(_):_,_=td(_)&&g?g:_),_},u=()=>n({pointId:e.properties.id,sourceId:e.properties.tp_number,dispatcherNumber:e.properties.ods_number});return it("div",{children:[s().map(f=>it(ad,{className:"p-1",children:[A(_b,{className:"font-semibold",span:12,children:f.name}),A(_b,{span:12,className:"text-right",children:a(f)})]},f.field)),i?A("div",{className:"mt-3 text-center",children:A(Yr,{type:"primary",onClick:u,children:"Simulate failure"})}):null]})};/*!
* @kurkle/color v0.3.2
* https://github.com/kurkle/color#readme
* (c) 2023 Jukka Kurkela
* Released under the MIT License
*/function Ov(e){return e+.5|0}const Fc=(e,t,n)=>Math.max(Math.min(e,n),t);function Im(e){return Fc(Ov(e*2.55),0,255)}function tu(e){return Fc(Ov(e*255),0,255)}function Ll(e){return Fc(Ov(e/2.55)/100,0,1)}function e4(e){return Fc(Ov(e*100),0,100)}const Wa={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},MP=[..."0123456789ABCDEF"],REe=e=>MP[e&15],OEe=e=>MP[(e&240)>>4]+MP[e&15],kx=e=>(e&240)>>4===(e&15),DEe=e=>kx(e.r)&&kx(e.g)&&kx(e.b)&&kx(e.a);function AEe(e){var t=e.length,n;return e[0]==="#"&&(t===4||t===5?n={r:255&Wa[e[1]]*17,g:255&Wa[e[2]]*17,b:255&Wa[e[3]]*17,a:t===5?Wa[e[4]]*17:255}:(t===7||t===9)&&(n={r:Wa[e[1]]<<4|Wa[e[2]],g:Wa[e[3]]<<4|Wa[e[4]],b:Wa[e[5]]<<4|Wa[e[6]],a:t===9?Wa[e[7]]<<4|Wa[e[8]]:255})),n}const NEe=(e,t)=>e<255?t(e):"";function LEe(e){var t=DEe(e)?REe:OEe;return e?"#"+t(e.r)+t(e.g)+t(e.b)+NEe(e.a,t):void 0}const zEe=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function zj(e,t,n){const r=t*Math.min(n,1-n),i=(o,s=(o+e/30)%12)=>n-r*Math.max(Math.min(s-3,9-s,1),-1);return[i(0),i(8),i(4)]}function FEe(e,t,n){const r=(i,o=(i+e/60)%6)=>n-n*t*Math.max(Math.min(o,4-o,1),0);return[r(5),r(3),r(1)]}function $Ee(e,t,n){const r=zj(e,1,.5);let i;for(t+n>1&&(i=1/(t+n),t*=i,n*=i),i=0;i<3;i++)r[i]*=1-t-n,r[i]+=t;return r}function BEe(e,t,n,r,i){return e===i?(t-n)/r+(t<n?6:0):t===i?(n-e)/r+2:(e-t)/r+4}function qk(e){const n=e.r/255,r=e.g/255,i=e.b/255,o=Math.max(n,r,i),s=Math.min(n,r,i),a=(o+s)/2;let u,f,p;return o!==s&&(p=o-s,f=a>.5?p/(2-o-s):p/(o+s),u=BEe(n,r,i,p,o),u=u*60+.5),[u|0,f||0,a]}function Zk(e,t,n,r){return(Array.isArray(t)?e(t[0],t[1],t[2]):e(t,n,r)).map(tu)}function Xk(e,t,n){return Zk(zj,e,t,n)}function VEe(e,t,n){return Zk($Ee,e,t,n)}function UEe(e,t,n){return Zk(FEe,e,t,n)}function Fj(e){return(e%360+360)%360}function jEe(e){const t=zEe.exec(e);let n=255,r;if(!t)return;t[5]!==r&&(n=t[6]?Im(+t[5]):tu(+t[5]));const i=Fj(+t[2]),o=+t[3]/100,s=+t[4]/100;return t[1]==="hwb"?r=VEe(i,o,s):t[1]==="hsv"?r=UEe(i,o,s):r=Xk(i,o,s),{r:r[0],g:r[1],b:r[2],a:n}}function HEe(e,t){var n=qk(e);n[0]=Fj(n[0]+t),n=Xk(n),e.r=n[0],e.g=n[1],e.b=n[2]}function KEe(e){if(!e)return;const t=qk(e),n=t[0],r=e4(t[1]),i=e4(t[2]);return e.a<255?`hsla(${n}, ${r}%, ${i}%, ${Ll(e.a)})`:`hsl(${n}, ${r}%, ${i}%)`}const t4={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"},n4={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 WEe(){const e={},t=Object.keys(n4),n=Object.keys(t4);let r,i,o,s,a;for(r=0;r<t.length;r++){for(s=a=t[r],i=0;i<n.length;i++)o=n[i],a=a.replace(o,t4[o]);o=parseInt(n4[s],16),e[a]=[o>>16&255,o>>8&255,o&255]}return e}let Mx;function GEe(e){Mx||(Mx=WEe(),Mx.transparent=[0,0,0,0]);const t=Mx[e.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const qEe=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function ZEe(e){const t=qEe.exec(e);let n=255,r,i,o;if(!!t){if(t[7]!==r){const s=+t[7];n=t[8]?Im(s):Fc(s*255,0,255)}return r=+t[1],i=+t[3],o=+t[5],r=255&(t[2]?Im(r):Fc(r,0,255)),i=255&(t[4]?Im(i):Fc(i,0,255)),o=255&(t[6]?Im(o):Fc(o,0,255)),{r,g:i,b:o,a:n}}}function XEe(e){return e&&(e.a<255?`rgba(${e.r}, ${e.g}, ${e.b}, ${Ll(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`)}const $S=e=>e<=.0031308?e*12.92:Math.pow(e,1/2.4)*1.055-.055,If=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4);function YEe(e,t,n){const r=If(Ll(e.r)),i=If(Ll(e.g)),o=If(Ll(e.b));return{r:tu($S(r+n*(If(Ll(t.r))-r))),g:tu($S(i+n*(If(Ll(t.g))-i))),b:tu($S(o+n*(If(Ll(t.b))-o))),a:e.a+n*(t.a-e.a)}}function Rx(e,t,n){if(e){let r=qk(e);r[t]=Math.max(0,Math.min(r[t]+r[t]*n,t===0?360:1)),r=Xk(r),e.r=r[0],e.g=r[1],e.b=r[2]}}function $j(e,t){return e&&Object.assign(t||{},e)}function r4(e){var t={r:0,g:0,b:0,a:255};return Array.isArray(e)?e.length>=3&&(t={r:e[0],g:e[1],b:e[2],a:255},e.length>3&&(t.a=tu(e[3]))):(t=$j(e,{r:0,g:0,b:0,a:1}),t.a=tu(t.a)),t}function QEe(e){return e.charAt(0)==="r"?ZEe(e):jEe(e)}class zg{constructor(t){if(t instanceof zg)return t;const n=typeof t;let r;n==="object"?r=r4(t):n==="string"&&(r=AEe(t)||GEe(t)||QEe(t)),this._rgb=r,this._valid=!!r}get valid(){return this._valid}get rgb(){var t=$j(this._rgb);return t&&(t.a=Ll(t.a)),t}set rgb(t){this._rgb=r4(t)}rgbString(){return this._valid?XEe(this._rgb):void 0}hexString(){return this._valid?LEe(this._rgb):void 0}hslString(){return this._valid?KEe(this._rgb):void 0}mix(t,n){if(t){const r=this.rgb,i=t.rgb;let o;const s=n===o?.5:n,a=2*s-1,u=r.a-i.a,f=((a*u===-1?a:(a+u)/(1+a*u))+1)/2;o=1-f,r.r=255&f*r.r+o*i.r+.5,r.g=255&f*r.g+o*i.g+.5,r.b=255&f*r.b+o*i.b+.5,r.a=s*r.a+(1-s)*i.a,this.rgb=r}return this}interpolate(t,n){return t&&(this._rgb=YEe(this._rgb,t._rgb,n)),this}clone(){return new zg(this.rgb)}alpha(t){return this._rgb.a=tu(t),this}clearer(t){const n=this._rgb;return n.a*=1-t,this}greyscale(){const t=this._rgb,n=Ov(t.r*.3+t.g*.59+t.b*.11);return t.r=t.g=t.b=n,this}opaquer(t){const n=this._rgb;return n.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return Rx(this._rgb,2,t),this}darken(t){return Rx(this._rgb,2,-t),this}saturate(t){return Rx(this._rgb,1,t),this}desaturate(t){return Rx(this._rgb,1,-t),this}rotate(t){return HEe(this._rgb,t),this}}/*!
* Chart.js v4.4.0
* https://www.chartjs.org
* (c) 2023 Chart.js Contributors
* Released under the MIT License
*/function Pl(){}const JEe=(()=>{let e=0;return()=>e++})();function Mr(e){return e===null||typeof e>"u"}function ai(e){if(Array.isArray&&Array.isArray(e))return!0;const t=Object.prototype.toString.call(e);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function _r(e){return e!==null&&Object.prototype.toString.call(e)==="[object Object]"}function to(e){return(typeof e=="number"||e instanceof Number)&&isFinite(+e)}function ga(e,t){return to(e)?e:t}function sr(e,t){return typeof e>"u"?t:e}const ePe=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100*t:+e;function Zr(e,t,n){if(e&&typeof e.call=="function")return e.apply(n,t)}function kr(e,t,n,r){let i,o,s;if(ai(e))if(o=e.length,r)for(i=o-1;i>=0;i--)t.call(n,e[i],i);else for(i=0;i<o;i++)t.call(n,e[i],i);else if(_r(e))for(s=Object.keys(e),o=s.length,i=0;i<o;i++)t.call(n,e[s[i]],s[i])}function qb(e,t){let n,r,i,o;if(!e||!t||e.length!==t.length)return!1;for(n=0,r=e.length;n<r;++n)if(i=e[n],o=t[n],i.datasetIndex!==o.datasetIndex||i.index!==o.index)return!1;return!0}function Zb(e){if(ai(e))return e.map(Zb);if(_r(e)){const t=Object.create(null),n=Object.keys(e),r=n.length;let i=0;for(;i<r;++i)t[n[i]]=Zb(e[n[i]]);return t}return e}function Bj(e){return["__proto__","prototype","constructor"].indexOf(e)===-1}function tPe(e,t,n,r){if(!Bj(e))return;const i=t[e],o=n[e];_r(i)&&_r(o)?Fg(i,o,r):t[e]=Zb(o)}function Fg(e,t,n){const r=ai(t)?t:[t],i=r.length;if(!_r(e))return e;n=n||{};const o=n.merger||tPe;let s;for(let a=0;a<i;++a){if(s=r[a],!_r(s))continue;const u=Object.keys(s);for(let f=0,p=u.length;f<p;++f)o(u[f],e,s,n)}return e}function Qm(e,t){return Fg(e,t,{merger:nPe})}function nPe(e,t,n){if(!Bj(e))return;const r=t[e],i=n[e];_r(r)&&_r(i)?Qm(r,i):Object.prototype.hasOwnProperty.call(t,e)||(t[e]=Zb(i))}const i4={"":e=>e,x:e=>e.x,y:e=>e.y};function rPe(e){const t=e.split("."),n=[];let r="";for(const i of t)r+=i,r.endsWith("\\")?r=r.slice(0,-1)+".":(n.push(r),r="");return n}function iPe(e){const t=rPe(e);return n=>{for(const r of t){if(r==="")break;n=n&&n[r]}return n}}function kh(e,t){return(i4[t]||(i4[t]=iPe(t)))(e)}function Yk(e){return e.charAt(0).toUpperCase()+e.slice(1)}const $g=e=>typeof e<"u",su=e=>typeof e=="function",o4=(e,t)=>{if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0};function oPe(e){return e.type==="mouseup"||e.type==="click"||e.type==="contextmenu"}const Li=Math.PI,rs=2*Li,aPe=rs+Li,Xb=Number.POSITIVE_INFINITY,sPe=Li/180,_a=Li/2,Ku=Li/4,a4=Li*2/3,$c=Math.log10,il=Math.sign;function Jm(e,t,n){return Math.abs(e-t)<n}function s4(e){const t=Math.round(e);e=Jm(e,t,e/1e3)?t:e;const n=Math.pow(10,Math.floor($c(e))),r=e/n;return(r<=1?1:r<=2?2:r<=5?5:10)*n}function lPe(e){const t=[],n=Math.sqrt(e);let r;for(r=1;r<n;r++)e%r===0&&(t.push(r),t.push(e/r));return n===(n|0)&&t.push(n),t.sort((i,o)=>i-o).pop(),t}function Bg(e){return!isNaN(parseFloat(e))&&isFinite(e)}function cPe(e,t){const n=Math.round(e);return n-t<=e&&n+t>=e}function Vj(e,t,n){let r,i,o;for(r=0,i=e.length;r<i;r++)o=e[r][n],isNaN(o)||(t.min=Math.min(t.min,o),t.max=Math.max(t.max,o))}function Bc(e){return e*(Li/180)}function Qk(e){return e*(180/Li)}function l4(e){if(!to(e))return;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n++;return n}function uPe(e,t){const n=t.x-e.x,r=t.y-e.y,i=Math.sqrt(n*n+r*r);let o=Math.atan2(r,n);return o<-.5*Li&&(o+=rs),{angle:o,distance:i}}function RP(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function dPe(e,t){return(e-t+aPe)%rs-Li}function Cs(e){return(e%rs+rs)%rs}function Uj(e,t,n,r){const i=Cs(e),o=Cs(t),s=Cs(n),a=Cs(o-i),u=Cs(s-i),f=Cs(i-o),p=Cs(i-s);return i===o||i===s||r&&o===s||a>u&&f<p}function wa(e,t,n){return Math.max(t,Math.min(n,e))}function fPe(e){return wa(e,-32768,32767)}function pd(e,t,n,r=1e-6){return e>=Math.min(t,n)-r&&e<=Math.max(t,n)+r}function Jk(e,t,n){n=n||(s=>e[s]<t);let r=e.length-1,i=0,o;for(;r-i>1;)o=i+r>>1,n(o)?i=o:r=o;return{lo:i,hi:r}}const md=(e,t,n,r)=>Jk(e,n,r?i=>{const o=e[i][t];return o<n||o===n&&e[i+1][t]===n}:i=>e[i][t]<n),hPe=(e,t,n)=>Jk(e,n,r=>e[r][t]>=n);function pPe(e,t,n){let r=0,i=e.length;for(;r<i&&e[r]<t;)r++;for(;i>r&&e[i-1]>n;)i--;return r>0||i<e.length?e.slice(r,i):e}const jj=["push","pop","shift","splice","unshift"];function mPe(e,t){if(e._chartjs){e._chartjs.listeners.push(t);return}Object.defineProperty(e,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),jj.forEach(n=>{const r="_onData"+Yk(n),i=e[n];Object.defineProperty(e,n,{configurable:!0,enumerable:!1,value(...o){const s=i.apply(this,o);return e._chartjs.listeners.forEach(a=>{typeof a[r]=="function"&&a[r](...o)}),s}})})}function c4(e,t){const n=e._chartjs;if(!n)return;const r=n.listeners,i=r.indexOf(t);i!==-1&&r.splice(i,1),!(r.length>0)&&(jj.forEach(o=>{delete e[o]}),delete e._chartjs)}function Hj(e){const t=new Set(e);return t.size===e.length?e:Array.from(t)}const Kj=function(){return typeof window>"u"?function(e){return e()}:window.requestAnimationFrame}();function Wj(e,t){let n=[],r=!1;return function(...i){n=i,r||(r=!0,Kj.call(window,()=>{r=!1,e.apply(t,n)}))}}function gPe(e,t){let n;return function(...r){return t?(clearTimeout(n),n=setTimeout(e,t,r)):e.apply(this,r),t}}const eM=e=>e==="start"?"left":e==="end"?"right":"center",Co=(e,t,n)=>e==="start"?t:e==="end"?n:(t+n)/2,vPe=(e,t,n,r)=>e===(r?"left":"right")?n:e==="center"?(t+n)/2:t;function yPe(e,t,n){const r=t.length;let i=0,o=r;if(e._sorted){const{iScale:s,_parsed:a}=e,u=s.axis,{min:f,max:p,minDefined:g,maxDefined:v}=s.getUserBounds();g&&(i=wa(Math.min(md(a,u,f).lo,n?r:md(t,u,s.getPixelForValue(f)).lo),0,r-1)),v?o=wa(Math.max(md(a,s.axis,p,!0).hi+1,n?0:md(t,u,s.getPixelForValue(p),!0).hi+1),i,r)-i:o=r-i}return{start:i,count:o}}function xPe(e){const{xScale:t,yScale:n,_scaleRanges:r}=e,i={xmin:t.min,xmax:t.max,ymin:n.min,ymax:n.max};if(!r)return e._scaleRanges=i,!0;const o=r.xmin!==t.min||r.xmax!==t.max||r.ymin!==n.min||r.ymax!==n.max;return Object.assign(r,i),o}const Ox=e=>e===0||e===1,u4=(e,t,n)=>-(Math.pow(2,10*(e-=1))*Math.sin((e-t)*rs/n)),d4=(e,t,n)=>Math.pow(2,-10*e)*Math.sin((e-t)*rs/n)+1,eg={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>-e*(e-2),easeInOutQuad:e=>(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1),easeInCubic:e=>e*e*e,easeOutCubic:e=>(e-=1)*e*e+1,easeInOutCubic:e=>(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2),easeInQuart:e=>e*e*e*e,easeOutQuart:e=>-((e-=1)*e*e*e-1),easeInOutQuart:e=>(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2),easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>(e-=1)*e*e*e*e+1,easeInOutQuint:e=>(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2),easeInSine:e=>-Math.cos(e*_a)+1,easeOutSine:e=>Math.sin(e*_a),easeInOutSine:e=>-.5*(Math.cos(Li*e)-1),easeInExpo:e=>e===0?0:Math.pow(2,10*(e-1)),easeOutExpo:e=>e===1?1:-Math.pow(2,-10*e)+1,easeInOutExpo:e=>Ox(e)?e:e<.5?.5*Math.pow(2,10*(e*2-1)):.5*(-Math.pow(2,-10*(e*2-1))+2),easeInCirc:e=>e>=1?e:-(Math.sqrt(1-e*e)-1),easeOutCirc:e=>Math.sqrt(1-(e-=1)*e),easeInOutCirc:e=>(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1),easeInElastic:e=>Ox(e)?e:u4(e,.075,.3),easeOutElastic:e=>Ox(e)?e:d4(e,.075,.3),easeInOutElastic(e){return Ox(e)?e:e<.5?.5*u4(e*2,.1125,.45):.5+.5*d4(e*2-1,.1125,.45)},easeInBack(e){return e*e*((1.70158+1)*e-1.70158)},easeOutBack(e){return(e-=1)*e*((1.70158+1)*e+1.70158)+1},easeInOutBack(e){let t=1.70158;return(e/=.5)<1?.5*(e*e*(((t*=1.525)+1)*e-t)):.5*((e-=2)*e*(((t*=1.525)+1)*e+t)+2)},easeInBounce:e=>1-eg.easeOutBounce(1-e),easeOutBounce(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},easeInOutBounce:e=>e<.5?eg.easeInBounce(e*2)*.5:eg.easeOutBounce(e*2-1)*.5+.5};function tM(e){if(e&&typeof e=="object"){const t=e.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function f4(e){return tM(e)?e:new zg(e)}function BS(e){return tM(e)?e:new zg(e).saturate(.5).darken(.1).hexString()}const bPe=["x","y","borderWidth","radius","tension"],_Pe=["color","borderColor","backgroundColor"];function wPe(e){e.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),e.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"}),e.set("animations",{colors:{type:"color",properties:_Pe},numbers:{type:"number",properties:bPe}}),e.describe("animations",{_fallback:"animation"}),e.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}}}})}function CPe(e){e.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const h4=new Map;function SPe(e,t){t=t||{};const n=e+JSON.stringify(t);let r=h4.get(n);return r||(r=new Intl.NumberFormat(e,t),h4.set(n,r)),r}function nM(e,t,n){return SPe(t,n).format(e)}const Gj={values(e){return ai(e)?e:""+e},numeric(e,t,n){if(e===0)return"0";const r=this.chart.options.locale;let i,o=e;if(n.length>1){const f=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(f<1e-4||f>1e15)&&(i="scientific"),o=EPe(e,n)}const s=$c(Math.abs(o)),a=isNaN(s)?1:Math.max(Math.min(-1*Math.floor(s),20),0),u={notation:i,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(u,this.options.ticks.format),nM(e,r,u)},logarithmic(e,t,n){if(e===0)return"0";const r=n[t].significand||e/Math.pow(10,Math.floor($c(e)));return[1,2,3,5,10,15].includes(r)||t>.8*n.length?Gj.numeric.call(this,e,t,n):""}};function EPe(e,t){let n=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(n)>=1&&e!==Math.floor(e)&&(n=e-Math.floor(e)),n}var L1={formatters:Gj};function PPe(e){e.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,n)=>n.lineWidth,tickColor:(t,n)=>n.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width: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:L1.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),e.route("scale.ticks","color","","color"),e.route("scale.grid","color","","borderColor"),e.route("scale.border","color","","borderColor"),e.route("scale.title","color","","color"),e.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"}),e.describe("scales",{_fallback:"scale"}),e.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}const Dd=Object.create(null),OP=Object.create(null);function tg(e,t){if(!t)return e;const n=t.split(".");for(let r=0,i=n.length;r<i;++r){const o=n[r];e=e[o]||(e[o]=Object.create(null))}return e}function VS(e,t,n){return typeof t=="string"?Fg(tg(e,t),n):Fg(tg(e,""),t)}class TPe{constructor(t,n){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,i)=>BS(i.backgroundColor),this.hoverBorderColor=(r,i)=>BS(i.borderColor),this.hoverColor=(r,i)=>BS(i.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(t),this.apply(n)}set(t,n){return VS(this,t,n)}get(t){return tg(this,t)}describe(t,n){return VS(OP,t,n)}override(t,n){return VS(Dd,t,n)}route(t,n,r,i){const o=tg(this,t),s=tg(this,r),a="_"+n;Object.defineProperties(o,{[a]:{value:o[n],writable:!0},[n]:{enumerable:!0,get(){const u=this[a],f=s[i];return _r(u)?Object.assign({},f,u):sr(u,f)},set(u){this[a]=u}}})}apply(t){t.forEach(n=>n(this))}}var vi=new TPe({_scriptable:e=>!e.startsWith("on"),_indexable:e=>e!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[wPe,CPe,PPe]);function IPe(e){return!e||Mr(e.size)||Mr(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}function Yb(e,t,n,r,i){let o=t[i];return o||(o=t[i]=e.measureText(i).width,n.push(i)),o>r&&(r=o),r}function kPe(e,t,n,r){r=r||{};let i=r.data=r.data||{},o=r.garbageCollect=r.garbageCollect||[];r.font!==t&&(i=r.data={},o=r.garbageCollect=[],r.font=t),e.save(),e.font=t;let s=0;const a=n.length;let u,f,p,g,v;for(u=0;u<a;u++)if(g=n[u],g!=null&&!ai(g))s=Yb(e,i,o,s,g);else if(ai(g))for(f=0,p=g.length;f<p;f++)v=g[f],v!=null&&!ai(v)&&(s=Yb(e,i,o,s,v));e.restore();const b=o.length/2;if(b>n.length){for(u=0;u<b;u++)delete i[o[u]];o.splice(0,b)}return s}function Wu(e,t,n){const r=e.currentDevicePixelRatio,i=n!==0?Math.max(n/2,.5):0;return Math.round((t-i)*r)/r+i}function p4(e,t){t=t||e.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,e.width,e.height),t.restore()}function DP(e,t,n,r){qj(e,t,n,r,null)}function qj(e,t,n,r,i){let o,s,a,u,f,p,g,v;const b=t.pointStyle,_=t.rotation,T=t.radius;let I=(_||0)*sPe;if(b&&typeof b=="object"&&(o=b.toString(),o==="[object HTMLImageElement]"||o==="[object HTMLCanvasElement]")){e.save(),e.translate(n,r),e.rotate(I),e.drawImage(b,-b.width/2,-b.height/2,b.width,b.height),e.restore();return}if(!(isNaN(T)||T<=0)){switch(e.beginPath(),b){default:i?e.ellipse(n,r,i/2,T,0,0,rs):e.arc(n,r,T,0,rs),e.closePath();break;case"triangle":p=i?i/2:T,e.moveTo(n+Math.sin(I)*p,r-Math.cos(I)*T),I+=a4,e.lineTo(n+Math.sin(I)*p,r-Math.cos(I)*T),I+=a4,e.lineTo(n+Math.sin(I)*p,r-Math.cos(I)*T),e.closePath();break;case"rectRounded":f=T*.516,u=T-f,s=Math.cos(I+Ku)*u,g=Math.cos(I+Ku)*(i?i/2-f:u),a=Math.sin(I+Ku)*u,v=Math.sin(I+Ku)*(i?i/2-f:u),e.arc(n-g,r-a,f,I-Li,I-_a),e.arc(n+v,r-s,f,I-_a,I),e.arc(n+g,r+a,f,I,I+_a),e.arc(n-v,r+s,f,I+_a,I+Li),e.closePath();break;case"rect":if(!_){u=Math.SQRT1_2*T,p=i?i/2:u,e.rect(n-p,r-u,2*p,2*u);break}I+=Ku;case"rectRot":g=Math.cos(I)*(i?i/2:T),s=Math.cos(I)*T,a=Math.sin(I)*T,v=Math.sin(I)*(i?i/2:T),e.moveTo(n-g,r-a),e.lineTo(n+v,r-s),e.lineTo(n+g,r+a),e.lineTo(n-v,r+s),e.closePath();break;case"crossRot":I+=Ku;case"cross":g=Math.cos(I)*(i?i/2:T),s=Math.cos(I)*T,a=Math.sin(I)*T,v=Math.sin(I)*(i?i/2:T),e.moveTo(n-g,r-a),e.lineTo(n+g,r+a),e.moveTo(n+v,r-s),e.lineTo(n-v,r+s);break;case"star":g=Math.cos(I)*(i?i/2:T),s=Math.cos(I)*T,a=Math.sin(I)*T,v=Math.sin(I)*(i?i/2:T),e.moveTo(n-g,r-a),e.lineTo(n+g,r+a),e.moveTo(n+v,r-s),e.lineTo(n-v,r+s),I+=Ku,g=Math.cos(I)*(i?i/2:T),s=Math.cos(I)*T,a=Math.sin(I)*T,v=Math.sin(I)*(i?i/2:T),e.moveTo(n-g,r-a),e.lineTo(n+g,r+a),e.moveTo(n+v,r-s),e.lineTo(n-v,r+s);break;case"line":s=i?i/2:Math.cos(I)*T,a=Math.sin(I)*T,e.moveTo(n-s,r-a),e.lineTo(n+s,r+a);break;case"dash":e.moveTo(n,r),e.lineTo(n+Math.cos(I)*(i?i/2:T),r+Math.sin(I)*T);break;case!1:e.closePath();break}e.fill(),t.borderWidth>0&&e.stroke()}}function Bl(e,t,n){return n=n||.5,!t||e&&e.x>t.left-n&&e.x<t.right+n&&e.y>t.top-n&&e.y<t.bottom+n}function rM(e,t){e.save(),e.beginPath(),e.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),e.clip()}function iM(e){e.restore()}function MPe(e,t,n,r,i){if(!t)return e.lineTo(n.x,n.y);if(i==="middle"){const o=(t.x+n.x)/2;e.lineTo(o,t.y),e.lineTo(o,n.y)}else i==="after"!=!!r?e.lineTo(t.x,n.y):e.lineTo(n.x,t.y);e.lineTo(n.x,n.y)}function RPe(e,t,n,r){if(!t)return e.lineTo(n.x,n.y);e.bezierCurveTo(r?t.cp1x:t.cp2x,r?t.cp1y:t.cp2y,r?n.cp2x:n.cp1x,r?n.cp2y:n.cp1y,n.x,n.y)}function OPe(e,t){t.translation&&e.translate(t.translation[0],t.translation[1]),Mr(t.rotation)||e.rotate(t.rotation),t.color&&(e.fillStyle=t.color),t.textAlign&&(e.textAlign=t.textAlign),t.textBaseline&&(e.textBaseline=t.textBaseline)}function DPe(e,t,n,r,i){if(i.strikethrough||i.underline){const o=e.measureText(r),s=t-o.actualBoundingBoxLeft,a=t+o.actualBoundingBoxRight,u=n-o.actualBoundingBoxAscent,f=n+o.actualBoundingBoxDescent,p=i.strikethrough?(u+f)/2:f;e.strokeStyle=e.fillStyle,e.beginPath(),e.lineWidth=i.decorationWidth||2,e.moveTo(s,p),e.lineTo(a,p),e.stroke()}}function APe(e,t){const n=e.fillStyle;e.fillStyle=t.color,e.fillRect(t.left,t.top,t.width,t.height),e.fillStyle=n}function Ad(e,t,n,r,i,o={}){const s=ai(t)?t:[t],a=o.strokeWidth>0&&o.strokeColor!=="";let u,f;for(e.save(),e.font=i.string,OPe(e,o),u=0;u<s.length;++u)f=s[u],o.backdrop&&APe(e,o.backdrop),a&&(o.strokeColor&&(e.strokeStyle=o.strokeColor),Mr(o.strokeWidth)||(e.lineWidth=o.strokeWidth),e.strokeText(f,n,r,o.maxWidth)),e.fillText(f,n,r,o.maxWidth),DPe(e,n,r,f,o),r+=Number(i.lineHeight);e.restore()}function Vg(e,t){const{x:n,y:r,w:i,h:o,radius:s}=t;e.arc(n+s.topLeft,r+s.topLeft,s.topLeft,1.5*Li,Li,!0),e.lineTo(n,r+o-s.bottomLeft),e.arc(n+s.bottomLeft,r+o-s.bottomLeft,s.bottomLeft,Li,_a,!0),e.lineTo(n+i-s.bottomRight,r+o),e.arc(n+i-s.bottomRight,r+o-s.bottomRight,s.bottomRight,_a,0,!0),e.lineTo(n+i,r+s.topRight),e.arc(n+i-s.topRight,r+s.topRight,s.topRight,0,-_a,!0),e.lineTo(n+s.topLeft,r)}const NPe=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,LPe=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function zPe(e,t){const n=(""+e).match(NPe);if(!n||n[1]==="normal")return t*1.2;switch(e=+n[2],n[3]){case"px":return e;case"%":e/=100;break}return t*e}const FPe=e=>+e||0;function Zj(e,t){const n={},r=_r(t),i=r?Object.keys(t):t,o=_r(e)?r?s=>sr(e[s],e[t[s]]):s=>e[s]:()=>e;for(const s of i)n[s]=FPe(o(s));return n}function Xj(e){return Zj(e,{top:"y",right:"x",bottom:"y",left:"x"})}function bd(e){return Zj(e,["topLeft","topRight","bottomLeft","bottomRight"])}function Io(e){const t=Xj(e);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function ji(e,t){e=e||{},t=t||vi.font;let n=sr(e.size,t.size);typeof n=="string"&&(n=parseInt(n,10));let r=sr(e.style,t.style);r&&!(""+r).match(LPe)&&(console.warn('Invalid font style specified: "'+r+'"'),r=void 0);const i={family:sr(e.family,t.family),lineHeight:zPe(sr(e.lineHeight,t.lineHeight),n),size:n,style:r,weight:sr(e.weight,t.weight),string:""};return i.string=IPe(i),i}function Dx(e,t,n,r){let i=!0,o,s,a;for(o=0,s=e.length;o<s;++o)if(a=e[o],a!==void 0&&(t!==void 0&&typeof a=="function"&&(a=a(t),i=!1),n!==void 0&&ai(a)&&(a=a[n%a.length],i=!1),a!==void 0))return r&&!i&&(r.cacheable=!1),a}function $Pe(e,t,n){const{min:r,max:i}=e,o=ePe(t,(i-r)/2),s=(a,u)=>n&&a===0?0:a+u;return{min:s(r,-Math.abs(o)),max:s(i,o)}}function gu(e,t){return Object.assign(Object.create(e),t)}function oM(e,t=[""],n,r,i=()=>e[0]){const o=n||e;typeof r>"u"&&(r=e9("_fallback",e));const s={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:o,_fallback:r,_getTarget:i,override:a=>oM([a,...e],t,o,r)};return new Proxy(s,{deleteProperty(a,u){return delete a[u],delete a._keys,delete e[0][u],!0},get(a,u){return Qj(a,u,()=>GPe(u,t,e,a))},getOwnPropertyDescriptor(a,u){return Reflect.getOwnPropertyDescriptor(a._scopes[0],u)},getPrototypeOf(){return Reflect.getPrototypeOf(e[0])},has(a,u){return g4(a).includes(u)},ownKeys(a){return g4(a)},set(a,u,f){const p=a._storage||(a._storage=i());return a[u]=p[u]=f,delete a._keys,!0}})}function Mh(e,t,n,r){const i={_cacheable:!1,_proxy:e,_context:t,_subProxy:n,_stack:new Set,_descriptors:Yj(e,r),setContext:o=>Mh(e,o,n,r),override:o=>Mh(e.override(o),t,n,r)};return new Proxy(i,{deleteProperty(o,s){return delete o[s],delete e[s],!0},get(o,s,a){return Qj(o,s,()=>VPe(o,s,a))},getOwnPropertyDescriptor(o,s){return o._descriptors.allKeys?Reflect.has(e,s)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,s)},getPrototypeOf(){return Reflect.getPrototypeOf(e)},has(o,s){return Reflect.has(e,s)},ownKeys(){return Reflect.ownKeys(e)},set(o,s,a){return e[s]=a,delete o[s],!0}})}function Yj(e,t={scriptable:!0,indexable:!0}){const{_scriptable:n=t.scriptable,_indexable:r=t.indexable,_allKeys:i=t.allKeys}=e;return{allKeys:i,scriptable:n,indexable:r,isScriptable:su(n)?n:()=>n,isIndexable:su(r)?r:()=>r}}const BPe=(e,t)=>e?e+Yk(t):t,aM=(e,t)=>_r(t)&&e!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function Qj(e,t,n){if(Object.prototype.hasOwnProperty.call(e,t))return e[t];const r=n();return e[t]=r,r}function VPe(e,t,n){const{_proxy:r,_context:i,_subProxy:o,_descriptors:s}=e;let a=r[t];return su(a)&&s.isScriptable(t)&&(a=UPe(t,a,e,n)),ai(a)&&a.length&&(a=jPe(t,a,e,s.isIndexable)),aM(t,a)&&(a=Mh(a,i,o&&o[t],s)),a}function UPe(e,t,n,r){const{_proxy:i,_context:o,_subProxy:s,_stack:a}=n;if(a.has(e))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+e);a.add(e);let u=t(o,s||r);return a.delete(e),aM(e,u)&&(u=sM(i._scopes,i,e,u)),u}function jPe(e,t,n,r){const{_proxy:i,_context:o,_subProxy:s,_descriptors:a}=n;if(typeof o.index<"u"&&r(e))return t[o.index%t.length];if(_r(t[0])){const u=t,f=i._scopes.filter(p=>p!==u);t=[];for(const p of u){const g=sM(f,i,e,p);t.push(Mh(g,o,s&&s[e],a))}}return t}function Jj(e,t,n){return su(e)?e(t,n):e}const HPe=(e,t)=>e===!0?t:typeof e=="string"?kh(t,e):void 0;function KPe(e,t,n,r,i){for(const o of t){const s=HPe(n,o);if(s){e.add(s);const a=Jj(s._fallback,n,i);if(typeof a<"u"&&a!==n&&a!==r)return a}else if(s===!1&&typeof r<"u"&&n!==r)return null}return!1}function sM(e,t,n,r){const i=t._rootScopes,o=Jj(t._fallback,n,r),s=[...e,...i],a=new Set;a.add(r);let u=m4(a,s,n,o||n,r);return u===null||typeof o<"u"&&o!==n&&(u=m4(a,s,o,u,r),u===null)?!1:oM(Array.from(a),[""],i,o,()=>WPe(t,n,r))}function m4(e,t,n,r,i){for(;n;)n=KPe(e,t,n,r,i);return n}function WPe(e,t,n){const r=e._getTarget();t in r||(r[t]={});const i=r[t];return ai(i)&&_r(n)?n:i||{}}function GPe(e,t,n,r){let i;for(const o of t)if(i=e9(BPe(o,e),n),typeof i<"u")return aM(e,i)?sM(n,r,e,i):i}function e9(e,t){for(const n of t){if(!n)continue;const r=n[e];if(typeof r<"u")return r}}function g4(e){let t=e._keys;return t||(t=e._keys=qPe(e._scopes)),t}function qPe(e){const t=new Set;for(const n of e)for(const r of Object.keys(n).filter(i=>!i.startsWith("_")))t.add(r);return Array.from(t)}const ZPe=Number.EPSILON||1e-14,Rh=(e,t)=>t<e.length&&!e[t].skip&&e[t],t9=e=>e==="x"?"y":"x";function XPe(e,t,n,r){const i=e.skip?t:e,o=t,s=n.skip?t:n,a=RP(o,i),u=RP(s,o);let f=a/(a+u),p=u/(a+u);f=isNaN(f)?0:f,p=isNaN(p)?0:p;const g=r*f,v=r*p;return{previous:{x:o.x-g*(s.x-i.x),y:o.y-g*(s.y-i.y)},next:{x:o.x+v*(s.x-i.x),y:o.y+v*(s.y-i.y)}}}function YPe(e,t,n){const r=e.length;let i,o,s,a,u,f=Rh(e,0);for(let p=0;p<r-1;++p)if(u=f,f=Rh(e,p+1),!(!u||!f)){if(Jm(t[p],0,ZPe)){n[p]=n[p+1]=0;continue}i=n[p]/t[p],o=n[p+1]/t[p],a=Math.pow(i,2)+Math.pow(o,2),!(a<=9)&&(s=3/Math.sqrt(a),n[p]=i*s*t[p],n[p+1]=o*s*t[p])}}function QPe(e,t,n="x"){const r=t9(n),i=e.length;let o,s,a,u=Rh(e,0);for(let f=0;f<i;++f){if(s=a,a=u,u=Rh(e,f+1),!a)continue;const p=a[n],g=a[r];s&&(o=(p-s[n])/3,a[`cp1${n}`]=p-o,a[`cp1${r}`]=g-o*t[f]),u&&(o=(u[n]-p)/3,a[`cp2${n}`]=p+o,a[`cp2${r}`]=g+o*t[f])}}function JPe(e,t="x"){const n=t9(t),r=e.length,i=Array(r).fill(0),o=Array(r);let s,a,u,f=Rh(e,0);for(s=0;s<r;++s)if(a=u,u=f,f=Rh(e,s+1),!!u){if(f){const p=f[t]-u[t];i[s]=p!==0?(f[n]-u[n])/p:0}o[s]=a?f?il(i[s-1])!==il(i[s])?0:(i[s-1]+i[s])/2:i[s-1]:i[s]}YPe(e,i,o),QPe(e,o,t)}function Ax(e,t,n){return Math.max(Math.min(e,n),t)}function eTe(e,t){let n,r,i,o,s,a=Bl(e[0],t);for(n=0,r=e.length;n<r;++n)s=o,o=a,a=n<r-1&&Bl(e[n+1],t),o&&(i=e[n],s&&(i.cp1x=Ax(i.cp1x,t.left,t.right),i.cp1y=Ax(i.cp1y,t.top,t.bottom)),a&&(i.cp2x=Ax(i.cp2x,t.left,t.right),i.cp2y=Ax(i.cp2y,t.top,t.bottom)))}function tTe(e,t,n,r,i){let o,s,a,u;if(t.spanGaps&&(e=e.filter(f=>!f.skip)),t.cubicInterpolationMode==="monotone")JPe(e,i);else{let f=r?e[e.length-1]:e[0];for(o=0,s=e.length;o<s;++o)a=e[o],u=XPe(f,a,e[Math.min(o+1,s-(r?0:1))%s],t.tension),a.cp1x=u.previous.x,a.cp1y=u.previous.y,a.cp2x=u.next.x,a.cp2y=u.next.y,f=a}t.capBezierPoints&&eTe(e,n)}function n9(){return typeof window<"u"&&typeof document<"u"}function lM(e){let t=e.parentNode;return t&&t.toString()==="[object ShadowRoot]"&&(t=t.host),t}function Qb(e,t,n){let r;return typeof e=="string"?(r=parseInt(e,10),e.indexOf("%")!==-1&&(r=r/100*t.parentNode[n])):r=e,r}const z1=e=>e.ownerDocument.defaultView.getComputedStyle(e,null);function nTe(e,t){return z1(e).getPropertyValue(t)}const rTe=["top","right","bottom","left"];function _d(e,t,n){const r={};n=n?"-"+n:"";for(let i=0;i<4;i++){const o=rTe[i];r[o]=parseFloat(e[t+"-"+o+n])||0}return r.width=r.left+r.right,r.height=r.top+r.bottom,r}const iTe=(e,t,n)=>(e>0||t>0)&&(!n||!n.shadowRoot);function oTe(e,t){const n=e.touches,r=n&&n.length?n[0]:e,{offsetX:i,offsetY:o}=r;let s=!1,a,u;if(iTe(i,o,e.target))a=i,u=o;else{const f=t.getBoundingClientRect();a=r.clientX-f.left,u=r.clientY-f.top,s=!0}return{x:a,y:u,box:s}}function rd(e,t){if("native"in e)return e;const{canvas:n,currentDevicePixelRatio:r}=t,i=z1(n),o=i.boxSizing==="border-box",s=_d(i,"padding"),a=_d(i,"border","width"),{x:u,y:f,box:p}=oTe(e,n),g=s.left+(p&&a.left),v=s.top+(p&&a.top);let{width:b,height:_}=t;return o&&(b-=s.width+a.width,_-=s.height+a.height),{x:Math.round((u-g)/b*n.width/r),y:Math.round((f-v)/_*n.height/r)}}function aTe(e,t,n){let r,i;if(t===void 0||n===void 0){const o=lM(e);if(!o)t=e.clientWidth,n=e.clientHeight;else{const s=o.getBoundingClientRect(),a=z1(o),u=_d(a,"border","width"),f=_d(a,"padding");t=s.width-f.width-u.width,n=s.height-f.height-u.height,r=Qb(a.maxWidth,o,"clientWidth"),i=Qb(a.maxHeight,o,"clientHeight")}}return{width:t,height:n,maxWidth:r||Xb,maxHeight:i||Xb}}const Nx=e=>Math.round(e*10)/10;function sTe(e,t,n,r){const i=z1(e),o=_d(i,"margin"),s=Qb(i.maxWidth,e,"clientWidth")||Xb,a=Qb(i.maxHeight,e,"clientHeight")||Xb,u=aTe(e,t,n);let{width:f,height:p}=u;if(i.boxSizing==="content-box"){const v=_d(i,"border","width"),b=_d(i,"padding");f-=b.width+v.width,p-=b.height+v.height}return f=Math.max(0,f-o.width),p=Math.max(0,r?f/r:p-o.height),f=Nx(Math.min(f,s,u.maxWidth)),p=Nx(Math.min(p,a,u.maxHeight)),f&&!p&&(p=Nx(f/2)),(t!==void 0||n!==void 0)&&r&&u.height&&p>u.height&&(p=u.height,f=Nx(Math.floor(p*r))),{width:f,height:p}}function v4(e,t,n){const r=t||1,i=Math.floor(e.height*r),o=Math.floor(e.width*r);e.height=Math.floor(e.height),e.width=Math.floor(e.width);const s=e.canvas;return s.style&&(n||!s.style.height&&!s.style.width)&&(s.style.height=`${e.height}px`,s.style.width=`${e.width}px`),e.currentDevicePixelRatio!==r||s.height!==i||s.width!==o?(e.currentDevicePixelRatio=r,s.height=i,s.width=o,e.ctx.setTransform(r,0,0,r,0,0),!0):!1}const lTe=function(){let e=!1;try{const t={get passive(){return e=!0,!1}};window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch{}return e}();function y4(e,t){const n=nTe(e,t),r=n&&n.match(/^(\d+)(\.\d+)?px$/);return r?+r[1]:void 0}function id(e,t,n,r){return{x:e.x+n*(t.x-e.x),y:e.y+n*(t.y-e.y)}}function cTe(e,t,n,r){return{x:e.x+n*(t.x-e.x),y:r==="middle"?n<.5?e.y:t.y:r==="after"?n<1?e.y:t.y:n>0?t.y:e.y}}function uTe(e,t,n,r){const i={x:e.cp2x,y:e.cp2y},o={x:t.cp1x,y:t.cp1y},s=id(e,i,n),a=id(i,o,n),u=id(o,t,n),f=id(s,a,n),p=id(a,u,n);return id(f,p,n)}const dTe=function(e,t){return{x(n){return e+e+t-n},setWidth(n){t=n},textAlign(n){return n==="center"?n:n==="right"?"left":"right"},xPlus(n,r){return n-r},leftForLtr(n,r){return n-r}}},fTe=function(){return{x(e){return e},setWidth(e){},textAlign(e){return e},xPlus(e,t){return e+t},leftForLtr(e,t){return e}}};function ih(e,t,n){return e?dTe(t,n):fTe()}function r9(e,t){let n,r;(t==="ltr"||t==="rtl")&&(n=e.canvas.style,r=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",t,"important"),e.prevTextDirection=r)}function i9(e,t){t!==void 0&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))}function o9(e){return e==="angle"?{between:Uj,compare:dPe,normalize:Cs}:{between:pd,compare:(t,n)=>t-n,normalize:t=>t}}function x4({start:e,end:t,count:n,loop:r,style:i}){return{start:e%n,end:t%n,loop:r&&(t-e+1)%n===0,style:i}}function hTe(e,t,n){const{property:r,start:i,end:o}=n,{between:s,normalize:a}=o9(r),u=t.length;let{start:f,end:p,loop:g}=e,v,b;if(g){for(f+=u,p+=u,v=0,b=u;v<b&&s(a(t[f%u][r]),i,o);++v)f--,p--;f%=u,p%=u}return p<f&&(p+=u),{start:f,end:p,loop:g,style:e.style}}function pTe(e,t,n){if(!n)return[e];const{property:r,start:i,end:o}=n,s=t.length,{compare:a,between:u,normalize:f}=o9(r),{start:p,end:g,loop:v,style:b}=hTe(e,t,n),_=[];let T=!1,I=null,P,M,D;const N=()=>u(i,D,P)&&a(i,D)!==0,z=()=>a(o,P)===0||u(o,D,P),$=()=>T||N(),j=()=>!T||z();for(let U=p,q=p;U<=g;++U)M=t[U%s],!M.skip&&(P=f(M[r]),P!==D&&(T=u(P,i,o),I===null&&$()&&(I=a(P,i)===0?U:q),I!==null&&j()&&(_.push(x4({start:I,end:U,loop:v,count:s,style:b})),I=null),q=U,D=P));return I!==null&&_.push(x4({start:I,end:g,loop:v,count:s,style:b})),_}function mTe(e,t){const n=[],r=e.segments;for(let i=0;i<r.length;i++){const o=pTe(r[i],e.points,t);o.length&&n.push(...o)}return n}function gTe(e,t,n,r){let i=0,o=t-1;if(n&&!r)for(;i<t&&!e[i].skip;)i++;for(;i<t&&e[i].skip;)i++;for(i%=t,n&&(o+=i);o>i&&e[o%t].skip;)o--;return o%=t,{start:i,end:o}}function vTe(e,t,n,r){const i=e.length,o=[];let s=t,a=e[t],u;for(u=t+1;u<=n;++u){const f=e[u%i];f.skip||f.stop?a.skip||(r=!1,o.push({start:t%i,end:(u-1)%i,loop:r}),t=s=f.stop?u:null):(s=u,a.skip&&(t=u)),a=f}return s!==null&&o.push({start:t%i,end:s%i,loop:r}),o}function yTe(e,t){const n=e.points,r=e.options.spanGaps,i=n.length;if(!i)return[];const o=!!e._loop,{start:s,end:a}=gTe(n,i,o,r);if(r===!0)return b4(e,[{start:s,end:a,loop:o}],n,t);const u=a<s?a+i:a,f=!!e._fullLoop&&s===0&&a===i-1;return b4(e,vTe(n,s,u,f),n,t)}function b4(e,t,n,r){return!r||!r.setContext||!n?t:xTe(e,t,n,r)}function xTe(e,t,n,r){const i=e._chart.getContext(),o=_4(e.options),{_datasetIndex:s,options:{spanGaps:a}}=e,u=n.length,f=[];let p=o,g=t[0].start,v=g;function b(_,T,I,P){const M=a?-1:1;if(_!==T){for(_+=u;n[_%u].skip;)_-=M;for(;n[T%u].skip;)T+=M;_%u!==T%u&&(f.push({start:_%u,end:T%u,loop:I,style:P}),p=P,g=T%u)}}for(const _ of t){g=a?g:_.start;let T=n[g%u],I;for(v=g+1;v<=_.end;v++){const P=n[v%u];I=_4(r.setContext(gu(i,{type:"segment",p0:T,p1:P,p0DataIndex:(v-1)%u,p1DataIndex:v%u,datasetIndex:s}))),bTe(I,p)&&b(g,v-1,_.loop,p),T=P,p=I}g<v-1&&b(g,v-1,_.loop,p)}return f}function _4(e){return{backgroundColor:e.backgroundColor,borderCapStyle:e.borderCapStyle,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderJoinStyle:e.borderJoinStyle,borderWidth:e.borderWidth,borderColor:e.borderColor}}function bTe(e,t){if(!t)return!1;const n=[],r=function(i,o){return tM(o)?(n.includes(o)||n.push(o),n.indexOf(o)):o};return JSON.stringify(e,r)!==JSON.stringify(t,r)}/*!
* Chart.js v4.4.0
* https://www.chartjs.org
* (c) 2023 Chart.js Contributors
* Released under the MIT License
*/class _Te{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,n,r,i){const o=n.listeners[i],s=n.duration;o.forEach(a=>a({chart:t,initial:n.initial,numSteps:s,currentStep:Math.min(r-n.start,s)}))}_refresh(){this._request||(this._running=!0,this._request=Kj.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let n=0;this._charts.forEach((r,i)=>{if(!r.running||!r.items.length)return;const o=r.items;let s=o.length-1,a=!1,u;for(;s>=0;--s)u=o[s],u._active?(u._total>r.duration&&(r.duration=u._total),u.tick(t),a=!0):(o[s]=o[o.length-1],o.pop());a&&(i.draw(),this._notify(i,r,t,"progress")),o.length||(r.running=!1,this._notify(i,r,t,"complete"),r.initial=!1),n+=o.length}),this._lastDate=t,n===0&&(this._running=!1)}_getAnims(t){const n=this._charts;let r=n.get(t);return r||(r={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(t,r)),r}listen(t,n,r){this._getAnims(t).listeners[n].push(r)}add(t,n){!n||!n.length||this._getAnims(t).items.push(...n)}has(t){return this._getAnims(t).items.length>0}start(t){const n=this._charts.get(t);!n||(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((r,i)=>Math.max(r,i._duration),0),this._refresh())}running(t){if(!this._running)return!1;const n=this._charts.get(t);return!(!n||!n.running||!n.items.length)}stop(t){const n=this._charts.get(t);if(!n||!n.items.length)return;const r=n.items;let i=r.length-1;for(;i>=0;--i)r[i].cancel();n.items=[],this._notify(t,n,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var Il=new _Te;const w4="transparent",wTe={boolean(e,t,n){return n>.5?t:e},color(e,t,n){const r=f4(e||w4),i=r.valid&&f4(t||w4);return i&&i.valid?i.mix(r,n).hexString():t},number(e,t,n){return e+(t-e)*n}};class CTe{constructor(t,n,r,i){const o=n[r];i=Dx([t.to,i,o,t.from]);const s=Dx([t.from,o,i]);this._active=!0,this._fn=t.fn||wTe[t.type||typeof s],this._easing=eg[t.easing]||eg.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=n,this._prop=r,this._from=s,this._to=i,this._promises=void 0}active(){return this._active}update(t,n,r){if(this._active){this._notify(!1);const i=this._target[this._prop],o=r-this._start,s=this._duration-o;this._start=r,this._duration=Math.floor(Math.max(s,t.duration)),this._total+=o,this._loop=!!t.loop,this._to=Dx([t.to,n,i,t.from]),this._from=Dx([t.from,i,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const n=t-this._start,r=this._duration,i=this._prop,o=this._from,s=this._loop,a=this._to;let u;if(this._active=o!==a&&(s||n<r),!this._active){this._target[i]=a,this._notify(!0);return}if(n<0){this._target[i]=o;return}u=n/r%2,u=s&&u>1?2-u:u,u=this._easing(Math.min(1,Math.max(0,u))),this._target[i]=this._fn(o,a,u)}wait(){const t=this._promises||(this._promises=[]);return new Promise((n,r)=>{t.push({res:n,rej:r})})}_notify(t){const n=t?"res":"rej",r=this._promises||[];for(let i=0;i<r.length;i++)r[i][n]()}}class a9{constructor(t,n){this._chart=t,this._properties=new Map,this.configure(n)}configure(t){if(!_r(t))return;const n=Object.keys(vi.animation),r=this._properties;Object.getOwnPropertyNames(t).forEach(i=>{const o=t[i];if(!_r(o))return;const s={};for(const a of n)s[a]=o[a];(ai(o.properties)&&o.properties||[i]).forEach(a=>{(a===i||!r.has(a))&&r.set(a,s)})})}_animateOptions(t,n){const r=n.options,i=ETe(t,r);if(!i)return[];const o=this._createAnimations(i,r);return r.$shared&&STe(t.options.$animations,r).then(()=>{t.options=r},()=>{}),o}_createAnimations(t,n){const r=this._properties,i=[],o=t.$animations||(t.$animations={}),s=Object.keys(n),a=Date.now();let u;for(u=s.length-1;u>=0;--u){const f=s[u];if(f.charAt(0)==="$")continue;if(f==="options"){i.push(...this._animateOptions(t,n));continue}const p=n[f];let g=o[f];const v=r.get(f);if(g)if(v&&g.active()){g.update(v,p,a);continue}else g.cancel();if(!v||!v.duration){t[f]=p;continue}o[f]=g=new CTe(v,t,f,p),i.push(g)}return i}update(t,n){if(this._properties.size===0){Object.assign(t,n);return}const r=this._createAnimations(t,n);if(r.length)return Il.add(this._chart,r),!0}}function STe(e,t){const n=[],r=Object.keys(t);for(let i=0;i<r.length;i++){const o=e[r[i]];o&&o.active()&&n.push(o.wait())}return Promise.all(n)}function ETe(e,t){if(!t)return;let n=e.options;if(!n){e.options=t;return}return n.$shared&&(e.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n}function C4(e,t){const n=e&&e.options||{},r=n.reverse,i=n.min===void 0?t:0,o=n.max===void 0?t:0;return{start:r?o:i,end:r?i:o}}function PTe(e,t,n){if(n===!1)return!1;const r=C4(e,n),i=C4(t,n);return{top:i.end,right:r.end,bottom:i.start,left:r.start}}function TTe(e){let t,n,r,i;return _r(e)?(t=e.top,n=e.right,r=e.bottom,i=e.left):t=n=r=i=e,{top:t,right:n,bottom:r,left:i,disabled:e===!1}}function s9(e,t){const n=[],r=e._getSortedDatasetMetas(t);let i,o;for(i=0,o=r.length;i<o;++i)n.push(r[i].index);return n}function S4(e,t,n,r={}){const i=e.keys,o=r.mode==="single";let s,a,u,f;if(t!==null){for(s=0,a=i.length;s<a;++s){if(u=+i[s],u===n){if(r.all)continue;break}f=e.values[u],to(f)&&(o||t===0||il(t)===il(f))&&(t+=f)}return t}}function ITe(e){const t=Object.keys(e),n=new Array(t.length);let r,i,o;for(r=0,i=t.length;r<i;++r)o=t[r],n[r]={x:o,y:e[o]};return n}function E4(e,t){const n=e&&e.options.stacked;return n||n===void 0&&t.stack!==void 0}function kTe(e,t,n){return`${e.id}.${t.id}.${n.stack||n.type}`}function MTe(e){const{min:t,max:n,minDefined:r,maxDefined:i}=e.getUserBounds();return{min:r?t:Number.NEGATIVE_INFINITY,max:i?n:Number.POSITIVE_INFINITY}}function RTe(e,t,n){const r=e[t]||(e[t]={});return r[n]||(r[n]={})}function P4(e,t,n,r){for(const i of t.getMatchingVisibleMetas(r).reverse()){const o=e[i.index];if(n&&o>0||!n&&o<0)return i.index}return null}function T4(e,t){const{chart:n,_cachedMeta:r}=e,i=n._stacks||(n._stacks={}),{iScale:o,vScale:s,index:a}=r,u=o.axis,f=s.axis,p=kTe(o,s,r),g=t.length;let v;for(let b=0;b<g;++b){const _=t[b],{[u]:T,[f]:I}=_,P=_._stacks||(_._stacks={});v=P[f]=RTe(i,p,T),v[a]=I,v._top=P4(v,s,!0,r.type),v._bottom=P4(v,s,!1,r.type);const M=v._visualValues||(v._visualValues={});M[a]=I}}function US(e,t){const n=e.scales;return Object.keys(n).filter(r=>n[r].axis===t).shift()}function OTe(e,t){return gu(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function DTe(e,t,n){return gu(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:n,index:t,mode:"default",type:"data"})}function pm(e,t){const n=e.controller.index,r=e.vScale&&e.vScale.axis;if(!!r){t=t||e._parsed;for(const i of t){const o=i._stacks;if(!o||o[r]===void 0||o[r][n]===void 0)return;delete o[r][n],o[r]._visualValues!==void 0&&o[r]._visualValues[n]!==void 0&&delete o[r]._visualValues[n]}}}const jS=e=>e==="reset"||e==="none",I4=(e,t)=>t?e:Object.assign({},e),ATe=(e,t,n)=>e&&!t.hidden&&t._stacked&&{keys:s9(n,!0),values:null};class oh{constructor(t,n){this.chart=t,this._ctx=t.ctx,this.index=n,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.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=E4(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&pm(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,n=this._cachedMeta,r=this.getDataset(),i=(g,v,b,_)=>g==="x"?v:g==="r"?_:b,o=n.xAxisID=sr(r.xAxisID,US(t,"x")),s=n.yAxisID=sr(r.yAxisID,US(t,"y")),a=n.rAxisID=sr(r.rAxisID,US(t,"r")),u=n.indexAxis,f=n.iAxisID=i(u,o,s,a),p=n.vAxisID=i(u,s,o,a);n.xScale=this.getScaleForId(o),n.yScale=this.getScaleForId(s),n.rScale=this.getScaleForId(a),n.iScale=this.getScaleForId(f),n.vScale=this.getScaleForId(p)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const n=this._cachedMeta;return t===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&c4(this._data,this),t._stacked&&pm(t)}_dataCheck(){const t=this.getDataset(),n=t.data||(t.data=[]),r=this._data;if(_r(n))this._data=ITe(n);else if(r!==n){if(r){c4(r,this);const i=this._cachedMeta;pm(i),i._parsed=[]}n&&Object.isExtensible(n)&&mPe(n,this),this._syncList=[],this._data=n}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const n=this._cachedMeta,r=this.getDataset();let i=!1;this._dataCheck();const o=n._stacked;n._stacked=E4(n.vScale,n),n.stack!==r.stack&&(i=!0,pm(n),n.stack=r.stack),this._resyncElements(t),(i||o!==n._stacked)&&T4(this,n._parsed)}configure(){const t=this.chart.config,n=t.datasetScopeKeys(this._type),r=t.getOptionScopes(this.getDataset(),n,!0);this.options=t.createResolver(r,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,n){const{_cachedMeta:r,_data:i}=this,{iScale:o,_stacked:s}=r,a=o.axis;let u=t===0&&n===i.length?!0:r._sorted,f=t>0&&r._parsed[t-1],p,g,v;if(this._parsing===!1)r._parsed=i,r._sorted=!0,v=i;else{ai(i[t])?v=this.parseArrayData(r,i,t,n):_r(i[t])?v=this.parseObjectData(r,i,t,n):v=this.parsePrimitiveData(r,i,t,n);const b=()=>g[a]===null||f&&g[a]<f[a];for(p=0;p<n;++p)r._parsed[p+t]=g=v[p],u&&(b()&&(u=!1),f=g);r._sorted=u}s&&T4(this,v)}parsePrimitiveData(t,n,r,i){const{iScale:o,vScale:s}=t,a=o.axis,u=s.axis,f=o.getLabels(),p=o===s,g=new Array(i);let v,b,_;for(v=0,b=i;v<b;++v)_=v+r,g[v]={[a]:p||o.parse(f[_],_),[u]:s.parse(n[_],_)};return g}parseArrayData(t,n,r,i){const{xScale:o,yScale:s}=t,a=new Array(i);let u,f,p,g;for(u=0,f=i;u<f;++u)p=u+r,g=n[p],a[u]={x:o.parse(g[0],p),y:s.parse(g[1],p)};return a}parseObjectData(t,n,r,i){const{xScale:o,yScale:s}=t,{xAxisKey:a="x",yAxisKey:u="y"}=this._parsing,f=new Array(i);let p,g,v,b;for(p=0,g=i;p<g;++p)v=p+r,b=n[v],f[p]={x:o.parse(kh(b,a),v),y:s.parse(kh(b,u),v)};return f}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,n,r){const i=this.chart,o=this._cachedMeta,s=n[t.axis],a={keys:s9(i,!0),values:n._stacks[t.axis]._visualValues};return S4(a,s,o.index,{mode:r})}updateRangeFromParsed(t,n,r,i){const o=r[n.axis];let s=o===null?NaN:o;const a=i&&r._stacks[n.axis];i&&a&&(i.values=a,s=S4(i,o,this._cachedMeta.index)),t.min=Math.min(t.min,s),t.max=Math.max(t.max,s)}getMinMax(t,n){const r=this._cachedMeta,i=r._parsed,o=r._sorted&&t===r.iScale,s=i.length,a=this._getOtherScale(t),u=ATe(n,r,this.chart),f={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:p,max:g}=MTe(a);let v,b;function _(){b=i[v];const T=b[a.axis];return!to(b[t.axis])||p>T||g<T}for(v=0;v<s&&!(!_()&&(this.updateRangeFromParsed(f,t,b,u),o));++v);if(o){for(v=s-1;v>=0;--v)if(!_()){this.updateRangeFromParsed(f,t,b,u);break}}return f}getAllParsedValues(t){const n=this._cachedMeta._parsed,r=[];let i,o,s;for(i=0,o=n.length;i<o;++i)s=n[i][t.axis],to(s)&&r.push(s);return r}getMaxOverflow(){return!1}getLabelAndValue(t){const n=this._cachedMeta,r=n.iScale,i=n.vScale,o=this.getParsed(t);return{label:r?""+r.getLabelForValue(o[r.axis]):"",value:i?""+i.getLabelForValue(o[i.axis]):""}}_update(t){const n=this._cachedMeta;this.update(t||"default"),n._clip=TTe(sr(this.options.clip,PTe(n.xScale,n.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,n=this.chart,r=this._cachedMeta,i=r.data||[],o=n.chartArea,s=[],a=this._drawStart||0,u=this._drawCount||i.length-a,f=this.options.drawActiveElementsOnTop;let p;for(r.dataset&&r.dataset.draw(t,o,a,u),p=a;p<a+u;++p){const g=i[p];g.hidden||(g.active&&f?s.push(g):g.draw(t,o))}for(p=0;p<s.length;++p)s[p].draw(t,o)}getStyle(t,n){const r=n?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(r):this.resolveDataElementOptions(t||0,r)}getContext(t,n,r){const i=this.getDataset();let o;if(t>=0&&t<this._cachedMeta.data.length){const s=this._cachedMeta.data[t];o=s.$context||(s.$context=DTe(this.getContext(),t,s)),o.parsed=this.getParsed(t),o.raw=i.data[t],o.index=o.dataIndex=t}else o=this.$context||(this.$context=OTe(this.chart.getContext(),this.index)),o.dataset=i,o.index=o.datasetIndex=this.index;return o.active=!!n,o.mode=r,o}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,n){return this._resolveElementOptions(this.dataElementType.id,n,t)}_resolveElementOptions(t,n="default",r){const i=n==="active",o=this._cachedDataOpts,s=t+"-"+n,a=o[s],u=this.enableOptionSharing&&$g(r);if(a)return I4(a,u);const f=this.chart.config,p=f.datasetElementScopeKeys(this._type,t),g=i?[`${t}Hover`,"hover",t,""]:[t,""],v=f.getOptionScopes(this.getDataset(),p),b=Object.keys(vi.elements[t]),_=()=>this.getContext(r,i,n),T=f.resolveNamedOptions(v,b,_,g);return T.$shared&&(T.$shared=u,o[s]=Object.freeze(I4(T,u))),T}_resolveAnimations(t,n,r){const i=this.chart,o=this._cachedDataOpts,s=`animation-${n}`,a=o[s];if(a)return a;let u;if(i.options.animation!==!1){const p=this.chart.config,g=p.datasetAnimationScopeKeys(this._type,n),v=p.getOptionScopes(this.getDataset(),g);u=p.createResolver(v,this.getContext(t,r,n))}const f=new a9(i,u&&u.animations);return u&&u._cacheable&&(o[s]=Object.freeze(f)),f}getSharedOptions(t){if(!!t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,n){return!n||jS(t)||this.chart._animationsDisabled}_getSharedOptions(t,n){const r=this.resolveDataElementOptions(t,n),i=this._sharedOptions,o=this.getSharedOptions(r),s=this.includeOptions(n,o)||o!==i;return this.updateSharedOptions(o,n,r),{sharedOptions:o,includeOptions:s}}updateElement(t,n,r,i){jS(i)?Object.assign(t,r):this._resolveAnimations(n,i).update(t,r)}updateSharedOptions(t,n,r){t&&!jS(n)&&this._resolveAnimations(void 0,n).update(t,r)}_setStyle(t,n,r,i){t.active=i;const o=this.getStyle(n,i);this._resolveAnimations(n,r,i).update(t,{options:!i&&this.getSharedOptions(o)||o})}removeHoverStyle(t,n,r){this._setStyle(t,r,"active",!1)}setHoverStyle(t,n,r){this._setStyle(t,r,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const n=this._data,r=this._cachedMeta.data;for(const[a,u,f]of this._syncList)this[a](u,f);this._syncList=[];const i=r.length,o=n.length,s=Math.min(o,i);s&&this.parse(0,s),o>i?this._insertElements(i,o-i,t):o<i&&this._removeElements(o,i-o)}_insertElements(t,n,r=!0){const i=this._cachedMeta,o=i.data,s=t+n;let a;const u=f=>{for(f.length+=n,a=f.length-1;a>=s;a--)f[a]=f[a-n]};for(u(o),a=t;a<s;++a)o[a]=new this.dataElementType;this._parsing&&u(i._parsed),this.parse(t,n),r&&this.updateElements(o,t,n,"reset")}updateElements(t,n,r,i){}_removeElements(t,n){const r=this._cachedMeta;if(this._parsing){const i=r._parsed.splice(t,n);r._stacked&&pm(r,i)}r.data.splice(t,n)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[n,r,i]=t;this[n](r,i)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,n){n&&this._sync(["_removeElements",t,n]);const r=arguments.length-2;r&&this._sync(["_insertElements",t,r])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}Ln(oh,"defaults",{}),Ln(oh,"datasetElementType",null),Ln(oh,"dataElementType",null);function NTe(e,t){if(!e._cache.$bar){const n=e.getMatchingVisibleMetas(t);let r=[];for(let i=0,o=n.length;i<o;i++)r=r.concat(n[i].controller.getAllParsedValues(e));e._cache.$bar=Hj(r.sort((i,o)=>i-o))}return e._cache.$bar}function LTe(e){const t=e.iScale,n=NTe(t,e.type);let r=t._length,i,o,s,a;const u=()=>{s===32767||s===-32768||($g(a)&&(r=Math.min(r,Math.abs(s-a)||r)),a=s)};for(i=0,o=n.length;i<o;++i)s=t.getPixelForValue(n[i]),u();for(a=void 0,i=0,o=t.ticks.length;i<o;++i)s=t.getPixelForTick(i),u();return r}function zTe(e,t,n,r){const i=n.barThickness;let o,s;return Mr(i)?(o=t.min*n.categoryPercentage,s=n.barPercentage):(o=i*r,s=1),{chunk:o/r,ratio:s,start:t.pixels[e]-o/2}}function FTe(e,t,n,r){const i=t.pixels,o=i[e];let s=e>0?i[e-1]:null,a=e<i.length-1?i[e+1]:null;const u=n.categoryPercentage;s===null&&(s=o-(a===null?t.end-t.start:a-o)),a===null&&(a=o+o-s);const f=o-(o-Math.min(s,a))/2*u;return{chunk:Math.abs(a-s)/2*u/r,ratio:n.barPercentage,start:f}}function $Te(e,t,n,r){const i=n.parse(e[0],r),o=n.parse(e[1],r),s=Math.min(i,o),a=Math.max(i,o);let u=s,f=a;Math.abs(s)>Math.abs(a)&&(u=a,f=s),t[n.axis]=f,t._custom={barStart:u,barEnd:f,start:i,end:o,min:s,max:a}}function l9(e,t,n,r){return ai(e)?$Te(e,t,n,r):t[n.axis]=n.parse(e,r),t}function k4(e,t,n,r){const i=e.iScale,o=e.vScale,s=i.getLabels(),a=i===o,u=[];let f,p,g,v;for(f=n,p=n+r;f<p;++f)v=t[f],g={},g[i.axis]=a||i.parse(s[f],f),u.push(l9(v,g,o,f));return u}function HS(e){return e&&e.barStart!==void 0&&e.barEnd!==void 0}function BTe(e,t,n){return e!==0?il(e):(t.isHorizontal()?1:-1)*(t.min>=n?1:-1)}function VTe(e){let t,n,r,i,o;return e.horizontal?(t=e.base>e.x,n="left",r="right"):(t=e.base<e.y,n="bottom",r="top"),t?(i="end",o="start"):(i="start",o="end"),{start:n,end:r,reverse:t,top:i,bottom:o}}function UTe(e,t,n,r){let i=t.borderSkipped;const o={};if(!i){e.borderSkipped=o;return}if(i===!0){e.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:s,end:a,reverse:u,top:f,bottom:p}=VTe(e);i==="middle"&&n&&(e.enableBorderRadius=!0,(n._top||0)===r?i=f:(n._bottom||0)===r?i=p:(o[M4(p,s,a,u)]=!0,i=f)),o[M4(i,s,a,u)]=!0,e.borderSkipped=o}function M4(e,t,n,r){return r?(e=jTe(e,t,n),e=R4(e,n,t)):e=R4(e,t,n),e}function jTe(e,t,n){return e===t?n:e===n?t:e}function R4(e,t,n){return e==="start"?t:e==="end"?n:e}function HTe(e,{inflateAmount:t},n){e.inflateAmount=t==="auto"?n===1?.33:0:t}class b0 extends oh{parsePrimitiveData(t,n,r,i){return k4(t,n,r,i)}parseArrayData(t,n,r,i){return k4(t,n,r,i)}parseObjectData(t,n,r,i){const{iScale:o,vScale:s}=t,{xAxisKey:a="x",yAxisKey:u="y"}=this._parsing,f=o.axis==="x"?a:u,p=s.axis==="x"?a:u,g=[];let v,b,_,T;for(v=r,b=r+i;v<b;++v)T=n[v],_={},_[o.axis]=o.parse(kh(T,f),v),g.push(l9(kh(T,p),_,s,v));return g}updateRangeFromParsed(t,n,r,i){super.updateRangeFromParsed(t,n,r,i);const o=r._custom;o&&n===this._cachedMeta.vScale&&(t.min=Math.min(t.min,o.min),t.max=Math.max(t.max,o.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const n=this._cachedMeta,{iScale:r,vScale:i}=n,o=this.getParsed(t),s=o._custom,a=HS(s)?"["+s.start+", "+s.end+"]":""+i.getLabelForValue(o[i.axis]);return{label:""+r.getLabelForValue(o[r.axis]),value:a}}initialize(){this.enableOptionSharing=!0,super.initialize();const t=this._cachedMeta;t.stack=this.getDataset().stack}update(t){const n=this._cachedMeta;this.updateElements(n.data,0,n.data.length,t)}updateElements(t,n,r,i){const o=i==="reset",{index:s,_cachedMeta:{vScale:a}}=this,u=a.getBasePixel(),f=a.isHorizontal(),p=this._getRuler(),{sharedOptions:g,includeOptions:v}=this._getSharedOptions(n,i);for(let b=n;b<n+r;b++){const _=this.getParsed(b),T=o||Mr(_[a.axis])?{base:u,head:u}:this._calculateBarValuePixels(b),I=this._calculateBarIndexPixels(b,p),P=(_._stacks||{})[a.axis],M={horizontal:f,base:T.base,enableBorderRadius:!P||HS(_._custom)||s===P._top||s===P._bottom,x:f?T.head:I.center,y:f?I.center:T.head,height:f?I.size:Math.abs(T.size),width:f?Math.abs(T.size):I.size};v&&(M.options=g||this.resolveDataElementOptions(b,t[b].active?"active":i));const D=M.options||t[b].options;UTe(M,D,P,s),HTe(M,D,p.ratio),this.updateElement(t[b],b,M,i)}}_getStacks(t,n){const{iScale:r}=this._cachedMeta,i=r.getMatchingVisibleMetas(this._type).filter(u=>u.controller.options.grouped),o=r.options.stacked,s=[],a=u=>{const f=u.controller.getParsed(n),p=f&&f[u.vScale.axis];if(Mr(p)||isNaN(p))return!0};for(const u of i)if(!(n!==void 0&&a(u))&&((o===!1||s.indexOf(u.stack)===-1||o===void 0&&u.stack===void 0)&&s.push(u.stack),u.index===t))break;return s.length||s.push(void 0),s}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,n,r){const i=this._getStacks(t,r),o=n!==void 0?i.indexOf(n):-1;return o===-1?i.length-1:o}_getRuler(){const t=this.options,n=this._cachedMeta,r=n.iScale,i=[];let o,s;for(o=0,s=n.data.length;o<s;++o)i.push(r.getPixelForValue(this.getParsed(o)[r.axis],o));const a=t.barThickness;return{min:a||LTe(n),pixels:i,start:r._startPixel,end:r._endPixel,stackCount:this._getStackCount(),scale:r,grouped:t.grouped,ratio:a?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:n,_stacked:r,index:i},options:{base:o,minBarLength:s}}=this,a=o||0,u=this.getParsed(t),f=u._custom,p=HS(f);let g=u[n.axis],v=0,b=r?this.applyStack(n,u,r):g,_,T;b!==g&&(v=b-g,b=g),p&&(g=f.barStart,b=f.barEnd-f.barStart,g!==0&&il(g)!==il(f.barEnd)&&(v=0),v+=g);const I=!Mr(o)&&!p?o:v;let P=n.getPixelForValue(I);if(this.chart.getDataVisibility(t)?_=n.getPixelForValue(v+b):_=P,T=_-P,Math.abs(T)<s){T=BTe(T,n,a)*s,g===a&&(P-=T/2);const M=n.getPixelForDecimal(0),D=n.getPixelForDecimal(1),N=Math.min(M,D),z=Math.max(M,D);P=Math.max(Math.min(P,z),N),_=P+T,r&&!p&&(u._stacks[n.axis]._visualValues[i]=n.getValueForPixel(_)-n.getValueForPixel(P))}if(P===n.getPixelForValue(a)){const M=il(T)*n.getLineWidthForValue(a)/2;P+=M,T-=M}return{size:T,base:P,head:_,center:_+T/2}}_calculateBarIndexPixels(t,n){const r=n.scale,i=this.options,o=i.skipNull,s=sr(i.maxBarThickness,1/0);let a,u;if(n.grouped){const f=o?this._getStackCount(t):n.stackCount,p=i.barThickness==="flex"?FTe(t,n,i,f):zTe(t,n,i,f),g=this._getStackIndex(this.index,this._cachedMeta.stack,o?t:void 0);a=p.start+p.chunk*g+p.chunk/2,u=Math.min(s,p.chunk*p.ratio)}else a=r.getPixelForValue(this.getParsed(t)[r.axis],t),u=Math.min(s,n.min*n.ratio);return{base:a-u/2,head:a+u/2,center:a,size:u}}draw(){const t=this._cachedMeta,n=t.vScale,r=t.data,i=r.length;let o=0;for(;o<i;++o)this.getParsed(o)[n.axis]!==null&&r[o].draw(this._ctx)}}Ln(b0,"id","bar"),Ln(b0,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),Ln(b0,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});class _0 extends oh{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const n=this._cachedMeta,{dataset:r,data:i=[],_dataset:o}=n,s=this.chart._animationsDisabled;let{start:a,count:u}=yPe(n,i,s);this._drawStart=a,this._drawCount=u,xPe(n)&&(a=0,u=i.length),r._chart=this.chart,r._datasetIndex=this.index,r._decimated=!!o._decimated,r.points=i;const f=this.resolveDatasetElementOptions(t);this.options.showLine||(f.borderWidth=0),f.segment=this.options.segment,this.updateElement(r,void 0,{animated:!s,options:f},t),this.updateElements(i,a,u,t)}updateElements(t,n,r,i){const o=i==="reset",{iScale:s,vScale:a,_stacked:u,_dataset:f}=this._cachedMeta,{sharedOptions:p,includeOptions:g}=this._getSharedOptions(n,i),v=s.axis,b=a.axis,{spanGaps:_,segment:T}=this.options,I=Bg(_)?_:Number.POSITIVE_INFINITY,P=this.chart._animationsDisabled||o||i==="none",M=n+r,D=t.length;let N=n>0&&this.getParsed(n-1);for(let z=0;z<D;++z){const $=t[z],j=P?$:{};if(z<n||z>=M){j.skip=!0;continue}const U=this.getParsed(z),q=Mr(U[b]),Y=j[v]=s.getPixelForValue(U[v],z),te=j[b]=o||q?a.getBasePixel():a.getPixelForValue(u?this.applyStack(a,U,u):U[b],z);j.skip=isNaN(Y)||isNaN(te)||q,j.stop=z>0&&Math.abs(U[v]-N[v])>I,T&&(j.parsed=U,j.raw=f.data[z]),g&&(j.options=p||this.resolveDataElementOptions(z,$.active?"active":i)),P||this.updateElement($,z,j,i),N=U}}getMaxOverflow(){const t=this._cachedMeta,n=t.dataset,r=n.options&&n.options.borderWidth||0,i=t.data||[];if(!i.length)return r;const o=i[0].size(this.resolveDataElementOptions(0)),s=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(r,o,s)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}Ln(_0,"id","line"),Ln(_0,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),Ln(_0,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});function Gu(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class cM{constructor(t){Ln(this,"options");this.options=t||{}}static override(t){Object.assign(cM.prototype,t)}init(){}formats(){return Gu()}parse(){return Gu()}format(){return Gu()}add(){return Gu()}diff(){return Gu()}startOf(){return Gu()}endOf(){return Gu()}}var KTe={_date:cM};function WTe(e,t,n,r){const{controller:i,data:o,_sorted:s}=e,a=i._cachedMeta.iScale;if(a&&t===a.axis&&t!=="r"&&s&&o.length){const u=a._reversePixels?hPe:md;if(r){if(i._sharedOptions){const f=o[0],p=typeof f.getRange=="function"&&f.getRange(t);if(p){const g=u(o,t,n-p),v=u(o,t,n+p);return{lo:g.lo,hi:v.hi}}}}else return u(o,t,n)}return{lo:0,hi:o.length-1}}function Dv(e,t,n,r,i){const o=e.getSortedVisibleDatasetMetas(),s=n[t];for(let a=0,u=o.length;a<u;++a){const{index:f,data:p}=o[a],{lo:g,hi:v}=WTe(o[a],t,s,i);for(let b=g;b<=v;++b){const _=p[b];_.skip||r(_,f,b)}}}function GTe(e){const t=e.indexOf("x")!==-1,n=e.indexOf("y")!==-1;return function(r,i){const o=t?Math.abs(r.x-i.x):0,s=n?Math.abs(r.y-i.y):0;return Math.sqrt(Math.pow(o,2)+Math.pow(s,2))}}function KS(e,t,n,r,i){const o=[];return!i&&!e.isPointInArea(t)||Dv(e,n,t,function(a,u,f){!i&&!Bl(a,e.chartArea,0)||a.inRange(t.x,t.y,r)&&o.push({element:a,datasetIndex:u,index:f})},!0),o}function qTe(e,t,n,r){let i=[];function o(s,a,u){const{startAngle:f,endAngle:p}=s.getProps(["startAngle","endAngle"],r),{angle:g}=uPe(s,{x:t.x,y:t.y});Uj(g,f,p)&&i.push({element:s,datasetIndex:a,index:u})}return Dv(e,n,t,o),i}function ZTe(e,t,n,r,i,o){let s=[];const a=GTe(n);let u=Number.POSITIVE_INFINITY;function f(p,g,v){const b=p.inRange(t.x,t.y,i);if(r&&!b)return;const _=p.getCenterPoint(i);if(!(!!o||e.isPointInArea(_))&&!b)return;const I=a(t,_);I<u?(s=[{element:p,datasetIndex:g,index:v}],u=I):I===u&&s.push({element:p,datasetIndex:g,index:v})}return Dv(e,n,t,f),s}function WS(e,t,n,r,i,o){return!o&&!e.isPointInArea(t)?[]:n==="r"&&!r?qTe(e,t,n,i):ZTe(e,t,n,r,i,o)}function O4(e,t,n,r,i){const o=[],s=n==="x"?"inXRange":"inYRange";let a=!1;return Dv(e,n,t,(u,f,p)=>{u[s](t[n],i)&&(o.push({element:u,datasetIndex:f,index:p}),a=a||u.inRange(t.x,t.y,i))}),r&&!a?[]:o}var XTe={evaluateInteractionItems:Dv,modes:{index(e,t,n,r){const i=rd(t,e),o=n.axis||"x",s=n.includeInvisible||!1,a=n.intersect?KS(e,i,o,r,s):WS(e,i,o,!1,r,s),u=[];return a.length?(e.getSortedVisibleDatasetMetas().forEach(f=>{const p=a[0].index,g=f.data[p];g&&!g.skip&&u.push({element:g,datasetIndex:f.index,index:p})}),u):[]},dataset(e,t,n,r){const i=rd(t,e),o=n.axis||"xy",s=n.includeInvisible||!1;let a=n.intersect?KS(e,i,o,r,s):WS(e,i,o,!1,r,s);if(a.length>0){const u=a[0].datasetIndex,f=e.getDatasetMeta(u).data;a=[];for(let p=0;p<f.length;++p)a.push({element:f[p],datasetIndex:u,index:p})}return a},point(e,t,n,r){const i=rd(t,e),o=n.axis||"xy",s=n.includeInvisible||!1;return KS(e,i,o,r,s)},nearest(e,t,n,r){const i=rd(t,e),o=n.axis||"xy",s=n.includeInvisible||!1;return WS(e,i,o,n.intersect,r,s)},x(e,t,n,r){const i=rd(t,e);return O4(e,i,"x",n.intersect,r)},y(e,t,n,r){const i=rd(t,e);return O4(e,i,"y",n.intersect,r)}}};const c9=["left","top","right","bottom"];function mm(e,t){return e.filter(n=>n.pos===t)}function D4(e,t){return e.filter(n=>c9.indexOf(n.pos)===-1&&n.box.axis===t)}function gm(e,t){return e.sort((n,r)=>{const i=t?r:n,o=t?n:r;return i.weight===o.weight?i.index-o.index:i.weight-o.weight})}function YTe(e){const t=[];let n,r,i,o,s,a;for(n=0,r=(e||[]).length;n<r;++n)i=e[n],{position:o,options:{stack:s,stackWeight:a=1}}=i,t.push({index:n,box:i,pos:o,horizontal:i.isHorizontal(),weight:i.weight,stack:s&&o+s,stackWeight:a});return t}function QTe(e){const t={};for(const n of e){const{stack:r,pos:i,stackWeight:o}=n;if(!r||!c9.includes(i))continue;const s=t[r]||(t[r]={count:0,placed:0,weight:0,size:0});s.count++,s.weight+=o}return t}function JTe(e,t){const n=QTe(e),{vBoxMaxWidth:r,hBoxMaxHeight:i}=t;let o,s,a;for(o=0,s=e.length;o<s;++o){a=e[o];const{fullSize:u}=a.box,f=n[a.stack],p=f&&a.stackWeight/f.weight;a.horizontal?(a.width=p?p*r:u&&t.availableWidth,a.height=i):(a.width=r,a.height=p?p*i:u&&t.availableHeight)}return n}function eIe(e){const t=YTe(e),n=gm(t.filter(f=>f.box.fullSize),!0),r=gm(mm(t,"left"),!0),i=gm(mm(t,"right")),o=gm(mm(t,"top"),!0),s=gm(mm(t,"bottom")),a=D4(t,"x"),u=D4(t,"y");return{fullSize:n,leftAndTop:r.concat(o),rightAndBottom:i.concat(u).concat(s).concat(a),chartArea:mm(t,"chartArea"),vertical:r.concat(i).concat(u),horizontal:o.concat(s).concat(a)}}function A4(e,t,n,r){return Math.max(e[n],t[n])+Math.max(e[r],t[r])}function u9(e,t){e.top=Math.max(e.top,t.top),e.left=Math.max(e.left,t.left),e.bottom=Math.max(e.bottom,t.bottom),e.right=Math.max(e.right,t.right)}function tIe(e,t,n,r){const{pos:i,box:o}=n,s=e.maxPadding;if(!_r(i)){n.size&&(e[i]-=n.size);const g=r[n.stack]||{size:0,count:1};g.size=Math.max(g.size,n.horizontal?o.height:o.width),n.size=g.size/g.count,e[i]+=n.size}o.getPadding&&u9(s,o.getPadding());const a=Math.max(0,t.outerWidth-A4(s,e,"left","right")),u=Math.max(0,t.outerHeight-A4(s,e,"top","bottom")),f=a!==e.w,p=u!==e.h;return e.w=a,e.h=u,n.horizontal?{same:f,other:p}:{same:p,other:f}}function nIe(e){const t=e.maxPadding;function n(r){const i=Math.max(t[r]-e[r],0);return e[r]+=i,i}e.y+=n("top"),e.x+=n("left"),n("right"),n("bottom")}function rIe(e,t){const n=t.maxPadding;function r(i){const o={left:0,top:0,right:0,bottom:0};return i.forEach(s=>{o[s]=Math.max(t[s],n[s])}),o}return r(e?["left","right"]:["top","bottom"])}function km(e,t,n,r){const i=[];let o,s,a,u,f,p;for(o=0,s=e.length,f=0;o<s;++o){a=e[o],u=a.box,u.update(a.width||t.w,a.height||t.h,rIe(a.horizontal,t));const{same:g,other:v}=tIe(t,n,a,r);f|=g&&i.length,p=p||v,u.fullSize||i.push(a)}return f&&km(i,t,n,r)||p}function Lx(e,t,n,r,i){e.top=n,e.left=t,e.right=t+r,e.bottom=n+i,e.width=r,e.height=i}function N4(e,t,n,r){const i=n.padding;let{x:o,y:s}=t;for(const a of e){const u=a.box,f=r[a.stack]||{count:1,placed:0,weight:1},p=a.stackWeight/f.weight||1;if(a.horizontal){const g=t.w*p,v=f.size||u.height;$g(f.start)&&(s=f.start),u.fullSize?Lx(u,i.left,s,n.outerWidth-i.right-i.left,v):Lx(u,t.left+f.placed,s,g,v),f.start=s,f.placed+=g,s=u.bottom}else{const g=t.h*p,v=f.size||u.width;$g(f.start)&&(o=f.start),u.fullSize?Lx(u,o,i.top,v,n.outerHeight-i.bottom-i.top):Lx(u,o,t.top+f.placed,v,g),f.start=o,f.placed+=g,o=u.right}}t.x=o,t.y=s}var es={addBox(e,t){e.boxes||(e.boxes=[]),t.fullSize=t.fullSize||!1,t.position=t.position||"top",t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw(n){t.draw(n)}}]},e.boxes.push(t)},removeBox(e,t){const n=e.boxes?e.boxes.indexOf(t):-1;n!==-1&&e.boxes.splice(n,1)},configure(e,t,n){t.fullSize=n.fullSize,t.position=n.position,t.weight=n.weight},update(e,t,n,r){if(!e)return;const i=Io(e.options.layout.padding),o=Math.max(t-i.width,0),s=Math.max(n-i.height,0),a=eIe(e.boxes),u=a.vertical,f=a.horizontal;kr(e.boxes,T=>{typeof T.beforeLayout=="function"&&T.beforeLayout()});const p=u.reduce((T,I)=>I.box.options&&I.box.options.display===!1?T:T+1,0)||1,g=Object.freeze({outerWidth:t,outerHeight:n,padding:i,availableWidth:o,availableHeight:s,vBoxMaxWidth:o/2/p,hBoxMaxHeight:s/2}),v=Object.assign({},i);u9(v,Io(r));const b=Object.assign({maxPadding:v,w:o,h:s,x:i.left,y:i.top},i),_=JTe(u.concat(f),g);km(a.fullSize,b,g,_),km(u,b,g,_),km(f,b,g,_)&&km(u,b,g,_),nIe(b),N4(a.leftAndTop,b,g,_),b.x+=b.w,b.y+=b.h,N4(a.rightAndBottom,b,g,_),e.chartArea={left:b.left,top:b.top,right:b.left+b.w,bottom:b.top+b.h,height:b.h,width:b.w},kr(a.chartArea,T=>{const I=T.box;Object.assign(I,e.chartArea),I.update(b.w,b.h,{left:0,top:0,right:0,bottom:0})})}};class d9{acquireContext(t,n){}releaseContext(t){return!1}addEventListener(t,n,r){}removeEventListener(t,n,r){}getDevicePixelRatio(){return 1}getMaximumSize(t,n,r,i){return n=Math.max(0,n||t.width),r=r||t.height,{width:n,height:Math.max(0,i?Math.floor(n/i):r)}}isAttached(t){return!0}updateConfig(t){}}class iIe extends d9{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const w0="$chartjs",oIe={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},L4=e=>e===null||e==="";function aIe(e,t){const n=e.style,r=e.getAttribute("height"),i=e.getAttribute("width");if(e[w0]={initial:{height:r,width:i,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",L4(i)){const o=y4(e,"width");o!==void 0&&(e.width=o)}if(L4(r))if(e.style.height==="")e.height=e.width/(t||2);else{const o=y4(e,"height");o!==void 0&&(e.height=o)}return e}const f9=lTe?{passive:!0}:!1;function sIe(e,t,n){e.addEventListener(t,n,f9)}function lIe(e,t,n){e.canvas.removeEventListener(t,n,f9)}function cIe(e,t){const n=oIe[e.type]||e.type,{x:r,y:i}=rd(e,t);return{type:n,chart:t,native:e,x:r!==void 0?r:null,y:i!==void 0?i:null}}function Jb(e,t){for(const n of e)if(n===t||n.contains(t))return!0}function uIe(e,t,n){const r=e.canvas,i=new MutationObserver(o=>{let s=!1;for(const a of o)s=s||Jb(a.addedNodes,r),s=s&&!Jb(a.removedNodes,r);s&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}function dIe(e,t,n){const r=e.canvas,i=new MutationObserver(o=>{let s=!1;for(const a of o)s=s||Jb(a.removedNodes,r),s=s&&!Jb(a.addedNodes,r);s&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}const Ug=new Map;let z4=0;function h9(){const e=window.devicePixelRatio;e!==z4&&(z4=e,Ug.forEach((t,n)=>{n.currentDevicePixelRatio!==e&&t()}))}function fIe(e,t){Ug.size||window.addEventListener("resize",h9),Ug.set(e,t)}function hIe(e){Ug.delete(e),Ug.size||window.removeEventListener("resize",h9)}function pIe(e,t,n){const r=e.canvas,i=r&&lM(r);if(!i)return;const o=Wj((a,u)=>{const f=i.clientWidth;n(a,u),f<i.clientWidth&&n()},window),s=new ResizeObserver(a=>{const u=a[0],f=u.contentRect.width,p=u.contentRect.height;f===0&&p===0||o(f,p)});return s.observe(i),fIe(e,o),s}function GS(e,t,n){n&&n.disconnect(),t==="resize"&&hIe(e)}function mIe(e,t,n){const r=e.canvas,i=Wj(o=>{e.ctx!==null&&n(cIe(o,e))},e);return sIe(r,t,i),i}class gIe extends d9{acquireContext(t,n){const r=t&&t.getContext&&t.getContext("2d");return r&&r.canvas===t?(aIe(t,n),r):null}releaseContext(t){const n=t.canvas;if(!n[w0])return!1;const r=n[w0].initial;["height","width"].forEach(o=>{const s=r[o];Mr(s)?n.removeAttribute(o):n.setAttribute(o,s)});const i=r.style||{};return Object.keys(i).forEach(o=>{n.style[o]=i[o]}),n.width=n.width,delete n[w0],!0}addEventListener(t,n,r){this.removeEventListener(t,n);const i=t.$proxies||(t.$proxies={}),s={attach:uIe,detach:dIe,resize:pIe}[n]||mIe;i[n]=s(t,n,r)}removeEventListener(t,n){const r=t.$proxies||(t.$proxies={}),i=r[n];if(!i)return;({attach:GS,detach:GS,resize:GS}[n]||lIe)(t,n,i),r[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,n,r,i){return sTe(t,n,r,i)}isAttached(t){const n=lM(t);return!!(n&&n.isConnected)}}function vIe(e){return!n9()||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas?iIe:gIe}class ol{constructor(){Ln(this,"x");Ln(this,"y");Ln(this,"active",!1);Ln(this,"options");Ln(this,"$animations")}tooltipPosition(t){const{x:n,y:r}=this.getProps(["x","y"],t);return{x:n,y:r}}hasValue(){return Bg(this.x)&&Bg(this.y)}getProps(t,n){const r=this.$animations;if(!n||!r)return this;const i={};return t.forEach(o=>{i[o]=r[o]&&r[o].active()?r[o]._to:this[o]}),i}}Ln(ol,"defaults",{}),Ln(ol,"defaultRoutes");function yIe(e,t){const n=e.options.ticks,r=xIe(e),i=Math.min(n.maxTicksLimit||r,r),o=n.major.enabled?_Ie(t):[],s=o.length,a=o[0],u=o[s-1],f=[];if(s>i)return wIe(t,f,o,s/i),f;const p=bIe(o,t,i);if(s>0){let g,v;const b=s>1?Math.round((u-a)/(s-1)):null;for(zx(t,f,p,Mr(b)?0:a-b,a),g=0,v=s-1;g<v;g++)zx(t,f,p,o[g],o[g+1]);return zx(t,f,p,u,Mr(b)?t.length:u+b),f}return zx(t,f,p),f}function xIe(e){const t=e.options.offset,n=e._tickSize(),r=e._length/n+(t?0:1),i=e._maxLength/n;return Math.floor(Math.min(r,i))}function bIe(e,t,n){const r=CIe(e),i=t.length/n;if(!r)return Math.max(i,1);const o=lPe(r);for(let s=0,a=o.length-1;s<a;s++){const u=o[s];if(u>i)return u}return Math.max(i,1)}function _Ie(e){const t=[];let n,r;for(n=0,r=e.length;n<r;n++)e[n].major&&t.push(n);return t}function wIe(e,t,n,r){let i=0,o=n[0],s;for(r=Math.ceil(r),s=0;s<e.length;s++)s===o&&(t.push(e[s]),i++,o=n[i*r])}function zx(e,t,n,r,i){const o=sr(r,0),s=Math.min(sr(i,e.length),e.length);let a=0,u,f,p;for(n=Math.ceil(n),i&&(u=i-r,n=u/Math.floor(u/n)),p=o;p<0;)a++,p=Math.round(o+a*n);for(f=Math.max(o,0);f<s;f++)f===p&&(t.push(e[f]),a++,p=Math.round(o+a*n))}function CIe(e){const t=e.length;let n,r;if(t<2)return!1;for(r=e[0],n=1;n<t;++n)if(e[n]-e[n-1]!==r)return!1;return r}const SIe=e=>e==="left"?"right":e==="right"?"left":e,F4=(e,t,n)=>t==="top"||t==="left"?e[t]+n:e[t]-n,$4=(e,t)=>Math.min(t||e,e);function B4(e,t){const n=[],r=e.length/t,i=e.length;let o=0;for(;o<i;o+=r)n.push(e[Math.floor(o)]);return n}function EIe(e,t,n){const r=e.ticks.length,i=Math.min(t,r-1),o=e._startPixel,s=e._endPixel,a=1e-6;let u=e.getPixelForTick(i),f;if(!(n&&(r===1?f=Math.max(u-o,s-u):t===0?f=(e.getPixelForTick(1)-u)/2:f=(u-e.getPixelForTick(i-1))/2,u+=i<t?f:-f,u<o-a||u>s+a)))return u}function PIe(e,t){kr(e,n=>{const r=n.gc,i=r.length/2;let o;if(i>t){for(o=0;o<i;++o)delete n.data[r[o]];r.splice(0,i)}})}function vm(e){return e.drawTicks?e.tickLength:0}function V4(e,t){if(!e.display)return 0;const n=ji(e.font,t),r=Io(e.padding);return(ai(e.text)?e.text.length:1)*n.lineHeight+r.height}function TIe(e,t){return gu(e,{scale:t,type:"scale"})}function IIe(e,t,n){return gu(e,{tick:n,index:t,type:"tick"})}function kIe(e,t,n){let r=eM(e);return(n&&t!=="right"||!n&&t==="right")&&(r=SIe(r)),r}function MIe(e,t,n,r){const{top:i,left:o,bottom:s,right:a,chart:u}=e,{chartArea:f,scales:p}=u;let g=0,v,b,_;const T=s-i,I=a-o;if(e.isHorizontal()){if(b=Co(r,o,a),_r(n)){const P=Object.keys(n)[0],M=n[P];_=p[P].getPixelForValue(M)+T-t}else n==="center"?_=(f.bottom+f.top)/2+T-t:_=F4(e,n,t);v=a-o}else{if(_r(n)){const P=Object.keys(n)[0],M=n[P];b=p[P].getPixelForValue(M)-I+t}else n==="center"?b=(f.left+f.right)/2-I+t:b=F4(e,n,t);_=Co(r,s,i),g=n==="left"?-_a:_a}return{titleX:b,titleY:_,maxWidth:v,rotation:g}}class Kd extends ol{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.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(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,n){return t}getUserBounds(){let{_userMin:t,_userMax:n,_suggestedMin:r,_suggestedMax:i}=this;return t=ga(t,Number.POSITIVE_INFINITY),n=ga(n,Number.NEGATIVE_INFINITY),r=ga(r,Number.POSITIVE_INFINITY),i=ga(i,Number.NEGATIVE_INFINITY),{min:ga(t,r),max:ga(n,i),minDefined:to(t),maxDefined:to(n)}}getMinMax(t){let{min:n,max:r,minDefined:i,maxDefined:o}=this.getUserBounds(),s;if(i&&o)return{min:n,max:r};const a=this.getMatchingVisibleMetas();for(let u=0,f=a.length;u<f;++u)s=a[u].controller.getMinMax(this,t),i||(n=Math.min(n,s.min)),o||(r=Math.max(r,s.max));return n=o&&n>r?r:n,r=i&&n>r?n:r,{min:ga(n,ga(r,n)),max:ga(r,ga(n,r))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){Zr(this.options.beforeUpdate,[this])}update(t,n,r){const{beginAtZero:i,grace:o,ticks:s}=this.options,a=s.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=n,this._margins=r=Object.assign({left:0,right:0,top:0,bottom:0},r),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+r.left+r.right:this.height+r.top+r.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=$Pe(this,o,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const u=a<this.ticks.length;this._convertTicksToLabels(u?B4(this.ticks,a):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),s.display&&(s.autoSkip||s.source==="auto")&&(this.ticks=yIe(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),u&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t=this.options.reverse,n,r;this.isHorizontal()?(n=this.left,r=this.right):(n=this.top,r=this.bottom,t=!t),this._startPixel=n,this._endPixel=r,this._reversePixels=t,this._length=r-n,this._alignToPixels=this.options.alignToPixels}afterUpdate(){Zr(this.options.afterUpdate,[this])}beforeSetDimensions(){Zr(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(){Zr(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),Zr(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){Zr(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const n=this.options.ticks;let r,i,o;for(r=0,i=t.length;r<i;r++)o=t[r],o.label=Zr(n.callback,[o.value,r,t],this)}afterTickToLabelConversion(){Zr(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){Zr(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,n=t.ticks,r=$4(this.ticks.length,t.ticks.maxTicksLimit),i=n.minRotation||0,o=n.maxRotation;let s=i,a,u,f;if(!this._isVisible()||!n.display||i>=o||r<=1||!this.isHorizontal()){this.labelRotation=i;return}const p=this._getLabelSizes(),g=p.widest.width,v=p.highest.height,b=wa(this.chart.width-g,0,this.maxWidth);a=t.offset?this.maxWidth/r:b/(r-1),g+6>a&&(a=b/(r-(t.offset?.5:1)),u=this.maxHeight-vm(t.grid)-n.padding-V4(t.title,this.chart.options.font),f=Math.sqrt(g*g+v*v),s=Qk(Math.min(Math.asin(wa((p.highest.height+6)/a,-1,1)),Math.asin(wa(u/f,-1,1))-Math.asin(wa(v/f,-1,1)))),s=Math.max(i,Math.min(o,s))),this.labelRotation=s}afterCalculateLabelRotation(){Zr(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){Zr(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:n,options:{ticks:r,title:i,grid:o}}=this,s=this._isVisible(),a=this.isHorizontal();if(s){const u=V4(i,n.options.font);if(a?(t.width=this.maxWidth,t.height=vm(o)+u):(t.height=this.maxHeight,t.width=vm(o)+u),r.display&&this.ticks.length){const{first:f,last:p,widest:g,highest:v}=this._getLabelSizes(),b=r.padding*2,_=Bc(this.labelRotation),T=Math.cos(_),I=Math.sin(_);if(a){const P=r.mirror?0:I*g.width+T*v.height;t.height=Math.min(this.maxHeight,t.height+P+b)}else{const P=r.mirror?0:T*g.width+I*v.height;t.width=Math.min(this.maxWidth,t.width+P+b)}this._calculatePadding(f,p,I,T)}}this._handleMargins(),a?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,n,r,i){const{ticks:{align:o,padding:s},position:a}=this.options,u=this.labelRotation!==0,f=a!=="top"&&this.axis==="x";if(this.isHorizontal()){const p=this.getPixelForTick(0)-this.left,g=this.right-this.getPixelForTick(this.ticks.length-1);let v=0,b=0;u?f?(v=i*t.width,b=r*n.height):(v=r*t.height,b=i*n.width):o==="start"?b=n.width:o==="end"?v=t.width:o!=="inner"&&(v=t.width/2,b=n.width/2),this.paddingLeft=Math.max((v-p+s)*this.width/(this.width-p),0),this.paddingRight=Math.max((b-g+s)*this.width/(this.width-g),0)}else{let p=n.height/2,g=t.height/2;o==="start"?(p=0,g=t.height):o==="end"&&(p=n.height,g=0),this.paddingTop=p+s,this.paddingBottom=g+s}}_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(){Zr(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:n}=this.options;return n==="top"||n==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let n,r;for(n=0,r=t.length;n<r;n++)Mr(t[n].label)&&(t.splice(n,1),r--,n--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const n=this.options.ticks.sampleSize;let r=this.ticks;n<r.length&&(r=B4(r,n)),this._labelSizes=t=this._computeLabelSizes(r,r.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,n,r){const{ctx:i,_longestTextCache:o}=this,s=[],a=[],u=Math.floor(n/$4(n,r));let f=0,p=0,g,v,b,_,T,I,P,M,D,N,z;for(g=0;g<n;g+=u){if(_=t[g].label,T=this._resolveTickFontOptions(g),i.font=I=T.string,P=o[I]=o[I]||{data:{},gc:[]},M=T.lineHeight,D=N=0,!Mr(_)&&!ai(_))D=Yb(i,P.data,P.gc,D,_),N=M;else if(ai(_))for(v=0,b=_.length;v<b;++v)z=_[v],!Mr(z)&&!ai(z)&&(D=Yb(i,P.data,P.gc,D,z),N+=M);s.push(D),a.push(N),f=Math.max(D,f),p=Math.max(N,p)}PIe(o,n);const $=s.indexOf(f),j=a.indexOf(p),U=q=>({width:s[q]||0,height:a[q]||0});return{first:U(0),last:U(n-1),widest:U($),highest:U(j),widths:s,heights:a}}getLabelForValue(t){return t}getPixelForValue(t,n){return NaN}getValueForPixel(t){}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const n=this._startPixel+t*this._length;return fPe(this._alignToPixels?Wu(this.chart,n,0):n)}getDecimalForPixel(t){const n=(t-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:n}=this;return t<0&&n<0?n:t>0&&n>0?t:0}getContext(t){const n=this.ticks||[];if(t>=0&&t<n.length){const r=n[t];return r.$context||(r.$context=IIe(this.getContext(),t,r))}return this.$context||(this.$context=TIe(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,n=Bc(this.labelRotation),r=Math.abs(Math.cos(n)),i=Math.abs(Math.sin(n)),o=this._getLabelSizes(),s=t.autoSkipPadding||0,a=o?o.widest.width+s:0,u=o?o.highest.height+s:0;return this.isHorizontal()?u*r>a*i?a/r:u/i:u*i<a*r?u/r:a/i}_isVisible(){const t=this.options.display;return t!=="auto"?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const n=this.axis,r=this.chart,i=this.options,{grid:o,position:s,border:a}=i,u=o.offset,f=this.isHorizontal(),g=this.ticks.length+(u?1:0),v=vm(o),b=[],_=a.setContext(this.getContext()),T=_.display?_.width:0,I=T/2,P=function(re){return Wu(r,re,T)};let M,D,N,z,$,j,U,q,Y,te,Z,X;if(s==="top")M=P(this.bottom),j=this.bottom-v,q=M-I,te=P(t.top)+I,X=t.bottom;else if(s==="bottom")M=P(this.top),te=t.top,X=P(t.bottom)-I,j=M+I,q=this.top+v;else if(s==="left")M=P(this.right),$=this.right-v,U=M-I,Y=P(t.left)+I,Z=t.right;else if(s==="right")M=P(this.left),Y=t.left,Z=P(t.right)-I,$=M+I,U=this.left+v;else if(n==="x"){if(s==="center")M=P((t.top+t.bottom)/2+.5);else if(_r(s)){const re=Object.keys(s)[0],se=s[re];M=P(this.chart.scales[re].getPixelForValue(se))}te=t.top,X=t.bottom,j=M+I,q=j+v}else if(n==="y"){if(s==="center")M=P((t.left+t.right)/2);else if(_r(s)){const re=Object.keys(s)[0],se=s[re];M=P(this.chart.scales[re].getPixelForValue(se))}$=M-I,U=$-v,Y=t.left,Z=t.right}const J=sr(i.ticks.maxTicksLimit,g),ue=Math.max(1,Math.ceil(g/J));for(D=0;D<g;D+=ue){const re=this.getContext(D),se=o.setContext(re),oe=a.setContext(re),he=se.lineWidth,Ce=se.color,Se=oe.dash||[],be=oe.dashOffset,Re=se.tickWidth,Ie=se.tickColor,Me=se.tickBorderDash||[],Ae=se.tickBorderDashOffset;N=EIe(this,D,u),N!==void 0&&(z=Wu(r,N,he),f?$=U=Y=Z=z:j=q=te=X=z,b.push({tx1:$,ty1:j,tx2:U,ty2:q,x1:Y,y1:te,x2:Z,y2:X,width:he,color:Ce,borderDash:Se,borderDashOffset:be,tickWidth:Re,tickColor:Ie,tickBorderDash:Me,tickBorderDashOffset:Ae}))}return this._ticksLength=g,this._borderValue=M,b}_computeLabelItems(t){const n=this.axis,r=this.options,{position:i,ticks:o}=r,s=this.isHorizontal(),a=this.ticks,{align:u,crossAlign:f,padding:p,mirror:g}=o,v=vm(r.grid),b=v+p,_=g?-p:b,T=-Bc(this.labelRotation),I=[];let P,M,D,N,z,$,j,U,q,Y,te,Z,X="middle";if(i==="top")$=this.bottom-_,j=this._getXAxisLabelAlignment();else if(i==="bottom")$=this.top+_,j=this._getXAxisLabelAlignment();else if(i==="left"){const ue=this._getYAxisLabelAlignment(v);j=ue.textAlign,z=ue.x}else if(i==="right"){const ue=this._getYAxisLabelAlignment(v);j=ue.textAlign,z=ue.x}else if(n==="x"){if(i==="center")$=(t.top+t.bottom)/2+b;else if(_r(i)){const ue=Object.keys(i)[0],re=i[ue];$=this.chart.scales[ue].getPixelForValue(re)+b}j=this._getXAxisLabelAlignment()}else if(n==="y"){if(i==="center")z=(t.left+t.right)/2-b;else if(_r(i)){const ue=Object.keys(i)[0],re=i[ue];z=this.chart.scales[ue].getPixelForValue(re)}j=this._getYAxisLabelAlignment(v).textAlign}n==="y"&&(u==="start"?X="top":u==="end"&&(X="bottom"));const J=this._getLabelSizes();for(P=0,M=a.length;P<M;++P){D=a[P],N=D.label;const ue=o.setContext(this.getContext(P));U=this.getPixelForTick(P)+o.labelOffset,q=this._resolveTickFontOptions(P),Y=q.lineHeight,te=ai(N)?N.length:1;const re=te/2,se=ue.color,oe=ue.textStrokeColor,he=ue.textStrokeWidth;let Ce=j;s?(z=U,j==="inner"&&(P===M-1?Ce=this.options.reverse?"left":"right":P===0?Ce=this.options.reverse?"right":"left":Ce="center"),i==="top"?f==="near"||T!==0?Z=-te*Y+Y/2:f==="center"?Z=-J.highest.height/2-re*Y+Y:Z=-J.highest.height+Y/2:f==="near"||T!==0?Z=Y/2:f==="center"?Z=J.highest.height/2-re*Y:Z=J.highest.height-te*Y,g&&(Z*=-1),T!==0&&!ue.showLabelBackdrop&&(z+=Y/2*Math.sin(T))):($=U,Z=(1-te)*Y/2);let Se;if(ue.showLabelBackdrop){const be=Io(ue.backdropPadding),Re=J.heights[P],Ie=J.widths[P];let Me=Z-be.top,Ae=0-be.left;switch(X){case"middle":Me-=Re/2;break;case"bottom":Me-=Re;break}switch(j){case"center":Ae-=Ie/2;break;case"right":Ae-=Ie;break}Se={left:Ae,top:Me,width:Ie+be.width,height:Re+be.height,color:ue.backdropColor}}I.push({label:N,font:q,textOffset:Z,options:{rotation:T,color:se,strokeColor:oe,strokeWidth:he,textAlign:Ce,textBaseline:X,translation:[z,$],backdrop:Se}})}return I}_getXAxisLabelAlignment(){const{position:t,ticks:n}=this.options;if(-Bc(this.labelRotation))return t==="top"?"left":"right";let i="center";return n.align==="start"?i="left":n.align==="end"?i="right":n.align==="inner"&&(i="inner"),i}_getYAxisLabelAlignment(t){const{position:n,ticks:{crossAlign:r,mirror:i,padding:o}}=this.options,s=this._getLabelSizes(),a=t+o,u=s.widest.width;let f,p;return n==="left"?i?(p=this.right+o,r==="near"?f="left":r==="center"?(f="center",p+=u/2):(f="right",p+=u)):(p=this.right-a,r==="near"?f="right":r==="center"?(f="center",p-=u/2):(f="left",p=this.left)):n==="right"?i?(p=this.left+o,r==="near"?f="right":r==="center"?(f="center",p-=u/2):(f="left",p-=u)):(p=this.left+a,r==="near"?f="left":r==="center"?(f="center",p+=u/2):(f="right",p=this.right)):f="right",{textAlign:f,x:p}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,n=this.options.position;if(n==="left"||n==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(n==="top"||n==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){const{ctx:t,options:{backgroundColor:n},left:r,top:i,width:o,height:s}=this;n&&(t.save(),t.fillStyle=n,t.fillRect(r,i,o,s),t.restore())}getLineWidthForValue(t){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const i=this.ticks.findIndex(o=>o.value===t);return i>=0?n.setContext(this.getContext(i)).lineWidth:0}drawGrid(t){const n=this.options.grid,r=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let o,s;const a=(u,f,p)=>{!p.width||!p.color||(r.save(),r.lineWidth=p.width,r.strokeStyle=p.color,r.setLineDash(p.borderDash||[]),r.lineDashOffset=p.borderDashOffset,r.beginPath(),r.moveTo(u.x,u.y),r.lineTo(f.x,f.y),r.stroke(),r.restore())};if(n.display)for(o=0,s=i.length;o<s;++o){const u=i[o];n.drawOnChartArea&&a({x:u.x1,y:u.y1},{x:u.x2,y:u.y2},u),n.drawTicks&&a({x:u.tx1,y:u.ty1},{x:u.tx2,y:u.ty2},{color:u.tickColor,width:u.tickWidth,borderDash:u.tickBorderDash,borderDashOffset:u.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:n,options:{border:r,grid:i}}=this,o=r.setContext(this.getContext()),s=r.display?o.width:0;if(!s)return;const a=i.setContext(this.getContext(0)).lineWidth,u=this._borderValue;let f,p,g,v;this.isHorizontal()?(f=Wu(t,this.left,s)-s/2,p=Wu(t,this.right,a)+a/2,g=v=u):(g=Wu(t,this.top,s)-s/2,v=Wu(t,this.bottom,a)+a/2,f=p=u),n.save(),n.lineWidth=o.width,n.strokeStyle=o.color,n.beginPath(),n.moveTo(f,g),n.lineTo(p,v),n.stroke(),n.restore()}drawLabels(t){if(!this.options.ticks.display)return;const r=this.ctx,i=this._computeLabelArea();i&&rM(r,i);const o=this.getLabelItems(t);for(const s of o){const a=s.options,u=s.font,f=s.label,p=s.textOffset;Ad(r,f,0,p,u,a)}i&&iM(r)}drawTitle(){const{ctx:t,options:{position:n,title:r,reverse:i}}=this;if(!r.display)return;const o=ji(r.font),s=Io(r.padding),a=r.align;let u=o.lineHeight/2;n==="bottom"||n==="center"||_r(n)?(u+=s.bottom,ai(r.text)&&(u+=o.lineHeight*(r.text.length-1))):u+=s.top;const{titleX:f,titleY:p,maxWidth:g,rotation:v}=MIe(this,u,n,a);Ad(t,r.text,0,0,o,{color:r.color,maxWidth:g,rotation:v,textAlign:kIe(a,n,i),textBaseline:"middle",translation:[f,p]})}draw(t){!this._isVisible()||(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,n=t.ticks&&t.ticks.z||0,r=sr(t.grid&&t.grid.z,-1),i=sr(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==Kd.prototype.draw?[{z:n,draw:o=>{this.draw(o)}}]:[{z:r,draw:o=>{this.drawBackground(),this.drawGrid(o),this.drawTitle()}},{z:i,draw:()=>{this.drawBorder()}},{z:n,draw:o=>{this.drawLabels(o)}}]}getMatchingVisibleMetas(t){const n=this.chart.getSortedVisibleDatasetMetas(),r=this.axis+"AxisID",i=[];let o,s;for(o=0,s=n.length;o<s;++o){const a=n[o];a[r]===this.id&&(!t||a.type===t)&&i.push(a)}return i}_resolveTickFontOptions(t){const n=this.options.ticks.setContext(this.getContext(t));return ji(n.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class Fx{constructor(t,n,r){this.type=t,this.scope=n,this.override=r,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const n=Object.getPrototypeOf(t);let r;DIe(n)&&(r=this.register(n));const i=this.items,o=t.id,s=this.scope+"."+o;if(!o)throw new Error("class does not have id: "+t);return o in i||(i[o]=t,RIe(t,s,r),this.override&&vi.override(t.id,t.overrides)),s}get(t){return this.items[t]}unregister(t){const n=this.items,r=t.id,i=this.scope;r in n&&delete n[r],i&&r in vi[i]&&(delete vi[i][r],this.override&&delete Dd[r])}}function RIe(e,t,n){const r=Fg(Object.create(null),[n?vi.get(n):{},vi.get(t),e.defaults]);vi.set(t,r),e.defaultRoutes&&OIe(t,e.defaultRoutes),e.descriptors&&vi.describe(t,e.descriptors)}function OIe(e,t){Object.keys(t).forEach(n=>{const r=n.split("."),i=r.pop(),o=[e].concat(r).join("."),s=t[n].split("."),a=s.pop(),u=s.join(".");vi.route(o,i,u,a)})}function DIe(e){return"id"in e&&"defaults"in e}class AIe{constructor(){this.controllers=new Fx(oh,"datasets",!0),this.elements=new Fx(ol,"elements"),this.plugins=new Fx(Object,"plugins"),this.scales=new Fx(Kd,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,n,r){[...n].forEach(i=>{const o=r||this._getRegistryForType(i);r||o.isForType(i)||o===this.plugins&&i.id?this._exec(t,o,i):kr(i,s=>{const a=r||this._getRegistryForType(s);this._exec(t,a,s)})})}_exec(t,n,r){const i=Yk(t);Zr(r["before"+i],[],r),n[t](r),Zr(r["after"+i],[],r)}_getRegistryForType(t){for(let n=0;n<this._typedRegistries.length;n++){const r=this._typedRegistries[n];if(r.isForType(t))return r}return this.plugins}_get(t,n,r){const i=n.get(t);if(i===void 0)throw new Error('"'+t+'" is not a registered '+r+".");return i}}var qs=new AIe;class NIe{constructor(){this._init=[]}notify(t,n,r,i){n==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const o=i?this._descriptors(t).filter(i):this._descriptors(t),s=this._notify(o,t,n,r);return n==="afterDestroy"&&(this._notify(o,t,"stop"),this._notify(this._init,t,"uninstall")),s}_notify(t,n,r,i){i=i||{};for(const o of t){const s=o.plugin,a=s[r],u=[n,i,o.options];if(Zr(a,u,s)===!1&&i.cancelable)return!1}return!0}invalidate(){Mr(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const n=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),n}_createDescriptors(t,n){const r=t&&t.config,i=sr(r.options&&r.options.plugins,{}),o=LIe(r);return i===!1&&!n?[]:FIe(t,o,i,n)}_notifyStateChanges(t){const n=this._oldCache||[],r=this._cache,i=(o,s)=>o.filter(a=>!s.some(u=>a.plugin.id===u.plugin.id));this._notify(i(n,r),t,"stop"),this._notify(i(r,n),t,"start")}}function LIe(e){const t={},n=[],r=Object.keys(qs.plugins.items);for(let o=0;o<r.length;o++)n.push(qs.getPlugin(r[o]));const i=e.plugins||[];for(let o=0;o<i.length;o++){const s=i[o];n.indexOf(s)===-1&&(n.push(s),t[s.id]=!0)}return{plugins:n,localIds:t}}function zIe(e,t){return!t&&e===!1?null:e===!0?{}:e}function FIe(e,{plugins:t,localIds:n},r,i){const o=[],s=e.getContext();for(const a of t){const u=a.id,f=zIe(r[u],i);f!==null&&o.push({plugin:a,options:$Ie(e.config,{plugin:a,local:n[u]},f,s)})}return o}function $Ie(e,{plugin:t,local:n},r,i){const o=e.pluginScopeKeys(t),s=e.getOptionScopes(r,o);return n&&t.defaults&&s.push(t.defaults),e.createResolver(s,i,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function AP(e,t){const n=vi.datasets[e]||{};return((t.datasets||{})[e]||{}).indexAxis||t.indexAxis||n.indexAxis||"x"}function BIe(e,t){let n=e;return e==="_index_"?n=t:e==="_value_"&&(n=t==="x"?"y":"x"),n}function VIe(e,t){return e===t?"_index_":"_value_"}function U4(e){if(e==="x"||e==="y"||e==="r")return e}function UIe(e){if(e==="top"||e==="bottom")return"x";if(e==="left"||e==="right")return"y"}function NP(e,...t){if(U4(e))return e;for(const n of t){const r=n.axis||UIe(n.position)||e.length>1&&U4(e[0].toLowerCase());if(r)return r}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function j4(e,t,n){if(n[t+"AxisID"]===e)return{axis:t}}function jIe(e,t){if(t.data&&t.data.datasets){const n=t.data.datasets.filter(r=>r.xAxisID===e||r.yAxisID===e);if(n.length)return j4(e,"x",n[0])||j4(e,"y",n[0])}return{}}function HIe(e,t){const n=Dd[e.type]||{scales:{}},r=t.scales||{},i=AP(e.type,t),o=Object.create(null);return Object.keys(r).forEach(s=>{const a=r[s];if(!_r(a))return console.error(`Invalid scale configuration for scale: ${s}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${s}`);const u=NP(s,a,jIe(s,e),vi.scales[a.type]),f=VIe(u,i),p=n.scales||{};o[s]=Qm(Object.create(null),[{axis:u},a,p[u],p[f]])}),e.data.datasets.forEach(s=>{const a=s.type||e.type,u=s.indexAxis||AP(a,t),p=(Dd[a]||{}).scales||{};Object.keys(p).forEach(g=>{const v=BIe(g,u),b=s[v+"AxisID"]||v;o[b]=o[b]||Object.create(null),Qm(o[b],[{axis:v},r[b],p[g]])})}),Object.keys(o).forEach(s=>{const a=o[s];Qm(a,[vi.scales[a.type],vi.scale])}),o}function p9(e){const t=e.options||(e.options={});t.plugins=sr(t.plugins,{}),t.scales=HIe(e,t)}function m9(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function KIe(e){return e=e||{},e.data=m9(e.data),p9(e),e}const H4=new Map,g9=new Set;function $x(e,t){let n=H4.get(e);return n||(n=t(),H4.set(e,n),g9.add(n)),n}const ym=(e,t,n)=>{const r=kh(t,n);r!==void 0&&e.add(r)};class WIe{constructor(t){this._config=KIe(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=m9(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),p9(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return $x(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,n){return $x(`${t}.transition.${n}`,()=>[[`datasets.${t}.transitions.${n}`,`transitions.${n}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,n){return $x(`${t}-${n}`,()=>[[`datasets.${t}.elements.${n}`,`datasets.${t}`,`elements.${n}`,""]])}pluginScopeKeys(t){const n=t.id,r=this.type;return $x(`${r}-plugin-${n}`,()=>[[`plugins.${n}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,n){const r=this._scopeCache;let i=r.get(t);return(!i||n)&&(i=new Map,r.set(t,i)),i}getOptionScopes(t,n,r){const{options:i,type:o}=this,s=this._cachedScopes(t,r),a=s.get(n);if(a)return a;const u=new Set;n.forEach(p=>{t&&(u.add(t),p.forEach(g=>ym(u,t,g))),p.forEach(g=>ym(u,i,g)),p.forEach(g=>ym(u,Dd[o]||{},g)),p.forEach(g=>ym(u,vi,g)),p.forEach(g=>ym(u,OP,g))});const f=Array.from(u);return f.length===0&&f.push(Object.create(null)),g9.has(n)&&s.set(n,f),f}chartOptionScopes(){const{options:t,type:n}=this;return[t,Dd[n]||{},vi.datasets[n]||{},{type:n},vi,OP]}resolveNamedOptions(t,n,r,i=[""]){const o={$shared:!0},{resolver:s,subPrefixes:a}=K4(this._resolverCache,t,i);let u=s;if(qIe(s,n)){o.$shared=!1,r=su(r)?r():r;const f=this.createResolver(t,r,a);u=Mh(s,r,f)}for(const f of n)o[f]=u[f];return o}createResolver(t,n,r=[""],i){const{resolver:o}=K4(this._resolverCache,t,r);return _r(n)?Mh(o,n,void 0,i):o}}function K4(e,t,n){let r=e.get(t);r||(r=new Map,e.set(t,r));const i=n.join();let o=r.get(i);return o||(o={resolver:oM(t,n),subPrefixes:n.filter(a=>!a.toLowerCase().includes("hover"))},r.set(i,o)),o}const GIe=e=>_r(e)&&Object.getOwnPropertyNames(e).reduce((t,n)=>t||su(e[n]),!1);function qIe(e,t){const{isScriptable:n,isIndexable:r}=Yj(e);for(const i of t){const o=n(i),s=r(i),a=(s||o)&&e[i];if(o&&(su(a)||GIe(a))||s&&ai(a))return!0}return!1}var ZIe="4.4.0";const XIe=["top","bottom","left","right","chartArea"];function W4(e,t){return e==="top"||e==="bottom"||XIe.indexOf(e)===-1&&t==="x"}function G4(e,t){return function(n,r){return n[e]===r[e]?n[t]-r[t]:n[e]-r[e]}}function q4(e){const t=e.chart,n=t.options.animation;t.notifyPlugins("afterRender"),Zr(n&&n.onComplete,[e],t)}function YIe(e){const t=e.chart,n=t.options.animation;Zr(n&&n.onProgress,[e],t)}function v9(e){return n9()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const C0={},Z4=e=>{const t=v9(e);return Object.values(C0).filter(n=>n.canvas===t).pop()};function QIe(e,t,n){const r=Object.keys(e);for(const i of r){const o=+i;if(o>=t){const s=e[i];delete e[i],(n>0||o>t)&&(e[o+n]=s)}}}function JIe(e,t,n,r){return!n||e.type==="mouseout"?null:r?t:e}function Bx(e,t,n){return e.options.clip?e[n]:t[n]}function eke(e,t){const{xScale:n,yScale:r}=e;return n&&r?{left:Bx(n,t,"left"),right:Bx(n,t,"right"),top:Bx(r,t,"top"),bottom:Bx(r,t,"bottom")}:t}class Zs{static register(...t){qs.add(...t),X4()}static unregister(...t){qs.remove(...t),X4()}constructor(t,n){const r=this.config=new WIe(n),i=v9(t),o=Z4(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 s=r.createResolver(r.chartOptionScopes(),this.getContext());this.platform=new(r.platform||vIe(i)),this.platform.updateConfig(r);const a=this.platform.acquireContext(i,s.aspectRatio),u=a&&a.canvas,f=u&&u.height,p=u&&u.width;if(this.id=JEe(),this.ctx=a,this.canvas=u,this.width=p,this.height=f,this._options=s,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 NIe,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=gPe(g=>this.update(g),s.resizeDelay||0),this._dataChanges=[],C0[this.id]=this,!a||!u){console.error("Failed to create chart: can't acquire context from the given item");return}Il.listen(this,"complete",q4),Il.listen(this,"progress",YIe),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:n},width:r,height:i,_aspectRatio:o}=this;return Mr(t)?n&&o?o:i?r/i:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return qs}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():v4(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return p4(this.canvas,this.ctx),this}stop(){return Il.stop(this),this}resize(t,n){Il.running(this)?this._resizeBeforeDraw={width:t,height:n}:this._resize(t,n)}_resize(t,n){const r=this.options,i=this.canvas,o=r.maintainAspectRatio&&this.aspectRatio,s=this.platform.getMaximumSize(i,t,n,o),a=r.devicePixelRatio||this.platform.getDevicePixelRatio(),u=this.width?"resize":"attach";this.width=s.width,this.height=s.height,this._aspectRatio=this.aspectRatio,v4(this,a,!0)&&(this.notifyPlugins("resize",{size:s}),Zr(r.onResize,[this,s],this),this.attached&&this._doResize(u)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};kr(n,(r,i)=>{r.id=i})}buildOrUpdateScales(){const t=this.options,n=t.scales,r=this.scales,i=Object.keys(r).reduce((s,a)=>(s[a]=!1,s),{});let o=[];n&&(o=o.concat(Object.keys(n).map(s=>{const a=n[s],u=NP(s,a),f=u==="r",p=u==="x";return{options:a,dposition:f?"chartArea":p?"bottom":"left",dtype:f?"radialLinear":p?"category":"linear"}}))),kr(o,s=>{const a=s.options,u=a.id,f=NP(u,a),p=sr(a.type,s.dtype);(a.position===void 0||W4(a.position,f)!==W4(s.dposition))&&(a.position=s.dposition),i[u]=!0;let g=null;if(u in r&&r[u].type===p)g=r[u];else{const v=qs.getScale(p);g=new v({id:u,type:p,ctx:this.ctx,chart:this}),r[g.id]=g}g.init(a,t)}),kr(i,(s,a)=>{s||delete r[a]}),kr(r,s=>{es.configure(this,s,s.options),es.addBox(this,s)})}_updateMetasets(){const t=this._metasets,n=this.data.datasets.length,r=t.length;if(t.sort((i,o)=>i.index-o.index),r>n){for(let i=n;i<r;++i)this._destroyDatasetMeta(i);t.splice(n,r-n)}this._sortedMetasets=t.slice(0).sort(G4("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:n}}=this;t.length>n.length&&delete this._stacks,t.forEach((r,i)=>{n.filter(o=>o===r._dataset).length===0&&this._destroyDatasetMeta(i)})}buildOrUpdateControllers(){const t=[],n=this.data.datasets;let r,i;for(this._removeUnreferencedMetasets(),r=0,i=n.length;r<i;r++){const o=n[r];let s=this.getDatasetMeta(r);const a=o.type||this.config.type;if(s.type&&s.type!==a&&(this._destroyDatasetMeta(r),s=this.getDatasetMeta(r)),s.type=a,s.indexAxis=o.indexAxis||AP(a,this.options),s.order=o.order||0,s.index=r,s.label=""+o.label,s.visible=this.isDatasetVisible(r),s.controller)s.controller.updateIndex(r),s.controller.linkScales();else{const u=qs.getController(a),{datasetElementType:f,dataElementType:p}=vi.datasets[a];Object.assign(u,{dataElementType:qs.getElement(p),datasetElementType:f&&qs.getElement(f)}),s.controller=new u(this,r),t.push(s.controller)}}return this._updateMetasets(),t}_resetElements(){kr(this.data.datasets,(t,n)=>{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const n=this.config;n.update();const r=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),i=this._animationsDisabled=!r.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let s=0;for(let f=0,p=this.data.datasets.length;f<p;f++){const{controller:g}=this.getDatasetMeta(f),v=!i&&o.indexOf(g)===-1;g.buildOrUpdateElements(v),s=Math.max(+g.getMaxOverflow(),s)}s=this._minPadding=r.layout.autoPadding?s:0,this._updateLayout(s),i||kr(o,f=>{f.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(G4("z","_idx"));const{_active:a,_lastEvent:u}=this;u?this._eventHandler(u,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){kr(this.scales,t=>{es.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,n=new Set(Object.keys(this._listeners)),r=new Set(t.events);(!o4(n,r)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,n=this._getUniformDataChanges()||[];for(const{method:r,start:i,count:o}of n){const s=r==="_removeElements"?-o:o;QIe(t,i,s)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const n=this.data.datasets.length,r=o=>new Set(t.filter(s=>s[0]===o).map((s,a)=>a+","+s.splice(1).join(","))),i=r(0);for(let o=1;o<n;o++)if(!o4(i,r(o)))return;return Array.from(i).map(o=>o.split(",")).map(o=>({method:o[1],start:+o[2],count:+o[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;es.update(this,this.width,this.height,t);const n=this.chartArea,r=n.width<=0||n.height<=0;this._layers=[],kr(this.boxes,i=>{r&&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(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let n=0,r=this.data.datasets.length;n<r;++n)this.getDatasetMeta(n).controller.configure();for(let n=0,r=this.data.datasets.length;n<r;++n)this._updateDataset(n,su(t)?t({datasetIndex:n}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,n){const r=this.getDatasetMeta(t),i={meta:r,index:t,mode:n,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",i)!==!1&&(r.controller._update(n),i.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",i))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(Il.has(this)?this.attached&&!Il.running(this)&&Il.start(this):(this.draw(),q4({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:r,height:i}=this._resizeBeforeDraw;this._resize(r,i),this._resizeBeforeDraw=null}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const n=this._layers;for(t=0;t<n.length&&n[t].z<=0;++t)n[t].draw(this.chartArea);for(this._drawDatasets();t<n.length;++t)n[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const n=this._sortedMetasets,r=[];let i,o;for(i=0,o=n.length;i<o;++i){const s=n[i];(!t||s.visible)&&r.push(s)}return r}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const t=this.getSortedVisibleDatasetMetas();for(let n=t.length-1;n>=0;--n)this._drawDataset(t[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const n=this.ctx,r=t._clip,i=!r.disabled,o=eke(t,this.chartArea),s={meta:t,index:t.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",s)!==!1&&(i&&rM(n,{left:r.left===!1?0:o.left-r.left,right:r.right===!1?this.width:o.right+r.right,top:r.top===!1?0:o.top-r.top,bottom:r.bottom===!1?this.height:o.bottom+r.bottom}),t.controller.draw(),i&&iM(n),s.cancelable=!1,this.notifyPlugins("afterDatasetDraw",s))}isPointInArea(t){return Bl(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,n,r,i){const o=XTe.modes[n];return typeof o=="function"?o(this,t,r,i):[]}getDatasetMeta(t){const n=this.data.datasets[t],r=this._metasets;let i=r.filter(o=>o&&o._dataset===n).pop();return i||(i={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:t,_dataset:n,_parsed:[],_sorted:!1},r.push(i)),i}getContext(){return this.$context||(this.$context=gu(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const n=this.data.datasets[t];if(!n)return!1;const r=this.getDatasetMeta(t);return typeof r.hidden=="boolean"?!r.hidden:!n.hidden}setDatasetVisibility(t,n){const r=this.getDatasetMeta(t);r.hidden=!n}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,n,r){const i=r?"show":"hide",o=this.getDatasetMeta(t),s=o.controller._resolveAnimations(void 0,i);$g(n)?(o.data[n].hidden=!r,this.update()):(this.setDatasetVisibility(t,r),s.update(o,{visible:r}),this.update(a=>a.datasetIndex===t?i:void 0))}hide(t,n){this._updateVisibility(t,n,!1)}show(t,n){this._updateVisibility(t,n,!0)}_destroyDatasetMeta(t){const n=this._metasets[t];n&&n.controller&&n.controller._destroy(),delete this._metasets[t]}_stop(){let t,n;for(this.stop(),Il.remove(this),t=0,n=this.data.datasets.length;t<n;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:n}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),p4(t,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete C0[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,n=this.platform,r=(o,s)=>{n.addEventListener(this,o,s),t[o]=s},i=(o,s,a)=>{o.offsetX=s,o.offsetY=a,this._eventHandler(o)};kr(this.options.events,o=>r(o,i))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,n=this.platform,r=(u,f)=>{n.addEventListener(this,u,f),t[u]=f},i=(u,f)=>{t[u]&&(n.removeEventListener(this,u,f),delete t[u])},o=(u,f)=>{this.canvas&&this.resize(u,f)};let s;const a=()=>{i("attach",a),this.attached=!0,this.resize(),r("resize",o),r("detach",s)};s=()=>{this.attached=!1,i("resize",o),this._stop(),this._resize(0,0),r("attach",a)},n.isAttached(this.canvas)?a():s()}unbindEvents(){kr(this._listeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._listeners={},kr(this._responsiveListeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,n,r){const i=r?"set":"remove";let o,s,a,u;for(n==="dataset"&&(o=this.getDatasetMeta(t[0].datasetIndex),o.controller["_"+i+"DatasetHoverStyle"]()),a=0,u=t.length;a<u;++a){s=t[a];const f=s&&this.getDatasetMeta(s.datasetIndex).controller;f&&f[i+"HoverStyle"](s.element,s.datasetIndex,s.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const n=this._active||[],r=t.map(({datasetIndex:o,index:s})=>{const a=this.getDatasetMeta(o);if(!a)throw new Error("No dataset found at index "+o);return{datasetIndex:o,element:a.data[s],index:s}});!qb(r,n)&&(this._active=r,this._lastEvent=null,this._updateHoverStyles(r,n))}notifyPlugins(t,n,r){return this._plugins.notify(this,t,n,r)}isPluginEnabled(t){return this._plugins._cache.filter(n=>n.plugin.id===t).length===1}_updateHoverStyles(t,n,r){const i=this.options.hover,o=(u,f)=>u.filter(p=>!f.some(g=>p.datasetIndex===g.datasetIndex&&p.index===g.index)),s=o(n,t),a=r?t:o(t,n);s.length&&this.updateHoverStyle(s,i.mode,!1),a.length&&i.mode&&this.updateHoverStyle(a,i.mode,!0)}_eventHandler(t,n){const r={event:t,replay:n,cancelable:!0,inChartArea:this.isPointInArea(t)},i=s=>(s.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",r,i)===!1)return;const o=this._handleEvent(t,n,r.inChartArea);return r.cancelable=!1,this.notifyPlugins("afterEvent",r,i),(o||r.changed)&&this.render(),this}_handleEvent(t,n,r){const{_active:i=[],options:o}=this,s=n,a=this._getActiveElements(t,i,r,s),u=oPe(t),f=JIe(t,this._lastEvent,r,u);r&&(this._lastEvent=null,Zr(o.onHover,[t,a,this],this),u&&Zr(o.onClick,[t,a,this],this));const p=!qb(a,i);return(p||n)&&(this._active=a,this._updateHoverStyles(a,i,n)),this._lastEvent=f,p}_getActiveElements(t,n,r,i){if(t.type==="mouseout")return[];if(!r)return n;const o=this.options.hover;return this.getElementsAtEventForMode(t,o.mode,o,i)}}Ln(Zs,"defaults",vi),Ln(Zs,"instances",C0),Ln(Zs,"overrides",Dd),Ln(Zs,"registry",qs),Ln(Zs,"version",ZIe),Ln(Zs,"getChart",Z4);function X4(){return kr(Zs.instances,e=>e._plugins.invalidate())}function y9(e,t,n=t){e.lineCap=sr(n.borderCapStyle,t.borderCapStyle),e.setLineDash(sr(n.borderDash,t.borderDash)),e.lineDashOffset=sr(n.borderDashOffset,t.borderDashOffset),e.lineJoin=sr(n.borderJoinStyle,t.borderJoinStyle),e.lineWidth=sr(n.borderWidth,t.borderWidth),e.strokeStyle=sr(n.borderColor,t.borderColor)}function tke(e,t,n){e.lineTo(n.x,n.y)}function nke(e){return e.stepped?MPe:e.tension||e.cubicInterpolationMode==="monotone"?RPe:tke}function x9(e,t,n={}){const r=e.length,{start:i=0,end:o=r-1}=n,{start:s,end:a}=t,u=Math.max(i,s),f=Math.min(o,a),p=i<s&&o<s||i>a&&o>a;return{count:r,start:u,loop:t.loop,ilen:f<u&&!p?r+f-u:f-u}}function rke(e,t,n,r){const{points:i,options:o}=t,{count:s,start:a,loop:u,ilen:f}=x9(i,n,r),p=nke(o);let{move:g=!0,reverse:v}=r||{},b,_,T;for(b=0;b<=f;++b)_=i[(a+(v?f-b:b))%s],!_.skip&&(g?(e.moveTo(_.x,_.y),g=!1):p(e,T,_,v,o.stepped),T=_);return u&&(_=i[(a+(v?f:0))%s],p(e,T,_,v,o.stepped)),!!u}function ike(e,t,n,r){const i=t.points,{count:o,start:s,ilen:a}=x9(i,n,r),{move:u=!0,reverse:f}=r||{};let p=0,g=0,v,b,_,T,I,P;const M=N=>(s+(f?a-N:N))%o,D=()=>{T!==I&&(e.lineTo(p,I),e.lineTo(p,T),e.lineTo(p,P))};for(u&&(b=i[M(0)],e.moveTo(b.x,b.y)),v=0;v<=a;++v){if(b=i[M(v)],b.skip)continue;const N=b.x,z=b.y,$=N|0;$===_?(z<T?T=z:z>I&&(I=z),p=(g*p+N)/++g):(D(),e.lineTo(N,z),_=$,g=0,T=I=z),P=z}D()}function LP(e){const t=e.options,n=t.borderDash&&t.borderDash.length;return!e._decimated&&!e._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!n?ike:rke}function oke(e){return e.stepped?cTe:e.tension||e.cubicInterpolationMode==="monotone"?uTe:id}function ake(e,t,n,r){let i=t._path;i||(i=t._path=new Path2D,t.path(i,n,r)&&i.closePath()),y9(e,t.options),e.stroke(i)}function ske(e,t,n,r){const{segments:i,options:o}=t,s=LP(t);for(const a of i)y9(e,o,a.style),e.beginPath(),s(e,t,a,{start:n,end:n+r-1})&&e.closePath(),e.stroke()}const lke=typeof Path2D=="function";function cke(e,t,n,r){lke&&!t.options.segment?ake(e,t,n,r):ske(e,t,n,r)}class Mm extends ol{constructor(t){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,t&&Object.assign(this,t)}updateControlPoints(t,n){const r=this.options;if((r.tension||r.cubicInterpolationMode==="monotone")&&!r.stepped&&!this._pointsUpdated){const i=r.spanGaps?this._loop:this._fullLoop;tTe(this._points,r,t,i,n),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=yTe(this,this.options.segment))}first(){const t=this.segments,n=this.points;return t.length&&n[t[0].start]}last(){const t=this.segments,n=this.points,r=t.length;return r&&n[t[r-1].end]}interpolate(t,n){const r=this.options,i=t[n],o=this.points,s=mTe(this,{property:n,start:i,end:i});if(!s.length)return;const a=[],u=oke(r);let f,p;for(f=0,p=s.length;f<p;++f){const{start:g,end:v}=s[f],b=o[g],_=o[v];if(b===_){a.push(b);continue}const T=Math.abs((i-b[n])/(_[n]-b[n])),I=u(b,_,T,r.stepped);I[n]=t[n],a.push(I)}return a.length===1?a[0]:a}pathSegment(t,n,r){return LP(this)(t,this,n,r)}path(t,n,r){const i=this.segments,o=LP(this);let s=this._loop;n=n||0,r=r||this.points.length-n;for(const a of i)s&=o(t,this,a,{start:n,end:n+r-1});return!!s}draw(t,n,r,i){const o=this.options||{};(this.points||[]).length&&o.borderWidth&&(t.save(),cke(t,this,r,i),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}Ln(Mm,"id","line"),Ln(Mm,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),Ln(Mm,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),Ln(Mm,"descriptors",{_scriptable:!0,_indexable:t=>t!=="borderDash"&&t!=="fill"});function Y4(e,t,n,r){const i=e.options,{[n]:o}=e.getProps([n],r);return Math.abs(t-o)<i.radius+i.hitRadius}class S0 extends ol{constructor(n){super();Ln(this,"parsed");Ln(this,"skip");Ln(this,"stop");this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,n&&Object.assign(this,n)}inRange(n,r,i){const o=this.options,{x:s,y:a}=this.getProps(["x","y"],i);return Math.pow(n-s,2)+Math.pow(r-a,2)<Math.pow(o.hitRadius+o.radius,2)}inXRange(n,r){return Y4(this,n,"x",r)}inYRange(n,r){return Y4(this,n,"y",r)}getCenterPoint(n){const{x:r,y:i}=this.getProps(["x","y"],n);return{x:r,y:i}}size(n){n=n||this.options||{};let r=n.radius||0;r=Math.max(r,r&&n.hoverRadius||0);const i=r&&n.borderWidth||0;return(r+i)*2}draw(n,r){const i=this.options;this.skip||i.radius<.1||!Bl(this,r,this.size(i)/2)||(n.strokeStyle=i.borderColor,n.lineWidth=i.borderWidth,n.fillStyle=i.backgroundColor,DP(n,i,this.x,this.y))}getRange(){const n=this.options||{};return n.radius+n.hitRadius}}Ln(S0,"id","point"),Ln(S0,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),Ln(S0,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function b9(e,t){const{x:n,y:r,base:i,width:o,height:s}=e.getProps(["x","y","base","width","height"],t);let a,u,f,p,g;return e.horizontal?(g=s/2,a=Math.min(n,i),u=Math.max(n,i),f=r-g,p=r+g):(g=o/2,a=n-g,u=n+g,f=Math.min(r,i),p=Math.max(r,i)),{left:a,top:f,right:u,bottom:p}}function Vc(e,t,n,r){return e?0:wa(t,n,r)}function uke(e,t,n){const r=e.options.borderWidth,i=e.borderSkipped,o=Xj(r);return{t:Vc(i.top,o.top,0,n),r:Vc(i.right,o.right,0,t),b:Vc(i.bottom,o.bottom,0,n),l:Vc(i.left,o.left,0,t)}}function dke(e,t,n){const{enableBorderRadius:r}=e.getProps(["enableBorderRadius"]),i=e.options.borderRadius,o=bd(i),s=Math.min(t,n),a=e.borderSkipped,u=r||_r(i);return{topLeft:Vc(!u||a.top||a.left,o.topLeft,0,s),topRight:Vc(!u||a.top||a.right,o.topRight,0,s),bottomLeft:Vc(!u||a.bottom||a.left,o.bottomLeft,0,s),bottomRight:Vc(!u||a.bottom||a.right,o.bottomRight,0,s)}}function fke(e){const t=b9(e),n=t.right-t.left,r=t.bottom-t.top,i=uke(e,n/2,r/2),o=dke(e,n/2,r/2);return{outer:{x:t.left,y:t.top,w:n,h:r,radius:o},inner:{x:t.left+i.l,y:t.top+i.t,w:n-i.l-i.r,h:r-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 qS(e,t,n,r){const i=t===null,o=n===null,a=e&&!(i&&o)&&b9(e,r);return a&&(i||pd(t,a.left,a.right))&&(o||pd(n,a.top,a.bottom))}function hke(e){return e.topLeft||e.topRight||e.bottomLeft||e.bottomRight}function pke(e,t){e.rect(t.x,t.y,t.w,t.h)}function ZS(e,t,n={}){const r=e.x!==n.x?-t:0,i=e.y!==n.y?-t:0,o=(e.x+e.w!==n.x+n.w?t:0)-r,s=(e.y+e.h!==n.y+n.h?t:0)-i;return{x:e.x+r,y:e.y+i,w:e.w+o,h:e.h+s,radius:e.radius}}class E0 extends ol{constructor(t){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,t&&Object.assign(this,t)}draw(t){const{inflateAmount:n,options:{borderColor:r,backgroundColor:i}}=this,{inner:o,outer:s}=fke(this),a=hke(s.radius)?Vg:pke;t.save(),(s.w!==o.w||s.h!==o.h)&&(t.beginPath(),a(t,ZS(s,n,o)),t.clip(),a(t,ZS(o,-n,s)),t.fillStyle=r,t.fill("evenodd")),t.beginPath(),a(t,ZS(o,n)),t.fillStyle=i,t.fill(),t.restore()}inRange(t,n,r){return qS(this,t,n,r)}inXRange(t,n){return qS(this,t,null,n)}inYRange(t,n){return qS(this,null,t,n)}getCenterPoint(t){const{x:n,y:r,base:i,horizontal:o}=this.getProps(["x","y","base","horizontal"],t);return{x:o?(n+i)/2:n,y:o?r:(r+i)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}}Ln(E0,"id","bar"),Ln(E0,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),Ln(E0,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});const Q4=(e,t)=>{let{boxHeight:n=t,boxWidth:r=t}=e;return e.usePointStyle&&(n=Math.min(n,t),r=e.pointStyleWidth||Math.min(r,t)),{boxWidth:r,boxHeight:n,itemHeight:Math.max(t,n)}},mke=(e,t)=>e!==null&&t!==null&&e.datasetIndex===t.datasetIndex&&e.index===t.index;class J4 extends ol{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.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(t,n,r){this.maxWidth=t,this.maxHeight=n,this._margins=r,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 t=this.options.labels||{};let n=Zr(t.generateLabels,[this.chart],this)||[];t.filter&&(n=n.filter(r=>t.filter(r,this.chart.data))),t.sort&&(n=n.sort((r,i)=>t.sort(r,i,this.chart.data))),this.options.reverse&&n.reverse(),this.legendItems=n}fit(){const{options:t,ctx:n}=this;if(!t.display){this.width=this.height=0;return}const r=t.labels,i=ji(r.font),o=i.size,s=this._computeTitleHeight(),{boxWidth:a,itemHeight:u}=Q4(r,o);let f,p;n.font=i.string,this.isHorizontal()?(f=this.maxWidth,p=this._fitRows(s,o,a,u)+10):(p=this.maxHeight,f=this._fitCols(s,i,a,u)+10),this.width=Math.min(f,t.maxWidth||this.maxWidth),this.height=Math.min(p,t.maxHeight||this.maxHeight)}_fitRows(t,n,r,i){const{ctx:o,maxWidth:s,options:{labels:{padding:a}}}=this,u=this.legendHitBoxes=[],f=this.lineWidths=[0],p=i+a;let g=t;o.textAlign="left",o.textBaseline="middle";let v=-1,b=-p;return this.legendItems.forEach((_,T)=>{const I=r+n/2+o.measureText(_.text).width;(T===0||f[f.length-1]+I+2*a>s)&&(g+=p,f[f.length-(T>0?0:1)]=0,b+=p,v++),u[T]={left:0,top:b,row:v,width:I,height:i},f[f.length-1]+=I+a}),g}_fitCols(t,n,r,i){const{ctx:o,maxHeight:s,options:{labels:{padding:a}}}=this,u=this.legendHitBoxes=[],f=this.columnSizes=[],p=s-t;let g=a,v=0,b=0,_=0,T=0;return this.legendItems.forEach((I,P)=>{const{itemWidth:M,itemHeight:D}=gke(r,n,o,I,i);P>0&&b+D+2*a>p&&(g+=v+a,f.push({width:v,height:b}),_+=v+a,T++,v=b=0),u[P]={left:_,top:b,col:T,width:M,height:D},v=Math.max(v,M),b+=D+a}),g+=v,f.push({width:v,height:b}),g}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:r,labels:{padding:i},rtl:o}}=this,s=ih(o,this.left,this.width);if(this.isHorizontal()){let a=0,u=Co(r,this.left+i,this.right-this.lineWidths[a]);for(const f of n)a!==f.row&&(a=f.row,u=Co(r,this.left+i,this.right-this.lineWidths[a])),f.top+=this.top+t+i,f.left=s.leftForLtr(s.x(u),f.width),u+=f.width+i}else{let a=0,u=Co(r,this.top+t+i,this.bottom-this.columnSizes[a].height);for(const f of n)f.col!==a&&(a=f.col,u=Co(r,this.top+t+i,this.bottom-this.columnSizes[a].height)),f.top=u,f.left+=this.left+i,f.left=s.leftForLtr(s.x(f.left),f.width),u+=f.height+i}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;rM(t,this),this._draw(),iM(t)}}_draw(){const{options:t,columnSizes:n,lineWidths:r,ctx:i}=this,{align:o,labels:s}=t,a=vi.color,u=ih(t.rtl,this.left,this.width),f=ji(s.font),{padding:p}=s,g=f.size,v=g/2;let b;this.drawTitle(),i.textAlign=u.textAlign("left"),i.textBaseline="middle",i.lineWidth=.5,i.font=f.string;const{boxWidth:_,boxHeight:T,itemHeight:I}=Q4(s,g),P=function($,j,U){if(isNaN(_)||_<=0||isNaN(T)||T<0)return;i.save();const q=sr(U.lineWidth,1);if(i.fillStyle=sr(U.fillStyle,a),i.lineCap=sr(U.lineCap,"butt"),i.lineDashOffset=sr(U.lineDashOffset,0),i.lineJoin=sr(U.lineJoin,"miter"),i.lineWidth=q,i.strokeStyle=sr(U.strokeStyle,a),i.setLineDash(sr(U.lineDash,[])),s.usePointStyle){const Y={radius:T*Math.SQRT2/2,pointStyle:U.pointStyle,rotation:U.rotation,borderWidth:q},te=u.xPlus($,_/2),Z=j+v;qj(i,Y,te,Z,s.pointStyleWidth&&_)}else{const Y=j+Math.max((g-T)/2,0),te=u.leftForLtr($,_),Z=bd(U.borderRadius);i.beginPath(),Object.values(Z).some(X=>X!==0)?Vg(i,{x:te,y:Y,w:_,h:T,radius:Z}):i.rect(te,Y,_,T),i.fill(),q!==0&&i.stroke()}i.restore()},M=function($,j,U){Ad(i,U.text,$,j+I/2,f,{strikethrough:U.hidden,textAlign:u.textAlign(U.textAlign)})},D=this.isHorizontal(),N=this._computeTitleHeight();D?b={x:Co(o,this.left+p,this.right-r[0]),y:this.top+p+N,line:0}:b={x:this.left+p,y:Co(o,this.top+N+p,this.bottom-n[0].height),line:0},r9(this.ctx,t.textDirection);const z=I+p;this.legendItems.forEach(($,j)=>{i.strokeStyle=$.fontColor,i.fillStyle=$.fontColor;const U=i.measureText($.text).width,q=u.textAlign($.textAlign||($.textAlign=s.textAlign)),Y=_+v+U;let te=b.x,Z=b.y;u.setWidth(this.width),D?j>0&&te+Y+p>this.right&&(Z=b.y+=z,b.line++,te=b.x=Co(o,this.left+p,this.right-r[b.line])):j>0&&Z+z>this.bottom&&(te=b.x=te+n[b.line].width+p,b.line++,Z=b.y=Co(o,this.top+N+p,this.bottom-n[b.line].height));const X=u.x(te);if(P(X,Z,$),te=vPe(q,te+_+v,D?te+Y:this.right,t.rtl),M(u.x(te),Z,$),D)b.x+=Y+p;else if(typeof $.text!="string"){const J=f.lineHeight;b.y+=_9($,J)+p}else b.y+=z}),i9(this.ctx,t.textDirection)}drawTitle(){const t=this.options,n=t.title,r=ji(n.font),i=Io(n.padding);if(!n.display)return;const o=ih(t.rtl,this.left,this.width),s=this.ctx,a=n.position,u=r.size/2,f=i.top+u;let p,g=this.left,v=this.width;if(this.isHorizontal())v=Math.max(...this.lineWidths),p=this.top+f,g=Co(t.align,g,this.right-v);else{const _=this.columnSizes.reduce((T,I)=>Math.max(T,I.height),0);p=f+Co(t.align,this.top,this.bottom-_-t.labels.padding-this._computeTitleHeight())}const b=Co(a,g,g+v);s.textAlign=o.textAlign(eM(a)),s.textBaseline="middle",s.strokeStyle=n.color,s.fillStyle=n.color,s.font=r.string,Ad(s,n.text,b,p,r)}_computeTitleHeight(){const t=this.options.title,n=ji(t.font),r=Io(t.padding);return t.display?n.lineHeight+r.height:0}_getLegendItemAt(t,n){let r,i,o;if(pd(t,this.left,this.right)&&pd(n,this.top,this.bottom)){for(o=this.legendHitBoxes,r=0;r<o.length;++r)if(i=o[r],pd(t,i.left,i.left+i.width)&&pd(n,i.top,i.top+i.height))return this.legendItems[r]}return null}handleEvent(t){const n=this.options;if(!xke(t.type,n))return;const r=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const i=this._hoveredItem,o=mke(i,r);i&&!o&&Zr(n.onLeave,[t,i,this],this),this._hoveredItem=r,r&&!o&&Zr(n.onHover,[t,r,this],this)}else r&&Zr(n.onClick,[t,r,this],this)}}function gke(e,t,n,r,i){const o=vke(r,e,t,n),s=yke(i,r,t.lineHeight);return{itemWidth:o,itemHeight:s}}function vke(e,t,n,r){let i=e.text;return i&&typeof i!="string"&&(i=i.reduce((o,s)=>o.length>s.length?o:s)),t+n.size/2+r.measureText(i).width}function yke(e,t,n){let r=e;return typeof t.text!="string"&&(r=_9(t,n)),r}function _9(e,t){const n=e.text?e.text.length:0;return t*n}function xke(e,t){return!!((e==="mousemove"||e==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(e==="click"||e==="mouseup"))}var bke={id:"legend",_element:J4,start(e,t,n){const r=e.legend=new J4({ctx:e.ctx,options:n,chart:e});es.configure(e,r,n),es.addBox(e,r)},stop(e){es.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,n){const r=e.legend;es.configure(e,r,n),r.options=n},afterUpdate(e){const t=e.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(e,t){t.replay||e.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(e,t,n){const r=t.datasetIndex,i=n.chart;i.isDatasetVisible(r)?(i.hide(r),t.hidden=!0):(i.show(r),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:e=>e.chart.options.color,boxWidth:40,padding:10,generateLabels(e){const t=e.data.datasets,{labels:{usePointStyle:n,pointStyle:r,textAlign:i,color:o,useBorderRadius:s,borderRadius:a}}=e.legend.options;return e._getSortedDatasetMetas().map(u=>{const f=u.controller.getStyle(n?0:void 0),p=Io(f.borderWidth);return{text:t[u.index].label,fillStyle:f.backgroundColor,fontColor:o,hidden:!u.visible,lineCap:f.borderCapStyle,lineDash:f.borderDash,lineDashOffset:f.borderDashOffset,lineJoin:f.borderJoinStyle,lineWidth:(p.width+p.height)/4,strokeStyle:f.borderColor,pointStyle:r||f.pointStyle,rotation:f.rotation,textAlign:i||f.textAlign,borderRadius:s&&(a||f.borderRadius),datasetIndex:u.index}},this)}},title:{color:e=>e.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:e=>!e.startsWith("on"),labels:{_scriptable:e=>!["generateLabels","filter","sort"].includes(e)}}};class w9 extends ol{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.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(t,n){const r=this.options;if(this.left=0,this.top=0,!r.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=n;const i=ai(r.text)?r.text.length:1;this._padding=Io(r.padding);const o=i*ji(r.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=o:this.width=o}isHorizontal(){const t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){const{top:n,left:r,bottom:i,right:o,options:s}=this,a=s.align;let u=0,f,p,g;return this.isHorizontal()?(p=Co(a,r,o),g=n+t,f=o-r):(s.position==="left"?(p=r+t,g=Co(a,i,n),u=Li*-.5):(p=o-t,g=Co(a,n,i),u=Li*.5),f=i-n),{titleX:p,titleY:g,maxWidth:f,rotation:u}}draw(){const t=this.ctx,n=this.options;if(!n.display)return;const r=ji(n.font),o=r.lineHeight/2+this._padding.top,{titleX:s,titleY:a,maxWidth:u,rotation:f}=this._drawArgs(o);Ad(t,n.text,0,0,r,{color:n.color,maxWidth:u,rotation:f,textAlign:eM(n.align),textBaseline:"middle",translation:[s,a]})}}function _ke(e,t){const n=new w9({ctx:e.ctx,options:t,chart:e});es.configure(e,n,t),es.addBox(e,n),e.titleBlock=n}var wke={id:"title",_element:w9,start(e,t,n){_ke(e,n)},stop(e){const t=e.titleBlock;es.removeBox(e,t),delete e.titleBlock},beforeUpdate(e,t,n){const r=e.titleBlock;es.configure(e,r,n),r.options=n},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 Rm={average(e){if(!e.length)return!1;let t,n,r=0,i=0,o=0;for(t=0,n=e.length;t<n;++t){const s=e[t].element;if(s&&s.hasValue()){const a=s.tooltipPosition();r+=a.x,i+=a.y,++o}}return{x:r/o,y:i/o}},nearest(e,t){if(!e.length)return!1;let n=t.x,r=t.y,i=Number.POSITIVE_INFINITY,o,s,a;for(o=0,s=e.length;o<s;++o){const u=e[o].element;if(u&&u.hasValue()){const f=u.getCenterPoint(),p=RP(t,f);p<i&&(i=p,a=u)}}if(a){const u=a.tooltipPosition();n=u.x,r=u.y}return{x:n,y:r}}};function Ws(e,t){return t&&(ai(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function kl(e){return(typeof e=="string"||e instanceof String)&&e.indexOf(`
`)>-1?e.split(`
`):e}function Cke(e,t){const{element:n,datasetIndex:r,index:i}=t,o=e.getDatasetMeta(r).controller,{label:s,value:a}=o.getLabelAndValue(i);return{chart:e,label:s,parsed:o.getParsed(i),raw:e.data.datasets[r].data[i],formattedValue:a,dataset:o.getDataset(),dataIndex:i,datasetIndex:r,element:n}}function ez(e,t){const n=e.chart.ctx,{body:r,footer:i,title:o}=e,{boxWidth:s,boxHeight:a}=t,u=ji(t.bodyFont),f=ji(t.titleFont),p=ji(t.footerFont),g=o.length,v=i.length,b=r.length,_=Io(t.padding);let T=_.height,I=0,P=r.reduce((N,z)=>N+z.before.length+z.lines.length+z.after.length,0);if(P+=e.beforeBody.length+e.afterBody.length,g&&(T+=g*f.lineHeight+(g-1)*t.titleSpacing+t.titleMarginBottom),P){const N=t.displayColors?Math.max(a,u.lineHeight):u.lineHeight;T+=b*N+(P-b)*u.lineHeight+(P-1)*t.bodySpacing}v&&(T+=t.footerMarginTop+v*p.lineHeight+(v-1)*t.footerSpacing);let M=0;const D=function(N){I=Math.max(I,n.measureText(N).width+M)};return n.save(),n.font=f.string,kr(e.title,D),n.font=u.string,kr(e.beforeBody.concat(e.afterBody),D),M=t.displayColors?s+2+t.boxPadding:0,kr(r,N=>{kr(N.before,D),kr(N.lines,D),kr(N.after,D)}),M=0,n.font=p.string,kr(e.footer,D),n.restore(),I+=_.width,{width:I,height:T}}function Ske(e,t){const{y:n,height:r}=t;return n<r/2?"top":n>e.height-r/2?"bottom":"center"}function Eke(e,t,n,r){const{x:i,width:o}=r,s=n.caretSize+n.caretPadding;if(e==="left"&&i+o+s>t.width||e==="right"&&i-o-s<0)return!0}function Pke(e,t,n,r){const{x:i,width:o}=n,{width:s,chartArea:{left:a,right:u}}=e;let f="center";return r==="center"?f=i<=(a+u)/2?"left":"right":i<=o/2?f="left":i>=s-o/2&&(f="right"),Eke(f,e,t,n)&&(f="center"),f}function tz(e,t,n){const r=n.yAlign||t.yAlign||Ske(e,n);return{xAlign:n.xAlign||t.xAlign||Pke(e,t,n,r),yAlign:r}}function Tke(e,t){let{x:n,width:r}=e;return t==="right"?n-=r:t==="center"&&(n-=r/2),n}function Ike(e,t,n){let{y:r,height:i}=e;return t==="top"?r+=n:t==="bottom"?r-=i+n:r-=i/2,r}function nz(e,t,n,r){const{caretSize:i,caretPadding:o,cornerRadius:s}=e,{xAlign:a,yAlign:u}=n,f=i+o,{topLeft:p,topRight:g,bottomLeft:v,bottomRight:b}=bd(s);let _=Tke(t,a);const T=Ike(t,u,f);return u==="center"?a==="left"?_+=f:a==="right"&&(_-=f):a==="left"?_-=Math.max(p,v)+i:a==="right"&&(_+=Math.max(g,b)+i),{x:wa(_,0,r.width-t.width),y:wa(T,0,r.height-t.height)}}function Vx(e,t,n){const r=Io(n.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-r.right:e.x+r.left}function rz(e){return Ws([],kl(e))}function kke(e,t,n){return gu(e,{tooltip:t,tooltipItems:n,type:"tooltip"})}function iz(e,t){const n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}const C9={beforeTitle:Pl,title(e){if(e.length>0){const t=e[0],n=t.chart.data.labels,r=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(r>0&&t.dataIndex<r)return n[t.dataIndex]}return""},afterTitle:Pl,beforeBody:Pl,beforeLabel:Pl,label(e){if(this&&this.options&&this.options.mode==="dataset")return e.label+": "+e.formattedValue||e.formattedValue;let t=e.dataset.label||"";t&&(t+=": ");const n=e.formattedValue;return Mr(n)||(t+=n),t},labelColor(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{borderColor:n.borderColor,backgroundColor:n.backgroundColor,borderWidth:n.borderWidth,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:Pl,afterBody:Pl,beforeFooter:Pl,footer:Pl,afterFooter:Pl};function Zo(e,t,n,r){const i=e[t].call(n,r);return typeof i>"u"?C9[t].call(n,r):i}class zP extends ol{constructor(t){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=t.chart,this.options=t.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(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const n=this.chart,r=this.options.setContext(this.getContext()),i=r.enabled&&n.options.animation&&r.animations,o=new a9(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=kke(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,n){const{callbacks:r}=n,i=Zo(r,"beforeTitle",this,t),o=Zo(r,"title",this,t),s=Zo(r,"afterTitle",this,t);let a=[];return a=Ws(a,kl(i)),a=Ws(a,kl(o)),a=Ws(a,kl(s)),a}getBeforeBody(t,n){return rz(Zo(n.callbacks,"beforeBody",this,t))}getBody(t,n){const{callbacks:r}=n,i=[];return kr(t,o=>{const s={before:[],lines:[],after:[]},a=iz(r,o);Ws(s.before,kl(Zo(a,"beforeLabel",this,o))),Ws(s.lines,Zo(a,"label",this,o)),Ws(s.after,kl(Zo(a,"afterLabel",this,o))),i.push(s)}),i}getAfterBody(t,n){return rz(Zo(n.callbacks,"afterBody",this,t))}getFooter(t,n){const{callbacks:r}=n,i=Zo(r,"beforeFooter",this,t),o=Zo(r,"footer",this,t),s=Zo(r,"afterFooter",this,t);let a=[];return a=Ws(a,kl(i)),a=Ws(a,kl(o)),a=Ws(a,kl(s)),a}_createItems(t){const n=this._active,r=this.chart.data,i=[],o=[],s=[];let a=[],u,f;for(u=0,f=n.length;u<f;++u)a.push(Cke(this.chart,n[u]));return t.filter&&(a=a.filter((p,g,v)=>t.filter(p,g,v,r))),t.itemSort&&(a=a.sort((p,g)=>t.itemSort(p,g,r))),kr(a,p=>{const g=iz(t.callbacks,p);i.push(Zo(g,"labelColor",this,p)),o.push(Zo(g,"labelPointStyle",this,p)),s.push(Zo(g,"labelTextColor",this,p))}),this.labelColors=i,this.labelPointStyles=o,this.labelTextColors=s,this.dataPoints=a,a}update(t,n){const r=this.options.setContext(this.getContext()),i=this._active;let o,s=[];if(!i.length)this.opacity!==0&&(o={opacity:0});else{const a=Rm[r.position].call(this,i,this._eventPosition);s=this._createItems(r),this.title=this.getTitle(s,r),this.beforeBody=this.getBeforeBody(s,r),this.body=this.getBody(s,r),this.afterBody=this.getAfterBody(s,r),this.footer=this.getFooter(s,r);const u=this._size=ez(this,r),f=Object.assign({},a,u),p=tz(this.chart,r,f),g=nz(r,f,p,this.chart);this.xAlign=p.xAlign,this.yAlign=p.yAlign,o={opacity:1,x:g.x,y:g.y,width:u.width,height:u.height,caretX:a.x,caretY:a.y}}this._tooltipItems=s,this.$context=void 0,o&&this._resolveAnimations().update(this,o),t&&r.external&&r.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(t,n,r,i){const o=this.getCaretPosition(t,r,i);n.lineTo(o.x1,o.y1),n.lineTo(o.x2,o.y2),n.lineTo(o.x3,o.y3)}getCaretPosition(t,n,r){const{xAlign:i,yAlign:o}=this,{caretSize:s,cornerRadius:a}=r,{topLeft:u,topRight:f,bottomLeft:p,bottomRight:g}=bd(a),{x:v,y:b}=t,{width:_,height:T}=n;let I,P,M,D,N,z;return o==="center"?(N=b+T/2,i==="left"?(I=v,P=I-s,D=N+s,z=N-s):(I=v+_,P=I+s,D=N-s,z=N+s),M=I):(i==="left"?P=v+Math.max(u,p)+s:i==="right"?P=v+_-Math.max(f,g)-s:P=this.caretX,o==="top"?(D=b,N=D-s,I=P-s,M=P+s):(D=b+T,N=D+s,I=P+s,M=P-s),z=D),{x1:I,x2:P,x3:M,y1:D,y2:N,y3:z}}drawTitle(t,n,r){const i=this.title,o=i.length;let s,a,u;if(o){const f=ih(r.rtl,this.x,this.width);for(t.x=Vx(this,r.titleAlign,r),n.textAlign=f.textAlign(r.titleAlign),n.textBaseline="middle",s=ji(r.titleFont),a=r.titleSpacing,n.fillStyle=r.titleColor,n.font=s.string,u=0;u<o;++u)n.fillText(i[u],f.x(t.x),t.y+s.lineHeight/2),t.y+=s.lineHeight+a,u+1===o&&(t.y+=r.titleMarginBottom-a)}}_drawColorBox(t,n,r,i,o){const s=this.labelColors[r],a=this.labelPointStyles[r],{boxHeight:u,boxWidth:f}=o,p=ji(o.bodyFont),g=Vx(this,"left",o),v=i.x(g),b=u<p.lineHeight?(p.lineHeight-u)/2:0,_=n.y+b;if(o.usePointStyle){const T={radius:Math.min(f,u)/2,pointStyle:a.pointStyle,rotation:a.rotation,borderWidth:1},I=i.leftForLtr(v,f)+f/2,P=_+u/2;t.strokeStyle=o.multiKeyBackground,t.fillStyle=o.multiKeyBackground,DP(t,T,I,P),t.strokeStyle=s.borderColor,t.fillStyle=s.backgroundColor,DP(t,T,I,P)}else{t.lineWidth=_r(s.borderWidth)?Math.max(...Object.values(s.borderWidth)):s.borderWidth||1,t.strokeStyle=s.borderColor,t.setLineDash(s.borderDash||[]),t.lineDashOffset=s.borderDashOffset||0;const T=i.leftForLtr(v,f),I=i.leftForLtr(i.xPlus(v,1),f-2),P=bd(s.borderRadius);Object.values(P).some(M=>M!==0)?(t.beginPath(),t.fillStyle=o.multiKeyBackground,Vg(t,{x:T,y:_,w:f,h:u,radius:P}),t.fill(),t.stroke(),t.fillStyle=s.backgroundColor,t.beginPath(),Vg(t,{x:I,y:_+1,w:f-2,h:u-2,radius:P}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(T,_,f,u),t.strokeRect(T,_,f,u),t.fillStyle=s.backgroundColor,t.fillRect(I,_+1,f-2,u-2))}t.fillStyle=this.labelTextColors[r]}drawBody(t,n,r){const{body:i}=this,{bodySpacing:o,bodyAlign:s,displayColors:a,boxHeight:u,boxWidth:f,boxPadding:p}=r,g=ji(r.bodyFont);let v=g.lineHeight,b=0;const _=ih(r.rtl,this.x,this.width),T=function(U){n.fillText(U,_.x(t.x+b),t.y+v/2),t.y+=v+o},I=_.textAlign(s);let P,M,D,N,z,$,j;for(n.textAlign=s,n.textBaseline="middle",n.font=g.string,t.x=Vx(this,I,r),n.fillStyle=r.bodyColor,kr(this.beforeBody,T),b=a&&I!=="right"?s==="center"?f/2+p:f+2+p:0,N=0,$=i.length;N<$;++N){for(P=i[N],M=this.labelTextColors[N],n.fillStyle=M,kr(P.before,T),D=P.lines,a&&D.length&&(this._drawColorBox(n,t,N,_,r),v=Math.max(g.lineHeight,u)),z=0,j=D.length;z<j;++z)T(D[z]),v=g.lineHeight;kr(P.after,T)}b=0,v=g.lineHeight,kr(this.afterBody,T),t.y-=o}drawFooter(t,n,r){const i=this.footer,o=i.length;let s,a;if(o){const u=ih(r.rtl,this.x,this.width);for(t.x=Vx(this,r.footerAlign,r),t.y+=r.footerMarginTop,n.textAlign=u.textAlign(r.footerAlign),n.textBaseline="middle",s=ji(r.footerFont),n.fillStyle=r.footerColor,n.font=s.string,a=0;a<o;++a)n.fillText(i[a],u.x(t.x),t.y+s.lineHeight/2),t.y+=s.lineHeight+r.footerSpacing}}drawBackground(t,n,r,i){const{xAlign:o,yAlign:s}=this,{x:a,y:u}=t,{width:f,height:p}=r,{topLeft:g,topRight:v,bottomLeft:b,bottomRight:_}=bd(i.cornerRadius);n.fillStyle=i.backgroundColor,n.strokeStyle=i.borderColor,n.lineWidth=i.borderWidth,n.beginPath(),n.moveTo(a+g,u),s==="top"&&this.drawCaret(t,n,r,i),n.lineTo(a+f-v,u),n.quadraticCurveTo(a+f,u,a+f,u+v),s==="center"&&o==="right"&&this.drawCaret(t,n,r,i),n.lineTo(a+f,u+p-_),n.quadraticCurveTo(a+f,u+p,a+f-_,u+p),s==="bottom"&&this.drawCaret(t,n,r,i),n.lineTo(a+b,u+p),n.quadraticCurveTo(a,u+p,a,u+p-b),s==="center"&&o==="left"&&this.drawCaret(t,n,r,i),n.lineTo(a,u+g),n.quadraticCurveTo(a,u,a+g,u),n.closePath(),n.fill(),i.borderWidth>0&&n.stroke()}_updateAnimationTarget(t){const n=this.chart,r=this.$animations,i=r&&r.x,o=r&&r.y;if(i||o){const s=Rm[t.position].call(this,this._active,this._eventPosition);if(!s)return;const a=this._size=ez(this,t),u=Object.assign({},s,this._size),f=tz(n,t,u),p=nz(t,u,f,n);(i._to!==p.x||o._to!==p.y)&&(this.xAlign=f.xAlign,this.yAlign=f.yAlign,this.width=a.width,this.height=a.height,this.caretX=s.x,this.caretY=s.y,this._resolveAnimations().update(this,p))}}_willRender(){return!!this.opacity}draw(t){const n=this.options.setContext(this.getContext());let r=this.opacity;if(!r)return;this._updateAnimationTarget(n);const i={width:this.width,height:this.height},o={x:this.x,y:this.y};r=Math.abs(r)<.001?0:r;const s=Io(n.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&a&&(t.save(),t.globalAlpha=r,this.drawBackground(o,t,i,n),r9(t,n.textDirection),o.y+=s.top,this.drawTitle(o,t,n),this.drawBody(o,t,n),this.drawFooter(o,t,n),i9(t,n.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,n){const r=this._active,i=t.map(({datasetIndex:a,index:u})=>{const f=this.chart.getDatasetMeta(a);if(!f)throw new Error("Cannot find a dataset at index "+a);return{datasetIndex:a,element:f.data[u],index:u}}),o=!qb(r,i),s=this._positionChanged(i,n);(o||s)&&(this._active=i,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,n,r=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const i=this.options,o=this._active||[],s=this._getActiveElements(t,o,n,r),a=this._positionChanged(s,t),u=n||!qb(s,o)||a;return u&&(this._active=s,(i.enabled||i.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,n))),u}_getActiveElements(t,n,r,i){const o=this.options;if(t.type==="mouseout")return[];if(!i)return n;const s=this.chart.getElementsAtEventForMode(t,o.mode,o,r);return o.reverse&&s.reverse(),s}_positionChanged(t,n){const{caretX:r,caretY:i,options:o}=this,s=Rm[o.position].call(this,t,n);return s!==!1&&(r!==s.x||i!==s.y)}}Ln(zP,"positioners",Rm);var Mke={id:"tooltip",_element:zP,positioners:Rm,afterInit(e,t,n){n&&(e.tooltip=new zP({chart:e,options:n}))},beforeUpdate(e,t,n){e.tooltip&&e.tooltip.initialize(n)},reset(e,t,n){e.tooltip&&e.tooltip.initialize(n)},afterDraw(e){const t=e.tooltip;if(t&&t._willRender()){const n={tooltip:t};if(e.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;t.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",n)}},afterEvent(e,t){if(e.tooltip){const n=t.replay;e.tooltip.handleEvent(t.event,n,t.inChartArea)&&(t.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:(e,t)=>t.bodyFont.size,boxWidth:(e,t)=>t.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:C9},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:e=>e!=="filter"&&e!=="itemSort"&&e!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const Rke=(e,t,n,r)=>(typeof t=="string"?(n=e.push(t)-1,r.unshift({index:n,label:t})):isNaN(t)&&(n=null),n);function Oke(e,t,n,r){const i=e.indexOf(t);if(i===-1)return Rke(e,t,n,r);const o=e.lastIndexOf(t);return i!==o?n:i}const Dke=(e,t)=>e===null?null:wa(Math.round(e),0,t);function oz(e){const t=this.getLabels();return e>=0&&e<t.length?t[e]:e}class FP extends Kd{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const n=this._addedLabels;if(n.length){const r=this.getLabels();for(const{index:i,label:o}of n)r[i]===o&&r.splice(i,1);this._addedLabels=[]}super.init(t)}parse(t,n){if(Mr(t))return null;const r=this.getLabels();return n=isFinite(n)&&r[n]===t?n:Oke(r,t,sr(n,t),this._addedLabels),Dke(n,r.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let{min:r,max:i}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(r=0),n||(i=this.getLabels().length-1)),this.min=r,this.max=i}buildTicks(){const t=this.min,n=this.max,r=this.options.offset,i=[];let o=this.getLabels();o=t===0&&n===o.length-1?o:o.slice(t,n+1),this._valueRange=Math.max(o.length-(r?0:1),1),this._startValue=this.min-(r?.5:0);for(let s=t;s<=n;s++)i.push({value:s});return i}getLabelForValue(t){return oz.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return typeof t!="number"&&(t=this.parse(t)),t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}Ln(FP,"id","category"),Ln(FP,"defaults",{ticks:{callback:oz}});function Ake(e,t){const n=[],{bounds:i,step:o,min:s,max:a,precision:u,count:f,maxTicks:p,maxDigits:g,includeBounds:v}=e,b=o||1,_=p-1,{min:T,max:I}=t,P=!Mr(s),M=!Mr(a),D=!Mr(f),N=(I-T)/(g+1);let z=s4((I-T)/_/b)*b,$,j,U,q;if(z<1e-14&&!P&&!M)return[{value:T},{value:I}];q=Math.ceil(I/z)-Math.floor(T/z),q>_&&(z=s4(q*z/_/b)*b),Mr(u)||($=Math.pow(10,u),z=Math.ceil(z*$)/$),i==="ticks"?(j=Math.floor(T/z)*z,U=Math.ceil(I/z)*z):(j=T,U=I),P&&M&&o&&cPe((a-s)/o,z/1e3)?(q=Math.round(Math.min((a-s)/z,p)),z=(a-s)/q,j=s,U=a):D?(j=P?s:j,U=M?a:U,q=f-1,z=(U-j)/q):(q=(U-j)/z,Jm(q,Math.round(q),z/1e3)?q=Math.round(q):q=Math.ceil(q));const Y=Math.max(l4(z),l4(j));$=Math.pow(10,Mr(u)?Y:u),j=Math.round(j*$)/$,U=Math.round(U*$)/$;let te=0;for(P&&(v&&j!==s?(n.push({value:s}),j<s&&te++,Jm(Math.round((j+te*z)*$)/$,s,az(s,N,e))&&te++):j<s&&te++);te<q;++te){const Z=Math.round((j+te*z)*$)/$;if(M&&Z>a)break;n.push({value:Z})}return M&&v&&U!==a?n.length&&Jm(n[n.length-1].value,a,az(a,N,e))?n[n.length-1].value=a:n.push({value:a}):(!M||U===a)&&n.push({value:U}),n}function az(e,t,{horizontal:n,minRotation:r}){const i=Bc(r),o=(n?Math.sin(i):Math.cos(i))||.001,s=.75*t*(""+e).length;return Math.min(t/o,s)}class e_ extends Kd{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,n){return Mr(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:n,maxDefined:r}=this.getUserBounds();let{min:i,max:o}=this;const s=u=>i=n?i:u,a=u=>o=r?o:u;if(t){const u=il(i),f=il(o);u<0&&f<0?a(0):u>0&&f>0&&s(0)}if(i===o){let u=o===0?1:Math.abs(o*.05);a(o+u),t||s(i-u)}this.min=i,this.max=o}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:n,stepSize:r}=t,i;return r?(i=Math.ceil(this.max/r)-Math.floor(this.min/r)+1,i>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${r} would result generating up to ${i} ticks. Limiting to 1000.`),i=1e3)):(i=this.computeTickLimit(),n=n||11),n&&(i=Math.min(n,i)),i}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,n=t.ticks;let r=this.getTickLimit();r=Math.max(2,r);const i={maxTicks:r,bounds:t.bounds,min:t.min,max:t.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},o=this._range||this,s=Ake(i,o);return t.bounds==="ticks"&&Vj(s,this,"value"),t.reverse?(s.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),s}configure(){const t=this.ticks;let n=this.min,r=this.max;if(super.configure(),this.options.offset&&t.length){const i=(r-n)/Math.max(t.length-1,1)/2;n-=i,r+=i}this._startValue=n,this._endValue=r,this._valueRange=r-n}getLabelForValue(t){return nM(t,this.chart.options.locale,this.options.ticks.format)}}class $P extends e_{determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=to(t)?t:0,this.max=to(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),n=t?this.width:this.height,r=Bc(this.options.ticks.minRotation),i=(t?Math.sin(r):Math.cos(r))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,o.lineHeight/i))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}Ln($P,"id","linear"),Ln($P,"defaults",{ticks:{callback:L1.formatters.numeric}});const jg=e=>Math.floor($c(e)),qu=(e,t)=>Math.pow(10,jg(e)+t);function sz(e){return e/Math.pow(10,jg(e))===1}function lz(e,t,n){const r=Math.pow(10,n),i=Math.floor(e/r);return Math.ceil(t/r)-i}function Nke(e,t){const n=t-e;let r=jg(n);for(;lz(e,t,r)>10;)r++;for(;lz(e,t,r)<10;)r--;return Math.min(r,jg(e))}function Lke(e,{min:t,max:n}){t=ga(e.min,t);const r=[],i=jg(t);let o=Nke(t,n),s=o<0?Math.pow(10,Math.abs(o)):1;const a=Math.pow(10,o),u=i>o?Math.pow(10,i):0,f=Math.round((t-u)*s)/s,p=Math.floor((t-u)/a/10)*a*10;let g=Math.floor((f-p)/Math.pow(10,o)),v=ga(e.min,Math.round((u+p+g*Math.pow(10,o))*s)/s);for(;v<n;)r.push({value:v,major:sz(v),significand:g}),g>=10?g=g<15?15:20:g++,g>=20&&(o++,g=2,s=o>=0?1:s),v=Math.round((u+p+g*Math.pow(10,o))*s)/s;const b=ga(e.max,v);return r.push({value:b,major:sz(b),significand:g}),r}class cz extends Kd{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,n){const r=e_.prototype.parse.apply(this,[t,n]);if(r===0){this._zero=!0;return}return to(r)&&r>0?r:null}determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=to(t)?Math.max(0,t):null,this.max=to(n)?Math.max(0,n):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!to(this._userMin)&&(this.min=t===qu(this.min,0)?qu(this.min,-1):qu(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let r=this.min,i=this.max;const o=a=>r=t?r:a,s=a=>i=n?i:a;r===i&&(r<=0?(o(1),s(10)):(o(qu(r,-1)),s(qu(i,1)))),r<=0&&o(qu(i,-1)),i<=0&&s(qu(r,1)),this.min=r,this.max=i}buildTicks(){const t=this.options,n={min:this._userMin,max:this._userMax},r=Lke(n,this);return t.bounds==="ticks"&&Vj(r,this,"value"),t.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}getLabelForValue(t){return t===void 0?"0":nM(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=$c(t),this._valueRange=$c(this.max)-$c(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:($c(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const n=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+n*this._valueRange)}}Ln(cz,"id","logarithmic"),Ln(cz,"defaults",{ticks:{callback:L1.formatters.logarithmic,major:{enabled:!0}}});function BP(e){const t=e.ticks;if(t.display&&e.display){const n=Io(t.backdropPadding);return sr(t.font&&t.font.size,vi.font.size)+n.height}return 0}function zke(e,t,n){return n=ai(n)?n:[n],{w:kPe(e,t.string,n),h:n.length*t.lineHeight}}function uz(e,t,n,r,i){return e===r||e===i?{start:t-n/2,end:t+n/2}:e<r||e>i?{start:t-n,end:t}:{start:t,end:t+n}}function Fke(e){const t={l:e.left+e._padding.left,r:e.right-e._padding.right,t:e.top+e._padding.top,b:e.bottom-e._padding.bottom},n=Object.assign({},t),r=[],i=[],o=e._pointLabels.length,s=e.options.pointLabels,a=s.centerPointLabels?Li/o:0;for(let u=0;u<o;u++){const f=s.setContext(e.getPointLabelContext(u));i[u]=f.padding;const p=e.getPointPosition(u,e.drawingArea+i[u],a),g=ji(f.font),v=zke(e.ctx,g,e._pointLabels[u]);r[u]=v;const b=Cs(e.getIndexAngle(u)+a),_=Math.round(Qk(b)),T=uz(_,p.x,v.w,0,180),I=uz(_,p.y,v.h,90,270);$ke(n,t,b,T,I)}e.setCenterPoint(t.l-n.l,n.r-t.r,t.t-n.t,n.b-t.b),e._pointLabelItems=Uke(e,r,i)}function $ke(e,t,n,r,i){const o=Math.abs(Math.sin(n)),s=Math.abs(Math.cos(n));let a=0,u=0;r.start<t.l?(a=(t.l-r.start)/o,e.l=Math.min(e.l,t.l-a)):r.end>t.r&&(a=(r.end-t.r)/o,e.r=Math.max(e.r,t.r+a)),i.start<t.t?(u=(t.t-i.start)/s,e.t=Math.min(e.t,t.t-u)):i.end>t.b&&(u=(i.end-t.b)/s,e.b=Math.max(e.b,t.b+u))}function Bke(e,t,n){const r=e.drawingArea,{extra:i,additionalAngle:o,padding:s,size:a}=n,u=e.getPointPosition(t,r+i+s,o),f=Math.round(Qk(Cs(u.angle+_a))),p=Kke(u.y,a.h,f),g=jke(f),v=Hke(u.x,a.w,g);return{visible:!0,x:u.x,y:p,textAlign:g,left:v,top:p,right:v+a.w,bottom:p+a.h}}function Vke(e,t){if(!t)return!0;const{left:n,top:r,right:i,bottom:o}=e;return!(Bl({x:n,y:r},t)||Bl({x:n,y:o},t)||Bl({x:i,y:r},t)||Bl({x:i,y:o},t))}function Uke(e,t,n){const r=[],i=e._pointLabels.length,o=e.options,{centerPointLabels:s,display:a}=o.pointLabels,u={extra:BP(o)/2,additionalAngle:s?Li/i:0};let f;for(let p=0;p<i;p++){u.padding=n[p],u.size=t[p];const g=Bke(e,p,u);r.push(g),a==="auto"&&(g.visible=Vke(g,f),g.visible&&(f=g))}return r}function jke(e){return e===0||e===180?"center":e<180?"left":"right"}function Hke(e,t,n){return n==="right"?e-=t:n==="center"&&(e-=t/2),e}function Kke(e,t,n){return n===90||n===270?e-=t/2:(n>270||n<90)&&(e-=t),e}function Wke(e,t,n){const{left:r,top:i,right:o,bottom:s}=n,{backdropColor:a}=t;if(!Mr(a)){const u=bd(t.borderRadius),f=Io(t.backdropPadding);e.fillStyle=a;const p=r-f.left,g=i-f.top,v=o-r+f.width,b=s-i+f.height;Object.values(u).some(_=>_!==0)?(e.beginPath(),Vg(e,{x:p,y:g,w:v,h:b,radius:u}),e.fill()):e.fillRect(p,g,v,b)}}function Gke(e,t){const{ctx:n,options:{pointLabels:r}}=e;for(let i=t-1;i>=0;i--){const o=e._pointLabelItems[i];if(!o.visible)continue;const s=r.setContext(e.getPointLabelContext(i));Wke(n,s,o);const a=ji(s.font),{x:u,y:f,textAlign:p}=o;Ad(n,e._pointLabels[i],u,f+a.lineHeight/2,a,{color:s.color,textAlign:p,textBaseline:"middle"})}}function S9(e,t,n,r){const{ctx:i}=e;if(n)i.arc(e.xCenter,e.yCenter,t,0,rs);else{let o=e.getPointPosition(0,t);i.moveTo(o.x,o.y);for(let s=1;s<r;s++)o=e.getPointPosition(s,t),i.lineTo(o.x,o.y)}}function qke(e,t,n,r,i){const o=e.ctx,s=t.circular,{color:a,lineWidth:u}=t;!s&&!r||!a||!u||n<0||(o.save(),o.strokeStyle=a,o.lineWidth=u,o.setLineDash(i.dash),o.lineDashOffset=i.dashOffset,o.beginPath(),S9(e,n,s,r),o.closePath(),o.stroke(),o.restore())}function Zke(e,t,n){return gu(e,{label:n,index:t,type:"pointLabel"})}class Ux extends e_{constructor(t){super(t),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const t=this._padding=Io(BP(this.options)/2),n=this.width=this.maxWidth-t.width,r=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+n/2+t.left),this.yCenter=Math.floor(this.top+r/2+t.top),this.drawingArea=Math.floor(Math.min(n,r)/2)}determineDataLimits(){const{min:t,max:n}=this.getMinMax(!1);this.min=to(t)&&!isNaN(t)?t:0,this.max=to(n)&&!isNaN(n)?n:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/BP(this.options))}generateTickLabels(t){e_.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map((n,r)=>{const i=Zr(this.options.pointLabels.callback,[n,r],this);return i||i===0?i:""}).filter((n,r)=>this.chart.getDataVisibility(r))}fit(){const t=this.options;t.display&&t.pointLabels.display?Fke(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,n,r,i){this.xCenter+=Math.floor((t-n)/2),this.yCenter+=Math.floor((r-i)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,n,r,i))}getIndexAngle(t){const n=rs/(this._pointLabels.length||1),r=this.options.startAngle||0;return Cs(t*n+Bc(r))}getDistanceFromCenterForValue(t){if(Mr(t))return NaN;const n=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*n:(t-this.min)*n}getValueForDistanceFromCenter(t){if(Mr(t))return NaN;const n=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-n:this.min+n}getPointLabelContext(t){const n=this._pointLabels||[];if(t>=0&&t<n.length){const r=n[t];return Zke(this.getContext(),t,r)}}getPointPosition(t,n,r=0){const i=this.getIndexAngle(t)-_a+r;return{x:Math.cos(i)*n+this.xCenter,y:Math.sin(i)*n+this.yCenter,angle:i}}getPointPositionForValue(t,n){return this.getPointPosition(t,this.getDistanceFromCenterForValue(n))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){const{left:n,top:r,right:i,bottom:o}=this._pointLabelItems[t];return{left:n,top:r,right:i,bottom:o}}drawBackground(){const{backgroundColor:t,grid:{circular:n}}=this.options;if(t){const r=this.ctx;r.save(),r.beginPath(),S9(this,this.getDistanceFromCenterForValue(this._endValue),n,this._pointLabels.length),r.closePath(),r.fillStyle=t,r.fill(),r.restore()}}drawGrid(){const t=this.ctx,n=this.options,{angleLines:r,grid:i,border:o}=n,s=this._pointLabels.length;let a,u,f;if(n.pointLabels.display&&Gke(this,s),i.display&&this.ticks.forEach((p,g)=>{if(g!==0){u=this.getDistanceFromCenterForValue(p.value);const v=this.getContext(g),b=i.setContext(v),_=o.setContext(v);qke(this,b,u,s,_)}}),r.display){for(t.save(),a=s-1;a>=0;a--){const p=r.setContext(this.getPointLabelContext(a)),{color:g,lineWidth:v}=p;!v||!g||(t.lineWidth=v,t.strokeStyle=g,t.setLineDash(p.borderDash),t.lineDashOffset=p.borderDashOffset,u=this.getDistanceFromCenterForValue(n.ticks.reverse?this.min:this.max),f=this.getPointPosition(a,u),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(f.x,f.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,n=this.options,r=n.ticks;if(!r.display)return;const i=this.getIndexAngle(0);let o,s;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(i),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((a,u)=>{if(u===0&&!n.reverse)return;const f=r.setContext(this.getContext(u)),p=ji(f.font);if(o=this.getDistanceFromCenterForValue(this.ticks[u].value),f.showLabelBackdrop){t.font=p.string,s=t.measureText(a.label).width,t.fillStyle=f.backdropColor;const g=Io(f.backdropPadding);t.fillRect(-s/2-g.left,-o-p.size/2-g.top,s+g.width,p.size+g.height)}Ad(t,a.label,0,-o,p,{color:f.color,strokeColor:f.textStrokeColor,strokeWidth:f.textStrokeWidth})}),t.restore()}drawTitle(){}}Ln(Ux,"id","radialLinear"),Ln(Ux,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:L1.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(t){return t},padding:5,centerPointLabels:!1}}),Ln(Ux,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),Ln(Ux,"descriptors",{angleLines:{_fallback:"grid"}});const F1={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}},Jo=Object.keys(F1);function dz(e,t){return e-t}function fz(e,t){if(Mr(t))return null;const n=e._adapter,{parser:r,round:i,isoWeekday:o}=e._parseOpts;let s=t;return typeof r=="function"&&(s=r(s)),to(s)||(s=typeof r=="string"?n.parse(s,r):n.parse(s)),s===null?null:(i&&(s=i==="week"&&(Bg(o)||o===!0)?n.startOf(s,"isoWeek",o):n.startOf(s,i)),+s)}function hz(e,t,n,r){const i=Jo.length;for(let o=Jo.indexOf(e);o<i-1;++o){const s=F1[Jo[o]],a=s.steps?s.steps:Number.MAX_SAFE_INTEGER;if(s.common&&Math.ceil((n-t)/(a*s.size))<=r)return Jo[o]}return Jo[i-1]}function Xke(e,t,n,r,i){for(let o=Jo.length-1;o>=Jo.indexOf(n);o--){const s=Jo[o];if(F1[s].common&&e._adapter.diff(i,r,s)>=t-1)return s}return Jo[n?Jo.indexOf(n):0]}function Yke(e){for(let t=Jo.indexOf(e)+1,n=Jo.length;t<n;++t)if(F1[Jo[t]].common)return Jo[t]}function pz(e,t,n){if(!n)e[t]=!0;else if(n.length){const{lo:r,hi:i}=Jk(n,t),o=n[r]>=t?n[r]:n[i];e[o]=!0}}function Qke(e,t,n,r){const i=e._adapter,o=+i.startOf(t[0].value,r),s=t[t.length-1].value;let a,u;for(a=o;a<=s;a=+i.add(a,1,r))u=n[a],u>=0&&(t[u].major=!0);return t}function mz(e,t,n){const r=[],i={},o=t.length;let s,a;for(s=0;s<o;++s)a=t[s],i[a]=s,r.push({value:a,major:!1});return o===0||!n?r:Qke(e,r,i,n)}class t_ extends Kd{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,n={}){const r=t.time||(t.time={}),i=this._adapter=new KTe._date(t.adapters.date);i.init(n),Qm(r.displayFormats,i.formats()),this._parseOpts={parser:r.parser,round:r.round,isoWeekday:r.isoWeekday},super.init(t),this._normalized=n.normalized}parse(t,n){return t===void 0?null:fz(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,n=this._adapter,r=t.time.unit||"day";let{min:i,max:o,minDefined:s,maxDefined:a}=this.getUserBounds();function u(f){!s&&!isNaN(f.min)&&(i=Math.min(i,f.min)),!a&&!isNaN(f.max)&&(o=Math.max(o,f.max))}(!s||!a)&&(u(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&u(this.getMinMax(!1))),i=to(i)&&!isNaN(i)?i:+n.startOf(Date.now(),r),o=to(o)&&!isNaN(o)?o:+n.endOf(Date.now(),r)+1,this.min=Math.min(i,o-1),this.max=Math.max(i+1,o)}_getLabelBounds(){const t=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;return t.length&&(n=t[0],r=t[t.length-1]),{min:n,max:r}}buildTicks(){const t=this.options,n=t.time,r=t.ticks,i=r.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&i.length&&(this.min=this._userMin||i[0],this.max=this._userMax||i[i.length-1]);const o=this.min,s=this.max,a=pPe(i,o,s);return this._unit=n.unit||(r.autoSkip?hz(n.minUnit,this.min,this.max,this._getLabelCapacity(o)):Xke(this,a.length,n.minUnit,this.min,this.max)),this._majorUnit=!r.major.enabled||this._unit==="year"?void 0:Yke(this._unit),this.initOffsets(i),t.reverse&&a.reverse(),mz(this,a,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let n=0,r=0,i,o;this.options.offset&&t.length&&(i=this.getDecimalForValue(t[0]),t.length===1?n=1-i:n=(this.getDecimalForValue(t[1])-i)/2,o=this.getDecimalForValue(t[t.length-1]),t.length===1?r=o:r=(o-this.getDecimalForValue(t[t.length-2]))/2);const s=t.length<3?.5:.25;n=wa(n,0,s),r=wa(r,0,s),this._offsets={start:n,end:r,factor:1/(n+1+r)}}_generate(){const t=this._adapter,n=this.min,r=this.max,i=this.options,o=i.time,s=o.unit||hz(o.minUnit,n,r,this._getLabelCapacity(n)),a=sr(i.ticks.stepSize,1),u=s==="week"?o.isoWeekday:!1,f=Bg(u)||u===!0,p={};let g=n,v,b;if(f&&(g=+t.startOf(g,"isoWeek",u)),g=+t.startOf(g,f?"day":s),t.diff(r,n,s)>1e5*a)throw new Error(n+" and "+r+" are too far apart with stepSize of "+a+" "+s);const _=i.ticks.source==="data"&&this.getDataTimestamps();for(v=g,b=0;v<r;v=+t.add(v,a,s),b++)pz(p,v,_);return(v===r||i.bounds==="ticks"||b===1)&&pz(p,v,_),Object.keys(p).sort(dz).map(T=>+T)}getLabelForValue(t){const n=this._adapter,r=this.options.time;return r.tooltipFormat?n.format(t,r.tooltipFormat):n.format(t,r.displayFormats.datetime)}format(t,n){const i=this.options.time.displayFormats,o=this._unit,s=n||i[o];return this._adapter.format(t,s)}_tickFormatFunction(t,n,r,i){const o=this.options,s=o.ticks.callback;if(s)return Zr(s,[t,n,r],this);const a=o.time.displayFormats,u=this._unit,f=this._majorUnit,p=u&&a[u],g=f&&a[f],v=r[n],b=f&&g&&v&&v.major;return this._adapter.format(t,i||(b?g:p))}generateTickLabels(t){let n,r,i;for(n=0,r=t.length;n<r;++n)i=t[n],i.label=this._tickFormatFunction(i.value,n,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const n=this._offsets,r=this.getDecimalForValue(t);return this.getPixelForDecimal((n.start+r)*n.factor)}getValueForPixel(t){const n=this._offsets,r=this.getDecimalForPixel(t)/n.factor-n.end;return this.min+r*(this.max-this.min)}_getLabelSize(t){const n=this.options.ticks,r=this.ctx.measureText(t).width,i=Bc(this.isHorizontal()?n.maxRotation:n.minRotation),o=Math.cos(i),s=Math.sin(i),a=this._resolveTickFontOptions(0).size;return{w:r*o+a*s,h:r*s+a*o}}_getLabelCapacity(t){const n=this.options.time,r=n.displayFormats,i=r[n.unit]||r.millisecond,o=this._tickFormatFunction(t,0,mz(this,[t],this._majorUnit),i),s=this._getLabelSize(o),a=Math.floor(this.isHorizontal()?this.width/s.w:this.height/s.h)-1;return a>0?a:1}getDataTimestamps(){let t=this._cache.data||[],n,r;if(t.length)return t;const i=this.getMatchingVisibleMetas();if(this._normalized&&i.length)return this._cache.data=i[0].controller.getAllParsedValues(this);for(n=0,r=i.length;n<r;++n)t=t.concat(i[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let n,r;if(t.length)return t;const i=this.getLabels();for(n=0,r=i.length;n<r;++n)t.push(fz(this,i[n]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return Hj(t.sort(dz))}}Ln(t_,"id","time"),Ln(t_,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}});function jx(e,t,n){let r=0,i=e.length-1,o,s,a,u;n?(t>=e[r].pos&&t<=e[i].pos&&({lo:r,hi:i}=md(e,"pos",t)),{pos:o,time:a}=e[r],{pos:s,time:u}=e[i]):(t>=e[r].time&&t<=e[i].time&&({lo:r,hi:i}=md(e,"time",t)),{time:o,pos:a}=e[r],{time:s,pos:u}=e[i]);const f=s-o;return f?a+(u-a)*(t-o)/f:a}class gz extends t_{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(t);this._minPos=jx(n,this.min),this._tableRange=jx(n,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:n,max:r}=this,i=[],o=[];let s,a,u,f,p;for(s=0,a=t.length;s<a;++s)f=t[s],f>=n&&f<=r&&i.push(f);if(i.length<2)return[{time:n,pos:0},{time:r,pos:1}];for(s=0,a=i.length;s<a;++s)p=i[s+1],u=i[s-1],f=i[s],Math.round((p+u)/2)!==f&&o.push({time:f,pos:s/(a-1)});return o}_generate(){const t=this.min,n=this.max;let r=super.getDataTimestamps();return(!r.includes(t)||!r.length)&&r.splice(0,0,t),(!r.includes(n)||r.length===1)&&r.push(n),r.sort((i,o)=>i-o)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const n=this.getDataTimestamps(),r=this.getLabelTimestamps();return n.length&&r.length?t=this.normalize(n.concat(r)):t=n.length?n:r,t=this._cache.all=t,t}getDecimalForValue(t){return(jx(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const n=this._offsets,r=this.getDecimalForPixel(t)/n.factor-n.end;return jx(this._table,r*this._tableRange+this._minPos,!0)}}Ln(gz,"id","timeseries"),Ln(gz,"defaults",t_.defaults);const E9="label";function vz(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function Jke(e,t){const n=e.options;n&&t&&Object.assign(n,t)}function P9(e,t){e.labels=t}function T9(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:E9;const r=[];e.datasets=t.map(i=>{const o=e.datasets.find(s=>s[n]===i[n]);return!o||!i.data||r.includes(o)?{...i}:(r.push(o),Object.assign(o,i),o)})}function eMe(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:E9;const n={labels:[],datasets:[]};return P9(n,e.labels),T9(n,e.datasets,t),n}function tMe(e,t){const{height:n=150,width:r=300,redraw:i=!1,datasetIdKey:o,type:s,data:a,options:u,plugins:f=[],fallbackContent:p,updateMode:g,...v}=e,b=E.exports.useRef(null),_=E.exports.useRef(),T=()=>{!b.current||(_.current=new Zs(b.current,{type:s,data:eMe(a,o),options:u&&{...u},plugins:f}),vz(t,_.current))},I=()=>{vz(t,null),_.current&&(_.current.destroy(),_.current=null)};return E.exports.useEffect(()=>{!i&&_.current&&u&&Jke(_.current,u)},[i,u]),E.exports.useEffect(()=>{!i&&_.current&&P9(_.current.config.data,a.labels)},[i,a.labels]),E.exports.useEffect(()=>{!i&&_.current&&a.datasets&&T9(_.current.config.data,a.datasets,o)},[i,a.datasets]),E.exports.useEffect(()=>{!_.current||(i?(I(),setTimeout(T)):_.current.update(g))},[i,u,a.labels,a.datasets,g]),E.exports.useEffect(()=>{!_.current||(I(),setTimeout(T))},[s]),E.exports.useEffect(()=>(T(),()=>I()),[]),A("canvas",{...Object.assign({ref:b,role:"img",height:n,width:r},v),children:p})}const nMe=E.exports.forwardRef(tMe);function rMe(e,t){return Zs.register(t),E.exports.forwardRef((n,r)=>A(nMe,{...Object.assign({},n,{ref:r,type:e})}))}const iMe=rMe("line",_0);Zs.register(FP,b0,S0,Mm,$P,E0,wke,Mke,bke);const yz={t_shap:"Air temperature",fi_remont1_shap:"Replacement of cold water risers",fi_remont2_shap:"Repair of internal cold water mains",fi_remont3_shap:"Replacement of hot water risers",fi_remont4_shap:"Repair of internal hot water mains",fi_remont5_shap:"Repair of sewer risers",fi_remont6_shap:"Repair of sewer outlets and collector pipelines",fi_remont7_shap:"Repair of internal heating systems (with riser replacement)",fi_remont8_shap:"Repair of heating mains",total_area_shap:"Total area",fi_is_block_shap:"Material - block",fi_is_brick_shap:"Material - brick",fi_is_panel_shap:"Material - panel",building_wear_shap:"Wear",fi_is_monolit_shap:"Material - monolithic",fi_energy_class_shap:"Energy efficiency class",fi_building_year_shap:"Year of construction",gvs_avg_heat_load_shap:"Average hot water heat load",heating_heat_load_shap:"Heating heat load",gvs_fact_heat_load_shap:"Actual hot water heat load",ventilation_heat_load_shap:"Ventilation heat load"},oMe=({point:e})=>{const{data:t}=abe(e.id),{consumer_filter:n}=qi(),r=E.exports.useMemo(()=>t?!n||!n.key.includes("prob")?t.prob1_35:t[`${n.key}_35`]:null,[t,n]);if(!t||!r)return"";const i={indexAxis:"y",elements:{bar:{borderWidth:0,borderRadius:5,pointStyle:"circle"}},plugins:{legend:{display:!1},tooltip:{displayColors:!1,yAlign:"top"}},scales:{y:{stacked:!0},x:{title:{display:!0,text:"Contribution to forecast, %"},grid:{color:function(a){return a.tick.value===0?"#000000":"#E5E5E5"}}}}},o=Object.keys(yz).sort((a,u)=>Math.abs(r[a])<Math.abs(r[u])?1:-1).slice(0,15),s={labels:o.map(a=>yz[a]),datasets:[{data:o.map(a=>r?r[a]:0),backgroundColor:o.map(a=>r[a]).map(a=>a<=0?"#278211":"#CC2500"),hoverBackgroundColor:o.map(a=>r[a]).map(a=>a<=0?"#2DB20C":"#F22C00"),type:"bar",showLine:!1}]};return A(iMe,{options:i,data:s})},aMe=()=>it("div",{className:"w-[200px]",children:["The chart shows the top 15 factors that have the greatest impact on the failure forecast for the object.",A("br",{}),A("br",{}),"Factors can have a positive or negative impact.",A("br",{}),A("br",{}),"The stronger the factor's impact on failures, the closer its value is to 100% (-100%)."]}),sMe=({point:e})=>{const[t,n]=E.exports.useState(!1);return it("div",{className:"flex items-center",children:[A(ka,{title:"Impact of factors on forecast",children:A(Yr,{className:"flex justify-center items-center h-6 ml-1 mb-1 p-2",type:"primary",onClick:()=>n(!0),children:"Impact of factors on forecast"})}),A(X8,{open:t,title:"Contribution of factors to failure forecast",onCancel:()=>n(!1),width:800,footer:(()=>[A(Yr,{type:"primary",onClick:()=>n(!1),children:"Close"},"close-button")])(),style:{top:"15px"},children:it("div",{children:[A("div",{className:"flex flex-col gap-2",children:it(ad,{className:Td("p-1"),children:[A(_b,{className:"font-semibold",span:12,children:"Point address:"}),A(_b,{span:12,children:e.building_address})]})}),A(Voe,{}),A(oMe,{point:e}),A(EB,{content:A(aMe,{autoFocus:!0}),trigger:"click",placement:"leftBottom",color:"#ffffff",children:A(Yr,{type:"text",className:"text-[#1890FF] p-0",children:"How to read the chart?"})})]})})]})},lMe=({feature:e})=>it("div",{className:"flex-col gap-2",children:[e.properties.point_type==="potreb"&&A(sMe,{point:e.properties}),A(MEe,{feature:e})]}),cMe={potreb:"Consumer",tp:"Source",ods:"Dispatch center"},uMe=({features:e})=>{const{setPopup:t}=N1();return A("div",{className:"space-y-2 p-1",children:e.map(n=>{const r=n.properties.id;return A("div",{className:"flex flex-row items-center gap-2 w-full",children:A(Yr,{className:"text-start flex-1 !w-0",block:!0,onClick:()=>{t({features:[n],coordinates:n.geometry.coordinates})},children:A("div",{className:"space-x-2 flex items-center w-full",children:A("span",{className:"flex-1 truncate inline-block",children:cMe[n.properties.point_type]})})})},r)})})},dMe=({features:e,lat:t,lng:n,onClose:r})=>A(IEe,{lat:t,lng:n,onClose:r,children:(()=>e.length===1?A(lMe,{feature:e[0]}):A(uMe,{features:e}))()}),fMe=({width:e=24,height:t=24})=>it("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",width:e,height:t,children:[A("polygon",{points:"23.7,4.1 23.7,6.1 0.1,6.2 0.1,4.1 "}),it("g",{children:[A("circle",{cx:"6.3",cy:"5.2",r:"3.1"}),A("circle",{fill:"#fff",cx:"6.3",cy:"5.2",r:"1.4"})]}),A("polygon",{points:"23.6,11.1 23.7,13.1 0,13.1 0,11 "}),it("g",{children:[A("circle",{cx:"18.6",cy:"12.1",r:"3.1"}),A("circle",{fill:"#fff",cx:"18.6",cy:"12.1",r:"1.4"})]}),A("polygon",{points:"23.8,18.2 23.9,20.1 0.2,20.2 0.2,18.2 "}),it("g",{children:[A("circle",{cx:"10.2",cy:"19.1",r:"3.1"}),A("circle",{fill:"#fff",cx:"10.2",cy:"19.1",r:"1.4"})]})]}),hMe=({toggleCollapse:e})=>A(Yr,{icon:A(fMe,{width:16,height:16}),onClick:e,className:"border-l-0 rounded-bl-none rounded-tl-none absolute top-[100px] flex items-center justify-center"}),pMe=()=>{const e=E.exports.useRef(null),t=E.exports.useRef(null),n=E.exports.useRef(null),{popup:r,setPopup:i}=N1(),{setClickedPointConfig:o}=bv(),{tableState:s,openTable:a}=E1(),u=I=>{if(!I.features){i(null),o(null);return}const P=I.features[0];if(!P){i(null),o(null);return}const{lng:M}=I.lngLat;if(P.geometry.type==="Point"){const D=P.geometry.coordinates.slice();for(;Math.abs(M-D[0])>180;)D[0]+=M>D[0]?360:-360;i({features:I.features,coordinates:D})}},f=I=>{!I.features[0]||(e.current.getCanvas().style.cursor="pointer")},p=I=>{!I.features[0]||(e.current.getCanvas().style.cursor="")};E.exports.useEffect(()=>{const I=new ResizeObserver(Xq(()=>{var P;(P=e==null?void 0:e.current)==null||P.resize()},16));return t.current&&I.observe(t.current),()=>{I.disconnect()}},[t.current]),E.exports.useEffect(()=>{s.fullScreen&&!s.isOpened&&a()},[s.fullScreen]);const[g,v]=E.exports.useState(!1),b=()=>v(I=>!I),[_,T]=E.exports.useState(!1);return E.exports.useEffect(()=>{i3.map(I=>{var M,D;const P=new Image(((M=I.size)==null?void 0:M.width)||64,((D=I.size)==null?void 0:D.height)||64);P.src=I.url,P.crossOrigin="Anonymous",P.onload=()=>{e.current.addImage(I.name,P)}})},[i3]),A(tZ,{children:it("div",{className:"w-screen h-screen relative flex overflow-hidden",children:[A(A_e,{isCollapsed:g,ref:n}),it("div",{className:"flex-1 h-screen flex flex-col ",children:[A("div",{ref:t,className:Td(s.fullScreen?"":"flex-1"),children:it($T,{mapLib:Yq,initialViewState:{latitude:55.7558,longitude:37.6173,zoom:12},dragRotate:!1,ref:e,interactiveLayerIds:[Ci.consumer,Ci.source,Ci.dispatcher],onClick:u,onMouseEnter:f,onMouseLeave:p,id:"map",mapStyle:"https://raw.githubusercontent.com/gtitov/basemaps/refs/heads/master/positron-nolabels.json",children:[r&&A(dMe,{lat:r.coordinates[1],lng:r.coordinates[0],features:r.features,onClose:()=>{i(null),o(null)}}),A(Bbe,{onClick:()=>T(!0)}),A(hMe,{toggleCollapse:b}),A(p_e,{}),A(d_e,{}),A(h_e,{}),A(fbe,{}),_&&A(Ube,{onClose:()=>T(!1)})]})}),A("div",{className:"w-full border-solid border-border border-0 border-t-[1px] z-20",children:A(TEe,{fullWidth:g})})]})]})})};function mMe(){return A(pMe,{})}const gMe=new xxe;Zye();function vMe(){return A(Cxe,{client:gMe,children:A(Oq,{basename:"/",children:A(Rq,{children:A(z5,{path:"/",element:A(mMe,{})})})})})}XS.createRoot(document.getElementById("root")).render(A(vMe,{}));